summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qrasterwindow.cpp
Commit message (Expand)AuthorAgeFilesLines
* Introduce QRasterWindowLaszlo Agocs2014-08-051-0/+136
_gcc-14_issue-5592 Vendor branches of assimp. This is a submodule of qtquick3d - no point in cloning it separately.
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Kulling <kim.kulling@googlemail.com>2018-12-26 20:43:04 +0100
committerKim Kulling <kim.kulling@googlemail.com>2018-12-26 20:43:04 +0100
commitdf8a9450c8e1d847cd366e2ea0069ca16bcb31b9 (patch)
tree0f552ad79fca5a90b3ccb905b2a89da62ded0c27
parent0e6cbdba3e74b425aa490b3612c09ddec70b05aa (diff)
parent9c78a43fbe49d121289e604c641a9ed13664ac9c (diff)
Merge branch 'master' into coverity_scan
Diffstat
-rw-r--r--.gitattributes7
-rw-r--r--.gitignore13
-rwxr-xr-x.travis.sh63
-rw-r--r--.travis.yml62
-rw-r--r--AssimpConfig.cmake.in21
-rw-r--r--Build.md58
-rw-r--r--CHANGES414
-rw-r--r--CMakeLists.txt350
-rw-r--r--CONTRIBUTING.md10
-rw-r--r--CREDITS23
-rw-r--r--INSTALL3
-rw-r--r--Readme.md101
-rw-r--r--appveyor.yml69
-rw-r--r--assimp-config.cmake.in82
-rw-r--r--assimp.pc.in2
-rw-r--r--assimpTargets-debug.cmake.in78
-rw-r--r--assimpTargets-release.cmake.in75
-rw-r--r--assimpTargets.cmake.in101
-rw-r--r--cmake-modules/CoverallsGenerateGcov.cmake4
-rw-r--r--code/3DSConverter.cpp45
-rw-r--r--code/3DSExporter.cpp18
-rw-r--r--code/3DSExporter.h24
-rw-r--r--code/3DSHelper.h167
-rw-r--r--code/3DSLoader.cpp111
-rw-r--r--code/3DSLoader.h7
-rw-r--r--code/3MFXmlTags.h104
-rw-r--r--code/ACLoader.cpp49
-rw-r--r--code/ACLoader.h5
-rw-r--r--code/AMFImporter.cpp7
-rw-r--r--code/AMFImporter.hpp271
-rw-r--r--code/AMFImporter_Geometry.cpp3
-rw-r--r--code/AMFImporter_Macro.hpp11
-rw-r--r--code/AMFImporter_Material.cpp103
-rw-r--r--code/AMFImporter_Node.hpp190
-rw-r--r--code/AMFImporter_Postprocess.cpp28
-rw-r--r--code/ASELoader.cpp41
-rw-r--r--code/ASELoader.h5
-rw-r--r--code/ASEParser.cpp69
-rw-r--r--code/ASEParser.h230
-rw-r--r--code/AssbinExporter.cpp1023
-rw-r--r--code/AssbinExporter.h12
-rw-r--r--code/AssbinLoader.cpp391
-rw-r--r--code/AssbinLoader.h49
-rw-r--r--code/Assimp.cpp13
-rw-r--r--code/AssimpCExport.cpp3
-rw-r--r--code/AssxmlExporter.cpp12
-rw-r--r--code/AssxmlExporter.h3
-rw-r--r--code/B3DImporter.cpp85
-rw-r--r--code/B3DImporter.h16
-rw-r--r--code/BVHLoader.cpp125
-rw-r--r--code/BVHLoader.h10
-rw-r--r--code/BaseImporter.cpp133
-rw-r--r--code/BaseProcess.cpp9
-rw-r--r--code/BaseProcess.h13
-rw-r--r--code/Bitmap.cpp14
-rw-r--r--code/BlenderBMesh.cpp6
-rw-r--r--code/BlenderBMesh.h2
-rw-r--r--code/BlenderCustomData.cpp185
-rw-r--r--code/BlenderCustomData.h89
-rw-r--r--code/BlenderDNA.cpp31
-rw-r--r--code/BlenderDNA.h57
-rw-r--r--code/BlenderDNA.inl120
-rw-r--r--code/BlenderIntermediate.h13
-rw-r--r--code/BlenderLoader.cpp130
-rw-r--r--code/BlenderLoader.h7
-rw-r--r--code/BlenderModifier.cpp39
-rw-r--r--code/BlenderModifier.h62
-rw-r--r--code/BlenderScene.cpp89
-rw-r--r--code/BlenderScene.h91
-rw-r--r--code/BlenderSceneGen.h11
-rw-r--r--code/BlenderTessellator.cpp15
-rw-r--r--code/BlenderTessellator.h7
-rw-r--r--code/C4DImporter.cpp14
-rw-r--r--code/C4DImporter.h6
-rw-r--r--code/CInterfaceIOWrapper.cpp3
-rw-r--r--code/CInterfaceIOWrapper.h3
-rw-r--r--code/CMakeLists.txt249
-rw-r--r--code/COBLoader.cpp124
-rw-r--r--code/COBLoader.h29
-rw-r--r--code/COBScene.h5
-rw-r--r--code/CSMLoader.cpp15
-rw-r--r--code/CSMLoader.h5
-rw-r--r--code/CalcTangentsProcess.cpp21
-rw-r--r--code/CalcTangentsProcess.h3
-rw-r--r--code/ColladaExporter.cpp315
-rw-r--r--code/ColladaExporter.h21
-rw-r--r--code/ColladaHelper.h12
-rw-r--r--code/ColladaLoader.cpp187
-rw-r--r--code/ColladaLoader.h6
-rw-r--r--code/ColladaParser.cpp106
-rw-r--r--code/ColladaParser.h12
-rw-r--r--code/ComputeUVMappingProcess.cpp17
-rw-r--r--code/ComputeUVMappingProcess.h3
-rw-r--r--code/ConvertToLHProcess.cpp74
-rw-r--r--code/ConvertToLHProcess.h3
-rw-r--r--code/CreateAnimMesh.cpp2
-rw-r--r--code/D3MFExporter.cpp398
-rw-r--r--code/D3MFExporter.h106
-rw-r--r--code/D3MFImporter.cpp396
-rw-r--r--code/D3MFImporter.h17
-rw-r--r--code/D3MFOpcPackage.cpp285
-rw-r--r--code/D3MFOpcPackage.h36
-rw-r--r--code/DXFHelper.h70
-rw-r--r--code/DXFLoader.cpp253
-rw-r--r--code/DXFLoader.h37
-rw-r--r--code/DeboneProcess.cpp15
-rw-r--r--code/DeboneProcess.h5
-rw-r--r--code/DefaultIOStream.cpp6
-rw-r--r--code/DefaultIOSystem.cpp113
-rw-r--r--code/DefaultLogger.cpp127
-rw-r--r--code/DefaultProgressHandler.h7
-rw-r--r--code/DropFaceNormalsProcess.cpp109
-rw-r--r--code/DropFaceNormalsProcess.h86
-rw-r--r--code/EmbedTexturesProcess.cpp146
-rw-r--r--code/EmbedTexturesProcess.h85
-rw-r--r--code/Exporter.cpp195
-rw-r--r--code/FBXAnimation.cpp31
-rw-r--r--code/FBXBinaryTokenizer.cpp169
-rw-r--r--code/FBXCommon.h86
-rw-r--r--code/FBXCompileConfig.h5
-rw-r--r--code/FBXConverter.cpp1328
-rw-r--r--code/FBXConverter.h378
-rw-r--r--code/FBXDeformer.cpp3
-rw-r--r--code/FBXDocument.cpp91
-rw-r--r--code/FBXDocument.h49
-rw-r--r--code/FBXDocumentUtil.cpp9
-rw-r--r--code/FBXDocumentUtil.h4
-rw-r--r--code/FBXExportNode.cpp568
-rw-r--r--code/FBXExportNode.h258
-rw-r--r--code/FBXExportProperty.cpp364
-rw-r--r--code/FBXExportProperty.h129
-rw-r--r--code/FBXExporter.cpp2479
-rw-r--r--code/FBXExporter.h178
-rw-r--r--code/FBXImportSettings.h8
-rw-r--r--code/FBXImporter.cpp17
-rw-r--r--code/FBXImporter.h7
-rw-r--r--code/FBXMaterial.cpp59
-rw-r--r--code/FBXMeshGeometry.cpp46
-rw-r--r--code/FBXMeshGeometry.h8
-rw-r--r--code/FBXModel.cpp6
-rw-r--r--code/FBXNodeAttribute.cpp18
-rw-r--r--code/FBXParser.cpp61
-rw-r--r--code/FBXParser.h39
-rw-r--r--code/FBXProperties.cpp8
-rw-r--r--code/FBXProperties.h64
-rw-r--r--code/FBXTokenizer.cpp9
-rw-r--r--code/FBXTokenizer.h4
-rw-r--r--code/FBXUtil.cpp5
-rw-r--r--code/FBXUtil.h3
-rwxr-xr-xcode/FIReader.cpp1834
-rw-r--r--code/FIReader.hpp188
-rw-r--r--code/FileLogStream.h3
-rw-r--r--code/FileSystemFilter.h181
-rw-r--r--code/FindDegenerates.cpp194
-rw-r--r--code/FindDegenerates.h65
-rw-r--r--code/FindInstancesProcess.cpp13
-rw-r--r--code/FindInstancesProcess.h17
-rw-r--r--code/FindInvalidDataProcess.cpp48
-rw-r--r--code/FindInvalidDataProcess.h3
-rw-r--r--code/FixNormalsStep.cpp43
-rw-r--r--code/FixNormalsStep.h8
-rw-r--r--code/GenFaceNormalsProcess.cpp30
-rw-r--r--code/GenFaceNormalsProcess.h6
-rw-r--r--code/GenVertexNormalsProcess.cpp43
-rw-r--r--code/GenVertexNormalsProcess.h4
-rw-r--r--code/HMPFileData.h7
-rw-r--r--code/HMPLoader.cpp12
-rw-r--r--code/HMPLoader.h5
-rw-r--r--code/HalfLifeFileData.h7
-rw-r--r--code/IFF.h2
-rw-r--r--code/IRRLoader.cpp91
-rw-r--r--code/IRRLoader.h5
-rw-r--r--code/IRRMeshLoader.cpp29
-rw-r--r--code/IRRMeshLoader.h5
-rw-r--r--code/IRRShared.cpp32
-rw-r--r--code/IRRShared.h6
-rw-r--r--code/Importer.cpp206
-rw-r--r--code/Importer.h33
-rw-r--r--code/Importer/IFC/IFCBoolean.cpp (renamed from code/IFCBoolean.cpp)93
-rw-r--r--code/Importer/IFC/IFCCurve.cpp (renamed from code/IFCCurve.cpp)223
-rw-r--r--code/Importer/IFC/IFCGeometry.cpp (renamed from code/IFCGeometry.cpp)218
-rw-r--r--code/Importer/IFC/IFCLoader.cpp (renamed from code/IFCLoader.cpp)159
-rw-r--r--code/Importer/IFC/IFCLoader.h (renamed from code/IFCLoader.h)7
-rw-r--r--code/Importer/IFC/IFCMaterial.cpp (renamed from code/IFCMaterial.cpp)27
-rw-r--r--code/Importer/IFC/IFCOpenings.cpp (renamed from code/IFCOpenings.cpp)139
-rw-r--r--code/Importer/IFC/IFCProfile.cpp (renamed from code/IFCProfile.cpp)96
-rw-r--r--code/Importer/IFC/IFCReaderGen1_2x3.cpp (renamed from code/IFCReaderGen1.cpp)148
-rw-r--r--code/Importer/IFC/IFCReaderGen2_2x3.cpp (renamed from code/IFCReaderGen2.cpp)33
-rw-r--r--code/Importer/IFC/IFCReaderGen_2x3.h (renamed from code/IFCReaderGen.h)9
-rw-r--r--code/Importer/IFC/IFCReaderGen_4.cpp6207
-rw-r--r--code/Importer/IFC/IFCReaderGen_4.h5452
-rw-r--r--code/Importer/IFC/IFCUtil.cpp (renamed from code/IFCUtil.cpp)163
-rw-r--r--code/Importer/IFC/IFCUtil.h (renamed from code/IFCUtil.h)132
-rw-r--r--code/Importer/STEPParser/STEPFileEncoding.cpp (renamed from code/STEPFileEncoding.cpp)7
-rw-r--r--code/Importer/STEPParser/STEPFileEncoding.h (renamed from code/STEPFileEncoding.h)3
-rw-r--r--code/Importer/STEPParser/STEPFileReader.cpp (renamed from code/STEPFileReader.cpp)57
-rw-r--r--code/Importer/STEPParser/STEPFileReader.h (renamed from code/STEPFileReader.h)34
-rw-r--r--code/Importer/StepFile/StepFileGen1.cpp2195
-rw-r--r--code/Importer/StepFile/StepFileGen2.cpp3067
-rw-r--r--code/Importer/StepFile/StepFileGen3.cpp5746
-rw-r--r--code/Importer/StepFile/StepFileImporter.cpp114
-rw-r--r--code/Importer/StepFile/StepFileImporter.h69
-rw-r--r--code/Importer/StepFile/StepReaderGen.h7288
-rw-r--r--code/ImporterRegistry.cpp15
-rw-r--r--code/ImproveCacheLocality.cpp41
-rw-r--r--code/ImproveCacheLocality.h3
-rw-r--r--code/JoinVerticesProcess.cpp332
-rw-r--r--code/JoinVerticesProcess.h3
-rw-r--r--code/LWOAnimation.cpp9
-rw-r--r--code/LWOAnimation.h42
-rw-r--r--code/LWOBLoader.cpp39
-rw-r--r--code/LWOFileData.h17
-rw-r--r--code/LWOLoader.cpp102
-rw-r--r--code/LWOLoader.h7
-rw-r--r--code/LWOMaterial.cpp53
-rw-r--r--code/LWSLoader.cpp59
-rw-r--r--code/LWSLoader.h5
-rw-r--r--code/LimitBoneWeightsProcess.cpp21
-rw-r--r--code/LimitBoneWeightsProcess.h9
-rw-r--r--code/MD2FileData.h3
-rw-r--r--code/MD2Loader.cpp33
-rw-r--r--code/MD2Loader.h7
-rw-r--r--code/MD2NormalTable.h3
-rw-r--r--code/MD3FileData.h5
-rw-r--r--code/MD3Loader.cpp72
-rw-r--r--code/MD3Loader.h13
-rw-r--r--code/MD4FileData.h6
-rw-r--r--code/MD5Loader.cpp28
-rw-r--r--code/MD5Loader.h7
-rw-r--r--code/MD5Parser.cpp29
-rw-r--r--code/MD5Parser.h19
-rw-r--r--code/MDCFileData.h67
-rw-r--r--code/MDCLoader.cpp38
-rw-r--r--code/MDCLoader.h7
-rw-r--r--code/MDLDefaultColorMap.h3
-rw-r--r--code/MDLFileData.h110
-rw-r--r--code/MDLLoader.cpp123
-rw-r--r--code/MDLLoader.h5
-rw-r--r--code/MDLMaterialLoader.cpp50
-rw-r--r--code/MMDCpp14.h3
-rw-r--r--code/MMDImporter.cpp48
-rw-r--r--code/MMDImporter.h2
-rw-r--r--code/MMDPmdParser.h79
-rw-r--r--code/MMDPmxParser.cpp112
-rw-r--r--code/MMDPmxParser.h124
-rw-r--r--code/MMDVmdParser.h37
-rw-r--r--code/MS3DLoader.cpp24
-rw-r--r--code/MS3DLoader.h7
-rw-r--r--code/MakeVerboseFormat.cpp18
-rw-r--r--code/MakeVerboseFormat.h3
-rw-r--r--code/MaterialSystem.cpp99
-rw-r--r--code/MaterialSystem.h3
-rw-r--r--code/NDOLoader.cpp13
-rw-r--r--code/NDOLoader.h2
-rw-r--r--code/NFFLoader.cpp77
-rw-r--r--code/NFFLoader.h5
-rw-r--r--code/OFFLoader.cpp255
-rw-r--r--code/OFFLoader.h5
-rw-r--r--code/ObjExporter.cpp198
-rw-r--r--code/ObjExporter.h110
-rw-r--r--code/ObjFileData.h3
-rw-r--r--code/ObjFileImporter.cpp199
-rw-r--r--code/ObjFileImporter.h5
-rw-r--r--code/ObjFileMtlImporter.cpp74
-rw-r--r--code/ObjFileMtlImporter.h3
-rw-r--r--code/ObjFileParser.cpp73
-rw-r--r--code/ObjFileParser.h8
-rw-r--r--code/ObjTools.h7
-rw-r--r--code/OgreBinarySerializer.cpp49
-rw-r--r--code/OgreBinarySerializer.h5
-rw-r--r--code/OgreImporter.cpp3
-rw-r--r--code/OgreImporter.h5
-rw-r--r--code/OgreMaterial.cpp46
-rw-r--r--code/OgreParsingUtils.h68
-rw-r--r--code/OgreStructs.cpp11
-rw-r--r--code/OgreStructs.h5
-rw-r--r--code/OgreXmlSerializer.cpp233
-rw-r--r--code/OgreXmlSerializer.h9
-rw-r--r--code/OpenGEXExporter.cpp5
-rw-r--r--code/OpenGEXExporter.h3
-rw-r--r--code/OpenGEXImporter.cpp155
-rw-r--r--code/OpenGEXImporter.h22
-rw-r--r--code/OpenGEXStructs.h3
-rw-r--r--code/OptimizeGraph.cpp79
-rw-r--r--code/OptimizeGraph.h5
-rw-r--r--code/OptimizeMeshes.cpp20
-rw-r--r--code/OptimizeMeshes.h21
-rw-r--r--code/PlyExporter.cpp52
-rw-r--r--code/PlyExporter.h3
-rw-r--r--code/PlyLoader.cpp1119
-rw-r--r--code/PlyLoader.h6
-rw-r--r--code/PlyParser.cpp156
-rw-r--r--code/PlyParser.h82
-rw-r--r--code/PolyTools.h3
-rw-r--r--code/PostStepRegistry.cpp33
-rw-r--r--code/PretransformVertices.cpp74
-rw-r--r--code/PretransformVertices.h12
-rw-r--r--code/ProcessHelper.cpp5
-rw-r--r--code/ProcessHelper.h11
-rw-r--r--code/Q3BSPFileData.h20
-rw-r--r--code/Q3BSPFileImporter.cpp392
-rw-r--r--code/Q3BSPFileImporter.h13
-rw-r--r--code/Q3BSPFileParser.cpp60
-rw-r--r--code/Q3BSPFileParser.h5
-rw-r--r--code/Q3BSPZipArchive.cpp29
-rw-r--r--code/Q3BSPZipArchive.h6
-rw-r--r--code/Q3DLoader.cpp17
-rw-r--r--code/Q3DLoader.h5
-rw-r--r--code/RawLoader.cpp16
-rw-r--r--code/RawLoader.h5
-rw-r--r--code/RemoveComments.cpp11
-rw-r--r--code/RemoveRedundantMaterials.cpp20
-rw-r--r--code/RemoveRedundantMaterials.h4
-rw-r--r--code/RemoveVCProcess.cpp16
-rw-r--r--code/RemoveVCProcess.h7
-rw-r--r--code/SGSpatialSort.cpp5
-rw-r--r--code/SIBImporter.cpp74
-rw-r--r--code/SIBImporter.h5
-rw-r--r--code/SMDLoader.cpp804
-rw-r--r--code/SMDLoader.h62
-rw-r--r--code/STEPFile.h134
-rw-r--r--code/STLExporter.cpp87
-rw-r--r--code/STLExporter.h12
-rw-r--r--code/STLLoader.cpp213
-rw-r--r--code/STLLoader.h65
-rw-r--r--code/ScaleProcess.cpp103
-rw-r--r--code/ScaleProcess.h88
-rw-r--r--code/SceneCombiner.cpp312
-rw-r--r--code/ScenePreprocessor.cpp17
-rw-r--r--code/ScenePreprocessor.h3
-rw-r--r--code/ScenePrivate.h42
-rw-r--r--code/SkeletonMeshBuilder.cpp5
-rw-r--r--code/SortByPTypeProcess.cpp54
-rw-r--r--code/SortByPTypeProcess.h3
-rw-r--r--code/SpatialSort.cpp9
-rw-r--r--code/SplitByBoneCountProcess.cpp13
-rw-r--r--code/SplitByBoneCountProcess.h3
-rw-r--r--code/SplitLargeMeshes.cpp331
-rw-r--r--code/SplitLargeMeshes.h3
-rw-r--r--code/StandardShapes.cpp9
-rw-r--r--code/StdOStreamLogStream.h3
-rw-r--r--code/StepExporter.cpp13
-rw-r--r--code/StepExporter.h3
-rw-r--r--code/Subdivision.cpp26
-rw-r--r--code/TargetAnimation.cpp3
-rw-r--r--code/TargetAnimation.h3
-rw-r--r--code/TerragenLoader.cpp12
-rw-r--r--code/TerragenLoader.h5
-rw-r--r--code/TextureTransform.cpp43
-rw-r--r--code/TextureTransform.h38
-rw-r--r--code/TriangulateProcess.cpp51
-rw-r--r--code/TriangulateProcess.h3
-rw-r--r--code/UnrealLoader.cpp23
-rw-r--r--code/UnrealLoader.h5
-rw-r--r--code/ValidateDataStructure.cpp41
-rw-r--r--code/ValidateDataStructure.h7
-rw-r--r--code/Version.cpp65
-rw-r--r--code/VertexTriangleAdjacency.cpp36
-rw-r--r--code/VertexTriangleAdjacency.h32
-rw-r--r--code/Win32DebugLogStream.h3
-rw-r--r--code/X3DExporter.cpp14
-rw-r--r--code/X3DExporter.hpp6
-rw-r--r--code/X3DImporter.cpp380
-rw-r--r--code/X3DImporter.hpp47
-rw-r--r--code/X3DImporter_Geometry2D.cpp3
-rw-r--r--code/X3DImporter_Geometry3D.cpp37
-rw-r--r--code/X3DImporter_Group.cpp3
-rw-r--r--code/X3DImporter_Light.cpp5
-rw-r--r--code/X3DImporter_Macro.hpp7
-rw-r--r--code/X3DImporter_Metadata.cpp23
-rw-r--r--code/X3DImporter_Networking.cpp33
-rw-r--r--code/X3DImporter_Node.hpp30
-rw-r--r--code/X3DImporter_Postprocess.cpp14
-rw-r--r--code/X3DImporter_Rendering.cpp47
-rw-r--r--code/X3DImporter_Shape.cpp3
-rw-r--r--code/X3DImporter_Texturing.cpp3
-rw-r--r--code/X3DVocabulary.cpp1676
-rw-r--r--code/XFileExporter.cpp17
-rw-r--r--code/XFileExporter.h8
-rw-r--r--code/XFileHelper.h121
-rw-r--r--code/XFileImporter.cpp356
-rw-r--r--code/XFileImporter.h10
-rw-r--r--code/XFileParser.cpp361
-rw-r--r--code/XFileParser.h62
-rw-r--r--code/XGLLoader.cpp69
-rw-r--r--code/XGLLoader.h9
-rw-r--r--code/glTF2Asset.h1117
-rwxr-xr-xcode/glTF2Asset.inl1639
-rw-r--r--code/glTF2AssetWriter.h96
-rw-r--r--code/glTF2AssetWriter.inl773
-rw-r--r--code/glTF2Exporter.cpp1096
-rw-r--r--code/glTF2Exporter.h131
-rwxr-xr-xcode/glTF2Importer.cpp1150
-rw-r--r--code/glTF2Importer.h92
-rw-r--r--code/glTFAsset.h25
-rw-r--r--code/glTFAsset.inl87
-rw-r--r--code/glTFAssetWriter.h3
-rw-r--r--code/glTFAssetWriter.inl22
-rw-r--r--code/glTFExporter.cpp39
-rw-r--r--code/glTFExporter.h7
-rwxr-xr-x[-rw-r--r--]code/glTFImporter.cpp144
-rw-r--r--code/glTFImporter.h5
-rw-r--r--code/makefile.mingw210
-rw-r--r--code/scene.cpp3
-rw-r--r--code/simd.cpp79
-rw-r--r--code/simd.h53
-rw-r--r--contrib/Open3DGC/o3dgcAdjacencyInfo.h4
-rw-r--r--contrib/Open3DGC/o3dgcArithmeticCodec.cpp2
-rw-r--r--contrib/Open3DGC/o3dgcBinaryStream.h15
-rw-r--r--contrib/Open3DGC/o3dgcDynamicVector.h8
-rw-r--r--contrib/Open3DGC/o3dgcFIFO.h4
-rw-r--r--contrib/Open3DGC/o3dgcIndexedFaceSet.h32
-rw-r--r--contrib/Open3DGC/o3dgcSC3DMCDecoder.inl2
-rw-r--r--contrib/Open3DGC/o3dgcSC3DMCEncoder.inl4
-rw-r--r--contrib/Open3DGC/o3dgcTimer.h4
-rw-r--r--contrib/Open3DGC/o3dgcTriangleListEncoder.h8
-rw-r--r--contrib/Open3DGC/o3dgcTriangleListEncoder.inl2
-rw-r--r--contrib/Open3DGC/o3dgcVector.h4
-rw-r--r--contrib/android-cmake/AndroidNdkGdb.cmake96
-rw-r--r--contrib/android-cmake/AndroidNdkModules.cmake58
-rw-r--r--contrib/android-cmake/README.md240
-rw-r--r--contrib/android-cmake/android.toolchain.cmake1693
-rw-r--r--contrib/android-cmake/ndk_links.md211
-rw-r--r--contrib/clipper/clipper.cpp3
-rw-r--r--contrib/irrXML/CMakeLists.txt9
-rw-r--r--contrib/irrXML/CXMLReaderImpl.h11
-rw-r--r--contrib/irrXML/irrArray.h3
-rw-r--r--contrib/irrXML/irrXML.cpp2
-rw-r--r--contrib/openddlparser/code/DDLNode.cpp2
-rw-r--r--contrib/openddlparser/code/OpenDDLExport.cpp6
-rw-r--r--contrib/openddlparser/code/OpenDDLParser.cpp32
-rw-r--r--contrib/openddlparser/code/Value.cpp2
-rw-r--r--contrib/openddlparser/include/openddlparser/OpenDDLParser.h4
-rw-r--r--contrib/openddlparser/include/openddlparser/OpenDDLParserUtils.h24
-rw-r--r--contrib/rapidjson/include/rapidjson/allocators.h42
-rw-r--r--contrib/rapidjson/include/rapidjson/document.h1069
-rw-r--r--contrib/rapidjson/include/rapidjson/encodedstream.h58
-rw-r--r--contrib/rapidjson/include/rapidjson/encodings.h233
-rw-r--r--contrib/rapidjson/include/rapidjson/error/en.h21
-rw-r--r--contrib/rapidjson/include/rapidjson/error/error.h27
-rw-r--r--contrib/rapidjson/include/rapidjson/filereadstream.h13
-rw-r--r--contrib/rapidjson/include/rapidjson/filewritestream.h17
-rw-r--r--contrib/rapidjson/include/rapidjson/fwd.h151
-rw-r--r--contrib/rapidjson/include/rapidjson/internal/biginteger.h14
-rw-r--r--contrib/rapidjson/include/rapidjson/internal/diyfp.h19
-rw-r--r--contrib/rapidjson/include/rapidjson/internal/dtoa.h50
-rw-r--r--contrib/rapidjson/include/rapidjson/internal/ieee754.h3
-rw-r--r--contrib/rapidjson/include/rapidjson/internal/regex.h734
-rw-r--r--contrib/rapidjson/include/rapidjson/internal/stack.h68
-rw-r--r--contrib/rapidjson/include/rapidjson/internal/strfunc.h32
-rw-r--r--contrib/rapidjson/include/rapidjson/internal/strtod.h39
-rw-r--r--contrib/rapidjson/include/rapidjson/internal/swap.h9
-rw-r--r--contrib/rapidjson/include/rapidjson/istreamwrapper.h115
-rw-r--r--contrib/rapidjson/include/rapidjson/memorybuffer.h2
-rw-r--r--contrib/rapidjson/include/rapidjson/memorystream.h16
-rw-r--r--contrib/rapidjson/include/rapidjson/msinttypes/stdint.h8
-rw-r--r--contrib/rapidjson/include/rapidjson/ostreamwrapper.h81
-rw-r--r--contrib/rapidjson/include/rapidjson/pointer.h131
-rw-r--r--contrib/rapidjson/include/rapidjson/prettywriter.h98
-rw-r--r--contrib/rapidjson/include/rapidjson/rapidjson.h314
-rw-r--r--contrib/rapidjson/include/rapidjson/reader.h1333
-rw-r--r--contrib/rapidjson/include/rapidjson/schema.h2016
-rw-r--r--contrib/rapidjson/include/rapidjson/stream.h179
-rw-r--r--contrib/rapidjson/include/rapidjson/stringbuffer.h30
-rw-r--r--contrib/rapidjson/include/rapidjson/writer.h468
-rw-r--r--contrib/rapidjson/license.txt2
-rw-r--r--contrib/rapidjson/readme.md81
-rw-r--r--contrib/unzip/crypt.h6
-rw-r--r--contrib/unzip/ioapi.c34
-rw-r--r--contrib/unzip/ioapi.h16
-rw-r--r--contrib/unzip/unzip.c55
-rw-r--r--contrib/unzip/unzip.h66
-rw-r--r--contrib/zip/.gitignore38
-rw-r--r--contrib/zip/.travis.yml10
-rw-r--r--contrib/zip/CMakeLists.txt18
-rw-r--r--contrib/zip/README.md139
-rw-r--r--contrib/zip/UNLICENSE26
-rw-r--r--contrib/zip/appveyor.yml14
-rw-r--r--contrib/zip/src/miniz.h4927
-rw-r--r--contrib/zip/src/zip.c640
-rw-r--r--contrib/zip/src/zip.h193
-rw-r--r--contrib/zip/test/CMakeLists.txt7
-rw-r--r--contrib/zip/test/test.c105
-rw-r--r--contrib/zip/zip.pngbin0 -> 5275 bytes
-rw-r--r--contrib/zlib/CMakeLists.txt11
-rw-r--r--contrib/zlib/README6
-rw-r--r--contrib/zlib/adler32.c21
-rw-r--r--contrib/zlib/compress.c42
-rw-r--r--contrib/zlib/contrib/README.contrib78
-rw-r--r--contrib/zlib/contrib/ada/buffer_demo.adb106
-rw-r--r--contrib/zlib/contrib/ada/mtest.adb156
-rw-r--r--contrib/zlib/contrib/ada/read.adb156
-rw-r--r--contrib/zlib/contrib/ada/readme.txt65
-rw-r--r--contrib/zlib/contrib/ada/test.adb463
-rw-r--r--contrib/zlib/contrib/ada/zlib-streams.adb225
-rw-r--r--contrib/zlib/contrib/ada/zlib-streams.ads114
-rw-r--r--contrib/zlib/contrib/ada/zlib-thin.adb141
-rw-r--r--contrib/zlib/contrib/ada/zlib-thin.ads450
-rw-r--r--contrib/zlib/contrib/ada/zlib.adb701
-rw-r--r--contrib/zlib/contrib/ada/zlib.ads328
-rw-r--r--contrib/zlib/contrib/ada/zlib.gpr20
-rw-r--r--contrib/zlib/contrib/amd64/amd64-match.S452
-rw-r--r--contrib/zlib/contrib/asm686/README.68651
-rw-r--r--contrib/zlib/contrib/asm686/match.S357
-rw-r--r--contrib/zlib/contrib/blast/README4
-rw-r--r--contrib/zlib/contrib/blast/blast.c466
-rw-r--r--contrib/zlib/contrib/blast/blast.h83
-rw-r--r--contrib/zlib/contrib/blast/test.pkbin0 -> 8 bytes
-rw-r--r--contrib/zlib/contrib/blast/test.txt1
-rw-r--r--contrib/zlib/contrib/delphi/ZLib.pas557
-rw-r--r--contrib/zlib/contrib/delphi/ZLibConst.pas11
-rw-r--r--contrib/zlib/contrib/delphi/readme.txt76
-rw-r--r--contrib/zlib/contrib/delphi/zlibd32.mak99
-rw-r--r--contrib/zlib/contrib/dotzlib/DotZLib.build33
-rw-r--r--contrib/zlib/contrib/dotzlib/DotZLib.chmbin0 -> 72726 bytes
-rw-r--r--contrib/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs58
-rw-r--r--contrib/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs202
-rw-r--r--contrib/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs83
-rw-r--r--contrib/zlib/contrib/dotzlib/DotZLib/CodecBase.cs198
-rw-r--r--contrib/zlib/contrib/dotzlib/DotZLib/Deflater.cs106
-rw-r--r--contrib/zlib/contrib/dotzlib/DotZLib/DotZLib.cs288
-rw-r--r--contrib/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj141
-rw-r--r--contrib/zlib/contrib/dotzlib/DotZLib/GZipStream.cs301
-rw-r--r--contrib/zlib/contrib/dotzlib/DotZLib/Inflater.cs105
-rw-r--r--contrib/zlib/contrib/dotzlib/DotZLib/UnitTests.cs274
-rw-r--r--contrib/zlib/contrib/dotzlib/LICENSE_1_0.txt23
-rw-r--r--contrib/zlib/contrib/dotzlib/readme.txt58
-rw-r--r--contrib/zlib/contrib/gcc_gvmat64/gvmat64.S574
-rw-r--r--contrib/zlib/contrib/infback9/README1
-rw-r--r--contrib/zlib/contrib/infback9/infback9.c615
-rw-r--r--contrib/zlib/contrib/infback9/infback9.h37
-rw-r--r--contrib/zlib/contrib/infback9/inffix9.h107
-rw-r--r--contrib/zlib/contrib/infback9/inflate9.h47
-rw-r--r--contrib/zlib/contrib/infback9/inftree9.c324
-rw-r--r--contrib/zlib/contrib/infback9/inftree9.h61
-rw-r--r--contrib/zlib/contrib/inflate86/inffas86.c1157
-rw-r--r--contrib/zlib/contrib/inflate86/inffast.S1368
-rw-r--r--contrib/zlib/contrib/iostream/test.cpp24
-rw-r--r--contrib/zlib/contrib/iostream/zfstream.cpp329
-rw-r--r--contrib/zlib/contrib/iostream/zfstream.h128
-rw-r--r--contrib/zlib/contrib/iostream2/zstream.h307
-rw-r--r--contrib/zlib/contrib/iostream2/zstream_test.cpp25
-rw-r--r--contrib/zlib/contrib/iostream3/README35
-rw-r--r--contrib/zlib/contrib/iostream3/TODO17
-rw-r--r--contrib/zlib/contrib/iostream3/test.cc50
-rw-r--r--contrib/zlib/contrib/iostream3/zfstream.cc479
-rw-r--r--contrib/zlib/contrib/iostream3/zfstream.h466
-rw-r--r--contrib/zlib/contrib/masmx64/bld_ml64.bat2
-rw-r--r--contrib/zlib/contrib/masmx64/gvmat64.asm553
-rw-r--r--contrib/zlib/contrib/masmx64/inffas8664.c186
-rw-r--r--contrib/zlib/contrib/masmx64/inffasx64.asm396
-rw-r--r--contrib/zlib/contrib/masmx64/readme.txt31
-rw-r--r--contrib/zlib/contrib/masmx86/bld_ml32.bat2
-rw-r--r--contrib/zlib/contrib/masmx86/inffas32.asm1080
-rw-r--r--contrib/zlib/contrib/masmx86/match686.asm479
-rw-r--r--contrib/zlib/contrib/masmx86/readme.txt27
-rw-r--r--contrib/zlib/contrib/minizip/Makefile.am45
-rw-r--r--contrib/zlib/contrib/minizip/MiniZip64_Changes.txt6
-rw-r--r--contrib/zlib/contrib/minizip/MiniZip64_info.txt74
-rw-r--r--contrib/zlib/contrib/minizip/configure.ac32
-rw-r--r--contrib/zlib/contrib/minizip/crypt.h131
-rw-r--r--contrib/zlib/contrib/minizip/ioapi.c247
-rw-r--r--contrib/zlib/contrib/minizip/ioapi.h208
-rw-r--r--contrib/zlib/contrib/minizip/iowin32.c462
-rw-r--r--contrib/zlib/contrib/minizip/iowin32.h28
-rw-r--r--contrib/zlib/contrib/minizip/make_vms.com25
-rw-r--r--contrib/zlib/contrib/minizip/miniunz.c660
-rw-r--r--contrib/zlib/contrib/minizip/miniunzip.163
-rw-r--r--contrib/zlib/contrib/minizip/minizip.146
-rw-r--r--contrib/zlib/contrib/minizip/minizip.c520
-rw-r--r--contrib/zlib/contrib/minizip/minizip.pc.in12
-rw-r--r--contrib/zlib/contrib/minizip/mztools.c291
-rw-r--r--contrib/zlib/contrib/minizip/mztools.h37
-rw-r--r--contrib/zlib/contrib/minizip/unzip.c2125
-rw-r--r--contrib/zlib/contrib/minizip/unzip.h437
-rw-r--r--contrib/zlib/contrib/minizip/zip.c2007
-rw-r--r--contrib/zlib/contrib/minizip/zip.h362
-rw-r--r--contrib/zlib/contrib/pascal/example.pas599
-rw-r--r--contrib/zlib/contrib/pascal/readme.txt76
-rw-r--r--contrib/zlib/contrib/pascal/zlibd32.mak99
-rw-r--r--contrib/zlib/contrib/pascal/zlibpas.pas276
-rw-r--r--contrib/zlib/contrib/puff/README63
-rw-r--r--contrib/zlib/contrib/puff/puff.c840
-rw-r--r--contrib/zlib/contrib/puff/puff.h35
-rw-r--r--contrib/zlib/contrib/puff/pufftest.c165
-rw-r--r--contrib/zlib/contrib/puff/zeros.rawbin0 -> 2517 bytes
-rw-r--r--contrib/zlib/contrib/testzlib/testzlib.c275
-rw-r--r--contrib/zlib/contrib/testzlib/testzlib.txt10
-rw-r--r--contrib/zlib/contrib/untgz/Makefile.msc17
-rw-r--r--contrib/zlib/contrib/untgz/untgz.c674
-rw-r--r--contrib/zlib/contrib/vstudio/readme.txt78
-rw-r--r--contrib/zlib/contrib/vstudio/vc10/zlib.rc32
-rw-r--r--contrib/zlib/contrib/vstudio/vc10/zlibvc.def153
-rw-r--r--contrib/zlib/contrib/vstudio/vc11/zlib.rc32
-rw-r--r--contrib/zlib/contrib/vstudio/vc11/zlibvc.def153
-rw-r--r--contrib/zlib/contrib/vstudio/vc12/zlib.rc32
-rw-r--r--contrib/zlib/contrib/vstudio/vc12/zlibvc.def153
-rw-r--r--contrib/zlib/contrib/vstudio/vc14/zlib.rc32
-rw-r--r--contrib/zlib/contrib/vstudio/vc14/zlibvc.def153
-rw-r--r--contrib/zlib/contrib/vstudio/vc9/zlib.rc32
-rw-r--r--contrib/zlib/contrib/vstudio/vc9/zlibvc.def153
-rw-r--r--contrib/zlib/crc32.c47
-rw-r--r--contrib/zlib/deflate.c819
-rw-r--r--contrib/zlib/deflate.h35
-rw-r--r--contrib/zlib/gzguts.h23
-rw-r--r--contrib/zlib/gzlib.c31
-rw-r--r--contrib/zlib/gzread.c158
-rw-r--r--contrib/zlib/gzwrite.c341
-rw-r--r--contrib/zlib/infback.c4
-rw-r--r--contrib/zlib/inffast.c111
-rw-r--r--contrib/zlib/inflate.c125
-rw-r--r--contrib/zlib/inflate.h11
-rw-r--r--contrib/zlib/inftrees.c26
-rw-r--r--contrib/zlib/trees.c99
-rw-r--r--contrib/zlib/uncompr.c98
-rw-r--r--contrib/zlib/win32/Makefile.gcc2
-rw-r--r--contrib/zlib/win32/Makefile.msc2
-rw-r--r--contrib/zlib/win32/README-WIN32.txt6
-rw-r--r--contrib/zlib/win32/VisualC.txt2
-rw-r--r--contrib/zlib/win32/zlib.def8
-rw-r--r--contrib/zlib/win32/zlib1.rc2
-rw-r--r--contrib/zlib/zconf.h.cmakein41
-rw-r--r--contrib/zlib/zconf.h.in (renamed from contrib/zlib/zconf.in.h)320
-rw-r--r--contrib/zlib/zconf.h.included41
-rw-r--r--contrib/zlib/zlib.h457
-rw-r--r--contrib/zlib/zutil.c53
-rw-r--r--contrib/zlib/zutil.h60
-rw-r--r--doc/Doxyfile.in6
-rw-r--r--doc/dox.h361
-rw-r--r--include/assimp/BaseImporter.h (renamed from code/BaseImporter.h)48
-rw-r--r--include/assimp/Bitmap.h (renamed from code/Bitmap.h)6
-rw-r--r--include/assimp/BlobIOSystem.h (renamed from code/BlobIOSystem.h)5
-rw-r--r--include/assimp/ByteSwapper.h (renamed from code/ByteSwapper.h)8
-rw-r--r--include/assimp/Compiler/pushpack1.h2
-rw-r--r--include/assimp/CreateAnimMesh.h (renamed from code/CreateAnimMesh.h)5
-rw-r--r--include/assimp/DefaultIOStream.h27
-rw-r--r--include/assimp/DefaultIOSystem.h12
-rw-r--r--include/assimp/DefaultLogger.hpp7
-rw-r--r--include/assimp/Exceptional.h (renamed from code/Exceptional.h)0
-rw-r--r--include/assimp/Exporter.hpp42
-rw-r--r--include/assimp/GenericProperty.h (renamed from code/GenericProperty.h)51
-rw-r--r--include/assimp/Hash.h (renamed from code/Hash.h)3
-rw-r--r--include/assimp/IOStream.hpp14
-rw-r--r--include/assimp/IOStreamBuffer.h (renamed from code/IOStreamBuffer.h)61
-rw-r--r--include/assimp/IOSystem.hpp110
-rw-r--r--include/assimp/Importer.hpp12
-rw-r--r--include/assimp/LineSplitter.h (renamed from code/LineSplitter.h)298
-rw-r--r--include/assimp/LogAux.h (renamed from code/LogAux.h)29
-rw-r--r--include/assimp/LogStream.hpp23
-rw-r--r--include/assimp/Logger.hpp113
-rw-r--r--include/assimp/Macros.h (renamed from code/Macros.h)2
-rw-r--r--include/assimp/MathFunctions.h (renamed from code/MathFunctions.h)0
-rw-r--r--include/assimp/MemoryIOWrapper.h (renamed from code/MemoryIOWrapper.h)13
-rw-r--r--include/assimp/NullLogger.hpp3
-rw-r--r--include/assimp/ParsingUtils.h (renamed from code/ParsingUtils.h)83
-rw-r--r--include/assimp/Profiler.h (renamed from code/Profiler.h)27
-rw-r--r--include/assimp/ProgressHandler.hpp27
-rw-r--r--include/assimp/RemoveComments.h (renamed from code/RemoveComments.h)3
-rw-r--r--include/assimp/SGSpatialSort.h (renamed from code/SGSpatialSort.h)37
-rw-r--r--include/assimp/SceneCombiner.h22
-rw-r--r--include/assimp/SkeletonMeshBuilder.h (renamed from code/SkeletonMeshBuilder.h)5
-rw-r--r--include/assimp/SmoothingGroups.h (renamed from code/SmoothingGroups.h)13
-rw-r--r--include/assimp/SmoothingGroups.inl (renamed from code/SmoothingGroups.inl)2
-rw-r--r--include/assimp/SpatialSort.h (renamed from code/SpatialSort.h)23
-rw-r--r--include/assimp/StandardShapes.h (renamed from code/StandardShapes.h)5
-rw-r--r--include/assimp/StreamReader.h (renamed from code/StreamReader.h)27
-rw-r--r--include/assimp/StreamWriter.h (renamed from code/StreamWriter.h)73
-rw-r--r--include/assimp/StringComparison.h (renamed from code/StringComparison.h)44
-rw-r--r--include/assimp/StringUtils.h (renamed from code/StringUtils.h)45
-rw-r--r--include/assimp/Subdivision.h (renamed from code/Subdivision.h)22
-rw-r--r--include/assimp/TinyFormatter.h (renamed from code/TinyFormatter.h)3
-rw-r--r--include/assimp/Vertex.h (renamed from code/Vertex.h)27
-rw-r--r--include/assimp/XMLTools.h (renamed from code/XMLTools.h)3
-rw-r--r--include/assimp/ai_assert.h3
-rw-r--r--include/assimp/anim.h79
-rw-r--r--include/assimp/camera.h5
-rw-r--r--include/assimp/cexport.h6
-rw-r--r--include/assimp/cfileio.h3
-rw-r--r--include/assimp/cimport.h5
-rw-r--r--include/assimp/color4.h8
-rw-r--r--include/assimp/color4.inl3
-rw-r--r--include/assimp/config.h.in54
-rw-r--r--include/assimp/defs.h117
-rw-r--r--include/assimp/fast_atof.h (renamed from code/fast_atof.h)194
-rw-r--r--include/assimp/importerdesc.h3
-rw-r--r--include/assimp/irrXMLWrapper.h (renamed from code/irrXMLWrapper.h)9
-rw-r--r--include/assimp/light.h5
-rw-r--r--include/assimp/material.h32
-rw-r--r--include/assimp/material.inl7
-rw-r--r--include/assimp/matrix3x3.h5
-rw-r--r--include/assimp/matrix3x3.inl13
-rw-r--r--include/assimp/matrix4x4.h5
-rw-r--r--include/assimp/matrix4x4.inl79
-rw-r--r--include/assimp/mesh.h274
-rw-r--r--include/assimp/metadata.h106
-rw-r--r--include/assimp/pbrmaterial.h77
-rw-r--r--include/assimp/postprocess.h48
-rw-r--r--include/assimp/qnan.h (renamed from code/qnan.h)23
-rw-r--r--include/assimp/quaternion.h5
-rw-r--r--include/assimp/quaternion.inl3
-rw-r--r--include/assimp/scene.h42
-rw-r--r--include/assimp/texture.h32
-rw-r--r--include/assimp/types.h41
-rw-r--r--include/assimp/vector2.h19
-rw-r--r--include/assimp/vector2.inl65
-rw-r--r--include/assimp/vector3.h12
-rw-r--r--include/assimp/vector3.inl137
-rw-r--r--include/assimp/version.h10
-rw-r--r--packaging/windows-innosetup/script.iss62
-rw-r--r--port/AssimpNET/Readme.md2
-rw-r--r--port/PyAssimp/README.rst96
-rw-r--r--port/PyAssimp/gen/materialgen.py96
-rw-r--r--port/PyAssimp/pyassimp/core.py111
-rw-r--r--port/PyAssimp/pyassimp/helper.py86
-rw-r--r--port/PyAssimp/pyassimp/material.py84
-rw-r--r--port/PyAssimp/pyassimp/structs.py325
-rwxr-xr-xport/PyAssimp/scripts/3d_viewer.py2
-rwxr-xr-xport/PyAssimp/scripts/3d_viewer_py3.py1316
-rw-r--r--port/PyAssimp/scripts/transformations.py2
-rw-r--r--port/PyAssimp/setup.py19
-rw-r--r--port/dAssimp/assimp/mesh.d2
-rw-r--r--port/iOS/IPHONEOS_ARM64E_TOOLCHAIN.cmake17
-rw-r--r--port/iOS/IPHONEOS_ARM64_TOOLCHAIN.cmake14
-rw-r--r--port/iOS/IPHONEOS_ARMV6_TOOLCHAIN.cmake14
-rw-r--r--port/iOS/IPHONEOS_ARMV7S_TOOLCHAIN.cmake14
-rw-r--r--port/iOS/IPHONEOS_ARMV7_TOOLCHAIN.cmake14
-rw-r--r--port/iOS/IPHONEOS_I386_TOOLCHAIN.cmake13
-rw-r--r--port/iOS/IPHONEOS_X86_64_TOOLCHAIN.cmake13
-rwxr-xr-xport/iOS/build.sh140
-rw-r--r--port/jassimp/README1
-rw-r--r--port/jassimp/jassimp-native/src/jassimp.cpp444
-rw-r--r--port/jassimp/jassimp-native/src/jassimp.h3
-rw-r--r--port/jassimp/jassimp/src/jassimp/AiAnimation.java46
-rw-r--r--port/jassimp/jassimp/src/jassimp/AiBone.java39
-rw-r--r--port/jassimp/jassimp/src/jassimp/AiClassLoaderIOSystem.java153
-rw-r--r--port/jassimp/jassimp/src/jassimp/AiColor.java22
-rw-r--r--port/jassimp/jassimp/src/jassimp/AiIOStream.java80
-rw-r--r--port/jassimp/jassimp/src/jassimp/AiIOSystem.java79
-rw-r--r--port/jassimp/jassimp/src/jassimp/AiInputStreamIOStream.java127
-rw-r--r--port/jassimp/jassimp/src/jassimp/AiMaterial.java87
-rw-r--r--port/jassimp/jassimp/src/jassimp/AiMesh.java184
-rw-r--r--port/jassimp/jassimp/src/jassimp/AiMetadataEntry.java118
-rw-r--r--port/jassimp/jassimp/src/jassimp/AiNode.java68
-rw-r--r--port/jassimp/jassimp/src/jassimp/AiNodeAnim.java6
-rw-r--r--port/jassimp/jassimp/src/jassimp/AiQuaternion.java25
-rw-r--r--port/jassimp/jassimp/src/jassimp/AiSceneFlag.java13
-rw-r--r--port/jassimp/jassimp/src/jassimp/Jassimp.java150
-rw-r--r--port/jassimp/jassimp/src/jassimp/JassimpLibraryLoader.java65
-rw-r--r--port/swig/assimp.i2
-rw-r--r--samples/README118
-rw-r--r--samples/SimpleAssimpViewX/MyDocument.mm2
-rw-r--r--samples/SimpleAssimpViewX/README42
-rw-r--r--samples/SimpleOpenGL/CMakeLists.txt5
-rw-r--r--samples/SimpleOpenGL/SimpleOpenGL.sln40
-rw-r--r--samples/SimpleOpenGL/SimpleOpenGL.vcproj398
-rw-r--r--samples/SimpleTexturedDirectx11/SimpleTexturedDirectx11.sln56
-rw-r--r--samples/SimpleTexturedDirectx11/SimpleTexturedDirectx11/PixelShader.hlsl16
-rw-r--r--samples/SimpleTexturedDirectx11/SimpleTexturedDirectx11/SimpleTexturedDirectx11.vcxproj290
-rw-r--r--samples/SimpleTexturedDirectx11/SimpleTexturedDirectx11/SimpleTexturedDirectx11.vcxproj.filters98
-rw-r--r--samples/SimpleTexturedDirectx11/SimpleTexturedDirectx11/VertexShader.hlsl44
-rw-r--r--samples/SimpleTexturedOpenGL/CMakeLists.txt5
-rw-r--r--samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL.sln40
-rw-r--r--samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/SimpleTexturedOpenGL.vcproj412
-rw-r--r--samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/src/model_loading.cpp3
-rw-r--r--samples/bin/DevIL.dllbin764416 -> 764382 bytes
-rw-r--r--samples/bin/ILU.dllbin28672 -> 28663 bytes
-rw-r--r--samples/bin/ILUT.dllbin17408 -> 17400 bytes
-rw-r--r--samples/bin/glut32.dllbin237568 -> 237536 bytes
-rw-r--r--samples/glut/GL/glut.h4
-rw-r--r--samples/glut/glut.def10
-rw-r--r--scripts/AppVeyor/cacheglobs.txt4
-rw-r--r--scripts/AppVeyor/mtime_cache177
-rw-r--r--scripts/StepImporter/CppGenerator.py (renamed from scripts/IFCImporter/CppGenerator.py)47
-rw-r--r--scripts/StepImporter/ExpressReader.py (renamed from scripts/IFCImporter/ExpressReader.py)3
-rw-r--r--scripts/StepImporter/IFCReaderGen.cpp.template (renamed from scripts/IFCImporter/IFCReaderGen.cpp.template)3
-rw-r--r--scripts/StepImporter/IFCReaderGen.h.template (renamed from scripts/IFCImporter/IFCReaderGen.h.template)0
-rw-r--r--scripts/StepImporter/StepReaderGen.cpp.template78
-rw-r--r--scripts/StepImporter/StepReaderGen.h.template91
-rw-r--r--scripts/StepImporter/extract_step_token.py64
-rw-r--r--scripts/StepImporter/genentitylist.sh (renamed from scripts/IFCImporter/genentitylist.sh)0
-rw-r--r--scripts/StepImporter/ifc_entitylist.txt (renamed from scripts/IFCImporter/entitylist.txt)0
-rw-r--r--scripts/StepImporter/part403ts_wg3n2635mim_lf.exp16378
-rw-r--r--scripts/StepImporter/schema_ap203e2_mim_lf.exp16378
-rw-r--r--scripts/StepImporter/schema_ifc2x3.exp (renamed from scripts/IFCImporter/schema.exp)0
-rw-r--r--scripts/StepImporter/step_entitylist.txt1015
-rw-r--r--scripts/adjust_header_paths.sh38
-rw-r--r--scripts/android_crosscompile/make_android.bat28
-rw-r--r--scripts/appveyor/compiler_setup.bat36
-rw-r--r--test/CMakeLists.txt175
-rw-r--r--test/models-nonbsd/3D/mar_rifle.uc40
-rw-r--r--test/models-nonbsd/3D/mar_rifle_a.3dbin50524 -> 50494 bytes
-rw-r--r--test/models-nonbsd/3DS/jeep1.jpgbin55952 -> 55951 bytes
-rw-r--r--test/models-nonbsd/3DS/m_rifl.bmpbin196662 -> 196623 bytes
-rw-r--r--test/models-nonbsd/3DS/pyramob.3DSbin693769 -> 693758 bytes
-rw-r--r--test/models-nonbsd/AMF/3_bananas.amf.7zbin7652329 -> 7652204 bytes
-rw-r--r--test/models-nonbsd/AMF/screenshot_3_bananas.jpegbin46918 -> 46917 bytes
-rw-r--r--test/models-nonbsd/ASE/Rifle.ase10864
-rw-r--r--test/models-nonbsd/ASE/Rifle2.ase16490
-rw-r--r--test/models-nonbsd/B3D/axe.jpgbin65192 -> 65191 bytes
-rw-r--r--test/models-nonbsd/B3D/dwarf2.jpgbin83048 -> 83046 bytes
-rw-r--r--test/models-nonbsd/B3D/turtle1.pngbin270905 -> 270901 bytes
-rw-r--r--test/models-nonbsd/BLEND/Bob.blendbin591624 -> 591623 bytes
-rw-r--r--test/models-nonbsd/BLEND/fleurOptonl.blendbin1460900 -> 1460880 bytes
-rw-r--r--test/models-nonbsd/BLEND/fleurOptonl.source.txt2
-rw-r--r--test/models-nonbsd/DXF/rifle.dxf32048
-rw-r--r--test/models-nonbsd/FBX/2013_ASCII/duck_sample.jpgbin14223 -> 14222 bytes
-rw-r--r--test/models-nonbsd/FBX/2013_ASCII/jeep1.jpgbin55952 -> 55951 bytes
-rw-r--r--test/models-nonbsd/FBX/2013_ASCII/m_rifl.bmpbin196662 -> 196623 bytes
-rw-r--r--test/models-nonbsd/FBX/2013_BINARY/Granate.fbxbin42992 -> 42991 bytes
-rw-r--r--test/models-nonbsd/FBX/2013_BINARY/duck.fbxbin960528 -> 960527 bytes
-rw-r--r--test/models-nonbsd/FBX/2013_BINARY/jeep1.fbxbin155792 -> 155791 bytes
-rw-r--r--test/models-nonbsd/FBX/2013_BINARY/kwxport_test_vcolors.fbxbin617536 -> 616062 bytes
-rw-r--r--test/models-nonbsd/FBX/2013_BINARY/mar_rifle.fbxbin247184 -> 247144 bytes
-rw-r--r--test/models-nonbsd/FBX/2013_BINARY/pyramob.fbxbin846768 -> 846765 bytes
-rw-r--r--test/models-nonbsd/HMP/terrain_withtexture.hmpbin605688 -> 605686 bytes
-rw-r--r--test/models-nonbsd/IRR/skybox/default_skybox3.jpgbin36117 -> 36116 bytes
-rw-r--r--test/models-nonbsd/IRR/skybox/default_skyboxdn.jpgbin11149 -> 11148 bytes
-rw-r--r--test/models-nonbsd/IRR/skybox/default_skyboxup.jpgbin9452 -> 9451 bytes
-rw-r--r--test/models-nonbsd/LWO/LWO2/LWSReferences/QuickDraw--Chasis.lwobin90974 -> 90970 bytes
-rw-r--r--test/models-nonbsd/LWS/QuickDraw v.2.2.lws3250
-rw-r--r--test/models-nonbsd/MD2/dolphin.md2bin95268 -> 95262 bytes
-rw-r--r--test/models-nonbsd/MD2/horse.md2bin61320 -> 61319 bytes
-rw-r--r--test/models-nonbsd/MD3/q3root/models/mapobjects/kt_kubalwagon/euro_frnt_2.tgabin280115 -> 279871 bytes
-rw-r--r--test/models-nonbsd/MD3/q3root/models/mapobjects/kt_kubalwagon/european_fnt.tgabin786450 -> 784342 bytes
-rw-r--r--test/models-nonbsd/MD3/q3root/scripts/kt_kubalwagon.shader70
-rw-r--r--test/models-nonbsd/MD3/water_can.tgabin98322 -> 98318 bytes
-rw-r--r--test/models-nonbsd/MD5/BoarMan.md5mesh12132
-rw-r--r--test/models-nonbsd/MD5/Bob.md5anim10526
-rw-r--r--test/models-nonbsd/MD5/Bob.md5mesh6724
-rw-r--r--test/models-nonbsd/MD5/guard1_body.pngbin233429 -> 233427 bytes
-rw-r--r--test/models-nonbsd/MD5/guard1_face.pngbin121149 -> 121148 bytes
-rw-r--r--test/models-nonbsd/MD5/guard1_helmet.pngbin47481 -> 47478 bytes
-rw-r--r--test/models-nonbsd/MD5/iron_grill.pngbin65146 -> 65145 bytes
-rw-r--r--test/models-nonbsd/MD5/round_grill.pngbin48671 -> 48668 bytes
-rw-r--r--test/models-nonbsd/MDL/MDL7 (3DGS A7)/branchD_texture.pngbin126438 -> 126437 bytes
-rw-r--r--test/models-nonbsd/MDL/MDL7 (3DGS A7)/broadleavedtreeD_readme.rtf66
-rw-r--r--test/models-nonbsd/MMD/Alicia_blade.pmxbin319682 -> 319677 bytes
-rw-r--r--test/models-nonbsd/NFF/NFFSense8/cokecan.mat24
-rw-r--r--test/models-nonbsd/NFF/NFFSense8/cokecan.nff78
-rw-r--r--test/models-nonbsd/OBJ/rifle.mtl14
-rw-r--r--test/models-nonbsd/OBJ/rifle.obj8688
-rw-r--r--test/models-nonbsd/Ogre/OgreSDK/fish.jpgbin71256 -> 71255 bytes
-rw-r--r--test/models-nonbsd/X/axe.jpgbin65192 -> 65191 bytes
-rw-r--r--test/models-nonbsd/X/dwarf.jpgbin84160 -> 84158 bytes
-rw-r--r--test/models-nonbsd/X3D/Chevy/textures/ChevyTahoeTexture.jpgbin76360 -> 76359 bytes
-rw-r--r--test/models/3D/box.uc40
-rw-r--r--test/models/3DS/CWALL02.jpgbin165342 -> 165339 bytes
-rw-r--r--test/models/3DS/IMAGE2.jpgbin283212 -> 283208 bytes
-rw-r--r--test/models/3DS/UVTransformTest/UVTransformTestImg.pngbin3495 -> 3494 bytes
-rw-r--r--test/models/3DS/test.pngbin23700 -> 23698 bytes
-rw-r--r--test/models/AC/SphereWithLight.ac2270
-rw-r--r--test/models/AC/SphereWithLightUvScaling4X.ac2274
-rw-r--r--test/models/AC/SphereWithLight_UTF8BOM.ac2268
-rw-r--r--test/models/AC/TestFormatDetection42
-rw-r--r--test/models/AC/Wuson.ac51218
-rw-r--r--test/models/AC/closedLine.ac42
-rw-r--r--test/models/AC/nosurfaces.ac24
-rw-r--r--test/models/AC/openLine.ac44
-rw-r--r--test/models/AC/sample_subdiv.ac532
-rw-r--r--test/models/AMF/README2
-rw-r--r--test/models/AMF/test1.amf118
-rw-r--r--test/models/AMF/test2.amf130
-rw-r--r--test/models/AMF/test3.amf142
-rw-r--r--test/models/AMF/test4.amf154
-rw-r--r--test/models/AMF/test5.amf190
-rw-r--r--test/models/AMF/test5a.amf154
-rw-r--r--test/models/AMF/test6.amf166
-rw-r--r--test/models/AMF/test7.amf224
-rw-r--r--test/models/AMF/test8.amf260
-rw-r--r--test/models/AMF/test9.amf360
-rw-r--r--test/models/AMF/test_with_mat.amf38
-rw-r--r--test/models/ASE/CameraRollAnim.ase632
-rw-r--r--test/models/ASE/CameraRollAnimWithChildObject.ase1310
-rw-r--r--test/models/ASE/MotionCaptureROM.ase39674
-rw-r--r--test/models/ASE/RotatingCube.ASE666
-rw-r--r--test/models/ASE/TargetCameraAnim.ase770
-rw-r--r--test/models/ASE/TestFormatDetection788
-rw-r--r--test/models/ASE/TestUVTransform/UVTransform_Normal.ASE686
-rw-r--r--test/models/ASE/TestUVTransform/UVTransform_ScaleUV1-2_OffsetUV0-0.9_Rotate-72_mirrorU.ase686
-rw-r--r--test/models/ASE/TestUVTransform/UVTransform_ScaleUV2x.ASE686
-rw-r--r--test/models/ASE/TestUVTransform/UVTransform_ScaleUV2x_Rotate45.ASE686
-rw-r--r--test/models/ASE/ThreeCubesGreen.ASE436
-rw-r--r--test/models/ASE/anim.ASE656
-rw-r--r--test/models/ASE/anim2.ASE1858
-rw-r--r--test/models/BLEND/plane_2_textures_2_texcoords_279.blendbin0 -> 512624 bytes
-rw-r--r--test/models/BLEND/test_279.blendbin0 -> 470140 bytes
-rw-r--r--test/models/BVH/01_01.bvh5870
-rw-r--r--test/models/BVH/01_03.bvh9388
-rw-r--r--test/models/BVH/Boxing_Toes.bvh6398
-rw-r--r--test/models/COB/dwarf.cobbin962915 -> 962911 bytes
-rw-r--r--test/models/CSM/ThomasFechten.csm4910
-rw-r--r--test/models/Collada/AsXML.xml420
-rw-r--r--test/models/Collada/COLLADA.dae586
-rw-r--r--test/models/Collada/COLLADA_triangulate.dae582
-rw-r--r--test/models/Collada/cube_UTF8BOM.dae420
-rw-r--r--test/models/Collada/cube_emptyTags.dae180
-rw-r--r--test/models/Collada/cube_triangulate.dae420
-rw-r--r--test/models/Collada/cube_with_2UVs.DAE310
-rw-r--r--test/models/Collada/duck.dae398
-rw-r--r--test/models/Collada/duck_sample.jpgbin14223 -> 14222 bytes
-rw-r--r--test/models/Collada/duck_triangulate.dae396
-rw-r--r--test/models/Collada/earthCylindrical.DAE19836
-rw-r--r--test/models/Collada/kwxport_test_vcolors.dae788
-rw-r--r--test/models/Collada/sphere.dae270
-rw-r--r--test/models/Collada/sphere_triangulate.dae268
-rw-r--r--test/models/Collada/teapot_instancenodes.DAE288
-rw-r--r--test/models/Collada/teapots.DAE30812
-rw-r--r--test/models/Collada/teapots_reference.pngbin183476 -> 183471 bytes
-rw-r--r--test/models/DXF/PinkEggFromLW.dxf17336
-rw-r--r--test/models/DXF/issue_2229.dxf64584
-rw-r--r--test/models/DXF/lineTest190
-rw-r--r--test/models/DXF/lineTest.dxf380
-rw-r--r--test/models/DXF/wuson.dxf226344
-rw-r--r--test/models/FBX/box.fbxbin0 -> 17200 bytes
-rw-r--r--test/models/FBX/global_settings.fbxbin0 -> 57596 bytes
-rw-r--r--test/models/FBX/phong_cube.fbxbin0 -> 17084 bytes
-rw-r--r--test/models/IRR/instancing.irrbin74296 -> 37155 bytes
-rw-r--r--test/models/IRRMesh/1.pngbin28975 -> 28973 bytes
-rw-r--r--test/models/LWO/LWO2/MappingModes/earthCylindric.jpgbin624832 -> 624829 bytes
-rw-r--r--test/models/LWO/LWO2/MappingModes/earthSpherical.jpgbin422120 -> 422117 bytes
-rw-r--r--test/models/LWO/LWO2/boxuv.pngbin14080 -> 14079 bytes
-rw-r--r--test/models/LWO/LWO2/uvtest.pngbin16301 -> 16300 bytes
-rw-r--r--test/models/LWS/move_x.lws944
-rw-r--r--test/models/LWS/move_x_oldformat_56.lws392
-rw-r--r--test/models/LWS/move_x_oldformat_6.lws894
-rw-r--r--test/models/LWS/move_x_post_constant.lws944
-rw-r--r--test/models/LWS/move_x_post_linear.lws944
-rw-r--r--test/models/LWS/move_x_post_offset_repeat.lws944
-rw-r--r--test/models/LWS/move_x_post_repeat.lws944
-rw-r--r--test/models/LWS/move_x_post_reset.lws944
-rw-r--r--test/models/LWS/move_xz_bezier.lws948
-rw-r--r--test/models/LWS/move_xz_hermite.lws948
-rw-r--r--test/models/LWS/move_xz_linear.lws948
-rw-r--r--test/models/LWS/move_xz_spline.lws948
-rw-r--r--test/models/LWS/move_xz_stepped.lws948
-rw-r--r--test/models/LWS/move_y_pre_ofrep_post_osc.lws960
-rw-r--r--test/models/MD2/faerie2.bmpbin43538 -> 43527 bytes
-rw-r--r--test/models/MD2/sydney.bmpbin60522 -> 60516 bytes
-rw-r--r--test/models/MD5/SimpleCube.md5mesh148
-rw-r--r--test/models/MDC/spider.mdcbin0 -> 986240 bytes
-rw-r--r--test/models/MS3D/Wuson.ms3dbin330213 -> 330211 bytes
-rw-r--r--test/models/MS3D/jeep1.jpgbin55952 -> 55951 bytes
-rw-r--r--test/models/NFF/NFF/ManyEarthsNotJustOne.nff50
-rw-r--r--test/models/NFF/NFF/WithCamera.nff48
-rw-r--r--test/models/NFF/NFF/cone.nff50
-rw-r--r--test/models/NFF/NFF/cylinder.nff18
-rw-r--r--test/models/NFF/NFF/hexahedron.nff2
-rw-r--r--test/models/NFF/NFF/positionTest.nff72
-rw-r--r--test/models/NFF/NFF/spheres.nff48
-rw-r--r--test/models/OBJ/WusonOBJ.obj15880
-rw-r--r--test/models/OBJ/box.obj60
-rw-r--r--test/models/OBJ/box_longline.obj62
-rw-r--r--test/models/OBJ/box_mat_with_spaces.obj60
-rw-r--r--test/models/OBJ/concave_polygon.mtl22
-rw-r--r--test/models/OBJ/concave_polygon.obj154
-rw-r--r--test/models/OBJ/cube_mtllib_after_g.mtl5
-rw-r--r--test/models/OBJ/cube_mtllib_after_g.obj32
-rw-r--r--test/models/OBJ/cube_with_vertexcolors.obj16
-rw-r--r--test/models/OBJ/cube_with_vertexcolors_uni.obj30
-rw-r--r--test/models/OBJ/drkwood2.jpgbin203860 -> 203856 bytes
-rw-r--r--test/models/OBJ/engineflare1.jpgbin3631 -> 3630 bytes
-rw-r--r--test/models/OBJ/point_cloud.obj17
-rw-r--r--test/models/OBJ/regr01.obj12036
-rw-r--r--test/models/OBJ/regr_3429812.mtl14
-rw-r--r--test/models/OBJ/regr_3429812.obj22
-rw-r--r--test/models/OBJ/testline.obj44
-rw-r--r--test/models/OBJ/testmixed.obj72
-rw-r--r--test/models/OBJ/testpoints.obj44
-rw-r--r--test/models/OBJ/wal67ar_small.jpgbin9288 -> 9287 bytes
-rw-r--r--test/models/OFF/Cube.off32
-rw-r--r--test/models/OFF/formatDetection32
-rw-r--r--test/models/Ogre/TheThing/Reference.JPGbin26718 -> 26714 bytes
-rw-r--r--test/models/OpenGEX/empty_camera.ogex7
-rw-r--r--test/models/PLY/cube.ply46
-rw-r--r--test/models/PLY/cube_binary.plybin0 -> 447 bytes
-rw-r--r--test/models/PLY/cube_uv.ply45
-rw-r--r--test/models/PLY/float-color.ply2
-rw-r--r--test/models/PLY/issue623.ply36
-rw-r--r--test/models/PLY/pond.0.plybin2171857 -> 2171788 bytes
-rw-r--r--test/models/ParsingFiles/linesplitter_emptyline_test.txt3
-rw-r--r--test/models/ParsingFiles/linesplitter_tokenizetest.txt12
-rw-r--r--test/models/Q3D/WusonOrange.q3obin144230 -> 144224 bytes
-rw-r--r--test/models/Q3D/WusonOrange.q3sbin144436 -> 144430 bytes
-rw-r--r--test/models/RAW/WithColor.raw14
-rw-r--r--test/models/RAW/WithTexture.raw22
-rw-r--r--test/models/ReferenceImages/MappingModes/cylindrical.pngbin264673 -> 264669 bytes
-rw-r--r--test/models/ReferenceImages/MappingModes/spherical.pngbin322849 -> 322844 bytes
-rw-r--r--test/models/ReferenceImages/UVTransform/UVTransform_Normal.pngbin34368 -> 34367 bytes
-rw-r--r--test/models/ReferenceImages/UVTransform/UVTransform_OffsetUV0.5-clampUV.pngbin39357 -> 39356 bytes
-rw-r--r--test/models/ReferenceImages/UVTransform/UVTransform_OffsetUV0.5-mirrorUV.pngbin48965 -> 48964 bytes
-rw-r--r--test/models/ReferenceImages/UVTransform/UVTransform_OffsetUV0.5.pngbin34623 -> 34622 bytes
-rw-r--r--test/models/ReferenceImages/UVTransform/UVTransform_ScaleUV1-2_OffsetUV0-0.9_Rotate-72.pngbin105643 -> 105642 bytes
-rw-r--r--test/models/ReferenceImages/UVTransform/UVTransform_ScaleUV1-2_OffsetUV0-0.9_Rotate-72_mirrorU.pngbin130740 -> 130735 bytes
-rw-r--r--test/models/ReferenceImages/UVTransform/UVTransform_ScaleUV10-2_OffsetUV10-mirrorUV.pngbin97351 -> 97350 bytes
-rw-r--r--test/models/ReferenceImages/UVTransform/UVTransform_ScaleUV2x.pngbin50279 -> 50278 bytes
-rw-r--r--test/models/ReferenceImages/UVTransform/UVTransform_ScaleUV2x_Rotate45.pngbin111075 -> 111073 bytes
-rw-r--r--test/models/SIB/This Way Up.pngbin5922 -> 5921 bytes
-rw-r--r--test/models/SIB/UV Mapping.pngbin7069 -> 7068 bytes
-rw-r--r--test/models/SMD/WusonSMD.smd29876
-rw-r--r--test/models/SMD/triangle.smd28
-rw-r--r--test/models/STL/3DSMaxExport.STLbin100084 -> 100083 bytes
-rw-r--r--test/models/STL/Spider_ascii.stl19156
-rw-r--r--test/models/STL/formatDetection16
-rw-r--r--test/models/STL/sphereWithHole.stl3994
-rw-r--r--test/models/STL/triangle.stl16
-rw-r--r--test/models/STL/triangle_with_empty_solid.stl11
-rw-r--r--test/models/STL/triangle_with_two_solids.stl18
-rw-r--r--test/models/TER/RealisticTerrain.terbin132184 -> 132183 bytes
-rw-r--r--test/models/TER/RealisticTerrain_Large.terbin526424 -> 526412 bytes
-rw-r--r--test/models/WRL/MotionCaptureROM.WRL67986
-rw-r--r--test/models/WRL/Wuson.wrl14024
-rw-r--r--test/models/X/BCN_Epileptic.X65758
-rw-r--r--test/models/X/OV_GetNextTokenbin0 -> 775 bytes
-rw-r--r--test/models/X/TestFormatDetection634
-rw-r--r--test/models/X/Testwuson.X73234
-rw-r--r--test/models/X/anim_test.x67428
-rw-r--r--test/models/X/bottom.tgabin196652 -> 196147 bytes
-rw-r--r--test/models/X/fromtruespace_bin32.xbin372321 -> 372304 bytes
-rw-r--r--test/models/X/kwxport_test_cubewithvcolors.x1008
-rw-r--r--test/models/X/test.pngbin23700 -> 23698 bytes
-rw-r--r--test/models/X/test.x634
-rw-r--r--test/models/X/top.tgabin196652 -> 195683 bytes
-rw-r--r--test/models/XGL/Spider_ascii.zglbin59945 -> 59944 bytes
-rw-r--r--test/models/XGL/sample_official.xgl298
-rw-r--r--test/models/XGL/sample_official_asxml.xml298
-rw-r--r--test/models/glTF/BoxTextured-glTF-Binary/BoxTextured.glbbin17754 -> 17721 bytes
-rw-r--r--test/models/glTF/BoxTextured-glTF-MaterialsCommon/CesiumLogoFlat.pngbin22051 -> 22050 bytes
-rw-r--r--test/models/glTF/BoxTextured-glTF/CesiumLogoFlat.pngbin22051 -> 22050 bytes
-rw-r--r--test/models/glTF/CesiumMilkTruck/CesiumMilkTruck.pngbin923282 -> 923268 bytes
-rw-r--r--test/models/glTF2/2CylinderEngine-glTF-Binary/2CylinderEngine.glbbin0 -> 1838084 bytes
-rw-r--r--test/models/glTF2/BoxTextured-glTF-Binary/BoxTextured.glbbin0 -> 4695 bytes
-rw-r--r--test/models/glTF2/BoxTextured-glTF-Embedded/BoxTextured.gltf181
-rw-r--r--test/models/glTF2/BoxTextured-glTF-pbrSpecularGlossiness/BoxTextured.gltf197
-rw-r--r--test/models/glTF2/BoxTextured-glTF-pbrSpecularGlossiness/BoxTextured0.binbin0 -> 840 bytes
-rw-r--r--test/models/glTF2/BoxTextured-glTF-pbrSpecularGlossiness/CesiumLogoFlat.pngbin0 -> 2432 bytes
-rw-r--r--test/models/glTF2/BoxTextured-glTF-techniqueWebGL/BoxTextured.gltf282
-rw-r--r--test/models/glTF2/BoxTextured-glTF-techniqueWebGL/BoxTextured0.binbin0 -> 840 bytes
-rw-r--r--test/models/glTF2/BoxTextured-glTF-techniqueWebGL/BoxTextured0.vert17
-rw-r--r--test/models/glTF2/BoxTextured-glTF-techniqueWebGL/BoxTextured1.frag29
-rw-r--r--test/models/glTF2/BoxTextured-glTF-techniqueWebGL/CesiumLogoFlat.pngbin0 -> 2432 bytes
-rw-r--r--test/models/glTF2/BoxTextured-glTF/BoxTextured.gltf181
-rw-r--r--test/models/glTF2/BoxTextured-glTF/BoxTextured0.binbin0 -> 840 bytes
-rw-r--r--test/models/glTF2/BoxTextured-glTF/CesiumLogoFlat.pngbin0 -> 2432 bytes
-rw-r--r--test/models/glTF2/glTF-Asset-Generator/LICENSE21
-rw-r--r--test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_00.binbin0 -> 12288 bytes
-rw-r--r--test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_00.gltf63
-rw-r--r--test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_01.binbin0 -> 96 bytes
-rw-r--r--test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_01.gltf63
-rw-r--r--test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_02.binbin0 -> 48 bytes
-rw-r--r--test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_02.gltf63
-rw-r--r--test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_03.binbin0 -> 60 bytes
-rw-r--r--test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_03.gltf63
-rw-r--r--test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_04.binbin0 -> 48 bytes
-rw-r--r--test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_04.gltf63
-rw-r--r--test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_05.binbin0 -> 48 bytes
-rw-r--r--test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_05.gltf63
-rw-r--r--test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_06.binbin0 -> 72 bytes
-rw-r--r--test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_06.gltf62
-rw-r--r--test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_07.binbin0 -> 16384 bytes
-rw-r--r--test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_07.gltf77
-rw-r--r--test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_08.binbin0 -> 80 bytes
-rw-r--r--test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_08.gltf77
-rw-r--r--test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_09.binbin0 -> 64 bytes
-rw-r--r--test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_09.gltf77
-rw-r--r--test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_10.binbin0 -> 68 bytes
-rw-r--r--test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_10.gltf77
-rw-r--r--test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_11.binbin0 -> 64 bytes
-rw-r--r--test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_11.gltf77
-rw-r--r--test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_12.binbin0 -> 64 bytes
-rw-r--r--test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_12.gltf77
-rw-r--r--test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_13.binbin0 -> 72 bytes
-rw-r--r--test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_13.gltf76
-rw-r--r--test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_14.binbin0 -> 54 bytes
-rw-r--r--test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_14.gltf76
-rw-r--r--test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_15.binbin0 -> 60 bytes
-rw-r--r--test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_15.gltf76
-rw-r--r--test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/README.md33
-rw-r--r--test/models/invalid/OutOfMemory.off32
-rw-r--r--test/models/invalid/emptyIrrMesh.xml460
-rw-r--r--test/models/invalid/malformed.obj60
-rw-r--r--test/models/invalid/malformed2.obj60
-rw-r--r--test/regression/.project34
-rw-r--r--test/regression/.pydevproject14
-rw-r--r--test/unit/AbstractImportExportBase.cpp5
-rw-r--r--test/unit/AssimpAPITest.cpp3
-rw-r--r--test/unit/Common/utLineSplitter.cpp71
-rw-r--r--test/unit/ImportExport/utCOBImportExport.cpp64
-rw-r--r--test/unit/ImportExport/utExporter.cpp73
-rw-r--r--test/unit/ImportExport/utNFFImportExport.cpp63
-rw-r--r--test/unit/ImportExport/utOFFImportExport.cpp63
-rw-r--r--test/unit/ImportExport/utOgreImportExport.cpp64
-rw-r--r--test/unit/ImportExport/utQ3BSPFileImportExport.cpp64
-rw-r--r--test/unit/ImportExport/utXGLImportExport.cpp63
-rw-r--r--test/unit/SceneDiffer.cpp3
-rw-r--r--test/unit/SceneDiffer.h5
-rw-r--r--test/unit/TestIOSystem.h3
-rw-r--r--test/unit/TestModelFactory.h19
-rw-r--r--test/unit/UTLogStream.h64
-rw-r--r--test/unit/UnitTestFileGenerator.h76
-rw-r--r--test/unit/UnitTestPCH.h43
-rw-r--r--test/unit/ut3DImportExport.cpp6
-rw-r--r--test/unit/ut3DSImportExport.cpp14
-rw-r--r--test/unit/utACImportExport.cpp6
-rw-r--r--test/unit/utAMFImportExport.cpp16
-rw-r--r--test/unit/utASEImportExport.cpp6
-rw-r--r--test/unit/utAnim.cpp5
-rw-r--r--test/unit/utAssbinImportExport.cpp78
-rw-r--r--test/unit/utB3DImportExport.cpp6
-rw-r--r--test/unit/utBVHImportExport.cpp6
-rw-r--r--test/unit/utBatchLoader.cpp4
-rw-r--r--test/unit/utBlendImportAreaLight.cpp6
-rw-r--r--test/unit/utBlendImportMaterials.cpp33
-rw-r--r--test/unit/utBlenderImportExport.cpp6
-rw-r--r--test/unit/utBlenderIntermediate.cpp22
-rw-r--r--test/unit/utBlenderWork.cpp83
-rw-r--r--test/unit/utCSMImportExport.cpp6
-rw-r--r--test/unit/utColladaExportCamera.cpp8
-rw-r--r--test/unit/utColladaExportLight.cpp8
-rw-r--r--test/unit/utColladaImportExport.cpp6
-rw-r--r--test/unit/utD3MFImportExport.cpp45
-rw-r--r--test/unit/utDXFImporterExporter.cpp18
-rw-r--r--test/unit/utDefaultIOStream.cpp46
-rw-r--r--test/unit/utExport.cpp4
-rw-r--r--test/unit/utFBXImporterExporter.cpp58
-rw-r--r--test/unit/utFastAtof.cpp5
-rw-r--r--test/unit/utFindDegenerates.cpp26
-rw-r--r--test/unit/utFindInvalidData.cpp3
-rw-r--r--test/unit/utFixInfacingNormals.cpp3
-rw-r--r--test/unit/utGenNormals.cpp3
-rw-r--r--test/unit/utHMPImportExport.cpp6
-rw-r--r--test/unit/utIFCImportExport.cpp27
-rw-r--r--test/unit/utIOStreamBuffer.cpp78
-rw-r--r--test/unit/utIOSystem.cpp6
-rw-r--r--test/unit/utImporter.cpp5
-rw-r--r--test/unit/utImproveCacheLocality.cpp3
-rw-r--r--test/unit/utIssues.cpp7
-rw-r--r--test/unit/utJoinVertices.cpp3
-rw-r--r--test/unit/utLWOImportExport.cpp81
-rw-r--r--test/unit/utLWSImportExport.cpp87
-rw-r--r--test/unit/utLimitBoneWeights.cpp3
-rw-r--r--test/unit/utMDCImportExport.cpp63
-rw-r--r--test/unit/utMaterialSystem.cpp23
-rw-r--r--test/unit/utMatrix3x3.cpp3
-rw-r--r--test/unit/utMatrix4x4.cpp3
-rw-r--r--test/unit/utMetadata.cpp75
-rw-r--r--test/unit/utNoBoostTest.cpp2
-rw-r--r--test/unit/utObjImportExport.cpp150
-rw-r--r--test/unit/utObjTools.cpp7
-rw-r--r--test/unit/utOpenGEXImportExport.cpp11
-rw-r--r--test/unit/utPLYImportExport.cpp104
-rw-r--r--test/unit/utPMXImporter.cpp2
-rw-r--r--test/unit/utPretransformVertices.cpp23
-rw-r--r--test/unit/utProfiler.cpp77
-rw-r--r--test/unit/utQ3DImportExport.cpp63
-rw-r--r--test/unit/utRemoveComments.cpp5
-rw-r--r--test/unit/utRemoveComponent.cpp5
-rw-r--r--test/unit/utRemoveRedundantMaterials.cpp3
-rw-r--r--test/unit/utRemoveVCProcess.cpp8
-rw-r--r--test/unit/utSIBImporter.cpp6
-rw-r--r--test/unit/utSMDImportExport.cpp8
-rw-r--r--test/unit/utSTLImportExport.cpp174
-rw-r--r--test/unit/utScaleProcess.cpp86
-rw-r--r--test/unit/utSceneCombiner.cpp79
-rw-r--r--test/unit/utScenePreprocessor.cpp3
-rw-r--r--test/unit/utSharedPPData.cpp7
-rw-r--r--test/unit/utSimd.cpp62
-rw-r--r--test/unit/utSortByPType.cpp3
-rw-r--r--test/unit/utSplitLargeMeshes.cpp3
-rw-r--r--test/unit/utStringUtils.cpp5
-rw-r--r--test/unit/utTargetAnimation.cpp3
-rw-r--r--test/unit/utTextureTransform.cpp3
-rw-r--r--test/unit/utTriangulate.cpp3
-rw-r--r--test/unit/utTypes.cpp3
-rw-r--r--test/unit/utVector3.cpp3
-rw-r--r--test/unit/utVersion.cpp12
-rw-r--r--test/unit/utVertexTriangleAdjacency.cpp6
-rw-r--r--test/unit/utX3DImportExport.cpp64
-rw-r--r--test/unit/utXImporterExporter.cpp11
-rw-r--r--test/unit/utglTF2ImportExport.cpp383
-rw-r--r--test/unit/utglTFImportExport.cpp12
-rw-r--r--tools/assimp_cmd/CMakeLists.txt4
-rw-r--r--tools/assimp_cmd/CompareDump.cpp3
-rw-r--r--tools/assimp_cmd/Export.cpp6
-rw-r--r--tools/assimp_cmd/ImageExtractor.cpp7
-rw-r--r--tools/assimp_cmd/Info.cpp174
-rw-r--r--tools/assimp_cmd/Main.cpp89
-rw-r--r--tools/assimp_cmd/WriteDumb.cpp30
-rw-r--r--tools/assimp_qt_viewer/CMakeLists.txt111
-rw-r--r--tools/assimp_qt_viewer/doc/Assimp_qt_viewer. Manual (en).odtbin685106 -> 685096 bytes
-rw-r--r--tools/assimp_qt_viewer/doc/Assimp_qt_viewer. Manual (ru).odtbin685524 -> 685515 bytes
-rw-r--r--tools/assimp_qt_viewer/glview.cpp484
-rw-r--r--tools/assimp_qt_viewer/glview.hpp98
-rw-r--r--tools/assimp_qt_viewer/loggerview.cpp61
-rw-r--r--tools/assimp_qt_viewer/loggerview.hpp72
-rw-r--r--tools/assimp_qt_viewer/main.cpp55
-rw-r--r--tools/assimp_qt_viewer/mainwindow.cpp310
-rw-r--r--tools/assimp_qt_viewer/mainwindow.hpp163
-rw-r--r--tools/assimp_qt_viewer/mainwindow.ui30
-rw-r--r--tools/assimp_qt_viewer/stb_image.h7462
-rw-r--r--tools/assimp_view/AnimEvaluator.cpp3
-rw-r--r--tools/assimp_view/Background.cpp2
-rw-r--r--tools/assimp_view/CMakeLists.txt3
-rw-r--r--tools/assimp_view/Display.cpp47
-rw-r--r--tools/assimp_view/HUD.pngbin42512 -> 40474 bytes
-rw-r--r--tools/assimp_view/Material.cpp4
-rw-r--r--tools/assimp_view/MessageProc.cpp64
-rw-r--r--tools/assimp_view/assimp_view.cpp78
-rw-r--r--tools/assimp_view/assimp_view.h10
-rw-r--r--tools/assimp_view/assimp_view.rc171
-rw-r--r--tools/assimp_view/base.PNGbin1601 -> 1600 bytes
-rw-r--r--tools/assimp_view/help.rtf834
-rw-r--r--tools/assimp_view/stdafx.h1
-rw-r--r--tools/assimp_view/test.xcfbin122221 -> 121875 bytes
-rw-r--r--tools/assimp_view/text1.bin744
-rw-r--r--tools/make/build_env_win32.bat57
-rw-r--r--tools/make/make_all_win32_x64.bat18
-rw-r--r--tools/shared/assimp_tools_icon.pngbin104300 -> 104295 bytes
1217 files changed, 686475 insertions, 480028 deletions
diff --git a/.gitattributes b/.gitattributes
index 7f9357f62..f3df90d38 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -13,3 +13,10 @@ CHANGES text eol=lf
CREDITS text eol=lf
LICENSE text eol=lf
Readme.md text eol=lf
+# make sure that repo-specific settings (.gitignore, CI-setup,...)
+# are excluded from the source-package generated via 'git archive'
+.git* export-ignore
+/.travis* export-ignore
+/.coveralls* export-ignore
+appveyor.yml export-ignore
+
diff --git a/.gitignore b/.gitignore
index 664708a90..d383f3ec8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,6 +12,8 @@ build
bin/
lib/
+# QtCreator
+CMakeLists.txt.user
# Generated
assimp.pc
@@ -19,6 +21,7 @@ revision.h
contrib/zlib/zconf.h
contrib/zlib/zlib.pc
include/assimp/config.h
+unit.vcxproj.user
# CMake
CMakeCache.txt
@@ -38,6 +41,7 @@ tools/assimp_cmd/Makefile
# Tests
test/results
+test/readlinetest*
# Python
__pycache__
@@ -60,6 +64,7 @@ test/gtest/src/gtest-stamp/Debug/gtest-build
*.lib
test/gtest/src/gtest-stamp/Debug/
tools/assimp_view/assimp_viewer.vcxproj.user
+*.pyc
# Unix editor backups
*~
@@ -81,3 +86,11 @@ lib64/assimp-vc120-mtd.ilk
lib64/assimp-vc120-mtd.exp
lib64/assimp-vc120-mt.exp
xcuserdata
+
+cmake-build-debug
+install_manifest.txt
+tools/assimp_qt_viewer/moc_glview.cpp
+tools/assimp_qt_viewer/moc_glview.cpp_parameters
+tools/assimp_qt_viewer/moc_mainwindow.cpp
+tools/assimp_qt_viewer/moc_mainwindow.cpp_parameters
+tools/assimp_qt_viewer/ui_mainwindow.h
diff --git a/.travis.sh b/.travis.sh
index 7161fd28d..fb42bd40d 100755
--- a/.travis.sh
+++ b/.travis.sh
@@ -1,17 +1,66 @@
-function generate()
-{
- cmake -G "Unix Makefiles" -DASSIMP_NO_EXPORT=$TRAVIS_NO_EXPORT -DBUILD_SHARED_LIBS=$SHARED_BUILD -DASSIMP_COVERALLS=$ENABLE_COVERALLS
-}
+#---------------------------------------------------------------------------
+#Open Asset Import Library (assimp)
+#---------------------------------------------------------------------------
+# Copyright (c) 2006-2017, assimp team
+#
+# License see LICENSE file
+#
+function generate() {
+ OPTIONS="-DASSIMP_WERROR=ON"
+
+ if [ "$DISABLE_EXPORTERS" = "YES" ] ; then
+ OPTIONS="$OPTIONS -DASSIMP_NO_EXPORT=YES"
+ else
+ OPTIONS="$OPTIONS -DASSIMP_NO_EXPORT=NO"
+ fi
+
+ if [ "$SHARED_BUILD" = "ON" ] ; then
+ OPTIONS="$OPTIONS -DBUILD_SHARED_LIBS=ON"
+ else
+ OPTIONS="$OPTIONS -DBUILD_SHARED_LIBS=OFF"
+ fi
+
+ if [ "$ENABLE_COVERALLS" = "ON" ] ; then
+ OPTIONS="$OPTIONS -DASSIMP_COVERALLS=ON"
+ else
+ OPTIONS="$OPTIONS -DASSIMP_COVERALLS=OFF"
+ fi
+ if [ "$ASAN" = "ON" ] ; then
+ OPTIONS="$OPTIONS -DASSIMP_ASAN=ON"
+ else
+ OPTIONS="$OPTIONS -DASSIMP_ASAN=OFF"
+ fi
+
+ if [ "$UBSAN" = "ON" ] ; then
+ OPTIONS="$OPTIONS -DASSIMP_UBSAN=ON"
+ fi
+
+ cmake -G "Unix Makefiles" $OPTIONS
+}
+# build and run unittests, if not android
if [ $ANDROID ]; then
ant -v -Dmy.dir=${TRAVIS_BUILD_DIR} -f ${TRAVIS_BUILD_DIR}/port/jassimp/build.xml ndk-jni
fi
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
+ if [ $ANALYZE = "ON" ] ; then
+ if [ "$CC" = "clang" ]; then
+ scan-build cmake -G "Unix Makefiles" -DBUILD_SHARED_LIBS=OFF -DASSIMP_BUILD_TESTS=OFF
+ scan-build --status-bugs make -j2
+ else
+ cppcheck --version
+ generate \
+ && cppcheck --error-exitcode=1 -j2 -Iinclude -Icode code 2> cppcheck.txt
+ if [ -s cppcheck.txt ]; then
+ cat cppcheck.txt
+ exit 1
+ fi
+ fi
+ else
generate \
&& make -j4 \
&& sudo make install \
&& sudo ldconfig \
- && (cd test/unit; ../../bin/unit) \
- #&& (cd test/regression; chmod 755 run.py; ./run.py ../../bin/assimp; \
- # chmod 755 result_checker.py; ./result_checker.py)
+ && (cd test/unit; ../../bin/unit)
+ fi
fi
diff --git a/.travis.yml b/.travis.yml
index 0c16c6c41..8b00b4cc7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,23 +1,69 @@
sudo: required
+language: cpp
+
+cache: ccache
+
before_install:
- - sudo apt-get update -qq
- - sudo apt-get install cmake
- - sudo apt-get install -qq freeglut3-dev libxmu-dev libxi-dev
+ - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get update -qq && sudo apt-get install cmake cppcheck && sudo apt-get install cmake python3 && sudo apt-get install -qq freeglut3-dev libxmu-dev libxi-dev ; echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca- ; fi
+ - 'if [ "$TRAVIS_OS_NAME" = "osx" ]; then
+ if brew ls --versions cmake > /dev/null; then
+ echo cmake already installed.;
+ else
+ brew install cmake;
+ fi;
+ brew install python3;
+ brew install homebrew/x11/freeglut;
+ fi'
+ - echo -e "#ifndef A_R_H_INC\n#define A_R_H_INC\n#define GitVersion ${TRAVIS_JOB_ID}\n#define GitBranch \"${TRAVIS_BRANCH}\"\n#endif // A_R_H_INC" > revision.h
+ # install latest LCOV (1.9 was failing)
+ - if [ "$TRAVIS_OS_NAME" = "linux" ]; then cd ${TRAVIS_BUILD_DIR} && wget http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.11.orig.tar.gz && tar xf lcov_1.11.orig.tar.gz && sudo make -C lcov-1.11/ install && gem install coveralls-lcov && lcov --version && g++ --version ; fi
+
+os:
+ - linux
+
+compiler:
+ - gcc
+ - clang
env:
global:
- secure: "lZ7pHQvl5dpZWzBQAaIMf0wqrvtcZ4wiZKeIZjf83TEsflW8+z0uTpIuN30ZV6Glth/Sq1OhLnTP5+N57fZU/1ebA5twHdvP4bS5CIUUg71/CXQZNl36xeaqvxsG/xRrdpKOsPdjAOsQ9KPTQulsX43XDLS7CasMiLvYOpqKcPc="
+ - PV=r8e PLATF=linux-x86_64 NDK_HOME=${TRAVIS_BUILD_DIR}/android-ndk-${PV} PATH=${PATH}:${NDK_HOME}
-language: cpp
-
-compiler:
- - gcc
+matrix:
+ include:
+ - os: linux
+ compiler: clang
+ env: ASAN=ON
+ - os: linux
+ compiler: clang
+ env: UBSAN=ON
+ - os: linux
+ compiler: clang
+ env: SHARED_BUILD=ON
+ - os: linux
+ compiler: gcc
+ env: ANALYZE=ON
+ - os: linux
+ compiler: gcc
+ env: ENABLE_COVERALLS=ON
+ - os: linux
+ compiler: gcc
+ env: SHARED_BUILD=ON
+
+install:
+ - if [ $ANDROID ]; then wget -c http://dl.google.com/android/ndk/android-ndk-${PV}-${PLATF}.tar.bz2 && tar xf android-ndk-${PV}-${PLATF}.tar.bz2 ; fi
before_script:
cmake . -DASSIMP_ENABLE_BOOST_WORKAROUND=YES
script:
- make
+ - export COVERALLS_SERVICE_NAME=travis-ci
+ - export COVERALLS_REPO_TOKEN=abc12345
+ - . ./.travis.sh
+
+after_success:
+ - if [ "$TRAVIS_OS_NAME" = "linux" ]; then cd ${TRAVIS_BUILD_DIR} && lcov --directory . --capture --output-file coverage.info && lcov --remove coverage.info '/usr/*' 'contrib/*' 'test/*' --output-file coverage.info && lcov --list coverage.info && coveralls-lcov --source-encoding=ISO-8859-1 --repo-token=${COVERALLS_TOKEN} coverage.info ; fi
addons:
coverity_scan:
diff --git a/AssimpConfig.cmake.in b/AssimpConfig.cmake.in
deleted file mode 100644
index 5bb705a41..000000000
--- a/AssimpConfig.cmake.in
+++ /dev/null
@@ -1,21 +0,0 @@
-# - Config file for the FooBar package
-# It defines the following variables
-# FOOBAR_INCLUDE_DIRS - include directories for FooBar
-# FOOBAR_LIBRARIES - libraries to link against
-# FOOBAR_EXECUTABLE - the bar executable
-
-# Compute paths
-get_filename_component(FOOBAR_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
-if(EXISTS "${FOOBAR_CMAKE_DIR}/CMakeCache.txt")
- # In build tree
- include("${FOOBAR_CMAKE_DIR}/FooBarBuildTreeSettings.cmake")
-else()
- set(FOOBAR_INCLUDE_DIRS "${FOOBAR_CMAKE_DIR}/@CONF_REL_INCLUDE_DIR@")
-endif()
-
-# Our library dependencies (contains definitions for IMPORTED targets)
-include("${FOOBAR_CMAKE_DIR}/FooBarLibraryDepends.cmake")
-
-# These are IMPORTED targets created by FooBarLibraryDepends.cmake
-set(FOOBAR_LIBRARIES foo)
-set(FOOBAR_EXECUTABLE bar)
diff --git a/Build.md b/Build.md
new file mode 100644
index 000000000..d5b443a79
--- /dev/null
+++ b/Build.md
@@ -0,0 +1,58 @@
+# Install CMake
+Asset-Importer-Lib can be build for a lot of different platforms. We are using cmake to generate the build environment for these via cmake. So you have to make sure that you have a working cmake-installation on your system. You can download it at https://cmake.org/ or for linux install it via
+```
+sudo apt-get install cmake
+```
+
+# Get the source
+Make sure you have a working git-installation. Open a command prompt and clone the Asset-Importer-Lib via:
+```
+git clone https://github.com/assimp/assimp.git
+```
+
+# Build instructions for Windows with Visual-Studio
+
+First you have to install Visual-Studio on your windows-system. You can get the Community-Version for free here: https://visualstudio.microsoft.com/de/downloads/
+To generate the build environment for your IDE open a command prompt, navigate to your repo and type:
+```
+> cmake CMakeLists.txt
+```
+This will generate the project files for the visual studio. All dependencies used to build Asset-IMporter-Lib shall be part of the repo. If you want to use you own zlib.installation this is possible as well. Check the options for it.
+
+# Build instructions for Windows with UWP
+See https://stackoverflow.com/questions/40803170/cmake-uwp-using-cmake-to-build-universal-windows-app
+
+
+# Build instrcutions for Linux / Unix
+Open a terminal and got to your repository. You can generate the makefiles and build the library via:
+
+```
+cmake CMakeLists.txt
+make -j4
+```
+The option -j descripes the number of parallel processes for the build. In this case make will try to use 4 cores for the build.
+
+If you want to use a IDE for linux you can try QTCreator for instance.
+
+# CMake build options
+The cmake-build-environment provides options to configure the build. The following options can be used:
+- **BUILD_SHARED_LIBS ( default ON )**: Generation of shared libs ( dll for windows, so for Linux ). Set this to OFF to get a static lib.
+- **BUILD_FRAMEWORK ( default OFF, MacOnly)**: Build package as Mac OS X Framework bundle
+- **ASSIMP_DOUBLE_PRECISION( default OFF )**: All data will be stored as double values.
+- **ASSIMP_OPT_BUILD_PACKAGES ( default OFF)**: Set to ON to generate CPack configuration files and packaging targets
+- **ASSIMP_ANDROID_JNIIOSYSTEM ( default OFF )**: Android JNI IOSystem support is active
+- **ASSIMP_NO_EXPORT ( default OFF )**: Disable Assimp's export functionality
+- **ASSIMP_BUILD_ZLIB ( default OFF )**: Build your own zlib
+- **ASSIMP_BUILD_ASSIMP_TOOLS ( default ON )**: If the supplementary tools for Assimp are built in addition to the library.
+- **ASSIMP_BUILD_SAMPLES ( default OFF )**: If the official samples are built as well (needs Glut).
+- **ASSIMP_BUILD_TESTS ( default ON )**: If the test suite for Assimp is built in addition to the library.
+- **ASSIMP_COVERALLS ( default OFF )**: Enable this to measure test coverage.
+- **ASSIMP_WERROR( default OFF )**: Treat warnings as errors.
+- **ASSIMP_ASAN ( default OFF )**: Enable AddressSanitizer.
+- **ASSIMP_UBSAN ( default OFF )**: Enable Undefined Behavior sanitizer.
+- **SYSTEM_IRRXML ( default OFF )**: Use system installed Irrlicht/IrrXML library.
+- **BUILD_DOCS ( default OFF )**: Build documentation using Doxygen.
+- **INJECT_DEBUG_POSTFIX( default ON )**: Inject debug postfix in .a/.so lib names
+- **IGNORE_GIT_HASH ( default OFF )**: Don't call git to get the hash.
+- **ASSIMP_INSTALL_PDB ( default ON )**: Install MSVC debug files.
+
diff --git a/CHANGES b/CHANGES
index 1d98700f8..c0c73b98c 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,413 @@
----------------------------------------------------------------------
CHANGELOG
----------------------------------------------------------------------
+4.1.0 (2017-12):
+- FEATURES:
+ - Export 3MF ( experimental )
+ - Import / Export glTF 2
+ - Introduce new zib-lib to eb able to export zip-archives
+- FIXES/HOUSEKEEPING:
+ - Added missing include to stdlib.h and remove load library call
+ - Fix install for builds with MSVC compiler and NMake.
+ - Update list of supported file formats.
+ - Add TriLib to the official list of supported ports.
+ - Re-enabling PACK_STRUCT for MDL files.
+ - Use std.::unique_ptr
+ - Update D3MFExporter.h
+ - Update MD3Loader.cpp, using index
+ - Fix all warnings on MSVC14
+ - Copy assimp dll to unit folder on windows
+ - Update jvm port supported formats
+ - Add support for building Mac OS X Framework bundles
+ - Check for nullptr dereferencing before copying scene data
+ - Update ValidateDataStructure.h, typo
+ - Enable data structure validation in cases where it doesn't cause failures
+ - Remove some dead assignments
+ - fast_atof: Silence some uninitialized variable warnings
+ - Check for area test if the face is a triangle.
+ - Set mNumUVComponents to 0 when deleting texture coordinate sets
+ - Only scale the root node because this will rescale all children nodes as well.
+ - Issue 1514: Fix frame pointer arithmetic
+ - Prevent failing stringstream to crash the export process
+ - powf -> pow
+ - add Defines.h to include folder for install.
+ - Android:
+ - Fix android build
+ - Fix assimp for cross compile for android
+ - Use define for D_FILE_OFFSET_BITS only for not-android systems.
+ - FBX:
+ - Fix handling with embedded textures
+ - FBX 7500 Binary reading
+ - Remove dead assignment
+ - Fix export of deleted meshes; Add LazyDict::Remove method
+ - Log an error instead of letting the fbx-importer crash. ( issue 213 )
+ - Replace bad pointer casting with memcpy
+ - Remove useless const qualifier from return value
+ - Add explicit instantiation of log_prefix so other FBX source files can see it
+ - add missing inversion of postrotation matrix for fbx.
+ - FIReader: Silence uninitialized variable warning
+ - Update version check in FBX reader to check for version >= 7500
+ - Use actual min/max of anim keys when start/stop time is missing
+- GLTF1:
+ - Fix output of glTF 1 version string
+ - Fix delete / delete[] mismatch in glTFAsset
+ - Don’t ignore rgba(1,1,1,1) color properties
+ - glTF2 primitives fixes
+ - Don’t ignore rgba(1,1,1,1) color properties
+ - Fix delete / delete[] mismatch in glTFAsset
+ - Remove KHR_binary_glTF code
+ - glTF nodes can only hold one mesh. this simply assigns to and check’s a Node’s Mesh
+ - version in glb header is stored as uint32_t
+- GLTF2:
+ - node name conflict fix
+ - Fix transform matrices multiplication order
+ - Preserve node names when importing
+ - Add support for tangents in import
+ - Fix typo on gltf2 camera parameters
+ - Moved byteStride from accessor to bufferView
+ - Implemented reading binary glTF2 (glb) files
+ - Fix signed/unsigned warning
+ - Add postprocess step for scaling
+ - Fix shininess to roughness conversion
+ - Prefer “BLEND†over “MASK†as an alphaMode default
+ - Approximate specularity / glossiness in metallicRoughness materials
+ - Diffuse color and diffuse texture import and export improvements
+ - Addressed some mismatched news/deletes caused by the new glTF2 sources.
+ - Fix delete / delete[] mismatches in glTF2 importer
+ - use correct name of exporter to gltf2
+ - Fix possible infinite loop when exporting to gltf2
+ - Fix glTF2::Asset::FindUniqueID() when the input string is >= 256 chars
+ - Fix glTF2 alphaMode storage and reading
+ - Fix glTF 2.0 multi-primitive support
+ - Load gltf .bin files from correct directory
+ - Add support for importing both glTF and glTF2 files
+ - ampler improvements; Add new LazyDict method
+ - Changes to GLTF2 materials
+ - Remove Light, Technique references
+ - Start removing materials common, and adding pbrSpecularGlossiness
+ - Use !ObjectEmpty() vs. MemberCount() > 0
+ - Working read, import, export, and write of gltf2 (pbr) material
+ - Check in gltf2 models to test directory
+ - Remove un-needed test models
+ - Start managing and importing gltf2 pbr materials
+ - Update glTF2 Asset to use indexes
+ - Duplicate gltfImporter as gltf2Importer; Include glTF2 importer in CMake List
+ - glTF2: Fix animation export
+ - use opacity for diffuse alpha + alphaMode
+- STL:
+ - Restore import of multi mesh binary STLs
+- Blender:
+ - Silence warning about uninitialized member
+- MDLImporter:
+ - Don't take address of packed struct member
+- assimp_cmd:
+ - Fix strict-aliasing warnings
+- Open3DGC:
+ - Fix strict-aliasing warnings
+ - Add assertions to silence static analyzer warnings
+ - Remove redundant const qualifiers from return types
+ - Fix some uninitialized variable warnings
+ - Remove OPEN3DGC and compression references
+- unzip:
+ - Remove dead assignment
+ - Bail on bad compression method
+ - Fix possibly uninitialized variables
+- clipper:
+ - Add assertion to silence a static analyzer warning
+- OpenDDLExport:
+ - Reduce scope of a variable
+ - Remove dead variable
+ - Remove dead assignment
+ - Fix another potential memory leak
+- X3DImporter:
+ - Add assertions to silence static analyzer warnings
+ - Add missing unittest
+ - Workaround for buggy Android NDK (issue #1361)
+- TerragenLoader:
+ - Remove unused variable
+- SIBImporter:
+ - Add assertions to silence static analyzer warnings
+- IFC:
+ - Remove dead code
+ - Add explicit instantiation of log_prefix so IFCMaterial.cpp can see it
+- PLY:
+ - Remove dead assignment and reduce scope of a variable
+ - fix vertex attribute lookup.
+- OpenGEX:
+ - Add assertion to silence a static analyzer warning
+ - Fix for TextureFile with number in file name
+ - Return early when element is TextureFile
+- NFF:
+ - Add assertions to silence static analyzer warnings
+ - Split up some complicated assignments
+- Raw: Fix misleading indentation warning
+ - Reduce scope of a variable
+- LWO
+ - Reduce scope of a variable
+- IRRLoader:
+ - Fix confusing boolean casting
+- AssbinExporter:
+ - Add assertion to silence a static analyzer warning
+- ASE:
+ - Add assertion to silence a static analyzer warning
+- AMFImporter:
+ - Add assertion to silence a static analyzer warning
+ - Add a block
+- OptimizeGraph:
+ - Fix possible null pointer dereference
+ - RemoveRedundantMaterials:
+ - Add assertion to silence a static analyzer warning
+- ImproveCacheLocality:
+ - Add assertion to silence a static analyzer warning
+- RemoveRedundantMaterials:
+ - Set pointer to nullptr after deleting it
+- Travis:
+ - Disable unit tests in scan-build config
+ - Move slower builds earlier to improve parallelization
+ - Add static analysis to build
+ - Remove unused branch rule for travis.
+ - Add Clang UBSan build configuration
+ - Treat warnings as errors, without typos this time
+- Unittests:
+ - Add VS-based source groups for the unittests.
+- Collada:
+ - export <library_animations> tag
+ - Update ColladaExporter.cpp
+ - Silence uninitialized variable warning
+ - Add support for line strip primitives
+- Obj Wavefront:
+ - check in exporting against out-of-bounds-access .
+ - Issue 1351: use correct name for obj-meshname export for groups.
+ - fix mem-lead: face will be not released in case of an error.
+ - Anatoscope obj exporter nomtl
+ - Raise exception when obj file contains invalid face indices
+ - Added alternative displacement texture token in OBJ MTL material.
+ - Obj: rename attribute from exporter.
+ - Fix OBJ discarding all material names if the material library is missing
+- Step:
+ - use correct lookup for utf32
+- MD2:
+ - Fix MD2 frames containing garbage
+- STL
+ - add missing const.
+ - Fix memory-alignment bug.
+ - Fix issue 104: deal with more solids in one STL file.
+- CMake
+ - Fix issue 213: use correct include folder for assimp
+- Doxygen
+ - Fix issue 1513: put irrXML onto exclucde list for doxygen run
+- PyAssimp:
+ - Search for libassimp.so in LD_LIBRARY_PATH if available.
+ - Fix operator precedence issue in header check
+ - Split setup.py into multiple lines
+ - Detect if Anaconda and fixed 3d_viewer for Python 3
+ - created a python3 version of the 3dviewer and fixed the / = float in py3
+- Blender:
+ - Fix invalid access to mesh array when the array is empty.
+ - Fix short overflow.
+ - Silence warning about inline function which is declared but not defined
+- JAssimp
+ - Changed license header for IHMC contributions from Apache 2.0 to BSD
+ - Add Node metadata to the Jassmip Java API
+ - Added supported for custom IO Systems in Java. Implemented ClassLoader IO System
+ - Added a link to pure jvm assimp port
+- Clang sanitizer:
+ - Undefined Behavior sanitizer
+ - Fixed a divide by zero error in IFCBoolean that was latent, but nevertheless a bug
+- B3DImporter:
+ - Replace bad pointer casting with memcpy
+- AppVeyor:
+ - Cleanup and Addition of VS 2017 and running Tests
+ - Fixed File Size reported as 0 in tests that use temporary files
+ - x86 isn't a valid VS platform. Win32 it is, then.
+ - Replaced the worker image name, which doesn't work as generator name, with a manually created generator name.
+ - Cleaned up appveyor setup, added VS 2017 to the build matrix and attempted to add running of tests.
+ - Treat warnings as errors on Appveyor
+ - Disable warning 4351 on MSVC 2013
+- OpenGEXImporter:
+ - Copy materials to scene
+ - Store RefInfo in unique_ptr so they get automatically cleaned up
+ - Fix IOStream leak
+ - Store ChildInfo in unique_ptr so they get automatically cleaned up
+ - improve logging to be able to detect error-prone situations.
+- AMFImporter:
+ - Fix memory leak
+- UnrealLoader:
+ - Fix IOStream leak
+- Upgrade RapidJSON to get rid of a clang warning
+- zlib:
+ - Update zlib contribution
+ - Removed unnecessary files from zlib contribution
+ - Replaced unsigned long for the crc table to z_crc_t, to match what is returned by get-crc_table
+- MakeVerboseFormat:
+ - Fix delete / delete[] mismatches in MakeVerboseFormat
+- MaterialSystem:
+ - Fix out-of-bounds read in MaterialSystem unit test
+- SIB:
+ - Added support for SIB models from Silo 2.5
+- AssbinExporter:
+ - Fix strict aliasing violation
+ - Add Write specialization for aiColor3D
+- DefaultLogger:
+ - Whitespace cleanup to fix GCC misleading indentation warning
+- MDP:
+ - Fix encoding issues.
+ - PreTransformVertices:
+ - fix name lost in mesh and nodes when load with flag
+- C4D:
+ - Fixes for C4D importer
+- Unzip:
+ - Latest greatest.
+
+4.0.1 (2017-07-28)
+ - FIXES/HOUSEKEEPING:
+ - fix version test.
+ - Not compiling when using ASSIMP_DOUBLE_PRECISION
+ - Added support for python3
+ - Check if cmake is installed with brew
+ - Low performance in OptimizeMeshesProcess::ProcessNode with huge numbers of meshes
+ - Elapsed seconds not shown correctly
+ - StreamReader: fix out-of-range exception
+ - PPdPmdParser: fix compilation for clang
+
+
+4.0.0 (2017-07-18)
+
+FEATURES:
+ - Double precision support provided ( available via cmake option )
+ - QT-Widget based assimp-viewer ( works for windows, linux, osx )
+ - Open3DGC codec supported by glFT-importer
+ - glTF: Read and write transparency values
+ - Add Triangulate post-processing step to glTF exporters
+ - Update rapidjson to v1.0.2
+ - Added method to append new metadata to structure
+ - Unittests: intoduce a prototype model differ
+ - X3D support
+ - AMF support
+ - Lugdunum3D support
+ - Obj-Importer: obj-homogeneous_coords support
+ - Obj-Importer: new streaming handling
+ - Added support for 64 bit version header introduced in FbxSdk2016
+ - Travis: enable coverall support.
+ - PyAssimp: New version of the pyASSIMP 3D viewer, with much improved 3D controls
+ - Morph animation support for collada
+ - Added support for parameters Ni and Tf in OBJ/MTL file format
+ - aiScene: add method to add children
+ - Added new option to IFC importer to control tessellation angle + removed unused IFC option
+ - aiMetaData: introduce aiMetaData::Dealloc
+ - Samples: add a DX11 example
+ - travis ci: test on OXS ( XCode 6.3 ) as well
+ - travis ci: enable sudo support.
+ - openddlparser: integrate release v0.4.0
+ - aiMetaData: Added support for metadata in assbin format
+
+FIXES/HOUSEKEEPING:
+ - Introduce usage of #pragma statement
+ - Put cmake-scripts into their own folder
+ - Fix install pathes ( issue 938 )
+ - Fix object_compare in blender importer( issue 946 )
+ - Fix OSX compilation error
+ - Fix unzip path when no other version was found ( issue 967 )
+ - Set _FILE_OFFSET_BITS=64 for 32-bit linux ( issue 975 )
+ - Fix constructor for radjson on OSX
+ - Use Assimp namespace to fix build for big-endian architectures
+ - Add -fPIC to C Flags for 64bit linux Shared Object builds
+ - MDLLoader: fix resource leak.
+ - MakeVerboseFormat: fix invalid delete statement
+ - IFC: fix possible use after free access bug
+ - ComputeUVMappingprocess: add missing initialization for scalar value
+ - Fix invalid release of mat + mesh
+ - IrrImporter: Fix release functions
+ - Split mesh before exporting gltf ( issue 995 )
+ - 3MFImporter: add source group for visual studio
+ - IFC: Switch generated file to 2 files to fix issue related to <mingw4.9 ( Thanks Qt! )
+ - ObjImporter: fix test for vertices import
+ - export scene combiner ( issues177 )
+ - FBX: make lookup test less strict ( issues 994 )
+ - OpenGEX-Importer: add import of vertex colors ( issue 954 )
+ - fix bug when exporting mRotationKeys data
+ - fix mingw build (mingw supports stat64 nowadays)
+ - cfileio: fix leaks by not closing files in the destructor
+ - Fix OBJ parser mtllib statement parsing bug.
+ - Q3BSP-Importer: remove dead code
+ - Fix BlenderDNA for clang cross compiler.
+ - ScenePreprocessor: fix invalid index counter.
+ - Fix compiler warnings ( issue 957 )
+ - Fix obj .mtl file loading
+ - Fixed a compile error on MSVC14 x64 caused by the /bigobj flag failing to be set for the 1 and 2-suffixed versions introduced in commit 0a25b076b8968b7ea2aa96d7d1b4381be2d72ce6
+ - Fixed build warnings on MSVC14 x64
+ - Remove scaling of specular exponent in OBJFileImporter.cpp
+ - use ai_assert instead of assert ( issue 1076 )
+ - Added a preprocessor definition for MSVC to silence safety warnings regarding C library functions. This addresses all warnings for MSVC x86 and x64 when building zlib, tools and viewer as a static lib
+ - fix parsing of texture name ( issue 899 )
+ - add warning when detecting invalid mat definition ( issue 1111 )
+ - copy aiTexture type declaration instead of using decltype for declaration to fix iOS build( issue 1101 )
+ - FBX: Add additional material properties
+ - FBX: Correct camera position and clip planes
+ - FBX: Add correct light locations and falloff values
+ - fix typo ( issue 1141 )
+ - Fix collada export. Don't duplicate TEXCOORD/NORMALS/COLORS in <vertices> and <polylist> ( issue 1084 )
+ - OBJParser: set material index when changing current material
+ - OBJ: check for null mesh before updating material index
+ - add vertex color export support ( issue 809 )
+ - Fix memory leak in Collada importer ( issue 1169 )
+ - add stp to the list of supported extensions for step-files ( issue 1183 )
+ - fix clang build ( Issue-1169 )
+ - fix for FreeBSD
+ - Import FindPkgMacros to main CMake Configuration
+ - Extended support for tessellation parameter to more IFC shapes
+ - defensice handling of utf-8 decode issues ( issue 1211 )
+ - Fixed compiler error on clang 4.0 running on OSX
+ - use test extension for exported test files ( issue 1228 )
+ - Set UVW index material properties for OBJ files
+ - Fixed no member named 'atop' in global namespace issue for Android NDK compilation
+ - Apply mechanism to decide use for IrrXML external or internal
+ - Fix static init ordering bug in OpenGEX importer
+ - GLTF exporter: ensure animation accessors have same count
+ - GLTF exporter: convert animation time from ticks to seconds
+ - Add support for reading texture coordinates from PLY meshes with properties named 'texture_u' and 'texture_v'
+ - Added TokensForSearch in BlenderLoader to allow CanRead return true for in-memory files.
+ - fix wrong delete ( issue 1266 )
+ - OpenGEX: fix invalid handling with color4 token ( issue 1262 )
+ - LWOLoader: fix link in loader description
+ - Fix error when custom CMAKE_C_FLAGS is specified
+ - Fast-atof: log overflow errors
+ - Obj-Importer: do not break when detecting an overflow ( issue 1244 )
+ - Obj-Importer: fix parsing of multible line data definitions
+ - Fixed bug where IFC models with multiple IFCSite only loaded 1 site instead of the complete model
+ - PLYImporter: - optimize memory and speed on ply importer / change parser to use a file stream - manage texture path in ply
+ import - manage texture coords on faces in ply import - correction on point cloud faces generation
+ - Utf8: integrate new lib ( issue 1158 )
+ - fixed CMAKE_MODULE_PATH overwriting previous values
+ - OpenGEX: Fixed bug in material color processing ( issue 1271 )
+ - SceneCombiner: move header for scenecombiner to public folder.
+ - GLTF exporter: ensure buffer view byte offsets are correctly aligned
+ - X3D importer: Added EXPORT and IMPORT to the list of ignored XML tags
+ - X3D Exporter: fixed missing attributes
+ - X3D importer: Fixed import of normals for the single index / normal per vertex case
+ - X3D importer: Fixed handling of inlined files
+ - X3D importer: fixed whitespace handling (issue 1202)
+ - X3D importer: Fixed iterator on MSVC 2015
+ - X3D importer: Fixed problems with auto, override and regex on older compilers
+ - X3D importer: Fixed missing header file
+ - X3D importer: Fixed path handling
+ - X3D importer: Implemented support for binary X3D files
+ - fix build without 3DS ( issue 1319 )
+ - pyassimp: Fixed indices for IndexedTriangleFanSet, IndexedTriangleSet and IndexedTriangleStripSet
+ - Fixes parameters to pyassimp.load
+ - Obj-Importe: Fixed texture bug due simultaneously using 'usemtl' and 'usemap' attributes
+ - check if all exporters are disabled ( issue 1320 )
+ - Remove std functions deprecated by C++11.
+ - X-Importer: make it deal with lines
+ - use correct path for compilers ( issue 1335 )
+ - Collada: add workaround to deal with polygon with holes
+ - update python readme
+ - Use unique node names when loading Collada files
+ - Fixed many FBX bugs
+
+API COMPATIBILITY:
+ - Changed ABI-compatibility to v3.3.1, please rebuild your precompiled libraries ( see issue 1182 )
+ - VS2010 outdated
3.3.1 (2016-07-08)
@@ -121,8 +528,6 @@ API COMPATIBILITY:
- Note: 3.0 is not binary compatible with 2.0
-
-
2.0 (2010-11-21)
FEATURES:
@@ -159,10 +564,7 @@ API CHANGES:
currently used, however ...)
- Some Assimp::Importer methods are const now.
-
-
-
-
+
1.1 (2010-04-17)
This is the list of relevant changes from the 1.0 (r412) release to 1.1 (r700).
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4660f8aa6..a97174de4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,7 @@
# Open Asset Import Library (assimp)
# ----------------------------------------------------------------------
-# Copyright (c) 2006-2017, assimp team
+# Copyright (c) 2006-2018, assimp team
+
# All rights reserved.
#
# Redistribution and use of this software in source and binary forms,
@@ -34,14 +35,20 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#----------------------------------------------------------------------
SET(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required
-cmake_minimum_required( VERSION 2.8 )
+CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )
PROJECT( Assimp )
# All supported options ###############################################
+
OPTION( BUILD_SHARED_LIBS
"Build package with shared libraries."
ON
)
+
+OPTION( BUILD_FRAMEWORK
+ "Build package as Mac OS X Framework bundle."
+ OFF
+)
OPTION( ASSIMP_DOUBLE_PRECISION
"Set to ON to enable double precision processing"
OFF
@@ -62,11 +69,11 @@ OPTION( ASSIMP_BUILD_ZLIB
"Build your own zlib"
OFF
)
-option( ASSIMP_BUILD_ASSIMP_TOOLS
+OPTION( ASSIMP_BUILD_ASSIMP_TOOLS
"If the supplementary tools for Assimp are built in addition to the library."
ON
)
-option ( ASSIMP_BUILD_SAMPLES
+OPTION ( ASSIMP_BUILD_SAMPLES
"If the official samples are built as well (needs Glut)."
OFF
)
@@ -75,95 +82,127 @@ OPTION ( ASSIMP_BUILD_TESTS
ON
)
OPTION ( ASSIMP_COVERALLS
- "Eańable this to measure test coverage."
- OFF
+ "Enable this to measure test coverage."
+ OFF
)
-option ( SYSTEM_IRRXML
- "Use system installed Irrlicht/IrrXML library."
- OFF
+OPTION ( ASSIMP_WERROR
+ "Treat warnings as errors."
+ OFF
+)
+OPTION ( ASSIMP_ASAN
+ "Enable AddressSanitizer."
+ OFF
+)
+OPTION ( ASSIMP_UBSAN
+ "Enable Undefined Behavior sanitizer."
+ OFF
+)
+OPTION ( SYSTEM_IRRXML
+ "Use system installed Irrlicht/IrrXML library."
+ OFF
)
OPTION ( BUILD_DOCS
- "Build documentation using Doxygen."
+ "Build documentation using Doxygen."
+ OFF
+)
+OPTION( INJECT_DEBUG_POSTFIX
+ "Inject debug postfix in .a/.so lib names"
+ ON
+)
+
+OPTION ( IGNORE_GIT_HASH
+ "Don't call git to get the hash."
OFF
)
+IF (IOS)
+ IF (NOT CMAKE_BUILD_TYPE)
+ SET(CMAKE_BUILD_TYPE "Release")
+ ENDIF (NOT CMAKE_BUILD_TYPE)
+ ADD_DEFINITIONS(-DENABLE_BITCODE)
+ENDIF (IOS)
+
+# Use subset of Windows.h
if (WIN32)
- add_definitions( -DWIN32_LEAN_AND_MEAN )
+ ADD_DEFINITIONS( -DWIN32_LEAN_AND_MEAN )
endif()
+
IF(MSVC)
- set (CMAKE_PREFIX_PATH "D:\\libs\\devil")
OPTION( ASSIMP_INSTALL_PDB
"Install MSVC debug files."
ON
)
ENDIF(MSVC)
+IF (BUILD_FRAMEWORK)
+ SET (BUILD_SHARED_LIBS ON)
+ MESSAGE(STATUS "Framework bundle building enabled")
+ENDIF(BUILD_FRAMEWORK)
+
IF(NOT BUILD_SHARED_LIBS)
+ MESSAGE(STATUS "Shared libraries disabled")
SET(LINK_SEARCH_START_STATIC TRUE)
+ELSE()
+ MESSAGE(STATUS "Shared libraries enabled")
ENDIF(NOT BUILD_SHARED_LIBS)
# Define here the needed parameters
-SET (ASSIMP_VERSION_MAJOR 3)
-SET (ASSIMP_VERSION_MINOR 3)
-SET (ASSIMP_VERSION_PATCH 1) # subversion revision?
+SET (ASSIMP_VERSION_MAJOR 4)
+SET (ASSIMP_VERSION_MINOR 1)
+SET (ASSIMP_VERSION_PATCH 0)
SET (ASSIMP_VERSION ${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_MINOR}.${ASSIMP_VERSION_PATCH})
-SET (ASSIMP_SOVERSION 3)
+SET (ASSIMP_SOVERSION 4)
SET (PROJECT_VERSION "${ASSIMP_VERSION}")
-SET(ASSIMP_PACKAGE_VERSION "0" CACHE STRING "the package-specific version used for uploading the sources")
+SET( ASSIMP_PACKAGE_VERSION "0" CACHE STRING "the package-specific version used for uploading the sources" )
-# Needed for openddl_parser config, no use of c++11 at this moment
-add_definitions( -DOPENDDL_NO_USE_CPP11 )
+# Enable C++1 globally
set_property( GLOBAL PROPERTY CXX_STANDARD 11 )
-# Get the current working branch
-EXECUTE_PROCESS(
- COMMAND git rev-parse --abbrev-ref HEAD
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- OUTPUT_VARIABLE GIT_BRANCH
- OUTPUT_STRIP_TRAILING_WHITESPACE
- ERROR_QUIET
-)
+IF(NOT IGNORE_GIT_HASH)
+ # Get the current working branch
+ EXECUTE_PROCESS(
+ COMMAND git rev-parse --abbrev-ref HEAD
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ OUTPUT_VARIABLE GIT_BRANCH
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ ERROR_QUIET
+ )
-# Get the latest abbreviated commit hash of the working branch
-EXECUTE_PROCESS(
- COMMAND git log -1 --format=%h
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- OUTPUT_VARIABLE GIT_COMMIT_HASH
- OUTPUT_STRIP_TRAILING_WHITESPACE
- ERROR_QUIET
-)
+ # Get the latest abbreviated commit hash of the working branch
+ EXECUTE_PROCESS(
+ COMMAND git rev-parse --short=8 HEAD
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ OUTPUT_VARIABLE GIT_COMMIT_HASH
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ ERROR_QUIET
+ )
+ENDIF()
IF(NOT GIT_COMMIT_HASH)
SET(GIT_COMMIT_HASH 0)
ENDIF(NOT GIT_COMMIT_HASH)
IF(ASSIMP_DOUBLE_PRECISION)
- ADD_DEFINITIONS(-DASSIMP_DOUBLE_PRECISION)
+ ADD_DEFINITIONS(-DASSIMP_DOUBLE_PRECISION)
ENDIF(ASSIMP_DOUBLE_PRECISION)
-# Check for OpenMP support
-find_package(OpenMP)
-if (OPENMP_FOUND)
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
-endif()
-
-configure_file(
+CONFIGURE_FILE(
${CMAKE_CURRENT_LIST_DIR}/revision.h.in
${CMAKE_CURRENT_BINARY_DIR}/revision.h
)
-configure_file(
+CONFIGURE_FILE(
${CMAKE_CURRENT_LIST_DIR}/include/assimp/config.h.in
${CMAKE_CURRENT_BINARY_DIR}/include/assimp/config.h
)
-include_directories(
- ./
- ${CMAKE_CURRENT_BINARY_DIR}
- ${CMAKE_CURRENT_BINARY_DIR}/include
+INCLUDE_DIRECTORIES(
+ ./
+ include
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}/include
)
LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules" )
@@ -173,39 +212,73 @@ SET(CPACK_COMPONENTS_ALL assimp-bin ${LIBASSIMP_COMPONENT} ${LIBASSIMP-DEV_COMPO
SET(ASSIMP_LIBRARY_SUFFIX "" CACHE STRING "Suffix to append to library names")
IF( UNIX )
- # Ensure that we do not run into issues like http://www.tcm.phy.cam.ac.uk/sw/inodes64.html on 32 bit linux
- IF ( CMAKE_SIZEOF_VOID_P EQUAL 4) # only necessary for 32-bit linux
- ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64 )
- ENDIF()
-
# Use GNUInstallDirs for Unix predefined directories
- include(GNUInstallDirs)
+ INCLUDE(GNUInstallDirs)
ENDIF( UNIX )
-
# Grouped compiler settings
IF ((CMAKE_C_COMPILER_ID MATCHES "GNU") AND NOT CMAKE_COMPILER_IS_MINGW)
# hide all not-exported symbols
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fvisibility=hidden -fPIC -Wall -std=c++0x")
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
+ SET(CMAKE_CXX_FLAGS "-g -fvisibility=hidden -fPIC -fno-strict-aliasing -Wall -std=c++0x ${CMAKE_CXX_FLAGS}")
+ SET(CMAKE_C_FLAGS "-fPIC -fno-strict-aliasing ${CMAKE_C_FLAGS}")
SET(LIBSTDC++_LIBRARIES -lstdc++)
ELSEIF(MSVC)
# enable multi-core compilation with MSVC
- add_compile_options(/MP)
+ ADD_COMPILE_OPTIONS(/MP)
+ ADD_COMPILE_OPTIONS( /bigobj )
+ # disable "elements of array '' will be default initialized" warning on MSVC2013
+ IF(MSVC12)
+ ADD_COMPILE_OPTIONS(/wd4351)
+ ENDIF()
ELSEIF ( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" )
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fvisibility=hidden -fPIC -Wall -Wno-long-long -pedantic -std=c++11" )
+ SET(CMAKE_CXX_FLAGS "-g -fvisibility=hidden -fPIC -fno-strict-aliasing -Wall -Wno-long-long -std=c++11 ${CMAKE_CXX_FLAGS}" )
+ SET(CMAKE_C_FLAGS "-fPIC -fno-strict-aliasing ${CMAKE_C_FLAGS}")
ELSEIF( CMAKE_COMPILER_IS_MINGW )
- SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -Wall -Wno-long-long -pedantic -std=c++11" )
- add_definitions( -U__STRICT_ANSI__ )
+ SET( CMAKE_CXX_FLAGS "-fvisibility=hidden -fno-strict-aliasing -Wall -Wno-long-long -std=c++11 -Wa,-mbig-obj ${CMAKE_CXX_FLAGS}" )
+ SET(CMAKE_C_FLAGS "-fPIC -fno-strict-aliasing ${CMAKE_C_FLAGS} ")
+ ADD_DEFINITIONS( -U__STRICT_ANSI__ )
ENDIF()
-if (ASSIMP_COVERALLS)
- include(Coveralls)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
-endif()
+IF ( IOS )
+
+IF (CMAKE_BUILD_TYPE STREQUAL "Debug")
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fembed-bitcode -Og")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fembed-bitcode -Og")
+ELSE()
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fembed-bitcode -O3")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fembed-bitcode -O3")
+ENDIF()
+
+ENDIF( IOS )
+
+IF (ASSIMP_COVERALLS)
+ MESSAGE(STATUS "Coveralls enabled")
+ INCLUDE(Coveralls)
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
+ENDIF()
-INCLUDE_DIRECTORIES( include )
+IF (ASSIMP_WERROR)
+ MESSAGE(STATUS "Treating warnings as errors")
+ IF (MSVC)
+ ADD_COMPILE_OPTIONS(/WX)
+ ELSE()
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
+ ENDIF()
+ENDIF()
+
+IF (ASSIMP_ASAN)
+ MESSAGE(STATUS "AddressSanitizer enabled")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address")
+ENDIF()
+
+IF (ASSIMP_UBSAN)
+ MESSAGE(STATUS "Undefined Behavior sanitizer enabled")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined -fno-sanitize-recover=all")
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=undefined -fno-sanitize-recover=all")
+ENDIF()
INCLUDE (FindPkgMacros)
INCLUDE (PrecompiledHeader)
@@ -237,50 +310,72 @@ ENDIF()
# Only generate this target if no higher-level project already has
IF (NOT TARGET uninstall)
# add make uninstall capability
- configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules/cmake_uninstall.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY)
- add_custom_target(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
+ CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules/cmake_uninstall.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY)
+ ADD_CUSTOM_TARGET(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
ENDIF()
# cmake configuration files
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/assimp-config.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/assimp-config.cmake" @ONLY IMMEDIATE)
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/assimp-config-version.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/assimp-config-version.cmake" @ONLY IMMEDIATE)
-install(FILES "${CMAKE_CURRENT_BINARY_DIR}/assimp-config.cmake" "${CMAKE_CURRENT_BINARY_DIR}/assimp-config-version.cmake" DESTINATION "${ASSIMP_LIB_INSTALL_DIR}/cmake/assimp-${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_MINOR}" COMPONENT ${LIBASSIMP-DEV_COMPONENT})
+CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/assimp-config.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/assimp-config.cmake" @ONLY IMMEDIATE)
+CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/assimpTargets.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/assimpTargets.cmake" @ONLY IMMEDIATE)
+CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/assimpTargets-debug.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/assimpTargets-debug.cmake" @ONLY IMMEDIATE)
+CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/assimpTargets-release.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/assimpTargets-release.cmake" @ONLY IMMEDIATE)
+CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/assimp-config-version.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/assimp-config-version.cmake" @ONLY IMMEDIATE)
+#we should generated these scripts after CMake VERSION 3.0.2 using export(EXPORT ...) and write_basic_package_version_file(...)
+INSTALL(FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/assimp-config.cmake"
+ "${CMAKE_CURRENT_BINARY_DIR}/assimp-config-version.cmake"
+ "${CMAKE_CURRENT_BINARY_DIR}/assimpTargets.cmake"
+ "${CMAKE_CURRENT_BINARY_DIR}/assimpTargets-debug.cmake"
+ "${CMAKE_CURRENT_BINARY_DIR}/assimpTargets-release.cmake"
+ DESTINATION "${ASSIMP_LIB_INSTALL_DIR}/cmake/assimp-${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_MINOR}" COMPONENT ${LIBASSIMP-DEV_COMPONENT})
FIND_PACKAGE( DirectX )
IF( BUILD_DOCS )
- add_subdirectory(doc)
+ ADD_SUBDIRECTORY(doc)
ENDIF( BUILD_DOCS )
# Look for system installed irrXML
IF ( SYSTEM_IRRXML )
- find_package( IrrXML REQUIRED )
+ FIND_PACKAGE( IrrXML REQUIRED )
ENDIF( SYSTEM_IRRXML )
# Search for external dependencies, and build them from source if not found
# Search for zlib
IF ( NOT ASSIMP_BUILD_ZLIB )
- find_package(ZLIB)
+ FIND_PACKAGE(ZLIB)
ENDIF( NOT ASSIMP_BUILD_ZLIB )
IF( NOT ZLIB_FOUND )
- message(STATUS "compiling zlib from souces")
- include(CheckIncludeFile)
- include(CheckTypeSize)
- include(CheckFunctionExists)
+ MESSAGE(STATUS "compiling zlib from sources")
+ INCLUDE(CheckIncludeFile)
+ INCLUDE(CheckTypeSize)
+ INCLUDE(CheckFunctionExists)
# compile from sources
- add_subdirectory(contrib/zlib)
+ ADD_SUBDIRECTORY(contrib/zlib)
SET(ZLIB_FOUND 1)
SET(ZLIB_LIBRARIES zlibstatic)
SET(ZLIB_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/contrib/zlib ${CMAKE_CURRENT_BINARY_DIR}/contrib/zlib)
-else(NOT ZLIB_FOUND)
+ # need to ensure we don't link with system zlib or minizip as well.
+ SET(ASSIMP_BUILD_MINIZIP 1)
+ELSE(NOT ZLIB_FOUND)
ADD_DEFINITIONS(-DASSIMP_BUILD_NO_OWN_ZLIB)
SET(ZLIB_LIBRARIES_LINKED -lz)
ENDIF(NOT ZLIB_FOUND)
INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
# Search for unzip
-use_pkgconfig(UNZIP minizip)
+IF ( NOT IOS )
+ IF( NOT ASSIMP_BUILD_MINIZIP )
+ use_pkgconfig(UNZIP minizip)
+ ENDIF( NOT ASSIMP_BUILD_MINIZIP )
+ELSE ( NOT IOS )
+ IF(NOT BUILD_SHARED_LIBS)
+ IF( NOT ASSIMP_BUILD_MINIZIP )
+ use_pkgconfig(UNZIP minizip)
+ ENDIF( NOT ASSIMP_BUILD_MINIZIP )
+ ENDIF (NOT BUILD_SHARED_LIBS)
+ENDIF ( NOT IOS )
IF ( ASSIMP_NO_EXPORT )
ADD_DEFINITIONS( -DASSIMP_BUILD_NO_EXPORT)
@@ -315,7 +410,9 @@ IF (ASSIMP_BUILD_NONFREE_C4D_IMPORTER)
SET(C4D_INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/contrib/Melange/includes")
# pick the correct prebuilt library
- IF(MSVC14)
+ IF(MSVC15)
+ SET(C4D_LIB_POSTFIX "_2017")
+ ELSEIF(MSVC14)
SET(C4D_LIB_POSTFIX "_2015")
ELSEIF(MSVC12)
SET(C4D_LIB_POSTFIX "_2013")
@@ -356,39 +453,16 @@ ADD_SUBDIRECTORY(contrib)
ADD_SUBDIRECTORY( code/ )
IF ( ASSIMP_BUILD_ASSIMP_TOOLS )
IF ( WIN32 AND DirectX_D3DX9_LIBRARY )
- option ( ASSIMP_BUILD_ASSIMP_VIEW "If the Assimp view tool is built. (requires DirectX)" ${DirectX_FOUND} )
+ OPTION ( ASSIMP_BUILD_ASSIMP_VIEW "If the Assimp view tool is built. (requires DirectX)" ${DirectX_FOUND} )
IF ( ASSIMP_BUILD_ASSIMP_VIEW )
ADD_SUBDIRECTORY( tools/assimp_view/ )
ENDIF ( ASSIMP_BUILD_ASSIMP_VIEW )
ENDIF ( WIN32 AND DirectX_D3DX9_LIBRARY )
ADD_SUBDIRECTORY( tools/assimp_cmd/ )
-
- # Check dependencies for assimp_qt_viewer.
- # Why here? Maybe user do not want Qt viewer and have no Qt.
- # Why assimp_qt_viewer/CMakeLists.txt still contain similar check?
- # Because viewer can be build independently of Assimp.
- FIND_PACKAGE(Qt5Widgets QUIET)
- FIND_PACKAGE(DevIL QUIET)
- FIND_PACKAGE(OpenGL QUIET)
- IF ( Qt5Widgets_FOUND AND IL_FOUND AND OPENGL_FOUND)
- ADD_SUBDIRECTORY( tools/assimp_qt_viewer/ )
- ELSE()
- SET ( ASSIMP_QT_VIEWER_DEPENDENCIES "")
- IF (NOT Qt5_FOUND)
- SET ( ASSIMP_QT_VIEWER_DEPENDENCIES "${ASSIMP_QT_VIEWER_DEPENDENCIES} Qt5")
- ENDIF (NOT Qt5_FOUND)
-
- IF (NOT IL_FOUND)
- SET ( ASSIMP_QT_VIEWER_DEPENDENCIES "${ASSIMP_QT_VIEWER_DEPENDENCIES} DevIL")
- ENDIF (NOT IL_FOUND)
-
- IF (NOT OPENGL_FOUND)
- SET ( ASSIMP_QT_VIEWER_DEPENDENCIES "${ASSIMP_QT_VIEWER_DEPENDENCIES} OpengGL")
- ENDIF (NOT OPENGL_FOUND)
-
- MESSAGE (WARNING "Build of assimp_qt_viewer is disabled. Unsatisfied dendencies: ${ASSIMP_QT_VIEWER_DEPENDENCIES}")
- ENDIF ( Qt5Widgets_FOUND AND IL_FOUND AND OPENGL_FOUND)
+IF (NOT IOS)
+ ADD_SUBDIRECTORY( tools/assimp_qt_viewer/ )
+ENDIF (NOT IOS)
ENDIF ( ASSIMP_BUILD_ASSIMP_TOOLS )
IF ( ASSIMP_BUILD_SAMPLES)
@@ -408,7 +482,7 @@ INSTALL( FILES "${PROJECT_BINARY_DIR}/assimp.pc" DESTINATION ${ASSIMP_LIB_INSTAL
IF(CMAKE_CPACK_COMMAND AND UNIX AND ASSIMP_OPT_BUILD_PACKAGES)
# Packing information
- SET(CPACK_PACKAGE_NAME "assimp{ASSIMP_VERSION_MAJOR}")
+ SET(CPACK_PACKAGE_NAME "assimp{ASSIMP_VERSION_MAJOR}.{ASSIMP_VERSION_MINOR}")
SET(CPACK_PACKAGE_CONTACT "" CACHE STRING "Package maintainer and PGP signer.")
SET(CPACK_PACKAGE_VENDOR "https://github.com/assimp")
SET(CPACK_PACKAGE_DISPLAY_NAME "Assimp ${ASSIMP_VERSION}")
@@ -420,8 +494,8 @@ IF(CMAKE_CPACK_COMMAND AND UNIX AND ASSIMP_OPT_BUILD_PACKAGES)
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "assimp${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_MINOR}")
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
- string(TOUPPER ${LIBASSIMP_COMPONENT} "LIBASSIMP_COMPONENT_UPPER")
- string(TOUPPER ${LIBASSIMP-DEV_COMPONENT} "LIBASSIMP-DEV_COMPONENT_UPPER")
+ STRING(TOUPPER ${LIBASSIMP_COMPONENT} "LIBASSIMP_COMPONENT_UPPER")
+ STRING(TOUPPER ${LIBASSIMP-DEV_COMPONENT} "LIBASSIMP-DEV_COMPONENT_UPPER")
SET(CPACK_COMPONENT_ASSIMP-BIN_DISPLAY_NAME "tools")
SET(CPACK_COMPONENT_ASSIMP-BIN_DEPENDS "${LIBASSIMP_COMPONENT}" )
@@ -438,8 +512,8 @@ IF(CMAKE_CPACK_COMMAND AND UNIX AND ASSIMP_OPT_BUILD_PACKAGES)
SET(CPACK_DEBIAN_PACKAGE_SECTION "libs" )
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_COMPONENTS_ALL}")
SET(CPACK_DEBIAN_PACKAGE_SUGGESTS)
- SET(CPACK_DEBIAN_PACKAGE_NAME "assimp")
- SET(CPACK_DEBIAN_PACKAGE_REMOVE_SOURCE_FILES contrib/cppunit-1.12.1 contrib/cppunit_note.txt contrib/zlib workspaces test doc obj samples packaging)
+ set(cPACK_DEBIAN_PACKAGE_NAME "assimp")
+ SET(CPACK_DEBIAN_PACKAGE_REMOVE_SOURCE_FILES contrib/gtest contrib/zlib workspaces test doc obj samples packaging)
SET(CPACK_DEBIAN_PACKAGE_SOURCE_COPY svn export --force)
SET(CPACK_DEBIAN_CHANGELOG)
execute_process(COMMAND lsb_release -is
@@ -451,8 +525,8 @@ IF(CMAKE_CPACK_COMMAND AND UNIX AND ASSIMP_OPT_BUILD_PACKAGES)
SET(CPACK_DEBIAN_DISTRIBUTION_RELEASES lucid maverick natty oneiric precise CACHE STRING "Release code-names of the distrubiton release")
ENDIF()
SET(DPUT_HOST "" CACHE STRING "PPA repository to upload the debian sources")
- include(CPack)
- include(DebSourcePPA)
+ INCLUDE(CPack)
+ INCLUDE(DebSourcePPA)
ENDIF()
if(WIN32)
@@ -464,21 +538,35 @@ if(WIN32)
SET(LIB_DIR "${PROJECT_SOURCE_DIR}/lib32/")
ENDIF()
- if(MSVC12)
+ IF(MSVC12)
SET(ASSIMP_MSVC_VERSION "vc120")
- elseif(MSVC14)
+ ELSEIF(MSVC14)
SET(ASSIMP_MSVC_VERSION "vc140")
+ ELSEIF(MSVC15)
+ SET(ASSIMP_MSVC_VERSION "vc141")
ENDIF(MSVC12)
- if(MSVC12 OR MSVC14)
- add_custom_target(UpdateAssimpLibsDebugSymbolsAndDLLs COMMENT "Copying Assimp Libraries ..." VERBATIM)
- add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.dll ${BIN_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.dll VERBATIM)
- add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.exp ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.exp VERBATIM)
- add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.lib ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.lib VERBATIM)
- add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.dll ${BIN_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.dll VERBATIM)
- add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.exp ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.exp VERBATIM)
- add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.ilk ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.ilk VERBATIM)
- add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.lib ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.lib VERBATIM)
- add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb VERBATIM)
- ENDIF(MSVC12 OR MSVC14)
+ IF(MSVC12 OR MSVC14 OR MSVC15 )
+ ADD_CUSTOM_TARGET(UpdateAssimpLibsDebugSymbolsAndDLLs COMMENT "Copying Assimp Libraries ..." VERBATIM)
+ IF(CMAKE_GENERATOR MATCHES "^Visual Studio")
+ ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.dll ${BIN_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.dll VERBATIM)
+ ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.exp ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.exp VERBATIM)
+ ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.lib ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.lib VERBATIM)
+ ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.dll ${BIN_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.dll VERBATIM)
+ ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.exp ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.exp VERBATIM)
+ ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.ilk ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.ilk VERBATIM)
+ ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.lib ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.lib VERBATIM)
+ ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb VERBATIM)
+ ELSE()
+ ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/assimp-${ASSIMP_MSVC_VERSION}-mt.dll ${BIN_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.dll VERBATIM)
+ ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/assimp-${ASSIMP_MSVC_VERSION}-mt.exp ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.exp VERBATIM)
+ ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/assimp-${ASSIMP_MSVC_VERSION}-mt.lib ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.lib VERBATIM)
+ ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/assimp-${ASSIMP_MSVC_VERSION}-mtd.dll ${BIN_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.dll VERBATIM)
+ ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/assimp-${ASSIMP_MSVC_VERSION}-mtd.exp ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.exp VERBATIM)
+ ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/assimp-${ASSIMP_MSVC_VERSION}-mtd.ilk ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.ilk VERBATIM)
+ ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/assimp-${ASSIMP_MSVC_VERSION}-mtd.lib ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.lib VERBATIM)
+ ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb VERBATIM)
+ ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb VERBATIM)
+ ENDIF()
+ ENDIF(MSVC12 OR MSVC14 OR MSVC15 )
ENDIF (WIN32)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 000000000..82ef07a65
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,10 @@
+# How to contribute
+
+If you want to contribute, follow these steps:
+
+- First, create your own clone of assimp.
+- When you want to fix a bug or add a new feature, create a branch on your own fork following [these instructions](https://help.github.com/articles/creating-a-pull-request-from-a-fork/).
+- Push it to your fork of the repository and open a pull request.
+- A pull request will start our continuous integration service, which checks if the build works for Linux and Windows.
+ It will check for memory leaks, compiler warnings and memory alignment issues. If any of these tests fail, fix it and the tests will be restarted automatically.
+ - At the end, we will perform a code review and merge your branch to the master branch.
diff --git a/CREDITS b/CREDITS
index 219079168..26e21d2f4 100644
--- a/CREDITS
+++ b/CREDITS
@@ -157,4 +157,27 @@ Contributed ExportProperties interface
Contributed X File exporter
Contributed Step (stp) exporter
+- Thomas Iorns (mesilliac)
+Initial FBX Export support
+For a more detailed list just check: https://github.com/assimp/assimp/network/members
+
+
+========
+Patreons
+========
+
+Huge thanks to our Patreons!
+
+- migenius
+- Marcus
+- Cort
+- elect
+- Steffen
+
+
+===================
+Commercial Sponsors
+===================
+
+- MyDidimo (mydidimo.com): Sponsored development of FBX Export support
diff --git a/INSTALL b/INSTALL
index 3baaddc4a..357918d6b 100644
--- a/INSTALL
+++ b/INSTALL
@@ -42,3 +42,6 @@ For Windows:
1. Open a command prompt
2. cmake CMakeLists.txt
2. Open your default IDE and build it
+
+For iOS:
+Just check the following project, which deploys a compiler toolchain for different iOS-versions: https://github.com/assimp/assimp/tree/master/port/iOS
diff --git a/Readme.md b/Readme.md
index 1e8e66b92..7f42fb75c 100644
--- a/Readme.md
+++ b/Readme.md
@@ -1,5 +1,6 @@
Open Asset Import Library (assimp)
==================================
+A library to import and export various 3d-model-formats including scene-post-processing to generate missing render data.
### Current build status ###
[![Linux Build Status](https://travis-ci.org/assimp/assimp.svg)](https://travis-ci.org/assimp/assimp)
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/tmo433wax6u6cjp4?svg=true)](https://ci.appveyor.com/project/kimkulling/assimp)
@@ -7,9 +8,10 @@ Open Asset Import Library (assimp)
<img alt="Coverity Scan Build Status"
src="https://scan.coverity.com/projects/5607/badge.svg"/>
</a>
-<span class="badge-patreon"><a href="https://www.patreon.com/assimp" title="Donate to this project using Patreon"><img src="https://img.shields.io/badge/patreon-donate-yellow.svg" alt="Patreon donate button" /></a></span>
[![Coverage Status](https://coveralls.io/repos/github/assimp/assimp/badge.svg?branch=master)](https://coveralls.io/github/assimp/assimp?branch=master)
[![Join the chat at https://gitter.im/assimp/assimp](https://badges.gitter.im/assimp/assimp.svg)](https://gitter.im/assimp/assimp?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/assimp/assimp.svg)](http://isitmaintained.com/project/assimp/assimp "Average time to resolve an issue")
+[![Codacy Badge](https://api.codacy.com/project/badge/Grade/5be56faac64f46fc941ac890fb4febef)](https://www.codacy.com/app/kimkulling/assimp?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=assimp/assimp&amp;utm_campaign=Badge_Grade)
<br>
APIs are provided for C and C++. There are various bindings to other languages (C#, Java, Python, Delphi, D). Assimp also runs on Android and iOS.
@@ -18,6 +20,11 @@ Additionally, assimp features various __mesh post processing tools__: normals an
This is the development repo containing the latest features and bugfixes. For productive use though, we recommend one of the stable releases available from [Github Assimp Releases](https://github.com/assimp/assimp/releases).
+Monthly donations via Patreon:
+<br>[![Patreon](https://cloud.githubusercontent.com/assets/8225057/5990484/70413560-a9ab-11e4-8942-1a63607c0b00.png)](http://www.patreon.com/assimp)
+
+<br>
+
One-off donations via PayPal:
<br>[![PayPal](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=4JRJVPXC4QJM4)
@@ -25,54 +32,73 @@ One-off donations via PayPal:
Please check our Wiki as well: https://github.com/assimp/assimp/wiki
+If you want to check our Model-Database, use the following repo: https://github.com/assimp/assimp-mdb
+
#### Supported file formats ####
-A full list [is here](http://assimp.org/main_features_formats.html).
__Importers__:
-- 3DS
-- BLEND (Blender)
-- DAE/Collada
-- FBX
-- IFC-STEP
+- 3D
+- [3DS](https://en.wikipedia.org/wiki/.3ds)
+- [3MF](https://en.wikipedia.org/wiki/3D_Manufacturing_Format)
+- AC
+- [AC3D](https://en.wikipedia.org/wiki/AC3D)
+- ACC
+- AMJ
- ASE
-- DXF
-- HMP
+- ASK
+- B3D
+- [BLEND](https://en.wikipedia.org/wiki/.blend_(file_format))
+- [BVH](https://en.wikipedia.org/wiki/Biovision_Hierarchy)
+- CMS
+- COB
+- [DAE/Collada](https://en.wikipedia.org/wiki/COLLADA)
+- [DXF](https://en.wikipedia.org/wiki/AutoCAD_DXF)
+- ENFF
+- [FBX](https://en.wikipedia.org/wiki/FBX)
+- [glTF 1.0](https://en.wikipedia.org/wiki/GlTF#glTF_1.0) + GLB
+- [glTF 2.0](https://en.wikipedia.org/wiki/GlTF#glTF_2.0)
+- HMB
+- IFC-STEP
+- IRR / IRRMESH
+- [LWO](https://en.wikipedia.org/wiki/LightWave_3D)
+- LWS
+- LXO
- MD2
- MD3
- MD5
- MDC
- MDL
+- MESH / MESH.XML
+- MOT
+- MS3D
+- NDO
- NFF
-- PLY
-- STL
-- X
-- OBJ
-- OpenGEX
+- [OBJ](https://en.wikipedia.org/wiki/Wavefront_.obj_file)
+- [OFF](https://en.wikipedia.org/wiki/OFF_(file_format))
+- [OGEX](https://en.wikipedia.org/wiki/Open_Game_Engine_Exchange)
+- [PLY](https://en.wikipedia.org/wiki/PLY_(file_format))
+- PMX
+- PRJ
+- Q3O
+- Q3S
+- RAW
+- SCN
+- SIB
- SMD
-- LWO
-- LXO
-- LWS
+- [STP](https://en.wikipedia.org/wiki/ISO_10303-21)
+- [STL](https://en.wikipedia.org/wiki/STL_(file_format))
- TER
-- AC3D
-- MS3D
-- COB
-- Q3BSP
+- UC
+- VTA
+- X
+- [X3D](https://en.wikipedia.org/wiki/X3D)
- XGL
-- CSM
-- BVH
-- B3D
-- NDO
-- Ogre Binary
-- Ogre XML
-- Q3D
-- ASSBIN (Assimp custom format)
-- glTF (partial)
-- 3MF
+- ZGL
Additionally, some formats are supported by dependency on non-free code or external SDKs (not built by default):
-- C4D (https://github.com/acgessler/assimp-cinema4d)
+- [C4D](https://en.wikipedia.org/wiki/Cinema_4D) (https://github.com/assimp/assimp/wiki/Cinema4D-&-Melange)
__Exporters__:
@@ -85,10 +111,13 @@ __Exporters__:
- JSON (for WebGl, via https://github.com/acgessler/assimp2json)
- ASSBIN
- STEP
-- glTF (partial)
+- glTF 1.0 (partial)
+- glTF 2.0 (partial)
+- 3MF ( experimental )
+- FBX ( experimental )
### Building ###
-Take a look into the `INSTALL` file. Our build system is CMake, if you used CMake before there is a good chance you know what to do.
+Take a look into the https://github.com/assimp/assimp/blob/master/Build.md file. Our build system is CMake, if you used CMake before there is a good chance you know what to do.
### Ports ###
* [Android](port/AndroidJNI/README.md)
@@ -96,6 +125,8 @@ Take a look into the `INSTALL` file. Our build system is CMake, if you used CMak
* [.NET](port/AssimpNET/Readme.md)
* [Pascal](port/AssimpPascal/Readme.md)
* [Javascript (Alpha)](https://github.com/makc/assimp2json)
+* [Unity 3d Plugin](https://www.assetstore.unity3d.com/en/#!/content/91777)
+* [JVM](https://github.com/kotlin-graphics/assimp) Full jvm port (current [status](https://github.com/kotlin-graphics/assimp/wiki/Status))
### Other tools ###
[open3mod](https://github.com/acgessler/open3mod) is a powerful 3D model viewer based on Assimp's import and export abilities.
@@ -113,8 +144,6 @@ Open Asset Import Library is implemented in C++. The directory structure is:
/tools Tools (old assimp viewer, command line `assimp`)
/samples A small number of samples to illustrate possible
use cases for Assimp
- /workspaces Build environments for vc,xcode,... (deprecated,
- CMake has superseeded all legacy build options!)
### Where to get help ###
diff --git a/appveyor.yml b/appveyor.yml
index 991cf5bc1..2b5f212f9 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -10,33 +10,58 @@ branches:
only:
- master
+matrix:
+ fast_finish: true
+
+image:
+ - Visual Studio 2013
+ - Visual Studio 2015
+ - Visual Studio 2017
+
platform:
- - x86
- - x64
-
-configuration:
- - 14 2015
- - 12 2013
- #- MinGW
- #- 10 2010 # only works for x86
-
-init:
-- if "%platform%" EQU "x64" ( for %%a in (2008 2010 MinGW) do ( if "%Configuration%"=="%%a" (echo "Skipping unsupported configuration" && exit /b 1 ) ) )
+ - Win32
+ - x64
+
+configuration: Release
install:
-# Make compiler command line tools available
-- call c:\projects\assimp\scripts\appveyor\compiler_setup.bat
-
-build_script:
-- cd c:\projects\assimp
-- if "%platform%" equ "x64" (cmake CMakeLists.txt -G "Visual Studio %Configuration% Win64")
-- if "%platform%" equ "x86" (cmake CMakeLists.txt -G "Visual Studio %Configuration%")
-- if "%platform%" equ "x64" (msbuild /m /p:Configuration=Release /p:Platform="x64" Assimp.sln)
-- if "%platform%" equ "x86" (msbuild /m /p:Configuration=Release /p:Platform="Win32" Assimp.sln)
-
+ - set PATH=C:\Ruby24-x64\bin;%PATH%
+ - set CMAKE_DEFINES -DASSIMP_WERROR=ON
+ - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2013" set CMAKE_GENERATOR_NAME=Visual Studio 12 2013
+ - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" set CMAKE_GENERATOR_NAME=Visual Studio 14 2015
+ - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" set CMAKE_GENERATOR_NAME=Visual Studio 15 2017
+ - if "%platform%"=="x64" set CMAKE_GENERATOR_NAME=%CMAKE_GENERATOR_NAME% Win64
+ - cmake %CMAKE_DEFINES% -G "%CMAKE_GENERATOR_NAME%"
+ - set PATH=%PATH%;"C:\\Program Files (x86)\\Inno Setup 5"
+ - ps: Invoke-WebRequest -Uri https://download.microsoft.com/download/5/7/b/57b2947c-7221-4f33-b35e-2fc78cb10df4/vc_redist.x64.exe -OutFile .\packaging\windows-innosetup\vc_redist.x64.exe
+ - ps: Invoke-WebRequest -Uri https://download.microsoft.com/download/1/d/8/1d8137db-b5bb-4925-8c5d-927424a2e4de/vc_redist.x86.exe -OutFile .\packaging\windows-innosetup\vc_redist.x86.exe
+
+cache:
+ - code\assimp.dir\%CONFIGURATION%
+ - contrib\zlib\zlibstatic.dir\%CONFIGURATION%
+ - contrib\zlib\zlib.dir\%CONFIGURATION%
+ - tools\assimp_cmd\assimp_cmd.dir\%CONFIGURATION%
+ - tools\assimp_view\assimp_viewer.dir\%CONFIGURATION%
+ - test\unit.dir\%CONFIGURATION%
+ - bin\.mtime_cache
+
+before_build:
+ - ruby scripts\AppVeyor\mtime_cache -g scripts\AppVeyor\cacheglobs.txt -c bin\.mtime_cache\cache.json
+
+build:
+ parallel: true
+ project: Assimp.sln
+
after_build:
- - 7z a assimp.7z c:\projects\assimp\bin\release\* c:\projects\assimp\lib\release\*
+ - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" iscc packaging\windows-innosetup\script.iss
+ - 7z a assimp.7z bin\%CONFIGURATION%\* lib\%CONFIGURATION%\*
+
+test_script:
+ - cmd: bin\%CONFIGURATION%\unit.exe --gtest_output=xml:testout.xml
+on_finish:
+ - ps: (new-object net.webclient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\testout.xml))
+
artifacts:
- path: assimp.7z
name: assimp_lib
diff --git a/assimp-config.cmake.in b/assimp-config.cmake.in
index e06cc10ee..0ab9fd071 100644
--- a/assimp-config.cmake.in
+++ b/assimp-config.cmake.in
@@ -1,81 +1 @@
-# - Find Assimp Installation
-#
-# Users can set the following variables before calling the module:
-# ASSIMP_DIR - The preferred installation prefix for searching for ASSIMP. Set by the user.
-#
-# ASSIMP_ROOT_DIR - the root directory where the installation can be found
-# ASSIMP_CXX_FLAGS - extra flags for compilation
-# ASSIMP_LINK_FLAGS - extra flags for linking
-# ASSIMP_INCLUDE_DIRS - include directories
-# ASSIMP_LIBRARY_DIRS - link directories
-# ASSIMP_LIBRARIES - libraries to link plugins with
-# ASSIMP_Boost_VERSION - the boost version assimp was compiled with
-get_filename_component(_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
-get_filename_component(_PREFIX "${_PREFIX}" PATH)
-get_filename_component(_PREFIX "${_PREFIX}" PATH)
-get_filename_component(ASSIMP_ROOT_DIR "${_PREFIX}" PATH)
-
-if( MSVC )
- # in order to prevent DLL hell, each of the DLLs have to be suffixed with the major version and msvc prefix
- if( MSVC70 OR MSVC71 )
- set(MSVC_PREFIX "vc70")
- elseif( MSVC80 )
- set(MSVC_PREFIX "vc80")
- elseif( MSVC90 )
- set(MSVC_PREFIX "vc90")
- elseif( MSVC10 )
- set(MSVC_PREFIX "vc100")
- elseif( MSVC11 )
- set(MSVC_PREFIX "vc110")
- elseif( MSVC12 )
- set(MSVC_PREFIX "vc120")
- elseif( MSVC14 )
- set(MSVC_PREFIX "vc140")
- else()
- set(MSVC_PREFIX "vc150")
- endif()
- set(ASSIMP_LIBRARY_SUFFIX "@ASSIMP_LIBRARY_SUFFIX@-${MSVC_PREFIX}-mt" CACHE STRING "the suffix for the assimp windows library" FORCE)
-else()
- set(ASSIMP_LIBRARY_SUFFIX "@ASSIMP_LIBRARY_SUFFIX@" CACHE STRING "the suffix for the openrave libraries" FORCE)
-endif()
-
-set( ASSIMP_CXX_FLAGS ) # dynamically linked library
-if( WIN32 )
- # for visual studio linking, most of the time boost dlls will be used
- set( ASSIMP_CXX_FLAGS " -DBOOST_ALL_DYN_LINK -DBOOST_ALL_NO_LIB")
-endif()
-set( ASSIMP_LINK_FLAGS "" )
-set( ASSIMP_LIBRARY_DIRS "${ASSIMP_ROOT_DIR}/@ASSIMP_LIB_INSTALL_DIR@")
-set( ASSIMP_INCLUDE_DIRS "${ASSIMP_ROOT_DIR}/@ASSIMP_INCLUDE_INSTALL_DIR@")
-set( ASSIMP_LIBRARIES assimp${ASSIMP_LIBRARY_SUFFIX})
-set( ASSIMP_LIBRARIES ${ASSIMP_LIBRARIES}@CMAKE_DEBUG_POSTFIX@)
-
-# search for the boost version assimp was compiled with
-#set(Boost_USE_MULTITHREAD ON)
-#set(Boost_USE_STATIC_LIBS OFF)
-#set(Boost_USE_STATIC_RUNTIME OFF)
-#find_package(Boost ${ASSIMP_Boost_VERSION} EXACT COMPONENTS thread date_time)
-#if(Boost_VERSION AND NOT "${Boost_VERSION}" STREQUAL "0")
-# set( ASSIMP_INCLUDE_DIRS "${ASSIMP_INCLUDE_DIRS}" ${Boost_INCLUDE_DIRS})
-#else(Boost_VERSION AND NOT "${Boost_VERSION}" STREQUAL "0")
-# message(WARNING "Failed to find Boost ${ASSIMP_Boost_VERSION} necessary for assimp")
-#endif(Boost_VERSION AND NOT "${Boost_VERSION}" STREQUAL "0")
-
-# the boost version assimp was compiled with
-set( ASSIMP_Boost_VERSION "@Boost_MAJOR_VERSION@.@Boost_MINOR_VERSION@")
-
-# for compatibility with pkg-config
-set(ASSIMP_CFLAGS_OTHER "${ASSIMP_CXX_FLAGS}")
-set(ASSIMP_LDFLAGS_OTHER "${ASSIMP_LINK_FLAGS}")
-
-MARK_AS_ADVANCED(
- ASSIMP_ROOT_DIR
- ASSIMP_CXX_FLAGS
- ASSIMP_LINK_FLAGS
- ASSIMP_INCLUDE_DIRS
- ASSIMP_LIBRARIES
- ASSIMP_Boost_VERSION
- ASSIMP_CFLAGS_OTHER
- ASSIMP_LDFLAGS_OTHER
- ASSIMP_LIBRARY_SUFFIX
-)
+include(${CMAKE_CURRENT_LIST_DIR}/assimpTargets.cmake)
diff --git a/assimp.pc.in b/assimp.pc.in
index 5b2139e6d..c659e19f2 100644
--- a/assimp.pc.in
+++ b/assimp.pc.in
@@ -1,7 +1,7 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@/
libdir=@CMAKE_INSTALL_PREFIX@/@ASSIMP_LIB_INSTALL_DIR@
-includedir=@CMAKE_INSTALL_PREFIX@/@ASSIMP_INCLUDE_INSTALL_DIR@/assimp
+includedir=@CMAKE_INSTALL_PREFIX@/../include/@ASSIMP_INCLUDE_INSTALL_DIR@
Name: @CMAKE_PROJECT_NAME@
Description: Import various well-known 3D model formats in an uniform manner.
diff --git a/assimpTargets-debug.cmake.in b/assimpTargets-debug.cmake.in
new file mode 100644
index 000000000..a83e6c22d
--- /dev/null
+++ b/assimpTargets-debug.cmake.in
@@ -0,0 +1,78 @@
+#----------------------------------------------------------------
+# Generated CMake target import file for configuration "Debug".
+#----------------------------------------------------------------
+
+# Commands may need to know the format version.
+set(CMAKE_IMPORT_FILE_VERSION 1)
+
+if(MSVC)
+ if( MSVC70 OR MSVC71 )
+ set(MSVC_PREFIX "vc70")
+ elseif( MSVC80 )
+ set(MSVC_PREFIX "vc80")
+ elseif( MSVC90 )
+ set(MSVC_PREFIX "vc90")
+ elseif( MSVC10 )
+ set(MSVC_PREFIX "vc100")
+ elseif( MSVC11 )
+ set(MSVC_PREFIX "vc110")
+ elseif( MSVC12 )
+ set(MSVC_PREFIX "vc120")
+ elseif( MSVC14 )
+ set(MSVC_PREFIX "vc140")
+ else()
+ set(MSVC_PREFIX "vc150")
+ endif()
+ set(ASSIMP_LIBRARY_SUFFIX "@ASSIMP_LIBRARY_SUFFIX@-${MSVC_PREFIX}-mt" CACHE STRING "the suffix for the assimp windows library" )
+
+ set(sharedLibraryName "assimp${ASSIMP_LIBRARY_SUFFIX}@CMAKE_DEBUG_POSTFIX@@CMAKE_SHARED_LIBRARY_SUFFIX@")
+ set(importLibraryName "assimp${ASSIMP_LIBRARY_SUFFIX}@CMAKE_DEBUG_POSTFIX@@CMAKE_IMPORT_LIBRARY_SUFFIX@")
+
+ # Import target "assimp::assimp" for configuration "Debug"
+ set_property(TARGET assimp::assimp APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
+ set_target_properties(assimp::assimp PROPERTIES
+ IMPORTED_IMPLIB_DEBUG "${_IMPORT_PREFIX}/lib/${importLibraryName}"
+ IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/bin/${sharedLibraryName}"
+ )
+ list(APPEND _IMPORT_CHECK_TARGETS assimp::assimp )
+ list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp "${_IMPORT_PREFIX}/lib/${importLibraryName}")
+ list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp "${_IMPORT_PREFIX}/bin/${sharedLibraryName}" )
+
+else()
+ set(ASSIMP_LIBRARY_SUFFIX "@ASSIMP_LIBRARY_SUFFIX@" CACHE STRING "the suffix for the openrave libraries" )
+ set(sharedLibraryName "libassimp${ASSIMP_LIBRARY_SUFFIX}@CMAKE_DEBUG_POSTFIX@@CMAKE_SHARED_LIBRARY_SUFFIX@.@ASSIMP_VERSION_MAJOR@")
+ set_target_properties(assimp::assimp PROPERTIES
+ IMPORTED_SONAME_DEBUG "${sharedLibraryName}"
+ IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/lib/${sharedLibraryName}"
+ )
+ list(APPEND _IMPORT_CHECK_TARGETS assimp::assimp )
+ list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp "${_IMPORT_PREFIX}/lib/${sharedLibraryName}" )
+endif()
+
+
+
+
+# Commands beyond this point should not need to know the version.
+set(CMAKE_IMPORT_FILE_VERSION)
+
+get_filename_component(ASSIMP_ROOT_DIR "@CMAKE_INSTALL_PREFIX@" REALPATH)
+set( ASSIMP_CXX_FLAGS ) # dynamically linked library
+set( ASSIMP_LINK_FLAGS "" )
+set( ASSIMP_LIBRARY_DIRS "${ASSIMP_ROOT_DIR}/@ASSIMP_LIB_INSTALL_DIR@")
+set( ASSIMP_INCLUDE_DIRS "${ASSIMP_ROOT_DIR}/@ASSIMP_INCLUDE_INSTALL_DIR@")
+set( ASSIMP_LIBRARIES ${sharedLibraryName})
+
+# for compatibility with pkg-config
+set(ASSIMP_CFLAGS_OTHER "${ASSIMP_CXX_FLAGS}")
+set(ASSIMP_LDFLAGS_OTHER "${ASSIMP_LINK_FLAGS}")
+
+MARK_AS_ADVANCED(
+ ASSIMP_ROOT_DIR
+ ASSIMP_CXX_FLAGS
+ ASSIMP_LINK_FLAGS
+ ASSIMP_INCLUDE_DIRS
+ ASSIMP_LIBRARIES
+ ASSIMP_CFLAGS_OTHER
+ ASSIMP_LDFLAGS_OTHER
+ ASSIMP_LIBRARY_SUFFIX
+)
diff --git a/assimpTargets-release.cmake.in b/assimpTargets-release.cmake.in
new file mode 100644
index 000000000..0b38e4e92
--- /dev/null
+++ b/assimpTargets-release.cmake.in
@@ -0,0 +1,75 @@
+#----------------------------------------------------------------
+# Generated CMake target import file for configuration "Release".
+#----------------------------------------------------------------
+
+# Commands may need to know the format version.
+set(CMAKE_IMPORT_FILE_VERSION 1)
+
+if(MSVC)
+ if( MSVC70 OR MSVC71 )
+ set(MSVC_PREFIX "vc70")
+ elseif( MSVC80 )
+ set(MSVC_PREFIX "vc80")
+ elseif( MSVC90 )
+ set(MSVC_PREFIX "vc90")
+ elseif( MSVC10 )
+ set(MSVC_PREFIX "vc100")
+ elseif( MSVC11 )
+ set(MSVC_PREFIX "vc110")
+ elseif( MSVC12 )
+ set(MSVC_PREFIX "vc120")
+ elseif( MSVC14 )
+ set(MSVC_PREFIX "vc140")
+ else()
+ set(MSVC_PREFIX "vc150")
+ endif()
+ set(ASSIMP_LIBRARY_SUFFIX "@ASSIMP_LIBRARY_SUFFIX@-${MSVC_PREFIX}-mt" CACHE STRING "the suffix for the assimp windows library" )
+
+ set(sharedLibraryName "assimp${ASSIMP_LIBRARY_SUFFIX}@CMAKE_SHARED_LIBRARY_SUFFIX@")
+ set(importLibraryName "assimp${ASSIMP_LIBRARY_SUFFIX}@CMAKE_IMPORT_LIBRARY_SUFFIX@")
+
+ # Import target "assimp::assimp" for configuration "Release"
+ set_property(TARGET assimp::assimp APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
+ set_target_properties(assimp::assimp PROPERTIES
+ IMPORTED_IMPLIB_RELEASE "${_IMPORT_PREFIX}/lib/${importLibraryName}"
+ IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/bin/${sharedLibraryName}"
+ )
+ list(APPEND _IMPORT_CHECK_TARGETS assimp::assimp )
+ list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp "${_IMPORT_PREFIX}/lib/${importLibraryName}")
+ list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp "${_IMPORT_PREFIX}/bin/${sharedLibraryName}" )
+
+else()
+ set(ASSIMP_LIBRARY_SUFFIX "@ASSIMP_LIBRARY_SUFFIX@" CACHE STRING "the suffix for the openrave libraries" )
+ set(sharedLibraryName "libassimp${ASSIMP_LIBRARY_SUFFIX}@CMAKE_SHARED_LIBRARY_SUFFIX@.@ASSIMP_VERSION_MAJOR@")
+ set_target_properties(assimp::assimp PROPERTIES
+ IMPORTED_SONAME_RELEASE "${sharedLibraryName}"
+ IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/${sharedLibraryName}"
+ )
+ list(APPEND _IMPORT_CHECK_TARGETS assimp::assimp )
+ list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp "${_IMPORT_PREFIX}/lib/${sharedLibraryName}" )
+endif()
+
+# Commands beyond this point should not need to know the version.
+set(CMAKE_IMPORT_FILE_VERSION)
+
+get_filename_component(ASSIMP_ROOT_DIR "@CMAKE_INSTALL_PREFIX@" REALPATH)
+set( ASSIMP_CXX_FLAGS ) # dynamically linked library
+set( ASSIMP_LINK_FLAGS "" )
+set( ASSIMP_LIBRARY_DIRS "${ASSIMP_ROOT_DIR}/@ASSIMP_LIB_INSTALL_DIR@")
+set( ASSIMP_INCLUDE_DIRS "${ASSIMP_ROOT_DIR}/@ASSIMP_INCLUDE_INSTALL_DIR@")
+set( ASSIMP_LIBRARIES ${sharedLibraryName})
+
+# for compatibility with pkg-config
+set(ASSIMP_CFLAGS_OTHER "${ASSIMP_CXX_FLAGS}")
+set(ASSIMP_LDFLAGS_OTHER "${ASSIMP_LINK_FLAGS}")
+
+MARK_AS_ADVANCED(
+ ASSIMP_ROOT_DIR
+ ASSIMP_CXX_FLAGS
+ ASSIMP_LINK_FLAGS
+ ASSIMP_INCLUDE_DIRS
+ ASSIMP_LIBRARIES
+ ASSIMP_CFLAGS_OTHER
+ ASSIMP_LDFLAGS_OTHER
+ ASSIMP_LIBRARY_SUFFIX
+)
diff --git a/assimpTargets.cmake.in b/assimpTargets.cmake.in
new file mode 100644
index 000000000..68e2c0dec
--- /dev/null
+++ b/assimpTargets.cmake.in
@@ -0,0 +1,101 @@
+# Generated by CMake
+
+if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5)
+ message(FATAL_ERROR "CMake >= 2.6.0 required")
+endif()
+cmake_policy(PUSH)
+cmake_policy(VERSION 2.6)
+#----------------------------------------------------------------
+# Generated CMake target import file.
+#----------------------------------------------------------------
+
+# Commands may need to know the format version.
+set(CMAKE_IMPORT_FILE_VERSION 1)
+
+# Protect against multiple inclusion, which would fail when already imported targets are added once more.
+set(_targetsDefined)
+set(_targetsNotDefined)
+set(_expectedTargets)
+foreach(_expectedTarget assimp::assimp)
+ list(APPEND _expectedTargets ${_expectedTarget})
+ if(NOT TARGET ${_expectedTarget})
+ list(APPEND _targetsNotDefined ${_expectedTarget})
+ endif()
+ if(TARGET ${_expectedTarget})
+ list(APPEND _targetsDefined ${_expectedTarget})
+ endif()
+endforeach()
+if("${_targetsDefined}" STREQUAL "${_expectedTargets}")
+ unset(_targetsDefined)
+ unset(_targetsNotDefined)
+ unset(_expectedTargets)
+ set(CMAKE_IMPORT_FILE_VERSION)
+ cmake_policy(POP)
+ return()
+endif()
+if(NOT "${_targetsDefined}" STREQUAL "")
+ message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n")
+endif()
+unset(_targetsDefined)
+unset(_targetsNotDefined)
+unset(_expectedTargets)
+
+
+# Compute the installation prefix relative to this file.
+get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
+get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
+get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
+get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
+if(_IMPORT_PREFIX STREQUAL "/")
+ set(_IMPORT_PREFIX "")
+endif()
+
+# Create imported target assimp::assimp
+add_library(assimp::assimp SHARED IMPORTED)
+
+set_target_properties(assimp::assimp PROPERTIES
+ COMPATIBLE_INTERFACE_STRING "assimp_MAJOR_VERSION"
+ INTERFACE_assimp_MAJOR_VERSION "1"
+ INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include;${_IMPORT_PREFIX}/include"
+ #INTERFACE_LINK_LIBRARIES "TxtUtils::TxtUtils;MealyMachine::MealyMachine"
+)
+
+if(CMAKE_VERSION VERSION_LESS 2.8.12)
+ message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.")
+endif()
+
+# Load information for each installed configuration.
+get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+file(GLOB CONFIG_FILES "${_DIR}/assimpTargets-*.cmake")
+foreach(f ${CONFIG_FILES})
+ include(${f})
+endforeach()
+
+# Cleanup temporary variables.
+set(_IMPORT_PREFIX)
+
+# Loop over all imported files and verify that they actually exist
+foreach(target ${_IMPORT_CHECK_TARGETS} )
+ foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} )
+ if(NOT EXISTS "${file}" )
+ message(FATAL_ERROR "The imported target \"${target}\" references the file
+ \"${file}\"
+but this file does not exist. Possible reasons include:
+* The file was deleted, renamed, or moved to another location.
+* An install or uninstall procedure did not complete successfully.
+* The installation package was faulty and contained
+ \"${CMAKE_CURRENT_LIST_FILE}\"
+but not all the files it references.
+")
+ endif()
+ endforeach()
+ unset(_IMPORT_CHECK_FILES_FOR_${target})
+endforeach()
+unset(_IMPORT_CHECK_TARGETS)
+
+# This file does not depend on other imported targets which have
+# been exported from the same project but in a separate export set.
+
+# Commands beyond this point should not need to know the version.
+set(CMAKE_IMPORT_FILE_VERSION)
+cmake_policy(POP)
diff --git a/cmake-modules/CoverallsGenerateGcov.cmake b/cmake-modules/CoverallsGenerateGcov.cmake
index ba506e3d4..104737164 100644
--- a/cmake-modules/CoverallsGenerateGcov.cmake
+++ b/cmake-modules/CoverallsGenerateGcov.cmake
@@ -310,7 +310,7 @@ foreach (GCOV_FILE ${GCOV_FILES})
message("MD5: ${GCOV_SRC_PATH} = ${GCOV_CONTENTS_MD5}")
# Loads the gcov file as a list of lines.
- # (We first open the file and replace all occurences of [] with _
+ # (We first open the file and replace all occurrences of [] with _
# because CMake will fail to parse a line containing unmatched brackets...
# also the \ to escaped \n in macros screws up things.)
# https://public.kitware.com/Bug/view.php?id=15369
@@ -329,7 +329,7 @@ foreach (GCOV_FILE ${GCOV_FILES})
# Instead of trying to parse the source from the
# gcov file, simply read the file contents from the source file.
# (Parsing it from the gcov is hard because C-code uses ; in many places
- # which also happens to be the same as the CMake list delimeter).
+ # which also happens to be the same as the CMake list delimiter).
file(READ ${GCOV_SRC_PATH} GCOV_FILE_SOURCE)
string(REPLACE "\\" "\\\\" GCOV_FILE_SOURCE "${GCOV_FILE_SOURCE}")
diff --git a/code/3DSConverter.cpp b/code/3DSConverter.cpp
index da8c918a7..7ec79ba64 100644
--- a/code/3DSConverter.cpp
+++ b/code/3DSConverter.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -50,27 +51,28 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "TargetAnimation.h"
#include <assimp/scene.h>
#include <assimp/DefaultLogger.hpp>
-#include "StringComparison.h"
+#include <assimp/StringComparison.h>
#include <memory>
#include <cctype>
using namespace Assimp;
+static const unsigned int NotSet = 0xcdcdcdcd;
+
// ------------------------------------------------------------------------------------------------
// Setup final material indices, generae a default material if necessary
void Discreet3DSImporter::ReplaceDefaultMaterial()
{
-
// Try to find an existing material that matches the
// typical default material setting:
// - no textures
// - diffuse color (in grey!)
// NOTE: This is here to workaround the fact that some
// exporters are writing a default material, too.
- unsigned int idx = 0xcdcdcdcd;
+ unsigned int idx( NotSet );
for (unsigned int i = 0; i < mScene->mMaterials.size();++i)
{
- std::string s = mScene->mMaterials[i].mName;
+ std::string &s = mScene->mMaterials[i].mName;
for ( std::string::iterator it = s.begin(); it != s.end(); ++it ) {
*it = static_cast< char >( ::tolower( *it ) );
}
@@ -93,7 +95,9 @@ void Discreet3DSImporter::ReplaceDefaultMaterial()
}
idx = i;
}
- if (0xcdcdcdcd == idx)idx = (unsigned int)mScene->mMaterials.size();
+ if ( NotSet == idx ) {
+ idx = ( unsigned int )mScene->mMaterials.size();
+ }
// now iterate through all meshes and through all faces and
// find all faces that are using the default material
@@ -116,7 +120,7 @@ void Discreet3DSImporter::ReplaceDefaultMaterial()
else if ( (*a) >= mScene->mMaterials.size())
{
(*a) = idx;
- DefaultLogger::get()->warn("Material index overflow in 3DS file. Using default material");
+ ASSIMP_LOG_WARN("Material index overflow in 3DS file. Using default material");
++cnt;
}
}
@@ -124,12 +128,11 @@ void Discreet3DSImporter::ReplaceDefaultMaterial()
if (cnt && idx == mScene->mMaterials.size())
{
// We need to create our own default material
- D3DS::Material sMat;
+ D3DS::Material sMat("%%%DEFAULT");
sMat.mDiffuse = aiColor3D(0.3f,0.3f,0.3f);
- sMat.mName = "%%%DEFAULT";
mScene->mMaterials.push_back(sMat);
- DefaultLogger::get()->info("3DS: Generating default material");
+ ASSIMP_LOG_INFO("3DS: Generating default material");
}
}
@@ -144,12 +147,12 @@ void Discreet3DSImporter::CheckIndices(D3DS::Mesh& sMesh)
{
if ((*i).mIndices[a] >= sMesh.mPositions.size())
{
- DefaultLogger::get()->warn("3DS: Vertex index overflow)");
+ ASSIMP_LOG_WARN("3DS: Vertex index overflow)");
(*i).mIndices[a] = (uint32_t)sMesh.mPositions.size()-1;
}
if ( !sMesh.mTexCoords.empty() && (*i).mIndices[a] >= sMesh.mTexCoords.size())
{
- DefaultLogger::get()->warn("3DS: Texture coordinate index overflow)");
+ ASSIMP_LOG_WARN("3DS: Texture coordinate index overflow)");
(*i).mIndices[a] = (uint32_t)sMesh.mTexCoords.size()-1;
}
}
@@ -201,8 +204,9 @@ void CopyTexture(aiMaterial& mat, D3DS::Texture& texture, aiTextureType type)
mat.AddProperty<ai_real>( &texture.mTextureBlend, 1, AI_MATKEY_TEXBLEND(type,0));
// Setup the texture mapping mode
- mat.AddProperty<int>((int*)&texture.mMapMode,1,AI_MATKEY_MAPPINGMODE_U(type,0));
- mat.AddProperty<int>((int*)&texture.mMapMode,1,AI_MATKEY_MAPPINGMODE_V(type,0));
+ int mapMode = static_cast<int>(texture.mMapMode);
+ mat.AddProperty<int>(&mapMode,1,AI_MATKEY_MAPPINGMODE_U(type,0));
+ mat.AddProperty<int>(&mapMode,1,AI_MATKEY_MAPPINGMODE_V(type,0));
// Mirroring - double the scaling values
// FIXME: this is not really correct ...
@@ -310,7 +314,8 @@ void Discreet3DSImporter::ConvertMaterial(D3DS::Material& oldMat,
case D3DS::Discreet3DS::Blinn :
eShading = aiShadingMode_Blinn; break;
}
- mat.AddProperty<int>( (int*)&eShading,1,AI_MATKEY_SHADING_MODEL);
+ int eShading_ = static_cast<int>(eShading);
+ mat.AddProperty<int>(&eShading_, 1, AI_MATKEY_SHADING_MODEL);
// DIFFUSE texture
if( oldMat.sTexDiffuse.mMapName.length() > 0)
@@ -494,7 +499,7 @@ void Discreet3DSImporter::AddNodeToGraph(aiScene* pcSOut,aiNode* pcOut,
pvCurrent->x *= -1.f;
t2->x *= -1.f;
}
- DefaultLogger::get()->info("3DS: Flipping mesh X-Axis");
+ ASSIMP_LOG_INFO("3DS: Flipping mesh X-Axis");
}
// Handle pivot point
@@ -570,11 +575,11 @@ void Discreet3DSImporter::AddNodeToGraph(aiScene* pcSOut,aiNode* pcOut,
pcIn->aTargetPositionKeys.size() > 1)
{
aiAnimation* anim = pcSOut->mAnimations[0];
- ai_assert(NULL != anim);
+ ai_assert(nullptr != anim);
if (pcIn->aCameraRollKeys.size() > 1)
{
- DefaultLogger::get()->debug("3DS: Converting camera roll track ...");
+ ASSIMP_LOG_DEBUG("3DS: Converting camera roll track ...");
// Camera roll keys - in fact they're just rotations
// around the camera's z axis. The angles are given
@@ -594,7 +599,7 @@ void Discreet3DSImporter::AddNodeToGraph(aiScene* pcSOut,aiNode* pcOut,
#if 0
if (pcIn->aTargetPositionKeys.size() > 1)
{
- DefaultLogger::get()->debug("3DS: Converting target track ...");
+ ASSIMP_LOG_DEBUG("3DS: Converting target track ...");
// Camera or spot light - need to convert the separate
// target position channel to our representation
@@ -740,7 +745,7 @@ void Discreet3DSImporter::GenerateNodeGraph(aiScene* pcOut)
// | | | | |
// MESH_0 MESH_1 MESH_2 ... MESH_N CAMERA_0 ....
//
- DefaultLogger::get()->warn("No hierarchy information has been found in the file. ");
+ ASSIMP_LOG_WARN("No hierarchy information has been found in the file. ");
pcOut->mRootNode->mNumChildren = pcOut->mNumMeshes +
static_cast<unsigned int>(mScene->mCameras.size() + mScene->mLights.size());
diff --git a/code/3DSExporter.cpp b/code/3DSExporter.cpp
index 642f7dc57..53976b16f 100644
--- a/code/3DSExporter.cpp
+++ b/code/3DSExporter.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -39,7 +40,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----------------------------------------------------------------------
*/
-
#ifndef ASSIMP_BUILD_NO_EXPORT
#ifndef ASSIMP_BUILD_NO_3DS_EXPORTER
@@ -48,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "3DSHelper.h"
#include <assimp/SceneCombiner.h>
#include "SplitLargeMeshes.h"
-#include "StringComparison.h"
+#include <assimp/StringComparison.h>
#include <assimp/IOSystem.hpp>
#include <assimp/DefaultLogger.hpp>
#include <assimp/Exporter.hpp>
@@ -151,7 +151,7 @@ namespace {
// ------------------------------------------------------------------------------------------------
// Worker function for exporting a scene to 3DS. Prototyped and registered in Exporter.cpp
-void ExportScene3DS(const char* pFile, IOSystem* pIOSystem, const aiScene* pScene, const ExportProperties* pProperties)
+void ExportScene3DS(const char* pFile, IOSystem* pIOSystem, const aiScene* pScene, const ExportProperties* /*pProperties*/)
{
std::shared_ptr<IOStream> outfile (pIOSystem->Open(pFile, "wb"));
if(!outfile) {
@@ -184,7 +184,7 @@ void ExportScene3DS(const char* pFile, IOSystem* pIOSystem, const aiScene* pScen
} // end of namespace Assimp
// ------------------------------------------------------------------------------------------------
-Discreet3DSExporter:: Discreet3DSExporter(std::shared_ptr<IOStream> outfile, const aiScene* scene)
+Discreet3DSExporter:: Discreet3DSExporter(std::shared_ptr<IOStream> &outfile, const aiScene* scene)
: scene(scene)
, writer(outfile)
{
@@ -211,6 +211,12 @@ Discreet3DSExporter:: Discreet3DSExporter(std::shared_ptr<IOStream> outfile, con
}
// ------------------------------------------------------------------------------------------------
+Discreet3DSExporter::~Discreet3DSExporter() {
+ // empty
+}
+
+
+// ------------------------------------------------------------------------------------------------
int Discreet3DSExporter::WriteHierarchy(const aiNode& node, int seq, int sibling_level)
{
// 3DS scene hierarchy is serialized as in http://www.martinreddy.net/gfx/3d/3DS.spec
@@ -375,7 +381,7 @@ void Discreet3DSExporter::WriteTexture(const aiMaterial& mat, aiTextureType type
// TODO: handle embedded textures properly
if (path.data[0] == '*') {
- DefaultLogger::get()->error("Ignoring embedded texture for export: " + std::string(path.C_Str()));
+ ASSIMP_LOG_ERROR("Ignoring embedded texture for export: " + std::string(path.C_Str()));
return;
}
diff --git a/code/3DSExporter.h b/code/3DSExporter.h
index dd3c4d427..5db58a4cb 100644
--- a/code/3DSExporter.h
+++ b/code/3DSExporter.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -48,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <map>
#include <memory>
-#include "StreamWriter.h"
+#include <assimp/StreamWriter.h>
#include <assimp/material.h>
struct aiScene;
@@ -60,23 +61,21 @@ namespace Assimp
{
// ------------------------------------------------------------------------------------------------
-/** Helper class to export a given scene to a 3DS file. */
+/**
+ * @brief Helper class to export a given scene to a 3DS file.
+ */
// ------------------------------------------------------------------------------------------------
-class Discreet3DSExporter
-{
+class Discreet3DSExporter {
public:
- Discreet3DSExporter(std::shared_ptr<IOStream> outfile, const aiScene* pScene);
+ Discreet3DSExporter(std::shared_ptr<IOStream> &outfile, const aiScene* pScene);
+ ~Discreet3DSExporter();
private:
-
void WriteMeshes();
void WriteMaterials();
void WriteTexture(const aiMaterial& mat, aiTextureType type, uint16_t chunk_flags);
-
void WriteFaceMaterialChunk(const aiMesh& mesh);
-
int WriteHierarchy(const aiNode& node, int level, int sibling_level);
-
void WriteString(const std::string& s);
void WriteString(const aiString& s);
void WriteColor(const aiColor3D& color);
@@ -84,7 +83,6 @@ private:
void WritePercentChunk(double f);
private:
-
const aiScene* const scene;
StreamWriterLE writer;
@@ -95,6 +93,6 @@ private:
};
-}
+} // Namespace Assimp
-#endif
+#endif // AI_3DSEXPORTER_H_INC
diff --git a/code/3DSHelper.h b/code/3DSHelper.h
index d5a51dfb7..d67a7c14c 100644
--- a/code/3DSHelper.h
+++ b/code/3DSHelper.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -44,11 +45,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_3DSFILEHELPER_H_INC
#define AI_3DSFILEHELPER_H_INC
-
-#include "SpatialSort.h"
-#include "SmoothingGroups.h"
-#include "StringUtils.h"
-#include "qnan.h"
+#include <assimp/SpatialSort.h>
+#include <assimp/SmoothingGroups.h>
+#include <assimp/StringUtils.h>
+#include <assimp/qnan.h>
#include <assimp/material.h>
#include <assimp/camera.h>
#include <assimp/light.h>
@@ -58,22 +58,25 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace Assimp {
namespace D3DS {
-#include "./../include/assimp/Compiler/pushpack1.h"
+#include <assimp/Compiler/pushpack1.h>
// ---------------------------------------------------------------------------
/** Discreet3DS class: Helper class for loading 3ds files. Defines chunks
* and data structures.
*/
-class Discreet3DS
-{
+class Discreet3DS {
private:
- inline Discreet3DS() {}
+ Discreet3DS() AI_NO_EXCEPT {
+ // empty
+ }
-public:
+ ~Discreet3DS() {
+ // empty
+ }
+public:
//! data structure for a single chunk in a .3ds file
- struct Chunk
- {
+ struct Chunk {
uint16_t Flag;
uint32_t Size;
} PACK_STRUCT;
@@ -325,19 +328,17 @@ struct Face : public FaceWithSmoothingGroup
// ---------------------------------------------------------------------------
/** Helper structure representing a texture */
-struct Texture
-{
+struct Texture {
//! Default constructor
- Texture()
- : mOffsetU (0.0)
- , mOffsetV (0.0)
- , mScaleU (1.0)
- , mScaleV (1.0)
- , mRotation (0.0)
- , mMapMode (aiTextureMapMode_Wrap)
- , bPrivate()
- , iUVSrc (0)
- {
+ Texture() AI_NO_EXCEPT
+ : mOffsetU (0.0)
+ , mOffsetV (0.0)
+ , mScaleU (1.0)
+ , mScaleV (1.0)
+ , mRotation (0.0)
+ , mMapMode (aiTextureMapMode_Wrap)
+ , bPrivate()
+ , iUVSrc (0) {
mTextureBlend = get_qnan();
}
@@ -362,15 +363,20 @@ struct Texture
int iUVSrc;
};
-#include "./../include/assimp/Compiler/poppack1.h"
+#include <assimp/Compiler/poppack1.h>
// ---------------------------------------------------------------------------
/** Helper structure representing a 3ds material */
struct Material
{
- //! Default constructor. Builds a default name for the material
- Material()
- : mDiffuse ( ai_real( 0.6 ), ai_real( 0.6 ), ai_real( 0.6 ) ) // FIX ... we won't want object to be black
+ //! Default constructor has been deleted
+ Material() = delete;
+
+
+ //! Constructor with explicit name
+ explicit Material(const std::string &name)
+ : mName(name)
+ , mDiffuse ( ai_real( 0.6 ), ai_real( 0.6 ), ai_real( 0.6 ) ) // FIX ... we won't want object to be black
, mSpecularExponent ( ai_real( 0.0 ) )
, mShininessStrength ( ai_real( 1.0 ) )
, mShading(Discreet3DS::Gouraud)
@@ -378,13 +384,70 @@ struct Material
, mBumpHeight ( ai_real( 1.0 ) )
, mTwoSided (false)
{
- static int iCnt = 0;
+ }
+
+
+ Material(const Material &other) = default;
+ Material &operator=(const Material &other) = default;
+
+
+ //! Move constructor. This is explicitly written because MSVC doesn't support defaulting it
+ Material(Material &&other) AI_NO_EXCEPT
+ : mName(std::move(other.mName))
+ , mDiffuse(std::move(other.mDiffuse))
+ , mSpecularExponent(std::move(other.mSpecularExponent))
+ , mShininessStrength(std::move(other.mShininessStrength))
+ , mSpecular(std::move(other.mSpecular))
+ , mAmbient(std::move(other.mAmbient))
+ , mShading(std::move(other.mShading))
+ , mTransparency(std::move(other.mTransparency))
+ , sTexDiffuse(std::move(other.sTexDiffuse))
+ , sTexOpacity(std::move(other.sTexOpacity))
+ , sTexSpecular(std::move(other.sTexSpecular))
+ , sTexReflective(std::move(other.sTexReflective))
+ , sTexBump(std::move(other.sTexBump))
+ , sTexEmissive(std::move(other.sTexEmissive))
+ , sTexShininess(std::move(other.sTexShininess))
+ , mBumpHeight(std::move(other.mBumpHeight))
+ , mEmissive(std::move(other.mEmissive))
+ , sTexAmbient(std::move(other.sTexAmbient))
+ , mTwoSided(std::move(other.mTwoSided))
+ {
+ }
+
+
+ Material &operator=(Material &&other) AI_NO_EXCEPT {
+ if (this == &other) {
+ return *this;
+ }
+
+ mName = std::move(other.mName);
+ mDiffuse = std::move(other.mDiffuse);
+ mSpecularExponent = std::move(other.mSpecularExponent);
+ mShininessStrength = std::move(other.mShininessStrength),
+ mSpecular = std::move(other.mSpecular);
+ mAmbient = std::move(other.mAmbient);
+ mShading = std::move(other.mShading);
+ mTransparency = std::move(other.mTransparency);
+ sTexDiffuse = std::move(other.sTexDiffuse);
+ sTexOpacity = std::move(other.sTexOpacity);
+ sTexSpecular = std::move(other.sTexSpecular);
+ sTexReflective = std::move(other.sTexReflective);
+ sTexBump = std::move(other.sTexBump);
+ sTexEmissive = std::move(other.sTexEmissive);
+ sTexShininess = std::move(other.sTexShininess);
+ mBumpHeight = std::move(other.mBumpHeight);
+ mEmissive = std::move(other.mEmissive);
+ sTexAmbient = std::move(other.sTexAmbient);
+ mTwoSided = std::move(other.mTwoSided);
- char szTemp[128];
- ai_snprintf(szTemp, 128, "UNNAMED_%i",iCnt++);
- mName = szTemp;
+ return *this;
}
+
+ virtual ~Material() {}
+
+
//! Name of the material
std::string mName;
//! Diffuse color of the material
@@ -430,17 +493,16 @@ struct Material
/** Helper structure to represent a 3ds file mesh */
struct Mesh : public MeshWithSmoothingGroups<D3DS::Face>
{
- //! Default constructor
- Mesh()
- {
- static int iCnt = 0;
+ //! Default constructor has been deleted
+ Mesh() = delete;
- // Generate a default name for the mesh
- char szTemp[128];
- ai_snprintf(szTemp, 128, "UNNAMED_%i",iCnt++);
- mName = szTemp;
+ //! Constructor with explicit name
+ explicit Mesh(const std::string &name)
+ : mName(name)
+ {
}
+
//! Name of the mesh
std::string mName;
@@ -486,25 +548,22 @@ struct aiFloatKey
/** Helper structure to represent a 3ds file node */
struct Node
{
- Node():
- mParent(NULL)
- , mInstanceNumber(0)
- , mHierarchyPos (0)
- , mHierarchyIndex (0)
- , mInstanceCount (1)
+ Node() = delete;
+
+ explicit Node(const std::string &name)
+ : mParent(NULL)
+ , mName(name)
+ , mInstanceNumber(0)
+ , mHierarchyPos (0)
+ , mHierarchyIndex (0)
+ , mInstanceCount (1)
{
- static int iCnt = 0;
-
- // Generate a default name for the node
- char szTemp[128];
- ::ai_snprintf(szTemp, 128, "UNNAMED_%i",iCnt++);
- mName = szTemp;
-
aRotationKeys.reserve (20);
aPositionKeys.reserve (20);
aScalingKeys.reserve (20);
}
+
~Node()
{
for (unsigned int i = 0; i < mChildren.size();++i)
diff --git a/code/3DSLoader.cpp b/code/3DSLoader.cpp
index 522bec307..34066e44b 100644
--- a/code/3DSLoader.cpp
+++ b/code/3DSLoader.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -51,12 +52,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// internal headers
#include "3DSLoader.h"
-#include "Macros.h"
+#include <assimp/Macros.h>
#include <assimp/IOSystem.hpp>
#include <assimp/scene.h>
#include <assimp/DefaultLogger.hpp>
#include <assimp/importerdesc.h>
-#include "StringComparison.h"
+#include <assimp/StringComparison.h>
using namespace Assimp;
@@ -70,7 +71,7 @@ static const aiImporterDesc desc = {
0,
0,
0,
- "3ds prj"
+ "3ds prj"
};
@@ -105,29 +106,31 @@ static const aiImporterDesc desc = {
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
Discreet3DSImporter::Discreet3DSImporter()
- : stream(),
- mLastNodeIndex(),
- mCurrentNode(),
- mRootNode(),
- mScene(),
- mMasterScale(),
- bHasBG(),
- bIsPrj()
-{}
+: stream()
+, mLastNodeIndex()
+, mCurrentNode()
+, mRootNode()
+, mScene()
+, mMasterScale()
+, bHasBG()
+, bIsPrj() {
+ // empty
+}
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
-Discreet3DSImporter::~Discreet3DSImporter()
-{}
+Discreet3DSImporter::~Discreet3DSImporter() {
+ // empty
+}
// ------------------------------------------------------------------------------------------------
// Returns whether the class can handle the format of the given file.
-bool Discreet3DSImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
-{
+bool Discreet3DSImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const {
std::string extension = GetExtension(pFile);
- if(extension == "3ds" || extension == "prj" ) {
+ if(extension == "3ds" || extension == "prj") {
return true;
}
+
if (!extension.length() || checkSig) {
uint16_t token[3];
token[0] = 0x4d4d;
@@ -158,19 +161,21 @@ void Discreet3DSImporter::InternReadFile( const std::string& pFile,
aiScene* pScene, IOSystem* pIOHandler)
{
StreamReaderLE stream(pIOHandler->Open(pFile,"rb"));
- this->stream = &stream;
// We should have at least one chunk
if (stream.GetRemainingSize() < 16) {
throw DeadlyImportError("3DS file is either empty or corrupt: " + pFile);
}
+ this->stream = &stream;
// Allocate our temporary 3DS representation
- mScene = new D3DS::Scene();
+ D3DS::Scene _scene;
+ mScene = &_scene;
// Initialize members
+ D3DS::Node _rootNode("UNNAMED");
mLastNodeIndex = -1;
- mCurrentNode = new D3DS::Node();
+ mCurrentNode = &_rootNode;
mRootNode = mCurrentNode;
mRootNode->mHierarchyPos = -1;
mRootNode->mHierarchyIndex = -1;
@@ -190,7 +195,6 @@ void Discreet3DSImporter::InternReadFile( const std::string& pFile,
// file.
for (auto &mesh : mScene->mMeshes) {
if (mesh.mFaces.size() > 0 && mesh.mPositions.size() == 0) {
- delete mScene;
throw DeadlyImportError("3DS file contains faces but no vertices: " + pFile);
}
CheckIndices(mesh);
@@ -198,7 +202,7 @@ void Discreet3DSImporter::InternReadFile( const std::string& pFile,
ComputeNormalsWithSmoothingsGroups<D3DS::Face>(mesh);
}
- // Replace all occurrences of the default material with a
+ // Replace all occurences of the default material with a
// valid material. Generate it if no material containing
// DEFAULT in its name has been found in the file
ReplaceDefaultMaterial();
@@ -209,16 +213,14 @@ void Discreet3DSImporter::InternReadFile( const std::string& pFile,
ConvertScene(pScene);
// Generate the node graph for the scene. This is a little bit
- // tricky since we'll need to split some meshes into submeshes
+ // tricky since we'll need to split some meshes into sub-meshes
GenerateNodeGraph(pScene);
// Now apply the master scaling factor to the scene
ApplyMasterScale(pScene);
- // Delete our internal scene representation and the root
- // node, so the whole hierarchy will follow
- delete mRootNode;
- delete mScene;
+ // Our internal scene representation and the root
+ // node will be automatically deleted, so the whole hierarchy will follow
AI_DEBUG_INVALIDATE_PTR(mRootNode);
AI_DEBUG_INVALIDATE_PTR(mScene);
@@ -255,8 +257,9 @@ void Discreet3DSImporter::ReadChunk(Discreet3DS::Chunk* pcOut)
if (pcOut->Size - sizeof(Discreet3DS::Chunk) > stream->GetRemainingSize())
throw DeadlyImportError("Chunk is too large");
- if (pcOut->Size - sizeof(Discreet3DS::Chunk) > stream->GetRemainingSizeToLimit())
- DefaultLogger::get()->error("3DS: Chunk overflow");
+ if (pcOut->Size - sizeof(Discreet3DS::Chunk) > stream->GetRemainingSizeToLimit()) {
+ ASSIMP_LOG_ERROR("3DS: Chunk overflow");
+ }
}
// ------------------------------------------------------------------------------------------------
@@ -317,7 +320,7 @@ void Discreet3DSImporter::ParseEditorChunk()
// print the version number
char buff[10];
ASSIMP_itoa10(buff,stream->GetI2());
- DefaultLogger::get()->info(std::string("3DS file format version: ") + buff);
+ ASSIMP_LOG_INFO_F(std::string("3DS file format version: "), buff);
}
break;
};
@@ -346,7 +349,7 @@ void Discreet3DSImporter::ParseObjectChunk()
case Discreet3DS::CHUNK_MAT_MATERIAL:
// Add a new material to the list
- mScene->mMaterials.push_back(D3DS::Material());
+ mScene->mMaterials.push_back(D3DS::Material(std::string("UNNAMED_" + to_string(mScene->mMaterials.size()))));
ParseMaterialChunk();
break;
@@ -358,7 +361,7 @@ void Discreet3DSImporter::ParseObjectChunk()
if (is_qnan(mClrAmbient.r))
{
// We failed to read the ambient base color.
- DefaultLogger::get()->error("3DS: Failed to read ambient base color");
+ ASSIMP_LOG_ERROR("3DS: Failed to read ambient base color");
mClrAmbient.r = mClrAmbient.g = mClrAmbient.b = 0.0f;
}
break;
@@ -402,11 +405,7 @@ void Discreet3DSImporter::ParseChunk(const char* name, unsigned int num)
case Discreet3DS::CHUNK_TRIMESH:
{
// this starts a new triangle mesh
- mScene->mMeshes.push_back(D3DS::Mesh());
- D3DS::Mesh& m = mScene->mMeshes.back();
-
- // Setup the name of the mesh
- m.mName = std::string(name, num);
+ mScene->mMeshes.push_back(D3DS::Mesh(std::string(name, num)));
// Read mesh chunks
ParseMeshChunk();
@@ -464,7 +463,7 @@ void Discreet3DSImporter::ParseChunk(const char* name, unsigned int num)
if (len < 1e-5) {
// There are some files with lookat == position. Don't know why or whether it's ok or not.
- DefaultLogger::get()->error("3DS: Unable to read proper camera look-at vector");
+ ASSIMP_LOG_ERROR("3DS: Unable to read proper camera look-at vector");
camera->mLookAt = aiVector3D(0.0,1.0,0.0);
}
@@ -630,9 +629,9 @@ void Discreet3DSImporter::SkipTCBInfo()
if (!flags) {
// Currently we can't do anything with these values. They occur
// quite rare, so it wouldn't be worth the effort implementing
- // them. 3DS ist not really suitable for complex animations,
+ // them. 3DS is not really suitable for complex animations,
// so full support is not required.
- DefaultLogger::get()->warn("3DS: Skipping TCB animation info");
+ ASSIMP_LOG_WARN("3DS: Skipping TCB animation info");
}
if (flags & Discreet3DS::KEY_USE_TENS) {
@@ -690,8 +689,7 @@ void Discreet3DSImporter::ParseHierarchyChunk(uint16_t parent)
pcNode->mInstanceCount++;
instanceNumber = pcNode->mInstanceCount;
}
- pcNode = new D3DS::Node();
- pcNode->mName = name;
+ pcNode = new D3DS::Node(name);
pcNode->mInstanceNumber = instanceNumber;
// There are two unknown values which we can safely ignore
@@ -734,7 +732,6 @@ void Discreet3DSImporter::ParseHierarchyChunk(uint16_t parent)
// If object name is DUMMY, take this one instead
if (mCurrentNode->mName == "$$$DUMMY") {
- //DefaultLogger::get()->warn("3DS: Skipping dummy object name for non-dummy object");
mCurrentNode->mName = std::string(sz);
break;
}
@@ -745,7 +742,7 @@ void Discreet3DSImporter::ParseHierarchyChunk(uint16_t parent)
if ( Discreet3DS::CHUNK_TRACKINFO != parent)
{
- DefaultLogger::get()->warn("3DS: Skipping pivot subchunk for non usual object");
+ ASSIMP_LOG_WARN("3DS: Skipping pivot subchunk for non usual object");
break;
}
@@ -807,7 +804,7 @@ void Discreet3DSImporter::ParseHierarchyChunk(uint16_t parent)
{
// roll keys are accepted for cameras only
if (parent != Discreet3DS::CHUNK_TRACKCAMERA) {
- DefaultLogger::get()->warn("3DS: Ignoring roll track for non-camera object");
+ ASSIMP_LOG_WARN("3DS: Ignoring roll track for non-camera object");
break;
}
bool sortKeys = false;
@@ -847,7 +844,7 @@ void Discreet3DSImporter::ParseHierarchyChunk(uint16_t parent)
// CAMERA FOV KEYFRAME
case Discreet3DS::CHUNK_TRACKFOV:
{
- DefaultLogger::get()->error("3DS: Skipping FOV animation track. "
+ ASSIMP_LOG_ERROR("3DS: Skipping FOV animation track. "
"This is not supported");
}
break;
@@ -987,7 +984,7 @@ void Discreet3DSImporter::ParseFaceChunk()
}
}
if (0xcdcdcdcd == idx) {
- DefaultLogger::get()->error(std::string("3DS: Unknown material: ") + sz);
+ ASSIMP_LOG_ERROR_F( "3DS: Unknown material: ", sz);
}
// Now continue and read all material indices
@@ -997,7 +994,7 @@ void Discreet3DSImporter::ParseFaceChunk()
// check range
if (fidx >= mMesh.mFaceMaterials.size()) {
- DefaultLogger::get()->error("3DS: Invalid face index in face material list");
+ ASSIMP_LOG_ERROR("3DS: Invalid face index in face material list");
}
else mMesh.mFaceMaterials[fidx] = idx;
}}
@@ -1112,7 +1109,7 @@ void Discreet3DSImporter::ParseMaterialChunk()
if (!cnt) {
// This may not be, we use the default name instead
- DefaultLogger::get()->error("3DS: Empty material name");
+ ASSIMP_LOG_ERROR("3DS: Empty material name");
}
else mScene->mMaterials.back().mName = std::string(sz,cnt);
}
@@ -1125,7 +1122,7 @@ void Discreet3DSImporter::ParseMaterialChunk()
ParseColorChunk(pc);
if (is_qnan(pc->r)) {
// color chunk is invalid. Simply ignore it
- DefaultLogger::get()->error("3DS: Unable to read DIFFUSE chunk");
+ ASSIMP_LOG_ERROR("3DS: Unable to read DIFFUSE chunk");
pc->r = pc->g = pc->b = 1.0f;
}}
break;
@@ -1137,7 +1134,7 @@ void Discreet3DSImporter::ParseMaterialChunk()
ParseColorChunk(pc);
if (is_qnan(pc->r)) {
// color chunk is invalid. Simply ignore it
- DefaultLogger::get()->error("3DS: Unable to read SPECULAR chunk");
+ ASSIMP_LOG_ERROR("3DS: Unable to read SPECULAR chunk");
pc->r = pc->g = pc->b = 1.0f;
}}
break;
@@ -1149,7 +1146,7 @@ void Discreet3DSImporter::ParseMaterialChunk()
ParseColorChunk(pc);
if (is_qnan(pc->r)) {
// color chunk is invalid. Simply ignore it
- DefaultLogger::get()->error("3DS: Unable to read AMBIENT chunk");
+ ASSIMP_LOG_ERROR("3DS: Unable to read AMBIENT chunk");
pc->r = pc->g = pc->b = 0.0f;
}}
break;
@@ -1161,7 +1158,7 @@ void Discreet3DSImporter::ParseMaterialChunk()
ParseColorChunk(pc);
if (is_qnan(pc->r)) {
// color chunk is invalid. Simply ignore it
- DefaultLogger::get()->error("3DS: Unable to read EMISSIVE chunk");
+ ASSIMP_LOG_ERROR("3DS: Unable to read EMISSIVE chunk");
pc->r = pc->g = pc->b = 0.0f;
}}
break;
@@ -1295,7 +1292,7 @@ void Discreet3DSImporter::ParseTextureChunk(D3DS::Texture* pcOut)
pcOut->mScaleU = stream->GetF4();
if (0.0f == pcOut->mScaleU)
{
- DefaultLogger::get()->warn("Texture coordinate scaling in the x direction is zero. Assuming 1.");
+ ASSIMP_LOG_WARN("Texture coordinate scaling in the x direction is zero. Assuming 1.");
pcOut->mScaleU = 1.0f;
}
break;
@@ -1304,7 +1301,7 @@ void Discreet3DSImporter::ParseTextureChunk(D3DS::Texture* pcOut)
pcOut->mScaleV = stream->GetF4();
if (0.0f == pcOut->mScaleV)
{
- DefaultLogger::get()->warn("Texture coordinate scaling in the y direction is zero. Assuming 1.");
+ ASSIMP_LOG_WARN("Texture coordinate scaling in the y direction is zero. Assuming 1.");
pcOut->mScaleV = 1.0f;
}
break;
@@ -1381,7 +1378,7 @@ void Discreet3DSImporter::ParseColorChunk( aiColor3D* out, bool acceptPercent )
bGamma = true;
case Discreet3DS::CHUNK_RGBF:
- if (sizeof(ai_real) * 3 > diff) {
+ if (sizeof(float) * 3 > diff) {
*out = clrError;
return;
}
diff --git a/code/3DSLoader.h b/code/3DSLoader.h
index 0e377180b..eb311a81b 100644
--- a/code/3DSLoader.h
+++ b/code/3DSLoader.h
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -46,13 +47,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_3DSIMPORTER_H_INC
#define AI_3DSIMPORTER_H_INC
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
#include <assimp/types.h>
#ifndef ASSIMP_BUILD_NO_3DS_IMPORTER
#include "3DSHelper.h"
-#include "StreamReader.h"
+#include <assimp/StreamReader.h>
struct aiNode;
diff --git a/code/3MFXmlTags.h b/code/3MFXmlTags.h
new file mode 100644
index 000000000..e869c33c1
--- /dev/null
+++ b/code/3MFXmlTags.h
@@ -0,0 +1,104 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2018, assimp 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 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.
+
+----------------------------------------------------------------------
+*/
+#pragma once
+
+namespace Assimp {
+namespace D3MF {
+
+namespace XmlTag {
+ // Meta-data
+ static const std::string meta = "metadata";
+ static const std::string meta_name = "name";
+
+ // Model-data specific tags
+ static const std::string model = "model";
+ static const std::string model_unit = "unit";
+ static const std::string metadata = "metadata";
+ static const std::string resources = "resources";
+ static const std::string object = "object";
+ static const std::string mesh = "mesh";
+ static const std::string vertices = "vertices";
+ static const std::string vertex = "vertex";
+ static const std::string triangles = "triangles";
+ static const std::string triangle = "triangle";
+ static const std::string x = "x";
+ static const std::string y = "y";
+ static const std::string z = "z";
+ static const std::string v1 = "v1";
+ static const std::string v2 = "v2";
+ static const std::string v3 = "v3";
+ static const std::string id = "id";
+ static const std::string pid = "pid";
+ static const std::string p1 = "p1";
+ static const std::string name = "name";
+ static const std::string type = "type";
+ static const std::string build = "build";
+ static const std::string item = "item";
+ static const std::string objectid = "objectid";
+ static const std::string transform = "transform";
+
+ // Material definitions
+ static const std::string basematerials = "basematerials";
+ static const std::string basematerials_id = "id";
+ static const std::string basematerials_base = "base";
+ static const std::string basematerials_name = "name";
+ static const std::string basematerials_displaycolor = "displaycolor";
+
+ // Meta info tags
+ static const std::string CONTENT_TYPES_ARCHIVE = "[Content_Types].xml";
+ static const std::string ROOT_RELATIONSHIPS_ARCHIVE = "_rels/.rels";
+ static const std::string SCHEMA_CONTENTTYPES = "http://schemas.openxmlformats.org/package/2006/content-types";
+ static const std::string SCHEMA_RELATIONSHIPS = "http://schemas.openxmlformats.org/package/2006/relationships";
+ static const std::string RELS_RELATIONSHIP_CONTAINER = "Relationships";
+ static const std::string RELS_RELATIONSHIP_NODE = "Relationship";
+ static const std::string RELS_ATTRIB_TARGET = "Target";
+ static const std::string RELS_ATTRIB_TYPE = "Type";
+ static const std::string RELS_ATTRIB_ID = "Id";
+ static const std::string PACKAGE_START_PART_RELATIONSHIP_TYPE = "http://schemas.microsoft.com/3dmanufacturing/2013/01/3dmodel";
+ static const std::string PACKAGE_PRINT_TICKET_RELATIONSHIP_TYPE = "http://schemas.microsoft.com/3dmanufacturing/2013/01/printticket";
+ static const std::string PACKAGE_TEXTURE_RELATIONSHIP_TYPE = "http://schemas.microsoft.com/3dmanufacturing/2013/01/3dtexture";
+ static const std::string PACKAGE_CORE_PROPERTIES_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties";
+ static const std::string PACKAGE_THUMBNAIL_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail";
+}
+
+} // Namespace D3MF
+} // Namespace Assimp
diff --git a/code/ACLoader.cpp b/code/ACLoader.cpp
index a30baa75a..7b8afbe9b 100644
--- a/code/ACLoader.cpp
+++ b/code/ACLoader.cpp
@@ -4,7 +4,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -49,11 +50,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// internal headers
#include "ACLoader.h"
-#include "ParsingUtils.h"
-#include "fast_atof.h"
-#include "Subdivision.h"
+#include <assimp/ParsingUtils.h>
+#include <assimp/fast_atof.h>
+#include <assimp/Subdivision.h>
#include "Importer.h"
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
#include <assimp/Importer.hpp>
#include <assimp/light.h>
#include <assimp/DefaultLogger.hpp>
@@ -84,7 +85,7 @@ static const aiImporterDesc desc = {
#define AI_AC_SKIP_TO_NEXT_TOKEN() \
if (!SkipSpaces(&buffer)) \
{ \
- DefaultLogger::get()->error("AC3D: Unexpected EOF/EOL"); \
+ ASSIMP_LOG_ERROR("AC3D: Unexpected EOF/EOL"); \
continue; \
}
@@ -100,7 +101,7 @@ static const aiImporterDesc desc = {
{ \
if (IsLineEnd( *buffer )) \
{ \
- DefaultLogger::get()->error("AC3D: Unexpected EOF/EOL in string"); \
+ ASSIMP_LOG_ERROR("AC3D: Unexpected EOF/EOL in string"); \
out = "ERROR"; \
break; \
} \
@@ -119,7 +120,7 @@ static const aiImporterDesc desc = {
{ \
if (strncmp(buffer,name,name_length) || !IsSpace(buffer[name_length])) \
{ \
- DefaultLogger::get()->error("AC3D: Unexpexted token. " name " was expected."); \
+ ASSIMP_LOG_ERROR("AC3D: Unexpexted token. " name " was expected."); \
continue; \
} \
buffer += name_length+1; \
@@ -216,7 +217,7 @@ void AC3DImporter::LoadObjectSection(std::vector<Object>& objects)
light->mName.length = ::ai_snprintf(light->mName.data, MAXLEN, "ACLight_%i",static_cast<unsigned int>(mLights->size())-1);
obj.name = std::string( light->mName.data );
- DefaultLogger::get()->debug("AC3D: Light source encountered");
+ ASSIMP_LOG_DEBUG("AC3D: Light source encountered");
obj.type = Object::Light;
}
else if (!ASSIMP_strincmp(buffer,"group",5))
@@ -306,12 +307,12 @@ void AC3DImporter::LoadObjectSection(std::vector<Object>& objects)
{
if (!GetNextLine())
{
- DefaultLogger::get()->error("AC3D: Unexpected EOF: not all vertices have been parsed yet");
+ ASSIMP_LOG_ERROR("AC3D: Unexpected EOF: not all vertices have been parsed yet");
break;
}
else if (!IsNumeric(*buffer))
{
- DefaultLogger::get()->error("AC3D: Unexpected token: not all vertices have been parsed yet");
+ ASSIMP_LOG_ERROR("AC3D: Unexpected token: not all vertices have been parsed yet");
--buffer; // make sure the line is processed a second time
break;
}
@@ -337,8 +338,8 @@ void AC3DImporter::LoadObjectSection(std::vector<Object>& objects)
// example writes no surf chunks
if (!Q3DWorkAround)
{
- DefaultLogger::get()->warn("AC3D: SURF token was expected");
- DefaultLogger::get()->debug("Continuing with Quick3D Workaround enabled");
+ ASSIMP_LOG_WARN("AC3D: SURF token was expected");
+ ASSIMP_LOG_DEBUG("Continuing with Quick3D Workaround enabled");
}
--buffer; // make sure the line is processed a second time
// break; --- see fix notes above
@@ -383,7 +384,7 @@ void AC3DImporter::LoadObjectSection(std::vector<Object>& objects)
{
if(!GetNextLine())
{
- DefaultLogger::get()->error("AC3D: Unexpected EOF: surface references are incomplete");
+ ASSIMP_LOG_ERROR("AC3D: Unexpected EOF: surface references are incomplete");
break;
}
surf.entries.push_back(Surface::SurfaceEntry());
@@ -404,7 +405,7 @@ void AC3DImporter::LoadObjectSection(std::vector<Object>& objects)
}
}
}
- DefaultLogger::get()->error("AC3D: Unexpected EOF: \'kids\' line was expected");
+ ASSIMP_LOG_ERROR("AC3D: Unexpected EOF: \'kids\' line was expected");
}
// ------------------------------------------------------------------------------------------------
@@ -477,7 +478,7 @@ aiNode* AC3DImporter::ConvertObjectSection(Object& object,
therefore: if no surfaces are defined return point data only
*/
- DefaultLogger::get()->info("AC3D: No surfaces defined in object definition, "
+ ASSIMP_LOG_INFO("AC3D: No surfaces defined in object definition, "
"a point list is returned");
meshes.push_back(new aiMesh());
@@ -518,12 +519,12 @@ aiNode* AC3DImporter::ConvertObjectSection(Object& object,
unsigned int idx = (*it).mat;
if (idx >= needMat.size())
{
- DefaultLogger::get()->error("AC3D: material index is out of range");
+ ASSIMP_LOG_ERROR("AC3D: material index is out of range");
idx = 0;
}
if ((*it).entries.empty())
{
- DefaultLogger::get()->warn("AC3D: surface her zero vertex references");
+ ASSIMP_LOG_WARN("AC3D: surface her zero vertex references");
}
// validate all vertex indices to make sure we won't crash here
@@ -532,7 +533,7 @@ aiNode* AC3DImporter::ConvertObjectSection(Object& object,
{
if ((*it2).first >= object.vertices.size())
{
- DefaultLogger::get()->warn("AC3D: Invalid vertex reference");
+ ASSIMP_LOG_WARN("AC3D: Invalid vertex reference");
(*it2).first = 0;
}
}
@@ -560,7 +561,7 @@ aiNode* AC3DImporter::ConvertObjectSection(Object& object,
if ((*it).flags & 0xf)
{
- DefaultLogger::get()->warn("AC3D: The type flag of a surface is unknown");
+ ASSIMP_LOG_WARN("AC3D: The type flag of a surface is unknown");
(*it).flags &= ~(0xf);
}
@@ -711,7 +712,7 @@ aiNode* AC3DImporter::ConvertObjectSection(Object& object,
if (object.subDiv) {
if (configEvalSubdivision) {
std::unique_ptr<Subdivider> div(Subdivider::Create(Subdivider::CATMULL_CLARKE));
- DefaultLogger::get()->info("AC3D: Evaluating subdivision surface: "+object.name);
+ ASSIMP_LOG_INFO("AC3D: Evaluating subdivision surface: "+object.name);
std::vector<aiMesh*> cpy(meshes.size()-oldm,NULL);
div->Subdivide(&meshes[oldm],cpy.size(),&cpy.front(),object.subDiv,true);
@@ -720,7 +721,7 @@ aiNode* AC3DImporter::ConvertObjectSection(Object& object,
// previous meshes are deleted vy Subdivide().
}
else {
- DefaultLogger::get()->info("AC3D: Letting the subdivision surface untouched due to my configuration: "
+ ASSIMP_LOG_INFO("AC3D: Letting the subdivision surface untouched due to my configuration: "
+object.name);
}
}
@@ -812,7 +813,7 @@ void AC3DImporter::InternReadFile( const std::string& pFile,
unsigned int version = HexDigitToDecimal( buffer[4] );
char msg[3];
ASSIMP_itoa10(msg,3,version);
- DefaultLogger::get()->info(std::string("AC3D file format version: ") + msg);
+ ASSIMP_LOG_INFO_F("AC3D file format version: ", msg);
std::vector<Material> materials;
materials.reserve(5);
@@ -856,7 +857,7 @@ void AC3DImporter::InternReadFile( const std::string& pFile,
}
if (materials.empty())
{
- DefaultLogger::get()->warn("AC3D: No material has been found");
+ ASSIMP_LOG_WARN("AC3D: No material has been found");
materials.push_back(Material());
}
diff --git a/code/ACLoader.h b/code/ACLoader.h
index 4b202b77a..86af9afb6 100644
--- a/code/ACLoader.h
+++ b/code/ACLoader.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -47,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <vector>
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
#include <assimp/types.h>
struct aiNode;
diff --git a/code/AMFImporter.cpp b/code/AMFImporter.cpp
index e9211fe53..e5b41b3ad 100644
--- a/code/AMFImporter.cpp
+++ b/code/AMFImporter.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -51,7 +52,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "AMFImporter.hpp"
#include "AMFImporter_Macro.hpp"
-#include "fast_atof.h"
+#include <assimp/fast_atof.h>
#include <assimp/DefaultIOSystem.h>
// Header files, stdlib.
@@ -229,7 +230,7 @@ casu_cres:
if(!skipped_before[sk_idx])
{
skipped_before[sk_idx] = true;
- LogWarning("Skipping node \"" + nn + "\" in " + pParentNodeName + ".");
+ ASSIMP_LOG_WARN_F("Skipping node \"", nn, "\" in ", pParentNodeName, ".");
}
}
diff --git a/code/AMFImporter.hpp b/code/AMFImporter.hpp
index 561ec3c8f..b7e58362c 100644
--- a/code/AMFImporter.hpp
+++ b/code/AMFImporter.hpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -56,14 +57,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/DefaultLogger.hpp>
#include <assimp/importerdesc.h>
#include "assimp/types.h"
-#include "BaseImporter.h"
-#include "irrXMLWrapper.h"
+#include <assimp/BaseImporter.h>
+#include <assimp/irrXMLWrapper.h>
// Header files, stdlib.
#include <set>
-namespace Assimp
-{
+namespace Assimp {
+
/// \class AMFImporter
/// Class that holding scene graph which include: geometry, metadata, materials etc.
///
@@ -98,100 +99,49 @@ namespace Assimp
/// new - <texmap> and children <utex1>, <utex2>, <utex3>, <vtex1>, <vtex2>, <vtex3>
/// old - <map> and children <u1>, <u2>, <u3>, <v1>, <v2>, <v3>
///
-class AMFImporter : public BaseImporter
-{
- /***********************************************/
- /******************** Types ********************/
- /***********************************************/
-
-private:
-
- struct SPP_Material;// forward declaration
-
- /// \struct SPP_Composite
- /// Data type for postprocessing step. More suitable container for part of material's composition.
- struct SPP_Composite
- {
- SPP_Material* Material;///< Pointer to material - part of composition.
- std::string Formula;///< Formula for calculating ratio of \ref Material.
- };
-
- /// \struct SPP_Material
- /// Data type for postprocessing step. More suitable container for material.
- struct SPP_Material
- {
- std::string ID;///< Material ID.
- std::list<CAMFImporter_NodeElement_Metadata*> Metadata;///< Metadata of material.
- CAMFImporter_NodeElement_Color* Color;///< Color of material.
- std::list<SPP_Composite> Composition;///< List of child materials if current material is composition of few another.
-
- /// \fn aiColor4D GetColor(const float pX, const float pY, const float pZ) const
- /// Return color calculated for specified coordinate.
- /// \param [in] pX - "x" coordinate.
- /// \param [in] pY - "y" coordinate.
- /// \param [in] pZ - "z" coordinate.
- /// \return calculated color.
- aiColor4D GetColor(const float pX, const float pY, const float pZ) const;
- };
-
- /// \struct SPP_Texture
- /// Data type for post-processing step. More suitable container for texture.
- struct SPP_Texture
- {
- std::string ID;
- size_t Width, Height, Depth;
- bool Tiled;
- char FormatHint[ 9 ];// 8 for string + 1 for terminator.
- uint8_t *Data;
- };
-
- /// \struct SComplexFace
- /// Data type for post-processing step. Contain face data.
- struct SComplexFace
- {
- aiFace Face;///< Face vertices.
- const CAMFImporter_NodeElement_Color* Color;///< Face color. Equal to nullptr if color is not set for the face.
- const CAMFImporter_NodeElement_TexMap* TexMap;///< Face texture mapping data. Equal to nullptr if texture mapping is not set for the face.
- };
-
-
-
- /***********************************************/
- /****************** Constants ******************/
- /***********************************************/
-
+class AMFImporter : public BaseImporter {
private:
+ struct SPP_Material;// forward declaration
+
+ /// \struct SPP_Composite
+ /// Data type for post-processing step. More suitable container for part of material's composition.
+ struct SPP_Composite {
+ SPP_Material* Material;///< Pointer to material - part of composition.
+ std::string Formula;///< Formula for calculating ratio of \ref Material.
+ };
+
+ /// \struct SPP_Material
+ /// Data type for post-processing step. More suitable container for material.
+ struct SPP_Material {
+ std::string ID;///< Material ID.
+ std::list<CAMFImporter_NodeElement_Metadata*> Metadata;///< Metadata of material.
+ CAMFImporter_NodeElement_Color* Color;///< Color of material.
+ std::list<SPP_Composite> Composition;///< List of child materials if current material is composition of few another.
+
+ /// Return color calculated for specified coordinate.
+ /// \param [in] pX - "x" coordinate.
+ /// \param [in] pY - "y" coordinate.
+ /// \param [in] pZ - "z" coordinate.
+ /// \return calculated color.
+ aiColor4D GetColor(const float pX, const float pY, const float pZ) const;
+ };
+
+ /// Data type for post-processing step. More suitable container for texture.
+ struct SPP_Texture {
+ std::string ID;
+ size_t Width, Height, Depth;
+ bool Tiled;
+ char FormatHint[9];// 8 for string + 1 for terminator.
+ uint8_t *Data;
+ };
+
+ /// Data type for post-processing step. Contain face data.
+ struct SComplexFace {
+ aiFace Face;///< Face vertices.
+ const CAMFImporter_NodeElement_Color* Color;///< Face color. Equal to nullptr if color is not set for the face.
+ const CAMFImporter_NodeElement_TexMap* TexMap;///< Face texture mapping data. Equal to nullptr if texture mapping is not set for the face.
+ };
- static const aiImporterDesc Description;
-
- /***********************************************/
- /****************** Variables ******************/
- /***********************************************/
-
-private:
-
- CAMFImporter_NodeElement* mNodeElement_Cur;///< Current element.
- std::list<CAMFImporter_NodeElement*> mNodeElement_List;///< All elements of scene graph.
- irr::io::IrrXMLReader* mReader;///< Pointer to XML-reader object
- std::string mUnit;
- std::list<SPP_Material> mMaterial_Converted;///< List of converted materials for postprocessing step.
- std::list<SPP_Texture> mTexture_Converted;///< List of converted textures for postprocessing step.
-
- /***********************************************/
- /****************** Functions ******************/
- /***********************************************/
-
-private:
-
- /// \fn AMFImporter(const AMFImporter& pScene)
- /// Disabled copy constructor.
- AMFImporter(const AMFImporter& pScene);
-
- /// \fn AMFImporter& operator=(const AMFImporter& pScene)
- /// Disabled assign operator.
- AMFImporter& operator=(const AMFImporter& pScene);
-
- /// \fn void Clear()
/// Clear all temporary data.
void Clear();
@@ -199,7 +149,6 @@ private:
/************* Functions: find set *************/
/***********************************************/
- /// \fn bool Find_NodeElement(const std::string& pID, const CAMFImporter_NodeElement::EType pType, aiNode** pNode) const
/// Find specified node element in node elements list ( \ref mNodeElement_List).
/// \param [in] pID - ID(name) of requested node element.
/// \param [in] pType - type of node element.
@@ -207,7 +156,6 @@ private:
/// \return true - if the node element is found, else - false.
bool Find_NodeElement(const std::string& pID, const CAMFImporter_NodeElement::EType pType, CAMFImporter_NodeElement** pNodeElement) const;
- /// \fn bool Find_ConvertedNode(const std::string& pID, std::list<aiNode*>& pNodeList, aiNode** pNode) const
/// Find requested aiNode in node list.
/// \param [in] pID - ID(name) of requested node.
/// \param [in] pNodeList - list of nodes where to find the node.
@@ -215,15 +163,13 @@ private:
/// \return true - if the node is found, else - false.
bool Find_ConvertedNode(const std::string& pID, std::list<aiNode*>& pNodeList, aiNode** pNode) const;
- /// \fn bool Find_ConvertedMaterial(const std::string& pID, const SPP_Material** pConvertedMaterial) const
/// Find material in list for converted materials. Use at postprocessing step.
/// \param [in] pID - material ID.
/// \param [out] pConvertedMaterial - pointer to found converted material (\ref SPP_Material).
/// \return true - if the material is found, else - false.
bool Find_ConvertedMaterial(const std::string& pID, const SPP_Material** pConvertedMaterial) const;
- /// \fn bool Find_ConvertedTexture(const std::string& pID_R, const std::string& pID_G, const std::string& pID_B, const std::string& pID_A, uint32_t* pConvertedTextureIndex = nullptr) const
- /// Find texture in list of converted textures. Use at postprocessing step,
+ /// Find texture in list of converted textures. Use at postprocessing step,
/// \param [in] pID_R - ID of source "red" texture.
/// \param [in] pID_G - ID of source "green" texture.
/// \param [in] pID_B - ID of source "blue" texture.
@@ -234,11 +180,7 @@ private:
bool Find_ConvertedTexture(const std::string& pID_R, const std::string& pID_G, const std::string& pID_B, const std::string& pID_A,
uint32_t* pConvertedTextureIndex = nullptr) const;
- /***********************************************/
- /********* Functions: postprocess set **********/
- /***********************************************/
- /// \fn void PostprocessHelper_CreateMeshDataArray(const CAMFImporter_NodeElement_Mesh& pNodeElement, std::vector<aiVector3D>& pVertexCoordinateArray, std::vector<CAMFImporter_NodeElement_Color*>& pVertexColorArray) const
/// Get data stored in <vertices> and place it to arrays.
/// \param [in] pNodeElement - reference to node element which kept <object> data.
/// \param [in] pVertexCoordinateArray - reference to vertices coordinates kept in <vertices>.
@@ -247,9 +189,8 @@ private:
void PostprocessHelper_CreateMeshDataArray(const CAMFImporter_NodeElement_Mesh& pNodeElement, std::vector<aiVector3D>& pVertexCoordinateArray,
std::vector<CAMFImporter_NodeElement_Color*>& pVertexColorArray) const;
- /// \fn size_t PostprocessHelper_GetTextureID_Or_Create(const std::string& pID_R, const std::string& pID_G, const std::string& pID_B, const std::string& pID_A)
/// Return converted texture ID which related to specified source textures ID's. If converted texture does not exist then it will be created and ID on new
- /// converted texture will be returned. Convertion: set of textures from \ref CAMFImporter_NodeElement_Texture to one \ref SPP_Texture and place it
+ /// converted texture will be returned. Conversion: set of textures from \ref CAMFImporter_NodeElement_Texture to one \ref SPP_Texture and place it
/// to converted textures list.
/// Any of source ID's can be absent(empty string) or even one ID only specified. But at least one ID must be specified.
/// \param [in] pID_R - ID of source "red" texture.
@@ -259,27 +200,23 @@ private:
/// \return index of the texture in array of the converted textures.
size_t PostprocessHelper_GetTextureID_Or_Create(const std::string& pID_R, const std::string& pID_G, const std::string& pID_B, const std::string& pID_A);
- /// \fn void PostprocessHelper_SplitFacesByTextureID(std::list<SComplexFace>& pInputList, std::list<std::list<SComplexFace> > pOutputList_Separated)
/// Separate input list by texture IDs. This step is needed because aiMesh can contain mesh which is use only one texture (or set: diffuse, bump etc).
/// \param [in] pInputList - input list with faces. Some of them can contain color or texture mapping, or both of them, or nothing. Will be cleared after
/// processing.
/// \param [out] pOutputList_Separated - output list of the faces lists. Separated faces list by used texture IDs. Will be cleared before processing.
void PostprocessHelper_SplitFacesByTextureID(std::list<SComplexFace>& pInputList, std::list<std::list<SComplexFace> >& pOutputList_Separated);
- /// \fn void Postprocess_AddMetadata(const std::list<CAMFImporter_NodeElement_Metadata*>& pMetadataList, aiNode& pSceneNode) const
/// Check if child elements of node element is metadata and add it to scene node.
/// \param [in] pMetadataList - reference to list with collected metadata.
/// \param [out] pSceneNode - scene node in which metadata will be added.
void Postprocess_AddMetadata(const std::list<CAMFImporter_NodeElement_Metadata*>& pMetadataList, aiNode& pSceneNode) const;
- /// \fn void Postprocess_BuildNodeAndObject(const CAMFImporter_NodeElement_Object& pNodeElement, std::list<aiMesh*>& pMeshList, aiNode** pSceneNode)
/// To create aiMesh and aiNode for it from <object>.
/// \param [in] pNodeElement - reference to node element which kept <object> data.
/// \param [out] pMeshList - reference to a list with all aiMesh of the scene.
/// \param [out] pSceneNode - pointer to place where new aiNode will be created.
void Postprocess_BuildNodeAndObject(const CAMFImporter_NodeElement_Object& pNodeElement, std::list<aiMesh*>& pMeshList, aiNode** pSceneNode);
- /// \fn void Postprocess_BuildMeshSet(const CAMFImporter_NodeElement_Mesh& pNodeElement, const std::vector<aiVector3D>& pVertexCoordinateArray, const std::vector<CAMFImporter_NodeElement_Color*>& pVertexColorArray, const CAMFImporter_NodeElement_Color* pObjectColor, std::list<aiMesh*>& pMeshList, aiNode& pSceneNode)
/// Create mesh for every <volume> in <mesh>.
/// \param [in] pNodeElement - reference to node element which kept <mesh> data.
/// \param [in] pVertexCoordinateArray - reference to vertices coordinates for all <volume>'s.
@@ -293,27 +230,20 @@ private:
const std::vector<CAMFImporter_NodeElement_Color*>& pVertexColorArray, const CAMFImporter_NodeElement_Color* pObjectColor,
std::list<aiMesh*>& pMeshList, aiNode& pSceneNode);
- /// \fn void Postprocess_BuildMaterial(const CAMFImporter_NodeElement_Material& pMaterial)
/// Convert material from \ref CAMFImporter_NodeElement_Material to \ref SPP_Material.
/// \param [in] pMaterial - source CAMFImporter_NodeElement_Material.
void Postprocess_BuildMaterial(const CAMFImporter_NodeElement_Material& pMaterial);
- /// \fn void Postprocess_BuildConstellation(CAMFImporter_NodeElement_Constellation& pConstellation, std::list<aiNode*>& pNodeList) const
/// Create and add to aiNode's list new part of scene graph defined by <constellation>.
/// \param [in] pConstellation - reference to <constellation> node.
/// \param [out] pNodeList - reference to aiNode's list.
void Postprocess_BuildConstellation(CAMFImporter_NodeElement_Constellation& pConstellation, std::list<aiNode*>& pNodeList) const;
- /// \fn void Postprocess_BuildScene()
/// Build Assimp scene graph in aiScene from collected data.
/// \param [out] pScene - pointer to aiScene where tree will be built.
void Postprocess_BuildScene(aiScene* pScene);
- /***********************************************/
- /************* Functions: throw set ************/
- /***********************************************/
- /// \fn void Throw_CloseNotFound(const std::string& pNode)
/// Call that function when close tag of node not found and exception must be raised.
/// E.g.:
/// <amf>
@@ -323,19 +253,16 @@ private:
/// \param [in] pNode - node name in which exception happened.
void Throw_CloseNotFound(const std::string& pNode);
- /// \fn void Throw_IncorrectAttr(const std::string& pAttrName)
/// Call that function when attribute name is incorrect and exception must be raised.
/// \param [in] pAttrName - attribute name.
/// \throw DeadlyImportError.
void Throw_IncorrectAttr(const std::string& pAttrName);
- /// \fn void Throw_IncorrectAttrValue(const std::string& pAttrName)
/// Call that function when attribute value is incorrect and exception must be raised.
/// \param [in] pAttrName - attribute name.
/// \throw DeadlyImportError.
void Throw_IncorrectAttrValue(const std::string& pAttrName);
- /// \fn void Throw_MoreThanOnceDefined(const std::string& pNode, const std::string& pDescription)
/// Call that function when some type of nodes are defined twice or more when must be used only once and exception must be raised.
/// E.g.:
/// <object>
@@ -347,216 +274,158 @@ private:
/// \param [in] pDescription - message about error. E.g. what the node defined while exception raised.
void Throw_MoreThanOnceDefined(const std::string& pNodeType, const std::string& pDescription);
- /// \fn void Throw_ID_NotFound(const std::string& pID) const
/// Call that function when referenced element ID are not found in graph and exception must be raised.
/// \param [in] pID - ID of of element which not found.
/// \throw DeadlyImportError.
void Throw_ID_NotFound(const std::string& pID) const;
- /***********************************************/
- /************** Functions: LOG set *************/
- /***********************************************/
-
- /// \fn void LogInfo(const std::string& pMessage)
- /// Short variant for calling \ref DefaultLogger::get()->info()
- void LogInfo(const std::string& pMessage) { DefaultLogger::get()->info(pMessage); }
-
- /// \fn void LogWarning(const std::string& pMessage)
- /// Short variant for calling \ref DefaultLogger::get()->warn()
- void LogWarning(const std::string& pMessage) { DefaultLogger::get()->warn(pMessage); }
-
- /// \fn void LogError(const std::string& pMessage)
- /// Short variant for calling \ref DefaultLogger::get()->error()
- void LogError(const std::string& pMessage) { DefaultLogger::get()->error(pMessage); }
-
- /***********************************************/
- /************** Functions: XML set *************/
- /***********************************************/
-
- /// \fn void XML_CheckNode_MustHaveChildren()
/// Check if current node have children: <node>...</node>. If not then exception will throwed.
void XML_CheckNode_MustHaveChildren();
- /// \fn bool XML_CheckNode_NameEqual(const std::string& pNodeName)
- /// Chek if current node name is equal to pNodeName.
+ /// Check if current node name is equal to pNodeName.
/// \param [in] pNodeName - name for checking.
/// return true if current node name is equal to pNodeName, else - false.
bool XML_CheckNode_NameEqual(const std::string& pNodeName) { return mReader->getNodeName() == pNodeName; }
- /// \fn void XML_CheckNode_SkipUnsupported(const std::string& pParentNodeName)
/// Skip unsupported node and report about that. Depend on node name can be skipped begin tag of node all whole node.
/// \param [in] pParentNodeName - parent node name. Used for reporting.
void XML_CheckNode_SkipUnsupported(const std::string& pParentNodeName);
- /// \fn bool XML_SearchNode(const std::string& pNodeName)
/// Search for specified node in file. XML file read pointer(mReader) will point to found node or file end after search is end.
/// \param [in] pNodeName - requested node name.
/// return true - if node is found, else - false.
bool XML_SearchNode(const std::string& pNodeName);
- /// \fn bool XML_ReadNode_GetAttrVal_AsBool(const int pAttrIdx)
/// Read attribute value.
/// \param [in] pAttrIdx - attribute index (\ref mReader->getAttribute* set).
/// \return read data.
bool XML_ReadNode_GetAttrVal_AsBool(const int pAttrIdx);
- /// \fn float XML_ReadNode_GetAttrVal_AsFloat(const int pAttrIdx)
/// Read attribute value.
/// \param [in] pAttrIdx - attribute index (\ref mReader->getAttribute* set).
/// \return read data.
float XML_ReadNode_GetAttrVal_AsFloat(const int pAttrIdx);
- /// \fn uint32_t XML_ReadNode_GetAttrVal_AsU32(const int pAttrIdx)
/// Read attribute value.
/// \param [in] pAttrIdx - attribute index (\ref mReader->getAttribute* set).
/// \return read data.
uint32_t XML_ReadNode_GetAttrVal_AsU32(const int pAttrIdx);
- /// \fn float XML_ReadNode_GetVal_AsFloat()
/// Read node value.
/// \return read data.
float XML_ReadNode_GetVal_AsFloat();
- /// \fn uint32_t XML_ReadNode_GetVal_AsU32()
/// Read node value.
/// \return read data.
uint32_t XML_ReadNode_GetVal_AsU32();
- /// \fn void XML_ReadNode_GetVal_AsString(std::string& pValue)
/// Read node value.
/// \return read data.
void XML_ReadNode_GetVal_AsString(std::string& pValue);
- /***********************************************/
- /******** Functions: parse set private *********/
- /***********************************************/
-
- /// \fn void ParseHelper_Node_Enter(CAMFImporter_NodeElement* pNode)
/// Make pNode as current and enter deeper for parsing child nodes. At end \ref ParseHelper_Node_Exit must be called.
/// \param [in] pNode - new current node.
void ParseHelper_Node_Enter(CAMFImporter_NodeElement* pNode);
- /// \fn void ParseHelper_Group_End()
/// This function must be called when exiting from grouping node. \ref ParseHelper_Group_Begin.
void ParseHelper_Node_Exit();
- /// \fn void ParseHelper_FixTruncatedFloatString(const char* pInStr, std::string& pOutString)
/// Attribute values of floating point types can take form ".x"(without leading zero). irrXMLReader can not read this form of values and it
/// must be converted to right form - "0.xxx".
/// \param [in] pInStr - pointer to input string which can contain incorrect form of values.
/// \param [out[ pOutString - output string with right form of values.
void ParseHelper_FixTruncatedFloatString(const char* pInStr, std::string& pOutString);
- /// \fn void ParseHelper_Decode_Base64(const std::string& pInputBase64, std::vector<uint8_t>& pOutputData) const
/// Decode Base64-encoded data.
/// \param [in] pInputBase64 - reference to input Base64-encoded string.
/// \param [out] pOutputData - reference to output array for decoded data.
void ParseHelper_Decode_Base64(const std::string& pInputBase64, std::vector<uint8_t>& pOutputData) const;
- /// \fn void ParseNode_Root()
/// Parse <AMF> node of the file.
void ParseNode_Root();
- /******** Functions: top nodes *********/
-
- /// \fn void ParseNode_Constellation()
/// Parse <constellation> node of the file.
void ParseNode_Constellation();
- /// \fn void ParseNode_Constellation()
/// Parse <instance> node of the file.
void ParseNode_Instance();
- /// \fn void ParseNode_Material()
/// Parse <material> node of the file.
void ParseNode_Material();
- /// \fn void ParseNode_Metadata()
/// Parse <metadata> node.
void ParseNode_Metadata();
- /// \fn void ParseNode_Object()
/// Parse <object> node of the file.
void ParseNode_Object();
- /// \fn void ParseNode_Texture()
/// Parse <texture> node of the file.
void ParseNode_Texture();
- /******** Functions: geometry nodes *********/
-
- /// \fn void ParseNode_Coordinates()
/// Parse <coordinates> node of the file.
void ParseNode_Coordinates();
- /// \fn void ParseNode_Edge()
/// Parse <edge> node of the file.
void ParseNode_Edge();
- /// \fn void ParseNode_Mesh()
/// Parse <mesh> node of the file.
void ParseNode_Mesh();
- /// \fn void ParseNode_Triangle()
/// Parse <triangle> node of the file.
void ParseNode_Triangle();
- /// \fn void ParseNode_Vertex()
/// Parse <vertex> node of the file.
void ParseNode_Vertex();
- /// \fn void ParseNode_Vertices()
/// Parse <vertices> node of the file.
void ParseNode_Vertices();
- /// \fn void ParseNode_Volume()
/// Parse <volume> node of the file.
void ParseNode_Volume();
- /******** Functions: material nodes *********/
-
- /// \fn void ParseNode_Color()
/// Parse <color> node of the file.
void ParseNode_Color();
- /// \fn void ParseNode_TexMap(const bool pUseOldName = false)
/// Parse <texmap> of <map> node of the file.
/// \param [in] pUseOldName - if true then use old name of node(and children) - <map>, instead of new name - <texmap>.
void ParseNode_TexMap(const bool pUseOldName = false);
public:
-
- /// \fn AMFImporter()
/// Default constructor.
- AMFImporter()
- : mNodeElement_Cur(nullptr), mReader(nullptr)
- {}
+ AMFImporter() AI_NO_EXCEPT
+ : mNodeElement_Cur(nullptr)
+ , mReader(nullptr) {
+ // empty
+ }
- /// \fn ~AMFImporter()
/// Default destructor.
~AMFImporter();
- /***********************************************/
- /******** Functions: parse set, public *********/
- /***********************************************/
-
- /// \fn void ParseFile(const std::string& pFile, IOSystem* pIOHandler)
/// Parse AMF file and fill scene graph. The function has no return value. Result can be found by analyzing the generated graph.
- /// Also exception can be throwed if trouble will found.
+ /// Also exception can be thrown if trouble will found.
/// \param [in] pFile - name of file to be parsed.
/// \param [in] pIOHandler - pointer to IO helper object.
void ParseFile(const std::string& pFile, IOSystem* pIOHandler);
- /***********************************************/
- /********* Functions: BaseImporter set *********/
- /***********************************************/
-
bool CanRead(const std::string& pFile, IOSystem* pIOHandler, bool pCheckSig) const;
void GetExtensionList(std::set<std::string>& pExtensionList);
void InternReadFile(const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler);
const aiImporterDesc* GetInfo ()const;
-};// class AMFImporter
+ AMFImporter(const AMFImporter& pScene) = delete;
+ AMFImporter& operator=(const AMFImporter& pScene) = delete;
+
+private:
+ static const aiImporterDesc Description;
+
+ CAMFImporter_NodeElement* mNodeElement_Cur;///< Current element.
+ std::list<CAMFImporter_NodeElement*> mNodeElement_List;///< All elements of scene graph.
+ irr::io::IrrXMLReader* mReader;///< Pointer to XML-reader object
+ std::string mUnit;
+ std::list<SPP_Material> mMaterial_Converted;///< List of converted materials for postprocessing step.
+ std::list<SPP_Texture> mTexture_Converted;///< List of converted textures for postprocessing step.
+
+};
}// namespace Assimp
diff --git a/code/AMFImporter_Geometry.cpp b/code/AMFImporter_Geometry.cpp
index afba3f2bc..d4d648fbd 100644
--- a/code/AMFImporter_Geometry.cpp
+++ b/code/AMFImporter_Geometry.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/AMFImporter_Macro.hpp b/code/AMFImporter_Macro.hpp
index b7c0f9863..ea8c17850 100644
--- a/code/AMFImporter_Macro.hpp
+++ b/code/AMFImporter_Macro.hpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -70,7 +71,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
}
/// \def MACRO_ATTRREAD_CHECK_REF
-/// Check curent attribute name and if it equal to requested then read value. Result write to output variable by reference. If result was read then
+/// Check current attribute name and if it equal to requested then read value. Result write to output variable by reference. If result was read then
/// "continue" will called.
/// \param [in] pAttrName - attribute name.
/// \param [out] pVarName - output variable name.
@@ -83,7 +84,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
}
/// \def MACRO_ATTRREAD_CHECK_RET
-/// Check curent attribute name and if it equal to requested then read value. Result write to output variable using return value of \ref pFunction.
+/// Check current attribute name and if it equal to requested then read value. Result write to output variable using return value of \ref pFunction.
/// If result was read then "continue" will called.
/// \param [in] pAttrName - attribute name.
/// \param [out] pVarName - output variable name.
@@ -129,7 +130,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
} while(false)
/// \def MACRO_NODECHECK_READCOMP_F
-/// Check curent node name and if it equal to requested then read value. Result write to output variable of type "float".
+/// Check current node name and if it equal to requested then read value. Result write to output variable of type "float".
/// If result was read then "continue" will called. Also check if node data already read then raise exception.
/// \param [in] pNodeName - node name.
/// \param [in, out] pReadFlag - read flag.
@@ -146,7 +147,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
}
/// \def MACRO_NODECHECK_READCOMP_U32
-/// Check curent node name and if it equal to requested then read value. Result write to output variable of type "uint32_t".
+/// Check current node name and if it equal to requested then read value. Result write to output variable of type "uint32_t".
/// If result was read then "continue" will called. Also check if node data already read then raise exception.
/// \param [in] pNodeName - node name.
/// \param [in, out] pReadFlag - read flag.
diff --git a/code/AMFImporter_Material.cpp b/code/AMFImporter_Material.cpp
index d15099fac..c9190bb92 100644
--- a/code/AMFImporter_Material.cpp
+++ b/code/AMFImporter_Material.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -67,10 +68,9 @@ namespace Assimp
// Multi elements - No.
// Red, Greed, Blue and Alpha (transparency) component of a color in sRGB space, values ranging from 0 to 1. The
// values can be specified as constants, or as a formula depending on the coordinates.
-void AMFImporter::ParseNode_Color()
-{
-std::string profile;
-CAMFImporter_NodeElement* ne;
+void AMFImporter::ParseNode_Color() {
+ std::string profile;
+ CAMFImporter_NodeElement* ne;
// Read attributes for node <color>.
MACRO_ATTRREAD_LOOPBEG;
@@ -97,15 +97,19 @@ CAMFImporter_NodeElement* ne;
MACRO_NODECHECK_LOOPEND("color");
ParseHelper_Node_Exit();
// check that all components was defined
- if(!(read_flag[0] && read_flag[1] && read_flag[2])) throw DeadlyImportError("Not all color components are defined.");
- // check if <a> is absent. Then manualy add "a == 1".
- if(!read_flag[3]) als.Color.a = 1;
-
- }// if(!mReader->isEmptyElement())
+ if (!(read_flag[0] && read_flag[1] && read_flag[2])) {
+ throw DeadlyImportError("Not all color components are defined.");
+ }
+
+ // check if <a> is absent. Then manually add "a == 1".
+ if (!read_flag[3]) {
+ als.Color.a = 1;
+ }
+ }
else
{
mNodeElement_Cur->Child.push_back(ne);// Add element to child list of current element
- }// if(!mReader->isEmptyElement()) else
+ }
als.Composed = false;
mNodeElement_List.push_back(ne);// and to node element list because its a new object in graph.
@@ -118,10 +122,9 @@ CAMFImporter_NodeElement* ne;
// An available material.
// Multi elements - Yes.
// Parent element - <amf>.
-void AMFImporter::ParseNode_Material()
-{
-std::string id;
-CAMFImporter_NodeElement* ne;
+void AMFImporter::ParseNode_Material() {
+ std::string id;
+ CAMFImporter_NodeElement* ne;
// Read attributes for node <color>.
MACRO_ATTRREAD_LOOPBEG;
@@ -130,9 +133,11 @@ CAMFImporter_NodeElement* ne;
// create new object.
ne = new CAMFImporter_NodeElement_Material(mNodeElement_Cur);
- // and assign read data
+
+ // and assign read data
((CAMFImporter_NodeElement_Material*)ne)->ID = id;
- // Check for child nodes
+
+ // Check for child nodes
if(!mReader->isEmptyElement())
{
bool col_read = false;
@@ -153,11 +158,11 @@ CAMFImporter_NodeElement* ne;
if(XML_CheckNode_NameEqual("metadata")) { ParseNode_Metadata(); continue; }
MACRO_NODECHECK_LOOPEND("material");
ParseHelper_Node_Exit();
- }// if(!mReader->isEmptyElement())
+ }
else
{
mNodeElement_Cur->Child.push_back(ne);// Add element to child list of current element
- }// if(!mReader->isEmptyElement()) else
+ }
mNodeElement_List.push_back(ne);// and to node element list because its a new object in graph.
}
@@ -180,14 +185,13 @@ CAMFImporter_NodeElement* ne;
// Parent element - <amf>.
void AMFImporter::ParseNode_Texture()
{
-std::string id;
-uint32_t width = 0;
-uint32_t height = 0;
-uint32_t depth = 1;
-std::string type;
-bool tiled = false;
-std::string enc64_data;
-CAMFImporter_NodeElement* ne;
+ std::string id;
+ uint32_t width = 0;
+ uint32_t height = 0;
+ uint32_t depth = 1;
+ std::string type;
+ bool tiled = false;
+ std::string enc64_data;
// Read attributes for node <color>.
MACRO_ATTRREAD_LOOPBEG;
@@ -200,20 +204,34 @@ CAMFImporter_NodeElement* ne;
MACRO_ATTRREAD_LOOPEND;
// create new texture object.
- ne = new CAMFImporter_NodeElement_Texture(mNodeElement_Cur);
+ CAMFImporter_NodeElement *ne = new CAMFImporter_NodeElement_Texture(mNodeElement_Cur);
CAMFImporter_NodeElement_Texture& als = *((CAMFImporter_NodeElement_Texture*)ne);// alias for convenience
// Check for child nodes
- if(!mReader->isEmptyElement()) XML_ReadNode_GetVal_AsString(enc64_data);
+ if (!mReader->isEmptyElement()) {
+ XML_ReadNode_GetVal_AsString(enc64_data);
+ }
// check that all components was defined
- if(id.empty()) throw DeadlyImportError("ID for texture must be defined.");
- if(width < 1) Throw_IncorrectAttrValue("width");
- if(height < 1) Throw_IncorrectAttrValue("height");
- if(depth < 1) Throw_IncorrectAttrValue("depth");
- if(type != "grayscale") Throw_IncorrectAttrValue("type");
- if(enc64_data.empty()) throw DeadlyImportError("Texture data not defined.");
+ if (id.empty()) {
+ throw DeadlyImportError("ID for texture must be defined.");
+ }
+ if (width < 1) {
+ Throw_IncorrectAttrValue("width");
+ }
+ if (height < 1) {
+ Throw_IncorrectAttrValue("height");
+ }
+ if (depth < 1) {
+ Throw_IncorrectAttrValue("depth");
+ }
+ if (type != "grayscale") {
+ Throw_IncorrectAttrValue("type");
+ }
+ if (enc64_data.empty()) {
+ throw DeadlyImportError("Texture data not defined.");
+ }
// copy data
als.ID = id;
als.Width = width;
@@ -221,8 +239,11 @@ CAMFImporter_NodeElement* ne;
als.Depth = depth;
als.Tiled = tiled;
ParseHelper_Decode_Base64(enc64_data, als.Data);
- // check data size
- if((width * height * depth) != als.Data.size()) throw DeadlyImportError("Texture has incorrect data size.");
+
+ // check data size
+ if ((width * height * depth) != als.Data.size()) {
+ throw DeadlyImportError("Texture has incorrect data size.");
+ }
mNodeElement_Cur->Child.push_back(ne);// Add element to child list of current element
mNodeElement_List.push_back(ne);// and to node element list because its a new object in graph.
@@ -242,10 +263,8 @@ CAMFImporter_NodeElement* ne;
// <utex1>, <utex2>, <utex3>, <vtex1>, <vtex2>, <vtex3>. Old name: <u1>, <u2>, <u3>, <v1>, <v2>, <v3>.
// Multi elements - No.
// Texture coordinates for every vertex of triangle.
-void AMFImporter::ParseNode_TexMap(const bool pUseOldName)
-{
-std::string rtexid, gtexid, btexid, atexid;
-CAMFImporter_NodeElement* ne;
+void AMFImporter::ParseNode_TexMap(const bool pUseOldName) {
+ std::string rtexid, gtexid, btexid, atexid;
// Read attributes for node <color>.
MACRO_ATTRREAD_LOOPBEG;
@@ -256,7 +275,7 @@ CAMFImporter_NodeElement* ne;
MACRO_ATTRREAD_LOOPEND;
// create new texture coordinates object.
- ne = new CAMFImporter_NodeElement_TexMap(mNodeElement_Cur);
+ CAMFImporter_NodeElement *ne = new CAMFImporter_NodeElement_TexMap(mNodeElement_Cur);
CAMFImporter_NodeElement_TexMap& als = *((CAMFImporter_NodeElement_TexMap*)ne);// alias for convenience
// check data
diff --git a/code/AMFImporter_Node.hpp b/code/AMFImporter_Node.hpp
index cb8b0b66d..22b8f58cb 100644
--- a/code/AMFImporter_Node.hpp
+++ b/code/AMFImporter_Node.hpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -61,7 +62,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/// \class CAMFImporter_NodeElement
/// Base class for elements of nodes.
class CAMFImporter_NodeElement {
-
public:
/// Define what data type contain node element.
enum EType {
@@ -95,15 +95,11 @@ public: /// Destructor, virtual..
// empty
}
-private:
- /// Disabled copy constructor.
- CAMFImporter_NodeElement(const CAMFImporter_NodeElement& pNodeElement);
-
- /// Disabled assign operator.
- CAMFImporter_NodeElement& operator=(const CAMFImporter_NodeElement& pNodeElement);
-
- /// Disabled default constructor.
- CAMFImporter_NodeElement();
+ /// Disabled copy constructor and co.
+ CAMFImporter_NodeElement(const CAMFImporter_NodeElement& pNodeElement) = delete;
+ CAMFImporter_NodeElement(CAMFImporter_NodeElement&&) = delete;
+ CAMFImporter_NodeElement& operator=(const CAMFImporter_NodeElement& pNodeElement) = delete;
+ CAMFImporter_NodeElement() = delete;
protected:
/// In constructor inheritor must set element type.
@@ -120,9 +116,7 @@ protected:
/// \struct CAMFImporter_NodeElement_Constellation
/// A collection of objects or constellations with specific relative locations.
-struct CAMFImporter_NodeElement_Constellation : public CAMFImporter_NodeElement
-{
- /// \fn CAMFImporter_NodeElement_Constellation(CAMFImporter_NodeElement* pParent)
+struct CAMFImporter_NodeElement_Constellation : public CAMFImporter_NodeElement {
/// Constructor.
/// \param [in] pParent - pointer to parent node.
CAMFImporter_NodeElement_Constellation(CAMFImporter_NodeElement* pParent)
@@ -133,11 +127,9 @@ struct CAMFImporter_NodeElement_Constellation : public CAMFImporter_NodeElement
/// \struct CAMFImporter_NodeElement_Instance
/// Part of constellation.
-struct CAMFImporter_NodeElement_Instance : public CAMFImporter_NodeElement
-{
- /****************** Variables ******************/
+struct CAMFImporter_NodeElement_Instance : public CAMFImporter_NodeElement {
- std::string ObjectID;///< ID of object for instanciation.
+ std::string ObjectID;///< ID of object for instantiation.
/// \var Delta - The distance of translation in the x, y, or z direction, respectively, in the referenced object's coordinate system, to
/// create an instance of the object in the current constellation.
aiVector3D Delta;
@@ -146,237 +138,185 @@ struct CAMFImporter_NodeElement_Instance : public CAMFImporter_NodeElement
/// instance of the object in the current constellation. Rotations shall be executed in order of x first, then y, then z.
aiVector3D Rotation;
- /****************** Functions ******************/
-
- /// \fn CAMFImporter_NodeElement_Instance(CAMFImporter_NodeElement* pParent)
/// Constructor.
/// \param [in] pParent - pointer to parent node.
CAMFImporter_NodeElement_Instance(CAMFImporter_NodeElement* pParent)
: CAMFImporter_NodeElement(ENET_Instance, pParent)
{}
-
-};// struct CAMFImporter_NodeElement_Instance
+};
/// \struct CAMFImporter_NodeElement_Metadata
/// Structure that define metadata node.
-struct CAMFImporter_NodeElement_Metadata : public CAMFImporter_NodeElement
-{
- /****************** Variables ******************/
+struct CAMFImporter_NodeElement_Metadata : public CAMFImporter_NodeElement {
- std::string Type;///< Type of "Value".
+ std::string Type;///< Type of "Value".
std::string Value;///< Value.
- /****************** Functions ******************/
-
- /// \fn CAMFImporter_NodeElement_Metadata(CAMFImporter_NodeElement* pParent)
/// Constructor.
/// \param [in] pParent - pointer to parent node.
CAMFImporter_NodeElement_Metadata(CAMFImporter_NodeElement* pParent)
: CAMFImporter_NodeElement(ENET_Metadata, pParent)
{}
-
-};// struct CAMFImporter_NodeElement_Metadata
+};
/// \struct CAMFImporter_NodeElement_Root
/// Structure that define root node.
-struct CAMFImporter_NodeElement_Root : public CAMFImporter_NodeElement
-{
- /****************** Variables ******************/
+struct CAMFImporter_NodeElement_Root : public CAMFImporter_NodeElement {
std::string Unit;///< The units to be used. May be "inch", "millimeter", "meter", "feet", or "micron".
std::string Version;///< Version of format.
- /****************** Functions ******************/
-
- /// \fn CAMFImporter_NodeElement_Root(CAMFImporter_NodeElement* pParent)
/// Constructor.
/// \param [in] pParent - pointer to parent node.
CAMFImporter_NodeElement_Root(CAMFImporter_NodeElement* pParent)
: CAMFImporter_NodeElement(ENET_Root, pParent)
{}
-
-};// struct CAMFImporter_NodeElement_Root
+};
/// \struct CAMFImporter_NodeElement_Color
/// Structure that define object node.
-struct CAMFImporter_NodeElement_Color : public CAMFImporter_NodeElement
-{
- /****************** Variables ******************/
-
- bool Composed;///< Type of color stored: if true then look for formula in \ref Color_Composed[4], else - in \ref Color.
- std::string Color_Composed[4];///< By components formulas of composed color. [0..3] => RGBA.
- aiColor4D Color;///< Constant color.
- std::string Profile;///< The ICC color space used to interpret the three color channels <r>, <g> and <b>..
-
- /****************** Functions ******************/
-
- /// \fn CAMFImporter_NodeElement_Color(CAMFImporter_NodeElement* pParent)
- /// Constructor.
- /// \param [in] pParent - pointer to parent node.
+struct CAMFImporter_NodeElement_Color : public CAMFImporter_NodeElement {
+ bool Composed; ///< Type of color stored: if true then look for formula in \ref Color_Composed[4], else - in \ref Color.
+ std::string Color_Composed[4]; ///< By components formulas of composed color. [0..3] - RGBA.
+ aiColor4D Color; ///< Constant color.
+ std::string Profile; ///< The ICC color space used to interpret the three color channels r, g and b..
+
+ /// @brief Constructor.
+ /// @param [in] pParent - pointer to parent node.
CAMFImporter_NodeElement_Color(CAMFImporter_NodeElement* pParent)
- : CAMFImporter_NodeElement(ENET_Color, pParent)
- {}
-
-};// struct CAMFImporter_NodeElement_Color
+ : CAMFImporter_NodeElement(ENET_Color, pParent)
+ , Composed( false )
+ , Color()
+ , Profile() {
+ // empty
+ }
+};
/// \struct CAMFImporter_NodeElement_Material
/// Structure that define material node.
-struct CAMFImporter_NodeElement_Material : public CAMFImporter_NodeElement
-{
- /// \fn CAMFImporter_NodeElement_Material(CAMFImporter_NodeElement* pParent)
+struct CAMFImporter_NodeElement_Material : public CAMFImporter_NodeElement {
+
/// Constructor.
/// \param [in] pParent - pointer to parent node.
CAMFImporter_NodeElement_Material(CAMFImporter_NodeElement* pParent)
: CAMFImporter_NodeElement(ENET_Material, pParent)
{}
-};// struct CAMFImporter_NodeElement_Material
+};
/// \struct CAMFImporter_NodeElement_Object
/// Structure that define object node.
-struct CAMFImporter_NodeElement_Object : public CAMFImporter_NodeElement
-{
- /// \fn CAMFImporter_NodeElement_Object(CAMFImporter_NodeElement* pParent)
- /// Constructor.
+struct CAMFImporter_NodeElement_Object : public CAMFImporter_NodeElement {
+
+ /// Constructor.
/// \param [in] pParent - pointer to parent node.
CAMFImporter_NodeElement_Object(CAMFImporter_NodeElement* pParent)
: CAMFImporter_NodeElement(ENET_Object, pParent)
{}
-
-};// struct CAMFImporter_NodeElement_Object
+};
/// \struct CAMFImporter_NodeElement_Mesh
/// Structure that define mesh node.
-struct CAMFImporter_NodeElement_Mesh : public CAMFImporter_NodeElement
-{
- /// \fn CAMFImporter_NodeElement_Mesh(CAMFImporter_NodeElement* pParent)
+struct CAMFImporter_NodeElement_Mesh : public CAMFImporter_NodeElement {
/// Constructor.
/// \param [in] pParent - pointer to parent node.
CAMFImporter_NodeElement_Mesh(CAMFImporter_NodeElement* pParent)
: CAMFImporter_NodeElement(ENET_Mesh, pParent)
{}
-
-};// struct CAMFImporter_NodeElement_Mesh
+};
/// \struct CAMFImporter_NodeElement_Vertex
/// Structure that define vertex node.
-struct CAMFImporter_NodeElement_Vertex : public CAMFImporter_NodeElement
-{
- /// \fn CAMFImporter_NodeElement_Vertex(CAMFImporter_NodeElement* pParent)
+struct CAMFImporter_NodeElement_Vertex : public CAMFImporter_NodeElement {
/// Constructor.
/// \param [in] pParent - pointer to parent node.
CAMFImporter_NodeElement_Vertex(CAMFImporter_NodeElement* pParent)
: CAMFImporter_NodeElement(ENET_Vertex, pParent)
{}
-
-};// struct CAMFImporter_NodeElement_Vertex
+};
/// \struct CAMFImporter_NodeElement_Edge
/// Structure that define edge node.
-struct CAMFImporter_NodeElement_Edge : public CAMFImporter_NodeElement
-{
- /// \fn CAMFImporter_NodeElement_Edge(CAMFImporter_NodeElement* pParent)
+struct CAMFImporter_NodeElement_Edge : public CAMFImporter_NodeElement {
/// Constructor.
/// \param [in] pParent - pointer to parent node.
CAMFImporter_NodeElement_Edge(CAMFImporter_NodeElement* pParent)
: CAMFImporter_NodeElement(ENET_Edge, pParent)
{}
-};// struct CAMFImporter_NodeElement_Vertex
+};
/// \struct CAMFImporter_NodeElement_Vertices
/// Structure that define vertices node.
-struct CAMFImporter_NodeElement_Vertices : public CAMFImporter_NodeElement
-{
- /// \fn CAMFImporter_NodeElement_Vertices(CAMFImporter_NodeElement* pParent)
+struct CAMFImporter_NodeElement_Vertices : public CAMFImporter_NodeElement {
/// Constructor.
/// \param [in] pParent - pointer to parent node.
CAMFImporter_NodeElement_Vertices(CAMFImporter_NodeElement* pParent)
: CAMFImporter_NodeElement(ENET_Vertices, pParent)
{}
-
-};// struct CAMFImporter_NodeElement_Vertices
+};
/// \struct CAMFImporter_NodeElement_Volume
/// Structure that define volume node.
-struct CAMFImporter_NodeElement_Volume : public CAMFImporter_NodeElement
-{
- /****************** Variables ******************/
-
+struct CAMFImporter_NodeElement_Volume : public CAMFImporter_NodeElement {
std::string MaterialID;///< Which material to use.
std::string Type;///< What this volume describes can be “region†or “supportâ€. If none specified, “object†is assumed.
- /****************** Functions ******************/
-
- /// \fn CAMFImporter_NodeElement_Volume(CAMFImporter_NodeElement* pParent)
/// Constructor.
/// \param [in] pParent - pointer to parent node.
CAMFImporter_NodeElement_Volume(CAMFImporter_NodeElement* pParent)
: CAMFImporter_NodeElement(ENET_Volume, pParent)
{}
-
-};// struct CAMFImporter_NodeElement_Volume
+};
/// \struct CAMFImporter_NodeElement_Coordinates
/// Structure that define coordinates node.
struct CAMFImporter_NodeElement_Coordinates : public CAMFImporter_NodeElement
{
- /****************** Variables ******************/
-
aiVector3D Coordinate;///< Coordinate.
- /****************** Functions ******************/
-
- /// \fn CAMFImporter_NodeElement_Coordinates(CAMFImporter_NodeElement* pParent)
/// Constructor.
/// \param [in] pParent - pointer to parent node.
CAMFImporter_NodeElement_Coordinates(CAMFImporter_NodeElement* pParent)
: CAMFImporter_NodeElement(ENET_Coordinates, pParent)
{}
-};// struct CAMFImporter_NodeElement_Coordinates
+};
/// \struct CAMFImporter_NodeElement_TexMap
/// Structure that define texture coordinates node.
-struct CAMFImporter_NodeElement_TexMap : public CAMFImporter_NodeElement
-{
- /****************** Variables ******************/
-
+struct CAMFImporter_NodeElement_TexMap : public CAMFImporter_NodeElement {
aiVector3D TextureCoordinate[3];///< Texture coordinates.
std::string TextureID_R;///< Texture ID for red color component.
std::string TextureID_G;///< Texture ID for green color component.
std::string TextureID_B;///< Texture ID for blue color component.
std::string TextureID_A;///< Texture ID for alpha color component.
- /****************** Functions ******************/
-
- /// \fn CAMFImporter_NodeElement_TexMap(CAMFImporter_NodeElement* pParent)
/// Constructor.
/// \param [in] pParent - pointer to parent node.
CAMFImporter_NodeElement_TexMap(CAMFImporter_NodeElement* pParent)
- : CAMFImporter_NodeElement(ENET_TexMap, pParent)
- {}
-
-};// struct CAMFImporter_NodeElement_TexMap
+ : CAMFImporter_NodeElement(ENET_TexMap, pParent)
+ , TextureCoordinate{}
+ , TextureID_R()
+ , TextureID_G()
+ , TextureID_B()
+ , TextureID_A() {
+ // empty
+ }
+};
/// \struct CAMFImporter_NodeElement_Triangle
/// Structure that define triangle node.
-struct CAMFImporter_NodeElement_Triangle : public CAMFImporter_NodeElement
-{
- /****************** Variables ******************/
-
+struct CAMFImporter_NodeElement_Triangle : public CAMFImporter_NodeElement {
size_t V[3];///< Triangle vertices.
- /****************** Functions ******************/
-
- /// \fn CAMFImporter_NodeElement_Triangle(CAMFImporter_NodeElement* pParent)
/// Constructor.
/// \param [in] pParent - pointer to parent node.
CAMFImporter_NodeElement_Triangle(CAMFImporter_NodeElement* pParent)
- : CAMFImporter_NodeElement(ENET_Triangle, pParent)
- {}
-
-};// struct CAMFImporter_NodeElement_Triangle
+ : CAMFImporter_NodeElement(ENET_Triangle, pParent) {
+ // empty
+ }
+};
/// Structure that define texture node.
struct CAMFImporter_NodeElement_Texture : public CAMFImporter_NodeElement {
@@ -395,6 +335,6 @@ struct CAMFImporter_NodeElement_Texture : public CAMFImporter_NodeElement {
, Tiled( false ){
// empty
}
-};// struct CAMFImporter_NodeElement_Texture
+};
#endif // INCLUDED_AI_AMF_IMPORTER_NODE_H
diff --git a/code/AMFImporter_Postprocess.cpp b/code/AMFImporter_Postprocess.cpp
index 085336c51..a6ee8fa2f 100644
--- a/code/AMFImporter_Postprocess.cpp
+++ b/code/AMFImporter_Postprocess.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -51,8 +52,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Header files, Assimp.
#include <assimp/SceneCombiner.h>
-#include "StandardShapes.h"
-#include "StringUtils.h"
+#include <assimp/StandardShapes.h>
+#include <assimp/StringUtils.h>
// Header files, stdlib.
#include <iterator>
@@ -60,7 +61,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace Assimp
{
-aiColor4D AMFImporter::SPP_Material::GetColor(const float pX, const float pY, const float pZ) const
+aiColor4D AMFImporter::SPP_Material::GetColor(const float /*pX*/, const float /*pY*/, const float /*pZ*/) const
{
aiColor4D tcol;
@@ -155,10 +156,11 @@ size_t AMFImporter::PostprocessHelper_GetTextureID_Or_Create(const std::string&
TextureConverted_Index = 0;
for(const SPP_Texture& tex_convd: mTexture_Converted)
{
- if(tex_convd.ID == TextureConverted_ID)
- return TextureConverted_Index;
- else
- TextureConverted_Index++;
+ if ( tex_convd.ID == TextureConverted_ID ) {
+ return TextureConverted_Index;
+ } else {
+ ++TextureConverted_Index;
+ }
}
//
@@ -281,8 +283,11 @@ size_t AMFImporter::PostprocessHelper_GetTextureID_Or_Create(const std::string&
{
if(!pID.empty())
{
- for(size_t idx_target = pOffset, idx_src = 0; idx_target < tex_size; idx_target += pStep, idx_src++)
- converted_texture.Data[idx_target] = src_texture[pSrcTexNum]->Data.at(idx_src);
+ for(size_t idx_target = pOffset, idx_src = 0; idx_target < tex_size; idx_target += pStep, idx_src++) {
+ CAMFImporter_NodeElement_Texture* tex = src_texture[pSrcTexNum];
+ ai_assert(tex);
+ converted_texture.Data[idx_target] = tex->Data.at(idx_src);
+ }
}
};// auto CopyTextureData = [&](const size_t pOffset, const size_t pStep, const uint8_t pSrcTexNum) -> void
@@ -686,7 +691,6 @@ std::list<unsigned int> mesh_idx;
tmesh->mNumVertices = static_cast<unsigned int>(vert_arr.size());
tmesh->mVertices = new aiVector3D[tmesh->mNumVertices];
tmesh->mColors[0] = new aiColor4D[tmesh->mNumVertices];
- tmesh->mFaces = new aiFace[face_list_cur.size()];
memcpy(tmesh->mVertices, vert_arr.data(), tmesh->mNumVertices * sizeof(aiVector3D));
memcpy(tmesh->mColors[0], col_arr.data(), tmesh->mNumVertices * sizeof(aiColor4D));
@@ -766,7 +770,7 @@ std::list<aiNode*> ch_node;
// find referenced object
if(!Find_ConvertedNode(als.ObjectID, pNodeList, &found_node)) Throw_ID_NotFound(als.ObjectID);
- // create node for apllying transformation
+ // create node for applying transformation
t_node = new aiNode;
t_node->mParent = con_node;
// apply transformation
diff --git a/code/ASELoader.cpp b/code/ASELoader.cpp
index 16b3c4ad9..1808f25e2 100644
--- a/code/ASELoader.cpp
+++ b/code/ASELoader.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -50,8 +51,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// internal headers
#include "ASELoader.h"
-#include "StringComparison.h"
-#include "SkeletonMeshBuilder.h"
+#include <assimp/StringComparison.h>
+#include <assimp/SkeletonMeshBuilder.h>
#include "TargetAnimation.h"
#include <assimp/Importer.hpp>
#include <assimp/IOSystem.hpp>
@@ -62,7 +63,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <memory>
// utilities
-#include "fast_atof.h"
+#include <assimp/fast_atof.h>
using namespace Assimp;
using namespace Assimp::ASE;
@@ -83,11 +84,11 @@ static const aiImporterDesc desc = {
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
ASEImporter::ASEImporter()
- : mParser(),
- mBuffer(),
- pcScene(),
- configRecomputeNormals(),
- noSkeletonMesh()
+: mParser()
+, mBuffer()
+, pcScene()
+, configRecomputeNormals()
+, noSkeletonMesh()
{}
// ------------------------------------------------------------------------------------------------
@@ -199,7 +200,7 @@ void ASEImporter::InternReadFile( const std::string& pFile,
ConvertMeshes(*i,avOutMeshes);
}
if (tookNormals) {
- DefaultLogger::get()->debug("ASE: Taking normals from the file. Use "
+ ASSIMP_LOG_DEBUG("ASE: Taking normals from the file. Use "
"the AI_CONFIG_IMPORT_ASE_RECONSTRUCT_NORMALS setting if you "
"experience problems");
}
@@ -276,14 +277,13 @@ void ASEImporter::GenerateDefaultMaterial()
}
if (bHas || mParser->m_vMaterials.empty()) {
// add a simple material without submaterials to the parser's list
- mParser->m_vMaterials.push_back ( ASE::Material() );
+ mParser->m_vMaterials.push_back ( ASE::Material(AI_DEFAULT_MATERIAL_NAME) );
ASE::Material& mat = mParser->m_vMaterials.back();
mat.mDiffuse = aiColor3D(0.6f,0.6f,0.6f);
mat.mSpecular = aiColor3D(1.0f,1.0f,1.0f);
mat.mAmbient = aiColor3D(0.05f,0.05f,0.05f);
mat.mShading = Discreet3DS::Gouraud;
- mat.mName = AI_DEFAULT_MATERIAL_NAME;
}
}
@@ -297,15 +297,15 @@ void ASEImporter::BuildAnimations(const std::vector<BaseNode*>& nodes)
// TODO: Implement Bezier & TCB support
if ((*i)->mAnim.mPositionType != ASE::Animation::TRACK) {
- DefaultLogger::get()->warn("ASE: Position controller uses Bezier/TCB keys. "
+ ASSIMP_LOG_WARN("ASE: Position controller uses Bezier/TCB keys. "
"This is not supported.");
}
if ((*i)->mAnim.mRotationType != ASE::Animation::TRACK) {
- DefaultLogger::get()->warn("ASE: Rotation controller uses Bezier/TCB keys. "
+ ASSIMP_LOG_WARN("ASE: Rotation controller uses Bezier/TCB keys. "
"This is not supported.");
}
if ((*i)->mAnim.mScalingType != ASE::Animation::TRACK) {
- DefaultLogger::get()->warn("ASE: Position controller uses Bezier/TCB keys. "
+ ASSIMP_LOG_WARN("ASE: Position controller uses Bezier/TCB keys. "
"This is not supported.");
}
@@ -583,7 +583,7 @@ void ASEImporter::AddNodes (const std::vector<BaseNode*>& nodes,
node->mTransformation = mParentAdjust*snode->mTransform;
// Add sub nodes - prevent stack overflow due to recursive parenting
- if (node->mName != node->mParent->mName) {
+ if (node->mName != node->mParent->mName && node->mName != node->mParent->mParent->mName ) {
AddNodes(nodes,node,node->mName.data,snode->mTransform);
}
@@ -624,7 +624,7 @@ void ASEImporter::AddNodes (const std::vector<BaseNode*>& nodes,
node->mNumChildren++;
// What we did is so great, it is at least worth a debug message
- DefaultLogger::get()->debug("ASE: Generating separate target node ("+snode->mName+")");
+ ASSIMP_LOG_DEBUG("ASE: Generating separate target node ("+snode->mName+")");
}
}
@@ -947,7 +947,7 @@ void ASEImporter::ConvertMeshes(ASE::Mesh& mesh, std::vector<aiMesh*>& avOutMesh
// validate the material index of the mesh
if (mesh.iMaterialIndex >= mParser->m_vMaterials.size()) {
mesh.iMaterialIndex = (unsigned int)mParser->m_vMaterials.size()-1;
- DefaultLogger::get()->warn("Material index is out of range");
+ ASSIMP_LOG_WARN("Material index is out of range");
}
// If the material the mesh is assigned to is consisting of submeshes, split it
@@ -957,11 +957,11 @@ void ASEImporter::ConvertMeshes(ASE::Mesh& mesh, std::vector<aiMesh*>& avOutMesh
std::vector<unsigned int>* aiSplit = new std::vector<unsigned int>[vSubMaterials.size()];
- // build a list of all faces per submaterial
+ // build a list of all faces per sub-material
for (unsigned int i = 0; i < mesh.mFaces.size();++i) {
// check range
if (mesh.mFaces[i].iMaterial >= vSubMaterials.size()) {
- DefaultLogger::get()->warn("Submaterial index is out of range");
+ ASSIMP_LOG_WARN("Submaterial index is out of range");
// use the last material instead
aiSplit[vSubMaterials.size()-1].push_back(i);
@@ -1021,6 +1021,7 @@ void ASEImporter::ConvertMeshes(ASE::Mesh& mesh, std::vector<aiMesh*>& avOutMesh
// convert bones, if existing
if (!mesh.mBones.empty()) {
+ ai_assert(avOutputBones);
// check whether there is a vertex weight for this vertex index
if (iIndex2 < mesh.mBoneVertices.size()) {
diff --git a/code/ASELoader.h b/code/ASELoader.h
index 8a8d4faa4..7f71bf49d 100644
--- a/code/ASELoader.h
+++ b/code/ASELoader.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -45,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_ASELOADER_H_INCLUDED
#define AI_ASELOADER_H_INCLUDED
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
#include <assimp/types.h>
#include "ASEParser.h"
diff --git a/code/ASEParser.cpp b/code/ASEParser.cpp
index 7de80a2d8..298c6fe61 100644
--- a/code/ASEParser.cpp
+++ b/code/ASEParser.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -51,7 +52,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// internal headers
#include "TextureTransform.h"
#include "ASELoader.h"
-#include "fast_atof.h"
+#include <assimp/fast_atof.h>
#include <assimp/DefaultLogger.hpp>
using namespace Assimp;
@@ -150,7 +151,7 @@ void Parser::LogWarning(const char* szWarn)
#endif
// output the warning to the logger ...
- DefaultLogger::get()->warn(szTemp);
+ ASSIMP_LOG_WARN(szTemp);
}
// ------------------------------------------------------------------------------------------------
@@ -166,7 +167,7 @@ void Parser::LogInfo(const char* szWarn)
#endif
// output the information to the logger ...
- DefaultLogger::get()->info(szTemp);
+ ASSIMP_LOG_INFO(szTemp);
}
// ------------------------------------------------------------------------------------------------
@@ -266,7 +267,9 @@ void Parser::Parse()
// at the file extension (ASE, ASK, ASC)
// *************************************************************
- if (fmt)iFileFormat = fmt;
+ if ( fmt ) {
+ iFileFormat = fmt;
+ }
continue;
}
// main scene information
@@ -292,7 +295,7 @@ void Parser::Parse()
if (TokenMatch(filePtr,"GEOMOBJECT",10))
{
- m_vMeshes.push_back(Mesh());
+ m_vMeshes.push_back(Mesh("UNNAMED"));
ParseLV1ObjectBlock(m_vMeshes.back());
continue;
}
@@ -308,14 +311,14 @@ void Parser::Parse()
if (TokenMatch(filePtr,"LIGHTOBJECT",11))
{
- m_vLights.push_back(Light());
+ m_vLights.push_back(Light("UNNAMED"));
ParseLV1ObjectBlock(m_vLights.back());
continue;
}
// camera object
if (TokenMatch(filePtr,"CAMERAOBJECT",12))
{
- m_vCameras.push_back(Camera());
+ m_vCameras.push_back(Camera("UNNAMED"));
ParseLV1ObjectBlock(m_vCameras.back());
continue;
}
@@ -426,28 +429,25 @@ void Parser::ParseLV1SoftSkinBlock()
// Reserve enough storage
vert.mBoneWeights.reserve(numWeights);
- for (unsigned int w = 0; w < numWeights;++w)
- {
- std::string bone;
+ std::string bone;
+ for (unsigned int w = 0; w < numWeights;++w) {
+ bone.clear();
ParseString(bone,"*MESH_SOFTSKINVERTS.Bone");
// Find the bone in the mesh's list
std::pair<int,ai_real> me;
me.first = -1;
- for (unsigned int n = 0; n < curMesh->mBones.size();++n)
- {
- if (curMesh->mBones[n].mName == bone)
- {
+ for (unsigned int n = 0; n < curMesh->mBones.size();++n) {
+ if (curMesh->mBones[n].mName == bone) {
me.first = n;
break;
}
}
- if (-1 == me.first)
- {
+ if (-1 == me.first) {
// We don't have this bone yet, so add it to the list
- me.first = (int)curMesh->mBones.size();
- curMesh->mBones.push_back(ASE::Bone(bone));
+ me.first = static_cast<int>( curMesh->mBones.size() );
+ curMesh->mBones.push_back( ASE::Bone( bone ) );
}
ParseLV4MeshFloat( me.second );
@@ -528,7 +528,7 @@ void Parser::ParseLV1MaterialListBlock()
ParseLV4MeshLong(iMaterialCount);
// now allocate enough storage to hold all materials
- m_vMaterials.resize(iOldMaterialCount+iMaterialCount);
+ m_vMaterials.resize(iOldMaterialCount+iMaterialCount, Material("INVALID"));
continue;
}
if (TokenMatch(filePtr,"MATERIAL",8))
@@ -706,7 +706,7 @@ void Parser::ParseLV2MaterialBlock(ASE::Material& mat)
ParseLV4MeshLong(iNumSubMaterials);
// allocate enough storage
- mat.avSubMaterials.resize(iNumSubMaterials);
+ mat.avSubMaterials.resize(iNumSubMaterials, Material("INVALID SUBMATERIAL"));
}
// submaterial chunks
if (TokenMatch(filePtr,"SUBMATERIAL",11))
@@ -744,6 +744,7 @@ void Parser::ParseLV3MapBlock(Texture& map)
// empty the texture won't be used later.
// ***********************************************************
bool parsePath = true;
+ std::string temp;
while (true)
{
if ('*' == *filePtr)
@@ -752,12 +753,12 @@ void Parser::ParseLV3MapBlock(Texture& map)
// type of map
if (TokenMatch(filePtr,"MAP_CLASS" ,9))
{
- std::string temp;
+ temp.clear();
if(!ParseString(temp,"*MAP_CLASS"))
SkipToNextToken();
if (temp != "Bitmap" && temp != "Normal Bump")
{
- DefaultLogger::get()->warn("ASE: Skipping unknown map type: " + temp);
+ ASSIMP_LOG_WARN_F("ASE: Skipping unknown map type: ", temp);
parsePath = false;
}
continue;
@@ -772,7 +773,7 @@ void Parser::ParseLV3MapBlock(Texture& map)
{
// Files with 'None' as map name are produced by
// an Maja to ASE exporter which name I forgot ..
- DefaultLogger::get()->warn("ASE: Skipping invalid map entry");
+ ASSIMP_LOG_WARN("ASE: Skipping invalid map entry");
map.mMapName = "";
}
@@ -1071,7 +1072,7 @@ void Parser::ParseLV2AnimationBlock(ASE::BaseNode& mesh)
( mesh.mType != BaseNode::Light || ((ASE::Light&)mesh).mLightType != ASE::Light::TARGET))
{
- DefaultLogger::get()->error("ASE: Found target animation channel "
+ ASSIMP_LOG_ERROR("ASE: Found target animation channel "
"but the node is neither a camera nor a spot light");
anim = NULL;
}
@@ -1097,7 +1098,7 @@ void Parser::ParseLV2AnimationBlock(ASE::BaseNode& mesh)
if (!anim || anim == &mesh.mTargetAnim)
{
// Target animation channels may have no rotation channels
- DefaultLogger::get()->error("ASE: Ignoring scaling channel in target animation");
+ ASSIMP_LOG_ERROR("ASE: Ignoring scaling channel in target animation");
SkipSection();
}
else ParseLV3ScaleAnimationBlock(*anim);
@@ -1111,7 +1112,7 @@ void Parser::ParseLV2AnimationBlock(ASE::BaseNode& mesh)
if (!anim || anim == &mesh.mTargetAnim)
{
// Target animation channels may have no rotation channels
- DefaultLogger::get()->error("ASE: Ignoring rotation channel in target animation");
+ ASSIMP_LOG_ERROR("ASE: Ignoring rotation channel in target animation");
SkipSection();
}
else ParseLV3RotAnimationBlock(*anim);
@@ -1294,12 +1295,14 @@ void Parser::ParseLV2NodeTransformBlock(ASE::BaseNode& mesh)
{
mode = 2;
}
- else DefaultLogger::get()->error("ASE: Ignoring target transform, "
- "this is no spot light or target camera");
+ else {
+ ASSIMP_LOG_ERROR("ASE: Ignoring target transform, "
+ "this is no spot light or target camera");
+ }
}
else
{
- DefaultLogger::get()->error("ASE: Unknown node transformation: " + temp);
+ ASSIMP_LOG_ERROR("ASE: Unknown node transformation: " + temp);
// mode = 0
}
continue;
@@ -1553,7 +1556,7 @@ void Parser::ParseLV3MeshWeightsBlock(ASE::Mesh& mesh)
void Parser::ParseLV4MeshBones(unsigned int iNumBones,ASE::Mesh& mesh)
{
AI_ASE_PARSER_INIT();
- mesh.mBones.resize(iNumBones);
+ mesh.mBones.resize(iNumBones, Bone("UNNAMED"));
while (true)
{
if ('*' == *filePtr)
@@ -1915,7 +1918,7 @@ void Parser::ParseLV3MeshNormalListBlock(ASE::Mesh& sMesh)
else if (index == face.mIndices[2])
index = 2;
else {
- DefaultLogger::get()->error("ASE: Invalid vertex index in MESH_VERTEXNORMAL section");
+ ASSIMP_LOG_ERROR("ASE: Invalid vertex index in MESH_VERTEXNORMAL section");
continue;
}
// We'll renormalize later
@@ -1927,7 +1930,7 @@ void Parser::ParseLV3MeshNormalListBlock(ASE::Mesh& sMesh)
ParseLV4MeshFloatTriple(&vNormal.x,faceIdx);
if (faceIdx >= sMesh.mFaces.size()) {
- DefaultLogger::get()->error("ASE: Invalid vertex index in MESH_FACENORMAL section");
+ ASSIMP_LOG_ERROR("ASE: Invalid vertex index in MESH_FACENORMAL section");
continue;
}
diff --git a/code/ASEParser.h b/code/ASEParser.h
index db64f2a16..305a3f3d6 100644
--- a/code/ASEParser.h
+++ b/code/ASEParser.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -52,8 +53,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_NO_3DS_IMPORTER
// for some helper routines like IsSpace()
-#include "ParsingUtils.h"
-#include "qnan.h"
+#include <assimp/ParsingUtils.h>
+#include <assimp/qnan.h>
// ASE is quite similar to 3ds. We can reuse some structures
#include "3DSLoader.h"
@@ -67,9 +68,51 @@ using namespace D3DS;
/** Helper structure representing an ASE material */
struct Material : public D3DS::Material
{
- //! Default constructor
- Material() : pcInstance(NULL), bNeed (false)
- {}
+ //! Default constructor has been deleted
+ Material() = delete;
+
+ //! Constructor with explicit name
+ explicit Material(const std::string &name)
+ : D3DS::Material(name)
+ , pcInstance(NULL)
+ , bNeed (false) {
+ // empty
+ }
+
+ Material(const Material &other) = default;
+ Material &operator=(const Material &other) = default;
+
+
+ //! Move constructor. This is explicitly written because MSVC doesn't support defaulting it
+ Material(Material &&other) AI_NO_EXCEPT
+ : D3DS::Material(std::move(other))
+ , avSubMaterials(std::move(other.avSubMaterials))
+ , pcInstance(std::move(other.pcInstance))
+ , bNeed(std::move(other.bNeed))
+ {
+ other.pcInstance = nullptr;
+ }
+
+
+ Material &operator=(Material &&other) AI_NO_EXCEPT {
+ if (this == &other) {
+ return *this;
+ }
+
+ D3DS::Material::operator=(std::move(other));
+
+ avSubMaterials = std::move(other.avSubMaterials);
+ pcInstance = std::move(other.pcInstance);
+ bNeed = std::move(other.bNeed);
+
+ other.pcInstance = nullptr;
+
+ return *this;
+ }
+
+
+ ~Material() {}
+
//! Contains all sub materials of this material
std::vector<Material> avSubMaterials;
@@ -83,19 +126,12 @@ struct Material : public D3DS::Material
// ---------------------------------------------------------------------------
/** Helper structure to represent an ASE file face */
-struct Face : public FaceWithSmoothingGroup
-{
+struct Face : public FaceWithSmoothingGroup {
//! Default constructor. Initializes everything with 0
- Face()
- {
- mColorIndices[0] = mColorIndices[1] = mColorIndices[2] = 0;
- for (unsigned int i = 0; i < AI_MAX_NUMBER_OF_TEXTURECOORDS;++i)
- {
- amUVIndices[i][0] = amUVIndices[i][1] = amUVIndices[i][2] = 0;
- }
-
- iMaterial = DEFAULT_MATINDEX;
- iFace = 0;
+ Face() AI_NO_EXCEPT
+ : iMaterial(DEFAULT_MATINDEX)
+ , iFace(0) {
+ // empty
}
//! special value to indicate that no material index has
@@ -103,8 +139,6 @@ struct Face : public FaceWithSmoothingGroup
//! will replace this value later.
static const unsigned int DEFAULT_MATINDEX = 0xFFFFFFFF;
-
-
//! Indices into each list of texture coordinates
unsigned int amUVIndices[AI_MAX_NUMBER_OF_TEXTURECOORDS][3];
@@ -122,23 +156,15 @@ struct Face : public FaceWithSmoothingGroup
// ---------------------------------------------------------------------------
/** Helper structure to represent an ASE file bone */
-struct Bone
-{
+struct Bone {
//! Constructor
- Bone()
- {
- static int iCnt = 0;
-
- // Generate a default name for the bone
- char szTemp[128];
- ::ai_snprintf(szTemp, 128, "UNNAMED_%i",iCnt++);
- mName = szTemp;
- }
+ Bone() = delete;
//! Construction from an existing name
explicit Bone( const std::string& name)
- : mName (name)
- {}
+ : mName(name) {
+ // empty
+ }
//! Name of the bone
std::string mName;
@@ -146,29 +172,22 @@ struct Bone
// ---------------------------------------------------------------------------
/** Helper structure to represent an ASE file bone vertex */
-struct BoneVertex
-{
+struct BoneVertex {
//! Bone and corresponding vertex weight.
//! -1 for unrequired bones ....
std::vector<std::pair<int,float> > mBoneWeights;
-
- //! Position of the bone vertex.
- //! MUST be identical to the vertex position
- //aiVector3D mPosition;
};
// ---------------------------------------------------------------------------
/** Helper structure to represent an ASE file animation */
-struct Animation
-{
- enum Type
- {
+struct Animation {
+ enum Type {
TRACK = 0x0,
BEZIER = 0x1,
TCB = 0x2
} mRotationType, mScalingType, mPositionType;
- Animation()
+ Animation() AI_NO_EXCEPT
: mRotationType (TRACK)
, mScalingType (TRACK)
, mPositionType (TRACK)
@@ -182,19 +201,16 @@ struct Animation
//! List of track scaling keyframes
std::vector< aiVectorKey > akeyScaling;
-
};
// ---------------------------------------------------------------------------
/** Helper structure to represent the inheritance information of an ASE node */
-struct InheritanceInfo
-{
+struct InheritanceInfo {
//! Default constructor
- InheritanceInfo()
- {
- // set the inheritance flag for all axes by default to true
- for (unsigned int i = 0; i < 3;++i)
+ InheritanceInfo() AI_NO_EXCEPT {
+ for ( size_t i=0; i<3; ++i ) {
abInheritPosition[i] = abInheritRotation[i] = abInheritScaling[i] = true;
+ }
}
//! Inherit the parent's position?, axis order is x,y,z
@@ -209,26 +225,25 @@ struct InheritanceInfo
// ---------------------------------------------------------------------------
/** Represents an ASE file node. Base class for mesh, light and cameras */
-struct BaseNode
-{
- enum Type {Light, Camera, Mesh, Dummy} mType;
-
- //! Constructor. Creates a default name for the node
- explicit BaseNode(Type _mType)
- : mType (_mType)
- , mProcessed (false)
- {
- // generate a default name for the node
- static int iCnt = 0;
- char szTemp[128]; // should be sufficiently large
- ::ai_snprintf(szTemp, 128, "UNNAMED_%i",iCnt++);
- mName = szTemp;
+struct BaseNode {
+ enum Type {
+ Light,
+ Camera,
+ Mesh,
+ Dummy
+ } mType;
+ //! Construction from an existing name
+ BaseNode(Type _mType, const std::string &name)
+ : mType (_mType)
+ , mName (name)
+ , mProcessed (false) {
// Set mTargetPosition to qnan
const ai_real qnan = get_qnan();
mTargetPosition.x = qnan;
}
+
//! Name of the mesh
std::string mName;
@@ -258,19 +273,21 @@ struct BaseNode
// ---------------------------------------------------------------------------
/** Helper structure to represent an ASE file mesh */
-struct Mesh : public MeshWithSmoothingGroups<ASE::Face>, public BaseNode
-{
- //! Constructor.
- Mesh()
- : BaseNode (BaseNode::Mesh)
- , bSkip (false)
- {
- // use 2 texture vertex components by default
- for (unsigned int c = 0; c < AI_MAX_NUMBER_OF_TEXTURECOORDS;++c)
- this->mNumUVComponents[c] = 2;
+struct Mesh : public MeshWithSmoothingGroups<ASE::Face>, public BaseNode {
+ //! Default constructor has been deleted
+ Mesh() = delete;
- // setup the default material index by default
- iMaterialIndex = Face::DEFAULT_MATINDEX;
+ //! Construction from an existing name
+ explicit Mesh(const std::string &name)
+ : BaseNode( BaseNode::Mesh, name )
+ , mVertexColors()
+ , mBoneVertices()
+ , mBones()
+ , iMaterialIndex(Face::DEFAULT_MATINDEX)
+ , bSkip (false) {
+ for (unsigned int c = 0; c < AI_MAX_NUMBER_OF_TEXTURECOORDS;++c) {
+ this->mNumUVComponents[c] = 2;
+ }
}
//! List of all texture coordinate sets
@@ -307,17 +324,21 @@ struct Light : public BaseNode
DIRECTIONAL
};
- //! Constructor.
- Light()
- : BaseNode (BaseNode::Light)
- , mLightType (OMNI)
- , mColor (1.f,1.f,1.f)
- , mIntensity (1.f) // light is white by default
- , mAngle (45.f)
- , mFalloff (0.f)
+ //! Default constructor has been deleted
+ Light() = delete;
+
+ //! Construction from an existing name
+ explicit Light(const std::string &name)
+ : BaseNode (BaseNode::Light, name)
+ , mLightType (OMNI)
+ , mColor (1.f,1.f,1.f)
+ , mIntensity (1.f) // light is white by default
+ , mAngle (45.f)
+ , mFalloff (0.f)
{
}
+
LightType mLightType;
aiColor3D mColor;
ai_real mIntensity;
@@ -335,28 +356,32 @@ struct Camera : public BaseNode
TARGET
};
- //! Constructor
- Camera()
- : BaseNode (BaseNode::Camera)
- , mFOV (0.75f) // in radians
- , mNear (0.1f)
- , mFar (1000.f) // could be zero
- , mCameraType (FREE)
+ //! Default constructor has been deleted
+ Camera() = delete;
+
+
+ //! Construction from an existing name
+ explicit Camera(const std::string &name)
+ : BaseNode (BaseNode::Camera, name)
+ , mFOV (0.75f) // in radians
+ , mNear (0.1f)
+ , mFar (1000.f) // could be zero
+ , mCameraType (FREE)
{
}
+
ai_real mFOV, mNear, mFar;
CameraType mCameraType;
};
// ---------------------------------------------------------------------------
/** Helper structure to represent an ASE helper object (dummy) */
-struct Dummy : public BaseNode
-{
+struct Dummy : public BaseNode {
//! Constructor
- Dummy()
- : BaseNode (BaseNode::Dummy)
- {
+ Dummy() AI_NO_EXCEPT
+ : BaseNode (BaseNode::Dummy, "DUMMY") {
+ // empty
}
};
@@ -371,18 +396,17 @@ struct Dummy : public BaseNode
// -------------------------------------------------------------------------------
/** \brief Class to parse ASE files
*/
-class Parser
-{
-
+class Parser {
private:
-
- Parser() {}
+ Parser() AI_NO_EXCEPT {
+ // empty
+ }
public:
// -------------------------------------------------------------------
//! Construct a parser from a given input file which is
- //! guaranted to be terminated with zero.
+ //! guaranteed to be terminated with zero.
//! @param szFile Input file
//! @param fileFormatDefault Assumed file format version. If the
//! file format is specified in the file the new value replaces
diff --git a/code/AssbinExporter.cpp b/code/AssbinExporter.cpp
index b03a45309..f49389f78 100644
--- a/code/AssbinExporter.cpp
+++ b/code/AssbinExporter.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -41,13 +42,17 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/** @file AssbinExporter.cpp
* ASSBIN exporter main code
*/
+
+#ifndef ASSIMP_BUILD_NO_EXPORT
+#ifndef ASSIMP_BUILD_NO_ASSBIN_EXPORTER
+
#include "assbin_chunks.h"
#include <assimp/version.h>
#include <assimp/IOStream.hpp>
#include <assimp/IOSystem.hpp>
#include <assimp/Exporter.hpp>
#include "ProcessHelper.h"
-#include "Exceptional.h"
+#include <assimp/Exceptional.h>
#ifdef ASSIMP_BUILD_NO_OWN_ZLIB
# include <zlib.h>
@@ -57,140 +62,154 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <time.h>
-
-#ifndef ASSIMP_BUILD_NO_EXPORT
-#ifndef ASSIMP_BUILD_NO_ASSBIN_EXPORTER
-
-using namespace Assimp;
-
-namespace Assimp {
+namespace Assimp {
template <typename T>
-size_t Write(IOStream * stream, const T& v)
-{
+size_t Write(IOStream * stream, const T& v) {
return stream->Write( &v, sizeof(T), 1 );
}
-
// -----------------------------------------------------------------------------------
// Serialize an aiString
template <>
-inline size_t Write<aiString>(IOStream * stream, const aiString& s)
-{
+inline
+size_t Write<aiString>(IOStream * stream, const aiString& s) {
const size_t s2 = (uint32_t)s.length;
stream->Write(&s,4,1);
stream->Write(s.data,s2,1);
+
return s2+4;
}
// -----------------------------------------------------------------------------------
// Serialize an unsigned int as uint32_t
template <>
-inline size_t Write<unsigned int>(IOStream * stream, const unsigned int& w)
-{
+inline
+size_t Write<unsigned int>(IOStream * stream, const unsigned int& w) {
const uint32_t t = (uint32_t)w;
if (w > t) {
// this shouldn't happen, integers in Assimp data structures never exceed 2^32
- throw new DeadlyExportError("loss of data due to 64 -> 32 bit integer conversion");
+ throw DeadlyExportError("loss of data due to 64 -> 32 bit integer conversion");
}
stream->Write(&t,4,1);
+
return 4;
}
// -----------------------------------------------------------------------------------
// Serialize an unsigned int as uint16_t
template <>
-inline size_t Write<uint16_t>(IOStream * stream, const uint16_t& w)
-{
+inline
+size_t Write<uint16_t>(IOStream * stream, const uint16_t& w) {
static_assert(sizeof(uint16_t)==2, "sizeof(uint16_t)==2");
stream->Write(&w,2,1);
+
return 2;
}
// -----------------------------------------------------------------------------------
// Serialize a float
template <>
-inline size_t Write<float>(IOStream * stream, const float& f)
-{
+inline
+size_t Write<float>(IOStream * stream, const float& f) {
static_assert(sizeof(float)==4, "sizeof(float)==4");
stream->Write(&f,4,1);
+
return 4;
}
// -----------------------------------------------------------------------------------
// Serialize a double
template <>
-inline size_t Write<double>(IOStream * stream, const double& f)
-{
+inline
+size_t Write<double>(IOStream * stream, const double& f) {
static_assert(sizeof(double)==8, "sizeof(double)==8");
stream->Write(&f,8,1);
+
return 8;
}
// -----------------------------------------------------------------------------------
// Serialize a vec3
template <>
-inline size_t Write<aiVector3D>(IOStream * stream, const aiVector3D& v)
-{
+inline
+size_t Write<aiVector3D>(IOStream * stream, const aiVector3D& v) {
size_t t = Write<float>(stream,v.x);
t += Write<float>(stream,v.y);
t += Write<float>(stream,v.z);
+
return t;
}
// -----------------------------------------------------------------------------------
// Serialize a color value
template <>
-inline size_t Write<aiColor4D>(IOStream * stream, const aiColor4D& v)
-{
+inline
+size_t Write<aiColor3D>(IOStream * stream, const aiColor3D& v) {
+ size_t t = Write<float>(stream,v.r);
+ t += Write<float>(stream,v.g);
+ t += Write<float>(stream,v.b);
+
+ return t;
+}
+
+// -----------------------------------------------------------------------------------
+// Serialize a color value
+template <>
+inline
+size_t Write<aiColor4D>(IOStream * stream, const aiColor4D& v) {
size_t t = Write<float>(stream,v.r);
t += Write<float>(stream,v.g);
t += Write<float>(stream,v.b);
t += Write<float>(stream,v.a);
+
return t;
}
// -----------------------------------------------------------------------------------
// Serialize a quaternion
template <>
-inline size_t Write<aiQuaternion>(IOStream * stream, const aiQuaternion& v)
-{
+inline
+size_t Write<aiQuaternion>(IOStream * stream, const aiQuaternion& v) {
size_t t = Write<float>(stream,v.w);
t += Write<float>(stream,v.x);
t += Write<float>(stream,v.y);
t += Write<float>(stream,v.z);
+ ai_assert(t == 16);
+
return 16;
}
-
// -----------------------------------------------------------------------------------
// Serialize a vertex weight
template <>
-inline size_t Write<aiVertexWeight>(IOStream * stream, const aiVertexWeight& v)
-{
+inline
+size_t Write<aiVertexWeight>(IOStream * stream, const aiVertexWeight& v) {
size_t t = Write<unsigned int>(stream,v.mVertexId);
+
return t+Write<float>(stream,v.mWeight);
}
// -----------------------------------------------------------------------------------
// Serialize a mat4x4
template <>
-inline size_t Write<aiMatrix4x4>(IOStream * stream, const aiMatrix4x4& m)
-{
+inline
+size_t Write<aiMatrix4x4>(IOStream * stream, const aiMatrix4x4& m) {
for (unsigned int i = 0; i < 4;++i) {
for (unsigned int i2 = 0; i2 < 4;++i2) {
Write<float>(stream,m[i][i2]);
}
}
+
return 64;
}
// -----------------------------------------------------------------------------------
// Serialize an aiVectorKey
template <>
-inline size_t Write<aiVectorKey>(IOStream * stream, const aiVectorKey& v)
-{
+inline
+size_t Write<aiVectorKey>(IOStream * stream, const aiVectorKey& v) {
const size_t t = Write<double>(stream,v.mTime);
return t + Write<aiVector3D>(stream,v.mValue);
}
@@ -198,16 +217,16 @@ inline size_t Write<aiVectorKey>(IOStream * stream, const aiVectorKey& v)
// -----------------------------------------------------------------------------------
// Serialize an aiQuatKey
template <>
-inline size_t Write<aiQuatKey>(IOStream * stream, const aiQuatKey& v)
-{
+inline
+size_t Write<aiQuatKey>(IOStream * stream, const aiQuatKey& v) {
const size_t t = Write<double>(stream,v.mTime);
return t + Write<aiQuaternion>(stream,v.mValue);
}
template <typename T>
-inline size_t WriteBounds(IOStream * stream, const T* in, unsigned int size)
-{
- T minc,maxc;
+inline
+size_t WriteBounds(IOStream * stream, const T* in, unsigned int size) {
+ T minc, maxc;
ArrayBounds(in,size,minc,maxc);
const size_t t = Write<T>(stream,minc);
@@ -217,549 +236,601 @@ inline size_t WriteBounds(IOStream * stream, const T* in, unsigned int size)
// We use this to write out non-byte arrays so that we write using the specializations.
// This way we avoid writing out extra bytes that potentially come from struct alignment.
template <typename T>
-inline size_t WriteArray(IOStream * stream, const T* in, unsigned int size)
-{
+inline
+size_t WriteArray(IOStream * stream, const T* in, unsigned int size) {
size_t n = 0;
for (unsigned int i=0; i<size; i++) n += Write<T>(stream,in[i]);
+
return n;
}
- // ----------------------------------------------------------------------------------
- /** @class AssbinChunkWriter
- * @brief Chunk writer mechanism for the .assbin file structure
- *
- * This is a standard in-memory IOStream (most of the code is based on BlobIOStream),
- * the difference being that this takes another IOStream as a "container" in the
- * constructor, and when it is destroyed, it appends the magic number, the chunk size,
- * and the chunk contents to the container stream. This allows relatively easy chunk
- * chunk construction, even recursively.
- */
- class AssbinChunkWriter : public IOStream
- {
- private:
-
- uint8_t* buffer;
- uint32_t magic;
- IOStream * container;
- size_t cur_size, cursor, initial;
+// ----------------------------------------------------------------------------------
+/** @class AssbinChunkWriter
+ * @brief Chunk writer mechanism for the .assbin file structure
+ *
+ * This is a standard in-memory IOStream (most of the code is based on BlobIOStream),
+ * the difference being that this takes another IOStream as a "container" in the
+ * constructor, and when it is destroyed, it appends the magic number, the chunk size,
+ * and the chunk contents to the container stream. This allows relatively easy chunk
+ * chunk construction, even recursively.
+ */
+class AssbinChunkWriter : public IOStream
+{
+private:
- private:
- // -------------------------------------------------------------------
- void Grow(size_t need = 0)
- {
- size_t new_size = std::max(initial, std::max( need, cur_size+(cur_size>>1) ));
+ uint8_t* buffer;
+ uint32_t magic;
+ IOStream * container;
+ size_t cur_size, cursor, initial;
- const uint8_t* const old = buffer;
- buffer = new uint8_t[new_size];
+private:
+ // -------------------------------------------------------------------
+ void Grow(size_t need = 0)
+ {
+ size_t new_size = std::max(initial, std::max( need, cur_size+(cur_size>>1) ));
- if (old) {
- memcpy(buffer,old,cur_size);
- delete[] old;
- }
+ const uint8_t* const old = buffer;
+ buffer = new uint8_t[new_size];
- cur_size = new_size;
+ if (old) {
+ memcpy(buffer,old,cur_size);
+ delete[] old;
}
- public:
+ cur_size = new_size;
+ }
- AssbinChunkWriter( IOStream * container, uint32_t magic, size_t initial = 4096)
- : buffer(NULL), magic(magic), container(container), cur_size(0), cursor(0), initial(initial)
- {
- }
+public:
- virtual ~AssbinChunkWriter()
- {
- if (container) {
- container->Write( &magic, sizeof(uint32_t), 1 );
- container->Write( &cursor, sizeof(uint32_t), 1 );
- container->Write( buffer, 1, cursor );
- }
- if (buffer) delete[] buffer;
+ AssbinChunkWriter( IOStream * container, uint32_t magic, size_t initial = 4096)
+ : buffer(NULL), magic(magic), container(container), cur_size(0), cursor(0), initial(initial)
+ {
+ }
+
+ virtual ~AssbinChunkWriter()
+ {
+ if (container) {
+ container->Write( &magic, sizeof(uint32_t), 1 );
+ container->Write( &cursor, sizeof(uint32_t), 1 );
+ container->Write( buffer, 1, cursor );
}
+ if (buffer) delete[] buffer;
+ }
- void * GetBufferPointer() { return buffer; }
+ void * GetBufferPointer() { return buffer; }
- // -------------------------------------------------------------------
- virtual size_t Read(void* /*pvBuffer*/, size_t /*pSize*/, size_t /*pCount*/) { return 0; }
- virtual aiReturn Seek(size_t /*pOffset*/, aiOrigin /*pOrigin*/) { return aiReturn_FAILURE; }
- virtual size_t Tell() const { return cursor; }
- virtual void Flush() { }
+ // -------------------------------------------------------------------
+ virtual size_t Read(void* /*pvBuffer*/, size_t /*pSize*/, size_t /*pCount*/) {
+ return 0;
+ }
+ virtual aiReturn Seek(size_t /*pOffset*/, aiOrigin /*pOrigin*/) {
+ return aiReturn_FAILURE;
+ }
+ virtual size_t Tell() const {
+ return cursor;
+ }
+ virtual void Flush() {
+ // not implemented
+ }
- virtual size_t FileSize() const
- {
- return cursor;
+ virtual size_t FileSize() const {
+ return cursor;
+ }
+
+ // -------------------------------------------------------------------
+ virtual size_t Write(const void* pvBuffer, size_t pSize, size_t pCount) {
+ pSize *= pCount;
+ if (cursor + pSize > cur_size) {
+ Grow(cursor + pSize);
}
- // -------------------------------------------------------------------
- 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;
- memcpy(buffer+cursor, pvBuffer, pSize);
- cursor += pSize;
+ return pCount;
+ }
- return pCount;
- }
+};
- };
+// ----------------------------------------------------------------------------------
+/** @class AssbinExport
+ * @brief Assbin exporter class
+ *
+ * This class performs the .assbin exporting, and is responsible for the file layout.
+ */
+class AssbinExport
+{
+private:
+ bool shortened;
+ bool compressed;
- // ----------------------------------------------------------------------------------
- /** @class AssbinExport
- * @brief Assbin exporter class
- *
- * This class performs the .assbin exporting, and is responsible for the file layout.
- */
- class AssbinExport
+protected:
+ // -----------------------------------------------------------------------------------
+ void WriteBinaryNode( IOStream * container, const aiNode* node)
{
- private:
- bool shortened;
- bool compressed;
+ AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AINODE );
- protected:
+ unsigned int nb_metadata = (node->mMetaData != NULL ? node->mMetaData->mNumProperties : 0);
- // -----------------------------------------------------------------------------------
- void WriteBinaryNode( IOStream * container, const aiNode* node)
- {
- AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AINODE );
+ Write<aiString>(&chunk,node->mName);
+ Write<aiMatrix4x4>(&chunk,node->mTransformation);
+ Write<unsigned int>(&chunk,node->mNumChildren);
+ Write<unsigned int>(&chunk,node->mNumMeshes);
+ Write<unsigned int>(&chunk,nb_metadata);
- Write<aiString>(&chunk,node->mName);
- Write<aiMatrix4x4>(&chunk,node->mTransformation);
- Write<unsigned int>(&chunk,node->mNumChildren);
- Write<unsigned int>(&chunk,node->mNumMeshes);
+ for (unsigned int i = 0; i < node->mNumMeshes;++i) {
+ Write<unsigned int>(&chunk,node->mMeshes[i]);
+ }
- for (unsigned int i = 0; i < node->mNumMeshes;++i) {
- Write<unsigned int>(&chunk,node->mMeshes[i]);
- }
+ for (unsigned int i = 0; i < node->mNumChildren;++i) {
+ WriteBinaryNode( &chunk, node->mChildren[i] );
+ }
- for (unsigned int i = 0; i < node->mNumChildren;++i) {
- WriteBinaryNode( &chunk, node->mChildren[i] );
+ for (unsigned int i = 0; i < nb_metadata; ++i) {
+ const aiString& key = node->mMetaData->mKeys[i];
+ aiMetadataType type = node->mMetaData->mValues[i].mType;
+ void* value = node->mMetaData->mValues[i].mData;
+
+ Write<aiString>(&chunk, key);
+ Write<uint16_t>(&chunk, type);
+
+ switch (type) {
+ case AI_BOOL:
+ Write<bool>(&chunk, *((bool*) value));
+ break;
+ case AI_INT32:
+ Write<int32_t>(&chunk, *((int32_t*) value));
+ break;
+ case AI_UINT64:
+ Write<uint64_t>(&chunk, *((uint64_t*) value));
+ break;
+ case AI_FLOAT:
+ Write<float>(&chunk, *((float*) value));
+ break;
+ case AI_DOUBLE:
+ Write<double>(&chunk, *((double*) value));
+ break;
+ case AI_AISTRING:
+ Write<aiString>(&chunk, *((aiString*) value));
+ break;
+ case AI_AIVECTOR3D:
+ Write<aiVector3D>(&chunk, *((aiVector3D*) value));
+ break;
+#ifdef SWIG
+ case FORCE_32BIT:
+#endif // SWIG
+ default:
+ break;
}
}
+ }
- // -----------------------------------------------------------------------------------
- void WriteBinaryTexture(IOStream * container, const aiTexture* tex)
- {
- AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AITEXTURE );
+ // -----------------------------------------------------------------------------------
+ void WriteBinaryTexture(IOStream * container, const aiTexture* tex)
+ {
+ AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AITEXTURE );
- Write<unsigned int>(&chunk,tex->mWidth);
- Write<unsigned int>(&chunk,tex->mHeight);
- chunk.Write( tex->achFormatHint, sizeof(char), 4 );
+ Write<unsigned int>(&chunk,tex->mWidth);
+ Write<unsigned int>(&chunk,tex->mHeight);
+ chunk.Write( tex->achFormatHint, sizeof(char), 4 );
- if(!shortened) {
- if (!tex->mHeight) {
- chunk.Write(tex->pcData,1,tex->mWidth);
- }
- else {
- chunk.Write(tex->pcData,1,tex->mWidth*tex->mHeight*4);
- }
+ if(!shortened) {
+ if (!tex->mHeight) {
+ chunk.Write(tex->pcData,1,tex->mWidth);
+ }
+ else {
+ chunk.Write(tex->pcData,1,tex->mWidth*tex->mHeight*4);
}
-
}
- // -----------------------------------------------------------------------------------
- void WriteBinaryBone(IOStream * container, const aiBone* b)
- {
- AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AIBONE );
+ }
- Write<aiString>(&chunk,b->mName);
- Write<unsigned int>(&chunk,b->mNumWeights);
- Write<aiMatrix4x4>(&chunk,b->mOffsetMatrix);
+ // -----------------------------------------------------------------------------------
+ void WriteBinaryBone(IOStream * container, const aiBone* b)
+ {
+ AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AIBONE );
+
+ Write<aiString>(&chunk,b->mName);
+ Write<unsigned int>(&chunk,b->mNumWeights);
+ Write<aiMatrix4x4>(&chunk,b->mOffsetMatrix);
+
+ // for the moment we write dumb min/max values for the bones, too.
+ // maybe I'll add a better, hash-like solution later
+ if (shortened) {
+ WriteBounds(&chunk,b->mWeights,b->mNumWeights);
+ } // else write as usual
+ else WriteArray<aiVertexWeight>(&chunk,b->mWeights,b->mNumWeights);
+ }
- // for the moment we write dumb min/max values for the bones, too.
- // maybe I'll add a better, hash-like solution later
- if (shortened) {
- WriteBounds(&chunk,b->mWeights,b->mNumWeights);
- } // else write as usual
- else WriteArray<aiVertexWeight>(&chunk,b->mWeights,b->mNumWeights);
+ // -----------------------------------------------------------------------------------
+ void WriteBinaryMesh(IOStream * container, const aiMesh* mesh)
+ {
+ AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AIMESH );
+
+ Write<unsigned int>(&chunk,mesh->mPrimitiveTypes);
+ Write<unsigned int>(&chunk,mesh->mNumVertices);
+ Write<unsigned int>(&chunk,mesh->mNumFaces);
+ Write<unsigned int>(&chunk,mesh->mNumBones);
+ Write<unsigned int>(&chunk,mesh->mMaterialIndex);
+
+ // first of all, write bits for all existent vertex components
+ unsigned int c = 0;
+ if (mesh->mVertices) {
+ c |= ASSBIN_MESH_HAS_POSITIONS;
}
-
- // -----------------------------------------------------------------------------------
- void WriteBinaryMesh(IOStream * container, const aiMesh* mesh)
- {
- AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AIMESH );
-
- Write<unsigned int>(&chunk,mesh->mPrimitiveTypes);
- Write<unsigned int>(&chunk,mesh->mNumVertices);
- Write<unsigned int>(&chunk,mesh->mNumFaces);
- Write<unsigned int>(&chunk,mesh->mNumBones);
- Write<unsigned int>(&chunk,mesh->mMaterialIndex);
-
- // first of all, write bits for all existent vertex components
- unsigned int c = 0;
- if (mesh->mVertices) {
- c |= ASSBIN_MESH_HAS_POSITIONS;
- }
- if (mesh->mNormals) {
- c |= ASSBIN_MESH_HAS_NORMALS;
- }
- if (mesh->mTangents && mesh->mBitangents) {
- c |= ASSBIN_MESH_HAS_TANGENTS_AND_BITANGENTS;
- }
- for (unsigned int n = 0; n < AI_MAX_NUMBER_OF_TEXTURECOORDS;++n) {
- if (!mesh->mTextureCoords[n]) {
- break;
- }
- c |= ASSBIN_MESH_HAS_TEXCOORD(n);
- }
- for (unsigned int n = 0; n < AI_MAX_NUMBER_OF_COLOR_SETS;++n) {
- if (!mesh->mColors[n]) {
- break;
- }
- c |= ASSBIN_MESH_HAS_COLOR(n);
- }
- Write<unsigned int>(&chunk,c);
-
- aiVector3D minVec, maxVec;
- if (mesh->mVertices) {
- if (shortened) {
- WriteBounds(&chunk,mesh->mVertices,mesh->mNumVertices);
- } // else write as usual
- else WriteArray<aiVector3D>(&chunk,mesh->mVertices,mesh->mNumVertices);
- }
- if (mesh->mNormals) {
- if (shortened) {
- WriteBounds(&chunk,mesh->mNormals,mesh->mNumVertices);
- } // else write as usual
- else WriteArray<aiVector3D>(&chunk,mesh->mNormals,mesh->mNumVertices);
+ if (mesh->mNormals) {
+ c |= ASSBIN_MESH_HAS_NORMALS;
+ }
+ if (mesh->mTangents && mesh->mBitangents) {
+ c |= ASSBIN_MESH_HAS_TANGENTS_AND_BITANGENTS;
+ }
+ for (unsigned int n = 0; n < AI_MAX_NUMBER_OF_TEXTURECOORDS;++n) {
+ if (!mesh->mTextureCoords[n]) {
+ break;
}
- if (mesh->mTangents && mesh->mBitangents) {
- if (shortened) {
- WriteBounds(&chunk,mesh->mTangents,mesh->mNumVertices);
- WriteBounds(&chunk,mesh->mBitangents,mesh->mNumVertices);
- } // else write as usual
- else {
- WriteArray<aiVector3D>(&chunk,mesh->mTangents,mesh->mNumVertices);
- WriteArray<aiVector3D>(&chunk,mesh->mBitangents,mesh->mNumVertices);
- }
+ c |= ASSBIN_MESH_HAS_TEXCOORD(n);
+ }
+ for (unsigned int n = 0; n < AI_MAX_NUMBER_OF_COLOR_SETS;++n) {
+ if (!mesh->mColors[n]) {
+ break;
}
- for (unsigned int n = 0; n < AI_MAX_NUMBER_OF_COLOR_SETS;++n) {
- if (!mesh->mColors[n])
- break;
+ c |= ASSBIN_MESH_HAS_COLOR(n);
+ }
+ Write<unsigned int>(&chunk,c);
- if (shortened) {
- WriteBounds(&chunk,mesh->mColors[n],mesh->mNumVertices);
- } // else write as usual
- else WriteArray<aiColor4D>(&chunk,mesh->mColors[n],mesh->mNumVertices);
+ aiVector3D minVec, maxVec;
+ if (mesh->mVertices) {
+ if (shortened) {
+ WriteBounds(&chunk,mesh->mVertices,mesh->mNumVertices);
+ } // else write as usual
+ else WriteArray<aiVector3D>(&chunk,mesh->mVertices,mesh->mNumVertices);
+ }
+ if (mesh->mNormals) {
+ if (shortened) {
+ WriteBounds(&chunk,mesh->mNormals,mesh->mNumVertices);
+ } // else write as usual
+ else WriteArray<aiVector3D>(&chunk,mesh->mNormals,mesh->mNumVertices);
+ }
+ if (mesh->mTangents && mesh->mBitangents) {
+ if (shortened) {
+ WriteBounds(&chunk,mesh->mTangents,mesh->mNumVertices);
+ WriteBounds(&chunk,mesh->mBitangents,mesh->mNumVertices);
+ } // else write as usual
+ else {
+ WriteArray<aiVector3D>(&chunk,mesh->mTangents,mesh->mNumVertices);
+ WriteArray<aiVector3D>(&chunk,mesh->mBitangents,mesh->mNumVertices);
}
- for (unsigned int n = 0; n < AI_MAX_NUMBER_OF_TEXTURECOORDS;++n) {
- if (!mesh->mTextureCoords[n])
- break;
+ }
+ for (unsigned int n = 0; n < AI_MAX_NUMBER_OF_COLOR_SETS;++n) {
+ if (!mesh->mColors[n])
+ break;
- // write number of UV components
- Write<unsigned int>(&chunk,mesh->mNumUVComponents[n]);
+ if (shortened) {
+ WriteBounds(&chunk,mesh->mColors[n],mesh->mNumVertices);
+ } // else write as usual
+ else WriteArray<aiColor4D>(&chunk,mesh->mColors[n],mesh->mNumVertices);
+ }
+ for (unsigned int n = 0; n < AI_MAX_NUMBER_OF_TEXTURECOORDS;++n) {
+ if (!mesh->mTextureCoords[n])
+ break;
- if (shortened) {
- WriteBounds(&chunk,mesh->mTextureCoords[n],mesh->mNumVertices);
- } // else write as usual
- else WriteArray<aiVector3D>(&chunk,mesh->mTextureCoords[n],mesh->mNumVertices);
- }
+ // write number of UV components
+ Write<unsigned int>(&chunk,mesh->mNumUVComponents[n]);
- // write faces. There are no floating-point calculations involved
- // in these, so we can write a simple hash over the face data
- // to the dump file. We generate a single 32 Bit hash for 512 faces
- // using Assimp's standard hashing function.
if (shortened) {
- unsigned int processed = 0;
- for (unsigned int job;(job = std::min(mesh->mNumFaces-processed,512u));processed += job) {
-
- uint32_t hash = 0;
- for (unsigned int a = 0; a < job;++a) {
+ WriteBounds(&chunk,mesh->mTextureCoords[n],mesh->mNumVertices);
+ } // else write as usual
+ else WriteArray<aiVector3D>(&chunk,mesh->mTextureCoords[n],mesh->mNumVertices);
+ }
- const aiFace& f = mesh->mFaces[processed+a];
- uint32_t tmp = f.mNumIndices;
+ // write faces. There are no floating-point calculations involved
+ // in these, so we can write a simple hash over the face data
+ // to the dump file. We generate a single 32 Bit hash for 512 faces
+ // using Assimp's standard hashing function.
+ if (shortened) {
+ unsigned int processed = 0;
+ for (unsigned int job;(job = std::min(mesh->mNumFaces-processed,512u));processed += job) {
+
+ uint32_t hash = 0;
+ for (unsigned int a = 0; a < job;++a) {
+
+ const aiFace& f = mesh->mFaces[processed+a];
+ uint32_t tmp = f.mNumIndices;
+ hash = SuperFastHash(reinterpret_cast<const char*>(&tmp),sizeof tmp,hash);
+ for (unsigned int i = 0; i < f.mNumIndices; ++i) {
+ static_assert(AI_MAX_VERTICES <= 0xffffffff, "AI_MAX_VERTICES <= 0xffffffff");
+ tmp = static_cast<uint32_t>( f.mIndices[i] );
hash = SuperFastHash(reinterpret_cast<const char*>(&tmp),sizeof tmp,hash);
- for (unsigned int i = 0; i < f.mNumIndices; ++i) {
- static_assert(AI_MAX_VERTICES <= 0xffffffff, "AI_MAX_VERTICES <= 0xffffffff");
- tmp = static_cast<uint32_t>( f.mIndices[i] );
- hash = SuperFastHash(reinterpret_cast<const char*>(&tmp),sizeof tmp,hash);
- }
}
- Write<unsigned int>(&chunk,hash);
}
+ Write<unsigned int>(&chunk,hash);
}
- else // else write as usual
- {
- // if there are less than 2^16 vertices, we can simply use 16 bit integers ...
- for (unsigned int i = 0; i < mesh->mNumFaces;++i) {
- const aiFace& f = mesh->mFaces[i];
-
- static_assert(AI_MAX_FACE_INDICES <= 0xffff, "AI_MAX_FACE_INDICES <= 0xffff");
- Write<uint16_t>(&chunk,f.mNumIndices);
-
- for (unsigned int a = 0; a < f.mNumIndices;++a) {
- if (mesh->mNumVertices < (1u<<16)) {
- Write<uint16_t>(&chunk,f.mIndices[a]);
- }
- else Write<unsigned int>(&chunk,f.mIndices[a]);
+ }
+ else // else write as usual
+ {
+ // if there are less than 2^16 vertices, we can simply use 16 bit integers ...
+ for (unsigned int i = 0; i < mesh->mNumFaces;++i) {
+ const aiFace& f = mesh->mFaces[i];
+
+ static_assert(AI_MAX_FACE_INDICES <= 0xffff, "AI_MAX_FACE_INDICES <= 0xffff");
+ Write<uint16_t>(&chunk,f.mNumIndices);
+
+ for (unsigned int a = 0; a < f.mNumIndices;++a) {
+ if (mesh->mNumVertices < (1u<<16)) {
+ Write<uint16_t>(&chunk,f.mIndices[a]);
}
+ else Write<unsigned int>(&chunk,f.mIndices[a]);
}
}
+ }
- // write bones
- if (mesh->mNumBones) {
- for (unsigned int a = 0; a < mesh->mNumBones;++a) {
- const aiBone* b = mesh->mBones[a];
- WriteBinaryBone(&chunk,b);
- }
+ // write bones
+ if (mesh->mNumBones) {
+ for (unsigned int a = 0; a < mesh->mNumBones;++a) {
+ const aiBone* b = mesh->mBones[a];
+ WriteBinaryBone(&chunk,b);
}
}
+ }
- // -----------------------------------------------------------------------------------
- void WriteBinaryMaterialProperty(IOStream * container, const aiMaterialProperty* prop)
- {
- AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AIMATERIALPROPERTY );
+ // -----------------------------------------------------------------------------------
+ void WriteBinaryMaterialProperty(IOStream * container, const aiMaterialProperty* prop)
+ {
+ AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AIMATERIALPROPERTY );
- Write<aiString>(&chunk,prop->mKey);
- Write<unsigned int>(&chunk,prop->mSemantic);
- Write<unsigned int>(&chunk,prop->mIndex);
+ Write<aiString>(&chunk,prop->mKey);
+ Write<unsigned int>(&chunk,prop->mSemantic);
+ Write<unsigned int>(&chunk,prop->mIndex);
- Write<unsigned int>(&chunk,prop->mDataLength);
- Write<unsigned int>(&chunk,(unsigned int)prop->mType);
- chunk.Write(prop->mData,1,prop->mDataLength);
- }
+ Write<unsigned int>(&chunk,prop->mDataLength);
+ Write<unsigned int>(&chunk,(unsigned int)prop->mType);
+ chunk.Write(prop->mData,1,prop->mDataLength);
+ }
- // -----------------------------------------------------------------------------------
- void WriteBinaryMaterial(IOStream * container, const aiMaterial* mat)
- {
- AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AIMATERIAL);
+ // -----------------------------------------------------------------------------------
+ void WriteBinaryMaterial(IOStream * container, const aiMaterial* mat)
+ {
+ AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AIMATERIAL);
- Write<unsigned int>(&chunk,mat->mNumProperties);
- for (unsigned int i = 0; i < mat->mNumProperties;++i) {
- WriteBinaryMaterialProperty( &chunk, mat->mProperties[i]);
- }
+ Write<unsigned int>(&chunk,mat->mNumProperties);
+ for (unsigned int i = 0; i < mat->mNumProperties;++i) {
+ WriteBinaryMaterialProperty( &chunk, mat->mProperties[i]);
}
+ }
- // -----------------------------------------------------------------------------------
- void WriteBinaryNodeAnim(IOStream * container, const aiNodeAnim* nd)
- {
- AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AINODEANIM );
+ // -----------------------------------------------------------------------------------
+ void WriteBinaryNodeAnim(IOStream * container, const aiNodeAnim* nd)
+ {
+ AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AINODEANIM );
- Write<aiString>(&chunk,nd->mNodeName);
- Write<unsigned int>(&chunk,nd->mNumPositionKeys);
- Write<unsigned int>(&chunk,nd->mNumRotationKeys);
- Write<unsigned int>(&chunk,nd->mNumScalingKeys);
- Write<unsigned int>(&chunk,nd->mPreState);
- Write<unsigned int>(&chunk,nd->mPostState);
+ Write<aiString>(&chunk,nd->mNodeName);
+ Write<unsigned int>(&chunk,nd->mNumPositionKeys);
+ Write<unsigned int>(&chunk,nd->mNumRotationKeys);
+ Write<unsigned int>(&chunk,nd->mNumScalingKeys);
+ Write<unsigned int>(&chunk,nd->mPreState);
+ Write<unsigned int>(&chunk,nd->mPostState);
- if (nd->mPositionKeys) {
- if (shortened) {
- WriteBounds(&chunk,nd->mPositionKeys,nd->mNumPositionKeys);
+ if (nd->mPositionKeys) {
+ if (shortened) {
+ WriteBounds(&chunk,nd->mPositionKeys,nd->mNumPositionKeys);
- } // else write as usual
- else WriteArray<aiVectorKey>(&chunk,nd->mPositionKeys,nd->mNumPositionKeys);
- }
- if (nd->mRotationKeys) {
- if (shortened) {
- WriteBounds(&chunk,nd->mRotationKeys,nd->mNumRotationKeys);
+ } // else write as usual
+ else WriteArray<aiVectorKey>(&chunk,nd->mPositionKeys,nd->mNumPositionKeys);
+ }
+ if (nd->mRotationKeys) {
+ if (shortened) {
+ WriteBounds(&chunk,nd->mRotationKeys,nd->mNumRotationKeys);
- } // else write as usual
- else WriteArray<aiQuatKey>(&chunk,nd->mRotationKeys,nd->mNumRotationKeys);
- }
- if (nd->mScalingKeys) {
- if (shortened) {
- WriteBounds(&chunk,nd->mScalingKeys,nd->mNumScalingKeys);
+ } // else write as usual
+ else WriteArray<aiQuatKey>(&chunk,nd->mRotationKeys,nd->mNumRotationKeys);
+ }
+ if (nd->mScalingKeys) {
+ if (shortened) {
+ WriteBounds(&chunk,nd->mScalingKeys,nd->mNumScalingKeys);
- } // else write as usual
- else WriteArray<aiVectorKey>(&chunk,nd->mScalingKeys,nd->mNumScalingKeys);
- }
+ } // else write as usual
+ else WriteArray<aiVectorKey>(&chunk,nd->mScalingKeys,nd->mNumScalingKeys);
}
+ }
- // -----------------------------------------------------------------------------------
- void WriteBinaryAnim( IOStream * container, const aiAnimation* anim )
- {
- AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AIANIMATION );
+ // -----------------------------------------------------------------------------------
+ void WriteBinaryAnim( IOStream * container, const aiAnimation* anim )
+ {
+ AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AIANIMATION );
- Write<aiString>(&chunk,anim->mName);
- Write<double>(&chunk,anim->mDuration);
- Write<double>(&chunk,anim->mTicksPerSecond);
- Write<unsigned int>(&chunk,anim->mNumChannels);
+ Write<aiString>(&chunk,anim->mName);
+ Write<double>(&chunk,anim->mDuration);
+ Write<double>(&chunk,anim->mTicksPerSecond);
+ Write<unsigned int>(&chunk,anim->mNumChannels);
- for (unsigned int a = 0; a < anim->mNumChannels;++a) {
- const aiNodeAnim* nd = anim->mChannels[a];
- WriteBinaryNodeAnim(&chunk,nd);
- }
+ for (unsigned int a = 0; a < anim->mNumChannels;++a) {
+ const aiNodeAnim* nd = anim->mChannels[a];
+ WriteBinaryNodeAnim(&chunk,nd);
}
+ }
- // -----------------------------------------------------------------------------------
- void WriteBinaryLight( IOStream * container, const aiLight* l )
- {
- AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AILIGHT );
-
- Write<aiString>(&chunk,l->mName);
- Write<unsigned int>(&chunk,l->mType);
-
- if (l->mType != aiLightSource_DIRECTIONAL) {
- Write<float>(&chunk,l->mAttenuationConstant);
- Write<float>(&chunk,l->mAttenuationLinear);
- Write<float>(&chunk,l->mAttenuationQuadratic);
- }
+ // -----------------------------------------------------------------------------------
+ void WriteBinaryLight( IOStream * container, const aiLight* l )
+ {
+ AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AILIGHT );
- Write<aiVector3D>(&chunk,(const aiVector3D&)l->mColorDiffuse);
- Write<aiVector3D>(&chunk,(const aiVector3D&)l->mColorSpecular);
- Write<aiVector3D>(&chunk,(const aiVector3D&)l->mColorAmbient);
-
- if (l->mType == aiLightSource_SPOT) {
- Write<float>(&chunk,l->mAngleInnerCone);
- Write<float>(&chunk,l->mAngleOuterCone);
- }
+ Write<aiString>(&chunk,l->mName);
+ Write<unsigned int>(&chunk,l->mType);
+ if (l->mType != aiLightSource_DIRECTIONAL) {
+ Write<float>(&chunk,l->mAttenuationConstant);
+ Write<float>(&chunk,l->mAttenuationLinear);
+ Write<float>(&chunk,l->mAttenuationQuadratic);
}
- // -----------------------------------------------------------------------------------
- void WriteBinaryCamera( IOStream * container, const aiCamera* cam )
- {
- AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AICAMERA );
+ Write<aiColor3D>(&chunk,l->mColorDiffuse);
+ Write<aiColor3D>(&chunk,l->mColorSpecular);
+ Write<aiColor3D>(&chunk,l->mColorAmbient);
- Write<aiString>(&chunk,cam->mName);
- Write<aiVector3D>(&chunk,cam->mPosition);
- Write<aiVector3D>(&chunk,cam->mLookAt);
- Write<aiVector3D>(&chunk,cam->mUp);
- Write<float>(&chunk,cam->mHorizontalFOV);
- Write<float>(&chunk,cam->mClipPlaneNear);
- Write<float>(&chunk,cam->mClipPlaneFar);
- Write<float>(&chunk,cam->mAspect);
+ if (l->mType == aiLightSource_SPOT) {
+ Write<float>(&chunk,l->mAngleInnerCone);
+ Write<float>(&chunk,l->mAngleOuterCone);
}
- // -----------------------------------------------------------------------------------
- void WriteBinaryScene( IOStream * container, const aiScene* scene)
- {
- AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AISCENE );
-
- // basic scene information
- Write<unsigned int>(&chunk,scene->mFlags);
- Write<unsigned int>(&chunk,scene->mNumMeshes);
- Write<unsigned int>(&chunk,scene->mNumMaterials);
- Write<unsigned int>(&chunk,scene->mNumAnimations);
- Write<unsigned int>(&chunk,scene->mNumTextures);
- Write<unsigned int>(&chunk,scene->mNumLights);
- Write<unsigned int>(&chunk,scene->mNumCameras);
-
- // write node graph
- WriteBinaryNode( &chunk, scene->mRootNode );
-
- // write all meshes
- for (unsigned int i = 0; i < scene->mNumMeshes;++i) {
- const aiMesh* mesh = scene->mMeshes[i];
- WriteBinaryMesh( &chunk,mesh);
- }
+ }
- // write materials
- for (unsigned int i = 0; i< scene->mNumMaterials; ++i) {
- const aiMaterial* mat = scene->mMaterials[i];
- WriteBinaryMaterial(&chunk,mat);
- }
+ // -----------------------------------------------------------------------------------
+ void WriteBinaryCamera( IOStream * container, const aiCamera* cam )
+ {
+ AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AICAMERA );
+
+ Write<aiString>(&chunk,cam->mName);
+ Write<aiVector3D>(&chunk,cam->mPosition);
+ Write<aiVector3D>(&chunk,cam->mLookAt);
+ Write<aiVector3D>(&chunk,cam->mUp);
+ Write<float>(&chunk,cam->mHorizontalFOV);
+ Write<float>(&chunk,cam->mClipPlaneNear);
+ Write<float>(&chunk,cam->mClipPlaneFar);
+ Write<float>(&chunk,cam->mAspect);
+ }
- // write all animations
- for (unsigned int i = 0; i < scene->mNumAnimations;++i) {
- const aiAnimation* anim = scene->mAnimations[i];
- WriteBinaryAnim(&chunk,anim);
- }
+ // -----------------------------------------------------------------------------------
+ void WriteBinaryScene( IOStream * container, const aiScene* scene)
+ {
+ AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AISCENE );
+
+ // basic scene information
+ Write<unsigned int>(&chunk,scene->mFlags);
+ Write<unsigned int>(&chunk,scene->mNumMeshes);
+ Write<unsigned int>(&chunk,scene->mNumMaterials);
+ Write<unsigned int>(&chunk,scene->mNumAnimations);
+ Write<unsigned int>(&chunk,scene->mNumTextures);
+ Write<unsigned int>(&chunk,scene->mNumLights);
+ Write<unsigned int>(&chunk,scene->mNumCameras);
+
+ // write node graph
+ WriteBinaryNode( &chunk, scene->mRootNode );
+
+ // write all meshes
+ for (unsigned int i = 0; i < scene->mNumMeshes;++i) {
+ const aiMesh* mesh = scene->mMeshes[i];
+ WriteBinaryMesh( &chunk,mesh);
+ }
+ // write materials
+ for (unsigned int i = 0; i< scene->mNumMaterials; ++i) {
+ const aiMaterial* mat = scene->mMaterials[i];
+ WriteBinaryMaterial(&chunk,mat);
+ }
- // write all textures
- for (unsigned int i = 0; i < scene->mNumTextures;++i) {
- const aiTexture* mesh = scene->mTextures[i];
- WriteBinaryTexture(&chunk,mesh);
- }
+ // write all animations
+ for (unsigned int i = 0; i < scene->mNumAnimations;++i) {
+ const aiAnimation* anim = scene->mAnimations[i];
+ WriteBinaryAnim(&chunk,anim);
+ }
- // write lights
- for (unsigned int i = 0; i < scene->mNumLights;++i) {
- const aiLight* l = scene->mLights[i];
- WriteBinaryLight(&chunk,l);
- }
- // write cameras
- for (unsigned int i = 0; i < scene->mNumCameras;++i) {
- const aiCamera* cam = scene->mCameras[i];
- WriteBinaryCamera(&chunk,cam);
- }
+ // write all textures
+ for (unsigned int i = 0; i < scene->mNumTextures;++i) {
+ const aiTexture* mesh = scene->mTextures[i];
+ WriteBinaryTexture(&chunk,mesh);
+ }
+ // write lights
+ for (unsigned int i = 0; i < scene->mNumLights;++i) {
+ const aiLight* l = scene->mLights[i];
+ WriteBinaryLight(&chunk,l);
}
- public:
- AssbinExport()
- : shortened(false), compressed(false) // temporary settings until properties are introduced for exporters
- {
+ // write cameras
+ for (unsigned int i = 0; i < scene->mNumCameras;++i) {
+ const aiCamera* cam = scene->mCameras[i];
+ WriteBinaryCamera(&chunk,cam);
}
- // -----------------------------------------------------------------------------------
- // Write a binary model dump
- void WriteBinaryDump(const char* pFile, IOSystem* pIOSystem, const aiScene* pScene)
- {
- IOStream * out = pIOSystem->Open( pFile, "wb" );
- if (!out) return;
+ }
- time_t tt = time(NULL);
- tm* p = gmtime(&tt);
+public:
+ AssbinExport()
+ : shortened(false), compressed(false) // temporary settings until properties are introduced for exporters
+ {
+ }
- // header
- char s[64];
- memset( s, 0, 64 );
+ // -----------------------------------------------------------------------------------
+ // Write a binary model dump
+ void WriteBinaryDump(const char* pFile, IOSystem* pIOSystem, const aiScene* pScene)
+ {
+ IOStream * out = pIOSystem->Open( pFile, "wb" );
+ if (!out) return;
+
+ time_t tt = time(NULL);
+ tm* p = gmtime(&tt);
+
+ // header
+ char s[64];
+ memset( s, 0, 64 );
#if _MSC_VER >= 1400
- sprintf_s(s,"ASSIMP.binary-dump.%s",asctime(p));
+ sprintf_s(s,"ASSIMP.binary-dump.%s",asctime(p));
#else
- ai_snprintf(s,64,"ASSIMP.binary-dump.%s",asctime(p));
+ ai_snprintf(s,64,"ASSIMP.binary-dump.%s",asctime(p));
#endif
- out->Write( s, 44, 1 );
- // == 44 bytes
-
- Write<unsigned int>( out, ASSBIN_VERSION_MAJOR );
- Write<unsigned int>( out, ASSBIN_VERSION_MINOR );
- Write<unsigned int>( out, aiGetVersionRevision() );
- Write<unsigned int>( out, aiGetCompileFlags() );
- Write<uint16_t>( out, shortened );
- Write<uint16_t>( out, compressed );
- // == 20 bytes
-
- char buff[256];
- strncpy(buff,pFile,256);
- out->Write(buff,sizeof(char),256);
-
- char cmd[] = "\0";
- strncpy(buff,cmd,128);
- out->Write(buff,sizeof(char),128);
-
- // leave 64 bytes free for future extensions
- memset(buff,0xcd,64);
- out->Write(buff,sizeof(char),64);
- // == 435 bytes
-
- // ==== total header size: 512 bytes
- ai_assert( out->Tell() == ASSBIN_HEADER_LENGTH );
-
- // Up to here the data is uncompressed. For compressed files, the rest
- // is compressed using standard DEFLATE from zlib.
- if (compressed)
- {
- AssbinChunkWriter uncompressedStream( NULL, 0 );
- WriteBinaryScene( &uncompressedStream, pScene );
-
- uLongf uncompressedSize = static_cast<uLongf>(uncompressedStream.Tell());
- uLongf compressedSize = (uLongf)(uncompressedStream.Tell() * 1.001 + 12.);
- uint8_t* compressedBuffer = new uint8_t[ compressedSize ];
-
- compress2( compressedBuffer, &compressedSize, (const Bytef*)uncompressedStream.GetBufferPointer(), uncompressedSize, 9 );
+ out->Write( s, 44, 1 );
+ // == 44 bytes
+
+ Write<unsigned int>( out, ASSBIN_VERSION_MAJOR );
+ Write<unsigned int>( out, ASSBIN_VERSION_MINOR );
+ Write<unsigned int>( out, aiGetVersionRevision() );
+ Write<unsigned int>( out, aiGetCompileFlags() );
+ Write<uint16_t>( out, shortened );
+ Write<uint16_t>( out, compressed );
+ // == 20 bytes
+
+ char buff[256];
+ strncpy(buff,pFile,256);
+ out->Write(buff,sizeof(char),256);
+
+ char cmd[] = "\0";
+ strncpy(buff,cmd,128);
+ out->Write(buff,sizeof(char),128);
+
+ // leave 64 bytes free for future extensions
+ memset(buff,0xcd,64);
+ out->Write(buff,sizeof(char),64);
+ // == 435 bytes
+
+ // ==== total header size: 512 bytes
+ ai_assert( out->Tell() == ASSBIN_HEADER_LENGTH );
+
+ // Up to here the data is uncompressed. For compressed files, the rest
+ // is compressed using standard DEFLATE from zlib.
+ if (compressed)
+ {
+ AssbinChunkWriter uncompressedStream( NULL, 0 );
+ WriteBinaryScene( &uncompressedStream, pScene );
- out->Write( &uncompressedSize, sizeof(uint32_t), 1 );
- out->Write( compressedBuffer, sizeof(char), compressedSize );
+ uLongf uncompressedSize = static_cast<uLongf>(uncompressedStream.Tell());
+ uLongf compressedSize = (uLongf)compressBound(uncompressedSize);
+ uint8_t* compressedBuffer = new uint8_t[ compressedSize ];
- delete[] compressedBuffer;
- }
- else
+ int res = compress2( compressedBuffer, &compressedSize, (const Bytef*)uncompressedStream.GetBufferPointer(), uncompressedSize, 9 );
+ if(res != Z_OK)
{
- WriteBinaryScene( out, pScene );
+ delete [] compressedBuffer;
+ pIOSystem->Close(out);
+ throw DeadlyExportError("Compression failed.");
}
- pIOSystem->Close( out );
+ out->Write( &uncompressedSize, sizeof(uint32_t), 1 );
+ out->Write( compressedBuffer, sizeof(char), compressedSize );
+
+ delete[] compressedBuffer;
+ }
+ else
+ {
+ WriteBinaryScene( out, pScene );
}
- };
-void ExportSceneAssbin(const char* pFile, IOSystem* pIOSystem, const aiScene* pScene, const ExportProperties* pProperties)
-{
+ pIOSystem->Close( out );
+ }
+};
+
+void ExportSceneAssbin(const char* pFile, IOSystem* pIOSystem, const aiScene* pScene, const ExportProperties* /*pProperties*/) {
AssbinExport exporter;
exporter.WriteBinaryDump( pFile, pIOSystem, pScene );
}
diff --git a/code/AssbinExporter.h b/code/AssbinExporter.h
index 55bb9fc82..ee70d78b6 100644
--- a/code/AssbinExporter.h
+++ b/code/AssbinExporter.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -45,6 +46,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_ASSBINEXPORTER_H_INC
#define AI_ASSBINEXPORTER_H_INC
+#include <assimp/defs.h>
+
// nothing really needed here - reserved for future use like properties
+namespace Assimp {
+
+void ASSIMP_API ExportSceneAssbin(const char* pFile, IOSystem* pIOSystem, const aiScene* pScene, const ExportProperties* /*pProperties*/);
+
+}
-#endif
+#endif // AI_ASSBINEXPORTER_H_INC
diff --git a/code/AssbinLoader.cpp b/code/AssbinLoader.cpp
index 3ed58297c..321a0cfec 100644
--- a/code/AssbinLoader.cpp
+++ b/code/AssbinLoader.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -51,11 +52,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// internal headers
#include "AssbinLoader.h"
#include "assbin_chunks.h"
-#include "MemoryIOWrapper.h"
+#include <assimp/MemoryIOWrapper.h>
#include <assimp/mesh.h>
#include <assimp/anim.h>
#include <assimp/scene.h>
#include <assimp/importerdesc.h>
+#include <memory>
#ifdef ASSIMP_BUILD_NO_OWN_ZLIB
# include <zlib.h>
@@ -78,16 +80,17 @@ static const aiImporterDesc desc = {
"assbin"
};
-const aiImporterDesc* AssbinImporter::GetInfo() const
-{
+// -----------------------------------------------------------------------------------
+const aiImporterDesc* AssbinImporter::GetInfo() const {
return &desc;
}
-bool AssbinImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool /*checkSig*/ ) const
-{
+// -----------------------------------------------------------------------------------
+bool AssbinImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool /*checkSig*/ ) const {
IOStream * in = pIOHandler->Open(pFile);
- if (!in)
+ if (nullptr == in) {
return false;
+ }
char s[32];
in->Read( s, sizeof(char), 32 );
@@ -97,17 +100,19 @@ bool AssbinImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bo
return strncmp( s, "ASSIMP.binary-dump.", 19 ) == 0;
}
+// -----------------------------------------------------------------------------------
template <typename T>
-T Read(IOStream * stream)
-{
+T Read(IOStream * stream) {
T t;
- stream->Read( &t, sizeof(T), 1 );
+ size_t res = stream->Read( &t, sizeof(T), 1 );
+ if(res != 1)
+ throw DeadlyImportError("Unexpected EOF");
return t;
}
+// -----------------------------------------------------------------------------------
template <>
-aiVector3D Read<aiVector3D>(IOStream * stream)
-{
+aiVector3D Read<aiVector3D>(IOStream * stream) {
aiVector3D v;
v.x = Read<float>(stream);
v.y = Read<float>(stream);
@@ -115,9 +120,9 @@ aiVector3D Read<aiVector3D>(IOStream * stream)
return v;
}
+// -----------------------------------------------------------------------------------
template <>
-aiColor4D Read<aiColor4D>(IOStream * stream)
-{
+aiColor4D Read<aiColor4D>(IOStream * stream) {
aiColor4D c;
c.r = Read<float>(stream);
c.g = Read<float>(stream);
@@ -126,9 +131,9 @@ aiColor4D Read<aiColor4D>(IOStream * stream)
return c;
}
+// -----------------------------------------------------------------------------------
template <>
-aiQuaternion Read<aiQuaternion>(IOStream * stream)
-{
+aiQuaternion Read<aiQuaternion>(IOStream * stream) {
aiQuaternion v;
v.w = Read<float>(stream);
v.x = Read<float>(stream);
@@ -137,28 +142,29 @@ aiQuaternion Read<aiQuaternion>(IOStream * stream)
return v;
}
+// -----------------------------------------------------------------------------------
template <>
-aiString Read<aiString>(IOStream * stream)
-{
+aiString Read<aiString>(IOStream * stream) {
aiString s;
stream->Read(&s.length,4,1);
- stream->Read(s.data,s.length,1);
+ if(s.length)
+ stream->Read(s.data,s.length,1);
s.data[s.length] = 0;
return s;
}
+// -----------------------------------------------------------------------------------
template <>
-aiVertexWeight Read<aiVertexWeight>(IOStream * stream)
-{
+aiVertexWeight Read<aiVertexWeight>(IOStream * stream) {
aiVertexWeight w;
w.mVertexId = Read<unsigned int>(stream);
w.mWeight = Read<float>(stream);
return w;
}
+// -----------------------------------------------------------------------------------
template <>
-aiMatrix4x4 Read<aiMatrix4x4>(IOStream * stream)
-{
+aiMatrix4x4 Read<aiMatrix4x4>(IOStream * stream) {
aiMatrix4x4 m;
for (unsigned int i = 0; i < 4;++i) {
for (unsigned int i2 = 0; i2 < 4;++i2) {
@@ -168,76 +174,123 @@ aiMatrix4x4 Read<aiMatrix4x4>(IOStream * stream)
return m;
}
+// -----------------------------------------------------------------------------------
template <>
-aiVectorKey Read<aiVectorKey>(IOStream * stream)
-{
+aiVectorKey Read<aiVectorKey>(IOStream * stream) {
aiVectorKey v;
v.mTime = Read<double>(stream);
v.mValue = Read<aiVector3D>(stream);
return v;
}
+// -----------------------------------------------------------------------------------
template <>
-aiQuatKey Read<aiQuatKey>(IOStream * stream)
-{
+aiQuatKey Read<aiQuatKey>(IOStream * stream) {
aiQuatKey v;
v.mTime = Read<double>(stream);
v.mValue = Read<aiQuaternion>(stream);
return v;
}
+// -----------------------------------------------------------------------------------
template <typename T>
-void ReadArray(IOStream * stream, T * out, unsigned int size)
-{
- for (unsigned int i=0; i<size; i++) out[i] = Read<T>(stream);
+void ReadArray( IOStream *stream, T * out, unsigned int size) {
+ ai_assert( nullptr != stream );
+ ai_assert( nullptr != out );
+
+ for (unsigned int i=0; i<size; i++) {
+ out[i] = Read<T>(stream);
+ }
}
-template <typename T> void ReadBounds( IOStream * stream, T* /*p*/, unsigned int n )
-{
+// -----------------------------------------------------------------------------------
+template <typename T>
+void ReadBounds( IOStream * stream, T* /*p*/, unsigned int n ) {
// not sure what to do here, the data isn't really useful.
stream->Seek( sizeof(T) * n, aiOrigin_CUR );
}
-void AssbinImporter::ReadBinaryNode( IOStream * stream, aiNode** node, aiNode* parent )
-{
- uint32_t chunkID = Read<uint32_t>(stream);
- ai_assert(chunkID == ASSBIN_CHUNK_AINODE);
+// -----------------------------------------------------------------------------------
+void AssbinImporter::ReadBinaryNode( IOStream * stream, aiNode** onode, aiNode* parent ) {
+ if(Read<uint32_t>(stream) != ASSBIN_CHUNK_AINODE)
+ throw DeadlyImportError("Magic chunk identifiers are wrong!");
/*uint32_t size =*/ Read<uint32_t>(stream);
- *node = new aiNode();
+ std::unique_ptr<aiNode> node(new aiNode());
- (*node)->mName = Read<aiString>(stream);
- (*node)->mTransformation = Read<aiMatrix4x4>(stream);
- (*node)->mNumChildren = Read<unsigned int>(stream);
- (*node)->mNumMeshes = Read<unsigned int>(stream);
- if(parent)
- {
- (*node)->mParent = parent;
+ node->mName = Read<aiString>(stream);
+ node->mTransformation = Read<aiMatrix4x4>(stream);
+ unsigned numChildren = Read<unsigned int>(stream);
+ unsigned numMeshes = Read<unsigned int>(stream);
+ unsigned int nb_metadata = Read<unsigned int>(stream);
+
+ if(parent) {
+ node->mParent = parent;
}
- if ((*node)->mNumMeshes)
+ if (numMeshes)
{
- (*node)->mMeshes = new unsigned int[(*node)->mNumMeshes];
- for (unsigned int i = 0; i < (*node)->mNumMeshes; ++i) {
- (*node)->mMeshes[i] = Read<unsigned int>(stream);
+ node->mMeshes = new unsigned int[numMeshes];
+ for (unsigned int i = 0; i < numMeshes; ++i) {
+ node->mMeshes[i] = Read<unsigned int>(stream);
+ node->mNumMeshes++;
}
}
- if ((*node)->mNumChildren)
- {
- (*node)->mChildren = new aiNode*[(*node)->mNumChildren];
- for (unsigned int i = 0; i < (*node)->mNumChildren; ++i) {
- ReadBinaryNode( stream, &(*node)->mChildren[i], *node );
+ if (numChildren) {
+ node->mChildren = new aiNode*[numChildren];
+ for (unsigned int i = 0; i < numChildren; ++i) {
+ ReadBinaryNode( stream, &node->mChildren[i], node.get() );
+ node->mNumChildren++;
}
}
+ if ( nb_metadata > 0 ) {
+ node->mMetaData = aiMetadata::Alloc(nb_metadata);
+ for (unsigned int i = 0; i < nb_metadata; ++i) {
+ node->mMetaData->mKeys[i] = Read<aiString>(stream);
+ node->mMetaData->mValues[i].mType = (aiMetadataType) Read<uint16_t>(stream);
+ void* data = nullptr;
+
+ switch (node->mMetaData->mValues[i].mType) {
+ case AI_BOOL:
+ data = new bool(Read<bool>(stream));
+ break;
+ case AI_INT32:
+ data = new int32_t(Read<int32_t>(stream));
+ break;
+ case AI_UINT64:
+ data = new uint64_t(Read<uint64_t>(stream));
+ break;
+ case AI_FLOAT:
+ data = new float(Read<float>(stream));
+ break;
+ case AI_DOUBLE:
+ data = new double(Read<double>(stream));
+ break;
+ case AI_AISTRING:
+ data = new aiString(Read<aiString>(stream));
+ break;
+ case AI_AIVECTOR3D:
+ data = new aiVector3D(Read<aiVector3D>(stream));
+ break;
+#ifndef SWIG
+ case FORCE_32BIT:
+#endif // SWIG
+ default:
+ break;
+ }
+
+ node->mMetaData->mValues[i].mData = data;
+ }
+ }
+ *onode = node.release();
}
// -----------------------------------------------------------------------------------
-void AssbinImporter::ReadBinaryBone( IOStream * stream, aiBone* b )
-{
- uint32_t chunkID = Read<uint32_t>(stream);
- ai_assert(chunkID == ASSBIN_CHUNK_AIBONE);
+void AssbinImporter::ReadBinaryBone( IOStream * stream, aiBone* b ) {
+ if(Read<uint32_t>(stream) != ASSBIN_CHUNK_AIBONE)
+ throw DeadlyImportError("Magic chunk identifiers are wrong!");
/*uint32_t size =*/ Read<uint32_t>(stream);
b->mName = Read<aiString>(stream);
@@ -246,22 +299,23 @@ void AssbinImporter::ReadBinaryBone( IOStream * stream, aiBone* b )
// for the moment we write dumb min/max values for the bones, too.
// maybe I'll add a better, hash-like solution later
- if (shortened)
- {
+ if (shortened) {
ReadBounds(stream,b->mWeights,b->mNumWeights);
- } // else write as usual
- else
- {
+ } else {
+ // else write as usual
b->mWeights = new aiVertexWeight[b->mNumWeights];
ReadArray<aiVertexWeight>(stream,b->mWeights,b->mNumWeights);
}
}
-
-void AssbinImporter::ReadBinaryMesh( IOStream * stream, aiMesh* mesh )
-{
- uint32_t chunkID = Read<uint32_t>(stream);
- ai_assert(chunkID == ASSBIN_CHUNK_AIMESH);
+// -----------------------------------------------------------------------------------
+static bool fitsIntoUI16(unsigned int mNumVertices) {
+ return ( mNumVertices < (1u<<16) );
+}
+// -----------------------------------------------------------------------------------
+void AssbinImporter::ReadBinaryMesh( IOStream * stream, aiMesh* mesh ) {
+ if(Read<uint32_t>(stream) != ASSBIN_CHUNK_AIMESH)
+ throw DeadlyImportError("Magic chunk identifiers are wrong!");
/*uint32_t size =*/ Read<uint32_t>(stream);
mesh->mPrimitiveTypes = Read<unsigned int>(stream);
@@ -273,70 +327,61 @@ void AssbinImporter::ReadBinaryMesh( IOStream * stream, aiMesh* mesh )
// first of all, write bits for all existent vertex components
unsigned int c = Read<unsigned int>(stream);
- if (c & ASSBIN_MESH_HAS_POSITIONS)
- {
+ if (c & ASSBIN_MESH_HAS_POSITIONS) {
if (shortened) {
ReadBounds(stream,mesh->mVertices,mesh->mNumVertices);
- } // else write as usual
- else
- {
+ } else {
+ // else write as usual
mesh->mVertices = new aiVector3D[mesh->mNumVertices];
ReadArray<aiVector3D>(stream,mesh->mVertices,mesh->mNumVertices);
}
}
- if (c & ASSBIN_MESH_HAS_NORMALS)
- {
+ if (c & ASSBIN_MESH_HAS_NORMALS) {
if (shortened) {
ReadBounds(stream,mesh->mNormals,mesh->mNumVertices);
- } // else write as usual
- else
- {
+ } else {
+ // else write as usual
mesh->mNormals = new aiVector3D[mesh->mNumVertices];
ReadArray<aiVector3D>(stream,mesh->mNormals,mesh->mNumVertices);
}
}
- if (c & ASSBIN_MESH_HAS_TANGENTS_AND_BITANGENTS)
- {
+ if (c & ASSBIN_MESH_HAS_TANGENTS_AND_BITANGENTS) {
if (shortened) {
ReadBounds(stream,mesh->mTangents,mesh->mNumVertices);
ReadBounds(stream,mesh->mBitangents,mesh->mNumVertices);
- } // else write as usual
- else
- {
+ } else {
+ // else write as usual
mesh->mTangents = new aiVector3D[mesh->mNumVertices];
ReadArray<aiVector3D>(stream,mesh->mTangents,mesh->mNumVertices);
mesh->mBitangents = new aiVector3D[mesh->mNumVertices];
ReadArray<aiVector3D>(stream,mesh->mBitangents,mesh->mNumVertices);
}
}
- for (unsigned int n = 0; n < AI_MAX_NUMBER_OF_COLOR_SETS;++n)
- {
- if (!(c & ASSBIN_MESH_HAS_COLOR(n)))
+ for (unsigned int n = 0; n < AI_MAX_NUMBER_OF_COLOR_SETS;++n) {
+ if (!(c & ASSBIN_MESH_HAS_COLOR(n))) {
break;
+ }
- if (shortened)
- {
+ if (shortened) {
ReadBounds(stream,mesh->mColors[n],mesh->mNumVertices);
- } // else write as usual
- else
- {
+ } else {
+ // else write as usual
mesh->mColors[n] = new aiColor4D[mesh->mNumVertices];
ReadArray<aiColor4D>(stream,mesh->mColors[n],mesh->mNumVertices);
}
}
- for (unsigned int n = 0; n < AI_MAX_NUMBER_OF_TEXTURECOORDS;++n)
- {
- if (!(c & ASSBIN_MESH_HAS_TEXCOORD(n)))
+ for (unsigned int n = 0; n < AI_MAX_NUMBER_OF_TEXTURECOORDS;++n) {
+ if (!(c & ASSBIN_MESH_HAS_TEXCOORD(n))) {
break;
+ }
// write number of UV components
mesh->mNumUVComponents[n] = Read<unsigned int>(stream);
if (shortened) {
ReadBounds(stream,mesh->mTextureCoords[n],mesh->mNumVertices);
- } // else write as usual
- else
- {
+ } else {
+ // else write as usual
mesh->mTextureCoords[n] = new aiVector3D[mesh->mNumVertices];
ReadArray<aiVector3D>(stream,mesh->mTextureCoords[n],mesh->mNumVertices);
}
@@ -348,9 +393,8 @@ void AssbinImporter::ReadBinaryMesh( IOStream * stream, aiMesh* mesh )
// using Assimp's standard hashing function.
if (shortened) {
Read<unsigned int>(stream);
- }
- else // else write as usual
- {
+ } else {
+ // else write as usual
// if there are less than 2^16 vertices, we can simply use 16 bit integers ...
mesh->mFaces = new aiFace[mesh->mNumFaces];
for (unsigned int i = 0; i < mesh->mNumFaces;++i) {
@@ -361,12 +405,10 @@ void AssbinImporter::ReadBinaryMesh( IOStream * stream, aiMesh* mesh )
f.mIndices = new unsigned int[f.mNumIndices];
for (unsigned int a = 0; a < f.mNumIndices;++a) {
- if (mesh->mNumVertices < (1u<<16))
- {
+ // Check if unsigned short ( 16 bit ) are big enought for the indices
+ if ( fitsIntoUI16( mesh->mNumVertices ) ) {
f.mIndices[a] = Read<uint16_t>(stream);
- }
- else
- {
+ } else {
f.mIndices[a] = Read<unsigned int>(stream);
}
}
@@ -383,10 +425,10 @@ void AssbinImporter::ReadBinaryMesh( IOStream * stream, aiMesh* mesh )
}
}
-void AssbinImporter::ReadBinaryMaterialProperty(IOStream * stream, aiMaterialProperty* prop)
-{
- uint32_t chunkID = Read<uint32_t>(stream);
- ai_assert(chunkID == ASSBIN_CHUNK_AIMATERIALPROPERTY);
+// -----------------------------------------------------------------------------------
+void AssbinImporter::ReadBinaryMaterialProperty(IOStream * stream, aiMaterialProperty* prop) {
+ if(Read<uint32_t>(stream) != ASSBIN_CHUNK_AIMATERIALPROPERTY)
+ throw DeadlyImportError("Magic chunk identifiers are wrong!");
/*uint32_t size =*/ Read<uint32_t>(stream);
prop->mKey = Read<aiString>(stream);
@@ -400,10 +442,9 @@ void AssbinImporter::ReadBinaryMaterialProperty(IOStream * stream, aiMaterialPro
}
// -----------------------------------------------------------------------------------
-void AssbinImporter::ReadBinaryMaterial(IOStream * stream, aiMaterial* mat)
-{
- uint32_t chunkID = Read<uint32_t>(stream);
- ai_assert(chunkID == ASSBIN_CHUNK_AIMATERIAL);
+void AssbinImporter::ReadBinaryMaterial(IOStream * stream, aiMaterial* mat) {
+ if(Read<uint32_t>(stream) != ASSBIN_CHUNK_AIMATERIAL)
+ throw DeadlyImportError("Magic chunk identifiers are wrong!");
/*uint32_t size =*/ Read<uint32_t>(stream);
mat->mNumAllocated = mat->mNumProperties = Read<unsigned int>(stream);
@@ -422,10 +463,9 @@ void AssbinImporter::ReadBinaryMaterial(IOStream * stream, aiMaterial* mat)
}
// -----------------------------------------------------------------------------------
-void AssbinImporter::ReadBinaryNodeAnim(IOStream * stream, aiNodeAnim* nd)
-{
- uint32_t chunkID = Read<uint32_t>(stream);
- ai_assert(chunkID == ASSBIN_CHUNK_AINODEANIM);
+void AssbinImporter::ReadBinaryNodeAnim(IOStream * stream, aiNodeAnim* nd) {
+ if(Read<uint32_t>(stream) != ASSBIN_CHUNK_AINODEANIM)
+ throw DeadlyImportError("Magic chunk identifiers are wrong!");
/*uint32_t size =*/ Read<uint32_t>(stream);
nd->mNodeName = Read<aiString>(stream);
@@ -449,9 +489,8 @@ void AssbinImporter::ReadBinaryNodeAnim(IOStream * stream, aiNodeAnim* nd)
if (shortened) {
ReadBounds(stream,nd->mRotationKeys,nd->mNumRotationKeys);
- } // else write as usual
- else
- {
+ } else {
+ // else write as usual
nd->mRotationKeys = new aiQuatKey[nd->mNumRotationKeys];
ReadArray<aiQuatKey>(stream,nd->mRotationKeys,nd->mNumRotationKeys);
}
@@ -460,21 +499,18 @@ void AssbinImporter::ReadBinaryNodeAnim(IOStream * stream, aiNodeAnim* nd)
if (shortened) {
ReadBounds(stream,nd->mScalingKeys,nd->mNumScalingKeys);
- } // else write as usual
- else
- {
+ } else {
+ // else write as usual
nd->mScalingKeys = new aiVectorKey[nd->mNumScalingKeys];
ReadArray<aiVectorKey>(stream,nd->mScalingKeys,nd->mNumScalingKeys);
}
}
}
-
// -----------------------------------------------------------------------------------
-void AssbinImporter::ReadBinaryAnim( IOStream * stream, aiAnimation* anim )
-{
- uint32_t chunkID = Read<uint32_t>(stream);
- ai_assert(chunkID == ASSBIN_CHUNK_AIANIMATION);
+void AssbinImporter::ReadBinaryAnim( IOStream * stream, aiAnimation* anim ) {
+ if(Read<uint32_t>(stream) != ASSBIN_CHUNK_AIANIMATION)
+ throw DeadlyImportError("Magic chunk identifiers are wrong!");
/*uint32_t size =*/ Read<uint32_t>(stream);
anim->mName = Read<aiString> (stream);
@@ -482,8 +518,7 @@ void AssbinImporter::ReadBinaryAnim( IOStream * stream, aiAnimation* anim )
anim->mTicksPerSecond = Read<double> (stream);
anim->mNumChannels = Read<unsigned int>(stream);
- if (anim->mNumChannels)
- {
+ if (anim->mNumChannels) {
anim->mChannels = new aiNodeAnim*[ anim->mNumChannels ];
for (unsigned int a = 0; a < anim->mNumChannels;++a) {
anim->mChannels[a] = new aiNodeAnim();
@@ -492,10 +527,10 @@ void AssbinImporter::ReadBinaryAnim( IOStream * stream, aiAnimation* anim )
}
}
-void AssbinImporter::ReadBinaryTexture(IOStream * stream, aiTexture* tex)
-{
- uint32_t chunkID = Read<uint32_t>(stream);
- ai_assert(chunkID == ASSBIN_CHUNK_AITEXTURE);
+// -----------------------------------------------------------------------------------
+void AssbinImporter::ReadBinaryTexture(IOStream * stream, aiTexture* tex) {
+ if(Read<uint32_t>(stream) != ASSBIN_CHUNK_AITEXTURE)
+ throw DeadlyImportError("Magic chunk identifiers are wrong!");
/*uint32_t size =*/ Read<uint32_t>(stream);
tex->mWidth = Read<unsigned int>(stream);
@@ -506,20 +541,17 @@ void AssbinImporter::ReadBinaryTexture(IOStream * stream, aiTexture* tex)
if (!tex->mHeight) {
tex->pcData = new aiTexel[ tex->mWidth ];
stream->Read(tex->pcData,1,tex->mWidth);
- }
- else {
+ } else {
tex->pcData = new aiTexel[ tex->mWidth*tex->mHeight ];
stream->Read(tex->pcData,1,tex->mWidth*tex->mHeight*4);
}
}
-
}
// -----------------------------------------------------------------------------------
-void AssbinImporter::ReadBinaryLight( IOStream * stream, aiLight* l )
-{
- uint32_t chunkID = Read<uint32_t>(stream);
- ai_assert(chunkID == ASSBIN_CHUNK_AILIGHT);
+void AssbinImporter::ReadBinaryLight( IOStream * stream, aiLight* l ) {
+ if(Read<uint32_t>(stream) != ASSBIN_CHUNK_AILIGHT)
+ throw DeadlyImportError("Magic chunk identifiers are wrong!");
/*uint32_t size =*/ Read<uint32_t>(stream);
l->mName = Read<aiString>(stream);
@@ -539,14 +571,12 @@ void AssbinImporter::ReadBinaryLight( IOStream * stream, aiLight* l )
l->mAngleInnerCone = Read<float>(stream);
l->mAngleOuterCone = Read<float>(stream);
}
-
}
// -----------------------------------------------------------------------------------
-void AssbinImporter::ReadBinaryCamera( IOStream * stream, aiCamera* cam )
-{
- uint32_t chunkID = Read<uint32_t>(stream);
- ai_assert(chunkID == ASSBIN_CHUNK_AICAMERA);
+void AssbinImporter::ReadBinaryCamera( IOStream * stream, aiCamera* cam ) {
+ if(Read<uint32_t>(stream) != ASSBIN_CHUNK_AICAMERA)
+ throw DeadlyImportError("Magic chunk identifiers are wrong!");
/*uint32_t size =*/ Read<uint32_t>(stream);
cam->mName = Read<aiString>(stream);
@@ -559,10 +589,10 @@ void AssbinImporter::ReadBinaryCamera( IOStream * stream, aiCamera* cam )
cam->mAspect = Read<float>(stream);
}
-void AssbinImporter::ReadBinaryScene( IOStream * stream, aiScene* scene )
-{
- uint32_t chunkID = Read<uint32_t>(stream);
- ai_assert(chunkID == ASSBIN_CHUNK_AISCENE);
+// -----------------------------------------------------------------------------------
+void AssbinImporter::ReadBinaryScene( IOStream * stream, aiScene* scene ) {
+ if(Read<uint32_t>(stream) != ASSBIN_CHUNK_AISCENE)
+ throw DeadlyImportError("Magic chunk identifiers are wrong!");
/*uint32_t size =*/ Read<uint32_t>(stream);
scene->mFlags = Read<unsigned int>(stream);
@@ -574,13 +604,13 @@ void AssbinImporter::ReadBinaryScene( IOStream * stream, aiScene* scene )
scene->mNumCameras = Read<unsigned int>(stream);
// Read node graph
- scene->mRootNode = new aiNode[1];
+ //scene->mRootNode = new aiNode[1];
ReadBinaryNode( stream, &scene->mRootNode, (aiNode*)NULL );
// Read all meshes
- if (scene->mNumMeshes)
- {
+ if (scene->mNumMeshes) {
scene->mMeshes = new aiMesh*[scene->mNumMeshes];
+ memset(scene->mMeshes, 0, scene->mNumMeshes*sizeof(aiMesh*));
for (unsigned int i = 0; i < scene->mNumMeshes;++i) {
scene->mMeshes[i] = new aiMesh();
ReadBinaryMesh( stream,scene->mMeshes[i]);
@@ -588,9 +618,9 @@ void AssbinImporter::ReadBinaryScene( IOStream * stream, aiScene* scene )
}
// Read materials
- if (scene->mNumMaterials)
- {
+ if (scene->mNumMaterials) {
scene->mMaterials = new aiMaterial*[scene->mNumMaterials];
+ memset(scene->mMaterials, 0, scene->mNumMaterials*sizeof(aiMaterial*));
for (unsigned int i = 0; i< scene->mNumMaterials; ++i) {
scene->mMaterials[i] = new aiMaterial();
ReadBinaryMaterial(stream,scene->mMaterials[i]);
@@ -598,9 +628,9 @@ void AssbinImporter::ReadBinaryScene( IOStream * stream, aiScene* scene )
}
// Read all animations
- if (scene->mNumAnimations)
- {
+ if (scene->mNumAnimations) {
scene->mAnimations = new aiAnimation*[scene->mNumAnimations];
+ memset(scene->mAnimations, 0, scene->mNumAnimations*sizeof(aiAnimation*));
for (unsigned int i = 0; i < scene->mNumAnimations;++i) {
scene->mAnimations[i] = new aiAnimation();
ReadBinaryAnim(stream,scene->mAnimations[i]);
@@ -608,9 +638,9 @@ void AssbinImporter::ReadBinaryScene( IOStream * stream, aiScene* scene )
}
// Read all textures
- if (scene->mNumTextures)
- {
+ if (scene->mNumTextures) {
scene->mTextures = new aiTexture*[scene->mNumTextures];
+ memset(scene->mTextures, 0, scene->mNumTextures*sizeof(aiTexture*));
for (unsigned int i = 0; i < scene->mNumTextures;++i) {
scene->mTextures[i] = new aiTexture();
ReadBinaryTexture(stream,scene->mTextures[i]);
@@ -618,9 +648,9 @@ void AssbinImporter::ReadBinaryScene( IOStream * stream, aiScene* scene )
}
// Read lights
- if (scene->mNumLights)
- {
+ if (scene->mNumLights) {
scene->mLights = new aiLight*[scene->mNumLights];
+ memset(scene->mLights, 0, scene->mNumLights*sizeof(aiLight*));
for (unsigned int i = 0; i < scene->mNumLights;++i) {
scene->mLights[i] = new aiLight();
ReadBinaryLight(stream,scene->mLights[i]);
@@ -628,9 +658,9 @@ void AssbinImporter::ReadBinaryScene( IOStream * stream, aiScene* scene )
}
// Read cameras
- if (scene->mNumCameras)
- {
+ if (scene->mNumCameras) {
scene->mCameras = new aiCamera*[scene->mNumCameras];
+ memset(scene->mCameras, 0, scene->mNumCameras*sizeof(aiCamera*));
for (unsigned int i = 0; i < scene->mNumCameras;++i) {
scene->mCameras[i] = new aiCamera();
ReadBinaryCamera(stream,scene->mCameras[i]);
@@ -639,16 +669,22 @@ void AssbinImporter::ReadBinaryScene( IOStream * stream, aiScene* scene )
}
-void AssbinImporter::InternReadFile( const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler )
-{
+// -----------------------------------------------------------------------------------
+void AssbinImporter::InternReadFile( const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler ) {
IOStream * stream = pIOHandler->Open(pFile,"rb");
- if (!stream)
+ if (nullptr == stream) {
return;
+ }
- stream->Seek( 44, aiOrigin_CUR ); // signature
+ // signature
+ stream->Seek( 44, aiOrigin_CUR );
+
+ unsigned int versionMajor = Read<unsigned int>(stream);
+ unsigned int versionMinor = Read<unsigned int>(stream);
+ if (versionMinor != ASSBIN_VERSION_MINOR || versionMajor != ASSBIN_VERSION_MAJOR) {
+ throw DeadlyImportError( "Invalid version, data format not compatible!" );
+ }
- /*unsigned int versionMajor =*/ Read<unsigned int>(stream);
- /*unsigned int versionMinor =*/ Read<unsigned int>(stream);
/*unsigned int versionRevision =*/ Read<unsigned int>(stream);
/*unsigned int compileFlags =*/ Read<unsigned int>(stream);
@@ -662,17 +698,24 @@ void AssbinImporter::InternReadFile( const std::string& pFile, aiScene* pScene,
stream->Seek( 128, aiOrigin_CUR ); // options
stream->Seek( 64, aiOrigin_CUR ); // padding
- if (compressed)
- {
+ if (compressed) {
uLongf uncompressedSize = Read<uint32_t>(stream);
uLongf compressedSize = static_cast<uLongf>(stream->FileSize() - stream->Tell());
unsigned char * compressedData = new unsigned char[ compressedSize ];
- stream->Read( compressedData, 1, compressedSize );
+ size_t len = stream->Read( compressedData, 1, compressedSize );
+ ai_assert(len == compressedSize);
unsigned char * uncompressedData = new unsigned char[ uncompressedSize ];
- uncompress( uncompressedData, &uncompressedSize, compressedData, compressedSize );
+ int res = uncompress( uncompressedData, &uncompressedSize, compressedData, len );
+ if(res != Z_OK)
+ {
+ delete [] uncompressedData;
+ delete [] compressedData;
+ pIOHandler->Close(stream);
+ throw DeadlyImportError("Zlib decompression failed.");
+ }
MemoryIOStream io( uncompressedData, uncompressedSize );
@@ -680,9 +723,7 @@ void AssbinImporter::InternReadFile( const std::string& pFile, aiScene* pScene,
delete[] uncompressedData;
delete[] compressedData;
- }
- else
- {
+ } else {
ReadBinaryScene(stream,pScene);
}
diff --git a/code/AssbinLoader.h b/code/AssbinLoader.h
index fc28d1667..37799a2c8 100644
--- a/code/AssbinLoader.h
+++ b/code/AssbinLoader.h
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -46,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_ASSBINIMPORTER_H_INC
#define AI_ASSBINIMPORTER_H_INC
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
struct aiMesh;
struct aiNode;
@@ -69,33 +70,33 @@ namespace Assimp {
class AssbinImporter : public BaseImporter
{
private:
- bool shortened;
- bool compressed;
-protected:
+ bool shortened;
+ bool compressed;
public:
- virtual bool CanRead(
- const std::string& pFile,
- IOSystem* pIOHandler,
- bool checkSig
+ virtual bool CanRead(
+ const std::string& pFile,
+ IOSystem* pIOHandler,
+ bool checkSig
) const;
- virtual const aiImporterDesc* GetInfo() const;
- virtual void InternReadFile(
+ virtual const aiImporterDesc* GetInfo() const;
+ virtual void InternReadFile(
const std::string& pFile,
- aiScene* pScene,
- IOSystem* pIOHandler
+ aiScene* pScene,
+ IOSystem* pIOHandler
);
- void ReadBinaryScene( IOStream * stream, aiScene* pScene );
- void ReadBinaryNode( IOStream * stream, aiNode** mRootNode, aiNode* parent );
- void ReadBinaryMesh( IOStream * stream, aiMesh* mesh );
- void ReadBinaryBone( IOStream * stream, aiBone* bone );
- void ReadBinaryMaterial(IOStream * stream, aiMaterial* mat);
- void ReadBinaryMaterialProperty(IOStream * stream, aiMaterialProperty* prop);
- void ReadBinaryNodeAnim(IOStream * stream, aiNodeAnim* nd);
- void ReadBinaryAnim( IOStream * stream, aiAnimation* anim );
- void ReadBinaryTexture(IOStream * stream, aiTexture* tex);
- void ReadBinaryLight( IOStream * stream, aiLight* l );
- void ReadBinaryCamera( IOStream * stream, aiCamera* cam );
+ void ReadHeader();
+ void ReadBinaryScene( IOStream * stream, aiScene* pScene );
+ void ReadBinaryNode( IOStream * stream, aiNode** mRootNode, aiNode* parent );
+ void ReadBinaryMesh( IOStream * stream, aiMesh* mesh );
+ void ReadBinaryBone( IOStream * stream, aiBone* bone );
+ void ReadBinaryMaterial(IOStream * stream, aiMaterial* mat);
+ void ReadBinaryMaterialProperty(IOStream * stream, aiMaterialProperty* prop);
+ void ReadBinaryNodeAnim(IOStream * stream, aiNodeAnim* nd);
+ void ReadBinaryAnim( IOStream * stream, aiAnimation* anim );
+ void ReadBinaryTexture(IOStream * stream, aiTexture* tex);
+ void ReadBinaryLight( IOStream * stream, aiLight* l );
+ void ReadBinaryCamera( IOStream * stream, aiCamera* cam );
};
} // end of namespace Assimp
diff --git a/code/Assimp.cpp b/code/Assimp.cpp
index 9269f905e..87f436602 100644
--- a/code/Assimp.cpp
+++ b/code/Assimp.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -49,13 +50,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/Importer.hpp>
#include <assimp/importerdesc.h>
#include <assimp/scene.h>
+#include <assimp/GenericProperty.h>
+#include <assimp/Exceptional.h>
+#include <assimp/BaseImporter.h>
-#include "GenericProperty.h"
#include "CInterfaceIOWrapper.h"
#include "Importer.h"
-#include "Exceptional.h"
#include "ScenePrivate.h"
-#include "BaseImporter.h"
+
#include <list>
// ------------------------------------------------------------------------------------------------
@@ -106,7 +108,6 @@ namespace Assimp {
static std::mutex gLogStreamMutex;
#endif
-
// ------------------------------------------------------------------------------------------------
// Custom LogStream implementation for the C-API
class LogToCallbackRedirector : public LogStream {
@@ -145,7 +146,7 @@ private:
// ------------------------------------------------------------------------------------------------
void ReportSceneNotFoundError() {
- DefaultLogger::get()->error("Unable to find the Assimp::Importer for this aiScene. "
+ ASSIMP_LOG_ERROR("Unable to find the Assimp::Importer for this aiScene. "
"The C-API does not accept scenes produced by the C++ API and vice versa");
ai_assert(false);
diff --git a/code/AssimpCExport.cpp b/code/AssimpCExport.cpp
index b8d3264a1..caf51a08c 100644
--- a/code/AssimpCExport.cpp
+++ b/code/AssimpCExport.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/AssxmlExporter.cpp b/code/AssxmlExporter.cpp
index 8019232c0..c9e125d0d 100644
--- a/code/AssxmlExporter.cpp
+++ b/code/AssxmlExporter.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -41,6 +42,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/** @file AssxmlExporter.cpp
* ASSXML exporter main code
*/
+
+#ifndef ASSIMP_BUILD_NO_EXPORT
+#ifndef ASSIMP_BUILD_NO_ASSXML_EXPORTER
+
#include <stdarg.h>
#include <assimp/version.h>
#include "ProcessHelper.h"
@@ -57,9 +62,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <time.h>
#include <stdio.h>
-#ifndef ASSIMP_BUILD_NO_EXPORT
-#ifndef ASSIMP_BUILD_NO_ASSXML_EXPORTER
-
using namespace Assimp;
namespace Assimp {
@@ -631,7 +633,7 @@ void WriteDump(const aiScene* scene, IOStream* io, bool shortened) {
} // end of namespace AssxmlExport
-void ExportSceneAssxml(const char* pFile, IOSystem* pIOSystem, const aiScene* pScene, const ExportProperties* pProperties)
+void ExportSceneAssxml(const char* pFile, IOSystem* pIOSystem, const aiScene* pScene, const ExportProperties* /*pProperties*/)
{
IOStream * out = pIOSystem->Open( pFile, "wt" );
if (!out) return;
diff --git a/code/AssxmlExporter.h b/code/AssxmlExporter.h
index 9694f74a3..3db496db2 100644
--- a/code/AssxmlExporter.h
+++ b/code/AssxmlExporter.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/B3DImporter.cpp b/code/B3DImporter.cpp
index 5de7bd67c..ce8bd5159 100644
--- a/code/B3DImporter.cpp
+++ b/code/B3DImporter.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -51,7 +52,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "B3DImporter.h"
#include "TextureTransform.h"
#include "ConvertToLHProcess.h"
-#include "StringUtils.h"
+#include <assimp/StringUtils.h>
#include <memory>
#include <assimp/IOSystem.hpp>
#include <assimp/anim.h>
@@ -82,6 +83,19 @@ static const aiImporterDesc desc = {
//#define DEBUG_B3D
+template<typename T>
+void DeleteAllBarePointers(std::vector<T>& x)
+{
+ for(auto p : x)
+ {
+ delete p;
+ }
+}
+
+B3DImporter::~B3DImporter()
+{
+}
+
// ------------------------------------------------------------------------------------------------
bool B3DImporter::CanRead( const std::string& pFile, IOSystem* /*pIOHandler*/, bool /*checkSig*/) const{
@@ -157,7 +171,8 @@ int B3DImporter::ReadByte(){
// ------------------------------------------------------------------------------------------------
int B3DImporter::ReadInt(){
if( _pos+4<=_buf.size() ){
- int n=*(int*)&_buf[_pos];
+ int n;
+ memcpy(&n, &_buf[_pos], 4);
_pos+=4;
return n;
}
@@ -168,7 +183,8 @@ int B3DImporter::ReadInt(){
// ------------------------------------------------------------------------------------------------
float B3DImporter::ReadFloat(){
if( _pos+4<=_buf.size() ){
- float n=*(float*)&_buf[_pos];
+ float n;
+ memcpy(&n, &_buf[_pos], 4);
_pos+=4;
return n;
}
@@ -251,6 +267,21 @@ T *B3DImporter::to_array( const vector<T> &v ){
return p;
}
+
+// ------------------------------------------------------------------------------------------------
+template<class T>
+T **unique_to_array( vector<std::unique_ptr<T> > &v ){
+ if( v.empty() ) {
+ return 0;
+ }
+ T **p = new T*[ v.size() ];
+ for( size_t i = 0; i < v.size(); ++i ){
+ p[i] = v[i].release();
+ }
+ return p;
+}
+
+
// ------------------------------------------------------------------------------------------------
void B3DImporter::ReadTEXS(){
while( ChunkSize() ){
@@ -279,8 +310,7 @@ void B3DImporter::ReadBRUS(){
/*int blend=**/ReadInt();
int fx=ReadInt();
- aiMaterial *mat=new aiMaterial;
- _materials.push_back( mat );
+ std::unique_ptr<aiMaterial> mat(new aiMaterial);
// Name
aiString ainame( name );
@@ -317,6 +347,7 @@ void B3DImporter::ReadBRUS(){
mat->AddProperty( &texname,AI_MATKEY_TEXTURE_DIFFUSE(0) );
}
}
+ _materials.emplace_back( std::move(mat) );
}
}
@@ -370,8 +401,7 @@ void B3DImporter::ReadTRIS( int v0 ){
Fail( "Bad material id" );
}
- aiMesh *mesh=new aiMesh;
- _meshes.push_back( mesh );
+ std::unique_ptr<aiMesh> mesh(new aiMesh);
mesh->mMaterialIndex=matid;
mesh->mNumFaces=0;
@@ -399,6 +429,8 @@ void B3DImporter::ReadTRIS( int v0 ){
++mesh->mNumFaces;
++face;
}
+
+ _meshes.emplace_back( std::move(mesh) );
}
// ------------------------------------------------------------------------------------------------
@@ -484,11 +516,11 @@ void B3DImporter::ReadANIM(){
int frames=ReadInt();
float fps=ReadFloat();
- aiAnimation *anim=new aiAnimation;
- _animations.push_back( anim );
+ std::unique_ptr<aiAnimation> anim(new aiAnimation);
anim->mDuration=frames;
anim->mTicksPerSecond=fps;
+ _animations.emplace_back( std::move(anim) );
}
// ------------------------------------------------------------------------------------------------
@@ -515,7 +547,7 @@ aiNode *B3DImporter::ReadNODE( aiNode *parent ){
node->mParent=parent;
node->mTransformation=tform;
- aiNodeAnim *nodeAnim=0;
+ std::unique_ptr<aiNodeAnim> nodeAnim;
vector<unsigned> meshes;
vector<aiNode*> children;
@@ -533,11 +565,10 @@ aiNode *B3DImporter::ReadNODE( aiNode *parent ){
ReadANIM();
}else if( t=="KEYS" ){
if( !nodeAnim ){
- nodeAnim=new aiNodeAnim;
- _nodeAnims.push_back( nodeAnim );
+ nodeAnim.reset(new aiNodeAnim);
nodeAnim->mNodeName=node->mName;
}
- ReadKEYS( nodeAnim );
+ ReadKEYS( nodeAnim.get() );
}else if( t=="NODE" ){
aiNode *child=ReadNODE( node );
children.push_back( child );
@@ -545,6 +576,10 @@ aiNode *B3DImporter::ReadNODE( aiNode *parent ){
ExitChunk();
}
+ if (nodeAnim) {
+ _nodeAnims.emplace_back( std::move(nodeAnim) );
+ }
+
node->mNumMeshes= static_cast<unsigned int>(meshes.size());
node->mMeshes=to_array( meshes );
@@ -558,13 +593,18 @@ aiNode *B3DImporter::ReadNODE( aiNode *parent ){
void B3DImporter::ReadBB3D( aiScene *scene ){
_textures.clear();
+
_materials.clear();
_vertices.clear();
+
_meshes.clear();
+ DeleteAllBarePointers(_nodes);
_nodes.clear();
+
_nodeAnims.clear();
+
_animations.clear();
string t=ReadChunk();
@@ -574,7 +614,7 @@ void B3DImporter::ReadBB3D( aiScene *scene ){
if (!DefaultLogger::isNullLogger()) {
char dmp[128];
ai_snprintf(dmp, 128, "B3D file format version: %i",version);
- DefaultLogger::get()->info(dmp);
+ ASSIMP_LOG_INFO(dmp);
}
while( ChunkSize() ){
@@ -600,7 +640,7 @@ void B3DImporter::ReadBB3D( aiScene *scene ){
aiNode *node=_nodes[i];
for( size_t j=0;j<node->mNumMeshes;++j ){
- aiMesh *mesh=_meshes[node->mMeshes[j]];
+ aiMesh *mesh = _meshes[node->mMeshes[j]].get();
int n_tris=mesh->mNumFaces;
int n_verts=mesh->mNumVertices=n_tris * 3;
@@ -663,27 +703,28 @@ void B3DImporter::ReadBB3D( aiScene *scene ){
//nodes
scene->mRootNode=_nodes[0];
+ _nodes.clear(); // node ownership now belongs to scene
//material
if( !_materials.size() ){
- _materials.push_back( new aiMaterial );
+ _materials.emplace_back( std::unique_ptr<aiMaterial>(new aiMaterial) );
}
scene->mNumMaterials= static_cast<unsigned int>(_materials.size());
- scene->mMaterials=to_array( _materials );
+ scene->mMaterials = unique_to_array( _materials );
//meshes
scene->mNumMeshes= static_cast<unsigned int>(_meshes.size());
- scene->mMeshes=to_array( _meshes );
+ scene->mMeshes = unique_to_array( _meshes );
//animations
if( _animations.size()==1 && _nodeAnims.size() ){
- aiAnimation *anim=_animations.back();
+ aiAnimation *anim = _animations.back().get();
anim->mNumChannels=static_cast<unsigned int>(_nodeAnims.size());
- anim->mChannels=to_array( _nodeAnims );
+ anim->mChannels = unique_to_array( _nodeAnims );
scene->mNumAnimations=static_cast<unsigned int>(_animations.size());
- scene->mAnimations=to_array( _animations );
+ scene->mAnimations=unique_to_array( _animations );
}
// convert to RH
diff --git a/code/B3DImporter.h b/code/B3DImporter.h
index 4d3576dc3..3cb66e5c7 100644
--- a/code/B3DImporter.h
+++ b/code/B3DImporter.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -47,8 +48,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/types.h>
#include <assimp/mesh.h>
#include <assimp/material.h>
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
+#include <memory>
#include <vector>
struct aiNodeAnim;
@@ -59,6 +61,8 @@ namespace Assimp{
class B3DImporter : public BaseImporter{
public:
+ B3DImporter() = default;
+ virtual ~B3DImporter();
virtual bool CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const;
@@ -114,15 +118,15 @@ private:
std::vector<unsigned> _stack;
std::vector<std::string> _textures;
- std::vector<aiMaterial*> _materials;
+ std::vector<std::unique_ptr<aiMaterial> > _materials;
int _vflags,_tcsets,_tcsize;
std::vector<Vertex> _vertices;
std::vector<aiNode*> _nodes;
- std::vector<aiMesh*> _meshes;
- std::vector<aiNodeAnim*> _nodeAnims;
- std::vector<aiAnimation*> _animations;
+ std::vector<std::unique_ptr<aiMesh> > _meshes;
+ std::vector<std::unique_ptr<aiNodeAnim> > _nodeAnims;
+ std::vector<std::unique_ptr<aiAnimation> > _animations;
};
}
diff --git a/code/BVHLoader.cpp b/code/BVHLoader.cpp
index c20cbec4e..cba58d056 100644
--- a/code/BVHLoader.cpp
+++ b/code/BVHLoader.cpp
@@ -4,7 +4,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -45,14 +46,15 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_NO_BVH_IMPORTER
#include "BVHLoader.h"
-#include "fast_atof.h"
-#include "SkeletonMeshBuilder.h"
+#include <assimp/fast_atof.h>
+#include <assimp/SkeletonMeshBuilder.h>
#include <assimp/Importer.hpp>
#include <memory>
-#include "TinyFormatter.h"
+#include <assimp/TinyFormatter.h>
#include <assimp/IOSystem.hpp>
#include <assimp/scene.h>
#include <assimp/importerdesc.h>
+#include <map>
using namespace Assimp;
using namespace Assimp::Formatter;
@@ -198,6 +200,7 @@ aiNode* BVHLoader::ReadNode()
Node& internNode = mNodes.back();
// now read the node's contents
+ std::string siteToken;
while( 1)
{
std::string token = GetNextToken();
@@ -217,7 +220,8 @@ aiNode* BVHLoader::ReadNode()
else if( token == "End")
{
// The real symbol is "End Site". Second part comes in a separate token
- std::string siteToken = GetNextToken();
+ siteToken.clear();
+ siteToken = GetNextToken();
if( siteToken != "Site")
ThrowException( format() << "Expected \"End Site\" keyword, but found \"" << token << " " << siteToken << "\"." );
@@ -261,21 +265,18 @@ aiNode* BVHLoader::ReadEndSite( const std::string& pParentName)
aiNode* node = new aiNode( "EndSite_" + pParentName);
// now read the node's contents. Only possible entry is "OFFSET"
- while( 1)
- {
- std::string token = GetNextToken();
+ std::string token;
+ while( 1) {
+ token.clear();
+ token = GetNextToken();
// end node's offset
- if( token == "OFFSET")
- {
+ if( token == "OFFSET") {
ReadNodeOffset( node);
- }
- else if( token == "}")
- {
+ } else if( token == "}") {
// we're done with the end node
break;
- } else
- {
+ } else {
// everything else is a parse error
ThrowException( format() << "Unknown keyword \"" << token << "\"." );
}
@@ -295,8 +296,10 @@ void BVHLoader::ReadNodeOffset( aiNode* pNode)
offset.z = GetNextTokenAsFloat();
// build a transformation matrix from it
- pNode->mTransformation = aiMatrix4x4( 1.0f, 0.0f, 0.0f, offset.x, 0.0f, 1.0f, 0.0f, offset.y,
- 0.0f, 0.0f, 1.0f, offset.z, 0.0f, 0.0f, 0.0f, 1.0f);
+ pNode->mTransformation = aiMatrix4x4( 1.0f, 0.0f, 0.0f, offset.x,
+ 0.0f, 1.0f, 0.0f, offset.y,
+ 0.0f, 0.0f, 1.0f, offset.z,
+ 0.0f, 0.0f, 0.0f, 1.0f);
}
// ------------------------------------------------------------------------------------------------
@@ -459,6 +462,13 @@ void BVHLoader::CreateAnimation( aiScene* pScene)
aiNodeAnim* nodeAnim = new aiNodeAnim;
anim->mChannels[a] = nodeAnim;
nodeAnim->mNodeName.Set( nodeName);
+ std::map<BVHLoader::ChannelType, int> channelMap;
+
+ //Build map of channels
+ for (unsigned int channel = 0; channel < node.mChannels.size(); ++channel)
+ {
+ channelMap[node.mChannels[channel]] = channel;
+ }
// translational part, if given
if( node.mChannels.size() == 6)
@@ -470,16 +480,32 @@ void BVHLoader::CreateAnimation( aiScene* pScene)
{
poskey->mTime = double( fr);
- // Now compute all translations in the right order
- for( unsigned int channel = 0; channel < 3; ++channel)
+ // Now compute all translations
+ for(BVHLoader::ChannelType channel = Channel_PositionX; channel <= Channel_PositionZ; channel = (BVHLoader::ChannelType)(channel +1))
{
- switch( node.mChannels[channel])
- {
- case Channel_PositionX: poskey->mValue.x = node.mChannelValues[fr * node.mChannels.size() + channel]; break;
- case Channel_PositionY: poskey->mValue.y = node.mChannelValues[fr * node.mChannels.size() + channel]; break;
- case Channel_PositionZ: poskey->mValue.z = node.mChannelValues[fr * node.mChannels.size() + channel]; break;
- default: throw DeadlyImportError( "Unexpected animation channel setup at node " + nodeName );
- }
+ //Find channel in node
+ std::map<BVHLoader::ChannelType, int>::iterator mapIter = channelMap.find(channel);
+
+ if (mapIter == channelMap.end())
+ throw DeadlyImportError("Missing position channel in node " + nodeName);
+ else {
+ int channelIdx = mapIter->second;
+ switch (channel) {
+ case Channel_PositionX:
+ poskey->mValue.x = node.mChannelValues[fr * node.mChannels.size() + channelIdx];
+ break;
+ case Channel_PositionY:
+ poskey->mValue.y = node.mChannelValues[fr * node.mChannels.size() + channelIdx];
+ break;
+ case Channel_PositionZ:
+ poskey->mValue.z = node.mChannelValues[fr * node.mChannels.size() + channelIdx];
+ break;
+
+ default:
+ break;
+ }
+
+ }
}
++poskey;
}
@@ -495,12 +521,6 @@ void BVHLoader::CreateAnimation( aiScene* pScene)
// rotation part. Always present. First find value offsets
{
- unsigned int rotOffset = 0;
- if( node.mChannels.size() == 6)
- {
- // Offset all further calculations
- rotOffset = 3;
- }
// Then create the number of rotation keys
nodeAnim->mNumRotationKeys = mAnimNumFrames;
@@ -510,20 +530,33 @@ void BVHLoader::CreateAnimation( aiScene* pScene)
{
aiMatrix4x4 temp;
aiMatrix3x3 rotMatrix;
-
- for( unsigned int channel = 0; channel < 3; ++channel)
- {
- // translate ZXY euler angels into a quaternion
- const float angle = node.mChannelValues[fr * node.mChannels.size() + rotOffset + channel] * float( AI_MATH_PI) / 180.0f;
-
- // Compute rotation transformations in the right order
- switch (node.mChannels[rotOffset+channel])
- {
- case Channel_RotationX: aiMatrix4x4::RotationX( angle, temp); rotMatrix *= aiMatrix3x3( temp); break;
- case Channel_RotationY: aiMatrix4x4::RotationY( angle, temp); rotMatrix *= aiMatrix3x3( temp); break;
- case Channel_RotationZ: aiMatrix4x4::RotationZ( angle, temp); rotMatrix *= aiMatrix3x3( temp); break;
- default: throw DeadlyImportError( "Unexpected animation channel setup at node " + nodeName );
- }
+ for (BVHLoader::ChannelType channel = Channel_RotationX; channel <= Channel_RotationZ; channel = (BVHLoader::ChannelType)(channel + 1))
+ {
+ //Find channel in node
+ std::map<BVHLoader::ChannelType, int>::iterator mapIter = channelMap.find(channel);
+
+ if (mapIter == channelMap.end())
+ throw DeadlyImportError("Missing rotation channel in node " + nodeName);
+ else {
+ int channelIdx = mapIter->second;
+ // translate ZXY euler angels into a quaternion
+ const float angle = node.mChannelValues[fr * node.mChannels.size() + channelIdx] * float(AI_MATH_PI) / 180.0f;
+
+ // Compute rotation transformations in the right order
+ switch (channel)
+ {
+ case Channel_RotationX:
+ aiMatrix4x4::RotationX(angle, temp); rotMatrix *= aiMatrix3x3(temp);
+ break;
+ case Channel_RotationY:
+ aiMatrix4x4::RotationY(angle, temp); rotMatrix *= aiMatrix3x3(temp);
+ break;
+ case Channel_RotationZ: aiMatrix4x4::RotationZ(angle, temp); rotMatrix *= aiMatrix3x3(temp);
+ break;
+ default:
+ break;
+ }
+ }
}
rotkey->mTime = double( fr);
diff --git a/code/BVHLoader.h b/code/BVHLoader.h
index 6a89e1aaf..a18ad81d9 100644
--- a/code/BVHLoader.h
+++ b/code/BVHLoader.h
@@ -4,7 +4,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -48,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_BVHLOADER_H_INC
#define AI_BVHLOADER_H_INC
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
struct aiNode;
@@ -83,7 +84,10 @@ class BVHLoader : public BaseImporter
std::vector<ChannelType> mChannels;
std::vector<float> mChannelValues; // motion data values for that node. Of size NumChannels * NumFrames
- Node() { }
+ Node()
+ : mNode(nullptr)
+ { }
+
explicit Node( const aiNode* pNode) : mNode( pNode) { }
};
diff --git a/code/BaseImporter.cpp b/code/BaseImporter.cpp
index 9598e8e9a..f03db189f 100644
--- a/code/BaseImporter.cpp
+++ b/code/BaseImporter.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -44,14 +45,16 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* @brief Implementation of BaseImporter
*/
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
+#include <assimp/ParsingUtils.h>
#include "FileSystemFilter.h"
#include "Importer.h"
-#include "ByteSwapper.h"
+#include <assimp/ByteSwapper.h>
#include <assimp/scene.h>
#include <assimp/Importer.hpp>
#include <assimp/postprocess.h>
#include <assimp/importerdesc.h>
+
#include <ios>
#include <list>
#include <memory>
@@ -62,24 +65,25 @@ using namespace Assimp;
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
-BaseImporter::BaseImporter()
-: m_progress()
-{
+BaseImporter::BaseImporter() AI_NO_EXCEPT
+: m_progress() {
// nothing to do here
}
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
-BaseImporter::~BaseImporter()
-{
+BaseImporter::~BaseImporter() {
// nothing to do here
}
// ------------------------------------------------------------------------------------------------
// Imports the given file and returns the imported data.
-aiScene* BaseImporter::ReadFile(const Importer* pImp, const std::string& pFile, IOSystem* pIOHandler)
-{
+aiScene* BaseImporter::ReadFile(const Importer* pImp, const std::string& pFile, IOSystem* pIOHandler) {
m_progress = pImp->GetProgressHandler();
+ if (nullptr == m_progress) {
+ return nullptr;
+ }
+
ai_assert(m_progress);
// Gather configuration properties for this run
@@ -89,23 +93,22 @@ aiScene* BaseImporter::ReadFile(const Importer* pImp, const std::string& pFile,
FileSystemFilter filter(pFile,pIOHandler);
// create a scene object to hold the data
- ScopeGuard<aiScene> sc(new aiScene());
+ std::unique_ptr<aiScene> sc(new aiScene());
// dispatch importing
try
{
- InternReadFile( pFile, sc, &filter);
+ InternReadFile( pFile, sc.get(), &filter);
} catch( const std::exception& err ) {
// extract error description
m_ErrorText = err.what();
- DefaultLogger::get()->error(m_ErrorText);
- return NULL;
+ ASSIMP_LOG_ERROR(m_ErrorText);
+ return nullptr;
}
// return what we gathered from the import.
- sc.dismiss();
- return sc;
+ return sc.release();
}
// ------------------------------------------------------------------------------------------------
@@ -115,13 +118,12 @@ void BaseImporter::SetupProperties(const Importer* /*pImp*/)
}
// ------------------------------------------------------------------------------------------------
-void BaseImporter::GetExtensionList(std::set<std::string>& extensions)
-{
+void BaseImporter::GetExtensionList(std::set<std::string>& extensions) {
const aiImporterDesc* desc = GetInfo();
- ai_assert(desc != NULL);
+ ai_assert(desc != nullptr);
const char* ext = desc->mFileExtensions;
- ai_assert(ext != NULL);
+ ai_assert(ext != nullptr );
const char* last = ext;
do {
@@ -143,31 +145,29 @@ void BaseImporter::GetExtensionList(std::set<std::string>& extensions)
const char** tokens,
unsigned int numTokens,
unsigned int searchBytes /* = 200 */,
- bool tokensSol /* false */)
+ bool tokensSol /* false */,
+ bool noAlphaBeforeTokens /* false */)
{
- ai_assert( NULL != tokens );
+ ai_assert( nullptr != tokens );
ai_assert( 0 != numTokens );
ai_assert( 0 != searchBytes);
- if (!pIOHandler)
+ if ( nullptr == pIOHandler ) {
return false;
+ }
std::unique_ptr<IOStream> pStream (pIOHandler->Open(pFile));
if (pStream.get() ) {
// read 200 characters from the file
std::unique_ptr<char[]> _buffer (new char[searchBytes+1 /* for the '\0' */]);
- char* buffer = _buffer.get();
- if( NULL == buffer ) {
- return false;
- }
-
- const size_t read = pStream->Read(buffer,1,searchBytes);
- if( !read ) {
+ char *buffer( _buffer.get() );
+ const size_t read( pStream->Read(buffer,1,searchBytes) );
+ if( 0 == read ) {
return false;
}
for( size_t i = 0; i < read; ++i ) {
- buffer[ i ] = ::tolower( buffer[ i ] );
+ buffer[ i ] = static_cast<char>( ::tolower( buffer[ i ] ) );
}
// It is not a proper handling of unicode files here ...
@@ -181,16 +181,29 @@ void BaseImporter::GetExtensionList(std::set<std::string>& extensions)
}
*cur2 = '\0';
- for (unsigned int i = 0; i < numTokens;++i) {
- ai_assert(NULL != tokens[i]);
- const char* r = strstr(buffer,tokens[i]);
+ std::string token;
+ for (unsigned int i = 0; i < numTokens; ++i ) {
+ ai_assert( nullptr != tokens[i] );
+ const size_t len( strlen( tokens[ i ] ) );
+ token.clear();
+ const char *ptr( tokens[ i ] );
+ for ( size_t tokIdx = 0; tokIdx < len; ++tokIdx ) {
+ token.push_back( static_cast<char>( tolower( *ptr ) ) );
+ ++ptr;
+ }
+ const char* r = strstr( buffer, token.c_str() );
if( !r ) {
continue;
}
+ // We need to make sure that we didn't accidentially identify the end of another token as our token,
+ // e.g. in a previous version the "gltf " present in some gltf files was detected as "f "
+ if (noAlphaBeforeTokens && (r != buffer && isalpha(r[-1]))) {
+ continue;
+ }
// We got a match, either we don't care where it is, or it happens to
// be in the beginning of the file / line
if (!tokensSol || r == buffer || r[-1] == '\r' || r[-1] == '\n') {
- DefaultLogger::get()->debug(std::string("Found positive match for header keyword: ") + tokens[i]);
+ ASSIMP_LOG_DEBUG_F( "Found positive match for header keyword: ", tokens[i] );
return true;
}
}
@@ -228,16 +241,19 @@ void BaseImporter::GetExtensionList(std::set<std::string>& extensions)
// ------------------------------------------------------------------------------------------------
// Get file extension from path
-/*static*/ std::string BaseImporter::GetExtension (const std::string& pFile)
-{
- std::string::size_type pos = pFile.find_last_of('.');
+std::string BaseImporter::GetExtension( const std::string& file ) {
+ std::string::size_type pos = file.find_last_of('.');
// no file extension at all
- if( pos == std::string::npos)
+ if (pos == std::string::npos) {
return "";
+ }
+
+
+ // thanks to Andy Maloney for the hint
+ std::string ret = file.substr( pos + 1 );
+ std::transform( ret.begin(), ret.end(), ret.begin(), ToLower<char>);
- std::string ret = pFile.substr(pos+1);
- std::transform(ret.begin(),ret.end(),ret.begin(),::tolower); // thanks to Andy Maloney for the hint
return ret;
}
@@ -246,7 +262,8 @@ void BaseImporter::GetExtensionList(std::set<std::string>& extensions)
/* static */ bool BaseImporter::CheckMagicToken(IOSystem* pIOHandler, const std::string& pFile,
const void* _magic, unsigned int num, unsigned int offset, unsigned int size)
{
- ai_assert(size <= 16 && _magic);
+ ai_assert( size <= 16 );
+ ai_assert( _magic );
if (!pIOHandler) {
return false;
@@ -316,7 +333,7 @@ void BaseImporter::ConvertToUTF8(std::vector<char>& data)
// UTF 8 with BOM
if((uint8_t)data[0] == 0xEF && (uint8_t)data[1] == 0xBB && (uint8_t)data[2] == 0xBF) {
- DefaultLogger::get()->debug("Found UTF-8 BOM ...");
+ ASSIMP_LOG_DEBUG("Found UTF-8 BOM ...");
std::copy(data.begin()+3,data.end(),data.begin());
data.resize(data.size()-3);
@@ -335,7 +352,7 @@ void BaseImporter::ConvertToUTF8(std::vector<char>& data)
// UTF 32 LE with BOM
if(*((uint32_t*)&data.front()) == 0x0000FFFE) {
- DefaultLogger::get()->debug("Found UTF-32 BOM ...");
+ ASSIMP_LOG_DEBUG("Found UTF-32 BOM ...");
std::vector<char> output;
int *ptr = (int*)&data[ 0 ];
@@ -355,10 +372,9 @@ void BaseImporter::ConvertToUTF8(std::vector<char>& data)
// UTF 16 LE with BOM
if(*((uint16_t*)&data.front()) == 0xFEFF) {
- DefaultLogger::get()->debug("Found UTF-16 BOM ...");
+ ASSIMP_LOG_DEBUG("Found UTF-16 BOM ...");
std::vector<unsigned char> output;
- int16_t *ptr = (int16_t*) &data[ 0 ];
utf8::utf16to8(data.begin(), data.end(), back_inserter(output));
return;
}
@@ -381,16 +397,14 @@ void BaseImporter::ConvertUTF8toISO8859_1(std::string& data)
data[j] = ((unsigned char) data[++i] + 0x40);
} else {
std::stringstream stream;
-
stream << "UTF8 code " << std::hex << data[i] << data[i + 1] << " can not be converted into ISA-8859-1.";
-
- DefaultLogger::get()->error(stream.str());
+ ASSIMP_LOG_ERROR( stream.str() );
data[j++] = data[i++];
data[j] = data[i];
}
} else {
- DefaultLogger::get()->error("UTF8 code but only one character remaining");
+ ASSIMP_LOG_ERROR("UTF8 code but only one character remaining");
data[j] = data[i];
}
@@ -406,7 +420,7 @@ void BaseImporter::TextFileToBuffer(IOStream* stream,
std::vector<char>& data,
TextFileMode mode)
{
- ai_assert(NULL != stream);
+ ai_assert(nullptr != stream);
const size_t fileSize = stream->FileSize();
if (mode == FORBID_EMPTY) {
@@ -467,14 +481,14 @@ struct Assimp::BatchData {
, pImporter( nullptr )
, next_id(0xffff)
, validate( validate ) {
- ai_assert( NULL != pIO );
+ ai_assert( nullptr != pIO );
pImporter = new Importer();
pImporter->SetIOHandler( pIO );
}
~BatchData() {
- pImporter->SetIOHandler( NULL ); /* get pointer back into our possession */
+ pImporter->SetIOHandler( nullptr ); /* get pointer back into our possession */
delete pImporter;
}
@@ -500,9 +514,8 @@ struct Assimp::BatchData {
typedef std::list<LoadRequest>::iterator LoadReqIt;
// ------------------------------------------------------------------------------------------------
-BatchLoader::BatchLoader(IOSystem* pIO, bool validate )
-{
- ai_assert(NULL != pIO);
+BatchLoader::BatchLoader(IOSystem* pIO, bool validate ) {
+ ai_assert(nullptr != pIO);
m_data = new BatchData( pIO, validate );
}
@@ -568,7 +581,7 @@ aiScene* BatchLoader::GetImport( unsigned int which )
return sc;
}
}
- return NULL;
+ return nullptr;
}
// ------------------------------------------------------------------------------------------------
@@ -591,13 +604,13 @@ void BatchLoader::LoadAll()
if (!DefaultLogger::isNullLogger())
{
- DefaultLogger::get()->info("%%% BEGIN EXTERNAL FILE %%%");
- DefaultLogger::get()->info("File: " + (*it).file);
+ ASSIMP_LOG_INFO("%%% BEGIN EXTERNAL FILE %%%");
+ ASSIMP_LOG_INFO_F("File: ", (*it).file);
}
m_data->pImporter->ReadFile((*it).file,pp);
(*it).scene = m_data->pImporter->GetOrphanedScene();
(*it).loaded = true;
- DefaultLogger::get()->info("%%% END EXTERNAL FILE %%%");
+ ASSIMP_LOG_INFO("%%% END EXTERNAL FILE %%%");
}
}
diff --git a/code/BaseProcess.cpp b/code/BaseProcess.cpp
index 9e175d315..154b586d2 100644
--- a/code/BaseProcess.cpp
+++ b/code/BaseProcess.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -42,7 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/** @file Implementation of BaseProcess */
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
#include "BaseProcess.h"
#include <assimp/DefaultLogger.hpp>
#include <assimp/scene.h>
@@ -52,7 +53,7 @@ using namespace Assimp;
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
-BaseProcess::BaseProcess()
+BaseProcess::BaseProcess() AI_NO_EXCEPT
: shared()
, progress()
{
@@ -84,7 +85,7 @@ void BaseProcess::ExecuteOnScene( Importer* pImp)
// extract error description
pImp->Pimpl()->mErrorString = err.what();
- DefaultLogger::get()->error(pImp->Pimpl()->mErrorString);
+ ASSIMP_LOG_ERROR(pImp->Pimpl()->mErrorString);
// and kill the partially imported data
delete pImp->Pimpl()->mScene;
diff --git a/code/BaseProcess.h b/code/BaseProcess.h
index aa873f717..b09fc732e 100644
--- a/code/BaseProcess.h
+++ b/code/BaseProcess.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -44,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define INCLUDED_AI_BASEPROCESS_H
#include <map>
-#include "GenericProperty.h"
+#include <assimp/GenericProperty.h>
struct aiScene;
@@ -210,20 +211,16 @@ private:
* should be executed. If the function returns true, the class' Execute()
* function is called subsequently.
*/
-class ASSIMP_API_WINONLY BaseProcess
-{
+class ASSIMP_API_WINONLY BaseProcess {
friend class Importer;
public:
-
/** Constructor to be privately used by Importer */
- BaseProcess();
+ BaseProcess() AI_NO_EXCEPT;
/** Destructor, private as well */
virtual ~BaseProcess();
-public:
-
// -------------------------------------------------------------------
/** Returns whether the processing step is present in the given flag.
* @param pFlags The processing flags the importer was called with. A
diff --git a/code/Bitmap.cpp b/code/Bitmap.cpp
index b1cf8a409..903a13fb1 100644
--- a/code/Bitmap.cpp
+++ b/code/Bitmap.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -47,10 +48,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "Bitmap.h"
+#include <assimp/Bitmap.h>
#include <assimp/texture.h>
#include <assimp/IOStream.hpp>
-#include "ByteSwapper.h"
+#include <assimp/ByteSwapper.h>
namespace Assimp {
@@ -84,7 +85,8 @@ namespace Assimp {
}
template<typename T>
- inline std::size_t Copy(uint8_t* data, T& field) {
+ inline
+ std::size_t Copy(uint8_t* data, const T &field) {
#ifdef AI_BUILD_BIG_ENDIAN
T field_swapped=AI_BE(field);
std::memcpy(data, &field_swapped, sizeof(field)); return sizeof(field);
@@ -102,7 +104,7 @@ namespace Assimp {
offset += Copy(&data[offset], header.size);
offset += Copy(&data[offset], header.reserved1);
offset += Copy(&data[offset], header.reserved2);
- offset += Copy(&data[offset], header.offset);
+ Copy(&data[offset], header.offset);
file->Write(data, Header::header_size, 1);
}
@@ -122,7 +124,7 @@ namespace Assimp {
offset += Copy(&data[offset], dib.x_resolution);
offset += Copy(&data[offset], dib.y_resolution);
offset += Copy(&data[offset], dib.nb_colors);
- offset += Copy(&data[offset], dib.nb_important_colors);
+ Copy(&data[offset], dib.nb_important_colors);
file->Write(data, DIB::dib_size, 1);
}
diff --git a/code/BlenderBMesh.cpp b/code/BlenderBMesh.cpp
index c328947ae..8a13819a6 100644
--- a/code/BlenderBMesh.cpp
+++ b/code/BlenderBMesh.cpp
@@ -52,7 +52,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace Assimp
{
- template< > const std::string LogFunctions< BlenderBMeshConverter >::log_prefix = "BLEND_BMESH: ";
+ template< > const char* LogFunctions< BlenderBMeshConverter >::Prefix()
+ {
+ static auto prefix = "BLEND_BMESH: ";
+ return prefix;
+ }
}
using namespace Assimp;
diff --git a/code/BlenderBMesh.h b/code/BlenderBMesh.h
index 0d58b818c..5b65fb503 100644
--- a/code/BlenderBMesh.h
+++ b/code/BlenderBMesh.h
@@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef INCLUDED_AI_BLEND_BMESH_H
#define INCLUDED_AI_BLEND_BMESH_H
-#include "LogAux.h"
+#include <assimp/LogAux.h>
namespace Assimp
{
diff --git a/code/BlenderCustomData.cpp b/code/BlenderCustomData.cpp
new file mode 100644
index 000000000..682186618
--- /dev/null
+++ b/code/BlenderCustomData.cpp
@@ -0,0 +1,185 @@
+#include "BlenderCustomData.h"
+#include "BlenderDNA.h"
+#include <array>
+#include <functional>
+
+namespace Assimp {
+ namespace Blender {
+ /**
+ * @brief read/convert of Structure array to memory
+ */
+ template<typename T>
+ bool read(const Structure &s, T *p, const size_t cnt, const FileDatabase &db) {
+ for (size_t i = 0; i < cnt; ++i) {
+ T read;
+ s.Convert(read, db);
+ *p = read;
+ p++;
+ }
+ return true;
+ }
+
+ /**
+ * @brief pointer to function read memory for n CustomData types
+ */
+ typedef bool (*PRead)(ElemBase *pOut, const size_t cnt, const FileDatabase &db);
+ typedef ElemBase * (*PCreate)(const size_t cnt);
+ typedef void(*PDestroy)(ElemBase *);
+
+#define IMPL_STRUCT_READ(ty) \
+ bool read##ty(ElemBase *v, const size_t cnt, const FileDatabase &db) { \
+ return read<ty>(db.dna[#ty], dynamic_cast<ty *>(v), cnt, db); \
+ }
+
+#define IMPL_STRUCT_CREATE(ty) \
+ ElemBase *create##ty(const size_t cnt) { \
+ return new ty[cnt]; \
+ }
+
+#define IMPL_STRUCT_DESTROY(ty) \
+ void destroy##ty(ElemBase *pE) { \
+ ty *p = dynamic_cast<ty *>(pE); \
+ delete[]p; \
+ }
+
+ /**
+ * @brief helper macro to define Structure functions
+ */
+#define IMPL_STRUCT(ty) \
+ IMPL_STRUCT_READ(ty) \
+ IMPL_STRUCT_CREATE(ty) \
+ IMPL_STRUCT_DESTROY(ty)
+
+ // supported structures for CustomData
+ IMPL_STRUCT(MVert)
+ IMPL_STRUCT(MEdge)
+ IMPL_STRUCT(MFace)
+ IMPL_STRUCT(MTFace)
+ IMPL_STRUCT(MTexPoly)
+ IMPL_STRUCT(MLoopUV)
+ IMPL_STRUCT(MLoopCol)
+ IMPL_STRUCT(MPoly)
+ IMPL_STRUCT(MLoop)
+
+ /**
+ * @brief describes the size of data and the read function to be used for single CustomerData.type
+ */
+ struct CustomDataTypeDescription {
+ PRead Read; ///< function to read one CustomData type element
+ PCreate Create; ///< function to allocate n type elements
+ PDestroy Destroy;
+
+ CustomDataTypeDescription(PRead read, PCreate create, PDestroy destroy)
+ : Read(read)
+ , Create(create)
+ , Destroy(destroy)
+ {}
+ };
+
+
+ /**
+ * @brief helper macro to define Structure type specific CustomDataTypeDescription
+ * @note IMPL_STRUCT_READ for same ty must be used earlier to implement the typespecific read function
+ */
+#define DECL_STRUCT_CUSTOMDATATYPEDESCRIPTION(ty) \
+ CustomDataTypeDescription{&read##ty, &create##ty, &destroy##ty}
+
+ /**
+ * @brief helper macro to define CustomDataTypeDescription for UNSUPPORTED type
+ */
+#define DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION \
+ CustomDataTypeDescription{nullptr, nullptr, nullptr}
+
+ /**
+ * @brief descriptors for data pointed to from CustomDataLayer.data
+ * @note some of the CustomData uses already well defined Structures
+ * other (like CD_ORCO, ...) uses arrays of rawtypes or even arrays of Structures
+ * use a special readfunction for that cases
+ */
+ std::array<CustomDataTypeDescription, CD_NUMTYPES> customDataTypeDescriptions = { {
+ DECL_STRUCT_CUSTOMDATATYPEDESCRIPTION(MVert),
+ DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION,
+ DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION,
+ DECL_STRUCT_CUSTOMDATATYPEDESCRIPTION(MEdge),
+ DECL_STRUCT_CUSTOMDATATYPEDESCRIPTION(MFace),
+ DECL_STRUCT_CUSTOMDATATYPEDESCRIPTION(MTFace),
+ DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION,
+ DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION,
+ DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION,
+ DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION,
+
+ DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION,
+ DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION,
+ DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION,
+ DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION,
+ DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION,
+ DECL_STRUCT_CUSTOMDATATYPEDESCRIPTION(MTexPoly),
+ DECL_STRUCT_CUSTOMDATATYPEDESCRIPTION(MLoopUV),
+ DECL_STRUCT_CUSTOMDATATYPEDESCRIPTION(MLoopCol),
+ DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION,
+ DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION,
+
+ DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION,
+ DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION,
+ DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION,
+ DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION,
+ DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION,
+ DECL_STRUCT_CUSTOMDATATYPEDESCRIPTION(MPoly),
+ DECL_STRUCT_CUSTOMDATATYPEDESCRIPTION(MLoop),
+ DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION,
+ DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION,
+ DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION,
+
+ DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION,
+ DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION,
+ DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION,
+ DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION,
+ DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION,
+ DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION,
+ DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION,
+ DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION,
+ DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION,
+ DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION,
+
+ DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION,
+ DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION
+ }};
+
+
+ bool isValidCustomDataType(const int cdtype) {
+ return cdtype >= 0 && cdtype < CD_NUMTYPES;
+ }
+
+ bool readCustomData(std::shared_ptr<ElemBase> &out, const int cdtype, const size_t cnt, const FileDatabase &db) {
+ if (!isValidCustomDataType(cdtype)) {
+ throw Error((Formatter::format(), "CustomData.type ", cdtype, " out of index"));
+ }
+
+ const CustomDataTypeDescription cdtd = customDataTypeDescriptions[cdtype];
+ if (cdtd.Read && cdtd.Create && cdtd.Destroy && cnt > 0) {
+ // allocate cnt elements and parse them from file
+ out.reset(cdtd.Create(cnt), cdtd.Destroy);
+ return cdtd.Read(out.get(), cnt, db);
+ }
+ return false;
+ }
+
+ std::shared_ptr<CustomDataLayer> getCustomDataLayer(const CustomData &customdata, const CustomDataType cdtype, const std::string &name) {
+ for (auto it = customdata.layers.begin(); it != customdata.layers.end(); ++it) {
+ if (it->get()->type == cdtype && name == it->get()->name) {
+ return *it;
+ }
+ }
+ return nullptr;
+ }
+
+ const ElemBase * getCustomDataLayerData(const CustomData &customdata, const CustomDataType cdtype, const std::string &name)
+ {
+ const std::shared_ptr<CustomDataLayer> pLayer = getCustomDataLayer(customdata, cdtype, name);
+ if (pLayer && pLayer->data) {
+ return pLayer->data.get();
+ }
+ return nullptr;
+ }
+ }
+}
diff --git a/code/BlenderCustomData.h b/code/BlenderCustomData.h
new file mode 100644
index 000000000..f61d79a26
--- /dev/null
+++ b/code/BlenderCustomData.h
@@ -0,0 +1,89 @@
+#pragma once
+
+#include "BlenderDNA.h"
+#include "BlenderScene.h"
+#include <memory>
+
+namespace Assimp {
+ namespace Blender {
+ /* CustomData.type from Blender (2.79b) */
+ enum CustomDataType {
+ CD_AUTO_FROM_NAME = -1,
+ CD_MVERT = 0,
+#ifdef DNA_DEPRECATED
+ CD_MSTICKY = 1, /* DEPRECATED */
+#endif
+ CD_MDEFORMVERT = 2,
+ CD_MEDGE = 3,
+ CD_MFACE = 4,
+ CD_MTFACE = 5,
+ CD_MCOL = 6,
+ CD_ORIGINDEX = 7,
+ CD_NORMAL = 8,
+ /* CD_POLYINDEX = 9, */
+ CD_PROP_FLT = 10,
+ CD_PROP_INT = 11,
+ CD_PROP_STR = 12,
+ CD_ORIGSPACE = 13, /* for modifier stack face location mapping */
+ CD_ORCO = 14,
+ CD_MTEXPOLY = 15,
+ CD_MLOOPUV = 16,
+ CD_MLOOPCOL = 17,
+ CD_TANGENT = 18,
+ CD_MDISPS = 19,
+ CD_PREVIEW_MCOL = 20, /* for displaying weightpaint colors */
+ /* CD_ID_MCOL = 21, */
+ CD_TEXTURE_MLOOPCOL = 22,
+ CD_CLOTH_ORCO = 23,
+ CD_RECAST = 24,
+
+ /* BMESH ONLY START */
+ CD_MPOLY = 25,
+ CD_MLOOP = 26,
+ CD_SHAPE_KEYINDEX = 27,
+ CD_SHAPEKEY = 28,
+ CD_BWEIGHT = 29,
+ CD_CREASE = 30,
+ CD_ORIGSPACE_MLOOP = 31,
+ CD_PREVIEW_MLOOPCOL = 32,
+ CD_BM_ELEM_PYPTR = 33,
+ /* BMESH ONLY END */
+
+ CD_PAINT_MASK = 34,
+ CD_GRID_PAINT_MASK = 35,
+ CD_MVERT_SKIN = 36,
+ CD_FREESTYLE_EDGE = 37,
+ CD_FREESTYLE_FACE = 38,
+ CD_MLOOPTANGENT = 39,
+ CD_TESSLOOPNORMAL = 40,
+ CD_CUSTOMLOOPNORMAL = 41,
+
+ CD_NUMTYPES = 42
+ };
+
+ /**
+ * @brief check if given cdtype is valid (ie >= 0 and < CD_NUMTYPES)
+ * @param[in] cdtype to check
+ * @return true when valid
+ */
+ bool isValidCustomDataType(const int cdtype);
+
+ /**
+ * @brief returns CustomDataLayer ptr for given cdtype and name
+ * @param[in] customdata CustomData to search for wanted layer
+ * @param[in] cdtype to search for
+ * @param[in] name to search for
+ * @return CustomDataLayer * or nullptr if not found
+ */
+ std::shared_ptr<CustomDataLayer> getCustomDataLayer(const CustomData &customdata, CustomDataType cdtype, const std::string &name);
+
+ /**
+ * @brief returns CustomDataLayer data ptr for given cdtype and name
+ * @param[in] customdata CustomData to search for wanted layer
+ * @param[in] cdtype to search for
+ * @param[in] name to search for
+ * @return * to struct data or nullptr if not found
+ */
+ const ElemBase * getCustomDataLayerData(const CustomData &customdata, CustomDataType cdtype, const std::string &name);
+ }
+}
diff --git a/code/BlenderDNA.cpp b/code/BlenderDNA.cpp
index 23ece913f..f84c45601 100644
--- a/code/BlenderDNA.cpp
+++ b/code/BlenderDNA.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -47,9 +48,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_NO_BLEND_IMPORTER
#include "BlenderDNA.h"
-#include "StreamReader.h"
-#include "fast_atof.h"
-#include "TinyFormatter.h"
+#include <assimp/StreamReader.h>
+#include <assimp/fast_atof.h>
+#include <assimp/TinyFormatter.h>
using namespace Assimp;
using namespace Assimp::Blender;
@@ -57,12 +58,11 @@ using namespace Assimp::Formatter;
static bool match4(StreamReaderAny& stream, const char* string) {
ai_assert( nullptr != string );
- char tmp[] = {
- (const char)(stream).GetI1(),
- (const char)(stream).GetI1(),
- (const char)(stream).GetI1(),
- (const char)(stream).GetI1()
- };
+ char tmp[4];
+ tmp[ 0 ] = ( stream ).GetI1();
+ tmp[ 1 ] = ( stream ).GetI1();
+ tmp[ 2 ] = ( stream ).GetI1();
+ tmp[ 3 ] = ( stream ).GetI1();
return (tmp[0]==string[0] && tmp[1]==string[1] && tmp[2]==string[2] && tmp[3]==string[3]);
}
@@ -210,8 +210,7 @@ void DNAParser::Parse ()
s.size = offset;
}
- DefaultLogger::get()->debug((format(),"BlenderDNA: Got ",dna.structures.size(),
- " structures with totally ",fields," fields"));
+ ASSIMP_LOG_DEBUG_F( "BlenderDNA: Got ", dna.structures.size()," structures with totally ",fields," fields");
#ifdef ASSIMP_BUILD_BLENDER_DEBUG
dna.DumpToFile();
@@ -228,12 +227,12 @@ void DNAParser::Parse ()
// ------------------------------------------------------------------------------------------------
void DNA :: DumpToFile()
{
- // we dont't bother using the VFS here for this is only for debugging.
+ // we don't bother using the VFS here for this is only for debugging.
// (and all your bases are belong to us).
std::ofstream f("dna.txt");
if (f.fail()) {
- DefaultLogger::get()->error("Could not dump dna to dna.txt");
+ ASSIMP_LOG_ERROR("Could not dump dna to dna.txt");
return;
}
f << "Field format: type name offset size" << "\n";
@@ -248,7 +247,7 @@ void DNA :: DumpToFile()
}
f << std::flush;
- DefaultLogger::get()->info("BlenderDNA: Dumped dna to dna.txt");
+ ASSIMP_LOG_INFO("BlenderDNA: Dumped dna to dna.txt");
}
#endif
@@ -367,7 +366,7 @@ void SectionParser :: Next()
}
#ifdef ASSIMP_BUILD_BLENDER_DEBUG
- DefaultLogger::get()->debug(current.id);
+ ASSIMP_LOG_DEBUG(current.id);
#endif
}
diff --git a/code/BlenderDNA.h b/code/BlenderDNA.h
index c09f1ca42..ecf606a3b 100644
--- a/code/BlenderDNA.h
+++ b/code/BlenderDNA.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -46,8 +47,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef INCLUDED_AI_BLEND_DNA_H
#define INCLUDED_AI_BLEND_DNA_H
-#include "BaseImporter.h"
-#include "StreamReader.h"
+#include <assimp/BaseImporter.h>
+#include <assimp/StreamReader.h>
#include <assimp/DefaultLogger.hpp>
#include <stdint.h>
#include <memory>
@@ -92,6 +93,12 @@ struct Error : DeadlyImportError {
* descendents. It serves as base class for all data structure fields. */
// -------------------------------------------------------------------------------
struct ElemBase {
+ ElemBase()
+ : dna_type(nullptr)
+ {
+ // empty
+ }
+
virtual ~ElemBase() {
// empty
}
@@ -198,7 +205,7 @@ enum ErrorPolicy {
// -------------------------------------------------------------------------------
/** Represents a data structure in a BLEND file. A Structure defines n fields
- * and their locatios and encodings the input stream. Usually, every
+ * and their locations and encodings the input stream. Usually, every
* Structure instance pertains to one equally-named data structure in the
* BlenderScene.h header. This class defines various utilities to map a
* binary `blob` read from the file to such a structure instance with
@@ -253,10 +260,7 @@ public:
* a compiler complain is the result.
* @param dest Destination value to be written
* @param db File database, including input stream. */
- template <typename T> inline void Convert (T& dest,
- const FileDatabase& db) const;
-
-
+ template <typename T> void Convert (T& dest, const FileDatabase& db) const;
// --------------------------------------------------------
// generic converter
@@ -305,6 +309,28 @@ public:
void ReadField(T& out, const char* name,
const FileDatabase& db) const;
+ // --------------------------------------------------------
+ /**
+ * @brief field parsing for dynamic vectors
+ * @param[in] out vector of struct to be filled
+ * @param[in] name of field
+ * @param[in] db to access the file, dna, ...
+ * @return true when read was successful
+ */
+ template <int error_policy, template <typename> class TOUT, typename T>
+ bool ReadFieldPtrVector(vector<TOUT<T>>&out, const char* name, const FileDatabase& db) const;
+
+ /**
+ * @brief parses raw customdata
+ * @param[in] out shared_ptr to be filled
+ * @param[in] cdtype customdata type to read
+ * @param[in] name of field ptr
+ * @param[in] db to access the file, dna, ...
+ * @return true when read was successful
+ */
+ template <int error_policy>
+ bool ReadCustomDataPtr(std::shared_ptr<ElemBase>&out, int cdtype, const char* name, const FileDatabase& db) const;
+
private:
// --------------------------------------------------------
@@ -377,7 +403,7 @@ template <> struct Structure :: _defaultInitializer<ErrorPolicy_Warn> {
template <typename T>
void operator ()(T& out, const char* reason = "<add reason>") {
- DefaultLogger::get()->warn(reason);
+ ASSIMP_LOG_WARN(reason);
// ... and let the show go on
_defaultInitializer<0 /*ErrorPolicy_Igno*/>()(out);
@@ -659,7 +685,7 @@ public:
/** Check whether a specific item is in the cache.
* @param s Data type of the item
* @param out Output pointer. Unchanged if the
- * cache doens't know the item yet.
+ * cache doesn't know the item yet.
* @param ptr Item address to look for. */
template <typename T> void get (
const Structure& s,
@@ -799,6 +825,17 @@ private:
FileDatabase& db;
};
+/**
+* @brief read CustomData's data to ptr to mem
+* @param[out] out memory ptr to set
+* @param[in] cdtype to read
+* @param[in] cnt cnt of elements to read
+* @param[in] db to read elements from
+* @return true when ok
+*/
+bool readCustomData(std::shared_ptr<ElemBase> &out, int cdtype, size_t cnt, const FileDatabase &db);
+
+
} // end Blend
} // end Assimp
diff --git a/code/BlenderDNA.inl b/code/BlenderDNA.inl
index 6919c9153..89c94e7bf 100644
--- a/code/BlenderDNA.inl
+++ b/code/BlenderDNA.inl
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -47,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define INCLUDED_AI_BLEND_DNA_INL
#include <memory>
-#include "TinyFormatter.h"
+#include <assimp/TinyFormatter.h>
namespace Assimp {
namespace Blender {
@@ -307,6 +308,108 @@ void Structure :: ReadField(T& out, const char* name, const FileDatabase& db) co
//--------------------------------------------------------------------------------
+// field parsing for raw untyped data (like CustomDataLayer.data)
+template <int error_policy>
+bool Structure::ReadCustomDataPtr(std::shared_ptr<ElemBase>&out, int cdtype, const char* name, const FileDatabase& db) const {
+
+ const StreamReaderAny::pos old = db.reader->GetCurrentPos();
+
+ Pointer ptrval;
+ const Field* f;
+ try {
+ f = &(*this)[name];
+
+ // sanity check, should never happen if the genblenddna script is right
+ if (!(f->flags & FieldFlag_Pointer)) {
+ throw Error((Formatter::format(), "Field `", name, "` of structure `",
+ this->name, "` ought to be a pointer"));
+ }
+
+ db.reader->IncPtr(f->offset);
+ Convert(ptrval, db);
+ // actually it is meaningless on which Structure the Convert is called
+ // because the `Pointer` argument triggers a special implementation.
+ }
+ catch (const Error& e) {
+ _defaultInitializer<error_policy>()(out, e.what());
+ out.reset();
+ }
+
+ bool readOk = true;
+ if (ptrval.val) {
+ // get block for ptr
+ const FileBlockHead* block = LocateFileBlockForAddress(ptrval, db);
+ db.reader->SetCurrentPos(block->start + static_cast<size_t>((ptrval.val - block->address.val)));
+ // read block->num instances of given type to out
+ readOk = readCustomData(out, cdtype, block->num, db);
+ }
+
+ // and recover the previous stream position
+ db.reader->SetCurrentPos(old);
+
+#ifndef ASSIMP_BUILD_BLENDER_NO_STATS
+ ++db.stats().fields_read;
+#endif
+
+ return readOk;
+}
+
+//--------------------------------------------------------------------------------
+template <int error_policy, template <typename> class TOUT, typename T>
+bool Structure::ReadFieldPtrVector(vector<TOUT<T>>&out, const char* name, const FileDatabase& db) const {
+ out.clear();
+
+ const StreamReaderAny::pos old = db.reader->GetCurrentPos();
+
+ Pointer ptrval;
+ const Field* f;
+ try {
+ f = &(*this)[name];
+
+ // sanity check, should never happen if the genblenddna script is right
+ if (!(f->flags & FieldFlag_Pointer)) {
+ throw Error((Formatter::format(), "Field `", name, "` of structure `",
+ this->name, "` ought to be a pointer"));
+ }
+
+ db.reader->IncPtr(f->offset);
+ Convert(ptrval, db);
+ // actually it is meaningless on which Structure the Convert is called
+ // because the `Pointer` argument triggers a special implementation.
+ }
+ catch (const Error& e) {
+ _defaultInitializer<error_policy>()(out, e.what());
+ out.clear();
+ return false;
+ }
+
+
+ if (ptrval.val) {
+ // find the file block the pointer is pointing to
+ const FileBlockHead* block = LocateFileBlockForAddress(ptrval, db);
+ db.reader->SetCurrentPos(block->start + static_cast<size_t>((ptrval.val - block->address.val)));
+ // FIXME: basically, this could cause problems with 64 bit pointers on 32 bit systems.
+ // I really ought to improve StreamReader to work with 64 bit indices exclusively.
+
+ const Structure& s = db.dna[f->type];
+ for (size_t i = 0; i < block->num; ++i) {
+ TOUT<T> p(new T);
+ s.Convert(*p, db);
+ out.push_back(p);
+ }
+ }
+
+ db.reader->SetCurrentPos(old);
+
+#ifndef ASSIMP_BUILD_BLENDER_NO_STATS
+ ++db.stats().fields_read;
+#endif
+
+ return true;
+}
+
+
+//--------------------------------------------------------------------------------
template <template <typename> class TOUT, typename T>
bool Structure :: ResolvePointer(TOUT<T>& out, const Pointer & ptrval, const FileDatabase& db,
const Field& f,
@@ -467,9 +570,7 @@ template <> bool Structure :: ResolvePointer<std::shared_ptr,ElemBase>(std::shar
// this might happen if DNA::RegisterConverters hasn't been called so far
// or if the target type is not contained in `our` DNA.
out.reset();
- DefaultLogger::get()->warn((Formatter::format(),
- "Failed to find a converter for the `",s.name,"` structure"
- ));
+ ASSIMP_LOG_WARN_F( "Failed to find a converter for the `",s.name,"` structure" );
return false;
}
@@ -501,7 +602,7 @@ const FileBlockHead* Structure :: LocateFileBlockForAddress(const Pointer & ptrv
{
// the file blocks appear in list sorted by
// with ascending base addresses so we can run a
- // binary search to locate the pointee quickly.
+ // binary search to locate the pointer quickly.
// NOTE: Blender seems to distinguish between side-by-side
// data (stored in the same data block) and far pointers,
@@ -585,11 +686,14 @@ template <> inline void Structure :: Convert<int> (int& dest,const FileDataba
}
// ------------------------------------------------------------------------------------------------
-template <> inline void Structure :: Convert<short> (short& dest,const FileDatabase& db) const
+template<> inline void Structure :: Convert<short> (short& dest,const FileDatabase& db) const
{
// automatic rescaling from short to float and vice versa (seems to be used by normals)
if (name == "float") {
- dest = static_cast<short>(db.reader->GetF4() * 32767.f);
+ float f = db.reader->GetF4();
+ if ( f > 1.0f )
+ f = 1.0f;
+ dest = static_cast<short>( f * 32767.f);
//db.reader->IncPtr(-4);
return;
}
diff --git a/code/BlenderIntermediate.h b/code/BlenderIntermediate.h
index 0fc9cdafc..f3d34d1b2 100644
--- a/code/BlenderIntermediate.h
+++ b/code/BlenderIntermediate.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -110,7 +111,7 @@ namespace Blender {
void operator= (const TempArray&) {
}
- TempArray(const TempArray& arr) {
+ TempArray(const TempArray& /*arr*/) {
}
private:
@@ -121,9 +122,11 @@ namespace Blender {
# pragma warning(disable:4351)
#endif
+ // As counter-intuitive as it may seem, a comparator must return false for equal values.
+ // The C++ standard defines and expects this behavior: true if lhs < rhs, false otherwise.
struct ObjectCompare {
bool operator() (const Object* left, const Object* right) const {
- return ::strncmp(left->id.name, right->id.name, strlen( left->id.name ) ) == 0;
+ return ::strncmp(left->id.name, right->id.name, strlen( left->id.name ) ) < 0;
}
};
@@ -142,9 +145,11 @@ namespace Blender {
, db(db)
{}
+ // As counter-intuitive as it may seem, a comparator must return false for equal values.
+ // The C++ standard defines and expects this behavior: true if lhs < rhs, false otherwise.
struct ObjectCompare {
bool operator() (const Object* left, const Object* right) const {
- return ::strncmp( left->id.name, right->id.name, strlen( left->id.name ) ) == 0;
+ return ::strncmp( left->id.name, right->id.name, strlen( left->id.name ) ) < 0;
}
};
diff --git a/code/BlenderLoader.cpp b/code/BlenderLoader.cpp
index 1453ef000..b0d273a5f 100644
--- a/code/BlenderLoader.cpp
+++ b/code/BlenderLoader.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -53,13 +54,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "BlenderIntermediate.h"
#include "BlenderModifier.h"
#include "BlenderBMesh.h"
-#include "StringUtils.h"
+#include "BlenderCustomData.h"
+#include <assimp/StringUtils.h>
#include <assimp/scene.h>
#include <assimp/importerdesc.h>
-#include "StringComparison.h"
-#include "StreamReader.h"
-#include "MemoryIOWrapper.h"
+#include <assimp/StringComparison.h>
+#include <assimp/StreamReader.h>
+#include <assimp/MemoryIOWrapper.h>
#include <cctype>
@@ -74,7 +76,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
namespace Assimp {
- template<> const std::string LogFunctions<BlenderImporter>::log_prefix = "BLEND: ";
+ template<> const char* LogFunctions<BlenderImporter>::Prefix()
+ {
+ static auto prefix = "BLEND: ";
+ return prefix;
+ }
}
using namespace Assimp;
@@ -149,14 +155,6 @@ void BlenderImporter::SetupProperties(const Importer* /*pImp*/)
// nothing to be done for the moment
}
-struct free_it {
- free_it(void* free) : free(free) {}
- ~free_it() {
- ::free(this->free);
- }
-
- void* free;
-};
// ------------------------------------------------------------------------------------------------
// Imports the given file into the given scene structure.
@@ -164,8 +162,7 @@ void BlenderImporter::InternReadFile( const std::string& pFile,
aiScene* pScene, IOSystem* pIOHandler)
{
#ifndef ASSIMP_BUILD_NO_COMPRESSED_BLEND
- Bytef* dest = NULL;
- free_it free_it_really(dest);
+ std::vector<Bytef> uncompressed;
#endif
@@ -213,6 +210,7 @@ void BlenderImporter::InternReadFile( const std::string& pFile,
size_t total = 0l;
+ // TODO: be smarter about this, decompress directly into heap buffer
// and decompress the data .... do 1k chunks in the hope that we won't kill the stack
#define MYBLOCK 1024
Bytef block[MYBLOCK];
@@ -227,8 +225,8 @@ void BlenderImporter::InternReadFile( const std::string& pFile,
}
const size_t have = MYBLOCK - zstream.avail_out;
total += have;
- dest = reinterpret_cast<Bytef*>( realloc(dest,total) );
- memcpy(dest + total - have,block,have);
+ uncompressed.resize(total);
+ memcpy(uncompressed.data() + total - have,block,have);
}
while (ret != Z_STREAM_END);
@@ -236,7 +234,7 @@ void BlenderImporter::InternReadFile( const std::string& pFile,
inflateEnd(&zstream);
// replace the input stream with a memory stream
- stream.reset(new MemoryIOStream(reinterpret_cast<uint8_t*>(dest),total));
+ stream.reset(new MemoryIOStream(reinterpret_cast<uint8_t*>(uncompressed.data()),total));
// .. and retry
stream->Read(magic,7,1);
@@ -330,12 +328,12 @@ void BlenderImporter::ExtractScene(Scene& out, const FileDatabase& file)
ss.Convert(out,file);
#ifndef ASSIMP_BUILD_BLENDER_NO_STATS
- DefaultLogger::get()->info((format(),
+ ASSIMP_LOG_INFO_F(
"(Stats) Fields read: " ,file.stats().fields_read,
", pointers resolved: " ,file.stats().pointers_resolved,
", cache hits: " ,file.stats().cache_hits,
", cached objects: " ,file.stats().cached_objects
- ));
+ );
#endif
}
@@ -1024,6 +1022,34 @@ void BlenderImporter::ConvertMesh(const Scene& /*in*/, const Object* /*obj*/, co
}
}
+ // TODO should we create the TextureUVMapping map in Convert<Material> to prevent redundant processing?
+
+ // create texture <-> uvname mapping for all materials
+ // key is texture number, value is data *
+ typedef std::map<uint32_t, const MLoopUV *> TextureUVMapping;
+ // key is material number, value is the TextureUVMapping for the material
+ typedef std::map<uint32_t, TextureUVMapping> MaterialTextureUVMappings;
+ MaterialTextureUVMappings matTexUvMappings;
+ const uint32_t maxMat = static_cast<const uint32_t>(mesh->mat.size());
+ for (uint32_t m = 0; m < maxMat; ++m) {
+ // get material by index
+ const std::shared_ptr<Material> pMat = mesh->mat[m];
+ TextureUVMapping texuv;
+ const uint32_t maxTex = sizeof(pMat->mtex) / sizeof(pMat->mtex[0]);
+ for (uint32_t t = 0; t < maxTex; ++t) {
+ if (pMat->mtex[t] && pMat->mtex[t]->uvname[0]) {
+ // get the CustomData layer for given uvname and correct type
+ const ElemBase *pLoop = getCustomDataLayerData(mesh->ldata, CD_MLOOPUV, pMat->mtex[t]->uvname);
+ if (pLoop) {
+ texuv.insert(std::make_pair(t, dynamic_cast<const MLoopUV *>(pLoop)));
+ }
+ }
+ }
+ if (texuv.size()) {
+ matTexUvMappings.insert(std::make_pair(m, texuv));
+ }
+ }
+
// collect texture coordinates, they're stored in a separate per-face buffer
if (mesh->mtface || mesh->mloopuv) {
if (mesh->totface > static_cast<int> ( mesh->mtface.size())) {
@@ -1031,8 +1057,17 @@ void BlenderImporter::ConvertMesh(const Scene& /*in*/, const Object* /*obj*/, co
}
for (std::vector<aiMesh*>::iterator it = temp->begin()+old; it != temp->end(); ++it) {
ai_assert((*it)->mNumVertices && (*it)->mNumFaces);
-
- (*it)->mTextureCoords[0] = new aiVector3D[(*it)->mNumVertices];
+ const auto itMatTexUvMapping = matTexUvMappings.find((*it)->mMaterialIndex);
+ if (itMatTexUvMapping == matTexUvMappings.end()) {
+ // default behaviour like before
+ (*it)->mTextureCoords[0] = new aiVector3D[(*it)->mNumVertices];
+ }
+ else {
+ // create texture coords for every mapped tex
+ for (uint32_t i = 0; i < itMatTexUvMapping->second.size(); ++i) {
+ (*it)->mTextureCoords[i] = new aiVector3D[(*it)->mNumVertices];
+ }
+ }
(*it)->mNumFaces = (*it)->mNumVertices = 0;
}
@@ -1054,13 +1089,34 @@ void BlenderImporter::ConvertMesh(const Scene& /*in*/, const Object* /*obj*/, co
aiMesh* const out = temp[ mat_num_to_mesh_idx[ v.mat_nr ] ];
const aiFace& f = out->mFaces[out->mNumFaces++];
- aiVector3D* vo = &out->mTextureCoords[0][out->mNumVertices];
- for (unsigned int j = 0; j < f.mNumIndices; ++j,++vo,++out->mNumVertices) {
- const MLoopUV& uv = mesh->mloopuv[v.loopstart + j];
- vo->x = uv.uv[0];
- vo->y = uv.uv[1];
+ const auto itMatTexUvMapping = matTexUvMappings.find(v.mat_nr);
+ if (itMatTexUvMapping == matTexUvMappings.end()) {
+ // old behavior
+ aiVector3D* vo = &out->mTextureCoords[0][out->mNumVertices];
+ for (unsigned int j = 0; j < f.mNumIndices; ++j, ++vo, ++out->mNumVertices) {
+ const MLoopUV& uv = mesh->mloopuv[v.loopstart + j];
+ vo->x = uv.uv[0];
+ vo->y = uv.uv[1];
+ }
+ }
+ else {
+ // create textureCoords for every mapped tex
+ for (uint32_t m = 0; m < itMatTexUvMapping->second.size(); ++m) {
+ const MLoopUV *tm = itMatTexUvMapping->second[m];
+ aiVector3D* vo = &out->mTextureCoords[m][out->mNumVertices];
+ uint32_t j = 0;
+ for (; j < f.mNumIndices; ++j, ++vo) {
+ const MLoopUV& uv = tm[v.loopstart + j];
+ vo->x = uv.uv[0];
+ vo->y = uv.uv[1];
+ }
+ // only update written mNumVertices in last loop
+ // TODO why must the numVertices be incremented here?
+ if (m == itMatTexUvMapping->second.size() - 1) {
+ out->mNumVertices += j;
+ }
+ }
}
-
}
}
@@ -1144,24 +1200,24 @@ void BlenderImporter::ConvertMesh(const Scene& /*in*/, const Object* /*obj*/, co
// ------------------------------------------------------------------------------------------------
aiCamera* BlenderImporter::ConvertCamera(const Scene& /*in*/, const Object* obj, const Camera* cam, ConversionData& /*conv_data*/)
{
- ScopeGuard<aiCamera> out(new aiCamera());
+ std::unique_ptr<aiCamera> out(new aiCamera());
out->mName = obj->id.name+2;
out->mPosition = aiVector3D(0.f, 0.f, 0.f);
out->mUp = aiVector3D(0.f, 1.f, 0.f);
out->mLookAt = aiVector3D(0.f, 0.f, -1.f);
if (cam->sensor_x && cam->lens) {
- out->mHorizontalFOV = std::atan2(cam->sensor_x, 2.f * cam->lens);
+ out->mHorizontalFOV = 2.f * std::atan2(cam->sensor_x, 2.f * cam->lens);
}
out->mClipPlaneNear = cam->clipsta;
out->mClipPlaneFar = cam->clipend;
- return out.dismiss();
+ return out.release();
}
// ------------------------------------------------------------------------------------------------
aiLight* BlenderImporter::ConvertLight(const Scene& /*in*/, const Object* obj, const Lamp* lamp, ConversionData& /*conv_data*/)
{
- ScopeGuard<aiLight> out(new aiLight());
+ std::unique_ptr<aiLight> out(new aiLight());
out->mName = obj->id.name+2;
switch (lamp->type)
@@ -1199,7 +1255,7 @@ aiLight* BlenderImporter::ConvertLight(const Scene& /*in*/, const Object* obj, c
out->mColorAmbient = aiColor3D(lamp->r, lamp->g, lamp->b) * lamp->energy;
out->mColorSpecular = aiColor3D(lamp->r, lamp->g, lamp->b) * lamp->energy;
out->mColorDiffuse = aiColor3D(lamp->r, lamp->g, lamp->b) * lamp->energy;
- return out.dismiss();
+ return out.release();
}
// ------------------------------------------------------------------------------------------------
@@ -1217,7 +1273,7 @@ aiNode* BlenderImporter::ConvertNode(const Scene& in, const Object* obj, Convers
++it;
}
- ScopeGuard<aiNode> node(new aiNode(obj->id.name+2)); // skip over the name prefix 'OB'
+ std::unique_ptr<aiNode> node(new aiNode(obj->id.name+2)); // skip over the name prefix 'OB'
if (obj->data) {
switch (obj->type)
{
@@ -1301,14 +1357,14 @@ aiNode* BlenderImporter::ConvertNode(const Scene& in, const Object* obj, Convers
aiNode** nd = node->mChildren = new aiNode*[node->mNumChildren]();
for (const Object* nobj :children) {
*nd = ConvertNode(in,nobj,conv_data,node->mTransformation * parentTransform);
- (*nd++)->mParent = node;
+ (*nd++)->mParent = node.get();
}
}
// apply modifiers
modifier_cache->ApplyModifiers(*node,conv_data,in,*obj);
- return node.dismiss();
+ return node.release();
}
#endif // ASSIMP_BUILD_NO_BLEND_IMPORTER
diff --git a/code/BlenderLoader.h b/code/BlenderLoader.h
index 66fff594b..9f452a0aa 100644
--- a/code/BlenderLoader.h
+++ b/code/BlenderLoader.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -45,8 +46,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef INCLUDED_AI_BLEND_LOADER_H
#define INCLUDED_AI_BLEND_LOADER_H
-#include "BaseImporter.h"
-#include "LogAux.h"
+#include <assimp/BaseImporter.h>
+#include <assimp/LogAux.h>
#include <memory>
struct aiNode;
diff --git a/code/BlenderModifier.cpp b/code/BlenderModifier.cpp
index 161028b6b..1f32ee410 100644
--- a/code/BlenderModifier.cpp
+++ b/code/BlenderModifier.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -47,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "BlenderModifier.h"
#include <assimp/SceneCombiner.h>
-#include "Subdivision.h"
+#include <assimp/Subdivision.h>
#include <assimp/scene.h>
#include <memory>
@@ -70,34 +71,6 @@ static const fpCreateModifier creators[] = {
};
// ------------------------------------------------------------------------------------------------
-// just testing out some new macros to simplify logging
-#define ASSIMP_LOG_WARN_F(string,...)\
- DefaultLogger::get()->warn((Formatter::format(string),__VA_ARGS__))
-
-#define ASSIMP_LOG_ERROR_F(string,...)\
- DefaultLogger::get()->error((Formatter::format(string),__VA_ARGS__))
-
-#define ASSIMP_LOG_DEBUG_F(string,...)\
- DefaultLogger::get()->debug((Formatter::format(string),__VA_ARGS__))
-
-#define ASSIMP_LOG_INFO_F(string,...)\
- DefaultLogger::get()->info((Formatter::format(string),__VA_ARGS__))
-
-
-#define ASSIMP_LOG_WARN(string)\
- DefaultLogger::get()->warn(string)
-
-#define ASSIMP_LOG_ERROR(string)\
- DefaultLogger::get()->error(string)
-
-#define ASSIMP_LOG_DEBUG(string)\
- DefaultLogger::get()->debug(string)
-
-#define ASSIMP_LOG_INFO(string)\
- DefaultLogger::get()->info(string)
-
-
-// ------------------------------------------------------------------------------------------------
struct SharedModifierData : ElemBase
{
ModifierData modifier;
@@ -266,7 +239,7 @@ void BlenderModifier_Mirror :: DoIt(aiNode& out, ConversionData& conv_data, co
std::copy(out.mMeshes,out.mMeshes+out.mNumMeshes,nind);
std::transform(out.mMeshes,out.mMeshes+out.mNumMeshes,nind+out.mNumMeshes,
- std::bind1st(std::plus< unsigned int >(),out.mNumMeshes));
+ [&out](unsigned int n) { return out.mNumMeshes + n; });
delete[] out.mMeshes;
out.mMeshes = nind;
@@ -310,7 +283,9 @@ void BlenderModifier_Subdivision :: DoIt(aiNode& out, ConversionData& conv_data
std::unique_ptr<Subdivider> subd(Subdivider::Create(algo));
ai_assert(subd);
-
+ if ( conv_data.meshes->empty() ) {
+ return;
+ }
aiMesh** const meshes = &conv_data.meshes[conv_data.meshes->size() - out.mNumMeshes];
std::unique_ptr<aiMesh*[]> tempmeshes(new aiMesh*[out.mNumMeshes]());
diff --git a/code/BlenderModifier.h b/code/BlenderModifier.h
index 9fa8c74ee..b8797691b 100644
--- a/code/BlenderModifier.h
+++ b/code/BlenderModifier.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -46,53 +47,57 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define INCLUDED_AI_BLEND_MODIFIER_H
#include "BlenderIntermediate.h"
-#include "TinyFormatter.h"
namespace Assimp {
namespace Blender {
// -------------------------------------------------------------------------------------------
-/** Dummy base class for all blender modifiers. Modifiers are reused between imports, so
- * they should be stateless and not try to cache model data. */
+/**
+ * Dummy base class for all blender modifiers. Modifiers are reused between imports, so
+ * they should be stateless and not try to cache model data.
+ */
// -------------------------------------------------------------------------------------------
-class BlenderModifier
-{
+class BlenderModifier {
public:
+ /**
+ * The class destructor, virtual.
+ */
virtual ~BlenderModifier() {
// empty
}
-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*/) {
return false;
}
// --------------------
- /** 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()
- * was called and gave positive response. */
+ * was called and gave positive response.
+ */
virtual void DoIt(aiNode& /*out*/,
ConversionData& /*conv_data*/,
const ElemBase& orig_modifier,
const Scene& /*in*/,
const Object& /*orig_object*/
) {
- DefaultLogger::get()->warn((Formatter::format("This modifier is not supported, skipping: "),orig_modifier.dna_type));
+ ASSIMP_LOG_INFO_F("This modifier is not supported, skipping: ",orig_modifier.dna_type );
return;
}
};
-
// -------------------------------------------------------------------------------------------
-/** Manage all known modifiers and instance and apply them if necessary */
+/**
+ * Manage all known modifiers and instance and apply them if necessary
+ */
// -------------------------------------------------------------------------------------------
-class BlenderModifierShowcase
-{
+class BlenderModifierShowcase {
public:
-
// --------------------
/** Apply all requested modifiers provided we support them. */
void ApplyModifiers(aiNode& out,
@@ -102,25 +107,18 @@ public:
);
private:
-
TempArray< std::vector,BlenderModifier > cached_modifiers;
};
-
-
-
-
-// MODIFIERS
-
-
+// MODIFIERS /////////////////////////////////////////////////////////////////////////////////
// -------------------------------------------------------------------------------------------
-/** Mirror modifier. Status: implemented. */
+/**
+ * Mirror modifier. Status: implemented.
+ */
// -------------------------------------------------------------------------------------------
-class BlenderModifier_Mirror : public BlenderModifier
-{
+class BlenderModifier_Mirror : public BlenderModifier {
public:
-
// --------------------
virtual bool IsActive( const ModifierData& modin);
@@ -136,8 +134,7 @@ public:
// -------------------------------------------------------------------------------------------
/** Subdivision modifier. Status: dummy. */
// -------------------------------------------------------------------------------------------
-class BlenderModifier_Subdivision : public BlenderModifier
-{
+class BlenderModifier_Subdivision : public BlenderModifier {
public:
// --------------------
@@ -152,6 +149,7 @@ public:
) ;
};
+}
+}
-}}
#endif // !INCLUDED_AI_BLEND_MODIFIER_H
diff --git a/code/BlenderScene.cpp b/code/BlenderScene.cpp
index b9068329b..4fc353b15 100644
--- a/code/BlenderScene.cpp
+++ b/code/BlenderScene.cpp
@@ -47,6 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "BlenderScene.h"
#include "BlenderSceneGen.h"
#include "BlenderDNA.h"
+#include "BlenderCustomData.h"
using namespace Assimp;
using namespace Assimp::Blender;
@@ -59,7 +60,9 @@ template <> void Structure :: Convert<Object> (
{
ReadField<ErrorPolicy_Fail>(dest.id,"id",db);
- ReadField<ErrorPolicy_Fail>((int&)dest.type,"type",db);
+ int temp = 0;
+ ReadField<ErrorPolicy_Fail>(temp,"type",db);
+ dest.type = static_cast<Assimp::Blender::Object::Type>(temp);
ReadFieldArray2<ErrorPolicy_Warn>(dest.obmat,"obmat",db);
ReadFieldArray2<ErrorPolicy_Warn>(dest.parentinv,"parentinv",db);
ReadFieldArray<ErrorPolicy_Warn>(dest.parsubstr,"parsubstr",db);
@@ -100,14 +103,21 @@ template <> void Structure :: Convert<MTex> (
) const
{
- ReadField<ErrorPolicy_Igno>((short&)dest.mapto,"mapto",db);
- ReadField<ErrorPolicy_Igno>((int&)dest.blendtype,"blendtype",db);
+ int temp_short = 0;
+ ReadField<ErrorPolicy_Igno>(temp_short,"mapto",db);
+ dest.mapto = static_cast<Assimp::Blender::MTex::MapType>(temp_short);
+ int temp = 0;
+ ReadField<ErrorPolicy_Igno>(temp,"blendtype",db);
+ dest.blendtype = static_cast<Assimp::Blender::MTex::BlendType>(temp);
ReadFieldPtr<ErrorPolicy_Igno>(dest.object,"*object",db);
ReadFieldPtr<ErrorPolicy_Igno>(dest.tex,"*tex",db);
ReadFieldArray<ErrorPolicy_Igno>(dest.uvname,"uvname",db);
- ReadField<ErrorPolicy_Igno>((int&)dest.projx,"projx",db);
- ReadField<ErrorPolicy_Igno>((int&)dest.projy,"projy",db);
- ReadField<ErrorPolicy_Igno>((int&)dest.projz,"projz",db);
+ ReadField<ErrorPolicy_Igno>(temp,"projx",db);
+ dest.projx = static_cast<Assimp::Blender::MTex::Projection>(temp);
+ ReadField<ErrorPolicy_Igno>(temp,"projy",db);
+ dest.projy = static_cast<Assimp::Blender::MTex::Projection>(temp);
+ ReadField<ErrorPolicy_Igno>(temp,"projz",db);
+ dest.projz = static_cast<Assimp::Blender::MTex::Projection>(temp);
ReadField<ErrorPolicy_Igno>(dest.mapping,"mapping",db);
ReadFieldArray<ErrorPolicy_Igno>(dest.ofs,"ofs",db);
ReadFieldArray<ErrorPolicy_Igno>(dest.size,"size",db);
@@ -190,8 +200,10 @@ template <> void Structure :: Convert<Lamp> (
{
ReadField<ErrorPolicy_Fail>(dest.id,"id",db);
- ReadField<ErrorPolicy_Fail>((int&)dest.type,"type",db);
- ReadField<ErrorPolicy_Igno>(dest.flags,"flags",db);
+ int temp = 0;
+ ReadField<ErrorPolicy_Fail>(temp,"type",db);
+ dest.type = static_cast<Assimp::Blender::Lamp::Type>(temp);
+ ReadField<ErrorPolicy_Igno>(dest.flags,"flag",db);
ReadField<ErrorPolicy_Igno>(dest.colormodel,"colormodel",db);
ReadField<ErrorPolicy_Igno>(dest.totex,"totex",db);
ReadField<ErrorPolicy_Warn>(dest.r,"r",db);
@@ -204,7 +216,8 @@ template <> void Structure :: Convert<Lamp> (
ReadField<ErrorPolicy_Igno>(dest.spotblend,"spotblend",db);
ReadField<ErrorPolicy_Igno>(dest.att1,"att1",db);
ReadField<ErrorPolicy_Igno>(dest.att2,"att2",db);
- ReadField<ErrorPolicy_Igno>((int&)dest.falloff_type,"falloff_type",db);
+ ReadField<ErrorPolicy_Igno>(temp,"falloff_type",db);
+ dest.falloff_type = static_cast<Assimp::Blender::Lamp::FalloffType>(temp);
ReadField<ErrorPolicy_Igno>(dest.sun_brightness,"sun_brightness",db);
ReadField<ErrorPolicy_Igno>(dest.area_size,"area_size",db);
ReadField<ErrorPolicy_Igno>(dest.area_sizey,"area_sizey",db);
@@ -469,6 +482,12 @@ template <> void Structure :: Convert<Mesh> (
ReadFieldPtr<ErrorPolicy_Igno>(dest.mcol,"*mcol",db);
ReadFieldPtr<ErrorPolicy_Fail>(dest.mat,"**mat",db);
+ ReadField<ErrorPolicy_Igno>(dest.vdata, "vdata", db);
+ ReadField<ErrorPolicy_Igno>(dest.edata, "edata", db);
+ ReadField<ErrorPolicy_Igno>(dest.fdata, "fdata", db);
+ ReadField<ErrorPolicy_Igno>(dest.pdata, "pdata", db);
+ ReadField<ErrorPolicy_Warn>(dest.ldata, "ldata", db);
+
db.reader->IncPtr(size);
}
@@ -693,8 +712,12 @@ template <> void Structure :: Convert<Tex> (
const FileDatabase& db
) const
{
- ReadField<ErrorPolicy_Igno>((short&)dest.imaflag,"imaflag",db);
- ReadField<ErrorPolicy_Fail>((int&)dest.type,"type",db);
+ short temp_short = 0;
+ ReadField<ErrorPolicy_Igno>(temp_short,"imaflag",db);
+ dest.imaflag = static_cast<Assimp::Blender::Tex::ImageFlags>(temp_short);
+ int temp = 0;
+ ReadField<ErrorPolicy_Fail>(temp,"type",db);
+ dest.type = static_cast<Assimp::Blender::Tex::Type>(temp);
ReadFieldPtr<ErrorPolicy_Warn>(dest.ima,"*ima",db);
db.reader->IncPtr(size);
@@ -708,8 +731,11 @@ template <> void Structure :: Convert<Camera> (
{
ReadField<ErrorPolicy_Fail>(dest.id,"id",db);
- ReadField<ErrorPolicy_Warn>((int&)dest.type,"type",db);
- ReadField<ErrorPolicy_Warn>((int&)dest.flag,"flag",db);
+ int temp = 0;
+ ReadField<ErrorPolicy_Warn>(temp,"type",db);
+ dest.type = static_cast<Assimp::Blender::Camera::Type>(temp);
+ ReadField<ErrorPolicy_Warn>(temp,"flag",db);
+ dest.flag = static_cast<Assimp::Blender::Camera::Type>(temp);
ReadField<ErrorPolicy_Warn>(dest.lens,"lens",db);
ReadField<ErrorPolicy_Warn>(dest.sensor_x,"sensor_x",db);
ReadField<ErrorPolicy_Igno>(dest.clipsta,"clipsta",db);
@@ -768,6 +794,41 @@ template <> void Structure :: Convert<Image> (
}
//--------------------------------------------------------------------------------
+template <> void Structure::Convert<CustomData>(
+ CustomData& dest,
+ const FileDatabase& db
+ ) const
+{
+ ReadFieldArray<ErrorPolicy_Warn>(dest.typemap, "typemap", db);
+ ReadField<ErrorPolicy_Warn>(dest.totlayer, "totlayer", db);
+ ReadField<ErrorPolicy_Warn>(dest.maxlayer, "maxlayer", db);
+ ReadField<ErrorPolicy_Warn>(dest.totsize, "totsize", db);
+ ReadFieldPtrVector<ErrorPolicy_Warn>(dest.layers, "*layers", db);
+
+ db.reader->IncPtr(size);
+}
+
+//--------------------------------------------------------------------------------
+template <> void Structure::Convert<CustomDataLayer>(
+ CustomDataLayer& dest,
+ const FileDatabase& db
+ ) const
+{
+ ReadField<ErrorPolicy_Fail>(dest.type, "type", db);
+ ReadField<ErrorPolicy_Fail>(dest.offset, "offset", db);
+ ReadField<ErrorPolicy_Fail>(dest.flag, "flag", db);
+ ReadField<ErrorPolicy_Fail>(dest.active, "active", db);
+ ReadField<ErrorPolicy_Fail>(dest.active_rnd, "active_rnd", db);
+ ReadField<ErrorPolicy_Fail>(dest.active_clone, "active_clone", db);
+ ReadField<ErrorPolicy_Fail>(dest.active_mask, "active_mask", db);
+ ReadField<ErrorPolicy_Fail>(dest.uid, "uid", db);
+ ReadFieldArray<ErrorPolicy_Warn>(dest.name, "name", db);
+ ReadCustomDataPtr<ErrorPolicy_Fail>(dest.data, dest.type, "*data", db);
+
+ db.reader->IncPtr(size);
+}
+
+//--------------------------------------------------------------------------------
void DNA::RegisterConverters() {
converters["Object"] = DNA::FactoryPair( &Structure::Allocate<Object>, &Structure::Convert<Object> );
@@ -803,6 +864,8 @@ void DNA::RegisterConverters() {
converters["Camera"] = DNA::FactoryPair( &Structure::Allocate<Camera>, &Structure::Convert<Camera> );
converters["MirrorModifierData"] = DNA::FactoryPair( &Structure::Allocate<MirrorModifierData>, &Structure::Convert<MirrorModifierData> );
converters["Image"] = DNA::FactoryPair( &Structure::Allocate<Image>, &Structure::Convert<Image> );
+ converters["CustomData"] = DNA::FactoryPair(&Structure::Allocate<CustomData>, &Structure::Convert<CustomData>);
+ converters["CustomDataLayer"] = DNA::FactoryPair(&Structure::Allocate<CustomDataLayer>, &Structure::Convert<CustomDataLayer>);
}
#endif // ASSIMP_BUILD_NO_BLEND_IMPORTER
diff --git a/code/BlenderScene.h b/code/BlenderScene.h
index 36094eabd..b74d7b198 100644
--- a/code/BlenderScene.h
+++ b/code/BlenderScene.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -156,10 +157,16 @@ struct World : ElemBase {
// -------------------------------------------------------------------------------
struct MVert : ElemBase {
float co[3] FAIL;
- float no[3] FAIL;
+ float no[3] FAIL; // readed as short and divided through / 32767.f
char flag;
int mat_nr WARN;
int bweight;
+
+ MVert() : ElemBase()
+ , flag(0)
+ , mat_nr(0)
+ , bweight(0)
+ {}
};
// -------------------------------------------------------------------------------
@@ -225,6 +232,14 @@ struct TFace : ElemBase {
// -------------------------------------------------------------------------------
struct MTFace : ElemBase {
+ MTFace()
+ : flag(0)
+ , mode(0)
+ , tile(0)
+ , unwrap(0)
+ {
+ }
+
float uv[4][2] FAIL;
char flag;
short mode;
@@ -360,6 +375,72 @@ struct Material : ElemBase {
std::shared_ptr<MTex> mtex[18];
};
+/*
+CustomDataLayer 104
+
+ int type 0 4
+ int offset 4 4
+ int flag 8 4
+ int active 12 4
+ int active_rnd 16 4
+ int active_clone 20 4
+ int active_mask 24 4
+ int uid 28 4
+ char name 32 64
+ void *data 96 8
+*/
+struct CustomDataLayer : ElemBase {
+ int type;
+ int offset;
+ int flag;
+ int active;
+ int active_rnd;
+ int active_clone;
+ int active_mask;
+ int uid;
+ char name[64];
+ std::shared_ptr<ElemBase> data; // must be converted to real type according type member
+
+ CustomDataLayer()
+ : ElemBase()
+ , type(0)
+ , offset(0)
+ , flag(0)
+ , active(0)
+ , active_rnd(0)
+ , active_clone(0)
+ , active_mask(0)
+ , uid(0)
+ , data(nullptr)
+ {
+ memset(name, 0, sizeof name);
+ }
+};
+
+/*
+CustomData 208
+
+ CustomDataLayer *layers 0 8
+ int typemap 8 168
+ int pad_i1 176 4
+ int totlayer 180 4
+ int maxlayer 184 4
+ int totsize 188 4
+ BLI_mempool *pool 192 8
+ CustomDataExternal *external 200 8
+*/
+struct CustomData : ElemBase {
+ vector<std::shared_ptr<struct CustomDataLayer> > layers;
+ int typemap[42]; // CD_NUMTYPES
+ int totlayer;
+ int maxlayer;
+ int totsize;
+ /*
+ std::shared_ptr<BLI_mempool> pool;
+ std::shared_ptr<CustomDataExternal> external;
+ */
+};
+
// -------------------------------------------------------------------------------
struct Mesh : ElemBase {
ID id FAIL;
@@ -389,6 +470,12 @@ struct Mesh : ElemBase {
vector<MCol> mcol;
vector< std::shared_ptr<Material> > mat FAIL;
+
+ struct CustomData vdata;
+ struct CustomData edata;
+ struct CustomData fdata;
+ struct CustomData pdata;
+ struct CustomData ldata;
};
// -------------------------------------------------------------------------------
diff --git a/code/BlenderSceneGen.h b/code/BlenderSceneGen.h
index 92c727eb2..ce94d0dc2 100644
--- a/code/BlenderSceneGen.h
+++ b/code/BlenderSceneGen.h
@@ -248,6 +248,17 @@ template <> void Structure :: Convert<Image> (
) const
;
+template <> void Structure::Convert<CustomData>(
+ CustomData& dest,
+ const FileDatabase& db
+ ) const
+ ;
+
+template <> void Structure::Convert<CustomDataLayer>(
+ CustomDataLayer& dest,
+ const FileDatabase& db
+ ) const
+ ;
}
}
diff --git a/code/BlenderTessellator.cpp b/code/BlenderTessellator.cpp
index 2eaa938dd..afedbfb53 100644
--- a/code/BlenderTessellator.cpp
+++ b/code/BlenderTessellator.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -59,7 +60,11 @@ static const unsigned int BLEND_TESS_MAGIC = 0x83ed9ac3;
namspace Assimp
{
- template< > const std::string LogFunctions< BlenderTessellatorGL >::log_prefix = "BLEND_TESS_GL: ";
+ template< > const char* LogFunctions< BlenderTessellatorGL >::Prefix()
+ {
+ static auto prefix = "BLEND_TESS_GL: ";
+ return prefix;
+ }
}
using namespace Assimp;
@@ -252,7 +257,11 @@ void BlenderTessellatorGL::TessellateError( GLenum errorCode, void* )
namespace Assimp
{
- template< > const std::string LogFunctions< BlenderTessellatorP2T >::log_prefix = "BLEND_TESS_P2T: ";
+ template< > const char* LogFunctions< BlenderTessellatorP2T >::Prefix()
+ {
+ static auto prefix = "BLEND_TESS_P2T: ";
+ return prefix;
+ }
}
using namespace Assimp;
diff --git a/code/BlenderTessellator.h b/code/BlenderTessellator.h
index 47d3a4665..dab3ba8aa 100644
--- a/code/BlenderTessellator.h
+++ b/code/BlenderTessellator.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -46,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define INCLUDED_AI_BLEND_TESSELLATOR_H
// Use these to toggle between GLU Tessellate or poly2tri
-// Note (acg) keep GLU Tesselate disabled by default - if it is turned on,
+// Note (acg) keep GLU Tessellate disabled by default - if it is turned on,
// assimp needs to be linked against GLU, which is currently not yet
// made configurable in CMake and potentially not wanted by most users
// as it requires a Gl environment.
@@ -58,7 +59,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# define ASSIMP_BLEND_WITH_POLY_2_TRI 1
#endif
-#include "LogAux.h"
+#include <assimp/LogAux.h>
#if ASSIMP_BLEND_WITH_GLU_TESSELLATE
diff --git a/code/C4DImporter.cpp b/code/C4DImporter.cpp
index 252766ca6..665d74633 100644
--- a/code/C4DImporter.cpp
+++ b/code/C4DImporter.cpp
@@ -51,7 +51,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#include "C4DImporter.h"
-#include "TinyFormatter.h"
+#include <assimp/TinyFormatter.h>
#include <memory>
#include <assimp/IOSystem.hpp>
#include <assimp/scene.h>
@@ -185,11 +185,11 @@ void C4DImporter::InternReadFile( const std::string& pFile,
if(mesh->mMaterialIndex >= mat_count) {
++mat_count;
- ScopeGuard<aiMaterial> def_material(new aiMaterial());
+ std::unique_ptr<aiMaterial> def_material(new aiMaterial());
const aiString name(AI_DEFAULT_MATERIAL_NAME);
def_material->AddProperty(&name, AI_MATKEY_NAME);
- materials.push_back(def_material.dismiss());
+ materials.push_back(def_material.release());
break;
}
}
@@ -393,7 +393,7 @@ void C4DImporter::RecurseHierarchy(BaseObject* object, aiNode* parent)
// ------------------------------------------------------------------------------------------------
aiMesh* C4DImporter::ReadMesh(BaseObject* object)
{
- assert(object != NULL && object->GetType() == Opolygon);
+ ai_assert(object != NULL && object->GetType() == Opolygon);
// based on Melange sample code
PolygonObject* const polyObject = dynamic_cast<PolygonObject*>(object);
@@ -412,7 +412,7 @@ aiMesh* C4DImporter::ReadMesh(BaseObject* object)
const CPolygon* polys = polyObject->GetPolygonR();
ai_assert(polys != NULL);
- ScopeGuard<aiMesh> mesh(new aiMesh());
+ std::unique_ptr<aiMesh> mesh(new aiMesh());
mesh->mNumFaces = static_cast<unsigned int>(polyCount);
aiFace* face = mesh->mFaces = new aiFace[mesh->mNumFaces]();
@@ -616,7 +616,7 @@ aiMesh* C4DImporter::ReadMesh(BaseObject* object)
}
mesh->mMaterialIndex = ResolveMaterial(polyObject);
- return mesh.dismiss();
+ return mesh.release();
}
@@ -635,7 +635,7 @@ unsigned int C4DImporter::ResolveMaterial(PolygonObject* obj)
TextureTag& ttag = dynamic_cast<TextureTag&>(*tag);
BaseMaterial* const mat = ttag.GetMaterial();
- assert(mat != NULL);
+ ai_assert(mat != NULL);
const MaterialMap::const_iterator it = material_mapping.find(mat);
if(it == material_mapping.end()) {
diff --git a/code/C4DImporter.h b/code/C4DImporter.h
index 3ba2a17c6..2f67d90f3 100644
--- a/code/C4DImporter.h
+++ b/code/C4DImporter.h
@@ -44,10 +44,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef INCLUDED_AI_CINEMA_4D_LOADER_H
#define INCLUDED_AI_CINEMA_4D_LOADER_H
-#include "BaseImporter.h"
-#include "LogAux.h"
+#include <assimp/BaseImporter.h>
+#include <assimp/LogAux.h>
-#include <set>
+#include <map>
struct aiNode;
struct aiMesh;
struct aiMaterial;
diff --git a/code/CInterfaceIOWrapper.cpp b/code/CInterfaceIOWrapper.cpp
index 9de75b683..41dbba772 100644
--- a/code/CInterfaceIOWrapper.cpp
+++ b/code/CInterfaceIOWrapper.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/CInterfaceIOWrapper.h b/code/CInterfaceIOWrapper.h
index 78cac0cf9..6f0eb7957 100644
--- a/code/CInterfaceIOWrapper.h
+++ b/code/CInterfaceIOWrapper.h
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt
index 82497467a..e29467164 100644
--- a/code/CMakeLists.txt
+++ b/code/CMakeLists.txt
@@ -1,7 +1,8 @@
# Open Asset Import Library (assimp)
# ----------------------------------------------------------------------
#
-# Copyright (c) 2006-2017, assimp team
+# Copyright (c) 2006-2018, assimp team
+
# All rights reserved.
#
@@ -61,6 +62,7 @@ SET( PUBLIC_HEADERS
${HEADER_PATH}/color4.inl
${CMAKE_CURRENT_BINARY_DIR}/../include/assimp/config.h
${HEADER_PATH}/defs.h
+ ${HEADER_PATH}/Defines.h
${HEADER_PATH}/cfileio.h
${HEADER_PATH}/light.h
${HEADER_PATH}/material.h
@@ -70,6 +72,7 @@ SET( PUBLIC_HEADERS
${HEADER_PATH}/matrix4x4.h
${HEADER_PATH}/matrix4x4.inl
${HEADER_PATH}/mesh.h
+ ${HEADER_PATH}/pbrmaterial.h
${HEADER_PATH}/postprocess.h
${HEADER_PATH}/quaternion.h
${HEADER_PATH}/quaternion.inl
@@ -97,6 +100,40 @@ SET( PUBLIC_HEADERS
${HEADER_PATH}/DefaultIOStream.h
${HEADER_PATH}/DefaultIOSystem.h
${HEADER_PATH}/SceneCombiner.h
+ ${HEADER_PATH}/fast_atof.h
+ ${HEADER_PATH}/qnan.h
+ ${HEADER_PATH}/BaseImporter.h
+ ${HEADER_PATH}/Hash.h
+ ${HEADER_PATH}/MemoryIOWrapper.h
+ ${HEADER_PATH}/ParsingUtils.h
+ ${HEADER_PATH}/StreamReader.h
+ ${HEADER_PATH}/StreamWriter.h
+ ${HEADER_PATH}/StringComparison.h
+ ${HEADER_PATH}/StringUtils.h
+ ${HEADER_PATH}/SGSpatialSort.h
+ ${HEADER_PATH}/GenericProperty.h
+ ${HEADER_PATH}/SpatialSort.h
+ ${HEADER_PATH}/SkeletonMeshBuilder.h
+ ${HEADER_PATH}/SmoothingGroups.h
+ ${HEADER_PATH}/SmoothingGroups.inl
+ ${HEADER_PATH}/StandardShapes.h
+ ${HEADER_PATH}/RemoveComments.h
+ ${HEADER_PATH}/Subdivision.h
+ ${HEADER_PATH}/Vertex.h
+ ${HEADER_PATH}/LineSplitter.h
+ ${HEADER_PATH}/TinyFormatter.h
+ ${HEADER_PATH}/Profiler.h
+ ${HEADER_PATH}/LogAux.h
+ ${HEADER_PATH}/Bitmap.h
+ ${HEADER_PATH}/XMLTools.h
+ ${HEADER_PATH}/IOStreamBuffer.h
+ ${HEADER_PATH}/CreateAnimMesh.h
+ ${HEADER_PATH}/irrXMLWrapper.h
+ ${HEADER_PATH}/BlobIOSystem.h
+ ${HEADER_PATH}/MathFunctions.h
+ ${HEADER_PATH}/Macros.h
+ ${HEADER_PATH}/Exceptional.h
+ ${HEADER_PATH}/ByteSwapper.h
)
SET( Core_SRCS
@@ -116,70 +153,52 @@ SET( Logging_SRCS
SOURCE_GROUP(Logging FILES ${Logging_SRCS})
SET( Common_SRCS
- fast_atof.h
- qnan.h
BaseImporter.cpp
- BaseImporter.h
BaseProcess.cpp
BaseProcess.h
Importer.h
ScenePrivate.h
PostStepRegistry.cpp
ImporterRegistry.cpp
- ByteSwapper.h
DefaultProgressHandler.h
DefaultIOStream.cpp
DefaultIOSystem.cpp
CInterfaceIOWrapper.cpp
CInterfaceIOWrapper.h
- Hash.h
Importer.cpp
IFF.h
- MemoryIOWrapper.h
- ParsingUtils.h
- StreamReader.h
- StreamWriter.h
- StringComparison.h
- StringUtils.h
SGSpatialSort.cpp
- SGSpatialSort.h
VertexTriangleAdjacency.cpp
VertexTriangleAdjacency.h
- GenericProperty.h
SpatialSort.cpp
- SpatialSort.h
SceneCombiner.cpp
ScenePreprocessor.cpp
ScenePreprocessor.h
SkeletonMeshBuilder.cpp
- SkeletonMeshBuilder.h
SplitByBoneCountProcess.cpp
SplitByBoneCountProcess.h
- SmoothingGroups.h
StandardShapes.cpp
- StandardShapes.h
TargetAnimation.cpp
TargetAnimation.h
RemoveComments.cpp
- RemoveComments.h
Subdivision.cpp
- Subdivision.h
scene.cpp
- Vertex.h
- LineSplitter.h
- TinyFormatter.h
- Profiler.h
- LogAux.h
Bitmap.cpp
- Bitmap.h
- XMLTools.h
Version.cpp
- IOStreamBuffer.h
- CreateAnimMesh.h
CreateAnimMesh.cpp
+ simd.h
+ simd.cpp
)
SOURCE_GROUP(Common FILES ${Common_SRCS})
+SET( STEPParser_SRCS
+ Importer/STEPParser/STEPFileReader.h
+ Importer/STEPParser/STEPFileReader.cpp
+ Importer/STEPParser/STEPFileEncoding.cpp
+ Importer/STEPParser/STEPFileEncoding.h
+)
+SOURCE_GROUP(STEPParser FILES ${STEPParser_SRCS})
+
IF ( ASSIMP_BUILD_NONFREE_C4D_IMPORTER )
SET( C4D_SRCS
C4DImporter.cpp
@@ -197,8 +216,15 @@ OPTION(ASSIMP_BUILD_ALL_IMPORTERS_BY_DEFAULT "default value of all ASSIMP_BUILD_
# macro to add the CMake Option ADD_ASSIMP_IMPORTER_<name> which enables compile of loader
# this way selective loaders can be compiled (reduces filesize + compile time)
MACRO(ADD_ASSIMP_IMPORTER name)
- OPTION(ASSIMP_BUILD_${name}_IMPORTER "build the ${name} importer" ${ASSIMP_BUILD_ALL_IMPORTERS_BY_DEFAULT})
- IF(ASSIMP_BUILD_${name}_IMPORTER)
+ IF (ASSIMP_BUILD_ALL_IMPORTERS_BY_DEFAULT)
+ set(ASSIMP_IMPORTER_ENABLED TRUE)
+ IF (DEFINED ASSIMP_BUILD_${name}_IMPORTER AND NOT ASSIMP_BUILD_${name}_IMPORTER)
+ set(ASSIMP_IMPORTER_ENABLED FALSE)
+ ENDIF ()
+ ELSE ()
+ set(ASSIMP_IMPORTER_ENABLED ${ASSIMP_BUILD_${name}_IMPORTER})
+ ENDIF ()
+ IF (ASSIMP_IMPORTER_ENABLED)
LIST(APPEND ASSIMP_LOADER_SRCS ${ARGN})
SET(ASSIMP_IMPORTERS_ENABLED "${ASSIMP_IMPORTERS_ENABLED} ${name}")
SET(${name}_SRCS ${ARGN})
@@ -451,33 +477,31 @@ ADD_ASSIMP_IMPORTER( BLEND
BlenderBMesh.cpp
BlenderTessellator.h
BlenderTessellator.cpp
+ BlenderCustomData.h
+ BlenderCustomData.cpp
)
ADD_ASSIMP_IMPORTER( IFC
- IFCLoader.cpp
- IFCLoader.h
- IFCReaderGen1.cpp
- IFCReaderGen2.cpp
- IFCReaderGen.h
- IFCUtil.h
- IFCUtil.cpp
- IFCGeometry.cpp
- IFCMaterial.cpp
- IFCProfile.cpp
- IFCCurve.cpp
- IFCBoolean.cpp
- IFCOpenings.cpp
- STEPFile.h
- STEPFileReader.h
- STEPFileReader.cpp
- STEPFileEncoding.cpp
- STEPFileEncoding.h
+ Importer/IFC/IFCLoader.cpp
+ Importer/IFC/IFCLoader.h
+ Importer/IFC/IFCReaderGen1_2x3.cpp
+ Importer/IFC/IFCReaderGen2_2x3.cpp
+ Importer/IFC/IFCReaderGen_2x3.h
+ Importer/IFC/IFCUtil.h
+ Importer/IFC/IFCUtil.cpp
+ Importer/IFC/IFCGeometry.cpp
+ Importer/IFC/IFCMaterial.cpp
+ Importer/IFC/IFCProfile.cpp
+ Importer/IFC/IFCCurve.cpp
+ Importer/IFC/IFCBoolean.cpp
+ Importer/IFC/IFCOpenings.cpp
)
+
if (ASSIMP_BUILD_IFC_IMPORTER)
if (MSVC)
- set_source_files_properties(IFCReaderGen1.cpp IFCReaderGen2.cpp PROPERTIES COMPILE_FLAGS "/bigobj")
+ set_source_files_properties(Importer/IFC/IFCReaderGen1_2x3.cpp Importer/IFC/IFCReaderGen2_2x3.cpp PROPERTIES COMPILE_FLAGS "/bigobj")
elseif(CMAKE_COMPILER_IS_MINGW)
- set_source_files_properties(IFCReaderGen1.cpp IFCReaderGen2.cpp PROPERTIES COMPILE_FLAGS "-O2 -Wa,-mbig-obj")
+ set_source_files_properties(Importer/IFC/IFCReaderGen1_2x3.cpp Importer/IFC/IFCReaderGen2_2x3.cpp PROPERTIES COMPILE_FLAGS "-O2 -Wa,-mbig-obj")
endif()
endif (ASSIMP_BUILD_IFC_IMPORTER)
@@ -486,7 +510,6 @@ ADD_ASSIMP_IMPORTER( XGL
XGLLoader.h
)
-
ADD_ASSIMP_IMPORTER( FBX
FBXImporter.cpp
FBXCompileConfig.h
@@ -513,6 +536,13 @@ ADD_ASSIMP_IMPORTER( FBX
FBXDeformer.cpp
FBXBinaryTokenizer.cpp
FBXDocumentUtil.cpp
+ FBXExporter.h
+ FBXExporter.cpp
+ FBXExportNode.h
+ FBXExportNode.cpp
+ FBXExportProperty.h
+ FBXExportProperty.cpp
+ FBXCommon.h
)
SET( PostProcessing_SRCS
@@ -522,6 +552,8 @@ SET( PostProcessing_SRCS
ComputeUVMappingProcess.h
ConvertToLHProcess.cpp
ConvertToLHProcess.h
+ EmbedTexturesProcess.cpp
+ EmbedTexturesProcess.h
FindDegenerates.cpp
FindDegenerates.h
FindInstancesProcess.cpp
@@ -530,6 +562,8 @@ SET( PostProcessing_SRCS
FindInvalidDataProcess.h
FixNormalsStep.cpp
FixNormalsStep.h
+ DropFaceNormalsProcess.cpp
+ DropFaceNormalsProcess.h
GenFaceNormalsProcess.cpp
GenFaceNormalsProcess.h
GenVertexNormalsProcess.cpp
@@ -567,10 +601,12 @@ SET( PostProcessing_SRCS
PolyTools.h
MakeVerboseFormat.cpp
MakeVerboseFormat.h
+ ScaleProcess.cpp
+ ScaleProcess.h
)
SOURCE_GROUP( PostProcessing FILES ${PostProcessing_SRCS})
-SET( IrrXML_SRCS irrXMLWrapper.h )
+SET( IrrXML_SRCS ${HEADER_PATH}/irrXMLWrapper.h )
SOURCE_GROUP( IrrXML FILES ${IrrXML_SRCS})
ADD_ASSIMP_IMPORTER( Q3D
@@ -630,7 +666,7 @@ ADD_ASSIMP_IMPORTER( X
XFileExporter.cpp
)
-ADD_ASSIMP_IMPORTER(X3D
+ADD_ASSIMP_IMPORTER( X3D
X3DExporter.cpp
X3DExporter.hpp
X3DImporter.cpp
@@ -647,6 +683,9 @@ ADD_ASSIMP_IMPORTER(X3D
X3DImporter_Rendering.cpp
X3DImporter_Shape.cpp
X3DImporter_Texturing.cpp
+ FIReader.hpp
+ FIReader.cpp
+ X3DVocabulary.cpp
)
ADD_ASSIMP_IMPORTER( GLTF
@@ -658,13 +697,24 @@ ADD_ASSIMP_IMPORTER( GLTF
glTFImporter.h
glTFExporter.h
glTFExporter.cpp
+ glTF2Asset.h
+ glTF2Asset.inl
+ glTF2AssetWriter.h
+ glTF2AssetWriter.inl
+ glTF2Importer.cpp
+ glTF2Importer.h
+ glTF2Exporter.h
+ glTF2Exporter.cpp
)
ADD_ASSIMP_IMPORTER( 3MF
D3MFImporter.h
D3MFImporter.cpp
+ D3MFExporter.h
+ D3MFExporter.cpp
D3MFOpcPackage.h
D3MFOpcPackage.cpp
+ 3MFXmlTags.h
)
ADD_ASSIMP_IMPORTER( MMD
@@ -677,16 +727,22 @@ ADD_ASSIMP_IMPORTER( MMD
MMDVmdParser.h
)
-SET( Step_SRCS
- StepExporter.h
- StepExporter.cpp
+ADD_ASSIMP_IMPORTER( STEP
+ STEPFile.h
+ Importer/StepFile/StepFileImporter.h
+ Importer/StepFile/StepFileImporter.cpp
+ Importer/StepFile/StepFileGen1.cpp
+ Importer/StepFile/StepFileGen2.cpp
+ Importer/StepFile/StepFileGen3.cpp
+ Importer/StepFile/StepReaderGen.h
+ StepExporter.h
+ StepExporter.cpp
)
-SOURCE_GROUP( Step FILES ${Step_SRCS})
SET( Exporter_SRCS
Exporter.cpp
AssimpCExport.cpp
- BlobIOSystem.h
+ ${HEADER_PATH}/BlobIOSystem.h
)
SOURCE_GROUP( Exporter FILES ${Exporter_SRCS})
@@ -726,6 +782,14 @@ SET( unzip_SRCS
)
SOURCE_GROUP( unzip FILES ${unzip_SRCS})
+SET( ziplib_SRCS
+ ../contrib/zip/src/miniz.h
+ ../contrib/zip/src/zip.c
+ ../contrib/zip/src/zip.h
+)
+
+SOURCE_GROUP( ziplib FILES ${ziplib_SRCS} )
+
SET ( openddl_parser_SRCS
../contrib/openddlparser/code/OpenDDLParser.cpp
../contrib/openddlparser/code/DDLNode.cpp
@@ -825,6 +889,7 @@ SET( assimp_src
${Exporter_SRCS}
${PostProcessing_SRCS}
${MaterialSystem_SRCS}
+ ${STEPParser_SRCS}
${Step_SRCS}
# Model Support
@@ -837,6 +902,7 @@ SET( assimp_src
${Clipper_SRCS}
${openddl_parser_SRCS}
${open3dgc_SRCS}
+ ${ziplib_SRCS}
# Necessary to show the headers in the project when using the VC++ generator:
${PUBLIC_HEADERS}
@@ -856,6 +922,13 @@ IF (ASSIMP_BUILD_NONFREE_C4D_IMPORTER)
ENDIF (ASSIMP_BUILD_NONFREE_C4D_IMPORTER)
ADD_LIBRARY( assimp ${assimp_src} )
+ADD_LIBRARY(assimp::assimp ALIAS assimp)
+
+TARGET_INCLUDE_DIRECTORIES ( assimp PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/../include>
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_PREFIX}/include>
+)
TARGET_LINK_LIBRARIES(assimp ${ZLIB_LIBRARIES} ${OPENDDL_PARSER_LIBRARIES} ${IRRXML_LIBRARY} )
@@ -900,8 +973,27 @@ SET_TARGET_PROPERTIES( assimp PROPERTIES
)
if (APPLE)
- SET_TARGET_PROPERTIES( assimp PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${ASSIMP_LIB_INSTALL_DIR}")
-endif()
+ SET_TARGET_PROPERTIES( assimp PROPERTIES
+ INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${ASSIMP_LIB_INSTALL_DIR}"
+ )
+
+ if (BUILD_FRAMEWORK)
+ SET_TARGET_PROPERTIES( assimp PROPERTIES
+ FRAMEWORK TRUE
+ FRAMEWORK_VERSION C
+ MACOSX_FRAMEWORK_IDENTIFIER net.sf.assimp
+ PUBLIC_HEADER "${PUBLIC_HEADERS}"
+ )
+
+ # PUBLIC_HEADER option does not support directory structure creation
+ # add ./Compiler/*.h to assimp.framework via copy command
+ ADD_CUSTOM_COMMAND(TARGET assimp POST_BUILD
+ COMMAND "${CMAKE_COMMAND}" -E copy_directory
+ "../${HEADER_PATH}/Compiler"
+ assimp.framework/Headers/Compiler
+ COMMENT "Copying public ./Compiler/ header files to framework bundle's Headers/Compiler/")
+ ENDIF(BUILD_FRAMEWORK)
+ENDIF(APPLE)
# Build against external unzip, or add ../contrib/unzip so
# assimp can #include "unzip.h"
@@ -921,25 +1013,38 @@ INSTALL( TARGETS assimp
LIBRARY DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
ARCHIVE DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
RUNTIME DESTINATION ${ASSIMP_BIN_INSTALL_DIR}
+ FRAMEWORK DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
COMPONENT ${LIBASSIMP_COMPONENT})
INSTALL( FILES ${PUBLIC_HEADERS} DESTINATION ${ASSIMP_INCLUDE_INSTALL_DIR}/assimp COMPONENT assimp-dev)
INSTALL( FILES ${COMPILER_HEADERS} DESTINATION ${ASSIMP_INCLUDE_INSTALL_DIR}/assimp/Compiler COMPONENT assimp-dev)
+
if (ASSIMP_ANDROID_JNIIOSYSTEM)
INSTALL(FILES ${HEADER_PATH}/${ASSIMP_ANDROID_JNIIOSYSTEM_PATH}/AndroidJNIIOSystem.h
DESTINATION ${ASSIMP_INCLUDE_INSTALL_DIR}
COMPONENT assimp-dev)
-endif(ASSIMP_ANDROID_JNIIOSYSTEM)
+ENDIF(ASSIMP_ANDROID_JNIIOSYSTEM)
if(MSVC AND ASSIMP_INSTALL_PDB)
- install(FILES ${Assimp_BINARY_DIR}/code/Debug/assimp${LIBRARY_SUFFIX}${CMAKE_DEBUG_POSTFIX}.pdb
- DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
- CONFIGURATIONS Debug
- )
- install(FILES ${Assimp_BINARY_DIR}/code/RelWithDebInfo/assimp${LIBRARY_SUFFIX}.pdb
- DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
- CONFIGURATIONS RelWithDebInfo
- )
-endif ()
+ IF(CMAKE_GENERATOR MATCHES "^Visual Studio")
+ install(FILES ${Assimp_BINARY_DIR}/code/Debug/assimp${LIBRARY_SUFFIX}${CMAKE_DEBUG_POSTFIX}.pdb
+ DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
+ CONFIGURATIONS Debug
+ )
+ install(FILES ${Assimp_BINARY_DIR}/code/RelWithDebInfo/assimp${LIBRARY_SUFFIX}.pdb
+ DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
+ CONFIGURATIONS RelWithDebInfo
+ )
+ ELSE()
+ install(FILES ${Assimp_BINARY_DIR}/code/assimp${LIBRARY_SUFFIX}${CMAKE_DEBUG_POSTFIX}.pdb
+ DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
+ CONFIGURATIONS Debug
+ )
+ install(FILES ${Assimp_BINARY_DIR}/code/assimp${LIBRARY_SUFFIX}.pdb
+ DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
+ CONFIGURATIONS RelWithDebInfo
+ )
+ ENDIF()
+ENDIF ()
if (ASSIMP_COVERALLS)
include(Coveralls)
@@ -951,4 +1056,4 @@ if (ASSIMP_COVERALLS)
"${COVERAGE_SRCS}" # The source files.
ON # If we should upload.
"${PROJECT_SOURCE_DIR}/cmake-modules/") # (Optional) Alternate project cmake module path.
-endif()
+ENDIF()
diff --git a/code/COBLoader.cpp b/code/COBLoader.cpp
index a92e231a5..a8e41dbbc 100644
--- a/code/COBLoader.cpp
+++ b/code/COBLoader.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
Redistribution and use of this software in source and binary forms,
@@ -46,13 +47,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_NO_COB_IMPORTER
#include "COBLoader.h"
#include "COBScene.h"
-
-#include "StreamReader.h"
-#include "ParsingUtils.h"
-#include "fast_atof.h"
-
-#include "LineSplitter.h"
-#include "TinyFormatter.h"
+#include "ConvertToLHProcess.h"
+#include <assimp/StreamReader.h>
+#include <assimp/ParsingUtils.h>
+#include <assimp/fast_atof.h>
+#include <assimp/LineSplitter.h>
+#include <assimp/TinyFormatter.h>
#include <memory>
#include <assimp/IOSystem.hpp>
#include <assimp/DefaultLogger.hpp>
@@ -104,7 +104,7 @@ COBImporter::~COBImporter()
bool COBImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
{
const std::string& extension = GetExtension(pFile);
- if (extension == "cob" || extension == "scn") {
+ if (extension == "cob" || extension == "scn" || extension == "COB" || extension == "SCN") {
return true;
}
@@ -137,9 +137,7 @@ void COBImporter::SetupProperties(const Importer* /*pImp*/)
// ------------------------------------------------------------------------------------------------
// Imports the given file into the given scene structure.
-void COBImporter::InternReadFile( const std::string& pFile,
- aiScene* pScene, IOSystem* pIOHandler)
-{
+void COBImporter::InternReadFile( const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler) {
COB::Scene scene;
std::unique_ptr<StreamReaderLE> stream(new StreamReaderLE( pIOHandler->Open(pFile,"rb")) );
@@ -150,7 +148,7 @@ void COBImporter::InternReadFile( const std::string& pFile,
ThrowException("Could not found magic id: `Caligari`");
}
- DefaultLogger::get()->info("File format tag: "+std::string(head+9,6));
+ ASSIMP_LOG_INFO_F("File format tag: ",std::string(head+9,6));
if (head[16]!='L') {
ThrowException("File is big-endian, which is not supported");
}
@@ -224,6 +222,9 @@ void COBImporter::InternReadFile( const std::string& pFile,
}
pScene->mRootNode = BuildNodes(*root.get(),scene,pScene);
+ //flip normals after import
+ FlipWindingOrderProcess flip;
+ flip.Execute( pScene );
}
// ------------------------------------------------------------------------------------------------
@@ -300,7 +301,7 @@ aiNode* COBImporter::BuildNodes(const Node& root,const Scene& scin,aiScene* fill
}
std::unique_ptr<const Material> defmat;
if(!min) {
- DefaultLogger::get()->debug(format()<<"Could not resolve material index "
+ ASSIMP_LOG_DEBUG(format()<<"Could not resolve material index "
<<reflist.first<<" - creating default material for this slot");
defmat.reset(min=new Material());
@@ -472,7 +473,7 @@ void COBImporter::UnsupportedChunk_Ascii(LineSplitter& splitter, const ChunkInfo
// we can recover if the chunk size was specified.
if(nfo.size != static_cast<unsigned int>(-1)) {
- DefaultLogger::get()->error(error);
+ ASSIMP_LOG_ERROR(error);
// (HACK) - our current position in the stream is the beginning of the
// head line of the next chunk. That's fine, but the caller is going
@@ -485,46 +486,6 @@ void COBImporter::UnsupportedChunk_Ascii(LineSplitter& splitter, const ChunkInfo
}
// ------------------------------------------------------------------------------------------------
-void COBImporter::LogWarn_Ascii(const LineSplitter& splitter, const format& message) {
- LogWarn_Ascii(message << " [at line "<< splitter.get_index()<<"]");
-}
-
-// ------------------------------------------------------------------------------------------------
-void COBImporter::LogError_Ascii(const LineSplitter& splitter, const format& message) {
- LogError_Ascii(message << " [at line "<< splitter.get_index()<<"]");
-}
-
-// ------------------------------------------------------------------------------------------------
-void COBImporter::LogInfo_Ascii(const LineSplitter& splitter, const format& message) {
- LogInfo_Ascii(message << " [at line "<< splitter.get_index()<<"]");
-}
-
-// ------------------------------------------------------------------------------------------------
-void COBImporter::LogDebug_Ascii(const LineSplitter& splitter, const format& message) {
- LogDebug_Ascii(message << " [at line "<< splitter.get_index()<<"]");
-}
-
-// ------------------------------------------------------------------------------------------------
-void COBImporter::LogWarn_Ascii(const Formatter::format& message) {
- DefaultLogger::get()->warn(std::string("COB: ")+=message);
-}
-
-// ------------------------------------------------------------------------------------------------
-void COBImporter::LogError_Ascii(const Formatter::format& message) {
- DefaultLogger::get()->error(std::string("COB: ")+=message);
-}
-
-// ------------------------------------------------------------------------------------------------
-void COBImporter::LogInfo_Ascii(const Formatter::format& message) {
- DefaultLogger::get()->info(std::string("COB: ")+=message);
-}
-
-// ------------------------------------------------------------------------------------------------
-void COBImporter::LogDebug_Ascii(const Formatter::format& message) {
- DefaultLogger::get()->debug(std::string("COB: ")+=message);
-}
-
-// ------------------------------------------------------------------------------------------------
void COBImporter::ReadBasicNodeInfo_Ascii(Node& msh, LineSplitter& splitter, const ChunkInfo& /*nfo*/)
{
for(;splitter;++splitter) {
@@ -573,8 +534,7 @@ void COBImporter::ReadMat1_Ascii(Scene& out, LineSplitter& splitter, const Chunk
++splitter;
if (!splitter.match_start("mat# ")) {
- LogWarn_Ascii(splitter,format()<<
- "Expected `mat#` line in `Mat1` chunk "<<nfo.id);
+ ASSIMP_LOG_WARN_F( "Expected `mat#` line in `Mat1` chunk ", nfo.id );
return;
}
@@ -586,8 +546,7 @@ void COBImporter::ReadMat1_Ascii(Scene& out, LineSplitter& splitter, const Chunk
++splitter;
if (!splitter.match_start("shader: ")) {
- LogWarn_Ascii(splitter,format()<<
- "Expected `mat#` line in `Mat1` chunk "<<nfo.id);
+ ASSIMP_LOG_WARN_F( "Expected `mat#` line in `Mat1` chunk ", nfo.id);
return;
}
std::string shader = std::string(splitter[1]);
@@ -600,14 +559,12 @@ void COBImporter::ReadMat1_Ascii(Scene& out, LineSplitter& splitter, const Chunk
mat.shader = Material::PHONG;
}
else if (shader != "flat") {
- LogWarn_Ascii(splitter,format()<<
- "Unknown value for `shader` in `Mat1` chunk "<<nfo.id);
+ ASSIMP_LOG_WARN_F( "Unknown value for `shader` in `Mat1` chunk ", nfo.id );
}
++splitter;
if (!splitter.match_start("rgb ")) {
- LogWarn_Ascii(splitter,format()<<
- "Expected `rgb` line in `Mat1` chunk "<<nfo.id);
+ ASSIMP_LOG_WARN_F( "Expected `rgb` line in `Mat1` chunk ", nfo.id);
}
const char* rgb = splitter[1];
@@ -615,8 +572,7 @@ void COBImporter::ReadMat1_Ascii(Scene& out, LineSplitter& splitter, const Chunk
++splitter;
if (!splitter.match_start("alpha ")) {
- LogWarn_Ascii(splitter,format()<<
- "Expected `alpha` line in `Mat1` chunk "<<nfo.id);
+ ASSIMP_LOG_WARN_F( "Expected `alpha` line in `Mat1` chunk ", nfo.id);
}
const char* tokens[10];
@@ -637,8 +593,7 @@ void COBImporter::ReadUnit_Ascii(Scene& out, LineSplitter& splitter, const Chunk
}
++splitter;
if (!splitter.match_start("Units ")) {
- LogWarn_Ascii(splitter,format()<<
- "Expected `Units` line in `Unit` chunk "<<nfo.id);
+ ASSIMP_LOG_WARN_F( "Expected `Units` line in `Unit` chunk ", nfo.id);
return;
}
@@ -649,13 +604,12 @@ void COBImporter::ReadUnit_Ascii(Scene& out, LineSplitter& splitter, const Chunk
const unsigned int t=strtoul10(splitter[1]);
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)
+ ASSIMP_LOG_WARN_F(t, " is not a valid value for `Units` attribute in `Unit chunk` ", nfo.id)
,1.f):units[t];
return;
}
}
- LogWarn_Ascii(splitter,format()<<"`Unit` chunk "<<nfo.id<<" is a child of "
- <<nfo.parent_id<<" which does not exist");
+ ASSIMP_LOG_WARN_F( "`Unit` chunk ", nfo.id, " is a child of ", nfo.parent_id, " which does not exist");
}
// ------------------------------------------------------------------------------------------------
@@ -689,15 +643,13 @@ void COBImporter::ReadLght_Ascii(Scene& out, LineSplitter& splitter, const Chunk
msh.ltype = Light::SPOT;
}
else {
- LogWarn_Ascii(splitter,format()<<
- "Unknown kind of light source in `Lght` chunk "<<nfo.id<<" : "<<*splitter);
+ ASSIMP_LOG_WARN_F( "Unknown kind of light source in `Lght` chunk ", nfo.id, " : ", *splitter );
msh.ltype = Light::SPOT;
}
++splitter;
if (!splitter.match_start("color ")) {
- LogWarn_Ascii(splitter,format()<<
- "Expected `color` line in `Lght` chunk "<<nfo.id);
+ ASSIMP_LOG_WARN_F( "Expected `color` line in `Lght` chunk ", nfo.id );
}
const char* rgb = splitter[1];
@@ -705,16 +657,14 @@ void COBImporter::ReadLght_Ascii(Scene& out, LineSplitter& splitter, const Chunk
SkipSpaces(&rgb);
if (strncmp(rgb,"cone angle",10)) {
- LogWarn_Ascii(splitter,format()<<
- "Expected `cone angle` entity in `color` line in `Lght` chunk "<<nfo.id);
+ ASSIMP_LOG_WARN_F( "Expected `cone angle` entity in `color` line in `Lght` chunk ", nfo.id );
}
SkipSpaces(rgb+10,&rgb);
msh.angle = fast_atof(&rgb);
SkipSpaces(&rgb);
if (strncmp(rgb,"inner angle",11)) {
- LogWarn_Ascii(splitter,format()<<
- "Expected `inner angle` entity in `color` line in `Lght` chunk "<<nfo.id);
+ ASSIMP_LOG_WARN_F( "Expected `inner angle` entity in `color` line in `Lght` chunk ", nfo.id);
}
SkipSpaces(rgb+11,&rgb);
msh.inner_angle = fast_atof(&rgb);
@@ -825,7 +775,7 @@ void COBImporter::ReadPolH_Ascii(Scene& out, LineSplitter& splitter, const Chunk
for(unsigned int cur = 0; cur < cnt && ++splitter ;++cur) {
if (splitter.match_start("Hole")) {
- LogWarn_Ascii(splitter,"Skipping unsupported `Hole` line");
+ ASSIMP_LOG_WARN( "Skipping unsupported `Hole` line" );
continue;
}
@@ -885,7 +835,7 @@ void COBImporter::ReadBitM_Ascii(Scene& /*out*/, LineSplitter& splitter, const C
const unsigned int head = strtoul10((++splitter)[1]);
if (head != sizeof(Bitmap::BitmapHeader)) {
- LogWarn_Ascii(splitter,"Unexpected ThumbNailHdrSize, skipping this chunk");
+ ASSIMP_LOG_WARN("Unexpected ThumbNailHdrSize, skipping this chunk");
return;
}
@@ -932,7 +882,7 @@ void COBImporter::UnsupportedChunk_Binary( StreamReaderLE& reader, const ChunkIn
// we can recover if the chunk size was specified.
if(nfo.size != static_cast<unsigned int>(-1)) {
- DefaultLogger::get()->error(error);
+ ASSIMP_LOG_ERROR(error);
reader.IncPtr(nfo.size);
}
else ThrowException(error);
@@ -1139,7 +1089,7 @@ void COBImporter::ReadMat1_Binary(COB::Scene& out, StreamReaderLE& reader, const
mat.type = Material::METAL;
break;
default:
- LogError_Ascii(format("Unrecognized shader type in `Mat1` chunk with id ")<<nfo.id);
+ ASSIMP_LOG_ERROR_F( "Unrecognized shader type in `Mat1` chunk with id ", nfo.id );
mat.type = Material::FLAT;
}
@@ -1154,7 +1104,7 @@ void COBImporter::ReadMat1_Binary(COB::Scene& out, StreamReaderLE& reader, const
mat.autofacet = Material::SMOOTH;
break;
default:
- LogError_Ascii(format("Unrecognized faceting mode in `Mat1` chunk with id ")<<nfo.id);
+ ASSIMP_LOG_ERROR_F( "Unrecognized faceting mode in `Mat1` chunk with id ", nfo.id );
mat.autofacet = Material::FACETED;
}
mat.autofacet_angle = static_cast<float>(reader.GetI1());
@@ -1286,15 +1236,13 @@ void COBImporter::ReadUnit_Binary(COB::Scene& out, StreamReaderLE& reader, const
if (nd->id == nfo.parent_id) {
const unsigned int t=reader.GetI2();
nd->unit_scale = t>=sizeof(units)/sizeof(units[0])?(
- LogWarn_Ascii(format()<<t<<" is not a valid value for `Units` attribute in `Unit chunk` "<<nfo.id)
+ ASSIMP_LOG_WARN_F(t," is not a valid value for `Units` attribute in `Unit chunk` ", nfo.id)
,1.f):units[t];
return;
}
}
- LogWarn_Ascii(format()<<"`Unit` chunk "<<nfo.id<<" is a child of "
- <<nfo.parent_id<<" which does not exist");
+ ASSIMP_LOG_WARN_F( "`Unit` chunk ", nfo.id, " is a child of ", nfo.parent_id, " which does not exist");
}
-
-#endif
+#endif // ASSIMP_BUILD_NO_COB_IMPORTER
diff --git a/code/COBLoader.h b/code/COBLoader.h
index 46dc86f62..156c8d911 100644
--- a/code/COBLoader.h
+++ b/code/COBLoader.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -45,8 +46,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef INCLUDED_AI_COB_LOADER_H
#define INCLUDED_AI_COB_LOADER_H
-#include "BaseImporter.h"
-#include "StreamReader.h"
+#include <assimp/BaseImporter.h>
+#include <assimp/StreamReader.h>
struct aiNode;
@@ -76,10 +77,7 @@ class COBImporter : public BaseImporter
public:
COBImporter();
~COBImporter();
-
-
-public:
-
+
// --------------------
bool CanRead( const std::string& pFile, IOSystem* pIOHandler,
bool checkSig) const;
@@ -114,15 +112,11 @@ private:
* @param stream Stream to read from. */
void ReadBinaryFile(COB::Scene& out, StreamReaderLE* stream);
-
-private:
-
// Conversion to Assimp output format
aiNode* BuildNodes(const COB::Node& root,const COB::Scene& scin,aiScene* fill);
private:
-
// ASCII file support
void UnsupportedChunk_Ascii(LineSplitter& splitter, const COB::ChunkInfo& nfo, const char* name);
@@ -141,19 +135,6 @@ private:
void ReadChan_Ascii(COB::Scene& out, LineSplitter& splitter, const COB::ChunkInfo& nfo);
- // ASCII file logging stuff to add proper line numbers to messages
-
- static void LogWarn_Ascii (const LineSplitter& splitter, const Formatter::format& message);
- static void LogError_Ascii(const LineSplitter& splitter, const Formatter::format& message);
- static void LogInfo_Ascii (const LineSplitter& splitter, const Formatter::format& message);
- static void LogDebug_Ascii(const LineSplitter& splitter, const Formatter::format& message);
-
- static void LogWarn_Ascii (const Formatter::format& message);
- static void LogError_Ascii (const Formatter::format& message);
- static void LogInfo_Ascii (const Formatter::format& message);
- static void LogDebug_Ascii (const Formatter::format& message);
-
-
// Binary file support
void UnsupportedChunk_Binary(StreamReaderLE& reader, const COB::ChunkInfo& nfo, const char* name);
diff --git a/code/COBScene.h b/code/COBScene.h
index a1d6ebc27..2473c42a5 100644
--- a/code/COBScene.h
+++ b/code/COBScene.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -49,7 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <deque>
#include <map>
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
#include <assimp/material.h>
namespace Assimp {
diff --git a/code/CSMLoader.cpp b/code/CSMLoader.cpp
index eeb6986b0..777b6cf1b 100644
--- a/code/CSMLoader.cpp
+++ b/code/CSMLoader.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -49,9 +50,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_NO_CSM_IMPORTER
#include "CSMLoader.h"
-#include "SkeletonMeshBuilder.h"
-#include "ParsingUtils.h"
-#include "fast_atof.h"
+#include <assimp/SkeletonMeshBuilder.h>
+#include <assimp/ParsingUtils.h>
+#include <assimp/fast_atof.h>
#include <assimp/Importer.hpp>
#include <memory>
#include <assimp/IOSystem.hpp>
@@ -135,7 +136,7 @@ void CSMImporter::InternReadFile( const std::string& pFile,
TextFileToBuffer(file.get(),mBuffer2);
const char* buffer = &mBuffer2[0];
- aiAnimation* anim = new aiAnimation();
+ std::unique_ptr<aiAnimation> anim(new aiAnimation());
int first = 0, last = 0x00ffffff;
// now process the file and look out for '$' sections
@@ -232,7 +233,7 @@ void CSMImporter::InternReadFile( const std::string& pFile,
if (TokenMatchI(buffer, "DROPOUT", 7)) {
// seems this is invalid marker data; at least the doc says it's possible
- DefaultLogger::get()->warn("CSM: Encountered invalid marker data (DROPOUT)");
+ ASSIMP_LOG_WARN("CSM: Encountered invalid marker data (DROPOUT)");
}
else {
aiVectorKey* sub = s->mPositionKeys + s->mNumPositionKeys;
@@ -293,8 +294,8 @@ void CSMImporter::InternReadFile( const std::string& pFile,
// Store the one and only animation in the scene
pScene->mAnimations = new aiAnimation*[pScene->mNumAnimations=1];
- pScene->mAnimations[0] = anim;
anim->mName.Set("$CSM_MasterAnim");
+ pScene->mAnimations[0] = anim.release();
// mark the scene as incomplete and run SkeletonMeshBuilder on it
pScene->mFlags |= AI_SCENE_FLAGS_INCOMPLETE;
diff --git a/code/CSMLoader.h b/code/CSMLoader.h
index 55a632dc6..ea82bb87a 100644
--- a/code/CSMLoader.h
+++ b/code/CSMLoader.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -45,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef INCLUDED_AI_CSM_LOADER_H
#define INCLUDED_AI_CSM_LOADER_H
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
namespace Assimp {
diff --git a/code/CalcTangentsProcess.cpp b/code/CalcTangentsProcess.cpp
index 2af16fcc0..54e55fc5a 100644
--- a/code/CalcTangentsProcess.cpp
+++ b/code/CalcTangentsProcess.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -47,8 +48,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// internal headers
#include "CalcTangentsProcess.h"
#include "ProcessHelper.h"
-#include "TinyFormatter.h"
-#include "qnan.h"
+#include <assimp/TinyFormatter.h>
+#include <assimp/qnan.h>
using namespace Assimp;
@@ -94,7 +95,7 @@ void CalcTangentsProcess::Execute( aiScene* pScene)
{
ai_assert( NULL != pScene );
- DefaultLogger::get()->debug("CalcTangentsProcess begin");
+ ASSIMP_LOG_DEBUG("CalcTangentsProcess begin");
bool bHas = false;
for ( unsigned int a = 0; a < pScene->mNumMeshes; a++ ) {
@@ -102,9 +103,9 @@ void CalcTangentsProcess::Execute( aiScene* pScene)
}
if ( bHas ) {
- DefaultLogger::get()->info("CalcTangentsProcess finished. Tangents have been calculated");
+ ASSIMP_LOG_INFO("CalcTangentsProcess finished. Tangents have been calculated");
} else {
- DefaultLogger::get()->debug("CalcTangentsProcess finished");
+ ASSIMP_LOG_DEBUG("CalcTangentsProcess finished");
}
}
@@ -125,19 +126,19 @@ bool CalcTangentsProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex)
// are undefined.
if (!(pMesh->mPrimitiveTypes & (aiPrimitiveType_TRIANGLE | aiPrimitiveType_POLYGON)))
{
- DefaultLogger::get()->info("Tangents are undefined for line and point meshes");
+ ASSIMP_LOG_INFO("Tangents are undefined for line and point meshes");
return false;
}
// 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");
+ ASSIMP_LOG_ERROR("Failed to compute tangents; need normals");
return false;
}
if( configSourceUV >= AI_MAX_NUMBER_OF_TEXTURECOORDS || !pMesh->mTextureCoords[configSourceUV] )
{
- DefaultLogger::get()->error((Formatter::format("Failed to compute tangents; need UV data in channel"),configSourceUV));
+ ASSIMP_LOG_ERROR((Formatter::format("Failed to compute tangents; need UV data in channel"),configSourceUV));
return false;
}
@@ -189,7 +190,7 @@ bool CalcTangentsProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex)
float tx = meshTex[p2].x - meshTex[p0].x, ty = meshTex[p2].y - meshTex[p0].y;
float dirCorrection = (tx * sy - ty * sx) < 0.0f ? -1.0f : 1.0f;
// when t1, t2, t3 in same position in UV space, just use default UV direction.
- if ( 0 == sx && 0 ==sy && 0 == tx && 0 == ty ) {
+ if ( sx * ty == sy * tx ) {
sx = 0.0; sy = 1.0;
tx = 1.0; ty = 0.0;
}
diff --git a/code/CalcTangentsProcess.h b/code/CalcTangentsProcess.h
index a22785639..4cac2ed9f 100644
--- a/code/CalcTangentsProcess.h
+++ b/code/CalcTangentsProcess.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/ColladaExporter.cpp b/code/ColladaExporter.cpp
index d701f905a..0d5bdd46d 100644
--- a/code/ColladaExporter.cpp
+++ b/code/ColladaExporter.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -43,17 +44,17 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_NO_COLLADA_EXPORTER
#include "ColladaExporter.h"
-#include "Bitmap.h"
-#include "fast_atof.h"
+#include <assimp/Bitmap.h>
+#include <assimp/fast_atof.h>
#include <assimp/SceneCombiner.h>
-#include "StringUtils.h"
-#include "XMLTools.h"
+#include <assimp/StringUtils.h>
+#include <assimp/XMLTools.h>
#include <assimp/DefaultIOSystem.h>
#include <assimp/IOSystem.hpp>
#include <assimp/Exporter.hpp>
#include <assimp/scene.h>
-#include "Exceptional.h"
+#include <assimp/Exceptional.h>
#include <memory>
#include <ctime>
@@ -68,13 +69,17 @@ 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, const ExportProperties* pProperties)
+void ExportSceneCollada(const char* pFile, IOSystem* pIOSystem, const aiScene* pScene, const ExportProperties* /*pProperties*/)
{
std::string path = DefaultIOSystem::absolutePath(std::string(pFile));
std::string file = DefaultIOSystem::completeBaseName(std::string(pFile));
// invoke the exporter
ColladaExporter iDoTheExportThing( pScene, pIOSystem, path, file);
+
+ if (iDoTheExportThing.mOutput.fail()) {
+ throw DeadlyExportError("output data creation failed. Most likely the file became too large: " + std::string(pFile));
+ }
// we're still here - export successfully completed. Write result to the given IOSYstem
std::unique_ptr<IOStream> outfile (pIOSystem->Open(pFile,"wt"));
@@ -104,7 +109,7 @@ ColladaExporter::ColladaExporter( const aiScene* pScene, IOSystem* pIOSystem, co
// set up strings
endstr = "\n";
- // start writing
+ // start writing the file
WriteFile();
}
@@ -137,6 +142,9 @@ void ColladaExporter::WriteFile()
WriteControllerLibrary();
WriteSceneLibrary();
+
+ // customized, Writes the animation library
+ WriteAnimationsLibrary();
// useless Collada fu at the end, just in case we haven't had enough indirections, yet.
mOutput << startstr << "<scene>" << endstr;
@@ -552,7 +560,7 @@ void ColladaExporter::WriteImageEntry( const Surface& pSurface, const std::strin
std::stringstream imageUrlEncoded;
for( std::string::const_iterator it = pSurface.texture.begin(); it != pSurface.texture.end(); ++it )
{
- if( isalnum_C( (unsigned char) *it) || *it == ':' || *it == '_' || *it == '.' || *it == '/' || *it == '\\' )
+ if( isalnum_C( (unsigned char) *it) || *it == ':' || *it == '_' || *it == '-' || *it == '.' || *it == '/' || *it == '\\' )
imageUrlEncoded << *it;
else
imageUrlEncoded << '%' << std::hex << size_t( (unsigned char) *it) << std::dec;
@@ -866,8 +874,8 @@ void ColladaExporter::WriteController( size_t pIndex)
std::vector<ai_real> bind_poses;
bind_poses.reserve(mesh->mNumBones * 16);
- for( size_t i = 0; i < mesh->mNumBones; ++i)
- for( size_t j = 0; j < 4; ++j)
+ for(unsigned int i = 0; i < mesh->mNumBones; ++i)
+ for( unsigned int j = 0; j < 4; ++j)
bind_poses.insert(bind_poses.end(), mesh->mBones[i]->mOffsetMatrix[j], mesh->mBones[i]->mOffsetMatrix[j] + 4);
WriteFloatArray( idstr + "-skin-bind_poses", FloatType_Mat4x4, (const ai_real*) bind_poses.data(), bind_poses.size() / 16);
@@ -924,11 +932,11 @@ void ColladaExporter::WriteController( size_t pIndex)
ai_uint weight_index = 0;
std::vector<ai_int> joint_weight_indices(2 * joint_weight_indices_length, (ai_int)-1);
- for( size_t i = 0; i < mesh->mNumBones; ++i)
- for( size_t j = 0; j < mesh->mBones[i]->mNumWeights; ++j)
+ for( unsigned int i = 0; i < mesh->mNumBones; ++i)
+ for( unsigned j = 0; j < mesh->mBones[i]->mNumWeights; ++j)
{
unsigned int vId = mesh->mBones[i]->mWeights[j].mVertexId;
- for( size_t k = 0; k < num_influences[vId]; ++k)
+ for( ai_uint k = 0; k < num_influences[vId]; ++k)
{
if (joint_weight_indices[2 * (accum_influences[vId] + k)] == -1)
{
@@ -1125,6 +1133,7 @@ void ColladaExporter::WriteFloatArray( const std::string& pIdString, FloatDataTy
case FloatType_Color: floatsPerElement = 3; break;
case FloatType_Mat4x4: floatsPerElement = 16; break;
case FloatType_Weight: floatsPerElement = 1; break;
+ case FloatType_Time: floatsPerElement = 1; break;
default:
return;
}
@@ -1201,7 +1210,13 @@ void ColladaExporter::WriteFloatArray( const std::string& pIdString, FloatDataTy
case FloatType_Weight:
mOutput << startstr << "<param name=\"WEIGHT\" type=\"float\" />" << endstr;
break;
- }
+
+ // customized, add animation related
+ case FloatType_Time:
+ mOutput << startstr << "<param name=\"TIME\" type=\"float\" />" << endstr;
+ break;
+
+ }
PopTag();
mOutput << startstr << "</accessor>" << endstr;
@@ -1231,7 +1246,176 @@ void ColladaExporter::WriteSceneLibrary()
PopTag();
mOutput << startstr << "</library_visual_scenes>" << endstr;
}
-
+// ------------------------------------------------------------------------------------------------
+void ColladaExporter::WriteAnimationLibrary(size_t pIndex)
+{
+ const aiAnimation * anim = mScene->mAnimations[pIndex];
+
+ if ( anim->mNumChannels == 0 && anim->mNumMeshChannels == 0 && anim->mNumMorphMeshChannels ==0 )
+ return;
+
+ const std::string animation_name_escaped = XMLEscape( anim->mName.C_Str() );
+ std::string idstr = anim->mName.C_Str();
+ std::string ending = std::string( "AnimId" ) + to_string(pIndex);
+ if (idstr.length() >= ending.length()) {
+ if (0 != idstr.compare (idstr.length() - ending.length(), ending.length(), ending)) {
+ idstr = idstr + ending;
+ }
+ } else {
+ idstr = idstr + ending;
+ }
+
+ const std::string idstrEscaped = XMLEscape(idstr);
+
+ mOutput << startstr << "<animation id=\"" + idstrEscaped + "\" name=\"" + animation_name_escaped + "\">" << endstr;
+ PushTag();
+
+ std::string node_idstr;
+ for (size_t a = 0; a < anim->mNumChannels; ++a) {
+ const aiNodeAnim * nodeAnim = anim->mChannels[a];
+
+ // sanity check
+ if ( nodeAnim->mNumPositionKeys != nodeAnim->mNumScalingKeys || nodeAnim->mNumPositionKeys != nodeAnim->mNumRotationKeys ) continue;
+
+ {
+ node_idstr.clear();
+ node_idstr += nodeAnim->mNodeName.data;
+ node_idstr += std::string( "_matrix-input" );
+
+ std::vector<ai_real> frames;
+ for( size_t i = 0; i < nodeAnim->mNumPositionKeys; ++i) {
+ frames.push_back(static_cast<ai_real>(nodeAnim->mPositionKeys[i].mTime));
+ }
+
+ WriteFloatArray( node_idstr , FloatType_Time, (const ai_real*) frames.data(), frames.size());
+ frames.clear();
+ }
+
+ {
+ node_idstr.clear();
+
+ node_idstr += nodeAnim->mNodeName.data;
+ node_idstr += std::string("_matrix-output");
+
+ std::vector<ai_real> keyframes;
+ keyframes.reserve(nodeAnim->mNumPositionKeys * 16);
+ for( size_t i = 0; i < nodeAnim->mNumPositionKeys; ++i) {
+ aiVector3D Scaling = nodeAnim->mScalingKeys[i].mValue;
+ aiMatrix4x4 ScalingM; // identity
+ ScalingM[0][0] = Scaling.x; ScalingM[1][1] = Scaling.y; ScalingM[2][2] = Scaling.z;
+
+ aiQuaternion RotationQ = nodeAnim->mRotationKeys[i].mValue;
+ aiMatrix4x4 s = aiMatrix4x4( RotationQ.GetMatrix() );
+ aiMatrix4x4 RotationM(s.a1, s.a2, s.a3, 0, s.b1, s.b2, s.b3, 0, s.c1, s.c2, s.c3, 0, 0, 0, 0, 1);
+
+ aiVector3D Translation = nodeAnim->mPositionKeys[i].mValue;
+ aiMatrix4x4 TranslationM; // identity
+ TranslationM[0][3] = Translation.x; TranslationM[1][3] = Translation.y; TranslationM[2][3] = Translation.z;
+
+ // Combine the above transformations
+ aiMatrix4x4 mat = TranslationM * RotationM * ScalingM;
+
+ for( unsigned int j = 0; j < 4; ++j) {
+ keyframes.insert(keyframes.end(), mat[j], mat[j] + 4);
+ }
+ }
+
+ WriteFloatArray( node_idstr, FloatType_Mat4x4, (const ai_real*) keyframes.data(), keyframes.size() / 16);
+ }
+
+ {
+ std::vector<std::string> names;
+ for ( size_t i = 0; i < nodeAnim->mNumPositionKeys; ++i) {
+ if ( nodeAnim->mPreState == aiAnimBehaviour_DEFAULT
+ || nodeAnim->mPreState == aiAnimBehaviour_LINEAR
+ || nodeAnim->mPreState == aiAnimBehaviour_REPEAT
+ ) {
+ names.push_back( "LINEAR" );
+ } else if (nodeAnim->mPostState == aiAnimBehaviour_CONSTANT) {
+ names.push_back( "STEP" );
+ }
+ }
+
+ const std::string node_idstr = nodeAnim->mNodeName.data + std::string("_matrix-interpolation");
+ std::string arrayId = node_idstr + "-array";
+
+ mOutput << startstr << "<source id=\"" << XMLEscape(node_idstr) << "\">" << endstr;
+ PushTag();
+
+ // source array
+ mOutput << startstr << "<Name_array id=\"" << XMLEscape(arrayId) << "\" count=\"" << names.size() << "\"> ";
+ for( size_t a = 0; a < names.size(); ++a ) {
+ mOutput << names[a] << " ";
+ }
+ mOutput << "</Name_array>" << endstr;
+
+ mOutput << startstr << "<technique_common>" << endstr;
+ PushTag();
+
+ mOutput << startstr << "<accessor source=\"#" << XMLEscape(arrayId) << "\" count=\"" << names.size() << "\" stride=\"" << 1 << "\">" << endstr;
+ PushTag();
+
+ mOutput << startstr << "<param name=\"INTERPOLATION\" type=\"name\"></param>" << endstr;
+
+ PopTag();
+ mOutput << startstr << "</accessor>" << endstr;
+
+ PopTag();
+ mOutput << startstr << "</technique_common>" << endstr;
+
+ PopTag();
+ mOutput << startstr << "</source>" << endstr;
+ }
+ }
+
+ for (size_t a = 0; a < anim->mNumChannels; ++a) {
+ const aiNodeAnim * nodeAnim = anim->mChannels[a];
+
+ {
+ // samplers
+ const std::string node_idstr = nodeAnim->mNodeName.data + std::string("_matrix-sampler");
+ mOutput << startstr << "<sampler id=\"" << XMLEscape(node_idstr) << "\">" << endstr;
+ PushTag();
+
+ mOutput << startstr << "<input semantic=\"INPUT\" source=\"#" << XMLEscape( nodeAnim->mNodeName.data + std::string("_matrix-input") ) << "\"/>" << endstr;
+ mOutput << startstr << "<input semantic=\"OUTPUT\" source=\"#" << XMLEscape( nodeAnim->mNodeName.data + std::string("_matrix-output") ) << "\"/>" << endstr;
+ mOutput << startstr << "<input semantic=\"INTERPOLATION\" source=\"#" << XMLEscape( nodeAnim->mNodeName.data + std::string("_matrix-interpolation") ) << "\"/>" << endstr;
+
+ PopTag();
+ mOutput << startstr << "</sampler>" << endstr;
+ }
+ }
+
+ for (size_t a = 0; a < anim->mNumChannels; ++a) {
+ const aiNodeAnim * nodeAnim = anim->mChannels[a];
+
+ {
+ // channels
+ mOutput << startstr << "<channel source=\"#" << XMLEscape( nodeAnim->mNodeName.data + std::string("_matrix-sampler") ) << "\" target=\"" << XMLEscape(nodeAnim->mNodeName.data) << "/matrix\"/>" << endstr;
+ }
+ }
+
+ PopTag();
+ mOutput << startstr << "</animation>" << endstr;
+
+}
+// ------------------------------------------------------------------------------------------------
+void ColladaExporter::WriteAnimationsLibrary()
+{
+ const std::string scene_name_escaped = XMLEscape(mScene->mRootNode->mName.C_Str());
+
+ if ( mScene->mNumAnimations > 0 ) {
+ mOutput << startstr << "<library_animations>" << endstr;
+ PushTag();
+
+ // start recursive write at the root node
+ for( size_t a = 0; a < mScene->mNumAnimations; ++a)
+ WriteAnimationLibrary( a );
+
+ PopTag();
+ mOutput << startstr << "</library_animations>" << endstr;
+ }
+}
// ------------------------------------------------------------------------------------------------
// Helper to find a bone by name in the scene
aiBone* findBone( const aiScene* scene, const char * name) {
@@ -1248,6 +1432,59 @@ aiBone* findBone( const aiScene* scene, const char * name) {
}
// ------------------------------------------------------------------------------------------------
+const aiNode * findBoneNode( const aiNode* aNode, const aiBone* bone)
+{
+ if ( aNode && bone && aNode->mName == bone->mName ) {
+ return aNode;
+ }
+
+ if ( aNode && bone ) {
+ for (unsigned int i=0; i < aNode->mNumChildren; ++i) {
+ aiNode * aChild = aNode->mChildren[i];
+ const aiNode * foundFromChild = 0;
+ if ( aChild ) {
+ foundFromChild = findBoneNode( aChild, bone );
+ if ( foundFromChild ) return foundFromChild;
+ }
+ }
+ }
+
+ return NULL;
+}
+
+const aiNode * findSkeletonRootNode( const aiScene* scene, const aiMesh * mesh)
+{
+ std::set<const aiNode*> topParentBoneNodes;
+ if ( mesh && mesh->mNumBones > 0 ) {
+ for (unsigned int i=0; i < mesh->mNumBones; ++i) {
+ aiBone * bone = mesh->mBones[i];
+
+ const aiNode * node = findBoneNode( scene->mRootNode, bone);
+ if ( node ) {
+ while ( node->mParent && findBone(scene, node->mParent->mName.C_Str() ) != 0 ) {
+ node = node->mParent;
+ }
+ topParentBoneNodes.insert( node );
+ }
+ }
+ }
+
+ if ( !topParentBoneNodes.empty() ) {
+ const aiNode * parentBoneNode = *topParentBoneNodes.begin();
+ if ( topParentBoneNodes.size() == 1 ) {
+ return parentBoneNode;
+ } else {
+ for (auto it : topParentBoneNodes) {
+ if ( it->mParent ) return it->mParent;
+ }
+ return parentBoneNode;
+ }
+ }
+
+ return NULL;
+}
+
+// ------------------------------------------------------------------------------------------------
// Recursively writes the given node
void ColladaExporter::WriteNode( const aiScene* pScene, aiNode* pNode)
{
@@ -1274,20 +1511,50 @@ void ColladaExporter::WriteNode( const aiScene* pScene, aiNode* pNode)
}
const std::string node_name_escaped = XMLEscape(pNode->mName.data);
+ /* // customized, Note! the id field is crucial for inter-xml look up, it cannot be replaced with sid ?!
mOutput << startstr
<< "<node ";
if(is_skeleton_root)
mOutput << "id=\"" << "skeleton_root" << "\" "; // For now, only support one skeleton in a scene.
mOutput << (is_joint ? "s" : "") << "id=\"" << node_name_escaped;
- mOutput << "\" name=\"" << node_name_escaped
+ */
+ mOutput << startstr << "<node ";
+ if(is_skeleton_root) {
+ mOutput << "id=\"" << node_name_escaped << "\" " << (is_joint ? "sid=\"" + node_name_escaped +"\"" : "") ; // For now, only support one skeleton in a scene.
+ mFoundSkeletonRootNodeID = node_name_escaped;
+ } else {
+ mOutput << "id=\"" << node_name_escaped << "\" " << (is_joint ? "sid=\"" + node_name_escaped +"\"": "") ;
+ }
+
+ mOutput << " name=\"" << node_name_escaped
<< "\" type=\"" << node_type
<< "\">" << endstr;
PushTag();
// write transformation - we can directly put the matrix there
// TODO: (thom) decompose into scale - rot - quad to allow addressing it by animations afterwards
- const aiMatrix4x4& mat = pNode->mTransformation;
- mOutput << startstr << "<matrix sid=\"transform\">";
+ aiMatrix4x4 mat = pNode->mTransformation;
+
+ // If this node is a Camera node, the camera coordinate system needs to be multiplied in.
+ // When importing from Collada, the mLookAt is set to 0, 0, -1, and the node transform is unchanged.
+ // When importing from a different format, mLookAt is set to 0, 0, 1. Therefore, the local camera
+ // coordinate system must be changed to matche the Collada specification.
+ for (size_t i = 0; i<mScene->mNumCameras; i++){
+ if (mScene->mCameras[i]->mName == pNode->mName){
+ aiMatrix4x4 sourceView;
+ mScene->mCameras[i]->GetCameraMatrix(sourceView);
+
+ aiMatrix4x4 colladaView;
+ colladaView.a1 = colladaView.c3 = -1; // move into -z space.
+ mat *= (sourceView * colladaView);
+ break;
+ }
+ }
+
+ // customized, sid should be 'matrix' to match with loader code.
+ //mOutput << startstr << "<matrix sid=\"transform\">";
+ mOutput << startstr << "<matrix sid=\"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 << " ";
@@ -1315,7 +1582,7 @@ void ColladaExporter::WriteNode( const aiScene* pScene, aiNode* pNode)
for( size_t a = 0; a < pNode->mNumMeshes; ++a )
{
const aiMesh* mesh = mScene->mMeshes[pNode->mMeshes[a]];
- // do not instanciate mesh if empty. I wonder how this could happen
+ // do not instantiate mesh if empty. I wonder how this could happen
if( mesh->mNumFaces == 0 || mesh->mNumVertices == 0 )
continue;
@@ -1331,7 +1598,13 @@ void ColladaExporter::WriteNode( const aiScene* pScene, aiNode* pNode)
<< endstr;
PushTag();
- mOutput << startstr << "<skeleton>#skeleton_root</skeleton>" << endstr;
+ // note! this mFoundSkeletonRootNodeID some how affects animation, it makes the mesh attaches to armature skeleton root node.
+ // use the first bone to find skeleton root
+ const aiNode * skeletonRootBoneNode = findSkeletonRootNode( pScene, mesh );
+ if ( skeletonRootBoneNode ) {
+ mFoundSkeletonRootNodeID = XMLEscape( skeletonRootBoneNode->mName.C_Str() );
+ }
+ mOutput << startstr << "<skeleton>#" << mFoundSkeletonRootNodeID << "</skeleton>" << endstr;
}
mOutput << startstr << "<bind_material>" << endstr;
PushTag();
diff --git a/code/ColladaExporter.h b/code/ColladaExporter.h
index 36c012f2e..d1a307532 100644
--- a/code/ColladaExporter.h
+++ b/code/ColladaExporter.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -54,7 +55,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <vector>
#include <map>
-#include "StringUtils.h"
+#include <assimp/StringUtils.h>
struct aiScene;
struct aiNode;
@@ -114,7 +115,9 @@ protected:
/// Writes the given mesh
void WriteGeometry( size_t pIndex);
- enum FloatDataType { FloatType_Vector, FloatType_TexCoord2, FloatType_TexCoord3, FloatType_Color, FloatType_Mat4x4, FloatType_Weight };
+ //enum FloatDataType { FloatType_Vector, FloatType_TexCoord2, FloatType_TexCoord3, FloatType_Color, FloatType_Mat4x4, FloatType_Weight };
+ // customized to add animation related type
+ enum FloatDataType { FloatType_Vector, FloatType_TexCoord2, FloatType_TexCoord3, FloatType_Color, FloatType_Mat4x4, FloatType_Weight, FloatType_Time };
/// Writes a float array of the given type
void WriteFloatArray( const std::string& pIdString, FloatDataType pType, const ai_real* pData, size_t pElementCount);
@@ -122,13 +125,21 @@ protected:
/// Writes the scene library
void WriteSceneLibrary();
+ // customized, Writes the animation library
+ void WriteAnimationsLibrary();
+ void WriteAnimationLibrary( size_t pIndex);
+ std::string mFoundSkeletonRootNodeID = "skeleton_root"; // will be replaced by found node id in the WriteNode call.
+
/// Recursively writes the given node
void WriteNode( const aiScene* scene, 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); }
+ 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 {
@@ -178,7 +189,7 @@ protected:
{}
};
- // summarize a material in an convinient way.
+ // summarize a material in an convenient way.
struct Material
{
std::string name;
diff --git a/code/ColladaHelper.h b/code/ColladaHelper.h
index 8ccd6cafe..fe6674b93 100644
--- a/code/ColladaHelper.h
+++ b/code/ColladaHelper.h
@@ -4,7 +4,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -271,12 +272,13 @@ struct Node
/** Node instances at this node */
std::vector<NodeInstance> mNodeInstances;
- /** Rootnodes: Name of primary camera, if any */
+ /** Root-nodes: Name of primary camera, if any */
std::string mPrimaryCamera;
//! Constructor. Begin with a zero parent
- Node() {
- mParent = NULL;
+ Node()
+ : mParent( nullptr ){
+ // empty
}
//! Destructor: delete all children subsequently
@@ -302,7 +304,7 @@ struct Accessor
size_t mOffset; // in number of values
size_t mStride; // Stride in number of values
std::vector<std::string> mParams; // names of the data streams in the accessors. Empty string tells to ignore.
- size_t mSubOffset[4]; // Suboffset inside the object for the common 4 elements. For a vector, thats XYZ, for a color RGBA and so on.
+ size_t mSubOffset[4]; // Suboffset inside the object for the common 4 elements. For a vector, that's XYZ, for a color RGBA and so on.
// For example, SubOffset[0] denotes which of the values inside the object is the vector X component.
std::string mSource; // URL of the source array
mutable const Data* mData; // Pointer to the source array, if resolved. NULL else
diff --git a/code/ColladaLoader.cpp b/code/ColladaLoader.cpp
index 5cec0a0c6..d86985a29 100644
--- a/code/ColladaLoader.cpp
+++ b/code/ColladaLoader.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -46,23 +47,24 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_NO_COLLADA_IMPORTER
#include "ColladaLoader.h"
+#include "ColladaParser.h"
+
#include <assimp/anim.h>
#include <assimp/scene.h>
#include <assimp/DefaultLogger.hpp>
#include <assimp/Importer.hpp>
#include <assimp/importerdesc.h>
+#include <assimp/Defines.h>
-#include "ColladaParser.h"
-#include "fast_atof.h"
-#include "ParsingUtils.h"
-#include "SkeletonMeshBuilder.h"
-#include "CreateAnimMesh.h"
+#include <assimp/fast_atof.h>
+#include <assimp/ParsingUtils.h>
+#include <assimp/SkeletonMeshBuilder.h>
+#include <assimp/CreateAnimMesh.h>
#include "time.h"
#include "math.h"
#include <algorithm>
#include <numeric>
-#include <assimp/Defines.h>
using namespace Assimp;
using namespace Assimp::Formatter;
@@ -119,7 +121,7 @@ bool ColladaLoader::CanRead( const std::string& pFile, IOSystem* pIOHandler, boo
* might be NULL and it's our duty to return true here.
*/
if (!pIOHandler)return true;
- const char* tokens[] = {"collada"};
+ const char* tokens[] = {"<collada"};
return SearchFileHeaderForToken(pIOHandler,pFile,tokens,1);
}
return false;
@@ -130,9 +132,9 @@ void ColladaLoader::SetupProperties(const Importer* pImp)
{
noSkeletonMesh = pImp->GetPropertyInteger(AI_CONFIG_IMPORT_NO_SKELETON_MESHES,0) != 0;
ignoreUpDirection = pImp->GetPropertyInteger(AI_CONFIG_IMPORT_COLLADA_IGNORE_UP_DIRECTION,0) != 0;
+ useColladaName = pImp->GetPropertyInteger(AI_CONFIG_IMPORT_COLLADA_USE_COLLADA_NAMES,0) != 0;
}
-
// ------------------------------------------------------------------------------------------------
// Get file extension list
const aiImporterDesc* ColladaLoader::GetInfo () const
@@ -179,26 +181,27 @@ void ColladaLoader::InternReadFile( const std::string& pFile, aiScene* pScene, I
// ... then fill the materials with the now adjusted settings
FillMaterials(parser, pScene);
- // Apply unitsize scale calculation
- pScene->mRootNode->mTransformation *= aiMatrix4x4(parser.mUnitSize, 0, 0, 0,
- 0, parser.mUnitSize, 0, 0,
- 0, 0, parser.mUnitSize, 0,
- 0, 0, 0, 1);
- if( !ignoreUpDirection ) {
- // Convert to Y_UP, if different orientation
- if( parser.mUpDirection == ColladaParser::UP_X)
- pScene->mRootNode->mTransformation *= aiMatrix4x4(
- 0, -1, 0, 0,
- 1, 0, 0, 0,
- 0, 0, 1, 0,
- 0, 0, 0, 1);
- else if( parser.mUpDirection == ColladaParser::UP_Z)
- pScene->mRootNode->mTransformation *= aiMatrix4x4(
- 1, 0, 0, 0,
- 0, 0, 1, 0,
- 0, -1, 0, 0,
- 0, 0, 0, 1);
- }
+ // Apply unitsize scale calculation
+ pScene->mRootNode->mTransformation *= aiMatrix4x4(parser.mUnitSize, 0, 0, 0,
+ 0, parser.mUnitSize, 0, 0,
+ 0, 0, parser.mUnitSize, 0,
+ 0, 0, 0, 1);
+ if( !ignoreUpDirection ) {
+ // Convert to Y_UP, if different orientation
+ if( parser.mUpDirection == ColladaParser::UP_X)
+ pScene->mRootNode->mTransformation *= aiMatrix4x4(
+ 0, -1, 0, 0,
+ 1, 0, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1);
+ else if( parser.mUpDirection == ColladaParser::UP_Z)
+ pScene->mRootNode->mTransformation *= aiMatrix4x4(
+ 1, 0, 0, 0,
+ 0, 0, 1, 0,
+ 0, -1, 0, 0,
+ 0, 0, 0, 1);
+ }
+
// store all meshes
StoreSceneMeshes( pScene);
@@ -292,7 +295,7 @@ void ColladaLoader::ResolveNodeInstances( const ColladaParser& pParser, const Co
nd = FindNode(pParser.mRootNode, nodeInst.mNode);
}
if (!nd)
- DefaultLogger::get()->error("Collada: Unable to resolve reference to instanced node " + nodeInst.mNode);
+ ASSIMP_LOG_ERROR_F("Collada: Unable to resolve reference to instanced node ", nodeInst.mNode);
else {
// attach this node to the list of children
@@ -309,7 +312,7 @@ void ColladaLoader::ApplyVertexToEffectSemanticMapping(Collada::Sampler& sampler
std::map<std::string, Collada::InputSemanticMapEntry>::const_iterator it = table.mMap.find(sampler.mUVChannel);
if (it != table.mMap.end()) {
if (it->second.mType != Collada::IT_Texcoord)
- DefaultLogger::get()->error("Collada: Unexpected effect input mapping");
+ ASSIMP_LOG_ERROR("Collada: Unexpected effect input mapping");
sampler.mUVId = it->second.mSet;
}
@@ -325,7 +328,7 @@ void ColladaLoader::BuildLightsForNode( const ColladaParser& pParser, const Coll
ColladaParser::LightLibrary::const_iterator srcLightIt = pParser.mLightLibrary.find( lid.mLight);
if( srcLightIt == pParser.mLightLibrary.end())
{
- DefaultLogger::get()->warn("Collada: Unable to find light for ID \"" + lid.mLight + "\". Skipping.");
+ ASSIMP_LOG_WARN_F("Collada: Unable to find light for ID \"" , lid.mLight , "\". Skipping.");
continue;
}
const Collada::Light* srcLight = &srcLightIt->second;
@@ -393,14 +396,14 @@ void ColladaLoader::BuildCamerasForNode( const ColladaParser& pParser, const Col
ColladaParser::CameraLibrary::const_iterator srcCameraIt = pParser.mCameraLibrary.find( cid.mCamera);
if( srcCameraIt == pParser.mCameraLibrary.end())
{
- DefaultLogger::get()->warn("Collada: Unable to find camera for ID \"" + cid.mCamera + "\". Skipping.");
+ ASSIMP_LOG_WARN_F("Collada: Unable to find camera for ID \"" , cid.mCamera , "\". Skipping.");
continue;
}
const Collada::Camera* srcCamera = &srcCameraIt->second;
// orthographic cameras not yet supported in Assimp
if (srcCamera->mOrtho) {
- DefaultLogger::get()->warn("Collada: Orthographic cameras are not supported.");
+ ASSIMP_LOG_WARN("Collada: Orthographic cameras are not supported.");
}
// now fill our ai data structure
@@ -470,7 +473,7 @@ void ColladaLoader::BuildMeshesForNode( const ColladaParser& pParser, const Coll
if( !srcMesh)
{
- DefaultLogger::get()->warn( format() << "Collada: Unable to find geometry for ID \"" << mid.mMeshOrController << "\". Skipping." );
+ ASSIMP_LOG_WARN_F( "Collada: Unable to find geometry for ID \"", mid.mMeshOrController, "\". Skipping." );
continue;
}
} else
@@ -499,7 +502,8 @@ void ColladaLoader::BuildMeshesForNode( const ColladaParser& pParser, const Coll
}
else
{
- DefaultLogger::get()->warn( format() << "Collada: No material specified for subgroup <" << submesh.mMaterial << "> in geometry <" << mid.mMeshOrController << ">." );
+ ASSIMP_LOG_WARN_F( "Collada: No material specified for subgroup <", submesh.mMaterial, "> in geometry <",
+ mid.mMeshOrController, ">." );
if( !mid.mMaterials.empty() )
meshMaterial = mid.mMaterials.begin()->second.mMatName;
}
@@ -675,7 +679,7 @@ aiMesh* ColladaLoader::CreateMesh( const ColladaParser& pParser, const Collada::
// create morph target meshes if any
std::vector<aiMesh*> targetMeshes;
std::vector<float> targetWeights;
- Collada::MorphMethod method;
+ Collada::MorphMethod method = Collada::Normalized;
for(std::map<std::string, Collada::Controller>::const_iterator it = pParser.mControllerLibrary.begin();
it != pParser.mControllerLibrary.end(); it++)
@@ -729,7 +733,7 @@ aiMesh* ColladaLoader::CreateMesh( const ColladaParser& pParser, const Collada::
? aiMorphingMethod_MORPH_RELATIVE
: aiMorphingMethod_MORPH_NORMALIZED;
dstMesh->mAnimMeshes = new aiAnimMesh*[animMeshes.size()];
- dstMesh->mNumAnimMeshes = animMeshes.size();
+ dstMesh->mNumAnimMeshes = static_cast<unsigned int>(animMeshes.size());
for (unsigned int i = 0; i < animMeshes.size(); i++)
dstMesh->mAnimMeshes[i] = animMeshes.at(i);
}
@@ -737,10 +741,6 @@ aiMesh* ColladaLoader::CreateMesh( const ColladaParser& pParser, const Collada::
// create bones if given
if( pSrcController && pSrcController->mType == Collada::Skin)
{
- // refuse if the vertex count does not match
-// if( pSrcController->mWeightCounts.size() != dstMesh->mNumVertices)
-// throw DeadlyImportError( "Joint Controller vertex count does not match mesh vertex count");
-
// resolve references - joint names
const Collada::Accessor& jointNamesAcc = pParser.ResolveLibraryReference( pParser.mAccessorLibrary, pSrcController->mJointNameSource);
const Collada::Data& jointNames = pParser.ResolveLibraryReference( pParser.mDataLibrary, jointNamesAcc.mSource);
@@ -872,7 +872,7 @@ aiMesh* ColladaLoader::CreateMesh( const ColladaParser& pParser, const Collada::
if( bnode)
bone->mName.Set( FindNameForNode( bnode));
else
- DefaultLogger::get()->warn( format() << "ColladaLoader::CreateMesh(): could not find corresponding node for joint \"" << bone->mName.data << "\"." );
+ ASSIMP_LOG_WARN_F( "ColladaLoader::CreateMesh(): could not find corresponding node for joint \"", bone->mName.data, "\"." );
// and insert bone
dstMesh->mBones[boneCount++] = bone;
@@ -953,7 +953,7 @@ void ColladaLoader::StoreSceneMaterials( aiScene* pScene)
// Stores all animations
void ColladaLoader::StoreAnimations( aiScene* pScene, const ColladaParser& pParser)
{
- // recursivly collect all animations from the collada scene
+ // recursively collect all animations from the collada scene
StoreAnimations( pScene, pParser, &pParser.mAnims, "");
// catch special case: many animations with the same length, each affecting only a single node.
@@ -968,7 +968,8 @@ void ColladaLoader::StoreAnimations( aiScene* pScene, const ColladaParser& pPars
for( size_t b = a+1; b < mAnims.size(); ++b)
{
aiAnimation* other = mAnims[b];
- if( other->mNumChannels == 1 && other->mDuration == templateAnim->mDuration && other->mTicksPerSecond == templateAnim->mTicksPerSecond )
+ if( other->mNumChannels == 1 && other->mDuration == templateAnim->mDuration &&
+ other->mTicksPerSecond == templateAnim->mTicksPerSecond )
collectedAnimIndices.push_back( b);
}
@@ -1120,6 +1121,7 @@ void ColladaLoader::CreateAnimation( aiScene* pScene, const ColladaParser& pPars
continue;
// now check all channels if they affect the current node
+ std::string targetID, subElement;
for( std::vector<Collada::AnimationChannel>::const_iterator cit = pSrcAnim->mChannels.begin();
cit != pSrcAnim->mChannels.end(); ++cit)
{
@@ -1146,7 +1148,9 @@ void ColladaLoader::CreateAnimation( aiScene* pScene, const ColladaParser& pPars
}
if( srcChannel.mTarget.find( '/', slashPos+1) != std::string::npos)
continue;
- std::string targetID = srcChannel.mTarget.substr( 0, slashPos);
+
+ targetID.clear();
+ targetID = srcChannel.mTarget.substr( 0, slashPos);
if( targetID != srcNode->mID)
continue;
@@ -1159,7 +1163,8 @@ void ColladaLoader::CreateAnimation( aiScene* pScene, const ColladaParser& pPars
entry.mTransformId = srcChannel.mTarget.substr( slashPos+1, dotPos - slashPos - 1);
- std::string subElement = srcChannel.mTarget.substr( dotPos+1);
+ subElement.clear();
+ subElement = srcChannel.mTarget.substr( dotPos+1);
if( subElement == "ANGLE")
entry.mSubElement = 3; // last number in an Axis-Angle-Transform is the angle
else if( subElement == "X")
@@ -1169,9 +1174,8 @@ void ColladaLoader::CreateAnimation( aiScene* pScene, const ColladaParser& pPars
else if( subElement == "Z")
entry.mSubElement = 2;
else
- DefaultLogger::get()->warn( format() << "Unknown anim subelement <" << subElement << ">. Ignoring" );
- } else
- {
+ ASSIMP_LOG_WARN_F( "Unknown anim subelement <", subElement, ">. Ignoring" );
+ } else {
// no subelement following, transformId is remaining string
entry.mTransformId = srcChannel.mTarget.substr( slashPos+1);
}
@@ -1180,7 +1184,8 @@ void ColladaLoader::CreateAnimation( aiScene* pScene, const ColladaParser& pPars
if (bracketPos != std::string::npos)
{
entry.mTransformId = srcChannel.mTarget.substr(slashPos + 1, bracketPos - slashPos - 1);
- std::string subElement = srcChannel.mTarget.substr(bracketPos);
+ subElement.clear();
+ subElement = srcChannel.mTarget.substr(bracketPos);
if (subElement == "(0)(0)")
entry.mSubElement = 0;
@@ -1214,7 +1219,6 @@ void ColladaLoader::CreateAnimation( aiScene* pScene, const ColladaParser& pPars
entry.mSubElement = 14;
else if (subElement == "(3)(3)")
entry.mSubElement = 15;
-
}
// determine which transform step is affected by this channel
@@ -1378,9 +1382,9 @@ void ColladaLoader::CreateAnimation( aiScene* pScene, const ColladaParser& pPars
{
aiNodeAnim* dstAnim = new aiNodeAnim;
dstAnim->mNodeName = nodeName;
- dstAnim->mNumPositionKeys = resultTrafos.size();
- dstAnim->mNumRotationKeys= resultTrafos.size();
- dstAnim->mNumScalingKeys = resultTrafos.size();
+ dstAnim->mNumPositionKeys = static_cast<unsigned int>(resultTrafos.size());
+ dstAnim->mNumRotationKeys = static_cast<unsigned int>(resultTrafos.size());
+ dstAnim->mNumScalingKeys = static_cast<unsigned int>(resultTrafos.size());
dstAnim->mPositionKeys = new aiVectorKey[resultTrafos.size()];
dstAnim->mRotationKeys = new aiQuatKey[resultTrafos.size()];
dstAnim->mScalingKeys = new aiVectorKey[resultTrafos.size()];
@@ -1400,7 +1404,7 @@ void ColladaLoader::CreateAnimation( aiScene* pScene, const ColladaParser& pPars
anims.push_back( dstAnim);
} else
{
- DefaultLogger::get()->warn( "Collada loader: found empty animation channel, ignored. Please check your exporter.");
+ ASSIMP_LOG_WARN( "Collada loader: found empty animation channel, ignored. Please check your exporter.");
}
if( !entries.empty() && entries.front().mTimeAccessor->mCount > 0 )
@@ -1446,11 +1450,11 @@ void ColladaLoader::CreateAnimation( aiScene* pScene, const ColladaParser& pPars
++morphAnimChannelIndex;
}
- morphAnim->mNumKeys = morphTimeValues.size();
+ morphAnim->mNumKeys = static_cast<unsigned int>(morphTimeValues.size());
morphAnim->mKeys = new aiMeshMorphKey[morphAnim->mNumKeys];
for (unsigned int key = 0; key < morphAnim->mNumKeys; key++)
{
- morphAnim->mKeys[key].mNumValuesAndWeights = morphChannels.size();
+ morphAnim->mKeys[key].mNumValuesAndWeights = static_cast<unsigned int>(morphChannels.size());
morphAnim->mKeys[key].mValues = new unsigned int [morphChannels.size()];
morphAnim->mKeys[key].mWeights = new double [morphChannels.size()];
@@ -1471,13 +1475,13 @@ void ColladaLoader::CreateAnimation( aiScene* pScene, const ColladaParser& pPars
{
aiAnimation* anim = new aiAnimation;
anim->mName.Set( pName);
- anim->mNumChannels = anims.size();
+ anim->mNumChannels = static_cast<unsigned int>(anims.size());
if (anim->mNumChannels > 0)
{
anim->mChannels = new aiNodeAnim*[anims.size()];
std::copy( anims.begin(), anims.end(), anim->mChannels);
}
- anim->mNumMorphMeshChannels = morphAnims.size();
+ anim->mNumMorphMeshChannels = static_cast<unsigned int>(morphAnims.size());
if (anim->mNumMorphMeshChannels > 0)
{
anim->mMorphMeshChannels = new aiMeshMorphAnim*[anim->mNumMorphMeshChannels];
@@ -1555,7 +1559,7 @@ void ColladaLoader::AddTexture ( aiMaterial& mat, const ColladaParser& pParser,
}
}
if (-1 == map) {
- DefaultLogger::get()->warn("Collada: unable to determine UV channel for texture");
+ ASSIMP_LOG_WARN("Collada: unable to determine UV channel for texture");
map = 0;
}
}
@@ -1592,7 +1596,7 @@ void ColladaLoader::FillMaterials( const ColladaParser& pParser, aiScene* /*pSce
break;
default:
- DefaultLogger::get()->warn("Collada: Unrecognized shading mode, using gouraud shading");
+ ASSIMP_LOG_WARN("Collada: Unrecognized shading mode, using gouraud shading");
shadeMode = aiShadingMode_Gouraud;
break;
}
@@ -1620,7 +1624,7 @@ void ColladaLoader::FillMaterials( const ColladaParser& pParser, aiScene* /*pSce
mat.AddProperty( &effect.mRefractIndex, 1, AI_MATKEY_REFRACTI);
// transparency, a very hard one. seemingly not all files are following the
- // specification here (1.0 transparency => completly opaque)...
+ // specification here (1.0 transparency => completely opaque)...
// therefore, we let the opportunity for the user to manually invert
// the transparency if necessary and we add preliminary support for RGB_ZERO mode
if(effect.mTransparency >= 0.f && effect.mTransparency <= 1.f) {
@@ -1651,9 +1655,10 @@ void ColladaLoader::FillMaterials( const ColladaParser& pParser, aiScene* /*pSce
}
// add textures, if given
- if( !effect.mTexAmbient.mName.empty())
- /* It is merely a lightmap */
- AddTexture( mat, pParser, effect, effect.mTexAmbient, aiTextureType_LIGHTMAP);
+ if (!effect.mTexAmbient.mName.empty()) {
+ // It is merely a light-map
+ AddTexture(mat, pParser, effect, effect.mTexAmbient, aiTextureType_LIGHTMAP);
+ }
if( !effect.mTexEmissive.mName.empty())
AddTexture( mat, pParser, effect, effect.mTexEmissive, aiTextureType_EMISSIVE);
@@ -1681,8 +1686,8 @@ void ColladaLoader::BuildMaterials( ColladaParser& pParser, aiScene* /*pScene*/)
{
newMats.reserve(pParser.mMaterialLibrary.size());
- for( ColladaParser::MaterialLibrary::const_iterator matIt = pParser.mMaterialLibrary.begin(); matIt != pParser.mMaterialLibrary.end(); ++matIt)
- {
+ for( ColladaParser::MaterialLibrary::const_iterator matIt = pParser.mMaterialLibrary.begin();
+ matIt != pParser.mMaterialLibrary.end(); ++matIt) {
const Collada::Material& material = matIt->second;
// a material is only a reference to an effect
ColladaParser::EffectLibrary::iterator effIt = pParser.mEffectLibrary.find( material.mEffect);
@@ -1746,11 +1751,7 @@ aiString ColladaLoader::FindFilenameForEffectTexture( const ColladaParser& pPars
ColladaParser::ImageLibrary::const_iterator imIt = pParser.mImageLibrary.find( name);
if( imIt == pParser.mImageLibrary.end())
{
- //missing texture should not stop the conversion
- //throw DeadlyImportError( format() <<
- // "Collada: Unable to resolve effect texture entry \"" << pName << "\", ended up at ID \"" << name << "\"." );
-
- DefaultLogger::get()->warn("Collada: Unable to resolve effect texture entry \"" + pName + "\", ended up at ID \"" + name + "\".");
+ ASSIMP_LOG_WARN_F("Collada: Unable to resolve effect texture entry \"", pName, "\", ended up at ID \"", name, "\".");
//set default texture file name
result.Set(name + ".jpg");
@@ -1769,7 +1770,7 @@ aiString ColladaLoader::FindFilenameForEffectTexture( const ColladaParser& pPars
// setup format hint
if (imIt->second.mEmbeddedFormat.length() > 3) {
- DefaultLogger::get()->warn("Collada: texture format hint is too long, truncating to 3 characters");
+ ASSIMP_LOG_WARN("Collada: texture format hint is too long, truncating to 3 characters");
}
strncpy(tex->achFormatHint,imIt->second.mEmbeddedFormat.c_str(),3);
@@ -1779,6 +1780,11 @@ aiString ColladaLoader::FindFilenameForEffectTexture( const ColladaParser& pPars
tex->pcData = (aiTexel*)new char[tex->mWidth];
memcpy(tex->pcData,&imIt->second.mImageData[0],tex->mWidth);
+ // TODO: check the possibility of using the flag "AI_CONFIG_IMPORT_FBX_EMBEDDED_TEXTURES_LEGACY_NAMING"
+ // In FBX files textures are now stored internally by Assimp with their filename included
+ // Now Assimp can lookup through the loaded textures after all data is processed
+ // We need to load all textures before referencing them, as FBX file format order may reference a texture before loading it
+ // This may occur on this case too, it has to be studied
// setup texture reference string
result.data[0] = '*';
result.length = 1 + ASSIMP_itoa10(result.data+1,static_cast<unsigned int>(MAXLEN-1),static_cast<int32_t>(mTextures.size()));
@@ -1800,7 +1806,7 @@ void ColladaLoader::ConvertPath (aiString& ss)
{
// TODO: collada spec, p 22. Handle URI correctly.
// For the moment we're just stripping the file:// away to make it work.
- // Windoes doesn't seem to be able to find stuff like
+ // Windows doesn't seem to be able to find stuff like
// 'file://..\LWO\LWO2\MappingModes\earthSpherical.jpg'
if (0 == strncmp(ss.data,"file://",7))
{
@@ -1811,10 +1817,13 @@ void ColladaLoader::ConvertPath (aiString& ss)
// Maxon Cinema Collada Export writes "file:///C:\andsoon" with three slashes...
// I need to filter it without destroying linux paths starting with "/somewhere"
- if( ss.data[0] == '/' && isalpha( ss.data[1]) && ss.data[2] == ':' )
- {
- ss.length--;
- memmove( ss.data, ss.data+1, ss.length);
+#if defined( _MSC_VER )
+ if( ss.data[0] == '/' && isalpha( (unsigned char) ss.data[1]) && ss.data[2] == ':' ) {
+#else
+ if (ss.data[ 0 ] == '/' && isalpha( ss.data[ 1 ] ) && ss.data[ 2 ] == ':') {
+#endif
+ --ss.length;
+ ::memmove( ss.data, ss.data+1, ss.length);
ss.data[ss.length] = 0;
}
@@ -1864,9 +1873,9 @@ const std::string& ColladaLoader::ReadString( const Collada::Accessor& pAccessor
void ColladaLoader::CollectNodes( const aiNode* pNode, std::vector<const aiNode*>& poNodes) const
{
poNodes.push_back( pNode);
-
- for( size_t a = 0; a < pNode->mNumChildren; ++a)
- CollectNodes( pNode->mChildren[a], poNodes);
+ for (size_t a = 0; a < pNode->mNumChildren; ++a) {
+ CollectNodes(pNode->mChildren[a], poNodes);
+ }
}
// ------------------------------------------------------------------------------------------------
@@ -1904,14 +1913,18 @@ const Collada::Node* ColladaLoader::FindNodeBySID( const Collada::Node* pNode, c
}
// ------------------------------------------------------------------------------------------------
-// Finds a proper name for a node derived from the collada-node's properties
+// Finds a proper unique name for a node derived from the collada-node's properties.
+// The name must be unique for proper node-bone association.
std::string ColladaLoader::FindNameForNode( const Collada::Node* pNode)
{
- // now setup the name of the node. We take the name if not empty, otherwise the collada ID
- // FIX: Workaround for XSI calling the instanced visual scene 'untitled' by default.
- if (!pNode->mName.empty() && pNode->mName != "untitled")
+ // If explicitly requested, just use the collada name.
+ if (useColladaName) {
return pNode->mName;
- else if (!pNode->mID.empty())
+ }
+
+ // Now setup the name of the assimp node. The collada name might not be
+ // unique, so we use the collada ID.
+ if (!pNode->mID.empty())
return pNode->mID;
else if (!pNode->mSID.empty())
return pNode->mSID;
diff --git a/code/ColladaLoader.h b/code/ColladaLoader.h
index 8388ab01e..d61845b24 100644
--- a/code/ColladaLoader.h
+++ b/code/ColladaLoader.h
@@ -4,7 +4,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -44,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_COLLADALOADER_H_INC
#define AI_COLLADALOADER_H_INC
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
#include "ColladaParser.h"
struct aiNode;
@@ -247,6 +248,7 @@ protected:
bool noSkeletonMesh;
bool ignoreUpDirection;
+ bool useColladaName;
/** Used by FindNameForNode() to generate unique node names */
unsigned int mNodeNameCounter;
diff --git a/code/ColladaParser.cpp b/code/ColladaParser.cpp
index 851a31edd..052cd51c4 100644
--- a/code/ColladaParser.cpp
+++ b/code/ColladaParser.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -44,19 +45,18 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* @brief Implementation of the Collada parser helper
*/
-
#ifndef ASSIMP_BUILD_NO_COLLADA_IMPORTER
#include <sstream>
#include <stdarg.h>
#include "ColladaParser.h"
-#include "fast_atof.h"
-#include "ParsingUtils.h"
-#include "StringUtils.h"
+#include <assimp/fast_atof.h>
+#include <assimp/ParsingUtils.h>
+#include <assimp/StringUtils.h>
#include <assimp/DefaultLogger.hpp>
#include <assimp/IOSystem.hpp>
#include <assimp/light.h>
-#include "TinyFormatter.h"
+#include <assimp/TinyFormatter.h>
#include <memory>
@@ -68,7 +68,7 @@ using namespace Assimp::Formatter;
// Constructor to be privately used by Importer
ColladaParser::ColladaParser( IOSystem* pIOHandler, const std::string& pFile)
: mFileName( pFile )
- , mReader( NULL )
+ , mReader( nullptr )
, mDataLibrary()
, mAccessorLibrary()
, mMeshLibrary()
@@ -79,20 +79,20 @@ ColladaParser::ColladaParser( IOSystem* pIOHandler, const std::string& pFile)
, mLightLibrary()
, mCameraLibrary()
, mControllerLibrary()
- , mRootNode( NULL )
+ , mRootNode( nullptr )
, mAnims()
, mUnitSize( 1.0f )
, mUpDirection( UP_Y )
, mFormat(FV_1_5_n ) // We assume the newest file format by default
{
// validate io-handler instance
- if ( NULL == pIOHandler ) {
+ if (nullptr == pIOHandler ) {
throw DeadlyImportError("IOSystem is NULL." );
}
// open the file
std::unique_ptr<IOStream> file( pIOHandler->Open(pFile ) );
- if (file.get() == NULL) {
+ if (file.get() == nullptr) {
throw DeadlyImportError( "Failed to open file " + pFile + "." );
}
@@ -152,22 +152,22 @@ void ColladaParser::ReadContents()
if (!::strncmp(version,"1.5",3)) {
mFormat = FV_1_5_n;
- DefaultLogger::get()->debug("Collada schema version is 1.5.n");
+ ASSIMP_LOG_DEBUG("Collada schema version is 1.5.n");
}
else if (!::strncmp(version,"1.4",3)) {
mFormat = FV_1_4_n;
- DefaultLogger::get()->debug("Collada schema version is 1.4.n");
+ ASSIMP_LOG_DEBUG("Collada schema version is 1.4.n");
}
else if (!::strncmp(version,"1.3",3)) {
mFormat = FV_1_3_n;
- DefaultLogger::get()->debug("Collada schema version is 1.3.n");
+ ASSIMP_LOG_DEBUG("Collada schema version is 1.3.n");
}
}
ReadStructure();
} else
{
- DefaultLogger::get()->debug( format() << "Ignoring global element <" << mReader->getNodeName() << ">." );
+ ASSIMP_LOG_DEBUG_F( "Ignoring global element <", mReader->getNodeName(), ">." );
SkipElement();
}
} else
@@ -222,10 +222,11 @@ void ColladaParser::ReadStructure()
}
PostProcessRootAnimations();
+ PostProcessControllers();
}
// ------------------------------------------------------------------------------------------------
-// Reads asset informations such as coordinate system informations and legal blah
+// Reads asset information such as coordinate system information and legal blah
void ColladaParser::ReadAssetInfo()
{
if( mReader->isEmptyElement())
@@ -360,6 +361,21 @@ void ColladaParser::ReadAnimationClipLibrary()
}
}
+void ColladaParser::PostProcessControllers()
+{
+ std::string meshId;
+ for (ControllerLibrary::iterator it = mControllerLibrary.begin(); it != mControllerLibrary.end(); ++it) {
+ meshId = it->second.mMeshId;
+ ControllerLibrary::iterator findItr = mControllerLibrary.find(meshId);
+ while(findItr != mControllerLibrary.end()) {
+ meshId = findItr->second.mMeshId;
+ findItr = mControllerLibrary.find(meshId);
+ }
+
+ it->second.mMeshId = meshId;
+ }
+}
+
// ------------------------------------------------------------------------------------------------
// Re-build animations from animation clip library, if present, otherwise combine single-channel animations
void ColladaParser::PostProcessRootAnimations()
@@ -968,13 +984,13 @@ void ColladaParser::ReadImage( Collada::Image& pImage)
// they're not skipped.
int attrib = TestAttribute("array_index");
if (attrib != -1 && mReader->getAttributeValueAsInt(attrib) > 0) {
- DefaultLogger::get()->warn("Collada: Ignoring texture array index");
+ ASSIMP_LOG_WARN("Collada: Ignoring texture array index");
continue;
}
attrib = TestAttribute("mip_index");
if (attrib != -1 && mReader->getAttributeValueAsInt(attrib) > 0) {
- DefaultLogger::get()->warn("Collada: Ignoring MIP map layer");
+ ASSIMP_LOG_WARN("Collada: Ignoring MIP map layer");
continue;
}
@@ -995,7 +1011,7 @@ void ColladaParser::ReadImage( Collada::Image& pImage)
// embedded image. get format
const int attrib = TestAttribute("format");
if (-1 == attrib)
- DefaultLogger::get()->warn("Collada: Unknown image file format");
+ ASSIMP_LOG_WARN("Collada: Unknown image file format");
else pImage.mEmbeddedFormat = mReader->getAttributeValue(attrib);
const char* data = GetTextContent();
@@ -1574,7 +1590,7 @@ void ColladaParser::ReadSamplerProperties( Sampler& out )
out.mOp = aiTextureOp_Multiply;
else {
- DefaultLogger::get()->warn("Collada: Unsupported MAYA texture blend mode");
+ ASSIMP_LOG_WARN("Collada: Unsupported MAYA texture blend mode");
}
TestClosing( "blend_mode");
}
@@ -1866,7 +1882,7 @@ void ColladaParser::ReadMesh( Mesh* pMesh)
ReadIndexData( pMesh);
} else
{
- // ignore the rest
+ // ignore the restf
SkipElement();
}
}
@@ -2216,8 +2232,9 @@ void ColladaParser::ReadIndexData( Mesh* pMesh)
else if (IsElement("extra"))
{
SkipElement("extra");
- } else
- {
+ } else if ( IsElement("ph")) {
+ SkipElement("ph");
+ } else {
ThrowException( format() << "Unexpected sub element <" << mReader->getNodeName() << "> in tag <" << elementName << ">" );
}
}
@@ -2231,7 +2248,7 @@ void ColladaParser::ReadIndexData( Mesh* pMesh)
}
#ifdef ASSIMP_BUILD_DEBUG
- if (primType != Prim_TriFans && primType != Prim_TriStrips &&
+ if (primType != Prim_TriFans && primType != Prim_TriStrips && primType != Prim_LineStrip &&
primType != Prim_Lines) { // this is ONLY to workaround a bug in SketchUp 15.3.331 where it writes the wrong 'count' when it writes out the 'lines'.
ai_assert(actualPrimitives == numPrimitives);
}
@@ -2400,6 +2417,10 @@ size_t ColladaParser::ReadPrimitives( Mesh* pMesh, std::vector<InputChannel>& pP
size_t numberOfVertices = indices.size() / numOffsets;
numPrimitives = numberOfVertices - 2;
}
+ if (pPrimType == Prim_LineStrip) {
+ size_t numberOfVertices = indices.size() / numOffsets;
+ numPrimitives = numberOfVertices - 1;
+ }
pMesh->mFaceSize.reserve( numPrimitives);
pMesh->mFacePosIndices.reserve( indices.size() / numOffsets);
@@ -2416,6 +2437,11 @@ size_t ColladaParser::ReadPrimitives( Mesh* pMesh, std::vector<InputChannel>& pP
for (size_t currentVertex = 0; currentVertex < numPoints; currentVertex++)
CopyVertex(currentVertex, numOffsets, numPoints, perVertexOffset, pMesh, pPerIndexChannels, currentPrimitive, indices);
break;
+ case Prim_LineStrip:
+ numPoints = 2;
+ for (size_t currentVertex = 0; currentVertex < numPoints; currentVertex++)
+ CopyVertex(currentVertex, numOffsets, 1, perVertexOffset, pMesh, pPerIndexChannels, currentPrimitive, indices);
+ break;
case Prim_Triangles:
numPoints = 3;
for (size_t currentVertex = 0; currentVertex < numPoints; currentVertex++)
@@ -2460,8 +2486,7 @@ void ColladaParser::CopyVertex(size_t currentVertex, size_t numOffsets, size_t n
size_t baseOffset = currentPrimitive * numOffsets * numPoints + currentVertex * numOffsets;
// don't overrun the boundaries of the index list
- size_t maxIndexRequested = baseOffset + numOffsets - 1;
- ai_assert(maxIndexRequested < indices.size());
+ ai_assert((baseOffset + numOffsets - 1) < indices.size());
// extract per-vertex channels using the global per-vertex offset
for (std::vector<InputChannel>::iterator it = pMesh->mPerVertexData.begin(); it != pMesh->mPerVertexData.end(); ++it)
@@ -2516,7 +2541,7 @@ void ColladaParser::ExtractDataObjectFromChannel( const InputChannel& pInput, si
if( pInput.mIndex == 0)
pMesh->mPositions.push_back( aiVector3D( obj[0], obj[1], obj[2]));
else
- DefaultLogger::get()->error("Collada: just one vertex position stream supported");
+ ASSIMP_LOG_ERROR("Collada: just one vertex position stream supported");
break;
case IT_Normal:
// pad to current vertex count if necessary
@@ -2527,7 +2552,7 @@ void ColladaParser::ExtractDataObjectFromChannel( const InputChannel& pInput, si
if( pInput.mIndex == 0)
pMesh->mNormals.push_back( aiVector3D( obj[0], obj[1], obj[2]));
else
- DefaultLogger::get()->error("Collada: just one vertex normal stream supported");
+ ASSIMP_LOG_ERROR("Collada: just one vertex normal stream supported");
break;
case IT_Tangent:
// pad to current vertex count if necessary
@@ -2538,7 +2563,7 @@ void ColladaParser::ExtractDataObjectFromChannel( const InputChannel& pInput, si
if( pInput.mIndex == 0)
pMesh->mTangents.push_back( aiVector3D( obj[0], obj[1], obj[2]));
else
- DefaultLogger::get()->error("Collada: just one vertex tangent stream supported");
+ ASSIMP_LOG_ERROR("Collada: just one vertex tangent stream supported");
break;
case IT_Bitangent:
// pad to current vertex count if necessary
@@ -2549,7 +2574,7 @@ void ColladaParser::ExtractDataObjectFromChannel( const InputChannel& pInput, si
if( pInput.mIndex == 0)
pMesh->mBitangents.push_back( aiVector3D( obj[0], obj[1], obj[2]));
else
- DefaultLogger::get()->error("Collada: just one vertex bitangent stream supported");
+ ASSIMP_LOG_ERROR("Collada: just one vertex bitangent stream supported");
break;
case IT_Texcoord:
// up to 4 texture coord sets are fine, ignore the others
@@ -2565,7 +2590,7 @@ void ColladaParser::ExtractDataObjectFromChannel( const InputChannel& pInput, si
pMesh->mNumUVComponents[pInput.mIndex]=3;
} else
{
- DefaultLogger::get()->error("Collada: too many texture coordinate sets. Skipping.");
+ ASSIMP_LOG_ERROR("Collada: too many texture coordinate sets. Skipping.");
}
break;
case IT_Color:
@@ -2585,7 +2610,7 @@ void ColladaParser::ExtractDataObjectFromChannel( const InputChannel& pInput, si
pMesh->mColors[pInput.mIndex].push_back(result);
} else
{
- DefaultLogger::get()->error("Collada: too many vertex color sets. Skipping.");
+ ASSIMP_LOG_ERROR("Collada: too many vertex color sets. Skipping.");
}
break;
@@ -2714,7 +2739,7 @@ void ColladaParser::ReadSceneNode( Node* pNode)
{
const char* s = mReader->getAttributeValue(attrId);
if (s[0] != '#')
- DefaultLogger::get()->error("Collada: Unresolved reference format of camera");
+ ASSIMP_LOG_ERROR("Collada: Unresolved reference format of camera");
else
pNode->mPrimaryCamera = s+1;
}
@@ -2727,7 +2752,7 @@ void ColladaParser::ReadSceneNode( Node* pNode)
{
const char* s = mReader->getAttributeValue(attrID);
if (s[0] != '#')
- DefaultLogger::get()->error("Collada: Unresolved reference format of node");
+ ASSIMP_LOG_ERROR("Collada: Unresolved reference format of node");
else
{
pNode->mNodeInstances.push_back(NodeInstance());
@@ -2745,7 +2770,7 @@ void ColladaParser::ReadSceneNode( Node* pNode)
// Reference to a light, name given in 'url' attribute
int attrID = TestAttribute("url");
if (-1 == attrID)
- DefaultLogger::get()->warn("Collada: Expected url attribute in <instance_light> element");
+ ASSIMP_LOG_WARN("Collada: Expected url attribute in <instance_light> element");
else
{
const char* url = mReader->getAttributeValue( attrID);
@@ -2761,7 +2786,7 @@ void ColladaParser::ReadSceneNode( Node* pNode)
// Reference to a camera, name given in 'url' attribute
int attrID = TestAttribute("url");
if (-1 == attrID)
- DefaultLogger::get()->warn("Collada: Expected url attribute in <instance_camera> element");
+ ASSIMP_LOG_WARN("Collada: Expected url attribute in <instance_camera> element");
else
{
const char* url = mReader->getAttributeValue( attrID);
@@ -2848,7 +2873,7 @@ void ColladaParser::ReadMaterialVertexInputBinding( Collada::SemanticMappingTabl
tbl.mMap[s] = vn;
}
else if( IsElement( "bind")) {
- DefaultLogger::get()->warn("Collada: Found unsupported <bind> element");
+ ASSIMP_LOG_WARN("Collada: Found unsupported <bind> element");
}
}
else if( mReader->getNodeType() == irr::io::EXN_ELEMENT_END) {
@@ -2967,10 +2992,9 @@ void ColladaParser::ReportWarning(const char* msg,...)
ai_assert(iLen > 0);
va_end(args);
- DefaultLogger::get()->warn("Validation warning: " + std::string(szBuffer,iLen));
+ ASSIMP_LOG_WARN_F("Validation warning: ", std::string(szBuffer,iLen));
}
-
// ------------------------------------------------------------------------------------------------
// Skips all data until the end node of the current element
void ColladaParser::SkipElement()
@@ -3081,7 +3105,7 @@ const char* ColladaParser::TestTextContent()
// read contents of the element
if( !mReader->read() )
return NULL;
- if( mReader->getNodeType() != irr::io::EXN_TEXT)
+ if( mReader->getNodeType() != irr::io::EXN_TEXT && mReader->getNodeType() != irr::io::EXN_CDATA)
return NULL;
// skip leading whitespace
@@ -3165,7 +3189,7 @@ aiMatrix4x4 ColladaParser::CalculateResultTransform( const std::vector<Transform
Collada::InputType ColladaParser::GetTypeForSemantic( const std::string& semantic)
{
if ( semantic.empty() ) {
- DefaultLogger::get()->warn( format() << "Vertex input type is empty." );
+ ASSIMP_LOG_WARN("Vertex input type is empty." );
return IT_Invalid;
}
@@ -3184,7 +3208,7 @@ Collada::InputType ColladaParser::GetTypeForSemantic( const std::string& semanti
else if( semantic == "TANGENT" || semantic == "TEXTANGENT")
return IT_Tangent;
- DefaultLogger::get()->warn( format() << "Unknown vertex input type \"" << semantic << "\". Ignoring." );
+ ASSIMP_LOG_WARN_F( "Unknown vertex input type \"", semantic, "\". Ignoring." );
return IT_Invalid;
}
diff --git a/code/ColladaParser.h b/code/ColladaParser.h
index b34974470..21f741551 100644
--- a/code/ColladaParser.h
+++ b/code/ColladaParser.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
- Copyright (c) 2006-2017, assimp team
+ Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -46,10 +47,10 @@
#ifndef AI_COLLADAPARSER_H_INC
#define AI_COLLADAPARSER_H_INC
-#include "irrXMLWrapper.h"
+#include <assimp/irrXMLWrapper.h>
#include "ColladaHelper.h"
#include <assimp/ai_assert.h>
-#include "TinyFormatter.h"
+#include <assimp/TinyFormatter.h>
namespace Assimp
{
@@ -77,7 +78,7 @@ namespace Assimp
/** Reads the structure of the file */
void ReadStructure();
- /** Reads asset informations such as coordinate system informations and legal blah */
+ /** Reads asset information such as coordinate system information and legal blah */
void ReadAssetInfo();
/** Reads the animation library */
@@ -86,6 +87,9 @@ namespace Assimp
/** Reads the animation clip library */
void ReadAnimationClipLibrary();
+ /** Unwrap controllers dependency hierarchy */
+ void PostProcessControllers();
+
/** Re-build animations from animation clip library, if present, otherwise combine single-channel animations */
void PostProcessRootAnimations();
diff --git a/code/ComputeUVMappingProcess.cpp b/code/ComputeUVMappingProcess.cpp
index c49666de8..3b0577b2d 100644
--- a/code/ComputeUVMappingProcess.cpp
+++ b/code/ComputeUVMappingProcess.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -44,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "ComputeUVMappingProcess.h"
#include "ProcessHelper.h"
-#include "Exceptional.h"
+#include <assimp/Exceptional.h>
using namespace Assimp;
@@ -98,7 +99,7 @@ inline unsigned int FindEmptyUVChannel (aiMesh* mesh)
for (unsigned int m = 0; m < AI_MAX_NUMBER_OF_TEXTURECOORDS;++m)
if (!mesh->mTextureCoords[m])return m;
- DefaultLogger::get()->error("Unable to compute UV coordinates, no free UV slot found");
+ ASSIMP_LOG_ERROR("Unable to compute UV coordinates, no free UV slot found");
return UINT_MAX;
}
@@ -383,13 +384,13 @@ void ComputeUVMappingProcess::ComputePlaneMapping(aiMesh* mesh,const aiVector3D&
// ------------------------------------------------------------------------------------------------
void ComputeUVMappingProcess::ComputeBoxMapping( aiMesh*, aiVector3D* )
{
- DefaultLogger::get()->error("Mapping type currently not implemented");
+ ASSIMP_LOG_ERROR("Mapping type currently not implemented");
}
// ------------------------------------------------------------------------------------------------
void ComputeUVMappingProcess::Execute( aiScene* pScene)
{
- DefaultLogger::get()->debug("GenUVCoordsProcess begin");
+ ASSIMP_LOG_DEBUG("GenUVCoordsProcess begin");
char buffer[1024];
if (pScene->mFlags & AI_SCENE_FLAGS_NON_VERBOSE_FORMAT)
@@ -417,7 +418,7 @@ void ComputeUVMappingProcess::Execute( aiScene* pScene)
TextureTypeToString((aiTextureType)prop->mSemantic),prop->mIndex,
MappingTypeToString(mapping));
- DefaultLogger::get()->info(buffer);
+ ASSIMP_LOG_INFO(buffer);
}
if (aiTextureMapping_OTHER == mapping)
@@ -484,7 +485,7 @@ void ComputeUVMappingProcess::Execute( aiScene* pScene)
}
if (m && idx != outIdx)
{
- DefaultLogger::get()->warn("UV index mismatch. Not all meshes assigned to "
+ ASSIMP_LOG_WARN("UV index mismatch. Not all meshes assigned to "
"this material have equal numbers of UV channels. The UV index stored in "
"the material structure does therefore not apply for all meshes. ");
}
@@ -501,5 +502,5 @@ void ComputeUVMappingProcess::Execute( aiScene* pScene)
}
}
}
- DefaultLogger::get()->debug("GenUVCoordsProcess finished");
+ ASSIMP_LOG_DEBUG("GenUVCoordsProcess finished");
}
diff --git a/code/ComputeUVMappingProcess.h b/code/ComputeUVMappingProcess.h
index 1de97961d..41e25f99f 100644
--- a/code/ComputeUVMappingProcess.h
+++ b/code/ComputeUVMappingProcess.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/ConvertToLHProcess.cpp b/code/ConvertToLHProcess.cpp
index 6a43d5c2d..9cb45cc69 100644
--- a/code/ConvertToLHProcess.cpp
+++ b/code/ConvertToLHProcess.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -58,6 +59,25 @@ using namespace Assimp;
#ifndef ASSIMP_BUILD_NO_MAKELEFTHANDED_PROCESS
+namespace {
+
+template <typename aiMeshType>
+void flipUVs(aiMeshType* pMesh) {
+ if (pMesh == nullptr) { return; }
+ // mirror texture y coordinate
+ for (unsigned int tcIdx = 0; tcIdx < AI_MAX_NUMBER_OF_TEXTURECOORDS; tcIdx++) {
+ if (!pMesh->HasTextureCoords(tcIdx)) {
+ break;
+ }
+
+ for (unsigned int vIdx = 0; vIdx < pMesh->mNumVertices; vIdx++) {
+ pMesh->mTextureCoords[tcIdx][vIdx].y = 1.0f - pMesh->mTextureCoords[tcIdx][vIdx].y;
+ }
+ }
+}
+
+} // namespace
+
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
MakeLeftHandedProcess::MakeLeftHandedProcess()
@@ -84,18 +104,20 @@ void MakeLeftHandedProcess::Execute( aiScene* pScene)
{
// Check for an existent root node to proceed
ai_assert(pScene->mRootNode != NULL);
- DefaultLogger::get()->debug("MakeLeftHandedProcess begin");
+ ASSIMP_LOG_DEBUG("MakeLeftHandedProcess begin");
// recursively convert all the nodes
ProcessNode( pScene->mRootNode, aiMatrix4x4());
// process the meshes accordingly
- for( unsigned int a = 0; a < pScene->mNumMeshes; ++a)
- ProcessMesh( pScene->mMeshes[a]);
+ for ( unsigned int a = 0; a < pScene->mNumMeshes; ++a ) {
+ ProcessMesh( pScene->mMeshes[ a ] );
+ }
// process the materials accordingly
- for( unsigned int a = 0; a < pScene->mNumMaterials; ++a)
- ProcessMaterial( pScene->mMaterials[a]);
+ for ( unsigned int a = 0; a < pScene->mNumMaterials; ++a ) {
+ ProcessMaterial( pScene->mMaterials[ a ] );
+ }
// transform all animation channels as well
for( unsigned int a = 0; a < pScene->mNumAnimations; a++)
@@ -107,7 +129,7 @@ void MakeLeftHandedProcess::Execute( aiScene* pScene)
ProcessAnimation( nodeAnim);
}
}
- DefaultLogger::get()->debug("MakeLeftHandedProcess finished");
+ ASSIMP_LOG_DEBUG("MakeLeftHandedProcess finished");
}
// ------------------------------------------------------------------------------------------------
@@ -135,8 +157,11 @@ void MakeLeftHandedProcess::ProcessNode( aiNode* pNode, const aiMatrix4x4& pPare
// ------------------------------------------------------------------------------------------------
// Converts a single mesh to left handed coordinates.
-void MakeLeftHandedProcess::ProcessMesh( aiMesh* pMesh)
-{
+void MakeLeftHandedProcess::ProcessMesh( aiMesh* pMesh) {
+ if ( nullptr == pMesh ) {
+ ASSIMP_LOG_ERROR( "Nullptr to mesh found." );
+ return;
+ }
// mirror positions, normals and stuff along the Z axis
for( size_t a = 0; a < pMesh->mNumVertices; ++a)
{
@@ -172,8 +197,12 @@ void MakeLeftHandedProcess::ProcessMesh( aiMesh* pMesh)
// ------------------------------------------------------------------------------------------------
// Converts a single material to left handed coordinates.
-void MakeLeftHandedProcess::ProcessMaterial( aiMaterial* _mat)
-{
+void MakeLeftHandedProcess::ProcessMaterial( aiMaterial* _mat) {
+ if ( nullptr == _mat ) {
+ ASSIMP_LOG_ERROR( "Nullptr to aiMaterial found." );
+ return;
+ }
+
aiMaterial* mat = (aiMaterial*)_mat;
for (unsigned int a = 0; a < mat->mNumProperties;++a) {
aiMaterialProperty* prop = mat->mProperties[a];
@@ -182,7 +211,6 @@ void MakeLeftHandedProcess::ProcessMaterial( aiMaterial* _mat)
if (!::strcmp( prop->mKey.data, "$tex.mapaxis")) {
ai_assert( prop->mDataLength >= sizeof(aiVector3D)); /* something is wrong with the validation if we end up here */
aiVector3D* pff = (aiVector3D*)prop->mData;
-
pff->z *= -1.f;
}
}
@@ -236,13 +264,13 @@ bool FlipUVsProcess::IsActive( unsigned int pFlags) const
// Executes the post processing step on the given imported data.
void FlipUVsProcess::Execute( aiScene* pScene)
{
- DefaultLogger::get()->debug("FlipUVsProcess begin");
+ ASSIMP_LOG_DEBUG("FlipUVsProcess begin");
for (unsigned int i = 0; i < pScene->mNumMeshes;++i)
ProcessMesh(pScene->mMeshes[i]);
for (unsigned int i = 0; i < pScene->mNumMaterials;++i)
ProcessMaterial(pScene->mMaterials[i]);
- DefaultLogger::get()->debug("FlipUVsProcess finished");
+ ASSIMP_LOG_DEBUG("FlipUVsProcess finished");
}
// ------------------------------------------------------------------------------------------------
@@ -253,7 +281,7 @@ void FlipUVsProcess::ProcessMaterial (aiMaterial* _mat)
for (unsigned int a = 0; a < mat->mNumProperties;++a) {
aiMaterialProperty* prop = mat->mProperties[a];
if( !prop ) {
- DefaultLogger::get()->debug( "Property is null" );
+ ASSIMP_LOG_DEBUG( "Property is null" );
continue;
}
@@ -273,15 +301,9 @@ void FlipUVsProcess::ProcessMaterial (aiMaterial* _mat)
// Converts a single mesh
void FlipUVsProcess::ProcessMesh( aiMesh* pMesh)
{
- // mirror texture y coordinate
- for( unsigned int a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; a++) {
- if( !pMesh->HasTextureCoords( a ) ) {
- break;
- }
-
- for( unsigned int b = 0; b < pMesh->mNumVertices; b++ ) {
- pMesh->mTextureCoords[ a ][ b ].y = 1.0f - pMesh->mTextureCoords[ a ][ b ].y;
- }
+ flipUVs(pMesh);
+ for (unsigned int idx = 0; idx < pMesh->mNumAnimMeshes; idx++) {
+ flipUVs(pMesh->mAnimMeshes[idx]);
}
}
@@ -310,10 +332,10 @@ bool FlipWindingOrderProcess::IsActive( unsigned int pFlags) const
// Executes the post processing step on the given imported data.
void FlipWindingOrderProcess::Execute( aiScene* pScene)
{
- DefaultLogger::get()->debug("FlipWindingOrderProcess begin");
+ ASSIMP_LOG_DEBUG("FlipWindingOrderProcess begin");
for (unsigned int i = 0; i < pScene->mNumMeshes;++i)
ProcessMesh(pScene->mMeshes[i]);
- DefaultLogger::get()->debug("FlipWindingOrderProcess finished");
+ ASSIMP_LOG_DEBUG("FlipWindingOrderProcess finished");
}
// ------------------------------------------------------------------------------------------------
diff --git a/code/ConvertToLHProcess.h b/code/ConvertToLHProcess.h
index 130fdcafd..f219d6ca2 100644
--- a/code/ConvertToLHProcess.h
+++ b/code/ConvertToLHProcess.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/CreateAnimMesh.cpp b/code/CreateAnimMesh.cpp
index 094a414bf..1a052849b 100644
--- a/code/CreateAnimMesh.cpp
+++ b/code/CreateAnimMesh.cpp
@@ -40,7 +40,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
---------------------------------------------------------------------------
*/
-#include "CreateAnimMesh.h"
+#include <assimp/CreateAnimMesh.h>
namespace Assimp {
diff --git a/code/D3MFExporter.cpp b/code/D3MFExporter.cpp
new file mode 100644
index 000000000..99e2ff3f5
--- /dev/null
+++ b/code/D3MFExporter.cpp
@@ -0,0 +1,398 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2018, assimp 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 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.
+
+----------------------------------------------------------------------
+*/
+#ifndef ASSIMP_BUILD_NO_EXPORT
+#ifndef ASSIMP_BUILD_NO_3MF_EXPORTER
+
+#include "D3MFExporter.h"
+
+#include <assimp/scene.h>
+#include <assimp/IOSystem.hpp>
+#include <assimp/IOStream.hpp>
+#include <assimp/Exporter.hpp>
+#include <assimp/DefaultLogger.hpp>
+#include <assimp/StringUtils.h>
+#include <assimp/Exceptional.h>
+
+#include "3MFXmlTags.h"
+#include "D3MFOpcPackage.h"
+
+#include <contrib/zip/src/zip.h>
+
+namespace Assimp {
+
+void ExportScene3MF( const char* pFile, IOSystem* pIOSystem, const aiScene* pScene, const ExportProperties* /*pProperties*/ ) {
+ if ( nullptr == pIOSystem ) {
+ throw DeadlyExportError( "Could not export 3MP archive: " + std::string( pFile ) );
+ }
+ D3MF::D3MFExporter myExporter( pFile, pScene );
+ if ( myExporter.validate() ) {
+ if ( pIOSystem->Exists( pFile ) ) {
+ if ( !pIOSystem->DeleteFile( pFile ) ) {
+ throw DeadlyExportError( "File exists, cannot override : " + std::string( pFile ) );
+ }
+ }
+ bool ok = myExporter.exportArchive(pFile);
+ if ( !ok ) {
+ throw DeadlyExportError( "Could not export 3MP archive: " + std::string( pFile ) );
+ }
+ }
+}
+
+namespace D3MF {
+
+D3MFExporter::D3MFExporter( const char* pFile, const aiScene* pScene )
+: mArchiveName( pFile )
+, m_zipArchive( nullptr )
+, mScene( pScene )
+, mModelOutput()
+, mRelOutput()
+, mContentOutput()
+, mBuildItems()
+, mRelations() {
+ // empty
+}
+
+D3MFExporter::~D3MFExporter() {
+ for ( size_t i = 0; i < mRelations.size(); ++i ) {
+ delete mRelations[ i ];
+ }
+ mRelations.clear();
+}
+
+bool D3MFExporter::validate() {
+ if ( mArchiveName.empty() ) {
+ return false;
+ }
+
+ if ( nullptr == mScene ) {
+ return false;
+ }
+
+ return true;
+}
+
+bool D3MFExporter::exportArchive( const char *file ) {
+ bool ok( true );
+
+ m_zipArchive = zip_open( file, ZIP_DEFAULT_COMPRESSION_LEVEL, 'w' );
+ if ( nullptr == m_zipArchive ) {
+ return false;
+ }
+
+ ok |= exportContentTypes();
+ ok |= export3DModel();
+ ok |= exportRelations();
+
+ zip_close( m_zipArchive );
+ m_zipArchive = nullptr;
+
+ return ok;
+}
+
+bool D3MFExporter::exportContentTypes() {
+ mContentOutput.clear();
+
+ mContentOutput << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
+ mContentOutput << std::endl;
+ mContentOutput << "<Types xmlns = \"http://schemas.openxmlformats.org/package/2006/content-types\">";
+ mContentOutput << std::endl;
+ mContentOutput << "<Default Extension = \"rels\" ContentType = \"application/vnd.openxmlformats-package.relationships+xml\" />";
+ mContentOutput << std::endl;
+ mContentOutput << "<Default Extension = \"model\" ContentType = \"application/vnd.ms-package.3dmanufacturing-3dmodel+xml\" />";
+ mContentOutput << std::endl;
+ mContentOutput << "</Types>";
+ mContentOutput << std::endl;
+ exportContentTyp( XmlTag::CONTENT_TYPES_ARCHIVE );
+
+ return true;
+}
+
+bool D3MFExporter::exportRelations() {
+ mRelOutput.clear();
+
+ mRelOutput << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
+ mRelOutput << std::endl;
+ mRelOutput << "<Relationships xmlns=\"http://schemas.openxmlformats.org/package/2006/relationships\">";
+
+ for ( size_t i = 0; i < mRelations.size(); ++i ) {
+ if ( mRelations[ i ]->target[ 0 ] == '/' ) {
+ mRelOutput << "<Relationship Target=\"" << mRelations[ i ]->target << "\" ";
+ } else {
+ mRelOutput << "<Relationship Target=\"/" << mRelations[ i ]->target << "\" ";
+ }
+ mRelOutput << "Id=\"" << mRelations[i]->id << "\" ";
+ mRelOutput << "Type=\"" << mRelations[ i ]->type << "\" />";
+ mRelOutput << std::endl;
+ }
+ mRelOutput << "</Relationships>";
+ mRelOutput << std::endl;
+
+ writeRelInfoToFile( "_rels", ".rels" );
+ mRelOutput.flush();
+
+ return true;
+}
+
+bool D3MFExporter::export3DModel() {
+ mModelOutput.clear();
+
+ writeHeader();
+ mModelOutput << "<" << XmlTag::model << " " << XmlTag::model_unit << "=\"millimeter\""
+ << "xmlns=\"http://schemas.microsoft.com/3dmanufacturing/core/2015/02\">"
+ << std::endl;
+ mModelOutput << "<" << XmlTag::resources << ">";
+ mModelOutput << std::endl;
+
+ writeMetaData();
+
+ writeBaseMaterials();
+
+ writeObjects();
+
+
+ mModelOutput << "</" << XmlTag::resources << ">";
+ mModelOutput << std::endl;
+ writeBuild();
+
+ mModelOutput << "</" << XmlTag::model << ">\n";
+
+ OpcPackageRelationship *info = new OpcPackageRelationship;
+ info->id = "rel0";
+ info->target = "/3D/3DModel.model";
+ info->type = XmlTag::PACKAGE_START_PART_RELATIONSHIP_TYPE;
+ mRelations.push_back( info );
+
+ writeModelToArchive( "3D", "3DModel.model" );
+ mModelOutput.flush();
+
+ return true;
+}
+
+void D3MFExporter::writeHeader() {
+ mModelOutput << "<?xml version=\"1.0\" encoding=\"UTF - 8\"?>";
+ mModelOutput << std::endl;
+}
+
+void D3MFExporter::writeMetaData() {
+ if ( nullptr == mScene->mMetaData ) {
+ return;
+ }
+
+ const unsigned int numMetaEntries( mScene->mMetaData->mNumProperties );
+ if ( 0 == numMetaEntries ) {
+ return;
+ }
+
+ const aiString *key = nullptr;
+ const aiMetadataEntry *entry(nullptr);
+ for ( size_t i = 0; i < numMetaEntries; ++i ) {
+ mScene->mMetaData->Get( i, key, entry );
+ std::string k( key->C_Str() );
+ aiString value;
+ mScene->mMetaData->Get( k, value );
+ mModelOutput << "<" << XmlTag::meta << " " << XmlTag::meta_name << "=\"" << key->C_Str() << "\">";
+ mModelOutput << value.C_Str();
+ mModelOutput << "</" << XmlTag::meta << ">" << std::endl;
+ }
+}
+
+void D3MFExporter::writeBaseMaterials() {
+ mModelOutput << "<basematerials id=\"1\">\n";
+ std::string strName, hexDiffuseColor , tmp;
+ for ( size_t i = 0; i < mScene->mNumMaterials; ++i ) {
+ aiMaterial *mat = mScene->mMaterials[ i ];
+ aiString name;
+ if ( mat->Get( AI_MATKEY_NAME, name ) != aiReturn_SUCCESS ) {
+ strName = "basemat_" + to_string( i );
+ } else {
+ strName = name.C_Str();
+ }
+ aiColor4D color;
+ if ( mat->Get( AI_MATKEY_COLOR_DIFFUSE, color ) == aiReturn_SUCCESS ) {
+ hexDiffuseColor.clear();
+ tmp.clear();
+ hexDiffuseColor = "#";
+
+ tmp = DecimalToHexa( color.r );
+ hexDiffuseColor += tmp;
+ tmp = DecimalToHexa( color.g );
+ hexDiffuseColor += tmp;
+ tmp = DecimalToHexa( color.b );
+ hexDiffuseColor += tmp;
+ tmp = DecimalToHexa( color.a );
+ hexDiffuseColor += tmp;
+ } else {
+ hexDiffuseColor = "#FFFFFFFF";
+ }
+
+ mModelOutput << "<base name=\""+strName+"\" "+" displaycolor=\""+hexDiffuseColor+"\" />\n";
+ }
+ mModelOutput << "</basematerials>\n";
+}
+
+void D3MFExporter::writeObjects() {
+ if ( nullptr == mScene->mRootNode ) {
+ return;
+ }
+
+ aiNode *root = mScene->mRootNode;
+ for ( unsigned int i = 0; i < root->mNumChildren; ++i ) {
+ aiNode *currentNode( root->mChildren[ i ] );
+ if ( nullptr == currentNode ) {
+ continue;
+ }
+ mModelOutput << "<" << XmlTag::object << " id=\"" << currentNode->mName.C_Str() << "\" type=\"model\">";
+ mModelOutput << std::endl;
+ for ( unsigned int j = 0; j < currentNode->mNumMeshes; ++j ) {
+ aiMesh *currentMesh = mScene->mMeshes[ currentNode->mMeshes[ j ] ];
+ if ( nullptr == currentMesh ) {
+ continue;
+ }
+ writeMesh( currentMesh );
+ }
+ mBuildItems.push_back( i );
+
+ mModelOutput << "</" << XmlTag::object << ">";
+ mModelOutput << std::endl;
+ }
+}
+
+void D3MFExporter::writeMesh( aiMesh *mesh ) {
+ if ( nullptr == mesh ) {
+ return;
+ }
+
+ mModelOutput << "<" << XmlTag::mesh << ">" << std::endl;
+ mModelOutput << "<" << XmlTag::vertices << ">" << std::endl;
+ for ( unsigned int i = 0; i < mesh->mNumVertices; ++i ) {
+ writeVertex( mesh->mVertices[ i ] );
+ }
+ mModelOutput << "</" << XmlTag::vertices << ">" << std::endl;
+
+ const unsigned int matIdx( mesh->mMaterialIndex );
+
+ writeFaces( mesh, matIdx );
+
+ mModelOutput << "</" << XmlTag::mesh << ">" << std::endl;
+}
+
+void D3MFExporter::writeVertex( const aiVector3D &pos ) {
+ mModelOutput << "<" << XmlTag::vertex << " x=\"" << pos.x << "\" y=\"" << pos.y << "\" z=\"" << pos.z << "\" />";
+ mModelOutput << std::endl;
+}
+
+void D3MFExporter::writeFaces( aiMesh *mesh, unsigned int matIdx ) {
+ if ( nullptr == mesh ) {
+ return;
+ }
+
+ if ( !mesh->HasFaces() ) {
+ return;
+ }
+ mModelOutput << "<" << XmlTag::triangles << ">" << std::endl;
+ for ( unsigned int i = 0; i < mesh->mNumFaces; ++i ) {
+ aiFace &currentFace = mesh->mFaces[ i ];
+ mModelOutput << "<" << XmlTag::triangle << " v1=\"" << currentFace.mIndices[ 0 ] << "\" v2=\""
+ << currentFace.mIndices[ 1 ] << "\" v3=\"" << currentFace.mIndices[ 2 ]
+ << "\" pid=\"1\" p1=\""+to_string(matIdx)+"\" />";
+ mModelOutput << std::endl;
+ }
+ mModelOutput << "</" << XmlTag::triangles << ">";
+ mModelOutput << std::endl;
+}
+
+void D3MFExporter::writeBuild() {
+ mModelOutput << "<" << XmlTag::build << ">" << std::endl;
+
+ for ( size_t i = 0; i < mBuildItems.size(); ++i ) {
+ mModelOutput << "<" << XmlTag::item << " objectid=\"" << i + 1 << "\"/>";
+ mModelOutput << std::endl;
+ }
+ mModelOutput << "</" << XmlTag::build << ">";
+ mModelOutput << std::endl;
+}
+
+void D3MFExporter::exportContentTyp( const std::string &filename ) {
+ if ( nullptr == m_zipArchive ) {
+ throw DeadlyExportError( "3MF-Export: Zip archive not valid, nullptr." );
+ }
+ const std::string entry = filename;
+ zip_entry_open( m_zipArchive, entry.c_str() );
+
+ const std::string &exportTxt( mContentOutput.str() );
+ zip_entry_write( m_zipArchive, exportTxt.c_str(), exportTxt.size() );
+
+ zip_entry_close( m_zipArchive );
+}
+
+void D3MFExporter::writeModelToArchive( const std::string &folder, const std::string &modelName ) {
+ if ( nullptr == m_zipArchive ) {
+ throw DeadlyExportError( "3MF-Export: Zip archive not valid, nullptr." );
+ }
+ const std::string entry = folder + "/" + modelName;
+ zip_entry_open( m_zipArchive, entry.c_str() );
+
+ const std::string &exportTxt( mModelOutput.str() );
+ zip_entry_write( m_zipArchive, exportTxt.c_str(), exportTxt.size() );
+
+ zip_entry_close( m_zipArchive );
+}
+
+void D3MFExporter::writeRelInfoToFile( const std::string &folder, const std::string &relName ) {
+ if ( nullptr == m_zipArchive ) {
+ throw DeadlyExportError( "3MF-Export: Zip archive not valid, nullptr." );
+ }
+ const std::string entry = folder + "/" + relName;
+ zip_entry_open( m_zipArchive, entry.c_str() );
+
+ const std::string &exportTxt( mRelOutput.str() );
+ zip_entry_write( m_zipArchive, exportTxt.c_str(), exportTxt.size() );
+
+ zip_entry_close( m_zipArchive );
+}
+
+
+} // Namespace D3MF
+} // Namespace Assimp
+
+#endif // ASSIMP_BUILD_NO_3MF_EXPORTER
+#endif // ASSIMP_BUILD_NO_EXPORT
diff --git a/code/D3MFExporter.h b/code/D3MFExporter.h
new file mode 100644
index 000000000..110862b99
--- /dev/null
+++ b/code/D3MFExporter.h
@@ -0,0 +1,106 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2018, assimp 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 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.
+
+----------------------------------------------------------------------
+*/
+#pragma once
+
+#include <memory>
+#include <sstream>
+#include <vector>
+#include <assimp/vector3.h>
+
+struct aiScene;
+struct aiNode;
+struct aiMaterial;
+struct aiMesh;
+
+struct zip_t;
+
+namespace Assimp {
+
+class IOStream;
+
+namespace D3MF {
+
+#ifndef ASSIMP_BUILD_NO_EXPORT
+#ifndef ASSIMP_BUILD_NO_3MF_EXPORTER
+
+struct OpcPackageRelationship;
+
+class D3MFExporter {
+public:
+ D3MFExporter( const char* pFile, const aiScene* pScene );
+ ~D3MFExporter();
+ bool validate();
+ bool exportArchive( const char *file );
+ bool exportContentTypes();
+ bool exportRelations();
+ bool export3DModel();
+
+protected:
+ void writeHeader();
+ void writeMetaData();
+ void writeBaseMaterials();
+ void writeObjects();
+ void writeMesh( aiMesh *mesh );
+ void writeVertex( const aiVector3D &pos );
+ void writeFaces( aiMesh *mesh, unsigned int matIdx );
+ void writeBuild();
+ void exportContentTyp( const std::string &filename );
+ void writeModelToArchive( const std::string &folder, const std::string &modelName );
+ void writeRelInfoToFile( const std::string &folder, const std::string &relName );
+
+private:
+ std::string mArchiveName;
+ zip_t *m_zipArchive;
+ const aiScene *mScene;
+ std::ostringstream mModelOutput;
+ std::ostringstream mRelOutput;
+ std::ostringstream mContentOutput;
+ std::vector<unsigned int> mBuildItems;
+ std::vector<OpcPackageRelationship*> mRelations;
+};
+
+#endif // ASSIMP_BUILD_NO_3MF_EXPORTER
+#endif // ASSIMP_BUILD_NO_EXPORT
+
+} // Namespace D3MF
+} // Namespace Assimp
+
diff --git a/code/D3MFImporter.cpp b/code/D3MFImporter.cpp
index 0f06d4a1e..de5708149 100644
--- a/code/D3MFImporter.cpp
+++ b/code/D3MFImporter.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -47,8 +48,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/IOSystem.hpp>
#include <assimp/DefaultLogger.hpp>
#include <assimp/importerdesc.h>
-#include "StringComparison.h"
-#include "StringUtils.h"
+#include <assimp/StringComparison.h>
+#include <assimp/StringUtils.h>
#include <string>
#include <vector>
@@ -57,98 +58,101 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <memory>
#include "D3MFOpcPackage.h"
-#include <contrib/unzip/unzip.h>
-#include "irrXMLWrapper.h"
+#include <unzip.h>
+#include <assimp/irrXMLWrapper.h>
+#include "3MFXmlTags.h"
+#include <assimp/fast_atof.h>
+
+#include <iomanip>
namespace Assimp {
namespace D3MF {
-namespace XmlTag {
- static const std::string model = "model";
- static const std::string metadata = "metadata";
- static const std::string resources = "resources";
- static const std::string object = "object";
- static const std::string mesh = "mesh";
- static const std::string vertices = "vertices";
- static const std::string vertex = "vertex";
- static const std::string triangles = "triangles";
- static const std::string triangle = "triangle";
- static const std::string x = "x";
- static const std::string y = "y";
- static const std::string z = "z";
- static const std::string v1 = "v1";
- static const std::string v2 = "v2";
- static const std::string v3 = "v3";
- static const std::string id = "id";
- static const std::string name = "name";
- static const std::string type = "type";
- static const std::string build = "build";
- static const std::string item = "item";
- static const std::string objectid = "objectid";
- static const std::string transform = "transform";
-}
-
-
-class XmlSerializer
-{
+class XmlSerializer {
public:
- XmlSerializer(XmlReader* xmlReader)
- : xmlReader(xmlReader)
- {
+ using MatArray = std::vector<aiMaterial*>;
+ using MatId2MatArray = std::map<unsigned int, std::vector<unsigned int>>;
+ XmlSerializer(XmlReader* xmlReader)
+ : mMeshes()
+ , mMatArray()
+ , mActiveMatGroup( 99999999 )
+ , mMatId2MatArray()
+ , xmlReader(xmlReader){
+ // empty
}
- void ImportXml(aiScene* scene)
- {
+ ~XmlSerializer() {
+ // empty
+ }
- scene->mFlags |= AI_SCENE_FLAGS_NON_VERBOSE_FORMAT;
+ void ImportXml(aiScene* scene) {
+ if ( nullptr == scene ) {
+ return;
+ }
scene->mRootNode = new aiNode();
std::vector<aiNode*> children;
- while(ReadToEndElement(D3MF::XmlTag::model))
- {
-
- if(xmlReader->getNodeName() == D3MF::XmlTag::object)
- {
+ std::string nodeName;
+ while(ReadToEndElement(D3MF::XmlTag::model)) {
+ nodeName = xmlReader->getNodeName();
+ if( nodeName == D3MF::XmlTag::object) {
children.push_back(ReadObject(scene));
- }
- else if(xmlReader->getNodeName() == D3MF::XmlTag::build)
- {
-
+ } else if( nodeName == D3MF::XmlTag::build) {
+ //
+ } else if ( nodeName == D3MF::XmlTag::basematerials ) {
+ ReadBaseMaterials();
+ } else if ( nodeName == D3MF::XmlTag::meta ) {
+ ReadMetadata();
}
}
- if(scene->mRootNode->mName.length == 0)
- scene->mRootNode->mName.Set("3MF");
+ if ( scene->mRootNode->mName.length == 0 ) {
+ scene->mRootNode->mName.Set( "3MF" );
+ }
+ // import the metadata
+ if ( !mMetaData.empty() ) {
+ const size_t numMeta( mMetaData.size() );
+ scene->mMetaData = aiMetadata::Alloc(static_cast<unsigned int>( numMeta ) );
+ for ( size_t i = 0; i < numMeta; ++i ) {
+ aiString val( mMetaData[ i ].value );
+ scene->mMetaData->Set(static_cast<unsigned int>( i ), mMetaData[ i ].name, val );
+ }
+ }
- scene->mNumMeshes = static_cast<unsigned int>(meshes.size());
+ // import the meshes
+ scene->mNumMeshes = static_cast<unsigned int>( mMeshes.size());
scene->mMeshes = new aiMesh*[scene->mNumMeshes]();
+ std::copy( mMeshes.begin(), mMeshes.end(), scene->mMeshes);
- std::copy(meshes.begin(), meshes.end(), scene->mMeshes);
+ // import the materials
+ scene->mNumMaterials = static_cast<unsigned int>( mMatArray.size() );
+ if ( 0 != scene->mNumMaterials ) {
+ scene->mMaterials = new aiMaterial*[ scene->mNumMaterials ];
+ std::copy( mMatArray.begin(), mMatArray.end(), scene->mMaterials );
+ }
+ // create the scenegraph
scene->mRootNode->mNumChildren = static_cast<unsigned int>(children.size());
scene->mRootNode->mChildren = new aiNode*[scene->mRootNode->mNumChildren]();
-
std::copy(children.begin(), children.end(), scene->mRootNode->mChildren);
-
}
private:
- aiNode* ReadObject(aiScene* scene)
- {
- ScopeGuard<aiNode> node(new aiNode());
+ aiNode* ReadObject(aiScene* scene) {
+ std::unique_ptr<aiNode> node(new aiNode());
std::vector<unsigned long> meshIds;
const char *attrib( nullptr );
std::string name, type;
- attrib = xmlReader->getAttributeValue( D3MF::XmlTag::name.c_str() );
+ attrib = xmlReader->getAttributeValue( D3MF::XmlTag::id.c_str() );
if ( nullptr != attrib ) {
name = attrib;
}
- attrib = xmlReader->getAttributeValue( D3MF::XmlTag::name.c_str() );
+ attrib = xmlReader->getAttributeValue( D3MF::XmlTag::type.c_str() );
if ( nullptr != attrib ) {
type = attrib;
}
@@ -156,19 +160,16 @@ private:
node->mParent = scene->mRootNode;
node->mName.Set(name);
- size_t meshIdx = meshes.size();
+ size_t meshIdx = mMeshes.size();
- while(ReadToEndElement(D3MF::XmlTag::object))
- {
- if(xmlReader->getNodeName() == D3MF::XmlTag::mesh)
- {
+ while(ReadToEndElement(D3MF::XmlTag::object)) {
+ if(xmlReader->getNodeName() == D3MF::XmlTag::mesh) {
auto mesh = ReadMesh();
mesh->mName.Set(name);
- meshes.push_back(mesh);
+ mMeshes.push_back(mesh);
meshIds.push_back(static_cast<unsigned long>(meshIdx));
- meshIdx++;
-
+ ++meshIdx;
}
}
@@ -178,39 +179,41 @@ private:
std::copy(meshIds.begin(), meshIds.end(), node->mMeshes);
- return node.dismiss();
-
+ return node.release();
}
- aiMesh* ReadMesh()
- {
+ aiMesh *ReadMesh() {
aiMesh* mesh = new aiMesh();
-
- while(ReadToEndElement(D3MF::XmlTag::mesh))
- {
- if(xmlReader->getNodeName() == D3MF::XmlTag::vertices)
- {
+ while(ReadToEndElement(D3MF::XmlTag::mesh)) {
+ if(xmlReader->getNodeName() == D3MF::XmlTag::vertices) {
ImportVertices(mesh);
- }
- else if(xmlReader->getNodeName() == D3MF::XmlTag::triangles)
- {
+ } else if(xmlReader->getNodeName() == D3MF::XmlTag::triangles) {
ImportTriangles(mesh);
}
-
}
-
return mesh;
}
- void ImportVertices(aiMesh* mesh)
- {
- std::vector<aiVector3D> vertices;
+ void ReadMetadata() {
+ const std::string name = xmlReader->getAttributeValue( D3MF::XmlTag::meta_name.c_str() );
+ xmlReader->read();
+ const std::string value = xmlReader->getNodeData();
- while(ReadToEndElement(D3MF::XmlTag::vertices))
- {
- if(xmlReader->getNodeName() == D3MF::XmlTag::vertex)
- {
+ if ( name.empty() ) {
+ return;
+ }
+
+ MetaEntry entry;
+ entry.name = name;
+ entry.value = value;
+ mMetaData.push_back( entry );
+ }
+
+ void ImportVertices(aiMesh* mesh) {
+ std::vector<aiVector3D> vertices;
+ while(ReadToEndElement(D3MF::XmlTag::vertices)) {
+ if(xmlReader->getNodeName() == D3MF::XmlTag::vertex) {
vertices.push_back(ReadVertex());
}
}
@@ -218,10 +221,9 @@ private:
mesh->mVertices = new aiVector3D[mesh->mNumVertices];
std::copy(vertices.begin(), vertices.end(), mesh->mVertices);
-
}
- aiVector3D ReadVertex()
- {
+
+ aiVector3D ReadVertex() {
aiVector3D vertex;
vertex.x = ai_strtof(xmlReader->getAttributeValue(D3MF::XmlTag::x.c_str()), nullptr);
@@ -231,16 +233,18 @@ private:
return vertex;
}
- void ImportTriangles(aiMesh* mesh)
- {
+ void ImportTriangles(aiMesh* mesh) {
std::vector<aiFace> faces;
-
- while(ReadToEndElement(D3MF::XmlTag::triangles))
- {
- if(xmlReader->getNodeName() == D3MF::XmlTag::triangle)
- {
+ while(ReadToEndElement(D3MF::XmlTag::triangles)) {
+ const std::string nodeName( xmlReader->getNodeName() );
+ if(xmlReader->getNodeName() == D3MF::XmlTag::triangle) {
faces.push_back(ReadTriangle());
+ const char *pidToken( xmlReader->getAttributeValue( D3MF::XmlTag::p1.c_str() ) );
+ if ( nullptr != pidToken ) {
+ int matIdx( std::atoi( pidToken ) );
+ mesh->mMaterialIndex = matIdx;
+ }
}
}
@@ -251,8 +255,7 @@ private:
std::copy(faces.begin(), faces.end(), mesh->mFaces);
}
- aiFace ReadTriangle()
- {
+ aiFace ReadTriangle() {
aiFace face;
face.mNumIndices = 3;
@@ -264,52 +267,158 @@ private:
return face;
}
-private:
+ void ReadBaseMaterials() {
+ std::vector<unsigned int> MatIdArray;
+ const char *baseMaterialId( xmlReader->getAttributeValue( D3MF::XmlTag::basematerials_id.c_str() ) );
+ if ( nullptr != baseMaterialId ) {
+ unsigned int id = std::atoi( baseMaterialId );
+ const size_t newMatIdx( mMatArray.size() );
+ if ( id != mActiveMatGroup ) {
+ mActiveMatGroup = id;
+ MatId2MatArray::const_iterator it( mMatId2MatArray.find( id ) );
+ if ( mMatId2MatArray.end() == it ) {
+ MatIdArray.clear();
+ mMatId2MatArray[ id ] = MatIdArray;
+ } else {
+ MatIdArray = it->second;
+ }
+ }
+ MatIdArray.push_back( static_cast<unsigned int>( newMatIdx ) );
+ mMatId2MatArray[ mActiveMatGroup ] = MatIdArray;
+ }
- bool ReadToStartElement(const std::string& startTag)
- {
- while(xmlReader->read())
- {
- if (xmlReader->getNodeType() == irr::io::EXN_ELEMENT && xmlReader->getNodeName() == startTag)
- {
- return true;
+ while ( ReadToEndElement( D3MF::XmlTag::basematerials ) ) {
+ mMatArray.push_back( readMaterialDef() );
+ }
+ }
+
+ bool parseColor( const char *color, aiColor4D &diffuse ) {
+ if ( nullptr == color ) {
+ return false;
+ }
+
+ //format of the color string: #RRGGBBAA or #RRGGBB (3MF Core chapter 5.1.1)
+ const size_t len( strlen( color ) );
+ if ( 9 != len && 7 != len) {
+ return false;
+ }
+
+ const char *buf( color );
+ if ( '#' != *buf ) {
+ return false;
+ }
+ ++buf;
+ char comp[ 3 ] = { 0,0,'\0' };
+
+ comp[ 0 ] = *buf;
+ ++buf;
+ comp[ 1 ] = *buf;
+ ++buf;
+ diffuse.r = static_cast<ai_real>( strtol( comp, NULL, 16 ) ) / ai_real(255.0);
+
+
+ comp[ 0 ] = *buf;
+ ++buf;
+ comp[ 1 ] = *buf;
+ ++buf;
+ diffuse.g = static_cast< ai_real >( strtol( comp, NULL, 16 ) ) / ai_real(255.0);
+
+ comp[ 0 ] = *buf;
+ ++buf;
+ comp[ 1 ] = *buf;
+ ++buf;
+ diffuse.b = static_cast< ai_real >( strtol( comp, NULL, 16 ) ) / ai_real(255.0);
+
+ if(7 == len)
+ return true;
+ comp[ 0 ] = *buf;
+ ++buf;
+ comp[ 1 ] = *buf;
+ ++buf;
+ diffuse.a = static_cast< ai_real >( strtol( comp, NULL, 16 ) ) / ai_real(255.0);
+
+ return true;
+ }
+
+ void assignDiffuseColor( aiMaterial *mat ) {
+ const char *color = xmlReader->getAttributeValue( D3MF::XmlTag::basematerials_displaycolor.c_str() );
+ aiColor4D diffuse;
+ if ( parseColor( color, diffuse ) ) {
+ mat->AddProperty<aiColor4D>( &diffuse, 1, AI_MATKEY_COLOR_DIFFUSE );
+ }
+
+ }
+ aiMaterial *readMaterialDef() {
+ aiMaterial *mat( nullptr );
+ const char *name( nullptr );
+ const std::string nodeName( xmlReader->getNodeName() );
+ if ( nodeName == D3MF::XmlTag::basematerials_base ) {
+ name = xmlReader->getAttributeValue( D3MF::XmlTag::basematerials_name.c_str() );
+ std::string stdMatName;
+ aiString matName;
+ std::string strId( to_string( mActiveMatGroup ) );
+ stdMatName += "id";
+ stdMatName += strId;
+ stdMatName += "_";
+ if ( nullptr != name ) {
+ stdMatName += std::string( name );
+ } else {
+ stdMatName += "basemat";
}
- else if (xmlReader->getNodeType() == irr::io::EXN_ELEMENT_END &&
- xmlReader->getNodeName() == startTag)
- {
+ matName.Set( stdMatName );
+
+ mat = new aiMaterial;
+ mat->AddProperty( &matName, AI_MATKEY_NAME );
+
+ assignDiffuseColor( mat );
+ }
+
+ return mat;
+ }
+
+private:
+ bool ReadToStartElement(const std::string& startTag) {
+ while(xmlReader->read()) {
+ const std::string &nodeName( xmlReader->getNodeName() );
+ if (xmlReader->getNodeType() == irr::io::EXN_ELEMENT && nodeName == startTag) {
+ return true;
+ } else if (xmlReader->getNodeType() == irr::io::EXN_ELEMENT_END && nodeName == startTag) {
return false;
}
}
- //DefaultLogger::get()->error("unexpected EOF, expected closing <" + closeTag + "> tag");
+
return false;
}
- bool ReadToEndElement(const std::string& closeTag)
- {
- while(xmlReader->read())
- {
+ bool ReadToEndElement(const std::string& closeTag) {
+ while(xmlReader->read()) {
+ const std::string &nodeName( xmlReader->getNodeName() );
if (xmlReader->getNodeType() == irr::io::EXN_ELEMENT) {
return true;
- }
- else if (xmlReader->getNodeType() == irr::io::EXN_ELEMENT_END
- && xmlReader->getNodeName() == closeTag)
- {
+ } else if (xmlReader->getNodeType() == irr::io::EXN_ELEMENT_END && nodeName == closeTag) {
return false;
}
}
- DefaultLogger::get()->error("unexpected EOF, expected closing <" + closeTag + "> tag");
+ ASSIMP_LOG_ERROR("unexpected EOF, expected closing <" + closeTag + "> tag");
+
return false;
}
-
private:
- std::vector<aiMesh*> meshes;
+ struct MetaEntry {
+ std::string name;
+ std::string value;
+ };
+ std::vector<MetaEntry> mMetaData;
+ std::vector<aiMesh*> mMeshes;
+ MatArray mMatArray;
+ unsigned int mActiveMatGroup;
+ MatId2MatArray mMatId2MatArray;
XmlReader* xmlReader;
};
} //namespace D3MF
-
static const aiImporterDesc desc = {
"3mf Importer",
"",
@@ -323,44 +432,43 @@ static const aiImporterDesc desc = {
"3mf"
};
-
D3MFImporter::D3MFImporter()
-{
-
+: BaseImporter() {
+ // empty
}
-D3MFImporter::~D3MFImporter()
-{
-
+D3MFImporter::~D3MFImporter() {
+ // empty
}
-bool D3MFImporter::CanRead(const std::string &pFile, IOSystem *pIOHandler, bool checkSig) const
-{
- const std::string extension = GetExtension(pFile);
- if(extension == "3mf") {
+bool D3MFImporter::CanRead(const std::string &filename, IOSystem *pIOHandler, bool checkSig) const {
+ const std::string extension( GetExtension( filename ) );
+ if(extension == desc.mFileExtensions ) {
return true;
} else if ( !extension.length() || checkSig ) {
- if (nullptr == pIOHandler ) {
- return true;
+ if ( nullptr == pIOHandler ) {
+ return false;
}
+ if ( !D3MF::D3MFOpcPackage::isZipArchive( pIOHandler, filename ) ) {
+ return false;
+ }
+ D3MF::D3MFOpcPackage opcPackage( pIOHandler, filename );
+ return opcPackage.validate();
}
return false;
}
-void D3MFImporter::SetupProperties(const Importer *pImp)
-{
-
+void D3MFImporter::SetupProperties(const Importer * /*pImp*/) {
+ // empty
}
-const aiImporterDesc *D3MFImporter::GetInfo() const
-{
+const aiImporterDesc *D3MFImporter::GetInfo() const {
return &desc;
}
-void D3MFImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSystem *pIOHandler)
-{
- D3MF::D3MFOpcPackage opcPackage(pIOHandler, pFile);
+void D3MFImporter::InternReadFile( const std::string &filename, aiScene *pScene, IOSystem *pIOHandler ) {
+ D3MF::D3MFOpcPackage opcPackage(pIOHandler, filename);
std::unique_ptr<CIrrXML_IOStreamReader> xmlStream(new CIrrXML_IOStreamReader(opcPackage.RootStream()));
std::unique_ptr<D3MF::XmlReader> xmlReader(irr::io::createIrrXMLReader(xmlStream.get()));
diff --git a/code/D3MFImporter.h b/code/D3MFImporter.h
index fb65d8606..701d056e2 100644
--- a/code/D3MFImporter.h
+++ b/code/D3MFImporter.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -42,25 +43,23 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_D3MFLOADER_H_INCLUDED
#define AI_D3MFLOADER_H_INCLUDED
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
namespace Assimp {
-class D3MFImporter : public BaseImporter
-{
+class D3MFImporter : public BaseImporter {
public:
+ // BaseImporter interface
D3MFImporter();
~D3MFImporter();
-
- // BaseImporter interface
-public:
bool CanRead(const std::string &pFile, IOSystem *pIOHandler, bool checkSig) const;
void SetupProperties(const Importer *pImp);
const aiImporterDesc *GetInfo() const;
protected:
void InternReadFile(const std::string &pFile, aiScene *pScene, IOSystem *pIOHandler);
-
};
-}
+
+} // Namespace Assimp
+
#endif // AI_D3MFLOADER_H_INCLUDED
diff --git a/code/D3MFOpcPackage.cpp b/code/D3MFOpcPackage.cpp
index 562b891be..8161a31e4 100644
--- a/code/D3MFOpcPackage.cpp
+++ b/code/D3MFOpcPackage.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -42,61 +43,36 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_NO_3MF_IMPORTER
#include "D3MFOpcPackage.h"
-#include "Exceptional.h"
+#include <assimp/Exceptional.h>
#include <assimp/IOStream.hpp>
#include <assimp/IOSystem.hpp>
#include <assimp/DefaultLogger.hpp>
#include <assimp/ai_assert.h>
+#include <cstdlib>
#include <memory>
#include <vector>
#include <map>
#include <algorithm>
#include <cassert>
-
-#include <contrib/unzip/unzip.h>
+#include <unzip.h>
+#include "3MFXmlTags.h"
namespace Assimp {
namespace D3MF {
-namespace XmlTag {
- static const std::string CONTENT_TYPES_ARCHIVE = "[Content_Types].xml";
- static const std::string ROOT_RELATIONSHIPS_ARCHIVE = "_rels/.rels";
- static const std::string SCHEMA_CONTENTTYPES = "http://schemas.openxmlformats.org/package/2006/content-types";
- static const std::string SCHEMA_RELATIONSHIPS = "http://schemas.openxmlformats.org/package/2006/relationships";
- static const std::string RELS_RELATIONSHIP_CONTAINER = "Relationships";
- static const std::string RELS_RELATIONSHIP_NODE = "Relationship";
- static const std::string RELS_ATTRIB_TARGET = "Target";
- static const std::string RELS_ATTRIB_TYPE = "Type";
- static const std::string RELS_ATTRIB_ID = "Id";
- static const std::string PACKAGE_START_PART_RELATIONSHIP_TYPE = "http://schemas.microsoft.com/3dmanufacturing/2013/01/3dmodel";
- static const std::string PACKAGE_PRINT_TICKET_RELATIONSHIP_TYPE = "http://schemas.microsoft.com/3dmanufacturing/2013/01/printticket";
- static const std::string PACKAGE_TEXTURE_RELATIONSHIP_TYPE = "http://schemas.microsoft.com/3dmanufacturing/2013/01/3dtexture";
- static const std::string PACKAGE_CORE_PROPERTIES_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties";
- static const std::string PACKAGE_THUMBNAIL_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail";
-}
-
class IOSystem2Unzip {
-
- public:
-
- static voidpf open(voidpf opaque, const char* filename, int mode);
-
- static uLong read(voidpf opaque, voidpf stream, void* buf, uLong size);
-
- static uLong write(voidpf opaque, voidpf stream, const void* buf, uLong size);
-
- static long tell(voidpf opaque, voidpf stream);
-
- static long seek(voidpf opaque, voidpf stream, uLong offset, int origin);
-
- static int close(voidpf opaque, voidpf stream);
-
- static int testerror(voidpf opaque, voidpf stream);
-
- static zlib_filefunc_def get(IOSystem* pIOHandler);
+public:
+ static voidpf open(voidpf opaque, const char* filename, int mode);
+ static uLong read(voidpf opaque, voidpf stream, void* buf, uLong size);
+ static uLong write(voidpf opaque, voidpf stream, const void* buf, uLong size);
+ static long tell(voidpf opaque, voidpf stream);
+ static long seek(voidpf opaque, voidpf stream, uLong offset, int origin);
+ static int close(voidpf opaque, voidpf stream);
+ static int testerror(voidpf opaque, voidpf stream);
+ static zlib_filefunc_def get(IOSystem* pIOHandler);
};
voidpf IOSystem2Unzip::open(voidpf opaque, const char* filename, int mode) {
@@ -115,7 +91,6 @@ voidpf IOSystem2Unzip::open(voidpf opaque, const char* filename, int mode) {
}
}
-
return (voidpf) io_system->Open(filename, mode_fopen);
}
@@ -185,58 +160,51 @@ zlib_filefunc_def IOSystem2Unzip::get(IOSystem* pIOHandler) {
return mapping;
}
-
-class ZipFile : public IOStream
-{
+class ZipFile : public IOStream {
friend class D3MFZipArchive;
public:
explicit ZipFile(size_t size);
-
- ~ZipFile();
-
+ virtual ~ZipFile();
size_t Read(void* pvBuffer, size_t pSize, size_t pCount );
-
size_t Write(const void* /*pvBuffer*/, size_t /*pSize*/, size_t /*pCount*/);
-
size_t FileSize() const;
-
aiReturn Seek(size_t /*pOffset*/, aiOrigin /*pOrigin*/);
-
size_t Tell() const;
-
void Flush();
private:
-
- void* m_Buffer;
-
+ void *m_Buffer;
size_t m_Size;
-
};
-ZipFile::ZipFile(size_t size) : m_Size(size) {
+ZipFile::ZipFile(size_t size)
+: m_Buffer( nullptr )
+, m_Size(size) {
ai_assert(m_Size != 0);
-
- m_Buffer = malloc(m_Size);
+ m_Buffer = ::malloc(m_Size);
}
ZipFile::~ZipFile() {
- free(m_Buffer);
+ ::free(m_Buffer);
m_Buffer = NULL;
}
size_t ZipFile::Read(void* pvBuffer, size_t pSize, size_t pCount) {
const size_t size = pSize * pCount;
- assert(size <= m_Size);
+ ai_assert(size <= m_Size);
std::memcpy(pvBuffer, m_Buffer, size);
return size;
}
-size_t ZipFile::Write(const void* /*pvBuffer*/, size_t /*pSize*/, size_t /*pCount*/) {
- return 0;
+size_t ZipFile::Write(const void* pvBuffer, size_t size, size_t pCount ) {
+ const size_t size_to_write( size * pCount );
+ if ( 0 == size_to_write ) {
+ return 0U;
+ }
+ return 0U;
}
size_t ZipFile::FileSize() const {
@@ -255,56 +223,37 @@ void ZipFile::Flush() {
// empty
}
-
-class D3MFZipArchive : public IOSystem
-{
+class D3MFZipArchive : public IOSystem {
public:
-
static const unsigned int FileNameSize = 256;
-public:
-
D3MFZipArchive(IOSystem* pIOHandler, const std::string & rFile);
-
~D3MFZipArchive();
-
bool Exists(const char* pFile) const;
-
char getOsSeparator() const;
-
IOStream* Open(const char* pFile, const char* pMode = "rb");
-
void Close(IOStream* pFile);
-
bool isOpen() const;
-
void getFileList(std::vector<std::string> &rFileList);
private:
-
bool mapArchive();
private:
-
unzFile m_ZipFileHandle;
-
std::map<std::string, ZipFile*> m_ArchiveMap;
-
};
-
// ------------------------------------------------------------------------------------------------
// Constructor.
D3MFZipArchive::D3MFZipArchive(IOSystem* pIOHandler, const std::string& rFile)
- : m_ZipFileHandle(NULL), m_ArchiveMap()
-{
- if (! rFile.empty())
- {
+: m_ZipFileHandle( nullptr )
+, m_ArchiveMap() {
+ if (! rFile.empty()) {
zlib_filefunc_def mapping = IOSystem2Unzip::get(pIOHandler);
m_ZipFileHandle = unzOpen2(rFile.c_str(), &mapping);
-
- if(m_ZipFileHandle != NULL) {
+ if(m_ZipFileHandle != nullptr ) {
mapArchive();
}
}
@@ -318,32 +267,32 @@ D3MFZipArchive::~D3MFZipArchive() {
}
m_ArchiveMap.clear();
- if(m_ZipFileHandle != NULL) {
+ if(m_ZipFileHandle != nullptr) {
unzClose(m_ZipFileHandle);
- m_ZipFileHandle = NULL;
+ m_ZipFileHandle = nullptr;
}
}
// ------------------------------------------------------------------------------------------------
// Returns true, if the archive is already open.
bool D3MFZipArchive::isOpen() const {
- return (m_ZipFileHandle != NULL);
+ return (m_ZipFileHandle != nullptr );
}
// ------------------------------------------------------------------------------------------------
// Returns true, if the filename is part of the archive.
bool D3MFZipArchive::Exists(const char* pFile) const {
- ai_assert(pFile != NULL);
-
- bool exist = false;
+ ai_assert(pFile != nullptr );
- if (pFile != NULL) {
- std::string rFile(pFile);
- std::map<std::string, ZipFile*>::const_iterator it = m_ArchiveMap.find(rFile);
+ if ( pFile == nullptr ) {
+ return false;
+ }
- if(it != m_ArchiveMap.end()) {
- exist = true;
- }
+ std::string filename(pFile);
+ std::map<std::string, ZipFile*>::const_iterator it = m_ArchiveMap.find(filename);
+ bool exist( false );
+ if(it != m_ArchiveMap.end()) {
+ exist = true;
}
return exist;
@@ -378,6 +327,7 @@ IOStream *D3MFZipArchive::Open(const char* pFile, const char* /*pMode*/) {
// ------------------------------------------------------------------------------------------------
// Close a filestream.
void D3MFZipArchive::Close(IOStream *pFile) {
+ (void)(pFile);
ai_assert(pFile != NULL);
// We don't do anything in case the file would be opened again in the future
@@ -432,24 +382,12 @@ bool D3MFZipArchive::mapArchive() {
// ------------------------------------------------------------------------------------------------
-struct OpcPackageRelationship
-{
- std::string id;
- std::string type;
- std::string target;
-};
-
typedef std::shared_ptr<OpcPackageRelationship> OpcPackageRelationshipPtr;
-class OpcPackageRelationshipReader
-{
+class OpcPackageRelationshipReader {
public:
-
- OpcPackageRelationshipReader(XmlReader* xmlReader)
- {
-
- while(xmlReader->read())
- {
+ OpcPackageRelationshipReader(XmlReader* xmlReader) {
+ while(xmlReader->read()) {
if(xmlReader->getNodeType() == irr::io::EXN_ELEMENT &&
xmlReader->getNodeName() == XmlTag::RELS_RELATIONSHIP_CONTAINER)
{
@@ -472,111 +410,122 @@ public:
}
}
- void ParseAttributes(XmlReader*)
- {
+ void ParseAttributes(XmlReader*) {
+ // empty
+ }
+ bool validateRels( OpcPackageRelationshipPtr &relPtr ) {
+ if ( relPtr->id.empty() || relPtr->type.empty() || relPtr->target.empty() ) {
+ return false;
+ }
+ return true;
}
- void ParseChildNode(XmlReader* xmlReader)
- {
+ void ParseChildNode(XmlReader* xmlReader) {
OpcPackageRelationshipPtr relPtr(new OpcPackageRelationship());
- relPtr->id = xmlReader->getAttributeValue(XmlTag::RELS_ATTRIB_ID.c_str());
- relPtr->type = xmlReader->getAttributeValue(XmlTag::RELS_ATTRIB_TYPE.c_str());
- relPtr->target = xmlReader->getAttributeValue(XmlTag::RELS_ATTRIB_TARGET.c_str());
-
- m_relationShips.push_back(relPtr);
+ relPtr->id = xmlReader->getAttributeValueSafe(XmlTag::RELS_ATTRIB_ID.c_str());
+ relPtr->type = xmlReader->getAttributeValueSafe(XmlTag::RELS_ATTRIB_TYPE.c_str());
+ relPtr->target = xmlReader->getAttributeValueSafe(XmlTag::RELS_ATTRIB_TARGET.c_str());
+ if ( validateRels( relPtr ) ) {
+ m_relationShips.push_back( relPtr );
+ }
}
+
std::vector<OpcPackageRelationshipPtr> m_relationShips;
};
-// ------------------------------------------------------------------------------------------------
+// ------------------------------------------------------------------------------------------------
D3MFOpcPackage::D3MFOpcPackage(IOSystem* pIOHandler, const std::string& rFile)
- : m_RootStream(nullptr)
-{
- zipArchive.reset(new D3MF::D3MFZipArchive( pIOHandler, rFile ));
- if(!zipArchive->isOpen()) {
+: mRootStream(nullptr)
+, mZipArchive() {
+ mZipArchive.reset( new D3MF::D3MFZipArchive( pIOHandler, rFile ) );
+ if(!mZipArchive->isOpen()) {
throw DeadlyImportError("Failed to open file " + rFile+ ".");
}
std::vector<std::string> fileList;
- zipArchive->getFileList(fileList);
+ mZipArchive->getFileList(fileList);
- for(auto& file: fileList){
+ for (auto& file: fileList) {
if(file == D3MF::XmlTag::ROOT_RELATIONSHIPS_ARCHIVE) {
//PkgRelationshipReader pkgRelReader(file, archive);
- ai_assert(zipArchive->Exists(file.c_str()));
+ ai_assert(mZipArchive->Exists(file.c_str()));
- IOStream *fileStream = zipArchive->Open(file.c_str());
+ IOStream *fileStream = mZipArchive->Open(file.c_str());
ai_assert(fileStream != nullptr);
std::string rootFile = ReadPackageRootRelationship(fileStream);
- if(rootFile.size() > 0 && rootFile[0] == '/')
- rootFile = rootFile.substr(1);
-
- DefaultLogger::get()->debug(rootFile);
-
- m_RootStream = zipArchive->Open(rootFile.c_str());
-
- ai_assert(m_RootStream != nullptr);
-
+ if ( rootFile.size() > 0 && rootFile[ 0 ] == '/' ) {
+ rootFile = rootFile.substr( 1 );
+ if ( rootFile[ 0 ] == '/' ) {
+ // deal with zip-bug
+ rootFile = rootFile.substr( 1 );
+ }
+ }
+ ASSIMP_LOG_DEBUG(rootFile);
+ mRootStream = mZipArchive->Open(rootFile.c_str());
+ ai_assert( mRootStream != nullptr );
+ if ( nullptr == mRootStream ) {
+ throw DeadlyExportError( "Cannot open root-file in archive : " + rootFile );
+ }
- // const size_t size = zipArchive->FileSize();
- // m_Data.resize( size );
+ mZipArchive->Close( fileStream );
- // const size_t readSize = pMapFile->Read( &m_Data[0], sizeof( char ), size );
- // if ( readSize != size )
- // {
- // m_Data.clear();
- // return false;
- // }
- zipArchive->Close( fileStream );
-
- }
- else if( file == D3MF::XmlTag::CONTENT_TYPES_ARCHIVE)
- {
+ } else if( file == D3MF::XmlTag::CONTENT_TYPES_ARCHIVE) {
}
}
}
-D3MFOpcPackage::~D3MFOpcPackage()
-{
+D3MFOpcPackage::~D3MFOpcPackage() {
+ // empty
+}
+IOStream* D3MFOpcPackage::RootStream() const {
+ return mRootStream;
}
-IOStream* D3MFOpcPackage::RootStream() const
-{
- return m_RootStream;
+static const std::string ModelRef = "3D/3dmodel.model";
+
+bool D3MFOpcPackage::validate() {
+ if ( nullptr == mRootStream || nullptr == mZipArchive ) {
+ return false;
+ }
+
+ return mZipArchive->Exists( ModelRef.c_str() );
}
+bool D3MFOpcPackage::isZipArchive( IOSystem* pIOHandler, const std::string& rFile ) {
+ D3MF::D3MFZipArchive ar( pIOHandler, rFile );
+ if ( !ar.isOpen() ) {
+ return false;
+ }
-std::string D3MFOpcPackage::ReadPackageRootRelationship(IOStream* stream)
-{
+ return true;
+}
+std::string D3MFOpcPackage::ReadPackageRootRelationship(IOStream* stream) {
std::unique_ptr<CIrrXML_IOStreamReader> xmlStream(new CIrrXML_IOStreamReader(stream));
std::unique_ptr<XmlReader> xml(irr::io::createIrrXMLReader(xmlStream.get()));
OpcPackageRelationshipReader reader(xml.get());
-
auto itr = std::find_if(reader.m_relationShips.begin(), reader.m_relationShips.end(), [](const OpcPackageRelationshipPtr& rel){
return rel->type == XmlTag::PACKAGE_START_PART_RELATIONSHIP_TYPE;
});
-
-
- if(itr == reader.m_relationShips.end())
- throw DeadlyImportError("Cannot find" + XmlTag::PACKAGE_START_PART_RELATIONSHIP_TYPE);
+ if ( itr == reader.m_relationShips.end() ) {
+ throw DeadlyImportError( "Cannot find " + XmlTag::PACKAGE_START_PART_RELATIONSHIP_TYPE );
+ }
return (*itr)->target;
}
-} //namespace D3MF
-
-}
+} // Namespace D3MF
+} // Namespace Assimp
#endif //ASSIMP_BUILD_NO_3MF_IMPORTER
diff --git a/code/D3MFOpcPackage.h b/code/D3MFOpcPackage.h
index e46eb7636..6d7b3d478 100644
--- a/code/D3MFOpcPackage.h
+++ b/code/D3MFOpcPackage.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -45,32 +46,39 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <memory>
#include <assimp/IOSystem.hpp>
-#include "irrXMLWrapper.h"
+#include <assimp/irrXMLWrapper.h>
namespace Assimp {
-
namespace D3MF {
-typedef irr::io::IrrXMLReader XmlReader;
-typedef std::shared_ptr<XmlReader> XmlReaderPtr;
+using XmlReader = irr::io::IrrXMLReader ;
+using XmlReaderPtr = std::shared_ptr<XmlReader> ;
+
+struct OpcPackageRelationship {
+ std::string id;
+ std::string type;
+ std::string target;
+};
class D3MFZipArchive;
-class D3MFOpcPackage
-{
+class D3MFOpcPackage {
public:
- D3MFOpcPackage(IOSystem* pIOHandler, const std::string& rFile);
+ D3MFOpcPackage( IOSystem* pIOHandler, const std::string& rFile );
~D3MFOpcPackage();
-
IOStream* RootStream() const;
-private:
+ bool validate();
+ static bool isZipArchive( IOSystem* pIOHandler, const std::string& rFile );
+
+protected:
std::string ReadPackageRootRelationship(IOStream* stream);
+
private:
- IOStream* m_RootStream;
- std::unique_ptr<D3MFZipArchive> zipArchive;
+ IOStream* mRootStream;
+ std::unique_ptr<D3MFZipArchive> mZipArchive;
};
-}
-}
+} // Namespace D3MF
+} // Namespace Assimp
#endif // D3MFOPCPACKAGE_H
diff --git a/code/DXFHelper.h b/code/DXFHelper.h
index e16b7f1aa..daf2f97e2 100644
--- a/code/DXFHelper.h
+++ b/code/DXFHelper.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -46,36 +47,29 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef INCLUDED_DXFHELPER_H
#define INCLUDED_DXFHELPER_H
-#include "LineSplitter.h"
-#include "TinyFormatter.h"
-#include "StreamReader.h"
-#include "fast_atof.h"
+#include <assimp/LineSplitter.h>
+#include <assimp/TinyFormatter.h>
+#include <assimp/StreamReader.h>
+#include <assimp/fast_atof.h>
#include <vector>
#include <assimp/DefaultLogger.hpp>
namespace Assimp {
- namespace DXF {
-
+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
-{
-
+// do NOT skip empty lines. In DXF files, they count as valid data.
+class LineReader {
public:
-
LineReader(StreamReaderLE& reader)
- // do NOT skip empty lines. In DXF files, they count as valid data.
- : splitter(reader,false,true)
- , groupcode( 0 )
- , value()
- , end()
- {
+ : splitter(reader,false,true)
+ , groupcode( 0 )
+ , value()
+ , end() {
+ // empty
}
-public:
-
-
// -----------------------------------------
bool Is(int gc, const char* what) const {
return groupcode == gc && !strcmp(what,value.c_str());
@@ -101,8 +95,6 @@ public:
return !((bool)*this);
}
-public:
-
// -----------------------------------------
unsigned int ValueAsUnsignedInt() const {
return strtoul10(value.c_str());
@@ -118,8 +110,6 @@ public:
return fast_atof(value.c_str());
}
-public:
-
// -----------------------------------------
/** pseudo-iterator increment to advance to the next (groupcode/value) pair */
LineReader& operator++() {
@@ -145,7 +135,7 @@ public:
for(;splitter->length() && splitter->at(0) != '}'; splitter++, cnt++);
splitter++;
- DefaultLogger::get()->debug((Formatter::format("DXF: skipped over control group ("),cnt," lines)"));
+ ASSIMP_LOG_DEBUG((Formatter::format("DXF: skipped over control group ("),cnt," lines)"));
}
} catch(std::logic_error&) {
ai_assert(!splitter);
@@ -168,21 +158,18 @@ public:
}
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
-{
+struct PolyLine {
PolyLine()
- : flags()
- {}
+ : flags() {
+ // empty
+ }
std::vector<aiVector3D> positions;
std::vector<aiColor4D> colors;
@@ -194,14 +181,15 @@ struct PolyLine
std::string desc;
};
-
// reference to a BLOCK. Specifies its own coordinate system.
-struct InsertBlock
-{
+struct InsertBlock {
InsertBlock()
- : scale(1.f,1.f,1.f)
- , angle()
- {}
+ : pos()
+ , scale(1.f,1.f,1.f)
+ , angle()
+ , name() {
+ // empty
+ }
aiVector3D pos;
aiVector3D scale;
@@ -228,9 +216,7 @@ struct FileData
std::vector<Block> blocks;
};
+}
+} // Namespace Assimp
-
-
-
-}}
#endif
diff --git a/code/DXFLoader.cpp b/code/DXFLoader.cpp
index 1e932e509..6710597df 100644
--- a/code/DXFLoader.cpp
+++ b/code/DXFLoader.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -48,9 +49,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_NO_DXF_IMPORTER
#include "DXFLoader.h"
-#include "ParsingUtils.h"
+#include <assimp/ParsingUtils.h>
#include "ConvertToLHProcess.h"
-#include "fast_atof.h"
+#include <assimp/fast_atof.h>
#include "DXFHelper.h"
#include <assimp/IOSystem.hpp>
@@ -62,16 +63,15 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using namespace Assimp;
// AutoCAD Binary DXF<CR><LF><SUB><NULL>
-#define AI_DXF_BINARY_IDENT ("AutoCAD Binary DXF\r\n\x1a\0")
-#define AI_DXF_BINARY_IDENT_LEN (24)
+const std::string AI_DXF_BINARY_IDENT = std::string("AutoCAD Binary DXF\r\n\x1a\0");
+const size_t AI_DXF_BINARY_IDENT_LEN = 24u;
// default vertex color that all uncolored vertices will receive
-#define AI_DXF_DEFAULT_COLOR aiColor4D(0.6f,0.6f,0.6f,0.6f)
+const aiColor4D 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 (1.0f, 0.0f, 0.0f, 1.0f), // red
aiColor4D (0.0f, 1.0f, 0.0f, 1.0f), // green
@@ -92,6 +92,10 @@ static aiColor4D g_aclrDxfIndexColors[] =
#define AI_DXF_NUM_INDEX_COLORS (sizeof(g_aclrDxfIndexColors)/sizeof(g_aclrDxfIndexColors[0]))
#define AI_DXF_ENTITIES_MAGIC_BLOCK "$ASSIMP_ENTITIES_MAGIC"
+static const int GroupCode_Name = 2;
+static const int GroupCode_XComp = 10;
+static const int GroupCode_YComp = 20;
+static const int GroupCode_ZComp = 30;
static const aiImporterDesc desc = {
"Drawing Interchange Format (DXF) Importer",
@@ -109,45 +113,53 @@ static const aiImporterDesc desc = {
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
DXFImporter::DXFImporter()
-{}
+: BaseImporter() {
+ // empty
+}
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
-DXFImporter::~DXFImporter()
-{}
+DXFImporter::~DXFImporter() {
+ // empty
+}
// ------------------------------------------------------------------------------------------------
// Returns whether the class can handle the format of the given file.
-bool DXFImporter::CanRead( const std::string& pFile, IOSystem* /*pIOHandler*/, bool /*checkSig*/) const
-{
- return SimpleExtensionCheck(pFile,"dxf");
+bool DXFImporter::CanRead( const std::string& filename, IOSystem* pIOHandler, bool checkSig ) const {
+ const std::string& extension = GetExtension( filename );
+ if ( extension == desc.mFileExtensions ) {
+ return true;
+ }
+
+ if ( extension.empty() || checkSig ) {
+ const char *pTokens[] = { "SECTION", "HEADER", "ENDSEC", "BLOCKS" };
+ return BaseImporter::SearchFileHeaderForToken(pIOHandler, filename, pTokens, 4, 32 );
+ }
+
+ return false;
}
// ------------------------------------------------------------------------------------------------
// Get a list of all supported file extensions
-const aiImporterDesc* DXFImporter::GetInfo () const
-{
+const aiImporterDesc* DXFImporter::GetInfo () const {
return &desc;
}
// ------------------------------------------------------------------------------------------------
// Imports the given file into the given scene structure.
-void DXFImporter::InternReadFile( const std::string& pFile,
- aiScene* pScene,
- IOSystem* pIOHandler)
-{
- std::shared_ptr<IOStream> file = std::shared_ptr<IOStream>( pIOHandler->Open( pFile) );
+void DXFImporter::InternReadFile( const std::string& filename, aiScene* pScene, IOSystem* pIOHandler) {
+ std::shared_ptr<IOStream> file = std::shared_ptr<IOStream>( pIOHandler->Open( filename) );
// Check whether we can read the file
- if( file.get() == NULL) {
- throw DeadlyImportError( "Failed to open DXF file " + pFile + "");
+ if( file.get() == nullptr ) {
+ throw DeadlyImportError( "Failed to open DXF file " + filename + "");
}
- // check whether this is a binaray DXF file - we can't read binary DXF files :-(
+ // Check whether this is a binary 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)) {
+ if (0 == strncmp(AI_DXF_BINARY_IDENT.c_str(),buff,AI_DXF_BINARY_IDENT_LEN)) {
throw DeadlyImportError("DXF: Binary files are not supported at the moment");
}
@@ -190,7 +202,7 @@ void DXFImporter::InternReadFile( const std::string& pFile,
// comments
else if (reader.Is(999)) {
- DefaultLogger::get()->info("DXF Comment: " + reader.Value());
+ ASSIMP_LOG_INFO_F("DXF Comment: ", reader.Value());
}
// don't read past the official EOF sign
@@ -202,7 +214,7 @@ void DXFImporter::InternReadFile( const std::string& pFile,
++reader;
}
if (!eof) {
- DefaultLogger::get()->warn("DXF: EOF reached, but did not encounter DXF EOF marker");
+ ASSIMP_LOG_WARN("DXF: EOF reached, but did not encounter DXF EOF marker");
}
ConvertMeshes(pScene,output);
@@ -216,13 +228,11 @@ void DXFImporter::InternReadFile( const std::string& pFile,
}
// ------------------------------------------------------------------------------------------------
-void DXFImporter::ConvertMeshes(aiScene* pScene, DXF::FileData& output)
-{
+void DXFImporter::ConvertMeshes(aiScene* pScene, DXF::FileData& output) {
// the process of resolving all the INSERT statements can grow the
- // polycount excessively, so log the original number.
+ // poly-count excessively, so log the original number.
// XXX Option to import blocks as separate nodes?
if (!DefaultLogger::isNullLogger()) {
-
unsigned int vcount = 0, icount = 0;
for (const DXF::Block& bl : output.blocks) {
for (std::shared_ptr<const DXF::PolyLine> pl : bl.lines) {
@@ -231,16 +241,14 @@ void DXFImporter::ConvertMeshes(aiScene* pScene, DXF::FileData& output)
}
}
- DefaultLogger::get()->debug((Formatter::format("DXF: Unexpanded polycount is "),
- icount,", vertex count is ",vcount
- ));
+ ASSIMP_LOG_DEBUG_F("DXF: Unexpanded polycount is ", icount, ", vertex count is ", vcount);
}
if (! output.blocks.size() ) {
throw DeadlyImportError("DXF: no data blocks loaded");
}
- DXF::Block* entities = 0;
+ DXF::Block* entities( nullptr );
// index blocks by name
DXF::BlockMap blocks_by_name;
@@ -285,7 +293,7 @@ void DXFImporter::ConvertMeshes(aiScene* pScene, DXF::FileData& output)
}
}
- if (!pScene->mNumMeshes) {
+ if ( 0 == pScene->mNumMeshes) {
throw DeadlyImportError("DXF: this file contains no 3d data");
}
@@ -358,16 +366,13 @@ void DXFImporter::ConvertMeshes(aiScene* pScene, DXF::FileData& output)
// ------------------------------------------------------------------------------------------------
-void DXFImporter::ExpandBlockReferences(DXF::Block& bl,const DXF::BlockMap& blocks_by_name)
-{
+void DXFImporter::ExpandBlockReferences(DXF::Block& bl,const DXF::BlockMap& blocks_by_name) {
for (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"
- ));
+ ASSIMP_LOG_ERROR_F("DXF: Failed to resolve block reference: ", insert.name,"; skipping" );
continue;
}
@@ -387,7 +392,7 @@ void DXFImporter::ExpandBlockReferences(DXF::Block& bl,const DXF::BlockMap& bloc
// 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");
+ ASSIMP_LOG_WARN("DXF: BLOCK rotation not currently implemented");
}
for (aiVector3D& v : pl_out->positions) {
@@ -400,10 +405,8 @@ void DXFImporter::ExpandBlockReferences(DXF::Block& bl,const DXF::BlockMap& bloc
}
}
-
// ------------------------------------------------------------------------------------------------
-void DXFImporter::GenerateMaterials(aiScene* pScene, DXF::FileData& /*output*/)
-{
+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.
@@ -427,10 +430,8 @@ void DXFImporter::GenerateMaterials(aiScene* pScene, DXF::FileData& /*output*/)
pScene->mMaterials[0] = pcMat;
}
-
// ------------------------------------------------------------------------------------------------
-void DXFImporter::GenerateHierarchy(aiScene* pScene, DXF::FileData& /*output*/)
-{
+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>");
@@ -438,9 +439,7 @@ void DXFImporter::GenerateHierarchy(aiScene* pScene, DXF::FileData& /*output*/)
if (1 == pScene->mNumMeshes) {
pScene->mRootNode->mMeshes = new unsigned int[ pScene->mRootNode->mNumMeshes = 1 ];
pScene->mRootNode->mMeshes[0] = 0;
- }
- else
- {
+ } 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();
@@ -455,22 +454,17 @@ void DXFImporter::GenerateHierarchy(aiScene* pScene, DXF::FileData& /*output*/)
// ------------------------------------------------------------------------------------------------
-void DXFImporter::SkipSection(DXF::LineReader& reader)
-{
+void DXFImporter::SkipSection(DXF::LineReader& reader) {
for( ;!reader.End() && !reader.Is(0,"ENDSEC"); reader++);
}
-
// ------------------------------------------------------------------------------------------------
-void DXFImporter::ParseHeader(DXF::LineReader& reader, DXF::FileData& /*output*/)
-{
+void DXFImporter::ParseHeader(DXF::LineReader& reader, DXF::FileData& ) {
for( ;!reader.End() && !reader.Is(0,"ENDSEC"); reader++);
}
-
// ------------------------------------------------------------------------------------------------
-void DXFImporter::ParseBlocks(DXF::LineReader& reader, DXF::FileData& output)
-{
+void DXFImporter::ParseBlocks(DXF::LineReader& reader, DXF::FileData& output) {
while( !reader.End() && !reader.Is(0,"ENDSEC")) {
if (reader.Is(0,"BLOCK")) {
ParseBlock(++reader,output);
@@ -479,15 +473,11 @@ void DXFImporter::ParseBlocks(DXF::LineReader& reader, DXF::FileData& output)
++reader;
}
- DefaultLogger::get()->debug((Formatter::format("DXF: got "),
- output.blocks.size()," entries in BLOCKS"
- ));
+ ASSIMP_LOG_DEBUG_F("DXF: got ", output.blocks.size()," entries in BLOCKS" );
}
-
// ------------------------------------------------------------------------------------------------
-void DXFImporter::ParseBlock(DXF::LineReader& reader, DXF::FileData& output)
-{
+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();
@@ -495,17 +485,17 @@ void DXFImporter::ParseBlock(DXF::LineReader& reader, DXF::FileData& output)
while( !reader.End() && !reader.Is(0,"ENDBLK")) {
switch(reader.GroupCode()) {
- case 2:
+ case GroupCode_Name:
block.name = reader.Value();
break;
- case 10:
+ case GroupCode_XComp:
block.base.x = reader.ValueAsFloat();
break;
- case 20:
+ case GroupCode_YComp:
block.base.y = reader.ValueAsFloat();
break;
- case 30:
+ case GroupCode_ZComp:
block.base.z = reader.ValueAsFloat();
break;
}
@@ -517,7 +507,7 @@ void DXFImporter::ParseBlock(DXF::LineReader& reader, DXF::FileData& output)
// XXX is this a valid case?
if (reader.Is(0,"INSERT")) {
- DefaultLogger::get()->warn("DXF: INSERT within a BLOCK not currently supported; skipping");
+ ASSIMP_LOG_WARN("DXF: INSERT within a BLOCK not currently supported; skipping");
for( ;!reader.End() && !reader.Is(0,"ENDBLK"); ++reader);
break;
}
@@ -531,11 +521,9 @@ void DXFImporter::ParseBlock(DXF::LineReader& reader, DXF::FileData& output)
}
}
-
// ------------------------------------------------------------------------------------------------
-void DXFImporter::ParseEntities(DXF::LineReader& reader, DXF::FileData& output)
-{
- // push a new block onto the stack.
+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();
@@ -561,34 +549,29 @@ void DXFImporter::ParseEntities(DXF::LineReader& reader, DXF::FileData& output)
++reader;
}
- DefaultLogger::get()->debug((Formatter::format("DXF: got "),
- block.lines.size()," polylines and ", block.insertions.size() ," inserted blocks in ENTITIES"
- ));
+ ASSIMP_LOG_DEBUG_F( "DXF: got ", block.lines.size()," polylines and ", block.insertions.size(),
+ " inserted blocks in ENTITIES" );
}
-
-void DXFImporter::ParseInsertion(DXF::LineReader& reader, DXF::FileData& output)
-{
+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())
- {
+ switch(reader.GroupCode()) {
// name of referenced block
- case 2:
+ case GroupCode_Name:
bl.name = reader.Value();
break;
// translation
- case 10:
+ case GroupCode_XComp:
bl.pos.x = reader.ValueAsFloat();
break;
- case 20:
+ case GroupCode_YComp:
bl.pos.y = reader.ValueAsFloat();
break;
- case 30:
+ case GroupCode_ZComp:
bl.pos.z = reader.ValueAsFloat();
break;
@@ -618,8 +601,7 @@ void DXFImporter::ParseInsertion(DXF::LineReader& reader, DXF::FileData& output)
#define DXF_POLYLINE_FLAG_POLYFACEMESH 0x40
// ------------------------------------------------------------------------------------------------
-void DXFImporter::ParsePolyLine(DXF::LineReader& reader, DXF::FileData& output)
-{
+void DXFImporter::ParsePolyLine(DXF::LineReader& reader, DXF::FileData& output) {
output.blocks.back().lines.push_back( std::shared_ptr<DXF::PolyLine>( new DXF::PolyLine() ) );
DXF::PolyLine& line = *output.blocks.back().lines.back();
@@ -672,16 +654,15 @@ void DXFImporter::ParsePolyLine(DXF::LineReader& reader, DXF::FileData& output)
//}
if (vguess && line.positions.size() != vguess) {
- DefaultLogger::get()->warn((Formatter::format("DXF: unexpected vertex count in polymesh: "),
- line.positions.size(),", expected ", vguess
- ));
+ ASSIMP_LOG_WARN_F("DXF: unexpected vertex count in polymesh: ",
+ line.positions.size(),", expected ", vguess );
}
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;
+ ASSIMP_LOG_WARN("DXF: not enough vertices for polymesh; ignoring");
+ output.blocks.back().lines.pop_back();
+ return;
}
// if these numbers are wrong, parsing might have gone wild.
@@ -689,13 +670,11 @@ void DXFImporter::ParsePolyLine(DXF::LineReader& reader, DXF::FileData& output)
// 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
- ));
+ ASSIMP_LOG_WARN_F( "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.
+ // a poly-line - so there are no indices yet.
size_t guess = line.positions.size() + (line.flags & DXF_POLYLINE_FLAG_CLOSED ? 1 : 0);
line.indices.reserve(guess);
@@ -719,8 +698,7 @@ void DXFImporter::ParsePolyLine(DXF::LineReader& reader, DXF::FileData& output)
#define DXF_VERTEX_FLAG_HAS_POSITIONS 0x40
// ------------------------------------------------------------------------------------------------
-void DXFImporter::ParsePolyLineVertex(DXF::LineReader& reader, DXF::PolyLine& line)
-{
+void DXFImporter::ParsePolyLineVertex(DXF::LineReader& reader, DXF::PolyLine& line) {
unsigned int cnti = 0, flags = 0;
unsigned int indices[4];
@@ -733,14 +711,13 @@ void DXFImporter::ParsePolyLineVertex(DXF::LineReader& reader, DXF::PolyLine& li
break;
}
- switch (reader.GroupCode())
- {
+ switch (reader.GroupCode()) {
case 8:
// layer to which the vertex belongs to - assume that
- // this is always the layer the top-level polyline
+ // this is always the layer the top-level poly-line
// 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");
+ ASSIMP_LOG_WARN("DXF: expected vertex to be part of a poly-face but the 0x128 flag isn't set");
}
break;
@@ -749,9 +726,17 @@ void DXFImporter::ParsePolyLineVertex(DXF::LineReader& reader, DXF::PolyLine& li
break;
// VERTEX COORDINATES
- case 10: out.x = reader.ValueAsFloat();break;
- case 20: out.y = reader.ValueAsFloat();break;
- case 30: out.z = reader.ValueAsFloat();break;
+ case GroupCode_XComp:
+ out.x = reader.ValueAsFloat();
+ break;
+
+ case GroupCode_YComp:
+ out.y = reader.ValueAsFloat();
+ break;
+
+ case GroupCode_ZComp:
+ out.z = reader.ValueAsFloat();
+ break;
// POLYFACE vertex indices
case 71:
@@ -759,7 +744,7 @@ void DXFImporter::ParsePolyLineVertex(DXF::LineReader& reader, DXF::PolyLine& li
case 73:
case 74:
if (cnti == 4) {
- DefaultLogger::get()->warn("DXF: more than 4 indices per face not supported; ignoring");
+ ASSIMP_LOG_WARN("DXF: more than 4 indices per face not supported; ignoring");
break;
}
indices[cnti++] = reader.ValueAsUnsignedInt();
@@ -775,7 +760,7 @@ void DXFImporter::ParsePolyLineVertex(DXF::LineReader& reader, DXF::PolyLine& li
}
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");
+ ASSIMP_LOG_WARN("DXF: expected vertex to be part of a polyface but the 0x128 flag isn't set");
}
if (cnti) {
@@ -783,14 +768,17 @@ void DXFImporter::ParsePolyLineVertex(DXF::LineReader& reader, DXF::PolyLine& li
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.");
+ ASSIMP_LOG_WARN("DXF: invalid vertex index, indices are one-based.");
--line.counts.back();
+ // Workaround to fix issue 2229
+ if (line.counts.back() == 0) {
+ line.counts.pop_back();
+ }
continue;
}
line.indices.push_back(indices[i]-1);
}
- }
- else {
+ } else {
line.positions.push_back(out);
line.colors.push_back(clr);
}
@@ -824,62 +812,74 @@ void DXFImporter::Parse3DFace(DXF::LineReader& reader, DXF::FileData& output)
break;
// x position of the first corner
- case 10: vip[0].x = reader.ValueAsFloat();
+ case 10:
+ vip[0].x = reader.ValueAsFloat();
b[2] = true;
break;
// y position of the first corner
- case 20: vip[0].y = reader.ValueAsFloat();
+ case 20:
+ vip[0].y = reader.ValueAsFloat();
b[2] = true;
break;
// z position of the first corner
- case 30: vip[0].z = reader.ValueAsFloat();
+ case 30:
+ vip[0].z = reader.ValueAsFloat();
b[2] = true;
break;
// x position of the second corner
- case 11: vip[1].x = reader.ValueAsFloat();
+ case 11:
+ vip[1].x = reader.ValueAsFloat();
b[3] = true;
break;
// y position of the second corner
- case 21: vip[1].y = reader.ValueAsFloat();
+ case 21:
+ vip[1].y = reader.ValueAsFloat();
b[3] = true;
break;
// z position of the second corner
- case 31: vip[1].z = reader.ValueAsFloat();
+ case 31:
+ vip[1].z = reader.ValueAsFloat();
b[3] = true;
break;
// x position of the third corner
- case 12: vip[2].x = reader.ValueAsFloat();
+ case 12:
+ vip[2].x = reader.ValueAsFloat();
b[0] = true;
break;
// y position of the third corner
- case 22: vip[2].y = reader.ValueAsFloat();
+ case 22:
+ vip[2].y = reader.ValueAsFloat();
b[0] = true;
break;
// z position of the third corner
- case 32: vip[2].z = reader.ValueAsFloat();
+ case 32:
+ vip[2].z = reader.ValueAsFloat();
b[0] = true;
break;
// x position of the fourth corner
- case 13: vip[3].x = reader.ValueAsFloat();
+ case 13:
+ vip[3].x = reader.ValueAsFloat();
b[1] = true;
break;
// y position of the fourth corner
- case 23: vip[3].y = reader.ValueAsFloat();
+ case 23:
+ vip[3].y = reader.ValueAsFloat();
b[1] = true;
break;
// z position of the fourth corner
- case 33: vip[3].z = reader.ValueAsFloat();
+ case 33:
+ vip[3].z = reader.ValueAsFloat();
b[1] = true;
break;
@@ -900,7 +900,7 @@ void DXFImporter::Parse3DFace(DXF::LineReader& reader, DXF::FileData& output)
// 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");
+ ASSIMP_LOG_WARN("DXF: unexpected vertex setup in 3DFACE/LINE/FACE entity; ignoring");
output.blocks.back().lines.pop_back();
return;
}
@@ -916,4 +916,3 @@ void DXFImporter::Parse3DFace(DXF::LineReader& reader, DXF::FileData& output)
}
#endif // !! ASSIMP_BUILD_NO_DXF_IMPORTER
-
diff --git a/code/DXFLoader.h b/code/DXFLoader.h
index 64822e9e2..e7f534e98 100644
--- a/code/DXFLoader.h
+++ b/code/DXFLoader.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -45,36 +46,31 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_DXFLOADER_H_INCLUDED
#define AI_DXFLOADER_H_INCLUDED
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
#include <map>
namespace Assimp {
- namespace DXF {
-
- class LineReader;
- struct FileData;
- struct PolyLine;
- struct Block;
- struct InsertBlock;
- typedef std::map<std::string, const DXF::Block*> BlockMap;
- }
+// Forward declarations
+namespace DXF {
+ class LineReader;
+ struct FileData;
+ struct PolyLine;
+ struct Block;
+ struct InsertBlock;
+ typedef std::map<std::string, const DXF::Block*> BlockMap;
+}
// ---------------------------------------------------------------------------
-/** DXF importer implementation.
- *
-*/
-class DXFImporter : public BaseImporter
-{
+/**
+ * @brief DXF importer implementation.
+ */
+class DXFImporter : public BaseImporter {
public:
DXFImporter();
~DXFImporter();
-
-
-public:
-
// -------------------------------------------------------------------
/** Returns whether the class can handle the format of the given file.
* See BaseImporter::CanRead() for details. */
@@ -82,7 +78,6 @@ public:
bool checkSig) const;
protected:
-
// -------------------------------------------------------------------
/** Return importer meta information.
* See #BaseImporter::GetInfo for the details*/
diff --git a/code/DeboneProcess.cpp b/code/DeboneProcess.cpp
index b43dcad84..bc6afa36e 100644
--- a/code/DeboneProcess.cpp
+++ b/code/DeboneProcess.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -90,7 +91,7 @@ void DeboneProcess::SetupProperties(const Importer* pImp)
// Executes the post processing step on the given imported data.
void DeboneProcess::Execute( aiScene* pScene)
{
- DefaultLogger::get()->debug("DeboneProcess begin");
+ ASSIMP_LOG_DEBUG("DeboneProcess begin");
if(!pScene->mNumMeshes) {
return;
@@ -147,9 +148,7 @@ void DeboneProcess::Execute( aiScene* pScene)
}
if(!DefaultLogger::isNullLogger()) {
- char buffer[1024];
- ::ai_snprintf(buffer,1024,"Removed %u bones. Input bones: %u. Output bones: %u",in-out,in,out);
- DefaultLogger::get()->info(buffer);
+ ASSIMP_LOG_INFO_F("Removed %u bones. Input bones:", in - out, ". Output bones: ", out);
}
// and destroy the source mesh. It should be completely contained inside the new submeshes
@@ -172,7 +171,7 @@ void DeboneProcess::Execute( aiScene* pScene)
UpdateNode( pScene->mRootNode);
}
- DefaultLogger::get()->debug("DeboneProcess end");
+ ASSIMP_LOG_DEBUG("DeboneProcess end");
}
// ------------------------------------------------------------------------------------------------
@@ -208,7 +207,7 @@ bool DeboneProcess::ConsiderMesh(const aiMesh* pMesh)
if(vertexBones[vid]!=cUnowned) {
if(vertexBones[vid]==i) //double entry
{
- DefaultLogger::get()->warn("Encountered double entry in bone weights");
+ ASSIMP_LOG_WARN("Encountered double entry in bone weights");
}
else //TODO: track attraction in order to break tie
{
@@ -280,7 +279,7 @@ void DeboneProcess::SplitMesh( const aiMesh* pMesh, std::vector< std::pair< aiMe
if(vertexBones[vid]!=cUnowned) {
if(vertexBones[vid]==i) //double entry
{
- //DefaultLogger::get()->warn("Encountered double entry in bone weights");
+ ASSIMP_LOG_WARN("Encountered double entry in bone weights");
}
else //TODO: track attraction in order to break tie
{
diff --git a/code/DeboneProcess.h b/code/DeboneProcess.h
index 75f158c03..3da861362 100644
--- a/code/DeboneProcess.h
+++ b/code/DeboneProcess.h
@@ -1,8 +1,9 @@
- /*
+/*
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/DefaultIOStream.cpp b/code/DefaultIOStream.cpp
index cce9af19d..3b0a672a7 100644
--- a/code/DefaultIOStream.cpp
+++ b/code/DefaultIOStream.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -123,7 +124,8 @@ size_t DefaultIOStream::FileSize() const
// https://www.securecoding.cert.org/confluence/display/seccode/FIO19-C.+Do+not+use+fseek()+and+ftell()+to+compute+the+size+of+a+regular+file
#if defined _WIN32 && (!defined __GNUC__ || __MSVCRT_VERSION__ >= 0x0601)
struct __stat64 fileStat;
- int err = _stat64( mFilename.c_str(), &fileStat );
+ //using fileno + fstat avoids having to handle the filename
+ int err = _fstat64( _fileno(mFile), &fileStat );
if (0 != err)
return 0;
mCachedSize = (size_t) (fileStat.st_size);
diff --git a/code/DefaultIOSystem.cpp b/code/DefaultIOSystem.cpp
index ca4ae4564..58afe475c 100644
--- a/code/DefaultIOSystem.cpp
+++ b/code/DefaultIOSystem.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -41,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/** @file Default implementation of IOSystem using the standard C file functions */
-#include "StringComparison.h"
+#include <assimp/StringComparison.h>
#include <assimp/DefaultIOSystem.h>
#include <assimp/DefaultIOStream.h>
@@ -49,37 +50,54 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/ai_assert.h>
#include <stdlib.h>
-
#ifdef __unix__
#include <sys/param.h>
#include <stdlib.h>
#endif
-using namespace Assimp;
+#ifdef _WIN32
+#include <windows.h>
+#endif
-// ------------------------------------------------------------------------------------------------
-// Constructor.
-DefaultIOSystem::DefaultIOSystem()
-{
- // nothing to do here
-}
+using namespace Assimp;
-// ------------------------------------------------------------------------------------------------
-// Destructor.
-DefaultIOSystem::~DefaultIOSystem()
-{
- // nothing to do here
-}
+// maximum path length
+// XXX http://insanecoding.blogspot.com/2007/11/pathmax-simply-isnt.html
+#ifdef PATH_MAX
+# define PATHLIMIT PATH_MAX
+#else
+# define PATHLIMIT 4096
+#endif
// ------------------------------------------------------------------------------------------------
// Tests for the existence of a file at the given path.
bool DefaultIOSystem::Exists( const char* pFile) const
{
+#ifdef _WIN32
+ wchar_t fileName16[PATHLIMIT];
+
+ bool isUnicode = IsTextUnicode(pFile, static_cast<int>(strlen(pFile)), NULL) != 0;
+ if (isUnicode) {
+
+ MultiByteToWideChar(CP_UTF8, MB_PRECOMPOSED, pFile, -1, fileName16, PATHLIMIT);
+ struct __stat64 filestat;
+ if (0 != _wstat64(fileName16, &filestat)) {
+ return false;
+ }
+ } else {
+ FILE* file = ::fopen(pFile, "rb");
+ if (!file)
+ return false;
+
+ ::fclose(file);
+ }
+#else
FILE* file = ::fopen( pFile, "rb");
if( !file)
return false;
::fclose( file);
+#endif
return true;
}
@@ -89,10 +107,22 @@ IOStream* DefaultIOSystem::Open( const char* strFile, const char* strMode)
{
ai_assert(NULL != strFile);
ai_assert(NULL != strMode);
-
- FILE* file = ::fopen( strFile, strMode);
- if( NULL == file)
- return NULL;
+ FILE* file;
+#ifdef _WIN32
+ wchar_t fileName16[PATHLIMIT];
+ bool isUnicode = IsTextUnicode(strFile, static_cast<int>(strlen(strFile)), NULL) != 0;
+ if (isUnicode) {
+ MultiByteToWideChar(CP_UTF8, MB_PRECOMPOSED, strFile, -1, fileName16, PATHLIMIT);
+ std::string mode8(strMode);
+ file = ::_wfopen(fileName16, std::wstring(mode8.begin(), mode8.end()).c_str());
+ } else {
+ file = ::fopen(strFile, strMode);
+ }
+#else
+ file = ::fopen(strFile, strMode);
+#endif
+ if (nullptr == file)
+ return nullptr;
return new DefaultIOStream(file, (std::string) strFile);
}
@@ -122,32 +152,47 @@ bool IOSystem::ComparePaths (const char* one, const char* second) const
return !ASSIMP_stricmp(one,second);
}
-// maximum path length
-// XXX http://insanecoding.blogspot.com/2007/11/pathmax-simply-isnt.html
-#ifdef PATH_MAX
-# define PATHLIMIT PATH_MAX
-#else
-# define PATHLIMIT 4096
-#endif
-
// ------------------------------------------------------------------------------------------------
// Convert a relative path into an absolute path
-inline void MakeAbsolutePath (const char* in, char* _out)
+inline static void MakeAbsolutePath (const char* in, char* _out)
{
ai_assert(in && _out);
- char* ret;
#if defined( _MSC_VER ) || defined( __MINGW32__ )
- ret = ::_fullpath( _out, in, PATHLIMIT );
+ bool isUnicode = IsTextUnicode(in, static_cast<int>(strlen(in)), NULL) != 0;
+ if (isUnicode) {
+ wchar_t out16[PATHLIMIT];
+ wchar_t in16[PATHLIMIT];
+ MultiByteToWideChar(CP_UTF8, MB_PRECOMPOSED, in, -1, out16, PATHLIMIT);
+ wchar_t* ret = ::_wfullpath(out16, in16, PATHLIMIT);
+ if (ret) {
+ WideCharToMultiByte(CP_UTF8, MB_PRECOMPOSED, out16, -1, _out, PATHLIMIT, nullptr, nullptr);
+ }
+ if (!ret) {
+ // preserve the input path, maybe someone else is able to fix
+ // the path before it is accessed (e.g. our file system filter)
+ ASSIMP_LOG_WARN_F("Invalid path: ", std::string(in));
+ strcpy(_out, in);
+ }
+
+ } else {
+ char* ret = :: _fullpath(_out, in, PATHLIMIT);
+ if (!ret) {
+ // preserve the input path, maybe someone else is able to fix
+ // the path before it is accessed (e.g. our file system filter)
+ ASSIMP_LOG_WARN_F("Invalid path: ", std::string(in));
+ strcpy(_out, in);
+ }
+ }
#else
// use realpath
- ret = realpath(in, _out);
-#endif
+ char* ret = realpath(in, _out);
if(!ret) {
// preserve the input path, maybe someone else is able to fix
// the path before it is accessed (e.g. our file system filter)
- DefaultLogger::get()->warn("Invalid path: "+std::string(in));
+ ASSIMP_LOG_WARN_F("Invalid path: ", std::string(in));
strcpy(_out,in);
}
+#endif
}
// ------------------------------------------------------------------------------------------------
diff --git a/code/DefaultLogger.cpp b/code/DefaultLogger.cpp
index 5a6f19544..2871a4131 100644
--- a/code/DefaultLogger.cpp
+++ b/code/DefaultLogger.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -44,12 +45,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* @brief Implementation of DefaultLogger (and Logger)
*/
-
// Default log streams
#include "Win32DebugLogStream.h"
#include "StdOStreamLogStream.h"
#include "FileLogStream.h"
-#include "StringUtils.h"
+#include <assimp/StringUtils.h>
#include <assimp/DefaultIOSystem.h>
#include <assimp/NullLogger.hpp>
@@ -61,8 +61,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_SINGLETHREADED
# include <thread>
# include <mutex>
-
-std::mutex loggerMutex;
+ std::mutex loggerMutex;
#endif
namespace Assimp {
@@ -75,22 +74,19 @@ static const unsigned int SeverityAll = Logger::Info | Logger::Err | Logger::War
// ----------------------------------------------------------------------------------
// Represents a log-stream + its error severity
-struct LogStreamInfo
-{
- unsigned int m_uiErrorSeverity;
- LogStream *m_pStream;
+struct LogStreamInfo {
+ unsigned int m_uiErrorSeverity;
+ LogStream *m_pStream;
// Constructor
LogStreamInfo( unsigned int uiErrorSev, LogStream *pStream ) :
m_uiErrorSeverity( uiErrorSev ),
- m_pStream( pStream )
- {
+ m_pStream( pStream ) {
// empty
}
// Destructor
- ~LogStreamInfo()
- {
+ ~LogStreamInfo() {
delete m_pStream;
}
};
@@ -108,7 +104,7 @@ LogStream* LogStream::createDefaultStream(aiDefaultLogStream streams,
#ifdef WIN32
return new Win32DebugLogStream();
#else
- return NULL;
+ return nullptr;
#endif
// Platform-independent default streams
@@ -117,7 +113,7 @@ LogStream* LogStream::createDefaultStream(aiDefaultLogStream streams,
case aiDefaultLogStream_STDOUT:
return new StdOStreamLogStream(std::cout);
case aiDefaultLogStream_FILE:
- return (name && *name ? new FileLogStream(name,io) : NULL);
+ return (name && *name ? new FileLogStream(name,io) : nullptr );
default:
// We don't know this default log stream, so raise an assertion
ai_assert(false);
@@ -133,34 +129,38 @@ LogStream* LogStream::createDefaultStream(aiDefaultLogStream streams,
Logger *DefaultLogger::create(const char* name /*= "AssimpLog.txt"*/,
LogSeverity severity /*= NORMAL*/,
unsigned int defStreams /*= aiDefaultLogStream_DEBUGGER | aiDefaultLogStream_FILE*/,
- IOSystem* io /*= NULL*/)
-{
+ IOSystem* io /*= NULL*/) {
// enter the mutex here to avoid concurrency problems
#ifndef ASSIMP_BUILD_SINGLETHREADED
std::lock_guard<std::mutex> lock(loggerMutex);
#endif
- if (m_pLogger && !isNullLogger() )
+ if ( m_pLogger && !isNullLogger() ) {
delete m_pLogger;
+ }
m_pLogger = new DefaultLogger( severity );
// Attach default log streams
// Stream the log to the MSVC debugger?
- if (defStreams & aiDefaultLogStream_DEBUGGER)
- m_pLogger->attachStream( LogStream::createDefaultStream(aiDefaultLogStream_DEBUGGER));
+ if ( defStreams & aiDefaultLogStream_DEBUGGER ) {
+ m_pLogger->attachStream( LogStream::createDefaultStream( aiDefaultLogStream_DEBUGGER ) );
+ }
// Stream the log to COUT?
- if (defStreams & aiDefaultLogStream_STDOUT)
- m_pLogger->attachStream( LogStream::createDefaultStream(aiDefaultLogStream_STDOUT));
+ if ( defStreams & aiDefaultLogStream_STDOUT ) {
+ m_pLogger->attachStream( LogStream::createDefaultStream( aiDefaultLogStream_STDOUT ) );
+ }
// Stream the log to CERR?
- if (defStreams & aiDefaultLogStream_STDERR)
- m_pLogger->attachStream( LogStream::createDefaultStream(aiDefaultLogStream_STDERR));
+ if ( defStreams & aiDefaultLogStream_STDERR ) {
+ m_pLogger->attachStream( LogStream::createDefaultStream( aiDefaultLogStream_STDERR ) );
+ }
// Stream the log to a file
- if (defStreams & aiDefaultLogStream_FILE && name && *name)
- m_pLogger->attachStream( LogStream::createDefaultStream(aiDefaultLogStream_FILE,name,io));
+ if ( defStreams & aiDefaultLogStream_FILE && name && *name ) {
+ m_pLogger->attachStream( LogStream::createDefaultStream( aiDefaultLogStream_FILE, name, io ) );
+ }
return m_pLogger;
}
@@ -199,7 +199,6 @@ void Logger::warn(const char* message) {
// ----------------------------------------------------------------------------------
void Logger::error(const char* message) {
-
// SECURITY FIX: see above
if (strlen(message)>MAX_LOG_MESSAGE_LENGTH) {
return;
@@ -208,23 +207,24 @@ void Logger::error(const char* message) {
}
// ----------------------------------------------------------------------------------
-void DefaultLogger::set( Logger *logger )
-{
+void DefaultLogger::set( Logger *logger ) {
// enter the mutex here to avoid concurrency problems
#ifndef ASSIMP_BUILD_SINGLETHREADED
std::lock_guard<std::mutex> lock(loggerMutex);
#endif
- if (!logger)logger = &s_pNullLogger;
- if (m_pLogger && !isNullLogger() )
+ if ( nullptr == logger ) {
+ logger = &s_pNullLogger;
+ }
+ if ( nullptr != m_pLogger && !isNullLogger() ) {
delete m_pLogger;
+ }
DefaultLogger::m_pLogger = logger;
}
// ----------------------------------------------------------------------------------
-bool DefaultLogger::isNullLogger()
-{
+bool DefaultLogger::isNullLogger() {
return m_pLogger == &s_pNullLogger;
}
@@ -235,8 +235,7 @@ Logger *DefaultLogger::get() {
// ----------------------------------------------------------------------------------
// Kills the only instance
-void DefaultLogger::kill()
-{
+void DefaultLogger::kill() {
// enter the mutex here to avoid concurrency problems
#ifndef ASSIMP_BUILD_SINGLETHREADED
std::lock_guard<std::mutex> lock(loggerMutex);
@@ -251,10 +250,10 @@ void DefaultLogger::kill()
// ----------------------------------------------------------------------------------
// Debug message
-void DefaultLogger::OnDebug( const char* message )
-{
- if ( m_Severity == Logger::NORMAL )
+void DefaultLogger::OnDebug( const char* message ) {
+ if ( m_Severity == Logger::NORMAL ) {
return;
+ }
static const size_t Size = MAX_LOG_MESSAGE_LENGTH + 16;
char msg[Size];
@@ -265,8 +264,7 @@ void DefaultLogger::OnDebug( const char* message )
// ----------------------------------------------------------------------------------
// Logs an info
-void DefaultLogger::OnInfo( const char* message )
-{
+void DefaultLogger::OnInfo( const char* message ){
static const size_t Size = MAX_LOG_MESSAGE_LENGTH + 16;
char msg[Size];
ai_snprintf(msg, Size, "Info, T%u: %s", GetThreadID(), message );
@@ -276,8 +274,7 @@ void DefaultLogger::OnInfo( const char* message )
// ----------------------------------------------------------------------------------
// Logs a warning
-void DefaultLogger::OnWarn( const char* message )
-{
+void DefaultLogger::OnWarn( const char* message ) {
static const size_t Size = MAX_LOG_MESSAGE_LENGTH + 16;
char msg[Size];
ai_snprintf(msg, Size, "Warn, T%u: %s", GetThreadID(), message );
@@ -287,8 +284,7 @@ void DefaultLogger::OnWarn( const char* message )
// ----------------------------------------------------------------------------------
// Logs an error
-void DefaultLogger::OnError( const char* message )
-{
+void DefaultLogger::OnError( const char* message ) {
static const size_t Size = MAX_LOG_MESSAGE_LENGTH + 16;
char msg[ Size ];
ai_snprintf(msg, Size, "Error, T%u: %s", GetThreadID(), message );
@@ -298,10 +294,10 @@ void DefaultLogger::OnError( const char* message )
// ----------------------------------------------------------------------------------
// Will attach a new stream
-bool DefaultLogger::attachStream( LogStream *pStream, unsigned int severity )
-{
- if (!pStream)
+bool DefaultLogger::attachStream( LogStream *pStream, unsigned int severity ) {
+ if ( nullptr == pStream ) {
return false;
+ }
if (0 == severity) {
severity = Logger::Info | Logger::Err | Logger::Warn | Logger::Debugging;
@@ -311,8 +307,7 @@ bool DefaultLogger::attachStream( LogStream *pStream, unsigned int severity )
it != m_StreamArray.end();
++it )
{
- if ( (*it)->m_pStream == pStream )
- {
+ if ( (*it)->m_pStream == pStream ) {
(*it)->m_uiErrorSeverity |= severity;
return true;
}
@@ -325,34 +320,31 @@ bool DefaultLogger::attachStream( LogStream *pStream, unsigned int severity )
// ----------------------------------------------------------------------------------
// Detach a stream
-bool DefaultLogger::detatchStream( LogStream *pStream, unsigned int severity )
-{
- if (!pStream)
+bool DefaultLogger::detatchStream( LogStream *pStream, unsigned int severity ) {
+ if ( nullptr == pStream ) {
return false;
+ }
if (0 == severity) {
severity = SeverityAll;
}
- for ( StreamIt it = m_StreamArray.begin();
- it != m_StreamArray.end();
- ++it )
- {
- if ( (*it)->m_pStream == pStream )
- {
+ bool res( false );
+ for ( StreamIt it = m_StreamArray.begin(); it != m_StreamArray.end(); ++it ) {
+ if ( (*it)->m_pStream == pStream ) {
(*it)->m_uiErrorSeverity &= ~severity;
- if ( (*it)->m_uiErrorSeverity == 0 )
- {
+ if ( (*it)->m_uiErrorSeverity == 0 ) {
// don't delete the underlying stream 'cause the caller gains ownership again
- (**it).m_pStream = NULL;
+ (**it).m_pStream = nullptr;
delete *it;
m_StreamArray.erase( it );
+ res = true;
break;
}
return true;
}
}
- return false;
+ return res;
}
// ----------------------------------------------------------------------------------
@@ -360,15 +352,13 @@ bool DefaultLogger::detatchStream( LogStream *pStream, unsigned int severity )
DefaultLogger::DefaultLogger(LogSeverity severity)
: Logger ( severity )
, noRepeatMsg (false)
- , lastLen( 0 )
-{
+ , lastLen( 0 ) {
lastMsg[0] = '\0';
}
// ----------------------------------------------------------------------------------
// Destructor
-DefaultLogger::~DefaultLogger()
-{
+DefaultLogger::~DefaultLogger() {
for ( StreamIt it = m_StreamArray.begin(); it != m_StreamArray.end(); ++it ) {
// also frees the underlying stream, we are its owner.
delete *it;
@@ -377,9 +367,8 @@ DefaultLogger::~DefaultLogger()
// ----------------------------------------------------------------------------------
// Writes message to stream
-void DefaultLogger::WriteToStreams(const char *message, ErrorSeverity ErrorSev )
-{
- ai_assert(NULL != message);
+void DefaultLogger::WriteToStreams(const char *message, ErrorSeverity ErrorSev ) {
+ ai_assert(nullptr != message);
// Check whether this is a repeated message
if (! ::strncmp( message,lastMsg, lastLen-1))
diff --git a/code/DefaultProgressHandler.h b/code/DefaultProgressHandler.h
index 6cd872eaa..851c17be6 100644
--- a/code/DefaultProgressHandler.h
+++ b/code/DefaultProgressHandler.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -51,9 +52,7 @@ namespace Assimp {
// ------------------------------------------------------------------------------------
/** @brief Internal default implementation of the #ProgressHandler interface. */
-class DefaultProgressHandler
- : public ProgressHandler {
-
+class DefaultProgressHandler : public ProgressHandler {
virtual bool Update(float /*percentage*/) {
return false;
diff --git a/code/DropFaceNormalsProcess.cpp b/code/DropFaceNormalsProcess.cpp
new file mode 100644
index 000000000..57e8b972b
--- /dev/null
+++ b/code/DropFaceNormalsProcess.cpp
@@ -0,0 +1,109 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2018, assimp 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 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 Implementation of the post processing step to drop face
+* normals for all imported faces.
+*/
+
+
+#include "DropFaceNormalsProcess.h"
+#include <assimp/postprocess.h>
+#include <assimp/scene.h>
+#include <assimp/DefaultLogger.hpp>
+#include <assimp/Exceptional.h>
+
+using namespace Assimp;
+
+// ------------------------------------------------------------------------------------------------
+// Constructor to be privately used by Importer
+DropFaceNormalsProcess::DropFaceNormalsProcess()
+{
+ // nothing to do here
+}
+
+// ------------------------------------------------------------------------------------------------
+// Destructor, private as well
+DropFaceNormalsProcess::~DropFaceNormalsProcess()
+{
+ // nothing to do here
+}
+
+// ------------------------------------------------------------------------------------------------
+// Returns whether the processing step is present in the given flag field.
+bool DropFaceNormalsProcess::IsActive( unsigned int pFlags) const {
+ return (pFlags & aiProcess_DropNormals) != 0;
+}
+
+// ------------------------------------------------------------------------------------------------
+// Executes the post processing step on the given imported data.
+void DropFaceNormalsProcess::Execute( aiScene* pScene) {
+ ASSIMP_LOG_DEBUG("DropFaceNormalsProcess begin");
+
+ if (pScene->mFlags & AI_SCENE_FLAGS_NON_VERBOSE_FORMAT) {
+ throw DeadlyImportError("Post-processing order mismatch: expecting pseudo-indexed (\"verbose\") vertices here");
+ }
+
+ bool bHas = false;
+ for( unsigned int a = 0; a < pScene->mNumMeshes; a++) {
+ bHas |= this->DropMeshFaceNormals( pScene->mMeshes[a]);
+ }
+ if (bHas) {
+ ASSIMP_LOG_INFO("DropFaceNormalsProcess finished. "
+ "Face normals have been removed");
+ } else {
+ ASSIMP_LOG_DEBUG("DropFaceNormalsProcess finished. "
+ "No normals were present");
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// Executes the post processing step on the given imported data.
+bool DropFaceNormalsProcess::DropMeshFaceNormals (aiMesh* pMesh) {
+ if (NULL == pMesh->mNormals) {
+ return false;
+ }
+
+ delete[] pMesh->mNormals;
+ pMesh->mNormals = nullptr;
+ return true;
+}
diff --git a/code/DropFaceNormalsProcess.h b/code/DropFaceNormalsProcess.h
new file mode 100644
index 000000000..6dbfe0397
--- /dev/null
+++ b/code/DropFaceNormalsProcess.h
@@ -0,0 +1,86 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2018, assimp 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 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 Defines a post processing step to compute face normals for all loaded faces*/
+#ifndef AI_DROPFACENORMALPROCESS_H_INC
+#define AI_DROPFACENORMALPROCESS_H_INC
+
+#include "BaseProcess.h"
+#include <assimp/mesh.h>
+
+namespace Assimp
+{
+
+// ---------------------------------------------------------------------------
+/** The DropFaceNormalsProcess computes face normals for all faces of all meshes
+*/
+class ASSIMP_API_WINONLY DropFaceNormalsProcess : public BaseProcess
+{
+public:
+
+ DropFaceNormalsProcess();
+ ~DropFaceNormalsProcess();
+
+public:
+ // -------------------------------------------------------------------
+ /** Returns whether the processing step is present in the given flag field.
+ * @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;
+
+ // -------------------------------------------------------------------
+ /** 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);
+
+
+private:
+ bool DropMeshFaceNormals(aiMesh* pcMesh);
+};
+
+} // end of namespace Assimp
+
+#endif // !!AI_DROPFACENORMALPROCESS_H_INC
diff --git a/code/EmbedTexturesProcess.cpp b/code/EmbedTexturesProcess.cpp
new file mode 100644
index 000000000..ebe7a0897
--- /dev/null
+++ b/code/EmbedTexturesProcess.cpp
@@ -0,0 +1,146 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2018, assimp 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 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 "EmbedTexturesProcess.h"
+#include <assimp/ParsingUtils.h>
+#include "ProcessHelper.h"
+
+#include <fstream>
+
+using namespace Assimp;
+
+EmbedTexturesProcess::EmbedTexturesProcess()
+: BaseProcess() {
+}
+
+EmbedTexturesProcess::~EmbedTexturesProcess() {
+}
+
+bool EmbedTexturesProcess::IsActive(unsigned int pFlags) const {
+ return (pFlags & aiProcess_EmbedTextures) != 0;
+}
+
+void EmbedTexturesProcess::SetupProperties(const Importer* pImp) {
+ mRootPath = pImp->GetPropertyString("sourceFilePath");
+ mRootPath = mRootPath.substr(0, mRootPath.find_last_of("\\/") + 1u);
+}
+
+void EmbedTexturesProcess::Execute(aiScene* pScene) {
+ if (pScene == nullptr || pScene->mRootNode == nullptr) return;
+
+ aiString path;
+
+ uint32_t embeddedTexturesCount = 0u;
+
+ for (auto matId = 0u; matId < pScene->mNumMaterials; ++matId) {
+ auto material = pScene->mMaterials[matId];
+
+ for (auto ttId = 1u; ttId < AI_TEXTURE_TYPE_MAX; ++ttId) {
+ auto tt = static_cast<aiTextureType>(ttId);
+ auto texturesCount = material->GetTextureCount(tt);
+
+ for (auto texId = 0u; texId < texturesCount; ++texId) {
+ material->GetTexture(tt, texId, &path);
+ if (path.data[0] == '*') continue; // Already embedded
+
+ // Indeed embed
+ if (addTexture(pScene, path.data)) {
+ auto embeddedTextureId = pScene->mNumTextures - 1u;
+ ::ai_snprintf(path.data, 1024, "*%u", embeddedTextureId);
+ material->AddProperty(&path, AI_MATKEY_TEXTURE(tt, texId));
+ embeddedTexturesCount++;
+ }
+ }
+ }
+ }
+
+ ASSIMP_LOG_INFO_F("EmbedTexturesProcess finished. Embedded ", embeddedTexturesCount, " textures." );
+}
+
+bool EmbedTexturesProcess::addTexture(aiScene* pScene, std::string path) const {
+ std::streampos imageSize = 0;
+ std::string imagePath = path;
+
+ // Test path directly
+ std::ifstream file(imagePath, std::ios::binary | std::ios::ate);
+ if ((imageSize = file.tellg()) == std::streampos(-1)) {
+ ASSIMP_LOG_WARN_F("EmbedTexturesProcess: Cannot find image: ", imagePath, ". Will try to find it in root folder.");
+
+ // Test path in root path
+ imagePath = mRootPath + path;
+ file.open(imagePath, std::ios::binary | std::ios::ate);
+ if ((imageSize = file.tellg()) == std::streampos(-1)) {
+ // Test path basename in root path
+ imagePath = mRootPath + path.substr(path.find_last_of("\\/") + 1u);
+ file.open(imagePath, std::ios::binary | std::ios::ate);
+ if ((imageSize = file.tellg()) == std::streampos(-1)) {
+ ASSIMP_LOG_ERROR_F("EmbedTexturesProcess: Unable to embed texture: ", path, ".");
+ return false;
+ }
+ }
+ }
+
+ aiTexel* imageContent = new aiTexel[ 1ul + static_cast<unsigned long>( imageSize ) / sizeof(aiTexel)];
+ file.seekg(0, std::ios::beg);
+ file.read(reinterpret_cast<char*>(imageContent), imageSize);
+
+ // Enlarging the textures table
+ auto textureId = pScene->mNumTextures++;
+ auto oldTextures = pScene->mTextures;
+ pScene->mTextures = new aiTexture*[pScene->mNumTextures];
+ memmove(pScene->mTextures, oldTextures, sizeof(aiTexture*) * (pScene->mNumTextures - 1u));
+
+ // Add the new texture
+ auto pTexture = new aiTexture();
+ pTexture->mHeight = 0; // Means that this is still compressed
+ pTexture->mWidth = static_cast<uint32_t>(imageSize);
+ pTexture->pcData = imageContent;
+
+ auto extension = path.substr(path.find_last_of('.') + 1u);
+ std::transform(extension.begin(), extension.end(), extension.begin(), ::tolower);
+ if (extension == "jpeg") extension = "jpg";
+ strcpy(pTexture->achFormatHint, extension.c_str());
+
+ pScene->mTextures[textureId] = pTexture;
+
+ return true;
+}
diff --git a/code/EmbedTexturesProcess.h b/code/EmbedTexturesProcess.h
new file mode 100644
index 000000000..ce9821652
--- /dev/null
+++ b/code/EmbedTexturesProcess.h
@@ -0,0 +1,85 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2018, assimp 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 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.
+
+----------------------------------------------------------------------
+*/
+
+#pragma once
+
+#include "BaseProcess.h"
+
+#include <string>
+
+struct aiNode;
+
+namespace Assimp {
+
+/**
+ * Force embedding of textures (using the path = "*1" convention).
+ * If a texture's file does not exist at the specified path
+ * (due, for instance, to an absolute path generated on another system),
+ * it will check if a file with the same name exists at the root folder
+ * of the imported model. And if so, it uses that.
+ */
+class ASSIMP_API EmbedTexturesProcess : public BaseProcess {
+public:
+ /// The default class constructor.
+ EmbedTexturesProcess();
+
+ /// The class destructor.
+ virtual ~EmbedTexturesProcess();
+
+ /// Overwritten, @see BaseProcess
+ virtual bool IsActive(unsigned int pFlags) const;
+
+ /// Overwritten, @see BaseProcess
+ virtual void SetupProperties(const Importer* pImp);
+
+ /// Overwritten, @see BaseProcess
+ virtual void Execute(aiScene* pScene);
+
+private:
+ // Resolve the path and add the file content to the scene as a texture.
+ bool addTexture(aiScene* pScene, std::string path) const;
+
+private:
+ std::string mRootPath;
+};
+
+} // namespace Assimp
diff --git a/code/Exporter.cpp b/code/Exporter.cpp
index f03702869..0acde75bf 100644
--- a/code/Exporter.cpp
+++ b/code/Exporter.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -53,23 +54,24 @@ Here we implement only the C++ interface (Assimp::Exporter).
#ifndef ASSIMP_BUILD_NO_EXPORT
-#include "BlobIOSystem.h"
+#include <assimp/BlobIOSystem.h>
#include <assimp/SceneCombiner.h>
-#include "BaseProcess.h"
-#include "Importer.h" // need this for GetPostProcessingStepInstanceList()
+#include <assimp/DefaultIOSystem.h>
+#include <assimp/Exporter.hpp>
+#include <assimp/mesh.h>
+#include <assimp/postprocess.h>
+#include <assimp/scene.h>
+#include "DefaultProgressHandler.h"
+#include "BaseProcess.h"
#include "JoinVerticesProcess.h"
#include "MakeVerboseFormat.h"
#include "ConvertToLHProcess.h"
-#include "Exceptional.h"
+#include "PretransformVertices.h"
+#include <assimp/Exceptional.h>
#include "ScenePrivate.h"
-#include <memory>
-#include <assimp/DefaultIOSystem.h>
-#include <assimp/Exporter.hpp>
-#include <assimp/mesh.h>
-#include <assimp/postprocess.h>
-#include <assimp/scene.h>
+#include <memory>
namespace Assimp {
@@ -83,6 +85,7 @@ void ExportSceneCollada(const char*,IOSystem*, const aiScene*, const ExportPrope
void ExportSceneXFile(const char*,IOSystem*, const aiScene*, const ExportProperties*);
void ExportSceneStep(const char*,IOSystem*, const aiScene*, const ExportProperties*);
void ExportSceneObj(const char*,IOSystem*, const aiScene*, const ExportProperties*);
+void ExportSceneObjNoMtl(const char*,IOSystem*, const aiScene*, const ExportProperties*);
void ExportSceneSTL(const char*,IOSystem*, const aiScene*, const ExportProperties*);
void ExportSceneSTLBinary(const char*,IOSystem*, const aiScene*, const ExportProperties*);
void ExportScenePly(const char*,IOSystem*, const aiScene*, const ExportProperties*);
@@ -90,30 +93,37 @@ void ExportScenePlyBinary(const char*, IOSystem*, const aiScene*, const ExportPr
void ExportScene3DS(const char*, IOSystem*, const aiScene*, const ExportProperties*);
void ExportSceneGLTF(const char*, IOSystem*, const aiScene*, const ExportProperties*);
void ExportSceneGLB(const char*, IOSystem*, const aiScene*, const ExportProperties*);
+void ExportSceneGLTF2(const char*, IOSystem*, const aiScene*, const ExportProperties*);
+void ExportSceneGLB2(const char*, IOSystem*, const aiScene*, const ExportProperties*);
void ExportSceneAssbin(const char*, IOSystem*, const aiScene*, const ExportProperties*);
void ExportSceneAssxml(const char*, IOSystem*, const aiScene*, const ExportProperties*);
void ExportSceneX3D(const char*, IOSystem*, const aiScene*, const ExportProperties*);
+void ExportSceneFBX(const char*, IOSystem*, const aiScene*, const ExportProperties*);
+void ExportSceneFBXA(const char*, IOSystem*, const aiScene*, const ExportProperties*);
+void ExportScene3MF( const char*, IOSystem*, const aiScene*, const ExportProperties* );
// ------------------------------------------------------------------------------------------------
// global array of all export formats which Assimp supports in its current build
Exporter::ExportFormatEntry gExporters[] =
{
#ifndef ASSIMP_BUILD_NO_COLLADA_EXPORTER
- Exporter::ExportFormatEntry( "collada", "COLLADA - Digital Asset Exchange Schema", "dae", &ExportSceneCollada),
+ Exporter::ExportFormatEntry( "collada", "COLLADA - Digital Asset Exchange Schema", "dae", &ExportSceneCollada ),
#endif
#ifndef ASSIMP_BUILD_NO_X_EXPORTER
Exporter::ExportFormatEntry( "x", "X Files", "x", &ExportSceneXFile,
- aiProcess_MakeLeftHanded | aiProcess_FlipWindingOrder | aiProcess_FlipUVs),
+ aiProcess_MakeLeftHanded | aiProcess_FlipWindingOrder | aiProcess_FlipUVs ),
#endif
#ifndef ASSIMP_BUILD_NO_STEP_EXPORTER
- Exporter::ExportFormatEntry( "stp", "Step Files", "stp", &ExportSceneStep, 0),
+ Exporter::ExportFormatEntry( "stp", "Step Files", "stp", &ExportSceneStep, 0 ),
#endif
#ifndef ASSIMP_BUILD_NO_OBJ_EXPORTER
Exporter::ExportFormatEntry( "obj", "Wavefront OBJ format", "obj", &ExportSceneObj,
- aiProcess_GenSmoothNormals /*| aiProcess_PreTransformVertices */),
+ aiProcess_GenSmoothNormals /*| aiProcess_PreTransformVertices */ ),
+ Exporter::ExportFormatEntry( "objnomtl", "Wavefront OBJ format without material file", "obj", &ExportSceneObjNoMtl,
+ aiProcess_GenSmoothNormals /*| aiProcess_PreTransformVertices */ ),
#endif
#ifndef ASSIMP_BUILD_NO_STL_EXPORTER
@@ -136,26 +146,39 @@ Exporter::ExportFormatEntry gExporters[] =
#ifndef ASSIMP_BUILD_NO_3DS_EXPORTER
Exporter::ExportFormatEntry( "3ds", "Autodesk 3DS (legacy)", "3ds" , &ExportScene3DS,
- aiProcess_Triangulate | aiProcess_SortByPType | aiProcess_JoinIdenticalVertices),
+ aiProcess_Triangulate | aiProcess_SortByPType | aiProcess_JoinIdenticalVertices ),
#endif
#ifndef ASSIMP_BUILD_NO_GLTF_EXPORTER
+ Exporter::ExportFormatEntry( "gltf2", "GL Transmission Format v. 2", "gltf", &ExportSceneGLTF2,
+ aiProcess_JoinIdenticalVertices | aiProcess_Triangulate | aiProcess_SortByPType ),
+ Exporter::ExportFormatEntry( "glb2", "GL Transmission Format v. 2 (binary)", "glb", &ExportSceneGLB2,
+ aiProcess_JoinIdenticalVertices | aiProcess_Triangulate | aiProcess_SortByPType ),
Exporter::ExportFormatEntry( "gltf", "GL Transmission Format", "gltf", &ExportSceneGLTF,
- aiProcess_JoinIdenticalVertices | aiProcess_Triangulate | aiProcess_SortByPType),
+ aiProcess_JoinIdenticalVertices | aiProcess_Triangulate | aiProcess_SortByPType ),
Exporter::ExportFormatEntry( "glb", "GL Transmission Format (binary)", "glb", &ExportSceneGLB,
- aiProcess_JoinIdenticalVertices | aiProcess_Triangulate | aiProcess_SortByPType),
+ aiProcess_JoinIdenticalVertices | aiProcess_Triangulate | aiProcess_SortByPType ),
#endif
#ifndef ASSIMP_BUILD_NO_ASSBIN_EXPORTER
- Exporter::ExportFormatEntry( "assbin", "Assimp Binary", "assbin" , &ExportSceneAssbin, 0),
+ Exporter::ExportFormatEntry( "assbin", "Assimp Binary", "assbin" , &ExportSceneAssbin, 0 ),
#endif
#ifndef ASSIMP_BUILD_NO_ASSXML_EXPORTER
- Exporter::ExportFormatEntry( "assxml", "Assxml Document", "assxml" , &ExportSceneAssxml, 0),
+ Exporter::ExportFormatEntry( "assxml", "Assxml Document", "assxml" , &ExportSceneAssxml, 0 ),
#endif
#ifndef ASSIMP_BUILD_NO_X3D_EXPORTER
- Exporter::ExportFormatEntry( "x3d", "Extensible 3D", "x3d" , &ExportSceneX3D, 0),
+ Exporter::ExportFormatEntry( "x3d", "Extensible 3D", "x3d" , &ExportSceneX3D, 0 ),
+#endif
+
+#ifndef ASSIMP_BUILD_NO_FBX_EXPORTER
+ Exporter::ExportFormatEntry( "fbx", "Autodesk FBX (binary)", "fbx", &ExportSceneFBX, 0 ),
+ Exporter::ExportFormatEntry( "fbxa", "Autodesk FBX (ascii)", "fbx", &ExportSceneFBXA, 0 ),
+#endif
+
+#ifndef ASSIMP_BUILD_NO_3MF_EXPORTER
+ Exporter::ExportFormatEntry( "3mf", "The 3MF-File-Format", "3mf", &ExportScene3MF, 0 )
#endif
};
@@ -165,10 +188,14 @@ Exporter::ExportFormatEntry gExporters[] =
class ExporterPimpl {
public:
ExporterPimpl()
- : blob()
- , mIOSystem(new Assimp::DefaultIOSystem())
- , mIsDefaultIOHandler(true)
- {
+ : blob()
+ , mIOSystem(new Assimp::DefaultIOSystem())
+ , mIsDefaultIOHandler(true)
+ , mProgressHandler( nullptr )
+ , mIsDefaultProgressHandler( true )
+ , mPostProcessingSteps()
+ , mError()
+ , mExporters() {
GetPostProcessingStepInstanceList(mPostProcessingSteps);
// grab all built-in exporters
@@ -178,14 +205,14 @@ public:
}
}
- ~ExporterPimpl()
- {
+ ~ExporterPimpl() {
delete blob;
// Delete all post-processing plug-ins
for( unsigned int a = 0; a < mPostProcessingSteps.size(); a++) {
delete mPostProcessingSteps[a];
}
+ delete mProgressHandler;
}
public:
@@ -193,6 +220,10 @@ public:
std::shared_ptr< Assimp::IOSystem > mIOSystem;
bool mIsDefaultIOHandler;
+ /** The progress handler */
+ ProgressHandler *mProgressHandler;
+ bool mIsDefaultProgressHandler;
+
/** Post processing steps we can apply at the imported data. */
std::vector< BaseProcess* > mPostProcessingSteps;
@@ -210,13 +241,12 @@ using namespace Assimp;
// ------------------------------------------------------------------------------------------------
Exporter :: Exporter()
: pimpl(new ExporterPimpl()) {
- // empty
+ pimpl->mProgressHandler = new DefaultProgressHandler();
}
// ------------------------------------------------------------------------------------------------
Exporter::~Exporter() {
FreeBlob();
-
delete pimpl;
}
@@ -237,11 +267,31 @@ bool Exporter::IsDefaultIOHandler() const {
}
// ------------------------------------------------------------------------------------------------
+void Exporter::SetProgressHandler(ProgressHandler* pHandler) {
+ ai_assert(nullptr != pimpl);
+
+ if ( nullptr == pHandler) {
+ // Release pointer in the possession of the caller
+ pimpl->mProgressHandler = new DefaultProgressHandler();
+ pimpl->mIsDefaultProgressHandler = true;
+ return;
+ }
+
+ if (pimpl->mProgressHandler == pHandler) {
+ return;
+ }
+
+ delete pimpl->mProgressHandler;
+ pimpl->mProgressHandler = pHandler;
+ pimpl->mIsDefaultProgressHandler = false;
+}
+
+// ------------------------------------------------------------------------------------------------
const aiExportDataBlob* Exporter::ExportToBlob( const aiScene* pScene, const char* pFormatId,
- unsigned int, const ExportProperties* pProperties ) {
+ unsigned int, const ExportProperties* /*pProperties*/ ) {
if (pimpl->blob) {
delete pimpl->blob;
- pimpl->blob = NULL;
+ pimpl->blob = nullptr;
}
std::shared_ptr<IOSystem> old = pimpl->mIOSystem;
@@ -250,7 +300,7 @@ const aiExportDataBlob* Exporter::ExportToBlob( const aiScene* pScene, const cha
if (AI_SUCCESS != Export(pScene,pFormatId,blobio->GetMagicFileName())) {
pimpl->mIOSystem = old;
- return NULL;
+ return nullptr;
}
pimpl->blob = blobio->GetBlobChain();
@@ -272,6 +322,7 @@ bool IsVerboseFormat(const aiMesh* mesh) {
}
}
}
+
return true;
}
@@ -282,11 +333,13 @@ bool IsVerboseFormat(const aiScene* pScene) {
return false;
}
}
+
return true;
}
// ------------------------------------------------------------------------------------------------
-aiReturn Exporter::Export( const aiScene* pScene, const char* pFormatId, const char* pPath, unsigned int pPreprocessing, const ExportProperties* pProperties) {
+aiReturn Exporter::Export( const aiScene* pScene, const char* pFormatId, const char* pPath,
+ unsigned int pPreprocessing, const ExportProperties* pProperties) {
ASSIMP_BEGIN_EXCEPTION_REGION();
// when they create scenes from scratch, users will likely create them not in verbose
@@ -295,6 +348,8 @@ aiReturn Exporter::Export( const aiScene* pScene, const char* pFormatId, const c
// meshes upfront.
const bool is_verbose_format = !(pScene->mFlags & AI_SCENE_FLAGS_NON_VERBOSE_FORMAT) || IsVerboseFormat(pScene);
+ pimpl->mProgressHandler->UpdateFileWrite(0, 4);
+
pimpl->mError = "";
for (size_t i = 0; i < pimpl->mExporters.size(); ++i) {
const Exporter::ExportFormatEntry& exp = pimpl->mExporters[i];
@@ -302,9 +357,11 @@ aiReturn Exporter::Export( const aiScene* pScene, const char* pFormatId, const c
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 = NULL;
+ aiScene* scenecopy_tmp = nullptr;
SceneCombiner::CopyScene(&scenecopy_tmp,pScene);
+ pimpl->mProgressHandler->UpdateFileWrite(1, 4);
+
std::unique_ptr<aiScene> scenecopy(scenecopy_tmp);
const ScenePrivateData* const priv = ScenePriv(pScene);
@@ -340,7 +397,7 @@ aiReturn Exporter::Export( const aiScene* pScene, const char* pFormatId, const c
}
if (verbosify || (exp.mEnforcePP & aiProcess_JoinIdenticalVertices)) {
- DefaultLogger::get()->debug("export: Scene data not in verbose format, applying MakeVerboseFormat step first");
+ ASSIMP_LOG_DEBUG("export: Scene data not in verbose format, applying MakeVerboseFormat step first");
MakeVerboseFormatProcess proc;
proc.Execute(scenecopy.get());
@@ -351,6 +408,8 @@ aiReturn Exporter::Export( const aiScene* pScene, const char* pFormatId, const c
}
}
+ pimpl->mProgressHandler->UpdateFileWrite(2, 4);
+
if (pp) {
// the three 'conversion' steps need to be executed first because all other steps rely on the standard data layout
{
@@ -374,6 +433,11 @@ aiReturn Exporter::Export( const aiScene* pScene, const char* pFormatId, const c
}
}
+ bool exportPointCloud(false);
+ if (nullptr != pProperties) {
+ exportPointCloud = pProperties->GetPropertyBool(AI_CONFIG_EXPORT_POINT_CLOUDS);
+ }
+
// dispatch other processes
for( unsigned int a = 0; a < pimpl->mPostProcessingSteps.size(); a++) {
BaseProcess* const p = pimpl->mPostProcessingSteps[a];
@@ -382,16 +446,20 @@ aiReturn Exporter::Export( const aiScene* pScene, const char* pFormatId, const c
&& !dynamic_cast<FlipUVsProcess*>(p)
&& !dynamic_cast<FlipWindingOrderProcess*>(p)
&& !dynamic_cast<MakeLeftHandedProcess*>(p)) {
-
+ if (dynamic_cast<PretransformVertices*>(p) && exportPointCloud) {
+ continue;
+ }
p->Execute(scenecopy.get());
}
}
ScenePrivateData* const privOut = ScenePriv(scenecopy.get());
- ai_assert(privOut);
+ ai_assert(nullptr != privOut);
privOut->mPPStepsApplied |= pp;
}
+ pimpl->mProgressHandler->UpdateFileWrite(3, 4);
+
if(must_join_again) {
JoinVerticesProcess proc;
proc.Execute(scenecopy.get());
@@ -399,6 +467,8 @@ aiReturn Exporter::Export( const aiScene* pScene, const char* pFormatId, const c
ExportProperties emptyProperties; // Never pass NULL ExportProperties so Exporters don't have to worry.
exp.mExportFunction(pPath,pimpl->mIOSystem.get(),scenecopy.get(), pProperties ? pProperties : &emptyProperties);
+
+ pimpl->mProgressHandler->UpdateFileWrite(4, 4);
} catch (DeadlyExportError& err) {
pimpl->mError = err.what();
return AI_FAILURE;
@@ -409,7 +479,7 @@ aiReturn Exporter::Export( const aiScene* pScene, const char* pFormatId, const c
pimpl->mError = std::string("Found no exporter to handle this file format: ") + pFormatId;
ASSIMP_END_EXCEPTION_REGION(aiReturn);
-
+
return AI_FAILURE;
}
@@ -418,11 +488,10 @@ const char* Exporter::GetErrorString() const {
return pimpl->mError.c_str();
}
-
// ------------------------------------------------------------------------------------------------
void Exporter::FreeBlob() {
delete pimpl->blob;
- pimpl->blob = NULL;
+ pimpl->blob = nullptr;
pimpl->mError = "";
}
@@ -435,7 +504,7 @@ const aiExportDataBlob* Exporter::GetBlob() const {
// ------------------------------------------------------------------------------------------------
const aiExportDataBlob* Exporter::GetOrphanedBlob() const {
const aiExportDataBlob* tmp = pimpl->blob;
- pimpl->blob = NULL;
+ pimpl->blob = nullptr;
return tmp;
}
@@ -447,7 +516,7 @@ size_t Exporter::GetExportFormatCount() const {
// ------------------------------------------------------------------------------------------------
const aiExportFormatDesc* Exporter::GetExportFormatDescription( size_t index ) const {
if (index >= GetExportFormatCount()) {
- return NULL;
+ return nullptr;
}
// Return from static storage if the requested index is built-in.
@@ -472,7 +541,8 @@ aiReturn Exporter::RegisterExporter(const ExportFormatEntry& desc) {
// ------------------------------------------------------------------------------------------------
void Exporter::UnregisterExporter(const char* id) {
- for(std::vector<ExportFormatEntry>::iterator it = pimpl->mExporters.begin(); it != pimpl->mExporters.end(); ++it) {
+ for(std::vector<ExportFormatEntry>::iterator it = pimpl->mExporters.begin();
+ it != pimpl->mExporters.end(); ++it) {
if (!strcmp((*it).mDescription.id,id)) {
pimpl->mExporters.erase(it);
break;
@@ -508,82 +578,69 @@ bool ExportProperties::SetPropertyFloat(const char* szName, ai_real iValue) {
// ------------------------------------------------------------------------------------------------
// Set a configuration property
-bool ExportProperties :: SetPropertyString(const char* szName, const std::string& value)
-{
+bool ExportProperties::SetPropertyString(const char* szName, const std::string& value) {
return SetGenericProperty<std::string>(mStringProperties, szName,value);
}
// ------------------------------------------------------------------------------------------------
// Set a configuration property
-bool ExportProperties :: SetPropertyMatrix(const char* szName, const aiMatrix4x4& value)
-{
+bool ExportProperties::SetPropertyMatrix(const char* szName, const aiMatrix4x4& value) {
return SetGenericProperty<aiMatrix4x4>(mMatrixProperties, szName,value);
}
// ------------------------------------------------------------------------------------------------
// Get a configuration property
-int ExportProperties :: GetPropertyInteger(const char* szName,
- int iErrorReturn /*= 0xffffffff*/) const
-{
+int ExportProperties::GetPropertyInteger(const char* szName, int iErrorReturn /*= 0xffffffff*/) const {
return GetGenericProperty<int>(mIntProperties,szName,iErrorReturn);
}
// ------------------------------------------------------------------------------------------------
// Get a configuration property
-ai_real ExportProperties :: GetPropertyFloat(const char* szName,
- ai_real iErrorReturn /*= 10e10*/) const
-{
+ai_real ExportProperties::GetPropertyFloat(const char* szName, ai_real iErrorReturn /*= 10e10*/) const {
return GetGenericProperty<ai_real>(mFloatProperties,szName,iErrorReturn);
}
// ------------------------------------------------------------------------------------------------
// Get a configuration property
-const std::string ExportProperties :: GetPropertyString(const char* szName,
- const std::string& iErrorReturn /*= ""*/) const
-{
+const std::string ExportProperties::GetPropertyString(const char* szName,
+ const std::string& iErrorReturn /*= ""*/) const {
return GetGenericProperty<std::string>(mStringProperties,szName,iErrorReturn);
}
// ------------------------------------------------------------------------------------------------
// Has a configuration property
-const aiMatrix4x4 ExportProperties :: GetPropertyMatrix(const char* szName,
- const aiMatrix4x4& iErrorReturn /*= aiMatrix4x4()*/) const
-{
+const aiMatrix4x4 ExportProperties::GetPropertyMatrix(const char* szName,
+ const aiMatrix4x4& iErrorReturn /*= aiMatrix4x4()*/) const {
return GetGenericProperty<aiMatrix4x4>(mMatrixProperties,szName,iErrorReturn);
}
// ------------------------------------------------------------------------------------------------
// Has a configuration property
-bool ExportProperties :: HasPropertyInteger(const char* szName) const
-{
+bool ExportProperties::HasPropertyInteger(const char* szName) const {
return HasGenericProperty<int>(mIntProperties, szName);
}
// ------------------------------------------------------------------------------------------------
// Has a configuration property
-bool ExportProperties :: HasPropertyBool(const char* szName) const
-{
+bool ExportProperties::HasPropertyBool(const char* szName) const {
return HasGenericProperty<int>(mIntProperties, szName);
}
// ------------------------------------------------------------------------------------------------
// Has a configuration property
-bool ExportProperties :: HasPropertyFloat(const char* szName) const
-{
+bool ExportProperties::HasPropertyFloat(const char* szName) const {
return HasGenericProperty<ai_real>(mFloatProperties, szName);
}
// ------------------------------------------------------------------------------------------------
// Has a configuration property
-bool ExportProperties :: HasPropertyString(const char* szName) const
-{
+bool ExportProperties::HasPropertyString(const char* szName) const {
return HasGenericProperty<std::string>(mStringProperties, szName);
}
// ------------------------------------------------------------------------------------------------
// Has a configuration property
-bool ExportProperties :: HasPropertyMatrix(const char* szName) const
-{
+bool ExportProperties::HasPropertyMatrix(const char* szName) const {
return HasGenericProperty<aiMatrix4x4>(mMatrixProperties, szName);
}
diff --git a/code/FBXAnimation.cpp b/code/FBXAnimation.cpp
index 6b2c1eff6..24ab9b14b 100644
--- a/code/FBXAnimation.cpp
+++ b/code/FBXAnimation.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -50,12 +51,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "FBXDocument.h"
#include "FBXImporter.h"
#include "FBXDocumentUtil.h"
-#include "FBXProperties.h"
namespace Assimp {
namespace FBX {
- using namespace Util;
+using namespace Util;
// ------------------------------------------------------------------------------------------------
AnimationCurve::AnimationCurve(uint64_t id, const Element& element, const std::string& name, const Document& /*doc*/)
@@ -88,17 +88,16 @@ AnimationCurve::AnimationCurve(uint64_t id, const Element& element, const std::s
}
}
-
// ------------------------------------------------------------------------------------------------
AnimationCurve::~AnimationCurve()
{
-
+ // empty
}
-
// ------------------------------------------------------------------------------------------------
-AnimationCurveNode::AnimationCurveNode(uint64_t id, const Element& element, const std::string& name, const Document& doc,
- const char* const * target_prop_whitelist /*= NULL*/, size_t whitelist_size /*= 0*/)
+AnimationCurveNode::AnimationCurveNode(uint64_t id, const Element& element, const std::string& name,
+ const Document& doc, const char* const * target_prop_whitelist /*= NULL*/,
+ size_t whitelist_size /*= 0*/)
: Object(id, element, name)
, target()
, doc(doc)
@@ -155,18 +154,16 @@ AnimationCurveNode::AnimationCurveNode(uint64_t id, const Element& element, cons
props = GetPropertyTable(doc,"AnimationCurveNode.FbxAnimCurveNode",element,sc,false);
}
-
// ------------------------------------------------------------------------------------------------
AnimationCurveNode::~AnimationCurveNode()
{
-
+ // empty
}
-
// ------------------------------------------------------------------------------------------------
const AnimationCurveMap& AnimationCurveNode::Curves() const
{
- if(curves.empty()) {
+ if ( curves.empty() ) {
// resolve attached animation curves
const std::vector<const Connection*>& conns = doc.GetConnectionsByDestinationSequenced(ID(),"AnimationCurve");
@@ -196,7 +193,6 @@ const AnimationCurveMap& AnimationCurveNode::Curves() const
return curves;
}
-
// ------------------------------------------------------------------------------------------------
AnimationLayer::AnimationLayer(uint64_t id, const Element& element, const std::string& name, const Document& doc)
: Object(id, element, name)
@@ -208,14 +204,12 @@ AnimationLayer::AnimationLayer(uint64_t id, const Element& element, const std::s
props = GetPropertyTable(doc,"AnimationLayer.FbxAnimLayer",element,sc, true);
}
-
// ------------------------------------------------------------------------------------------------
AnimationLayer::~AnimationLayer()
{
-
+ // empty
}
-
// ------------------------------------------------------------------------------------------------
AnimationCurveNodeList AnimationLayer::Nodes(const char* const * target_prop_whitelist /*= NULL*/,
size_t whitelist_size /*= 0*/) const
@@ -299,14 +293,13 @@ AnimationStack::AnimationStack(uint64_t id, const Element& element, const std::s
}
}
-
// ------------------------------------------------------------------------------------------------
AnimationStack::~AnimationStack()
{
-
+ // empty
}
} //!FBX
} //!Assimp
-#endif
+#endif // ASSIMP_BUILD_NO_FBX_IMPORTER
diff --git a/code/FBXBinaryTokenizer.cpp b/code/FBXBinaryTokenizer.cpp
index 17cb942ff..b81a9f945 100644
--- a/code/FBXBinaryTokenizer.cpp
+++ b/code/FBXBinaryTokenizer.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -50,53 +51,52 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "FBXUtil.h"
#include <assimp/defs.h>
#include <stdint.h>
-#include "Exceptional.h"
-#include "ByteSwapper.h"
+#include <assimp/Exceptional.h>
+#include <assimp/ByteSwapper.h>
namespace Assimp {
namespace FBX {
-enum Flag
-{
- e_unknown_0 = 1 << 0,
- e_unknown_1 = 1 << 1,
- e_unknown_2 = 1 << 2,
- e_unknown_3 = 1 << 3,
- e_unknown_4 = 1 << 4,
- e_unknown_5 = 1 << 5,
- e_unknown_6 = 1 << 6,
- e_unknown_7 = 1 << 7,
- e_unknown_8 = 1 << 8,
- e_unknown_9 = 1 << 9,
- e_unknown_10 = 1 << 10,
- e_unknown_11 = 1 << 11,
- e_unknown_12 = 1 << 12,
- e_unknown_13 = 1 << 13,
- e_unknown_14 = 1 << 14,
- e_unknown_15 = 1 << 15,
- e_unknown_16 = 1 << 16,
- e_unknown_17 = 1 << 17,
- e_unknown_18 = 1 << 18,
- e_unknown_19 = 1 << 19,
- e_unknown_20 = 1 << 20,
- e_unknown_21 = 1 << 21,
- e_unknown_22 = 1 << 22,
- e_unknown_23 = 1 << 23,
- e_flag_field_size_64_bit = 1 << 24, // Not sure what is
- e_unknown_25 = 1 << 25,
- e_unknown_26 = 1 << 26,
- e_unknown_27 = 1 << 27,
- e_unknown_28 = 1 << 28,
- e_unknown_29 = 1 << 29,
- e_unknown_30 = 1 << 30,
- e_unknown_31 = 1 << 31
-};
-
-bool check_flag(uint32_t flags, Flag to_check)
-{
- return (flags & to_check) != 0;
-}
-
+//enum Flag
+//{
+// e_unknown_0 = 1 << 0,
+// e_unknown_1 = 1 << 1,
+// e_unknown_2 = 1 << 2,
+// e_unknown_3 = 1 << 3,
+// e_unknown_4 = 1 << 4,
+// e_unknown_5 = 1 << 5,
+// e_unknown_6 = 1 << 6,
+// e_unknown_7 = 1 << 7,
+// e_unknown_8 = 1 << 8,
+// e_unknown_9 = 1 << 9,
+// e_unknown_10 = 1 << 10,
+// e_unknown_11 = 1 << 11,
+// e_unknown_12 = 1 << 12,
+// e_unknown_13 = 1 << 13,
+// e_unknown_14 = 1 << 14,
+// e_unknown_15 = 1 << 15,
+// e_unknown_16 = 1 << 16,
+// e_unknown_17 = 1 << 17,
+// e_unknown_18 = 1 << 18,
+// e_unknown_19 = 1 << 19,
+// e_unknown_20 = 1 << 20,
+// e_unknown_21 = 1 << 21,
+// e_unknown_22 = 1 << 22,
+// e_unknown_23 = 1 << 23,
+// e_flag_field_size_64_bit = 1 << 24, // Not sure what is
+// e_unknown_25 = 1 << 25,
+// e_unknown_26 = 1 << 26,
+// e_unknown_27 = 1 << 27,
+// e_unknown_28 = 1 << 28,
+// e_unknown_29 = 1 << 29,
+// e_unknown_30 = 1 << 30,
+// e_unknown_31 = 1 << 31
+//};
+//
+//bool check_flag(uint32_t flags, Flag to_check)
+//{
+// return (flags & to_check) != 0;
+//}
// ------------------------------------------------------------------------------------------------
Token::Token(const char* sbegin, const char* send, TokenType type, unsigned int offset)
:
@@ -130,29 +130,26 @@ AI_WONT_RETURN void TokenizeError(const std::string& message, unsigned int offse
// ------------------------------------------------------------------------------------------------
-uint32_t Offset(const char* begin, const char* cursor)
-{
+uint32_t Offset(const char* begin, const char* cursor) {
ai_assert(begin <= cursor);
+
return static_cast<unsigned int>(cursor - begin);
}
-
// ------------------------------------------------------------------------------------------------
-void TokenizeError(const std::string& message, const char* begin, const char* cursor)
-{
+void TokenizeError(const std::string& message, const char* begin, const char* cursor) {
TokenizeError(message, Offset(begin, cursor));
}
-
// ------------------------------------------------------------------------------------------------
-uint32_t ReadWord(const char* input, const char*& cursor, const char* end)
-{
+uint32_t ReadWord(const char* input, const char*& cursor, const char* end) {
const size_t k_to_read = sizeof( uint32_t );
if(Offset(cursor, end) < k_to_read ) {
TokenizeError("cannot ReadWord, out of bounds",input, cursor);
}
- uint32_t word = *reinterpret_cast<const uint32_t*>(cursor);
+ uint32_t word;
+ ::memcpy(&word, cursor, 4);
AI_SWAP4(word);
cursor += k_to_read;
@@ -161,14 +158,14 @@ uint32_t ReadWord(const char* input, const char*& cursor, const char* end)
}
// ------------------------------------------------------------------------------------------------
-uint64_t ReadDoubleWord(const char* input, const char*& cursor, const char* end)
-{
+uint64_t ReadDoubleWord(const char* input, const char*& cursor, const char* end) {
const size_t k_to_read = sizeof(uint64_t);
if(Offset(cursor, end) < k_to_read) {
TokenizeError("cannot ReadDoubleWord, out of bounds",input, cursor);
}
- uint64_t dword = *reinterpret_cast<const uint64_t*>(cursor);
+ uint64_t dword /*= *reinterpret_cast<const uint64_t*>(cursor)*/;
+ ::memcpy( &dword, cursor, sizeof( uint64_t ) );
AI_SWAP8(dword);
cursor += k_to_read;
@@ -176,26 +173,22 @@ uint64_t ReadDoubleWord(const char* input, const char*& cursor, const char* end)
return dword;
}
-
// ------------------------------------------------------------------------------------------------
-uint8_t ReadByte(const char* input, const char*& cursor, const char* end)
-{
+uint8_t ReadByte(const char* input, const char*& cursor, const char* end) {
if(Offset(cursor, end) < sizeof( uint8_t ) ) {
TokenizeError("cannot ReadByte, out of bounds",input, cursor);
}
- uint8_t word = *reinterpret_cast<const uint8_t*>(cursor);
+ uint8_t word;/* = *reinterpret_cast< const uint8_t* >( cursor )*/
+ ::memcpy( &word, cursor, sizeof( uint8_t ) );
++cursor;
return word;
}
-
// ------------------------------------------------------------------------------------------------
-unsigned int ReadString(const char*& sbegin_out, const char*& send_out, const char* input, const char*& cursor, const char* end,
- bool long_length = false,
- bool allow_null = false)
-{
+unsigned int ReadString(const char*& sbegin_out, const char*& send_out, const char* input,
+ const char*& cursor, const char* end, bool long_length = false, bool allow_null = false) {
const uint32_t len_len = long_length ? 4 : 1;
if(Offset(cursor, end) < len_len) {
TokenizeError("cannot ReadString, out of bounds reading length",input, cursor);
@@ -224,8 +217,7 @@ unsigned int ReadString(const char*& sbegin_out, const char*& send_out, const ch
}
// ------------------------------------------------------------------------------------------------
-void ReadData(const char*& sbegin_out, const char*& send_out, const char* input, const char*& cursor, const char* end)
-{
+void ReadData(const char*& sbegin_out, const char*& send_out, const char* input, const char*& cursor, const char* end) {
if(Offset(cursor, end) < 1) {
TokenizeError("cannot ReadData, out of bounds reading length",input, cursor);
}
@@ -343,10 +335,10 @@ void ReadData(const char*& sbegin_out, const char*& send_out, const char* input,
// ------------------------------------------------------------------------------------------------
-bool ReadScope(TokenList& output_tokens, const char* input, const char*& cursor, const char* end, uint32_t const flags)
+bool ReadScope(TokenList& output_tokens, const char* input, const char*& cursor, const char* end, bool const is64bits)
{
// the first word contains the offset at which this block ends
- const uint64_t end_offset = /*check_flag(flags, e_flag_field_size_64_bit) ? ReadDoubleWord(input, cursor, end) : */ReadWord(input, cursor, end);
+ const uint64_t end_offset = is64bits ? ReadDoubleWord(input, cursor, end) : ReadWord(input, cursor, end);
// we may get 0 if reading reached the end of the file -
// fbx files have a mysterious extra footer which I don't know
@@ -364,10 +356,10 @@ bool ReadScope(TokenList& output_tokens, const char* input, const char*& cursor,
}
// the second data word contains the number of properties in the scope
- const uint64_t prop_count = /*check_flag(flags, e_flag_field_size_64_bit) ? ReadDoubleWord(input, cursor, end) : */ReadWord(input, cursor, end);
+ const uint64_t prop_count = is64bits ? ReadDoubleWord(input, cursor, end) : ReadWord(input, cursor, end);
// the third data word contains the length of the property list
- const uint64_t prop_length = /*check_flag(flags, e_flag_field_size_64_bit) ? ReadDoubleWord(input, cursor, end) :*/ ReadWord(input, cursor, end);
+ const uint64_t prop_length = is64bits ? ReadDoubleWord(input, cursor, end) : ReadWord(input, cursor, end);
// now comes the name of the scope/key
const char* sbeg, *send;
@@ -394,7 +386,7 @@ bool ReadScope(TokenList& output_tokens, const char* input, const char*& cursor,
// at the end of each nested block, there is a NUL record to indicate
// that the sub-scope exists (i.e. to distinguish between P: and P : {})
// this NUL record is 13 bytes long on 32 bit version and 25 bytes long on 64 bit.
- const size_t sentinel_block_length = /*check_flag(flags, e_flag_field_size_64_bit) ? (sizeof(uint64_t) * 3 + 1) : */(sizeof(uint32_t) * 3 + 1);
+ const size_t sentinel_block_length = is64bits ? (sizeof(uint64_t)* 3 + 1) : (sizeof(uint32_t)* 3 + 1);
if (Offset(input, cursor) < end_offset) {
if (end_offset - Offset(input, cursor) < sentinel_block_length) {
@@ -405,7 +397,7 @@ bool ReadScope(TokenList& output_tokens, const char* input, const char*& cursor,
// XXX this is vulnerable to stack overflowing ..
while(Offset(input, cursor) < end_offset - sentinel_block_length) {
- ReadScope(output_tokens, input, cursor, input + end_offset - sentinel_block_length, flags);
+ ReadScope(output_tokens, input, cursor, input + end_offset - sentinel_block_length, is64bits);
}
output_tokens.push_back(new_Token(cursor, cursor + 1, TokenType_CLOSE_BRACKET, Offset(input, cursor) ));
@@ -424,10 +416,10 @@ bool ReadScope(TokenList& output_tokens, const char* input, const char*& cursor,
return true;
}
-
-}
+} // anonymous namespace
// ------------------------------------------------------------------------------------------------
+// TODO: Test FBX Binary files newer than the 7500 version to check if the 64 bits address behaviour is consistent
void TokenizeBinary(TokenList& output_tokens, const char* input, unsigned int length)
{
ai_assert(input);
@@ -436,22 +428,29 @@ void TokenizeBinary(TokenList& output_tokens, const char* input, unsigned int le
TokenizeError("file is too short",0);
}
- if (strncmp(input,"Kaydara FBX Binary",18)) {
- TokenizeError("magic bytes not found",0);
- }
-
-
//uint32_t offset = 0x15;
- const char* cursor = input + 0x15;
+/* const char* cursor = input + 0x15;
const uint32_t flags = ReadWord(input, cursor, input + length);
const uint8_t padding_0 = ReadByte(input, cursor, input + length); // unused
- const uint8_t padding_1 = ReadByte(input, cursor, input + length); // unused
+ const uint8_t padding_1 = ReadByte(input, cursor, input + length); // unused*/
- while (cursor < input + length)
- {
- if(!ReadScope(output_tokens, input, cursor, input + length, flags)) {
+ if (strncmp(input,"Kaydara FBX Binary",18)) {
+ TokenizeError("magic bytes not found",0);
+ }
+
+ const char* cursor = input + 18;
+ /*Result ignored*/ ReadByte(input, cursor, input + length);
+ /*Result ignored*/ ReadByte(input, cursor, input + length);
+ /*Result ignored*/ ReadByte(input, cursor, input + length);
+ /*Result ignored*/ ReadByte(input, cursor, input + length);
+ /*Result ignored*/ ReadByte(input, cursor, input + length);
+ const uint32_t version = ReadWord(input, cursor, input + length);
+ const bool is64bits = version >= 7500;
+ const char *end = input + length;
+ while (cursor < end ) {
+ if (!ReadScope(output_tokens, input, cursor, input + length, is64bits)) {
break;
}
}
diff --git a/code/FBXCommon.h b/code/FBXCommon.h
new file mode 100644
index 000000000..60b040552
--- /dev/null
+++ b/code/FBXCommon.h
@@ -0,0 +1,86 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2018, assimp 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 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 FBXCommon.h
+* Some useful constants and enums for dealing with FBX files.
+*/
+#ifndef AI_FBXCOMMON_H_INC
+#define AI_FBXCOMMON_H_INC
+
+#ifndef ASSIMP_BUILD_NO_FBX_EXPORTER
+
+
+namespace FBX
+{
+ const std::string NULL_RECORD = { // 13 null bytes
+ '\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0'
+ }; // who knows why
+ const std::string SEPARATOR = {'\x00', '\x01'}; // for use inside strings
+ const std::string MAGIC_NODE_TAG = "_$AssimpFbx$"; // from import
+ const int64_t SECOND = 46186158000; // FBX's kTime unit
+
+ // rotation order. We'll probably use EulerXYZ for everything
+ enum RotOrder {
+ RotOrder_EulerXYZ = 0,
+ RotOrder_EulerXZY,
+ RotOrder_EulerYZX,
+ RotOrder_EulerYXZ,
+ RotOrder_EulerZXY,
+ RotOrder_EulerZYX,
+
+ RotOrder_SphericXYZ,
+
+ RotOrder_MAX // end-of-enum sentinel
+ };
+
+ // transformation inheritance method. Most of the time RSrs
+ enum TransformInheritance {
+ TransformInheritance_RrSs = 0,
+ TransformInheritance_RSrs,
+ TransformInheritance_Rrs,
+
+ TransformInheritance_MAX // end-of-enum sentinel
+ };
+}
+
+#endif // ASSIMP_BUILD_NO_FBX_EXPORTER
+
+#endif // AI_FBXCOMMON_H_INC
diff --git a/code/FBXCompileConfig.h b/code/FBXCompileConfig.h
index d4d40b056..2e7336e85 100644
--- a/code/FBXCompileConfig.h
+++ b/code/FBXCompileConfig.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -66,4 +67,4 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# endif
#endif
-#endif
+#endif // INCLUDED_AI_FBX_COMPILECONFIG_H
diff --git a/code/FBXConverter.cpp b/code/FBXConverter.cpp
index b2e8e4a91..7dd9f94b4 100644
--- a/code/FBXConverter.cpp
+++ b/code/FBXConverter.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -52,397 +53,30 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "FBXUtil.h"
#include "FBXProperties.h"
#include "FBXImporter.h"
-#include "StringComparison.h"
+#include <assimp/StringComparison.h>
#include <assimp/scene.h>
+
#include <tuple>
#include <memory>
-
#include <iterator>
#include <vector>
+#include <sstream>
+#include <iomanip>
namespace Assimp {
namespace FBX {
using namespace Util;
-
#define MAGIC_NODE_TAG "_$AssimpFbx$"
#define CONVERT_FBX_TIME(time) static_cast<double>(time) / 46186158000L
-// XXX vc9's debugger won't step into anonymous namespaces
-//namespace {
-
-/** Dummy class to encapsulate the conversion process */
-class Converter
-{
-public:
- /**
- * The different parts that make up the final local transformation of a fbx-node
- */
- enum TransformationComp
- {
- TransformationComp_Translation = 0,
- TransformationComp_RotationOffset,
- TransformationComp_RotationPivot,
- TransformationComp_PreRotation,
- TransformationComp_Rotation,
- TransformationComp_PostRotation,
- TransformationComp_RotationPivotInverse,
- TransformationComp_ScalingOffset,
- TransformationComp_ScalingPivot,
- TransformationComp_Scaling,
- TransformationComp_ScalingPivotInverse,
- TransformationComp_GeometricTranslation,
- TransformationComp_GeometricRotation,
- TransformationComp_GeometricScaling,
-
- TransformationComp_MAXIMUM
- };
-
-public:
- Converter( aiScene* out, const Document& doc );
- ~Converter();
-
-private:
- // ------------------------------------------------------------------------------------------------
- // find scene root and trigger recursive scene conversion
- void ConvertRootNode();
-
- // ------------------------------------------------------------------------------------------------
- // collect and assign child nodes
- void ConvertNodes( uint64_t id, aiNode& parent, const aiMatrix4x4& parent_transform = aiMatrix4x4() );
-
- // ------------------------------------------------------------------------------------------------
- void ConvertLights( const Model& model );
-
- // ------------------------------------------------------------------------------------------------
- void ConvertCameras( const Model& model );
-
- // ------------------------------------------------------------------------------------------------
- void ConvertLight( const Model& model, const Light& light );
-
- // ------------------------------------------------------------------------------------------------
- void ConvertCamera( const Model& model, const Camera& cam );
-
- // ------------------------------------------------------------------------------------------------
- // this returns unified names usable within assimp identifiers (i.e. no space characters -
- // while these would be allowed, they are a potential trouble spot so better not use them).
- const char* NameTransformationComp( TransformationComp comp );
-
- // ------------------------------------------------------------------------------------------------
- // note: this returns the REAL fbx property names
- const char* NameTransformationCompProperty( TransformationComp comp );
-
- // ------------------------------------------------------------------------------------------------
- aiVector3D TransformationCompDefaultValue( TransformationComp comp );
-
- // ------------------------------------------------------------------------------------------------
- void GetRotationMatrix( Model::RotOrder mode, const aiVector3D& rotation, aiMatrix4x4& out );
- // ------------------------------------------------------------------------------------------------
- /**
- * checks if a node has more than just scaling, rotation and translation components
- */
- bool NeedsComplexTransformationChain( const Model& model );
-
- // ------------------------------------------------------------------------------------------------
- // note: name must be a FixNodeName() result
- std::string NameTransformationChainNode( const std::string& name, TransformationComp comp );
-
- // ------------------------------------------------------------------------------------------------
- /**
- * note: memory for output_nodes will be managed by the caller
- */
- void GenerateTransformationNodeChain( const Model& model, std::vector<aiNode*>& output_nodes );
-
- // ------------------------------------------------------------------------------------------------
- void SetupNodeMetadata( const Model& model, aiNode& nd );
-
- // ------------------------------------------------------------------------------------------------
- void ConvertModel( const Model& model, aiNode& nd, const aiMatrix4x4& node_global_transform );
-
- // ------------------------------------------------------------------------------------------------
- // MeshGeometry -> aiMesh, return mesh index + 1 or 0 if the conversion failed
- std::vector<unsigned int> ConvertMesh( const MeshGeometry& mesh, const Model& model,
- const aiMatrix4x4& node_global_transform );
-
- // ------------------------------------------------------------------------------------------------
- aiMesh* SetupEmptyMesh( const MeshGeometry& mesh );
-
- // ------------------------------------------------------------------------------------------------
- unsigned int ConvertMeshSingleMaterial( const MeshGeometry& mesh, const Model& model,
- const aiMatrix4x4& node_global_transform );
-
- // ------------------------------------------------------------------------------------------------
- std::vector<unsigned int> ConvertMeshMultiMaterial( const MeshGeometry& mesh, const Model& model,
- const aiMatrix4x4& node_global_transform );
-
- // ------------------------------------------------------------------------------------------------
- unsigned int ConvertMeshMultiMaterial( const MeshGeometry& mesh, const Model& model,
- MatIndexArray::value_type index,
- const aiMatrix4x4& node_global_transform );
-
- // ------------------------------------------------------------------------------------------------
- static const unsigned int NO_MATERIAL_SEPARATION = /* std::numeric_limits<unsigned int>::max() */
- static_cast<unsigned int>(-1);
-
- // ------------------------------------------------------------------------------------------------
- /**
- * - if materialIndex == NO_MATERIAL_SEPARATION, materials are not taken into
- * account when determining which weights to include.
- * - outputVertStartIndices is only used when a material index is specified, it gives for
- * each output vertex the DOM index it maps to.
- */
- void ConvertWeights( aiMesh* out, const Model& model, const MeshGeometry& geo,
- const aiMatrix4x4& node_global_transform = aiMatrix4x4(),
- unsigned int materialIndex = NO_MATERIAL_SEPARATION,
- std::vector<unsigned int>* outputVertStartIndices = NULL );
-
- // ------------------------------------------------------------------------------------------------
- void ConvertCluster( std::vector<aiBone*>& bones, const Model& /*model*/, const Cluster& cl,
- std::vector<size_t>& out_indices,
- std::vector<size_t>& index_out_indices,
- std::vector<size_t>& count_out_indices,
- const aiMatrix4x4& node_global_transform );
-
- // ------------------------------------------------------------------------------------------------
- void ConvertMaterialForMesh( aiMesh* out, const Model& model, const MeshGeometry& geo,
- MatIndexArray::value_type materialIndex );
-
- // ------------------------------------------------------------------------------------------------
- unsigned int GetDefaultMaterial();
-
-
- // ------------------------------------------------------------------------------------------------
- // Material -> aiMaterial
- unsigned int ConvertMaterial( const Material& material, const MeshGeometry* const mesh );
-
- // ------------------------------------------------------------------------------------------------
- // Video -> aiTexture
- unsigned int ConvertVideo( const Video& video );
-
- // ------------------------------------------------------------------------------------------------
- void TrySetTextureProperties( aiMaterial* out_mat, const TextureMap& textures,
- const std::string& propName,
- aiTextureType target, const MeshGeometry* const mesh );
-
- // ------------------------------------------------------------------------------------------------
- void TrySetTextureProperties( aiMaterial* out_mat, const LayeredTextureMap& layeredTextures,
- const std::string& propName,
- aiTextureType target, const MeshGeometry* const mesh );
-
- // ------------------------------------------------------------------------------------------------
- void SetTextureProperties( aiMaterial* out_mat, const TextureMap& textures, const MeshGeometry* const mesh );
-
- // ------------------------------------------------------------------------------------------------
- void SetTextureProperties( aiMaterial* out_mat, const LayeredTextureMap& layeredTextures, const MeshGeometry* const mesh );
-
- // ------------------------------------------------------------------------------------------------
- aiColor3D GetColorPropertyFromMaterial( const PropertyTable& props, const std::string& baseName,
- bool& result );
-
- // ------------------------------------------------------------------------------------------------
- void SetShadingPropertiesCommon( aiMaterial* out_mat, const PropertyTable& props );
-
- // ------------------------------------------------------------------------------------------------
- // get the number of fps for a FrameRate enumerated value
- static double FrameRateToDouble( FileGlobalSettings::FrameRate fp, double customFPSVal = -1.0 );
-
- // ------------------------------------------------------------------------------------------------
- // convert animation data to aiAnimation et al
- void ConvertAnimations();
-
- // ------------------------------------------------------------------------------------------------
- // rename a node already partially converted. fixed_name is a string previously returned by
- // FixNodeName, new_name specifies the string FixNodeName should return on all further invocations
- // which would previously have returned the old value.
- //
- // this also updates names in node animations, cameras and light sources and is thus slow.
- //
- // NOTE: the caller is responsible for ensuring that the new name is unique and does
- // not collide with any other identifiers. The best way to ensure this is to only
- // append to the old name, which is guaranteed to match these requirements.
- void RenameNode( const std::string& fixed_name, const std::string& new_name );
-
- // ------------------------------------------------------------------------------------------------
- // takes a fbx node name and returns the identifier to be used in the assimp output scene.
- // the function is guaranteed to provide consistent results over multiple invocations
- // UNLESS RenameNode() is called for a particular node name.
- std::string FixNodeName( const std::string& name );
-
- typedef std::map<const AnimationCurveNode*, const AnimationLayer*> LayerMap;
-
- // XXX: better use multi_map ..
- typedef std::map<std::string, std::vector<const AnimationCurveNode*> > NodeMap;
-
-
- // ------------------------------------------------------------------------------------------------
- void ConvertAnimationStack( const AnimationStack& st );
-
- // ------------------------------------------------------------------------------------------------
- void GenerateNodeAnimations( std::vector<aiNodeAnim*>& node_anims,
- const std::string& fixed_name,
- const std::vector<const AnimationCurveNode*>& curves,
- const LayerMap& layer_map,
- int64_t start, int64_t stop,
- double& max_time,
- double& min_time );
-
- // ------------------------------------------------------------------------------------------------
- bool IsRedundantAnimationData( const Model& target,
- TransformationComp comp,
- const std::vector<const AnimationCurveNode*>& curves );
-
- // ------------------------------------------------------------------------------------------------
- aiNodeAnim* GenerateRotationNodeAnim( const std::string& name,
- const Model& target,
- const std::vector<const AnimationCurveNode*>& curves,
- const LayerMap& layer_map,
- int64_t start, int64_t stop,
- double& max_time,
- double& min_time );
-
- // ------------------------------------------------------------------------------------------------
- aiNodeAnim* GenerateScalingNodeAnim( const std::string& name,
- const Model& /*target*/,
- const std::vector<const AnimationCurveNode*>& curves,
- const LayerMap& layer_map,
- int64_t start, int64_t stop,
- double& max_time,
- double& min_time );
-
- // ------------------------------------------------------------------------------------------------
- aiNodeAnim* GenerateTranslationNodeAnim( const std::string& name,
- const Model& /*target*/,
- const std::vector<const AnimationCurveNode*>& curves,
- const LayerMap& layer_map,
- int64_t start, int64_t stop,
- double& max_time,
- double& min_time,
- bool inverse = false );
-
- // ------------------------------------------------------------------------------------------------
- // generate node anim, extracting only Rotation, Scaling and Translation from the given chain
- aiNodeAnim* GenerateSimpleNodeAnim( const std::string& name,
- const Model& target,
- NodeMap::const_iterator chain[ TransformationComp_MAXIMUM ],
- NodeMap::const_iterator iter_end,
- const LayerMap& layer_map,
- int64_t start, int64_t stop,
- double& max_time,
- double& min_time,
- bool reverse_order = false );
-
- // key (time), value, mapto (component index)
- typedef std::tuple<std::shared_ptr<KeyTimeList>, std::shared_ptr<KeyValueList>, unsigned int > KeyFrameList;
- typedef std::vector<KeyFrameList> KeyFrameListList;
-
- // ------------------------------------------------------------------------------------------------
- KeyFrameListList GetKeyframeList( const std::vector<const AnimationCurveNode*>& nodes, int64_t start, int64_t stop );
-
- // ------------------------------------------------------------------------------------------------
- KeyTimeList GetKeyTimeList( const KeyFrameListList& inputs );
-
- // ------------------------------------------------------------------------------------------------
- void InterpolateKeys( aiVectorKey* valOut, const KeyTimeList& keys, const KeyFrameListList& inputs,
- const aiVector3D& def_value,
- double& max_time,
- double& min_time );
-
- // ------------------------------------------------------------------------------------------------
- void InterpolateKeys( aiQuatKey* valOut, const KeyTimeList& keys, const KeyFrameListList& inputs,
- const aiVector3D& def_value,
- double& maxTime,
- double& minTime,
- Model::RotOrder order );
-
- // ------------------------------------------------------------------------------------------------
- void ConvertTransformOrder_TRStoSRT( aiQuatKey* out_quat, aiVectorKey* out_scale,
- aiVectorKey* out_translation,
- const KeyFrameListList& scaling,
- const KeyFrameListList& translation,
- const KeyFrameListList& rotation,
- const KeyTimeList& times,
- double& maxTime,
- double& minTime,
- Model::RotOrder order,
- const aiVector3D& def_scale,
- const aiVector3D& def_translate,
- const aiVector3D& def_rotation );
-
- // ------------------------------------------------------------------------------------------------
- // euler xyz -> quat
- aiQuaternion EulerToQuaternion( const aiVector3D& rot, Model::RotOrder order );
-
- // ------------------------------------------------------------------------------------------------
- void ConvertScaleKeys( aiNodeAnim* na, const std::vector<const AnimationCurveNode*>& nodes, const LayerMap& /*layers*/,
- int64_t start, int64_t stop,
- double& maxTime,
- double& minTime );
-
- // ------------------------------------------------------------------------------------------------
- void ConvertTranslationKeys( aiNodeAnim* na, const std::vector<const AnimationCurveNode*>& nodes,
- const LayerMap& /*layers*/,
- int64_t start, int64_t stop,
- double& maxTime,
- double& minTime );
-
- // ------------------------------------------------------------------------------------------------
- void ConvertRotationKeys( aiNodeAnim* na, const std::vector<const AnimationCurveNode*>& nodes,
- const LayerMap& /*layers*/,
- int64_t start, int64_t stop,
- double& maxTime,
- double& minTime,
- Model::RotOrder order );
-
- // ------------------------------------------------------------------------------------------------
- // copy generated meshes, animations, lights, cameras and textures to the output scene
- void TransferDataToScene();
-
-private:
-
- // 0: not assigned yet, others: index is value - 1
- unsigned int defaultMaterialIndex;
-
- std::vector<aiMesh*> meshes;
- std::vector<aiMaterial*> materials;
- std::vector<aiAnimation*> animations;
- std::vector<aiLight*> lights;
- std::vector<aiCamera*> cameras;
- std::vector<aiTexture*> textures;
-
- typedef std::map<const Material*, unsigned int> MaterialMap;
- MaterialMap materials_converted;
-
- typedef std::map<const Video*, unsigned int> VideoMap;
- VideoMap textures_converted;
-
- typedef std::map<const Geometry*, std::vector<unsigned int> > MeshMap;
- MeshMap meshes_converted;
-
- // fixed node name -> which trafo chain components have animations?
- typedef std::map<std::string, unsigned int> NodeAnimBitMap;
- NodeAnimBitMap node_anim_chain_bits;
-
- // name -> has had its prefix_stripped?
- typedef std::map<std::string, bool> NodeNameMap;
- NodeNameMap node_names;
-
- typedef std::map<std::string, std::string> NameNameMap;
- NameNameMap renamed_nodes;
-
- double anim_fps;
-
- aiScene* const out;
- const FBX::Document& doc;
-};
-
-Converter::Converter( aiScene* out, const Document& doc )
- : defaultMaterialIndex()
- , out( out )
- , doc( doc )
-{
+FBXConverter::FBXConverter( aiScene* out, const Document& doc )
+: defaultMaterialIndex()
+, out( out )
+, doc( doc ) {
// animations need to be converted first since this will
// populate the node_anim_chain_bits map, which is needed
// to determine which nodes need to be generated.
@@ -468,6 +102,7 @@ Converter::Converter( aiScene* out, const Document& doc )
}
}
+ ConvertGlobalSettings();
TransferDataToScene();
// if we didn't read any meshes set the AI_SCENE_FLAGS_INCOMPLETE
@@ -479,8 +114,7 @@ Converter::Converter( aiScene* out, const Document& doc )
}
-Converter::~Converter()
-{
+FBXConverter::~FBXConverter() {
std::for_each( meshes.begin(), meshes.end(), Util::delete_fun<aiMesh>() );
std::for_each( materials.begin(), materials.end(), Util::delete_fun<aiMaterial>() );
std::for_each( animations.begin(), animations.end(), Util::delete_fun<aiAnimation>() );
@@ -489,8 +123,7 @@ Converter::~Converter()
std::for_each( textures.begin(), textures.end(), Util::delete_fun<aiTexture>() );
}
-void Converter::ConvertRootNode()
-{
+void FBXConverter::ConvertRootNode() {
out->mRootNode = new aiNode();
out->mRootNode->mName.Set( "RootNode" );
@@ -498,15 +131,14 @@ void Converter::ConvertRootNode()
ConvertNodes( 0L, *out->mRootNode );
}
-
-void Converter::ConvertNodes( uint64_t id, aiNode& parent, const aiMatrix4x4& parent_transform )
-{
+void FBXConverter::ConvertNodes( uint64_t id, aiNode& parent, const aiMatrix4x4& parent_transform ) {
const std::vector<const Connection*>& conns = doc.GetConnectionsByDestinationSequenced( id, "Model" );
std::vector<aiNode*> nodes;
nodes.reserve( conns.size() );
std::vector<aiNode*> nodes_chain;
+ std::vector<aiNode*> post_nodes_chain;
try {
for( const Connection* con : conns ) {
@@ -517,15 +149,16 @@ void Converter::ConvertNodes( uint64_t id, aiNode& parent, const aiMatrix4x4& pa
}
const Object* const object = con->SourceObject();
- if ( !object ) {
+ if ( nullptr == object ) {
FBXImporter::LogWarn( "failed to convert source object for Model link" );
continue;
}
const Model* const model = dynamic_cast<const Model*>( object );
- if ( model ) {
+ if ( nullptr != model ) {
nodes_chain.clear();
+ post_nodes_chain.clear();
aiMatrix4x4 new_abs_transform = parent_transform;
@@ -533,11 +166,11 @@ void Converter::ConvertNodes( uint64_t id, aiNode& parent, const aiMatrix4x4& pa
// assimp (or rather: the complicated transformation chain that
// is employed by fbx) means that we may need multiple aiNode's
// to represent a fbx node's transformation.
- GenerateTransformationNodeChain( *model, nodes_chain );
+ GenerateTransformationNodeChain( *model, nodes_chain, post_nodes_chain );
ai_assert( nodes_chain.size() );
- const std::string& original_name = FixNodeName( model->Name() );
+ std::string original_name = FixNodeName( model->Name() );
// check if any of the nodes in the chain has the name the fbx node
// is supposed to have. If there is none, add another node to
@@ -552,8 +185,11 @@ void Converter::ConvertNodes( uint64_t id, aiNode& parent, const aiMatrix4x4& pa
}
if ( !name_carrier ) {
+ std::string old_original_name = original_name;
+ GetUniqueName(old_original_name, original_name);
nodes_chain.push_back( new aiNode( original_name ) );
- name_carrier = nodes_chain.back();
+ } else {
+ original_name = nodes_chain.back()->mName.C_Str();
}
//setup metadata on newest node
@@ -579,15 +215,46 @@ void Converter::ConvertNodes( uint64_t id, aiNode& parent, const aiMatrix4x4& pa
// attach geometry
ConvertModel( *model, *nodes_chain.back(), new_abs_transform );
- // attach sub-nodes
- ConvertNodes( model->ID(), *nodes_chain.back(), new_abs_transform );
+ // check if there will be any child nodes
+ const std::vector<const Connection*>& child_conns
+ = doc.GetConnectionsByDestinationSequenced( model->ID(), "Model" );
+
+ // if so, link the geometric transform inverse nodes
+ // before we attach any child nodes
+ if (child_conns.size()) {
+ for( aiNode* postnode : post_nodes_chain ) {
+ ai_assert( postnode );
+
+ if ( last_parent != &parent ) {
+ last_parent->mNumChildren = 1;
+ last_parent->mChildren = new aiNode*[ 1 ];
+ last_parent->mChildren[ 0 ] = postnode;
+ }
+
+ postnode->mParent = last_parent;
+ last_parent = postnode;
+
+ new_abs_transform *= postnode->mTransformation;
+ }
+ } else {
+ // free the nodes we allocated as we don't need them
+ Util::delete_fun<aiNode> deleter;
+ std::for_each(
+ post_nodes_chain.begin(),
+ post_nodes_chain.end(),
+ deleter
+ );
+ }
+
+ // attach sub-nodes (if any)
+ ConvertNodes( model->ID(), *last_parent, new_abs_transform );
if ( doc.Settings().readLights ) {
- ConvertLights( *model );
+ ConvertLights( *model, original_name );
}
if ( doc.Settings().readCameras ) {
- ConvertCameras( *model );
+ ConvertCameras( *model, original_name );
}
nodes.push_back( nodes_chain.front() );
@@ -606,39 +273,36 @@ void Converter::ConvertNodes( uint64_t id, aiNode& parent, const aiMatrix4x4& pa
Util::delete_fun<aiNode> deleter;
std::for_each( nodes.begin(), nodes.end(), deleter );
std::for_each( nodes_chain.begin(), nodes_chain.end(), deleter );
+ std::for_each( post_nodes_chain.begin(), post_nodes_chain.end(), deleter );
}
}
-void Converter::ConvertLights( const Model& model )
-{
+void FBXConverter::ConvertLights( const Model& model, const std::string &orig_name ) {
const std::vector<const NodeAttribute*>& node_attrs = model.GetAttributes();
for( const NodeAttribute* attr : node_attrs ) {
const Light* const light = dynamic_cast<const Light*>( attr );
if ( light ) {
- ConvertLight( model, *light );
+ ConvertLight( *light, orig_name );
}
}
}
-void Converter::ConvertCameras( const Model& model )
-{
+void FBXConverter::ConvertCameras( const Model& model, const std::string &orig_name ) {
const std::vector<const NodeAttribute*>& node_attrs = model.GetAttributes();
for( const NodeAttribute* attr : node_attrs ) {
const Camera* const cam = dynamic_cast<const Camera*>( attr );
if ( cam ) {
- ConvertCamera( model, *cam );
+ ConvertCamera( *cam, orig_name );
}
}
}
-
-void Converter::ConvertLight( const Model& model, const Light& light )
-{
+void FBXConverter::ConvertLight( const Light& light, const std::string &orig_name ) {
lights.push_back( new aiLight() );
aiLight* const out_light = lights.back();
- out_light->mName.Set( FixNodeName( model.Name() ) );
+ out_light->mName.Set( orig_name );
const float intensity = light.Intensity() / 100.0f;
const aiVector3D& col = light.Color();
@@ -711,114 +375,139 @@ void Converter::ConvertLight( const Model& model, const Light& light )
}
}
-void Converter::ConvertCamera( const Model& model, const Camera& cam )
+void FBXConverter::ConvertCamera( const Camera& cam, const std::string &orig_name )
{
cameras.push_back( new aiCamera() );
aiCamera* const out_camera = cameras.back();
- out_camera->mName.Set( FixNodeName( model.Name() ) );
+ out_camera->mName.Set( orig_name );
out_camera->mAspect = cam.AspectWidth() / cam.AspectHeight();
+
//cameras are defined along positive x direction
- out_camera->mPosition = aiVector3D(0.0f);
- out_camera->mLookAt = aiVector3D(1.0f, 0.0f, 0.0f);
- out_camera->mUp = aiVector3D(0.0f, 1.0f, 0.0f);
+ out_camera->mPosition = cam.Position();
+ out_camera->mLookAt = ( cam.InterestPosition() - out_camera->mPosition ).Normalize();
+ out_camera->mUp = cam.UpVector();
+
out_camera->mHorizontalFOV = AI_DEG_TO_RAD( cam.FieldOfView() );
out_camera->mClipPlaneNear = cam.NearPlane();
out_camera->mClipPlaneFar = cam.FarPlane();
}
-
-const char* Converter::NameTransformationComp( TransformationComp comp )
+void FBXConverter::GetUniqueName( const std::string &name, std::string &uniqueName )
{
- switch ( comp )
+ int i = 0;
+ uniqueName = name;
+ while (mNodeNames.find(uniqueName) != mNodeNames.end())
{
- case TransformationComp_Translation:
- return "Translation";
- case TransformationComp_RotationOffset:
- return "RotationOffset";
- case TransformationComp_RotationPivot:
- return "RotationPivot";
- case TransformationComp_PreRotation:
- return "PreRotation";
- case TransformationComp_Rotation:
- return "Rotation";
- case TransformationComp_PostRotation:
- return "PostRotation";
- case TransformationComp_RotationPivotInverse:
- return "RotationPivotInverse";
- case TransformationComp_ScalingOffset:
- return "ScalingOffset";
- case TransformationComp_ScalingPivot:
- return "ScalingPivot";
- case TransformationComp_Scaling:
- return "Scaling";
- case TransformationComp_ScalingPivotInverse:
- return "ScalingPivotInverse";
- case TransformationComp_GeometricScaling:
- return "GeometricScaling";
- case TransformationComp_GeometricRotation:
- return "GeometricRotation";
- case TransformationComp_GeometricTranslation:
- return "GeometricTranslation";
- case TransformationComp_MAXIMUM: // this is to silence compiler warnings
- default:
- break;
+ ++i;
+ std::stringstream ext;
+ ext << name << std::setfill('0') << std::setw(3) << i;
+ uniqueName = ext.str();
+ }
+ mNodeNames.insert(uniqueName);
+}
+
+
+const char* FBXConverter::NameTransformationComp( TransformationComp comp ) {
+ switch ( comp ) {
+ case TransformationComp_Translation:
+ return "Translation";
+ case TransformationComp_RotationOffset:
+ return "RotationOffset";
+ case TransformationComp_RotationPivot:
+ return "RotationPivot";
+ case TransformationComp_PreRotation:
+ return "PreRotation";
+ case TransformationComp_Rotation:
+ return "Rotation";
+ case TransformationComp_PostRotation:
+ return "PostRotation";
+ case TransformationComp_RotationPivotInverse:
+ return "RotationPivotInverse";
+ case TransformationComp_ScalingOffset:
+ return "ScalingOffset";
+ case TransformationComp_ScalingPivot:
+ return "ScalingPivot";
+ case TransformationComp_Scaling:
+ return "Scaling";
+ case TransformationComp_ScalingPivotInverse:
+ return "ScalingPivotInverse";
+ case TransformationComp_GeometricScaling:
+ return "GeometricScaling";
+ case TransformationComp_GeometricRotation:
+ return "GeometricRotation";
+ case TransformationComp_GeometricTranslation:
+ return "GeometricTranslation";
+ case TransformationComp_GeometricScalingInverse:
+ return "GeometricScalingInverse";
+ case TransformationComp_GeometricRotationInverse:
+ return "GeometricRotationInverse";
+ case TransformationComp_GeometricTranslationInverse:
+ return "GeometricTranslationInverse";
+ case TransformationComp_MAXIMUM: // this is to silence compiler warnings
+ default:
+ break;
}
ai_assert( false );
- return NULL;
-}
+ return nullptr;
+}
-const char* Converter::NameTransformationCompProperty( TransformationComp comp )
-{
- switch ( comp )
- {
- case TransformationComp_Translation:
- return "Lcl Translation";
- case TransformationComp_RotationOffset:
- return "RotationOffset";
- case TransformationComp_RotationPivot:
- return "RotationPivot";
- case TransformationComp_PreRotation:
- return "PreRotation";
- case TransformationComp_Rotation:
- return "Lcl Rotation";
- case TransformationComp_PostRotation:
- return "PostRotation";
- case TransformationComp_RotationPivotInverse:
- return "RotationPivotInverse";
- case TransformationComp_ScalingOffset:
- return "ScalingOffset";
- case TransformationComp_ScalingPivot:
- return "ScalingPivot";
- case TransformationComp_Scaling:
- return "Lcl Scaling";
- case TransformationComp_ScalingPivotInverse:
- return "ScalingPivotInverse";
- case TransformationComp_GeometricScaling:
- return "GeometricScaling";
- case TransformationComp_GeometricRotation:
- return "GeometricRotation";
- case TransformationComp_GeometricTranslation:
- return "GeometricTranslation";
- case TransformationComp_MAXIMUM: // this is to silence compiler warnings
- break;
+const char* FBXConverter::NameTransformationCompProperty( TransformationComp comp ) {
+ switch ( comp ) {
+ case TransformationComp_Translation:
+ return "Lcl Translation";
+ case TransformationComp_RotationOffset:
+ return "RotationOffset";
+ case TransformationComp_RotationPivot:
+ return "RotationPivot";
+ case TransformationComp_PreRotation:
+ return "PreRotation";
+ case TransformationComp_Rotation:
+ return "Lcl Rotation";
+ case TransformationComp_PostRotation:
+ return "PostRotation";
+ case TransformationComp_RotationPivotInverse:
+ return "RotationPivotInverse";
+ case TransformationComp_ScalingOffset:
+ return "ScalingOffset";
+ case TransformationComp_ScalingPivot:
+ return "ScalingPivot";
+ case TransformationComp_Scaling:
+ return "Lcl Scaling";
+ case TransformationComp_ScalingPivotInverse:
+ return "ScalingPivotInverse";
+ case TransformationComp_GeometricScaling:
+ return "GeometricScaling";
+ case TransformationComp_GeometricRotation:
+ return "GeometricRotation";
+ case TransformationComp_GeometricTranslation:
+ return "GeometricTranslation";
+ case TransformationComp_GeometricScalingInverse:
+ return "GeometricScalingInverse";
+ case TransformationComp_GeometricRotationInverse:
+ return "GeometricRotationInverse";
+ case TransformationComp_GeometricTranslationInverse:
+ return "GeometricTranslationInverse";
+ case TransformationComp_MAXIMUM: // this is to silence compiler warnings
+ break;
}
ai_assert( false );
- return NULL;
+
+ return nullptr;
}
-aiVector3D Converter::TransformationCompDefaultValue( TransformationComp comp )
+aiVector3D FBXConverter::TransformationCompDefaultValue( TransformationComp comp )
{
// XXX a neat way to solve the never-ending special cases for scaling
// would be to do everything in log space!
return comp == TransformationComp_Scaling ? aiVector3D( 1.f, 1.f, 1.f ) : aiVector3D();
}
-void Converter::GetRotationMatrix( Model::RotOrder mode, const aiVector3D& rotation, aiMatrix4x4& out )
+void FBXConverter::GetRotationMatrix( Model::RotOrder mode, const aiVector3D& rotation, aiMatrix4x4& out )
{
if ( mode == Model::RotOrder_SphericXYZ ) {
FBXImporter::LogError( "Unsupported RotationMode: SphericXYZ" );
@@ -889,11 +578,15 @@ void Converter::GetRotationMatrix( Model::RotOrder mode, const aiVector3D& rotat
default:
ai_assert( false );
+ break;
}
- ai_assert( ( order[ 0 ] >= 0 ) && ( order[ 0 ] <= 2 ) );
- ai_assert( ( order[ 1 ] >= 0 ) && ( order[ 1 ] <= 2 ) );
- ai_assert( ( order[ 2 ] >= 0 ) && ( order[ 2 ] <= 2 ) );
+ ai_assert( order[ 0 ] >= 0 );
+ ai_assert( order[ 0 ] <= 2 );
+ ai_assert( order[ 1 ] >= 0 );
+ ai_assert( order[ 1 ] <= 2 );
+ ai_assert( order[ 2 ] >= 0 );
+ ai_assert( order[ 2 ] <= 2 );
if ( !is_id[ order[ 0 ] ] ) {
out = temp[ order[ 0 ] ];
@@ -908,37 +601,44 @@ void Converter::GetRotationMatrix( Model::RotOrder mode, const aiVector3D& rotat
}
}
-bool Converter::NeedsComplexTransformationChain( const Model& model )
+bool FBXConverter::NeedsComplexTransformationChain( const Model& model )
{
const PropertyTable& props = model.Props();
bool ok;
const float zero_epsilon = 1e-6f;
+ const aiVector3D all_ones(1.0f, 1.0f, 1.0f);
for ( size_t i = 0; i < TransformationComp_MAXIMUM; ++i ) {
const TransformationComp comp = static_cast< TransformationComp >( i );
- if ( comp == TransformationComp_Rotation || comp == TransformationComp_Scaling || comp == TransformationComp_Translation ||
- comp == TransformationComp_GeometricScaling || comp == TransformationComp_GeometricRotation || comp == TransformationComp_GeometricTranslation ) {
+ if ( comp == TransformationComp_Rotation || comp == TransformationComp_Scaling || comp == TransformationComp_Translation ) {
continue;
}
+ bool scale_compare = ( comp == TransformationComp_GeometricScaling || comp == TransformationComp_Scaling );
+
const aiVector3D& v = PropertyGet<aiVector3D>( props, NameTransformationCompProperty( comp ), ok );
- if ( ok && v.SquareLength() > zero_epsilon ) {
- return true;
+ if ( ok && scale_compare ) {
+ if ( (v - all_ones).SquareLength() > zero_epsilon ) {
+ return true;
+ }
+ } else if ( ok ) {
+ if ( v.SquareLength() > zero_epsilon ) {
+ return true;
+ }
}
}
return false;
}
-std::string Converter::NameTransformationChainNode( const std::string& name, TransformationComp comp )
+std::string FBXConverter::NameTransformationChainNode( const std::string& name, TransformationComp comp )
{
return name + std::string( MAGIC_NODE_TAG ) + "_" + NameTransformationComp( comp );
}
-void Converter::GenerateTransformationNodeChain( const Model& model,
- std::vector<aiNode*>& output_nodes )
-{
+void FBXConverter::GenerateTransformationNodeChain( const Model& model, std::vector<aiNode*>& output_nodes,
+ std::vector<aiNode*>& post_output_nodes ) {
const PropertyTable& props = model.Props();
const Model::RotOrder rot = model.RotationOrder();
@@ -949,20 +649,21 @@ void Converter::GenerateTransformationNodeChain( const Model& model,
// generate transformation matrices for all the different transformation components
const float zero_epsilon = 1e-6f;
+ const aiVector3D all_ones(1.0f, 1.0f, 1.0f);
bool is_complex = false;
const aiVector3D& PreRotation = PropertyGet<aiVector3D>( props, "PreRotation", ok );
if ( ok && PreRotation.SquareLength() > zero_epsilon ) {
is_complex = true;
- GetRotationMatrix( rot, PreRotation, chain[ TransformationComp_PreRotation ] );
+ GetRotationMatrix( Model::RotOrder::RotOrder_EulerXYZ, PreRotation, chain[ TransformationComp_PreRotation ] );
}
const aiVector3D& PostRotation = PropertyGet<aiVector3D>( props, "PostRotation", ok );
if ( ok && PostRotation.SquareLength() > zero_epsilon ) {
is_complex = true;
- GetRotationMatrix( rot, PostRotation, chain[ TransformationComp_PostRotation ] );
+ GetRotationMatrix( Model::RotOrder::RotOrder_EulerXYZ, PostRotation, chain[ TransformationComp_PostRotation ] );
}
const aiVector3D& RotationPivot = PropertyGet<aiVector3D>( props, "RotationPivot", ok );
@@ -1001,7 +702,7 @@ void Converter::GenerateTransformationNodeChain( const Model& model,
}
const aiVector3D& Scaling = PropertyGet<aiVector3D>( props, "Lcl Scaling", ok );
- if ( ok && std::fabs( Scaling.SquareLength() - 1.0f ) > zero_epsilon ) {
+ if ( ok && (Scaling - all_ones).SquareLength() > zero_epsilon ) {
aiMatrix4x4::Scaling( Scaling, chain[ TransformationComp_Scaling ] );
}
@@ -1011,18 +712,38 @@ void Converter::GenerateTransformationNodeChain( const Model& model,
}
const aiVector3D& GeometricScaling = PropertyGet<aiVector3D>( props, "GeometricScaling", ok );
- if ( ok && std::fabs( GeometricScaling.SquareLength() - 1.0f ) > zero_epsilon ) {
+ if ( ok && (GeometricScaling - all_ones).SquareLength() > zero_epsilon ) {
+ is_complex = true;
aiMatrix4x4::Scaling( GeometricScaling, chain[ TransformationComp_GeometricScaling ] );
+ aiVector3D GeometricScalingInverse = GeometricScaling;
+ bool canscale = true;
+ for (unsigned int i = 0; i < 3; ++i) {
+ if ( std::fabs( GeometricScalingInverse[i] ) > zero_epsilon ) {
+ GeometricScalingInverse[i] = 1.0f / GeometricScaling[i];
+ } else {
+ FBXImporter::LogError( "cannot invert geometric scaling matrix with a 0.0 scale component" );
+ canscale = false;
+ break;
+ }
+ }
+ if (canscale) {
+ aiMatrix4x4::Scaling( GeometricScalingInverse, chain[ TransformationComp_GeometricScalingInverse ] );
+ }
}
const aiVector3D& GeometricRotation = PropertyGet<aiVector3D>( props, "GeometricRotation", ok );
if ( ok && GeometricRotation.SquareLength() > zero_epsilon ) {
+ is_complex = true;
GetRotationMatrix( rot, GeometricRotation, chain[ TransformationComp_GeometricRotation ] );
+ GetRotationMatrix( rot, GeometricRotation, chain[ TransformationComp_GeometricRotationInverse ] );
+ chain[ TransformationComp_GeometricRotationInverse ].Inverse();
}
const aiVector3D& GeometricTranslation = PropertyGet<aiVector3D>( props, "GeometricTranslation", ok );
if ( ok && GeometricTranslation.SquareLength() > zero_epsilon ) {
+ is_complex = true;
aiMatrix4x4::Translation( GeometricTranslation, chain[ TransformationComp_GeometricTranslation ] );
+ aiMatrix4x4::Translation( -GeometricTranslation, chain[ TransformationComp_GeometricTranslationInverse ] );
}
// is_complex needs to be consistent with NeedsComplexTransformationChain()
@@ -1030,7 +751,7 @@ void Converter::GenerateTransformationNodeChain( const Model& model,
// not be guaranteed.
ai_assert( NeedsComplexTransformationChain( model ) == is_complex );
- const std::string& name = FixNodeName( model.Name() );
+ std::string name = FixNodeName( model.Name() );
// now, if we have more than just Translation, Scaling and Rotation,
// we need to generate a full node chain to accommodate for assimp's
@@ -1052,11 +773,23 @@ void Converter::GenerateTransformationNodeChain( const Model& model,
continue;
}
- aiNode* nd = new aiNode();
- output_nodes.push_back( nd );
+ if ( comp == TransformationComp_PostRotation ) {
+ chain[ i ] = chain[ i ].Inverse();
+ }
+ aiNode* nd = new aiNode();
nd->mName.Set( NameTransformationChainNode( name, comp ) );
nd->mTransformation = chain[ i ];
+
+ // geometric inverses go in a post-node chain
+ if ( comp == TransformationComp_GeometricScalingInverse ||
+ comp == TransformationComp_GeometricRotationInverse ||
+ comp == TransformationComp_GeometricTranslationInverse
+ ) {
+ post_output_nodes.push_back( nd );
+ } else {
+ output_nodes.push_back( nd );
+ }
}
ai_assert( output_nodes.size() );
@@ -1066,21 +799,23 @@ void Converter::GenerateTransformationNodeChain( const Model& model,
// else, we can just multiply the matrices together
aiNode* nd = new aiNode();
output_nodes.push_back( nd );
+ std::string uniqueName;
+ GetUniqueName( name, uniqueName );
- nd->mName.Set( name );
+ nd->mName.Set( uniqueName );
for (const auto &transform : chain) {
nd->mTransformation = nd->mTransformation * transform;
}
}
-void Converter::SetupNodeMetadata( const Model& model, aiNode& nd )
+void FBXConverter::SetupNodeMetadata( const Model& model, aiNode& nd )
{
const PropertyTable& props = model.Props();
DirectPropertyMap unparsedProperties = props.GetUnparsedProperties();
// create metadata on node
- std::size_t numStaticMetaData = 2;
+ const std::size_t numStaticMetaData = 2;
aiMetadata* data = aiMetadata::Alloc( static_cast<unsigned int>(unparsedProperties.size() + numStaticMetaData) );
nd.mMetaData = data;
int index = 0;
@@ -1111,7 +846,7 @@ void Converter::SetupNodeMetadata( const Model& model, aiNode& nd )
}
}
-void Converter::ConvertModel( const Model& model, aiNode& nd, const aiMatrix4x4& node_global_transform )
+void FBXConverter::ConvertModel( const Model& model, aiNode& nd, const aiMatrix4x4& node_global_transform )
{
const std::vector<const Geometry*>& geos = model.GetGeometry();
@@ -1122,7 +857,7 @@ void Converter::ConvertModel( const Model& model, aiNode& nd, const aiMatrix4x4&
const MeshGeometry* const mesh = dynamic_cast< const MeshGeometry* >( geo );
if ( mesh ) {
- const std::vector<unsigned int>& indices = ConvertMesh( *mesh, model, node_global_transform );
+ const std::vector<unsigned int>& indices = ConvertMesh( *mesh, model, node_global_transform, nd);
std::copy( indices.begin(), indices.end(), std::back_inserter( meshes ) );
}
else {
@@ -1138,8 +873,8 @@ void Converter::ConvertModel( const Model& model, aiNode& nd, const aiMatrix4x4&
}
}
-std::vector<unsigned int> Converter::ConvertMesh( const MeshGeometry& mesh, const Model& model,
- const aiMatrix4x4& node_global_transform )
+std::vector<unsigned int> FBXConverter::ConvertMesh( const MeshGeometry& mesh, const Model& model,
+ const aiMatrix4x4& node_global_transform, aiNode& nd)
{
std::vector<unsigned int> temp;
@@ -1163,17 +898,17 @@ std::vector<unsigned int> Converter::ConvertMesh( const MeshGeometry& mesh, cons
const MatIndexArray::value_type base = mindices[ 0 ];
for( MatIndexArray::value_type index : mindices ) {
if ( index != base ) {
- return ConvertMeshMultiMaterial( mesh, model, node_global_transform );
+ return ConvertMeshMultiMaterial( mesh, model, node_global_transform, nd);
}
}
}
// faster code-path, just copy the data
- temp.push_back( ConvertMeshSingleMaterial( mesh, model, node_global_transform ) );
+ temp.push_back( ConvertMeshSingleMaterial( mesh, model, node_global_transform, nd) );
return temp;
}
-aiMesh* Converter::SetupEmptyMesh( const MeshGeometry& mesh )
+aiMesh* FBXConverter::SetupEmptyMesh( const MeshGeometry& mesh, aiNode& nd)
{
aiMesh* const out_mesh = new aiMesh();
meshes.push_back( out_mesh );
@@ -1188,15 +923,19 @@ aiMesh* Converter::SetupEmptyMesh( const MeshGeometry& mesh )
if ( name.length() ) {
out_mesh->mName.Set( name );
}
+ else
+ {
+ out_mesh->mName = nd.mName;
+ }
return out_mesh;
}
-unsigned int Converter::ConvertMeshSingleMaterial( const MeshGeometry& mesh, const Model& model,
- const aiMatrix4x4& node_global_transform )
+unsigned int FBXConverter::ConvertMeshSingleMaterial( const MeshGeometry& mesh, const Model& model,
+ const aiMatrix4x4& node_global_transform, aiNode& nd)
{
const MatIndexArray& mindices = mesh.GetMaterialIndices();
- aiMesh* const out_mesh = SetupEmptyMesh( mesh );
+ aiMesh* const out_mesh = SetupEmptyMesh(mesh, nd);
const std::vector<aiVector3D>& vertices = mesh.GetVertices();
const std::vector<unsigned int>& faces = mesh.GetFaceIndexCounts();
@@ -1319,8 +1058,8 @@ unsigned int Converter::ConvertMeshSingleMaterial( const MeshGeometry& mesh, con
return static_cast<unsigned int>( meshes.size() - 1 );
}
-std::vector<unsigned int> Converter::ConvertMeshMultiMaterial( const MeshGeometry& mesh, const Model& model,
- const aiMatrix4x4& node_global_transform )
+std::vector<unsigned int> FBXConverter::ConvertMeshMultiMaterial( const MeshGeometry& mesh, const Model& model,
+ const aiMatrix4x4& node_global_transform, aiNode& nd)
{
const MatIndexArray& mindices = mesh.GetMaterialIndices();
ai_assert( mindices.size() );
@@ -1331,7 +1070,7 @@ std::vector<unsigned int> Converter::ConvertMeshMultiMaterial( const MeshGeometr
for( MatIndexArray::value_type index : mindices ) {
if ( had.find( index ) == had.end() ) {
- indices.push_back( ConvertMeshMultiMaterial( mesh, model, index, node_global_transform ) );
+ indices.push_back( ConvertMeshMultiMaterial( mesh, model, index, node_global_transform, nd) );
had.insert( index );
}
}
@@ -1339,11 +1078,12 @@ std::vector<unsigned int> Converter::ConvertMeshMultiMaterial( const MeshGeometr
return indices;
}
-unsigned int Converter::ConvertMeshMultiMaterial( const MeshGeometry& mesh, const Model& model,
+unsigned int FBXConverter::ConvertMeshMultiMaterial( const MeshGeometry& mesh, const Model& model,
MatIndexArray::value_type index,
- const aiMatrix4x4& node_global_transform )
+ const aiMatrix4x4& node_global_transform,
+ aiNode& nd)
{
- aiMesh* const out_mesh = SetupEmptyMesh( mesh );
+ aiMesh* const out_mesh = SetupEmptyMesh(mesh, nd);
const MatIndexArray& mindices = mesh.GetMaterialIndices();
const std::vector<aiVector3D>& vertices = mesh.GetVertices();
@@ -1493,14 +1233,14 @@ unsigned int Converter::ConvertMeshMultiMaterial( const MeshGeometry& mesh, cons
out_mesh->mBitangents[ cursor ] = ( *binormals )[ in_cursor ];
}
- for ( unsigned int i = 0; i < num_uvs; ++i ) {
- const std::vector<aiVector2D>& uvs = mesh.GetTextureCoords( i );
- out_mesh->mTextureCoords[ i ][ cursor ] = aiVector3D( uvs[ in_cursor ].x, uvs[ in_cursor ].y, 0.0f );
+ for ( unsigned int j = 0; j < num_uvs; ++j ) {
+ const std::vector<aiVector2D>& uvs = mesh.GetTextureCoords( j );
+ out_mesh->mTextureCoords[ j ][ cursor ] = aiVector3D( uvs[ in_cursor ].x, uvs[ in_cursor ].y, 0.0f );
}
- for ( unsigned int i = 0; i < num_vcs; ++i ) {
- const std::vector<aiColor4D>& cols = mesh.GetVertexColors( i );
- out_mesh->mColors[ i ][ cursor ] = cols[ in_cursor ];
+ for ( unsigned int j = 0; j < num_vcs; ++j ) {
+ const std::vector<aiColor4D>& cols = mesh.GetVertexColors( j );
+ out_mesh->mColors[ j ][ cursor ] = cols[ in_cursor ];
}
}
}
@@ -1514,7 +1254,7 @@ unsigned int Converter::ConvertMeshMultiMaterial( const MeshGeometry& mesh, cons
return static_cast<unsigned int>( meshes.size() - 1 );
}
-void Converter::ConvertWeights( aiMesh* out, const Model& model, const MeshGeometry& geo,
+void FBXConverter::ConvertWeights( aiMesh* out, const Model& model, const MeshGeometry& geo,
const aiMatrix4x4& node_global_transform ,
unsigned int materialIndex,
std::vector<unsigned int>* outputVertStartIndices )
@@ -1619,7 +1359,7 @@ void Converter::ConvertWeights( aiMesh* out, const Model& model, const MeshGeome
std::swap_ranges( bones.begin(), bones.end(), out->mBones );
}
-void Converter::ConvertCluster( std::vector<aiBone*>& bones, const Model& /*model*/, const Cluster& cl,
+void FBXConverter::ConvertCluster( std::vector<aiBone*>& bones, const Model& /*model*/, const Cluster& cl,
std::vector<size_t>& out_indices,
std::vector<size_t>& index_out_indices,
std::vector<size_t>& count_out_indices,
@@ -1660,7 +1400,7 @@ void Converter::ConvertCluster( std::vector<aiBone*>& bones, const Model& /*mode
}
}
-void Converter::ConvertMaterialForMesh( aiMesh* out, const Model& model, const MeshGeometry& geo,
+void FBXConverter::ConvertMaterialForMesh( aiMesh* out, const Model& model, const MeshGeometry& geo,
MatIndexArray::value_type materialIndex )
{
// locate source materials for this mesh
@@ -1682,7 +1422,7 @@ void Converter::ConvertMaterialForMesh( aiMesh* out, const Model& model, const M
materials_converted[ mat ] = out->mMaterialIndex;
}
-unsigned int Converter::GetDefaultMaterial()
+unsigned int FBXConverter::GetDefaultMaterial()
{
if ( defaultMaterialIndex ) {
return defaultMaterialIndex - 1;
@@ -1704,7 +1444,7 @@ unsigned int Converter::GetDefaultMaterial()
}
-unsigned int Converter::ConvertMaterial( const Material& material, const MeshGeometry* const mesh )
+unsigned int FBXConverter::ConvertMaterial( const Material& material, const MeshGeometry* const mesh )
{
const PropertyTable& props = material.Props();
@@ -1716,7 +1456,7 @@ unsigned int Converter::ConvertMaterial( const Material& material, const MeshGeo
aiString str;
- // stip Material:: prefix
+ // strip Material:: prefix
std::string name = material.Name();
if ( name.substr( 0, 10 ) == "Material::" ) {
name = name.substr( 10 );
@@ -1739,7 +1479,7 @@ unsigned int Converter::ConvertMaterial( const Material& material, const MeshGeo
return static_cast<unsigned int>( materials.size() - 1 );
}
-unsigned int Converter::ConvertVideo( const Video& video )
+unsigned int FBXConverter::ConvertVideo( const Video& video )
{
// generate empty output texture
aiTexture* out_tex = new aiTexture();
@@ -1749,7 +1489,7 @@ unsigned int Converter::ConvertVideo( const Video& video )
out_tex->mWidth = static_cast<unsigned int>( video.ContentLength() ); // total data size
out_tex->mHeight = 0; // fixed to 0
- // steal the data from the Video to avoid an additional copy
+ // steal the data from the Video to avoid an additional copy
out_tex->pcData = reinterpret_cast<aiTexel*>( const_cast<Video&>( video ).RelinquishContent() );
// try to extract a hint from the file extension
@@ -1764,10 +1504,52 @@ unsigned int Converter::ConvertVideo( const Video& video )
memcpy( out_tex->achFormatHint, ext.c_str(), ext.size() );
}
+ out_tex->mFilename.Set(video.FileName().c_str());
+
return static_cast<unsigned int>( textures.size() - 1 );
}
-void Converter::TrySetTextureProperties( aiMaterial* out_mat, const TextureMap& textures,
+aiString FBXConverter::GetTexturePath(const Texture* tex)
+{
+ aiString path;
+ path.Set(tex->RelativeFilename());
+
+ const Video* media = tex->Media();
+ if (media != nullptr) {
+ bool textureReady = false; //tells if our texture is ready (if it was loaded or if it was found)
+ unsigned int index;
+
+ VideoMap::const_iterator it = textures_converted.find(media);
+ if (it != textures_converted.end()) {
+ index = (*it).second;
+ textureReady = true;
+ }
+ else {
+ if (media->ContentLength() > 0) {
+ index = ConvertVideo(*media);
+ textures_converted[media] = index;
+ textureReady = true;
+ }
+ }
+
+ // setup texture reference string (copied from ColladaLoader::FindFilenameForEffectTexture), if the texture is ready
+ if (doc.Settings().useLegacyEmbeddedTextureNaming) {
+ if (textureReady) {
+ // TODO: check the possibility of using the flag "AI_CONFIG_IMPORT_FBX_EMBEDDED_TEXTURES_LEGACY_NAMING"
+ // In FBX files textures are now stored internally by Assimp with their filename included
+ // Now Assimp can lookup through the loaded textures after all data is processed
+ // We need to load all textures before referencing them, as FBX file format order may reference a texture before loading it
+ // This may occur on this case too, it has to be studied
+ path.data[0] = '*';
+ path.length = 1 + ASSIMP_itoa10(path.data + 1, MAXLEN - 1, index);
+ }
+ }
+ }
+
+ return path;
+}
+
+void FBXConverter::TrySetTextureProperties( aiMaterial* out_mat, const TextureMap& textures,
const std::string& propName,
aiTextureType target, const MeshGeometry* const mesh )
{
@@ -1777,29 +1559,8 @@ void Converter::TrySetTextureProperties( aiMaterial* out_mat, const TextureMap&
}
const Texture* const tex = ( *it ).second;
- if ( tex != 0 )
- {
- aiString path;
- path.Set( tex->RelativeFilename() );
-
- const Video* media = tex->Media();
- if ( media != 0 && media->ContentLength() > 0 ) {
- unsigned int index;
-
- VideoMap::const_iterator it = textures_converted.find( media );
- if ( it != textures_converted.end() ) {
- index = ( *it ).second;
- }
- else {
- index = ConvertVideo( *media );
- textures_converted[ media ] = index;
- }
-
- // setup texture reference string (copied from ColladaLoader::FindFilenameForEffectTexture)
- path.data[ 0 ] = '*';
- path.length = 1 + ASSIMP_itoa10( path.data + 1, MAXLEN - 1, index );
- }
-
+ if ( tex != nullptr ) {
+ aiString path = GetTexturePath(tex);
out_mat->AddProperty( &path, _AI_MATKEY_TEXTURE_BASE, target, 0 );
aiUVTransform uvTrafo;
@@ -1905,10 +1666,9 @@ void Converter::TrySetTextureProperties( aiMaterial* out_mat, const TextureMap&
}
}
-void Converter::TrySetTextureProperties( aiMaterial* out_mat, const LayeredTextureMap& layeredTextures,
- const std::string& propName,
- aiTextureType target, const MeshGeometry* const mesh )
-{
+void FBXConverter::TrySetTextureProperties( aiMaterial* out_mat, const LayeredTextureMap& layeredTextures,
+ const std::string& propName,
+ aiTextureType target, const MeshGeometry* const mesh ) {
LayeredTextureMap::const_iterator it = layeredTextures.find( propName );
if ( it == layeredTextures.end() ) {
return;
@@ -1924,9 +1684,7 @@ void Converter::TrySetTextureProperties( aiMaterial* out_mat, const LayeredTextu
const Texture* const tex = ( *it ).second->getTexture(texIndex);
- aiString path;
- path.Set( tex->RelativeFilename() );
-
+ aiString path = GetTexturePath(tex);
out_mat->AddProperty( &path, _AI_MATKEY_TEXTURE_BASE, target, texIndex );
aiUVTransform uvTrafo;
@@ -2031,14 +1789,13 @@ void Converter::TrySetTextureProperties( aiMaterial* out_mat, const LayeredTextu
}
}
-void Converter::SetTextureProperties( aiMaterial* out_mat, const TextureMap& textures, const MeshGeometry* const mesh )
+void FBXConverter::SetTextureProperties( aiMaterial* out_mat, const TextureMap& textures, const MeshGeometry* const mesh )
{
TrySetTextureProperties( out_mat, textures, "DiffuseColor", aiTextureType_DIFFUSE, mesh );
TrySetTextureProperties( out_mat, textures, "AmbientColor", aiTextureType_AMBIENT, mesh );
- TrySetTextureProperties( out_mat, textures, "EmissiveColor", aiTextureType_EMISSIVE, mesh );
- TrySetTextureProperties( out_mat, textures, "SpecularColor", aiTextureType_SPECULAR, mesh );
+ TrySetTextureProperties( out_mat, textures, "EmissiveFactor", aiTextureType_EMISSIVE, mesh );
TrySetTextureProperties( out_mat, textures, "SpecularFactor", aiTextureType_SPECULAR, mesh);
- TrySetTextureProperties( out_mat, textures, "TransparentColor", aiTextureType_OPACITY, mesh );
+ TrySetTextureProperties( out_mat, textures, "TransparencyFactor", aiTextureType_OPACITY, mesh );
TrySetTextureProperties( out_mat, textures, "ReflectionColor", aiTextureType_REFLECTION, mesh );
TrySetTextureProperties( out_mat, textures, "DisplacementColor", aiTextureType_DISPLACEMENT, mesh );
TrySetTextureProperties( out_mat, textures, "NormalMap", aiTextureType_NORMALS, mesh );
@@ -2046,14 +1803,13 @@ void Converter::SetTextureProperties( aiMaterial* out_mat, const TextureMap& tex
TrySetTextureProperties( out_mat, textures, "ShininessExponent", aiTextureType_SHININESS, mesh );
}
-void Converter::SetTextureProperties( aiMaterial* out_mat, const LayeredTextureMap& layeredTextures, const MeshGeometry* const mesh )
+void FBXConverter::SetTextureProperties( aiMaterial* out_mat, const LayeredTextureMap& layeredTextures, const MeshGeometry* const mesh )
{
TrySetTextureProperties( out_mat, layeredTextures, "DiffuseColor", aiTextureType_DIFFUSE, mesh );
TrySetTextureProperties( out_mat, layeredTextures, "AmbientColor", aiTextureType_AMBIENT, mesh );
- TrySetTextureProperties( out_mat, layeredTextures, "EmissiveColor", aiTextureType_EMISSIVE, mesh );
- TrySetTextureProperties( out_mat, layeredTextures, "SpecularColor", aiTextureType_SPECULAR, mesh );
+ TrySetTextureProperties( out_mat, layeredTextures, "EmissiveFactor", aiTextureType_EMISSIVE, mesh );
TrySetTextureProperties( out_mat, layeredTextures, "SpecularFactor", aiTextureType_SPECULAR, mesh);
- TrySetTextureProperties( out_mat, layeredTextures, "TransparentColor", aiTextureType_OPACITY, mesh );
+ TrySetTextureProperties( out_mat, layeredTextures, "TransparencyFactor", aiTextureType_OPACITY, mesh );
TrySetTextureProperties( out_mat, layeredTextures, "ReflectionColor", aiTextureType_REFLECTION, mesh );
TrySetTextureProperties( out_mat, layeredTextures, "DisplacementColor", aiTextureType_DISPLACEMENT, mesh );
TrySetTextureProperties( out_mat, layeredTextures, "NormalMap", aiTextureType_NORMALS, mesh );
@@ -2061,40 +1817,62 @@ void Converter::SetTextureProperties( aiMaterial* out_mat, const LayeredTextureM
TrySetTextureProperties( out_mat, layeredTextures, "ShininessExponent", aiTextureType_SHININESS, mesh );
}
-aiColor3D Converter::GetColorPropertyFromMaterial( const PropertyTable& props, const std::string& baseName,
- bool& result )
+aiColor3D FBXConverter::GetColorPropertyFactored( const PropertyTable& props, const std::string& colorName,
+ const std::string& factorName, bool& result, bool useTemplate )
{
result = true;
bool ok;
- const aiVector3D& Diffuse = PropertyGet<aiVector3D>( props, baseName, ok );
- if ( ok ) {
- return aiColor3D( Diffuse.x, Diffuse.y, Diffuse.z );
+ aiVector3D BaseColor = PropertyGet<aiVector3D>( props, colorName, ok, useTemplate );
+ if ( ! ok ) {
+ result = false;
+ return aiColor3D( 0.0f, 0.0f, 0.0f );
}
- else {
- aiVector3D DiffuseColor = PropertyGet<aiVector3D>( props, baseName + "Color", ok );
- if ( ok ) {
- float DiffuseFactor = PropertyGet<float>( props, baseName + "Factor", ok );
- if ( ok ) {
- DiffuseColor *= DiffuseFactor;
- }
- return aiColor3D( DiffuseColor.x, DiffuseColor.y, DiffuseColor.z );
- }
+ // if no factor name, return the colour as is
+ if ( factorName.empty() ) {
+ return aiColor3D( BaseColor.x, BaseColor.y, BaseColor.z );
+ }
+
+ // otherwise it should be multiplied by the factor, if found.
+ float factor = PropertyGet<float>( props, factorName, ok, useTemplate );
+ if ( ok ) {
+ BaseColor *= factor;
}
- result = false;
- return aiColor3D( 0.0f, 0.0f, 0.0f );
+ return aiColor3D( BaseColor.x, BaseColor.y, BaseColor.z );
}
+aiColor3D FBXConverter::GetColorPropertyFromMaterial( const PropertyTable& props, const std::string& baseName,
+ bool& result )
+{
+ return GetColorPropertyFactored( props, baseName + "Color", baseName + "Factor", result, true );
+}
+
+aiColor3D FBXConverter::GetColorProperty( const PropertyTable& props, const std::string& colorName,
+ bool& result, bool useTemplate )
+{
+ result = true;
+ bool ok;
+ const aiVector3D& ColorVec = PropertyGet<aiVector3D>( props, colorName, ok, useTemplate );
+ if ( ! ok ) {
+ result = false;
+ return aiColor3D( 0.0f, 0.0f, 0.0f );
+ }
+ return aiColor3D( ColorVec.x, ColorVec.y, ColorVec.z );
+}
-void Converter::SetShadingPropertiesCommon( aiMaterial* out_mat, const PropertyTable& props )
+void FBXConverter::SetShadingPropertiesCommon( aiMaterial* out_mat, const PropertyTable& props )
{
- // set shading properties. There are various, redundant ways in which FBX materials
- // specify their shading settings (depending on shading models, prop
- // template etc.). No idea which one is right in a particular context.
- // Just try to make sense of it - there's no spec to verify this against,
- // so why should we.
+ // Set shading properties.
+ // Modern FBX Files have two separate systems for defining these,
+ // with only the more comprehensive one described in the property template.
+ // Likely the other values are a legacy system,
+ // which is still always exported by the official FBX SDK.
+ //
+ // Blender's FBX import and export mostly ignore this legacy system,
+ // and as we only support recent versions of FBX anyway, we can do the same.
bool ok;
+
const aiColor3D& Diffuse = GetColorPropertyFromMaterial( props, "Diffuse", ok );
if ( ok ) {
out_mat->AddProperty( &Diffuse, 1, AI_MATKEY_COLOR_DIFFUSE );
@@ -2110,29 +1888,64 @@ void Converter::SetShadingPropertiesCommon( aiMaterial* out_mat, const PropertyT
out_mat->AddProperty( &Ambient, 1, AI_MATKEY_COLOR_AMBIENT );
}
- const aiColor3D& Specular = GetColorPropertyFromMaterial( props, "Specular", ok );
+ // we store specular factor as SHININESS_STRENGTH, so just get the color
+ const aiColor3D& Specular = GetColorProperty( props, "SpecularColor", ok, true );
if ( ok ) {
out_mat->AddProperty( &Specular, 1, AI_MATKEY_COLOR_SPECULAR );
}
- const float Opacity = PropertyGet<float>( props, "Opacity", ok );
+ // and also try to get SHININESS_STRENGTH
+ const float SpecularFactor = PropertyGet<float>( props, "SpecularFactor", ok, true );
if ( ok ) {
- out_mat->AddProperty( &Opacity, 1, AI_MATKEY_OPACITY );
+ out_mat->AddProperty( &SpecularFactor, 1, AI_MATKEY_SHININESS_STRENGTH );
}
- const float Reflectivity = PropertyGet<float>( props, "Reflectivity", ok );
+ // and the specular exponent
+ const float ShininessExponent = PropertyGet<float>( props, "ShininessExponent", ok );
if ( ok ) {
- out_mat->AddProperty( &Reflectivity, 1, AI_MATKEY_REFLECTIVITY );
+ out_mat->AddProperty( &ShininessExponent, 1, AI_MATKEY_SHININESS );
}
- const float Shininess = PropertyGet<float>( props, "Shininess", ok );
+ // TransparentColor / TransparencyFactor... gee thanks FBX :rolleyes:
+ const aiColor3D& Transparent = GetColorPropertyFactored( props, "TransparentColor", "TransparencyFactor", ok );
+ float CalculatedOpacity = 1.0f;
if ( ok ) {
- out_mat->AddProperty( &Shininess, 1, AI_MATKEY_SHININESS_STRENGTH );
+ out_mat->AddProperty( &Transparent, 1, AI_MATKEY_COLOR_TRANSPARENT );
+ // as calculated by FBX SDK 2017:
+ CalculatedOpacity = 1.0f - ((Transparent.r + Transparent.g + Transparent.b) / 3.0f);
}
- const float ShininessExponent = PropertyGet<float>( props, "ShininessExponent", ok );
+ // use of TransparencyFactor is inconsistent.
+ // Maya always stores it as 1.0,
+ // so we can't use it to set AI_MATKEY_OPACITY.
+ // Blender is more sensible and stores it as the alpha value.
+ // However both the FBX SDK and Blender always write an additional
+ // legacy "Opacity" field, so we can try to use that.
+ //
+ // If we can't find it,
+ // we can fall back to the value which the FBX SDK calculates
+ // from transparency colour (RGB) and factor (F) as
+ // 1.0 - F*((R+G+B)/3).
+ //
+ // There's no consistent way to interpret this opacity value,
+ // so it's up to clients to do the correct thing.
+ const float Opacity = PropertyGet<float>( props, "Opacity", ok );
if ( ok ) {
- out_mat->AddProperty( &ShininessExponent, 1, AI_MATKEY_SHININESS );
+ out_mat->AddProperty( &Opacity, 1, AI_MATKEY_OPACITY );
+ }
+ else if ( CalculatedOpacity != 1.0 ) {
+ out_mat->AddProperty( &CalculatedOpacity, 1, AI_MATKEY_OPACITY );
+ }
+
+ // reflection color and factor are stored separately
+ const aiColor3D& Reflection = GetColorProperty( props, "ReflectionColor", ok, true );
+ if ( ok ) {
+ out_mat->AddProperty( &Reflection, 1, AI_MATKEY_COLOR_REFLECTIVE );
+ }
+
+ float ReflectionFactor = PropertyGet<float>( props, "ReflectionFactor", ok, true );
+ if ( ok ) {
+ out_mat->AddProperty( &ReflectionFactor, 1, AI_MATKEY_REFLECTIVITY );
}
const float BumpFactor = PropertyGet<float>(props, "BumpFactor", ok);
@@ -2147,60 +1960,60 @@ void Converter::SetShadingPropertiesCommon( aiMaterial* out_mat, const PropertyT
}
-double Converter::FrameRateToDouble( FileGlobalSettings::FrameRate fp, double customFPSVal )
-{
+double FBXConverter::FrameRateToDouble( FileGlobalSettings::FrameRate fp, double customFPSVal ) {
switch ( fp ) {
- case FileGlobalSettings::FrameRate_DEFAULT:
- return 1.0;
+ case FileGlobalSettings::FrameRate_DEFAULT:
+ return 1.0;
- case FileGlobalSettings::FrameRate_120:
- return 120.0;
+ case FileGlobalSettings::FrameRate_120:
+ return 120.0;
- case FileGlobalSettings::FrameRate_100:
- return 100.0;
+ case FileGlobalSettings::FrameRate_100:
+ return 100.0;
- case FileGlobalSettings::FrameRate_60:
- return 60.0;
+ case FileGlobalSettings::FrameRate_60:
+ return 60.0;
- case FileGlobalSettings::FrameRate_50:
- return 50.0;
+ case FileGlobalSettings::FrameRate_50:
+ return 50.0;
- case FileGlobalSettings::FrameRate_48:
- return 48.0;
+ case FileGlobalSettings::FrameRate_48:
+ return 48.0;
- case FileGlobalSettings::FrameRate_30:
- case FileGlobalSettings::FrameRate_30_DROP:
- return 30.0;
+ case FileGlobalSettings::FrameRate_30:
+ case FileGlobalSettings::FrameRate_30_DROP:
+ return 30.0;
- case FileGlobalSettings::FrameRate_NTSC_DROP_FRAME:
- case FileGlobalSettings::FrameRate_NTSC_FULL_FRAME:
- return 29.9700262;
+ case FileGlobalSettings::FrameRate_NTSC_DROP_FRAME:
+ case FileGlobalSettings::FrameRate_NTSC_FULL_FRAME:
+ return 29.9700262;
- case FileGlobalSettings::FrameRate_PAL:
- return 25.0;
+ case FileGlobalSettings::FrameRate_PAL:
+ return 25.0;
- case FileGlobalSettings::FrameRate_CINEMA:
- return 24.0;
+ case FileGlobalSettings::FrameRate_CINEMA:
+ return 24.0;
- case FileGlobalSettings::FrameRate_1000:
- return 1000.0;
+ case FileGlobalSettings::FrameRate_1000:
+ return 1000.0;
- case FileGlobalSettings::FrameRate_CINEMA_ND:
- return 23.976;
+ case FileGlobalSettings::FrameRate_CINEMA_ND:
+ return 23.976;
- case FileGlobalSettings::FrameRate_CUSTOM:
- return customFPSVal;
+ case FileGlobalSettings::FrameRate_CUSTOM:
+ return customFPSVal;
- case FileGlobalSettings::FrameRate_MAX: // this is to silence compiler warnings
- break;
+ case FileGlobalSettings::FrameRate_MAX: // this is to silence compiler warnings
+ break;
}
ai_assert( false );
+
return -1.0f;
}
-void Converter::ConvertAnimations()
+void FBXConverter::ConvertAnimations()
{
// first of all determine framerate
const FileGlobalSettings::FrameRate fps = doc.GlobalSettings().TimeMode();
@@ -2213,76 +2026,20 @@ void Converter::ConvertAnimations()
}
}
-
-void Converter::RenameNode( const std::string& fixed_name, const std::string& new_name )
-{
- ai_assert( node_names.find( fixed_name ) != node_names.end() );
- ai_assert( node_names.find( new_name ) == node_names.end() );
-
- renamed_nodes[ fixed_name ] = new_name;
-
- const aiString fn( fixed_name );
-
- for( aiCamera* cam : cameras ) {
- if ( cam->mName == fn ) {
- cam->mName.Set( new_name );
- break;
- }
- }
-
- for( aiLight* light : lights ) {
- if ( light->mName == fn ) {
- light->mName.Set( new_name );
- break;
- }
- }
-
- for( aiAnimation* anim : animations ) {
- for ( unsigned int i = 0; i < anim->mNumChannels; ++i ) {
- aiNodeAnim* const na = anim->mChannels[ i ];
- if ( na->mNodeName == fn ) {
- na->mNodeName.Set( new_name );
- break;
- }
- }
- }
-}
-
-
-std::string Converter::FixNodeName( const std::string& name )
-{
+std::string FBXConverter::FixNodeName( const std::string& name ) {
// strip Model:: prefix, avoiding ambiguities (i.e. don't strip if
// this causes ambiguities, well possible between empty identifiers,
// such as "Model::" and ""). Make sure the behaviour is consistent
// across multiple calls to FixNodeName().
if ( name.substr( 0, 7 ) == "Model::" ) {
std::string temp = name.substr( 7 );
-
- const NodeNameMap::const_iterator it = node_names.find( temp );
- if ( it != node_names.end() ) {
- if ( !( *it ).second ) {
- return FixNodeName( name + "_" );
- }
- }
- node_names[ temp ] = true;
-
- const NameNameMap::const_iterator rit = renamed_nodes.find( temp );
- return rit == renamed_nodes.end() ? temp : ( *rit ).second;
- }
-
- const NodeNameMap::const_iterator it = node_names.find( name );
- if ( it != node_names.end() ) {
- if ( ( *it ).second ) {
- return FixNodeName( name + "_" );
- }
+ return temp;
}
- node_names[ name ] = false;
- const NameNameMap::const_iterator rit = renamed_nodes.find( name );
- return rit == renamed_nodes.end() ? name : ( *rit ).second;
+ return name;
}
-void Converter::ConvertAnimationStack( const AnimationStack& st )
+void FBXConverter::ConvertAnimationStack( const AnimationStack& st )
{
const AnimationLayerList& layers = st.Layers();
if ( layers.empty() ) {
@@ -2345,8 +2102,13 @@ void Converter::ConvertAnimationStack( const AnimationStack& st )
int64_t start_time = st.LocalStart();
int64_t stop_time = st.LocalStop();
- double start_timeF = CONVERT_FBX_TIME( start_time );
- double stop_timeF = CONVERT_FBX_TIME( stop_time );
+ bool has_local_startstop = start_time != 0 || stop_time != 0;
+ if ( !has_local_startstop ) {
+ // no time range given, so accept every keyframe and use the actual min/max time
+ // the numbers are INT64_MIN/MAX, the 20000 is for safety because GenerateNodeAnimations uses an epsilon of 10000
+ start_time = -9223372036854775807ll + 20000;
+ stop_time = 9223372036854775807ll - 20000;
+ }
try {
for( const NodeMap::value_type& kv : node_map ) {
@@ -2378,30 +2140,27 @@ void Converter::ConvertAnimationStack( const AnimationStack& st )
return;
}
- //adjust relative timing for animation
- {
- double start_fps = start_timeF * anim_fps;
-
- for ( unsigned int c = 0; c < anim->mNumChannels; c++ )
- {
- aiNodeAnim* channel = anim->mChannels[ c ];
- for ( uint32_t i = 0; i < channel->mNumPositionKeys; i++ )
- channel->mPositionKeys[ i ].mTime -= start_fps;
- for ( uint32_t i = 0; i < channel->mNumRotationKeys; i++ )
- channel->mRotationKeys[ i ].mTime -= start_fps;
- for ( uint32_t i = 0; i < channel->mNumScalingKeys; i++ )
- channel->mScalingKeys[ i ].mTime -= start_fps;
- }
+ double start_time_fps = has_local_startstop ? (CONVERT_FBX_TIME(start_time) * anim_fps) : min_time;
+ double stop_time_fps = has_local_startstop ? (CONVERT_FBX_TIME(stop_time) * anim_fps) : max_time;
- max_time -= min_time;
+ // adjust relative timing for animation
+ for ( unsigned int c = 0; c < anim->mNumChannels; c++ ) {
+ aiNodeAnim* channel = anim->mChannels[ c ];
+ for ( uint32_t i = 0; i < channel->mNumPositionKeys; i++ )
+ channel->mPositionKeys[ i ].mTime -= start_time_fps;
+ for ( uint32_t i = 0; i < channel->mNumRotationKeys; i++ )
+ channel->mRotationKeys[ i ].mTime -= start_time_fps;
+ for ( uint32_t i = 0; i < channel->mNumScalingKeys; i++ )
+ channel->mScalingKeys[ i ].mTime -= start_time_fps;
}
// for some mysterious reason, mDuration is simply the maximum key -- the
// validator always assumes animations to start at zero.
- anim->mDuration = ( stop_timeF - start_timeF ) * anim_fps;
+ anim->mDuration = stop_time_fps - start_time_fps;
anim->mTicksPerSecond = anim_fps;
}
+#ifdef ASSIMP_BUILD_DEBUG
// ------------------------------------------------------------------------------------------------
// sanity check whether the input is ok
static void validateAnimCurveNodes( const std::vector<const AnimationCurveNode*>& curves,
@@ -2419,9 +2178,10 @@ static void validateAnimCurveNodes( const std::vector<const AnimationCurveNode*>
}
}
}
+#endif // ASSIMP_BUILD_DEBUG
// ------------------------------------------------------------------------------------------------
-void Converter::GenerateNodeAnimations( std::vector<aiNodeAnim*>& node_anims,
+void FBXConverter::GenerateNodeAnimations( std::vector<aiNodeAnim*>& node_anims,
const std::string& fixed_name,
const std::vector<const AnimationCurveNode*>& curves,
const LayerMap& layer_map,
@@ -2488,8 +2248,7 @@ void Converter::GenerateNodeAnimations( std::vector<aiNodeAnim*>& node_anims,
has_any = true;
- if ( comp != TransformationComp_Rotation && comp != TransformationComp_Scaling && comp != TransformationComp_Translation &&
- comp != TransformationComp_GeometricScaling && comp != TransformationComp_GeometricRotation && comp != TransformationComp_GeometricTranslation )
+ if ( comp != TransformationComp_Rotation && comp != TransformationComp_Scaling && comp != TransformationComp_Translation )
{
has_complex = true;
}
@@ -2656,10 +2415,9 @@ void Converter::GenerateNodeAnimations( std::vector<aiNodeAnim*>& node_anims,
node_anim_chain_bits[ fixed_name ] = flags;
}
-bool Converter::IsRedundantAnimationData( const Model& target,
- TransformationComp comp,
- const std::vector<const AnimationCurveNode*>& curves )
-{
+bool FBXConverter::IsRedundantAnimationData( const Model& target,
+ TransformationComp comp,
+ const std::vector<const AnimationCurveNode*>& curves ) {
ai_assert( curves.size() );
// look for animation nodes with
@@ -2702,7 +2460,7 @@ bool Converter::IsRedundantAnimationData( const Model& target,
}
-aiNodeAnim* Converter::GenerateRotationNodeAnim( const std::string& name,
+aiNodeAnim* FBXConverter::GenerateRotationNodeAnim( const std::string& name,
const Model& target,
const std::vector<const AnimationCurveNode*>& curves,
const LayerMap& layer_map,
@@ -2710,10 +2468,10 @@ aiNodeAnim* Converter::GenerateRotationNodeAnim( const std::string& name,
double& max_time,
double& min_time )
{
- ScopeGuard<aiNodeAnim> na( new aiNodeAnim() );
+ std::unique_ptr<aiNodeAnim> na( new aiNodeAnim() );
na->mNodeName.Set( name );
- ConvertRotationKeys( na, curves, layer_map, start, stop, max_time, min_time, target.RotationOrder() );
+ ConvertRotationKeys( na.get(), curves, layer_map, start, stop, max_time, min_time, target.RotationOrder() );
// dummy scaling key
na->mScalingKeys = new aiVectorKey[ 1 ];
@@ -2729,10 +2487,10 @@ aiNodeAnim* Converter::GenerateRotationNodeAnim( const std::string& name,
na->mPositionKeys[ 0 ].mTime = 0.;
na->mPositionKeys[ 0 ].mValue = aiVector3D();
- return na.dismiss();
+ return na.release();
}
-aiNodeAnim* Converter::GenerateScalingNodeAnim( const std::string& name,
+aiNodeAnim* FBXConverter::GenerateScalingNodeAnim( const std::string& name,
const Model& /*target*/,
const std::vector<const AnimationCurveNode*>& curves,
const LayerMap& layer_map,
@@ -2740,10 +2498,10 @@ aiNodeAnim* Converter::GenerateScalingNodeAnim( const std::string& name,
double& max_time,
double& min_time )
{
- ScopeGuard<aiNodeAnim> na( new aiNodeAnim() );
+ std::unique_ptr<aiNodeAnim> na( new aiNodeAnim() );
na->mNodeName.Set( name );
- ConvertScaleKeys( na, curves, layer_map, start, stop, max_time, min_time );
+ ConvertScaleKeys( na.get(), curves, layer_map, start, stop, max_time, min_time );
// dummy rotation key
na->mRotationKeys = new aiQuatKey[ 1 ];
@@ -2759,23 +2517,21 @@ aiNodeAnim* Converter::GenerateScalingNodeAnim( const std::string& name,
na->mPositionKeys[ 0 ].mTime = 0.;
na->mPositionKeys[ 0 ].mValue = aiVector3D();
- return na.dismiss();
+ return na.release();
}
-
-aiNodeAnim* Converter::GenerateTranslationNodeAnim( const std::string& name,
- const Model& /*target*/,
- const std::vector<const AnimationCurveNode*>& curves,
- const LayerMap& layer_map,
- int64_t start, int64_t stop,
- double& max_time,
- double& min_time,
- bool inverse )
-{
- ScopeGuard<aiNodeAnim> na( new aiNodeAnim() );
+aiNodeAnim* FBXConverter::GenerateTranslationNodeAnim( const std::string& name,
+ const Model& /*target*/,
+ const std::vector<const AnimationCurveNode*>& curves,
+ const LayerMap& layer_map,
+ int64_t start, int64_t stop,
+ double& max_time,
+ double& min_time,
+ bool inverse ) {
+ std::unique_ptr<aiNodeAnim> na( new aiNodeAnim() );
na->mNodeName.Set( name );
- ConvertTranslationKeys( na, curves, layer_map, start, stop, max_time, min_time );
+ ConvertTranslationKeys( na.get(), curves, layer_map, start, stop, max_time, min_time );
if ( inverse ) {
for ( unsigned int i = 0; i < na->mNumPositionKeys; ++i ) {
@@ -2797,10 +2553,10 @@ aiNodeAnim* Converter::GenerateTranslationNodeAnim( const std::string& name,
na->mRotationKeys[ 0 ].mTime = 0.;
na->mRotationKeys[ 0 ].mValue = aiQuaternion();
- return na.dismiss();
+ return na.release();
}
-aiNodeAnim* Converter::GenerateSimpleNodeAnim( const std::string& name,
+aiNodeAnim* FBXConverter::GenerateSimpleNodeAnim( const std::string& name,
const Model& target,
NodeMap::const_iterator chain[ TransformationComp_MAXIMUM ],
NodeMap::const_iterator iter_end,
@@ -2811,7 +2567,7 @@ aiNodeAnim* Converter::GenerateSimpleNodeAnim( const std::string& name,
bool reverse_order )
{
- ScopeGuard<aiNodeAnim> na( new aiNodeAnim() );
+ std::unique_ptr<aiNodeAnim> na( new aiNodeAnim() );
na->mNodeName.Set( name );
const PropertyTable& props = target.Props();
@@ -2883,7 +2639,7 @@ aiNodeAnim* Converter::GenerateSimpleNodeAnim( const std::string& name,
// which requires all of rotation, scaling and translation
// to be set.
if ( chain[ TransformationComp_Scaling ] != iter_end ) {
- ConvertScaleKeys( na, ( *chain[ TransformationComp_Scaling ] ).second,
+ ConvertScaleKeys( na.get(), ( *chain[ TransformationComp_Scaling ] ).second,
layer_map,
start, stop,
max_time,
@@ -2899,7 +2655,7 @@ aiNodeAnim* Converter::GenerateSimpleNodeAnim( const std::string& name,
}
if ( chain[ TransformationComp_Rotation ] != iter_end ) {
- ConvertRotationKeys( na, ( *chain[ TransformationComp_Rotation ] ).second,
+ ConvertRotationKeys( na.get(), ( *chain[ TransformationComp_Rotation ] ).second,
layer_map,
start, stop,
max_time,
@@ -2917,7 +2673,7 @@ aiNodeAnim* Converter::GenerateSimpleNodeAnim( const std::string& name,
}
if ( chain[ TransformationComp_Translation ] != iter_end ) {
- ConvertTranslationKeys( na, ( *chain[ TransformationComp_Translation ] ).second,
+ ConvertTranslationKeys( na.get(), ( *chain[ TransformationComp_Translation ] ).second,
layer_map,
start, stop,
max_time,
@@ -2933,10 +2689,10 @@ aiNodeAnim* Converter::GenerateSimpleNodeAnim( const std::string& name,
}
}
- return na.dismiss();
+ return na.release();
}
-Converter::KeyFrameListList Converter::GetKeyframeList( const std::vector<const AnimationCurveNode*>& nodes, int64_t start, int64_t stop )
+FBXConverter::KeyFrameListList FBXConverter::GetKeyframeList( const std::vector<const AnimationCurveNode*>& nodes, int64_t start, int64_t stop )
{
KeyFrameListList inputs;
inputs.reserve( nodes.size() * 3 );
@@ -2992,12 +2748,11 @@ Converter::KeyFrameListList Converter::GetKeyframeList( const std::vector<const
}
-KeyTimeList Converter::GetKeyTimeList( const KeyFrameListList& inputs )
-{
- ai_assert( inputs.size() );
+KeyTimeList FBXConverter::GetKeyTimeList( const KeyFrameListList& inputs ) {
+ ai_assert( !inputs.empty() );
- // reserve some space upfront - it is likely that the keyframe lists
- // have matching time values, so max(of all keyframe lists) should
+ // reserve some space upfront - it is likely that the key-frame lists
+ // have matching time values, so max(of all key-frame lists) should
// be a good estimate.
KeyTimeList keys;
@@ -3041,17 +2796,15 @@ KeyTimeList Converter::GetKeyTimeList( const KeyFrameListList& inputs )
return keys;
}
-void Converter::InterpolateKeys( aiVectorKey* valOut, const KeyTimeList& keys, const KeyFrameListList& inputs,
- const aiVector3D& def_value,
- double& max_time,
- double& min_time )
-
-{
- ai_assert( keys.size() );
- ai_assert( valOut );
+void FBXConverter::InterpolateKeys( aiVectorKey* valOut, const KeyTimeList& keys, const KeyFrameListList& inputs,
+ const aiVector3D& def_value,
+ double& max_time,
+ double& min_time ) {
+ ai_assert( !keys.empty() );
+ ai_assert( nullptr != valOut );
std::vector<unsigned int> next_pos;
- const size_t count = inputs.size();
+ const size_t count( inputs.size() );
next_pos.resize( inputs.size(), 0 );
@@ -3062,6 +2815,9 @@ void Converter::InterpolateKeys( aiVectorKey* valOut, const KeyTimeList& keys, c
const KeyFrameList& kfl = inputs[ i ];
const size_t ksize = std::get<0>(kfl)->size();
+ if (ksize == 0) {
+ continue;
+ }
if ( ksize > next_pos[ i ] && std::get<0>(kfl)->at( next_pos[ i ] ) == time ) {
++next_pos[ i ];
}
@@ -3096,15 +2852,14 @@ void Converter::InterpolateKeys( aiVectorKey* valOut, const KeyTimeList& keys, c
}
}
-
-void Converter::InterpolateKeys( aiQuatKey* valOut, const KeyTimeList& keys, const KeyFrameListList& inputs,
+void FBXConverter::InterpolateKeys( aiQuatKey* valOut, const KeyTimeList& keys, const KeyFrameListList& inputs,
const aiVector3D& def_value,
double& maxTime,
double& minTime,
Model::RotOrder order )
{
- ai_assert( keys.size() );
- ai_assert( valOut );
+ ai_assert( !keys.empty() );
+ ai_assert( nullptr != valOut );
std::unique_ptr<aiVectorKey[]> temp( new aiVectorKey[ keys.size() ] );
InterpolateKeys( temp.get(), keys, inputs, def_value, maxTime, minTime );
@@ -3117,7 +2872,6 @@ void Converter::InterpolateKeys( aiQuatKey* valOut, const KeyTimeList& keys, con
valOut[ i ].mTime = temp[ i ].mTime;
-
GetRotationMatrix( order, temp[ i ].mValue, m );
aiQuaternion quat = aiQuaternion( aiMatrix3x3( m ) );
@@ -3136,8 +2890,7 @@ void Converter::InterpolateKeys( aiQuatKey* valOut, const KeyTimeList& keys, con
}
}
-
-void Converter::ConvertTransformOrder_TRStoSRT( aiQuatKey* out_quat, aiVectorKey* out_scale,
+void FBXConverter::ConvertTransformOrder_TRStoSRT( aiQuatKey* out_quat, aiVectorKey* out_scale,
aiVectorKey* out_translation,
const KeyFrameListList& scaling,
const KeyFrameListList& translation,
@@ -3195,8 +2948,7 @@ void Converter::ConvertTransformOrder_TRStoSRT( aiQuatKey* out_quat, aiVectorKey
}
}
-
-aiQuaternion Converter::EulerToQuaternion( const aiVector3D& rot, Model::RotOrder order )
+aiQuaternion FBXConverter::EulerToQuaternion( const aiVector3D& rot, Model::RotOrder order )
{
aiMatrix4x4 m;
GetRotationMatrix( order, rot, m );
@@ -3204,8 +2956,7 @@ aiQuaternion Converter::EulerToQuaternion( const aiVector3D& rot, Model::RotOrde
return aiQuaternion( aiMatrix3x3( m ) );
}
-
-void Converter::ConvertScaleKeys( aiNodeAnim* na, const std::vector<const AnimationCurveNode*>& nodes, const LayerMap& /*layers*/,
+void FBXConverter::ConvertScaleKeys( aiNodeAnim* na, const std::vector<const AnimationCurveNode*>& nodes, const LayerMap& /*layers*/,
int64_t start, int64_t stop,
double& maxTime,
double& minTime )
@@ -3225,8 +2976,7 @@ void Converter::ConvertScaleKeys( aiNodeAnim* na, const std::vector<const Animat
InterpolateKeys( na->mScalingKeys, keys, inputs, aiVector3D( 1.0f, 1.0f, 1.0f ), maxTime, minTime );
}
-
-void Converter::ConvertTranslationKeys( aiNodeAnim* na, const std::vector<const AnimationCurveNode*>& nodes,
+void FBXConverter::ConvertTranslationKeys( aiNodeAnim* na, const std::vector<const AnimationCurveNode*>& nodes,
const LayerMap& /*layers*/,
int64_t start, int64_t stop,
double& maxTime,
@@ -3244,8 +2994,7 @@ void Converter::ConvertTranslationKeys( aiNodeAnim* na, const std::vector<const
InterpolateKeys( na->mPositionKeys, keys, inputs, aiVector3D( 0.0f, 0.0f, 0.0f ), maxTime, minTime );
}
-
-void Converter::ConvertRotationKeys( aiNodeAnim* na, const std::vector<const AnimationCurveNode*>& nodes,
+void FBXConverter::ConvertRotationKeys( aiNodeAnim* na, const std::vector<const AnimationCurveNode*>& nodes,
const LayerMap& /*layers*/,
int64_t start, int64_t stop,
double& maxTime,
@@ -3260,13 +3009,26 @@ void Converter::ConvertRotationKeys( aiNodeAnim* na, const std::vector<const Ani
na->mNumRotationKeys = static_cast<unsigned int>( keys.size() );
na->mRotationKeys = new aiQuatKey[ keys.size() ];
- if ( keys.size() > 0 )
- InterpolateKeys( na->mRotationKeys, keys, inputs, aiVector3D( 0.0f, 0.0f, 0.0f ), maxTime, minTime, order );
+ if (!keys.empty()) {
+ InterpolateKeys(na->mRotationKeys, keys, inputs, aiVector3D(0.0f, 0.0f, 0.0f), maxTime, minTime, order);
+ }
}
-void Converter::TransferDataToScene()
+void FBXConverter::ConvertGlobalSettings() {
+ if (nullptr == out) {
+ return;
+ }
+
+ out->mMetaData = aiMetadata::Alloc(1);
+ unsigned int index(0);
+ const double unitScalFactor(doc.GlobalSettings().UnitScaleFactor());
+ out->mMetaData->Set(index, "UnitScaleFactor", unitScalFactor);
+}
+
+void FBXConverter::TransferDataToScene()
{
- ai_assert( !out->mMeshes && !out->mNumMeshes );
+ ai_assert( !out->mMeshes );
+ ai_assert( !out->mNumMeshes );
// note: the trailing () ensures initialization with NULL - not
// many C++ users seem to know this, so pointing it out to avoid
@@ -3315,12 +3077,10 @@ void Converter::TransferDataToScene()
}
}
-//} // !anon
-
// ------------------------------------------------------------------------------------------------
void ConvertToAssimpScene(aiScene* out, const Document& doc)
{
- Converter converter(out,doc);
+ FBXConverter converter(out,doc);
}
} // !FBX
diff --git a/code/FBXConverter.h b/code/FBXConverter.h
index 8a62d8811..ca8dcba2e 100644
--- a/code/FBXConverter.h
+++ b/code/FBXConverter.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -45,13 +46,30 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef INCLUDED_AI_FBX_CONVERTER_H
#define INCLUDED_AI_FBX_CONVERTER_H
+#include "FBXParser.h"
+#include "FBXMeshGeometry.h"
+#include "FBXDocument.h"
+#include "FBXUtil.h"
+#include "FBXProperties.h"
+#include "FBXImporter.h"
+#include <assimp/anim.h>
+#include <assimp/material.h>
+#include <assimp/light.h>
+#include <assimp/texture.h>
+#include <assimp/camera.h>
+#include <assimp/StringComparison.h>
+
struct aiScene;
+struct aiNode;
+struct aiMaterial;
namespace Assimp {
namespace FBX {
class Document;
+using NodeNameCache = std::set<std::string>;
+
/**
* Convert a FBX #Document to #aiScene
* @param out Empty scene to be populated
@@ -59,6 +77,364 @@ class Document;
*/
void ConvertToAssimpScene(aiScene* out, const Document& doc);
+/** Dummy class to encapsulate the conversion process */
+class FBXConverter {
+public:
+ /**
+ * The different parts that make up the final local transformation of a fbx-node
+ */
+ enum TransformationComp {
+ TransformationComp_GeometricScalingInverse = 0,
+ TransformationComp_GeometricRotationInverse,
+ TransformationComp_GeometricTranslationInverse,
+ TransformationComp_Translation,
+ TransformationComp_RotationOffset,
+ TransformationComp_RotationPivot,
+ TransformationComp_PreRotation,
+ TransformationComp_Rotation,
+ TransformationComp_PostRotation,
+ TransformationComp_RotationPivotInverse,
+ TransformationComp_ScalingOffset,
+ TransformationComp_ScalingPivot,
+ TransformationComp_Scaling,
+ TransformationComp_ScalingPivotInverse,
+ TransformationComp_GeometricTranslation,
+ TransformationComp_GeometricRotation,
+ TransformationComp_GeometricScaling,
+
+ TransformationComp_MAXIMUM
+ };
+
+public:
+ FBXConverter(aiScene* out, const Document& doc);
+ ~FBXConverter();
+
+private:
+ // ------------------------------------------------------------------------------------------------
+ // find scene root and trigger recursive scene conversion
+ void ConvertRootNode();
+
+ // ------------------------------------------------------------------------------------------------
+ // collect and assign child nodes
+ void ConvertNodes(uint64_t id, aiNode& parent, const aiMatrix4x4& parent_transform = aiMatrix4x4());
+
+ // ------------------------------------------------------------------------------------------------
+ void ConvertLights(const Model& model, const std::string &orig_name );
+
+ // ------------------------------------------------------------------------------------------------
+ void ConvertCameras(const Model& model, const std::string &orig_name );
+
+ // ------------------------------------------------------------------------------------------------
+ void ConvertLight( const Light& light, const std::string &orig_name );
+
+ // ------------------------------------------------------------------------------------------------
+ void ConvertCamera( const Camera& cam, const std::string &orig_name );
+
+ // ------------------------------------------------------------------------------------------------
+ void GetUniqueName( const std::string &name, std::string& uniqueName );
+
+ // ------------------------------------------------------------------------------------------------
+ // this returns unified names usable within assimp identifiers (i.e. no space characters -
+ // while these would be allowed, they are a potential trouble spot so better not use them).
+ const char* NameTransformationComp(TransformationComp comp);
+
+ // ------------------------------------------------------------------------------------------------
+ // note: this returns the REAL fbx property names
+ const char* NameTransformationCompProperty(TransformationComp comp);
+
+ // ------------------------------------------------------------------------------------------------
+ aiVector3D TransformationCompDefaultValue(TransformationComp comp);
+
+ // ------------------------------------------------------------------------------------------------
+ void GetRotationMatrix(Model::RotOrder mode, const aiVector3D& rotation, aiMatrix4x4& out);
+ // ------------------------------------------------------------------------------------------------
+ /**
+ * checks if a node has more than just scaling, rotation and translation components
+ */
+ bool NeedsComplexTransformationChain(const Model& model);
+
+ // ------------------------------------------------------------------------------------------------
+ // note: name must be a FixNodeName() result
+ std::string NameTransformationChainNode(const std::string& name, TransformationComp comp);
+
+ // ------------------------------------------------------------------------------------------------
+ /**
+ * note: memory for output_nodes will be managed by the caller
+ */
+ void GenerateTransformationNodeChain(const Model& model, std::vector<aiNode*>& output_nodes, std::vector<aiNode*>& post_output_nodes);
+
+ // ------------------------------------------------------------------------------------------------
+ void SetupNodeMetadata(const Model& model, aiNode& nd);
+
+ // ------------------------------------------------------------------------------------------------
+ void ConvertModel(const Model& model, aiNode& nd, const aiMatrix4x4& node_global_transform);
+
+ // ------------------------------------------------------------------------------------------------
+ // MeshGeometry -> aiMesh, return mesh index + 1 or 0 if the conversion failed
+ std::vector<unsigned int> ConvertMesh(const MeshGeometry& mesh, const Model& model,
+ const aiMatrix4x4& node_global_transform, aiNode& nd);
+
+ // ------------------------------------------------------------------------------------------------
+ aiMesh* SetupEmptyMesh(const MeshGeometry& mesh, aiNode& nd);
+
+ // ------------------------------------------------------------------------------------------------
+ unsigned int ConvertMeshSingleMaterial(const MeshGeometry& mesh, const Model& model,
+ const aiMatrix4x4& node_global_transform, aiNode& nd);
+
+ // ------------------------------------------------------------------------------------------------
+ std::vector<unsigned int> ConvertMeshMultiMaterial(const MeshGeometry& mesh, const Model& model,
+ const aiMatrix4x4& node_global_transform, aiNode& nd);
+
+ // ------------------------------------------------------------------------------------------------
+ unsigned int ConvertMeshMultiMaterial(const MeshGeometry& mesh, const Model& model,
+ MatIndexArray::value_type index,
+ const aiMatrix4x4& node_global_transform, aiNode& nd);
+
+ // ------------------------------------------------------------------------------------------------
+ static const unsigned int NO_MATERIAL_SEPARATION = /* std::numeric_limits<unsigned int>::max() */
+ static_cast<unsigned int>(-1);
+
+ // ------------------------------------------------------------------------------------------------
+ /**
+ * - if materialIndex == NO_MATERIAL_SEPARATION, materials are not taken into
+ * account when determining which weights to include.
+ * - outputVertStartIndices is only used when a material index is specified, it gives for
+ * each output vertex the DOM index it maps to.
+ */
+ void ConvertWeights(aiMesh* out, const Model& model, const MeshGeometry& geo,
+ const aiMatrix4x4& node_global_transform = aiMatrix4x4(),
+ unsigned int materialIndex = NO_MATERIAL_SEPARATION,
+ std::vector<unsigned int>* outputVertStartIndices = NULL);
+
+ // ------------------------------------------------------------------------------------------------
+ void ConvertCluster(std::vector<aiBone*>& bones, const Model& /*model*/, const Cluster& cl,
+ std::vector<size_t>& out_indices,
+ std::vector<size_t>& index_out_indices,
+ std::vector<size_t>& count_out_indices,
+ const aiMatrix4x4& node_global_transform);
+
+ // ------------------------------------------------------------------------------------------------
+ void ConvertMaterialForMesh(aiMesh* out, const Model& model, const MeshGeometry& geo,
+ MatIndexArray::value_type materialIndex);
+
+ // ------------------------------------------------------------------------------------------------
+ unsigned int GetDefaultMaterial();
+
+ // ------------------------------------------------------------------------------------------------
+ // Material -> aiMaterial
+ unsigned int ConvertMaterial(const Material& material, const MeshGeometry* const mesh);
+
+ // ------------------------------------------------------------------------------------------------
+ // Video -> aiTexture
+ unsigned int ConvertVideo(const Video& video);
+
+ // ------------------------------------------------------------------------------------------------
+ // convert embedded texture if necessary and return actual texture path
+ aiString GetTexturePath(const Texture* tex);
+
+ // ------------------------------------------------------------------------------------------------
+ void TrySetTextureProperties(aiMaterial* out_mat, const TextureMap& textures,
+ const std::string& propName,
+ aiTextureType target, const MeshGeometry* const mesh);
+
+ // ------------------------------------------------------------------------------------------------
+ void TrySetTextureProperties(aiMaterial* out_mat, const LayeredTextureMap& layeredTextures,
+ const std::string& propName,
+ aiTextureType target, const MeshGeometry* const mesh);
+
+ // ------------------------------------------------------------------------------------------------
+ void SetTextureProperties(aiMaterial* out_mat, const TextureMap& textures, const MeshGeometry* const mesh);
+
+ // ------------------------------------------------------------------------------------------------
+ void SetTextureProperties(aiMaterial* out_mat, const LayeredTextureMap& layeredTextures, const MeshGeometry* const mesh);
+
+ // ------------------------------------------------------------------------------------------------
+ aiColor3D GetColorPropertyFromMaterial(const PropertyTable& props, const std::string& baseName,
+ bool& result);
+ aiColor3D GetColorPropertyFactored(const PropertyTable& props, const std::string& colorName,
+ const std::string& factorName, bool& result, bool useTemplate = true);
+ aiColor3D GetColorProperty(const PropertyTable& props, const std::string& colorName,
+ bool& result, bool useTemplate = true);
+
+ // ------------------------------------------------------------------------------------------------
+ void SetShadingPropertiesCommon(aiMaterial* out_mat, const PropertyTable& props);
+
+ // ------------------------------------------------------------------------------------------------
+ // get the number of fps for a FrameRate enumerated value
+ static double FrameRateToDouble(FileGlobalSettings::FrameRate fp, double customFPSVal = -1.0);
+
+ // ------------------------------------------------------------------------------------------------
+ // convert animation data to aiAnimation et al
+ void ConvertAnimations();
+
+ // ------------------------------------------------------------------------------------------------
+ // takes a fbx node name and returns the identifier to be used in the assimp output scene.
+ // the function is guaranteed to provide consistent results over multiple invocations
+ // UNLESS RenameNode() is called for a particular node name.
+ std::string FixNodeName(const std::string& name);
+
+ typedef std::map<const AnimationCurveNode*, const AnimationLayer*> LayerMap;
+
+ // XXX: better use multi_map ..
+ typedef std::map<std::string, std::vector<const AnimationCurveNode*> > NodeMap;
+
+ // ------------------------------------------------------------------------------------------------
+ void ConvertAnimationStack(const AnimationStack& st);
+
+ // ------------------------------------------------------------------------------------------------
+ void GenerateNodeAnimations(std::vector<aiNodeAnim*>& node_anims,
+ const std::string& fixed_name,
+ const std::vector<const AnimationCurveNode*>& curves,
+ const LayerMap& layer_map,
+ int64_t start, int64_t stop,
+ double& max_time,
+ double& min_time);
+
+ // ------------------------------------------------------------------------------------------------
+ bool IsRedundantAnimationData(const Model& target,
+ TransformationComp comp,
+ const std::vector<const AnimationCurveNode*>& curves);
+
+ // ------------------------------------------------------------------------------------------------
+ aiNodeAnim* GenerateRotationNodeAnim(const std::string& name,
+ const Model& target,
+ const std::vector<const AnimationCurveNode*>& curves,
+ const LayerMap& layer_map,
+ int64_t start, int64_t stop,
+ double& max_time,
+ double& min_time);
+
+ // ------------------------------------------------------------------------------------------------
+ aiNodeAnim* GenerateScalingNodeAnim(const std::string& name,
+ const Model& /*target*/,
+ const std::vector<const AnimationCurveNode*>& curves,
+ const LayerMap& layer_map,
+ int64_t start, int64_t stop,
+ double& max_time,
+ double& min_time);
+
+ // ------------------------------------------------------------------------------------------------
+ aiNodeAnim* GenerateTranslationNodeAnim(const std::string& name,
+ const Model& /*target*/,
+ const std::vector<const AnimationCurveNode*>& curves,
+ const LayerMap& layer_map,
+ int64_t start, int64_t stop,
+ double& max_time,
+ double& min_time,
+ bool inverse = false);
+
+ // ------------------------------------------------------------------------------------------------
+ // generate node anim, extracting only Rotation, Scaling and Translation from the given chain
+ aiNodeAnim* GenerateSimpleNodeAnim(const std::string& name,
+ const Model& target,
+ NodeMap::const_iterator chain[TransformationComp_MAXIMUM],
+ NodeMap::const_iterator iter_end,
+ const LayerMap& layer_map,
+ int64_t start, int64_t stop,
+ double& max_time,
+ double& min_time,
+ bool reverse_order = false);
+
+ // key (time), value, mapto (component index)
+ typedef std::tuple<std::shared_ptr<KeyTimeList>, std::shared_ptr<KeyValueList>, unsigned int > KeyFrameList;
+ typedef std::vector<KeyFrameList> KeyFrameListList;
+
+ // ------------------------------------------------------------------------------------------------
+ KeyFrameListList GetKeyframeList(const std::vector<const AnimationCurveNode*>& nodes, int64_t start, int64_t stop);
+
+ // ------------------------------------------------------------------------------------------------
+ KeyTimeList GetKeyTimeList(const KeyFrameListList& inputs);
+
+ // ------------------------------------------------------------------------------------------------
+ void InterpolateKeys(aiVectorKey* valOut, const KeyTimeList& keys, const KeyFrameListList& inputs,
+ const aiVector3D& def_value,
+ double& max_time,
+ double& min_time);
+
+ // ------------------------------------------------------------------------------------------------
+ void InterpolateKeys(aiQuatKey* valOut, const KeyTimeList& keys, const KeyFrameListList& inputs,
+ const aiVector3D& def_value,
+ double& maxTime,
+ double& minTime,
+ Model::RotOrder order);
+
+ // ------------------------------------------------------------------------------------------------
+ void ConvertTransformOrder_TRStoSRT(aiQuatKey* out_quat, aiVectorKey* out_scale,
+ aiVectorKey* out_translation,
+ const KeyFrameListList& scaling,
+ const KeyFrameListList& translation,
+ const KeyFrameListList& rotation,
+ const KeyTimeList& times,
+ double& maxTime,
+ double& minTime,
+ Model::RotOrder order,
+ const aiVector3D& def_scale,
+ const aiVector3D& def_translate,
+ const aiVector3D& def_rotation);
+
+ // ------------------------------------------------------------------------------------------------
+ // euler xyz -> quat
+ aiQuaternion EulerToQuaternion(const aiVector3D& rot, Model::RotOrder order);
+
+ // ------------------------------------------------------------------------------------------------
+ void ConvertScaleKeys(aiNodeAnim* na, const std::vector<const AnimationCurveNode*>& nodes, const LayerMap& /*layers*/,
+ int64_t start, int64_t stop,
+ double& maxTime,
+ double& minTime);
+
+ // ------------------------------------------------------------------------------------------------
+ void ConvertTranslationKeys(aiNodeAnim* na, const std::vector<const AnimationCurveNode*>& nodes,
+ const LayerMap& /*layers*/,
+ int64_t start, int64_t stop,
+ double& maxTime,
+ double& minTime);
+
+ // ------------------------------------------------------------------------------------------------
+ void ConvertRotationKeys(aiNodeAnim* na, const std::vector<const AnimationCurveNode*>& nodes,
+ const LayerMap& /*layers*/,
+ int64_t start, int64_t stop,
+ double& maxTime,
+ double& minTime,
+ Model::RotOrder order);
+
+ void ConvertGlobalSettings();
+
+ // ------------------------------------------------------------------------------------------------
+ // copy generated meshes, animations, lights, cameras and textures to the output scene
+ void TransferDataToScene();
+
+private:
+
+ // 0: not assigned yet, others: index is value - 1
+ unsigned int defaultMaterialIndex;
+
+ std::vector<aiMesh*> meshes;
+ std::vector<aiMaterial*> materials;
+ std::vector<aiAnimation*> animations;
+ std::vector<aiLight*> lights;
+ std::vector<aiCamera*> cameras;
+ std::vector<aiTexture*> textures;
+
+ typedef std::map<const Material*, unsigned int> MaterialMap;
+ MaterialMap materials_converted;
+
+ typedef std::map<const Video*, unsigned int> VideoMap;
+ VideoMap textures_converted;
+
+ typedef std::map<const Geometry*, std::vector<unsigned int> > MeshMap;
+ MeshMap meshes_converted;
+
+ // fixed node name -> which trafo chain components have animations?
+ typedef std::map<std::string, unsigned int> NodeAnimBitMap;
+ NodeAnimBitMap node_anim_chain_bits;
+
+ NodeNameCache mNodeNames;
+ double anim_fps;
+
+ aiScene* const out;
+ const FBX::Document& doc;
+};
+
}
}
diff --git a/code/FBXDeformer.cpp b/code/FBXDeformer.cpp
index 637144ab1..9c7c7a4c4 100644
--- a/code/FBXDeformer.cpp
+++ b/code/FBXDeformer.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/FBXDocument.cpp b/code/FBXDocument.cpp
index d2f26c4c7..f53ae4405 100644
--- a/code/FBXDocument.cpp
+++ b/code/FBXDocument.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -70,13 +71,13 @@ LazyObject::LazyObject(uint64_t id, const Element& element, const Document& doc)
, id(id)
, flags()
{
-
+ // empty
}
// ------------------------------------------------------------------------------------------------
LazyObject::~LazyObject()
{
-
+ // empty
}
// ------------------------------------------------------------------------------------------------
@@ -213,7 +214,7 @@ const Object* LazyObject::Get(bool dieOnError)
// note: the error message is already formatted, so raw logging is ok
if(!DefaultLogger::isNullLogger()) {
- DefaultLogger::get()->error(ex.what());
+ ASSIMP_LOG_ERROR(ex.what());
}
return NULL;
}
@@ -232,16 +233,15 @@ Object::Object(uint64_t id, const Element& element, const std::string& name)
, name(name)
, id(id)
{
-
+ // empty
}
// ------------------------------------------------------------------------------------------------
Object::~Object()
{
-
+ // empty
}
-
// ------------------------------------------------------------------------------------------------
FileGlobalSettings::FileGlobalSettings(const Document& doc, std::shared_ptr<const PropertyTable> props)
: props(props)
@@ -292,11 +292,10 @@ Document::~Document()
}
// ------------------------------------------------------------------------------------------------
-static const int LowerSupportedVersion = 7100;
-static const int UpperSupportedVersion = 7400;
+static const unsigned int LowerSupportedVersion = 7100;
+static const unsigned int UpperSupportedVersion = 7400;
-void Document::ReadHeader()
-{
+void Document::ReadHeader() {
// Read ID objects from "Objects" section
const Scope& sc = parser.GetRootScope();
const Element* const ehead = sc["FBXHeaderExtension"];
@@ -346,14 +345,15 @@ void Document::ReadGlobalSettings()
{
const Scope& sc = parser.GetRootScope();
const Element* const ehead = sc["GlobalSettings"];
- if(!ehead || !ehead->Compound()) {
- DOMWarning("no GlobalSettings dictionary found");
-
+ if ( nullptr == ehead || !ehead->Compound() ) {
+ DOMWarning( "no GlobalSettings dictionary found" );
globals.reset(new FileGlobalSettings(*this, std::make_shared<const PropertyTable>()));
return;
}
- std::shared_ptr<const PropertyTable> props = GetPropertyTable(*this, "", *ehead, *ehead->Compound(), true);
+ std::shared_ptr<const PropertyTable> props = GetPropertyTable( *this, "", *ehead, *ehead->Compound(), true );
+
+ //double v = PropertyGet<float>( *props.get(), std::string("UnitScaleFactor"), 1.0 );
if(!props) {
DOMError("GlobalSettings dictionary contains no property table");
@@ -362,7 +362,6 @@ void Document::ReadGlobalSettings()
globals.reset(new FileGlobalSettings(*this, props));
}
-
// ------------------------------------------------------------------------------------------------
void Document::ReadObjects()
{
@@ -388,7 +387,6 @@ void Document::ReadObjects()
}
const char* err;
-
const uint64_t id = ParseTokenAsID(*tok[0], err);
if(err) {
DOMError(err,el.second);
@@ -470,8 +468,6 @@ void Document::ReadPropertyTemplates()
}
}
-
-
// ------------------------------------------------------------------------------------------------
void Document::ReadConnections()
{
@@ -483,7 +479,6 @@ void Document::ReadConnections()
}
uint64_t insertionOrder = 0l;
-
const Scope& sconns = *econns->Compound();
const ElementCollection conns = sconns.GetCollection("C");
for(ElementMap::const_iterator it = conns.first; it != conns.second; ++it) {
@@ -492,7 +487,9 @@ void Document::ReadConnections()
// PP = property-property connection, ignored for now
// (tokens: "PP", ID1, "Property1", ID2, "Property2")
- if(type == "PP") continue;
+ if ( type == "PP" ) {
+ continue;
+ }
const uint64_t src = ParseTokenAsID(GetRequiredToken(el,1));
const uint64_t dest = ParseTokenAsID(GetRequiredToken(el,2));
@@ -519,11 +516,10 @@ void Document::ReadConnections()
}
}
-
// ------------------------------------------------------------------------------------------------
const std::vector<const AnimationStack*>& Document::AnimationStacks() const
{
- if (!animationStacksResolved.empty() || !animationStacks.size()) {
+ if (!animationStacksResolved.empty() || animationStacks.empty()) {
return animationStacksResolved;
}
@@ -541,7 +537,6 @@ const std::vector<const AnimationStack*>& Document::AnimationStacks() const
return animationStacksResolved;
}
-
// ------------------------------------------------------------------------------------------------
LazyObject* Document::GetObject(uint64_t id) const
{
@@ -552,8 +547,7 @@ LazyObject* Document::GetObject(uint64_t id) const
#define MAX_CLASSNAMES 6
// ------------------------------------------------------------------------------------------------
-std::vector<const Connection*> Document::GetConnectionsSequenced(uint64_t id,
- const ConnectionMap& conns) const
+std::vector<const Connection*> Document::GetConnectionsSequenced(uint64_t id, const ConnectionMap& conns) const
{
std::vector<const Connection*> temp;
@@ -565,12 +559,11 @@ std::vector<const Connection*> Document::GetConnectionsSequenced(uint64_t id,
temp.push_back((*it).second);
}
- std::sort(temp.begin(), temp.end(), std::mem_fun(&Connection::Compare));
+ std::sort(temp.begin(), temp.end(), std::mem_fn(&Connection::Compare));
return temp; // NRVO should handle this
}
-
// ------------------------------------------------------------------------------------------------
std::vector<const Connection*> Document::GetConnectionsSequenced(uint64_t id, bool is_src,
const ConnectionMap& conns,
@@ -579,17 +572,17 @@ std::vector<const Connection*> Document::GetConnectionsSequenced(uint64_t id, bo
{
ai_assert(classnames);
- ai_assert(count != 0 && count <= MAX_CLASSNAMES);
+ ai_assert( count != 0 );
+ ai_assert( count <= MAX_CLASSNAMES);
- size_t lenghts[MAX_CLASSNAMES];
+ size_t lengths[MAX_CLASSNAMES];
const size_t c = count;
for (size_t i = 0; i < c; ++i) {
- lenghts[i] = strlen(classnames[i]);
+ lengths[ i ] = strlen(classnames[i]);
}
std::vector<const Connection*> temp;
-
const std::pair<ConnectionMap::const_iterator,ConnectionMap::const_iterator> range =
conns.equal_range(id);
@@ -604,7 +597,7 @@ std::vector<const Connection*> Document::GetConnectionsSequenced(uint64_t id, bo
for (size_t i = 0; i < c; ++i) {
ai_assert(classnames[i]);
- if(static_cast<size_t>(std::distance(key.begin(),key.end())) == lenghts[i] && !strncmp(classnames[i],obtype,lenghts[i])) {
+ if(static_cast<size_t>(std::distance(key.begin(),key.end())) == lengths[i] && !strncmp(classnames[i],obtype,lengths[i])) {
obtype = NULL;
break;
}
@@ -617,53 +610,44 @@ std::vector<const Connection*> Document::GetConnectionsSequenced(uint64_t id, bo
temp.push_back((*it).second);
}
- std::sort(temp.begin(), temp.end(), std::mem_fun(&Connection::Compare));
+ std::sort(temp.begin(), temp.end(), std::mem_fn(&Connection::Compare));
return temp; // NRVO should handle this
}
-
// ------------------------------------------------------------------------------------------------
std::vector<const Connection*> Document::GetConnectionsBySourceSequenced(uint64_t source) const
{
return GetConnectionsSequenced(source, ConnectionsBySource());
}
-
-
// ------------------------------------------------------------------------------------------------
-std::vector<const Connection*> Document::GetConnectionsBySourceSequenced(uint64_t dest,
- const char* classname) const
+std::vector<const Connection*> Document::GetConnectionsBySourceSequenced(uint64_t src, const char* classname) const
{
const char* arr[] = {classname};
- return GetConnectionsBySourceSequenced(dest, arr,1);
+ return GetConnectionsBySourceSequenced(src, arr,1);
}
-
-
// ------------------------------------------------------------------------------------------------
-std::vector<const Connection*> Document::GetConnectionsBySourceSequenced(uint64_t source,
- const char* const* classnames, size_t count) const
+std::vector<const Connection*> Document::GetConnectionsBySourceSequenced(uint64_t source,
+ const char* const* classnames, size_t count) const
{
return GetConnectionsSequenced(source, true, ConnectionsBySource(),classnames, count);
}
-
// ------------------------------------------------------------------------------------------------
std::vector<const Connection*> Document::GetConnectionsByDestinationSequenced(uint64_t dest,
- const char* classname) const
+ const char* classname) const
{
const char* arr[] = {classname};
return GetConnectionsByDestinationSequenced(dest, arr,1);
}
-
// ------------------------------------------------------------------------------------------------
std::vector<const Connection*> Document::GetConnectionsByDestinationSequenced(uint64_t dest) const
{
return GetConnectionsSequenced(dest, ConnectionsByDestination());
}
-
// ------------------------------------------------------------------------------------------------
std::vector<const Connection*> Document::GetConnectionsByDestinationSequenced(uint64_t dest,
const char* const* classnames, size_t count) const
@@ -672,10 +656,9 @@ std::vector<const Connection*> Document::GetConnectionsByDestinationSequenced(ui
return GetConnectionsSequenced(dest, false, ConnectionsByDestination(),classnames, count);
}
-
// ------------------------------------------------------------------------------------------------
Connection::Connection(uint64_t insertionOrder, uint64_t src, uint64_t dest, const std::string& prop,
- const Document& doc)
+ const Document& doc)
: insertionOrder(insertionOrder)
, prop(prop)
@@ -688,14 +671,12 @@ Connection::Connection(uint64_t insertionOrder, uint64_t src, uint64_t dest, co
ai_assert(!dest || doc.Objects().find(dest) != doc.Objects().end());
}
-
// ------------------------------------------------------------------------------------------------
Connection::~Connection()
{
-
+ // empty
}
-
// ------------------------------------------------------------------------------------------------
LazyObject& Connection::LazySourceObject() const
{
@@ -704,7 +685,6 @@ LazyObject& Connection::LazySourceObject() const
return *lazy;
}
-
// ------------------------------------------------------------------------------------------------
LazyObject& Connection::LazyDestinationObject() const
{
@@ -713,7 +693,6 @@ LazyObject& Connection::LazyDestinationObject() const
return *lazy;
}
-
// ------------------------------------------------------------------------------------------------
const Object* Connection::SourceObject() const
{
@@ -722,7 +701,6 @@ const Object* Connection::SourceObject() const
return lazy->Get();
}
-
// ------------------------------------------------------------------------------------------------
const Object* Connection::DestinationObject() const
{
@@ -735,4 +713,3 @@ const Object* Connection::DestinationObject() const
} // !Assimp
#endif
-
diff --git a/code/FBXDocument.h b/code/FBXDocument.h
index 5c8bc610f..654f5bfa8 100644
--- a/code/FBXDocument.h
+++ b/code/FBXDocument.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -338,12 +339,7 @@ public:
class Model : public Object
{
public:
- Model(uint64_t id, const Element& element, const Document& doc, const std::string& name);
- virtual ~Model();
-
-public:
- enum RotOrder
- {
+ enum RotOrder {
RotOrder_EulerXYZ = 0,
RotOrder_EulerXZY,
RotOrder_EulerYZX,
@@ -357,8 +353,7 @@ public:
};
- enum TransformInheritance
- {
+ enum TransformInheritance {
TransformInheritance_RrSs = 0,
TransformInheritance_RSrs,
TransformInheritance_Rrs,
@@ -366,7 +361,10 @@ public:
TransformInheritance_MAX // end-of-enum sentinel
};
-public:
+ Model(uint64_t id, const Element& element, const Document& doc, const std::string& name);
+
+ virtual ~Model();
+
fbx_simple_property(QuaternionInterpolate, int, 0)
fbx_simple_property(RotationOffset, aiVector3D, aiVector3D())
@@ -443,7 +441,6 @@ public:
fbx_simple_property(LODBox, bool, false)
fbx_simple_property(Freeze, bool, false)
-public:
const std::string& Shading() const {
return shading;
}
@@ -462,13 +459,11 @@ public:
return materials;
}
-
/** Get geometry links */
const std::vector<const Geometry*>& GetGeometry() const {
return geometry;
}
-
/** Get node attachments */
const std::vector<const NodeAttribute*>& GetAttributes() const {
return attributes;
@@ -477,7 +472,6 @@ public:
/** convenience method to check if the node has a Null node marker */
bool IsNull() const;
-
private:
void ResolveLinks(const Element& element, const Document& doc);
@@ -603,10 +597,10 @@ public:
return textures[index];
}
- const int textureCount() const {
+ int textureCount() const {
return static_cast<int>(textures.size());
}
- const BlendMode GetBlendMode() const
+ BlendMode GetBlendMode() const
{
return blendMode;
}
@@ -654,7 +648,7 @@ public:
return content;
}
- const uint32_t ContentLength() const {
+ uint32_t ContentLength() const {
return contentLength;
}
@@ -805,7 +799,6 @@ private:
typedef std::vector<const AnimationCurveNode*> AnimationCurveNodeList;
-
/** Represents a FBX animation layer (i.e. a list of node animations) */
class AnimationLayer : public Object
{
@@ -828,10 +821,8 @@ private:
const Document& doc;
};
-
typedef std::vector<const AnimationLayer*> AnimationLayerList;
-
/** Represents a FBX animation stack (i.e. a list of animation layers) */
class AnimationStack : public Object
{
@@ -839,7 +830,6 @@ public:
AnimationStack(uint64_t id, const Element& element, const std::string& name, const Document& doc);
virtual ~AnimationStack();
-public:
fbx_simple_property(LocalStart, int64_t, 0L)
fbx_simple_property(LocalStop, int64_t, 0L)
fbx_simple_property(ReferenceStart, int64_t, 0L)
@@ -879,7 +869,6 @@ private:
typedef std::vector<float> WeightArray;
typedef std::vector<unsigned int> WeightIndexArray;
-
/** DOM class for skin deformer clusters (aka subdeformers) */
class Cluster : public Deformer
{
@@ -924,8 +913,6 @@ private:
const Model* node;
};
-
-
/** DOM class for skin deformers */
class Skin : public Deformer
{
@@ -1009,14 +996,11 @@ public:
typedef std::map<uint64_t, LazyObject*> ObjectMap;
typedef std::fbx_unordered_map<std::string, std::shared_ptr<const PropertyTable> > PropertyTemplateMap;
-
typedef std::multimap<uint64_t, const Connection*> ConnectionMap;
-
/** DOM class for global document settings, a single instance per document can
* be accessed via Document.Globals(). */
-class FileGlobalSettings
-{
+class FileGlobalSettings {
public:
FileGlobalSettings(const Document& doc, std::shared_ptr<const PropertyTable> props);
~FileGlobalSettings();
@@ -1038,8 +1022,8 @@ public:
fbx_simple_property(CoordAxisSign, int, 1)
fbx_simple_property(OriginalUpAxis, int, 0)
fbx_simple_property(OriginalUpAxisSign, int, 1)
- fbx_simple_property(UnitScaleFactor, double, 1)
- fbx_simple_property(OriginalUnitScaleFactor, double, 1)
+ fbx_simple_property(UnitScaleFactor, float, 1)
+ fbx_simple_property(OriginalUnitScaleFactor, float, 1)
fbx_simple_property(AmbientColor, aiVector3D, aiVector3D(0,0,0))
fbx_simple_property(DefaultCamera, std::string, "")
@@ -1074,9 +1058,6 @@ private:
const Document& doc;
};
-
-
-
/** DOM root for a FBX file */
class Document
{
@@ -1154,8 +1135,6 @@ private:
const ConnectionMap&,
const char* const* classnames,
size_t count) const;
-
-private:
void ReadHeader();
void ReadObjects();
void ReadPropertyTemplates();
diff --git a/code/FBXDocumentUtil.cpp b/code/FBXDocumentUtil.cpp
index 27921b920..6f1e18e42 100644
--- a/code/FBXDocumentUtil.cpp
+++ b/code/FBXDocumentUtil.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -78,7 +79,7 @@ void DOMError(const std::string& message, const Element* element /*= NULL*/)
void DOMWarning(const std::string& message, const Token& token)
{
if(DefaultLogger::get()) {
- DefaultLogger::get()->warn(Util::AddTokenText("FBX-DOM",message,&token));
+ ASSIMP_LOG_WARN(Util::AddTokenText("FBX-DOM",message,&token));
}
}
@@ -90,7 +91,7 @@ void DOMWarning(const std::string& message, const Element* element /*= NULL*/)
return;
}
if(DefaultLogger::get()) {
- DefaultLogger::get()->warn("FBX-DOM: " + message);
+ ASSIMP_LOG_WARN("FBX-DOM: " + message);
}
}
@@ -114,7 +115,7 @@ std::shared_ptr<const PropertyTable> GetPropertyTable(const Document& doc,
}
}
- if(!Properties70) {
+ if(!Properties70 || !Properties70->Compound()) {
if(!no_warn) {
DOMWarning("property table (Properties70) not found",&element);
}
diff --git a/code/FBXDocumentUtil.h b/code/FBXDocumentUtil.h
index 98fae75ca..c0435a663 100644
--- a/code/FBXDocumentUtil.h
+++ b/code/FBXDocumentUtil.h
@@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef INCLUDED_AI_FBX_DOCUMENT_UTIL_H
#define INCLUDED_AI_FBX_DOCUMENT_UTIL_H
-#include "../include/assimp/defs.h"
+#include <assimp/defs.h>
#include <string>
#include <memory>
#include "FBXDocument.h"
@@ -105,7 +105,7 @@ inline const T* ProcessSimpleConnection(const Connection& con,
const Object* const ob = con.SourceObject();
if(!ob) {
- DOMWarning("failed to read source object for incoming" + std::string(name) +
+ DOMWarning("failed to read source object for incoming " + std::string(name) +
" link, ignoring",
&element);
return NULL;
diff --git a/code/FBXExportNode.cpp b/code/FBXExportNode.cpp
new file mode 100644
index 000000000..a1171eca8
--- /dev/null
+++ b/code/FBXExportNode.cpp
@@ -0,0 +1,568 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2018, assimp 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 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.
+
+----------------------------------------------------------------------
+*/
+#ifndef ASSIMP_BUILD_NO_EXPORT
+#ifndef ASSIMP_BUILD_NO_FBX_EXPORTER
+
+#include "FBXExportNode.h"
+#include "FBXCommon.h"
+
+#include <assimp/StreamWriter.h> // StreamWriterLE
+#include <assimp/Exceptional.h> // DeadlyExportError
+#include <assimp/ai_assert.h>
+#include <assimp/StringUtils.h> // ai_snprintf
+
+#include <string>
+#include <ostream>
+#include <sstream> // ostringstream
+#include <memory> // shared_ptr
+
+// AddP70<type> helpers... there's no usable pattern here,
+// so all are defined as separate functions.
+// Even "animatable" properties are often completely different
+// from the standard (nonanimated) property definition,
+// so they are specified with an 'A' suffix.
+
+void FBX::Node::AddP70int(
+ const std::string& name, int32_t value
+) {
+ FBX::Node n("P");
+ n.AddProperties(name, "int", "Integer", "", value);
+ AddChild(n);
+}
+
+void FBX::Node::AddP70bool(
+ const std::string& name, bool value
+) {
+ FBX::Node n("P");
+ n.AddProperties(name, "bool", "", "", int32_t(value));
+ AddChild(n);
+}
+
+void FBX::Node::AddP70double(
+ const std::string& name, double value
+) {
+ FBX::Node n("P");
+ n.AddProperties(name, "double", "Number", "", value);
+ AddChild(n);
+}
+
+void FBX::Node::AddP70numberA(
+ const std::string& name, double value
+) {
+ FBX::Node n("P");
+ n.AddProperties(name, "Number", "", "A", value);
+ AddChild(n);
+}
+
+void FBX::Node::AddP70color(
+ const std::string& name, double r, double g, double b
+) {
+ FBX::Node n("P");
+ n.AddProperties(name, "ColorRGB", "Color", "", r, g, b);
+ AddChild(n);
+}
+
+void FBX::Node::AddP70colorA(
+ const std::string& name, double r, double g, double b
+) {
+ FBX::Node n("P");
+ n.AddProperties(name, "Color", "", "A", r, g, b);
+ AddChild(n);
+}
+
+void FBX::Node::AddP70vector(
+ const std::string& name, double x, double y, double z
+) {
+ FBX::Node n("P");
+ n.AddProperties(name, "Vector3D", "Vector", "", x, y, z);
+ AddChild(n);
+}
+
+void FBX::Node::AddP70vectorA(
+ const std::string& name, double x, double y, double z
+) {
+ FBX::Node n("P");
+ n.AddProperties(name, "Vector", "", "A", x, y, z);
+ AddChild(n);
+}
+
+void FBX::Node::AddP70string(
+ const std::string& name, const std::string& value
+) {
+ FBX::Node n("P");
+ n.AddProperties(name, "KString", "", "", value);
+ AddChild(n);
+}
+
+void FBX::Node::AddP70enum(
+ const std::string& name, int32_t value
+) {
+ FBX::Node n("P");
+ n.AddProperties(name, "enum", "", "", value);
+ AddChild(n);
+}
+
+void FBX::Node::AddP70time(
+ const std::string& name, int64_t value
+) {
+ FBX::Node n("P");
+ n.AddProperties(name, "KTime", "Time", "", value);
+ AddChild(n);
+}
+
+
+// public member functions for writing nodes to stream
+
+void FBX::Node::Dump(
+ std::shared_ptr<Assimp::IOStream> outfile,
+ bool binary, int indent
+) {
+ if (binary) {
+ Assimp::StreamWriterLE outstream(outfile);
+ DumpBinary(outstream);
+ } else {
+ std::ostringstream ss;
+ DumpAscii(ss, indent);
+ std::string s = ss.str();
+ outfile->Write(s.c_str(), s.size(), 1);
+ }
+}
+
+void FBX::Node::Dump(
+ Assimp::StreamWriterLE &outstream,
+ bool binary, int indent
+) {
+ if (binary) {
+ DumpBinary(outstream);
+ } else {
+ std::ostringstream ss;
+ DumpAscii(ss, indent);
+ outstream.PutString(ss.str());
+ }
+}
+
+
+// public member functions for low-level writing
+
+void FBX::Node::Begin(
+ Assimp::StreamWriterLE &s,
+ bool binary, int indent
+) {
+ if (binary) {
+ BeginBinary(s);
+ } else {
+ // assume we're at the correct place to start already
+ (void)indent;
+ std::ostringstream ss;
+ BeginAscii(ss, indent);
+ s.PutString(ss.str());
+ }
+}
+
+void FBX::Node::DumpProperties(
+ Assimp::StreamWriterLE& s,
+ bool binary, int indent
+) {
+ if (binary) {
+ DumpPropertiesBinary(s);
+ } else {
+ std::ostringstream ss;
+ DumpPropertiesAscii(ss, indent);
+ s.PutString(ss.str());
+ }
+}
+
+void FBX::Node::EndProperties(
+ Assimp::StreamWriterLE &s,
+ bool binary, int indent
+) {
+ EndProperties(s, binary, indent, properties.size());
+}
+
+void FBX::Node::EndProperties(
+ Assimp::StreamWriterLE &s,
+ bool binary, int indent,
+ size_t num_properties
+) {
+ if (binary) {
+ EndPropertiesBinary(s, num_properties);
+ } else {
+ // nothing to do
+ (void)indent;
+ }
+}
+
+void FBX::Node::BeginChildren(
+ Assimp::StreamWriterLE &s,
+ bool binary, int indent
+) {
+ if (binary) {
+ // nothing to do
+ } else {
+ std::ostringstream ss;
+ BeginChildrenAscii(ss, indent);
+ s.PutString(ss.str());
+ }
+}
+
+void FBX::Node::DumpChildren(
+ Assimp::StreamWriterLE& s,
+ bool binary, int indent
+) {
+ if (binary) {
+ DumpChildrenBinary(s);
+ } else {
+ std::ostringstream ss;
+ DumpChildrenAscii(ss, indent);
+ s.PutString(ss.str());
+ }
+}
+
+void FBX::Node::End(
+ Assimp::StreamWriterLE &s,
+ bool binary, int indent,
+ bool has_children
+) {
+ if (binary) {
+ EndBinary(s, has_children);
+ } else {
+ std::ostringstream ss;
+ EndAscii(ss, indent, has_children);
+ s.PutString(ss.str());
+ }
+}
+
+
+// public member functions for writing to binary fbx
+
+void FBX::Node::DumpBinary(Assimp::StreamWriterLE &s)
+{
+ // write header section (with placeholders for some things)
+ BeginBinary(s);
+
+ // write properties
+ DumpPropertiesBinary(s);
+
+ // go back and fill in property related placeholders
+ EndPropertiesBinary(s, properties.size());
+
+ // write children
+ DumpChildrenBinary(s);
+
+ // finish, filling in end offset placeholder
+ EndBinary(s, force_has_children || !children.empty());
+}
+
+
+// public member functions for writing to ascii fbx
+
+void FBX::Node::DumpAscii(std::ostream &s, int indent)
+{
+ // write name
+ BeginAscii(s, indent);
+
+ // write properties
+ DumpPropertiesAscii(s, indent);
+
+ if (force_has_children || !children.empty()) {
+ // begin children (with a '{')
+ BeginChildrenAscii(s, indent + 1);
+ // write children
+ DumpChildrenAscii(s, indent + 1);
+ }
+
+ // finish (also closing the children bracket '}')
+ EndAscii(s, indent, force_has_children || !children.empty());
+}
+
+
+// private member functions for low-level writing to fbx
+
+void FBX::Node::BeginBinary(Assimp::StreamWriterLE &s)
+{
+ // remember start pos so we can come back and write the end pos
+ this->start_pos = s.Tell();
+
+ // placeholders for end pos and property section info
+ s.PutU4(0); // end pos
+ s.PutU4(0); // number of properties
+ s.PutU4(0); // total property section length
+
+ // node name
+ s.PutU1(uint8_t(name.size())); // length of node name
+ s.PutString(name); // node name as raw bytes
+
+ // property data comes after here
+ this->property_start = s.Tell();
+}
+
+void FBX::Node::DumpPropertiesBinary(Assimp::StreamWriterLE& s)
+{
+ for (auto &p : properties) {
+ p.DumpBinary(s);
+ }
+}
+
+void FBX::Node::EndPropertiesBinary(
+ Assimp::StreamWriterLE &s,
+ size_t num_properties
+) {
+ if (num_properties == 0) { return; }
+ size_t pos = s.Tell();
+ ai_assert(pos > property_start);
+ size_t property_section_size = pos - property_start;
+ s.Seek(start_pos + 4);
+ s.PutU4(uint32_t(num_properties));
+ s.PutU4(uint32_t(property_section_size));
+ s.Seek(pos);
+}
+
+void FBX::Node::DumpChildrenBinary(Assimp::StreamWriterLE& s)
+{
+ for (FBX::Node& child : children) {
+ child.DumpBinary(s);
+ }
+}
+
+void FBX::Node::EndBinary(
+ Assimp::StreamWriterLE &s,
+ bool has_children
+) {
+ // if there were children, add a null record
+ if (has_children) { s.PutString(FBX::NULL_RECORD); }
+
+ // now go back and write initial pos
+ this->end_pos = s.Tell();
+ s.Seek(start_pos);
+ s.PutU4(uint32_t(end_pos));
+ s.Seek(end_pos);
+}
+
+
+void FBX::Node::BeginAscii(std::ostream& s, int indent)
+{
+ s << '\n';
+ for (int i = 0; i < indent; ++i) { s << '\t'; }
+ s << name << ": ";
+}
+
+void FBX::Node::DumpPropertiesAscii(std::ostream &s, int indent)
+{
+ for (size_t i = 0; i < properties.size(); ++i) {
+ if (i > 0) { s << ", "; }
+ properties[i].DumpAscii(s, indent);
+ }
+}
+
+void FBX::Node::BeginChildrenAscii(std::ostream& s, int indent)
+{
+ // only call this if there are actually children
+ s << " {";
+ (void)indent;
+}
+
+void FBX::Node::DumpChildrenAscii(std::ostream& s, int indent)
+{
+ // children will need a lot of padding and corralling
+ if (children.size() || force_has_children) {
+ for (size_t i = 0; i < children.size(); ++i) {
+ // no compression in ascii files, so skip this node if it exists
+ if (children[i].name == "EncryptionType") { continue; }
+ // the child can dump itself
+ children[i].DumpAscii(s, indent);
+ }
+ }
+}
+
+void FBX::Node::EndAscii(std::ostream& s, int indent, bool has_children)
+{
+ if (!has_children) { return; } // nothing to do
+ s << '\n';
+ for (int i = 0; i < indent; ++i) { s << '\t'; }
+ s << "}";
+}
+
+// private helpers for static member functions
+
+// ascii property node from vector of doubles
+void FBX::Node::WritePropertyNodeAscii(
+ const std::string& name,
+ const std::vector<double>& v,
+ Assimp::StreamWriterLE& s,
+ int indent
+){
+ char buffer[32];
+ FBX::Node node(name);
+ node.Begin(s, false, indent);
+ std::string vsize = std::to_string(v.size());
+ // *<size> {
+ s.PutChar('*'); s.PutString(vsize); s.PutString(" {\n");
+ // indent + 1
+ for (int i = 0; i < indent + 1; ++i) { s.PutChar('\t'); }
+ // a: value,value,value,...
+ s.PutString("a: ");
+ int count = 0;
+ for (size_t i = 0; i < v.size(); ++i) {
+ if (i > 0) { s.PutChar(','); }
+ int len = ai_snprintf(buffer, sizeof(buffer), "%f", v[i]);
+ count += len;
+ if (count > 2048) { s.PutChar('\n'); count = 0; }
+ if (len < 0 || len > 31) {
+ // this should never happen
+ throw DeadlyExportError("failed to convert double to string");
+ }
+ for (int j = 0; j < len; ++j) { s.PutChar(buffer[j]); }
+ }
+ // }
+ s.PutChar('\n');
+ for (int i = 0; i < indent; ++i) { s.PutChar('\t'); }
+ s.PutChar('}'); s.PutChar(' ');
+ node.End(s, false, indent, false);
+}
+
+// ascii property node from vector of int32_t
+void FBX::Node::WritePropertyNodeAscii(
+ const std::string& name,
+ const std::vector<int32_t>& v,
+ Assimp::StreamWriterLE& s,
+ int indent
+){
+ char buffer[32];
+ FBX::Node node(name);
+ node.Begin(s, false, indent);
+ std::string vsize = std::to_string(v.size());
+ // *<size> {
+ s.PutChar('*'); s.PutString(vsize); s.PutString(" {\n");
+ // indent + 1
+ for (int i = 0; i < indent + 1; ++i) { s.PutChar('\t'); }
+ // a: value,value,value,...
+ s.PutString("a: ");
+ int count = 0;
+ for (size_t i = 0; i < v.size(); ++i) {
+ if (i > 0) { s.PutChar(','); }
+ int len = ai_snprintf(buffer, sizeof(buffer), "%d", v[i]);
+ count += len;
+ if (count > 2048) { s.PutChar('\n'); count = 0; }
+ if (len < 0 || len > 31) {
+ // this should never happen
+ throw DeadlyExportError("failed to convert double to string");
+ }
+ for (int j = 0; j < len; ++j) { s.PutChar(buffer[j]); }
+ }
+ // }
+ s.PutChar('\n');
+ for (int i = 0; i < indent; ++i) { s.PutChar('\t'); }
+ s.PutChar('}'); s.PutChar(' ');
+ node.End(s, false, indent, false);
+}
+
+// binary property node from vector of doubles
+// TODO: optional zip compression!
+void FBX::Node::WritePropertyNodeBinary(
+ const std::string& name,
+ const std::vector<double>& v,
+ Assimp::StreamWriterLE& s
+){
+ FBX::Node node(name);
+ node.BeginBinary(s);
+ s.PutU1('d');
+ s.PutU4(uint32_t(v.size())); // number of elements
+ s.PutU4(0); // no encoding (1 would be zip-compressed)
+ s.PutU4(uint32_t(v.size()) * 8); // data size
+ for (auto it = v.begin(); it != v.end(); ++it) { s.PutF8(*it); }
+ node.EndPropertiesBinary(s, 1);
+ node.EndBinary(s, false);
+}
+
+// binary property node from vector of int32_t
+// TODO: optional zip compression!
+void FBX::Node::WritePropertyNodeBinary(
+ const std::string& name,
+ const std::vector<int32_t>& v,
+ Assimp::StreamWriterLE& s
+){
+ FBX::Node node(name);
+ node.BeginBinary(s);
+ s.PutU1('i');
+ s.PutU4(uint32_t(v.size())); // number of elements
+ s.PutU4(0); // no encoding (1 would be zip-compressed)
+ s.PutU4(uint32_t(v.size()) * 4); // data size
+ for (auto it = v.begin(); it != v.end(); ++it) { s.PutI4(*it); }
+ node.EndPropertiesBinary(s, 1);
+ node.EndBinary(s, false);
+}
+
+// public static member functions
+
+// convenience function to create and write a property node,
+// holding a single property which is an array of values.
+// does not copy the data, so is efficient for large arrays.
+void FBX::Node::WritePropertyNode(
+ const std::string& name,
+ const std::vector<double>& v,
+ Assimp::StreamWriterLE& s,
+ bool binary, int indent
+){
+ if (binary) {
+ FBX::Node::WritePropertyNodeBinary(name, v, s);
+ } else {
+ FBX::Node::WritePropertyNodeAscii(name, v, s, indent);
+ }
+}
+
+// convenience function to create and write a property node,
+// holding a single property which is an array of values.
+// does not copy the data, so is efficient for large arrays.
+void FBX::Node::WritePropertyNode(
+ const std::string& name,
+ const std::vector<int32_t>& v,
+ Assimp::StreamWriterLE& s,
+ bool binary, int indent
+){
+ if (binary) {
+ FBX::Node::WritePropertyNodeBinary(name, v, s);
+ } else {
+ FBX::Node::WritePropertyNodeAscii(name, v, s, indent);
+ }
+}
+
+#endif // ASSIMP_BUILD_NO_FBX_EXPORTER
+#endif // ASSIMP_BUILD_NO_EXPORT
diff --git a/code/FBXExportNode.h b/code/FBXExportNode.h
new file mode 100644
index 000000000..5ddd8c77b
--- /dev/null
+++ b/code/FBXExportNode.h
@@ -0,0 +1,258 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2018, assimp 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 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 FBXExportNode.h
+* Declares the FBX::Node helper class for fbx export.
+*/
+#ifndef AI_FBXEXPORTNODE_H_INC
+#define AI_FBXEXPORTNODE_H_INC
+
+#ifndef ASSIMP_BUILD_NO_FBX_EXPORTER
+
+#include "FBXExportProperty.h"
+
+#include <assimp/StreamWriter.h> // StreamWriterLE
+
+#include <string>
+#include <vector>
+
+namespace FBX {
+ class Node;
+}
+
+class FBX::Node
+{
+public: // public data members
+ // TODO: accessors
+ std::string name; // node name
+ std::vector<FBX::Property> properties; // node properties
+ std::vector<FBX::Node> children; // child nodes
+
+ // some nodes always pretend they have children...
+ bool force_has_children = false;
+
+public: // constructors
+ Node() = default;
+ Node(const std::string& n) : name(n) {}
+
+ // convenience template to construct with properties directly
+ template <typename... More>
+ Node(const std::string& n, const More... more)
+ : name(n)
+ { AddProperties(more...); }
+
+public: // functions to add properties or children
+ // add a single property to the node
+ template <typename T>
+ void AddProperty(T value) {
+ properties.emplace_back(value);
+ }
+
+ // convenience function to add multiple properties at once
+ template <typename T, typename... More>
+ void AddProperties(T value, More... more) {
+ properties.emplace_back(value);
+ AddProperties(more...);
+ }
+ void AddProperties() {}
+
+ // add a child node directly
+ void AddChild(const Node& node) { children.push_back(node); }
+
+ // convenience function to add a child node with a single property
+ template <typename... More>
+ void AddChild(
+ const std::string& name,
+ More... more
+ ) {
+ FBX::Node c(name);
+ c.AddProperties(more...);
+ children.push_back(c);
+ }
+
+public: // support specifically for dealing with Properties70 nodes
+
+ // it really is simpler to make these all separate functions.
+ // the versions with 'A' suffixes are for animatable properties.
+ // those often follow a completely different format internally in FBX.
+ void AddP70int(const std::string& name, int32_t value);
+ void AddP70bool(const std::string& name, bool value);
+ void AddP70double(const std::string& name, double value);
+ void AddP70numberA(const std::string& name, double value);
+ void AddP70color(const std::string& name, double r, double g, double b);
+ void AddP70colorA(const std::string& name, double r, double g, double b);
+ void AddP70vector(const std::string& name, double x, double y, double z);
+ void AddP70vectorA(const std::string& name, double x, double y, double z);
+ void AddP70string(const std::string& name, const std::string& value);
+ void AddP70enum(const std::string& name, int32_t value);
+ void AddP70time(const std::string& name, int64_t value);
+
+ // template for custom P70 nodes.
+ // anything that doesn't fit in the above can be created manually.
+ template <typename... More>
+ void AddP70(
+ const std::string& name,
+ const std::string& type,
+ const std::string& type2,
+ const std::string& flags,
+ More... more
+ ) {
+ Node n("P");
+ n.AddProperties(name, type, type2, flags, more...);
+ AddChild(n);
+ }
+
+public: // member functions for writing data to a file or stream
+
+ // write the full node to the given file or stream
+ void Dump(
+ std::shared_ptr<Assimp::IOStream> outfile,
+ bool binary, int indent
+ );
+ void Dump(Assimp::StreamWriterLE &s, bool binary, int indent);
+
+ // these other functions are for writing data piece by piece.
+ // they must be used carefully.
+ // for usage examples see FBXExporter.cpp.
+ void Begin(Assimp::StreamWriterLE &s, bool binary, int indent);
+ void DumpProperties(Assimp::StreamWriterLE& s, bool binary, int indent);
+ void EndProperties(Assimp::StreamWriterLE &s, bool binary, int indent);
+ void EndProperties(
+ Assimp::StreamWriterLE &s, bool binary, int indent,
+ size_t num_properties
+ );
+ void BeginChildren(Assimp::StreamWriterLE &s, bool binary, int indent);
+ void DumpChildren(Assimp::StreamWriterLE& s, bool binary, int indent);
+ void End(
+ Assimp::StreamWriterLE &s, bool binary, int indent,
+ bool has_children
+ );
+
+private: // internal functions used for writing
+
+ void DumpBinary(Assimp::StreamWriterLE &s);
+ void DumpAscii(Assimp::StreamWriterLE &s, int indent);
+ void DumpAscii(std::ostream &s, int indent);
+
+ void BeginBinary(Assimp::StreamWriterLE &s);
+ void DumpPropertiesBinary(Assimp::StreamWriterLE& s);
+ void EndPropertiesBinary(Assimp::StreamWriterLE &s);
+ void EndPropertiesBinary(Assimp::StreamWriterLE &s, size_t num_properties);
+ void DumpChildrenBinary(Assimp::StreamWriterLE& s);
+ void EndBinary(Assimp::StreamWriterLE &s, bool has_children);
+
+ void BeginAscii(std::ostream &s, int indent);
+ void DumpPropertiesAscii(std::ostream &s, int indent);
+ void BeginChildrenAscii(std::ostream &s, int indent);
+ void DumpChildrenAscii(std::ostream &s, int indent);
+ void EndAscii(std::ostream &s, int indent, bool has_children);
+
+private: // data used for binary dumps
+ size_t start_pos; // starting position in stream
+ size_t end_pos; // ending position in stream
+ size_t property_start; // starting position of property section
+
+public: // static member functions
+
+ // convenience function to create a node with a single property,
+ // and write it to the stream.
+ template <typename T>
+ static void WritePropertyNode(
+ const std::string& name,
+ const T value,
+ Assimp::StreamWriterLE& s,
+ bool binary, int indent
+ ) {
+ FBX::Property p(value);
+ FBX::Node node(name, p);
+ node.Dump(s, binary, indent);
+ }
+
+ // convenience function to create and write a property node,
+ // holding a single property which is an array of values.
+ // does not copy the data, so is efficient for large arrays.
+ static void WritePropertyNode(
+ const std::string& name,
+ const std::vector<double>& v,
+ Assimp::StreamWriterLE& s,
+ bool binary, int indent
+ );
+
+ // convenience function to create and write a property node,
+ // holding a single property which is an array of values.
+ // does not copy the data, so is efficient for large arrays.
+ static void WritePropertyNode(
+ const std::string& name,
+ const std::vector<int32_t>& v,
+ Assimp::StreamWriterLE& s,
+ bool binary, int indent
+ );
+
+private: // static helper functions
+ static void WritePropertyNodeAscii(
+ const std::string& name,
+ const std::vector<double>& v,
+ Assimp::StreamWriterLE& s,
+ int indent
+ );
+ static void WritePropertyNodeAscii(
+ const std::string& name,
+ const std::vector<int32_t>& v,
+ Assimp::StreamWriterLE& s,
+ int indent
+ );
+ static void WritePropertyNodeBinary(
+ const std::string& name,
+ const std::vector<double>& v,
+ Assimp::StreamWriterLE& s
+ );
+ static void WritePropertyNodeBinary(
+ const std::string& name,
+ const std::vector<int32_t>& v,
+ Assimp::StreamWriterLE& s
+ );
+
+};
+
+
+#endif // ASSIMP_BUILD_NO_FBX_EXPORTER
+
+#endif // AI_FBXEXPORTNODE_H_INC
diff --git a/code/FBXExportProperty.cpp b/code/FBXExportProperty.cpp
new file mode 100644
index 000000000..431750274
--- /dev/null
+++ b/code/FBXExportProperty.cpp
@@ -0,0 +1,364 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2018, assimp 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 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.
+
+----------------------------------------------------------------------
+*/
+#ifndef ASSIMP_BUILD_NO_EXPORT
+#ifndef ASSIMP_BUILD_NO_FBX_EXPORTER
+
+#include "FBXExportProperty.h"
+
+#include <assimp/StreamWriter.h> // StreamWriterLE
+#include <assimp/Exceptional.h> // DeadlyExportError
+
+#include <string>
+#include <vector>
+#include <ostream>
+#include <locale>
+#include <sstream> // ostringstream
+
+
+// constructors for single element properties
+
+FBX::Property::Property(bool v)
+ : type('C'), data(1)
+{
+ data = {uint8_t(v)};
+}
+
+FBX::Property::Property(int16_t v) : type('Y'), data(2)
+{
+ uint8_t* d = data.data();
+ (reinterpret_cast<int16_t*>(d))[0] = v;
+}
+
+FBX::Property::Property(int32_t v) : type('I'), data(4)
+{
+ uint8_t* d = data.data();
+ (reinterpret_cast<int32_t*>(d))[0] = v;
+}
+
+FBX::Property::Property(float v) : type('F'), data(4)
+{
+ uint8_t* d = data.data();
+ (reinterpret_cast<float*>(d))[0] = v;
+}
+
+FBX::Property::Property(double v) : type('D'), data(8)
+{
+ uint8_t* d = data.data();
+ (reinterpret_cast<double*>(d))[0] = v;
+}
+
+FBX::Property::Property(int64_t v) : type('L'), data(8)
+{
+ uint8_t* d = data.data();
+ (reinterpret_cast<int64_t*>(d))[0] = v;
+}
+
+
+// constructors for array-type properties
+
+FBX::Property::Property(const char* c, bool raw)
+ : Property(std::string(c), raw)
+{}
+
+// strings can either be saved as "raw" (R) data, or "string" (S) data
+FBX::Property::Property(const std::string& s, bool raw)
+ : type(raw ? 'R' : 'S'), data(s.size())
+{
+ for (size_t i = 0; i < s.size(); ++i) {
+ data[i] = uint8_t(s[i]);
+ }
+}
+
+FBX::Property::Property(const std::vector<uint8_t>& r)
+ : type('R'), data(r)
+{}
+
+FBX::Property::Property(const std::vector<int32_t>& va)
+ : type('i'), data(4*va.size())
+{
+ int32_t* d = reinterpret_cast<int32_t*>(data.data());
+ for (size_t i = 0; i < va.size(); ++i) { d[i] = va[i]; }
+}
+
+FBX::Property::Property(const std::vector<int64_t>& va)
+ : type('l'), data(8*va.size())
+{
+ int64_t* d = reinterpret_cast<int64_t*>(data.data());
+ for (size_t i = 0; i < va.size(); ++i) { d[i] = va[i]; }
+}
+
+FBX::Property::Property(const std::vector<float>& va)
+ : type('f'), data(4*va.size())
+{
+ float* d = reinterpret_cast<float*>(data.data());
+ for (size_t i = 0; i < va.size(); ++i) { d[i] = va[i]; }
+}
+
+FBX::Property::Property(const std::vector<double>& va)
+ : type('d'), data(8*va.size())
+{
+ double* d = reinterpret_cast<double*>(data.data());
+ for (size_t i = 0; i < va.size(); ++i) { d[i] = va[i]; }
+}
+
+FBX::Property::Property(const aiMatrix4x4& vm)
+ : type('d'), data(8*16)
+{
+ double* d = reinterpret_cast<double*>(data.data());
+ for (unsigned int c = 0; c < 4; ++c) {
+ for (unsigned int r = 0; r < 4; ++r) {
+ d[4*c+r] = vm[r][c];
+ }
+ }
+}
+
+// public member functions
+
+size_t FBX::Property::size()
+{
+ switch (type) {
+ case 'C': case 'Y': case 'I': case 'F': case 'D': case 'L':
+ return data.size() + 1;
+ case 'S': case 'R':
+ return data.size() + 5;
+ case 'i': case 'd':
+ return data.size() + 13;
+ default:
+ throw DeadlyExportError("Requested size on property of unknown type");
+ }
+}
+
+void FBX::Property::DumpBinary(Assimp::StreamWriterLE &s)
+{
+ s.PutU1(type);
+ uint8_t* d = data.data();
+ size_t N;
+ switch (type) {
+ case 'C': s.PutU1(*(reinterpret_cast<uint8_t*>(d))); return;
+ case 'Y': s.PutI2(*(reinterpret_cast<int16_t*>(d))); return;
+ case 'I': s.PutI4(*(reinterpret_cast<int32_t*>(d))); return;
+ case 'F': s.PutF4(*(reinterpret_cast<float*>(d))); return;
+ case 'D': s.PutF8(*(reinterpret_cast<double*>(d))); return;
+ case 'L': s.PutI8(*(reinterpret_cast<int64_t*>(d))); return;
+ case 'S':
+ case 'R':
+ s.PutU4(uint32_t(data.size()));
+ for (size_t i = 0; i < data.size(); ++i) { s.PutU1(data[i]); }
+ return;
+ case 'i':
+ N = data.size() / 4;
+ s.PutU4(uint32_t(N)); // number of elements
+ s.PutU4(0); // no encoding (1 would be zip-compressed)
+ // TODO: compress if large?
+ s.PutU4(uint32_t(data.size())); // data size
+ for (size_t i = 0; i < N; ++i) {
+ s.PutI4((reinterpret_cast<int32_t*>(d))[i]);
+ }
+ return;
+ case 'l':
+ N = data.size() / 8;
+ s.PutU4(uint32_t(N)); // number of elements
+ s.PutU4(0); // no encoding (1 would be zip-compressed)
+ // TODO: compress if large?
+ s.PutU4(uint32_t(data.size())); // data size
+ for (size_t i = 0; i < N; ++i) {
+ s.PutI8((reinterpret_cast<int64_t*>(d))[i]);
+ }
+ return;
+ case 'f':
+ N = data.size() / 4;
+ s.PutU4(uint32_t(N)); // number of elements
+ s.PutU4(0); // no encoding (1 would be zip-compressed)
+ // TODO: compress if large?
+ s.PutU4(uint32_t(data.size())); // data size
+ for (size_t i = 0; i < N; ++i) {
+ s.PutF4((reinterpret_cast<float*>(d))[i]);
+ }
+ return;
+ case 'd':
+ N = data.size() / 8;
+ s.PutU4(uint32_t(N)); // number of elements
+ s.PutU4(0); // no encoding (1 would be zip-compressed)
+ // TODO: compress if large?
+ s.PutU4(uint32_t(data.size())); // data size
+ for (size_t i = 0; i < N; ++i) {
+ s.PutF8((reinterpret_cast<double*>(d))[i]);
+ }
+ return;
+ default:
+ std::ostringstream err;
+ err << "Tried to dump property with invalid type '";
+ err << type << "'!";
+ throw DeadlyExportError(err.str());
+ }
+}
+
+void FBX::Property::DumpAscii(Assimp::StreamWriterLE &outstream, int indent)
+{
+ std::ostringstream ss;
+ ss.imbue(std::locale::classic());
+ ss.precision(15); // this seems to match official FBX SDK exports
+ DumpAscii(ss, indent);
+ outstream.PutString(ss.str());
+}
+
+void FBX::Property::DumpAscii(std::ostream& s, int indent)
+{
+ // no writing type... or anything. just shove it into the stream.
+ uint8_t* d = data.data();
+ size_t N;
+ size_t swap = data.size();
+ size_t count = 0;
+ switch (type) {
+ case 'C':
+ if (*(reinterpret_cast<uint8_t*>(d))) { s << 'T'; }
+ else { s << 'F'; }
+ return;
+ case 'Y': s << *(reinterpret_cast<int16_t*>(d)); return;
+ case 'I': s << *(reinterpret_cast<int32_t*>(d)); return;
+ case 'F': s << *(reinterpret_cast<float*>(d)); return;
+ case 'D': s << *(reinterpret_cast<double*>(d)); return;
+ case 'L': s << *(reinterpret_cast<int64_t*>(d)); return;
+ case 'S':
+ // first search to see if it has "\x00\x01" in it -
+ // which separates fields which are reversed in the ascii version.
+ // yeah.
+ // FBX, yeah.
+ for (size_t i = 0; i < data.size(); ++i) {
+ if (data[i] == '\0') {
+ swap = i;
+ break;
+ }
+ }
+ case 'R':
+ s << '"';
+ // we might as well check this now,
+ // probably it will never happen
+ for (size_t i = 0; i < data.size(); ++i) {
+ char c = data[i];
+ if (c == '"') {
+ throw runtime_error("can't handle quotes in property string");
+ }
+ }
+ // first write the SWAPPED member (if any)
+ for (size_t i = swap + 2; i < data.size(); ++i) {
+ char c = data[i];
+ s << c;
+ }
+ // then a separator
+ if (swap != data.size()) {
+ s << "::";
+ }
+ // then the initial member
+ for (size_t i = 0; i < swap; ++i) {
+ char c = data[i];
+ s << c;
+ }
+ s << '"';
+ return;
+ case 'i':
+ N = data.size() / 4; // number of elements
+ s << '*' << N << " {\n";
+ for (int i = 0; i < indent + 1; ++i) { s << '\t'; }
+ s << "a: ";
+ for (size_t i = 0; i < N; ++i) {
+ if (i > 0) { s << ','; }
+ if (count++ > 120) { s << '\n'; count = 0; }
+ s << (reinterpret_cast<int32_t*>(d))[i];
+ }
+ s << '\n';
+ for (int i = 0; i < indent; ++i) { s << '\t'; }
+ s << "} ";
+ return;
+ case 'l':
+ N = data.size() / 8;
+ s << '*' << N << " {\n";
+ for (int i = 0; i < indent + 1; ++i) { s << '\t'; }
+ s << "a: ";
+ for (size_t i = 0; i < N; ++i) {
+ if (i > 0) { s << ','; }
+ if (count++ > 120) { s << '\n'; count = 0; }
+ s << (reinterpret_cast<int64_t*>(d))[i];
+ }
+ s << '\n';
+ for (int i = 0; i < indent; ++i) { s << '\t'; }
+ s << "} ";
+ return;
+ case 'f':
+ N = data.size() / 4;
+ s << '*' << N << " {\n";
+ for (int i = 0; i < indent + 1; ++i) { s << '\t'; }
+ s << "a: ";
+ for (size_t i = 0; i < N; ++i) {
+ if (i > 0) { s << ','; }
+ if (count++ > 120) { s << '\n'; count = 0; }
+ s << (reinterpret_cast<float*>(d))[i];
+ }
+ s << '\n';
+ for (int i = 0; i < indent; ++i) { s << '\t'; }
+ s << "} ";
+ return;
+ case 'd':
+ N = data.size() / 8;
+ s << '*' << N << " {\n";
+ for (int i = 0; i < indent + 1; ++i) { s << '\t'; }
+ s << "a: ";
+ // set precision to something that can handle doubles
+ s.precision(15);
+ for (size_t i = 0; i < N; ++i) {
+ if (i > 0) { s << ','; }
+ if (count++ > 120) { s << '\n'; count = 0; }
+ s << (reinterpret_cast<double*>(d))[i];
+ }
+ s << '\n';
+ for (int i = 0; i < indent; ++i) { s << '\t'; }
+ s << "} ";
+ return;
+ default:
+ std::ostringstream err;
+ err << "Tried to dump property with invalid type '";
+ err << type << "'!";
+ throw runtime_error(err.str());
+ }
+}
+
+#endif // ASSIMP_BUILD_NO_FBX_EXPORTER
+#endif // ASSIMP_BUILD_NO_EXPORT
diff --git a/code/FBXExportProperty.h b/code/FBXExportProperty.h
new file mode 100644
index 000000000..cb3b0113f
--- /dev/null
+++ b/code/FBXExportProperty.h
@@ -0,0 +1,129 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2018, assimp 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 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 FBXExportProperty.h
+* Declares the FBX::Property helper class for fbx export.
+*/
+#ifndef AI_FBXEXPORTPROPERTY_H_INC
+#define AI_FBXEXPORTPROPERTY_H_INC
+
+#ifndef ASSIMP_BUILD_NO_FBX_EXPORTER
+
+
+#include <assimp/types.h> // aiMatrix4x4
+#include <assimp/StreamWriter.h> // StreamWriterLE
+
+#include <string>
+#include <vector>
+#include <ostream>
+#include <type_traits> // is_void
+
+namespace FBX {
+ class Property;
+}
+
+/** FBX::Property
+ *
+ * Holds a value of any of FBX's recognized types,
+ * each represented by a particular one-character code.
+ * C : 1-byte uint8, usually 0x00 or 0x01 to represent boolean false and true
+ * Y : 2-byte int16
+ * I : 4-byte int32
+ * F : 4-byte float
+ * D : 8-byte double
+ * L : 8-byte int64
+ * i : array of int32
+ * f : array of float
+ * d : array of double
+ * l : array of int64
+ * b : array of 1-byte booleans (0x00 or 0x01)
+ * S : string (array of 1-byte char)
+ * R : raw data (array of bytes)
+ */
+class FBX::Property
+{
+public:
+ // constructors for basic types.
+ // all explicit to avoid accidental typecasting
+ explicit Property(bool v);
+ // TODO: determine if there is actually a byte type,
+ // or if this always means <bool>. 'C' seems to imply <char>,
+ // so possibly the above was intended to represent both.
+ explicit Property(int16_t v);
+ explicit Property(int32_t v);
+ explicit Property(float v);
+ explicit Property(double v);
+ explicit Property(int64_t v);
+ // strings can either be stored as 'R' (raw) or 'S' (string) type
+ explicit Property(const char* c, bool raw=false);
+ explicit Property(const std::string& s, bool raw=false);
+ explicit Property(const std::vector<uint8_t>& r);
+ explicit Property(const std::vector<int32_t>& va);
+ explicit Property(const std::vector<int64_t>& va);
+ explicit Property(const std::vector<double>& va);
+ explicit Property(const std::vector<float>& va);
+ explicit Property(const aiMatrix4x4& vm);
+
+ // this will catch any type not defined above,
+ // so that we don't accidentally convert something we don't want.
+ // for example (const char*) --> (bool)... seriously wtf C++
+ template <class T>
+ explicit Property(T v) : type('X') {
+ static_assert(std::is_void<T>::value, "TRIED TO CREATE FBX PROPERTY WITH UNSUPPORTED TYPE, CHECK YOUR PROPERTY INSTANTIATION");
+ } // note: no line wrap so it appears verbatim on the compiler error
+
+ // the size of this property node in a binary file, in bytes
+ size_t size();
+
+ // write this property node as binary data to the given stream
+ void DumpBinary(Assimp::StreamWriterLE &s);
+ void DumpAscii(Assimp::StreamWriterLE &s, int indent=0);
+ void DumpAscii(std::ostream &s, int indent=0);
+ // note: make sure the ostream is in classic "C" locale
+
+private:
+ char type;
+ std::vector<uint8_t> data;
+};
+
+#endif // ASSIMP_BUILD_NO_FBX_EXPORTER
+
+#endif // AI_FBXEXPORTPROPERTY_H_INC
diff --git a/code/FBXExporter.cpp b/code/FBXExporter.cpp
new file mode 100644
index 000000000..037520641
--- /dev/null
+++ b/code/FBXExporter.cpp
@@ -0,0 +1,2479 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2018, assimp 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 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.
+
+----------------------------------------------------------------------
+*/
+#ifndef ASSIMP_BUILD_NO_EXPORT
+#ifndef ASSIMP_BUILD_NO_FBX_EXPORTER
+
+#include "FBXExporter.h"
+#include "FBXExportNode.h"
+#include "FBXExportProperty.h"
+#include "FBXCommon.h"
+
+#include <assimp/version.h> // aiGetVersion
+#include <assimp/IOSystem.hpp>
+#include <assimp/Exporter.hpp>
+#include <assimp/DefaultLogger.hpp>
+#include <assimp/StreamWriter.h> // StreamWriterLE
+#include <assimp/Exceptional.h> // DeadlyExportError
+#include <assimp/material.h> // aiTextureType
+#include <assimp/scene.h>
+#include <assimp/mesh.h>
+
+// Header files, standard library.
+#include <memory> // shared_ptr
+#include <string>
+#include <sstream> // stringstream
+#include <ctime> // localtime, tm_*
+#include <map>
+#include <set>
+#include <vector>
+#include <array>
+#include <unordered_set>
+
+// RESOURCES:
+// https://code.blender.org/2013/08/fbx-binary-file-format-specification/
+// https://wiki.blender.org/index.php/User:Mont29/Foundation/FBX_File_Structure
+
+const ai_real DEG = ai_real( 57.29577951308232087679815481 ); // degrees per radian
+
+// some constants that we'll use for writing metadata
+namespace FBX {
+ const std::string EXPORT_VERSION_STR = "7.4.0";
+ const uint32_t EXPORT_VERSION_INT = 7400; // 7.4 == 2014/2015
+ // FBX files have some hashed values that depend on the creation time field,
+ // but for now we don't actually know how to generate these.
+ // what we can do is set them to a known-working version.
+ // this is the data that Blender uses in their FBX export process.
+ const std::string GENERIC_CTIME = "1970-01-01 10:00:00:000";
+ const std::string GENERIC_FILEID =
+ "\x28\xb3\x2a\xeb\xb6\x24\xcc\xc2\xbf\xc8\xb0\x2a\xa9\x2b\xfc\xf1";
+ const std::string GENERIC_FOOTID =
+ "\xfa\xbc\xab\x09\xd0\xc8\xd4\x66\xb1\x76\xfb\x83\x1c\xf7\x26\x7e";
+ const std::string FOOT_MAGIC =
+ "\xf8\x5a\x8c\x6a\xde\xf5\xd9\x7e\xec\xe9\x0c\xe3\x75\x8f\x29\x0b";
+ const std::string COMMENT_UNDERLINE =
+ ";------------------------------------------------------------------";
+}
+
+using namespace Assimp;
+using namespace FBX;
+
+namespace Assimp {
+
+ // ---------------------------------------------------------------------
+ // Worker function for exporting a scene to binary FBX.
+ // Prototyped and registered in Exporter.cpp
+ void ExportSceneFBX (
+ const char* pFile,
+ IOSystem* pIOSystem,
+ const aiScene* pScene,
+ const ExportProperties* pProperties
+ ){
+ // initialize the exporter
+ FBXExporter exporter(pScene, pProperties);
+
+ // perform binary export
+ exporter.ExportBinary(pFile, pIOSystem);
+ }
+
+ // ---------------------------------------------------------------------
+ // Worker function for exporting a scene to ASCII FBX.
+ // Prototyped and registered in Exporter.cpp
+ void ExportSceneFBXA (
+ const char* pFile,
+ IOSystem* pIOSystem,
+ const aiScene* pScene,
+ const ExportProperties* pProperties
+ ){
+ // initialize the exporter
+ FBXExporter exporter(pScene, pProperties);
+
+ // perform ascii export
+ exporter.ExportAscii(pFile, pIOSystem);
+ }
+
+} // end of namespace Assimp
+
+FBXExporter::FBXExporter (
+ const aiScene* pScene,
+ const ExportProperties* pProperties
+)
+ : mScene(pScene)
+ , mProperties(pProperties)
+{
+ // will probably need to determine UIDs, connections, etc here.
+ // basically anything that needs to be known
+ // before we start writing sections to the stream.
+}
+
+void FBXExporter::ExportBinary (
+ const char* pFile,
+ IOSystem* pIOSystem
+){
+ // remember that we're exporting in binary mode
+ binary = true;
+
+ // we're not currently using these preferences,
+ // but clang will cry about it if we never touch it.
+ // TODO: some of these might be relevant to export
+ (void)mProperties;
+
+ // open the indicated file for writing (in binary mode)
+ outfile.reset(pIOSystem->Open(pFile,"wb"));
+ if (!outfile) {
+ throw DeadlyExportError(
+ "could not open output .fbx file: " + std::string(pFile)
+ );
+ }
+
+ // first a binary-specific file header
+ WriteBinaryHeader();
+
+ // the rest of the file is in node entries.
+ // we have to serialize each entry before we write to the output,
+ // as the first thing we write is the byte offset of the _next_ entry.
+ // Either that or we can skip back to write the offset when we finish.
+ WriteAllNodes();
+
+ // finally we have a binary footer to the file
+ WriteBinaryFooter();
+
+ // explicitly release file pointer,
+ // so we don't have to rely on class destruction.
+ outfile.reset();
+}
+
+void FBXExporter::ExportAscii (
+ const char* pFile,
+ IOSystem* pIOSystem
+){
+ // remember that we're exporting in ascii mode
+ binary = false;
+
+ // open the indicated file for writing in text mode
+ outfile.reset(pIOSystem->Open(pFile,"wt"));
+ if (!outfile) {
+ throw DeadlyExportError(
+ "could not open output .fbx file: " + std::string(pFile)
+ );
+ }
+
+ // write the ascii header
+ WriteAsciiHeader();
+
+ // write all the sections
+ WriteAllNodes();
+
+ // make sure the file ends with a newline.
+ // note: if the file is opened in text mode,
+ // this should do the right cross-platform thing.
+ outfile->Write("\n", 1, 1);
+
+ // explicitly release file pointer,
+ // so we don't have to rely on class destruction.
+ outfile.reset();
+}
+
+void FBXExporter::WriteAsciiHeader()
+{
+ // basically just a comment at the top of the file
+ std::stringstream head;
+ head << "; FBX " << EXPORT_VERSION_STR << " project file\n";
+ head << "; Created by the Open Asset Import Library (Assimp)\n";
+ head << "; http://assimp.org\n";
+ head << "; -------------------------------------------------\n";
+ const std::string ascii_header = head.str();
+ outfile->Write(ascii_header.c_str(), ascii_header.size(), 1);
+}
+
+void FBXExporter::WriteAsciiSectionHeader(const std::string& title)
+{
+ StreamWriterLE outstream(outfile);
+ std::stringstream s;
+ s << "\n\n; " << title << '\n';
+ s << FBX::COMMENT_UNDERLINE << "\n";
+ outstream.PutString(s.str());
+}
+
+void FBXExporter::WriteBinaryHeader()
+{
+ // first a specific sequence of 23 bytes, always the same
+ const char binary_header[24] = "Kaydara FBX Binary\x20\x20\x00\x1a\x00";
+ outfile->Write(binary_header, 1, 23);
+
+ // then FBX version number, "multiplied" by 1000, as little-endian uint32.
+ // so 7.3 becomes 7300 == 0x841C0000, 7.4 becomes 7400 == 0xE81C0000, etc
+ {
+ StreamWriterLE outstream(outfile);
+ outstream.PutU4(EXPORT_VERSION_INT);
+ } // StreamWriter destructor writes the data to the file
+
+ // after this the node data starts immediately
+ // (probably with the FBXHEaderExtension node)
+}
+
+void FBXExporter::WriteBinaryFooter()
+{
+ outfile->Write(NULL_RECORD.c_str(), NULL_RECORD.size(), 1);
+
+ outfile->Write(GENERIC_FOOTID.c_str(), GENERIC_FOOTID.size(), 1);
+
+ // here some padding is added for alignment to 16 bytes.
+ // if already aligned, the full 16 bytes is added.
+ size_t pos = outfile->Tell();
+ size_t pad = 16 - (pos % 16);
+ for (size_t i = 0; i < pad; ++i) {
+ outfile->Write("\x00", 1, 1);
+ }
+
+ // not sure what this is, but it seems to always be 0 in modern files
+ for (size_t i = 0; i < 4; ++i) {
+ outfile->Write("\x00", 1, 1);
+ }
+
+ // now the file version again
+ {
+ StreamWriterLE outstream(outfile);
+ outstream.PutU4(EXPORT_VERSION_INT);
+ } // StreamWriter destructor writes the data to the file
+
+ // and finally some binary footer added to all files
+ for (size_t i = 0; i < 120; ++i) {
+ outfile->Write("\x00", 1, 1);
+ }
+ outfile->Write(FOOT_MAGIC.c_str(), FOOT_MAGIC.size(), 1);
+}
+
+void FBXExporter::WriteAllNodes ()
+{
+ // header
+ // (and fileid, creation time, creator, if binary)
+ WriteHeaderExtension();
+
+ // global settings
+ WriteGlobalSettings();
+
+ // documents
+ WriteDocuments();
+
+ // references
+ WriteReferences();
+
+ // definitions
+ WriteDefinitions();
+
+ // objects
+ WriteObjects();
+
+ // connections
+ WriteConnections();
+
+ // WriteTakes? (deprecated since at least 2015 (fbx 7.4))
+}
+
+//FBXHeaderExtension top-level node
+void FBXExporter::WriteHeaderExtension ()
+{
+ if (!binary) {
+ // no title, follows directly from the top comment
+ }
+ FBX::Node n("FBXHeaderExtension");
+ StreamWriterLE outstream(outfile);
+ int indent = 0;
+
+ // begin node
+ n.Begin(outstream, binary, indent);
+
+ // write properties
+ // (none)
+
+ // finish properties
+ n.EndProperties(outstream, binary, indent, 0);
+
+ // begin children
+ n.BeginChildren(outstream, binary, indent);
+
+ indent = 1;
+
+ // write child nodes
+ FBX::Node::WritePropertyNode(
+ "FBXHeaderVersion", int32_t(1003), outstream, binary, indent
+ );
+ FBX::Node::WritePropertyNode(
+ "FBXVersion", int32_t(EXPORT_VERSION_INT), outstream, binary, indent
+ );
+ if (binary) {
+ FBX::Node::WritePropertyNode(
+ "EncryptionType", int32_t(0), outstream, binary, indent
+ );
+ }
+
+ FBX::Node CreationTimeStamp("CreationTimeStamp");
+ time_t rawtime;
+ time(&rawtime);
+ struct tm * now = localtime(&rawtime);
+ CreationTimeStamp.AddChild("Version", int32_t(1000));
+ CreationTimeStamp.AddChild("Year", int32_t(now->tm_year + 1900));
+ CreationTimeStamp.AddChild("Month", int32_t(now->tm_mon + 1));
+ CreationTimeStamp.AddChild("Day", int32_t(now->tm_mday));
+ CreationTimeStamp.AddChild("Hour", int32_t(now->tm_hour));
+ CreationTimeStamp.AddChild("Minute", int32_t(now->tm_min));
+ CreationTimeStamp.AddChild("Second", int32_t(now->tm_sec));
+ CreationTimeStamp.AddChild("Millisecond", int32_t(0));
+ CreationTimeStamp.Dump(outstream, binary, indent);
+
+ std::stringstream creator;
+ creator << "Open Asset Import Library (Assimp) " << aiGetVersionMajor()
+ << "." << aiGetVersionMinor() << "." << aiGetVersionRevision();
+ FBX::Node::WritePropertyNode(
+ "Creator", creator.str(), outstream, binary, indent
+ );
+
+ //FBX::Node sceneinfo("SceneInfo");
+ //sceneinfo.AddProperty("GlobalInfo" + FBX::SEPARATOR + "SceneInfo");
+ // not sure if any of this is actually needed,
+ // so just write an empty node for now.
+ //sceneinfo.Dump(outstream, binary, indent);
+
+ indent = 0;
+
+ // finish node
+ n.End(outstream, binary, indent, true);
+
+ // that's it for FBXHeaderExtension...
+ if (!binary) { return; }
+
+ // but binary files also need top-level FileID, CreationTime, Creator:
+ std::vector<uint8_t> raw(GENERIC_FILEID.size());
+ for (size_t i = 0; i < GENERIC_FILEID.size(); ++i) {
+ raw[i] = uint8_t(GENERIC_FILEID[i]);
+ }
+ FBX::Node::WritePropertyNode(
+ "FileId", raw, outstream, binary, indent
+ );
+ FBX::Node::WritePropertyNode(
+ "CreationTime", GENERIC_CTIME, outstream, binary, indent
+ );
+ FBX::Node::WritePropertyNode(
+ "Creator", creator.str(), outstream, binary, indent
+ );
+}
+
+void FBXExporter::WriteGlobalSettings ()
+{
+ if (!binary) {
+ // no title, follows directly from the header extension
+ }
+ FBX::Node gs("GlobalSettings");
+ gs.AddChild("Version", int32_t(1000));
+
+ FBX::Node p("Properties70");
+ p.AddP70int("UpAxis", 1);
+ p.AddP70int("UpAxisSign", 1);
+ p.AddP70int("FrontAxis", 2);
+ p.AddP70int("FrontAxisSign", 1);
+ p.AddP70int("CoordAxis", 0);
+ p.AddP70int("CoordAxisSign", 1);
+ p.AddP70int("OriginalUpAxis", 1);
+ p.AddP70int("OriginalUpAxisSign", 1);
+ p.AddP70double("UnitScaleFactor", 1.0);
+ p.AddP70double("OriginalUnitScaleFactor", 1.0);
+ p.AddP70color("AmbientColor", 0.0, 0.0, 0.0);
+ p.AddP70string("DefaultCamera", "Producer Perspective");
+ p.AddP70enum("TimeMode", 11);
+ p.AddP70enum("TimeProtocol", 2);
+ p.AddP70enum("SnapOnFrameMode", 0);
+ p.AddP70time("TimeSpanStart", 0); // TODO: animation support
+ p.AddP70time("TimeSpanStop", FBX::SECOND); // TODO: animation support
+ p.AddP70double("CustomFrameRate", -1.0);
+ p.AddP70("TimeMarker", "Compound", "", ""); // not sure what this is
+ p.AddP70int("CurrentTimeMarker", -1);
+ gs.AddChild(p);
+
+ gs.Dump(outfile, binary, 0);
+}
+
+void FBXExporter::WriteDocuments ()
+{
+ if (!binary) {
+ WriteAsciiSectionHeader("Documents Description");
+ }
+
+ // not sure what the use of multiple documents would be,
+ // or whether any end-application supports it
+ FBX::Node docs("Documents");
+ docs.AddChild("Count", int32_t(1));
+ FBX::Node doc("Document");
+
+ // generate uid
+ int64_t uid = generate_uid();
+ doc.AddProperties(uid, "", "Scene");
+ FBX::Node p("Properties70");
+ p.AddP70("SourceObject", "object", "", ""); // what is this even for?
+ p.AddP70string("ActiveAnimStackName", ""); // should do this properly?
+ doc.AddChild(p);
+
+ // UID for root node in scene hierarchy.
+ // always set to 0 in the case of a single document.
+ // not sure what happens if more than one document exists,
+ // but that won't matter to us as we're exporting a single scene.
+ doc.AddChild("RootNode", int64_t(0));
+
+ docs.AddChild(doc);
+ docs.Dump(outfile, binary, 0);
+}
+
+void FBXExporter::WriteReferences ()
+{
+ if (!binary) {
+ WriteAsciiSectionHeader("Document References");
+ }
+ // always empty for now.
+ // not really sure what this is for.
+ FBX::Node n("References");
+ n.force_has_children = true;
+ n.Dump(outfile, binary, 0);
+}
+
+
+// ---------------------------------------------------------------
+// some internal helper functions used for writing the definitions
+// (before any actual data is written)
+// ---------------------------------------------------------------
+
+size_t count_nodes(const aiNode* n) {
+ size_t count = 1;
+ for (size_t i = 0; i < n->mNumChildren; ++i) {
+ count += count_nodes(n->mChildren[i]);
+ }
+ return count;
+}
+
+bool has_phong_mat(const aiScene* scene)
+{
+ // just search for any material with a shininess exponent
+ for (size_t i = 0; i < scene->mNumMaterials; ++i) {
+ aiMaterial* mat = scene->mMaterials[i];
+ float shininess = 0;
+ mat->Get(AI_MATKEY_SHININESS, shininess);
+ if (shininess > 0) {
+ return true;
+ }
+ }
+ return false;
+}
+
+size_t count_images(const aiScene* scene) {
+ std::unordered_set<std::string> images;
+ aiString texpath;
+ for (size_t i = 0; i < scene->mNumMaterials; ++i) {
+ aiMaterial* mat = scene->mMaterials[i];
+ for (
+ size_t tt = aiTextureType_DIFFUSE;
+ tt < aiTextureType_UNKNOWN;
+ ++tt
+ ){
+ const aiTextureType textype = static_cast<aiTextureType>(tt);
+ const size_t texcount = mat->GetTextureCount(textype);
+ for (unsigned int j = 0; j < texcount; ++j) {
+ mat->GetTexture(textype, j, &texpath);
+ images.insert(std::string(texpath.C_Str()));
+ }
+ }
+ }
+ return images.size();
+}
+
+size_t count_textures(const aiScene* scene) {
+ size_t count = 0;
+ for (size_t i = 0; i < scene->mNumMaterials; ++i) {
+ aiMaterial* mat = scene->mMaterials[i];
+ for (
+ size_t tt = aiTextureType_DIFFUSE;
+ tt < aiTextureType_UNKNOWN;
+ ++tt
+ ){
+ // TODO: handle layered textures
+ if (mat->GetTextureCount(static_cast<aiTextureType>(tt)) > 0) {
+ count += 1;
+ }
+ }
+ }
+ return count;
+}
+
+size_t count_deformers(const aiScene* scene) {
+ size_t count = 0;
+ for (size_t i = 0; i < scene->mNumMeshes; ++i) {
+ const size_t n = scene->mMeshes[i]->mNumBones;
+ if (n) {
+ // 1 main deformer, 1 subdeformer per bone
+ count += n + 1;
+ }
+ }
+ return count;
+}
+
+void FBXExporter::WriteDefinitions ()
+{
+ // basically this is just bookkeeping:
+ // determining how many of each type of object there are
+ // and specifying the base properties to use when otherwise unspecified.
+
+ // ascii section header
+ if (!binary) {
+ WriteAsciiSectionHeader("Object definitions");
+ }
+
+ // we need to count the objects
+ int32_t count;
+ int32_t total_count = 0;
+
+ // and store them
+ std::vector<FBX::Node> object_nodes;
+ FBX::Node n, pt, p;
+
+ // GlobalSettings
+ // this seems to always be here in Maya exports
+ n = FBX::Node("ObjectType", "GlobalSettings");
+ count = 1;
+ n.AddChild("Count", count);
+ object_nodes.push_back(n);
+ total_count += count;
+
+ // AnimationStack / FbxAnimStack
+ // this seems to always be here in Maya exports,
+ // but no harm seems to come of leaving it out.
+ count = mScene->mNumAnimations;
+ if (count) {
+ n = FBX::Node("ObjectType", "AnimationStack");
+ n.AddChild("Count", count);
+ pt = FBX::Node("PropertyTemplate", "FbxAnimStack");
+ p = FBX::Node("Properties70");
+ p.AddP70string("Description", "");
+ p.AddP70time("LocalStart", 0);
+ p.AddP70time("LocalStop", 0);
+ p.AddP70time("ReferenceStart", 0);
+ p.AddP70time("ReferenceStop", 0);
+ pt.AddChild(p);
+ n.AddChild(pt);
+ object_nodes.push_back(n);
+ total_count += count;
+ }
+
+ // AnimationLayer / FbxAnimLayer
+ // this seems to always be here in Maya exports,
+ // but no harm seems to come of leaving it out.
+ // Assimp doesn't support animation layers,
+ // so there will be one per aiAnimation
+ count = mScene->mNumAnimations;
+ if (count) {
+ n = FBX::Node("ObjectType", "AnimationLayer");
+ n.AddChild("Count", count);
+ pt = FBX::Node("PropertyTemplate", "FBXAnimLayer");
+ p = FBX::Node("Properties70");
+ p.AddP70("Weight", "Number", "", "A", double(100));
+ p.AddP70bool("Mute", 0);
+ p.AddP70bool("Solo", 0);
+ p.AddP70bool("Lock", 0);
+ p.AddP70color("Color", 0.8, 0.8, 0.8);
+ p.AddP70("BlendMode", "enum", "", "", int32_t(0));
+ p.AddP70("RotationAccumulationMode", "enum", "", "", int32_t(0));
+ p.AddP70("ScaleAccumulationMode", "enum", "", "", int32_t(0));
+ p.AddP70("BlendModeBypass", "ULongLong", "", "", int64_t(0));
+ pt.AddChild(p);
+ n.AddChild(pt);
+ object_nodes.push_back(n);
+ total_count += count;
+ }
+
+ // NodeAttribute
+ // this is completely absurd.
+ // there can only be one "NodeAttribute" template,
+ // but FbxSkeleton, FbxCamera, FbxLight all are "NodeAttributes".
+ // so if only one exists we should set the template for that,
+ // otherwise... we just pick one :/.
+ // the others have to set all their properties every instance,
+ // because there's no template.
+ count = 1; // TODO: select properly
+ if (count) {
+ // FbxSkeleton
+ n = FBX::Node("ObjectType", "NodeAttribute");
+ n.AddChild("Count", count);
+ pt = FBX::Node("PropertyTemplate", "FbxSkeleton");
+ p = FBX::Node("Properties70");
+ p.AddP70color("Color", 0.8, 0.8, 0.8);
+ p.AddP70double("Size", 33.333333333333);
+ p.AddP70("LimbLength", "double", "Number", "H", double(1));
+ // note: not sure what the "H" flag is for - hidden?
+ pt.AddChild(p);
+ n.AddChild(pt);
+ object_nodes.push_back(n);
+ total_count += count;
+ }
+
+ // Model / FbxNode
+ // <~~ node hierarchy
+ count = int32_t(count_nodes(mScene->mRootNode)) - 1; // (not counting root node)
+ if (count) {
+ n = FBX::Node("ObjectType", "Model");
+ n.AddChild("Count", count);
+ pt = FBX::Node("PropertyTemplate", "FbxNode");
+ p = FBX::Node("Properties70");
+ p.AddP70enum("QuaternionInterpolate", 0);
+ p.AddP70vector("RotationOffset", 0.0, 0.0, 0.0);
+ p.AddP70vector("RotationPivot", 0.0, 0.0, 0.0);
+ p.AddP70vector("ScalingOffset", 0.0, 0.0, 0.0);
+ p.AddP70vector("ScalingPivot", 0.0, 0.0, 0.0);
+ p.AddP70bool("TranslationActive", 0);
+ p.AddP70vector("TranslationMin", 0.0, 0.0, 0.0);
+ p.AddP70vector("TranslationMax", 0.0, 0.0, 0.0);
+ p.AddP70bool("TranslationMinX", 0);
+ p.AddP70bool("TranslationMinY", 0);
+ p.AddP70bool("TranslationMinZ", 0);
+ p.AddP70bool("TranslationMaxX", 0);
+ p.AddP70bool("TranslationMaxY", 0);
+ p.AddP70bool("TranslationMaxZ", 0);
+ p.AddP70enum("RotationOrder", 0);
+ p.AddP70bool("RotationSpaceForLimitOnly", 0);
+ p.AddP70double("RotationStiffnessX", 0.0);
+ p.AddP70double("RotationStiffnessY", 0.0);
+ p.AddP70double("RotationStiffnessZ", 0.0);
+ p.AddP70double("AxisLen", 10.0);
+ p.AddP70vector("PreRotation", 0.0, 0.0, 0.0);
+ p.AddP70vector("PostRotation", 0.0, 0.0, 0.0);
+ p.AddP70bool("RotationActive", 0);
+ p.AddP70vector("RotationMin", 0.0, 0.0, 0.0);
+ p.AddP70vector("RotationMax", 0.0, 0.0, 0.0);
+ p.AddP70bool("RotationMinX", 0);
+ p.AddP70bool("RotationMinY", 0);
+ p.AddP70bool("RotationMinZ", 0);
+ p.AddP70bool("RotationMaxX", 0);
+ p.AddP70bool("RotationMaxY", 0);
+ p.AddP70bool("RotationMaxZ", 0);
+ p.AddP70enum("InheritType", 0);
+ p.AddP70bool("ScalingActive", 0);
+ p.AddP70vector("ScalingMin", 0.0, 0.0, 0.0);
+ p.AddP70vector("ScalingMax", 1.0, 1.0, 1.0);
+ p.AddP70bool("ScalingMinX", 0);
+ p.AddP70bool("ScalingMinY", 0);
+ p.AddP70bool("ScalingMinZ", 0);
+ p.AddP70bool("ScalingMaxX", 0);
+ p.AddP70bool("ScalingMaxY", 0);
+ p.AddP70bool("ScalingMaxZ", 0);
+ p.AddP70vector("GeometricTranslation", 0.0, 0.0, 0.0);
+ p.AddP70vector("GeometricRotation", 0.0, 0.0, 0.0);
+ p.AddP70vector("GeometricScaling", 1.0, 1.0, 1.0);
+ p.AddP70double("MinDampRangeX", 0.0);
+ p.AddP70double("MinDampRangeY", 0.0);
+ p.AddP70double("MinDampRangeZ", 0.0);
+ p.AddP70double("MaxDampRangeX", 0.0);
+ p.AddP70double("MaxDampRangeY", 0.0);
+ p.AddP70double("MaxDampRangeZ", 0.0);
+ p.AddP70double("MinDampStrengthX", 0.0);
+ p.AddP70double("MinDampStrengthY", 0.0);
+ p.AddP70double("MinDampStrengthZ", 0.0);
+ p.AddP70double("MaxDampStrengthX", 0.0);
+ p.AddP70double("MaxDampStrengthY", 0.0);
+ p.AddP70double("MaxDampStrengthZ", 0.0);
+ p.AddP70double("PreferedAngleX", 0.0);
+ p.AddP70double("PreferedAngleY", 0.0);
+ p.AddP70double("PreferedAngleZ", 0.0);
+ p.AddP70("LookAtProperty", "object", "", "");
+ p.AddP70("UpVectorProperty", "object", "", "");
+ p.AddP70bool("Show", 1);
+ p.AddP70bool("NegativePercentShapeSupport", 1);
+ p.AddP70int("DefaultAttributeIndex", -1);
+ p.AddP70bool("Freeze", 0);
+ p.AddP70bool("LODBox", 0);
+ p.AddP70(
+ "Lcl Translation", "Lcl Translation", "", "A",
+ double(0), double(0), double(0)
+ );
+ p.AddP70(
+ "Lcl Rotation", "Lcl Rotation", "", "A",
+ double(0), double(0), double(0)
+ );
+ p.AddP70(
+ "Lcl Scaling", "Lcl Scaling", "", "A",
+ double(1), double(1), double(1)
+ );
+ p.AddP70("Visibility", "Visibility", "", "A", double(1));
+ p.AddP70(
+ "Visibility Inheritance", "Visibility Inheritance", "", "",
+ int32_t(1)
+ );
+ pt.AddChild(p);
+ n.AddChild(pt);
+ object_nodes.push_back(n);
+ total_count += count;
+ }
+
+ // Geometry / FbxMesh
+ // <~~ aiMesh
+ count = mScene->mNumMeshes;
+ if (count) {
+ n = FBX::Node("ObjectType", "Geometry");
+ n.AddChild("Count", count);
+ pt = FBX::Node("PropertyTemplate", "FbxMesh");
+ p = FBX::Node("Properties70");
+ p.AddP70color("Color", 0, 0, 0);
+ p.AddP70vector("BBoxMin", 0, 0, 0);
+ p.AddP70vector("BBoxMax", 0, 0, 0);
+ p.AddP70bool("Primary Visibility", 1);
+ p.AddP70bool("Casts Shadows", 1);
+ p.AddP70bool("Receive Shadows", 1);
+ pt.AddChild(p);
+ n.AddChild(pt);
+ object_nodes.push_back(n);
+ total_count += count;
+ }
+
+ // Material / FbxSurfacePhong, FbxSurfaceLambert, FbxSurfaceMaterial
+ // <~~ aiMaterial
+ // basically if there's any phong material this is defined as phong,
+ // and otherwise lambert.
+ // More complex materials cause a bare-bones FbxSurfaceMaterial definition
+ // and are treated specially, as they're not really supported by FBX.
+ // TODO: support Maya's Stingray PBS material
+ count = mScene->mNumMaterials;
+ if (count) {
+ bool has_phong = has_phong_mat(mScene);
+ n = FBX::Node("ObjectType", "Material");
+ n.AddChild("Count", count);
+ pt = FBX::Node("PropertyTemplate");
+ if (has_phong) {
+ pt.AddProperty("FbxSurfacePhong");
+ } else {
+ pt.AddProperty("FbxSurfaceLambert");
+ }
+ p = FBX::Node("Properties70");
+ if (has_phong) {
+ p.AddP70string("ShadingModel", "Phong");
+ } else {
+ p.AddP70string("ShadingModel", "Lambert");
+ }
+ p.AddP70bool("MultiLayer", 0);
+ p.AddP70colorA("EmissiveColor", 0.0, 0.0, 0.0);
+ p.AddP70numberA("EmissiveFactor", 1.0);
+ p.AddP70colorA("AmbientColor", 0.2, 0.2, 0.2);
+ p.AddP70numberA("AmbientFactor", 1.0);
+ p.AddP70colorA("DiffuseColor", 0.8, 0.8, 0.8);
+ p.AddP70numberA("DiffuseFactor", 1.0);
+ p.AddP70vector("Bump", 0.0, 0.0, 0.0);
+ p.AddP70vector("NormalMap", 0.0, 0.0, 0.0);
+ p.AddP70double("BumpFactor", 1.0);
+ p.AddP70colorA("TransparentColor", 0.0, 0.0, 0.0);
+ p.AddP70numberA("TransparencyFactor", 0.0);
+ p.AddP70color("DisplacementColor", 0.0, 0.0, 0.0);
+ p.AddP70double("DisplacementFactor", 1.0);
+ p.AddP70color("VectorDisplacementColor", 0.0, 0.0, 0.0);
+ p.AddP70double("VectorDisplacementFactor", 1.0);
+ if (has_phong) {
+ p.AddP70colorA("SpecularColor", 0.2, 0.2, 0.2);
+ p.AddP70numberA("SpecularFactor", 1.0);
+ p.AddP70numberA("ShininessExponent", 20.0);
+ p.AddP70colorA("ReflectionColor", 0.0, 0.0, 0.0);
+ p.AddP70numberA("ReflectionFactor", 1.0);
+ }
+ pt.AddChild(p);
+ n.AddChild(pt);
+ object_nodes.push_back(n);
+ total_count += count;
+ }
+
+ // Video / FbxVideo
+ // one for each image file.
+ count = int32_t(count_images(mScene));
+ if (count) {
+ n = FBX::Node("ObjectType", "Video");
+ n.AddChild("Count", count);
+ pt = FBX::Node("PropertyTemplate", "FbxVideo");
+ p = FBX::Node("Properties70");
+ p.AddP70bool("ImageSequence", 0);
+ p.AddP70int("ImageSequenceOffset", 0);
+ p.AddP70double("FrameRate", 0.0);
+ p.AddP70int("LastFrame", 0);
+ p.AddP70int("Width", 0);
+ p.AddP70int("Height", 0);
+ p.AddP70("Path", "KString", "XRefUrl", "", "");
+ p.AddP70int("StartFrame", 0);
+ p.AddP70int("StopFrame", 0);
+ p.AddP70double("PlaySpeed", 0.0);
+ p.AddP70time("Offset", 0);
+ p.AddP70enum("InterlaceMode", 0);
+ p.AddP70bool("FreeRunning", 0);
+ p.AddP70bool("Loop", 0);
+ p.AddP70enum("AccessMode", 0);
+ pt.AddChild(p);
+ n.AddChild(pt);
+ object_nodes.push_back(n);
+ total_count += count;
+ }
+
+ // Texture / FbxFileTexture
+ // <~~ aiTexture
+ count = int32_t(count_textures(mScene));
+ if (count) {
+ n = FBX::Node("ObjectType", "Texture");
+ n.AddChild("Count", count);
+ pt = FBX::Node("PropertyTemplate", "FbxFileTexture");
+ p = FBX::Node("Properties70");
+ p.AddP70enum("TextureTypeUse", 0);
+ p.AddP70numberA("Texture alpha", 1.0);
+ p.AddP70enum("CurrentMappingType", 0);
+ p.AddP70enum("WrapModeU", 0);
+ p.AddP70enum("WrapModeV", 0);
+ p.AddP70bool("UVSwap", 0);
+ p.AddP70bool("PremultiplyAlpha", 1);
+ p.AddP70vectorA("Translation", 0.0, 0.0, 0.0);
+ p.AddP70vectorA("Rotation", 0.0, 0.0, 0.0);
+ p.AddP70vectorA("Scaling", 1.0, 1.0, 1.0);
+ p.AddP70vector("TextureRotationPivot", 0.0, 0.0, 0.0);
+ p.AddP70vector("TextureScalingPivot", 0.0, 0.0, 0.0);
+ p.AddP70enum("CurrentTextureBlendMode", 1);
+ p.AddP70string("UVSet", "default");
+ p.AddP70bool("UseMaterial", 0);
+ p.AddP70bool("UseMipMap", 0);
+ pt.AddChild(p);
+ n.AddChild(pt);
+ object_nodes.push_back(n);
+ total_count += count;
+ }
+
+ // AnimationCurveNode / FbxAnimCurveNode
+ count = mScene->mNumAnimations * 3;
+ if (count) {
+ n = FBX::Node("ObjectType", "AnimationCurveNode");
+ n.AddChild("Count", count);
+ pt = FBX::Node("PropertyTemplate", "FbxAnimCurveNode");
+ p = FBX::Node("Properties70");
+ p.AddP70("d", "Compound", "", "");
+ pt.AddChild(p);
+ n.AddChild(pt);
+ object_nodes.push_back(n);
+ total_count += count;
+ }
+
+ // AnimationCurve / FbxAnimCurve
+ count = mScene->mNumAnimations * 9;
+ if (count) {
+ n = FBX::Node("ObjectType", "AnimationCurve");
+ n.AddChild("Count", count);
+ object_nodes.push_back(n);
+ total_count += count;
+ }
+
+ // Pose
+ count = 0;
+ for (size_t i = 0; i < mScene->mNumMeshes; ++i) {
+ aiMesh* mesh = mScene->mMeshes[i];
+ if (mesh->HasBones()) { ++count; }
+ }
+ if (count) {
+ n = FBX::Node("ObjectType", "Pose");
+ n.AddChild("Count", count);
+ object_nodes.push_back(n);
+ total_count += count;
+ }
+
+ // Deformer
+ count = int32_t(count_deformers(mScene));
+ if (count) {
+ n = FBX::Node("ObjectType", "Deformer");
+ n.AddChild("Count", count);
+ object_nodes.push_back(n);
+ total_count += count;
+ }
+
+ // (template)
+ count = 0;
+ if (count) {
+ n = FBX::Node("ObjectType", "");
+ n.AddChild("Count", count);
+ pt = FBX::Node("PropertyTemplate", "");
+ p = FBX::Node("Properties70");
+ pt.AddChild(p);
+ n.AddChild(pt);
+ object_nodes.push_back(n);
+ total_count += count;
+ }
+
+ // now write it all
+ FBX::Node defs("Definitions");
+ defs.AddChild("Version", int32_t(100));
+ defs.AddChild("Count", int32_t(total_count));
+ for (auto &n : object_nodes) { defs.AddChild(n); }
+ defs.Dump(outfile, binary, 0);
+}
+
+
+// -------------------------------------------------------------------
+// some internal helper functions used for writing the objects section
+// (which holds the actual data)
+// -------------------------------------------------------------------
+
+aiNode* get_node_for_mesh(unsigned int meshIndex, aiNode* node)
+{
+ for (size_t i = 0; i < node->mNumMeshes; ++i) {
+ if (node->mMeshes[i] == meshIndex) {
+ return node;
+ }
+ }
+ for (size_t i = 0; i < node->mNumChildren; ++i) {
+ aiNode* ret = get_node_for_mesh(meshIndex, node->mChildren[i]);
+ if (ret) { return ret; }
+ }
+ return nullptr;
+}
+
+aiMatrix4x4 get_world_transform(const aiNode* node, const aiScene* scene)
+{
+ std::vector<const aiNode*> node_chain;
+ while (node != scene->mRootNode) {
+ node_chain.push_back(node);
+ node = node->mParent;
+ }
+ aiMatrix4x4 transform;
+ for (auto n = node_chain.rbegin(); n != node_chain.rend(); ++n) {
+ transform *= (*n)->mTransformation;
+ }
+ return transform;
+}
+
+int64_t to_ktime(double ticks, const aiAnimation* anim) {
+ if (anim->mTicksPerSecond <= 0) {
+ return static_cast<int64_t>(ticks) * FBX::SECOND;
+ }
+ return (static_cast<int64_t>(ticks) / static_cast<int64_t>(anim->mTicksPerSecond)) * FBX::SECOND;
+}
+
+int64_t to_ktime(double time) {
+ return (static_cast<int64_t>(time * FBX::SECOND));
+}
+
+void FBXExporter::WriteObjects ()
+{
+ if (!binary) {
+ WriteAsciiSectionHeader("Object properties");
+ }
+ // numbers should match those given in definitions! make sure to check
+ StreamWriterLE outstream(outfile);
+ FBX::Node object_node("Objects");
+ int indent = 0;
+ object_node.Begin(outstream, binary, indent);
+ object_node.EndProperties(outstream, binary, indent);
+ object_node.BeginChildren(outstream, binary, indent);
+
+ // geometry (aiMesh)
+ mesh_uids.clear();
+ indent = 1;
+ for (size_t mi = 0; mi < mScene->mNumMeshes; ++mi) {
+ // it's all about this mesh
+ aiMesh* m = mScene->mMeshes[mi];
+
+ // start the node record
+ FBX::Node n("Geometry");
+ int64_t uid = generate_uid();
+ mesh_uids.push_back(uid);
+ n.AddProperty(uid);
+ n.AddProperty(FBX::SEPARATOR + "Geometry");
+ n.AddProperty("Mesh");
+ n.Begin(outstream, binary, indent);
+ n.DumpProperties(outstream, binary, indent);
+ n.EndProperties(outstream, binary, indent);
+ n.BeginChildren(outstream, binary, indent);
+ indent = 2;
+
+ // output vertex data - each vertex should be unique (probably)
+ std::vector<double> flattened_vertices;
+ // index of original vertex in vertex data vector
+ std::vector<int32_t> vertex_indices;
+ // map of vertex value to its index in the data vector
+ std::map<aiVector3D,size_t> index_by_vertex_value;
+ int32_t index = 0;
+ for (size_t vi = 0; vi < m->mNumVertices; ++vi) {
+ aiVector3D vtx = m->mVertices[vi];
+ auto elem = index_by_vertex_value.find(vtx);
+ if (elem == index_by_vertex_value.end()) {
+ vertex_indices.push_back(index);
+ index_by_vertex_value[vtx] = index;
+ flattened_vertices.push_back(vtx[0]);
+ flattened_vertices.push_back(vtx[1]);
+ flattened_vertices.push_back(vtx[2]);
+ ++index;
+ } else {
+ vertex_indices.push_back(int32_t(elem->second));
+ }
+ }
+ FBX::Node::WritePropertyNode(
+ "Vertices", flattened_vertices, outstream, binary, indent
+ );
+
+ // output polygon data as a flattened array of vertex indices.
+ // the last vertex index of each polygon is negated and - 1
+ std::vector<int32_t> polygon_data;
+ for (size_t fi = 0; fi < m->mNumFaces; ++fi) {
+ const aiFace &f = m->mFaces[fi];
+ for (size_t pvi = 0; pvi < f.mNumIndices - 1; ++pvi) {
+ polygon_data.push_back(vertex_indices[f.mIndices[pvi]]);
+ }
+ polygon_data.push_back(
+ -1 - vertex_indices[f.mIndices[f.mNumIndices-1]]
+ );
+ }
+ FBX::Node::WritePropertyNode(
+ "PolygonVertexIndex", polygon_data, outstream, binary, indent
+ );
+
+ // here could be edges but they're insane.
+ // it's optional anyway, so let's ignore it.
+
+ FBX::Node::WritePropertyNode(
+ "GeometryVersion", int32_t(124), outstream, binary, indent
+ );
+
+ // normals, if any
+ if (m->HasNormals()) {
+ FBX::Node normals("LayerElementNormal", int32_t(0));
+ normals.Begin(outstream, binary, indent);
+ normals.DumpProperties(outstream, binary, indent);
+ normals.EndProperties(outstream, binary, indent);
+ normals.BeginChildren(outstream, binary, indent);
+ indent = 3;
+ FBX::Node::WritePropertyNode(
+ "Version", int32_t(101), outstream, binary, indent
+ );
+ FBX::Node::WritePropertyNode(
+ "Name", "", outstream, binary, indent
+ );
+ FBX::Node::WritePropertyNode(
+ "MappingInformationType", "ByPolygonVertex",
+ outstream, binary, indent
+ );
+ // TODO: vertex-normals or indexed normals when appropriate
+ FBX::Node::WritePropertyNode(
+ "ReferenceInformationType", "Direct",
+ outstream, binary, indent
+ );
+ std::vector<double> normal_data;
+ normal_data.reserve(3 * polygon_data.size());
+ for (size_t fi = 0; fi < m->mNumFaces; ++fi) {
+ const aiFace &f = m->mFaces[fi];
+ for (size_t pvi = 0; pvi < f.mNumIndices; ++pvi) {
+ const aiVector3D &n = m->mNormals[f.mIndices[pvi]];
+ normal_data.push_back(n.x);
+ normal_data.push_back(n.y);
+ normal_data.push_back(n.z);
+ }
+ }
+ FBX::Node::WritePropertyNode(
+ "Normals", normal_data, outstream, binary, indent
+ );
+ // note: version 102 has a NormalsW also... not sure what it is,
+ // so we can stick with version 101 for now.
+ indent = 2;
+ normals.End(outstream, binary, indent, true);
+ }
+
+ // uvs, if any
+ for (size_t uvi = 0; uvi < m->GetNumUVChannels(); ++uvi) {
+ if (m->mNumUVComponents[uvi] > 2) {
+ // FBX only supports 2-channel UV maps...
+ // or at least i'm not sure how to indicate a different number
+ std::stringstream err;
+ err << "Only 2-channel UV maps supported by FBX,";
+ err << " but mesh " << mi;
+ if (m->mName.length) {
+ err << " (" << m->mName.C_Str() << ")";
+ }
+ err << " UV map " << uvi;
+ err << " has " << m->mNumUVComponents[uvi];
+ err << " components! Data will be preserved,";
+ err << " but may be incorrectly interpreted on load.";
+ ASSIMP_LOG_WARN(err.str());
+ }
+ FBX::Node uv("LayerElementUV", int32_t(uvi));
+ uv.Begin(outstream, binary, indent);
+ uv.DumpProperties(outstream, binary, indent);
+ uv.EndProperties(outstream, binary, indent);
+ uv.BeginChildren(outstream, binary, indent);
+ indent = 3;
+ FBX::Node::WritePropertyNode(
+ "Version", int32_t(101), outstream, binary, indent
+ );
+ // it doesn't seem like assimp keeps the uv map name,
+ // so just leave it blank.
+ FBX::Node::WritePropertyNode(
+ "Name", "", outstream, binary, indent
+ );
+ FBX::Node::WritePropertyNode(
+ "MappingInformationType", "ByPolygonVertex",
+ outstream, binary, indent
+ );
+ FBX::Node::WritePropertyNode(
+ "ReferenceInformationType", "IndexToDirect",
+ outstream, binary, indent
+ );
+
+ std::vector<double> uv_data;
+ std::vector<int32_t> uv_indices;
+ std::map<aiVector3D,int32_t> index_by_uv;
+ int32_t index = 0;
+ for (size_t fi = 0; fi < m->mNumFaces; ++fi) {
+ const aiFace &f = m->mFaces[fi];
+ for (size_t pvi = 0; pvi < f.mNumIndices; ++pvi) {
+ const aiVector3D &uv =
+ m->mTextureCoords[uvi][f.mIndices[pvi]];
+ auto elem = index_by_uv.find(uv);
+ if (elem == index_by_uv.end()) {
+ index_by_uv[uv] = index;
+ uv_indices.push_back(index);
+ for (unsigned int x = 0; x < m->mNumUVComponents[uvi]; ++x) {
+ uv_data.push_back(uv[x]);
+ }
+ ++index;
+ } else {
+ uv_indices.push_back(elem->second);
+ }
+ }
+ }
+ FBX::Node::WritePropertyNode(
+ "UV", uv_data, outstream, binary, indent
+ );
+ FBX::Node::WritePropertyNode(
+ "UVIndex", uv_indices, outstream, binary, indent
+ );
+ indent = 2;
+ uv.End(outstream, binary, indent, true);
+ }
+
+ // i'm not really sure why this material section exists,
+ // as the material is linked via "Connections".
+ // it seems to always have the same "0" value.
+ FBX::Node mat("LayerElementMaterial", int32_t(0));
+ mat.AddChild("Version", int32_t(101));
+ mat.AddChild("Name", "");
+ mat.AddChild("MappingInformationType", "AllSame");
+ mat.AddChild("ReferenceInformationType", "IndexToDirect");
+ std::vector<int32_t> mat_indices = {0};
+ mat.AddChild("Materials", mat_indices);
+ mat.Dump(outstream, binary, indent);
+
+ // finally we have the layer specifications,
+ // which select the normals / UV set / etc to use.
+ // TODO: handle multiple uv sets correctly?
+ FBX::Node layer("Layer", int32_t(0));
+ layer.AddChild("Version", int32_t(100));
+ FBX::Node le("LayerElement");
+ le.AddChild("Type", "LayerElementNormal");
+ le.AddChild("TypedIndex", int32_t(0));
+ layer.AddChild(le);
+ le = FBX::Node("LayerElement");
+ le.AddChild("Type", "LayerElementMaterial");
+ le.AddChild("TypedIndex", int32_t(0));
+ layer.AddChild(le);
+ le = FBX::Node("LayerElement");
+ le.AddChild("Type", "LayerElementUV");
+ le.AddChild("TypedIndex", int32_t(0));
+ layer.AddChild(le);
+ layer.Dump(outstream, binary, indent);
+
+ // finish the node record
+ indent = 1;
+ n.End(outstream, binary, indent, true);
+ }
+
+ // aiMaterial
+ material_uids.clear();
+ for (size_t i = 0; i < mScene->mNumMaterials; ++i) {
+ // it's all about this material
+ aiMaterial* m = mScene->mMaterials[i];
+
+ // these are used to receive material data
+ float f; aiColor3D c;
+
+ // start the node record
+ FBX::Node n("Material");
+
+ int64_t uid = generate_uid();
+ material_uids.push_back(uid);
+ n.AddProperty(uid);
+
+ aiString name;
+ m->Get(AI_MATKEY_NAME, name);
+ n.AddProperty(name.C_Str() + FBX::SEPARATOR + "Material");
+
+ n.AddProperty("");
+
+ n.AddChild("Version", int32_t(102));
+ f = 0;
+ m->Get(AI_MATKEY_SHININESS, f);
+ bool phong = (f > 0);
+ if (phong) {
+ n.AddChild("ShadingModel", "phong");
+ } else {
+ n.AddChild("ShadingModel", "lambert");
+ }
+ n.AddChild("MultiLayer", int32_t(0));
+
+ FBX::Node p("Properties70");
+
+ // materials exported using the FBX SDK have two sets of fields.
+ // there are the properties specified in the PropertyTemplate,
+ // which are those supported by the modernFBX SDK,
+ // and an extra set of properties with simpler names.
+ // The extra properties are a legacy material system from pre-2009.
+ //
+ // In the modern system, each property has "color" and "factor".
+ // Generally the interpretation of these seems to be
+ // that the colour is multiplied by the factor before use,
+ // but this is not always clear-cut.
+ //
+ // Usually assimp only stores the colour,
+ // so we can just leave the factors at the default "1.0".
+
+ // first we can export the "standard" properties
+ if (m->Get(AI_MATKEY_COLOR_AMBIENT, c) == aiReturn_SUCCESS) {
+ p.AddP70colorA("AmbientColor", c.r, c.g, c.b);
+ //p.AddP70numberA("AmbientFactor", 1.0);
+ }
+ if (m->Get(AI_MATKEY_COLOR_DIFFUSE, c) == aiReturn_SUCCESS) {
+ p.AddP70colorA("DiffuseColor", c.r, c.g, c.b);
+ //p.AddP70numberA("DiffuseFactor", 1.0);
+ }
+ if (m->Get(AI_MATKEY_COLOR_TRANSPARENT, c) == aiReturn_SUCCESS) {
+ // "TransparentColor" / "TransparencyFactor"...
+ // thanks FBX, for your insightful interpretation of consistency
+ p.AddP70colorA("TransparentColor", c.r, c.g, c.b);
+ // TransparencyFactor defaults to 0.0, so set it to 1.0.
+ // note: Maya always sets this to 1.0,
+ // so we can't use it sensibly as "Opacity".
+ // In stead we rely on the legacy "Opacity" value, below.
+ // Blender also relies on "Opacity" not "TransparencyFactor",
+ // probably for a similar reason.
+ p.AddP70numberA("TransparencyFactor", 1.0);
+ }
+ if (m->Get(AI_MATKEY_COLOR_REFLECTIVE, c) == aiReturn_SUCCESS) {
+ p.AddP70colorA("ReflectionColor", c.r, c.g, c.b);
+ }
+ if (m->Get(AI_MATKEY_REFLECTIVITY, f) == aiReturn_SUCCESS) {
+ p.AddP70numberA("ReflectionFactor", f);
+ }
+ if (phong) {
+ if (m->Get(AI_MATKEY_COLOR_SPECULAR, c) == aiReturn_SUCCESS) {
+ p.AddP70colorA("SpecularColor", c.r, c.g, c.b);
+ }
+ if (m->Get(AI_MATKEY_SHININESS_STRENGTH, f) == aiReturn_SUCCESS) {
+ p.AddP70numberA("ShininessFactor", f);
+ }
+ if (m->Get(AI_MATKEY_SHININESS, f) == aiReturn_SUCCESS) {
+ p.AddP70numberA("ShininessExponent", f);
+ }
+ if (m->Get(AI_MATKEY_REFLECTIVITY, f) == aiReturn_SUCCESS) {
+ p.AddP70numberA("ReflectionFactor", f);
+ }
+ }
+
+ // Now the legacy system.
+ // For safety let's include it.
+ // thrse values don't exist in the property template,
+ // and usually are completely ignored when loading.
+ // One notable exception is the "Opacity" property,
+ // which Blender uses as (1.0 - alpha).
+ c.r = 0.0f; c.g = 0.0f; c.b = 0.0f;
+ m->Get(AI_MATKEY_COLOR_EMISSIVE, c);
+ p.AddP70vector("Emissive", c.r, c.g, c.b);
+ c.r = 0.2f; c.g = 0.2f; c.b = 0.2f;
+ m->Get(AI_MATKEY_COLOR_AMBIENT, c);
+ p.AddP70vector("Ambient", c.r, c.g, c.b);
+ c.r = 0.8f; c.g = 0.8f; c.b = 0.8f;
+ m->Get(AI_MATKEY_COLOR_DIFFUSE, c);
+ p.AddP70vector("Diffuse", c.r, c.g, c.b);
+ // The FBX SDK determines "Opacity" from transparency colour (RGB)
+ // and factor (F) as: O = (1.0 - F * ((R + G + B) / 3)).
+ // However we actually have an opacity value,
+ // so we should take it from AI_MATKEY_OPACITY if possible.
+ // It might make more sense to use TransparencyFactor,
+ // but Blender actually loads "Opacity" correctly, so let's use it.
+ f = 1.0f;
+ if (m->Get(AI_MATKEY_COLOR_TRANSPARENT, c) == aiReturn_SUCCESS) {
+ f = 1.0f - ((c.r + c.g + c.b) / 3.0f);
+ }
+ m->Get(AI_MATKEY_OPACITY, f);
+ p.AddP70double("Opacity", f);
+ if (phong) {
+ // specular color is multiplied by shininess_strength
+ c.r = 0.2f; c.g = 0.2f; c.b = 0.2f;
+ m->Get(AI_MATKEY_COLOR_SPECULAR, c);
+ f = 1.0f;
+ m->Get(AI_MATKEY_SHININESS_STRENGTH, f);
+ p.AddP70vector("Specular", f*c.r, f*c.g, f*c.b);
+ f = 20.0f;
+ m->Get(AI_MATKEY_SHININESS, f);
+ p.AddP70double("Shininess", f);
+ // Legacy "Reflectivity" is F*F*((R+G+B)/3),
+ // where F is the proportion of light reflected (AKA reflectivity),
+ // and RGB is the reflective colour of the material.
+ // No idea why, but we might as well set it the same way.
+ f = 0.0f;
+ m->Get(AI_MATKEY_REFLECTIVITY, f);
+ c.r = 1.0f, c.g = 1.0f, c.b = 1.0f;
+ m->Get(AI_MATKEY_COLOR_REFLECTIVE, c);
+ p.AddP70double("Reflectivity", f*f*((c.r+c.g+c.b)/3.0));
+ }
+
+ n.AddChild(p);
+
+ n.Dump(outstream, binary, indent);
+ }
+
+ // we need to look up all the images we're using,
+ // so we can generate uids, and eliminate duplicates.
+ std::map<std::string, int64_t> uid_by_image;
+ for (size_t i = 0; i < mScene->mNumMaterials; ++i) {
+ aiString texpath;
+ aiMaterial* mat = mScene->mMaterials[i];
+ for (
+ size_t tt = aiTextureType_DIFFUSE;
+ tt < aiTextureType_UNKNOWN;
+ ++tt
+ ){
+ const aiTextureType textype = static_cast<aiTextureType>(tt);
+ const size_t texcount = mat->GetTextureCount(textype);
+ for (size_t j = 0; j < texcount; ++j) {
+ mat->GetTexture(textype, (unsigned int)j, &texpath);
+ const std::string texstring = texpath.C_Str();
+ auto elem = uid_by_image.find(texstring);
+ if (elem == uid_by_image.end()) {
+ uid_by_image[texstring] = generate_uid();
+ }
+ }
+ }
+ }
+
+ // FbxVideo - stores images used by textures.
+ for (const auto &it : uid_by_image) {
+ if (it.first.compare(0, 1, "*") == 0) {
+ // TODO: embedded textures
+ continue;
+ }
+ FBX::Node n("Video");
+ const int64_t& uid = it.second;
+ const std::string name = ""; // TODO: ... name???
+ n.AddProperties(uid, name + FBX::SEPARATOR + "Video", "Clip");
+ n.AddChild("Type", "Clip");
+ FBX::Node p("Properties70");
+ // TODO: get full path... relative path... etc... ugh...
+ // for now just use the same path for everything,
+ // and hopefully one of them will work out.
+ const std::string& path = it.first;
+ p.AddP70("Path", "KString", "XRefUrl", "", path);
+ n.AddChild(p);
+ n.AddChild("UseMipMap", int32_t(0));
+ n.AddChild("Filename", path);
+ n.AddChild("RelativeFilename", path);
+ n.Dump(outstream, binary, indent);
+ }
+
+ // Textures
+ // referenced by material_index/texture_type pairs.
+ std::map<std::pair<size_t,size_t>,int64_t> texture_uids;
+ const std::map<aiTextureType,std::string> prop_name_by_tt = {
+ {aiTextureType_DIFFUSE, "DiffuseColor"},
+ {aiTextureType_SPECULAR, "SpecularColor"},
+ {aiTextureType_AMBIENT, "AmbientColor"},
+ {aiTextureType_EMISSIVE, "EmissiveColor"},
+ {aiTextureType_HEIGHT, "Bump"},
+ {aiTextureType_NORMALS, "NormalMap"},
+ {aiTextureType_SHININESS, "ShininessExponent"},
+ {aiTextureType_OPACITY, "TransparentColor"},
+ {aiTextureType_DISPLACEMENT, "DisplacementColor"},
+ //{aiTextureType_LIGHTMAP, "???"},
+ {aiTextureType_REFLECTION, "ReflectionColor"}
+ //{aiTextureType_UNKNOWN, ""}
+ };
+ for (size_t i = 0; i < mScene->mNumMaterials; ++i) {
+ // textures are attached to materials
+ aiMaterial* mat = mScene->mMaterials[i];
+ int64_t material_uid = material_uids[i];
+
+ for (
+ size_t j = aiTextureType_DIFFUSE;
+ j < aiTextureType_UNKNOWN;
+ ++j
+ ) {
+ const aiTextureType tt = static_cast<aiTextureType>(j);
+ size_t n = mat->GetTextureCount(tt);
+
+ if (n < 1) { // no texture of this type
+ continue;
+ }
+
+ if (n > 1) {
+ // TODO: multilayer textures
+ std::stringstream err;
+ err << "Multilayer textures not supported (for now),";
+ err << " skipping texture type " << j;
+ err << " of material " << i;
+ ASSIMP_LOG_WARN(err.str());
+ }
+
+ // get image path for this (single-image) texture
+ aiString tpath;
+ if (mat->GetTexture(tt, 0, &tpath) != aiReturn_SUCCESS) {
+ std::stringstream err;
+ err << "Failed to get texture 0 for texture of type " << tt;
+ err << " on material " << i;
+ err << ", however GetTextureCount returned 1.";
+ throw DeadlyExportError(err.str());
+ }
+ const std::string texture_path(tpath.C_Str());
+
+ // get connected image uid
+ auto elem = uid_by_image.find(texture_path);
+ if (elem == uid_by_image.end()) {
+ // this should never happen
+ std::stringstream err;
+ err << "Failed to find video element for texture with path";
+ err << " \"" << texture_path << "\"";
+ err << ", type " << j << ", material " << i;
+ throw DeadlyExportError(err.str());
+ }
+ const int64_t image_uid = elem->second;
+
+ // get the name of the material property to connect to
+ auto elem2 = prop_name_by_tt.find(tt);
+ if (elem2 == prop_name_by_tt.end()) {
+ // don't know how to handle this type of texture,
+ // so skip it.
+ std::stringstream err;
+ err << "Not sure how to handle texture of type " << j;
+ err << " on material " << i;
+ err << ", skipping...";
+ ASSIMP_LOG_WARN(err.str());
+ continue;
+ }
+ const std::string& prop_name = elem2->second;
+
+ // generate a uid for this texture
+ const int64_t texture_uid = generate_uid();
+
+ // link the texture to the material
+ connections.emplace_back(
+ "C", "OP", texture_uid, material_uid, prop_name
+ );
+
+ // link the image data to the texture
+ connections.emplace_back("C", "OO", image_uid, texture_uid);
+
+ // now write the actual texture node
+ FBX::Node tnode("Texture");
+ // TODO: some way to determine texture name?
+ const std::string texture_name = "" + FBX::SEPARATOR + "Texture";
+ tnode.AddProperties(texture_uid, texture_name, "");
+ // there really doesn't seem to be a better type than this:
+ tnode.AddChild("Type", "TextureVideoClip");
+ tnode.AddChild("Version", int32_t(202));
+ tnode.AddChild("TextureName", texture_name);
+ FBX::Node p("Properties70");
+ p.AddP70enum("CurrentTextureBlendMode", 0); // TODO: verify
+ //p.AddP70string("UVSet", ""); // TODO: how should this work?
+ p.AddP70bool("UseMaterial", 1);
+ tnode.AddChild(p);
+ // can't easily detrmine which texture path will be correct,
+ // so just store what we have in every field.
+ // these being incorrect is a common problem with FBX anyway.
+ tnode.AddChild("FileName", texture_path);
+ tnode.AddChild("RelativeFilename", texture_path);
+ tnode.AddChild("ModelUVTranslation", double(0.0), double(0.0));
+ tnode.AddChild("ModelUVScaling", double(1.0), double(1.0));
+ tnode.AddChild("Texture_Alpha_Source", "None");
+ tnode.AddChild(
+ "Cropping", int32_t(0), int32_t(0), int32_t(0), int32_t(0)
+ );
+ tnode.Dump(outstream, binary, indent);
+ }
+ }
+
+ // bones.
+ //
+ // output structure:
+ // subset of node hierarchy that are "skeleton",
+ // i.e. do not have meshes but only bones.
+ // but.. i'm not sure how anyone could guarantee that...
+ //
+ // input...
+ // well, for each mesh it has "bones",
+ // and the bone names correspond to nodes.
+ // of course we also need the parent nodes,
+ // as they give some of the transform........
+ //
+ // well. we can assume a sane input, i suppose.
+ //
+ // so input is the bone node hierarchy,
+ // with an extra thing for the transformation of the MESH in BONE space.
+ //
+ // output is a set of bone nodes,
+ // a "bindpose" which indicates the default local transform of all bones,
+ // and a set of "deformers".
+ // each deformer is parented to a mesh geometry,
+ // and has one or more "subdeformer"s as children.
+ // each subdeformer has one bone node as a child,
+ // and represents the influence of that bone on the grandparent mesh.
+ // the subdeformer has a list of indices, and weights,
+ // with indices specifying vertex indices,
+ // and weights specifying the corresponding influence of this bone.
+ // it also has Transform and TransformLink elements,
+ // specifying the transform of the MESH in BONE space,
+ // and the transformation of the BONE in WORLD space,
+ // likely in the bindpose.
+ //
+ // the input bone structure is different but similar,
+ // storing the number of weights for this bone,
+ // and an array of (vertex index, weight) pairs.
+ //
+ // one sticky point is that the number of vertices may not match,
+ // because assimp splits vertices by normal, uv, etc.
+
+ // first we should mark the skeleton for each mesh.
+ // the skeleton must include not only the aiBones,
+ // but also all their parent nodes.
+ // anything that affects the position of any bone node must be included.
+ std::vector<std::set<const aiNode*>> skeleton_by_mesh(mScene->mNumMeshes);
+ // at the same time we can build a list of all the skeleton nodes,
+ // which will be used later to mark them as type "limbNode".
+ std::unordered_set<const aiNode*> limbnodes;
+ // and a map of nodes by bone name, as finding them is annoying.
+ std::map<std::string,aiNode*> node_by_bone;
+ for (size_t mi = 0; mi < mScene->mNumMeshes; ++mi) {
+ const aiMesh* m = mScene->mMeshes[mi];
+ std::set<const aiNode*> skeleton;
+ for (size_t bi =0; bi < m->mNumBones; ++bi) {
+ const aiBone* b = m->mBones[bi];
+ const std::string name(b->mName.C_Str());
+ auto elem = node_by_bone.find(name);
+ aiNode* n;
+ if (elem != node_by_bone.end()) {
+ n = elem->second;
+ } else {
+ n = mScene->mRootNode->FindNode(b->mName);
+ if (!n) {
+ // this should never happen
+ std::stringstream err;
+ err << "Failed to find node for bone: \"" << name << "\"";
+ throw DeadlyExportError(err.str());
+ }
+ node_by_bone[name] = n;
+ limbnodes.insert(n);
+ }
+ skeleton.insert(n);
+ // mark all parent nodes as skeleton as well,
+ // up until we find the root node,
+ // or else the node containing the mesh,
+ // or else the parent of a node containig the mesh.
+ for (
+ const aiNode* parent = n->mParent;
+ parent && parent != mScene->mRootNode;
+ parent = parent->mParent
+ ) {
+ // if we've already done this node we can skip it all
+ if (skeleton.count(parent)) {
+ break;
+ }
+ // ignore fbx transform nodes as these will be collapsed later
+ // TODO: cache this by aiNode*
+ const std::string node_name(parent->mName.C_Str());
+ if (node_name.find(MAGIC_NODE_TAG) != std::string::npos) {
+ continue;
+ }
+ // otherwise check if this is the root of the skeleton
+ bool end = false;
+ // is the mesh part of this node?
+ for (size_t i = 0; i < parent->mNumMeshes; ++i) {
+ if (parent->mMeshes[i] == mi) {
+ end = true;
+ break;
+ }
+ }
+ // is the mesh in one of the children of this node?
+ for (size_t j = 0; j < parent->mNumChildren; ++j) {
+ aiNode* child = parent->mChildren[j];
+ for (size_t i = 0; i < child->mNumMeshes; ++i) {
+ if (child->mMeshes[i] == mi) {
+ end = true;
+ break;
+ }
+ }
+ if (end) { break; }
+ }
+ limbnodes.insert(parent);
+ skeleton.insert(parent);
+ // if it was the skeleton root we can finish here
+ if (end) { break; }
+ }
+ }
+ skeleton_by_mesh[mi] = skeleton;
+ }
+
+ // we'll need the uids for the bone nodes, so generate them now
+ for (size_t i = 0; i < mScene->mNumMeshes; ++i) {
+ auto &s = skeleton_by_mesh[i];
+ for (const aiNode* n : s) {
+ auto elem = node_uids.find(n);
+ if (elem == node_uids.end()) {
+ node_uids[n] = generate_uid();
+ }
+ }
+ }
+
+ // now, for each aiMesh, we need to export a deformer,
+ // and for each aiBone a subdeformer,
+ // which should have all the skinning info.
+ // these will need to be connected properly to the mesh,
+ // and we can do that all now.
+ for (size_t mi = 0; mi < mScene->mNumMeshes; ++mi) {
+ const aiMesh* m = mScene->mMeshes[mi];
+ if (!m->HasBones()) {
+ continue;
+ }
+ // make a deformer for this mesh
+ int64_t deformer_uid = generate_uid();
+ FBX::Node dnode("Deformer");
+ dnode.AddProperties(deformer_uid, FBX::SEPARATOR + "Deformer", "Skin");
+ dnode.AddChild("Version", int32_t(101));
+ // "acuracy"... this is not a typo....
+ dnode.AddChild("Link_DeformAcuracy", double(50));
+ dnode.AddChild("SkinningType", "Linear"); // TODO: other modes?
+ dnode.Dump(outstream, binary, indent);
+
+ // connect it
+ connections.emplace_back("C", "OO", deformer_uid, mesh_uids[mi]);
+
+ // we will be indexing by vertex...
+ // but there might be a different number of "vertices"
+ // between assimp and our output FBX.
+ // this code is cut-and-pasted from the geometry section above...
+ // ideally this should not be so.
+ // ---
+ // index of original vertex in vertex data vector
+ std::vector<int32_t> vertex_indices;
+ // map of vertex value to its index in the data vector
+ std::map<aiVector3D,size_t> index_by_vertex_value;
+ int32_t index = 0;
+ for (size_t vi = 0; vi < m->mNumVertices; ++vi) {
+ aiVector3D vtx = m->mVertices[vi];
+ auto elem = index_by_vertex_value.find(vtx);
+ if (elem == index_by_vertex_value.end()) {
+ vertex_indices.push_back(index);
+ index_by_vertex_value[vtx] = index;
+ ++index;
+ } else {
+ vertex_indices.push_back(int32_t(elem->second));
+ }
+ }
+
+ // TODO, FIXME: this won't work if anything is not in the bind pose.
+ // for now if such a situation is detected, we throw an exception.
+ std::set<const aiBone*> not_in_bind_pose;
+ std::set<const aiNode*> no_offset_matrix;
+
+ // first get this mesh's position in world space,
+ // as we'll need it for each subdeformer.
+ //
+ // ...of course taking the position of the MESH doesn't make sense,
+ // as it can be instanced to many nodes.
+ // All we can do is assume no instancing,
+ // and take the first node we find that contains the mesh.
+ aiNode* mesh_node = get_node_for_mesh((unsigned int)mi, mScene->mRootNode);
+ aiMatrix4x4 mesh_xform = get_world_transform(mesh_node, mScene);
+
+ // now make a subdeformer for each bone in the skeleton
+ const std::set<const aiNode*> &skeleton = skeleton_by_mesh[mi];
+ for (const aiNode* bone_node : skeleton) {
+ // if there's a bone for this node, find it
+ const aiBone* b = nullptr;
+ for (size_t bi = 0; bi < m->mNumBones; ++bi) {
+ // TODO: this probably should index by something else
+ const std::string name(m->mBones[bi]->mName.C_Str());
+ if (node_by_bone[name] == bone_node) {
+ b = m->mBones[bi];
+ break;
+ }
+ }
+ if (!b) {
+ no_offset_matrix.insert(bone_node);
+ }
+
+ // start the subdeformer node
+ const int64_t subdeformer_uid = generate_uid();
+ FBX::Node sdnode("Deformer");
+ sdnode.AddProperties(
+ subdeformer_uid, FBX::SEPARATOR + "SubDeformer", "Cluster"
+ );
+ sdnode.AddChild("Version", int32_t(100));
+ sdnode.AddChild("UserData", "", "");
+
+ // add indices and weights, if any
+ if (b) {
+ std::vector<int32_t> subdef_indices;
+ std::vector<double> subdef_weights;
+ int32_t last_index = -1;
+ for (size_t wi = 0; wi < b->mNumWeights; ++wi) {
+ int32_t vi = vertex_indices[b->mWeights[wi].mVertexId];
+ if (vi == last_index) {
+ // only for vertices we exported to fbx
+ // TODO, FIXME: this assumes identically-located vertices
+ // will always deform in the same way.
+ // as assimp doesn't store a separate list of "positions",
+ // there's not much that can be done about this
+ // other than assuming that identical position means
+ // identical vertex.
+ continue;
+ }
+ subdef_indices.push_back(vi);
+ subdef_weights.push_back(b->mWeights[wi].mWeight);
+ last_index = vi;
+ }
+ // yes, "indexes"
+ sdnode.AddChild("Indexes", subdef_indices);
+ sdnode.AddChild("Weights", subdef_weights);
+ }
+
+ // transform is the transform of the mesh, but in bone space.
+ // if the skeleton is in the bind pose,
+ // we can take the inverse of the world-space bone transform
+ // and multiply by the world-space transform of the mesh.
+ aiMatrix4x4 bone_xform = get_world_transform(bone_node, mScene);
+ aiMatrix4x4 inverse_bone_xform = bone_xform;
+ inverse_bone_xform.Inverse();
+ aiMatrix4x4 tr = inverse_bone_xform * mesh_xform;
+
+ // this should be the same as the bone's mOffsetMatrix.
+ // if it's not the same, the skeleton isn't in the bind pose.
+ const float epsilon = 1e-4f; // some error is to be expected
+ bool bone_xform_okay = true;
+ if (b && ! tr.Equal(b->mOffsetMatrix, epsilon)) {
+ not_in_bind_pose.insert(b);
+ bone_xform_okay = false;
+ }
+
+ // if we have a bone we should use the mOffsetMatrix,
+ // otherwise try to just use the calculated transform.
+ if (b) {
+ sdnode.AddChild("Transform", b->mOffsetMatrix);
+ } else {
+ sdnode.AddChild("Transform", tr);
+ }
+ // note: it doesn't matter if we mix these,
+ // because if they disagree we'll throw an exception later.
+ // it could be that the skeleton is not in the bone pose
+ // but all bones are still defined,
+ // in which case this would use the mOffsetMatrix for everything
+ // and a correct skeleton would still be output.
+
+ // transformlink should be the position of the bone in world space.
+ // if the bone is in the bind pose (or nonexistent),
+ // we can just use the matrix we already calculated
+ if (bone_xform_okay) {
+ sdnode.AddChild("TransformLink", bone_xform);
+ // otherwise we can only work it out using the mesh position.
+ } else {
+ aiMatrix4x4 trl = b->mOffsetMatrix;
+ trl.Inverse();
+ trl *= mesh_xform;
+ sdnode.AddChild("TransformLink", trl);
+ }
+ // note: this means we ALWAYS rely on the mesh node transform
+ // being unchanged from the time the skeleton was bound.
+ // there's not really any way around this at the moment.
+
+ // done
+ sdnode.Dump(outstream, binary, indent);
+
+ // lastly, connect to the parent deformer
+ connections.emplace_back(
+ "C", "OO", subdeformer_uid, deformer_uid
+ );
+
+ // we also need to connect the limb node to the subdeformer.
+ connections.emplace_back(
+ "C", "OO", node_uids[bone_node], subdeformer_uid
+ );
+ }
+
+ // if we cannot create a valid FBX file, simply die.
+ // this will both prevent unnecessary bug reports,
+ // and tell the user what they can do to fix the situation
+ // (i.e. export their model in the bind pose).
+ if (no_offset_matrix.size() && not_in_bind_pose.size()) {
+ std::stringstream err;
+ err << "Not enough information to construct bind pose";
+ err << " for mesh " << mi << "!";
+ err << " Transform matrix for bone \"";
+ err << (*not_in_bind_pose.begin())->mName.C_Str() << "\"";
+ if (not_in_bind_pose.size() > 1) {
+ err << " (and " << not_in_bind_pose.size() - 1 << " more)";
+ }
+ err << " does not match mOffsetMatrix,";
+ err << " and node \"";
+ err << (*no_offset_matrix.begin())->mName.C_Str() << "\"";
+ if (no_offset_matrix.size() > 1) {
+ err << " (and " << no_offset_matrix.size() - 1 << " more)";
+ }
+ err << " has no offset matrix to rely on.";
+ err << " Please ensure bones are in the bind pose to export.";
+ throw DeadlyExportError(err.str());
+ }
+
+ }
+
+ // BindPose
+ //
+ // This is a legacy system, which should be unnecessary.
+ //
+ // Somehow including it slows file loading by the official FBX SDK,
+ // and as it can reconstruct it from the deformers anyway,
+ // this is not currently included.
+ //
+ // The code is kept here in case it's useful in the future,
+ // but it's pretty much a hack anyway,
+ // as assimp doesn't store bindpose information for full skeletons.
+ //
+ /*for (size_t mi = 0; mi < mScene->mNumMeshes; ++mi) {
+ aiMesh* mesh = mScene->mMeshes[mi];
+ if (! mesh->HasBones()) { continue; }
+ int64_t bindpose_uid = generate_uid();
+ FBX::Node bpnode("Pose");
+ bpnode.AddProperty(bindpose_uid);
+ // note: this uid is never linked or connected to anything.
+ bpnode.AddProperty(FBX::SEPARATOR + "Pose"); // blank name
+ bpnode.AddProperty("BindPose");
+
+ bpnode.AddChild("Type", "BindPose");
+ bpnode.AddChild("Version", int32_t(100));
+
+ aiNode* mesh_node = get_node_for_mesh(mi, mScene->mRootNode);
+
+ // next get the whole skeleton for this mesh.
+ // we need it all to define the bindpose section.
+ // the FBX SDK will complain if it's missing,
+ // and also if parents of used bones don't have a subdeformer.
+ // order shouldn't matter.
+ std::set<aiNode*> skeleton;
+ for (size_t bi = 0; bi < mesh->mNumBones; ++bi) {
+ // bone node should have already been indexed
+ const aiBone* b = mesh->mBones[bi];
+ const std::string bone_name(b->mName.C_Str());
+ aiNode* parent = node_by_bone[bone_name];
+ // insert all nodes down to the root or mesh node
+ while (
+ parent
+ && parent != mScene->mRootNode
+ && parent != mesh_node
+ ) {
+ skeleton.insert(parent);
+ parent = parent->mParent;
+ }
+ }
+
+ // number of pose nodes. includes one for the mesh itself.
+ bpnode.AddChild("NbPoseNodes", int32_t(1 + skeleton.size()));
+
+ // the first pose node is always the mesh itself
+ FBX::Node pose("PoseNode");
+ pose.AddChild("Node", mesh_uids[mi]);
+ aiMatrix4x4 mesh_node_xform = get_world_transform(mesh_node, mScene);
+ pose.AddChild("Matrix", mesh_node_xform);
+ bpnode.AddChild(pose);
+
+ for (aiNode* bonenode : skeleton) {
+ // does this node have a uid yet?
+ int64_t node_uid;
+ auto node_uid_iter = node_uids.find(bonenode);
+ if (node_uid_iter != node_uids.end()) {
+ node_uid = node_uid_iter->second;
+ } else {
+ node_uid = generate_uid();
+ node_uids[bonenode] = node_uid;
+ }
+
+ // make a pose thingy
+ pose = FBX::Node("PoseNode");
+ pose.AddChild("Node", node_uid);
+ aiMatrix4x4 node_xform = get_world_transform(bonenode, mScene);
+ pose.AddChild("Matrix", node_xform);
+ bpnode.AddChild(pose);
+ }
+
+ // now write it
+ bpnode.Dump(outstream, binary, indent);
+ }*/
+
+ // TODO: cameras, lights
+
+ // write nodes (i.e. model hierarchy)
+ // start at root node
+ WriteModelNodes(
+ outstream, mScene->mRootNode, 0, limbnodes
+ );
+
+ // animations
+ //
+ // in FBX there are:
+ // * AnimationStack - corresponds to an aiAnimation
+ // * AnimationLayer - a combinable animation component
+ // * AnimationCurveNode - links the property to be animated
+ // * AnimationCurve - defines animation data for a single property value
+ //
+ // the CurveNode also provides the default value for a property,
+ // such as the X, Y, Z coordinates for animatable translation.
+ //
+ // the Curve only specifies values for one component of the property,
+ // so there will be a separate AnimationCurve for X, Y, and Z.
+ //
+ // Assimp has:
+ // * aiAnimation - basically corresponds to an AnimationStack
+ // * aiNodeAnim - defines all animation for one aiNode
+ // * aiVectorKey/aiQuatKey - define the keyframe data for T/R/S
+ //
+ // assimp has no equivalent for AnimationLayer,
+ // and these are flattened on FBX import.
+ // we can assume there will be one per AnimationStack.
+ //
+ // the aiNodeAnim contains all animation data for a single aiNode,
+ // which will correspond to three AnimationCurveNode's:
+ // one each for translation, rotation and scale.
+ // The data for each of these will be put in 9 AnimationCurve's,
+ // T.X, T.Y, T.Z, R.X, R.Y, R.Z, etc.
+
+ // AnimationStack / aiAnimation
+ std::vector<int64_t> animation_stack_uids(mScene->mNumAnimations);
+ for (size_t ai = 0; ai < mScene->mNumAnimations; ++ai) {
+ int64_t animstack_uid = generate_uid();
+ animation_stack_uids[ai] = animstack_uid;
+ const aiAnimation* anim = mScene->mAnimations[ai];
+
+ FBX::Node asnode("AnimationStack");
+ std::string name = anim->mName.C_Str() + FBX::SEPARATOR + "AnimStack";
+ asnode.AddProperties(animstack_uid, name, "");
+ FBX::Node p("Properties70");
+ p.AddP70time("LocalStart", 0); // assimp doesn't store this
+ p.AddP70time("LocalStop", to_ktime(anim->mDuration, anim));
+ p.AddP70time("ReferenceStart", 0);
+ p.AddP70time("ReferenceStop", to_ktime(anim->mDuration, anim));
+ asnode.AddChild(p);
+
+ // this node absurdly always pretends it has children
+ // (in this case it does, but just in case...)
+ asnode.force_has_children = true;
+ asnode.Dump(outstream, binary, indent);
+
+ // note: animation stacks are not connected to anything
+ }
+
+ // AnimationLayer - one per aiAnimation
+ std::vector<int64_t> animation_layer_uids(mScene->mNumAnimations);
+ for (size_t ai = 0; ai < mScene->mNumAnimations; ++ai) {
+ int64_t animlayer_uid = generate_uid();
+ animation_layer_uids[ai] = animlayer_uid;
+ FBX::Node alnode("AnimationLayer");
+ alnode.AddProperties(animlayer_uid, FBX::SEPARATOR + "AnimLayer", "");
+
+ // this node absurdly always pretends it has children
+ alnode.force_has_children = true;
+ alnode.Dump(outstream, binary, indent);
+
+ // connect to the relevant animstack
+ connections.emplace_back(
+ "C", "OO", animlayer_uid, animation_stack_uids[ai]
+ );
+ }
+
+ // AnimCurveNode - three per aiNodeAnim
+ std::vector<std::vector<std::array<int64_t,3>>> curve_node_uids;
+ for (size_t ai = 0; ai < mScene->mNumAnimations; ++ai) {
+ const aiAnimation* anim = mScene->mAnimations[ai];
+ const int64_t layer_uid = animation_layer_uids[ai];
+ std::vector<std::array<int64_t,3>> nodeanim_uids;
+ for (size_t nai = 0; nai < anim->mNumChannels; ++nai) {
+ const aiNodeAnim* na = anim->mChannels[nai];
+ // get the corresponding aiNode
+ const aiNode* node = mScene->mRootNode->FindNode(na->mNodeName);
+ // and its transform
+ const aiMatrix4x4 node_xfm = get_world_transform(node, mScene);
+ aiVector3D T, R, S;
+ node_xfm.Decompose(S, R, T);
+
+ // AnimationCurveNode uids
+ std::array<int64_t,3> ids;
+ ids[0] = generate_uid(); // T
+ ids[1] = generate_uid(); // R
+ ids[2] = generate_uid(); // S
+
+ // translation
+ WriteAnimationCurveNode(outstream,
+ ids[0], "T", T, "Lcl Translation",
+ layer_uid, node_uids[node]
+ );
+
+ // rotation
+ WriteAnimationCurveNode(outstream,
+ ids[1], "R", R, "Lcl Rotation",
+ layer_uid, node_uids[node]
+ );
+
+ // scale
+ WriteAnimationCurveNode(outstream,
+ ids[2], "S", S, "Lcl Scale",
+ layer_uid, node_uids[node]
+ );
+
+ // store the uids for later use
+ nodeanim_uids.push_back(ids);
+ }
+ curve_node_uids.push_back(nodeanim_uids);
+ }
+
+ // AnimCurve - defines actual keyframe data.
+ // there's a separate curve for every component of every vector,
+ // for example a transform curvenode will have separate X/Y/Z AnimCurve's
+ for (size_t ai = 0; ai < mScene->mNumAnimations; ++ai) {
+ const aiAnimation* anim = mScene->mAnimations[ai];
+ for (size_t nai = 0; nai < anim->mNumChannels; ++nai) {
+ const aiNodeAnim* na = anim->mChannels[nai];
+ // get the corresponding aiNode
+ const aiNode* node = mScene->mRootNode->FindNode(na->mNodeName);
+ // and its transform
+ const aiMatrix4x4 node_xfm = get_world_transform(node, mScene);
+ aiVector3D T, R, S;
+ node_xfm.Decompose(S, R, T);
+ const std::array<int64_t,3>& ids = curve_node_uids[ai][nai];
+
+ std::vector<int64_t> times;
+ std::vector<float> xval, yval, zval;
+
+ // position/translation
+ for (size_t ki = 0; ki < na->mNumPositionKeys; ++ki) {
+ const aiVectorKey& k = na->mPositionKeys[ki];
+ times.push_back(to_ktime(k.mTime));
+ xval.push_back(k.mValue.x);
+ yval.push_back(k.mValue.y);
+ zval.push_back(k.mValue.z);
+ }
+ // one curve each for X, Y, Z
+ WriteAnimationCurve(outstream, T.x, times, xval, ids[0], "d|X");
+ WriteAnimationCurve(outstream, T.y, times, yval, ids[0], "d|Y");
+ WriteAnimationCurve(outstream, T.z, times, zval, ids[0], "d|Z");
+
+ // rotation
+ times.clear(); xval.clear(); yval.clear(); zval.clear();
+ for (size_t ki = 0; ki < na->mNumRotationKeys; ++ki) {
+ const aiQuatKey& k = na->mRotationKeys[ki];
+ times.push_back(to_ktime(k.mTime));
+ // TODO: aiQuaternion method to convert to Euler...
+ aiMatrix4x4 m(k.mValue.GetMatrix());
+ aiVector3D qs, qr, qt;
+ m.Decompose(qs, qr, qt);
+ qr *= DEG;
+ xval.push_back(qr.x);
+ yval.push_back(qr.y);
+ zval.push_back(qr.z);
+ }
+ WriteAnimationCurve(outstream, R.x, times, xval, ids[1], "d|X");
+ WriteAnimationCurve(outstream, R.y, times, yval, ids[1], "d|Y");
+ WriteAnimationCurve(outstream, R.z, times, zval, ids[1], "d|Z");
+
+ // scaling/scale
+ times.clear(); xval.clear(); yval.clear(); zval.clear();
+ for (size_t ki = 0; ki < na->mNumScalingKeys; ++ki) {
+ const aiVectorKey& k = na->mScalingKeys[ki];
+ times.push_back(to_ktime(k.mTime));
+ xval.push_back(k.mValue.x);
+ yval.push_back(k.mValue.y);
+ zval.push_back(k.mValue.z);
+ }
+ WriteAnimationCurve(outstream, S.x, times, xval, ids[2], "d|X");
+ WriteAnimationCurve(outstream, S.y, times, yval, ids[2], "d|Y");
+ WriteAnimationCurve(outstream, S.z, times, zval, ids[2], "d|Z");
+ }
+ }
+
+ indent = 0;
+ object_node.End(outstream, binary, indent, true);
+}
+
+// convenience map of magic node name strings to FBX properties,
+// including the expected type of transform.
+const std::map<std::string,std::pair<std::string,char>> transform_types = {
+ {"Translation", {"Lcl Translation", 't'}},
+ {"RotationOffset", {"RotationOffset", 't'}},
+ {"RotationPivot", {"RotationPivot", 't'}},
+ {"PreRotation", {"PreRotation", 'r'}},
+ {"Rotation", {"Lcl Rotation", 'r'}},
+ {"PostRotation", {"PostRotation", 'r'}},
+ {"RotationPivotInverse", {"RotationPivotInverse", 'i'}},
+ {"ScalingOffset", {"ScalingOffset", 't'}},
+ {"ScalingPivot", {"ScalingPivot", 't'}},
+ {"Scaling", {"Lcl Scaling", 's'}},
+ {"ScalingPivotInverse", {"ScalingPivotInverse", 'i'}},
+ {"GeometricScaling", {"GeometricScaling", 's'}},
+ {"GeometricRotation", {"GeometricRotation", 'r'}},
+ {"GeometricTranslation", {"GeometricTranslation", 't'}},
+ {"GeometricTranslationInverse", {"GeometricTranslationInverse", 'i'}},
+ {"GeometricRotationInverse", {"GeometricRotationInverse", 'i'}},
+ {"GeometricScalingInverse", {"GeometricScalingInverse", 'i'}}
+};
+
+// write a single model node to the stream
+void FBXExporter::WriteModelNode(
+ StreamWriterLE& outstream,
+ bool binary,
+ const aiNode* node,
+ int64_t node_uid,
+ const std::string& type,
+ const std::vector<std::pair<std::string,aiVector3D>>& transform_chain,
+ TransformInheritance inherit_type
+){
+ const aiVector3D zero = {0, 0, 0};
+ const aiVector3D one = {1, 1, 1};
+ FBX::Node m("Model");
+ std::string name = node->mName.C_Str() + FBX::SEPARATOR + "Model";
+ m.AddProperties(node_uid, name, type);
+ m.AddChild("Version", int32_t(232));
+ FBX::Node p("Properties70");
+ p.AddP70bool("RotationActive", 1);
+ p.AddP70int("DefaultAttributeIndex", 0);
+ p.AddP70enum("InheritType", inherit_type);
+ if (transform_chain.empty()) {
+ // decompose 4x4 transform matrix into TRS
+ aiVector3D t, r, s;
+ node->mTransformation.Decompose(s, r, t);
+ if (t != zero) {
+ p.AddP70(
+ "Lcl Translation", "Lcl Translation", "", "A",
+ double(t.x), double(t.y), double(t.z)
+ );
+ }
+ if (r != zero) {
+ p.AddP70(
+ "Lcl Rotation", "Lcl Rotation", "", "A",
+ double(DEG*r.x), double(DEG*r.y), double(DEG*r.z)
+ );
+ }
+ if (s != one) {
+ p.AddP70(
+ "Lcl Scaling", "Lcl Scaling", "", "A",
+ double(s.x), double(s.y), double(s.z)
+ );
+ }
+ } else {
+ // apply the transformation chain.
+ // these transformation elements are created when importing FBX,
+ // which has a complex transformation hierarchy for each node.
+ // as such we can bake the hierarchy back into the node on export.
+ for (auto &item : transform_chain) {
+ auto elem = transform_types.find(item.first);
+ if (elem == transform_types.end()) {
+ // then this is a bug
+ std::stringstream err;
+ err << "unrecognized FBX transformation type: ";
+ err << item.first;
+ throw DeadlyExportError(err.str());
+ }
+ const std::string &name = elem->second.first;
+ const aiVector3D &v = item.second;
+ if (name.compare(0, 4, "Lcl ") == 0) {
+ // special handling for animatable properties
+ p.AddP70(
+ name, name, "", "A",
+ double(v.x), double(v.y), double(v.z)
+ );
+ } else {
+ p.AddP70vector(name, v.x, v.y, v.z);
+ }
+ }
+ }
+ m.AddChild(p);
+
+ // not sure what these are for,
+ // but they seem to be omnipresent
+ m.AddChild("Shading", Property(true));
+ m.AddChild("Culling", Property("CullingOff"));
+
+ m.Dump(outstream, binary, 1);
+}
+
+// wrapper for WriteModelNodes to create and pass a blank transform chain
+void FBXExporter::WriteModelNodes(
+ StreamWriterLE& s,
+ const aiNode* node,
+ int64_t parent_uid,
+ const std::unordered_set<const aiNode*>& limbnodes
+) {
+ std::vector<std::pair<std::string,aiVector3D>> chain;
+ WriteModelNodes(s, node, parent_uid, limbnodes, chain);
+}
+
+void FBXExporter::WriteModelNodes(
+ StreamWriterLE& outstream,
+ const aiNode* node,
+ int64_t parent_uid,
+ const std::unordered_set<const aiNode*>& limbnodes,
+ std::vector<std::pair<std::string,aiVector3D>>& transform_chain
+) {
+ // first collapse any expanded transformation chains created by FBX import.
+ std::string node_name(node->mName.C_Str());
+ if (node_name.find(MAGIC_NODE_TAG) != std::string::npos) {
+ auto pos = node_name.find(MAGIC_NODE_TAG) + MAGIC_NODE_TAG.size() + 1;
+ std::string type_name = node_name.substr(pos);
+ auto elem = transform_types.find(type_name);
+ if (elem == transform_types.end()) {
+ // then this is a bug and should be fixed
+ std::stringstream err;
+ err << "unrecognized FBX transformation node";
+ err << " of type " << type_name << " in node " << node_name;
+ throw DeadlyExportError(err.str());
+ }
+ aiVector3D t, r, s;
+ node->mTransformation.Decompose(s, r, t);
+ switch (elem->second.second) {
+ case 'i': // inverse
+ // we don't need to worry about the inverse matrices
+ break;
+ case 't': // translation
+ transform_chain.emplace_back(elem->first, t);
+ break;
+ case 'r': // rotation
+ r *= float(DEG);
+ transform_chain.emplace_back(elem->first, r);
+ break;
+ case 's': // scale
+ transform_chain.emplace_back(elem->first, s);
+ break;
+ default:
+ // this should never happen
+ std::stringstream err;
+ err << "unrecognized FBX transformation type code: ";
+ err << elem->second.second;
+ throw DeadlyExportError(err.str());
+ }
+ // now continue on to any child nodes
+ for (unsigned i = 0; i < node->mNumChildren; ++i) {
+ WriteModelNodes(
+ outstream,
+ node->mChildren[i],
+ parent_uid,
+ limbnodes,
+ transform_chain
+ );
+ }
+ return;
+ }
+
+ int64_t node_uid = 0;
+ // generate uid and connect to parent, if not the root node,
+ if (node != mScene->mRootNode) {
+ auto elem = node_uids.find(node);
+ if (elem != node_uids.end()) {
+ node_uid = elem->second;
+ } else {
+ node_uid = generate_uid();
+ node_uids[node] = node_uid;
+ }
+ connections.emplace_back("C", "OO", node_uid, parent_uid);
+ }
+
+ // what type of node is this?
+ if (node == mScene->mRootNode) {
+ // handled later
+ } else if (node->mNumMeshes == 1) {
+ // connect to child mesh, which should have been written previously
+ connections.emplace_back(
+ "C", "OO", mesh_uids[node->mMeshes[0]], node_uid
+ );
+ // also connect to the material for the child mesh
+ connections.emplace_back(
+ "C", "OO",
+ material_uids[mScene->mMeshes[node->mMeshes[0]]->mMaterialIndex],
+ node_uid
+ );
+ // write model node
+ WriteModelNode(
+ outstream, binary, node, node_uid, "Mesh", transform_chain
+ );
+ } else if (limbnodes.count(node)) {
+ WriteModelNode(
+ outstream, binary, node, node_uid, "LimbNode", transform_chain
+ );
+ // we also need to write a nodeattribute to mark it as a skeleton
+ int64_t node_attribute_uid = generate_uid();
+ FBX::Node na("NodeAttribute");
+ na.AddProperties(
+ node_attribute_uid, FBX::SEPARATOR + "NodeAttribute", "LimbNode"
+ );
+ na.AddChild("TypeFlags", Property("Skeleton"));
+ na.Dump(outstream, binary, 1);
+ // and connect them
+ connections.emplace_back("C", "OO", node_attribute_uid, node_uid);
+ } else {
+ // generate a null node so we can add children to it
+ WriteModelNode(
+ outstream, binary, node, node_uid, "Null", transform_chain
+ );
+ }
+
+ // if more than one child mesh, make nodes for each mesh
+ if (node->mNumMeshes > 1 || node == mScene->mRootNode) {
+ for (size_t i = 0; i < node->mNumMeshes; ++i) {
+ // make a new model node
+ int64_t new_node_uid = generate_uid();
+ // connect to parent node
+ connections.emplace_back("C", "OO", new_node_uid, node_uid);
+ // connect to child mesh, which should have been written previously
+ connections.emplace_back(
+ "C", "OO", mesh_uids[node->mMeshes[i]], new_node_uid
+ );
+ // also connect to the material for the child mesh
+ connections.emplace_back(
+ "C", "OO",
+ material_uids[
+ mScene->mMeshes[node->mMeshes[i]]->mMaterialIndex
+ ],
+ new_node_uid
+ );
+ // write model node
+ FBX::Node m("Model");
+ // take name from mesh name, if it exists
+ std::string name = mScene->mMeshes[node->mMeshes[i]]->mName.C_Str();
+ name += FBX::SEPARATOR + "Model";
+ m.AddProperties(new_node_uid, name, "Mesh");
+ m.AddChild("Version", int32_t(232));
+ FBX::Node p("Properties70");
+ p.AddP70enum("InheritType", 1);
+ m.AddChild(p);
+ m.Dump(outstream, binary, 1);
+ }
+ }
+
+ // now recurse into children
+ for (size_t i = 0; i < node->mNumChildren; ++i) {
+ WriteModelNodes(
+ outstream, node->mChildren[i], node_uid, limbnodes
+ );
+ }
+}
+
+
+void FBXExporter::WriteAnimationCurveNode(
+ StreamWriterLE& outstream,
+ int64_t uid,
+ std::string name, // "T", "R", or "S"
+ aiVector3D default_value,
+ std::string property_name, // "Lcl Translation" etc
+ int64_t layer_uid,
+ int64_t node_uid
+) {
+ FBX::Node n("AnimationCurveNode");
+ n.AddProperties(uid, name + FBX::SEPARATOR + "AnimCurveNode", "");
+ FBX::Node p("Properties70");
+ p.AddP70numberA("d|X", default_value.x);
+ p.AddP70numberA("d|Y", default_value.y);
+ p.AddP70numberA("d|Z", default_value.z);
+ n.AddChild(p);
+ n.Dump(outstream, binary, 1);
+ // connect to layer
+ this->connections.emplace_back("C", "OO", uid, layer_uid);
+ // connect to bone
+ this->connections.emplace_back("C", "OP", uid, node_uid, property_name);
+}
+
+
+void FBXExporter::WriteAnimationCurve(
+ StreamWriterLE& outstream,
+ double default_value,
+ const std::vector<int64_t>& times,
+ const std::vector<float>& values,
+ int64_t curvenode_uid,
+ const std::string& property_link // "d|X", "d|Y", etc
+) {
+ FBX::Node n("AnimationCurve");
+ int64_t curve_uid = generate_uid();
+ n.AddProperties(curve_uid, FBX::SEPARATOR + "AnimCurve", "");
+ n.AddChild("Default", default_value);
+ n.AddChild("KeyVer", int32_t(4009));
+ n.AddChild("KeyTime", times);
+ n.AddChild("KeyValueFloat", values);
+ // TODO: keyattr flags and data (STUB for now)
+ n.AddChild("KeyAttrFlags", std::vector<int32_t>{0});
+ n.AddChild("KeyAttrDataFloat", std::vector<float>{0,0,0,0});
+ ai_assert(static_cast<int32_t>(times.size()) <= std::numeric_limits<int32_t>::max());
+ n.AddChild(
+ "KeyAttrRefCount",
+ std::vector<int32_t>{static_cast<int32_t>(times.size())}
+ );
+ n.Dump(outstream, binary, 1);
+ this->connections.emplace_back(
+ "C", "OP", curve_uid, curvenode_uid, property_link
+ );
+}
+
+
+void FBXExporter::WriteConnections ()
+{
+ // we should have completed the connection graph already,
+ // so basically just dump it here
+ if (!binary) {
+ WriteAsciiSectionHeader("Object connections");
+ }
+ // TODO: comments with names in the ascii version
+ FBX::Node conn("Connections");
+ StreamWriterLE outstream(outfile);
+ conn.Begin(outstream, binary, 0);
+ conn.BeginChildren(outstream, binary, 0);
+ for (auto &n : connections) {
+ n.Dump(outstream, binary, 1);
+ }
+ conn.End(outstream, binary, 0, !connections.empty());
+ connections.clear();
+}
+
+#endif // ASSIMP_BUILD_NO_FBX_EXPORTER
+#endif // ASSIMP_BUILD_NO_EXPORT
diff --git a/code/FBXExporter.h b/code/FBXExporter.h
new file mode 100644
index 000000000..c27d1a8ce
--- /dev/null
+++ b/code/FBXExporter.h
@@ -0,0 +1,178 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2018, assimp 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 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 FBXExporter.h
+* Declares the exporter class to write a scene to an fbx file
+*/
+#ifndef AI_FBXEXPORTER_H_INC
+#define AI_FBXEXPORTER_H_INC
+
+#ifndef ASSIMP_BUILD_NO_FBX_EXPORTER
+
+#include "FBXExportNode.h" // FBX::Node
+#include "FBXCommon.h" // FBX::TransformInheritance
+
+#include <assimp/types.h>
+//#include <assimp/material.h>
+#include <assimp/StreamWriter.h> // StreamWriterLE
+#include <assimp/Exceptional.h> // DeadlyExportError
+
+#include <vector>
+#include <map>
+#include <unordered_set>
+#include <memory> // shared_ptr
+#include <sstream> // stringstream
+
+struct aiScene;
+struct aiNode;
+//struct aiMaterial;
+
+namespace Assimp
+{
+ class IOSystem;
+ class IOStream;
+ class ExportProperties;
+
+ // ---------------------------------------------------------------------
+ /** Helper class to export a given scene to an FBX file. */
+ // ---------------------------------------------------------------------
+ class FBXExporter
+ {
+ public:
+ /// Constructor for a specific scene to export
+ FBXExporter(const aiScene* pScene, const ExportProperties* pProperties);
+
+ // call one of these methods to export
+ void ExportBinary(const char* pFile, IOSystem* pIOSystem);
+ void ExportAscii(const char* pFile, IOSystem* pIOSystem);
+
+ private:
+ bool binary; // whether current export is in binary or ascii format
+ const aiScene* mScene; // the scene to export
+ const ExportProperties* mProperties; // currently unused
+ std::shared_ptr<IOStream> outfile; // file to write to
+
+ std::vector<FBX::Node> connections; // connection storage
+
+ std::vector<int64_t> mesh_uids;
+ std::vector<int64_t> material_uids;
+ std::map<const aiNode*,int64_t> node_uids;
+
+ // this crude unique-ID system is actually fine
+ int64_t last_uid = 999999;
+ int64_t generate_uid() { return ++last_uid; }
+
+ // binary files have a specific header and footer,
+ // in addition to the actual data
+ void WriteBinaryHeader();
+ void WriteBinaryFooter();
+
+ // ascii files have a comment at the top
+ void WriteAsciiHeader();
+
+ // WriteAllNodes does the actual export.
+ // It just calls all the Write<Section> methods below in order.
+ void WriteAllNodes();
+
+ // Methods to write individual sections.
+ // The order here matches the order inside an FBX file.
+ // Each method corresponds to a top-level FBX section,
+ // except WriteHeader which also includes some binary-only sections
+ // and WriteFooter which is binary data only.
+ void WriteHeaderExtension();
+ // WriteFileId(); // binary-only, included in WriteHeader
+ // WriteCreationTime(); // binary-only, included in WriteHeader
+ // WriteCreator(); // binary-only, included in WriteHeader
+ void WriteGlobalSettings();
+ void WriteDocuments();
+ void WriteReferences();
+ void WriteDefinitions();
+ void WriteObjects();
+ void WriteConnections();
+ // WriteTakes(); // deprecated since at least 2015 (fbx 7.4)
+
+ // helpers
+ void WriteAsciiSectionHeader(const std::string& title);
+ void WriteModelNodes(
+ Assimp::StreamWriterLE& s,
+ const aiNode* node,
+ int64_t parent_uid,
+ const std::unordered_set<const aiNode*>& limbnodes
+ );
+ void WriteModelNodes( // usually don't call this directly
+ StreamWriterLE& s,
+ const aiNode* node,
+ int64_t parent_uid,
+ const std::unordered_set<const aiNode*>& limbnodes,
+ std::vector<std::pair<std::string,aiVector3D>>& transform_chain
+ );
+ void WriteModelNode( // nor this
+ StreamWriterLE& s,
+ bool binary,
+ const aiNode* node,
+ int64_t node_uid,
+ const std::string& type,
+ const std::vector<std::pair<std::string,aiVector3D>>& xfm_chain,
+ FBX::TransformInheritance ti_type=FBX::TransformInheritance_RSrs
+ );
+ void WriteAnimationCurveNode(
+ StreamWriterLE& outstream,
+ int64_t uid,
+ std::string name, // "T", "R", or "S"
+ aiVector3D default_value,
+ std::string property_name, // "Lcl Translation" etc
+ int64_t animation_layer_uid,
+ int64_t node_uid
+ );
+ void WriteAnimationCurve(
+ StreamWriterLE& outstream,
+ double default_value,
+ const std::vector<int64_t>& times,
+ const std::vector<float>& values,
+ int64_t curvenode_id,
+ const std::string& property_link // "d|X", "d|Y", etc
+ );
+ };
+}
+
+#endif // ASSIMP_BUILD_NO_FBX_EXPORTER
+
+#endif // AI_FBXEXPORTER_H_INC
diff --git a/code/FBXImportSettings.h b/code/FBXImportSettings.h
index ca7435f4c..e612fddef 100644
--- a/code/FBXImportSettings.h
+++ b/code/FBXImportSettings.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -63,6 +64,7 @@ struct ImportSettings
, readWeights(true)
, preservePivots(true)
, optimizeEmptyAnimationCurves(true)
+ , useLegacyEmbeddedTextureNaming(false)
{}
@@ -137,6 +139,10 @@ struct ImportSettings
* values matching the corresponding node transformation.
* The default value is true. */
bool optimizeEmptyAnimationCurves;
+
+ /** use legacy naming for embedded textures eg: (*0, *1, *2)
+ **/
+ bool useLegacyEmbeddedTextureNaming;
};
diff --git a/code/FBXImporter.cpp b/code/FBXImporter.cpp
index 7078fde58..b004bcd8c 100644
--- a/code/FBXImporter.cpp
+++ b/code/FBXImporter.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -53,13 +54,17 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "FBXDocument.h"
#include "FBXConverter.h"
-#include "StreamReader.h"
-#include "MemoryIOWrapper.h"
+#include <assimp/StreamReader.h>
+#include <assimp/MemoryIOWrapper.h>
#include <assimp/Importer.hpp>
#include <assimp/importerdesc.h>
namespace Assimp {
- template<> const std::string LogFunctions<FBXImporter>::log_prefix = "FBX: ";
+ template<> const char* LogFunctions<FBXImporter>::Prefix()
+ {
+ static auto prefix = "FBX: ";
+ return prefix;
+ }
}
using namespace Assimp;
@@ -131,12 +136,12 @@ void FBXImporter::SetupProperties(const Importer* pImp)
settings.strictMode = pImp->GetPropertyBool(AI_CONFIG_IMPORT_FBX_STRICT_MODE, false);
settings.preservePivots = pImp->GetPropertyBool(AI_CONFIG_IMPORT_FBX_PRESERVE_PIVOTS, true);
settings.optimizeEmptyAnimationCurves = pImp->GetPropertyBool(AI_CONFIG_IMPORT_FBX_OPTIMIZE_EMPTY_ANIMATION_CURVES, true);
+ settings.useLegacyEmbeddedTextureNaming = pImp->GetPropertyBool(AI_CONFIG_IMPORT_FBX_EMBEDDED_TEXTURES_LEGACY_NAMING, false);
}
// ------------------------------------------------------------------------------------------------
// Imports the given file into the given scene structure.
-void FBXImporter::InternReadFile( const std::string& pFile,
- aiScene* pScene, IOSystem* pIOHandler)
+void FBXImporter::InternReadFile( const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler)
{
std::unique_ptr<IOStream> stream(pIOHandler->Open(pFile,"rb"));
if (!stream) {
diff --git a/code/FBXImporter.h b/code/FBXImporter.h
index 43be97ffa..870f1c49b 100644
--- a/code/FBXImporter.h
+++ b/code/FBXImporter.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -45,8 +46,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef INCLUDED_AI_FBX_IMPORTER_H
#define INCLUDED_AI_FBX_IMPORTER_H
-#include "BaseImporter.h"
-#include "LogAux.h"
+#include <assimp/BaseImporter.h>
+#include <assimp/LogAux.h>
#include "FBXImportSettings.h"
diff --git a/code/FBXMaterial.cpp b/code/FBXMaterial.cpp
index 5391c0a45..75b2e3b4b 100644
--- a/code/FBXMaterial.cpp
+++ b/code/FBXMaterial.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -51,7 +52,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "FBXImportSettings.h"
#include "FBXDocumentUtil.h"
#include "FBXProperties.h"
-#include "ByteSwapper.h"
+#include <assimp/ByteSwapper.h>
+
+#include <algorithm> // std::transform
namespace Assimp {
namespace FBX {
@@ -81,11 +84,12 @@ Material::Material(uint64_t id, const Element& element, const Document& doc, con
std::string templateName;
- const char* const sh = shading.c_str();
- if(!strcmp(sh,"phong")) {
+ // lower-case shading because Blender (for example) writes "Phong"
+ std::transform(shading.begin(), shading.end(), shading.begin(), ::tolower);
+ if(shading == "phong") {
templateName = "Material.FbxSurfacePhong";
}
- else if(!strcmp(sh,"lambert")) {
+ else if(shading == "lambert") {
templateName = "Material.FbxSurfaceLambert";
}
else {
@@ -281,7 +285,7 @@ Video::Video(uint64_t id, const Element& element, const Document& doc, const std
const Scope& sc = GetRequiredScope(element);
const Element* const Type = sc["Type"];
- const Element* const FileName = sc["FileName"];
+ const Element* const FileName = sc.FindElementCaseInsensitive("FileName"); //some files retain the information as "Filename", others "FileName", who knows
const Element* const RelativeFilename = sc["RelativeFilename"];
const Element* const Content = sc["Content"];
@@ -298,27 +302,32 @@ Video::Video(uint64_t id, const Element& element, const Document& doc, const std
}
if(Content) {
- const Token& token = GetRequiredToken(*Content, 0);
- const char* data = token.begin();
- if(!token.IsBinary()) {
- DOMWarning("video content is not binary data, ignoring", &element);
- }
- else if(static_cast<size_t>(token.end() - data) < 5) {
- DOMError("binary data array is too short, need five (5) bytes for type signature and element count", &element);
- }
- else if(*data != 'R') {
- DOMWarning("video content is not raw binary data, ignoring", &element);
- }
- else {
- // read number of elements
- uint32_t len = 0;
- ::memcpy(&len, data + 1, sizeof(len));
- AI_SWAP4(len);
+ //this field is omitted when the embedded texture is already loaded, let's ignore if it's not found
+ try {
+ const Token& token = GetRequiredToken(*Content, 0);
+ const char* data = token.begin();
+ if (!token.IsBinary()) {
+ DOMWarning("video content is not binary data, ignoring", &element);
+ }
+ else if (static_cast<size_t>(token.end() - data) < 5) {
+ DOMError("binary data array is too short, need five (5) bytes for type signature and element count", &element);
+ }
+ else if (*data != 'R') {
+ DOMWarning("video content is not raw binary data, ignoring", &element);
+ }
+ else {
+ // read number of elements
+ uint32_t len = 0;
+ ::memcpy(&len, data + 1, sizeof(len));
+ AI_SWAP4(len);
- contentLength = len;
+ contentLength = len;
- content = new uint8_t[len];
- ::memcpy(content, data + 5, len);
+ content = new uint8_t[len];
+ ::memcpy(content, data + 5, len);
+ }
+ } catch (runtime_error runtimeError) {
+ //we don't need the content data for contents that has already been loaded
}
}
diff --git a/code/FBXMeshGeometry.cpp b/code/FBXMeshGeometry.cpp
index 63de9460a..aa794d4df 100644
--- a/code/FBXMeshGeometry.cpp
+++ b/code/FBXMeshGeometry.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -78,14 +79,13 @@ Geometry::Geometry(uint64_t id, const Element& element, const std::string& name,
// ------------------------------------------------------------------------------------------------
Geometry::~Geometry()
{
-
+ // empty
}
const Skin* Geometry::DeformerSkin() const {
return skin;
}
-
// ------------------------------------------------------------------------------------------------
MeshGeometry::MeshGeometry(uint64_t id, const Element& element, const std::string& name, const Document& doc)
: Geometry(id, element,name, doc)
@@ -185,9 +185,8 @@ MeshGeometry::MeshGeometry(uint64_t id, const Element& element, const std::strin
}
// ------------------------------------------------------------------------------------------------
-MeshGeometry::~MeshGeometry()
-{
-
+MeshGeometry::~MeshGeometry() {
+ // empty
}
// ------------------------------------------------------------------------------------------------
@@ -243,7 +242,6 @@ const unsigned int* MeshGeometry::ToOutputVertexIndex( unsigned int in_index, un
ai_assert( m_mapping_counts.size() == m_mapping_offsets.size() );
count = m_mapping_counts[ in_index ];
-// ai_assert( count != 0 );
ai_assert( m_mapping_offsets[ in_index ] + count <= m_mappings.size() );
return &m_mappings[ m_mapping_offsets[ in_index ] ];
@@ -308,7 +306,6 @@ void MeshGeometry::ReadLayerElement(const Scope& layerElement)
<< type << ", index: " << typedIndex);
}
-
// ------------------------------------------------------------------------------------------------
void MeshGeometry::ReadVertexData(const std::string& type, int index, const Scope& source)
{
@@ -357,7 +354,7 @@ void MeshGeometry::ReadVertexData(const std::string& type, int index, const Scop
// avoids losing the material if there are more material layers
// coming of which at least one contains actual data (did observe
// that with one test file).
- const size_t count_neg = std::count_if(temp_materials.begin(),temp_materials.end(),std::bind2nd(std::less<int>(),0));
+ const size_t count_neg = std::count_if(temp_materials.begin(),temp_materials.end(),[](int n) { return n < 0; });
if(count_neg == temp_materials.size()) {
FBXImporter::LogWarn("ignoring dummy material layer (all entries -1)");
return;
@@ -412,7 +409,6 @@ void MeshGeometry::ReadVertexData(const std::string& type, int index, const Scop
}
}
-
// ------------------------------------------------------------------------------------------------
// Lengthy utility function to read and resolve a FBX vertex data array - that is, the
// output is in polygon vertex order. This logic is used for reading normals, UVs, colors,
@@ -428,13 +424,23 @@ void ResolveVertexDataArray(std::vector<T>& data_out, const Scope& source,
const std::vector<unsigned int>& mapping_offsets,
const std::vector<unsigned int>& mappings)
{
+ bool isDirect = ReferenceInformationType == "Direct";
+ bool isIndexToDirect = ReferenceInformationType == "IndexToDirect";
+ // fall-back to direct data if there is no index data element
+ if ( isIndexToDirect && !HasElement( source, indexDataElementName ) ) {
+ isDirect = true;
+ isIndexToDirect = false;
+ }
// handle permutations of Mapping and Reference type - it would be nice to
// deal with this more elegantly and with less redundancy, but right
// now it seems unavoidable.
- if (MappingInformationType == "ByVertice" && ReferenceInformationType == "Direct") {
- std::vector<T> tempData;
+ if (MappingInformationType == "ByVertice" && isDirect) {
+ if (!HasElement(source, dataElementName)) {
+ return;
+ }
+ std::vector<T> tempData;
ParseVectorDataArray(tempData, GetRequiredElement(source, dataElementName));
data_out.resize(vertex_count);
@@ -446,7 +452,7 @@ void ResolveVertexDataArray(std::vector<T>& data_out, const Scope& source,
}
}
}
- else if (MappingInformationType == "ByVertice" && ReferenceInformationType == "IndexToDirect") {
+ else if (MappingInformationType == "ByVertice" && isIndexToDirect) {
std::vector<T> tempData;
ParseVectorDataArray(tempData, GetRequiredElement(source, dataElementName));
@@ -454,7 +460,6 @@ void ResolveVertexDataArray(std::vector<T>& data_out, const Scope& source,
std::vector<int> uvIndices;
ParseVectorDataArray(uvIndices,GetRequiredElement(source,indexDataElementName));
-
for (size_t i = 0, e = uvIndices.size(); i < e; ++i) {
const unsigned int istart = mapping_offsets[i], iend = istart + mapping_counts[i];
@@ -466,7 +471,7 @@ void ResolveVertexDataArray(std::vector<T>& data_out, const Scope& source,
}
}
}
- else if (MappingInformationType == "ByPolygonVertex" && ReferenceInformationType == "Direct") {
+ else if (MappingInformationType == "ByPolygonVertex" && isDirect) {
std::vector<T> tempData;
ParseVectorDataArray(tempData, GetRequiredElement(source, dataElementName));
@@ -479,7 +484,7 @@ void ResolveVertexDataArray(std::vector<T>& data_out, const Scope& source,
data_out.swap(tempData);
}
- else if (MappingInformationType == "ByPolygonVertex" && ReferenceInformationType == "IndexToDirect") {
+ else if (MappingInformationType == "ByPolygonVertex" && isIndexToDirect) {
std::vector<T> tempData;
ParseVectorDataArray(tempData, GetRequiredElement(source, dataElementName));
@@ -493,9 +498,14 @@ void ResolveVertexDataArray(std::vector<T>& data_out, const Scope& source,
return;
}
+ const T empty;
unsigned int next = 0;
for(int i : uvIndices) {
- if (static_cast<size_t>(i) >= tempData.size()) {
+ if ( -1 == i ) {
+ data_out[ next++ ] = empty;
+ continue;
+ }
+ if (static_cast<size_t>(i) >= tempData.size()) {
DOMError("index out of range",&GetRequiredElement(source,indexDataElementName));
}
@@ -522,7 +532,6 @@ void MeshGeometry::ReadVertexDataNormals(std::vector<aiVector3D>& normals_out, c
m_mappings);
}
-
// ------------------------------------------------------------------------------------------------
void MeshGeometry::ReadVertexDataUV(std::vector<aiVector2D>& uv_out, const Scope& source,
const std::string& MappingInformationType,
@@ -537,7 +546,6 @@ void MeshGeometry::ReadVertexDataUV(std::vector<aiVector2D>& uv_out, const Scope
m_mappings);
}
-
// ------------------------------------------------------------------------------------------------
void MeshGeometry::ReadVertexDataColors(std::vector<aiColor4D>& colors_out, const Scope& source,
const std::string& MappingInformationType,
diff --git a/code/FBXMeshGeometry.h b/code/FBXMeshGeometry.h
index 19f7b0a9c..acd44668a 100644
--- a/code/FBXMeshGeometry.h
+++ b/code/FBXMeshGeometry.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -67,7 +68,6 @@ private:
const Skin* skin;
};
-
typedef std::vector<int> MatIndexArray;
@@ -94,8 +94,8 @@ public:
* if no tangents are specified */
const std::vector<aiVector3D>& GetTangents() const;
- /** Get a list of all vertex binormals or an empty array
- * if no binormals are specified */
+ /** Get a list of all vertex bi-normals or an empty array
+ * if no bi-normals are specified */
const std::vector<aiVector3D>& GetBinormals() const;
/** Return list of faces - each entry denotes a face and specifies
diff --git a/code/FBXModel.cpp b/code/FBXModel.cpp
index 90939c142..c16ca841c 100644
--- a/code/FBXModel.cpp
+++ b/code/FBXModel.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -77,14 +78,12 @@ Model::Model(uint64_t id, const Element& element, const Document& doc, const std
ResolveLinks(element,doc);
}
-
// ------------------------------------------------------------------------------------------------
Model::~Model()
{
}
-
// ------------------------------------------------------------------------------------------------
void Model::ResolveLinks(const Element& element, const Document& doc)
{
@@ -132,7 +131,6 @@ void Model::ResolveLinks(const Element& element, const Document& doc)
}
}
-
// ------------------------------------------------------------------------------------------------
bool Model::IsNull() const
{
diff --git a/code/FBXNodeAttribute.cpp b/code/FBXNodeAttribute.cpp
index bcf079c2e..1064151b3 100644
--- a/code/FBXNodeAttribute.cpp
+++ b/code/FBXNodeAttribute.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -53,7 +54,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace Assimp {
namespace FBX {
- using namespace Util;
+using namespace Util;
// ------------------------------------------------------------------------------------------------
NodeAttribute::NodeAttribute(uint64_t id, const Element& element, const Document& doc, const std::string& name)
@@ -75,7 +76,7 @@ NodeAttribute::NodeAttribute(uint64_t id, const Element& element, const Document
// ------------------------------------------------------------------------------------------------
NodeAttribute::~NodeAttribute()
{
-
+ // empty
}
@@ -101,33 +102,30 @@ CameraSwitcher::CameraSwitcher(uint64_t id, const Element& element, const Docume
}
}
-
// ------------------------------------------------------------------------------------------------
CameraSwitcher::~CameraSwitcher()
{
-
+ // empty
}
-
// ------------------------------------------------------------------------------------------------
Camera::Camera(uint64_t id, const Element& element, const Document& doc, const std::string& name)
: NodeAttribute(id,element,doc,name)
{
-
+ // empty
}
-
// ------------------------------------------------------------------------------------------------
Camera::~Camera()
{
+ // empty
}
-
// ------------------------------------------------------------------------------------------------
Light::Light(uint64_t id, const Element& element, const Document& doc, const std::string& name)
: NodeAttribute(id,element,doc,name)
{
-
+ // empty
}
diff --git a/code/FBXParser.cpp b/code/FBXParser.cpp
index 428c29a62..96d113bd1 100644
--- a/code/FBXParser.cpp
+++ b/code/FBXParser.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -45,7 +46,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_NO_FBX_IMPORTER
-
#ifdef ASSIMP_BUILD_NO_OWN_ZLIB
# include <zlib.h>
#else
@@ -56,9 +56,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "FBXParser.h"
#include "FBXUtil.h"
-#include "ParsingUtils.h"
-#include "fast_atof.h"
-#include "ByteSwapper.h"
+#include <assimp/ParsingUtils.h>
+#include <assimp/fast_atof.h>
+#include <assimp/ByteSwapper.h>
#include <iostream>
@@ -67,7 +67,6 @@ using namespace Assimp::FBX;
namespace {
-
// ------------------------------------------------------------------------------------------------
// signal parse error, this is always unrecoverable. Throws DeadlyImportError.
AI_WONT_RETURN void ParseError(const std::string& message, const Token& token) AI_WONT_RETURN_SUFFIX;
@@ -103,6 +102,7 @@ namespace {
T SafeParse(const char* data, const char* end) {
// Actual size validation happens during Tokenization so
// this is valid as an assertion.
+ (void)(end);
ai_assert(static_cast<size_t>(end - data) >= sizeof(T));
T result = static_cast<T>(0);
::memcpy(&result, data, sizeof(T));
@@ -212,7 +212,6 @@ Scope::~Scope()
}
}
-
// ------------------------------------------------------------------------------------------------
Parser::Parser (const TokenList& tokens, bool is_binary)
: tokens(tokens)
@@ -224,41 +223,36 @@ Parser::Parser (const TokenList& tokens, bool is_binary)
root.reset(new Scope(*this,true));
}
-
// ------------------------------------------------------------------------------------------------
Parser::~Parser()
{
+ // empty
}
-
// ------------------------------------------------------------------------------------------------
TokenPtr Parser::AdvanceToNextToken()
{
last = current;
if (cursor == tokens.end()) {
current = NULL;
- }
- else {
+ } else {
current = *cursor++;
}
return current;
}
-
// ------------------------------------------------------------------------------------------------
TokenPtr Parser::CurrentToken() const
{
return current;
}
-
// ------------------------------------------------------------------------------------------------
TokenPtr Parser::LastToken() const
{
return last;
}
-
// ------------------------------------------------------------------------------------------------
uint64_t ParseTokenAsID(const Token& t, const char*& err_out)
{
@@ -286,7 +280,7 @@ uint64_t ParseTokenAsID(const Token& t, const char*& err_out)
unsigned int length = static_cast<unsigned int>(t.end() - t.begin());
ai_assert(length > 0);
- const char* out;
+ const char* out = nullptr;
const uint64_t id = strtoul10_64(t.begin(),&out,&length);
if (out > t.end()) {
err_out = "failed to parse ID (text)";
@@ -296,7 +290,6 @@ uint64_t ParseTokenAsID(const Token& t, const char*& err_out)
return id;
}
-
// ------------------------------------------------------------------------------------------------
size_t ParseTokenAsDim(const Token& t, const char*& err_out)
{
@@ -333,7 +326,7 @@ size_t ParseTokenAsDim(const Token& t, const char*& err_out)
return 0;
}
- const char* out;
+ const char* out = nullptr;
const size_t id = static_cast<size_t>(strtoul10_64(t.begin() + 1,&out,&length));
if (out > t.end()) {
err_out = "failed to parse ID";
@@ -446,7 +439,7 @@ int64_t ParseTokenAsInt64(const Token& t, const char*& err_out)
unsigned int length = static_cast<unsigned int>(t.end() - t.begin());
ai_assert(length > 0);
- const char* out;
+ const char* out = nullptr;
const int64_t id = strtol10_64(t.begin(), &out, &length);
if (out > t.end()) {
err_out = "failed to parse Int64 (text)";
@@ -542,18 +535,18 @@ void ReadBinaryDataArray(char type, uint32_t count, const char*& data, const cha
uint32_t stride = 0;
switch(type)
{
- case 'f':
- case 'i':
- stride = 4;
- break;
-
- case 'd':
- case 'l':
- stride = 8;
- break;
-
- default:
- ai_assert(false);
+ case 'f':
+ case 'i':
+ stride = 4;
+ break;
+
+ case 'd':
+ case 'l':
+ stride = 8;
+ break;
+
+ default:
+ ai_assert(false);
};
const uint32_t full_length = stride * count;
@@ -1202,6 +1195,14 @@ std::string ParseTokenAsString(const Token& t)
return i;
}
+bool HasElement( const Scope& sc, const std::string& index ) {
+ const Element* el = sc[ index ];
+ if ( nullptr == el ) {
+ return false;
+ }
+
+ return true;
+}
// ------------------------------------------------------------------------------------------------
// extract a required element from a scope, abort if the element cannot be found
diff --git a/code/FBXParser.h b/code/FBXParser.h
index d2b2c8bb5..389da3fed 100644
--- a/code/FBXParser.h
+++ b/code/FBXParser.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -48,7 +49,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <stdint.h>
#include <map>
#include <memory>
-#include "LogAux.h"
+#include <assimp/LogAux.h>
+#include <assimp/fast_atof.h>
#include "FBXCompileConfig.h"
#include "FBXTokenizer.h"
@@ -84,12 +86,9 @@ typedef std::pair<ElementMap::const_iterator,ElementMap::const_iterator> Element
class Element
{
public:
-
Element(const Token& key_token, Parser& parser);
~Element();
-public:
-
const Scope* Compound() const {
return compound.get();
}
@@ -103,14 +102,11 @@ public:
}
private:
-
const Token& key_token;
TokenList tokens;
std::unique_ptr<Scope> compound;
};
-
-
/** FBX data entity that consists of a 'scope', a collection
* of not necessarily unique #Element instances.
*
@@ -124,19 +120,26 @@ private:
* @endverbatim */
class Scope
{
-
public:
-
Scope(Parser& parser, bool topLevel = false);
~Scope();
-public:
-
const Element* operator[] (const std::string& index) const {
ElementMap::const_iterator it = elements.find(index);
return it == elements.end() ? NULL : (*it).second;
}
+ const Element* FindElementCaseInsensitive(const std::string& elementName) const {
+ const char* elementNameCStr = elementName.c_str();
+ for (auto element = elements.begin(); element != elements.end(); ++element)
+ {
+ if (!ASSIMP_strincmp(element->first.c_str(), elementNameCStr, MAXLEN)) {
+ return element->second;
+ }
+ }
+ return NULL;
+ }
+
ElementCollection GetCollection(const std::string& index) const {
return elements.equal_range(index);
}
@@ -146,28 +149,23 @@ public:
}
private:
-
ElementMap elements;
};
-
/** FBX parsing class, takes a list of input tokens and generates a hierarchy
* of nested #Scope instances, representing the fbx DOM.*/
class Parser
{
public:
-
/** Parse given a token list. Does not take ownership of the tokens -
* the objects must persist during the entire parser lifetime */
Parser (const TokenList& tokens,bool is_binary);
~Parser();
-public:
const Scope& GetRootScope() const {
return *root.get();
}
-
bool IsBinary() const {
return is_binary;
}
@@ -177,11 +175,9 @@ private:
friend class Element;
TokenPtr AdvanceToNextToken();
-
TokenPtr LastToken() const;
TokenPtr CurrentToken() const;
-
private:
const TokenList& tokens;
@@ -202,7 +198,6 @@ int ParseTokenAsInt(const Token& t, const char*& err_out);
int64_t ParseTokenAsInt64(const Token& t, const char*& err_out);
std::string ParseTokenAsString(const Token& t, const char*& err_out);
-
/* wrapper around ParseTokenAsXXX() with DOMError handling */
uint64_t ParseTokenAsID(const Token& t);
size_t ParseTokenAsDim(const Token& t);
@@ -221,7 +216,7 @@ void ParseVectorDataArray(std::vector<unsigned int>& out, const Element& el);
void ParseVectorDataArray(std::vector<uint64_t>& out, const Element& e);
void ParseVectorDataArray(std::vector<int64_t>& out, const Element& el);
-
+bool HasElement( const Scope& sc, const std::string& index );
// extract a required element from a scope, abort if the element cannot be found
const Element& GetRequiredElement(const Scope& sc, const std::string& index, const Element* element = NULL);
@@ -231,8 +226,6 @@ const Scope& GetRequiredScope(const Element& el);
// get token at a particular index
const Token& GetRequiredToken(const Element& el, unsigned int index);
-
-
// read a 4x4 matrix from an array of 16 floats
aiMatrix4x4 ReadMatrix(const Element& element);
diff --git a/code/FBXProperties.cpp b/code/FBXProperties.cpp
index 774beac3c..ca89743ca 100644
--- a/code/FBXProperties.cpp
+++ b/code/FBXProperties.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -108,7 +109,7 @@ Property* ReadTypedProperty(const Element& element)
ParseTokenAsFloat(*tok[6]))
);
}
- else if (!strcmp(cs,"double") || !strcmp(cs,"Number") || !strcmp(cs,"Float") || !strcmp(cs,"FieldOfView")) {
+ else if (!strcmp(cs,"double") || !strcmp(cs,"Number") || !strcmp(cs,"Float") || !strcmp(cs,"FieldOfView") || !strcmp( cs, "UnitScaleFactor" ) ) {
return new TypedProperty<float>(ParseTokenAsFloat(*tok[4]));
}
return NULL;
@@ -138,7 +139,6 @@ PropertyTable::PropertyTable()
{
}
-
// ------------------------------------------------------------------------------------------------
PropertyTable::PropertyTable(const Element& element, std::shared_ptr<const PropertyTable> templateProps)
: templateProps(templateProps)
@@ -229,8 +229,6 @@ DirectPropertyMap PropertyTable::GetUnparsedProperties() const
return result;
}
-
-
} //! FBX
} //! Assimp
diff --git a/code/FBXProperties.h b/code/FBXProperties.h
index a89a858be..404e04deb 100644
--- a/code/FBXProperties.h
+++ b/code/FBXProperties.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -55,17 +56,14 @@ namespace FBX {
// Forward declarations
class Element;
-
/** Represents a dynamic property. Type info added by deriving classes,
* see #TypedProperty.
Example:
@verbatim
P: "ShininessExponent", "double", "Number", "",0.5
@endvebatim
-
*/
-class Property
-{
+class Property {
protected:
Property();
@@ -79,17 +77,14 @@ public:
}
};
-
template<typename T>
-class TypedProperty : public Property
-{
+class TypedProperty : public Property {
public:
explicit TypedProperty(const T& value)
- : value(value)
- {
+ : value(value) {
+ // empty
}
-public:
const T& Value() const {
return value;
}
@@ -100,21 +95,19 @@ private:
typedef std::fbx_unordered_map<std::string,std::shared_ptr<Property> > DirectPropertyMap;
-typedef std::fbx_unordered_map<std::string,const Property*> PropertyMap;
-typedef std::fbx_unordered_map<std::string,const Element*> LazyPropertyMap;
+typedef std::fbx_unordered_map<std::string,const Property*> PropertyMap;
+typedef std::fbx_unordered_map<std::string,const Element*> LazyPropertyMap;
/**
* Represents a property table as can be found in the newer FBX files (Properties60, Properties70)
*/
-class PropertyTable
-{
+class PropertyTable {
public:
// in-memory property table with no source element
PropertyTable();
PropertyTable(const Element& element, std::shared_ptr<const PropertyTable> templateProps);
~PropertyTable();
-public:
const Property* Get(const std::string& name) const;
// PropertyTable's need not be coupled with FBX elements so this can be NULL
@@ -135,41 +128,49 @@ private:
const Element* const element;
};
-
// ------------------------------------------------------------------------------------------------
template <typename T>
-inline T PropertyGet(const PropertyTable& in, const std::string& name,
- const T& defaultValue)
-{
+inline
+T PropertyGet(const PropertyTable& in, const std::string& name, const T& defaultValue) {
const Property* const prop = in.Get(name);
- if(!prop) {
+ if( nullptr == prop) {
return defaultValue;
}
// strong typing, no need to be lenient
const TypedProperty<T>* const tprop = prop->As< TypedProperty<T> >();
- if(!tprop) {
+ if( nullptr == tprop) {
return defaultValue;
}
return tprop->Value();
}
-
// ------------------------------------------------------------------------------------------------
template <typename T>
-inline T PropertyGet(const PropertyTable& in, const std::string& name,
- bool& result)
-{
- const Property* const prop = in.Get(name);
- if(!prop) {
- result = false;
- return T();
+inline
+T PropertyGet(const PropertyTable& in, const std::string& name, bool& result, bool useTemplate=false ) {
+ const Property* prop = in.Get(name);
+ if( nullptr == prop) {
+ if ( ! useTemplate ) {
+ result = false;
+ return T();
+ }
+ const PropertyTable* templ = in.TemplateProps();
+ if ( nullptr == templ ) {
+ result = false;
+ return T();
+ }
+ prop = templ->Get(name);
+ if ( nullptr == prop ) {
+ result = false;
+ return T();
+ }
}
// strong typing, no need to be lenient
const TypedProperty<T>* const tprop = prop->As< TypedProperty<T> >();
- if(!tprop) {
+ if( nullptr == tprop) {
result = false;
return T();
}
@@ -178,7 +179,6 @@ inline T PropertyGet(const PropertyTable& in, const std::string& name,
return tprop->Value();
}
-
} //! FBX
} //! Assimp
diff --git a/code/FBXTokenizer.cpp b/code/FBXTokenizer.cpp
index 881dcf53d..c9dd1697a 100644
--- a/code/FBXTokenizer.cpp
+++ b/code/FBXTokenizer.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -48,11 +49,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// tab width for logging columns
#define ASSIMP_FBX_TAB_WIDTH 4
-#include "ParsingUtils.h"
+#include <assimp/ParsingUtils.h>
#include "FBXTokenizer.h"
#include "FBXUtil.h"
-#include "Exceptional.h"
+#include <assimp/Exceptional.h>
namespace Assimp {
namespace FBX {
@@ -76,13 +77,11 @@ Token::Token(const char* sbegin, const char* send, TokenType type, unsigned int
ai_assert(static_cast<size_t>(send-sbegin) > 0);
}
-
// ------------------------------------------------------------------------------------------------
Token::~Token()
{
}
-
namespace {
// ------------------------------------------------------------------------------------------------
diff --git a/code/FBXTokenizer.h b/code/FBXTokenizer.h
index f8af0ca16..e93982617 100644
--- a/code/FBXTokenizer.h
+++ b/code/FBXTokenizer.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -101,7 +102,6 @@ public:
return std::string(begin(),end());
}
-public:
bool IsBinary() const {
return column == BINARY_MARKER;
}
diff --git a/code/FBXUtil.cpp b/code/FBXUtil.cpp
index 4fd91e18f..992c30efc 100644
--- a/code/FBXUtil.cpp
+++ b/code/FBXUtil.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -46,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "FBXUtil.h"
#include "FBXTokenizer.h"
-#include "TinyFormatter.h"
+#include <assimp/TinyFormatter.h>
#include <string>
#ifndef ASSIMP_BUILD_NO_FBX_IMPORTER
diff --git a/code/FBXUtil.h b/code/FBXUtil.h
index c1d9459b3..caea7f115 100644
--- a/code/FBXUtil.h
+++ b/code/FBXUtil.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/FIReader.cpp b/code/FIReader.cpp
new file mode 100755
index 000000000..bdc447b34
--- /dev/null
+++ b/code/FIReader.cpp
@@ -0,0 +1,1834 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2018, assimp 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 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 FIReader.cpp
+/// \brief Reader for Fast Infoset encoded binary XML files.
+/// \date 2017
+/// \author Patrick Daehne
+
+#ifndef ASSIMP_BUILD_NO_X3D_IMPORTER
+
+#include "FIReader.hpp"
+#include <assimp/StringUtils.h>
+
+// Workaround for issue #1361
+// https://github.com/assimp/assimp/issues/1361
+#ifdef __ANDROID__
+# define _GLIBCXX_USE_C99 1
+#endif
+
+#include <assimp/Exceptional.h>
+#include <assimp/IOStream.hpp>
+#include <assimp/types.h>
+#include <assimp/MemoryIOWrapper.h>
+#include <assimp/irrXMLWrapper.h>
+#include "../contrib/utf8cpp/source/utf8.h"
+#include <assimp/fast_atof.h>
+#include <stack>
+#include <map>
+#include <iostream>
+#include <sstream>
+#include <iomanip>
+
+namespace Assimp {
+
+static const std::string parseErrorMessage = "Fast Infoset parse error";
+
+static const char *xmlDeclarations[] = {
+ "<?xml encoding='finf'?>",
+ "<?xml encoding='finf' standalone='yes'?>",
+ "<?xml encoding='finf' standalone='no'?>",
+ "<?xml version='1.0' encoding='finf'?>",
+ "<?xml version='1.0' encoding='finf' standalone='yes'?>",
+ "<?xml version='1.0' encoding='finf' standalone='no'?>",
+ "<?xml version='1.1' encoding='finf'?>",
+ "<?xml version='1.1' encoding='finf' standalone='yes'?>",
+ "<?xml version='1.1' encoding='finf' standalone='no'?>"
+};
+
+static size_t parseMagic(const uint8_t *data, const uint8_t *dataEnd) {
+ if (dataEnd - data < 4) {
+ return 0;
+ }
+ uint32_t magic = (data[0] << 24) | (data[1] << 16) | (data[2] << 8) | data[3];
+ switch (magic) {
+ case 0xe0000001:
+ return 4;
+ case 0x3c3f786d: // "<?xm"
+ {
+ size_t xmlDeclarationsLength = sizeof(xmlDeclarations) / sizeof(xmlDeclarations[0]);
+ for (size_t i = 0; i < xmlDeclarationsLength; ++i) {
+ auto xmlDeclaration = xmlDeclarations[i];
+ ptrdiff_t xmlDeclarationLength = strlen(xmlDeclaration);
+ if ((dataEnd - data >= xmlDeclarationLength) && (memcmp(xmlDeclaration, data, xmlDeclarationLength) == 0)) {
+ data += xmlDeclarationLength;
+ if (dataEnd - data < 4) {
+ return 0;
+ }
+ magic = (data[0] << 24) | (data[1] << 16) | (data[2] << 8) | data[3];
+ return magic == 0xe0000001 ? xmlDeclarationLength + 4 : 0;
+ }
+ }
+ return 0;
+ }
+ default:
+ return 0;
+ }
+}
+
+static std::string parseUTF8String(const uint8_t *data, size_t len) {
+ return std::string((char*)data, len);
+}
+
+static std::string parseUTF16String(const uint8_t *data, size_t len) {
+ if (len & 1) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ size_t numShorts = len / 2;
+ std::vector<short> utf16;
+ utf16.reserve(numShorts);
+ for (size_t i = 0; i < numShorts; ++i) {
+ short v = (data[0] << 8) | data[1];
+ utf16.push_back(v);
+ data += 2;
+ }
+ std::string result;
+ utf8::utf16to8(utf16.begin(), utf16.end(), back_inserter(result));
+ return result;
+}
+
+struct FIStringValueImpl: public FIStringValue {
+ inline FIStringValueImpl(std::string &&value_) { value = std::move(value_); }
+ virtual const std::string &toString() const /*override*/ { return value; }
+};
+
+std::shared_ptr<FIStringValue> FIStringValue::create(std::string &&value) {
+ return std::make_shared<FIStringValueImpl>(std::move(value));
+}
+
+struct FIHexValueImpl: public FIHexValue {
+ mutable std::string strValue;
+ mutable bool strValueValid;
+ inline FIHexValueImpl(std::vector<uint8_t> &&value_): strValueValid(false) { value = std::move(value_); }
+ virtual const std::string &toString() const /*override*/ {
+ if (!strValueValid) {
+ strValueValid = true;
+ std::ostringstream os;
+ os << std::hex << std::uppercase << std::setfill('0');
+ std::for_each(value.begin(), value.end(), [&](uint8_t c) { os << std::setw(2) << static_cast<int>(c); });
+ strValue = os.str();
+ }
+ return strValue;
+ };
+};
+
+std::shared_ptr<FIHexValue> FIHexValue::create(std::vector<uint8_t> &&value) {
+ return std::make_shared<FIHexValueImpl>(std::move(value));
+}
+
+struct FIBase64ValueImpl: public FIBase64Value {
+ mutable std::string strValue;
+ mutable bool strValueValid;
+ inline FIBase64ValueImpl(std::vector<uint8_t> &&value_): strValueValid(false) { value = std::move(value_); }
+ virtual const std::string &toString() const /*override*/ {
+ if (!strValueValid) {
+ strValueValid = true;
+ std::ostringstream os;
+ uint8_t c1 = 0, c2;
+ int imod3 = 0;
+ std::vector<uint8_t>::size_type valueSize = value.size();
+ for (std::vector<uint8_t>::size_type i = 0; i < valueSize; ++i) {
+ c2 = value[i];
+ switch (imod3) {
+ case 0:
+ os << basis_64[c2 >> 2];
+ imod3 = 1;
+ break;
+ case 1:
+ os << basis_64[((c1 & 0x03) << 4) | ((c2 & 0xf0) >> 4)];
+ imod3 = 2;
+ break;
+ case 2:
+ os << basis_64[((c1 & 0x0f) << 2) | ((c2 & 0xc0) >> 6)] << basis_64[c2 & 0x3f];
+ imod3 = 0;
+ break;
+ }
+ c1 = c2;
+ }
+ switch (imod3) {
+ case 1:
+ os << basis_64[(c1 & 0x03) << 4] << "==";
+ break;
+ case 2:
+ os << basis_64[(c1 & 0x0f) << 2] << '=';
+ break;
+ }
+ strValue = os.str();
+ }
+ return strValue;
+ };
+ static const char basis_64[];
+};
+
+const char FIBase64ValueImpl::basis_64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+
+std::shared_ptr<FIBase64Value> FIBase64Value::create(std::vector<uint8_t> &&value) {
+ return std::make_shared<FIBase64ValueImpl>(std::move(value));
+}
+
+struct FIShortValueImpl: public FIShortValue {
+ mutable std::string strValue;
+ mutable bool strValueValid;
+ inline FIShortValueImpl(std::vector<int16_t> &&value_): strValueValid(false) { value = std::move(value_); }
+ virtual const std::string &toString() const /*override*/ {
+ if (!strValueValid) {
+ strValueValid = true;
+ std::ostringstream os;
+ int n = 0;
+ std::for_each(value.begin(), value.end(), [&](int16_t s) { if (++n > 1) os << ' '; os << s; });
+ strValue = os.str();
+ }
+ return strValue;
+ }
+};
+
+std::shared_ptr<FIShortValue> FIShortValue::create(std::vector<int16_t> &&value) {
+ return std::make_shared<FIShortValueImpl>(std::move(value));
+}
+
+struct FIIntValueImpl: public FIIntValue {
+ mutable std::string strValue;
+ mutable bool strValueValid;
+ inline FIIntValueImpl(std::vector<int32_t> &&value_): strValueValid(false) { value = std::move(value_); }
+ virtual const std::string &toString() const /*override*/ {
+ if (!strValueValid) {
+ strValueValid = true;
+ std::ostringstream os;
+ int n = 0;
+ std::for_each(value.begin(), value.end(), [&](int32_t i) { if (++n > 1) os << ' '; os << i; });
+ strValue = os.str();
+ }
+ return strValue;
+ };
+};
+
+std::shared_ptr<FIIntValue> FIIntValue::create(std::vector<int32_t> &&value) {
+ return std::make_shared<FIIntValueImpl>(std::move(value));
+}
+
+struct FILongValueImpl: public FILongValue {
+ mutable std::string strValue;
+ mutable bool strValueValid;
+ inline FILongValueImpl(std::vector<int64_t> &&value_): strValueValid(false) { value = std::move(value_); }
+ virtual const std::string &toString() const /*override*/ {
+ if (!strValueValid) {
+ strValueValid = true;
+ std::ostringstream os;
+ int n = 0;
+ std::for_each(value.begin(), value.end(), [&](int64_t l) { if (++n > 1) os << ' '; os << l; });
+ strValue = os.str();
+ }
+ return strValue;
+ };
+};
+
+std::shared_ptr<FILongValue> FILongValue::create(std::vector<int64_t> &&value) {
+ return std::make_shared<FILongValueImpl>(std::move(value));
+}
+
+struct FIBoolValueImpl: public FIBoolValue {
+ mutable std::string strValue;
+ mutable bool strValueValid;
+ inline FIBoolValueImpl(std::vector<bool> &&value_): strValueValid(false) { value = std::move(value_); }
+ virtual const std::string &toString() const /*override*/ {
+ if (!strValueValid) {
+ strValueValid = true;
+ std::ostringstream os;
+ os << std::boolalpha;
+ int n = 0;
+ std::for_each(value.begin(), value.end(), [&](bool b) { if (++n > 1) os << ' '; os << b; });
+ strValue = os.str();
+ }
+ return strValue;
+ };
+};
+
+std::shared_ptr<FIBoolValue> FIBoolValue::create(std::vector<bool> &&value) {
+ return std::make_shared<FIBoolValueImpl>(std::move(value));
+}
+
+struct FIFloatValueImpl: public FIFloatValue {
+ mutable std::string strValue;
+ mutable bool strValueValid;
+ inline FIFloatValueImpl(std::vector<float> &&value_): strValueValid(false) { value = std::move(value_); }
+ virtual const std::string &toString() const /*override*/ {
+ if (!strValueValid) {
+ strValueValid = true;
+ std::ostringstream os;
+ int n = 0;
+ std::for_each(value.begin(), value.end(), [&](float f) { if (++n > 1) os << ' '; os << f; });
+ strValue = os.str();
+ }
+ return strValue;
+ }
+};
+
+std::shared_ptr<FIFloatValue> FIFloatValue::create(std::vector<float> &&value) {
+ return std::make_shared<FIFloatValueImpl>(std::move(value));
+}
+
+struct FIDoubleValueImpl: public FIDoubleValue {
+ mutable std::string strValue;
+ mutable bool strValueValid;
+ inline FIDoubleValueImpl(std::vector<double> &&value_): strValueValid(false) { value = std::move(value_); }
+ virtual const std::string &toString() const /*override*/ {
+ if (!strValueValid) {
+ strValueValid = true;
+ std::ostringstream os;
+ int n = 0;
+ std::for_each(value.begin(), value.end(), [&](double d) { if (++n > 1) os << ' '; os << d; });
+ strValue = os.str();
+ }
+ return strValue;
+ }
+};
+
+std::shared_ptr<FIDoubleValue> FIDoubleValue::create(std::vector<double> &&value) {
+ return std::make_shared<FIDoubleValueImpl>(std::move(value));
+}
+
+struct FIUUIDValueImpl: public FIUUIDValue {
+ mutable std::string strValue;
+ mutable bool strValueValid;
+ inline FIUUIDValueImpl(std::vector<uint8_t> &&value_): strValueValid(false) { value = std::move(value_); }
+ virtual const std::string &toString() const /*override*/ {
+ if (!strValueValid) {
+ strValueValid = true;
+ std::ostringstream os;
+ os << std::hex << std::uppercase << std::setfill('0');
+ std::vector<uint8_t>::size_type valueSize = value.size();
+ for (std::vector<uint8_t>::size_type i = 0; i < valueSize; ++i) {
+ switch (i & 15) {
+ case 0:
+ if (i > 0) {
+ os << ' ';
+ }
+ os << std::setw(2) << static_cast<int>(value[i]);
+ break;
+ case 4:
+ case 6:
+ case 8:
+ case 10:
+ os << '-';
+ // intentionally fall through!
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 7:
+ case 9:
+ case 11:
+ case 12:
+ case 13:
+ case 14:
+ case 15:
+ os << std::setw(2) << static_cast<int>(value[i]);
+ break;
+ }
+ }
+ strValue = os.str();
+ }
+ return strValue;
+ };
+};
+
+std::shared_ptr<FIUUIDValue> FIUUIDValue::create(std::vector<uint8_t> &&value) {
+ return std::make_shared<FIUUIDValueImpl>(std::move(value));
+}
+
+struct FICDATAValueImpl: public FICDATAValue {
+ inline FICDATAValueImpl(std::string &&value_) { value = std::move(value_); }
+ virtual const std::string &toString() const /*override*/ { return value; }
+};
+
+std::shared_ptr<FICDATAValue> FICDATAValue::create(std::string &&value) {
+ return std::make_shared<FICDATAValueImpl>(std::move(value));
+}
+
+struct FIHexDecoder: public FIDecoder {
+ virtual std::shared_ptr<const FIValue> decode(const uint8_t *data, size_t len) /*override*/ {
+ return FIHexValue::create(std::vector<uint8_t>(data, data + len));
+ }
+};
+
+struct FIBase64Decoder: public FIDecoder {
+ virtual std::shared_ptr<const FIValue> decode(const uint8_t *data, size_t len) /*override*/ {
+ return FIBase64Value::create(std::vector<uint8_t>(data, data + len));
+ }
+};
+
+struct FIShortDecoder: public FIDecoder {
+ virtual std::shared_ptr<const FIValue> decode(const uint8_t *data, size_t len) /*override*/ {
+ if (len & 1) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ std::vector<int16_t> value;
+ size_t numShorts = len / 2;
+ value.reserve(numShorts);
+ for (size_t i = 0; i < numShorts; ++i) {
+ int16_t v = (data[0] << 8) | data[1];
+ value.push_back(v);
+ data += 2;
+ }
+ return FIShortValue::create(std::move(value));
+ }
+};
+
+struct FIIntDecoder: public FIDecoder {
+ virtual std::shared_ptr<const FIValue> decode(const uint8_t *data, size_t len) /*override*/ {
+ if (len & 3) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ std::vector<int32_t> value;
+ size_t numInts = len / 4;
+ value.reserve(numInts);
+ for (size_t i = 0; i < numInts; ++i) {
+ int32_t v = (data[0] << 24) | (data[1] << 16) | (data[2] << 8) | data[3];
+ value.push_back(v);
+ data += 4;
+ }
+ return FIIntValue::create(std::move(value));
+ }
+};
+
+struct FILongDecoder: public FIDecoder {
+ virtual std::shared_ptr<const FIValue> decode(const uint8_t *data, size_t len) /*override*/ {
+ if (len & 7) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ std::vector<int64_t> value;
+ size_t numLongs = len / 8;
+ value.reserve(numLongs);
+ for (size_t i = 0; i < numLongs; ++i) {
+ int64_t b0 = data[0], b1 = data[1], b2 = data[2], b3 = data[3], b4 = data[4], b5 = data[5], b6 = data[6], b7 = data[7];
+ int64_t v = (b0 << 56) | (b1 << 48) | (b2 << 40) | (b3 << 32) | (b4 << 24) | (b5 << 16) | (b6 << 8) | b7;
+ value.push_back(v);
+ data += 8;
+ }
+ return FILongValue::create(std::move(value));
+ }
+};
+
+struct FIBoolDecoder: public FIDecoder {
+ virtual std::shared_ptr<const FIValue> decode(const uint8_t *data, size_t len) /*override*/ {
+ if (len < 1) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ std::vector<bool> value;
+ uint8_t b = *data++;
+ size_t unusedBits = b >> 4;
+ size_t numBools = (len * 8) - 4 - unusedBits;
+ value.reserve(numBools);
+ uint8_t mask = 1 << 3;
+ for (size_t i = 0; i < numBools; ++i) {
+ if (!mask) {
+ mask = 1 << 7;
+ b = *data++;
+ }
+ value.push_back((b & mask) != 0);
+ }
+ return FIBoolValue::create(std::move(value));
+ }
+};
+
+struct FIFloatDecoder: public FIDecoder {
+ virtual std::shared_ptr<const FIValue> decode(const uint8_t *data, size_t len) /*override*/ {
+ if (len & 3) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ std::vector<float> value;
+ size_t numFloats = len / 4;
+ value.reserve(numFloats);
+ for (size_t i = 0; i < numFloats; ++i) {
+ int v = (data[0] << 24) | (data[1] << 16) | (data[2] << 8) | data[3];
+ float f;
+ memcpy(&f, &v, 4);
+ value.push_back(f);
+ data += 4;
+ }
+ return FIFloatValue::create(std::move(value));
+ }
+};
+
+struct FIDoubleDecoder: public FIDecoder {
+ virtual std::shared_ptr<const FIValue> decode(const uint8_t *data, size_t len) /*override*/ {
+ if (len & 7) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ std::vector<double> value;
+ size_t numDoubles = len / 8;
+ value.reserve(numDoubles);
+ for (size_t i = 0; i < numDoubles; ++i) {
+ long long b0 = data[0], b1 = data[1], b2 = data[2], b3 = data[3], b4 = data[4], b5 = data[5], b6 = data[6], b7 = data[7];
+ long long v = (b0 << 56) | (b1 << 48) | (b2 << 40) | (b3 << 32) | (b4 << 24) | (b5 << 16) | (b6 << 8) | b7;
+ double f;
+ memcpy(&f, &v, 8);
+ value.push_back(f);
+ data += 8;
+ }
+ return FIDoubleValue::create(std::move(value));
+ }
+};
+
+struct FIUUIDDecoder: public FIDecoder {
+ virtual std::shared_ptr<const FIValue> decode(const uint8_t *data, size_t len) /*override*/ {
+ if (len & 15) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ return FIUUIDValue::create(std::vector<uint8_t>(data, data + len));
+ }
+};
+
+struct FICDATADecoder: public FIDecoder {
+ virtual std::shared_ptr<const FIValue> decode(const uint8_t *data, size_t len) /*override*/ {
+ return FICDATAValue::create(parseUTF8String(data, len));
+ }
+};
+
+class CFIReaderImpl: public FIReader {
+public:
+
+ CFIReaderImpl(std::unique_ptr<uint8_t[]> data_, size_t size):
+ data(std::move(data_)), dataP(data.get()), dataEnd(data.get() + size), currentNodeType(irr::io::EXN_NONE),
+ emptyElement(false), headerPending(true), terminatorPending(false)
+ {}
+
+ virtual ~CFIReaderImpl() {}
+
+ virtual bool read() /*override*/ {
+ if (headerPending) {
+ headerPending = false;
+ parseHeader();
+ }
+ if (terminatorPending) {
+ terminatorPending = false;
+ if (elementStack.empty()) {
+ return false;
+ }
+ else {
+ nodeName = elementStack.top();
+ elementStack.pop();
+ currentNodeType = nodeName.empty() ? irr::io::EXN_UNKNOWN : irr::io::EXN_ELEMENT_END;
+ return true;
+ }
+ }
+ if (dataP >= dataEnd) {
+ return false;
+ }
+ uint8_t b = *dataP;
+ if (b < 0x80) { // Element (C.2.11.2, C.3.7.2)
+ // C.3
+ parseElement();
+ return true;
+ }
+ else if (b < 0xc0) { // Characters (C.3.7.5)
+ // C.7
+ auto chars = parseNonIdentifyingStringOrIndex3(vocabulary.charactersTable);
+ nodeName = chars->toString();
+ currentNodeType = irr::io::EXN_TEXT;
+ return true;
+ }
+ else if (b < 0xe0) {
+ if ((b & 0xfc) == 0xc4) { // DTD (C.2.11.5)
+ // C.9
+ ++dataP;
+ if (b & 0x02) {
+ /*const std::string &systemID =*/ parseIdentifyingStringOrIndex(vocabulary.otherURITable);
+ }
+ if (b & 0x01) {
+ /*const std::string &publicID =*/ parseIdentifyingStringOrIndex(vocabulary.otherURITable);
+ }
+ elementStack.push(EmptyString);
+ currentNodeType = irr::io::EXN_UNKNOWN;
+ return true;
+ }
+ else if ((b & 0xfc) == 0xc8) { // Unexpanded entity reference (C.3.7.4)
+ // C.6
+ ++dataP;
+ /*const std::string &name =*/ parseIdentifyingStringOrIndex(vocabulary.otherNCNameTable);
+ if (b & 0x02) {
+ /*const std::string &systemID =*/ parseIdentifyingStringOrIndex(vocabulary.otherURITable);
+ }
+ if (b & 0x01) {
+ /*const std::string &publicID =*/ parseIdentifyingStringOrIndex(vocabulary.otherURITable);
+ }
+ currentNodeType = irr::io::EXN_UNKNOWN;
+ return true;
+ }
+ }
+ else if (b < 0xf0) {
+ if (b == 0xe1) { // Processing instruction (C.2.11.3, C.3.7.3)
+ // C.5
+ ++dataP;
+ /*const std::string &target =*/ parseIdentifyingStringOrIndex(vocabulary.otherNCNameTable);
+ if (dataEnd - dataP < 1) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ /*std::shared_ptr<const FIValue> data =*/ parseNonIdentifyingStringOrIndex1(vocabulary.otherStringTable);
+ currentNodeType = irr::io::EXN_UNKNOWN;
+ return true;
+ }
+ else if (b == 0xe2) { // Comment (C.2.11.4, C.3.7.6)
+ // C.8
+ ++dataP;
+ if (dataEnd - dataP < 1) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ std::shared_ptr<const FIValue> comment = parseNonIdentifyingStringOrIndex1(vocabulary.otherStringTable);
+ nodeName = comment->toString();
+ currentNodeType = irr::io::EXN_COMMENT;
+ return true;
+ }
+ }
+ else { // Terminator (C.2.12, C.3.8)
+ ++dataP;
+ if (b == 0xff) {
+ terminatorPending = true;
+ }
+ if (elementStack.empty()) {
+ return false;
+ }
+ else {
+ nodeName = elementStack.top();
+ elementStack.pop();
+ currentNodeType = nodeName.empty() ? irr::io::EXN_UNKNOWN : irr::io::EXN_ELEMENT_END;
+ return true;
+ }
+ }
+ throw DeadlyImportError(parseErrorMessage);
+ }
+
+ virtual irr::io::EXML_NODE getNodeType() const /*override*/ {
+ return currentNodeType;
+ }
+
+ virtual int getAttributeCount() const /*override*/ {
+ return static_cast<int>(attributes.size());
+ }
+
+ virtual const char* getAttributeName(int idx) const /*override*/ {
+ if (idx < 0 || idx >= (int)attributes.size()) {
+ return nullptr;
+ }
+ return attributes[idx].name.c_str();
+ }
+
+ virtual const char* getAttributeValue(int idx) const /*override*/ {
+ if (idx < 0 || idx >= (int)attributes.size()) {
+ return nullptr;
+ }
+ return attributes[idx].value->toString().c_str();
+ }
+
+ virtual const char* getAttributeValue(const char* name) const /*override*/ {
+ const Attribute* attr = getAttributeByName(name);
+ if (!attr) {
+ return nullptr;
+ }
+ return attr->value->toString().c_str();
+ }
+
+ virtual const char* getAttributeValueSafe(const char* name) const /*override*/ {
+ const Attribute* attr = getAttributeByName(name);
+ if (!attr) {
+ return EmptyString.c_str();
+ }
+ return attr->value->toString().c_str();
+ }
+
+ virtual int getAttributeValueAsInt(const char* name) const /*override*/ {
+ const Attribute* attr = getAttributeByName(name);
+ if (!attr) {
+ return 0;
+ }
+ std::shared_ptr<const FIIntValue> intValue = std::dynamic_pointer_cast<const FIIntValue>(attr->value);
+ if (intValue) {
+ return intValue->value.size() == 1 ? intValue->value.front() : 0;
+ }
+ return atoi(attr->value->toString().c_str());
+ }
+
+ virtual int getAttributeValueAsInt(int idx) const /*override*/ {
+ if (idx < 0 || idx >= (int)attributes.size()) {
+ return 0;
+ }
+ std::shared_ptr<const FIIntValue> intValue = std::dynamic_pointer_cast<const FIIntValue>(attributes[idx].value);
+ if (intValue) {
+ return intValue->value.size() == 1 ? intValue->value.front() : 0;
+ }
+ return atoi(attributes[idx].value->toString().c_str());
+ }
+
+ virtual float getAttributeValueAsFloat(const char* name) const /*override*/ {
+ const Attribute* attr = getAttributeByName(name);
+ if (!attr) {
+ return 0;
+ }
+ std::shared_ptr<const FIFloatValue> floatValue = std::dynamic_pointer_cast<const FIFloatValue>(attr->value);
+ if (floatValue) {
+ return floatValue->value.size() == 1 ? floatValue->value.front() : 0;
+ }
+
+ return fast_atof(attr->value->toString().c_str());
+ }
+
+ virtual float getAttributeValueAsFloat(int idx) const /*override*/ {
+ if (idx < 0 || idx >= (int)attributes.size()) {
+ return 0;
+ }
+ std::shared_ptr<const FIFloatValue> floatValue = std::dynamic_pointer_cast<const FIFloatValue>(attributes[idx].value);
+ if (floatValue) {
+ return floatValue->value.size() == 1 ? floatValue->value.front() : 0;
+ }
+ return fast_atof(attributes[idx].value->toString().c_str());
+ }
+
+ virtual const char* getNodeName() const /*override*/ {
+ return nodeName.c_str();
+ }
+
+ virtual const char* getNodeData() const /*override*/ {
+ return nodeName.c_str();
+ }
+
+ virtual bool isEmptyElement() const /*override*/ {
+ return emptyElement;
+ }
+
+ virtual irr::io::ETEXT_FORMAT getSourceFormat() const /*override*/ {
+ return irr::io::ETF_UTF8;
+ }
+
+ virtual irr::io::ETEXT_FORMAT getParserFormat() const /*override*/ {
+ return irr::io::ETF_UTF8;
+ }
+
+ virtual std::shared_ptr<const FIValue> getAttributeEncodedValue(int idx) const /*override*/ {
+ if (idx < 0 || idx >= (int)attributes.size()) {
+ return nullptr;
+ }
+ return attributes[idx].value;
+ }
+
+ virtual std::shared_ptr<const FIValue> getAttributeEncodedValue(const char* name) const /*override*/ {
+ const Attribute* attr = getAttributeByName(name);
+ if (!attr) {
+ return nullptr;
+ }
+ return attr->value;
+ }
+
+ virtual void registerDecoder(const std::string &algorithmUri, std::unique_ptr<FIDecoder> decoder) /*override*/ {
+ decoderMap[algorithmUri] = std::move(decoder);
+ }
+
+ virtual void registerVocabulary(const std::string &vocabularyUri, const FIVocabulary *vocabulary) /*override*/ {
+ vocabularyMap[vocabularyUri] = vocabulary;
+ }
+
+private:
+
+ struct QName {
+ std::string prefix;
+ std::string uri;
+ std::string name;
+ inline QName() {}
+ inline QName(const FIQName &qname): prefix(qname.prefix ? qname.prefix : ""), uri(qname.uri ? qname.uri : ""), name(qname.name) {}
+ };
+
+ struct Attribute {
+ QName qname;
+ std::string name;
+ std::shared_ptr<const FIValue> value;
+ };
+
+ struct Vocabulary {
+ std::vector<std::string> restrictedAlphabetTable;
+ std::vector<std::string> encodingAlgorithmTable;
+ std::vector<std::string> prefixTable;
+ std::vector<std::string> namespaceNameTable;
+ std::vector<std::string> localNameTable;
+ std::vector<std::string> otherNCNameTable;
+ std::vector<std::string> otherURITable;
+ std::vector<std::shared_ptr<const FIValue>> attributeValueTable;
+ std::vector<std::shared_ptr<const FIValue>> charactersTable;
+ std::vector<std::shared_ptr<const FIValue>> otherStringTable;
+ std::vector<QName> elementNameTable;
+ std::vector<QName> attributeNameTable;
+ Vocabulary() {
+ prefixTable.push_back("xml");
+ namespaceNameTable.push_back("http://www.w3.org/XML/1998/namespace");
+ }
+ };
+
+ const Attribute* getAttributeByName(const char* name) const {
+ if (!name) {
+ return 0;
+ }
+ std::string n = name;
+ for (int i=0; i<(int)attributes.size(); ++i) {
+ if (attributes[i].name == n) {
+ return &attributes[i];
+ }
+ }
+ return 0;
+ }
+
+ size_t parseInt2() { // C.25
+ uint8_t b = *dataP++;
+ if (!(b & 0x40)) { // x0...... (C.25.2)
+ return b & 0x3f;
+ }
+ else if ((b & 0x60) == 0x40) { // x10..... ........ (C.25.3)
+ if (dataEnd - dataP > 0) {
+ return (((b & 0x1f) << 8) | *dataP++) + 0x40;
+ }
+ }
+ else if ((b & 0x70) == 0x60) { // x110.... ........ ........ (C.25.4)
+ if (dataEnd - dataP > 1) {
+ size_t result = (((b & 0x0f) << 16) | (dataP[0] << 8) | dataP[1]) + 0x2040;
+ dataP += 2;
+ return result;
+ }
+ }
+ throw DeadlyImportError(parseErrorMessage);
+ }
+
+ size_t parseInt3() { // C.27
+ uint8_t b = *dataP++;
+ if (!(b & 0x20)) { // xx0..... (C.27.2)
+ return b & 0x1f;
+ }
+ else if ((b & 0x38) == 0x20) { // xx100... ........ (C.27.3)
+ if (dataEnd - dataP > 0) {
+ return (((b & 0x07) << 8) | *dataP++) + 0x20;
+ }
+ }
+ else if ((b & 0x38) == 0x28) { // xx101... ........ ........ (C.27.4)
+ if (dataEnd - dataP > 1) {
+ size_t result = (((b & 0x07) << 16) | (dataP[0] << 8) | dataP[1]) + 0x820;
+ dataP += 2;
+ return result;
+ }
+ }
+ else if ((b & 0x3f) == 0x30) { // xx110000 0000.... ........ ........ (C.27.5)
+ if ((dataEnd - dataP > 2) && !(dataP[0] & 0xf0)) {
+ size_t result = (((dataP[0] & 0x0f) << 16) | (dataP[1] << 8) | dataP[2]) + 0x80820;
+ dataP += 3;
+ return result;
+ }
+ }
+ throw DeadlyImportError(parseErrorMessage);
+ }
+
+ size_t parseInt4() { // C.28
+ uint8_t b = *dataP++;
+ if (!(b & 0x10)) { // xxx0.... (C.28.2)
+ return b & 0x0f;
+ }
+ else if ((b & 0x1c) == 0x10) { // xxx100.. ........ (C.28.3)
+ if (dataEnd - dataP > 0) {
+ return (((b & 0x03) << 8) | *dataP++) + 0x10;
+ }
+ }
+ else if ((b & 0x1c) == 0x14) { // xxx101.. ........ ........ (C.28.4)
+ if (dataEnd - dataP > 1) {
+ size_t result = (((b & 0x03) << 16) | (dataP[0] << 8) | dataP[1]) + 0x410;
+ dataP += 2;
+ return result;
+ }
+ }
+ else if ((b & 0x1f) == 0x18) { // xxx11000 0000.... ........ ........ (C.28.5)
+ if ((dataEnd - dataP > 2) && !(dataP[0] & 0xf0)) {
+ size_t result = (((dataP[0] & 0x0f) << 16) | (dataP[1] << 8) | dataP[2]) + 0x40410;
+ dataP += 3;
+ return result;
+ }
+ }
+ throw DeadlyImportError(parseErrorMessage);
+ }
+
+ size_t parseSequenceLen() { // C.21
+ if (dataEnd - dataP > 0) {
+ uint8_t b = *dataP++;
+ if (b < 0x80) { // 0....... (C.21.2)
+ return b;
+ }
+ else if ((b & 0xf0) == 0x80) { // 1000.... ........ ........ (C.21.3)
+ if (dataEnd - dataP > 1) {
+ size_t result = (((b & 0x0f) << 16) | (dataP[0] << 8) | dataP[1]) + 0x80;
+ dataP += 2;
+ return result;
+ }
+ }
+ }
+ throw DeadlyImportError(parseErrorMessage);
+ }
+
+ std::string parseNonEmptyOctetString2() { // C.22
+ // Parse the length of the string
+ uint8_t b = *dataP++ & 0x7f;
+ size_t len;
+ if (!(b & 0x40)) { // x0...... (C.22.3.1)
+ len = b + 1;
+ }
+ else if (b == 0x40) { // x1000000 ........ (C.22.3.2)
+ if (dataEnd - dataP < 1) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ len = *dataP++ + 0x41;
+ }
+ else if (b == 0x60) { // x1100000 ........ ........ ........ ........ (C.22.3.3)
+ if (dataEnd - dataP < 4) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ len = ((dataP[0] << 24) | (dataP[1] << 16) | (dataP[2] << 8) | dataP[3]) + 0x141;
+ dataP += 4;
+ }
+ else {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+
+ // Parse the string (C.22.4)
+ if (dataEnd - dataP < static_cast<ptrdiff_t>(len)) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ std::string s = parseUTF8String(dataP, len);
+ dataP += len;
+
+ return s;
+ }
+
+ size_t parseNonEmptyOctetString5Length() { // C.23
+ // Parse the length of the string
+ size_t b = *dataP++ & 0x0f;
+ if (!(b & 0x08)) { // xxxx0... (C.23.3.1)
+ return b + 1;
+ }
+ else if (b == 0x08) { // xxxx1000 ........ (C.23.3.2)
+ if (dataEnd - dataP > 0) {
+ return *dataP++ + 0x09;
+ }
+ }
+ else if (b == 0x0c) { // xxxx1100 ........ ........ ........ ........ (C.23.3.3)
+ if (dataEnd - dataP > 3) {
+ size_t result = ((dataP[0] << 24) | (dataP[1] << 16) | (dataP[2] << 8) | dataP[3]) + 0x109;
+ dataP += 4;
+ return result;
+ }
+ }
+ throw DeadlyImportError(parseErrorMessage);
+ }
+
+ size_t parseNonEmptyOctetString7Length() { // C.24
+ // Parse the length of the string
+ size_t b = *dataP++ & 0x03;
+ if (!(b & 0x02)) { // xxxxxx0. (C.24.3.1)
+ return b + 1;
+ }
+ else if (b == 0x02) { // xxxxxx10 ........ (C.24.3.2)
+ if (dataEnd - dataP > 0) {
+ return *dataP++ + 0x3;
+ }
+ }
+ else if (b == 0x03) { // xxxxxx11 ........ ........ ........ ........ (C.24.3.3)
+ if (dataEnd - dataP > 3) {
+ size_t result = ((dataP[0] << 24) | (dataP[1] << 16) | (dataP[2] << 8) | dataP[3]) + 0x103;
+ dataP += 4;
+ return result;
+ }
+ }
+ throw DeadlyImportError(parseErrorMessage);
+ }
+
+ std::shared_ptr<const FIValue> parseEncodedData(size_t index, size_t len) {
+ if (index < 32) {
+ FIDecoder *decoder = defaultDecoder[index];
+ if (!decoder) {
+ throw DeadlyImportError("Invalid encoding algorithm index " + to_string(index));
+ }
+ return decoder->decode(dataP, len);
+ }
+ else {
+ if (index - 32 >= vocabulary.encodingAlgorithmTable.size()) {
+ throw DeadlyImportError("Invalid encoding algorithm index " + to_string(index));
+ }
+ std::string uri = vocabulary.encodingAlgorithmTable[index - 32];
+ auto it = decoderMap.find(uri);
+ if (it == decoderMap.end()) {
+ throw DeadlyImportError("Unsupported encoding algorithm " + uri);
+ }
+ else {
+ return it->second->decode(dataP, len);
+ }
+ }
+ }
+
+ std::shared_ptr<const FIValue> parseRestrictedAlphabet(size_t index, size_t len) {
+ std::string alphabet;
+ if (index < 16) {
+ switch (index) {
+ case 0: // numeric
+ alphabet = "0123456789-+.e ";
+ break;
+ case 1: // date and time
+ alphabet = "0123456789-:TZ ";
+ break;
+ default:
+ throw DeadlyImportError("Invalid restricted alphabet index " + to_string(index));
+ }
+ }
+ else {
+ if (index - 16 >= vocabulary.restrictedAlphabetTable.size()) {
+ throw DeadlyImportError("Invalid restricted alphabet index " + to_string(index));
+ }
+ alphabet = vocabulary.restrictedAlphabetTable[index - 16];
+ }
+ std::vector<uint32_t> alphabetUTF32;
+ utf8::utf8to32(alphabet.begin(), alphabet.end(), back_inserter(alphabetUTF32));
+ std::string::size_type alphabetLength = alphabetUTF32.size();
+ if (alphabetLength < 2) {
+ throw DeadlyImportError("Invalid restricted alphabet length " + to_string(alphabetLength));
+ }
+ std::string::size_type bitsPerCharacter = 1;
+ while ((1ull << bitsPerCharacter) <= alphabetLength) {
+ ++bitsPerCharacter;
+ }
+ size_t bitsAvail = 0;
+ uint8_t mask = (1 << bitsPerCharacter) - 1;
+ uint32_t bits = 0;
+ std::string s;
+ for (size_t i = 0; i < len; ++i) {
+ bits = (bits << 8) | dataP[i];
+ bitsAvail += 8;
+ while (bitsAvail >= bitsPerCharacter) {
+ bitsAvail -= bitsPerCharacter;
+ size_t charIndex = (bits >> bitsAvail) & mask;
+ if (charIndex < alphabetLength) {
+ s.push_back(alphabetUTF32[charIndex]);
+ }
+ else if (charIndex != mask) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ }
+ }
+ return FIStringValue::create(std::move(s));
+ }
+
+ std::shared_ptr<const FIValue> parseEncodedCharacterString3() { // C.19
+ std::shared_ptr<const FIValue> result;
+ size_t len;
+ uint8_t b = *dataP;
+ if (b & 0x20) {
+ ++dataP;
+ if (dataEnd - dataP < 1) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ size_t index = ((b & 0x0f) << 4) | ((*dataP & 0xf0) >> 4); // C.29
+ len = parseNonEmptyOctetString5Length();
+ if (dataEnd - dataP < static_cast<ptrdiff_t>(len)) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ if (b & 0x10) {
+ // encoding algorithm (C.19.3.4)
+ result = parseEncodedData(index, len);
+ }
+ else {
+ // Restricted alphabet (C.19.3.3)
+ result = parseRestrictedAlphabet(index, len);
+ }
+ }
+ else {
+ len = parseNonEmptyOctetString5Length();
+ if (dataEnd - dataP < static_cast<ptrdiff_t>(len)) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ if (b & 0x10) {
+ // UTF-16 (C.19.3.2)
+ if (len & 1) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ result = FIStringValue::create(parseUTF16String(dataP, len));
+ }
+ else {
+ // UTF-8 (C.19.3.1)
+ result = FIStringValue::create(parseUTF8String(dataP, len));
+ }
+ }
+ dataP += len;
+ return result;
+ }
+
+ std::shared_ptr<const FIValue> parseEncodedCharacterString5() { // C.20
+ std::shared_ptr<const FIValue> result;
+ size_t len;
+ uint8_t b = *dataP;
+ if (b & 0x08) {
+ ++dataP;
+ if (dataEnd - dataP < 1) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ size_t index = ((b & 0x03) << 6) | ((*dataP & 0xfc) >> 2); /* C.29 */
+ len = parseNonEmptyOctetString7Length();
+ if (dataEnd - dataP < static_cast<ptrdiff_t>(len)) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ if (b & 0x04) {
+ // encoding algorithm (C.20.3.4)
+ result = parseEncodedData(index, len);
+ }
+ else {
+ // Restricted alphabet (C.20.3.3)
+ result = parseRestrictedAlphabet(index, len);
+ }
+ }
+ else {
+ len = parseNonEmptyOctetString7Length();
+ if (dataEnd - dataP < static_cast<ptrdiff_t>(len)) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ if (b & 0x04) {
+ // UTF-16 (C.20.3.2)
+ if (len & 1) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ result = FIStringValue::create(parseUTF16String(dataP, len));
+ }
+ else {
+ // UTF-8 (C.20.3.1)
+ result = FIStringValue::create(parseUTF8String(dataP, len));
+ }
+ }
+ dataP += len;
+ return result;
+ }
+
+ const std::string &parseIdentifyingStringOrIndex(std::vector<std::string> &stringTable) { // C.13
+ if (dataEnd - dataP < 1) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ uint8_t b = *dataP;
+ if (b & 0x80) {
+ // We have an index (C.13.4)
+ size_t index = parseInt2();
+ if (index >= stringTable.size()) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ return stringTable[index];
+ }
+ else {
+ // We have a string (C.13.3)
+ stringTable.push_back(parseNonEmptyOctetString2());
+ return stringTable.back();
+ }
+ }
+
+ QName parseNameSurrogate() { // C.16
+ if (dataEnd - dataP < 1) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ uint8_t b = *dataP++;
+ if (b & 0xfc) { // Padding '000000' C.2.5.5
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ QName result;
+ size_t index;
+ if (b & 0x02) { // prefix (C.16.3)
+ if ((dataEnd - dataP < 1) || (*dataP & 0x80)) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ index = parseInt2();
+ if (index >= vocabulary.prefixTable.size()) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ result.prefix = vocabulary.prefixTable[index];
+ }
+ if (b & 0x01) { // namespace-name (C.16.4)
+ if ((dataEnd - dataP < 1) || (*dataP & 0x80)) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ index = parseInt2();
+ if (index >= vocabulary.namespaceNameTable.size()) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ result.uri = vocabulary.namespaceNameTable[index];
+ }
+ // local-name
+ if ((dataEnd - dataP < 1) || (*dataP & 0x80)) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ index = parseInt2();
+ if (index >= vocabulary.localNameTable.size()) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ result.name = vocabulary.localNameTable[index];
+ return result;
+ }
+
+ const QName &parseQualifiedNameOrIndex2(std::vector<QName> &qNameTable) { // C.17
+ uint8_t b = *dataP;
+ if ((b & 0x7c) == 0x78) { // x11110..
+ // We have a literal (C.17.3)
+ ++dataP;
+ QName result;
+ // prefix (C.17.3.1)
+ result.prefix = b & 0x02 ? parseIdentifyingStringOrIndex(vocabulary.prefixTable) : std::string();
+ // namespace-name (C.17.3.1)
+ result.uri = b & 0x01 ? parseIdentifyingStringOrIndex(vocabulary.namespaceNameTable) : std::string();
+ // local-name
+ result.name = parseIdentifyingStringOrIndex(vocabulary.localNameTable);
+ qNameTable.push_back(result);
+ return qNameTable.back();
+ }
+ else {
+ // We have an index (C.17.4)
+ size_t index = parseInt2();
+ if (index >= qNameTable.size()) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ return qNameTable[index];
+ }
+ }
+
+ const QName &parseQualifiedNameOrIndex3(std::vector<QName> &qNameTable) { // C.18
+ uint8_t b = *dataP;
+ if ((b & 0x3c) == 0x3c) { // xx1111..
+ // We have a literal (C.18.3)
+ ++dataP;
+ QName result;
+ // prefix (C.18.3.1)
+ result.prefix = b & 0x02 ? parseIdentifyingStringOrIndex(vocabulary.prefixTable) : std::string();
+ // namespace-name (C.18.3.1)
+ result.uri = b & 0x01 ? parseIdentifyingStringOrIndex(vocabulary.namespaceNameTable) : std::string();
+ // local-name
+ result.name = parseIdentifyingStringOrIndex(vocabulary.localNameTable);
+ qNameTable.push_back(result);
+ return qNameTable.back();
+ }
+ else {
+ // We have an index (C.18.4)
+ size_t index = parseInt3();
+ if (index >= qNameTable.size()) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ return qNameTable[index];
+ }
+ }
+
+ std::shared_ptr<const FIValue> parseNonIdentifyingStringOrIndex1(std::vector<std::shared_ptr<const FIValue>> &valueTable) { // C.14
+ uint8_t b = *dataP;
+ if (b == 0xff) { // C.26.2
+ // empty string
+ ++dataP;
+ return EmptyFIString;
+ }
+ else if (b & 0x80) { // C.14.4
+ // We have an index
+ size_t index = parseInt2();
+ if (index >= valueTable.size()) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ return valueTable[index];
+ }
+ else { // C.14.3
+ // We have a literal
+ std::shared_ptr<const FIValue> result = parseEncodedCharacterString3();
+ if (b & 0x40) { // C.14.3.1
+ valueTable.push_back(result);
+ }
+ return result;
+ }
+ }
+
+ std::shared_ptr<const FIValue> parseNonIdentifyingStringOrIndex3(std::vector<std::shared_ptr<const FIValue>> &valueTable) { // C.15
+ uint8_t b = *dataP;
+ if (b & 0x20) { // C.15.4
+ // We have an index
+ size_t index = parseInt4();
+ if (index >= valueTable.size()) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ return valueTable[index];
+ }
+ else { // C.15.3
+ // We have a literal
+ std::shared_ptr<const FIValue> result = parseEncodedCharacterString5();
+ if (b & 0x10) { // C.15.3.1
+ valueTable.push_back(result);
+ }
+ return result;
+ }
+ }
+
+ void parseElement() {
+ // C.3
+
+ attributes.clear();
+
+ uint8_t b = *dataP;
+ bool hasAttributes = (b & 0x40) != 0; // C.3.3
+ if ((b & 0x3f) == 0x38) { // C.3.4.1
+ // Parse namespaces
+ ++dataP;
+ for (;;) {
+ if (dataEnd - dataP < 1) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ b = *dataP++;
+ if (b == 0xf0) { // C.3.4.3
+ break;
+ }
+ if ((b & 0xfc) != 0xcc) { // C.3.4.2
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ // C.12
+ Attribute attr;
+ attr.qname.prefix = "xmlns";
+ attr.qname.name = b & 0x02 ? parseIdentifyingStringOrIndex(vocabulary.prefixTable) : std::string();
+ attr.qname.uri = b & 0x01 ? parseIdentifyingStringOrIndex(vocabulary.namespaceNameTable) : std::string();
+ attr.name = attr.qname.name.empty() ? "xmlns" : "xmlns:" + attr.qname.name;
+ attr.value = FIStringValue::create(std::string(attr.qname.uri));
+ attributes.push_back(attr);
+ }
+ if ((dataEnd - dataP < 1) || (*dataP & 0xc0)) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ }
+
+ // Parse Element name (C.3.5)
+ const QName &elemName = parseQualifiedNameOrIndex3(vocabulary.elementNameTable);
+ nodeName = elemName.prefix.empty() ? elemName.name : elemName.prefix + ':' + elemName.name;
+
+ if (hasAttributes) {
+ for (;;) {
+ if (dataEnd - dataP < 1) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ b = *dataP;
+ if (b < 0x80) { // C.3.6.1
+ // C.4
+ Attribute attr;
+ attr.qname = parseQualifiedNameOrIndex2(vocabulary.attributeNameTable);
+ attr.name = attr.qname.prefix.empty() ? attr.qname.name : attr.qname.prefix + ':' + attr.qname.name;
+ if (dataEnd - dataP < 1) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ attr.value = parseNonIdentifyingStringOrIndex1(vocabulary.attributeValueTable);
+ attributes.push_back(attr);
+ }
+ else {
+ if ((b & 0xf0) != 0xf0) { // C.3.6.2
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ emptyElement = b == 0xff; // C.3.6.2, C.3.8
+ ++dataP;
+ break;
+ }
+ }
+ }
+ else {
+ if (dataEnd - dataP < 1) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ b = *dataP;
+ switch (b) {
+ case 0xff:
+ terminatorPending = true;
+ // Intentionally fall through
+ case 0xf0:
+ emptyElement = true;
+ ++dataP;
+ break;
+ default:
+ emptyElement = false;
+ }
+ }
+ if (!emptyElement) {
+ elementStack.push(nodeName);
+ }
+
+ currentNodeType = irr::io::EXN_ELEMENT;
+ }
+
+ void parseHeader() {
+ // Parse header (C.1.3)
+ size_t magicSize = parseMagic(dataP, dataEnd);
+ if (!magicSize) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ dataP += magicSize;
+ // C.2.3
+ if (dataEnd - dataP < 1) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ uint8_t b = *dataP++;
+ if (b & 0x40) {
+ // Parse additional data (C.2.4)
+ size_t len = parseSequenceLen();
+ for (size_t i = 0; i < len; ++i) {
+ if (dataEnd - dataP < 1) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ /*std::string id =*/ parseNonEmptyOctetString2();
+ if (dataEnd - dataP < 1) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ /*std::string data =*/ parseNonEmptyOctetString2();
+ }
+ }
+ if (b & 0x20) {
+ // Parse initial vocabulary (C.2.5)
+ if (dataEnd - dataP < 2) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ uint16_t b1 = (dataP[0] << 8) | dataP[1];
+ dataP += 2;
+ if (b1 & 0x1000) {
+ // External vocabulary (C.2.5.2)
+ if (dataEnd - dataP < 1) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ std::string uri = parseNonEmptyOctetString2();
+ auto it = vocabularyMap.find(uri);
+ if (it == vocabularyMap.end()) {
+ throw DeadlyImportError("Unknown vocabulary " + uri);
+ }
+ const FIVocabulary *externalVocabulary = it->second;
+ if (externalVocabulary->restrictedAlphabetTable) {
+ std::copy(externalVocabulary->restrictedAlphabetTable, externalVocabulary->restrictedAlphabetTable + externalVocabulary->restrictedAlphabetTableSize, std::back_inserter(vocabulary.restrictedAlphabetTable));
+ }
+ if (externalVocabulary->encodingAlgorithmTable) {
+ std::copy(externalVocabulary->encodingAlgorithmTable, externalVocabulary->encodingAlgorithmTable + externalVocabulary->encodingAlgorithmTableSize, std::back_inserter(vocabulary.encodingAlgorithmTable));
+ }
+ if (externalVocabulary->prefixTable) {
+ std::copy(externalVocabulary->prefixTable, externalVocabulary->prefixTable + externalVocabulary->prefixTableSize, std::back_inserter(vocabulary.prefixTable));
+ }
+ if (externalVocabulary->namespaceNameTable) {
+ std::copy(externalVocabulary->namespaceNameTable, externalVocabulary->namespaceNameTable + externalVocabulary->namespaceNameTableSize, std::back_inserter(vocabulary.namespaceNameTable));
+ }
+ if (externalVocabulary->localNameTable) {
+ std::copy(externalVocabulary->localNameTable, externalVocabulary->localNameTable + externalVocabulary->localNameTableSize, std::back_inserter(vocabulary.localNameTable));
+ }
+ if (externalVocabulary->otherNCNameTable) {
+ std::copy(externalVocabulary->otherNCNameTable, externalVocabulary->otherNCNameTable + externalVocabulary->otherNCNameTableSize, std::back_inserter(vocabulary.otherNCNameTable));
+ }
+ if (externalVocabulary->otherURITable) {
+ std::copy(externalVocabulary->otherURITable, externalVocabulary->otherURITable + externalVocabulary->otherURITableSize, std::back_inserter(vocabulary.otherURITable));
+ }
+ if (externalVocabulary->attributeValueTable) {
+ std::copy(externalVocabulary->attributeValueTable, externalVocabulary->attributeValueTable + externalVocabulary->attributeValueTableSize, std::back_inserter(vocabulary.attributeValueTable));
+ }
+ if (externalVocabulary->charactersTable) {
+ std::copy(externalVocabulary->charactersTable, externalVocabulary->charactersTable + externalVocabulary->charactersTableSize, std::back_inserter(vocabulary.charactersTable));
+ }
+ if (externalVocabulary->otherStringTable) {
+ std::copy(externalVocabulary->otherStringTable, externalVocabulary->otherStringTable + externalVocabulary->otherStringTableSize, std::back_inserter(vocabulary.otherStringTable));
+ }
+ if (externalVocabulary->elementNameTable) {
+ std::copy(externalVocabulary->elementNameTable, externalVocabulary->elementNameTable + externalVocabulary->elementNameTableSize, std::back_inserter(vocabulary.elementNameTable));
+ }
+ if (externalVocabulary->attributeNameTable) {
+ std::copy(externalVocabulary->attributeNameTable, externalVocabulary->attributeNameTable + externalVocabulary->attributeNameTableSize, std::back_inserter(vocabulary.attributeNameTable));
+ }
+ }
+ if (b1 & 0x0800) {
+ // Parse restricted alphabets (C.2.5.3)
+ for (size_t len = parseSequenceLen(); len > 0; --len) {
+ if (dataEnd - dataP < 1) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ vocabulary.restrictedAlphabetTable.push_back(parseNonEmptyOctetString2());
+ }
+ }
+ if (b1 & 0x0400) {
+ // Parse encoding algorithms (C.2.5.3)
+ for (size_t len = parseSequenceLen(); len > 0; --len) {
+ if (dataEnd - dataP < 1) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ vocabulary.encodingAlgorithmTable.push_back(parseNonEmptyOctetString2());
+ }
+ }
+ if (b1 & 0x0200) {
+ // Parse prefixes (C.2.5.3)
+ for (size_t len = parseSequenceLen(); len > 0; --len) {
+ if (dataEnd - dataP < 1) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ vocabulary.prefixTable.push_back(parseNonEmptyOctetString2());
+ }
+ }
+ if (b1 & 0x0100) {
+ // Parse namespace names (C.2.5.3)
+ for (size_t len = parseSequenceLen(); len > 0; --len) {
+ if (dataEnd - dataP < 1) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ vocabulary.namespaceNameTable.push_back(parseNonEmptyOctetString2());
+ }
+ }
+ if (b1 & 0x0080) {
+ // Parse local names (C.2.5.3)
+ for (size_t len = parseSequenceLen(); len > 0; --len) {
+ if (dataEnd - dataP < 1) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ vocabulary.localNameTable.push_back(parseNonEmptyOctetString2());
+ }
+ }
+ if (b1 & 0x0040) {
+ // Parse other ncnames (C.2.5.3)
+ for (size_t len = parseSequenceLen(); len > 0; --len) {
+ if (dataEnd - dataP < 1) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ vocabulary.otherNCNameTable.push_back(parseNonEmptyOctetString2());
+ }
+ }
+ if (b1 & 0x0020) {
+ // Parse other uris (C.2.5.3)
+ for (size_t len = parseSequenceLen(); len > 0; --len) {
+ if (dataEnd - dataP < 1) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ vocabulary.otherURITable.push_back(parseNonEmptyOctetString2());
+ }
+ }
+ if (b1 & 0x0010) {
+ // Parse attribute values (C.2.5.4)
+ for (size_t len = parseSequenceLen(); len > 0; --len) {
+ if (dataEnd - dataP < 1) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ vocabulary.attributeValueTable.push_back(parseEncodedCharacterString3());
+ }
+ }
+ if (b1 & 0x0008) {
+ // Parse content character chunks (C.2.5.4)
+ for (size_t len = parseSequenceLen(); len > 0; --len) {
+ if (dataEnd - dataP < 1) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ vocabulary.charactersTable.push_back(parseEncodedCharacterString3());
+ }
+ }
+ if (b1 & 0x0004) {
+ // Parse other strings (C.2.5.4)
+ for (size_t len = parseSequenceLen(); len > 0; --len) {
+ if (dataEnd - dataP < 1) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ vocabulary.otherStringTable.push_back(parseEncodedCharacterString3());
+ }
+ }
+ if (b1 & 0x0002) {
+ // Parse element name surrogates (C.2.5.5)
+ for (size_t len = parseSequenceLen(); len > 0; --len) {
+ vocabulary.elementNameTable.push_back(parseNameSurrogate());
+ }
+ }
+ if (b1 & 0x0001) {
+ // Parse attribute name surrogates (C.2.5.5)
+ for (size_t len = parseSequenceLen(); len > 0; --len) {
+ vocabulary.attributeNameTable.push_back(parseNameSurrogate());
+ }
+ }
+ }
+ if (b & 0x10) {
+ // Parse notations (C.2.6)
+ for (;;) {
+ if (dataEnd - dataP < 1) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ uint8_t b1 = *dataP++;
+ if (b1 == 0xf0) {
+ break;
+ }
+ if ((b1 & 0xfc) != 0xc0) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ /* C.11 */
+ /*const std::string &name =*/ parseIdentifyingStringOrIndex(vocabulary.otherNCNameTable);
+ if (b1 & 0x02) {
+ /*const std::string &systemId =*/ parseIdentifyingStringOrIndex(vocabulary.otherURITable);
+ }
+ if (b1 & 0x01) {
+ /*const std::string &publicId =*/ parseIdentifyingStringOrIndex(vocabulary.otherURITable);
+ }
+ }
+ }
+ if (b & 0x08) {
+ // Parse unparsed entities (C.2.7)
+ for (;;) {
+ if (dataEnd - dataP < 1) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ uint8_t b1 = *dataP++;
+ if (b1 == 0xf0) {
+ break;
+ }
+ if ((b1 & 0xfe) != 0xd0) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ /* C.10 */
+ /*const std::string &name =*/ parseIdentifyingStringOrIndex(vocabulary.otherNCNameTable);
+ /*const std::string &systemId =*/ parseIdentifyingStringOrIndex(vocabulary.otherURITable);
+ if (b1 & 0x01) {
+ /*const std::string &publicId =*/ parseIdentifyingStringOrIndex(vocabulary.otherURITable);
+ }
+ /*const std::string &notationName =*/ parseIdentifyingStringOrIndex(vocabulary.otherNCNameTable);
+ }
+ }
+ if (b & 0x04) {
+ // Parse character encoding scheme (C.2.8)
+ if (dataEnd - dataP < 1) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ /*std::string characterEncodingScheme =*/ parseNonEmptyOctetString2();
+ }
+ if (b & 0x02) {
+ // Parse standalone flag (C.2.9)
+ if (dataEnd - dataP < 1) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ uint8_t b1 = *dataP++;
+ if (b1 & 0xfe) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ //bool standalone = b1 & 0x01;
+ }
+ if (b & 0x01) {
+ // Parse version (C.2.10)
+ if (dataEnd - dataP < 1) {
+ throw DeadlyImportError(parseErrorMessage);
+ }
+ /*std::shared_ptr<const FIValue> version =*/ parseNonIdentifyingStringOrIndex1(vocabulary.otherStringTable);
+ }
+ }
+
+ std::unique_ptr<uint8_t[]> data;
+ uint8_t *dataP, *dataEnd;
+ irr::io::EXML_NODE currentNodeType;
+ bool emptyElement;
+ bool headerPending;
+ bool terminatorPending;
+ Vocabulary vocabulary;
+ std::vector<Attribute> attributes;
+ std::stack<std::string> elementStack;
+ std::string nodeName;
+ std::map<std::string, std::unique_ptr<FIDecoder>> decoderMap;
+ std::map<std::string, const FIVocabulary*> vocabularyMap;
+
+ static const std::string EmptyString;
+ static std::shared_ptr<const FIValue> EmptyFIString;
+
+ static FIHexDecoder hexDecoder;
+ static FIBase64Decoder base64Decoder;
+ static FIShortDecoder shortDecoder;
+ static FIIntDecoder intDecoder;
+ static FILongDecoder longDecoder;
+ static FIBoolDecoder boolDecoder;
+ static FIFloatDecoder floatDecoder;
+ static FIDoubleDecoder doubleDecoder;
+ static FIUUIDDecoder uuidDecoder;
+ static FICDATADecoder cdataDecoder;
+ static FIDecoder *defaultDecoder[32];
+};
+
+const std::string CFIReaderImpl::EmptyString;
+std::shared_ptr<const FIValue> CFIReaderImpl::EmptyFIString = FIStringValue::create(std::string());
+
+FIHexDecoder CFIReaderImpl::hexDecoder;
+FIBase64Decoder CFIReaderImpl::base64Decoder;
+FIShortDecoder CFIReaderImpl::shortDecoder;
+FIIntDecoder CFIReaderImpl::intDecoder;
+FILongDecoder CFIReaderImpl::longDecoder;
+FIBoolDecoder CFIReaderImpl::boolDecoder;
+FIFloatDecoder CFIReaderImpl::floatDecoder;
+FIDoubleDecoder CFIReaderImpl::doubleDecoder;
+FIUUIDDecoder CFIReaderImpl::uuidDecoder;
+FICDATADecoder CFIReaderImpl::cdataDecoder;
+
+FIDecoder *CFIReaderImpl::defaultDecoder[32] = {
+ &hexDecoder,
+ &base64Decoder,
+ &shortDecoder,
+ &intDecoder,
+ &longDecoder,
+ &boolDecoder,
+ &floatDecoder,
+ &doubleDecoder,
+ &uuidDecoder,
+ &cdataDecoder
+};
+
+class CXMLReaderImpl : public FIReader
+{
+public:
+
+ //! Constructor
+ CXMLReaderImpl(std::unique_ptr<irr::io::IIrrXMLReader<char, irr::io::IXMLBase>> reader_)
+ : reader(std::move(reader_))
+ {}
+
+ virtual ~CXMLReaderImpl() {}
+
+ virtual bool read() /*override*/ {
+ return reader->read();
+ }
+
+ virtual irr::io::EXML_NODE getNodeType() const /*override*/ {
+ return reader->getNodeType();
+ }
+
+ virtual int getAttributeCount() const /*override*/ {
+ return reader->getAttributeCount();
+ }
+
+ virtual const char* getAttributeName(int idx) const /*override*/ {
+ return reader->getAttributeName(idx);
+ }
+
+ virtual const char* getAttributeValue(int idx) const /*override*/ {
+ return reader->getAttributeValue(idx);
+ }
+
+ virtual const char* getAttributeValue(const char* name) const /*override*/ {
+ return reader->getAttributeValue(name);
+ }
+
+ virtual const char* getAttributeValueSafe(const char* name) const /*override*/ {
+ return reader->getAttributeValueSafe(name);
+ }
+
+ virtual int getAttributeValueAsInt(const char* name) const /*override*/ {
+ return reader->getAttributeValueAsInt(name);
+ }
+
+ virtual int getAttributeValueAsInt(int idx) const /*override*/ {
+ return reader->getAttributeValueAsInt(idx);
+ }
+
+ virtual float getAttributeValueAsFloat(const char* name) const /*override*/ {
+ return reader->getAttributeValueAsFloat(name);
+ }
+
+ virtual float getAttributeValueAsFloat(int idx) const /*override*/ {
+ return reader->getAttributeValueAsFloat(idx);
+ }
+
+ virtual const char* getNodeName() const /*override*/ {
+ return reader->getNodeName();
+ }
+
+ virtual const char* getNodeData() const /*override*/ {
+ return reader->getNodeData();
+ }
+
+ virtual bool isEmptyElement() const /*override*/ {
+ return reader->isEmptyElement();
+ }
+
+ virtual irr::io::ETEXT_FORMAT getSourceFormat() const /*override*/ {
+ return reader->getSourceFormat();
+ }
+
+ virtual irr::io::ETEXT_FORMAT getParserFormat() const /*override*/ {
+ return reader->getParserFormat();
+ }
+
+ virtual std::shared_ptr<const FIValue> getAttributeEncodedValue(int /*idx*/) const /*override*/ {
+ return nullptr;
+ }
+
+ virtual std::shared_ptr<const FIValue> getAttributeEncodedValue(const char* /*name*/) const /*override*/ {
+ return nullptr;
+ }
+
+ virtual void registerDecoder(const std::string & /*algorithmUri*/, std::unique_ptr<FIDecoder> /*decoder*/) /*override*/ {}
+
+
+ virtual void registerVocabulary(const std::string &/*vocabularyUri*/, const FIVocabulary * /*vocabulary*/) /*override*/ {}
+
+private:
+
+ std::unique_ptr<irr::io::IIrrXMLReader<char, irr::io::IXMLBase>> reader;
+};
+
+static std::unique_ptr<uint8_t[]> readFile(IOStream *stream, size_t &size, bool &isFI) {
+ size = stream->FileSize();
+ std::unique_ptr<uint8_t[]> data = std::unique_ptr<uint8_t[]>(new uint8_t[size]);
+ if (stream->Read(data.get(), size, 1) != 1) {
+ size = 0;
+ data.reset();
+ }
+ isFI = parseMagic(data.get(), data.get() + size) > 0;
+ return data;
+}
+
+std::unique_ptr<FIReader> FIReader::create(IOStream *stream)
+{
+ size_t size;
+ bool isFI;
+ auto data = readFile(stream, size, isFI);
+ if (isFI) {
+ return std::unique_ptr<FIReader>(new CFIReaderImpl(std::move(data), size));
+ }
+ else {
+ auto memios = std::unique_ptr<MemoryIOStream>(new MemoryIOStream(data.release(), size, true));
+ auto callback = std::unique_ptr<CIrrXML_IOStreamReader>(new CIrrXML_IOStreamReader(memios.get()));
+ return std::unique_ptr<FIReader>(new CXMLReaderImpl(std::unique_ptr<irr::io::IIrrXMLReader<char, irr::io::IXMLBase>>(createIrrXMLReader(callback.get()))));
+ }
+}
+
+}// namespace Assimp
+
+#endif // !ASSIMP_BUILD_NO_X3D_IMPORTER
diff --git a/code/FIReader.hpp b/code/FIReader.hpp
new file mode 100644
index 000000000..9ff752d5c
--- /dev/null
+++ b/code/FIReader.hpp
@@ -0,0 +1,188 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2018, assimp 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 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 FIReader.hpp
+/// \brief Reader for Fast Infoset encoded binary XML files.
+/// \date 2017
+/// \author Patrick Daehne
+
+#ifndef INCLUDED_AI_FI_READER_H
+#define INCLUDED_AI_FI_READER_H
+
+#ifndef ASSIMP_BUILD_NO_X3D_IMPORTER
+
+//#include <wchar.h>
+#include <string>
+#include <memory>
+#include <cerrno>
+#include <cwchar>
+#include <vector>
+//#include <stdio.h>
+//#include <cstdint>
+#include <irrXML.h>
+
+namespace Assimp {
+
+struct FIValue {
+ virtual const std::string &toString() const = 0;
+ virtual ~FIValue() {}
+};
+
+struct FIStringValue: public FIValue {
+ std::string value;
+ static std::shared_ptr<FIStringValue> create(std::string &&value);
+};
+
+struct FIByteValue: public FIValue {
+ std::vector<uint8_t> value;
+};
+
+struct FIHexValue: public FIByteValue {
+ static std::shared_ptr<FIHexValue> create(std::vector<uint8_t> &&value);
+};
+
+struct FIBase64Value: public FIByteValue {
+ static std::shared_ptr<FIBase64Value> create(std::vector<uint8_t> &&value);
+};
+
+struct FIShortValue: public FIValue {
+ std::vector<int16_t> value;
+ static std::shared_ptr<FIShortValue> create(std::vector<int16_t> &&value);
+};
+
+struct FIIntValue: public FIValue {
+ std::vector<int32_t> value;
+ static std::shared_ptr<FIIntValue> create(std::vector<int32_t> &&value);
+};
+
+struct FILongValue: public FIValue {
+ std::vector<int64_t> value;
+ static std::shared_ptr<FILongValue> create(std::vector<int64_t> &&value);
+};
+
+struct FIBoolValue: public FIValue {
+ std::vector<bool> value;
+ static std::shared_ptr<FIBoolValue> create(std::vector<bool> &&value);
+};
+
+struct FIFloatValue: public FIValue {
+ std::vector<float> value;
+ static std::shared_ptr<FIFloatValue> create(std::vector<float> &&value);
+};
+
+struct FIDoubleValue: public FIValue {
+ std::vector<double> value;
+ static std::shared_ptr<FIDoubleValue> create(std::vector<double> &&value);
+};
+
+struct FIUUIDValue: public FIByteValue {
+ static std::shared_ptr<FIUUIDValue> create(std::vector<uint8_t> &&value);
+};
+
+struct FICDATAValue: public FIStringValue {
+ static std::shared_ptr<FICDATAValue> create(std::string &&value);
+};
+
+struct FIDecoder {
+ virtual std::shared_ptr<const FIValue> decode(const uint8_t *data, size_t len) = 0;
+ virtual ~FIDecoder() {}
+};
+
+struct FIQName {
+ const char *name;
+ const char *prefix;
+ const char *uri;
+};
+
+struct FIVocabulary {
+ const char **restrictedAlphabetTable;
+ size_t restrictedAlphabetTableSize;
+ const char **encodingAlgorithmTable;
+ size_t encodingAlgorithmTableSize;
+ const char **prefixTable;
+ size_t prefixTableSize;
+ const char **namespaceNameTable;
+ size_t namespaceNameTableSize;
+ const char **localNameTable;
+ size_t localNameTableSize;
+ const char **otherNCNameTable;
+ size_t otherNCNameTableSize;
+ const char **otherURITable;
+ size_t otherURITableSize;
+ const std::shared_ptr<const FIValue> *attributeValueTable;
+ size_t attributeValueTableSize;
+ const std::shared_ptr<const FIValue> *charactersTable;
+ size_t charactersTableSize;
+ const std::shared_ptr<const FIValue> *otherStringTable;
+ size_t otherStringTableSize;
+ const FIQName *elementNameTable;
+ size_t elementNameTableSize;
+ const FIQName *attributeNameTable;
+ size_t attributeNameTableSize;
+};
+
+class IOStream;
+
+class FIReader: public irr::io::IIrrXMLReader<char, irr::io::IXMLBase> {
+public:
+ virtual ~FIReader();
+ virtual std::shared_ptr<const FIValue> getAttributeEncodedValue(int idx) const = 0;
+
+ virtual std::shared_ptr<const FIValue> getAttributeEncodedValue(const char *name) const = 0;
+
+ virtual void registerDecoder(const std::string &algorithmUri, std::unique_ptr<FIDecoder> decoder) = 0;
+
+ virtual void registerVocabulary(const std::string &vocabularyUri, const FIVocabulary *vocabulary) = 0;
+
+ static std::unique_ptr<FIReader> create(IOStream *stream);
+
+};// class IFIReader
+
+inline
+FIReader::~FIReader() {
+ // empty
+}
+
+}// namespace Assimp
+
+#endif // #ifndef ASSIMP_BUILD_NO_X3D_IMPORTER
+
+#endif // INCLUDED_AI_FI_READER_H
diff --git a/code/FileLogStream.h b/code/FileLogStream.h
index e935624a1..9966091d2 100644
--- a/code/FileLogStream.h
+++ b/code/FileLogStream.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
Redistribution and use of this software in source and binary forms,
diff --git a/code/FileSystemFilter.h b/code/FileSystemFilter.h
index 3370589d6..9923cdbdd 100644
--- a/code/FileSystemFilter.h
+++ b/code/FileSystemFilter.h
@@ -42,13 +42,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* Implements a filter system to filter calls to Exists() and Open()
* in order to improve the success rate of file opening ...
*/
+#pragma once
#ifndef AI_FILESYSTEMFILTER_H_INC
#define AI_FILESYSTEMFILTER_H_INC
-#include "../include/assimp/IOSystem.hpp"
-#include "../include/assimp/DefaultLogger.hpp"
-#include "fast_atof.h"
-#include "ParsingUtils.h"
+#include <assimp/IOSystem.hpp>
+#include <assimp/DefaultLogger.hpp>
+#include <assimp/fast_atof.h>
+#include <assimp/ParsingUtils.h>
namespace Assimp {
@@ -64,90 +65,89 @@ class FileSystemFilter : public IOSystem
public:
/** Constructor. */
FileSystemFilter(const std::string& file, IOSystem* old)
- : wrapped (old)
- , src_file (file)
- , sep(wrapped->getOsSeparator())
- {
- ai_assert(NULL != wrapped);
+ : mWrapped (old)
+ , mSrc_file(file)
+ , mSep(mWrapped->getOsSeparator()) {
+ ai_assert(nullptr != mWrapped);
// Determine base directory
- base = src_file;
+ mBase = mSrc_file;
std::string::size_type ss2;
- if (std::string::npos != (ss2 = base.find_last_of("\\/"))) {
- base.erase(ss2,base.length()-ss2);
- }
- else {
- base = "";
- // return;
+ if (std::string::npos != (ss2 = mBase.find_last_of("\\/"))) {
+ mBase.erase(ss2,mBase.length()-ss2);
+ } else {
+ mBase = "";
}
// make sure the directory is terminated properly
char s;
- if (base.length() == 0) {
- base = ".";
- base += getOsSeparator();
- }
- else if ((s = *(base.end()-1)) != '\\' && s != '/') {
- base += getOsSeparator();
+ if ( mBase.empty() ) {
+ mBase = ".";
+ mBase += getOsSeparator();
+ } else if ((s = *(mBase.end()-1)) != '\\' && s != '/') {
+ mBase += getOsSeparator();
}
- DefaultLogger::get()->info("Import root directory is \'" + base + "\'");
+ DefaultLogger::get()->info("Import root directory is \'" + mBase + "\'");
}
/** Destructor. */
- ~FileSystemFilter()
- {
- // haha
+ ~FileSystemFilter() {
+ // empty
}
// -------------------------------------------------------------------
/** Tests for the existence of a file at the given path. */
- bool Exists( const char* pFile) const
- {
+ bool Exists( const char* pFile) const {
+ ai_assert( nullptr != mWrapped );
+
std::string tmp = pFile;
// Currently this IOSystem is also used to open THE ONE FILE.
- if (tmp != src_file) {
+ if (tmp != mSrc_file) {
BuildPath(tmp);
Cleanup(tmp);
}
- return wrapped->Exists(tmp);
+ return mWrapped->Exists(tmp);
}
// -------------------------------------------------------------------
/** Returns the directory separator. */
- char getOsSeparator() const
- {
- return sep;
+ char getOsSeparator() const {
+ return mSep;
}
// -------------------------------------------------------------------
/** Open a new file with a given path. */
- IOStream* Open( const char* pFile, const char* pMode = "rb")
- {
- ai_assert(pFile);
- ai_assert(pMode);
+ IOStream* Open( const char* pFile, const char* pMode = "rb") {
+ ai_assert( nullptr != mWrapped );
+ if ( nullptr == pFile || nullptr == pMode ) {
+ return nullptr;
+ }
+
+ ai_assert( nullptr != pFile );
+ ai_assert( nullptr != pMode );
// First try the unchanged path
- IOStream* s = wrapped->Open(pFile,pMode);
+ IOStream* s = mWrapped->Open(pFile,pMode);
- if (!s) {
+ if (nullptr == s) {
std::string tmp = pFile;
// Try to convert between absolute and relative paths
BuildPath(tmp);
- s = wrapped->Open(tmp,pMode);
+ s = mWrapped->Open(tmp,pMode);
- if (!s) {
+ if (nullptr == s) {
// Finally, look for typical issues with paths
// and try to correct them. This is our last
// resort.
tmp = pFile;
Cleanup(tmp);
BuildPath(tmp);
- s = wrapped->Open(tmp,pMode);
+ s = mWrapped->Open(tmp,pMode);
}
}
@@ -156,27 +156,75 @@ public:
// -------------------------------------------------------------------
/** Closes the given file and releases all resources associated with it. */
- void Close( IOStream* pFile)
- {
- return wrapped->Close(pFile);
+ void Close( IOStream* pFile) {
+ ai_assert( nullptr != mWrapped );
+ return mWrapped->Close(pFile);
}
// -------------------------------------------------------------------
/** Compare two paths */
- bool ComparePaths (const char* one, const char* second) const
- {
- return wrapped->ComparePaths (one,second);
+ bool ComparePaths (const char* one, const char* second) const {
+ ai_assert( nullptr != mWrapped );
+ return mWrapped->ComparePaths (one,second);
}
-private:
+ // -------------------------------------------------------------------
+ /** Pushes a new directory onto the directory stack. */
+ bool PushDirectory(const std::string &path ) {
+ ai_assert( nullptr != mWrapped );
+ return mWrapped->PushDirectory(path);
+ }
+
+ // -------------------------------------------------------------------
+ /** Returns the top directory from the stack. */
+ const std::string &CurrentDirectory() const {
+ ai_assert( nullptr != mWrapped );
+ return mWrapped->CurrentDirectory();
+ }
+
+ // -------------------------------------------------------------------
+ /** Returns the number of directories stored on the stack. */
+ size_t StackSize() const {
+ ai_assert( nullptr != mWrapped );
+ return mWrapped->StackSize();
+ }
+
+ // -------------------------------------------------------------------
+ /** Pops the top directory from the stack. */
+ bool PopDirectory() {
+ ai_assert( nullptr != mWrapped );
+ return mWrapped->PopDirectory();
+ }
// -------------------------------------------------------------------
+ /** Creates an new directory at the given path. */
+ bool CreateDirectory(const std::string &path) {
+ ai_assert( nullptr != mWrapped );
+ return mWrapped->CreateDirectory(path);
+ }
+
+ // -------------------------------------------------------------------
+ /** Will change the current directory to the given path. */
+ bool ChangeDirectory(const std::string &path) {
+ ai_assert( nullptr != mWrapped );
+ return mWrapped->ChangeDirectory(path);
+ }
+
+ // -------------------------------------------------------------------
+ /** Delete file. */
+ bool DeleteFile(const std::string &file) {
+ ai_assert( nullptr != mWrapped );
+ return mWrapped->DeleteFile(file);
+ }
+
+private:
+ // -------------------------------------------------------------------
/** Build a valid path from a given relative or absolute path.
*/
- void BuildPath (std::string& in) const
- {
+ void BuildPath (std::string& in) const {
+ ai_assert( nullptr != mWrapped );
// if we can already access the file, great.
- if (in.length() < 3 || wrapped->Exists(in)) {
+ if (in.length() < 3 || mWrapped->Exists(in)) {
return;
}
@@ -184,8 +232,8 @@ private:
if (in[1] != ':') {
// append base path and try
- const std::string tmp = base + in;
- if (wrapped->Exists(tmp)) {
+ const std::string tmp = mBase + in;
+ if (mWrapped->Exists(tmp)) {
in = tmp;
return;
}
@@ -207,8 +255,8 @@ private:
std::string::size_type last_dirsep = std::string::npos;
while(true) {
- tmp = base;
- tmp += sep;
+ tmp = mBase;
+ tmp += mSep;
std::string::size_type dirsep = in.rfind('/', last_dirsep);
if (std::string::npos == dirsep) {
@@ -223,7 +271,7 @@ private:
last_dirsep = dirsep-1;
tmp += in.substr(dirsep+1, in.length()-pos);
- if (wrapped->Exists(tmp)) {
+ if (mWrapped->Exists(tmp)) {
in = tmp;
return;
}
@@ -236,22 +284,21 @@ private:
// -------------------------------------------------------------------
/** Cleanup the given path
*/
- void Cleanup (std::string& in) const
- {
- char last = 0;
+ void Cleanup (std::string& in) const {
if(in.empty()) {
return;
}
// Remove a very common issue when we're parsing file names: spaces at the
// beginning of the path.
+ char last = 0;
std::string::iterator it = in.begin();
while (IsSpaceOrNewLine( *it ))++it;
if (it != in.begin()) {
in.erase(in.begin(),it+1);
}
- const char sep = getOsSeparator();
+ const char separator = getOsSeparator();
for (it = in.begin(); it != in.end(); ++it) {
// Exclude :// and \\, which remain untouched.
// https://sourceforge.net/tracker/?func=detail&aid=3031725&group_id=226462&atid=1067632
@@ -266,7 +313,7 @@ private:
// Cleanup path delimiters
if (*it == '/' || (*it) == '\\') {
- *it = sep;
+ *it = separator;
// And we're removing double delimiters, frequent issue with
// incorrectly composited paths ...
@@ -274,9 +321,7 @@ private:
it = in.erase(it);
--it;
}
- }
- else if (*it == '%' && in.end() - it > 2) {
-
+ } else if (*it == '%' && in.end() - it > 2) {
// Hex sequence in URIs
if( IsHex((&*it)[0]) && IsHex((&*it)[1]) ) {
*it = HexOctetToDecimal(&*it);
@@ -290,9 +335,9 @@ private:
}
private:
- IOSystem* wrapped;
- std::string src_file, base;
- char sep;
+ IOSystem *mWrapped;
+ std::string mSrc_file, mBase;
+ char mSep;
};
} //!ns Assimp
diff --git a/code/FindDegenerates.cpp b/code/FindDegenerates.cpp
index 32a09f0c0..c0c0de08b 100644
--- a/code/FindDegenerates.cpp
+++ b/code/FindDegenerates.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -49,105 +50,191 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// internal headers
#include "ProcessHelper.h"
#include "FindDegenerates.h"
-#include "Exceptional.h"
+#include <assimp/Exceptional.h>
using namespace Assimp;
+//remove mesh at position 'index' from the scene
+static void removeMesh(aiScene* pScene, unsigned const index);
+//correct node indices to meshes and remove references to deleted mesh
+static void updateSceneGraph(aiNode* pNode, unsigned const index);
+
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
FindDegeneratesProcess::FindDegeneratesProcess()
-: configRemoveDegenerates (false)
-{}
+: mConfigRemoveDegenerates( false )
+, mConfigCheckAreaOfTriangle( false ){
+ // empty
+}
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
-FindDegeneratesProcess::~FindDegeneratesProcess()
-{
+FindDegeneratesProcess::~FindDegeneratesProcess() {
// nothing to do here
}
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag field.
-bool FindDegeneratesProcess::IsActive( unsigned int pFlags) const
-{
+bool FindDegeneratesProcess::IsActive( unsigned int pFlags) const {
return 0 != (pFlags & aiProcess_FindDegenerates);
}
// ------------------------------------------------------------------------------------------------
// Setup import configuration
-void FindDegeneratesProcess::SetupProperties(const Importer* pImp)
-{
+void FindDegeneratesProcess::SetupProperties(const Importer* pImp) {
// Get the current value of AI_CONFIG_PP_FD_REMOVE
- configRemoveDegenerates = (0 != pImp->GetPropertyInteger(AI_CONFIG_PP_FD_REMOVE,0));
+ mConfigRemoveDegenerates = (0 != pImp->GetPropertyInteger(AI_CONFIG_PP_FD_REMOVE,0));
+ mConfigCheckAreaOfTriangle = ( 0 != pImp->GetPropertyInteger(AI_CONFIG_PP_FD_CHECKAREA) );
}
// ------------------------------------------------------------------------------------------------
// Executes the post processing step on the given imported data.
-void FindDegeneratesProcess::Execute( aiScene* pScene)
-{
- DefaultLogger::get()->debug("FindDegeneratesProcess begin");
- for (unsigned int i = 0; i < pScene->mNumMeshes;++i){
- ExecuteOnMesh( pScene->mMeshes[i]);
+void FindDegeneratesProcess::Execute( aiScene* pScene) {
+ ASSIMP_LOG_DEBUG("FindDegeneratesProcess begin");
+ for (unsigned int i = 0; i < pScene->mNumMeshes;++i)
+ {
+ //Do not process point cloud, ExecuteOnMesh works only with faces data
+ if ((pScene->mMeshes[i]->mPrimitiveTypes != aiPrimitiveType::aiPrimitiveType_POINT) && ExecuteOnMesh(pScene->mMeshes[i])) {
+ removeMesh(pScene, i);
+ --i; //the current i is removed, do not skip the next one
+ }
}
- DefaultLogger::get()->debug("FindDegeneratesProcess finished");
+ ASSIMP_LOG_DEBUG("FindDegeneratesProcess finished");
+}
+
+static void removeMesh(aiScene* pScene, unsigned const index) {
+ //we start at index and copy the pointers one position forward
+ //save the mesh pointer to delete it later
+ auto delete_me = pScene->mMeshes[index];
+ for (unsigned i = index; i < pScene->mNumMeshes - 1; ++i) {
+ pScene->mMeshes[i] = pScene->mMeshes[i+1];
+ }
+ pScene->mMeshes[pScene->mNumMeshes - 1] = nullptr;
+ --(pScene->mNumMeshes);
+ delete delete_me;
+
+ //removing a mesh also requires updating all references to it in the scene graph
+ updateSceneGraph(pScene->mRootNode, index);
+}
+
+static void updateSceneGraph(aiNode* pNode, unsigned const index) {
+ for (unsigned i = 0; i < pNode->mNumMeshes; ++i) {
+ if (pNode->mMeshes[i] > index) {
+ --(pNode->mMeshes[i]);
+ continue;
+ }
+ if (pNode->mMeshes[i] == index) {
+ for (unsigned j = i; j < pNode->mNumMeshes -1; ++j) {
+ pNode->mMeshes[j] = pNode->mMeshes[j+1];
+ }
+ --(pNode->mNumMeshes);
+ --i;
+ continue;
+ }
+ }
+ //recurse to all children
+ for (unsigned i = 0; i < pNode->mNumChildren; ++i) {
+ updateSceneGraph(pNode->mChildren[i], index);
+ }
+}
+
+static ai_real heron( ai_real a, ai_real b, ai_real c ) {
+ ai_real s = (a + b + c) / 2;
+ ai_real area = pow((s * ( s - a ) * ( s - b ) * ( s - c ) ), (ai_real)0.5 );
+ return area;
+}
+
+static ai_real distance3D( const aiVector3D &vA, aiVector3D &vB ) {
+ const ai_real lx = ( vB.x - vA.x );
+ const ai_real ly = ( vB.y - vA.y );
+ const ai_real lz = ( vB.z - vA.z );
+ ai_real a = lx*lx + ly*ly + lz*lz;
+ ai_real d = pow( a, (ai_real)0.5 );
+
+ return d;
+}
+
+static ai_real calculateAreaOfTriangle( const aiFace& face, aiMesh* mesh ) {
+ ai_real area = 0;
+
+ aiVector3D vA( mesh->mVertices[ face.mIndices[ 0 ] ] );
+ aiVector3D vB( mesh->mVertices[ face.mIndices[ 1 ] ] );
+ aiVector3D vC( mesh->mVertices[ face.mIndices[ 2 ] ] );
+
+ ai_real a( distance3D( vA, vB ) );
+ ai_real b( distance3D( vB, vC ) );
+ ai_real c( distance3D( vC, vA ) );
+ area = heron( a, b, c );
+
+ return area;
}
// ------------------------------------------------------------------------------------------------
// Executes the post processing step on the given imported mesh
-void FindDegeneratesProcess::ExecuteOnMesh( aiMesh* mesh)
-{
+bool FindDegeneratesProcess::ExecuteOnMesh( aiMesh* mesh) {
mesh->mPrimitiveTypes = 0;
std::vector<bool> remove_me;
- if (configRemoveDegenerates)
- remove_me.resize(mesh->mNumFaces,false);
+ if (mConfigRemoveDegenerates) {
+ remove_me.resize( mesh->mNumFaces, false );
+ }
unsigned int deg = 0, limit;
- for (unsigned int a = 0; a < mesh->mNumFaces; ++a)
- {
+ for ( unsigned int a = 0; a < mesh->mNumFaces; ++a ) {
aiFace& face = mesh->mFaces[a];
bool first = true;
// check whether the face contains degenerated entries
- for (unsigned int i = 0; i < face.mNumIndices; ++i)
- {
+ for (unsigned int i = 0; i < face.mNumIndices; ++i) {
// Polygons with more than 4 points are allowed to have double points, that is
// simulating polygons with holes just with concave polygons. However,
// double points may not come directly after another.
limit = face.mNumIndices;
- if (face.mNumIndices > 4)
- limit = std::min(limit,i+2);
+ if (face.mNumIndices > 4) {
+ limit = std::min( limit, i+2 );
+ }
- for (unsigned int t = i+1; t < limit; ++t)
- {
- if (mesh->mVertices[face.mIndices[i]] == mesh->mVertices[face.mIndices[t]])
- {
+ for (unsigned int t = i+1; t < limit; ++t) {
+ if (mesh->mVertices[face.mIndices[ i ] ] == mesh->mVertices[ face.mIndices[ t ] ]) {
// we have found a matching vertex position
// remove the corresponding index from the array
- --face.mNumIndices;--limit;
- for (unsigned int m = t; m < face.mNumIndices; ++m)
- {
- face.mIndices[m] = face.mIndices[m+1];
+ --face.mNumIndices;
+ --limit;
+ for (unsigned int m = t; m < face.mNumIndices; ++m) {
+ face.mIndices[ m ] = face.mIndices[ m+1 ];
}
--t;
// NOTE: we set the removed vertex index to an unique value
// to make sure the developer gets notified when his
- // application attemps to access this data.
- face.mIndices[face.mNumIndices] = 0xdeadbeef;
+ // application attempts to access this data.
+ face.mIndices[ face.mNumIndices ] = 0xdeadbeef;
- if(first)
- {
+ if(first) {
++deg;
first = false;
}
- if (configRemoveDegenerates) {
- remove_me[a] = true;
+ if ( mConfigRemoveDegenerates ) {
+ remove_me[ a ] = true;
goto evil_jump_outside; // hrhrhrh ... yeah, this rocks baby!
}
}
}
+
+ if ( mConfigCheckAreaOfTriangle ) {
+ if ( face.mNumIndices == 3 ) {
+ ai_real area = calculateAreaOfTriangle( face, mesh );
+ if ( area < 1e-6 ) {
+ if ( mConfigRemoveDegenerates ) {
+ remove_me[ a ] = true;
+ goto evil_jump_outside;
+ }
+
+ // todo: check for index which is corrupt.
+ }
+ }
+ }
}
// We need to update the primitive flags array of the mesh.
@@ -171,7 +258,7 @@ evil_jump_outside:
}
// If AI_CONFIG_PP_FD_REMOVE is true, remove degenerated faces from the import
- if (configRemoveDegenerates && deg) {
+ if (mConfigRemoveDegenerates && deg) {
unsigned int n = 0;
for (unsigned int a = 0; a < mesh->mNumFaces; ++a)
{
@@ -186,33 +273,28 @@ evil_jump_outside:
if (&face_src != &face_dest) {
// clear source
face_src.mNumIndices = 0;
- face_src.mIndices = NULL;
+ face_src.mIndices = nullptr;
}
}
else {
// Otherwise delete it if we don't need this face
delete[] face_src.mIndices;
- face_src.mIndices = NULL;
+ face_src.mIndices = nullptr;
face_src.mNumIndices = 0;
}
}
// Just leave the rest of the array unreferenced, we don't care for now
mesh->mNumFaces = n;
if (!mesh->mNumFaces) {
- // WTF!?
- // OK ... for completeness and because I'm not yet tired,
- // let's write code that willl hopefully never be called
- // (famous last words)
-
- // OK ... bad idea.
- throw DeadlyImportError("Mesh is empty after removal of degenerated primitives ... WTF!?");
+ //The whole mesh consists of degenerated faces
+ //signal upward, that this mesh should be deleted.
+ ASSIMP_LOG_DEBUG("FindDegeneratesProcess removed a mesh full of degenerated primitives");
+ return true;
}
}
- if (deg && !DefaultLogger::isNullLogger())
- {
- char s[64];
- ASSIMP_itoa10(s,deg);
- DefaultLogger::get()->warn(std::string("Found ") + s + " degenerated primitives");
+ if (deg && !DefaultLogger::isNullLogger()) {
+ ASSIMP_LOG_WARN_F( "Found ", deg, " degenerated primitives");
}
+ return false;
}
diff --git a/code/FindDegenerates.h b/code/FindDegenerates.h
index 9bd410dcd..c234c57f5 100644
--- a/code/FindDegenerates.h
+++ b/code/FindDegenerates.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -54,15 +55,11 @@ namespace Assimp {
// ---------------------------------------------------------------------------
/** FindDegeneratesProcess: Searches a mesh for degenerated triangles.
*/
-class ASSIMP_API FindDegeneratesProcess : public BaseProcess
-{
+class ASSIMP_API FindDegeneratesProcess : public BaseProcess {
public:
-
FindDegeneratesProcess();
~FindDegeneratesProcess();
-public:
-
// -------------------------------------------------------------------
// Check whether step is active
bool IsActive( unsigned int pFlags) const;
@@ -77,30 +74,56 @@ public:
// -------------------------------------------------------------------
// Execute step on a given mesh
- void ExecuteOnMesh( aiMesh* mesh);
+ ///@returns true if the current mesh should be deleted, false otherwise
+ bool ExecuteOnMesh( aiMesh* mesh);
+ // -------------------------------------------------------------------
+ /// @brief Enable the instant removal of degenerated primitives
+ /// @param enabled true for enabled.
+ void EnableInstantRemoval(bool enabled);
// -------------------------------------------------------------------
- /** @brief Enable the instant removal of degenerated primitives
- * @param d hm ... difficult to guess what this means, hu!?
- */
- void EnableInstantRemoval(bool d) {
- configRemoveDegenerates = d;
- }
+ /// @brief Check whether instant removal is currently enabled
+ /// @return The instant removal state.
+ bool IsInstantRemoval() const;
// -------------------------------------------------------------------
- /** @brief Check whether instant removal is currently enabled
- * @return ...
- */
- bool IsInstantRemoval() const {
- return configRemoveDegenerates;
- }
+ /// @brief Enable the area check for triangles.
+ /// @param enabled true for enabled.
+ void EnableAreaCheck( bool enabled );
-private:
+ // -------------------------------------------------------------------
+ /// @brief Check whether the area check is enabled.
+ /// @return The area check state.
+ bool isAreaCheckEnabled() const;
+private:
//! Configuration option: remove degenerates faces immediately
- bool configRemoveDegenerates;
+ bool mConfigRemoveDegenerates;
+ //! Configuration option: check for area
+ bool mConfigCheckAreaOfTriangle;
};
+
+inline
+void FindDegeneratesProcess::EnableInstantRemoval(bool enabled) {
+ mConfigRemoveDegenerates = enabled;
+}
+
+inline
+bool FindDegeneratesProcess::IsInstantRemoval() const {
+ return mConfigRemoveDegenerates;
+}
+
+inline
+void FindDegeneratesProcess::EnableAreaCheck( bool enabled ) {
+ mConfigCheckAreaOfTriangle = enabled;
+}
+
+inline
+bool FindDegeneratesProcess::isAreaCheckEnabled() const {
+ return mConfigCheckAreaOfTriangle;
}
+} // Namespace Assimp
+
#endif // !! AI_FINDDEGENERATESPROCESS_H_INC
diff --git a/code/FindInstancesProcess.cpp b/code/FindInstancesProcess.cpp
index ab2d2257b..25dcc51e8 100644
--- a/code/FindInstancesProcess.cpp
+++ b/code/FindInstancesProcess.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -118,7 +119,7 @@ void UpdateMeshIndices(aiNode* node, unsigned int* lookup)
// Executes the post processing step on the given imported data.
void FindInstancesProcess::Execute( aiScene* pScene)
{
- DefaultLogger::get()->debug("FindInstancesProcess begin");
+ ASSIMP_LOG_DEBUG("FindInstancesProcess begin");
if (pScene->mNumMeshes) {
// use a pseudo hash for all meshes in the scene to quickly find
@@ -266,13 +267,11 @@ void FindInstancesProcess::Execute( aiScene* pScene)
// write to log
if (!DefaultLogger::isNullLogger()) {
-
- char buffer[512];
- ::ai_snprintf(buffer,512,"FindInstancesProcess finished. Found %i instances",pScene->mNumMeshes-numMeshesOut);
- DefaultLogger::get()->info(buffer);
+ ASSIMP_LOG_INFO_F( "FindInstancesProcess finished. Found ", (pScene->mNumMeshes - numMeshesOut), " instances" );
}
pScene->mNumMeshes = numMeshesOut;
+ } else {
+ ASSIMP_LOG_DEBUG("FindInstancesProcess finished. No instanced meshes found");
}
- else DefaultLogger::get()->debug("FindInstancesProcess finished. No instanced meshes found");
}
}
diff --git a/code/FindInstancesProcess.h b/code/FindInstancesProcess.h
index dc4396566..fb2ac6eb6 100644
--- a/code/FindInstancesProcess.h
+++ b/code/FindInstancesProcess.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -59,9 +60,9 @@ namespace Assimp {
* @param in Input mesh
* @return Hash.
*/
-inline uint64_t GetMeshHash(aiMesh* in)
-{
- ai_assert(NULL != in);
+inline
+uint64_t GetMeshHash(aiMesh* in) {
+ ai_assert(nullptr != in);
// ... get an unique value representing the vertex format of the mesh
const unsigned int fhash = GetMeshVFormatUnique(in);
@@ -77,14 +78,14 @@ inline uint64_t GetMeshHash(aiMesh* in)
/** @brief Perform a component-wise comparison of two arrays
*
* @param first First array
- * @param second Second aray
+ * @param second Second array
* @param size Size of both arrays
* @param e Epsilon
* @return true if the arrays are identical
*/
-inline bool CompareArrays(const aiVector3D* first, const aiVector3D* second,
- unsigned int size, float e)
-{
+inline
+bool CompareArrays(const aiVector3D* first, const aiVector3D* second,
+ unsigned int size, float e) {
for (const aiVector3D* end = first+size; first != end; ++first,++second) {
if ( (*first - *second).SquareLength() >= e)
return false;
diff --git a/code/FindInvalidDataProcess.cpp b/code/FindInvalidDataProcess.cpp
index 77915bc4e..b1a296a54 100644
--- a/code/FindInvalidDataProcess.cpp
+++ b/code/FindInvalidDataProcess.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -50,9 +51,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// internal headers
#include "FindInvalidDataProcess.h"
#include "ProcessHelper.h"
-#include "Macros.h"
-#include "Exceptional.h"
-#include "qnan.h"
+#include <assimp/Macros.h>
+#include <assimp/Exceptional.h>
+#include <assimp/qnan.h>
using namespace Assimp;
@@ -117,7 +118,7 @@ void UpdateMeshReferences(aiNode* node, const std::vector<unsigned int>& meshMap
// Executes the post processing step on the given imported data.
void FindInvalidDataProcess::Execute( aiScene* pScene)
{
- DefaultLogger::get()->debug("FindInvalidDataProcess begin");
+ ASSIMP_LOG_DEBUG("FindInvalidDataProcess begin");
bool out = false;
std::vector<unsigned int> meshMapping(pScene->mNumMeshes);
@@ -162,15 +163,16 @@ void FindInvalidDataProcess::Execute( aiScene* pScene)
pScene->mNumMeshes = real;
}
- DefaultLogger::get()->info("FindInvalidDataProcess finished. Found issues ...");
+ ASSIMP_LOG_INFO("FindInvalidDataProcess finished. Found issues ...");
+ } else {
+ ASSIMP_LOG_DEBUG("FindInvalidDataProcess finished. Everything seems to be OK.");
}
- else DefaultLogger::get()->debug("FindInvalidDataProcess finished. Everything seems to be OK.");
}
// ------------------------------------------------------------------------------------------------
template <typename T>
-inline const char* ValidateArrayContents(const T* arr, unsigned int size,
- const std::vector<bool>& dirtyMask, bool mayBeIdentical = false, bool mayBeZero = true)
+inline const char* ValidateArrayContents(const T* /*arr*/, unsigned int /*size*/,
+ const std::vector<bool>& /*dirtyMask*/, bool /*mayBeIdentical = false*/, bool /*mayBeZero = true*/)
{
return NULL;
}
@@ -211,8 +213,7 @@ inline bool ProcessArray(T*& in, unsigned int num,const char* name,
{
const char* err = ValidateArrayContents(in,num,dirtyMask,mayBeIdentical,mayBeZero);
if (err) {
- DefaultLogger::get()->error(std::string("FindInvalidDataProcess fails on mesh ") + name + ": " + err);
-
+ ASSIMP_LOG_ERROR_F( "FindInvalidDataProcess fails on mesh ", name, ": ", err);
delete[] in;
in = NULL;
return true;
@@ -331,7 +332,7 @@ void FindInvalidDataProcess::ProcessAnimationChannel (aiNodeAnim* anim)
i = 1;
}
if (1 == i)
- DefaultLogger::get()->warn("Simplified dummy tracks with just one key");
+ ASSIMP_LOG_WARN("Simplified dummy tracks with just one key");
}
// ------------------------------------------------------------------------------------------------
@@ -339,32 +340,37 @@ void FindInvalidDataProcess::ProcessAnimationChannel (aiNodeAnim* anim)
int FindInvalidDataProcess::ProcessMesh (aiMesh* pMesh)
{
bool ret = false;
- std::vector<bool> dirtyMask(pMesh->mNumVertices,(pMesh->mNumFaces ? true : false));
+ std::vector<bool> dirtyMask(pMesh->mNumVertices, pMesh->mNumFaces != 0);
// Ignore elements that are not referenced by vertices.
// (they are, for example, caused by the FindDegenerates step)
- for (unsigned int m = 0; m < pMesh->mNumFaces;++m) {
+ for (unsigned int m = 0; m < pMesh->mNumFaces; ++m) {
const aiFace& f = pMesh->mFaces[m];
- for (unsigned int i = 0; i < f.mNumIndices;++i) {
+ for (unsigned int i = 0; i < f.mNumIndices; ++i) {
dirtyMask[f.mIndices[i]] = false;
}
}
// Process vertex positions
- if(pMesh->mVertices && ProcessArray(pMesh->mVertices,pMesh->mNumVertices,"positions",dirtyMask)) {
- DefaultLogger::get()->error("Deleting mesh: Unable to continue without vertex positions");
+ if (pMesh->mVertices && ProcessArray(pMesh->mVertices, pMesh->mNumVertices, "positions", dirtyMask)) {
+ ASSIMP_LOG_ERROR("Deleting mesh: Unable to continue without vertex positions");
+
return 2;
}
// process texture coordinates
- for (unsigned int i = 0; i < AI_MAX_NUMBER_OF_TEXTURECOORDS && pMesh->mTextureCoords[i];++i) {
- if (ProcessArray(pMesh->mTextureCoords[i],pMesh->mNumVertices,"uvcoords",dirtyMask)) {
+ for (unsigned int i = 0; i < AI_MAX_NUMBER_OF_TEXTURECOORDS && pMesh->mTextureCoords[i]; ++i) {
+ if (ProcessArray(pMesh->mTextureCoords[i], pMesh->mNumVertices, "uvcoords", dirtyMask)) {
+ pMesh->mNumUVComponents[i] = 0;
// delete all subsequent texture coordinate sets.
- for (unsigned int a = i+1; a < AI_MAX_NUMBER_OF_TEXTURECOORDS;++a) {
- delete[] pMesh->mTextureCoords[a]; pMesh->mTextureCoords[a] = NULL;
+ for (unsigned int a = i + 1; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++a) {
+ delete[] pMesh->mTextureCoords[a];
+ pMesh->mTextureCoords[a] = NULL;
+ pMesh->mNumUVComponents[a] = 0;
}
+
ret = true;
}
}
diff --git a/code/FindInvalidDataProcess.h b/code/FindInvalidDataProcess.h
index cc0ef946d..00dfef145 100644
--- a/code/FindInvalidDataProcess.h
+++ b/code/FindInvalidDataProcess.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/FixNormalsStep.cpp b/code/FixNormalsStep.cpp
index 05d05e873..668b50c24 100644
--- a/code/FixNormalsStep.cpp
+++ b/code/FixNormalsStep.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -46,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// internal headers
#include "FixNormalsStep.h"
-#include "StringUtils.h"
+#include <assimp/StringUtils.h>
#include <assimp/DefaultLogger.hpp>
#include <assimp/postprocess.h>
#include <assimp/scene.h>
@@ -81,28 +82,35 @@ bool FixInfacingNormalsProcess::IsActive( unsigned int pFlags) const
// Executes the post processing step on the given imported data.
void FixInfacingNormalsProcess::Execute( aiScene* pScene)
{
- DefaultLogger::get()->debug("FixInfacingNormalsProcess begin");
+ ASSIMP_LOG_DEBUG("FixInfacingNormalsProcess begin");
- bool bHas = false;
- for( unsigned int a = 0; a < pScene->mNumMeshes; a++)
- if(ProcessMesh( pScene->mMeshes[a],a))bHas = true;
+ bool bHas( false );
+ for (unsigned int a = 0; a < pScene->mNumMeshes; ++a) {
+ if (ProcessMesh(pScene->mMeshes[a], a)) {
+ bHas = true;
+ }
+ }
- if (bHas)
- DefaultLogger::get()->debug("FixInfacingNormalsProcess finished. Found issues.");
- else DefaultLogger::get()->debug("FixInfacingNormalsProcess finished. No changes to the scene.");
+ if (bHas) {
+ ASSIMP_LOG_DEBUG("FixInfacingNormalsProcess finished. Found issues.");
+ } else {
+ ASSIMP_LOG_DEBUG("FixInfacingNormalsProcess finished. No changes to the scene.");
+ }
}
// ------------------------------------------------------------------------------------------------
// Apply the step to the mesh
bool FixInfacingNormalsProcess::ProcessMesh( aiMesh* pcMesh, unsigned int index)
{
- ai_assert(NULL != pcMesh);
+ ai_assert(nullptr != pcMesh);
// Nothing to do if there are no model normals
- if (!pcMesh->HasNormals())return false;
+ if (!pcMesh->HasNormals()) {
+ return false;
+ }
// Compute the bounding box of both the model vertices + normals and
- // the umodified model vertices. Then check whether the first BB
+ // the unmodified model vertices. Then check whether the first BB
// is smaller than the second. In this case we can assume that the
// normals need to be flipped, although there are a few special cases ..
// convex, concave, planar models ...
@@ -154,14 +162,9 @@ bool FixInfacingNormalsProcess::ProcessMesh( aiMesh* pcMesh, unsigned int index)
if (fDelta1_z < 0.05f * std::sqrt( fDelta1_y * fDelta1_x ))return false;
// now compare the volumes of the bounding boxes
- if (std::fabs(fDelta0_x * fDelta0_y * fDelta0_z) <
- std::fabs(fDelta1_x * fDelta1_yz))
- {
- if (!DefaultLogger::isNullLogger())
- {
- char buffer[128]; // should be sufficiently large
- ai_snprintf(buffer,128,"Mesh %u: Normals are facing inwards (or the mesh is planar)",index);
- DefaultLogger::get()->info(buffer);
+ if (std::fabs(fDelta0_x * fDelta0_y * fDelta0_z) < std::fabs(fDelta1_x * fDelta1_yz)) {
+ if (!DefaultLogger::isNullLogger()) {
+ ASSIMP_LOG_INFO_F("Mesh ", index, ": Normals are facing inwards (or the mesh is planar)", index);
}
// Invert normals
diff --git a/code/FixNormalsStep.h b/code/FixNormalsStep.h
index b47155ccd..389e6e1a6 100644
--- a/code/FixNormalsStep.h
+++ b/code/FixNormalsStep.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -56,14 +57,11 @@ namespace Assimp
* vectors of an object are facing inwards. In this case they will be
* flipped.
*/
-class FixInfacingNormalsProcess : public BaseProcess
-{
+class FixInfacingNormalsProcess : public BaseProcess {
public:
-
FixInfacingNormalsProcess();
~FixInfacingNormalsProcess();
-public:
// -------------------------------------------------------------------
/** Returns whether the processing step is present in the given flag field.
* @param pFlags The processing flags the importer was called with. A bitwise
diff --git a/code/GenFaceNormalsProcess.cpp b/code/GenFaceNormalsProcess.cpp
index 82d80db77..43960ac3b 100644
--- a/code/GenFaceNormalsProcess.cpp
+++ b/code/GenFaceNormalsProcess.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -49,8 +50,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/postprocess.h>
#include <assimp/scene.h>
#include <assimp/DefaultLogger.hpp>
-#include "Exceptional.h"
-#include "qnan.h"
+#include <assimp/Exceptional.h>
+#include <assimp/qnan.h>
using namespace Assimp;
@@ -71,16 +72,15 @@ GenFaceNormalsProcess::~GenFaceNormalsProcess()
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag field.
-bool GenFaceNormalsProcess::IsActive( unsigned int pFlags) const
-{
+bool GenFaceNormalsProcess::IsActive( unsigned int pFlags) const {
+ force_ = (pFlags & aiProcess_ForceGenNormals) != 0;
return (pFlags & aiProcess_GenNormals) != 0;
}
// ------------------------------------------------------------------------------------------------
// Executes the post processing step on the given imported data.
-void GenFaceNormalsProcess::Execute( aiScene* pScene)
-{
- DefaultLogger::get()->debug("GenFaceNormalsProcess begin");
+void GenFaceNormalsProcess::Execute( aiScene* pScene) {
+ ASSIMP_LOG_DEBUG("GenFaceNormalsProcess begin");
if (pScene->mFlags & AI_SCENE_FLAGS_NON_VERBOSE_FORMAT) {
throw DeadlyImportError("Post-processing order mismatch: expecting pseudo-indexed (\"verbose\") vertices here");
@@ -93,11 +93,12 @@ void GenFaceNormalsProcess::Execute( aiScene* pScene)
}
}
if (bHas) {
- DefaultLogger::get()->info("GenFaceNormalsProcess finished. "
+ ASSIMP_LOG_INFO("GenFaceNormalsProcess finished. "
"Face normals have been calculated");
+ } else {
+ ASSIMP_LOG_DEBUG("GenFaceNormalsProcess finished. "
+ "Normals are already there");
}
- else DefaultLogger::get()->debug("GenFaceNormalsProcess finished. "
- "Normals are already there");
}
// ------------------------------------------------------------------------------------------------
@@ -105,14 +106,15 @@ void GenFaceNormalsProcess::Execute( aiScene* pScene)
bool GenFaceNormalsProcess::GenMeshFaceNormals (aiMesh* pMesh)
{
if (NULL != pMesh->mNormals) {
- return false;
+ if (force_) delete[] pMesh->mNormals;
+ else return false;
}
// If the mesh consists of lines and/or points but not of
// triangles or higher-order polygons the normal vectors
// are undefined.
if (!(pMesh->mPrimitiveTypes & (aiPrimitiveType_TRIANGLE | aiPrimitiveType_POLYGON))) {
- DefaultLogger::get()->info("Normal vectors are undefined for line and point meshes");
+ ASSIMP_LOG_INFO("Normal vectors are undefined for line and point meshes");
return false;
}
@@ -134,7 +136,7 @@ bool GenFaceNormalsProcess::GenMeshFaceNormals (aiMesh* pMesh)
const aiVector3D* pV1 = &pMesh->mVertices[face.mIndices[0]];
const aiVector3D* pV2 = &pMesh->mVertices[face.mIndices[1]];
const aiVector3D* pV3 = &pMesh->mVertices[face.mIndices[face.mNumIndices-1]];
- const aiVector3D vNor = ((*pV2 - *pV1) ^ (*pV3 - *pV1)).Normalize();
+ const aiVector3D vNor = ((*pV2 - *pV1) ^ (*pV3 - *pV1)).NormalizeSafe();
for (unsigned int i = 0;i < face.mNumIndices;++i) {
pMesh->mNormals[face.mIndices[i]] = vNor;
diff --git a/code/GenFaceNormalsProcess.h b/code/GenFaceNormalsProcess.h
index 024c74a28..e2f41e07f 100644
--- a/code/GenFaceNormalsProcess.h
+++ b/code/GenFaceNormalsProcess.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -77,7 +78,8 @@ public:
private:
- bool GenMeshFaceNormals (aiMesh* pcMesh);
+ bool GenMeshFaceNormals(aiMesh* pcMesh);
+ mutable bool force_ = false;
};
} // end of namespace Assimp
diff --git a/code/GenVertexNormalsProcess.cpp b/code/GenVertexNormalsProcess.cpp
index 93c0e1351..1778ef513 100644
--- a/code/GenVertexNormalsProcess.cpp
+++ b/code/GenVertexNormalsProcess.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -49,8 +50,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// internal headers
#include "GenVertexNormalsProcess.h"
#include "ProcessHelper.h"
-#include "Exceptional.h"
-#include "qnan.h"
+#include <assimp/Exceptional.h>
+#include <assimp/qnan.h>
using namespace Assimp;
@@ -71,6 +72,7 @@ GenVertexNormalsProcess::~GenVertexNormalsProcess() {
// Returns whether the processing step is present in the given flag field.
bool GenVertexNormalsProcess::IsActive( unsigned int pFlags) const
{
+ force_ = (pFlags & aiProcess_ForceGenNormals) != 0;
return (pFlags & aiProcess_GenSmoothNormals) != 0;
}
@@ -87,39 +89,42 @@ void GenVertexNormalsProcess::SetupProperties(const Importer* pImp)
// Executes the post processing step on the given imported data.
void GenVertexNormalsProcess::Execute( aiScene* pScene)
{
- DefaultLogger::get()->debug("GenVertexNormalsProcess begin");
+ ASSIMP_LOG_DEBUG("GenVertexNormalsProcess begin");
- if (pScene->mFlags & AI_SCENE_FLAGS_NON_VERBOSE_FORMAT)
+ if (pScene->mFlags & AI_SCENE_FLAGS_NON_VERBOSE_FORMAT) {
throw DeadlyImportError("Post-processing order mismatch: expecting pseudo-indexed (\"verbose\") vertices here");
+ }
bool bHas = false;
- for( unsigned int a = 0; a < pScene->mNumMeshes; a++)
- {
+ for( unsigned int a = 0; a < pScene->mNumMeshes; ++a) {
if(GenMeshVertexNormals( pScene->mMeshes[a],a))
bHas = true;
}
if (bHas) {
- DefaultLogger::get()->info("GenVertexNormalsProcess finished. "
+ ASSIMP_LOG_INFO("GenVertexNormalsProcess finished. "
"Vertex normals have been calculated");
+ } else {
+ ASSIMP_LOG_DEBUG("GenVertexNormalsProcess finished. "
+ "Normals are already there");
}
- else DefaultLogger::get()->debug("GenVertexNormalsProcess finished. "
- "Normals are already there");
}
// ------------------------------------------------------------------------------------------------
// Executes the post processing step on the given imported data.
bool GenVertexNormalsProcess::GenMeshVertexNormals (aiMesh* pMesh, unsigned int meshIndex)
{
- if (NULL != pMesh->mNormals)
- return false;
+ if (NULL != pMesh->mNormals) {
+ if (force_) delete[] pMesh->mNormals;
+ else return false;
+ }
// If the mesh consists of lines and/or points but not of
// triangles or higher-order polygons the normal vectors
// are undefined.
if (!(pMesh->mPrimitiveTypes & (aiPrimitiveType_TRIANGLE | aiPrimitiveType_POLYGON)))
{
- DefaultLogger::get()->info("Normal vectors are undefined for line and point meshes");
+ ASSIMP_LOG_INFO("Normal vectors are undefined for line and point meshes");
return false;
}
@@ -144,7 +149,7 @@ bool GenVertexNormalsProcess::GenMeshVertexNormals (aiMesh* pMesh, unsigned int
const aiVector3D* pV1 = &pMesh->mVertices[face.mIndices[0]];
const aiVector3D* pV2 = &pMesh->mVertices[face.mIndices[1]];
const aiVector3D* pV3 = &pMesh->mVertices[face.mIndices[face.mNumIndices-1]];
- const aiVector3D vNor = ((*pV2 - *pV1) ^ (*pV3 - *pV1));
+ const aiVector3D vNor = ((*pV2 - *pV1) ^ (*pV3 - *pV1)).NormalizeSafe();
for (unsigned int i = 0;i < face.mNumIndices;++i) {
pMesh->mNormals[face.mIndices[i]] = vNor;
@@ -212,17 +217,15 @@ bool GenVertexNormalsProcess::GenMeshVertexNormals (aiMesh* pMesh, unsigned int
vertexFinder->FindPositions( pMesh->mVertices[i] , posEpsilon, verticesFound);
aiVector3D vr = pMesh->mNormals[i];
- ai_real vrlen = vr.Length();
aiVector3D pcNor;
for (unsigned int a = 0; a < verticesFound.size(); ++a) {
aiVector3D v = pMesh->mNormals[verticesFound[a]];
- // check whether the angle between the two normals is not too large
- // HACK: if v.x is qnan the dot product will become qnan, too
- // therefore the comparison against fLimit should be false
- // in every case.
- if (v * vr >= fLimit * vrlen * v.Length())
+ // Check whether the angle between the two normals is not too large.
+ // Skip the angle check on our own normal to avoid false negatives
+ // (v*v is not guaranteed to be 1.0 for all unit vectors v)
+ if (is_not_qnan(v.x) && (verticesFound[a] == i || (v * vr >= fLimit)))
pcNor += v;
}
pcNew[i] = pcNor.NormalizeSafe();
diff --git a/code/GenVertexNormalsProcess.h b/code/GenVertexNormalsProcess.h
index 0471ed6b0..2efafa302 100644
--- a/code/GenVertexNormalsProcess.h
+++ b/code/GenVertexNormalsProcess.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -106,6 +107,7 @@ private:
/** Configuration option: maximum smoothing angle, in radians*/
ai_real configMaxAngle;
+ mutable bool force_ = false;
};
} // end of namespace Assimp
diff --git a/code/HMPFileData.h b/code/HMPFileData.h
index 3c060ba1a..962f2f9c7 100644
--- a/code/HMPFileData.h
+++ b/code/HMPFileData.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -45,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace Assimp {
namespace HMP {
-#include "./../include/assimp/Compiler/pushpack1.h"
+#include <assimp/Compiler/pushpack1.h>
#include <stdint.h>
// to make it easier for us, we test the magic word against both "endianesses"
@@ -130,7 +131,7 @@ struct Vertex_HMP7
int8_t normal_x,normal_y;
} PACK_STRUCT;
-#include "./../include/assimp/Compiler/poppack1.h"
+#include <assimp/Compiler/poppack1.h>
} //! namespace HMP
} //! namespace Assimp
diff --git a/code/HMPLoader.cpp b/code/HMPLoader.cpp
index a6a0262bf..7f53f9b54 100644
--- a/code/HMPLoader.cpp
+++ b/code/HMPLoader.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -140,21 +141,21 @@ void HMPImporter::InternReadFile( const std::string& pFile,
if (AI_HMP_MAGIC_NUMBER_LE_4 == iMagic ||
AI_HMP_MAGIC_NUMBER_BE_4 == iMagic)
{
- DefaultLogger::get()->debug("HMP subtype: 3D GameStudio A4, magic word is HMP4");
+ ASSIMP_LOG_DEBUG("HMP subtype: 3D GameStudio A4, magic word is HMP4");
InternReadFile_HMP4();
}
// HMP5 format
else if (AI_HMP_MAGIC_NUMBER_LE_5 == iMagic ||
AI_HMP_MAGIC_NUMBER_BE_5 == iMagic)
{
- DefaultLogger::get()->debug("HMP subtype: 3D GameStudio A5, magic word is HMP5");
+ ASSIMP_LOG_DEBUG("HMP subtype: 3D GameStudio A5, magic word is HMP5");
InternReadFile_HMP5();
}
// HMP7 format
else if (AI_HMP_MAGIC_NUMBER_LE_7 == iMagic ||
AI_HMP_MAGIC_NUMBER_BE_7 == iMagic)
{
- DefaultLogger::get()->debug("HMP subtype: 3D GameStudio A7, magic word is HMP7");
+ ASSIMP_LOG_DEBUG("HMP subtype: 3D GameStudio A7, magic word is HMP7");
InternReadFile_HMP7();
}
else
@@ -448,7 +449,8 @@ void HMPImporter::CreateOutputFaceList(unsigned int width,unsigned int height)
void HMPImporter::ReadFirstSkin(unsigned int iNumSkins, const unsigned char* szCursor,
const unsigned char** szCursorOut)
{
- ai_assert(0 != iNumSkins && NULL != szCursor);
+ ai_assert( 0 != iNumSkins );
+ ai_assert( nullptr != szCursor);
// read the type of the skin ...
// sometimes we need to skip 12 bytes here, I don't know why ...
diff --git a/code/HMPLoader.h b/code/HMPLoader.h
index 546643e8d..4e513aee6 100644
--- a/code/HMPLoader.h
+++ b/code/HMPLoader.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -46,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define AI_HMPLOADER_H_INCLUDED
// internal headers
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
#include "MDLLoader.h"
#include "HMPFileData.h"
diff --git a/code/HalfLifeFileData.h b/code/HalfLifeFileData.h
index 3a36d2422..7c55657d4 100644
--- a/code/HalfLifeFileData.h
+++ b/code/HalfLifeFileData.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -50,7 +51,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_MDLFILEHELPER2_H_INC
#define AI_MDLFILEHELPER2_H_INC
-#include "./../include/assimp/Compiler/pushpack1.h"
+#include <assimp/Compiler/pushpack1.h>
namespace Assimp {
namespace MDL {
@@ -140,7 +141,7 @@ struct Header_HL2 {
int32_t transitionindex;
} /* PACK_STRUCT */;
-#include "./../include/assimp/Compiler/poppack1.h"
+#include <assimp/Compiler/poppack1.h>
}
} // end namespaces
diff --git a/code/IFF.h b/code/IFF.h
index 2b42b554b..91d7d4828 100644
--- a/code/IFF.h
+++ b/code/IFF.h
@@ -5,7 +5,7 @@
#ifndef AI_IFF_H_INCLUDED
#define AI_IFF_H_INCLUDED
-#include "ByteSwapper.h"
+#include <assimp/ByteSwapper.h>
namespace Assimp {
namespace IFF {
diff --git a/code/IRRLoader.cpp b/code/IRRLoader.cpp
index 8cc4acaad..0640b0d66 100644
--- a/code/IRRLoader.cpp
+++ b/code/IRRLoader.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -49,16 +50,16 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_NO_IRR_IMPORTER
#include "IRRLoader.h"
-#include "ParsingUtils.h"
-#include "fast_atof.h"
-#include "GenericProperty.h"
+#include <assimp/ParsingUtils.h>
+#include <assimp/fast_atof.h>
+#include <assimp/GenericProperty.h>
#include <assimp/SceneCombiner.h>
-#include "StandardShapes.h"
+#include <assimp/StandardShapes.h>
#include "Importer.h"
// We need MathFunctions.h to compute the lcm/gcd of a number
-#include "MathFunctions.h"
+#include <assimp/MathFunctions.h>
#include <memory>
#include <assimp/DefaultLogger.hpp>
#include <assimp/mesh.h>
@@ -99,26 +100,22 @@ IRRImporter::~IRRImporter()
// ------------------------------------------------------------------------------------------------
// Returns whether the class can handle the format of the given file.
-bool IRRImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
-{
- /* NOTE: A simple check for the file extension is not enough
- * here. Irrmesh and irr are easy, but xml is too generic
- * and could be collada, too. So we need to open the file and
- * search for typical tokens.
- */
+bool IRRImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const {
const std::string extension = GetExtension(pFile);
-
- if (extension == "irr")return true;
- else if (extension == "xml" || checkSig)
- {
+ if ( extension == "irr" ) {
+ return true;
+ } else if (extension == "xml" || checkSig) {
/* If CanRead() is called in order to check whether we
* support a specific file extension in general pIOHandler
* might be NULL and it's our duty to return true here.
*/
- if (!pIOHandler)return true;
+ if ( nullptr == pIOHandler ) {
+ return true;
+ }
const char* tokens[] = {"irr_scene"};
return SearchFileHeaderForToken(pIOHandler,pFile,tokens,1);
}
+
return false;
}
@@ -134,7 +131,7 @@ void IRRImporter::SetupProperties(const Importer* pImp)
// read the output frame rate of all node animation channels
fps = pImp->GetPropertyInteger(AI_CONFIG_IMPORT_IRR_ANIM_FPS,100);
if (fps < 10.) {
- DefaultLogger::get()->error("IRR: Invalid FPS configuration");
+ ASSIMP_LOG_ERROR("IRR: Invalid FPS configuration");
fps = 100;
}
@@ -284,7 +281,7 @@ void IRRImporter::CopyMaterial(std::vector<aiMaterial*>& materials,
return;
}
else if (inmaterials.size() > 1) {
- DefaultLogger::get()->info("IRR: Skipping additional materials");
+ ASSIMP_LOG_INFO("IRR: Skipping additional materials");
}
mesh->mMaterialIndex = (unsigned int)materials.size();
@@ -322,17 +319,18 @@ void IRRImporter::ComputeAnimations(Node* root, aiNode* real, std::vector<aiNode
if (root->animators.empty()) {
return;
}
- unsigned int total = 0;
+ unsigned int total( 0 );
for (std::list<Animator>::iterator it = root->animators.begin();it != root->animators.end(); ++it) {
if ((*it).type == Animator::UNKNOWN || (*it).type == Animator::OTHER) {
- DefaultLogger::get()->warn("IRR: Skipping unknown or unsupported animator");
+ ASSIMP_LOG_WARN("IRR: Skipping unknown or unsupported animator");
continue;
}
++total;
}
- if (!total)return;
- else if (1 == total) {
- DefaultLogger::get()->warn("IRR: Adding dummy nodes to simulate multiple animators");
+ if (!total) {
+ return;
+ } else if (1 == total) {
+ ASSIMP_LOG_WARN("IRR: Adding dummy nodes to simulate multiple animators");
}
// NOTE: 1 tick == i millisecond
@@ -394,7 +392,7 @@ void IRRImporter::ComputeAnimations(Node* root, aiNode* real, std::vector<aiNode
angles[1] %= 360;
angles[2] %= 360;
- if ((angles[0]*angles[1]) && (angles[1]*angles[2]))
+ if ( (angles[0]*angles[1]) != 0 && (angles[1]*angles[2]) != 0 )
{
FindSuitableMultiple(angles[0]);
FindSuitableMultiple(angles[1]);
@@ -521,9 +519,9 @@ void IRRImporter::ComputeAnimations(Node* root, aiNode* real, std::vector<aiNode
const int size = (int)in.splineKeys.size();
if (!size) {
// We have no point in the spline. That's bad. Really bad.
- DefaultLogger::get()->warn("IRR: Spline animators with no points defined");
+ ASSIMP_LOG_WARN("IRR: Spline animators with no points defined");
- delete anim;anim = NULL;
+ delete anim;anim = nullptr;
break;
}
else if (size == 1) {
@@ -675,7 +673,7 @@ void IRRImporter::GenerateGraph(Node* root,aiNode* rootOut ,aiScene* scene,
// graph we're currently building
aiScene* scene = batch.GetImport(root->id);
if (!scene) {
- DefaultLogger::get()->error("IRR: Unable to load external file: " + root->meshPath);
+ ASSIMP_LOG_ERROR("IRR: Unable to load external file: " + root->meshPath);
break;
}
attach.push_back(AttachmentInfo(scene,rootOut));
@@ -686,7 +684,7 @@ void IRRImporter::GenerateGraph(Node* root,aiNode* rootOut ,aiScene* scene,
// should be equal. If they are not, we can impossibly
// do this ...
if (root->materials.size() != (unsigned int)scene->mNumMaterials) {
- DefaultLogger::get()->warn("IRR: Failed to match imported materials "
+ ASSIMP_LOG_WARN("IRR: Failed to match imported materials "
"with the materials found in the IRR scene file");
break;
@@ -725,7 +723,7 @@ void IRRImporter::GenerateGraph(Node* root,aiNode* rootOut ,aiScene* scene,
}
}
if (bdo) {
- DefaultLogger::get()->info("IRR: Replacing mesh vertex alpha with common opacity");
+ ASSIMP_LOG_INFO("IRR: Replacing mesh vertex alpha with common opacity");
for (unsigned int a = 0; a < mesh->mNumVertices;++a)
mesh->mColors[0][a].a = 1.f;
@@ -809,7 +807,7 @@ void IRRImporter::GenerateGraph(Node* root,aiNode* rootOut ,aiScene* scene,
{
// A skybox is defined by six materials
if (root->materials.size() < 6) {
- DefaultLogger::get()->error("IRR: There should be six materials for a skybox");
+ ASSIMP_LOG_ERROR("IRR: There should be six materials for a skybox");
break;
}
@@ -826,7 +824,7 @@ void IRRImporter::GenerateGraph(Node* root,aiNode* rootOut ,aiScene* scene,
// for IRR skyboxes. We add a 'IRR.SkyBox_' prefix to the node.
// *************************************************************
root->name = "IRR.SkyBox_" + root->name;
- DefaultLogger::get()->info("IRR: Loading skybox, this will "
+ ASSIMP_LOG_INFO("IRR: Loading skybox, this will "
"require special handling to be displayed correctly");
}
break;
@@ -834,7 +832,7 @@ void IRRImporter::GenerateGraph(Node* root,aiNode* rootOut ,aiScene* scene,
case Node::TERRAIN:
{
// to support terrains, we'd need to have a texture decoder
- DefaultLogger::get()->error("IRR: Unsupported node - TERRAIN");
+ ASSIMP_LOG_ERROR("IRR: Unsupported node - TERRAIN");
}
break;
default:
@@ -1013,11 +1011,11 @@ void IRRImporter::InternReadFile( const std::string& pFile,
}
else if (!ASSIMP_stricmp(sz,"billBoard")) {
// We don't support billboards, so ignore them
- DefaultLogger::get()->error("IRR: Billboards are not supported by Assimp");
+ ASSIMP_LOG_ERROR("IRR: Billboards are not supported by Assimp");
nd = new Node(Node::DUMMY);
}
else {
- DefaultLogger::get()->warn("IRR: Found unknown node: " + std::string(sz));
+ ASSIMP_LOG_WARN("IRR: Found unknown node: " + std::string(sz));
/* We skip the contents of nodes we don't know.
* We parse the transformation and all animators
@@ -1044,7 +1042,7 @@ void IRRImporter::InternReadFile( const std::string& pFile,
*/
if (!curNode) {
#if 0
- DefaultLogger::get()->error("IRR: Encountered <attributes> element, but "
+ ASSIMP_LOG_ERROR("IRR: Encountered <attributes> element, but "
"there is no node active");
#endif
continue;
@@ -1272,7 +1270,7 @@ void IRRImporter::InternReadFile( const std::string& pFile,
lights.pop_back();
curNode->type = Node::DUMMY;
- DefaultLogger::get()->error("Ignoring light of unknown type: " + prop.value);
+ ASSIMP_LOG_ERROR("Ignoring light of unknown type: " + prop.value);
}
}
else if ((prop.name == "Mesh" && Node::MESH == curNode->type) ||
@@ -1280,7 +1278,7 @@ void IRRImporter::InternReadFile( const std::string& pFile,
{
/* This is the file name of the mesh - either
* animated or not. We need to make sure we setup
- * the correct postprocessing settings here.
+ * the correct post-processing settings here.
*/
unsigned int pp = 0;
BatchLoader::PropertyMap map;
@@ -1302,7 +1300,7 @@ void IRRImporter::InternReadFile( const std::string& pFile,
const std::string extension = GetExtension(prop.value);
if ("irr" == extension) {
- DefaultLogger::get()->error("IRR: Can't load another IRR file recursively");
+ ASSIMP_LOG_ERROR("IRR: Can't load another IRR file recursively");
}
else
{
@@ -1326,7 +1324,7 @@ void IRRImporter::InternReadFile( const std::string& pFile,
curAnim->type = Animator::FOLLOW_SPLINE;
}
else {
- DefaultLogger::get()->warn("IRR: Ignoring unknown animator: "
+ ASSIMP_LOG_WARN("IRR: Ignoring unknown animator: "
+ prop.value);
curAnim->type = Animator::UNKNOWN;
@@ -1351,7 +1349,7 @@ void IRRImporter::InternReadFile( const std::string& pFile,
// back in the node hierarchy
if (!curParent) {
curParent = root;
- DefaultLogger::get()->error("IRR: Too many closing <node> elements");
+ ASSIMP_LOG_ERROR("IRR: Too many closing <node> elements");
}
else curParent = curParent->parent;
}
@@ -1372,15 +1370,14 @@ void IRRImporter::InternReadFile( const std::string& pFile,
}
}
- /* Now iterate through all cameras and compute their final (horizontal) FOV
- */
+ // Now iterate through all cameras and compute their final (horizontal) FOV
for (aiCamera *cam : cameras) {
-
// screen aspect could be missing
if (cam->mAspect) {
cam->mHorizontalFOV *= cam->mAspect;
+ } else {
+ ASSIMP_LOG_WARN("IRR: Camera aspect is not given, can't compute horizontal FOV");
}
- else DefaultLogger::get()->warn("IRR: Camera aspect is not given, can't compute horizontal FOV");
}
batch.LoadAll();
@@ -1475,7 +1472,7 @@ void IRRImporter::InternReadFile( const std::string& pFile,
* models from external files
*/
if (!pScene->mNumMeshes || !pScene->mNumMaterials) {
- DefaultLogger::get()->warn("IRR: No meshes loaded, setting AI_SCENE_FLAGS_INCOMPLETE");
+ ASSIMP_LOG_WARN("IRR: No meshes loaded, setting AI_SCENE_FLAGS_INCOMPLETE");
pScene->mFlags |= AI_SCENE_FLAGS_INCOMPLETE;
}
diff --git a/code/IRRLoader.h b/code/IRRLoader.h
index d07199c0b..3bd39092a 100644
--- a/code/IRRLoader.h
+++ b/code/IRRLoader.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -50,7 +51,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "IRRShared.h"
#include <assimp/SceneCombiner.h>
#include "Importer.h"
-#include "StringUtils.h"
+#include <assimp/StringUtils.h>
#include <assimp/anim.h>
namespace Assimp {
diff --git a/code/IRRMeshLoader.cpp b/code/IRRMeshLoader.cpp
index a63a2a134..85de42195 100644
--- a/code/IRRMeshLoader.cpp
+++ b/code/IRRMeshLoader.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -47,8 +48,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_NO_IRRMESH_IMPORTER
#include "IRRMeshLoader.h"
-#include "ParsingUtils.h"
-#include "fast_atof.h"
+#include <assimp/ParsingUtils.h>
+#include <assimp/fast_atof.h>
#include <memory>
#include <assimp/IOSystem.hpp>
#include <assimp/mesh.h>
@@ -56,7 +57,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/material.h>
#include <assimp/scene.h>
#include <assimp/importerdesc.h>
-#include "Macros.h"
+#include <assimp/Macros.h>
using namespace Assimp;
using namespace irr;
@@ -174,7 +175,7 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
if (!ASSIMP_stricmp(reader->getNodeName(),"buffer") && (curMat || curMesh)) {
// end of previous buffer. A material and a mesh should be there
if ( !curMat || !curMesh) {
- DefaultLogger::get()->error("IRRMESH: A buffer must contain a mesh and a material");
+ ASSIMP_LOG_ERROR("IRRMESH: A buffer must contain a mesh and a material");
releaseMaterial( &curMat );
releaseMesh( &curMesh );
} else {
@@ -196,7 +197,7 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
if (!ASSIMP_stricmp(reader->getNodeName(),"material")) {
if (curMat) {
- DefaultLogger::get()->warn("IRRMESH: Only one material description per buffer, please");
+ ASSIMP_LOG_WARN("IRRMESH: Only one material description per buffer, please");
releaseMaterial( &curMat );
}
curMat = ParseMaterial(curMatFlags);
@@ -207,7 +208,7 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
if (!num) {
// This is possible ... remove the mesh from the list and skip further reading
- DefaultLogger::get()->warn("IRRMESH: Found mesh with zero vertices");
+ ASSIMP_LOG_WARN("IRRMESH: Found mesh with zero vertices");
releaseMaterial( &curMat );
releaseMesh( &curMesh );
@@ -254,7 +255,7 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
}
else if (ASSIMP_stricmp("standard", t)) {
releaseMaterial( &curMat );
- DefaultLogger::get()->warn("IRRMESH: Unknown vertex format");
+ ASSIMP_LOG_WARN("IRRMESH: Unknown vertex format");
}
else vertexFormat = 0;
textMeaning = 1;
@@ -274,7 +275,7 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
curMesh->mNumVertices = reader->getAttributeValueAsInt("indexCount");
if (!curMesh->mNumVertices) {
// This is possible ... remove the mesh from the list and skip further reading
- DefaultLogger::get()->warn("IRRMESH: Found mesh with zero indices");
+ ASSIMP_LOG_WARN("IRRMESH: Found mesh with zero indices");
// mesh - away
releaseMesh( &curMesh );
@@ -287,7 +288,7 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
}
if (curMesh->mNumVertices % 3) {
- DefaultLogger::get()->warn("IRRMESH: Number if indices isn't divisible by 3");
+ ASSIMP_LOG_WARN("IRRMESH: Number if indices isn't divisible by 3");
}
curMesh->mNumFaces = curMesh->mNumVertices / 3;
@@ -438,7 +439,7 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
unsigned int total = 0;
while(SkipSpacesAndLineEnd(&sz)) {
if (curFace >= faceEnd) {
- DefaultLogger::get()->error("IRRMESH: Too many indices");
+ ASSIMP_LOG_ERROR("IRRMESH: Too many indices");
break;
}
if (!curIdx) {
@@ -448,7 +449,7 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
unsigned int idx = strtoul10(sz,&sz);
if (idx >= curVertices.size()) {
- DefaultLogger::get()->error("IRRMESH: Index out of range");
+ ASSIMP_LOG_ERROR("IRRMESH: Index out of range");
idx = 0;
}
@@ -469,7 +470,7 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
}
if (curFace != faceEnd)
- DefaultLogger::get()->error("IRRMESH: Not enough indices");
+ ASSIMP_LOG_ERROR("IRRMESH: Not enough indices");
// Finish processing the mesh - do some small material workarounds
if (curMatFlags & AI_IRRMESH_MAT_trans_vertex_alpha && !useColors) {
@@ -491,7 +492,7 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
// End of the last buffer. A material and a mesh should be there
if (curMat || curMesh) {
if ( !curMat || !curMesh) {
- DefaultLogger::get()->error("IRRMESH: A buffer must contain a mesh and a material");
+ ASSIMP_LOG_ERROR("IRRMESH: A buffer must contain a mesh and a material");
releaseMaterial( &curMat );
releaseMesh( &curMesh );
}
diff --git a/code/IRRMeshLoader.h b/code/IRRMeshLoader.h
index 312dbbfe0..ef6a8a11b 100644
--- a/code/IRRMeshLoader.h
+++ b/code/IRRMeshLoader.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -46,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_IRRMESHLOADER_H_INCLUDED
#define AI_IRRMESHLOADER_H_INCLUDED
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
#include "IRRShared.h"
#ifndef ASSIMP_BUILD_NO_IRRMESH_IMPORTER
diff --git a/code/IRRShared.cpp b/code/IRRShared.cpp
index bfe408629..1e69f1d09 100644
--- a/code/IRRShared.cpp
+++ b/code/IRRShared.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -50,8 +51,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#if !(defined(ASSIMP_BUILD_NO_IRR_IMPORTER) && defined(ASSIMP_BUILD_NO_IRRMESH_IMPORTER))
#include "IRRShared.h"
-#include "ParsingUtils.h"
-#include "fast_atof.h"
+#include <assimp/ParsingUtils.h>
+#include <assimp/fast_atof.h>
#include <assimp/DefaultLogger.hpp>
#include <assimp/material.h>
@@ -178,14 +179,14 @@ void IrrlichtBase::ReadVectorProperty (VectorProperty& out)
SkipSpaces(&ptr);
if (',' != *ptr)
{
- DefaultLogger::get()->error("IRR(MESH): Expected comma in vector definition");
+ ASSIMP_LOG_ERROR("IRR(MESH): Expected comma in vector definition");
}
else SkipSpaces(ptr+1,&ptr);
ptr = fast_atoreal_move<float>( ptr,(float&)out.value.y );
SkipSpaces(&ptr);
if (',' != *ptr)
{
- DefaultLogger::get()->error("IRR(MESH): Expected comma in vector definition");
+ ASSIMP_LOG_ERROR("IRR(MESH): Expected comma in vector definition");
}
else SkipSpaces(ptr+1,&ptr);
ptr = fast_atoreal_move<float>( ptr,(float&)out.value.z );
@@ -359,7 +360,7 @@ aiMaterial* IrrlichtBase::ParseMaterial(unsigned int& matFlags)
matFlags = AI_IRRMESH_MAT_normalmap_ta;
}
else {
- DefaultLogger::get()->warn("IRRMat: Unrecognized material type: " + prop.value);
+ ASSIMP_LOG_WARN("IRRMat: Unrecognized material type: " + prop.value);
}
}
@@ -390,9 +391,7 @@ aiMaterial* IrrlichtBase::ParseMaterial(unsigned int& matFlags)
// set the corresponding material flag
matFlags |= AI_IRRMESH_EXTRA_2ND_TEXTURE;
- }
- // or just as second diffuse texture
- else if (matFlags & AI_IRRMESH_MAT_solid_2layer) {
+ } else if (matFlags & AI_IRRMESH_MAT_solid_2layer) {// or just as second diffuse texture
++cnt;
s.Set(prop.value);
mat->AddProperty(&s,AI_MATKEY_TEXTURE_DIFFUSE(1));
@@ -400,19 +399,15 @@ aiMaterial* IrrlichtBase::ParseMaterial(unsigned int& matFlags)
// set the corresponding material flag
matFlags |= AI_IRRMESH_EXTRA_2ND_TEXTURE;
+ } else {
+ ASSIMP_LOG_WARN("IRRmat: Skipping second texture");
}
- else DefaultLogger::get()->warn("IRRmat: Skipping second texture");
- }
-
- else if (prop.name == "Texture3" && cnt == 2)
- {
+ } else if (prop.name == "Texture3" && cnt == 2) {
// Irrlicht does not seem to use these channels.
++cnt;
s.Set(prop.value);
mat->AddProperty(&s,AI_MATKEY_TEXTURE_DIFFUSE(nd+1));
- }
- else if (prop.name == "Texture4" && cnt == 3)
- {
+ } else if (prop.name == "Texture4" && cnt == 3) {
// Irrlicht does not seem to use these channels.
++cnt;
s.Set(prop.value);
@@ -498,7 +493,8 @@ aiMaterial* IrrlichtBase::ParseMaterial(unsigned int& matFlags)
break;
}
}
- DefaultLogger::get()->error("IRRMESH: Unexpected end of file. Material is not complete");
+ ASSIMP_LOG_ERROR("IRRMESH: Unexpected end of file. Material is not complete");
+
return mat;
}
diff --git a/code/IRRShared.h b/code/IRRShared.h
index b5cd5d5ba..2f6f87405 100644
--- a/code/IRRShared.h
+++ b/code/IRRShared.h
@@ -7,8 +7,8 @@
#ifndef INCLUDED_AI_IRRSHARED_H
#define INCLUDED_AI_IRRSHARED_H
-#include "irrXMLWrapper.h"
-#include "BaseImporter.h"
+#include <assimp/irrXMLWrapper.h>
+#include <assimp/BaseImporter.h>
#include <stdint.h>
struct aiMaterial;
@@ -91,7 +91,7 @@ protected:
// -------------------------------------------------------------------
/** Read a property of the specified type from the current XML element.
- * @param out Recives output data
+ * @param out Receives output data
*/
void ReadHexProperty (HexProperty& out);
void ReadStringProperty (StringProperty& out);
diff --git a/code/Importer.cpp b/code/Importer.cpp
index eb0119693..fe6df187c 100644
--- a/code/Importer.cpp
+++ b/code/Importer.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -64,19 +65,19 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Internal headers
// ------------------------------------------------------------------------------------------------
#include "Importer.h"
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
#include "BaseProcess.h"
#include "DefaultProgressHandler.h"
-#include "GenericProperty.h"
+#include <assimp/GenericProperty.h>
#include "ProcessHelper.h"
#include "ScenePreprocessor.h"
#include "ScenePrivate.h"
-#include "MemoryIOWrapper.h"
-#include "Profiler.h"
-#include "TinyFormatter.h"
-#include "Exceptional.h"
-#include "Profiler.h"
+#include <assimp/MemoryIOWrapper.h>
+#include <assimp/Profiler.h>
+#include <assimp/TinyFormatter.h>
+#include <assimp/Exceptional.h>
+#include <assimp/Profiler.h>
#include <set>
#include <memory>
#include <cctype>
@@ -146,10 +147,7 @@ void AllocateFromAssimpHeap::operator delete[] ( void* data) {
// ------------------------------------------------------------------------------------------------
// Importer constructor.
Importer::Importer()
- : pimpl( NULL ) {
- // allocate the pimpl first
- pimpl = new ImporterPimpl();
-
+ : pimpl( new ImporterPimpl ) {
pimpl->mScene = NULL;
pimpl->mErrorString = "";
@@ -189,7 +187,7 @@ Importer::~Importer()
delete pimpl->mIOHandler;
delete pimpl->mProgressHandler;
- // Kill imported scene. Destructors should do that recursivly
+ // Kill imported scene. Destructor's should do that recursively
delete pimpl->mScene;
// Delete shared post-processing data
@@ -200,18 +198,6 @@ Importer::~Importer()
}
// ------------------------------------------------------------------------------------------------
-// Copy constructor - copies the config of another Importer, not the scene
-Importer::Importer(const Importer &other)
- : pimpl(NULL) {
- new(this) Importer();
-
- pimpl->mIntProperties = other.pimpl->mIntProperties;
- pimpl->mFloatProperties = other.pimpl->mFloatProperties;
- pimpl->mStringProperties = other.pimpl->mStringProperties;
- pimpl->mMatrixProperties = other.pimpl->mMatrixProperties;
-}
-
-// ------------------------------------------------------------------------------------------------
// Register a custom post-processing step
aiReturn Importer::RegisterPPStep(BaseProcess* pImp)
{
@@ -219,7 +205,7 @@ aiReturn Importer::RegisterPPStep(BaseProcess* pImp)
ASSIMP_BEGIN_EXCEPTION_REGION();
pimpl->mPostProcessingSteps.push_back(pImp);
- DefaultLogger::get()->info("Registering custom post-processing step");
+ ASSIMP_LOG_INFO("Registering custom post-processing step");
ASSIMP_END_EXCEPTION_REGION(aiReturn);
return AI_SUCCESS;
@@ -246,7 +232,7 @@ aiReturn Importer::RegisterLoader(BaseImporter* pImp)
#ifdef ASSIMP_BUILD_DEBUG
if (IsExtensionSupported(*it)) {
- DefaultLogger::get()->warn("The file extension " + *it + " is already in use");
+ ASSIMP_LOG_WARN_F("The file extension ", *it, " is already in use");
}
#endif
baked += *it;
@@ -254,7 +240,7 @@ aiReturn Importer::RegisterLoader(BaseImporter* pImp)
// add the loader
pimpl->mImporter.push_back(pImp);
- DefaultLogger::get()->info("Registering custom importer for these file extensions: " + baked);
+ ASSIMP_LOG_INFO_F("Registering custom importer for these file extensions: ", baked);
ASSIMP_END_EXCEPTION_REGION(aiReturn);
return AI_SUCCESS;
}
@@ -274,14 +260,10 @@ aiReturn Importer::UnregisterLoader(BaseImporter* pImp)
if (it != pimpl->mImporter.end()) {
pimpl->mImporter.erase(it);
-
- std::set<std::string> st;
- pImp->GetExtensionList(st);
-
- DefaultLogger::get()->info("Unregistering custom importer: ");
+ ASSIMP_LOG_INFO("Unregistering custom importer: ");
return AI_SUCCESS;
}
- DefaultLogger::get()->warn("Unable to remove custom importer: I can't find you ...");
+ ASSIMP_LOG_WARN("Unable to remove custom importer: I can't find you ...");
ASSIMP_END_EXCEPTION_REGION(aiReturn);
return AI_FAILURE;
}
@@ -301,10 +283,10 @@ aiReturn Importer::UnregisterPPStep(BaseProcess* pImp)
if (it != pimpl->mPostProcessingSteps.end()) {
pimpl->mPostProcessingSteps.erase(it);
- DefaultLogger::get()->info("Unregistering custom post-processing step");
+ ASSIMP_LOG_INFO("Unregistering custom post-processing step");
return AI_SUCCESS;
}
- DefaultLogger::get()->warn("Unable to remove custom post-processing step: I can't find you ..");
+ ASSIMP_LOG_WARN("Unable to remove custom post-processing step: I can't find you ..");
ASSIMP_END_EXCEPTION_REGION(aiReturn);
return AI_FAILURE;
}
@@ -333,22 +315,19 @@ void Importer::SetIOHandler( IOSystem* pIOHandler)
// ------------------------------------------------------------------------------------------------
// Get the currently set IO handler
-IOSystem* Importer::GetIOHandler() const
-{
+IOSystem* Importer::GetIOHandler() const {
return pimpl->mIOHandler;
}
// ------------------------------------------------------------------------------------------------
// Check whether a custom IO handler is currently set
-bool Importer::IsDefaultIOHandler() const
-{
+bool Importer::IsDefaultIOHandler() const {
return pimpl->mIsDefaultHandler;
}
// ------------------------------------------------------------------------------------------------
// Supplies a custom progress handler to get regular callbacks during importing
-void Importer::SetProgressHandler ( ProgressHandler* pHandler )
-{
+void Importer::SetProgressHandler ( ProgressHandler* pHandler ) {
ASSIMP_BEGIN_EXCEPTION_REGION();
// If the new handler is zero, allocate a default implementation.
if (!pHandler)
@@ -369,15 +348,13 @@ void Importer::SetProgressHandler ( ProgressHandler* pHandler )
// ------------------------------------------------------------------------------------------------
// Get the currently set progress handler
-ProgressHandler* Importer::GetProgressHandler() const
-{
+ProgressHandler* Importer::GetProgressHandler() const {
return pimpl->mProgressHandler;
}
// ------------------------------------------------------------------------------------------------
// Check whether a custom progress handler is currently set
-bool Importer::IsDefaultProgressHandler() const
-{
+bool Importer::IsDefaultProgressHandler() const {
return pimpl->mIsDefaultProgressHandler;
}
@@ -386,11 +363,11 @@ bool Importer::IsDefaultProgressHandler() const
bool _ValidateFlags(unsigned int pFlags)
{
if (pFlags & aiProcess_GenSmoothNormals && pFlags & aiProcess_GenNormals) {
- DefaultLogger::get()->error("#aiProcess_GenSmoothNormals and #aiProcess_GenNormals are incompatible");
+ ASSIMP_LOG_ERROR("#aiProcess_GenSmoothNormals and #aiProcess_GenNormals are incompatible");
return false;
}
if (pFlags & aiProcess_OptimizeGraph && pFlags & aiProcess_PreTransformVertices) {
- DefaultLogger::get()->error("#aiProcess_OptimizeGraph and #aiProcess_PreTransformVertices are incompatible");
+ ASSIMP_LOG_ERROR("#aiProcess_OptimizeGraph and #aiProcess_PreTransformVertices are incompatible");
return false;
}
return true;
@@ -401,6 +378,7 @@ bool _ValidateFlags(unsigned int pFlags)
void Importer::FreeScene( )
{
ASSIMP_BEGIN_EXCEPTION_REGION();
+
delete pimpl->mScene;
pimpl->mScene = NULL;
@@ -508,9 +486,9 @@ const aiScene* Importer::ReadFileFromMemory( const void* pBuffer,
SetIOHandler(new MemoryIOSystem((const uint8_t*)pBuffer,pLength));
// read the file and recover the previous IOSystem
- static const size_t BufferSize(Importer::MaxLenHint + 28);
- char fbuff[ BufferSize ];
- ai_snprintf(fbuff, BufferSize, "%s.%s",AI_MEMORYIO_MAGIC_FILENAME,pHint);
+ static const size_t BufSize(Importer::MaxLenHint + 28);
+ char fbuff[BufSize];
+ ai_snprintf(fbuff, BufSize, "%s.%s",AI_MEMORYIO_MAGIC_FILENAME,pHint);
ReadFile(fbuff,pFlags);
SetIOHandler(io);
@@ -522,26 +500,15 @@ const aiScene* Importer::ReadFileFromMemory( const void* pBuffer,
// ------------------------------------------------------------------------------------------------
void WriteLogOpening(const std::string& file)
{
- Logger* l = DefaultLogger::get();
- if (!l) {
- return;
- }
- l->info("Load " + file);
+ ASSIMP_LOG_INFO_F("Load ", file);
// print a full version dump. This is nice because we don't
// need to ask the authors of incoming bug reports for
// the library version they're using - a log dump is
// sufficient.
- const unsigned int flags = aiGetCompileFlags();
- l->debug(format()
- << "Assimp "
- << aiGetVersionMajor()
- << "."
- << aiGetVersionMinor()
- << "."
- << aiGetVersionRevision()
-
- << " "
+ const unsigned int flags( aiGetCompileFlags() );
+ std::stringstream stream;
+ stream << "Assimp " << aiGetVersionMajor() << "." << aiGetVersionMinor() << "." << aiGetVersionRevision() << " "
#if defined(ASSIMP_BUILD_ARCHITECTURE)
<< ASSIMP_BUILD_ARCHITECTURE
#elif defined(_M_IX86) || defined(__x86_32__) || defined(__i386__)
@@ -557,12 +524,11 @@ void WriteLogOpening(const std::string& file)
#elif defined(__arm__)
<< "arm"
#else
- << "<unknown architecture>"
+ << "<unknown architecture>"
#endif
-
<< " "
#if defined(ASSIMP_BUILD_COMPILER)
- << ASSIMP_BUILD_COMPILER
+ << ( ASSIMP_BUILD_COMPILER )
#elif defined(_MSC_VER)
<< "msvc"
#elif defined(__GNUC__)
@@ -577,8 +543,9 @@ void WriteLogOpening(const std::string& file)
<< (flags & ASSIMP_CFLAGS_NOBOOST ? " noboost" : "")
<< (flags & ASSIMP_CFLAGS_SHARED ? " shared" : "")
- << (flags & ASSIMP_CFLAGS_SINGLETHREADED ? " singlethreaded" : "")
- );
+ << (flags & ASSIMP_CFLAGS_SINGLETHREADED ? " singlethreaded" : "");
+
+ ASSIMP_LOG_DEBUG(stream.str());
}
// ------------------------------------------------------------------------------------------------
@@ -604,7 +571,7 @@ const aiScene* Importer::ReadFile( const char* _pFile, unsigned int pFlags)
// a scene. In this case we need to delete the old one
if (pimpl->mScene) {
- DefaultLogger::get()->debug("(Deleting previous scene)");
+ ASSIMP_LOG_DEBUG("(Deleting previous scene)");
FreeScene();
}
@@ -612,7 +579,7 @@ const aiScene* Importer::ReadFile( const char* _pFile, unsigned int pFlags)
if( !pimpl->mIOHandler->Exists( pFile)) {
pimpl->mErrorString = "Unable to open file \"" + pFile + "\".";
- DefaultLogger::get()->error(pimpl->mErrorString);
+ ASSIMP_LOG_ERROR(pimpl->mErrorString);
return NULL;
}
@@ -635,9 +602,8 @@ const aiScene* Importer::ReadFile( const char* _pFile, unsigned int pFlags)
// not so bad yet ... try format auto detection.
const std::string::size_type s = pFile.find_last_of('.');
if (s != std::string::npos) {
- DefaultLogger::get()->info("File extension not known, trying signature-based detection");
+ ASSIMP_LOG_INFO("File extension not known, trying signature-based detection");
for( unsigned int a = 0; a < pimpl->mImporter.size(); a++) {
-
if( pimpl->mImporter[a]->CanRead( pFile, pimpl->mIOHandler, true)) {
imp = pimpl->mImporter[a];
break;
@@ -647,7 +613,7 @@ const aiScene* Importer::ReadFile( const char* _pFile, unsigned int pFlags)
// Put a proper error message if no suitable importer was found
if( !imp) {
pimpl->mErrorString = "No suitable reader found for the file format of file \"" + pFile + "\".";
- DefaultLogger::get()->error(pimpl->mErrorString);
+ ASSIMP_LOG_ERROR(pimpl->mErrorString);
return NULL;
}
}
@@ -667,7 +633,7 @@ const aiScene* Importer::ReadFile( const char* _pFile, unsigned int pFlags)
if ( NULL != desc ) {
ext = desc->mName;
}
- DefaultLogger::get()->info("Found a matching importer for this file format: " + ext + "." );
+ ASSIMP_LOG_INFO("Found a matching importer for this file format: " + ext + "." );
pimpl->mProgressHandler->UpdateFileRead( 0, fileSize );
if (profiler) {
@@ -681,6 +647,8 @@ const aiScene* Importer::ReadFile( const char* _pFile, unsigned int pFlags)
profiler->EndRegion("import");
}
+ SetPropertyString("sourceFilePath", pFile);
+
// If successful, apply all active post processing steps to the imported data
if( pimpl->mScene) {
@@ -733,7 +701,7 @@ const aiScene* Importer::ReadFile( const char* _pFile, unsigned int pFlags)
pimpl->mErrorString = std::string("std::exception: ") + e.what();
#endif
- DefaultLogger::get()->error(pimpl->mErrorString);
+ ASSIMP_LOG_ERROR(pimpl->mErrorString);
delete pimpl->mScene; pimpl->mScene = NULL;
}
#endif // ! ASSIMP_CATCH_GLOBAL_EXCEPTIONS
@@ -761,7 +729,7 @@ const aiScene* Importer::ApplyPostProcessing(unsigned int pFlags)
// In debug builds: run basic flag validation
ai_assert(_ValidateFlags(pFlags));
- DefaultLogger::get()->info("Entering post processing pipeline");
+ ASSIMP_LOG_INFO("Entering post processing pipeline");
#ifndef ASSIMP_BUILD_NO_VALIDATEDS_PROCESS
// The ValidateDS process plays an exceptional role. It isn't contained in the global
@@ -779,13 +747,13 @@ const aiScene* Importer::ApplyPostProcessing(unsigned int pFlags)
if (pimpl->bExtraVerbose)
{
#ifdef ASSIMP_BUILD_NO_VALIDATEDS_PROCESS
- DefaultLogger::get()->error("Verbose Import is not available due to build settings");
+ ASSIMP_LOG_ERROR("Verbose Import is not available due to build settings");
#endif // no validation
pFlags |= aiProcess_ValidateDataStructure;
}
#else
if (pimpl->bExtraVerbose) {
- DefaultLogger::get()->warn("Not a debug build, ignoring extra verbose setting");
+ ASSIMP_LOG_WARN("Not a debug build, ignoring extra verbose setting");
}
#endif // ! DEBUG
@@ -817,26 +785,27 @@ const aiScene* Importer::ApplyPostProcessing(unsigned int pFlags)
// If the extra verbose mode is active, execute the ValidateDataStructureStep again - after each step
if (pimpl->bExtraVerbose) {
- DefaultLogger::get()->debug("Verbose Import: revalidating data structures");
+ ASSIMP_LOG_DEBUG("Verbose Import: re-validating data structures");
ValidateDSProcess ds;
ds.ExecuteOnScene (this);
if( !pimpl->mScene) {
- DefaultLogger::get()->error("Verbose Import: failed to revalidate data structures");
+ ASSIMP_LOG_ERROR("Verbose Import: failed to re-validate data structures");
break;
}
}
#endif // ! DEBUG
}
- pimpl->mProgressHandler->UpdatePostProcess( static_cast<int>(pimpl->mPostProcessingSteps.size()), static_cast<int>(pimpl->mPostProcessingSteps.size()) );
+ pimpl->mProgressHandler->UpdatePostProcess( static_cast<int>(pimpl->mPostProcessingSteps.size()),
+ static_cast<int>(pimpl->mPostProcessingSteps.size()) );
// update private scene flags
- if( pimpl->mScene )
- ScenePriv(pimpl->mScene)->mPPStepsApplied |= pFlags;
+ if( pimpl->mScene )
+ ScenePriv(pimpl->mScene)->mPPStepsApplied |= pFlags;
// clear any data allocated by post-process steps
pimpl->mPPShared->Clean();
- DefaultLogger::get()->info("Leaving post processing pipeline");
+ ASSIMP_LOG_INFO("Leaving post processing pipeline");
ASSIMP_END_EXCEPTION_REGION(const aiScene*);
return pimpl->mScene;
@@ -857,7 +826,7 @@ const aiScene* Importer::ApplyCustomizedPostProcessing( BaseProcess *rootProcess
}
// In debug builds: run basic flag validation
- DefaultLogger::get()->info( "Entering customized post processing pipeline" );
+ ASSIMP_LOG_INFO( "Entering customized post processing pipeline" );
#ifndef ASSIMP_BUILD_NO_VALIDATEDS_PROCESS
// The ValidateDS process plays an exceptional role. It isn't contained in the global
@@ -875,12 +844,12 @@ const aiScene* Importer::ApplyCustomizedPostProcessing( BaseProcess *rootProcess
if ( pimpl->bExtraVerbose )
{
#ifdef ASSIMP_BUILD_NO_VALIDATEDS_PROCESS
- DefaultLogger::get()->error( "Verbose Import is not available due to build settings" );
+ ASSIMP_LOG_ERROR( "Verbose Import is not available due to build settings" );
#endif // no validation
}
#else
if ( pimpl->bExtraVerbose ) {
- DefaultLogger::get()->warn( "Not a debug build, ignoring extra verbose setting" );
+ ASSIMP_LOG_WARN( "Not a debug build, ignoring extra verbose setting" );
}
#endif // ! DEBUG
@@ -898,18 +867,18 @@ const aiScene* Importer::ApplyCustomizedPostProcessing( BaseProcess *rootProcess
// If the extra verbose mode is active, execute the ValidateDataStructureStep again - after each step
if ( pimpl->bExtraVerbose || requestValidation ) {
- DefaultLogger::get()->debug( "Verbose Import: revalidating data structures" );
+ ASSIMP_LOG_DEBUG( "Verbose Import: revalidating data structures" );
ValidateDSProcess ds;
ds.ExecuteOnScene( this );
if ( !pimpl->mScene ) {
- DefaultLogger::get()->error( "Verbose Import: failed to revalidate data structures" );
+ ASSIMP_LOG_ERROR( "Verbose Import: failed to revalidate data structures" );
}
}
// clear any data allocated by post-process steps
pimpl->mPPShared->Clean();
- DefaultLogger::get()->info( "Leaving customized post processing pipeline" );
+ ASSIMP_LOG_INFO( "Leaving customized post processing pipeline" );
ASSIMP_END_EXCEPTION_REGION( const aiScene* );
@@ -920,7 +889,7 @@ const aiScene* Importer::ApplyCustomizedPostProcessing( BaseProcess *rootProcess
// Helper function to check whether an extension is supported by ASSIMP
bool Importer::IsExtensionSupported(const char* szExtension) const
{
- return NULL != GetImporter(szExtension);
+ return nullptr != GetImporter(szExtension);
}
// ------------------------------------------------------------------------------------------------
@@ -957,19 +926,19 @@ BaseImporter* Importer::GetImporter (const char* szExtension) const
// ------------------------------------------------------------------------------------------------
// Find a loader plugin for a given file extension
-size_t Importer::GetImporterIndex (const char* szExtension) const
-{
- ai_assert(szExtension);
+size_t Importer::GetImporterIndex (const char* szExtension) const {
+ ai_assert(nullptr != szExtension);
+
ASSIMP_BEGIN_EXCEPTION_REGION();
// skip over wildcard and dot characters at string head --
- for(;*szExtension == '*' || *szExtension == '.'; ++szExtension);
+ for ( ; *szExtension == '*' || *szExtension == '.'; ++szExtension );
std::string ext(szExtension);
if (ext.empty()) {
return static_cast<size_t>(-1);
}
- std::transform(ext.begin(),ext.end(), ext.begin(), tolower);
+ std::transform( ext.begin(), ext.end(), ext.begin(), ToLower<char> );
std::set<std::string> str;
for (std::vector<BaseImporter*>::const_iterator i = pimpl->mImporter.begin();i != pimpl->mImporter.end();++i) {
@@ -996,15 +965,18 @@ void Importer::GetExtensionList(aiString& szOut) const
(*i)->GetExtensionList(str);
}
- for (std::set<std::string>::const_iterator it = str.begin();; ) {
- szOut.Append("*.");
- szOut.Append((*it).c_str());
-
- if (++it == str.end()) {
- break;
- }
- szOut.Append(";");
- }
+ // List can be empty
+ if( !str.empty() ) {
+ for (std::set<std::string>::const_iterator it = str.begin();; ) {
+ szOut.Append("*.");
+ szOut.Append((*it).c_str());
+
+ if (++it == str.end()) {
+ break;
+ }
+ szOut.Append(";");
+ }
+ }
ASSIMP_END_EXCEPTION_REGION(void);
}
@@ -1023,33 +995,33 @@ bool Importer::SetPropertyInteger(const char* szName, int iValue)
// Set a configuration property
bool Importer::SetPropertyFloat(const char* szName, ai_real iValue)
{
- bool exising;
+ bool existing;
ASSIMP_BEGIN_EXCEPTION_REGION();
- exising = SetGenericProperty<ai_real>(pimpl->mFloatProperties, szName,iValue);
+ existing = SetGenericProperty<ai_real>(pimpl->mFloatProperties, szName,iValue);
ASSIMP_END_EXCEPTION_REGION(bool);
- return exising;
+ return existing;
}
// ------------------------------------------------------------------------------------------------
// Set a configuration property
bool Importer::SetPropertyString(const char* szName, const std::string& value)
{
- bool exising;
+ bool existing;
ASSIMP_BEGIN_EXCEPTION_REGION();
- exising = SetGenericProperty<std::string>(pimpl->mStringProperties, szName,value);
+ existing = SetGenericProperty<std::string>(pimpl->mStringProperties, szName,value);
ASSIMP_END_EXCEPTION_REGION(bool);
- return exising;
+ return existing;
}
// ------------------------------------------------------------------------------------------------
// Set a configuration property
bool Importer::SetPropertyMatrix(const char* szName, const aiMatrix4x4& value)
{
- bool exising;
+ bool existing;
ASSIMP_BEGIN_EXCEPTION_REGION();
- exising = SetGenericProperty<aiMatrix4x4>(pimpl->mMatrixProperties, szName,value);
+ existing = SetGenericProperty<aiMatrix4x4>(pimpl->mMatrixProperties, szName,value);
ASSIMP_END_EXCEPTION_REGION(bool);
- return exising;
+ return existing;
}
// ------------------------------------------------------------------------------------------------
diff --git a/code/Importer.h b/code/Importer.h
index e0fb57f5b..c6628c428 100644
--- a/code/Importer.h
+++ b/code/Importer.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -67,10 +68,8 @@ namespace Assimp {
* 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 ImporterPimpl
-{
+class ImporterPimpl {
public:
-
// Data type to store the key hash
typedef unsigned int KeyType;
@@ -81,8 +80,6 @@ public:
typedef std::map<KeyType, std::string> StringPropertyMap;
typedef std::map<KeyType, aiMatrix4x4> MatrixPropertyMap;
-public:
-
/** IO handler to use for all file accesses. */
IOSystem* mIOHandler;
bool mIsDefaultHandler;
@@ -116,12 +113,34 @@ public:
MatrixPropertyMap mMatrixProperties;
/** Used for testing - extra verbose mode causes the ValidateDataStructure-Step
- * to be executed before and after every single postprocess step */
+ * to be executed before and after every single post-process step */
bool bExtraVerbose;
/** Used by post-process steps to share data */
SharedPostProcessInfo* mPPShared;
+
+ /// The default class constructor.
+ ImporterPimpl() AI_NO_EXCEPT;
};
+
+inline
+ImporterPimpl::ImporterPimpl() AI_NO_EXCEPT
+: mIOHandler( nullptr )
+, mIsDefaultHandler( false )
+, mProgressHandler( nullptr )
+, mIsDefaultProgressHandler( false )
+, mImporter()
+, mPostProcessingSteps()
+, mScene( nullptr )
+, mErrorString()
+, mIntProperties()
+, mFloatProperties()
+, mStringProperties()
+, mMatrixProperties()
+, bExtraVerbose( false )
+, mPPShared( nullptr ) {
+ // empty
+}
//! @endcond
diff --git a/code/IFCBoolean.cpp b/code/Importer/IFC/IFCBoolean.cpp
index 98b230392..337e1d40b 100644
--- a/code/IFCBoolean.cpp
+++ b/code/Importer/IFC/IFCBoolean.cpp
@@ -42,17 +42,15 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* @brief Implements a subset of Ifc boolean operations
*/
-
#ifndef ASSIMP_BUILD_NO_IFC_IMPORTER
-#include "IFCUtil.h"
-#include "PolyTools.h"
-#include "ProcessHelper.h"
+#include "code/Importer/IFC/IFCUtil.h"
+#include "code/PolyTools.h"
+#include "code/ProcessHelper.h"
#include <assimp/Defines.h>
#include <iterator>
#include <tuple>
-
namespace Assimp {
namespace IFC {
@@ -61,7 +59,7 @@ namespace Assimp {
// The function then generates a hit only if the end is beyond a certain margin in that direction, filtering out
// "very close to plane" ghost hits as long as start and end stay directly on or within the given plane side.
bool IntersectSegmentPlane(const IfcVector3& p,const IfcVector3& n, const IfcVector3& e0,
- const IfcVector3& e1, bool assumeStartOnWhiteSide, IfcVector3& out)
+ const IfcVector3& e1, bool assumeStartOnWhiteSide, IfcVector3& out)
{
const IfcVector3 pdelta = e0 - p, seg = e1 - e0;
const IfcFloat dotOne = n*seg, dotTwo = -(n*pdelta);
@@ -131,20 +129,20 @@ void WritePolygon(std::vector<IfcVector3>& resultpoly, TempMesh& result)
if( resultpoly.size() > 2 )
{
- result.verts.insert(result.verts.end(), resultpoly.begin(), resultpoly.end());
- result.vertcnt.push_back(static_cast<unsigned int>(resultpoly.size()));
+ result.mVerts.insert(result.mVerts.end(), resultpoly.begin(), resultpoly.end());
+ result.mVertcnt.push_back(static_cast<unsigned int>(resultpoly.size()));
}
}
// ------------------------------------------------------------------------------------------------
-void ProcessBooleanHalfSpaceDifference(const IfcHalfSpaceSolid* hs, TempMesh& result,
+void ProcessBooleanHalfSpaceDifference(const Schema_2x3::IfcHalfSpaceSolid* hs, TempMesh& result,
const TempMesh& first_operand,
ConversionData& /*conv*/)
{
ai_assert(hs != NULL);
- const IfcPlane* const plane = hs->BaseSurface->ToPtr<IfcPlane>();
+ const Schema_2x3::IfcPlane* const plane = hs->BaseSurface->ToPtr<Schema_2x3::IfcPlane>();
if(!plane) {
IFCImporter::LogError("expected IfcPlane as base surface for the IfcHalfSpaceSolid");
return;
@@ -162,14 +160,14 @@ void ProcessBooleanHalfSpaceDifference(const IfcHalfSpaceSolid* hs, TempMesh& re
}
// clip the current contents of `meshout` against the plane we obtained from the second operand
- const std::vector<IfcVector3>& in = first_operand.verts;
- std::vector<IfcVector3>& outvert = result.verts;
+ const std::vector<IfcVector3>& in = first_operand.mVerts;
+ std::vector<IfcVector3>& outvert = result.mVerts;
- std::vector<unsigned int>::const_iterator begin = first_operand.vertcnt.begin(),
- end = first_operand.vertcnt.end(), iit;
+ std::vector<unsigned int>::const_iterator begin = first_operand.mVertcnt.begin(),
+ end = first_operand.mVertcnt.end(), iit;
outvert.reserve(in.size());
- result.vertcnt.reserve(first_operand.vertcnt.size());
+ result.mVertcnt.reserve(first_operand.mVertcnt.size());
unsigned int vidx = 0;
for(iit = begin; iit != end; vidx += *iit++) {
@@ -229,10 +227,10 @@ void ProcessBooleanHalfSpaceDifference(const IfcHalfSpaceSolid* hs, TempMesh& re
--newcount;
}
if(newcount > 2) {
- result.vertcnt.push_back(newcount);
+ result.mVertcnt.push_back(newcount);
}
else while(newcount-->0) {
- result.verts.pop_back();
+ result.mVerts.pop_back();
}
}
@@ -272,7 +270,6 @@ bool IntersectsBoundaryProfile(const IfcVector3& e0, const IfcVector3& e1, const
const IfcVector3& b0 = boundary[i];
const IfcVector3& b1 = boundary[(i + 1) % bcount];
IfcVector3 b = b1 - b0;
- IfcFloat b_sqlen_inv = 1.0 / b.SquareLength();
// segment-segment intersection
// solve b0 + b*s = e0 + e*t for (s,t)
@@ -281,6 +278,7 @@ bool IntersectsBoundaryProfile(const IfcVector3& e0, const IfcVector3& e1, const
// no solutions (parallel lines)
continue;
}
+ IfcFloat b_sqlen_inv = 1.0 / b.SquareLength();
const IfcFloat x = b0.x - e0.x;
const IfcFloat y = b0.y - e0.y;
@@ -381,19 +379,18 @@ bool PointInPoly(const IfcVector3& p, const std::vector<IfcVector3>& boundary)
IntersectsBoundaryProfile(p, p + IfcVector3(0.6, -0.6, 0.0), boundary, true, intersected_boundary, true);
votes += intersected_boundary.size() % 2;
-// ai_assert(votes == 3 || votes == 0);
return votes > 1;
}
// ------------------------------------------------------------------------------------------------
-void ProcessPolygonalBoundedBooleanHalfSpaceDifference(const IfcPolygonalBoundedHalfSpace* hs, TempMesh& result,
+void ProcessPolygonalBoundedBooleanHalfSpaceDifference(const Schema_2x3::IfcPolygonalBoundedHalfSpace* hs, TempMesh& result,
const TempMesh& first_operand,
ConversionData& conv)
{
ai_assert(hs != NULL);
- const IfcPlane* const plane = hs->BaseSurface->ToPtr<IfcPlane>();
+ const Schema_2x3::IfcPlane* const plane = hs->BaseSurface->ToPtr<Schema_2x3::IfcPlane>();
if(!plane) {
IFCImporter::LogError("expected IfcPlane as base surface for the IfcHalfSpaceSolid");
return;
@@ -420,7 +417,7 @@ void ProcessPolygonalBoundedBooleanHalfSpaceDifference(const IfcPolygonalBounded
}
// determine winding order by calculating the normal.
- IfcVector3 profileNormal = TempMesh::ComputePolygonNormal(profile->verts.data(), profile->verts.size());
+ IfcVector3 profileNormal = TempMesh::ComputePolygonNormal(profile->mVerts.data(), profile->mVerts.size());
IfcMatrix4 proj_inv;
ConvertAxisPlacement(proj_inv,hs->Position);
@@ -431,16 +428,16 @@ void ProcessPolygonalBoundedBooleanHalfSpaceDifference(const IfcPolygonalBounded
proj.Inverse();
// clip the current contents of `meshout` against the plane we obtained from the second operand
- const std::vector<IfcVector3>& in = first_operand.verts;
- std::vector<IfcVector3>& outvert = result.verts;
- std::vector<unsigned int>& outvertcnt = result.vertcnt;
+ const std::vector<IfcVector3>& in = first_operand.mVerts;
+ std::vector<IfcVector3>& outvert = result.mVerts;
+ std::vector<unsigned int>& outvertcnt = result.mVertcnt;
outvert.reserve(in.size());
- outvertcnt.reserve(first_operand.vertcnt.size());
+ outvertcnt.reserve(first_operand.mVertcnt.size());
unsigned int vidx = 0;
- std::vector<unsigned int>::const_iterator begin = first_operand.vertcnt.begin();
- std::vector<unsigned int>::const_iterator end = first_operand.vertcnt.end();
+ std::vector<unsigned int>::const_iterator begin = first_operand.mVertcnt.begin();
+ std::vector<unsigned int>::const_iterator end = first_operand.mVertcnt.end();
std::vector<unsigned int>::const_iterator iit;
for( iit = begin; iit != end; vidx += *iit++ )
{
@@ -511,7 +508,7 @@ void ProcessPolygonalBoundedBooleanHalfSpaceDifference(const IfcPolygonalBounded
{
// poly edge index, intersection point, edge index in boundary poly
std::vector<std::tuple<size_t, IfcVector3, size_t> > intersections;
- bool startedInside = PointInPoly(proj * blackside.front(), profile->verts);
+ bool startedInside = PointInPoly(proj * blackside.front(), profile->mVerts);
bool isCurrentlyInside = startedInside;
std::vector<std::pair<size_t, IfcVector3> > intersected_boundary;
@@ -522,7 +519,7 @@ void ProcessPolygonalBoundedBooleanHalfSpaceDifference(const IfcPolygonalBounded
const IfcVector3 e1 = proj * blackside[(a + 1) % blackside.size()];
intersected_boundary.clear();
- IntersectsBoundaryProfile(e0, e1, profile->verts, isCurrentlyInside, intersected_boundary);
+ IntersectsBoundaryProfile(e0, e1, profile->mVerts, isCurrentlyInside, intersected_boundary);
// sort the hits by distance from e0 to get the correct in/out/in sequence. Manually :-( I miss you, C++11.
if( intersected_boundary.size() > 1 )
{
@@ -635,17 +632,17 @@ void ProcessPolygonalBoundedBooleanHalfSpaceDifference(const IfcPolygonalBounded
// generate segments along the boundary polygon that lie in the poly's plane until we hit another intersection
IfcVector3 startingPoint = proj * std::get<1>(nextintsec);
- size_t currentBoundaryEdgeIdx = (std::get<2>(nextintsec) + (marchBackwardsOnBoundary ? 1 : 0)) % profile->verts.size();
+ size_t currentBoundaryEdgeIdx = (std::get<2>(nextintsec) + (marchBackwardsOnBoundary ? 1 : 0)) % profile->mVerts.size();
size_t nextIntsecIdx = SIZE_MAX;
while( nextIntsecIdx == SIZE_MAX )
{
IfcFloat t = 1e10;
- size_t nextBoundaryEdgeIdx = marchBackwardsOnBoundary ? (currentBoundaryEdgeIdx + profile->verts.size() - 1) : currentBoundaryEdgeIdx + 1;
- nextBoundaryEdgeIdx %= profile->verts.size();
+ size_t nextBoundaryEdgeIdx = marchBackwardsOnBoundary ? (currentBoundaryEdgeIdx + profile->mVerts.size() - 1) : currentBoundaryEdgeIdx + 1;
+ nextBoundaryEdgeIdx %= profile->mVerts.size();
// vertices of the current boundary segments
- IfcVector3 currBoundaryPoint = profile->verts[currentBoundaryEdgeIdx];
- IfcVector3 nextBoundaryPoint = profile->verts[nextBoundaryEdgeIdx];
+ IfcVector3 currBoundaryPoint = profile->mVerts[currentBoundaryEdgeIdx];
+ IfcVector3 nextBoundaryPoint = profile->mVerts[nextBoundaryEdgeIdx];
// project the two onto the polygon
if( std::abs(polyNormal.z) > 1e-5 )
{
@@ -694,7 +691,7 @@ void ProcessPolygonalBoundedBooleanHalfSpaceDifference(const IfcPolygonalBounded
}
// quick endless loop check
- if( resultpoly.size() > blackside.size() + profile->verts.size() )
+ if( resultpoly.size() > blackside.size() + profile->mVerts.size() )
{
IFCImporter::LogError("Encountered endless loop while clipping polygon against poly-bounded half space.");
break;
@@ -719,7 +716,7 @@ void ProcessPolygonalBoundedBooleanHalfSpaceDifference(const IfcPolygonalBounded
}
// ------------------------------------------------------------------------------------------------
-void ProcessBooleanExtrudedAreaSolidDifference(const IfcExtrudedAreaSolid* as, TempMesh& result,
+void ProcessBooleanExtrudedAreaSolidDifference(const Schema_2x3::IfcExtrudedAreaSolid* as, TempMesh& result,
const TempMesh& first_operand,
ConversionData& conv)
{
@@ -739,12 +736,12 @@ void ProcessBooleanExtrudedAreaSolidDifference(const IfcExtrudedAreaSolid* as, T
TempMesh temp;
- std::vector<IfcVector3>::const_iterator vit = first_operand.verts.begin();
- for(unsigned int pcount : first_operand.vertcnt) {
+ std::vector<IfcVector3>::const_iterator vit = first_operand.mVerts.begin();
+ for(unsigned int pcount : first_operand.mVertcnt) {
temp.Clear();
- temp.verts.insert(temp.verts.end(), vit, vit + pcount);
- temp.vertcnt.push_back(pcount);
+ temp.mVerts.insert(temp.mVerts.end(), vit, vit + pcount);
+ temp.mVertcnt.push_back(pcount);
// The algorithms used to generate mesh geometry sometimes
// spit out lines or other degenerates which must be
@@ -768,11 +765,11 @@ void ProcessBooleanExtrudedAreaSolidDifference(const IfcExtrudedAreaSolid* as, T
}
// ------------------------------------------------------------------------------------------------
-void ProcessBoolean(const IfcBooleanResult& boolean, TempMesh& result, ConversionData& conv)
+void ProcessBoolean(const Schema_2x3::IfcBooleanResult& boolean, TempMesh& result, ConversionData& conv)
{
// supported CSG operations:
// DIFFERENCE
- if(const IfcBooleanResult* const clip = boolean.ToPtr<IfcBooleanResult>()) {
+ if(const Schema_2x3::IfcBooleanResult* const clip = boolean.ToPtr<Schema_2x3::IfcBooleanResult>()) {
if(clip->Operator != "DIFFERENCE") {
IFCImporter::LogWarn("encountered unsupported boolean operator: " + (std::string)clip->Operator);
return;
@@ -787,18 +784,18 @@ void ProcessBoolean(const IfcBooleanResult& boolean, TempMesh& result, Conversio
// IfcExtrudedAreaSolid -- reduce to an instance of the quadrify() algorithm
- const IfcHalfSpaceSolid* const hs = clip->SecondOperand->ResolveSelectPtr<IfcHalfSpaceSolid>(conv.db);
- const IfcExtrudedAreaSolid* const as = clip->SecondOperand->ResolveSelectPtr<IfcExtrudedAreaSolid>(conv.db);
+ const Schema_2x3::IfcHalfSpaceSolid* const hs = clip->SecondOperand->ResolveSelectPtr<Schema_2x3::IfcHalfSpaceSolid>(conv.db);
+ const Schema_2x3::IfcExtrudedAreaSolid* const as = clip->SecondOperand->ResolveSelectPtr<Schema_2x3::IfcExtrudedAreaSolid>(conv.db);
if(!hs && !as) {
IFCImporter::LogError("expected IfcHalfSpaceSolid or IfcExtrudedAreaSolid as second clipping operand");
return;
}
TempMesh first_operand;
- if(const IfcBooleanResult* const op0 = clip->FirstOperand->ResolveSelectPtr<IfcBooleanResult>(conv.db)) {
+ if(const Schema_2x3::IfcBooleanResult* const op0 = clip->FirstOperand->ResolveSelectPtr<Schema_2x3::IfcBooleanResult>(conv.db)) {
ProcessBoolean(*op0,first_operand,conv);
}
- else if (const IfcSweptAreaSolid* const swept = clip->FirstOperand->ResolveSelectPtr<IfcSweptAreaSolid>(conv.db)) {
+ else if (const Schema_2x3::IfcSweptAreaSolid* const swept = clip->FirstOperand->ResolveSelectPtr<Schema_2x3::IfcSweptAreaSolid>(conv.db)) {
ProcessSweptAreaSolid(*swept,first_operand,conv);
}
else {
@@ -808,7 +805,7 @@ void ProcessBoolean(const IfcBooleanResult& boolean, TempMesh& result, Conversio
if(hs) {
- const IfcPolygonalBoundedHalfSpace* const hs_bounded = clip->SecondOperand->ResolveSelectPtr<IfcPolygonalBoundedHalfSpace>(conv.db);
+ const Schema_2x3::IfcPolygonalBoundedHalfSpace* const hs_bounded = clip->SecondOperand->ResolveSelectPtr<Schema_2x3::IfcPolygonalBoundedHalfSpace>(conv.db);
if (hs_bounded) {
ProcessPolygonalBoundedBooleanHalfSpaceDifference(hs_bounded, result, first_operand, conv);
}
diff --git a/code/IFCCurve.cpp b/code/Importer/IFC/IFCCurve.cpp
index ede1c87b8..af58e7b10 100644
--- a/code/IFCCurve.cpp
+++ b/code/Importer/IFC/IFCCurve.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -43,28 +44,22 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* @brief Read profile and curves entities from IFC files
*/
-
-
#ifndef ASSIMP_BUILD_NO_IFC_IMPORTER
#include "IFCUtil.h"
namespace Assimp {
- namespace IFC {
- namespace {
+namespace IFC {
+namespace {
// --------------------------------------------------------------------------------
// Conic is the base class for Circle and Ellipse
// --------------------------------------------------------------------------------
-class Conic : public Curve
-{
-
+class Conic : public Curve {
public:
-
// --------------------------------------------------
- Conic(const IfcConic& entity, ConversionData& conv)
- : Curve(entity,conv)
- {
+ Conic(const Schema_2x3::IfcConic& entity, ConversionData& conv)
+ : Curve(entity,conv) {
IfcMatrix4 trafo;
ConvertAxisPlacement(trafo,*entity.Position,conv);
@@ -75,8 +70,6 @@ public:
p[2] = IfcVector3(trafo.a3,trafo.b3,trafo.c3);
}
-public:
-
// --------------------------------------------------
bool IsClosed() const {
return true;
@@ -84,7 +77,8 @@ public:
// --------------------------------------------------
size_t EstimateSampleCount(IfcFloat a, IfcFloat b) const {
- ai_assert(InRange(a) && InRange(b));
+ ai_assert( InRange( a ) );
+ ai_assert( InRange( b ) );
a *= conv.angle_scale;
b *= conv.angle_scale;
@@ -104,24 +98,18 @@ protected:
IfcVector3 location, p[3];
};
-
// --------------------------------------------------------------------------------
// Circle
// --------------------------------------------------------------------------------
-class Circle : public Conic
-{
-
+class Circle : public Conic {
public:
-
// --------------------------------------------------
- Circle(const IfcCircle& entity, ConversionData& conv)
+ Circle(const Schema_2x3::IfcCircle& entity, ConversionData& conv)
: Conic(entity,conv)
, entity(entity)
{
}
-public:
-
// --------------------------------------------------
IfcVector3 Eval(IfcFloat u) const {
u = -conv.angle_scale * u;
@@ -130,27 +118,21 @@ public:
}
private:
- const IfcCircle& entity;
+ const Schema_2x3::IfcCircle& entity;
};
-
// --------------------------------------------------------------------------------
// Ellipse
// --------------------------------------------------------------------------------
-class Ellipse : public Conic
-{
-
+class Ellipse : public Conic {
public:
-
// --------------------------------------------------
- Ellipse(const IfcEllipse& entity, ConversionData& conv)
- : Conic(entity,conv)
- , entity(entity)
- {
+ Ellipse(const Schema_2x3::IfcEllipse& entity, ConversionData& conv)
+ : Conic(entity,conv)
+ , entity(entity) {
+ // empty
}
-public:
-
// --------------------------------------------------
IfcVector3 Eval(IfcFloat u) const {
u = -conv.angle_scale * u;
@@ -159,28 +141,21 @@ public:
}
private:
- const IfcEllipse& entity;
+ const Schema_2x3::IfcEllipse& entity;
};
-
// --------------------------------------------------------------------------------
// Line
// --------------------------------------------------------------------------------
-class Line : public Curve
-{
-
+class Line : public Curve {
public:
-
// --------------------------------------------------
- Line(const IfcLine& entity, ConversionData& conv)
- : Curve(entity,conv)
- {
+ Line(const Schema_2x3::IfcLine& entity, ConversionData& conv)
+ : Curve(entity,conv) {
ConvertCartesianPoint(p,entity.Pnt);
ConvertVector(v,entity.Dir);
}
-public:
-
// --------------------------------------------------
bool IsClosed() const {
return false;
@@ -193,24 +168,25 @@ public:
// --------------------------------------------------
size_t EstimateSampleCount(IfcFloat a, IfcFloat b) const {
- ai_assert(InRange(a) && InRange(b));
+ ai_assert( InRange( a ) );
+ ai_assert( InRange( b ) );
// two points are always sufficient for a line segment
return a==b ? 1 : 2;
}
// --------------------------------------------------
- void SampleDiscrete(TempMesh& out,IfcFloat a, IfcFloat b) const
- {
- ai_assert(InRange(a) && InRange(b));
+ void SampleDiscrete(TempMesh& out,IfcFloat a, IfcFloat b) const {
+ ai_assert( InRange( a ) );
+ ai_assert( InRange( b ) );
if (a == b) {
- out.verts.push_back(Eval(a));
+ out.mVerts.push_back(Eval(a));
return;
}
- out.verts.reserve(out.verts.size()+2);
- out.verts.push_back(Eval(a));
- out.verts.push_back(Eval(b));
+ out.mVerts.reserve(out.mVerts.size()+2);
+ out.mVerts.push_back(Eval(a));
+ out.mVerts.push_back(Eval(b));
}
// --------------------------------------------------
@@ -227,20 +203,16 @@ private:
// --------------------------------------------------------------------------------
// CompositeCurve joins multiple smaller, bounded curves
// --------------------------------------------------------------------------------
-class CompositeCurve : public BoundedCurve
-{
-
+class CompositeCurve : public BoundedCurve {
typedef std::pair< std::shared_ptr< BoundedCurve >, bool > CurveEntry;
public:
-
// --------------------------------------------------
- CompositeCurve(const IfcCompositeCurve& entity, ConversionData& conv)
- : BoundedCurve(entity,conv)
- , total()
- {
+ CompositeCurve(const Schema_2x3::IfcCompositeCurve& entity, ConversionData& conv)
+ : BoundedCurve(entity,conv)
+ , total() {
curves.reserve(entity.Segments.size());
- for(const IfcCompositeCurveSegment& curveSegment :entity.Segments) {
+ for(const Schema_2x3::IfcCompositeCurveSegment& curveSegment :entity.Segments) {
// according to the specification, this must be a bounded curve
std::shared_ptr< Curve > cv(Curve::Convert(curveSegment.ParentCurve,conv));
std::shared_ptr< BoundedCurve > bc = std::dynamic_pointer_cast<BoundedCurve>(cv);
@@ -263,8 +235,6 @@ public:
}
}
-public:
-
// --------------------------------------------------
IfcVector3 Eval(IfcFloat u) const {
if (curves.empty()) {
@@ -287,7 +257,8 @@ public:
// --------------------------------------------------
size_t EstimateSampleCount(IfcFloat a, IfcFloat b) const {
- ai_assert(InRange(a) && InRange(b));
+ ai_assert( InRange( a ) );
+ ai_assert( InRange( b ) );
size_t cnt = 0;
IfcFloat acc = 0;
@@ -306,19 +277,19 @@ public:
}
// --------------------------------------------------
- void SampleDiscrete(TempMesh& out,IfcFloat a, IfcFloat b) const
- {
- ai_assert(InRange(a) && InRange(b));
+ void SampleDiscrete(TempMesh& out,IfcFloat a, IfcFloat b) const {
+ ai_assert( InRange( a ) );
+ ai_assert( InRange( b ) );
const size_t cnt = EstimateSampleCount(a,b);
- out.verts.reserve(out.verts.size() + cnt);
+ out.mVerts.reserve(out.mVerts.size() + cnt);
for(const CurveEntry& entry : curves) {
- const size_t cnt = out.verts.size();
+ const size_t cnt = out.mVerts.size();
entry.first->SampleDiscrete(out);
- if (!entry.second && cnt != out.verts.size()) {
- std::reverse(out.verts.begin()+cnt,out.verts.end());
+ if (!entry.second && cnt != out.mVerts.size()) {
+ std::reverse(out.mVerts.begin()+cnt,out.mVerts.end());
}
}
}
@@ -330,21 +301,16 @@ public:
private:
std::vector< CurveEntry > curves;
-
IfcFloat total;
};
-
// --------------------------------------------------------------------------------
// TrimmedCurve can be used to trim an unbounded curve to a bounded range
// --------------------------------------------------------------------------------
-class TrimmedCurve : public BoundedCurve
-{
-
+class TrimmedCurve : public BoundedCurve {
public:
-
// --------------------------------------------------
- TrimmedCurve(const IfcTrimmedCurve& entity, ConversionData& conv)
+ TrimmedCurve(const Schema_2x3::IfcTrimmedCurve& entity, ConversionData& conv)
: BoundedCurve(entity,conv)
{
base = std::shared_ptr<const Curve>(Curve::Convert(entity.BasisCurve,conv));
@@ -359,12 +325,12 @@ public:
bool have_param = false, have_point = false;
IfcVector3 point;
for(const Entry sel :entity.Trim1) {
- if (const EXPRESS::REAL* const r = sel->ToPtr<EXPRESS::REAL>()) {
+ if (const ::Assimp::STEP::EXPRESS::REAL* const r = sel->ToPtr<::Assimp::STEP::EXPRESS::REAL>()) {
range.first = *r;
have_param = true;
break;
}
- else if (const IfcCartesianPoint* const r = sel->ResolveSelectPtr<IfcCartesianPoint>(conv.db)) {
+ else if (const Schema_2x3::IfcCartesianPoint* const r = sel->ResolveSelectPtr<Schema_2x3::IfcCartesianPoint>(conv.db)) {
ConvertCartesianPoint(point,*r);
have_point = true;
}
@@ -376,12 +342,12 @@ public:
}
have_param = false, have_point = false;
for(const Entry sel :entity.Trim2) {
- if (const EXPRESS::REAL* const r = sel->ToPtr<EXPRESS::REAL>()) {
+ if (const ::Assimp::STEP::EXPRESS::REAL* const r = sel->ToPtr<::Assimp::STEP::EXPRESS::REAL>()) {
range.second = *r;
have_param = true;
break;
}
- else if (const IfcCartesianPoint* const r = sel->ResolveSelectPtr<IfcCartesianPoint>(conv.db)) {
+ else if (const Schema_2x3::IfcCartesianPoint* const r = sel->ResolveSelectPtr<Schema_2x3::IfcCartesianPoint>(conv.db)) {
ConvertCartesianPoint(point,*r);
have_point = true;
}
@@ -409,8 +375,6 @@ public:
ai_assert(maxval >= 0);
}
-public:
-
// --------------------------------------------------
IfcVector3 Eval(IfcFloat p) const {
ai_assert(InRange(p));
@@ -419,7 +383,8 @@ public:
// --------------------------------------------------
size_t EstimateSampleCount(IfcFloat a, IfcFloat b) const {
- ai_assert(InRange(a) && InRange(b));
+ ai_assert( InRange( a ) );
+ ai_assert( InRange( b ) );
return base->EstimateSampleCount(TrimParam(a),TrimParam(b));
}
@@ -435,13 +400,11 @@ public:
}
private:
-
// --------------------------------------------------
IfcFloat TrimParam(IfcFloat f) const {
return agree_sense ? f + range.first : range.second - f;
}
-
private:
ParamRange range;
IfcFloat maxval;
@@ -454,26 +417,21 @@ private:
// --------------------------------------------------------------------------------
// PolyLine is a 'curve' defined by linear interpolation over a set of discrete points
// --------------------------------------------------------------------------------
-class PolyLine : public BoundedCurve
-{
-
+class PolyLine : public BoundedCurve {
public:
-
// --------------------------------------------------
- PolyLine(const IfcPolyline& entity, ConversionData& conv)
+ PolyLine(const Schema_2x3::IfcPolyline& entity, ConversionData& conv)
: BoundedCurve(entity,conv)
{
points.reserve(entity.Points.size());
IfcVector3 t;
- for(const IfcCartesianPoint& cp : entity.Points) {
+ for(const Schema_2x3::IfcCartesianPoint& cp : entity.Points) {
ConvertCartesianPoint(t,cp);
points.push_back(t);
}
}
-public:
-
// --------------------------------------------------
IfcVector3 Eval(IfcFloat p) const {
ai_assert(InRange(p));
@@ -502,38 +460,32 @@ private:
std::vector<IfcVector3> points;
};
-
} // anon
-
// ------------------------------------------------------------------------------------------------
-Curve* Curve :: Convert(const IFC::IfcCurve& curve,ConversionData& conv)
-{
- if(curve.ToPtr<IfcBoundedCurve>()) {
- if(const IfcPolyline* c = curve.ToPtr<IfcPolyline>()) {
+Curve* Curve::Convert(const IFC::Schema_2x3::IfcCurve& curve,ConversionData& conv) {
+ if(curve.ToPtr<Schema_2x3::IfcBoundedCurve>()) {
+ if(const Schema_2x3::IfcPolyline* c = curve.ToPtr<Schema_2x3::IfcPolyline>()) {
return new PolyLine(*c,conv);
}
- if(const IfcTrimmedCurve* c = curve.ToPtr<IfcTrimmedCurve>()) {
+ if(const Schema_2x3::IfcTrimmedCurve* c = curve.ToPtr<Schema_2x3::IfcTrimmedCurve>()) {
return new TrimmedCurve(*c,conv);
}
- if(const IfcCompositeCurve* c = curve.ToPtr<IfcCompositeCurve>()) {
+ if(const Schema_2x3::IfcCompositeCurve* c = curve.ToPtr<Schema_2x3::IfcCompositeCurve>()) {
return new CompositeCurve(*c,conv);
}
- //if(const IfcBSplineCurve* c = curve.ToPtr<IfcBSplineCurve>()) {
- // return new BSplineCurve(*c,conv);
- //}
}
- if(curve.ToPtr<IfcConic>()) {
- if(const IfcCircle* c = curve.ToPtr<IfcCircle>()) {
+ if(curve.ToPtr<Schema_2x3::IfcConic>()) {
+ if(const Schema_2x3::IfcCircle* c = curve.ToPtr<Schema_2x3::IfcCircle>()) {
return new Circle(*c,conv);
}
- if(const IfcEllipse* c = curve.ToPtr<IfcEllipse>()) {
+ if(const Schema_2x3::IfcEllipse* c = curve.ToPtr<Schema_2x3::IfcEllipse>()) {
return new Ellipse(*c,conv);
}
}
- if(const IfcLine* c = curve.ToPtr<IfcLine>()) {
+ if(const Schema_2x3::IfcLine* c = curve.ToPtr<Schema_2x3::IfcLine>()) {
return new Line(*c,conv);
}
@@ -543,13 +495,10 @@ Curve* Curve :: Convert(const IFC::IfcCurve& curve,ConversionData& conv)
#ifdef ASSIMP_BUILD_DEBUG
// ------------------------------------------------------------------------------------------------
-bool Curve :: InRange(IfcFloat u) const
-{
+bool Curve::InRange(IfcFloat u) const {
const ParamRange range = GetParametricRange();
if (IsClosed()) {
return true;
- //ai_assert(range.first != std::numeric_limits<IfcFloat>::infinity() && range.second != std::numeric_limits<IfcFloat>::infinity());
- //u = range.first + std::fmod(u-range.first,range.second-range.first);
}
const IfcFloat epsilon = 1e-5;
return u - range.first > -epsilon && range.second - u > -epsilon;
@@ -557,24 +506,24 @@ bool Curve :: InRange(IfcFloat u) const
#endif
// ------------------------------------------------------------------------------------------------
-IfcFloat Curve :: GetParametricRangeDelta() const
-{
+IfcFloat Curve::GetParametricRangeDelta() const {
const ParamRange& range = GetParametricRange();
return std::abs(range.second - range.first);
}
// ------------------------------------------------------------------------------------------------
-size_t Curve :: EstimateSampleCount(IfcFloat a, IfcFloat b) const
-{
- ai_assert(InRange(a) && InRange(b));
+size_t Curve::EstimateSampleCount(IfcFloat a, IfcFloat b) const {
+ (void)(a); (void)(b);
+ ai_assert( InRange( a ) );
+ ai_assert( InRange( b ) );
// arbitrary default value, deriving classes should supply better suited values
return 16;
}
// ------------------------------------------------------------------------------------------------
-IfcFloat RecursiveSearch(const Curve* cv, const IfcVector3& val, IfcFloat a, IfcFloat b, unsigned int samples, IfcFloat threshold, unsigned int recurse = 0, unsigned int max_recurse = 15)
-{
+IfcFloat RecursiveSearch(const Curve* cv, const IfcVector3& val, IfcFloat a, IfcFloat b,
+ unsigned int samples, IfcFloat threshold, unsigned int recurse = 0, unsigned int max_recurse = 15) {
ai_assert(samples>1);
const IfcFloat delta = (b-a)/samples, inf = std::numeric_limits<IfcFloat>::infinity();
@@ -596,7 +545,8 @@ IfcFloat RecursiveSearch(const Curve* cv, const IfcVector3& val, IfcFloat a, Ifc
}
}
- ai_assert(min_diff[0] != inf && min_diff[1] != inf);
+ ai_assert( min_diff[ 0 ] != inf );
+ ai_assert( min_diff[ 1 ] != inf );
if ( std::fabs(a-min_point[0]) < threshold || recurse >= max_recurse) {
return min_point[0];
}
@@ -617,15 +567,15 @@ IfcFloat RecursiveSearch(const Curve* cv, const IfcVector3& val, IfcFloat a, Ifc
}
// ------------------------------------------------------------------------------------------------
-bool Curve :: ReverseEval(const IfcVector3& val, IfcFloat& paramOut) const
+bool Curve::ReverseEval(const IfcVector3& val, IfcFloat& 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 threshold from curve topology
- const IfcFloat threshold = 1e-4f;
- const unsigned int samples = 16;
+ static const IfcFloat threshold = 1e-4f;
+ static const unsigned int samples = 16;
const ParamRange& range = GetParametricRange();
paramOut = RecursiveSearch(this,val,range.first,range.second,samples,threshold);
@@ -634,30 +584,29 @@ bool Curve :: ReverseEval(const IfcVector3& val, IfcFloat& paramOut) const
}
// ------------------------------------------------------------------------------------------------
-void Curve :: SampleDiscrete(TempMesh& out,IfcFloat a, IfcFloat b) const
-{
- ai_assert(InRange(a) && InRange(b));
+void Curve::SampleDiscrete(TempMesh& out,IfcFloat a, IfcFloat b) const {
+ ai_assert( InRange( a ) );
+ ai_assert( InRange( b ) );
const size_t cnt = std::max(static_cast<size_t>(0),EstimateSampleCount(a,b));
- out.verts.reserve( out.verts.size() + cnt + 1);
+ out.mVerts.reserve( out.mVerts.size() + cnt + 1);
IfcFloat p = a, delta = (b-a)/cnt;
for(size_t i = 0; i <= cnt; ++i, p += delta) {
- out.verts.push_back(Eval(p));
+ out.mVerts.push_back(Eval(p));
}
}
// ------------------------------------------------------------------------------------------------
-bool BoundedCurve :: IsClosed() const
-{
+bool BoundedCurve::IsClosed() const {
return false;
}
// ------------------------------------------------------------------------------------------------
-void BoundedCurve :: SampleDiscrete(TempMesh& out) const
-{
+void BoundedCurve::SampleDiscrete(TempMesh& out) const {
const ParamRange& range = GetParametricRange();
- ai_assert(range.first != std::numeric_limits<IfcFloat>::infinity() && range.second != std::numeric_limits<IfcFloat>::infinity());
+ ai_assert( range.first != std::numeric_limits<IfcFloat>::infinity() );
+ ai_assert( range.second != std::numeric_limits<IfcFloat>::infinity() );
return SampleDiscrete(out,range.first,range.second);
}
diff --git a/code/IFCGeometry.cpp b/code/Importer/IFC/IFCGeometry.cpp
index 908f5e065..548de4e27 100644
--- a/code/IFCGeometry.cpp
+++ b/code/Importer/IFC/IFCGeometry.cpp
@@ -46,8 +46,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_NO_IFC_IMPORTER
#include "IFCUtil.h"
-#include "PolyTools.h"
-#include "ProcessHelper.h"
+#include "code/PolyTools.h"
+#include "code/ProcessHelper.h"
#include "../contrib/poly2tri/poly2tri/poly2tri.h"
#include "../contrib/clipper/clipper.hpp"
@@ -59,27 +59,27 @@ namespace Assimp {
namespace IFC {
// ------------------------------------------------------------------------------------------------
-bool ProcessPolyloop(const IfcPolyLoop& loop, TempMesh& meshout, ConversionData& /*conv*/)
+bool ProcessPolyloop(const Schema_2x3::IfcPolyLoop& loop, TempMesh& meshout, ConversionData& /*conv*/)
{
size_t cnt = 0;
- for(const IfcCartesianPoint& c : loop.Polygon) {
+ for(const Schema_2x3::IfcCartesianPoint& c : loop.Polygon) {
IfcVector3 tmp;
ConvertCartesianPoint(tmp,c);
- meshout.verts.push_back(tmp);
+ meshout.mVerts.push_back(tmp);
++cnt;
}
- meshout.vertcnt.push_back(static_cast<unsigned int>(cnt));
+ meshout.mVertcnt.push_back(static_cast<unsigned int>(cnt));
// zero- or one- vertex polyloops simply ignored
- if (meshout.vertcnt.back() > 1) {
+ if (meshout.mVertcnt.back() > 1) {
return true;
}
- if (meshout.vertcnt.back()==1) {
- meshout.vertcnt.pop_back();
- meshout.verts.pop_back();
+ if (meshout.mVertcnt.back()==1) {
+ meshout.mVertcnt.pop_back();
+ meshout.mVerts.pop_back();
}
return false;
}
@@ -88,19 +88,19 @@ bool ProcessPolyloop(const IfcPolyLoop& loop, TempMesh& meshout, ConversionData&
void ProcessPolygonBoundaries(TempMesh& result, const TempMesh& inmesh, size_t master_bounds = (size_t)-1)
{
// handle all trivial cases
- if(inmesh.vertcnt.empty()) {
+ if(inmesh.mVertcnt.empty()) {
return;
}
- if(inmesh.vertcnt.size() == 1) {
+ if(inmesh.mVertcnt.size() == 1) {
result.Append(inmesh);
return;
}
- ai_assert(std::count(inmesh.vertcnt.begin(), inmesh.vertcnt.end(), 0) == 0);
+ ai_assert(std::count(inmesh.mVertcnt.begin(), inmesh.mVertcnt.end(), 0) == 0);
typedef std::vector<unsigned int>::const_iterator face_iter;
- face_iter begin = inmesh.vertcnt.begin(), end = inmesh.vertcnt.end(), iit;
+ face_iter begin = inmesh.mVertcnt.begin(), end = inmesh.mVertcnt.end(), iit;
std::vector<unsigned int>::const_iterator outer_polygon_it = end;
// major task here: given a list of nested polygon boundaries (one of which
@@ -119,7 +119,7 @@ void ProcessPolygonBoundaries(TempMesh& result, const TempMesh& inmesh, size_t m
// shall be of the type IfcFaceOuterBound'
IfcFloat area_outer_polygon = 1e-10f;
if (master_bounds != (size_t)-1) {
- ai_assert(master_bounds < inmesh.vertcnt.size());
+ ai_assert(master_bounds < inmesh.mVertcnt.size());
outer_polygon_it = begin + master_bounds;
}
else {
@@ -146,9 +146,9 @@ void ProcessPolygonBoundaries(TempMesh& result, const TempMesh& inmesh, size_t m
// this is the plane onto which the quadrulate algorithm will
// project the entire mesh.
std::vector<TempOpening> fake_openings;
- fake_openings.reserve(inmesh.vertcnt.size()-1);
+ fake_openings.reserve(inmesh.mVertcnt.size()-1);
- std::vector<IfcVector3>::const_iterator vit = inmesh.verts.begin(), outer_vit;
+ std::vector<IfcVector3>::const_iterator vit = inmesh.mVerts.begin(), outer_vit;
for(iit = begin; iit != end; vit += *iit++) {
if (iit == outer_polygon_it) {
@@ -171,32 +171,32 @@ void ProcessPolygonBoundaries(TempMesh& result, const TempMesh& inmesh, size_t m
opening.solid = NULL;
opening.profileMesh = std::make_shared<TempMesh>();
- opening.profileMesh->verts.reserve(*iit);
- opening.profileMesh->vertcnt.push_back(*iit);
+ opening.profileMesh->mVerts.reserve(*iit);
+ opening.profileMesh->mVertcnt.push_back(*iit);
- std::copy(vit, vit + *iit, std::back_inserter(opening.profileMesh->verts));
+ std::copy(vit, vit + *iit, std::back_inserter(opening.profileMesh->mVerts));
}
// fill a mesh with ONLY the main polygon
TempMesh temp;
- temp.verts.reserve(outer_polygon_size);
- temp.vertcnt.push_back(static_cast<unsigned int>(outer_polygon_size));
+ temp.mVerts.reserve(outer_polygon_size);
+ temp.mVertcnt.push_back(static_cast<unsigned int>(outer_polygon_size));
std::copy(outer_vit, outer_vit+outer_polygon_size,
- std::back_inserter(temp.verts));
+ std::back_inserter(temp.mVerts));
GenerateOpenings(fake_openings, normals, temp, false, false);
result.Append(temp);
}
// ------------------------------------------------------------------------------------------------
-void ProcessConnectedFaceSet(const IfcConnectedFaceSet& fset, TempMesh& result, ConversionData& conv)
+void ProcessConnectedFaceSet(const Schema_2x3::IfcConnectedFaceSet& fset, TempMesh& result, ConversionData& conv)
{
- for(const IfcFace& face : fset.CfsFaces) {
+ for(const Schema_2x3::IfcFace& face : fset.CfsFaces) {
// size_t ob = -1, cnt = 0;
TempMesh meshout;
- for(const IfcFaceBound& bound : face.Bounds) {
+ for(const Schema_2x3::IfcFaceBound& bound : face.Bounds) {
- if(const IfcPolyLoop* const polyloop = bound.Bound->ToPtr<IfcPolyLoop>()) {
+ if(const Schema_2x3::IfcPolyLoop* const polyloop = bound.Bound->ToPtr<Schema_2x3::IfcPolyLoop>()) {
if(ProcessPolyloop(*polyloop, meshout,conv)) {
// The outer boundary is better determined by checking which
@@ -230,12 +230,12 @@ void ProcessConnectedFaceSet(const IfcConnectedFaceSet& fset, TempMesh& result,
}
// ------------------------------------------------------------------------------------------------
-void ProcessRevolvedAreaSolid(const IfcRevolvedAreaSolid& solid, TempMesh& result, ConversionData& conv)
+void ProcessRevolvedAreaSolid(const Schema_2x3::IfcRevolvedAreaSolid& solid, TempMesh& result, ConversionData& conv)
{
TempMesh meshout;
// first read the profile description
- if(!ProcessProfile(*solid.SweptArea,meshout,conv) || meshout.verts.size()<=1) {
+ if(!ProcessProfile(*solid.SweptArea,meshout,conv) || meshout.mVerts.size()<=1) {
return;
}
@@ -246,7 +246,7 @@ void ProcessRevolvedAreaSolid(const IfcRevolvedAreaSolid& solid, TempMesh& resul
IfcMatrix4::Translation(pos,tb0);
IfcMatrix4::Translation(-pos,tb1);
- const std::vector<IfcVector3>& in = meshout.verts;
+ const std::vector<IfcVector3>& in = meshout.mVerts;
const size_t size=in.size();
bool has_area = solid.SweptArea->ProfileType == "AREA" && size>2;
@@ -263,14 +263,14 @@ void ProcessRevolvedAreaSolid(const IfcRevolvedAreaSolid& solid, TempMesh& resul
has_area = has_area && std::fabs(max_angle) < AI_MATH_TWO_PI_F*0.99;
- result.verts.reserve(size*((cnt_segments+1)*4+(has_area?2:0)));
- result.vertcnt.reserve(size*cnt_segments+2);
+ result.mVerts.reserve(size*((cnt_segments+1)*4+(has_area?2:0)));
+ result.mVertcnt.reserve(size*cnt_segments+2);
IfcMatrix4 rot;
rot = tb0 * IfcMatrix4::Rotation(delta,axis,rot) * tb1;
size_t base = 0;
- std::vector<IfcVector3>& out = result.verts;
+ std::vector<IfcVector3>& out = result.mVerts;
// dummy data to simplify later processing
for(size_t i = 0; i < size; ++i) {
@@ -281,7 +281,7 @@ void ProcessRevolvedAreaSolid(const IfcRevolvedAreaSolid& solid, TempMesh& resul
for(size_t i = 0; i < size; ++i) {
const size_t next = (i+1)%size;
- result.vertcnt.push_back(4);
+ result.mVertcnt.push_back(4);
const IfcVector3 base_0 = out[base+i*4+3],base_1 = out[base+next*4+3];
out.push_back(base_0);
@@ -305,8 +305,8 @@ void ProcessRevolvedAreaSolid(const IfcRevolvedAreaSolid& solid, TempMesh& resul
for(size_t i = 0; i < size; ++i ) {
out.push_back(out[i*4]);
}
- result.vertcnt.push_back(static_cast<unsigned int>(size));
- result.vertcnt.push_back(static_cast<unsigned int>(size));
+ result.mVertcnt.push_back(static_cast<unsigned int>(size));
+ result.mVertcnt.push_back(static_cast<unsigned int>(size));
}
IfcMatrix4 trafo;
@@ -316,10 +316,8 @@ void ProcessRevolvedAreaSolid(const IfcRevolvedAreaSolid& solid, TempMesh& resul
IFCImporter::LogDebug("generate mesh procedurally by radial extrusion (IfcRevolvedAreaSolid)");
}
-
-
// ------------------------------------------------------------------------------------------------
-void ProcessSweptDiskSolid(const IfcSweptDiskSolid solid, TempMesh& result, ConversionData& conv)
+void ProcessSweptDiskSolid(const Schema_2x3::IfcSweptDiskSolid &solid, TempMesh& result, ConversionData& conv)
{
const Curve* const curve = Curve::Convert(*solid.Directrix, conv);
if(!curve) {
@@ -330,18 +328,18 @@ void ProcessSweptDiskSolid(const IfcSweptDiskSolid solid, TempMesh& result, Conv
const unsigned int cnt_segments = conv.settings.cylindricalTessellation;
const IfcFloat deltaAngle = AI_MATH_TWO_PI/cnt_segments;
- const size_t samples = curve->EstimateSampleCount(solid.StartParam,solid.EndParam);
+ TempMesh temp;
+ curve->SampleDiscrete(temp, solid.StartParam, solid.EndParam);
+ const std::vector<IfcVector3>& curve_points = temp.mVerts;
+
+ const size_t samples = curve_points.size();
- result.verts.reserve(cnt_segments * samples * 4);
- result.vertcnt.reserve((cnt_segments - 1) * samples);
+ result.mVerts.reserve(cnt_segments * samples * 4);
+ result.mVertcnt.reserve((cnt_segments - 1) * samples);
std::vector<IfcVector3> points;
points.reserve(cnt_segments * samples);
- TempMesh temp;
- curve->SampleDiscrete(temp,solid.StartParam,solid.EndParam);
- const std::vector<IfcVector3>& curve_points = temp.verts;
-
if(curve_points.empty()) {
IFCImporter::LogWarn("curve evaluation yielded no points (IfcSweptDiskSolid)");
return;
@@ -434,22 +432,22 @@ void ProcessSweptDiskSolid(const IfcSweptDiskSolid solid, TempMesh& result, Conv
for (unsigned int seg = 0; seg < cnt_segments; ++seg) {
- result.verts.push_back(points[ i * cnt_segments + (seg % cnt_segments)]);
- result.verts.push_back(points[ i * cnt_segments + (seg + 1) % cnt_segments]);
- result.verts.push_back(points[ (i+1) * cnt_segments + ((seg + 1 + best_pair_offset) % cnt_segments)]);
- result.verts.push_back(points[ (i+1) * cnt_segments + ((seg + best_pair_offset) % cnt_segments)]);
+ result.mVerts.push_back(points[ i * cnt_segments + (seg % cnt_segments)]);
+ result.mVerts.push_back(points[ i * cnt_segments + (seg + 1) % cnt_segments]);
+ result.mVerts.push_back(points[ (i+1) * cnt_segments + ((seg + 1 + best_pair_offset) % cnt_segments)]);
+ result.mVerts.push_back(points[ (i+1) * cnt_segments + ((seg + best_pair_offset) % cnt_segments)]);
- IfcVector3& v1 = *(result.verts.end()-1);
- IfcVector3& v2 = *(result.verts.end()-2);
- IfcVector3& v3 = *(result.verts.end()-3);
- IfcVector3& v4 = *(result.verts.end()-4);
+ IfcVector3& v1 = *(result.mVerts.end()-1);
+ IfcVector3& v2 = *(result.mVerts.end()-2);
+ IfcVector3& v3 = *(result.mVerts.end()-3);
+ IfcVector3& v4 = *(result.mVerts.end()-4);
if (((v4-v3) ^ (v4-v1)) * (v4 - curve_points[i]) < 0.0f) {
std::swap(v4, v1);
std::swap(v3, v2);
}
- result.vertcnt.push_back(4);
+ result.mVertcnt.push_back(4);
}
}
@@ -459,14 +457,15 @@ void ProcessSweptDiskSolid(const IfcSweptDiskSolid solid, TempMesh& result, Conv
// ------------------------------------------------------------------------------------------------
IfcMatrix3 DerivePlaneCoordinateSpace(const TempMesh& curmesh, bool& ok, IfcVector3& norOut)
{
- const std::vector<IfcVector3>& out = curmesh.verts;
+ const std::vector<IfcVector3>& out = curmesh.mVerts;
IfcMatrix3 m;
ok = true;
// The input "mesh" must be a single polygon
const size_t s = out.size();
- assert(curmesh.vertcnt.size() == 1 && curmesh.vertcnt.back() == s);
+ ai_assert( curmesh.mVertcnt.size() == 1 );
+ ai_assert( curmesh.mVertcnt.back() == s);
const IfcVector3 any_point = out[s-1];
IfcVector3 nor;
@@ -477,9 +476,10 @@ IfcMatrix3 DerivePlaneCoordinateSpace(const TempMesh& curmesh, bool& ok, IfcVect
// axis for the 2D coordinate space on the polygon plane, exploiting the
// fact that the input polygon is nearly always a quad.
bool done = false;
- size_t i, j;
- for (i = 0; !done && i < s-2; done || ++i) {
- for (j = i+1; j < s-1; ++j) {
+ size_t idx( 0 );
+ for (size_t i = 0; !done && i < s-2; done || ++i) {
+ idx = i;
+ for (size_t j = i+1; j < s-1; ++j) {
nor = -((out[i]-any_point)^(out[j]-any_point));
if(std::fabs(nor.Length()) > 1e-8f) {
done = true;
@@ -496,7 +496,7 @@ IfcMatrix3 DerivePlaneCoordinateSpace(const TempMesh& curmesh, bool& ok, IfcVect
nor.Normalize();
norOut = nor;
- IfcVector3 r = (out[i]-any_point);
+ IfcVector3 r = (out[idx]-any_point);
r.Normalize();
//if(d) {
@@ -524,12 +524,12 @@ IfcMatrix3 DerivePlaneCoordinateSpace(const TempMesh& curmesh, bool& ok, IfcVect
}
// Extrudes the given polygon along the direction, converts it into an opening or applies all openings as necessary.
-void ProcessExtrudedArea(const IfcExtrudedAreaSolid& solid, const TempMesh& curve,
+void ProcessExtrudedArea(const Schema_2x3::IfcExtrudedAreaSolid& solid, const TempMesh& curve,
const IfcVector3& extrusionDir, TempMesh& result, ConversionData &conv, bool collect_openings)
{
// Outline: 'curve' is now a list of vertex points forming the underlying profile, extrude along the given axis,
// forming new triangles.
- const bool has_area = solid.SweptArea->ProfileType == "AREA" && curve.verts.size() > 2;
+ const bool has_area = solid.SweptArea->ProfileType == "AREA" && curve.mVerts.size() > 2;
if( solid.Depth < 1e-6 ) {
if( has_area ) {
result.Append(curve);
@@ -537,9 +537,9 @@ void ProcessExtrudedArea(const IfcExtrudedAreaSolid& solid, const TempMesh& curv
return;
}
- result.verts.reserve(curve.verts.size()*(has_area ? 4 : 2));
- result.vertcnt.reserve(curve.verts.size() + 2);
- std::vector<IfcVector3> in = curve.verts;
+ result.mVerts.reserve(curve.mVerts.size()*(has_area ? 4 : 2));
+ result.mVertcnt.reserve(curve.mVerts.size() + 2);
+ std::vector<IfcVector3> in = curve.mVerts;
// First step: transform all vertices into the target coordinate space
IfcMatrix4 trafo;
@@ -582,24 +582,24 @@ void ProcessExtrudedArea(const IfcExtrudedAreaSolid& solid, const TempMesh& curv
for(TempOpening& t : *conv.apply_openings) {
TempMesh& bounds = *t.profileMesh.get();
- if( bounds.verts.size() <= 2 ) {
+ if( bounds.mVerts.size() <= 2 ) {
nors.push_back(IfcVector3());
continue;
}
- nors.push_back(((bounds.verts[2] - bounds.verts[0]) ^ (bounds.verts[1] - bounds.verts[0])).Normalize());
+ nors.push_back(((bounds.mVerts[2] - bounds.mVerts[0]) ^ (bounds.mVerts[1] - bounds.mVerts[0])).Normalize());
}
}
TempMesh temp;
TempMesh& curmesh = openings ? temp : result;
- std::vector<IfcVector3>& out = curmesh.verts;
+ std::vector<IfcVector3>& out = curmesh.mVerts;
size_t sides_with_openings = 0;
for( size_t i = 0; i < in.size(); ++i ) {
const size_t next = (i + 1) % in.size();
- curmesh.vertcnt.push_back(4);
+ curmesh.mVertcnt.push_back(4);
out.push_back(in[i]);
out.push_back(in[next]);
@@ -638,7 +638,7 @@ void ProcessExtrudedArea(const IfcExtrudedAreaSolid& solid, const TempMesh& curv
out.push_back(in[i]);
}
- curmesh.vertcnt.push_back(static_cast<unsigned int>(in.size()));
+ curmesh.mVertcnt.push_back(static_cast<unsigned int>(in.size()));
if( openings && in.size() > 2 ) {
if( GenerateOpenings(*conv.apply_openings, nors, temp, true, true, dir) ) {
++sides_with_v_openings;
@@ -664,8 +664,8 @@ void ProcessExtrudedArea(const IfcExtrudedAreaSolid& solid, const TempMesh& curv
profile->Swap(result);
std::shared_ptr<TempMesh> profile2D = std::shared_ptr<TempMesh>(new TempMesh());
- profile2D->verts.insert(profile2D->verts.end(), in.begin(), in.end());
- profile2D->vertcnt.push_back(static_cast<unsigned int>(in.size()));
+ profile2D->mVerts.insert(profile2D->mVerts.end(), in.begin(), in.end());
+ profile2D->mVertcnt.push_back(static_cast<unsigned int>(in.size()));
conv.collect_openings->push_back(TempOpening(&solid, dir, profile, profile2D));
ai_assert(result.IsEmpty());
@@ -673,13 +673,13 @@ void ProcessExtrudedArea(const IfcExtrudedAreaSolid& solid, const TempMesh& curv
}
// ------------------------------------------------------------------------------------------------
-void ProcessExtrudedAreaSolid(const IfcExtrudedAreaSolid& solid, TempMesh& result,
+void ProcessExtrudedAreaSolid(const Schema_2x3::IfcExtrudedAreaSolid& solid, TempMesh& result,
ConversionData& conv, bool collect_openings)
{
TempMesh meshout;
// First read the profile description.
- if(!ProcessProfile(*solid.SweptArea,meshout,conv) || meshout.verts.size()<=1) {
+ if(!ProcessProfile(*solid.SweptArea,meshout,conv) || meshout.mVerts.size()<=1) {
return;
}
@@ -691,13 +691,13 @@ void ProcessExtrudedAreaSolid(const IfcExtrudedAreaSolid& solid, TempMesh& resul
// and there's still so many corner cases uncovered - we really need a generic solution to all of this hole carving.
std::vector<TempOpening> fisherPriceMyFirstOpenings;
std::vector<TempOpening>* oldApplyOpenings = conv.apply_openings;
- if( const IfcArbitraryProfileDefWithVoids* const cprofile = solid.SweptArea->ToPtr<IfcArbitraryProfileDefWithVoids>() ) {
+ if( const Schema_2x3::IfcArbitraryProfileDefWithVoids* const cprofile = solid.SweptArea->ToPtr<Schema_2x3::IfcArbitraryProfileDefWithVoids>() ) {
if( !cprofile->InnerCurves.empty() ) {
// read all inner curves and extrude them to form proper openings.
std::vector<TempOpening>* oldCollectOpenings = conv.collect_openings;
conv.collect_openings = &fisherPriceMyFirstOpenings;
- for(const IfcCurve* curve : cprofile->InnerCurves) {
+ for (const Schema_2x3::IfcCurve* curve : cprofile->InnerCurves) {
TempMesh curveMesh, tempMesh;
ProcessCurve(*curve, curveMesh, conv);
ProcessExtrudedArea(solid, curveMesh, dir, tempMesh, conv, true);
@@ -713,13 +713,13 @@ void ProcessExtrudedAreaSolid(const IfcExtrudedAreaSolid& solid, TempMesh& resul
}
// ------------------------------------------------------------------------------------------------
-void ProcessSweptAreaSolid(const IfcSweptAreaSolid& swept, TempMesh& meshout,
+void ProcessSweptAreaSolid(const Schema_2x3::IfcSweptAreaSolid& swept, TempMesh& meshout,
ConversionData& conv)
{
- if(const IfcExtrudedAreaSolid* const solid = swept.ToPtr<IfcExtrudedAreaSolid>()) {
+ if(const Schema_2x3::IfcExtrudedAreaSolid* const solid = swept.ToPtr<Schema_2x3::IfcExtrudedAreaSolid>()) {
ProcessExtrudedAreaSolid(*solid,meshout,conv, !!conv.collect_openings);
}
- else if(const IfcRevolvedAreaSolid* const rev = swept.ToPtr<IfcRevolvedAreaSolid>()) {
+ else if(const Schema_2x3::IfcRevolvedAreaSolid* const rev = swept.ToPtr<Schema_2x3::IfcRevolvedAreaSolid>()) {
ProcessRevolvedAreaSolid(*rev,meshout,conv);
}
else {
@@ -728,16 +728,16 @@ void ProcessSweptAreaSolid(const IfcSweptAreaSolid& swept, TempMesh& meshout,
}
// ------------------------------------------------------------------------------------------------
-bool ProcessGeometricItem(const IfcRepresentationItem& geo, unsigned int matid, std::vector<unsigned int>& mesh_indices,
+bool ProcessGeometricItem(const Schema_2x3::IfcRepresentationItem& geo, unsigned int matid, std::set<unsigned int>& mesh_indices,
ConversionData& conv)
{
bool fix_orientation = false;
std::shared_ptr< TempMesh > meshtmp = std::make_shared<TempMesh>();
- if(const IfcShellBasedSurfaceModel* shellmod = geo.ToPtr<IfcShellBasedSurfaceModel>()) {
- for(std::shared_ptr<const IfcShell> shell :shellmod->SbsmBoundary) {
+ if(const Schema_2x3::IfcShellBasedSurfaceModel* shellmod = geo.ToPtr<Schema_2x3::IfcShellBasedSurfaceModel>()) {
+ for(std::shared_ptr<const Schema_2x3::IfcShell> shell :shellmod->SbsmBoundary) {
try {
- const EXPRESS::ENTITY& e = shell->To<ENTITY>();
- const IfcConnectedFaceSet& fs = conv.db.MustGetObject(e).To<IfcConnectedFaceSet>();
+ const ::Assimp::STEP::EXPRESS::ENTITY& e = shell->To<::Assimp::STEP::EXPRESS::ENTITY>();
+ const Schema_2x3::IfcConnectedFaceSet& fs = conv.db.MustGetObject(e).To<Schema_2x3::IfcConnectedFaceSet>();
ProcessConnectedFaceSet(fs,*meshtmp.get(),conv);
}
@@ -747,30 +747,30 @@ bool ProcessGeometricItem(const IfcRepresentationItem& geo, unsigned int matid,
}
fix_orientation = true;
}
- else if(const IfcConnectedFaceSet* fset = geo.ToPtr<IfcConnectedFaceSet>()) {
+ else if(const Schema_2x3::IfcConnectedFaceSet* fset = geo.ToPtr<Schema_2x3::IfcConnectedFaceSet>()) {
ProcessConnectedFaceSet(*fset,*meshtmp.get(),conv);
fix_orientation = true;
}
- else if(const IfcSweptAreaSolid* swept = geo.ToPtr<IfcSweptAreaSolid>()) {
+ else if(const Schema_2x3::IfcSweptAreaSolid* swept = geo.ToPtr<Schema_2x3::IfcSweptAreaSolid>()) {
ProcessSweptAreaSolid(*swept,*meshtmp.get(),conv);
}
- else if(const IfcSweptDiskSolid* disk = geo.ToPtr<IfcSweptDiskSolid>()) {
+ else if(const Schema_2x3::IfcSweptDiskSolid* disk = geo.ToPtr<Schema_2x3::IfcSweptDiskSolid>()) {
ProcessSweptDiskSolid(*disk,*meshtmp.get(),conv);
}
- else if(const IfcManifoldSolidBrep* brep = geo.ToPtr<IfcManifoldSolidBrep>()) {
+ else if(const Schema_2x3::IfcManifoldSolidBrep* brep = geo.ToPtr<Schema_2x3::IfcManifoldSolidBrep>()) {
ProcessConnectedFaceSet(brep->Outer,*meshtmp.get(),conv);
fix_orientation = true;
}
- else if(const IfcFaceBasedSurfaceModel* surf = geo.ToPtr<IfcFaceBasedSurfaceModel>()) {
- for(const IfcConnectedFaceSet& fc : surf->FbsmFaces) {
+ else if(const Schema_2x3::IfcFaceBasedSurfaceModel* surf = geo.ToPtr<Schema_2x3::IfcFaceBasedSurfaceModel>()) {
+ for(const Schema_2x3::IfcConnectedFaceSet& fc : surf->FbsmFaces) {
ProcessConnectedFaceSet(fc,*meshtmp.get(),conv);
}
fix_orientation = true;
}
- else if(const IfcBooleanResult* boolean = geo.ToPtr<IfcBooleanResult>()) {
+ else if(const Schema_2x3::IfcBooleanResult* boolean = geo.ToPtr<Schema_2x3::IfcBooleanResult>()) {
ProcessBoolean(*boolean,*meshtmp.get(),conv);
}
- else if(geo.ToPtr<IfcBoundingBox>()) {
+ else if(geo.ToPtr<Schema_2x3::IfcBoundingBox>()) {
// silently skip over bounding boxes
return false;
}
@@ -788,7 +788,7 @@ bool ProcessGeometricItem(const IfcRepresentationItem& geo, unsigned int matid,
// which returns an empty mesh.
if(conv.collect_openings) {
if (!meshtmp->IsEmpty()) {
- conv.collect_openings->push_back(TempOpening(geo.ToPtr<IfcSolidModel>(),
+ conv.collect_openings->push_back(TempOpening(geo.ToPtr<Schema_2x3::IfcSolidModel>(),
IfcVector3(0,0,0),
meshtmp,
std::shared_ptr<TempMesh>()));
@@ -810,7 +810,7 @@ bool ProcessGeometricItem(const IfcRepresentationItem& geo, unsigned int matid,
aiMesh* const mesh = meshtmp->ToMesh();
if(mesh) {
mesh->mMaterialIndex = matid;
- mesh_indices.push_back(static_cast<unsigned int>(conv.meshes.size()));
+ mesh_indices.insert(static_cast<unsigned int>(conv.meshes.size()));
conv.meshes.push_back(mesh);
return true;
}
@@ -818,41 +818,39 @@ bool ProcessGeometricItem(const IfcRepresentationItem& geo, unsigned int matid,
}
// ------------------------------------------------------------------------------------------------
-void AssignAddedMeshes(std::vector<unsigned int>& mesh_indices,aiNode* nd,
+void AssignAddedMeshes(std::set<unsigned int>& mesh_indices,aiNode* nd,
ConversionData& /*conv*/)
{
if (!mesh_indices.empty()) {
+ std::set<unsigned int>::const_iterator it = mesh_indices.cbegin();
+ std::set<unsigned int>::const_iterator end = mesh_indices.cend();
- // 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());
-
- nd->mNumMeshes = static_cast<unsigned int>(std::distance(mesh_indices.begin(),it_end));
+ nd->mNumMeshes = static_cast<unsigned int>(mesh_indices.size());
nd->mMeshes = new unsigned int[nd->mNumMeshes];
- for(unsigned int i = 0; i < nd->mNumMeshes; ++i) {
- nd->mMeshes[i] = mesh_indices[i];
+ for(unsigned int i = 0; it != end && i < nd->mNumMeshes; ++i, ++it) {
+ nd->mMeshes[i] = *it;
}
}
}
// ------------------------------------------------------------------------------------------------
-bool TryQueryMeshCache(const IfcRepresentationItem& item,
- std::vector<unsigned int>& mesh_indices, unsigned int mat_index,
+bool TryQueryMeshCache(const Schema_2x3::IfcRepresentationItem& item,
+ std::set<unsigned int>& mesh_indices, unsigned int mat_index,
ConversionData& conv)
{
ConversionData::MeshCacheIndex idx(&item, mat_index);
ConversionData::MeshCache::const_iterator it = conv.cached_meshes.find(idx);
if (it != conv.cached_meshes.end()) {
- std::copy((*it).second.begin(),(*it).second.end(),std::back_inserter(mesh_indices));
+ std::copy((*it).second.begin(),(*it).second.end(),std::inserter(mesh_indices, mesh_indices.end()));
return true;
}
return false;
}
// ------------------------------------------------------------------------------------------------
-void PopulateMeshCache(const IfcRepresentationItem& item,
- const std::vector<unsigned int>& mesh_indices, unsigned int mat_index,
+void PopulateMeshCache(const Schema_2x3::IfcRepresentationItem& item,
+ const std::set<unsigned int>& mesh_indices, unsigned int mat_index,
ConversionData& conv)
{
ConversionData::MeshCacheIndex idx(&item, mat_index);
@@ -860,8 +858,8 @@ void PopulateMeshCache(const IfcRepresentationItem& item,
}
// ------------------------------------------------------------------------------------------------
-bool ProcessRepresentationItem(const IfcRepresentationItem& item, unsigned int matid,
- std::vector<unsigned int>& mesh_indices,
+bool ProcessRepresentationItem(const Schema_2x3::IfcRepresentationItem& item, unsigned int matid,
+ std::set<unsigned int>& mesh_indices,
ConversionData& conv)
{
// determine material
diff --git a/code/IFCLoader.cpp b/code/Importer/IFC/IFCLoader.cpp
index 463803ab3..473355538 100644
--- a/code/IFCLoader.cpp
+++ b/code/Importer/IFC/IFCLoader.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -51,22 +52,26 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <tuple>
#ifndef ASSIMP_BUILD_NO_COMPRESSED_IFC
-# include <contrib/unzip/unzip.h>
+# include <unzip.h>
#endif
#include "IFCLoader.h"
-#include "STEPFileReader.h"
+#include "../STEPParser/STEPFileReader.h"
#include "IFCUtil.h"
-#include "MemoryIOWrapper.h"
+#include <assimp/MemoryIOWrapper.h>
#include <assimp/scene.h>
#include <assimp/Importer.hpp>
#include <assimp/importerdesc.h>
namespace Assimp {
- template<> const std::string LogFunctions<IFCImporter>::log_prefix = "IFC: ";
+ template<> const char* LogFunctions<IFCImporter>::Prefix()
+ {
+ static auto prefix = "IFC: ";
+ return prefix;
+ }
}
using namespace Assimp;
@@ -95,7 +100,7 @@ void SetUnits(ConversionData& conv);
void SetCoordinateSpace(ConversionData& conv);
void ProcessSpatialStructures(ConversionData& conv);
void MakeTreeRelative(ConversionData& conv);
-void ConvertUnit(const EXPRESS::DataType& dt,ConversionData& conv);
+void ConvertUnit(const ::Assimp::STEP::EXPRESS::DataType& dt,ConversionData& conv);
} // anon
@@ -129,14 +134,15 @@ IFCImporter::~IFCImporter()
bool IFCImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
{
const std::string& extension = GetExtension(pFile);
- if (extension == "ifc" || extension == "ifczip" || extension == "stp" ) {
+ if (extension == "ifc" || extension == "ifczip" ) {
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);
+ const bool found( SearchFileHeaderForToken( pIOHandler, pFile, tokens, 1 ) );
+ return found;
}
return false;
}
@@ -148,14 +154,13 @@ const aiImporterDesc* IFCImporter::GetInfo () const
return &desc;
}
-
// ------------------------------------------------------------------------------------------------
// 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.useCustomTriangulation = pImp->GetPropertyBool(AI_CONFIG_IMPORT_IFC_CUSTOM_TRIANGULATION,true);
- settings.conicSamplingAngle = std::min(std::max(pImp->GetPropertyFloat(AI_CONFIG_IMPORT_IFC_SMOOTHING_ANGLE, AI_IMPORT_IFC_DEFAULT_SMOOTHING_ANGLE), 5.0f), 120.0f);
+ settings.conicSamplingAngle = std::min(std::max((float) pImp->GetPropertyFloat(AI_CONFIG_IMPORT_IFC_SMOOTHING_ANGLE, AI_IMPORT_IFC_DEFAULT_SMOOTHING_ANGLE), 5.0f), 120.0f);
settings.cylindricalTessellation = std::min(std::max(pImp->GetPropertyInteger(AI_CONFIG_IMPORT_IFC_CYLINDRICAL_TESSELLATION, AI_IMPORT_IFC_DEFAULT_CYLINDRICAL_TESSELLATION), 3), 180);
settings.skipAnnotations = true;
}
@@ -163,8 +168,7 @@ void IFCImporter::SetupProperties(const Importer* pImp)
// ------------------------------------------------------------------------------------------------
// Imports the given file into the given scene structure.
-void IFCImporter::InternReadFile( const std::string& pFile,
- aiScene* pScene, IOSystem* pIOHandler)
+void IFCImporter::InternReadFile( const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler)
{
std::shared_ptr<IOStream> stream(pIOHandler->Open(pFile));
if (!stream) {
@@ -249,8 +253,8 @@ void IFCImporter::InternReadFile( const std::string& pFile,
}
// obtain a copy of the machine-generated IFC scheme
- EXPRESS::ConversionSchema schema;
- GetSchema(schema);
+ ::Assimp::STEP::EXPRESS::ConversionSchema schema;
+ Schema_2x3::GetSchema(schema);
// tell the reader which entity types to track with special care
static const char* const types_to_track[] = {
@@ -269,7 +273,7 @@ void IFCImporter::InternReadFile( const std::string& pFile,
ThrowException("missing IfcProject entity");
}
- ConversionData conv(*db,proj->To<IfcProject>(),pScene,settings);
+ ConversionData conv(*db,proj->To<Schema_2x3::IfcProject>(),pScene,settings);
SetUnits(conv);
SetCoordinateSpace(conv);
ProcessSpatialStructures(conv);
@@ -319,10 +323,9 @@ namespace {
// ------------------------------------------------------------------------------------------------
-void ConvertUnit(const IfcNamedUnit& unit,ConversionData& conv)
+void ConvertUnit(const Schema_2x3::IfcNamedUnit& unit,ConversionData& conv)
{
- if(const IfcSIUnit* const si = unit.ToPtr<IfcSIUnit>()) {
-
+ if(const Schema_2x3::IfcSIUnit* const si = unit.ToPtr<Schema_2x3::IfcSIUnit>()) {
if(si->UnitType == "LENGTHUNIT") {
conv.len_scale = si->Prefix ? ConvertSIPrefix(si->Prefix) : 1.f;
IFCImporter::LogDebug("got units used for lengths");
@@ -333,11 +336,10 @@ void ConvertUnit(const IfcNamedUnit& unit,ConversionData& conv)
}
}
}
- else if(const IfcConversionBasedUnit* const convu = unit.ToPtr<IfcConversionBasedUnit>()) {
-
+ else if(const Schema_2x3::IfcConversionBasedUnit* const convu = unit.ToPtr<Schema_2x3::IfcConversionBasedUnit>()) {
if(convu->UnitType == "PLANEANGLEUNIT") {
try {
- conv.angle_scale = convu->ConversionFactor->ValueComponent->To<EXPRESS::REAL>();
+ conv.angle_scale = convu->ConversionFactor->ValueComponent->To<::Assimp::STEP::EXPRESS::REAL>();
ConvertUnit(*convu->ConversionFactor->UnitComponent,conv);
IFCImporter::LogDebug("got units used for angles");
}
@@ -349,12 +351,12 @@ void ConvertUnit(const IfcNamedUnit& unit,ConversionData& conv)
}
// ------------------------------------------------------------------------------------------------
-void ConvertUnit(const EXPRESS::DataType& dt,ConversionData& conv)
+void ConvertUnit(const ::Assimp::STEP::EXPRESS::DataType& dt,ConversionData& conv)
{
try {
- const EXPRESS::ENTITY& e = dt.To<ENTITY>();
+ const ::Assimp::STEP::EXPRESS::ENTITY& e = dt.To<::Assimp::STEP::EXPRESS::ENTITY>();
- const IfcNamedUnit& unit = e.ResolveSelect<IfcNamedUnit>(conv.db);
+ const Schema_2x3::IfcNamedUnit& unit = e.ResolveSelect<Schema_2x3::IfcNamedUnit>(conv.db);
if(unit.UnitType != "LENGTHUNIT" && unit.UnitType != "PLANEANGLEUNIT") {
return;
}
@@ -380,8 +382,8 @@ void SetUnits(ConversionData& conv)
// ------------------------------------------------------------------------------------------------
void SetCoordinateSpace(ConversionData& conv)
{
- const IfcRepresentationContext* fav = NULL;
- for(const IfcRepresentationContext& v : conv.proj.RepresentationContexts) {
+ const Schema_2x3::IfcRepresentationContext* fav = NULL;
+ for(const Schema_2x3::IfcRepresentationContext& v : conv.proj.RepresentationContexts) {
fav = &v;
// Model should be the most suitable type of context, hence ignore the others
if (v.ContextType && v.ContextType.Get() == "Model") {
@@ -389,7 +391,7 @@ void SetCoordinateSpace(ConversionData& conv)
}
}
if (fav) {
- if(const IfcGeometricRepresentationContext* const geo = fav->ToPtr<IfcGeometricRepresentationContext>()) {
+ if(const Schema_2x3::IfcGeometricRepresentationContext* const geo = fav->ToPtr<Schema_2x3::IfcGeometricRepresentationContext>()) {
ConvertAxisPlacement(conv.wcs, *geo->WorldCoordinateSystem, conv);
IFCImporter::LogDebug("got world coordinate system");
}
@@ -398,9 +400,9 @@ void SetCoordinateSpace(ConversionData& conv)
// ------------------------------------------------------------------------------------------------
-void ResolveObjectPlacement(aiMatrix4x4& m, const IfcObjectPlacement& place, ConversionData& conv)
+void ResolveObjectPlacement(aiMatrix4x4& m, const Schema_2x3::IfcObjectPlacement& place, ConversionData& conv)
{
- if (const IfcLocalPlacement* const local = place.ToPtr<IfcLocalPlacement>()){
+ if (const Schema_2x3::IfcLocalPlacement* const local = place.ToPtr<Schema_2x3::IfcLocalPlacement>()){
IfcMatrix4 tmp;
ConvertAxisPlacement(tmp, *local->RelativePlacement, conv);
@@ -418,9 +420,9 @@ void ResolveObjectPlacement(aiMatrix4x4& m, const IfcObjectPlacement& place, Con
}
// ------------------------------------------------------------------------------------------------
-bool ProcessMappedItem(const IfcMappedItem& mapped, aiNode* nd_src, std::vector< aiNode* >& subnodes_src, unsigned int matid, ConversionData& conv)
+bool ProcessMappedItem(const Schema_2x3::IfcMappedItem& mapped, aiNode* nd_src, std::vector< aiNode* >& subnodes_src, unsigned int matid, ConversionData& conv)
{
- // insert a custom node here, the cartesian transform operator is simply a conventional transformation matrix
+ // insert a custom node here, the carthesian transform operator is simply a conventional transformation matrix
std::unique_ptr<aiNode> nd(new aiNode());
nd->mName.Set("IfcMappedItem");
@@ -433,7 +435,7 @@ bool ProcessMappedItem(const IfcMappedItem& mapped, aiNode* nd_src, std::vector<
msrc = m*msrc;
- std::vector<unsigned int> meshes;
+ std::set<unsigned int> meshes;
const size_t old_openings = conv.collect_openings ? conv.collect_openings->size() : 0;
if (conv.apply_openings) {
IfcMatrix4 minv = msrc;
@@ -444,10 +446,10 @@ bool ProcessMappedItem(const IfcMappedItem& mapped, aiNode* nd_src, std::vector<
}
unsigned int localmatid = ProcessMaterials(mapped.GetID(),matid,conv,false);
- const IfcRepresentation& repr = mapped.MappingSource->MappedRepresentation;
+ const Schema_2x3::IfcRepresentation& repr = mapped.MappingSource->MappedRepresentation;
bool got = false;
- for(const IfcRepresentationItem& item : repr.Items) {
+ for(const Schema_2x3::IfcRepresentationItem& item : repr.Items) {
if(!ProcessRepresentationItem(item,localmatid,meshes,conv)) {
IFCImporter::LogWarn("skipping mapped entity of type " + item.GetClassName() + ", no representations could be generated");
}
@@ -479,8 +481,7 @@ bool ProcessMappedItem(const IfcMappedItem& mapped, aiNode* nd_src, std::vector<
// ------------------------------------------------------------------------------------------------
struct RateRepresentationPredicate {
-
- int Rate(const IfcRepresentation* r) const {
+ int Rate(const Schema_2x3::IfcRepresentation* r) const {
// the smaller, the better
if (! r->RepresentationIdentifier) {
@@ -493,7 +494,7 @@ struct RateRepresentationPredicate {
if (name == "MappedRepresentation") {
if (!r->Items.empty()) {
// take the first item and base our choice on it
- const IfcMappedItem* const m = r->Items.front()->ToPtr<IfcMappedItem>();
+ const Schema_2x3::IfcMappedItem* const m = r->Items.front()->ToPtr<Schema_2x3::IfcMappedItem>();
if (m) {
return Rate(m->MappingSource->MappedRepresentation);
}
@@ -505,8 +506,6 @@ struct RateRepresentationPredicate {
}
int Rate(const std::string& r) const {
-
-
if (r == "SolidModel") {
return -3;
}
@@ -537,13 +536,13 @@ struct RateRepresentationPredicate {
return 0;
}
- bool operator() (const IfcRepresentation* a, const IfcRepresentation* b) const {
+ bool operator() (const Schema_2x3::IfcRepresentation* a, const Schema_2x3::IfcRepresentation* b) const {
return Rate(a) < Rate(b);
}
};
// ------------------------------------------------------------------------------------------------
-void ProcessProductRepresentation(const IfcProduct& el, aiNode* nd, std::vector< aiNode* >& subnodes, ConversionData& conv)
+void ProcessProductRepresentation(const Schema_2x3::IfcProduct& el, aiNode* nd, std::vector< aiNode* >& subnodes, ConversionData& conv)
{
if(!el.Representation) {
return;
@@ -551,21 +550,21 @@ void ProcessProductRepresentation(const IfcProduct& el, aiNode* nd, std::vector<
// extract Color from metadata, if present
unsigned int matid = ProcessMaterials( el.GetID(), std::numeric_limits<uint32_t>::max(), conv, false);
- std::vector<unsigned int> meshes;
+ std::set<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());
+ const STEP::ListOf< STEP::Lazy< Schema_2x3::IfcRepresentation >, 1, 0 >& src = el.Representation.Get()->Representations;
+ std::vector<const Schema_2x3::IfcRepresentation*> repr_ordered(src.size());
std::copy(src.begin(),src.end(),repr_ordered.begin());
std::sort(repr_ordered.begin(),repr_ordered.end(),RateRepresentationPredicate());
- for(const IfcRepresentation* repr : repr_ordered) {
+ for(const Schema_2x3::IfcRepresentation* repr : repr_ordered) {
bool res = false;
- for(const IfcRepresentationItem& item : repr->Items) {
- if(const IfcMappedItem* const geo = item.ToPtr<IfcMappedItem>()) {
+ for(const Schema_2x3::IfcRepresentationItem& item : repr->Items) {
+ if(const Schema_2x3::IfcMappedItem* const geo = item.ToPtr<Schema_2x3::IfcMappedItem>()) {
res = ProcessMappedItem(*geo,nd,subnodes,matid,conv) || res;
}
else {
@@ -583,25 +582,24 @@ void ProcessProductRepresentation(const IfcProduct& el, aiNode* nd, std::vector<
typedef std::map<std::string, std::string> Metadata;
// ------------------------------------------------------------------------------------------------
-void ProcessMetadata(const ListOf< Lazy< IfcProperty >, 1, 0 >& set, ConversionData& conv, Metadata& properties,
- const std::string& prefix = "",
- unsigned int nest = 0)
-{
- for(const IfcProperty& property : set) {
+void ProcessMetadata(const Schema_2x3::ListOf< Schema_2x3::Lazy< Schema_2x3::IfcProperty >, 1, 0 >& set, ConversionData& conv, Metadata& properties,
+ const std::string& prefix = "",
+ unsigned int nest = 0) {
+ for(const Schema_2x3::IfcProperty& property : set) {
const std::string& key = prefix.length() > 0 ? (prefix + "." + property.Name) : property.Name;
- if (const IfcPropertySingleValue* const singleValue = property.ToPtr<IfcPropertySingleValue>()) {
+ if (const Schema_2x3::IfcPropertySingleValue* const singleValue = property.ToPtr<Schema_2x3::IfcPropertySingleValue>()) {
if (singleValue->NominalValue) {
- if (const EXPRESS::STRING* str = singleValue->NominalValue.Get()->ToPtr<EXPRESS::STRING>()) {
+ if (const ::Assimp::STEP::EXPRESS::STRING* str = singleValue->NominalValue.Get()->ToPtr<::Assimp::STEP::EXPRESS::STRING>()) {
std::string value = static_cast<std::string>(*str);
properties[key]=value;
}
- else if (const EXPRESS::REAL* val = singleValue->NominalValue.Get()->ToPtr<EXPRESS::REAL>()) {
+ else if (const ::Assimp::STEP::EXPRESS::REAL* val = singleValue->NominalValue.Get()->ToPtr<::Assimp::STEP::EXPRESS::REAL>()) {
float value = static_cast<float>(*val);
std::stringstream s;
s << value;
properties[key]=s.str();
}
- else if (const EXPRESS::INTEGER* val = singleValue->NominalValue.Get()->ToPtr<EXPRESS::INTEGER>()) {
+ else if (const ::Assimp::STEP::EXPRESS::INTEGER* val = singleValue->NominalValue.Get()->ToPtr<::Assimp::STEP::EXPRESS::INTEGER>()) {
int64_t value = static_cast<int64_t>(*val);
std::stringstream s;
s << value;
@@ -609,21 +607,21 @@ void ProcessMetadata(const ListOf< Lazy< IfcProperty >, 1, 0 >& set, ConversionD
}
}
}
- else if (const IfcPropertyListValue* const listValue = property.ToPtr<IfcPropertyListValue>()) {
+ else if (const Schema_2x3::IfcPropertyListValue* const listValue = property.ToPtr<Schema_2x3::IfcPropertyListValue>()) {
std::stringstream ss;
ss << "[";
unsigned index=0;
- for(const IfcValue::Out& v : listValue->ListValues) {
+ for(const Schema_2x3::IfcValue::Out& v : listValue->ListValues) {
if (!v) continue;
- if (const EXPRESS::STRING* str = v->ToPtr<EXPRESS::STRING>()) {
+ if (const ::Assimp::STEP::EXPRESS::STRING* str = v->ToPtr<::Assimp::STEP::EXPRESS::STRING>()) {
std::string value = static_cast<std::string>(*str);
ss << "'" << value << "'";
}
- else if (const EXPRESS::REAL* val = v->ToPtr<EXPRESS::REAL>()) {
+ else if (const ::Assimp::STEP::EXPRESS::REAL* val = v->ToPtr<::Assimp::STEP::EXPRESS::REAL>()) {
float value = static_cast<float>(*val);
ss << value;
}
- else if (const EXPRESS::INTEGER* val = v->ToPtr<EXPRESS::INTEGER>()) {
+ else if (const ::Assimp::STEP::EXPRESS::INTEGER* val = v->ToPtr<::Assimp::STEP::EXPRESS::INTEGER>()) {
int64_t value = static_cast<int64_t>(*val);
ss << value;
}
@@ -635,7 +633,7 @@ void ProcessMetadata(const ListOf< Lazy< IfcProperty >, 1, 0 >& set, ConversionD
ss << "]";
properties[key]=ss.str();
}
- else if (const IfcComplexProperty* const complexProp = property.ToPtr<IfcComplexProperty>()) {
+ else if (const Schema_2x3::IfcComplexProperty* const complexProp = property.ToPtr<Schema_2x3::IfcComplexProperty>()) {
if(nest > 2) { // mostly arbitrary limit to prevent stack overflow vulnerabilities
IFCImporter::LogError("maximum nesting level for IfcComplexProperty reached, skipping this property.");
}
@@ -653,29 +651,29 @@ void ProcessMetadata(const ListOf< Lazy< IfcProperty >, 1, 0 >& set, ConversionD
// ------------------------------------------------------------------------------------------------
void ProcessMetadata(uint64_t relDefinesByPropertiesID, ConversionData& conv, Metadata& properties)
{
- if (const IfcRelDefinesByProperties* const pset = conv.db.GetObject(relDefinesByPropertiesID)->ToPtr<IfcRelDefinesByProperties>()) {
- if (const IfcPropertySet* const set = conv.db.GetObject(pset->RelatingPropertyDefinition->GetID())->ToPtr<IfcPropertySet>()) {
+ if (const Schema_2x3::IfcRelDefinesByProperties* const pset = conv.db.GetObject(relDefinesByPropertiesID)->ToPtr<Schema_2x3::IfcRelDefinesByProperties>()) {
+ if (const Schema_2x3::IfcPropertySet* const set = conv.db.GetObject(pset->RelatingPropertyDefinition->GetID())->ToPtr<Schema_2x3::IfcPropertySet>()) {
ProcessMetadata(set->HasProperties, conv, properties);
}
}
}
// ------------------------------------------------------------------------------------------------
-aiNode* ProcessSpatialStructure(aiNode* parent, const IfcProduct& el, ConversionData& conv, std::vector<TempOpening>* collect_openings = NULL)
+aiNode* ProcessSpatialStructure(aiNode* parent, const Schema_2x3::IfcProduct& el, ConversionData& conv, std::vector<TempOpening>* collect_openings = NULL)
{
const STEP::DB::RefMap& refs = conv.db.GetRefs();
// skip over space and annotation nodes - usually, these have no meaning in Assimp's context
bool skipGeometry = false;
if(conv.settings.skipSpaceRepresentations) {
- if(el.ToPtr<IfcSpace>()) {
+ if(el.ToPtr<Schema_2x3::IfcSpace>()) {
IFCImporter::LogDebug("skipping IfcSpace entity due to importer settings");
skipGeometry = true;
}
}
if(conv.settings.skipAnnotations) {
- if(el.ToPtr<IfcAnnotation>()) {
+ if(el.ToPtr<Schema_2x3::IfcAnnotation>()) {
IFCImporter::LogDebug("skipping IfcAnnotation entity due to importer settings");
return NULL;
}
@@ -741,12 +739,12 @@ aiNode* ProcessSpatialStructure(aiNode* parent, const IfcProduct& el, Conversion
const STEP::LazyObject& obj = conv.db.MustGetObject((*range2.first).second);
// handle regularly-contained elements
- if(const IfcRelContainedInSpatialStructure* const cont = obj->ToPtr<IfcRelContainedInSpatialStructure>()) {
+ if(const Schema_2x3::IfcRelContainedInSpatialStructure* const cont = obj->ToPtr<Schema_2x3::IfcRelContainedInSpatialStructure>()) {
if(cont->RelatingStructure->GetID() != el.GetID()) {
continue;
}
- for(const IfcProduct& pro : cont->RelatedElements) {
- if(pro.ToPtr<IfcOpeningElement>()) {
+ for(const Schema_2x3::IfcProduct& pro : cont->RelatedElements) {
+ if(pro.ToPtr<Schema_2x3::IfcOpeningElement>()) {
// IfcOpeningElement is handled below. Sadly we can't use it here as is:
// The docs say that opening elements are USUALLY attached to building storey,
// but we want them for the building elements to which they belong.
@@ -760,9 +758,9 @@ aiNode* ProcessSpatialStructure(aiNode* parent, const IfcProduct& el, Conversion
}
}
// handle openings, which we collect in a list rather than adding them to the node graph
- else if(const IfcRelVoidsElement* const fills = obj->ToPtr<IfcRelVoidsElement>()) {
+ else if(const Schema_2x3::IfcRelVoidsElement* const fills = obj->ToPtr<Schema_2x3::IfcRelVoidsElement>()) {
if(fills->RelatingBuildingElement->GetID() == el.GetID()) {
- const IfcFeatureElementSubtraction& open = fills->RelatedOpeningElement;
+ const Schema_2x3::IfcFeatureElementSubtraction& open = fills->RelatedOpeningElement;
// move opening elements to a separate node since they are semantically different than elements that are just 'contained'
std::unique_ptr<aiNode> nd_aggr(new aiNode());
@@ -804,7 +802,7 @@ aiNode* ProcessSpatialStructure(aiNode* parent, const IfcProduct& el, Conversion
if (conv.already_processed.find((*range.first).second) != conv.already_processed.end()) {
continue;
}
- if(const IfcRelAggregates* const aggr = conv.db.GetObject((*range.first).second)->ToPtr<IfcRelAggregates>()) {
+ if(const Schema_2x3::IfcRelAggregates* const aggr = conv.db.GetObject((*range.first).second)->ToPtr<Schema_2x3::IfcRelAggregates>()) {
if(aggr->RelatingObject->GetID() != el.GetID()) {
continue;
}
@@ -817,8 +815,8 @@ aiNode* ProcessSpatialStructure(aiNode* parent, const IfcProduct& el, Conversion
nd_aggr->mTransformation = nd->mTransformation;
nd_aggr->mChildren = new aiNode*[aggr->RelatedObjects.size()]();
- for(const IfcObjectDefinition& def : aggr->RelatedObjects) {
- if(const IfcProduct* const prod = def.ToPtr<IfcProduct>()) {
+ for(const Schema_2x3::IfcObjectDefinition& def : aggr->RelatedObjects) {
+ if(const Schema_2x3::IfcProduct* const prod = def.ToPtr<Schema_2x3::IfcProduct>()) {
aiNode* const ndnew = ProcessSpatialStructure(nd_aggr.get(),*prod,conv,NULL);
if(ndnew) {
@@ -885,7 +883,7 @@ void ProcessSpatialStructures(ConversionData& conv)
std::vector<aiNode*> nodes;
for(const STEP::LazyObject* lz : *range) {
- const IfcSpatialStructureElement* const prod = lz->ToPtr<IfcSpatialStructureElement>();
+ const Schema_2x3::IfcSpatialStructureElement* const prod = lz->ToPtr<Schema_2x3::IfcSpatialStructureElement>();
if(!prod) {
continue;
}
@@ -895,9 +893,9 @@ void ProcessSpatialStructures(ConversionData& conv)
const STEP::DB::RefMap& refs = conv.db.GetRefs();
STEP::DB::RefMapRange ref_range = refs.equal_range(conv.proj.GetID());
for(; ref_range.first != ref_range.second; ++ref_range.first) {
- if(const IfcRelAggregates* const aggr = conv.db.GetObject((*ref_range.first).second)->ToPtr<IfcRelAggregates>()) {
+ if(const Schema_2x3::IfcRelAggregates* const aggr = conv.db.GetObject((*ref_range.first).second)->ToPtr<Schema_2x3::IfcRelAggregates>()) {
- for(const IfcObjectDefinition& def : aggr->RelatedObjects) {
+ for(const Schema_2x3::IfcObjectDefinition& def : aggr->RelatedObjects) {
// comparing pointer values is not sufficient, we would need to cast them to the same type first
// as there is multiple inheritance in the game.
if (def.GetID() == prod->GetID()) {
@@ -906,7 +904,6 @@ void ProcessSpatialStructures(ConversionData& conv)
nodes.push_back(ProcessSpatialStructure(NULL, *prod, conv, NULL));
}
}
-
}
}
}
@@ -916,7 +913,7 @@ void ProcessSpatialStructures(ConversionData& conv)
if (nb_nodes == 0) {
IFCImporter::LogWarn("failed to determine primary site element, taking all the IfcSite");
for (const STEP::LazyObject* lz : *range) {
- const IfcSpatialStructureElement* const prod = lz->ToPtr<IfcSpatialStructureElement>();
+ const Schema_2x3::IfcSpatialStructureElement* const prod = lz->ToPtr<Schema_2x3::IfcSpatialStructureElement>();
if (!prod) {
continue;
}
@@ -935,7 +932,7 @@ void ProcessSpatialStructures(ConversionData& conv)
conv.out->mRootNode->mParent = NULL;
conv.out->mRootNode->mNumChildren = static_cast<unsigned int>(nb_nodes);
conv.out->mRootNode->mChildren = new aiNode*[conv.out->mRootNode->mNumChildren];
-
+
for (size_t i = 0; i < nb_nodes; ++i) {
aiNode* node = nodes[i];
diff --git a/code/IFCLoader.h b/code/Importer/IFC/IFCLoader.h
index 4cf116f8e..99e3e8ed9 100644
--- a/code/IFCLoader.h
+++ b/code/Importer/IFC/IFCLoader.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -45,8 +46,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef INCLUDED_AI_IFC_LOADER_H
#define INCLUDED_AI_IFC_LOADER_H
-#include "BaseImporter.h"
-#include "LogAux.h"
+#include <assimp/BaseImporter.h>
+#include <assimp/LogAux.h>
namespace Assimp {
diff --git a/code/IFCMaterial.cpp b/code/Importer/IFC/IFCMaterial.cpp
index aa11c5c22..423d1471e 100644
--- a/code/IFCMaterial.cpp
+++ b/code/Importer/IFC/IFCMaterial.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -68,20 +69,20 @@ static int ConvertShadingMode(const std::string& name) {
}
// ------------------------------------------------------------------------------------------------
-static void FillMaterial(aiMaterial* mat,const IFC::IfcSurfaceStyle* surf,ConversionData& conv) {
+static void FillMaterial(aiMaterial* mat,const IFC::Schema_2x3::IfcSurfaceStyle* surf,ConversionData& conv) {
aiString name;
name.Set((surf->Name? surf->Name.Get() : "IfcSurfaceStyle_Unnamed"));
mat->AddProperty(&name,AI_MATKEY_NAME);
// now see which kinds of surface information are present
- for(std::shared_ptr< const IFC::IfcSurfaceStyleElementSelect > sel2 : surf->Styles) {
- if (const IFC::IfcSurfaceStyleShading* shade = sel2->ResolveSelectPtr<IFC::IfcSurfaceStyleShading>(conv.db)) {
+ for(std::shared_ptr< const IFC::Schema_2x3::IfcSurfaceStyleElementSelect > sel2 : surf->Styles) {
+ if (const IFC::Schema_2x3::IfcSurfaceStyleShading* shade = sel2->ResolveSelectPtr<IFC::Schema_2x3::IfcSurfaceStyleShading>(conv.db)) {
aiColor4D col_base,col;
ConvertColor(col_base, shade->SurfaceColour);
mat->AddProperty(&col_base,1, AI_MATKEY_COLOR_DIFFUSE);
- if (const IFC::IfcSurfaceStyleRendering* ren = shade->ToPtr<IFC::IfcSurfaceStyleRendering>()) {
+ if (const IFC::Schema_2x3::IfcSurfaceStyleRendering* ren = shade->ToPtr<IFC::Schema_2x3::IfcSurfaceStyleRendering>()) {
if (ren->Transparency) {
const float t = 1.f-static_cast<float>(ren->Transparency.Get());
@@ -112,7 +113,7 @@ static void FillMaterial(aiMaterial* mat,const IFC::IfcSurfaceStyle* surf,Conver
mat->AddProperty(&shading,1, AI_MATKEY_SHADING_MODEL);
if (ren->SpecularHighlight) {
- if(const EXPRESS::REAL* rt = ren->SpecularHighlight.Get()->ToPtr<EXPRESS::REAL>()) {
+ if(const ::Assimp::STEP::EXPRESS::REAL* rt = ren->SpecularHighlight.Get()->ToPtr<::Assimp::STEP::EXPRESS::REAL>()) {
// at this point we don't distinguish between the two distinct ways of
// specifying highlight intensities. leave this to the user.
const float e = static_cast<float>(*rt);
@@ -123,23 +124,19 @@ static void FillMaterial(aiMaterial* mat,const IFC::IfcSurfaceStyle* surf,Conver
}
}
}
- } /*
- else if (const IFC::IfcSurfaceStyleWithTextures* tex = sel2->ResolveSelectPtr<IFC::IfcSurfaceStyleWithTextures>(conv.db)) {
- // XXX
- } */
+ }
}
-
}
// ------------------------------------------------------------------------------------------------
unsigned int ProcessMaterials(uint64_t id, unsigned int prevMatId, ConversionData& conv, bool forceDefaultMat) {
STEP::DB::RefMapRange range = conv.db.GetRefs().equal_range(id);
for(;range.first != range.second; ++range.first) {
- if(const IFC::IfcStyledItem* const styled = conv.db.GetObject((*range.first).second)->ToPtr<IFC::IfcStyledItem>()) {
- for(const IFC::IfcPresentationStyleAssignment& as : styled->Styles) {
- for(std::shared_ptr<const IFC::IfcPresentationStyleSelect> sel : as.Styles) {
+ if(const IFC::Schema_2x3::IfcStyledItem* const styled = conv.db.GetObject((*range.first).second)->ToPtr<IFC::Schema_2x3::IfcStyledItem>()) {
+ for(const IFC::Schema_2x3::IfcPresentationStyleAssignment& as : styled->Styles) {
+ for(std::shared_ptr<const IFC::Schema_2x3::IfcPresentationStyleSelect> sel : as.Styles) {
- if( const IFC::IfcSurfaceStyle* const surf = sel->ResolveSelectPtr<IFC::IfcSurfaceStyle>(conv.db) ) {
+ if( const IFC::Schema_2x3::IfcSurfaceStyle* const surf = sel->ResolveSelectPtr<IFC::Schema_2x3::IfcSurfaceStyle>(conv.db) ) {
// try to satisfy from cache
ConversionData::MaterialCache::iterator mit = conv.cached_materials.find(surf);
if( mit != conv.cached_materials.end() )
diff --git a/code/IFCOpenings.cpp b/code/Importer/IFC/IFCOpenings.cpp
index f40b49fe4..c5720e943 100644
--- a/code/IFCOpenings.cpp
+++ b/code/Importer/IFC/IFCOpenings.cpp
@@ -46,8 +46,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_NO_IFC_IMPORTER
#include "IFCUtil.h"
-#include "PolyTools.h"
-#include "ProcessHelper.h"
+#include "code/PolyTools.h"
+#include "code/ProcessHelper.h"
#include "../contrib/poly2tri/poly2tri/poly2tri.h"
#include "../contrib/clipper/clipper.hpp"
@@ -323,7 +323,7 @@ void InsertWindowContours(const ContourVector& contours,
if (hit) {
if (last_hit != (size_t)-1) {
- const size_t old = curmesh.verts.size();
+ const size_t old = curmesh.mVerts.size();
size_t cnt = last_hit > n ? size-(last_hit-n) : n-last_hit;
for(size_t a = last_hit, e = 0; e <= cnt; a=(a+1)%size, ++e) {
// hack: this is to fix cases where opening contours are self-intersecting.
@@ -335,7 +335,7 @@ void InsertWindowContours(const ContourVector& contours,
if ((contour[a] - edge).SquareLength() > diag*diag*0.7) {
continue;
}
- curmesh.verts.push_back(IfcVector3(contour[a].x, contour[a].y, 0.0f));
+ curmesh.mVerts.push_back(IfcVector3(contour[a].x, contour[a].y, 0.0f));
}
if (edge != contour[last_hit]) {
@@ -356,16 +356,16 @@ void InsertWindowContours(const ContourVector& contours,
corner.y = bb.second.y;
}
- curmesh.verts.push_back(IfcVector3(corner.x, corner.y, 0.0f));
+ curmesh.mVerts.push_back(IfcVector3(corner.x, corner.y, 0.0f));
}
else if (cnt == 1) {
// avoid degenerate polygons (also known as lines or points)
- curmesh.verts.erase(curmesh.verts.begin()+old,curmesh.verts.end());
+ curmesh.mVerts.erase(curmesh.mVerts.begin()+old,curmesh.mVerts.end());
}
- if (const size_t d = curmesh.verts.size()-old) {
- curmesh.vertcnt.push_back(static_cast<unsigned int>(d));
- std::reverse(curmesh.verts.rbegin(),curmesh.verts.rbegin()+d);
+ if (const size_t d = curmesh.mVerts.size()-old) {
+ curmesh.mVertcnt.push_back(static_cast<unsigned int>(d));
+ std::reverse(curmesh.mVerts.rbegin(),curmesh.mVerts.rbegin()+d);
}
if (n == very_first_hit) {
break;
@@ -504,8 +504,8 @@ void CleanupOuterContour(const std::vector<IfcVector2>& contour_flat, TempMesh&
std::vector<IfcVector3> vold;
std::vector<unsigned int> iold;
- vold.reserve(curmesh.verts.size());
- iold.reserve(curmesh.vertcnt.size());
+ vold.reserve(curmesh.mVerts.size());
+ iold.reserve(curmesh.mVertcnt.size());
// Fix the outer contour using polyclipper
try {
@@ -530,9 +530,9 @@ void CleanupOuterContour(const std::vector<IfcVector2>& contour_flat, TempMesh&
subject.reserve(4);
size_t index = 0;
size_t countdown = 0;
- for(const IfcVector3& pip : curmesh.verts) {
+ for(const IfcVector3& pip : curmesh.mVerts) {
if (!countdown) {
- countdown = curmesh.vertcnt[index++];
+ countdown = curmesh.mVertcnt[index++];
if (!countdown) {
continue;
}
@@ -572,8 +572,8 @@ void CleanupOuterContour(const std::vector<IfcVector2>& contour_flat, TempMesh&
}
// swap data arrays
- std::swap(vold,curmesh.verts);
- std::swap(iold,curmesh.vertcnt);
+ std::swap(vold,curmesh.mVerts);
+ std::swap(iold,curmesh.mVertcnt);
}
typedef std::vector<TempOpening*> OpeningRefs;
@@ -898,14 +898,14 @@ size_t CloseWindows(ContourVector& contours,
SkipList::const_iterator skipbegin = (*it).skiplist.begin();
- curmesh.verts.reserve(curmesh.verts.size() + (*it).contour.size() * 4);
- curmesh.vertcnt.reserve(curmesh.vertcnt.size() + (*it).contour.size());
+ curmesh.mVerts.reserve(curmesh.mVerts.size() + (*it).contour.size() * 4);
+ curmesh.mVertcnt.reserve(curmesh.mVertcnt.size() + (*it).contour.size());
bool reverseCountourFaces = false;
// compare base poly normal and contour normal to detect if we need to reverse the face winding
- if(curmesh.vertcnt.size() > 0) {
- IfcVector3 basePolyNormal = TempMesh::ComputePolygonNormal(curmesh.verts.data(), curmesh.vertcnt.front());
+ if(curmesh.mVertcnt.size() > 0) {
+ IfcVector3 basePolyNormal = TempMesh::ComputePolygonNormal(curmesh.mVerts.data(), curmesh.mVertcnt.front());
std::vector<IfcVector3> worldSpaceContourVtx(it->contour.size());
@@ -954,14 +954,14 @@ size_t CloseWindows(ContourVector& contours,
}
if (drop_this_edge) {
- curmesh.verts.pop_back();
- curmesh.verts.pop_back();
+ curmesh.mVerts.pop_back();
+ curmesh.mVerts.pop_back();
}
else {
- curmesh.verts.push_back(((cit == cbegin) != reverseCountourFaces) ? world_point : bestv);
- curmesh.verts.push_back(((cit == cbegin) != reverseCountourFaces) ? bestv : world_point);
+ curmesh.mVerts.push_back(((cit == cbegin) != reverseCountourFaces) ? world_point : bestv);
+ curmesh.mVerts.push_back(((cit == cbegin) != reverseCountourFaces) ? bestv : world_point);
- curmesh.vertcnt.push_back(4);
+ curmesh.mVertcnt.push_back(4);
++closed;
}
@@ -971,8 +971,8 @@ size_t CloseWindows(ContourVector& contours,
continue;
}
- curmesh.verts.push_back(reverseCountourFaces ? bestv : world_point);
- curmesh.verts.push_back(reverseCountourFaces ? world_point : bestv);
+ curmesh.mVerts.push_back(reverseCountourFaces ? bestv : world_point);
+ curmesh.mVerts.push_back(reverseCountourFaces ? world_point : bestv);
if (cit == cend - 1) {
drop_this_edge = *skipit;
@@ -981,13 +981,13 @@ size_t CloseWindows(ContourVector& contours,
// a border edge that needs to be dropped.
if (drop_this_edge) {
--closed;
- curmesh.vertcnt.pop_back();
- curmesh.verts.pop_back();
- curmesh.verts.pop_back();
+ curmesh.mVertcnt.pop_back();
+ curmesh.mVerts.pop_back();
+ curmesh.mVerts.pop_back();
}
else {
- curmesh.verts.push_back(reverseCountourFaces ? start0 : start1);
- curmesh.verts.push_back(reverseCountourFaces ? start1 : start0);
+ curmesh.mVerts.push_back(reverseCountourFaces ? start0 : start1);
+ curmesh.mVerts.push_back(reverseCountourFaces ? start1 : start0);
}
}
}
@@ -1029,10 +1029,10 @@ void Quadrify(const std::vector< BoundingBox >& bbs, TempMesh& curmesh)
QuadrifyPart(IfcVector2(),one_vec,field,bbs,quads);
ai_assert(!(quads.size() % 4));
- curmesh.vertcnt.resize(quads.size()/4,4);
- curmesh.verts.reserve(quads.size());
+ curmesh.mVertcnt.resize(quads.size()/4,4);
+ curmesh.mVerts.reserve(quads.size());
for(const IfcVector2& v2 : quads) {
- curmesh.verts.push_back(IfcVector3(v2.x, v2.y, static_cast<IfcFloat>(0.0)));
+ curmesh.mVerts.push_back(IfcVector3(v2.x, v2.y, static_cast<IfcFloat>(0.0)));
}
}
@@ -1053,7 +1053,7 @@ void Quadrify(const ContourVector& contours, TempMesh& curmesh)
IfcMatrix4 ProjectOntoPlane(std::vector<IfcVector2>& out_contour, const TempMesh& in_mesh,
bool &ok, IfcVector3& nor_out)
{
- const std::vector<IfcVector3>& in_verts = in_mesh.verts;
+ const std::vector<IfcVector3>& in_verts = in_mesh.mVerts;
ok = true;
IfcMatrix4 m = IfcMatrix4(DerivePlaneCoordinateSpace(in_mesh, ok, nor_out));
@@ -1200,8 +1200,8 @@ bool GenerateOpenings(std::vector<TempOpening>& openings,
}
}
}
- std::vector<IfcVector3> profile_verts = profile_data->verts;
- std::vector<unsigned int> profile_vertcnts = profile_data->vertcnt;
+ std::vector<IfcVector3> profile_verts = profile_data->mVerts;
+ std::vector<unsigned int> profile_vertcnts = profile_data->mVertcnt;
if(profile_verts.size() <= 2) {
continue;
}
@@ -1421,7 +1421,7 @@ bool GenerateOpenings(std::vector<TempOpening>& openings,
CleanupOuterContour(contour_flat, curmesh);
// Undo the projection and get back to world (or local object) space
- for(IfcVector3& v3 : curmesh.verts) {
+ for(IfcVector3& v3 : curmesh.mVerts) {
v3 = minv * v3;
}
@@ -1438,7 +1438,7 @@ bool TryAddOpenings_Poly2Tri(const std::vector<TempOpening>& openings,const std:
TempMesh& curmesh)
{
IFCImporter::LogWarn("forced to use poly2tri fallback method to generate wall openings");
- std::vector<IfcVector3>& out = curmesh.verts;
+ std::vector<IfcVector3>& out = curmesh.mVerts;
bool result = false;
@@ -1492,14 +1492,14 @@ bool TryAddOpenings_Poly2Tri(const std::vector<TempOpening>& openings,const std:
vmax -= vmin;
// If this happens then the projection must have been wrong.
- assert(vmax.Length());
+ ai_assert(vmax.Length());
ClipperLib::ExPolygons clipped;
ClipperLib::Polygons holes_union;
IfcVector3 wall_extrusion;
- bool do_connections = false, first = true;
+ bool first = true;
try {
@@ -1513,21 +1513,20 @@ bool TryAddOpenings_Poly2Tri(const std::vector<TempOpening>& openings,const std:
continue;
}
- const std::vector<IfcVector3>& va = t.profileMesh->verts;
+ const std::vector<IfcVector3>& va = t.profileMesh->mVerts;
if(va.size() <= 2) {
continue;
}
std::vector<IfcVector2> contour;
- for(const IfcVector3& xx : t.profileMesh->verts) {
+ for(const IfcVector3& xx : t.profileMesh->mVerts) {
IfcVector3 vv = m * xx, vv_extr = m * (xx + t.extrusionDir);
const bool is_extruded_side = std::fabs(vv.z - coord) > std::fabs(vv_extr.z - coord);
if (first) {
first = false;
if (dot > 0.f) {
- do_connections = true;
wall_extrusion = t.extrusionDir;
if (is_extruded_side) {
wall_extrusion = - wall_extrusion;
@@ -1604,46 +1603,8 @@ bool TryAddOpenings_Poly2Tri(const std::vector<TempOpening>& openings,const std:
std::vector<IfcVector3> old_verts;
std::vector<unsigned int> old_vertcnt;
- old_verts.swap(curmesh.verts);
- old_vertcnt.swap(curmesh.vertcnt);
-
-
- // add connection geometry to close the adjacent 'holes' for the openings
- // this should only be done from one side of the wall or the polygons
- // would be emitted twice.
- if (false && do_connections) {
-
- std::vector<IfcVector3> tmpvec;
- for(ClipperLib::Polygon& opening : holes_union) {
-
- assert(ClipperLib::Orientation(opening));
-
- tmpvec.clear();
-
- for(ClipperLib::IntPoint& point : opening) {
-
- tmpvec.push_back( minv * IfcVector3(
- vmin.x + from_int64(point.X) * vmax.x,
- vmin.y + from_int64(point.Y) * vmax.y,
- coord));
- }
-
- for(size_t i = 0, size = tmpvec.size(); i < size; ++i) {
- const size_t next = (i+1)%size;
-
- curmesh.vertcnt.push_back(4);
-
- const IfcVector3& in_world = tmpvec[i];
- const IfcVector3& next_world = tmpvec[next];
-
- // Assumptions: no 'partial' openings, wall thickness roughly the same across the wall
- curmesh.verts.push_back(in_world);
- curmesh.verts.push_back(in_world+wall_extrusion);
- curmesh.verts.push_back(next_world+wall_extrusion);
- curmesh.verts.push_back(next_world);
- }
- }
- }
+ old_verts.swap(curmesh.mVerts);
+ old_vertcnt.swap(curmesh.mVertcnt);
std::vector< std::vector<p2t::Point*> > contours;
for(ClipperLib::ExPolygon& clip : clipped) {
@@ -1705,12 +1666,12 @@ bool TryAddOpenings_Poly2Tri(const std::vector<TempOpening>& openings,const std:
static_cast<IfcFloat>( tri->GetPoint(i)->y )
);
- assert(v.x <= 1.0 && v.x >= 0.0 && v.y <= 1.0 && v.y >= 0.0);
+ ai_assert(v.x <= 1.0 && v.x >= 0.0 && v.y <= 1.0 && v.y >= 0.0);
const IfcVector3 v3 = minv * IfcVector3(vmin.x + v.x * vmax.x, vmin.y + v.y * vmax.y,coord) ;
- curmesh.verts.push_back(v3);
+ curmesh.mVerts.push_back(v3);
}
- curmesh.vertcnt.push_back(3);
+ curmesh.mVertcnt.push_back(3);
}
result = true;
@@ -1718,8 +1679,8 @@ bool TryAddOpenings_Poly2Tri(const std::vector<TempOpening>& openings,const std:
if (!result) {
// revert -- it's a shame, but better than nothing
- curmesh.verts.insert(curmesh.verts.end(),old_verts.begin(), old_verts.end());
- curmesh.vertcnt.insert(curmesh.vertcnt.end(),old_vertcnt.begin(), old_vertcnt.end());
+ curmesh.mVerts.insert(curmesh.mVerts.end(),old_verts.begin(), old_verts.end());
+ curmesh.mVertcnt.insert(curmesh.mVertcnt.end(),old_vertcnt.begin(), old_vertcnt.end());
IFCImporter::LogError("Ifc: revert, could not generate openings for this wall");
}
diff --git a/code/IFCProfile.cpp b/code/Importer/IFC/IFCProfile.cpp
index e94d98a04..2236d0d9b 100644
--- a/code/IFCProfile.cpp
+++ b/code/Importer/IFC/IFCProfile.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -43,28 +44,27 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* @brief Read profile and curves entities from IFC files
*/
-
-
#ifndef ASSIMP_BUILD_NO_IFC_IMPORTER
+
#include "IFCUtil.h"
namespace Assimp {
- namespace IFC {
+namespace IFC {
// ------------------------------------------------------------------------------------------------
-void ProcessPolyLine(const IfcPolyline& def, TempMesh& meshout, ConversionData& /*conv*/)
+void ProcessPolyLine(const Schema_2x3::IfcPolyline& def, TempMesh& meshout, ConversionData& /*conv*/)
{
// this won't produce a valid mesh, it just spits out a list of vertices
IfcVector3 t;
- for(const IfcCartesianPoint& cp : def.Points) {
+ for(const Schema_2x3::IfcCartesianPoint& cp : def.Points) {
ConvertCartesianPoint(t,cp);
- meshout.verts.push_back(t);
+ meshout.mVerts.push_back(t);
}
- meshout.vertcnt.push_back(static_cast<unsigned int>(meshout.verts.size()));
+ meshout.mVertcnt.push_back(static_cast<unsigned int>(meshout.mVerts.size()));
}
// ------------------------------------------------------------------------------------------------
-bool ProcessCurve(const IfcCurve& curve, TempMesh& meshout, ConversionData& conv)
+bool ProcessCurve(const Schema_2x3::IfcCurve& curve, TempMesh& meshout, ConversionData& conv)
{
std::unique_ptr<const Curve> cv(Curve::Convert(curve,conv));
if (!cv) {
@@ -78,10 +78,10 @@ bool ProcessCurve(const IfcCurve& curve, TempMesh& meshout, ConversionData& con
bc->SampleDiscrete(meshout);
}
catch(const CurveError& cv) {
- IFCImporter::LogError(cv.s+ " (error occurred while processing curve)");
+ IFCImporter::LogError(cv.mStr + " (error occurred while processing curve)");
return false;
}
- meshout.vertcnt.push_back(static_cast<unsigned int>(meshout.verts.size()));
+ meshout.mVertcnt.push_back(static_cast<unsigned int>(meshout.mVerts.size()));
return true;
}
@@ -90,66 +90,66 @@ bool ProcessCurve(const IfcCurve& curve, TempMesh& meshout, ConversionData& con
}
// ------------------------------------------------------------------------------------------------
-void ProcessClosedProfile(const IfcArbitraryClosedProfileDef& def, TempMesh& meshout, ConversionData& conv)
+void ProcessClosedProfile(const Schema_2x3::IfcArbitraryClosedProfileDef& def, TempMesh& meshout, ConversionData& conv)
{
ProcessCurve(def.OuterCurve,meshout,conv);
}
// ------------------------------------------------------------------------------------------------
-void ProcessOpenProfile(const IfcArbitraryOpenProfileDef& def, TempMesh& meshout, ConversionData& conv)
+void ProcessOpenProfile(const Schema_2x3::IfcArbitraryOpenProfileDef& def, TempMesh& meshout, ConversionData& conv)
{
ProcessCurve(def.Curve,meshout,conv);
}
// ------------------------------------------------------------------------------------------------
-void ProcessParametrizedProfile(const IfcParameterizedProfileDef& def, TempMesh& meshout, ConversionData& conv)
+void ProcessParametrizedProfile(const Schema_2x3::IfcParameterizedProfileDef& def, TempMesh& meshout, ConversionData& conv)
{
- if(const IfcRectangleProfileDef* const cprofile = def.ToPtr<IfcRectangleProfileDef>()) {
+ if(const Schema_2x3::IfcRectangleProfileDef* const cprofile = def.ToPtr<Schema_2x3::IfcRectangleProfileDef>()) {
const IfcFloat x = cprofile->XDim*0.5f, y = cprofile->YDim*0.5f;
- meshout.verts.reserve(meshout.verts.size()+4);
- meshout.verts.push_back( IfcVector3( x, y, 0.f ));
- meshout.verts.push_back( IfcVector3(-x, y, 0.f ));
- meshout.verts.push_back( IfcVector3(-x,-y, 0.f ));
- meshout.verts.push_back( IfcVector3( x,-y, 0.f ));
- meshout.vertcnt.push_back(4);
+ meshout.mVerts.reserve(meshout.mVerts.size()+4);
+ meshout.mVerts.push_back( IfcVector3( x, y, 0.f ));
+ meshout.mVerts.push_back( IfcVector3(-x, y, 0.f ));
+ meshout.mVerts.push_back( IfcVector3(-x,-y, 0.f ));
+ meshout.mVerts.push_back( IfcVector3( x,-y, 0.f ));
+ meshout.mVertcnt.push_back(4);
}
- else if( const IfcCircleProfileDef* const circle = def.ToPtr<IfcCircleProfileDef>()) {
- if(def.ToPtr<IfcCircleHollowProfileDef>()) {
+ else if( const Schema_2x3::IfcCircleProfileDef* const circle = def.ToPtr<Schema_2x3::IfcCircleProfileDef>()) {
+ if(def.ToPtr<Schema_2x3::IfcCircleHollowProfileDef>()) {
// TODO
}
const size_t segments = conv.settings.cylindricalTessellation;
const IfcFloat delta = AI_MATH_TWO_PI_F/segments, radius = circle->Radius;
- meshout.verts.reserve(segments);
+ meshout.mVerts.reserve(segments);
IfcFloat angle = 0.f;
for(size_t i = 0; i < segments; ++i, angle += delta) {
- meshout.verts.push_back( IfcVector3( std::cos(angle)*radius, std::sin(angle)*radius, 0.f ));
+ meshout.mVerts.push_back( IfcVector3( std::cos(angle)*radius, std::sin(angle)*radius, 0.f ));
}
- meshout.vertcnt.push_back(segments);
+ meshout.mVertcnt.push_back(static_cast<unsigned int>(segments));
}
- else if( const IfcIShapeProfileDef* const ishape = def.ToPtr<IfcIShapeProfileDef>()) {
+ else if( const Schema_2x3::IfcIShapeProfileDef* const ishape = def.ToPtr<Schema_2x3::IfcIShapeProfileDef>()) {
// construct simplified IBeam shape
const IfcFloat offset = (ishape->OverallWidth - ishape->WebThickness) / 2;
const IfcFloat inner_height = ishape->OverallDepth - ishape->FlangeThickness * 2;
- meshout.verts.reserve(12);
- meshout.verts.push_back(IfcVector3(0,0,0));
- meshout.verts.push_back(IfcVector3(0,ishape->FlangeThickness,0));
- meshout.verts.push_back(IfcVector3(offset,ishape->FlangeThickness,0));
- meshout.verts.push_back(IfcVector3(offset,ishape->FlangeThickness + inner_height,0));
- meshout.verts.push_back(IfcVector3(0,ishape->FlangeThickness + inner_height,0));
- meshout.verts.push_back(IfcVector3(0,ishape->OverallDepth,0));
- meshout.verts.push_back(IfcVector3(ishape->OverallWidth,ishape->OverallDepth,0));
- meshout.verts.push_back(IfcVector3(ishape->OverallWidth,ishape->FlangeThickness + inner_height,0));
- meshout.verts.push_back(IfcVector3(offset+ishape->WebThickness,ishape->FlangeThickness + inner_height,0));
- meshout.verts.push_back(IfcVector3(offset+ishape->WebThickness,ishape->FlangeThickness,0));
- meshout.verts.push_back(IfcVector3(ishape->OverallWidth,ishape->FlangeThickness,0));
- meshout.verts.push_back(IfcVector3(ishape->OverallWidth,0,0));
-
- meshout.vertcnt.push_back(12);
+ meshout.mVerts.reserve(12);
+ meshout.mVerts.push_back(IfcVector3(0,0,0));
+ meshout.mVerts.push_back(IfcVector3(0,ishape->FlangeThickness,0));
+ meshout.mVerts.push_back(IfcVector3(offset,ishape->FlangeThickness,0));
+ meshout.mVerts.push_back(IfcVector3(offset,ishape->FlangeThickness + inner_height,0));
+ meshout.mVerts.push_back(IfcVector3(0,ishape->FlangeThickness + inner_height,0));
+ meshout.mVerts.push_back(IfcVector3(0,ishape->OverallDepth,0));
+ meshout.mVerts.push_back(IfcVector3(ishape->OverallWidth,ishape->OverallDepth,0));
+ meshout.mVerts.push_back(IfcVector3(ishape->OverallWidth,ishape->FlangeThickness + inner_height,0));
+ meshout.mVerts.push_back(IfcVector3(offset+ishape->WebThickness,ishape->FlangeThickness + inner_height,0));
+ meshout.mVerts.push_back(IfcVector3(offset+ishape->WebThickness,ishape->FlangeThickness,0));
+ meshout.mVerts.push_back(IfcVector3(ishape->OverallWidth,ishape->FlangeThickness,0));
+ meshout.mVerts.push_back(IfcVector3(ishape->OverallWidth,0,0));
+
+ meshout.mVertcnt.push_back(12);
}
else {
IFCImporter::LogWarn("skipping unknown IfcParameterizedProfileDef entity, type is " + def.GetClassName());
@@ -162,15 +162,15 @@ void ProcessParametrizedProfile(const IfcParameterizedProfileDef& def, TempMesh&
}
// ------------------------------------------------------------------------------------------------
-bool ProcessProfile(const IfcProfileDef& prof, TempMesh& meshout, ConversionData& conv)
+bool ProcessProfile(const Schema_2x3::IfcProfileDef& prof, TempMesh& meshout, ConversionData& conv)
{
- if(const IfcArbitraryClosedProfileDef* const cprofile = prof.ToPtr<IfcArbitraryClosedProfileDef>()) {
+ if(const Schema_2x3::IfcArbitraryClosedProfileDef* const cprofile = prof.ToPtr<Schema_2x3::IfcArbitraryClosedProfileDef>()) {
ProcessClosedProfile(*cprofile,meshout,conv);
}
- else if(const IfcArbitraryOpenProfileDef* const copen = prof.ToPtr<IfcArbitraryOpenProfileDef>()) {
+ else if(const Schema_2x3::IfcArbitraryOpenProfileDef* const copen = prof.ToPtr<Schema_2x3::IfcArbitraryOpenProfileDef>()) {
ProcessOpenProfile(*copen,meshout,conv);
}
- else if(const IfcParameterizedProfileDef* const cparam = prof.ToPtr<IfcParameterizedProfileDef>()) {
+ else if(const Schema_2x3::IfcParameterizedProfileDef* const cparam = prof.ToPtr<Schema_2x3::IfcParameterizedProfileDef>()) {
ProcessParametrizedProfile(*cparam,meshout,conv);
}
else {
@@ -178,7 +178,7 @@ bool ProcessProfile(const IfcProfileDef& prof, TempMesh& meshout, ConversionData
return false;
}
meshout.RemoveAdjacentDuplicates();
- if (!meshout.vertcnt.size() || meshout.vertcnt.front() <= 1) {
+ if (!meshout.mVertcnt.size() || meshout.mVertcnt.front() <= 1) {
return false;
}
return true;
@@ -187,4 +187,4 @@ bool ProcessProfile(const IfcProfileDef& prof, TempMesh& meshout, ConversionData
} // ! IFC
} // ! Assimp
-#endif
+#endif // ASSIMP_BUILD_NO_IFC_IMPORTER
diff --git a/code/IFCReaderGen1.cpp b/code/Importer/IFC/IFCReaderGen1_2x3.cpp
index d334e8322..f4dbed1d1 100644
--- a/code/IFCReaderGen1.cpp
+++ b/code/Importer/IFC/IFCReaderGen1_2x3.cpp
@@ -43,15 +43,17 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//#include "AssimpPCH.h"
#ifndef ASSIMP_BUILD_NO_IFC_IMPORTER
-#include "IFCReaderGen.h"
+#include "IFCReaderGen_2x3.h"
namespace Assimp {
-using namespace IFC;
-namespace {
+using namespace ::Assimp::IFC;
+using namespace ::Assimp::IFC::Schema_2x3;
+namespace {
typedef EXPRESS::ConversionSchema::SchemaEntry SchemaEntry;
- const SchemaEntry schema_raw[] = {
+
+ static const SchemaEntry schema_raw_2x3[] = {
SchemaEntry("ifcstairtypeenum",NULL )
, SchemaEntry("ifcspacetypeenum",NULL )
, SchemaEntry("ifcwalltypeenum",NULL )
@@ -1037,47 +1039,44 @@ namespace {
}
// -----------------------------------------------------------------------------------------------------------
-void IFC::GetSchema(EXPRESS::ConversionSchema& out)
-{
- out = EXPRESS::ConversionSchema(schema_raw);
+void IFC::Schema_2x3::GetSchema(EXPRESS::ConversionSchema& out) {
+ out = EXPRESS::ConversionSchema(schema_raw_2x3);
}
namespace STEP {
// -----------------------------------------------------------------------------------------------------------
-template <> size_t GenericFill<NotImplemented>(const STEP::DB& db, const LIST& params, NotImplemented* in)
+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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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
std::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 ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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
std::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 ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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`")); }
@@ -1145,27 +1144,27 @@ template <> size_t GenericFill<IfcRepresentation>(const DB& db, const LIST& para
size_t base = 0;
if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to IfcRepresentation"); } do { // convert the 'ContextOfItems' argument
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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
std::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 ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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
std::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 ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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);
@@ -1231,7 +1230,7 @@ template <> size_t GenericFill<IfcObject>(const DB& db, const LIST& params, IfcO
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
std::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 ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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`")); }
@@ -1253,7 +1252,7 @@ template <> size_t GenericFill<IfcPerformanceHistory>(const DB& db, const LIST&
return base;
}
// -----------------------------------------------------------------------------------------------------------
-template <> size_t GenericFill<IfcRepresentationItem>(const DB& db, const LIST& params, IfcRepresentationItem* in)
+template <> size_t GenericFill<IfcRepresentationItem>(const DB& /*db*/, const LIST& /*params*/, IfcRepresentationItem* /*in*/)
{
size_t base = 0;
return base;
@@ -1284,21 +1283,21 @@ template <> size_t GenericFill<IfcProductRepresentation>(const DB& db, const LIS
size_t base = 0;
if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to IfcProductRepresentation"); } do { // convert the 'Name' argument
std::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 ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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
std::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 ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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);
@@ -1310,14 +1309,14 @@ template <> size_t GenericFill<IfcProduct>(const DB& db, const LIST& params, Ifc
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
std::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 ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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
std::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 ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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`")); }
@@ -1330,7 +1329,7 @@ template <> size_t GenericFill<IfcElement>(const DB& db, const LIST& params, Ifc
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
std::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 ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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`")); }
@@ -1369,13 +1368,13 @@ template <> size_t GenericFill<IfcCompositeCurve>(const DB& db, const LIST& para
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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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);
@@ -1394,27 +1393,27 @@ template <> size_t GenericFill<IfcCartesianTransformationOperator>(const DB& db,
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
std::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 ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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
std::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 ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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
std::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 ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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`")); }
@@ -1427,7 +1426,7 @@ template <> size_t GenericFill<IfcCartesianTransformationOperator3D>(const DB& d
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
std::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 ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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`")); }
@@ -1440,13 +1439,13 @@ template <> size_t GenericFill<IfcProperty>(const DB& db, const LIST& params, If
size_t base = 0;
if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to IfcProperty"); } do { // convert the 'Name' argument
std::shared_ptr<const DataType> arg = params[base++];
- if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcProperty,2>::aux_is_derived[0]=true; break; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcProperty,2>::aux_is_derived[0]=true; break; }
try { GenericConvert( in->Name, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcProperty to be a `IfcIdentifier`")); }
} while(0);
do { // convert the 'Description' argument
std::shared_ptr<const DataType> arg = params[base++];
- if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcProperty,2>::aux_is_derived[1]=true; break; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcProperty,2>::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 IfcProperty to be a `IfcText`")); }
@@ -1492,7 +1491,7 @@ template <> size_t GenericFill<IfcElementarySurface>(const DB& db, const LIST& p
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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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);
@@ -1510,19 +1509,19 @@ template <> size_t GenericFill<IfcBooleanResult>(const DB& db, const LIST& param
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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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);
@@ -1546,7 +1545,7 @@ template <> size_t GenericFill<IfcManifoldSolidBrep>(const DB& db, const LIST& p
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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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);
@@ -1715,7 +1714,7 @@ template <> size_t GenericFill<IfcPlateType>(const DB& db, const LIST& params, I
return base;
}
// -----------------------------------------------------------------------------------------------------------
-template <> size_t GenericFill<IfcObjectPlacement>(const DB& db, const LIST& params, IfcObjectPlacement* in)
+template <> size_t GenericFill<IfcObjectPlacement>(const DB& /*db*/, const LIST& /*params*/, IfcObjectPlacement* /*in*/)
{
size_t base = 0;
return base;
@@ -1779,13 +1778,13 @@ template <> size_t GenericFill<IfcProfileDef>(const DB& db, const LIST& params,
size_t base = 0;
if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to IfcProfileDef"); } do { // convert the 'ProfileType' argument
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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
std::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 ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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`")); }
@@ -1798,7 +1797,7 @@ template <> size_t GenericFill<IfcParameterizedProfileDef>(const DB& db, const L
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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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);
@@ -1905,7 +1904,7 @@ template <> size_t GenericFill<IfcCircleProfileDef>(const DB& db, const LIST& pa
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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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);
@@ -1928,7 +1927,7 @@ template <> size_t GenericFill<IfcPlacement>(const DB& db, const LIST& params, I
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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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);
@@ -1958,7 +1957,7 @@ template <> size_t GenericFill<IfcPresentationStyle>(const DB& db, const LIST& p
size_t base = 0;
if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to IfcPresentationStyle"); } do { // convert the 'Name' argument
std::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 ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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`")); }
@@ -1999,13 +1998,13 @@ template <> size_t GenericFill<IfcRectangleProfileDef>(const DB& db, const LIST&
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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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);
@@ -2118,13 +2117,13 @@ template <> size_t GenericFill<IfcSweptAreaSolid>(const DB& db, const LIST& para
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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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);
@@ -2198,13 +2197,13 @@ template <> size_t GenericFill<IfcHalfSpaceSolid>(const DB& db, const LIST& para
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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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);
@@ -2354,7 +2353,7 @@ template <> size_t GenericFill<IfcRelDefines>(const DB& db, const LIST& params,
size_t base = GenericFill(db,params,static_cast<IfcRelationship*>(in));
if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to IfcRelDefines"); } do { // convert the 'RelatedObjects' argument
std::shared_ptr<const DataType> arg = params[base++];
- if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcRelDefines,1>::aux_is_derived[0]=true; break; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcRelDefines,1>::aux_is_derived[0]=true; break; }
try { GenericConvert( in->RelatedObjects, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcRelDefines to be a `SET [1:?] OF IfcObject`")); }
} while(0);
@@ -2366,7 +2365,7 @@ template <> size_t GenericFill<IfcRelDefinesByProperties>(const DB& db, const LI
size_t base = GenericFill(db,params,static_cast<IfcRelDefines*>(in));
if (params.GetSize() < 6) { throw STEP::TypeError("expected 6 arguments to IfcRelDefinesByProperties"); } do { // convert the 'RelatingPropertyDefinition' argument
std::shared_ptr<const DataType> arg = params[base++];
- if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcRelDefinesByProperties,1>::aux_is_derived[0]=true; break; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcRelDefinesByProperties,1>::aux_is_derived[0]=true; break; }
try { GenericConvert( in->RelatingPropertyDefinition, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to IfcRelDefinesByProperties to be a `IfcPropertySetDefinition`")); }
} while(0);
@@ -2399,7 +2398,7 @@ template <> size_t GenericFill<IfcArbitraryOpenProfileDef>(const DB& db, const L
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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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);
@@ -2565,13 +2564,13 @@ template <> size_t GenericFill<IfcRelDecomposes>(const DB& db, const LIST& param
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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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);
@@ -2652,13 +2651,14 @@ template <> size_t GenericFill<IfcNamedUnit>(const DB& db, const LIST& params, I
size_t base = 0;
if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to IfcNamedUnit"); } do { // convert the 'Dimensions' argument
std::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; }
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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);
@@ -2712,14 +2712,14 @@ template <> size_t GenericFill<IfcSpatialStructureElement>(const DB& db, const L
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
std::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 ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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);
@@ -2755,7 +2755,7 @@ template <> size_t GenericFill<IfcConnectedFaceSet>(const DB& db, const LIST& pa
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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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);
@@ -2781,7 +2781,7 @@ template <> size_t GenericFill<IfcConic>(const DB& db, const LIST& params, IfcCo
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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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);
@@ -2828,31 +2828,31 @@ template <> size_t GenericFill<IfcIShapeProfileDef>(const DB& db, const LIST& pa
size_t base = GenericFill(db,params,static_cast<IfcParameterizedProfileDef*>(in));
if (params.GetSize() < 8) { throw STEP::TypeError("expected 8 arguments to IfcIShapeProfileDef"); } do { // convert the 'OverallWidth' argument
std::shared_ptr<const DataType> arg = params[base++];
- if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcIShapeProfileDef,5>::aux_is_derived[0]=true; break; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcIShapeProfileDef,5>::aux_is_derived[0]=true; break; }
try { GenericConvert( in->OverallWidth, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcIShapeProfileDef to be a `IfcPositiveLengthMeasure`")); }
} while(0);
do { // convert the 'OverallDepth' argument
std::shared_ptr<const DataType> arg = params[base++];
- if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcIShapeProfileDef,5>::aux_is_derived[1]=true; break; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcIShapeProfileDef,5>::aux_is_derived[1]=true; break; }
try { GenericConvert( in->OverallDepth, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcIShapeProfileDef to be a `IfcPositiveLengthMeasure`")); }
} while(0);
do { // convert the 'WebThickness' argument
std::shared_ptr<const DataType> arg = params[base++];
- if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcIShapeProfileDef,5>::aux_is_derived[2]=true; break; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcIShapeProfileDef,5>::aux_is_derived[2]=true; break; }
try { GenericConvert( in->WebThickness, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to IfcIShapeProfileDef to be a `IfcPositiveLengthMeasure`")); }
} while(0);
do { // convert the 'FlangeThickness' argument
std::shared_ptr<const DataType> arg = params[base++];
- if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcIShapeProfileDef,5>::aux_is_derived[3]=true; break; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcIShapeProfileDef,5>::aux_is_derived[3]=true; break; }
try { GenericConvert( in->FlangeThickness, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to IfcIShapeProfileDef to be a `IfcPositiveLengthMeasure`")); }
} while(0);
do { // convert the 'FilletRadius' argument
std::shared_ptr<const DataType> arg = params[base++];
- if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcIShapeProfileDef,5>::aux_is_derived[4]=true; break; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcIShapeProfileDef,5>::aux_is_derived[4]=true; break; }
if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->FilletRadius, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to IfcIShapeProfileDef to be a `IfcPositiveLengthMeasure`")); }
@@ -2977,20 +2977,20 @@ template <> size_t GenericFill<IfcStyledItem>(const DB& db, const LIST& params,
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
std::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 ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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
std::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 ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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`")); }
@@ -3017,7 +3017,7 @@ template <> size_t GenericFill<IfcArbitraryClosedProfileDef>(const DB& db, const
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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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);
@@ -3105,7 +3105,7 @@ template <> size_t GenericFill<IfcSurfaceStyleShading>(const DB& db, const LIST&
size_t base = 0;
if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to IfcSurfaceStyleShading"); } do { // convert the 'SurfaceColour' argument
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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);
diff --git a/code/IFCReaderGen2.cpp b/code/Importer/IFC/IFCReaderGen2_2x3.cpp
index 52979260c..7dabe278e 100644
--- a/code/IFCReaderGen2.cpp
+++ b/code/Importer/IFC/IFCReaderGen2_2x3.cpp
@@ -41,10 +41,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//#include "AssimpPCH.h"
#ifndef ASSIMP_BUILD_NO_IFC_IMPORTER
-#include "IFCReaderGen.h"
+#include "IFCReaderGen_2x3.h"
namespace Assimp {
using namespace IFC;
+using namespace ::Assimp::IFC::Schema_2x3;
namespace STEP {
@@ -111,7 +112,7 @@ template <> size_t GenericFill<IfcFace>(const DB& db, const LIST& params, IfcFac
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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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);
@@ -165,7 +166,7 @@ template <> size_t GenericFill<IfcColourSpecification>(const DB& db, const LIST&
size_t base = 0;
if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to IfcColourSpecification"); } do { // convert the 'Name' argument
std::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 ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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`")); }
@@ -405,31 +406,31 @@ template <> size_t GenericFill<IfcBSplineCurve>(const DB& db, const LIST& params
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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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);
@@ -708,14 +709,14 @@ template <> size_t GenericFill<IfcRepresentationContext>(const DB& db, const LIS
size_t base = 0;
if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to IfcRepresentationContext"); } do { // convert the 'ContextIdentifier' argument
std::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 ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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
std::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 ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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`")); }
@@ -728,26 +729,26 @@ template <> size_t GenericFill<IfcGeometricRepresentationContext>(const DB& db,
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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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
std::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 ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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
std::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 ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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`")); }
@@ -1165,13 +1166,13 @@ template <> size_t GenericFill<IfcFaceBound>(const DB& db, const LIST& params, I
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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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
std::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; }
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::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);
diff --git a/code/IFCReaderGen.h b/code/Importer/IFC/IFCReaderGen_2x3.h
index 85c62faac..0362d90b2 100644
--- a/code/IFCReaderGen.h
+++ b/code/Importer/IFC/IFCReaderGen_2x3.h
@@ -43,10 +43,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef INCLUDED_IFC_READER_GEN_H
#define INCLUDED_IFC_READER_GEN_H
-#include "STEPFile.h"
+#include "code/STEPFile.h"
namespace Assimp {
namespace IFC {
+ namespace Schema_2x3 {
+
using namespace STEP;
using namespace STEP::EXPRESS;
@@ -3912,15 +3914,16 @@ namespace IFC {
};
void GetSchema(EXPRESS::ConversionSchema& out);
-
+ } //! Schema_2x3
} //! 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)
+#define DECL_CONV_STUB(type) template <> size_t GenericFill<IFC::Schema_2x3::type>(const STEP::DB& db, const EXPRESS::LIST& params, IFC::Schema_2x3::type* in)
DECL_CONV_STUB(IfcRepresentationItem);
DECL_CONV_STUB(IfcGeometricRepresentationItem);
diff --git a/code/Importer/IFC/IFCReaderGen_4.cpp b/code/Importer/IFC/IFCReaderGen_4.cpp
new file mode 100644
index 000000000..fdefedb18
--- /dev/null
+++ b/code/Importer/IFC/IFCReaderGen_4.cpp
@@ -0,0 +1,6207 @@
+/*
+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 ASSIMP_BUILD_NO_IFC_IMPORTER
+
+#include "AssimpPCH.h"
+#include "IFCReaderGen_4.h"
+
+namespace Assimp {
+using namespace IFC;
+using namespace ::Assimp::IFC::Schema_4;
+
+namespace {
+
+ typedef EXPRESS::ConversionSchema::SchemaEntry SchemaEntry;
+ const SchemaEntry schema_raw[] = {
+ SchemaEntry("ifcstrippedoptional",NULL )
+, SchemaEntry("ifcabsorbeddosemeasure",NULL )
+, SchemaEntry("ifcaccelerationmeasure",NULL )
+, SchemaEntry("ifcamountofsubstancemeasure",NULL )
+, SchemaEntry("ifcangularvelocitymeasure",NULL )
+, SchemaEntry("ifcarcindex",NULL )
+, SchemaEntry("ifcareadensitymeasure",NULL )
+, SchemaEntry("ifcareameasure",NULL )
+, SchemaEntry("ifcbinary",NULL )
+, SchemaEntry("ifcboolean",NULL )
+, SchemaEntry("ifcboxalignment",NULL )
+, SchemaEntry("ifccardinalpointreference",NULL )
+, SchemaEntry("ifccomplexnumber",NULL )
+, SchemaEntry("ifccompoundplaneanglemeasure",NULL )
+, SchemaEntry("ifccontextdependentmeasure",NULL )
+, SchemaEntry("ifccountmeasure",NULL )
+, SchemaEntry("ifccurvaturemeasure",NULL )
+, SchemaEntry("ifcdate",NULL )
+, SchemaEntry("ifcdatetime",NULL )
+, SchemaEntry("ifcdayinmonthnumber",NULL )
+, SchemaEntry("ifcdayinweeknumber",NULL )
+, SchemaEntry("ifcdescriptivemeasure",NULL )
+, SchemaEntry("ifcdimensioncount",NULL )
+, SchemaEntry("ifcdoseequivalentmeasure",NULL )
+, SchemaEntry("ifcduration",NULL )
+, SchemaEntry("ifcdynamicviscositymeasure",NULL )
+, SchemaEntry("ifcelectriccapacitancemeasure",NULL )
+, SchemaEntry("ifcelectricchargemeasure",NULL )
+, SchemaEntry("ifcelectricconductancemeasure",NULL )
+, SchemaEntry("ifcelectriccurrentmeasure",NULL )
+, SchemaEntry("ifcelectricresistancemeasure",NULL )
+, SchemaEntry("ifcelectricvoltagemeasure",NULL )
+, SchemaEntry("ifcenergymeasure",NULL )
+, SchemaEntry("ifcfontstyle",NULL )
+, SchemaEntry("ifcfontvariant",NULL )
+, SchemaEntry("ifcfontweight",NULL )
+, SchemaEntry("ifcforcemeasure",NULL )
+, SchemaEntry("ifcfrequencymeasure",NULL )
+, SchemaEntry("ifcgloballyuniqueid",NULL )
+, SchemaEntry("ifcheatfluxdensitymeasure",NULL )
+, SchemaEntry("ifcheatingvaluemeasure",NULL )
+, SchemaEntry("ifcidentifier",NULL )
+, SchemaEntry("ifcilluminancemeasure",NULL )
+, SchemaEntry("ifcinductancemeasure",NULL )
+, SchemaEntry("ifcinteger",NULL )
+, SchemaEntry("ifcintegercountratemeasure",NULL )
+, SchemaEntry("ifcionconcentrationmeasure",NULL )
+, SchemaEntry("ifcisothermalmoisturecapacitymeasure",NULL )
+, SchemaEntry("ifckinematicviscositymeasure",NULL )
+, SchemaEntry("ifclabel",NULL )
+, SchemaEntry("ifclanguageid",NULL )
+, SchemaEntry("ifclengthmeasure",NULL )
+, SchemaEntry("ifclineindex",NULL )
+, SchemaEntry("ifclinearforcemeasure",NULL )
+, SchemaEntry("ifclinearmomentmeasure",NULL )
+, SchemaEntry("ifclinearstiffnessmeasure",NULL )
+, SchemaEntry("ifclinearvelocitymeasure",NULL )
+, SchemaEntry("ifclogical",NULL )
+, SchemaEntry("ifcluminousfluxmeasure",NULL )
+, SchemaEntry("ifcluminousintensitydistributionmeasure",NULL )
+, SchemaEntry("ifcluminousintensitymeasure",NULL )
+, SchemaEntry("ifcmagneticfluxdensitymeasure",NULL )
+, SchemaEntry("ifcmagneticfluxmeasure",NULL )
+, SchemaEntry("ifcmassdensitymeasure",NULL )
+, SchemaEntry("ifcmassflowratemeasure",NULL )
+, SchemaEntry("ifcmassmeasure",NULL )
+, SchemaEntry("ifcmassperlengthmeasure",NULL )
+, SchemaEntry("ifcmodulusofelasticitymeasure",NULL )
+, SchemaEntry("ifcmodulusoflinearsubgradereactionmeasure",NULL )
+, SchemaEntry("ifcmodulusofrotationalsubgradereactionmeasure",NULL )
+, SchemaEntry("ifcmodulusofsubgradereactionmeasure",NULL )
+, SchemaEntry("ifcmoisturediffusivitymeasure",NULL )
+, SchemaEntry("ifcmolecularweightmeasure",NULL )
+, SchemaEntry("ifcmomentofinertiameasure",NULL )
+, SchemaEntry("ifcmonetarymeasure",NULL )
+, SchemaEntry("ifcmonthinyearnumber",NULL )
+, SchemaEntry("ifcnonnegativelengthmeasure",NULL )
+, SchemaEntry("ifcnormalisedratiomeasure",NULL )
+, SchemaEntry("ifcnumericmeasure",NULL )
+, SchemaEntry("ifcphmeasure",NULL )
+, SchemaEntry("ifcparametervalue",NULL )
+, SchemaEntry("ifcplanarforcemeasure",NULL )
+, SchemaEntry("ifcplaneanglemeasure",NULL )
+, SchemaEntry("ifcpositiveinteger",NULL )
+, SchemaEntry("ifcpositivelengthmeasure",NULL )
+, SchemaEntry("ifcpositiveplaneanglemeasure",NULL )
+, SchemaEntry("ifcpositiveratiomeasure",NULL )
+, SchemaEntry("ifcpowermeasure",NULL )
+, SchemaEntry("ifcpresentabletext",NULL )
+, SchemaEntry("ifcpressuremeasure",NULL )
+, SchemaEntry("ifcpropertysetdefinitionset",NULL )
+, SchemaEntry("ifcradioactivitymeasure",NULL )
+, SchemaEntry("ifcratiomeasure",NULL )
+, SchemaEntry("ifcreal",NULL )
+, SchemaEntry("ifcrotationalfrequencymeasure",NULL )
+, SchemaEntry("ifcrotationalmassmeasure",NULL )
+, SchemaEntry("ifcrotationalstiffnessmeasure",NULL )
+, SchemaEntry("ifcsectionmodulusmeasure",NULL )
+, SchemaEntry("ifcsectionalareaintegralmeasure",NULL )
+, SchemaEntry("ifcshearmodulusmeasure",NULL )
+, SchemaEntry("ifcsolidanglemeasure",NULL )
+, SchemaEntry("ifcsoundpowerlevelmeasure",NULL )
+, SchemaEntry("ifcsoundpowermeasure",NULL )
+, SchemaEntry("ifcsoundpressurelevelmeasure",NULL )
+, SchemaEntry("ifcsoundpressuremeasure",NULL )
+, SchemaEntry("ifcspecificheatcapacitymeasure",NULL )
+, SchemaEntry("ifcspecularexponent",NULL )
+, SchemaEntry("ifcspecularroughness",NULL )
+, SchemaEntry("ifctemperaturegradientmeasure",NULL )
+, SchemaEntry("ifctemperaturerateofchangemeasure",NULL )
+, SchemaEntry("ifctext",NULL )
+, SchemaEntry("ifctextalignment",NULL )
+, SchemaEntry("ifctextdecoration",NULL )
+, SchemaEntry("ifctextfontname",NULL )
+, SchemaEntry("ifctexttransformation",NULL )
+, SchemaEntry("ifcthermaladmittancemeasure",NULL )
+, SchemaEntry("ifcthermalconductivitymeasure",NULL )
+, SchemaEntry("ifcthermalexpansioncoefficientmeasure",NULL )
+, SchemaEntry("ifcthermalresistancemeasure",NULL )
+, SchemaEntry("ifcthermaltransmittancemeasure",NULL )
+, SchemaEntry("ifcthermodynamictemperaturemeasure",NULL )
+, SchemaEntry("ifctime",NULL )
+, SchemaEntry("ifctimemeasure",NULL )
+, SchemaEntry("ifctimestamp",NULL )
+, SchemaEntry("ifctorquemeasure",NULL )
+, SchemaEntry("ifcurireference",NULL )
+, SchemaEntry("ifcvaporpermeabilitymeasure",NULL )
+, SchemaEntry("ifcvolumemeasure",NULL )
+, SchemaEntry("ifcvolumetricflowratemeasure",NULL )
+, SchemaEntry("ifcwarpingconstantmeasure",NULL )
+, SchemaEntry("ifcwarpingmomentmeasure",NULL )
+, SchemaEntry("ifcactionrequesttypeenum",NULL )
+, SchemaEntry("ifcactionsourcetypeenum",NULL )
+, SchemaEntry("ifcactiontypeenum",NULL )
+, SchemaEntry("ifcactuatortypeenum",NULL )
+, SchemaEntry("ifcaddresstypeenum",NULL )
+, SchemaEntry("ifcairterminalboxtypeenum",NULL )
+, SchemaEntry("ifcairterminaltypeenum",NULL )
+, SchemaEntry("ifcairtoairheatrecoverytypeenum",NULL )
+, SchemaEntry("ifcalarmtypeenum",NULL )
+, SchemaEntry("ifcanalysismodeltypeenum",NULL )
+, SchemaEntry("ifcanalysistheorytypeenum",NULL )
+, SchemaEntry("ifcarithmeticoperatorenum",NULL )
+, SchemaEntry("ifcassemblyplaceenum",NULL )
+, SchemaEntry("ifcaudiovisualappliancetypeenum",NULL )
+, SchemaEntry("ifcbsplinecurveform",NULL )
+, SchemaEntry("ifcbsplinesurfaceform",NULL )
+, SchemaEntry("ifcbeamtypeenum",NULL )
+, SchemaEntry("ifcbenchmarkenum",NULL )
+, SchemaEntry("ifcboilertypeenum",NULL )
+, SchemaEntry("ifcbooleanoperator",NULL )
+, SchemaEntry("ifcbuildingelementparttypeenum",NULL )
+, SchemaEntry("ifcbuildingelementproxytypeenum",NULL )
+, SchemaEntry("ifcbuildingsystemtypeenum",NULL )
+, SchemaEntry("ifcburnertypeenum",NULL )
+, SchemaEntry("ifccablecarrierfittingtypeenum",NULL )
+, SchemaEntry("ifccablecarriersegmenttypeenum",NULL )
+, SchemaEntry("ifccablefittingtypeenum",NULL )
+, SchemaEntry("ifccablesegmenttypeenum",NULL )
+, SchemaEntry("ifcchangeactionenum",NULL )
+, SchemaEntry("ifcchillertypeenum",NULL )
+, SchemaEntry("ifcchimneytypeenum",NULL )
+, SchemaEntry("ifccoiltypeenum",NULL )
+, SchemaEntry("ifccolumntypeenum",NULL )
+, SchemaEntry("ifccommunicationsappliancetypeenum",NULL )
+, SchemaEntry("ifccomplexpropertytemplatetypeenum",NULL )
+, SchemaEntry("ifccompressortypeenum",NULL )
+, SchemaEntry("ifccondensertypeenum",NULL )
+, SchemaEntry("ifcconnectiontypeenum",NULL )
+, SchemaEntry("ifcconstraintenum",NULL )
+, SchemaEntry("ifcconstructionequipmentresourcetypeenum",NULL )
+, SchemaEntry("ifcconstructionmaterialresourcetypeenum",NULL )
+, SchemaEntry("ifcconstructionproductresourcetypeenum",NULL )
+, SchemaEntry("ifccontrollertypeenum",NULL )
+, SchemaEntry("ifccooledbeamtypeenum",NULL )
+, SchemaEntry("ifccoolingtowertypeenum",NULL )
+, SchemaEntry("ifccostitemtypeenum",NULL )
+, SchemaEntry("ifccostscheduletypeenum",NULL )
+, SchemaEntry("ifccoveringtypeenum",NULL )
+, SchemaEntry("ifccrewresourcetypeenum",NULL )
+, SchemaEntry("ifccurtainwalltypeenum",NULL )
+, SchemaEntry("ifccurveinterpolationenum",NULL )
+, SchemaEntry("ifcdampertypeenum",NULL )
+, SchemaEntry("ifcdataoriginenum",NULL )
+, SchemaEntry("ifcderivedunitenum",NULL )
+, SchemaEntry("ifcdirectionsenseenum",NULL )
+, SchemaEntry("ifcdiscreteaccessorytypeenum",NULL )
+, SchemaEntry("ifcdistributionchamberelementtypeenum",NULL )
+, SchemaEntry("ifcdistributionporttypeenum",NULL )
+, SchemaEntry("ifcdistributionsystemenum",NULL )
+, SchemaEntry("ifcdocumentconfidentialityenum",NULL )
+, SchemaEntry("ifcdocumentstatusenum",NULL )
+, SchemaEntry("ifcdoorpaneloperationenum",NULL )
+, SchemaEntry("ifcdoorpanelpositionenum",NULL )
+, SchemaEntry("ifcdoorstyleconstructionenum",NULL )
+, SchemaEntry("ifcdoorstyleoperationenum",NULL )
+, SchemaEntry("ifcdoortypeenum",NULL )
+, SchemaEntry("ifcdoortypeoperationenum",NULL )
+, SchemaEntry("ifcductfittingtypeenum",NULL )
+, SchemaEntry("ifcductsegmenttypeenum",NULL )
+, SchemaEntry("ifcductsilencertypeenum",NULL )
+, SchemaEntry("ifcelectricappliancetypeenum",NULL )
+, SchemaEntry("ifcelectricdistributionboardtypeenum",NULL )
+, SchemaEntry("ifcelectricflowstoragedevicetypeenum",NULL )
+, SchemaEntry("ifcelectricgeneratortypeenum",NULL )
+, SchemaEntry("ifcelectricmotortypeenum",NULL )
+, SchemaEntry("ifcelectrictimecontroltypeenum",NULL )
+, SchemaEntry("ifcelementassemblytypeenum",NULL )
+, SchemaEntry("ifcelementcompositionenum",NULL )
+, SchemaEntry("ifcenginetypeenum",NULL )
+, SchemaEntry("ifcevaporativecoolertypeenum",NULL )
+, SchemaEntry("ifcevaporatortypeenum",NULL )
+, SchemaEntry("ifceventtriggertypeenum",NULL )
+, SchemaEntry("ifceventtypeenum",NULL )
+, SchemaEntry("ifcexternalspatialelementtypeenum",NULL )
+, SchemaEntry("ifcfantypeenum",NULL )
+, SchemaEntry("ifcfastenertypeenum",NULL )
+, SchemaEntry("ifcfiltertypeenum",NULL )
+, SchemaEntry("ifcfiresuppressionterminaltypeenum",NULL )
+, SchemaEntry("ifcflowdirectionenum",NULL )
+, SchemaEntry("ifcflowinstrumenttypeenum",NULL )
+, SchemaEntry("ifcflowmetertypeenum",NULL )
+, SchemaEntry("ifcfootingtypeenum",NULL )
+, SchemaEntry("ifcfurnituretypeenum",NULL )
+, SchemaEntry("ifcgeographicelementtypeenum",NULL )
+, SchemaEntry("ifcgeometricprojectionenum",NULL )
+, SchemaEntry("ifcglobalorlocalenum",NULL )
+, SchemaEntry("ifcgridtypeenum",NULL )
+, SchemaEntry("ifcheatexchangertypeenum",NULL )
+, SchemaEntry("ifchumidifiertypeenum",NULL )
+, SchemaEntry("ifcinterceptortypeenum",NULL )
+, SchemaEntry("ifcinternalorexternalenum",NULL )
+, SchemaEntry("ifcinventorytypeenum",NULL )
+, SchemaEntry("ifcjunctionboxtypeenum",NULL )
+, SchemaEntry("ifcknottype",NULL )
+, SchemaEntry("ifclaborresourcetypeenum",NULL )
+, SchemaEntry("ifclamptypeenum",NULL )
+, SchemaEntry("ifclayersetdirectionenum",NULL )
+, SchemaEntry("ifclightdistributioncurveenum",NULL )
+, SchemaEntry("ifclightemissionsourceenum",NULL )
+, SchemaEntry("ifclightfixturetypeenum",NULL )
+, SchemaEntry("ifcloadgrouptypeenum",NULL )
+, SchemaEntry("ifclogicaloperatorenum",NULL )
+, SchemaEntry("ifcmechanicalfastenertypeenum",NULL )
+, SchemaEntry("ifcmedicaldevicetypeenum",NULL )
+, SchemaEntry("ifcmembertypeenum",NULL )
+, SchemaEntry("ifcmotorconnectiontypeenum",NULL )
+, SchemaEntry("ifcnullstyle",NULL )
+, SchemaEntry("ifcobjecttypeenum",NULL )
+, SchemaEntry("ifcobjectiveenum",NULL )
+, SchemaEntry("ifcoccupanttypeenum",NULL )
+, SchemaEntry("ifcopeningelementtypeenum",NULL )
+, SchemaEntry("ifcoutlettypeenum",NULL )
+, SchemaEntry("ifcperformancehistorytypeenum",NULL )
+, SchemaEntry("ifcpermeablecoveringoperationenum",NULL )
+, SchemaEntry("ifcpermittypeenum",NULL )
+, SchemaEntry("ifcphysicalorvirtualenum",NULL )
+, SchemaEntry("ifcpileconstructionenum",NULL )
+, SchemaEntry("ifcpiletypeenum",NULL )
+, SchemaEntry("ifcpipefittingtypeenum",NULL )
+, SchemaEntry("ifcpipesegmenttypeenum",NULL )
+, SchemaEntry("ifcplatetypeenum",NULL )
+, SchemaEntry("ifcpreferredsurfacecurverepresentation",NULL )
+, SchemaEntry("ifcproceduretypeenum",NULL )
+, SchemaEntry("ifcprofiletypeenum",NULL )
+, SchemaEntry("ifcprojectordertypeenum",NULL )
+, SchemaEntry("ifcprojectedortruelengthenum",NULL )
+, SchemaEntry("ifcprojectionelementtypeenum",NULL )
+, SchemaEntry("ifcpropertysettemplatetypeenum",NULL )
+, SchemaEntry("ifcprotectivedevicetrippingunittypeenum",NULL )
+, SchemaEntry("ifcprotectivedevicetypeenum",NULL )
+, SchemaEntry("ifcpumptypeenum",NULL )
+, SchemaEntry("ifcrailingtypeenum",NULL )
+, SchemaEntry("ifcrampflighttypeenum",NULL )
+, SchemaEntry("ifcramptypeenum",NULL )
+, SchemaEntry("ifcrecurrencetypeenum",NULL )
+, SchemaEntry("ifcreflectancemethodenum",NULL )
+, SchemaEntry("ifcreinforcingbarroleenum",NULL )
+, SchemaEntry("ifcreinforcingbarsurfaceenum",NULL )
+, SchemaEntry("ifcreinforcingbartypeenum",NULL )
+, SchemaEntry("ifcreinforcingmeshtypeenum",NULL )
+, SchemaEntry("ifcroleenum",NULL )
+, SchemaEntry("ifcrooftypeenum",NULL )
+, SchemaEntry("ifcsiprefix",NULL )
+, SchemaEntry("ifcsiunitname",NULL )
+, SchemaEntry("ifcsanitaryterminaltypeenum",NULL )
+, SchemaEntry("ifcsectiontypeenum",NULL )
+, SchemaEntry("ifcsensortypeenum",NULL )
+, SchemaEntry("ifcsequenceenum",NULL )
+, SchemaEntry("ifcshadingdevicetypeenum",NULL )
+, SchemaEntry("ifcsimplepropertytemplatetypeenum",NULL )
+, SchemaEntry("ifcslabtypeenum",NULL )
+, SchemaEntry("ifcsolardevicetypeenum",NULL )
+, SchemaEntry("ifcspaceheatertypeenum",NULL )
+, SchemaEntry("ifcspacetypeenum",NULL )
+, SchemaEntry("ifcspatialzonetypeenum",NULL )
+, SchemaEntry("ifcstackterminaltypeenum",NULL )
+, SchemaEntry("ifcstairflighttypeenum",NULL )
+, SchemaEntry("ifcstairtypeenum",NULL )
+, SchemaEntry("ifcstateenum",NULL )
+, SchemaEntry("ifcstructuralcurveactivitytypeenum",NULL )
+, SchemaEntry("ifcstructuralcurvemembertypeenum",NULL )
+, SchemaEntry("ifcstructuralsurfaceactivitytypeenum",NULL )
+, SchemaEntry("ifcstructuralsurfacemembertypeenum",NULL )
+, SchemaEntry("ifcsubcontractresourcetypeenum",NULL )
+, SchemaEntry("ifcsurfacefeaturetypeenum",NULL )
+, SchemaEntry("ifcsurfaceside",NULL )
+, SchemaEntry("ifcswitchingdevicetypeenum",NULL )
+, SchemaEntry("ifcsystemfurnitureelementtypeenum",NULL )
+, SchemaEntry("ifctanktypeenum",NULL )
+, SchemaEntry("ifctaskdurationenum",NULL )
+, SchemaEntry("ifctasktypeenum",NULL )
+, SchemaEntry("ifctendonanchortypeenum",NULL )
+, SchemaEntry("ifctendontypeenum",NULL )
+, SchemaEntry("ifctextpath",NULL )
+, SchemaEntry("ifctimeseriesdatatypeenum",NULL )
+, SchemaEntry("ifctransformertypeenum",NULL )
+, SchemaEntry("ifctransitioncode",NULL )
+, SchemaEntry("ifctransportelementtypeenum",NULL )
+, SchemaEntry("ifctrimmingpreference",NULL )
+, SchemaEntry("ifctubebundletypeenum",NULL )
+, SchemaEntry("ifcunitenum",NULL )
+, SchemaEntry("ifcunitarycontrolelementtypeenum",NULL )
+, SchemaEntry("ifcunitaryequipmenttypeenum",NULL )
+, SchemaEntry("ifcvalvetypeenum",NULL )
+, SchemaEntry("ifcvibrationisolatortypeenum",NULL )
+, SchemaEntry("ifcvoidingfeaturetypeenum",NULL )
+, SchemaEntry("ifcwalltypeenum",NULL )
+, SchemaEntry("ifcwasteterminaltypeenum",NULL )
+, SchemaEntry("ifcwindowpaneloperationenum",NULL )
+, SchemaEntry("ifcwindowpanelpositionenum",NULL )
+, SchemaEntry("ifcwindowstyleconstructionenum",NULL )
+, SchemaEntry("ifcwindowstyleoperationenum",NULL )
+, SchemaEntry("ifcwindowtypeenum",NULL )
+, SchemaEntry("ifcwindowtypepartitioningenum",NULL )
+, SchemaEntry("ifcworkcalendartypeenum",NULL )
+, SchemaEntry("ifcworkplantypeenum",NULL )
+, SchemaEntry("ifcworkscheduletypeenum",NULL )
+, SchemaEntry("ifcactorselect",NULL )
+, SchemaEntry("ifcappliedvalueselect",NULL )
+, SchemaEntry("ifcaxis2placement",NULL )
+, SchemaEntry("ifcbendingparameterselect",NULL )
+, SchemaEntry("ifcbooleanoperand",NULL )
+, SchemaEntry("ifcclassificationreferenceselect",NULL )
+, SchemaEntry("ifcclassificationselect",NULL )
+, SchemaEntry("ifccolour",NULL )
+, SchemaEntry("ifccolourorfactor",NULL )
+, SchemaEntry("ifccoordinatereferencesystemselect",NULL )
+, SchemaEntry("ifccsgselect",NULL )
+, SchemaEntry("ifccurvefontorscaledcurvefontselect",NULL )
+, SchemaEntry("ifccurveonsurface",NULL )
+, SchemaEntry("ifccurveoredgecurve",NULL )
+, SchemaEntry("ifccurvestylefontselect",NULL )
+, SchemaEntry("ifcdefinitionselect",NULL )
+, SchemaEntry("ifcderivedmeasurevalue",NULL )
+, SchemaEntry("ifcdocumentselect",NULL )
+, SchemaEntry("ifcfillstyleselect",NULL )
+, SchemaEntry("ifcgeometricsetselect",NULL )
+, SchemaEntry("ifcgridplacementdirectionselect",NULL )
+, SchemaEntry("ifchatchlinedistanceselect",NULL )
+, SchemaEntry("ifclayereditem",NULL )
+, SchemaEntry("ifclibraryselect",NULL )
+, SchemaEntry("ifclightdistributiondatasourceselect",NULL )
+, SchemaEntry("ifcmaterialselect",NULL )
+, SchemaEntry("ifcmeasurevalue",NULL )
+, SchemaEntry("ifcmetricvalueselect",NULL )
+, SchemaEntry("ifcmodulusofrotationalsubgradereactionselect",NULL )
+, SchemaEntry("ifcmodulusofsubgradereactionselect",NULL )
+, SchemaEntry("ifcmodulusoftranslationalsubgradereactionselect",NULL )
+, SchemaEntry("ifcobjectreferenceselect",NULL )
+, SchemaEntry("ifcpointorvertexpoint",NULL )
+, SchemaEntry("ifcpresentationstyleselect",NULL )
+, SchemaEntry("ifcprocessselect",NULL )
+, SchemaEntry("ifcproductrepresentationselect",NULL )
+, SchemaEntry("ifcproductselect",NULL )
+, SchemaEntry("ifcpropertysetdefinitionselect",NULL )
+, SchemaEntry("ifcresourceobjectselect",NULL )
+, SchemaEntry("ifcresourceselect",NULL )
+, SchemaEntry("ifcrotationalstiffnessselect",NULL )
+, SchemaEntry("ifcsegmentindexselect",NULL )
+, SchemaEntry("ifcshell",NULL )
+, SchemaEntry("ifcsimplevalue",NULL )
+, SchemaEntry("ifcsizeselect",NULL )
+, SchemaEntry("ifcsolidorshell",NULL )
+, SchemaEntry("ifcspaceboundaryselect",NULL )
+, SchemaEntry("ifcspecularhighlightselect",NULL )
+, SchemaEntry("ifcstructuralactivityassignmentselect",NULL )
+, SchemaEntry("ifcstyleassignmentselect",NULL )
+, SchemaEntry("ifcsurfaceorfacesurface",NULL )
+, SchemaEntry("ifcsurfacestyleelementselect",NULL )
+, SchemaEntry("ifctextfontselect",NULL )
+, SchemaEntry("ifctimeorratioselect",NULL )
+, SchemaEntry("ifctranslationalstiffnessselect",NULL )
+, SchemaEntry("ifctrimmingselect",NULL )
+, SchemaEntry("ifcunit",NULL )
+, SchemaEntry("ifcvalue",NULL )
+, SchemaEntry("ifcvectorordirection",NULL )
+, SchemaEntry("ifcwarpingstiffnessselect",NULL )
+, SchemaEntry("ifcroot",&STEP::ObjectHelper<IfcRoot,4>::Construct )
+, SchemaEntry("ifcobjectdefinition",&STEP::ObjectHelper<IfcObjectDefinition,0>::Construct )
+, SchemaEntry("ifcobject",&STEP::ObjectHelper<IfcObject,1>::Construct )
+, SchemaEntry("ifccontrol",&STEP::ObjectHelper<IfcControl,1>::Construct )
+, SchemaEntry("ifcactionrequest",&STEP::ObjectHelper<IfcActionRequest,3>::Construct )
+, SchemaEntry("ifcactor",&STEP::ObjectHelper<IfcActor,1>::Construct )
+, SchemaEntry("ifcactorrole",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcproduct",&STEP::ObjectHelper<IfcProduct,2>::Construct )
+, SchemaEntry("ifcelement",&STEP::ObjectHelper<IfcElement,1>::Construct )
+, SchemaEntry("ifcdistributionelement",&STEP::ObjectHelper<IfcDistributionElement,0>::Construct )
+, SchemaEntry("ifcdistributioncontrolelement",&STEP::ObjectHelper<IfcDistributionControlElement,0>::Construct )
+, SchemaEntry("ifcactuator",&STEP::ObjectHelper<IfcActuator,1>::Construct )
+, SchemaEntry("ifctypeobject",&STEP::ObjectHelper<IfcTypeObject,2>::Construct )
+, SchemaEntry("ifctypeproduct",&STEP::ObjectHelper<IfcTypeProduct,2>::Construct )
+, SchemaEntry("ifcelementtype",&STEP::ObjectHelper<IfcElementType,1>::Construct )
+, SchemaEntry("ifcdistributionelementtype",&STEP::ObjectHelper<IfcDistributionElementType,0>::Construct )
+, SchemaEntry("ifcdistributioncontrolelementtype",&STEP::ObjectHelper<IfcDistributionControlElementType,0>::Construct )
+, SchemaEntry("ifcactuatortype",&STEP::ObjectHelper<IfcActuatorType,1>::Construct )
+, SchemaEntry("ifcaddress",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcrepresentationitem",&STEP::ObjectHelper<IfcRepresentationItem,0>::Construct )
+, SchemaEntry("ifcgeometricrepresentationitem",&STEP::ObjectHelper<IfcGeometricRepresentationItem,0>::Construct )
+, SchemaEntry("ifcsolidmodel",&STEP::ObjectHelper<IfcSolidModel,0>::Construct )
+, SchemaEntry("ifcmanifoldsolidbrep",&STEP::ObjectHelper<IfcManifoldSolidBrep,1>::Construct )
+, SchemaEntry("ifcadvancedbrep",&STEP::ObjectHelper<IfcAdvancedBrep,0>::Construct )
+, SchemaEntry("ifcadvancedbrepwithvoids",&STEP::ObjectHelper<IfcAdvancedBrepWithVoids,1>::Construct )
+, SchemaEntry("ifctopologicalrepresentationitem",&STEP::ObjectHelper<IfcTopologicalRepresentationItem,0>::Construct )
+, SchemaEntry("ifcface",&STEP::ObjectHelper<IfcFace,1>::Construct )
+, SchemaEntry("ifcfacesurface",&STEP::ObjectHelper<IfcFaceSurface,2>::Construct )
+, SchemaEntry("ifcadvancedface",&STEP::ObjectHelper<IfcAdvancedFace,0>::Construct )
+, SchemaEntry("ifcdistributionflowelement",&STEP::ObjectHelper<IfcDistributionFlowElement,0>::Construct )
+, SchemaEntry("ifcflowterminal",&STEP::ObjectHelper<IfcFlowTerminal,0>::Construct )
+, SchemaEntry("ifcairterminal",&STEP::ObjectHelper<IfcAirTerminal,1>::Construct )
+, SchemaEntry("ifcflowcontroller",&STEP::ObjectHelper<IfcFlowController,0>::Construct )
+, SchemaEntry("ifcairterminalbox",&STEP::ObjectHelper<IfcAirTerminalBox,1>::Construct )
+, SchemaEntry("ifcdistributionflowelementtype",&STEP::ObjectHelper<IfcDistributionFlowElementType,0>::Construct )
+, SchemaEntry("ifcflowcontrollertype",&STEP::ObjectHelper<IfcFlowControllerType,0>::Construct )
+, SchemaEntry("ifcairterminalboxtype",&STEP::ObjectHelper<IfcAirTerminalBoxType,1>::Construct )
+, SchemaEntry("ifcflowterminaltype",&STEP::ObjectHelper<IfcFlowTerminalType,0>::Construct )
+, SchemaEntry("ifcairterminaltype",&STEP::ObjectHelper<IfcAirTerminalType,1>::Construct )
+, SchemaEntry("ifcenergyconversiondevice",&STEP::ObjectHelper<IfcEnergyConversionDevice,0>::Construct )
+, SchemaEntry("ifcairtoairheatrecovery",&STEP::ObjectHelper<IfcAirToAirHeatRecovery,1>::Construct )
+, SchemaEntry("ifcenergyconversiondevicetype",&STEP::ObjectHelper<IfcEnergyConversionDeviceType,0>::Construct )
+, SchemaEntry("ifcairtoairheatrecoverytype",&STEP::ObjectHelper<IfcAirToAirHeatRecoveryType,1>::Construct )
+, SchemaEntry("ifcalarm",&STEP::ObjectHelper<IfcAlarm,1>::Construct )
+, SchemaEntry("ifcalarmtype",&STEP::ObjectHelper<IfcAlarmType,1>::Construct )
+, SchemaEntry("ifcannotation",&STEP::ObjectHelper<IfcAnnotation,0>::Construct )
+, SchemaEntry("ifcannotationfillarea",&STEP::ObjectHelper<IfcAnnotationFillArea,2>::Construct )
+, SchemaEntry("ifcapplication",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcappliedvalue",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcapproval",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcresourcelevelrelationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcapprovalrelationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcprofiledef",&STEP::ObjectHelper<IfcProfileDef,2>::Construct )
+, SchemaEntry("ifcarbitraryclosedprofiledef",&STEP::ObjectHelper<IfcArbitraryClosedProfileDef,1>::Construct )
+, SchemaEntry("ifcarbitraryopenprofiledef",&STEP::ObjectHelper<IfcArbitraryOpenProfileDef,1>::Construct )
+, SchemaEntry("ifcarbitraryprofiledefwithvoids",&STEP::ObjectHelper<IfcArbitraryProfileDefWithVoids,1>::Construct )
+, SchemaEntry("ifcgroup",&STEP::ObjectHelper<IfcGroup,0>::Construct )
+, SchemaEntry("ifcasset",&STEP::ObjectHelper<IfcAsset,9>::Construct )
+, SchemaEntry("ifcparameterizedprofiledef",&STEP::ObjectHelper<IfcParameterizedProfileDef,1>::Construct )
+, SchemaEntry("ifcasymmetricishapeprofiledef",&STEP::ObjectHelper<IfcAsymmetricIShapeProfileDef,12>::Construct )
+, SchemaEntry("ifcaudiovisualappliance",&STEP::ObjectHelper<IfcAudioVisualAppliance,1>::Construct )
+, SchemaEntry("ifcaudiovisualappliancetype",&STEP::ObjectHelper<IfcAudioVisualApplianceType,1>::Construct )
+, SchemaEntry("ifcplacement",&STEP::ObjectHelper<IfcPlacement,1>::Construct )
+, SchemaEntry("ifcaxis1placement",&STEP::ObjectHelper<IfcAxis1Placement,1>::Construct )
+, SchemaEntry("ifcaxis2placement2d",&STEP::ObjectHelper<IfcAxis2Placement2D,1>::Construct )
+, SchemaEntry("ifcaxis2placement3d",&STEP::ObjectHelper<IfcAxis2Placement3D,2>::Construct )
+, SchemaEntry("ifccurve",&STEP::ObjectHelper<IfcCurve,0>::Construct )
+, SchemaEntry("ifcboundedcurve",&STEP::ObjectHelper<IfcBoundedCurve,0>::Construct )
+, SchemaEntry("ifcbsplinecurve",&STEP::ObjectHelper<IfcBSplineCurve,5>::Construct )
+, SchemaEntry("ifcbsplinecurvewithknots",&STEP::ObjectHelper<IfcBSplineCurveWithKnots,3>::Construct )
+, SchemaEntry("ifcsurface",&STEP::ObjectHelper<IfcSurface,0>::Construct )
+, SchemaEntry("ifcboundedsurface",&STEP::ObjectHelper<IfcBoundedSurface,0>::Construct )
+, SchemaEntry("ifcbsplinesurface",&STEP::ObjectHelper<IfcBSplineSurface,6>::Construct )
+, SchemaEntry("ifcbsplinesurfacewithknots",&STEP::ObjectHelper<IfcBSplineSurfaceWithKnots,5>::Construct )
+, SchemaEntry("ifcbuildingelement",&STEP::ObjectHelper<IfcBuildingElement,0>::Construct )
+, SchemaEntry("ifcbeam",&STEP::ObjectHelper<IfcBeam,1>::Construct )
+, SchemaEntry("ifcbeamstandardcase",&STEP::ObjectHelper<IfcBeamStandardCase,0>::Construct )
+, SchemaEntry("ifcbuildingelementtype",&STEP::ObjectHelper<IfcBuildingElementType,0>::Construct )
+, SchemaEntry("ifcbeamtype",&STEP::ObjectHelper<IfcBeamType,1>::Construct )
+, SchemaEntry("ifcpresentationitem",&STEP::ObjectHelper<IfcPresentationItem,0>::Construct )
+, SchemaEntry("ifcsurfacetexture",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcblobtexture",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifccsgprimitive3d",&STEP::ObjectHelper<IfcCsgPrimitive3D,1>::Construct )
+, SchemaEntry("ifcblock",&STEP::ObjectHelper<IfcBlock,3>::Construct )
+, SchemaEntry("ifcboiler",&STEP::ObjectHelper<IfcBoiler,1>::Construct )
+, SchemaEntry("ifcboilertype",&STEP::ObjectHelper<IfcBoilerType,1>::Construct )
+, SchemaEntry("ifcbooleanresult",&STEP::ObjectHelper<IfcBooleanResult,3>::Construct )
+, SchemaEntry("ifcbooleanclippingresult",&STEP::ObjectHelper<IfcBooleanClippingResult,0>::Construct )
+, SchemaEntry("ifcboundarycondition",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifccompositecurve",&STEP::ObjectHelper<IfcCompositeCurve,2>::Construct )
+, SchemaEntry("ifccompositecurveonsurface",&STEP::ObjectHelper<IfcCompositeCurveOnSurface,0>::Construct )
+, SchemaEntry("ifcboundarycurve",&STEP::ObjectHelper<IfcBoundaryCurve,0>::Construct )
+, SchemaEntry("ifcboundaryedgecondition",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcboundaryfacecondition",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcboundarynodecondition",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcboundarynodeconditionwarping",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcboundingbox",&STEP::ObjectHelper<IfcBoundingBox,4>::Construct )
+, SchemaEntry("ifchalfspacesolid",&STEP::ObjectHelper<IfcHalfSpaceSolid,2>::Construct )
+, SchemaEntry("ifcboxedhalfspace",&STEP::ObjectHelper<IfcBoxedHalfSpace,1>::Construct )
+, SchemaEntry("ifcspatialelement",&STEP::ObjectHelper<IfcSpatialElement,1>::Construct )
+, SchemaEntry("ifcspatialstructureelement",&STEP::ObjectHelper<IfcSpatialStructureElement,1>::Construct )
+, SchemaEntry("ifcbuilding",&STEP::ObjectHelper<IfcBuilding,3>::Construct )
+, SchemaEntry("ifcelementcomponent",&STEP::ObjectHelper<IfcElementComponent,0>::Construct )
+, SchemaEntry("ifcbuildingelementpart",&STEP::ObjectHelper<IfcBuildingElementPart,1>::Construct )
+, SchemaEntry("ifcelementcomponenttype",&STEP::ObjectHelper<IfcElementComponentType,0>::Construct )
+, SchemaEntry("ifcbuildingelementparttype",&STEP::ObjectHelper<IfcBuildingElementPartType,1>::Construct )
+, SchemaEntry("ifcbuildingelementproxy",&STEP::ObjectHelper<IfcBuildingElementProxy,1>::Construct )
+, SchemaEntry("ifcbuildingelementproxytype",&STEP::ObjectHelper<IfcBuildingElementProxyType,1>::Construct )
+, SchemaEntry("ifcbuildingstorey",&STEP::ObjectHelper<IfcBuildingStorey,1>::Construct )
+, SchemaEntry("ifcsystem",&STEP::ObjectHelper<IfcSystem,0>::Construct )
+, SchemaEntry("ifcbuildingsystem",&STEP::ObjectHelper<IfcBuildingSystem,2>::Construct )
+, SchemaEntry("ifcburner",&STEP::ObjectHelper<IfcBurner,1>::Construct )
+, SchemaEntry("ifcburnertype",&STEP::ObjectHelper<IfcBurnerType,1>::Construct )
+, SchemaEntry("ifccshapeprofiledef",&STEP::ObjectHelper<IfcCShapeProfileDef,5>::Construct )
+, SchemaEntry("ifcflowfitting",&STEP::ObjectHelper<IfcFlowFitting,0>::Construct )
+, SchemaEntry("ifccablecarrierfitting",&STEP::ObjectHelper<IfcCableCarrierFitting,1>::Construct )
+, SchemaEntry("ifcflowfittingtype",&STEP::ObjectHelper<IfcFlowFittingType,0>::Construct )
+, SchemaEntry("ifccablecarrierfittingtype",&STEP::ObjectHelper<IfcCableCarrierFittingType,1>::Construct )
+, SchemaEntry("ifcflowsegment",&STEP::ObjectHelper<IfcFlowSegment,0>::Construct )
+, SchemaEntry("ifccablecarriersegment",&STEP::ObjectHelper<IfcCableCarrierSegment,1>::Construct )
+, SchemaEntry("ifcflowsegmenttype",&STEP::ObjectHelper<IfcFlowSegmentType,0>::Construct )
+, SchemaEntry("ifccablecarriersegmenttype",&STEP::ObjectHelper<IfcCableCarrierSegmentType,1>::Construct )
+, SchemaEntry("ifccablefitting",&STEP::ObjectHelper<IfcCableFitting,1>::Construct )
+, SchemaEntry("ifccablefittingtype",&STEP::ObjectHelper<IfcCableFittingType,1>::Construct )
+, SchemaEntry("ifccablesegment",&STEP::ObjectHelper<IfcCableSegment,1>::Construct )
+, SchemaEntry("ifccablesegmenttype",&STEP::ObjectHelper<IfcCableSegmentType,1>::Construct )
+, SchemaEntry("ifcpoint",&STEP::ObjectHelper<IfcPoint,0>::Construct )
+, SchemaEntry("ifccartesianpoint",&STEP::ObjectHelper<IfcCartesianPoint,1>::Construct )
+, SchemaEntry("ifccartesianpointlist",&STEP::ObjectHelper<IfcCartesianPointList,0>::Construct )
+, SchemaEntry("ifccartesianpointlist2d",&STEP::ObjectHelper<IfcCartesianPointList2D,0>::Construct )
+, SchemaEntry("ifccartesianpointlist3d",&STEP::ObjectHelper<IfcCartesianPointList3D,0>::Construct )
+, SchemaEntry("ifccartesiantransformationoperator",&STEP::ObjectHelper<IfcCartesianTransformationOperator,4>::Construct )
+, SchemaEntry("ifccartesiantransformationoperator2d",&STEP::ObjectHelper<IfcCartesianTransformationOperator2D,0>::Construct )
+, SchemaEntry("ifccartesiantransformationoperator2dnonuniform",&STEP::ObjectHelper<IfcCartesianTransformationOperator2DnonUniform,1>::Construct )
+, SchemaEntry("ifccartesiantransformationoperator3d",&STEP::ObjectHelper<IfcCartesianTransformationOperator3D,1>::Construct )
+, SchemaEntry("ifccartesiantransformationoperator3dnonuniform",&STEP::ObjectHelper<IfcCartesianTransformationOperator3DnonUniform,2>::Construct )
+, SchemaEntry("ifccenterlineprofiledef",&STEP::ObjectHelper<IfcCenterLineProfileDef,1>::Construct )
+, SchemaEntry("ifcchiller",&STEP::ObjectHelper<IfcChiller,1>::Construct )
+, SchemaEntry("ifcchillertype",&STEP::ObjectHelper<IfcChillerType,1>::Construct )
+, SchemaEntry("ifcchimney",&STEP::ObjectHelper<IfcChimney,1>::Construct )
+, SchemaEntry("ifcchimneytype",&STEP::ObjectHelper<IfcChimneyType,1>::Construct )
+, SchemaEntry("ifcconic",&STEP::ObjectHelper<IfcConic,1>::Construct )
+, SchemaEntry("ifccircle",&STEP::ObjectHelper<IfcCircle,1>::Construct )
+, SchemaEntry("ifccircleprofiledef",&STEP::ObjectHelper<IfcCircleProfileDef,1>::Construct )
+, SchemaEntry("ifccirclehollowprofiledef",&STEP::ObjectHelper<IfcCircleHollowProfileDef,1>::Construct )
+, SchemaEntry("ifccivilelement",&STEP::ObjectHelper<IfcCivilElement,0>::Construct )
+, SchemaEntry("ifccivilelementtype",&STEP::ObjectHelper<IfcCivilElementType,0>::Construct )
+, SchemaEntry("ifcexternalinformation",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcclassification",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcexternalreference",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcclassificationreference",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcconnectedfaceset",&STEP::ObjectHelper<IfcConnectedFaceSet,1>::Construct )
+, SchemaEntry("ifcclosedshell",&STEP::ObjectHelper<IfcClosedShell,0>::Construct )
+, SchemaEntry("ifccoil",&STEP::ObjectHelper<IfcCoil,1>::Construct )
+, SchemaEntry("ifccoiltype",&STEP::ObjectHelper<IfcCoilType,1>::Construct )
+, SchemaEntry("ifccolourspecification",&STEP::ObjectHelper<IfcColourSpecification,1>::Construct )
+, SchemaEntry("ifccolourrgb",&STEP::ObjectHelper<IfcColourRgb,3>::Construct )
+, SchemaEntry("ifccolourrgblist",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifccolumn",&STEP::ObjectHelper<IfcColumn,1>::Construct )
+, SchemaEntry("ifccolumnstandardcase",&STEP::ObjectHelper<IfcColumnStandardCase,0>::Construct )
+, SchemaEntry("ifccolumntype",&STEP::ObjectHelper<IfcColumnType,1>::Construct )
+, SchemaEntry("ifccommunicationsappliance",&STEP::ObjectHelper<IfcCommunicationsAppliance,1>::Construct )
+, SchemaEntry("ifccommunicationsappliancetype",&STEP::ObjectHelper<IfcCommunicationsApplianceType,1>::Construct )
+, SchemaEntry("ifcpropertyabstraction",&STEP::ObjectHelper<IfcPropertyAbstraction,0>::Construct )
+, SchemaEntry("ifcproperty",&STEP::ObjectHelper<IfcProperty,2>::Construct )
+, SchemaEntry("ifccomplexproperty",&STEP::ObjectHelper<IfcComplexProperty,2>::Construct )
+, SchemaEntry("ifcpropertydefinition",&STEP::ObjectHelper<IfcPropertyDefinition,0>::Construct )
+, SchemaEntry("ifcpropertytemplatedefinition",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcpropertytemplate",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifccomplexpropertytemplate",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifccompositecurvesegment",&STEP::ObjectHelper<IfcCompositeCurveSegment,3>::Construct )
+, SchemaEntry("ifccompositeprofiledef",&STEP::ObjectHelper<IfcCompositeProfileDef,2>::Construct )
+, SchemaEntry("ifcflowmovingdevice",&STEP::ObjectHelper<IfcFlowMovingDevice,0>::Construct )
+, SchemaEntry("ifccompressor",&STEP::ObjectHelper<IfcCompressor,1>::Construct )
+, SchemaEntry("ifcflowmovingdevicetype",&STEP::ObjectHelper<IfcFlowMovingDeviceType,0>::Construct )
+, SchemaEntry("ifccompressortype",&STEP::ObjectHelper<IfcCompressorType,1>::Construct )
+, SchemaEntry("ifccondenser",&STEP::ObjectHelper<IfcCondenser,1>::Construct )
+, SchemaEntry("ifccondensertype",&STEP::ObjectHelper<IfcCondenserType,1>::Construct )
+, SchemaEntry("ifcconnectiongeometry",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcconnectioncurvegeometry",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcconnectionpointgeometry",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcconnectionpointeccentricity",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcconnectionsurfacegeometry",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcconnectionvolumegeometry",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcconstraint",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcresource",&STEP::ObjectHelper<IfcResource,2>::Construct )
+, SchemaEntry("ifcconstructionresource",&STEP::ObjectHelper<IfcConstructionResource,3>::Construct )
+, SchemaEntry("ifcconstructionequipmentresource",&STEP::ObjectHelper<IfcConstructionEquipmentResource,1>::Construct )
+, SchemaEntry("ifctyperesource",&STEP::ObjectHelper<IfcTypeResource,3>::Construct )
+, SchemaEntry("ifcconstructionresourcetype",&STEP::ObjectHelper<IfcConstructionResourceType,2>::Construct )
+, SchemaEntry("ifcconstructionequipmentresourcetype",&STEP::ObjectHelper<IfcConstructionEquipmentResourceType,1>::Construct )
+, SchemaEntry("ifcconstructionmaterialresource",&STEP::ObjectHelper<IfcConstructionMaterialResource,1>::Construct )
+, SchemaEntry("ifcconstructionmaterialresourcetype",&STEP::ObjectHelper<IfcConstructionMaterialResourceType,1>::Construct )
+, SchemaEntry("ifcconstructionproductresource",&STEP::ObjectHelper<IfcConstructionProductResource,1>::Construct )
+, SchemaEntry("ifcconstructionproductresourcetype",&STEP::ObjectHelper<IfcConstructionProductResourceType,1>::Construct )
+, SchemaEntry("ifccontext",&STEP::ObjectHelper<IfcContext,5>::Construct )
+, SchemaEntry("ifcnamedunit",&STEP::ObjectHelper<IfcNamedUnit,2>::Construct )
+, SchemaEntry("ifccontextdependentunit",&STEP::ObjectHelper<IfcContextDependentUnit,1>::Construct )
+, SchemaEntry("ifccontroller",&STEP::ObjectHelper<IfcController,1>::Construct )
+, SchemaEntry("ifccontrollertype",&STEP::ObjectHelper<IfcControllerType,1>::Construct )
+, SchemaEntry("ifcconversionbasedunit",&STEP::ObjectHelper<IfcConversionBasedUnit,2>::Construct )
+, SchemaEntry("ifcconversionbasedunitwithoffset",&STEP::ObjectHelper<IfcConversionBasedUnitWithOffset,1>::Construct )
+, SchemaEntry("ifccooledbeam",&STEP::ObjectHelper<IfcCooledBeam,1>::Construct )
+, SchemaEntry("ifccooledbeamtype",&STEP::ObjectHelper<IfcCooledBeamType,1>::Construct )
+, SchemaEntry("ifccoolingtower",&STEP::ObjectHelper<IfcCoolingTower,1>::Construct )
+, SchemaEntry("ifccoolingtowertype",&STEP::ObjectHelper<IfcCoolingTowerType,1>::Construct )
+, SchemaEntry("ifccoordinateoperation",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifccoordinatereferencesystem",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifccostitem",&STEP::ObjectHelper<IfcCostItem,3>::Construct )
+, SchemaEntry("ifccostschedule",&STEP::ObjectHelper<IfcCostSchedule,4>::Construct )
+, SchemaEntry("ifccostvalue",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifccovering",&STEP::ObjectHelper<IfcCovering,1>::Construct )
+, SchemaEntry("ifccoveringtype",&STEP::ObjectHelper<IfcCoveringType,1>::Construct )
+, SchemaEntry("ifccrewresource",&STEP::ObjectHelper<IfcCrewResource,1>::Construct )
+, SchemaEntry("ifccrewresourcetype",&STEP::ObjectHelper<IfcCrewResourceType,1>::Construct )
+, SchemaEntry("ifccsgsolid",&STEP::ObjectHelper<IfcCsgSolid,1>::Construct )
+, SchemaEntry("ifccurrencyrelationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifccurtainwall",&STEP::ObjectHelper<IfcCurtainWall,1>::Construct )
+, SchemaEntry("ifccurtainwalltype",&STEP::ObjectHelper<IfcCurtainWallType,1>::Construct )
+, SchemaEntry("ifccurveboundedplane",&STEP::ObjectHelper<IfcCurveBoundedPlane,3>::Construct )
+, SchemaEntry("ifccurveboundedsurface",&STEP::ObjectHelper<IfcCurveBoundedSurface,3>::Construct )
+, SchemaEntry("ifcpresentationstyle",&STEP::ObjectHelper<IfcPresentationStyle,1>::Construct )
+, SchemaEntry("ifccurvestyle",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifccurvestylefont",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifccurvestylefontandscaling",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifccurvestylefontpattern",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcelementarysurface",&STEP::ObjectHelper<IfcElementarySurface,1>::Construct )
+, SchemaEntry("ifccylindricalsurface",&STEP::ObjectHelper<IfcCylindricalSurface,1>::Construct )
+, SchemaEntry("ifcdamper",&STEP::ObjectHelper<IfcDamper,1>::Construct )
+, SchemaEntry("ifcdampertype",&STEP::ObjectHelper<IfcDamperType,1>::Construct )
+, SchemaEntry("ifcderivedprofiledef",&STEP::ObjectHelper<IfcDerivedProfileDef,3>::Construct )
+, SchemaEntry("ifcderivedunit",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcderivedunitelement",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcdimensionalexponents",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcdirection",&STEP::ObjectHelper<IfcDirection,1>::Construct )
+, SchemaEntry("ifcdiscreteaccessory",&STEP::ObjectHelper<IfcDiscreteAccessory,1>::Construct )
+, SchemaEntry("ifcdiscreteaccessorytype",&STEP::ObjectHelper<IfcDiscreteAccessoryType,1>::Construct )
+, SchemaEntry("ifcdistributionchamberelement",&STEP::ObjectHelper<IfcDistributionChamberElement,1>::Construct )
+, SchemaEntry("ifcdistributionchamberelementtype",&STEP::ObjectHelper<IfcDistributionChamberElementType,1>::Construct )
+, SchemaEntry("ifcdistributionsystem",&STEP::ObjectHelper<IfcDistributionSystem,2>::Construct )
+, SchemaEntry("ifcdistributioncircuit",&STEP::ObjectHelper<IfcDistributionCircuit,0>::Construct )
+, SchemaEntry("ifcport",&STEP::ObjectHelper<IfcPort,0>::Construct )
+, SchemaEntry("ifcdistributionport",&STEP::ObjectHelper<IfcDistributionPort,3>::Construct )
+, SchemaEntry("ifcdocumentinformation",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcdocumentinformationrelationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcdocumentreference",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcdoor",&STEP::ObjectHelper<IfcDoor,5>::Construct )
+, SchemaEntry("ifcpropertysetdefinition",&STEP::ObjectHelper<IfcPropertySetDefinition,0>::Construct )
+, SchemaEntry("ifcpredefinedpropertyset",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcdoorliningproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcdoorpanelproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcdoorstandardcase",&STEP::ObjectHelper<IfcDoorStandardCase,0>::Construct )
+, SchemaEntry("ifcdoorstyle",&STEP::ObjectHelper<IfcDoorStyle,4>::Construct )
+, SchemaEntry("ifcdoortype",&STEP::ObjectHelper<IfcDoorType,4>::Construct )
+, SchemaEntry("ifcpredefineditem",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcpredefinedcolour",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcdraughtingpredefinedcolour",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcpredefinedcurvefont",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcdraughtingpredefinedcurvefont",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcductfitting",&STEP::ObjectHelper<IfcDuctFitting,1>::Construct )
+, SchemaEntry("ifcductfittingtype",&STEP::ObjectHelper<IfcDuctFittingType,1>::Construct )
+, SchemaEntry("ifcductsegment",&STEP::ObjectHelper<IfcDuctSegment,1>::Construct )
+, SchemaEntry("ifcductsegmenttype",&STEP::ObjectHelper<IfcDuctSegmentType,1>::Construct )
+, SchemaEntry("ifcflowtreatmentdevice",&STEP::ObjectHelper<IfcFlowTreatmentDevice,0>::Construct )
+, SchemaEntry("ifcductsilencer",&STEP::ObjectHelper<IfcDuctSilencer,1>::Construct )
+, SchemaEntry("ifcflowtreatmentdevicetype",&STEP::ObjectHelper<IfcFlowTreatmentDeviceType,0>::Construct )
+, SchemaEntry("ifcductsilencertype",&STEP::ObjectHelper<IfcDuctSilencerType,1>::Construct )
+, SchemaEntry("ifcedge",&STEP::ObjectHelper<IfcEdge,2>::Construct )
+, SchemaEntry("ifcedgecurve",&STEP::ObjectHelper<IfcEdgeCurve,2>::Construct )
+, SchemaEntry("ifcloop",&STEP::ObjectHelper<IfcLoop,0>::Construct )
+, SchemaEntry("ifcedgeloop",&STEP::ObjectHelper<IfcEdgeLoop,1>::Construct )
+, SchemaEntry("ifcelectricappliance",&STEP::ObjectHelper<IfcElectricAppliance,1>::Construct )
+, SchemaEntry("ifcelectricappliancetype",&STEP::ObjectHelper<IfcElectricApplianceType,1>::Construct )
+, SchemaEntry("ifcelectricdistributionboard",&STEP::ObjectHelper<IfcElectricDistributionBoard,1>::Construct )
+, SchemaEntry("ifcelectricdistributionboardtype",&STEP::ObjectHelper<IfcElectricDistributionBoardType,1>::Construct )
+, SchemaEntry("ifcflowstoragedevice",&STEP::ObjectHelper<IfcFlowStorageDevice,0>::Construct )
+, SchemaEntry("ifcelectricflowstoragedevice",&STEP::ObjectHelper<IfcElectricFlowStorageDevice,1>::Construct )
+, SchemaEntry("ifcflowstoragedevicetype",&STEP::ObjectHelper<IfcFlowStorageDeviceType,0>::Construct )
+, SchemaEntry("ifcelectricflowstoragedevicetype",&STEP::ObjectHelper<IfcElectricFlowStorageDeviceType,1>::Construct )
+, SchemaEntry("ifcelectricgenerator",&STEP::ObjectHelper<IfcElectricGenerator,1>::Construct )
+, SchemaEntry("ifcelectricgeneratortype",&STEP::ObjectHelper<IfcElectricGeneratorType,1>::Construct )
+, SchemaEntry("ifcelectricmotor",&STEP::ObjectHelper<IfcElectricMotor,1>::Construct )
+, SchemaEntry("ifcelectricmotortype",&STEP::ObjectHelper<IfcElectricMotorType,1>::Construct )
+, SchemaEntry("ifcelectrictimecontrol",&STEP::ObjectHelper<IfcElectricTimeControl,1>::Construct )
+, SchemaEntry("ifcelectrictimecontroltype",&STEP::ObjectHelper<IfcElectricTimeControlType,1>::Construct )
+, SchemaEntry("ifcelementassembly",&STEP::ObjectHelper<IfcElementAssembly,2>::Construct )
+, SchemaEntry("ifcelementassemblytype",&STEP::ObjectHelper<IfcElementAssemblyType,1>::Construct )
+, SchemaEntry("ifcquantityset",&STEP::ObjectHelper<IfcQuantitySet,0>::Construct )
+, SchemaEntry("ifcelementquantity",&STEP::ObjectHelper<IfcElementQuantity,2>::Construct )
+, SchemaEntry("ifcellipse",&STEP::ObjectHelper<IfcEllipse,2>::Construct )
+, SchemaEntry("ifcellipseprofiledef",&STEP::ObjectHelper<IfcEllipseProfileDef,2>::Construct )
+, SchemaEntry("ifcengine",&STEP::ObjectHelper<IfcEngine,1>::Construct )
+, SchemaEntry("ifcenginetype",&STEP::ObjectHelper<IfcEngineType,1>::Construct )
+, SchemaEntry("ifcevaporativecooler",&STEP::ObjectHelper<IfcEvaporativeCooler,1>::Construct )
+, SchemaEntry("ifcevaporativecoolertype",&STEP::ObjectHelper<IfcEvaporativeCoolerType,1>::Construct )
+, SchemaEntry("ifcevaporator",&STEP::ObjectHelper<IfcEvaporator,1>::Construct )
+, SchemaEntry("ifcevaporatortype",&STEP::ObjectHelper<IfcEvaporatorType,1>::Construct )
+, SchemaEntry("ifcprocess",&STEP::ObjectHelper<IfcProcess,2>::Construct )
+, SchemaEntry("ifcevent",&STEP::ObjectHelper<IfcEvent,4>::Construct )
+, SchemaEntry("ifcschedulingtime",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifceventtime",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifctypeprocess",&STEP::ObjectHelper<IfcTypeProcess,3>::Construct )
+, SchemaEntry("ifceventtype",&STEP::ObjectHelper<IfcEventType,3>::Construct )
+, SchemaEntry("ifcextendedproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcexternalreferencerelationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcexternalspatialstructureelement",&STEP::ObjectHelper<IfcExternalSpatialStructureElement,0>::Construct )
+, SchemaEntry("ifcexternalspatialelement",&STEP::ObjectHelper<IfcExternalSpatialElement,1>::Construct )
+, SchemaEntry("ifcexternallydefinedhatchstyle",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcexternallydefinedsurfacestyle",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcexternallydefinedtextfont",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcsweptareasolid",&STEP::ObjectHelper<IfcSweptAreaSolid,2>::Construct )
+, SchemaEntry("ifcextrudedareasolid",&STEP::ObjectHelper<IfcExtrudedAreaSolid,2>::Construct )
+, SchemaEntry("ifcextrudedareasolidtapered",&STEP::ObjectHelper<IfcExtrudedAreaSolidTapered,1>::Construct )
+, SchemaEntry("ifcfacebasedsurfacemodel",&STEP::ObjectHelper<IfcFaceBasedSurfaceModel,1>::Construct )
+, SchemaEntry("ifcfacebound",&STEP::ObjectHelper<IfcFaceBound,2>::Construct )
+, SchemaEntry("ifcfaceouterbound",&STEP::ObjectHelper<IfcFaceOuterBound,0>::Construct )
+, SchemaEntry("ifcfacetedbrep",&STEP::ObjectHelper<IfcFacetedBrep,0>::Construct )
+, SchemaEntry("ifcfacetedbrepwithvoids",&STEP::ObjectHelper<IfcFacetedBrepWithVoids,1>::Construct )
+, SchemaEntry("ifcstructuralconnectioncondition",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcfailureconnectioncondition",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcfan",&STEP::ObjectHelper<IfcFan,1>::Construct )
+, SchemaEntry("ifcfantype",&STEP::ObjectHelper<IfcFanType,1>::Construct )
+, SchemaEntry("ifcfastener",&STEP::ObjectHelper<IfcFastener,1>::Construct )
+, SchemaEntry("ifcfastenertype",&STEP::ObjectHelper<IfcFastenerType,1>::Construct )
+, SchemaEntry("ifcfeatureelement",&STEP::ObjectHelper<IfcFeatureElement,0>::Construct )
+, SchemaEntry("ifcfeatureelementaddition",&STEP::ObjectHelper<IfcFeatureElementAddition,0>::Construct )
+, SchemaEntry("ifcfeatureelementsubtraction",&STEP::ObjectHelper<IfcFeatureElementSubtraction,0>::Construct )
+, SchemaEntry("ifcfillareastyle",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcfillareastylehatching",&STEP::ObjectHelper<IfcFillAreaStyleHatching,5>::Construct )
+, SchemaEntry("ifcfillareastyletiles",&STEP::ObjectHelper<IfcFillAreaStyleTiles,3>::Construct )
+, SchemaEntry("ifcfilter",&STEP::ObjectHelper<IfcFilter,1>::Construct )
+, SchemaEntry("ifcfiltertype",&STEP::ObjectHelper<IfcFilterType,1>::Construct )
+, SchemaEntry("ifcfiresuppressionterminal",&STEP::ObjectHelper<IfcFireSuppressionTerminal,1>::Construct )
+, SchemaEntry("ifcfiresuppressionterminaltype",&STEP::ObjectHelper<IfcFireSuppressionTerminalType,1>::Construct )
+, SchemaEntry("ifcfixedreferencesweptareasolid",&STEP::ObjectHelper<IfcFixedReferenceSweptAreaSolid,4>::Construct )
+, SchemaEntry("ifcflowinstrument",&STEP::ObjectHelper<IfcFlowInstrument,1>::Construct )
+, SchemaEntry("ifcflowinstrumenttype",&STEP::ObjectHelper<IfcFlowInstrumentType,1>::Construct )
+, SchemaEntry("ifcflowmeter",&STEP::ObjectHelper<IfcFlowMeter,1>::Construct )
+, SchemaEntry("ifcflowmetertype",&STEP::ObjectHelper<IfcFlowMeterType,1>::Construct )
+, SchemaEntry("ifcfooting",&STEP::ObjectHelper<IfcFooting,1>::Construct )
+, SchemaEntry("ifcfootingtype",&STEP::ObjectHelper<IfcFootingType,1>::Construct )
+, SchemaEntry("ifcfurnishingelement",&STEP::ObjectHelper<IfcFurnishingElement,0>::Construct )
+, SchemaEntry("ifcfurnishingelementtype",&STEP::ObjectHelper<IfcFurnishingElementType,0>::Construct )
+, SchemaEntry("ifcfurniture",&STEP::ObjectHelper<IfcFurniture,1>::Construct )
+, SchemaEntry("ifcfurnituretype",&STEP::ObjectHelper<IfcFurnitureType,2>::Construct )
+, SchemaEntry("ifcgeographicelement",&STEP::ObjectHelper<IfcGeographicElement,1>::Construct )
+, SchemaEntry("ifcgeographicelementtype",&STEP::ObjectHelper<IfcGeographicElementType,1>::Construct )
+, SchemaEntry("ifcgeometricset",&STEP::ObjectHelper<IfcGeometricSet,1>::Construct )
+, SchemaEntry("ifcgeometriccurveset",&STEP::ObjectHelper<IfcGeometricCurveSet,0>::Construct )
+, SchemaEntry("ifcrepresentationcontext",&STEP::ObjectHelper<IfcRepresentationContext,2>::Construct )
+, SchemaEntry("ifcgeometricrepresentationcontext",&STEP::ObjectHelper<IfcGeometricRepresentationContext,4>::Construct )
+, SchemaEntry("ifcgeometricrepresentationsubcontext",&STEP::ObjectHelper<IfcGeometricRepresentationSubContext,4>::Construct )
+, SchemaEntry("ifcgrid",&STEP::ObjectHelper<IfcGrid,4>::Construct )
+, SchemaEntry("ifcgridaxis",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcobjectplacement",&STEP::ObjectHelper<IfcObjectPlacement,0>::Construct )
+, SchemaEntry("ifcgridplacement",&STEP::ObjectHelper<IfcGridPlacement,2>::Construct )
+, SchemaEntry("ifcheatexchanger",&STEP::ObjectHelper<IfcHeatExchanger,1>::Construct )
+, SchemaEntry("ifcheatexchangertype",&STEP::ObjectHelper<IfcHeatExchangerType,1>::Construct )
+, SchemaEntry("ifchumidifier",&STEP::ObjectHelper<IfcHumidifier,1>::Construct )
+, SchemaEntry("ifchumidifiertype",&STEP::ObjectHelper<IfcHumidifierType,1>::Construct )
+, SchemaEntry("ifcishapeprofiledef",&STEP::ObjectHelper<IfcIShapeProfileDef,7>::Construct )
+, SchemaEntry("ifcimagetexture",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcindexedcolourmap",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcindexedpolycurve",&STEP::ObjectHelper<IfcIndexedPolyCurve,3>::Construct )
+, SchemaEntry("ifctessellateditem",&STEP::ObjectHelper<IfcTessellatedItem,0>::Construct )
+, SchemaEntry("ifcindexedpolygonalface",&STEP::ObjectHelper<IfcIndexedPolygonalFace,1>::Construct )
+, SchemaEntry("ifcindexedpolygonalfacewithvoids",&STEP::ObjectHelper<IfcIndexedPolygonalFaceWithVoids,0>::Construct )
+, SchemaEntry("ifctexturecoordinate",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcindexedtexturemap",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcindexedtriangletexturemap",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcinterceptor",&STEP::ObjectHelper<IfcInterceptor,1>::Construct )
+, SchemaEntry("ifcinterceptortype",&STEP::ObjectHelper<IfcInterceptorType,1>::Construct )
+, SchemaEntry("ifcsurfacecurve",&STEP::ObjectHelper<IfcSurfaceCurve,3>::Construct )
+, SchemaEntry("ifcintersectioncurve",&STEP::ObjectHelper<IfcIntersectionCurve,0>::Construct )
+, SchemaEntry("ifcinventory",&STEP::ObjectHelper<IfcInventory,6>::Construct )
+, SchemaEntry("ifctimeseries",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcirregulartimeseries",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcirregulartimeseriesvalue",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcjunctionbox",&STEP::ObjectHelper<IfcJunctionBox,1>::Construct )
+, SchemaEntry("ifcjunctionboxtype",&STEP::ObjectHelper<IfcJunctionBoxType,1>::Construct )
+, SchemaEntry("ifclshapeprofiledef",&STEP::ObjectHelper<IfcLShapeProfileDef,6>::Construct )
+, SchemaEntry("ifclaborresource",&STEP::ObjectHelper<IfcLaborResource,1>::Construct )
+, SchemaEntry("ifclaborresourcetype",&STEP::ObjectHelper<IfcLaborResourceType,1>::Construct )
+, SchemaEntry("ifclagtime",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifclamp",&STEP::ObjectHelper<IfcLamp,1>::Construct )
+, SchemaEntry("ifclamptype",&STEP::ObjectHelper<IfcLampType,1>::Construct )
+, SchemaEntry("ifclibraryinformation",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifclibraryreference",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifclightdistributiondata",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifclightfixture",&STEP::ObjectHelper<IfcLightFixture,1>::Construct )
+, SchemaEntry("ifclightfixturetype",&STEP::ObjectHelper<IfcLightFixtureType,1>::Construct )
+, SchemaEntry("ifclightintensitydistribution",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifclightsource",&STEP::ObjectHelper<IfcLightSource,4>::Construct )
+, SchemaEntry("ifclightsourceambient",&STEP::ObjectHelper<IfcLightSourceAmbient,0>::Construct )
+, SchemaEntry("ifclightsourcedirectional",&STEP::ObjectHelper<IfcLightSourceDirectional,1>::Construct )
+, SchemaEntry("ifclightsourcegoniometric",&STEP::ObjectHelper<IfcLightSourceGoniometric,6>::Construct )
+, SchemaEntry("ifclightsourcepositional",&STEP::ObjectHelper<IfcLightSourcePositional,5>::Construct )
+, SchemaEntry("ifclightsourcespot",&STEP::ObjectHelper<IfcLightSourceSpot,4>::Construct )
+, SchemaEntry("ifcline",&STEP::ObjectHelper<IfcLine,2>::Construct )
+, SchemaEntry("ifclocalplacement",&STEP::ObjectHelper<IfcLocalPlacement,2>::Construct )
+, SchemaEntry("ifcmapconversion",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcmappeditem",&STEP::ObjectHelper<IfcMappedItem,2>::Construct )
+, SchemaEntry("ifcmaterialdefinition",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcmaterial",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcmaterialclassificationrelationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcmaterialconstituent",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcmaterialconstituentset",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcproductrepresentation",&STEP::ObjectHelper<IfcProductRepresentation,3>::Construct )
+, SchemaEntry("ifcmaterialdefinitionrepresentation",&STEP::ObjectHelper<IfcMaterialDefinitionRepresentation,1>::Construct )
+, SchemaEntry("ifcmateriallayer",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcmateriallayerset",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcmaterialusagedefinition",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcmateriallayersetusage",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcmateriallayerwithoffsets",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcmateriallist",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcmaterialprofile",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcmaterialprofileset",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcmaterialprofilesetusage",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcmaterialprofilesetusagetapering",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcmaterialprofilewithoffsets",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcmaterialproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcmaterialrelationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcmeasurewithunit",&STEP::ObjectHelper<IfcMeasureWithUnit,2>::Construct )
+, SchemaEntry("ifcmechanicalfastener",&STEP::ObjectHelper<IfcMechanicalFastener,3>::Construct )
+, SchemaEntry("ifcmechanicalfastenertype",&STEP::ObjectHelper<IfcMechanicalFastenerType,3>::Construct )
+, SchemaEntry("ifcmedicaldevice",&STEP::ObjectHelper<IfcMedicalDevice,1>::Construct )
+, SchemaEntry("ifcmedicaldevicetype",&STEP::ObjectHelper<IfcMedicalDeviceType,1>::Construct )
+, SchemaEntry("ifcmember",&STEP::ObjectHelper<IfcMember,1>::Construct )
+, SchemaEntry("ifcmemberstandardcase",&STEP::ObjectHelper<IfcMemberStandardCase,0>::Construct )
+, SchemaEntry("ifcmembertype",&STEP::ObjectHelper<IfcMemberType,1>::Construct )
+, SchemaEntry("ifcmetric",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcmirroredprofiledef",&STEP::ObjectHelper<IfcMirroredProfileDef,0>::Construct )
+, SchemaEntry("ifcmonetaryunit",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcmotorconnection",&STEP::ObjectHelper<IfcMotorConnection,1>::Construct )
+, SchemaEntry("ifcmotorconnectiontype",&STEP::ObjectHelper<IfcMotorConnectionType,1>::Construct )
+, SchemaEntry("ifcobjective",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcoccupant",&STEP::ObjectHelper<IfcOccupant,1>::Construct )
+, SchemaEntry("ifcoffsetcurve2d",&STEP::ObjectHelper<IfcOffsetCurve2D,3>::Construct )
+, SchemaEntry("ifcoffsetcurve3d",&STEP::ObjectHelper<IfcOffsetCurve3D,4>::Construct )
+, SchemaEntry("ifcopenshell",&STEP::ObjectHelper<IfcOpenShell,0>::Construct )
+, SchemaEntry("ifcopeningelement",&STEP::ObjectHelper<IfcOpeningElement,1>::Construct )
+, SchemaEntry("ifcopeningstandardcase",&STEP::ObjectHelper<IfcOpeningStandardCase,0>::Construct )
+, SchemaEntry("ifcorganization",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcorganizationrelationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcorientededge",&STEP::ObjectHelper<IfcOrientedEdge,2>::Construct )
+, SchemaEntry("ifcouterboundarycurve",&STEP::ObjectHelper<IfcOuterBoundaryCurve,0>::Construct )
+, SchemaEntry("ifcoutlet",&STEP::ObjectHelper<IfcOutlet,1>::Construct )
+, SchemaEntry("ifcoutlettype",&STEP::ObjectHelper<IfcOutletType,1>::Construct )
+, SchemaEntry("ifcownerhistory",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcpath",&STEP::ObjectHelper<IfcPath,1>::Construct )
+, SchemaEntry("ifcpcurve",&STEP::ObjectHelper<IfcPcurve,2>::Construct )
+, SchemaEntry("ifcperformancehistory",&STEP::ObjectHelper<IfcPerformanceHistory,2>::Construct )
+, SchemaEntry("ifcpermeablecoveringproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcpermit",&STEP::ObjectHelper<IfcPermit,3>::Construct )
+, SchemaEntry("ifcperson",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcpersonandorganization",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcphysicalquantity",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcphysicalcomplexquantity",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcphysicalsimplequantity",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcpile",&STEP::ObjectHelper<IfcPile,2>::Construct )
+, SchemaEntry("ifcpiletype",&STEP::ObjectHelper<IfcPileType,1>::Construct )
+, SchemaEntry("ifcpipefitting",&STEP::ObjectHelper<IfcPipeFitting,1>::Construct )
+, SchemaEntry("ifcpipefittingtype",&STEP::ObjectHelper<IfcPipeFittingType,1>::Construct )
+, SchemaEntry("ifcpipesegment",&STEP::ObjectHelper<IfcPipeSegment,1>::Construct )
+, SchemaEntry("ifcpipesegmenttype",&STEP::ObjectHelper<IfcPipeSegmentType,1>::Construct )
+, SchemaEntry("ifcpixeltexture",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcplanarextent",&STEP::ObjectHelper<IfcPlanarExtent,2>::Construct )
+, SchemaEntry("ifcplanarbox",&STEP::ObjectHelper<IfcPlanarBox,1>::Construct )
+, SchemaEntry("ifcplane",&STEP::ObjectHelper<IfcPlane,0>::Construct )
+, SchemaEntry("ifcplate",&STEP::ObjectHelper<IfcPlate,1>::Construct )
+, SchemaEntry("ifcplatestandardcase",&STEP::ObjectHelper<IfcPlateStandardCase,0>::Construct )
+, SchemaEntry("ifcplatetype",&STEP::ObjectHelper<IfcPlateType,1>::Construct )
+, SchemaEntry("ifcpointoncurve",&STEP::ObjectHelper<IfcPointOnCurve,2>::Construct )
+, SchemaEntry("ifcpointonsurface",&STEP::ObjectHelper<IfcPointOnSurface,3>::Construct )
+, SchemaEntry("ifcpolyloop",&STEP::ObjectHelper<IfcPolyLoop,1>::Construct )
+, SchemaEntry("ifcpolygonalboundedhalfspace",&STEP::ObjectHelper<IfcPolygonalBoundedHalfSpace,2>::Construct )
+, SchemaEntry("ifctessellatedfaceset",&STEP::ObjectHelper<IfcTessellatedFaceSet,1>::Construct )
+, SchemaEntry("ifcpolygonalfaceset",&STEP::ObjectHelper<IfcPolygonalFaceSet,3>::Construct )
+, SchemaEntry("ifcpolyline",&STEP::ObjectHelper<IfcPolyline,1>::Construct )
+, SchemaEntry("ifcpostaladdress",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcpredefinedproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcpredefinedtextfont",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcpresentationlayerassignment",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcpresentationlayerwithstyle",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcpresentationstyleassignment",&STEP::ObjectHelper<IfcPresentationStyleAssignment,1>::Construct )
+, SchemaEntry("ifcprocedure",&STEP::ObjectHelper<IfcProcedure,1>::Construct )
+, SchemaEntry("ifcproceduretype",&STEP::ObjectHelper<IfcProcedureType,1>::Construct )
+, SchemaEntry("ifcproductdefinitionshape",&STEP::ObjectHelper<IfcProductDefinitionShape,0>::Construct )
+, SchemaEntry("ifcprofileproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcproject",&STEP::ObjectHelper<IfcProject,0>::Construct )
+, SchemaEntry("ifcprojectlibrary",&STEP::ObjectHelper<IfcProjectLibrary,0>::Construct )
+, SchemaEntry("ifcprojectorder",&STEP::ObjectHelper<IfcProjectOrder,3>::Construct )
+, SchemaEntry("ifcprojectedcrs",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcprojectionelement",&STEP::ObjectHelper<IfcProjectionElement,1>::Construct )
+, SchemaEntry("ifcsimpleproperty",&STEP::ObjectHelper<IfcSimpleProperty,0>::Construct )
+, SchemaEntry("ifcpropertyboundedvalue",&STEP::ObjectHelper<IfcPropertyBoundedValue,4>::Construct )
+, SchemaEntry("ifcpropertydependencyrelationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcpropertyenumeratedvalue",&STEP::ObjectHelper<IfcPropertyEnumeratedValue,2>::Construct )
+, SchemaEntry("ifcpropertyenumeration",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcpropertylistvalue",&STEP::ObjectHelper<IfcPropertyListValue,2>::Construct )
+, SchemaEntry("ifcpropertyreferencevalue",&STEP::ObjectHelper<IfcPropertyReferenceValue,2>::Construct )
+, SchemaEntry("ifcpropertyset",&STEP::ObjectHelper<IfcPropertySet,1>::Construct )
+, SchemaEntry("ifcpropertysettemplate",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcpropertysinglevalue",&STEP::ObjectHelper<IfcPropertySingleValue,2>::Construct )
+, SchemaEntry("ifcpropertytablevalue",&STEP::ObjectHelper<IfcPropertyTableValue,6>::Construct )
+, SchemaEntry("ifcprotectivedevice",&STEP::ObjectHelper<IfcProtectiveDevice,1>::Construct )
+, SchemaEntry("ifcprotectivedevicetrippingunit",&STEP::ObjectHelper<IfcProtectiveDeviceTrippingUnit,1>::Construct )
+, SchemaEntry("ifcprotectivedevicetrippingunittype",&STEP::ObjectHelper<IfcProtectiveDeviceTrippingUnitType,1>::Construct )
+, SchemaEntry("ifcprotectivedevicetype",&STEP::ObjectHelper<IfcProtectiveDeviceType,1>::Construct )
+, SchemaEntry("ifcproxy",&STEP::ObjectHelper<IfcProxy,2>::Construct )
+, SchemaEntry("ifcpump",&STEP::ObjectHelper<IfcPump,1>::Construct )
+, SchemaEntry("ifcpumptype",&STEP::ObjectHelper<IfcPumpType,1>::Construct )
+, SchemaEntry("ifcquantityarea",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcquantitycount",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcquantitylength",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcquantitytime",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcquantityvolume",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcquantityweight",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcrailing",&STEP::ObjectHelper<IfcRailing,1>::Construct )
+, SchemaEntry("ifcrailingtype",&STEP::ObjectHelper<IfcRailingType,1>::Construct )
+, SchemaEntry("ifcramp",&STEP::ObjectHelper<IfcRamp,1>::Construct )
+, SchemaEntry("ifcrampflight",&STEP::ObjectHelper<IfcRampFlight,1>::Construct )
+, SchemaEntry("ifcrampflighttype",&STEP::ObjectHelper<IfcRampFlightType,1>::Construct )
+, SchemaEntry("ifcramptype",&STEP::ObjectHelper<IfcRampType,1>::Construct )
+, SchemaEntry("ifcrationalbsplinecurvewithknots",&STEP::ObjectHelper<IfcRationalBSplineCurveWithKnots,1>::Construct )
+, SchemaEntry("ifcrationalbsplinesurfacewithknots",&STEP::ObjectHelper<IfcRationalBSplineSurfaceWithKnots,0>::Construct )
+, SchemaEntry("ifcrectangleprofiledef",&STEP::ObjectHelper<IfcRectangleProfileDef,2>::Construct )
+, SchemaEntry("ifcrectanglehollowprofiledef",&STEP::ObjectHelper<IfcRectangleHollowProfileDef,3>::Construct )
+, SchemaEntry("ifcrectangularpyramid",&STEP::ObjectHelper<IfcRectangularPyramid,3>::Construct )
+, SchemaEntry("ifcrectangulartrimmedsurface",&STEP::ObjectHelper<IfcRectangularTrimmedSurface,7>::Construct )
+, SchemaEntry("ifcrecurrencepattern",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcreference",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcregulartimeseries",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcreinforcementbarproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcreinforcementdefinitionproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcreinforcingelement",&STEP::ObjectHelper<IfcReinforcingElement,1>::Construct )
+, SchemaEntry("ifcreinforcingbar",&STEP::ObjectHelper<IfcReinforcingBar,5>::Construct )
+, SchemaEntry("ifcreinforcingelementtype",&STEP::ObjectHelper<IfcReinforcingElementType,0>::Construct )
+, SchemaEntry("ifcreinforcingbartype",&STEP::ObjectHelper<IfcReinforcingBarType,7>::Construct )
+, SchemaEntry("ifcreinforcingmesh",&STEP::ObjectHelper<IfcReinforcingMesh,9>::Construct )
+, SchemaEntry("ifcreinforcingmeshtype",&STEP::ObjectHelper<IfcReinforcingMeshType,11>::Construct )
+, SchemaEntry("ifcrelationship",&STEP::ObjectHelper<IfcRelationship,0>::Construct )
+, SchemaEntry("ifcreldecomposes",&STEP::ObjectHelper<IfcRelDecomposes,0>::Construct )
+, SchemaEntry("ifcrelaggregates",&STEP::ObjectHelper<IfcRelAggregates,2>::Construct )
+, SchemaEntry("ifcrelassigns",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcrelassignstoactor",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcrelassignstocontrol",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcrelassignstogroup",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcrelassignstogroupbyfactor",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcrelassignstoprocess",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcrelassignstoproduct",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcrelassignstoresource",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcrelassociates",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcrelassociatesapproval",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcrelassociatesclassification",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcrelassociatesconstraint",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcrelassociatesdocument",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcrelassociateslibrary",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcrelassociatesmaterial",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcrelconnects",&STEP::ObjectHelper<IfcRelConnects,0>::Construct )
+, SchemaEntry("ifcrelconnectselements",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcrelconnectspathelements",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcrelconnectsporttoelement",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcrelconnectsports",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcrelconnectsstructuralactivity",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcrelconnectsstructuralmember",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcrelconnectswitheccentricity",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcrelconnectswithrealizingelements",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcrelcontainedinspatialstructure",&STEP::ObjectHelper<IfcRelContainedInSpatialStructure,2>::Construct )
+, SchemaEntry("ifcrelcoversbldgelements",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcrelcoversspaces",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcreldeclares",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcreldefines",&STEP::ObjectHelper<IfcRelDefines,0>::Construct )
+, SchemaEntry("ifcreldefinesbyobject",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcreldefinesbyproperties",&STEP::ObjectHelper<IfcRelDefinesByProperties,2>::Construct )
+, SchemaEntry("ifcreldefinesbytemplate",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcreldefinesbytype",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcrelfillselement",&STEP::ObjectHelper<IfcRelFillsElement,2>::Construct )
+, SchemaEntry("ifcrelflowcontrolelements",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcrelinterfereselements",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcrelnests",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcrelprojectselement",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcrelreferencedinspatialstructure",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcrelsequence",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcrelservicesbuildings",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcrelspaceboundary",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcrelspaceboundary1stlevel",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcrelspaceboundary2ndlevel",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcrelvoidselement",&STEP::ObjectHelper<IfcRelVoidsElement,2>::Construct )
+, SchemaEntry("ifcreparametrisedcompositecurvesegment",&STEP::ObjectHelper<IfcReparametrisedCompositeCurveSegment,1>::Construct )
+, SchemaEntry("ifcrepresentation",&STEP::ObjectHelper<IfcRepresentation,4>::Construct )
+, SchemaEntry("ifcrepresentationmap",&STEP::ObjectHelper<IfcRepresentationMap,2>::Construct )
+, SchemaEntry("ifcresourceapprovalrelationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcresourceconstraintrelationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcresourcetime",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcrevolvedareasolid",&STEP::ObjectHelper<IfcRevolvedAreaSolid,2>::Construct )
+, SchemaEntry("ifcrevolvedareasolidtapered",&STEP::ObjectHelper<IfcRevolvedAreaSolidTapered,1>::Construct )
+, SchemaEntry("ifcrightcircularcone",&STEP::ObjectHelper<IfcRightCircularCone,2>::Construct )
+, SchemaEntry("ifcrightcircularcylinder",&STEP::ObjectHelper<IfcRightCircularCylinder,2>::Construct )
+, SchemaEntry("ifcroof",&STEP::ObjectHelper<IfcRoof,1>::Construct )
+, SchemaEntry("ifcrooftype",&STEP::ObjectHelper<IfcRoofType,1>::Construct )
+, SchemaEntry("ifcroundedrectangleprofiledef",&STEP::ObjectHelper<IfcRoundedRectangleProfileDef,1>::Construct )
+, SchemaEntry("ifcsiunit",&STEP::ObjectHelper<IfcSIUnit,2>::Construct )
+, SchemaEntry("ifcsanitaryterminal",&STEP::ObjectHelper<IfcSanitaryTerminal,1>::Construct )
+, SchemaEntry("ifcsanitaryterminaltype",&STEP::ObjectHelper<IfcSanitaryTerminalType,1>::Construct )
+, SchemaEntry("ifcseamcurve",&STEP::ObjectHelper<IfcSeamCurve,0>::Construct )
+, SchemaEntry("ifcsectionproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcsectionreinforcementproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcsectionedspine",&STEP::ObjectHelper<IfcSectionedSpine,3>::Construct )
+, SchemaEntry("ifcsensor",&STEP::ObjectHelper<IfcSensor,1>::Construct )
+, SchemaEntry("ifcsensortype",&STEP::ObjectHelper<IfcSensorType,1>::Construct )
+, SchemaEntry("ifcshadingdevice",&STEP::ObjectHelper<IfcShadingDevice,1>::Construct )
+, SchemaEntry("ifcshadingdevicetype",&STEP::ObjectHelper<IfcShadingDeviceType,1>::Construct )
+, SchemaEntry("ifcshapeaspect",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcshapemodel",&STEP::ObjectHelper<IfcShapeModel,0>::Construct )
+, SchemaEntry("ifcshaperepresentation",&STEP::ObjectHelper<IfcShapeRepresentation,0>::Construct )
+, SchemaEntry("ifcshellbasedsurfacemodel",&STEP::ObjectHelper<IfcShellBasedSurfaceModel,1>::Construct )
+, SchemaEntry("ifcsimplepropertytemplate",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcsite",&STEP::ObjectHelper<IfcSite,5>::Construct )
+, SchemaEntry("ifcslab",&STEP::ObjectHelper<IfcSlab,1>::Construct )
+, SchemaEntry("ifcslabelementedcase",&STEP::ObjectHelper<IfcSlabElementedCase,0>::Construct )
+, SchemaEntry("ifcslabstandardcase",&STEP::ObjectHelper<IfcSlabStandardCase,0>::Construct )
+, SchemaEntry("ifcslabtype",&STEP::ObjectHelper<IfcSlabType,1>::Construct )
+, SchemaEntry("ifcslippageconnectioncondition",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcsolardevice",&STEP::ObjectHelper<IfcSolarDevice,1>::Construct )
+, SchemaEntry("ifcsolardevicetype",&STEP::ObjectHelper<IfcSolarDeviceType,1>::Construct )
+, SchemaEntry("ifcspace",&STEP::ObjectHelper<IfcSpace,2>::Construct )
+, SchemaEntry("ifcspaceheater",&STEP::ObjectHelper<IfcSpaceHeater,1>::Construct )
+, SchemaEntry("ifcspaceheatertype",&STEP::ObjectHelper<IfcSpaceHeaterType,1>::Construct )
+, SchemaEntry("ifcspatialelementtype",&STEP::ObjectHelper<IfcSpatialElementType,1>::Construct )
+, SchemaEntry("ifcspatialstructureelementtype",&STEP::ObjectHelper<IfcSpatialStructureElementType,0>::Construct )
+, SchemaEntry("ifcspacetype",&STEP::ObjectHelper<IfcSpaceType,2>::Construct )
+, SchemaEntry("ifcspatialzone",&STEP::ObjectHelper<IfcSpatialZone,1>::Construct )
+, SchemaEntry("ifcspatialzonetype",&STEP::ObjectHelper<IfcSpatialZoneType,2>::Construct )
+, SchemaEntry("ifcsphere",&STEP::ObjectHelper<IfcSphere,1>::Construct )
+, SchemaEntry("ifcsphericalsurface",&STEP::ObjectHelper<IfcSphericalSurface,1>::Construct )
+, SchemaEntry("ifcstackterminal",&STEP::ObjectHelper<IfcStackTerminal,1>::Construct )
+, SchemaEntry("ifcstackterminaltype",&STEP::ObjectHelper<IfcStackTerminalType,1>::Construct )
+, SchemaEntry("ifcstair",&STEP::ObjectHelper<IfcStair,1>::Construct )
+, SchemaEntry("ifcstairflight",&STEP::ObjectHelper<IfcStairFlight,5>::Construct )
+, SchemaEntry("ifcstairflighttype",&STEP::ObjectHelper<IfcStairFlightType,1>::Construct )
+, SchemaEntry("ifcstairtype",&STEP::ObjectHelper<IfcStairType,1>::Construct )
+, SchemaEntry("ifcstructuralactivity",&STEP::ObjectHelper<IfcStructuralActivity,2>::Construct )
+, SchemaEntry("ifcstructuralaction",&STEP::ObjectHelper<IfcStructuralAction,1>::Construct )
+, SchemaEntry("ifcstructuralanalysismodel",&STEP::ObjectHelper<IfcStructuralAnalysisModel,5>::Construct )
+, SchemaEntry("ifcstructuralitem",&STEP::ObjectHelper<IfcStructuralItem,0>::Construct )
+, SchemaEntry("ifcstructuralconnection",&STEP::ObjectHelper<IfcStructuralConnection,1>::Construct )
+, SchemaEntry("ifcstructuralcurveaction",&STEP::ObjectHelper<IfcStructuralCurveAction,2>::Construct )
+, SchemaEntry("ifcstructuralcurveconnection",&STEP::ObjectHelper<IfcStructuralCurveConnection,1>::Construct )
+, SchemaEntry("ifcstructuralmember",&STEP::ObjectHelper<IfcStructuralMember,0>::Construct )
+, SchemaEntry("ifcstructuralcurvemember",&STEP::ObjectHelper<IfcStructuralCurveMember,2>::Construct )
+, SchemaEntry("ifcstructuralcurvemembervarying",&STEP::ObjectHelper<IfcStructuralCurveMemberVarying,0>::Construct )
+, SchemaEntry("ifcstructuralreaction",&STEP::ObjectHelper<IfcStructuralReaction,0>::Construct )
+, SchemaEntry("ifcstructuralcurvereaction",&STEP::ObjectHelper<IfcStructuralCurveReaction,1>::Construct )
+, SchemaEntry("ifcstructurallinearaction",&STEP::ObjectHelper<IfcStructuralLinearAction,0>::Construct )
+, SchemaEntry("ifcstructuralload",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcstructuralloadgroup",&STEP::ObjectHelper<IfcStructuralLoadGroup,5>::Construct )
+, SchemaEntry("ifcstructuralloadcase",&STEP::ObjectHelper<IfcStructuralLoadCase,1>::Construct )
+, SchemaEntry("ifcstructuralloadconfiguration",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcstructuralloadorresult",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcstructuralloadstatic",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcstructuralloadlinearforce",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcstructuralloadplanarforce",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcstructuralloadsingledisplacement",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcstructuralloadsingledisplacementdistortion",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcstructuralloadsingleforce",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcstructuralloadsingleforcewarping",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcstructuralloadtemperature",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcstructuralsurfaceaction",&STEP::ObjectHelper<IfcStructuralSurfaceAction,2>::Construct )
+, SchemaEntry("ifcstructuralplanaraction",&STEP::ObjectHelper<IfcStructuralPlanarAction,0>::Construct )
+, SchemaEntry("ifcstructuralpointaction",&STEP::ObjectHelper<IfcStructuralPointAction,0>::Construct )
+, SchemaEntry("ifcstructuralpointconnection",&STEP::ObjectHelper<IfcStructuralPointConnection,1>::Construct )
+, SchemaEntry("ifcstructuralpointreaction",&STEP::ObjectHelper<IfcStructuralPointReaction,0>::Construct )
+, SchemaEntry("ifcstructuralresultgroup",&STEP::ObjectHelper<IfcStructuralResultGroup,3>::Construct )
+, SchemaEntry("ifcstructuralsurfaceconnection",&STEP::ObjectHelper<IfcStructuralSurfaceConnection,0>::Construct )
+, SchemaEntry("ifcstructuralsurfacemember",&STEP::ObjectHelper<IfcStructuralSurfaceMember,2>::Construct )
+, SchemaEntry("ifcstructuralsurfacemembervarying",&STEP::ObjectHelper<IfcStructuralSurfaceMemberVarying,0>::Construct )
+, SchemaEntry("ifcstructuralsurfacereaction",&STEP::ObjectHelper<IfcStructuralSurfaceReaction,1>::Construct )
+, SchemaEntry("ifcstylemodel",&STEP::ObjectHelper<IfcStyleModel,0>::Construct )
+, SchemaEntry("ifcstyleditem",&STEP::ObjectHelper<IfcStyledItem,3>::Construct )
+, SchemaEntry("ifcstyledrepresentation",&STEP::ObjectHelper<IfcStyledRepresentation,0>::Construct )
+, SchemaEntry("ifcsubcontractresource",&STEP::ObjectHelper<IfcSubContractResource,1>::Construct )
+, SchemaEntry("ifcsubcontractresourcetype",&STEP::ObjectHelper<IfcSubContractResourceType,1>::Construct )
+, SchemaEntry("ifcsubedge",&STEP::ObjectHelper<IfcSubedge,1>::Construct )
+, SchemaEntry("ifcsurfacecurvesweptareasolid",&STEP::ObjectHelper<IfcSurfaceCurveSweptAreaSolid,4>::Construct )
+, SchemaEntry("ifcsurfacefeature",&STEP::ObjectHelper<IfcSurfaceFeature,1>::Construct )
+, SchemaEntry("ifcsweptsurface",&STEP::ObjectHelper<IfcSweptSurface,2>::Construct )
+, SchemaEntry("ifcsurfaceoflinearextrusion",&STEP::ObjectHelper<IfcSurfaceOfLinearExtrusion,2>::Construct )
+, SchemaEntry("ifcsurfaceofrevolution",&STEP::ObjectHelper<IfcSurfaceOfRevolution,1>::Construct )
+, SchemaEntry("ifcsurfacereinforcementarea",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcsurfacestyle",&STEP::ObjectHelper<IfcSurfaceStyle,2>::Construct )
+, SchemaEntry("ifcsurfacestylelighting",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcsurfacestylerefraction",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcsurfacestyleshading",&STEP::ObjectHelper<IfcSurfaceStyleShading,2>::Construct )
+, SchemaEntry("ifcsurfacestylerendering",&STEP::ObjectHelper<IfcSurfaceStyleRendering,7>::Construct )
+, SchemaEntry("ifcsurfacestylewithtextures",&STEP::ObjectHelper<IfcSurfaceStyleWithTextures,1>::Construct )
+, SchemaEntry("ifcsweptdisksolid",&STEP::ObjectHelper<IfcSweptDiskSolid,5>::Construct )
+, SchemaEntry("ifcsweptdisksolidpolygonal",&STEP::ObjectHelper<IfcSweptDiskSolidPolygonal,1>::Construct )
+, SchemaEntry("ifcswitchingdevice",&STEP::ObjectHelper<IfcSwitchingDevice,1>::Construct )
+, SchemaEntry("ifcswitchingdevicetype",&STEP::ObjectHelper<IfcSwitchingDeviceType,1>::Construct )
+, SchemaEntry("ifcsystemfurnitureelement",&STEP::ObjectHelper<IfcSystemFurnitureElement,1>::Construct )
+, SchemaEntry("ifcsystemfurnitureelementtype",&STEP::ObjectHelper<IfcSystemFurnitureElementType,1>::Construct )
+, SchemaEntry("ifctshapeprofiledef",&STEP::ObjectHelper<IfcTShapeProfileDef,9>::Construct )
+, SchemaEntry("ifctable",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifctablecolumn",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifctablerow",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifctank",&STEP::ObjectHelper<IfcTank,1>::Construct )
+, SchemaEntry("ifctanktype",&STEP::ObjectHelper<IfcTankType,1>::Construct )
+, SchemaEntry("ifctask",&STEP::ObjectHelper<IfcTask,6>::Construct )
+, SchemaEntry("ifctasktime",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifctasktimerecurring",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifctasktype",&STEP::ObjectHelper<IfcTaskType,2>::Construct )
+, SchemaEntry("ifctelecomaddress",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifctendon",&STEP::ObjectHelper<IfcTendon,8>::Construct )
+, SchemaEntry("ifctendonanchor",&STEP::ObjectHelper<IfcTendonAnchor,1>::Construct )
+, SchemaEntry("ifctendonanchortype",&STEP::ObjectHelper<IfcTendonAnchorType,1>::Construct )
+, SchemaEntry("ifctendontype",&STEP::ObjectHelper<IfcTendonType,4>::Construct )
+, SchemaEntry("ifctextliteral",&STEP::ObjectHelper<IfcTextLiteral,3>::Construct )
+, SchemaEntry("ifctextliteralwithextent",&STEP::ObjectHelper<IfcTextLiteralWithExtent,2>::Construct )
+, SchemaEntry("ifctextstyle",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifctextstylefontmodel",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifctextstylefordefinedfont",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifctextstyletextmodel",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifctexturecoordinategenerator",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifctexturemap",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifctexturevertex",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifctexturevertexlist",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifctimeperiod",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifctimeseriesvalue",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifctopologyrepresentation",&STEP::ObjectHelper<IfcTopologyRepresentation,0>::Construct )
+, SchemaEntry("ifctoroidalsurface",&STEP::ObjectHelper<IfcToroidalSurface,2>::Construct )
+, SchemaEntry("ifctransformer",&STEP::ObjectHelper<IfcTransformer,1>::Construct )
+, SchemaEntry("ifctransformertype",&STEP::ObjectHelper<IfcTransformerType,1>::Construct )
+, SchemaEntry("ifctransportelement",&STEP::ObjectHelper<IfcTransportElement,1>::Construct )
+, SchemaEntry("ifctransportelementtype",&STEP::ObjectHelper<IfcTransportElementType,1>::Construct )
+, SchemaEntry("ifctrapeziumprofiledef",&STEP::ObjectHelper<IfcTrapeziumProfileDef,4>::Construct )
+, SchemaEntry("ifctriangulatedfaceset",&STEP::ObjectHelper<IfcTriangulatedFaceSet,2>::Construct )
+, SchemaEntry("ifctrimmedcurve",&STEP::ObjectHelper<IfcTrimmedCurve,5>::Construct )
+, SchemaEntry("ifctubebundle",&STEP::ObjectHelper<IfcTubeBundle,1>::Construct )
+, SchemaEntry("ifctubebundletype",&STEP::ObjectHelper<IfcTubeBundleType,1>::Construct )
+, SchemaEntry("ifcushapeprofiledef",&STEP::ObjectHelper<IfcUShapeProfileDef,7>::Construct )
+, SchemaEntry("ifcunitassignment",&STEP::ObjectHelper<IfcUnitAssignment,1>::Construct )
+, SchemaEntry("ifcunitarycontrolelement",&STEP::ObjectHelper<IfcUnitaryControlElement,1>::Construct )
+, SchemaEntry("ifcunitarycontrolelementtype",&STEP::ObjectHelper<IfcUnitaryControlElementType,1>::Construct )
+, SchemaEntry("ifcunitaryequipment",&STEP::ObjectHelper<IfcUnitaryEquipment,1>::Construct )
+, SchemaEntry("ifcunitaryequipmenttype",&STEP::ObjectHelper<IfcUnitaryEquipmentType,1>::Construct )
+, SchemaEntry("ifcvalve",&STEP::ObjectHelper<IfcValve,1>::Construct )
+, SchemaEntry("ifcvalvetype",&STEP::ObjectHelper<IfcValveType,1>::Construct )
+, SchemaEntry("ifcvector",&STEP::ObjectHelper<IfcVector,2>::Construct )
+, SchemaEntry("ifcvertex",&STEP::ObjectHelper<IfcVertex,0>::Construct )
+, SchemaEntry("ifcvertexloop",&STEP::ObjectHelper<IfcVertexLoop,1>::Construct )
+, SchemaEntry("ifcvertexpoint",&STEP::ObjectHelper<IfcVertexPoint,1>::Construct )
+, SchemaEntry("ifcvibrationisolator",&STEP::ObjectHelper<IfcVibrationIsolator,1>::Construct )
+, SchemaEntry("ifcvibrationisolatortype",&STEP::ObjectHelper<IfcVibrationIsolatorType,1>::Construct )
+, SchemaEntry("ifcvirtualelement",&STEP::ObjectHelper<IfcVirtualElement,0>::Construct )
+, SchemaEntry("ifcvirtualgridintersection",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcvoidingfeature",&STEP::ObjectHelper<IfcVoidingFeature,1>::Construct )
+, SchemaEntry("ifcwall",&STEP::ObjectHelper<IfcWall,1>::Construct )
+, SchemaEntry("ifcwallelementedcase",&STEP::ObjectHelper<IfcWallElementedCase,0>::Construct )
+, SchemaEntry("ifcwallstandardcase",&STEP::ObjectHelper<IfcWallStandardCase,0>::Construct )
+, SchemaEntry("ifcwalltype",&STEP::ObjectHelper<IfcWallType,1>::Construct )
+, SchemaEntry("ifcwasteterminal",&STEP::ObjectHelper<IfcWasteTerminal,1>::Construct )
+, SchemaEntry("ifcwasteterminaltype",&STEP::ObjectHelper<IfcWasteTerminalType,1>::Construct )
+, SchemaEntry("ifcwindow",&STEP::ObjectHelper<IfcWindow,5>::Construct )
+, SchemaEntry("ifcwindowliningproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcwindowpanelproperties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifcwindowstandardcase",&STEP::ObjectHelper<IfcWindowStandardCase,0>::Construct )
+, SchemaEntry("ifcwindowstyle",&STEP::ObjectHelper<IfcWindowStyle,4>::Construct )
+, SchemaEntry("ifcwindowtype",&STEP::ObjectHelper<IfcWindowType,4>::Construct )
+, SchemaEntry("ifcworkcalendar",&STEP::ObjectHelper<IfcWorkCalendar,3>::Construct )
+, SchemaEntry("ifcworkcontrol",&STEP::ObjectHelper<IfcWorkControl,7>::Construct )
+, SchemaEntry("ifcworkplan",&STEP::ObjectHelper<IfcWorkPlan,1>::Construct )
+, SchemaEntry("ifcworkschedule",&STEP::ObjectHelper<IfcWorkSchedule,1>::Construct )
+, SchemaEntry("ifcworktime",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ifczshapeprofiledef",&STEP::ObjectHelper<IfcZShapeProfileDef,6>::Construct )
+, SchemaEntry("ifczone",&STEP::ObjectHelper<IfcZone,1>::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; }
+ if (dynamic_cast<const UNSET*>(&*arg)) 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<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<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<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<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<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<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<IfcActuator>(const DB& db, const LIST& params, IfcActuator* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcDistributionControlElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ 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<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<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<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<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<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<IfcAdvancedBrep>(const DB& db, const LIST& params, IfcAdvancedBrep* 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<IfcAdvancedBrepWithVoids>(const DB& db, const LIST& params, IfcAdvancedBrepWithVoids* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcAdvancedBrep*>(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<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<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<IfcAdvancedFace>(const DB& db, const LIST& params, IfcAdvancedFace* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcFaceSurface*>(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<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<IfcAirTerminal>(const DB& db, const LIST& params, IfcAirTerminal* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcFlowTerminal*>(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<IfcAirTerminalBox>(const DB& db, const LIST& params, IfcAirTerminalBox* 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<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<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<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<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<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<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<IfcAirToAirHeatRecovery>(const DB& db, const LIST& params, IfcAirToAirHeatRecovery* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcEnergyConversionDevice*>(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<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<IfcAlarm>(const DB& db, const LIST& params, IfcAlarm* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcDistributionControlElement*>(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<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<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<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<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<IfcArbitraryProfileDefWithVoids>(const DB& db, const LIST& params, IfcArbitraryProfileDefWithVoids* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcArbitraryClosedProfileDef*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to IfcArbitraryProfileDefWithVoids"); } do { // convert the 'InnerCurves' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert( in->InnerCurves, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcArbitraryProfileDefWithVoids to be a `SET [1:?] OF IfcCurve`")); }
+ } while(0);
+ 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<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<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; }
+ if (dynamic_cast<const UNSET*>(&*arg)) 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<IfcAsymmetricIShapeProfileDef>(const DB& db, const LIST& params, IfcAsymmetricIShapeProfileDef* 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<IfcAudioVisualAppliance>(const DB& db, const LIST& params, IfcAudioVisualAppliance* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcFlowTerminal*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcAudioVisualApplianceType>(const DB& db, const LIST& params, IfcAudioVisualApplianceType* 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<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<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<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<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<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<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<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 `IfcInteger`")); }
+ } 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 `IfcLogical`")); }
+ } 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 `IfcLogical`")); }
+ } while(0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcBSplineCurveWithKnots>(const DB& db, const LIST& params, IfcBSplineCurveWithKnots* 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<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<IfcBSplineSurface>(const DB& db, const LIST& params, IfcBSplineSurface* 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<IfcBSplineSurfaceWithKnots>(const DB& db, const LIST& params, IfcBSplineSurfaceWithKnots* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcBSplineSurface*>(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<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<IfcBeamStandardCase>(const DB& db, const LIST& params, IfcBeamStandardCase* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcBeam*>(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<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<IfcPresentationItem>(const DB& db, const LIST& params, IfcPresentationItem* in)
+{
+ size_t base = 0;
+ 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<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<IfcBoiler>(const DB& db, const LIST& params, IfcBoiler* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcEnergyConversionDevice*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ 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<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<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<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 `IfcLogical`")); }
+ } while(0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCompositeCurveOnSurface>(const DB& db, const LIST& params, IfcCompositeCurveOnSurface* 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<IfcBoundaryCurve>(const DB& db, const LIST& params, IfcBoundaryCurve* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcCompositeCurveOnSurface*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ 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<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 `IfcBoolean`")); }
+ } 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<IfcSpatialElement>(const DB& db, const LIST& params, IfcSpatialElement* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcProduct*>(in));
+ if (params.GetSize() < 8) { throw STEP::TypeError("expected 8 arguments to IfcSpatialElement"); } do { // convert the 'LongName' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcSpatialElement,1>::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 IfcSpatialElement to be a `IfcLabel`")); }
+ } while(0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcSpatialStructureElement>(const DB& db, const LIST& params, IfcSpatialStructureElement* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcSpatialElement*>(in));
+ if (params.GetSize() < 9) { throw STEP::TypeError("expected 9 arguments to IfcSpatialStructureElement"); } do { // convert the 'CompositionType' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcSpatialStructureElement,1>::aux_is_derived[0]=true; break; }
+ if (dynamic_cast<const UNSET*>(&*arg)) 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<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<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<IfcBuildingElementPart>(const DB& db, const LIST& params, IfcBuildingElementPart* 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<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<IfcBuildingElementPartType>(const DB& db, const LIST& params, IfcBuildingElementPartType* 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<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<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<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<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<IfcBuildingSystem>(const DB& db, const LIST& params, IfcBuildingSystem* 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<IfcBurner>(const DB& db, const LIST& params, IfcBurner* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcEnergyConversionDevice*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcBurnerType>(const DB& db, const LIST& params, IfcBurnerType* 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<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<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<IfcCableCarrierFitting>(const DB& db, const LIST& params, IfcCableCarrierFitting* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcFlowFitting*>(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<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<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<IfcCableCarrierSegment>(const DB& db, const LIST& params, IfcCableCarrierSegment* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcFlowSegment*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ 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<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<IfcCableFitting>(const DB& db, const LIST& params, IfcCableFitting* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcFlowFitting*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCableFittingType>(const DB& db, const LIST& params, IfcCableFittingType* 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<IfcCableSegment>(const DB& db, const LIST& params, IfcCableSegment* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcFlowSegment*>(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<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<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<IfcCartesianPointList>(const DB& db, const LIST& params, IfcCartesianPointList* 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<IfcCartesianPointList2D>(const DB& db, const LIST& params, IfcCartesianPointList2D* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcCartesianPointList*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCartesianPointList3D>(const DB& db, const LIST& params, IfcCartesianPointList3D* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcCartesianPointList*>(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 `IfcReal`")); }
+ } while(0);
+ 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<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 `IfcReal`")); }
+ } 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 `IfcReal`")); }
+ } 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<IfcChiller>(const DB& db, const LIST& params, IfcChiller* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcEnergyConversionDevice*>(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<IfcChimney>(const DB& db, const LIST& params, IfcChimney* 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<IfcChimneyType>(const DB& db, const LIST& params, IfcChimneyType* 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<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<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<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<IfcCivilElement>(const DB& db, const LIST& params, IfcCivilElement* 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<IfcCivilElementType>(const DB& db, const LIST& params, IfcCivilElementType* 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<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<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<IfcCoil>(const DB& db, const LIST& params, IfcCoil* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcEnergyConversionDevice*>(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<IfcColourSpecification>(const DB& db, const LIST& params, IfcColourSpecification* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcPresentationItem*>(in));
+ 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<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<IfcColumnStandardCase>(const DB& db, const LIST& params, IfcColumnStandardCase* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcColumn*>(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<IfcCommunicationsAppliance>(const DB& db, const LIST& params, IfcCommunicationsAppliance* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcFlowTerminal*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCommunicationsApplianceType>(const DB& db, const LIST& params, IfcCommunicationsApplianceType* 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<IfcPropertyAbstraction>(const DB& db, const LIST& params, IfcPropertyAbstraction* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcProperty>(const DB& db, const LIST& params, IfcProperty* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcPropertyAbstraction*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to IfcProperty"); } do { // convert the 'Name' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcProperty,2>::aux_is_derived[0]=true; break; }
+ try { GenericConvert( in->Name, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcProperty to be a `IfcIdentifier`")); }
+ } 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::IfcProperty,2>::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 IfcProperty to be a `IfcText`")); }
+ } while(0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcComplexProperty>(const DB& db, const LIST& params, IfcComplexProperty* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcProperty*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to IfcComplexProperty"); } do { // convert the 'UsageName' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert( in->UsageName, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcComplexProperty to be a `IfcIdentifier`")); }
+ } while(0);
+ do { // convert the 'HasProperties' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert( in->HasProperties, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcComplexProperty to be a `SET [1:?] OF IfcProperty`")); }
+ } while(0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcPropertyDefinition>(const DB& db, const LIST& params, IfcPropertyDefinition* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcRoot*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to IfcPropertyDefinition"); } 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++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcCompositeCurveSegment,3>::aux_is_derived[0]=true; break; }
+ 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++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcCompositeCurveSegment,3>::aux_is_derived[1]=true; break; }
+ 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 `IfcBoolean`")); }
+ } while(0);
+ do { // convert the 'ParentCurve' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcCompositeCurveSegment,3>::aux_is_derived[2]=true; break; }
+ 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<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<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<IfcCompressor>(const DB& db, const LIST& params, IfcCompressor* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcFlowMovingDevice*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ 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<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<IfcCondenser>(const DB& db, const LIST& params, IfcCondenser* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcEnergyConversionDevice*>(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<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<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<IfcTypeResource>(const DB& db, const LIST& params, IfcTypeResource* 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<IfcConstructionResourceType>(const DB& db, const LIST& params, IfcConstructionResourceType* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcTypeResource*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcConstructionEquipmentResourceType>(const DB& db, const LIST& params, IfcConstructionEquipmentResourceType* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcConstructionResourceType*>(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<IfcConstructionMaterialResourceType>(const DB& db, const LIST& params, IfcConstructionMaterialResourceType* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcConstructionResourceType*>(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<IfcConstructionProductResourceType>(const DB& db, const LIST& params, IfcConstructionProductResourceType* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcConstructionResourceType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcContext>(const DB& db, const LIST& params, IfcContext* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcObjectDefinition*>(in));
+ if (params.GetSize() < 9) { throw STEP::TypeError("expected 9 arguments to IfcContext"); } do { // convert the 'ObjectType' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcContext,5>::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 IfcContext to be a `IfcLabel`")); }
+ } while(0);
+ do { // convert the 'LongName' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcContext,5>::aux_is_derived[1]=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 5 to IfcContext to be a `IfcLabel`")); }
+ } while(0);
+ do { // convert the 'Phase' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcContext,5>::aux_is_derived[2]=true; break; }
+ 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 IfcContext to be a `IfcLabel`")); }
+ } while(0);
+ do { // convert the 'RepresentationContexts' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcContext,5>::aux_is_derived[3]=true; break; }
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert( in->RepresentationContexts, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to IfcContext to be a `SET [1:?] OF IfcRepresentationContext`")); }
+ } while(0);
+ do { // convert the 'UnitsInContext' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcContext,5>::aux_is_derived[4]=true; break; }
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert( in->UnitsInContext, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 8 to IfcContext to be a `IfcUnitAssignment`")); }
+ } while(0);
+ 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<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<IfcController>(const DB& db, const LIST& params, IfcController* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcDistributionControlElement*>(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<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++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcConversionBasedUnit,2>::aux_is_derived[0]=true; break; }
+ 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++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcConversionBasedUnit,2>::aux_is_derived[1]=true; break; }
+ 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<IfcConversionBasedUnitWithOffset>(const DB& db, const LIST& params, IfcConversionBasedUnitWithOffset* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcConversionBasedUnit*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcCooledBeam>(const DB& db, const LIST& params, IfcCooledBeam* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcEnergyConversionDevice*>(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<IfcCoolingTower>(const DB& db, const LIST& params, IfcCoolingTower* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcEnergyConversionDevice*>(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<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<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<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<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<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<IfcCrewResourceType>(const DB& db, const LIST& params, IfcCrewResourceType* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcConstructionResourceType*>(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<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<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<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<IfcCurveBoundedSurface>(const DB& db, const LIST& params, IfcCurveBoundedSurface* 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<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<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<IfcCylindricalSurface>(const DB& db, const LIST& params, IfcCylindricalSurface* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcElementarySurface*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcDamper>(const DB& db, const LIST& params, IfcDamper* 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<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<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<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 IfcReal`")); }
+ } while(0);
+ 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<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<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<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<IfcDistributionSystem>(const DB& db, const LIST& params, IfcDistributionSystem* 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<IfcDistributionCircuit>(const DB& db, const LIST& params, IfcDistributionCircuit* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcDistributionSystem*>(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<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<IfcDoor>(const DB& db, const LIST& params, IfcDoor* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcBuildingElement*>(in));
+ if (params.GetSize() < 13) { throw STEP::TypeError("expected 13 arguments to IfcDoor"); } do { // convert the 'OverallHeight' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcDoor,5>::aux_is_derived[0]=true; break; }
+ 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 ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcDoor,5>::aux_is_derived[1]=true; break; }
+ 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);
+ do { // convert the 'PredefinedType' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcDoor,5>::aux_is_derived[2]=true; break; }
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert( in->PredefinedType, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 10 to IfcDoor to be a `IfcDoorTypeEnum`")); }
+ } while(0);
+ do { // convert the 'OperationType' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcDoor,5>::aux_is_derived[3]=true; break; }
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert( in->OperationType, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 11 to IfcDoor to be a `IfcDoorTypeOperationEnum`")); }
+ } while(0);
+ do { // convert the 'UserDefinedOperationType' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcDoor,5>::aux_is_derived[4]=true; break; }
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert( in->UserDefinedOperationType, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 12 to IfcDoor to be a `IfcLabel`")); }
+ } while(0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcPropertySetDefinition>(const DB& db, const LIST& params, IfcPropertySetDefinition* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcPropertyDefinition*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to IfcPropertySetDefinition"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcDoorStandardCase>(const DB& db, const LIST& params, IfcDoorStandardCase* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcDoor*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ 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<IfcDoorType>(const DB& db, const LIST& params, IfcDoorType* 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<IfcDuctFitting>(const DB& db, const LIST& params, IfcDuctFitting* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcFlowFitting*>(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<IfcDuctSegment>(const DB& db, const LIST& params, IfcDuctSegment* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcFlowSegment*>(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<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<IfcDuctSilencer>(const DB& db, const LIST& params, IfcDuctSilencer* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcFlowTreatmentDevice*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ 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<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<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<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<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<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<IfcElectricAppliance>(const DB& db, const LIST& params, IfcElectricAppliance* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcFlowTerminal*>(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<IfcElectricDistributionBoard>(const DB& db, const LIST& params, IfcElectricDistributionBoard* 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<IfcElectricDistributionBoardType>(const DB& db, const LIST& params, IfcElectricDistributionBoardType* 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<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<IfcElectricFlowStorageDevice>(const DB& db, const LIST& params, IfcElectricFlowStorageDevice* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcFlowStorageDevice*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ 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<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<IfcElectricGenerator>(const DB& db, const LIST& params, IfcElectricGenerator* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcEnergyConversionDevice*>(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<IfcElectricMotor>(const DB& db, const LIST& params, IfcElectricMotor* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcEnergyConversionDevice*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ 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<IfcElectricTimeControl>(const DB& db, const LIST& params, IfcElectricTimeControl* 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<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<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<IfcElementAssemblyType>(const DB& db, const LIST& params, IfcElementAssemblyType* 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<IfcQuantitySet>(const DB& db, const LIST& params, IfcQuantitySet* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcPropertySetDefinition*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to IfcQuantitySet"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcElementQuantity>(const DB& db, const LIST& params, IfcElementQuantity* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcQuantitySet*>(in));
+ if (params.GetSize() < 6) { throw STEP::TypeError("expected 6 arguments to IfcElementQuantity"); } do { // convert the 'MethodOfMeasurement' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert( in->MethodOfMeasurement, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcElementQuantity to be a `IfcLabel`")); }
+ } while(0);
+ do { // convert the 'Quantities' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert( in->Quantities, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to IfcElementQuantity to be a `SET [1:?] OF IfcPhysicalQuantity`")); }
+ } 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<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<IfcEngine>(const DB& db, const LIST& params, IfcEngine* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcEnergyConversionDevice*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcEngineType>(const DB& db, const LIST& params, IfcEngineType* 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<IfcEvaporativeCooler>(const DB& db, const LIST& params, IfcEvaporativeCooler* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcEnergyConversionDevice*>(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<IfcEvaporator>(const DB& db, const LIST& params, IfcEvaporator* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcEnergyConversionDevice*>(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<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<IfcEvent>(const DB& db, const LIST& params, IfcEvent* 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<IfcTypeProcess>(const DB& db, const LIST& params, IfcTypeProcess* 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<IfcEventType>(const DB& db, const LIST& params, IfcEventType* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcTypeProcess*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcExternalSpatialStructureElement>(const DB& db, const LIST& params, IfcExternalSpatialStructureElement* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcSpatialElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcExternalSpatialElement>(const DB& db, const LIST& params, IfcExternalSpatialElement* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcExternalSpatialStructureElement*>(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; }
+ if (dynamic_cast<const UNSET*>(&*arg)) 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++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcExtrudedAreaSolid,2>::aux_is_derived[0]=true; break; }
+ 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++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcExtrudedAreaSolid,2>::aux_is_derived[1]=true; break; }
+ 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<IfcExtrudedAreaSolidTapered>(const DB& db, const LIST& params, IfcExtrudedAreaSolidTapered* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcExtrudedAreaSolid*>(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<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 `IfcBoolean`")); }
+ } 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<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<IfcFacetedBrepWithVoids>(const DB& db, const LIST& params, IfcFacetedBrepWithVoids* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcFacetedBrep*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcFan>(const DB& db, const LIST& params, IfcFan* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcFlowMovingDevice*>(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<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<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<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<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<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<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<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<IfcFilter>(const DB& db, const LIST& params, IfcFilter* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcFlowTreatmentDevice*>(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<IfcFireSuppressionTerminal>(const DB& db, const LIST& params, IfcFireSuppressionTerminal* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcFlowTerminal*>(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<IfcFixedReferenceSweptAreaSolid>(const DB& db, const LIST& params, IfcFixedReferenceSweptAreaSolid* 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<IfcFlowInstrument>(const DB& db, const LIST& params, IfcFlowInstrument* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcDistributionControlElement*>(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<IfcFlowMeter>(const DB& db, const LIST& params, IfcFlowMeter* 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<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<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<IfcFootingType>(const DB& db, const LIST& params, IfcFootingType* 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<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<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<IfcFurniture>(const DB& db, const LIST& params, IfcFurniture* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcFurnishingElement*>(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<IfcGeographicElement>(const DB& db, const LIST& params, IfcGeographicElement* 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<IfcGeographicElementType>(const DB& db, const LIST& params, IfcGeographicElementType* 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<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<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<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 `IfcReal`")); }
+ } 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<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<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<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<IfcHeatExchanger>(const DB& db, const LIST& params, IfcHeatExchanger* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcEnergyConversionDevice*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ 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<IfcHumidifier>(const DB& db, const LIST& params, IfcHumidifier* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcEnergyConversionDevice*>(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<IfcIShapeProfileDef>(const DB& db, const LIST& params, IfcIShapeProfileDef* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcParameterizedProfileDef*>(in));
+ if (params.GetSize() < 10) { throw STEP::TypeError("expected 10 arguments to IfcIShapeProfileDef"); } do { // convert the 'OverallWidth' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert( in->OverallWidth, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcIShapeProfileDef to be a `IfcPositiveLengthMeasure`")); }
+ } while(0);
+ do { // convert the 'OverallDepth' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert( in->OverallDepth, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcIShapeProfileDef to be a `IfcPositiveLengthMeasure`")); }
+ } while(0);
+ do { // convert the 'WebThickness' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert( in->WebThickness, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to IfcIShapeProfileDef to be a `IfcPositiveLengthMeasure`")); }
+ } while(0);
+ do { // convert the 'FlangeThickness' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert( in->FlangeThickness, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to IfcIShapeProfileDef to be a `IfcPositiveLengthMeasure`")); }
+ } while(0);
+ do { // convert the 'FilletRadius' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert( in->FilletRadius, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to IfcIShapeProfileDef to be a `IfcNonNegativeLengthMeasure`")); }
+ } while(0);
+ do { // convert the 'FlangeEdgeRadius' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert( in->FlangeEdgeRadius, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 8 to IfcIShapeProfileDef to be a `IfcNonNegativeLengthMeasure`")); }
+ } while(0);
+ do { // convert the 'FlangeSlope' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert( in->FlangeSlope, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 9 to IfcIShapeProfileDef to be a `IfcPlaneAngleMeasure`")); }
+ } while(0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcIndexedPolyCurve>(const DB& db, const LIST& params, IfcIndexedPolyCurve* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcBoundedCurve*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcTessellatedItem>(const DB& db, const LIST& params, IfcTessellatedItem* 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<IfcIndexedPolygonalFace>(const DB& db, const LIST& params, IfcIndexedPolygonalFace* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcTessellatedItem*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcIndexedPolygonalFaceWithVoids>(const DB& db, const LIST& params, IfcIndexedPolygonalFaceWithVoids* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcIndexedPolygonalFace*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcInterceptor>(const DB& db, const LIST& params, IfcInterceptor* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcFlowTreatmentDevice*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcInterceptorType>(const DB& db, const LIST& params, IfcInterceptorType* 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<IfcSurfaceCurve>(const DB& db, const LIST& params, IfcSurfaceCurve* 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<IfcIntersectionCurve>(const DB& db, const LIST& params, IfcIntersectionCurve* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcSurfaceCurve*>(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<IfcJunctionBox>(const DB& db, const LIST& params, IfcJunctionBox* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcFlowFitting*>(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<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<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<IfcLaborResourceType>(const DB& db, const LIST& params, IfcLaborResourceType* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcConstructionResourceType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcLamp>(const DB& db, const LIST& params, IfcLamp* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcFlowTerminal*>(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<IfcLightFixture>(const DB& db, const LIST& params, IfcLightFixture* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcFlowTerminal*>(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<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<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<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<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<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<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<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<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<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<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<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<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<IfcMechanicalFastener>(const DB& db, const LIST& params, IfcMechanicalFastener* 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<IfcMechanicalFastenerType>(const DB& db, const LIST& params, IfcMechanicalFastenerType* 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<IfcMedicalDevice>(const DB& db, const LIST& params, IfcMedicalDevice* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcFlowTerminal*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcMedicalDeviceType>(const DB& db, const LIST& params, IfcMedicalDeviceType* 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<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<IfcMemberStandardCase>(const DB& db, const LIST& params, IfcMemberStandardCase* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcMember*>(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<IfcMirroredProfileDef>(const DB& db, const LIST& params, IfcMirroredProfileDef* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcDerivedProfileDef*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcMotorConnection>(const DB& db, const LIST& params, IfcMotorConnection* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcEnergyConversionDevice*>(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<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<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<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<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<IfcOpeningElement>(const DB& db, const LIST& params, IfcOpeningElement* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcFeatureElementSubtraction*>(in));
+ if (params.GetSize() < 9) { throw STEP::TypeError("expected 9 arguments to IfcOpeningElement"); } do { // convert the 'PredefinedType' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcOpeningElement,1>::aux_is_derived[0]=true; break; }
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert( in->PredefinedType, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 8 to IfcOpeningElement to be a `IfcOpeningElementTypeEnum`")); }
+ } while(0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcOpeningStandardCase>(const DB& db, const LIST& params, IfcOpeningStandardCase* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcOpeningElement*>(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<IfcOuterBoundaryCurve>(const DB& db, const LIST& params, IfcOuterBoundaryCurve* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcBoundaryCurve*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcOutlet>(const DB& db, const LIST& params, IfcOutlet* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcFlowTerminal*>(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<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<IfcPcurve>(const DB& db, const LIST& params, IfcPcurve* 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<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<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<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<IfcPileType>(const DB& db, const LIST& params, IfcPileType* 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<IfcPipeFitting>(const DB& db, const LIST& params, IfcPipeFitting* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcFlowFitting*>(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<IfcPipeSegment>(const DB& db, const LIST& params, IfcPipeSegment* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcFlowSegment*>(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<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<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<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<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<IfcPlateStandardCase>(const DB& db, const LIST& params, IfcPlateStandardCase* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcPlate*>(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<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<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<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<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<IfcTessellatedFaceSet>(const DB& db, const LIST& params, IfcTessellatedFaceSet* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcTessellatedItem*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcPolygonalFaceSet>(const DB& db, const LIST& params, IfcPolygonalFaceSet* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcTessellatedFaceSet*>(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<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<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<IfcProcedureType>(const DB& db, const LIST& params, IfcProcedureType* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcTypeProcess*>(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<IfcProject>(const DB& db, const LIST& params, IfcProject* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcContext*>(in));
+ if (params.GetSize() < 9) { throw STEP::TypeError("expected 9 arguments to IfcProject"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcProjectLibrary>(const DB& db, const LIST& params, IfcProjectLibrary* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcContext*>(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<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<IfcSimpleProperty>(const DB& db, const LIST& params, IfcSimpleProperty* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcProperty*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to IfcSimpleProperty"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcPropertyBoundedValue>(const DB& db, const LIST& params, IfcPropertyBoundedValue* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcSimpleProperty*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcPropertyEnumeratedValue>(const DB& db, const LIST& params, IfcPropertyEnumeratedValue* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcSimpleProperty*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcPropertyListValue>(const DB& db, const LIST& params, IfcPropertyListValue* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcSimpleProperty*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to IfcPropertyListValue"); } do { // convert the 'ListValues' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert( in->ListValues, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcPropertyListValue to be a `LIST [1:?] OF IfcValue`")); }
+ } while(0);
+ do { // convert the 'Unit' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert( in->Unit, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcPropertyListValue to be a `IfcUnit`")); }
+ } while(0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcPropertyReferenceValue>(const DB& db, const LIST& params, IfcPropertyReferenceValue* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcSimpleProperty*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcPropertySet>(const DB& db, const LIST& params, IfcPropertySet* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcPropertySetDefinition*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to IfcPropertySet"); } do { // convert the 'HasProperties' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert( in->HasProperties, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcPropertySet to be a `SET [1:?] OF IfcProperty`")); }
+ } while(0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcPropertySingleValue>(const DB& db, const LIST& params, IfcPropertySingleValue* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcSimpleProperty*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to IfcPropertySingleValue"); } do { // convert the 'NominalValue' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert( in->NominalValue, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcPropertySingleValue to be a `IfcValue`")); }
+ } while(0);
+ do { // convert the 'Unit' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert( in->Unit, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcPropertySingleValue to be a `IfcUnit`")); }
+ } while(0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcPropertyTableValue>(const DB& db, const LIST& params, IfcPropertyTableValue* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcSimpleProperty*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcProtectiveDevice>(const DB& db, const LIST& params, IfcProtectiveDevice* 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<IfcProtectiveDeviceTrippingUnit>(const DB& db, const LIST& params, IfcProtectiveDeviceTrippingUnit* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcDistributionControlElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcProtectiveDeviceTrippingUnitType>(const DB& db, const LIST& params, IfcProtectiveDeviceTrippingUnitType* 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<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<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<IfcPump>(const DB& db, const LIST& params, IfcPump* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcFlowMovingDevice*>(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<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<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<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<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<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<IfcRampType>(const DB& db, const LIST& params, IfcRampType* 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<IfcRationalBSplineCurveWithKnots>(const DB& db, const LIST& params, IfcRationalBSplineCurveWithKnots* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcBSplineCurveWithKnots*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcRationalBSplineSurfaceWithKnots>(const DB& db, const LIST& params, IfcRationalBSplineSurfaceWithKnots* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcBSplineSurfaceWithKnots*>(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<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<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<IfcReinforcingElement>(const DB& db, const LIST& params, IfcReinforcingElement* 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<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<IfcReinforcingElementType>(const DB& db, const LIST& params, IfcReinforcingElementType* 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<IfcReinforcingBarType>(const DB& db, const LIST& params, IfcReinforcingBarType* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcReinforcingElementType*>(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<IfcReinforcingMeshType>(const DB& db, const LIST& params, IfcReinforcingMeshType* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcReinforcingElementType*>(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<IfcRelDecomposes>(const DB& db, const LIST& params, IfcRelDecomposes* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcRelationship*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to IfcRelDecomposes"); } 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"); } do { // convert the 'RelatingObject' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert( in->RelatingObject, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcRelAggregates to be a `IfcObjectDefinition`")); }
+ } while(0);
+ do { // convert the 'RelatedObjects' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert( in->RelatedObjects, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to IfcRelAggregates to be a `SET [1:?] OF IfcObjectDefinition`")); }
+ } while(0);
+ 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<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 `IfcSpatialElement`")); }
+ } while(0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcRelDefines>(const DB& db, const LIST& params, IfcRelDefines* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcRelationship*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to IfcRelDefines"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcRelDefinesByProperties>(const DB& db, const LIST& params, IfcRelDefinesByProperties* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcRelDefines*>(in));
+ if (params.GetSize() < 6) { throw STEP::TypeError("expected 6 arguments to IfcRelDefinesByProperties"); } do { // convert the 'RelatedObjects' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert( in->RelatedObjects, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcRelDefinesByProperties to be a `SET [1:?] OF IfcObjectDefinition`")); }
+ } while(0);
+ do { // convert the 'RelatingPropertyDefinition' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert( in->RelatingPropertyDefinition, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to IfcRelDefinesByProperties to be a `IfcPropertySetDefinitionSelect`")); }
+ } while(0);
+ 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<IfcRelVoidsElement>(const DB& db, const LIST& params, IfcRelVoidsElement* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcRelDecomposes*>(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<IfcReparametrisedCompositeCurveSegment>(const DB& db, const LIST& params, IfcReparametrisedCompositeCurveSegment* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcCompositeCurveSegment*>(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<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;
+}
+// -----------------------------------------------------------------------------------------------------------
+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++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcRevolvedAreaSolid,2>::aux_is_derived[0]=true; break; }
+ 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++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcRevolvedAreaSolid,2>::aux_is_derived[1]=true; break; }
+ 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<IfcRevolvedAreaSolidTapered>(const DB& db, const LIST& params, IfcRevolvedAreaSolidTapered* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcRevolvedAreaSolid*>(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<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<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<IfcRoofType>(const DB& db, const LIST& params, IfcRoofType* 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<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<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<IfcSanitaryTerminal>(const DB& db, const LIST& params, IfcSanitaryTerminal* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcFlowTerminal*>(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<IfcSeamCurve>(const DB& db, const LIST& params, IfcSeamCurve* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcSurfaceCurve*>(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<IfcSensor>(const DB& db, const LIST& params, IfcSensor* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcDistributionControlElement*>(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<IfcShadingDevice>(const DB& db, const LIST& params, IfcShadingDevice* 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<IfcShadingDeviceType>(const DB& db, const LIST& params, IfcShadingDeviceType* 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<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<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<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<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<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<IfcSlabElementedCase>(const DB& db, const LIST& params, IfcSlabElementedCase* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcSlab*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcSlabStandardCase>(const DB& db, const LIST& params, IfcSlabStandardCase* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcSlab*>(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<IfcSolarDevice>(const DB& db, const LIST& params, IfcSolarDevice* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcEnergyConversionDevice*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcSolarDeviceType>(const DB& db, const LIST& params, IfcSolarDeviceType* 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<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 'PredefinedType' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert( in->PredefinedType, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 9 to IfcSpace to be a `IfcSpaceTypeEnum`")); }
+ } 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<IfcSpaceHeater>(const DB& db, const LIST& params, IfcSpaceHeater* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcFlowTerminal*>(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<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<IfcSpatialElementType>(const DB& db, const LIST& params, IfcSpatialElementType* 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<IfcSpatialStructureElementType>(const DB& db, const LIST& params, IfcSpatialStructureElementType* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcSpatialElementType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ 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<IfcSpatialZone>(const DB& db, const LIST& params, IfcSpatialZone* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcSpatialElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcSpatialZoneType>(const DB& db, const LIST& params, IfcSpatialZoneType* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcSpatialElementType*>(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<IfcSphericalSurface>(const DB& db, const LIST& params, IfcSphericalSurface* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcElementarySurface*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcStackTerminal>(const DB& db, const LIST& params, IfcStackTerminal* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcFlowTerminal*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ 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<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<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<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<IfcStairType>(const DB& db, const LIST& params, IfcStairType* 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<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<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<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<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<IfcStructuralCurveAction>(const DB& db, const LIST& params, IfcStructuralCurveAction* 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<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<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<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<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<IfcStructuralCurveReaction>(const DB& db, const LIST& params, IfcStructuralCurveReaction* 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<IfcStructuralLinearAction>(const DB& db, const LIST& params, IfcStructuralLinearAction* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcStructuralCurveAction*>(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<IfcStructuralLoadCase>(const DB& db, const LIST& params, IfcStructuralLoadCase* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcStructuralLoadGroup*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcStructuralSurfaceAction>(const DB& db, const LIST& params, IfcStructuralSurfaceAction* 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<IfcStructuralPlanarAction>(const DB& db, const LIST& params, IfcStructuralPlanarAction* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcStructuralSurfaceAction*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ 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<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<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<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<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<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<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<IfcStructuralSurfaceReaction>(const DB& db, const LIST& params, IfcStructuralSurfaceReaction* 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<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<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 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++];
+ 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 IfcStyleAssignmentSelect`")); }
+ } while(0);
+ do { // convert the 'Name' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ 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<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<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<IfcSubContractResourceType>(const DB& db, const LIST& params, IfcSubContractResourceType* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcConstructionResourceType*>(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<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<IfcSurfaceFeature>(const DB& db, const LIST& params, IfcSurfaceFeature* 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<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<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<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<IfcSurfaceStyleShading>(const DB& db, const LIST& params, IfcSurfaceStyleShading* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcPresentationItem*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 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,2>::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);
+ do { // convert the 'Transparency' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcSurfaceStyleShading,2>::aux_is_derived[1]=true; break; }
+ 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 IfcSurfaceStyleShading to be a `IfcNormalisedRatioMeasure`")); }
+ } 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 '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<IfcSurfaceStyleWithTextures>(const DB& db, const LIST& params, IfcSurfaceStyleWithTextures* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcPresentationItem*>(in));
+ 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<IfcSweptDiskSolid>(const DB& db, const LIST& params, IfcSweptDiskSolid* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcSolidModel*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to IfcSweptDiskSolid"); } do { // convert the 'Directrix' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcSweptDiskSolid,5>::aux_is_derived[0]=true; break; }
+ try { GenericConvert( in->Directrix, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcSweptDiskSolid to be a `IfcCurve`")); }
+ } while(0);
+ do { // convert the 'Radius' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcSweptDiskSolid,5>::aux_is_derived[1]=true; break; }
+ try { GenericConvert( in->Radius, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcSweptDiskSolid to be a `IfcPositiveLengthMeasure`")); }
+ } while(0);
+ do { // convert the 'InnerRadius' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcSweptDiskSolid,5>::aux_is_derived[2]=true; break; }
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert( in->InnerRadius, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcSweptDiskSolid to be a `IfcPositiveLengthMeasure`")); }
+ } while(0);
+ do { // convert the 'StartParam' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcSweptDiskSolid,5>::aux_is_derived[3]=true; break; }
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert( in->StartParam, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcSweptDiskSolid to be a `IfcParameterValue`")); }
+ } while(0);
+ do { // convert the 'EndParam' argument
+ boost::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::IfcSweptDiskSolid,5>::aux_is_derived[4]=true; break; }
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert( in->EndParam, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcSweptDiskSolid to be a `IfcParameterValue`")); }
+ } while(0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcSweptDiskSolidPolygonal>(const DB& db, const LIST& params, IfcSweptDiskSolidPolygonal* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcSweptDiskSolid*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcSwitchingDevice>(const DB& db, const LIST& params, IfcSwitchingDevice* 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<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<IfcSystemFurnitureElement>(const DB& db, const LIST& params, IfcSystemFurnitureElement* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcFurnishingElement*>(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<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<IfcTank>(const DB& db, const LIST& params, IfcTank* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcFlowStorageDevice*>(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<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<IfcTaskType>(const DB& db, const LIST& params, IfcTaskType* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcTypeProcess*>(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<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<IfcTendonAnchorType>(const DB& db, const LIST& params, IfcTendonAnchorType* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcReinforcingElementType*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcTendonType>(const DB& db, const LIST& params, IfcTendonType* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcReinforcingElementType*>(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<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<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<IfcToroidalSurface>(const DB& db, const LIST& params, IfcToroidalSurface* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcElementarySurface*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcTransformer>(const DB& db, const LIST& params, IfcTransformer* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcEnergyConversionDevice*>(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<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<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<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<IfcTriangulatedFaceSet>(const DB& db, const LIST& params, IfcTriangulatedFaceSet* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcTessellatedFaceSet*>(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 `IfcBoolean`")); }
+ } 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<IfcTubeBundle>(const DB& db, const LIST& params, IfcTubeBundle* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcEnergyConversionDevice*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ 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<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<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<IfcUnitaryControlElement>(const DB& db, const LIST& params, IfcUnitaryControlElement* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcDistributionControlElement*>(in));
+// this data structure is not used yet, so there is no code generated to fill its members
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<IfcUnitaryControlElementType>(const DB& db, const LIST& params, IfcUnitaryControlElementType* 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<IfcUnitaryEquipment>(const DB& db, const LIST& params, IfcUnitaryEquipment* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcEnergyConversionDevice*>(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<IfcValve>(const DB& db, const LIST& params, IfcValve* 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<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<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<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<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<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<IfcVibrationIsolator>(const DB& db, const LIST& params, IfcVibrationIsolator* 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<IfcVibrationIsolatorType>(const DB& db, const LIST& params, IfcVibrationIsolatorType* 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<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<IfcVoidingFeature>(const DB& db, const LIST& params, IfcVoidingFeature* 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<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<IfcWallElementedCase>(const DB& db, const LIST& params, IfcWallElementedCase* 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<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<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<IfcWasteTerminal>(const DB& db, const LIST& params, IfcWasteTerminal* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcFlowTerminal*>(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<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<IfcWindowStandardCase>(const DB& db, const LIST& params, IfcWindowStandardCase* in)
+{
+ size_t base = GenericFill(db,params,static_cast<IfcWindow*>(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<IfcWindowType>(const DB& db, const LIST& params, IfcWindowType* 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<IfcWorkCalendar>(const DB& db, const LIST& params, IfcWorkCalendar* 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<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<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<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<IfcZone>(const DB& db, const LIST& params, IfcZone* 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;
+}
+
+} // ! STEP
+} // ! Assimp
+
+#endif
diff --git a/code/Importer/IFC/IFCReaderGen_4.h b/code/Importer/IFC/IFCReaderGen_4.h
new file mode 100644
index 000000000..ccfcb6ea0
--- /dev/null
+++ b/code/Importer/IFC/IFCReaderGen_4.h
@@ -0,0 +1,5452 @@
+/*
+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 {
+namespace Schema_4 {
+
+ using namespace STEP;
+ using namespace STEP::EXPRESS;
+
+
+ struct NotImplemented : public ObjectHelper<NotImplemented,0> {
+
+ };
+
+
+ // ******************************************************************************
+ // IFC Custom data types
+ // ******************************************************************************
+
+
+ // C++ wrapper type for IfcStrippedOptional
+ typedef BOOLEAN IfcStrippedOptional;
+ // C++ wrapper type for IfcAbsorbedDoseMeasure
+ typedef REAL IfcAbsorbedDoseMeasure;
+ // C++ wrapper type for IfcAccelerationMeasure
+ typedef REAL IfcAccelerationMeasure;
+ // C++ wrapper type for IfcAmountOfSubstanceMeasure
+ typedef REAL IfcAmountOfSubstanceMeasure;
+ // C++ wrapper type for IfcAngularVelocityMeasure
+ typedef REAL IfcAngularVelocityMeasure;
+ // C++ wrapper type for IfcArcIndex
+ typedef ListOf< INTEGER, 3, 3 > IfcArcIndex;
+ // C++ wrapper type for IfcAreaDensityMeasure
+ typedef REAL IfcAreaDensityMeasure;
+ // C++ wrapper type for IfcAreaMeasure
+ typedef REAL IfcAreaMeasure;
+ // C++ wrapper type for IfcBoolean
+ typedef BOOLEAN IfcBoolean;
+ // C++ wrapper type for IfcBoxAlignment
+ typedef STRING IfcBoxAlignment;
+ // C++ wrapper type for IfcCardinalPointReference
+ typedef INTEGER IfcCardinalPointReference;
+ // C++ wrapper type for IfcCompoundPlaneAngleMeasure
+ typedef ListOf< INTEGER, 3, 4 > IfcCompoundPlaneAngleMeasure;
+ // C++ wrapper type for IfcContextDependentMeasure
+ typedef REAL IfcContextDependentMeasure;
+ // C++ wrapper type for IfcCountMeasure
+ typedef NUMBER IfcCountMeasure;
+ // C++ wrapper type for IfcCurvatureMeasure
+ typedef REAL IfcCurvatureMeasure;
+ // C++ wrapper type for IfcDate
+ typedef STRING IfcDate;
+ // C++ wrapper type for IfcDateTime
+ typedef STRING IfcDateTime;
+ // C++ wrapper type for IfcDayInMonthNumber
+ typedef INTEGER IfcDayInMonthNumber;
+ // C++ wrapper type for IfcDayInWeekNumber
+ typedef INTEGER IfcDayInWeekNumber;
+ // C++ wrapper type for IfcDescriptiveMeasure
+ typedef STRING IfcDescriptiveMeasure;
+ // C++ wrapper type for IfcDimensionCount
+ typedef INTEGER IfcDimensionCount;
+ // C++ wrapper type for IfcDoseEquivalentMeasure
+ typedef REAL IfcDoseEquivalentMeasure;
+ // C++ wrapper type for IfcDuration
+ typedef STRING IfcDuration;
+ // C++ wrapper type for IfcDynamicViscosityMeasure
+ typedef REAL IfcDynamicViscosityMeasure;
+ // C++ wrapper type for IfcElectricCapacitanceMeasure
+ typedef REAL IfcElectricCapacitanceMeasure;
+ // C++ wrapper type for IfcElectricChargeMeasure
+ typedef REAL IfcElectricChargeMeasure;
+ // C++ wrapper type for IfcElectricConductanceMeasure
+ typedef REAL IfcElectricConductanceMeasure;
+ // C++ wrapper type for IfcElectricCurrentMeasure
+ typedef REAL IfcElectricCurrentMeasure;
+ // C++ wrapper type for IfcElectricResistanceMeasure
+ typedef REAL IfcElectricResistanceMeasure;
+ // C++ wrapper type for IfcElectricVoltageMeasure
+ typedef REAL IfcElectricVoltageMeasure;
+ // C++ wrapper type for IfcEnergyMeasure
+ typedef REAL IfcEnergyMeasure;
+ // C++ wrapper type for IfcFontStyle
+ typedef STRING IfcFontStyle;
+ // C++ wrapper type for IfcFontVariant
+ typedef STRING IfcFontVariant;
+ // C++ wrapper type for IfcFontWeight
+ typedef STRING IfcFontWeight;
+ // C++ wrapper type for IfcForceMeasure
+ typedef REAL IfcForceMeasure;
+ // C++ wrapper type for IfcFrequencyMeasure
+ typedef REAL IfcFrequencyMeasure;
+ // C++ wrapper type for IfcGloballyUniqueId
+ typedef STRING IfcGloballyUniqueId;
+ // C++ wrapper type for IfcHeatFluxDensityMeasure
+ typedef REAL IfcHeatFluxDensityMeasure;
+ // C++ wrapper type for IfcHeatingValueMeasure
+ typedef REAL IfcHeatingValueMeasure;
+ // C++ wrapper type for IfcIdentifier
+ typedef STRING IfcIdentifier;
+ // C++ wrapper type for IfcIlluminanceMeasure
+ typedef REAL IfcIlluminanceMeasure;
+ // C++ wrapper type for IfcInductanceMeasure
+ typedef REAL IfcInductanceMeasure;
+ // C++ wrapper type for IfcInteger
+ typedef INTEGER IfcInteger;
+ // C++ wrapper type for IfcIntegerCountRateMeasure
+ typedef INTEGER IfcIntegerCountRateMeasure;
+ // C++ wrapper type for IfcIonConcentrationMeasure
+ typedef REAL IfcIonConcentrationMeasure;
+ // C++ wrapper type for IfcIsothermalMoistureCapacityMeasure
+ typedef REAL IfcIsothermalMoistureCapacityMeasure;
+ // C++ wrapper type for IfcKinematicViscosityMeasure
+ typedef REAL IfcKinematicViscosityMeasure;
+ // C++ wrapper type for IfcLabel
+ typedef STRING IfcLabel;
+ // C++ wrapper type for IfcLanguageId
+ typedef STRING IfcLanguageId;
+ // C++ wrapper type for IfcLengthMeasure
+ typedef REAL IfcLengthMeasure;
+ // C++ wrapper type for IfcLineIndex
+ typedef ListOf< INTEGER, 2, 0 > IfcLineIndex;
+ // C++ wrapper type for IfcLinearForceMeasure
+ typedef REAL IfcLinearForceMeasure;
+ // C++ wrapper type for IfcLinearMomentMeasure
+ typedef REAL IfcLinearMomentMeasure;
+ // C++ wrapper type for IfcLinearStiffnessMeasure
+ typedef REAL IfcLinearStiffnessMeasure;
+ // C++ wrapper type for IfcLinearVelocityMeasure
+ typedef REAL IfcLinearVelocityMeasure;
+ // C++ wrapper type for IfcLogical
+ typedef LOGICAL IfcLogical;
+ // C++ wrapper type for IfcLuminousFluxMeasure
+ typedef REAL IfcLuminousFluxMeasure;
+ // C++ wrapper type for IfcLuminousIntensityDistributionMeasure
+ typedef REAL IfcLuminousIntensityDistributionMeasure;
+ // C++ wrapper type for IfcLuminousIntensityMeasure
+ typedef REAL IfcLuminousIntensityMeasure;
+ // C++ wrapper type for IfcMagneticFluxDensityMeasure
+ typedef REAL IfcMagneticFluxDensityMeasure;
+ // C++ wrapper type for IfcMagneticFluxMeasure
+ typedef REAL IfcMagneticFluxMeasure;
+ // C++ wrapper type for IfcMassDensityMeasure
+ typedef REAL IfcMassDensityMeasure;
+ // C++ wrapper type for IfcMassFlowRateMeasure
+ typedef REAL IfcMassFlowRateMeasure;
+ // C++ wrapper type for IfcMassMeasure
+ typedef REAL IfcMassMeasure;
+ // C++ wrapper type for IfcMassPerLengthMeasure
+ typedef REAL IfcMassPerLengthMeasure;
+ // C++ wrapper type for IfcModulusOfElasticityMeasure
+ typedef REAL IfcModulusOfElasticityMeasure;
+ // C++ wrapper type for IfcModulusOfLinearSubgradeReactionMeasure
+ typedef REAL IfcModulusOfLinearSubgradeReactionMeasure;
+ // C++ wrapper type for IfcModulusOfRotationalSubgradeReactionMeasure
+ typedef REAL IfcModulusOfRotationalSubgradeReactionMeasure;
+ // C++ wrapper type for IfcModulusOfSubgradeReactionMeasure
+ typedef REAL IfcModulusOfSubgradeReactionMeasure;
+ // C++ wrapper type for IfcMoistureDiffusivityMeasure
+ typedef REAL IfcMoistureDiffusivityMeasure;
+ // C++ wrapper type for IfcMolecularWeightMeasure
+ typedef REAL IfcMolecularWeightMeasure;
+ // C++ wrapper type for IfcMomentOfInertiaMeasure
+ typedef REAL IfcMomentOfInertiaMeasure;
+ // C++ wrapper type for IfcMonetaryMeasure
+ typedef REAL IfcMonetaryMeasure;
+ // C++ wrapper type for IfcMonthInYearNumber
+ typedef INTEGER IfcMonthInYearNumber;
+ // C++ wrapper type for IfcNonNegativeLengthMeasure
+ typedef REAL IfcNonNegativeLengthMeasure;
+ // C++ wrapper type for IfcNormalisedRatioMeasure
+ typedef REAL IfcNormalisedRatioMeasure;
+ // C++ wrapper type for IfcNumericMeasure
+ typedef NUMBER IfcNumericMeasure;
+ // C++ wrapper type for IfcPHMeasure
+ typedef REAL IfcPHMeasure;
+ // C++ wrapper type for IfcParameterValue
+ typedef REAL IfcParameterValue;
+ // C++ wrapper type for IfcPlanarForceMeasure
+ typedef REAL IfcPlanarForceMeasure;
+ // C++ wrapper type for IfcPlaneAngleMeasure
+ typedef REAL IfcPlaneAngleMeasure;
+ // C++ wrapper type for IfcPositiveInteger
+ typedef INTEGER IfcPositiveInteger;
+ // C++ wrapper type for IfcPositiveLengthMeasure
+ typedef REAL IfcPositiveLengthMeasure;
+ // C++ wrapper type for IfcPositivePlaneAngleMeasure
+ typedef REAL IfcPositivePlaneAngleMeasure;
+ // C++ wrapper type for IfcPositiveRatioMeasure
+ typedef REAL IfcPositiveRatioMeasure;
+ // C++ wrapper type for IfcPowerMeasure
+ typedef REAL IfcPowerMeasure;
+ // C++ wrapper type for IfcPresentableText
+ typedef STRING IfcPresentableText;
+ // C++ wrapper type for IfcPressureMeasure
+ typedef REAL IfcPressureMeasure;
+ // C++ wrapper type for IfcRadioActivityMeasure
+ typedef REAL IfcRadioActivityMeasure;
+ // C++ wrapper type for IfcRatioMeasure
+ typedef REAL IfcRatioMeasure;
+ // C++ wrapper type for IfcReal
+ typedef REAL IfcReal;
+ // C++ wrapper type for IfcRotationalFrequencyMeasure
+ typedef REAL IfcRotationalFrequencyMeasure;
+ // C++ wrapper type for IfcRotationalMassMeasure
+ typedef REAL IfcRotationalMassMeasure;
+ // C++ wrapper type for IfcRotationalStiffnessMeasure
+ typedef REAL IfcRotationalStiffnessMeasure;
+ // C++ wrapper type for IfcSectionModulusMeasure
+ typedef REAL IfcSectionModulusMeasure;
+ // C++ wrapper type for IfcSectionalAreaIntegralMeasure
+ typedef REAL IfcSectionalAreaIntegralMeasure;
+ // C++ wrapper type for IfcShearModulusMeasure
+ typedef REAL IfcShearModulusMeasure;
+ // C++ wrapper type for IfcSolidAngleMeasure
+ typedef REAL IfcSolidAngleMeasure;
+ // C++ wrapper type for IfcSoundPowerLevelMeasure
+ typedef REAL IfcSoundPowerLevelMeasure;
+ // C++ wrapper type for IfcSoundPowerMeasure
+ typedef REAL IfcSoundPowerMeasure;
+ // C++ wrapper type for IfcSoundPressureLevelMeasure
+ typedef REAL IfcSoundPressureLevelMeasure;
+ // C++ wrapper type for IfcSoundPressureMeasure
+ typedef REAL IfcSoundPressureMeasure;
+ // C++ wrapper type for IfcSpecificHeatCapacityMeasure
+ typedef REAL IfcSpecificHeatCapacityMeasure;
+ // C++ wrapper type for IfcSpecularExponent
+ typedef REAL IfcSpecularExponent;
+ // C++ wrapper type for IfcSpecularRoughness
+ typedef REAL IfcSpecularRoughness;
+ // C++ wrapper type for IfcTemperatureGradientMeasure
+ typedef REAL IfcTemperatureGradientMeasure;
+ // C++ wrapper type for IfcTemperatureRateOfChangeMeasure
+ typedef REAL IfcTemperatureRateOfChangeMeasure;
+ // C++ wrapper type for IfcText
+ typedef STRING IfcText;
+ // C++ wrapper type for IfcTextAlignment
+ typedef STRING IfcTextAlignment;
+ // C++ wrapper type for IfcTextDecoration
+ typedef STRING IfcTextDecoration;
+ // C++ wrapper type for IfcTextFontName
+ typedef STRING IfcTextFontName;
+ // C++ wrapper type for IfcTextTransformation
+ typedef STRING IfcTextTransformation;
+ // C++ wrapper type for IfcThermalAdmittanceMeasure
+ typedef REAL IfcThermalAdmittanceMeasure;
+ // C++ wrapper type for IfcThermalConductivityMeasure
+ typedef REAL IfcThermalConductivityMeasure;
+ // C++ wrapper type for IfcThermalExpansionCoefficientMeasure
+ typedef REAL IfcThermalExpansionCoefficientMeasure;
+ // C++ wrapper type for IfcThermalResistanceMeasure
+ typedef REAL IfcThermalResistanceMeasure;
+ // C++ wrapper type for IfcThermalTransmittanceMeasure
+ typedef REAL IfcThermalTransmittanceMeasure;
+ // C++ wrapper type for IfcThermodynamicTemperatureMeasure
+ typedef REAL IfcThermodynamicTemperatureMeasure;
+ // C++ wrapper type for IfcTime
+ typedef STRING IfcTime;
+ // C++ wrapper type for IfcTimeMeasure
+ typedef REAL IfcTimeMeasure;
+ // C++ wrapper type for IfcTimeStamp
+ typedef INTEGER IfcTimeStamp;
+ // C++ wrapper type for IfcTorqueMeasure
+ typedef REAL IfcTorqueMeasure;
+ // C++ wrapper type for IfcURIReference
+ typedef STRING IfcURIReference;
+ // C++ wrapper type for IfcVaporPermeabilityMeasure
+ typedef REAL IfcVaporPermeabilityMeasure;
+ // C++ wrapper type for IfcVolumeMeasure
+ typedef REAL IfcVolumeMeasure;
+ // C++ wrapper type for IfcVolumetricFlowRateMeasure
+ typedef REAL IfcVolumetricFlowRateMeasure;
+ // C++ wrapper type for IfcWarpingConstantMeasure
+ typedef REAL IfcWarpingConstantMeasure;
+ // C++ wrapper type for IfcWarpingMomentMeasure
+ typedef REAL IfcWarpingMomentMeasure;
+ // C++ wrapper type for IfcActionRequestTypeEnum
+ typedef ENUMERATION IfcActionRequestTypeEnum;
+ // C++ wrapper type for IfcActionSourceTypeEnum
+ typedef ENUMERATION IfcActionSourceTypeEnum;
+ // C++ wrapper type for IfcActionTypeEnum
+ typedef ENUMERATION IfcActionTypeEnum;
+ // C++ wrapper type for IfcActuatorTypeEnum
+ typedef ENUMERATION IfcActuatorTypeEnum;
+ // C++ wrapper type for IfcAddressTypeEnum
+ typedef ENUMERATION IfcAddressTypeEnum;
+ // C++ wrapper type for IfcAirTerminalBoxTypeEnum
+ typedef ENUMERATION IfcAirTerminalBoxTypeEnum;
+ // C++ wrapper type for IfcAirTerminalTypeEnum
+ typedef ENUMERATION IfcAirTerminalTypeEnum;
+ // C++ wrapper type for IfcAirToAirHeatRecoveryTypeEnum
+ typedef ENUMERATION IfcAirToAirHeatRecoveryTypeEnum;
+ // C++ wrapper type for IfcAlarmTypeEnum
+ typedef ENUMERATION IfcAlarmTypeEnum;
+ // C++ wrapper type for IfcAnalysisModelTypeEnum
+ typedef ENUMERATION IfcAnalysisModelTypeEnum;
+ // C++ wrapper type for IfcAnalysisTheoryTypeEnum
+ typedef ENUMERATION IfcAnalysisTheoryTypeEnum;
+ // C++ wrapper type for IfcArithmeticOperatorEnum
+ typedef ENUMERATION IfcArithmeticOperatorEnum;
+ // C++ wrapper type for IfcAssemblyPlaceEnum
+ typedef ENUMERATION IfcAssemblyPlaceEnum;
+ // C++ wrapper type for IfcAudioVisualApplianceTypeEnum
+ typedef ENUMERATION IfcAudioVisualApplianceTypeEnum;
+ // C++ wrapper type for IfcBSplineCurveForm
+ typedef ENUMERATION IfcBSplineCurveForm;
+ // C++ wrapper type for IfcBSplineSurfaceForm
+ typedef ENUMERATION IfcBSplineSurfaceForm;
+ // C++ wrapper type for IfcBeamTypeEnum
+ typedef ENUMERATION IfcBeamTypeEnum;
+ // C++ wrapper type for IfcBenchmarkEnum
+ typedef ENUMERATION IfcBenchmarkEnum;
+ // C++ wrapper type for IfcBoilerTypeEnum
+ typedef ENUMERATION IfcBoilerTypeEnum;
+ // C++ wrapper type for IfcBooleanOperator
+ typedef ENUMERATION IfcBooleanOperator;
+ // C++ wrapper type for IfcBuildingElementPartTypeEnum
+ typedef ENUMERATION IfcBuildingElementPartTypeEnum;
+ // C++ wrapper type for IfcBuildingElementProxyTypeEnum
+ typedef ENUMERATION IfcBuildingElementProxyTypeEnum;
+ // C++ wrapper type for IfcBuildingSystemTypeEnum
+ typedef ENUMERATION IfcBuildingSystemTypeEnum;
+ // C++ wrapper type for IfcBurnerTypeEnum
+ typedef ENUMERATION IfcBurnerTypeEnum;
+ // C++ wrapper type for IfcCableCarrierFittingTypeEnum
+ typedef ENUMERATION IfcCableCarrierFittingTypeEnum;
+ // C++ wrapper type for IfcCableCarrierSegmentTypeEnum
+ typedef ENUMERATION IfcCableCarrierSegmentTypeEnum;
+ // C++ wrapper type for IfcCableFittingTypeEnum
+ typedef ENUMERATION IfcCableFittingTypeEnum;
+ // C++ wrapper type for IfcCableSegmentTypeEnum
+ typedef ENUMERATION IfcCableSegmentTypeEnum;
+ // C++ wrapper type for IfcChangeActionEnum
+ typedef ENUMERATION IfcChangeActionEnum;
+ // C++ wrapper type for IfcChillerTypeEnum
+ typedef ENUMERATION IfcChillerTypeEnum;
+ // C++ wrapper type for IfcChimneyTypeEnum
+ typedef ENUMERATION IfcChimneyTypeEnum;
+ // C++ wrapper type for IfcCoilTypeEnum
+ typedef ENUMERATION IfcCoilTypeEnum;
+ // C++ wrapper type for IfcColumnTypeEnum
+ typedef ENUMERATION IfcColumnTypeEnum;
+ // C++ wrapper type for IfcCommunicationsApplianceTypeEnum
+ typedef ENUMERATION IfcCommunicationsApplianceTypeEnum;
+ // C++ wrapper type for IfcComplexPropertyTemplateTypeEnum
+ typedef ENUMERATION IfcComplexPropertyTemplateTypeEnum;
+ // C++ wrapper type for IfcCompressorTypeEnum
+ typedef ENUMERATION IfcCompressorTypeEnum;
+ // C++ wrapper type for IfcCondenserTypeEnum
+ typedef ENUMERATION IfcCondenserTypeEnum;
+ // C++ wrapper type for IfcConnectionTypeEnum
+ typedef ENUMERATION IfcConnectionTypeEnum;
+ // C++ wrapper type for IfcConstraintEnum
+ typedef ENUMERATION IfcConstraintEnum;
+ // C++ wrapper type for IfcConstructionEquipmentResourceTypeEnum
+ typedef ENUMERATION IfcConstructionEquipmentResourceTypeEnum;
+ // C++ wrapper type for IfcConstructionMaterialResourceTypeEnum
+ typedef ENUMERATION IfcConstructionMaterialResourceTypeEnum;
+ // C++ wrapper type for IfcConstructionProductResourceTypeEnum
+ typedef ENUMERATION IfcConstructionProductResourceTypeEnum;
+ // C++ wrapper type for IfcControllerTypeEnum
+ typedef ENUMERATION IfcControllerTypeEnum;
+ // C++ wrapper type for IfcCooledBeamTypeEnum
+ typedef ENUMERATION IfcCooledBeamTypeEnum;
+ // C++ wrapper type for IfcCoolingTowerTypeEnum
+ typedef ENUMERATION IfcCoolingTowerTypeEnum;
+ // C++ wrapper type for IfcCostItemTypeEnum
+ typedef ENUMERATION IfcCostItemTypeEnum;
+ // C++ wrapper type for IfcCostScheduleTypeEnum
+ typedef ENUMERATION IfcCostScheduleTypeEnum;
+ // C++ wrapper type for IfcCoveringTypeEnum
+ typedef ENUMERATION IfcCoveringTypeEnum;
+ // C++ wrapper type for IfcCrewResourceTypeEnum
+ typedef ENUMERATION IfcCrewResourceTypeEnum;
+ // C++ wrapper type for IfcCurtainWallTypeEnum
+ typedef ENUMERATION IfcCurtainWallTypeEnum;
+ // C++ wrapper type for IfcCurveInterpolationEnum
+ typedef ENUMERATION IfcCurveInterpolationEnum;
+ // C++ wrapper type for IfcDamperTypeEnum
+ typedef ENUMERATION IfcDamperTypeEnum;
+ // C++ wrapper type for IfcDataOriginEnum
+ typedef ENUMERATION IfcDataOriginEnum;
+ // C++ wrapper type for IfcDerivedUnitEnum
+ typedef ENUMERATION IfcDerivedUnitEnum;
+ // C++ wrapper type for IfcDirectionSenseEnum
+ typedef ENUMERATION IfcDirectionSenseEnum;
+ // C++ wrapper type for IfcDiscreteAccessoryTypeEnum
+ typedef ENUMERATION IfcDiscreteAccessoryTypeEnum;
+ // C++ wrapper type for IfcDistributionChamberElementTypeEnum
+ typedef ENUMERATION IfcDistributionChamberElementTypeEnum;
+ // C++ wrapper type for IfcDistributionPortTypeEnum
+ typedef ENUMERATION IfcDistributionPortTypeEnum;
+ // C++ wrapper type for IfcDistributionSystemEnum
+ typedef ENUMERATION IfcDistributionSystemEnum;
+ // C++ wrapper type for IfcDocumentConfidentialityEnum
+ typedef ENUMERATION IfcDocumentConfidentialityEnum;
+ // C++ wrapper type for IfcDocumentStatusEnum
+ typedef ENUMERATION IfcDocumentStatusEnum;
+ // C++ wrapper type for IfcDoorPanelOperationEnum
+ typedef ENUMERATION IfcDoorPanelOperationEnum;
+ // C++ wrapper type for IfcDoorPanelPositionEnum
+ typedef ENUMERATION IfcDoorPanelPositionEnum;
+ // C++ wrapper type for IfcDoorStyleConstructionEnum
+ typedef ENUMERATION IfcDoorStyleConstructionEnum;
+ // C++ wrapper type for IfcDoorStyleOperationEnum
+ typedef ENUMERATION IfcDoorStyleOperationEnum;
+ // C++ wrapper type for IfcDoorTypeEnum
+ typedef ENUMERATION IfcDoorTypeEnum;
+ // C++ wrapper type for IfcDoorTypeOperationEnum
+ typedef ENUMERATION IfcDoorTypeOperationEnum;
+ // C++ wrapper type for IfcDuctFittingTypeEnum
+ typedef ENUMERATION IfcDuctFittingTypeEnum;
+ // C++ wrapper type for IfcDuctSegmentTypeEnum
+ typedef ENUMERATION IfcDuctSegmentTypeEnum;
+ // C++ wrapper type for IfcDuctSilencerTypeEnum
+ typedef ENUMERATION IfcDuctSilencerTypeEnum;
+ // C++ wrapper type for IfcElectricApplianceTypeEnum
+ typedef ENUMERATION IfcElectricApplianceTypeEnum;
+ // C++ wrapper type for IfcElectricDistributionBoardTypeEnum
+ typedef ENUMERATION IfcElectricDistributionBoardTypeEnum;
+ // C++ wrapper type for IfcElectricFlowStorageDeviceTypeEnum
+ typedef ENUMERATION IfcElectricFlowStorageDeviceTypeEnum;
+ // C++ wrapper type for IfcElectricGeneratorTypeEnum
+ typedef ENUMERATION IfcElectricGeneratorTypeEnum;
+ // C++ wrapper type for IfcElectricMotorTypeEnum
+ typedef ENUMERATION IfcElectricMotorTypeEnum;
+ // C++ wrapper type for IfcElectricTimeControlTypeEnum
+ typedef ENUMERATION IfcElectricTimeControlTypeEnum;
+ // C++ wrapper type for IfcElementAssemblyTypeEnum
+ typedef ENUMERATION IfcElementAssemblyTypeEnum;
+ // C++ wrapper type for IfcElementCompositionEnum
+ typedef ENUMERATION IfcElementCompositionEnum;
+ // C++ wrapper type for IfcEngineTypeEnum
+ typedef ENUMERATION IfcEngineTypeEnum;
+ // C++ wrapper type for IfcEvaporativeCoolerTypeEnum
+ typedef ENUMERATION IfcEvaporativeCoolerTypeEnum;
+ // C++ wrapper type for IfcEvaporatorTypeEnum
+ typedef ENUMERATION IfcEvaporatorTypeEnum;
+ // C++ wrapper type for IfcEventTriggerTypeEnum
+ typedef ENUMERATION IfcEventTriggerTypeEnum;
+ // C++ wrapper type for IfcEventTypeEnum
+ typedef ENUMERATION IfcEventTypeEnum;
+ // C++ wrapper type for IfcExternalSpatialElementTypeEnum
+ typedef ENUMERATION IfcExternalSpatialElementTypeEnum;
+ // C++ wrapper type for IfcFanTypeEnum
+ typedef ENUMERATION IfcFanTypeEnum;
+ // C++ wrapper type for IfcFastenerTypeEnum
+ typedef ENUMERATION IfcFastenerTypeEnum;
+ // C++ wrapper type for IfcFilterTypeEnum
+ typedef ENUMERATION IfcFilterTypeEnum;
+ // C++ wrapper type for IfcFireSuppressionTerminalTypeEnum
+ typedef ENUMERATION IfcFireSuppressionTerminalTypeEnum;
+ // C++ wrapper type for IfcFlowDirectionEnum
+ typedef ENUMERATION IfcFlowDirectionEnum;
+ // C++ wrapper type for IfcFlowInstrumentTypeEnum
+ typedef ENUMERATION IfcFlowInstrumentTypeEnum;
+ // C++ wrapper type for IfcFlowMeterTypeEnum
+ typedef ENUMERATION IfcFlowMeterTypeEnum;
+ // C++ wrapper type for IfcFootingTypeEnum
+ typedef ENUMERATION IfcFootingTypeEnum;
+ // C++ wrapper type for IfcFurnitureTypeEnum
+ typedef ENUMERATION IfcFurnitureTypeEnum;
+ // C++ wrapper type for IfcGeographicElementTypeEnum
+ typedef ENUMERATION IfcGeographicElementTypeEnum;
+ // C++ wrapper type for IfcGeometricProjectionEnum
+ typedef ENUMERATION IfcGeometricProjectionEnum;
+ // C++ wrapper type for IfcGlobalOrLocalEnum
+ typedef ENUMERATION IfcGlobalOrLocalEnum;
+ // C++ wrapper type for IfcGridTypeEnum
+ typedef ENUMERATION IfcGridTypeEnum;
+ // C++ wrapper type for IfcHeatExchangerTypeEnum
+ typedef ENUMERATION IfcHeatExchangerTypeEnum;
+ // C++ wrapper type for IfcHumidifierTypeEnum
+ typedef ENUMERATION IfcHumidifierTypeEnum;
+ // C++ wrapper type for IfcInterceptorTypeEnum
+ typedef ENUMERATION IfcInterceptorTypeEnum;
+ // C++ wrapper type for IfcInternalOrExternalEnum
+ typedef ENUMERATION IfcInternalOrExternalEnum;
+ // C++ wrapper type for IfcInventoryTypeEnum
+ typedef ENUMERATION IfcInventoryTypeEnum;
+ // C++ wrapper type for IfcJunctionBoxTypeEnum
+ typedef ENUMERATION IfcJunctionBoxTypeEnum;
+ // C++ wrapper type for IfcKnotType
+ typedef ENUMERATION IfcKnotType;
+ // C++ wrapper type for IfcLaborResourceTypeEnum
+ typedef ENUMERATION IfcLaborResourceTypeEnum;
+ // C++ wrapper type for IfcLampTypeEnum
+ typedef ENUMERATION IfcLampTypeEnum;
+ // C++ wrapper type for IfcLayerSetDirectionEnum
+ typedef ENUMERATION IfcLayerSetDirectionEnum;
+ // C++ wrapper type for IfcLightDistributionCurveEnum
+ typedef ENUMERATION IfcLightDistributionCurveEnum;
+ // C++ wrapper type for IfcLightEmissionSourceEnum
+ typedef ENUMERATION IfcLightEmissionSourceEnum;
+ // C++ wrapper type for IfcLightFixtureTypeEnum
+ typedef ENUMERATION IfcLightFixtureTypeEnum;
+ // C++ wrapper type for IfcLoadGroupTypeEnum
+ typedef ENUMERATION IfcLoadGroupTypeEnum;
+ // C++ wrapper type for IfcLogicalOperatorEnum
+ typedef ENUMERATION IfcLogicalOperatorEnum;
+ // C++ wrapper type for IfcMechanicalFastenerTypeEnum
+ typedef ENUMERATION IfcMechanicalFastenerTypeEnum;
+ // C++ wrapper type for IfcMedicalDeviceTypeEnum
+ typedef ENUMERATION IfcMedicalDeviceTypeEnum;
+ // C++ wrapper type for IfcMemberTypeEnum
+ typedef ENUMERATION IfcMemberTypeEnum;
+ // C++ wrapper type for IfcMotorConnectionTypeEnum
+ typedef ENUMERATION IfcMotorConnectionTypeEnum;
+ // C++ wrapper type for IfcNullStyle
+ typedef ENUMERATION IfcNullStyle;
+ // C++ wrapper type for IfcObjectTypeEnum
+ typedef ENUMERATION IfcObjectTypeEnum;
+ // C++ wrapper type for IfcObjectiveEnum
+ typedef ENUMERATION IfcObjectiveEnum;
+ // C++ wrapper type for IfcOccupantTypeEnum
+ typedef ENUMERATION IfcOccupantTypeEnum;
+ // C++ wrapper type for IfcOpeningElementTypeEnum
+ typedef ENUMERATION IfcOpeningElementTypeEnum;
+ // C++ wrapper type for IfcOutletTypeEnum
+ typedef ENUMERATION IfcOutletTypeEnum;
+ // C++ wrapper type for IfcPerformanceHistoryTypeEnum
+ typedef ENUMERATION IfcPerformanceHistoryTypeEnum;
+ // C++ wrapper type for IfcPermeableCoveringOperationEnum
+ typedef ENUMERATION IfcPermeableCoveringOperationEnum;
+ // C++ wrapper type for IfcPermitTypeEnum
+ typedef ENUMERATION IfcPermitTypeEnum;
+ // C++ wrapper type for IfcPhysicalOrVirtualEnum
+ typedef ENUMERATION IfcPhysicalOrVirtualEnum;
+ // C++ wrapper type for IfcPileConstructionEnum
+ typedef ENUMERATION IfcPileConstructionEnum;
+ // C++ wrapper type for IfcPileTypeEnum
+ typedef ENUMERATION IfcPileTypeEnum;
+ // C++ wrapper type for IfcPipeFittingTypeEnum
+ typedef ENUMERATION IfcPipeFittingTypeEnum;
+ // C++ wrapper type for IfcPipeSegmentTypeEnum
+ typedef ENUMERATION IfcPipeSegmentTypeEnum;
+ // C++ wrapper type for IfcPlateTypeEnum
+ typedef ENUMERATION IfcPlateTypeEnum;
+ // C++ wrapper type for IfcPreferredSurfaceCurveRepresentation
+ typedef ENUMERATION IfcPreferredSurfaceCurveRepresentation;
+ // C++ wrapper type for IfcProcedureTypeEnum
+ typedef ENUMERATION IfcProcedureTypeEnum;
+ // C++ wrapper type for IfcProfileTypeEnum
+ typedef ENUMERATION IfcProfileTypeEnum;
+ // C++ wrapper type for IfcProjectOrderTypeEnum
+ typedef ENUMERATION IfcProjectOrderTypeEnum;
+ // C++ wrapper type for IfcProjectedOrTrueLengthEnum
+ typedef ENUMERATION IfcProjectedOrTrueLengthEnum;
+ // C++ wrapper type for IfcProjectionElementTypeEnum
+ typedef ENUMERATION IfcProjectionElementTypeEnum;
+ // C++ wrapper type for IfcPropertySetTemplateTypeEnum
+ typedef ENUMERATION IfcPropertySetTemplateTypeEnum;
+ // C++ wrapper type for IfcProtectiveDeviceTrippingUnitTypeEnum
+ typedef ENUMERATION IfcProtectiveDeviceTrippingUnitTypeEnum;
+ // C++ wrapper type for IfcProtectiveDeviceTypeEnum
+ typedef ENUMERATION IfcProtectiveDeviceTypeEnum;
+ // C++ wrapper type for IfcPumpTypeEnum
+ typedef ENUMERATION IfcPumpTypeEnum;
+ // C++ wrapper type for IfcRailingTypeEnum
+ typedef ENUMERATION IfcRailingTypeEnum;
+ // C++ wrapper type for IfcRampFlightTypeEnum
+ typedef ENUMERATION IfcRampFlightTypeEnum;
+ // C++ wrapper type for IfcRampTypeEnum
+ typedef ENUMERATION IfcRampTypeEnum;
+ // C++ wrapper type for IfcRecurrenceTypeEnum
+ typedef ENUMERATION IfcRecurrenceTypeEnum;
+ // C++ wrapper type for IfcReflectanceMethodEnum
+ typedef ENUMERATION IfcReflectanceMethodEnum;
+ // C++ wrapper type for IfcReinforcingBarRoleEnum
+ typedef ENUMERATION IfcReinforcingBarRoleEnum;
+ // C++ wrapper type for IfcReinforcingBarSurfaceEnum
+ typedef ENUMERATION IfcReinforcingBarSurfaceEnum;
+ // C++ wrapper type for IfcReinforcingBarTypeEnum
+ typedef ENUMERATION IfcReinforcingBarTypeEnum;
+ // C++ wrapper type for IfcReinforcingMeshTypeEnum
+ typedef ENUMERATION IfcReinforcingMeshTypeEnum;
+ // C++ wrapper type for IfcRoleEnum
+ typedef ENUMERATION IfcRoleEnum;
+ // C++ wrapper type for IfcRoofTypeEnum
+ typedef ENUMERATION IfcRoofTypeEnum;
+ // C++ wrapper type for IfcSIPrefix
+ typedef ENUMERATION IfcSIPrefix;
+ // C++ wrapper type for IfcSIUnitName
+ typedef ENUMERATION IfcSIUnitName;
+ // C++ wrapper type for IfcSanitaryTerminalTypeEnum
+ typedef ENUMERATION IfcSanitaryTerminalTypeEnum;
+ // C++ wrapper type for IfcSectionTypeEnum
+ typedef ENUMERATION IfcSectionTypeEnum;
+ // C++ wrapper type for IfcSensorTypeEnum
+ typedef ENUMERATION IfcSensorTypeEnum;
+ // C++ wrapper type for IfcSequenceEnum
+ typedef ENUMERATION IfcSequenceEnum;
+ // C++ wrapper type for IfcShadingDeviceTypeEnum
+ typedef ENUMERATION IfcShadingDeviceTypeEnum;
+ // C++ wrapper type for IfcSimplePropertyTemplateTypeEnum
+ typedef ENUMERATION IfcSimplePropertyTemplateTypeEnum;
+ // C++ wrapper type for IfcSlabTypeEnum
+ typedef ENUMERATION IfcSlabTypeEnum;
+ // C++ wrapper type for IfcSolarDeviceTypeEnum
+ typedef ENUMERATION IfcSolarDeviceTypeEnum;
+ // C++ wrapper type for IfcSpaceHeaterTypeEnum
+ typedef ENUMERATION IfcSpaceHeaterTypeEnum;
+ // C++ wrapper type for IfcSpaceTypeEnum
+ typedef ENUMERATION IfcSpaceTypeEnum;
+ // C++ wrapper type for IfcSpatialZoneTypeEnum
+ typedef ENUMERATION IfcSpatialZoneTypeEnum;
+ // C++ wrapper type for IfcStackTerminalTypeEnum
+ typedef ENUMERATION IfcStackTerminalTypeEnum;
+ // C++ wrapper type for IfcStairFlightTypeEnum
+ typedef ENUMERATION IfcStairFlightTypeEnum;
+ // C++ wrapper type for IfcStairTypeEnum
+ typedef ENUMERATION IfcStairTypeEnum;
+ // C++ wrapper type for IfcStateEnum
+ typedef ENUMERATION IfcStateEnum;
+ // C++ wrapper type for IfcStructuralCurveActivityTypeEnum
+ typedef ENUMERATION IfcStructuralCurveActivityTypeEnum;
+ // C++ wrapper type for IfcStructuralCurveMemberTypeEnum
+ typedef ENUMERATION IfcStructuralCurveMemberTypeEnum;
+ // C++ wrapper type for IfcStructuralSurfaceActivityTypeEnum
+ typedef ENUMERATION IfcStructuralSurfaceActivityTypeEnum;
+ // C++ wrapper type for IfcStructuralSurfaceMemberTypeEnum
+ typedef ENUMERATION IfcStructuralSurfaceMemberTypeEnum;
+ // C++ wrapper type for IfcSubContractResourceTypeEnum
+ typedef ENUMERATION IfcSubContractResourceTypeEnum;
+ // C++ wrapper type for IfcSurfaceFeatureTypeEnum
+ typedef ENUMERATION IfcSurfaceFeatureTypeEnum;
+ // C++ wrapper type for IfcSurfaceSide
+ typedef ENUMERATION IfcSurfaceSide;
+ // C++ wrapper type for IfcSwitchingDeviceTypeEnum
+ typedef ENUMERATION IfcSwitchingDeviceTypeEnum;
+ // C++ wrapper type for IfcSystemFurnitureElementTypeEnum
+ typedef ENUMERATION IfcSystemFurnitureElementTypeEnum;
+ // C++ wrapper type for IfcTankTypeEnum
+ typedef ENUMERATION IfcTankTypeEnum;
+ // C++ wrapper type for IfcTaskDurationEnum
+ typedef ENUMERATION IfcTaskDurationEnum;
+ // C++ wrapper type for IfcTaskTypeEnum
+ typedef ENUMERATION IfcTaskTypeEnum;
+ // C++ wrapper type for IfcTendonAnchorTypeEnum
+ typedef ENUMERATION IfcTendonAnchorTypeEnum;
+ // C++ wrapper type for IfcTendonTypeEnum
+ typedef ENUMERATION IfcTendonTypeEnum;
+ // C++ wrapper type for IfcTextPath
+ typedef ENUMERATION IfcTextPath;
+ // C++ wrapper type for IfcTimeSeriesDataTypeEnum
+ typedef ENUMERATION IfcTimeSeriesDataTypeEnum;
+ // C++ wrapper type for IfcTransformerTypeEnum
+ typedef ENUMERATION IfcTransformerTypeEnum;
+ // C++ wrapper type for IfcTransitionCode
+ typedef ENUMERATION IfcTransitionCode;
+ // C++ wrapper type for IfcTransportElementTypeEnum
+ typedef ENUMERATION IfcTransportElementTypeEnum;
+ // C++ wrapper type for IfcTrimmingPreference
+ typedef ENUMERATION IfcTrimmingPreference;
+ // C++ wrapper type for IfcTubeBundleTypeEnum
+ typedef ENUMERATION IfcTubeBundleTypeEnum;
+ // C++ wrapper type for IfcUnitEnum
+ typedef ENUMERATION IfcUnitEnum;
+ // C++ wrapper type for IfcUnitaryControlElementTypeEnum
+ typedef ENUMERATION IfcUnitaryControlElementTypeEnum;
+ // C++ wrapper type for IfcUnitaryEquipmentTypeEnum
+ typedef ENUMERATION IfcUnitaryEquipmentTypeEnum;
+ // C++ wrapper type for IfcValveTypeEnum
+ typedef ENUMERATION IfcValveTypeEnum;
+ // C++ wrapper type for IfcVibrationIsolatorTypeEnum
+ typedef ENUMERATION IfcVibrationIsolatorTypeEnum;
+ // C++ wrapper type for IfcVoidingFeatureTypeEnum
+ typedef ENUMERATION IfcVoidingFeatureTypeEnum;
+ // C++ wrapper type for IfcWallTypeEnum
+ typedef ENUMERATION IfcWallTypeEnum;
+ // C++ wrapper type for IfcWasteTerminalTypeEnum
+ typedef ENUMERATION IfcWasteTerminalTypeEnum;
+ // C++ wrapper type for IfcWindowPanelOperationEnum
+ typedef ENUMERATION IfcWindowPanelOperationEnum;
+ // C++ wrapper type for IfcWindowPanelPositionEnum
+ typedef ENUMERATION IfcWindowPanelPositionEnum;
+ // C++ wrapper type for IfcWindowStyleConstructionEnum
+ typedef ENUMERATION IfcWindowStyleConstructionEnum;
+ // C++ wrapper type for IfcWindowStyleOperationEnum
+ typedef ENUMERATION IfcWindowStyleOperationEnum;
+ // C++ wrapper type for IfcWindowTypeEnum
+ typedef ENUMERATION IfcWindowTypeEnum;
+ // C++ wrapper type for IfcWindowTypePartitioningEnum
+ typedef ENUMERATION IfcWindowTypePartitioningEnum;
+ // C++ wrapper type for IfcWorkCalendarTypeEnum
+ typedef ENUMERATION IfcWorkCalendarTypeEnum;
+ // C++ wrapper type for IfcWorkPlanTypeEnum
+ typedef ENUMERATION IfcWorkPlanTypeEnum;
+ // C++ wrapper type for IfcWorkScheduleTypeEnum
+ typedef ENUMERATION IfcWorkScheduleTypeEnum;
+ // C++ wrapper type for IfcActorSelect
+ typedef SELECT IfcActorSelect;
+ // C++ wrapper type for IfcAppliedValueSelect
+ typedef SELECT IfcAppliedValueSelect;
+ // C++ wrapper type for IfcAxis2Placement
+ typedef SELECT IfcAxis2Placement;
+ // C++ wrapper type for IfcBendingParameterSelect
+ typedef SELECT IfcBendingParameterSelect;
+ // C++ wrapper type for IfcBooleanOperand
+ typedef SELECT IfcBooleanOperand;
+ // C++ wrapper type for IfcClassificationReferenceSelect
+ typedef SELECT IfcClassificationReferenceSelect;
+ // C++ wrapper type for IfcClassificationSelect
+ typedef SELECT IfcClassificationSelect;
+ // C++ wrapper type for IfcColour
+ typedef SELECT IfcColour;
+ // C++ wrapper type for IfcColourOrFactor
+ typedef SELECT IfcColourOrFactor;
+ // C++ wrapper type for IfcCoordinateReferenceSystemSelect
+ typedef SELECT IfcCoordinateReferenceSystemSelect;
+ // C++ wrapper type for IfcCsgSelect
+ typedef SELECT IfcCsgSelect;
+ // C++ wrapper type for IfcCurveFontOrScaledCurveFontSelect
+ typedef SELECT IfcCurveFontOrScaledCurveFontSelect;
+ // C++ wrapper type for IfcCurveOnSurface
+ typedef SELECT IfcCurveOnSurface;
+ // C++ wrapper type for IfcCurveOrEdgeCurve
+ typedef SELECT IfcCurveOrEdgeCurve;
+ // C++ wrapper type for IfcCurveStyleFontSelect
+ typedef SELECT IfcCurveStyleFontSelect;
+ // C++ wrapper type for IfcDefinitionSelect
+ typedef SELECT IfcDefinitionSelect;
+ // C++ wrapper type for IfcDerivedMeasureValue
+ typedef SELECT IfcDerivedMeasureValue;
+ // C++ wrapper type for IfcDocumentSelect
+ typedef SELECT IfcDocumentSelect;
+ // C++ wrapper type for IfcFillStyleSelect
+ typedef SELECT IfcFillStyleSelect;
+ // C++ wrapper type for IfcGeometricSetSelect
+ typedef SELECT IfcGeometricSetSelect;
+ // C++ wrapper type for IfcGridPlacementDirectionSelect
+ typedef SELECT IfcGridPlacementDirectionSelect;
+ // C++ wrapper type for IfcHatchLineDistanceSelect
+ typedef SELECT IfcHatchLineDistanceSelect;
+ // C++ wrapper type for IfcLayeredItem
+ typedef SELECT IfcLayeredItem;
+ // C++ wrapper type for IfcLibrarySelect
+ typedef SELECT IfcLibrarySelect;
+ // C++ wrapper type for IfcLightDistributionDataSourceSelect
+ typedef SELECT IfcLightDistributionDataSourceSelect;
+ // C++ wrapper type for IfcMaterialSelect
+ typedef SELECT IfcMaterialSelect;
+ // C++ wrapper type for IfcMeasureValue
+ typedef SELECT IfcMeasureValue;
+ // C++ wrapper type for IfcMetricValueSelect
+ typedef SELECT IfcMetricValueSelect;
+ // C++ wrapper type for IfcModulusOfRotationalSubgradeReactionSelect
+ typedef SELECT IfcModulusOfRotationalSubgradeReactionSelect;
+ // C++ wrapper type for IfcModulusOfSubgradeReactionSelect
+ typedef SELECT IfcModulusOfSubgradeReactionSelect;
+ // C++ wrapper type for IfcModulusOfTranslationalSubgradeReactionSelect
+ typedef SELECT IfcModulusOfTranslationalSubgradeReactionSelect;
+ // C++ wrapper type for IfcObjectReferenceSelect
+ typedef SELECT IfcObjectReferenceSelect;
+ // C++ wrapper type for IfcPointOrVertexPoint
+ typedef SELECT IfcPointOrVertexPoint;
+ // C++ wrapper type for IfcPresentationStyleSelect
+ typedef SELECT IfcPresentationStyleSelect;
+ // C++ wrapper type for IfcProcessSelect
+ typedef SELECT IfcProcessSelect;
+ // C++ wrapper type for IfcProductRepresentationSelect
+ typedef SELECT IfcProductRepresentationSelect;
+ // C++ wrapper type for IfcProductSelect
+ typedef SELECT IfcProductSelect;
+ // C++ wrapper type for IfcPropertySetDefinitionSelect
+ typedef SELECT IfcPropertySetDefinitionSelect;
+ // C++ wrapper type for IfcResourceObjectSelect
+ typedef SELECT IfcResourceObjectSelect;
+ // C++ wrapper type for IfcResourceSelect
+ typedef SELECT IfcResourceSelect;
+ // C++ wrapper type for IfcRotationalStiffnessSelect
+ typedef SELECT IfcRotationalStiffnessSelect;
+ // C++ wrapper type for IfcSegmentIndexSelect
+ typedef SELECT IfcSegmentIndexSelect;
+ // C++ wrapper type for IfcShell
+ typedef SELECT IfcShell;
+ // C++ wrapper type for IfcSimpleValue
+ typedef SELECT IfcSimpleValue;
+ // C++ wrapper type for IfcSizeSelect
+ typedef SELECT IfcSizeSelect;
+ // C++ wrapper type for IfcSolidOrShell
+ typedef SELECT IfcSolidOrShell;
+ // C++ wrapper type for IfcSpaceBoundarySelect
+ typedef SELECT IfcSpaceBoundarySelect;
+ // C++ wrapper type for IfcSpecularHighlightSelect
+ typedef SELECT IfcSpecularHighlightSelect;
+ // C++ wrapper type for IfcStructuralActivityAssignmentSelect
+ typedef SELECT IfcStructuralActivityAssignmentSelect;
+ // C++ wrapper type for IfcStyleAssignmentSelect
+ typedef SELECT IfcStyleAssignmentSelect;
+ // C++ wrapper type for IfcSurfaceOrFaceSurface
+ typedef SELECT IfcSurfaceOrFaceSurface;
+ // C++ wrapper type for IfcSurfaceStyleElementSelect
+ typedef SELECT IfcSurfaceStyleElementSelect;
+ // C++ wrapper type for IfcTextFontSelect
+ typedef SELECT IfcTextFontSelect;
+ // C++ wrapper type for IfcTimeOrRatioSelect
+ typedef SELECT IfcTimeOrRatioSelect;
+ // C++ wrapper type for IfcTranslationalStiffnessSelect
+ typedef SELECT IfcTranslationalStiffnessSelect;
+ // C++ wrapper type for IfcTrimmingSelect
+ typedef SELECT IfcTrimmingSelect;
+ // C++ wrapper type for IfcUnit
+ typedef SELECT IfcUnit;
+ // C++ wrapper type for IfcValue
+ typedef SELECT IfcValue;
+ // C++ wrapper type for IfcVectorOrDirection
+ typedef SELECT IfcVectorOrDirection;
+ // C++ wrapper type for IfcWarpingStiffnessSelect
+ typedef SELECT IfcWarpingStiffnessSelect;
+
+
+ // ******************************************************************************
+ // IFC Entities
+ // ******************************************************************************
+
+ struct IfcRoot;
+ struct IfcObjectDefinition;
+ struct IfcObject;
+ struct IfcControl;
+ struct IfcActionRequest;
+ struct IfcActor;
+ typedef NotImplemented IfcActorRole; // (not currently used by Assimp)
+ struct IfcProduct;
+ struct IfcElement;
+ struct IfcDistributionElement;
+ struct IfcDistributionControlElement;
+ struct IfcActuator;
+ struct IfcTypeObject;
+ struct IfcTypeProduct;
+ struct IfcElementType;
+ struct IfcDistributionElementType;
+ struct IfcDistributionControlElementType;
+ struct IfcActuatorType;
+ typedef NotImplemented IfcAddress; // (not currently used by Assimp)
+ struct IfcRepresentationItem;
+ struct IfcGeometricRepresentationItem;
+ struct IfcSolidModel;
+ struct IfcManifoldSolidBrep;
+ struct IfcAdvancedBrep;
+ struct IfcAdvancedBrepWithVoids;
+ struct IfcTopologicalRepresentationItem;
+ struct IfcFace;
+ struct IfcFaceSurface;
+ struct IfcAdvancedFace;
+ struct IfcDistributionFlowElement;
+ struct IfcFlowTerminal;
+ struct IfcAirTerminal;
+ struct IfcFlowController;
+ struct IfcAirTerminalBox;
+ struct IfcDistributionFlowElementType;
+ struct IfcFlowControllerType;
+ struct IfcAirTerminalBoxType;
+ struct IfcFlowTerminalType;
+ struct IfcAirTerminalType;
+ struct IfcEnergyConversionDevice;
+ struct IfcAirToAirHeatRecovery;
+ struct IfcEnergyConversionDeviceType;
+ struct IfcAirToAirHeatRecoveryType;
+ struct IfcAlarm;
+ struct IfcAlarmType;
+ struct IfcAnnotation;
+ struct IfcAnnotationFillArea;
+ typedef NotImplemented IfcApplication; // (not currently used by Assimp)
+ typedef NotImplemented IfcAppliedValue; // (not currently used by Assimp)
+ typedef NotImplemented IfcApproval; // (not currently used by Assimp)
+ typedef NotImplemented IfcResourceLevelRelationship; // (not currently used by Assimp)
+ typedef NotImplemented IfcApprovalRelationship; // (not currently used by Assimp)
+ struct IfcProfileDef;
+ struct IfcArbitraryClosedProfileDef;
+ struct IfcArbitraryOpenProfileDef;
+ struct IfcArbitraryProfileDefWithVoids;
+ struct IfcGroup;
+ struct IfcAsset;
+ struct IfcParameterizedProfileDef;
+ struct IfcAsymmetricIShapeProfileDef;
+ struct IfcAudioVisualAppliance;
+ struct IfcAudioVisualApplianceType;
+ struct IfcPlacement;
+ struct IfcAxis1Placement;
+ struct IfcAxis2Placement2D;
+ struct IfcAxis2Placement3D;
+ struct IfcCurve;
+ struct IfcBoundedCurve;
+ struct IfcBSplineCurve;
+ struct IfcBSplineCurveWithKnots;
+ struct IfcSurface;
+ struct IfcBoundedSurface;
+ struct IfcBSplineSurface;
+ struct IfcBSplineSurfaceWithKnots;
+ struct IfcBuildingElement;
+ struct IfcBeam;
+ struct IfcBeamStandardCase;
+ struct IfcBuildingElementType;
+ struct IfcBeamType;
+ struct IfcPresentationItem;
+ typedef NotImplemented IfcSurfaceTexture; // (not currently used by Assimp)
+ typedef NotImplemented IfcBlobTexture; // (not currently used by Assimp)
+ struct IfcCsgPrimitive3D;
+ struct IfcBlock;
+ struct IfcBoiler;
+ struct IfcBoilerType;
+ struct IfcBooleanResult;
+ struct IfcBooleanClippingResult;
+ typedef NotImplemented IfcBoundaryCondition; // (not currently used by Assimp)
+ struct IfcCompositeCurve;
+ struct IfcCompositeCurveOnSurface;
+ struct IfcBoundaryCurve;
+ typedef NotImplemented IfcBoundaryEdgeCondition; // (not currently used by Assimp)
+ typedef NotImplemented IfcBoundaryFaceCondition; // (not currently used by Assimp)
+ typedef NotImplemented IfcBoundaryNodeCondition; // (not currently used by Assimp)
+ typedef NotImplemented IfcBoundaryNodeConditionWarping; // (not currently used by Assimp)
+ struct IfcBoundingBox;
+ struct IfcHalfSpaceSolid;
+ struct IfcBoxedHalfSpace;
+ struct IfcSpatialElement;
+ struct IfcSpatialStructureElement;
+ struct IfcBuilding;
+ struct IfcElementComponent;
+ struct IfcBuildingElementPart;
+ struct IfcElementComponentType;
+ struct IfcBuildingElementPartType;
+ struct IfcBuildingElementProxy;
+ struct IfcBuildingElementProxyType;
+ struct IfcBuildingStorey;
+ struct IfcSystem;
+ struct IfcBuildingSystem;
+ struct IfcBurner;
+ struct IfcBurnerType;
+ struct IfcCShapeProfileDef;
+ struct IfcFlowFitting;
+ struct IfcCableCarrierFitting;
+ struct IfcFlowFittingType;
+ struct IfcCableCarrierFittingType;
+ struct IfcFlowSegment;
+ struct IfcCableCarrierSegment;
+ struct IfcFlowSegmentType;
+ struct IfcCableCarrierSegmentType;
+ struct IfcCableFitting;
+ struct IfcCableFittingType;
+ struct IfcCableSegment;
+ struct IfcCableSegmentType;
+ struct IfcPoint;
+ struct IfcCartesianPoint;
+ struct IfcCartesianPointList;
+ struct IfcCartesianPointList2D;
+ struct IfcCartesianPointList3D;
+ struct IfcCartesianTransformationOperator;
+ struct IfcCartesianTransformationOperator2D;
+ struct IfcCartesianTransformationOperator2DnonUniform;
+ struct IfcCartesianTransformationOperator3D;
+ struct IfcCartesianTransformationOperator3DnonUniform;
+ struct IfcCenterLineProfileDef;
+ struct IfcChiller;
+ struct IfcChillerType;
+ struct IfcChimney;
+ struct IfcChimneyType;
+ struct IfcConic;
+ struct IfcCircle;
+ struct IfcCircleProfileDef;
+ struct IfcCircleHollowProfileDef;
+ struct IfcCivilElement;
+ struct IfcCivilElementType;
+ typedef NotImplemented IfcExternalInformation; // (not currently used by Assimp)
+ typedef NotImplemented IfcClassification; // (not currently used by Assimp)
+ typedef NotImplemented IfcExternalReference; // (not currently used by Assimp)
+ typedef NotImplemented IfcClassificationReference; // (not currently used by Assimp)
+ struct IfcConnectedFaceSet;
+ struct IfcClosedShell;
+ struct IfcCoil;
+ struct IfcCoilType;
+ struct IfcColourSpecification;
+ struct IfcColourRgb;
+ typedef NotImplemented IfcColourRgbList; // (not currently used by Assimp)
+ struct IfcColumn;
+ struct IfcColumnStandardCase;
+ struct IfcColumnType;
+ struct IfcCommunicationsAppliance;
+ struct IfcCommunicationsApplianceType;
+ struct IfcPropertyAbstraction;
+ struct IfcProperty;
+ struct IfcComplexProperty;
+ struct IfcPropertyDefinition;
+ typedef NotImplemented IfcPropertyTemplateDefinition; // (not currently used by Assimp)
+ typedef NotImplemented IfcPropertyTemplate; // (not currently used by Assimp)
+ typedef NotImplemented IfcComplexPropertyTemplate; // (not currently used by Assimp)
+ struct IfcCompositeCurveSegment;
+ struct IfcCompositeProfileDef;
+ struct IfcFlowMovingDevice;
+ struct IfcCompressor;
+ struct IfcFlowMovingDeviceType;
+ struct IfcCompressorType;
+ struct IfcCondenser;
+ struct IfcCondenserType;
+ typedef NotImplemented IfcConnectionGeometry; // (not currently used by Assimp)
+ typedef NotImplemented IfcConnectionCurveGeometry; // (not currently used by Assimp)
+ typedef NotImplemented IfcConnectionPointGeometry; // (not currently used by Assimp)
+ typedef NotImplemented IfcConnectionPointEccentricity; // (not currently used by Assimp)
+ typedef NotImplemented IfcConnectionSurfaceGeometry; // (not currently used by Assimp)
+ typedef NotImplemented IfcConnectionVolumeGeometry; // (not currently used by Assimp)
+ typedef NotImplemented IfcConstraint; // (not currently used by Assimp)
+ struct IfcResource;
+ struct IfcConstructionResource;
+ struct IfcConstructionEquipmentResource;
+ struct IfcTypeResource;
+ struct IfcConstructionResourceType;
+ struct IfcConstructionEquipmentResourceType;
+ struct IfcConstructionMaterialResource;
+ struct IfcConstructionMaterialResourceType;
+ struct IfcConstructionProductResource;
+ struct IfcConstructionProductResourceType;
+ struct IfcContext;
+ struct IfcNamedUnit;
+ struct IfcContextDependentUnit;
+ struct IfcController;
+ struct IfcControllerType;
+ struct IfcConversionBasedUnit;
+ struct IfcConversionBasedUnitWithOffset;
+ struct IfcCooledBeam;
+ struct IfcCooledBeamType;
+ struct IfcCoolingTower;
+ struct IfcCoolingTowerType;
+ typedef NotImplemented IfcCoordinateOperation; // (not currently used by Assimp)
+ typedef NotImplemented IfcCoordinateReferenceSystem; // (not currently used by Assimp)
+ struct IfcCostItem;
+ struct IfcCostSchedule;
+ typedef NotImplemented IfcCostValue; // (not currently used by Assimp)
+ struct IfcCovering;
+ struct IfcCoveringType;
+ struct IfcCrewResource;
+ struct IfcCrewResourceType;
+ struct IfcCsgSolid;
+ typedef NotImplemented IfcCurrencyRelationship; // (not currently used by Assimp)
+ struct IfcCurtainWall;
+ struct IfcCurtainWallType;
+ struct IfcCurveBoundedPlane;
+ struct IfcCurveBoundedSurface;
+ struct IfcPresentationStyle;
+ typedef NotImplemented IfcCurveStyle; // (not currently used by Assimp)
+ typedef NotImplemented IfcCurveStyleFont; // (not currently used by Assimp)
+ typedef NotImplemented IfcCurveStyleFontAndScaling; // (not currently used by Assimp)
+ typedef NotImplemented IfcCurveStyleFontPattern; // (not currently used by Assimp)
+ struct IfcElementarySurface;
+ struct IfcCylindricalSurface;
+ struct IfcDamper;
+ struct IfcDamperType;
+ struct IfcDerivedProfileDef;
+ typedef NotImplemented IfcDerivedUnit; // (not currently used by Assimp)
+ typedef NotImplemented IfcDerivedUnitElement; // (not currently used by Assimp)
+ typedef NotImplemented IfcDimensionalExponents; // (not currently used by Assimp)
+ struct IfcDirection;
+ struct IfcDiscreteAccessory;
+ struct IfcDiscreteAccessoryType;
+ struct IfcDistributionChamberElement;
+ struct IfcDistributionChamberElementType;
+ struct IfcDistributionSystem;
+ struct IfcDistributionCircuit;
+ struct IfcPort;
+ struct IfcDistributionPort;
+ typedef NotImplemented IfcDocumentInformation; // (not currently used by Assimp)
+ typedef NotImplemented IfcDocumentInformationRelationship; // (not currently used by Assimp)
+ typedef NotImplemented IfcDocumentReference; // (not currently used by Assimp)
+ struct IfcDoor;
+ struct IfcPropertySetDefinition;
+ typedef NotImplemented IfcPreDefinedPropertySet; // (not currently used by Assimp)
+ typedef NotImplemented IfcDoorLiningProperties; // (not currently used by Assimp)
+ typedef NotImplemented IfcDoorPanelProperties; // (not currently used by Assimp)
+ struct IfcDoorStandardCase;
+ struct IfcDoorStyle;
+ struct IfcDoorType;
+ typedef NotImplemented IfcPreDefinedItem; // (not currently used by Assimp)
+ typedef NotImplemented IfcPreDefinedColour; // (not currently used by Assimp)
+ typedef NotImplemented IfcDraughtingPreDefinedColour; // (not currently used by Assimp)
+ typedef NotImplemented IfcPreDefinedCurveFont; // (not currently used by Assimp)
+ typedef NotImplemented IfcDraughtingPreDefinedCurveFont; // (not currently used by Assimp)
+ struct IfcDuctFitting;
+ struct IfcDuctFittingType;
+ struct IfcDuctSegment;
+ struct IfcDuctSegmentType;
+ struct IfcFlowTreatmentDevice;
+ struct IfcDuctSilencer;
+ struct IfcFlowTreatmentDeviceType;
+ struct IfcDuctSilencerType;
+ struct IfcEdge;
+ struct IfcEdgeCurve;
+ struct IfcLoop;
+ struct IfcEdgeLoop;
+ struct IfcElectricAppliance;
+ struct IfcElectricApplianceType;
+ struct IfcElectricDistributionBoard;
+ struct IfcElectricDistributionBoardType;
+ struct IfcFlowStorageDevice;
+ struct IfcElectricFlowStorageDevice;
+ struct IfcFlowStorageDeviceType;
+ struct IfcElectricFlowStorageDeviceType;
+ struct IfcElectricGenerator;
+ struct IfcElectricGeneratorType;
+ struct IfcElectricMotor;
+ struct IfcElectricMotorType;
+ struct IfcElectricTimeControl;
+ struct IfcElectricTimeControlType;
+ struct IfcElementAssembly;
+ struct IfcElementAssemblyType;
+ struct IfcQuantitySet;
+ struct IfcElementQuantity;
+ struct IfcEllipse;
+ struct IfcEllipseProfileDef;
+ struct IfcEngine;
+ struct IfcEngineType;
+ struct IfcEvaporativeCooler;
+ struct IfcEvaporativeCoolerType;
+ struct IfcEvaporator;
+ struct IfcEvaporatorType;
+ struct IfcProcess;
+ struct IfcEvent;
+ typedef NotImplemented IfcSchedulingTime; // (not currently used by Assimp)
+ typedef NotImplemented IfcEventTime; // (not currently used by Assimp)
+ struct IfcTypeProcess;
+ struct IfcEventType;
+ typedef NotImplemented IfcExtendedProperties; // (not currently used by Assimp)
+ typedef NotImplemented IfcExternalReferenceRelationship; // (not currently used by Assimp)
+ struct IfcExternalSpatialStructureElement;
+ struct IfcExternalSpatialElement;
+ typedef NotImplemented IfcExternallyDefinedHatchStyle; // (not currently used by Assimp)
+ typedef NotImplemented IfcExternallyDefinedSurfaceStyle; // (not currently used by Assimp)
+ typedef NotImplemented IfcExternallyDefinedTextFont; // (not currently used by Assimp)
+ struct IfcSweptAreaSolid;
+ struct IfcExtrudedAreaSolid;
+ struct IfcExtrudedAreaSolidTapered;
+ struct IfcFaceBasedSurfaceModel;
+ struct IfcFaceBound;
+ struct IfcFaceOuterBound;
+ struct IfcFacetedBrep;
+ struct IfcFacetedBrepWithVoids;
+ typedef NotImplemented IfcStructuralConnectionCondition; // (not currently used by Assimp)
+ typedef NotImplemented IfcFailureConnectionCondition; // (not currently used by Assimp)
+ struct IfcFan;
+ struct IfcFanType;
+ struct IfcFastener;
+ struct IfcFastenerType;
+ struct IfcFeatureElement;
+ struct IfcFeatureElementAddition;
+ struct IfcFeatureElementSubtraction;
+ typedef NotImplemented IfcFillAreaStyle; // (not currently used by Assimp)
+ struct IfcFillAreaStyleHatching;
+ struct IfcFillAreaStyleTiles;
+ struct IfcFilter;
+ struct IfcFilterType;
+ struct IfcFireSuppressionTerminal;
+ struct IfcFireSuppressionTerminalType;
+ struct IfcFixedReferenceSweptAreaSolid;
+ struct IfcFlowInstrument;
+ struct IfcFlowInstrumentType;
+ struct IfcFlowMeter;
+ struct IfcFlowMeterType;
+ struct IfcFooting;
+ struct IfcFootingType;
+ struct IfcFurnishingElement;
+ struct IfcFurnishingElementType;
+ struct IfcFurniture;
+ struct IfcFurnitureType;
+ struct IfcGeographicElement;
+ struct IfcGeographicElementType;
+ struct IfcGeometricSet;
+ struct IfcGeometricCurveSet;
+ struct IfcRepresentationContext;
+ struct IfcGeometricRepresentationContext;
+ struct IfcGeometricRepresentationSubContext;
+ struct IfcGrid;
+ typedef NotImplemented IfcGridAxis; // (not currently used by Assimp)
+ struct IfcObjectPlacement;
+ struct IfcGridPlacement;
+ struct IfcHeatExchanger;
+ struct IfcHeatExchangerType;
+ struct IfcHumidifier;
+ struct IfcHumidifierType;
+ struct IfcIShapeProfileDef;
+ typedef NotImplemented IfcImageTexture; // (not currently used by Assimp)
+ typedef NotImplemented IfcIndexedColourMap; // (not currently used by Assimp)
+ struct IfcIndexedPolyCurve;
+ struct IfcTessellatedItem;
+ struct IfcIndexedPolygonalFace;
+ struct IfcIndexedPolygonalFaceWithVoids;
+ typedef NotImplemented IfcTextureCoordinate; // (not currently used by Assimp)
+ typedef NotImplemented IfcIndexedTextureMap; // (not currently used by Assimp)
+ typedef NotImplemented IfcIndexedTriangleTextureMap; // (not currently used by Assimp)
+ struct IfcInterceptor;
+ struct IfcInterceptorType;
+ struct IfcSurfaceCurve;
+ struct IfcIntersectionCurve;
+ struct IfcInventory;
+ typedef NotImplemented IfcTimeSeries; // (not currently used by Assimp)
+ typedef NotImplemented IfcIrregularTimeSeries; // (not currently used by Assimp)
+ typedef NotImplemented IfcIrregularTimeSeriesValue; // (not currently used by Assimp)
+ struct IfcJunctionBox;
+ struct IfcJunctionBoxType;
+ struct IfcLShapeProfileDef;
+ struct IfcLaborResource;
+ struct IfcLaborResourceType;
+ typedef NotImplemented IfcLagTime; // (not currently used by Assimp)
+ struct IfcLamp;
+ struct IfcLampType;
+ typedef NotImplemented IfcLibraryInformation; // (not currently used by Assimp)
+ typedef NotImplemented IfcLibraryReference; // (not currently used by Assimp)
+ typedef NotImplemented IfcLightDistributionData; // (not currently used by Assimp)
+ struct IfcLightFixture;
+ struct IfcLightFixtureType;
+ typedef NotImplemented IfcLightIntensityDistribution; // (not currently used by Assimp)
+ struct IfcLightSource;
+ struct IfcLightSourceAmbient;
+ struct IfcLightSourceDirectional;
+ struct IfcLightSourceGoniometric;
+ struct IfcLightSourcePositional;
+ struct IfcLightSourceSpot;
+ struct IfcLine;
+ struct IfcLocalPlacement;
+ typedef NotImplemented IfcMapConversion; // (not currently used by Assimp)
+ struct IfcMappedItem;
+ typedef NotImplemented IfcMaterialDefinition; // (not currently used by Assimp)
+ typedef NotImplemented IfcMaterial; // (not currently used by Assimp)
+ typedef NotImplemented IfcMaterialClassificationRelationship; // (not currently used by Assimp)
+ typedef NotImplemented IfcMaterialConstituent; // (not currently used by Assimp)
+ typedef NotImplemented IfcMaterialConstituentSet; // (not currently used by Assimp)
+ struct IfcProductRepresentation;
+ struct IfcMaterialDefinitionRepresentation;
+ typedef NotImplemented IfcMaterialLayer; // (not currently used by Assimp)
+ typedef NotImplemented IfcMaterialLayerSet; // (not currently used by Assimp)
+ typedef NotImplemented IfcMaterialUsageDefinition; // (not currently used by Assimp)
+ typedef NotImplemented IfcMaterialLayerSetUsage; // (not currently used by Assimp)
+ typedef NotImplemented IfcMaterialLayerWithOffsets; // (not currently used by Assimp)
+ typedef NotImplemented IfcMaterialList; // (not currently used by Assimp)
+ typedef NotImplemented IfcMaterialProfile; // (not currently used by Assimp)
+ typedef NotImplemented IfcMaterialProfileSet; // (not currently used by Assimp)
+ typedef NotImplemented IfcMaterialProfileSetUsage; // (not currently used by Assimp)
+ typedef NotImplemented IfcMaterialProfileSetUsageTapering; // (not currently used by Assimp)
+ typedef NotImplemented IfcMaterialProfileWithOffsets; // (not currently used by Assimp)
+ typedef NotImplemented IfcMaterialProperties; // (not currently used by Assimp)
+ typedef NotImplemented IfcMaterialRelationship; // (not currently used by Assimp)
+ struct IfcMeasureWithUnit;
+ struct IfcMechanicalFastener;
+ struct IfcMechanicalFastenerType;
+ struct IfcMedicalDevice;
+ struct IfcMedicalDeviceType;
+ struct IfcMember;
+ struct IfcMemberStandardCase;
+ struct IfcMemberType;
+ typedef NotImplemented IfcMetric; // (not currently used by Assimp)
+ struct IfcMirroredProfileDef;
+ typedef NotImplemented IfcMonetaryUnit; // (not currently used by Assimp)
+ struct IfcMotorConnection;
+ struct IfcMotorConnectionType;
+ typedef NotImplemented IfcObjective; // (not currently used by Assimp)
+ struct IfcOccupant;
+ struct IfcOffsetCurve2D;
+ struct IfcOffsetCurve3D;
+ struct IfcOpenShell;
+ struct IfcOpeningElement;
+ struct IfcOpeningStandardCase;
+ typedef NotImplemented IfcOrganization; // (not currently used by Assimp)
+ typedef NotImplemented IfcOrganizationRelationship; // (not currently used by Assimp)
+ struct IfcOrientedEdge;
+ struct IfcOuterBoundaryCurve;
+ struct IfcOutlet;
+ struct IfcOutletType;
+ typedef NotImplemented IfcOwnerHistory; // (not currently used by Assimp)
+ struct IfcPath;
+ struct IfcPcurve;
+ struct IfcPerformanceHistory;
+ typedef NotImplemented IfcPermeableCoveringProperties; // (not currently used by Assimp)
+ struct IfcPermit;
+ typedef NotImplemented IfcPerson; // (not currently used by Assimp)
+ typedef NotImplemented IfcPersonAndOrganization; // (not currently used by Assimp)
+ typedef NotImplemented IfcPhysicalQuantity; // (not currently used by Assimp)
+ typedef NotImplemented IfcPhysicalComplexQuantity; // (not currently used by Assimp)
+ typedef NotImplemented IfcPhysicalSimpleQuantity; // (not currently used by Assimp)
+ struct IfcPile;
+ struct IfcPileType;
+ struct IfcPipeFitting;
+ struct IfcPipeFittingType;
+ struct IfcPipeSegment;
+ struct IfcPipeSegmentType;
+ typedef NotImplemented IfcPixelTexture; // (not currently used by Assimp)
+ struct IfcPlanarExtent;
+ struct IfcPlanarBox;
+ struct IfcPlane;
+ struct IfcPlate;
+ struct IfcPlateStandardCase;
+ struct IfcPlateType;
+ struct IfcPointOnCurve;
+ struct IfcPointOnSurface;
+ struct IfcPolyLoop;
+ struct IfcPolygonalBoundedHalfSpace;
+ struct IfcTessellatedFaceSet;
+ struct IfcPolygonalFaceSet;
+ struct IfcPolyline;
+ typedef NotImplemented IfcPostalAddress; // (not currently used by Assimp)
+ typedef NotImplemented IfcPreDefinedProperties; // (not currently used by Assimp)
+ typedef NotImplemented IfcPreDefinedTextFont; // (not currently used by Assimp)
+ typedef NotImplemented IfcPresentationLayerAssignment; // (not currently used by Assimp)
+ typedef NotImplemented IfcPresentationLayerWithStyle; // (not currently used by Assimp)
+ struct IfcPresentationStyleAssignment;
+ struct IfcProcedure;
+ struct IfcProcedureType;
+ struct IfcProductDefinitionShape;
+ typedef NotImplemented IfcProfileProperties; // (not currently used by Assimp)
+ struct IfcProject;
+ struct IfcProjectLibrary;
+ struct IfcProjectOrder;
+ typedef NotImplemented IfcProjectedCRS; // (not currently used by Assimp)
+ struct IfcProjectionElement;
+ struct IfcSimpleProperty;
+ struct IfcPropertyBoundedValue;
+ typedef NotImplemented IfcPropertyDependencyRelationship; // (not currently used by Assimp)
+ struct IfcPropertyEnumeratedValue;
+ typedef NotImplemented IfcPropertyEnumeration; // (not currently used by Assimp)
+ struct IfcPropertyListValue;
+ struct IfcPropertyReferenceValue;
+ struct IfcPropertySet;
+ typedef NotImplemented IfcPropertySetTemplate; // (not currently used by Assimp)
+ struct IfcPropertySingleValue;
+ struct IfcPropertyTableValue;
+ struct IfcProtectiveDevice;
+ struct IfcProtectiveDeviceTrippingUnit;
+ struct IfcProtectiveDeviceTrippingUnitType;
+ struct IfcProtectiveDeviceType;
+ struct IfcProxy;
+ struct IfcPump;
+ struct IfcPumpType;
+ typedef NotImplemented IfcQuantityArea; // (not currently used by Assimp)
+ typedef NotImplemented IfcQuantityCount; // (not currently used by Assimp)
+ typedef NotImplemented IfcQuantityLength; // (not currently used by Assimp)
+ typedef NotImplemented IfcQuantityTime; // (not currently used by Assimp)
+ typedef NotImplemented IfcQuantityVolume; // (not currently used by Assimp)
+ typedef NotImplemented IfcQuantityWeight; // (not currently used by Assimp)
+ struct IfcRailing;
+ struct IfcRailingType;
+ struct IfcRamp;
+ struct IfcRampFlight;
+ struct IfcRampFlightType;
+ struct IfcRampType;
+ struct IfcRationalBSplineCurveWithKnots;
+ struct IfcRationalBSplineSurfaceWithKnots;
+ struct IfcRectangleProfileDef;
+ struct IfcRectangleHollowProfileDef;
+ struct IfcRectangularPyramid;
+ struct IfcRectangularTrimmedSurface;
+ typedef NotImplemented IfcRecurrencePattern; // (not currently used by Assimp)
+ typedef NotImplemented IfcReference; // (not currently used by Assimp)
+ typedef NotImplemented IfcRegularTimeSeries; // (not currently used by Assimp)
+ typedef NotImplemented IfcReinforcementBarProperties; // (not currently used by Assimp)
+ typedef NotImplemented IfcReinforcementDefinitionProperties; // (not currently used by Assimp)
+ struct IfcReinforcingElement;
+ struct IfcReinforcingBar;
+ struct IfcReinforcingElementType;
+ struct IfcReinforcingBarType;
+ struct IfcReinforcingMesh;
+ struct IfcReinforcingMeshType;
+ struct IfcRelationship;
+ struct IfcRelDecomposes;
+ struct IfcRelAggregates;
+ typedef NotImplemented IfcRelAssigns; // (not currently used by Assimp)
+ typedef NotImplemented IfcRelAssignsToActor; // (not currently used by Assimp)
+ typedef NotImplemented IfcRelAssignsToControl; // (not currently used by Assimp)
+ typedef NotImplemented IfcRelAssignsToGroup; // (not currently used by Assimp)
+ typedef NotImplemented IfcRelAssignsToGroupByFactor; // (not currently used by Assimp)
+ typedef NotImplemented IfcRelAssignsToProcess; // (not currently used by Assimp)
+ typedef NotImplemented IfcRelAssignsToProduct; // (not currently used by Assimp)
+ typedef NotImplemented IfcRelAssignsToResource; // (not currently used by Assimp)
+ typedef NotImplemented IfcRelAssociates; // (not currently used by Assimp)
+ typedef NotImplemented IfcRelAssociatesApproval; // (not currently used by Assimp)
+ typedef NotImplemented IfcRelAssociatesClassification; // (not currently used by Assimp)
+ typedef NotImplemented IfcRelAssociatesConstraint; // (not currently used by Assimp)
+ typedef NotImplemented IfcRelAssociatesDocument; // (not currently used by Assimp)
+ typedef NotImplemented IfcRelAssociatesLibrary; // (not currently used by Assimp)
+ typedef NotImplemented IfcRelAssociatesMaterial; // (not currently used by Assimp)
+ struct IfcRelConnects;
+ typedef NotImplemented IfcRelConnectsElements; // (not currently used by Assimp)
+ typedef NotImplemented IfcRelConnectsPathElements; // (not currently used by Assimp)
+ typedef NotImplemented IfcRelConnectsPortToElement; // (not currently used by Assimp)
+ typedef NotImplemented IfcRelConnectsPorts; // (not currently used by Assimp)
+ typedef NotImplemented IfcRelConnectsStructuralActivity; // (not currently used by Assimp)
+ typedef NotImplemented IfcRelConnectsStructuralMember; // (not currently used by Assimp)
+ typedef NotImplemented IfcRelConnectsWithEccentricity; // (not currently used by Assimp)
+ typedef NotImplemented IfcRelConnectsWithRealizingElements; // (not currently used by Assimp)
+ struct IfcRelContainedInSpatialStructure;
+ typedef NotImplemented IfcRelCoversBldgElements; // (not currently used by Assimp)
+ typedef NotImplemented IfcRelCoversSpaces; // (not currently used by Assimp)
+ typedef NotImplemented IfcRelDeclares; // (not currently used by Assimp)
+ struct IfcRelDefines;
+ typedef NotImplemented IfcRelDefinesByObject; // (not currently used by Assimp)
+ struct IfcRelDefinesByProperties;
+ typedef NotImplemented IfcRelDefinesByTemplate; // (not currently used by Assimp)
+ typedef NotImplemented IfcRelDefinesByType; // (not currently used by Assimp)
+ struct IfcRelFillsElement;
+ typedef NotImplemented IfcRelFlowControlElements; // (not currently used by Assimp)
+ typedef NotImplemented IfcRelInterferesElements; // (not currently used by Assimp)
+ typedef NotImplemented IfcRelNests; // (not currently used by Assimp)
+ typedef NotImplemented IfcRelProjectsElement; // (not currently used by Assimp)
+ typedef NotImplemented IfcRelReferencedInSpatialStructure; // (not currently used by Assimp)
+ typedef NotImplemented IfcRelSequence; // (not currently used by Assimp)
+ typedef NotImplemented IfcRelServicesBuildings; // (not currently used by Assimp)
+ typedef NotImplemented IfcRelSpaceBoundary; // (not currently used by Assimp)
+ typedef NotImplemented IfcRelSpaceBoundary1stLevel; // (not currently used by Assimp)
+ typedef NotImplemented IfcRelSpaceBoundary2ndLevel; // (not currently used by Assimp)
+ struct IfcRelVoidsElement;
+ struct IfcReparametrisedCompositeCurveSegment;
+ struct IfcRepresentation;
+ struct IfcRepresentationMap;
+ typedef NotImplemented IfcResourceApprovalRelationship; // (not currently used by Assimp)
+ typedef NotImplemented IfcResourceConstraintRelationship; // (not currently used by Assimp)
+ typedef NotImplemented IfcResourceTime; // (not currently used by Assimp)
+ struct IfcRevolvedAreaSolid;
+ struct IfcRevolvedAreaSolidTapered;
+ struct IfcRightCircularCone;
+ struct IfcRightCircularCylinder;
+ struct IfcRoof;
+ struct IfcRoofType;
+ struct IfcRoundedRectangleProfileDef;
+ struct IfcSIUnit;
+ struct IfcSanitaryTerminal;
+ struct IfcSanitaryTerminalType;
+ struct IfcSeamCurve;
+ typedef NotImplemented IfcSectionProperties; // (not currently used by Assimp)
+ typedef NotImplemented IfcSectionReinforcementProperties; // (not currently used by Assimp)
+ struct IfcSectionedSpine;
+ struct IfcSensor;
+ struct IfcSensorType;
+ struct IfcShadingDevice;
+ struct IfcShadingDeviceType;
+ typedef NotImplemented IfcShapeAspect; // (not currently used by Assimp)
+ struct IfcShapeModel;
+ struct IfcShapeRepresentation;
+ struct IfcShellBasedSurfaceModel;
+ typedef NotImplemented IfcSimplePropertyTemplate; // (not currently used by Assimp)
+ struct IfcSite;
+ struct IfcSlab;
+ struct IfcSlabElementedCase;
+ struct IfcSlabStandardCase;
+ struct IfcSlabType;
+ typedef NotImplemented IfcSlippageConnectionCondition; // (not currently used by Assimp)
+ struct IfcSolarDevice;
+ struct IfcSolarDeviceType;
+ struct IfcSpace;
+ struct IfcSpaceHeater;
+ struct IfcSpaceHeaterType;
+ struct IfcSpatialElementType;
+ struct IfcSpatialStructureElementType;
+ struct IfcSpaceType;
+ struct IfcSpatialZone;
+ struct IfcSpatialZoneType;
+ struct IfcSphere;
+ struct IfcSphericalSurface;
+ struct IfcStackTerminal;
+ struct IfcStackTerminalType;
+ struct IfcStair;
+ struct IfcStairFlight;
+ struct IfcStairFlightType;
+ struct IfcStairType;
+ struct IfcStructuralActivity;
+ struct IfcStructuralAction;
+ struct IfcStructuralAnalysisModel;
+ struct IfcStructuralItem;
+ struct IfcStructuralConnection;
+ struct IfcStructuralCurveAction;
+ struct IfcStructuralCurveConnection;
+ struct IfcStructuralMember;
+ struct IfcStructuralCurveMember;
+ struct IfcStructuralCurveMemberVarying;
+ struct IfcStructuralReaction;
+ struct IfcStructuralCurveReaction;
+ struct IfcStructuralLinearAction;
+ typedef NotImplemented IfcStructuralLoad; // (not currently used by Assimp)
+ struct IfcStructuralLoadGroup;
+ struct IfcStructuralLoadCase;
+ typedef NotImplemented IfcStructuralLoadConfiguration; // (not currently used by Assimp)
+ typedef NotImplemented IfcStructuralLoadOrResult; // (not currently used by Assimp)
+ typedef NotImplemented IfcStructuralLoadStatic; // (not currently used by Assimp)
+ typedef NotImplemented IfcStructuralLoadLinearForce; // (not currently used by Assimp)
+ typedef NotImplemented IfcStructuralLoadPlanarForce; // (not currently used by Assimp)
+ typedef NotImplemented IfcStructuralLoadSingleDisplacement; // (not currently used by Assimp)
+ typedef NotImplemented IfcStructuralLoadSingleDisplacementDistortion; // (not currently used by Assimp)
+ typedef NotImplemented IfcStructuralLoadSingleForce; // (not currently used by Assimp)
+ typedef NotImplemented IfcStructuralLoadSingleForceWarping; // (not currently used by Assimp)
+ typedef NotImplemented IfcStructuralLoadTemperature; // (not currently used by Assimp)
+ struct IfcStructuralSurfaceAction;
+ struct IfcStructuralPlanarAction;
+ struct IfcStructuralPointAction;
+ struct IfcStructuralPointConnection;
+ struct IfcStructuralPointReaction;
+ struct IfcStructuralResultGroup;
+ struct IfcStructuralSurfaceConnection;
+ struct IfcStructuralSurfaceMember;
+ struct IfcStructuralSurfaceMemberVarying;
+ struct IfcStructuralSurfaceReaction;
+ struct IfcStyleModel;
+ struct IfcStyledItem;
+ struct IfcStyledRepresentation;
+ struct IfcSubContractResource;
+ struct IfcSubContractResourceType;
+ struct IfcSubedge;
+ struct IfcSurfaceCurveSweptAreaSolid;
+ struct IfcSurfaceFeature;
+ struct IfcSweptSurface;
+ struct IfcSurfaceOfLinearExtrusion;
+ struct IfcSurfaceOfRevolution;
+ typedef NotImplemented IfcSurfaceReinforcementArea; // (not currently used by Assimp)
+ struct IfcSurfaceStyle;
+ typedef NotImplemented IfcSurfaceStyleLighting; // (not currently used by Assimp)
+ typedef NotImplemented IfcSurfaceStyleRefraction; // (not currently used by Assimp)
+ struct IfcSurfaceStyleShading;
+ struct IfcSurfaceStyleRendering;
+ struct IfcSurfaceStyleWithTextures;
+ struct IfcSweptDiskSolid;
+ struct IfcSweptDiskSolidPolygonal;
+ struct IfcSwitchingDevice;
+ struct IfcSwitchingDeviceType;
+ struct IfcSystemFurnitureElement;
+ struct IfcSystemFurnitureElementType;
+ struct IfcTShapeProfileDef;
+ typedef NotImplemented IfcTable; // (not currently used by Assimp)
+ typedef NotImplemented IfcTableColumn; // (not currently used by Assimp)
+ typedef NotImplemented IfcTableRow; // (not currently used by Assimp)
+ struct IfcTank;
+ struct IfcTankType;
+ struct IfcTask;
+ typedef NotImplemented IfcTaskTime; // (not currently used by Assimp)
+ typedef NotImplemented IfcTaskTimeRecurring; // (not currently used by Assimp)
+ struct IfcTaskType;
+ typedef NotImplemented IfcTelecomAddress; // (not currently used by Assimp)
+ struct IfcTendon;
+ struct IfcTendonAnchor;
+ struct IfcTendonAnchorType;
+ struct IfcTendonType;
+ struct IfcTextLiteral;
+ struct IfcTextLiteralWithExtent;
+ typedef NotImplemented IfcTextStyle; // (not currently used by Assimp)
+ typedef NotImplemented IfcTextStyleFontModel; // (not currently used by Assimp)
+ typedef NotImplemented IfcTextStyleForDefinedFont; // (not currently used by Assimp)
+ typedef NotImplemented IfcTextStyleTextModel; // (not currently used by Assimp)
+ typedef NotImplemented IfcTextureCoordinateGenerator; // (not currently used by Assimp)
+ typedef NotImplemented IfcTextureMap; // (not currently used by Assimp)
+ typedef NotImplemented IfcTextureVertex; // (not currently used by Assimp)
+ typedef NotImplemented IfcTextureVertexList; // (not currently used by Assimp)
+ typedef NotImplemented IfcTimePeriod; // (not currently used by Assimp)
+ typedef NotImplemented IfcTimeSeriesValue; // (not currently used by Assimp)
+ struct IfcTopologyRepresentation;
+ struct IfcToroidalSurface;
+ struct IfcTransformer;
+ struct IfcTransformerType;
+ struct IfcTransportElement;
+ struct IfcTransportElementType;
+ struct IfcTrapeziumProfileDef;
+ struct IfcTriangulatedFaceSet;
+ struct IfcTrimmedCurve;
+ struct IfcTubeBundle;
+ struct IfcTubeBundleType;
+ struct IfcUShapeProfileDef;
+ struct IfcUnitAssignment;
+ struct IfcUnitaryControlElement;
+ struct IfcUnitaryControlElementType;
+ struct IfcUnitaryEquipment;
+ struct IfcUnitaryEquipmentType;
+ struct IfcValve;
+ struct IfcValveType;
+ struct IfcVector;
+ struct IfcVertex;
+ struct IfcVertexLoop;
+ struct IfcVertexPoint;
+ struct IfcVibrationIsolator;
+ struct IfcVibrationIsolatorType;
+ struct IfcVirtualElement;
+ typedef NotImplemented IfcVirtualGridIntersection; // (not currently used by Assimp)
+ struct IfcVoidingFeature;
+ struct IfcWall;
+ struct IfcWallElementedCase;
+ struct IfcWallStandardCase;
+ struct IfcWallType;
+ struct IfcWasteTerminal;
+ struct IfcWasteTerminalType;
+ struct IfcWindow;
+ typedef NotImplemented IfcWindowLiningProperties; // (not currently used by Assimp)
+ typedef NotImplemented IfcWindowPanelProperties; // (not currently used by Assimp)
+ struct IfcWindowStandardCase;
+ struct IfcWindowStyle;
+ struct IfcWindowType;
+ struct IfcWorkCalendar;
+ struct IfcWorkControl;
+ struct IfcWorkPlan;
+ struct IfcWorkSchedule;
+ typedef NotImplemented IfcWorkTime; // (not currently used by Assimp)
+ struct IfcZShapeProfileDef;
+ struct IfcZone;
+
+
+
+ // C++ wrapper for IfcRoot
+ struct IfcRoot : ObjectHelper<IfcRoot,4> { IfcRoot() : Object("IfcRoot") {}
+ IfcGloballyUniqueId::Out GlobalId;
+ Maybe< 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 IfcObject
+ struct IfcObject : IfcObjectDefinition, ObjectHelper<IfcObject,1> { IfcObject() : Object("IfcObject") {}
+ Maybe< IfcLabel::Out > ObjectType;
+ };
+
+ // C++ wrapper for IfcControl
+ struct IfcControl : IfcObject, ObjectHelper<IfcControl,1> { IfcControl() : Object("IfcControl") {}
+ Maybe< IfcIdentifier::Out > Identification;
+ };
+
+ // C++ wrapper for IfcActionRequest
+ struct IfcActionRequest : IfcControl, ObjectHelper<IfcActionRequest,3> { IfcActionRequest() : Object("IfcActionRequest") {}
+ Maybe< IfcActionRequestTypeEnum::Out > PredefinedType;
+ Maybe< IfcLabel::Out > Status;
+ Maybe< IfcText::Out > LongDescription;
+ };
+
+ // C++ wrapper for IfcActor
+ struct IfcActor : IfcObject, ObjectHelper<IfcActor,1> { IfcActor() : Object("IfcActor") {}
+ IfcActorSelect::Out TheActor;
+ };
+
+ // C++ wrapper for IfcProduct
+ struct IfcProduct : IfcObject, ObjectHelper<IfcProduct,2> { IfcProduct() : Object("IfcProduct") {}
+ Maybe< Lazy< IfcObjectPlacement > > ObjectPlacement;
+ Maybe< Lazy< IfcProductRepresentation > > Representation;
+ };
+
+ // C++ wrapper for IfcElement
+ struct IfcElement : IfcProduct, ObjectHelper<IfcElement,1> { IfcElement() : Object("IfcElement") {}
+ Maybe< IfcIdentifier::Out > Tag;
+ };
+
+ // C++ wrapper for IfcDistributionElement
+ struct IfcDistributionElement : IfcElement, ObjectHelper<IfcDistributionElement,0> { IfcDistributionElement() : Object("IfcDistributionElement") {}
+
+ };
+
+ // C++ wrapper for IfcDistributionControlElement
+ struct IfcDistributionControlElement : IfcDistributionElement, ObjectHelper<IfcDistributionControlElement,0> { IfcDistributionControlElement() : Object("IfcDistributionControlElement") {}
+
+ };
+
+ // C++ wrapper for IfcActuator
+ struct IfcActuator : IfcDistributionControlElement, ObjectHelper<IfcActuator,1> { IfcActuator() : Object("IfcActuator") {}
+ Maybe< IfcActuatorTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcTypeObject
+ struct IfcTypeObject : IfcObjectDefinition, ObjectHelper<IfcTypeObject,2> { IfcTypeObject() : Object("IfcTypeObject") {}
+ Maybe< IfcIdentifier::Out > ApplicableOccurrence;
+ Maybe< ListOf< Lazy< IfcPropertySetDefinition >, 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 IfcDistributionElementType
+ struct IfcDistributionElementType : IfcElementType, ObjectHelper<IfcDistributionElementType,0> { IfcDistributionElementType() : Object("IfcDistributionElementType") {}
+
+ };
+
+ // C++ wrapper for IfcDistributionControlElementType
+ struct IfcDistributionControlElementType : IfcDistributionElementType, ObjectHelper<IfcDistributionControlElementType,0> { IfcDistributionControlElementType() : Object("IfcDistributionControlElementType") {}
+
+ };
+
+ // C++ wrapper for IfcActuatorType
+ struct IfcActuatorType : IfcDistributionControlElementType, ObjectHelper<IfcActuatorType,1> { IfcActuatorType() : Object("IfcActuatorType") {}
+ IfcActuatorTypeEnum::Out PredefinedType;
+ };
+
+ // 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 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 IfcAdvancedBrep
+ struct IfcAdvancedBrep : IfcManifoldSolidBrep, ObjectHelper<IfcAdvancedBrep,0> { IfcAdvancedBrep() : Object("IfcAdvancedBrep") {}
+
+ };
+
+ // C++ wrapper for IfcAdvancedBrepWithVoids
+ struct IfcAdvancedBrepWithVoids : IfcAdvancedBrep, ObjectHelper<IfcAdvancedBrepWithVoids,1> { IfcAdvancedBrepWithVoids() : Object("IfcAdvancedBrepWithVoids") {}
+ ListOf< Lazy< IfcClosedShell >, 1, 0 > Voids;
+ };
+
+ // C++ wrapper for IfcTopologicalRepresentationItem
+ struct IfcTopologicalRepresentationItem : IfcRepresentationItem, ObjectHelper<IfcTopologicalRepresentationItem,0> { IfcTopologicalRepresentationItem() : Object("IfcTopologicalRepresentationItem") {}
+
+ };
+
+ // C++ wrapper for IfcFace
+ struct IfcFace : IfcTopologicalRepresentationItem, ObjectHelper<IfcFace,1> { IfcFace() : Object("IfcFace") {}
+ ListOf< Lazy< IfcFaceBound >, 1, 0 > Bounds;
+ };
+
+ // C++ wrapper for IfcFaceSurface
+ struct IfcFaceSurface : IfcFace, ObjectHelper<IfcFaceSurface,2> { IfcFaceSurface() : Object("IfcFaceSurface") {}
+ Lazy< IfcSurface > FaceSurface;
+ IfcBoolean::Out SameSense;
+ };
+
+ // C++ wrapper for IfcAdvancedFace
+ struct IfcAdvancedFace : IfcFaceSurface, ObjectHelper<IfcAdvancedFace,0> { IfcAdvancedFace() : Object("IfcAdvancedFace") {}
+
+ };
+
+ // C++ wrapper for IfcDistributionFlowElement
+ struct IfcDistributionFlowElement : IfcDistributionElement, ObjectHelper<IfcDistributionFlowElement,0> { IfcDistributionFlowElement() : Object("IfcDistributionFlowElement") {}
+
+ };
+
+ // C++ wrapper for IfcFlowTerminal
+ struct IfcFlowTerminal : IfcDistributionFlowElement, ObjectHelper<IfcFlowTerminal,0> { IfcFlowTerminal() : Object("IfcFlowTerminal") {}
+
+ };
+
+ // C++ wrapper for IfcAirTerminal
+ struct IfcAirTerminal : IfcFlowTerminal, ObjectHelper<IfcAirTerminal,1> { IfcAirTerminal() : Object("IfcAirTerminal") {}
+ Maybe< IfcAirTerminalTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcFlowController
+ struct IfcFlowController : IfcDistributionFlowElement, ObjectHelper<IfcFlowController,0> { IfcFlowController() : Object("IfcFlowController") {}
+
+ };
+
+ // C++ wrapper for IfcAirTerminalBox
+ struct IfcAirTerminalBox : IfcFlowController, ObjectHelper<IfcAirTerminalBox,1> { IfcAirTerminalBox() : Object("IfcAirTerminalBox") {}
+ Maybe< IfcAirTerminalBoxTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcDistributionFlowElementType
+ struct IfcDistributionFlowElementType : IfcDistributionElementType, ObjectHelper<IfcDistributionFlowElementType,0> { IfcDistributionFlowElementType() : Object("IfcDistributionFlowElementType") {}
+
+ };
+
+ // C++ wrapper for IfcFlowControllerType
+ struct IfcFlowControllerType : IfcDistributionFlowElementType, ObjectHelper<IfcFlowControllerType,0> { IfcFlowControllerType() : Object("IfcFlowControllerType") {}
+
+ };
+
+ // C++ wrapper for IfcAirTerminalBoxType
+ struct IfcAirTerminalBoxType : IfcFlowControllerType, ObjectHelper<IfcAirTerminalBoxType,1> { IfcAirTerminalBoxType() : Object("IfcAirTerminalBoxType") {}
+ IfcAirTerminalBoxTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcFlowTerminalType
+ struct IfcFlowTerminalType : IfcDistributionFlowElementType, ObjectHelper<IfcFlowTerminalType,0> { IfcFlowTerminalType() : Object("IfcFlowTerminalType") {}
+
+ };
+
+ // C++ wrapper for IfcAirTerminalType
+ struct IfcAirTerminalType : IfcFlowTerminalType, ObjectHelper<IfcAirTerminalType,1> { IfcAirTerminalType() : Object("IfcAirTerminalType") {}
+ IfcAirTerminalTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcEnergyConversionDevice
+ struct IfcEnergyConversionDevice : IfcDistributionFlowElement, ObjectHelper<IfcEnergyConversionDevice,0> { IfcEnergyConversionDevice() : Object("IfcEnergyConversionDevice") {}
+
+ };
+
+ // C++ wrapper for IfcAirToAirHeatRecovery
+ struct IfcAirToAirHeatRecovery : IfcEnergyConversionDevice, ObjectHelper<IfcAirToAirHeatRecovery,1> { IfcAirToAirHeatRecovery() : Object("IfcAirToAirHeatRecovery") {}
+ Maybe< IfcAirToAirHeatRecoveryTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcEnergyConversionDeviceType
+ struct IfcEnergyConversionDeviceType : IfcDistributionFlowElementType, ObjectHelper<IfcEnergyConversionDeviceType,0> { IfcEnergyConversionDeviceType() : Object("IfcEnergyConversionDeviceType") {}
+
+ };
+
+ // C++ wrapper for IfcAirToAirHeatRecoveryType
+ struct IfcAirToAirHeatRecoveryType : IfcEnergyConversionDeviceType, ObjectHelper<IfcAirToAirHeatRecoveryType,1> { IfcAirToAirHeatRecoveryType() : Object("IfcAirToAirHeatRecoveryType") {}
+ IfcAirToAirHeatRecoveryTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcAlarm
+ struct IfcAlarm : IfcDistributionControlElement, ObjectHelper<IfcAlarm,1> { IfcAlarm() : Object("IfcAlarm") {}
+ Maybe< IfcAlarmTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcAlarmType
+ struct IfcAlarmType : IfcDistributionControlElementType, ObjectHelper<IfcAlarmType,1> { IfcAlarmType() : Object("IfcAlarmType") {}
+ IfcAlarmTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcAnnotation
+ struct IfcAnnotation : IfcProduct, ObjectHelper<IfcAnnotation,0> { IfcAnnotation() : Object("IfcAnnotation") {}
+
+ };
+
+ // 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 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 IfcArbitraryOpenProfileDef
+ struct IfcArbitraryOpenProfileDef : IfcProfileDef, ObjectHelper<IfcArbitraryOpenProfileDef,1> { IfcArbitraryOpenProfileDef() : Object("IfcArbitraryOpenProfileDef") {}
+ Lazy< IfcBoundedCurve > Curve;
+ };
+
+ // C++ wrapper for IfcArbitraryProfileDefWithVoids
+ struct IfcArbitraryProfileDefWithVoids : IfcArbitraryClosedProfileDef, ObjectHelper<IfcArbitraryProfileDefWithVoids,1> { IfcArbitraryProfileDefWithVoids() : Object("IfcArbitraryProfileDefWithVoids") {}
+ ListOf< Lazy< IfcCurve >, 1, 0 > InnerCurves;
+ };
+
+ // C++ wrapper for IfcGroup
+ struct IfcGroup : IfcObject, ObjectHelper<IfcGroup,0> { IfcGroup() : Object("IfcGroup") {}
+
+ };
+
+ // C++ wrapper for IfcAsset
+ struct IfcAsset : IfcGroup, ObjectHelper<IfcAsset,9> { IfcAsset() : Object("IfcAsset") {}
+ Maybe< IfcIdentifier::Out > Identification;
+ Maybe< Lazy< NotImplemented > > OriginalValue;
+ Maybe< Lazy< NotImplemented > > CurrentValue;
+ Maybe< Lazy< NotImplemented > > TotalReplacementCost;
+ Maybe< IfcActorSelect::Out > Owner;
+ Maybe< IfcActorSelect::Out > User;
+ Maybe< Lazy< NotImplemented > > ResponsiblePerson;
+ Maybe< IfcDate::Out > IncorporationDate;
+ Maybe< Lazy< NotImplemented > > DepreciatedValue;
+ };
+
+ // C++ wrapper for IfcParameterizedProfileDef
+ struct IfcParameterizedProfileDef : IfcProfileDef, ObjectHelper<IfcParameterizedProfileDef,1> { IfcParameterizedProfileDef() : Object("IfcParameterizedProfileDef") {}
+ Maybe< Lazy< IfcAxis2Placement2D > > Position;
+ };
+
+ // C++ wrapper for IfcAsymmetricIShapeProfileDef
+ struct IfcAsymmetricIShapeProfileDef : IfcParameterizedProfileDef, ObjectHelper<IfcAsymmetricIShapeProfileDef,12> { IfcAsymmetricIShapeProfileDef() : Object("IfcAsymmetricIShapeProfileDef") {}
+ IfcPositiveLengthMeasure::Out BottomFlangeWidth;
+ IfcPositiveLengthMeasure::Out OverallDepth;
+ IfcPositiveLengthMeasure::Out WebThickness;
+ IfcPositiveLengthMeasure::Out BottomFlangeThickness;
+ Maybe< IfcNonNegativeLengthMeasure::Out > BottomFlangeFilletRadius;
+ IfcPositiveLengthMeasure::Out TopFlangeWidth;
+ Maybe< IfcPositiveLengthMeasure::Out > TopFlangeThickness;
+ Maybe< IfcNonNegativeLengthMeasure::Out > TopFlangeFilletRadius;
+ Maybe< IfcNonNegativeLengthMeasure::Out > BottomFlangeEdgeRadius;
+ Maybe< IfcPlaneAngleMeasure::Out > BottomFlangeSlope;
+ Maybe< IfcNonNegativeLengthMeasure::Out > TopFlangeEdgeRadius;
+ Maybe< IfcPlaneAngleMeasure::Out > TopFlangeSlope;
+ };
+
+ // C++ wrapper for IfcAudioVisualAppliance
+ struct IfcAudioVisualAppliance : IfcFlowTerminal, ObjectHelper<IfcAudioVisualAppliance,1> { IfcAudioVisualAppliance() : Object("IfcAudioVisualAppliance") {}
+ Maybe< IfcAudioVisualApplianceTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcAudioVisualApplianceType
+ struct IfcAudioVisualApplianceType : IfcFlowTerminalType, ObjectHelper<IfcAudioVisualApplianceType,1> { IfcAudioVisualApplianceType() : Object("IfcAudioVisualApplianceType") {}
+ IfcAudioVisualApplianceTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcPlacement
+ struct IfcPlacement : IfcGeometricRepresentationItem, ObjectHelper<IfcPlacement,1> { IfcPlacement() : Object("IfcPlacement") {}
+ Lazy< IfcCartesianPoint > Location;
+ };
+
+ // C++ wrapper for IfcAxis1Placement
+ struct IfcAxis1Placement : IfcPlacement, ObjectHelper<IfcAxis1Placement,1> { IfcAxis1Placement() : Object("IfcAxis1Placement") {}
+ Maybe< Lazy< IfcDirection > > Axis;
+ };
+
+ // C++ wrapper for IfcAxis2Placement2D
+ struct IfcAxis2Placement2D : IfcPlacement, ObjectHelper<IfcAxis2Placement2D,1> { IfcAxis2Placement2D() : Object("IfcAxis2Placement2D") {}
+ Maybe< Lazy< IfcDirection > > RefDirection;
+ };
+
+ // C++ wrapper for IfcAxis2Placement3D
+ struct IfcAxis2Placement3D : IfcPlacement, ObjectHelper<IfcAxis2Placement3D,2> { IfcAxis2Placement3D() : Object("IfcAxis2Placement3D") {}
+ Maybe< Lazy< IfcDirection > > Axis;
+ Maybe< Lazy< IfcDirection > > RefDirection;
+ };
+
+ // C++ wrapper for IfcCurve
+ struct IfcCurve : IfcGeometricRepresentationItem, ObjectHelper<IfcCurve,0> { IfcCurve() : Object("IfcCurve") {}
+
+ };
+
+ // C++ wrapper for IfcBoundedCurve
+ struct IfcBoundedCurve : IfcCurve, ObjectHelper<IfcBoundedCurve,0> { IfcBoundedCurve() : Object("IfcBoundedCurve") {}
+
+ };
+
+ // C++ wrapper for IfcBSplineCurve
+ struct IfcBSplineCurve : IfcBoundedCurve, ObjectHelper<IfcBSplineCurve,5> { IfcBSplineCurve() : Object("IfcBSplineCurve") {}
+ IfcInteger::Out Degree;
+ ListOf< Lazy< IfcCartesianPoint >, 2, 0 > ControlPointsList;
+ IfcBSplineCurveForm::Out CurveForm;
+ IfcLogical::Out ClosedCurve;
+ IfcLogical::Out SelfIntersect;
+ };
+
+ // C++ wrapper for IfcBSplineCurveWithKnots
+ struct IfcBSplineCurveWithKnots : IfcBSplineCurve, ObjectHelper<IfcBSplineCurveWithKnots,3> { IfcBSplineCurveWithKnots() : Object("IfcBSplineCurveWithKnots") {}
+ ListOf< IfcInteger, 2, 0 >::Out KnotMultiplicities;
+ ListOf< IfcParameterValue, 2, 0 >::Out Knots;
+ IfcKnotType::Out KnotSpec;
+ };
+
+ // 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 IfcBSplineSurface
+ struct IfcBSplineSurface : IfcBoundedSurface, ObjectHelper<IfcBSplineSurface,6> { IfcBSplineSurface() : Object("IfcBSplineSurface") {}
+ IfcInteger::Out UDegree;
+ IfcInteger::Out VDegree;
+ IfcBSplineSurfaceForm::Out SurfaceForm;
+ IfcLogical::Out UClosed;
+ IfcLogical::Out VClosed;
+ IfcLogical::Out SelfIntersect;
+ };
+
+ // C++ wrapper for IfcBSplineSurfaceWithKnots
+ struct IfcBSplineSurfaceWithKnots : IfcBSplineSurface, ObjectHelper<IfcBSplineSurfaceWithKnots,5> { IfcBSplineSurfaceWithKnots() : Object("IfcBSplineSurfaceWithKnots") {}
+ ListOf< IfcInteger, 2, 0 >::Out UMultiplicities;
+ ListOf< IfcInteger, 2, 0 >::Out VMultiplicities;
+ ListOf< IfcParameterValue, 2, 0 >::Out UKnots;
+ ListOf< IfcParameterValue, 2, 0 >::Out VKnots;
+ IfcKnotType::Out KnotSpec;
+ };
+
+ // C++ wrapper for IfcBuildingElement
+ struct IfcBuildingElement : IfcElement, ObjectHelper<IfcBuildingElement,0> { IfcBuildingElement() : Object("IfcBuildingElement") {}
+
+ };
+
+ // C++ wrapper for IfcBeam
+ struct IfcBeam : IfcBuildingElement, ObjectHelper<IfcBeam,1> { IfcBeam() : Object("IfcBeam") {}
+ Maybe< IfcBeamTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcBeamStandardCase
+ struct IfcBeamStandardCase : IfcBeam, ObjectHelper<IfcBeamStandardCase,0> { IfcBeamStandardCase() : Object("IfcBeamStandardCase") {}
+
+ };
+
+ // C++ wrapper for IfcBuildingElementType
+ struct IfcBuildingElementType : IfcElementType, ObjectHelper<IfcBuildingElementType,0> { IfcBuildingElementType() : Object("IfcBuildingElementType") {}
+
+ };
+
+ // C++ wrapper for IfcBeamType
+ struct IfcBeamType : IfcBuildingElementType, ObjectHelper<IfcBeamType,1> { IfcBeamType() : Object("IfcBeamType") {}
+ IfcBeamTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcPresentationItem
+ struct IfcPresentationItem : ObjectHelper<IfcPresentationItem,0> { IfcPresentationItem() : Object("IfcPresentationItem") {}
+
+ };
+
+ // C++ wrapper for IfcCsgPrimitive3D
+ struct IfcCsgPrimitive3D : IfcGeometricRepresentationItem, ObjectHelper<IfcCsgPrimitive3D,1> { IfcCsgPrimitive3D() : Object("IfcCsgPrimitive3D") {}
+ Lazy< IfcAxis2Placement3D > Position;
+ };
+
+ // 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 IfcBoiler
+ struct IfcBoiler : IfcEnergyConversionDevice, ObjectHelper<IfcBoiler,1> { IfcBoiler() : Object("IfcBoiler") {}
+ Maybe< IfcBoilerTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcBoilerType
+ struct IfcBoilerType : IfcEnergyConversionDeviceType, ObjectHelper<IfcBoilerType,1> { IfcBoilerType() : Object("IfcBoilerType") {}
+ IfcBoilerTypeEnum::Out PredefinedType;
+ };
+
+ // 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 IfcBooleanClippingResult
+ struct IfcBooleanClippingResult : IfcBooleanResult, ObjectHelper<IfcBooleanClippingResult,0> { IfcBooleanClippingResult() : Object("IfcBooleanClippingResult") {}
+
+ };
+
+ // C++ wrapper for IfcCompositeCurve
+ struct IfcCompositeCurve : IfcBoundedCurve, ObjectHelper<IfcCompositeCurve,2> { IfcCompositeCurve() : Object("IfcCompositeCurve") {}
+ ListOf< Lazy< IfcCompositeCurveSegment >, 1, 0 > Segments;
+ IfcLogical::Out SelfIntersect;
+ };
+
+ // C++ wrapper for IfcCompositeCurveOnSurface
+ struct IfcCompositeCurveOnSurface : IfcCompositeCurve, ObjectHelper<IfcCompositeCurveOnSurface,0> { IfcCompositeCurveOnSurface() : Object("IfcCompositeCurveOnSurface") {}
+
+ };
+
+ // C++ wrapper for IfcBoundaryCurve
+ struct IfcBoundaryCurve : IfcCompositeCurveOnSurface, ObjectHelper<IfcBoundaryCurve,0> { IfcBoundaryCurve() : Object("IfcBoundaryCurve") {}
+
+ };
+
+ // 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 IfcHalfSpaceSolid
+ struct IfcHalfSpaceSolid : IfcGeometricRepresentationItem, ObjectHelper<IfcHalfSpaceSolid,2> { IfcHalfSpaceSolid() : Object("IfcHalfSpaceSolid") {}
+ Lazy< IfcSurface > BaseSurface;
+ IfcBoolean::Out AgreementFlag;
+ };
+
+ // C++ wrapper for IfcBoxedHalfSpace
+ struct IfcBoxedHalfSpace : IfcHalfSpaceSolid, ObjectHelper<IfcBoxedHalfSpace,1> { IfcBoxedHalfSpace() : Object("IfcBoxedHalfSpace") {}
+ Lazy< IfcBoundingBox > Enclosure;
+ };
+
+ // C++ wrapper for IfcSpatialElement
+ struct IfcSpatialElement : IfcProduct, ObjectHelper<IfcSpatialElement,1> { IfcSpatialElement() : Object("IfcSpatialElement") {}
+ Maybe< IfcLabel::Out > LongName;
+ };
+
+ // C++ wrapper for IfcSpatialStructureElement
+ struct IfcSpatialStructureElement : IfcSpatialElement, ObjectHelper<IfcSpatialStructureElement,1> { IfcSpatialStructureElement() : Object("IfcSpatialStructureElement") {}
+ Maybe< IfcElementCompositionEnum::Out > CompositionType;
+ };
+
+ // 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 IfcElementComponent
+ struct IfcElementComponent : IfcElement, ObjectHelper<IfcElementComponent,0> { IfcElementComponent() : Object("IfcElementComponent") {}
+
+ };
+
+ // C++ wrapper for IfcBuildingElementPart
+ struct IfcBuildingElementPart : IfcElementComponent, ObjectHelper<IfcBuildingElementPart,1> { IfcBuildingElementPart() : Object("IfcBuildingElementPart") {}
+ Maybe< IfcBuildingElementPartTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcElementComponentType
+ struct IfcElementComponentType : IfcElementType, ObjectHelper<IfcElementComponentType,0> { IfcElementComponentType() : Object("IfcElementComponentType") {}
+
+ };
+
+ // C++ wrapper for IfcBuildingElementPartType
+ struct IfcBuildingElementPartType : IfcElementComponentType, ObjectHelper<IfcBuildingElementPartType,1> { IfcBuildingElementPartType() : Object("IfcBuildingElementPartType") {}
+ IfcBuildingElementPartTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcBuildingElementProxy
+ struct IfcBuildingElementProxy : IfcBuildingElement, ObjectHelper<IfcBuildingElementProxy,1> { IfcBuildingElementProxy() : Object("IfcBuildingElementProxy") {}
+ Maybe< IfcBuildingElementProxyTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcBuildingElementProxyType
+ struct IfcBuildingElementProxyType : IfcBuildingElementType, ObjectHelper<IfcBuildingElementProxyType,1> { IfcBuildingElementProxyType() : Object("IfcBuildingElementProxyType") {}
+ IfcBuildingElementProxyTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcBuildingStorey
+ struct IfcBuildingStorey : IfcSpatialStructureElement, ObjectHelper<IfcBuildingStorey,1> { IfcBuildingStorey() : Object("IfcBuildingStorey") {}
+ Maybe< IfcLengthMeasure::Out > Elevation;
+ };
+
+ // C++ wrapper for IfcSystem
+ struct IfcSystem : IfcGroup, ObjectHelper<IfcSystem,0> { IfcSystem() : Object("IfcSystem") {}
+
+ };
+
+ // C++ wrapper for IfcBuildingSystem
+ struct IfcBuildingSystem : IfcSystem, ObjectHelper<IfcBuildingSystem,2> { IfcBuildingSystem() : Object("IfcBuildingSystem") {}
+ Maybe< IfcBuildingSystemTypeEnum::Out > PredefinedType;
+ Maybe< IfcLabel::Out > LongName;
+ };
+
+ // C++ wrapper for IfcBurner
+ struct IfcBurner : IfcEnergyConversionDevice, ObjectHelper<IfcBurner,1> { IfcBurner() : Object("IfcBurner") {}
+ Maybe< IfcBurnerTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcBurnerType
+ struct IfcBurnerType : IfcEnergyConversionDeviceType, ObjectHelper<IfcBurnerType,1> { IfcBurnerType() : Object("IfcBurnerType") {}
+ IfcBurnerTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcCShapeProfileDef
+ struct IfcCShapeProfileDef : IfcParameterizedProfileDef, ObjectHelper<IfcCShapeProfileDef,5> { IfcCShapeProfileDef() : Object("IfcCShapeProfileDef") {}
+ IfcPositiveLengthMeasure::Out Depth;
+ IfcPositiveLengthMeasure::Out Width;
+ IfcPositiveLengthMeasure::Out WallThickness;
+ IfcPositiveLengthMeasure::Out Girth;
+ Maybe< IfcNonNegativeLengthMeasure::Out > InternalFilletRadius;
+ };
+
+ // C++ wrapper for IfcFlowFitting
+ struct IfcFlowFitting : IfcDistributionFlowElement, ObjectHelper<IfcFlowFitting,0> { IfcFlowFitting() : Object("IfcFlowFitting") {}
+
+ };
+
+ // C++ wrapper for IfcCableCarrierFitting
+ struct IfcCableCarrierFitting : IfcFlowFitting, ObjectHelper<IfcCableCarrierFitting,1> { IfcCableCarrierFitting() : Object("IfcCableCarrierFitting") {}
+ Maybe< IfcCableCarrierFittingTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcFlowFittingType
+ struct IfcFlowFittingType : IfcDistributionFlowElementType, ObjectHelper<IfcFlowFittingType,0> { IfcFlowFittingType() : Object("IfcFlowFittingType") {}
+
+ };
+
+ // C++ wrapper for IfcCableCarrierFittingType
+ struct IfcCableCarrierFittingType : IfcFlowFittingType, ObjectHelper<IfcCableCarrierFittingType,1> { IfcCableCarrierFittingType() : Object("IfcCableCarrierFittingType") {}
+ IfcCableCarrierFittingTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcFlowSegment
+ struct IfcFlowSegment : IfcDistributionFlowElement, ObjectHelper<IfcFlowSegment,0> { IfcFlowSegment() : Object("IfcFlowSegment") {}
+
+ };
+
+ // C++ wrapper for IfcCableCarrierSegment
+ struct IfcCableCarrierSegment : IfcFlowSegment, ObjectHelper<IfcCableCarrierSegment,1> { IfcCableCarrierSegment() : Object("IfcCableCarrierSegment") {}
+ Maybe< IfcCableCarrierSegmentTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcFlowSegmentType
+ struct IfcFlowSegmentType : IfcDistributionFlowElementType, ObjectHelper<IfcFlowSegmentType,0> { IfcFlowSegmentType() : Object("IfcFlowSegmentType") {}
+
+ };
+
+ // C++ wrapper for IfcCableCarrierSegmentType
+ struct IfcCableCarrierSegmentType : IfcFlowSegmentType, ObjectHelper<IfcCableCarrierSegmentType,1> { IfcCableCarrierSegmentType() : Object("IfcCableCarrierSegmentType") {}
+ IfcCableCarrierSegmentTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcCableFitting
+ struct IfcCableFitting : IfcFlowFitting, ObjectHelper<IfcCableFitting,1> { IfcCableFitting() : Object("IfcCableFitting") {}
+ Maybe< IfcCableFittingTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcCableFittingType
+ struct IfcCableFittingType : IfcFlowFittingType, ObjectHelper<IfcCableFittingType,1> { IfcCableFittingType() : Object("IfcCableFittingType") {}
+ IfcCableFittingTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcCableSegment
+ struct IfcCableSegment : IfcFlowSegment, ObjectHelper<IfcCableSegment,1> { IfcCableSegment() : Object("IfcCableSegment") {}
+ Maybe< IfcCableSegmentTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcCableSegmentType
+ struct IfcCableSegmentType : IfcFlowSegmentType, ObjectHelper<IfcCableSegmentType,1> { IfcCableSegmentType() : Object("IfcCableSegmentType") {}
+ IfcCableSegmentTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcPoint
+ struct IfcPoint : IfcGeometricRepresentationItem, ObjectHelper<IfcPoint,0> { IfcPoint() : Object("IfcPoint") {}
+
+ };
+
+ // C++ wrapper for IfcCartesianPoint
+ struct IfcCartesianPoint : IfcPoint, ObjectHelper<IfcCartesianPoint,1> { IfcCartesianPoint() : Object("IfcCartesianPoint") {}
+ ListOf< IfcLengthMeasure, 1, 3 >::Out Coordinates;
+ };
+
+ // C++ wrapper for IfcCartesianPointList
+ struct IfcCartesianPointList : IfcGeometricRepresentationItem, ObjectHelper<IfcCartesianPointList,0> { IfcCartesianPointList() : Object("IfcCartesianPointList") {}
+
+ };
+
+ // C++ wrapper for IfcCartesianPointList2D
+ struct IfcCartesianPointList2D : IfcCartesianPointList, ObjectHelper<IfcCartesianPointList2D,0> { IfcCartesianPointList2D() : Object("IfcCartesianPointList2D") {}
+
+ };
+
+ // C++ wrapper for IfcCartesianPointList3D
+ struct IfcCartesianPointList3D : IfcCartesianPointList, ObjectHelper<IfcCartesianPointList3D,0> { IfcCartesianPointList3D() : Object("IfcCartesianPointList3D") {}
+
+ };
+
+ // 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< IfcReal::Out > Scale;
+ };
+
+ // 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< IfcReal::Out > Scale2;
+ };
+
+ // 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< IfcReal::Out > Scale2;
+ Maybe< IfcReal::Out > Scale3;
+ };
+
+ // C++ wrapper for IfcCenterLineProfileDef
+ struct IfcCenterLineProfileDef : IfcArbitraryOpenProfileDef, ObjectHelper<IfcCenterLineProfileDef,1> { IfcCenterLineProfileDef() : Object("IfcCenterLineProfileDef") {}
+ IfcPositiveLengthMeasure::Out Thickness;
+ };
+
+ // C++ wrapper for IfcChiller
+ struct IfcChiller : IfcEnergyConversionDevice, ObjectHelper<IfcChiller,1> { IfcChiller() : Object("IfcChiller") {}
+ Maybe< IfcChillerTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcChillerType
+ struct IfcChillerType : IfcEnergyConversionDeviceType, ObjectHelper<IfcChillerType,1> { IfcChillerType() : Object("IfcChillerType") {}
+ IfcChillerTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcChimney
+ struct IfcChimney : IfcBuildingElement, ObjectHelper<IfcChimney,1> { IfcChimney() : Object("IfcChimney") {}
+ Maybe< IfcChimneyTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcChimneyType
+ struct IfcChimneyType : IfcBuildingElementType, ObjectHelper<IfcChimneyType,1> { IfcChimneyType() : Object("IfcChimneyType") {}
+ IfcChimneyTypeEnum::Out PredefinedType;
+ };
+
+ // 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 IfcCircleProfileDef
+ struct IfcCircleProfileDef : IfcParameterizedProfileDef, ObjectHelper<IfcCircleProfileDef,1> { IfcCircleProfileDef() : Object("IfcCircleProfileDef") {}
+ IfcPositiveLengthMeasure::Out Radius;
+ };
+
+ // C++ wrapper for IfcCircleHollowProfileDef
+ struct IfcCircleHollowProfileDef : IfcCircleProfileDef, ObjectHelper<IfcCircleHollowProfileDef,1> { IfcCircleHollowProfileDef() : Object("IfcCircleHollowProfileDef") {}
+ IfcPositiveLengthMeasure::Out WallThickness;
+ };
+
+ // C++ wrapper for IfcCivilElement
+ struct IfcCivilElement : IfcElement, ObjectHelper<IfcCivilElement,0> { IfcCivilElement() : Object("IfcCivilElement") {}
+
+ };
+
+ // C++ wrapper for IfcCivilElementType
+ struct IfcCivilElementType : IfcElementType, ObjectHelper<IfcCivilElementType,0> { IfcCivilElementType() : Object("IfcCivilElementType") {}
+
+ };
+
+ // C++ wrapper for IfcConnectedFaceSet
+ struct IfcConnectedFaceSet : IfcTopologicalRepresentationItem, ObjectHelper<IfcConnectedFaceSet,1> { IfcConnectedFaceSet() : Object("IfcConnectedFaceSet") {}
+ ListOf< Lazy< IfcFace >, 1, 0 > CfsFaces;
+ };
+
+ // C++ wrapper for IfcClosedShell
+ struct IfcClosedShell : IfcConnectedFaceSet, ObjectHelper<IfcClosedShell,0> { IfcClosedShell() : Object("IfcClosedShell") {}
+
+ };
+
+ // C++ wrapper for IfcCoil
+ struct IfcCoil : IfcEnergyConversionDevice, ObjectHelper<IfcCoil,1> { IfcCoil() : Object("IfcCoil") {}
+ Maybe< IfcCoilTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcCoilType
+ struct IfcCoilType : IfcEnergyConversionDeviceType, ObjectHelper<IfcCoilType,1> { IfcCoilType() : Object("IfcCoilType") {}
+ IfcCoilTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcColourSpecification
+ struct IfcColourSpecification : IfcPresentationItem, 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 IfcColumn
+ struct IfcColumn : IfcBuildingElement, ObjectHelper<IfcColumn,1> { IfcColumn() : Object("IfcColumn") {}
+ Maybe< IfcColumnTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcColumnStandardCase
+ struct IfcColumnStandardCase : IfcColumn, ObjectHelper<IfcColumnStandardCase,0> { IfcColumnStandardCase() : Object("IfcColumnStandardCase") {}
+
+ };
+
+ // C++ wrapper for IfcColumnType
+ struct IfcColumnType : IfcBuildingElementType, ObjectHelper<IfcColumnType,1> { IfcColumnType() : Object("IfcColumnType") {}
+ IfcColumnTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcCommunicationsAppliance
+ struct IfcCommunicationsAppliance : IfcFlowTerminal, ObjectHelper<IfcCommunicationsAppliance,1> { IfcCommunicationsAppliance() : Object("IfcCommunicationsAppliance") {}
+ Maybe< IfcCommunicationsApplianceTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcCommunicationsApplianceType
+ struct IfcCommunicationsApplianceType : IfcFlowTerminalType, ObjectHelper<IfcCommunicationsApplianceType,1> { IfcCommunicationsApplianceType() : Object("IfcCommunicationsApplianceType") {}
+ IfcCommunicationsApplianceTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcPropertyAbstraction
+ struct IfcPropertyAbstraction : ObjectHelper<IfcPropertyAbstraction,0> { IfcPropertyAbstraction() : Object("IfcPropertyAbstraction") {}
+
+ };
+
+ // C++ wrapper for IfcProperty
+ struct IfcProperty : IfcPropertyAbstraction, ObjectHelper<IfcProperty,2> { IfcProperty() : Object("IfcProperty") {}
+ IfcIdentifier::Out Name;
+ Maybe< IfcText::Out > Description;
+ };
+
+ // C++ wrapper for IfcComplexProperty
+ struct IfcComplexProperty : IfcProperty, ObjectHelper<IfcComplexProperty,2> { IfcComplexProperty() : Object("IfcComplexProperty") {}
+ IfcIdentifier::Out UsageName;
+ ListOf< Lazy< IfcProperty >, 1, 0 > HasProperties;
+ };
+
+ // C++ wrapper for IfcPropertyDefinition
+ struct IfcPropertyDefinition : IfcRoot, ObjectHelper<IfcPropertyDefinition,0> { IfcPropertyDefinition() : Object("IfcPropertyDefinition") {}
+
+ };
+
+ // C++ wrapper for IfcCompositeCurveSegment
+ struct IfcCompositeCurveSegment : IfcGeometricRepresentationItem, ObjectHelper<IfcCompositeCurveSegment,3> { IfcCompositeCurveSegment() : Object("IfcCompositeCurveSegment") {}
+ IfcTransitionCode::Out Transition;
+ IfcBoolean::Out SameSense;
+ Lazy< IfcCurve > ParentCurve;
+ };
+
+ // 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 IfcFlowMovingDevice
+ struct IfcFlowMovingDevice : IfcDistributionFlowElement, ObjectHelper<IfcFlowMovingDevice,0> { IfcFlowMovingDevice() : Object("IfcFlowMovingDevice") {}
+
+ };
+
+ // C++ wrapper for IfcCompressor
+ struct IfcCompressor : IfcFlowMovingDevice, ObjectHelper<IfcCompressor,1> { IfcCompressor() : Object("IfcCompressor") {}
+ Maybe< IfcCompressorTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcFlowMovingDeviceType
+ struct IfcFlowMovingDeviceType : IfcDistributionFlowElementType, ObjectHelper<IfcFlowMovingDeviceType,0> { IfcFlowMovingDeviceType() : Object("IfcFlowMovingDeviceType") {}
+
+ };
+
+ // C++ wrapper for IfcCompressorType
+ struct IfcCompressorType : IfcFlowMovingDeviceType, ObjectHelper<IfcCompressorType,1> { IfcCompressorType() : Object("IfcCompressorType") {}
+ IfcCompressorTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcCondenser
+ struct IfcCondenser : IfcEnergyConversionDevice, ObjectHelper<IfcCondenser,1> { IfcCondenser() : Object("IfcCondenser") {}
+ Maybe< IfcCondenserTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcCondenserType
+ struct IfcCondenserType : IfcEnergyConversionDeviceType, ObjectHelper<IfcCondenserType,1> { IfcCondenserType() : Object("IfcCondenserType") {}
+ IfcCondenserTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcResource
+ struct IfcResource : IfcObject, ObjectHelper<IfcResource,2> { IfcResource() : Object("IfcResource") {}
+ Maybe< IfcIdentifier::Out > Identification;
+ Maybe< IfcText::Out > LongDescription;
+ };
+
+ // C++ wrapper for IfcConstructionResource
+ struct IfcConstructionResource : IfcResource, ObjectHelper<IfcConstructionResource,3> { IfcConstructionResource() : Object("IfcConstructionResource") {}
+ Maybe< Lazy< NotImplemented > > Usage;
+ Maybe< ListOf< Lazy< NotImplemented >, 1, 0 > > BaseCosts;
+ Maybe< Lazy< NotImplemented > > BaseQuantity;
+ };
+
+ // C++ wrapper for IfcConstructionEquipmentResource
+ struct IfcConstructionEquipmentResource : IfcConstructionResource, ObjectHelper<IfcConstructionEquipmentResource,1> { IfcConstructionEquipmentResource() : Object("IfcConstructionEquipmentResource") {}
+ Maybe< IfcConstructionEquipmentResourceTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcTypeResource
+ struct IfcTypeResource : IfcTypeObject, ObjectHelper<IfcTypeResource,3> { IfcTypeResource() : Object("IfcTypeResource") {}
+ Maybe< IfcIdentifier::Out > Identification;
+ Maybe< IfcText::Out > LongDescription;
+ Maybe< IfcLabel::Out > ResourceType;
+ };
+
+ // C++ wrapper for IfcConstructionResourceType
+ struct IfcConstructionResourceType : IfcTypeResource, ObjectHelper<IfcConstructionResourceType,2> { IfcConstructionResourceType() : Object("IfcConstructionResourceType") {}
+ Maybe< ListOf< Lazy< NotImplemented >, 1, 0 > > BaseCosts;
+ Maybe< Lazy< NotImplemented > > BaseQuantity;
+ };
+
+ // C++ wrapper for IfcConstructionEquipmentResourceType
+ struct IfcConstructionEquipmentResourceType : IfcConstructionResourceType, ObjectHelper<IfcConstructionEquipmentResourceType,1> { IfcConstructionEquipmentResourceType() : Object("IfcConstructionEquipmentResourceType") {}
+ IfcConstructionEquipmentResourceTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcConstructionMaterialResource
+ struct IfcConstructionMaterialResource : IfcConstructionResource, ObjectHelper<IfcConstructionMaterialResource,1> { IfcConstructionMaterialResource() : Object("IfcConstructionMaterialResource") {}
+ Maybe< IfcConstructionMaterialResourceTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcConstructionMaterialResourceType
+ struct IfcConstructionMaterialResourceType : IfcConstructionResourceType, ObjectHelper<IfcConstructionMaterialResourceType,1> { IfcConstructionMaterialResourceType() : Object("IfcConstructionMaterialResourceType") {}
+ IfcConstructionMaterialResourceTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcConstructionProductResource
+ struct IfcConstructionProductResource : IfcConstructionResource, ObjectHelper<IfcConstructionProductResource,1> { IfcConstructionProductResource() : Object("IfcConstructionProductResource") {}
+ Maybe< IfcConstructionProductResourceTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcConstructionProductResourceType
+ struct IfcConstructionProductResourceType : IfcConstructionResourceType, ObjectHelper<IfcConstructionProductResourceType,1> { IfcConstructionProductResourceType() : Object("IfcConstructionProductResourceType") {}
+ IfcConstructionProductResourceTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcContext
+ struct IfcContext : IfcObjectDefinition, ObjectHelper<IfcContext,5> { IfcContext() : Object("IfcContext") {}
+ Maybe< IfcLabel::Out > ObjectType;
+ Maybe< IfcLabel::Out > LongName;
+ Maybe< IfcLabel::Out > Phase;
+ Maybe< ListOf< Lazy< IfcRepresentationContext >, 1, 0 > > RepresentationContexts;
+ Maybe< Lazy< IfcUnitAssignment > > UnitsInContext;
+ };
+
+ // C++ wrapper for IfcNamedUnit
+ struct IfcNamedUnit : ObjectHelper<IfcNamedUnit,2> { IfcNamedUnit() : Object("IfcNamedUnit") {}
+ Lazy< NotImplemented > Dimensions;
+ IfcUnitEnum::Out UnitType;
+ };
+
+ // C++ wrapper for IfcContextDependentUnit
+ struct IfcContextDependentUnit : IfcNamedUnit, ObjectHelper<IfcContextDependentUnit,1> { IfcContextDependentUnit() : Object("IfcContextDependentUnit") {}
+ IfcLabel::Out Name;
+ };
+
+ // C++ wrapper for IfcController
+ struct IfcController : IfcDistributionControlElement, ObjectHelper<IfcController,1> { IfcController() : Object("IfcController") {}
+ Maybe< IfcControllerTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcControllerType
+ struct IfcControllerType : IfcDistributionControlElementType, ObjectHelper<IfcControllerType,1> { IfcControllerType() : Object("IfcControllerType") {}
+ IfcControllerTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcConversionBasedUnit
+ struct IfcConversionBasedUnit : IfcNamedUnit, ObjectHelper<IfcConversionBasedUnit,2> { IfcConversionBasedUnit() : Object("IfcConversionBasedUnit") {}
+ IfcLabel::Out Name;
+ Lazy< IfcMeasureWithUnit > ConversionFactor;
+ };
+
+ // C++ wrapper for IfcConversionBasedUnitWithOffset
+ struct IfcConversionBasedUnitWithOffset : IfcConversionBasedUnit, ObjectHelper<IfcConversionBasedUnitWithOffset,1> { IfcConversionBasedUnitWithOffset() : Object("IfcConversionBasedUnitWithOffset") {}
+ IfcReal::Out ConversionOffset;
+ };
+
+ // C++ wrapper for IfcCooledBeam
+ struct IfcCooledBeam : IfcEnergyConversionDevice, ObjectHelper<IfcCooledBeam,1> { IfcCooledBeam() : Object("IfcCooledBeam") {}
+ Maybe< IfcCooledBeamTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcCooledBeamType
+ struct IfcCooledBeamType : IfcEnergyConversionDeviceType, ObjectHelper<IfcCooledBeamType,1> { IfcCooledBeamType() : Object("IfcCooledBeamType") {}
+ IfcCooledBeamTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcCoolingTower
+ struct IfcCoolingTower : IfcEnergyConversionDevice, ObjectHelper<IfcCoolingTower,1> { IfcCoolingTower() : Object("IfcCoolingTower") {}
+ Maybe< IfcCoolingTowerTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcCoolingTowerType
+ struct IfcCoolingTowerType : IfcEnergyConversionDeviceType, ObjectHelper<IfcCoolingTowerType,1> { IfcCoolingTowerType() : Object("IfcCoolingTowerType") {}
+ IfcCoolingTowerTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcCostItem
+ struct IfcCostItem : IfcControl, ObjectHelper<IfcCostItem,3> { IfcCostItem() : Object("IfcCostItem") {}
+ Maybe< IfcCostItemTypeEnum::Out > PredefinedType;
+ Maybe< ListOf< Lazy< NotImplemented >, 1, 0 > > CostValues;
+ Maybe< ListOf< Lazy< NotImplemented >, 1, 0 > > CostQuantities;
+ };
+
+ // C++ wrapper for IfcCostSchedule
+ struct IfcCostSchedule : IfcControl, ObjectHelper<IfcCostSchedule,4> { IfcCostSchedule() : Object("IfcCostSchedule") {}
+ Maybe< IfcCostScheduleTypeEnum::Out > PredefinedType;
+ Maybe< IfcLabel::Out > Status;
+ Maybe< IfcDateTime::Out > SubmittedOn;
+ Maybe< IfcDateTime::Out > UpdateDate;
+ };
+
+ // C++ wrapper for IfcCovering
+ struct IfcCovering : IfcBuildingElement, ObjectHelper<IfcCovering,1> { IfcCovering() : Object("IfcCovering") {}
+ Maybe< IfcCoveringTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcCoveringType
+ struct IfcCoveringType : IfcBuildingElementType, ObjectHelper<IfcCoveringType,1> { IfcCoveringType() : Object("IfcCoveringType") {}
+ IfcCoveringTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcCrewResource
+ struct IfcCrewResource : IfcConstructionResource, ObjectHelper<IfcCrewResource,1> { IfcCrewResource() : Object("IfcCrewResource") {}
+ Maybe< IfcCrewResourceTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcCrewResourceType
+ struct IfcCrewResourceType : IfcConstructionResourceType, ObjectHelper<IfcCrewResourceType,1> { IfcCrewResourceType() : Object("IfcCrewResourceType") {}
+ IfcCrewResourceTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcCsgSolid
+ struct IfcCsgSolid : IfcSolidModel, ObjectHelper<IfcCsgSolid,1> { IfcCsgSolid() : Object("IfcCsgSolid") {}
+ IfcCsgSelect::Out TreeRootExpression;
+ };
+
+ // C++ wrapper for IfcCurtainWall
+ struct IfcCurtainWall : IfcBuildingElement, ObjectHelper<IfcCurtainWall,1> { IfcCurtainWall() : Object("IfcCurtainWall") {}
+ Maybe< IfcCurtainWallTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcCurtainWallType
+ struct IfcCurtainWallType : IfcBuildingElementType, ObjectHelper<IfcCurtainWallType,1> { IfcCurtainWallType() : Object("IfcCurtainWallType") {}
+ IfcCurtainWallTypeEnum::Out PredefinedType;
+ };
+
+ // 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 IfcCurveBoundedSurface
+ struct IfcCurveBoundedSurface : IfcBoundedSurface, ObjectHelper<IfcCurveBoundedSurface,3> { IfcCurveBoundedSurface() : Object("IfcCurveBoundedSurface") {}
+ Lazy< IfcSurface > BasisSurface;
+ ListOf< Lazy< IfcBoundaryCurve >, 1, 0 > Boundaries;
+ IfcBoolean::Out ImplicitOuter;
+ };
+
+ // C++ wrapper for IfcPresentationStyle
+ struct IfcPresentationStyle : ObjectHelper<IfcPresentationStyle,1> { IfcPresentationStyle() : Object("IfcPresentationStyle") {}
+ Maybe< IfcLabel::Out > Name;
+ };
+
+ // C++ wrapper for IfcElementarySurface
+ struct IfcElementarySurface : IfcSurface, ObjectHelper<IfcElementarySurface,1> { IfcElementarySurface() : Object("IfcElementarySurface") {}
+ Lazy< IfcAxis2Placement3D > Position;
+ };
+
+ // C++ wrapper for IfcCylindricalSurface
+ struct IfcCylindricalSurface : IfcElementarySurface, ObjectHelper<IfcCylindricalSurface,1> { IfcCylindricalSurface() : Object("IfcCylindricalSurface") {}
+ IfcPositiveLengthMeasure::Out Radius;
+ };
+
+ // C++ wrapper for IfcDamper
+ struct IfcDamper : IfcFlowController, ObjectHelper<IfcDamper,1> { IfcDamper() : Object("IfcDamper") {}
+ Maybe< IfcDamperTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcDamperType
+ struct IfcDamperType : IfcFlowControllerType, ObjectHelper<IfcDamperType,1> { IfcDamperType() : Object("IfcDamperType") {}
+ IfcDamperTypeEnum::Out PredefinedType;
+ };
+
+ // 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 IfcDirection
+ struct IfcDirection : IfcGeometricRepresentationItem, ObjectHelper<IfcDirection,1> { IfcDirection() : Object("IfcDirection") {}
+ ListOf< IfcReal, 2, 3 >::Out DirectionRatios;
+ };
+
+ // C++ wrapper for IfcDiscreteAccessory
+ struct IfcDiscreteAccessory : IfcElementComponent, ObjectHelper<IfcDiscreteAccessory,1> { IfcDiscreteAccessory() : Object("IfcDiscreteAccessory") {}
+ Maybe< IfcDiscreteAccessoryTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcDiscreteAccessoryType
+ struct IfcDiscreteAccessoryType : IfcElementComponentType, ObjectHelper<IfcDiscreteAccessoryType,1> { IfcDiscreteAccessoryType() : Object("IfcDiscreteAccessoryType") {}
+ IfcDiscreteAccessoryTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcDistributionChamberElement
+ struct IfcDistributionChamberElement : IfcDistributionFlowElement, ObjectHelper<IfcDistributionChamberElement,1> { IfcDistributionChamberElement() : Object("IfcDistributionChamberElement") {}
+ Maybe< IfcDistributionChamberElementTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcDistributionChamberElementType
+ struct IfcDistributionChamberElementType : IfcDistributionFlowElementType, ObjectHelper<IfcDistributionChamberElementType,1> { IfcDistributionChamberElementType() : Object("IfcDistributionChamberElementType") {}
+ IfcDistributionChamberElementTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcDistributionSystem
+ struct IfcDistributionSystem : IfcSystem, ObjectHelper<IfcDistributionSystem,2> { IfcDistributionSystem() : Object("IfcDistributionSystem") {}
+ Maybe< IfcLabel::Out > LongName;
+ Maybe< IfcDistributionSystemEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcDistributionCircuit
+ struct IfcDistributionCircuit : IfcDistributionSystem, ObjectHelper<IfcDistributionCircuit,0> { IfcDistributionCircuit() : Object("IfcDistributionCircuit") {}
+
+ };
+
+ // C++ wrapper for IfcPort
+ struct IfcPort : IfcProduct, ObjectHelper<IfcPort,0> { IfcPort() : Object("IfcPort") {}
+
+ };
+
+ // C++ wrapper for IfcDistributionPort
+ struct IfcDistributionPort : IfcPort, ObjectHelper<IfcDistributionPort,3> { IfcDistributionPort() : Object("IfcDistributionPort") {}
+ Maybe< IfcFlowDirectionEnum::Out > FlowDirection;
+ Maybe< IfcDistributionPortTypeEnum::Out > PredefinedType;
+ Maybe< IfcDistributionSystemEnum::Out > SystemType;
+ };
+
+ // C++ wrapper for IfcDoor
+ struct IfcDoor : IfcBuildingElement, ObjectHelper<IfcDoor,5> { IfcDoor() : Object("IfcDoor") {}
+ Maybe< IfcPositiveLengthMeasure::Out > OverallHeight;
+ Maybe< IfcPositiveLengthMeasure::Out > OverallWidth;
+ Maybe< IfcDoorTypeEnum::Out > PredefinedType;
+ Maybe< IfcDoorTypeOperationEnum::Out > OperationType;
+ Maybe< IfcLabel::Out > UserDefinedOperationType;
+ };
+
+ // C++ wrapper for IfcPropertySetDefinition
+ struct IfcPropertySetDefinition : IfcPropertyDefinition, ObjectHelper<IfcPropertySetDefinition,0> { IfcPropertySetDefinition() : Object("IfcPropertySetDefinition") {}
+
+ };
+
+ // C++ wrapper for IfcDoorStandardCase
+ struct IfcDoorStandardCase : IfcDoor, ObjectHelper<IfcDoorStandardCase,0> { IfcDoorStandardCase() : Object("IfcDoorStandardCase") {}
+
+ };
+
+ // C++ wrapper for IfcDoorStyle
+ struct IfcDoorStyle : IfcTypeProduct, ObjectHelper<IfcDoorStyle,4> { IfcDoorStyle() : Object("IfcDoorStyle") {}
+ IfcDoorStyleOperationEnum::Out OperationType;
+ IfcDoorStyleConstructionEnum::Out ConstructionType;
+ IfcBoolean::Out ParameterTakesPrecedence;
+ IfcBoolean::Out Sizeable;
+ };
+
+ // C++ wrapper for IfcDoorType
+ struct IfcDoorType : IfcBuildingElementType, ObjectHelper<IfcDoorType,4> { IfcDoorType() : Object("IfcDoorType") {}
+ IfcDoorTypeEnum::Out PredefinedType;
+ IfcDoorTypeOperationEnum::Out OperationType;
+ Maybe< IfcBoolean::Out > ParameterTakesPrecedence;
+ Maybe< IfcLabel::Out > UserDefinedOperationType;
+ };
+
+ // C++ wrapper for IfcDuctFitting
+ struct IfcDuctFitting : IfcFlowFitting, ObjectHelper<IfcDuctFitting,1> { IfcDuctFitting() : Object("IfcDuctFitting") {}
+ Maybe< IfcDuctFittingTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcDuctFittingType
+ struct IfcDuctFittingType : IfcFlowFittingType, ObjectHelper<IfcDuctFittingType,1> { IfcDuctFittingType() : Object("IfcDuctFittingType") {}
+ IfcDuctFittingTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcDuctSegment
+ struct IfcDuctSegment : IfcFlowSegment, ObjectHelper<IfcDuctSegment,1> { IfcDuctSegment() : Object("IfcDuctSegment") {}
+ Maybe< IfcDuctSegmentTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcDuctSegmentType
+ struct IfcDuctSegmentType : IfcFlowSegmentType, ObjectHelper<IfcDuctSegmentType,1> { IfcDuctSegmentType() : Object("IfcDuctSegmentType") {}
+ IfcDuctSegmentTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcFlowTreatmentDevice
+ struct IfcFlowTreatmentDevice : IfcDistributionFlowElement, ObjectHelper<IfcFlowTreatmentDevice,0> { IfcFlowTreatmentDevice() : Object("IfcFlowTreatmentDevice") {}
+
+ };
+
+ // C++ wrapper for IfcDuctSilencer
+ struct IfcDuctSilencer : IfcFlowTreatmentDevice, ObjectHelper<IfcDuctSilencer,1> { IfcDuctSilencer() : Object("IfcDuctSilencer") {}
+ Maybe< IfcDuctSilencerTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcFlowTreatmentDeviceType
+ struct IfcFlowTreatmentDeviceType : IfcDistributionFlowElementType, ObjectHelper<IfcFlowTreatmentDeviceType,0> { IfcFlowTreatmentDeviceType() : Object("IfcFlowTreatmentDeviceType") {}
+
+ };
+
+ // C++ wrapper for IfcDuctSilencerType
+ struct IfcDuctSilencerType : IfcFlowTreatmentDeviceType, ObjectHelper<IfcDuctSilencerType,1> { IfcDuctSilencerType() : Object("IfcDuctSilencerType") {}
+ IfcDuctSilencerTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcEdge
+ struct IfcEdge : IfcTopologicalRepresentationItem, ObjectHelper<IfcEdge,2> { IfcEdge() : Object("IfcEdge") {}
+ Lazy< IfcVertex > EdgeStart;
+ Lazy< IfcVertex > EdgeEnd;
+ };
+
+ // C++ wrapper for IfcEdgeCurve
+ struct IfcEdgeCurve : IfcEdge, ObjectHelper<IfcEdgeCurve,2> { IfcEdgeCurve() : Object("IfcEdgeCurve") {}
+ Lazy< IfcCurve > EdgeGeometry;
+ IfcBoolean::Out SameSense;
+ };
+
+ // C++ wrapper for IfcLoop
+ struct IfcLoop : IfcTopologicalRepresentationItem, ObjectHelper<IfcLoop,0> { IfcLoop() : Object("IfcLoop") {}
+
+ };
+
+ // C++ wrapper for IfcEdgeLoop
+ struct IfcEdgeLoop : IfcLoop, ObjectHelper<IfcEdgeLoop,1> { IfcEdgeLoop() : Object("IfcEdgeLoop") {}
+ ListOf< Lazy< IfcOrientedEdge >, 1, 0 > EdgeList;
+ };
+
+ // C++ wrapper for IfcElectricAppliance
+ struct IfcElectricAppliance : IfcFlowTerminal, ObjectHelper<IfcElectricAppliance,1> { IfcElectricAppliance() : Object("IfcElectricAppliance") {}
+ Maybe< IfcElectricApplianceTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcElectricApplianceType
+ struct IfcElectricApplianceType : IfcFlowTerminalType, ObjectHelper<IfcElectricApplianceType,1> { IfcElectricApplianceType() : Object("IfcElectricApplianceType") {}
+ IfcElectricApplianceTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcElectricDistributionBoard
+ struct IfcElectricDistributionBoard : IfcFlowController, ObjectHelper<IfcElectricDistributionBoard,1> { IfcElectricDistributionBoard() : Object("IfcElectricDistributionBoard") {}
+ Maybe< IfcElectricDistributionBoardTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcElectricDistributionBoardType
+ struct IfcElectricDistributionBoardType : IfcFlowControllerType, ObjectHelper<IfcElectricDistributionBoardType,1> { IfcElectricDistributionBoardType() : Object("IfcElectricDistributionBoardType") {}
+ IfcElectricDistributionBoardTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcFlowStorageDevice
+ struct IfcFlowStorageDevice : IfcDistributionFlowElement, ObjectHelper<IfcFlowStorageDevice,0> { IfcFlowStorageDevice() : Object("IfcFlowStorageDevice") {}
+
+ };
+
+ // C++ wrapper for IfcElectricFlowStorageDevice
+ struct IfcElectricFlowStorageDevice : IfcFlowStorageDevice, ObjectHelper<IfcElectricFlowStorageDevice,1> { IfcElectricFlowStorageDevice() : Object("IfcElectricFlowStorageDevice") {}
+ Maybe< IfcElectricFlowStorageDeviceTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcFlowStorageDeviceType
+ struct IfcFlowStorageDeviceType : IfcDistributionFlowElementType, ObjectHelper<IfcFlowStorageDeviceType,0> { IfcFlowStorageDeviceType() : Object("IfcFlowStorageDeviceType") {}
+
+ };
+
+ // C++ wrapper for IfcElectricFlowStorageDeviceType
+ struct IfcElectricFlowStorageDeviceType : IfcFlowStorageDeviceType, ObjectHelper<IfcElectricFlowStorageDeviceType,1> { IfcElectricFlowStorageDeviceType() : Object("IfcElectricFlowStorageDeviceType") {}
+ IfcElectricFlowStorageDeviceTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcElectricGenerator
+ struct IfcElectricGenerator : IfcEnergyConversionDevice, ObjectHelper<IfcElectricGenerator,1> { IfcElectricGenerator() : Object("IfcElectricGenerator") {}
+ Maybe< IfcElectricGeneratorTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcElectricGeneratorType
+ struct IfcElectricGeneratorType : IfcEnergyConversionDeviceType, ObjectHelper<IfcElectricGeneratorType,1> { IfcElectricGeneratorType() : Object("IfcElectricGeneratorType") {}
+ IfcElectricGeneratorTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcElectricMotor
+ struct IfcElectricMotor : IfcEnergyConversionDevice, ObjectHelper<IfcElectricMotor,1> { IfcElectricMotor() : Object("IfcElectricMotor") {}
+ Maybe< IfcElectricMotorTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcElectricMotorType
+ struct IfcElectricMotorType : IfcEnergyConversionDeviceType, ObjectHelper<IfcElectricMotorType,1> { IfcElectricMotorType() : Object("IfcElectricMotorType") {}
+ IfcElectricMotorTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcElectricTimeControl
+ struct IfcElectricTimeControl : IfcFlowController, ObjectHelper<IfcElectricTimeControl,1> { IfcElectricTimeControl() : Object("IfcElectricTimeControl") {}
+ Maybe< IfcElectricTimeControlTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcElectricTimeControlType
+ struct IfcElectricTimeControlType : IfcFlowControllerType, ObjectHelper<IfcElectricTimeControlType,1> { IfcElectricTimeControlType() : Object("IfcElectricTimeControlType") {}
+ IfcElectricTimeControlTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcElementAssembly
+ struct IfcElementAssembly : IfcElement, ObjectHelper<IfcElementAssembly,2> { IfcElementAssembly() : Object("IfcElementAssembly") {}
+ Maybe< IfcAssemblyPlaceEnum::Out > AssemblyPlace;
+ Maybe< IfcElementAssemblyTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcElementAssemblyType
+ struct IfcElementAssemblyType : IfcElementType, ObjectHelper<IfcElementAssemblyType,1> { IfcElementAssemblyType() : Object("IfcElementAssemblyType") {}
+ IfcElementAssemblyTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcQuantitySet
+ struct IfcQuantitySet : IfcPropertySetDefinition, ObjectHelper<IfcQuantitySet,0> { IfcQuantitySet() : Object("IfcQuantitySet") {}
+
+ };
+
+ // C++ wrapper for IfcElementQuantity
+ struct IfcElementQuantity : IfcQuantitySet, ObjectHelper<IfcElementQuantity,2> { IfcElementQuantity() : Object("IfcElementQuantity") {}
+ Maybe< IfcLabel::Out > MethodOfMeasurement;
+ ListOf< Lazy< NotImplemented >, 1, 0 > Quantities;
+ };
+
+ // C++ wrapper for IfcEllipse
+ struct IfcEllipse : IfcConic, ObjectHelper<IfcEllipse,2> { IfcEllipse() : Object("IfcEllipse") {}
+ IfcPositiveLengthMeasure::Out SemiAxis1;
+ IfcPositiveLengthMeasure::Out SemiAxis2;
+ };
+
+ // C++ wrapper for IfcEllipseProfileDef
+ struct IfcEllipseProfileDef : IfcParameterizedProfileDef, ObjectHelper<IfcEllipseProfileDef,2> { IfcEllipseProfileDef() : Object("IfcEllipseProfileDef") {}
+ IfcPositiveLengthMeasure::Out SemiAxis1;
+ IfcPositiveLengthMeasure::Out SemiAxis2;
+ };
+
+ // C++ wrapper for IfcEngine
+ struct IfcEngine : IfcEnergyConversionDevice, ObjectHelper<IfcEngine,1> { IfcEngine() : Object("IfcEngine") {}
+ Maybe< IfcEngineTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcEngineType
+ struct IfcEngineType : IfcEnergyConversionDeviceType, ObjectHelper<IfcEngineType,1> { IfcEngineType() : Object("IfcEngineType") {}
+ IfcEngineTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcEvaporativeCooler
+ struct IfcEvaporativeCooler : IfcEnergyConversionDevice, ObjectHelper<IfcEvaporativeCooler,1> { IfcEvaporativeCooler() : Object("IfcEvaporativeCooler") {}
+ Maybe< IfcEvaporativeCoolerTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcEvaporativeCoolerType
+ struct IfcEvaporativeCoolerType : IfcEnergyConversionDeviceType, ObjectHelper<IfcEvaporativeCoolerType,1> { IfcEvaporativeCoolerType() : Object("IfcEvaporativeCoolerType") {}
+ IfcEvaporativeCoolerTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcEvaporator
+ struct IfcEvaporator : IfcEnergyConversionDevice, ObjectHelper<IfcEvaporator,1> { IfcEvaporator() : Object("IfcEvaporator") {}
+ Maybe< IfcEvaporatorTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcEvaporatorType
+ struct IfcEvaporatorType : IfcEnergyConversionDeviceType, ObjectHelper<IfcEvaporatorType,1> { IfcEvaporatorType() : Object("IfcEvaporatorType") {}
+ IfcEvaporatorTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcProcess
+ struct IfcProcess : IfcObject, ObjectHelper<IfcProcess,2> { IfcProcess() : Object("IfcProcess") {}
+ Maybe< IfcIdentifier::Out > Identification;
+ Maybe< IfcText::Out > LongDescription;
+ };
+
+ // C++ wrapper for IfcEvent
+ struct IfcEvent : IfcProcess, ObjectHelper<IfcEvent,4> { IfcEvent() : Object("IfcEvent") {}
+ Maybe< IfcEventTypeEnum::Out > PredefinedType;
+ Maybe< IfcEventTriggerTypeEnum::Out > EventTriggerType;
+ Maybe< IfcLabel::Out > UserDefinedEventTriggerType;
+ Maybe< Lazy< NotImplemented > > EventOccurenceTime;
+ };
+
+ // C++ wrapper for IfcTypeProcess
+ struct IfcTypeProcess : IfcTypeObject, ObjectHelper<IfcTypeProcess,3> { IfcTypeProcess() : Object("IfcTypeProcess") {}
+ Maybe< IfcIdentifier::Out > Identification;
+ Maybe< IfcText::Out > LongDescription;
+ Maybe< IfcLabel::Out > ProcessType;
+ };
+
+ // C++ wrapper for IfcEventType
+ struct IfcEventType : IfcTypeProcess, ObjectHelper<IfcEventType,3> { IfcEventType() : Object("IfcEventType") {}
+ IfcEventTypeEnum::Out PredefinedType;
+ IfcEventTriggerTypeEnum::Out EventTriggerType;
+ Maybe< IfcLabel::Out > UserDefinedEventTriggerType;
+ };
+
+ // C++ wrapper for IfcExternalSpatialStructureElement
+ struct IfcExternalSpatialStructureElement : IfcSpatialElement, ObjectHelper<IfcExternalSpatialStructureElement,0> { IfcExternalSpatialStructureElement() : Object("IfcExternalSpatialStructureElement") {}
+
+ };
+
+ // C++ wrapper for IfcExternalSpatialElement
+ struct IfcExternalSpatialElement : IfcExternalSpatialStructureElement, ObjectHelper<IfcExternalSpatialElement,1> { IfcExternalSpatialElement() : Object("IfcExternalSpatialElement") {}
+ Maybe< IfcExternalSpatialElementTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcSweptAreaSolid
+ struct IfcSweptAreaSolid : IfcSolidModel, ObjectHelper<IfcSweptAreaSolid,2> { IfcSweptAreaSolid() : Object("IfcSweptAreaSolid") {}
+ Lazy< IfcProfileDef > SweptArea;
+ Maybe< 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 IfcExtrudedAreaSolidTapered
+ struct IfcExtrudedAreaSolidTapered : IfcExtrudedAreaSolid, ObjectHelper<IfcExtrudedAreaSolidTapered,1> { IfcExtrudedAreaSolidTapered() : Object("IfcExtrudedAreaSolidTapered") {}
+ Lazy< IfcProfileDef > EndSweptArea;
+ };
+
+ // C++ wrapper for IfcFaceBasedSurfaceModel
+ struct IfcFaceBasedSurfaceModel : IfcGeometricRepresentationItem, ObjectHelper<IfcFaceBasedSurfaceModel,1> { IfcFaceBasedSurfaceModel() : Object("IfcFaceBasedSurfaceModel") {}
+ ListOf< Lazy< IfcConnectedFaceSet >, 1, 0 > FbsmFaces;
+ };
+
+ // C++ wrapper for IfcFaceBound
+ struct IfcFaceBound : IfcTopologicalRepresentationItem, ObjectHelper<IfcFaceBound,2> { IfcFaceBound() : Object("IfcFaceBound") {}
+ Lazy< IfcLoop > Bound;
+ IfcBoolean::Out Orientation;
+ };
+
+ // C++ wrapper for IfcFaceOuterBound
+ struct IfcFaceOuterBound : IfcFaceBound, ObjectHelper<IfcFaceOuterBound,0> { IfcFaceOuterBound() : Object("IfcFaceOuterBound") {}
+
+ };
+
+ // C++ wrapper for IfcFacetedBrep
+ struct IfcFacetedBrep : IfcManifoldSolidBrep, ObjectHelper<IfcFacetedBrep,0> { IfcFacetedBrep() : Object("IfcFacetedBrep") {}
+
+ };
+
+ // C++ wrapper for IfcFacetedBrepWithVoids
+ struct IfcFacetedBrepWithVoids : IfcFacetedBrep, ObjectHelper<IfcFacetedBrepWithVoids,1> { IfcFacetedBrepWithVoids() : Object("IfcFacetedBrepWithVoids") {}
+ ListOf< Lazy< IfcClosedShell >, 1, 0 > Voids;
+ };
+
+ // C++ wrapper for IfcFan
+ struct IfcFan : IfcFlowMovingDevice, ObjectHelper<IfcFan,1> { IfcFan() : Object("IfcFan") {}
+ Maybe< IfcFanTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcFanType
+ struct IfcFanType : IfcFlowMovingDeviceType, ObjectHelper<IfcFanType,1> { IfcFanType() : Object("IfcFanType") {}
+ IfcFanTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcFastener
+ struct IfcFastener : IfcElementComponent, ObjectHelper<IfcFastener,1> { IfcFastener() : Object("IfcFastener") {}
+ Maybe< IfcFastenerTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcFastenerType
+ struct IfcFastenerType : IfcElementComponentType, ObjectHelper<IfcFastenerType,1> { IfcFastenerType() : Object("IfcFastenerType") {}
+ IfcFastenerTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcFeatureElement
+ struct IfcFeatureElement : IfcElement, ObjectHelper<IfcFeatureElement,0> { IfcFeatureElement() : Object("IfcFeatureElement") {}
+
+ };
+
+ // C++ wrapper for IfcFeatureElementAddition
+ struct IfcFeatureElementAddition : IfcFeatureElement, ObjectHelper<IfcFeatureElementAddition,0> { IfcFeatureElementAddition() : Object("IfcFeatureElementAddition") {}
+
+ };
+
+ // C++ wrapper for IfcFeatureElementSubtraction
+ struct IfcFeatureElementSubtraction : IfcFeatureElement, ObjectHelper<IfcFeatureElementSubtraction,0> { IfcFeatureElementSubtraction() : Object("IfcFeatureElementSubtraction") {}
+
+ };
+
+ // 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 IfcFillAreaStyleTiles
+ struct IfcFillAreaStyleTiles : IfcGeometricRepresentationItem, ObjectHelper<IfcFillAreaStyleTiles,3> { IfcFillAreaStyleTiles() : Object("IfcFillAreaStyleTiles") {}
+ ListOf< Lazy< IfcVector >, 2, 2 > TilingPattern;
+ ListOf< Lazy< IfcStyledItem >, 1, 0 > Tiles;
+ IfcPositiveRatioMeasure::Out TilingScale;
+ };
+
+ // C++ wrapper for IfcFilter
+ struct IfcFilter : IfcFlowTreatmentDevice, ObjectHelper<IfcFilter,1> { IfcFilter() : Object("IfcFilter") {}
+ Maybe< IfcFilterTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcFilterType
+ struct IfcFilterType : IfcFlowTreatmentDeviceType, ObjectHelper<IfcFilterType,1> { IfcFilterType() : Object("IfcFilterType") {}
+ IfcFilterTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcFireSuppressionTerminal
+ struct IfcFireSuppressionTerminal : IfcFlowTerminal, ObjectHelper<IfcFireSuppressionTerminal,1> { IfcFireSuppressionTerminal() : Object("IfcFireSuppressionTerminal") {}
+ Maybe< IfcFireSuppressionTerminalTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcFireSuppressionTerminalType
+ struct IfcFireSuppressionTerminalType : IfcFlowTerminalType, ObjectHelper<IfcFireSuppressionTerminalType,1> { IfcFireSuppressionTerminalType() : Object("IfcFireSuppressionTerminalType") {}
+ IfcFireSuppressionTerminalTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcFixedReferenceSweptAreaSolid
+ struct IfcFixedReferenceSweptAreaSolid : IfcSweptAreaSolid, ObjectHelper<IfcFixedReferenceSweptAreaSolid,4> { IfcFixedReferenceSweptAreaSolid() : Object("IfcFixedReferenceSweptAreaSolid") {}
+ Lazy< IfcCurve > Directrix;
+ Maybe< IfcParameterValue::Out > StartParam;
+ Maybe< IfcParameterValue::Out > EndParam;
+ Lazy< IfcDirection > FixedReference;
+ };
+
+ // C++ wrapper for IfcFlowInstrument
+ struct IfcFlowInstrument : IfcDistributionControlElement, ObjectHelper<IfcFlowInstrument,1> { IfcFlowInstrument() : Object("IfcFlowInstrument") {}
+ Maybe< IfcFlowInstrumentTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcFlowInstrumentType
+ struct IfcFlowInstrumentType : IfcDistributionControlElementType, ObjectHelper<IfcFlowInstrumentType,1> { IfcFlowInstrumentType() : Object("IfcFlowInstrumentType") {}
+ IfcFlowInstrumentTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcFlowMeter
+ struct IfcFlowMeter : IfcFlowController, ObjectHelper<IfcFlowMeter,1> { IfcFlowMeter() : Object("IfcFlowMeter") {}
+ Maybe< IfcFlowMeterTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcFlowMeterType
+ struct IfcFlowMeterType : IfcFlowControllerType, ObjectHelper<IfcFlowMeterType,1> { IfcFlowMeterType() : Object("IfcFlowMeterType") {}
+ IfcFlowMeterTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcFooting
+ struct IfcFooting : IfcBuildingElement, ObjectHelper<IfcFooting,1> { IfcFooting() : Object("IfcFooting") {}
+ Maybe< IfcFootingTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcFootingType
+ struct IfcFootingType : IfcBuildingElementType, ObjectHelper<IfcFootingType,1> { IfcFootingType() : Object("IfcFootingType") {}
+ IfcFootingTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcFurnishingElement
+ struct IfcFurnishingElement : IfcElement, ObjectHelper<IfcFurnishingElement,0> { IfcFurnishingElement() : Object("IfcFurnishingElement") {}
+
+ };
+
+ // C++ wrapper for IfcFurnishingElementType
+ struct IfcFurnishingElementType : IfcElementType, ObjectHelper<IfcFurnishingElementType,0> { IfcFurnishingElementType() : Object("IfcFurnishingElementType") {}
+
+ };
+
+ // C++ wrapper for IfcFurniture
+ struct IfcFurniture : IfcFurnishingElement, ObjectHelper<IfcFurniture,1> { IfcFurniture() : Object("IfcFurniture") {}
+ Maybe< IfcFurnitureTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcFurnitureType
+ struct IfcFurnitureType : IfcFurnishingElementType, ObjectHelper<IfcFurnitureType,2> { IfcFurnitureType() : Object("IfcFurnitureType") {}
+ IfcAssemblyPlaceEnum::Out AssemblyPlace;
+ Maybe< IfcFurnitureTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcGeographicElement
+ struct IfcGeographicElement : IfcElement, ObjectHelper<IfcGeographicElement,1> { IfcGeographicElement() : Object("IfcGeographicElement") {}
+ Maybe< IfcGeographicElementTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcGeographicElementType
+ struct IfcGeographicElementType : IfcElementType, ObjectHelper<IfcGeographicElementType,1> { IfcGeographicElementType() : Object("IfcGeographicElementType") {}
+ IfcGeographicElementTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcGeometricSet
+ struct IfcGeometricSet : IfcGeometricRepresentationItem, ObjectHelper<IfcGeometricSet,1> { IfcGeometricSet() : Object("IfcGeometricSet") {}
+ ListOf< IfcGeometricSetSelect, 1, 0 >::Out Elements;
+ };
+
+ // C++ wrapper for IfcGeometricCurveSet
+ struct IfcGeometricCurveSet : IfcGeometricSet, ObjectHelper<IfcGeometricCurveSet,0> { IfcGeometricCurveSet() : Object("IfcGeometricCurveSet") {}
+
+ };
+
+ // 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< IfcReal::Out > Precision;
+ IfcAxis2Placement::Out WorldCoordinateSystem;
+ Maybe< Lazy< IfcDirection > > TrueNorth;
+ };
+
+ // 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 IfcGrid
+ struct IfcGrid : IfcProduct, ObjectHelper<IfcGrid,4> { IfcGrid() : Object("IfcGrid") {}
+ ListOf< Lazy< NotImplemented >, 1, 0 > UAxes;
+ ListOf< Lazy< NotImplemented >, 1, 0 > VAxes;
+ Maybe< ListOf< Lazy< NotImplemented >, 1, 0 > > WAxes;
+ Maybe< IfcGridTypeEnum::Out > PredefinedType;
+ };
+
+ // 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< IfcGridPlacementDirectionSelect::Out > PlacementRefDirection;
+ };
+
+ // C++ wrapper for IfcHeatExchanger
+ struct IfcHeatExchanger : IfcEnergyConversionDevice, ObjectHelper<IfcHeatExchanger,1> { IfcHeatExchanger() : Object("IfcHeatExchanger") {}
+ Maybe< IfcHeatExchangerTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcHeatExchangerType
+ struct IfcHeatExchangerType : IfcEnergyConversionDeviceType, ObjectHelper<IfcHeatExchangerType,1> { IfcHeatExchangerType() : Object("IfcHeatExchangerType") {}
+ IfcHeatExchangerTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcHumidifier
+ struct IfcHumidifier : IfcEnergyConversionDevice, ObjectHelper<IfcHumidifier,1> { IfcHumidifier() : Object("IfcHumidifier") {}
+ Maybe< IfcHumidifierTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcHumidifierType
+ struct IfcHumidifierType : IfcEnergyConversionDeviceType, ObjectHelper<IfcHumidifierType,1> { IfcHumidifierType() : Object("IfcHumidifierType") {}
+ IfcHumidifierTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcIShapeProfileDef
+ struct IfcIShapeProfileDef : IfcParameterizedProfileDef, ObjectHelper<IfcIShapeProfileDef,7> { IfcIShapeProfileDef() : Object("IfcIShapeProfileDef") {}
+ IfcPositiveLengthMeasure::Out OverallWidth;
+ IfcPositiveLengthMeasure::Out OverallDepth;
+ IfcPositiveLengthMeasure::Out WebThickness;
+ IfcPositiveLengthMeasure::Out FlangeThickness;
+ Maybe< IfcNonNegativeLengthMeasure::Out > FilletRadius;
+ Maybe< IfcNonNegativeLengthMeasure::Out > FlangeEdgeRadius;
+ Maybe< IfcPlaneAngleMeasure::Out > FlangeSlope;
+ };
+
+ // C++ wrapper for IfcIndexedPolyCurve
+ struct IfcIndexedPolyCurve : IfcBoundedCurve, ObjectHelper<IfcIndexedPolyCurve,3> { IfcIndexedPolyCurve() : Object("IfcIndexedPolyCurve") {}
+ Lazy< IfcCartesianPointList > Points;
+ Maybe< ListOf< IfcSegmentIndexSelect, 1, 0 >::Out > Segments;
+ Maybe< IfcBoolean::Out > SelfIntersect;
+ };
+
+ // C++ wrapper for IfcTessellatedItem
+ struct IfcTessellatedItem : IfcGeometricRepresentationItem, ObjectHelper<IfcTessellatedItem,0> { IfcTessellatedItem() : Object("IfcTessellatedItem") {}
+
+ };
+
+ // C++ wrapper for IfcIndexedPolygonalFace
+ struct IfcIndexedPolygonalFace : IfcTessellatedItem, ObjectHelper<IfcIndexedPolygonalFace,1> { IfcIndexedPolygonalFace() : Object("IfcIndexedPolygonalFace") {}
+ ListOf< IfcPositiveInteger, 3, 0 >::Out CoordIndex;
+ };
+
+ // C++ wrapper for IfcIndexedPolygonalFaceWithVoids
+ struct IfcIndexedPolygonalFaceWithVoids : IfcIndexedPolygonalFace, ObjectHelper<IfcIndexedPolygonalFaceWithVoids,0> { IfcIndexedPolygonalFaceWithVoids() : Object("IfcIndexedPolygonalFaceWithVoids") {}
+
+ };
+
+ // C++ wrapper for IfcInterceptor
+ struct IfcInterceptor : IfcFlowTreatmentDevice, ObjectHelper<IfcInterceptor,1> { IfcInterceptor() : Object("IfcInterceptor") {}
+ Maybe< IfcInterceptorTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcInterceptorType
+ struct IfcInterceptorType : IfcFlowTreatmentDeviceType, ObjectHelper<IfcInterceptorType,1> { IfcInterceptorType() : Object("IfcInterceptorType") {}
+ IfcInterceptorTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcSurfaceCurve
+ struct IfcSurfaceCurve : IfcCurve, ObjectHelper<IfcSurfaceCurve,3> { IfcSurfaceCurve() : Object("IfcSurfaceCurve") {}
+ Lazy< IfcCurve > Curve3D;
+ ListOf< Lazy< IfcPcurve >, 1, 2 > AssociatedGeometry;
+ IfcPreferredSurfaceCurveRepresentation::Out MasterRepresentation;
+ };
+
+ // C++ wrapper for IfcIntersectionCurve
+ struct IfcIntersectionCurve : IfcSurfaceCurve, ObjectHelper<IfcIntersectionCurve,0> { IfcIntersectionCurve() : Object("IfcIntersectionCurve") {}
+
+ };
+
+ // C++ wrapper for IfcInventory
+ struct IfcInventory : IfcGroup, ObjectHelper<IfcInventory,6> { IfcInventory() : Object("IfcInventory") {}
+ Maybe< IfcInventoryTypeEnum::Out > PredefinedType;
+ Maybe< IfcActorSelect::Out > Jurisdiction;
+ Maybe< ListOf< Lazy< NotImplemented >, 1, 0 > > ResponsiblePersons;
+ Maybe< IfcDate::Out > LastUpdateDate;
+ Maybe< Lazy< NotImplemented > > CurrentValue;
+ Maybe< Lazy< NotImplemented > > OriginalValue;
+ };
+
+ // C++ wrapper for IfcJunctionBox
+ struct IfcJunctionBox : IfcFlowFitting, ObjectHelper<IfcJunctionBox,1> { IfcJunctionBox() : Object("IfcJunctionBox") {}
+ Maybe< IfcJunctionBoxTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcJunctionBoxType
+ struct IfcJunctionBoxType : IfcFlowFittingType, ObjectHelper<IfcJunctionBoxType,1> { IfcJunctionBoxType() : Object("IfcJunctionBoxType") {}
+ IfcJunctionBoxTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcLShapeProfileDef
+ struct IfcLShapeProfileDef : IfcParameterizedProfileDef, ObjectHelper<IfcLShapeProfileDef,6> { IfcLShapeProfileDef() : Object("IfcLShapeProfileDef") {}
+ IfcPositiveLengthMeasure::Out Depth;
+ Maybe< IfcPositiveLengthMeasure::Out > Width;
+ IfcPositiveLengthMeasure::Out Thickness;
+ Maybe< IfcNonNegativeLengthMeasure::Out > FilletRadius;
+ Maybe< IfcNonNegativeLengthMeasure::Out > EdgeRadius;
+ Maybe< IfcPlaneAngleMeasure::Out > LegSlope;
+ };
+
+ // C++ wrapper for IfcLaborResource
+ struct IfcLaborResource : IfcConstructionResource, ObjectHelper<IfcLaborResource,1> { IfcLaborResource() : Object("IfcLaborResource") {}
+ Maybe< IfcLaborResourceTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcLaborResourceType
+ struct IfcLaborResourceType : IfcConstructionResourceType, ObjectHelper<IfcLaborResourceType,1> { IfcLaborResourceType() : Object("IfcLaborResourceType") {}
+ IfcLaborResourceTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcLamp
+ struct IfcLamp : IfcFlowTerminal, ObjectHelper<IfcLamp,1> { IfcLamp() : Object("IfcLamp") {}
+ Maybe< IfcLampTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcLampType
+ struct IfcLampType : IfcFlowTerminalType, ObjectHelper<IfcLampType,1> { IfcLampType() : Object("IfcLampType") {}
+ IfcLampTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcLightFixture
+ struct IfcLightFixture : IfcFlowTerminal, ObjectHelper<IfcLightFixture,1> { IfcLightFixture() : Object("IfcLightFixture") {}
+ Maybe< IfcLightFixtureTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcLightFixtureType
+ struct IfcLightFixtureType : IfcFlowTerminalType, ObjectHelper<IfcLightFixtureType,1> { IfcLightFixtureType() : Object("IfcLightFixtureType") {}
+ IfcLightFixtureTypeEnum::Out PredefinedType;
+ };
+
+ // 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 IfcLightSourceAmbient
+ struct IfcLightSourceAmbient : IfcLightSource, ObjectHelper<IfcLightSourceAmbient,0> { IfcLightSourceAmbient() : Object("IfcLightSourceAmbient") {}
+
+ };
+
+ // C++ wrapper for IfcLightSourceDirectional
+ struct IfcLightSourceDirectional : IfcLightSource, ObjectHelper<IfcLightSourceDirectional,1> { IfcLightSourceDirectional() : Object("IfcLightSourceDirectional") {}
+ Lazy< IfcDirection > Orientation;
+ };
+
+ // 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 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 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 IfcLine
+ struct IfcLine : IfcCurve, ObjectHelper<IfcLine,2> { IfcLine() : Object("IfcLine") {}
+ Lazy< IfcCartesianPoint > Pnt;
+ Lazy< IfcVector > Dir;
+ };
+
+ // C++ wrapper for IfcLocalPlacement
+ struct IfcLocalPlacement : IfcObjectPlacement, ObjectHelper<IfcLocalPlacement,2> { IfcLocalPlacement() : Object("IfcLocalPlacement") {}
+ Maybe< Lazy< IfcObjectPlacement > > PlacementRelTo;
+ IfcAxis2Placement::Out RelativePlacement;
+ };
+
+ // C++ wrapper for IfcMappedItem
+ struct IfcMappedItem : IfcRepresentationItem, ObjectHelper<IfcMappedItem,2> { IfcMappedItem() : Object("IfcMappedItem") {}
+ Lazy< IfcRepresentationMap > MappingSource;
+ Lazy< IfcCartesianTransformationOperator > MappingTarget;
+ };
+
+ // 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 IfcMaterialDefinitionRepresentation
+ struct IfcMaterialDefinitionRepresentation : IfcProductRepresentation, ObjectHelper<IfcMaterialDefinitionRepresentation,1> { IfcMaterialDefinitionRepresentation() : Object("IfcMaterialDefinitionRepresentation") {}
+ Lazy< NotImplemented > RepresentedMaterial;
+ };
+
+ // C++ wrapper for IfcMeasureWithUnit
+ struct IfcMeasureWithUnit : ObjectHelper<IfcMeasureWithUnit,2> { IfcMeasureWithUnit() : Object("IfcMeasureWithUnit") {}
+ IfcValue::Out ValueComponent;
+ IfcUnit::Out UnitComponent;
+ };
+
+ // C++ wrapper for IfcMechanicalFastener
+ struct IfcMechanicalFastener : IfcElementComponent, ObjectHelper<IfcMechanicalFastener,3> { IfcMechanicalFastener() : Object("IfcMechanicalFastener") {}
+ Maybe< IfcPositiveLengthMeasure::Out > NominalDiameter;
+ Maybe< IfcPositiveLengthMeasure::Out > NominalLength;
+ Maybe< IfcMechanicalFastenerTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcMechanicalFastenerType
+ struct IfcMechanicalFastenerType : IfcElementComponentType, ObjectHelper<IfcMechanicalFastenerType,3> { IfcMechanicalFastenerType() : Object("IfcMechanicalFastenerType") {}
+ IfcMechanicalFastenerTypeEnum::Out PredefinedType;
+ Maybe< IfcPositiveLengthMeasure::Out > NominalDiameter;
+ Maybe< IfcPositiveLengthMeasure::Out > NominalLength;
+ };
+
+ // C++ wrapper for IfcMedicalDevice
+ struct IfcMedicalDevice : IfcFlowTerminal, ObjectHelper<IfcMedicalDevice,1> { IfcMedicalDevice() : Object("IfcMedicalDevice") {}
+ Maybe< IfcMedicalDeviceTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcMedicalDeviceType
+ struct IfcMedicalDeviceType : IfcFlowTerminalType, ObjectHelper<IfcMedicalDeviceType,1> { IfcMedicalDeviceType() : Object("IfcMedicalDeviceType") {}
+ IfcMedicalDeviceTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcMember
+ struct IfcMember : IfcBuildingElement, ObjectHelper<IfcMember,1> { IfcMember() : Object("IfcMember") {}
+ Maybe< IfcMemberTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcMemberStandardCase
+ struct IfcMemberStandardCase : IfcMember, ObjectHelper<IfcMemberStandardCase,0> { IfcMemberStandardCase() : Object("IfcMemberStandardCase") {}
+
+ };
+
+ // C++ wrapper for IfcMemberType
+ struct IfcMemberType : IfcBuildingElementType, ObjectHelper<IfcMemberType,1> { IfcMemberType() : Object("IfcMemberType") {}
+ IfcMemberTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcMirroredProfileDef
+ struct IfcMirroredProfileDef : IfcDerivedProfileDef, ObjectHelper<IfcMirroredProfileDef,0> { IfcMirroredProfileDef() : Object("IfcMirroredProfileDef") {}
+
+ };
+
+ // C++ wrapper for IfcMotorConnection
+ struct IfcMotorConnection : IfcEnergyConversionDevice, ObjectHelper<IfcMotorConnection,1> { IfcMotorConnection() : Object("IfcMotorConnection") {}
+ Maybe< IfcMotorConnectionTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcMotorConnectionType
+ struct IfcMotorConnectionType : IfcEnergyConversionDeviceType, ObjectHelper<IfcMotorConnectionType,1> { IfcMotorConnectionType() : Object("IfcMotorConnectionType") {}
+ IfcMotorConnectionTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcOccupant
+ struct IfcOccupant : IfcActor, ObjectHelper<IfcOccupant,1> { IfcOccupant() : Object("IfcOccupant") {}
+ Maybe< IfcOccupantTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcOffsetCurve2D
+ struct IfcOffsetCurve2D : IfcCurve, ObjectHelper<IfcOffsetCurve2D,3> { IfcOffsetCurve2D() : Object("IfcOffsetCurve2D") {}
+ Lazy< IfcCurve > BasisCurve;
+ IfcLengthMeasure::Out Distance;
+ IfcLogical::Out SelfIntersect;
+ };
+
+ // C++ wrapper for IfcOffsetCurve3D
+ struct IfcOffsetCurve3D : IfcCurve, ObjectHelper<IfcOffsetCurve3D,4> { IfcOffsetCurve3D() : Object("IfcOffsetCurve3D") {}
+ Lazy< IfcCurve > BasisCurve;
+ IfcLengthMeasure::Out Distance;
+ IfcLogical::Out SelfIntersect;
+ Lazy< IfcDirection > RefDirection;
+ };
+
+ // C++ wrapper for IfcOpenShell
+ struct IfcOpenShell : IfcConnectedFaceSet, ObjectHelper<IfcOpenShell,0> { IfcOpenShell() : Object("IfcOpenShell") {}
+
+ };
+
+ // C++ wrapper for IfcOpeningElement
+ struct IfcOpeningElement : IfcFeatureElementSubtraction, ObjectHelper<IfcOpeningElement,1> { IfcOpeningElement() : Object("IfcOpeningElement") {}
+ Maybe< IfcOpeningElementTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcOpeningStandardCase
+ struct IfcOpeningStandardCase : IfcOpeningElement, ObjectHelper<IfcOpeningStandardCase,0> { IfcOpeningStandardCase() : Object("IfcOpeningStandardCase") {}
+
+ };
+
+ // C++ wrapper for IfcOrientedEdge
+ struct IfcOrientedEdge : IfcEdge, ObjectHelper<IfcOrientedEdge,2> { IfcOrientedEdge() : Object("IfcOrientedEdge") {}
+ Lazy< IfcEdge > EdgeElement;
+ IfcBoolean::Out Orientation;
+ };
+
+ // C++ wrapper for IfcOuterBoundaryCurve
+ struct IfcOuterBoundaryCurve : IfcBoundaryCurve, ObjectHelper<IfcOuterBoundaryCurve,0> { IfcOuterBoundaryCurve() : Object("IfcOuterBoundaryCurve") {}
+
+ };
+
+ // C++ wrapper for IfcOutlet
+ struct IfcOutlet : IfcFlowTerminal, ObjectHelper<IfcOutlet,1> { IfcOutlet() : Object("IfcOutlet") {}
+ Maybe< IfcOutletTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcOutletType
+ struct IfcOutletType : IfcFlowTerminalType, ObjectHelper<IfcOutletType,1> { IfcOutletType() : Object("IfcOutletType") {}
+ IfcOutletTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcPath
+ struct IfcPath : IfcTopologicalRepresentationItem, ObjectHelper<IfcPath,1> { IfcPath() : Object("IfcPath") {}
+ ListOf< Lazy< IfcOrientedEdge >, 1, 0 > EdgeList;
+ };
+
+ // C++ wrapper for IfcPcurve
+ struct IfcPcurve : IfcCurve, ObjectHelper<IfcPcurve,2> { IfcPcurve() : Object("IfcPcurve") {}
+ Lazy< IfcSurface > BasisSurface;
+ Lazy< IfcCurve > ReferenceCurve;
+ };
+
+ // C++ wrapper for IfcPerformanceHistory
+ struct IfcPerformanceHistory : IfcControl, ObjectHelper<IfcPerformanceHistory,2> { IfcPerformanceHistory() : Object("IfcPerformanceHistory") {}
+ IfcLabel::Out LifeCyclePhase;
+ Maybe< IfcPerformanceHistoryTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcPermit
+ struct IfcPermit : IfcControl, ObjectHelper<IfcPermit,3> { IfcPermit() : Object("IfcPermit") {}
+ Maybe< IfcPermitTypeEnum::Out > PredefinedType;
+ Maybe< IfcLabel::Out > Status;
+ Maybe< IfcText::Out > LongDescription;
+ };
+
+ // C++ wrapper for IfcPile
+ struct IfcPile : IfcBuildingElement, ObjectHelper<IfcPile,2> { IfcPile() : Object("IfcPile") {}
+ Maybe< IfcPileTypeEnum::Out > PredefinedType;
+ Maybe< IfcPileConstructionEnum::Out > ConstructionType;
+ };
+
+ // C++ wrapper for IfcPileType
+ struct IfcPileType : IfcBuildingElementType, ObjectHelper<IfcPileType,1> { IfcPileType() : Object("IfcPileType") {}
+ IfcPileTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcPipeFitting
+ struct IfcPipeFitting : IfcFlowFitting, ObjectHelper<IfcPipeFitting,1> { IfcPipeFitting() : Object("IfcPipeFitting") {}
+ Maybe< IfcPipeFittingTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcPipeFittingType
+ struct IfcPipeFittingType : IfcFlowFittingType, ObjectHelper<IfcPipeFittingType,1> { IfcPipeFittingType() : Object("IfcPipeFittingType") {}
+ IfcPipeFittingTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcPipeSegment
+ struct IfcPipeSegment : IfcFlowSegment, ObjectHelper<IfcPipeSegment,1> { IfcPipeSegment() : Object("IfcPipeSegment") {}
+ Maybe< IfcPipeSegmentTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcPipeSegmentType
+ struct IfcPipeSegmentType : IfcFlowSegmentType, ObjectHelper<IfcPipeSegmentType,1> { IfcPipeSegmentType() : Object("IfcPipeSegmentType") {}
+ IfcPipeSegmentTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcPlanarExtent
+ struct IfcPlanarExtent : IfcGeometricRepresentationItem, ObjectHelper<IfcPlanarExtent,2> { IfcPlanarExtent() : Object("IfcPlanarExtent") {}
+ IfcLengthMeasure::Out SizeInX;
+ IfcLengthMeasure::Out SizeInY;
+ };
+
+ // C++ wrapper for IfcPlanarBox
+ struct IfcPlanarBox : IfcPlanarExtent, ObjectHelper<IfcPlanarBox,1> { IfcPlanarBox() : Object("IfcPlanarBox") {}
+ IfcAxis2Placement::Out Placement;
+ };
+
+ // C++ wrapper for IfcPlane
+ struct IfcPlane : IfcElementarySurface, ObjectHelper<IfcPlane,0> { IfcPlane() : Object("IfcPlane") {}
+
+ };
+
+ // C++ wrapper for IfcPlate
+ struct IfcPlate : IfcBuildingElement, ObjectHelper<IfcPlate,1> { IfcPlate() : Object("IfcPlate") {}
+ Maybe< IfcPlateTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcPlateStandardCase
+ struct IfcPlateStandardCase : IfcPlate, ObjectHelper<IfcPlateStandardCase,0> { IfcPlateStandardCase() : Object("IfcPlateStandardCase") {}
+
+ };
+
+ // C++ wrapper for IfcPlateType
+ struct IfcPlateType : IfcBuildingElementType, ObjectHelper<IfcPlateType,1> { IfcPlateType() : Object("IfcPlateType") {}
+ IfcPlateTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcPointOnCurve
+ struct IfcPointOnCurve : IfcPoint, ObjectHelper<IfcPointOnCurve,2> { IfcPointOnCurve() : Object("IfcPointOnCurve") {}
+ Lazy< IfcCurve > BasisCurve;
+ IfcParameterValue::Out PointParameter;
+ };
+
+ // 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 IfcPolyLoop
+ struct IfcPolyLoop : IfcLoop, ObjectHelper<IfcPolyLoop,1> { IfcPolyLoop() : Object("IfcPolyLoop") {}
+ ListOf< Lazy< IfcCartesianPoint >, 3, 0 > Polygon;
+ };
+
+ // C++ wrapper for IfcPolygonalBoundedHalfSpace
+ struct IfcPolygonalBoundedHalfSpace : IfcHalfSpaceSolid, ObjectHelper<IfcPolygonalBoundedHalfSpace,2> { IfcPolygonalBoundedHalfSpace() : Object("IfcPolygonalBoundedHalfSpace") {}
+ Lazy< IfcAxis2Placement3D > Position;
+ Lazy< IfcBoundedCurve > PolygonalBoundary;
+ };
+
+ // C++ wrapper for IfcTessellatedFaceSet
+ struct IfcTessellatedFaceSet : IfcTessellatedItem, ObjectHelper<IfcTessellatedFaceSet,1> { IfcTessellatedFaceSet() : Object("IfcTessellatedFaceSet") {}
+ Lazy< IfcCartesianPointList3D > Coordinates;
+ };
+
+ // C++ wrapper for IfcPolygonalFaceSet
+ struct IfcPolygonalFaceSet : IfcTessellatedFaceSet, ObjectHelper<IfcPolygonalFaceSet,3> { IfcPolygonalFaceSet() : Object("IfcPolygonalFaceSet") {}
+ Maybe< IfcBoolean::Out > Closed;
+ ListOf< Lazy< IfcIndexedPolygonalFace >, 1, 0 > Faces;
+ Maybe< ListOf< IfcPositiveInteger, 1, 0 >::Out > PnIndex;
+ };
+
+ // C++ wrapper for IfcPolyline
+ struct IfcPolyline : IfcBoundedCurve, ObjectHelper<IfcPolyline,1> { IfcPolyline() : Object("IfcPolyline") {}
+ ListOf< Lazy< IfcCartesianPoint >, 2, 0 > Points;
+ };
+
+ // C++ wrapper for IfcPresentationStyleAssignment
+ struct IfcPresentationStyleAssignment : ObjectHelper<IfcPresentationStyleAssignment,1> { IfcPresentationStyleAssignment() : Object("IfcPresentationStyleAssignment") {}
+ ListOf< IfcPresentationStyleSelect, 1, 0 >::Out Styles;
+ };
+
+ // C++ wrapper for IfcProcedure
+ struct IfcProcedure : IfcProcess, ObjectHelper<IfcProcedure,1> { IfcProcedure() : Object("IfcProcedure") {}
+ Maybe< IfcProcedureTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcProcedureType
+ struct IfcProcedureType : IfcTypeProcess, ObjectHelper<IfcProcedureType,1> { IfcProcedureType() : Object("IfcProcedureType") {}
+ IfcProcedureTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcProductDefinitionShape
+ struct IfcProductDefinitionShape : IfcProductRepresentation, ObjectHelper<IfcProductDefinitionShape,0> { IfcProductDefinitionShape() : Object("IfcProductDefinitionShape") {}
+
+ };
+
+ // C++ wrapper for IfcProject
+ struct IfcProject : IfcContext, ObjectHelper<IfcProject,0> { IfcProject() : Object("IfcProject") {}
+
+ };
+
+ // C++ wrapper for IfcProjectLibrary
+ struct IfcProjectLibrary : IfcContext, ObjectHelper<IfcProjectLibrary,0> { IfcProjectLibrary() : Object("IfcProjectLibrary") {}
+
+ };
+
+ // C++ wrapper for IfcProjectOrder
+ struct IfcProjectOrder : IfcControl, ObjectHelper<IfcProjectOrder,3> { IfcProjectOrder() : Object("IfcProjectOrder") {}
+ Maybe< IfcProjectOrderTypeEnum::Out > PredefinedType;
+ Maybe< IfcLabel::Out > Status;
+ Maybe< IfcText::Out > LongDescription;
+ };
+
+ // C++ wrapper for IfcProjectionElement
+ struct IfcProjectionElement : IfcFeatureElementAddition, ObjectHelper<IfcProjectionElement,1> { IfcProjectionElement() : Object("IfcProjectionElement") {}
+ Maybe< IfcProjectionElementTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcSimpleProperty
+ struct IfcSimpleProperty : IfcProperty, ObjectHelper<IfcSimpleProperty,0> { IfcSimpleProperty() : Object("IfcSimpleProperty") {}
+
+ };
+
+ // C++ wrapper for IfcPropertyBoundedValue
+ struct IfcPropertyBoundedValue : IfcSimpleProperty, ObjectHelper<IfcPropertyBoundedValue,4> { IfcPropertyBoundedValue() : Object("IfcPropertyBoundedValue") {}
+ Maybe< IfcValue::Out > UpperBoundValue;
+ Maybe< IfcValue::Out > LowerBoundValue;
+ Maybe< IfcUnit::Out > Unit;
+ Maybe< IfcValue::Out > SetPointValue;
+ };
+
+ // C++ wrapper for IfcPropertyEnumeratedValue
+ struct IfcPropertyEnumeratedValue : IfcSimpleProperty, ObjectHelper<IfcPropertyEnumeratedValue,2> { IfcPropertyEnumeratedValue() : Object("IfcPropertyEnumeratedValue") {}
+ Maybe< ListOf< IfcValue, 1, 0 >::Out > EnumerationValues;
+ Maybe< Lazy< NotImplemented > > EnumerationReference;
+ };
+
+ // C++ wrapper for IfcPropertyListValue
+ struct IfcPropertyListValue : IfcSimpleProperty, ObjectHelper<IfcPropertyListValue,2> { IfcPropertyListValue() : Object("IfcPropertyListValue") {}
+ Maybe< ListOf< IfcValue, 1, 0 >::Out > ListValues;
+ Maybe< IfcUnit::Out > Unit;
+ };
+
+ // C++ wrapper for IfcPropertyReferenceValue
+ struct IfcPropertyReferenceValue : IfcSimpleProperty, ObjectHelper<IfcPropertyReferenceValue,2> { IfcPropertyReferenceValue() : Object("IfcPropertyReferenceValue") {}
+ Maybe< IfcText::Out > UsageName;
+ Maybe< IfcObjectReferenceSelect::Out > PropertyReference;
+ };
+
+ // C++ wrapper for IfcPropertySet
+ struct IfcPropertySet : IfcPropertySetDefinition, ObjectHelper<IfcPropertySet,1> { IfcPropertySet() : Object("IfcPropertySet") {}
+ ListOf< Lazy< IfcProperty >, 1, 0 > HasProperties;
+ };
+
+ // C++ wrapper for IfcPropertySingleValue
+ struct IfcPropertySingleValue : IfcSimpleProperty, ObjectHelper<IfcPropertySingleValue,2> { IfcPropertySingleValue() : Object("IfcPropertySingleValue") {}
+ Maybe< IfcValue::Out > NominalValue;
+ Maybe< IfcUnit::Out > Unit;
+ };
+
+ // C++ wrapper for IfcPropertyTableValue
+ struct IfcPropertyTableValue : IfcSimpleProperty, ObjectHelper<IfcPropertyTableValue,6> { IfcPropertyTableValue() : Object("IfcPropertyTableValue") {}
+ Maybe< ListOf< IfcValue, 1, 0 >::Out > DefiningValues;
+ Maybe< ListOf< IfcValue, 1, 0 >::Out > DefinedValues;
+ Maybe< IfcText::Out > Expression;
+ Maybe< IfcUnit::Out > DefiningUnit;
+ Maybe< IfcUnit::Out > DefinedUnit;
+ Maybe< IfcCurveInterpolationEnum::Out > CurveInterpolation;
+ };
+
+ // C++ wrapper for IfcProtectiveDevice
+ struct IfcProtectiveDevice : IfcFlowController, ObjectHelper<IfcProtectiveDevice,1> { IfcProtectiveDevice() : Object("IfcProtectiveDevice") {}
+ Maybe< IfcProtectiveDeviceTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcProtectiveDeviceTrippingUnit
+ struct IfcProtectiveDeviceTrippingUnit : IfcDistributionControlElement, ObjectHelper<IfcProtectiveDeviceTrippingUnit,1> { IfcProtectiveDeviceTrippingUnit() : Object("IfcProtectiveDeviceTrippingUnit") {}
+ Maybe< IfcProtectiveDeviceTrippingUnitTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcProtectiveDeviceTrippingUnitType
+ struct IfcProtectiveDeviceTrippingUnitType : IfcDistributionControlElementType, ObjectHelper<IfcProtectiveDeviceTrippingUnitType,1> { IfcProtectiveDeviceTrippingUnitType() : Object("IfcProtectiveDeviceTrippingUnitType") {}
+ IfcProtectiveDeviceTrippingUnitTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcProtectiveDeviceType
+ struct IfcProtectiveDeviceType : IfcFlowControllerType, ObjectHelper<IfcProtectiveDeviceType,1> { IfcProtectiveDeviceType() : Object("IfcProtectiveDeviceType") {}
+ IfcProtectiveDeviceTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcProxy
+ struct IfcProxy : IfcProduct, ObjectHelper<IfcProxy,2> { IfcProxy() : Object("IfcProxy") {}
+ IfcObjectTypeEnum::Out ProxyType;
+ Maybe< IfcLabel::Out > Tag;
+ };
+
+ // C++ wrapper for IfcPump
+ struct IfcPump : IfcFlowMovingDevice, ObjectHelper<IfcPump,1> { IfcPump() : Object("IfcPump") {}
+ Maybe< IfcPumpTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcPumpType
+ struct IfcPumpType : IfcFlowMovingDeviceType, ObjectHelper<IfcPumpType,1> { IfcPumpType() : Object("IfcPumpType") {}
+ IfcPumpTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcRailing
+ struct IfcRailing : IfcBuildingElement, ObjectHelper<IfcRailing,1> { IfcRailing() : Object("IfcRailing") {}
+ Maybe< IfcRailingTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcRailingType
+ struct IfcRailingType : IfcBuildingElementType, ObjectHelper<IfcRailingType,1> { IfcRailingType() : Object("IfcRailingType") {}
+ IfcRailingTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcRamp
+ struct IfcRamp : IfcBuildingElement, ObjectHelper<IfcRamp,1> { IfcRamp() : Object("IfcRamp") {}
+ Maybe< IfcRampTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcRampFlight
+ struct IfcRampFlight : IfcBuildingElement, ObjectHelper<IfcRampFlight,1> { IfcRampFlight() : Object("IfcRampFlight") {}
+ Maybe< IfcRampFlightTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcRampFlightType
+ struct IfcRampFlightType : IfcBuildingElementType, ObjectHelper<IfcRampFlightType,1> { IfcRampFlightType() : Object("IfcRampFlightType") {}
+ IfcRampFlightTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcRampType
+ struct IfcRampType : IfcBuildingElementType, ObjectHelper<IfcRampType,1> { IfcRampType() : Object("IfcRampType") {}
+ IfcRampTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcRationalBSplineCurveWithKnots
+ struct IfcRationalBSplineCurveWithKnots : IfcBSplineCurveWithKnots, ObjectHelper<IfcRationalBSplineCurveWithKnots,1> { IfcRationalBSplineCurveWithKnots() : Object("IfcRationalBSplineCurveWithKnots") {}
+ ListOf< IfcReal, 2, 0 >::Out WeightsData;
+ };
+
+ // C++ wrapper for IfcRationalBSplineSurfaceWithKnots
+ struct IfcRationalBSplineSurfaceWithKnots : IfcBSplineSurfaceWithKnots, ObjectHelper<IfcRationalBSplineSurfaceWithKnots,0> { IfcRationalBSplineSurfaceWithKnots() : Object("IfcRationalBSplineSurfaceWithKnots") {}
+
+ };
+
+ // 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< IfcNonNegativeLengthMeasure::Out > InnerFilletRadius;
+ Maybe< IfcNonNegativeLengthMeasure::Out > OuterFilletRadius;
+ };
+
+ // 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 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;
+ IfcBoolean::Out Usense;
+ IfcBoolean::Out Vsense;
+ };
+
+ // C++ wrapper for IfcReinforcingElement
+ struct IfcReinforcingElement : IfcElementComponent, ObjectHelper<IfcReinforcingElement,1> { IfcReinforcingElement() : Object("IfcReinforcingElement") {}
+ Maybe< IfcLabel::Out > SteelGrade;
+ };
+
+ // C++ wrapper for IfcReinforcingBar
+ struct IfcReinforcingBar : IfcReinforcingElement, ObjectHelper<IfcReinforcingBar,5> { IfcReinforcingBar() : Object("IfcReinforcingBar") {}
+ Maybe< IfcPositiveLengthMeasure::Out > NominalDiameter;
+ Maybe< IfcAreaMeasure::Out > CrossSectionArea;
+ Maybe< IfcPositiveLengthMeasure::Out > BarLength;
+ Maybe< IfcReinforcingBarTypeEnum::Out > PredefinedType;
+ Maybe< IfcReinforcingBarSurfaceEnum::Out > BarSurface;
+ };
+
+ // C++ wrapper for IfcReinforcingElementType
+ struct IfcReinforcingElementType : IfcElementComponentType, ObjectHelper<IfcReinforcingElementType,0> { IfcReinforcingElementType() : Object("IfcReinforcingElementType") {}
+
+ };
+
+ // C++ wrapper for IfcReinforcingBarType
+ struct IfcReinforcingBarType : IfcReinforcingElementType, ObjectHelper<IfcReinforcingBarType,7> { IfcReinforcingBarType() : Object("IfcReinforcingBarType") {}
+ IfcReinforcingBarTypeEnum::Out PredefinedType;
+ Maybe< IfcPositiveLengthMeasure::Out > NominalDiameter;
+ Maybe< IfcAreaMeasure::Out > CrossSectionArea;
+ Maybe< IfcPositiveLengthMeasure::Out > BarLength;
+ Maybe< IfcReinforcingBarSurfaceEnum::Out > BarSurface;
+ Maybe< IfcLabel::Out > BendingShapeCode;
+ Maybe< ListOf< IfcBendingParameterSelect, 1, 0 >::Out > BendingParameters;
+ };
+
+ // C++ wrapper for IfcReinforcingMesh
+ struct IfcReinforcingMesh : IfcReinforcingElement, ObjectHelper<IfcReinforcingMesh,9> { IfcReinforcingMesh() : Object("IfcReinforcingMesh") {}
+ Maybe< IfcPositiveLengthMeasure::Out > MeshLength;
+ Maybe< IfcPositiveLengthMeasure::Out > MeshWidth;
+ Maybe< IfcPositiveLengthMeasure::Out > LongitudinalBarNominalDiameter;
+ Maybe< IfcPositiveLengthMeasure::Out > TransverseBarNominalDiameter;
+ Maybe< IfcAreaMeasure::Out > LongitudinalBarCrossSectionArea;
+ Maybe< IfcAreaMeasure::Out > TransverseBarCrossSectionArea;
+ Maybe< IfcPositiveLengthMeasure::Out > LongitudinalBarSpacing;
+ Maybe< IfcPositiveLengthMeasure::Out > TransverseBarSpacing;
+ Maybe< IfcReinforcingMeshTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcReinforcingMeshType
+ struct IfcReinforcingMeshType : IfcReinforcingElementType, ObjectHelper<IfcReinforcingMeshType,11> { IfcReinforcingMeshType() : Object("IfcReinforcingMeshType") {}
+ IfcReinforcingMeshTypeEnum::Out PredefinedType;
+ Maybe< IfcPositiveLengthMeasure::Out > MeshLength;
+ Maybe< IfcPositiveLengthMeasure::Out > MeshWidth;
+ Maybe< IfcPositiveLengthMeasure::Out > LongitudinalBarNominalDiameter;
+ Maybe< IfcPositiveLengthMeasure::Out > TransverseBarNominalDiameter;
+ Maybe< IfcAreaMeasure::Out > LongitudinalBarCrossSectionArea;
+ Maybe< IfcAreaMeasure::Out > TransverseBarCrossSectionArea;
+ Maybe< IfcPositiveLengthMeasure::Out > LongitudinalBarSpacing;
+ Maybe< IfcPositiveLengthMeasure::Out > TransverseBarSpacing;
+ Maybe< IfcLabel::Out > BendingShapeCode;
+ Maybe< ListOf< IfcBendingParameterSelect, 1, 0 >::Out > BendingParameters;
+ };
+
+ // C++ wrapper for IfcRelationship
+ struct IfcRelationship : IfcRoot, ObjectHelper<IfcRelationship,0> { IfcRelationship() : Object("IfcRelationship") {}
+
+ };
+
+ // C++ wrapper for IfcRelDecomposes
+ struct IfcRelDecomposes : IfcRelationship, ObjectHelper<IfcRelDecomposes,0> { IfcRelDecomposes() : Object("IfcRelDecomposes") {}
+
+ };
+
+ // C++ wrapper for IfcRelAggregates
+ struct IfcRelAggregates : IfcRelDecomposes, ObjectHelper<IfcRelAggregates,2> { IfcRelAggregates() : Object("IfcRelAggregates") {}
+ Lazy< IfcObjectDefinition > RelatingObject;
+ ListOf< Lazy< IfcObjectDefinition >, 1, 0 > RelatedObjects;
+ };
+
+ // C++ wrapper for IfcRelConnects
+ struct IfcRelConnects : IfcRelationship, ObjectHelper<IfcRelConnects,0> { IfcRelConnects() : Object("IfcRelConnects") {}
+
+ };
+
+ // C++ wrapper for IfcRelContainedInSpatialStructure
+ struct IfcRelContainedInSpatialStructure : IfcRelConnects, ObjectHelper<IfcRelContainedInSpatialStructure,2> { IfcRelContainedInSpatialStructure() : Object("IfcRelContainedInSpatialStructure") {}
+ ListOf< Lazy< IfcProduct >, 1, 0 > RelatedElements;
+ Lazy< IfcSpatialElement > RelatingStructure;
+ };
+
+ // C++ wrapper for IfcRelDefines
+ struct IfcRelDefines : IfcRelationship, ObjectHelper<IfcRelDefines,0> { IfcRelDefines() : Object("IfcRelDefines") {}
+
+ };
+
+ // C++ wrapper for IfcRelDefinesByProperties
+ struct IfcRelDefinesByProperties : IfcRelDefines, ObjectHelper<IfcRelDefinesByProperties,2> { IfcRelDefinesByProperties() : Object("IfcRelDefinesByProperties") {}
+ ListOf< Lazy< IfcObjectDefinition >, 1, 0 > RelatedObjects;
+ IfcPropertySetDefinitionSelect::Out RelatingPropertyDefinition;
+ };
+
+ // C++ wrapper for IfcRelFillsElement
+ struct IfcRelFillsElement : IfcRelConnects, ObjectHelper<IfcRelFillsElement,2> { IfcRelFillsElement() : Object("IfcRelFillsElement") {}
+ Lazy< IfcOpeningElement > RelatingOpeningElement;
+ Lazy< IfcElement > RelatedBuildingElement;
+ };
+
+ // C++ wrapper for IfcRelVoidsElement
+ struct IfcRelVoidsElement : IfcRelDecomposes, ObjectHelper<IfcRelVoidsElement,2> { IfcRelVoidsElement() : Object("IfcRelVoidsElement") {}
+ Lazy< IfcElement > RelatingBuildingElement;
+ Lazy< IfcFeatureElementSubtraction > RelatedOpeningElement;
+ };
+
+ // C++ wrapper for IfcReparametrisedCompositeCurveSegment
+ struct IfcReparametrisedCompositeCurveSegment : IfcCompositeCurveSegment, ObjectHelper<IfcReparametrisedCompositeCurveSegment,1> { IfcReparametrisedCompositeCurveSegment() : Object("IfcReparametrisedCompositeCurveSegment") {}
+ IfcParameterValue::Out ParamLength;
+ };
+
+ // 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 IfcRepresentationMap
+ struct IfcRepresentationMap : ObjectHelper<IfcRepresentationMap,2> { IfcRepresentationMap() : Object("IfcRepresentationMap") {}
+ IfcAxis2Placement::Out MappingOrigin;
+ Lazy< IfcRepresentation > MappedRepresentation;
+ };
+
+ // C++ wrapper for IfcRevolvedAreaSolid
+ struct IfcRevolvedAreaSolid : IfcSweptAreaSolid, ObjectHelper<IfcRevolvedAreaSolid,2> { IfcRevolvedAreaSolid() : Object("IfcRevolvedAreaSolid") {}
+ Lazy< IfcAxis1Placement > Axis;
+ IfcPlaneAngleMeasure::Out Angle;
+ };
+
+ // C++ wrapper for IfcRevolvedAreaSolidTapered
+ struct IfcRevolvedAreaSolidTapered : IfcRevolvedAreaSolid, ObjectHelper<IfcRevolvedAreaSolidTapered,1> { IfcRevolvedAreaSolidTapered() : Object("IfcRevolvedAreaSolidTapered") {}
+ Lazy< IfcProfileDef > EndSweptArea;
+ };
+
+ // C++ wrapper for IfcRightCircularCone
+ struct IfcRightCircularCone : IfcCsgPrimitive3D, ObjectHelper<IfcRightCircularCone,2> { IfcRightCircularCone() : Object("IfcRightCircularCone") {}
+ IfcPositiveLengthMeasure::Out Height;
+ IfcPositiveLengthMeasure::Out BottomRadius;
+ };
+
+ // C++ wrapper for IfcRightCircularCylinder
+ struct IfcRightCircularCylinder : IfcCsgPrimitive3D, ObjectHelper<IfcRightCircularCylinder,2> { IfcRightCircularCylinder() : Object("IfcRightCircularCylinder") {}
+ IfcPositiveLengthMeasure::Out Height;
+ IfcPositiveLengthMeasure::Out Radius;
+ };
+
+ // C++ wrapper for IfcRoof
+ struct IfcRoof : IfcBuildingElement, ObjectHelper<IfcRoof,1> { IfcRoof() : Object("IfcRoof") {}
+ Maybe< IfcRoofTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcRoofType
+ struct IfcRoofType : IfcBuildingElementType, ObjectHelper<IfcRoofType,1> { IfcRoofType() : Object("IfcRoofType") {}
+ IfcRoofTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcRoundedRectangleProfileDef
+ struct IfcRoundedRectangleProfileDef : IfcRectangleProfileDef, ObjectHelper<IfcRoundedRectangleProfileDef,1> { IfcRoundedRectangleProfileDef() : Object("IfcRoundedRectangleProfileDef") {}
+ IfcPositiveLengthMeasure::Out RoundingRadius;
+ };
+
+ // C++ wrapper for IfcSIUnit
+ struct IfcSIUnit : IfcNamedUnit, ObjectHelper<IfcSIUnit,2> { IfcSIUnit() : Object("IfcSIUnit") {}
+ Maybe< IfcSIPrefix::Out > Prefix;
+ IfcSIUnitName::Out Name;
+ };
+
+ // C++ wrapper for IfcSanitaryTerminal
+ struct IfcSanitaryTerminal : IfcFlowTerminal, ObjectHelper<IfcSanitaryTerminal,1> { IfcSanitaryTerminal() : Object("IfcSanitaryTerminal") {}
+ Maybe< IfcSanitaryTerminalTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcSanitaryTerminalType
+ struct IfcSanitaryTerminalType : IfcFlowTerminalType, ObjectHelper<IfcSanitaryTerminalType,1> { IfcSanitaryTerminalType() : Object("IfcSanitaryTerminalType") {}
+ IfcSanitaryTerminalTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcSeamCurve
+ struct IfcSeamCurve : IfcSurfaceCurve, ObjectHelper<IfcSeamCurve,0> { IfcSeamCurve() : Object("IfcSeamCurve") {}
+
+ };
+
+ // 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 IfcSensor
+ struct IfcSensor : IfcDistributionControlElement, ObjectHelper<IfcSensor,1> { IfcSensor() : Object("IfcSensor") {}
+ Maybe< IfcSensorTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcSensorType
+ struct IfcSensorType : IfcDistributionControlElementType, ObjectHelper<IfcSensorType,1> { IfcSensorType() : Object("IfcSensorType") {}
+ IfcSensorTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcShadingDevice
+ struct IfcShadingDevice : IfcBuildingElement, ObjectHelper<IfcShadingDevice,1> { IfcShadingDevice() : Object("IfcShadingDevice") {}
+ Maybe< IfcShadingDeviceTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcShadingDeviceType
+ struct IfcShadingDeviceType : IfcBuildingElementType, ObjectHelper<IfcShadingDeviceType,1> { IfcShadingDeviceType() : Object("IfcShadingDeviceType") {}
+ IfcShadingDeviceTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcShapeModel
+ struct IfcShapeModel : IfcRepresentation, ObjectHelper<IfcShapeModel,0> { IfcShapeModel() : Object("IfcShapeModel") {}
+
+ };
+
+ // C++ wrapper for IfcShapeRepresentation
+ struct IfcShapeRepresentation : IfcShapeModel, ObjectHelper<IfcShapeRepresentation,0> { IfcShapeRepresentation() : Object("IfcShapeRepresentation") {}
+
+ };
+
+ // C++ wrapper for IfcShellBasedSurfaceModel
+ struct IfcShellBasedSurfaceModel : IfcGeometricRepresentationItem, ObjectHelper<IfcShellBasedSurfaceModel,1> { IfcShellBasedSurfaceModel() : Object("IfcShellBasedSurfaceModel") {}
+ ListOf< IfcShell, 1, 0 >::Out SbsmBoundary;
+ };
+
+ // 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 IfcSlab
+ struct IfcSlab : IfcBuildingElement, ObjectHelper<IfcSlab,1> { IfcSlab() : Object("IfcSlab") {}
+ Maybe< IfcSlabTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcSlabElementedCase
+ struct IfcSlabElementedCase : IfcSlab, ObjectHelper<IfcSlabElementedCase,0> { IfcSlabElementedCase() : Object("IfcSlabElementedCase") {}
+
+ };
+
+ // C++ wrapper for IfcSlabStandardCase
+ struct IfcSlabStandardCase : IfcSlab, ObjectHelper<IfcSlabStandardCase,0> { IfcSlabStandardCase() : Object("IfcSlabStandardCase") {}
+
+ };
+
+ // C++ wrapper for IfcSlabType
+ struct IfcSlabType : IfcBuildingElementType, ObjectHelper<IfcSlabType,1> { IfcSlabType() : Object("IfcSlabType") {}
+ IfcSlabTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcSolarDevice
+ struct IfcSolarDevice : IfcEnergyConversionDevice, ObjectHelper<IfcSolarDevice,1> { IfcSolarDevice() : Object("IfcSolarDevice") {}
+ Maybe< IfcSolarDeviceTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcSolarDeviceType
+ struct IfcSolarDeviceType : IfcEnergyConversionDeviceType, ObjectHelper<IfcSolarDeviceType,1> { IfcSolarDeviceType() : Object("IfcSolarDeviceType") {}
+ IfcSolarDeviceTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcSpace
+ struct IfcSpace : IfcSpatialStructureElement, ObjectHelper<IfcSpace,2> { IfcSpace() : Object("IfcSpace") {}
+ Maybe< IfcSpaceTypeEnum::Out > PredefinedType;
+ Maybe< IfcLengthMeasure::Out > ElevationWithFlooring;
+ };
+
+ // C++ wrapper for IfcSpaceHeater
+ struct IfcSpaceHeater : IfcFlowTerminal, ObjectHelper<IfcSpaceHeater,1> { IfcSpaceHeater() : Object("IfcSpaceHeater") {}
+ Maybe< IfcSpaceHeaterTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcSpaceHeaterType
+ struct IfcSpaceHeaterType : IfcFlowTerminalType, ObjectHelper<IfcSpaceHeaterType,1> { IfcSpaceHeaterType() : Object("IfcSpaceHeaterType") {}
+ IfcSpaceHeaterTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcSpatialElementType
+ struct IfcSpatialElementType : IfcTypeProduct, ObjectHelper<IfcSpatialElementType,1> { IfcSpatialElementType() : Object("IfcSpatialElementType") {}
+ Maybe< IfcLabel::Out > ElementType;
+ };
+
+ // C++ wrapper for IfcSpatialStructureElementType
+ struct IfcSpatialStructureElementType : IfcSpatialElementType, ObjectHelper<IfcSpatialStructureElementType,0> { IfcSpatialStructureElementType() : Object("IfcSpatialStructureElementType") {}
+
+ };
+
+ // C++ wrapper for IfcSpaceType
+ struct IfcSpaceType : IfcSpatialStructureElementType, ObjectHelper<IfcSpaceType,2> { IfcSpaceType() : Object("IfcSpaceType") {}
+ IfcSpaceTypeEnum::Out PredefinedType;
+ Maybe< IfcLabel::Out > LongName;
+ };
+
+ // C++ wrapper for IfcSpatialZone
+ struct IfcSpatialZone : IfcSpatialElement, ObjectHelper<IfcSpatialZone,1> { IfcSpatialZone() : Object("IfcSpatialZone") {}
+ Maybe< IfcSpatialZoneTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcSpatialZoneType
+ struct IfcSpatialZoneType : IfcSpatialElementType, ObjectHelper<IfcSpatialZoneType,2> { IfcSpatialZoneType() : Object("IfcSpatialZoneType") {}
+ IfcSpatialZoneTypeEnum::Out PredefinedType;
+ Maybe< IfcLabel::Out > LongName;
+ };
+
+ // C++ wrapper for IfcSphere
+ struct IfcSphere : IfcCsgPrimitive3D, ObjectHelper<IfcSphere,1> { IfcSphere() : Object("IfcSphere") {}
+ IfcPositiveLengthMeasure::Out Radius;
+ };
+
+ // C++ wrapper for IfcSphericalSurface
+ struct IfcSphericalSurface : IfcElementarySurface, ObjectHelper<IfcSphericalSurface,1> { IfcSphericalSurface() : Object("IfcSphericalSurface") {}
+ IfcPositiveLengthMeasure::Out Radius;
+ };
+
+ // C++ wrapper for IfcStackTerminal
+ struct IfcStackTerminal : IfcFlowTerminal, ObjectHelper<IfcStackTerminal,1> { IfcStackTerminal() : Object("IfcStackTerminal") {}
+ Maybe< IfcStackTerminalTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcStackTerminalType
+ struct IfcStackTerminalType : IfcFlowTerminalType, ObjectHelper<IfcStackTerminalType,1> { IfcStackTerminalType() : Object("IfcStackTerminalType") {}
+ IfcStackTerminalTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcStair
+ struct IfcStair : IfcBuildingElement, ObjectHelper<IfcStair,1> { IfcStair() : Object("IfcStair") {}
+ Maybe< IfcStairTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcStairFlight
+ struct IfcStairFlight : IfcBuildingElement, ObjectHelper<IfcStairFlight,5> { IfcStairFlight() : Object("IfcStairFlight") {}
+ Maybe< IfcInteger::Out > NumberOfRisers;
+ Maybe< IfcInteger::Out > NumberOfTreads;
+ Maybe< IfcPositiveLengthMeasure::Out > RiserHeight;
+ Maybe< IfcPositiveLengthMeasure::Out > TreadLength;
+ Maybe< IfcStairFlightTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcStairFlightType
+ struct IfcStairFlightType : IfcBuildingElementType, ObjectHelper<IfcStairFlightType,1> { IfcStairFlightType() : Object("IfcStairFlightType") {}
+ IfcStairFlightTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcStairType
+ struct IfcStairType : IfcBuildingElementType, ObjectHelper<IfcStairType,1> { IfcStairType() : Object("IfcStairType") {}
+ IfcStairTypeEnum::Out PredefinedType;
+ };
+
+ // 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,1> { IfcStructuralAction() : Object("IfcStructuralAction") {}
+ Maybe< IfcBoolean::Out > DestabilizingLoad;
+ };
+
+ // C++ wrapper for IfcStructuralAnalysisModel
+ struct IfcStructuralAnalysisModel : IfcSystem, ObjectHelper<IfcStructuralAnalysisModel,5> { IfcStructuralAnalysisModel() : Object("IfcStructuralAnalysisModel") {}
+ IfcAnalysisModelTypeEnum::Out PredefinedType;
+ Maybe< Lazy< IfcAxis2Placement3D > > OrientationOf2DPlane;
+ Maybe< ListOf< Lazy< IfcStructuralLoadGroup >, 1, 0 > > LoadedBy;
+ Maybe< ListOf< Lazy< IfcStructuralResultGroup >, 1, 0 > > HasResults;
+ Maybe< Lazy< IfcObjectPlacement > > SharedPlacement;
+ };
+
+ // C++ wrapper for IfcStructuralItem
+ struct IfcStructuralItem : IfcProduct, ObjectHelper<IfcStructuralItem,0> { IfcStructuralItem() : Object("IfcStructuralItem") {}
+
+ };
+
+ // C++ wrapper for IfcStructuralConnection
+ struct IfcStructuralConnection : IfcStructuralItem, ObjectHelper<IfcStructuralConnection,1> { IfcStructuralConnection() : Object("IfcStructuralConnection") {}
+ Maybe< Lazy< NotImplemented > > AppliedCondition;
+ };
+
+ // C++ wrapper for IfcStructuralCurveAction
+ struct IfcStructuralCurveAction : IfcStructuralAction, ObjectHelper<IfcStructuralCurveAction,2> { IfcStructuralCurveAction() : Object("IfcStructuralCurveAction") {}
+ Maybe< IfcProjectedOrTrueLengthEnum::Out > ProjectedOrTrue;
+ IfcStructuralCurveActivityTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcStructuralCurveConnection
+ struct IfcStructuralCurveConnection : IfcStructuralConnection, ObjectHelper<IfcStructuralCurveConnection,1> { IfcStructuralCurveConnection() : Object("IfcStructuralCurveConnection") {}
+ Lazy< IfcDirection > Axis;
+ };
+
+ // C++ wrapper for IfcStructuralMember
+ struct IfcStructuralMember : IfcStructuralItem, ObjectHelper<IfcStructuralMember,0> { IfcStructuralMember() : Object("IfcStructuralMember") {}
+
+ };
+
+ // C++ wrapper for IfcStructuralCurveMember
+ struct IfcStructuralCurveMember : IfcStructuralMember, ObjectHelper<IfcStructuralCurveMember,2> { IfcStructuralCurveMember() : Object("IfcStructuralCurveMember") {}
+ IfcStructuralCurveMemberTypeEnum::Out PredefinedType;
+ Lazy< IfcDirection > Axis;
+ };
+
+ // C++ wrapper for IfcStructuralCurveMemberVarying
+ struct IfcStructuralCurveMemberVarying : IfcStructuralCurveMember, ObjectHelper<IfcStructuralCurveMemberVarying,0> { IfcStructuralCurveMemberVarying() : Object("IfcStructuralCurveMemberVarying") {}
+
+ };
+
+ // C++ wrapper for IfcStructuralReaction
+ struct IfcStructuralReaction : IfcStructuralActivity, ObjectHelper<IfcStructuralReaction,0> { IfcStructuralReaction() : Object("IfcStructuralReaction") {}
+
+ };
+
+ // C++ wrapper for IfcStructuralCurveReaction
+ struct IfcStructuralCurveReaction : IfcStructuralReaction, ObjectHelper<IfcStructuralCurveReaction,1> { IfcStructuralCurveReaction() : Object("IfcStructuralCurveReaction") {}
+ IfcStructuralCurveActivityTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcStructuralLinearAction
+ struct IfcStructuralLinearAction : IfcStructuralCurveAction, ObjectHelper<IfcStructuralLinearAction,0> { IfcStructuralLinearAction() : Object("IfcStructuralLinearAction") {}
+
+ };
+
+ // C++ wrapper for IfcStructuralLoadGroup
+ struct IfcStructuralLoadGroup : IfcGroup, ObjectHelper<IfcStructuralLoadGroup,5> { IfcStructuralLoadGroup() : Object("IfcStructuralLoadGroup") {}
+ IfcLoadGroupTypeEnum::Out PredefinedType;
+ IfcActionTypeEnum::Out ActionType;
+ IfcActionSourceTypeEnum::Out ActionSource;
+ Maybe< IfcRatioMeasure::Out > Coefficient;
+ Maybe< IfcLabel::Out > Purpose;
+ };
+
+ // C++ wrapper for IfcStructuralLoadCase
+ struct IfcStructuralLoadCase : IfcStructuralLoadGroup, ObjectHelper<IfcStructuralLoadCase,1> { IfcStructuralLoadCase() : Object("IfcStructuralLoadCase") {}
+ Maybe< ListOf< IfcRatioMeasure, 3, 3 >::Out > SelfWeightCoefficients;
+ };
+
+ // C++ wrapper for IfcStructuralSurfaceAction
+ struct IfcStructuralSurfaceAction : IfcStructuralAction, ObjectHelper<IfcStructuralSurfaceAction,2> { IfcStructuralSurfaceAction() : Object("IfcStructuralSurfaceAction") {}
+ Maybe< IfcProjectedOrTrueLengthEnum::Out > ProjectedOrTrue;
+ IfcStructuralSurfaceActivityTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcStructuralPlanarAction
+ struct IfcStructuralPlanarAction : IfcStructuralSurfaceAction, ObjectHelper<IfcStructuralPlanarAction,0> { IfcStructuralPlanarAction() : Object("IfcStructuralPlanarAction") {}
+
+ };
+
+ // C++ wrapper for IfcStructuralPointAction
+ struct IfcStructuralPointAction : IfcStructuralAction, ObjectHelper<IfcStructuralPointAction,0> { IfcStructuralPointAction() : Object("IfcStructuralPointAction") {}
+
+ };
+
+ // C++ wrapper for IfcStructuralPointConnection
+ struct IfcStructuralPointConnection : IfcStructuralConnection, ObjectHelper<IfcStructuralPointConnection,1> { IfcStructuralPointConnection() : Object("IfcStructuralPointConnection") {}
+ Maybe< Lazy< IfcAxis2Placement3D > > ConditionCoordinateSystem;
+ };
+
+ // C++ wrapper for IfcStructuralPointReaction
+ struct IfcStructuralPointReaction : IfcStructuralReaction, ObjectHelper<IfcStructuralPointReaction,0> { IfcStructuralPointReaction() : Object("IfcStructuralPointReaction") {}
+
+ };
+
+ // C++ wrapper for IfcStructuralResultGroup
+ struct IfcStructuralResultGroup : IfcGroup, ObjectHelper<IfcStructuralResultGroup,3> { IfcStructuralResultGroup() : Object("IfcStructuralResultGroup") {}
+ IfcAnalysisTheoryTypeEnum::Out TheoryType;
+ Maybe< Lazy< IfcStructuralLoadGroup > > ResultForLoadGroup;
+ IfcBoolean::Out IsLinear;
+ };
+
+ // C++ wrapper for IfcStructuralSurfaceConnection
+ struct IfcStructuralSurfaceConnection : IfcStructuralConnection, ObjectHelper<IfcStructuralSurfaceConnection,0> { IfcStructuralSurfaceConnection() : Object("IfcStructuralSurfaceConnection") {}
+
+ };
+
+ // C++ wrapper for IfcStructuralSurfaceMember
+ struct IfcStructuralSurfaceMember : IfcStructuralMember, ObjectHelper<IfcStructuralSurfaceMember,2> { IfcStructuralSurfaceMember() : Object("IfcStructuralSurfaceMember") {}
+ IfcStructuralSurfaceMemberTypeEnum::Out PredefinedType;
+ Maybe< IfcPositiveLengthMeasure::Out > Thickness;
+ };
+
+ // C++ wrapper for IfcStructuralSurfaceMemberVarying
+ struct IfcStructuralSurfaceMemberVarying : IfcStructuralSurfaceMember, ObjectHelper<IfcStructuralSurfaceMemberVarying,0> { IfcStructuralSurfaceMemberVarying() : Object("IfcStructuralSurfaceMemberVarying") {}
+
+ };
+
+ // C++ wrapper for IfcStructuralSurfaceReaction
+ struct IfcStructuralSurfaceReaction : IfcStructuralReaction, ObjectHelper<IfcStructuralSurfaceReaction,1> { IfcStructuralSurfaceReaction() : Object("IfcStructuralSurfaceReaction") {}
+ IfcStructuralSurfaceActivityTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcStyleModel
+ struct IfcStyleModel : IfcRepresentation, ObjectHelper<IfcStyleModel,0> { IfcStyleModel() : Object("IfcStyleModel") {}
+
+ };
+
+ // C++ wrapper for IfcStyledItem
+ struct IfcStyledItem : IfcRepresentationItem, ObjectHelper<IfcStyledItem,3> { IfcStyledItem() : Object("IfcStyledItem") {}
+ Maybe< Lazy< IfcRepresentationItem > > Item;
+ ListOf< IfcStyleAssignmentSelect, 1, 0 >::Out Styles;
+ Maybe< IfcLabel::Out > Name;
+ };
+
+ // C++ wrapper for IfcStyledRepresentation
+ struct IfcStyledRepresentation : IfcStyleModel, ObjectHelper<IfcStyledRepresentation,0> { IfcStyledRepresentation() : Object("IfcStyledRepresentation") {}
+
+ };
+
+ // C++ wrapper for IfcSubContractResource
+ struct IfcSubContractResource : IfcConstructionResource, ObjectHelper<IfcSubContractResource,1> { IfcSubContractResource() : Object("IfcSubContractResource") {}
+ Maybe< IfcSubContractResourceTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcSubContractResourceType
+ struct IfcSubContractResourceType : IfcConstructionResourceType, ObjectHelper<IfcSubContractResourceType,1> { IfcSubContractResourceType() : Object("IfcSubContractResourceType") {}
+ IfcSubContractResourceTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcSubedge
+ struct IfcSubedge : IfcEdge, ObjectHelper<IfcSubedge,1> { IfcSubedge() : Object("IfcSubedge") {}
+ Lazy< IfcEdge > ParentEdge;
+ };
+
+ // C++ wrapper for IfcSurfaceCurveSweptAreaSolid
+ struct IfcSurfaceCurveSweptAreaSolid : IfcSweptAreaSolid, ObjectHelper<IfcSurfaceCurveSweptAreaSolid,4> { IfcSurfaceCurveSweptAreaSolid() : Object("IfcSurfaceCurveSweptAreaSolid") {}
+ Lazy< IfcCurve > Directrix;
+ Maybe< IfcParameterValue::Out > StartParam;
+ Maybe< IfcParameterValue::Out > EndParam;
+ Lazy< IfcSurface > ReferenceSurface;
+ };
+
+ // C++ wrapper for IfcSurfaceFeature
+ struct IfcSurfaceFeature : IfcFeatureElement, ObjectHelper<IfcSurfaceFeature,1> { IfcSurfaceFeature() : Object("IfcSurfaceFeature") {}
+ Maybe< IfcSurfaceFeatureTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcSweptSurface
+ struct IfcSweptSurface : IfcSurface, ObjectHelper<IfcSweptSurface,2> { IfcSweptSurface() : Object("IfcSweptSurface") {}
+ Lazy< IfcProfileDef > SweptCurve;
+ Maybe< 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 IfcSurfaceOfRevolution
+ struct IfcSurfaceOfRevolution : IfcSweptSurface, ObjectHelper<IfcSurfaceOfRevolution,1> { IfcSurfaceOfRevolution() : Object("IfcSurfaceOfRevolution") {}
+ Lazy< IfcAxis1Placement > AxisPosition;
+ };
+
+ // 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 IfcSurfaceStyleShading
+ struct IfcSurfaceStyleShading : IfcPresentationItem, ObjectHelper<IfcSurfaceStyleShading,2> { IfcSurfaceStyleShading() : Object("IfcSurfaceStyleShading") {}
+ Lazy< IfcColourRgb > SurfaceColour;
+ Maybe< IfcNormalisedRatioMeasure::Out > Transparency;
+ };
+
+ // C++ wrapper for IfcSurfaceStyleRendering
+ struct IfcSurfaceStyleRendering : IfcSurfaceStyleShading, ObjectHelper<IfcSurfaceStyleRendering,7> { IfcSurfaceStyleRendering() : Object("IfcSurfaceStyleRendering") {}
+ 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 IfcSurfaceStyleWithTextures
+ struct IfcSurfaceStyleWithTextures : IfcPresentationItem, ObjectHelper<IfcSurfaceStyleWithTextures,1> { IfcSurfaceStyleWithTextures() : Object("IfcSurfaceStyleWithTextures") {}
+ ListOf< Lazy< NotImplemented >, 1, 0 > Textures;
+ };
+
+ // C++ wrapper for IfcSweptDiskSolid
+ struct IfcSweptDiskSolid : IfcSolidModel, ObjectHelper<IfcSweptDiskSolid,5> { IfcSweptDiskSolid() : Object("IfcSweptDiskSolid") {}
+ Lazy< IfcCurve > Directrix;
+ IfcPositiveLengthMeasure::Out Radius;
+ Maybe< IfcPositiveLengthMeasure::Out > InnerRadius;
+ Maybe< IfcParameterValue::Out > StartParam;
+ Maybe< IfcParameterValue::Out > EndParam;
+ };
+
+ // C++ wrapper for IfcSweptDiskSolidPolygonal
+ struct IfcSweptDiskSolidPolygonal : IfcSweptDiskSolid, ObjectHelper<IfcSweptDiskSolidPolygonal,1> { IfcSweptDiskSolidPolygonal() : Object("IfcSweptDiskSolidPolygonal") {}
+ Maybe< IfcPositiveLengthMeasure::Out > FilletRadius;
+ };
+
+ // C++ wrapper for IfcSwitchingDevice
+ struct IfcSwitchingDevice : IfcFlowController, ObjectHelper<IfcSwitchingDevice,1> { IfcSwitchingDevice() : Object("IfcSwitchingDevice") {}
+ Maybe< IfcSwitchingDeviceTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcSwitchingDeviceType
+ struct IfcSwitchingDeviceType : IfcFlowControllerType, ObjectHelper<IfcSwitchingDeviceType,1> { IfcSwitchingDeviceType() : Object("IfcSwitchingDeviceType") {}
+ IfcSwitchingDeviceTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcSystemFurnitureElement
+ struct IfcSystemFurnitureElement : IfcFurnishingElement, ObjectHelper<IfcSystemFurnitureElement,1> { IfcSystemFurnitureElement() : Object("IfcSystemFurnitureElement") {}
+ Maybe< IfcSystemFurnitureElementTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcSystemFurnitureElementType
+ struct IfcSystemFurnitureElementType : IfcFurnishingElementType, ObjectHelper<IfcSystemFurnitureElementType,1> { IfcSystemFurnitureElementType() : Object("IfcSystemFurnitureElementType") {}
+ Maybe< IfcSystemFurnitureElementTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcTShapeProfileDef
+ struct IfcTShapeProfileDef : IfcParameterizedProfileDef, ObjectHelper<IfcTShapeProfileDef,9> { IfcTShapeProfileDef() : Object("IfcTShapeProfileDef") {}
+ IfcPositiveLengthMeasure::Out Depth;
+ IfcPositiveLengthMeasure::Out FlangeWidth;
+ IfcPositiveLengthMeasure::Out WebThickness;
+ IfcPositiveLengthMeasure::Out FlangeThickness;
+ Maybe< IfcNonNegativeLengthMeasure::Out > FilletRadius;
+ Maybe< IfcNonNegativeLengthMeasure::Out > FlangeEdgeRadius;
+ Maybe< IfcNonNegativeLengthMeasure::Out > WebEdgeRadius;
+ Maybe< IfcPlaneAngleMeasure::Out > WebSlope;
+ Maybe< IfcPlaneAngleMeasure::Out > FlangeSlope;
+ };
+
+ // C++ wrapper for IfcTank
+ struct IfcTank : IfcFlowStorageDevice, ObjectHelper<IfcTank,1> { IfcTank() : Object("IfcTank") {}
+ Maybe< IfcTankTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcTankType
+ struct IfcTankType : IfcFlowStorageDeviceType, ObjectHelper<IfcTankType,1> { IfcTankType() : Object("IfcTankType") {}
+ IfcTankTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcTask
+ struct IfcTask : IfcProcess, ObjectHelper<IfcTask,6> { IfcTask() : Object("IfcTask") {}
+ Maybe< IfcLabel::Out > Status;
+ Maybe< IfcLabel::Out > WorkMethod;
+ IfcBoolean::Out IsMilestone;
+ Maybe< IfcInteger::Out > Priority;
+ Maybe< Lazy< NotImplemented > > TaskTime;
+ Maybe< IfcTaskTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcTaskType
+ struct IfcTaskType : IfcTypeProcess, ObjectHelper<IfcTaskType,2> { IfcTaskType() : Object("IfcTaskType") {}
+ IfcTaskTypeEnum::Out PredefinedType;
+ Maybe< IfcLabel::Out > WorkMethod;
+ };
+
+ // C++ wrapper for IfcTendon
+ struct IfcTendon : IfcReinforcingElement, ObjectHelper<IfcTendon,8> { IfcTendon() : Object("IfcTendon") {}
+ Maybe< IfcTendonTypeEnum::Out > PredefinedType;
+ Maybe< IfcPositiveLengthMeasure::Out > NominalDiameter;
+ Maybe< 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 IfcTendonAnchor
+ struct IfcTendonAnchor : IfcReinforcingElement, ObjectHelper<IfcTendonAnchor,1> { IfcTendonAnchor() : Object("IfcTendonAnchor") {}
+ Maybe< IfcTendonAnchorTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcTendonAnchorType
+ struct IfcTendonAnchorType : IfcReinforcingElementType, ObjectHelper<IfcTendonAnchorType,1> { IfcTendonAnchorType() : Object("IfcTendonAnchorType") {}
+ IfcTendonAnchorTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcTendonType
+ struct IfcTendonType : IfcReinforcingElementType, ObjectHelper<IfcTendonType,4> { IfcTendonType() : Object("IfcTendonType") {}
+ IfcTendonTypeEnum::Out PredefinedType;
+ Maybe< IfcPositiveLengthMeasure::Out > NominalDiameter;
+ Maybe< IfcAreaMeasure::Out > CrossSectionArea;
+ Maybe< IfcPositiveLengthMeasure::Out > SheathDiameter;
+ };
+
+ // 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 IfcTextLiteralWithExtent
+ struct IfcTextLiteralWithExtent : IfcTextLiteral, ObjectHelper<IfcTextLiteralWithExtent,2> { IfcTextLiteralWithExtent() : Object("IfcTextLiteralWithExtent") {}
+ Lazy< IfcPlanarExtent > Extent;
+ IfcBoxAlignment::Out BoxAlignment;
+ };
+
+ // C++ wrapper for IfcTopologyRepresentation
+ struct IfcTopologyRepresentation : IfcShapeModel, ObjectHelper<IfcTopologyRepresentation,0> { IfcTopologyRepresentation() : Object("IfcTopologyRepresentation") {}
+
+ };
+
+ // C++ wrapper for IfcToroidalSurface
+ struct IfcToroidalSurface : IfcElementarySurface, ObjectHelper<IfcToroidalSurface,2> { IfcToroidalSurface() : Object("IfcToroidalSurface") {}
+ IfcPositiveLengthMeasure::Out MajorRadius;
+ IfcPositiveLengthMeasure::Out MinorRadius;
+ };
+
+ // C++ wrapper for IfcTransformer
+ struct IfcTransformer : IfcEnergyConversionDevice, ObjectHelper<IfcTransformer,1> { IfcTransformer() : Object("IfcTransformer") {}
+ Maybe< IfcTransformerTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcTransformerType
+ struct IfcTransformerType : IfcEnergyConversionDeviceType, ObjectHelper<IfcTransformerType,1> { IfcTransformerType() : Object("IfcTransformerType") {}
+ IfcTransformerTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcTransportElement
+ struct IfcTransportElement : IfcElement, ObjectHelper<IfcTransportElement,1> { IfcTransportElement() : Object("IfcTransportElement") {}
+ Maybe< IfcTransportElementTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcTransportElementType
+ struct IfcTransportElementType : IfcElementType, ObjectHelper<IfcTransportElementType,1> { IfcTransportElementType() : Object("IfcTransportElementType") {}
+ IfcTransportElementTypeEnum::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 IfcTriangulatedFaceSet
+ struct IfcTriangulatedFaceSet : IfcTessellatedFaceSet, ObjectHelper<IfcTriangulatedFaceSet,2> { IfcTriangulatedFaceSet() : Object("IfcTriangulatedFaceSet") {}
+ Maybe< IfcBoolean::Out > Closed;
+ Maybe< ListOf< IfcPositiveInteger, 1, 0 >::Out > PnIndex;
+ };
+
+ // 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;
+ IfcBoolean::Out SenseAgreement;
+ IfcTrimmingPreference::Out MasterRepresentation;
+ };
+
+ // C++ wrapper for IfcTubeBundle
+ struct IfcTubeBundle : IfcEnergyConversionDevice, ObjectHelper<IfcTubeBundle,1> { IfcTubeBundle() : Object("IfcTubeBundle") {}
+ Maybe< IfcTubeBundleTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcTubeBundleType
+ struct IfcTubeBundleType : IfcEnergyConversionDeviceType, ObjectHelper<IfcTubeBundleType,1> { IfcTubeBundleType() : Object("IfcTubeBundleType") {}
+ IfcTubeBundleTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcUShapeProfileDef
+ struct IfcUShapeProfileDef : IfcParameterizedProfileDef, ObjectHelper<IfcUShapeProfileDef,7> { IfcUShapeProfileDef() : Object("IfcUShapeProfileDef") {}
+ IfcPositiveLengthMeasure::Out Depth;
+ IfcPositiveLengthMeasure::Out FlangeWidth;
+ IfcPositiveLengthMeasure::Out WebThickness;
+ IfcPositiveLengthMeasure::Out FlangeThickness;
+ Maybe< IfcNonNegativeLengthMeasure::Out > FilletRadius;
+ Maybe< IfcNonNegativeLengthMeasure::Out > EdgeRadius;
+ Maybe< IfcPlaneAngleMeasure::Out > FlangeSlope;
+ };
+
+ // C++ wrapper for IfcUnitAssignment
+ struct IfcUnitAssignment : ObjectHelper<IfcUnitAssignment,1> { IfcUnitAssignment() : Object("IfcUnitAssignment") {}
+ ListOf< IfcUnit, 1, 0 >::Out Units;
+ };
+
+ // C++ wrapper for IfcUnitaryControlElement
+ struct IfcUnitaryControlElement : IfcDistributionControlElement, ObjectHelper<IfcUnitaryControlElement,1> { IfcUnitaryControlElement() : Object("IfcUnitaryControlElement") {}
+ Maybe< IfcUnitaryControlElementTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcUnitaryControlElementType
+ struct IfcUnitaryControlElementType : IfcDistributionControlElementType, ObjectHelper<IfcUnitaryControlElementType,1> { IfcUnitaryControlElementType() : Object("IfcUnitaryControlElementType") {}
+ IfcUnitaryControlElementTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcUnitaryEquipment
+ struct IfcUnitaryEquipment : IfcEnergyConversionDevice, ObjectHelper<IfcUnitaryEquipment,1> { IfcUnitaryEquipment() : Object("IfcUnitaryEquipment") {}
+ Maybe< IfcUnitaryEquipmentTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcUnitaryEquipmentType
+ struct IfcUnitaryEquipmentType : IfcEnergyConversionDeviceType, ObjectHelper<IfcUnitaryEquipmentType,1> { IfcUnitaryEquipmentType() : Object("IfcUnitaryEquipmentType") {}
+ IfcUnitaryEquipmentTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcValve
+ struct IfcValve : IfcFlowController, ObjectHelper<IfcValve,1> { IfcValve() : Object("IfcValve") {}
+ Maybe< IfcValveTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcValveType
+ struct IfcValveType : IfcFlowControllerType, ObjectHelper<IfcValveType,1> { IfcValveType() : Object("IfcValveType") {}
+ IfcValveTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcVector
+ struct IfcVector : IfcGeometricRepresentationItem, ObjectHelper<IfcVector,2> { IfcVector() : Object("IfcVector") {}
+ Lazy< IfcDirection > Orientation;
+ IfcLengthMeasure::Out Magnitude;
+ };
+
+ // C++ wrapper for IfcVertex
+ struct IfcVertex : IfcTopologicalRepresentationItem, ObjectHelper<IfcVertex,0> { IfcVertex() : Object("IfcVertex") {}
+
+ };
+
+ // C++ wrapper for IfcVertexLoop
+ struct IfcVertexLoop : IfcLoop, ObjectHelper<IfcVertexLoop,1> { IfcVertexLoop() : Object("IfcVertexLoop") {}
+ Lazy< IfcVertex > LoopVertex;
+ };
+
+ // C++ wrapper for IfcVertexPoint
+ struct IfcVertexPoint : IfcVertex, ObjectHelper<IfcVertexPoint,1> { IfcVertexPoint() : Object("IfcVertexPoint") {}
+ Lazy< IfcPoint > VertexGeometry;
+ };
+
+ // C++ wrapper for IfcVibrationIsolator
+ struct IfcVibrationIsolator : IfcElementComponent, ObjectHelper<IfcVibrationIsolator,1> { IfcVibrationIsolator() : Object("IfcVibrationIsolator") {}
+ Maybe< IfcVibrationIsolatorTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcVibrationIsolatorType
+ struct IfcVibrationIsolatorType : IfcElementComponentType, ObjectHelper<IfcVibrationIsolatorType,1> { IfcVibrationIsolatorType() : Object("IfcVibrationIsolatorType") {}
+ IfcVibrationIsolatorTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcVirtualElement
+ struct IfcVirtualElement : IfcElement, ObjectHelper<IfcVirtualElement,0> { IfcVirtualElement() : Object("IfcVirtualElement") {}
+
+ };
+
+ // C++ wrapper for IfcVoidingFeature
+ struct IfcVoidingFeature : IfcFeatureElementSubtraction, ObjectHelper<IfcVoidingFeature,1> { IfcVoidingFeature() : Object("IfcVoidingFeature") {}
+ Maybe< IfcVoidingFeatureTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcWall
+ struct IfcWall : IfcBuildingElement, ObjectHelper<IfcWall,1> { IfcWall() : Object("IfcWall") {}
+ Maybe< IfcWallTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcWallElementedCase
+ struct IfcWallElementedCase : IfcWall, ObjectHelper<IfcWallElementedCase,0> { IfcWallElementedCase() : Object("IfcWallElementedCase") {}
+
+ };
+
+ // C++ wrapper for IfcWallStandardCase
+ struct IfcWallStandardCase : IfcWall, ObjectHelper<IfcWallStandardCase,0> { IfcWallStandardCase() : Object("IfcWallStandardCase") {}
+
+ };
+
+ // C++ wrapper for IfcWallType
+ struct IfcWallType : IfcBuildingElementType, ObjectHelper<IfcWallType,1> { IfcWallType() : Object("IfcWallType") {}
+ IfcWallTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcWasteTerminal
+ struct IfcWasteTerminal : IfcFlowTerminal, ObjectHelper<IfcWasteTerminal,1> { IfcWasteTerminal() : Object("IfcWasteTerminal") {}
+ Maybe< IfcWasteTerminalTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcWasteTerminalType
+ struct IfcWasteTerminalType : IfcFlowTerminalType, ObjectHelper<IfcWasteTerminalType,1> { IfcWasteTerminalType() : Object("IfcWasteTerminalType") {}
+ IfcWasteTerminalTypeEnum::Out PredefinedType;
+ };
+
+ // C++ wrapper for IfcWindow
+ struct IfcWindow : IfcBuildingElement, ObjectHelper<IfcWindow,5> { IfcWindow() : Object("IfcWindow") {}
+ Maybe< IfcPositiveLengthMeasure::Out > OverallHeight;
+ Maybe< IfcPositiveLengthMeasure::Out > OverallWidth;
+ Maybe< IfcWindowTypeEnum::Out > PredefinedType;
+ Maybe< IfcWindowTypePartitioningEnum::Out > PartitioningType;
+ Maybe< IfcLabel::Out > UserDefinedPartitioningType;
+ };
+
+ // C++ wrapper for IfcWindowStandardCase
+ struct IfcWindowStandardCase : IfcWindow, ObjectHelper<IfcWindowStandardCase,0> { IfcWindowStandardCase() : Object("IfcWindowStandardCase") {}
+
+ };
+
+ // C++ wrapper for IfcWindowStyle
+ struct IfcWindowStyle : IfcTypeProduct, ObjectHelper<IfcWindowStyle,4> { IfcWindowStyle() : Object("IfcWindowStyle") {}
+ IfcWindowStyleConstructionEnum::Out ConstructionType;
+ IfcWindowStyleOperationEnum::Out OperationType;
+ IfcBoolean::Out ParameterTakesPrecedence;
+ IfcBoolean::Out Sizeable;
+ };
+
+ // C++ wrapper for IfcWindowType
+ struct IfcWindowType : IfcBuildingElementType, ObjectHelper<IfcWindowType,4> { IfcWindowType() : Object("IfcWindowType") {}
+ IfcWindowTypeEnum::Out PredefinedType;
+ IfcWindowTypePartitioningEnum::Out PartitioningType;
+ Maybe< IfcBoolean::Out > ParameterTakesPrecedence;
+ Maybe< IfcLabel::Out > UserDefinedPartitioningType;
+ };
+
+ // C++ wrapper for IfcWorkCalendar
+ struct IfcWorkCalendar : IfcControl, ObjectHelper<IfcWorkCalendar,3> { IfcWorkCalendar() : Object("IfcWorkCalendar") {}
+ Maybe< ListOf< Lazy< NotImplemented >, 1, 0 > > WorkingTimes;
+ Maybe< ListOf< Lazy< NotImplemented >, 1, 0 > > ExceptionTimes;
+ Maybe< IfcWorkCalendarTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcWorkControl
+ struct IfcWorkControl : IfcControl, ObjectHelper<IfcWorkControl,7> { IfcWorkControl() : Object("IfcWorkControl") {}
+ IfcDateTime::Out CreationDate;
+ Maybe< ListOf< Lazy< NotImplemented >, 1, 0 > > Creators;
+ Maybe< IfcLabel::Out > Purpose;
+ Maybe< IfcDuration::Out > Duration;
+ Maybe< IfcDuration::Out > TotalFloat;
+ IfcDateTime::Out StartTime;
+ Maybe< IfcDateTime::Out > FinishTime;
+ };
+
+ // C++ wrapper for IfcWorkPlan
+ struct IfcWorkPlan : IfcWorkControl, ObjectHelper<IfcWorkPlan,1> { IfcWorkPlan() : Object("IfcWorkPlan") {}
+ Maybe< IfcWorkPlanTypeEnum::Out > PredefinedType;
+ };
+
+ // C++ wrapper for IfcWorkSchedule
+ struct IfcWorkSchedule : IfcWorkControl, ObjectHelper<IfcWorkSchedule,1> { IfcWorkSchedule() : Object("IfcWorkSchedule") {}
+ Maybe< IfcWorkScheduleTypeEnum::Out > PredefinedType;
+ };
+
+ // 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< IfcNonNegativeLengthMeasure::Out > FilletRadius;
+ Maybe< IfcNonNegativeLengthMeasure::Out > EdgeRadius;
+ };
+
+ // C++ wrapper for IfcZone
+ struct IfcZone : IfcSystem, ObjectHelper<IfcZone,1> { IfcZone() : Object("IfcZone") {}
+ Maybe< IfcLabel::Out > LongName;
+ };
+
+ 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( IfcObject );
+ DECL_CONV_STUB( IfcControl );
+ DECL_CONV_STUB( IfcActionRequest );
+ DECL_CONV_STUB( IfcActor );
+ DECL_CONV_STUB( IfcProduct );
+ DECL_CONV_STUB( IfcElement );
+ DECL_CONV_STUB( IfcDistributionElement );
+ DECL_CONV_STUB( IfcDistributionControlElement );
+ DECL_CONV_STUB( IfcActuator );
+ DECL_CONV_STUB( IfcTypeObject );
+ DECL_CONV_STUB( IfcTypeProduct );
+ DECL_CONV_STUB( IfcElementType );
+ DECL_CONV_STUB( IfcDistributionElementType );
+ DECL_CONV_STUB( IfcDistributionControlElementType );
+ DECL_CONV_STUB( IfcActuatorType );
+ DECL_CONV_STUB( IfcRepresentationItem );
+ DECL_CONV_STUB( IfcGeometricRepresentationItem );
+ DECL_CONV_STUB( IfcSolidModel );
+ DECL_CONV_STUB( IfcManifoldSolidBrep );
+ DECL_CONV_STUB( IfcAdvancedBrep );
+ DECL_CONV_STUB( IfcAdvancedBrepWithVoids );
+ DECL_CONV_STUB( IfcTopologicalRepresentationItem );
+ DECL_CONV_STUB( IfcFace );
+ DECL_CONV_STUB( IfcFaceSurface );
+ DECL_CONV_STUB( IfcAdvancedFace );
+ DECL_CONV_STUB( IfcDistributionFlowElement );
+ DECL_CONV_STUB( IfcFlowTerminal );
+ DECL_CONV_STUB( IfcAirTerminal );
+ DECL_CONV_STUB( IfcFlowController );
+ DECL_CONV_STUB( IfcAirTerminalBox );
+ DECL_CONV_STUB( IfcDistributionFlowElementType );
+ DECL_CONV_STUB( IfcFlowControllerType );
+ DECL_CONV_STUB( IfcAirTerminalBoxType );
+ DECL_CONV_STUB( IfcFlowTerminalType );
+ DECL_CONV_STUB( IfcAirTerminalType );
+ DECL_CONV_STUB( IfcEnergyConversionDevice );
+ DECL_CONV_STUB( IfcAirToAirHeatRecovery );
+ DECL_CONV_STUB( IfcEnergyConversionDeviceType );
+ DECL_CONV_STUB( IfcAirToAirHeatRecoveryType );
+ DECL_CONV_STUB( IfcAlarm );
+ DECL_CONV_STUB( IfcAlarmType );
+ DECL_CONV_STUB( IfcAnnotation );
+ DECL_CONV_STUB( IfcAnnotationFillArea );
+ DECL_CONV_STUB( IfcProfileDef );
+ DECL_CONV_STUB( IfcArbitraryClosedProfileDef );
+ DECL_CONV_STUB( IfcArbitraryOpenProfileDef );
+ DECL_CONV_STUB( IfcArbitraryProfileDefWithVoids );
+ DECL_CONV_STUB( IfcGroup );
+ DECL_CONV_STUB( IfcAsset );
+ DECL_CONV_STUB( IfcParameterizedProfileDef );
+ DECL_CONV_STUB( IfcAsymmetricIShapeProfileDef );
+ DECL_CONV_STUB( IfcAudioVisualAppliance );
+ DECL_CONV_STUB( IfcAudioVisualApplianceType );
+ DECL_CONV_STUB( IfcPlacement );
+ DECL_CONV_STUB( IfcAxis1Placement );
+ DECL_CONV_STUB( IfcAxis2Placement2D );
+ DECL_CONV_STUB( IfcAxis2Placement3D );
+ DECL_CONV_STUB( IfcCurve );
+ DECL_CONV_STUB( IfcBoundedCurve );
+ DECL_CONV_STUB( IfcBSplineCurve );
+ DECL_CONV_STUB( IfcBSplineCurveWithKnots );
+ DECL_CONV_STUB( IfcSurface );
+ DECL_CONV_STUB( IfcBoundedSurface );
+ DECL_CONV_STUB( IfcBSplineSurface );
+ DECL_CONV_STUB( IfcBSplineSurfaceWithKnots );
+ DECL_CONV_STUB( IfcBuildingElement );
+ DECL_CONV_STUB( IfcBeam );
+ DECL_CONV_STUB( IfcBeamStandardCase );
+ DECL_CONV_STUB( IfcBuildingElementType );
+ DECL_CONV_STUB( IfcBeamType );
+ DECL_CONV_STUB( IfcPresentationItem );
+ DECL_CONV_STUB( IfcCsgPrimitive3D );
+ DECL_CONV_STUB( IfcBlock );
+ DECL_CONV_STUB( IfcBoiler );
+ DECL_CONV_STUB( IfcBoilerType );
+ DECL_CONV_STUB( IfcBooleanResult );
+ DECL_CONV_STUB( IfcBooleanClippingResult );
+ DECL_CONV_STUB( IfcCompositeCurve );
+ DECL_CONV_STUB( IfcCompositeCurveOnSurface );
+ DECL_CONV_STUB( IfcBoundaryCurve );
+ DECL_CONV_STUB( IfcBoundingBox );
+ DECL_CONV_STUB( IfcHalfSpaceSolid );
+ DECL_CONV_STUB( IfcBoxedHalfSpace );
+ DECL_CONV_STUB( IfcSpatialElement );
+ DECL_CONV_STUB( IfcSpatialStructureElement );
+ DECL_CONV_STUB( IfcBuilding );
+ DECL_CONV_STUB( IfcElementComponent );
+ DECL_CONV_STUB( IfcBuildingElementPart );
+ DECL_CONV_STUB( IfcElementComponentType );
+ DECL_CONV_STUB( IfcBuildingElementPartType );
+ DECL_CONV_STUB( IfcBuildingElementProxy );
+ DECL_CONV_STUB( IfcBuildingElementProxyType );
+ DECL_CONV_STUB( IfcBuildingStorey );
+ DECL_CONV_STUB( IfcSystem );
+ DECL_CONV_STUB( IfcBuildingSystem );
+ DECL_CONV_STUB( IfcBurner );
+ DECL_CONV_STUB( IfcBurnerType );
+ DECL_CONV_STUB( IfcCShapeProfileDef );
+ DECL_CONV_STUB( IfcFlowFitting );
+ DECL_CONV_STUB( IfcCableCarrierFitting );
+ DECL_CONV_STUB( IfcFlowFittingType );
+ DECL_CONV_STUB( IfcCableCarrierFittingType );
+ DECL_CONV_STUB( IfcFlowSegment );
+ DECL_CONV_STUB( IfcCableCarrierSegment );
+ DECL_CONV_STUB( IfcFlowSegmentType );
+ DECL_CONV_STUB( IfcCableCarrierSegmentType );
+ DECL_CONV_STUB( IfcCableFitting );
+ DECL_CONV_STUB( IfcCableFittingType );
+ DECL_CONV_STUB( IfcCableSegment );
+ DECL_CONV_STUB( IfcCableSegmentType );
+ DECL_CONV_STUB( IfcPoint );
+ DECL_CONV_STUB( IfcCartesianPoint );
+ DECL_CONV_STUB( IfcCartesianPointList );
+ DECL_CONV_STUB( IfcCartesianPointList2D );
+ DECL_CONV_STUB( IfcCartesianPointList3D );
+ DECL_CONV_STUB( IfcCartesianTransformationOperator );
+ DECL_CONV_STUB( IfcCartesianTransformationOperator2D );
+ DECL_CONV_STUB( IfcCartesianTransformationOperator2DnonUniform );
+ DECL_CONV_STUB( IfcCartesianTransformationOperator3D );
+ DECL_CONV_STUB( IfcCartesianTransformationOperator3DnonUniform );
+ DECL_CONV_STUB( IfcCenterLineProfileDef );
+ DECL_CONV_STUB( IfcChiller );
+ DECL_CONV_STUB( IfcChillerType );
+ DECL_CONV_STUB( IfcChimney );
+ DECL_CONV_STUB( IfcChimneyType );
+ DECL_CONV_STUB( IfcConic );
+ DECL_CONV_STUB( IfcCircle );
+ DECL_CONV_STUB( IfcCircleProfileDef );
+ DECL_CONV_STUB( IfcCircleHollowProfileDef );
+ DECL_CONV_STUB( IfcCivilElement );
+ DECL_CONV_STUB( IfcCivilElementType );
+ DECL_CONV_STUB( IfcConnectedFaceSet );
+ DECL_CONV_STUB( IfcClosedShell );
+ DECL_CONV_STUB( IfcCoil );
+ DECL_CONV_STUB( IfcCoilType );
+ DECL_CONV_STUB( IfcColourSpecification );
+ DECL_CONV_STUB( IfcColourRgb );
+ DECL_CONV_STUB( IfcColumn );
+ DECL_CONV_STUB( IfcColumnStandardCase );
+ DECL_CONV_STUB( IfcColumnType );
+ DECL_CONV_STUB( IfcCommunicationsAppliance );
+ DECL_CONV_STUB( IfcCommunicationsApplianceType );
+ DECL_CONV_STUB( IfcPropertyAbstraction );
+ DECL_CONV_STUB( IfcProperty );
+ DECL_CONV_STUB( IfcComplexProperty );
+ DECL_CONV_STUB( IfcPropertyDefinition );
+ DECL_CONV_STUB( IfcCompositeCurveSegment );
+ DECL_CONV_STUB( IfcCompositeProfileDef );
+ DECL_CONV_STUB( IfcFlowMovingDevice );
+ DECL_CONV_STUB( IfcCompressor );
+ DECL_CONV_STUB( IfcFlowMovingDeviceType );
+ DECL_CONV_STUB( IfcCompressorType );
+ DECL_CONV_STUB( IfcCondenser );
+ DECL_CONV_STUB( IfcCondenserType );
+ DECL_CONV_STUB( IfcResource );
+ DECL_CONV_STUB( IfcConstructionResource );
+ DECL_CONV_STUB( IfcConstructionEquipmentResource );
+ DECL_CONV_STUB( IfcTypeResource );
+ DECL_CONV_STUB( IfcConstructionResourceType );
+ DECL_CONV_STUB( IfcConstructionEquipmentResourceType );
+ DECL_CONV_STUB( IfcConstructionMaterialResource );
+ DECL_CONV_STUB( IfcConstructionMaterialResourceType );
+ DECL_CONV_STUB( IfcConstructionProductResource );
+ DECL_CONV_STUB( IfcConstructionProductResourceType );
+ DECL_CONV_STUB( IfcContext );
+ DECL_CONV_STUB( IfcNamedUnit );
+ DECL_CONV_STUB( IfcContextDependentUnit );
+ DECL_CONV_STUB( IfcController );
+ DECL_CONV_STUB( IfcControllerType );
+ DECL_CONV_STUB( IfcConversionBasedUnit );
+ DECL_CONV_STUB( IfcConversionBasedUnitWithOffset );
+ DECL_CONV_STUB( IfcCooledBeam );
+ DECL_CONV_STUB( IfcCooledBeamType );
+ DECL_CONV_STUB( IfcCoolingTower );
+ DECL_CONV_STUB( IfcCoolingTowerType );
+ DECL_CONV_STUB( IfcCostItem );
+ DECL_CONV_STUB( IfcCostSchedule );
+ DECL_CONV_STUB( IfcCovering );
+ DECL_CONV_STUB( IfcCoveringType );
+ DECL_CONV_STUB( IfcCrewResource );
+ DECL_CONV_STUB( IfcCrewResourceType );
+ DECL_CONV_STUB( IfcCsgSolid );
+ DECL_CONV_STUB( IfcCurtainWall );
+ DECL_CONV_STUB( IfcCurtainWallType );
+ DECL_CONV_STUB( IfcCurveBoundedPlane );
+ DECL_CONV_STUB( IfcCurveBoundedSurface );
+ DECL_CONV_STUB( IfcPresentationStyle );
+ DECL_CONV_STUB( IfcElementarySurface );
+ DECL_CONV_STUB( IfcCylindricalSurface );
+ DECL_CONV_STUB( IfcDamper );
+ DECL_CONV_STUB( IfcDamperType );
+ DECL_CONV_STUB( IfcDerivedProfileDef );
+ DECL_CONV_STUB( IfcDirection );
+ DECL_CONV_STUB( IfcDiscreteAccessory );
+ DECL_CONV_STUB( IfcDiscreteAccessoryType );
+ DECL_CONV_STUB( IfcDistributionChamberElement );
+ DECL_CONV_STUB( IfcDistributionChamberElementType );
+ DECL_CONV_STUB( IfcDistributionSystem );
+ DECL_CONV_STUB( IfcDistributionCircuit );
+ DECL_CONV_STUB( IfcPort );
+ DECL_CONV_STUB( IfcDistributionPort );
+ DECL_CONV_STUB( IfcDoor );
+ DECL_CONV_STUB( IfcPropertySetDefinition );
+ DECL_CONV_STUB( IfcDoorStandardCase );
+ DECL_CONV_STUB( IfcDoorStyle );
+ DECL_CONV_STUB( IfcDoorType );
+ DECL_CONV_STUB( IfcDuctFitting );
+ DECL_CONV_STUB( IfcDuctFittingType );
+ DECL_CONV_STUB( IfcDuctSegment );
+ DECL_CONV_STUB( IfcDuctSegmentType );
+ DECL_CONV_STUB( IfcFlowTreatmentDevice );
+ DECL_CONV_STUB( IfcDuctSilencer );
+ DECL_CONV_STUB( IfcFlowTreatmentDeviceType );
+ DECL_CONV_STUB( IfcDuctSilencerType );
+ DECL_CONV_STUB( IfcEdge );
+ DECL_CONV_STUB( IfcEdgeCurve );
+ DECL_CONV_STUB( IfcLoop );
+ DECL_CONV_STUB( IfcEdgeLoop );
+ DECL_CONV_STUB( IfcElectricAppliance );
+ DECL_CONV_STUB( IfcElectricApplianceType );
+ DECL_CONV_STUB( IfcElectricDistributionBoard );
+ DECL_CONV_STUB( IfcElectricDistributionBoardType );
+ DECL_CONV_STUB( IfcFlowStorageDevice );
+ DECL_CONV_STUB( IfcElectricFlowStorageDevice );
+ DECL_CONV_STUB( IfcFlowStorageDeviceType );
+ DECL_CONV_STUB( IfcElectricFlowStorageDeviceType );
+ DECL_CONV_STUB( IfcElectricGenerator );
+ DECL_CONV_STUB( IfcElectricGeneratorType );
+ DECL_CONV_STUB( IfcElectricMotor );
+ DECL_CONV_STUB( IfcElectricMotorType );
+ DECL_CONV_STUB( IfcElectricTimeControl );
+ DECL_CONV_STUB( IfcElectricTimeControlType );
+ DECL_CONV_STUB( IfcElementAssembly );
+ DECL_CONV_STUB( IfcElementAssemblyType );
+ DECL_CONV_STUB( IfcQuantitySet );
+ DECL_CONV_STUB( IfcElementQuantity );
+ DECL_CONV_STUB( IfcEllipse );
+ DECL_CONV_STUB( IfcEllipseProfileDef );
+ DECL_CONV_STUB( IfcEngine );
+ DECL_CONV_STUB( IfcEngineType );
+ DECL_CONV_STUB( IfcEvaporativeCooler );
+ DECL_CONV_STUB( IfcEvaporativeCoolerType );
+ DECL_CONV_STUB( IfcEvaporator );
+ DECL_CONV_STUB( IfcEvaporatorType );
+ DECL_CONV_STUB( IfcProcess );
+ DECL_CONV_STUB( IfcEvent );
+ DECL_CONV_STUB( IfcTypeProcess );
+ DECL_CONV_STUB( IfcEventType );
+ DECL_CONV_STUB( IfcExternalSpatialStructureElement );
+ DECL_CONV_STUB( IfcExternalSpatialElement );
+ DECL_CONV_STUB( IfcSweptAreaSolid );
+ DECL_CONV_STUB( IfcExtrudedAreaSolid );
+ DECL_CONV_STUB( IfcExtrudedAreaSolidTapered );
+ DECL_CONV_STUB( IfcFaceBasedSurfaceModel );
+ DECL_CONV_STUB( IfcFaceBound );
+ DECL_CONV_STUB( IfcFaceOuterBound );
+ DECL_CONV_STUB( IfcFacetedBrep );
+ DECL_CONV_STUB( IfcFacetedBrepWithVoids );
+ DECL_CONV_STUB( IfcFan );
+ DECL_CONV_STUB( IfcFanType );
+ DECL_CONV_STUB( IfcFastener );
+ DECL_CONV_STUB( IfcFastenerType );
+ DECL_CONV_STUB( IfcFeatureElement );
+ DECL_CONV_STUB( IfcFeatureElementAddition );
+ DECL_CONV_STUB( IfcFeatureElementSubtraction );
+ DECL_CONV_STUB( IfcFillAreaStyleHatching );
+ DECL_CONV_STUB( IfcFillAreaStyleTiles );
+ DECL_CONV_STUB( IfcFilter );
+ DECL_CONV_STUB( IfcFilterType );
+ DECL_CONV_STUB( IfcFireSuppressionTerminal );
+ DECL_CONV_STUB( IfcFireSuppressionTerminalType );
+ DECL_CONV_STUB( IfcFixedReferenceSweptAreaSolid );
+ DECL_CONV_STUB( IfcFlowInstrument );
+ DECL_CONV_STUB( IfcFlowInstrumentType );
+ DECL_CONV_STUB( IfcFlowMeter );
+ DECL_CONV_STUB( IfcFlowMeterType );
+ DECL_CONV_STUB( IfcFooting );
+ DECL_CONV_STUB( IfcFootingType );
+ DECL_CONV_STUB( IfcFurnishingElement );
+ DECL_CONV_STUB( IfcFurnishingElementType );
+ DECL_CONV_STUB( IfcFurniture );
+ DECL_CONV_STUB( IfcFurnitureType );
+ DECL_CONV_STUB( IfcGeographicElement );
+ DECL_CONV_STUB( IfcGeographicElementType );
+ DECL_CONV_STUB( IfcGeometricSet );
+ DECL_CONV_STUB( IfcGeometricCurveSet );
+ DECL_CONV_STUB( IfcRepresentationContext );
+ DECL_CONV_STUB( IfcGeometricRepresentationContext );
+ DECL_CONV_STUB( IfcGeometricRepresentationSubContext );
+ DECL_CONV_STUB( IfcGrid );
+ DECL_CONV_STUB( IfcObjectPlacement );
+ DECL_CONV_STUB( IfcGridPlacement );
+ DECL_CONV_STUB( IfcHeatExchanger );
+ DECL_CONV_STUB( IfcHeatExchangerType );
+ DECL_CONV_STUB( IfcHumidifier );
+ DECL_CONV_STUB( IfcHumidifierType );
+ DECL_CONV_STUB( IfcIShapeProfileDef );
+ DECL_CONV_STUB( IfcIndexedPolyCurve );
+ DECL_CONV_STUB( IfcTessellatedItem );
+ DECL_CONV_STUB( IfcIndexedPolygonalFace );
+ DECL_CONV_STUB( IfcIndexedPolygonalFaceWithVoids );
+ DECL_CONV_STUB( IfcInterceptor );
+ DECL_CONV_STUB( IfcInterceptorType );
+ DECL_CONV_STUB( IfcSurfaceCurve );
+ DECL_CONV_STUB( IfcIntersectionCurve );
+ DECL_CONV_STUB( IfcInventory );
+ DECL_CONV_STUB( IfcJunctionBox );
+ DECL_CONV_STUB( IfcJunctionBoxType );
+ DECL_CONV_STUB( IfcLShapeProfileDef );
+ DECL_CONV_STUB( IfcLaborResource );
+ DECL_CONV_STUB( IfcLaborResourceType );
+ DECL_CONV_STUB( IfcLamp );
+ DECL_CONV_STUB( IfcLampType );
+ DECL_CONV_STUB( IfcLightFixture );
+ DECL_CONV_STUB( IfcLightFixtureType );
+ DECL_CONV_STUB( IfcLightSource );
+ DECL_CONV_STUB( IfcLightSourceAmbient );
+ DECL_CONV_STUB( IfcLightSourceDirectional );
+ DECL_CONV_STUB( IfcLightSourceGoniometric );
+ DECL_CONV_STUB( IfcLightSourcePositional );
+ DECL_CONV_STUB( IfcLightSourceSpot );
+ DECL_CONV_STUB( IfcLine );
+ DECL_CONV_STUB( IfcLocalPlacement );
+ DECL_CONV_STUB( IfcMappedItem );
+ DECL_CONV_STUB( IfcProductRepresentation );
+ DECL_CONV_STUB( IfcMaterialDefinitionRepresentation );
+ DECL_CONV_STUB( IfcMeasureWithUnit );
+ DECL_CONV_STUB( IfcMechanicalFastener );
+ DECL_CONV_STUB( IfcMechanicalFastenerType );
+ DECL_CONV_STUB( IfcMedicalDevice );
+ DECL_CONV_STUB( IfcMedicalDeviceType );
+ DECL_CONV_STUB( IfcMember );
+ DECL_CONV_STUB( IfcMemberStandardCase );
+ DECL_CONV_STUB( IfcMemberType );
+ DECL_CONV_STUB( IfcMirroredProfileDef );
+ DECL_CONV_STUB( IfcMotorConnection );
+ DECL_CONV_STUB( IfcMotorConnectionType );
+ DECL_CONV_STUB( IfcOccupant );
+ DECL_CONV_STUB( IfcOffsetCurve2D );
+ DECL_CONV_STUB( IfcOffsetCurve3D );
+ DECL_CONV_STUB( IfcOpenShell );
+ DECL_CONV_STUB( IfcOpeningElement );
+ DECL_CONV_STUB( IfcOpeningStandardCase );
+ DECL_CONV_STUB( IfcOrientedEdge );
+ DECL_CONV_STUB( IfcOuterBoundaryCurve );
+ DECL_CONV_STUB( IfcOutlet );
+ DECL_CONV_STUB( IfcOutletType );
+ DECL_CONV_STUB( IfcPath );
+ DECL_CONV_STUB( IfcPcurve );
+ DECL_CONV_STUB( IfcPerformanceHistory );
+ DECL_CONV_STUB( IfcPermit );
+ DECL_CONV_STUB( IfcPile );
+ DECL_CONV_STUB( IfcPileType );
+ DECL_CONV_STUB( IfcPipeFitting );
+ DECL_CONV_STUB( IfcPipeFittingType );
+ DECL_CONV_STUB( IfcPipeSegment );
+ DECL_CONV_STUB( IfcPipeSegmentType );
+ DECL_CONV_STUB( IfcPlanarExtent );
+ DECL_CONV_STUB( IfcPlanarBox );
+ DECL_CONV_STUB( IfcPlane );
+ DECL_CONV_STUB( IfcPlate );
+ DECL_CONV_STUB( IfcPlateStandardCase );
+ DECL_CONV_STUB( IfcPlateType );
+ DECL_CONV_STUB( IfcPointOnCurve );
+ DECL_CONV_STUB( IfcPointOnSurface );
+ DECL_CONV_STUB( IfcPolyLoop );
+ DECL_CONV_STUB( IfcPolygonalBoundedHalfSpace );
+ DECL_CONV_STUB( IfcTessellatedFaceSet );
+ DECL_CONV_STUB( IfcPolygonalFaceSet );
+ DECL_CONV_STUB( IfcPolyline );
+ DECL_CONV_STUB( IfcPresentationStyleAssignment );
+ DECL_CONV_STUB( IfcProcedure );
+ DECL_CONV_STUB( IfcProcedureType );
+ DECL_CONV_STUB( IfcProductDefinitionShape );
+ DECL_CONV_STUB( IfcProject );
+ DECL_CONV_STUB( IfcProjectLibrary );
+ DECL_CONV_STUB( IfcProjectOrder );
+ DECL_CONV_STUB( IfcProjectionElement );
+ DECL_CONV_STUB( IfcSimpleProperty );
+ DECL_CONV_STUB( IfcPropertyBoundedValue );
+ DECL_CONV_STUB( IfcPropertyEnumeratedValue );
+ DECL_CONV_STUB( IfcPropertyListValue );
+ DECL_CONV_STUB( IfcPropertyReferenceValue );
+ DECL_CONV_STUB( IfcPropertySet );
+ DECL_CONV_STUB( IfcPropertySingleValue );
+ DECL_CONV_STUB( IfcPropertyTableValue );
+ DECL_CONV_STUB( IfcProtectiveDevice );
+ DECL_CONV_STUB( IfcProtectiveDeviceTrippingUnit );
+ DECL_CONV_STUB( IfcProtectiveDeviceTrippingUnitType );
+ DECL_CONV_STUB( IfcProtectiveDeviceType );
+ DECL_CONV_STUB( IfcProxy );
+ DECL_CONV_STUB( IfcPump );
+ DECL_CONV_STUB( IfcPumpType );
+ DECL_CONV_STUB( IfcRailing );
+ DECL_CONV_STUB( IfcRailingType );
+ DECL_CONV_STUB( IfcRamp );
+ DECL_CONV_STUB( IfcRampFlight );
+ DECL_CONV_STUB( IfcRampFlightType );
+ DECL_CONV_STUB( IfcRampType );
+ DECL_CONV_STUB( IfcRationalBSplineCurveWithKnots );
+ DECL_CONV_STUB( IfcRationalBSplineSurfaceWithKnots );
+ DECL_CONV_STUB( IfcRectangleProfileDef );
+ DECL_CONV_STUB( IfcRectangleHollowProfileDef );
+ DECL_CONV_STUB( IfcRectangularPyramid );
+ DECL_CONV_STUB( IfcRectangularTrimmedSurface );
+ DECL_CONV_STUB( IfcReinforcingElement );
+ DECL_CONV_STUB( IfcReinforcingBar );
+ DECL_CONV_STUB( IfcReinforcingElementType );
+ DECL_CONV_STUB( IfcReinforcingBarType );
+ DECL_CONV_STUB( IfcReinforcingMesh );
+ DECL_CONV_STUB( IfcReinforcingMeshType );
+ DECL_CONV_STUB( IfcRelationship );
+ DECL_CONV_STUB( IfcRelDecomposes );
+ DECL_CONV_STUB( IfcRelAggregates );
+ DECL_CONV_STUB( IfcRelConnects );
+ DECL_CONV_STUB( IfcRelContainedInSpatialStructure );
+ DECL_CONV_STUB( IfcRelDefines );
+ DECL_CONV_STUB( IfcRelDefinesByProperties );
+ DECL_CONV_STUB( IfcRelFillsElement );
+ DECL_CONV_STUB( IfcRelVoidsElement );
+ DECL_CONV_STUB( IfcReparametrisedCompositeCurveSegment );
+ DECL_CONV_STUB( IfcRepresentation );
+ DECL_CONV_STUB( IfcRepresentationMap );
+ DECL_CONV_STUB( IfcRevolvedAreaSolid );
+ DECL_CONV_STUB( IfcRevolvedAreaSolidTapered );
+ DECL_CONV_STUB( IfcRightCircularCone );
+ DECL_CONV_STUB( IfcRightCircularCylinder );
+ DECL_CONV_STUB( IfcRoof );
+ DECL_CONV_STUB( IfcRoofType );
+ DECL_CONV_STUB( IfcRoundedRectangleProfileDef );
+ DECL_CONV_STUB( IfcSIUnit );
+ DECL_CONV_STUB( IfcSanitaryTerminal );
+ DECL_CONV_STUB( IfcSanitaryTerminalType );
+ DECL_CONV_STUB( IfcSeamCurve );
+ DECL_CONV_STUB( IfcSectionedSpine );
+ DECL_CONV_STUB( IfcSensor );
+ DECL_CONV_STUB( IfcSensorType );
+ DECL_CONV_STUB( IfcShadingDevice );
+ DECL_CONV_STUB( IfcShadingDeviceType );
+ DECL_CONV_STUB( IfcShapeModel );
+ DECL_CONV_STUB( IfcShapeRepresentation );
+ DECL_CONV_STUB( IfcShellBasedSurfaceModel );
+ DECL_CONV_STUB( IfcSite );
+ DECL_CONV_STUB( IfcSlab );
+ DECL_CONV_STUB( IfcSlabElementedCase );
+ DECL_CONV_STUB( IfcSlabStandardCase );
+ DECL_CONV_STUB( IfcSlabType );
+ DECL_CONV_STUB( IfcSolarDevice );
+ DECL_CONV_STUB( IfcSolarDeviceType );
+ DECL_CONV_STUB( IfcSpace );
+ DECL_CONV_STUB( IfcSpaceHeater );
+ DECL_CONV_STUB( IfcSpaceHeaterType );
+ DECL_CONV_STUB( IfcSpatialElementType );
+ DECL_CONV_STUB( IfcSpatialStructureElementType );
+ DECL_CONV_STUB( IfcSpaceType );
+ DECL_CONV_STUB( IfcSpatialZone );
+ DECL_CONV_STUB( IfcSpatialZoneType );
+ DECL_CONV_STUB( IfcSphere );
+ DECL_CONV_STUB( IfcSphericalSurface );
+ DECL_CONV_STUB( IfcStackTerminal );
+ DECL_CONV_STUB( IfcStackTerminalType );
+ DECL_CONV_STUB( IfcStair );
+ DECL_CONV_STUB( IfcStairFlight );
+ DECL_CONV_STUB( IfcStairFlightType );
+ DECL_CONV_STUB( IfcStairType );
+ DECL_CONV_STUB( IfcStructuralActivity );
+ DECL_CONV_STUB( IfcStructuralAction );
+ DECL_CONV_STUB( IfcStructuralAnalysisModel );
+ DECL_CONV_STUB( IfcStructuralItem );
+ DECL_CONV_STUB( IfcStructuralConnection );
+ DECL_CONV_STUB( IfcStructuralCurveAction );
+ DECL_CONV_STUB( IfcStructuralCurveConnection );
+ DECL_CONV_STUB( IfcStructuralMember );
+ DECL_CONV_STUB( IfcStructuralCurveMember );
+ DECL_CONV_STUB( IfcStructuralCurveMemberVarying );
+ DECL_CONV_STUB( IfcStructuralReaction );
+ DECL_CONV_STUB( IfcStructuralCurveReaction );
+ DECL_CONV_STUB( IfcStructuralLinearAction );
+ DECL_CONV_STUB( IfcStructuralLoadGroup );
+ DECL_CONV_STUB( IfcStructuralLoadCase );
+ DECL_CONV_STUB( IfcStructuralSurfaceAction );
+ DECL_CONV_STUB( IfcStructuralPlanarAction );
+ DECL_CONV_STUB( IfcStructuralPointAction );
+ DECL_CONV_STUB( IfcStructuralPointConnection );
+ DECL_CONV_STUB( IfcStructuralPointReaction );
+ DECL_CONV_STUB( IfcStructuralResultGroup );
+ DECL_CONV_STUB( IfcStructuralSurfaceConnection );
+ DECL_CONV_STUB( IfcStructuralSurfaceMember );
+ DECL_CONV_STUB( IfcStructuralSurfaceMemberVarying );
+ DECL_CONV_STUB( IfcStructuralSurfaceReaction );
+ DECL_CONV_STUB( IfcStyleModel );
+ DECL_CONV_STUB( IfcStyledItem );
+ DECL_CONV_STUB( IfcStyledRepresentation );
+ DECL_CONV_STUB( IfcSubContractResource );
+ DECL_CONV_STUB( IfcSubContractResourceType );
+ DECL_CONV_STUB( IfcSubedge );
+ DECL_CONV_STUB( IfcSurfaceCurveSweptAreaSolid );
+ DECL_CONV_STUB( IfcSurfaceFeature );
+ DECL_CONV_STUB( IfcSweptSurface );
+ DECL_CONV_STUB( IfcSurfaceOfLinearExtrusion );
+ DECL_CONV_STUB( IfcSurfaceOfRevolution );
+ DECL_CONV_STUB( IfcSurfaceStyle );
+ DECL_CONV_STUB( IfcSurfaceStyleShading );
+ DECL_CONV_STUB( IfcSurfaceStyleRendering );
+ DECL_CONV_STUB( IfcSurfaceStyleWithTextures );
+ DECL_CONV_STUB( IfcSweptDiskSolid );
+ DECL_CONV_STUB( IfcSweptDiskSolidPolygonal );
+ DECL_CONV_STUB( IfcSwitchingDevice );
+ DECL_CONV_STUB( IfcSwitchingDeviceType );
+ DECL_CONV_STUB( IfcSystemFurnitureElement );
+ DECL_CONV_STUB( IfcSystemFurnitureElementType );
+ DECL_CONV_STUB( IfcTShapeProfileDef );
+ DECL_CONV_STUB( IfcTank );
+ DECL_CONV_STUB( IfcTankType );
+ DECL_CONV_STUB( IfcTask );
+ DECL_CONV_STUB( IfcTaskType );
+ DECL_CONV_STUB( IfcTendon );
+ DECL_CONV_STUB( IfcTendonAnchor );
+ DECL_CONV_STUB( IfcTendonAnchorType );
+ DECL_CONV_STUB( IfcTendonType );
+ DECL_CONV_STUB( IfcTextLiteral );
+ DECL_CONV_STUB( IfcTextLiteralWithExtent );
+ DECL_CONV_STUB( IfcTopologyRepresentation );
+ DECL_CONV_STUB( IfcToroidalSurface );
+ DECL_CONV_STUB( IfcTransformer );
+ DECL_CONV_STUB( IfcTransformerType );
+ DECL_CONV_STUB( IfcTransportElement );
+ DECL_CONV_STUB( IfcTransportElementType );
+ DECL_CONV_STUB( IfcTrapeziumProfileDef );
+ DECL_CONV_STUB( IfcTriangulatedFaceSet );
+ DECL_CONV_STUB( IfcTrimmedCurve );
+ DECL_CONV_STUB( IfcTubeBundle );
+ DECL_CONV_STUB( IfcTubeBundleType );
+ DECL_CONV_STUB( IfcUShapeProfileDef );
+ DECL_CONV_STUB( IfcUnitAssignment );
+ DECL_CONV_STUB( IfcUnitaryControlElement );
+ DECL_CONV_STUB( IfcUnitaryControlElementType );
+ DECL_CONV_STUB( IfcUnitaryEquipment );
+ DECL_CONV_STUB( IfcUnitaryEquipmentType );
+ DECL_CONV_STUB( IfcValve );
+ DECL_CONV_STUB( IfcValveType );
+ DECL_CONV_STUB( IfcVector );
+ DECL_CONV_STUB( IfcVertex );
+ DECL_CONV_STUB( IfcVertexLoop );
+ DECL_CONV_STUB( IfcVertexPoint );
+ DECL_CONV_STUB( IfcVibrationIsolator );
+ DECL_CONV_STUB( IfcVibrationIsolatorType );
+ DECL_CONV_STUB( IfcVirtualElement );
+ DECL_CONV_STUB( IfcVoidingFeature );
+ DECL_CONV_STUB( IfcWall );
+ DECL_CONV_STUB( IfcWallElementedCase );
+ DECL_CONV_STUB( IfcWallStandardCase );
+ DECL_CONV_STUB( IfcWallType );
+ DECL_CONV_STUB( IfcWasteTerminal );
+ DECL_CONV_STUB( IfcWasteTerminalType );
+ DECL_CONV_STUB( IfcWindow );
+ DECL_CONV_STUB( IfcWindowStandardCase );
+ DECL_CONV_STUB( IfcWindowStyle );
+ DECL_CONV_STUB( IfcWindowType );
+ DECL_CONV_STUB( IfcWorkCalendar );
+ DECL_CONV_STUB( IfcWorkControl );
+ DECL_CONV_STUB( IfcWorkPlan );
+ DECL_CONV_STUB( IfcWorkSchedule );
+ DECL_CONV_STUB( IfcZShapeProfileDef );
+ DECL_CONV_STUB( IfcZone );
+
+
+#undef DECL_CONV_STUB
+
+} //! Schema_4
+} //! STEP
+} //! Assimp
+
+#endif // INCLUDED_IFC_READER_GEN_H
diff --git a/code/IFCUtil.cpp b/code/Importer/IFC/IFCUtil.cpp
index f5bd56a00..06cc4405a 100644
--- a/code/IFCUtil.cpp
+++ b/code/Importer/IFC/IFCUtil.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -47,9 +48,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_NO_IFC_IMPORTER
-#include "IFCUtil.h"
-#include "PolyTools.h"
-#include "ProcessHelper.h"
+#include "code/Importer/IFC/IFCUtil.h"
+#include "code/PolyTools.h"
+#include "code/ProcessHelper.h"
#include <assimp/Defines.h>
namespace Assimp {
@@ -70,31 +71,31 @@ void TempOpening::Transform(const IfcMatrix4& mat)
// ------------------------------------------------------------------------------------------------
aiMesh* TempMesh::ToMesh()
{
- ai_assert(verts.size() == std::accumulate(vertcnt.begin(),vertcnt.end(),size_t(0)));
+ ai_assert(mVerts.size() == std::accumulate(mVertcnt.begin(),mVertcnt.end(),size_t(0)));
- if (verts.empty()) {
+ if (mVerts.empty()) {
return NULL;
}
std::unique_ptr<aiMesh> mesh(new aiMesh());
// copy vertices
- mesh->mNumVertices = static_cast<unsigned int>(verts.size());
+ mesh->mNumVertices = static_cast<unsigned int>(mVerts.size());
mesh->mVertices = new aiVector3D[mesh->mNumVertices];
- std::copy(verts.begin(),verts.end(),mesh->mVertices);
+ std::copy(mVerts.begin(),mVerts.end(),mesh->mVertices);
// and build up faces
- mesh->mNumFaces = static_cast<unsigned int>(vertcnt.size());
+ mesh->mNumFaces = static_cast<unsigned int>(mVertcnt.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]) {
+ if (!mVertcnt[n]) {
--mesh->mNumFaces;
continue;
}
- f.mNumIndices = vertcnt[n];
+ f.mNumIndices = mVertcnt[n];
f.mIndices = new unsigned int[f.mNumIndices];
for(unsigned int a = 0; a < f.mNumIndices; ++a) {
f.mIndices[a] = acc++;
@@ -109,14 +110,14 @@ aiMesh* TempMesh::ToMesh()
// ------------------------------------------------------------------------------------------------
void TempMesh::Clear()
{
- verts.clear();
- vertcnt.clear();
+ mVerts.clear();
+ mVertcnt.clear();
}
// ------------------------------------------------------------------------------------------------
void TempMesh::Transform(const IfcMatrix4& mat)
{
- for(IfcVector3& v : verts) {
+ for(IfcVector3& v : mVerts) {
v *= mat;
}
}
@@ -124,14 +125,14 @@ void TempMesh::Transform(const IfcMatrix4& mat)
// ------------------------------------------------------------------------------
IfcVector3 TempMesh::Center() const
{
- return (verts.size() == 0) ? IfcVector3(0.0f, 0.0f, 0.0f) : (std::accumulate(verts.begin(),verts.end(),IfcVector3()) / static_cast<IfcFloat>(verts.size()));
+ return (mVerts.size() == 0) ? IfcVector3(0.0f, 0.0f, 0.0f) : (std::accumulate(mVerts.begin(),mVerts.end(),IfcVector3()) / static_cast<IfcFloat>(mVerts.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());
+ mVerts.insert(mVerts.end(),other.mVerts.begin(),other.mVerts.end());
+ mVertcnt.insert(mVertcnt.end(),other.mVertcnt.begin(),other.mVertcnt.end());
}
// ------------------------------------------------------------------------------------------------
@@ -147,13 +148,13 @@ void TempMesh::RemoveDegenerates()
bool drop = false;
size_t inor = 0;
- std::vector<IfcVector3>::iterator vit = verts.begin();
- for (std::vector<unsigned int>::iterator it = vertcnt.begin(); it != vertcnt.end(); ++inor) {
+ std::vector<IfcVector3>::iterator vit = mVerts.begin();
+ for (std::vector<unsigned int>::iterator it = mVertcnt.begin(); it != mVertcnt.end(); ++inor) {
const unsigned int pcount = *it;
if (normals[inor].SquareLength() < 1e-10f) {
- it = vertcnt.erase(it);
- vit = verts.erase(vit, vit + pcount);
+ it = mVertcnt.erase(it);
+ vit = mVerts.erase(vit, vit + pcount);
drop = true;
continue;
@@ -191,24 +192,24 @@ void TempMesh::ComputePolygonNormals(std::vector<IfcVector3>& normals,
size_t ofs) const
{
size_t max_vcount = 0;
- std::vector<unsigned int>::const_iterator begin = vertcnt.begin()+ofs, end = vertcnt.end(), iit;
+ std::vector<unsigned int>::const_iterator begin = mVertcnt.begin()+ofs, end = mVertcnt.end(), iit;
for(iit = begin; iit != end; ++iit) {
max_vcount = std::max(max_vcount,static_cast<size_t>(*iit));
}
std::vector<IfcFloat> temp((max_vcount+2)*4);
- normals.reserve( normals.size() + vertcnt.size()-ofs );
+ normals.reserve( normals.size() + mVertcnt.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(vertcnt.begin(),begin,0);
+ size_t vidx = std::accumulate(mVertcnt.begin(),begin,0);
for(iit = begin; iit != end; vidx += *iit++) {
if (!*iit) {
normals.push_back(IfcVector3());
continue;
}
for(size_t vofs = 0, cnt = 0; vofs < *iit; ++vofs) {
- const IfcVector3& v = verts[vidx+vofs];
+ const IfcVector3& v = mVerts[vidx+vofs];
temp[cnt++] = v.x;
temp[cnt++] = v.y;
temp[cnt++] = v.z;
@@ -233,7 +234,7 @@ void TempMesh::ComputePolygonNormals(std::vector<IfcVector3>& normals,
// Compute the normal of the last polygon in the given mesh
IfcVector3 TempMesh::ComputeLastPolygonNormal(bool normalize) const
{
- return ComputePolygonNormal(&verts[verts.size() - vertcnt.back()], vertcnt.back(), normalize);
+ return ComputePolygonNormal(&mVerts[mVerts.size() - mVertcnt.back()], mVertcnt.back(), normalize);
}
struct CompareVector
@@ -258,27 +259,27 @@ void TempMesh::FixupFaceOrientation()
const IfcVector3 vavg = Center();
// create a list of start indices for all faces to allow random access to faces
- std::vector<size_t> faceStartIndices(vertcnt.size());
- for( size_t i = 0, a = 0; a < vertcnt.size(); i += vertcnt[a], ++a )
+ std::vector<size_t> faceStartIndices(mVertcnt.size());
+ for( size_t i = 0, a = 0; a < mVertcnt.size(); i += mVertcnt[a], ++a )
faceStartIndices[a] = i;
// list all faces on a vertex
std::map<IfcVector3, std::vector<size_t>, CompareVector> facesByVertex;
- for( size_t a = 0; a < vertcnt.size(); ++a )
+ for( size_t a = 0; a < mVertcnt.size(); ++a )
{
- for( size_t b = 0; b < vertcnt[a]; ++b )
- facesByVertex[verts[faceStartIndices[a] + b]].push_back(a);
+ for( size_t b = 0; b < mVertcnt[a]; ++b )
+ facesByVertex[mVerts[faceStartIndices[a] + b]].push_back(a);
}
// determine neighbourhood for all polys
- std::vector<size_t> neighbour(verts.size(), SIZE_MAX);
+ std::vector<size_t> neighbour(mVerts.size(), SIZE_MAX);
std::vector<size_t> tempIntersect(10);
- for( size_t a = 0; a < vertcnt.size(); ++a )
+ for( size_t a = 0; a < mVertcnt.size(); ++a )
{
- for( size_t b = 0; b < vertcnt[a]; ++b )
+ for( size_t b = 0; b < mVertcnt[a]; ++b )
{
- size_t ib = faceStartIndices[a] + b, nib = faceStartIndices[a] + (b + 1) % vertcnt[a];
- const std::vector<size_t>& facesOnB = facesByVertex[verts[ib]];
- const std::vector<size_t>& facesOnNB = facesByVertex[verts[nib]];
+ size_t ib = faceStartIndices[a] + b, nib = faceStartIndices[a] + (b + 1) % mVertcnt[a];
+ const std::vector<size_t>& facesOnB = facesByVertex[mVerts[ib]];
+ const std::vector<size_t>& facesOnNB = facesByVertex[mVerts[nib]];
// there should be exactly one or two faces which appear in both lists. Our face and the other side
std::vector<size_t>::iterator sectstart = tempIntersect.begin();
std::vector<size_t>::iterator sectend = std::set_intersection(
@@ -295,33 +296,33 @@ void TempMesh::FixupFaceOrientation()
// now we're getting started. We take the face which is the farthest away from the center. This face is most probably
// facing outwards. So we reverse this face to point outwards in relation to the center. Then we adapt neighbouring
// faces to have the same winding until all faces have been tested.
- std::vector<bool> faceDone(vertcnt.size(), false);
+ std::vector<bool> faceDone(mVertcnt.size(), false);
while( std::count(faceDone.begin(), faceDone.end(), false) != 0 )
{
// find the farthest of the remaining faces
size_t farthestIndex = SIZE_MAX;
IfcFloat farthestDistance = -1.0;
- for( size_t a = 0; a < vertcnt.size(); ++a )
+ for( size_t a = 0; a < mVertcnt.size(); ++a )
{
if( faceDone[a] )
continue;
- IfcVector3 faceCenter = std::accumulate(verts.begin() + faceStartIndices[a],
- verts.begin() + faceStartIndices[a] + vertcnt[a], IfcVector3(0.0)) / IfcFloat(vertcnt[a]);
+ IfcVector3 faceCenter = std::accumulate(mVerts.begin() + faceStartIndices[a],
+ mVerts.begin() + faceStartIndices[a] + mVertcnt[a], IfcVector3(0.0)) / IfcFloat(mVertcnt[a]);
IfcFloat dst = (faceCenter - vavg).SquareLength();
if( dst > farthestDistance ) { farthestDistance = dst; farthestIndex = a; }
}
// calculate its normal and reverse the poly if its facing towards the mesh center
- IfcVector3 farthestNormal = ComputePolygonNormal(verts.data() + faceStartIndices[farthestIndex], vertcnt[farthestIndex]);
- IfcVector3 farthestCenter = std::accumulate(verts.begin() + faceStartIndices[farthestIndex],
- verts.begin() + faceStartIndices[farthestIndex] + vertcnt[farthestIndex], IfcVector3(0.0))
- / IfcFloat(vertcnt[farthestIndex]);
- // We accapt a bit of negative orientation without reversing. In case of doubt, prefer the orientation given in
+ IfcVector3 farthestNormal = ComputePolygonNormal(mVerts.data() + faceStartIndices[farthestIndex], mVertcnt[farthestIndex]);
+ IfcVector3 farthestCenter = std::accumulate(mVerts.begin() + faceStartIndices[farthestIndex],
+ mVerts.begin() + faceStartIndices[farthestIndex] + mVertcnt[farthestIndex], IfcVector3(0.0))
+ / IfcFloat(mVertcnt[farthestIndex]);
+ // We accept a bit of negative orientation without reversing. In case of doubt, prefer the orientation given in
// the file.
if( (farthestNormal * (farthestCenter - vavg).Normalize()) < -0.4 )
{
- size_t fsi = faceStartIndices[farthestIndex], fvc = vertcnt[farthestIndex];
- std::reverse(verts.begin() + fsi, verts.begin() + fsi + fvc);
+ size_t fsi = faceStartIndices[farthestIndex], fvc = mVertcnt[farthestIndex];
+ std::reverse(mVerts.begin() + fsi, mVerts.begin() + fsi + fvc);
std::reverse(neighbour.begin() + fsi, neighbour.begin() + fsi + fvc);
// because of the neighbour index belonging to the edge starting with the point at the same index, we need to
// cycle the neighbours through to match the edges again.
@@ -339,7 +340,7 @@ void TempMesh::FixupFaceOrientation()
while( !todo.empty() )
{
size_t tdf = todo.back();
- size_t vsi = faceStartIndices[tdf], vc = vertcnt[tdf];
+ size_t vsi = faceStartIndices[tdf], vc = mVertcnt[tdf];
todo.pop_back();
// check its neighbours
@@ -350,19 +351,19 @@ void TempMesh::FixupFaceOrientation()
if( nbi == SIZE_MAX || faceDone[nbi] )
continue;
- const IfcVector3& vp = verts[vsi + a];
- size_t nbvsi = faceStartIndices[nbi], nbvc = vertcnt[nbi];
- std::vector<IfcVector3>::iterator it = std::find_if(verts.begin() + nbvsi, verts.begin() + nbvsi + nbvc, FindVector(vp));
- ai_assert(it != verts.begin() + nbvsi + nbvc);
- size_t nb_vidx = std::distance(verts.begin() + nbvsi, it);
+ const IfcVector3& vp = mVerts[vsi + a];
+ size_t nbvsi = faceStartIndices[nbi], nbvc = mVertcnt[nbi];
+ std::vector<IfcVector3>::iterator it = std::find_if(mVerts.begin() + nbvsi, mVerts.begin() + nbvsi + nbvc, FindVector(vp));
+ ai_assert(it != mVerts.begin() + nbvsi + nbvc);
+ size_t nb_vidx = std::distance(mVerts.begin() + nbvsi, it);
// two faces winded in the same direction should have a crossed edge, where one face has p0->p1 and the other
// has p1'->p0'. If the next point on the neighbouring face is also the next on the current face, we need
// to reverse the neighbour
nb_vidx = (nb_vidx + 1) % nbvc;
size_t oursideidx = (a + 1) % vc;
- if( FuzzyVectorCompare(1e-6)(verts[vsi + oursideidx], verts[nbvsi + nb_vidx]) )
+ if( FuzzyVectorCompare(1e-6)(mVerts[vsi + oursideidx], mVerts[nbvsi + nb_vidx]) )
{
- std::reverse(verts.begin() + nbvsi, verts.begin() + nbvsi + nbvc);
+ std::reverse(mVerts.begin() + nbvsi, mVerts.begin() + nbvsi + nbvc);
std::reverse(neighbour.begin() + nbvsi, neighbour.begin() + nbvsi + nbvc);
for( size_t a = 0; a < nbvc - 1; ++a )
std::swap(neighbour[nbvsi + a], neighbour[nbvsi + a + 1]);
@@ -379,12 +380,10 @@ void TempMesh::FixupFaceOrientation()
}
// ------------------------------------------------------------------------------------------------
-void TempMesh::RemoveAdjacentDuplicates()
-{
-
+void TempMesh::RemoveAdjacentDuplicates() {
bool drop = false;
- std::vector<IfcVector3>::iterator base = verts.begin();
- for(unsigned int& cnt : vertcnt) {
+ std::vector<IfcVector3>::iterator base = mVerts.begin();
+ for(unsigned int& cnt : mVertcnt) {
if (cnt < 2){
base += cnt;
continue;
@@ -425,13 +424,13 @@ void TempMesh::RemoveAdjacentDuplicates()
std::vector<IfcVector3>::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);
+ mVerts.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);
+ mVerts.erase(base+ --cnt);
drop = true;
}
@@ -447,12 +446,12 @@ void TempMesh::RemoveAdjacentDuplicates()
// ------------------------------------------------------------------------------------------------
void TempMesh::Swap(TempMesh& other)
{
- vertcnt.swap(other.vertcnt);
- verts.swap(other.verts);
+ mVertcnt.swap(other.mVertcnt);
+ mVerts.swap(other.mVerts);
}
// ------------------------------------------------------------------------------------------------
-bool IsTrue(const EXPRESS::BOOLEAN& in)
+bool IsTrue(const ::Assimp::STEP::EXPRESS::BOOLEAN& in)
{
return (std::string)in == "TRUE" || (std::string)in == "T";
}
@@ -515,7 +514,7 @@ IfcFloat ConvertSIPrefix(const std::string& prefix)
}
// ------------------------------------------------------------------------------------------------
-void ConvertColor(aiColor4D& out, const IfcColourRgb& in)
+void ConvertColor(aiColor4D& out, const Schema_2x3::IfcColourRgb& in)
{
out.r = static_cast<float>( in.Red );
out.g = static_cast<float>( in.Green );
@@ -524,9 +523,9 @@ void ConvertColor(aiColor4D& out, const IfcColourRgb& in)
}
// ------------------------------------------------------------------------------------------------
-void ConvertColor(aiColor4D& out, const IfcColourOrFactor& in,ConversionData& conv,const aiColor4D* base)
+void ConvertColor(aiColor4D& out, const Schema_2x3::IfcColourOrFactor& in,ConversionData& conv,const aiColor4D* base)
{
- if (const EXPRESS::REAL* const r = in.ToPtr<EXPRESS::REAL>()) {
+ if (const ::Assimp::STEP::EXPRESS::REAL* const r = in.ToPtr<::Assimp::STEP::EXPRESS::REAL>()) {
out.r = out.g = out.b = static_cast<float>(*r);
if(base) {
out.r *= static_cast<float>( base->r );
@@ -536,7 +535,7 @@ void ConvertColor(aiColor4D& out, const IfcColourOrFactor& in,ConversionData& co
}
else out.a = 1.0;
}
- else if (const IfcColourRgb* const rgb = in.ResolveSelectPtr<IfcColourRgb>(conv.db)) {
+ else if (const Schema_2x3::IfcColourRgb* const rgb = in.ResolveSelectPtr<Schema_2x3::IfcColourRgb>(conv.db)) {
ConvertColor(out,*rgb);
}
else {
@@ -545,7 +544,7 @@ void ConvertColor(aiColor4D& out, const IfcColourOrFactor& in,ConversionData& co
}
// ------------------------------------------------------------------------------------------------
-void ConvertCartesianPoint(IfcVector3& out, const IfcCartesianPoint& in)
+void ConvertCartesianPoint(IfcVector3& out, const Schema_2x3::IfcCartesianPoint& in)
{
out = IfcVector3();
for(size_t i = 0; i < in.Coordinates.size(); ++i) {
@@ -554,14 +553,14 @@ void ConvertCartesianPoint(IfcVector3& out, const IfcCartesianPoint& in)
}
// ------------------------------------------------------------------------------------------------
-void ConvertVector(IfcVector3& out, const IfcVector& in)
+void ConvertVector(IfcVector3& out, const Schema_2x3::IfcVector& in)
{
ConvertDirection(out,in.Orientation);
out *= in.Magnitude;
}
// ------------------------------------------------------------------------------------------------
-void ConvertDirection(IfcVector3& out, const IfcDirection& in)
+void ConvertDirection(IfcVector3& out, const Schema_2x3::IfcDirection& in)
{
out = IfcVector3();
for(size_t i = 0; i < in.DirectionRatios.size(); ++i) {
@@ -592,7 +591,7 @@ void AssignMatrixAxes(IfcMatrix4& out, const IfcVector3& x, const IfcVector3& y,
}
// ------------------------------------------------------------------------------------------------
-void ConvertAxisPlacement(IfcMatrix4& out, const IfcAxis2Placement3D& in)
+void ConvertAxisPlacement(IfcMatrix4& out, const Schema_2x3::IfcAxis2Placement3D& in)
{
IfcVector3 loc;
ConvertCartesianPoint(loc,in.Location);
@@ -617,7 +616,7 @@ void ConvertAxisPlacement(IfcMatrix4& out, const IfcAxis2Placement3D& in)
}
// ------------------------------------------------------------------------------------------------
-void ConvertAxisPlacement(IfcMatrix4& out, const IfcAxis2Placement2D& in)
+void ConvertAxisPlacement(IfcMatrix4& out, const Schema_2x3::IfcAxis2Placement2D& in)
{
IfcVector3 loc;
ConvertCartesianPoint(loc,in.Location);
@@ -634,7 +633,7 @@ void ConvertAxisPlacement(IfcMatrix4& out, const IfcAxis2Placement2D& in)
}
// ------------------------------------------------------------------------------------------------
-void ConvertAxisPlacement(IfcVector3& axis, IfcVector3& pos, const IfcAxis1Placement& in)
+void ConvertAxisPlacement(IfcVector3& axis, IfcVector3& pos, const Schema_2x3::IfcAxis1Placement& in)
{
ConvertCartesianPoint(pos,in.Location);
if (in.Axis) {
@@ -646,12 +645,12 @@ void ConvertAxisPlacement(IfcVector3& axis, IfcVector3& pos, const IfcAxis1Place
}
// ------------------------------------------------------------------------------------------------
-void ConvertAxisPlacement(IfcMatrix4& out, const IfcAxis2Placement& in, ConversionData& conv)
+void ConvertAxisPlacement(IfcMatrix4& out, const Schema_2x3::IfcAxis2Placement& in, ConversionData& conv)
{
- if(const IfcAxis2Placement3D* pl3 = in.ResolveSelectPtr<IfcAxis2Placement3D>(conv.db)) {
+ if(const Schema_2x3::IfcAxis2Placement3D* pl3 = in.ResolveSelectPtr<Schema_2x3::IfcAxis2Placement3D>(conv.db)) {
ConvertAxisPlacement(out,*pl3);
}
- else if(const IfcAxis2Placement2D* pl2 = in.ResolveSelectPtr<IfcAxis2Placement2D>(conv.db)) {
+ else if(const Schema_2x3::IfcAxis2Placement2D* pl2 = in.ResolveSelectPtr<Schema_2x3::IfcAxis2Placement2D>(conv.db)) {
ConvertAxisPlacement(out,*pl2);
}
else {
@@ -660,7 +659,7 @@ void ConvertAxisPlacement(IfcMatrix4& out, const IfcAxis2Placement& in, Conversi
}
// ------------------------------------------------------------------------------------------------
-void ConvertTransformOperator(IfcMatrix4& out, const IfcCartesianTransformationOperator& op)
+void ConvertTransformOperator(IfcMatrix4& out, const Schema_2x3::IfcCartesianTransformationOperator& op)
{
IfcVector3 loc;
ConvertCartesianPoint(loc,op.LocalOrigin);
@@ -672,7 +671,7 @@ void ConvertTransformOperator(IfcMatrix4& out, const IfcCartesianTransformationO
if (op.Axis2) {
ConvertDirection(y,*op.Axis2.Get());
}
- if (const IfcCartesianTransformationOperator3D* op2 = op.ToPtr<IfcCartesianTransformationOperator3D>()) {
+ if (const Schema_2x3::IfcCartesianTransformationOperator3D* op2 = op.ToPtr<Schema_2x3::IfcCartesianTransformationOperator3D>()) {
if(op2->Axis3) {
ConvertDirection(z,*op2->Axis3.Get());
}
@@ -684,7 +683,7 @@ void ConvertTransformOperator(IfcMatrix4& out, const IfcCartesianTransformationO
IfcVector3 vscale;
- if (const IfcCartesianTransformationOperator3DnonUniform* nuni = op.ToPtr<IfcCartesianTransformationOperator3DnonUniform>()) {
+ if (const Schema_2x3::IfcCartesianTransformationOperator3DnonUniform* nuni = op.ToPtr<Schema_2x3::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;
diff --git a/code/IFCUtil.h b/code/Importer/IFC/IFCUtil.h
index f90f421d6..194206d4b 100644
--- a/code/IFCUtil.h
+++ b/code/Importer/IFC/IFCUtil.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -46,9 +47,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef INCLUDED_IFCUTIL_H
#define INCLUDED_IFCUTIL_H
-#include "IFCReaderGen.h"
+#include "IFCReaderGen_2x3.h"
#include "IFCLoader.h"
-#include "STEPFile.h"
+#include "code/STEPFile.h"
#include <assimp/mesh.h>
#include <assimp/material.h>
@@ -71,8 +72,7 @@ namespace IFC {
// Helper for std::for_each to delete all heap-allocated items in a container
// ------------------------------------------------------------------------------------------------
template<typename T>
-struct delete_fun
-{
+struct delete_fun {
void operator()(T* del) {
delete del;
}
@@ -83,10 +83,9 @@ struct delete_fun
// ------------------------------------------------------------------------------------------------
// Helper used during mesh construction. Aids at creating aiMesh'es out of relatively few polygons.
// ------------------------------------------------------------------------------------------------
-struct TempMesh
-{
- std::vector<IfcVector3> verts;
- std::vector<unsigned int> vertcnt;
+struct TempMesh {
+ std::vector<IfcVector3> mVerts;
+ std::vector<unsigned int> mVertcnt;
// utilities
aiMesh* ToMesh();
@@ -94,30 +93,28 @@ struct TempMesh
void Transform(const IfcMatrix4& mat);
IfcVector3 Center() const;
void Append(const TempMesh& other);
-
- bool IsEmpty() const {
- return verts.empty() && vertcnt.empty();
- }
-
+ bool IsEmpty() const;
void RemoveAdjacentDuplicates();
void RemoveDegenerates();
-
void FixupFaceOrientation();
-
static IfcVector3 ComputePolygonNormal(const IfcVector3* vtcs, size_t cnt, bool normalize = true);
IfcVector3 ComputeLastPolygonNormal(bool normalize = true) const;
void ComputePolygonNormals(std::vector<IfcVector3>& normals, bool normalize = true, size_t ofs = 0) const;
-
void Swap(TempMesh& other);
};
+inline
+bool TempMesh::IsEmpty() const {
+ return mVerts.empty() && mVertcnt.empty();
+}
+
// ------------------------------------------------------------------------------------------------
// Temporary representation of an opening in a wall or a floor
// ------------------------------------------------------------------------------------------------
struct TempOpening
{
- const IFC::IfcSolidModel* solid;
+ const IFC::Schema_2x3::IfcSolidModel *solid;
IfcVector3 extrusionDir;
std::shared_ptr<TempMesh> profileMesh;
@@ -139,7 +136,7 @@ struct TempOpening
}
// ------------------------------------------------------------------------------
- TempOpening(const IFC::IfcSolidModel* solid,IfcVector3 extrusionDir,
+ TempOpening(const IFC::Schema_2x3::IfcSolidModel* solid,IfcVector3 extrusionDir,
std::shared_ptr<TempMesh> profileMesh,
std::shared_ptr<TempMesh> profileMesh2D)
: solid(solid)
@@ -174,7 +171,7 @@ struct TempOpening
// ------------------------------------------------------------------------------------------------
struct ConversionData
{
- ConversionData(const STEP::DB& db, const IFC::IfcProject& proj, aiScene* out,const IFCImporter::Settings& settings)
+ ConversionData(const STEP::DB& db, const IFC::Schema_2x3::IfcProject& proj, aiScene* out,const IFCImporter::Settings& settings)
: len_scale(1.0)
, angle_scale(-1.0)
, db(db)
@@ -194,7 +191,7 @@ struct ConversionData
bool plane_angle_in_radians;
const STEP::DB& db;
- const IFC::IfcProject& proj;
+ const IFC::Schema_2x3::IfcProject& proj;
aiScene* out;
IfcMatrix4 wcs;
@@ -202,16 +199,16 @@ struct ConversionData
std::vector<aiMaterial*> materials;
struct MeshCacheIndex {
- const IFC::IfcRepresentationItem* item; unsigned int matindex;
+ const IFC::Schema_2x3::IfcRepresentationItem* item; unsigned int matindex;
MeshCacheIndex() : item(NULL), matindex(0) { }
- MeshCacheIndex(const IFC::IfcRepresentationItem* i, unsigned int mi) : item(i), matindex(mi) { }
+ MeshCacheIndex(const IFC::Schema_2x3::IfcRepresentationItem* i, unsigned int mi) : item(i), matindex(mi) { }
bool operator == (const MeshCacheIndex& o) const { return item == o.item && matindex == o.matindex; }
bool operator < (const MeshCacheIndex& o) const { return item < o.item || (item == o.item && matindex < o.matindex); }
};
- typedef std::map<MeshCacheIndex, std::vector<unsigned int> > MeshCache;
+ typedef std::map<MeshCacheIndex, std::set<unsigned int> > MeshCache;
MeshCache cached_meshes;
- typedef std::map<const IFC::IfcSurfaceStyle*, unsigned int> MaterialCache;
+ typedef std::map<const IFC::Schema_2x3::IfcSurfaceStyle*, unsigned int> MaterialCache;
MaterialCache cached_materials;
const IFCImporter::Settings& settings;
@@ -260,50 +257,50 @@ struct XYSorter {
// 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(IfcVector3& out, const IfcCartesianPoint& in);
-void ConvertDirection(IfcVector3& out, const IfcDirection& in);
-void ConvertVector(IfcVector3& out, const IfcVector& in);
+void ConvertColor(aiColor4D& out, const Schema_2x3::IfcColourRgb& in);
+void ConvertColor(aiColor4D& out, const Schema_2x3::IfcColourOrFactor& in,ConversionData& conv,const aiColor4D* base);
+void ConvertCartesianPoint(IfcVector3& out, const Schema_2x3::IfcCartesianPoint& in);
+void ConvertDirection(IfcVector3& out, const Schema_2x3::IfcDirection& in);
+void ConvertVector(IfcVector3& out, const Schema_2x3::IfcVector& in);
void AssignMatrixAxes(IfcMatrix4& out, const IfcVector3& x, const IfcVector3& y, const IfcVector3& z);
-void ConvertAxisPlacement(IfcMatrix4& out, const IfcAxis2Placement3D& in);
-void ConvertAxisPlacement(IfcMatrix4& out, const IfcAxis2Placement2D& in);
-void ConvertAxisPlacement(IfcVector3& axis, IfcVector3& pos, const IFC::IfcAxis1Placement& in);
-void ConvertAxisPlacement(IfcMatrix4& out, const IfcAxis2Placement& in, ConversionData& conv);
-void ConvertTransformOperator(IfcMatrix4& out, const IfcCartesianTransformationOperator& op);
-bool IsTrue(const EXPRESS::BOOLEAN& in);
+void ConvertAxisPlacement(IfcMatrix4& out, const Schema_2x3::IfcAxis2Placement3D& in);
+void ConvertAxisPlacement(IfcMatrix4& out, const Schema_2x3::IfcAxis2Placement2D& in);
+void ConvertAxisPlacement(IfcVector3& axis, IfcVector3& pos, const IFC::Schema_2x3::IfcAxis1Placement& in);
+void ConvertAxisPlacement(IfcMatrix4& out, const Schema_2x3::IfcAxis2Placement& in, ConversionData& conv);
+void ConvertTransformOperator(IfcMatrix4& out, const Schema_2x3::IfcCartesianTransformationOperator& op);
+bool IsTrue(const Assimp::STEP::EXPRESS::BOOLEAN& in);
IfcFloat ConvertSIPrefix(const std::string& prefix);
// IFCProfile.cpp
-bool ProcessProfile(const IfcProfileDef& prof, TempMesh& meshout, ConversionData& conv);
-bool ProcessCurve(const IfcCurve& curve, TempMesh& meshout, ConversionData& conv);
+bool ProcessProfile(const Schema_2x3::IfcProfileDef& prof, TempMesh& meshout, ConversionData& conv);
+bool ProcessCurve(const Schema_2x3::IfcCurve& curve, TempMesh& meshout, ConversionData& conv);
// IFCMaterial.cpp
unsigned int ProcessMaterials(uint64_t id, unsigned int prevMatId, ConversionData& conv, bool forceDefaultMat);
// IFCGeometry.cpp
IfcMatrix3 DerivePlaneCoordinateSpace(const TempMesh& curmesh, bool& ok, IfcVector3& norOut);
-bool ProcessRepresentationItem(const IfcRepresentationItem& item, unsigned int matid, std::vector<unsigned int>& mesh_indices, ConversionData& conv);
-void AssignAddedMeshes(std::vector<unsigned int>& mesh_indices,aiNode* nd,ConversionData& /*conv*/);
+bool ProcessRepresentationItem(const Schema_2x3::IfcRepresentationItem& item, unsigned int matid, std::set<unsigned int>& mesh_indices, ConversionData& conv);
+void AssignAddedMeshes(std::set<unsigned int>& mesh_indices,aiNode* nd,ConversionData& /*conv*/);
-void ProcessSweptAreaSolid(const IfcSweptAreaSolid& swept, TempMesh& meshout,
+void ProcessSweptAreaSolid(const Schema_2x3::IfcSweptAreaSolid& swept, TempMesh& meshout,
ConversionData& conv);
-void ProcessExtrudedAreaSolid(const IfcExtrudedAreaSolid& solid, TempMesh& result,
+void ProcessExtrudedAreaSolid(const Schema_2x3::IfcExtrudedAreaSolid& solid, TempMesh& result,
ConversionData& conv, bool collect_openings);
// IFCBoolean.cpp
-void ProcessBoolean(const IfcBooleanResult& boolean, TempMesh& result, ConversionData& conv);
-void ProcessBooleanHalfSpaceDifference(const IfcHalfSpaceSolid* hs, TempMesh& result,
+void ProcessBoolean(const Schema_2x3::IfcBooleanResult& boolean, TempMesh& result, ConversionData& conv);
+void ProcessBooleanHalfSpaceDifference(const Schema_2x3::IfcHalfSpaceSolid* hs, TempMesh& result,
const TempMesh& first_operand,
ConversionData& conv);
-void ProcessPolygonalBoundedBooleanHalfSpaceDifference(const IfcPolygonalBoundedHalfSpace* hs, TempMesh& result,
+void ProcessPolygonalBoundedBooleanHalfSpaceDifference(const Schema_2x3::IfcPolygonalBoundedHalfSpace* hs, TempMesh& result,
const TempMesh& first_operand,
ConversionData& conv);
-void ProcessBooleanExtrudedAreaSolidDifference(const IfcExtrudedAreaSolid* as, TempMesh& result,
+void ProcessBooleanExtrudedAreaSolidDifference(const Schema_2x3::IfcExtrudedAreaSolid* as, TempMesh& result,
const TempMesh& first_operand,
ConversionData& conv);
@@ -324,38 +321,31 @@ bool GenerateOpenings(std::vector<TempOpening>& openings,
// ------------------------------------------------------------------------------------------------
// Custom exception for use by members of the Curve class
// ------------------------------------------------------------------------------------------------
-class CurveError
-{
+class CurveError {
public:
CurveError(const std::string& s)
- : s(s)
- {
+ : mStr(s) {
+ // empty
}
- std::string s;
+ std::string mStr;
};
-
// ------------------------------------------------------------------------------------------------
// Temporary representation for an arbitrary sub-class of IfcCurve. Used to sample the curves
// to obtain a list of line segments.
// ------------------------------------------------------------------------------------------------
-class Curve
-{
+class Curve {
protected:
-
- Curve(const IfcCurve& base_entity, ConversionData& conv)
- : base_entity(base_entity)
- , conv(conv)
- {}
+ Curve(const Schema_2x3::IfcCurve& base_entity, ConversionData& conv)
+ : base_entity(base_entity)
+ , conv(conv) {
+ // empty
+ }
public:
-
typedef std::pair<IfcFloat, IfcFloat> ParamRange;
-public:
-
-
virtual ~Curve() {}
@@ -386,14 +376,10 @@ public:
// check if a particular parameter value lies within the well-defined range
bool InRange(IfcFloat) const;
#endif
-
-public:
-
- static Curve* Convert(const IFC::IfcCurve&,ConversionData& conv);
+ static Curve* Convert(const IFC::Schema_2x3::IfcCurve&,ConversionData& conv);
protected:
-
- const IfcCurve& base_entity;
+ const Schema_2x3::IfcCurve& base_entity;
ConversionData& conv;
};
@@ -402,11 +388,9 @@ protected:
// A BoundedCurve always holds the invariant that GetParametricRange()
// never returns infinite values.
// --------------------------------------------------------------------------------
-class BoundedCurve : public Curve
-{
+class BoundedCurve : public Curve {
public:
-
- BoundedCurve(const IfcBoundedCurve& entity, ConversionData& conv)
+ BoundedCurve(const Schema_2x3::IfcBoundedCurve& entity, ConversionData& conv)
: Curve(entity,conv)
{}
@@ -422,7 +406,7 @@ public:
};
// IfcProfile.cpp
-bool ProcessCurve(const IfcCurve& curve, TempMesh& meshout, ConversionData& conv);
+bool ProcessCurve(const Schema_2x3::IfcCurve& curve, TempMesh& meshout, ConversionData& conv);
}
}
diff --git a/code/STEPFileEncoding.cpp b/code/Importer/STEPParser/STEPFileEncoding.cpp
index f9a9dd1ce..70d5f4e4b 100644
--- a/code/STEPFileEncoding.cpp
+++ b/code/Importer/STEPParser/STEPFileEncoding.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -43,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* @brief STEP character handling, string un-escaping
*/
#include "STEPFileEncoding.h"
-#include "fast_atof.h"
+#include <assimp/fast_atof.h>
#include <contrib/utf8cpp/source/utf8.h>
#include <memory>
@@ -334,7 +335,7 @@ bool STEP::StringToUTF8(std::string& s)
size_t j = basei, jend = s.size()-3;
for (; j < jend; ++j) {
- if (s[j] == '\\' && s[j] == 'X' && s[j] == '0' && s[j] == '\\') {
+ if (s[j] == '\\' && s[j+1] == 'X' && s[j+2] == '0' && s[j+3] == '\\') {
break;
}
}
diff --git a/code/STEPFileEncoding.h b/code/Importer/STEPParser/STEPFileEncoding.h
index 56615c8f6..232cb81ba 100644
--- a/code/STEPFileEncoding.h
+++ b/code/Importer/STEPParser/STEPFileEncoding.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/STEPFileReader.cpp b/code/Importer/STEPParser/STEPFileReader.cpp
index d014c1a5d..c7cad05ae 100644
--- a/code/STEPFileReader.cpp
+++ b/code/Importer/STEPParser/STEPFileReader.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -46,8 +47,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "STEPFileReader.h"
#include "STEPFileEncoding.h"
-#include "TinyFormatter.h"
-#include "fast_atof.h"
+#include <assimp/TinyFormatter.h>
+#include <assimp/fast_atof.h>
#include <memory>
@@ -84,16 +85,16 @@ STEP::TypeError::TypeError (const std::string& s,uint64_t entity /* = ENTITY_NOT
}
-
+static const char *ISO_Token = "ISO-10303-21;";
+static const char *FILE_SCHEMA_Token = "FILE_SCHEMA";
// ------------------------------------------------------------------------------------------------
-STEP::DB* STEP::ReadFileHeader(std::shared_ptr<IOStream> stream)
-{
+STEP::DB* STEP::ReadFileHeader(std::shared_ptr<IOStream> stream) {
std::shared_ptr<StreamReaderLE> reader = std::shared_ptr<StreamReaderLE>(new StreamReaderLE(stream));
std::unique_ptr<STEP::DB> db = std::unique_ptr<STEP::DB>(new STEP::DB(reader));
- LineSplitter& splitter = db->GetSplitter();
- if (!splitter || *splitter != "ISO-10303-21;") {
- throw STEP::SyntaxError("expected magic token: ISO-10303-21",1);
+ LineSplitter &splitter = db->GetSplitter();
+ if (!splitter || *splitter != ISO_Token ) {
+ throw STEP::SyntaxError("expected magic token: " + std::string( ISO_Token ), 1);
}
HeaderInfo& head = db->GetHeader();
@@ -108,7 +109,7 @@ STEP::DB* STEP::ReadFileHeader(std::shared_ptr<IOStream> stream)
// want one-based line numbers for human readers, so +1
const uint64_t line = splitter.get_index()+1;
- if (s.substr(0,11) == "FILE_SCHEMA") {
+ if (s.substr(0,11) == FILE_SCHEMA_Token) {
const char* sz = s.c_str()+11;
SkipSpaces(sz,&sz);
std::shared_ptr< const EXPRESS::DataType > schema = EXPRESS::DataType::Parse(sz);
@@ -125,7 +126,7 @@ STEP::DB* STEP::ReadFileHeader(std::shared_ptr<IOStream> stream)
// XXX need support for multiple schemas?
if (list->GetSize() > 1) {
- DefaultLogger::get()->warn(AddLineNumber("multiple schemas currently not supported",line));
+ ASSIMP_LOG_WARN(AddLineNumber("multiple schemas currently not supported",line));
}
const EXPRESS::STRING* string( nullptr );
if (!list->GetSize() || !(string=dynamic_cast<const EXPRESS::STRING*>( (*list)[0].get() ))) {
@@ -191,7 +192,7 @@ void STEP::ReadFile(DB& db,const EXPRESS::ConversionSchema& scheme,
// LineSplitter already ignores empty lines
ai_assert(s.length());
if (s[0] != '#') {
- DefaultLogger::get()->warn(AddLineNumber("expected token \'#\'",line));
+ ASSIMP_LOG_WARN(AddLineNumber("expected token \'#\'",line));
++splitter;
continue;
}
@@ -201,14 +202,14 @@ void STEP::ReadFile(DB& db,const EXPRESS::ConversionSchema& scheme,
// ---
const std::string::size_type n0 = s.find_first_of('=');
if (n0 == std::string::npos) {
- DefaultLogger::get()->warn(AddLineNumber("expected token \'=\'",line));
+ ASSIMP_LOG_WARN(AddLineNumber("expected token \'=\'",line));
++splitter;
continue;
}
const uint64_t id = strtoul10_64(s.substr(1,n0-1).c_str());
if (!id) {
- DefaultLogger::get()->warn(AddLineNumber("expected positive, numeric entity id",line));
+ ASSIMP_LOG_WARN(AddLineNumber("expected positive, numeric entity id",line));
++splitter;
continue;
}
@@ -235,7 +236,7 @@ void STEP::ReadFile(DB& db,const EXPRESS::ConversionSchema& scheme,
}
if(!ok) {
- DefaultLogger::get()->warn(AddLineNumber("expected token \'(\'",line));
+ ASSIMP_LOG_WARN(AddLineNumber("expected token \'(\'",line));
continue;
}
}
@@ -262,13 +263,13 @@ void STEP::ReadFile(DB& db,const EXPRESS::ConversionSchema& scheme,
}
}
if(!ok) {
- DefaultLogger::get()->warn(AddLineNumber("expected token \')\'",line));
+ ASSIMP_LOG_WARN(AddLineNumber("expected token \')\'",line));
continue;
}
}
if (map.find(id) != map.end()) {
- DefaultLogger::get()->warn(AddLineNumber((Formatter::format(),"an object with the id #",id," already exists"),line));
+ ASSIMP_LOG_WARN(AddLineNumber((Formatter::format(),"an object with the id #",id," already exists"),line));
}
std::string::size_type ns = n0;
@@ -291,11 +292,11 @@ void STEP::ReadFile(DB& db,const EXPRESS::ConversionSchema& scheme,
}
if (!splitter) {
- DefaultLogger::get()->warn("STEP: ignoring unexpected EOF");
+ ASSIMP_LOG_WARN("STEP: ignoring unexpected EOF");
}
if ( !DefaultLogger::isNullLogger()){
- DefaultLogger::get()->debug((Formatter::format(),"STEP: got ",map.size()," object records with ",
+ ASSIMP_LOG_DEBUG((Formatter::format(),"STEP: got ",map.size()," object records with ",
db.GetRefs().size()," inverse index entries"));
}
}
@@ -391,7 +392,7 @@ std::shared_ptr<const EXPRESS::DataType> EXPRESS::DataType::Parse(const char*& i
std::string stemp = std::string(start, static_cast<size_t>(cur - start));
if(!StringToUTF8(stemp)) {
// TODO: route this to a correct logger with line numbers etc., better error messages
- DefaultLogger::get()->error("an error occurred reading escape sequences in ASCII text");
+ ASSIMP_LOG_ERROR("an error occurred reading escape sequences in ASCII text");
}
return std::make_shared<EXPRESS::STRING>(stemp);
@@ -491,10 +492,17 @@ STEP::LazyObject::LazyObject(DB& db, uint64_t id,uint64_t /*line*/, const char*
--skip_depth;
}
- if (skip_depth >= 1 && *a=='#') {
- const char* tmp;
- const int64_t num = static_cast<int64_t>( strtoul10_64(a+1,&tmp) );
- db.MarkRef(num,id);
+ if (skip_depth >= 1 && *a=='#') {
+ if (*(a + 1) != '#')
+ {
+ const char* tmp;
+ const int64_t num = static_cast<int64_t>(strtoul10_64(a + 1, &tmp));
+ db.MarkRef(num, id);
+ }
+ else
+ {
+ ++a;
+ }
}
++a;
}
@@ -541,4 +549,3 @@ void STEP::LazyObject::LazyInit() const
// store the original id in the object instance
obj->SetID(id);
}
-
diff --git a/code/STEPFileReader.h b/code/Importer/STEPParser/STEPFileReader.h
index fb8c86f59..667d28bfd 100644
--- a/code/STEPFileReader.h
+++ b/code/Importer/STEPParser/STEPFileReader.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -42,23 +43,28 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef INCLUDED_AI_STEPFILEREADER_H
#define INCLUDED_AI_STEPFILEREADER_H
-#include "STEPFile.h"
+#include "code/STEPFile.h"
namespace Assimp {
namespace STEP {
- // ### Parsing a STEP file is a twofold procedure ###
- // --------------------------------------------------------------------------
- // 1) read file header and return to caller, who checks if the
- // file is of a supported schema ..
- DB* ReadFileHeader(std::shared_ptr<IOStream> stream);
- // --------------------------------------------------------------------------
- // 2) read the actual file contents using a user-supplied set of
- // conversion functions to interpret the data.
- void ReadFile(DB& db,const EXPRESS::ConversionSchema& scheme, const char* const* types_to_track, size_t len, const char* const* inverse_indices_to_track, size_t len2);
- template <size_t N, size_t N2> inline void ReadFile(DB& db,const EXPRESS::ConversionSchema& scheme, const char* const (&arr)[N], const char* const (&arr2)[N2]) {
- return ReadFile(db,scheme,arr,N,arr2,N2);
- }
+// --------------------------------------------------------------------------
+/// @brief Parsing a STEP file is a twofold procedure.
+/// 1) read file header and return to caller, who checks if the
+/// file is of a supported schema ..
+DB* ReadFileHeader(std::shared_ptr<IOStream> stream);
+
+/// 2) read the actual file contents using a user-supplied set of
+/// conversion functions to interpret the data.
+void ReadFile(DB& db,const EXPRESS::ConversionSchema& scheme, const char* const* types_to_track, size_t len, const char* const* inverse_indices_to_track, size_t len2);
+
+/// @brief Helper to read a file.
+template <size_t N, size_t N2>
+inline
+void ReadFile(DB& db,const EXPRESS::ConversionSchema& scheme, const char* const (&arr)[N], const char* const (&arr2)[N2]) {
+ return ReadFile(db,scheme,arr,N,arr2,N2);
+}
+
} // ! STEP
} // ! Assimp
diff --git a/code/Importer/StepFile/StepFileGen1.cpp b/code/Importer/StepFile/StepFileGen1.cpp
new file mode 100644
index 000000000..50c54818e
--- /dev/null
+++ b/code/Importer/StepFile/StepFileGen1.cpp
@@ -0,0 +1,2195 @@
+/*
+Open Asset Import Library (ASSIMP)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2018, 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 ASSIMP_BUILD_NO_STEP_IMPORTER
+
+#include "code/Importer/StepFile/StepReaderGen.h"
+
+namespace Assimp {
+using namespace StepFile;
+
+namespace {
+
+ typedef EXPRESS::ConversionSchema::SchemaEntry SchemaEntry;
+
+ const SchemaEntry schema_raw[] = {
+ SchemaEntry("absorbed_dose_measure",NULL )
+, SchemaEntry("acceleration_measure",NULL )
+, SchemaEntry("action_items",NULL )
+, SchemaEntry("action_method_items",NULL )
+, SchemaEntry("action_request_item",NULL )
+, SchemaEntry("ahead_or_behind",NULL )
+, SchemaEntry("amount_of_substance_measure",NULL )
+, SchemaEntry("angle_direction_reference_select",NULL )
+, SchemaEntry("angle_direction_reference_with_a2p3d_select",NULL )
+, SchemaEntry("angle_relator",NULL )
+, SchemaEntry("annotation_plane_element",NULL )
+, SchemaEntry("annotation_representation_select",NULL )
+, SchemaEntry("annotation_symbol_occurrence_item",NULL )
+, SchemaEntry("annotation_text_occurrence_item",NULL )
+, SchemaEntry("approval_item",NULL )
+, SchemaEntry("approved_item",NULL )
+, SchemaEntry("area_measure",NULL )
+, SchemaEntry("area_or_view",NULL )
+, SchemaEntry("attribute_classification_item",NULL )
+, SchemaEntry("attribute_language_item",NULL )
+, SchemaEntry("attribute_type",NULL )
+, SchemaEntry("axis2_placement",NULL )
+, SchemaEntry("b_spline_curve_form",NULL )
+, SchemaEntry("b_spline_surface_form",NULL )
+, SchemaEntry("base_solid_select",NULL )
+, SchemaEntry("blend_end_condition_select",NULL )
+, SchemaEntry("blend_radius_variation_type",NULL )
+, SchemaEntry("boolean_operand",NULL )
+, SchemaEntry("boolean_operator",NULL )
+, SchemaEntry("box_characteristic_select",NULL )
+, SchemaEntry("box_height",NULL )
+, SchemaEntry("box_rotate_angle",NULL )
+, SchemaEntry("box_slant_angle",NULL )
+, SchemaEntry("box_width",NULL )
+, SchemaEntry("camera_model_d3_multi_clipping_interection_select",NULL )
+, SchemaEntry("camera_model_d3_multi_clipping_union_select",NULL )
+, SchemaEntry("capacitance_measure",NULL )
+, SchemaEntry("category_usage_item",NULL )
+, SchemaEntry("cc_classified_item",NULL )
+, SchemaEntry("cc_person_organization_item",NULL )
+, SchemaEntry("cc_specified_item",NULL )
+, SchemaEntry("celsius_temperature_measure",NULL )
+, SchemaEntry("central_or_parallel",NULL )
+, SchemaEntry("certification_item",NULL )
+, SchemaEntry("certified_item",NULL )
+, SchemaEntry("change_request_item",NULL )
+, SchemaEntry("character_spacing_select",NULL )
+, SchemaEntry("character_style_select",NULL )
+, SchemaEntry("characterized_action_definition",NULL )
+, SchemaEntry("characterized_definition",NULL )
+, SchemaEntry("characterized_material_property",NULL )
+, SchemaEntry("characterized_product_composition_value",NULL )
+, SchemaEntry("characterized_product_definition",NULL )
+, SchemaEntry("class_usage_effectivity_context_item",NULL )
+, SchemaEntry("classification_item",NULL )
+, SchemaEntry("classified_item",NULL )
+, SchemaEntry("compound_item_definition",NULL )
+, SchemaEntry("conductance_measure",NULL )
+, SchemaEntry("configuration_design_item",NULL )
+, SchemaEntry("configured_effectivity_context_item",NULL )
+, SchemaEntry("configured_effectivity_item",NULL )
+, SchemaEntry("constructive_geometry_representation_or_shape_represenation",NULL )
+, SchemaEntry("context_dependent_measure",NULL )
+, SchemaEntry("contract_item",NULL )
+, SchemaEntry("contracted_item",NULL )
+, SchemaEntry("count_measure",NULL )
+, SchemaEntry("csg_primitive",NULL )
+, SchemaEntry("csg_select",NULL )
+, SchemaEntry("curve_font_or_scaled_curve_font_select",NULL )
+, SchemaEntry("curve_on_surface",NULL )
+, SchemaEntry("curve_or_annotation_curve_occurrence",NULL )
+, SchemaEntry("curve_or_render",NULL )
+, SchemaEntry("curve_style_font_select",NULL )
+, SchemaEntry("date_and_time_item",NULL )
+, SchemaEntry("date_item",NULL )
+, SchemaEntry("date_time_item",NULL )
+, SchemaEntry("date_time_or_event_occurrence",NULL )
+, SchemaEntry("date_time_select",NULL )
+, SchemaEntry("day_in_month_number",NULL )
+, SchemaEntry("day_in_week_number",NULL )
+, SchemaEntry("day_in_year_number",NULL )
+, SchemaEntry("defined_symbol_select",NULL )
+, SchemaEntry("derived_property_select",NULL )
+, SchemaEntry("description_attribute_select",NULL )
+, SchemaEntry("descriptive_measure",NULL )
+, SchemaEntry("dimension_count",NULL )
+, SchemaEntry("dimension_extent_usage",NULL )
+, SchemaEntry("dimensional_characteristic",NULL )
+, SchemaEntry("direction_count_select",NULL )
+, SchemaEntry("document_identifier_assigned_item",NULL )
+, SchemaEntry("document_reference_item",NULL )
+, SchemaEntry("dose_equivalent_measure",NULL )
+, SchemaEntry("draughting_callout_element",NULL )
+, SchemaEntry("draughting_model_item_association_select",NULL )
+, SchemaEntry("draughting_model_item_select",NULL )
+, SchemaEntry("draughting_titled_item",NULL )
+, SchemaEntry("effectivity_item",NULL )
+, SchemaEntry("electric_charge_measure",NULL )
+, SchemaEntry("electric_current_measure",NULL )
+, SchemaEntry("electric_potential_measure",NULL )
+, SchemaEntry("energy_measure",NULL )
+, SchemaEntry("event_occurrence_item",NULL )
+, SchemaEntry("external_identification_item",NULL )
+, SchemaEntry("fill_area_style_tile_shape_select",NULL )
+, SchemaEntry("fill_style_select",NULL )
+, SchemaEntry("font_select",NULL )
+, SchemaEntry("force_measure",NULL )
+, SchemaEntry("founded_item_select",NULL )
+, SchemaEntry("frequency_measure",NULL )
+, SchemaEntry("generalized_surface_select",NULL )
+, SchemaEntry("geometric_item_specific_usage_select",NULL )
+, SchemaEntry("geometric_set_select",NULL )
+, SchemaEntry("groupable_item",NULL )
+, SchemaEntry("hour_in_day",NULL )
+, SchemaEntry("id_attribute_select",NULL )
+, SchemaEntry("identification_item",NULL )
+, SchemaEntry("identifier",NULL )
+, SchemaEntry("illuminance_measure",NULL )
+, SchemaEntry("inductance_measure",NULL )
+, SchemaEntry("instance_usage_context_select",NULL )
+, SchemaEntry("invisibility_context",NULL )
+, SchemaEntry("invisible_item",NULL )
+, SchemaEntry("ir_usage_item",NULL )
+, SchemaEntry("knot_type",NULL )
+, SchemaEntry("label",NULL )
+, SchemaEntry("layered_item",NULL )
+, SchemaEntry("length_measure",NULL )
+, SchemaEntry("limit_condition",NULL )
+, SchemaEntry("list_of_reversible_topology_item",NULL )
+, SchemaEntry("list_representation_item",NULL )
+, SchemaEntry("luminous_flux_measure",NULL )
+, SchemaEntry("luminous_intensity_measure",NULL )
+, SchemaEntry("magnetic_flux_density_measure",NULL )
+, SchemaEntry("magnetic_flux_measure",NULL )
+, SchemaEntry("marker_select",NULL )
+, SchemaEntry("marker_type",NULL )
+, SchemaEntry("mass_measure",NULL )
+, SchemaEntry("measure_value",NULL )
+, SchemaEntry("mechanical_design_and_draughting_relationship_select",NULL )
+, SchemaEntry("mechanical_design_geometric_presentation_area_items",NULL )
+, SchemaEntry("mechanical_design_geometric_presentation_representation_items",NULL )
+, SchemaEntry("message",NULL )
+, SchemaEntry("minute_in_hour",NULL )
+, SchemaEntry("month_in_year_number",NULL )
+, SchemaEntry("multi_language_attribute_item",NULL )
+, SchemaEntry("name_attribute_select",NULL )
+, SchemaEntry("name_item",NULL )
+, SchemaEntry("non_negative_length_measure",NULL )
+, SchemaEntry("nonnegative_integer",NULL )
+, SchemaEntry("null_style",NULL )
+, SchemaEntry("numeric_measure",NULL )
+, SchemaEntry("organization_item",NULL )
+, SchemaEntry("orientation_basis_select",NULL )
+, SchemaEntry("parameter_value",NULL )
+, SchemaEntry("pcurve_or_surface",NULL )
+, SchemaEntry("person_and_organization_item",NULL )
+, SchemaEntry("person_organization_select",NULL )
+, SchemaEntry("picture_representation_item_select",NULL )
+, SchemaEntry("plane_angle_measure",NULL )
+, SchemaEntry("plane_or_planar_box",NULL )
+, SchemaEntry("point_and_vector_member",NULL )
+, SchemaEntry("point_and_vector_members",NULL )
+, SchemaEntry("point_path_members",NULL )
+, SchemaEntry("positive_integer",NULL )
+, SchemaEntry("positive_length_measure",NULL )
+, SchemaEntry("positive_plane_angle_measure",NULL )
+, SchemaEntry("positive_ratio_measure",NULL )
+, SchemaEntry("power_measure",NULL )
+, SchemaEntry("preferred_surface_curve_representation",NULL )
+, SchemaEntry("presentable_text",NULL )
+, SchemaEntry("presentation_representation_select",NULL )
+, SchemaEntry("presentation_size_assignment_select",NULL )
+, SchemaEntry("presentation_style_select",NULL )
+, SchemaEntry("presented_item_select",NULL )
+, SchemaEntry("pressure_measure",NULL )
+, SchemaEntry("product_definition_or_assembly_relationship",NULL )
+, SchemaEntry("product_definition_or_breakdown_element_usage",NULL )
+, SchemaEntry("product_definition_or_product_definition_relationship",NULL )
+, SchemaEntry("product_or_formation_or_definition",NULL )
+, SchemaEntry("project_item",NULL )
+, SchemaEntry("radioactivity_measure",NULL )
+, SchemaEntry("ratio_measure",NULL )
+, SchemaEntry("rendering_properties_select",NULL )
+, SchemaEntry("represented_definition",NULL )
+, SchemaEntry("requirement_assigned_item",NULL )
+, SchemaEntry("requirement_satisfaction_item",NULL )
+, SchemaEntry("requirement_source_item",NULL )
+, SchemaEntry("resistance_measure",NULL )
+, SchemaEntry("reversible_topology",NULL )
+, SchemaEntry("reversible_topology_item",NULL )
+, SchemaEntry("role_select",NULL )
+, SchemaEntry("rule_superseded_item",NULL )
+, SchemaEntry("second_in_minute",NULL )
+, SchemaEntry("security_classification_item",NULL )
+, SchemaEntry("set_of_reversible_topology_item",NULL )
+, SchemaEntry("set_representation_item",NULL )
+, SchemaEntry("shading_curve_method",NULL )
+, SchemaEntry("shading_surface_method",NULL )
+, SchemaEntry("shape_definition",NULL )
+, SchemaEntry("shell",NULL )
+, SchemaEntry("si_prefix",NULL )
+, SchemaEntry("si_unit_name",NULL )
+, SchemaEntry("size_select",NULL )
+, SchemaEntry("sketch_basis_select",NULL )
+, SchemaEntry("solid_angle_measure",NULL )
+, SchemaEntry("source",NULL )
+, SchemaEntry("source_item",NULL )
+, SchemaEntry("start_request_item",NULL )
+, SchemaEntry("string_representation_item_select",NULL )
+, SchemaEntry("style_context_select",NULL )
+, SchemaEntry("surface_side",NULL )
+, SchemaEntry("surface_side_style_select",NULL )
+, SchemaEntry("surface_style_element_select",NULL )
+, SchemaEntry("symbol_style_select",NULL )
+, SchemaEntry("text",NULL )
+, SchemaEntry("text_alignment",NULL )
+, SchemaEntry("text_delineation",NULL )
+, SchemaEntry("text_or_character",NULL )
+, SchemaEntry("text_path",NULL )
+, SchemaEntry("text_string_representation_item",NULL )
+, SchemaEntry("thermodynamic_temperature_measure",NULL )
+, SchemaEntry("time_interval_item",NULL )
+, SchemaEntry("time_measure",NULL )
+, SchemaEntry("tolerance_method_definition",NULL )
+, SchemaEntry("transformation",NULL )
+, SchemaEntry("transition_code",NULL )
+, SchemaEntry("trim_condition_select",NULL )
+, SchemaEntry("trim_intent",NULL )
+, SchemaEntry("trimming_preference",NULL )
+, SchemaEntry("trimming_select",NULL )
+, SchemaEntry("u_direction_count",NULL )
+, SchemaEntry("unit",NULL )
+, SchemaEntry("v_direction_count",NULL )
+, SchemaEntry("value_qualifier",NULL )
+, SchemaEntry("vector_or_direction",NULL )
+, SchemaEntry("velocity_measure",NULL )
+, SchemaEntry("volume_measure",NULL )
+, SchemaEntry("week_in_year_number",NULL )
+, SchemaEntry("work_item",NULL )
+, SchemaEntry("year_number",NULL )
+, SchemaEntry("measure_with_unit",&STEP::ObjectHelper<measure_with_unit,2>::Construct )
+, SchemaEntry("absorbed_dose_measure_with_unit",&STEP::ObjectHelper<absorbed_dose_measure_with_unit,0>::Construct )
+, SchemaEntry("derived_unit",&STEP::ObjectHelper<derived_unit,1>::Construct )
+, SchemaEntry("absorbed_dose_unit",&STEP::ObjectHelper<absorbed_dose_unit,0>::Construct )
+, SchemaEntry("abstract_variable",&STEP::ObjectHelper<abstract_variable,0>::Construct )
+, SchemaEntry("acceleration_measure_with_unit",&STEP::ObjectHelper<acceleration_measure_with_unit,0>::Construct )
+, SchemaEntry("acceleration_unit",&STEP::ObjectHelper<acceleration_unit,0>::Construct )
+, SchemaEntry("action",&STEP::ObjectHelper<action,3>::Construct )
+, SchemaEntry("action_assignment",&STEP::ObjectHelper<action_assignment,1>::Construct )
+, SchemaEntry("action_directive",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("action_method",&STEP::ObjectHelper<action_method,4>::Construct )
+, SchemaEntry("action_method_assignment",&STEP::ObjectHelper<action_method_assignment,2>::Construct )
+, SchemaEntry("action_method_relationship",&STEP::ObjectHelper<action_method_relationship,4>::Construct )
+, SchemaEntry("action_method_role",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("action_property",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("action_property_representation",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("action_relationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("action_request_assignment",&STEP::ObjectHelper<action_request_assignment,1>::Construct )
+, SchemaEntry("action_request_solution",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("action_request_status",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("action_status",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("address",&STEP::ObjectHelper<address,12>::Construct )
+, SchemaEntry("representation",&STEP::ObjectHelper<representation,3>::Construct )
+, SchemaEntry("shape_representation",&STEP::ObjectHelper<shape_representation,0>::Construct )
+, SchemaEntry("advanced_brep_shape_representation",&STEP::ObjectHelper<advanced_brep_shape_representation,0>::Construct )
+, SchemaEntry("face_surface",&STEP::ObjectHelper<face_surface,2>::Construct )
+, SchemaEntry("advanced_face",&STEP::ObjectHelper<advanced_face,0>::Construct )
+, SchemaEntry("alternate_product_relationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("amount_of_substance_measure_with_unit",&STEP::ObjectHelper<amount_of_substance_measure_with_unit,0>::Construct )
+, SchemaEntry("named_unit",&STEP::ObjectHelper<named_unit,1>::Construct )
+, SchemaEntry("amount_of_substance_unit",&STEP::ObjectHelper<amount_of_substance_unit,0>::Construct )
+, SchemaEntry("angle_direction_reference",&STEP::ObjectHelper<angle_direction_reference,0>::Construct )
+, SchemaEntry("representation_item",&STEP::ObjectHelper<representation_item,1>::Construct )
+, SchemaEntry("geometric_representation_item",&STEP::ObjectHelper<geometric_representation_item,0>::Construct )
+, SchemaEntry("draughting_callout",&STEP::ObjectHelper<draughting_callout,1>::Construct )
+, SchemaEntry("dimension_curve_directed_callout",&STEP::ObjectHelper<dimension_curve_directed_callout,0>::Construct )
+, SchemaEntry("angular_dimension",&STEP::ObjectHelper<angular_dimension,0>::Construct )
+, SchemaEntry("shape_aspect_relationship",&STEP::ObjectHelper<shape_aspect_relationship,4>::Construct )
+, SchemaEntry("dimensional_location",&STEP::ObjectHelper<dimensional_location,0>::Construct )
+, SchemaEntry("angular_location",&STEP::ObjectHelper<angular_location,1>::Construct )
+, SchemaEntry("dimensional_size",&STEP::ObjectHelper<dimensional_size,2>::Construct )
+, SchemaEntry("angular_size",&STEP::ObjectHelper<angular_size,1>::Construct )
+, SchemaEntry("geometric_tolerance",&STEP::ObjectHelper<geometric_tolerance,4>::Construct )
+, SchemaEntry("geometric_tolerance_with_datum_reference",&STEP::ObjectHelper<geometric_tolerance_with_datum_reference,1>::Construct )
+, SchemaEntry("angularity_tolerance",&STEP::ObjectHelper<angularity_tolerance,0>::Construct )
+, SchemaEntry("styled_item",&STEP::ObjectHelper<styled_item,2>::Construct )
+, SchemaEntry("annotation_occurrence",&STEP::ObjectHelper<annotation_occurrence,0>::Construct )
+, SchemaEntry("annotation_curve_occurrence",&STEP::ObjectHelper<annotation_curve_occurrence,0>::Construct )
+, SchemaEntry("annotation_fill_area",&STEP::ObjectHelper<annotation_fill_area,1>::Construct )
+, SchemaEntry("annotation_fill_area_occurrence",&STEP::ObjectHelper<annotation_fill_area_occurrence,1>::Construct )
+, SchemaEntry("annotation_occurrence_relationship",&STEP::ObjectHelper<annotation_occurrence_relationship,4>::Construct )
+, SchemaEntry("annotation_occurrence_associativity",&STEP::ObjectHelper<annotation_occurrence_associativity,0>::Construct )
+, SchemaEntry("annotation_plane",&STEP::ObjectHelper<annotation_plane,1>::Construct )
+, SchemaEntry("annotation_symbol_occurrence",&STEP::ObjectHelper<annotation_symbol_occurrence,0>::Construct )
+, SchemaEntry("annotation_subfigure_occurrence",&STEP::ObjectHelper<annotation_subfigure_occurrence,0>::Construct )
+, SchemaEntry("mapped_item",&STEP::ObjectHelper<mapped_item,2>::Construct )
+, SchemaEntry("annotation_symbol",&STEP::ObjectHelper<annotation_symbol,0>::Construct )
+, SchemaEntry("annotation_text",&STEP::ObjectHelper<annotation_text,0>::Construct )
+, SchemaEntry("annotation_text_character",&STEP::ObjectHelper<annotation_text_character,1>::Construct )
+, SchemaEntry("annotation_text_occurrence",&STEP::ObjectHelper<annotation_text_occurrence,0>::Construct )
+, SchemaEntry("shape_aspect",&STEP::ObjectHelper<shape_aspect,4>::Construct )
+, SchemaEntry("derived_shape_aspect",&STEP::ObjectHelper<derived_shape_aspect,0>::Construct )
+, SchemaEntry("apex",&STEP::ObjectHelper<apex,0>::Construct )
+, SchemaEntry("application_context",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("application_context_element",&STEP::ObjectHelper<application_context_element,2>::Construct )
+, SchemaEntry("application_protocol_definition",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("applied_action_assignment",&STEP::ObjectHelper<applied_action_assignment,1>::Construct )
+, SchemaEntry("applied_action_method_assignment",&STEP::ObjectHelper<applied_action_method_assignment,1>::Construct )
+, SchemaEntry("applied_action_request_assignment",&STEP::ObjectHelper<applied_action_request_assignment,1>::Construct )
+, SchemaEntry("approval_assignment",&STEP::ObjectHelper<approval_assignment,1>::Construct )
+, SchemaEntry("applied_approval_assignment",&STEP::ObjectHelper<applied_approval_assignment,1>::Construct )
+, SchemaEntry("attribute_classification_assignment",&STEP::ObjectHelper<attribute_classification_assignment,3>::Construct )
+, SchemaEntry("applied_attribute_classification_assignment",&STEP::ObjectHelper<applied_attribute_classification_assignment,1>::Construct )
+, SchemaEntry("certification_assignment",&STEP::ObjectHelper<certification_assignment,1>::Construct )
+, SchemaEntry("applied_certification_assignment",&STEP::ObjectHelper<applied_certification_assignment,1>::Construct )
+, SchemaEntry("classification_assignment",&STEP::ObjectHelper<classification_assignment,2>::Construct )
+, SchemaEntry("applied_classification_assignment",&STEP::ObjectHelper<applied_classification_assignment,1>::Construct )
+, SchemaEntry("contract_assignment",&STEP::ObjectHelper<contract_assignment,1>::Construct )
+, SchemaEntry("applied_contract_assignment",&STEP::ObjectHelper<applied_contract_assignment,1>::Construct )
+, SchemaEntry("date_and_time_assignment",&STEP::ObjectHelper<date_and_time_assignment,2>::Construct )
+, SchemaEntry("applied_date_and_time_assignment",&STEP::ObjectHelper<applied_date_and_time_assignment,1>::Construct )
+, SchemaEntry("date_assignment",&STEP::ObjectHelper<date_assignment,2>::Construct )
+, SchemaEntry("applied_date_assignment",&STEP::ObjectHelper<applied_date_assignment,1>::Construct )
+, SchemaEntry("document_reference",&STEP::ObjectHelper<document_reference,2>::Construct )
+, SchemaEntry("applied_document_reference",&STEP::ObjectHelper<applied_document_reference,1>::Construct )
+, SchemaEntry("document_usage_constraint_assignment",&STEP::ObjectHelper<document_usage_constraint_assignment,2>::Construct )
+, SchemaEntry("applied_document_usage_constraint_assignment",&STEP::ObjectHelper<applied_document_usage_constraint_assignment,1>::Construct )
+, SchemaEntry("effectivity_assignment",&STEP::ObjectHelper<effectivity_assignment,1>::Construct )
+, SchemaEntry("applied_effectivity_assignment",&STEP::ObjectHelper<applied_effectivity_assignment,1>::Construct )
+, SchemaEntry("event_occurrence_assignment",&STEP::ObjectHelper<event_occurrence_assignment,2>::Construct )
+, SchemaEntry("applied_event_occurrence_assignment",&STEP::ObjectHelper<applied_event_occurrence_assignment,1>::Construct )
+, SchemaEntry("identification_assignment",&STEP::ObjectHelper<identification_assignment,2>::Construct )
+, SchemaEntry("external_identification_assignment",&STEP::ObjectHelper<external_identification_assignment,1>::Construct )
+, SchemaEntry("applied_external_identification_assignment",&STEP::ObjectHelper<applied_external_identification_assignment,1>::Construct )
+, SchemaEntry("group_assignment",&STEP::ObjectHelper<group_assignment,1>::Construct )
+, SchemaEntry("applied_group_assignment",&STEP::ObjectHelper<applied_group_assignment,1>::Construct )
+, SchemaEntry("applied_identification_assignment",&STEP::ObjectHelper<applied_identification_assignment,1>::Construct )
+, SchemaEntry("name_assignment",&STEP::ObjectHelper<name_assignment,1>::Construct )
+, SchemaEntry("applied_name_assignment",&STEP::ObjectHelper<applied_name_assignment,1>::Construct )
+, SchemaEntry("organization_assignment",&STEP::ObjectHelper<organization_assignment,2>::Construct )
+, SchemaEntry("applied_organization_assignment",&STEP::ObjectHelper<applied_organization_assignment,1>::Construct )
+, SchemaEntry("organizational_project_assignment",&STEP::ObjectHelper<organizational_project_assignment,2>::Construct )
+, SchemaEntry("applied_organizational_project_assignment",&STEP::ObjectHelper<applied_organizational_project_assignment,1>::Construct )
+, SchemaEntry("person_and_organization_assignment",&STEP::ObjectHelper<person_and_organization_assignment,2>::Construct )
+, SchemaEntry("applied_person_and_organization_assignment",&STEP::ObjectHelper<applied_person_and_organization_assignment,1>::Construct )
+, SchemaEntry("presented_item",&STEP::ObjectHelper<presented_item,0>::Construct )
+, SchemaEntry("applied_presented_item",&STEP::ObjectHelper<applied_presented_item,1>::Construct )
+, SchemaEntry("security_classification_assignment",&STEP::ObjectHelper<security_classification_assignment,1>::Construct )
+, SchemaEntry("applied_security_classification_assignment",&STEP::ObjectHelper<applied_security_classification_assignment,1>::Construct )
+, SchemaEntry("time_interval_assignment",&STEP::ObjectHelper<time_interval_assignment,2>::Construct )
+, SchemaEntry("applied_time_interval_assignment",&STEP::ObjectHelper<applied_time_interval_assignment,1>::Construct )
+, SchemaEntry("applied_usage_right",&STEP::ObjectHelper<applied_usage_right,0>::Construct )
+, SchemaEntry("approval",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("approval_date_time",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("approval_person_organization",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("approval_relationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("approval_role",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("approval_status",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("area_in_set",&STEP::ObjectHelper<area_in_set,2>::Construct )
+, SchemaEntry("area_measure_with_unit",&STEP::ObjectHelper<area_measure_with_unit,0>::Construct )
+, SchemaEntry("area_unit",&STEP::ObjectHelper<area_unit,0>::Construct )
+, SchemaEntry("product_definition_relationship",&STEP::ObjectHelper<product_definition_relationship,5>::Construct )
+, SchemaEntry("product_definition_usage",&STEP::ObjectHelper<product_definition_usage,0>::Construct )
+, SchemaEntry("assembly_component_usage",&STEP::ObjectHelper<assembly_component_usage,1>::Construct )
+, SchemaEntry("assembly_component_usage_substitute",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("assigned_requirement",&STEP::ObjectHelper<assigned_requirement,1>::Construct )
+, SchemaEntry("compound_representation_item",&STEP::ObjectHelper<compound_representation_item,1>::Construct )
+, SchemaEntry("atomic_formula",&STEP::ObjectHelper<atomic_formula,0>::Construct )
+, SchemaEntry("attribute_assertion",&STEP::ObjectHelper<attribute_assertion,0>::Construct )
+, SchemaEntry("attribute_language_assignment",&STEP::ObjectHelper<attribute_language_assignment,1>::Construct )
+, SchemaEntry("attribute_value_assignment",&STEP::ObjectHelper<attribute_value_assignment,3>::Construct )
+, SchemaEntry("attribute_value_role",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("auxiliary_geometric_representation_item",&STEP::ObjectHelper<auxiliary_geometric_representation_item,0>::Construct )
+, SchemaEntry("placement",&STEP::ObjectHelper<placement,1>::Construct )
+, SchemaEntry("axis1_placement",&STEP::ObjectHelper<axis1_placement,1>::Construct )
+, SchemaEntry("axis2_placement_2d",&STEP::ObjectHelper<axis2_placement_2d,1>::Construct )
+, SchemaEntry("axis2_placement_3d",&STEP::ObjectHelper<axis2_placement_3d,2>::Construct )
+, SchemaEntry("curve",&STEP::ObjectHelper<curve,0>::Construct )
+, SchemaEntry("bounded_curve",&STEP::ObjectHelper<bounded_curve,0>::Construct )
+, SchemaEntry("b_spline_curve",&STEP::ObjectHelper<b_spline_curve,5>::Construct )
+, SchemaEntry("b_spline_curve_with_knots",&STEP::ObjectHelper<b_spline_curve_with_knots,3>::Construct )
+, SchemaEntry("surface",&STEP::ObjectHelper<surface,0>::Construct )
+, SchemaEntry("bounded_surface",&STEP::ObjectHelper<bounded_surface,0>::Construct )
+, SchemaEntry("b_spline_surface",&STEP::ObjectHelper<b_spline_surface,6>::Construct )
+, SchemaEntry("b_spline_surface_with_knots",&STEP::ObjectHelper<b_spline_surface_with_knots,5>::Construct )
+, SchemaEntry("product_definition",&STEP::ObjectHelper<product_definition,4>::Construct )
+, SchemaEntry("rule_software_definition",&STEP::ObjectHelper<rule_software_definition,0>::Construct )
+, SchemaEntry("rule_definition",&STEP::ObjectHelper<rule_definition,0>::Construct )
+, SchemaEntry("back_chaining_rule",&STEP::ObjectHelper<back_chaining_rule,0>::Construct )
+, SchemaEntry("back_chaining_rule_body",&STEP::ObjectHelper<back_chaining_rule_body,0>::Construct )
+, SchemaEntry("colour",&STEP::ObjectHelper<colour,0>::Construct )
+, SchemaEntry("background_colour",&STEP::ObjectHelper<background_colour,1>::Construct )
+, SchemaEntry("beveled_sheet_representation",&STEP::ObjectHelper<beveled_sheet_representation,0>::Construct )
+, SchemaEntry("bezier_curve",&STEP::ObjectHelper<bezier_curve,0>::Construct )
+, SchemaEntry("bezier_surface",&STEP::ObjectHelper<bezier_surface,0>::Construct )
+, SchemaEntry("generic_expression",&STEP::ObjectHelper<generic_expression,0>::Construct )
+, SchemaEntry("binary_generic_expression",&STEP::ObjectHelper<binary_generic_expression,1>::Construct )
+, SchemaEntry("binary_numeric_expression",&STEP::ObjectHelper<binary_numeric_expression,0>::Construct )
+, SchemaEntry("binary_representation_item",&STEP::ObjectHelper<binary_representation_item,1>::Construct )
+, SchemaEntry("block",&STEP::ObjectHelper<block,4>::Construct )
+, SchemaEntry("expression",&STEP::ObjectHelper<expression,0>::Construct )
+, SchemaEntry("boolean_expression",&STEP::ObjectHelper<boolean_expression,0>::Construct )
+, SchemaEntry("boolean_literal",&STEP::ObjectHelper<boolean_literal,1>::Construct )
+, SchemaEntry("boolean_representation_item",&STEP::ObjectHelper<boolean_representation_item,0>::Construct )
+, SchemaEntry("boolean_result",&STEP::ObjectHelper<boolean_result,3>::Construct )
+, SchemaEntry("composite_curve",&STEP::ObjectHelper<composite_curve,2>::Construct )
+, SchemaEntry("composite_curve_on_surface",&STEP::ObjectHelper<composite_curve_on_surface,0>::Construct )
+, SchemaEntry("boundary_curve",&STEP::ObjectHelper<boundary_curve,0>::Construct )
+, SchemaEntry("bounded_pcurve",&STEP::ObjectHelper<bounded_pcurve,0>::Construct )
+, SchemaEntry("bounded_surface_curve",&STEP::ObjectHelper<bounded_surface_curve,0>::Construct )
+, SchemaEntry("founded_item",&STEP::ObjectHelper<founded_item,0>::Construct )
+, SchemaEntry("box_domain",&STEP::ObjectHelper<box_domain,4>::Construct )
+, SchemaEntry("half_space_solid",&STEP::ObjectHelper<half_space_solid,2>::Construct )
+, SchemaEntry("boxed_half_space",&STEP::ObjectHelper<boxed_half_space,1>::Construct )
+, SchemaEntry("breakdown_context",&STEP::ObjectHelper<breakdown_context,0>::Construct )
+, SchemaEntry("breakdown_element_group_assignment",&STEP::ObjectHelper<breakdown_element_group_assignment,1>::Construct )
+, SchemaEntry("breakdown_element_realization",&STEP::ObjectHelper<breakdown_element_realization,0>::Construct )
+, SchemaEntry("breakdown_element_usage",&STEP::ObjectHelper<breakdown_element_usage,0>::Construct )
+, SchemaEntry("breakdown_of",&STEP::ObjectHelper<breakdown_of,0>::Construct )
+, SchemaEntry("solid_model",&STEP::ObjectHelper<solid_model,0>::Construct )
+, SchemaEntry("manifold_solid_brep",&STEP::ObjectHelper<manifold_solid_brep,1>::Construct )
+, SchemaEntry("brep_with_voids",&STEP::ObjectHelper<brep_with_voids,1>::Construct )
+, SchemaEntry("bytes_representation_item",&STEP::ObjectHelper<bytes_representation_item,0>::Construct )
+, SchemaEntry("date",&STEP::ObjectHelper<date,1>::Construct )
+, SchemaEntry("calendar_date",&STEP::ObjectHelper<calendar_date,2>::Construct )
+, SchemaEntry("camera_image",&STEP::ObjectHelper<camera_image,0>::Construct )
+, SchemaEntry("camera_image_3d_with_scale",&STEP::ObjectHelper<camera_image_3d_with_scale,0>::Construct )
+, SchemaEntry("camera_model",&STEP::ObjectHelper<camera_model,0>::Construct )
+, SchemaEntry("camera_model_d3",&STEP::ObjectHelper<camera_model_d3,2>::Construct )
+, SchemaEntry("camera_model_d3_multi_clipping",&STEP::ObjectHelper<camera_model_d3_multi_clipping,1>::Construct )
+, SchemaEntry("camera_model_d3_multi_clipping_intersection",&STEP::ObjectHelper<camera_model_d3_multi_clipping_intersection,1>::Construct )
+, SchemaEntry("camera_model_d3_multi_clipping_union",&STEP::ObjectHelper<camera_model_d3_multi_clipping_union,1>::Construct )
+, SchemaEntry("camera_model_d3_with_hlhsr",&STEP::ObjectHelper<camera_model_d3_with_hlhsr,1>::Construct )
+, SchemaEntry("camera_model_with_light_sources",&STEP::ObjectHelper<camera_model_with_light_sources,1>::Construct )
+, SchemaEntry("representation_map",&STEP::ObjectHelper<representation_map,2>::Construct )
+, SchemaEntry("camera_usage",&STEP::ObjectHelper<camera_usage,0>::Construct )
+, SchemaEntry("capacitance_measure_with_unit",&STEP::ObjectHelper<capacitance_measure_with_unit,0>::Construct )
+, SchemaEntry("capacitance_unit",&STEP::ObjectHelper<capacitance_unit,0>::Construct )
+, SchemaEntry("point",&STEP::ObjectHelper<point,0>::Construct )
+, SchemaEntry("cartesian_point",&STEP::ObjectHelper<cartesian_point,1>::Construct )
+, SchemaEntry("cartesian_transformation_operator",&STEP::ObjectHelper<cartesian_transformation_operator,4>::Construct )
+, SchemaEntry("cartesian_transformation_operator_2d",&STEP::ObjectHelper<cartesian_transformation_operator_2d,0>::Construct )
+, SchemaEntry("cartesian_transformation_operator_3d",&STEP::ObjectHelper<cartesian_transformation_operator_3d,1>::Construct )
+, SchemaEntry("cc_design_approval",&STEP::ObjectHelper<cc_design_approval,1>::Construct )
+, SchemaEntry("cc_design_certification",&STEP::ObjectHelper<cc_design_certification,1>::Construct )
+, SchemaEntry("cc_design_contract",&STEP::ObjectHelper<cc_design_contract,1>::Construct )
+, SchemaEntry("cc_design_date_and_time_assignment",&STEP::ObjectHelper<cc_design_date_and_time_assignment,1>::Construct )
+, SchemaEntry("cc_design_person_and_organization_assignment",&STEP::ObjectHelper<cc_design_person_and_organization_assignment,1>::Construct )
+, SchemaEntry("cc_design_security_classification",&STEP::ObjectHelper<cc_design_security_classification,1>::Construct )
+, SchemaEntry("cc_design_specification_reference",&STEP::ObjectHelper<cc_design_specification_reference,1>::Construct )
+, SchemaEntry("celsius_temperature_measure_with_unit",&STEP::ObjectHelper<celsius_temperature_measure_with_unit,0>::Construct )
+, SchemaEntry("centre_of_symmetry",&STEP::ObjectHelper<centre_of_symmetry,0>::Construct )
+, SchemaEntry("certification",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("certification_type",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("change",&STEP::ObjectHelper<change,1>::Construct )
+, SchemaEntry("change_request",&STEP::ObjectHelper<change_request,1>::Construct )
+, SchemaEntry("character_glyph_font_usage",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("character_glyph_style_outline",&STEP::ObjectHelper<character_glyph_style_outline,1>::Construct )
+, SchemaEntry("character_glyph_style_stroke",&STEP::ObjectHelper<character_glyph_style_stroke,1>::Construct )
+, SchemaEntry("symbol_representation",&STEP::ObjectHelper<symbol_representation,0>::Construct )
+, SchemaEntry("generic_character_glyph_symbol",&STEP::ObjectHelper<generic_character_glyph_symbol,0>::Construct )
+, SchemaEntry("character_glyph_symbol",&STEP::ObjectHelper<character_glyph_symbol,2>::Construct )
+, SchemaEntry("character_glyph_symbol_outline",&STEP::ObjectHelper<character_glyph_symbol_outline,1>::Construct )
+, SchemaEntry("character_glyph_symbol_stroke",&STEP::ObjectHelper<character_glyph_symbol_stroke,1>::Construct )
+, SchemaEntry("general_property",&STEP::ObjectHelper<general_property,3>::Construct )
+, SchemaEntry("characteristic_data_column_header",&STEP::ObjectHelper<characteristic_data_column_header,0>::Construct )
+, SchemaEntry("general_property_relationship",&STEP::ObjectHelper<general_property_relationship,4>::Construct )
+, SchemaEntry("characteristic_data_column_header_link",&STEP::ObjectHelper<characteristic_data_column_header_link,0>::Construct )
+, SchemaEntry("characteristic_data_table_header",&STEP::ObjectHelper<characteristic_data_table_header,0>::Construct )
+, SchemaEntry("characteristic_data_table_header_decomposition",&STEP::ObjectHelper<characteristic_data_table_header_decomposition,0>::Construct )
+, SchemaEntry("group",&STEP::ObjectHelper<group,2>::Construct )
+, SchemaEntry("characteristic_type",&STEP::ObjectHelper<characteristic_type,0>::Construct )
+, SchemaEntry("characterized_class",&STEP::ObjectHelper<characterized_class,0>::Construct )
+, SchemaEntry("characterized_object",&STEP::ObjectHelper<characterized_object,2>::Construct )
+, SchemaEntry("conic",&STEP::ObjectHelper<conic,1>::Construct )
+, SchemaEntry("circle",&STEP::ObjectHelper<circle,1>::Construct )
+, SchemaEntry("circular_runout_tolerance",&STEP::ObjectHelper<circular_runout_tolerance,0>::Construct )
+, SchemaEntry("class_t",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("class_by_extension",&STEP::ObjectHelper<class_by_extension,0>::Construct )
+, SchemaEntry("class_by_intension",&STEP::ObjectHelper<class_by_intension,0>::Construct )
+, SchemaEntry("class_system",&STEP::ObjectHelper<class_system,0>::Construct )
+, SchemaEntry("effectivity_context_assignment",&STEP::ObjectHelper<effectivity_context_assignment,2>::Construct )
+, SchemaEntry("class_usage_effectivity_context_assignment",&STEP::ObjectHelper<class_usage_effectivity_context_assignment,1>::Construct )
+, SchemaEntry("classification_role",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("topological_representation_item",&STEP::ObjectHelper<topological_representation_item,0>::Construct )
+, SchemaEntry("connected_face_set",&STEP::ObjectHelper<connected_face_set,1>::Construct )
+, SchemaEntry("closed_shell",&STEP::ObjectHelper<closed_shell,0>::Construct )
+, SchemaEntry("coaxiality_tolerance",&STEP::ObjectHelper<coaxiality_tolerance,0>::Construct )
+, SchemaEntry("colour_specification",&STEP::ObjectHelper<colour_specification,1>::Construct )
+, SchemaEntry("colour_rgb",&STEP::ObjectHelper<colour_rgb,3>::Construct )
+, SchemaEntry("common_datum",&STEP::ObjectHelper<common_datum,0>::Construct )
+, SchemaEntry("comparison_expression",&STEP::ObjectHelper<comparison_expression,0>::Construct )
+, SchemaEntry("complex_clause",&STEP::ObjectHelper<complex_clause,0>::Construct )
+, SchemaEntry("complex_conjunctive_clause",&STEP::ObjectHelper<complex_conjunctive_clause,0>::Construct )
+, SchemaEntry("complex_disjunctive_clause",&STEP::ObjectHelper<complex_disjunctive_clause,0>::Construct )
+, SchemaEntry("modified_solid",&STEP::ObjectHelper<modified_solid,2>::Construct )
+, SchemaEntry("shelled_solid",&STEP::ObjectHelper<shelled_solid,2>::Construct )
+, SchemaEntry("complex_shelled_solid",&STEP::ObjectHelper<complex_shelled_solid,1>::Construct )
+, SchemaEntry("composite_assembly_definition",&STEP::ObjectHelper<composite_assembly_definition,0>::Construct )
+, SchemaEntry("composite_assembly_sequence_definition",&STEP::ObjectHelper<composite_assembly_sequence_definition,0>::Construct )
+, SchemaEntry("laminate_table",&STEP::ObjectHelper<laminate_table,0>::Construct )
+, SchemaEntry("part_laminate_table",&STEP::ObjectHelper<part_laminate_table,0>::Construct )
+, SchemaEntry("composite_assembly_table",&STEP::ObjectHelper<composite_assembly_table,0>::Construct )
+, SchemaEntry("composite_curve_segment",&STEP::ObjectHelper<composite_curve_segment,3>::Construct )
+, SchemaEntry("material_designation",&STEP::ObjectHelper<material_designation,2>::Construct )
+, SchemaEntry("composite_material_designation",&STEP::ObjectHelper<composite_material_designation,0>::Construct )
+, SchemaEntry("composite_shape_aspect",&STEP::ObjectHelper<composite_shape_aspect,0>::Construct )
+, SchemaEntry("composite_sheet_representation",&STEP::ObjectHelper<composite_sheet_representation,0>::Construct )
+, SchemaEntry("composite_text",&STEP::ObjectHelper<composite_text,1>::Construct )
+, SchemaEntry("composite_text_with_associated_curves",&STEP::ObjectHelper<composite_text_with_associated_curves,1>::Construct )
+, SchemaEntry("composite_text_with_blanking_box",&STEP::ObjectHelper<composite_text_with_blanking_box,1>::Construct )
+, SchemaEntry("composite_text_with_delineation",&STEP::ObjectHelper<composite_text_with_delineation,1>::Construct )
+, SchemaEntry("composite_text_with_extent",&STEP::ObjectHelper<composite_text_with_extent,1>::Construct )
+, SchemaEntry("compound_shape_representation",&STEP::ObjectHelper<compound_shape_representation,0>::Construct )
+, SchemaEntry("concentricity_tolerance",&STEP::ObjectHelper<concentricity_tolerance,0>::Construct )
+, SchemaEntry("concept_feature_operator",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("concept_feature_relationship",&STEP::ObjectHelper<concept_feature_relationship,4>::Construct )
+, SchemaEntry("concept_feature_relationship_with_condition",&STEP::ObjectHelper<concept_feature_relationship_with_condition,1>::Construct )
+, SchemaEntry("product_concept_feature",&STEP::ObjectHelper<product_concept_feature,3>::Construct )
+, SchemaEntry("conditional_concept_feature",&STEP::ObjectHelper<conditional_concept_feature,1>::Construct )
+, SchemaEntry("conductance_measure_with_unit",&STEP::ObjectHelper<conductance_measure_with_unit,0>::Construct )
+, SchemaEntry("conductance_unit",&STEP::ObjectHelper<conductance_unit,0>::Construct )
+, SchemaEntry("configuration_item",&STEP::ObjectHelper<configuration_item,5>::Construct )
+, SchemaEntry("configurable_item",&STEP::ObjectHelper<configurable_item,1>::Construct )
+, SchemaEntry("configuration_design",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("effectivity",&STEP::ObjectHelper<effectivity,1>::Construct )
+, SchemaEntry("product_definition_effectivity",&STEP::ObjectHelper<product_definition_effectivity,1>::Construct )
+, SchemaEntry("configuration_effectivity",&STEP::ObjectHelper<configuration_effectivity,1>::Construct )
+, SchemaEntry("configuration_item_relationship",&STEP::ObjectHelper<configuration_item_relationship,4>::Construct )
+, SchemaEntry("configuration_item_hierarchical_relationship",&STEP::ObjectHelper<configuration_item_hierarchical_relationship,0>::Construct )
+, SchemaEntry("configuration_item_revision_sequence",&STEP::ObjectHelper<configuration_item_revision_sequence,0>::Construct )
+, SchemaEntry("configured_effectivity_assignment",&STEP::ObjectHelper<configured_effectivity_assignment,1>::Construct )
+, SchemaEntry("configured_effectivity_context_assignment",&STEP::ObjectHelper<configured_effectivity_context_assignment,1>::Construct )
+, SchemaEntry("conical_stepped_hole_transition",&STEP::ObjectHelper<conical_stepped_hole_transition,3>::Construct )
+, SchemaEntry("elementary_surface",&STEP::ObjectHelper<elementary_surface,1>::Construct )
+, SchemaEntry("conical_surface",&STEP::ObjectHelper<conical_surface,2>::Construct )
+, SchemaEntry("connected_edge_set",&STEP::ObjectHelper<connected_edge_set,1>::Construct )
+, SchemaEntry("connected_face_sub_set",&STEP::ObjectHelper<connected_face_sub_set,1>::Construct )
+, SchemaEntry("constructive_geometry_representation",&STEP::ObjectHelper<constructive_geometry_representation,0>::Construct )
+, SchemaEntry("representation_relationship",&STEP::ObjectHelper<representation_relationship,4>::Construct )
+, SchemaEntry("constructive_geometry_representation_relationship",&STEP::ObjectHelper<constructive_geometry_representation_relationship,0>::Construct )
+, SchemaEntry("contact_ratio_representation",&STEP::ObjectHelper<contact_ratio_representation,0>::Construct )
+, SchemaEntry("invisibility",&STEP::ObjectHelper<invisibility,1>::Construct )
+, SchemaEntry("context_dependent_invisibility",&STEP::ObjectHelper<context_dependent_invisibility,1>::Construct )
+, SchemaEntry("over_riding_styled_item",&STEP::ObjectHelper<over_riding_styled_item,1>::Construct )
+, SchemaEntry("context_dependent_over_riding_styled_item",&STEP::ObjectHelper<context_dependent_over_riding_styled_item,1>::Construct )
+, SchemaEntry("context_dependent_shape_representation",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("context_dependent_unit",&STEP::ObjectHelper<context_dependent_unit,1>::Construct )
+, SchemaEntry("contract",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("contract_relationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("contract_type",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("conversion_based_unit",&STEP::ObjectHelper<conversion_based_unit,2>::Construct )
+, SchemaEntry("coordinated_universal_time_offset",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("csg_shape_representation",&STEP::ObjectHelper<csg_shape_representation,0>::Construct )
+, SchemaEntry("csg_solid",&STEP::ObjectHelper<csg_solid,1>::Construct )
+, SchemaEntry("currency",&STEP::ObjectHelper<currency,0>::Construct )
+, SchemaEntry("currency_measure_with_unit",&STEP::ObjectHelper<currency_measure_with_unit,0>::Construct )
+, SchemaEntry("curve_bounded_surface",&STEP::ObjectHelper<curve_bounded_surface,3>::Construct )
+, SchemaEntry("curve_dimension",&STEP::ObjectHelper<curve_dimension,0>::Construct )
+, SchemaEntry("curve_replica",&STEP::ObjectHelper<curve_replica,2>::Construct )
+, SchemaEntry("curve_style",&STEP::ObjectHelper<curve_style,4>::Construct )
+, SchemaEntry("curve_style_font",&STEP::ObjectHelper<curve_style_font,2>::Construct )
+, SchemaEntry("curve_style_font_and_scaling",&STEP::ObjectHelper<curve_style_font_and_scaling,3>::Construct )
+, SchemaEntry("curve_style_font_pattern",&STEP::ObjectHelper<curve_style_font_pattern,2>::Construct )
+, SchemaEntry("curve_style_rendering",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("curve_swept_solid_shape_representation",&STEP::ObjectHelper<curve_swept_solid_shape_representation,0>::Construct )
+, SchemaEntry("cylindrical_surface",&STEP::ObjectHelper<cylindrical_surface,1>::Construct )
+, SchemaEntry("cylindricity_tolerance",&STEP::ObjectHelper<cylindricity_tolerance,0>::Construct )
+, SchemaEntry("data_environment",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("date_and_time",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("date_representation_item",&STEP::ObjectHelper<date_representation_item,0>::Construct )
+, SchemaEntry("date_role",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("date_time_representation_item",&STEP::ObjectHelper<date_time_representation_item,0>::Construct )
+, SchemaEntry("date_time_role",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("dated_effectivity",&STEP::ObjectHelper<dated_effectivity,2>::Construct )
+, SchemaEntry("datum",&STEP::ObjectHelper<datum,1>::Construct )
+, SchemaEntry("datum_feature",&STEP::ObjectHelper<datum_feature,0>::Construct )
+, SchemaEntry("datum_feature_callout",&STEP::ObjectHelper<datum_feature_callout,0>::Construct )
+, SchemaEntry("datum_reference",&STEP::ObjectHelper<datum_reference,2>::Construct )
+, SchemaEntry("datum_target",&STEP::ObjectHelper<datum_target,1>::Construct )
+, SchemaEntry("datum_target_callout",&STEP::ObjectHelper<datum_target_callout,0>::Construct )
+, SchemaEntry("default_tolerance_table",&STEP::ObjectHelper<default_tolerance_table,0>::Construct )
+, SchemaEntry("default_tolerance_table_cell",&STEP::ObjectHelper<default_tolerance_table_cell,0>::Construct )
+, SchemaEntry("defined_symbol",&STEP::ObjectHelper<defined_symbol,2>::Construct )
+, SchemaEntry("definitional_representation",&STEP::ObjectHelper<definitional_representation,0>::Construct )
+, SchemaEntry("definitional_representation_relationship",&STEP::ObjectHelper<definitional_representation_relationship,0>::Construct )
+, SchemaEntry("definitional_representation_relationship_with_same_context",&STEP::ObjectHelper<definitional_representation_relationship_with_same_context,0>::Construct )
+, SchemaEntry("degenerate_pcurve",&STEP::ObjectHelper<degenerate_pcurve,2>::Construct )
+, SchemaEntry("toroidal_surface",&STEP::ObjectHelper<toroidal_surface,2>::Construct )
+, SchemaEntry("degenerate_toroidal_surface",&STEP::ObjectHelper<degenerate_toroidal_surface,1>::Construct )
+, SchemaEntry("derived_unit_element",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("description_attribute",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("descriptive_representation_item",&STEP::ObjectHelper<descriptive_representation_item,1>::Construct )
+, SchemaEntry("product_definition_context",&STEP::ObjectHelper<product_definition_context,1>::Construct )
+, SchemaEntry("design_context",&STEP::ObjectHelper<design_context,0>::Construct )
+, SchemaEntry("design_make_from_relationship",&STEP::ObjectHelper<design_make_from_relationship,0>::Construct )
+, SchemaEntry("diameter_dimension",&STEP::ObjectHelper<diameter_dimension,0>::Construct )
+, SchemaEntry("ratio_measure_with_unit",&STEP::ObjectHelper<ratio_measure_with_unit,0>::Construct )
+, SchemaEntry("dielectric_constant_measure_with_unit",&STEP::ObjectHelper<dielectric_constant_measure_with_unit,0>::Construct )
+, SchemaEntry("dimension_callout",&STEP::ObjectHelper<dimension_callout,0>::Construct )
+, SchemaEntry("draughting_callout_relationship",&STEP::ObjectHelper<draughting_callout_relationship,4>::Construct )
+, SchemaEntry("dimension_callout_component_relationship",&STEP::ObjectHelper<dimension_callout_component_relationship,0>::Construct )
+, SchemaEntry("dimension_callout_relationship",&STEP::ObjectHelper<dimension_callout_relationship,0>::Construct )
+, SchemaEntry("dimension_curve",&STEP::ObjectHelper<dimension_curve,0>::Construct )
+, SchemaEntry("terminator_symbol",&STEP::ObjectHelper<terminator_symbol,1>::Construct )
+, SchemaEntry("dimension_curve_terminator",&STEP::ObjectHelper<dimension_curve_terminator,1>::Construct )
+, SchemaEntry("dimension_curve_terminator_to_projection_curve_associativity",&STEP::ObjectHelper<dimension_curve_terminator_to_projection_curve_associativity,0>::Construct )
+, SchemaEntry("dimension_pair",&STEP::ObjectHelper<dimension_pair,0>::Construct )
+, SchemaEntry("dimension_related_tolerance_zone_element",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("dimension_text_associativity",&STEP::ObjectHelper<dimension_text_associativity,0>::Construct )
+, SchemaEntry("dimensional_characteristic_representation",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("dimensional_exponents",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("dimensional_location_with_path",&STEP::ObjectHelper<dimensional_location_with_path,1>::Construct )
+, SchemaEntry("dimensional_size_with_path",&STEP::ObjectHelper<dimensional_size_with_path,1>::Construct )
+, SchemaEntry("executed_action",&STEP::ObjectHelper<executed_action,0>::Construct )
+, SchemaEntry("directed_action",&STEP::ObjectHelper<directed_action,1>::Construct )
+, SchemaEntry("directed_dimensional_location",&STEP::ObjectHelper<directed_dimensional_location,0>::Construct )
+, SchemaEntry("direction",&STEP::ObjectHelper<direction,1>::Construct )
+, SchemaEntry("document",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("document_file",&STEP::ObjectHelper<document_file,0>::Construct )
+, SchemaEntry("document_identifier",&STEP::ObjectHelper<document_identifier,0>::Construct )
+, SchemaEntry("document_identifier_assignment",&STEP::ObjectHelper<document_identifier_assignment,1>::Construct )
+, SchemaEntry("document_product_association",&STEP::ObjectHelper<document_product_association,4>::Construct )
+, SchemaEntry("document_product_equivalence",&STEP::ObjectHelper<document_product_equivalence,0>::Construct )
+, SchemaEntry("document_relationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("document_representation_type",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("document_type",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("document_usage_constraint",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("document_usage_role",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("dose_equivalent_measure_with_unit",&STEP::ObjectHelper<dose_equivalent_measure_with_unit,0>::Construct )
+, SchemaEntry("dose_equivalent_unit",&STEP::ObjectHelper<dose_equivalent_unit,0>::Construct )
+, SchemaEntry("double_offset_shelled_solid",&STEP::ObjectHelper<double_offset_shelled_solid,1>::Construct )
+, SchemaEntry("item_defined_transformation",&STEP::ObjectHelper<item_defined_transformation,4>::Construct )
+, SchemaEntry("transformation_with_derived_angle",&STEP::ObjectHelper<transformation_with_derived_angle,0>::Construct )
+, SchemaEntry("draped_defined_transformation",&STEP::ObjectHelper<draped_defined_transformation,0>::Construct )
+, SchemaEntry("draughting_annotation_occurrence",&STEP::ObjectHelper<draughting_annotation_occurrence,0>::Construct )
+, SchemaEntry("draughting_elements",&STEP::ObjectHelper<draughting_elements,0>::Construct )
+, SchemaEntry("draughting_model",&STEP::ObjectHelper<draughting_model,0>::Construct )
+, SchemaEntry("item_identified_representation_usage",&STEP::ObjectHelper<item_identified_representation_usage,5>::Construct )
+, SchemaEntry("draughting_model_item_association",&STEP::ObjectHelper<draughting_model_item_association,0>::Construct )
+, SchemaEntry("pre_defined_colour",&STEP::ObjectHelper<pre_defined_colour,0>::Construct )
+, SchemaEntry("draughting_pre_defined_colour",&STEP::ObjectHelper<draughting_pre_defined_colour,0>::Construct )
+, SchemaEntry("pre_defined_item",&STEP::ObjectHelper<pre_defined_item,1>::Construct )
+, SchemaEntry("pre_defined_curve_font",&STEP::ObjectHelper<pre_defined_curve_font,0>::Construct )
+, SchemaEntry("draughting_pre_defined_curve_font",&STEP::ObjectHelper<draughting_pre_defined_curve_font,0>::Construct )
+, SchemaEntry("pre_defined_text_font",&STEP::ObjectHelper<pre_defined_text_font,0>::Construct )
+, SchemaEntry("draughting_pre_defined_text_font",&STEP::ObjectHelper<draughting_pre_defined_text_font,0>::Construct )
+, SchemaEntry("draughting_subfigure_representation",&STEP::ObjectHelper<draughting_subfigure_representation,0>::Construct )
+, SchemaEntry("draughting_symbol_representation",&STEP::ObjectHelper<draughting_symbol_representation,0>::Construct )
+, SchemaEntry("text_literal",&STEP::ObjectHelper<text_literal,5>::Construct )
+, SchemaEntry("text_literal_with_delineation",&STEP::ObjectHelper<text_literal_with_delineation,1>::Construct )
+, SchemaEntry("draughting_text_literal_with_delineation",&STEP::ObjectHelper<draughting_text_literal_with_delineation,0>::Construct )
+, SchemaEntry("draughting_title",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("drawing_definition",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("presentation_set",&STEP::ObjectHelper<presentation_set,0>::Construct )
+, SchemaEntry("drawing_revision",&STEP::ObjectHelper<drawing_revision,3>::Construct )
+, SchemaEntry("drawing_revision_sequence",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("presentation_representation",&STEP::ObjectHelper<presentation_representation,0>::Construct )
+, SchemaEntry("presentation_area",&STEP::ObjectHelper<presentation_area,0>::Construct )
+, SchemaEntry("drawing_sheet_revision",&STEP::ObjectHelper<drawing_sheet_revision,1>::Construct )
+, SchemaEntry("drawing_sheet_revision_sequence",&STEP::ObjectHelper<drawing_sheet_revision_sequence,0>::Construct )
+, SchemaEntry("drawing_sheet_revision_usage",&STEP::ObjectHelper<drawing_sheet_revision_usage,1>::Construct )
+, SchemaEntry("edge",&STEP::ObjectHelper<edge,2>::Construct )
+, SchemaEntry("edge_based_wireframe_model",&STEP::ObjectHelper<edge_based_wireframe_model,1>::Construct )
+, SchemaEntry("edge_based_wireframe_shape_representation",&STEP::ObjectHelper<edge_based_wireframe_shape_representation,0>::Construct )
+, SchemaEntry("edge_blended_solid",&STEP::ObjectHelper<edge_blended_solid,1>::Construct )
+, SchemaEntry("edge_curve",&STEP::ObjectHelper<edge_curve,2>::Construct )
+, SchemaEntry("edge_loop",&STEP::ObjectHelper<edge_loop,0>::Construct )
+, SchemaEntry("effectivity_context_role",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("effectivity_relationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("electric_charge_measure_with_unit",&STEP::ObjectHelper<electric_charge_measure_with_unit,0>::Construct )
+, SchemaEntry("electric_charge_unit",&STEP::ObjectHelper<electric_charge_unit,0>::Construct )
+, SchemaEntry("electric_current_measure_with_unit",&STEP::ObjectHelper<electric_current_measure_with_unit,0>::Construct )
+, SchemaEntry("electric_current_unit",&STEP::ObjectHelper<electric_current_unit,0>::Construct )
+, SchemaEntry("electric_potential_measure_with_unit",&STEP::ObjectHelper<electric_potential_measure_with_unit,0>::Construct )
+, SchemaEntry("electric_potential_unit",&STEP::ObjectHelper<electric_potential_unit,0>::Construct )
+, SchemaEntry("elementary_brep_shape_representation",&STEP::ObjectHelper<elementary_brep_shape_representation,0>::Construct )
+, SchemaEntry("ellipse",&STEP::ObjectHelper<ellipse,2>::Construct )
+, SchemaEntry("energy_measure_with_unit",&STEP::ObjectHelper<energy_measure_with_unit,0>::Construct )
+, SchemaEntry("energy_unit",&STEP::ObjectHelper<energy_unit,0>::Construct )
+, SchemaEntry("property_definition",&STEP::ObjectHelper<property_definition,3>::Construct )
+, SchemaEntry("fact_type",&STEP::ObjectHelper<fact_type,0>::Construct )
+, SchemaEntry("entity_assertion",&STEP::ObjectHelper<entity_assertion,0>::Construct )
+, SchemaEntry("enum_reference_prefix",&STEP::ObjectHelper<enum_reference_prefix,0>::Construct )
+, SchemaEntry("environment",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("evaluated_characteristic",&STEP::ObjectHelper<evaluated_characteristic,0>::Construct )
+, SchemaEntry("evaluated_degenerate_pcurve",&STEP::ObjectHelper<evaluated_degenerate_pcurve,1>::Construct )
+, SchemaEntry("evaluation_product_definition",&STEP::ObjectHelper<evaluation_product_definition,0>::Construct )
+, SchemaEntry("event_occurrence",&STEP::ObjectHelper<event_occurrence,3>::Construct )
+, SchemaEntry("event_occurrence_relationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("event_occurrence_role",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("product_concept_feature_category",&STEP::ObjectHelper<product_concept_feature_category,0>::Construct )
+, SchemaEntry("exclusive_product_concept_feature_category",&STEP::ObjectHelper<exclusive_product_concept_feature_category,0>::Construct )
+, SchemaEntry("uncertainty_qualifier",&STEP::ObjectHelper<uncertainty_qualifier,2>::Construct )
+, SchemaEntry("standard_uncertainty",&STEP::ObjectHelper<standard_uncertainty,1>::Construct )
+, SchemaEntry("expanded_uncertainty",&STEP::ObjectHelper<expanded_uncertainty,1>::Construct )
+, SchemaEntry("representation_item_relationship",&STEP::ObjectHelper<representation_item_relationship,4>::Construct )
+, SchemaEntry("explicit_procedural_representation_item_relationship",&STEP::ObjectHelper<explicit_procedural_representation_item_relationship,0>::Construct )
+, SchemaEntry("explicit_procedural_geometric_representation_item_relationship",&STEP::ObjectHelper<explicit_procedural_geometric_representation_item_relationship,0>::Construct )
+, SchemaEntry("explicit_procedural_representation_relationship",&STEP::ObjectHelper<explicit_procedural_representation_relationship,0>::Construct )
+, SchemaEntry("explicit_procedural_shape_representation_relationship",&STEP::ObjectHelper<explicit_procedural_shape_representation_relationship,0>::Construct )
+, SchemaEntry("expression_conversion_based_unit",&STEP::ObjectHelper<expression_conversion_based_unit,0>::Construct )
+, SchemaEntry("extension",&STEP::ObjectHelper<extension,0>::Construct )
+, SchemaEntry("extent",&STEP::ObjectHelper<extent,0>::Construct )
+, SchemaEntry("external_source",&STEP::ObjectHelper<external_source,1>::Construct )
+, SchemaEntry("external_class_library",&STEP::ObjectHelper<external_class_library,0>::Construct )
+, SchemaEntry("external_source_relationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("externally_defined_class",&STEP::ObjectHelper<externally_defined_class,0>::Construct )
+, SchemaEntry("externally_defined_colour",&STEP::ObjectHelper<externally_defined_colour,0>::Construct )
+, SchemaEntry("externally_defined_context_dependent_unit",&STEP::ObjectHelper<externally_defined_context_dependent_unit,0>::Construct )
+, SchemaEntry("externally_defined_conversion_based_unit",&STEP::ObjectHelper<externally_defined_conversion_based_unit,0>::Construct )
+, SchemaEntry("externally_defined_currency",&STEP::ObjectHelper<externally_defined_currency,0>::Construct )
+, SchemaEntry("externally_defined_item",&STEP::ObjectHelper<externally_defined_item,2>::Construct )
+, SchemaEntry("externally_defined_curve_font",&STEP::ObjectHelper<externally_defined_curve_font,0>::Construct )
+, SchemaEntry("externally_defined_dimension_definition",&STEP::ObjectHelper<externally_defined_dimension_definition,0>::Construct )
+, SchemaEntry("externally_defined_general_property",&STEP::ObjectHelper<externally_defined_general_property,0>::Construct )
+, SchemaEntry("externally_defined_hatch_style",&STEP::ObjectHelper<externally_defined_hatch_style,0>::Construct )
+, SchemaEntry("externally_defined_item_relationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("externally_defined_marker",&STEP::ObjectHelper<externally_defined_marker,0>::Construct )
+, SchemaEntry("picture_representation_item",&STEP::ObjectHelper<picture_representation_item,0>::Construct )
+, SchemaEntry("externally_defined_picture_representation_item",&STEP::ObjectHelper<externally_defined_picture_representation_item,0>::Construct )
+, SchemaEntry("externally_defined_representation_item",&STEP::ObjectHelper<externally_defined_representation_item,0>::Construct )
+, SchemaEntry("externally_defined_string",&STEP::ObjectHelper<externally_defined_string,0>::Construct )
+, SchemaEntry("externally_defined_symbol",&STEP::ObjectHelper<externally_defined_symbol,0>::Construct )
+, SchemaEntry("externally_defined_terminator_symbol",&STEP::ObjectHelper<externally_defined_terminator_symbol,0>::Construct )
+, SchemaEntry("externally_defined_text_font",&STEP::ObjectHelper<externally_defined_text_font,0>::Construct )
+, SchemaEntry("externally_defined_tile",&STEP::ObjectHelper<externally_defined_tile,0>::Construct )
+, SchemaEntry("externally_defined_tile_style",&STEP::ObjectHelper<externally_defined_tile_style,0>::Construct )
+, SchemaEntry("swept_area_solid",&STEP::ObjectHelper<swept_area_solid,1>::Construct )
+, SchemaEntry("extruded_area_solid",&STEP::ObjectHelper<extruded_area_solid,2>::Construct )
+, SchemaEntry("swept_face_solid",&STEP::ObjectHelper<swept_face_solid,1>::Construct )
+, SchemaEntry("extruded_face_solid",&STEP::ObjectHelper<extruded_face_solid,2>::Construct )
+, SchemaEntry("extruded_face_solid_with_trim_conditions",&STEP::ObjectHelper<extruded_face_solid_with_trim_conditions,6>::Construct )
+, SchemaEntry("extruded_face_solid_with_draft_angle",&STEP::ObjectHelper<extruded_face_solid_with_draft_angle,1>::Construct )
+, SchemaEntry("extruded_face_solid_with_multiple_draft_angles",&STEP::ObjectHelper<extruded_face_solid_with_multiple_draft_angles,1>::Construct )
+, SchemaEntry("face",&STEP::ObjectHelper<face,1>::Construct )
+, SchemaEntry("face_based_surface_model",&STEP::ObjectHelper<face_based_surface_model,1>::Construct )
+, SchemaEntry("face_bound",&STEP::ObjectHelper<face_bound,2>::Construct )
+, SchemaEntry("face_outer_bound",&STEP::ObjectHelper<face_outer_bound,0>::Construct )
+, SchemaEntry("faceted_brep",&STEP::ObjectHelper<faceted_brep,0>::Construct )
+, SchemaEntry("faceted_brep_shape_representation",&STEP::ObjectHelper<faceted_brep_shape_representation,0>::Construct )
+, SchemaEntry("fill_area_style",&STEP::ObjectHelper<fill_area_style,2>::Construct )
+, SchemaEntry("fill_area_style_colour",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("fill_area_style_hatching",&STEP::ObjectHelper<fill_area_style_hatching,5>::Construct )
+, SchemaEntry("fill_area_style_tile_coloured_region",&STEP::ObjectHelper<fill_area_style_tile_coloured_region,2>::Construct )
+, SchemaEntry("fill_area_style_tile_curve_with_style",&STEP::ObjectHelper<fill_area_style_tile_curve_with_style,1>::Construct )
+, SchemaEntry("fill_area_style_tile_symbol_with_style",&STEP::ObjectHelper<fill_area_style_tile_symbol_with_style,1>::Construct )
+, SchemaEntry("fill_area_style_tiles",&STEP::ObjectHelper<fill_area_style_tiles,3>::Construct )
+, SchemaEntry("shape_representation_relationship",&STEP::ObjectHelper<shape_representation_relationship,0>::Construct )
+, SchemaEntry("flat_pattern_ply_representation_relationship",&STEP::ObjectHelper<flat_pattern_ply_representation_relationship,0>::Construct )
+, SchemaEntry("flatness_tolerance",&STEP::ObjectHelper<flatness_tolerance,0>::Construct )
+, SchemaEntry("force_measure_with_unit",&STEP::ObjectHelper<force_measure_with_unit,0>::Construct )
+, SchemaEntry("force_unit",&STEP::ObjectHelper<force_unit,0>::Construct )
+, SchemaEntry("forward_chaining_rule",&STEP::ObjectHelper<forward_chaining_rule,0>::Construct )
+, SchemaEntry("forward_chaining_rule_premise",&STEP::ObjectHelper<forward_chaining_rule_premise,0>::Construct )
+, SchemaEntry("frequency_measure_with_unit",&STEP::ObjectHelper<frequency_measure_with_unit,0>::Construct )
+, SchemaEntry("frequency_unit",&STEP::ObjectHelper<frequency_unit,0>::Construct )
+, SchemaEntry("func",&STEP::ObjectHelper<func,0>::Construct )
+, SchemaEntry("functional_breakdown_context",&STEP::ObjectHelper<functional_breakdown_context,0>::Construct )
+, SchemaEntry("functional_element_usage",&STEP::ObjectHelper<functional_element_usage,0>::Construct )
+, SchemaEntry("functionally_defined_transformation",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("general_material_property",&STEP::ObjectHelper<general_material_property,0>::Construct )
+, SchemaEntry("general_property_association",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("simple_generic_expression",&STEP::ObjectHelper<simple_generic_expression,0>::Construct )
+, SchemaEntry("generic_literal",&STEP::ObjectHelper<generic_literal,0>::Construct )
+, SchemaEntry("generic_variable",&STEP::ObjectHelper<generic_variable,0>::Construct )
+, SchemaEntry("geometric_alignment",&STEP::ObjectHelper<geometric_alignment,0>::Construct )
+, SchemaEntry("geometric_set",&STEP::ObjectHelper<geometric_set,1>::Construct )
+, SchemaEntry("geometric_curve_set",&STEP::ObjectHelper<geometric_curve_set,0>::Construct )
+, SchemaEntry("geometric_intersection",&STEP::ObjectHelper<geometric_intersection,0>::Construct )
+, SchemaEntry("geometric_item_specific_usage",&STEP::ObjectHelper<geometric_item_specific_usage,0>::Construct )
+, SchemaEntry("geometric_model_element_relationship",&STEP::ObjectHelper<geometric_model_element_relationship,0>::Construct )
+, SchemaEntry("representation_context",&STEP::ObjectHelper<representation_context,2>::Construct )
+, SchemaEntry("geometric_representation_context",&STEP::ObjectHelper<geometric_representation_context,1>::Construct )
+, SchemaEntry("geometric_tolerance_relationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("geometric_tolerance_with_defined_unit",&STEP::ObjectHelper<geometric_tolerance_with_defined_unit,1>::Construct )
+, SchemaEntry("geometrical_tolerance_callout",&STEP::ObjectHelper<geometrical_tolerance_callout,0>::Construct )
+, SchemaEntry("geometrically_bounded_2d_wireframe_representation",&STEP::ObjectHelper<geometrically_bounded_2d_wireframe_representation,0>::Construct )
+, SchemaEntry("geometrically_bounded_surface_shape_representation",&STEP::ObjectHelper<geometrically_bounded_surface_shape_representation,0>::Construct )
+, SchemaEntry("geometrically_bounded_wireframe_shape_representation",&STEP::ObjectHelper<geometrically_bounded_wireframe_shape_representation,0>::Construct )
+, SchemaEntry("global_assignment",&STEP::ObjectHelper<global_assignment,0>::Construct )
+, SchemaEntry("global_uncertainty_assigned_context",&STEP::ObjectHelper<global_uncertainty_assigned_context,1>::Construct )
+, SchemaEntry("global_unit_assigned_context",&STEP::ObjectHelper<global_unit_assigned_context,1>::Construct )
+, SchemaEntry("ground_fact",&STEP::ObjectHelper<ground_fact,0>::Construct )
+, SchemaEntry("group_relationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("hardness_representation",&STEP::ObjectHelper<hardness_representation,0>::Construct )
+, SchemaEntry("hidden_element_over_riding_styled_item",&STEP::ObjectHelper<hidden_element_over_riding_styled_item,0>::Construct )
+, SchemaEntry("hyperbola",&STEP::ObjectHelper<hyperbola,2>::Construct )
+, SchemaEntry("id_attribute",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("identification_role",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("illuminance_measure_with_unit",&STEP::ObjectHelper<illuminance_measure_with_unit,0>::Construct )
+, SchemaEntry("illuminance_unit",&STEP::ObjectHelper<illuminance_unit,0>::Construct )
+, SchemaEntry("included_text_block",&STEP::ObjectHelper<included_text_block,0>::Construct )
+, SchemaEntry("inclusion_product_concept_feature",&STEP::ObjectHelper<inclusion_product_concept_feature,0>::Construct )
+, SchemaEntry("user_selected_elements",&STEP::ObjectHelper<user_selected_elements,1>::Construct )
+, SchemaEntry("indirectly_selected_elements",&STEP::ObjectHelper<indirectly_selected_elements,1>::Construct )
+, SchemaEntry("indirectly_selected_shape_elements",&STEP::ObjectHelper<indirectly_selected_shape_elements,0>::Construct )
+, SchemaEntry("inductance_measure_with_unit",&STEP::ObjectHelper<inductance_measure_with_unit,0>::Construct )
+, SchemaEntry("inductance_unit",&STEP::ObjectHelper<inductance_unit,0>::Construct )
+, SchemaEntry("information_right",&STEP::ObjectHelper<information_right,0>::Construct )
+, SchemaEntry("information_usage_right",&STEP::ObjectHelper<information_usage_right,0>::Construct )
+, SchemaEntry("instance_usage_context_assignment",&STEP::ObjectHelper<instance_usage_context_assignment,1>::Construct )
+, SchemaEntry("instanced_feature",&STEP::ObjectHelper<instanced_feature,0>::Construct )
+, SchemaEntry("literal_number",&STEP::ObjectHelper<literal_number,1>::Construct )
+, SchemaEntry("int_literal",&STEP::ObjectHelper<int_literal,0>::Construct )
+, SchemaEntry("integer_representation_item",&STEP::ObjectHelper<integer_representation_item,0>::Construct )
+, SchemaEntry("surface_curve",&STEP::ObjectHelper<surface_curve,3>::Construct )
+, SchemaEntry("intersection_curve",&STEP::ObjectHelper<intersection_curve,0>::Construct )
+, SchemaEntry("interval_expression",&STEP::ObjectHelper<interval_expression,0>::Construct )
+, SchemaEntry("iso4217_currency",&STEP::ObjectHelper<iso4217_currency,0>::Construct )
+, SchemaEntry("known_source",&STEP::ObjectHelper<known_source,0>::Construct )
+, SchemaEntry("laid_defined_transformation",&STEP::ObjectHelper<laid_defined_transformation,0>::Construct )
+, SchemaEntry("language",&STEP::ObjectHelper<language,0>::Construct )
+, SchemaEntry("leader_curve",&STEP::ObjectHelper<leader_curve,0>::Construct )
+, SchemaEntry("leader_directed_callout",&STEP::ObjectHelper<leader_directed_callout,0>::Construct )
+, SchemaEntry("leader_directed_dimension",&STEP::ObjectHelper<leader_directed_dimension,0>::Construct )
+, SchemaEntry("leader_terminator",&STEP::ObjectHelper<leader_terminator,0>::Construct )
+, SchemaEntry("length_measure_with_unit",&STEP::ObjectHelper<length_measure_with_unit,0>::Construct )
+, SchemaEntry("length_unit",&STEP::ObjectHelper<length_unit,0>::Construct )
+, SchemaEntry("light_source",&STEP::ObjectHelper<light_source,1>::Construct )
+, SchemaEntry("light_source_ambient",&STEP::ObjectHelper<light_source_ambient,0>::Construct )
+, SchemaEntry("light_source_directional",&STEP::ObjectHelper<light_source_directional,1>::Construct )
+, SchemaEntry("light_source_positional",&STEP::ObjectHelper<light_source_positional,3>::Construct )
+, SchemaEntry("light_source_spot",&STEP::ObjectHelper<light_source_spot,6>::Construct )
+, SchemaEntry("limits_and_fits",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("line",&STEP::ObjectHelper<line,2>::Construct )
+, SchemaEntry("line_profile_tolerance",&STEP::ObjectHelper<line_profile_tolerance,0>::Construct )
+, SchemaEntry("linear_dimension",&STEP::ObjectHelper<linear_dimension,0>::Construct )
+, SchemaEntry("simple_clause",&STEP::ObjectHelper<simple_clause,0>::Construct )
+, SchemaEntry("literal_conjunction",&STEP::ObjectHelper<literal_conjunction,0>::Construct )
+, SchemaEntry("literal_disjunction",&STEP::ObjectHelper<literal_disjunction,0>::Construct )
+, SchemaEntry("local_time",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("logical_literal",&STEP::ObjectHelper<logical_literal,1>::Construct )
+, SchemaEntry("logical_representation_item",&STEP::ObjectHelper<logical_representation_item,0>::Construct )
+, SchemaEntry("loop",&STEP::ObjectHelper<loop,0>::Construct )
+, SchemaEntry("loss_tangent_measure_with_unit",&STEP::ObjectHelper<loss_tangent_measure_with_unit,0>::Construct )
+, SchemaEntry("lot_effectivity",&STEP::ObjectHelper<lot_effectivity,2>::Construct )
+, SchemaEntry("luminous_flux_measure_with_unit",&STEP::ObjectHelper<luminous_flux_measure_with_unit,0>::Construct )
+, SchemaEntry("luminous_flux_unit",&STEP::ObjectHelper<luminous_flux_unit,0>::Construct )
+, SchemaEntry("luminous_intensity_measure_with_unit",&STEP::ObjectHelper<luminous_intensity_measure_with_unit,0>::Construct )
+, SchemaEntry("luminous_intensity_unit",&STEP::ObjectHelper<luminous_intensity_unit,0>::Construct )
+, SchemaEntry("magnetic_flux_density_measure_with_unit",&STEP::ObjectHelper<magnetic_flux_density_measure_with_unit,0>::Construct )
+, SchemaEntry("magnetic_flux_density_unit",&STEP::ObjectHelper<magnetic_flux_density_unit,0>::Construct )
+, SchemaEntry("magnetic_flux_measure_with_unit",&STEP::ObjectHelper<magnetic_flux_measure_with_unit,0>::Construct )
+, SchemaEntry("magnetic_flux_unit",&STEP::ObjectHelper<magnetic_flux_unit,0>::Construct )
+, SchemaEntry("make_from_usage_option",&STEP::ObjectHelper<make_from_usage_option,3>::Construct )
+, SchemaEntry("manifold_subsurface_shape_representation",&STEP::ObjectHelper<manifold_subsurface_shape_representation,0>::Construct )
+, SchemaEntry("manifold_surface_shape_representation",&STEP::ObjectHelper<manifold_surface_shape_representation,0>::Construct )
+, SchemaEntry("mass_measure_with_unit",&STEP::ObjectHelper<mass_measure_with_unit,0>::Construct )
+, SchemaEntry("mass_unit",&STEP::ObjectHelper<mass_unit,0>::Construct )
+, SchemaEntry("material_designation_characterization",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("material_property",&STEP::ObjectHelper<material_property,0>::Construct )
+, SchemaEntry("property_definition_representation",&STEP::ObjectHelper<property_definition_representation,2>::Construct )
+, SchemaEntry("material_property_representation",&STEP::ObjectHelper<material_property_representation,1>::Construct )
+, SchemaEntry("measure_qualification",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("measure_representation_item",&STEP::ObjectHelper<measure_representation_item,0>::Construct )
+, SchemaEntry("product_context",&STEP::ObjectHelper<product_context,1>::Construct )
+, SchemaEntry("mechanical_context",&STEP::ObjectHelper<mechanical_context,0>::Construct )
+, SchemaEntry("mechanical_design_and_draughting_relationship",&STEP::ObjectHelper<mechanical_design_and_draughting_relationship,0>::Construct )
+, SchemaEntry("mechanical_design_geometric_presentation_area",&STEP::ObjectHelper<mechanical_design_geometric_presentation_area,0>::Construct )
+, SchemaEntry("mechanical_design_geometric_presentation_representation",&STEP::ObjectHelper<mechanical_design_geometric_presentation_representation,0>::Construct )
+, SchemaEntry("mechanical_design_presentation_representation_with_draughting",&STEP::ObjectHelper<mechanical_design_presentation_representation_with_draughting,0>::Construct )
+, SchemaEntry("mechanical_design_shaded_presentation_area",&STEP::ObjectHelper<mechanical_design_shaded_presentation_area,0>::Construct )
+, SchemaEntry("mechanical_design_shaded_presentation_representation",&STEP::ObjectHelper<mechanical_design_shaded_presentation_representation,0>::Construct )
+, SchemaEntry("min_and_major_ply_orientation_basis",&STEP::ObjectHelper<min_and_major_ply_orientation_basis,0>::Construct )
+, SchemaEntry("modified_geometric_tolerance",&STEP::ObjectHelper<modified_geometric_tolerance,1>::Construct )
+, SchemaEntry("modified_solid_with_placed_configuration",&STEP::ObjectHelper<modified_solid_with_placed_configuration,1>::Construct )
+, SchemaEntry("moments_of_inertia_representation",&STEP::ObjectHelper<moments_of_inertia_representation,0>::Construct )
+, SchemaEntry("multi_language_attribute_assignment",&STEP::ObjectHelper<multi_language_attribute_assignment,1>::Construct )
+, SchemaEntry("multiple_arity_boolean_expression",&STEP::ObjectHelper<multiple_arity_boolean_expression,0>::Construct )
+, SchemaEntry("multiple_arity_generic_expression",&STEP::ObjectHelper<multiple_arity_generic_expression,1>::Construct )
+, SchemaEntry("multiple_arity_numeric_expression",&STEP::ObjectHelper<multiple_arity_numeric_expression,0>::Construct )
+, SchemaEntry("name_attribute",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("next_assembly_usage_occurrence",&STEP::ObjectHelper<next_assembly_usage_occurrence,0>::Construct )
+, SchemaEntry("non_manifold_surface_shape_representation",&STEP::ObjectHelper<non_manifold_surface_shape_representation,0>::Construct )
+, SchemaEntry("null_representation_item",&STEP::ObjectHelper<null_representation_item,0>::Construct )
+, SchemaEntry("numeric_expression",&STEP::ObjectHelper<numeric_expression,0>::Construct )
+, SchemaEntry("object_role",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("offset_curve_2d",&STEP::ObjectHelper<offset_curve_2d,3>::Construct )
+, SchemaEntry("offset_curve_3d",&STEP::ObjectHelper<offset_curve_3d,4>::Construct )
+, SchemaEntry("offset_surface",&STEP::ObjectHelper<offset_surface,3>::Construct )
+, SchemaEntry("one_direction_repeat_factor",&STEP::ObjectHelper<one_direction_repeat_factor,1>::Construct )
+, SchemaEntry("open_shell",&STEP::ObjectHelper<open_shell,0>::Construct )
+, SchemaEntry("ordinal_date",&STEP::ObjectHelper<ordinal_date,1>::Construct )
+, SchemaEntry("projection_directed_callout",&STEP::ObjectHelper<projection_directed_callout,0>::Construct )
+, SchemaEntry("ordinate_dimension",&STEP::ObjectHelper<ordinate_dimension,0>::Construct )
+, SchemaEntry("organization",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("organization_relationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("organization_role",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("organizational_address",&STEP::ObjectHelper<organizational_address,2>::Construct )
+, SchemaEntry("organizational_project",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("organizational_project_relationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("organizational_project_role",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("oriented_closed_shell",&STEP::ObjectHelper<oriented_closed_shell,2>::Construct )
+, SchemaEntry("oriented_edge",&STEP::ObjectHelper<oriented_edge,2>::Construct )
+, SchemaEntry("oriented_face",&STEP::ObjectHelper<oriented_face,2>::Construct )
+, SchemaEntry("oriented_open_shell",&STEP::ObjectHelper<oriented_open_shell,2>::Construct )
+, SchemaEntry("path",&STEP::ObjectHelper<path,1>::Construct )
+, SchemaEntry("oriented_path",&STEP::ObjectHelper<oriented_path,2>::Construct )
+, SchemaEntry("oriented_surface",&STEP::ObjectHelper<oriented_surface,1>::Construct )
+, SchemaEntry("outer_boundary_curve",&STEP::ObjectHelper<outer_boundary_curve,0>::Construct )
+, SchemaEntry("package_product_concept_feature",&STEP::ObjectHelper<package_product_concept_feature,0>::Construct )
+, SchemaEntry("parabola",&STEP::ObjectHelper<parabola,1>::Construct )
+, SchemaEntry("parallel_offset",&STEP::ObjectHelper<parallel_offset,1>::Construct )
+, SchemaEntry("parallelism_tolerance",&STEP::ObjectHelper<parallelism_tolerance,0>::Construct )
+, SchemaEntry("parametric_representation_context",&STEP::ObjectHelper<parametric_representation_context,0>::Construct )
+, SchemaEntry("partial_document_with_structured_text_representation_assignment",&STEP::ObjectHelper<partial_document_with_structured_text_representation_assignment,0>::Construct )
+, SchemaEntry("pcurve",&STEP::ObjectHelper<pcurve,2>::Construct )
+, SchemaEntry("percentage_laminate_definition",&STEP::ObjectHelper<percentage_laminate_definition,0>::Construct )
+, SchemaEntry("zone_structural_makeup",&STEP::ObjectHelper<zone_structural_makeup,0>::Construct )
+, SchemaEntry("percentage_laminate_table",&STEP::ObjectHelper<percentage_laminate_table,0>::Construct )
+, SchemaEntry("percentage_ply_definition",&STEP::ObjectHelper<percentage_ply_definition,0>::Construct )
+, SchemaEntry("perpendicular_to",&STEP::ObjectHelper<perpendicular_to,0>::Construct )
+, SchemaEntry("perpendicularity_tolerance",&STEP::ObjectHelper<perpendicularity_tolerance,0>::Construct )
+, SchemaEntry("person",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("person_and_organization",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("person_and_organization_address",&STEP::ObjectHelper<person_and_organization_address,0>::Construct )
+, SchemaEntry("person_and_organization_role",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("personal_address",&STEP::ObjectHelper<personal_address,2>::Construct )
+, SchemaEntry("physical_breakdown_context",&STEP::ObjectHelper<physical_breakdown_context,0>::Construct )
+, SchemaEntry("physical_element_usage",&STEP::ObjectHelper<physical_element_usage,0>::Construct )
+, SchemaEntry("presentation_view",&STEP::ObjectHelper<presentation_view,0>::Construct )
+, SchemaEntry("picture_representation",&STEP::ObjectHelper<picture_representation,0>::Construct )
+, SchemaEntry("placed_datum_target_feature",&STEP::ObjectHelper<placed_datum_target_feature,0>::Construct )
+, SchemaEntry("placed_feature",&STEP::ObjectHelper<placed_feature,0>::Construct )
+, SchemaEntry("planar_extent",&STEP::ObjectHelper<planar_extent,2>::Construct )
+, SchemaEntry("planar_box",&STEP::ObjectHelper<planar_box,1>::Construct )
+, SchemaEntry("plane",&STEP::ObjectHelper<plane,0>::Construct )
+, SchemaEntry("plane_angle_measure_with_unit",&STEP::ObjectHelper<plane_angle_measure_with_unit,0>::Construct )
+, SchemaEntry("plane_angle_unit",&STEP::ObjectHelper<plane_angle_unit,0>::Construct )
+, SchemaEntry("plus_minus_tolerance",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("ply_laminate_definition",&STEP::ObjectHelper<ply_laminate_definition,0>::Construct )
+, SchemaEntry("ply_laminate_sequence_definition",&STEP::ObjectHelper<ply_laminate_sequence_definition,0>::Construct )
+, SchemaEntry("ply_laminate_table",&STEP::ObjectHelper<ply_laminate_table,0>::Construct )
+, SchemaEntry("point_and_vector",&STEP::ObjectHelper<point_and_vector,0>::Construct )
+, SchemaEntry("point_on_curve",&STEP::ObjectHelper<point_on_curve,2>::Construct )
+, SchemaEntry("point_on_surface",&STEP::ObjectHelper<point_on_surface,3>::Construct )
+, SchemaEntry("point_path",&STEP::ObjectHelper<point_path,0>::Construct )
+, SchemaEntry("point_replica",&STEP::ObjectHelper<point_replica,2>::Construct )
+, SchemaEntry("point_style",&STEP::ObjectHelper<point_style,4>::Construct )
+, SchemaEntry("polar_complex_number_literal",&STEP::ObjectHelper<polar_complex_number_literal,2>::Construct )
+, SchemaEntry("poly_loop",&STEP::ObjectHelper<poly_loop,1>::Construct )
+, SchemaEntry("polyline",&STEP::ObjectHelper<polyline,1>::Construct )
+, SchemaEntry("position_tolerance",&STEP::ObjectHelper<position_tolerance,0>::Construct )
+, SchemaEntry("positioned_sketch",&STEP::ObjectHelper<positioned_sketch,2>::Construct )
+, SchemaEntry("power_measure_with_unit",&STEP::ObjectHelper<power_measure_with_unit,0>::Construct )
+, SchemaEntry("power_unit",&STEP::ObjectHelper<power_unit,0>::Construct )
+, SchemaEntry("pre_defined_symbol",&STEP::ObjectHelper<pre_defined_symbol,0>::Construct )
+, SchemaEntry("pre_defined_dimension_symbol",&STEP::ObjectHelper<pre_defined_dimension_symbol,0>::Construct )
+, SchemaEntry("pre_defined_geometrical_tolerance_symbol",&STEP::ObjectHelper<pre_defined_geometrical_tolerance_symbol,0>::Construct )
+, SchemaEntry("pre_defined_marker",&STEP::ObjectHelper<pre_defined_marker,0>::Construct )
+, SchemaEntry("pre_defined_point_marker_symbol",&STEP::ObjectHelper<pre_defined_point_marker_symbol,0>::Construct )
+, SchemaEntry("pre_defined_surface_condition_symbol",&STEP::ObjectHelper<pre_defined_surface_condition_symbol,0>::Construct )
+, SchemaEntry("pre_defined_surface_side_style",&STEP::ObjectHelper<pre_defined_surface_side_style,0>::Construct )
+, SchemaEntry("pre_defined_terminator_symbol",&STEP::ObjectHelper<pre_defined_terminator_symbol,0>::Construct )
+, SchemaEntry("pre_defined_tile",&STEP::ObjectHelper<pre_defined_tile,0>::Construct )
+, SchemaEntry("precision_qualifier",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("predefined_picture_representation_item",&STEP::ObjectHelper<predefined_picture_representation_item,0>::Construct )
+, SchemaEntry("presentation_layer_assignment",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("presentation_size",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("presentation_style_assignment",&STEP::ObjectHelper<presentation_style_assignment,1>::Construct )
+, SchemaEntry("presentation_style_by_context",&STEP::ObjectHelper<presentation_style_by_context,1>::Construct )
+, SchemaEntry("presented_item_representation",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("pressure_measure_with_unit",&STEP::ObjectHelper<pressure_measure_with_unit,0>::Construct )
+, SchemaEntry("pressure_unit",&STEP::ObjectHelper<pressure_unit,0>::Construct )
+, SchemaEntry("procedural_representation",&STEP::ObjectHelper<procedural_representation,0>::Construct )
+, SchemaEntry("procedural_representation_sequence",&STEP::ObjectHelper<procedural_representation_sequence,3>::Construct )
+, SchemaEntry("procedural_shape_representation",&STEP::ObjectHelper<procedural_shape_representation,0>::Construct )
+, SchemaEntry("procedural_shape_representation_sequence",&STEP::ObjectHelper<procedural_shape_representation_sequence,0>::Construct )
+, SchemaEntry("product",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("product_category",&STEP::ObjectHelper<product_category,2>::Construct )
+, SchemaEntry("product_class",&STEP::ObjectHelper<product_class,0>::Construct )
+, SchemaEntry("product_concept",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("product_concept_context",&STEP::ObjectHelper<product_concept_context,1>::Construct )
+, SchemaEntry("product_concept_feature_association",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("product_concept_feature_category_usage",&STEP::ObjectHelper<product_concept_feature_category_usage,1>::Construct )
+, SchemaEntry("product_concept_relationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("product_definition_context_association",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("product_definition_context_role",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("product_definition_element_relationship",&STEP::ObjectHelper<product_definition_element_relationship,0>::Construct )
+, SchemaEntry("product_definition_formation",&STEP::ObjectHelper<product_definition_formation,3>::Construct )
+, SchemaEntry("product_definition_formation_relationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("product_definition_formation_with_specified_source",&STEP::ObjectHelper<product_definition_formation_with_specified_source,1>::Construct )
+, SchemaEntry("product_definition_group_assignment",&STEP::ObjectHelper<product_definition_group_assignment,1>::Construct )
+, SchemaEntry("product_definition_occurrence_relationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("product_definition_shape",&STEP::ObjectHelper<product_definition_shape,0>::Construct )
+, SchemaEntry("product_definition_substitute",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("product_definition_with_associated_documents",&STEP::ObjectHelper<product_definition_with_associated_documents,1>::Construct )
+, SchemaEntry("product_identification",&STEP::ObjectHelper<product_identification,0>::Construct )
+, SchemaEntry("product_material_composition_relationship",&STEP::ObjectHelper<product_material_composition_relationship,4>::Construct )
+, SchemaEntry("product_related_product_category",&STEP::ObjectHelper<product_related_product_category,1>::Construct )
+, SchemaEntry("product_specification",&STEP::ObjectHelper<product_specification,0>::Construct )
+, SchemaEntry("tolerance_zone_definition",&STEP::ObjectHelper<tolerance_zone_definition,2>::Construct )
+, SchemaEntry("projected_zone_definition",&STEP::ObjectHelper<projected_zone_definition,2>::Construct )
+, SchemaEntry("projection_curve",&STEP::ObjectHelper<projection_curve,0>::Construct )
+, SchemaEntry("promissory_usage_occurrence",&STEP::ObjectHelper<promissory_usage_occurrence,0>::Construct )
+, SchemaEntry("property_definition_relationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("qualified_representation_item",&STEP::ObjectHelper<qualified_representation_item,1>::Construct )
+, SchemaEntry("qualitative_uncertainty",&STEP::ObjectHelper<qualitative_uncertainty,1>::Construct )
+, SchemaEntry("quantified_assembly_component_usage",&STEP::ObjectHelper<quantified_assembly_component_usage,1>::Construct )
+, SchemaEntry("quasi_uniform_curve",&STEP::ObjectHelper<quasi_uniform_curve,0>::Construct )
+, SchemaEntry("quasi_uniform_surface",&STEP::ObjectHelper<quasi_uniform_surface,0>::Construct )
+, SchemaEntry("radioactivity_measure_with_unit",&STEP::ObjectHelper<radioactivity_measure_with_unit,0>::Construct )
+, SchemaEntry("radioactivity_unit",&STEP::ObjectHelper<radioactivity_unit,0>::Construct )
+, SchemaEntry("radius_dimension",&STEP::ObjectHelper<radius_dimension,0>::Construct )
+, SchemaEntry("range_characteristic",&STEP::ObjectHelper<range_characteristic,0>::Construct )
+, SchemaEntry("ratio_unit",&STEP::ObjectHelper<ratio_unit,0>::Construct )
+, SchemaEntry("rational_b_spline_curve",&STEP::ObjectHelper<rational_b_spline_curve,1>::Construct )
+, SchemaEntry("rational_b_spline_surface",&STEP::ObjectHelper<rational_b_spline_surface,0>::Construct )
+, SchemaEntry("rational_representation_item",&STEP::ObjectHelper<rational_representation_item,0>::Construct )
+, SchemaEntry("real_literal",&STEP::ObjectHelper<real_literal,0>::Construct )
+, SchemaEntry("real_representation_item",&STEP::ObjectHelper<real_representation_item,0>::Construct )
+, SchemaEntry("rectangular_composite_surface",&STEP::ObjectHelper<rectangular_composite_surface,0>::Construct )
+, SchemaEntry("rectangular_trimmed_surface",&STEP::ObjectHelper<rectangular_trimmed_surface,7>::Construct )
+, SchemaEntry("referenced_modified_datum",&STEP::ObjectHelper<referenced_modified_datum,1>::Construct )
+, SchemaEntry("relative_event_occurrence",&STEP::ObjectHelper<relative_event_occurrence,2>::Construct )
+, SchemaEntry("rep_item_group",&STEP::ObjectHelper<rep_item_group,0>::Construct )
+, SchemaEntry("reparametrised_composite_curve_segment",&STEP::ObjectHelper<reparametrised_composite_curve_segment,1>::Construct )
+, SchemaEntry("representation_relationship_with_transformation",&STEP::ObjectHelper<representation_relationship_with_transformation,1>::Construct )
+, SchemaEntry("requirement_assigned_object",&STEP::ObjectHelper<requirement_assigned_object,1>::Construct )
+, SchemaEntry("requirement_assignment",&STEP::ObjectHelper<requirement_assignment,0>::Construct )
+, SchemaEntry("requirement_source",&STEP::ObjectHelper<requirement_source,0>::Construct )
+, SchemaEntry("requirement_view_definition_relationship",&STEP::ObjectHelper<requirement_view_definition_relationship,0>::Construct )
+, SchemaEntry("resistance_measure_with_unit",&STEP::ObjectHelper<resistance_measure_with_unit,0>::Construct )
+, SchemaEntry("resistance_unit",&STEP::ObjectHelper<resistance_unit,0>::Construct )
+, SchemaEntry("revolved_area_solid",&STEP::ObjectHelper<revolved_area_solid,2>::Construct )
+, SchemaEntry("revolved_face_solid",&STEP::ObjectHelper<revolved_face_solid,2>::Construct )
+, SchemaEntry("revolved_face_solid_with_trim_conditions",&STEP::ObjectHelper<revolved_face_solid_with_trim_conditions,2>::Construct )
+, SchemaEntry("right_angular_wedge",&STEP::ObjectHelper<right_angular_wedge,5>::Construct )
+, SchemaEntry("right_circular_cone",&STEP::ObjectHelper<right_circular_cone,4>::Construct )
+, SchemaEntry("right_circular_cylinder",&STEP::ObjectHelper<right_circular_cylinder,3>::Construct )
+, SchemaEntry("right_to_usage_association",&STEP::ObjectHelper<right_to_usage_association,0>::Construct )
+, SchemaEntry("role_association",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("roundness_tolerance",&STEP::ObjectHelper<roundness_tolerance,0>::Construct )
+, SchemaEntry("row_representation_item",&STEP::ObjectHelper<row_representation_item,0>::Construct )
+, SchemaEntry("row_value",&STEP::ObjectHelper<row_value,0>::Construct )
+, SchemaEntry("row_variable",&STEP::ObjectHelper<row_variable,0>::Construct )
+, SchemaEntry("rule_action",&STEP::ObjectHelper<rule_action,0>::Construct )
+, SchemaEntry("rule_condition",&STEP::ObjectHelper<rule_condition,0>::Construct )
+, SchemaEntry("rule_set",&STEP::ObjectHelper<rule_set,0>::Construct )
+, SchemaEntry("rule_set_group",&STEP::ObjectHelper<rule_set_group,0>::Construct )
+, SchemaEntry("rule_superseded_assignment",&STEP::ObjectHelper<rule_superseded_assignment,1>::Construct )
+, SchemaEntry("rule_supersedence",&STEP::ObjectHelper<rule_supersedence,0>::Construct )
+, SchemaEntry("surface_curve_swept_area_solid",&STEP::ObjectHelper<surface_curve_swept_area_solid,4>::Construct )
+, SchemaEntry("ruled_surface_swept_area_solid",&STEP::ObjectHelper<ruled_surface_swept_area_solid,0>::Construct )
+, SchemaEntry("runout_zone_definition",&STEP::ObjectHelper<runout_zone_definition,1>::Construct )
+, SchemaEntry("runout_zone_orientation",&STEP::ObjectHelper<runout_zone_orientation,1>::Construct )
+, SchemaEntry("runout_zone_orientation_reference_direction",&STEP::ObjectHelper<runout_zone_orientation_reference_direction,1>::Construct )
+, SchemaEntry("satisfied_requirement",&STEP::ObjectHelper<satisfied_requirement,1>::Construct )
+, SchemaEntry("satisfies_requirement",&STEP::ObjectHelper<satisfies_requirement,0>::Construct )
+, SchemaEntry("satisfying_item",&STEP::ObjectHelper<satisfying_item,1>::Construct )
+, SchemaEntry("scalar_variable",&STEP::ObjectHelper<scalar_variable,0>::Construct )
+, SchemaEntry("scattering_parameter",&STEP::ObjectHelper<scattering_parameter,0>::Construct )
+, SchemaEntry("sculptured_solid",&STEP::ObjectHelper<sculptured_solid,2>::Construct )
+, SchemaEntry("seam_curve",&STEP::ObjectHelper<seam_curve,0>::Construct )
+, SchemaEntry("security_classification",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("security_classification_level",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("serial_numbered_effectivity",&STEP::ObjectHelper<serial_numbered_effectivity,2>::Construct )
+, SchemaEntry("shape_aspect_associativity",&STEP::ObjectHelper<shape_aspect_associativity,0>::Construct )
+, SchemaEntry("shape_aspect_deriving_relationship",&STEP::ObjectHelper<shape_aspect_deriving_relationship,0>::Construct )
+, SchemaEntry("shape_definition_representation",&STEP::ObjectHelper<shape_definition_representation,0>::Construct )
+, SchemaEntry("shape_dimension_representation",&STEP::ObjectHelper<shape_dimension_representation,0>::Construct )
+, SchemaEntry("shape_feature_definition",&STEP::ObjectHelper<shape_feature_definition,0>::Construct )
+, SchemaEntry("shape_representation_with_parameters",&STEP::ObjectHelper<shape_representation_with_parameters,0>::Construct )
+, SchemaEntry("shell_based_surface_model",&STEP::ObjectHelper<shell_based_surface_model,1>::Construct )
+, SchemaEntry("shell_based_wireframe_model",&STEP::ObjectHelper<shell_based_wireframe_model,1>::Construct )
+, SchemaEntry("shell_based_wireframe_shape_representation",&STEP::ObjectHelper<shell_based_wireframe_shape_representation,0>::Construct )
+, SchemaEntry("si_absorbed_dose_unit",&STEP::ObjectHelper<si_absorbed_dose_unit,0>::Construct )
+, SchemaEntry("si_capacitance_unit",&STEP::ObjectHelper<si_capacitance_unit,0>::Construct )
+, SchemaEntry("si_conductance_unit",&STEP::ObjectHelper<si_conductance_unit,0>::Construct )
+, SchemaEntry("si_dose_equivalent_unit",&STEP::ObjectHelper<si_dose_equivalent_unit,0>::Construct )
+, SchemaEntry("si_electric_charge_unit",&STEP::ObjectHelper<si_electric_charge_unit,0>::Construct )
+, SchemaEntry("si_electric_potential_unit",&STEP::ObjectHelper<si_electric_potential_unit,0>::Construct )
+, SchemaEntry("si_energy_unit",&STEP::ObjectHelper<si_energy_unit,0>::Construct )
+, SchemaEntry("si_force_unit",&STEP::ObjectHelper<si_force_unit,0>::Construct )
+, SchemaEntry("si_frequency_unit",&STEP::ObjectHelper<si_frequency_unit,0>::Construct )
+, SchemaEntry("si_illuminance_unit",&STEP::ObjectHelper<si_illuminance_unit,0>::Construct )
+, SchemaEntry("si_inductance_unit",&STEP::ObjectHelper<si_inductance_unit,0>::Construct )
+, SchemaEntry("si_magnetic_flux_density_unit",&STEP::ObjectHelper<si_magnetic_flux_density_unit,0>::Construct )
+, SchemaEntry("si_magnetic_flux_unit",&STEP::ObjectHelper<si_magnetic_flux_unit,0>::Construct )
+, SchemaEntry("si_power_unit",&STEP::ObjectHelper<si_power_unit,0>::Construct )
+, SchemaEntry("si_pressure_unit",&STEP::ObjectHelper<si_pressure_unit,0>::Construct )
+, SchemaEntry("si_radioactivity_unit",&STEP::ObjectHelper<si_radioactivity_unit,0>::Construct )
+, SchemaEntry("si_resistance_unit",&STEP::ObjectHelper<si_resistance_unit,0>::Construct )
+, SchemaEntry("si_unit",&STEP::ObjectHelper<si_unit,2>::Construct )
+, SchemaEntry("simple_boolean_expression",&STEP::ObjectHelper<simple_boolean_expression,0>::Construct )
+, SchemaEntry("simple_numeric_expression",&STEP::ObjectHelper<simple_numeric_expression,0>::Construct )
+, SchemaEntry("slash_expression",&STEP::ObjectHelper<slash_expression,0>::Construct )
+, SchemaEntry("smeared_material_definition",&STEP::ObjectHelper<smeared_material_definition,0>::Construct )
+, SchemaEntry("solid_angle_measure_with_unit",&STEP::ObjectHelper<solid_angle_measure_with_unit,0>::Construct )
+, SchemaEntry("solid_angle_unit",&STEP::ObjectHelper<solid_angle_unit,0>::Construct )
+, SchemaEntry("solid_curve_font",&STEP::ObjectHelper<solid_curve_font,0>::Construct )
+, SchemaEntry("solid_replica",&STEP::ObjectHelper<solid_replica,2>::Construct )
+, SchemaEntry("solid_with_chamfered_edges",&STEP::ObjectHelper<solid_with_chamfered_edges,0>::Construct )
+, SchemaEntry("solid_with_angle_based_chamfer",&STEP::ObjectHelper<solid_with_angle_based_chamfer,3>::Construct )
+, SchemaEntry("solid_with_shape_element_pattern",&STEP::ObjectHelper<solid_with_shape_element_pattern,1>::Construct )
+, SchemaEntry("solid_with_circular_pattern",&STEP::ObjectHelper<solid_with_circular_pattern,4>::Construct )
+, SchemaEntry("solid_with_depression",&STEP::ObjectHelper<solid_with_depression,1>::Construct )
+, SchemaEntry("solid_with_pocket",&STEP::ObjectHelper<solid_with_pocket,2>::Construct )
+, SchemaEntry("solid_with_circular_pocket",&STEP::ObjectHelper<solid_with_circular_pocket,1>::Construct )
+, SchemaEntry("solid_with_protrusion",&STEP::ObjectHelper<solid_with_protrusion,2>::Construct )
+, SchemaEntry("solid_with_circular_protrusion",&STEP::ObjectHelper<solid_with_circular_protrusion,1>::Construct )
+, SchemaEntry("solid_with_hole",&STEP::ObjectHelper<solid_with_hole,0>::Construct )
+, SchemaEntry("solid_with_stepped_round_hole",&STEP::ObjectHelper<solid_with_stepped_round_hole,1>::Construct )
+, SchemaEntry("solid_with_conical_bottom_round_hole",&STEP::ObjectHelper<solid_with_conical_bottom_round_hole,2>::Construct )
+, SchemaEntry("solid_with_constant_radius_edge_blend",&STEP::ObjectHelper<solid_with_constant_radius_edge_blend,1>::Construct )
+, SchemaEntry("solid_with_slot",&STEP::ObjectHelper<solid_with_slot,2>::Construct )
+, SchemaEntry("solid_with_curved_slot",&STEP::ObjectHelper<solid_with_curved_slot,1>::Construct )
+, SchemaEntry("solid_with_double_offset_chamfer",&STEP::ObjectHelper<solid_with_double_offset_chamfer,2>::Construct )
+, SchemaEntry("solid_with_flat_bottom_round_hole",&STEP::ObjectHelper<solid_with_flat_bottom_round_hole,1>::Construct )
+, SchemaEntry("solid_with_general_pocket",&STEP::ObjectHelper<solid_with_general_pocket,2>::Construct )
+, SchemaEntry("solid_with_general_protrusion",&STEP::ObjectHelper<solid_with_general_protrusion,2>::Construct )
+, SchemaEntry("solid_with_groove",&STEP::ObjectHelper<solid_with_groove,5>::Construct )
+, SchemaEntry("solid_with_incomplete_circular_pattern",&STEP::ObjectHelper<solid_with_incomplete_circular_pattern,1>::Construct )
+, SchemaEntry("solid_with_rectangular_pattern",&STEP::ObjectHelper<solid_with_rectangular_pattern,4>::Construct )
+, SchemaEntry("solid_with_incomplete_rectangular_pattern",&STEP::ObjectHelper<solid_with_incomplete_rectangular_pattern,0>::Construct )
+, SchemaEntry("solid_with_rectangular_pocket",&STEP::ObjectHelper<solid_with_rectangular_pocket,3>::Construct )
+, SchemaEntry("solid_with_rectangular_protrusion",&STEP::ObjectHelper<solid_with_rectangular_protrusion,3>::Construct )
+, SchemaEntry("solid_with_single_offset_chamfer",&STEP::ObjectHelper<solid_with_single_offset_chamfer,1>::Construct )
+, SchemaEntry("solid_with_spherical_bottom_round_hole",&STEP::ObjectHelper<solid_with_spherical_bottom_round_hole,1>::Construct )
+, SchemaEntry("solid_with_stepped_round_hole_and_conical_transitions",&STEP::ObjectHelper<solid_with_stepped_round_hole_and_conical_transitions,1>::Construct )
+, SchemaEntry("solid_with_straight_slot",&STEP::ObjectHelper<solid_with_straight_slot,1>::Construct )
+, SchemaEntry("solid_with_tee_section_slot",&STEP::ObjectHelper<solid_with_tee_section_slot,2>::Construct )
+, SchemaEntry("solid_with_through_depression",&STEP::ObjectHelper<solid_with_through_depression,1>::Construct )
+, SchemaEntry("solid_with_trapezoidal_section_slot",&STEP::ObjectHelper<solid_with_trapezoidal_section_slot,2>::Construct )
+, SchemaEntry("solid_with_variable_radius_edge_blend",&STEP::ObjectHelper<solid_with_variable_radius_edge_blend,3>::Construct )
+, SchemaEntry("source_for_requirement",&STEP::ObjectHelper<source_for_requirement,1>::Construct )
+, SchemaEntry("sourced_requirement",&STEP::ObjectHelper<sourced_requirement,1>::Construct )
+, SchemaEntry("specification_definition",&STEP::ObjectHelper<specification_definition,0>::Construct )
+, SchemaEntry("specified_higher_usage_occurrence",&STEP::ObjectHelper<specified_higher_usage_occurrence,2>::Construct )
+, SchemaEntry("sphere",&STEP::ObjectHelper<sphere,2>::Construct )
+, SchemaEntry("spherical_surface",&STEP::ObjectHelper<spherical_surface,1>::Construct )
+, SchemaEntry("start_request",&STEP::ObjectHelper<start_request,1>::Construct )
+, SchemaEntry("start_work",&STEP::ObjectHelper<start_work,1>::Construct )
+, SchemaEntry("straightness_tolerance",&STEP::ObjectHelper<straightness_tolerance,0>::Construct )
+, SchemaEntry("structured_dimension_callout",&STEP::ObjectHelper<structured_dimension_callout,0>::Construct )
+, SchemaEntry("structured_text_composition",&STEP::ObjectHelper<structured_text_composition,0>::Construct )
+, SchemaEntry("structured_text_representation",&STEP::ObjectHelper<structured_text_representation,0>::Construct )
+, SchemaEntry("subedge",&STEP::ObjectHelper<subedge,1>::Construct )
+, SchemaEntry("subface",&STEP::ObjectHelper<subface,1>::Construct )
+, SchemaEntry("supplied_part_relationship",&STEP::ObjectHelper<supplied_part_relationship,0>::Construct )
+, SchemaEntry("surface_condition_callout",&STEP::ObjectHelper<surface_condition_callout,0>::Construct )
+, SchemaEntry("swept_surface",&STEP::ObjectHelper<swept_surface,1>::Construct )
+, SchemaEntry("surface_of_linear_extrusion",&STEP::ObjectHelper<surface_of_linear_extrusion,1>::Construct )
+, SchemaEntry("surface_of_revolution",&STEP::ObjectHelper<surface_of_revolution,1>::Construct )
+, SchemaEntry("surface_patch",&STEP::ObjectHelper<surface_patch,5>::Construct )
+, SchemaEntry("surface_profile_tolerance",&STEP::ObjectHelper<surface_profile_tolerance,0>::Construct )
+, SchemaEntry("surface_rendering_properties",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("surface_replica",&STEP::ObjectHelper<surface_replica,2>::Construct )
+, SchemaEntry("surface_side_style",&STEP::ObjectHelper<surface_side_style,2>::Construct )
+, SchemaEntry("surface_style_boundary",&STEP::ObjectHelper<surface_style_boundary,1>::Construct )
+, SchemaEntry("surface_style_control_grid",&STEP::ObjectHelper<surface_style_control_grid,1>::Construct )
+, SchemaEntry("surface_style_fill_area",&STEP::ObjectHelper<surface_style_fill_area,1>::Construct )
+, SchemaEntry("surface_style_parameter_line",&STEP::ObjectHelper<surface_style_parameter_line,2>::Construct )
+, SchemaEntry("surface_style_reflectance_ambient",&STEP::ObjectHelper<surface_style_reflectance_ambient,1>::Construct )
+, SchemaEntry("surface_style_reflectance_ambient_diffuse",&STEP::ObjectHelper<surface_style_reflectance_ambient_diffuse,1>::Construct )
+, SchemaEntry("surface_style_reflectance_ambient_diffuse_specular",&STEP::ObjectHelper<surface_style_reflectance_ambient_diffuse_specular,3>::Construct )
+, SchemaEntry("surface_style_rendering",&STEP::ObjectHelper<surface_style_rendering,2>::Construct )
+, SchemaEntry("surface_style_rendering_with_properties",&STEP::ObjectHelper<surface_style_rendering_with_properties,1>::Construct )
+, SchemaEntry("surface_style_segmentation_curve",&STEP::ObjectHelper<surface_style_segmentation_curve,1>::Construct )
+, SchemaEntry("surface_style_silhouette",&STEP::ObjectHelper<surface_style_silhouette,1>::Construct )
+, SchemaEntry("surface_style_transparent",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("surface_style_usage",&STEP::ObjectHelper<surface_style_usage,2>::Construct )
+, SchemaEntry("surface_texture_representation",&STEP::ObjectHelper<surface_texture_representation,0>::Construct )
+, SchemaEntry("surfaced_open_shell",&STEP::ObjectHelper<surfaced_open_shell,0>::Construct )
+, SchemaEntry("swept_disk_solid",&STEP::ObjectHelper<swept_disk_solid,5>::Construct )
+, SchemaEntry("symbol",&STEP::ObjectHelper<symbol,0>::Construct )
+, SchemaEntry("symbol_colour",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("symbol_representation_map",&STEP::ObjectHelper<symbol_representation_map,0>::Construct )
+, SchemaEntry("symbol_style",&STEP::ObjectHelper<symbol_style,2>::Construct )
+, SchemaEntry("symbol_target",&STEP::ObjectHelper<symbol_target,3>::Construct )
+, SchemaEntry("symmetric_shape_aspect",&STEP::ObjectHelper<symmetric_shape_aspect,0>::Construct )
+, SchemaEntry("symmetry_tolerance",&STEP::ObjectHelper<symmetry_tolerance,0>::Construct )
+, SchemaEntry("table_representation_item",&STEP::ObjectHelper<table_representation_item,0>::Construct )
+, SchemaEntry("tactile_appearance_representation",&STEP::ObjectHelper<tactile_appearance_representation,0>::Construct )
+, SchemaEntry("tagged_text_format",&STEP::ObjectHelper<tagged_text_format,0>::Construct )
+, SchemaEntry("tagged_text_item",&STEP::ObjectHelper<tagged_text_item,0>::Construct )
+, SchemaEntry("tangent",&STEP::ObjectHelper<tangent,0>::Construct )
+, SchemaEntry("text_font",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("text_font_family",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("text_font_in_family",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("text_literal_with_associated_curves",&STEP::ObjectHelper<text_literal_with_associated_curves,1>::Construct )
+, SchemaEntry("text_literal_with_blanking_box",&STEP::ObjectHelper<text_literal_with_blanking_box,1>::Construct )
+, SchemaEntry("text_literal_with_extent",&STEP::ObjectHelper<text_literal_with_extent,1>::Construct )
+, SchemaEntry("text_string_representation",&STEP::ObjectHelper<text_string_representation,0>::Construct )
+, SchemaEntry("text_style",&STEP::ObjectHelper<text_style,2>::Construct )
+, SchemaEntry("text_style_for_defined_font",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("text_style_with_box_characteristics",&STEP::ObjectHelper<text_style_with_box_characteristics,1>::Construct )
+, SchemaEntry("text_style_with_mirror",&STEP::ObjectHelper<text_style_with_mirror,1>::Construct )
+, SchemaEntry("text_style_with_spacing",&STEP::ObjectHelper<text_style_with_spacing,1>::Construct )
+, SchemaEntry("thermal_resistance_measure_with_unit",&STEP::ObjectHelper<thermal_resistance_measure_with_unit,0>::Construct )
+, SchemaEntry("thermal_resistance_unit",&STEP::ObjectHelper<thermal_resistance_unit,0>::Construct )
+, SchemaEntry("thermodynamic_temperature_measure_with_unit",&STEP::ObjectHelper<thermodynamic_temperature_measure_with_unit,0>::Construct )
+, SchemaEntry("thermodynamic_temperature_unit",&STEP::ObjectHelper<thermodynamic_temperature_unit,0>::Construct )
+, SchemaEntry("thickened_face_solid",&STEP::ObjectHelper<thickened_face_solid,3>::Construct )
+, SchemaEntry("thickness_laminate_definition",&STEP::ObjectHelper<thickness_laminate_definition,0>::Construct )
+, SchemaEntry("thickness_laminate_table",&STEP::ObjectHelper<thickness_laminate_table,0>::Construct )
+, SchemaEntry("time_interval",&STEP::ObjectHelper<time_interval,3>::Construct )
+, SchemaEntry("time_interval_based_effectivity",&STEP::ObjectHelper<time_interval_based_effectivity,1>::Construct )
+, SchemaEntry("time_interval_relationship",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("time_interval_role",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("time_interval_with_bounds",&STEP::ObjectHelper<time_interval_with_bounds,3>::Construct )
+, SchemaEntry("time_measure_with_unit",&STEP::ObjectHelper<time_measure_with_unit,0>::Construct )
+, SchemaEntry("time_unit",&STEP::ObjectHelper<time_unit,0>::Construct )
+, SchemaEntry("tolerance_value",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("tolerance_zone",&STEP::ObjectHelper<tolerance_zone,2>::Construct )
+, SchemaEntry("tolerance_zone_form",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("torus",&STEP::ObjectHelper<torus,3>::Construct )
+, SchemaEntry("total_runout_tolerance",&STEP::ObjectHelper<total_runout_tolerance,0>::Construct )
+, SchemaEntry("track_blended_solid",&STEP::ObjectHelper<track_blended_solid,0>::Construct )
+, SchemaEntry("track_blended_solid_with_end_conditions",&STEP::ObjectHelper<track_blended_solid_with_end_conditions,1>::Construct )
+, SchemaEntry("trimmed_curve",&STEP::ObjectHelper<trimmed_curve,5>::Construct )
+, SchemaEntry("two_direction_repeat_factor",&STEP::ObjectHelper<two_direction_repeat_factor,1>::Construct )
+, SchemaEntry("type_qualifier",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("unary_generic_expression",&STEP::ObjectHelper<unary_generic_expression,1>::Construct )
+, SchemaEntry("unary_numeric_expression",&STEP::ObjectHelper<unary_numeric_expression,0>::Construct )
+, SchemaEntry("uncertainty_assigned_representation",&STEP::ObjectHelper<uncertainty_assigned_representation,1>::Construct )
+, SchemaEntry("uncertainty_measure_with_unit",&STEP::ObjectHelper<uncertainty_measure_with_unit,2>::Construct )
+, SchemaEntry("uniform_curve",&STEP::ObjectHelper<uniform_curve,0>::Construct )
+, SchemaEntry("uniform_resource_identifier",&STEP::ObjectHelper<uniform_resource_identifier,0>::Construct )
+, SchemaEntry("uniform_surface",&STEP::ObjectHelper<uniform_surface,0>::Construct )
+, SchemaEntry("usage_association",&STEP::ObjectHelper<usage_association,0>::Construct )
+, SchemaEntry("user_defined_curve_font",&STEP::ObjectHelper<user_defined_curve_font,0>::Construct )
+, SchemaEntry("user_defined_marker",&STEP::ObjectHelper<user_defined_marker,0>::Construct )
+, SchemaEntry("user_defined_terminator_symbol",&STEP::ObjectHelper<user_defined_terminator_symbol,0>::Construct )
+, SchemaEntry("user_selected_shape_elements",&STEP::ObjectHelper<user_selected_shape_elements,0>::Construct )
+, SchemaEntry("value_range",&STEP::ObjectHelper<value_range,0>::Construct )
+, SchemaEntry("value_representation_item",&STEP::ObjectHelper<value_representation_item,1>::Construct )
+, SchemaEntry("variable_semantics",&STEP::ObjectHelper<variable_semantics,0>::Construct )
+, SchemaEntry("variational_representation_item",&STEP::ObjectHelper<variational_representation_item,0>::Construct )
+, SchemaEntry("vector",&STEP::ObjectHelper<vector,2>::Construct )
+, SchemaEntry("vector_style",&STEP::ObjectHelper<vector_style,0>::Construct )
+, SchemaEntry("velocity_measure_with_unit",&STEP::ObjectHelper<velocity_measure_with_unit,0>::Construct )
+, SchemaEntry("velocity_unit",&STEP::ObjectHelper<velocity_unit,0>::Construct )
+, SchemaEntry("versioned_action_request",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+, SchemaEntry("vertex",&STEP::ObjectHelper<vertex,0>::Construct )
+, SchemaEntry("vertex_loop",&STEP::ObjectHelper<vertex_loop,1>::Construct )
+, SchemaEntry("vertex_point",&STEP::ObjectHelper<vertex_point,1>::Construct )
+, SchemaEntry("vertex_shell",&STEP::ObjectHelper<vertex_shell,1>::Construct )
+, SchemaEntry("view_volume",&STEP::ObjectHelper<view_volume,9>::Construct )
+, SchemaEntry("visual_appearance_representation",&STEP::ObjectHelper<visual_appearance_representation,0>::Construct )
+, SchemaEntry("volume_measure_with_unit",&STEP::ObjectHelper<volume_measure_with_unit,0>::Construct )
+, SchemaEntry("volume_unit",&STEP::ObjectHelper<volume_unit,0>::Construct )
+, SchemaEntry("week_of_year_and_day_date",&STEP::ObjectHelper<week_of_year_and_day_date,2>::Construct )
+, SchemaEntry("wire_shell",&STEP::ObjectHelper<wire_shell,1>::Construct )
+, SchemaEntry("year_month",&STEP::ObjectHelper<year_month,1>::Construct )
+
+ };
+}
+
+// -----------------------------------------------------------------------------------------------------------
+void StepFile::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<measure_with_unit>(const DB& db, const LIST& params, measure_with_unit* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to measure_with_unit"); } do { // convert the 'value_component' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::measure_with_unit,2>::aux_is_derived[0]=true; break; }
+ try { GenericConvert( in->value_component, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to measure_with_unit to be a `measure_value`")); }
+ } while(0);
+ do { // convert the 'unit_component' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::measure_with_unit,2>::aux_is_derived[1]=true; break; }
+ try { GenericConvert( in->unit_component, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to measure_with_unit to be a `unit`")); }
+ } while(0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<absorbed_dose_measure_with_unit>(const DB& db, const LIST& params, absorbed_dose_measure_with_unit* in)
+{
+ size_t base = GenericFill(db,params,static_cast<measure_with_unit*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to absorbed_dose_measure_with_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<derived_unit>(const DB& db, const LIST& params, derived_unit* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to derived_unit"); } do { // convert the 'elements' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::derived_unit,1>::aux_is_derived[0]=true; break; }
+ try { GenericConvert( in->elements, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to derived_unit to be a `SET [1:?] OF derived_unit_element`")); }
+ } while(0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<absorbed_dose_unit>(const DB& db, const LIST& params, absorbed_dose_unit* in)
+{
+ size_t base = GenericFill(db,params,static_cast<derived_unit*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to absorbed_dose_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<abstract_variable>(const DB& db, const LIST& params, abstract_variable* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<acceleration_measure_with_unit>(const DB& db, const LIST& params, acceleration_measure_with_unit* in)
+{
+ size_t base = GenericFill(db,params,static_cast<measure_with_unit*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to acceleration_measure_with_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<acceleration_unit>(const DB& db, const LIST& params, acceleration_unit* in)
+{
+ size_t base = GenericFill(db,params,static_cast<derived_unit*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to acceleration_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<action>(const DB& db, const LIST& params, action* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to action"); } do { // convert the 'name' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::action,3>::aux_is_derived[0]=true; break; }
+ try { GenericConvert( in->name, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to action to be a `label`")); }
+ } while(0);
+ do { // convert the 'description' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::action,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 action to be a `text`")); }
+ } while(0);
+ do { // convert the 'chosen_method' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::action,3>::aux_is_derived[2]=true; break; }
+ try { GenericConvert( in->chosen_method, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to action to be a `action_method`")); }
+ } while(0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<action_assignment>(const DB& db, const LIST& params, action_assignment* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to action_assignment"); } do { // convert the 'assigned_action' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::action_assignment,1>::aux_is_derived[0]=true; break; }
+ try { GenericConvert( in->assigned_action, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to action_assignment to be a `action`")); }
+ } while(0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<action_method>(const DB& db, const LIST& params, action_method* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to action_method"); } do { // convert the 'name' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::action_method,4>::aux_is_derived[0]=true; break; }
+ try { GenericConvert( in->name, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to action_method to be a `label`")); }
+ } while(0);
+ do { // convert the 'description' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::action_method,4>::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 action_method to be a `text`")); }
+ } while(0);
+ do { // convert the 'consequence' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::action_method,4>::aux_is_derived[2]=true; break; }
+ try { GenericConvert( in->consequence, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to action_method to be a `text`")); }
+ } while(0);
+ do { // convert the 'purpose' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::action_method,4>::aux_is_derived[3]=true; break; }
+ try { GenericConvert( in->purpose, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to action_method to be a `text`")); }
+ } while(0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<action_method_assignment>(const DB& db, const LIST& params, action_method_assignment* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to action_method_assignment"); } do { // convert the 'assigned_action_method' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::action_method_assignment,2>::aux_is_derived[0]=true; break; }
+ try { GenericConvert( in->assigned_action_method, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to action_method_assignment to be a `action_method`")); }
+ } while(0);
+ do { // convert the 'role' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::action_method_assignment,2>::aux_is_derived[1]=true; break; }
+ try { GenericConvert( in->role, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to action_method_assignment to be a `action_method_role`")); }
+ } while(0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<action_method_relationship>(const DB& db, const LIST& params, action_method_relationship* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to action_method_relationship"); } do { // convert the 'name' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::action_method_relationship,4>::aux_is_derived[0]=true; break; }
+ try { GenericConvert( in->name, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to action_method_relationship to be a `label`")); }
+ } while(0);
+ do { // convert the 'description' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::action_method_relationship,4>::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 action_method_relationship to be a `text`")); }
+ } while(0);
+ do { // convert the 'relating_method' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::action_method_relationship,4>::aux_is_derived[2]=true; break; }
+ try { GenericConvert( in->relating_method, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to action_method_relationship to be a `action_method`")); }
+ } while(0);
+ do { // convert the 'related_method' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::action_method_relationship,4>::aux_is_derived[3]=true; break; }
+ try { GenericConvert( in->related_method, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to action_method_relationship to be a `action_method`")); }
+ } while(0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<action_request_assignment>(const DB& db, const LIST& params, action_request_assignment* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to action_request_assignment"); } do { // convert the 'assigned_action_request' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::action_request_assignment,1>::aux_is_derived[0]=true; break; }
+ try { GenericConvert( in->assigned_action_request, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to action_request_assignment to be a `versioned_action_request`")); }
+ } while(0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<address>(const DB& db, const LIST& params, address* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 12) { throw STEP::TypeError("expected 12 arguments to address"); } do { // convert the 'internal_location' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::address,12>::aux_is_derived[0]=true; break; }
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert( in->internal_location, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to address to be a `label`")); }
+ } while(0);
+ do { // convert the 'street_number' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::address,12>::aux_is_derived[1]=true; break; }
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert( in->street_number, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to address to be a `label`")); }
+ } while(0);
+ do { // convert the 'street' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::address,12>::aux_is_derived[2]=true; break; }
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert( in->street, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to address to be a `label`")); }
+ } while(0);
+ do { // convert the 'postal_box' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::address,12>::aux_is_derived[3]=true; break; }
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert( in->postal_box, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to address to be a `label`")); }
+ } while(0);
+ do { // convert the 'town' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::address,12>::aux_is_derived[4]=true; break; }
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert( in->town, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to address to be a `label`")); }
+ } while(0);
+ do { // convert the 'region' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::address,12>::aux_is_derived[5]=true; break; }
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert( in->region, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to address to be a `label`")); }
+ } while(0);
+ do { // convert the 'postal_code' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::address,12>::aux_is_derived[6]=true; break; }
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert( in->postal_code, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to address to be a `label`")); }
+ } while(0);
+ do { // convert the 'country' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::address,12>::aux_is_derived[7]=true; break; }
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert( in->country, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to address to be a `label`")); }
+ } while(0);
+ do { // convert the 'facsimile_number' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::address,12>::aux_is_derived[8]=true; break; }
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert( in->facsimile_number, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 8 to address to be a `label`")); }
+ } while(0);
+ do { // convert the 'telephone_number' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::address,12>::aux_is_derived[9]=true; break; }
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert( in->telephone_number, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 9 to address to be a `label`")); }
+ } while(0);
+ do { // convert the 'electronic_mail_address' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::address,12>::aux_is_derived[10]=true; break; }
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert( in->electronic_mail_address, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 10 to address to be a `label`")); }
+ } while(0);
+ do { // convert the 'telex_number' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::address,12>::aux_is_derived[11]=true; break; }
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert( in->telex_number, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 11 to address to be a `label`")); }
+ } while(0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<representation>(const DB& db, const LIST& params, representation* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to representation"); } do { // convert the 'name' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::representation,3>::aux_is_derived[0]=true; break; }
+ try { GenericConvert( in->name, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to representation to be a `label`")); }
+ } while(0);
+ do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::representation,3>::aux_is_derived[1]=true; break; }
+ try { GenericConvert( in->items, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to representation to be a `SET [1:?] OF representation_item`")); }
+ } while(0);
+ do { // convert the 'context_of_items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::representation,3>::aux_is_derived[2]=true; break; }
+ try { GenericConvert( in->context_of_items, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to representation to be a `representation_context`")); }
+ } while(0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<shape_representation>(const DB& db, const LIST& params, shape_representation* in)
+{
+ size_t base = GenericFill(db,params,static_cast<representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to shape_representation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<advanced_brep_shape_representation>(const DB& db, const LIST& params, advanced_brep_shape_representation* in)
+{
+ size_t base = GenericFill(db,params,static_cast<shape_representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to advanced_brep_shape_representation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<face_surface>(const DB& db, const LIST& params, face_surface* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to face_surface"); } do { // convert the 'face_geometry' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::face_surface,2>::aux_is_derived[0]=true; break; }
+ try { GenericConvert( in->face_geometry, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to face_surface to be a `surface`")); }
+ } while(0);
+ do { // convert the 'same_sense' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::face_surface,2>::aux_is_derived[1]=true; break; }
+ try { GenericConvert( in->same_sense, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to face_surface to be a `BOOLEAN`")); }
+ } while(0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<advanced_face>(const DB& db, const LIST& params, advanced_face* in)
+{
+ size_t base = GenericFill(db,params,static_cast<face_surface*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to advanced_face"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<amount_of_substance_measure_with_unit>(const DB& db, const LIST& params, amount_of_substance_measure_with_unit* in)
+{
+ size_t base = GenericFill(db,params,static_cast<measure_with_unit*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to amount_of_substance_measure_with_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<named_unit>(const DB& db, const LIST& params, named_unit* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to named_unit"); } do { // convert the 'dimensions' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::named_unit,1>::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 named_unit to be a `dimensional_exponents`")); }
+ } while(0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<amount_of_substance_unit>(const DB& db, const LIST& params, amount_of_substance_unit* in)
+{
+ size_t base = GenericFill(db,params,static_cast<named_unit*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to amount_of_substance_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<angle_direction_reference>(const DB& db, const LIST& params, angle_direction_reference* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<representation_item>(const DB& db, const LIST& params, representation_item* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to representation_item"); } do { // convert the 'name' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::representation_item,1>::aux_is_derived[0]=true; break; }
+ try { GenericConvert( in->name, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to representation_item to be a `label`")); }
+ } while(0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<geometric_representation_item>(const DB& db, const LIST& params, geometric_representation_item* in)
+{
+ size_t base = GenericFill(db,params,static_cast<representation_item*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to geometric_representation_item"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<draughting_callout>(const DB& db, const LIST& params, draughting_callout* in)
+{
+ size_t base = GenericFill(db,params,static_cast<geometric_representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to draughting_callout"); } do { // convert the 'contents' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::draughting_callout,1>::aux_is_derived[0]=true; break; }
+ try { GenericConvert( in->contents, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to draughting_callout to be a `SET [1:?] OF draughting_callout_element`")); }
+ } while(0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<dimension_curve_directed_callout>(const DB& db, const LIST& params, dimension_curve_directed_callout* in)
+{
+ size_t base = GenericFill(db,params,static_cast<draughting_callout*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to dimension_curve_directed_callout"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<angular_dimension>(const DB& db, const LIST& params, angular_dimension* in)
+{
+ size_t base = GenericFill(db,params,static_cast<dimension_curve_directed_callout*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to angular_dimension"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<shape_aspect_relationship>(const DB& db, const LIST& params, shape_aspect_relationship* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to shape_aspect_relationship"); } do { // convert the 'name' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::shape_aspect_relationship,4>::aux_is_derived[0]=true; break; }
+ try { GenericConvert( in->name, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to shape_aspect_relationship to be a `label`")); }
+ } while(0);
+ do { // convert the 'description' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::shape_aspect_relationship,4>::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 shape_aspect_relationship to be a `text`")); }
+ } while(0);
+ do { // convert the 'relating_shape_aspect' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::shape_aspect_relationship,4>::aux_is_derived[2]=true; break; }
+ try { GenericConvert( in->relating_shape_aspect, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to shape_aspect_relationship to be a `shape_aspect`")); }
+ } while(0);
+ do { // convert the 'related_shape_aspect' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::shape_aspect_relationship,4>::aux_is_derived[3]=true; break; }
+ try { GenericConvert( in->related_shape_aspect, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to shape_aspect_relationship to be a `shape_aspect`")); }
+ } while(0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<dimensional_location>(const DB& db, const LIST& params, dimensional_location* in)
+{
+ size_t base = GenericFill(db,params,static_cast<shape_aspect_relationship*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to dimensional_location"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<angular_location>(const DB& db, const LIST& params, angular_location* in)
+{
+ size_t base = GenericFill(db,params,static_cast<dimensional_location*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to angular_location"); } do { // convert the 'angle_selection' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert( in->angle_selection, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to angular_location to be a `angle_relator`")); }
+ } while(0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<dimensional_size>(const DB& db, const LIST& params, dimensional_size* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to dimensional_size"); } do { // convert the 'applies_to' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::dimensional_size,2>::aux_is_derived[0]=true; break; }
+ try { GenericConvert( in->applies_to, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to dimensional_size to be a `shape_aspect`")); }
+ } while(0);
+ do { // convert the 'name' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::dimensional_size,2>::aux_is_derived[1]=true; break; }
+ try { GenericConvert( in->name, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to dimensional_size to be a `label`")); }
+ } while(0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<angular_size>(const DB& db, const LIST& params, angular_size* in)
+{
+ size_t base = GenericFill(db,params,static_cast<dimensional_size*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to angular_size"); } do { // convert the 'angle_selection' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert( in->angle_selection, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to angular_size to be a `angle_relator`")); }
+ } while(0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<geometric_tolerance>(const DB& db, const LIST& params, geometric_tolerance* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to geometric_tolerance"); } do { // convert the 'name' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::geometric_tolerance,4>::aux_is_derived[0]=true; break; }
+ try { GenericConvert( in->name, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to geometric_tolerance to be a `label`")); }
+ } while(0);
+ do { // convert the 'description' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::geometric_tolerance,4>::aux_is_derived[1]=true; break; }
+ try { GenericConvert( in->description, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to geometric_tolerance to be a `text`")); }
+ } while(0);
+ do { // convert the 'magnitude' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::geometric_tolerance,4>::aux_is_derived[2]=true; break; }
+ try { GenericConvert( in->magnitude, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to geometric_tolerance to be a `measure_with_unit`")); }
+ } while(0);
+ do { // convert the 'toleranced_shape_aspect' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::geometric_tolerance,4>::aux_is_derived[3]=true; break; }
+ try { GenericConvert( in->toleranced_shape_aspect, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to geometric_tolerance to be a `shape_aspect`")); }
+ } while(0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<geometric_tolerance_with_datum_reference>(const DB& db, const LIST& params, geometric_tolerance_with_datum_reference* in)
+{
+ size_t base = GenericFill(db,params,static_cast<geometric_tolerance*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to geometric_tolerance_with_datum_reference"); } do { // convert the 'datum_system' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::geometric_tolerance_with_datum_reference,1>::aux_is_derived[0]=true; break; }
+ try { GenericConvert( in->datum_system, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to geometric_tolerance_with_datum_reference to be a `SET [1:?] OF datum_reference`")); }
+ } while(0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<angularity_tolerance>(const DB& db, const LIST& params, angularity_tolerance* in)
+{
+ size_t base = GenericFill(db,params,static_cast<geometric_tolerance_with_datum_reference*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to angularity_tolerance"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<styled_item>(const DB& db, const LIST& params, styled_item* in)
+{
+ size_t base = GenericFill(db,params,static_cast<representation_item*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to styled_item"); } do { // convert the 'styles' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::styled_item,2>::aux_is_derived[0]=true; break; }
+ try { GenericConvert( in->styles, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to styled_item to be a `SET [1:?] OF presentation_style_assignment`")); }
+ } while(0);
+ do { // convert the 'item' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::styled_item,2>::aux_is_derived[1]=true; break; }
+ try { GenericConvert( in->item, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to styled_item to be a `representation_item`")); }
+ } while(0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<annotation_occurrence>(const DB& db, const LIST& params, annotation_occurrence* in)
+{
+ size_t base = GenericFill(db,params,static_cast<styled_item*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to annotation_occurrence"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<annotation_curve_occurrence>(const DB& db, const LIST& params, annotation_curve_occurrence* in)
+{
+ size_t base = GenericFill(db,params,static_cast<annotation_occurrence*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to annotation_curve_occurrence"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<annotation_fill_area>(const DB& db, const LIST& params, annotation_fill_area* in)
+{
+ size_t base = GenericFill(db,params,static_cast<geometric_representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to annotation_fill_area"); } do { // convert the 'boundaries' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert( in->boundaries, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to annotation_fill_area to be a `SET [1:?] OF curve`")); }
+ } while(0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<annotation_fill_area_occurrence>(const DB& db, const LIST& params, annotation_fill_area_occurrence* in)
+{
+ size_t base = GenericFill(db,params,static_cast<annotation_occurrence*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to annotation_fill_area_occurrence"); } do { // convert the 'fill_style_target' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert( in->fill_style_target, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to annotation_fill_area_occurrence to be a `point`")); }
+ } while(0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<annotation_occurrence_relationship>(const DB& db, const LIST& params, annotation_occurrence_relationship* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to annotation_occurrence_relationship"); } do { // convert the 'name' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::annotation_occurrence_relationship,4>::aux_is_derived[0]=true; break; }
+ try { GenericConvert( in->name, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to annotation_occurrence_relationship to be a `label`")); }
+ } while(0);
+ do { // convert the 'description' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::annotation_occurrence_relationship,4>::aux_is_derived[1]=true; break; }
+ try { GenericConvert( in->description, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to annotation_occurrence_relationship to be a `text`")); }
+ } while(0);
+ do { // convert the 'relating_annotation_occurrence' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::annotation_occurrence_relationship,4>::aux_is_derived[2]=true; break; }
+ try { GenericConvert( in->relating_annotation_occurrence, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to annotation_occurrence_relationship to be a `annotation_occurrence`")); }
+ } while(0);
+ do { // convert the 'related_annotation_occurrence' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::annotation_occurrence_relationship,4>::aux_is_derived[3]=true; break; }
+ try { GenericConvert( in->related_annotation_occurrence, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to annotation_occurrence_relationship to be a `annotation_occurrence`")); }
+ } while(0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<annotation_occurrence_associativity>(const DB& db, const LIST& params, annotation_occurrence_associativity* in)
+{
+ size_t base = GenericFill(db,params,static_cast<annotation_occurrence_relationship*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to annotation_occurrence_associativity"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<annotation_plane>(const DB& db, const LIST& params, annotation_plane* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to annotation_plane"); } do { // convert the 'elements' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert( in->elements, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to annotation_plane to be a `SET [1:?] OF annotation_plane_element`")); }
+ } while(0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<annotation_symbol_occurrence>(const DB& db, const LIST& params, annotation_symbol_occurrence* in)
+{
+ size_t base = GenericFill(db,params,static_cast<annotation_occurrence*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to annotation_symbol_occurrence"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<annotation_subfigure_occurrence>(const DB& db, const LIST& params, annotation_subfigure_occurrence* in)
+{
+ size_t base = GenericFill(db,params,static_cast<annotation_symbol_occurrence*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to annotation_subfigure_occurrence"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<mapped_item>(const DB& db, const LIST& params, mapped_item* in)
+{
+ size_t base = GenericFill(db,params,static_cast<representation_item*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to mapped_item"); } do { // convert the 'mapping_source' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::mapped_item,2>::aux_is_derived[0]=true; break; }
+ try { GenericConvert( in->mapping_source, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to mapped_item to be a `representation_map`")); }
+ } while(0);
+ do { // convert the 'mapping_target' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::mapped_item,2>::aux_is_derived[1]=true; break; }
+ try { GenericConvert( in->mapping_target, arg, db ); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to mapped_item to be a `representation_item`")); }
+ } while(0);
+ return base;
+}
+
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<annotation_symbol>(const DB& db, const LIST& params, annotation_symbol* in)
+{
+ size_t base = GenericFill(db, params, static_cast<mapped_item*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to annotation_symbol"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<annotation_text>(const DB& db, const LIST& params, annotation_text* in)
+{
+ size_t base = GenericFill(db, params, static_cast<mapped_item*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to annotation_text"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<annotation_text_character>(const DB& db, const LIST& params, annotation_text_character* in)
+{
+ size_t base = GenericFill(db, params, static_cast<mapped_item*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to annotation_text_character"); } do { // convert the 'alignment' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->alignment, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to annotation_text_character to be a `text_alignment`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<annotation_text_occurrence>(const DB& db, const LIST& params, annotation_text_occurrence* in)
+{
+ size_t base = GenericFill(db, params, static_cast<annotation_occurrence*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to annotation_text_occurrence"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<shape_aspect>(const DB& db, const LIST& params, shape_aspect* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to shape_aspect"); } do { // convert the 'name' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::shape_aspect, 4>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->name, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to shape_aspect to be a `label`")); }
+ } while (0);
+ do { // convert the 'description' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::shape_aspect, 4>::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 shape_aspect to be a `text`")); }
+ } while (0);
+ do { // convert the 'of_shape' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::shape_aspect, 4>::aux_is_derived[2] = true; break; }
+ try { GenericConvert(in->of_shape, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to shape_aspect to be a `product_definition_shape`")); }
+ } while (0);
+ do { // convert the 'product_definitional' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::shape_aspect, 4>::aux_is_derived[3] = true; break; }
+ try { GenericConvert(in->product_definitional, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to shape_aspect to be a `LOGICAL`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<derived_shape_aspect>(const DB& db, const LIST& params, derived_shape_aspect* in)
+{
+ size_t base = GenericFill(db, params, static_cast<shape_aspect*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to derived_shape_aspect"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<apex>(const DB& db, const LIST& params, apex* in)
+{
+ size_t base = GenericFill(db, params, static_cast<derived_shape_aspect*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to apex"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<application_context_element>(const DB& db, const LIST& params, application_context_element* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to application_context_element"); } do { // convert the 'name' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::application_context_element, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->name, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to application_context_element to be a `label`")); }
+ } while (0);
+ do { // convert the 'frame_of_reference' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::application_context_element, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->frame_of_reference, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to application_context_element to be a `application_context`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<applied_action_assignment>(const DB& db, const LIST& params, applied_action_assignment* in)
+{
+ size_t base = GenericFill(db, params, static_cast<action_assignment*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to applied_action_assignment"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::applied_action_assignment, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to applied_action_assignment to be a `SET [1:?] OF action_items`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<applied_action_method_assignment>(const DB& db, const LIST& params, applied_action_method_assignment* in)
+{
+ size_t base = GenericFill(db, params, static_cast<action_method_assignment*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to applied_action_method_assignment"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to applied_action_method_assignment to be a `SET [1:?] OF action_method_items`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<applied_action_request_assignment>(const DB& db, const LIST& params, applied_action_request_assignment* in)
+{
+ size_t base = GenericFill(db, params, static_cast<action_request_assignment*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to applied_action_request_assignment"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to applied_action_request_assignment to be a `SET [1:?] OF action_request_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<approval_assignment>(const DB& db, const LIST& params, approval_assignment* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to approval_assignment"); } do { // convert the 'assigned_approval' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::approval_assignment, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->assigned_approval, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to approval_assignment to be a `approval`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<applied_approval_assignment>(const DB& db, const LIST& params, applied_approval_assignment* in)
+{
+ size_t base = GenericFill(db, params, static_cast<approval_assignment*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to applied_approval_assignment"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to applied_approval_assignment to be a `SET [1:?] OF approval_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<attribute_classification_assignment>(const DB& db, const LIST& params, attribute_classification_assignment* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to attribute_classification_assignment"); } do { // convert the 'assigned_class' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::attribute_classification_assignment, 3>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->assigned_class, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to attribute_classification_assignment to be a `group`")); }
+ } while (0);
+ do { // convert the 'attribute_name' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::attribute_classification_assignment, 3>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->attribute_name, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to attribute_classification_assignment to be a `label`")); }
+ } while (0);
+ do { // convert the 'role' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::attribute_classification_assignment, 3>::aux_is_derived[2] = true; break; }
+ try { GenericConvert(in->role, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to attribute_classification_assignment to be a `classification_role`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<applied_attribute_classification_assignment>(const DB& db, const LIST& params, applied_attribute_classification_assignment* in)
+{
+ size_t base = GenericFill(db, params, static_cast<attribute_classification_assignment*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to applied_attribute_classification_assignment"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to applied_attribute_classification_assignment to be a `SET [1:?] OF attribute_classification_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<certification_assignment>(const DB& db, const LIST& params, certification_assignment* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to certification_assignment"); } do { // convert the 'assigned_certification' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::certification_assignment, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->assigned_certification, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to certification_assignment to be a `certification`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<applied_certification_assignment>(const DB& db, const LIST& params, applied_certification_assignment* in)
+{
+ size_t base = GenericFill(db, params, static_cast<certification_assignment*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to applied_certification_assignment"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to applied_certification_assignment to be a `SET [1:?] OF certification_item`")); }
+ } while (0);
+ return base;
+}
+
+} // ! STEP
+} // ! Assimp
+
+#endif
diff --git a/code/Importer/StepFile/StepFileGen2.cpp b/code/Importer/StepFile/StepFileGen2.cpp
new file mode 100644
index 000000000..eca09e4e1
--- /dev/null
+++ b/code/Importer/StepFile/StepFileGen2.cpp
@@ -0,0 +1,3067 @@
+/*
+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 "code/Importer/StepFile/StepReaderGen.h"
+
+namespace Assimp {
+using namespace StepFile;
+namespace STEP {
+
+ // -----------------------------------------------------------------------------------------------------------
+ template <> size_t GenericFill<classification_assignment>(const DB& db, const LIST& params, classification_assignment* in)
+ {
+ size_t base = 0;
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to classification_assignment"); } do { // convert the 'assigned_class' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::classification_assignment, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->assigned_class, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to classification_assignment to be a `group`")); }
+ } while (0);
+ do { // convert the 'role' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::classification_assignment, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->role, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to classification_assignment to be a `classification_role`")); }
+ } while (0);
+ return base;
+ }
+ // -----------------------------------------------------------------------------------------------------------
+ template <> size_t GenericFill<applied_classification_assignment>(const DB& db, const LIST& params, applied_classification_assignment* in)
+ {
+ size_t base = GenericFill(db, params, static_cast<classification_assignment*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to applied_classification_assignment"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to applied_classification_assignment to be a `SET [1:?] OF classification_item`")); }
+ } while (0);
+ return base;
+ }
+ // -----------------------------------------------------------------------------------------------------------
+ template <> size_t GenericFill<contract_assignment>(const DB& db, const LIST& params, contract_assignment* in)
+ {
+ size_t base = 0;
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to contract_assignment"); } do { // convert the 'assigned_contract' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::contract_assignment, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->assigned_contract, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to contract_assignment to be a `contract`")); }
+ } while (0);
+ return base;
+ }
+ // -----------------------------------------------------------------------------------------------------------
+ template <> size_t GenericFill<applied_contract_assignment>(const DB& db, const LIST& params, applied_contract_assignment* in)
+ {
+ size_t base = GenericFill(db, params, static_cast<contract_assignment*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to applied_contract_assignment"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to applied_contract_assignment to be a `SET [1:?] OF contract_item`")); }
+ } while (0);
+ return base;
+ }
+ // -----------------------------------------------------------------------------------------------------------
+ template <> size_t GenericFill<date_and_time_assignment>(const DB& db, const LIST& params, date_and_time_assignment* in)
+ {
+ size_t base = 0;
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to date_and_time_assignment"); } do { // convert the 'assigned_date_and_time' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::date_and_time_assignment, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->assigned_date_and_time, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to date_and_time_assignment to be a `date_and_time`")); }
+ } while (0);
+ do { // convert the 'role' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::date_and_time_assignment, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->role, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to date_and_time_assignment to be a `date_time_role`")); }
+ } while (0);
+ return base;
+ }
+ // -----------------------------------------------------------------------------------------------------------
+ template <> size_t GenericFill<applied_date_and_time_assignment>(const DB& db, const LIST& params, applied_date_and_time_assignment* in)
+ {
+ size_t base = GenericFill(db, params, static_cast<date_and_time_assignment*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to applied_date_and_time_assignment"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to applied_date_and_time_assignment to be a `SET [1:?] OF date_and_time_item`")); }
+ } while (0);
+ return base;
+ }
+ // -----------------------------------------------------------------------------------------------------------
+ template <> size_t GenericFill<date_assignment>(const DB& db, const LIST& params, date_assignment* in)
+ {
+ size_t base = 0;
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to date_assignment"); } do { // convert the 'assigned_date' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::date_assignment, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->assigned_date, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to date_assignment to be a `date`")); }
+ } while (0);
+ do { // convert the 'role' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::date_assignment, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->role, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to date_assignment to be a `date_role`")); }
+ } while (0);
+ return base;
+ }
+ // -----------------------------------------------------------------------------------------------------------
+ template <> size_t GenericFill<applied_date_assignment>(const DB& db, const LIST& params, applied_date_assignment* in)
+ {
+ size_t base = GenericFill(db, params, static_cast<date_assignment*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to applied_date_assignment"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to applied_date_assignment to be a `SET [1:?] OF date_item`")); }
+ } while (0);
+ return base;
+ }
+ // -----------------------------------------------------------------------------------------------------------
+ template <> size_t GenericFill<document_reference>(const DB& db, const LIST& params, document_reference* in)
+ {
+ size_t base = 0;
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to document_reference"); } do { // convert the 'assigned_document' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::document_reference, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->assigned_document, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to document_reference to be a `document`")); }
+ } while (0);
+ do { // convert the 'source' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::document_reference, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->source, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to document_reference to be a `label`")); }
+ } while (0);
+ return base;
+ }
+ // -----------------------------------------------------------------------------------------------------------
+ template <> size_t GenericFill<applied_document_reference>(const DB& db, const LIST& params, applied_document_reference* in)
+ {
+ size_t base = GenericFill(db, params, static_cast<document_reference*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to applied_document_reference"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to applied_document_reference to be a `SET [1:?] OF document_reference_item`")); }
+ } while (0);
+ return base;
+ }
+ // -----------------------------------------------------------------------------------------------------------
+ template <> size_t GenericFill<document_usage_constraint_assignment>(const DB& db, const LIST& params, document_usage_constraint_assignment* in)
+ {
+ size_t base = 0;
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to document_usage_constraint_assignment"); } do { // convert the 'assigned_document_usage' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::document_usage_constraint_assignment, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->assigned_document_usage, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to document_usage_constraint_assignment to be a `document_usage_constraint`")); }
+ } while (0);
+ do { // convert the 'role' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::document_usage_constraint_assignment, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->role, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to document_usage_constraint_assignment to be a `document_usage_role`")); }
+ } while (0);
+ return base;
+ }
+ // -----------------------------------------------------------------------------------------------------------
+ template <> size_t GenericFill<applied_document_usage_constraint_assignment>(const DB& db, const LIST& params, applied_document_usage_constraint_assignment* in)
+ {
+ size_t base = GenericFill(db, params, static_cast<document_usage_constraint_assignment*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to applied_document_usage_constraint_assignment"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to applied_document_usage_constraint_assignment to be a `SET [1:?] OF document_reference_item`")); }
+ } while (0);
+ return base;
+ }
+ // -----------------------------------------------------------------------------------------------------------
+ template <> size_t GenericFill<effectivity_assignment>(const DB& db, const LIST& params, effectivity_assignment* in)
+ {
+ size_t base = 0;
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to effectivity_assignment"); } do { // convert the 'assigned_effectivity' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::effectivity_assignment, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->assigned_effectivity, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to effectivity_assignment to be a `effectivity`")); }
+ } while (0);
+ return base;
+ }
+ // -----------------------------------------------------------------------------------------------------------
+ template <> size_t GenericFill<applied_effectivity_assignment>(const DB& db, const LIST& params, applied_effectivity_assignment* in)
+ {
+ size_t base = GenericFill(db, params, static_cast<effectivity_assignment*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to applied_effectivity_assignment"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to applied_effectivity_assignment to be a `SET [1:?] OF effectivity_item`")); }
+ } while (0);
+ return base;
+ }
+ // -----------------------------------------------------------------------------------------------------------
+ template <> size_t GenericFill<event_occurrence_assignment>(const DB& db, const LIST& params, event_occurrence_assignment* in)
+ {
+ size_t base = 0;
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to event_occurrence_assignment"); } do { // convert the 'assigned_event_occurrence' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::event_occurrence_assignment, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->assigned_event_occurrence, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to event_occurrence_assignment to be a `event_occurrence`")); }
+ } while (0);
+ do { // convert the 'role' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::event_occurrence_assignment, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->role, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to event_occurrence_assignment to be a `event_occurrence_role`")); }
+ } while (0);
+ return base;
+ }
+ // -----------------------------------------------------------------------------------------------------------
+ template <> size_t GenericFill<applied_event_occurrence_assignment>(const DB& db, const LIST& params, applied_event_occurrence_assignment* in)
+ {
+ size_t base = GenericFill(db, params, static_cast<event_occurrence_assignment*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to applied_event_occurrence_assignment"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to applied_event_occurrence_assignment to be a `SET [1:?] OF event_occurrence_item`")); }
+ } while (0);
+ return base;
+ }
+ // -----------------------------------------------------------------------------------------------------------
+ template <> size_t GenericFill<identification_assignment>(const DB& db, const LIST& params, identification_assignment* in)
+ {
+ size_t base = 0;
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to identification_assignment"); } do { // convert the 'assigned_id' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::identification_assignment, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->assigned_id, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to identification_assignment to be a `identifier`")); }
+ } while (0);
+ do { // convert the 'role' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::identification_assignment, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->role, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to identification_assignment to be a `identification_role`")); }
+ } while (0);
+ return base;
+ }
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<external_identification_assignment>(const DB& db, const LIST& params, external_identification_assignment* in)
+{
+ size_t base = GenericFill(db, params, static_cast<identification_assignment*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to external_identification_assignment"); } do { // convert the 'source' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::external_identification_assignment, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->source, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to external_identification_assignment to be a `external_source`")); }
+ } while (0);
+ return base;
+}
+
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<applied_external_identification_assignment>(const DB& db, const LIST& params, applied_external_identification_assignment* in)
+{
+ size_t base = GenericFill(db, params, static_cast<external_identification_assignment*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to applied_external_identification_assignment"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to applied_external_identification_assignment to be a `SET [1:?] OF external_identification_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<group_assignment>(const DB& db, const LIST& params, group_assignment* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to group_assignment"); } do { // convert the 'assigned_group' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::group_assignment, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->assigned_group, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to group_assignment to be a `group`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<applied_group_assignment>(const DB& db, const LIST& params, applied_group_assignment* in)
+{
+ size_t base = GenericFill(db, params, static_cast<group_assignment*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to applied_group_assignment"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to applied_group_assignment to be a `SET [1:?] OF groupable_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<applied_identification_assignment>(const DB& db, const LIST& params, applied_identification_assignment* in)
+{
+ size_t base = GenericFill(db, params, static_cast<identification_assignment*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to applied_identification_assignment"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to applied_identification_assignment to be a `SET [1:?] OF identification_item`")); }
+ } while (0);
+ return base;
+}
+
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<name_assignment>(const DB& db, const LIST& params, name_assignment* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to name_assignment"); } do { // convert the 'assigned_name' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::name_assignment, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->assigned_name, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to name_assignment to be a `label`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<applied_name_assignment>(const DB& db, const LIST& params, applied_name_assignment* in)
+{
+ size_t base = GenericFill(db, params, static_cast<name_assignment*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to applied_name_assignment"); } do { // convert the 'item' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->item, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to applied_name_assignment to be a `name_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<organization_assignment>(const DB& db, const LIST& params, organization_assignment* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to organization_assignment"); } do { // convert the 'assigned_organization' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::organization_assignment, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->assigned_organization, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to organization_assignment to be a `organization`")); }
+ } while (0);
+ do { // convert the 'role' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::organization_assignment, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->role, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to organization_assignment to be a `organization_role`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<applied_organization_assignment>(const DB& db, const LIST& params, applied_organization_assignment* in)
+{
+ size_t base = GenericFill(db, params, static_cast<organization_assignment*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to applied_organization_assignment"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to applied_organization_assignment to be a `SET [1:?] OF organization_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<organizational_project_assignment>(const DB& db, const LIST& params, organizational_project_assignment* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to organizational_project_assignment"); } do { // convert the 'assigned_organizational_project' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::organizational_project_assignment, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->assigned_organizational_project, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to organizational_project_assignment to be a `organizational_project`")); }
+ } while (0);
+ do { // convert the 'role' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::organizational_project_assignment, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->role, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to organizational_project_assignment to be a `organizational_project_role`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<applied_organizational_project_assignment>(const DB& db, const LIST& params, applied_organizational_project_assignment* in)
+{
+ size_t base = GenericFill(db, params, static_cast<organizational_project_assignment*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to applied_organizational_project_assignment"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to applied_organizational_project_assignment to be a `SET [1:?] OF project_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<person_and_organization_assignment>(const DB& db, const LIST& params, person_and_organization_assignment* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to person_and_organization_assignment"); } do { // convert the 'assigned_person_and_organization' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::person_and_organization_assignment, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->assigned_person_and_organization, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to person_and_organization_assignment to be a `person_and_organization`")); }
+ } while (0);
+ do { // convert the 'role' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::person_and_organization_assignment, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->role, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to person_and_organization_assignment to be a `person_and_organization_role`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<applied_person_and_organization_assignment>(const DB& db, const LIST& params, applied_person_and_organization_assignment* in)
+{
+ size_t base = GenericFill(db, params, static_cast<person_and_organization_assignment*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to applied_person_and_organization_assignment"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to applied_person_and_organization_assignment to be a `SET [1:?] OF person_and_organization_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<presented_item>(const DB& db, const LIST& params, presented_item* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<applied_presented_item>(const DB& db, const LIST& params, applied_presented_item* in)
+{
+ size_t base = GenericFill(db, params, static_cast<presented_item*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to applied_presented_item"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to applied_presented_item to be a `SET [1:?] OF presented_item_select`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<security_classification_assignment>(const DB& db, const LIST& params, security_classification_assignment* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to security_classification_assignment"); } do { // convert the 'assigned_security_classification' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::security_classification_assignment, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->assigned_security_classification, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to security_classification_assignment to be a `security_classification`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<applied_security_classification_assignment>(const DB& db, const LIST& params, applied_security_classification_assignment* in)
+{
+ size_t base = GenericFill(db, params, static_cast<security_classification_assignment*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to applied_security_classification_assignment"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to applied_security_classification_assignment to be a `SET [1:?] OF security_classification_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<time_interval_assignment>(const DB& db, const LIST& params, time_interval_assignment* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to time_interval_assignment"); } do { // convert the 'assigned_time_interval' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::time_interval_assignment, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->assigned_time_interval, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to time_interval_assignment to be a `time_interval`")); }
+ } while (0);
+ do { // convert the 'role' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::time_interval_assignment, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->role, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to time_interval_assignment to be a `time_interval_role`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<applied_time_interval_assignment>(const DB& db, const LIST& params, applied_time_interval_assignment* in)
+{
+ size_t base = GenericFill(db, params, static_cast<time_interval_assignment*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to applied_time_interval_assignment"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to applied_time_interval_assignment to be a `SET [0:?] OF time_interval_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<applied_usage_right>(const DB& db, const LIST& params, applied_usage_right* in)
+{
+ size_t base = GenericFill(db, params, static_cast<applied_action_assignment*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to applied_usage_right"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<area_in_set>(const DB& db, const LIST& params, area_in_set* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to area_in_set"); } do { // convert the 'area' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::area_in_set, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->area, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to area_in_set to be a `presentation_area`")); }
+ } while (0);
+ do { // convert the 'in_set' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::area_in_set, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->in_set, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to area_in_set to be a `presentation_set`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<area_measure_with_unit>(const DB& db, const LIST& params, area_measure_with_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<measure_with_unit*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to area_measure_with_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<area_unit>(const DB& db, const LIST& params, area_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<derived_unit*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to area_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<product_definition_relationship>(const DB& db, const LIST& params, product_definition_relationship* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to product_definition_relationship"); } do { // convert the 'id' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::product_definition_relationship, 5>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->id, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to product_definition_relationship to be a `identifier`")); }
+ } while (0);
+ do { // convert the 'name' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::product_definition_relationship, 5>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->name, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to product_definition_relationship to be a `label`")); }
+ } while (0);
+ do { // convert the 'description' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::product_definition_relationship, 5>::aux_is_derived[2] = 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 2 to product_definition_relationship to be a `text`")); }
+ } while (0);
+ do { // convert the 'relating_product_definition' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::product_definition_relationship, 5>::aux_is_derived[3] = true; break; }
+ try { GenericConvert(in->relating_product_definition, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to product_definition_relationship to be a `product_definition`")); }
+ } while (0);
+ do { // convert the 'related_product_definition' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::product_definition_relationship, 5>::aux_is_derived[4] = true; break; }
+ try { GenericConvert(in->related_product_definition, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to product_definition_relationship to be a `product_definition`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<product_definition_usage>(const DB& db, const LIST& params, product_definition_usage* in)
+{
+ size_t base = GenericFill(db, params, static_cast<product_definition_relationship*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to product_definition_usage"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<assembly_component_usage>(const DB& db, const LIST& params, assembly_component_usage* in)
+{
+ size_t base = GenericFill(db, params, static_cast<product_definition_usage*>(in));
+ if (params.GetSize() < 6) { throw STEP::TypeError("expected 6 arguments to assembly_component_usage"); } do { // convert the 'reference_designator' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::assembly_component_usage, 1>::aux_is_derived[0] = true; break; }
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert(in->reference_designator, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to assembly_component_usage to be a `identifier`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<assigned_requirement>(const DB& db, const LIST& params, assigned_requirement* in)
+{
+ size_t base = GenericFill(db, params, static_cast<group_assignment*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to assigned_requirement"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to assigned_requirement to be a `SET [1:1] OF product_definition`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<compound_representation_item>(const DB& db, const LIST& params, compound_representation_item* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to compound_representation_item"); } do { // convert the 'item_element' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::compound_representation_item, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->item_element, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to compound_representation_item to be a `compound_item_definition`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<atomic_formula>(const DB& db, const LIST& params, atomic_formula* in)
+{
+ size_t base = GenericFill(db, params, static_cast<compound_representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to atomic_formula"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<attribute_assertion>(const DB& db, const LIST& params, attribute_assertion* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<attribute_language_assignment>(const DB& db, const LIST& params, attribute_language_assignment* in)
+{
+ size_t base = GenericFill(db, params, static_cast<attribute_classification_assignment*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to attribute_language_assignment"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to attribute_language_assignment to be a `SET [1:?] OF attribute_language_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<attribute_value_assignment>(const DB& db, const LIST& params, attribute_value_assignment* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to attribute_value_assignment"); } do { // convert the 'attribute_name' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::attribute_value_assignment, 3>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->attribute_name, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to attribute_value_assignment to be a `label`")); }
+ } while (0);
+ do { // convert the 'attribute_value' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::attribute_value_assignment, 3>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->attribute_value, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to attribute_value_assignment to be a `attribute_type`")); }
+ } while (0);
+ do { // convert the 'role' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::attribute_value_assignment, 3>::aux_is_derived[2] = true; break; }
+ try { GenericConvert(in->role, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to attribute_value_assignment to be a `attribute_value_role`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<auxiliary_geometric_representation_item>(const DB& db, const LIST& params, auxiliary_geometric_representation_item* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<placement>(const DB& db, const LIST& params, placement* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to placement"); } do { // convert the 'location' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::placement, 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 1 to placement to be a `cartesian_point`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<axis1_placement>(const DB& db, const LIST& params, axis1_placement* in)
+{
+ size_t base = GenericFill(db, params, static_cast<placement*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to axis1_placement"); } do { // convert the 'axis' argument
+ std::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 2 to axis1_placement to be a `direction`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<axis2_placement_2d>(const DB& db, const LIST& params, axis2_placement_2d* in)
+{
+ size_t base = GenericFill(db, params, static_cast<placement*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to axis2_placement_2d"); } do { // convert the 'ref_direction' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert(in->ref_direction, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to axis2_placement_2d to be a `direction`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<axis2_placement_3d>(const DB& db, const LIST& params, axis2_placement_3d* in)
+{
+ size_t base = GenericFill(db, params, static_cast<placement*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to axis2_placement_3d"); } do { // convert the 'axis' argument
+ std::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 2 to axis2_placement_3d to be a `direction`")); }
+ } while (0);
+ do { // convert the 'ref_direction' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert(in->ref_direction, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to axis2_placement_3d to be a `direction`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<curve>(const DB& db, const LIST& params, curve* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_representation_item*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to curve"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<bounded_curve>(const DB& db, const LIST& params, bounded_curve* in)
+{
+ size_t base = GenericFill(db, params, static_cast<curve*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to bounded_curve"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<b_spline_curve>(const DB& db, const LIST& params, b_spline_curve* in)
+{
+ size_t base = GenericFill(db, params, static_cast<bounded_curve*>(in));
+ if (params.GetSize() < 6) { throw STEP::TypeError("expected 6 arguments to b_spline_curve"); } do { // convert the 'degree' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::b_spline_curve, 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 1 to b_spline_curve to be a `INTEGER`")); }
+ } while (0);
+ do { // convert the 'control_points_list' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::b_spline_curve, 5>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->control_points_list, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to b_spline_curve to be a `LIST [2:?] OF cartesian_point`")); }
+ } while (0);
+ do { // convert the 'curve_form' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::b_spline_curve, 5>::aux_is_derived[2] = true; break; }
+ try { GenericConvert(in->curve_form, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to b_spline_curve to be a `b_spline_curve_form`")); }
+ } while (0);
+ do { // convert the 'closed_curve' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::b_spline_curve, 5>::aux_is_derived[3] = true; break; }
+ try { GenericConvert(in->closed_curve, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to b_spline_curve to be a `LOGICAL`")); }
+ } while (0);
+ do { // convert the 'self_intersect' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::b_spline_curve, 5>::aux_is_derived[4] = true; break; }
+ try { GenericConvert(in->self_intersect, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to b_spline_curve to be a `LOGICAL`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<b_spline_curve_with_knots>(const DB& db, const LIST& params, b_spline_curve_with_knots* in)
+{
+ size_t base = GenericFill(db, params, static_cast<b_spline_curve*>(in));
+ if (params.GetSize() < 9) { throw STEP::TypeError("expected 9 arguments to b_spline_curve_with_knots"); } do { // convert the 'knot_multiplicities' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->knot_multiplicities, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to b_spline_curve_with_knots to be a `LIST [2:?] OF INTEGER`")); }
+ } while (0);
+ do { // convert the 'knots' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->knots, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to b_spline_curve_with_knots to be a `LIST [2:?] OF parameter_value`")); }
+ } while (0);
+ do { // convert the 'knot_spec' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->knot_spec, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 8 to b_spline_curve_with_knots to be a `knot_type`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<surface>(const DB& db, const LIST& params, surface* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_representation_item*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to surface"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<bounded_surface>(const DB& db, const LIST& params, bounded_surface* in)
+{
+ size_t base = GenericFill(db, params, static_cast<surface*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to bounded_surface"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<b_spline_surface>(const DB& db, const LIST& params, b_spline_surface* in)
+{
+ size_t base = GenericFill(db, params, static_cast<bounded_surface*>(in));
+ if (params.GetSize() < 7) { throw STEP::TypeError("expected 7 arguments to b_spline_surface"); } do { // convert the 'u_degree' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::b_spline_surface, 6>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->u_degree, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to b_spline_surface to be a `INTEGER`")); }
+ } while (0);
+ do { // convert the 'v_degree' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::b_spline_surface, 6>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->v_degree, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to b_spline_surface to be a `INTEGER`")); }
+ } while (0);
+ do { // convert the 'surface_form' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::b_spline_surface, 6>::aux_is_derived[2] = true; break; }
+ try { GenericConvert(in->surface_form, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to b_spline_surface to be a `b_spline_surface_form`")); }
+ } while (0);
+ do { // convert the 'u_closed' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::b_spline_surface, 6>::aux_is_derived[3] = true; break; }
+ try { GenericConvert(in->u_closed, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to b_spline_surface to be a `LOGICAL`")); }
+ } while (0);
+ do { // convert the 'v_closed' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::b_spline_surface, 6>::aux_is_derived[4] = true; break; }
+ try { GenericConvert(in->v_closed, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to b_spline_surface to be a `LOGICAL`")); }
+ } while (0);
+ do { // convert the 'self_intersect' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::b_spline_surface, 6>::aux_is_derived[5] = true; break; }
+ try { GenericConvert(in->self_intersect, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to b_spline_surface to be a `LOGICAL`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<b_spline_surface_with_knots>(const DB& db, const LIST& params, b_spline_surface_with_knots* in)
+{
+ size_t base = GenericFill(db, params, static_cast<b_spline_surface*>(in));
+ if (params.GetSize() < 12) { throw STEP::TypeError("expected 12 arguments to b_spline_surface_with_knots"); } do { // convert the 'u_multiplicities' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->u_multiplicities, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to b_spline_surface_with_knots to be a `LIST [2:?] OF INTEGER`")); }
+ } while (0);
+ do { // convert the 'v_multiplicities' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->v_multiplicities, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 8 to b_spline_surface_with_knots to be a `LIST [2:?] OF INTEGER`")); }
+ } while (0);
+ do { // convert the 'u_knots' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->u_knots, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 9 to b_spline_surface_with_knots to be a `LIST [2:?] OF parameter_value`")); }
+ } while (0);
+ do { // convert the 'v_knots' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->v_knots, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 10 to b_spline_surface_with_knots to be a `LIST [2:?] OF parameter_value`")); }
+ } while (0);
+ do { // convert the 'knot_spec' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->knot_spec, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 11 to b_spline_surface_with_knots to be a `knot_type`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<product_definition>(const DB& db, const LIST& params, product_definition* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to product_definition"); } do { // convert the 'id' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::product_definition, 4>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->id, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to product_definition to be a `identifier`")); }
+ } while (0);
+ do { // convert the 'description' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::product_definition, 4>::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 product_definition to be a `text`")); }
+ } while (0);
+ do { // convert the 'formation' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::product_definition, 4>::aux_is_derived[2] = true; break; }
+ try { GenericConvert(in->formation, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to product_definition to be a `product_definition_formation`")); }
+ } while (0);
+ do { // convert the 'frame_of_reference' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::product_definition, 4>::aux_is_derived[3] = true; break; }
+ try { GenericConvert(in->frame_of_reference, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to product_definition to be a `product_definition_context`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<rule_software_definition>(const DB& db, const LIST& params, rule_software_definition* in)
+{
+ size_t base = GenericFill(db, params, static_cast<product_definition*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to rule_software_definition"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<rule_definition>(const DB& db, const LIST& params, rule_definition* in)
+{
+ size_t base = GenericFill(db, params, static_cast<rule_software_definition*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to rule_definition"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<back_chaining_rule>(const DB& db, const LIST& params, back_chaining_rule* in)
+{
+ size_t base = GenericFill(db, params, static_cast<rule_definition*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to back_chaining_rule"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<back_chaining_rule_body>(const DB& db, const LIST& params, back_chaining_rule_body* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<colour>(const DB& db, const LIST& params, colour* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<background_colour>(const DB& db, const LIST& params, background_colour* in)
+{
+ size_t base = GenericFill(db, params, static_cast<colour*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to background_colour"); } do { // convert the 'presentation' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->presentation, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to background_colour to be a `area_or_view`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<beveled_sheet_representation>(const DB& db, const LIST& params, beveled_sheet_representation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<shape_representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to beveled_sheet_representation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<bezier_curve>(const DB& db, const LIST& params, bezier_curve* in)
+{
+ size_t base = GenericFill(db, params, static_cast<b_spline_curve*>(in));
+ if (params.GetSize() < 6) { throw STEP::TypeError("expected 6 arguments to bezier_curve"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<bezier_surface>(const DB& db, const LIST& params, bezier_surface* in)
+{
+ size_t base = GenericFill(db, params, static_cast<b_spline_surface*>(in));
+ if (params.GetSize() < 7) { throw STEP::TypeError("expected 7 arguments to bezier_surface"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<generic_expression>(const DB& db, const LIST& params, generic_expression* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<binary_generic_expression>(const DB& db, const LIST& params, binary_generic_expression* in)
+{
+ size_t base = GenericFill(db, params, static_cast<generic_expression*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to binary_generic_expression"); } do { // convert the 'operands' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->operands, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to binary_generic_expression to be a `LIST [2:2] OF generic_expression`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<binary_numeric_expression>(const DB& db, const LIST& params, binary_numeric_expression* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<binary_representation_item>(const DB& db, const LIST& params, binary_representation_item* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to binary_representation_item"); } do { // convert the 'binary_value' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::binary_representation_item, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->binary_value, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to binary_representation_item to be a `BINARY`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<block>(const DB& db, const LIST& params, block* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_representation_item*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to block"); } do { // convert the 'position' argument
+ std::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 1 to block to be a `axis2_placement_3d`")); }
+ } while (0);
+ do { // convert the 'x' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->x, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to block to be a `positive_length_measure`")); }
+ } while (0);
+ do { // convert the 'y' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->y, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to block to be a `positive_length_measure`")); }
+ } while (0);
+ do { // convert the 'z' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->z, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to block to be a `positive_length_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<expression>(const DB& db, const LIST& params, expression* in)
+{
+ size_t base = GenericFill(db, params, static_cast<generic_expression*>(in));
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<boolean_expression>(const DB& db, const LIST& params, boolean_expression* in)
+{
+ size_t base = GenericFill(db, params, static_cast<expression*>(in));
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<boolean_literal>(const DB& db, const LIST& params, boolean_literal* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to boolean_literal"); } do { // convert the 'the_value' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->the_value, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to boolean_literal to be a `BOOLEAN`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<boolean_representation_item>(const DB& db, const LIST& params, boolean_representation_item* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<boolean_result>(const DB& db, const LIST& params, boolean_result* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_representation_item*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to boolean_result"); } do { // convert the 'operator' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->operator_, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to boolean_result to be a `boolean_operator`")); }
+ } while (0);
+ do { // convert the 'first_operand' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->first_operand, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to boolean_result to be a `boolean_operand`")); }
+ } while (0);
+ do { // convert the 'second_operand' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->second_operand, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to boolean_result to be a `boolean_operand`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<composite_curve>(const DB& db, const LIST& params, composite_curve* in)
+{
+ size_t base = GenericFill(db, params, static_cast<bounded_curve*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to composite_curve"); } do { // convert the 'segments' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::composite_curve, 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 1 to composite_curve to be a `LIST [1:?] OF composite_curve_segment`")); }
+ } while (0);
+ do { // convert the 'self_intersect' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::composite_curve, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->self_intersect, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to composite_curve to be a `LOGICAL`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<composite_curve_on_surface>(const DB& db, const LIST& params, composite_curve_on_surface* in)
+{
+ size_t base = GenericFill(db, params, static_cast<composite_curve*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to composite_curve_on_surface"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<boundary_curve>(const DB& db, const LIST& params, boundary_curve* in)
+{
+ size_t base = GenericFill(db, params, static_cast<composite_curve_on_surface*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to boundary_curve"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<bounded_pcurve>(const DB& db, const LIST& params, bounded_pcurve* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<bounded_surface_curve>(const DB& db, const LIST& params, bounded_surface_curve* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<founded_item>(const DB& db, const LIST& params, founded_item* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<box_domain>(const DB& db, const LIST& params, box_domain* in)
+{
+ size_t base = GenericFill(db, params, static_cast<founded_item*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to box_domain"); } do { // convert the 'corner' argument
+ std::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 box_domain to be a `cartesian_point`")); }
+ } while (0);
+ do { // convert the 'xlength' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->xlength, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to box_domain to be a `positive_length_measure`")); }
+ } while (0);
+ do { // convert the 'ylength' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->ylength, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to box_domain to be a `positive_length_measure`")); }
+ } while (0);
+ do { // convert the 'zlength' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->zlength, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to box_domain to be a `positive_length_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<half_space_solid>(const DB& db, const LIST& params, half_space_solid* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_representation_item*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to half_space_solid"); } do { // convert the 'base_surface' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::half_space_solid, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->base_surface, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to half_space_solid to be a `surface`")); }
+ } while (0);
+ do { // convert the 'agreement_flag' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::half_space_solid, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->agreement_flag, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to half_space_solid to be a `BOOLEAN`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<boxed_half_space>(const DB& db, const LIST& params, boxed_half_space* in)
+{
+ size_t base = GenericFill(db, params, static_cast<half_space_solid*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to boxed_half_space"); } do { // convert the 'enclosure' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->enclosure, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to boxed_half_space to be a `box_domain`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<breakdown_context>(const DB& db, const LIST& params, breakdown_context* in)
+{
+ size_t base = GenericFill(db, params, static_cast<product_definition_relationship*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to breakdown_context"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<breakdown_element_group_assignment>(const DB& db, const LIST& params, breakdown_element_group_assignment* in)
+{
+ size_t base = GenericFill(db, params, static_cast<group_assignment*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to breakdown_element_group_assignment"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to breakdown_element_group_assignment to be a `SET [1:1] OF product_definition_or_breakdown_element_usage`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<breakdown_element_realization>(const DB& db, const LIST& params, breakdown_element_realization* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<breakdown_element_usage>(const DB& db, const LIST& params, breakdown_element_usage* in)
+{
+ size_t base = GenericFill(db, params, static_cast<product_definition_relationship*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to breakdown_element_usage"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<breakdown_of>(const DB& db, const LIST& params, breakdown_of* in)
+{
+ size_t base = GenericFill(db, params, static_cast<product_definition_relationship*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to breakdown_of"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<solid_model>(const DB& db, const LIST& params, solid_model* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_representation_item*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to solid_model"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<manifold_solid_brep>(const DB& db, const LIST& params, manifold_solid_brep* in)
+{
+ size_t base = GenericFill(db, params, static_cast<solid_model*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to manifold_solid_brep"); } do { // convert the 'outer' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::manifold_solid_brep, 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 1 to manifold_solid_brep to be a `closed_shell`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<brep_with_voids>(const DB& db, const LIST& params, brep_with_voids* in)
+{
+ size_t base = GenericFill(db, params, static_cast<manifold_solid_brep*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to brep_with_voids"); } do { // convert the 'voids' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->voids, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to brep_with_voids to be a `SET [1:?] OF oriented_closed_shell`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<bytes_representation_item>(const DB& db, const LIST& params, bytes_representation_item* in)
+{
+ size_t base = GenericFill(db, params, static_cast<binary_representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to bytes_representation_item"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<date>(const DB& db, const LIST& params, date* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to date"); } do { // convert the 'year_component' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::date, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->year_component, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to date to be a `year_number`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<calendar_date>(const DB& db, const LIST& params, calendar_date* in)
+{
+ size_t base = GenericFill(db, params, static_cast<date*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to calendar_date"); } do { // convert the 'day_component' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->day_component, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to calendar_date to be a `day_in_month_number`")); }
+ } while (0);
+ do { // convert the 'month_component' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->month_component, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to calendar_date to be a `month_in_year_number`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<camera_image>(const DB& db, const LIST& params, camera_image* in)
+{
+ size_t base = GenericFill(db, params, static_cast<mapped_item*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to camera_image"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<camera_image_3d_with_scale>(const DB& db, const LIST& params, camera_image_3d_with_scale* in)
+{
+ size_t base = GenericFill(db, params, static_cast<camera_image*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to camera_image_3d_with_scale"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<camera_model>(const DB& db, const LIST& params, camera_model* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_representation_item*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to camera_model"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<camera_model_d3>(const DB& db, const LIST& params, camera_model_d3* in)
+{
+ size_t base = GenericFill(db, params, static_cast<camera_model*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to camera_model_d3"); } do { // convert the 'view_reference_system' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::camera_model_d3, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->view_reference_system, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to camera_model_d3 to be a `axis2_placement_3d`")); }
+ } while (0);
+ do { // convert the 'perspective_of_volume' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::camera_model_d3, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->perspective_of_volume, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to camera_model_d3 to be a `view_volume`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<camera_model_d3_multi_clipping>(const DB& db, const LIST& params, camera_model_d3_multi_clipping* in)
+{
+ size_t base = GenericFill(db, params, static_cast<camera_model_d3*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to camera_model_d3_multi_clipping"); } do { // convert the 'shape_clipping' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->shape_clipping, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to camera_model_d3_multi_clipping to be a `SET [1:?] OF camera_model_d3_multi_clipping_interection_select`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<camera_model_d3_multi_clipping_intersection>(const DB& db, const LIST& params, camera_model_d3_multi_clipping_intersection* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to camera_model_d3_multi_clipping_intersection"); } do { // convert the 'shape_clipping' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->shape_clipping, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to camera_model_d3_multi_clipping_intersection to be a `SET [2:?] OF camera_model_d3_multi_clipping_interection_select`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<camera_model_d3_multi_clipping_union>(const DB& db, const LIST& params, camera_model_d3_multi_clipping_union* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to camera_model_d3_multi_clipping_union"); } do { // convert the 'shape_clipping' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->shape_clipping, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to camera_model_d3_multi_clipping_union to be a `SET [2:?] OF camera_model_d3_multi_clipping_union_select`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<camera_model_d3_with_hlhsr>(const DB& db, const LIST& params, camera_model_d3_with_hlhsr* in)
+{
+ size_t base = GenericFill(db, params, static_cast<camera_model_d3*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to camera_model_d3_with_hlhsr"); } do { // convert the 'hidden_line_surface_removal' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->hidden_line_surface_removal, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to camera_model_d3_with_hlhsr to be a `BOOLEAN`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<camera_model_with_light_sources>(const DB& db, const LIST& params, camera_model_with_light_sources* in)
+{
+ size_t base = GenericFill(db, params, static_cast<camera_model_d3*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to camera_model_with_light_sources"); } do { // convert the 'sources' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->sources, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to camera_model_with_light_sources to be a `SET [1:?] OF light_source`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<representation_map>(const DB& db, const LIST& params, representation_map* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to representation_map"); } do { // convert the 'mapping_origin' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::representation_map, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->mapping_origin, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to representation_map to be a `representation_item`")); }
+ } while (0);
+ do { // convert the 'mapped_representation' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::representation_map, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->mapped_representation, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to representation_map to be a `representation`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<camera_usage>(const DB& db, const LIST& params, camera_usage* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation_map*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to camera_usage"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<capacitance_measure_with_unit>(const DB& db, const LIST& params, capacitance_measure_with_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<measure_with_unit*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to capacitance_measure_with_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<capacitance_unit>(const DB& db, const LIST& params, capacitance_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<derived_unit*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to capacitance_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<point>(const DB& db, const LIST& params, point* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_representation_item*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to point"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<cartesian_point>(const DB& db, const LIST& params, cartesian_point* in)
+{
+ size_t base = GenericFill(db, params, static_cast<point*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to cartesian_point"); } do { // convert the 'coordinates' argument
+ std::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 1 to cartesian_point to be a `LIST [1:3] OF length_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<cartesian_transformation_operator>(const DB& db, const LIST& params, cartesian_transformation_operator* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to cartesian_transformation_operator"); } do { // convert the 'axis1' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::cartesian_transformation_operator, 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 cartesian_transformation_operator to be a `direction`")); }
+ } while (0);
+ do { // convert the 'axis2' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::cartesian_transformation_operator, 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 cartesian_transformation_operator to be a `direction`")); }
+ } while (0);
+ do { // convert the 'local_origin' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::cartesian_transformation_operator, 4>::aux_is_derived[2] = true; break; }
+ try { GenericConvert(in->local_origin, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to cartesian_transformation_operator to be a `cartesian_point`")); }
+ } while (0);
+ do { // convert the 'scale' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::cartesian_transformation_operator, 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 cartesian_transformation_operator to be a `REAL`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<cartesian_transformation_operator_2d>(const DB& db, const LIST& params, cartesian_transformation_operator_2d* in)
+{
+ size_t base = GenericFill(db, params, static_cast<cartesian_transformation_operator*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to cartesian_transformation_operator_2d"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<cartesian_transformation_operator_3d>(const DB& db, const LIST& params, cartesian_transformation_operator_3d* in)
+{
+ size_t base = GenericFill(db, params, static_cast<cartesian_transformation_operator*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to cartesian_transformation_operator_3d"); } do { // convert the 'axis3' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ 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 cartesian_transformation_operator_3d to be a `direction`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<cc_design_approval>(const DB& db, const LIST& params, cc_design_approval* in)
+{
+ size_t base = GenericFill(db, params, static_cast<approval_assignment*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to cc_design_approval"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to cc_design_approval to be a `SET [1:?] OF approved_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<cc_design_certification>(const DB& db, const LIST& params, cc_design_certification* in)
+{
+ size_t base = GenericFill(db, params, static_cast<certification_assignment*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to cc_design_certification"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to cc_design_certification to be a `SET [1:?] OF certified_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<cc_design_contract>(const DB& db, const LIST& params, cc_design_contract* in)
+{
+ size_t base = GenericFill(db, params, static_cast<contract_assignment*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to cc_design_contract"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to cc_design_contract to be a `SET [1:?] OF contracted_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<cc_design_date_and_time_assignment>(const DB& db, const LIST& params, cc_design_date_and_time_assignment* in)
+{
+ size_t base = GenericFill(db, params, static_cast<date_and_time_assignment*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to cc_design_date_and_time_assignment"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to cc_design_date_and_time_assignment to be a `SET [1:?] OF date_time_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<cc_design_person_and_organization_assignment>(const DB& db, const LIST& params, cc_design_person_and_organization_assignment* in)
+{
+ size_t base = GenericFill(db, params, static_cast<person_and_organization_assignment*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to cc_design_person_and_organization_assignment"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to cc_design_person_and_organization_assignment to be a `SET [1:?] OF cc_person_organization_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<cc_design_security_classification>(const DB& db, const LIST& params, cc_design_security_classification* in)
+{
+ size_t base = GenericFill(db, params, static_cast<security_classification_assignment*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to cc_design_security_classification"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to cc_design_security_classification to be a `SET [1:?] OF cc_classified_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<cc_design_specification_reference>(const DB& db, const LIST& params, cc_design_specification_reference* in)
+{
+ size_t base = GenericFill(db, params, static_cast<document_reference*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to cc_design_specification_reference"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to cc_design_specification_reference to be a `SET [1:?] OF cc_specified_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<celsius_temperature_measure_with_unit>(const DB& db, const LIST& params, celsius_temperature_measure_with_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<measure_with_unit*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to celsius_temperature_measure_with_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<centre_of_symmetry>(const DB& db, const LIST& params, centre_of_symmetry* in)
+{
+ size_t base = GenericFill(db, params, static_cast<derived_shape_aspect*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to centre_of_symmetry"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<change>(const DB& db, const LIST& params, change* in)
+{
+ size_t base = GenericFill(db, params, static_cast<action_assignment*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to change"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to change to be a `SET [1:?] OF work_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<change_request>(const DB& db, const LIST& params, change_request* in)
+{
+ size_t base = GenericFill(db, params, static_cast<action_request_assignment*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to change_request"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to change_request to be a `SET [1:?] OF change_request_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<character_glyph_style_outline>(const DB& db, const LIST& params, character_glyph_style_outline* in)
+{
+ size_t base = GenericFill(db, params, static_cast<founded_item*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to character_glyph_style_outline"); } do { // convert the 'outline_style' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->outline_style, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to character_glyph_style_outline to be a `curve_style`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<character_glyph_style_stroke>(const DB& db, const LIST& params, character_glyph_style_stroke* in)
+{
+ size_t base = GenericFill(db, params, static_cast<founded_item*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to character_glyph_style_stroke"); } do { // convert the 'stroke_style' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->stroke_style, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to character_glyph_style_stroke to be a `curve_style`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<symbol_representation>(const DB& db, const LIST& params, symbol_representation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to symbol_representation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<generic_character_glyph_symbol>(const DB& db, const LIST& params, generic_character_glyph_symbol* in)
+{
+ size_t base = GenericFill(db, params, static_cast<symbol_representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to generic_character_glyph_symbol"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<character_glyph_symbol>(const DB& db, const LIST& params, character_glyph_symbol* in)
+{
+ size_t base = GenericFill(db, params, static_cast<generic_character_glyph_symbol*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to character_glyph_symbol"); } do { // convert the 'character_box' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::character_glyph_symbol, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->character_box, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to character_glyph_symbol to be a `planar_extent`")); }
+ } while (0);
+ do { // convert the 'baseline_ratio' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::character_glyph_symbol, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->baseline_ratio, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to character_glyph_symbol to be a `ratio_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<character_glyph_symbol_outline>(const DB& db, const LIST& params, character_glyph_symbol_outline* in)
+{
+ size_t base = GenericFill(db, params, static_cast<character_glyph_symbol*>(in));
+ if (params.GetSize() < 6) { throw STEP::TypeError("expected 6 arguments to character_glyph_symbol_outline"); } do { // convert the 'outlines' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->outlines, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to character_glyph_symbol_outline to be a `SET [1:?] OF annotation_fill_area`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<character_glyph_symbol_stroke>(const DB& db, const LIST& params, character_glyph_symbol_stroke* in)
+{
+ size_t base = GenericFill(db, params, static_cast<character_glyph_symbol*>(in));
+ if (params.GetSize() < 6) { throw STEP::TypeError("expected 6 arguments to character_glyph_symbol_stroke"); } do { // convert the 'strokes' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->strokes, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to character_glyph_symbol_stroke to be a `SET [1:?] OF curve`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<general_property>(const DB& db, const LIST& params, general_property* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to general_property"); } do { // convert the 'id' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::general_property, 3>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->id, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to general_property to be a `identifier`")); }
+ } while (0);
+ do { // convert the 'name' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::general_property, 3>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->name, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to general_property to be a `label`")); }
+ } while (0);
+ do { // convert the 'description' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::general_property, 3>::aux_is_derived[2] = 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 2 to general_property to be a `text`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<characteristic_data_column_header>(const DB& db, const LIST& params, characteristic_data_column_header* in)
+{
+ size_t base = GenericFill(db, params, static_cast<general_property*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to characteristic_data_column_header"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<general_property_relationship>(const DB& db, const LIST& params, general_property_relationship* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to general_property_relationship"); } do { // convert the 'name' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::general_property_relationship, 4>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->name, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to general_property_relationship to be a `label`")); }
+ } while (0);
+ do { // convert the 'description' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::general_property_relationship, 4>::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 general_property_relationship to be a `text`")); }
+ } while (0);
+ do { // convert the 'relating_property' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::general_property_relationship, 4>::aux_is_derived[2] = true; break; }
+ try { GenericConvert(in->relating_property, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to general_property_relationship to be a `general_property`")); }
+ } while (0);
+ do { // convert the 'related_property' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::general_property_relationship, 4>::aux_is_derived[3] = true; break; }
+ try { GenericConvert(in->related_property, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to general_property_relationship to be a `general_property`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<characteristic_data_column_header_link>(const DB& db, const LIST& params, characteristic_data_column_header_link* in)
+{
+ size_t base = GenericFill(db, params, static_cast<general_property_relationship*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to characteristic_data_column_header_link"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<characteristic_data_table_header>(const DB& db, const LIST& params, characteristic_data_table_header* in)
+{
+ size_t base = GenericFill(db, params, static_cast<general_property*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to characteristic_data_table_header"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<characteristic_data_table_header_decomposition>(const DB& db, const LIST& params, characteristic_data_table_header_decomposition* in)
+{
+ size_t base = GenericFill(db, params, static_cast<general_property_relationship*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to characteristic_data_table_header_decomposition"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<group>(const DB& db, const LIST& params, group* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to group"); } do { // convert the 'name' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::group, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->name, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to group to be a `label`")); }
+ } while (0);
+ do { // convert the 'description' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::group, 2>::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 group to be a `text`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<characteristic_type>(const DB& db, const LIST& params, characteristic_type* in)
+{
+ size_t base = GenericFill(db, params, static_cast<group*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to characteristic_type"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<characterized_class>(const DB& db, const LIST& params, characterized_class* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<characterized_object>(const DB& db, const LIST& params, characterized_object* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to characterized_object"); } do { // convert the 'name' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::characterized_object, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->name, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to characterized_object to be a `label`")); }
+ } while (0);
+ do { // convert the 'description' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::characterized_object, 2>::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 characterized_object to be a `text`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<conic>(const DB& db, const LIST& params, conic* in)
+{
+ size_t base = GenericFill(db, params, static_cast<curve*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to conic"); } do { // convert the 'position' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::conic, 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 1 to conic to be a `axis2_placement`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<circle>(const DB& db, const LIST& params, circle* in)
+{
+ size_t base = GenericFill(db, params, static_cast<conic*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to circle"); } do { // convert the 'radius' argument
+ std::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 2 to circle to be a `positive_length_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<circular_runout_tolerance>(const DB& db, const LIST& params, circular_runout_tolerance* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_tolerance_with_datum_reference*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to circular_runout_tolerance"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<class_by_extension>(const DB& db, const LIST& params, class_by_extension* in)
+{
+ size_t base = GenericFill(db, params, static_cast<class_t*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to class_by_extension"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<class_by_intension>(const DB& db, const LIST& params, class_by_intension* in)
+{
+ size_t base = GenericFill(db, params, static_cast<class_t*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to class_by_intension"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<class_system>(const DB& db, const LIST& params, class_system* in)
+{
+ size_t base = GenericFill(db, params, static_cast<group*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to class_system"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<effectivity_context_assignment>(const DB& db, const LIST& params, effectivity_context_assignment* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to effectivity_context_assignment"); } do { // convert the 'assigned_effectivity_assignment' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::effectivity_context_assignment, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->assigned_effectivity_assignment, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to effectivity_context_assignment to be a `effectivity_assignment`")); }
+ } while (0);
+ do { // convert the 'role' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::effectivity_context_assignment, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->role, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to effectivity_context_assignment to be a `effectivity_context_role`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<class_usage_effectivity_context_assignment>(const DB& db, const LIST& params, class_usage_effectivity_context_assignment* in)
+{
+ size_t base = GenericFill(db, params, static_cast<effectivity_context_assignment*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to class_usage_effectivity_context_assignment"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to class_usage_effectivity_context_assignment to be a `SET [1:?] OF class_usage_effectivity_context_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<topological_representation_item>(const DB& db, const LIST& params, topological_representation_item* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation_item*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to topological_representation_item"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<connected_face_set>(const DB& db, const LIST& params, connected_face_set* in)
+{
+ size_t base = GenericFill(db, params, static_cast<topological_representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to connected_face_set"); } do { // convert the 'cfs_faces' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::connected_face_set, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->cfs_faces, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to connected_face_set to be a `SET [1:?] OF face`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<closed_shell>(const DB& db, const LIST& params, closed_shell* in)
+{
+ size_t base = GenericFill(db, params, static_cast<connected_face_set*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to closed_shell"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<coaxiality_tolerance>(const DB& db, const LIST& params, coaxiality_tolerance* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_tolerance_with_datum_reference*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to coaxiality_tolerance"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<colour_specification>(const DB& db, const LIST& params, colour_specification* in)
+{
+ size_t base = GenericFill(db, params, static_cast<colour*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to colour_specification"); } do { // convert the 'name' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::colour_specification, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->name, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to colour_specification to be a `label`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<colour_rgb>(const DB& db, const LIST& params, colour_rgb* in)
+{
+ size_t base = GenericFill(db, params, static_cast<colour_specification*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to colour_rgb"); } do { // convert the 'red' argument
+ std::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 colour_rgb to be a `REAL`")); }
+ } while (0);
+ do { // convert the 'green' argument
+ std::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 colour_rgb to be a `REAL`")); }
+ } while (0);
+ do { // convert the 'blue' argument
+ std::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 colour_rgb to be a `REAL`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<common_datum>(const DB& db, const LIST& params, common_datum* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<comparison_expression>(const DB& db, const LIST& params, comparison_expression* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<complex_clause>(const DB& db, const LIST& params, complex_clause* in)
+{
+ size_t base = GenericFill(db, params, static_cast<compound_representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to complex_clause"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<complex_conjunctive_clause>(const DB& db, const LIST& params, complex_conjunctive_clause* in)
+{
+ size_t base = GenericFill(db, params, static_cast<complex_clause*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to complex_conjunctive_clause"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<complex_disjunctive_clause>(const DB& db, const LIST& params, complex_disjunctive_clause* in)
+{
+ size_t base = GenericFill(db, params, static_cast<complex_clause*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to complex_disjunctive_clause"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<modified_solid>(const DB& db, const LIST& params, modified_solid* in)
+{
+ size_t base = GenericFill(db, params, static_cast<solid_model*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to modified_solid"); } do { // convert the 'rationale' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::modified_solid, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->rationale, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to modified_solid to be a `text`")); }
+ } while (0);
+ do { // convert the 'base_solid' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::modified_solid, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->base_solid, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to modified_solid to be a `base_solid_select`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<shelled_solid>(const DB& db, const LIST& params, shelled_solid* in)
+{
+ size_t base = GenericFill(db, params, static_cast<modified_solid*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to shelled_solid"); } do { // convert the 'deleted_face_set' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::shelled_solid, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->deleted_face_set, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to shelled_solid to be a `SET [1:?] OF face_surface`")); }
+ } while (0);
+ do { // convert the 'thickness' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::shelled_solid, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->thickness, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to shelled_solid to be a `length_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<complex_shelled_solid>(const DB& db, const LIST& params, complex_shelled_solid* in)
+{
+ size_t base = GenericFill(db, params, static_cast<shelled_solid*>(in));
+ if (params.GetSize() < 6) { throw STEP::TypeError("expected 6 arguments to complex_shelled_solid"); } do { // convert the 'thickness_list' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->thickness_list, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to complex_shelled_solid to be a `LIST [1:?] OF length_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<composite_assembly_definition>(const DB& db, const LIST& params, composite_assembly_definition* in)
+{
+ size_t base = GenericFill(db, params, static_cast<product_definition*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to composite_assembly_definition"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<composite_assembly_sequence_definition>(const DB& db, const LIST& params, composite_assembly_sequence_definition* in)
+{
+ size_t base = GenericFill(db, params, static_cast<product_definition*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to composite_assembly_sequence_definition"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<laminate_table>(const DB& db, const LIST& params, laminate_table* in)
+{
+ size_t base = GenericFill(db, params, static_cast<product_definition*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to laminate_table"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<part_laminate_table>(const DB& db, const LIST& params, part_laminate_table* in)
+{
+ size_t base = GenericFill(db, params, static_cast<laminate_table*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to part_laminate_table"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<composite_assembly_table>(const DB& db, const LIST& params, composite_assembly_table* in)
+{
+ size_t base = GenericFill(db, params, static_cast<part_laminate_table*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to composite_assembly_table"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<composite_curve_segment>(const DB& db, const LIST& params, composite_curve_segment* in)
+{
+ size_t base = GenericFill(db, params, static_cast<founded_item*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to composite_curve_segment"); } do { // convert the 'transition' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::composite_curve_segment, 3>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->transition, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to composite_curve_segment to be a `transition_code`")); }
+ } while (0);
+ do { // convert the 'same_sense' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::composite_curve_segment, 3>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->same_sense, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to composite_curve_segment to be a `BOOLEAN`")); }
+ } while (0);
+ do { // convert the 'parent_curve' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::composite_curve_segment, 3>::aux_is_derived[2] = true; break; }
+ try { GenericConvert(in->parent_curve, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to composite_curve_segment to be a `curve`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<material_designation>(const DB& db, const LIST& params, material_designation* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to material_designation"); } do { // convert the 'name' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::material_designation, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->name, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to material_designation to be a `label`")); }
+ } while (0);
+ do { // convert the 'definitions' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::material_designation, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->definitions, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to material_designation to be a `SET [1:?] OF characterized_definition`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<composite_material_designation>(const DB& db, const LIST& params, composite_material_designation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<material_designation*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to composite_material_designation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<composite_shape_aspect>(const DB& db, const LIST& params, composite_shape_aspect* in)
+{
+ size_t base = GenericFill(db, params, static_cast<shape_aspect*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to composite_shape_aspect"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<composite_sheet_representation>(const DB& db, const LIST& params, composite_sheet_representation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<shape_representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to composite_sheet_representation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<composite_text>(const DB& db, const LIST& params, composite_text* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to composite_text"); } do { // convert the 'collected_text' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::composite_text, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->collected_text, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to composite_text to be a `SET [2:?] OF text_or_character`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<composite_text_with_associated_curves>(const DB& db, const LIST& params, composite_text_with_associated_curves* in)
+{
+ size_t base = GenericFill(db, params, static_cast<composite_text*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to composite_text_with_associated_curves"); } do { // convert the 'associated_curves' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->associated_curves, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to composite_text_with_associated_curves to be a `SET [1:?] OF curve`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<composite_text_with_blanking_box>(const DB& db, const LIST& params, composite_text_with_blanking_box* in)
+{
+ size_t base = GenericFill(db, params, static_cast<composite_text*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to composite_text_with_blanking_box"); } do { // convert the 'blanking' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->blanking, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to composite_text_with_blanking_box to be a `planar_box`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<composite_text_with_delineation>(const DB& db, const LIST& params, composite_text_with_delineation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<composite_text*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to composite_text_with_delineation"); } do { // convert the 'delineation' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->delineation, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to composite_text_with_delineation to be a `text_delineation`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<composite_text_with_extent>(const DB& db, const LIST& params, composite_text_with_extent* in)
+{
+ size_t base = GenericFill(db, params, static_cast<composite_text*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to composite_text_with_extent"); } do { // convert the 'extent' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->extent, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to composite_text_with_extent to be a `planar_extent`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<compound_shape_representation>(const DB& db, const LIST& params, compound_shape_representation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<shape_representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to compound_shape_representation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<concentricity_tolerance>(const DB& db, const LIST& params, concentricity_tolerance* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_tolerance_with_datum_reference*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to concentricity_tolerance"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<concept_feature_relationship>(const DB& db, const LIST& params, concept_feature_relationship* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to concept_feature_relationship"); } do { // convert the 'name' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::concept_feature_relationship, 4>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->name, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to concept_feature_relationship to be a `label`")); }
+ } while (0);
+ do { // convert the 'description' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::concept_feature_relationship, 4>::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 concept_feature_relationship to be a `text`")); }
+ } while (0);
+ do { // convert the 'relating_product_concept_feature' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::concept_feature_relationship, 4>::aux_is_derived[2] = true; break; }
+ try { GenericConvert(in->relating_product_concept_feature, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to concept_feature_relationship to be a `product_concept_feature`")); }
+ } while (0);
+ do { // convert the 'related_product_concept_feature' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::concept_feature_relationship, 4>::aux_is_derived[3] = true; break; }
+ try { GenericConvert(in->related_product_concept_feature, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to concept_feature_relationship to be a `product_concept_feature`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<concept_feature_relationship_with_condition>(const DB& db, const LIST& params, concept_feature_relationship_with_condition* in)
+{
+ size_t base = GenericFill(db, params, static_cast<concept_feature_relationship*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to concept_feature_relationship_with_condition"); } do { // convert the 'conditional_operator' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->conditional_operator, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to concept_feature_relationship_with_condition to be a `concept_feature_operator`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<product_concept_feature>(const DB& db, const LIST& params, product_concept_feature* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to product_concept_feature"); } do { // convert the 'id' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::product_concept_feature, 3>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->id, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to product_concept_feature to be a `identifier`")); }
+ } while (0);
+ do { // convert the 'name' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::product_concept_feature, 3>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->name, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to product_concept_feature to be a `label`")); }
+ } while (0);
+ do { // convert the 'description' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::product_concept_feature, 3>::aux_is_derived[2] = 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 2 to product_concept_feature to be a `text`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<conditional_concept_feature>(const DB& db, const LIST& params, conditional_concept_feature* in)
+{
+ size_t base = GenericFill(db, params, static_cast<product_concept_feature*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to conditional_concept_feature"); } do { // convert the 'condition' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::conditional_concept_feature, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->condition, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to conditional_concept_feature to be a `concept_feature_relationship_with_condition`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<conductance_measure_with_unit>(const DB& db, const LIST& params, conductance_measure_with_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<measure_with_unit*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to conductance_measure_with_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<conductance_unit>(const DB& db, const LIST& params, conductance_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<derived_unit*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to conductance_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<configuration_item>(const DB& db, const LIST& params, configuration_item* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to configuration_item"); } do { // convert the 'id' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::configuration_item, 5>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->id, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to configuration_item to be a `identifier`")); }
+ } while (0);
+ do { // convert the 'name' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::configuration_item, 5>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->name, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to configuration_item to be a `label`")); }
+ } while (0);
+ do { // convert the 'description' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::configuration_item, 5>::aux_is_derived[2] = 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 2 to configuration_item to be a `text`")); }
+ } while (0);
+ do { // convert the 'item_concept' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::configuration_item, 5>::aux_is_derived[3] = true; break; }
+ try { GenericConvert(in->item_concept, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to configuration_item to be a `product_concept`")); }
+ } while (0);
+ do { // convert the 'purpose' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::configuration_item, 5>::aux_is_derived[4] = true; break; }
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert(in->purpose, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to configuration_item to be a `label`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<configurable_item>(const DB& db, const LIST& params, configurable_item* in)
+{
+ size_t base = GenericFill(db, params, static_cast<configuration_item*>(in));
+ if (params.GetSize() < 6) { throw STEP::TypeError("expected 6 arguments to configurable_item"); } do { // convert the 'item_concept_feature' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->item_concept_feature, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to configurable_item to be a `SET [1:?] OF product_concept_feature_association`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<effectivity>(const DB& db, const LIST& params, effectivity* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to effectivity"); } do { // convert the 'id' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::effectivity, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->id, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to effectivity to be a `identifier`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<product_definition_effectivity>(const DB& db, const LIST& params, product_definition_effectivity* in)
+{
+ size_t base = GenericFill(db, params, static_cast<effectivity*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to product_definition_effectivity"); } do { // convert the 'usage' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::product_definition_effectivity, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->usage, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to product_definition_effectivity to be a `product_definition_relationship`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<configuration_effectivity>(const DB& db, const LIST& params, configuration_effectivity* in)
+{
+ size_t base = GenericFill(db, params, static_cast<product_definition_effectivity*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to configuration_effectivity"); } do { // convert the 'configuration' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->configuration, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to configuration_effectivity to be a `configuration_design`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<configuration_item_relationship>(const DB& db, const LIST& params, configuration_item_relationship* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to configuration_item_relationship"); } do { // convert the 'name' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::configuration_item_relationship, 4>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->name, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to configuration_item_relationship to be a `label`")); }
+ } while (0);
+ do { // convert the 'description' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::configuration_item_relationship, 4>::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 configuration_item_relationship to be a `text`")); }
+ } while (0);
+ do { // convert the 'relating_configuration_item' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::configuration_item_relationship, 4>::aux_is_derived[2] = true; break; }
+ try { GenericConvert(in->relating_configuration_item, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to configuration_item_relationship to be a `configuration_item`")); }
+ } while (0);
+ do { // convert the 'related_configuration_item' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::configuration_item_relationship, 4>::aux_is_derived[3] = true; break; }
+ try { GenericConvert(in->related_configuration_item, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to configuration_item_relationship to be a `configuration_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<configuration_item_hierarchical_relationship>(const DB& db, const LIST& params, configuration_item_hierarchical_relationship* in)
+{
+ size_t base = GenericFill(db, params, static_cast<configuration_item_relationship*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to configuration_item_hierarchical_relationship"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<configuration_item_revision_sequence>(const DB& db, const LIST& params, configuration_item_revision_sequence* in)
+{
+ size_t base = GenericFill(db, params, static_cast<configuration_item_relationship*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to configuration_item_revision_sequence"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<configured_effectivity_assignment>(const DB& db, const LIST& params, configured_effectivity_assignment* in)
+{
+ size_t base = GenericFill(db, params, static_cast<effectivity_assignment*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to configured_effectivity_assignment"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to configured_effectivity_assignment to be a `SET [1:?] OF configured_effectivity_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<configured_effectivity_context_assignment>(const DB& db, const LIST& params, configured_effectivity_context_assignment* in)
+{
+ size_t base = GenericFill(db, params, static_cast<effectivity_context_assignment*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to configured_effectivity_context_assignment"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to configured_effectivity_context_assignment to be a `SET [1:?] OF configured_effectivity_context_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<conical_stepped_hole_transition>(const DB& db, const LIST& params, conical_stepped_hole_transition* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_representation_item*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to conical_stepped_hole_transition"); } do { // convert the 'transition_number' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->transition_number, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to conical_stepped_hole_transition to be a `positive_integer`")); }
+ } while (0);
+ do { // convert the 'cone_apex_angle' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->cone_apex_angle, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to conical_stepped_hole_transition to be a `plane_angle_measure`")); }
+ } while (0);
+ do { // convert the 'cone_base_radius' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->cone_base_radius, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to conical_stepped_hole_transition to be a `positive_length_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<elementary_surface>(const DB& db, const LIST& params, elementary_surface* in)
+{
+ size_t base = GenericFill(db, params, static_cast<surface*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to elementary_surface"); } do { // convert the 'position' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::elementary_surface, 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 1 to elementary_surface to be a `axis2_placement_3d`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<conical_surface>(const DB& db, const LIST& params, conical_surface* in)
+{
+ size_t base = GenericFill(db, params, static_cast<elementary_surface*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to conical_surface"); } do { // convert the 'radius' argument
+ std::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 2 to conical_surface to be a `length_measure`")); }
+ } while (0);
+ do { // convert the 'semi_angle' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->semi_angle, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to conical_surface to be a `plane_angle_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<connected_edge_set>(const DB& db, const LIST& params, connected_edge_set* in)
+{
+ size_t base = GenericFill(db, params, static_cast<topological_representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to connected_edge_set"); } do { // convert the 'ces_edges' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->ces_edges, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to connected_edge_set to be a `SET [1:?] OF edge`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<connected_face_sub_set>(const DB& db, const LIST& params, connected_face_sub_set* in)
+{
+ size_t base = GenericFill(db, params, static_cast<connected_face_set*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to connected_face_sub_set"); } do { // convert the 'parent_face_set' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->parent_face_set, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to connected_face_sub_set to be a `connected_face_set`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<constructive_geometry_representation>(const DB& db, const LIST& params, constructive_geometry_representation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to constructive_geometry_representation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<representation_relationship>(const DB& db, const LIST& params, representation_relationship* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to representation_relationship"); } do { // convert the 'name' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::representation_relationship, 4>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->name, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to representation_relationship to be a `label`")); }
+ } while (0);
+ do { // convert the 'description' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::representation_relationship, 4>::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 representation_relationship to be a `text`")); }
+ } while (0);
+ do { // convert the 'rep_1' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::representation_relationship, 4>::aux_is_derived[2] = true; break; }
+ try { GenericConvert(in->rep_1, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to representation_relationship to be a `representation`")); }
+ } while (0);
+ do { // convert the 'rep_2' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::representation_relationship, 4>::aux_is_derived[3] = true; break; }
+ try { GenericConvert(in->rep_2, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to representation_relationship to be a `representation`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<constructive_geometry_representation_relationship>(const DB& db, const LIST& params, constructive_geometry_representation_relationship* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation_relationship*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to constructive_geometry_representation_relationship"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<contact_ratio_representation>(const DB& db, const LIST& params, contact_ratio_representation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to contact_ratio_representation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<invisibility>(const DB& db, const LIST& params, invisibility* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to invisibility"); } do { // convert the 'invisible_items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::invisibility, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->invisible_items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to invisibility to be a `SET [1:?] OF invisible_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<context_dependent_invisibility>(const DB& db, const LIST& params, context_dependent_invisibility* in)
+{
+ size_t base = GenericFill(db, params, static_cast<invisibility*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to context_dependent_invisibility"); } do { // convert the 'presentation_context' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->presentation_context, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to context_dependent_invisibility to be a `invisibility_context`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<over_riding_styled_item>(const DB& db, const LIST& params, over_riding_styled_item* in)
+{
+ size_t base = GenericFill(db, params, static_cast<styled_item*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to over_riding_styled_item"); } do { // convert the 'over_ridden_style' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::over_riding_styled_item, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->over_ridden_style, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to over_riding_styled_item to be a `styled_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<context_dependent_over_riding_styled_item>(const DB& db, const LIST& params, context_dependent_over_riding_styled_item* in)
+{
+ size_t base = GenericFill(db, params, static_cast<over_riding_styled_item*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to context_dependent_over_riding_styled_item"); } do { // convert the 'style_context' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::context_dependent_over_riding_styled_item, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->style_context, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to context_dependent_over_riding_styled_item to be a `LIST [1:?] OF style_context_select`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<context_dependent_unit>(const DB& db, const LIST& params, context_dependent_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<named_unit*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to context_dependent_unit"); } do { // convert the 'name' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::context_dependent_unit, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->name, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to context_dependent_unit to be a `label`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<conversion_based_unit>(const DB& db, const LIST& params, conversion_based_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<named_unit*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to conversion_based_unit"); } do { // convert the 'name' argument
+ std::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 1 to conversion_based_unit to be a `label`")); }
+ } while (0);
+ do { // convert the 'conversion_factor' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->conversion_factor, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to conversion_based_unit to be a `measure_with_unit`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<csg_shape_representation>(const DB& db, const LIST& params, csg_shape_representation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<shape_representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to csg_shape_representation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<csg_solid>(const DB& db, const LIST& params, csg_solid* in)
+{
+ size_t base = GenericFill(db, params, static_cast<solid_model*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to csg_solid"); } do { // convert the 'tree_root_expression' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->tree_root_expression, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to csg_solid to be a `csg_select`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<currency>(const DB& db, const LIST& params, currency* in)
+{
+ size_t base = GenericFill(db, params, static_cast<context_dependent_unit*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to currency"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<currency_measure_with_unit>(const DB& db, const LIST& params, currency_measure_with_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<measure_with_unit*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to currency_measure_with_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<curve_bounded_surface>(const DB& db, const LIST& params, curve_bounded_surface* in)
+{
+ size_t base = GenericFill(db, params, static_cast<bounded_surface*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to curve_bounded_surface"); } do { // convert the 'basis_surface' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->basis_surface, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to curve_bounded_surface to be a `surface`")); }
+ } while (0);
+ do { // convert the 'boundaries' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->boundaries, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to curve_bounded_surface to be a `SET [1:?] OF boundary_curve`")); }
+ } while (0);
+ do { // convert the 'implicit_outer' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->implicit_outer, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to curve_bounded_surface to be a `BOOLEAN`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<curve_dimension>(const DB& db, const LIST& params, curve_dimension* in)
+{
+ size_t base = GenericFill(db, params, static_cast<dimension_curve_directed_callout*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to curve_dimension"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<curve_replica>(const DB& db, const LIST& params, curve_replica* in)
+{
+ size_t base = GenericFill(db, params, static_cast<curve*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to curve_replica"); } do { // convert the 'parent_curve' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->parent_curve, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to curve_replica to be a `curve`")); }
+ } while (0);
+ do { // convert the 'transformation' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->transformation, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to curve_replica to be a `cartesian_transformation_operator`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<curve_style>(const DB& db, const LIST& params, curve_style* in)
+{
+ size_t base = GenericFill(db, params, static_cast<founded_item*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to curve_style"); } do { // convert the 'name' argument
+ std::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 0 to curve_style to be a `label`")); }
+ } while (0);
+ do { // convert the 'curve_font' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->curve_font, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to curve_style to be a `curve_font_or_scaled_curve_font_select`")); }
+ } while (0);
+ do { // convert the 'curve_width' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->curve_width, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to curve_style to be a `size_select`")); }
+ } while (0);
+ do { // convert the 'curve_colour' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->curve_colour, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to curve_style to be a `colour`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<curve_style_font>(const DB& db, const LIST& params, curve_style_font* in)
+{
+ size_t base = GenericFill(db, params, static_cast<founded_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to curve_style_font"); } do { // convert the 'name' argument
+ std::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 0 to curve_style_font to be a `label`")); }
+ } while (0);
+ do { // convert the 'pattern_list' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->pattern_list, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to curve_style_font to be a `LIST [1:?] OF curve_style_font_pattern`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<curve_style_font_and_scaling>(const DB& db, const LIST& params, curve_style_font_and_scaling* in)
+{
+ size_t base = GenericFill(db, params, static_cast<founded_item*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to curve_style_font_and_scaling"); } do { // convert the 'name' argument
+ std::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 0 to curve_style_font_and_scaling to be a `label`")); }
+ } while (0);
+ do { // convert the 'curve_font' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->curve_font, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to curve_style_font_and_scaling to be a `curve_style_font_select`")); }
+ } while (0);
+ do { // convert the 'curve_font_scaling' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->curve_font_scaling, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to curve_style_font_and_scaling to be a `REAL`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<curve_style_font_pattern>(const DB& db, const LIST& params, curve_style_font_pattern* in)
+{
+ size_t base = GenericFill(db, params, static_cast<founded_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to curve_style_font_pattern"); } do { // convert the 'visible_segment_length' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->visible_segment_length, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to curve_style_font_pattern to be a `positive_length_measure`")); }
+ } while (0);
+ do { // convert the 'invisible_segment_length' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->invisible_segment_length, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to curve_style_font_pattern to be a `positive_length_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<curve_swept_solid_shape_representation>(const DB& db, const LIST& params, curve_swept_solid_shape_representation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<shape_representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to curve_swept_solid_shape_representation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<cylindrical_surface>(const DB& db, const LIST& params, cylindrical_surface* in)
+{
+ size_t base = GenericFill(db, params, static_cast<elementary_surface*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to cylindrical_surface"); } do { // convert the 'radius' argument
+ std::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 2 to cylindrical_surface to be a `positive_length_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<cylindricity_tolerance>(const DB& db, const LIST& params, cylindricity_tolerance* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_tolerance*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to cylindricity_tolerance"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<date_representation_item>(const DB& db, const LIST& params, date_representation_item* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<date_time_representation_item>(const DB& db, const LIST& params, date_time_representation_item* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<dated_effectivity>(const DB& db, const LIST& params, dated_effectivity* in)
+{
+ size_t base = GenericFill(db, params, static_cast<effectivity*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to dated_effectivity"); } do { // convert the 'effectivity_end_date' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert(in->effectivity_end_date, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to dated_effectivity to be a `date_time_or_event_occurrence`")); }
+ } while (0);
+ do { // convert the 'effectivity_start_date' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->effectivity_start_date, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to dated_effectivity to be a `date_time_or_event_occurrence`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<datum>(const DB& db, const LIST& params, datum* in)
+{
+ size_t base = GenericFill(db, params, static_cast<shape_aspect*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to datum"); } do { // convert the 'identification' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->identification, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to datum to be a `identifier`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<datum_feature>(const DB& db, const LIST& params, datum_feature* in)
+{
+ size_t base = GenericFill(db, params, static_cast<shape_aspect*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to datum_feature"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<datum_feature_callout>(const DB& db, const LIST& params, datum_feature_callout* in)
+{
+ size_t base = GenericFill(db, params, static_cast<draughting_callout*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to datum_feature_callout"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<datum_reference>(const DB& db, const LIST& params, datum_reference* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to datum_reference"); } do { // convert the 'precedence' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::datum_reference, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->precedence, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to datum_reference to be a `INTEGER`")); }
+ } while (0);
+ do { // convert the 'referenced_datum' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::datum_reference, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->referenced_datum, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to datum_reference to be a `datum`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<datum_target>(const DB& db, const LIST& params, datum_target* in)
+{
+ size_t base = GenericFill(db, params, static_cast<shape_aspect*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to datum_target"); } do { // convert the 'target_id' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::datum_target, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->target_id, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to datum_target to be a `identifier`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<datum_target_callout>(const DB& db, const LIST& params, datum_target_callout* in)
+{
+ size_t base = GenericFill(db, params, static_cast<draughting_callout*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to datum_target_callout"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<default_tolerance_table>(const DB& db, const LIST& params, default_tolerance_table* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to default_tolerance_table"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<default_tolerance_table_cell>(const DB& db, const LIST& params, default_tolerance_table_cell* in)
+{
+ size_t base = GenericFill(db, params, static_cast<compound_representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to default_tolerance_table_cell"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<defined_symbol>(const DB& db, const LIST& params, defined_symbol* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_representation_item*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to defined_symbol"); } do { // convert the 'definition' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->definition, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to defined_symbol to be a `defined_symbol_select`")); }
+ } while (0);
+ do { // convert the 'target' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->target, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to defined_symbol to be a `symbol_target`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<definitional_representation>(const DB& db, const LIST& params, definitional_representation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to definitional_representation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<definitional_representation_relationship>(const DB& db, const LIST& params, definitional_representation_relationship* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation_relationship*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to definitional_representation_relationship"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<definitional_representation_relationship_with_same_context>(const DB& db, const LIST& params, definitional_representation_relationship_with_same_context* in)
+{
+ size_t base = GenericFill(db, params, static_cast<definitional_representation_relationship*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to definitional_representation_relationship_with_same_context"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<degenerate_pcurve>(const DB& db, const LIST& params, degenerate_pcurve* in)
+{
+ size_t base = GenericFill(db, params, static_cast<point*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to degenerate_pcurve"); } do { // convert the 'basis_surface' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::degenerate_pcurve, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->basis_surface, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to degenerate_pcurve to be a `surface`")); }
+ } while (0);
+ do { // convert the 'reference_to_curve' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::degenerate_pcurve, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->reference_to_curve, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to degenerate_pcurve to be a `definitional_representation`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<toroidal_surface>(const DB& db, const LIST& params, toroidal_surface* in)
+{
+ size_t base = GenericFill(db, params, static_cast<elementary_surface*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to toroidal_surface"); } do { // convert the 'major_radius' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::toroidal_surface, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->major_radius, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to toroidal_surface to be a `positive_length_measure`")); }
+ } while (0);
+ do { // convert the 'minor_radius' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::toroidal_surface, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->minor_radius, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to toroidal_surface to be a `positive_length_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<degenerate_toroidal_surface>(const DB& db, const LIST& params, degenerate_toroidal_surface* in)
+{
+ size_t base = GenericFill(db, params, static_cast<toroidal_surface*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to degenerate_toroidal_surface"); } do { // convert the 'select_outer' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->select_outer, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to degenerate_toroidal_surface to be a `BOOLEAN`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<descriptive_representation_item>(const DB& db, const LIST& params, descriptive_representation_item* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to descriptive_representation_item"); } do { // convert the 'description' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::descriptive_representation_item, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->description, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to descriptive_representation_item to be a `text`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<product_definition_context>(const DB& db, const LIST& params, product_definition_context* in)
+{
+ size_t base = GenericFill(db, params, static_cast<application_context_element*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to product_definition_context"); } do { // convert the 'life_cycle_stage' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::product_definition_context, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->life_cycle_stage, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to product_definition_context to be a `label`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<design_context>(const DB& db, const LIST& params, design_context* in)
+{
+ size_t base = GenericFill(db, params, static_cast<product_definition_context*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to design_context"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<design_make_from_relationship>(const DB& db, const LIST& params, design_make_from_relationship* in)
+{
+ size_t base = GenericFill(db, params, static_cast<product_definition_relationship*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to design_make_from_relationship"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<diameter_dimension>(const DB& db, const LIST& params, diameter_dimension* in)
+{
+ size_t base = GenericFill(db, params, static_cast<dimension_curve_directed_callout*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to diameter_dimension"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<ratio_measure_with_unit>(const DB& db, const LIST& params, ratio_measure_with_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<measure_with_unit*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to ratio_measure_with_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<dielectric_constant_measure_with_unit>(const DB& db, const LIST& params, dielectric_constant_measure_with_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<ratio_measure_with_unit*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to dielectric_constant_measure_with_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<dimension_callout>(const DB& db, const LIST& params, dimension_callout* in)
+{
+ size_t base = GenericFill(db, params, static_cast<draughting_callout*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to dimension_callout"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<draughting_callout_relationship>(const DB& db, const LIST& params, draughting_callout_relationship* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to draughting_callout_relationship"); } do { // convert the 'name' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::draughting_callout_relationship, 4>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->name, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to draughting_callout_relationship to be a `label`")); }
+ } while (0);
+ do { // convert the 'description' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::draughting_callout_relationship, 4>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->description, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to draughting_callout_relationship to be a `text`")); }
+ } while (0);
+ do { // convert the 'relating_draughting_callout' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::draughting_callout_relationship, 4>::aux_is_derived[2] = true; break; }
+ try { GenericConvert(in->relating_draughting_callout, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to draughting_callout_relationship to be a `draughting_callout`")); }
+ } while (0);
+ do { // convert the 'related_draughting_callout' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::draughting_callout_relationship, 4>::aux_is_derived[3] = true; break; }
+ try { GenericConvert(in->related_draughting_callout, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to draughting_callout_relationship to be a `draughting_callout`")); }
+ } while (0);
+ return base;
+}
+
+}
+}
diff --git a/code/Importer/StepFile/StepFileGen3.cpp b/code/Importer/StepFile/StepFileGen3.cpp
new file mode 100644
index 000000000..d8d81141f
--- /dev/null
+++ b/code/Importer/StepFile/StepFileGen3.cpp
@@ -0,0 +1,5746 @@
+/*
+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 "code/Importer/StepFile/StepReaderGen.h"
+
+namespace Assimp {
+using namespace StepFile;
+namespace STEP {
+
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<dimension_callout_component_relationship>(const DB& db, const LIST& params, dimension_callout_component_relationship* in)
+{
+ size_t base = GenericFill(db, params, static_cast<draughting_callout_relationship*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to dimension_callout_component_relationship"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<dimension_callout_relationship>(const DB& db, const LIST& params, dimension_callout_relationship* in)
+{
+ size_t base = GenericFill(db, params, static_cast<draughting_callout_relationship*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to dimension_callout_relationship"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<dimension_curve>(const DB& db, const LIST& params, dimension_curve* in)
+{
+ size_t base = GenericFill(db, params, static_cast<annotation_curve_occurrence*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to dimension_curve"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<terminator_symbol>(const DB& db, const LIST& params, terminator_symbol* in)
+{
+ size_t base = GenericFill(db, params, static_cast<annotation_symbol_occurrence*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to terminator_symbol"); } do { // convert the 'annotated_curve' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::terminator_symbol, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->annotated_curve, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to terminator_symbol to be a `annotation_curve_occurrence`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<dimension_curve_terminator>(const DB& db, const LIST& params, dimension_curve_terminator* in)
+{
+ size_t base = GenericFill(db, params, static_cast<terminator_symbol*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to dimension_curve_terminator"); } do { // convert the 'role' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->role, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to dimension_curve_terminator to be a `dimension_extent_usage`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<dimension_curve_terminator_to_projection_curve_associativity>(const DB& db, const LIST& params, dimension_curve_terminator_to_projection_curve_associativity* in)
+{
+ size_t base = GenericFill(db, params, static_cast<annotation_occurrence_associativity*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to dimension_curve_terminator_to_projection_curve_associativity"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<dimension_pair>(const DB& db, const LIST& params, dimension_pair* in)
+{
+ size_t base = GenericFill(db, params, static_cast<draughting_callout_relationship*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to dimension_pair"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<dimension_text_associativity>(const DB& db, const LIST& params, dimension_text_associativity* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<dimensional_location_with_path>(const DB& db, const LIST& params, dimensional_location_with_path* in)
+{
+ size_t base = GenericFill(db, params, static_cast<dimensional_location*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to dimensional_location_with_path"); } do { // convert the 'path' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->path, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to dimensional_location_with_path to be a `shape_aspect`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<dimensional_size_with_path>(const DB& db, const LIST& params, dimensional_size_with_path* in)
+{
+ size_t base = GenericFill(db, params, static_cast<dimensional_size*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to dimensional_size_with_path"); } do { // convert the 'path' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->path, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to dimensional_size_with_path to be a `shape_aspect`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<executed_action>(const DB& db, const LIST& params, executed_action* in)
+{
+ size_t base = GenericFill(db, params, static_cast<action*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to executed_action"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<directed_action>(const DB& db, const LIST& params, directed_action* in)
+{
+ size_t base = GenericFill(db, params, static_cast<executed_action*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to directed_action"); } do { // convert the 'directive' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->directive, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to directed_action to be a `action_directive`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<directed_dimensional_location>(const DB& db, const LIST& params, directed_dimensional_location* in)
+{
+ size_t base = GenericFill(db, params, static_cast<dimensional_location*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to directed_dimensional_location"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<direction>(const DB& db, const LIST& params, direction* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to direction"); } do { // convert the 'direction_ratios' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->direction_ratios, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to direction to be a `LIST [2:3] OF REAL`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<document_file>(const DB& db, const LIST& params, document_file* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<document_identifier>(const DB& db, const LIST& params, document_identifier* in)
+{
+ size_t base = GenericFill(db, params, static_cast<group*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to document_identifier"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<document_identifier_assignment>(const DB& db, const LIST& params, document_identifier_assignment* in)
+{
+ size_t base = GenericFill(db, params, static_cast<group_assignment*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to document_identifier_assignment"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to document_identifier_assignment to be a `SET [1:?] OF document_identifier_assigned_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<document_product_association>(const DB& db, const LIST& params, document_product_association* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to document_product_association"); } do { // convert the 'name' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::document_product_association, 4>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->name, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to document_product_association to be a `label`")); }
+ } while (0);
+ do { // convert the 'description' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::document_product_association, 4>::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 document_product_association to be a `text`")); }
+ } while (0);
+ do { // convert the 'relating_document' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::document_product_association, 4>::aux_is_derived[2] = true; break; }
+ try { GenericConvert(in->relating_document, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to document_product_association to be a `document`")); }
+ } while (0);
+ do { // convert the 'related_product' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::document_product_association, 4>::aux_is_derived[3] = true; break; }
+ try { GenericConvert(in->related_product, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to document_product_association to be a `product_or_formation_or_definition`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<document_product_equivalence>(const DB& db, const LIST& params, document_product_equivalence* in)
+{
+ size_t base = GenericFill(db, params, static_cast<document_product_association*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to document_product_equivalence"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<dose_equivalent_measure_with_unit>(const DB& db, const LIST& params, dose_equivalent_measure_with_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<measure_with_unit*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to dose_equivalent_measure_with_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<dose_equivalent_unit>(const DB& db, const LIST& params, dose_equivalent_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<derived_unit*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to dose_equivalent_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<double_offset_shelled_solid>(const DB& db, const LIST& params, double_offset_shelled_solid* in)
+{
+ size_t base = GenericFill(db, params, static_cast<shelled_solid*>(in));
+ if (params.GetSize() < 6) { throw STEP::TypeError("expected 6 arguments to double_offset_shelled_solid"); } do { // convert the 'thickness2' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->thickness2, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to double_offset_shelled_solid to be a `length_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<item_defined_transformation>(const DB& db, const LIST& params, item_defined_transformation* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to item_defined_transformation"); } do { // convert the 'name' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::item_defined_transformation, 4>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->name, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to item_defined_transformation to be a `label`")); }
+ } while (0);
+ do { // convert the 'description' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::item_defined_transformation, 4>::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 item_defined_transformation to be a `text`")); }
+ } while (0);
+ do { // convert the 'transform_item_1' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::item_defined_transformation, 4>::aux_is_derived[2] = true; break; }
+ try { GenericConvert(in->transform_item_1, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to item_defined_transformation to be a `representation_item`")); }
+ } while (0);
+ do { // convert the 'transform_item_2' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::item_defined_transformation, 4>::aux_is_derived[3] = true; break; }
+ try { GenericConvert(in->transform_item_2, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to item_defined_transformation to be a `representation_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<transformation_with_derived_angle>(const DB& db, const LIST& params, transformation_with_derived_angle* in)
+{
+ size_t base = GenericFill(db, params, static_cast<item_defined_transformation*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to transformation_with_derived_angle"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<draped_defined_transformation>(const DB& db, const LIST& params, draped_defined_transformation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<transformation_with_derived_angle*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to draped_defined_transformation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<draughting_annotation_occurrence>(const DB& db, const LIST& params, draughting_annotation_occurrence* in)
+{
+ size_t base = GenericFill(db, params, static_cast<annotation_occurrence*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to draughting_annotation_occurrence"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<draughting_elements>(const DB& db, const LIST& params, draughting_elements* in)
+{
+ size_t base = GenericFill(db, params, static_cast<draughting_callout*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to draughting_elements"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<draughting_model>(const DB& db, const LIST& params, draughting_model* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to draughting_model"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<item_identified_representation_usage>(const DB& db, const LIST& params, item_identified_representation_usage* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to item_identified_representation_usage"); } do { // convert the 'name' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::item_identified_representation_usage, 5>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->name, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to item_identified_representation_usage to be a `label`")); }
+ } while (0);
+ do { // convert the 'description' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::item_identified_representation_usage, 5>::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 item_identified_representation_usage to be a `text`")); }
+ } while (0);
+ do { // convert the 'definition' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::item_identified_representation_usage, 5>::aux_is_derived[2] = true; break; }
+ try { GenericConvert(in->definition, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to item_identified_representation_usage to be a `represented_definition`")); }
+ } while (0);
+ do { // convert the 'used_representation' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::item_identified_representation_usage, 5>::aux_is_derived[3] = true; break; }
+ try { GenericConvert(in->used_representation, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to item_identified_representation_usage to be a `representation`")); }
+ } while (0);
+ do { // convert the 'identified_item' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::item_identified_representation_usage, 5>::aux_is_derived[4] = true; break; }
+ try { GenericConvert(in->identified_item, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to item_identified_representation_usage to be a `representation_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<draughting_model_item_association>(const DB& db, const LIST& params, draughting_model_item_association* in)
+{
+ size_t base = GenericFill(db, params, static_cast<item_identified_representation_usage*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to draughting_model_item_association"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<pre_defined_colour>(const DB& db, const LIST& params, pre_defined_colour* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<draughting_pre_defined_colour>(const DB& db, const LIST& params, draughting_pre_defined_colour* in)
+{
+ size_t base = GenericFill(db, params, static_cast<pre_defined_colour*>(in));
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<pre_defined_item>(const DB& db, const LIST& params, pre_defined_item* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to pre_defined_item"); } do { // convert the 'name' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::pre_defined_item, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->name, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to pre_defined_item to be a `label`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<pre_defined_curve_font>(const DB& db, const LIST& params, pre_defined_curve_font* in)
+{
+ size_t base = GenericFill(db, params, static_cast<pre_defined_item*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to pre_defined_curve_font"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<draughting_pre_defined_curve_font>(const DB& db, const LIST& params, draughting_pre_defined_curve_font* in)
+{
+ size_t base = GenericFill(db, params, static_cast<pre_defined_curve_font*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to draughting_pre_defined_curve_font"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<pre_defined_text_font>(const DB& db, const LIST& params, pre_defined_text_font* in)
+{
+ size_t base = GenericFill(db, params, static_cast<pre_defined_item*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to pre_defined_text_font"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<draughting_pre_defined_text_font>(const DB& db, const LIST& params, draughting_pre_defined_text_font* in)
+{
+ size_t base = GenericFill(db, params, static_cast<pre_defined_text_font*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to draughting_pre_defined_text_font"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<draughting_subfigure_representation>(const DB& db, const LIST& params, draughting_subfigure_representation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<symbol_representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to draughting_subfigure_representation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<draughting_symbol_representation>(const DB& db, const LIST& params, draughting_symbol_representation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<symbol_representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to draughting_symbol_representation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<text_literal>(const DB& db, const LIST& params, text_literal* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_representation_item*>(in));
+ if (params.GetSize() < 6) { throw STEP::TypeError("expected 6 arguments to text_literal"); } do { // convert the 'literal' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::text_literal, 5>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->literal, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to text_literal to be a `presentable_text`")); }
+ } while (0);
+ do { // convert the 'placement' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::text_literal, 5>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->placement, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to text_literal to be a `axis2_placement`")); }
+ } while (0);
+ do { // convert the 'alignment' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::text_literal, 5>::aux_is_derived[2] = true; break; }
+ try { GenericConvert(in->alignment, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to text_literal to be a `text_alignment`")); }
+ } while (0);
+ do { // convert the 'path' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::text_literal, 5>::aux_is_derived[3] = true; break; }
+ try { GenericConvert(in->path, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to text_literal to be a `text_path`")); }
+ } while (0);
+ do { // convert the 'font' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::text_literal, 5>::aux_is_derived[4] = true; break; }
+ try { GenericConvert(in->font, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to text_literal to be a `font_select`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<text_literal_with_delineation>(const DB& db, const LIST& params, text_literal_with_delineation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<text_literal*>(in));
+ if (params.GetSize() < 7) { throw STEP::TypeError("expected 7 arguments to text_literal_with_delineation"); } do { // convert the 'delineation' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::text_literal_with_delineation, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->delineation, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to text_literal_with_delineation to be a `text_delineation`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<draughting_text_literal_with_delineation>(const DB& db, const LIST& params, draughting_text_literal_with_delineation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<text_literal_with_delineation*>(in));
+ if (params.GetSize() < 7) { throw STEP::TypeError("expected 7 arguments to draughting_text_literal_with_delineation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<presentation_set>(const DB& db, const LIST& params, presentation_set* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<drawing_revision>(const DB& db, const LIST& params, drawing_revision* in)
+{
+ size_t base = GenericFill(db, params, static_cast<presentation_set*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to drawing_revision"); } do { // convert the 'revision_identifier' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->revision_identifier, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to drawing_revision to be a `identifier`")); }
+ } while (0);
+ do { // convert the 'drawing_identifier' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->drawing_identifier, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to drawing_revision to be a `drawing_definition`")); }
+ } while (0);
+ do { // convert the 'intended_scale' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert(in->intended_scale, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to drawing_revision to be a `text`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<presentation_representation>(const DB& db, const LIST& params, presentation_representation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to presentation_representation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<presentation_area>(const DB& db, const LIST& params, presentation_area* in)
+{
+ size_t base = GenericFill(db, params, static_cast<presentation_representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to presentation_area"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<drawing_sheet_revision>(const DB& db, const LIST& params, drawing_sheet_revision* in)
+{
+ size_t base = GenericFill(db, params, static_cast<presentation_area*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to drawing_sheet_revision"); } do { // convert the 'revision_identifier' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->revision_identifier, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to drawing_sheet_revision to be a `identifier`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<drawing_sheet_revision_sequence>(const DB& db, const LIST& params, drawing_sheet_revision_sequence* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation_relationship*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to drawing_sheet_revision_sequence"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<drawing_sheet_revision_usage>(const DB& db, const LIST& params, drawing_sheet_revision_usage* in)
+{
+ size_t base = GenericFill(db, params, static_cast<area_in_set*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to drawing_sheet_revision_usage"); } do { // convert the 'sheet_number' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->sheet_number, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to drawing_sheet_revision_usage to be a `identifier`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<edge>(const DB& db, const LIST& params, edge* in)
+{
+ size_t base = GenericFill(db, params, static_cast<topological_representation_item*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to edge"); } do { // convert the 'edge_start' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::edge, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->edge_start, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to edge to be a `vertex`")); }
+ } while (0);
+ do { // convert the 'edge_end' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::edge, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->edge_end, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to edge to be a `vertex`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<edge_based_wireframe_model>(const DB& db, const LIST& params, edge_based_wireframe_model* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to edge_based_wireframe_model"); } do { // convert the 'ebwm_boundary' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->ebwm_boundary, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to edge_based_wireframe_model to be a `SET [1:?] OF connected_edge_set`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<edge_based_wireframe_shape_representation>(const DB& db, const LIST& params, edge_based_wireframe_shape_representation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<shape_representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to edge_based_wireframe_shape_representation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<edge_blended_solid>(const DB& db, const LIST& params, edge_blended_solid* in)
+{
+ size_t base = GenericFill(db, params, static_cast<modified_solid*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to edge_blended_solid"); } do { // convert the 'blended_edges' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::edge_blended_solid, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->blended_edges, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to edge_blended_solid to be a `LIST [1:?] OF edge_curve`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<edge_curve>(const DB& db, const LIST& params, edge_curve* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to edge_curve"); } do { // convert the 'edge_geometry' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->edge_geometry, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to edge_curve to be a `curve`")); }
+ } while (0);
+ do { // convert the 'same_sense' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->same_sense, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to edge_curve to be a `BOOLEAN`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<edge_loop>(const DB& db, const LIST& params, edge_loop* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<electric_charge_measure_with_unit>(const DB& db, const LIST& params, electric_charge_measure_with_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<measure_with_unit*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to electric_charge_measure_with_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<electric_charge_unit>(const DB& db, const LIST& params, electric_charge_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<derived_unit*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to electric_charge_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<electric_current_measure_with_unit>(const DB& db, const LIST& params, electric_current_measure_with_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<measure_with_unit*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to electric_current_measure_with_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<electric_current_unit>(const DB& db, const LIST& params, electric_current_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<named_unit*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to electric_current_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<electric_potential_measure_with_unit>(const DB& db, const LIST& params, electric_potential_measure_with_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<measure_with_unit*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to electric_potential_measure_with_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<electric_potential_unit>(const DB& db, const LIST& params, electric_potential_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<derived_unit*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to electric_potential_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<elementary_brep_shape_representation>(const DB& db, const LIST& params, elementary_brep_shape_representation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<shape_representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to elementary_brep_shape_representation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<ellipse>(const DB& db, const LIST& params, ellipse* in)
+{
+ size_t base = GenericFill(db, params, static_cast<conic*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to ellipse"); } do { // convert the 'semi_axis_1' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->semi_axis_1, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to ellipse to be a `positive_length_measure`")); }
+ } while (0);
+ do { // convert the 'semi_axis_2' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->semi_axis_2, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to ellipse to be a `positive_length_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<energy_measure_with_unit>(const DB& db, const LIST& params, energy_measure_with_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<measure_with_unit*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to energy_measure_with_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<energy_unit>(const DB& db, const LIST& params, energy_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<derived_unit*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to energy_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<property_definition>(const DB& db, const LIST& params, property_definition* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to property_definition"); } do { // convert the 'name' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::property_definition, 3>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->name, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to property_definition to be a `label`")); }
+ } while (0);
+ do { // convert the 'description' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::property_definition, 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 property_definition to be a `text`")); }
+ } while (0);
+ do { // convert the 'definition' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::property_definition, 3>::aux_is_derived[2] = true; break; }
+ try { GenericConvert(in->definition, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to property_definition to be a `characterized_definition`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<fact_type>(const DB& db, const LIST& params, fact_type* in)
+{
+ size_t base = GenericFill(db, params, static_cast<property_definition*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to fact_type"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<entity_assertion>(const DB& db, const LIST& params, entity_assertion* in)
+{
+ size_t base = GenericFill(db, params, static_cast<fact_type*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to entity_assertion"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<enum_reference_prefix>(const DB& db, const LIST& params, enum_reference_prefix* in)
+{
+ size_t base = GenericFill(db, params, static_cast<descriptive_representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to enum_reference_prefix"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<evaluated_characteristic>(const DB& db, const LIST& params, evaluated_characteristic* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<evaluated_degenerate_pcurve>(const DB& db, const LIST& params, evaluated_degenerate_pcurve* in)
+{
+ size_t base = GenericFill(db, params, static_cast<degenerate_pcurve*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to evaluated_degenerate_pcurve"); } do { // convert the 'equivalent_point' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->equivalent_point, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to evaluated_degenerate_pcurve to be a `cartesian_point`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<evaluation_product_definition>(const DB& db, const LIST& params, evaluation_product_definition* in)
+{
+ size_t base = GenericFill(db, params, static_cast<product_definition*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to evaluation_product_definition"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<event_occurrence>(const DB& db, const LIST& params, event_occurrence* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to event_occurrence"); } do { // convert the 'id' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::event_occurrence, 3>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->id, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to event_occurrence to be a `identifier`")); }
+ } while (0);
+ do { // convert the 'name' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::event_occurrence, 3>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->name, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to event_occurrence to be a `label`")); }
+ } while (0);
+ do { // convert the 'description' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::event_occurrence, 3>::aux_is_derived[2] = 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 2 to event_occurrence to be a `text`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<product_concept_feature_category>(const DB& db, const LIST& params, product_concept_feature_category* in)
+{
+ size_t base = GenericFill(db, params, static_cast<group*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to product_concept_feature_category"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<exclusive_product_concept_feature_category>(const DB& db, const LIST& params, exclusive_product_concept_feature_category* in)
+{
+ size_t base = GenericFill(db, params, static_cast<product_concept_feature_category*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to exclusive_product_concept_feature_category"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<uncertainty_qualifier>(const DB& db, const LIST& params, uncertainty_qualifier* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to uncertainty_qualifier"); } do { // convert the 'measure_name' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::uncertainty_qualifier, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->measure_name, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to uncertainty_qualifier to be a `label`")); }
+ } while (0);
+ do { // convert the 'description' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::uncertainty_qualifier, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->description, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to uncertainty_qualifier to be a `text`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<standard_uncertainty>(const DB& db, const LIST& params, standard_uncertainty* in)
+{
+ size_t base = GenericFill(db, params, static_cast<uncertainty_qualifier*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to standard_uncertainty"); } do { // convert the 'uncertainty_value' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::standard_uncertainty, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->uncertainty_value, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to standard_uncertainty to be a `REAL`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<expanded_uncertainty>(const DB& db, const LIST& params, expanded_uncertainty* in)
+{
+ size_t base = GenericFill(db, params, static_cast<standard_uncertainty*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to expanded_uncertainty"); } do { // convert the 'coverage_factor' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->coverage_factor, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to expanded_uncertainty to be a `REAL`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<representation_item_relationship>(const DB& db, const LIST& params, representation_item_relationship* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to representation_item_relationship"); } do { // convert the 'name' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::representation_item_relationship, 4>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->name, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to representation_item_relationship to be a `label`")); }
+ } while (0);
+ do { // convert the 'description' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::representation_item_relationship, 4>::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 representation_item_relationship to be a `text`")); }
+ } while (0);
+ do { // convert the 'relating_representation_item' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::representation_item_relationship, 4>::aux_is_derived[2] = true; break; }
+ try { GenericConvert(in->relating_representation_item, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to representation_item_relationship to be a `representation_item`")); }
+ } while (0);
+ do { // convert the 'related_representation_item' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::representation_item_relationship, 4>::aux_is_derived[3] = true; break; }
+ try { GenericConvert(in->related_representation_item, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to representation_item_relationship to be a `representation_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<explicit_procedural_representation_item_relationship>(const DB& db, const LIST& params, explicit_procedural_representation_item_relationship* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation_item_relationship*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to explicit_procedural_representation_item_relationship"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<explicit_procedural_geometric_representation_item_relationship>(const DB& db, const LIST& params, explicit_procedural_geometric_representation_item_relationship* in)
+{
+ size_t base = GenericFill(db, params, static_cast<explicit_procedural_representation_item_relationship*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to explicit_procedural_geometric_representation_item_relationship"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<explicit_procedural_representation_relationship>(const DB& db, const LIST& params, explicit_procedural_representation_relationship* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation_relationship*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to explicit_procedural_representation_relationship"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<explicit_procedural_shape_representation_relationship>(const DB& db, const LIST& params, explicit_procedural_shape_representation_relationship* in)
+{
+ size_t base = GenericFill(db, params, static_cast<explicit_procedural_representation_relationship*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to explicit_procedural_shape_representation_relationship"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<expression_conversion_based_unit>(const DB& db, const LIST& params, expression_conversion_based_unit* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<extension>(const DB& db, const LIST& params, extension* in)
+{
+ size_t base = GenericFill(db, params, static_cast<derived_shape_aspect*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to extension"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<extent>(const DB& db, const LIST& params, extent* in)
+{
+ size_t base = GenericFill(db, params, static_cast<characterized_object*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to extent"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<external_source>(const DB& db, const LIST& params, external_source* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to external_source"); } do { // convert the 'source_id' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::external_source, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->source_id, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to external_source to be a `source_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<external_class_library>(const DB& db, const LIST& params, external_class_library* in)
+{
+ size_t base = GenericFill(db, params, static_cast<external_source*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to external_class_library"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<externally_defined_class>(const DB& db, const LIST& params, externally_defined_class* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<externally_defined_colour>(const DB& db, const LIST& params, externally_defined_colour* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<externally_defined_context_dependent_unit>(const DB& db, const LIST& params, externally_defined_context_dependent_unit* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<externally_defined_conversion_based_unit>(const DB& db, const LIST& params, externally_defined_conversion_based_unit* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<externally_defined_currency>(const DB& db, const LIST& params, externally_defined_currency* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<externally_defined_item>(const DB& db, const LIST& params, externally_defined_item* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to externally_defined_item"); } do { // convert the 'item_id' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::externally_defined_item, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->item_id, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to externally_defined_item to be a `source_item`")); }
+ } while (0);
+ do { // convert the 'source' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::externally_defined_item, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->source, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to externally_defined_item to be a `external_source`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<externally_defined_curve_font>(const DB& db, const LIST& params, externally_defined_curve_font* in)
+{
+ size_t base = GenericFill(db, params, static_cast<externally_defined_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to externally_defined_curve_font"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<externally_defined_dimension_definition>(const DB& db, const LIST& params, externally_defined_dimension_definition* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<externally_defined_general_property>(const DB& db, const LIST& params, externally_defined_general_property* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<externally_defined_hatch_style>(const DB& db, const LIST& params, externally_defined_hatch_style* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<externally_defined_marker>(const DB& db, const LIST& params, externally_defined_marker* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<picture_representation_item>(const DB& db, const LIST& params, picture_representation_item* in)
+{
+ size_t base = GenericFill(db, params, static_cast<bytes_representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to picture_representation_item"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<externally_defined_picture_representation_item>(const DB& db, const LIST& params, externally_defined_picture_representation_item* in)
+{
+ size_t base = GenericFill(db, params, static_cast<picture_representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to externally_defined_picture_representation_item"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<externally_defined_representation_item>(const DB& db, const LIST& params, externally_defined_representation_item* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<externally_defined_string>(const DB& db, const LIST& params, externally_defined_string* in)
+{
+ size_t base = GenericFill(db, params, static_cast<externally_defined_representation_item*>(in));
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<externally_defined_symbol>(const DB& db, const LIST& params, externally_defined_symbol* in)
+{
+ size_t base = GenericFill(db, params, static_cast<externally_defined_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to externally_defined_symbol"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<externally_defined_terminator_symbol>(const DB& db, const LIST& params, externally_defined_terminator_symbol* in)
+{
+ size_t base = GenericFill(db, params, static_cast<externally_defined_symbol*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to externally_defined_terminator_symbol"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<externally_defined_text_font>(const DB& db, const LIST& params, externally_defined_text_font* in)
+{
+ size_t base = GenericFill(db, params, static_cast<externally_defined_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to externally_defined_text_font"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<externally_defined_tile>(const DB& db, const LIST& params, externally_defined_tile* in)
+{
+ size_t base = GenericFill(db, params, static_cast<externally_defined_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to externally_defined_tile"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<externally_defined_tile_style>(const DB& db, const LIST& params, externally_defined_tile_style* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<swept_area_solid>(const DB& db, const LIST& params, swept_area_solid* in)
+{
+ size_t base = GenericFill(db, params, static_cast<solid_model*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to swept_area_solid"); } do { // convert the 'swept_area' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::swept_area_solid, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->swept_area, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to swept_area_solid to be a `curve_bounded_surface`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<extruded_area_solid>(const DB& db, const LIST& params, extruded_area_solid* in)
+{
+ size_t base = GenericFill(db, params, static_cast<swept_area_solid*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to extruded_area_solid"); } do { // convert the 'extruded_direction' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->extruded_direction, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to extruded_area_solid to be a `direction`")); }
+ } while (0);
+ do { // convert the 'depth' argument
+ std::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 extruded_area_solid to be a `positive_length_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<swept_face_solid>(const DB& db, const LIST& params, swept_face_solid* in)
+{
+ size_t base = GenericFill(db, params, static_cast<solid_model*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to swept_face_solid"); } do { // convert the 'swept_face' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::swept_face_solid, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->swept_face, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to swept_face_solid to be a `face_surface`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<extruded_face_solid>(const DB& db, const LIST& params, extruded_face_solid* in)
+{
+ size_t base = GenericFill(db, params, static_cast<swept_face_solid*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to extruded_face_solid"); } do { // convert the 'extruded_direction' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::extruded_face_solid, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->extruded_direction, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to extruded_face_solid to be a `direction`")); }
+ } while (0);
+ do { // convert the 'depth' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::extruded_face_solid, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->depth, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to extruded_face_solid to be a `positive_length_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<extruded_face_solid_with_trim_conditions>(const DB& db, const LIST& params, extruded_face_solid_with_trim_conditions* in)
+{
+ size_t base = GenericFill(db, params, static_cast<extruded_face_solid*>(in));
+ if (params.GetSize() < 10) { throw STEP::TypeError("expected 10 arguments to extruded_face_solid_with_trim_conditions"); } do { // convert the 'first_trim_condition' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::extruded_face_solid_with_trim_conditions, 6>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->first_trim_condition, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to extruded_face_solid_with_trim_conditions to be a `trim_condition_select`")); }
+ } while (0);
+ do { // convert the 'second_trim_condition' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::extruded_face_solid_with_trim_conditions, 6>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->second_trim_condition, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to extruded_face_solid_with_trim_conditions to be a `trim_condition_select`")); }
+ } while (0);
+ do { // convert the 'first_trim_intent' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::extruded_face_solid_with_trim_conditions, 6>::aux_is_derived[2] = true; break; }
+ try { GenericConvert(in->first_trim_intent, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to extruded_face_solid_with_trim_conditions to be a `trim_intent`")); }
+ } while (0);
+ do { // convert the 'second_trim_intent' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::extruded_face_solid_with_trim_conditions, 6>::aux_is_derived[3] = true; break; }
+ try { GenericConvert(in->second_trim_intent, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to extruded_face_solid_with_trim_conditions to be a `trim_intent`")); }
+ } while (0);
+ do { // convert the 'first_offset' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::extruded_face_solid_with_trim_conditions, 6>::aux_is_derived[4] = true; break; }
+ try { GenericConvert(in->first_offset, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 8 to extruded_face_solid_with_trim_conditions to be a `non_negative_length_measure`")); }
+ } while (0);
+ do { // convert the 'second_offset' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::extruded_face_solid_with_trim_conditions, 6>::aux_is_derived[5] = true; break; }
+ try { GenericConvert(in->second_offset, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 9 to extruded_face_solid_with_trim_conditions to be a `non_negative_length_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<extruded_face_solid_with_draft_angle>(const DB& db, const LIST& params, extruded_face_solid_with_draft_angle* in)
+{
+ size_t base = GenericFill(db, params, static_cast<extruded_face_solid_with_trim_conditions*>(in));
+ if (params.GetSize() < 11) { throw STEP::TypeError("expected 11 arguments to extruded_face_solid_with_draft_angle"); } do { // convert the 'draft_angle' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->draft_angle, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 10 to extruded_face_solid_with_draft_angle to be a `plane_angle_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<extruded_face_solid_with_multiple_draft_angles>(const DB& db, const LIST& params, extruded_face_solid_with_multiple_draft_angles* in)
+{
+ size_t base = GenericFill(db, params, static_cast<extruded_face_solid_with_trim_conditions*>(in));
+ if (params.GetSize() < 11) { throw STEP::TypeError("expected 11 arguments to extruded_face_solid_with_multiple_draft_angles"); } do { // convert the 'draft_angles' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->draft_angles, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 10 to extruded_face_solid_with_multiple_draft_angles to be a `LIST [2:?] OF plane_angle_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<face>(const DB& db, const LIST& params, face* in)
+{
+ size_t base = GenericFill(db, params, static_cast<topological_representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to face"); } do { // convert the 'bounds' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::face, 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 1 to face to be a `SET [1:?] OF face_bound`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<face_based_surface_model>(const DB& db, const LIST& params, face_based_surface_model* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to face_based_surface_model"); } do { // convert the 'fbsm_faces' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->fbsm_faces, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to face_based_surface_model to be a `SET [1:?] OF connected_face_set`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<face_bound>(const DB& db, const LIST& params, face_bound* in)
+{
+ size_t base = GenericFill(db, params, static_cast<topological_representation_item*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to face_bound"); } do { // convert the 'bound' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::face_bound, 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 1 to face_bound to be a `loop`")); }
+ } while (0);
+ do { // convert the 'orientation' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::face_bound, 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 2 to face_bound to be a `BOOLEAN`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<face_outer_bound>(const DB& db, const LIST& params, face_outer_bound* in)
+{
+ size_t base = GenericFill(db, params, static_cast<face_bound*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to face_outer_bound"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<faceted_brep>(const DB& db, const LIST& params, faceted_brep* in)
+{
+ size_t base = GenericFill(db, params, static_cast<manifold_solid_brep*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to faceted_brep"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<faceted_brep_shape_representation>(const DB& db, const LIST& params, faceted_brep_shape_representation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<shape_representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to faceted_brep_shape_representation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<fill_area_style>(const DB& db, const LIST& params, fill_area_style* in)
+{
+ size_t base = GenericFill(db, params, static_cast<founded_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to fill_area_style"); } do { // convert the 'name' argument
+ std::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 0 to fill_area_style to be a `label`")); }
+ } while (0);
+ do { // convert the 'fill_styles' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->fill_styles, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to fill_area_style to be a `SET [1:?] OF fill_style_select`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<fill_area_style_hatching>(const DB& db, const LIST& params, fill_area_style_hatching* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_representation_item*>(in));
+ if (params.GetSize() < 6) { throw STEP::TypeError("expected 6 arguments to fill_area_style_hatching"); } do { // convert the 'hatch_line_appearance' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->hatch_line_appearance, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to fill_area_style_hatching to be a `curve_style`")); }
+ } while (0);
+ do { // convert the 'start_of_next_hatch_line' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->start_of_next_hatch_line, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to fill_area_style_hatching to be a `one_direction_repeat_factor`")); }
+ } while (0);
+ do { // convert the 'point_of_reference_hatch_line' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->point_of_reference_hatch_line, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to fill_area_style_hatching to be a `cartesian_point`")); }
+ } while (0);
+ do { // convert the 'pattern_start' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->pattern_start, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to fill_area_style_hatching to be a `cartesian_point`")); }
+ } while (0);
+ do { // convert the 'hatch_line_angle' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->hatch_line_angle, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to fill_area_style_hatching to be a `plane_angle_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<fill_area_style_tile_coloured_region>(const DB& db, const LIST& params, fill_area_style_tile_coloured_region* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_representation_item*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to fill_area_style_tile_coloured_region"); } do { // convert the 'closed_curve' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->closed_curve, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to fill_area_style_tile_coloured_region to be a `curve_or_annotation_curve_occurrence`")); }
+ } while (0);
+ do { // convert the 'region_colour' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->region_colour, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to fill_area_style_tile_coloured_region to be a `colour`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<fill_area_style_tile_curve_with_style>(const DB& db, const LIST& params, fill_area_style_tile_curve_with_style* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to fill_area_style_tile_curve_with_style"); } do { // convert the 'styled_curve' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->styled_curve, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to fill_area_style_tile_curve_with_style to be a `annotation_curve_occurrence`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<fill_area_style_tile_symbol_with_style>(const DB& db, const LIST& params, fill_area_style_tile_symbol_with_style* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to fill_area_style_tile_symbol_with_style"); } do { // convert the 'symbol' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->symbol, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to fill_area_style_tile_symbol_with_style to be a `annotation_symbol_occurrence`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<fill_area_style_tiles>(const DB& db, const LIST& params, fill_area_style_tiles* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_representation_item*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to fill_area_style_tiles"); } do { // convert the 'tiling_pattern' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->tiling_pattern, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to fill_area_style_tiles to be a `two_direction_repeat_factor`")); }
+ } while (0);
+ do { // convert the 'tiles' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->tiles, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to fill_area_style_tiles to be a `SET [1:?] OF fill_area_style_tile_shape_select`")); }
+ } while (0);
+ do { // convert the 'tiling_scale' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->tiling_scale, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to fill_area_style_tiles to be a `positive_ratio_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<shape_representation_relationship>(const DB& db, const LIST& params, shape_representation_relationship* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation_relationship*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to shape_representation_relationship"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<flat_pattern_ply_representation_relationship>(const DB& db, const LIST& params, flat_pattern_ply_representation_relationship* in)
+{
+ size_t base = GenericFill(db, params, static_cast<shape_representation_relationship*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to flat_pattern_ply_representation_relationship"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<flatness_tolerance>(const DB& db, const LIST& params, flatness_tolerance* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_tolerance*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to flatness_tolerance"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<force_measure_with_unit>(const DB& db, const LIST& params, force_measure_with_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<measure_with_unit*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to force_measure_with_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<force_unit>(const DB& db, const LIST& params, force_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<derived_unit*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to force_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<forward_chaining_rule>(const DB& db, const LIST& params, forward_chaining_rule* in)
+{
+ size_t base = GenericFill(db, params, static_cast<rule_definition*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to forward_chaining_rule"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<forward_chaining_rule_premise>(const DB& db, const LIST& params, forward_chaining_rule_premise* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<frequency_measure_with_unit>(const DB& db, const LIST& params, frequency_measure_with_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<measure_with_unit*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to frequency_measure_with_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<frequency_unit>(const DB& db, const LIST& params, frequency_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<derived_unit*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to frequency_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<func>(const DB& db, const LIST& params, func* in)
+{
+ size_t base = GenericFill(db, params, static_cast<compound_representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to func"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<functional_breakdown_context>(const DB& db, const LIST& params, functional_breakdown_context* in)
+{
+ size_t base = GenericFill(db, params, static_cast<breakdown_context*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to functional_breakdown_context"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<functional_element_usage>(const DB& db, const LIST& params, functional_element_usage* in)
+{
+ size_t base = GenericFill(db, params, static_cast<breakdown_element_usage*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to functional_element_usage"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<general_material_property>(const DB& db, const LIST& params, general_material_property* in)
+{
+ size_t base = GenericFill(db, params, static_cast<general_property*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to general_material_property"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<simple_generic_expression>(const DB& db, const LIST& params, simple_generic_expression* in)
+{
+ size_t base = GenericFill(db, params, static_cast<generic_expression*>(in));
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<generic_literal>(const DB& db, const LIST& params, generic_literal* in)
+{
+ size_t base = GenericFill(db, params, static_cast<simple_generic_expression*>(in));
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<generic_variable>(const DB& db, const LIST& params, generic_variable* in)
+{
+ size_t base = GenericFill(db, params, static_cast<simple_generic_expression*>(in));
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<geometric_alignment>(const DB& db, const LIST& params, geometric_alignment* in)
+{
+ size_t base = GenericFill(db, params, static_cast<derived_shape_aspect*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to geometric_alignment"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<geometric_set>(const DB& db, const LIST& params, geometric_set* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to geometric_set"); } do { // convert the 'elements' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::geometric_set, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->elements, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to geometric_set to be a `SET [1:?] OF geometric_set_select`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<geometric_curve_set>(const DB& db, const LIST& params, geometric_curve_set* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_set*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to geometric_curve_set"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<geometric_intersection>(const DB& db, const LIST& params, geometric_intersection* in)
+{
+ size_t base = GenericFill(db, params, static_cast<derived_shape_aspect*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to geometric_intersection"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<geometric_item_specific_usage>(const DB& db, const LIST& params, geometric_item_specific_usage* in)
+{
+ size_t base = GenericFill(db, params, static_cast<item_identified_representation_usage*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to geometric_item_specific_usage"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<geometric_model_element_relationship>(const DB& db, const LIST& params, geometric_model_element_relationship* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<representation_context>(const DB& db, const LIST& params, representation_context* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to representation_context"); } do { // convert the 'context_identifier' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::representation_context, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->context_identifier, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to representation_context to be a `identifier`")); }
+ } while (0);
+ do { // convert the 'context_type' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::representation_context, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->context_type, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to representation_context to be a `text`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<geometric_representation_context>(const DB& db, const LIST& params, geometric_representation_context* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation_context*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to geometric_representation_context"); } do { // convert the 'coordinate_space_dimension' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->coordinate_space_dimension, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to geometric_representation_context to be a `dimension_count`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<geometric_tolerance_with_defined_unit>(const DB& db, const LIST& params, geometric_tolerance_with_defined_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_tolerance*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to geometric_tolerance_with_defined_unit"); } do { // convert the 'unit_size' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->unit_size, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to geometric_tolerance_with_defined_unit to be a `measure_with_unit`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<geometrical_tolerance_callout>(const DB& db, const LIST& params, geometrical_tolerance_callout* in)
+{
+ size_t base = GenericFill(db, params, static_cast<draughting_callout*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to geometrical_tolerance_callout"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<geometrically_bounded_2d_wireframe_representation>(const DB& db, const LIST& params, geometrically_bounded_2d_wireframe_representation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<shape_representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to geometrically_bounded_2d_wireframe_representation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<geometrically_bounded_surface_shape_representation>(const DB& db, const LIST& params, geometrically_bounded_surface_shape_representation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<shape_representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to geometrically_bounded_surface_shape_representation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<geometrically_bounded_wireframe_shape_representation>(const DB& db, const LIST& params, geometrically_bounded_wireframe_shape_representation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<shape_representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to geometrically_bounded_wireframe_shape_representation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<global_assignment>(const DB& db, const LIST& params, global_assignment* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation_item_relationship*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to global_assignment"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<global_uncertainty_assigned_context>(const DB& db, const LIST& params, global_uncertainty_assigned_context* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation_context*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to global_uncertainty_assigned_context"); } do { // convert the 'uncertainty' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->uncertainty, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to global_uncertainty_assigned_context to be a `SET [1:?] OF uncertainty_measure_with_unit`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<global_unit_assigned_context>(const DB& db, const LIST& params, global_unit_assigned_context* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation_context*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to global_unit_assigned_context"); } do { // convert the 'units' argument
+ std::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 2 to global_unit_assigned_context to be a `SET [1:?] OF unit`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<ground_fact>(const DB& db, const LIST& params, ground_fact* in)
+{
+ size_t base = GenericFill(db, params, static_cast<atomic_formula*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to ground_fact"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<hardness_representation>(const DB& db, const LIST& params, hardness_representation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to hardness_representation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<hidden_element_over_riding_styled_item>(const DB& db, const LIST& params, hidden_element_over_riding_styled_item* in)
+{
+ size_t base = GenericFill(db, params, static_cast<context_dependent_over_riding_styled_item*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to hidden_element_over_riding_styled_item"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<hyperbola>(const DB& db, const LIST& params, hyperbola* in)
+{
+ size_t base = GenericFill(db, params, static_cast<conic*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to hyperbola"); } do { // convert the 'semi_axis' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->semi_axis, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to hyperbola to be a `positive_length_measure`")); }
+ } while (0);
+ do { // convert the 'semi_imag_axis' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->semi_imag_axis, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to hyperbola to be a `positive_length_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<illuminance_measure_with_unit>(const DB& db, const LIST& params, illuminance_measure_with_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<measure_with_unit*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to illuminance_measure_with_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<illuminance_unit>(const DB& db, const LIST& params, illuminance_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<derived_unit*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to illuminance_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<included_text_block>(const DB& db, const LIST& params, included_text_block* in)
+{
+ size_t base = GenericFill(db, params, static_cast<mapped_item*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to included_text_block"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<inclusion_product_concept_feature>(const DB& db, const LIST& params, inclusion_product_concept_feature* in)
+{
+ size_t base = GenericFill(db, params, static_cast<conditional_concept_feature*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to inclusion_product_concept_feature"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<user_selected_elements>(const DB& db, const LIST& params, user_selected_elements* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to user_selected_elements"); } do { // convert the 'picked_items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::user_selected_elements, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->picked_items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to user_selected_elements to be a `SET [1:?] OF representation_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<indirectly_selected_elements>(const DB& db, const LIST& params, indirectly_selected_elements* in)
+{
+ size_t base = GenericFill(db, params, static_cast<user_selected_elements*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to indirectly_selected_elements"); } do { // convert the 'indirectly_picked_items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->indirectly_picked_items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to indirectly_selected_elements to be a `SET [1:?] OF representation_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<indirectly_selected_shape_elements>(const DB& db, const LIST& params, indirectly_selected_shape_elements* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<inductance_measure_with_unit>(const DB& db, const LIST& params, inductance_measure_with_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<measure_with_unit*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to inductance_measure_with_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<inductance_unit>(const DB& db, const LIST& params, inductance_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<derived_unit*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to inductance_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<information_right>(const DB& db, const LIST& params, information_right* in)
+{
+ size_t base = GenericFill(db, params, static_cast<action_method*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to information_right"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<information_usage_right>(const DB& db, const LIST& params, information_usage_right* in)
+{
+ size_t base = GenericFill(db, params, static_cast<action_method*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to information_usage_right"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<instance_usage_context_assignment>(const DB& db, const LIST& params, instance_usage_context_assignment* in)
+{
+ size_t base = GenericFill(db, params, static_cast<product_definition_context*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to instance_usage_context_assignment"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to instance_usage_context_assignment to be a `SET [1:?] OF instance_usage_context_select`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<instanced_feature>(const DB& db, const LIST& params, instanced_feature* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<literal_number>(const DB& db, const LIST& params, literal_number* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to literal_number"); } do { // convert the 'the_value' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::literal_number, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->the_value, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to literal_number to be a `NUMBER`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<int_literal>(const DB& db, const LIST& params, int_literal* in)
+{
+ size_t base = GenericFill(db, params, static_cast<literal_number*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to int_literal"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<integer_representation_item>(const DB& db, const LIST& params, integer_representation_item* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<surface_curve>(const DB& db, const LIST& params, surface_curve* in)
+{
+ size_t base = GenericFill(db, params, static_cast<curve*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to surface_curve"); } do { // convert the 'curve_3d' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::surface_curve, 3>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->curve_3d, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to surface_curve to be a `curve`")); }
+ } while (0);
+ do { // convert the 'associated_geometry' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::surface_curve, 3>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->associated_geometry, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to surface_curve to be a `LIST [1:2] OF pcurve_or_surface`")); }
+ } while (0);
+ do { // convert the 'master_representation' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::surface_curve, 3>::aux_is_derived[2] = true; break; }
+ try { GenericConvert(in->master_representation, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to surface_curve to be a `preferred_surface_curve_representation`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<intersection_curve>(const DB& db, const LIST& params, intersection_curve* in)
+{
+ size_t base = GenericFill(db, params, static_cast<surface_curve*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to intersection_curve"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<interval_expression>(const DB& db, const LIST& params, interval_expression* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<iso4217_currency>(const DB& db, const LIST& params, iso4217_currency* in)
+{
+ size_t base = GenericFill(db, params, static_cast<currency*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to iso4217_currency"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<known_source>(const DB& db, const LIST& params, known_source* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<laid_defined_transformation>(const DB& db, const LIST& params, laid_defined_transformation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<transformation_with_derived_angle*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to laid_defined_transformation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<language>(const DB& db, const LIST& params, language* in)
+{
+ size_t base = GenericFill(db, params, static_cast<group*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to language"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<leader_curve>(const DB& db, const LIST& params, leader_curve* in)
+{
+ size_t base = GenericFill(db, params, static_cast<annotation_curve_occurrence*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to leader_curve"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<leader_directed_callout>(const DB& db, const LIST& params, leader_directed_callout* in)
+{
+ size_t base = GenericFill(db, params, static_cast<draughting_callout*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to leader_directed_callout"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<leader_directed_dimension>(const DB& db, const LIST& params, leader_directed_dimension* in)
+{
+ size_t base = GenericFill(db, params, static_cast<leader_directed_callout*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to leader_directed_dimension"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<leader_terminator>(const DB& db, const LIST& params, leader_terminator* in)
+{
+ size_t base = GenericFill(db, params, static_cast<terminator_symbol*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to leader_terminator"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<length_measure_with_unit>(const DB& db, const LIST& params, length_measure_with_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<measure_with_unit*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to length_measure_with_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<length_unit>(const DB& db, const LIST& params, length_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<named_unit*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to length_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<light_source>(const DB& db, const LIST& params, light_source* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to light_source"); } do { // convert the 'light_colour' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::light_source, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->light_colour, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to light_source to be a `colour`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<light_source_ambient>(const DB& db, const LIST& params, light_source_ambient* in)
+{
+ size_t base = GenericFill(db, params, static_cast<light_source*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to light_source_ambient"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<light_source_directional>(const DB& db, const LIST& params, light_source_directional* in)
+{
+ size_t base = GenericFill(db, params, static_cast<light_source*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to light_source_directional"); } do { // convert the 'orientation' argument
+ std::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 2 to light_source_directional to be a `direction`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<light_source_positional>(const DB& db, const LIST& params, light_source_positional* in)
+{
+ size_t base = GenericFill(db, params, static_cast<light_source*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to light_source_positional"); } do { // convert the 'position' argument
+ std::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 light_source_positional to be a `cartesian_point`")); }
+ } while (0);
+ do { // convert the 'constant_attenuation' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->constant_attenuation, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to light_source_positional to be a `REAL`")); }
+ } while (0);
+ do { // convert the 'distance_attenuation' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->distance_attenuation, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to light_source_positional to be a `REAL`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<light_source_spot>(const DB& db, const LIST& params, light_source_spot* in)
+{
+ size_t base = GenericFill(db, params, static_cast<light_source*>(in));
+ if (params.GetSize() < 8) { throw STEP::TypeError("expected 8 arguments to light_source_spot"); } do { // convert the 'position' argument
+ std::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 light_source_spot to be a `cartesian_point`")); }
+ } while (0);
+ do { // convert the 'orientation' argument
+ std::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 3 to light_source_spot to be a `direction`")); }
+ } while (0);
+ do { // convert the 'concentration_exponent' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->concentration_exponent, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to light_source_spot to be a `REAL`")); }
+ } while (0);
+ do { // convert the 'constant_attenuation' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->constant_attenuation, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to light_source_spot to be a `REAL`")); }
+ } while (0);
+ do { // convert the 'distance_attenuation' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->distance_attenuation, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to light_source_spot to be a `REAL`")); }
+ } while (0);
+ do { // convert the 'spread_angle' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->spread_angle, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to light_source_spot to be a `positive_plane_angle_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<line>(const DB& db, const LIST& params, line* in)
+{
+ size_t base = GenericFill(db, params, static_cast<curve*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to line"); } do { // convert the 'pnt' argument
+ std::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 1 to line to be a `cartesian_point`")); }
+ } while (0);
+ do { // convert the 'dir' argument
+ std::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 2 to line to be a `vector`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<line_profile_tolerance>(const DB& db, const LIST& params, line_profile_tolerance* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_tolerance*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to line_profile_tolerance"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<linear_dimension>(const DB& db, const LIST& params, linear_dimension* in)
+{
+ size_t base = GenericFill(db, params, static_cast<dimension_curve_directed_callout*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to linear_dimension"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<simple_clause>(const DB& db, const LIST& params, simple_clause* in)
+{
+ size_t base = GenericFill(db, params, static_cast<compound_representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to simple_clause"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<literal_conjunction>(const DB& db, const LIST& params, literal_conjunction* in)
+{
+ size_t base = GenericFill(db, params, static_cast<simple_clause*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to literal_conjunction"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<literal_disjunction>(const DB& db, const LIST& params, literal_disjunction* in)
+{
+ size_t base = GenericFill(db, params, static_cast<simple_clause*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to literal_disjunction"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<logical_literal>(const DB& db, const LIST& params, logical_literal* in)
+{
+ size_t base = GenericFill(db, params, static_cast<generic_literal*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to logical_literal"); } do { // convert the 'lit_value' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->lit_value, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to logical_literal to be a `LOGICAL`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<logical_representation_item>(const DB& db, const LIST& params, logical_representation_item* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<loop>(const DB& db, const LIST& params, loop* in)
+{
+ size_t base = GenericFill(db, params, static_cast<topological_representation_item*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to loop"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<loss_tangent_measure_with_unit>(const DB& db, const LIST& params, loss_tangent_measure_with_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<ratio_measure_with_unit*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to loss_tangent_measure_with_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<lot_effectivity>(const DB& db, const LIST& params, lot_effectivity* in)
+{
+ size_t base = GenericFill(db, params, static_cast<effectivity*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to lot_effectivity"); } do { // convert the 'effectivity_lot_id' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->effectivity_lot_id, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to lot_effectivity to be a `identifier`")); }
+ } while (0);
+ do { // convert the 'effectivity_lot_size' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->effectivity_lot_size, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to lot_effectivity to be a `measure_with_unit`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<luminous_flux_measure_with_unit>(const DB& db, const LIST& params, luminous_flux_measure_with_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<measure_with_unit*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to luminous_flux_measure_with_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<luminous_flux_unit>(const DB& db, const LIST& params, luminous_flux_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<named_unit*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to luminous_flux_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<luminous_intensity_measure_with_unit>(const DB& db, const LIST& params, luminous_intensity_measure_with_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<measure_with_unit*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to luminous_intensity_measure_with_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<luminous_intensity_unit>(const DB& db, const LIST& params, luminous_intensity_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<named_unit*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to luminous_intensity_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<magnetic_flux_density_measure_with_unit>(const DB& db, const LIST& params, magnetic_flux_density_measure_with_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<measure_with_unit*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to magnetic_flux_density_measure_with_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<magnetic_flux_density_unit>(const DB& db, const LIST& params, magnetic_flux_density_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<derived_unit*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to magnetic_flux_density_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<magnetic_flux_measure_with_unit>(const DB& db, const LIST& params, magnetic_flux_measure_with_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<measure_with_unit*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to magnetic_flux_measure_with_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<magnetic_flux_unit>(const DB& db, const LIST& params, magnetic_flux_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<derived_unit*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to magnetic_flux_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<make_from_usage_option>(const DB& db, const LIST& params, make_from_usage_option* in)
+{
+ size_t base = GenericFill(db, params, static_cast<product_definition_usage*>(in));
+ if (params.GetSize() < 8) { throw STEP::TypeError("expected 8 arguments to make_from_usage_option"); } do { // convert the 'ranking' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->ranking, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to make_from_usage_option to be a `INTEGER`")); }
+ } while (0);
+ do { // convert the 'ranking_rationale' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->ranking_rationale, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to make_from_usage_option to be a `text`")); }
+ } while (0);
+ do { // convert the 'quantity' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->quantity, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to make_from_usage_option to be a `measure_with_unit`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<manifold_subsurface_shape_representation>(const DB& db, const LIST& params, manifold_subsurface_shape_representation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<shape_representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to manifold_subsurface_shape_representation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<manifold_surface_shape_representation>(const DB& db, const LIST& params, manifold_surface_shape_representation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<shape_representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to manifold_surface_shape_representation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<mass_measure_with_unit>(const DB& db, const LIST& params, mass_measure_with_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<measure_with_unit*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to mass_measure_with_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<mass_unit>(const DB& db, const LIST& params, mass_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<named_unit*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to mass_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<material_property>(const DB& db, const LIST& params, material_property* in)
+{
+ size_t base = GenericFill(db, params, static_cast<property_definition*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to material_property"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<property_definition_representation>(const DB& db, const LIST& params, property_definition_representation* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to property_definition_representation"); } do { // convert the 'definition' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::property_definition_representation, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->definition, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to property_definition_representation to be a `represented_definition`")); }
+ } while (0);
+ do { // convert the 'used_representation' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::property_definition_representation, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->used_representation, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to property_definition_representation to be a `representation`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<material_property_representation>(const DB& db, const LIST& params, material_property_representation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<property_definition_representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to material_property_representation"); } do { // convert the 'dependent_environment' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->dependent_environment, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to material_property_representation to be a `data_environment`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<measure_representation_item>(const DB& db, const LIST& params, measure_representation_item* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<product_context>(const DB& db, const LIST& params, product_context* in)
+{
+ size_t base = GenericFill(db, params, static_cast<application_context_element*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to product_context"); } do { // convert the 'discipline_type' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::product_context, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->discipline_type, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to product_context to be a `label`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<mechanical_context>(const DB& db, const LIST& params, mechanical_context* in)
+{
+ size_t base = GenericFill(db, params, static_cast<product_context*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to mechanical_context"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<mechanical_design_and_draughting_relationship>(const DB& db, const LIST& params, mechanical_design_and_draughting_relationship* in)
+{
+ size_t base = GenericFill(db, params, static_cast<definitional_representation_relationship_with_same_context*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to mechanical_design_and_draughting_relationship"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<mechanical_design_geometric_presentation_area>(const DB& db, const LIST& params, mechanical_design_geometric_presentation_area* in)
+{
+ size_t base = GenericFill(db, params, static_cast<presentation_area*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to mechanical_design_geometric_presentation_area"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<mechanical_design_geometric_presentation_representation>(const DB& db, const LIST& params, mechanical_design_geometric_presentation_representation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to mechanical_design_geometric_presentation_representation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<mechanical_design_presentation_representation_with_draughting>(const DB& db, const LIST& params, mechanical_design_presentation_representation_with_draughting* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to mechanical_design_presentation_representation_with_draughting"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<mechanical_design_shaded_presentation_area>(const DB& db, const LIST& params, mechanical_design_shaded_presentation_area* in)
+{
+ size_t base = GenericFill(db, params, static_cast<presentation_area*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to mechanical_design_shaded_presentation_area"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<mechanical_design_shaded_presentation_representation>(const DB& db, const LIST& params, mechanical_design_shaded_presentation_representation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to mechanical_design_shaded_presentation_representation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<min_and_major_ply_orientation_basis>(const DB& db, const LIST& params, min_and_major_ply_orientation_basis* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<modified_geometric_tolerance>(const DB& db, const LIST& params, modified_geometric_tolerance* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_tolerance*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to modified_geometric_tolerance"); } do { // convert the 'modifier' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->modifier, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to modified_geometric_tolerance to be a `limit_condition`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<modified_solid_with_placed_configuration>(const DB& db, const LIST& params, modified_solid_with_placed_configuration* in)
+{
+ size_t base = GenericFill(db, params, static_cast<modified_solid*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to modified_solid_with_placed_configuration"); } do { // convert the 'placing' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::modified_solid_with_placed_configuration, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->placing, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to modified_solid_with_placed_configuration to be a `axis2_placement_3d`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<moments_of_inertia_representation>(const DB& db, const LIST& params, moments_of_inertia_representation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to moments_of_inertia_representation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<multi_language_attribute_assignment>(const DB& db, const LIST& params, multi_language_attribute_assignment* in)
+{
+ size_t base = GenericFill(db, params, static_cast<attribute_value_assignment*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to multi_language_attribute_assignment"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to multi_language_attribute_assignment to be a `SET [1:?] OF multi_language_attribute_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<multiple_arity_boolean_expression>(const DB& db, const LIST& params, multiple_arity_boolean_expression* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<multiple_arity_generic_expression>(const DB& db, const LIST& params, multiple_arity_generic_expression* in)
+{
+ size_t base = GenericFill(db, params, static_cast<generic_expression*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to multiple_arity_generic_expression"); } do { // convert the 'operands' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->operands, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to multiple_arity_generic_expression to be a `LIST [2:?] OF generic_expression`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<multiple_arity_numeric_expression>(const DB& db, const LIST& params, multiple_arity_numeric_expression* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<next_assembly_usage_occurrence>(const DB& db, const LIST& params, next_assembly_usage_occurrence* in)
+{
+ size_t base = GenericFill(db, params, static_cast<assembly_component_usage*>(in));
+ if (params.GetSize() < 6) { throw STEP::TypeError("expected 6 arguments to next_assembly_usage_occurrence"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<non_manifold_surface_shape_representation>(const DB& db, const LIST& params, non_manifold_surface_shape_representation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<shape_representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to non_manifold_surface_shape_representation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<null_representation_item>(const DB& db, const LIST& params, null_representation_item* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation_item*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to null_representation_item"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<numeric_expression>(const DB& db, const LIST& params, numeric_expression* in)
+{
+ size_t base = GenericFill(db, params, static_cast<expression*>(in));
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<offset_curve_2d>(const DB& db, const LIST& params, offset_curve_2d* in)
+{
+ size_t base = GenericFill(db, params, static_cast<curve*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to offset_curve_2d"); } do { // convert the 'basis_curve' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->basis_curve, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to offset_curve_2d to be a `curve`")); }
+ } while (0);
+ do { // convert the 'distance' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->distance, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to offset_curve_2d to be a `length_measure`")); }
+ } while (0);
+ do { // convert the 'self_intersect' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->self_intersect, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to offset_curve_2d to be a `LOGICAL`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<offset_curve_3d>(const DB& db, const LIST& params, offset_curve_3d* in)
+{
+ size_t base = GenericFill(db, params, static_cast<curve*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to offset_curve_3d"); } do { // convert the 'basis_curve' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->basis_curve, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to offset_curve_3d to be a `curve`")); }
+ } while (0);
+ do { // convert the 'distance' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->distance, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to offset_curve_3d to be a `length_measure`")); }
+ } while (0);
+ do { // convert the 'self_intersect' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->self_intersect, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to offset_curve_3d to be a `LOGICAL`")); }
+ } while (0);
+ do { // convert the 'ref_direction' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->ref_direction, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to offset_curve_3d to be a `direction`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<offset_surface>(const DB& db, const LIST& params, offset_surface* in)
+{
+ size_t base = GenericFill(db, params, static_cast<surface*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to offset_surface"); } do { // convert the 'basis_surface' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->basis_surface, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to offset_surface to be a `surface`")); }
+ } while (0);
+ do { // convert the 'distance' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->distance, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to offset_surface to be a `length_measure`")); }
+ } while (0);
+ do { // convert the 'self_intersect' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->self_intersect, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to offset_surface to be a `LOGICAL`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<one_direction_repeat_factor>(const DB& db, const LIST& params, one_direction_repeat_factor* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to one_direction_repeat_factor"); } do { // convert the 'repeat_factor' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::one_direction_repeat_factor, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->repeat_factor, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to one_direction_repeat_factor to be a `vector`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<open_shell>(const DB& db, const LIST& params, open_shell* in)
+{
+ size_t base = GenericFill(db, params, static_cast<connected_face_set*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to open_shell"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<ordinal_date>(const DB& db, const LIST& params, ordinal_date* in)
+{
+ size_t base = GenericFill(db, params, static_cast<date*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to ordinal_date"); } do { // convert the 'day_component' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->day_component, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to ordinal_date to be a `day_in_year_number`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<projection_directed_callout>(const DB& db, const LIST& params, projection_directed_callout* in)
+{
+ size_t base = GenericFill(db, params, static_cast<draughting_callout*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to projection_directed_callout"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<ordinate_dimension>(const DB& db, const LIST& params, ordinate_dimension* in)
+{
+ size_t base = GenericFill(db, params, static_cast<projection_directed_callout*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to ordinate_dimension"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<organizational_address>(const DB& db, const LIST& params, organizational_address* in)
+{
+ size_t base = GenericFill(db, params, static_cast<address*>(in));
+ if (params.GetSize() < 14) { throw STEP::TypeError("expected 14 arguments to organizational_address"); } do { // convert the 'organizations' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->organizations, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 12 to organizational_address to be a `SET [1:?] OF organization`")); }
+ } while (0);
+ do { // convert the 'description' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ 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 13 to organizational_address to be a `text`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<oriented_closed_shell>(const DB& db, const LIST& params, oriented_closed_shell* in)
+{
+ size_t base = GenericFill(db, params, static_cast<closed_shell*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to oriented_closed_shell"); } do { // convert the 'closed_shell_element' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->closed_shell_element, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to oriented_closed_shell to be a `closed_shell`")); }
+ } while (0);
+ do { // convert the 'orientation' argument
+ std::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 3 to oriented_closed_shell to be a `BOOLEAN`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<oriented_edge>(const DB& db, const LIST& params, oriented_edge* in)
+{
+ size_t base = GenericFill(db, params, static_cast<edge*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to oriented_edge"); } do { // convert the 'edge_element' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->edge_element, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to oriented_edge to be a `edge`")); }
+ } while (0);
+ do { // convert the 'orientation' argument
+ std::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 4 to oriented_edge to be a `BOOLEAN`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<oriented_face>(const DB& db, const LIST& params, oriented_face* in)
+{
+ size_t base = GenericFill(db, params, static_cast<face*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to oriented_face"); } do { // convert the 'face_element' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->face_element, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to oriented_face to be a `face`")); }
+ } while (0);
+ do { // convert the 'orientation' argument
+ std::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 3 to oriented_face to be a `BOOLEAN`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<oriented_open_shell>(const DB& db, const LIST& params, oriented_open_shell* in)
+{
+ size_t base = GenericFill(db, params, static_cast<open_shell*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to oriented_open_shell"); } do { // convert the 'open_shell_element' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->open_shell_element, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to oriented_open_shell to be a `open_shell`")); }
+ } while (0);
+ do { // convert the 'orientation' argument
+ std::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 3 to oriented_open_shell to be a `BOOLEAN`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<path>(const DB& db, const LIST& params, path* in)
+{
+ size_t base = GenericFill(db, params, static_cast<topological_representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to path"); } do { // convert the 'edge_list' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::path, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->edge_list, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to path to be a `LIST [1:?] OF oriented_edge`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<oriented_path>(const DB& db, const LIST& params, oriented_path* in)
+{
+ size_t base = GenericFill(db, params, static_cast<path*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to oriented_path"); } do { // convert the 'path_element' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->path_element, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to oriented_path to be a `path`")); }
+ } while (0);
+ do { // convert the 'orientation' argument
+ std::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 3 to oriented_path to be a `BOOLEAN`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<oriented_surface>(const DB& db, const LIST& params, oriented_surface* in)
+{
+ size_t base = GenericFill(db, params, static_cast<surface*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to oriented_surface"); } do { // convert the 'orientation' argument
+ std::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 1 to oriented_surface to be a `BOOLEAN`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<outer_boundary_curve>(const DB& db, const LIST& params, outer_boundary_curve* in)
+{
+ size_t base = GenericFill(db, params, static_cast<boundary_curve*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to outer_boundary_curve"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<package_product_concept_feature>(const DB& db, const LIST& params, package_product_concept_feature* in)
+{
+ size_t base = GenericFill(db, params, static_cast<product_concept_feature*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to package_product_concept_feature"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<parabola>(const DB& db, const LIST& params, parabola* in)
+{
+ size_t base = GenericFill(db, params, static_cast<conic*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to parabola"); } do { // convert the 'focal_dist' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->focal_dist, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to parabola to be a `length_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<parallel_offset>(const DB& db, const LIST& params, parallel_offset* in)
+{
+ size_t base = GenericFill(db, params, static_cast<derived_shape_aspect*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to parallel_offset"); } do { // convert the 'offset' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->offset, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to parallel_offset to be a `measure_with_unit`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<parallelism_tolerance>(const DB& db, const LIST& params, parallelism_tolerance* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_tolerance_with_datum_reference*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to parallelism_tolerance"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<parametric_representation_context>(const DB& db, const LIST& params, parametric_representation_context* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation_context*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to parametric_representation_context"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<partial_document_with_structured_text_representation_assignment>(const DB& db, const LIST& params, partial_document_with_structured_text_representation_assignment* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<pcurve>(const DB& db, const LIST& params, pcurve* in)
+{
+ size_t base = GenericFill(db, params, static_cast<curve*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to pcurve"); } do { // convert the 'basis_surface' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->basis_surface, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to pcurve to be a `surface`")); }
+ } while (0);
+ do { // convert the 'reference_to_curve' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->reference_to_curve, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to pcurve to be a `definitional_representation`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<percentage_laminate_definition>(const DB& db, const LIST& params, percentage_laminate_definition* in)
+{
+ size_t base = GenericFill(db, params, static_cast<product_definition*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to percentage_laminate_definition"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<zone_structural_makeup>(const DB& db, const LIST& params, zone_structural_makeup* in)
+{
+ size_t base = GenericFill(db, params, static_cast<laminate_table*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to zone_structural_makeup"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<percentage_laminate_table>(const DB& db, const LIST& params, percentage_laminate_table* in)
+{
+ size_t base = GenericFill(db, params, static_cast<zone_structural_makeup*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to percentage_laminate_table"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<percentage_ply_definition>(const DB& db, const LIST& params, percentage_ply_definition* in)
+{
+ size_t base = GenericFill(db, params, static_cast<product_definition*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to percentage_ply_definition"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<perpendicular_to>(const DB& db, const LIST& params, perpendicular_to* in)
+{
+ size_t base = GenericFill(db, params, static_cast<derived_shape_aspect*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to perpendicular_to"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<perpendicularity_tolerance>(const DB& db, const LIST& params, perpendicularity_tolerance* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_tolerance_with_datum_reference*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to perpendicularity_tolerance"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<person_and_organization_address>(const DB& db, const LIST& params, person_and_organization_address* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<personal_address>(const DB& db, const LIST& params, personal_address* in)
+{
+ size_t base = GenericFill(db, params, static_cast<address*>(in));
+ if (params.GetSize() < 14) { throw STEP::TypeError("expected 14 arguments to personal_address"); } do { // convert the 'people' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->people, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 12 to personal_address to be a `SET [1:?] OF person`")); }
+ } while (0);
+ do { // convert the 'description' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ 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 13 to personal_address to be a `text`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<physical_breakdown_context>(const DB& db, const LIST& params, physical_breakdown_context* in)
+{
+ size_t base = GenericFill(db, params, static_cast<breakdown_context*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to physical_breakdown_context"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<physical_element_usage>(const DB& db, const LIST& params, physical_element_usage* in)
+{
+ size_t base = GenericFill(db, params, static_cast<breakdown_element_usage*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to physical_element_usage"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<presentation_view>(const DB& db, const LIST& params, presentation_view* in)
+{
+ size_t base = GenericFill(db, params, static_cast<presentation_representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to presentation_view"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<picture_representation>(const DB& db, const LIST& params, picture_representation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<presentation_view*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to picture_representation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<placed_datum_target_feature>(const DB& db, const LIST& params, placed_datum_target_feature* in)
+{
+ size_t base = GenericFill(db, params, static_cast<datum_target*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to placed_datum_target_feature"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<placed_feature>(const DB& db, const LIST& params, placed_feature* in)
+{
+ size_t base = GenericFill(db, params, static_cast<shape_aspect*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to placed_feature"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<planar_extent>(const DB& db, const LIST& params, planar_extent* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_representation_item*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to planar_extent"); } do { // convert the 'size_in_x' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::planar_extent, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->size_in_x, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to planar_extent to be a `length_measure`")); }
+ } while (0);
+ do { // convert the 'size_in_y' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::planar_extent, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->size_in_y, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to planar_extent to be a `length_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<planar_box>(const DB& db, const LIST& params, planar_box* in)
+{
+ size_t base = GenericFill(db, params, static_cast<planar_extent*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to planar_box"); } do { // convert the 'placement' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->placement, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to planar_box to be a `axis2_placement`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<plane>(const DB& db, const LIST& params, plane* in)
+{
+ size_t base = GenericFill(db, params, static_cast<elementary_surface*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to plane"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<plane_angle_measure_with_unit>(const DB& db, const LIST& params, plane_angle_measure_with_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<measure_with_unit*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to plane_angle_measure_with_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<plane_angle_unit>(const DB& db, const LIST& params, plane_angle_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<named_unit*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to plane_angle_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<ply_laminate_definition>(const DB& db, const LIST& params, ply_laminate_definition* in)
+{
+ size_t base = GenericFill(db, params, static_cast<product_definition*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to ply_laminate_definition"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<ply_laminate_sequence_definition>(const DB& db, const LIST& params, ply_laminate_sequence_definition* in)
+{
+ size_t base = GenericFill(db, params, static_cast<product_definition*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to ply_laminate_sequence_definition"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<ply_laminate_table>(const DB& db, const LIST& params, ply_laminate_table* in)
+{
+ size_t base = GenericFill(db, params, static_cast<part_laminate_table*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to ply_laminate_table"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<point_and_vector>(const DB& db, const LIST& params, point_and_vector* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<point_on_curve>(const DB& db, const LIST& params, point_on_curve* in)
+{
+ size_t base = GenericFill(db, params, static_cast<point*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to point_on_curve"); } do { // convert the 'basis_curve' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->basis_curve, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to point_on_curve to be a `curve`")); }
+ } while (0);
+ do { // convert the 'point_parameter' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->point_parameter, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to point_on_curve to be a `parameter_value`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<point_on_surface>(const DB& db, const LIST& params, point_on_surface* in)
+{
+ size_t base = GenericFill(db, params, static_cast<point*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to point_on_surface"); } do { // convert the 'basis_surface' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->basis_surface, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to point_on_surface to be a `surface`")); }
+ } while (0);
+ do { // convert the 'point_parameter_u' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->point_parameter_u, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to point_on_surface to be a `parameter_value`")); }
+ } while (0);
+ do { // convert the 'point_parameter_v' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->point_parameter_v, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to point_on_surface to be a `parameter_value`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<point_path>(const DB& db, const LIST& params, point_path* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<point_replica>(const DB& db, const LIST& params, point_replica* in)
+{
+ size_t base = GenericFill(db, params, static_cast<point*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to point_replica"); } do { // convert the 'parent_pt' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->parent_pt, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to point_replica to be a `point`")); }
+ } while (0);
+ do { // convert the 'transformation' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->transformation, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to point_replica to be a `cartesian_transformation_operator`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<point_style>(const DB& db, const LIST& params, point_style* in)
+{
+ size_t base = GenericFill(db, params, static_cast<founded_item*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to point_style"); } do { // convert the 'name' argument
+ std::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 0 to point_style to be a `label`")); }
+ } while (0);
+ do { // convert the 'marker' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->marker, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to point_style to be a `marker_select`")); }
+ } while (0);
+ do { // convert the 'marker_size' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->marker_size, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to point_style to be a `size_select`")); }
+ } while (0);
+ do { // convert the 'marker_colour' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->marker_colour, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to point_style to be a `colour`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<polar_complex_number_literal>(const DB& db, const LIST& params, polar_complex_number_literal* in)
+{
+ size_t base = GenericFill(db, params, static_cast<generic_literal*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to polar_complex_number_literal"); } do { // convert the 'radius' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::polar_complex_number_literal, 2>::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 0 to polar_complex_number_literal to be a `REAL`")); }
+ } while (0);
+ do { // convert the 'angle' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::polar_complex_number_literal, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->angle, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to polar_complex_number_literal to be a `REAL`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<poly_loop>(const DB& db, const LIST& params, poly_loop* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to poly_loop"); } do { // convert the 'polygon' argument
+ std::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 poly_loop to be a `LIST [3:?] OF cartesian_point`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<polyline>(const DB& db, const LIST& params, polyline* in)
+{
+ size_t base = GenericFill(db, params, static_cast<bounded_curve*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to polyline"); } do { // convert the 'points' argument
+ std::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 1 to polyline to be a `LIST [2:?] OF cartesian_point`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<position_tolerance>(const DB& db, const LIST& params, position_tolerance* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_tolerance*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to position_tolerance"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<positioned_sketch>(const DB& db, const LIST& params, positioned_sketch* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_representation_item*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to positioned_sketch"); } do { // convert the 'sketch_basis' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->sketch_basis, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to positioned_sketch to be a `sketch_basis_select`")); }
+ } while (0);
+ do { // convert the 'auxiliary_elements' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->auxiliary_elements, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to positioned_sketch to be a `SET [0:?] OF auxiliary_geometric_representation_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<power_measure_with_unit>(const DB& db, const LIST& params, power_measure_with_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<measure_with_unit*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to power_measure_with_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<power_unit>(const DB& db, const LIST& params, power_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<derived_unit*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to power_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<pre_defined_symbol>(const DB& db, const LIST& params, pre_defined_symbol* in)
+{
+ size_t base = GenericFill(db, params, static_cast<pre_defined_item*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to pre_defined_symbol"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<pre_defined_dimension_symbol>(const DB& db, const LIST& params, pre_defined_dimension_symbol* in)
+{
+ size_t base = GenericFill(db, params, static_cast<pre_defined_symbol*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to pre_defined_dimension_symbol"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<pre_defined_geometrical_tolerance_symbol>(const DB& db, const LIST& params, pre_defined_geometrical_tolerance_symbol* in)
+{
+ size_t base = GenericFill(db, params, static_cast<pre_defined_symbol*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to pre_defined_geometrical_tolerance_symbol"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<pre_defined_marker>(const DB& db, const LIST& params, pre_defined_marker* in)
+{
+ size_t base = GenericFill(db, params, static_cast<pre_defined_item*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to pre_defined_marker"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<pre_defined_point_marker_symbol>(const DB& db, const LIST& params, pre_defined_point_marker_symbol* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<pre_defined_surface_condition_symbol>(const DB& db, const LIST& params, pre_defined_surface_condition_symbol* in)
+{
+ size_t base = GenericFill(db, params, static_cast<pre_defined_symbol*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to pre_defined_surface_condition_symbol"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<pre_defined_surface_side_style>(const DB& db, const LIST& params, pre_defined_surface_side_style* in)
+{
+ size_t base = GenericFill(db, params, static_cast<pre_defined_item*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to pre_defined_surface_side_style"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<pre_defined_terminator_symbol>(const DB& db, const LIST& params, pre_defined_terminator_symbol* in)
+{
+ size_t base = GenericFill(db, params, static_cast<pre_defined_symbol*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to pre_defined_terminator_symbol"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<pre_defined_tile>(const DB& db, const LIST& params, pre_defined_tile* in)
+{
+ size_t base = GenericFill(db, params, static_cast<pre_defined_item*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to pre_defined_tile"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<predefined_picture_representation_item>(const DB& db, const LIST& params, predefined_picture_representation_item* in)
+{
+ size_t base = GenericFill(db, params, static_cast<picture_representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to predefined_picture_representation_item"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<presentation_style_assignment>(const DB& db, const LIST& params, presentation_style_assignment* in)
+{
+ size_t base = GenericFill(db, params, static_cast<founded_item*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to presentation_style_assignment"); } do { // convert the 'styles' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::presentation_style_assignment, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->styles, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to presentation_style_assignment to be a `SET [1:?] OF presentation_style_select`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<presentation_style_by_context>(const DB& db, const LIST& params, presentation_style_by_context* in)
+{
+ size_t base = GenericFill(db, params, static_cast<presentation_style_assignment*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to presentation_style_by_context"); } do { // convert the 'style_context' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->style_context, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to presentation_style_by_context to be a `style_context_select`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<pressure_measure_with_unit>(const DB& db, const LIST& params, pressure_measure_with_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<measure_with_unit*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to pressure_measure_with_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<pressure_unit>(const DB& db, const LIST& params, pressure_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<derived_unit*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to pressure_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<procedural_representation>(const DB& db, const LIST& params, procedural_representation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to procedural_representation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<procedural_representation_sequence>(const DB& db, const LIST& params, procedural_representation_sequence* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation_item*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to procedural_representation_sequence"); } do { // convert the 'elements' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->elements, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to procedural_representation_sequence to be a `LIST [1:?] OF representation_item`")); }
+ } while (0);
+ do { // convert the 'suppressed_items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->suppressed_items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to procedural_representation_sequence to be a `SET [0:?] OF representation_item`")); }
+ } while (0);
+ do { // convert the 'rationale' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->rationale, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to procedural_representation_sequence to be a `text`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<procedural_shape_representation>(const DB& db, const LIST& params, procedural_shape_representation* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<procedural_shape_representation_sequence>(const DB& db, const LIST& params, procedural_shape_representation_sequence* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<product_category>(const DB& db, const LIST& params, product_category* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to product_category"); } do { // convert the 'name' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::product_category, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->name, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to product_category to be a `label`")); }
+ } while (0);
+ do { // convert the 'description' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::product_category, 2>::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 product_category to be a `text`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<product_class>(const DB& db, const LIST& params, product_class* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<product_concept_context>(const DB& db, const LIST& params, product_concept_context* in)
+{
+ size_t base = GenericFill(db, params, static_cast<application_context_element*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to product_concept_context"); } do { // convert the 'market_segment_type' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->market_segment_type, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to product_concept_context to be a `label`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<product_concept_feature_category_usage>(const DB& db, const LIST& params, product_concept_feature_category_usage* in)
+{
+ size_t base = GenericFill(db, params, static_cast<group_assignment*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to product_concept_feature_category_usage"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to product_concept_feature_category_usage to be a `SET [1:?] OF category_usage_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<product_definition_element_relationship>(const DB& db, const LIST& params, product_definition_element_relationship* in)
+{
+ size_t base = GenericFill(db, params, static_cast<group*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to product_definition_element_relationship"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<product_definition_formation>(const DB& db, const LIST& params, product_definition_formation* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to product_definition_formation"); } do { // convert the 'id' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::product_definition_formation, 3>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->id, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to product_definition_formation to be a `identifier`")); }
+ } while (0);
+ do { // convert the 'description' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::product_definition_formation, 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 product_definition_formation to be a `text`")); }
+ } while (0);
+ do { // convert the 'of_product' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::product_definition_formation, 3>::aux_is_derived[2] = true; break; }
+ try { GenericConvert(in->of_product, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to product_definition_formation to be a `product`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<product_definition_formation_with_specified_source>(const DB& db, const LIST& params, product_definition_formation_with_specified_source* in)
+{
+ size_t base = GenericFill(db, params, static_cast<product_definition_formation*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to product_definition_formation_with_specified_source"); } do { // convert the 'make_or_buy' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->make_or_buy, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to product_definition_formation_with_specified_source to be a `source`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<product_definition_group_assignment>(const DB& db, const LIST& params, product_definition_group_assignment* in)
+{
+ size_t base = GenericFill(db, params, static_cast<group_assignment*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to product_definition_group_assignment"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to product_definition_group_assignment to be a `SET [1:1] OF product_definition_or_product_definition_relationship`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<product_definition_shape>(const DB& db, const LIST& params, product_definition_shape* in)
+{
+ size_t base = GenericFill(db, params, static_cast<property_definition*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to product_definition_shape"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<product_definition_with_associated_documents>(const DB& db, const LIST& params, product_definition_with_associated_documents* in)
+{
+ size_t base = GenericFill(db, params, static_cast<product_definition*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to product_definition_with_associated_documents"); } do { // convert the 'documentation_ids' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->documentation_ids, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to product_definition_with_associated_documents to be a `SET [1:?] OF document`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<product_identification>(const DB& db, const LIST& params, product_identification* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<product_material_composition_relationship>(const DB& db, const LIST& params, product_material_composition_relationship* in)
+{
+ size_t base = GenericFill(db, params, static_cast<product_definition_relationship*>(in));
+ if (params.GetSize() < 9) { throw STEP::TypeError("expected 9 arguments to product_material_composition_relationship"); } do { // convert the 'class' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->class_, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to product_material_composition_relationship to be a `label`")); }
+ } while (0);
+ do { // convert the 'constituent_amount' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->constituent_amount, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to product_material_composition_relationship to be a `SET [1:?] OF characterized_product_composition_value`")); }
+ } while (0);
+ do { // convert the 'composition_basis' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->composition_basis, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to product_material_composition_relationship to be a `label`")); }
+ } while (0);
+ do { // convert the 'determination_method' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->determination_method, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 8 to product_material_composition_relationship to be a `text`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<product_related_product_category>(const DB& db, const LIST& params, product_related_product_category* in)
+{
+ size_t base = GenericFill(db, params, static_cast<product_category*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to product_related_product_category"); } do { // convert the 'products' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->products, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to product_related_product_category to be a `SET [1:?] OF product`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<product_specification>(const DB& db, const LIST& params, product_specification* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<tolerance_zone_definition>(const DB& db, const LIST& params, tolerance_zone_definition* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to tolerance_zone_definition"); } do { // convert the 'zone' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::tolerance_zone_definition, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->zone, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to tolerance_zone_definition to be a `tolerance_zone`")); }
+ } while (0);
+ do { // convert the 'boundaries' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::tolerance_zone_definition, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->boundaries, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to tolerance_zone_definition to be a `SET [1:?] OF shape_aspect`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<projected_zone_definition>(const DB& db, const LIST& params, projected_zone_definition* in)
+{
+ size_t base = GenericFill(db, params, static_cast<tolerance_zone_definition*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to projected_zone_definition"); } do { // convert the 'projection_end' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->projection_end, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to projected_zone_definition to be a `shape_aspect`")); }
+ } while (0);
+ do { // convert the 'projected_length' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->projected_length, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to projected_zone_definition to be a `measure_with_unit`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<projection_curve>(const DB& db, const LIST& params, projection_curve* in)
+{
+ size_t base = GenericFill(db, params, static_cast<annotation_curve_occurrence*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to projection_curve"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<promissory_usage_occurrence>(const DB& db, const LIST& params, promissory_usage_occurrence* in)
+{
+ size_t base = GenericFill(db, params, static_cast<assembly_component_usage*>(in));
+ if (params.GetSize() < 6) { throw STEP::TypeError("expected 6 arguments to promissory_usage_occurrence"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<qualified_representation_item>(const DB& db, const LIST& params, qualified_representation_item* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to qualified_representation_item"); } do { // convert the 'qualifiers' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->qualifiers, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to qualified_representation_item to be a `SET [1:?] OF value_qualifier`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<qualitative_uncertainty>(const DB& db, const LIST& params, qualitative_uncertainty* in)
+{
+ size_t base = GenericFill(db, params, static_cast<uncertainty_qualifier*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to qualitative_uncertainty"); } do { // convert the 'uncertainty_value' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->uncertainty_value, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to qualitative_uncertainty to be a `text`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<quantified_assembly_component_usage>(const DB& db, const LIST& params, quantified_assembly_component_usage* in)
+{
+ size_t base = GenericFill(db, params, static_cast<assembly_component_usage*>(in));
+ if (params.GetSize() < 7) { throw STEP::TypeError("expected 7 arguments to quantified_assembly_component_usage"); } do { // convert the 'quantity' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->quantity, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to quantified_assembly_component_usage to be a `measure_with_unit`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<quasi_uniform_curve>(const DB& db, const LIST& params, quasi_uniform_curve* in)
+{
+ size_t base = GenericFill(db, params, static_cast<b_spline_curve*>(in));
+ if (params.GetSize() < 6) { throw STEP::TypeError("expected 6 arguments to quasi_uniform_curve"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<quasi_uniform_surface>(const DB& db, const LIST& params, quasi_uniform_surface* in)
+{
+ size_t base = GenericFill(db, params, static_cast<b_spline_surface*>(in));
+ if (params.GetSize() < 7) { throw STEP::TypeError("expected 7 arguments to quasi_uniform_surface"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<radioactivity_measure_with_unit>(const DB& db, const LIST& params, radioactivity_measure_with_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<measure_with_unit*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to radioactivity_measure_with_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<radioactivity_unit>(const DB& db, const LIST& params, radioactivity_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<derived_unit*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to radioactivity_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<radius_dimension>(const DB& db, const LIST& params, radius_dimension* in)
+{
+ size_t base = GenericFill(db, params, static_cast<dimension_curve_directed_callout*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to radius_dimension"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<range_characteristic>(const DB& db, const LIST& params, range_characteristic* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<ratio_unit>(const DB& db, const LIST& params, ratio_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<named_unit*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to ratio_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<rational_b_spline_curve>(const DB& db, const LIST& params, rational_b_spline_curve* in)
+{
+ size_t base = GenericFill(db, params, static_cast<b_spline_curve*>(in));
+ if (params.GetSize() < 7) { throw STEP::TypeError("expected 7 arguments to rational_b_spline_curve"); } do { // convert the 'weights_data' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->weights_data, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to rational_b_spline_curve to be a `LIST [2:?] OF REAL`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<rational_b_spline_surface>(const DB& db, const LIST& params, rational_b_spline_surface* in)
+{
+ size_t base = GenericFill(db, params, static_cast<b_spline_surface*>(in));
+ if (params.GetSize() < 7) { throw STEP::TypeError("expected 7 arguments to rational_b_spline_surface"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<rational_representation_item>(const DB& db, const LIST& params, rational_representation_item* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<real_literal>(const DB& db, const LIST& params, real_literal* in)
+{
+ size_t base = GenericFill(db, params, static_cast<literal_number*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to real_literal"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<real_representation_item>(const DB& db, const LIST& params, real_representation_item* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<rectangular_composite_surface>(const DB& db, const LIST& params, rectangular_composite_surface* in)
+{
+ size_t base = GenericFill(db, params, static_cast<bounded_surface*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to rectangular_composite_surface"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<rectangular_trimmed_surface>(const DB& db, const LIST& params, rectangular_trimmed_surface* in)
+{
+ size_t base = GenericFill(db, params, static_cast<bounded_surface*>(in));
+ if (params.GetSize() < 8) { throw STEP::TypeError("expected 8 arguments to rectangular_trimmed_surface"); } do { // convert the 'basis_surface' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->basis_surface, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to rectangular_trimmed_surface to be a `surface`")); }
+ } while (0);
+ do { // convert the 'u1' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->u1, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to rectangular_trimmed_surface to be a `parameter_value`")); }
+ } while (0);
+ do { // convert the 'u2' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->u2, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to rectangular_trimmed_surface to be a `parameter_value`")); }
+ } while (0);
+ do { // convert the 'v1' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->v1, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to rectangular_trimmed_surface to be a `parameter_value`")); }
+ } while (0);
+ do { // convert the 'v2' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->v2, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to rectangular_trimmed_surface to be a `parameter_value`")); }
+ } while (0);
+ do { // convert the 'usense' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->usense, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to rectangular_trimmed_surface to be a `BOOLEAN`")); }
+ } while (0);
+ do { // convert the 'vsense' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->vsense, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to rectangular_trimmed_surface to be a `BOOLEAN`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<referenced_modified_datum>(const DB& db, const LIST& params, referenced_modified_datum* in)
+{
+ size_t base = GenericFill(db, params, static_cast<datum_reference*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to referenced_modified_datum"); } do { // convert the 'modifier' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->modifier, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to referenced_modified_datum to be a `limit_condition`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<relative_event_occurrence>(const DB& db, const LIST& params, relative_event_occurrence* in)
+{
+ size_t base = GenericFill(db, params, static_cast<event_occurrence*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to relative_event_occurrence"); } do { // convert the 'base_event' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->base_event, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to relative_event_occurrence to be a `event_occurrence`")); }
+ } while (0);
+ do { // convert the 'offset' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->offset, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to relative_event_occurrence to be a `time_measure_with_unit`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<rep_item_group>(const DB& db, const LIST& params, rep_item_group* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<reparametrised_composite_curve_segment>(const DB& db, const LIST& params, reparametrised_composite_curve_segment* in)
+{
+ size_t base = GenericFill(db, params, static_cast<composite_curve_segment*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to reparametrised_composite_curve_segment"); } do { // convert the 'param_length' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->param_length, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to reparametrised_composite_curve_segment to be a `parameter_value`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<representation_relationship_with_transformation>(const DB& db, const LIST& params, representation_relationship_with_transformation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation_relationship*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to representation_relationship_with_transformation"); } do { // convert the 'transformation_operator' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->transformation_operator, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to representation_relationship_with_transformation to be a `transformation`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<requirement_assigned_object>(const DB& db, const LIST& params, requirement_assigned_object* in)
+{
+ size_t base = GenericFill(db, params, static_cast<group_assignment*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to requirement_assigned_object"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to requirement_assigned_object to be a `SET [1:1] OF requirement_assigned_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<requirement_assignment>(const DB& db, const LIST& params, requirement_assignment* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<requirement_source>(const DB& db, const LIST& params, requirement_source* in)
+{
+ size_t base = GenericFill(db, params, static_cast<group*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to requirement_source"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<requirement_view_definition_relationship>(const DB& db, const LIST& params, requirement_view_definition_relationship* in)
+{
+ size_t base = GenericFill(db, params, static_cast<product_definition_relationship*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to requirement_view_definition_relationship"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<resistance_measure_with_unit>(const DB& db, const LIST& params, resistance_measure_with_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<measure_with_unit*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to resistance_measure_with_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<resistance_unit>(const DB& db, const LIST& params, resistance_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<derived_unit*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to resistance_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<revolved_area_solid>(const DB& db, const LIST& params, revolved_area_solid* in)
+{
+ size_t base = GenericFill(db, params, static_cast<swept_area_solid*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to revolved_area_solid"); } do { // convert the 'axis' argument
+ std::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 revolved_area_solid to be a `axis1_placement`")); }
+ } while (0);
+ do { // convert the 'angle' argument
+ std::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 revolved_area_solid to be a `plane_angle_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<revolved_face_solid>(const DB& db, const LIST& params, revolved_face_solid* in)
+{
+ size_t base = GenericFill(db, params, static_cast<swept_face_solid*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to revolved_face_solid"); } do { // convert the 'axis' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::revolved_face_solid, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->axis, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to revolved_face_solid to be a `axis1_placement`")); }
+ } while (0);
+ do { // convert the 'angle' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::revolved_face_solid, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->angle, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to revolved_face_solid to be a `plane_angle_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<revolved_face_solid_with_trim_conditions>(const DB& db, const LIST& params, revolved_face_solid_with_trim_conditions* in)
+{
+ size_t base = GenericFill(db, params, static_cast<revolved_face_solid*>(in));
+ if (params.GetSize() < 6) { throw STEP::TypeError("expected 6 arguments to revolved_face_solid_with_trim_conditions"); } do { // convert the 'first_trim_condition' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->first_trim_condition, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to revolved_face_solid_with_trim_conditions to be a `trim_condition_select`")); }
+ } while (0);
+ do { // convert the 'second_trim_condition' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->second_trim_condition, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to revolved_face_solid_with_trim_conditions to be a `trim_condition_select`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<right_angular_wedge>(const DB& db, const LIST& params, right_angular_wedge* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_representation_item*>(in));
+ if (params.GetSize() < 6) { throw STEP::TypeError("expected 6 arguments to right_angular_wedge"); } do { // convert the 'position' argument
+ std::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 1 to right_angular_wedge to be a `axis2_placement_3d`")); }
+ } while (0);
+ do { // convert the 'x' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->x, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to right_angular_wedge to be a `positive_length_measure`")); }
+ } while (0);
+ do { // convert the 'y' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->y, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to right_angular_wedge to be a `positive_length_measure`")); }
+ } while (0);
+ do { // convert the 'z' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->z, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to right_angular_wedge to be a `positive_length_measure`")); }
+ } while (0);
+ do { // convert the 'ltx' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->ltx, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to right_angular_wedge to be a `length_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<right_circular_cone>(const DB& db, const LIST& params, right_circular_cone* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_representation_item*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to right_circular_cone"); } do { // convert the 'position' argument
+ std::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 1 to right_circular_cone to be a `axis1_placement`")); }
+ } while (0);
+ do { // convert the 'height' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->height, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to right_circular_cone to be a `positive_length_measure`")); }
+ } while (0);
+ do { // convert the 'radius' argument
+ std::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 3 to right_circular_cone to be a `length_measure`")); }
+ } while (0);
+ do { // convert the 'semi_angle' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->semi_angle, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to right_circular_cone to be a `plane_angle_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<right_circular_cylinder>(const DB& db, const LIST& params, right_circular_cylinder* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_representation_item*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to right_circular_cylinder"); } do { // convert the 'position' argument
+ std::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 1 to right_circular_cylinder to be a `axis1_placement`")); }
+ } while (0);
+ do { // convert the 'height' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->height, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to right_circular_cylinder to be a `positive_length_measure`")); }
+ } while (0);
+ do { // convert the 'radius' argument
+ std::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 3 to right_circular_cylinder to be a `positive_length_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<right_to_usage_association>(const DB& db, const LIST& params, right_to_usage_association* in)
+{
+ size_t base = GenericFill(db, params, static_cast<action_method_relationship*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to right_to_usage_association"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<roundness_tolerance>(const DB& db, const LIST& params, roundness_tolerance* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_tolerance*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to roundness_tolerance"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<row_representation_item>(const DB& db, const LIST& params, row_representation_item* in)
+{
+ size_t base = GenericFill(db, params, static_cast<compound_representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to row_representation_item"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<row_value>(const DB& db, const LIST& params, row_value* in)
+{
+ size_t base = GenericFill(db, params, static_cast<compound_representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to row_value"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<row_variable>(const DB& db, const LIST& params, row_variable* in)
+{
+ size_t base = GenericFill(db, params, static_cast<abstract_variable*>(in));
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<rule_action>(const DB& db, const LIST& params, rule_action* in)
+{
+ size_t base = GenericFill(db, params, static_cast<action*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to rule_action"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<rule_condition>(const DB& db, const LIST& params, rule_condition* in)
+{
+ size_t base = GenericFill(db, params, static_cast<atomic_formula*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to rule_condition"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<rule_set>(const DB& db, const LIST& params, rule_set* in)
+{
+ size_t base = GenericFill(db, params, static_cast<rule_software_definition*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to rule_set"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<rule_set_group>(const DB& db, const LIST& params, rule_set_group* in)
+{
+ size_t base = GenericFill(db, params, static_cast<rule_software_definition*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to rule_set_group"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<rule_superseded_assignment>(const DB& db, const LIST& params, rule_superseded_assignment* in)
+{
+ size_t base = GenericFill(db, params, static_cast<action_assignment*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to rule_superseded_assignment"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to rule_superseded_assignment to be a `SET [1:?] OF rule_superseded_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<rule_supersedence>(const DB& db, const LIST& params, rule_supersedence* in)
+{
+ size_t base = GenericFill(db, params, static_cast<rule_action*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to rule_supersedence"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<surface_curve_swept_area_solid>(const DB& db, const LIST& params, surface_curve_swept_area_solid* in)
+{
+ size_t base = GenericFill(db, params, static_cast<swept_area_solid*>(in));
+ if (params.GetSize() < 6) { throw STEP::TypeError("expected 6 arguments to surface_curve_swept_area_solid"); } do { // convert the 'directrix' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::surface_curve_swept_area_solid, 4>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->directrix, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to surface_curve_swept_area_solid to be a `curve`")); }
+ } while (0);
+ do { // convert the 'start_param' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::surface_curve_swept_area_solid, 4>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->start_param, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to surface_curve_swept_area_solid to be a `REAL`")); }
+ } while (0);
+ do { // convert the 'end_param' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::surface_curve_swept_area_solid, 4>::aux_is_derived[2] = true; break; }
+ try { GenericConvert(in->end_param, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to surface_curve_swept_area_solid to be a `REAL`")); }
+ } while (0);
+ do { // convert the 'reference_surface' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::surface_curve_swept_area_solid, 4>::aux_is_derived[3] = true; break; }
+ try { GenericConvert(in->reference_surface, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to surface_curve_swept_area_solid to be a `surface`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<ruled_surface_swept_area_solid>(const DB& db, const LIST& params, ruled_surface_swept_area_solid* in)
+{
+ size_t base = GenericFill(db, params, static_cast<surface_curve_swept_area_solid*>(in));
+ if (params.GetSize() < 6) { throw STEP::TypeError("expected 6 arguments to ruled_surface_swept_area_solid"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<runout_zone_definition>(const DB& db, const LIST& params, runout_zone_definition* in)
+{
+ size_t base = GenericFill(db, params, static_cast<tolerance_zone_definition*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to runout_zone_definition"); } do { // convert the 'orientation' argument
+ std::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 2 to runout_zone_definition to be a `runout_zone_orientation`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<runout_zone_orientation>(const DB& db, const LIST& params, runout_zone_orientation* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to runout_zone_orientation"); } do { // convert the 'angle' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::runout_zone_orientation, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->angle, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to runout_zone_orientation to be a `measure_with_unit`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<runout_zone_orientation_reference_direction>(const DB& db, const LIST& params, runout_zone_orientation_reference_direction* in)
+{
+ size_t base = GenericFill(db, params, static_cast<runout_zone_orientation*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to runout_zone_orientation_reference_direction"); } do { // convert the 'orientation_defining_relationship' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->orientation_defining_relationship, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to runout_zone_orientation_reference_direction to be a `shape_aspect_relationship`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<satisfied_requirement>(const DB& db, const LIST& params, satisfied_requirement* in)
+{
+ size_t base = GenericFill(db, params, static_cast<group_assignment*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to satisfied_requirement"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to satisfied_requirement to be a `SET [1:1] OF product_definition`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<satisfies_requirement>(const DB& db, const LIST& params, satisfies_requirement* in)
+{
+ size_t base = GenericFill(db, params, static_cast<group*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to satisfies_requirement"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<satisfying_item>(const DB& db, const LIST& params, satisfying_item* in)
+{
+ size_t base = GenericFill(db, params, static_cast<group_assignment*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to satisfying_item"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to satisfying_item to be a `SET [1:1] OF requirement_satisfaction_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<scalar_variable>(const DB& db, const LIST& params, scalar_variable* in)
+{
+ size_t base = GenericFill(db, params, static_cast<abstract_variable*>(in));
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<scattering_parameter>(const DB& db, const LIST& params, scattering_parameter* in)
+{
+ size_t base = GenericFill(db, params, static_cast<polar_complex_number_literal*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to scattering_parameter"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<sculptured_solid>(const DB& db, const LIST& params, sculptured_solid* in)
+{
+ size_t base = GenericFill(db, params, static_cast<modified_solid*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to sculptured_solid"); } do { // convert the 'sculpturing_element' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->sculpturing_element, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to sculptured_solid to be a `generalized_surface_select`")); }
+ } while (0);
+ do { // convert the 'positive_side' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->positive_side, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to sculptured_solid to be a `BOOLEAN`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<seam_curve>(const DB& db, const LIST& params, seam_curve* in)
+{
+ size_t base = GenericFill(db, params, static_cast<surface_curve*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to seam_curve"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<serial_numbered_effectivity>(const DB& db, const LIST& params, serial_numbered_effectivity* in)
+{
+ size_t base = GenericFill(db, params, static_cast<effectivity*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to serial_numbered_effectivity"); } do { // convert the 'effectivity_start_id' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->effectivity_start_id, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to serial_numbered_effectivity to be a `identifier`")); }
+ } while (0);
+ do { // convert the 'effectivity_end_id' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert(in->effectivity_end_id, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to serial_numbered_effectivity to be a `identifier`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<shape_aspect_associativity>(const DB& db, const LIST& params, shape_aspect_associativity* in)
+{
+ size_t base = GenericFill(db, params, static_cast<shape_aspect_relationship*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to shape_aspect_associativity"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<shape_aspect_deriving_relationship>(const DB& db, const LIST& params, shape_aspect_deriving_relationship* in)
+{
+ size_t base = GenericFill(db, params, static_cast<shape_aspect_relationship*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to shape_aspect_deriving_relationship"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<shape_definition_representation>(const DB& db, const LIST& params, shape_definition_representation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<property_definition_representation*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to shape_definition_representation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<shape_dimension_representation>(const DB& db, const LIST& params, shape_dimension_representation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<shape_representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to shape_dimension_representation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<shape_feature_definition>(const DB& db, const LIST& params, shape_feature_definition* in)
+{
+ size_t base = GenericFill(db, params, static_cast<characterized_object*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to shape_feature_definition"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<shape_representation_with_parameters>(const DB& db, const LIST& params, shape_representation_with_parameters* in)
+{
+ size_t base = GenericFill(db, params, static_cast<shape_representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to shape_representation_with_parameters"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<shell_based_surface_model>(const DB& db, const LIST& params, shell_based_surface_model* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to shell_based_surface_model"); } do { // convert the 'sbsm_boundary' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->sbsm_boundary, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to shell_based_surface_model to be a `SET [1:?] OF shell`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<shell_based_wireframe_model>(const DB& db, const LIST& params, shell_based_wireframe_model* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to shell_based_wireframe_model"); } do { // convert the 'sbwm_boundary' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->sbwm_boundary, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to shell_based_wireframe_model to be a `SET [1:?] OF shell`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<shell_based_wireframe_shape_representation>(const DB& db, const LIST& params, shell_based_wireframe_shape_representation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<shape_representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to shell_based_wireframe_shape_representation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<si_absorbed_dose_unit>(const DB& db, const LIST& params, si_absorbed_dose_unit* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<si_capacitance_unit>(const DB& db, const LIST& params, si_capacitance_unit* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<si_conductance_unit>(const DB& db, const LIST& params, si_conductance_unit* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<si_dose_equivalent_unit>(const DB& db, const LIST& params, si_dose_equivalent_unit* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<si_electric_charge_unit>(const DB& db, const LIST& params, si_electric_charge_unit* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<si_electric_potential_unit>(const DB& db, const LIST& params, si_electric_potential_unit* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<si_energy_unit>(const DB& db, const LIST& params, si_energy_unit* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<si_force_unit>(const DB& db, const LIST& params, si_force_unit* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<si_frequency_unit>(const DB& db, const LIST& params, si_frequency_unit* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<si_illuminance_unit>(const DB& db, const LIST& params, si_illuminance_unit* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<si_inductance_unit>(const DB& db, const LIST& params, si_inductance_unit* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<si_magnetic_flux_density_unit>(const DB& db, const LIST& params, si_magnetic_flux_density_unit* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<si_magnetic_flux_unit>(const DB& db, const LIST& params, si_magnetic_flux_unit* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<si_power_unit>(const DB& db, const LIST& params, si_power_unit* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<si_pressure_unit>(const DB& db, const LIST& params, si_pressure_unit* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<si_radioactivity_unit>(const DB& db, const LIST& params, si_radioactivity_unit* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<si_resistance_unit>(const DB& db, const LIST& params, si_resistance_unit* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<si_unit>(const DB& db, const LIST& params, si_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<named_unit*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to si_unit"); } do { // convert the 'prefix' argument
+ std::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 1 to si_unit to be a `si_prefix`")); }
+ } while (0);
+ do { // convert the 'name' argument
+ std::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 si_unit to be a `si_unit_name`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<simple_boolean_expression>(const DB& db, const LIST& params, simple_boolean_expression* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<simple_numeric_expression>(const DB& db, const LIST& params, simple_numeric_expression* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<slash_expression>(const DB& db, const LIST& params, slash_expression* in)
+{
+ size_t base = GenericFill(db, params, static_cast<binary_numeric_expression*>(in));
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<smeared_material_definition>(const DB& db, const LIST& params, smeared_material_definition* in)
+{
+ size_t base = GenericFill(db, params, static_cast<zone_structural_makeup*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to smeared_material_definition"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<solid_angle_measure_with_unit>(const DB& db, const LIST& params, solid_angle_measure_with_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<measure_with_unit*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to solid_angle_measure_with_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<solid_angle_unit>(const DB& db, const LIST& params, solid_angle_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<named_unit*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to solid_angle_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<solid_curve_font>(const DB& db, const LIST& params, solid_curve_font* in)
+{
+ size_t base = GenericFill(db, params, static_cast<pre_defined_curve_font*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to solid_curve_font"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<solid_replica>(const DB& db, const LIST& params, solid_replica* in)
+{
+ size_t base = GenericFill(db, params, static_cast<solid_model*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to solid_replica"); } do { // convert the 'parent_solid' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->parent_solid, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to solid_replica to be a `solid_model`")); }
+ } while (0);
+ do { // convert the 'transformation' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->transformation, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to solid_replica to be a `cartesian_transformation_operator_3d`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<solid_with_chamfered_edges>(const DB& db, const LIST& params, solid_with_chamfered_edges* in)
+{
+ size_t base = GenericFill(db, params, static_cast<edge_blended_solid*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to solid_with_chamfered_edges"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<solid_with_angle_based_chamfer>(const DB& db, const LIST& params, solid_with_angle_based_chamfer* in)
+{
+ size_t base = GenericFill(db, params, static_cast<solid_with_chamfered_edges*>(in));
+ if (params.GetSize() < 7) { throw STEP::TypeError("expected 7 arguments to solid_with_angle_based_chamfer"); } do { // convert the 'offset_distance' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->offset_distance, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to solid_with_angle_based_chamfer to be a `positive_length_measure`")); }
+ } while (0);
+ do { // convert the 'left_offset' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->left_offset, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to solid_with_angle_based_chamfer to be a `BOOLEAN`")); }
+ } while (0);
+ do { // convert the 'offset_angle' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->offset_angle, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to solid_with_angle_based_chamfer to be a `positive_plane_angle_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<solid_with_shape_element_pattern>(const DB& db, const LIST& params, solid_with_shape_element_pattern* in)
+{
+ size_t base = GenericFill(db, params, static_cast<modified_solid_with_placed_configuration*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to solid_with_shape_element_pattern"); } do { // convert the 'replicated_element' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::solid_with_shape_element_pattern, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->replicated_element, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to solid_with_shape_element_pattern to be a `modified_solid_with_placed_configuration`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<solid_with_circular_pattern>(const DB& db, const LIST& params, solid_with_circular_pattern* in)
+{
+ size_t base = GenericFill(db, params, static_cast<solid_with_shape_element_pattern*>(in));
+ if (params.GetSize() < 9) { throw STEP::TypeError("expected 9 arguments to solid_with_circular_pattern"); } do { // convert the 'replicate_count' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::solid_with_circular_pattern, 4>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->replicate_count, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to solid_with_circular_pattern to be a `positive_integer`")); }
+ } while (0);
+ do { // convert the 'angular_spacing' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::solid_with_circular_pattern, 4>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->angular_spacing, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to solid_with_circular_pattern to be a `plane_angle_measure`")); }
+ } while (0);
+ do { // convert the 'radial_alignment' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::solid_with_circular_pattern, 4>::aux_is_derived[2] = true; break; }
+ try { GenericConvert(in->radial_alignment, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to solid_with_circular_pattern to be a `BOOLEAN`")); }
+ } while (0);
+ do { // convert the 'reference_point' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::solid_with_circular_pattern, 4>::aux_is_derived[3] = true; break; }
+ try { GenericConvert(in->reference_point, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 8 to solid_with_circular_pattern to be a `point`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<solid_with_depression>(const DB& db, const LIST& params, solid_with_depression* in)
+{
+ size_t base = GenericFill(db, params, static_cast<modified_solid_with_placed_configuration*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to solid_with_depression"); } do { // convert the 'depth' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::solid_with_depression, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->depth, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to solid_with_depression to be a `positive_length_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<solid_with_pocket>(const DB& db, const LIST& params, solid_with_pocket* in)
+{
+ size_t base = GenericFill(db, params, static_cast<solid_with_depression*>(in));
+ if (params.GetSize() < 7) { throw STEP::TypeError("expected 7 arguments to solid_with_pocket"); } do { // convert the 'floor_blend_radius' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::solid_with_pocket, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->floor_blend_radius, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to solid_with_pocket to be a `non_negative_length_measure`")); }
+ } while (0);
+ do { // convert the 'draft_angle' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::solid_with_pocket, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->draft_angle, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to solid_with_pocket to be a `plane_angle_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<solid_with_circular_pocket>(const DB& db, const LIST& params, solid_with_circular_pocket* in)
+{
+ size_t base = GenericFill(db, params, static_cast<solid_with_pocket*>(in));
+ if (params.GetSize() < 8) { throw STEP::TypeError("expected 8 arguments to solid_with_circular_pocket"); } do { // convert the 'pocket_radius' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->pocket_radius, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to solid_with_circular_pocket to be a `positive_length_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<solid_with_protrusion>(const DB& db, const LIST& params, solid_with_protrusion* in)
+{
+ size_t base = GenericFill(db, params, static_cast<modified_solid_with_placed_configuration*>(in));
+ if (params.GetSize() < 6) { throw STEP::TypeError("expected 6 arguments to solid_with_protrusion"); } do { // convert the 'protrusion_height' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::solid_with_protrusion, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->protrusion_height, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to solid_with_protrusion to be a `positive_length_measure`")); }
+ } while (0);
+ do { // convert the 'protrusion_draft_angle' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::solid_with_protrusion, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->protrusion_draft_angle, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to solid_with_protrusion to be a `plane_angle_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<solid_with_circular_protrusion>(const DB& db, const LIST& params, solid_with_circular_protrusion* in)
+{
+ size_t base = GenericFill(db, params, static_cast<solid_with_protrusion*>(in));
+ if (params.GetSize() < 7) { throw STEP::TypeError("expected 7 arguments to solid_with_circular_protrusion"); } do { // convert the 'protrusion_radius' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->protrusion_radius, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to solid_with_circular_protrusion to be a `positive_length_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<solid_with_hole>(const DB& db, const LIST& params, solid_with_hole* in)
+{
+ size_t base = GenericFill(db, params, static_cast<solid_with_depression*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to solid_with_hole"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<solid_with_stepped_round_hole>(const DB& db, const LIST& params, solid_with_stepped_round_hole* in)
+{
+ size_t base = GenericFill(db, params, static_cast<solid_with_hole*>(in));
+ if (params.GetSize() < 6) { throw STEP::TypeError("expected 6 arguments to solid_with_stepped_round_hole"); } do { // convert the 'segments' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::solid_with_stepped_round_hole, 1>::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 5 to solid_with_stepped_round_hole to be a `positive_integer`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<solid_with_conical_bottom_round_hole>(const DB& db, const LIST& params, solid_with_conical_bottom_round_hole* in)
+{
+ size_t base = GenericFill(db, params, static_cast<solid_with_stepped_round_hole*>(in));
+ if (params.GetSize() < 8) { throw STEP::TypeError("expected 8 arguments to solid_with_conical_bottom_round_hole"); } do { // convert the 'semi_apex_angle' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->semi_apex_angle, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to solid_with_conical_bottom_round_hole to be a `positive_plane_angle_measure`")); }
+ } while (0);
+ do { // convert the 'tip_radius' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->tip_radius, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to solid_with_conical_bottom_round_hole to be a `non_negative_length_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<solid_with_constant_radius_edge_blend>(const DB& db, const LIST& params, solid_with_constant_radius_edge_blend* in)
+{
+ size_t base = GenericFill(db, params, static_cast<edge_blended_solid*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to solid_with_constant_radius_edge_blend"); } do { // convert the 'radius' argument
+ std::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 4 to solid_with_constant_radius_edge_blend to be a `positive_length_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<solid_with_slot>(const DB& db, const LIST& params, solid_with_slot* in)
+{
+ size_t base = GenericFill(db, params, static_cast<solid_with_depression*>(in));
+ if (params.GetSize() < 7) { throw STEP::TypeError("expected 7 arguments to solid_with_slot"); } do { // convert the 'slot_width' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::solid_with_slot, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->slot_width, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to solid_with_slot to be a `positive_length_measure`")); }
+ } while (0);
+ do { // convert the 'closed_ends' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::solid_with_slot, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->closed_ends, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to solid_with_slot to be a `LIST [2:2] OF LOGICAL`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<solid_with_curved_slot>(const DB& db, const LIST& params, solid_with_curved_slot* in)
+{
+ size_t base = GenericFill(db, params, static_cast<solid_with_slot*>(in));
+ if (params.GetSize() < 8) { throw STEP::TypeError("expected 8 arguments to solid_with_curved_slot"); } do { // convert the 'slot_centreline' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->slot_centreline, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to solid_with_curved_slot to be a `bounded_curve`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<solid_with_double_offset_chamfer>(const DB& db, const LIST& params, solid_with_double_offset_chamfer* in)
+{
+ size_t base = GenericFill(db, params, static_cast<solid_with_chamfered_edges*>(in));
+ if (params.GetSize() < 6) { throw STEP::TypeError("expected 6 arguments to solid_with_double_offset_chamfer"); } do { // convert the 'left_offset_distance' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->left_offset_distance, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to solid_with_double_offset_chamfer to be a `positive_length_measure`")); }
+ } while (0);
+ do { // convert the 'right_offset_distance' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->right_offset_distance, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to solid_with_double_offset_chamfer to be a `positive_length_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<solid_with_flat_bottom_round_hole>(const DB& db, const LIST& params, solid_with_flat_bottom_round_hole* in)
+{
+ size_t base = GenericFill(db, params, static_cast<solid_with_stepped_round_hole*>(in));
+ if (params.GetSize() < 7) { throw STEP::TypeError("expected 7 arguments to solid_with_flat_bottom_round_hole"); } do { // convert the 'fillet_radius' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->fillet_radius, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to solid_with_flat_bottom_round_hole to be a `non_negative_length_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<solid_with_general_pocket>(const DB& db, const LIST& params, solid_with_general_pocket* in)
+{
+ size_t base = GenericFill(db, params, static_cast<solid_with_pocket*>(in));
+ if (params.GetSize() < 9) { throw STEP::TypeError("expected 9 arguments to solid_with_general_pocket"); } do { // convert the 'profile' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->profile, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to solid_with_general_pocket to be a `positioned_sketch`")); }
+ } while (0);
+ do { // convert the 'reference_point' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->reference_point, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 8 to solid_with_general_pocket to be a `point`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<solid_with_general_protrusion>(const DB& db, const LIST& params, solid_with_general_protrusion* in)
+{
+ size_t base = GenericFill(db, params, static_cast<solid_with_protrusion*>(in));
+ if (params.GetSize() < 8) { throw STEP::TypeError("expected 8 arguments to solid_with_general_protrusion"); } do { // convert the 'profile' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->profile, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to solid_with_general_protrusion to be a `positioned_sketch`")); }
+ } while (0);
+ do { // convert the 'reference_point' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->reference_point, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to solid_with_general_protrusion to be a `point`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<solid_with_groove>(const DB& db, const LIST& params, solid_with_groove* in)
+{
+ size_t base = GenericFill(db, params, static_cast<solid_with_depression*>(in));
+ if (params.GetSize() < 10) { throw STEP::TypeError("expected 10 arguments to solid_with_groove"); } do { // convert the 'groove_radius' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->groove_radius, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to solid_with_groove to be a `positive_length_measure`")); }
+ } while (0);
+ do { // convert the 'groove_width' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->groove_width, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to solid_with_groove to be a `positive_length_measure`")); }
+ } while (0);
+ do { // convert the 'draft_angle' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->draft_angle, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to solid_with_groove to be a `plane_angle_measure`")); }
+ } while (0);
+ do { // convert the 'floor_fillet_radius' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->floor_fillet_radius, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 8 to solid_with_groove to be a `non_negative_length_measure`")); }
+ } while (0);
+ do { // convert the 'external_groove' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->external_groove, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 9 to solid_with_groove to be a `BOOLEAN`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<solid_with_incomplete_circular_pattern>(const DB& db, const LIST& params, solid_with_incomplete_circular_pattern* in)
+{
+ size_t base = GenericFill(db, params, static_cast<solid_with_circular_pattern*>(in));
+ if (params.GetSize() < 10) { throw STEP::TypeError("expected 10 arguments to solid_with_incomplete_circular_pattern"); } do { // convert the 'omitted_instances' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->omitted_instances, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 9 to solid_with_incomplete_circular_pattern to be a `SET [1:?] OF positive_integer`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<solid_with_rectangular_pattern>(const DB& db, const LIST& params, solid_with_rectangular_pattern* in)
+{
+ size_t base = GenericFill(db, params, static_cast<solid_with_shape_element_pattern*>(in));
+ if (params.GetSize() < 9) { throw STEP::TypeError("expected 9 arguments to solid_with_rectangular_pattern"); } do { // convert the 'row_count' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::solid_with_rectangular_pattern, 4>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->row_count, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to solid_with_rectangular_pattern to be a `positive_integer`")); }
+ } while (0);
+ do { // convert the 'column_count' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::solid_with_rectangular_pattern, 4>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->column_count, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to solid_with_rectangular_pattern to be a `positive_integer`")); }
+ } while (0);
+ do { // convert the 'row_spacing' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::solid_with_rectangular_pattern, 4>::aux_is_derived[2] = true; break; }
+ try { GenericConvert(in->row_spacing, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to solid_with_rectangular_pattern to be a `length_measure`")); }
+ } while (0);
+ do { // convert the 'column_spacing' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::solid_with_rectangular_pattern, 4>::aux_is_derived[3] = true; break; }
+ try { GenericConvert(in->column_spacing, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 8 to solid_with_rectangular_pattern to be a `length_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<solid_with_incomplete_rectangular_pattern>(const DB& db, const LIST& params, solid_with_incomplete_rectangular_pattern* in)
+{
+ size_t base = GenericFill(db, params, static_cast<solid_with_rectangular_pattern*>(in));
+ if (params.GetSize() < 9) { throw STEP::TypeError("expected 9 arguments to solid_with_incomplete_rectangular_pattern"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<solid_with_rectangular_pocket>(const DB& db, const LIST& params, solid_with_rectangular_pocket* in)
+{
+ size_t base = GenericFill(db, params, static_cast<solid_with_pocket*>(in));
+ if (params.GetSize() < 10) { throw STEP::TypeError("expected 10 arguments to solid_with_rectangular_pocket"); } do { // convert the 'pocket_length' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->pocket_length, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to solid_with_rectangular_pocket to be a `positive_length_measure`")); }
+ } while (0);
+ do { // convert the 'pocket_width' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->pocket_width, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 8 to solid_with_rectangular_pocket to be a `positive_length_measure`")); }
+ } while (0);
+ do { // convert the 'corner_radius' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->corner_radius, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 9 to solid_with_rectangular_pocket to be a `non_negative_length_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<solid_with_rectangular_protrusion>(const DB& db, const LIST& params, solid_with_rectangular_protrusion* in)
+{
+ size_t base = GenericFill(db, params, static_cast<solid_with_protrusion*>(in));
+ if (params.GetSize() < 9) { throw STEP::TypeError("expected 9 arguments to solid_with_rectangular_protrusion"); } do { // convert the 'protrusion_length' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->protrusion_length, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to solid_with_rectangular_protrusion to be a `positive_length_measure`")); }
+ } while (0);
+ do { // convert the 'protrusion_width' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->protrusion_width, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to solid_with_rectangular_protrusion to be a `positive_length_measure`")); }
+ } while (0);
+ do { // convert the 'protrusion_corner_radius' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->protrusion_corner_radius, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 8 to solid_with_rectangular_protrusion to be a `non_negative_length_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<solid_with_single_offset_chamfer>(const DB& db, const LIST& params, solid_with_single_offset_chamfer* in)
+{
+ size_t base = GenericFill(db, params, static_cast<solid_with_chamfered_edges*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to solid_with_single_offset_chamfer"); } do { // convert the 'offset_distance' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->offset_distance, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to solid_with_single_offset_chamfer to be a `positive_length_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<solid_with_spherical_bottom_round_hole>(const DB& db, const LIST& params, solid_with_spherical_bottom_round_hole* in)
+{
+ size_t base = GenericFill(db, params, static_cast<solid_with_stepped_round_hole*>(in));
+ if (params.GetSize() < 7) { throw STEP::TypeError("expected 7 arguments to solid_with_spherical_bottom_round_hole"); } do { // convert the 'sphere_radius' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->sphere_radius, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to solid_with_spherical_bottom_round_hole to be a `positive_length_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<solid_with_stepped_round_hole_and_conical_transitions>(const DB& db, const LIST& params, solid_with_stepped_round_hole_and_conical_transitions* in)
+{
+ size_t base = GenericFill(db, params, static_cast<solid_with_stepped_round_hole*>(in));
+ if (params.GetSize() < 7) { throw STEP::TypeError("expected 7 arguments to solid_with_stepped_round_hole_and_conical_transitions"); } do { // convert the 'conical_transitions' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->conical_transitions, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to solid_with_stepped_round_hole_and_conical_transitions to be a `SET [1:?] OF conical_stepped_hole_transition`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<solid_with_straight_slot>(const DB& db, const LIST& params, solid_with_straight_slot* in)
+{
+ size_t base = GenericFill(db, params, static_cast<solid_with_slot*>(in));
+ if (params.GetSize() < 8) { throw STEP::TypeError("expected 8 arguments to solid_with_straight_slot"); } do { // convert the 'slot_length' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->slot_length, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to solid_with_straight_slot to be a `positive_length_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<solid_with_tee_section_slot>(const DB& db, const LIST& params, solid_with_tee_section_slot* in)
+{
+ size_t base = GenericFill(db, params, static_cast<solid_with_slot*>(in));
+ if (params.GetSize() < 9) { throw STEP::TypeError("expected 9 arguments to solid_with_tee_section_slot"); } do { // convert the 'tee_section_width' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->tee_section_width, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to solid_with_tee_section_slot to be a `positive_length_measure`")); }
+ } while (0);
+ do { // convert the 'collar_depth' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->collar_depth, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 8 to solid_with_tee_section_slot to be a `positive_length_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<solid_with_through_depression>(const DB& db, const LIST& params, solid_with_through_depression* in)
+{
+ size_t base = GenericFill(db, params, static_cast<solid_with_depression*>(in));
+ if (params.GetSize() < 6) { throw STEP::TypeError("expected 6 arguments to solid_with_through_depression"); } do { // convert the 'exit_faces' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->exit_faces, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to solid_with_through_depression to be a `SET [1:?] OF face_surface`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<solid_with_trapezoidal_section_slot>(const DB& db, const LIST& params, solid_with_trapezoidal_section_slot* in)
+{
+ size_t base = GenericFill(db, params, static_cast<solid_with_slot*>(in));
+ if (params.GetSize() < 9) { throw STEP::TypeError("expected 9 arguments to solid_with_trapezoidal_section_slot"); } do { // convert the 'draft_angle' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->draft_angle, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to solid_with_trapezoidal_section_slot to be a `plane_angle_measure`")); }
+ } while (0);
+ do { // convert the 'floor_fillet_radius' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->floor_fillet_radius, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 8 to solid_with_trapezoidal_section_slot to be a `non_negative_length_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<solid_with_variable_radius_edge_blend>(const DB& db, const LIST& params, solid_with_variable_radius_edge_blend* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to solid_with_variable_radius_edge_blend"); } do { // convert the 'point_list' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->point_list, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to solid_with_variable_radius_edge_blend to be a `LIST [2:?] OF point`")); }
+ } while (0);
+ do { // convert the 'radius_list' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->radius_list, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to solid_with_variable_radius_edge_blend to be a `LIST [2:?] OF positive_length_measure`")); }
+ } while (0);
+ do { // convert the 'edge_function_list' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->edge_function_list, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to solid_with_variable_radius_edge_blend to be a `LIST [1:?] OF blend_radius_variation_type`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<source_for_requirement>(const DB& db, const LIST& params, source_for_requirement* in)
+{
+ size_t base = GenericFill(db, params, static_cast<group_assignment*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to source_for_requirement"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to source_for_requirement to be a `SET [1:1] OF requirement_source_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<sourced_requirement>(const DB& db, const LIST& params, sourced_requirement* in)
+{
+ size_t base = GenericFill(db, params, static_cast<group_assignment*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to sourced_requirement"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to sourced_requirement to be a `SET [1:1] OF product_definition`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<specification_definition>(const DB& db, const LIST& params, specification_definition* in)
+{
+ size_t base = GenericFill(db, params, static_cast<product_definition*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to specification_definition"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<specified_higher_usage_occurrence>(const DB& db, const LIST& params, specified_higher_usage_occurrence* in)
+{
+ size_t base = GenericFill(db, params, static_cast<assembly_component_usage*>(in));
+ if (params.GetSize() < 8) { throw STEP::TypeError("expected 8 arguments to specified_higher_usage_occurrence"); } do { // convert the 'upper_usage' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->upper_usage, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to specified_higher_usage_occurrence to be a `assembly_component_usage`")); }
+ } while (0);
+ do { // convert the 'next_usage' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->next_usage, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to specified_higher_usage_occurrence to be a `next_assembly_usage_occurrence`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<sphere>(const DB& db, const LIST& params, sphere* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_representation_item*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to sphere"); } do { // convert the 'radius' argument
+ std::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 sphere to be a `positive_length_measure`")); }
+ } while (0);
+ do { // convert the 'centre' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->centre, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to sphere to be a `point`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<spherical_surface>(const DB& db, const LIST& params, spherical_surface* in)
+{
+ size_t base = GenericFill(db, params, static_cast<elementary_surface*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to spherical_surface"); } do { // convert the 'radius' argument
+ std::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 2 to spherical_surface to be a `positive_length_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<start_request>(const DB& db, const LIST& params, start_request* in)
+{
+ size_t base = GenericFill(db, params, static_cast<action_request_assignment*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to start_request"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to start_request to be a `SET [1:?] OF start_request_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<start_work>(const DB& db, const LIST& params, start_work* in)
+{
+ size_t base = GenericFill(db, params, static_cast<action_assignment*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to start_work"); } do { // convert the 'items' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->items, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to start_work to be a `SET [1:?] OF work_item`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<straightness_tolerance>(const DB& db, const LIST& params, straightness_tolerance* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_tolerance*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to straightness_tolerance"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<structured_dimension_callout>(const DB& db, const LIST& params, structured_dimension_callout* in)
+{
+ size_t base = GenericFill(db, params, static_cast<draughting_callout*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to structured_dimension_callout"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<structured_text_composition>(const DB& db, const LIST& params, structured_text_composition* in)
+{
+ size_t base = GenericFill(db, params, static_cast<compound_representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to structured_text_composition"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<structured_text_representation>(const DB& db, const LIST& params, structured_text_representation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to structured_text_representation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<subedge>(const DB& db, const LIST& params, subedge* in)
+{
+ size_t base = GenericFill(db, params, static_cast<edge*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to subedge"); } do { // convert the 'parent_edge' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->parent_edge, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to subedge to be a `edge`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<subface>(const DB& db, const LIST& params, subface* in)
+{
+ size_t base = GenericFill(db, params, static_cast<face*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to subface"); } do { // convert the 'parent_face' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->parent_face, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to subface to be a `face`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<supplied_part_relationship>(const DB& db, const LIST& params, supplied_part_relationship* in)
+{
+ size_t base = GenericFill(db, params, static_cast<product_definition_relationship*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to supplied_part_relationship"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<surface_condition_callout>(const DB& db, const LIST& params, surface_condition_callout* in)
+{
+ size_t base = GenericFill(db, params, static_cast<draughting_callout*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to surface_condition_callout"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<swept_surface>(const DB& db, const LIST& params, swept_surface* in)
+{
+ size_t base = GenericFill(db, params, static_cast<surface*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to swept_surface"); } do { // convert the 'swept_curve' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::swept_surface, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->swept_curve, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to swept_surface to be a `curve`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<surface_of_linear_extrusion>(const DB& db, const LIST& params, surface_of_linear_extrusion* in)
+{
+ size_t base = GenericFill(db, params, static_cast<swept_surface*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to surface_of_linear_extrusion"); } do { // convert the 'extrusion_axis' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->extrusion_axis, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to surface_of_linear_extrusion to be a `vector`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<surface_of_revolution>(const DB& db, const LIST& params, surface_of_revolution* in)
+{
+ size_t base = GenericFill(db, params, static_cast<swept_surface*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to surface_of_revolution"); } do { // convert the 'axis_position' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->axis_position, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to surface_of_revolution to be a `axis1_placement`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<surface_patch>(const DB& db, const LIST& params, surface_patch* in)
+{
+ size_t base = GenericFill(db, params, static_cast<founded_item*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to surface_patch"); } do { // convert the 'parent_surface' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->parent_surface, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to surface_patch to be a `bounded_surface`")); }
+ } while (0);
+ do { // convert the 'u_transition' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->u_transition, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to surface_patch to be a `transition_code`")); }
+ } while (0);
+ do { // convert the 'v_transition' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->v_transition, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to surface_patch to be a `transition_code`")); }
+ } while (0);
+ do { // convert the 'u_sense' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->u_sense, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to surface_patch to be a `BOOLEAN`")); }
+ } while (0);
+ do { // convert the 'v_sense' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->v_sense, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to surface_patch to be a `BOOLEAN`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<surface_profile_tolerance>(const DB& db, const LIST& params, surface_profile_tolerance* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_tolerance*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to surface_profile_tolerance"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<surface_replica>(const DB& db, const LIST& params, surface_replica* in)
+{
+ size_t base = GenericFill(db, params, static_cast<surface*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to surface_replica"); } do { // convert the 'parent_surface' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->parent_surface, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to surface_replica to be a `surface`")); }
+ } while (0);
+ do { // convert the 'transformation' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->transformation, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to surface_replica to be a `cartesian_transformation_operator_3d`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<surface_side_style>(const DB& db, const LIST& params, surface_side_style* in)
+{
+ size_t base = GenericFill(db, params, static_cast<founded_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to surface_side_style"); } do { // convert the 'name' argument
+ std::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 0 to surface_side_style to be a `label`")); }
+ } while (0);
+ do { // convert the 'styles' argument
+ std::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 1 to surface_side_style to be a `SET [1:7] OF surface_style_element_select`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<surface_style_boundary>(const DB& db, const LIST& params, surface_style_boundary* in)
+{
+ size_t base = GenericFill(db, params, static_cast<founded_item*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to surface_style_boundary"); } do { // convert the 'style_of_boundary' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->style_of_boundary, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to surface_style_boundary to be a `curve_or_render`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<surface_style_control_grid>(const DB& db, const LIST& params, surface_style_control_grid* in)
+{
+ size_t base = GenericFill(db, params, static_cast<founded_item*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to surface_style_control_grid"); } do { // convert the 'style_of_control_grid' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->style_of_control_grid, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to surface_style_control_grid to be a `curve_or_render`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<surface_style_fill_area>(const DB& db, const LIST& params, surface_style_fill_area* in)
+{
+ size_t base = GenericFill(db, params, static_cast<founded_item*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to surface_style_fill_area"); } do { // convert the 'fill_area' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->fill_area, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to surface_style_fill_area to be a `fill_area_style`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<surface_style_parameter_line>(const DB& db, const LIST& params, surface_style_parameter_line* in)
+{
+ size_t base = GenericFill(db, params, static_cast<founded_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to surface_style_parameter_line"); } do { // convert the 'style_of_parameter_lines' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->style_of_parameter_lines, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to surface_style_parameter_line to be a `curve_or_render`")); }
+ } while (0);
+ do { // convert the 'direction_counts' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->direction_counts, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to surface_style_parameter_line to be a `SET [1:2] OF direction_count_select`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<surface_style_reflectance_ambient>(const DB& db, const LIST& params, surface_style_reflectance_ambient* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to surface_style_reflectance_ambient"); } do { // convert the 'ambient_reflectance' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::surface_style_reflectance_ambient, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->ambient_reflectance, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to surface_style_reflectance_ambient to be a `REAL`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<surface_style_reflectance_ambient_diffuse>(const DB& db, const LIST& params, surface_style_reflectance_ambient_diffuse* in)
+{
+ size_t base = GenericFill(db, params, static_cast<surface_style_reflectance_ambient*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to surface_style_reflectance_ambient_diffuse"); } do { // convert the 'diffuse_reflectance' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::surface_style_reflectance_ambient_diffuse, 1>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->diffuse_reflectance, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to surface_style_reflectance_ambient_diffuse to be a `REAL`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<surface_style_reflectance_ambient_diffuse_specular>(const DB& db, const LIST& params, surface_style_reflectance_ambient_diffuse_specular* in)
+{
+ size_t base = GenericFill(db, params, static_cast<surface_style_reflectance_ambient_diffuse*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to surface_style_reflectance_ambient_diffuse_specular"); } do { // convert the 'specular_reflectance' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->specular_reflectance, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to surface_style_reflectance_ambient_diffuse_specular to be a `REAL`")); }
+ } while (0);
+ do { // convert the 'specular_exponent' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->specular_exponent, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to surface_style_reflectance_ambient_diffuse_specular to be a `REAL`")); }
+ } while (0);
+ do { // convert the 'specular_colour' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->specular_colour, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to surface_style_reflectance_ambient_diffuse_specular to be a `colour`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<surface_style_rendering>(const DB& db, const LIST& params, surface_style_rendering* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to surface_style_rendering"); } do { // convert the 'rendering_method' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::surface_style_rendering, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->rendering_method, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to surface_style_rendering to be a `shading_surface_method`")); }
+ } while (0);
+ do { // convert the 'surface_colour' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::surface_style_rendering, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->surface_colour, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to surface_style_rendering to be a `colour`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<surface_style_rendering_with_properties>(const DB& db, const LIST& params, surface_style_rendering_with_properties* in)
+{
+ size_t base = GenericFill(db, params, static_cast<surface_style_rendering*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to surface_style_rendering_with_properties"); } do { // convert the 'properties' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->properties, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to surface_style_rendering_with_properties to be a `SET [1:2] OF rendering_properties_select`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<surface_style_segmentation_curve>(const DB& db, const LIST& params, surface_style_segmentation_curve* in)
+{
+ size_t base = GenericFill(db, params, static_cast<founded_item*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to surface_style_segmentation_curve"); } do { // convert the 'style_of_segmentation_curve' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->style_of_segmentation_curve, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to surface_style_segmentation_curve to be a `curve_or_render`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<surface_style_silhouette>(const DB& db, const LIST& params, surface_style_silhouette* in)
+{
+ size_t base = GenericFill(db, params, static_cast<founded_item*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to surface_style_silhouette"); } do { // convert the 'style_of_silhouette' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->style_of_silhouette, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to surface_style_silhouette to be a `curve_or_render`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<surface_style_usage>(const DB& db, const LIST& params, surface_style_usage* in)
+{
+ size_t base = GenericFill(db, params, static_cast<founded_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to surface_style_usage"); } do { // convert the 'side' argument
+ std::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 0 to surface_style_usage to be a `surface_side`")); }
+ } while (0);
+ do { // convert the 'style' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->style, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to surface_style_usage to be a `surface_side_style_select`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<surface_texture_representation>(const DB& db, const LIST& params, surface_texture_representation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to surface_texture_representation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<surfaced_open_shell>(const DB& db, const LIST& params, surfaced_open_shell* in)
+{
+ size_t base = GenericFill(db, params, static_cast<open_shell*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to surfaced_open_shell"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<swept_disk_solid>(const DB& db, const LIST& params, swept_disk_solid* in)
+{
+ size_t base = GenericFill(db, params, static_cast<solid_model*>(in));
+ if (params.GetSize() < 6) { throw STEP::TypeError("expected 6 arguments to swept_disk_solid"); } do { // convert the 'directrix' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->directrix, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to swept_disk_solid to be a `curve`")); }
+ } while (0);
+ do { // convert the 'radius' argument
+ std::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 2 to swept_disk_solid to be a `positive_length_measure`")); }
+ } while (0);
+ do { // convert the 'inner_radius' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert(in->inner_radius, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to swept_disk_solid to be a `positive_length_measure`")); }
+ } while (0);
+ do { // convert the 'start_param' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->start_param, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to swept_disk_solid to be a `REAL`")); }
+ } while (0);
+ do { // convert the 'end_param' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->end_param, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to swept_disk_solid to be a `REAL`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<symbol>(const DB& db, const LIST& params, symbol* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation_item*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to symbol"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<symbol_representation_map>(const DB& db, const LIST& params, symbol_representation_map* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation_map*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to symbol_representation_map"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<symbol_style>(const DB& db, const LIST& params, symbol_style* in)
+{
+ size_t base = GenericFill(db, params, static_cast<founded_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to symbol_style"); } do { // convert the 'name' argument
+ std::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 0 to symbol_style to be a `label`")); }
+ } while (0);
+ do { // convert the 'style_of_symbol' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->style_of_symbol, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to symbol_style to be a `symbol_style_select`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<symbol_target>(const DB& db, const LIST& params, symbol_target* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_representation_item*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to symbol_target"); } do { // convert the 'placement' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->placement, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to symbol_target to be a `axis2_placement`")); }
+ } while (0);
+ do { // convert the 'x_scale' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->x_scale, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to symbol_target to be a `positive_ratio_measure`")); }
+ } while (0);
+ do { // convert the 'y_scale' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->y_scale, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to symbol_target to be a `positive_ratio_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<symmetric_shape_aspect>(const DB& db, const LIST& params, symmetric_shape_aspect* in)
+{
+ size_t base = GenericFill(db, params, static_cast<shape_aspect*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to symmetric_shape_aspect"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<symmetry_tolerance>(const DB& db, const LIST& params, symmetry_tolerance* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_tolerance_with_datum_reference*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to symmetry_tolerance"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<table_representation_item>(const DB& db, const LIST& params, table_representation_item* in)
+{
+ size_t base = GenericFill(db, params, static_cast<compound_representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to table_representation_item"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<tactile_appearance_representation>(const DB& db, const LIST& params, tactile_appearance_representation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to tactile_appearance_representation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<tagged_text_format>(const DB& db, const LIST& params, tagged_text_format* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation_context*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to tagged_text_format"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<tagged_text_item>(const DB& db, const LIST& params, tagged_text_item* in)
+{
+ size_t base = GenericFill(db, params, static_cast<descriptive_representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to tagged_text_item"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<tangent>(const DB& db, const LIST& params, tangent* in)
+{
+ size_t base = GenericFill(db, params, static_cast<derived_shape_aspect*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to tangent"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<text_literal_with_associated_curves>(const DB& db, const LIST& params, text_literal_with_associated_curves* in)
+{
+ size_t base = GenericFill(db, params, static_cast<text_literal*>(in));
+ if (params.GetSize() < 7) { throw STEP::TypeError("expected 7 arguments to text_literal_with_associated_curves"); } do { // convert the 'associated_curves' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->associated_curves, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to text_literal_with_associated_curves to be a `SET [1:?] OF curve`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<text_literal_with_blanking_box>(const DB& db, const LIST& params, text_literal_with_blanking_box* in)
+{
+ size_t base = GenericFill(db, params, static_cast<text_literal*>(in));
+ if (params.GetSize() < 7) { throw STEP::TypeError("expected 7 arguments to text_literal_with_blanking_box"); } do { // convert the 'blanking' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->blanking, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to text_literal_with_blanking_box to be a `planar_box`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<text_literal_with_extent>(const DB& db, const LIST& params, text_literal_with_extent* in)
+{
+ size_t base = GenericFill(db, params, static_cast<text_literal*>(in));
+ if (params.GetSize() < 7) { throw STEP::TypeError("expected 7 arguments to text_literal_with_extent"); } do { // convert the 'extent' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->extent, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to text_literal_with_extent to be a `planar_extent`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<text_string_representation>(const DB& db, const LIST& params, text_string_representation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to text_string_representation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<text_style>(const DB& db, const LIST& params, text_style* in)
+{
+ size_t base = GenericFill(db, params, static_cast<founded_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to text_style"); } do { // convert the 'name' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::text_style, 2>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->name, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to text_style to be a `label`")); }
+ } while (0);
+ do { // convert the 'character_appearance' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::text_style, 2>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->character_appearance, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to text_style to be a `character_style_select`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<text_style_with_box_characteristics>(const DB& db, const LIST& params, text_style_with_box_characteristics* in)
+{
+ size_t base = GenericFill(db, params, static_cast<text_style*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to text_style_with_box_characteristics"); } do { // convert the 'characteristics' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->characteristics, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to text_style_with_box_characteristics to be a `SET [1:4] OF box_characteristic_select`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<text_style_with_mirror>(const DB& db, const LIST& params, text_style_with_mirror* in)
+{
+ size_t base = GenericFill(db, params, static_cast<text_style*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to text_style_with_mirror"); } do { // convert the 'mirror_placement' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->mirror_placement, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to text_style_with_mirror to be a `axis2_placement`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<text_style_with_spacing>(const DB& db, const LIST& params, text_style_with_spacing* in)
+{
+ size_t base = GenericFill(db, params, static_cast<text_style*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to text_style_with_spacing"); } do { // convert the 'character_spacing' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->character_spacing, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to text_style_with_spacing to be a `character_spacing_select`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<thermal_resistance_measure_with_unit>(const DB& db, const LIST& params, thermal_resistance_measure_with_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<measure_with_unit*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to thermal_resistance_measure_with_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<thermal_resistance_unit>(const DB& db, const LIST& params, thermal_resistance_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<derived_unit*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to thermal_resistance_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<thermodynamic_temperature_measure_with_unit>(const DB& db, const LIST& params, thermodynamic_temperature_measure_with_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<measure_with_unit*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to thermodynamic_temperature_measure_with_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<thermodynamic_temperature_unit>(const DB& db, const LIST& params, thermodynamic_temperature_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<named_unit*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to thermodynamic_temperature_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<thickened_face_solid>(const DB& db, const LIST& params, thickened_face_solid* in)
+{
+ size_t base = GenericFill(db, params, static_cast<solid_model*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to thickened_face_solid"); } do { // convert the 'base_element' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->base_element, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to thickened_face_solid to be a `generalized_surface_select`")); }
+ } while (0);
+ do { // convert the 'offset1' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->offset1, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to thickened_face_solid to be a `length_measure`")); }
+ } while (0);
+ do { // convert the 'offset2' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->offset2, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to thickened_face_solid to be a `length_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<thickness_laminate_definition>(const DB& db, const LIST& params, thickness_laminate_definition* in)
+{
+ size_t base = GenericFill(db, params, static_cast<product_definition*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to thickness_laminate_definition"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<thickness_laminate_table>(const DB& db, const LIST& params, thickness_laminate_table* in)
+{
+ size_t base = GenericFill(db, params, static_cast<zone_structural_makeup*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to thickness_laminate_table"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<time_interval>(const DB& db, const LIST& params, time_interval* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to time_interval"); } do { // convert the 'id' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::time_interval, 3>::aux_is_derived[0] = true; break; }
+ try { GenericConvert(in->id, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to time_interval to be a `identifier`")); }
+ } while (0);
+ do { // convert the 'name' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::time_interval, 3>::aux_is_derived[1] = true; break; }
+ try { GenericConvert(in->name, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to time_interval to be a `label`")); }
+ } while (0);
+ do { // convert the 'description' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::StepFile::time_interval, 3>::aux_is_derived[2] = 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 2 to time_interval to be a `text`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<time_interval_based_effectivity>(const DB& db, const LIST& params, time_interval_based_effectivity* in)
+{
+ size_t base = GenericFill(db, params, static_cast<effectivity*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to time_interval_based_effectivity"); } do { // convert the 'effectivity_period' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->effectivity_period, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to time_interval_based_effectivity to be a `time_interval`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<time_interval_with_bounds>(const DB& db, const LIST& params, time_interval_with_bounds* in)
+{
+ size_t base = GenericFill(db, params, static_cast<time_interval*>(in));
+ if (params.GetSize() < 6) { throw STEP::TypeError("expected 6 arguments to time_interval_with_bounds"); } do { // convert the 'primary_bound' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert(in->primary_bound, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to time_interval_with_bounds to be a `date_time_or_event_occurrence`")); }
+ } while (0);
+ do { // convert the 'secondary_bound' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert(in->secondary_bound, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to time_interval_with_bounds to be a `date_time_or_event_occurrence`")); }
+ } while (0);
+ do { // convert the 'duration' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert(in->duration, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to time_interval_with_bounds to be a `time_measure_with_unit`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<time_measure_with_unit>(const DB& db, const LIST& params, time_measure_with_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<measure_with_unit*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to time_measure_with_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<time_unit>(const DB& db, const LIST& params, time_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<named_unit*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to time_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<tolerance_zone>(const DB& db, const LIST& params, tolerance_zone* in)
+{
+ size_t base = GenericFill(db, params, static_cast<shape_aspect*>(in));
+ if (params.GetSize() < 6) { throw STEP::TypeError("expected 6 arguments to tolerance_zone"); } do { // convert the 'defining_tolerance' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->defining_tolerance, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to tolerance_zone to be a `SET [1:?] OF geometric_tolerance`")); }
+ } while (0);
+ do { // convert the 'form' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->form, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to tolerance_zone to be a `tolerance_zone_form`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<torus>(const DB& db, const LIST& params, torus* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_representation_item*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to torus"); } do { // convert the 'position' argument
+ std::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 1 to torus to be a `axis1_placement`")); }
+ } while (0);
+ do { // convert the 'major_radius' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->major_radius, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to torus to be a `positive_length_measure`")); }
+ } while (0);
+ do { // convert the 'minor_radius' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->minor_radius, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to torus to be a `positive_length_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<total_runout_tolerance>(const DB& db, const LIST& params, total_runout_tolerance* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_tolerance_with_datum_reference*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to total_runout_tolerance"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<track_blended_solid>(const DB& db, const LIST& params, track_blended_solid* in)
+{
+ size_t base = GenericFill(db, params, static_cast<edge_blended_solid*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to track_blended_solid"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<track_blended_solid_with_end_conditions>(const DB& db, const LIST& params, track_blended_solid_with_end_conditions* in)
+{
+ size_t base = GenericFill(db, params, static_cast<track_blended_solid*>(in));
+ if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to track_blended_solid_with_end_conditions"); } do { // convert the 'end_conditions' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->end_conditions, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to track_blended_solid_with_end_conditions to be a `LIST [2:2] OF blend_end_condition_select`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<trimmed_curve>(const DB& db, const LIST& params, trimmed_curve* in)
+{
+ size_t base = GenericFill(db, params, static_cast<bounded_curve*>(in));
+ if (params.GetSize() < 6) { throw STEP::TypeError("expected 6 arguments to trimmed_curve"); } do { // convert the 'basis_curve' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->basis_curve, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to trimmed_curve to be a `curve`")); }
+ } while (0);
+ do { // convert the 'trim_1' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->trim_1, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to trimmed_curve to be a `SET [1:2] OF trimming_select`")); }
+ } while (0);
+ do { // convert the 'trim_2' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->trim_2, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to trimmed_curve to be a `SET [1:2] OF trimming_select`")); }
+ } while (0);
+ do { // convert the 'sense_agreement' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->sense_agreement, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to trimmed_curve to be a `BOOLEAN`")); }
+ } while (0);
+ do { // convert the 'master_representation' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->master_representation, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to trimmed_curve to be a `trimming_preference`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<two_direction_repeat_factor>(const DB& db, const LIST& params, two_direction_repeat_factor* in)
+{
+ size_t base = GenericFill(db, params, static_cast<one_direction_repeat_factor*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to two_direction_repeat_factor"); } do { // convert the 'second_repeat_factor' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->second_repeat_factor, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to two_direction_repeat_factor to be a `vector`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<unary_generic_expression>(const DB& db, const LIST& params, unary_generic_expression* in)
+{
+ size_t base = GenericFill(db, params, static_cast<generic_expression*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to unary_generic_expression"); } do { // convert the 'operand' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->operand, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to unary_generic_expression to be a `generic_expression`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<unary_numeric_expression>(const DB& db, const LIST& params, unary_numeric_expression* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<uncertainty_assigned_representation>(const DB& db, const LIST& params, uncertainty_assigned_representation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to uncertainty_assigned_representation"); } do { // convert the 'uncertainty' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->uncertainty, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to uncertainty_assigned_representation to be a `SET [1:?] OF uncertainty_measure_with_unit`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<uncertainty_measure_with_unit>(const DB& db, const LIST& params, uncertainty_measure_with_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<measure_with_unit*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to uncertainty_measure_with_unit"); } do { // convert the 'name' argument
+ std::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 uncertainty_measure_with_unit to be a `label`")); }
+ } while (0);
+ do { // convert the 'description' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ 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 uncertainty_measure_with_unit to be a `text`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<uniform_curve>(const DB& db, const LIST& params, uniform_curve* in)
+{
+ size_t base = GenericFill(db, params, static_cast<b_spline_curve*>(in));
+ if (params.GetSize() < 6) { throw STEP::TypeError("expected 6 arguments to uniform_curve"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<uniform_resource_identifier>(const DB& db, const LIST& params, uniform_resource_identifier* in)
+{
+ size_t base = GenericFill(db, params, static_cast<descriptive_representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to uniform_resource_identifier"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<uniform_surface>(const DB& db, const LIST& params, uniform_surface* in)
+{
+ size_t base = GenericFill(db, params, static_cast<b_spline_surface*>(in));
+ if (params.GetSize() < 7) { throw STEP::TypeError("expected 7 arguments to uniform_surface"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<usage_association>(const DB& db, const LIST& params, usage_association* in)
+{
+ size_t base = GenericFill(db, params, static_cast<action_method_relationship*>(in));
+ if (params.GetSize() < 4) { throw STEP::TypeError("expected 4 arguments to usage_association"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<user_defined_curve_font>(const DB& db, const LIST& params, user_defined_curve_font* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<user_defined_marker>(const DB& db, const LIST& params, user_defined_marker* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<user_defined_terminator_symbol>(const DB& db, const LIST& params, user_defined_terminator_symbol* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<user_selected_shape_elements>(const DB& db, const LIST& params, user_selected_shape_elements* in)
+{
+ size_t base = GenericFill(db, params, static_cast<user_selected_elements*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to user_selected_shape_elements"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<value_range>(const DB& db, const LIST& params, value_range* in)
+{
+ size_t base = GenericFill(db, params, static_cast<compound_representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to value_range"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<value_representation_item>(const DB& db, const LIST& params, value_representation_item* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to value_representation_item"); } do { // convert the 'value_component' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->value_component, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to value_representation_item to be a `measure_value`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<variable_semantics>(const DB& db, const LIST& params, variable_semantics* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<variational_representation_item>(const DB& db, const LIST& params, variational_representation_item* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation_item*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to variational_representation_item"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<vector>(const DB& db, const LIST& params, vector* in)
+{
+ size_t base = GenericFill(db, params, static_cast<geometric_representation_item*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to vector"); } do { // convert the 'orientation' argument
+ std::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 1 to vector to be a `direction`")); }
+ } while (0);
+ do { // convert the 'magnitude' argument
+ std::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 2 to vector to be a `length_measure`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<vector_style>(const DB& db, const LIST& params, vector_style* in)
+{
+ size_t base = 0;
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<velocity_measure_with_unit>(const DB& db, const LIST& params, velocity_measure_with_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<measure_with_unit*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to velocity_measure_with_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<velocity_unit>(const DB& db, const LIST& params, velocity_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<derived_unit*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to velocity_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<vertex>(const DB& db, const LIST& params, vertex* in)
+{
+ size_t base = GenericFill(db, params, static_cast<topological_representation_item*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to vertex"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<vertex_loop>(const DB& db, const LIST& params, vertex_loop* in)
+{
+ size_t base = GenericFill(db, params, static_cast<loop*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to vertex_loop"); } do { // convert the 'loop_vertex' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->loop_vertex, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to vertex_loop to be a `vertex`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<vertex_point>(const DB& db, const LIST& params, vertex_point* in)
+{
+ size_t base = 0;
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to vertex_point"); } do { // convert the 'vertex_geometry' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->vertex_geometry, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to vertex_point to be a `point`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<vertex_shell>(const DB& db, const LIST& params, vertex_shell* in)
+{
+ size_t base = GenericFill(db, params, static_cast<topological_representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to vertex_shell"); } do { // convert the 'vertex_shell_extent' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->vertex_shell_extent, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to vertex_shell to be a `vertex_loop`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<view_volume>(const DB& db, const LIST& params, view_volume* in)
+{
+ size_t base = GenericFill(db, params, static_cast<founded_item*>(in));
+ if (params.GetSize() < 9) { throw STEP::TypeError("expected 9 arguments to view_volume"); } do { // convert the 'projection_type' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->projection_type, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to view_volume to be a `central_or_parallel`")); }
+ } while (0);
+ do { // convert the 'projection_point' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->projection_point, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to view_volume to be a `cartesian_point`")); }
+ } while (0);
+ do { // convert the 'view_plane_distance' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->view_plane_distance, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to view_volume to be a `length_measure`")); }
+ } while (0);
+ do { // convert the 'front_plane_distance' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->front_plane_distance, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to view_volume to be a `length_measure`")); }
+ } while (0);
+ do { // convert the 'front_plane_clipping' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->front_plane_clipping, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to view_volume to be a `BOOLEAN`")); }
+ } while (0);
+ do { // convert the 'back_plane_distance' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->back_plane_distance, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to view_volume to be a `length_measure`")); }
+ } while (0);
+ do { // convert the 'back_plane_clipping' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->back_plane_clipping, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to view_volume to be a `BOOLEAN`")); }
+ } while (0);
+ do { // convert the 'view_volume_sides_clipping' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->view_volume_sides_clipping, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to view_volume to be a `BOOLEAN`")); }
+ } while (0);
+ do { // convert the 'view_window' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->view_window, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 8 to view_volume to be a `planar_box`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<visual_appearance_representation>(const DB& db, const LIST& params, visual_appearance_representation* in)
+{
+ size_t base = GenericFill(db, params, static_cast<representation*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to visual_appearance_representation"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<volume_measure_with_unit>(const DB& db, const LIST& params, volume_measure_with_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<measure_with_unit*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to volume_measure_with_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<volume_unit>(const DB& db, const LIST& params, volume_unit* in)
+{
+ size_t base = GenericFill(db, params, static_cast<derived_unit*>(in));
+ if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to volume_unit"); } return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<week_of_year_and_day_date>(const DB& db, const LIST& params, week_of_year_and_day_date* in)
+{
+ size_t base = GenericFill(db, params, static_cast<date*>(in));
+ if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to week_of_year_and_day_date"); } do { // convert the 'week_component' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->week_component, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to week_of_year_and_day_date to be a `week_in_year_number`")); }
+ } while (0);
+ do { // convert the 'day_component' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ if (dynamic_cast<const UNSET*>(&*arg)) break;
+ try { GenericConvert(in->day_component, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to week_of_year_and_day_date to be a `day_in_week_number`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<wire_shell>(const DB& db, const LIST& params, wire_shell* in)
+{
+ size_t base = GenericFill(db, params, static_cast<topological_representation_item*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to wire_shell"); } do { // convert the 'wire_shell_extent' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->wire_shell_extent, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to wire_shell to be a `SET [1:?] OF loop`")); }
+ } while (0);
+ return base;
+}
+// -----------------------------------------------------------------------------------------------------------
+template <> size_t GenericFill<year_month>(const DB& db, const LIST& params, year_month* in)
+{
+ size_t base = GenericFill(db, params, static_cast<date*>(in));
+ if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to year_month"); } do { // convert the 'month_component' argument
+ std::shared_ptr<const DataType> arg = params[base++];
+ try { GenericConvert(in->month_component, arg, db); break; }
+ catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to year_month to be a `month_in_year_number`")); }
+ } while (0);
+ return base;
+}
+
+}
+}
diff --git a/code/Importer/StepFile/StepFileImporter.cpp b/code/Importer/StepFile/StepFileImporter.cpp
new file mode 100644
index 000000000..edfe30754
--- /dev/null
+++ b/code/Importer/StepFile/StepFileImporter.cpp
@@ -0,0 +1,114 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2018, assimp 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 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.
+---------------------------------------------------------------------------
+*/
+
+#ifndef ASSIMP_BUILD_NO_STEP_IMPORTER
+
+#include "StepFileImporter.h"
+#include "../../Importer/STEPParser/STEPFileReader.h"
+#include <assimp/importerdesc.h>
+#include <assimp/DefaultIOSystem.h>
+
+namespace Assimp {
+namespace StepFile {
+
+using namespace STEP;
+
+static const aiImporterDesc desc = { "StepFile Importer",
+ "",
+ "",
+ "",
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ "stp" };
+
+StepFileImporter::StepFileImporter()
+: BaseImporter() {
+
+}
+
+StepFileImporter::~StepFileImporter() {
+
+}
+
+bool StepFileImporter::CanRead(const std::string& file, IOSystem* pIOHandler, bool checkSig) const {
+ const std::string &extension = GetExtension(file);
+ if ( extension == "stp" || extension == "step" ) {
+ return true;
+ } else if ((!extension.length() || checkSig) && pIOHandler) {
+ const char* tokens[] = { "ISO-10303-21" };
+ const bool found(SearchFileHeaderForToken(pIOHandler, file, tokens, 1));
+ return found;
+ }
+
+ return false;
+}
+
+const aiImporterDesc *StepFileImporter::GetInfo() const {
+ return &desc;
+}
+
+static const std::string mode = "rb";
+static const std::string StepFileSchema = "CONFIG_CONTROL_DESIGN";
+
+void StepFileImporter::InternReadFile(const std::string &file, aiScene* pScene, IOSystem* pIOHandler) {
+ // Read file into memory
+ std::shared_ptr<IOStream> fileStream(pIOHandler->Open(file, mode));
+ if (!fileStream.get()) {
+ throw DeadlyImportError("Failed to open file " + file + ".");
+ }
+
+ std::unique_ptr<STEP::DB> db(STEP::ReadFileHeader(fileStream));
+ const STEP::HeaderInfo& head = static_cast<const STEP::DB&>(*db).GetHeader();
+ if (!head.fileSchema.size() || head.fileSchema != StepFileSchema) {
+ DeadlyImportError("Unrecognized file schema: " + head.fileSchema);
+ }
+}
+
+} // Namespace StepFile
+} // Namespace Assimp
+
+#endif // ASSIMP_BUILD_NO_STEP_IMPORTER
+
diff --git a/code/Importer/StepFile/StepFileImporter.h b/code/Importer/StepFile/StepFileImporter.h
new file mode 100644
index 000000000..68d5a09ad
--- /dev/null
+++ b/code/Importer/StepFile/StepFileImporter.h
@@ -0,0 +1,69 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2018, assimp 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 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.
+---------------------------------------------------------------------------
+*/
+
+#pragma once
+
+#ifndef ASSIMP_BUILD_NO_STEP_IMPORTER
+
+#include <assimp/BaseImporter.h>
+
+namespace Assimp {
+namespace StepFile {
+
+class StepFileImporter : public BaseImporter {
+public:
+ StepFileImporter();
+ ~StepFileImporter();
+ bool CanRead(const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const override;
+ const aiImporterDesc* GetInfo() const override;
+
+protected:
+ void InternReadFile( const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler ) override;
+
+private:
+};
+
+} // Namespace StepFile
+} // Namespace Assimp
+
+#endif // ASSIMP_BUILD_NO_STEP_IMPORTER
diff --git a/code/Importer/StepFile/StepReaderGen.h b/code/Importer/StepFile/StepReaderGen.h
new file mode 100644
index 000000000..21f2518df
--- /dev/null
+++ b/code/Importer/StepFile/StepReaderGen.h
@@ -0,0 +1,7288 @@
+/*
+Open Asset Import Library (ASSIMP)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2018, 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_STEPFILE_READER_GEN_H
+#define INCLUDED_STEPFILE_READER_GEN_H
+
+#include "code/STEPFile.h"
+
+namespace Assimp {
+namespace StepFile {
+ using namespace STEP;
+ using namespace STEP::EXPRESS;
+
+
+ struct NotImplemented : public ObjectHelper<NotImplemented,0> {
+
+ };
+
+
+ // ******************************************************************************
+ // StepFile Custom data types
+ // ******************************************************************************
+
+
+ // C++ wrapper type for absorbed_dose_measure
+ typedef REAL absorbed_dose_measure;
+ // C++ wrapper type for acceleration_measure
+ typedef REAL acceleration_measure;
+ // C++ wrapper type for action_items
+ typedef SELECT action_items;
+ // C++ wrapper type for action_method_items
+ typedef SELECT action_method_items;
+ // C++ wrapper type for action_request_item
+ typedef SELECT action_request_item;
+ // C++ wrapper type for ahead_or_behind
+ typedef ENUMERATION ahead_or_behind;
+ // C++ wrapper type for amount_of_substance_measure
+ typedef REAL amount_of_substance_measure;
+ // C++ wrapper type for angle_direction_reference_select
+ typedef SELECT angle_direction_reference_select;
+ // C++ wrapper type for angle_direction_reference_with_a2p3d_select
+ typedef SELECT angle_direction_reference_with_a2p3d_select;
+ // C++ wrapper type for angle_relator
+ typedef ENUMERATION angle_relator;
+ // C++ wrapper type for annotation_plane_element
+ typedef SELECT annotation_plane_element;
+ // C++ wrapper type for annotation_representation_select
+ typedef SELECT annotation_representation_select;
+ // C++ wrapper type for annotation_symbol_occurrence_item
+ typedef SELECT annotation_symbol_occurrence_item;
+ // C++ wrapper type for annotation_text_occurrence_item
+ typedef SELECT annotation_text_occurrence_item;
+ // C++ wrapper type for approval_item
+ typedef SELECT approval_item;
+ // C++ wrapper type for approved_item
+ typedef SELECT approved_item;
+ // C++ wrapper type for area_measure
+ typedef REAL area_measure;
+ // C++ wrapper type for area_or_view
+ typedef SELECT area_or_view;
+ // C++ wrapper type for attribute_classification_item
+ typedef SELECT attribute_classification_item;
+ // C++ wrapper type for attribute_language_item
+ typedef SELECT attribute_language_item;
+ // C++ wrapper type for attribute_type
+ typedef SELECT attribute_type;
+ // C++ wrapper type for axis2_placement
+ typedef SELECT axis2_placement;
+ // C++ wrapper type for b_spline_curve_form
+ typedef ENUMERATION b_spline_curve_form;
+ // C++ wrapper type for b_spline_surface_form
+ typedef ENUMERATION b_spline_surface_form;
+ // C++ wrapper type for base_solid_select
+ typedef SELECT base_solid_select;
+ // C++ wrapper type for blend_end_condition_select
+ typedef SELECT blend_end_condition_select;
+ // C++ wrapper type for blend_radius_variation_type
+ typedef ENUMERATION blend_radius_variation_type;
+ // C++ wrapper type for boolean_operand
+ typedef SELECT boolean_operand;
+ // C++ wrapper type for boolean_operator
+ typedef ENUMERATION boolean_operator;
+ // C++ wrapper type for box_characteristic_select
+ typedef SELECT box_characteristic_select;
+ // C++ wrapper type for box_height
+ typedef REAL box_height;
+ // C++ wrapper type for box_rotate_angle
+ typedef REAL box_rotate_angle;
+ // C++ wrapper type for box_slant_angle
+ typedef REAL box_slant_angle;
+ // C++ wrapper type for box_width
+ typedef REAL box_width;
+ // C++ wrapper type for camera_model_d3_multi_clipping_interection_select
+ typedef SELECT camera_model_d3_multi_clipping_interection_select;
+ // C++ wrapper type for camera_model_d3_multi_clipping_union_select
+ typedef SELECT camera_model_d3_multi_clipping_union_select;
+ // C++ wrapper type for capacitance_measure
+ typedef REAL capacitance_measure;
+ // C++ wrapper type for category_usage_item
+ typedef SELECT category_usage_item;
+ // C++ wrapper type for cc_classified_item
+ typedef SELECT cc_classified_item;
+ // C++ wrapper type for cc_person_organization_item
+ typedef SELECT cc_person_organization_item;
+ // C++ wrapper type for cc_specified_item
+ typedef SELECT cc_specified_item;
+ // C++ wrapper type for celsius_temperature_measure
+ typedef REAL celsius_temperature_measure;
+ // C++ wrapper type for central_or_parallel
+ typedef ENUMERATION central_or_parallel;
+ // C++ wrapper type for certification_item
+ typedef SELECT certification_item;
+ // C++ wrapper type for certified_item
+ typedef SELECT certified_item;
+ // C++ wrapper type for change_request_item
+ typedef SELECT change_request_item;
+ // C++ wrapper type for character_spacing_select
+ typedef SELECT character_spacing_select;
+ // C++ wrapper type for character_style_select
+ typedef SELECT character_style_select;
+ // C++ wrapper type for characterized_action_definition
+ typedef SELECT characterized_action_definition;
+ // C++ wrapper type for characterized_definition
+ typedef SELECT characterized_definition;
+ // C++ wrapper type for characterized_material_property
+ typedef SELECT characterized_material_property;
+ // C++ wrapper type for characterized_product_composition_value
+ typedef SELECT characterized_product_composition_value;
+ // C++ wrapper type for characterized_product_definition
+ typedef SELECT characterized_product_definition;
+ // C++ wrapper type for class_usage_effectivity_context_item
+ typedef SELECT class_usage_effectivity_context_item;
+ // C++ wrapper type for classification_item
+ typedef SELECT classification_item;
+ // C++ wrapper type for classified_item
+ typedef SELECT classified_item;
+ // C++ wrapper type for compound_item_definition
+ typedef SELECT compound_item_definition;
+ // C++ wrapper type for conductance_measure
+ typedef REAL conductance_measure;
+ // C++ wrapper type for configuration_design_item
+ typedef SELECT configuration_design_item;
+ // C++ wrapper type for configured_effectivity_context_item
+ typedef SELECT configured_effectivity_context_item;
+ // C++ wrapper type for configured_effectivity_item
+ typedef SELECT configured_effectivity_item;
+ // C++ wrapper type for constructive_geometry_representation_or_shape_represenation
+ typedef SELECT constructive_geometry_representation_or_shape_represenation;
+ // C++ wrapper type for context_dependent_measure
+ typedef REAL context_dependent_measure;
+ // C++ wrapper type for contract_item
+ typedef SELECT contract_item;
+ // C++ wrapper type for contracted_item
+ typedef SELECT contracted_item;
+ // C++ wrapper type for count_measure
+ typedef NUMBER count_measure;
+ // C++ wrapper type for csg_primitive
+ typedef SELECT csg_primitive;
+ // C++ wrapper type for csg_select
+ typedef SELECT csg_select;
+ // C++ wrapper type for curve_font_or_scaled_curve_font_select
+ typedef SELECT curve_font_or_scaled_curve_font_select;
+ // C++ wrapper type for curve_on_surface
+ typedef SELECT curve_on_surface;
+ // C++ wrapper type for curve_or_annotation_curve_occurrence
+ typedef SELECT curve_or_annotation_curve_occurrence;
+ // C++ wrapper type for curve_or_render
+ typedef SELECT curve_or_render;
+ // C++ wrapper type for curve_style_font_select
+ typedef SELECT curve_style_font_select;
+ // C++ wrapper type for date_and_time_item
+ typedef SELECT date_and_time_item;
+ // C++ wrapper type for date_item
+ typedef SELECT date_item;
+ // C++ wrapper type for date_time_item
+ typedef SELECT date_time_item;
+ // C++ wrapper type for date_time_or_event_occurrence
+ typedef SELECT date_time_or_event_occurrence;
+ // C++ wrapper type for date_time_select
+ typedef SELECT date_time_select;
+ // C++ wrapper type for day_in_month_number
+ typedef INTEGER day_in_month_number;
+ // C++ wrapper type for day_in_week_number
+ typedef INTEGER day_in_week_number;
+ // C++ wrapper type for day_in_year_number
+ typedef INTEGER day_in_year_number;
+ // C++ wrapper type for defined_symbol_select
+ typedef SELECT defined_symbol_select;
+ // C++ wrapper type for derived_property_select
+ typedef SELECT derived_property_select;
+ // C++ wrapper type for description_attribute_select
+ typedef SELECT description_attribute_select;
+ // C++ wrapper type for descriptive_measure
+ typedef STRING descriptive_measure;
+ // C++ wrapper type for dimension_count
+ typedef INTEGER dimension_count;
+ // C++ wrapper type for dimension_extent_usage
+ typedef ENUMERATION dimension_extent_usage;
+ // C++ wrapper type for dimensional_characteristic
+ typedef SELECT dimensional_characteristic;
+ // C++ wrapper type for direction_count_select
+ typedef SELECT direction_count_select;
+ // C++ wrapper type for document_identifier_assigned_item
+ typedef SELECT document_identifier_assigned_item;
+ // C++ wrapper type for document_reference_item
+ typedef SELECT document_reference_item;
+ // C++ wrapper type for dose_equivalent_measure
+ typedef REAL dose_equivalent_measure;
+ // C++ wrapper type for draughting_callout_element
+ typedef SELECT draughting_callout_element;
+ // C++ wrapper type for draughting_model_item_association_select
+ typedef SELECT draughting_model_item_association_select;
+ // C++ wrapper type for draughting_model_item_select
+ typedef SELECT draughting_model_item_select;
+ // C++ wrapper type for draughting_titled_item
+ typedef SELECT draughting_titled_item;
+ // C++ wrapper type for effectivity_item
+ typedef SELECT effectivity_item;
+ // C++ wrapper type for electric_charge_measure
+ typedef REAL electric_charge_measure;
+ // C++ wrapper type for electric_current_measure
+ typedef REAL electric_current_measure;
+ // C++ wrapper type for electric_potential_measure
+ typedef REAL electric_potential_measure;
+ // C++ wrapper type for energy_measure
+ typedef REAL energy_measure;
+ // C++ wrapper type for event_occurrence_item
+ typedef SELECT event_occurrence_item;
+ // C++ wrapper type for external_identification_item
+ typedef SELECT external_identification_item;
+ // C++ wrapper type for fill_area_style_tile_shape_select
+ typedef SELECT fill_area_style_tile_shape_select;
+ // C++ wrapper type for fill_style_select
+ typedef SELECT fill_style_select;
+ // C++ wrapper type for font_select
+ typedef SELECT font_select;
+ // C++ wrapper type for force_measure
+ typedef REAL force_measure;
+ // C++ wrapper type for founded_item_select
+ typedef SELECT founded_item_select;
+ // C++ wrapper type for frequency_measure
+ typedef REAL frequency_measure;
+ // C++ wrapper type for generalized_surface_select
+ typedef SELECT generalized_surface_select;
+ // C++ wrapper type for geometric_item_specific_usage_select
+ typedef SELECT geometric_item_specific_usage_select;
+ // C++ wrapper type for geometric_set_select
+ typedef SELECT geometric_set_select;
+ // C++ wrapper type for groupable_item
+ typedef SELECT groupable_item;
+ // C++ wrapper type for hour_in_day
+ typedef INTEGER hour_in_day;
+ // C++ wrapper type for id_attribute_select
+ typedef SELECT id_attribute_select;
+ // C++ wrapper type for identification_item
+ typedef SELECT identification_item;
+ // C++ wrapper type for identifier
+ typedef STRING identifier;
+ // C++ wrapper type for illuminance_measure
+ typedef REAL illuminance_measure;
+ // C++ wrapper type for inductance_measure
+ typedef REAL inductance_measure;
+ // C++ wrapper type for instance_usage_context_select
+ typedef SELECT instance_usage_context_select;
+ // C++ wrapper type for invisibility_context
+ typedef SELECT invisibility_context;
+ // C++ wrapper type for invisible_item
+ typedef SELECT invisible_item;
+ // C++ wrapper type for ir_usage_item
+ typedef SELECT ir_usage_item;
+ // C++ wrapper type for knot_type
+ typedef ENUMERATION knot_type;
+ // C++ wrapper type for label
+ typedef STRING label;
+ // C++ wrapper type for layered_item
+ typedef SELECT layered_item;
+ // C++ wrapper type for length_measure
+ typedef REAL length_measure;
+ // C++ wrapper type for limit_condition
+ typedef ENUMERATION limit_condition;
+ // C++ wrapper type for list_of_reversible_topology_item
+ typedef ListOf< SELECT, 0, 0 > list_of_reversible_topology_item;
+ // C++ wrapper type for luminous_flux_measure
+ typedef REAL luminous_flux_measure;
+ // C++ wrapper type for luminous_intensity_measure
+ typedef REAL luminous_intensity_measure;
+ // C++ wrapper type for magnetic_flux_density_measure
+ typedef REAL magnetic_flux_density_measure;
+ // C++ wrapper type for magnetic_flux_measure
+ typedef REAL magnetic_flux_measure;
+ // C++ wrapper type for marker_select
+ typedef SELECT marker_select;
+ // C++ wrapper type for marker_type
+ typedef ENUMERATION marker_type;
+ // C++ wrapper type for mass_measure
+ typedef REAL mass_measure;
+ // C++ wrapper type for measure_value
+ typedef SELECT measure_value;
+ // C++ wrapper type for mechanical_design_and_draughting_relationship_select
+ typedef SELECT mechanical_design_and_draughting_relationship_select;
+ // C++ wrapper type for mechanical_design_geometric_presentation_area_items
+ typedef SELECT mechanical_design_geometric_presentation_area_items;
+ // C++ wrapper type for mechanical_design_geometric_presentation_representation_items
+ typedef SELECT mechanical_design_geometric_presentation_representation_items;
+ // C++ wrapper type for message
+ typedef STRING message;
+ // C++ wrapper type for minute_in_hour
+ typedef INTEGER minute_in_hour;
+ // C++ wrapper type for month_in_year_number
+ typedef INTEGER month_in_year_number;
+ // C++ wrapper type for multi_language_attribute_item
+ typedef SELECT multi_language_attribute_item;
+ // C++ wrapper type for name_attribute_select
+ typedef SELECT name_attribute_select;
+ // C++ wrapper type for name_item
+ typedef SELECT name_item;
+ // C++ wrapper type for non_negative_length_measure
+ typedef REAL non_negative_length_measure;
+ // C++ wrapper type for nonnegative_integer
+ typedef INTEGER nonnegative_integer;
+ // C++ wrapper type for null_style
+ typedef ENUMERATION null_style;
+ // C++ wrapper type for numeric_measure
+ typedef NUMBER numeric_measure;
+ // C++ wrapper type for organization_item
+ typedef SELECT organization_item;
+ // C++ wrapper type for orientation_basis_select
+ typedef SELECT orientation_basis_select;
+ // C++ wrapper type for parameter_value
+ typedef REAL parameter_value;
+ // C++ wrapper type for pcurve_or_surface
+ typedef SELECT pcurve_or_surface;
+ // C++ wrapper type for person_and_organization_item
+ typedef SELECT person_and_organization_item;
+ // C++ wrapper type for person_organization_select
+ typedef SELECT person_organization_select;
+ // C++ wrapper type for picture_representation_item_select
+ typedef SELECT picture_representation_item_select;
+ // C++ wrapper type for plane_angle_measure
+ typedef REAL plane_angle_measure;
+ // C++ wrapper type for plane_or_planar_box
+ typedef SELECT plane_or_planar_box;
+ // C++ wrapper type for point_and_vector_member
+ typedef SELECT point_and_vector_member;
+ // C++ wrapper type for point_and_vector_members
+ typedef ListOf< SELECT, 2, 3 > point_and_vector_members;
+ // C++ wrapper type for positive_integer
+ typedef INTEGER positive_integer;
+ // C++ wrapper type for positive_length_measure
+ typedef REAL positive_length_measure;
+ // C++ wrapper type for positive_plane_angle_measure
+ typedef REAL positive_plane_angle_measure;
+ // C++ wrapper type for positive_ratio_measure
+ typedef REAL positive_ratio_measure;
+ // C++ wrapper type for power_measure
+ typedef REAL power_measure;
+ // C++ wrapper type for preferred_surface_curve_representation
+ typedef ENUMERATION preferred_surface_curve_representation;
+ // C++ wrapper type for presentable_text
+ typedef STRING presentable_text;
+ // C++ wrapper type for presentation_representation_select
+ typedef SELECT presentation_representation_select;
+ // C++ wrapper type for presentation_size_assignment_select
+ typedef SELECT presentation_size_assignment_select;
+ // C++ wrapper type for presentation_style_select
+ typedef SELECT presentation_style_select;
+ // C++ wrapper type for presented_item_select
+ typedef SELECT presented_item_select;
+ // C++ wrapper type for pressure_measure
+ typedef REAL pressure_measure;
+ // C++ wrapper type for product_definition_or_assembly_relationship
+ typedef SELECT product_definition_or_assembly_relationship;
+ // C++ wrapper type for product_definition_or_breakdown_element_usage
+ typedef SELECT product_definition_or_breakdown_element_usage;
+ // C++ wrapper type for product_definition_or_product_definition_relationship
+ typedef SELECT product_definition_or_product_definition_relationship;
+ // C++ wrapper type for product_or_formation_or_definition
+ typedef SELECT product_or_formation_or_definition;
+ // C++ wrapper type for project_item
+ typedef SELECT project_item;
+ // C++ wrapper type for radioactivity_measure
+ typedef REAL radioactivity_measure;
+ // C++ wrapper type for ratio_measure
+ typedef REAL ratio_measure;
+ // C++ wrapper type for rendering_properties_select
+ typedef SELECT rendering_properties_select;
+ // C++ wrapper type for represented_definition
+ typedef SELECT represented_definition;
+ // C++ wrapper type for requirement_assigned_item
+ typedef SELECT requirement_assigned_item;
+ // C++ wrapper type for requirement_satisfaction_item
+ typedef SELECT requirement_satisfaction_item;
+ // C++ wrapper type for requirement_source_item
+ typedef SELECT requirement_source_item;
+ // C++ wrapper type for resistance_measure
+ typedef REAL resistance_measure;
+ // C++ wrapper type for reversible_topology
+ typedef SELECT reversible_topology;
+ // C++ wrapper type for reversible_topology_item
+ typedef SELECT reversible_topology_item;
+ // C++ wrapper type for role_select
+ typedef SELECT role_select;
+ // C++ wrapper type for rule_superseded_item
+ typedef SELECT rule_superseded_item;
+ // C++ wrapper type for second_in_minute
+ typedef REAL second_in_minute;
+ // C++ wrapper type for security_classification_item
+ typedef SELECT security_classification_item;
+ // C++ wrapper type for set_of_reversible_topology_item
+ typedef ListOf< SELECT, 0, 0 > set_of_reversible_topology_item;
+ // C++ wrapper type for shading_curve_method
+ typedef ENUMERATION shading_curve_method;
+ // C++ wrapper type for shading_surface_method
+ typedef ENUMERATION shading_surface_method;
+ // C++ wrapper type for shape_definition
+ typedef SELECT shape_definition;
+ // C++ wrapper type for shell
+ typedef SELECT shell;
+ // C++ wrapper type for si_prefix
+ typedef ENUMERATION si_prefix;
+ // C++ wrapper type for si_unit_name
+ typedef ENUMERATION si_unit_name;
+ // C++ wrapper type for size_select
+ typedef SELECT size_select;
+ // C++ wrapper type for sketch_basis_select
+ typedef SELECT sketch_basis_select;
+ // C++ wrapper type for solid_angle_measure
+ typedef REAL solid_angle_measure;
+ // C++ wrapper type for source
+ typedef ENUMERATION source;
+ // C++ wrapper type for source_item
+ typedef SELECT source_item;
+ // C++ wrapper type for start_request_item
+ typedef SELECT start_request_item;
+ // C++ wrapper type for string_representation_item_select
+ typedef SELECT string_representation_item_select;
+ // C++ wrapper type for style_context_select
+ typedef SELECT style_context_select;
+ // C++ wrapper type for surface_side
+ typedef ENUMERATION surface_side;
+ // C++ wrapper type for surface_side_style_select
+ typedef SELECT surface_side_style_select;
+ // C++ wrapper type for surface_style_element_select
+ typedef SELECT surface_style_element_select;
+ // C++ wrapper type for symbol_style_select
+ typedef SELECT symbol_style_select;
+ // C++ wrapper type for text
+ typedef STRING text;
+ // C++ wrapper type for text_alignment
+ typedef STRING text_alignment;
+ // C++ wrapper type for text_delineation
+ typedef STRING text_delineation;
+ // C++ wrapper type for text_or_character
+ typedef SELECT text_or_character;
+ // C++ wrapper type for text_path
+ typedef ENUMERATION text_path;
+ // C++ wrapper type for text_string_representation_item
+ typedef SELECT text_string_representation_item;
+ // C++ wrapper type for thermodynamic_temperature_measure
+ typedef REAL thermodynamic_temperature_measure;
+ // C++ wrapper type for time_interval_item
+ typedef SELECT time_interval_item;
+ // C++ wrapper type for time_measure
+ typedef REAL time_measure;
+ // C++ wrapper type for tolerance_method_definition
+ typedef SELECT tolerance_method_definition;
+ // C++ wrapper type for transformation
+ typedef SELECT transformation;
+ // C++ wrapper type for transition_code
+ typedef ENUMERATION transition_code;
+ // C++ wrapper type for trim_condition_select
+ typedef SELECT trim_condition_select;
+ // C++ wrapper type for trim_intent
+ typedef ENUMERATION trim_intent;
+ // C++ wrapper type for trimming_preference
+ typedef ENUMERATION trimming_preference;
+ // C++ wrapper type for trimming_select
+ typedef SELECT trimming_select;
+ // C++ wrapper type for u_direction_count
+ typedef INTEGER u_direction_count;
+ // C++ wrapper type for unit
+ typedef SELECT unit;
+ // C++ wrapper type for v_direction_count
+ typedef INTEGER v_direction_count;
+ // C++ wrapper type for value_qualifier
+ typedef SELECT value_qualifier;
+ // C++ wrapper type for vector_or_direction
+ typedef SELECT vector_or_direction;
+ // C++ wrapper type for velocity_measure
+ typedef REAL velocity_measure;
+ // C++ wrapper type for volume_measure
+ typedef REAL volume_measure;
+ // C++ wrapper type for week_in_year_number
+ typedef INTEGER week_in_year_number;
+ // C++ wrapper type for work_item
+ typedef SELECT work_item;
+ // C++ wrapper type for year_number
+ typedef INTEGER year_number;
+
+
+ // ******************************************************************************
+ // StepFile Entities
+ // ******************************************************************************
+
+ struct measure_with_unit;
+ struct absorbed_dose_measure_with_unit;
+ struct derived_unit;
+ struct absorbed_dose_unit;
+ struct abstract_variable;
+ struct acceleration_measure_with_unit;
+ struct acceleration_unit;
+ struct action;
+ struct action_assignment;
+ typedef NotImplemented action_directive; // (not currently used by Assimp)
+ struct action_method;
+ struct action_method_assignment;
+ struct action_method_relationship;
+ typedef NotImplemented action_method_role; // (not currently used by Assimp)
+ typedef NotImplemented action_property; // (not currently used by Assimp)
+ typedef NotImplemented action_property_representation; // (not currently used by Assimp)
+ typedef NotImplemented action_relationship; // (not currently used by Assimp)
+ struct action_request_assignment;
+ typedef NotImplemented action_request_solution; // (not currently used by Assimp)
+ typedef NotImplemented action_request_status; // (not currently used by Assimp)
+ typedef NotImplemented action_status; // (not currently used by Assimp)
+ struct address;
+ struct representation;
+ struct shape_representation;
+ struct advanced_brep_shape_representation;
+ struct face_surface;
+ struct advanced_face;
+ typedef NotImplemented alternate_product_relationship; // (not currently used by Assimp)
+ struct amount_of_substance_measure_with_unit;
+ struct named_unit;
+ struct amount_of_substance_unit;
+ struct angle_direction_reference;
+ struct representation_item;
+ struct geometric_representation_item;
+ struct draughting_callout;
+ struct dimension_curve_directed_callout;
+ struct angular_dimension;
+ struct shape_aspect_relationship;
+ struct dimensional_location;
+ struct angular_location;
+ struct dimensional_size;
+ struct angular_size;
+ struct geometric_tolerance;
+ struct geometric_tolerance_with_datum_reference;
+ struct angularity_tolerance;
+ struct styled_item;
+ struct annotation_occurrence;
+ struct annotation_curve_occurrence;
+ struct annotation_fill_area;
+ struct annotation_fill_area_occurrence;
+ struct annotation_occurrence_relationship;
+ struct annotation_occurrence_associativity;
+ struct annotation_plane;
+ struct annotation_symbol_occurrence;
+ struct annotation_subfigure_occurrence;
+ struct mapped_item;
+ struct annotation_symbol;
+ struct annotation_text;
+ struct annotation_text_character;
+ struct annotation_text_occurrence;
+ struct shape_aspect;
+ struct derived_shape_aspect;
+ struct apex;
+ typedef NotImplemented application_context; // (not currently used by Assimp)
+ struct application_context_element;
+ typedef NotImplemented application_protocol_definition; // (not currently used by Assimp)
+ struct applied_action_assignment;
+ struct applied_action_method_assignment;
+ struct applied_action_request_assignment;
+ struct approval_assignment;
+ struct applied_approval_assignment;
+ struct attribute_classification_assignment;
+ struct applied_attribute_classification_assignment;
+ struct certification_assignment;
+ struct applied_certification_assignment;
+ struct classification_assignment;
+ struct applied_classification_assignment;
+ struct contract_assignment;
+ struct applied_contract_assignment;
+ struct date_and_time_assignment;
+ struct applied_date_and_time_assignment;
+ struct date_assignment;
+ struct applied_date_assignment;
+ struct document_reference;
+ struct applied_document_reference;
+ struct document_usage_constraint_assignment;
+ struct applied_document_usage_constraint_assignment;
+ struct effectivity_assignment;
+ struct applied_effectivity_assignment;
+ struct event_occurrence_assignment;
+ struct applied_event_occurrence_assignment;
+ struct identification_assignment;
+ struct external_identification_assignment;
+ struct applied_external_identification_assignment;
+ struct group_assignment;
+ struct applied_group_assignment;
+ struct applied_identification_assignment;
+ struct name_assignment;
+ struct applied_name_assignment;
+ struct organization_assignment;
+ struct applied_organization_assignment;
+ struct organizational_project_assignment;
+ struct applied_organizational_project_assignment;
+ struct person_and_organization_assignment;
+ struct applied_person_and_organization_assignment;
+ struct presented_item;
+ struct applied_presented_item;
+ struct security_classification_assignment;
+ struct applied_security_classification_assignment;
+ struct time_interval_assignment;
+ struct applied_time_interval_assignment;
+ struct applied_usage_right;
+ typedef NotImplemented approval; // (not currently used by Assimp)
+ typedef NotImplemented approval_date_time; // (not currently used by Assimp)
+ typedef NotImplemented approval_person_organization; // (not currently used by Assimp)
+ typedef NotImplemented approval_relationship; // (not currently used by Assimp)
+ typedef NotImplemented approval_role; // (not currently used by Assimp)
+ typedef NotImplemented approval_status; // (not currently used by Assimp)
+ struct area_in_set;
+ struct area_measure_with_unit;
+ struct area_unit;
+ struct product_definition_relationship;
+ struct product_definition_usage;
+ struct assembly_component_usage;
+ typedef NotImplemented assembly_component_usage_substitute; // (not currently used by Assimp)
+ struct assigned_requirement;
+ struct compound_representation_item;
+ struct atomic_formula;
+ struct attribute_assertion;
+ struct attribute_language_assignment;
+ struct attribute_value_assignment;
+ typedef NotImplemented attribute_value_role; // (not currently used by Assimp)
+ struct auxiliary_geometric_representation_item;
+ struct placement;
+ struct axis1_placement;
+ struct axis2_placement_2d;
+ struct axis2_placement_3d;
+ struct curve;
+ struct bounded_curve;
+ struct b_spline_curve;
+ struct b_spline_curve_with_knots;
+ struct surface;
+ struct bounded_surface;
+ struct b_spline_surface;
+ struct b_spline_surface_with_knots;
+ struct product_definition;
+ struct rule_software_definition;
+ struct rule_definition;
+ struct back_chaining_rule;
+ struct back_chaining_rule_body;
+ struct colour;
+ struct background_colour;
+ struct beveled_sheet_representation;
+ struct bezier_curve;
+ struct bezier_surface;
+ struct generic_expression;
+ struct binary_generic_expression;
+ struct binary_numeric_expression;
+ struct binary_representation_item;
+ struct block;
+ struct expression;
+ struct boolean_expression;
+ struct boolean_literal;
+ struct boolean_representation_item;
+ struct boolean_result;
+ struct composite_curve;
+ struct composite_curve_on_surface;
+ struct boundary_curve;
+ struct bounded_pcurve;
+ struct bounded_surface_curve;
+ struct founded_item;
+ struct box_domain;
+ struct half_space_solid;
+ struct boxed_half_space;
+ struct breakdown_context;
+ struct breakdown_element_group_assignment;
+ struct breakdown_element_realization;
+ struct breakdown_element_usage;
+ struct breakdown_of;
+ struct solid_model;
+ struct manifold_solid_brep;
+ struct brep_with_voids;
+ struct bytes_representation_item;
+ struct date;
+ struct calendar_date;
+ struct camera_image;
+ struct camera_image_3d_with_scale;
+ struct camera_model;
+ struct camera_model_d3;
+ struct camera_model_d3_multi_clipping;
+ struct camera_model_d3_multi_clipping_intersection;
+ struct camera_model_d3_multi_clipping_union;
+ struct camera_model_d3_with_hlhsr;
+ struct camera_model_with_light_sources;
+ struct representation_map;
+ struct camera_usage;
+ struct capacitance_measure_with_unit;
+ struct capacitance_unit;
+ struct point;
+ struct cartesian_point;
+ struct cartesian_transformation_operator;
+ struct cartesian_transformation_operator_2d;
+ struct cartesian_transformation_operator_3d;
+ struct cc_design_approval;
+ struct cc_design_certification;
+ struct cc_design_contract;
+ struct cc_design_date_and_time_assignment;
+ struct cc_design_person_and_organization_assignment;
+ struct cc_design_security_classification;
+ struct cc_design_specification_reference;
+ struct celsius_temperature_measure_with_unit;
+ struct centre_of_symmetry;
+ typedef NotImplemented certification; // (not currently used by Assimp)
+ typedef NotImplemented certification_type; // (not currently used by Assimp)
+ struct change;
+ struct change_request;
+ typedef NotImplemented character_glyph_font_usage; // (not currently used by Assimp)
+ struct character_glyph_style_outline;
+ struct character_glyph_style_stroke;
+ struct symbol_representation;
+ struct generic_character_glyph_symbol;
+ struct character_glyph_symbol;
+ struct character_glyph_symbol_outline;
+ struct character_glyph_symbol_stroke;
+ struct general_property;
+ struct characteristic_data_column_header;
+ struct general_property_relationship;
+ struct characteristic_data_column_header_link;
+ struct characteristic_data_table_header;
+ struct characteristic_data_table_header_decomposition;
+ struct group;
+ struct characteristic_type;
+ struct characterized_class;
+ struct characterized_object;
+ struct conic;
+ struct circle;
+ struct circular_runout_tolerance;
+ typedef NotImplemented class_t; // (not currently used by Assimp)
+ struct class_by_extension;
+ struct class_by_intension;
+ struct class_system;
+ struct effectivity_context_assignment;
+ struct class_usage_effectivity_context_assignment;
+ typedef NotImplemented classification_role; // (not currently used by Assimp)
+ struct topological_representation_item;
+ struct connected_face_set;
+ struct closed_shell;
+ struct coaxiality_tolerance;
+ struct colour_specification;
+ struct colour_rgb;
+ struct common_datum;
+ struct comparison_expression;
+ struct complex_clause;
+ struct complex_conjunctive_clause;
+ struct complex_disjunctive_clause;
+ struct modified_solid;
+ struct shelled_solid;
+ struct complex_shelled_solid;
+ struct composite_assembly_definition;
+ struct composite_assembly_sequence_definition;
+ struct laminate_table;
+ struct part_laminate_table;
+ struct composite_assembly_table;
+ struct composite_curve_segment;
+ struct material_designation;
+ struct composite_material_designation;
+ struct composite_shape_aspect;
+ struct composite_sheet_representation;
+ struct composite_text;
+ struct composite_text_with_associated_curves;
+ struct composite_text_with_blanking_box;
+ struct composite_text_with_delineation;
+ struct composite_text_with_extent;
+ struct compound_shape_representation;
+ struct concentricity_tolerance;
+ typedef NotImplemented concept_feature_operator; // (not currently used by Assimp)
+ struct concept_feature_relationship;
+ struct concept_feature_relationship_with_condition;
+ struct product_concept_feature;
+ struct conditional_concept_feature;
+ struct conductance_measure_with_unit;
+ struct conductance_unit;
+ struct configuration_item;
+ struct configurable_item;
+ typedef NotImplemented configuration_design; // (not currently used by Assimp)
+ struct effectivity;
+ struct product_definition_effectivity;
+ struct configuration_effectivity;
+ struct configuration_item_relationship;
+ struct configuration_item_hierarchical_relationship;
+ struct configuration_item_revision_sequence;
+ struct configured_effectivity_assignment;
+ struct configured_effectivity_context_assignment;
+ struct conical_stepped_hole_transition;
+ struct elementary_surface;
+ struct conical_surface;
+ struct connected_edge_set;
+ struct connected_face_sub_set;
+ struct constructive_geometry_representation;
+ struct representation_relationship;
+ struct constructive_geometry_representation_relationship;
+ struct contact_ratio_representation;
+ struct invisibility;
+ struct context_dependent_invisibility;
+ struct over_riding_styled_item;
+ struct context_dependent_over_riding_styled_item;
+ typedef NotImplemented context_dependent_shape_representation; // (not currently used by Assimp)
+ struct context_dependent_unit;
+ typedef NotImplemented contract; // (not currently used by Assimp)
+ typedef NotImplemented contract_relationship; // (not currently used by Assimp)
+ typedef NotImplemented contract_type; // (not currently used by Assimp)
+ struct conversion_based_unit;
+ typedef NotImplemented coordinated_universal_time_offset; // (not currently used by Assimp)
+ struct csg_shape_representation;
+ struct csg_solid;
+ struct currency;
+ struct currency_measure_with_unit;
+ struct curve_bounded_surface;
+ struct curve_dimension;
+ struct curve_replica;
+ struct curve_style;
+ struct curve_style_font;
+ struct curve_style_font_and_scaling;
+ struct curve_style_font_pattern;
+ typedef NotImplemented curve_style_rendering; // (not currently used by Assimp)
+ struct curve_swept_solid_shape_representation;
+ struct cylindrical_surface;
+ struct cylindricity_tolerance;
+ typedef NotImplemented data_environment; // (not currently used by Assimp)
+ typedef NotImplemented date_and_time; // (not currently used by Assimp)
+ struct date_representation_item;
+ typedef NotImplemented date_role; // (not currently used by Assimp)
+ struct date_time_representation_item;
+ typedef NotImplemented date_time_role; // (not currently used by Assimp)
+ struct dated_effectivity;
+ struct datum;
+ struct datum_feature;
+ struct datum_feature_callout;
+ struct datum_reference;
+ struct datum_target;
+ struct datum_target_callout;
+ struct default_tolerance_table;
+ struct default_tolerance_table_cell;
+ struct defined_symbol;
+ struct definitional_representation;
+ struct definitional_representation_relationship;
+ struct definitional_representation_relationship_with_same_context;
+ struct degenerate_pcurve;
+ struct toroidal_surface;
+ struct degenerate_toroidal_surface;
+ typedef NotImplemented derived_unit_element; // (not currently used by Assimp)
+ typedef NotImplemented description_attribute; // (not currently used by Assimp)
+ struct descriptive_representation_item;
+ struct product_definition_context;
+ struct design_context;
+ struct design_make_from_relationship;
+ struct diameter_dimension;
+ struct ratio_measure_with_unit;
+ struct dielectric_constant_measure_with_unit;
+ struct dimension_callout;
+ struct draughting_callout_relationship;
+ struct dimension_callout_component_relationship;
+ struct dimension_callout_relationship;
+ struct dimension_curve;
+ struct terminator_symbol;
+ struct dimension_curve_terminator;
+ struct dimension_curve_terminator_to_projection_curve_associativity;
+ struct dimension_pair;
+ typedef NotImplemented dimension_related_tolerance_zone_element; // (not currently used by Assimp)
+ struct dimension_text_associativity;
+ typedef NotImplemented dimensional_characteristic_representation; // (not currently used by Assimp)
+ typedef NotImplemented dimensional_exponents; // (not currently used by Assimp)
+ struct dimensional_location_with_path;
+ struct dimensional_size_with_path;
+ struct executed_action;
+ struct directed_action;
+ struct directed_dimensional_location;
+ struct direction;
+ typedef NotImplemented document; // (not currently used by Assimp)
+ struct document_file;
+ struct document_identifier;
+ struct document_identifier_assignment;
+ struct document_product_association;
+ struct document_product_equivalence;
+ typedef NotImplemented document_relationship; // (not currently used by Assimp)
+ typedef NotImplemented document_representation_type; // (not currently used by Assimp)
+ typedef NotImplemented document_type; // (not currently used by Assimp)
+ typedef NotImplemented document_usage_constraint; // (not currently used by Assimp)
+ typedef NotImplemented document_usage_role; // (not currently used by Assimp)
+ struct dose_equivalent_measure_with_unit;
+ struct dose_equivalent_unit;
+ struct double_offset_shelled_solid;
+ struct item_defined_transformation;
+ struct transformation_with_derived_angle;
+ struct draped_defined_transformation;
+ struct draughting_annotation_occurrence;
+ struct draughting_elements;
+ struct draughting_model;
+ struct item_identified_representation_usage;
+ struct draughting_model_item_association;
+ struct pre_defined_colour;
+ struct draughting_pre_defined_colour;
+ struct pre_defined_item;
+ struct pre_defined_curve_font;
+ struct draughting_pre_defined_curve_font;
+ struct pre_defined_text_font;
+ struct draughting_pre_defined_text_font;
+ struct draughting_subfigure_representation;
+ struct draughting_symbol_representation;
+ struct text_literal;
+ struct text_literal_with_delineation;
+ struct draughting_text_literal_with_delineation;
+ typedef NotImplemented draughting_title; // (not currently used by Assimp)
+ typedef NotImplemented drawing_definition; // (not currently used by Assimp)
+ struct presentation_set;
+ struct drawing_revision;
+ typedef NotImplemented drawing_revision_sequence; // (not currently used by Assimp)
+ struct presentation_representation;
+ struct presentation_area;
+ struct drawing_sheet_revision;
+ struct drawing_sheet_revision_sequence;
+ struct drawing_sheet_revision_usage;
+ struct edge;
+ struct edge_based_wireframe_model;
+ struct edge_based_wireframe_shape_representation;
+ struct edge_blended_solid;
+ struct edge_curve;
+ struct edge_loop;
+ typedef NotImplemented effectivity_context_role; // (not currently used by Assimp)
+ typedef NotImplemented effectivity_relationship; // (not currently used by Assimp)
+ struct electric_charge_measure_with_unit;
+ struct electric_charge_unit;
+ struct electric_current_measure_with_unit;
+ struct electric_current_unit;
+ struct electric_potential_measure_with_unit;
+ struct electric_potential_unit;
+ struct elementary_brep_shape_representation;
+ struct ellipse;
+ struct energy_measure_with_unit;
+ struct energy_unit;
+ struct property_definition;
+ struct fact_type;
+ struct entity_assertion;
+ struct enum_reference_prefix;
+ typedef NotImplemented environment; // (not currently used by Assimp)
+ struct evaluated_characteristic;
+ struct evaluated_degenerate_pcurve;
+ struct evaluation_product_definition;
+ struct event_occurrence;
+ typedef NotImplemented event_occurrence_relationship; // (not currently used by Assimp)
+ typedef NotImplemented event_occurrence_role; // (not currently used by Assimp)
+ struct product_concept_feature_category;
+ struct exclusive_product_concept_feature_category;
+ struct uncertainty_qualifier;
+ struct standard_uncertainty;
+ struct expanded_uncertainty;
+ struct representation_item_relationship;
+ struct explicit_procedural_representation_item_relationship;
+ struct explicit_procedural_geometric_representation_item_relationship;
+ struct explicit_procedural_representation_relationship;
+ struct explicit_procedural_shape_representation_relationship;
+ struct expression_conversion_based_unit;
+ struct extension;
+ struct extent;
+ struct external_source;
+ struct external_class_library;
+ typedef NotImplemented external_source_relationship; // (not currently used by Assimp)
+ struct externally_defined_class;
+ struct externally_defined_colour;
+ struct externally_defined_context_dependent_unit;
+ struct externally_defined_conversion_based_unit;
+ struct externally_defined_currency;
+ struct externally_defined_item;
+ struct externally_defined_curve_font;
+ struct externally_defined_dimension_definition;
+ struct externally_defined_general_property;
+ struct externally_defined_hatch_style;
+ typedef NotImplemented externally_defined_item_relationship; // (not currently used by Assimp)
+ struct externally_defined_marker;
+ struct picture_representation_item;
+ struct externally_defined_picture_representation_item;
+ struct externally_defined_representation_item;
+ struct externally_defined_string;
+ struct externally_defined_symbol;
+ struct externally_defined_terminator_symbol;
+ struct externally_defined_text_font;
+ struct externally_defined_tile;
+ struct externally_defined_tile_style;
+ struct swept_area_solid;
+ struct extruded_area_solid;
+ struct swept_face_solid;
+ struct extruded_face_solid;
+ struct extruded_face_solid_with_trim_conditions;
+ struct extruded_face_solid_with_draft_angle;
+ struct extruded_face_solid_with_multiple_draft_angles;
+ struct face;
+ struct face_based_surface_model;
+ struct face_bound;
+ struct face_outer_bound;
+ struct faceted_brep;
+ struct faceted_brep_shape_representation;
+ struct fill_area_style;
+ typedef NotImplemented fill_area_style_colour; // (not currently used by Assimp)
+ struct fill_area_style_hatching;
+ struct fill_area_style_tile_coloured_region;
+ struct fill_area_style_tile_curve_with_style;
+ struct fill_area_style_tile_symbol_with_style;
+ struct fill_area_style_tiles;
+ struct shape_representation_relationship;
+ struct flat_pattern_ply_representation_relationship;
+ struct flatness_tolerance;
+ struct force_measure_with_unit;
+ struct force_unit;
+ struct forward_chaining_rule;
+ struct forward_chaining_rule_premise;
+ struct frequency_measure_with_unit;
+ struct frequency_unit;
+ struct func;
+ struct functional_breakdown_context;
+ struct functional_element_usage;
+ typedef NotImplemented functionally_defined_transformation; // (not currently used by Assimp)
+ struct general_material_property;
+ typedef NotImplemented general_property_association; // (not currently used by Assimp)
+ struct simple_generic_expression;
+ struct generic_literal;
+ struct generic_variable;
+ struct geometric_alignment;
+ struct geometric_set;
+ struct geometric_curve_set;
+ struct geometric_intersection;
+ struct geometric_item_specific_usage;
+ struct geometric_model_element_relationship;
+ struct representation_context;
+ struct geometric_representation_context;
+ typedef NotImplemented geometric_tolerance_relationship; // (not currently used by Assimp)
+ struct geometric_tolerance_with_defined_unit;
+ struct geometrical_tolerance_callout;
+ struct geometrically_bounded_2d_wireframe_representation;
+ struct geometrically_bounded_surface_shape_representation;
+ struct geometrically_bounded_wireframe_shape_representation;
+ struct global_assignment;
+ struct global_uncertainty_assigned_context;
+ struct global_unit_assigned_context;
+ struct ground_fact;
+ typedef NotImplemented group_relationship; // (not currently used by Assimp)
+ struct hardness_representation;
+ struct hidden_element_over_riding_styled_item;
+ struct hyperbola;
+ typedef NotImplemented id_attribute; // (not currently used by Assimp)
+ typedef NotImplemented identification_role; // (not currently used by Assimp)
+ struct illuminance_measure_with_unit;
+ struct illuminance_unit;
+ struct included_text_block;
+ struct inclusion_product_concept_feature;
+ struct user_selected_elements;
+ struct indirectly_selected_elements;
+ struct indirectly_selected_shape_elements;
+ struct inductance_measure_with_unit;
+ struct inductance_unit;
+ struct information_right;
+ struct information_usage_right;
+ struct instance_usage_context_assignment;
+ struct instanced_feature;
+ struct literal_number;
+ struct int_literal;
+ struct integer_representation_item;
+ struct surface_curve;
+ struct intersection_curve;
+ struct interval_expression;
+ struct iso4217_currency;
+ struct known_source;
+ struct laid_defined_transformation;
+ struct language;
+ struct leader_curve;
+ struct leader_directed_callout;
+ struct leader_directed_dimension;
+ struct leader_terminator;
+ struct length_measure_with_unit;
+ struct length_unit;
+ struct light_source;
+ struct light_source_ambient;
+ struct light_source_directional;
+ struct light_source_positional;
+ struct light_source_spot;
+ typedef NotImplemented limits_and_fits; // (not currently used by Assimp)
+ struct line;
+ struct line_profile_tolerance;
+ struct linear_dimension;
+ struct simple_clause;
+ struct literal_conjunction;
+ struct literal_disjunction;
+ typedef NotImplemented local_time; // (not currently used by Assimp)
+ struct logical_literal;
+ struct logical_representation_item;
+ struct loop;
+ struct loss_tangent_measure_with_unit;
+ struct lot_effectivity;
+ struct luminous_flux_measure_with_unit;
+ struct luminous_flux_unit;
+ struct luminous_intensity_measure_with_unit;
+ struct luminous_intensity_unit;
+ struct magnetic_flux_density_measure_with_unit;
+ struct magnetic_flux_density_unit;
+ struct magnetic_flux_measure_with_unit;
+ struct magnetic_flux_unit;
+ struct make_from_usage_option;
+ struct manifold_subsurface_shape_representation;
+ struct manifold_surface_shape_representation;
+ struct mass_measure_with_unit;
+ struct mass_unit;
+ typedef NotImplemented material_designation_characterization; // (not currently used by Assimp)
+ struct material_property;
+ struct property_definition_representation;
+ struct material_property_representation;
+ typedef NotImplemented measure_qualification; // (not currently used by Assimp)
+ struct measure_representation_item;
+ struct product_context;
+ struct mechanical_context;
+ struct mechanical_design_and_draughting_relationship;
+ struct mechanical_design_geometric_presentation_area;
+ struct mechanical_design_geometric_presentation_representation;
+ struct mechanical_design_presentation_representation_with_draughting;
+ struct mechanical_design_shaded_presentation_area;
+ struct mechanical_design_shaded_presentation_representation;
+ struct min_and_major_ply_orientation_basis;
+ struct modified_geometric_tolerance;
+ struct modified_solid_with_placed_configuration;
+ struct moments_of_inertia_representation;
+ struct multi_language_attribute_assignment;
+ struct multiple_arity_boolean_expression;
+ struct multiple_arity_generic_expression;
+ struct multiple_arity_numeric_expression;
+ typedef NotImplemented name_attribute; // (not currently used by Assimp)
+ struct next_assembly_usage_occurrence;
+ struct non_manifold_surface_shape_representation;
+ struct null_representation_item;
+ struct numeric_expression;
+ typedef NotImplemented object_role; // (not currently used by Assimp)
+ struct offset_curve_2d;
+ struct offset_curve_3d;
+ struct offset_surface;
+ struct one_direction_repeat_factor;
+ struct open_shell;
+ struct ordinal_date;
+ struct projection_directed_callout;
+ struct ordinate_dimension;
+ typedef NotImplemented organization; // (not currently used by Assimp)
+ typedef NotImplemented organization_relationship; // (not currently used by Assimp)
+ typedef NotImplemented organization_role; // (not currently used by Assimp)
+ struct organizational_address;
+ typedef NotImplemented organizational_project; // (not currently used by Assimp)
+ typedef NotImplemented organizational_project_relationship; // (not currently used by Assimp)
+ typedef NotImplemented organizational_project_role; // (not currently used by Assimp)
+ struct oriented_closed_shell;
+ struct oriented_edge;
+ struct oriented_face;
+ struct oriented_open_shell;
+ struct path;
+ struct oriented_path;
+ struct oriented_surface;
+ struct outer_boundary_curve;
+ struct package_product_concept_feature;
+ struct parabola;
+ struct parallel_offset;
+ struct parallelism_tolerance;
+ struct parametric_representation_context;
+ struct partial_document_with_structured_text_representation_assignment;
+ struct pcurve;
+ struct percentage_laminate_definition;
+ struct zone_structural_makeup;
+ struct percentage_laminate_table;
+ struct percentage_ply_definition;
+ struct perpendicular_to;
+ struct perpendicularity_tolerance;
+ typedef NotImplemented person; // (not currently used by Assimp)
+ typedef NotImplemented person_and_organization; // (not currently used by Assimp)
+ struct person_and_organization_address;
+ typedef NotImplemented person_and_organization_role; // (not currently used by Assimp)
+ struct personal_address;
+ struct physical_breakdown_context;
+ struct physical_element_usage;
+ struct presentation_view;
+ struct picture_representation;
+ struct placed_datum_target_feature;
+ struct placed_feature;
+ struct planar_extent;
+ struct planar_box;
+ struct plane;
+ struct plane_angle_measure_with_unit;
+ struct plane_angle_unit;
+ typedef NotImplemented plus_minus_tolerance; // (not currently used by Assimp)
+ struct ply_laminate_definition;
+ struct ply_laminate_sequence_definition;
+ struct ply_laminate_table;
+ struct point_and_vector;
+ struct point_on_curve;
+ struct point_on_surface;
+ struct point_path;
+ struct point_replica;
+ struct point_style;
+ struct polar_complex_number_literal;
+ struct poly_loop;
+ struct polyline;
+ struct position_tolerance;
+ struct positioned_sketch;
+ struct power_measure_with_unit;
+ struct power_unit;
+ struct pre_defined_symbol;
+ struct pre_defined_dimension_symbol;
+ struct pre_defined_geometrical_tolerance_symbol;
+ struct pre_defined_marker;
+ struct pre_defined_point_marker_symbol;
+ struct pre_defined_surface_condition_symbol;
+ struct pre_defined_surface_side_style;
+ struct pre_defined_terminator_symbol;
+ struct pre_defined_tile;
+ typedef NotImplemented precision_qualifier; // (not currently used by Assimp)
+ struct predefined_picture_representation_item;
+ typedef NotImplemented presentation_layer_assignment; // (not currently used by Assimp)
+ typedef NotImplemented presentation_size; // (not currently used by Assimp)
+ struct presentation_style_assignment;
+ struct presentation_style_by_context;
+ typedef NotImplemented presented_item_representation; // (not currently used by Assimp)
+ struct pressure_measure_with_unit;
+ struct pressure_unit;
+ struct procedural_representation;
+ struct procedural_representation_sequence;
+ struct procedural_shape_representation;
+ struct procedural_shape_representation_sequence;
+ typedef NotImplemented product; // (not currently used by Assimp)
+ struct product_category;
+ struct product_class;
+ typedef NotImplemented product_concept; // (not currently used by Assimp)
+ struct product_concept_context;
+ typedef NotImplemented product_concept_feature_association; // (not currently used by Assimp)
+ struct product_concept_feature_category_usage;
+ typedef NotImplemented product_concept_relationship; // (not currently used by Assimp)
+ typedef NotImplemented product_definition_context_association; // (not currently used by Assimp)
+ typedef NotImplemented product_definition_context_role; // (not currently used by Assimp)
+ struct product_definition_element_relationship;
+ struct product_definition_formation;
+ typedef NotImplemented product_definition_formation_relationship; // (not currently used by Assimp)
+ struct product_definition_formation_with_specified_source;
+ struct product_definition_group_assignment;
+ typedef NotImplemented product_definition_occurrence_relationship; // (not currently used by Assimp)
+ struct product_definition_shape;
+ typedef NotImplemented product_definition_substitute; // (not currently used by Assimp)
+ struct product_definition_with_associated_documents;
+ struct product_identification;
+ struct product_material_composition_relationship;
+ struct product_related_product_category;
+ struct product_specification;
+ struct tolerance_zone_definition;
+ struct projected_zone_definition;
+ struct projection_curve;
+ struct promissory_usage_occurrence;
+ typedef NotImplemented property_definition_relationship; // (not currently used by Assimp)
+ struct qualified_representation_item;
+ struct qualitative_uncertainty;
+ struct quantified_assembly_component_usage;
+ struct quasi_uniform_curve;
+ struct quasi_uniform_surface;
+ struct radioactivity_measure_with_unit;
+ struct radioactivity_unit;
+ struct radius_dimension;
+ struct range_characteristic;
+ struct ratio_unit;
+ struct rational_b_spline_curve;
+ struct rational_b_spline_surface;
+ struct rational_representation_item;
+ struct real_literal;
+ struct real_representation_item;
+ struct rectangular_composite_surface;
+ struct rectangular_trimmed_surface;
+ struct referenced_modified_datum;
+ struct relative_event_occurrence;
+ struct rep_item_group;
+ struct reparametrised_composite_curve_segment;
+ struct representation_relationship_with_transformation;
+ struct requirement_assigned_object;
+ struct requirement_assignment;
+ struct requirement_source;
+ struct requirement_view_definition_relationship;
+ struct resistance_measure_with_unit;
+ struct resistance_unit;
+ struct revolved_area_solid;
+ struct revolved_face_solid;
+ struct revolved_face_solid_with_trim_conditions;
+ struct right_angular_wedge;
+ struct right_circular_cone;
+ struct right_circular_cylinder;
+ struct right_to_usage_association;
+ typedef NotImplemented role_association; // (not currently used by Assimp)
+ struct roundness_tolerance;
+ struct row_representation_item;
+ struct row_value;
+ struct row_variable;
+ struct rule_action;
+ struct rule_condition;
+ struct rule_set;
+ struct rule_set_group;
+ struct rule_superseded_assignment;
+ struct rule_supersedence;
+ struct surface_curve_swept_area_solid;
+ struct ruled_surface_swept_area_solid;
+ struct runout_zone_definition;
+ struct runout_zone_orientation;
+ struct runout_zone_orientation_reference_direction;
+ struct satisfied_requirement;
+ struct satisfies_requirement;
+ struct satisfying_item;
+ struct scalar_variable;
+ struct scattering_parameter;
+ struct sculptured_solid;
+ struct seam_curve;
+ typedef NotImplemented security_classification; // (not currently used by Assimp)
+ typedef NotImplemented security_classification_level; // (not currently used by Assimp)
+ struct serial_numbered_effectivity;
+ struct shape_aspect_associativity;
+ struct shape_aspect_deriving_relationship;
+ struct shape_definition_representation;
+ struct shape_dimension_representation;
+ struct shape_feature_definition;
+ struct shape_representation_with_parameters;
+ struct shell_based_surface_model;
+ struct shell_based_wireframe_model;
+ struct shell_based_wireframe_shape_representation;
+ struct si_absorbed_dose_unit;
+ struct si_capacitance_unit;
+ struct si_conductance_unit;
+ struct si_dose_equivalent_unit;
+ struct si_electric_charge_unit;
+ struct si_electric_potential_unit;
+ struct si_energy_unit;
+ struct si_force_unit;
+ struct si_frequency_unit;
+ struct si_illuminance_unit;
+ struct si_inductance_unit;
+ struct si_magnetic_flux_density_unit;
+ struct si_magnetic_flux_unit;
+ struct si_power_unit;
+ struct si_pressure_unit;
+ struct si_radioactivity_unit;
+ struct si_resistance_unit;
+ struct si_unit;
+ struct simple_boolean_expression;
+ struct simple_numeric_expression;
+ struct slash_expression;
+ struct smeared_material_definition;
+ struct solid_angle_measure_with_unit;
+ struct solid_angle_unit;
+ struct solid_curve_font;
+ struct solid_replica;
+ struct solid_with_chamfered_edges;
+ struct solid_with_angle_based_chamfer;
+ struct solid_with_shape_element_pattern;
+ struct solid_with_circular_pattern;
+ struct solid_with_depression;
+ struct solid_with_pocket;
+ struct solid_with_circular_pocket;
+ struct solid_with_protrusion;
+ struct solid_with_circular_protrusion;
+ struct solid_with_hole;
+ struct solid_with_stepped_round_hole;
+ struct solid_with_conical_bottom_round_hole;
+ struct solid_with_constant_radius_edge_blend;
+ struct solid_with_slot;
+ struct solid_with_curved_slot;
+ struct solid_with_double_offset_chamfer;
+ struct solid_with_flat_bottom_round_hole;
+ struct solid_with_general_pocket;
+ struct solid_with_general_protrusion;
+ struct solid_with_groove;
+ struct solid_with_incomplete_circular_pattern;
+ struct solid_with_rectangular_pattern;
+ struct solid_with_incomplete_rectangular_pattern;
+ struct solid_with_rectangular_pocket;
+ struct solid_with_rectangular_protrusion;
+ struct solid_with_single_offset_chamfer;
+ struct solid_with_spherical_bottom_round_hole;
+ struct solid_with_stepped_round_hole_and_conical_transitions;
+ struct solid_with_straight_slot;
+ struct solid_with_tee_section_slot;
+ struct solid_with_through_depression;
+ struct solid_with_trapezoidal_section_slot;
+ struct solid_with_variable_radius_edge_blend;
+ struct source_for_requirement;
+ struct sourced_requirement;
+ struct specification_definition;
+ struct specified_higher_usage_occurrence;
+ struct sphere;
+ struct spherical_surface;
+ struct start_request;
+ struct start_work;
+ struct straightness_tolerance;
+ struct structured_dimension_callout;
+ struct structured_text_composition;
+ struct structured_text_representation;
+ struct subedge;
+ struct subface;
+ struct supplied_part_relationship;
+ struct surface_condition_callout;
+ struct swept_surface;
+ struct surface_of_linear_extrusion;
+ struct surface_of_revolution;
+ struct surface_patch;
+ struct surface_profile_tolerance;
+ typedef NotImplemented surface_rendering_properties; // (not currently used by Assimp)
+ struct surface_replica;
+ struct surface_side_style;
+ struct surface_style_boundary;
+ struct surface_style_control_grid;
+ struct surface_style_fill_area;
+ struct surface_style_parameter_line;
+ struct surface_style_reflectance_ambient;
+ struct surface_style_reflectance_ambient_diffuse;
+ struct surface_style_reflectance_ambient_diffuse_specular;
+ struct surface_style_rendering;
+ struct surface_style_rendering_with_properties;
+ struct surface_style_segmentation_curve;
+ struct surface_style_silhouette;
+ typedef NotImplemented surface_style_transparent; // (not currently used by Assimp)
+ struct surface_style_usage;
+ struct surface_texture_representation;
+ struct surfaced_open_shell;
+ struct swept_disk_solid;
+ struct symbol;
+ typedef NotImplemented symbol_colour; // (not currently used by Assimp)
+ struct symbol_representation_map;
+ struct symbol_style;
+ struct symbol_target;
+ struct symmetric_shape_aspect;
+ struct symmetry_tolerance;
+ struct table_representation_item;
+ struct tactile_appearance_representation;
+ struct tagged_text_format;
+ struct tagged_text_item;
+ struct tangent;
+ typedef NotImplemented text_font; // (not currently used by Assimp)
+ typedef NotImplemented text_font_family; // (not currently used by Assimp)
+ typedef NotImplemented text_font_in_family; // (not currently used by Assimp)
+ struct text_literal_with_associated_curves;
+ struct text_literal_with_blanking_box;
+ struct text_literal_with_extent;
+ struct text_string_representation;
+ struct text_style;
+ typedef NotImplemented text_style_for_defined_font; // (not currently used by Assimp)
+ struct text_style_with_box_characteristics;
+ struct text_style_with_mirror;
+ struct text_style_with_spacing;
+ struct thermal_resistance_measure_with_unit;
+ struct thermal_resistance_unit;
+ struct thermodynamic_temperature_measure_with_unit;
+ struct thermodynamic_temperature_unit;
+ struct thickened_face_solid;
+ struct thickness_laminate_definition;
+ struct thickness_laminate_table;
+ struct time_interval;
+ struct time_interval_based_effectivity;
+ typedef NotImplemented time_interval_relationship; // (not currently used by Assimp)
+ typedef NotImplemented time_interval_role; // (not currently used by Assimp)
+ struct time_interval_with_bounds;
+ struct time_measure_with_unit;
+ struct time_unit;
+ typedef NotImplemented tolerance_value; // (not currently used by Assimp)
+ struct tolerance_zone;
+ typedef NotImplemented tolerance_zone_form; // (not currently used by Assimp)
+ struct torus;
+ struct total_runout_tolerance;
+ struct track_blended_solid;
+ struct track_blended_solid_with_end_conditions;
+ struct trimmed_curve;
+ struct two_direction_repeat_factor;
+ typedef NotImplemented type_qualifier; // (not currently used by Assimp)
+ struct unary_generic_expression;
+ struct unary_numeric_expression;
+ struct uncertainty_assigned_representation;
+ struct uncertainty_measure_with_unit;
+ struct uniform_curve;
+ struct uniform_resource_identifier;
+ struct uniform_surface;
+ struct usage_association;
+ struct user_defined_curve_font;
+ struct user_defined_marker;
+ struct user_defined_terminator_symbol;
+ struct user_selected_shape_elements;
+ struct value_range;
+ struct value_representation_item;
+ struct variable_semantics;
+ struct variational_representation_item;
+ struct vector;
+ struct vector_style;
+ struct velocity_measure_with_unit;
+ struct velocity_unit;
+ typedef NotImplemented versioned_action_request; // (not currently used by Assimp)
+ struct vertex;
+ struct vertex_loop;
+ struct vertex_point;
+ struct vertex_shell;
+ struct view_volume;
+ struct visual_appearance_representation;
+ struct volume_measure_with_unit;
+ struct volume_unit;
+ struct week_of_year_and_day_date;
+ struct wire_shell;
+ struct year_month;
+
+
+
+ // C++ wrapper for measure_with_unit
+ struct measure_with_unit : ObjectHelper<measure_with_unit,2> { measure_with_unit() : Object("measure_with_unit") {}
+ measure_value::Out value_component;
+ unit::Out unit_component;
+ };
+
+ // C++ wrapper for absorbed_dose_measure_with_unit
+ struct absorbed_dose_measure_with_unit : measure_with_unit, ObjectHelper<absorbed_dose_measure_with_unit,0> { absorbed_dose_measure_with_unit() : Object("absorbed_dose_measure_with_unit") {}
+
+ };
+
+ // C++ wrapper for derived_unit
+ struct derived_unit : ObjectHelper<derived_unit,1> { derived_unit() : Object("derived_unit") {}
+ ListOf< Lazy< NotImplemented >, 1, 0 > elements;
+ };
+
+ // C++ wrapper for absorbed_dose_unit
+ struct absorbed_dose_unit : derived_unit, ObjectHelper<absorbed_dose_unit,0> { absorbed_dose_unit() : Object("absorbed_dose_unit") {}
+
+ };
+
+ // C++ wrapper for abstract_variable
+ struct abstract_variable : ObjectHelper<abstract_variable,0> { abstract_variable() : Object("abstract_variable") {}
+
+ };
+
+ // C++ wrapper for acceleration_measure_with_unit
+ struct acceleration_measure_with_unit : measure_with_unit, ObjectHelper<acceleration_measure_with_unit,0> { acceleration_measure_with_unit() : Object("acceleration_measure_with_unit") {}
+
+ };
+
+ // C++ wrapper for acceleration_unit
+ struct acceleration_unit : derived_unit, ObjectHelper<acceleration_unit,0> { acceleration_unit() : Object("acceleration_unit") {}
+
+ };
+
+ // C++ wrapper for action
+ struct action : ObjectHelper<action,3> { action() : Object("action") {}
+ label::Out name;
+ Maybe< text::Out > description;
+ Lazy< action_method > chosen_method;
+ };
+
+ // C++ wrapper for action_assignment
+ struct action_assignment : ObjectHelper<action_assignment,1> { action_assignment() : Object("action_assignment") {}
+ Lazy< action > assigned_action;
+ };
+
+ // C++ wrapper for action_method
+ struct action_method : ObjectHelper<action_method,4> { action_method() : Object("action_method") {}
+ label::Out name;
+ Maybe< text::Out > description;
+ text::Out consequence;
+ text::Out purpose;
+ };
+
+ // C++ wrapper for action_method_assignment
+ struct action_method_assignment : ObjectHelper<action_method_assignment,2> { action_method_assignment() : Object("action_method_assignment") {}
+ Lazy< action_method > assigned_action_method;
+ Lazy< NotImplemented > role;
+ };
+
+ // C++ wrapper for action_method_relationship
+ struct action_method_relationship : ObjectHelper<action_method_relationship,4> { action_method_relationship() : Object("action_method_relationship") {}
+ label::Out name;
+ Maybe< text::Out > description;
+ Lazy< action_method > relating_method;
+ Lazy< action_method > related_method;
+ };
+
+ // C++ wrapper for action_request_assignment
+ struct action_request_assignment : ObjectHelper<action_request_assignment,1> { action_request_assignment() : Object("action_request_assignment") {}
+ Lazy< NotImplemented > assigned_action_request;
+ };
+
+ // C++ wrapper for address
+ struct address : ObjectHelper<address,12> { address() : Object("address") {}
+ Maybe< label::Out > internal_location;
+ Maybe< label::Out > street_number;
+ Maybe< label::Out > street;
+ Maybe< label::Out > postal_box;
+ Maybe< label::Out > town;
+ Maybe< label::Out > region;
+ Maybe< label::Out > postal_code;
+ Maybe< label::Out > country;
+ Maybe< label::Out > facsimile_number;
+ Maybe< label::Out > telephone_number;
+ Maybe< label::Out > electronic_mail_address;
+ Maybe< label::Out > telex_number;
+ };
+
+ // C++ wrapper for representation
+ struct representation : ObjectHelper<representation,3> { representation() : Object("representation") {}
+ label::Out name;
+ ListOf< Lazy< representation_item >, 1, 0 > items;
+ Lazy< representation_context > context_of_items;
+ };
+
+ // C++ wrapper for shape_representation
+ struct shape_representation : representation, ObjectHelper<shape_representation,0> { shape_representation() : Object("shape_representation") {}
+
+ };
+
+ // C++ wrapper for advanced_brep_shape_representation
+ struct advanced_brep_shape_representation : shape_representation, ObjectHelper<advanced_brep_shape_representation,0> { advanced_brep_shape_representation() : Object("advanced_brep_shape_representation") {}
+
+ };
+
+ // C++ wrapper for face_surface
+ struct face_surface : ObjectHelper<face_surface,2> { face_surface() : Object("face_surface") {}
+ Lazy< surface > face_geometry;
+ BOOLEAN::Out same_sense;
+ };
+
+ // C++ wrapper for advanced_face
+ struct advanced_face : face_surface, ObjectHelper<advanced_face,0> { advanced_face() : Object("advanced_face") {}
+
+ };
+
+ // C++ wrapper for amount_of_substance_measure_with_unit
+ struct amount_of_substance_measure_with_unit : measure_with_unit, ObjectHelper<amount_of_substance_measure_with_unit,0> { amount_of_substance_measure_with_unit() : Object("amount_of_substance_measure_with_unit") {}
+
+ };
+
+ // C++ wrapper for named_unit
+ struct named_unit : ObjectHelper<named_unit,1> { named_unit() : Object("named_unit") {}
+ Lazy< NotImplemented > dimensions;
+ };
+
+ // C++ wrapper for amount_of_substance_unit
+ struct amount_of_substance_unit : named_unit, ObjectHelper<amount_of_substance_unit,0> { amount_of_substance_unit() : Object("amount_of_substance_unit") {}
+
+ };
+
+ // C++ wrapper for angle_direction_reference
+ struct angle_direction_reference : ObjectHelper<angle_direction_reference,0> { angle_direction_reference() : Object("angle_direction_reference") {}
+
+ };
+
+ // C++ wrapper for representation_item
+ struct representation_item : ObjectHelper<representation_item,1> { representation_item() : Object("representation_item") {}
+ label::Out name;
+ };
+
+ // C++ wrapper for geometric_representation_item
+ struct geometric_representation_item : representation_item, ObjectHelper<geometric_representation_item,0> { geometric_representation_item() : Object("geometric_representation_item") {}
+
+ };
+
+ // C++ wrapper for draughting_callout
+ struct draughting_callout : geometric_representation_item, ObjectHelper<draughting_callout,1> { draughting_callout() : Object("draughting_callout") {}
+ ListOf< draughting_callout_element, 1, 0 >::Out contents;
+ };
+
+ // C++ wrapper for dimension_curve_directed_callout
+ struct dimension_curve_directed_callout : draughting_callout, ObjectHelper<dimension_curve_directed_callout,0> { dimension_curve_directed_callout() : Object("dimension_curve_directed_callout") {}
+
+ };
+
+ // C++ wrapper for angular_dimension
+ struct angular_dimension : dimension_curve_directed_callout, ObjectHelper<angular_dimension,0> { angular_dimension() : Object("angular_dimension") {}
+
+ };
+
+ // C++ wrapper for shape_aspect_relationship
+ struct shape_aspect_relationship : ObjectHelper<shape_aspect_relationship,4> { shape_aspect_relationship() : Object("shape_aspect_relationship") {}
+ label::Out name;
+ Maybe< text::Out > description;
+ Lazy< shape_aspect > relating_shape_aspect;
+ Lazy< shape_aspect > related_shape_aspect;
+ };
+
+ // C++ wrapper for dimensional_location
+ struct dimensional_location : shape_aspect_relationship, ObjectHelper<dimensional_location,0> { dimensional_location() : Object("dimensional_location") {}
+
+ };
+
+ // C++ wrapper for angular_location
+ struct angular_location : dimensional_location, ObjectHelper<angular_location,1> { angular_location() : Object("angular_location") {}
+ angle_relator::Out angle_selection;
+ };
+
+ // C++ wrapper for dimensional_size
+ struct dimensional_size : ObjectHelper<dimensional_size,2> { dimensional_size() : Object("dimensional_size") {}
+ Lazy< shape_aspect > applies_to;
+ label::Out name;
+ };
+
+ // C++ wrapper for angular_size
+ struct angular_size : dimensional_size, ObjectHelper<angular_size,1> { angular_size() : Object("angular_size") {}
+ angle_relator::Out angle_selection;
+ };
+
+ // C++ wrapper for geometric_tolerance
+ struct geometric_tolerance : ObjectHelper<geometric_tolerance,4> { geometric_tolerance() : Object("geometric_tolerance") {}
+ label::Out name;
+ text::Out description;
+ Lazy< measure_with_unit > magnitude;
+ Lazy< shape_aspect > toleranced_shape_aspect;
+ };
+
+ // C++ wrapper for geometric_tolerance_with_datum_reference
+ struct geometric_tolerance_with_datum_reference : geometric_tolerance, ObjectHelper<geometric_tolerance_with_datum_reference,1> { geometric_tolerance_with_datum_reference() : Object("geometric_tolerance_with_datum_reference") {}
+ ListOf< Lazy< datum_reference >, 1, 0 > datum_system;
+ };
+
+ // C++ wrapper for angularity_tolerance
+ struct angularity_tolerance : geometric_tolerance_with_datum_reference, ObjectHelper<angularity_tolerance,0> { angularity_tolerance() : Object("angularity_tolerance") {}
+
+ };
+
+ // C++ wrapper for styled_item
+ struct styled_item : representation_item, ObjectHelper<styled_item,2> { styled_item() : Object("styled_item") {}
+ ListOf< Lazy< presentation_style_assignment >, 1, 0 > styles;
+ Lazy< representation_item > item;
+ };
+
+ // C++ wrapper for annotation_occurrence
+ struct annotation_occurrence : styled_item, ObjectHelper<annotation_occurrence,0> { annotation_occurrence() : Object("annotation_occurrence") {}
+
+ };
+
+ // C++ wrapper for annotation_curve_occurrence
+ struct annotation_curve_occurrence : annotation_occurrence, ObjectHelper<annotation_curve_occurrence,0> { annotation_curve_occurrence() : Object("annotation_curve_occurrence") {}
+
+ };
+
+ // C++ wrapper for annotation_fill_area
+ struct annotation_fill_area : geometric_representation_item, ObjectHelper<annotation_fill_area,1> { annotation_fill_area() : Object("annotation_fill_area") {}
+ ListOf< Lazy< curve >, 1, 0 > boundaries;
+ };
+
+ // C++ wrapper for annotation_fill_area_occurrence
+ struct annotation_fill_area_occurrence : annotation_occurrence, ObjectHelper<annotation_fill_area_occurrence,1> { annotation_fill_area_occurrence() : Object("annotation_fill_area_occurrence") {}
+ Lazy< point > fill_style_target;
+ };
+
+ // C++ wrapper for annotation_occurrence_relationship
+ struct annotation_occurrence_relationship : ObjectHelper<annotation_occurrence_relationship,4> { annotation_occurrence_relationship() : Object("annotation_occurrence_relationship") {}
+ label::Out name;
+ text::Out description;
+ Lazy< annotation_occurrence > relating_annotation_occurrence;
+ Lazy< annotation_occurrence > related_annotation_occurrence;
+ };
+
+ // C++ wrapper for annotation_occurrence_associativity
+ struct annotation_occurrence_associativity : annotation_occurrence_relationship, ObjectHelper<annotation_occurrence_associativity,0> { annotation_occurrence_associativity() : Object("annotation_occurrence_associativity") {}
+
+ };
+
+ // C++ wrapper for annotation_plane
+ struct annotation_plane : ObjectHelper<annotation_plane,1> { annotation_plane() : Object("annotation_plane") {}
+ Maybe< ListOf< annotation_plane_element, 1, 0 >::Out > elements;
+ };
+
+ // C++ wrapper for annotation_symbol_occurrence
+ struct annotation_symbol_occurrence : annotation_occurrence, ObjectHelper<annotation_symbol_occurrence,0> { annotation_symbol_occurrence() : Object("annotation_symbol_occurrence") {}
+
+ };
+
+ // C++ wrapper for annotation_subfigure_occurrence
+ struct annotation_subfigure_occurrence : annotation_symbol_occurrence, ObjectHelper<annotation_subfigure_occurrence,0> { annotation_subfigure_occurrence() : Object("annotation_subfigure_occurrence") {}
+
+ };
+
+ // C++ wrapper for mapped_item
+ struct mapped_item : representation_item, ObjectHelper<mapped_item,2> { mapped_item() : Object("mapped_item") {}
+ Lazy< representation_map > mapping_source;
+ Lazy< representation_item > mapping_target;
+ };
+
+ // C++ wrapper for annotation_symbol
+ struct annotation_symbol : mapped_item, ObjectHelper<annotation_symbol,0> { annotation_symbol() : Object("annotation_symbol") {}
+
+ };
+
+ // C++ wrapper for annotation_text
+ struct annotation_text : mapped_item, ObjectHelper<annotation_text,0> { annotation_text() : Object("annotation_text") {}
+
+ };
+
+ // C++ wrapper for annotation_text_character
+ struct annotation_text_character : mapped_item, ObjectHelper<annotation_text_character,1> { annotation_text_character() : Object("annotation_text_character") {}
+ text_alignment::Out alignment;
+ };
+
+ // C++ wrapper for annotation_text_occurrence
+ struct annotation_text_occurrence : annotation_occurrence, ObjectHelper<annotation_text_occurrence,0> { annotation_text_occurrence() : Object("annotation_text_occurrence") {}
+
+ };
+
+ // C++ wrapper for shape_aspect
+ struct shape_aspect : ObjectHelper<shape_aspect,4> { shape_aspect() : Object("shape_aspect") {}
+ label::Out name;
+ Maybe< text::Out > description;
+ Lazy< product_definition_shape > of_shape;
+ LOGICAL::Out product_definitional;
+ };
+
+ // C++ wrapper for derived_shape_aspect
+ struct derived_shape_aspect : shape_aspect, ObjectHelper<derived_shape_aspect,0> { derived_shape_aspect() : Object("derived_shape_aspect") {}
+
+ };
+
+ // C++ wrapper for apex
+ struct apex : derived_shape_aspect, ObjectHelper<apex,0> { apex() : Object("apex") {}
+
+ };
+
+ // C++ wrapper for application_context_element
+ struct application_context_element : ObjectHelper<application_context_element,2> { application_context_element() : Object("application_context_element") {}
+ label::Out name;
+ Lazy< NotImplemented > frame_of_reference;
+ };
+
+ // C++ wrapper for applied_action_assignment
+ struct applied_action_assignment : action_assignment, ObjectHelper<applied_action_assignment,1> { applied_action_assignment() : Object("applied_action_assignment") {}
+ ListOf< action_items, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for applied_action_method_assignment
+ struct applied_action_method_assignment : action_method_assignment, ObjectHelper<applied_action_method_assignment,1> { applied_action_method_assignment() : Object("applied_action_method_assignment") {}
+ ListOf< action_method_items, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for applied_action_request_assignment
+ struct applied_action_request_assignment : action_request_assignment, ObjectHelper<applied_action_request_assignment,1> { applied_action_request_assignment() : Object("applied_action_request_assignment") {}
+ ListOf< action_request_item, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for approval_assignment
+ struct approval_assignment : ObjectHelper<approval_assignment,1> { approval_assignment() : Object("approval_assignment") {}
+ Lazy< NotImplemented > assigned_approval;
+ };
+
+ // C++ wrapper for applied_approval_assignment
+ struct applied_approval_assignment : approval_assignment, ObjectHelper<applied_approval_assignment,1> { applied_approval_assignment() : Object("applied_approval_assignment") {}
+ ListOf< approval_item, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for attribute_classification_assignment
+ struct attribute_classification_assignment : ObjectHelper<attribute_classification_assignment,3> { attribute_classification_assignment() : Object("attribute_classification_assignment") {}
+ Lazy< group > assigned_class;
+ label::Out attribute_name;
+ Lazy< NotImplemented > role;
+ };
+
+ // C++ wrapper for applied_attribute_classification_assignment
+ struct applied_attribute_classification_assignment : attribute_classification_assignment, ObjectHelper<applied_attribute_classification_assignment,1> { applied_attribute_classification_assignment() : Object("applied_attribute_classification_assignment") {}
+ ListOf< attribute_classification_item, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for certification_assignment
+ struct certification_assignment : ObjectHelper<certification_assignment,1> { certification_assignment() : Object("certification_assignment") {}
+ Lazy< NotImplemented > assigned_certification;
+ };
+
+ // C++ wrapper for applied_certification_assignment
+ struct applied_certification_assignment : certification_assignment, ObjectHelper<applied_certification_assignment,1> { applied_certification_assignment() : Object("applied_certification_assignment") {}
+ ListOf< certification_item, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for classification_assignment
+ struct classification_assignment : ObjectHelper<classification_assignment,2> { classification_assignment() : Object("classification_assignment") {}
+ Lazy< group > assigned_class;
+ Lazy< NotImplemented > role;
+ };
+
+ // C++ wrapper for applied_classification_assignment
+ struct applied_classification_assignment : classification_assignment, ObjectHelper<applied_classification_assignment,1> { applied_classification_assignment() : Object("applied_classification_assignment") {}
+ ListOf< classification_item, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for contract_assignment
+ struct contract_assignment : ObjectHelper<contract_assignment,1> { contract_assignment() : Object("contract_assignment") {}
+ Lazy< NotImplemented > assigned_contract;
+ };
+
+ // C++ wrapper for applied_contract_assignment
+ struct applied_contract_assignment : contract_assignment, ObjectHelper<applied_contract_assignment,1> { applied_contract_assignment() : Object("applied_contract_assignment") {}
+ ListOf< contract_item, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for date_and_time_assignment
+ struct date_and_time_assignment : ObjectHelper<date_and_time_assignment,2> { date_and_time_assignment() : Object("date_and_time_assignment") {}
+ Lazy< NotImplemented > assigned_date_and_time;
+ Lazy< NotImplemented > role;
+ };
+
+ // C++ wrapper for applied_date_and_time_assignment
+ struct applied_date_and_time_assignment : date_and_time_assignment, ObjectHelper<applied_date_and_time_assignment,1> { applied_date_and_time_assignment() : Object("applied_date_and_time_assignment") {}
+ ListOf< date_and_time_item, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for date_assignment
+ struct date_assignment : ObjectHelper<date_assignment,2> { date_assignment() : Object("date_assignment") {}
+ Lazy< date > assigned_date;
+ Lazy< NotImplemented > role;
+ };
+
+ // C++ wrapper for applied_date_assignment
+ struct applied_date_assignment : date_assignment, ObjectHelper<applied_date_assignment,1> { applied_date_assignment() : Object("applied_date_assignment") {}
+ ListOf< date_item, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for document_reference
+ struct document_reference : ObjectHelper<document_reference,2> { document_reference() : Object("document_reference") {}
+ Lazy< NotImplemented > assigned_document;
+ label::Out source;
+ };
+
+ // C++ wrapper for applied_document_reference
+ struct applied_document_reference : document_reference, ObjectHelper<applied_document_reference,1> { applied_document_reference() : Object("applied_document_reference") {}
+ ListOf< document_reference_item, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for document_usage_constraint_assignment
+ struct document_usage_constraint_assignment : ObjectHelper<document_usage_constraint_assignment,2> { document_usage_constraint_assignment() : Object("document_usage_constraint_assignment") {}
+ Lazy< NotImplemented > assigned_document_usage;
+ Lazy< NotImplemented > role;
+ };
+
+ // C++ wrapper for applied_document_usage_constraint_assignment
+ struct applied_document_usage_constraint_assignment : document_usage_constraint_assignment, ObjectHelper<applied_document_usage_constraint_assignment,1> { applied_document_usage_constraint_assignment() : Object("applied_document_usage_constraint_assignment") {}
+ ListOf< document_reference_item, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for effectivity_assignment
+ struct effectivity_assignment : ObjectHelper<effectivity_assignment,1> { effectivity_assignment() : Object("effectivity_assignment") {}
+ Lazy< effectivity > assigned_effectivity;
+ };
+
+ // C++ wrapper for applied_effectivity_assignment
+ struct applied_effectivity_assignment : effectivity_assignment, ObjectHelper<applied_effectivity_assignment,1> { applied_effectivity_assignment() : Object("applied_effectivity_assignment") {}
+ ListOf< effectivity_item, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for event_occurrence_assignment
+ struct event_occurrence_assignment : ObjectHelper<event_occurrence_assignment,2> { event_occurrence_assignment() : Object("event_occurrence_assignment") {}
+ Lazy< event_occurrence > assigned_event_occurrence;
+ Lazy< NotImplemented > role;
+ };
+
+ // C++ wrapper for applied_event_occurrence_assignment
+ struct applied_event_occurrence_assignment : event_occurrence_assignment, ObjectHelper<applied_event_occurrence_assignment,1> { applied_event_occurrence_assignment() : Object("applied_event_occurrence_assignment") {}
+ ListOf< event_occurrence_item, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for identification_assignment
+ struct identification_assignment : ObjectHelper<identification_assignment,2> { identification_assignment() : Object("identification_assignment") {}
+ identifier::Out assigned_id;
+ Lazy< NotImplemented > role;
+ };
+
+ // C++ wrapper for external_identification_assignment
+ struct external_identification_assignment : identification_assignment, ObjectHelper<external_identification_assignment,1> { external_identification_assignment() : Object("external_identification_assignment") {}
+ Lazy< external_source > source;
+ };
+
+ // C++ wrapper for applied_external_identification_assignment
+ struct applied_external_identification_assignment : external_identification_assignment, ObjectHelper<applied_external_identification_assignment,1> { applied_external_identification_assignment() : Object("applied_external_identification_assignment") {}
+ ListOf< external_identification_item, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for group_assignment
+ struct group_assignment : ObjectHelper<group_assignment,1> { group_assignment() : Object("group_assignment") {}
+ Lazy< group > assigned_group;
+ };
+
+ // C++ wrapper for applied_group_assignment
+ struct applied_group_assignment : group_assignment, ObjectHelper<applied_group_assignment,1> { applied_group_assignment() : Object("applied_group_assignment") {}
+ ListOf< groupable_item, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for applied_identification_assignment
+ struct applied_identification_assignment : identification_assignment, ObjectHelper<applied_identification_assignment,1> { applied_identification_assignment() : Object("applied_identification_assignment") {}
+ ListOf< identification_item, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for name_assignment
+ struct name_assignment : ObjectHelper<name_assignment,1> { name_assignment() : Object("name_assignment") {}
+ label::Out assigned_name;
+ };
+
+ // C++ wrapper for applied_name_assignment
+ struct applied_name_assignment : name_assignment, ObjectHelper<applied_name_assignment,1> { applied_name_assignment() : Object("applied_name_assignment") {}
+ name_item::Out item;
+ };
+
+ // C++ wrapper for organization_assignment
+ struct organization_assignment : ObjectHelper<organization_assignment,2> { organization_assignment() : Object("organization_assignment") {}
+ Lazy< NotImplemented > assigned_organization;
+ Lazy< NotImplemented > role;
+ };
+
+ // C++ wrapper for applied_organization_assignment
+ struct applied_organization_assignment : organization_assignment, ObjectHelper<applied_organization_assignment,1> { applied_organization_assignment() : Object("applied_organization_assignment") {}
+ ListOf< organization_item, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for organizational_project_assignment
+ struct organizational_project_assignment : ObjectHelper<organizational_project_assignment,2> { organizational_project_assignment() : Object("organizational_project_assignment") {}
+ Lazy< NotImplemented > assigned_organizational_project;
+ Lazy< NotImplemented > role;
+ };
+
+ // C++ wrapper for applied_organizational_project_assignment
+ struct applied_organizational_project_assignment : organizational_project_assignment, ObjectHelper<applied_organizational_project_assignment,1> { applied_organizational_project_assignment() : Object("applied_organizational_project_assignment") {}
+ ListOf< project_item, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for person_and_organization_assignment
+ struct person_and_organization_assignment : ObjectHelper<person_and_organization_assignment,2> { person_and_organization_assignment() : Object("person_and_organization_assignment") {}
+ Lazy< NotImplemented > assigned_person_and_organization;
+ Lazy< NotImplemented > role;
+ };
+
+ // C++ wrapper for applied_person_and_organization_assignment
+ struct applied_person_and_organization_assignment : person_and_organization_assignment, ObjectHelper<applied_person_and_organization_assignment,1> { applied_person_and_organization_assignment() : Object("applied_person_and_organization_assignment") {}
+ ListOf< person_and_organization_item, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for presented_item
+ struct presented_item : ObjectHelper<presented_item,0> { presented_item() : Object("presented_item") {}
+
+ };
+
+ // C++ wrapper for applied_presented_item
+ struct applied_presented_item : presented_item, ObjectHelper<applied_presented_item,1> { applied_presented_item() : Object("applied_presented_item") {}
+ ListOf< presented_item_select, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for security_classification_assignment
+ struct security_classification_assignment : ObjectHelper<security_classification_assignment,1> { security_classification_assignment() : Object("security_classification_assignment") {}
+ Lazy< NotImplemented > assigned_security_classification;
+ };
+
+ // C++ wrapper for applied_security_classification_assignment
+ struct applied_security_classification_assignment : security_classification_assignment, ObjectHelper<applied_security_classification_assignment,1> { applied_security_classification_assignment() : Object("applied_security_classification_assignment") {}
+ ListOf< security_classification_item, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for time_interval_assignment
+ struct time_interval_assignment : ObjectHelper<time_interval_assignment,2> { time_interval_assignment() : Object("time_interval_assignment") {}
+ Lazy< time_interval > assigned_time_interval;
+ Lazy< NotImplemented > role;
+ };
+
+ // C++ wrapper for applied_time_interval_assignment
+ struct applied_time_interval_assignment : time_interval_assignment, ObjectHelper<applied_time_interval_assignment,1> { applied_time_interval_assignment() : Object("applied_time_interval_assignment") {}
+ ListOf< time_interval_item, 0, 0 >::Out items;
+ };
+
+ // C++ wrapper for applied_usage_right
+ struct applied_usage_right : applied_action_assignment, ObjectHelper<applied_usage_right,0> { applied_usage_right() : Object("applied_usage_right") {}
+
+ };
+
+ // C++ wrapper for area_in_set
+ struct area_in_set : ObjectHelper<area_in_set,2> { area_in_set() : Object("area_in_set") {}
+ Lazy< presentation_area > area;
+ Lazy< presentation_set > in_set;
+ };
+
+ // C++ wrapper for area_measure_with_unit
+ struct area_measure_with_unit : measure_with_unit, ObjectHelper<area_measure_with_unit,0> { area_measure_with_unit() : Object("area_measure_with_unit") {}
+
+ };
+
+ // C++ wrapper for area_unit
+ struct area_unit : derived_unit, ObjectHelper<area_unit,0> { area_unit() : Object("area_unit") {}
+
+ };
+
+ // C++ wrapper for product_definition_relationship
+ struct product_definition_relationship : ObjectHelper<product_definition_relationship,5> { product_definition_relationship() : Object("product_definition_relationship") {}
+ identifier::Out id;
+ label::Out name;
+ Maybe< text::Out > description;
+ Lazy< product_definition > relating_product_definition;
+ Lazy< product_definition > related_product_definition;
+ };
+
+ // C++ wrapper for product_definition_usage
+ struct product_definition_usage : product_definition_relationship, ObjectHelper<product_definition_usage,0> { product_definition_usage() : Object("product_definition_usage") {}
+
+ };
+
+ // C++ wrapper for assembly_component_usage
+ struct assembly_component_usage : product_definition_usage, ObjectHelper<assembly_component_usage,1> { assembly_component_usage() : Object("assembly_component_usage") {}
+ Maybe< identifier::Out > reference_designator;
+ };
+
+ // C++ wrapper for assigned_requirement
+ struct assigned_requirement : group_assignment, ObjectHelper<assigned_requirement,1> { assigned_requirement() : Object("assigned_requirement") {}
+ ListOf< Lazy< product_definition >, 1, 1 > items;
+ };
+
+ // C++ wrapper for compound_representation_item
+ struct compound_representation_item : representation_item, ObjectHelper<compound_representation_item,1> { compound_representation_item() : Object("compound_representation_item") {}
+ compound_item_definition::Out item_element;
+ };
+
+ // C++ wrapper for atomic_formula
+ struct atomic_formula : compound_representation_item, ObjectHelper<atomic_formula,0> { atomic_formula() : Object("atomic_formula") {}
+
+ };
+
+ // C++ wrapper for attribute_assertion
+ struct attribute_assertion : ObjectHelper<attribute_assertion,0> { attribute_assertion() : Object("attribute_assertion") {}
+
+ };
+
+ // C++ wrapper for attribute_language_assignment
+ struct attribute_language_assignment : attribute_classification_assignment, ObjectHelper<attribute_language_assignment,1> { attribute_language_assignment() : Object("attribute_language_assignment") {}
+ ListOf< attribute_language_item, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for attribute_value_assignment
+ struct attribute_value_assignment : ObjectHelper<attribute_value_assignment,3> { attribute_value_assignment() : Object("attribute_value_assignment") {}
+ label::Out attribute_name;
+ attribute_type::Out attribute_value;
+ Lazy< NotImplemented > role;
+ };
+
+ // C++ wrapper for auxiliary_geometric_representation_item
+ struct auxiliary_geometric_representation_item : ObjectHelper<auxiliary_geometric_representation_item,0> { auxiliary_geometric_representation_item() : Object("auxiliary_geometric_representation_item") {}
+
+ };
+
+ // C++ wrapper for placement
+ struct placement : geometric_representation_item, ObjectHelper<placement,1> { placement() : Object("placement") {}
+ Lazy< cartesian_point > location;
+ };
+
+ // C++ wrapper for axis1_placement
+ struct axis1_placement : placement, ObjectHelper<axis1_placement,1> { axis1_placement() : Object("axis1_placement") {}
+ Maybe< Lazy< direction > > axis;
+ };
+
+ // C++ wrapper for axis2_placement_2d
+ struct axis2_placement_2d : placement, ObjectHelper<axis2_placement_2d,1> { axis2_placement_2d() : Object("axis2_placement_2d") {}
+ Maybe< Lazy< direction > > ref_direction;
+ };
+
+ // C++ wrapper for axis2_placement_3d
+ struct axis2_placement_3d : placement, ObjectHelper<axis2_placement_3d,2> { axis2_placement_3d() : Object("axis2_placement_3d") {}
+ Maybe< Lazy< direction > > axis;
+ Maybe< Lazy< direction > > ref_direction;
+ };
+
+ // C++ wrapper for curve
+ struct curve : geometric_representation_item, ObjectHelper<curve,0> { curve() : Object("curve") {}
+
+ };
+
+ // C++ wrapper for bounded_curve
+ struct bounded_curve : curve, ObjectHelper<bounded_curve,0> { bounded_curve() : Object("bounded_curve") {}
+
+ };
+
+ // C++ wrapper for b_spline_curve
+ struct b_spline_curve : bounded_curve, ObjectHelper<b_spline_curve,5> { b_spline_curve() : Object("b_spline_curve") {}
+ INTEGER::Out degree;
+ ListOf< Lazy< cartesian_point >, 2, 0 > control_points_list;
+ b_spline_curve_form::Out curve_form;
+ LOGICAL::Out closed_curve;
+ LOGICAL::Out self_intersect;
+ };
+
+ // C++ wrapper for b_spline_curve_with_knots
+ struct b_spline_curve_with_knots : b_spline_curve, ObjectHelper<b_spline_curve_with_knots,3> { b_spline_curve_with_knots() : Object("b_spline_curve_with_knots") {}
+ ListOf< INTEGER, 2, 0 >::Out knot_multiplicities;
+ ListOf< parameter_value, 2, 0 >::Out knots;
+ knot_type::Out knot_spec;
+ };
+
+ // C++ wrapper for surface
+ struct surface : geometric_representation_item, ObjectHelper<surface,0> { surface() : Object("surface") {}
+
+ };
+
+ // C++ wrapper for bounded_surface
+ struct bounded_surface : surface, ObjectHelper<bounded_surface,0> { bounded_surface() : Object("bounded_surface") {}
+
+ };
+
+ // C++ wrapper for b_spline_surface
+ struct b_spline_surface : bounded_surface, ObjectHelper<b_spline_surface,6> { b_spline_surface() : Object("b_spline_surface") {}
+ INTEGER::Out u_degree;
+ INTEGER::Out v_degree;
+ b_spline_surface_form::Out surface_form;
+ LOGICAL::Out u_closed;
+ LOGICAL::Out v_closed;
+ LOGICAL::Out self_intersect;
+ };
+
+ // C++ wrapper for b_spline_surface_with_knots
+ struct b_spline_surface_with_knots : b_spline_surface, ObjectHelper<b_spline_surface_with_knots,5> { b_spline_surface_with_knots() : Object("b_spline_surface_with_knots") {}
+ ListOf< INTEGER, 2, 0 >::Out u_multiplicities;
+ ListOf< INTEGER, 2, 0 >::Out v_multiplicities;
+ ListOf< parameter_value, 2, 0 >::Out u_knots;
+ ListOf< parameter_value, 2, 0 >::Out v_knots;
+ knot_type::Out knot_spec;
+ };
+
+ // C++ wrapper for product_definition
+ struct product_definition : ObjectHelper<product_definition,4> { product_definition() : Object("product_definition") {}
+ identifier::Out id;
+ Maybe< text::Out > description;
+ Lazy< product_definition_formation > formation;
+ Lazy< product_definition_context > frame_of_reference;
+ };
+
+ // C++ wrapper for rule_software_definition
+ struct rule_software_definition : product_definition, ObjectHelper<rule_software_definition,0> { rule_software_definition() : Object("rule_software_definition") {}
+
+ };
+
+ // C++ wrapper for rule_definition
+ struct rule_definition : rule_software_definition, ObjectHelper<rule_definition,0> { rule_definition() : Object("rule_definition") {}
+
+ };
+
+ // C++ wrapper for back_chaining_rule
+ struct back_chaining_rule : rule_definition, ObjectHelper<back_chaining_rule,0> { back_chaining_rule() : Object("back_chaining_rule") {}
+
+ };
+
+ // C++ wrapper for back_chaining_rule_body
+ struct back_chaining_rule_body : ObjectHelper<back_chaining_rule_body,0> { back_chaining_rule_body() : Object("back_chaining_rule_body") {}
+
+ };
+
+ // C++ wrapper for colour
+ struct colour : ObjectHelper<colour,0> { colour() : Object("colour") {}
+
+ };
+
+ // C++ wrapper for background_colour
+ struct background_colour : colour, ObjectHelper<background_colour,1> { background_colour() : Object("background_colour") {}
+ area_or_view::Out presentation;
+ };
+
+ // C++ wrapper for beveled_sheet_representation
+ struct beveled_sheet_representation : shape_representation, ObjectHelper<beveled_sheet_representation,0> { beveled_sheet_representation() : Object("beveled_sheet_representation") {}
+
+ };
+
+ // C++ wrapper for bezier_curve
+ struct bezier_curve : b_spline_curve, ObjectHelper<bezier_curve,0> { bezier_curve() : Object("bezier_curve") {}
+
+ };
+
+ // C++ wrapper for bezier_surface
+ struct bezier_surface : b_spline_surface, ObjectHelper<bezier_surface,0> { bezier_surface() : Object("bezier_surface") {}
+
+ };
+
+ // C++ wrapper for generic_expression
+ struct generic_expression : ObjectHelper<generic_expression,0> { generic_expression() : Object("generic_expression") {}
+
+ };
+
+ // C++ wrapper for binary_generic_expression
+ struct binary_generic_expression : generic_expression, ObjectHelper<binary_generic_expression,1> { binary_generic_expression() : Object("binary_generic_expression") {}
+ ListOf< Lazy< generic_expression >, 2, 2 > operands;
+ };
+
+ // C++ wrapper for binary_numeric_expression
+ struct binary_numeric_expression : ObjectHelper<binary_numeric_expression,0> { binary_numeric_expression() : Object("binary_numeric_expression") {}
+
+ };
+
+ // C++ wrapper for binary_representation_item
+ struct binary_representation_item : representation_item, ObjectHelper<binary_representation_item,1> { binary_representation_item() : Object("binary_representation_item") {}
+ BINARY::Out binary_value;
+ };
+
+ // C++ wrapper for block
+ struct block : geometric_representation_item, ObjectHelper<block,4> { block() : Object("block") {}
+ Lazy< axis2_placement_3d > position;
+ positive_length_measure::Out x;
+ positive_length_measure::Out y;
+ positive_length_measure::Out z;
+ };
+
+ // C++ wrapper for expression
+ struct expression : generic_expression, ObjectHelper<expression,0> { expression() : Object("expression") {}
+
+ };
+
+ // C++ wrapper for boolean_expression
+ struct boolean_expression : expression, ObjectHelper<boolean_expression,0> { boolean_expression() : Object("boolean_expression") {}
+
+ };
+
+ // C++ wrapper for boolean_literal
+ struct boolean_literal : ObjectHelper<boolean_literal,1> { boolean_literal() : Object("boolean_literal") {}
+ BOOLEAN::Out the_value;
+ };
+
+ // C++ wrapper for boolean_representation_item
+ struct boolean_representation_item : ObjectHelper<boolean_representation_item,0> { boolean_representation_item() : Object("boolean_representation_item") {}
+
+ };
+
+ // C++ wrapper for boolean_result
+ struct boolean_result : geometric_representation_item, ObjectHelper<boolean_result,3> { boolean_result() : Object("boolean_result") {}
+ boolean_operator::Out operator_;
+ boolean_operand::Out first_operand;
+ boolean_operand::Out second_operand;
+ };
+
+ // C++ wrapper for composite_curve
+ struct composite_curve : bounded_curve, ObjectHelper<composite_curve,2> { composite_curve() : Object("composite_curve") {}
+ ListOf< Lazy< composite_curve_segment >, 1, 0 > segments;
+ LOGICAL::Out self_intersect;
+ };
+
+ // C++ wrapper for composite_curve_on_surface
+ struct composite_curve_on_surface : composite_curve, ObjectHelper<composite_curve_on_surface,0> { composite_curve_on_surface() : Object("composite_curve_on_surface") {}
+
+ };
+
+ // C++ wrapper for boundary_curve
+ struct boundary_curve : composite_curve_on_surface, ObjectHelper<boundary_curve,0> { boundary_curve() : Object("boundary_curve") {}
+
+ };
+
+ // C++ wrapper for bounded_pcurve
+ struct bounded_pcurve : ObjectHelper<bounded_pcurve,0> { bounded_pcurve() : Object("bounded_pcurve") {}
+
+ };
+
+ // C++ wrapper for bounded_surface_curve
+ struct bounded_surface_curve : ObjectHelper<bounded_surface_curve,0> { bounded_surface_curve() : Object("bounded_surface_curve") {}
+
+ };
+
+ // C++ wrapper for founded_item
+ struct founded_item : ObjectHelper<founded_item,0> { founded_item() : Object("founded_item") {}
+
+ };
+
+ // C++ wrapper for box_domain
+ struct box_domain : founded_item, ObjectHelper<box_domain,4> { box_domain() : Object("box_domain") {}
+ Lazy< cartesian_point > corner;
+ positive_length_measure::Out xlength;
+ positive_length_measure::Out ylength;
+ positive_length_measure::Out zlength;
+ };
+
+ // C++ wrapper for half_space_solid
+ struct half_space_solid : geometric_representation_item, ObjectHelper<half_space_solid,2> { half_space_solid() : Object("half_space_solid") {}
+ Lazy< surface > base_surface;
+ BOOLEAN::Out agreement_flag;
+ };
+
+ // C++ wrapper for boxed_half_space
+ struct boxed_half_space : half_space_solid, ObjectHelper<boxed_half_space,1> { boxed_half_space() : Object("boxed_half_space") {}
+ Lazy< box_domain > enclosure;
+ };
+
+ // C++ wrapper for breakdown_context
+ struct breakdown_context : product_definition_relationship, ObjectHelper<breakdown_context,0> { breakdown_context() : Object("breakdown_context") {}
+
+ };
+
+ // C++ wrapper for breakdown_element_group_assignment
+ struct breakdown_element_group_assignment : group_assignment, ObjectHelper<breakdown_element_group_assignment,1> { breakdown_element_group_assignment() : Object("breakdown_element_group_assignment") {}
+ ListOf< product_definition_or_breakdown_element_usage, 1, 1 >::Out items;
+ };
+
+ // C++ wrapper for breakdown_element_realization
+ struct breakdown_element_realization : ObjectHelper<breakdown_element_realization,0> { breakdown_element_realization() : Object("breakdown_element_realization") {}
+
+ };
+
+ // C++ wrapper for breakdown_element_usage
+ struct breakdown_element_usage : product_definition_relationship, ObjectHelper<breakdown_element_usage,0> { breakdown_element_usage() : Object("breakdown_element_usage") {}
+
+ };
+
+ // C++ wrapper for breakdown_of
+ struct breakdown_of : product_definition_relationship, ObjectHelper<breakdown_of,0> { breakdown_of() : Object("breakdown_of") {}
+
+ };
+
+ // C++ wrapper for solid_model
+ struct solid_model : geometric_representation_item, ObjectHelper<solid_model,0> { solid_model() : Object("solid_model") {}
+
+ };
+
+ // C++ wrapper for manifold_solid_brep
+ struct manifold_solid_brep : solid_model, ObjectHelper<manifold_solid_brep,1> { manifold_solid_brep() : Object("manifold_solid_brep") {}
+ Lazy< closed_shell > outer;
+ };
+
+ // C++ wrapper for brep_with_voids
+ struct brep_with_voids : manifold_solid_brep, ObjectHelper<brep_with_voids,1> { brep_with_voids() : Object("brep_with_voids") {}
+ ListOf< Lazy< oriented_closed_shell >, 1, 0 > voids;
+ };
+
+ // C++ wrapper for bytes_representation_item
+ struct bytes_representation_item : binary_representation_item, ObjectHelper<bytes_representation_item,0> { bytes_representation_item() : Object("bytes_representation_item") {}
+
+ };
+
+ // C++ wrapper for date
+ struct date : ObjectHelper<date,1> { date() : Object("date") {}
+ year_number::Out year_component;
+ };
+
+ // C++ wrapper for calendar_date
+ struct calendar_date : date, ObjectHelper<calendar_date,2> { calendar_date() : Object("calendar_date") {}
+ day_in_month_number::Out day_component;
+ month_in_year_number::Out month_component;
+ };
+
+ // C++ wrapper for camera_image
+ struct camera_image : mapped_item, ObjectHelper<camera_image,0> { camera_image() : Object("camera_image") {}
+
+ };
+
+ // C++ wrapper for camera_image_3d_with_scale
+ struct camera_image_3d_with_scale : camera_image, ObjectHelper<camera_image_3d_with_scale,0> { camera_image_3d_with_scale() : Object("camera_image_3d_with_scale") {}
+
+ };
+
+ // C++ wrapper for camera_model
+ struct camera_model : geometric_representation_item, ObjectHelper<camera_model,0> { camera_model() : Object("camera_model") {}
+
+ };
+
+ // C++ wrapper for camera_model_d3
+ struct camera_model_d3 : camera_model, ObjectHelper<camera_model_d3,2> { camera_model_d3() : Object("camera_model_d3") {}
+ Lazy< axis2_placement_3d > view_reference_system;
+ Lazy< view_volume > perspective_of_volume;
+ };
+
+ // C++ wrapper for camera_model_d3_multi_clipping
+ struct camera_model_d3_multi_clipping : camera_model_d3, ObjectHelper<camera_model_d3_multi_clipping,1> { camera_model_d3_multi_clipping() : Object("camera_model_d3_multi_clipping") {}
+ ListOf< camera_model_d3_multi_clipping_interection_select, 1, 0 >::Out shape_clipping;
+ };
+
+ // C++ wrapper for camera_model_d3_multi_clipping_intersection
+ struct camera_model_d3_multi_clipping_intersection : geometric_representation_item, ObjectHelper<camera_model_d3_multi_clipping_intersection,1> { camera_model_d3_multi_clipping_intersection() : Object("camera_model_d3_multi_clipping_intersection") {}
+ ListOf< camera_model_d3_multi_clipping_interection_select, 2, 0 >::Out shape_clipping;
+ };
+
+ // C++ wrapper for camera_model_d3_multi_clipping_union
+ struct camera_model_d3_multi_clipping_union : geometric_representation_item, ObjectHelper<camera_model_d3_multi_clipping_union,1> { camera_model_d3_multi_clipping_union() : Object("camera_model_d3_multi_clipping_union") {}
+ ListOf< camera_model_d3_multi_clipping_union_select, 2, 0 >::Out shape_clipping;
+ };
+
+ // C++ wrapper for camera_model_d3_with_hlhsr
+ struct camera_model_d3_with_hlhsr : camera_model_d3, ObjectHelper<camera_model_d3_with_hlhsr,1> { camera_model_d3_with_hlhsr() : Object("camera_model_d3_with_hlhsr") {}
+ BOOLEAN::Out hidden_line_surface_removal;
+ };
+
+ // C++ wrapper for camera_model_with_light_sources
+ struct camera_model_with_light_sources : camera_model_d3, ObjectHelper<camera_model_with_light_sources,1> { camera_model_with_light_sources() : Object("camera_model_with_light_sources") {}
+ ListOf< Lazy< light_source >, 1, 0 > sources;
+ };
+
+ // C++ wrapper for representation_map
+ struct representation_map : ObjectHelper<representation_map,2> { representation_map() : Object("representation_map") {}
+ Lazy< representation_item > mapping_origin;
+ Lazy< representation > mapped_representation;
+ };
+
+ // C++ wrapper for camera_usage
+ struct camera_usage : representation_map, ObjectHelper<camera_usage,0> { camera_usage() : Object("camera_usage") {}
+
+ };
+
+ // C++ wrapper for capacitance_measure_with_unit
+ struct capacitance_measure_with_unit : measure_with_unit, ObjectHelper<capacitance_measure_with_unit,0> { capacitance_measure_with_unit() : Object("capacitance_measure_with_unit") {}
+
+ };
+
+ // C++ wrapper for capacitance_unit
+ struct capacitance_unit : derived_unit, ObjectHelper<capacitance_unit,0> { capacitance_unit() : Object("capacitance_unit") {}
+
+ };
+
+ // C++ wrapper for point
+ struct point : geometric_representation_item, ObjectHelper<point,0> { point() : Object("point") {}
+
+ };
+
+ // C++ wrapper for cartesian_point
+ struct cartesian_point : point, ObjectHelper<cartesian_point,1> { cartesian_point() : Object("cartesian_point") {}
+ ListOf< length_measure, 1, 3 >::Out coordinates;
+ };
+
+ // C++ wrapper for cartesian_transformation_operator
+ struct cartesian_transformation_operator : ObjectHelper<cartesian_transformation_operator,4> { cartesian_transformation_operator() : Object("cartesian_transformation_operator") {}
+ Maybe< Lazy< direction > > axis1;
+ Maybe< Lazy< direction > > axis2;
+ Lazy< cartesian_point > local_origin;
+ Maybe< REAL::Out > scale;
+ };
+
+ // C++ wrapper for cartesian_transformation_operator_2d
+ struct cartesian_transformation_operator_2d : cartesian_transformation_operator, ObjectHelper<cartesian_transformation_operator_2d,0> { cartesian_transformation_operator_2d() : Object("cartesian_transformation_operator_2d") {}
+
+ };
+
+ // C++ wrapper for cartesian_transformation_operator_3d
+ struct cartesian_transformation_operator_3d : cartesian_transformation_operator, ObjectHelper<cartesian_transformation_operator_3d,1> { cartesian_transformation_operator_3d() : Object("cartesian_transformation_operator_3d") {}
+ Maybe< Lazy< direction > > axis3;
+ };
+
+ // C++ wrapper for cc_design_approval
+ struct cc_design_approval : approval_assignment, ObjectHelper<cc_design_approval,1> { cc_design_approval() : Object("cc_design_approval") {}
+ ListOf< approved_item, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for cc_design_certification
+ struct cc_design_certification : certification_assignment, ObjectHelper<cc_design_certification,1> { cc_design_certification() : Object("cc_design_certification") {}
+ ListOf< certified_item, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for cc_design_contract
+ struct cc_design_contract : contract_assignment, ObjectHelper<cc_design_contract,1> { cc_design_contract() : Object("cc_design_contract") {}
+ ListOf< contracted_item, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for cc_design_date_and_time_assignment
+ struct cc_design_date_and_time_assignment : date_and_time_assignment, ObjectHelper<cc_design_date_and_time_assignment,1> { cc_design_date_and_time_assignment() : Object("cc_design_date_and_time_assignment") {}
+ ListOf< date_time_item, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for cc_design_person_and_organization_assignment
+ struct cc_design_person_and_organization_assignment : person_and_organization_assignment, ObjectHelper<cc_design_person_and_organization_assignment,1> { cc_design_person_and_organization_assignment() : Object("cc_design_person_and_organization_assignment") {}
+ ListOf< cc_person_organization_item, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for cc_design_security_classification
+ struct cc_design_security_classification : security_classification_assignment, ObjectHelper<cc_design_security_classification,1> { cc_design_security_classification() : Object("cc_design_security_classification") {}
+ ListOf< cc_classified_item, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for cc_design_specification_reference
+ struct cc_design_specification_reference : document_reference, ObjectHelper<cc_design_specification_reference,1> { cc_design_specification_reference() : Object("cc_design_specification_reference") {}
+ ListOf< cc_specified_item, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for celsius_temperature_measure_with_unit
+ struct celsius_temperature_measure_with_unit : measure_with_unit, ObjectHelper<celsius_temperature_measure_with_unit,0> { celsius_temperature_measure_with_unit() : Object("celsius_temperature_measure_with_unit") {}
+
+ };
+
+ // C++ wrapper for centre_of_symmetry
+ struct centre_of_symmetry : derived_shape_aspect, ObjectHelper<centre_of_symmetry,0> { centre_of_symmetry() : Object("centre_of_symmetry") {}
+
+ };
+
+ // C++ wrapper for change
+ struct change : action_assignment, ObjectHelper<change,1> { change() : Object("change") {}
+ ListOf< work_item, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for change_request
+ struct change_request : action_request_assignment, ObjectHelper<change_request,1> { change_request() : Object("change_request") {}
+ ListOf< change_request_item, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for character_glyph_style_outline
+ struct character_glyph_style_outline : founded_item, ObjectHelper<character_glyph_style_outline,1> { character_glyph_style_outline() : Object("character_glyph_style_outline") {}
+ Lazy< curve_style > outline_style;
+ };
+
+ // C++ wrapper for character_glyph_style_stroke
+ struct character_glyph_style_stroke : founded_item, ObjectHelper<character_glyph_style_stroke,1> { character_glyph_style_stroke() : Object("character_glyph_style_stroke") {}
+ Lazy< curve_style > stroke_style;
+ };
+
+ // C++ wrapper for symbol_representation
+ struct symbol_representation : representation, ObjectHelper<symbol_representation,0> { symbol_representation() : Object("symbol_representation") {}
+
+ };
+
+ // C++ wrapper for generic_character_glyph_symbol
+ struct generic_character_glyph_symbol : symbol_representation, ObjectHelper<generic_character_glyph_symbol,0> { generic_character_glyph_symbol() : Object("generic_character_glyph_symbol") {}
+
+ };
+
+ // C++ wrapper for character_glyph_symbol
+ struct character_glyph_symbol : generic_character_glyph_symbol, ObjectHelper<character_glyph_symbol,2> { character_glyph_symbol() : Object("character_glyph_symbol") {}
+ Lazy< planar_extent > character_box;
+ ratio_measure::Out baseline_ratio;
+ };
+
+ // C++ wrapper for character_glyph_symbol_outline
+ struct character_glyph_symbol_outline : character_glyph_symbol, ObjectHelper<character_glyph_symbol_outline,1> { character_glyph_symbol_outline() : Object("character_glyph_symbol_outline") {}
+ ListOf< Lazy< annotation_fill_area >, 1, 0 > outlines;
+ };
+
+ // C++ wrapper for character_glyph_symbol_stroke
+ struct character_glyph_symbol_stroke : character_glyph_symbol, ObjectHelper<character_glyph_symbol_stroke,1> { character_glyph_symbol_stroke() : Object("character_glyph_symbol_stroke") {}
+ ListOf< Lazy< curve >, 1, 0 > strokes;
+ };
+
+ // C++ wrapper for general_property
+ struct general_property : ObjectHelper<general_property,3> { general_property() : Object("general_property") {}
+ identifier::Out id;
+ label::Out name;
+ Maybe< text::Out > description;
+ };
+
+ // C++ wrapper for characteristic_data_column_header
+ struct characteristic_data_column_header : general_property, ObjectHelper<characteristic_data_column_header,0> { characteristic_data_column_header() : Object("characteristic_data_column_header") {}
+
+ };
+
+ // C++ wrapper for general_property_relationship
+ struct general_property_relationship : ObjectHelper<general_property_relationship,4> { general_property_relationship() : Object("general_property_relationship") {}
+ label::Out name;
+ Maybe< text::Out > description;
+ Lazy< general_property > relating_property;
+ Lazy< general_property > related_property;
+ };
+
+ // C++ wrapper for characteristic_data_column_header_link
+ struct characteristic_data_column_header_link : general_property_relationship, ObjectHelper<characteristic_data_column_header_link,0> { characteristic_data_column_header_link() : Object("characteristic_data_column_header_link") {}
+
+ };
+
+ // C++ wrapper for characteristic_data_table_header
+ struct characteristic_data_table_header : general_property, ObjectHelper<characteristic_data_table_header,0> { characteristic_data_table_header() : Object("characteristic_data_table_header") {}
+
+ };
+
+ // C++ wrapper for characteristic_data_table_header_decomposition
+ struct characteristic_data_table_header_decomposition : general_property_relationship, ObjectHelper<characteristic_data_table_header_decomposition,0> { characteristic_data_table_header_decomposition() : Object("characteristic_data_table_header_decomposition") {}
+
+ };
+
+ // C++ wrapper for group
+ struct group : ObjectHelper<group,2> { group() : Object("group") {}
+ label::Out name;
+ Maybe< text::Out > description;
+ };
+
+ // C++ wrapper for characteristic_type
+ struct characteristic_type : group, ObjectHelper<characteristic_type,0> { characteristic_type() : Object("characteristic_type") {}
+
+ };
+
+ // C++ wrapper for characterized_class
+ struct characterized_class : ObjectHelper<characterized_class,0> { characterized_class() : Object("characterized_class") {}
+
+ };
+
+ // C++ wrapper for characterized_object
+ struct characterized_object : ObjectHelper<characterized_object,2> { characterized_object() : Object("characterized_object") {}
+ label::Out name;
+ Maybe< text::Out > description;
+ };
+
+ // C++ wrapper for conic
+ struct conic : curve, ObjectHelper<conic,1> { conic() : Object("conic") {}
+ axis2_placement::Out position;
+ };
+
+ // C++ wrapper for circle
+ struct circle : conic, ObjectHelper<circle,1> { circle() : Object("circle") {}
+ positive_length_measure::Out radius;
+ };
+
+ // C++ wrapper for circular_runout_tolerance
+ struct circular_runout_tolerance : geometric_tolerance_with_datum_reference, ObjectHelper<circular_runout_tolerance,0> { circular_runout_tolerance() : Object("circular_runout_tolerance") {}
+
+ };
+
+ // C++ wrapper for class_by_extension
+ struct class_by_extension : class_t, ObjectHelper<class_by_extension,0> { class_by_extension() : Object("class_by_extension") {}
+
+ };
+
+ // C++ wrapper for class_by_intension
+ struct class_by_intension : class_t, ObjectHelper<class_by_intension,0> { class_by_intension() : Object("class_by_intension") {}
+
+ };
+
+ // C++ wrapper for class_system
+ struct class_system : group, ObjectHelper<class_system,0> { class_system() : Object("class_system") {}
+
+ };
+
+ // C++ wrapper for effectivity_context_assignment
+ struct effectivity_context_assignment : ObjectHelper<effectivity_context_assignment,2> { effectivity_context_assignment() : Object("effectivity_context_assignment") {}
+ Lazy< effectivity_assignment > assigned_effectivity_assignment;
+ Lazy< NotImplemented > role;
+ };
+
+ // C++ wrapper for class_usage_effectivity_context_assignment
+ struct class_usage_effectivity_context_assignment : effectivity_context_assignment, ObjectHelper<class_usage_effectivity_context_assignment,1> { class_usage_effectivity_context_assignment() : Object("class_usage_effectivity_context_assignment") {}
+ ListOf< class_usage_effectivity_context_item, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for topological_representation_item
+ struct topological_representation_item : representation_item, ObjectHelper<topological_representation_item,0> { topological_representation_item() : Object("topological_representation_item") {}
+
+ };
+
+ // C++ wrapper for connected_face_set
+ struct connected_face_set : topological_representation_item, ObjectHelper<connected_face_set,1> { connected_face_set() : Object("connected_face_set") {}
+ ListOf< Lazy< face >, 1, 0 > cfs_faces;
+ };
+
+ // C++ wrapper for closed_shell
+ struct closed_shell : connected_face_set, ObjectHelper<closed_shell,0> { closed_shell() : Object("closed_shell") {}
+
+ };
+
+ // C++ wrapper for coaxiality_tolerance
+ struct coaxiality_tolerance : geometric_tolerance_with_datum_reference, ObjectHelper<coaxiality_tolerance,0> { coaxiality_tolerance() : Object("coaxiality_tolerance") {}
+
+ };
+
+ // C++ wrapper for colour_specification
+ struct colour_specification : colour, ObjectHelper<colour_specification,1> { colour_specification() : Object("colour_specification") {}
+ label::Out name;
+ };
+
+ // C++ wrapper for colour_rgb
+ struct colour_rgb : colour_specification, ObjectHelper<colour_rgb,3> { colour_rgb() : Object("colour_rgb") {}
+ REAL::Out red;
+ REAL::Out green;
+ REAL::Out blue;
+ };
+
+ // C++ wrapper for common_datum
+ struct common_datum : ObjectHelper<common_datum,0> { common_datum() : Object("common_datum") {}
+
+ };
+
+ // C++ wrapper for comparison_expression
+ struct comparison_expression : ObjectHelper<comparison_expression,0> { comparison_expression() : Object("comparison_expression") {}
+
+ };
+
+ // C++ wrapper for complex_clause
+ struct complex_clause : compound_representation_item, ObjectHelper<complex_clause,0> { complex_clause() : Object("complex_clause") {}
+
+ };
+
+ // C++ wrapper for complex_conjunctive_clause
+ struct complex_conjunctive_clause : complex_clause, ObjectHelper<complex_conjunctive_clause,0> { complex_conjunctive_clause() : Object("complex_conjunctive_clause") {}
+
+ };
+
+ // C++ wrapper for complex_disjunctive_clause
+ struct complex_disjunctive_clause : complex_clause, ObjectHelper<complex_disjunctive_clause,0> { complex_disjunctive_clause() : Object("complex_disjunctive_clause") {}
+
+ };
+
+ // C++ wrapper for modified_solid
+ struct modified_solid : solid_model, ObjectHelper<modified_solid,2> { modified_solid() : Object("modified_solid") {}
+ text::Out rationale;
+ base_solid_select::Out base_solid;
+ };
+
+ // C++ wrapper for shelled_solid
+ struct shelled_solid : modified_solid, ObjectHelper<shelled_solid,2> { shelled_solid() : Object("shelled_solid") {}
+ ListOf< Lazy< face_surface >, 1, 0 > deleted_face_set;
+ length_measure::Out thickness;
+ };
+
+ // C++ wrapper for complex_shelled_solid
+ struct complex_shelled_solid : shelled_solid, ObjectHelper<complex_shelled_solid,1> { complex_shelled_solid() : Object("complex_shelled_solid") {}
+ ListOf< length_measure, 1, 0 >::Out thickness_list;
+ };
+
+ // C++ wrapper for composite_assembly_definition
+ struct composite_assembly_definition : product_definition, ObjectHelper<composite_assembly_definition,0> { composite_assembly_definition() : Object("composite_assembly_definition") {}
+
+ };
+
+ // C++ wrapper for composite_assembly_sequence_definition
+ struct composite_assembly_sequence_definition : product_definition, ObjectHelper<composite_assembly_sequence_definition,0> { composite_assembly_sequence_definition() : Object("composite_assembly_sequence_definition") {}
+
+ };
+
+ // C++ wrapper for laminate_table
+ struct laminate_table : product_definition, ObjectHelper<laminate_table,0> { laminate_table() : Object("laminate_table") {}
+
+ };
+
+ // C++ wrapper for part_laminate_table
+ struct part_laminate_table : laminate_table, ObjectHelper<part_laminate_table,0> { part_laminate_table() : Object("part_laminate_table") {}
+
+ };
+
+ // C++ wrapper for composite_assembly_table
+ struct composite_assembly_table : part_laminate_table, ObjectHelper<composite_assembly_table,0> { composite_assembly_table() : Object("composite_assembly_table") {}
+
+ };
+
+ // C++ wrapper for composite_curve_segment
+ struct composite_curve_segment : founded_item, ObjectHelper<composite_curve_segment,3> { composite_curve_segment() : Object("composite_curve_segment") {}
+ transition_code::Out transition;
+ BOOLEAN::Out same_sense;
+ Lazy< curve > parent_curve;
+ };
+
+ // C++ wrapper for material_designation
+ struct material_designation : ObjectHelper<material_designation,2> { material_designation() : Object("material_designation") {}
+ label::Out name;
+ ListOf< characterized_definition, 1, 0 >::Out definitions;
+ };
+
+ // C++ wrapper for composite_material_designation
+ struct composite_material_designation : material_designation, ObjectHelper<composite_material_designation,0> { composite_material_designation() : Object("composite_material_designation") {}
+
+ };
+
+ // C++ wrapper for composite_shape_aspect
+ struct composite_shape_aspect : shape_aspect, ObjectHelper<composite_shape_aspect,0> { composite_shape_aspect() : Object("composite_shape_aspect") {}
+
+ };
+
+ // C++ wrapper for composite_sheet_representation
+ struct composite_sheet_representation : shape_representation, ObjectHelper<composite_sheet_representation,0> { composite_sheet_representation() : Object("composite_sheet_representation") {}
+
+ };
+
+ // C++ wrapper for composite_text
+ struct composite_text : geometric_representation_item, ObjectHelper<composite_text,1> { composite_text() : Object("composite_text") {}
+ ListOf< text_or_character, 2, 0 >::Out collected_text;
+ };
+
+ // C++ wrapper for composite_text_with_associated_curves
+ struct composite_text_with_associated_curves : composite_text, ObjectHelper<composite_text_with_associated_curves,1> { composite_text_with_associated_curves() : Object("composite_text_with_associated_curves") {}
+ ListOf< Lazy< curve >, 1, 0 > associated_curves;
+ };
+
+ // C++ wrapper for composite_text_with_blanking_box
+ struct composite_text_with_blanking_box : composite_text, ObjectHelper<composite_text_with_blanking_box,1> { composite_text_with_blanking_box() : Object("composite_text_with_blanking_box") {}
+ Lazy< planar_box > blanking;
+ };
+
+ // C++ wrapper for composite_text_with_delineation
+ struct composite_text_with_delineation : composite_text, ObjectHelper<composite_text_with_delineation,1> { composite_text_with_delineation() : Object("composite_text_with_delineation") {}
+ text_delineation::Out delineation;
+ };
+
+ // C++ wrapper for composite_text_with_extent
+ struct composite_text_with_extent : composite_text, ObjectHelper<composite_text_with_extent,1> { composite_text_with_extent() : Object("composite_text_with_extent") {}
+ Lazy< planar_extent > extent;
+ };
+
+ // C++ wrapper for compound_shape_representation
+ struct compound_shape_representation : shape_representation, ObjectHelper<compound_shape_representation,0> { compound_shape_representation() : Object("compound_shape_representation") {}
+
+ };
+
+ // C++ wrapper for concentricity_tolerance
+ struct concentricity_tolerance : geometric_tolerance_with_datum_reference, ObjectHelper<concentricity_tolerance,0> { concentricity_tolerance() : Object("concentricity_tolerance") {}
+
+ };
+
+ // C++ wrapper for concept_feature_relationship
+ struct concept_feature_relationship : ObjectHelper<concept_feature_relationship,4> { concept_feature_relationship() : Object("concept_feature_relationship") {}
+ label::Out name;
+ Maybe< text::Out > description;
+ Lazy< product_concept_feature > relating_product_concept_feature;
+ Lazy< product_concept_feature > related_product_concept_feature;
+ };
+
+ // C++ wrapper for concept_feature_relationship_with_condition
+ struct concept_feature_relationship_with_condition : concept_feature_relationship, ObjectHelper<concept_feature_relationship_with_condition,1> { concept_feature_relationship_with_condition() : Object("concept_feature_relationship_with_condition") {}
+ Lazy< NotImplemented > conditional_operator;
+ };
+
+ // C++ wrapper for product_concept_feature
+ struct product_concept_feature : ObjectHelper<product_concept_feature,3> { product_concept_feature() : Object("product_concept_feature") {}
+ identifier::Out id;
+ label::Out name;
+ Maybe< text::Out > description;
+ };
+
+ // C++ wrapper for conditional_concept_feature
+ struct conditional_concept_feature : product_concept_feature, ObjectHelper<conditional_concept_feature,1> { conditional_concept_feature() : Object("conditional_concept_feature") {}
+ Lazy< concept_feature_relationship_with_condition > condition;
+ };
+
+ // C++ wrapper for conductance_measure_with_unit
+ struct conductance_measure_with_unit : measure_with_unit, ObjectHelper<conductance_measure_with_unit,0> { conductance_measure_with_unit() : Object("conductance_measure_with_unit") {}
+
+ };
+
+ // C++ wrapper for conductance_unit
+ struct conductance_unit : derived_unit, ObjectHelper<conductance_unit,0> { conductance_unit() : Object("conductance_unit") {}
+
+ };
+
+ // C++ wrapper for configuration_item
+ struct configuration_item : ObjectHelper<configuration_item,5> { configuration_item() : Object("configuration_item") {}
+ identifier::Out id;
+ label::Out name;
+ Maybe< text::Out > description;
+ Lazy< NotImplemented > item_concept;
+ Maybe< label::Out > purpose;
+ };
+
+ // C++ wrapper for configurable_item
+ struct configurable_item : configuration_item, ObjectHelper<configurable_item,1> { configurable_item() : Object("configurable_item") {}
+ ListOf< Lazy< NotImplemented >, 1, 0 > item_concept_feature;
+ };
+
+ // C++ wrapper for effectivity
+ struct effectivity : ObjectHelper<effectivity,1> { effectivity() : Object("effectivity") {}
+ identifier::Out id;
+ };
+
+ // C++ wrapper for product_definition_effectivity
+ struct product_definition_effectivity : effectivity, ObjectHelper<product_definition_effectivity,1> { product_definition_effectivity() : Object("product_definition_effectivity") {}
+ Lazy< product_definition_relationship > usage;
+ };
+
+ // C++ wrapper for configuration_effectivity
+ struct configuration_effectivity : product_definition_effectivity, ObjectHelper<configuration_effectivity,1> { configuration_effectivity() : Object("configuration_effectivity") {}
+ Lazy< NotImplemented > configuration;
+ };
+
+ // C++ wrapper for configuration_item_relationship
+ struct configuration_item_relationship : ObjectHelper<configuration_item_relationship,4> { configuration_item_relationship() : Object("configuration_item_relationship") {}
+ label::Out name;
+ Maybe< text::Out > description;
+ Lazy< configuration_item > relating_configuration_item;
+ Lazy< configuration_item > related_configuration_item;
+ };
+
+ // C++ wrapper for configuration_item_hierarchical_relationship
+ struct configuration_item_hierarchical_relationship : configuration_item_relationship, ObjectHelper<configuration_item_hierarchical_relationship,0> { configuration_item_hierarchical_relationship() : Object("configuration_item_hierarchical_relationship") {}
+
+ };
+
+ // C++ wrapper for configuration_item_revision_sequence
+ struct configuration_item_revision_sequence : configuration_item_relationship, ObjectHelper<configuration_item_revision_sequence,0> { configuration_item_revision_sequence() : Object("configuration_item_revision_sequence") {}
+
+ };
+
+ // C++ wrapper for configured_effectivity_assignment
+ struct configured_effectivity_assignment : effectivity_assignment, ObjectHelper<configured_effectivity_assignment,1> { configured_effectivity_assignment() : Object("configured_effectivity_assignment") {}
+ ListOf< configured_effectivity_item, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for configured_effectivity_context_assignment
+ struct configured_effectivity_context_assignment : effectivity_context_assignment, ObjectHelper<configured_effectivity_context_assignment,1> { configured_effectivity_context_assignment() : Object("configured_effectivity_context_assignment") {}
+ ListOf< configured_effectivity_context_item, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for conical_stepped_hole_transition
+ struct conical_stepped_hole_transition : geometric_representation_item, ObjectHelper<conical_stepped_hole_transition,3> { conical_stepped_hole_transition() : Object("conical_stepped_hole_transition") {}
+ positive_integer::Out transition_number;
+ plane_angle_measure::Out cone_apex_angle;
+ positive_length_measure::Out cone_base_radius;
+ };
+
+ // C++ wrapper for elementary_surface
+ struct elementary_surface : surface, ObjectHelper<elementary_surface,1> { elementary_surface() : Object("elementary_surface") {}
+ Lazy< axis2_placement_3d > position;
+ };
+
+ // C++ wrapper for conical_surface
+ struct conical_surface : elementary_surface, ObjectHelper<conical_surface,2> { conical_surface() : Object("conical_surface") {}
+ length_measure::Out radius;
+ plane_angle_measure::Out semi_angle;
+ };
+
+ // C++ wrapper for connected_edge_set
+ struct connected_edge_set : topological_representation_item, ObjectHelper<connected_edge_set,1> { connected_edge_set() : Object("connected_edge_set") {}
+ ListOf< Lazy< edge >, 1, 0 > ces_edges;
+ };
+
+ // C++ wrapper for connected_face_sub_set
+ struct connected_face_sub_set : connected_face_set, ObjectHelper<connected_face_sub_set,1> { connected_face_sub_set() : Object("connected_face_sub_set") {}
+ Lazy< connected_face_set > parent_face_set;
+ };
+
+ // C++ wrapper for constructive_geometry_representation
+ struct constructive_geometry_representation : representation, ObjectHelper<constructive_geometry_representation,0> { constructive_geometry_representation() : Object("constructive_geometry_representation") {}
+
+ };
+
+ // C++ wrapper for representation_relationship
+ struct representation_relationship : ObjectHelper<representation_relationship,4> { representation_relationship() : Object("representation_relationship") {}
+ label::Out name;
+ Maybe< text::Out > description;
+ Lazy< representation > rep_1;
+ Lazy< representation > rep_2;
+ };
+
+ // C++ wrapper for constructive_geometry_representation_relationship
+ struct constructive_geometry_representation_relationship : representation_relationship, ObjectHelper<constructive_geometry_representation_relationship,0> { constructive_geometry_representation_relationship() : Object("constructive_geometry_representation_relationship") {}
+
+ };
+
+ // C++ wrapper for contact_ratio_representation
+ struct contact_ratio_representation : representation, ObjectHelper<contact_ratio_representation,0> { contact_ratio_representation() : Object("contact_ratio_representation") {}
+
+ };
+
+ // C++ wrapper for invisibility
+ struct invisibility : ObjectHelper<invisibility,1> { invisibility() : Object("invisibility") {}
+ ListOf< invisible_item, 1, 0 >::Out invisible_items;
+ };
+
+ // C++ wrapper for context_dependent_invisibility
+ struct context_dependent_invisibility : invisibility, ObjectHelper<context_dependent_invisibility,1> { context_dependent_invisibility() : Object("context_dependent_invisibility") {}
+ invisibility_context::Out presentation_context;
+ };
+
+ // C++ wrapper for over_riding_styled_item
+ struct over_riding_styled_item : styled_item, ObjectHelper<over_riding_styled_item,1> { over_riding_styled_item() : Object("over_riding_styled_item") {}
+ Lazy< styled_item > over_ridden_style;
+ };
+
+ // C++ wrapper for context_dependent_over_riding_styled_item
+ struct context_dependent_over_riding_styled_item : over_riding_styled_item, ObjectHelper<context_dependent_over_riding_styled_item,1> { context_dependent_over_riding_styled_item() : Object("context_dependent_over_riding_styled_item") {}
+ ListOf< style_context_select, 1, 0 >::Out style_context;
+ };
+
+ // C++ wrapper for context_dependent_unit
+ struct context_dependent_unit : named_unit, ObjectHelper<context_dependent_unit,1> { context_dependent_unit() : Object("context_dependent_unit") {}
+ label::Out name;
+ };
+
+ // C++ wrapper for conversion_based_unit
+ struct conversion_based_unit : named_unit, ObjectHelper<conversion_based_unit,2> { conversion_based_unit() : Object("conversion_based_unit") {}
+ label::Out name;
+ Lazy< measure_with_unit > conversion_factor;
+ };
+
+ // C++ wrapper for csg_shape_representation
+ struct csg_shape_representation : shape_representation, ObjectHelper<csg_shape_representation,0> { csg_shape_representation() : Object("csg_shape_representation") {}
+
+ };
+
+ // C++ wrapper for csg_solid
+ struct csg_solid : solid_model, ObjectHelper<csg_solid,1> { csg_solid() : Object("csg_solid") {}
+ csg_select::Out tree_root_expression;
+ };
+
+ // C++ wrapper for currency
+ struct currency : context_dependent_unit, ObjectHelper<currency,0> { currency() : Object("currency") {}
+
+ };
+
+ // C++ wrapper for currency_measure_with_unit
+ struct currency_measure_with_unit : measure_with_unit, ObjectHelper<currency_measure_with_unit,0> { currency_measure_with_unit() : Object("currency_measure_with_unit") {}
+
+ };
+
+ // C++ wrapper for curve_bounded_surface
+ struct curve_bounded_surface : bounded_surface, ObjectHelper<curve_bounded_surface,3> { curve_bounded_surface() : Object("curve_bounded_surface") {}
+ Lazy< surface > basis_surface;
+ ListOf< Lazy< boundary_curve >, 1, 0 > boundaries;
+ BOOLEAN::Out implicit_outer;
+ };
+
+ // C++ wrapper for curve_dimension
+ struct curve_dimension : dimension_curve_directed_callout, ObjectHelper<curve_dimension,0> { curve_dimension() : Object("curve_dimension") {}
+
+ };
+
+ // C++ wrapper for curve_replica
+ struct curve_replica : curve, ObjectHelper<curve_replica,2> { curve_replica() : Object("curve_replica") {}
+ Lazy< curve > parent_curve;
+ Lazy< cartesian_transformation_operator > transformation;
+ };
+
+ // C++ wrapper for curve_style
+ struct curve_style : founded_item, ObjectHelper<curve_style,4> { curve_style() : Object("curve_style") {}
+ label::Out name;
+ curve_font_or_scaled_curve_font_select::Out curve_font;
+ size_select::Out curve_width;
+ Lazy< colour > curve_colour;
+ };
+
+ // C++ wrapper for curve_style_font
+ struct curve_style_font : founded_item, ObjectHelper<curve_style_font,2> { curve_style_font() : Object("curve_style_font") {}
+ label::Out name;
+ ListOf< Lazy< curve_style_font_pattern >, 1, 0 > pattern_list;
+ };
+
+ // C++ wrapper for curve_style_font_and_scaling
+ struct curve_style_font_and_scaling : founded_item, ObjectHelper<curve_style_font_and_scaling,3> { curve_style_font_and_scaling() : Object("curve_style_font_and_scaling") {}
+ label::Out name;
+ curve_style_font_select::Out curve_font;
+ REAL::Out curve_font_scaling;
+ };
+
+ // C++ wrapper for curve_style_font_pattern
+ struct curve_style_font_pattern : founded_item, ObjectHelper<curve_style_font_pattern,2> { curve_style_font_pattern() : Object("curve_style_font_pattern") {}
+ positive_length_measure::Out visible_segment_length;
+ positive_length_measure::Out invisible_segment_length;
+ };
+
+ // C++ wrapper for curve_swept_solid_shape_representation
+ struct curve_swept_solid_shape_representation : shape_representation, ObjectHelper<curve_swept_solid_shape_representation,0> { curve_swept_solid_shape_representation() : Object("curve_swept_solid_shape_representation") {}
+
+ };
+
+ // C++ wrapper for cylindrical_surface
+ struct cylindrical_surface : elementary_surface, ObjectHelper<cylindrical_surface,1> { cylindrical_surface() : Object("cylindrical_surface") {}
+ positive_length_measure::Out radius;
+ };
+
+ // C++ wrapper for cylindricity_tolerance
+ struct cylindricity_tolerance : geometric_tolerance, ObjectHelper<cylindricity_tolerance,0> { cylindricity_tolerance() : Object("cylindricity_tolerance") {}
+
+ };
+
+ // C++ wrapper for date_representation_item
+ struct date_representation_item : ObjectHelper<date_representation_item,0> { date_representation_item() : Object("date_representation_item") {}
+
+ };
+
+ // C++ wrapper for date_time_representation_item
+ struct date_time_representation_item : ObjectHelper<date_time_representation_item,0> { date_time_representation_item() : Object("date_time_representation_item") {}
+
+ };
+
+ // C++ wrapper for dated_effectivity
+ struct dated_effectivity : effectivity, ObjectHelper<dated_effectivity,2> { dated_effectivity() : Object("dated_effectivity") {}
+ Maybe< date_time_or_event_occurrence::Out > effectivity_end_date;
+ date_time_or_event_occurrence::Out effectivity_start_date;
+ };
+
+ // C++ wrapper for datum
+ struct datum : shape_aspect, ObjectHelper<datum,1> { datum() : Object("datum") {}
+ identifier::Out identification;
+ };
+
+ // C++ wrapper for datum_feature
+ struct datum_feature : shape_aspect, ObjectHelper<datum_feature,0> { datum_feature() : Object("datum_feature") {}
+
+ };
+
+ // C++ wrapper for datum_feature_callout
+ struct datum_feature_callout : draughting_callout, ObjectHelper<datum_feature_callout,0> { datum_feature_callout() : Object("datum_feature_callout") {}
+
+ };
+
+ // C++ wrapper for datum_reference
+ struct datum_reference : ObjectHelper<datum_reference,2> { datum_reference() : Object("datum_reference") {}
+ INTEGER::Out precedence;
+ Lazy< datum > referenced_datum;
+ };
+
+ // C++ wrapper for datum_target
+ struct datum_target : shape_aspect, ObjectHelper<datum_target,1> { datum_target() : Object("datum_target") {}
+ identifier::Out target_id;
+ };
+
+ // C++ wrapper for datum_target_callout
+ struct datum_target_callout : draughting_callout, ObjectHelper<datum_target_callout,0> { datum_target_callout() : Object("datum_target_callout") {}
+
+ };
+
+ // C++ wrapper for default_tolerance_table
+ struct default_tolerance_table : representation, ObjectHelper<default_tolerance_table,0> { default_tolerance_table() : Object("default_tolerance_table") {}
+
+ };
+
+ // C++ wrapper for default_tolerance_table_cell
+ struct default_tolerance_table_cell : compound_representation_item, ObjectHelper<default_tolerance_table_cell,0> { default_tolerance_table_cell() : Object("default_tolerance_table_cell") {}
+
+ };
+
+ // C++ wrapper for defined_symbol
+ struct defined_symbol : geometric_representation_item, ObjectHelper<defined_symbol,2> { defined_symbol() : Object("defined_symbol") {}
+ defined_symbol_select::Out definition;
+ Lazy< symbol_target > target;
+ };
+
+ // C++ wrapper for definitional_representation
+ struct definitional_representation : representation, ObjectHelper<definitional_representation,0> { definitional_representation() : Object("definitional_representation") {}
+
+ };
+
+ // C++ wrapper for definitional_representation_relationship
+ struct definitional_representation_relationship : representation_relationship, ObjectHelper<definitional_representation_relationship,0> { definitional_representation_relationship() : Object("definitional_representation_relationship") {}
+
+ };
+
+ // C++ wrapper for definitional_representation_relationship_with_same_context
+ struct definitional_representation_relationship_with_same_context : definitional_representation_relationship, ObjectHelper<definitional_representation_relationship_with_same_context,0> { definitional_representation_relationship_with_same_context() : Object("definitional_representation_relationship_with_same_context") {}
+
+ };
+
+ // C++ wrapper for degenerate_pcurve
+ struct degenerate_pcurve : point, ObjectHelper<degenerate_pcurve,2> { degenerate_pcurve() : Object("degenerate_pcurve") {}
+ Lazy< surface > basis_surface;
+ Lazy< definitional_representation > reference_to_curve;
+ };
+
+ // C++ wrapper for toroidal_surface
+ struct toroidal_surface : elementary_surface, ObjectHelper<toroidal_surface,2> { toroidal_surface() : Object("toroidal_surface") {}
+ positive_length_measure::Out major_radius;
+ positive_length_measure::Out minor_radius;
+ };
+
+ // C++ wrapper for degenerate_toroidal_surface
+ struct degenerate_toroidal_surface : toroidal_surface, ObjectHelper<degenerate_toroidal_surface,1> { degenerate_toroidal_surface() : Object("degenerate_toroidal_surface") {}
+ BOOLEAN::Out select_outer;
+ };
+
+ // C++ wrapper for descriptive_representation_item
+ struct descriptive_representation_item : representation_item, ObjectHelper<descriptive_representation_item,1> { descriptive_representation_item() : Object("descriptive_representation_item") {}
+ text::Out description;
+ };
+
+ // C++ wrapper for product_definition_context
+ struct product_definition_context : application_context_element, ObjectHelper<product_definition_context,1> { product_definition_context() : Object("product_definition_context") {}
+ label::Out life_cycle_stage;
+ };
+
+ // C++ wrapper for design_context
+ struct design_context : product_definition_context, ObjectHelper<design_context,0> { design_context() : Object("design_context") {}
+
+ };
+
+ // C++ wrapper for design_make_from_relationship
+ struct design_make_from_relationship : product_definition_relationship, ObjectHelper<design_make_from_relationship,0> { design_make_from_relationship() : Object("design_make_from_relationship") {}
+
+ };
+
+ // C++ wrapper for diameter_dimension
+ struct diameter_dimension : dimension_curve_directed_callout, ObjectHelper<diameter_dimension,0> { diameter_dimension() : Object("diameter_dimension") {}
+
+ };
+
+ // C++ wrapper for ratio_measure_with_unit
+ struct ratio_measure_with_unit : measure_with_unit, ObjectHelper<ratio_measure_with_unit,0> { ratio_measure_with_unit() : Object("ratio_measure_with_unit") {}
+
+ };
+
+ // C++ wrapper for dielectric_constant_measure_with_unit
+ struct dielectric_constant_measure_with_unit : ratio_measure_with_unit, ObjectHelper<dielectric_constant_measure_with_unit,0> { dielectric_constant_measure_with_unit() : Object("dielectric_constant_measure_with_unit") {}
+
+ };
+
+ // C++ wrapper for dimension_callout
+ struct dimension_callout : draughting_callout, ObjectHelper<dimension_callout,0> { dimension_callout() : Object("dimension_callout") {}
+
+ };
+
+ // C++ wrapper for draughting_callout_relationship
+ struct draughting_callout_relationship : ObjectHelper<draughting_callout_relationship,4> { draughting_callout_relationship() : Object("draughting_callout_relationship") {}
+ label::Out name;
+ text::Out description;
+ Lazy< draughting_callout > relating_draughting_callout;
+ Lazy< draughting_callout > related_draughting_callout;
+ };
+
+ // C++ wrapper for dimension_callout_component_relationship
+ struct dimension_callout_component_relationship : draughting_callout_relationship, ObjectHelper<dimension_callout_component_relationship,0> { dimension_callout_component_relationship() : Object("dimension_callout_component_relationship") {}
+
+ };
+
+ // C++ wrapper for dimension_callout_relationship
+ struct dimension_callout_relationship : draughting_callout_relationship, ObjectHelper<dimension_callout_relationship,0> { dimension_callout_relationship() : Object("dimension_callout_relationship") {}
+
+ };
+
+ // C++ wrapper for dimension_curve
+ struct dimension_curve : annotation_curve_occurrence, ObjectHelper<dimension_curve,0> { dimension_curve() : Object("dimension_curve") {}
+
+ };
+
+ // C++ wrapper for terminator_symbol
+ struct terminator_symbol : annotation_symbol_occurrence, ObjectHelper<terminator_symbol,1> { terminator_symbol() : Object("terminator_symbol") {}
+ Lazy< annotation_curve_occurrence > annotated_curve;
+ };
+
+ // C++ wrapper for dimension_curve_terminator
+ struct dimension_curve_terminator : terminator_symbol, ObjectHelper<dimension_curve_terminator,1> { dimension_curve_terminator() : Object("dimension_curve_terminator") {}
+ dimension_extent_usage::Out role;
+ };
+
+ // C++ wrapper for dimension_curve_terminator_to_projection_curve_associativity
+ struct dimension_curve_terminator_to_projection_curve_associativity : annotation_occurrence_associativity, ObjectHelper<dimension_curve_terminator_to_projection_curve_associativity,0> { dimension_curve_terminator_to_projection_curve_associativity() : Object("dimension_curve_terminator_to_projection_curve_associativity") {}
+
+ };
+
+ // C++ wrapper for dimension_pair
+ struct dimension_pair : draughting_callout_relationship, ObjectHelper<dimension_pair,0> { dimension_pair() : Object("dimension_pair") {}
+
+ };
+
+ // C++ wrapper for dimension_text_associativity
+ struct dimension_text_associativity : ObjectHelper<dimension_text_associativity,0> { dimension_text_associativity() : Object("dimension_text_associativity") {}
+
+ };
+
+ // C++ wrapper for dimensional_location_with_path
+ struct dimensional_location_with_path : dimensional_location, ObjectHelper<dimensional_location_with_path,1> { dimensional_location_with_path() : Object("dimensional_location_with_path") {}
+ Lazy< shape_aspect > path;
+ };
+
+ // C++ wrapper for dimensional_size_with_path
+ struct dimensional_size_with_path : dimensional_size, ObjectHelper<dimensional_size_with_path,1> { dimensional_size_with_path() : Object("dimensional_size_with_path") {}
+ Lazy< shape_aspect > path;
+ };
+
+ // C++ wrapper for executed_action
+ struct executed_action : action, ObjectHelper<executed_action,0> { executed_action() : Object("executed_action") {}
+
+ };
+
+ // C++ wrapper for directed_action
+ struct directed_action : executed_action, ObjectHelper<directed_action,1> { directed_action() : Object("directed_action") {}
+ Lazy< NotImplemented > directive;
+ };
+
+ // C++ wrapper for directed_dimensional_location
+ struct directed_dimensional_location : dimensional_location, ObjectHelper<directed_dimensional_location,0> { directed_dimensional_location() : Object("directed_dimensional_location") {}
+
+ };
+
+ // C++ wrapper for direction
+ struct direction : geometric_representation_item, ObjectHelper<direction,1> { direction() : Object("direction") {}
+ ListOf< REAL, 2, 3 >::Out direction_ratios;
+ };
+
+ // C++ wrapper for document_file
+ struct document_file : ObjectHelper<document_file,0> { document_file() : Object("document_file") {}
+
+ };
+
+ // C++ wrapper for document_identifier
+ struct document_identifier : group, ObjectHelper<document_identifier,0> { document_identifier() : Object("document_identifier") {}
+
+ };
+
+ // C++ wrapper for document_identifier_assignment
+ struct document_identifier_assignment : group_assignment, ObjectHelper<document_identifier_assignment,1> { document_identifier_assignment() : Object("document_identifier_assignment") {}
+ ListOf< document_identifier_assigned_item, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for document_product_association
+ struct document_product_association : ObjectHelper<document_product_association,4> { document_product_association() : Object("document_product_association") {}
+ label::Out name;
+ Maybe< text::Out > description;
+ Lazy< NotImplemented > relating_document;
+ product_or_formation_or_definition::Out related_product;
+ };
+
+ // C++ wrapper for document_product_equivalence
+ struct document_product_equivalence : document_product_association, ObjectHelper<document_product_equivalence,0> { document_product_equivalence() : Object("document_product_equivalence") {}
+
+ };
+
+ // C++ wrapper for dose_equivalent_measure_with_unit
+ struct dose_equivalent_measure_with_unit : measure_with_unit, ObjectHelper<dose_equivalent_measure_with_unit,0> { dose_equivalent_measure_with_unit() : Object("dose_equivalent_measure_with_unit") {}
+
+ };
+
+ // C++ wrapper for dose_equivalent_unit
+ struct dose_equivalent_unit : derived_unit, ObjectHelper<dose_equivalent_unit,0> { dose_equivalent_unit() : Object("dose_equivalent_unit") {}
+
+ };
+
+ // C++ wrapper for double_offset_shelled_solid
+ struct double_offset_shelled_solid : shelled_solid, ObjectHelper<double_offset_shelled_solid,1> { double_offset_shelled_solid() : Object("double_offset_shelled_solid") {}
+ length_measure::Out thickness2;
+ };
+
+ // C++ wrapper for item_defined_transformation
+ struct item_defined_transformation : ObjectHelper<item_defined_transformation,4> { item_defined_transformation() : Object("item_defined_transformation") {}
+ label::Out name;
+ Maybe< text::Out > description;
+ Lazy< representation_item > transform_item_1;
+ Lazy< representation_item > transform_item_2;
+ };
+
+ // C++ wrapper for transformation_with_derived_angle
+ struct transformation_with_derived_angle : item_defined_transformation, ObjectHelper<transformation_with_derived_angle,0> { transformation_with_derived_angle() : Object("transformation_with_derived_angle") {}
+
+ };
+
+ // C++ wrapper for draped_defined_transformation
+ struct draped_defined_transformation : transformation_with_derived_angle, ObjectHelper<draped_defined_transformation,0> { draped_defined_transformation() : Object("draped_defined_transformation") {}
+
+ };
+
+ // C++ wrapper for draughting_annotation_occurrence
+ struct draughting_annotation_occurrence : annotation_occurrence, ObjectHelper<draughting_annotation_occurrence,0> { draughting_annotation_occurrence() : Object("draughting_annotation_occurrence") {}
+
+ };
+
+ // C++ wrapper for draughting_elements
+ struct draughting_elements : draughting_callout, ObjectHelper<draughting_elements,0> { draughting_elements() : Object("draughting_elements") {}
+
+ };
+
+ // C++ wrapper for draughting_model
+ struct draughting_model : representation, ObjectHelper<draughting_model,0> { draughting_model() : Object("draughting_model") {}
+
+ };
+
+ // C++ wrapper for item_identified_representation_usage
+ struct item_identified_representation_usage : ObjectHelper<item_identified_representation_usage,5> { item_identified_representation_usage() : Object("item_identified_representation_usage") {}
+ label::Out name;
+ Maybe< text::Out > description;
+ represented_definition::Out definition;
+ Lazy< representation > used_representation;
+ Lazy< representation_item > identified_item;
+ };
+
+ // C++ wrapper for draughting_model_item_association
+ struct draughting_model_item_association : item_identified_representation_usage, ObjectHelper<draughting_model_item_association,0> { draughting_model_item_association() : Object("draughting_model_item_association") {}
+
+ };
+
+ // C++ wrapper for pre_defined_colour
+ struct pre_defined_colour : ObjectHelper<pre_defined_colour,0> { pre_defined_colour() : Object("pre_defined_colour") {}
+
+ };
+
+ // C++ wrapper for draughting_pre_defined_colour
+ struct draughting_pre_defined_colour : pre_defined_colour, ObjectHelper<draughting_pre_defined_colour,0> { draughting_pre_defined_colour() : Object("draughting_pre_defined_colour") {}
+
+ };
+
+ // C++ wrapper for pre_defined_item
+ struct pre_defined_item : ObjectHelper<pre_defined_item,1> { pre_defined_item() : Object("pre_defined_item") {}
+ label::Out name;
+ };
+
+ // C++ wrapper for pre_defined_curve_font
+ struct pre_defined_curve_font : pre_defined_item, ObjectHelper<pre_defined_curve_font,0> { pre_defined_curve_font() : Object("pre_defined_curve_font") {}
+
+ };
+
+ // C++ wrapper for draughting_pre_defined_curve_font
+ struct draughting_pre_defined_curve_font : pre_defined_curve_font, ObjectHelper<draughting_pre_defined_curve_font,0> { draughting_pre_defined_curve_font() : Object("draughting_pre_defined_curve_font") {}
+
+ };
+
+ // C++ wrapper for pre_defined_text_font
+ struct pre_defined_text_font : pre_defined_item, ObjectHelper<pre_defined_text_font,0> { pre_defined_text_font() : Object("pre_defined_text_font") {}
+
+ };
+
+ // C++ wrapper for draughting_pre_defined_text_font
+ struct draughting_pre_defined_text_font : pre_defined_text_font, ObjectHelper<draughting_pre_defined_text_font,0> { draughting_pre_defined_text_font() : Object("draughting_pre_defined_text_font") {}
+
+ };
+
+ // C++ wrapper for draughting_subfigure_representation
+ struct draughting_subfigure_representation : symbol_representation, ObjectHelper<draughting_subfigure_representation,0> { draughting_subfigure_representation() : Object("draughting_subfigure_representation") {}
+
+ };
+
+ // C++ wrapper for draughting_symbol_representation
+ struct draughting_symbol_representation : symbol_representation, ObjectHelper<draughting_symbol_representation,0> { draughting_symbol_representation() : Object("draughting_symbol_representation") {}
+
+ };
+
+ // C++ wrapper for text_literal
+ struct text_literal : geometric_representation_item, ObjectHelper<text_literal,5> { text_literal() : Object("text_literal") {}
+ presentable_text::Out literal;
+ axis2_placement::Out placement;
+ text_alignment::Out alignment;
+ text_path::Out path;
+ font_select::Out font;
+ };
+
+ // C++ wrapper for text_literal_with_delineation
+ struct text_literal_with_delineation : text_literal, ObjectHelper<text_literal_with_delineation,1> { text_literal_with_delineation() : Object("text_literal_with_delineation") {}
+ text_delineation::Out delineation;
+ };
+
+ // C++ wrapper for draughting_text_literal_with_delineation
+ struct draughting_text_literal_with_delineation : text_literal_with_delineation, ObjectHelper<draughting_text_literal_with_delineation,0> { draughting_text_literal_with_delineation() : Object("draughting_text_literal_with_delineation") {}
+
+ };
+
+ // C++ wrapper for presentation_set
+ struct presentation_set : ObjectHelper<presentation_set,0> { presentation_set() : Object("presentation_set") {}
+
+ };
+
+ // C++ wrapper for drawing_revision
+ struct drawing_revision : presentation_set, ObjectHelper<drawing_revision,3> { drawing_revision() : Object("drawing_revision") {}
+ identifier::Out revision_identifier;
+ Lazy< NotImplemented > drawing_identifier;
+ Maybe< text::Out > intended_scale;
+ };
+
+ // C++ wrapper for presentation_representation
+ struct presentation_representation : representation, ObjectHelper<presentation_representation,0> { presentation_representation() : Object("presentation_representation") {}
+
+ };
+
+ // C++ wrapper for presentation_area
+ struct presentation_area : presentation_representation, ObjectHelper<presentation_area,0> { presentation_area() : Object("presentation_area") {}
+
+ };
+
+ // C++ wrapper for drawing_sheet_revision
+ struct drawing_sheet_revision : presentation_area, ObjectHelper<drawing_sheet_revision,1> { drawing_sheet_revision() : Object("drawing_sheet_revision") {}
+ identifier::Out revision_identifier;
+ };
+
+ // C++ wrapper for drawing_sheet_revision_sequence
+ struct drawing_sheet_revision_sequence : representation_relationship, ObjectHelper<drawing_sheet_revision_sequence,0> { drawing_sheet_revision_sequence() : Object("drawing_sheet_revision_sequence") {}
+
+ };
+
+ // C++ wrapper for drawing_sheet_revision_usage
+ struct drawing_sheet_revision_usage : area_in_set, ObjectHelper<drawing_sheet_revision_usage,1> { drawing_sheet_revision_usage() : Object("drawing_sheet_revision_usage") {}
+ identifier::Out sheet_number;
+ };
+
+ // C++ wrapper for edge
+ struct edge : topological_representation_item, ObjectHelper<edge,2> { edge() : Object("edge") {}
+ Lazy< vertex > edge_start;
+ Lazy< vertex > edge_end;
+ };
+
+ // C++ wrapper for edge_based_wireframe_model
+ struct edge_based_wireframe_model : geometric_representation_item, ObjectHelper<edge_based_wireframe_model,1> { edge_based_wireframe_model() : Object("edge_based_wireframe_model") {}
+ ListOf< Lazy< connected_edge_set >, 1, 0 > ebwm_boundary;
+ };
+
+ // C++ wrapper for edge_based_wireframe_shape_representation
+ struct edge_based_wireframe_shape_representation : shape_representation, ObjectHelper<edge_based_wireframe_shape_representation,0> { edge_based_wireframe_shape_representation() : Object("edge_based_wireframe_shape_representation") {}
+
+ };
+
+ // C++ wrapper for edge_blended_solid
+ struct edge_blended_solid : modified_solid, ObjectHelper<edge_blended_solid,1> { edge_blended_solid() : Object("edge_blended_solid") {}
+ ListOf< Lazy< edge_curve >, 1, 0 > blended_edges;
+ };
+
+ // C++ wrapper for edge_curve
+ struct edge_curve : ObjectHelper<edge_curve,2> { edge_curve() : Object("edge_curve") {}
+ Lazy< curve > edge_geometry;
+ BOOLEAN::Out same_sense;
+ };
+
+ // C++ wrapper for edge_loop
+ struct edge_loop : ObjectHelper<edge_loop,0> { edge_loop() : Object("edge_loop") {}
+
+ };
+
+ // C++ wrapper for electric_charge_measure_with_unit
+ struct electric_charge_measure_with_unit : measure_with_unit, ObjectHelper<electric_charge_measure_with_unit,0> { electric_charge_measure_with_unit() : Object("electric_charge_measure_with_unit") {}
+
+ };
+
+ // C++ wrapper for electric_charge_unit
+ struct electric_charge_unit : derived_unit, ObjectHelper<electric_charge_unit,0> { electric_charge_unit() : Object("electric_charge_unit") {}
+
+ };
+
+ // C++ wrapper for electric_current_measure_with_unit
+ struct electric_current_measure_with_unit : measure_with_unit, ObjectHelper<electric_current_measure_with_unit,0> { electric_current_measure_with_unit() : Object("electric_current_measure_with_unit") {}
+
+ };
+
+ // C++ wrapper for electric_current_unit
+ struct electric_current_unit : named_unit, ObjectHelper<electric_current_unit,0> { electric_current_unit() : Object("electric_current_unit") {}
+
+ };
+
+ // C++ wrapper for electric_potential_measure_with_unit
+ struct electric_potential_measure_with_unit : measure_with_unit, ObjectHelper<electric_potential_measure_with_unit,0> { electric_potential_measure_with_unit() : Object("electric_potential_measure_with_unit") {}
+
+ };
+
+ // C++ wrapper for electric_potential_unit
+ struct electric_potential_unit : derived_unit, ObjectHelper<electric_potential_unit,0> { electric_potential_unit() : Object("electric_potential_unit") {}
+
+ };
+
+ // C++ wrapper for elementary_brep_shape_representation
+ struct elementary_brep_shape_representation : shape_representation, ObjectHelper<elementary_brep_shape_representation,0> { elementary_brep_shape_representation() : Object("elementary_brep_shape_representation") {}
+
+ };
+
+ // C++ wrapper for ellipse
+ struct ellipse : conic, ObjectHelper<ellipse,2> { ellipse() : Object("ellipse") {}
+ positive_length_measure::Out semi_axis_1;
+ positive_length_measure::Out semi_axis_2;
+ };
+
+ // C++ wrapper for energy_measure_with_unit
+ struct energy_measure_with_unit : measure_with_unit, ObjectHelper<energy_measure_with_unit,0> { energy_measure_with_unit() : Object("energy_measure_with_unit") {}
+
+ };
+
+ // C++ wrapper for energy_unit
+ struct energy_unit : derived_unit, ObjectHelper<energy_unit,0> { energy_unit() : Object("energy_unit") {}
+
+ };
+
+ // C++ wrapper for property_definition
+ struct property_definition : ObjectHelper<property_definition,3> { property_definition() : Object("property_definition") {}
+ label::Out name;
+ Maybe< text::Out > description;
+ characterized_definition::Out definition;
+ };
+
+ // C++ wrapper for fact_type
+ struct fact_type : property_definition, ObjectHelper<fact_type,0> { fact_type() : Object("fact_type") {}
+
+ };
+
+ // C++ wrapper for entity_assertion
+ struct entity_assertion : fact_type, ObjectHelper<entity_assertion,0> { entity_assertion() : Object("entity_assertion") {}
+
+ };
+
+ // C++ wrapper for enum_reference_prefix
+ struct enum_reference_prefix : descriptive_representation_item, ObjectHelper<enum_reference_prefix,0> { enum_reference_prefix() : Object("enum_reference_prefix") {}
+
+ };
+
+ // C++ wrapper for evaluated_characteristic
+ struct evaluated_characteristic : ObjectHelper<evaluated_characteristic,0> { evaluated_characteristic() : Object("evaluated_characteristic") {}
+
+ };
+
+ // C++ wrapper for evaluated_degenerate_pcurve
+ struct evaluated_degenerate_pcurve : degenerate_pcurve, ObjectHelper<evaluated_degenerate_pcurve,1> { evaluated_degenerate_pcurve() : Object("evaluated_degenerate_pcurve") {}
+ Lazy< cartesian_point > equivalent_point;
+ };
+
+ // C++ wrapper for evaluation_product_definition
+ struct evaluation_product_definition : product_definition, ObjectHelper<evaluation_product_definition,0> { evaluation_product_definition() : Object("evaluation_product_definition") {}
+
+ };
+
+ // C++ wrapper for event_occurrence
+ struct event_occurrence : ObjectHelper<event_occurrence,3> { event_occurrence() : Object("event_occurrence") {}
+ identifier::Out id;
+ label::Out name;
+ Maybe< text::Out > description;
+ };
+
+ // C++ wrapper for product_concept_feature_category
+ struct product_concept_feature_category : group, ObjectHelper<product_concept_feature_category,0> { product_concept_feature_category() : Object("product_concept_feature_category") {}
+
+ };
+
+ // C++ wrapper for exclusive_product_concept_feature_category
+ struct exclusive_product_concept_feature_category : product_concept_feature_category, ObjectHelper<exclusive_product_concept_feature_category,0> { exclusive_product_concept_feature_category() : Object("exclusive_product_concept_feature_category") {}
+
+ };
+
+ // C++ wrapper for uncertainty_qualifier
+ struct uncertainty_qualifier : ObjectHelper<uncertainty_qualifier,2> { uncertainty_qualifier() : Object("uncertainty_qualifier") {}
+ label::Out measure_name;
+ text::Out description;
+ };
+
+ // C++ wrapper for standard_uncertainty
+ struct standard_uncertainty : uncertainty_qualifier, ObjectHelper<standard_uncertainty,1> { standard_uncertainty() : Object("standard_uncertainty") {}
+ REAL::Out uncertainty_value;
+ };
+
+ // C++ wrapper for expanded_uncertainty
+ struct expanded_uncertainty : standard_uncertainty, ObjectHelper<expanded_uncertainty,1> { expanded_uncertainty() : Object("expanded_uncertainty") {}
+ REAL::Out coverage_factor;
+ };
+
+ // C++ wrapper for representation_item_relationship
+ struct representation_item_relationship : ObjectHelper<representation_item_relationship,4> { representation_item_relationship() : Object("representation_item_relationship") {}
+ label::Out name;
+ Maybe< text::Out > description;
+ Lazy< representation_item > relating_representation_item;
+ Lazy< representation_item > related_representation_item;
+ };
+
+ // C++ wrapper for explicit_procedural_representation_item_relationship
+ struct explicit_procedural_representation_item_relationship : representation_item_relationship, ObjectHelper<explicit_procedural_representation_item_relationship,0> { explicit_procedural_representation_item_relationship() : Object("explicit_procedural_representation_item_relationship") {}
+
+ };
+
+ // C++ wrapper for explicit_procedural_geometric_representation_item_relationship
+ struct explicit_procedural_geometric_representation_item_relationship : explicit_procedural_representation_item_relationship, ObjectHelper<explicit_procedural_geometric_representation_item_relationship,0> { explicit_procedural_geometric_representation_item_relationship() : Object("explicit_procedural_geometric_representation_item_relationship") {}
+
+ };
+
+ // C++ wrapper for explicit_procedural_representation_relationship
+ struct explicit_procedural_representation_relationship : representation_relationship, ObjectHelper<explicit_procedural_representation_relationship,0> { explicit_procedural_representation_relationship() : Object("explicit_procedural_representation_relationship") {}
+
+ };
+
+ // C++ wrapper for explicit_procedural_shape_representation_relationship
+ struct explicit_procedural_shape_representation_relationship : explicit_procedural_representation_relationship, ObjectHelper<explicit_procedural_shape_representation_relationship,0> { explicit_procedural_shape_representation_relationship() : Object("explicit_procedural_shape_representation_relationship") {}
+
+ };
+
+ // C++ wrapper for expression_conversion_based_unit
+ struct expression_conversion_based_unit : ObjectHelper<expression_conversion_based_unit,0> { expression_conversion_based_unit() : Object("expression_conversion_based_unit") {}
+
+ };
+
+ // C++ wrapper for extension
+ struct extension : derived_shape_aspect, ObjectHelper<extension,0> { extension() : Object("extension") {}
+
+ };
+
+ // C++ wrapper for extent
+ struct extent : characterized_object, ObjectHelper<extent,0> { extent() : Object("extent") {}
+
+ };
+
+ // C++ wrapper for external_source
+ struct external_source : ObjectHelper<external_source,1> { external_source() : Object("external_source") {}
+ source_item::Out source_id;
+ };
+
+ // C++ wrapper for external_class_library
+ struct external_class_library : external_source, ObjectHelper<external_class_library,0> { external_class_library() : Object("external_class_library") {}
+
+ };
+
+ // C++ wrapper for externally_defined_class
+ struct externally_defined_class : ObjectHelper<externally_defined_class,0> { externally_defined_class() : Object("externally_defined_class") {}
+
+ };
+
+ // C++ wrapper for externally_defined_colour
+ struct externally_defined_colour : ObjectHelper<externally_defined_colour,0> { externally_defined_colour() : Object("externally_defined_colour") {}
+
+ };
+
+ // C++ wrapper for externally_defined_context_dependent_unit
+ struct externally_defined_context_dependent_unit : ObjectHelper<externally_defined_context_dependent_unit,0> { externally_defined_context_dependent_unit() : Object("externally_defined_context_dependent_unit") {}
+
+ };
+
+ // C++ wrapper for externally_defined_conversion_based_unit
+ struct externally_defined_conversion_based_unit : ObjectHelper<externally_defined_conversion_based_unit,0> { externally_defined_conversion_based_unit() : Object("externally_defined_conversion_based_unit") {}
+
+ };
+
+ // C++ wrapper for externally_defined_currency
+ struct externally_defined_currency : ObjectHelper<externally_defined_currency,0> { externally_defined_currency() : Object("externally_defined_currency") {}
+
+ };
+
+ // C++ wrapper for externally_defined_item
+ struct externally_defined_item : ObjectHelper<externally_defined_item,2> { externally_defined_item() : Object("externally_defined_item") {}
+ source_item::Out item_id;
+ Lazy< external_source > source;
+ };
+
+ // C++ wrapper for externally_defined_curve_font
+ struct externally_defined_curve_font : externally_defined_item, ObjectHelper<externally_defined_curve_font,0> { externally_defined_curve_font() : Object("externally_defined_curve_font") {}
+
+ };
+
+ // C++ wrapper for externally_defined_dimension_definition
+ struct externally_defined_dimension_definition : ObjectHelper<externally_defined_dimension_definition,0> { externally_defined_dimension_definition() : Object("externally_defined_dimension_definition") {}
+
+ };
+
+ // C++ wrapper for externally_defined_general_property
+ struct externally_defined_general_property : ObjectHelper<externally_defined_general_property,0> { externally_defined_general_property() : Object("externally_defined_general_property") {}
+
+ };
+
+ // C++ wrapper for externally_defined_hatch_style
+ struct externally_defined_hatch_style : ObjectHelper<externally_defined_hatch_style,0> { externally_defined_hatch_style() : Object("externally_defined_hatch_style") {}
+
+ };
+
+ // C++ wrapper for externally_defined_marker
+ struct externally_defined_marker : ObjectHelper<externally_defined_marker,0> { externally_defined_marker() : Object("externally_defined_marker") {}
+
+ };
+
+ // C++ wrapper for picture_representation_item
+ struct picture_representation_item : bytes_representation_item, ObjectHelper<picture_representation_item,0> { picture_representation_item() : Object("picture_representation_item") {}
+
+ };
+
+ // C++ wrapper for externally_defined_picture_representation_item
+ struct externally_defined_picture_representation_item : picture_representation_item, ObjectHelper<externally_defined_picture_representation_item,0> { externally_defined_picture_representation_item() : Object("externally_defined_picture_representation_item") {}
+
+ };
+
+ // C++ wrapper for externally_defined_representation_item
+ struct externally_defined_representation_item : ObjectHelper<externally_defined_representation_item,0> { externally_defined_representation_item() : Object("externally_defined_representation_item") {}
+
+ };
+
+ // C++ wrapper for externally_defined_string
+ struct externally_defined_string : externally_defined_representation_item, ObjectHelper<externally_defined_string,0> { externally_defined_string() : Object("externally_defined_string") {}
+
+ };
+
+ // C++ wrapper for externally_defined_symbol
+ struct externally_defined_symbol : externally_defined_item, ObjectHelper<externally_defined_symbol,0> { externally_defined_symbol() : Object("externally_defined_symbol") {}
+
+ };
+
+ // C++ wrapper for externally_defined_terminator_symbol
+ struct externally_defined_terminator_symbol : externally_defined_symbol, ObjectHelper<externally_defined_terminator_symbol,0> { externally_defined_terminator_symbol() : Object("externally_defined_terminator_symbol") {}
+
+ };
+
+ // C++ wrapper for externally_defined_text_font
+ struct externally_defined_text_font : externally_defined_item, ObjectHelper<externally_defined_text_font,0> { externally_defined_text_font() : Object("externally_defined_text_font") {}
+
+ };
+
+ // C++ wrapper for externally_defined_tile
+ struct externally_defined_tile : externally_defined_item, ObjectHelper<externally_defined_tile,0> { externally_defined_tile() : Object("externally_defined_tile") {}
+
+ };
+
+ // C++ wrapper for externally_defined_tile_style
+ struct externally_defined_tile_style : ObjectHelper<externally_defined_tile_style,0> { externally_defined_tile_style() : Object("externally_defined_tile_style") {}
+
+ };
+
+ // C++ wrapper for swept_area_solid
+ struct swept_area_solid : solid_model, ObjectHelper<swept_area_solid,1> { swept_area_solid() : Object("swept_area_solid") {}
+ Lazy< curve_bounded_surface > swept_area;
+ };
+
+ // C++ wrapper for extruded_area_solid
+ struct extruded_area_solid : swept_area_solid, ObjectHelper<extruded_area_solid,2> { extruded_area_solid() : Object("extruded_area_solid") {}
+ Lazy< direction > extruded_direction;
+ positive_length_measure::Out depth;
+ };
+
+ // C++ wrapper for swept_face_solid
+ struct swept_face_solid : solid_model, ObjectHelper<swept_face_solid,1> { swept_face_solid() : Object("swept_face_solid") {}
+ Lazy< face_surface > swept_face;
+ };
+
+ // C++ wrapper for extruded_face_solid
+ struct extruded_face_solid : swept_face_solid, ObjectHelper<extruded_face_solid,2> { extruded_face_solid() : Object("extruded_face_solid") {}
+ Lazy< direction > extruded_direction;
+ positive_length_measure::Out depth;
+ };
+
+ // C++ wrapper for extruded_face_solid_with_trim_conditions
+ struct extruded_face_solid_with_trim_conditions : extruded_face_solid, ObjectHelper<extruded_face_solid_with_trim_conditions,6> { extruded_face_solid_with_trim_conditions() : Object("extruded_face_solid_with_trim_conditions") {}
+ trim_condition_select::Out first_trim_condition;
+ trim_condition_select::Out second_trim_condition;
+ trim_intent::Out first_trim_intent;
+ trim_intent::Out second_trim_intent;
+ non_negative_length_measure::Out first_offset;
+ non_negative_length_measure::Out second_offset;
+ };
+
+ // C++ wrapper for extruded_face_solid_with_draft_angle
+ struct extruded_face_solid_with_draft_angle : extruded_face_solid_with_trim_conditions, ObjectHelper<extruded_face_solid_with_draft_angle,1> { extruded_face_solid_with_draft_angle() : Object("extruded_face_solid_with_draft_angle") {}
+ plane_angle_measure::Out draft_angle;
+ };
+
+ // C++ wrapper for extruded_face_solid_with_multiple_draft_angles
+ struct extruded_face_solid_with_multiple_draft_angles : extruded_face_solid_with_trim_conditions, ObjectHelper<extruded_face_solid_with_multiple_draft_angles,1> { extruded_face_solid_with_multiple_draft_angles() : Object("extruded_face_solid_with_multiple_draft_angles") {}
+ ListOf< plane_angle_measure, 2, 0 >::Out draft_angles;
+ };
+
+ // C++ wrapper for face
+ struct face : topological_representation_item, ObjectHelper<face,1> { face() : Object("face") {}
+ ListOf< Lazy< face_bound >, 1, 0 > bounds;
+ };
+
+ // C++ wrapper for face_based_surface_model
+ struct face_based_surface_model : geometric_representation_item, ObjectHelper<face_based_surface_model,1> { face_based_surface_model() : Object("face_based_surface_model") {}
+ ListOf< Lazy< connected_face_set >, 1, 0 > fbsm_faces;
+ };
+
+ // C++ wrapper for face_bound
+ struct face_bound : topological_representation_item, ObjectHelper<face_bound,2> { face_bound() : Object("face_bound") {}
+ Lazy< loop > bound;
+ BOOLEAN::Out orientation;
+ };
+
+ // C++ wrapper for face_outer_bound
+ struct face_outer_bound : face_bound, ObjectHelper<face_outer_bound,0> { face_outer_bound() : Object("face_outer_bound") {}
+
+ };
+
+ // C++ wrapper for faceted_brep
+ struct faceted_brep : manifold_solid_brep, ObjectHelper<faceted_brep,0> { faceted_brep() : Object("faceted_brep") {}
+
+ };
+
+ // C++ wrapper for faceted_brep_shape_representation
+ struct faceted_brep_shape_representation : shape_representation, ObjectHelper<faceted_brep_shape_representation,0> { faceted_brep_shape_representation() : Object("faceted_brep_shape_representation") {}
+
+ };
+
+ // C++ wrapper for fill_area_style
+ struct fill_area_style : founded_item, ObjectHelper<fill_area_style,2> { fill_area_style() : Object("fill_area_style") {}
+ label::Out name;
+ ListOf< fill_style_select, 1, 0 >::Out fill_styles;
+ };
+
+ // C++ wrapper for fill_area_style_hatching
+ struct fill_area_style_hatching : geometric_representation_item, ObjectHelper<fill_area_style_hatching,5> { fill_area_style_hatching() : Object("fill_area_style_hatching") {}
+ Lazy< curve_style > hatch_line_appearance;
+ Lazy< one_direction_repeat_factor > start_of_next_hatch_line;
+ Lazy< cartesian_point > point_of_reference_hatch_line;
+ Lazy< cartesian_point > pattern_start;
+ plane_angle_measure::Out hatch_line_angle;
+ };
+
+ // C++ wrapper for fill_area_style_tile_coloured_region
+ struct fill_area_style_tile_coloured_region : geometric_representation_item, ObjectHelper<fill_area_style_tile_coloured_region,2> { fill_area_style_tile_coloured_region() : Object("fill_area_style_tile_coloured_region") {}
+ curve_or_annotation_curve_occurrence::Out closed_curve;
+ Lazy< colour > region_colour;
+ };
+
+ // C++ wrapper for fill_area_style_tile_curve_with_style
+ struct fill_area_style_tile_curve_with_style : geometric_representation_item, ObjectHelper<fill_area_style_tile_curve_with_style,1> { fill_area_style_tile_curve_with_style() : Object("fill_area_style_tile_curve_with_style") {}
+ Lazy< annotation_curve_occurrence > styled_curve;
+ };
+
+ // C++ wrapper for fill_area_style_tile_symbol_with_style
+ struct fill_area_style_tile_symbol_with_style : geometric_representation_item, ObjectHelper<fill_area_style_tile_symbol_with_style,1> { fill_area_style_tile_symbol_with_style() : Object("fill_area_style_tile_symbol_with_style") {}
+ Lazy< annotation_symbol_occurrence > symbol;
+ };
+
+ // C++ wrapper for fill_area_style_tiles
+ struct fill_area_style_tiles : geometric_representation_item, ObjectHelper<fill_area_style_tiles,3> { fill_area_style_tiles() : Object("fill_area_style_tiles") {}
+ Lazy< two_direction_repeat_factor > tiling_pattern;
+ ListOf< fill_area_style_tile_shape_select, 1, 0 >::Out tiles;
+ positive_ratio_measure::Out tiling_scale;
+ };
+
+ // C++ wrapper for shape_representation_relationship
+ struct shape_representation_relationship : representation_relationship, ObjectHelper<shape_representation_relationship,0> { shape_representation_relationship() : Object("shape_representation_relationship") {}
+
+ };
+
+ // C++ wrapper for flat_pattern_ply_representation_relationship
+ struct flat_pattern_ply_representation_relationship : shape_representation_relationship, ObjectHelper<flat_pattern_ply_representation_relationship,0> { flat_pattern_ply_representation_relationship() : Object("flat_pattern_ply_representation_relationship") {}
+
+ };
+
+ // C++ wrapper for flatness_tolerance
+ struct flatness_tolerance : geometric_tolerance, ObjectHelper<flatness_tolerance,0> { flatness_tolerance() : Object("flatness_tolerance") {}
+
+ };
+
+ // C++ wrapper for force_measure_with_unit
+ struct force_measure_with_unit : measure_with_unit, ObjectHelper<force_measure_with_unit,0> { force_measure_with_unit() : Object("force_measure_with_unit") {}
+
+ };
+
+ // C++ wrapper for force_unit
+ struct force_unit : derived_unit, ObjectHelper<force_unit,0> { force_unit() : Object("force_unit") {}
+
+ };
+
+ // C++ wrapper for forward_chaining_rule
+ struct forward_chaining_rule : rule_definition, ObjectHelper<forward_chaining_rule,0> { forward_chaining_rule() : Object("forward_chaining_rule") {}
+
+ };
+
+ // C++ wrapper for forward_chaining_rule_premise
+ struct forward_chaining_rule_premise : ObjectHelper<forward_chaining_rule_premise,0> { forward_chaining_rule_premise() : Object("forward_chaining_rule_premise") {}
+
+ };
+
+ // C++ wrapper for frequency_measure_with_unit
+ struct frequency_measure_with_unit : measure_with_unit, ObjectHelper<frequency_measure_with_unit,0> { frequency_measure_with_unit() : Object("frequency_measure_with_unit") {}
+
+ };
+
+ // C++ wrapper for frequency_unit
+ struct frequency_unit : derived_unit, ObjectHelper<frequency_unit,0> { frequency_unit() : Object("frequency_unit") {}
+
+ };
+
+ // C++ wrapper for func
+ struct func : compound_representation_item, ObjectHelper<func,0> { func() : Object("func") {}
+
+ };
+
+ // C++ wrapper for functional_breakdown_context
+ struct functional_breakdown_context : breakdown_context, ObjectHelper<functional_breakdown_context,0> { functional_breakdown_context() : Object("functional_breakdown_context") {}
+
+ };
+
+ // C++ wrapper for functional_element_usage
+ struct functional_element_usage : breakdown_element_usage, ObjectHelper<functional_element_usage,0> { functional_element_usage() : Object("functional_element_usage") {}
+
+ };
+
+ // C++ wrapper for general_material_property
+ struct general_material_property : general_property, ObjectHelper<general_material_property,0> { general_material_property() : Object("general_material_property") {}
+
+ };
+
+ // C++ wrapper for simple_generic_expression
+ struct simple_generic_expression : generic_expression, ObjectHelper<simple_generic_expression,0> { simple_generic_expression() : Object("simple_generic_expression") {}
+
+ };
+
+ // C++ wrapper for generic_literal
+ struct generic_literal : simple_generic_expression, ObjectHelper<generic_literal,0> { generic_literal() : Object("generic_literal") {}
+
+ };
+
+ // C++ wrapper for generic_variable
+ struct generic_variable : simple_generic_expression, ObjectHelper<generic_variable,0> { generic_variable() : Object("generic_variable") {}
+
+ };
+
+ // C++ wrapper for geometric_alignment
+ struct geometric_alignment : derived_shape_aspect, ObjectHelper<geometric_alignment,0> { geometric_alignment() : Object("geometric_alignment") {}
+
+ };
+
+ // C++ wrapper for geometric_set
+ struct geometric_set : geometric_representation_item, ObjectHelper<geometric_set,1> { geometric_set() : Object("geometric_set") {}
+ ListOf< geometric_set_select, 1, 0 >::Out elements;
+ };
+
+ // C++ wrapper for geometric_curve_set
+ struct geometric_curve_set : geometric_set, ObjectHelper<geometric_curve_set,0> { geometric_curve_set() : Object("geometric_curve_set") {}
+
+ };
+
+ // C++ wrapper for geometric_intersection
+ struct geometric_intersection : derived_shape_aspect, ObjectHelper<geometric_intersection,0> { geometric_intersection() : Object("geometric_intersection") {}
+
+ };
+
+ // C++ wrapper for geometric_item_specific_usage
+ struct geometric_item_specific_usage : item_identified_representation_usage, ObjectHelper<geometric_item_specific_usage,0> { geometric_item_specific_usage() : Object("geometric_item_specific_usage") {}
+
+ };
+
+ // C++ wrapper for geometric_model_element_relationship
+ struct geometric_model_element_relationship : ObjectHelper<geometric_model_element_relationship,0> { geometric_model_element_relationship() : Object("geometric_model_element_relationship") {}
+
+ };
+
+ // C++ wrapper for representation_context
+ struct representation_context : ObjectHelper<representation_context,2> { representation_context() : Object("representation_context") {}
+ identifier::Out context_identifier;
+ text::Out context_type;
+ };
+
+ // C++ wrapper for geometric_representation_context
+ struct geometric_representation_context : representation_context, ObjectHelper<geometric_representation_context,1> { geometric_representation_context() : Object("geometric_representation_context") {}
+ dimension_count::Out coordinate_space_dimension;
+ };
+
+ // C++ wrapper for geometric_tolerance_with_defined_unit
+ struct geometric_tolerance_with_defined_unit : geometric_tolerance, ObjectHelper<geometric_tolerance_with_defined_unit,1> { geometric_tolerance_with_defined_unit() : Object("geometric_tolerance_with_defined_unit") {}
+ Lazy< measure_with_unit > unit_size;
+ };
+
+ // C++ wrapper for geometrical_tolerance_callout
+ struct geometrical_tolerance_callout : draughting_callout, ObjectHelper<geometrical_tolerance_callout,0> { geometrical_tolerance_callout() : Object("geometrical_tolerance_callout") {}
+
+ };
+
+ // C++ wrapper for geometrically_bounded_2d_wireframe_representation
+ struct geometrically_bounded_2d_wireframe_representation : shape_representation, ObjectHelper<geometrically_bounded_2d_wireframe_representation,0> { geometrically_bounded_2d_wireframe_representation() : Object("geometrically_bounded_2d_wireframe_representation") {}
+
+ };
+
+ // C++ wrapper for geometrically_bounded_surface_shape_representation
+ struct geometrically_bounded_surface_shape_representation : shape_representation, ObjectHelper<geometrically_bounded_surface_shape_representation,0> { geometrically_bounded_surface_shape_representation() : Object("geometrically_bounded_surface_shape_representation") {}
+
+ };
+
+ // C++ wrapper for geometrically_bounded_wireframe_shape_representation
+ struct geometrically_bounded_wireframe_shape_representation : shape_representation, ObjectHelper<geometrically_bounded_wireframe_shape_representation,0> { geometrically_bounded_wireframe_shape_representation() : Object("geometrically_bounded_wireframe_shape_representation") {}
+
+ };
+
+ // C++ wrapper for global_assignment
+ struct global_assignment : representation_item_relationship, ObjectHelper<global_assignment,0> { global_assignment() : Object("global_assignment") {}
+
+ };
+
+ // C++ wrapper for global_uncertainty_assigned_context
+ struct global_uncertainty_assigned_context : representation_context, ObjectHelper<global_uncertainty_assigned_context,1> { global_uncertainty_assigned_context() : Object("global_uncertainty_assigned_context") {}
+ ListOf< Lazy< uncertainty_measure_with_unit >, 1, 0 > uncertainty;
+ };
+
+ // C++ wrapper for global_unit_assigned_context
+ struct global_unit_assigned_context : representation_context, ObjectHelper<global_unit_assigned_context,1> { global_unit_assigned_context() : Object("global_unit_assigned_context") {}
+ ListOf< unit, 1, 0 >::Out units;
+ };
+
+ // C++ wrapper for ground_fact
+ struct ground_fact : atomic_formula, ObjectHelper<ground_fact,0> { ground_fact() : Object("ground_fact") {}
+
+ };
+
+ // C++ wrapper for hardness_representation
+ struct hardness_representation : representation, ObjectHelper<hardness_representation,0> { hardness_representation() : Object("hardness_representation") {}
+
+ };
+
+ // C++ wrapper for hidden_element_over_riding_styled_item
+ struct hidden_element_over_riding_styled_item : context_dependent_over_riding_styled_item, ObjectHelper<hidden_element_over_riding_styled_item,0> { hidden_element_over_riding_styled_item() : Object("hidden_element_over_riding_styled_item") {}
+
+ };
+
+ // C++ wrapper for hyperbola
+ struct hyperbola : conic, ObjectHelper<hyperbola,2> { hyperbola() : Object("hyperbola") {}
+ positive_length_measure::Out semi_axis;
+ positive_length_measure::Out semi_imag_axis;
+ };
+
+ // C++ wrapper for illuminance_measure_with_unit
+ struct illuminance_measure_with_unit : measure_with_unit, ObjectHelper<illuminance_measure_with_unit,0> { illuminance_measure_with_unit() : Object("illuminance_measure_with_unit") {}
+
+ };
+
+ // C++ wrapper for illuminance_unit
+ struct illuminance_unit : derived_unit, ObjectHelper<illuminance_unit,0> { illuminance_unit() : Object("illuminance_unit") {}
+
+ };
+
+ // C++ wrapper for included_text_block
+ struct included_text_block : mapped_item, ObjectHelper<included_text_block,0> { included_text_block() : Object("included_text_block") {}
+
+ };
+
+ // C++ wrapper for inclusion_product_concept_feature
+ struct inclusion_product_concept_feature : conditional_concept_feature, ObjectHelper<inclusion_product_concept_feature,0> { inclusion_product_concept_feature() : Object("inclusion_product_concept_feature") {}
+
+ };
+
+ // C++ wrapper for user_selected_elements
+ struct user_selected_elements : representation_item, ObjectHelper<user_selected_elements,1> { user_selected_elements() : Object("user_selected_elements") {}
+ ListOf< Lazy< representation_item >, 1, 0 > picked_items;
+ };
+
+ // C++ wrapper for indirectly_selected_elements
+ struct indirectly_selected_elements : user_selected_elements, ObjectHelper<indirectly_selected_elements,1> { indirectly_selected_elements() : Object("indirectly_selected_elements") {}
+ ListOf< Lazy< representation_item >, 1, 0 > indirectly_picked_items;
+ };
+
+ // C++ wrapper for indirectly_selected_shape_elements
+ struct indirectly_selected_shape_elements : ObjectHelper<indirectly_selected_shape_elements,0> { indirectly_selected_shape_elements() : Object("indirectly_selected_shape_elements") {}
+
+ };
+
+ // C++ wrapper for inductance_measure_with_unit
+ struct inductance_measure_with_unit : measure_with_unit, ObjectHelper<inductance_measure_with_unit,0> { inductance_measure_with_unit() : Object("inductance_measure_with_unit") {}
+
+ };
+
+ // C++ wrapper for inductance_unit
+ struct inductance_unit : derived_unit, ObjectHelper<inductance_unit,0> { inductance_unit() : Object("inductance_unit") {}
+
+ };
+
+ // C++ wrapper for information_right
+ struct information_right : action_method, ObjectHelper<information_right,0> { information_right() : Object("information_right") {}
+
+ };
+
+ // C++ wrapper for information_usage_right
+ struct information_usage_right : action_method, ObjectHelper<information_usage_right,0> { information_usage_right() : Object("information_usage_right") {}
+
+ };
+
+ // C++ wrapper for instance_usage_context_assignment
+ struct instance_usage_context_assignment : product_definition_context, ObjectHelper<instance_usage_context_assignment,1> { instance_usage_context_assignment() : Object("instance_usage_context_assignment") {}
+ ListOf< instance_usage_context_select, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for instanced_feature
+ struct instanced_feature : ObjectHelper<instanced_feature,0> { instanced_feature() : Object("instanced_feature") {}
+
+ };
+
+ // C++ wrapper for literal_number
+ struct literal_number : ObjectHelper<literal_number,1> { literal_number() : Object("literal_number") {}
+ NUMBER::Out the_value;
+ };
+
+ // C++ wrapper for int_literal
+ struct int_literal : literal_number, ObjectHelper<int_literal,0> { int_literal() : Object("int_literal") {}
+
+ };
+
+ // C++ wrapper for integer_representation_item
+ struct integer_representation_item : ObjectHelper<integer_representation_item,0> { integer_representation_item() : Object("integer_representation_item") {}
+
+ };
+
+ // C++ wrapper for surface_curve
+ struct surface_curve : curve, ObjectHelper<surface_curve,3> { surface_curve() : Object("surface_curve") {}
+ Lazy< curve > curve_3d;
+ ListOf< pcurve_or_surface, 1, 2 >::Out associated_geometry;
+ preferred_surface_curve_representation::Out master_representation;
+ };
+
+ // C++ wrapper for intersection_curve
+ struct intersection_curve : surface_curve, ObjectHelper<intersection_curve,0> { intersection_curve() : Object("intersection_curve") {}
+
+ };
+
+ // C++ wrapper for interval_expression
+ struct interval_expression : ObjectHelper<interval_expression,0> { interval_expression() : Object("interval_expression") {}
+
+ };
+
+ // C++ wrapper for iso4217_currency
+ struct iso4217_currency : currency, ObjectHelper<iso4217_currency,0> { iso4217_currency() : Object("iso4217_currency") {}
+
+ };
+
+ // C++ wrapper for known_source
+ struct known_source : ObjectHelper<known_source,0> { known_source() : Object("known_source") {}
+
+ };
+
+ // C++ wrapper for laid_defined_transformation
+ struct laid_defined_transformation : transformation_with_derived_angle, ObjectHelper<laid_defined_transformation,0> { laid_defined_transformation() : Object("laid_defined_transformation") {}
+
+ };
+
+ // C++ wrapper for language
+ struct language : group, ObjectHelper<language,0> { language() : Object("language") {}
+
+ };
+
+ // C++ wrapper for leader_curve
+ struct leader_curve : annotation_curve_occurrence, ObjectHelper<leader_curve,0> { leader_curve() : Object("leader_curve") {}
+
+ };
+
+ // C++ wrapper for leader_directed_callout
+ struct leader_directed_callout : draughting_callout, ObjectHelper<leader_directed_callout,0> { leader_directed_callout() : Object("leader_directed_callout") {}
+
+ };
+
+ // C++ wrapper for leader_directed_dimension
+ struct leader_directed_dimension : leader_directed_callout, ObjectHelper<leader_directed_dimension,0> { leader_directed_dimension() : Object("leader_directed_dimension") {}
+
+ };
+
+ // C++ wrapper for leader_terminator
+ struct leader_terminator : terminator_symbol, ObjectHelper<leader_terminator,0> { leader_terminator() : Object("leader_terminator") {}
+
+ };
+
+ // C++ wrapper for length_measure_with_unit
+ struct length_measure_with_unit : measure_with_unit, ObjectHelper<length_measure_with_unit,0> { length_measure_with_unit() : Object("length_measure_with_unit") {}
+
+ };
+
+ // C++ wrapper for length_unit
+ struct length_unit : named_unit, ObjectHelper<length_unit,0> { length_unit() : Object("length_unit") {}
+
+ };
+
+ // C++ wrapper for light_source
+ struct light_source : geometric_representation_item, ObjectHelper<light_source,1> { light_source() : Object("light_source") {}
+ Lazy< colour > light_colour;
+ };
+
+ // C++ wrapper for light_source_ambient
+ struct light_source_ambient : light_source, ObjectHelper<light_source_ambient,0> { light_source_ambient() : Object("light_source_ambient") {}
+
+ };
+
+ // C++ wrapper for light_source_directional
+ struct light_source_directional : light_source, ObjectHelper<light_source_directional,1> { light_source_directional() : Object("light_source_directional") {}
+ Lazy< direction > orientation;
+ };
+
+ // C++ wrapper for light_source_positional
+ struct light_source_positional : light_source, ObjectHelper<light_source_positional,3> { light_source_positional() : Object("light_source_positional") {}
+ Lazy< cartesian_point > position;
+ REAL::Out constant_attenuation;
+ REAL::Out distance_attenuation;
+ };
+
+ // C++ wrapper for light_source_spot
+ struct light_source_spot : light_source, ObjectHelper<light_source_spot,6> { light_source_spot() : Object("light_source_spot") {}
+ Lazy< cartesian_point > position;
+ Lazy< direction > orientation;
+ REAL::Out concentration_exponent;
+ REAL::Out constant_attenuation;
+ REAL::Out distance_attenuation;
+ positive_plane_angle_measure::Out spread_angle;
+ };
+
+ // C++ wrapper for line
+ struct line : curve, ObjectHelper<line,2> { line() : Object("line") {}
+ Lazy< cartesian_point > pnt;
+ Lazy< vector > dir;
+ };
+
+ // C++ wrapper for line_profile_tolerance
+ struct line_profile_tolerance : geometric_tolerance, ObjectHelper<line_profile_tolerance,0> { line_profile_tolerance() : Object("line_profile_tolerance") {}
+
+ };
+
+ // C++ wrapper for linear_dimension
+ struct linear_dimension : dimension_curve_directed_callout, ObjectHelper<linear_dimension,0> { linear_dimension() : Object("linear_dimension") {}
+
+ };
+
+ // C++ wrapper for simple_clause
+ struct simple_clause : compound_representation_item, ObjectHelper<simple_clause,0> { simple_clause() : Object("simple_clause") {}
+
+ };
+
+ // C++ wrapper for literal_conjunction
+ struct literal_conjunction : simple_clause, ObjectHelper<literal_conjunction,0> { literal_conjunction() : Object("literal_conjunction") {}
+
+ };
+
+ // C++ wrapper for literal_disjunction
+ struct literal_disjunction : simple_clause, ObjectHelper<literal_disjunction,0> { literal_disjunction() : Object("literal_disjunction") {}
+
+ };
+
+ // C++ wrapper for logical_literal
+ struct logical_literal : generic_literal, ObjectHelper<logical_literal,1> { logical_literal() : Object("logical_literal") {}
+ LOGICAL::Out lit_value;
+ };
+
+ // C++ wrapper for logical_representation_item
+ struct logical_representation_item : ObjectHelper<logical_representation_item,0> { logical_representation_item() : Object("logical_representation_item") {}
+
+ };
+
+ // C++ wrapper for loop
+ struct loop : topological_representation_item, ObjectHelper<loop,0> { loop() : Object("loop") {}
+
+ };
+
+ // C++ wrapper for loss_tangent_measure_with_unit
+ struct loss_tangent_measure_with_unit : ratio_measure_with_unit, ObjectHelper<loss_tangent_measure_with_unit,0> { loss_tangent_measure_with_unit() : Object("loss_tangent_measure_with_unit") {}
+
+ };
+
+ // C++ wrapper for lot_effectivity
+ struct lot_effectivity : effectivity, ObjectHelper<lot_effectivity,2> { lot_effectivity() : Object("lot_effectivity") {}
+ identifier::Out effectivity_lot_id;
+ Lazy< measure_with_unit > effectivity_lot_size;
+ };
+
+ // C++ wrapper for luminous_flux_measure_with_unit
+ struct luminous_flux_measure_with_unit : measure_with_unit, ObjectHelper<luminous_flux_measure_with_unit,0> { luminous_flux_measure_with_unit() : Object("luminous_flux_measure_with_unit") {}
+
+ };
+
+ // C++ wrapper for luminous_flux_unit
+ struct luminous_flux_unit : named_unit, ObjectHelper<luminous_flux_unit,0> { luminous_flux_unit() : Object("luminous_flux_unit") {}
+
+ };
+
+ // C++ wrapper for luminous_intensity_measure_with_unit
+ struct luminous_intensity_measure_with_unit : measure_with_unit, ObjectHelper<luminous_intensity_measure_with_unit,0> { luminous_intensity_measure_with_unit() : Object("luminous_intensity_measure_with_unit") {}
+
+ };
+
+ // C++ wrapper for luminous_intensity_unit
+ struct luminous_intensity_unit : named_unit, ObjectHelper<luminous_intensity_unit,0> { luminous_intensity_unit() : Object("luminous_intensity_unit") {}
+
+ };
+
+ // C++ wrapper for magnetic_flux_density_measure_with_unit
+ struct magnetic_flux_density_measure_with_unit : measure_with_unit, ObjectHelper<magnetic_flux_density_measure_with_unit,0> { magnetic_flux_density_measure_with_unit() : Object("magnetic_flux_density_measure_with_unit") {}
+
+ };
+
+ // C++ wrapper for magnetic_flux_density_unit
+ struct magnetic_flux_density_unit : derived_unit, ObjectHelper<magnetic_flux_density_unit,0> { magnetic_flux_density_unit() : Object("magnetic_flux_density_unit") {}
+
+ };
+
+ // C++ wrapper for magnetic_flux_measure_with_unit
+ struct magnetic_flux_measure_with_unit : measure_with_unit, ObjectHelper<magnetic_flux_measure_with_unit,0> { magnetic_flux_measure_with_unit() : Object("magnetic_flux_measure_with_unit") {}
+
+ };
+
+ // C++ wrapper for magnetic_flux_unit
+ struct magnetic_flux_unit : derived_unit, ObjectHelper<magnetic_flux_unit,0> { magnetic_flux_unit() : Object("magnetic_flux_unit") {}
+
+ };
+
+ // C++ wrapper for make_from_usage_option
+ struct make_from_usage_option : product_definition_usage, ObjectHelper<make_from_usage_option,3> { make_from_usage_option() : Object("make_from_usage_option") {}
+ INTEGER::Out ranking;
+ text::Out ranking_rationale;
+ Lazy< measure_with_unit > quantity;
+ };
+
+ // C++ wrapper for manifold_subsurface_shape_representation
+ struct manifold_subsurface_shape_representation : shape_representation, ObjectHelper<manifold_subsurface_shape_representation,0> { manifold_subsurface_shape_representation() : Object("manifold_subsurface_shape_representation") {}
+
+ };
+
+ // C++ wrapper for manifold_surface_shape_representation
+ struct manifold_surface_shape_representation : shape_representation, ObjectHelper<manifold_surface_shape_representation,0> { manifold_surface_shape_representation() : Object("manifold_surface_shape_representation") {}
+
+ };
+
+ // C++ wrapper for mass_measure_with_unit
+ struct mass_measure_with_unit : measure_with_unit, ObjectHelper<mass_measure_with_unit,0> { mass_measure_with_unit() : Object("mass_measure_with_unit") {}
+
+ };
+
+ // C++ wrapper for mass_unit
+ struct mass_unit : named_unit, ObjectHelper<mass_unit,0> { mass_unit() : Object("mass_unit") {}
+
+ };
+
+ // C++ wrapper for material_property
+ struct material_property : property_definition, ObjectHelper<material_property,0> { material_property() : Object("material_property") {}
+
+ };
+
+ // C++ wrapper for property_definition_representation
+ struct property_definition_representation : ObjectHelper<property_definition_representation,2> { property_definition_representation() : Object("property_definition_representation") {}
+ represented_definition::Out definition;
+ Lazy< representation > used_representation;
+ };
+
+ // C++ wrapper for material_property_representation
+ struct material_property_representation : property_definition_representation, ObjectHelper<material_property_representation,1> { material_property_representation() : Object("material_property_representation") {}
+ Lazy< NotImplemented > dependent_environment;
+ };
+
+ // C++ wrapper for measure_representation_item
+ struct measure_representation_item : ObjectHelper<measure_representation_item,0> { measure_representation_item() : Object("measure_representation_item") {}
+
+ };
+
+ // C++ wrapper for product_context
+ struct product_context : application_context_element, ObjectHelper<product_context,1> { product_context() : Object("product_context") {}
+ label::Out discipline_type;
+ };
+
+ // C++ wrapper for mechanical_context
+ struct mechanical_context : product_context, ObjectHelper<mechanical_context,0> { mechanical_context() : Object("mechanical_context") {}
+
+ };
+
+ // C++ wrapper for mechanical_design_and_draughting_relationship
+ struct mechanical_design_and_draughting_relationship : definitional_representation_relationship_with_same_context, ObjectHelper<mechanical_design_and_draughting_relationship,0> { mechanical_design_and_draughting_relationship() : Object("mechanical_design_and_draughting_relationship") {}
+
+ };
+
+ // C++ wrapper for mechanical_design_geometric_presentation_area
+ struct mechanical_design_geometric_presentation_area : presentation_area, ObjectHelper<mechanical_design_geometric_presentation_area,0> { mechanical_design_geometric_presentation_area() : Object("mechanical_design_geometric_presentation_area") {}
+
+ };
+
+ // C++ wrapper for mechanical_design_geometric_presentation_representation
+ struct mechanical_design_geometric_presentation_representation : representation, ObjectHelper<mechanical_design_geometric_presentation_representation,0> { mechanical_design_geometric_presentation_representation() : Object("mechanical_design_geometric_presentation_representation") {}
+
+ };
+
+ // C++ wrapper for mechanical_design_presentation_representation_with_draughting
+ struct mechanical_design_presentation_representation_with_draughting : representation, ObjectHelper<mechanical_design_presentation_representation_with_draughting,0> { mechanical_design_presentation_representation_with_draughting() : Object("mechanical_design_presentation_representation_with_draughting") {}
+
+ };
+
+ // C++ wrapper for mechanical_design_shaded_presentation_area
+ struct mechanical_design_shaded_presentation_area : presentation_area, ObjectHelper<mechanical_design_shaded_presentation_area,0> { mechanical_design_shaded_presentation_area() : Object("mechanical_design_shaded_presentation_area") {}
+
+ };
+
+ // C++ wrapper for mechanical_design_shaded_presentation_representation
+ struct mechanical_design_shaded_presentation_representation : representation, ObjectHelper<mechanical_design_shaded_presentation_representation,0> { mechanical_design_shaded_presentation_representation() : Object("mechanical_design_shaded_presentation_representation") {}
+
+ };
+
+ // C++ wrapper for min_and_major_ply_orientation_basis
+ struct min_and_major_ply_orientation_basis : ObjectHelper<min_and_major_ply_orientation_basis,0> { min_and_major_ply_orientation_basis() : Object("min_and_major_ply_orientation_basis") {}
+
+ };
+
+ // C++ wrapper for modified_geometric_tolerance
+ struct modified_geometric_tolerance : geometric_tolerance, ObjectHelper<modified_geometric_tolerance,1> { modified_geometric_tolerance() : Object("modified_geometric_tolerance") {}
+ limit_condition::Out modifier;
+ };
+
+ // C++ wrapper for modified_solid_with_placed_configuration
+ struct modified_solid_with_placed_configuration : modified_solid, ObjectHelper<modified_solid_with_placed_configuration,1> { modified_solid_with_placed_configuration() : Object("modified_solid_with_placed_configuration") {}
+ Lazy< axis2_placement_3d > placing;
+ };
+
+ // C++ wrapper for moments_of_inertia_representation
+ struct moments_of_inertia_representation : representation, ObjectHelper<moments_of_inertia_representation,0> { moments_of_inertia_representation() : Object("moments_of_inertia_representation") {}
+
+ };
+
+ // C++ wrapper for multi_language_attribute_assignment
+ struct multi_language_attribute_assignment : attribute_value_assignment, ObjectHelper<multi_language_attribute_assignment,1> { multi_language_attribute_assignment() : Object("multi_language_attribute_assignment") {}
+ ListOf< multi_language_attribute_item, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for multiple_arity_boolean_expression
+ struct multiple_arity_boolean_expression : ObjectHelper<multiple_arity_boolean_expression,0> { multiple_arity_boolean_expression() : Object("multiple_arity_boolean_expression") {}
+
+ };
+
+ // C++ wrapper for multiple_arity_generic_expression
+ struct multiple_arity_generic_expression : generic_expression, ObjectHelper<multiple_arity_generic_expression,1> { multiple_arity_generic_expression() : Object("multiple_arity_generic_expression") {}
+ ListOf< Lazy< generic_expression >, 2, 0 > operands;
+ };
+
+ // C++ wrapper for multiple_arity_numeric_expression
+ struct multiple_arity_numeric_expression : ObjectHelper<multiple_arity_numeric_expression,0> { multiple_arity_numeric_expression() : Object("multiple_arity_numeric_expression") {}
+
+ };
+
+ // C++ wrapper for next_assembly_usage_occurrence
+ struct next_assembly_usage_occurrence : assembly_component_usage, ObjectHelper<next_assembly_usage_occurrence,0> { next_assembly_usage_occurrence() : Object("next_assembly_usage_occurrence") {}
+
+ };
+
+ // C++ wrapper for non_manifold_surface_shape_representation
+ struct non_manifold_surface_shape_representation : shape_representation, ObjectHelper<non_manifold_surface_shape_representation,0> { non_manifold_surface_shape_representation() : Object("non_manifold_surface_shape_representation") {}
+
+ };
+
+ // C++ wrapper for null_representation_item
+ struct null_representation_item : representation_item, ObjectHelper<null_representation_item,0> { null_representation_item() : Object("null_representation_item") {}
+
+ };
+
+ // C++ wrapper for numeric_expression
+ struct numeric_expression : expression, ObjectHelper<numeric_expression,0> { numeric_expression() : Object("numeric_expression") {}
+
+ };
+
+ // C++ wrapper for offset_curve_2d
+ struct offset_curve_2d : curve, ObjectHelper<offset_curve_2d,3> { offset_curve_2d() : Object("offset_curve_2d") {}
+ Lazy< curve > basis_curve;
+ length_measure::Out distance;
+ LOGICAL::Out self_intersect;
+ };
+
+ // C++ wrapper for offset_curve_3d
+ struct offset_curve_3d : curve, ObjectHelper<offset_curve_3d,4> { offset_curve_3d() : Object("offset_curve_3d") {}
+ Lazy< curve > basis_curve;
+ length_measure::Out distance;
+ LOGICAL::Out self_intersect;
+ Lazy< direction > ref_direction;
+ };
+
+ // C++ wrapper for offset_surface
+ struct offset_surface : surface, ObjectHelper<offset_surface,3> { offset_surface() : Object("offset_surface") {}
+ Lazy< surface > basis_surface;
+ length_measure::Out distance;
+ LOGICAL::Out self_intersect;
+ };
+
+ // C++ wrapper for one_direction_repeat_factor
+ struct one_direction_repeat_factor : geometric_representation_item, ObjectHelper<one_direction_repeat_factor,1> { one_direction_repeat_factor() : Object("one_direction_repeat_factor") {}
+ Lazy< vector > repeat_factor;
+ };
+
+ // C++ wrapper for open_shell
+ struct open_shell : connected_face_set, ObjectHelper<open_shell,0> { open_shell() : Object("open_shell") {}
+
+ };
+
+ // C++ wrapper for ordinal_date
+ struct ordinal_date : date, ObjectHelper<ordinal_date,1> { ordinal_date() : Object("ordinal_date") {}
+ day_in_year_number::Out day_component;
+ };
+
+ // C++ wrapper for projection_directed_callout
+ struct projection_directed_callout : draughting_callout, ObjectHelper<projection_directed_callout,0> { projection_directed_callout() : Object("projection_directed_callout") {}
+
+ };
+
+ // C++ wrapper for ordinate_dimension
+ struct ordinate_dimension : projection_directed_callout, ObjectHelper<ordinate_dimension,0> { ordinate_dimension() : Object("ordinate_dimension") {}
+
+ };
+
+ // C++ wrapper for organizational_address
+ struct organizational_address : address, ObjectHelper<organizational_address,2> { organizational_address() : Object("organizational_address") {}
+ ListOf< Lazy< NotImplemented >, 1, 0 > organizations;
+ Maybe< text::Out > description;
+ };
+
+ // C++ wrapper for oriented_closed_shell
+ struct oriented_closed_shell : closed_shell, ObjectHelper<oriented_closed_shell,2> { oriented_closed_shell() : Object("oriented_closed_shell") {}
+ Lazy< closed_shell > closed_shell_element;
+ BOOLEAN::Out orientation;
+ };
+
+ // C++ wrapper for oriented_edge
+ struct oriented_edge : edge, ObjectHelper<oriented_edge,2> { oriented_edge() : Object("oriented_edge") {}
+ Lazy< edge > edge_element;
+ BOOLEAN::Out orientation;
+ };
+
+ // C++ wrapper for oriented_face
+ struct oriented_face : face, ObjectHelper<oriented_face,2> { oriented_face() : Object("oriented_face") {}
+ Lazy< face > face_element;
+ BOOLEAN::Out orientation;
+ };
+
+ // C++ wrapper for oriented_open_shell
+ struct oriented_open_shell : open_shell, ObjectHelper<oriented_open_shell,2> { oriented_open_shell() : Object("oriented_open_shell") {}
+ Lazy< open_shell > open_shell_element;
+ BOOLEAN::Out orientation;
+ };
+
+ // C++ wrapper for path
+ struct path : topological_representation_item, ObjectHelper<path,1> { path() : Object("path") {}
+ ListOf< Lazy< oriented_edge >, 1, 0 > edge_list;
+ };
+
+ // C++ wrapper for oriented_path
+ struct oriented_path : path, ObjectHelper<oriented_path,2> { oriented_path() : Object("oriented_path") {}
+ Lazy< path > path_element;
+ BOOLEAN::Out orientation;
+ };
+
+ // C++ wrapper for oriented_surface
+ struct oriented_surface : surface, ObjectHelper<oriented_surface,1> { oriented_surface() : Object("oriented_surface") {}
+ BOOLEAN::Out orientation;
+ };
+
+ // C++ wrapper for outer_boundary_curve
+ struct outer_boundary_curve : boundary_curve, ObjectHelper<outer_boundary_curve,0> { outer_boundary_curve() : Object("outer_boundary_curve") {}
+
+ };
+
+ // C++ wrapper for package_product_concept_feature
+ struct package_product_concept_feature : product_concept_feature, ObjectHelper<package_product_concept_feature,0> { package_product_concept_feature() : Object("package_product_concept_feature") {}
+
+ };
+
+ // C++ wrapper for parabola
+ struct parabola : conic, ObjectHelper<parabola,1> { parabola() : Object("parabola") {}
+ length_measure::Out focal_dist;
+ };
+
+ // C++ wrapper for parallel_offset
+ struct parallel_offset : derived_shape_aspect, ObjectHelper<parallel_offset,1> { parallel_offset() : Object("parallel_offset") {}
+ Lazy< measure_with_unit > offset;
+ };
+
+ // C++ wrapper for parallelism_tolerance
+ struct parallelism_tolerance : geometric_tolerance_with_datum_reference, ObjectHelper<parallelism_tolerance,0> { parallelism_tolerance() : Object("parallelism_tolerance") {}
+
+ };
+
+ // C++ wrapper for parametric_representation_context
+ struct parametric_representation_context : representation_context, ObjectHelper<parametric_representation_context,0> { parametric_representation_context() : Object("parametric_representation_context") {}
+
+ };
+
+ // C++ wrapper for partial_document_with_structured_text_representation_assignment
+ struct partial_document_with_structured_text_representation_assignment : ObjectHelper<partial_document_with_structured_text_representation_assignment,0> { partial_document_with_structured_text_representation_assignment() : Object("partial_document_with_structured_text_representation_assignment") {}
+
+ };
+
+ // C++ wrapper for pcurve
+ struct pcurve : curve, ObjectHelper<pcurve,2> { pcurve() : Object("pcurve") {}
+ Lazy< surface > basis_surface;
+ Lazy< definitional_representation > reference_to_curve;
+ };
+
+ // C++ wrapper for percentage_laminate_definition
+ struct percentage_laminate_definition : product_definition, ObjectHelper<percentage_laminate_definition,0> { percentage_laminate_definition() : Object("percentage_laminate_definition") {}
+
+ };
+
+ // C++ wrapper for zone_structural_makeup
+ struct zone_structural_makeup : laminate_table, ObjectHelper<zone_structural_makeup,0> { zone_structural_makeup() : Object("zone_structural_makeup") {}
+
+ };
+
+ // C++ wrapper for percentage_laminate_table
+ struct percentage_laminate_table : zone_structural_makeup, ObjectHelper<percentage_laminate_table,0> { percentage_laminate_table() : Object("percentage_laminate_table") {}
+
+ };
+
+ // C++ wrapper for percentage_ply_definition
+ struct percentage_ply_definition : product_definition, ObjectHelper<percentage_ply_definition,0> { percentage_ply_definition() : Object("percentage_ply_definition") {}
+
+ };
+
+ // C++ wrapper for perpendicular_to
+ struct perpendicular_to : derived_shape_aspect, ObjectHelper<perpendicular_to,0> { perpendicular_to() : Object("perpendicular_to") {}
+
+ };
+
+ // C++ wrapper for perpendicularity_tolerance
+ struct perpendicularity_tolerance : geometric_tolerance_with_datum_reference, ObjectHelper<perpendicularity_tolerance,0> { perpendicularity_tolerance() : Object("perpendicularity_tolerance") {}
+
+ };
+
+ // C++ wrapper for person_and_organization_address
+ struct person_and_organization_address : ObjectHelper<person_and_organization_address,0> { person_and_organization_address() : Object("person_and_organization_address") {}
+
+ };
+
+ // C++ wrapper for personal_address
+ struct personal_address : address, ObjectHelper<personal_address,2> { personal_address() : Object("personal_address") {}
+ ListOf< Lazy< NotImplemented >, 1, 0 > people;
+ Maybe< text::Out > description;
+ };
+
+ // C++ wrapper for physical_breakdown_context
+ struct physical_breakdown_context : breakdown_context, ObjectHelper<physical_breakdown_context,0> { physical_breakdown_context() : Object("physical_breakdown_context") {}
+
+ };
+
+ // C++ wrapper for physical_element_usage
+ struct physical_element_usage : breakdown_element_usage, ObjectHelper<physical_element_usage,0> { physical_element_usage() : Object("physical_element_usage") {}
+
+ };
+
+ // C++ wrapper for presentation_view
+ struct presentation_view : presentation_representation, ObjectHelper<presentation_view,0> { presentation_view() : Object("presentation_view") {}
+
+ };
+
+ // C++ wrapper for picture_representation
+ struct picture_representation : presentation_view, ObjectHelper<picture_representation,0> { picture_representation() : Object("picture_representation") {}
+
+ };
+
+ // C++ wrapper for placed_datum_target_feature
+ struct placed_datum_target_feature : datum_target, ObjectHelper<placed_datum_target_feature,0> { placed_datum_target_feature() : Object("placed_datum_target_feature") {}
+
+ };
+
+ // C++ wrapper for placed_feature
+ struct placed_feature : shape_aspect, ObjectHelper<placed_feature,0> { placed_feature() : Object("placed_feature") {}
+
+ };
+
+ // C++ wrapper for planar_extent
+ struct planar_extent : geometric_representation_item, ObjectHelper<planar_extent,2> { planar_extent() : Object("planar_extent") {}
+ length_measure::Out size_in_x;
+ length_measure::Out size_in_y;
+ };
+
+ // C++ wrapper for planar_box
+ struct planar_box : planar_extent, ObjectHelper<planar_box,1> { planar_box() : Object("planar_box") {}
+ axis2_placement::Out placement;
+ };
+
+ // C++ wrapper for plane
+ struct plane : elementary_surface, ObjectHelper<plane,0> { plane() : Object("plane") {}
+
+ };
+
+ // C++ wrapper for plane_angle_measure_with_unit
+ struct plane_angle_measure_with_unit : measure_with_unit, ObjectHelper<plane_angle_measure_with_unit,0> { plane_angle_measure_with_unit() : Object("plane_angle_measure_with_unit") {}
+
+ };
+
+ // C++ wrapper for plane_angle_unit
+ struct plane_angle_unit : named_unit, ObjectHelper<plane_angle_unit,0> { plane_angle_unit() : Object("plane_angle_unit") {}
+
+ };
+
+ // C++ wrapper for ply_laminate_definition
+ struct ply_laminate_definition : product_definition, ObjectHelper<ply_laminate_definition,0> { ply_laminate_definition() : Object("ply_laminate_definition") {}
+
+ };
+
+ // C++ wrapper for ply_laminate_sequence_definition
+ struct ply_laminate_sequence_definition : product_definition, ObjectHelper<ply_laminate_sequence_definition,0> { ply_laminate_sequence_definition() : Object("ply_laminate_sequence_definition") {}
+
+ };
+
+ // C++ wrapper for ply_laminate_table
+ struct ply_laminate_table : part_laminate_table, ObjectHelper<ply_laminate_table,0> { ply_laminate_table() : Object("ply_laminate_table") {}
+
+ };
+
+ // C++ wrapper for point_and_vector
+ struct point_and_vector : ObjectHelper<point_and_vector,0> { point_and_vector() : Object("point_and_vector") {}
+
+ };
+
+ // C++ wrapper for point_on_curve
+ struct point_on_curve : point, ObjectHelper<point_on_curve,2> { point_on_curve() : Object("point_on_curve") {}
+ Lazy< curve > basis_curve;
+ parameter_value::Out point_parameter;
+ };
+
+ // C++ wrapper for point_on_surface
+ struct point_on_surface : point, ObjectHelper<point_on_surface,3> { point_on_surface() : Object("point_on_surface") {}
+ Lazy< surface > basis_surface;
+ parameter_value::Out point_parameter_u;
+ parameter_value::Out point_parameter_v;
+ };
+
+ // C++ wrapper for point_path
+ struct point_path : ObjectHelper<point_path,0> { point_path() : Object("point_path") {}
+
+ };
+
+ // C++ wrapper for point_replica
+ struct point_replica : point, ObjectHelper<point_replica,2> { point_replica() : Object("point_replica") {}
+ Lazy< point > parent_pt;
+ Lazy< cartesian_transformation_operator > transformation;
+ };
+
+ // C++ wrapper for point_style
+ struct point_style : founded_item, ObjectHelper<point_style,4> { point_style() : Object("point_style") {}
+ label::Out name;
+ marker_select::Out marker;
+ size_select::Out marker_size;
+ Lazy< colour > marker_colour;
+ };
+
+ // C++ wrapper for polar_complex_number_literal
+ struct polar_complex_number_literal : generic_literal, ObjectHelper<polar_complex_number_literal,2> { polar_complex_number_literal() : Object("polar_complex_number_literal") {}
+ REAL::Out radius;
+ REAL::Out angle;
+ };
+
+ // C++ wrapper for poly_loop
+ struct poly_loop : ObjectHelper<poly_loop,1> { poly_loop() : Object("poly_loop") {}
+ ListOf< Lazy< cartesian_point >, 3, 0 > polygon;
+ };
+
+ // C++ wrapper for polyline
+ struct polyline : bounded_curve, ObjectHelper<polyline,1> { polyline() : Object("polyline") {}
+ ListOf< Lazy< cartesian_point >, 2, 0 > points;
+ };
+
+ // C++ wrapper for position_tolerance
+ struct position_tolerance : geometric_tolerance, ObjectHelper<position_tolerance,0> { position_tolerance() : Object("position_tolerance") {}
+
+ };
+
+ // C++ wrapper for positioned_sketch
+ struct positioned_sketch : geometric_representation_item, ObjectHelper<positioned_sketch,2> { positioned_sketch() : Object("positioned_sketch") {}
+ sketch_basis_select::Out sketch_basis;
+ ListOf< Lazy< auxiliary_geometric_representation_item >, 0, 0 > auxiliary_elements;
+ };
+
+ // C++ wrapper for power_measure_with_unit
+ struct power_measure_with_unit : measure_with_unit, ObjectHelper<power_measure_with_unit,0> { power_measure_with_unit() : Object("power_measure_with_unit") {}
+
+ };
+
+ // C++ wrapper for power_unit
+ struct power_unit : derived_unit, ObjectHelper<power_unit,0> { power_unit() : Object("power_unit") {}
+
+ };
+
+ // C++ wrapper for pre_defined_symbol
+ struct pre_defined_symbol : pre_defined_item, ObjectHelper<pre_defined_symbol,0> { pre_defined_symbol() : Object("pre_defined_symbol") {}
+
+ };
+
+ // C++ wrapper for pre_defined_dimension_symbol
+ struct pre_defined_dimension_symbol : pre_defined_symbol, ObjectHelper<pre_defined_dimension_symbol,0> { pre_defined_dimension_symbol() : Object("pre_defined_dimension_symbol") {}
+
+ };
+
+ // C++ wrapper for pre_defined_geometrical_tolerance_symbol
+ struct pre_defined_geometrical_tolerance_symbol : pre_defined_symbol, ObjectHelper<pre_defined_geometrical_tolerance_symbol,0> { pre_defined_geometrical_tolerance_symbol() : Object("pre_defined_geometrical_tolerance_symbol") {}
+
+ };
+
+ // C++ wrapper for pre_defined_marker
+ struct pre_defined_marker : pre_defined_item, ObjectHelper<pre_defined_marker,0> { pre_defined_marker() : Object("pre_defined_marker") {}
+
+ };
+
+ // C++ wrapper for pre_defined_point_marker_symbol
+ struct pre_defined_point_marker_symbol : ObjectHelper<pre_defined_point_marker_symbol,0> { pre_defined_point_marker_symbol() : Object("pre_defined_point_marker_symbol") {}
+
+ };
+
+ // C++ wrapper for pre_defined_surface_condition_symbol
+ struct pre_defined_surface_condition_symbol : pre_defined_symbol, ObjectHelper<pre_defined_surface_condition_symbol,0> { pre_defined_surface_condition_symbol() : Object("pre_defined_surface_condition_symbol") {}
+
+ };
+
+ // C++ wrapper for pre_defined_surface_side_style
+ struct pre_defined_surface_side_style : pre_defined_item, ObjectHelper<pre_defined_surface_side_style,0> { pre_defined_surface_side_style() : Object("pre_defined_surface_side_style") {}
+
+ };
+
+ // C++ wrapper for pre_defined_terminator_symbol
+ struct pre_defined_terminator_symbol : pre_defined_symbol, ObjectHelper<pre_defined_terminator_symbol,0> { pre_defined_terminator_symbol() : Object("pre_defined_terminator_symbol") {}
+
+ };
+
+ // C++ wrapper for pre_defined_tile
+ struct pre_defined_tile : pre_defined_item, ObjectHelper<pre_defined_tile,0> { pre_defined_tile() : Object("pre_defined_tile") {}
+
+ };
+
+ // C++ wrapper for predefined_picture_representation_item
+ struct predefined_picture_representation_item : picture_representation_item, ObjectHelper<predefined_picture_representation_item,0> { predefined_picture_representation_item() : Object("predefined_picture_representation_item") {}
+
+ };
+
+ // C++ wrapper for presentation_style_assignment
+ struct presentation_style_assignment : founded_item, ObjectHelper<presentation_style_assignment,1> { presentation_style_assignment() : Object("presentation_style_assignment") {}
+ ListOf< presentation_style_select, 1, 0 >::Out styles;
+ };
+
+ // C++ wrapper for presentation_style_by_context
+ struct presentation_style_by_context : presentation_style_assignment, ObjectHelper<presentation_style_by_context,1> { presentation_style_by_context() : Object("presentation_style_by_context") {}
+ style_context_select::Out style_context;
+ };
+
+ // C++ wrapper for pressure_measure_with_unit
+ struct pressure_measure_with_unit : measure_with_unit, ObjectHelper<pressure_measure_with_unit,0> { pressure_measure_with_unit() : Object("pressure_measure_with_unit") {}
+
+ };
+
+ // C++ wrapper for pressure_unit
+ struct pressure_unit : derived_unit, ObjectHelper<pressure_unit,0> { pressure_unit() : Object("pressure_unit") {}
+
+ };
+
+ // C++ wrapper for procedural_representation
+ struct procedural_representation : representation, ObjectHelper<procedural_representation,0> { procedural_representation() : Object("procedural_representation") {}
+
+ };
+
+ // C++ wrapper for procedural_representation_sequence
+ struct procedural_representation_sequence : representation_item, ObjectHelper<procedural_representation_sequence,3> { procedural_representation_sequence() : Object("procedural_representation_sequence") {}
+ ListOf< Lazy< representation_item >, 1, 0 > elements;
+ ListOf< Lazy< representation_item >, 0, 0 > suppressed_items;
+ text::Out rationale;
+ };
+
+ // C++ wrapper for procedural_shape_representation
+ struct procedural_shape_representation : ObjectHelper<procedural_shape_representation,0> { procedural_shape_representation() : Object("procedural_shape_representation") {}
+
+ };
+
+ // C++ wrapper for procedural_shape_representation_sequence
+ struct procedural_shape_representation_sequence : ObjectHelper<procedural_shape_representation_sequence,0> { procedural_shape_representation_sequence() : Object("procedural_shape_representation_sequence") {}
+
+ };
+
+ // C++ wrapper for product_category
+ struct product_category : ObjectHelper<product_category,2> { product_category() : Object("product_category") {}
+ label::Out name;
+ Maybe< text::Out > description;
+ };
+
+ // C++ wrapper for product_class
+ struct product_class : ObjectHelper<product_class,0> { product_class() : Object("product_class") {}
+
+ };
+
+ // C++ wrapper for product_concept_context
+ struct product_concept_context : application_context_element, ObjectHelper<product_concept_context,1> { product_concept_context() : Object("product_concept_context") {}
+ label::Out market_segment_type;
+ };
+
+ // C++ wrapper for product_concept_feature_category_usage
+ struct product_concept_feature_category_usage : group_assignment, ObjectHelper<product_concept_feature_category_usage,1> { product_concept_feature_category_usage() : Object("product_concept_feature_category_usage") {}
+ ListOf< category_usage_item, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for product_definition_element_relationship
+ struct product_definition_element_relationship : group, ObjectHelper<product_definition_element_relationship,0> { product_definition_element_relationship() : Object("product_definition_element_relationship") {}
+
+ };
+
+ // C++ wrapper for product_definition_formation
+ struct product_definition_formation : ObjectHelper<product_definition_formation,3> { product_definition_formation() : Object("product_definition_formation") {}
+ identifier::Out id;
+ Maybe< text::Out > description;
+ Lazy< NotImplemented > of_product;
+ };
+
+ // C++ wrapper for product_definition_formation_with_specified_source
+ struct product_definition_formation_with_specified_source : product_definition_formation, ObjectHelper<product_definition_formation_with_specified_source,1> { product_definition_formation_with_specified_source() : Object("product_definition_formation_with_specified_source") {}
+ source::Out make_or_buy;
+ };
+
+ // C++ wrapper for product_definition_group_assignment
+ struct product_definition_group_assignment : group_assignment, ObjectHelper<product_definition_group_assignment,1> { product_definition_group_assignment() : Object("product_definition_group_assignment") {}
+ ListOf< product_definition_or_product_definition_relationship, 1, 1 >::Out items;
+ };
+
+ // C++ wrapper for product_definition_shape
+ struct product_definition_shape : property_definition, ObjectHelper<product_definition_shape,0> { product_definition_shape() : Object("product_definition_shape") {}
+
+ };
+
+ // C++ wrapper for product_definition_with_associated_documents
+ struct product_definition_with_associated_documents : product_definition, ObjectHelper<product_definition_with_associated_documents,1> { product_definition_with_associated_documents() : Object("product_definition_with_associated_documents") {}
+ ListOf< Lazy< NotImplemented >, 1, 0 > documentation_ids;
+ };
+
+ // C++ wrapper for product_identification
+ struct product_identification : ObjectHelper<product_identification,0> { product_identification() : Object("product_identification") {}
+
+ };
+
+ // C++ wrapper for product_material_composition_relationship
+ struct product_material_composition_relationship : product_definition_relationship, ObjectHelper<product_material_composition_relationship,4> { product_material_composition_relationship() : Object("product_material_composition_relationship") {}
+ label::Out class_;
+ ListOf< characterized_product_composition_value, 1, 0 >::Out constituent_amount;
+ label::Out composition_basis;
+ text::Out determination_method;
+ };
+
+ // C++ wrapper for product_related_product_category
+ struct product_related_product_category : product_category, ObjectHelper<product_related_product_category,1> { product_related_product_category() : Object("product_related_product_category") {}
+ ListOf< Lazy< NotImplemented >, 1, 0 > products;
+ };
+
+ // C++ wrapper for product_specification
+ struct product_specification : ObjectHelper<product_specification,0> { product_specification() : Object("product_specification") {}
+
+ };
+
+ // C++ wrapper for tolerance_zone_definition
+ struct tolerance_zone_definition : ObjectHelper<tolerance_zone_definition,2> { tolerance_zone_definition() : Object("tolerance_zone_definition") {}
+ Lazy< tolerance_zone > zone;
+ ListOf< Lazy< shape_aspect >, 1, 0 > boundaries;
+ };
+
+ // C++ wrapper for projected_zone_definition
+ struct projected_zone_definition : tolerance_zone_definition, ObjectHelper<projected_zone_definition,2> { projected_zone_definition() : Object("projected_zone_definition") {}
+ Lazy< shape_aspect > projection_end;
+ Lazy< measure_with_unit > projected_length;
+ };
+
+ // C++ wrapper for projection_curve
+ struct projection_curve : annotation_curve_occurrence, ObjectHelper<projection_curve,0> { projection_curve() : Object("projection_curve") {}
+
+ };
+
+ // C++ wrapper for promissory_usage_occurrence
+ struct promissory_usage_occurrence : assembly_component_usage, ObjectHelper<promissory_usage_occurrence,0> { promissory_usage_occurrence() : Object("promissory_usage_occurrence") {}
+
+ };
+
+ // C++ wrapper for qualified_representation_item
+ struct qualified_representation_item : representation_item, ObjectHelper<qualified_representation_item,1> { qualified_representation_item() : Object("qualified_representation_item") {}
+ ListOf< value_qualifier, 1, 0 >::Out qualifiers;
+ };
+
+ // C++ wrapper for qualitative_uncertainty
+ struct qualitative_uncertainty : uncertainty_qualifier, ObjectHelper<qualitative_uncertainty,1> { qualitative_uncertainty() : Object("qualitative_uncertainty") {}
+ text::Out uncertainty_value;
+ };
+
+ // C++ wrapper for quantified_assembly_component_usage
+ struct quantified_assembly_component_usage : assembly_component_usage, ObjectHelper<quantified_assembly_component_usage,1> { quantified_assembly_component_usage() : Object("quantified_assembly_component_usage") {}
+ Lazy< measure_with_unit > quantity;
+ };
+
+ // C++ wrapper for quasi_uniform_curve
+ struct quasi_uniform_curve : b_spline_curve, ObjectHelper<quasi_uniform_curve,0> { quasi_uniform_curve() : Object("quasi_uniform_curve") {}
+
+ };
+
+ // C++ wrapper for quasi_uniform_surface
+ struct quasi_uniform_surface : b_spline_surface, ObjectHelper<quasi_uniform_surface,0> { quasi_uniform_surface() : Object("quasi_uniform_surface") {}
+
+ };
+
+ // C++ wrapper for radioactivity_measure_with_unit
+ struct radioactivity_measure_with_unit : measure_with_unit, ObjectHelper<radioactivity_measure_with_unit,0> { radioactivity_measure_with_unit() : Object("radioactivity_measure_with_unit") {}
+
+ };
+
+ // C++ wrapper for radioactivity_unit
+ struct radioactivity_unit : derived_unit, ObjectHelper<radioactivity_unit,0> { radioactivity_unit() : Object("radioactivity_unit") {}
+
+ };
+
+ // C++ wrapper for radius_dimension
+ struct radius_dimension : dimension_curve_directed_callout, ObjectHelper<radius_dimension,0> { radius_dimension() : Object("radius_dimension") {}
+
+ };
+
+ // C++ wrapper for range_characteristic
+ struct range_characteristic : ObjectHelper<range_characteristic,0> { range_characteristic() : Object("range_characteristic") {}
+
+ };
+
+ // C++ wrapper for ratio_unit
+ struct ratio_unit : named_unit, ObjectHelper<ratio_unit,0> { ratio_unit() : Object("ratio_unit") {}
+
+ };
+
+ // C++ wrapper for rational_b_spline_curve
+ struct rational_b_spline_curve : b_spline_curve, ObjectHelper<rational_b_spline_curve,1> { rational_b_spline_curve() : Object("rational_b_spline_curve") {}
+ ListOf< REAL, 2, 0 >::Out weights_data;
+ };
+
+ // C++ wrapper for rational_b_spline_surface
+ struct rational_b_spline_surface : b_spline_surface, ObjectHelper<rational_b_spline_surface,0> { rational_b_spline_surface() : Object("rational_b_spline_surface") {}
+
+ };
+
+ // C++ wrapper for rational_representation_item
+ struct rational_representation_item : ObjectHelper<rational_representation_item,0> { rational_representation_item() : Object("rational_representation_item") {}
+
+ };
+
+ // C++ wrapper for real_literal
+ struct real_literal : literal_number, ObjectHelper<real_literal,0> { real_literal() : Object("real_literal") {}
+
+ };
+
+ // C++ wrapper for real_representation_item
+ struct real_representation_item : ObjectHelper<real_representation_item,0> { real_representation_item() : Object("real_representation_item") {}
+
+ };
+
+ // C++ wrapper for rectangular_composite_surface
+ struct rectangular_composite_surface : bounded_surface, ObjectHelper<rectangular_composite_surface,0> { rectangular_composite_surface() : Object("rectangular_composite_surface") {}
+
+ };
+
+ // C++ wrapper for rectangular_trimmed_surface
+ struct rectangular_trimmed_surface : bounded_surface, ObjectHelper<rectangular_trimmed_surface,7> { rectangular_trimmed_surface() : Object("rectangular_trimmed_surface") {}
+ Lazy< surface > basis_surface;
+ parameter_value::Out u1;
+ parameter_value::Out u2;
+ parameter_value::Out v1;
+ parameter_value::Out v2;
+ BOOLEAN::Out usense;
+ BOOLEAN::Out vsense;
+ };
+
+ // C++ wrapper for referenced_modified_datum
+ struct referenced_modified_datum : datum_reference, ObjectHelper<referenced_modified_datum,1> { referenced_modified_datum() : Object("referenced_modified_datum") {}
+ limit_condition::Out modifier;
+ };
+
+ // C++ wrapper for relative_event_occurrence
+ struct relative_event_occurrence : event_occurrence, ObjectHelper<relative_event_occurrence,2> { relative_event_occurrence() : Object("relative_event_occurrence") {}
+ Lazy< event_occurrence > base_event;
+ Lazy< time_measure_with_unit > offset;
+ };
+
+ // C++ wrapper for rep_item_group
+ struct rep_item_group : ObjectHelper<rep_item_group,0> { rep_item_group() : Object("rep_item_group") {}
+
+ };
+
+ // C++ wrapper for reparametrised_composite_curve_segment
+ struct reparametrised_composite_curve_segment : composite_curve_segment, ObjectHelper<reparametrised_composite_curve_segment,1> { reparametrised_composite_curve_segment() : Object("reparametrised_composite_curve_segment") {}
+ parameter_value::Out param_length;
+ };
+
+ // C++ wrapper for representation_relationship_with_transformation
+ struct representation_relationship_with_transformation : representation_relationship, ObjectHelper<representation_relationship_with_transformation,1> { representation_relationship_with_transformation() : Object("representation_relationship_with_transformation") {}
+ transformation::Out transformation_operator;
+ };
+
+ // C++ wrapper for requirement_assigned_object
+ struct requirement_assigned_object : group_assignment, ObjectHelper<requirement_assigned_object,1> { requirement_assigned_object() : Object("requirement_assigned_object") {}
+ ListOf< requirement_assigned_item, 1, 1 >::Out items;
+ };
+
+ // C++ wrapper for requirement_assignment
+ struct requirement_assignment : ObjectHelper<requirement_assignment,0> { requirement_assignment() : Object("requirement_assignment") {}
+
+ };
+
+ // C++ wrapper for requirement_source
+ struct requirement_source : group, ObjectHelper<requirement_source,0> { requirement_source() : Object("requirement_source") {}
+
+ };
+
+ // C++ wrapper for requirement_view_definition_relationship
+ struct requirement_view_definition_relationship : product_definition_relationship, ObjectHelper<requirement_view_definition_relationship,0> { requirement_view_definition_relationship() : Object("requirement_view_definition_relationship") {}
+
+ };
+
+ // C++ wrapper for resistance_measure_with_unit
+ struct resistance_measure_with_unit : measure_with_unit, ObjectHelper<resistance_measure_with_unit,0> { resistance_measure_with_unit() : Object("resistance_measure_with_unit") {}
+
+ };
+
+ // C++ wrapper for resistance_unit
+ struct resistance_unit : derived_unit, ObjectHelper<resistance_unit,0> { resistance_unit() : Object("resistance_unit") {}
+
+ };
+
+ // C++ wrapper for revolved_area_solid
+ struct revolved_area_solid : swept_area_solid, ObjectHelper<revolved_area_solid,2> { revolved_area_solid() : Object("revolved_area_solid") {}
+ Lazy< axis1_placement > axis;
+ plane_angle_measure::Out angle;
+ };
+
+ // C++ wrapper for revolved_face_solid
+ struct revolved_face_solid : swept_face_solid, ObjectHelper<revolved_face_solid,2> { revolved_face_solid() : Object("revolved_face_solid") {}
+ Lazy< axis1_placement > axis;
+ plane_angle_measure::Out angle;
+ };
+
+ // C++ wrapper for revolved_face_solid_with_trim_conditions
+ struct revolved_face_solid_with_trim_conditions : revolved_face_solid, ObjectHelper<revolved_face_solid_with_trim_conditions,2> { revolved_face_solid_with_trim_conditions() : Object("revolved_face_solid_with_trim_conditions") {}
+ trim_condition_select::Out first_trim_condition;
+ trim_condition_select::Out second_trim_condition;
+ };
+
+ // C++ wrapper for right_angular_wedge
+ struct right_angular_wedge : geometric_representation_item, ObjectHelper<right_angular_wedge,5> { right_angular_wedge() : Object("right_angular_wedge") {}
+ Lazy< axis2_placement_3d > position;
+ positive_length_measure::Out x;
+ positive_length_measure::Out y;
+ positive_length_measure::Out z;
+ length_measure::Out ltx;
+ };
+
+ // C++ wrapper for right_circular_cone
+ struct right_circular_cone : geometric_representation_item, ObjectHelper<right_circular_cone,4> { right_circular_cone() : Object("right_circular_cone") {}
+ Lazy< axis1_placement > position;
+ positive_length_measure::Out height;
+ length_measure::Out radius;
+ plane_angle_measure::Out semi_angle;
+ };
+
+ // C++ wrapper for right_circular_cylinder
+ struct right_circular_cylinder : geometric_representation_item, ObjectHelper<right_circular_cylinder,3> { right_circular_cylinder() : Object("right_circular_cylinder") {}
+ Lazy< axis1_placement > position;
+ positive_length_measure::Out height;
+ positive_length_measure::Out radius;
+ };
+
+ // C++ wrapper for right_to_usage_association
+ struct right_to_usage_association : action_method_relationship, ObjectHelper<right_to_usage_association,0> { right_to_usage_association() : Object("right_to_usage_association") {}
+
+ };
+
+ // C++ wrapper for roundness_tolerance
+ struct roundness_tolerance : geometric_tolerance, ObjectHelper<roundness_tolerance,0> { roundness_tolerance() : Object("roundness_tolerance") {}
+
+ };
+
+ // C++ wrapper for row_representation_item
+ struct row_representation_item : compound_representation_item, ObjectHelper<row_representation_item,0> { row_representation_item() : Object("row_representation_item") {}
+
+ };
+
+ // C++ wrapper for row_value
+ struct row_value : compound_representation_item, ObjectHelper<row_value,0> { row_value() : Object("row_value") {}
+
+ };
+
+ // C++ wrapper for row_variable
+ struct row_variable : abstract_variable, ObjectHelper<row_variable,0> { row_variable() : Object("row_variable") {}
+
+ };
+
+ // C++ wrapper for rule_action
+ struct rule_action : action, ObjectHelper<rule_action,0> { rule_action() : Object("rule_action") {}
+
+ };
+
+ // C++ wrapper for rule_condition
+ struct rule_condition : atomic_formula, ObjectHelper<rule_condition,0> { rule_condition() : Object("rule_condition") {}
+
+ };
+
+ // C++ wrapper for rule_set
+ struct rule_set : rule_software_definition, ObjectHelper<rule_set,0> { rule_set() : Object("rule_set") {}
+
+ };
+
+ // C++ wrapper for rule_set_group
+ struct rule_set_group : rule_software_definition, ObjectHelper<rule_set_group,0> { rule_set_group() : Object("rule_set_group") {}
+
+ };
+
+ // C++ wrapper for rule_superseded_assignment
+ struct rule_superseded_assignment : action_assignment, ObjectHelper<rule_superseded_assignment,1> { rule_superseded_assignment() : Object("rule_superseded_assignment") {}
+ ListOf< rule_superseded_item, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for rule_supersedence
+ struct rule_supersedence : rule_action, ObjectHelper<rule_supersedence,0> { rule_supersedence() : Object("rule_supersedence") {}
+
+ };
+
+ // C++ wrapper for surface_curve_swept_area_solid
+ struct surface_curve_swept_area_solid : swept_area_solid, ObjectHelper<surface_curve_swept_area_solid,4> { surface_curve_swept_area_solid() : Object("surface_curve_swept_area_solid") {}
+ Lazy< curve > directrix;
+ REAL::Out start_param;
+ REAL::Out end_param;
+ Lazy< surface > reference_surface;
+ };
+
+ // C++ wrapper for ruled_surface_swept_area_solid
+ struct ruled_surface_swept_area_solid : surface_curve_swept_area_solid, ObjectHelper<ruled_surface_swept_area_solid,0> { ruled_surface_swept_area_solid() : Object("ruled_surface_swept_area_solid") {}
+
+ };
+
+ // C++ wrapper for runout_zone_definition
+ struct runout_zone_definition : tolerance_zone_definition, ObjectHelper<runout_zone_definition,1> { runout_zone_definition() : Object("runout_zone_definition") {}
+ Lazy< runout_zone_orientation > orientation;
+ };
+
+ // C++ wrapper for runout_zone_orientation
+ struct runout_zone_orientation : ObjectHelper<runout_zone_orientation,1> { runout_zone_orientation() : Object("runout_zone_orientation") {}
+ Lazy< measure_with_unit > angle;
+ };
+
+ // C++ wrapper for runout_zone_orientation_reference_direction
+ struct runout_zone_orientation_reference_direction : runout_zone_orientation, ObjectHelper<runout_zone_orientation_reference_direction,1> { runout_zone_orientation_reference_direction() : Object("runout_zone_orientation_reference_direction") {}
+ Lazy< shape_aspect_relationship > orientation_defining_relationship;
+ };
+
+ // C++ wrapper for satisfied_requirement
+ struct satisfied_requirement : group_assignment, ObjectHelper<satisfied_requirement,1> { satisfied_requirement() : Object("satisfied_requirement") {}
+ ListOf< Lazy< product_definition >, 1, 1 > items;
+ };
+
+ // C++ wrapper for satisfies_requirement
+ struct satisfies_requirement : group, ObjectHelper<satisfies_requirement,0> { satisfies_requirement() : Object("satisfies_requirement") {}
+
+ };
+
+ // C++ wrapper for satisfying_item
+ struct satisfying_item : group_assignment, ObjectHelper<satisfying_item,1> { satisfying_item() : Object("satisfying_item") {}
+ ListOf< requirement_satisfaction_item, 1, 1 >::Out items;
+ };
+
+ // C++ wrapper for scalar_variable
+ struct scalar_variable : abstract_variable, ObjectHelper<scalar_variable,0> { scalar_variable() : Object("scalar_variable") {}
+
+ };
+
+ // C++ wrapper for scattering_parameter
+ struct scattering_parameter : polar_complex_number_literal, ObjectHelper<scattering_parameter,0> { scattering_parameter() : Object("scattering_parameter") {}
+
+ };
+
+ // C++ wrapper for sculptured_solid
+ struct sculptured_solid : modified_solid, ObjectHelper<sculptured_solid,2> { sculptured_solid() : Object("sculptured_solid") {}
+ generalized_surface_select::Out sculpturing_element;
+ BOOLEAN::Out positive_side;
+ };
+
+ // C++ wrapper for seam_curve
+ struct seam_curve : surface_curve, ObjectHelper<seam_curve,0> { seam_curve() : Object("seam_curve") {}
+
+ };
+
+ // C++ wrapper for serial_numbered_effectivity
+ struct serial_numbered_effectivity : effectivity, ObjectHelper<serial_numbered_effectivity,2> { serial_numbered_effectivity() : Object("serial_numbered_effectivity") {}
+ identifier::Out effectivity_start_id;
+ Maybe< identifier::Out > effectivity_end_id;
+ };
+
+ // C++ wrapper for shape_aspect_associativity
+ struct shape_aspect_associativity : shape_aspect_relationship, ObjectHelper<shape_aspect_associativity,0> { shape_aspect_associativity() : Object("shape_aspect_associativity") {}
+
+ };
+
+ // C++ wrapper for shape_aspect_deriving_relationship
+ struct shape_aspect_deriving_relationship : shape_aspect_relationship, ObjectHelper<shape_aspect_deriving_relationship,0> { shape_aspect_deriving_relationship() : Object("shape_aspect_deriving_relationship") {}
+
+ };
+
+ // C++ wrapper for shape_definition_representation
+ struct shape_definition_representation : property_definition_representation, ObjectHelper<shape_definition_representation,0> { shape_definition_representation() : Object("shape_definition_representation") {}
+
+ };
+
+ // C++ wrapper for shape_dimension_representation
+ struct shape_dimension_representation : shape_representation, ObjectHelper<shape_dimension_representation,0> { shape_dimension_representation() : Object("shape_dimension_representation") {}
+
+ };
+
+ // C++ wrapper for shape_feature_definition
+ struct shape_feature_definition : characterized_object, ObjectHelper<shape_feature_definition,0> { shape_feature_definition() : Object("shape_feature_definition") {}
+
+ };
+
+ // C++ wrapper for shape_representation_with_parameters
+ struct shape_representation_with_parameters : shape_representation, ObjectHelper<shape_representation_with_parameters,0> { shape_representation_with_parameters() : Object("shape_representation_with_parameters") {}
+
+ };
+
+ // C++ wrapper for shell_based_surface_model
+ struct shell_based_surface_model : geometric_representation_item, ObjectHelper<shell_based_surface_model,1> { shell_based_surface_model() : Object("shell_based_surface_model") {}
+ ListOf< shell, 1, 0 >::Out sbsm_boundary;
+ };
+
+ // C++ wrapper for shell_based_wireframe_model
+ struct shell_based_wireframe_model : geometric_representation_item, ObjectHelper<shell_based_wireframe_model,1> { shell_based_wireframe_model() : Object("shell_based_wireframe_model") {}
+ ListOf< shell, 1, 0 >::Out sbwm_boundary;
+ };
+
+ // C++ wrapper for shell_based_wireframe_shape_representation
+ struct shell_based_wireframe_shape_representation : shape_representation, ObjectHelper<shell_based_wireframe_shape_representation,0> { shell_based_wireframe_shape_representation() : Object("shell_based_wireframe_shape_representation") {}
+
+ };
+
+ // C++ wrapper for si_absorbed_dose_unit
+ struct si_absorbed_dose_unit : ObjectHelper<si_absorbed_dose_unit,0> { si_absorbed_dose_unit() : Object("si_absorbed_dose_unit") {}
+
+ };
+
+ // C++ wrapper for si_capacitance_unit
+ struct si_capacitance_unit : ObjectHelper<si_capacitance_unit,0> { si_capacitance_unit() : Object("si_capacitance_unit") {}
+
+ };
+
+ // C++ wrapper for si_conductance_unit
+ struct si_conductance_unit : ObjectHelper<si_conductance_unit,0> { si_conductance_unit() : Object("si_conductance_unit") {}
+
+ };
+
+ // C++ wrapper for si_dose_equivalent_unit
+ struct si_dose_equivalent_unit : ObjectHelper<si_dose_equivalent_unit,0> { si_dose_equivalent_unit() : Object("si_dose_equivalent_unit") {}
+
+ };
+
+ // C++ wrapper for si_electric_charge_unit
+ struct si_electric_charge_unit : ObjectHelper<si_electric_charge_unit,0> { si_electric_charge_unit() : Object("si_electric_charge_unit") {}
+
+ };
+
+ // C++ wrapper for si_electric_potential_unit
+ struct si_electric_potential_unit : ObjectHelper<si_electric_potential_unit,0> { si_electric_potential_unit() : Object("si_electric_potential_unit") {}
+
+ };
+
+ // C++ wrapper for si_energy_unit
+ struct si_energy_unit : ObjectHelper<si_energy_unit,0> { si_energy_unit() : Object("si_energy_unit") {}
+
+ };
+
+ // C++ wrapper for si_force_unit
+ struct si_force_unit : ObjectHelper<si_force_unit,0> { si_force_unit() : Object("si_force_unit") {}
+
+ };
+
+ // C++ wrapper for si_frequency_unit
+ struct si_frequency_unit : ObjectHelper<si_frequency_unit,0> { si_frequency_unit() : Object("si_frequency_unit") {}
+
+ };
+
+ // C++ wrapper for si_illuminance_unit
+ struct si_illuminance_unit : ObjectHelper<si_illuminance_unit,0> { si_illuminance_unit() : Object("si_illuminance_unit") {}
+
+ };
+
+ // C++ wrapper for si_inductance_unit
+ struct si_inductance_unit : ObjectHelper<si_inductance_unit,0> { si_inductance_unit() : Object("si_inductance_unit") {}
+
+ };
+
+ // C++ wrapper for si_magnetic_flux_density_unit
+ struct si_magnetic_flux_density_unit : ObjectHelper<si_magnetic_flux_density_unit,0> { si_magnetic_flux_density_unit() : Object("si_magnetic_flux_density_unit") {}
+
+ };
+
+ // C++ wrapper for si_magnetic_flux_unit
+ struct si_magnetic_flux_unit : ObjectHelper<si_magnetic_flux_unit,0> { si_magnetic_flux_unit() : Object("si_magnetic_flux_unit") {}
+
+ };
+
+ // C++ wrapper for si_power_unit
+ struct si_power_unit : ObjectHelper<si_power_unit,0> { si_power_unit() : Object("si_power_unit") {}
+
+ };
+
+ // C++ wrapper for si_pressure_unit
+ struct si_pressure_unit : ObjectHelper<si_pressure_unit,0> { si_pressure_unit() : Object("si_pressure_unit") {}
+
+ };
+
+ // C++ wrapper for si_radioactivity_unit
+ struct si_radioactivity_unit : ObjectHelper<si_radioactivity_unit,0> { si_radioactivity_unit() : Object("si_radioactivity_unit") {}
+
+ };
+
+ // C++ wrapper for si_resistance_unit
+ struct si_resistance_unit : ObjectHelper<si_resistance_unit,0> { si_resistance_unit() : Object("si_resistance_unit") {}
+
+ };
+
+ // C++ wrapper for si_unit
+ struct si_unit : named_unit, ObjectHelper<si_unit,2> { si_unit() : Object("si_unit") {}
+ Maybe< si_prefix::Out > prefix;
+ si_unit_name::Out name;
+ };
+
+ // C++ wrapper for simple_boolean_expression
+ struct simple_boolean_expression : ObjectHelper<simple_boolean_expression,0> { simple_boolean_expression() : Object("simple_boolean_expression") {}
+
+ };
+
+ // C++ wrapper for simple_numeric_expression
+ struct simple_numeric_expression : ObjectHelper<simple_numeric_expression,0> { simple_numeric_expression() : Object("simple_numeric_expression") {}
+
+ };
+
+ // C++ wrapper for slash_expression
+ struct slash_expression : binary_numeric_expression, ObjectHelper<slash_expression,0> { slash_expression() : Object("slash_expression") {}
+
+ };
+
+ // C++ wrapper for smeared_material_definition
+ struct smeared_material_definition : zone_structural_makeup, ObjectHelper<smeared_material_definition,0> { smeared_material_definition() : Object("smeared_material_definition") {}
+
+ };
+
+ // C++ wrapper for solid_angle_measure_with_unit
+ struct solid_angle_measure_with_unit : measure_with_unit, ObjectHelper<solid_angle_measure_with_unit,0> { solid_angle_measure_with_unit() : Object("solid_angle_measure_with_unit") {}
+
+ };
+
+ // C++ wrapper for solid_angle_unit
+ struct solid_angle_unit : named_unit, ObjectHelper<solid_angle_unit,0> { solid_angle_unit() : Object("solid_angle_unit") {}
+
+ };
+
+ // C++ wrapper for solid_curve_font
+ struct solid_curve_font : pre_defined_curve_font, ObjectHelper<solid_curve_font,0> { solid_curve_font() : Object("solid_curve_font") {}
+
+ };
+
+ // C++ wrapper for solid_replica
+ struct solid_replica : solid_model, ObjectHelper<solid_replica,2> { solid_replica() : Object("solid_replica") {}
+ Lazy< solid_model > parent_solid;
+ Lazy< cartesian_transformation_operator_3d > transformation;
+ };
+
+ // C++ wrapper for solid_with_chamfered_edges
+ struct solid_with_chamfered_edges : edge_blended_solid, ObjectHelper<solid_with_chamfered_edges,0> { solid_with_chamfered_edges() : Object("solid_with_chamfered_edges") {}
+
+ };
+
+ // C++ wrapper for solid_with_angle_based_chamfer
+ struct solid_with_angle_based_chamfer : solid_with_chamfered_edges, ObjectHelper<solid_with_angle_based_chamfer,3> { solid_with_angle_based_chamfer() : Object("solid_with_angle_based_chamfer") {}
+ positive_length_measure::Out offset_distance;
+ BOOLEAN::Out left_offset;
+ positive_plane_angle_measure::Out offset_angle;
+ };
+
+ // C++ wrapper for solid_with_shape_element_pattern
+ struct solid_with_shape_element_pattern : modified_solid_with_placed_configuration, ObjectHelper<solid_with_shape_element_pattern,1> { solid_with_shape_element_pattern() : Object("solid_with_shape_element_pattern") {}
+ Lazy< modified_solid_with_placed_configuration > replicated_element;
+ };
+
+ // C++ wrapper for solid_with_circular_pattern
+ struct solid_with_circular_pattern : solid_with_shape_element_pattern, ObjectHelper<solid_with_circular_pattern,4> { solid_with_circular_pattern() : Object("solid_with_circular_pattern") {}
+ positive_integer::Out replicate_count;
+ plane_angle_measure::Out angular_spacing;
+ BOOLEAN::Out radial_alignment;
+ Lazy< point > reference_point;
+ };
+
+ // C++ wrapper for solid_with_depression
+ struct solid_with_depression : modified_solid_with_placed_configuration, ObjectHelper<solid_with_depression,1> { solid_with_depression() : Object("solid_with_depression") {}
+ positive_length_measure::Out depth;
+ };
+
+ // C++ wrapper for solid_with_pocket
+ struct solid_with_pocket : solid_with_depression, ObjectHelper<solid_with_pocket,2> { solid_with_pocket() : Object("solid_with_pocket") {}
+ non_negative_length_measure::Out floor_blend_radius;
+ plane_angle_measure::Out draft_angle;
+ };
+
+ // C++ wrapper for solid_with_circular_pocket
+ struct solid_with_circular_pocket : solid_with_pocket, ObjectHelper<solid_with_circular_pocket,1> { solid_with_circular_pocket() : Object("solid_with_circular_pocket") {}
+ positive_length_measure::Out pocket_radius;
+ };
+
+ // C++ wrapper for solid_with_protrusion
+ struct solid_with_protrusion : modified_solid_with_placed_configuration, ObjectHelper<solid_with_protrusion,2> { solid_with_protrusion() : Object("solid_with_protrusion") {}
+ positive_length_measure::Out protrusion_height;
+ plane_angle_measure::Out protrusion_draft_angle;
+ };
+
+ // C++ wrapper for solid_with_circular_protrusion
+ struct solid_with_circular_protrusion : solid_with_protrusion, ObjectHelper<solid_with_circular_protrusion,1> { solid_with_circular_protrusion() : Object("solid_with_circular_protrusion") {}
+ positive_length_measure::Out protrusion_radius;
+ };
+
+ // C++ wrapper for solid_with_hole
+ struct solid_with_hole : solid_with_depression, ObjectHelper<solid_with_hole,0> { solid_with_hole() : Object("solid_with_hole") {}
+
+ };
+
+ // C++ wrapper for solid_with_stepped_round_hole
+ struct solid_with_stepped_round_hole : solid_with_hole, ObjectHelper<solid_with_stepped_round_hole,1> { solid_with_stepped_round_hole() : Object("solid_with_stepped_round_hole") {}
+ positive_integer::Out segments;
+ };
+
+ // C++ wrapper for solid_with_conical_bottom_round_hole
+ struct solid_with_conical_bottom_round_hole : solid_with_stepped_round_hole, ObjectHelper<solid_with_conical_bottom_round_hole,2> { solid_with_conical_bottom_round_hole() : Object("solid_with_conical_bottom_round_hole") {}
+ positive_plane_angle_measure::Out semi_apex_angle;
+ non_negative_length_measure::Out tip_radius;
+ };
+
+ // C++ wrapper for solid_with_constant_radius_edge_blend
+ struct solid_with_constant_radius_edge_blend : edge_blended_solid, ObjectHelper<solid_with_constant_radius_edge_blend,1> { solid_with_constant_radius_edge_blend() : Object("solid_with_constant_radius_edge_blend") {}
+ positive_length_measure::Out radius;
+ };
+
+ // C++ wrapper for solid_with_slot
+ struct solid_with_slot : solid_with_depression, ObjectHelper<solid_with_slot,2> { solid_with_slot() : Object("solid_with_slot") {}
+ positive_length_measure::Out slot_width;
+ ListOf< LOGICAL, 2, 2 >::Out closed_ends;
+ };
+
+ // C++ wrapper for solid_with_curved_slot
+ struct solid_with_curved_slot : solid_with_slot, ObjectHelper<solid_with_curved_slot,1> { solid_with_curved_slot() : Object("solid_with_curved_slot") {}
+ Lazy< bounded_curve > slot_centreline;
+ };
+
+ // C++ wrapper for solid_with_double_offset_chamfer
+ struct solid_with_double_offset_chamfer : solid_with_chamfered_edges, ObjectHelper<solid_with_double_offset_chamfer,2> { solid_with_double_offset_chamfer() : Object("solid_with_double_offset_chamfer") {}
+ positive_length_measure::Out left_offset_distance;
+ positive_length_measure::Out right_offset_distance;
+ };
+
+ // C++ wrapper for solid_with_flat_bottom_round_hole
+ struct solid_with_flat_bottom_round_hole : solid_with_stepped_round_hole, ObjectHelper<solid_with_flat_bottom_round_hole,1> { solid_with_flat_bottom_round_hole() : Object("solid_with_flat_bottom_round_hole") {}
+ non_negative_length_measure::Out fillet_radius;
+ };
+
+ // C++ wrapper for solid_with_general_pocket
+ struct solid_with_general_pocket : solid_with_pocket, ObjectHelper<solid_with_general_pocket,2> { solid_with_general_pocket() : Object("solid_with_general_pocket") {}
+ Lazy< positioned_sketch > profile;
+ Lazy< point > reference_point;
+ };
+
+ // C++ wrapper for solid_with_general_protrusion
+ struct solid_with_general_protrusion : solid_with_protrusion, ObjectHelper<solid_with_general_protrusion,2> { solid_with_general_protrusion() : Object("solid_with_general_protrusion") {}
+ Lazy< positioned_sketch > profile;
+ Lazy< point > reference_point;
+ };
+
+ // C++ wrapper for solid_with_groove
+ struct solid_with_groove : solid_with_depression, ObjectHelper<solid_with_groove,5> { solid_with_groove() : Object("solid_with_groove") {}
+ positive_length_measure::Out groove_radius;
+ positive_length_measure::Out groove_width;
+ plane_angle_measure::Out draft_angle;
+ non_negative_length_measure::Out floor_fillet_radius;
+ BOOLEAN::Out external_groove;
+ };
+
+ // C++ wrapper for solid_with_incomplete_circular_pattern
+ struct solid_with_incomplete_circular_pattern : solid_with_circular_pattern, ObjectHelper<solid_with_incomplete_circular_pattern,1> { solid_with_incomplete_circular_pattern() : Object("solid_with_incomplete_circular_pattern") {}
+ ListOf< positive_integer, 1, 0 >::Out omitted_instances;
+ };
+
+ // C++ wrapper for solid_with_rectangular_pattern
+ struct solid_with_rectangular_pattern : solid_with_shape_element_pattern, ObjectHelper<solid_with_rectangular_pattern,4> { solid_with_rectangular_pattern() : Object("solid_with_rectangular_pattern") {}
+ positive_integer::Out row_count;
+ positive_integer::Out column_count;
+ length_measure::Out row_spacing;
+ length_measure::Out column_spacing;
+ };
+
+ // C++ wrapper for solid_with_incomplete_rectangular_pattern
+ struct solid_with_incomplete_rectangular_pattern : solid_with_rectangular_pattern, ObjectHelper<solid_with_incomplete_rectangular_pattern,0> { solid_with_incomplete_rectangular_pattern() : Object("solid_with_incomplete_rectangular_pattern") {}
+
+ };
+
+ // C++ wrapper for solid_with_rectangular_pocket
+ struct solid_with_rectangular_pocket : solid_with_pocket, ObjectHelper<solid_with_rectangular_pocket,3> { solid_with_rectangular_pocket() : Object("solid_with_rectangular_pocket") {}
+ positive_length_measure::Out pocket_length;
+ positive_length_measure::Out pocket_width;
+ non_negative_length_measure::Out corner_radius;
+ };
+
+ // C++ wrapper for solid_with_rectangular_protrusion
+ struct solid_with_rectangular_protrusion : solid_with_protrusion, ObjectHelper<solid_with_rectangular_protrusion,3> { solid_with_rectangular_protrusion() : Object("solid_with_rectangular_protrusion") {}
+ positive_length_measure::Out protrusion_length;
+ positive_length_measure::Out protrusion_width;
+ non_negative_length_measure::Out protrusion_corner_radius;
+ };
+
+ // C++ wrapper for solid_with_single_offset_chamfer
+ struct solid_with_single_offset_chamfer : solid_with_chamfered_edges, ObjectHelper<solid_with_single_offset_chamfer,1> { solid_with_single_offset_chamfer() : Object("solid_with_single_offset_chamfer") {}
+ positive_length_measure::Out offset_distance;
+ };
+
+ // C++ wrapper for solid_with_spherical_bottom_round_hole
+ struct solid_with_spherical_bottom_round_hole : solid_with_stepped_round_hole, ObjectHelper<solid_with_spherical_bottom_round_hole,1> { solid_with_spherical_bottom_round_hole() : Object("solid_with_spherical_bottom_round_hole") {}
+ positive_length_measure::Out sphere_radius;
+ };
+
+ // C++ wrapper for solid_with_stepped_round_hole_and_conical_transitions
+ struct solid_with_stepped_round_hole_and_conical_transitions : solid_with_stepped_round_hole, ObjectHelper<solid_with_stepped_round_hole_and_conical_transitions,1> { solid_with_stepped_round_hole_and_conical_transitions() : Object("solid_with_stepped_round_hole_and_conical_transitions") {}
+ ListOf< Lazy< conical_stepped_hole_transition >, 1, 0 > conical_transitions;
+ };
+
+ // C++ wrapper for solid_with_straight_slot
+ struct solid_with_straight_slot : solid_with_slot, ObjectHelper<solid_with_straight_slot,1> { solid_with_straight_slot() : Object("solid_with_straight_slot") {}
+ positive_length_measure::Out slot_length;
+ };
+
+ // C++ wrapper for solid_with_tee_section_slot
+ struct solid_with_tee_section_slot : solid_with_slot, ObjectHelper<solid_with_tee_section_slot,2> { solid_with_tee_section_slot() : Object("solid_with_tee_section_slot") {}
+ positive_length_measure::Out tee_section_width;
+ positive_length_measure::Out collar_depth;
+ };
+
+ // C++ wrapper for solid_with_through_depression
+ struct solid_with_through_depression : solid_with_depression, ObjectHelper<solid_with_through_depression,1> { solid_with_through_depression() : Object("solid_with_through_depression") {}
+ ListOf< Lazy< face_surface >, 1, 0 > exit_faces;
+ };
+
+ // C++ wrapper for solid_with_trapezoidal_section_slot
+ struct solid_with_trapezoidal_section_slot : solid_with_slot, ObjectHelper<solid_with_trapezoidal_section_slot,2> { solid_with_trapezoidal_section_slot() : Object("solid_with_trapezoidal_section_slot") {}
+ plane_angle_measure::Out draft_angle;
+ non_negative_length_measure::Out floor_fillet_radius;
+ };
+
+ // C++ wrapper for solid_with_variable_radius_edge_blend
+ struct solid_with_variable_radius_edge_blend : ObjectHelper<solid_with_variable_radius_edge_blend,3> { solid_with_variable_radius_edge_blend() : Object("solid_with_variable_radius_edge_blend") {}
+ ListOf< Lazy< point >, 2, 0 > point_list;
+ ListOf< positive_length_measure, 2, 0 >::Out radius_list;
+ ListOf< blend_radius_variation_type, 1, 0 >::Out edge_function_list;
+ };
+
+ // C++ wrapper for source_for_requirement
+ struct source_for_requirement : group_assignment, ObjectHelper<source_for_requirement,1> { source_for_requirement() : Object("source_for_requirement") {}
+ ListOf< requirement_source_item, 1, 1 >::Out items;
+ };
+
+ // C++ wrapper for sourced_requirement
+ struct sourced_requirement : group_assignment, ObjectHelper<sourced_requirement,1> { sourced_requirement() : Object("sourced_requirement") {}
+ ListOf< Lazy< product_definition >, 1, 1 > items;
+ };
+
+ // C++ wrapper for specification_definition
+ struct specification_definition : product_definition, ObjectHelper<specification_definition,0> { specification_definition() : Object("specification_definition") {}
+
+ };
+
+ // C++ wrapper for specified_higher_usage_occurrence
+ struct specified_higher_usage_occurrence : assembly_component_usage, ObjectHelper<specified_higher_usage_occurrence,2> { specified_higher_usage_occurrence() : Object("specified_higher_usage_occurrence") {}
+ Lazy< assembly_component_usage > upper_usage;
+ Lazy< next_assembly_usage_occurrence > next_usage;
+ };
+
+ // C++ wrapper for sphere
+ struct sphere : geometric_representation_item, ObjectHelper<sphere,2> { sphere() : Object("sphere") {}
+ positive_length_measure::Out radius;
+ Lazy< point > centre;
+ };
+
+ // C++ wrapper for spherical_surface
+ struct spherical_surface : elementary_surface, ObjectHelper<spherical_surface,1> { spherical_surface() : Object("spherical_surface") {}
+ positive_length_measure::Out radius;
+ };
+
+ // C++ wrapper for start_request
+ struct start_request : action_request_assignment, ObjectHelper<start_request,1> { start_request() : Object("start_request") {}
+ ListOf< start_request_item, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for start_work
+ struct start_work : action_assignment, ObjectHelper<start_work,1> { start_work() : Object("start_work") {}
+ ListOf< work_item, 1, 0 >::Out items;
+ };
+
+ // C++ wrapper for straightness_tolerance
+ struct straightness_tolerance : geometric_tolerance, ObjectHelper<straightness_tolerance,0> { straightness_tolerance() : Object("straightness_tolerance") {}
+
+ };
+
+ // C++ wrapper for structured_dimension_callout
+ struct structured_dimension_callout : draughting_callout, ObjectHelper<structured_dimension_callout,0> { structured_dimension_callout() : Object("structured_dimension_callout") {}
+
+ };
+
+ // C++ wrapper for structured_text_composition
+ struct structured_text_composition : compound_representation_item, ObjectHelper<structured_text_composition,0> { structured_text_composition() : Object("structured_text_composition") {}
+
+ };
+
+ // C++ wrapper for structured_text_representation
+ struct structured_text_representation : representation, ObjectHelper<structured_text_representation,0> { structured_text_representation() : Object("structured_text_representation") {}
+
+ };
+
+ // C++ wrapper for subedge
+ struct subedge : edge, ObjectHelper<subedge,1> { subedge() : Object("subedge") {}
+ Lazy< edge > parent_edge;
+ };
+
+ // C++ wrapper for subface
+ struct subface : face, ObjectHelper<subface,1> { subface() : Object("subface") {}
+ Lazy< face > parent_face;
+ };
+
+ // C++ wrapper for supplied_part_relationship
+ struct supplied_part_relationship : product_definition_relationship, ObjectHelper<supplied_part_relationship,0> { supplied_part_relationship() : Object("supplied_part_relationship") {}
+
+ };
+
+ // C++ wrapper for surface_condition_callout
+ struct surface_condition_callout : draughting_callout, ObjectHelper<surface_condition_callout,0> { surface_condition_callout() : Object("surface_condition_callout") {}
+
+ };
+
+ // C++ wrapper for swept_surface
+ struct swept_surface : surface, ObjectHelper<swept_surface,1> { swept_surface() : Object("swept_surface") {}
+ Lazy< curve > swept_curve;
+ };
+
+ // C++ wrapper for surface_of_linear_extrusion
+ struct surface_of_linear_extrusion : swept_surface, ObjectHelper<surface_of_linear_extrusion,1> { surface_of_linear_extrusion() : Object("surface_of_linear_extrusion") {}
+ Lazy< vector > extrusion_axis;
+ };
+
+ // C++ wrapper for surface_of_revolution
+ struct surface_of_revolution : swept_surface, ObjectHelper<surface_of_revolution,1> { surface_of_revolution() : Object("surface_of_revolution") {}
+ Lazy< axis1_placement > axis_position;
+ };
+
+ // C++ wrapper for surface_patch
+ struct surface_patch : founded_item, ObjectHelper<surface_patch,5> { surface_patch() : Object("surface_patch") {}
+ Lazy< bounded_surface > parent_surface;
+ transition_code::Out u_transition;
+ transition_code::Out v_transition;
+ BOOLEAN::Out u_sense;
+ BOOLEAN::Out v_sense;
+ };
+
+ // C++ wrapper for surface_profile_tolerance
+ struct surface_profile_tolerance : geometric_tolerance, ObjectHelper<surface_profile_tolerance,0> { surface_profile_tolerance() : Object("surface_profile_tolerance") {}
+
+ };
+
+ // C++ wrapper for surface_replica
+ struct surface_replica : surface, ObjectHelper<surface_replica,2> { surface_replica() : Object("surface_replica") {}
+ Lazy< surface > parent_surface;
+ Lazy< cartesian_transformation_operator_3d > transformation;
+ };
+
+ // C++ wrapper for surface_side_style
+ struct surface_side_style : founded_item, ObjectHelper<surface_side_style,2> { surface_side_style() : Object("surface_side_style") {}
+ label::Out name;
+ ListOf< surface_style_element_select, 1, 7 >::Out styles;
+ };
+
+ // C++ wrapper for surface_style_boundary
+ struct surface_style_boundary : founded_item, ObjectHelper<surface_style_boundary,1> { surface_style_boundary() : Object("surface_style_boundary") {}
+ curve_or_render::Out style_of_boundary;
+ };
+
+ // C++ wrapper for surface_style_control_grid
+ struct surface_style_control_grid : founded_item, ObjectHelper<surface_style_control_grid,1> { surface_style_control_grid() : Object("surface_style_control_grid") {}
+ curve_or_render::Out style_of_control_grid;
+ };
+
+ // C++ wrapper for surface_style_fill_area
+ struct surface_style_fill_area : founded_item, ObjectHelper<surface_style_fill_area,1> { surface_style_fill_area() : Object("surface_style_fill_area") {}
+ Lazy< fill_area_style > fill_area;
+ };
+
+ // C++ wrapper for surface_style_parameter_line
+ struct surface_style_parameter_line : founded_item, ObjectHelper<surface_style_parameter_line,2> { surface_style_parameter_line() : Object("surface_style_parameter_line") {}
+ curve_or_render::Out style_of_parameter_lines;
+ ListOf< direction_count_select, 1, 2 >::Out direction_counts;
+ };
+
+ // C++ wrapper for surface_style_reflectance_ambient
+ struct surface_style_reflectance_ambient : ObjectHelper<surface_style_reflectance_ambient,1> { surface_style_reflectance_ambient() : Object("surface_style_reflectance_ambient") {}
+ REAL::Out ambient_reflectance;
+ };
+
+ // C++ wrapper for surface_style_reflectance_ambient_diffuse
+ struct surface_style_reflectance_ambient_diffuse : surface_style_reflectance_ambient, ObjectHelper<surface_style_reflectance_ambient_diffuse,1> { surface_style_reflectance_ambient_diffuse() : Object("surface_style_reflectance_ambient_diffuse") {}
+ REAL::Out diffuse_reflectance;
+ };
+
+ // C++ wrapper for surface_style_reflectance_ambient_diffuse_specular
+ struct surface_style_reflectance_ambient_diffuse_specular : surface_style_reflectance_ambient_diffuse, ObjectHelper<surface_style_reflectance_ambient_diffuse_specular,3> { surface_style_reflectance_ambient_diffuse_specular() : Object("surface_style_reflectance_ambient_diffuse_specular") {}
+ REAL::Out specular_reflectance;
+ REAL::Out specular_exponent;
+ Lazy< colour > specular_colour;
+ };
+
+ // C++ wrapper for surface_style_rendering
+ struct surface_style_rendering : ObjectHelper<surface_style_rendering,2> { surface_style_rendering() : Object("surface_style_rendering") {}
+ shading_surface_method::Out rendering_method;
+ Lazy< colour > surface_colour;
+ };
+
+ // C++ wrapper for surface_style_rendering_with_properties
+ struct surface_style_rendering_with_properties : surface_style_rendering, ObjectHelper<surface_style_rendering_with_properties,1> { surface_style_rendering_with_properties() : Object("surface_style_rendering_with_properties") {}
+ ListOf< rendering_properties_select, 1, 2 >::Out properties;
+ };
+
+ // C++ wrapper for surface_style_segmentation_curve
+ struct surface_style_segmentation_curve : founded_item, ObjectHelper<surface_style_segmentation_curve,1> { surface_style_segmentation_curve() : Object("surface_style_segmentation_curve") {}
+ curve_or_render::Out style_of_segmentation_curve;
+ };
+
+ // C++ wrapper for surface_style_silhouette
+ struct surface_style_silhouette : founded_item, ObjectHelper<surface_style_silhouette,1> { surface_style_silhouette() : Object("surface_style_silhouette") {}
+ curve_or_render::Out style_of_silhouette;
+ };
+
+ // C++ wrapper for surface_style_usage
+ struct surface_style_usage : founded_item, ObjectHelper<surface_style_usage,2> { surface_style_usage() : Object("surface_style_usage") {}
+ surface_side::Out side;
+ surface_side_style_select::Out style;
+ };
+
+ // C++ wrapper for surface_texture_representation
+ struct surface_texture_representation : representation, ObjectHelper<surface_texture_representation,0> { surface_texture_representation() : Object("surface_texture_representation") {}
+
+ };
+
+ // C++ wrapper for surfaced_open_shell
+ struct surfaced_open_shell : open_shell, ObjectHelper<surfaced_open_shell,0> { surfaced_open_shell() : Object("surfaced_open_shell") {}
+
+ };
+
+ // C++ wrapper for swept_disk_solid
+ struct swept_disk_solid : solid_model, ObjectHelper<swept_disk_solid,5> { swept_disk_solid() : Object("swept_disk_solid") {}
+ Lazy< curve > directrix;
+ positive_length_measure::Out radius;
+ Maybe< positive_length_measure::Out > inner_radius;
+ REAL::Out start_param;
+ REAL::Out end_param;
+ };
+
+ // C++ wrapper for symbol
+ struct symbol : representation_item, ObjectHelper<symbol,0> { symbol() : Object("symbol") {}
+
+ };
+
+ // C++ wrapper for symbol_representation_map
+ struct symbol_representation_map : representation_map, ObjectHelper<symbol_representation_map,0> { symbol_representation_map() : Object("symbol_representation_map") {}
+
+ };
+
+ // C++ wrapper for symbol_style
+ struct symbol_style : founded_item, ObjectHelper<symbol_style,2> { symbol_style() : Object("symbol_style") {}
+ label::Out name;
+ symbol_style_select::Out style_of_symbol;
+ };
+
+ // C++ wrapper for symbol_target
+ struct symbol_target : geometric_representation_item, ObjectHelper<symbol_target,3> { symbol_target() : Object("symbol_target") {}
+ axis2_placement::Out placement;
+ positive_ratio_measure::Out x_scale;
+ positive_ratio_measure::Out y_scale;
+ };
+
+ // C++ wrapper for symmetric_shape_aspect
+ struct symmetric_shape_aspect : shape_aspect, ObjectHelper<symmetric_shape_aspect,0> { symmetric_shape_aspect() : Object("symmetric_shape_aspect") {}
+
+ };
+
+ // C++ wrapper for symmetry_tolerance
+ struct symmetry_tolerance : geometric_tolerance_with_datum_reference, ObjectHelper<symmetry_tolerance,0> { symmetry_tolerance() : Object("symmetry_tolerance") {}
+
+ };
+
+ // C++ wrapper for table_representation_item
+ struct table_representation_item : compound_representation_item, ObjectHelper<table_representation_item,0> { table_representation_item() : Object("table_representation_item") {}
+
+ };
+
+ // C++ wrapper for tactile_appearance_representation
+ struct tactile_appearance_representation : representation, ObjectHelper<tactile_appearance_representation,0> { tactile_appearance_representation() : Object("tactile_appearance_representation") {}
+
+ };
+
+ // C++ wrapper for tagged_text_format
+ struct tagged_text_format : representation_context, ObjectHelper<tagged_text_format,0> { tagged_text_format() : Object("tagged_text_format") {}
+
+ };
+
+ // C++ wrapper for tagged_text_item
+ struct tagged_text_item : descriptive_representation_item, ObjectHelper<tagged_text_item,0> { tagged_text_item() : Object("tagged_text_item") {}
+
+ };
+
+ // C++ wrapper for tangent
+ struct tangent : derived_shape_aspect, ObjectHelper<tangent,0> { tangent() : Object("tangent") {}
+
+ };
+
+ // C++ wrapper for text_literal_with_associated_curves
+ struct text_literal_with_associated_curves : text_literal, ObjectHelper<text_literal_with_associated_curves,1> { text_literal_with_associated_curves() : Object("text_literal_with_associated_curves") {}
+ ListOf< Lazy< curve >, 1, 0 > associated_curves;
+ };
+
+ // C++ wrapper for text_literal_with_blanking_box
+ struct text_literal_with_blanking_box : text_literal, ObjectHelper<text_literal_with_blanking_box,1> { text_literal_with_blanking_box() : Object("text_literal_with_blanking_box") {}
+ Lazy< planar_box > blanking;
+ };
+
+ // C++ wrapper for text_literal_with_extent
+ struct text_literal_with_extent : text_literal, ObjectHelper<text_literal_with_extent,1> { text_literal_with_extent() : Object("text_literal_with_extent") {}
+ Lazy< planar_extent > extent;
+ };
+
+ // C++ wrapper for text_string_representation
+ struct text_string_representation : representation, ObjectHelper<text_string_representation,0> { text_string_representation() : Object("text_string_representation") {}
+
+ };
+
+ // C++ wrapper for text_style
+ struct text_style : founded_item, ObjectHelper<text_style,2> { text_style() : Object("text_style") {}
+ label::Out name;
+ character_style_select::Out character_appearance;
+ };
+
+ // C++ wrapper for text_style_with_box_characteristics
+ struct text_style_with_box_characteristics : text_style, ObjectHelper<text_style_with_box_characteristics,1> { text_style_with_box_characteristics() : Object("text_style_with_box_characteristics") {}
+ ListOf< box_characteristic_select, 1, 4 >::Out characteristics;
+ };
+
+ // C++ wrapper for text_style_with_mirror
+ struct text_style_with_mirror : text_style, ObjectHelper<text_style_with_mirror,1> { text_style_with_mirror() : Object("text_style_with_mirror") {}
+ axis2_placement::Out mirror_placement;
+ };
+
+ // C++ wrapper for text_style_with_spacing
+ struct text_style_with_spacing : text_style, ObjectHelper<text_style_with_spacing,1> { text_style_with_spacing() : Object("text_style_with_spacing") {}
+ character_spacing_select::Out character_spacing;
+ };
+
+ // C++ wrapper for thermal_resistance_measure_with_unit
+ struct thermal_resistance_measure_with_unit : measure_with_unit, ObjectHelper<thermal_resistance_measure_with_unit,0> { thermal_resistance_measure_with_unit() : Object("thermal_resistance_measure_with_unit") {}
+
+ };
+
+ // C++ wrapper for thermal_resistance_unit
+ struct thermal_resistance_unit : derived_unit, ObjectHelper<thermal_resistance_unit,0> { thermal_resistance_unit() : Object("thermal_resistance_unit") {}
+
+ };
+
+ // C++ wrapper for thermodynamic_temperature_measure_with_unit
+ struct thermodynamic_temperature_measure_with_unit : measure_with_unit, ObjectHelper<thermodynamic_temperature_measure_with_unit,0> { thermodynamic_temperature_measure_with_unit() : Object("thermodynamic_temperature_measure_with_unit") {}
+
+ };
+
+ // C++ wrapper for thermodynamic_temperature_unit
+ struct thermodynamic_temperature_unit : named_unit, ObjectHelper<thermodynamic_temperature_unit,0> { thermodynamic_temperature_unit() : Object("thermodynamic_temperature_unit") {}
+
+ };
+
+ // C++ wrapper for thickened_face_solid
+ struct thickened_face_solid : solid_model, ObjectHelper<thickened_face_solid,3> { thickened_face_solid() : Object("thickened_face_solid") {}
+ generalized_surface_select::Out base_element;
+ length_measure::Out offset1;
+ length_measure::Out offset2;
+ };
+
+ // C++ wrapper for thickness_laminate_definition
+ struct thickness_laminate_definition : product_definition, ObjectHelper<thickness_laminate_definition,0> { thickness_laminate_definition() : Object("thickness_laminate_definition") {}
+
+ };
+
+ // C++ wrapper for thickness_laminate_table
+ struct thickness_laminate_table : zone_structural_makeup, ObjectHelper<thickness_laminate_table,0> { thickness_laminate_table() : Object("thickness_laminate_table") {}
+
+ };
+
+ // C++ wrapper for time_interval
+ struct time_interval : ObjectHelper<time_interval,3> { time_interval() : Object("time_interval") {}
+ identifier::Out id;
+ label::Out name;
+ Maybe< text::Out > description;
+ };
+
+ // C++ wrapper for time_interval_based_effectivity
+ struct time_interval_based_effectivity : effectivity, ObjectHelper<time_interval_based_effectivity,1> { time_interval_based_effectivity() : Object("time_interval_based_effectivity") {}
+ Lazy< time_interval > effectivity_period;
+ };
+
+ // C++ wrapper for time_interval_with_bounds
+ struct time_interval_with_bounds : time_interval, ObjectHelper<time_interval_with_bounds,3> { time_interval_with_bounds() : Object("time_interval_with_bounds") {}
+ Maybe< date_time_or_event_occurrence::Out > primary_bound;
+ Maybe< date_time_or_event_occurrence::Out > secondary_bound;
+ Maybe< Lazy< time_measure_with_unit > > duration;
+ };
+
+ // C++ wrapper for time_measure_with_unit
+ struct time_measure_with_unit : measure_with_unit, ObjectHelper<time_measure_with_unit,0> { time_measure_with_unit() : Object("time_measure_with_unit") {}
+
+ };
+
+ // C++ wrapper for time_unit
+ struct time_unit : named_unit, ObjectHelper<time_unit,0> { time_unit() : Object("time_unit") {}
+
+ };
+
+ // C++ wrapper for tolerance_zone
+ struct tolerance_zone : shape_aspect, ObjectHelper<tolerance_zone,2> { tolerance_zone() : Object("tolerance_zone") {}
+ ListOf< Lazy< geometric_tolerance >, 1, 0 > defining_tolerance;
+ Lazy< NotImplemented > form;
+ };
+
+ // C++ wrapper for torus
+ struct torus : geometric_representation_item, ObjectHelper<torus,3> { torus() : Object("torus") {}
+ Lazy< axis1_placement > position;
+ positive_length_measure::Out major_radius;
+ positive_length_measure::Out minor_radius;
+ };
+
+ // C++ wrapper for total_runout_tolerance
+ struct total_runout_tolerance : geometric_tolerance_with_datum_reference, ObjectHelper<total_runout_tolerance,0> { total_runout_tolerance() : Object("total_runout_tolerance") {}
+
+ };
+
+ // C++ wrapper for track_blended_solid
+ struct track_blended_solid : edge_blended_solid, ObjectHelper<track_blended_solid,0> { track_blended_solid() : Object("track_blended_solid") {}
+
+ };
+
+ // C++ wrapper for track_blended_solid_with_end_conditions
+ struct track_blended_solid_with_end_conditions : track_blended_solid, ObjectHelper<track_blended_solid_with_end_conditions,1> { track_blended_solid_with_end_conditions() : Object("track_blended_solid_with_end_conditions") {}
+ ListOf< blend_end_condition_select, 2, 2 >::Out end_conditions;
+ };
+
+ // C++ wrapper for trimmed_curve
+ struct trimmed_curve : bounded_curve, ObjectHelper<trimmed_curve,5> { trimmed_curve() : Object("trimmed_curve") {}
+ Lazy< curve > basis_curve;
+ ListOf< trimming_select, 1, 2 >::Out trim_1;
+ ListOf< trimming_select, 1, 2 >::Out trim_2;
+ BOOLEAN::Out sense_agreement;
+ trimming_preference::Out master_representation;
+ };
+
+ // C++ wrapper for two_direction_repeat_factor
+ struct two_direction_repeat_factor : one_direction_repeat_factor, ObjectHelper<two_direction_repeat_factor,1> { two_direction_repeat_factor() : Object("two_direction_repeat_factor") {}
+ Lazy< vector > second_repeat_factor;
+ };
+
+ // C++ wrapper for unary_generic_expression
+ struct unary_generic_expression : generic_expression, ObjectHelper<unary_generic_expression,1> { unary_generic_expression() : Object("unary_generic_expression") {}
+ Lazy< generic_expression > operand;
+ };
+
+ // C++ wrapper for unary_numeric_expression
+ struct unary_numeric_expression : ObjectHelper<unary_numeric_expression,0> { unary_numeric_expression() : Object("unary_numeric_expression") {}
+
+ };
+
+ // C++ wrapper for uncertainty_assigned_representation
+ struct uncertainty_assigned_representation : representation, ObjectHelper<uncertainty_assigned_representation,1> { uncertainty_assigned_representation() : Object("uncertainty_assigned_representation") {}
+ ListOf< Lazy< uncertainty_measure_with_unit >, 1, 0 > uncertainty;
+ };
+
+ // C++ wrapper for uncertainty_measure_with_unit
+ struct uncertainty_measure_with_unit : measure_with_unit, ObjectHelper<uncertainty_measure_with_unit,2> { uncertainty_measure_with_unit() : Object("uncertainty_measure_with_unit") {}
+ label::Out name;
+ Maybe< text::Out > description;
+ };
+
+ // C++ wrapper for uniform_curve
+ struct uniform_curve : b_spline_curve, ObjectHelper<uniform_curve,0> { uniform_curve() : Object("uniform_curve") {}
+
+ };
+
+ // C++ wrapper for uniform_resource_identifier
+ struct uniform_resource_identifier : descriptive_representation_item, ObjectHelper<uniform_resource_identifier,0> { uniform_resource_identifier() : Object("uniform_resource_identifier") {}
+
+ };
+
+ // C++ wrapper for uniform_surface
+ struct uniform_surface : b_spline_surface, ObjectHelper<uniform_surface,0> { uniform_surface() : Object("uniform_surface") {}
+
+ };
+
+ // C++ wrapper for usage_association
+ struct usage_association : action_method_relationship, ObjectHelper<usage_association,0> { usage_association() : Object("usage_association") {}
+
+ };
+
+ // C++ wrapper for user_defined_curve_font
+ struct user_defined_curve_font : ObjectHelper<user_defined_curve_font,0> { user_defined_curve_font() : Object("user_defined_curve_font") {}
+
+ };
+
+ // C++ wrapper for user_defined_marker
+ struct user_defined_marker : ObjectHelper<user_defined_marker,0> { user_defined_marker() : Object("user_defined_marker") {}
+
+ };
+
+ // C++ wrapper for user_defined_terminator_symbol
+ struct user_defined_terminator_symbol : ObjectHelper<user_defined_terminator_symbol,0> { user_defined_terminator_symbol() : Object("user_defined_terminator_symbol") {}
+
+ };
+
+ // C++ wrapper for user_selected_shape_elements
+ struct user_selected_shape_elements : user_selected_elements, ObjectHelper<user_selected_shape_elements,0> { user_selected_shape_elements() : Object("user_selected_shape_elements") {}
+
+ };
+
+ // C++ wrapper for value_range
+ struct value_range : compound_representation_item, ObjectHelper<value_range,0> { value_range() : Object("value_range") {}
+
+ };
+
+ // C++ wrapper for value_representation_item
+ struct value_representation_item : representation_item, ObjectHelper<value_representation_item,1> { value_representation_item() : Object("value_representation_item") {}
+ measure_value::Out value_component;
+ };
+
+ // C++ wrapper for variable_semantics
+ struct variable_semantics : ObjectHelper<variable_semantics,0> { variable_semantics() : Object("variable_semantics") {}
+
+ };
+
+ // C++ wrapper for variational_representation_item
+ struct variational_representation_item : representation_item, ObjectHelper<variational_representation_item,0> { variational_representation_item() : Object("variational_representation_item") {}
+
+ };
+
+ // C++ wrapper for vector
+ struct vector : geometric_representation_item, ObjectHelper<vector,2> { vector() : Object("vector") {}
+ Lazy< direction > orientation;
+ length_measure::Out magnitude;
+ };
+
+ // C++ wrapper for vector_style
+ struct vector_style : ObjectHelper<vector_style,0> { vector_style() : Object("vector_style") {}
+
+ };
+
+ // C++ wrapper for velocity_measure_with_unit
+ struct velocity_measure_with_unit : measure_with_unit, ObjectHelper<velocity_measure_with_unit,0> { velocity_measure_with_unit() : Object("velocity_measure_with_unit") {}
+
+ };
+
+ // C++ wrapper for velocity_unit
+ struct velocity_unit : derived_unit, ObjectHelper<velocity_unit,0> { velocity_unit() : Object("velocity_unit") {}
+
+ };
+
+ // C++ wrapper for vertex
+ struct vertex : topological_representation_item, ObjectHelper<vertex,0> { vertex() : Object("vertex") {}
+
+ };
+
+ // C++ wrapper for vertex_loop
+ struct vertex_loop : loop, ObjectHelper<vertex_loop,1> { vertex_loop() : Object("vertex_loop") {}
+ Lazy< vertex > loop_vertex;
+ };
+
+ // C++ wrapper for vertex_point
+ struct vertex_point : ObjectHelper<vertex_point,1> { vertex_point() : Object("vertex_point") {}
+ Lazy< point > vertex_geometry;
+ };
+
+ // C++ wrapper for vertex_shell
+ struct vertex_shell : topological_representation_item, ObjectHelper<vertex_shell,1> { vertex_shell() : Object("vertex_shell") {}
+ Lazy< vertex_loop > vertex_shell_extent;
+ };
+
+ // C++ wrapper for view_volume
+ struct view_volume : founded_item, ObjectHelper<view_volume,9> { view_volume() : Object("view_volume") {}
+ central_or_parallel::Out projection_type;
+ Lazy< cartesian_point > projection_point;
+ length_measure::Out view_plane_distance;
+ length_measure::Out front_plane_distance;
+ BOOLEAN::Out front_plane_clipping;
+ length_measure::Out back_plane_distance;
+ BOOLEAN::Out back_plane_clipping;
+ BOOLEAN::Out view_volume_sides_clipping;
+ Lazy< planar_box > view_window;
+ };
+
+ // C++ wrapper for visual_appearance_representation
+ struct visual_appearance_representation : representation, ObjectHelper<visual_appearance_representation,0> { visual_appearance_representation() : Object("visual_appearance_representation") {}
+
+ };
+
+ // C++ wrapper for volume_measure_with_unit
+ struct volume_measure_with_unit : measure_with_unit, ObjectHelper<volume_measure_with_unit,0> { volume_measure_with_unit() : Object("volume_measure_with_unit") {}
+
+ };
+
+ // C++ wrapper for volume_unit
+ struct volume_unit : derived_unit, ObjectHelper<volume_unit,0> { volume_unit() : Object("volume_unit") {}
+
+ };
+
+ // C++ wrapper for week_of_year_and_day_date
+ struct week_of_year_and_day_date : date, ObjectHelper<week_of_year_and_day_date,2> { week_of_year_and_day_date() : Object("week_of_year_and_day_date") {}
+ week_in_year_number::Out week_component;
+ Maybe< day_in_week_number::Out > day_component;
+ };
+
+ // C++ wrapper for wire_shell
+ struct wire_shell : topological_representation_item, ObjectHelper<wire_shell,1> { wire_shell() : Object("wire_shell") {}
+ ListOf< Lazy< loop >, 1, 0 > wire_shell_extent;
+ };
+
+ // C++ wrapper for year_month
+ struct year_month : date, ObjectHelper<year_month,1> { year_month() : Object("year_month") {}
+ month_in_year_number::Out month_component;
+ };
+
+ void GetSchema(EXPRESS::ConversionSchema& out);
+
+} //! StepFile
+namespace STEP {
+
+ // ******************************************************************************
+ // Converter stubs
+ // ******************************************************************************
+
+#define DECL_CONV_STUB(type) template <> size_t GenericFill<StepFile::type>(const STEP::DB& db, const EXPRESS::LIST& params, StepFile::type* in)
+
+ DECL_CONV_STUB(measure_with_unit);
+ DECL_CONV_STUB(absorbed_dose_measure_with_unit);
+ DECL_CONV_STUB(derived_unit);
+ DECL_CONV_STUB(absorbed_dose_unit);
+ DECL_CONV_STUB(abstract_variable);
+ DECL_CONV_STUB(acceleration_measure_with_unit);
+ DECL_CONV_STUB(acceleration_unit);
+ DECL_CONV_STUB(action);
+ DECL_CONV_STUB(action_assignment);
+ DECL_CONV_STUB(action_method);
+ DECL_CONV_STUB(action_method_assignment);
+ DECL_CONV_STUB(action_method_relationship);
+ DECL_CONV_STUB(action_request_assignment);
+ DECL_CONV_STUB(address);
+ DECL_CONV_STUB(representation);
+ DECL_CONV_STUB(shape_representation);
+ DECL_CONV_STUB(advanced_brep_shape_representation);
+ DECL_CONV_STUB(face_surface);
+ DECL_CONV_STUB(advanced_face);
+ DECL_CONV_STUB(amount_of_substance_measure_with_unit);
+ DECL_CONV_STUB(named_unit);
+ DECL_CONV_STUB(amount_of_substance_unit);
+ DECL_CONV_STUB(angle_direction_reference);
+ DECL_CONV_STUB(representation_item);
+ DECL_CONV_STUB(geometric_representation_item);
+ DECL_CONV_STUB(draughting_callout);
+ DECL_CONV_STUB(dimension_curve_directed_callout);
+ DECL_CONV_STUB(angular_dimension);
+ DECL_CONV_STUB(shape_aspect_relationship);
+ DECL_CONV_STUB(dimensional_location);
+ DECL_CONV_STUB(angular_location);
+ DECL_CONV_STUB(dimensional_size);
+ DECL_CONV_STUB(angular_size);
+ DECL_CONV_STUB(geometric_tolerance);
+ DECL_CONV_STUB(geometric_tolerance_with_datum_reference);
+ DECL_CONV_STUB(angularity_tolerance);
+ DECL_CONV_STUB(styled_item);
+ DECL_CONV_STUB(annotation_occurrence);
+ DECL_CONV_STUB(annotation_curve_occurrence);
+ DECL_CONV_STUB(annotation_fill_area);
+ DECL_CONV_STUB(annotation_fill_area_occurrence);
+ DECL_CONV_STUB(annotation_occurrence_relationship);
+ DECL_CONV_STUB(annotation_occurrence_associativity);
+ DECL_CONV_STUB(annotation_plane);
+ DECL_CONV_STUB(annotation_symbol_occurrence);
+ DECL_CONV_STUB(annotation_subfigure_occurrence);
+ DECL_CONV_STUB(mapped_item);
+ DECL_CONV_STUB(annotation_symbol);
+ DECL_CONV_STUB(annotation_text);
+ DECL_CONV_STUB(annotation_text_character);
+ DECL_CONV_STUB(annotation_text_occurrence);
+ DECL_CONV_STUB(shape_aspect);
+ DECL_CONV_STUB(derived_shape_aspect);
+ DECL_CONV_STUB(apex);
+ DECL_CONV_STUB(application_context_element);
+ DECL_CONV_STUB(applied_action_assignment);
+ DECL_CONV_STUB(applied_action_method_assignment);
+ DECL_CONV_STUB(applied_action_request_assignment);
+ DECL_CONV_STUB(approval_assignment);
+ DECL_CONV_STUB(applied_approval_assignment);
+ DECL_CONV_STUB(attribute_classification_assignment);
+ DECL_CONV_STUB(applied_attribute_classification_assignment);
+ DECL_CONV_STUB(certification_assignment);
+ DECL_CONV_STUB(applied_certification_assignment);
+ DECL_CONV_STUB(classification_assignment);
+ DECL_CONV_STUB(applied_classification_assignment);
+ DECL_CONV_STUB(contract_assignment);
+ DECL_CONV_STUB(applied_contract_assignment);
+ DECL_CONV_STUB(date_and_time_assignment);
+ DECL_CONV_STUB(applied_date_and_time_assignment);
+ DECL_CONV_STUB(date_assignment);
+ DECL_CONV_STUB(applied_date_assignment);
+ DECL_CONV_STUB(document_reference);
+ DECL_CONV_STUB(applied_document_reference);
+ DECL_CONV_STUB(document_usage_constraint_assignment);
+ DECL_CONV_STUB(applied_document_usage_constraint_assignment);
+ DECL_CONV_STUB(effectivity_assignment);
+ DECL_CONV_STUB(applied_effectivity_assignment);
+ DECL_CONV_STUB(event_occurrence_assignment);
+ DECL_CONV_STUB(applied_event_occurrence_assignment);
+ DECL_CONV_STUB(identification_assignment);
+ DECL_CONV_STUB(external_identification_assignment);
+ DECL_CONV_STUB(applied_external_identification_assignment);
+ DECL_CONV_STUB(group_assignment);
+ DECL_CONV_STUB(applied_group_assignment);
+ DECL_CONV_STUB(applied_identification_assignment);
+ DECL_CONV_STUB(name_assignment);
+ DECL_CONV_STUB(applied_name_assignment);
+ DECL_CONV_STUB(organization_assignment);
+ DECL_CONV_STUB(applied_organization_assignment);
+ DECL_CONV_STUB(organizational_project_assignment);
+ DECL_CONV_STUB(applied_organizational_project_assignment);
+ DECL_CONV_STUB(person_and_organization_assignment);
+ DECL_CONV_STUB(applied_person_and_organization_assignment);
+ DECL_CONV_STUB(presented_item);
+ DECL_CONV_STUB(applied_presented_item);
+ DECL_CONV_STUB(security_classification_assignment);
+ DECL_CONV_STUB(applied_security_classification_assignment);
+ DECL_CONV_STUB(time_interval_assignment);
+ DECL_CONV_STUB(applied_time_interval_assignment);
+ DECL_CONV_STUB(applied_usage_right);
+ DECL_CONV_STUB(area_in_set);
+ DECL_CONV_STUB(area_measure_with_unit);
+ DECL_CONV_STUB(area_unit);
+ DECL_CONV_STUB(product_definition_relationship);
+ DECL_CONV_STUB(product_definition_usage);
+ DECL_CONV_STUB(assembly_component_usage);
+ DECL_CONV_STUB(assigned_requirement);
+ DECL_CONV_STUB(compound_representation_item);
+ DECL_CONV_STUB(atomic_formula);
+ DECL_CONV_STUB(attribute_assertion);
+ DECL_CONV_STUB(attribute_language_assignment);
+ DECL_CONV_STUB(attribute_value_assignment);
+ DECL_CONV_STUB(auxiliary_geometric_representation_item);
+ DECL_CONV_STUB(placement);
+ DECL_CONV_STUB(axis1_placement);
+ DECL_CONV_STUB(axis2_placement_2d);
+ DECL_CONV_STUB(axis2_placement_3d);
+ DECL_CONV_STUB(curve);
+ DECL_CONV_STUB(bounded_curve);
+ DECL_CONV_STUB(b_spline_curve);
+ DECL_CONV_STUB(b_spline_curve_with_knots);
+ DECL_CONV_STUB(surface);
+ DECL_CONV_STUB(bounded_surface);
+ DECL_CONV_STUB(b_spline_surface);
+ DECL_CONV_STUB(b_spline_surface_with_knots);
+ DECL_CONV_STUB(product_definition);
+ DECL_CONV_STUB(rule_software_definition);
+ DECL_CONV_STUB(rule_definition);
+ DECL_CONV_STUB(back_chaining_rule);
+ DECL_CONV_STUB(back_chaining_rule_body);
+ DECL_CONV_STUB(colour);
+ DECL_CONV_STUB(background_colour);
+ DECL_CONV_STUB(beveled_sheet_representation);
+ DECL_CONV_STUB(bezier_curve);
+ DECL_CONV_STUB(bezier_surface);
+ DECL_CONV_STUB(generic_expression);
+ DECL_CONV_STUB(binary_generic_expression);
+ DECL_CONV_STUB(binary_numeric_expression);
+ DECL_CONV_STUB(binary_representation_item);
+ DECL_CONV_STUB(block);
+ DECL_CONV_STUB(expression);
+ DECL_CONV_STUB(boolean_expression);
+ DECL_CONV_STUB(boolean_literal);
+ DECL_CONV_STUB(boolean_representation_item);
+ DECL_CONV_STUB(boolean_result);
+ DECL_CONV_STUB(composite_curve);
+ DECL_CONV_STUB(composite_curve_on_surface);
+ DECL_CONV_STUB(boundary_curve);
+ DECL_CONV_STUB(bounded_pcurve);
+ DECL_CONV_STUB(bounded_surface_curve);
+ DECL_CONV_STUB(founded_item);
+ DECL_CONV_STUB(box_domain);
+ DECL_CONV_STUB(half_space_solid);
+ DECL_CONV_STUB(boxed_half_space);
+ DECL_CONV_STUB(breakdown_context);
+ DECL_CONV_STUB(breakdown_element_group_assignment);
+ DECL_CONV_STUB(breakdown_element_realization);
+ DECL_CONV_STUB(breakdown_element_usage);
+ DECL_CONV_STUB(breakdown_of);
+ DECL_CONV_STUB(solid_model);
+ DECL_CONV_STUB(manifold_solid_brep);
+ DECL_CONV_STUB(brep_with_voids);
+ DECL_CONV_STUB(bytes_representation_item);
+ DECL_CONV_STUB(date);
+ DECL_CONV_STUB(calendar_date);
+ DECL_CONV_STUB(camera_image);
+ DECL_CONV_STUB(camera_image_3d_with_scale);
+ DECL_CONV_STUB(camera_model);
+ DECL_CONV_STUB(camera_model_d3);
+ DECL_CONV_STUB(camera_model_d3_multi_clipping);
+ DECL_CONV_STUB(camera_model_d3_multi_clipping_intersection);
+ DECL_CONV_STUB(camera_model_d3_multi_clipping_union);
+ DECL_CONV_STUB(camera_model_d3_with_hlhsr);
+ DECL_CONV_STUB(camera_model_with_light_sources);
+ DECL_CONV_STUB(representation_map);
+ DECL_CONV_STUB(camera_usage);
+ DECL_CONV_STUB(capacitance_measure_with_unit);
+ DECL_CONV_STUB(capacitance_unit);
+ DECL_CONV_STUB(point);
+ DECL_CONV_STUB(cartesian_point);
+ DECL_CONV_STUB(cartesian_transformation_operator);
+ DECL_CONV_STUB(cartesian_transformation_operator_2d);
+ DECL_CONV_STUB(cartesian_transformation_operator_3d);
+ DECL_CONV_STUB(cc_design_approval);
+ DECL_CONV_STUB(cc_design_certification);
+ DECL_CONV_STUB(cc_design_contract);
+ DECL_CONV_STUB(cc_design_date_and_time_assignment);
+ DECL_CONV_STUB(cc_design_person_and_organization_assignment);
+ DECL_CONV_STUB(cc_design_security_classification);
+ DECL_CONV_STUB(cc_design_specification_reference);
+ DECL_CONV_STUB(celsius_temperature_measure_with_unit);
+ DECL_CONV_STUB(centre_of_symmetry);
+ DECL_CONV_STUB(change);
+ DECL_CONV_STUB(change_request);
+ DECL_CONV_STUB(character_glyph_style_outline);
+ DECL_CONV_STUB(character_glyph_style_stroke);
+ DECL_CONV_STUB(symbol_representation);
+ DECL_CONV_STUB(generic_character_glyph_symbol);
+ DECL_CONV_STUB(character_glyph_symbol);
+ DECL_CONV_STUB(character_glyph_symbol_outline);
+ DECL_CONV_STUB(character_glyph_symbol_stroke);
+ DECL_CONV_STUB(general_property);
+ DECL_CONV_STUB(characteristic_data_column_header);
+ DECL_CONV_STUB(general_property_relationship);
+ DECL_CONV_STUB(characteristic_data_column_header_link);
+ DECL_CONV_STUB(characteristic_data_table_header);
+ DECL_CONV_STUB(characteristic_data_table_header_decomposition);
+ DECL_CONV_STUB(group);
+ DECL_CONV_STUB(characteristic_type);
+ DECL_CONV_STUB(characterized_class);
+ DECL_CONV_STUB(characterized_object);
+ DECL_CONV_STUB(conic);
+ DECL_CONV_STUB(circle);
+ DECL_CONV_STUB(circular_runout_tolerance);
+ DECL_CONV_STUB(class_by_extension);
+ DECL_CONV_STUB(class_by_intension);
+ DECL_CONV_STUB(class_system);
+ DECL_CONV_STUB(effectivity_context_assignment);
+ DECL_CONV_STUB(class_usage_effectivity_context_assignment);
+ DECL_CONV_STUB(topological_representation_item);
+ DECL_CONV_STUB(connected_face_set);
+ DECL_CONV_STUB(closed_shell);
+ DECL_CONV_STUB(coaxiality_tolerance);
+ DECL_CONV_STUB(colour_specification);
+ DECL_CONV_STUB(colour_rgb);
+ DECL_CONV_STUB(common_datum);
+ DECL_CONV_STUB(comparison_expression);
+ DECL_CONV_STUB(complex_clause);
+ DECL_CONV_STUB(complex_conjunctive_clause);
+ DECL_CONV_STUB(complex_disjunctive_clause);
+ DECL_CONV_STUB(modified_solid);
+ DECL_CONV_STUB(shelled_solid);
+ DECL_CONV_STUB(complex_shelled_solid);
+ DECL_CONV_STUB(composite_assembly_definition);
+ DECL_CONV_STUB(composite_assembly_sequence_definition);
+ DECL_CONV_STUB(laminate_table);
+ DECL_CONV_STUB(part_laminate_table);
+ DECL_CONV_STUB(composite_assembly_table);
+ DECL_CONV_STUB(composite_curve_segment);
+ DECL_CONV_STUB(material_designation);
+ DECL_CONV_STUB(composite_material_designation);
+ DECL_CONV_STUB(composite_shape_aspect);
+ DECL_CONV_STUB(composite_sheet_representation);
+ DECL_CONV_STUB(composite_text);
+ DECL_CONV_STUB(composite_text_with_associated_curves);
+ DECL_CONV_STUB(composite_text_with_blanking_box);
+ DECL_CONV_STUB(composite_text_with_delineation);
+ DECL_CONV_STUB(composite_text_with_extent);
+ DECL_CONV_STUB(compound_shape_representation);
+ DECL_CONV_STUB(concentricity_tolerance);
+ DECL_CONV_STUB(concept_feature_relationship);
+ DECL_CONV_STUB(concept_feature_relationship_with_condition);
+ DECL_CONV_STUB(product_concept_feature);
+ DECL_CONV_STUB(conditional_concept_feature);
+ DECL_CONV_STUB(conductance_measure_with_unit);
+ DECL_CONV_STUB(conductance_unit);
+ DECL_CONV_STUB(configuration_item);
+ DECL_CONV_STUB(configurable_item);
+ DECL_CONV_STUB(effectivity);
+ DECL_CONV_STUB(product_definition_effectivity);
+ DECL_CONV_STUB(configuration_effectivity);
+ DECL_CONV_STUB(configuration_item_relationship);
+ DECL_CONV_STUB(configuration_item_hierarchical_relationship);
+ DECL_CONV_STUB(configuration_item_revision_sequence);
+ DECL_CONV_STUB(configured_effectivity_assignment);
+ DECL_CONV_STUB(configured_effectivity_context_assignment);
+ DECL_CONV_STUB(conical_stepped_hole_transition);
+ DECL_CONV_STUB(elementary_surface);
+ DECL_CONV_STUB(conical_surface);
+ DECL_CONV_STUB(connected_edge_set);
+ DECL_CONV_STUB(connected_face_sub_set);
+ DECL_CONV_STUB(constructive_geometry_representation);
+ DECL_CONV_STUB(representation_relationship);
+ DECL_CONV_STUB(constructive_geometry_representation_relationship);
+ DECL_CONV_STUB(contact_ratio_representation);
+ DECL_CONV_STUB(invisibility);
+ DECL_CONV_STUB(context_dependent_invisibility);
+ DECL_CONV_STUB(over_riding_styled_item);
+ DECL_CONV_STUB(context_dependent_over_riding_styled_item);
+ DECL_CONV_STUB(context_dependent_unit);
+ DECL_CONV_STUB(conversion_based_unit);
+ DECL_CONV_STUB(csg_shape_representation);
+ DECL_CONV_STUB(csg_solid);
+ DECL_CONV_STUB(currency);
+ DECL_CONV_STUB(currency_measure_with_unit);
+ DECL_CONV_STUB(curve_bounded_surface);
+ DECL_CONV_STUB(curve_dimension);
+ DECL_CONV_STUB(curve_replica);
+ DECL_CONV_STUB(curve_style);
+ DECL_CONV_STUB(curve_style_font);
+ DECL_CONV_STUB(curve_style_font_and_scaling);
+ DECL_CONV_STUB(curve_style_font_pattern);
+ DECL_CONV_STUB(curve_swept_solid_shape_representation);
+ DECL_CONV_STUB(cylindrical_surface);
+ DECL_CONV_STUB(cylindricity_tolerance);
+ DECL_CONV_STUB(date_representation_item);
+ DECL_CONV_STUB(date_time_representation_item);
+ DECL_CONV_STUB(dated_effectivity);
+ DECL_CONV_STUB(datum);
+ DECL_CONV_STUB(datum_feature);
+ DECL_CONV_STUB(datum_feature_callout);
+ DECL_CONV_STUB(datum_reference);
+ DECL_CONV_STUB(datum_target);
+ DECL_CONV_STUB(datum_target_callout);
+ DECL_CONV_STUB(default_tolerance_table);
+ DECL_CONV_STUB(default_tolerance_table_cell);
+ DECL_CONV_STUB(defined_symbol);
+ DECL_CONV_STUB(definitional_representation);
+ DECL_CONV_STUB(definitional_representation_relationship);
+ DECL_CONV_STUB(definitional_representation_relationship_with_same_context);
+ DECL_CONV_STUB(degenerate_pcurve);
+ DECL_CONV_STUB(toroidal_surface);
+ DECL_CONV_STUB(degenerate_toroidal_surface);
+ DECL_CONV_STUB(descriptive_representation_item);
+ DECL_CONV_STUB(product_definition_context);
+ DECL_CONV_STUB(design_context);
+ DECL_CONV_STUB(design_make_from_relationship);
+ DECL_CONV_STUB(diameter_dimension);
+ DECL_CONV_STUB(ratio_measure_with_unit);
+ DECL_CONV_STUB(dielectric_constant_measure_with_unit);
+ DECL_CONV_STUB(dimension_callout);
+ DECL_CONV_STUB(draughting_callout_relationship);
+ DECL_CONV_STUB(dimension_callout_component_relationship);
+ DECL_CONV_STUB(dimension_callout_relationship);
+ DECL_CONV_STUB(dimension_curve);
+ DECL_CONV_STUB(terminator_symbol);
+ DECL_CONV_STUB(dimension_curve_terminator);
+ DECL_CONV_STUB(dimension_curve_terminator_to_projection_curve_associativity);
+ DECL_CONV_STUB(dimension_pair);
+ DECL_CONV_STUB(dimension_text_associativity);
+ DECL_CONV_STUB(dimensional_location_with_path);
+ DECL_CONV_STUB(dimensional_size_with_path);
+ DECL_CONV_STUB(executed_action);
+ DECL_CONV_STUB(directed_action);
+ DECL_CONV_STUB(directed_dimensional_location);
+ DECL_CONV_STUB(direction);
+ DECL_CONV_STUB(document_file);
+ DECL_CONV_STUB(document_identifier);
+ DECL_CONV_STUB(document_identifier_assignment);
+ DECL_CONV_STUB(document_product_association);
+ DECL_CONV_STUB(document_product_equivalence);
+ DECL_CONV_STUB(dose_equivalent_measure_with_unit);
+ DECL_CONV_STUB(dose_equivalent_unit);
+ DECL_CONV_STUB(double_offset_shelled_solid);
+ DECL_CONV_STUB(item_defined_transformation);
+ DECL_CONV_STUB(transformation_with_derived_angle);
+ DECL_CONV_STUB(draped_defined_transformation);
+ DECL_CONV_STUB(draughting_annotation_occurrence);
+ DECL_CONV_STUB(draughting_elements);
+ DECL_CONV_STUB(draughting_model);
+ DECL_CONV_STUB(item_identified_representation_usage);
+ DECL_CONV_STUB(draughting_model_item_association);
+ DECL_CONV_STUB(pre_defined_colour);
+ DECL_CONV_STUB(draughting_pre_defined_colour);
+ DECL_CONV_STUB(pre_defined_item);
+ DECL_CONV_STUB(pre_defined_curve_font);
+ DECL_CONV_STUB(draughting_pre_defined_curve_font);
+ DECL_CONV_STUB(pre_defined_text_font);
+ DECL_CONV_STUB(draughting_pre_defined_text_font);
+ DECL_CONV_STUB(draughting_subfigure_representation);
+ DECL_CONV_STUB(draughting_symbol_representation);
+ DECL_CONV_STUB(text_literal);
+ DECL_CONV_STUB(text_literal_with_delineation);
+ DECL_CONV_STUB(draughting_text_literal_with_delineation);
+ DECL_CONV_STUB(presentation_set);
+ DECL_CONV_STUB(drawing_revision);
+ DECL_CONV_STUB(presentation_representation);
+ DECL_CONV_STUB(presentation_area);
+ DECL_CONV_STUB(drawing_sheet_revision);
+ DECL_CONV_STUB(drawing_sheet_revision_sequence);
+ DECL_CONV_STUB(drawing_sheet_revision_usage);
+ DECL_CONV_STUB(edge);
+ DECL_CONV_STUB(edge_based_wireframe_model);
+ DECL_CONV_STUB(edge_based_wireframe_shape_representation);
+ DECL_CONV_STUB(edge_blended_solid);
+ DECL_CONV_STUB(edge_curve);
+ DECL_CONV_STUB(edge_loop);
+ DECL_CONV_STUB(electric_charge_measure_with_unit);
+ DECL_CONV_STUB(electric_charge_unit);
+ DECL_CONV_STUB(electric_current_measure_with_unit);
+ DECL_CONV_STUB(electric_current_unit);
+ DECL_CONV_STUB(electric_potential_measure_with_unit);
+ DECL_CONV_STUB(electric_potential_unit);
+ DECL_CONV_STUB(elementary_brep_shape_representation);
+ DECL_CONV_STUB(ellipse);
+ DECL_CONV_STUB(energy_measure_with_unit);
+ DECL_CONV_STUB(energy_unit);
+ DECL_CONV_STUB(property_definition);
+ DECL_CONV_STUB(fact_type);
+ DECL_CONV_STUB(entity_assertion);
+ DECL_CONV_STUB(enum_reference_prefix);
+ DECL_CONV_STUB(evaluated_characteristic);
+ DECL_CONV_STUB(evaluated_degenerate_pcurve);
+ DECL_CONV_STUB(evaluation_product_definition);
+ DECL_CONV_STUB(event_occurrence);
+ DECL_CONV_STUB(product_concept_feature_category);
+ DECL_CONV_STUB(exclusive_product_concept_feature_category);
+ DECL_CONV_STUB(uncertainty_qualifier);
+ DECL_CONV_STUB(standard_uncertainty);
+ DECL_CONV_STUB(expanded_uncertainty);
+ DECL_CONV_STUB(representation_item_relationship);
+ DECL_CONV_STUB(explicit_procedural_representation_item_relationship);
+ DECL_CONV_STUB(explicit_procedural_geometric_representation_item_relationship);
+ DECL_CONV_STUB(explicit_procedural_representation_relationship);
+ DECL_CONV_STUB(explicit_procedural_shape_representation_relationship);
+ DECL_CONV_STUB(expression_conversion_based_unit);
+ DECL_CONV_STUB(extension);
+ DECL_CONV_STUB(extent);
+ DECL_CONV_STUB(external_source);
+ DECL_CONV_STUB(external_class_library);
+ DECL_CONV_STUB(externally_defined_class);
+ DECL_CONV_STUB(externally_defined_colour);
+ DECL_CONV_STUB(externally_defined_context_dependent_unit);
+ DECL_CONV_STUB(externally_defined_conversion_based_unit);
+ DECL_CONV_STUB(externally_defined_currency);
+ DECL_CONV_STUB(externally_defined_item);
+ DECL_CONV_STUB(externally_defined_curve_font);
+ DECL_CONV_STUB(externally_defined_dimension_definition);
+ DECL_CONV_STUB(externally_defined_general_property);
+ DECL_CONV_STUB(externally_defined_hatch_style);
+ DECL_CONV_STUB(externally_defined_marker);
+ DECL_CONV_STUB(picture_representation_item);
+ DECL_CONV_STUB(externally_defined_picture_representation_item);
+ DECL_CONV_STUB(externally_defined_representation_item);
+ DECL_CONV_STUB(externally_defined_string);
+ DECL_CONV_STUB(externally_defined_symbol);
+ DECL_CONV_STUB(externally_defined_terminator_symbol);
+ DECL_CONV_STUB(externally_defined_text_font);
+ DECL_CONV_STUB(externally_defined_tile);
+ DECL_CONV_STUB(externally_defined_tile_style);
+ DECL_CONV_STUB(swept_area_solid);
+ DECL_CONV_STUB(extruded_area_solid);
+ DECL_CONV_STUB(swept_face_solid);
+ DECL_CONV_STUB(extruded_face_solid);
+ DECL_CONV_STUB(extruded_face_solid_with_trim_conditions);
+ DECL_CONV_STUB(extruded_face_solid_with_draft_angle);
+ DECL_CONV_STUB(extruded_face_solid_with_multiple_draft_angles);
+ DECL_CONV_STUB(face);
+ DECL_CONV_STUB(face_based_surface_model);
+ DECL_CONV_STUB(face_bound);
+ DECL_CONV_STUB(face_outer_bound);
+ DECL_CONV_STUB(faceted_brep);
+ DECL_CONV_STUB(faceted_brep_shape_representation);
+ DECL_CONV_STUB(fill_area_style);
+ DECL_CONV_STUB(fill_area_style_hatching);
+ DECL_CONV_STUB(fill_area_style_tile_coloured_region);
+ DECL_CONV_STUB(fill_area_style_tile_curve_with_style);
+ DECL_CONV_STUB(fill_area_style_tile_symbol_with_style);
+ DECL_CONV_STUB(fill_area_style_tiles);
+ DECL_CONV_STUB(shape_representation_relationship);
+ DECL_CONV_STUB(flat_pattern_ply_representation_relationship);
+ DECL_CONV_STUB(flatness_tolerance);
+ DECL_CONV_STUB(force_measure_with_unit);
+ DECL_CONV_STUB(force_unit);
+ DECL_CONV_STUB(forward_chaining_rule);
+ DECL_CONV_STUB(forward_chaining_rule_premise);
+ DECL_CONV_STUB(frequency_measure_with_unit);
+ DECL_CONV_STUB(frequency_unit);
+ DECL_CONV_STUB(func);
+ DECL_CONV_STUB(functional_breakdown_context);
+ DECL_CONV_STUB(functional_element_usage);
+ DECL_CONV_STUB(general_material_property);
+ DECL_CONV_STUB(simple_generic_expression);
+ DECL_CONV_STUB(generic_literal);
+ DECL_CONV_STUB(generic_variable);
+ DECL_CONV_STUB(geometric_alignment);
+ DECL_CONV_STUB(geometric_set);
+ DECL_CONV_STUB(geometric_curve_set);
+ DECL_CONV_STUB(geometric_intersection);
+ DECL_CONV_STUB(geometric_item_specific_usage);
+ DECL_CONV_STUB(geometric_model_element_relationship);
+ DECL_CONV_STUB(representation_context);
+ DECL_CONV_STUB(geometric_representation_context);
+ DECL_CONV_STUB(geometric_tolerance_with_defined_unit);
+ DECL_CONV_STUB(geometrical_tolerance_callout);
+ DECL_CONV_STUB(geometrically_bounded_2d_wireframe_representation);
+ DECL_CONV_STUB(geometrically_bounded_surface_shape_representation);
+ DECL_CONV_STUB(geometrically_bounded_wireframe_shape_representation);
+ DECL_CONV_STUB(global_assignment);
+ DECL_CONV_STUB(global_uncertainty_assigned_context);
+ DECL_CONV_STUB(global_unit_assigned_context);
+ DECL_CONV_STUB(ground_fact);
+ DECL_CONV_STUB(hardness_representation);
+ DECL_CONV_STUB(hidden_element_over_riding_styled_item);
+ DECL_CONV_STUB(hyperbola);
+ DECL_CONV_STUB(illuminance_measure_with_unit);
+ DECL_CONV_STUB(illuminance_unit);
+ DECL_CONV_STUB(included_text_block);
+ DECL_CONV_STUB(inclusion_product_concept_feature);
+ DECL_CONV_STUB(user_selected_elements);
+ DECL_CONV_STUB(indirectly_selected_elements);
+ DECL_CONV_STUB(indirectly_selected_shape_elements);
+ DECL_CONV_STUB(inductance_measure_with_unit);
+ DECL_CONV_STUB(inductance_unit);
+ DECL_CONV_STUB(information_right);
+ DECL_CONV_STUB(information_usage_right);
+ DECL_CONV_STUB(instance_usage_context_assignment);
+ DECL_CONV_STUB(instanced_feature);
+ DECL_CONV_STUB(literal_number);
+ DECL_CONV_STUB(int_literal);
+ DECL_CONV_STUB(integer_representation_item);
+ DECL_CONV_STUB(surface_curve);
+ DECL_CONV_STUB(intersection_curve);
+ DECL_CONV_STUB(interval_expression);
+ DECL_CONV_STUB(iso4217_currency);
+ DECL_CONV_STUB(known_source);
+ DECL_CONV_STUB(laid_defined_transformation);
+ DECL_CONV_STUB(language);
+ DECL_CONV_STUB(leader_curve);
+ DECL_CONV_STUB(leader_directed_callout);
+ DECL_CONV_STUB(leader_directed_dimension);
+ DECL_CONV_STUB(leader_terminator);
+ DECL_CONV_STUB(length_measure_with_unit);
+ DECL_CONV_STUB(length_unit);
+ DECL_CONV_STUB(light_source);
+ DECL_CONV_STUB(light_source_ambient);
+ DECL_CONV_STUB(light_source_directional);
+ DECL_CONV_STUB(light_source_positional);
+ DECL_CONV_STUB(light_source_spot);
+ DECL_CONV_STUB(line);
+ DECL_CONV_STUB(line_profile_tolerance);
+ DECL_CONV_STUB(linear_dimension);
+ DECL_CONV_STUB(simple_clause);
+ DECL_CONV_STUB(literal_conjunction);
+ DECL_CONV_STUB(literal_disjunction);
+ DECL_CONV_STUB(logical_literal);
+ DECL_CONV_STUB(logical_representation_item);
+ DECL_CONV_STUB(loop);
+ DECL_CONV_STUB(loss_tangent_measure_with_unit);
+ DECL_CONV_STUB(lot_effectivity);
+ DECL_CONV_STUB(luminous_flux_measure_with_unit);
+ DECL_CONV_STUB(luminous_flux_unit);
+ DECL_CONV_STUB(luminous_intensity_measure_with_unit);
+ DECL_CONV_STUB(luminous_intensity_unit);
+ DECL_CONV_STUB(magnetic_flux_density_measure_with_unit);
+ DECL_CONV_STUB(magnetic_flux_density_unit);
+ DECL_CONV_STUB(magnetic_flux_measure_with_unit);
+ DECL_CONV_STUB(magnetic_flux_unit);
+ DECL_CONV_STUB(make_from_usage_option);
+ DECL_CONV_STUB(manifold_subsurface_shape_representation);
+ DECL_CONV_STUB(manifold_surface_shape_representation);
+ DECL_CONV_STUB(mass_measure_with_unit);
+ DECL_CONV_STUB(mass_unit);
+ DECL_CONV_STUB(material_property);
+ DECL_CONV_STUB(property_definition_representation);
+ DECL_CONV_STUB(material_property_representation);
+ DECL_CONV_STUB(measure_representation_item);
+ DECL_CONV_STUB(product_context);
+ DECL_CONV_STUB(mechanical_context);
+ DECL_CONV_STUB(mechanical_design_and_draughting_relationship);
+ DECL_CONV_STUB(mechanical_design_geometric_presentation_area);
+ DECL_CONV_STUB(mechanical_design_geometric_presentation_representation);
+ DECL_CONV_STUB(mechanical_design_presentation_representation_with_draughting);
+ DECL_CONV_STUB(mechanical_design_shaded_presentation_area);
+ DECL_CONV_STUB(mechanical_design_shaded_presentation_representation);
+ DECL_CONV_STUB(min_and_major_ply_orientation_basis);
+ DECL_CONV_STUB(modified_geometric_tolerance);
+ DECL_CONV_STUB(modified_solid_with_placed_configuration);
+ DECL_CONV_STUB(moments_of_inertia_representation);
+ DECL_CONV_STUB(multi_language_attribute_assignment);
+ DECL_CONV_STUB(multiple_arity_boolean_expression);
+ DECL_CONV_STUB(multiple_arity_generic_expression);
+ DECL_CONV_STUB(multiple_arity_numeric_expression);
+ DECL_CONV_STUB(next_assembly_usage_occurrence);
+ DECL_CONV_STUB(non_manifold_surface_shape_representation);
+ DECL_CONV_STUB(null_representation_item);
+ DECL_CONV_STUB(numeric_expression);
+ DECL_CONV_STUB(offset_curve_2d);
+ DECL_CONV_STUB(offset_curve_3d);
+ DECL_CONV_STUB(offset_surface);
+ DECL_CONV_STUB(one_direction_repeat_factor);
+ DECL_CONV_STUB(open_shell);
+ DECL_CONV_STUB(ordinal_date);
+ DECL_CONV_STUB(projection_directed_callout);
+ DECL_CONV_STUB(ordinate_dimension);
+ DECL_CONV_STUB(organizational_address);
+ DECL_CONV_STUB(oriented_closed_shell);
+ DECL_CONV_STUB(oriented_edge);
+ DECL_CONV_STUB(oriented_face);
+ DECL_CONV_STUB(oriented_open_shell);
+ DECL_CONV_STUB(path);
+ DECL_CONV_STUB(oriented_path);
+ DECL_CONV_STUB(oriented_surface);
+ DECL_CONV_STUB(outer_boundary_curve);
+ DECL_CONV_STUB(package_product_concept_feature);
+ DECL_CONV_STUB(parabola);
+ DECL_CONV_STUB(parallel_offset);
+ DECL_CONV_STUB(parallelism_tolerance);
+ DECL_CONV_STUB(parametric_representation_context);
+ DECL_CONV_STUB(partial_document_with_structured_text_representation_assignment);
+ DECL_CONV_STUB(pcurve);
+ DECL_CONV_STUB(percentage_laminate_definition);
+ DECL_CONV_STUB(zone_structural_makeup);
+ DECL_CONV_STUB(percentage_laminate_table);
+ DECL_CONV_STUB(percentage_ply_definition);
+ DECL_CONV_STUB(perpendicular_to);
+ DECL_CONV_STUB(perpendicularity_tolerance);
+ DECL_CONV_STUB(person_and_organization_address);
+ DECL_CONV_STUB(personal_address);
+ DECL_CONV_STUB(physical_breakdown_context);
+ DECL_CONV_STUB(physical_element_usage);
+ DECL_CONV_STUB(presentation_view);
+ DECL_CONV_STUB(picture_representation);
+ DECL_CONV_STUB(placed_datum_target_feature);
+ DECL_CONV_STUB(placed_feature);
+ DECL_CONV_STUB(planar_extent);
+ DECL_CONV_STUB(planar_box);
+ DECL_CONV_STUB(plane);
+ DECL_CONV_STUB(plane_angle_measure_with_unit);
+ DECL_CONV_STUB(plane_angle_unit);
+ DECL_CONV_STUB(ply_laminate_definition);
+ DECL_CONV_STUB(ply_laminate_sequence_definition);
+ DECL_CONV_STUB(ply_laminate_table);
+ DECL_CONV_STUB(point_and_vector);
+ DECL_CONV_STUB(point_on_curve);
+ DECL_CONV_STUB(point_on_surface);
+ DECL_CONV_STUB(point_path);
+ DECL_CONV_STUB(point_replica);
+ DECL_CONV_STUB(point_style);
+ DECL_CONV_STUB(polar_complex_number_literal);
+ DECL_CONV_STUB(poly_loop);
+ DECL_CONV_STUB(polyline);
+ DECL_CONV_STUB(position_tolerance);
+ DECL_CONV_STUB(positioned_sketch);
+ DECL_CONV_STUB(power_measure_with_unit);
+ DECL_CONV_STUB(power_unit);
+ DECL_CONV_STUB(pre_defined_symbol);
+ DECL_CONV_STUB(pre_defined_dimension_symbol);
+ DECL_CONV_STUB(pre_defined_geometrical_tolerance_symbol);
+ DECL_CONV_STUB(pre_defined_marker);
+ DECL_CONV_STUB(pre_defined_point_marker_symbol);
+ DECL_CONV_STUB(pre_defined_surface_condition_symbol);
+ DECL_CONV_STUB(pre_defined_surface_side_style);
+ DECL_CONV_STUB(pre_defined_terminator_symbol);
+ DECL_CONV_STUB(pre_defined_tile);
+ DECL_CONV_STUB(predefined_picture_representation_item);
+ DECL_CONV_STUB(presentation_style_assignment);
+ DECL_CONV_STUB(presentation_style_by_context);
+ DECL_CONV_STUB(pressure_measure_with_unit);
+ DECL_CONV_STUB(pressure_unit);
+ DECL_CONV_STUB(procedural_representation);
+ DECL_CONV_STUB(procedural_representation_sequence);
+ DECL_CONV_STUB(procedural_shape_representation);
+ DECL_CONV_STUB(procedural_shape_representation_sequence);
+ DECL_CONV_STUB(product_category);
+ DECL_CONV_STUB(product_class);
+ DECL_CONV_STUB(product_concept_context);
+ DECL_CONV_STUB(product_concept_feature_category_usage);
+ DECL_CONV_STUB(product_definition_element_relationship);
+ DECL_CONV_STUB(product_definition_formation);
+ DECL_CONV_STUB(product_definition_formation_with_specified_source);
+ DECL_CONV_STUB(product_definition_group_assignment);
+ DECL_CONV_STUB(product_definition_shape);
+ DECL_CONV_STUB(product_definition_with_associated_documents);
+ DECL_CONV_STUB(product_identification);
+ DECL_CONV_STUB(product_material_composition_relationship);
+ DECL_CONV_STUB(product_related_product_category);
+ DECL_CONV_STUB(product_specification);
+ DECL_CONV_STUB(tolerance_zone_definition);
+ DECL_CONV_STUB(projected_zone_definition);
+ DECL_CONV_STUB(projection_curve);
+ DECL_CONV_STUB(promissory_usage_occurrence);
+ DECL_CONV_STUB(qualified_representation_item);
+ DECL_CONV_STUB(qualitative_uncertainty);
+ DECL_CONV_STUB(quantified_assembly_component_usage);
+ DECL_CONV_STUB(quasi_uniform_curve);
+ DECL_CONV_STUB(quasi_uniform_surface);
+ DECL_CONV_STUB(radioactivity_measure_with_unit);
+ DECL_CONV_STUB(radioactivity_unit);
+ DECL_CONV_STUB(radius_dimension);
+ DECL_CONV_STUB(range_characteristic);
+ DECL_CONV_STUB(ratio_unit);
+ DECL_CONV_STUB(rational_b_spline_curve);
+ DECL_CONV_STUB(rational_b_spline_surface);
+ DECL_CONV_STUB(rational_representation_item);
+ DECL_CONV_STUB(real_literal);
+ DECL_CONV_STUB(real_representation_item);
+ DECL_CONV_STUB(rectangular_composite_surface);
+ DECL_CONV_STUB(rectangular_trimmed_surface);
+ DECL_CONV_STUB(referenced_modified_datum);
+ DECL_CONV_STUB(relative_event_occurrence);
+ DECL_CONV_STUB(rep_item_group);
+ DECL_CONV_STUB(reparametrised_composite_curve_segment);
+ DECL_CONV_STUB(representation_relationship_with_transformation);
+ DECL_CONV_STUB(requirement_assigned_object);
+ DECL_CONV_STUB(requirement_assignment);
+ DECL_CONV_STUB(requirement_source);
+ DECL_CONV_STUB(requirement_view_definition_relationship);
+ DECL_CONV_STUB(resistance_measure_with_unit);
+ DECL_CONV_STUB(resistance_unit);
+ DECL_CONV_STUB(revolved_area_solid);
+ DECL_CONV_STUB(revolved_face_solid);
+ DECL_CONV_STUB(revolved_face_solid_with_trim_conditions);
+ DECL_CONV_STUB(right_angular_wedge);
+ DECL_CONV_STUB(right_circular_cone);
+ DECL_CONV_STUB(right_circular_cylinder);
+ DECL_CONV_STUB(right_to_usage_association);
+ DECL_CONV_STUB(roundness_tolerance);
+ DECL_CONV_STUB(row_representation_item);
+ DECL_CONV_STUB(row_value);
+ DECL_CONV_STUB(row_variable);
+ DECL_CONV_STUB(rule_action);
+ DECL_CONV_STUB(rule_condition);
+ DECL_CONV_STUB(rule_set);
+ DECL_CONV_STUB(rule_set_group);
+ DECL_CONV_STUB(rule_superseded_assignment);
+ DECL_CONV_STUB(rule_supersedence);
+ DECL_CONV_STUB(surface_curve_swept_area_solid);
+ DECL_CONV_STUB(ruled_surface_swept_area_solid);
+ DECL_CONV_STUB(runout_zone_definition);
+ DECL_CONV_STUB(runout_zone_orientation);
+ DECL_CONV_STUB(runout_zone_orientation_reference_direction);
+ DECL_CONV_STUB(satisfied_requirement);
+ DECL_CONV_STUB(satisfies_requirement);
+ DECL_CONV_STUB(satisfying_item);
+ DECL_CONV_STUB(scalar_variable);
+ DECL_CONV_STUB(scattering_parameter);
+ DECL_CONV_STUB(sculptured_solid);
+ DECL_CONV_STUB(seam_curve);
+ DECL_CONV_STUB(serial_numbered_effectivity);
+ DECL_CONV_STUB(shape_aspect_associativity);
+ DECL_CONV_STUB(shape_aspect_deriving_relationship);
+ DECL_CONV_STUB(shape_definition_representation);
+ DECL_CONV_STUB(shape_dimension_representation);
+ DECL_CONV_STUB(shape_feature_definition);
+ DECL_CONV_STUB(shape_representation_with_parameters);
+ DECL_CONV_STUB(shell_based_surface_model);
+ DECL_CONV_STUB(shell_based_wireframe_model);
+ DECL_CONV_STUB(shell_based_wireframe_shape_representation);
+ DECL_CONV_STUB(si_absorbed_dose_unit);
+ DECL_CONV_STUB(si_capacitance_unit);
+ DECL_CONV_STUB(si_conductance_unit);
+ DECL_CONV_STUB(si_dose_equivalent_unit);
+ DECL_CONV_STUB(si_electric_charge_unit);
+ DECL_CONV_STUB(si_electric_potential_unit);
+ DECL_CONV_STUB(si_energy_unit);
+ DECL_CONV_STUB(si_force_unit);
+ DECL_CONV_STUB(si_frequency_unit);
+ DECL_CONV_STUB(si_illuminance_unit);
+ DECL_CONV_STUB(si_inductance_unit);
+ DECL_CONV_STUB(si_magnetic_flux_density_unit);
+ DECL_CONV_STUB(si_magnetic_flux_unit);
+ DECL_CONV_STUB(si_power_unit);
+ DECL_CONV_STUB(si_pressure_unit);
+ DECL_CONV_STUB(si_radioactivity_unit);
+ DECL_CONV_STUB(si_resistance_unit);
+ DECL_CONV_STUB(si_unit);
+ DECL_CONV_STUB(simple_boolean_expression);
+ DECL_CONV_STUB(simple_numeric_expression);
+ DECL_CONV_STUB(slash_expression);
+ DECL_CONV_STUB(smeared_material_definition);
+ DECL_CONV_STUB(solid_angle_measure_with_unit);
+ DECL_CONV_STUB(solid_angle_unit);
+ DECL_CONV_STUB(solid_curve_font);
+ DECL_CONV_STUB(solid_replica);
+ DECL_CONV_STUB(solid_with_chamfered_edges);
+ DECL_CONV_STUB(solid_with_angle_based_chamfer);
+ DECL_CONV_STUB(solid_with_shape_element_pattern);
+ DECL_CONV_STUB(solid_with_circular_pattern);
+ DECL_CONV_STUB(solid_with_depression);
+ DECL_CONV_STUB(solid_with_pocket);
+ DECL_CONV_STUB(solid_with_circular_pocket);
+ DECL_CONV_STUB(solid_with_protrusion);
+ DECL_CONV_STUB(solid_with_circular_protrusion);
+ DECL_CONV_STUB(solid_with_hole);
+ DECL_CONV_STUB(solid_with_stepped_round_hole);
+ DECL_CONV_STUB(solid_with_conical_bottom_round_hole);
+ DECL_CONV_STUB(solid_with_constant_radius_edge_blend);
+ DECL_CONV_STUB(solid_with_slot);
+ DECL_CONV_STUB(solid_with_curved_slot);
+ DECL_CONV_STUB(solid_with_double_offset_chamfer);
+ DECL_CONV_STUB(solid_with_flat_bottom_round_hole);
+ DECL_CONV_STUB(solid_with_general_pocket);
+ DECL_CONV_STUB(solid_with_general_protrusion);
+ DECL_CONV_STUB(solid_with_groove);
+ DECL_CONV_STUB(solid_with_incomplete_circular_pattern);
+ DECL_CONV_STUB(solid_with_rectangular_pattern);
+ DECL_CONV_STUB(solid_with_incomplete_rectangular_pattern);
+ DECL_CONV_STUB(solid_with_rectangular_pocket);
+ DECL_CONV_STUB(solid_with_rectangular_protrusion);
+ DECL_CONV_STUB(solid_with_single_offset_chamfer);
+ DECL_CONV_STUB(solid_with_spherical_bottom_round_hole);
+ DECL_CONV_STUB(solid_with_stepped_round_hole_and_conical_transitions);
+ DECL_CONV_STUB(solid_with_straight_slot);
+ DECL_CONV_STUB(solid_with_tee_section_slot);
+ DECL_CONV_STUB(solid_with_through_depression);
+ DECL_CONV_STUB(solid_with_trapezoidal_section_slot);
+ DECL_CONV_STUB(solid_with_variable_radius_edge_blend);
+ DECL_CONV_STUB(source_for_requirement);
+ DECL_CONV_STUB(sourced_requirement);
+ DECL_CONV_STUB(specification_definition);
+ DECL_CONV_STUB(specified_higher_usage_occurrence);
+ DECL_CONV_STUB(sphere);
+ DECL_CONV_STUB(spherical_surface);
+ DECL_CONV_STUB(start_request);
+ DECL_CONV_STUB(start_work);
+ DECL_CONV_STUB(straightness_tolerance);
+ DECL_CONV_STUB(structured_dimension_callout);
+ DECL_CONV_STUB(structured_text_composition);
+ DECL_CONV_STUB(structured_text_representation);
+ DECL_CONV_STUB(subedge);
+ DECL_CONV_STUB(subface);
+ DECL_CONV_STUB(supplied_part_relationship);
+ DECL_CONV_STUB(surface_condition_callout);
+ DECL_CONV_STUB(swept_surface);
+ DECL_CONV_STUB(surface_of_linear_extrusion);
+ DECL_CONV_STUB(surface_of_revolution);
+ DECL_CONV_STUB(surface_patch);
+ DECL_CONV_STUB(surface_profile_tolerance);
+ DECL_CONV_STUB(surface_replica);
+ DECL_CONV_STUB(surface_side_style);
+ DECL_CONV_STUB(surface_style_boundary);
+ DECL_CONV_STUB(surface_style_control_grid);
+ DECL_CONV_STUB(surface_style_fill_area);
+ DECL_CONV_STUB(surface_style_parameter_line);
+ DECL_CONV_STUB(surface_style_reflectance_ambient);
+ DECL_CONV_STUB(surface_style_reflectance_ambient_diffuse);
+ DECL_CONV_STUB(surface_style_reflectance_ambient_diffuse_specular);
+ DECL_CONV_STUB(surface_style_rendering);
+ DECL_CONV_STUB(surface_style_rendering_with_properties);
+ DECL_CONV_STUB(surface_style_segmentation_curve);
+ DECL_CONV_STUB(surface_style_silhouette);
+ DECL_CONV_STUB(surface_style_usage);
+ DECL_CONV_STUB(surface_texture_representation);
+ DECL_CONV_STUB(surfaced_open_shell);
+ DECL_CONV_STUB(swept_disk_solid);
+ DECL_CONV_STUB(symbol);
+ DECL_CONV_STUB(symbol_representation_map);
+ DECL_CONV_STUB(symbol_style);
+ DECL_CONV_STUB(symbol_target);
+ DECL_CONV_STUB(symmetric_shape_aspect);
+ DECL_CONV_STUB(symmetry_tolerance);
+ DECL_CONV_STUB(table_representation_item);
+ DECL_CONV_STUB(tactile_appearance_representation);
+ DECL_CONV_STUB(tagged_text_format);
+ DECL_CONV_STUB(tagged_text_item);
+ DECL_CONV_STUB(tangent);
+ DECL_CONV_STUB(text_literal_with_associated_curves);
+ DECL_CONV_STUB(text_literal_with_blanking_box);
+ DECL_CONV_STUB(text_literal_with_extent);
+ DECL_CONV_STUB(text_string_representation);
+ DECL_CONV_STUB(text_style);
+ DECL_CONV_STUB(text_style_with_box_characteristics);
+ DECL_CONV_STUB(text_style_with_mirror);
+ DECL_CONV_STUB(text_style_with_spacing);
+ DECL_CONV_STUB(thermal_resistance_measure_with_unit);
+ DECL_CONV_STUB(thermal_resistance_unit);
+ DECL_CONV_STUB(thermodynamic_temperature_measure_with_unit);
+ DECL_CONV_STUB(thermodynamic_temperature_unit);
+ DECL_CONV_STUB(thickened_face_solid);
+ DECL_CONV_STUB(thickness_laminate_definition);
+ DECL_CONV_STUB(thickness_laminate_table);
+ DECL_CONV_STUB(time_interval);
+ DECL_CONV_STUB(time_interval_based_effectivity);
+ DECL_CONV_STUB(time_interval_with_bounds);
+ DECL_CONV_STUB(time_measure_with_unit);
+ DECL_CONV_STUB(time_unit);
+ DECL_CONV_STUB(tolerance_zone);
+ DECL_CONV_STUB(torus);
+ DECL_CONV_STUB(total_runout_tolerance);
+ DECL_CONV_STUB(track_blended_solid);
+ DECL_CONV_STUB(track_blended_solid_with_end_conditions);
+ DECL_CONV_STUB(trimmed_curve);
+ DECL_CONV_STUB(two_direction_repeat_factor);
+ DECL_CONV_STUB(unary_generic_expression);
+ DECL_CONV_STUB(unary_numeric_expression);
+ DECL_CONV_STUB(uncertainty_assigned_representation);
+ DECL_CONV_STUB(uncertainty_measure_with_unit);
+ DECL_CONV_STUB(uniform_curve);
+ DECL_CONV_STUB(uniform_resource_identifier);
+ DECL_CONV_STUB(uniform_surface);
+ DECL_CONV_STUB(usage_association);
+ DECL_CONV_STUB(user_defined_curve_font);
+ DECL_CONV_STUB(user_defined_marker);
+ DECL_CONV_STUB(user_defined_terminator_symbol);
+ DECL_CONV_STUB(user_selected_shape_elements);
+ DECL_CONV_STUB(value_range);
+ DECL_CONV_STUB(value_representation_item);
+ DECL_CONV_STUB(variable_semantics);
+ DECL_CONV_STUB(variational_representation_item);
+ DECL_CONV_STUB(vector);
+ DECL_CONV_STUB(vector_style);
+ DECL_CONV_STUB(velocity_measure_with_unit);
+ DECL_CONV_STUB(velocity_unit);
+ DECL_CONV_STUB(vertex);
+ DECL_CONV_STUB(vertex_loop);
+ DECL_CONV_STUB(vertex_point);
+ DECL_CONV_STUB(vertex_shell);
+ DECL_CONV_STUB(view_volume);
+ DECL_CONV_STUB(visual_appearance_representation);
+ DECL_CONV_STUB(volume_measure_with_unit);
+ DECL_CONV_STUB(volume_unit);
+ DECL_CONV_STUB(week_of_year_and_day_date);
+ DECL_CONV_STUB(wire_shell);
+ DECL_CONV_STUB(year_month);
+
+
+#undef DECL_CONV_STUB
+
+} //! STEP
+} //! Assimp
+
+#endif // INCLUDED_STEPFILE_READER_GEN_H
diff --git a/code/ImporterRegistry.cpp b/code/ImporterRegistry.cpp
index afc308075..e6cf8299e 100644
--- a/code/ImporterRegistry.cpp
+++ b/code/ImporterRegistry.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -48,7 +49,7 @@ corresponding preprocessor flag to selectively disable formats.
*/
#include <vector>
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
// ------------------------------------------------------------------------------------------------
// Importers
@@ -169,7 +170,7 @@ corresponding preprocessor flag to selectively disable formats.
# include "NDOLoader.h"
#endif
#ifndef ASSIMP_BUILD_NO_IFC_IMPORTER
-# include "IFCLoader.h"
+# include "Importer/IFC/IFCLoader.h"
#endif
#ifndef ASSIMP_BUILD_NO_XGL_IMPORTER
# include "XGLLoader.h"
@@ -182,6 +183,7 @@ corresponding preprocessor flag to selectively disable formats.
#endif
#ifndef ASSIMP_BUILD_NO_GLTF_IMPORTER
# include "glTFImporter.h"
+# include "glTF2Importer.h"
#endif
#ifndef ASSIMP_BUILD_NO_C4D_IMPORTER
# include "C4DImporter.h"
@@ -195,6 +197,9 @@ corresponding preprocessor flag to selectively disable formats.
#ifndef ASSIMP_BUILD_NO_MMD_IMPORTER
# include "MMDImporter.h"
#endif
+#ifndef ASSIMP_BUILD_NO_STEP_IMPORTER
+# include "Importer/StepFile/StepFileImporter.h"
+#endif
namespace Assimp {
@@ -336,6 +341,7 @@ void GetImporterInstanceList(std::vector< BaseImporter* >& out)
#endif
#if ( !defined ASSIMP_BUILD_NO_GLTF_IMPORTER )
out.push_back( new glTFImporter() );
+ out.push_back( new glTF2Importer() );
#endif
#if ( !defined ASSIMP_BUILD_NO_C4D_IMPORTER )
out.push_back( new C4DImporter() );
@@ -349,6 +355,9 @@ void GetImporterInstanceList(std::vector< BaseImporter* >& out)
#ifndef ASSIMP_BUILD_NO_MMD_IMPORTER
out.push_back( new MMDImporter() );
#endif
+#ifndef ASSIMP_BUILD_NO_STEP_IMPORTER
+ out.push_back(new StepFile::StepFileImporter());
+#endif
}
/** will delete all registered importers. */
diff --git a/code/ImproveCacheLocality.cpp b/code/ImproveCacheLocality.cpp
index 7f0727e8b..adcbc92fe 100644
--- a/code/ImproveCacheLocality.cpp
+++ b/code/ImproveCacheLocality.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -52,7 +53,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// internal headers
#include "ImproveCacheLocality.h"
#include "VertexTriangleAdjacency.h"
-#include "StringUtils.h"
+#include <assimp/StringUtils.h>
#include <assimp/postprocess.h>
#include <assimp/scene.h>
#include <assimp/DefaultLogger.hpp>
@@ -94,11 +95,11 @@ void ImproveCacheLocalityProcess::SetupProperties(const Importer* pImp)
void ImproveCacheLocalityProcess::Execute( aiScene* pScene)
{
if (!pScene->mNumMeshes) {
- DefaultLogger::get()->debug("ImproveCacheLocalityProcess skipped; there are no meshes");
+ ASSIMP_LOG_DEBUG("ImproveCacheLocalityProcess skipped; there are no meshes");
return;
}
- DefaultLogger::get()->debug("ImproveCacheLocalityProcess begin");
+ ASSIMP_LOG_DEBUG("ImproveCacheLocalityProcess begin");
float out = 0.f;
unsigned int numf = 0, numm = 0;
@@ -111,12 +112,8 @@ void ImproveCacheLocalityProcess::Execute( aiScene* pScene)
}
}
if (!DefaultLogger::isNullLogger()) {
- char szBuff[128]; // should be sufficiently large in every case
- ai_snprintf(szBuff,128,"Cache relevant are %u meshes (%u faces). Average output ACMR is %f",
- numm,numf,out/numf);
-
- DefaultLogger::get()->info(szBuff);
- DefaultLogger::get()->debug("ImproveCacheLocalityProcess finished. ");
+ ASSIMP_LOG_INFO_F("Cache relevant are ", numm, " meshes (", numf," faces). Average output ACMR is ", out / numf );
+ ASSIMP_LOG_DEBUG("ImproveCacheLocalityProcess finished. ");
}
}
@@ -134,7 +131,7 @@ float ImproveCacheLocalityProcess::ProcessMesh( aiMesh* pMesh, unsigned int mesh
return 0.f;
if (pMesh->mPrimitiveTypes != aiPrimitiveType_TRIANGLE) {
- DefaultLogger::get()->error("This algorithm works on triangle meshes only");
+ ASSIMP_LOG_ERROR("This algorithm works on triangle meshes only");
return 0.f;
}
@@ -185,7 +182,7 @@ float ImproveCacheLocalityProcess::ProcessMesh( aiMesh* pMesh, unsigned int mesh
// mesh, otherwise this value would normally be at least minimally
// smaller than 3.0 ...
ai_snprintf(szBuff,128,"Mesh %u: Not suitable for vcache optimization",meshNum);
- DefaultLogger::get()->warn(szBuff);
+ ASSIMP_LOG_WARN(szBuff);
return 0.f;
}
}
@@ -223,6 +220,7 @@ float ImproveCacheLocalityProcess::ProcessMesh( aiMesh* pMesh, unsigned int mesh
iMaxRefTris = std::max(iMaxRefTris,*piCur);
}
}
+ ai_assert(iMaxRefTris > 0);
unsigned int* piCandidates = new unsigned int[iMaxRefTris*3];
unsigned int iCacheMisses = 0;
@@ -274,8 +272,9 @@ float ImproveCacheLocalityProcess::ProcessMesh( aiMesh* pMesh, unsigned int mesh
// so iterate through all vertices of the current triangle
const aiFace* pcFace = &pMesh->mFaces[ fidx ];
- for (unsigned int* p = pcFace->mIndices, *p2 = pcFace->mIndices+3;p != p2;++p) {
- const unsigned int dp = *p;
+ unsigned nind = pcFace->mNumIndices;
+ for (unsigned ind = 0; ind < nind; ind++) {
+ unsigned dp = pcFace->mIndices[ind];
// the current vertex won't have any free triangles after this step
if (ivdx != (int)dp) {
@@ -361,11 +360,7 @@ float ImproveCacheLocalityProcess::ProcessMesh( aiMesh* pMesh, unsigned int mesh
// very intense verbose logging ... prepare for much text if there are many meshes
if ( DefaultLogger::get()->getLogSeverity() == Logger::VERBOSE) {
- char szBuff[128]; // should be sufficiently large in every case
-
- ai_snprintf(szBuff,128,"Mesh %u | ACMR in: %f out: %f | ~%.1f%%",meshNum,fACMR,fACMR2,
- ((fACMR - fACMR2) / fACMR) * 100.f);
- DefaultLogger::get()->debug(szBuff);
+ ASSIMP_LOG_DEBUG_F("Mesh %u | ACMR in: ", meshNum, " out: ", fACMR, " | ~", fACMR2, ((fACMR - fACMR2) / fACMR) * 100.f);
}
fACMR2 *= pMesh->mNumFaces;
@@ -373,9 +368,11 @@ float ImproveCacheLocalityProcess::ProcessMesh( aiMesh* pMesh, unsigned int mesh
// sort the output index buffer back to the input array
piCSIter = piIBOutput;
for (aiFace* pcFace = pMesh->mFaces; pcFace != pcEnd;++pcFace) {
- pcFace->mIndices[0] = *piCSIter++;
- pcFace->mIndices[1] = *piCSIter++;
- pcFace->mIndices[2] = *piCSIter++;
+ unsigned nind = pcFace->mNumIndices;
+ unsigned * ind = pcFace->mIndices;
+ if (nind > 0) ind[0] = *piCSIter++;
+ if (nind > 1) ind[1] = *piCSIter++;
+ if (nind > 2) ind[2] = *piCSIter++;
}
// delete temporary storage
diff --git a/code/ImproveCacheLocality.h b/code/ImproveCacheLocality.h
index d91388c41..18eb5e460 100644
--- a/code/ImproveCacheLocality.h
+++ b/code/ImproveCacheLocality.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/JoinVerticesProcess.cpp b/code/JoinVerticesProcess.cpp
index 17b0ab07f..b91f44048 100644
--- a/code/JoinVerticesProcess.cpp
+++ b/code/JoinVerticesProcess.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -49,9 +50,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "JoinVerticesProcess.h"
#include "ProcessHelper.h"
-#include "Vertex.h"
-#include "TinyFormatter.h"
+#include <assimp/Vertex.h>
+#include <assimp/TinyFormatter.h>
#include <stdio.h>
+#include <unordered_set>
using namespace Assimp;
// ------------------------------------------------------------------------------------------------
@@ -78,7 +80,7 @@ bool JoinVerticesProcess::IsActive( unsigned int pFlags) const
// Executes the post processing step on the given imported data.
void JoinVerticesProcess::Execute( aiScene* pScene)
{
- DefaultLogger::get()->debug("JoinVerticesProcess begin");
+ ASSIMP_LOG_DEBUG("JoinVerticesProcess begin");
// get the total number of vertices BEFORE the step is executed
int iNumOldVertices = 0;
@@ -94,25 +96,138 @@ void JoinVerticesProcess::Execute( aiScene* pScene)
iNumVertices += ProcessMesh( pScene->mMeshes[a],a);
// if logging is active, print detailed statistics
- if (!DefaultLogger::isNullLogger())
- {
- if (iNumOldVertices == iNumVertices)
- {
- DefaultLogger::get()->debug("JoinVerticesProcess finished ");
- } else
- {
- char szBuff[128]; // should be sufficiently large in every case
- ::ai_snprintf(szBuff,128,"JoinVerticesProcess finished | Verts in: %i out: %i | ~%.1f%%",
- iNumOldVertices,
- iNumVertices,
- ((iNumOldVertices - iNumVertices) / (float)iNumOldVertices) * 100.f);
- DefaultLogger::get()->info(szBuff);
+ if (!DefaultLogger::isNullLogger()) {
+ if (iNumOldVertices == iNumVertices) {
+ ASSIMP_LOG_DEBUG("JoinVerticesProcess finished ");
+ } else {
+ ASSIMP_LOG_INFO_F("JoinVerticesProcess finished | Verts in: ", iNumOldVertices,
+ " out: ", iNumVertices, " | ~",
+ ((iNumOldVertices - iNumVertices) / (float)iNumOldVertices) * 100.f );
}
}
pScene->mFlags |= AI_SCENE_FLAGS_NON_VERBOSE_FORMAT;
}
+namespace {
+
+bool areVerticesEqual(const Vertex &lhs, const Vertex &rhs, bool complex)
+{
+ // A little helper to find locally close vertices faster.
+ // Try to reuse the lookup table from the last step.
+ const static float epsilon = 1e-5f;
+ // Squared because we check against squared length of the vector difference
+ static const float squareEpsilon = epsilon * epsilon;
+
+ // Square compare is useful for animeshes vertices compare
+ if ((lhs.position - rhs.position).SquareLength() > squareEpsilon) {
+ return false;
+ }
+
+ // We just test the other attributes even if they're not present in the mesh.
+ // In this case they're initialized to 0 so the comparison succeeds.
+ // By this method the non-present attributes are effectively ignored in the comparison.
+ if ((lhs.normal - rhs.normal).SquareLength() > squareEpsilon) {
+ return false;
+ }
+
+ if ((lhs.texcoords[0] - rhs.texcoords[0]).SquareLength() > squareEpsilon) {
+ return false;
+ }
+
+ if ((lhs.tangent - rhs.tangent).SquareLength() > squareEpsilon) {
+ return false;
+ }
+
+ if ((lhs.bitangent - rhs.bitangent).SquareLength() > squareEpsilon) {
+ return false;
+ }
+
+ // Usually we won't have vertex colors or multiple UVs, so we can skip from here
+ // Actually this increases runtime performance slightly, at least if branch
+ // prediction is on our side.
+ if (complex) {
+ for (int i = 0; i < 8; i++) {
+ if (i > 0 && (lhs.texcoords[i] - rhs.texcoords[i]).SquareLength() > squareEpsilon) {
+ return false;
+ }
+ if (GetColorDifference(lhs.colors[i], rhs.colors[i]) > squareEpsilon) {
+ return false;
+ }
+ }
+ }
+ return true;
+}
+
+template<class XMesh>
+void updateXMeshVertices(XMesh *pMesh, std::vector<Vertex> &uniqueVertices) {
+ // replace vertex data with the unique data sets
+ pMesh->mNumVertices = (unsigned int)uniqueVertices.size();
+
+ // ----------------------------------------------------------------------------
+ // NOTE - we're *not* calling Vertex::SortBack() because it would check for
+ // presence of every single vertex component once PER VERTEX. And our CPU
+ // dislikes branches, even if they're easily predictable.
+ // ----------------------------------------------------------------------------
+
+ // Position, if present (check made for aiAnimMesh)
+ if (pMesh->mVertices)
+ {
+ delete [] pMesh->mVertices;
+ pMesh->mVertices = new aiVector3D[pMesh->mNumVertices];
+ for (unsigned int a = 0; a < pMesh->mNumVertices; a++) {
+ pMesh->mVertices[a] = uniqueVertices[a].position;
+ }
+ }
+
+ // Normals, if present
+ if (pMesh->mNormals)
+ {
+ delete [] pMesh->mNormals;
+ pMesh->mNormals = new aiVector3D[pMesh->mNumVertices];
+ for( unsigned int a = 0; a < pMesh->mNumVertices; a++) {
+ pMesh->mNormals[a] = uniqueVertices[a].normal;
+ }
+ }
+ // Tangents, if present
+ if (pMesh->mTangents)
+ {
+ delete [] pMesh->mTangents;
+ pMesh->mTangents = new aiVector3D[pMesh->mNumVertices];
+ for (unsigned int a = 0; a < pMesh->mNumVertices; a++) {
+ pMesh->mTangents[a] = uniqueVertices[a].tangent;
+ }
+ }
+ // Bitangents as well
+ if (pMesh->mBitangents)
+ {
+ delete [] pMesh->mBitangents;
+ pMesh->mBitangents = new aiVector3D[pMesh->mNumVertices];
+ for (unsigned int a = 0; a < pMesh->mNumVertices; a++) {
+ pMesh->mBitangents[a] = uniqueVertices[a].bitangent;
+ }
+ }
+ // Vertex colors
+ for (unsigned int a = 0; pMesh->HasVertexColors(a); a++)
+ {
+ delete [] pMesh->mColors[a];
+ pMesh->mColors[a] = new aiColor4D[pMesh->mNumVertices];
+ for( unsigned int b = 0; b < pMesh->mNumVertices; b++) {
+ pMesh->mColors[a][b] = uniqueVertices[b].colors[a];
+ }
+ }
+ // Texture coords
+ for (unsigned int a = 0; pMesh->HasTextureCoords(a); a++)
+ {
+ delete [] pMesh->mTextureCoords[a];
+ pMesh->mTextureCoords[a] = new aiVector3D[pMesh->mNumVertices];
+ for (unsigned int b = 0; b < pMesh->mNumVertices; b++) {
+ pMesh->mTextureCoords[a][b] = uniqueVertices[b].texcoords[a];
+ }
+ }
+}
+} // namespace
+
// ------------------------------------------------------------------------------------------------
// Unites identical vertices in the given mesh
int JoinVerticesProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex)
@@ -125,6 +240,19 @@ int JoinVerticesProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex)
return 0;
}
+ // We should care only about used vertices, not all of them
+ // (this can happen due to original file vertices buffer being used by
+ // multiple meshes)
+ std::unordered_set<unsigned int> usedVertexIndices;
+ usedVertexIndices.reserve(pMesh->mNumVertices);
+ for( unsigned int a = 0; a < pMesh->mNumFaces; a++)
+ {
+ aiFace& face = pMesh->mFaces[a];
+ for( unsigned int b = 0; b < face.mNumIndices; b++) {
+ usedVertexIndices.insert(face.mIndices[b]);
+ }
+ }
+
// We'll never have more vertices afterwards.
std::vector<Vertex> uniqueVertices;
uniqueVertices.reserve( pMesh->mNumVertices);
@@ -137,9 +265,6 @@ int JoinVerticesProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex)
static_assert(AI_MAX_VERTICES == 0x7fffffff, "AI_MAX_VERTICES == 0x7fffffff");
std::vector<unsigned int> replaceIndex( pMesh->mNumVertices, 0xffffffff);
- // A little helper to find locally close vertices faster.
- // Try to reuse the lookup table from the last step.
- const static float epsilon = 1e-5f;
// float posEpsilonSqr;
SpatialSort* vertexFinder = NULL;
SpatialSort _vertexFinder;
@@ -161,9 +286,6 @@ int JoinVerticesProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex)
// posEpsilonSqr = ComputePositionEpsilon(pMesh);
}
- // Squared because we check against squared length of the vector difference
- static const float squareEpsilon = epsilon * epsilon;
-
// Again, better waste some bytes than a realloc ...
std::vector<unsigned int> verticesFound;
verticesFound.reserve(10);
@@ -171,9 +293,23 @@ int JoinVerticesProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex)
// Run an optimized code path if we don't have multiple UVs or vertex colors.
// This should yield false in more than 99% of all imports ...
const bool complex = ( pMesh->GetNumColorChannels() > 0 || pMesh->GetNumUVChannels() > 1);
+ const bool hasAnimMeshes = pMesh->mNumAnimMeshes > 0;
+
+ // We'll never have more vertices afterwards.
+ std::vector<std::vector<Vertex>> uniqueAnimatedVertices;
+ if (hasAnimMeshes) {
+ uniqueAnimatedVertices.resize(pMesh->mNumAnimMeshes);
+ for (unsigned int animMeshIndex = 0; animMeshIndex < pMesh->mNumAnimMeshes; animMeshIndex++) {
+ uniqueAnimatedVertices[animMeshIndex].reserve(pMesh->mNumVertices);
+ }
+ }
// Now check each vertex if it brings something new to the table
for( unsigned int a = 0; a < pMesh->mNumVertices; a++) {
+ if (usedVertexIndices.find(a) == usedVertexIndices.end()) {
+ continue;
+ }
+
// collect the vertex data
Vertex v(pMesh,a);
@@ -183,74 +319,32 @@ int JoinVerticesProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex)
// check all unique vertices close to the position if this vertex is already present among them
for( unsigned int b = 0; b < verticesFound.size(); b++) {
-
const unsigned int vidx = verticesFound[b];
const unsigned int uidx = replaceIndex[ vidx];
if( uidx & 0x80000000)
continue;
const Vertex& uv = uniqueVertices[ uidx];
- // Position mismatch is impossible - the vertex finder already discarded all non-matching positions
- // We just test the other attributes even if they're not present in the mesh.
- // In this case they're initialized to 0 so the comparison succeeds.
- // By this method the non-present attributes are effectively ignored in the comparison.
- if( (uv.normal - v.normal).SquareLength() > squareEpsilon)
+ if (!areVerticesEqual(v, uv, complex)) {
continue;
- if( (uv.texcoords[0] - v.texcoords[0]).SquareLength() > squareEpsilon)
- continue;
- if( (uv.tangent - v.tangent).SquareLength() > squareEpsilon)
- continue;
- if( (uv.bitangent - v.bitangent).SquareLength() > squareEpsilon)
- continue;
-
- // Usually we won't have vertex colors or multiple UVs, so we can skip from here
- // Actually this increases runtime performance slightly, at least if branch
- // prediction is on our side.
- if (complex){
- // manually unrolled because continue wouldn't work as desired in an inner loop,
- // also because some compilers seem to fail the task. Colors and UV coords
- // are interleaved since the higher entries are most likely to be
- // zero and thus useless. By interleaving the arrays, vertices are,
- // on average, rejected earlier.
-
- if( (uv.texcoords[1] - v.texcoords[1]).SquareLength() > squareEpsilon)
- continue;
- if( GetColorDifference( uv.colors[0], v.colors[0]) > squareEpsilon)
- continue;
-
- if( (uv.texcoords[2] - v.texcoords[2]).SquareLength() > squareEpsilon)
- continue;
- if( GetColorDifference( uv.colors[1], v.colors[1]) > squareEpsilon)
- continue;
-
- if( (uv.texcoords[3] - v.texcoords[3]).SquareLength() > squareEpsilon)
- continue;
- if( GetColorDifference( uv.colors[2], v.colors[2]) > squareEpsilon)
- continue;
-
- if( (uv.texcoords[4] - v.texcoords[4]).SquareLength() > squareEpsilon)
- continue;
- if( GetColorDifference( uv.colors[3], v.colors[3]) > squareEpsilon)
- continue;
-
- if( (uv.texcoords[5] - v.texcoords[5]).SquareLength() > squareEpsilon)
- continue;
- if( GetColorDifference( uv.colors[4], v.colors[4]) > squareEpsilon)
- continue;
-
- if( (uv.texcoords[6] - v.texcoords[6]).SquareLength() > squareEpsilon)
- continue;
- if( GetColorDifference( uv.colors[5], v.colors[5]) > squareEpsilon)
- continue;
-
- if( (uv.texcoords[7] - v.texcoords[7]).SquareLength() > squareEpsilon)
- continue;
- if( GetColorDifference( uv.colors[6], v.colors[6]) > squareEpsilon)
- continue;
+ }
- if( GetColorDifference( uv.colors[7], v.colors[7]) > squareEpsilon)
+ if (hasAnimMeshes) {
+ // If given vertex is animated, then it has to be preserver 1 to 1 (base mesh and animated mesh require same topology)
+ // NOTE: not doing this totaly breaks anim meshes as they don't have their own faces (they use pMesh->mFaces)
+ bool breaksAnimMesh = false;
+ for (unsigned int animMeshIndex = 0; animMeshIndex < pMesh->mNumAnimMeshes; animMeshIndex++) {
+ const Vertex& animatedUV = uniqueAnimatedVertices[animMeshIndex][ uidx];
+ Vertex aniMeshVertex(pMesh->mAnimMeshes[animMeshIndex], a);
+ if (!areVerticesEqual(aniMeshVertex, animatedUV, complex)) {
+ breaksAnimMesh = true;
+ break;
+ }
+ }
+ if (breaksAnimMesh) {
continue;
+ }
}
// we're still here -> this vertex perfectly matches our given vertex
@@ -269,11 +363,17 @@ int JoinVerticesProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex)
// no unique vertex matches it up to now -> so add it
replaceIndex[a] = (unsigned int)uniqueVertices.size();
uniqueVertices.push_back( v);
+ if (hasAnimMeshes) {
+ for (unsigned int animMeshIndex = 0; animMeshIndex < pMesh->mNumAnimMeshes; animMeshIndex++) {
+ Vertex aniMeshVertex(pMesh->mAnimMeshes[animMeshIndex], a);
+ uniqueAnimatedVertices[animMeshIndex].push_back(aniMeshVertex);
+ }
+ }
}
}
if (!DefaultLogger::isNullLogger() && DefaultLogger::get()->getLogSeverity() == Logger::VERBOSE) {
- DefaultLogger::get()->debug((Formatter::format(),
+ ASSIMP_LOG_DEBUG_F(
"Mesh ",meshIndex,
" (",
(pMesh->mName.length ? pMesh->mName.data : "unnamed"),
@@ -283,67 +383,13 @@ int JoinVerticesProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex)
" | ~",
((pMesh->mNumVertices - uniqueVertices.size()) / (float)pMesh->mNumVertices) * 100.f,
"%"
- ));
+ );
}
- // replace vertex data with the unique data sets
- pMesh->mNumVertices = (unsigned int)uniqueVertices.size();
-
- // ----------------------------------------------------------------------------
- // NOTE - we're *not* calling Vertex::SortBack() because it would check for
- // presence of every single vertex component once PER VERTEX. And our CPU
- // dislikes branches, even if they're easily predictable.
- // ----------------------------------------------------------------------------
-
- // Position
- delete [] pMesh->mVertices;
- pMesh->mVertices = new aiVector3D[pMesh->mNumVertices];
- for( unsigned int a = 0; a < pMesh->mNumVertices; a++)
- pMesh->mVertices[a] = uniqueVertices[a].position;
-
- // Normals, if present
- if( pMesh->mNormals)
- {
- delete [] pMesh->mNormals;
- pMesh->mNormals = new aiVector3D[pMesh->mNumVertices];
- for( unsigned int a = 0; a < pMesh->mNumVertices; a++) {
- pMesh->mNormals[a] = uniqueVertices[a].normal;
- }
- }
- // Tangents, if present
- if( pMesh->mTangents)
- {
- delete [] pMesh->mTangents;
- pMesh->mTangents = new aiVector3D[pMesh->mNumVertices];
- for( unsigned int a = 0; a < pMesh->mNumVertices; a++) {
- pMesh->mTangents[a] = uniqueVertices[a].tangent;
- }
- }
- // Bitangents as well
- if( pMesh->mBitangents)
- {
- delete [] pMesh->mBitangents;
- pMesh->mBitangents = new aiVector3D[pMesh->mNumVertices];
- for( unsigned int a = 0; a < pMesh->mNumVertices; a++) {
- pMesh->mBitangents[a] = uniqueVertices[a].bitangent;
- }
- }
- // Vertex colors
- for( unsigned int a = 0; pMesh->HasVertexColors(a); a++)
- {
- delete [] pMesh->mColors[a];
- pMesh->mColors[a] = new aiColor4D[pMesh->mNumVertices];
- for( unsigned int b = 0; b < pMesh->mNumVertices; b++) {
- pMesh->mColors[a][b] = uniqueVertices[b].colors[a];
- }
- }
- // Texture coords
- for( unsigned int a = 0; pMesh->HasTextureCoords(a); a++)
- {
- delete [] pMesh->mTextureCoords[a];
- pMesh->mTextureCoords[a] = new aiVector3D[pMesh->mNumVertices];
- for( unsigned int b = 0; b < pMesh->mNumVertices; b++) {
- pMesh->mTextureCoords[a][b] = uniqueVertices[b].texcoords[a];
+ updateXMeshVertices(pMesh, uniqueVertices);
+ if (hasAnimMeshes) {
+ for (unsigned int animMeshIndex = 0; animMeshIndex < pMesh->mNumAnimMeshes; animMeshIndex++) {
+ updateXMeshVertices(pMesh->mAnimMeshes[animMeshIndex], uniqueAnimatedVertices[animMeshIndex]);
}
}
@@ -374,7 +420,7 @@ int JoinVerticesProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex)
}
}
} else {
- DefaultLogger::get()->error( "X-Export: aiBone shall contain weights, but pointer to them is NULL." );
+ ASSIMP_LOG_ERROR( "X-Export: aiBone shall contain weights, but pointer to them is NULL." );
}
if (newWeights.size() > 0) {
@@ -408,7 +454,7 @@ int JoinVerticesProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex)
}
--a;
- DefaultLogger::get()->warn("Removing bone -> no weights remaining");
+ ASSIMP_LOG_WARN("Removing bone -> no weights remaining");
}
}
return pMesh->mNumVertices;
diff --git a/code/JoinVerticesProcess.h b/code/JoinVerticesProcess.h
index a3204782a..a7366efbe 100644
--- a/code/JoinVerticesProcess.h
+++ b/code/JoinVerticesProcess.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/LWOAnimation.cpp b/code/LWOAnimation.cpp
index 4862876fc..ff02a8eab 100644
--- a/code/LWOAnimation.cpp
+++ b/code/LWOAnimation.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -164,7 +165,7 @@ void AnimResolver::UpdateAnimRangeSetup()
{
const double start_time = delta - std::fmod(my_first-first,delta);
std::vector<LWO::Key>::iterator n = std::find_if((*it).keys.begin(),(*it).keys.end(),
- std::bind1st(std::greater<double>(),start_time)),m;
+ [start_time](double t) { return start_time > t; }),m;
size_t ofs = 0;
if (n != (*it).keys.end()) {
@@ -446,8 +447,6 @@ void AnimResolver::GetKeys(std::vector<aiVectorKey>& out,
// Iterate through all three arrays at once - it's tricky, but
// rather interesting to implement.
- double lasttime = std::min(envl_x->keys[0].time,std::min(envl_y->keys[0].time,envl_z->keys[0].time));
-
cur_x = envl_x->keys.begin();
cur_y = envl_y->keys.begin();
cur_z = envl_z->keys.begin();
@@ -503,7 +502,7 @@ void AnimResolver::GetKeys(std::vector<aiVectorKey>& out,
InterpolateTrack(out,fill,(end_y ? (*cur_x) : (*cur_y)).time);
}
}
- lasttime = fill.mTime;
+ double lasttime = fill.mTime;
out.push_back(fill);
if (lasttime >= (*cur_x).time) {
diff --git a/code/LWOAnimation.h b/code/LWOAnimation.h
index f0c578ad9..f7b0f177b 100644
--- a/code/LWOAnimation.h
+++ b/code/LWOAnimation.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -112,14 +113,14 @@ enum PrePostBehaviour
// ---------------------------------------------------------------------------
/** \brief Data structure for a LWO animation keyframe
*/
-struct Key
-{
- Key()
- : time(),
- value(),
- inter (IT_LINE),
- params()
- {}
+struct Key {
+ Key() AI_NO_EXCEPT
+ : time()
+ , value()
+ , inter(IT_LINE)
+ , params() {
+ // empty
+ }
//! Current time
double time;
@@ -143,17 +144,16 @@ struct Key
// ---------------------------------------------------------------------------
/** \brief Data structure for a LWO animation envelope
*/
-struct Envelope
-{
- Envelope()
- : index()
- , type (EnvelopeType_Unknown)
- , pre (PrePostBehaviour_Constant)
- , post (PrePostBehaviour_Constant)
-
- , old_first (0)
- , old_last (0)
- {}
+struct Envelope {
+ Envelope() AI_NO_EXCEPT
+ : index()
+ , type(EnvelopeType_Unknown)
+ , pre(PrePostBehaviour_Constant)
+ , post(PrePostBehaviour_Constant)
+ , old_first(0)
+ , old_last(0) {
+ // empty
+ }
//! Index of this envelope
unsigned int index;
@@ -161,7 +161,7 @@ struct Envelope
//! Type of envelope
EnvelopeType type;
- //! Pre and post-behaviour
+ //! Pre- and post-behavior
PrePostBehaviour pre,post;
//! Keyframes for this envelope
diff --git a/code/LWOBLoader.cpp b/code/LWOBLoader.cpp
index 6a07f81a7..fabf99cad 100644
--- a/code/LWOBLoader.cpp
+++ b/code/LWOBLoader.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -73,7 +74,7 @@ void LWOImporter::LoadLWOBFile()
case AI_LWO_PNTS:
{
if (!mCurLayer->mTempPoints.empty())
- DefaultLogger::get()->warn("LWO: PNTS chunk encountered twice");
+ ASSIMP_LOG_WARN("LWO: PNTS chunk encountered twice");
else LoadLWOPoints(head.length);
break;
}
@@ -82,7 +83,7 @@ void LWOImporter::LoadLWOBFile()
{
if (!mCurLayer->mFaces.empty())
- DefaultLogger::get()->warn("LWO: POLS chunk encountered twice");
+ ASSIMP_LOG_WARN("LWO: POLS chunk encountered twice");
else LoadLWOBPolygons(head.length);
break;
}
@@ -90,7 +91,7 @@ void LWOImporter::LoadLWOBFile()
case AI_LWO_SRFS:
{
if (!mTags->empty())
- DefaultLogger::get()->warn("LWO: SRFS chunk encountered twice");
+ ASSIMP_LOG_WARN("LWO: SRFS chunk encountered twice");
else LoadLWOTags(head.length);
break;
}
@@ -182,20 +183,20 @@ void LWOImporter::CopyFaceIndicesLWOB(FaceList::iterator& it,
break;
}
face.mIndices = new unsigned int[face.mNumIndices];
- for (unsigned int i = 0; i < face.mNumIndices;++i)
- {
+ for (unsigned int i = 0; i < face.mNumIndices;++i) {
unsigned int & mi = face.mIndices[i];
uint16_t index;
::memcpy(&index, cursor++, 2);
mi = index;
if (mi > mCurLayer->mTempPoints.size())
{
- DefaultLogger::get()->warn("LWOB: face index is out of range");
+ ASSIMP_LOG_WARN("LWOB: face index is out of range");
mi = (unsigned int)mCurLayer->mTempPoints.size()-1;
}
}
+ } else {
+ ASSIMP_LOG_WARN("LWOB: Face has 0 indices");
}
- else DefaultLogger::get()->warn("LWOB: Face has 0 indices");
int16_t surface;
::memcpy(&surface, cursor++, 2);
if (surface < 0)
@@ -241,7 +242,7 @@ LWO::Texture* LWOImporter::SetupNewTextureLWOB(LWO::TextureList& list,unsigned i
else
{
// procedural or gradient, not supported
- DefaultLogger::get()->error("LWOB: Unsupported legacy texture: " + type);
+ ASSIMP_LOG_ERROR_F("LWOB: Unsupported legacy texture: ", type);
}
return tex;
@@ -272,7 +273,7 @@ void LWOImporter::LoadLWOBSurface(unsigned int size)
* how much storage is actually left and work with this value from now on.
*/
if (mFileBuffer + head.length > end) {
- DefaultLogger::get()->error("LWOB: Invalid surface chunk length. Trying to continue.");
+ ASSIMP_LOG_ERROR("LWOB: Invalid surface chunk length. Trying to continue.");
head.length = (uint16_t) (end - mFileBuffer);
}
@@ -380,8 +381,9 @@ void LWOImporter::LoadLWOBSurface(unsigned int size)
{
if (pTex) {
GetS0(pTex->mFileName,head.length);
+ } else {
+ ASSIMP_LOG_WARN("LWOB: Unexpected TIMG chunk");
}
- else DefaultLogger::get()->warn("LWOB: Unexpected TIMG chunk");
break;
}
// texture strength
@@ -390,8 +392,9 @@ void LWOImporter::LoadLWOBSurface(unsigned int size)
AI_LWO_VALIDATE_CHUNK_LENGTH(head.length,TVAL,1);
if (pTex) {
pTex->mStrength = (float)GetU1()/ 255.f;
+ } else {
+ ASSIMP_LOG_ERROR("LWOB: Unexpected TVAL chunk");
}
- else DefaultLogger::get()->warn("LWOB: Unexpected TVAL chunk");
break;
}
// texture flags
@@ -399,8 +402,7 @@ void LWOImporter::LoadLWOBSurface(unsigned int size)
{
AI_LWO_VALIDATE_CHUNK_LENGTH(head.length,TFLG,2);
- if (pTex)
- {
+ if (nullptr != pTex) {
const uint16_t s = GetU2();
if (s & 1)
pTex->majorAxis = LWO::Texture::AXIS_X;
@@ -409,10 +411,13 @@ void LWOImporter::LoadLWOBSurface(unsigned int size)
else if (s & 4)
pTex->majorAxis = LWO::Texture::AXIS_Z;
- if (s & 16)
- DefaultLogger::get()->warn("LWOB: Ignoring \'negate\' flag on texture");
+ if (s & 16) {
+ ASSIMP_LOG_WARN("LWOB: Ignoring \'negate\' flag on texture");
+ }
+ }
+ else {
+ ASSIMP_LOG_WARN("LWOB: Unexpected TFLG chunk");
}
- else DefaultLogger::get()->warn("LWOB: Unexpected TFLG chunk");
break;
}
}
diff --git a/code/LWOFileData.h b/code/LWOFileData.h
index 7fa9a216d..b3a963199 100644
--- a/code/LWOFileData.h
+++ b/code/LWOFileData.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -260,14 +261,14 @@ namespace LWO {
* \note We can't use the code in SmoothingGroups.inl here - the mesh
* structures of 3DS/ASE and LWO are too different.
*/
-struct Face : public aiFace
-{
+struct Face : public aiFace {
//! Default construction
- Face()
- : surfaceIndex (0)
- , smoothGroup (0)
- , type (AI_LWO_FACE)
- {}
+ Face() AI_NO_EXCEPT
+ : surfaceIndex( 0 )
+ , smoothGroup( 0 )
+ , type( AI_LWO_FACE ) {
+ // empty
+ }
//! Construction from given type
explicit Face(uint32_t _type)
diff --git a/code/LWOLoader.cpp b/code/LWOLoader.cpp
index 5ec07800d..fbefe4a1e 100644
--- a/code/LWOLoader.cpp
+++ b/code/LWOLoader.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -49,9 +50,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// internal headers
#include "LWOLoader.h"
-#include "StringComparison.h"
-#include "SGSpatialSort.h"
-#include "ByteSwapper.h"
+#include <assimp/StringComparison.h>
+#include <assimp/SGSpatialSort.h>
+#include <assimp/ByteSwapper.h>
#include "ProcessHelper.h"
#include "ConvertToLHProcess.h"
#include <assimp/IOSystem.hpp>
@@ -187,7 +188,7 @@ void LWOImporter::InternReadFile( const std::string& pFile,
// old lightwave file format (prior to v6)
if (AI_LWO_FOURCC_LWOB == fileType) {
- DefaultLogger::get()->info("LWO file format: LWOB (<= LightWave 5.5)");
+ ASSIMP_LOG_INFO("LWO file format: LWOB (<= LightWave 5.5)");
mIsLWO2 = false;
mIsLXOB = false;
@@ -196,12 +197,12 @@ void LWOImporter::InternReadFile( const std::string& pFile,
// New lightwave format
else if (AI_LWO_FOURCC_LWO2 == fileType) {
mIsLXOB = false;
- DefaultLogger::get()->info("LWO file format: LWO2 (>= LightWave 6)");
+ ASSIMP_LOG_INFO("LWO file format: LWO2 (>= LightWave 6)");
}
// MODO file format
else if (AI_LWO_FOURCC_LXOB == fileType) {
mIsLXOB = true;
- DefaultLogger::get()->info("LWO file format: LXOB (Modo)");
+ ASSIMP_LOG_INFO("LWO file format: LXOB (Modo)");
}
// we don't know this format
else
@@ -270,7 +271,7 @@ void LWOImporter::InternReadFile( const std::string& pFile,
unsigned int idx = (*it).surfaceIndex;
if (idx >= mTags->size())
{
- DefaultLogger::get()->warn("LWO: Invalid face surface index");
+ ASSIMP_LOG_WARN("LWO: Invalid face surface index");
idx = UINT_MAX;
}
if(UINT_MAX == idx || UINT_MAX == (idx = _mMapping[idx])) {
@@ -422,7 +423,9 @@ void LWOImporter::InternReadFile( const std::string& pFile,
// So we use a separate implementation.
ComputeNormals(mesh,smoothingGroups,_mSurfaces[i]);
}
- else DefaultLogger::get()->debug("LWO2: No need to compute normals, they're already there");
+ else {
+ ASSIMP_LOG_DEBUG("LWO2: No need to compute normals, they're already there");
+ }
++p;
}
}
@@ -431,7 +434,6 @@ void LWOImporter::InternReadFile( const std::string& pFile,
unsigned int num = static_cast<unsigned int>(apcMeshes.size() - meshStart);
if (layer.mName != "<LWODefault>" || num > 0) {
aiNode* pcNode = new aiNode();
- apcNodes[layer.mIndex] = pcNode;
pcNode->mName.Set(layer.mName);
pcNode->mParent = (aiNode*)&layer;
pcNode->mNumMeshes = num;
@@ -441,6 +443,7 @@ void LWOImporter::InternReadFile( const std::string& pFile,
for (unsigned int p = 0; p < pcNode->mNumMeshes;++p)
pcNode->mMeshes[p] = p + meshStart;
}
+ apcNodes[layer.mIndex] = pcNode;
}
}
@@ -583,7 +586,7 @@ void LWOImporter::GenerateNodeGraph(std::map<uint16_t,aiNode*>& apcNodes)
//Set parent of all children, inserting pivots
//std::cout << "Set parent of all children" << std::endl;
std::map<uint16_t, aiNode*> mapPivot;
- for (std::map<uint16_t,aiNode*>::iterator itapcNodes = apcNodes.begin(); itapcNodes != apcNodes.end(); ++itapcNodes) {
+ for (auto itapcNodes = apcNodes.begin(); itapcNodes != apcNodes.end(); ++itapcNodes) {
//Get the parent index
LWO::Layer* nodeLayer = (LWO::Layer*)(itapcNodes->second->mParent);
@@ -592,7 +595,6 @@ void LWOImporter::GenerateNodeGraph(std::map<uint16_t,aiNode*>& apcNodes)
//Create pivot node, store it into the pivot map, and set the parent as the pivot
aiNode* pivotNode = new aiNode();
pivotNode->mName.Set("Pivot-"+std::string(itapcNodes->second->mName.data));
- mapPivot[-(itapcNodes->first+2)] = pivotNode;
itapcNodes->second->mParent = pivotNode;
//Look for the parent node to attach the pivot to
@@ -610,18 +612,19 @@ void LWOImporter::GenerateNodeGraph(std::map<uint16_t,aiNode*>& apcNodes)
pivotNode->mTransformation.a4 = nodeLayer->mPivot.x;
pivotNode->mTransformation.b4 = nodeLayer->mPivot.y;
pivotNode->mTransformation.c4 = nodeLayer->mPivot.z;
+ mapPivot[-(itapcNodes->first+2)] = pivotNode;
}
//Merge pivot map into node map
//std::cout << "Merge pivot map into node map" << std::endl;
- for (std::map<uint16_t, aiNode*>::iterator itMapPivot = mapPivot.begin(); itMapPivot != mapPivot.end(); ++itMapPivot) {
+ for (auto itMapPivot = mapPivot.begin(); itMapPivot != mapPivot.end(); ++itMapPivot) {
apcNodes[itMapPivot->first] = itMapPivot->second;
}
//Set children of all parents
apcNodes[-1] = root;
- for (std::map<uint16_t,aiNode*>::iterator itMapParentNodes = apcNodes.begin(); itMapParentNodes != apcNodes.end(); ++itMapParentNodes) {
- for (std::map<uint16_t,aiNode*>::iterator itMapChildNodes = apcNodes.begin(); itMapChildNodes != apcNodes.end(); ++itMapChildNodes) {
+ for (auto itMapParentNodes = apcNodes.begin(); itMapParentNodes != apcNodes.end(); ++itMapParentNodes) {
+ for (auto itMapChildNodes = apcNodes.begin(); itMapChildNodes != apcNodes.end(); ++itMapChildNodes) {
if ((itMapParentNodes->first != itMapChildNodes->first) && (itMapParentNodes->second == itMapChildNodes->second->mParent)) {
++(itMapParentNodes->second->mNumChildren);
}
@@ -629,7 +632,7 @@ void LWOImporter::GenerateNodeGraph(std::map<uint16_t,aiNode*>& apcNodes)
if (itMapParentNodes->second->mNumChildren) {
itMapParentNodes->second->mChildren = new aiNode* [ itMapParentNodes->second->mNumChildren ];
uint16_t p = 0;
- for (std::map<uint16_t,aiNode*>::iterator itMapChildNodes = apcNodes.begin(); itMapChildNodes != apcNodes.end(); ++itMapChildNodes) {
+ for (auto itMapChildNodes = apcNodes.begin(); itMapChildNodes != apcNodes.end(); ++itMapChildNodes) {
if ((itMapParentNodes->first != itMapChildNodes->first) && (itMapParentNodes->second == itMapChildNodes->second->mParent)) {
itMapParentNodes->second->mChildren[p++] = itMapChildNodes->second;
}
@@ -685,13 +688,13 @@ void LWOImporter::ResolveClips()
if (Clip::REF == clip.type) {
if (clip.clipRef >= mClips.size()) {
- DefaultLogger::get()->error("LWO2: Clip referrer index is out of range");
+ ASSIMP_LOG_ERROR("LWO2: Clip referrer index is out of range");
clip.clipRef = 0;
}
Clip& dest = mClips[clip.clipRef];
if (Clip::REF == dest.type) {
- DefaultLogger::get()->error("LWO2: Clip references another clip reference");
+ ASSIMP_LOG_ERROR("LWO2: Clip references another clip reference");
clip.type = Clip::UNSUPPORTED;
}
@@ -710,7 +713,7 @@ void LWOImporter::AdjustTexturePath(std::string& out)
if (!mIsLWO2 && ::strstr(out.c_str(), "(sequence)")) {
// remove the (sequence) and append 000
- DefaultLogger::get()->info("LWOB: Sequence of animated texture found. It will be ignored");
+ ASSIMP_LOG_INFO("LWOB: Sequence of animated texture found. It will be ignored");
out = out.substr(0,out.length()-10) + "000";
}
@@ -785,10 +788,10 @@ void LWOImporter::LoadLWO2Polygons(unsigned int length)
{
// read unsupported stuff too (although we won't process it)
case AI_LWO_MBAL:
- DefaultLogger::get()->warn("LWO2: Encountered unsupported primitive chunk (METABALL)");
+ ASSIMP_LOG_WARN("LWO2: Encountered unsupported primitive chunk (METABALL)");
break;
case AI_LWO_CURV:
- DefaultLogger::get()->warn("LWO2: Encountered unsupported primitive chunk (SPLINE)");;
+ ASSIMP_LOG_WARN("LWO2: Encountered unsupported primitive chunk (SPLINE)");;
break;
// These are ok with no restrictions
@@ -800,7 +803,7 @@ void LWOImporter::LoadLWO2Polygons(unsigned int length)
default:
// hm!? wtf is this? ok ...
- DefaultLogger::get()->error("LWO2: Ignoring unknown polygon type.");
+ ASSIMP_LOG_ERROR("LWO2: Ignoring unknown polygon type.");
break;
}
@@ -863,7 +866,7 @@ void LWOImporter::CopyFaceIndicesLWO2(FaceList::iterator& it,
face.mIndices[i] = ReadVSizedIntLWO2((uint8_t*&)cursor) + mCurLayer->mPointIDXOfs;
if(face.mIndices[i] > mCurLayer->mTempPoints.size())
{
- DefaultLogger::get()->warn("LWO2: Failure evaluating face record, index is out of range");
+ ASSIMP_LOG_WARN("LWO2: Failure evaluating face record, index is out of range");
face.mIndices[i] = (unsigned int)mCurLayer->mTempPoints.size()-1;
}
}
@@ -890,7 +893,7 @@ void LWOImporter::LoadLWO2PolygonTags(unsigned int length)
unsigned int j = GetU2();
if (i >= mCurLayer->mFaces.size()) {
- DefaultLogger::get()->warn("LWO2: face index in PTAG is out of range");
+ ASSIMP_LOG_WARN("LWO2: face index in PTAG is out of range");
continue;
}
@@ -913,7 +916,7 @@ VMapEntry* FindEntry(std::vector< T >& list,const std::string& name, bool perPol
for (auto & elem : list) {
if (elem.name == name) {
if (!perPoly) {
- DefaultLogger::get()->warn("LWO2: Found two VMAP sections with equal names");
+ ASSIMP_LOG_WARN("LWO2: Found two VMAP sections with equal names");
}
return &elem;
}
@@ -998,7 +1001,7 @@ void LWOImporter::LoadLWO2VertexMap(unsigned int length, bool perPoly)
{
case AI_LWO_TXUV:
if (dims != 2) {
- DefaultLogger::get()->warn("LWO2: Skipping UV channel \'"
+ ASSIMP_LOG_WARN("LWO2: Skipping UV channel \'"
+ name + "\' with !2 components");
return;
}
@@ -1007,7 +1010,7 @@ void LWOImporter::LoadLWO2VertexMap(unsigned int length, bool perPoly)
case AI_LWO_WGHT:
case AI_LWO_MNVW:
if (dims != 1) {
- DefaultLogger::get()->warn("LWO2: Skipping Weight Channel \'"
+ ASSIMP_LOG_WARN("LWO2: Skipping Weight Channel \'"
+ name + "\' with !1 components");
return;
}
@@ -1017,7 +1020,7 @@ void LWOImporter::LoadLWO2VertexMap(unsigned int length, bool perPoly)
case AI_LWO_RGB:
case AI_LWO_RGBA:
if (dims != 3 && dims != 4) {
- DefaultLogger::get()->warn("LWO2: Skipping Color Map \'"
+ ASSIMP_LOG_WARN("LWO2: Skipping Color Map \'"
+ name + "\' with a dimension > 4 or < 3");
return;
}
@@ -1032,7 +1035,7 @@ void LWOImporter::LoadLWO2VertexMap(unsigned int length, bool perPoly)
if (name != "vert_normals" || dims != 3 || mCurLayer->mNormals.name.length())
return;
- DefaultLogger::get()->info("Processing non-standard extension: MODO VMAP.NORM.vert_normals");
+ ASSIMP_LOG_INFO("Processing non-standard extension: MODO VMAP.NORM.vert_normals");
mCurLayer->mNormals.name = name;
base = & mCurLayer->mNormals;
@@ -1047,7 +1050,7 @@ void LWOImporter::LoadLWO2VertexMap(unsigned int length, bool perPoly)
if (name == "APS.Level") {
// XXX handle this (seems to be subdivision-related).
}
- DefaultLogger::get()->warn("LWO2: Skipping unknown VMAP/VMAD channel \'" + name + "\'");
+ ASSIMP_LOG_WARN_F("LWO2: Skipping unknown VMAP/VMAD channel \'", name, "\'");
return;
};
base->Allocate((unsigned int)mCurLayer->mTempPoints.size());
@@ -1067,7 +1070,7 @@ void LWOImporter::LoadLWO2VertexMap(unsigned int length, bool perPoly)
unsigned int idx = ReadVSizedIntLWO2(mFileBuffer) + mCurLayer->mPointIDXOfs;
if (idx >= numPoints) {
- DefaultLogger::get()->warn("LWO2: Failure evaluating VMAP/VMAD entry \'" + name + "\', vertex index is out of range");
+ ASSIMP_LOG_WARN_F("LWO2: Failure evaluating VMAP/VMAD entry \'", name, "\', vertex index is out of range");
mFileBuffer += base->dims<<2u;
continue;
}
@@ -1077,7 +1080,7 @@ void LWOImporter::LoadLWO2VertexMap(unsigned int length, bool perPoly)
// we have already a VMAP entry for this vertex - thus
// we need to duplicate the corresponding polygon.
if (polyIdx >= numFaces) {
- DefaultLogger::get()->warn("LWO2: Failure evaluating VMAD entry \'" + name + "\', polygon index is out of range");
+ ASSIMP_LOG_WARN_F("LWO2: Failure evaluating VMAD entry \'", name, "\', polygon index is out of range");
mFileBuffer += base->dims<<2u;
continue;
}
@@ -1118,7 +1121,7 @@ void LWOImporter::LoadLWO2VertexMap(unsigned int length, bool perPoly)
CreateNewEntry(mCurLayer->mNormals, srcIdx );
}
if (!had) {
- DefaultLogger::get()->warn("LWO2: Failure evaluating VMAD entry \'" + name + "\', vertex index wasn't found in that polygon");
+ ASSIMP_LOG_WARN_F("LWO2: Failure evaluating VMAD entry \'", name, "\', vertex index wasn't found in that polygon");
ai_assert(had);
}
}
@@ -1179,11 +1182,11 @@ void LWOImporter::LoadLWO2Clip(unsigned int length)
break;
case AI_LWO_STCC:
- DefaultLogger::get()->warn("LWO2: Color shifted images are not supported");
+ ASSIMP_LOG_WARN("LWO2: Color shifted images are not supported");
break;
case AI_LWO_ANIM:
- DefaultLogger::get()->warn("LWO2: Animated textures are not supported");
+ ASSIMP_LOG_WARN("LWO2: Animated textures are not supported");
break;
case AI_LWO_XREF:
@@ -1200,7 +1203,7 @@ void LWOImporter::LoadLWO2Clip(unsigned int length)
break;
default:
- DefaultLogger::get()->warn("LWO2: Encountered unknown CLIP subchunk");
+ ASSIMP_LOG_WARN("LWO2: Encountered unknown CLIP sub-chunk");
}
}
@@ -1281,7 +1284,7 @@ void LWOImporter::LoadLWO2Envelope(unsigned int length)
{
AI_LWO_VALIDATE_CHUNK_LENGTH(head.length,SPAN,4);
if (envelope.keys.size()<2)
- DefaultLogger::get()->warn("LWO2: Unexpected SPAN chunk");
+ ASSIMP_LOG_WARN("LWO2: Unexpected SPAN chunk");
else {
LWO::Key& key = envelope.keys.back();
switch (GetU4())
@@ -1299,7 +1302,7 @@ void LWOImporter::LoadLWO2Envelope(unsigned int length)
case AI_LWO_BEZ2:
key.inter = LWO::IT_BEZ2;break;
default:
- DefaultLogger::get()->warn("LWO2: Unknown interval interpolation mode");
+ ASSIMP_LOG_WARN("LWO2: Unknown interval interpolation mode");
};
// todo ... read params
@@ -1308,7 +1311,8 @@ void LWOImporter::LoadLWO2Envelope(unsigned int length)
}
default:
- DefaultLogger::get()->warn("LWO2: Encountered unknown ENVL subchunk");
+ ASSIMP_LOG_WARN("LWO2: Encountered unknown ENVL subchunk");
+ break;
}
// regardless how much we did actually read, go to the next chunk
mFileBuffer = next;
@@ -1407,7 +1411,7 @@ void LWOImporter::LoadLWO2File()
case AI_LWO_VMAD:
if (mCurLayer->mFaces.empty())
{
- DefaultLogger::get()->warn("LWO2: Unexpected VMAD chunk");
+ ASSIMP_LOG_WARN("LWO2: Unexpected VMAD chunk");
break;
}
// --- intentionally no break here
@@ -1417,7 +1421,7 @@ void LWOImporter::LoadLWO2File()
break;
if (mCurLayer->mTempPoints.empty())
- DefaultLogger::get()->warn("LWO2: Unexpected VMAP chunk");
+ ASSIMP_LOG_WARN("LWO2: Unexpected VMAP chunk");
else LoadLWO2VertexMap(head.length,head.type == AI_LWO_VMAD);
break;
}
@@ -1438,17 +1442,21 @@ void LWOImporter::LoadLWO2File()
if (skip)
break;
- if (mCurLayer->mFaces.empty())
- DefaultLogger::get()->warn("LWO2: Unexpected PTAG");
- else LoadLWO2PolygonTags(head.length);
+ if (mCurLayer->mFaces.empty()) {
+ ASSIMP_LOG_WARN("LWO2: Unexpected PTAG");
+ } else {
+ LoadLWO2PolygonTags(head.length);
+ }
break;
}
// list of tags
case AI_LWO_TAGS:
{
- if (!mTags->empty())
- DefaultLogger::get()->warn("LWO2: SRFS chunk encountered twice");
- else LoadLWOTags(head.length);
+ if (!mTags->empty()) {
+ ASSIMP_LOG_WARN("LWO2: SRFS chunk encountered twice");
+ } else {
+ LoadLWOTags(head.length);
+ }
break;
}
diff --git a/code/LWOLoader.h b/code/LWOLoader.h
index b92e5aab4..4d42eb2d2 100644
--- a/code/LWOLoader.h
+++ b/code/LWOLoader.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -48,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/DefaultLogger.hpp>
#include "LWOFileData.h"
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
#include <map>
@@ -472,7 +473,7 @@ inline void LWOImporter::GetS0(std::string& out,unsigned int max)
{
if (++iCursor > max)
{
- DefaultLogger::get()->warn("LWO: Invalid file, string is is too long");
+ ASSIMP_LOG_WARN("LWO: Invalid file, string is is too long");
break;
}
++mFileBuffer;
diff --git a/code/LWOMaterial.cpp b/code/LWOMaterial.cpp
index e2ba894af..15c210460 100644
--- a/code/LWOMaterial.cpp
+++ b/code/LWOMaterial.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -48,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// internal headers
#include "LWOLoader.h"
-#include "ByteSwapper.h"
+#include <assimp/ByteSwapper.h>
using namespace Assimp;
@@ -73,7 +74,7 @@ inline aiTextureMapMode GetMapMode(LWO::Texture::Wrap in)
return aiTextureMapMode_Mirror;
case LWO::Texture::RESET:
- DefaultLogger::get()->warn("LWO2: Unsupported texture map mode: RESET");
+ ASSIMP_LOG_WARN("LWO2: Unsupported texture map mode: RESET");
// fall though here
case LWO::Texture::EDGE:
@@ -116,7 +117,7 @@ bool LWOImporter::HandleTextures(aiMaterial* pcMat, const TextureList& in, aiTex
mapping = aiTextureMapping_BOX;
break;
case LWO::Texture::FrontProjection:
- DefaultLogger::get()->error("LWO2: Unsupported texture mapping: FrontProjection");
+ ASSIMP_LOG_ERROR("LWO2: Unsupported texture mapping: FrontProjection");
mapping = aiTextureMapping_OTHER;
break;
case LWO::Texture::UV:
@@ -163,7 +164,7 @@ bool LWOImporter::HandleTextures(aiMaterial* pcMat, const TextureList& in, aiTex
static_assert(sizeof(aiUVTransform)/sizeof(ai_real) == 5, "sizeof(aiUVTransform)/sizeof(ai_real) == 5");
pcMat->AddProperty(&trafo,1,AI_MATKEY_UVTRANSFORM(type,cur));
}
- DefaultLogger::get()->debug("LWO2: Setting up non-UV mapping");
+ ASSIMP_LOG_DEBUG("LWO2: Setting up non-UV mapping");
}
// The older LWOB format does not use indirect references to clips.
@@ -180,7 +181,7 @@ bool LWOImporter::HandleTextures(aiMaterial* pcMat, const TextureList& in, aiTex
}
if (candidate == end) {
- DefaultLogger::get()->error("LWO2: Clip index is out of bounds");
+ ASSIMP_LOG_ERROR("LWO2: Clip index is out of bounds");
temp = 0;
// fixme: apparently some LWO files shipping with Doom3 don't
@@ -193,7 +194,7 @@ bool LWOImporter::HandleTextures(aiMaterial* pcMat, const TextureList& in, aiTex
}
else {
if (Clip::UNSUPPORTED == (*candidate).type) {
- DefaultLogger::get()->error("LWO2: Clip type is not supported");
+ ASSIMP_LOG_ERROR("LWO2: Clip type is not supported");
continue;
}
AdjustTexturePath((*candidate).path);
@@ -211,7 +212,7 @@ bool LWOImporter::HandleTextures(aiMaterial* pcMat, const TextureList& in, aiTex
{
std::string ss = texture.mFileName;
if (!ss.length()) {
- DefaultLogger::get()->error("LWOB: Empty file name");
+ ASSIMP_LOG_WARN("LWOB: Empty file name");
continue;
}
AdjustTexturePath(ss);
@@ -245,14 +246,15 @@ bool LWOImporter::HandleTextures(aiMaterial* pcMat, const TextureList& in, aiTex
default:
temp = (unsigned int)aiTextureOp_Multiply;
- DefaultLogger::get()->warn("LWO2: Unsupported texture blend mode: alpha or displacement");
+ ASSIMP_LOG_WARN("LWO2: Unsupported texture blend mode: alpha or displacement");
}
// Setup texture operation
pcMat->AddProperty<int>((int*)&temp,1,AI_MATKEY_TEXOP(type,cur));
// setup the mapping mode
- pcMat->AddProperty<int>((int*)&mapping,1,AI_MATKEY_MAPPING(type,cur));
+ int mapping_ = static_cast<int>(mapping);
+ pcMat->AddProperty<int>(&mapping_, 1, AI_MATKEY_MAPPING(type, cur));
// add the u-wrapping
temp = (unsigned int)GetMapMode(texture.wrapModeWidth);
@@ -346,25 +348,26 @@ void LWOImporter::ConvertMaterial(const LWO::Surface& surf,aiMaterial* pcMat)
// the surface and search for a name which we know ...
for (const auto &shader : surf.mShaders) {
if (shader.functionName == "LW_SuperCelShader" || shader.functionName == "AH_CelShader") {
- DefaultLogger::get()->info("LWO2: Mapping LW_SuperCelShader/AH_CelShader to aiShadingMode_Toon");
+ ASSIMP_LOG_INFO("LWO2: Mapping LW_SuperCelShader/AH_CelShader to aiShadingMode_Toon");
m = aiShadingMode_Toon;
break;
}
else if (shader.functionName == "LW_RealFresnel" || shader.functionName == "LW_FastFresnel") {
- DefaultLogger::get()->info("LWO2: Mapping LW_RealFresnel/LW_FastFresnel to aiShadingMode_Fresnel");
+ ASSIMP_LOG_INFO("LWO2: Mapping LW_RealFresnel/LW_FastFresnel to aiShadingMode_Fresnel");
m = aiShadingMode_Fresnel;
break;
}
else
{
- DefaultLogger::get()->warn("LWO2: Unknown surface shader: " + shader.functionName);
+ ASSIMP_LOG_WARN_F("LWO2: Unknown surface shader: ", shader.functionName);
}
}
if (surf.mMaximumSmoothAngle <= 0.0)
m = aiShadingMode_Flat;
- pcMat->AddProperty((int*)&m,1,AI_MATKEY_SHADING_MODEL);
+ int m_ = static_cast<int>(m);
+ pcMat->AddProperty(&m_, 1, AI_MATKEY_SHADING_MODEL);
// (the diffuse value is just a scaling factor)
// If a diffuse texture is set, we set this value to 1.0
@@ -397,7 +400,7 @@ char LWOImporter::FindUVChannels(LWO::TextureList& list,
}
else {
// channel mismatch. need to duplicate the material.
- DefaultLogger::get()->warn("LWO: Channel mismatch, would need to duplicate surface [design bug]");
+ ASSIMP_LOG_WARN("LWO: Channel mismatch, would need to duplicate surface [design bug]");
// TODO
}
@@ -428,7 +431,7 @@ void LWOImporter::FindUVChannels(LWO::Surface& surf,
if (extra >= AI_MAX_NUMBER_OF_TEXTURECOORDS) {
- DefaultLogger::get()->error("LWO: Maximum number of UV channels for "
+ ASSIMP_LOG_ERROR("LWO: Maximum number of UV channels for "
"this mesh reached. Skipping channel \'" + uv.name + "\'");
}
@@ -483,7 +486,7 @@ void LWOImporter::FindVCChannels(const LWO::Surface& surf, LWO::SortedRep& sorte
const LWO::VColorChannel& vc = layer.mVColorChannels[i];
if (surf.mVCMap == vc.name) {
- // The vertex color map is explicitely requested by the surface so we need to take special care of it
+ // The vertex color map is explicitly requested by the surface so we need to take special care of it
for (unsigned int a = 0; a < std::min(next,AI_MAX_NUMBER_OF_COLOR_SETS-1u); ++a) {
out[a+1] = out[a];
}
@@ -501,7 +504,7 @@ void LWOImporter::FindVCChannels(const LWO::Surface& surf, LWO::SortedRep& sorte
if (vc.abAssigned[idx] && ((aiColor4D*)&vc.rawData[0])[idx] != aiColor4D(0.0,0.0,0.0,1.0)) {
if (next >= AI_MAX_NUMBER_OF_COLOR_SETS) {
- DefaultLogger::get()->error("LWO: Maximum number of vertex color channels for "
+ ASSIMP_LOG_ERROR("LWO: Maximum number of vertex color channels for "
"this mesh reached. Skipping channel \'" + vc.name + "\'");
}
@@ -566,7 +569,7 @@ void LWOImporter::LoadLWO2ImageMap(unsigned int size, LWO::Texture& tex )
void LWOImporter::LoadLWO2Procedural(unsigned int /*size*/, LWO::Texture& tex )
{
// --- not supported at the moment
- DefaultLogger::get()->error("LWO2: Found procedural texture, this is not supported");
+ ASSIMP_LOG_ERROR("LWO2: Found procedural texture, this is not supported");
tex.bCanUse = false;
}
@@ -574,7 +577,7 @@ void LWOImporter::LoadLWO2Procedural(unsigned int /*size*/, LWO::Texture& tex )
void LWOImporter::LoadLWO2Gradient(unsigned int /*size*/, LWO::Texture& tex )
{
// --- not supported at the moment
- DefaultLogger::get()->error("LWO2: Found gradient texture, this is not supported");
+ ASSIMP_LOG_ERROR("LWO2: Found gradient texture, this is not supported");
tex.bCanUse = false;
}
@@ -589,7 +592,7 @@ void LWOImporter::LoadLWO2TextureHeader(unsigned int size, LWO::Texture& tex )
// we could crash later if this is an empty string ...
if (!tex.ordinal.length())
{
- DefaultLogger::get()->error("LWO2: Ill-formed SURF.BLOK ordinal string");
+ ASSIMP_LOG_ERROR("LWO2: Ill-formed SURF.BLOK ordinal string");
tex.ordinal = "\x00";
}
while (true)
@@ -661,7 +664,7 @@ void LWOImporter::LoadLWO2TextureBlock(LE_NCONST IFF::SubChunkHeader* head, unsi
case AI_LWO_REFL:
listRef = &surf.mReflectionTextures;break;
default:
- DefaultLogger::get()->warn("LWO2: Encountered unknown texture type");
+ ASSIMP_LOG_WARN("LWO2: Encountered unknown texture type");
return;
}
@@ -690,7 +693,7 @@ void LWOImporter::LoadLWO2ShaderBlock(LE_NCONST IFF::SubChunkHeader* /*head*/, u
// we could crash later if this is an empty string ...
if (!shader.ordinal.length())
{
- DefaultLogger::get()->error("LWO2: Ill-formed SURF.BLOK ordinal string");
+ ASSIMP_LOG_ERROR("LWO2: Ill-formed SURF.BLOK ordinal string");
shader.ordinal = "\x00";
}
@@ -749,7 +752,7 @@ void LWOImporter::LoadLWO2Surface(unsigned int size)
}
}
if (derived.size())
- DefaultLogger::get()->warn("LWO2: Unable to find source surface: " + derived);
+ ASSIMP_LOG_WARN("LWO2: Unable to find source surface: " + derived);
}
while (true)
@@ -885,7 +888,7 @@ void LWOImporter::LoadLWO2Surface(unsigned int size)
break;
default:
- DefaultLogger::get()->warn("LWO2: Found an unsupported surface BLOK");
+ ASSIMP_LOG_WARN("LWO2: Found an unsupported surface BLOK");
};
break;
diff --git a/code/LWSLoader.cpp b/code/LWSLoader.cpp
index 302228556..6f8cbe78d 100644
--- a/code/LWSLoader.cpp
+++ b/code/LWSLoader.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -48,12 +49,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_NO_LWS_IMPORTER
#include "LWSLoader.h"
-#include "ParsingUtils.h"
-#include "fast_atof.h"
+#include <assimp/ParsingUtils.h>
+#include <assimp/fast_atof.h>
#include <assimp/SceneCombiner.h>
-#include "GenericProperty.h"
-#include "SkeletonMeshBuilder.h"
+#include <assimp/GenericProperty.h>
+#include <assimp/SkeletonMeshBuilder.h>
#include "ConvertToLHProcess.h"
#include "Importer.h"
#include <assimp/DefaultLogger.hpp>
@@ -104,7 +105,7 @@ void LWS::Element::Parse (const char*& buffer)
if (children.back().tokens[0] == "Plugin")
{
- DefaultLogger::get()->debug("LWS: Skipping over plugin-specific data");
+ ASSIMP_LOG_DEBUG("LWS: Skipping over plugin-specific data");
// strange stuff inside Plugin/Endplugin blocks. Needn't
// follow LWS syntax, so we skip over it
@@ -199,7 +200,7 @@ void LWSImporter::SetupProperties(const Importer* pImp)
void LWSImporter::ReadEnvelope(const LWS::Element& dad, LWO::Envelope& fill )
{
if (dad.children.empty()) {
- DefaultLogger::get()->error("LWS: Envelope descriptions must not be empty");
+ ASSIMP_LOG_ERROR("LWS: Envelope descriptions must not be empty");
return;
}
@@ -247,7 +248,7 @@ void LWSImporter::ReadEnvelope(const LWS::Element& dad, LWO::Envelope& fill )
num = 4;
break;
default:
- DefaultLogger::get()->error("LWS: Unknown span type");
+ ASSIMP_LOG_ERROR("LWS: Unknown span type");
}
for (unsigned int i = 0; i < num;++i) {
SkipSpaces(&c);
@@ -304,7 +305,7 @@ void LWSImporter::ReadEnvelope_Old(
return;
unexpected_end:
- DefaultLogger::get()->error("LWS: Encountered unexpected end of file while parsing object motion");
+ ASSIMP_LOG_ERROR("LWS: Encountered unexpected end of file while parsing object motion");
}
// ------------------------------------------------------------------------------------------------
@@ -351,7 +352,7 @@ void LWSImporter::BuildGraph(aiNode* nd, LWS::NodeDesc& src, std::vector<Attachm
if (src.path.length() ) {
obj = batch.GetImport(src.id);
if (!obj) {
- DefaultLogger::get()->error("LWS: Failed to read external file " + src.path);
+ ASSIMP_LOG_ERROR("LWS: Failed to read external file " + src.path);
}
else {
if (obj->mRootNode->mNumChildren == 1) {
@@ -409,7 +410,7 @@ void LWSImporter::BuildGraph(aiNode* nd, LWS::NodeDesc& src, std::vector<Attachm
// name to attach light to node -> unique due to LWs indexing system
lit->mName = nd->mName;
- // detemine light type and setup additional members
+ // determine light type and setup additional members
if (src.lightType == 2) { /* spot light */
lit->mType = aiLightSource_SPOT;
@@ -471,7 +472,7 @@ void LWSImporter::BuildGraph(aiNode* nd, LWS::NodeDesc& src, std::vector<Attachm
// Determine the exact location of a LWO file
std::string LWSImporter::FindLWOFile(const std::string& in)
{
- // insert missing directory seperator if necessary
+ // insert missing directory separator if necessary
std::string tmp;
if (in.length() > 3 && in[1] == ':'&& in[2] != '\\' && in[2] != '/')
{
@@ -550,7 +551,7 @@ void LWSImporter::InternReadFile( const std::string& pFile, aiScene* pScene,
// get file format version and print to log
++it;
unsigned int version = strtoul10((*it).tokens[0].c_str());
- DefaultLogger::get()->info("LWS file format version is " + (*it).tokens[0]);
+ ASSIMP_LOG_INFO("LWS file format version is " + (*it).tokens[0]);
first = 0.;
last = 60.;
fps = 25.; /* seems to be a good default frame rate */
@@ -655,7 +656,7 @@ void LWSImporter::InternReadFile( const std::string& pFile, aiScene* pScene,
d.number = cur_object++;
nodes.push_back(d);
}
- else DefaultLogger::get()->error("LWS: Unexpected keyword: \'Channel\'");
+ ASSIMP_LOG_ERROR("LWS: Unexpected keyword: \'Channel\'");
}
// important: index of channel
@@ -672,7 +673,7 @@ void LWSImporter::InternReadFile( const std::string& pFile, aiScene* pScene,
// 'Envelope': a single animation channel
else if ((*it).tokens[0] == "Envelope") {
if (nodes.empty() || nodes.back().channels.empty())
- DefaultLogger::get()->error("LWS: Unexpected keyword: \'Envelope\'");
+ ASSIMP_LOG_ERROR("LWS: Unexpected keyword: \'Envelope\'");
else {
ReadEnvelope((*it),nodes.back().channels.back());
}
@@ -683,7 +684,7 @@ void LWSImporter::InternReadFile( const std::string& pFile, aiScene* pScene,
(*it).tokens[0] == "LightMotion")) {
if (nodes.empty())
- DefaultLogger::get()->error("LWS: Unexpected keyword: \'<Light|Object|Camera>Motion\'");
+ ASSIMP_LOG_ERROR("LWS: Unexpected keyword: \'<Light|Object|Camera>Motion\'");
else {
ReadEnvelope_Old(it,root.children.end(),nodes.back(),version);
}
@@ -691,7 +692,7 @@ void LWSImporter::InternReadFile( const std::string& pFile, aiScene* pScene,
// 'Pre/PostBehavior': pre/post animation behaviour for LWSC 2
else if (version == 2 && (*it).tokens[0] == "Pre/PostBehavior") {
if (nodes.empty())
- DefaultLogger::get()->error("LWS: Unexpected keyword: \'Pre/PostBehavior'");
+ ASSIMP_LOG_ERROR("LWS: Unexpected keyword: \'Pre/PostBehavior'");
else {
for (std::list<LWO::Envelope>::iterator it = nodes.back().channels.begin(); it != nodes.back().channels.end(); ++it) {
// two ints per envelope
@@ -704,14 +705,14 @@ void LWSImporter::InternReadFile( const std::string& pFile, aiScene* pScene,
// 'ParentItem': specifies the parent of the current element
else if ((*it).tokens[0] == "ParentItem") {
if (nodes.empty())
- DefaultLogger::get()->error("LWS: Unexpected keyword: \'ParentItem\'");
+ ASSIMP_LOG_ERROR("LWS: Unexpected keyword: \'ParentItem\'");
else nodes.back().parent = strtoul16(c,&c);
}
// 'ParentObject': deprecated one for older formats
else if (version < 3 && (*it).tokens[0] == "ParentObject") {
if (nodes.empty())
- DefaultLogger::get()->error("LWS: Unexpected keyword: \'ParentObject\'");
+ ASSIMP_LOG_ERROR("LWS: Unexpected keyword: \'ParentObject\'");
else {
nodes.back().parent = strtoul10(c,&c) | (1u << 28u);
@@ -735,7 +736,7 @@ void LWSImporter::InternReadFile( const std::string& pFile, aiScene* pScene,
// 'CameraName': set name of currently active camera
else if ((*it).tokens[0] == "CameraName") {
if (nodes.empty() || nodes.back().type != LWS::NodeDesc::CAMERA)
- DefaultLogger::get()->error("LWS: Unexpected keyword: \'CameraName\'");
+ ASSIMP_LOG_ERROR("LWS: Unexpected keyword: \'CameraName\'");
else nodes.back().name = c;
}
@@ -757,14 +758,14 @@ void LWSImporter::InternReadFile( const std::string& pFile, aiScene* pScene,
// 'LightName': set name of currently active light
else if ((*it).tokens[0] == "LightName") {
if (nodes.empty() || nodes.back().type != LWS::NodeDesc::LIGHT)
- DefaultLogger::get()->error("LWS: Unexpected keyword: \'LightName\'");
+ ASSIMP_LOG_ERROR("LWS: Unexpected keyword: \'LightName\'");
else nodes.back().name = c;
}
// 'LightIntensity': set intensity of currently active light
else if ((*it).tokens[0] == "LightIntensity" || (*it).tokens[0] == "LgtIntensity" ) {
if (nodes.empty() || nodes.back().type != LWS::NodeDesc::LIGHT)
- DefaultLogger::get()->error("LWS: Unexpected keyword: \'LightIntensity\'");
+ ASSIMP_LOG_ERROR("LWS: Unexpected keyword: \'LightIntensity\'");
else fast_atoreal_move<float>(c, nodes.back().lightIntensity );
@@ -772,7 +773,7 @@ void LWSImporter::InternReadFile( const std::string& pFile, aiScene* pScene,
// 'LightType': set type of currently active light
else if ((*it).tokens[0] == "LightType") {
if (nodes.empty() || nodes.back().type != LWS::NodeDesc::LIGHT)
- DefaultLogger::get()->error("LWS: Unexpected keyword: \'LightType\'");
+ ASSIMP_LOG_ERROR("LWS: Unexpected keyword: \'LightType\'");
else nodes.back().lightType = strtoul10(c);
@@ -780,7 +781,7 @@ void LWSImporter::InternReadFile( const std::string& pFile, aiScene* pScene,
// 'LightFalloffType': set falloff type of currently active light
else if ((*it).tokens[0] == "LightFalloffType") {
if (nodes.empty() || nodes.back().type != LWS::NodeDesc::LIGHT)
- DefaultLogger::get()->error("LWS: Unexpected keyword: \'LightFalloffType\'");
+ ASSIMP_LOG_ERROR("LWS: Unexpected keyword: \'LightFalloffType\'");
else nodes.back().lightFalloffType = strtoul10(c);
@@ -788,7 +789,7 @@ void LWSImporter::InternReadFile( const std::string& pFile, aiScene* pScene,
// 'LightConeAngle': set cone angle of currently active light
else if ((*it).tokens[0] == "LightConeAngle") {
if (nodes.empty() || nodes.back().type != LWS::NodeDesc::LIGHT)
- DefaultLogger::get()->error("LWS: Unexpected keyword: \'LightConeAngle\'");
+ ASSIMP_LOG_ERROR("LWS: Unexpected keyword: \'LightConeAngle\'");
else nodes.back().lightConeAngle = fast_atof(c);
@@ -796,7 +797,7 @@ void LWSImporter::InternReadFile( const std::string& pFile, aiScene* pScene,
// 'LightEdgeAngle': set area where we're smoothing from min to max intensity
else if ((*it).tokens[0] == "LightEdgeAngle") {
if (nodes.empty() || nodes.back().type != LWS::NodeDesc::LIGHT)
- DefaultLogger::get()->error("LWS: Unexpected keyword: \'LightEdgeAngle\'");
+ ASSIMP_LOG_ERROR("LWS: Unexpected keyword: \'LightEdgeAngle\'");
else nodes.back().lightEdgeAngle = fast_atof(c);
@@ -804,7 +805,7 @@ void LWSImporter::InternReadFile( const std::string& pFile, aiScene* pScene,
// 'LightColor': set color of currently active light
else if ((*it).tokens[0] == "LightColor") {
if (nodes.empty() || nodes.back().type != LWS::NodeDesc::LIGHT)
- DefaultLogger::get()->error("LWS: Unexpected keyword: \'LightColor\'");
+ ASSIMP_LOG_ERROR("LWS: Unexpected keyword: \'LightColor\'");
else {
c = fast_atoreal_move<float>(c, (float&) nodes.back().lightColor.r );
@@ -818,7 +819,7 @@ void LWSImporter::InternReadFile( const std::string& pFile, aiScene* pScene,
// 'PivotPosition': position of local transformation origin
else if ((*it).tokens[0] == "PivotPosition" || (*it).tokens[0] == "PivotPoint") {
if (nodes.empty())
- DefaultLogger::get()->error("LWS: Unexpected keyword: \'PivotPosition\'");
+ ASSIMP_LOG_ERROR("LWS: Unexpected keyword: \'PivotPosition\'");
else {
c = fast_atoreal_move<float>(c, (float&) nodes.back().pivotPos.x );
SkipSpaces(&c);
@@ -839,7 +840,7 @@ void LWSImporter::InternReadFile( const std::string& pFile, aiScene* pScene,
if (dit != it && *it == (*dit).parent) {
if ((*dit).parent_resolved) {
// fixme: it's still possible to produce an overflow due to cross references ..
- DefaultLogger::get()->error("LWS: Found cross reference in scenegraph");
+ ASSIMP_LOG_ERROR("LWS: Found cross reference in scene-graph");
continue;
}
diff --git a/code/LWSLoader.h b/code/LWSLoader.h
index e36d27b77..9f1636f21 100644
--- a/code/LWSLoader.h
+++ b/code/LWSLoader.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -47,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "LWOFileData.h"
#include <assimp/SceneCombiner.h>
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
struct aiImporterDesc;
diff --git a/code/LimitBoneWeightsProcess.cpp b/code/LimitBoneWeightsProcess.cpp
index 0bb4a4be3..cc87e407c 100644
--- a/code/LimitBoneWeightsProcess.cpp
+++ b/code/LimitBoneWeightsProcess.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -43,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "LimitBoneWeightsProcess.h"
-#include "StringUtils.h"
+#include <assimp/StringUtils.h>
#include <assimp/postprocess.h>
#include <assimp/DefaultLogger.hpp>
#include <assimp/scene.h>
@@ -75,13 +76,13 @@ bool LimitBoneWeightsProcess::IsActive( unsigned int pFlags) const
// ------------------------------------------------------------------------------------------------
// Executes the post processing step on the given imported data.
-void LimitBoneWeightsProcess::Execute( aiScene* pScene)
-{
- DefaultLogger::get()->debug("LimitBoneWeightsProcess begin");
- for( unsigned int a = 0; a < pScene->mNumMeshes; a++)
- ProcessMesh( pScene->mMeshes[a]);
+void LimitBoneWeightsProcess::Execute( aiScene* pScene) {
+ ASSIMP_LOG_DEBUG("LimitBoneWeightsProcess begin");
+ for (unsigned int a = 0; a < pScene->mNumMeshes; ++a ) {
+ ProcessMesh(pScene->mMeshes[a]);
+ }
- DefaultLogger::get()->debug("LimitBoneWeightsProcess end");
+ ASSIMP_LOG_DEBUG("LimitBoneWeightsProcess end");
}
// ------------------------------------------------------------------------------------------------
@@ -194,9 +195,7 @@ void LimitBoneWeightsProcess::ProcessMesh( aiMesh* pMesh)
}
if (!DefaultLogger::isNullLogger()) {
- char buffer[1024];
- ai_snprintf(buffer,1024,"Removed %u weights. Input bones: %u. Output bones: %u",removed,old_bones,pMesh->mNumBones);
- DefaultLogger::get()->info(buffer);
+ ASSIMP_LOG_INFO_F("Removed ", removed, " weights. Input bones: ", old_bones, ". Output bones: ", pMesh->mNumBones );
}
}
}
diff --git a/code/LimitBoneWeightsProcess.h b/code/LimitBoneWeightsProcess.h
index 3826dbe58..2161b89a8 100644
--- a/code/LimitBoneWeightsProcess.h
+++ b/code/LimitBoneWeightsProcess.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -119,7 +120,11 @@ public:
{
unsigned int mBone; ///< Index of the bone
float mWeight; ///< Weight of that bone on this vertex
- Weight() { }
+ Weight() AI_NO_EXCEPT
+ : mBone(0)
+ , mWeight(0.0f)
+ { }
+
Weight( unsigned int pBone, float pWeight)
{
mBone = pBone;
diff --git a/code/MD2FileData.h b/code/MD2FileData.h
index f65193264..4b893bbb1 100644
--- a/code/MD2FileData.h
+++ b/code/MD2FileData.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/MD2Loader.cpp b/code/MD2Loader.cpp
index cb494d5b2..cfd5458e7 100644
--- a/code/MD2Loader.cpp
+++ b/code/MD2Loader.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -45,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/** @file Implementation of the MD2 importer class */
#include "MD2Loader.h"
-#include "ByteSwapper.h"
+#include <assimp/ByteSwapper.h>
#include "MD2NormalTable.h" // shouldn't be included by other units
#include <assimp/DefaultLogger.hpp>
#include <assimp/Importer.hpp>
@@ -82,7 +83,7 @@ void MD2::LookupNormalIndex(uint8_t iNormalIndex,aiVector3D& vOut)
{
// make sure the normal index has a valid value
if (iNormalIndex >= ARRAYSIZE(g_avNormals)) {
- DefaultLogger::get()->warn("Index overflow in Quake II normal vector list");
+ ASSIMP_LOG_WARN("Index overflow in Quake II normal vector list");
iNormalIndex = ARRAYSIZE(g_avNormals) - 1;
}
vOut = *((const aiVector3D*)(&g_avNormals[iNormalIndex]));
@@ -160,7 +161,7 @@ void MD2Importer::ValidateHeader( )
// check file format version
if (m_pcHeader->version != 8)
- DefaultLogger::get()->warn( "Unsupported md2 file version. Continuing happily ...");
+ ASSIMP_LOG_WARN( "Unsupported md2 file version. Continuing happily ...");
// check some values whether they are valid
if (0 == m_pcHeader->numFrames)
@@ -202,11 +203,11 @@ void MD2Importer::ValidateHeader( )
}
if (m_pcHeader->numSkins > AI_MD2_MAX_SKINS)
- DefaultLogger::get()->warn("The model contains more skins than Quake 2 supports");
+ ASSIMP_LOG_WARN("The model contains more skins than Quake 2 supports");
if ( m_pcHeader->numFrames > AI_MD2_MAX_FRAMES)
- DefaultLogger::get()->warn("The model contains more frames than Quake 2 supports");
+ ASSIMP_LOG_WARN("The model contains more frames than Quake 2 supports");
if (m_pcHeader->numVertices > AI_MD2_MAX_VERTS)
- DefaultLogger::get()->warn("The model contains more vertices than Quake 2 supports");
+ ASSIMP_LOG_WARN("The model contains more vertices than Quake 2 supports");
if (m_pcHeader->numFrames <= configFrameID )
throw DeadlyImportError("The requested frame is not existing the file");
@@ -274,11 +275,9 @@ void MD2Importer::InternReadFile( const std::string& pFile,
aiMesh* pcMesh = pScene->mMeshes[0] = new aiMesh();
pcMesh->mPrimitiveTypes = aiPrimitiveType_TRIANGLE;
- // navigate to the begin of the frame data
- BE_NCONST MD2::Frame* pcFrame = (BE_NCONST MD2::Frame*) ((uint8_t*)
- m_pcHeader + m_pcHeader->offsetFrames);
-
- pcFrame += configFrameID;
+ // navigate to the begin of the current frame data
+ BE_NCONST MD2::Frame* pcFrame = (BE_NCONST MD2::Frame*) ((uint8_t*)
+ m_pcHeader + m_pcHeader->offsetFrames + (m_pcHeader->frameSize * configFrameID));
// navigate to the begin of the triangle data
MD2::Triangle* pcTriangles = (MD2::Triangle*) ((uint8_t*)
@@ -353,7 +352,7 @@ void MD2Importer::InternReadFile( const std::string& pFile,
pcHelper->AddProperty(&szString,AI_MATKEY_TEXTURE_DIFFUSE(0));
}
else{
- DefaultLogger::get()->warn("Texture file name has zero length. It will be skipped.");
+ ASSIMP_LOG_WARN("Texture file name has zero length. It will be skipped.");
}
}
else {
@@ -391,11 +390,11 @@ void MD2Importer::InternReadFile( const std::string& pFile,
// check whether the skin width or height are zero (this would
// cause a division through zero)
if (!m_pcHeader->skinWidth) {
- DefaultLogger::get()->error("MD2: No valid skin width given");
+ ASSIMP_LOG_ERROR("MD2: No valid skin width given");
}
else fDivisorU = (float)m_pcHeader->skinWidth;
if (!m_pcHeader->skinHeight){
- DefaultLogger::get()->error("MD2: No valid skin height given");
+ ASSIMP_LOG_ERROR("MD2: No valid skin height given");
}
else fDivisorV = (float)m_pcHeader->skinHeight;
}
@@ -413,7 +412,7 @@ void MD2Importer::InternReadFile( const std::string& pFile,
// validate vertex indices
unsigned int iIndex = (unsigned int)pcTriangles[i].vertexIndices[c];
if (iIndex >= m_pcHeader->numVertices) {
- DefaultLogger::get()->error("MD2: Vertex index is outside the allowed range");
+ ASSIMP_LOG_ERROR("MD2: Vertex index is outside the allowed range");
iIndex = m_pcHeader->numVertices-1;
}
@@ -441,7 +440,7 @@ void MD2Importer::InternReadFile( const std::string& pFile,
// validate texture coordinates
iIndex = pcTriangles[i].textureIndices[c];
if (iIndex >= m_pcHeader->numTexCoords) {
- DefaultLogger::get()->error("MD2: UV index is outside the allowed range");
+ ASSIMP_LOG_ERROR("MD2: UV index is outside the allowed range");
iIndex = m_pcHeader->numTexCoords-1;
}
diff --git a/code/MD2Loader.h b/code/MD2Loader.h
index a7566dc64..f26b31736 100644
--- a/code/MD2Loader.h
+++ b/code/MD2Loader.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -45,9 +46,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_MD2LOADER_H_INCLUDED
#define AI_MD2LOADER_H_INCLUDED
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
#include <assimp/types.h>
-#include "ByteSwapper.h"
+#include <assimp/ByteSwapper.h>
#include "MD2FileData.h"
struct aiNode;
diff --git a/code/MD2NormalTable.h b/code/MD2NormalTable.h
index 98fbc1d7a..dd2c837b4 100644
--- a/code/MD2NormalTable.h
+++ b/code/MD2NormalTable.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/MD3FileData.h b/code/MD3FileData.h
index 19740c30e..910813fc4 100644
--- a/code/MD3FileData.h
+++ b/code/MD3FileData.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -245,7 +246,7 @@ struct Vertex
uint16_t NORMAL;
} /*PACK_STRUCT*/;
-#include "./../include/assimp/Compiler/poppack1.h"
+#include <assimp/Compiler/poppack1.h>
// -------------------------------------------------------------------------------
/** @brief Unpack a Q3 16 bit vector to its full float3 representation
diff --git a/code/MD3Loader.cpp b/code/MD3Loader.cpp
index f6a3a85dd..d12f2d5fd 100644
--- a/code/MD3Loader.cpp
+++ b/code/MD3Loader.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -54,9 +55,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "MD3Loader.h"
#include <assimp/SceneCombiner.h>
-#include "GenericProperty.h"
-#include "RemoveComments.h"
-#include "ParsingUtils.h"
+#include <assimp/GenericProperty.h>
+#include <assimp/RemoveComments.h>
+#include <assimp/ParsingUtils.h>
#include "Importer.h"
#include <assimp/DefaultLogger.hpp>
#include <memory>
@@ -100,7 +101,7 @@ Q3Shader::BlendFunc StringToBlendFunc(const std::string& m)
if (m == "GL_ONE_MINUS_DST_COLOR") {
return Q3Shader::BLEND_GL_ONE_MINUS_DST_COLOR;
}
- DefaultLogger::get()->error("Q3Shader: Unknown blend function: " + m);
+ ASSIMP_LOG_ERROR("Q3Shader: Unknown blend function: " + m);
return Q3Shader::BLEND_NONE;
}
@@ -112,7 +113,7 @@ bool Q3Shader::LoadShader(ShaderData& fill, const std::string& pFile,IOSystem* i
if (!file.get())
return false; // if we can't access the file, don't worry and return
- DefaultLogger::get()->info("Loading Quake3 shader file " + pFile);
+ ASSIMP_LOG_INFO_F("Loading Quake3 shader file ", pFile);
// read file in memory
const size_t s = file->FileSize();
@@ -135,7 +136,7 @@ bool Q3Shader::LoadShader(ShaderData& fill, const std::string& pFile,IOSystem* i
// append to last section, if any
if (!curData) {
- DefaultLogger::get()->error("Q3Shader: Unexpected shader section token \'{\'");
+ ASSIMP_LOG_ERROR("Q3Shader: Unexpected shader section token \'{\'");
return true; // still no failure, the file is there
}
@@ -205,19 +206,16 @@ bool Q3Shader::LoadShader(ShaderData& fill, const std::string& pFile,IOSystem* i
SkipSpaces(&buff);
if (!ASSIMP_strincmp(buff,"back",4)) {
curData->cull = Q3Shader::CULL_CCW;
- }
- else if (!ASSIMP_strincmp(buff,"front",5)) {
+ } else if (!ASSIMP_strincmp(buff,"front",5)) {
curData->cull = Q3Shader::CULL_CW;
- }
- else if (!ASSIMP_strincmp(buff,"none",4) || !ASSIMP_strincmp(buff,"disable",7)) {
+ } else if (!ASSIMP_strincmp(buff,"none",4) || !ASSIMP_strincmp(buff,"disable",7)) {
curData->cull = Q3Shader::CULL_NONE;
+ } else {
+ ASSIMP_LOG_ERROR("Q3Shader: Unrecognized cull mode");
}
- else DefaultLogger::get()->error("Q3Shader: Unrecognized cull mode");
}
}
- }
-
- else {
+ } else {
// add new section
fill.blocks.push_back(Q3Shader::ShaderDataBlock());
curData = &fill.blocks.back();
@@ -237,7 +235,7 @@ bool Q3Shader::LoadSkin(SkinData& fill, const std::string& pFile,IOSystem* io)
if (!file.get())
return false; // if we can't access the file, don't worry and return
- DefaultLogger::get()->info("Loading Quake3 skin file " + pFile);
+ ASSIMP_LOG_INFO("Loading Quake3 skin file " + pFile);
// read file in memory
const size_t s = file->FileSize();
@@ -396,7 +394,7 @@ void MD3Importer::ValidateHeaderOffsets()
// Check file format version
if (pcHeader->VERSION > 15)
- DefaultLogger::get()->warn( "Unsupported MD3 file version. Continuing happily ...");
+ ASSIMP_LOG_WARN( "Unsupported MD3 file version. Continuing happily ...");
// Check some offset values whether they are valid
if (!pcHeader->NUM_SURFACES)
@@ -437,25 +435,24 @@ void MD3Importer::ValidateSurfaceHeaderOffsets(const MD3::Surface* pcSurf)
// Check whether all requirements for Q3 files are met. We don't
// care, but probably someone does.
if (pcSurf->NUM_TRIANGLES > AI_MD3_MAX_TRIANGLES) {
- DefaultLogger::get()->warn("MD3: Quake III triangle limit exceeded");
+ ASSIMP_LOG_WARN("MD3: Quake III triangle limit exceeded");
}
if (pcSurf->NUM_SHADER > AI_MD3_MAX_SHADERS) {
- DefaultLogger::get()->warn("MD3: Quake III shader limit exceeded");
+ ASSIMP_LOG_WARN("MD3: Quake III shader limit exceeded");
}
if (pcSurf->NUM_VERTICES > AI_MD3_MAX_VERTS) {
- DefaultLogger::get()->warn("MD3: Quake III vertex limit exceeded");
+ ASSIMP_LOG_WARN("MD3: Quake III vertex limit exceeded");
}
if (pcSurf->NUM_FRAMES > AI_MD3_MAX_FRAMES) {
- DefaultLogger::get()->warn("MD3: Quake III frame limit exceeded");
+ ASSIMP_LOG_WARN("MD3: Quake III frame limit exceeded");
}
}
// ------------------------------------------------------------------------------------------------
-const aiImporterDesc* MD3Importer::GetInfo () const
-{
+const aiImporterDesc* MD3Importer::GetInfo () const {
return &desc;
}
@@ -578,7 +575,7 @@ bool MD3Importer::ReadMultipartFile()
aiNode* tag_torso, *tag_head;
std::vector<AttachmentInfo> attach;
- DefaultLogger::get()->info("Multi part MD3 player model: lower, upper and head parts are joined");
+ ASSIMP_LOG_INFO("Multi part MD3 player model: lower, upper and head parts are joined");
// ensure we won't try to load ourselves recursively
BatchLoader::PropertyMap props;
@@ -599,21 +596,21 @@ bool MD3Importer::ReadMultipartFile()
// ... and get them. We need all of them.
scene_lower = batch.GetImport(_lower);
if (!scene_lower) {
- DefaultLogger::get()->error("M3D: Failed to read multi part model, lower.md3 fails to load");
+ ASSIMP_LOG_ERROR("M3D: Failed to read multi part model, lower.md3 fails to load");
failure = "lower";
goto error_cleanup;
}
scene_upper = batch.GetImport(_upper);
if (!scene_upper) {
- DefaultLogger::get()->error("M3D: Failed to read multi part model, upper.md3 fails to load");
+ ASSIMP_LOG_ERROR("M3D: Failed to read multi part model, upper.md3 fails to load");
failure = "upper";
goto error_cleanup;
}
scene_head = batch.GetImport(_head);
if (!scene_head) {
- DefaultLogger::get()->error("M3D: Failed to read multi part model, head.md3 fails to load");
+ ASSIMP_LOG_ERROR("M3D: Failed to read multi part model, head.md3 fails to load");
failure = "head";
goto error_cleanup;
}
@@ -627,7 +624,7 @@ bool MD3Importer::ReadMultipartFile()
// tag_torso
tag_torso = scene_lower->mRootNode->FindNode("tag_torso");
if (!tag_torso) {
- DefaultLogger::get()->error("M3D: Failed to find attachment tag for multi part model: tag_torso expected");
+ ASSIMP_LOG_ERROR("M3D: Failed to find attachment tag for multi part model: tag_torso expected");
goto error_cleanup;
}
scene_upper->mRootNode->mName.Set("upper");
@@ -636,7 +633,7 @@ bool MD3Importer::ReadMultipartFile()
// tag_head
tag_head = scene_upper->mRootNode->FindNode("tag_head");
if (!tag_head) {
- DefaultLogger::get()->error("M3D: Failed to find attachment tag for multi part model: tag_head expected");
+ ASSIMP_LOG_ERROR( "M3D: Failed to find attachment tag for multi part model: tag_head expected");
goto error_cleanup;
}
scene_head->mRootNode->mName.Set("head");
@@ -889,7 +886,7 @@ void MD3Importer::InternReadFile( const std::string& pFile,
if (it != skins.textures.end()) {
texture_name = &*( _texture_name = (*it).second).begin();
- DefaultLogger::get()->debug("MD3: Assigning skin texture " + (*it).second + " to surface " + pcSurfaces->NAME);
+ ASSIMP_LOG_DEBUG_F("MD3: Assigning skin texture ", (*it).second, " to surface ", pcSurfaces->NAME);
(*it).resolved = true; // mark entry as resolved
}
@@ -918,9 +915,10 @@ void MD3Importer::InternReadFile( const std::string& pFile,
if (dit != shaders.blocks.end()) {
// Hurra, wir haben einen. Tolle Sache.
shader = &*dit;
- DefaultLogger::get()->info("Found shader record for " +without_ext );
+ ASSIMP_LOG_INFO("Found shader record for " +without_ext );
+ } else {
+ ASSIMP_LOG_WARN("Unable to find shader record for " + without_ext);
}
- else DefaultLogger::get()->warn("Unable to find shader record for " +without_ext );
}
aiMaterial* pcHelper = new aiMaterial();
@@ -949,7 +947,7 @@ void MD3Importer::InternReadFile( const std::string& pFile,
szString.Set(convertedPath);
}
else {
- DefaultLogger::get()->warn("Texture file name has zero length. Using default name");
+ ASSIMP_LOG_WARN("Texture file name has zero length. Using default name");
szString.Set("dummy_texture.bmp");
}
pcHelper->AddProperty(&szString,AI_MATKEY_TEXTURE_DIFFUSE(0));
@@ -1018,11 +1016,11 @@ void MD3Importer::InternReadFile( const std::string& pFile,
// Convert the normal vector to uncompressed float3 format
aiVector3D& nor = pcMesh->mNormals[iCurrent];
- LatLngNormalToVec3(pcVertices[pcTriangles->INDEXES[c]].NORMAL,(ai_real*)&nor);
+ LatLngNormalToVec3(pcVertices[index].NORMAL,(ai_real*)&nor);
// Read texture coordinates
- pcMesh->mTextureCoords[0][iCurrent].x = pcUVs[ pcTriangles->INDEXES[c]].U;
- pcMesh->mTextureCoords[0][iCurrent].y = 1.0f-pcUVs[ pcTriangles->INDEXES[c]].V;
+ pcMesh->mTextureCoords[0][iCurrent].x = pcUVs[index].U;
+ pcMesh->mTextureCoords[0][iCurrent].y = 1.0f-pcUVs[index].V;
}
// Flip face order if necessary
if (!shader || shader->cull == Q3Shader::CULL_CW) {
@@ -1039,7 +1037,7 @@ void MD3Importer::InternReadFile( const std::string& pFile,
if (!DefaultLogger::isNullLogger()) {
for (std::list< Q3Shader::SkinData::TextureEntry>::const_iterator it = skins.textures.begin();it != skins.textures.end(); ++it) {
if (!(*it).resolved) {
- DefaultLogger::get()->error("MD3: Failed to match skin " + (*it).first + " to surface " + (*it).second);
+ ASSIMP_LOG_ERROR_F("MD3: Failed to match skin ", (*it).first, " to surface ", (*it).second);
}
}
}
diff --git a/code/MD3Loader.h b/code/MD3Loader.h
index ff5b56a52..8ac3cdc68 100644
--- a/code/MD3Loader.h
+++ b/code/MD3Loader.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -45,10 +46,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_MD3LOADER_H_INCLUDED
#define AI_MD3LOADER_H_INCLUDED
-#include "BaseImporter.h"
-#include "ByteSwapper.h"
+#include <assimp/BaseImporter.h>
+#include <assimp/ByteSwapper.h>
#include "MD3FileData.h"
-#include "StringComparison.h"
+#include <assimp/StringComparison.h>
#include <assimp/types.h>
#include <list>
@@ -124,7 +125,7 @@ enum AlphaTestFunc
*/
struct ShaderMapBlock
{
- ShaderMapBlock()
+ ShaderMapBlock() AI_NO_EXCEPT
: blend_src (BLEND_NONE)
, blend_dest (BLEND_NONE)
, alpha_test (AT_NONE)
@@ -149,7 +150,7 @@ struct ShaderMapBlock
*/
struct ShaderDataBlock
{
- ShaderDataBlock()
+ ShaderDataBlock() AI_NO_EXCEPT
: cull (CULL_CW)
{}
diff --git a/code/MD4FileData.h b/code/MD4FileData.h
index e515808ac..ed3dc65e7 100644
--- a/code/MD4FileData.h
+++ b/code/MD4FileData.h
@@ -46,9 +46,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <vector>
#include <sstream>
-#include "../include/assimp/types.h"
-#include "../include/assimp/mesh.h"
-#include "../include/assimp/anim.h"
+#include <assimp/types.h>
+#include <assimp/mesh.h>
+#include <assimp/anim.h>
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
# pragma pack(push,1)
diff --git a/code/MD5Loader.cpp b/code/MD5Loader.cpp
index 172c98a30..a4285ba03 100644
--- a/code/MD5Loader.cpp
+++ b/code/MD5Loader.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -48,11 +49,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_NO_MD5_IMPORTER
// internal headers
-#include "RemoveComments.h"
+#include <assimp/RemoveComments.h>
#include "MD5Loader.h"
-#include "StringComparison.h"
-#include "fast_atof.h"
-#include "SkeletonMeshBuilder.h"
+#include <assimp/StringComparison.h>
+#include <assimp/fast_atof.h>
+#include <assimp/SkeletonMeshBuilder.h>
#include <assimp/Importer.hpp>
#include <assimp/scene.h>
#include <assimp/IOSystem.hpp>
@@ -358,7 +359,7 @@ void MD5Importer::LoadMD5MeshFile ()
// Check whether we can read from the file
if( file.get() == NULL || !file->FileSize()) {
- DefaultLogger::get()->warn("Failed to access MD5MESH file: " + pFile);
+ ASSIMP_LOG_WARN("Failed to access MD5MESH file: " + pFile);
return;
}
bHadMD5Mesh = true;
@@ -419,6 +420,9 @@ void MD5Importer::LoadMD5MeshFile ()
// generate unique vertices in our internal verbose format
MakeDataUnique(meshSrc);
+ std::string name( meshSrc.mShader.C_Str() );
+ name += ".msh";
+ mesh->mName = name;
mesh->mNumVertices = (unsigned int) meshSrc.mVertices.size();
mesh->mVertices = new aiVector3D[mesh->mNumVertices];
mesh->mTextureCoords[0] = new aiVector3D[mesh->mNumVertices];
@@ -470,7 +474,6 @@ void MD5Importer::LoadMD5MeshFile ()
MD5::ConvertQuaternion( boneSrc.mRotationQuat, boneSrc.mRotationQuatConverted );
}
- //unsigned int g = 0;
pv = mesh->mVertices;
for (MD5::VertexList::const_iterator iter = meshSrc.mVertices.begin();iter != meshSrc.mVertices.end();++iter,++pv) {
// compute the final vertex position from all single weights
@@ -481,7 +484,7 @@ void MD5Importer::LoadMD5MeshFile ()
for (unsigned int jub = (*iter).mFirstWeight, w = jub; w < jub + (*iter).mNumWeights;++w)
fSum += meshSrc.mWeights[w].mWeight;
if (!fSum) {
- DefaultLogger::get()->error("MD5MESH: The sum of all vertex bone weights is 0");
+ ASSIMP_LOG_ERROR("MD5MESH: The sum of all vertex bone weights is 0");
continue;
}
@@ -558,7 +561,9 @@ void MD5Importer::LoadMD5MeshFile ()
// set this also as material name
mat->AddProperty(&meshSrc.mShader,AI_MATKEY_NAME);
}
- else mat->AddProperty(&meshSrc.mShader,AI_MATKEY_TEXTURE_DIFFUSE(0));
+ else {
+ mat->AddProperty(&meshSrc.mShader, AI_MATKEY_TEXTURE_DIFFUSE(0));
+ }
mesh->mMaterialIndex = n++;
}
#endif
@@ -573,7 +578,7 @@ void MD5Importer::LoadMD5AnimFile ()
// Check whether we can read from the file
if( !file.get() || !file->FileSize()) {
- DefaultLogger::get()->warn("Failed to read MD5ANIM file: " + pFile);
+ ASSIMP_LOG_WARN("Failed to read MD5ANIM file: " + pFile);
return;
}
LoadFileIntoMemory(file.get());
@@ -587,8 +592,7 @@ void MD5Importer::LoadMD5AnimFile ()
// generate and fill the output animation
if (animParser.mAnimatedBones.empty() || animParser.mFrames.empty() ||
animParser.mBaseFrames.size() != animParser.mAnimatedBones.size()) {
-
- DefaultLogger::get()->error("MD5ANIM: No frames or animated bones loaded");
+ ASSIMP_LOG_ERROR("MD5ANIM: No frames or animated bones loaded");
}
else {
bHadMD5Anim = true;
diff --git a/code/MD5Loader.h b/code/MD5Loader.h
index afb07a62d..1ba5fea68 100644
--- a/code/MD5Loader.h
+++ b/code/MD5Loader.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -47,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_MD5LOADER_H_INCLUDED
#define AI_MD5LOADER_H_INCLUDED
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
#include "MD5Parser.h"
#include <assimp/types.h>
@@ -145,7 +146,7 @@ protected:
// -------------------------------------------------------------------
/** Load the contents of a specific file into memory and
- * alocates a buffer to keep it.
+ * allocates a buffer to keep it.
*
* mBuffer is modified to point to this buffer.
* @param pFile File stream to be read
diff --git a/code/MD5Parser.cpp b/code/MD5Parser.cpp
index 8076e5bc4..6f942228c 100644
--- a/code/MD5Parser.cpp
+++ b/code/MD5Parser.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -48,9 +49,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// internal headers
#include "MD5Loader.h"
#include "MaterialSystem.h"
-#include "fast_atof.h"
-#include "ParsingUtils.h"
-#include "StringComparison.h"
+#include <assimp/fast_atof.h>
+#include <assimp/ParsingUtils.h>
+#include <assimp/StringComparison.h>
#include <assimp/DefaultLogger.hpp>
#include <assimp/mesh.h>
@@ -69,7 +70,7 @@ MD5Parser::MD5Parser(char* _buffer, unsigned int _fileSize )
fileSize = _fileSize;
lineNumber = 0;
- DefaultLogger::get()->debug("MD5Parser begin");
+ ASSIMP_LOG_DEBUG("MD5Parser begin");
// parse the file header
ParseHeader();
@@ -87,7 +88,7 @@ MD5Parser::MD5Parser(char* _buffer, unsigned int _fileSize )
if ( !DefaultLogger::isNullLogger()) {
char szBuffer[128]; // should be sufficiently large
::ai_snprintf(szBuffer,128,"MD5Parser end. Parsed %i sections",(int)mSections.size());
- DefaultLogger::get()->debug(szBuffer);
+ ASSIMP_LOG_DEBUG(szBuffer);
}
}
@@ -106,7 +107,7 @@ MD5Parser::MD5Parser(char* _buffer, unsigned int _fileSize )
{
char szBuffer[1024];
::sprintf(szBuffer,"[MD5] Line %u: %s",line,warn);
- DefaultLogger::get()->warn(szBuffer);
+ ASSIMP_LOG_WARN(szBuffer);
}
// ------------------------------------------------------------------------------------------------
@@ -129,7 +130,7 @@ void MD5Parser::ParseHeader()
// FIX: can break the log length limit, so we need to be careful
char* sz = buffer;
while (!IsLineEnd( *buffer++));
- DefaultLogger::get()->info(std::string(sz,std::min((uintptr_t)MAX_LOG_MESSAGE_LENGTH, (uintptr_t)(buffer-sz))));
+ ASSIMP_LOG_INFO(std::string(sz,std::min((uintptr_t)MAX_LOG_MESSAGE_LENGTH, (uintptr_t)(buffer-sz))));
SkipSpacesAndLineEnd();
}
@@ -242,7 +243,7 @@ bool MD5Parser::ParseSection(Section& out)
// .MD5MESH parsing function
MD5MeshParser::MD5MeshParser(SectionList& mSections)
{
- DefaultLogger::get()->debug("MD5MeshParser begin");
+ ASSIMP_LOG_DEBUG("MD5MeshParser begin");
// now parse all sections
for (SectionList::const_iterator iter = mSections.begin(), iterEnd = mSections.end();iter != iterEnd;++iter){
@@ -353,14 +354,14 @@ MD5MeshParser::MD5MeshParser(SectionList& mSections)
}
}
}
- DefaultLogger::get()->debug("MD5MeshParser end");
+ ASSIMP_LOG_DEBUG("MD5MeshParser end");
}
// ------------------------------------------------------------------------------------------------
// .MD5ANIM parsing function
MD5AnimParser::MD5AnimParser(SectionList& mSections)
{
- DefaultLogger::get()->debug("MD5AnimParser begin");
+ ASSIMP_LOG_DEBUG("MD5AnimParser begin");
fFrameRate = 24.0f;
mNumAnimatedComponents = UINT_MAX;
@@ -444,14 +445,14 @@ MD5AnimParser::MD5AnimParser(SectionList& mSections)
fast_atoreal_move<float>((*iter).mGlobalValue.c_str(),fFrameRate);
}
}
- DefaultLogger::get()->debug("MD5AnimParser end");
+ ASSIMP_LOG_DEBUG("MD5AnimParser end");
}
// ------------------------------------------------------------------------------------------------
// .MD5CAMERA parsing function
MD5CameraParser::MD5CameraParser(SectionList& mSections)
{
- DefaultLogger::get()->debug("MD5CameraParser begin");
+ ASSIMP_LOG_DEBUG("MD5CameraParser begin");
fFrameRate = 24.0f;
for (SectionList::const_iterator iter = mSections.begin(), iterEnd = mSections.end();iter != iterEnd;++iter) {
@@ -482,6 +483,6 @@ MD5CameraParser::MD5CameraParser(SectionList& mSections)
}
}
}
- DefaultLogger::get()->debug("MD5CameraParser end");
+ ASSIMP_LOG_DEBUG("MD5CameraParser end");
}
diff --git a/code/MD5Parser.h b/code/MD5Parser.h
index bafcaf962..853268424 100644
--- a/code/MD5Parser.h
+++ b/code/MD5Parser.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -48,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define AI_MD5PARSER_H_INCLUDED
#include <assimp/types.h>
-#include "ParsingUtils.h"
+#include <assimp/ParsingUtils.h>
#include <vector>
#include <stdint.h>
@@ -191,14 +192,14 @@ typedef std::vector< FrameDesc > FrameList;
// ---------------------------------------------------------------------------
/** Represents a vertex descriptor in a MD5 file
*/
-struct VertexDesc
-{
- VertexDesc()
- : mFirstWeight (0)
- , mNumWeights (0)
- {}
+struct VertexDesc {
+ VertexDesc() AI_NO_EXCEPT
+ : mFirstWeight(0)
+ , mNumWeights(0) {
+ // empty
+ }
- //! UV cordinate of the vertex
+ //! UV coordinate of the vertex
aiVector2D mUV;
//! Index of the first weight of the vertex in
diff --git a/code/MDCFileData.h b/code/MDCFileData.h
index 9ea3d8f5e..c599a930a 100644
--- a/code/MDCFileData.h
+++ b/code/MDCFileData.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -60,7 +61,6 @@ http://themdcfile.planetwolfenstein.gamespy.com/MDC_File_Format.pdf
namespace Assimp {
namespace MDC {
-
// to make it easier for us, we test the magic word against both "endianesses"
#define AI_MDC_MAGIC_NUMBER_BE AI_MAKE_MAGIC("CPDI")
#define AI_MDC_MAGIC_NUMBER_LE AI_MAKE_MAGIC("IDPC")
@@ -78,8 +78,7 @@ namespace MDC {
// ---------------------------------------------------------------------------
/** \brief Data structure for a MDC file's main header
*/
-struct Header
-{
+struct Header {
uint32_t ulIdent ;
uint32_t ulVersion ;
char ucName [ AI_MDC_MAXQPATH ] ;
@@ -99,8 +98,7 @@ struct Header
// ---------------------------------------------------------------------------
/** \brief Data structure for a MDC file's surface header
*/
-struct Surface
-{
+struct Surface {
uint32_t ulIdent ;
char ucName [ AI_MDC_MAXQPATH ] ;
uint32_t ulFlags ;
@@ -117,23 +115,22 @@ struct Surface
uint32_t ulOffsetFrameBaseFrames ;
uint32_t ulOffsetFrameCompFrames ;
uint32_t ulOffsetEnd;
- Surface()
- : ulIdent(),
- ulFlags(),
- ulNumCompFrames(),
- ulNumBaseFrames(),
- ulNumShaders(),
- ulNumVertices(),
- ulNumTriangles(),
- ulOffsetTriangles(),
- ulOffsetShaders(),
- ulOffsetTexCoords(),
- ulOffsetBaseVerts(),
- ulOffsetCompVerts(),
- ulOffsetFrameBaseFrames(),
- ulOffsetFrameCompFrames(),
- ulOffsetEnd()
- {
+ Surface() AI_NO_EXCEPT
+ : ulIdent()
+ , ulFlags()
+ , ulNumCompFrames()
+ , ulNumBaseFrames()
+ , ulNumShaders()
+ , ulNumVertices()
+ , ulNumTriangles()
+ , ulOffsetTriangles()
+ , ulOffsetShaders()
+ , ulOffsetTexCoords()
+ , ulOffsetBaseVerts()
+ , ulOffsetCompVerts()
+ , ulOffsetFrameBaseFrames()
+ , ulOffsetFrameCompFrames()
+ , ulOffsetEnd() {
ucName[AI_MDC_MAXQPATH-1] = '\0';
}
} PACK_STRUCT;
@@ -141,8 +138,7 @@ struct Surface
// ---------------------------------------------------------------------------
/** \brief Data structure for a MDC frame
*/
-struct Frame
-{
+struct Frame {
//! bounding box minimum coords
aiVector3D bboxMin ;
@@ -162,24 +158,21 @@ struct Frame
// ---------------------------------------------------------------------------
/** \brief Data structure for a MDC triangle
*/
-struct Triangle
-{
+struct Triangle {
uint32_t aiIndices[3];
} PACK_STRUCT;
// ---------------------------------------------------------------------------
/** \brief Data structure for a MDC texture coordinate
*/
-struct TexturCoord
-{
+struct TexturCoord {
float u,v;
} PACK_STRUCT;
// ---------------------------------------------------------------------------
/** \brief Data structure for a MDC base vertex
*/
-struct BaseVertex
-{
+struct BaseVertex {
int16_t x,y,z;
uint16_t normal;
} PACK_STRUCT;
@@ -187,25 +180,20 @@ struct BaseVertex
// ---------------------------------------------------------------------------
/** \brief Data structure for a MDC compressed vertex
*/
-struct CompressedVertex
-{
+struct CompressedVertex {
uint8_t xd,yd,zd,nd;
} PACK_STRUCT;
-
// ---------------------------------------------------------------------------
/** \brief Data structure for a MDC shader
*/
-struct Shader
-{
+struct Shader {
char ucName [ AI_MDC_MAXQPATH ] ;
uint32_t ulPath;
-
} PACK_STRUCT;
#include <assimp/Compiler/poppack1.h>
-
// ---------------------------------------------------------------------------
/** Build a floating point vertex from the compressed data in MDC files
*/
@@ -214,6 +202,7 @@ void BuildVertex(const Frame& frame,
const CompressedVertex& cvert,
aiVector3D& vXYZOut,
aiVector3D& vNorOut);
-}}
+}
+}
#endif // !! AI_MDCFILEHELPER_H_INC
diff --git a/code/MDCLoader.cpp b/code/MDCLoader.cpp
index 21aca53ff..03b3336de 100644
--- a/code/MDCLoader.cpp
+++ b/code/MDCLoader.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -158,8 +159,9 @@ void MDCImporter::ValidateHeader()
"magic word found is " + std::string( szBuffer ));
}
- if (pcHeader->ulVersion != AI_MDC_VERSION)
- DefaultLogger::get()->warn("Unsupported MDC file version (2 (AI_MDC_VERSION) was expected)");
+ if (pcHeader->ulVersion != AI_MDC_VERSION) {
+ ASSIMP_LOG_WARN("Unsupported MDC file version (2 (AI_MDC_VERSION) was expected)");
+ }
if (pcHeader->ulOffsetBorderFrames + pcHeader->ulNumFrames * sizeof(MDC::Frame) > this->fileSize ||
pcHeader->ulOffsetSurfaces + pcHeader->ulNumSurfaces * sizeof(MDC::Surface) > this->fileSize)
@@ -168,8 +170,9 @@ void MDCImporter::ValidateHeader()
"and point to something behind the file.");
}
- if (this->configFrameID >= this->pcHeader->ulNumFrames)
+ if (this->configFrameID >= this->pcHeader->ulNumFrames) {
throw DeadlyImportError("The requested frame is not available");
+ }
}
// ------------------------------------------------------------------------------------------------
@@ -283,9 +286,8 @@ void MDCImporter::InternReadFile(
pcMesh->mNumVertices = pcMesh->mNumFaces * 3;
// store the name of the surface for use as node name.
- // FIX: make sure there is a 0 termination
- const_cast<char&>(pcSurface->ucName[AI_MDC_MAXQPATH-1]) = '\0';
- pcMesh->mTextureCoords[3] = (aiVector3D*)pcSurface->ucName;
+ pcMesh->mName.Set(std::string(pcSurface->ucName
+ , strnlen(pcSurface->ucName, AI_MDC_MAXQPATH - 1)));
// go to the first shader in the file. ignore the others.
if (pcSurface->ulNumShaders)
@@ -294,8 +296,8 @@ void MDCImporter::InternReadFile(
pcMesh->mMaterialIndex = (unsigned int)aszShaders.size();
// create a new shader
- aszShaders.push_back(std::string( pcShader->ucName, std::min(
- ::strlen(pcShader->ucName),sizeof(pcShader->ucName)) ));
+ aszShaders.push_back(std::string( pcShader->ucName,
+ ::strnlen(pcShader->ucName, sizeof(pcShader->ucName)) ));
}
// need to create a default material
else if (UINT_MAX == iDefaultMatIndex)
@@ -388,7 +390,7 @@ void MDCImporter::InternReadFile(
uint32_t quak = pcTriangle->aiIndices[iIndex];
if (quak >= pcSurface->ulNumVertices)
{
- DefaultLogger::get()->error("MDC vertex index is out of range");
+ ASSIMP_LOG_ERROR("MDC vertex index is out of range");
quak = pcSurface->ulNumVertices-1;
}
@@ -432,10 +434,12 @@ void MDCImporter::InternReadFile(
else if (1 == pScene->mNumMeshes)
{
pScene->mRootNode = new aiNode();
- pScene->mRootNode->mName.Set(std::string((const char*)pScene->mMeshes[0]->mTextureCoords[3]));
- pScene->mRootNode->mNumMeshes = 1;
- pScene->mRootNode->mMeshes = new unsigned int[1];
- pScene->mRootNode->mMeshes[0] = 0;
+ if ( nullptr != pScene->mMeshes[0] ) {
+ pScene->mRootNode->mName = pScene->mMeshes[0]->mName;
+ pScene->mRootNode->mNumMeshes = 1;
+ pScene->mRootNode->mMeshes = new unsigned int[1];
+ pScene->mRootNode->mMeshes[0] = 0;
+ }
}
else
{
@@ -447,17 +451,13 @@ void MDCImporter::InternReadFile(
{
aiNode* pcNode = pScene->mRootNode->mChildren[i] = new aiNode();
pcNode->mParent = pScene->mRootNode;
- pcNode->mName.Set(std::string((const char*)pScene->mMeshes[i]->mTextureCoords[3]));
+ pcNode->mName = pScene->mMeshes[i]->mName;
pcNode->mNumMeshes = 1;
pcNode->mMeshes = new unsigned int[1];
pcNode->mMeshes[0] = i;
}
}
- // make sure we invalidate the pointer to the mesh name
- for (unsigned int i = 0; i < pScene->mNumMeshes;++i)
- pScene->mMeshes[i]->mTextureCoords[3] = NULL;
-
// create materials
pScene->mNumMaterials = (unsigned int)aszShaders.size();
pScene->mMaterials = new aiMaterial*[pScene->mNumMaterials];
diff --git a/code/MDCLoader.h b/code/MDCLoader.h
index 5f3b365fd..5bbe2b666 100644
--- a/code/MDCLoader.h
+++ b/code/MDCLoader.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -47,9 +48,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/types.h>
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
#include "MDCFileData.h"
-#include "ByteSwapper.h"
+#include <assimp/ByteSwapper.h>
namespace Assimp {
diff --git a/code/MDLDefaultColorMap.h b/code/MDLDefaultColorMap.h
index 800c717c5..b96a60a06 100644
--- a/code/MDLDefaultColorMap.h
+++ b/code/MDLDefaultColorMap.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/MDLFileData.h b/code/MDLFileData.h
index a691851be..f9be6761b 100644
--- a/code/MDLFileData.h
+++ b/code/MDLFileData.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -56,7 +57,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/anim.h>
#include <assimp/mesh.h>
#include <assimp/Compiler/pushpack1.h>
-#include "ByteSwapper.h"
+#include <assimp/ByteSwapper.h>
#include <stdint.h>
#include <vector>
@@ -126,16 +127,16 @@ struct Header {
int32_t version;
//! scale factors for each axis
- aiVector3D scale;
+ ai_real scale[3];
//! translation factors for each axis
- aiVector3D translate;
+ ai_real translate[3];
//! bounding radius of the mesh
float boundingradius;
//! Position of the viewer's exe. Ignored
- aiVector3D vEyePos;
+ ai_real vEyePos[3];
//! Number of textures
int32_t num_skins;
@@ -164,7 +165,7 @@ struct Header {
//! Could be the total size of the file (and not a float)
float size;
-} /* PACK_STRUCT */;
+} PACK_STRUCT;
// -------------------------------------------------------------------------------------
@@ -223,7 +224,7 @@ struct Header_MDL7 {
//! Size of the Frame_MDL7 data structure used in the file
uint16_t frame_stc_size;
-} /* PACK_STRUCT */;
+} PACK_STRUCT;
// -------------------------------------------------------------------------------------
@@ -242,7 +243,7 @@ struct Bone_MDL7 {
//! Optional name of the bone
char name[1 /* DUMMY SIZE */];
-} /* PACK_STRUCT */;
+} PACK_STRUCT;
#if (!defined AI_MDL7_BONE_STRUCT_SIZE__NAME_IS_20_CHARS)
# define AI_MDL7_BONE_STRUCT_SIZE__NAME_IS_20_CHARS (16 + 20)
@@ -290,7 +291,7 @@ struct Group_MDL7 {
//! Number of frames
int32_t numframes;
-} /* PACK_STRUCT */;
+} PACK_STRUCT;
#define AI_MDL7_SKINTYPE_MIPFLAG 0x08
#define AI_MDL7_SKINTYPE_MATERIAL 0x10
@@ -312,7 +313,7 @@ struct Deformer_MDL7 {
int32_t group_index;
int32_t elements;
int32_t deformerdata_size;
-} /* PACK_STRUCT */;
+} PACK_STRUCT;
// -------------------------------------------------------------------------------------
@@ -324,7 +325,7 @@ struct DeformerElement_MDL7 {
int32_t element_index;
char element_name[AI_MDL7_MAX_BONENAMESIZE];
int32_t weights;
-} /* PACK_STRUCT */;
+} PACK_STRUCT;
// -------------------------------------------------------------------------------------
/** \struct DeformerWeight_MDL7
@@ -334,7 +335,7 @@ struct DeformerWeight_MDL7 {
//! for deformer_typ==0 (==bones) index == vertex index
int32_t index;
float weight;
-} /* PACK_STRUCT */;
+} PACK_STRUCT;
// don't know why this was in the original headers ...
typedef int32_t MD7_MATERIAL_ASCDEFSIZE;
@@ -345,7 +346,7 @@ typedef int32_t MD7_MATERIAL_ASCDEFSIZE;
*/
struct ColorValue_MDL7 {
float r,g,b,a;
-} /* PACK_STRUCT */;
+} PACK_STRUCT;
// -------------------------------------------------------------------------------------
/** \struct Material_MDL7
@@ -366,7 +367,7 @@ struct Material_MDL7 {
//! Phong power
float Power;
-} /* PACK_STRUCT */;
+} PACK_STRUCT;
// -------------------------------------------------------------------------------------
/** \struct Skin
@@ -388,7 +389,7 @@ struct Skin {
//! Texture data
uint8_t *data;
-} /* PACK_STRUCT */;
+} PACK_STRUCT;
// -------------------------------------------------------------------------------------
@@ -399,7 +400,7 @@ struct Skin {
struct Skin_MDL5 {
int32_t size, width, height;
uint8_t *data;
-} /* PACK_STRUCT */;
+} PACK_STRUCT;
// maximum length of texture file name
#if (!defined AI_MDL7_MAX_TEXNAMESIZE)
@@ -416,7 +417,7 @@ struct Skin_MDL7 {
int32_t width;
int32_t height;
char texture_name[AI_MDL7_MAX_TEXNAMESIZE];
-} /* PACK_STRUCT */;
+} PACK_STRUCT;
// -------------------------------------------------------------------------------------
/** \struct RGB565
@@ -426,7 +427,7 @@ struct RGB565 {
uint16_t r : 5;
uint16_t g : 6;
uint16_t b : 5;
-} /* PACK_STRUCT */;
+} PACK_STRUCT;
// -------------------------------------------------------------------------------------
/** \struct ARGB4
@@ -455,7 +456,7 @@ struct GroupSkin {
//! Data of each image
uint8_t **data;
-} /* PACK_STRUCT */;
+} PACK_STRUCT;
// -------------------------------------------------------------------------------------
/** \struct TexCoord
@@ -470,7 +471,7 @@ struct TexCoord {
//! Texture coordinate in the ty direction
int32_t t;
-} /* PACK_STRUCT */;
+} PACK_STRUCT;
// -------------------------------------------------------------------------------------
/** \struct TexCoord_MDL3
@@ -482,7 +483,7 @@ struct TexCoord_MDL3 {
//! position, vertically in range 0..skinheight-1
int16_t v;
-} /* PACK_STRUCT */;
+} PACK_STRUCT;
// -------------------------------------------------------------------------------------
/** \struct TexCoord_MDL7
@@ -494,7 +495,7 @@ struct TexCoord_MDL7 {
//! position, vertically in range 0..1
float v;
-} /* PACK_STRUCT */;
+} PACK_STRUCT;
// -------------------------------------------------------------------------------------
/** \struct SkinSet_MDL7
@@ -510,7 +511,7 @@ struct SkinSet_MDL7
//! Material index
int32_t material; // size 4
-} /* PACK_STRUCT */;
+} PACK_STRUCT;
// -------------------------------------------------------------------------------------
/** \struct Triangle
@@ -523,7 +524,7 @@ struct Triangle
//! Vertex indices
int32_t vertex[3];
-} /* PACK_STRUCT */;
+} PACK_STRUCT;
// -------------------------------------------------------------------------------------
/** \struct Triangle_MDL3
@@ -536,7 +537,7 @@ struct Triangle_MDL3
//! Index of 3 skin vertices in range 0..numskinverts
uint16_t index_uv[3];
-} /* PACK_STRUCT */;
+} PACK_STRUCT;
// -------------------------------------------------------------------------------------
/** \struct Triangle_MDL7
@@ -549,7 +550,7 @@ struct Triangle_MDL7
//! Two skinsets. The second will be used for multi-texturing
SkinSet_MDL7 skinsets[2];
-} /* PACK_STRUCT */;
+} PACK_STRUCT;
#if (!defined AI_MDL7_TRIANGLE_STD_SIZE_ONE_UV)
# define AI_MDL7_TRIANGLE_STD_SIZE_ONE_UV (6+sizeof(SkinSet_MDL7)-sizeof(uint32_t))
@@ -577,7 +578,7 @@ struct Vertex
{
uint8_t v[3];
uint8_t normalIndex;
-} /* PACK_STRUCT */;
+} PACK_STRUCT;
// -------------------------------------------------------------------------------------
@@ -603,7 +604,7 @@ struct Vertex_MDL7
uint8_t norm162index;
float norm[3];
};
-} /* PACK_STRUCT */;
+} PACK_STRUCT;
// -------------------------------------------------------------------------------------
/** \struct BoneTransform_MDL7
@@ -620,7 +621,7 @@ struct BoneTransform_MDL7
//! I HATE 3DGS AND THE SILLY DEVELOPER WHO DESIGNED
//! THIS STUPID FILE FORMAT!
int8_t _unused_[2];
-} /* PACK_STRUCT */;
+} PACK_STRUCT;
#define AI_MDL7_MAX_FRAMENAMESIZE 16
@@ -654,7 +655,7 @@ struct SimpleFrame
//! Vertex list of the frame
Vertex *verts;
-} /* PACK_STRUCT */;
+} PACK_STRUCT;
// -------------------------------------------------------------------------------------
/** \struct Frame
@@ -667,7 +668,7 @@ struct Frame
//! Frame data
SimpleFrame frame;
-} /* PACK_STRUCT */;
+} PACK_STRUCT;
// -------------------------------------------------------------------------------------
@@ -684,7 +685,7 @@ struct SimpleFrame_MDLn_SP
//! Vertex list of the frame
Vertex_MDL4 *verts;
-} /* PACK_STRUCT */;
+} PACK_STRUCT;
// -------------------------------------------------------------------------------------
/** \struct GroupFrame
@@ -706,9 +707,9 @@ struct GroupFrame
//! List of single frames
SimpleFrame *frames;
-} /* PACK_STRUCT */;
+} PACK_STRUCT;
-#include "./../include/assimp/Compiler/poppack1.h"
+#include <assimp/Compiler/poppack1.h>
// -------------------------------------------------------------------------------------
/** \struct IntFace_MDL7
@@ -716,11 +717,9 @@ struct GroupFrame
*/
struct IntFace_MDL7 {
// provide a constructor for our own convenience
- IntFace_MDL7()
- {
- // set everything to zero
- mIndices[0] = mIndices[1] = mIndices[2] = 0;
- iMatIndex[0] = iMatIndex[1] = 0;
+ IntFace_MDL7() AI_NO_EXCEPT {
+ ::memset( mIndices, 0, sizeof(uint32_t) *3);
+ ::memset( iMatIndex, 0, sizeof( unsigned int) *2);
}
//! Vertex indices
@@ -736,13 +735,11 @@ struct IntFace_MDL7 {
* which has been created from two single materials along with the
* original material indices.
*/
-struct IntMaterial_MDL7
-{
+struct IntMaterial_MDL7 {
// provide a constructor for our own convenience
- IntMaterial_MDL7()
- {
- pcMat = NULL;
- iOldMatIndices[0] = iOldMatIndices[1] = 0;
+ IntMaterial_MDL7() AI_NO_EXCEPT
+ : pcMat( nullptr ) {
+ ::memset( iOldMatIndices, 0, sizeof(unsigned int) *2);
}
//! Material instance
@@ -760,7 +757,7 @@ struct IntMaterial_MDL7
struct IntBone_MDL7 : aiBone
{
//! Default constructor
- IntBone_MDL7() : iParent (0xffff)
+ IntBone_MDL7() AI_NO_EXCEPT : iParent (0xffff)
{
pkeyPositions.reserve(30);
pkeyScalings.reserve(30);
@@ -805,12 +802,12 @@ struct IntFrameInfo_MDL7
struct IntGroupInfo_MDL7
{
//! Default constructor
- IntGroupInfo_MDL7()
+ IntGroupInfo_MDL7() AI_NO_EXCEPT
: iIndex(0)
- , pcGroup(NULL)
- , pcGroupUVs(NULL)
- , pcGroupTris(NULL)
- , pcGroupVerts(NULL)
+ , pcGroup(nullptr)
+ , pcGroupUVs(nullptr)
+ , pcGroupTris(nullptr)
+ , pcGroupVerts(nullptr)
{}
//! Construction from an existing group header
@@ -842,12 +839,12 @@ struct IntGroupInfo_MDL7
//! Holds the data that belongs to a MDL7 mesh group
struct IntGroupData_MDL7
{
- IntGroupData_MDL7()
- : pcFaces(NULL), bNeed2UV(false)
+ IntGroupData_MDL7() AI_NO_EXCEPT
+ : bNeed2UV(false)
{}
//! Array of faces that belong to the group
- MDL::IntFace_MDL7* pcFaces;
+ std::vector<MDL::IntFace_MDL7> pcFaces;
//! Array of vertex positions
std::vector<aiVector3D> vPositions;
@@ -871,10 +868,9 @@ struct IntGroupData_MDL7
// -------------------------------------------------------------------------------------
//! Holds data from an MDL7 file that is shared by all mesh groups
-struct IntSharedData_MDL7
-{
+struct IntSharedData_MDL7 {
//! Default constructor
- IntSharedData_MDL7()
+ IntSharedData_MDL7() AI_NO_EXCEPT
: apcOutBones(),
iNum()
{
diff --git a/code/MDLLoader.cpp b/code/MDLLoader.cpp
index ad63dd40b..eb067a1c9 100644
--- a/code/MDLLoader.cpp
+++ b/code/MDLLoader.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -50,11 +51,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_NO_MDL_IMPORTER
#include "MDLLoader.h"
-#include "Macros.h"
-#include "qnan.h"
+#include <assimp/Macros.h>
+#include <assimp/qnan.h>
#include "MDLDefaultColorMap.h"
#include "MD2FileData.h"
-#include "StringUtils.h"
+#include <assimp/StringUtils.h>
#include <assimp/Importer.hpp>
#include <assimp/IOSystem.hpp>
#include <assimp/scene.h>
@@ -140,7 +141,7 @@ void MDLImporter::SetupProperties(const Importer* pImp)
configFrameID = pImp->GetPropertyInteger(AI_CONFIG_IMPORT_GLOBAL_KEYFRAME,0);
}
- // AI_CONFIG_IMPORT_MDL_COLORMAP - pallette file
+ // AI_CONFIG_IMPORT_MDL_COLORMAP - palette file
configPalette = pImp->GetPropertyString(AI_CONFIG_IMPORT_MDL_COLORMAP,"colormap.lmp");
}
@@ -186,37 +187,37 @@ void MDLImporter::InternReadFile( const std::string& pFile,
// Original Quake1 format
if (AI_MDL_MAGIC_NUMBER_BE == iMagicWord || AI_MDL_MAGIC_NUMBER_LE == iMagicWord) {
- DefaultLogger::get()->debug("MDL subtype: Quake 1, magic word is IDPO");
+ ASSIMP_LOG_DEBUG("MDL subtype: Quake 1, magic word is IDPO");
iGSFileVersion = 0;
InternReadFile_Quake1();
}
// GameStudio A<old> MDL2 format - used by some test models that come with 3DGS
else if (AI_MDL_MAGIC_NUMBER_BE_GS3 == iMagicWord || AI_MDL_MAGIC_NUMBER_LE_GS3 == iMagicWord) {
- DefaultLogger::get()->debug("MDL subtype: 3D GameStudio A2, magic word is MDL2");
+ ASSIMP_LOG_DEBUG("MDL subtype: 3D GameStudio A2, magic word is MDL2");
iGSFileVersion = 2;
InternReadFile_Quake1();
}
// GameStudio A4 MDL3 format
else if (AI_MDL_MAGIC_NUMBER_BE_GS4 == iMagicWord || AI_MDL_MAGIC_NUMBER_LE_GS4 == iMagicWord) {
- DefaultLogger::get()->debug("MDL subtype: 3D GameStudio A4, magic word is MDL3");
+ ASSIMP_LOG_DEBUG("MDL subtype: 3D GameStudio A4, magic word is MDL3");
iGSFileVersion = 3;
InternReadFile_3DGS_MDL345();
}
// GameStudio A5+ MDL4 format
else if (AI_MDL_MAGIC_NUMBER_BE_GS5a == iMagicWord || AI_MDL_MAGIC_NUMBER_LE_GS5a == iMagicWord) {
- DefaultLogger::get()->debug("MDL subtype: 3D GameStudio A4, magic word is MDL4");
+ ASSIMP_LOG_DEBUG("MDL subtype: 3D GameStudio A4, magic word is MDL4");
iGSFileVersion = 4;
InternReadFile_3DGS_MDL345();
}
// GameStudio A5+ MDL5 format
else if (AI_MDL_MAGIC_NUMBER_BE_GS5b == iMagicWord || AI_MDL_MAGIC_NUMBER_LE_GS5b == iMagicWord) {
- DefaultLogger::get()->debug("MDL subtype: 3D GameStudio A5, magic word is MDL5");
+ ASSIMP_LOG_DEBUG("MDL subtype: 3D GameStudio A5, magic word is MDL5");
iGSFileVersion = 5;
InternReadFile_3DGS_MDL345();
}
// GameStudio A7 MDL7 format
else if (AI_MDL_MAGIC_NUMBER_BE_GS7 == iMagicWord || AI_MDL_MAGIC_NUMBER_LE_GS7 == iMagicWord) {
- DefaultLogger::get()->debug("MDL subtype: 3D GameStudio A7, magic word is MDL7");
+ ASSIMP_LOG_DEBUG("MDL subtype: 3D GameStudio A7, magic word is MDL7");
iGSFileVersion = 7;
InternReadFile_3DGS_MDL7();
}
@@ -224,7 +225,7 @@ void MDLImporter::InternReadFile( const std::string& pFile,
else if (AI_MDL_MAGIC_NUMBER_BE_HL2a == iMagicWord || AI_MDL_MAGIC_NUMBER_LE_HL2a == iMagicWord ||
AI_MDL_MAGIC_NUMBER_BE_HL2b == iMagicWord || AI_MDL_MAGIC_NUMBER_LE_HL2b == iMagicWord)
{
- DefaultLogger::get()->debug("MDL subtype: Source(tm) Engine, magic word is IDST/IDSQ");
+ ASSIMP_LOG_DEBUG("MDL subtype: Source(tm) Engine, magic word is IDST/IDSQ");
iGSFileVersion = 0;
InternReadFile_HL2();
}
@@ -257,7 +258,7 @@ void MDLImporter::SizeCheck(const void* szPos)
}
// ------------------------------------------------------------------------------------------------
-// Just for debgging purposes
+// Just for debugging purposes
void MDLImporter::SizeCheck(const void* szPos, const char* szFile, unsigned int iLine)
{
ai_assert(NULL != szFile);
@@ -297,20 +298,20 @@ void MDLImporter::ValidateHeader_Quake1(const MDL::Header* pcHeader)
if (!this->iGSFileVersion)
{
if (pcHeader->num_verts > AI_MDL_MAX_VERTS)
- DefaultLogger::get()->warn("Quake 1 MDL model has more than AI_MDL_MAX_VERTS vertices");
+ ASSIMP_LOG_WARN("Quake 1 MDL model has more than AI_MDL_MAX_VERTS vertices");
if (pcHeader->num_tris > AI_MDL_MAX_TRIANGLES)
- DefaultLogger::get()->warn("Quake 1 MDL model has more than AI_MDL_MAX_TRIANGLES triangles");
+ ASSIMP_LOG_WARN("Quake 1 MDL model has more than AI_MDL_MAX_TRIANGLES triangles");
if (pcHeader->num_frames > AI_MDL_MAX_FRAMES)
- DefaultLogger::get()->warn("Quake 1 MDL model has more than AI_MDL_MAX_FRAMES frames");
+ ASSIMP_LOG_WARN("Quake 1 MDL model has more than AI_MDL_MAX_FRAMES frames");
// (this does not apply for 3DGS MDLs)
if (!this->iGSFileVersion && pcHeader->version != AI_MDL_VERSION)
- DefaultLogger::get()->warn("Quake 1 MDL model has an unknown version: AI_MDL_VERSION (=6) is "
+ ASSIMP_LOG_WARN("Quake 1 MDL model has an unknown version: AI_MDL_VERSION (=6) is "
"the expected file format version");
if(pcHeader->num_skins && (!pcHeader->skinwidth || !pcHeader->skinheight))
- DefaultLogger::get()->warn("Skin width or height are 0");
+ ASSIMP_LOG_WARN("Skin width or height are 0");
}
}
@@ -340,9 +341,9 @@ void FlipQuakeHeader(BE_NCONST MDL::Header* pcHeader)
// ------------------------------------------------------------------------------------------------
// Read a Quake 1 file
-void MDLImporter::InternReadFile_Quake1( )
-{
+void MDLImporter::InternReadFile_Quake1() {
ai_assert(NULL != pScene);
+
BE_NCONST MDL::Header *pcHeader = (BE_NCONST MDL::Header*)this->mBuffer;
#ifdef AI_BUILD_BIG_ENDIAN
@@ -355,9 +356,11 @@ void MDLImporter::InternReadFile_Quake1( )
const unsigned char* szCurrent = (const unsigned char*)(pcHeader+1);
// need to read all textures
- for (unsigned int i = 0; i < (unsigned int)pcHeader->num_skins;++i)
- {
- union{BE_NCONST MDL::Skin* pcSkin;BE_NCONST MDL::GroupSkin* pcGroupSkin;};
+ for ( unsigned int i = 0; i < (unsigned int)pcHeader->num_skins; ++i) {
+ union {
+ BE_NCONST MDL::Skin* pcSkin;
+ BE_NCONST MDL::GroupSkin* pcGroupSkin;
+ };
if (szCurrent + sizeof(MDL::Skin) > this->mBuffer + this->iFileSize) {
throw DeadlyImportError("[Quake 1 MDL] Unexpected EOF");
}
@@ -365,17 +368,15 @@ void MDLImporter::InternReadFile_Quake1( )
AI_SWAP4( pcSkin->group );
- // Quake 1 groupskins
- if (1 == pcSkin->group)
- {
+ // Quake 1 group-skins
+ if (1 == pcSkin->group) {
AI_SWAP4( pcGroupSkin->nb );
// need to skip multiple images
const unsigned int iNumImages = (unsigned int)pcGroupSkin->nb;
szCurrent += sizeof(uint32_t) * 2;
- if (0 != iNumImages)
- {
+ if (0 != iNumImages) {
if (!i) {
// however, create only one output image (the first)
this->CreateTextureARGB8_3DGS_MDL3(szCurrent + iNumImages * sizeof(float));
@@ -384,10 +385,7 @@ void MDLImporter::InternReadFile_Quake1( )
szCurrent += pcHeader->skinheight * pcHeader->skinwidth +
sizeof(float) * iNumImages;
}
- }
- // 3DGS has a few files that are using other 3DGS like texture formats here
- else
- {
+ } else {
szCurrent += sizeof(uint32_t);
unsigned int iSkip = i ? UINT_MAX : 0;
CreateTexture_3DGS_MDL4(szCurrent,pcSkin->group,&iSkip);
@@ -407,16 +405,21 @@ void MDLImporter::InternReadFile_Quake1( )
BE_NCONST MDL::Frame* pcFrames = (BE_NCONST MDL::Frame*)szCurrent;
BE_NCONST MDL::SimpleFrame* pcFirstFrame;
- if (0 == pcFrames->type)
- {
+ if (0 == pcFrames->type) {
// get address of single frame
pcFirstFrame = &pcFrames->frame;
- }
- else
- {
+ } else {
// get the first frame in the group
+
+#if 1
+ // FIXME: the cast is wrong and cause a warning on clang 5.0
+ // disable this code for now, fix it later
+ ai_assert(false && "Bad pointer cast");
+ pcFirstFrame = nullptr; // Workaround: msvc++ C4703 error
+#else
BE_NCONST MDL::GroupFrame* pcFrames2 = (BE_NCONST MDL::GroupFrame*)pcFrames;
pcFirstFrame = (BE_NCONST MDL::SimpleFrame*)(&pcFrames2->time + pcFrames->type);
+#endif
}
BE_NCONST MDL::Vertex* pcVertices = (BE_NCONST MDL::Vertex*) ((pcFirstFrame->name) + sizeof(pcFirstFrame->name));
VALIDATE_FILE_SIZE((const unsigned char*)(pcVertices + pcHeader->num_verts));
@@ -479,7 +482,7 @@ void MDLImporter::InternReadFile_Quake1( )
if (iIndex >= (unsigned int)pcHeader->num_verts)
{
iIndex = pcHeader->num_verts-1;
- DefaultLogger::get()->warn("Index overflow in Q1-MDL vertex list.");
+ ASSIMP_LOG_WARN("Index overflow in Q1-MDL vertex list.");
}
aiVector3D& vec = pcMesh->mVertices[iCurrent];
@@ -690,7 +693,7 @@ void MDLImporter::InternReadFile_3DGS_MDL345( )
unsigned int iIndex = pcTriangles->index_xyz[c];
if (iIndex >= (unsigned int)pcHeader->num_verts) {
iIndex = pcHeader->num_verts-1;
- DefaultLogger::get()->warn("Index overflow in MDLn vertex list");
+ ASSIMP_LOG_WARN("Index overflow in MDLn vertex list");
}
aiVector3D& vec = pcMesh->mVertices[iCurrent];
@@ -745,7 +748,7 @@ void MDLImporter::InternReadFile_3DGS_MDL345( )
unsigned int iIndex = pcTriangles->index_xyz[c];
if (iIndex >= (unsigned int)pcHeader->num_verts) {
iIndex = pcHeader->num_verts-1;
- DefaultLogger::get()->warn("Index overflow in MDLn vertex list");
+ ASSIMP_LOG_WARN("Index overflow in MDLn vertex list");
}
aiVector3D& vec = pcMesh->mVertices[iCurrent];
@@ -796,7 +799,7 @@ void MDLImporter::ImportUVCoordinate_3DGS_MDL345(
// validate UV indices
if (iIndex >= (unsigned int) pcHeader->synctype) {
iIndex = pcHeader->synctype-1;
- DefaultLogger::get()->warn("Index overflow in MDLn UV coord list");
+ ASSIMP_LOG_WARN("Index overflow in MDLn UV coord list");
}
float s = (float)pcSrc[iIndex].u;
@@ -833,7 +836,7 @@ void MDLImporter::CalculateUVCoordinates_MDL5()
iWidth = (unsigned int)*piPtr;
if (!iHeight || !iWidth)
{
- DefaultLogger::get()->warn("Either the width or the height of the "
+ ASSIMP_LOG_WARN("Either the width or the height of the "
"embedded DDS texture is zero. Unable to compute final texture "
"coordinates. The texture coordinates remain in their original "
"0-x/0-y (x,y = texture size) range.");
@@ -986,7 +989,7 @@ MDL::IntBone_MDL7** MDLImporter::LoadBones_3DGS_MDL7()
AI_MDL7_BONE_STRUCT_SIZE__NAME_IS_32_CHARS != pcHeader->bone_stc_size &&
AI_MDL7_BONE_STRUCT_SIZE__NAME_IS_NOT_THERE != pcHeader->bone_stc_size)
{
- DefaultLogger::get()->warn("Unknown size of bone data structure");
+ ASSIMP_LOG_WARN("Unknown size of bone data structure");
return NULL;
}
@@ -1024,7 +1027,7 @@ void MDLImporter::ReadFaces_3DGS_MDL7(const MDL::IntGroupInfo_MDL7& groupInfo,
if(iIndex > (unsigned int)groupInfo.pcGroup->numverts) {
// (we might need to read this section a second time - to process frame vertices correctly)
pcGroupTris->v_index[c] = iIndex = groupInfo.pcGroup->numverts-1;
- DefaultLogger::get()->warn("Index overflow in MDL7 vertex list");
+ ASSIMP_LOG_WARN("Index overflow in MDL7 vertex list");
}
// write the output face index
@@ -1069,7 +1072,7 @@ void MDLImporter::ReadFaces_3DGS_MDL7(const MDL::IntGroupInfo_MDL7& groupInfo,
iIndex = pcGroupTris->skinsets[0].st_index[c];
if(iIndex > (unsigned int)groupInfo.pcGroup->num_stpts) {
iIndex = groupInfo.pcGroup->num_stpts-1;
- DefaultLogger::get()->warn("Index overflow in MDL7 UV coordinate list (#1)");
+ ASSIMP_LOG_WARN("Index overflow in MDL7 UV coordinate list (#1)");
}
float u = groupInfo.pcGroupUVs[iIndex].u;
@@ -1096,7 +1099,7 @@ void MDLImporter::ReadFaces_3DGS_MDL7(const MDL::IntGroupInfo_MDL7& groupInfo,
iIndex = pcGroupTris->skinsets[1].st_index[c];
if(iIndex > (unsigned int)groupInfo.pcGroup->num_stpts) {
iIndex = groupInfo.pcGroup->num_stpts-1;
- DefaultLogger::get()->warn("Index overflow in MDL7 UV coordinate list (#2)");
+ ASSIMP_LOG_WARN("Index overflow in MDL7 UV coordinate list (#2)");
}
float u = groupInfo.pcGroupUVs[ iIndex ].u;
@@ -1132,7 +1135,9 @@ bool MDLImporter::ProcessFrames_3DGS_MDL7(const MDL::IntGroupInfo_MDL7& groupInf
const unsigned char* szCurrent,
const unsigned char** szCurrentOut)
{
- ai_assert(NULL != szCurrent && NULL != szCurrentOut);
+ ai_assert( nullptr != szCurrent );
+ ai_assert( nullptr != szCurrentOut);
+
const MDL::Header_MDL7 *pcHeader = (const MDL::Header_MDL7*)mBuffer;
// if we have no bones we can simply skip all frames,
@@ -1149,7 +1154,7 @@ bool MDLImporter::ProcessFrames_3DGS_MDL7(const MDL::IntGroupInfo_MDL7& groupInf
frame.pcFrame->transmatrix_count * pcHeader->bonetrans_stc_size;
if (((const char*)szCurrent - (const char*)pcHeader) + iAdd > (unsigned int)pcHeader->data_size) {
- DefaultLogger::get()->warn("Index overflow in frame area. "
+ ASSIMP_LOG_WARN("Index overflow in frame area. "
"Ignoring all frames and all further mesh groups, too.");
// don't parse more groups if we can't even read one
@@ -1167,7 +1172,7 @@ bool MDLImporter::ProcessFrames_3DGS_MDL7(const MDL::IntGroupInfo_MDL7& groupInf
uint16_t iIndex = _AI_MDL7_ACCESS(pcFrameVertices,qq,pcHeader->framevertex_stc_size,MDL::Vertex_MDL7).vertindex;
AI_SWAP2(iIndex);
if (iIndex >= groupInfo.pcGroup->numverts) {
- DefaultLogger::get()->warn("Invalid vertex index in frame vertex section");
+ ASSIMP_LOG_WARN("Invalid vertex index in frame vertex section");
continue;
}
@@ -1253,7 +1258,7 @@ void MDLImporter::SortByMaterials_3DGS_MDL7(
// sometimes MED writes -1, but normally only if there is only
// one skin assigned. No warning in this case
if(0xFFFFFFFF != groupData.pcFaces[iFace].iMatIndex[0])
- DefaultLogger::get()->warn("Index overflow in MDL7 material list [#0]");
+ ASSIMP_LOG_WARN("Index overflow in MDL7 material list [#0]");
}
else splitGroupData.aiSplit[groupData.pcFaces[iFace].
iMatIndex[0]]->push_back(iFace);
@@ -1278,7 +1283,7 @@ void MDLImporter::SortByMaterials_3DGS_MDL7(
// sometimes MED writes -1, but normally only if there is only
// one skin assigned. No warning in this case
if(UINT_MAX != iMatIndex)
- DefaultLogger::get()->warn("Index overflow in MDL7 material list [#1]");
+ ASSIMP_LOG_WARN("Index overflow in MDL7 material list [#1]");
iMatIndex = iNumMaterials-1;
}
unsigned int iMatIndex2 = groupData.pcFaces[iFace].iMatIndex[1];
@@ -1288,7 +1293,7 @@ void MDLImporter::SortByMaterials_3DGS_MDL7(
if (iMatIndex2 >= iNumMaterials) {
// sometimes MED writes -1, but normally only if there is only
// one skin assigned. No warning in this case
- DefaultLogger::get()->warn("Index overflow in MDL7 material list [#2]");
+ ASSIMP_LOG_WARN("Index overflow in MDL7 material list [#2]");
iMatIndex2 = iNumMaterials-1;
}
@@ -1410,7 +1415,7 @@ void MDLImporter::InternReadFile_3DGS_MDL7( )
if (1 != groupInfo.pcGroup->typ) {
// Not a triangle-based mesh
- DefaultLogger::get()->warn("[3DGS MDL7] Not a triangle mesh group. Continuing happily");
+ ASSIMP_LOG_WARN("[3DGS MDL7] Not a triangle mesh group. Continuing happily");
}
// store the name of the group
@@ -1492,13 +1497,13 @@ void MDLImporter::InternReadFile_3DGS_MDL7( )
groupData.vTextureCoords1.resize(iNumVertices,aiVector3D());
// check whether the triangle data structure is large enough
- // to contain a second UV coodinate set
+ // to contain a second UV coordinate set
if (pcHeader->triangle_stc_size >= AI_MDL7_TRIANGLE_STD_SIZE_TWO_UV) {
groupData.vTextureCoords2.resize(iNumVertices,aiVector3D());
groupData.bNeed2UV = true;
}
}
- groupData.pcFaces = new MDL::IntFace_MDL7[groupInfo.pcGroup->numtris];
+ groupData.pcFaces.resize(groupInfo.pcGroup->numtris);
// read all faces into the preallocated arrays
ReadFaces_3DGS_MDL7(groupInfo, groupData);
@@ -1512,7 +1517,7 @@ void MDLImporter::InternReadFile_3DGS_MDL7( )
sharedData.abNeedMaterials[qq] = true;
}
}
- else DefaultLogger::get()->warn("[3DGS MDL7] Mesh group consists of 0 "
+ else ASSIMP_LOG_WARN("[3DGS MDL7] Mesh group consists of 0 "
"vertices or faces. It will be skipped.");
// process all frames and generate output meshes
@@ -1660,7 +1665,7 @@ void MDLImporter::ParseBoneTrafoKeys_3DGS_MDL7(
// read all transformation matrices
for (unsigned int iTrafo = 0; iTrafo < frame.pcFrame->transmatrix_count;++iTrafo) {
if(pcBoneTransforms->bone_index >= pcHeader->bones_num) {
- DefaultLogger::get()->warn("Index overflow in frame area. "
+ ASSIMP_LOG_WARN("Index overflow in frame area. "
"Unable to parse this bone transformation");
}
else {
@@ -1672,7 +1677,7 @@ void MDLImporter::ParseBoneTrafoKeys_3DGS_MDL7(
}
}
else {
- DefaultLogger::get()->warn("Ignoring animation keyframes in groups != 0");
+ ASSIMP_LOG_WARN("Ignoring animation keyframes in groups != 0");
}
}
}
@@ -1890,7 +1895,7 @@ void MDLImporter::GenerateOutputMeshes_3DGS_MDL7(
unsigned int iBone = groupData.aiBones[ oldFace.mIndices[c] ];
if (UINT_MAX != iBone) {
if (iBone >= iNumOutBones) {
- DefaultLogger::get()->error("Bone index overflow. "
+ ASSIMP_LOG_ERROR("Bone index overflow. "
"The bone index of a vertex exceeds the allowed range. ");
iBone = iNumOutBones-1;
}
diff --git a/code/MDLLoader.h b/code/MDLLoader.h
index 8709426e6..f1504beea 100644
--- a/code/MDLLoader.h
+++ b/code/MDLLoader.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -47,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_MDLLOADER_H_INCLUDED
#define AI_MDLLOADER_H_INCLUDED
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
#include "MDLFileData.h"
#include "HalfLifeFileData.h"
diff --git a/code/MDLMaterialLoader.cpp b/code/MDLMaterialLoader.cpp
index 91dcb49cc..2c21b188b 100644
--- a/code/MDLMaterialLoader.cpp
+++ b/code/MDLMaterialLoader.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -48,20 +49,22 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// internal headers
#include "MDLLoader.h"
#include "MDLDefaultColorMap.h"
-#include "StringUtils.h"
+#include <assimp/StringUtils.h>
#include <assimp/texture.h>
#include <assimp/IOSystem.hpp>
#include <assimp/DefaultLogger.hpp>
#include <assimp/scene.h>
#include <assimp/Defines.h>
-#include "qnan.h"
+#include <assimp/qnan.h>
+
+#include <memory>
using namespace Assimp;
static aiTexel* const bad_texel = reinterpret_cast<aiTexel*>(SIZE_MAX);
// ------------------------------------------------------------------------------------------------
-// Find a suitable pallette file or take the default one
+// Find a suitable palette file or take the default one
void MDLImporter::SearchPalette(const unsigned char** pszColorMap)
{
// now try to find the color map in the current directory
@@ -72,10 +75,11 @@ void MDLImporter::SearchPalette(const unsigned char** pszColorMap)
{
if (pcStream->FileSize() >= 768)
{
- unsigned char* colorMap = new unsigned char[256*3];
+ size_t len = 256 * 3;
+ unsigned char* colorMap = new unsigned char[len];
szColorMap = colorMap;
- pcStream->Read(colorMap,256*3,1);
- DefaultLogger::get()->info("Found valid colormap.lmp in directory. "
+ pcStream->Read(colorMap, len,1);
+ ASSIMP_LOG_INFO("Found valid colormap.lmp in directory. "
"It will be used to decode embedded textures in palletized formats.");
}
delete pcStream;
@@ -183,7 +187,7 @@ void MDLImporter::CreateTexture_3DGS_MDL4(const unsigned char* szData,
if (iType == 1 || iType > 3)
{
- DefaultLogger::get()->error("Unsupported texture file format");
+ ASSIMP_LOG_ERROR("Unsupported texture file format");
return;
}
@@ -489,7 +493,7 @@ void MDLImporter::ParseSkinLump_3DGS_MDL7(
unsigned int iWidth,
unsigned int iHeight)
{
- aiTexture* pcNew = nullptr;
+ std::unique_ptr<aiTexture> pcNew;
// get the type of the skin
unsigned int iMasked = (unsigned int)(iType & 0xF);
@@ -505,11 +509,11 @@ void MDLImporter::ParseSkinLump_3DGS_MDL7(
// ***** EMBEDDED DDS FILE *****
if (1 != iHeight)
{
- DefaultLogger::get()->warn("Found a reference to an embedded DDS texture, "
+ ASSIMP_LOG_WARN("Found a reference to an embedded DDS texture, "
"but texture height is not equal to 1, which is not supported by MED");
}
- pcNew = new aiTexture();
+ pcNew.reset(new aiTexture());
pcNew->mHeight = 0;
pcNew->mWidth = iWidth;
@@ -528,7 +532,7 @@ void MDLImporter::ParseSkinLump_3DGS_MDL7(
// ***** REFERENCE TO EXTERNAL FILE *****
if (1 != iHeight)
{
- DefaultLogger::get()->warn("Found a reference to an external texture, "
+ ASSIMP_LOG_WARN("Found a reference to an external texture, "
"but texture height is not equal to 1, which is not supported by MED");
}
@@ -546,10 +550,10 @@ void MDLImporter::ParseSkinLump_3DGS_MDL7(
}
else if (iMasked || !iType || (iType && iWidth && iHeight))
{
- pcNew = new aiTexture();
+ pcNew.reset(new aiTexture());
if (!iHeight || !iWidth)
{
- DefaultLogger::get()->warn("Found embedded texture, but its width "
+ ASSIMP_LOG_WARN("Found embedded texture, but its width "
"an height are both 0. Is this a joke?");
// generate an empty chess pattern
@@ -577,7 +581,7 @@ void MDLImporter::ParseSkinLump_3DGS_MDL7(
pcNew->mHeight = iHeight;
unsigned int iSkip = 0;
- ParseTextureColorData(szCurrent,iMasked,&iSkip,pcNew);
+ ParseTextureColorData(szCurrent,iMasked,&iSkip,pcNew.get());
// skip length of texture data
szCurrent += iSkip;
@@ -588,7 +592,7 @@ void MDLImporter::ParseSkinLump_3DGS_MDL7(
// texture instead of material colors ... posssible they have
// been converted to MDL7 from other formats, such as MDL5
aiColor4D clrTexture;
- if (pcNew)clrTexture = ReplaceTextureWithColor(pcNew);
+ if (pcNew)clrTexture = ReplaceTextureWithColor(pcNew.get());
else clrTexture.r = get_qnan();
// check whether a material definition is contained in the skin
@@ -665,7 +669,9 @@ void MDLImporter::ParseSkinLump_3DGS_MDL7(
if (0.0f != pcMatIn->Power)
{
iShadingMode = (int)aiShadingMode_Phong;
- pcMatOut->AddProperty<float>(&pcMatIn->Power,1,AI_MATKEY_SHININESS);
+ // pcMatIn is packed, we can't form pointers to its members
+ float power = pcMatIn->Power;
+ pcMatOut->AddProperty<float>(&power,1,AI_MATKEY_SHININESS);
}
pcMatOut->AddProperty<int>(&iShadingMode,1,AI_MATKEY_SHADING_MODEL);
}
@@ -678,8 +684,7 @@ void MDLImporter::ParseSkinLump_3DGS_MDL7(
// we don't need the texture anymore
if (is_not_qnan(clrTexture.r))
{
- delete pcNew;
- pcNew = NULL;
+ pcNew.reset();
}
// If an ASCII effect description (HLSL?) is contained in the file,
@@ -714,7 +719,7 @@ void MDLImporter::ParseSkinLump_3DGS_MDL7(
{
pScene->mNumTextures = 1;
pScene->mTextures = new aiTexture*[1];
- pScene->mTextures[0] = pcNew;
+ pScene->mTextures[0] = pcNew.release();
}
else
{
@@ -724,16 +729,13 @@ void MDLImporter::ParseSkinLump_3DGS_MDL7(
pScene->mTextures[i] = pc[i];
}
- pScene->mTextures[pScene->mNumTextures] = pcNew;
+ pScene->mTextures[pScene->mNumTextures] = pcNew.release();
pScene->mNumTextures++;
delete[] pc;
}
}
VALIDATE_FILE_SIZE(szCurrent);
*szCurrentOut = szCurrent;
- if ( nullptr != pcNew ) {
- delete pcNew;
- }
}
// ------------------------------------------------------------------------------------------------
diff --git a/code/MMDCpp14.h b/code/MMDCpp14.h
index f6f81f827..5ec2fd975 100644
--- a/code/MMDCpp14.h
+++ b/code/MMDCpp14.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/MMDImporter.cpp b/code/MMDImporter.cpp
index 149761c34..84b9e35a6 100644
--- a/code/MMDImporter.cpp
+++ b/code/MMDImporter.cpp
@@ -72,18 +72,16 @@ using namespace std;
// ------------------------------------------------------------------------------------------------
// Default constructor
MMDImporter::MMDImporter()
- : m_Buffer(),
- // m_pRootObject( NULL ),
- m_strAbsPath("") {
- DefaultIOSystem io;
- m_strAbsPath = io.getOsSeparator();
+: m_Buffer()
+, m_strAbsPath("") {
+ DefaultIOSystem io;
+ m_strAbsPath = io.getOsSeparator();
}
// ------------------------------------------------------------------------------------------------
// Destructor.
MMDImporter::~MMDImporter() {
- // delete m_pRootObject;
- // m_pRootObject = NULL;
+ // empty
}
// ------------------------------------------------------------------------------------------------
@@ -96,8 +94,7 @@ bool MMDImporter::CanRead(const std::string &pFile, IOSystem *pIOHandler,
} else // Check file Header
{
static const char *pTokens[] = {"PMX "};
- return BaseImporter::SearchFileHeaderForToken(pIOHandler, pFile, pTokens,
- 1);
+ return BaseImporter::SearchFileHeaderForToken(pIOHandler, pFile, pTokens, 1);
}
}
@@ -107,7 +104,7 @@ const aiImporterDesc *MMDImporter::GetInfo() const { return &desc; }
// ------------------------------------------------------------------------------------------------
// MMD import implementation
void MMDImporter::InternReadFile(const std::string &file, aiScene *pScene,
- IOSystem *pIOHandler) {
+ IOSystem * /*pIOHandler*/) {
// Read file by istream
std::filebuf fb;
if (!fb.open(file, std::ios::in | std::ios::binary)) {
@@ -118,7 +115,7 @@ void MMDImporter::InternReadFile(const std::string &file, aiScene *pScene,
// Get the file-size and validate it, throwing an exception when fails
fileStream.seekg(0, fileStream.end);
- size_t fileSize = fileStream.tellg();
+ size_t fileSize = static_cast<size_t>(fileStream.tellg());
fileStream.seekg(0, fileStream.beg);
if (fileSize < sizeof(pmx::PmxModel)) {
@@ -141,8 +138,6 @@ void MMDImporter::CreateDataFromImport(const pmx::PmxModel *pModel,
aiNode *pNode = new aiNode;
if (!pModel->model_name.empty()) {
pNode->mName.Set(pModel->model_name);
- } else {
- ai_assert(false);
}
pScene->mRootNode = pNode;
@@ -170,7 +165,7 @@ void MMDImporter::CreateDataFromImport(const pmx::PmxModel *pModel,
}
// create node hierarchy for bone position
- aiNode **ppNode = new aiNode *[pModel->bone_count];
+ std::unique_ptr<aiNode *[]> ppNode(new aiNode *[pModel->bone_count]);
for (auto i = 0; i < pModel->bone_count; i++) {
ppNode[i] = new aiNode(pModel->bones[i].bone_name);
}
@@ -179,9 +174,9 @@ void MMDImporter::CreateDataFromImport(const pmx::PmxModel *pModel,
const pmx::PmxBone &bone = pModel->bones[i];
if (bone.parent_index < 0) {
- pScene->mRootNode->addChildren(1, ppNode + i);
+ pScene->mRootNode->addChildren(1, ppNode.get() + i);
} else {
- ppNode[bone.parent_index]->addChildren(1, ppNode + i);
+ ppNode[bone.parent_index]->addChildren(1, ppNode.get() + i);
aiVector3D v3 = aiVector3D(
bone.position[0] - pModel->bones[bone.parent_index].position[0],
@@ -219,7 +214,7 @@ aiMesh *MMDImporter::CreateMesh(const pmx::PmxModel *pModel,
pMesh->mNumFaces = indexCount / 3;
pMesh->mFaces = new aiFace[pMesh->mNumFaces];
- const int numIndices = 3; // trianglular face
+ const int numIndices = 3; // triangular face
for (unsigned int index = 0; index < pMesh->mNumFaces; index++) {
pMesh->mFaces[index].mNumIndices = numIndices;
unsigned int *indices = new unsigned int[numIndices];
@@ -278,7 +273,7 @@ aiMesh *MMDImporter::CreateMesh(const pmx::PmxModel *pModel,
bone_vertex_map[vsBDEF2_ptr->bone_index1].push_back(
aiVertexWeight(index, vsBDEF2_ptr->bone_weight));
bone_vertex_map[vsBDEF2_ptr->bone_index2].push_back(
- aiVertexWeight(index, 1.0 - vsBDEF2_ptr->bone_weight));
+ aiVertexWeight(index, 1.0f - vsBDEF2_ptr->bone_weight));
break;
case pmx::PmxVertexSkinningType::BDEF4:
bone_vertex_map[vsBDEF4_ptr->bone_index1].push_back(
@@ -295,7 +290,7 @@ aiMesh *MMDImporter::CreateMesh(const pmx::PmxModel *pModel,
bone_vertex_map[vsSDEF_ptr->bone_index1].push_back(
aiVertexWeight(index, vsSDEF_ptr->bone_weight));
bone_vertex_map[vsSDEF_ptr->bone_index2].push_back(
- aiVertexWeight(index, 1.0 - vsSDEF_ptr->bone_weight));
+ aiVertexWeight(index, 1.0f - vsSDEF_ptr->bone_weight));
break;
case pmx::PmxVertexSkinningType::QDEF:
const auto vsQDEF_ptr =
@@ -325,9 +320,11 @@ aiMesh *MMDImporter::CreateMesh(const pmx::PmxModel *pModel,
aiMatrix4x4::Translation(-pos, pBone->mOffsetMatrix);
auto it = bone_vertex_map.find(ii);
if (it != bone_vertex_map.end()) {
- pBone->mNumWeights = it->second.size();
- pBone->mWeights = it->second.data();
- it->second.swap(*(new vector<aiVertexWeight>));
+ pBone->mNumWeights = static_cast<unsigned int>(it->second.size());
+ pBone->mWeights = new aiVertexWeight[pBone->mNumWeights];
+ for (unsigned int j = 0; j < pBone->mNumWeights; j++) {
+ pBone->mWeights[j] = it->second[j];
+ }
}
bone_ptr_ptr[ii] = pBone;
}
@@ -354,8 +351,11 @@ aiMaterial *MMDImporter::CreateMaterial(const pmx::PmxMaterial *pMat,
float shininess = pMat->specularlity;
mat->AddProperty(&shininess, 1, AI_MATKEY_SHININESS_STRENGTH);
- aiString texture_path(pModel->textures[pMat->diffuse_texture_index]);
- mat->AddProperty(&texture_path, AI_MATKEY_TEXTURE(aiTextureType_DIFFUSE, 0));
+ if(pMat->diffuse_texture_index >= 0) {
+ aiString texture_path(pModel->textures[pMat->diffuse_texture_index]);
+ mat->AddProperty(&texture_path, AI_MATKEY_TEXTURE(aiTextureType_DIFFUSE, 0));
+ }
+
int mapping_uvwsrc = 0;
mat->AddProperty(&mapping_uvwsrc, 1,
AI_MATKEY_UVWSRC(aiTextureType_DIFFUSE, 0));
diff --git a/code/MMDImporter.h b/code/MMDImporter.h
index e660abaaa..4ee94eeb0 100644
--- a/code/MMDImporter.h
+++ b/code/MMDImporter.h
@@ -40,7 +40,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef MMD_FILE_IMPORTER_H_INC
#define MMD_FILE_IMPORTER_H_INC
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
#include "MMDPmxParser.h"
#include <assimp/material.h>
#include <vector>
diff --git a/code/MMDPmdParser.h b/code/MMDPmdParser.h
index 44b64585a..d61a355fb 100644
--- a/code/MMDPmdParser.h
+++ b/code/MMDPmdParser.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -49,17 +50,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace pmd
{
- /// ヘッダ
class PmdHeader
{
public:
- /// モデルå
std::string name;
- /// モデルå(英語)
std::string name_english;
- /// コメント
std::string comment;
- /// コメント(英語)
std::string comment_english;
bool Read(std::ifstream* stream)
@@ -83,26 +79,19 @@ namespace pmd
}
};
- /// 頂点
class PmdVertex
{
public:
- /// ä½ç½®
float position[3];
- /// 法線
float normal[3];
- /// UV座標
float uv[2];
- /// 関連ボーンインデックス
uint16_t bone_index[2];
- /// ボーンウェイト
uint8_t bone_weight;
- /// エッジä¸å¯è¦–
bool edge_invisible;
bool Read(std::ifstream* stream)
@@ -117,27 +106,17 @@ namespace pmd
}
};
- /// æ質
class PmdMaterial
{
public:
- /// 減衰色
float diffuse[4];
- /// 光沢度
float power;
- /// 光沢色
float specular[3];
- /// 環境色
float ambient[3];
- /// トーンインデックス
uint8_t toon_index;
- /// エッジ
uint8_t edge_flag;
- /// インデックス数
uint32_t index_count;
- /// テクスãƒãƒ£ãƒ•ã‚¡ã‚¤ãƒ«å
std::string texture_filename;
- /// スフィアファイルå
std::string sphere_filename;
bool Read(std::ifstream* stream)
@@ -158,7 +137,7 @@ namespace pmd
sphere_filename.clear();
}
else {
- *pstar = (char)NULL;
+ *pstar = 0;
texture_filename = std::string(buffer);
sphere_filename = std::string(pstar+1);
}
@@ -180,23 +159,15 @@ namespace pmd
RotationMovement
};
- /// ボーン
class PmdBone
{
public:
- /// ボーンå
std::string name;
- /// ボーンå(英語)
std::string name_english;
- /// 親ボーン番å·
uint16_t parent_bone_index;
- /// 末端ボーン番å·
uint16_t tail_pos_bone_index;
- /// ボーン種類
BoneType bone_type;
- /// IKボーン番å·
uint16_t ik_parent_bone_index;
- /// ボーンã®ãƒ˜ãƒƒãƒ‰ã®ä½ç½®
float bone_head_pos[3];
void Read(std::istream *stream)
@@ -219,19 +190,13 @@ namespace pmd
}
};
- /// IK
class PmdIk
{
public:
- /// IKボーン番å·
uint16_t ik_bone_index;
- /// IKターゲットボーン番å·
uint16_t target_bone_index;
- /// å†å¸°å›žæ•°
uint16_t interations;
- /// 角度制é™
float angle_limit;
- /// 影響下ボーン番å·
std::vector<uint16_t> ik_child_bone_index;
void Read(std::istream *stream)
@@ -303,7 +268,6 @@ namespace pmd
}
};
- /// ボーン枠用ã®æž å
class PmdBoneDispName
{
public:
@@ -338,59 +302,36 @@ namespace pmd
}
};
- /// è¡çªå½¢çŠ¶
enum class RigidBodyShape : uint8_t
{
- /// çƒ
Sphere = 0,
- /// 直方体
Box = 1,
- /// カプセル
Cpusel = 2
};
- /// 剛体タイプ
enum class RigidBodyType : uint8_t
{
- /// ボーン追従
BoneConnected = 0,
- /// 物ç†æ¼”ç®—
Physics = 1,
- /// 物ç†æ¼”ç®—(Boneä½ç½®åˆã›)
ConnectedPhysics = 2
};
- /// 剛体
class PmdRigidBody
{
public:
- /// åå‰
std::string name;
- /// 関連ボーン番å·
uint16_t related_bone_index;
- /// グループ番å·
uint8_t group_index;
- /// マスク
uint16_t mask;
- /// 形状
RigidBodyShape shape;
- /// 大ãã•
float size[3];
- /// ä½ç½®
float position[3];
- /// 回転
float orientation[3];
- /// 質é‡
float weight;
- /// 移動ダンピング
float linear_damping;
- /// 回転ダンピング
float anglar_damping;
- /// å発係数
float restitution;
- /// 摩擦係数
float friction;
- /// 演算方法
RigidBodyType rigid_type;
void Read(std::istream *stream)
@@ -414,31 +355,19 @@ namespace pmd
}
};
- /// 剛体ã®æ‹˜æŸ
class PmdConstraint
{
public:
- /// åå‰
std::string name;
- /// 剛体Aã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹
uint32_t rigid_body_index_a;
- /// 剛体Bã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹
uint32_t rigid_body_index_b;
- /// ä½ç½®
float position[3];
- /// 回転
float orientation[3];
- /// 最å°ç§»å‹•åˆ¶é™
float linear_lower_limit[3];
- /// 最大移動制é™
float linear_upper_limit[3];
- /// 最å°å›žè»¢åˆ¶é™
float angular_lower_limit[3];
- /// 最大回転制é™
float angular_upper_limit[3];
- /// 移動ã«å¯¾ã™ã‚‹å¾©å…ƒåŠ›
float linear_stiffness[3];
- /// 回転ã«å¯¾ã™ã‚‹å¾©å…ƒåŠ›
float angular_stiffness[3];
void Read(std::istream *stream)
@@ -459,7 +388,6 @@ namespace pmd
}
};
- /// PMDモデル
class PmdModel
{
public:
@@ -491,7 +419,6 @@ namespace pmd
return result;
}
- /// ファイルã‹ã‚‰PmdModelを生æˆã™ã‚‹
static std::unique_ptr<PmdModel> LoadFromStream(std::ifstream *stream)
{
auto result = mmd::make_unique<PmdModel>();
diff --git a/code/MMDPmxParser.cpp b/code/MMDPmxParser.cpp
index 6a76c2c7f..2c5bd9a8d 100644
--- a/code/MMDPmxParser.cpp
+++ b/code/MMDPmxParser.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -40,12 +41,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <utility>
#include "MMDPmxParser.h"
+#include <assimp/StringUtils.h>
#include "../contrib/utf8cpp/source/utf8.h"
-#include "Exceptional.h"
+#include <assimp/Exceptional.h>
namespace pmx
{
- /// インデックス値を読ã¿è¾¼ã‚€
int ReadIndex(std::istream *stream, int size)
{
switch (size)
@@ -79,7 +80,6 @@ namespace pmx
}
}
- /// 文字列を読ã¿è¾¼ã‚€
std::string ReadString(std::istream *stream, uint8_t encoding)
{
int size;
@@ -94,16 +94,15 @@ namespace pmx
if (encoding == 0)
{
// UTF16 to UTF8
- std::string result;
-
- const char* sourceStart = buffer.data();
+ const uint16_t* sourceStart = (uint16_t*)buffer.data();
const unsigned int targetSize = size * 3; // enough to encode
- char* targetStart = new char[targetSize]();
- const char* targetReserved = targetStart;
- utf8::utf16to8( sourceStart, sourceStart + size, targetStart );
+ char *targetStart = new char[targetSize];
+ std::memset(targetStart, 0, targetSize * sizeof(char));
+
+ utf8::utf16to8( sourceStart, sourceStart + size/2, targetStart );
- result.assign(targetReserved, targetStart - targetReserved);
- delete[] targetReserved;
+ std::string result(targetStart);
+ delete [] targetStart;
return result;
}
else
@@ -119,7 +118,7 @@ namespace pmx
stream->read((char*) &count, sizeof(uint8_t));
if (count < 8)
{
- throw;
+ throw DeadlyImportError("MMD: invalid size");
}
stream->read((char*) &encoding, sizeof(uint8_t));
stream->read((char*) &uv, sizeof(uint8_t));
@@ -218,8 +217,8 @@ namespace pmx
void PmxMaterial::Read(std::istream *stream, PmxSetting *setting)
{
- this->material_name = std::move(ReadString(stream, setting->encoding));
- this->material_english_name = std::move(ReadString(stream, setting->encoding));
+ this->material_name = ReadString(stream, setting->encoding);
+ this->material_english_name = ReadString(stream, setting->encoding);
stream->read((char*) this->diffuse, sizeof(float) * 4);
stream->read((char*) this->specular, sizeof(float) * 3);
stream->read((char*) &this->specularlity, sizeof(float));
@@ -238,7 +237,7 @@ namespace pmx
else {
this->toon_texture_index = ReadIndex(stream, setting->texture_index_size);
}
- this->memo = std::move(ReadString(stream, setting->encoding));
+ this->memo = ReadString(stream, setting->encoding);
stream->read((char*) &this->index_count, sizeof(int));
}
@@ -255,8 +254,8 @@ namespace pmx
void PmxBone::Read(std::istream *stream, PmxSetting *setting)
{
- this->bone_name = std::move(ReadString(stream, setting->encoding));
- this->bone_english_name = std::move(ReadString(stream, setting->encoding));
+ this->bone_name = ReadString(stream, setting->encoding);
+ this->bone_english_name = ReadString(stream, setting->encoding);
stream->read((char*) this->position, sizeof(float) * 3);
this->parent_index = ReadIndex(stream, setting->bone_index_size);
stream->read((char*) &this->level, sizeof(int));
@@ -396,7 +395,7 @@ namespace pmx
}
break;
default:
- throw;
+ throw DeadlyImportError("MMD: unknown morth type");
}
}
@@ -473,12 +472,11 @@ namespace pmx
stream->read((char*) &this->is_near, sizeof(uint8_t));
}
- void PmxSoftBody::Read(std::istream *stream, PmxSetting *setting)
+ void PmxSoftBody::Read(std::istream * /*stream*/, PmxSetting * /*setting*/)
{
- // 未実装
std::cerr << "Not Implemented Exception" << std::endl;
- throw;
- }
+ throw DeadlyImportError("MMD: Not Implemented Exception");
+ }
void PmxModel::Init()
{
@@ -511,31 +509,27 @@ namespace pmx
void PmxModel::Read(std::istream *stream)
{
- // マジック
char magic[4];
stream->read((char*) magic, sizeof(char) * 4);
if (magic[0] != 0x50 || magic[1] != 0x4d || magic[2] != 0x58 || magic[3] != 0x20)
{
std::cerr << "invalid magic number." << std::endl;
- throw;
- }
- // ãƒãƒ¼ã‚¸ãƒ§ãƒ³
+ throw DeadlyImportError("MMD: invalid magic number.");
+ }
stream->read((char*) &version, sizeof(float));
if (version != 2.0f && version != 2.1f)
{
std::cerr << "this is not ver2.0 or ver2.1 but " << version << "." << std::endl;
- throw;
- }
- // ファイル設定
+ throw DeadlyImportError("MMD: this is not ver2.0 or ver2.1 but " + to_string(version));
+ }
this->setting.Read(stream);
- // モデル情報
- this->model_name = std::move(ReadString(stream, setting.encoding));
- this->model_english_name = std::move(ReadString(stream, setting.encoding));
- this->model_comment = std::move(ReadString(stream, setting.encoding));
- this->model_english_comment = std::move(ReadString(stream, setting.encoding));
+ this->model_name = ReadString(stream, setting.encoding);
+ this->model_english_name = ReadString(stream, setting.encoding);
+ this->model_comment = ReadString(stream, setting.encoding);
+ this->model_english_comment = ReadString(stream, setting.encoding);
- // 頂点
+ // read vertices
stream->read((char*) &vertex_count, sizeof(int));
this->vertices = mmd::make_unique<PmxVertex []>(vertex_count);
for (int i = 0; i < vertex_count; i++)
@@ -543,7 +537,7 @@ namespace pmx
vertices[i].Read(stream, &setting);
}
- // é¢
+ // read indices
stream->read((char*) &index_count, sizeof(int));
this->indices = mmd::make_unique<int []>(index_count);
for (int i = 0; i < index_count; i++)
@@ -551,7 +545,7 @@ namespace pmx
this->indices[i] = ReadIndex(stream, setting.vertex_index_size);
}
- // テクスãƒãƒ£
+ // read texture names
stream->read((char*) &texture_count, sizeof(int));
this->textures = mmd::make_unique<std::string []>(texture_count);
for (int i = 0; i < texture_count; i++)
@@ -559,7 +553,7 @@ namespace pmx
this->textures[i] = ReadString(stream, setting.encoding);
}
- // マテリアル
+ // read materials
stream->read((char*) &material_count, sizeof(int));
this->materials = mmd::make_unique<PmxMaterial []>(material_count);
for (int i = 0; i < material_count; i++)
@@ -567,7 +561,7 @@ namespace pmx
this->materials[i].Read(stream, &setting);
}
- // ボーン
+ // read bones
stream->read((char*) &this->bone_count, sizeof(int));
this->bones = mmd::make_unique<PmxBone []>(this->bone_count);
for (int i = 0; i < this->bone_count; i++)
@@ -575,7 +569,7 @@ namespace pmx
this->bones[i].Read(stream, &setting);
}
- // モーフ
+ // read morphs
stream->read((char*) &this->morph_count, sizeof(int));
this->morphs = mmd::make_unique<PmxMorph []>(this->morph_count);
for (int i = 0; i < this->morph_count; i++)
@@ -583,7 +577,7 @@ namespace pmx
this->morphs[i].Read(stream, &setting);
}
- // 表示枠
+ // read display frames
stream->read((char*) &this->frame_count, sizeof(int));
this->frames = mmd::make_unique<PmxFrame []>(this->frame_count);
for (int i = 0; i < this->frame_count; i++)
@@ -591,7 +585,7 @@ namespace pmx
this->frames[i].Read(stream, &setting);
}
- // 剛体
+ // read rigid bodies
stream->read((char*) &this->rigid_body_count, sizeof(int));
this->rigid_bodies = mmd::make_unique<PmxRigidBody []>(this->rigid_body_count);
for (int i = 0; i < this->rigid_body_count; i++)
@@ -599,42 +593,12 @@ namespace pmx
this->rigid_bodies[i].Read(stream, &setting);
}
- // ジョイント
+ // read joints
stream->read((char*) &this->joint_count, sizeof(int));
this->joints = mmd::make_unique<PmxJoint []>(this->joint_count);
for (int i = 0; i < this->joint_count; i++)
{
this->joints[i].Read(stream, &setting);
}
-
- //// ソフトボディ
- //if (this->version == 2.1f)
- //{
- // stream->read((char*) &this->soft_body_count, sizeof(int));
- // this->soft_bodies = mmd::make_unique<PmxSoftBody []>(this->soft_body_count);
- // for (int i = 0; i < this->soft_body_count; i++)
- // {
- // this->soft_bodies[i].Read(stream, &setting);
- // }
- //}
}
-
- //std::unique_ptr<PmxModel> ReadFromFile(const char *filename)
- //{
- // auto stream = std::ifstream(filename, std::ios_base::binary);
- // auto pmx = PmxModel::ReadFromStream(&stream);
- // if (!stream.eof())
- // {
- // std::cerr << "don't reach the end of file." << std::endl;
- // }
- // stream.close();
- // return pmx;
- //}
-
- //std::unique_ptr<PmxModel> ReadFromStream(std::istream *stream)
- //{
- // auto pmx = mmd::make_unique<PmxModel>();
- // pmx->Read(stream);
- // return pmx;
- //}
}
diff --git a/code/MMDPmxParser.h b/code/MMDPmxParser.h
index 4aff7f8eb..43cad5899 100644
--- a/code/MMDPmxParser.h
+++ b/code/MMDPmxParser.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -49,7 +50,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace pmx
{
- /// インデックス設定
class PmxSetting
{
public:
@@ -64,26 +64,17 @@ namespace pmx
, rigidbody_index_size(0)
{}
- /// エンコード方å¼
uint8_t encoding;
- /// 追加UV数
uint8_t uv;
- /// 頂点インデックスサイズ
uint8_t vertex_index_size;
- /// テクスãƒãƒ£ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚µã‚¤ã‚º
uint8_t texture_index_size;
- /// マテリアルインデックスサイズ
uint8_t material_index_size;
- /// ボーンインデックスサイズ
uint8_t bone_index_size;
- /// モーフインデックスサイズ
uint8_t morph_index_size;
- /// 剛体インデックスサイズ
uint8_t rigidbody_index_size;
void Read(std::istream *stream);
};
- /// 頂点スキニングタイプ
enum class PmxVertexSkinningType : uint8_t
{
BDEF1 = 0,
@@ -93,11 +84,11 @@ namespace pmx
QDEF = 4,
};
- /// 頂点スキニング
class PmxVertexSkinning
{
public:
virtual void Read(std::istream *stream, PmxSetting *setting) = 0;
+ virtual ~PmxVertexSkinning() {}
};
class PmxVertexSkinningBDEF1 : public PmxVertexSkinning
@@ -200,7 +191,6 @@ namespace pmx
void Read(std::istream *stresam, PmxSetting *setting);
};
- /// 頂点
class PmxVertex
{
public:
@@ -219,24 +209,16 @@ namespace pmx
}
}
- /// ä½ç½®
float position[3];
- /// 法線
float normal[3];
- /// テクスãƒãƒ£åº§æ¨™
float uv[2];
- /// 追加テクスãƒãƒ£åº§æ¨™
float uva[4][4];
- /// スキニングタイプ
PmxVertexSkinningType skinning_type;
- /// スキニング
std::unique_ptr<PmxVertexSkinning> skinning;
- /// エッジå€çŽ‡
float edge;
void Read(std::istream *stream, PmxSetting *setting);
};
- /// マテリアル
class PmxMaterial
{
public:
@@ -261,42 +243,25 @@ namespace pmx
}
}
- /// モデルå
std::string material_name;
- /// モデル英å
std::string material_english_name;
- /// 減衰色
float diffuse[4];
- /// 光沢色
float specular[3];
- /// 光沢度
float specularlity;
- /// 環境色
float ambient[3];
- /// æ画フラグ
uint8_t flag;
- /// エッジ色
float edge_color[4];
- /// エッジサイズ
float edge_size;
- /// アルベドテクスãƒãƒ£ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹
int diffuse_texture_index;
- /// スフィアテクスãƒãƒ£ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹
int sphere_texture_index;
- /// スフィアテクスãƒãƒ£æ¼”算モード
uint8_t sphere_op_mode;
- /// 共有トゥーンフラグ
uint8_t common_toon_flag;
- /// トゥーンテクスãƒãƒ£ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹
int toon_texture_index;
- /// メモ
std::string memo;
- /// 頂点インデックス数
int index_count;
void Read(std::istream *stream, PmxSetting *setting);
};
- /// リンク
class PmxIkLink
{
public:
@@ -310,18 +275,13 @@ namespace pmx
}
}
- /// リンクボーンインデックス
int link_target;
- /// 角度制é™
uint8_t angle_lock;
- /// 最大制é™è§’度
float max_radian[3];
- /// 最å°åˆ¶é™è§’度
float min_radian[3];
void Read(std::istream *stream, PmxSetting *settingn);
};
- /// ボーン
class PmxBone
{
public:
@@ -347,43 +307,24 @@ namespace pmx
}
}
- /// ボーンå
std::string bone_name;
- /// ボーン英å
std::string bone_english_name;
- /// ä½ç½®
float position[3];
- /// 親ボーンインデックス
int parent_index;
- /// 階層
int level;
- /// ボーンフラグ
uint16_t bone_flag;
- /// 座標オフセット(has Target)
float offset[3];
- /// 接続先ボーンインデックス(not has Target)
int target_index;
- /// 付与親ボーンインデックス
int grant_parent_index;
- /// 付与率
float grant_weight;
- /// 固定軸ã®æ–¹å‘
float lock_axis_orientation[3];
- /// ローカル軸ã®X軸方å‘
float local_axis_x_orientation[3];
- /// ローカル軸ã®Y軸方å‘
float local_axis_y_orientation[3];
- /// 外部親変形ã®key値
int key;
- /// IKターゲットボーン
int ik_target_bone_index;
- /// IKループ回数
int ik_loop;
- /// IKループ計算時ã®è§’度制é™(ラジアン)
float ik_loop_angle_limit;
- /// IKリンク数
int ik_link_count;
- /// IKリンク
std::unique_ptr<PmxIkLink []> ik_links;
void Read(std::istream *stream, PmxSetting *setting);
};
@@ -543,7 +484,6 @@ namespace pmx
void Read(std::istream *stream, PmxSetting *setting); //override;
};
- /// モーフ
class PmxMorph
{
public:
@@ -551,34 +491,21 @@ namespace pmx
: offset_count(0)
{
}
- /// モーフå
std::string morph_name;
- /// モーフ英å
std::string morph_english_name;
- /// カテゴリ
MorphCategory category;
- /// モーフタイプ
MorphType morph_type;
- /// オフセット数
int offset_count;
- /// 頂点モーフé…列
std::unique_ptr<PmxMorphVertexOffset []> vertex_offsets;
- /// UVモーフé…列
std::unique_ptr<PmxMorphUVOffset []> uv_offsets;
- /// ボーンモーフé…列
std::unique_ptr<PmxMorphBoneOffset []> bone_offsets;
- /// マテリアルモーフé…列
std::unique_ptr<PmxMorphMaterialOffset []> material_offsets;
- /// グループモーフé…列
std::unique_ptr<PmxMorphGroupOffset []> group_offsets;
- /// フリップモーフé…列
std::unique_ptr<PmxMorphFlipOffset []> flip_offsets;
- /// インパルスモーフé…列
std::unique_ptr<PmxMorphImplusOffset []> implus_offsets;
void Read(std::istream *stream, PmxSetting *setting);
};
- /// 枠内è¦ç´ 
class PmxFrameElement
{
public:
@@ -587,14 +514,11 @@ namespace pmx
, index(0)
{
}
- /// è¦ç´ å¯¾è±¡
uint8_t element_target;
- /// è¦ç´ å¯¾è±¡ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹
int index;
void Read(std::istream *stream, PmxSetting *setting);
};
- /// 表示枠
class PmxFrame
{
public:
@@ -603,15 +527,10 @@ namespace pmx
, element_count(0)
{
}
- /// æž å
std::string frame_name;
- /// 枠英å
std::string frame_english_name;
- /// 特殊枠フラグ
uint8_t frame_flag;
- /// 枠内è¦ç´ æ•°
int element_count;
- /// 枠内è¦ç´ é…列
std::unique_ptr<PmxFrameElement []> elements;
void Read(std::istream *stream, PmxSetting *setting);
};
@@ -637,17 +556,11 @@ namespace pmx
orientation[i] = 0.0f;
}
}
- /// 剛体å
std::string girid_body_name;
- /// 剛体英å
std::string girid_body_english_name;
- /// 関連ボーンインデックス
int target_bone;
- /// グループ
uint8_t group;
- /// マスク
uint16_t mask;
- /// 形状
uint8_t shape;
float size[3];
float position[3];
@@ -818,7 +731,6 @@ namespace pmx
void Read(std::istream *stream, PmxSetting *setting);
};
- /// PMXモデル
class PmxModel
{
public:
@@ -836,65 +748,35 @@ namespace pmx
, soft_body_count(0)
{}
- /// ãƒãƒ¼ã‚¸ãƒ§ãƒ³
float version;
- /// 設定
PmxSetting setting;
- /// モデルå
std::string model_name;
- /// モデル英å
std::string model_english_name;
- /// コメント
std::string model_comment;
- /// 英語コメント
std::string model_english_comment;
- /// 頂点数
int vertex_count;
- /// 頂点é…列
std::unique_ptr<PmxVertex []> vertices;
- /// インデックス数
int index_count;
- /// インデックスé…列
std::unique_ptr<int []> indices;
- /// テクスãƒãƒ£æ•°
int texture_count;
- /// テクスãƒãƒ£é…列
std::unique_ptr< std::string []> textures;
- /// マテリアル数
int material_count;
- /// マテリアル
std::unique_ptr<PmxMaterial []> materials;
- /// ボーン数
int bone_count;
- /// ボーンé…列
std::unique_ptr<PmxBone []> bones;
- /// モーフ数
int morph_count;
- /// モーフé…列
std::unique_ptr<PmxMorph []> morphs;
- /// 表示枠数
int frame_count;
- /// 表示枠é…列
std::unique_ptr<PmxFrame [] > frames;
- /// 剛体数
int rigid_body_count;
- /// 剛体é…列
std::unique_ptr<PmxRigidBody []> rigid_bodies;
- /// ジョイント数
int joint_count;
- /// ジョイントé…列
std::unique_ptr<PmxJoint []> joints;
- /// ソフトボディ数
int soft_body_count;
- /// ソフトボディé…列
std::unique_ptr<PmxSoftBody []> soft_bodies;
- /// モデルåˆæœŸåŒ–
void Init();
- /// モデル読ã¿è¾¼ã¿
void Read(std::istream *stream);
- ///// ファイルã‹ã‚‰ãƒ¢ãƒ‡ãƒ«ã®èª­ã¿è¾¼ã¿
//static std::unique_ptr<PmxModel> ReadFromFile(const char *filename);
- ///// 入力ストリームã‹ã‚‰ãƒ¢ãƒ‡ãƒ«ã®èª­ã¿è¾¼ã¿
//static std::unique_ptr<PmxModel> ReadFromStream(std::istream *stream);
};
}
diff --git a/code/MMDVmdParser.h b/code/MMDVmdParser.h
index c5057ef47..600959e94 100644
--- a/code/MMDVmdParser.h
+++ b/code/MMDVmdParser.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -50,19 +51,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace vmd
{
- /// ボーンフレーム
class VmdBoneFrame
{
public:
- /// ボーンå
std::string name;
- /// フレーム番å·
int frame;
- /// ä½ç½®
float position[3];
- /// 回転
float orientation[4];
- /// 補間曲線
char interpolation[4][4][4];
void Read(std::istream* stream)
@@ -86,15 +81,11 @@ namespace vmd
}
};
- /// 表情フレーム
class VmdFaceFrame
{
public:
- /// 表情å
std::string face_name;
- /// 表情ã®é‡ã¿
float weight;
- /// フレーム番å·
uint32_t frame;
void Read(std::istream* stream)
@@ -114,23 +105,15 @@ namespace vmd
}
};
- /// カメラフレーム
class VmdCameraFrame
{
public:
- /// フレーム番å·
int frame;
- /// è·é›¢
float distance;
- /// ä½ç½®
float position[3];
- /// 回転
float orientation[3];
- /// 補間曲線
char interpolation[6][4];
- /// 視野角
float angle;
- /// ä¸æ˜Žãƒ‡ãƒ¼ã‚¿
char unknown[3];
void Read(std::istream *stream)
@@ -156,15 +139,11 @@ namespace vmd
}
};
- /// ライトフレーム
class VmdLightFrame
{
public:
- /// フレーム番å·
int frame;
- /// 色
float color[3];
- /// ä½ç½®
float position[3];
void Read(std::istream* stream)
@@ -182,7 +161,6 @@ namespace vmd
}
};
- /// IKã®æœ‰åŠ¹ç„¡åŠ¹
class VmdIkEnable
{
public:
@@ -190,7 +168,6 @@ namespace vmd
bool enable;
};
- /// IKフレーム
class VmdIkFrame
{
public:
@@ -229,23 +206,15 @@ namespace vmd
}
};
- /// VMDモーション
class VmdMotion
{
public:
- /// モデルå
std::string model_name;
- /// ãƒãƒ¼ã‚¸ãƒ§ãƒ³
int version;
- /// ボーンフレーム
std::vector<VmdBoneFrame> bone_frames;
- /// 表情フレーム
std::vector<VmdFaceFrame> face_frames;
- /// カメラフレーム
std::vector<VmdCameraFrame> camera_frames;
- /// ライトフレーム
std::vector<VmdLightFrame> light_frames;
- /// IKフレーム
std::vector<VmdIkFrame> ik_frames;
static std::unique_ptr<VmdMotion> LoadFromFile(char const *filename)
@@ -334,7 +303,7 @@ namespace vmd
return result;
}
- bool SaveToFile(const std::u16string& filename)
+ bool SaveToFile(const std::u16string& /*filename*/)
{
// TODO: How to adapt u16string to string?
/*
diff --git a/code/MS3DLoader.cpp b/code/MS3DLoader.cpp
index 64ec1e076..c659d2ec7 100644
--- a/code/MS3DLoader.cpp
+++ b/code/MS3DLoader.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -50,7 +51,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// internal headers
#include "MS3DLoader.h"
-#include "StreamReader.h"
+#include <assimp/StreamReader.h>
#include <assimp/DefaultLogger.hpp>
#include <assimp/scene.h>
#include <assimp/IOSystem.hpp>
@@ -141,7 +142,7 @@ void MS3DImporter :: ReadComments(StreamReaderLE& stream, std::vector<T>& outp)
stream >> index >> clength;
if(index >= outp.size()) {
- DefaultLogger::get()->warn("MS3D: Invalid index in comment section");
+ ASSIMP_LOG_WARN("MS3D: Invalid index in comment section");
}
else if (clength > stream.GetRemainingSize()) {
throw DeadlyImportError("MS3D: Failure reading comment, length field is out of range");
@@ -180,8 +181,7 @@ void MS3DImporter :: CollectChildJoints(const std::vector<TempJoint>& joints,
ch->mParent = nd;
ch->mTransformation = aiMatrix4x4::Translation(joints[i].position,aiMatrix4x4()=aiMatrix4x4())*
- // XXX actually, I don't *know* why we need the inverse here. Probably column vs. row order?
- aiMatrix4x4().FromEulerAnglesXYZ(joints[i].rotation).Transpose();
+ aiMatrix4x4().FromEulerAnglesXYZ(joints[i].rotation);
const aiMatrix4x4 abs = absTrafo*ch->mTransformation;
for(unsigned int a = 0; a < mScene->mNumMeshes; ++a) {
@@ -348,9 +348,6 @@ void MS3DImporter::InternReadFile( const std::string& pFile,
stream.CopyAndAdvance(j.parentName,32);
j.parentName[32] = '\0';
- // DefaultLogger::get()->debug(j.name);
- // DefaultLogger::get()->debug(j.parentName);
-
ReadVector(stream,j.rotation);
ReadVector(stream,j.position);
@@ -385,7 +382,7 @@ void MS3DImporter::InternReadFile( const std::string& pFile,
}
const std::string& s = std::string(reinterpret_cast<char*>(stream.GetPtr()),len);
- DefaultLogger::get()->debug("MS3D: Model comment: " + s);
+ ASSIMP_LOG_DEBUG_F("MS3D: Model comment: ", s);
}
if(stream.GetRemainingSize() > 4 && inrange((stream >> subversion,subversion),1u,3u)) {
@@ -407,7 +404,7 @@ void MS3DImporter::InternReadFile( const std::string& pFile,
// 2 ------------ convert to proper aiXX data structures -----------------------------------
if (need_default && materials.size()) {
- DefaultLogger::get()->warn("MS3D: Found group with no material assigned, spawning default material");
+ ASSIMP_LOG_WARN("MS3D: Found group with no material assigned, spawning default material");
// if one of the groups has no material assigned, but there are other
// groups with materials, a default material needs to be added (
// scenepreprocessor adds a default material only if nummat==0).
@@ -641,11 +638,8 @@ void MS3DImporter::InternReadFile( const std::string& pFile,
aiQuatKey& q = nd->mRotationKeys[nd->mNumRotationKeys++];
q.mTime = (*rot).time*animfps;
-
- // XXX it seems our matrix&quaternion code has faults in its conversion routines --
- // aiQuaternion(x,y,z) seems to besomething different as quat(matrix.fromeuler(x,y,z)).
- q.mValue = aiQuaternion(aiMatrix3x3(aiMatrix4x4().FromEulerAnglesXYZ((*rot).value)*
- aiMatrix4x4().FromEulerAnglesXYZ((*it).rotation)).Transpose());
+ q.mValue = aiQuaternion(aiMatrix3x3(aiMatrix4x4().FromEulerAnglesXYZ((*it).rotation)*
+ aiMatrix4x4().FromEulerAnglesXYZ((*rot).value)));
}
}
diff --git a/code/MS3DLoader.h b/code/MS3DLoader.h
index b4b19b3ad..2efa3be5f 100644
--- a/code/MS3DLoader.h
+++ b/code/MS3DLoader.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -45,8 +46,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_MS3DLOADER_H_INCLUDED
#define AI_MS3DLOADER_H_INCLUDED
-#include "BaseImporter.h"
-#include "StreamReader.h"
+#include <assimp/BaseImporter.h>
+#include <assimp/StreamReader.h>
struct aiNode;
namespace Assimp {
diff --git a/code/MakeVerboseFormat.cpp b/code/MakeVerboseFormat.cpp
index ee82caafe..b6f5cabd9 100644
--- a/code/MakeVerboseFormat.cpp
+++ b/code/MakeVerboseFormat.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -64,7 +65,7 @@ MakeVerboseFormatProcess::~MakeVerboseFormatProcess()
void MakeVerboseFormatProcess::Execute( aiScene* pScene)
{
ai_assert(NULL != pScene);
- DefaultLogger::get()->debug("MakeVerboseFormatProcess begin");
+ ASSIMP_LOG_DEBUG("MakeVerboseFormatProcess begin");
bool bHas = false;
for( unsigned int a = 0; a < pScene->mNumMeshes; a++)
@@ -72,12 +73,15 @@ void MakeVerboseFormatProcess::Execute( aiScene* pScene)
if( MakeVerboseFormat( pScene->mMeshes[a]))
bHas = true;
}
- if (bHas) DefaultLogger::get()->info("MakeVerboseFormatProcess finished. There was much work to do ...");
- else DefaultLogger::get()->debug("MakeVerboseFormatProcess. There was nothing to do.");
+ if (bHas) {
+ ASSIMP_LOG_INFO("MakeVerboseFormatProcess finished. There was much work to do ...");
+ } else {
+ ASSIMP_LOG_DEBUG("MakeVerboseFormatProcess. There was nothing to do.");
+ }
pScene->mFlags &= ~AI_SCENE_FLAGS_NON_VERBOSE_FORMAT;
-
}
+
// ------------------------------------------------------------------------------------------------
// Executes the post processing step on the given imported data.
bool MakeVerboseFormatProcess::MakeVerboseFormat(aiMesh* pcMesh)
@@ -193,14 +197,14 @@ bool MakeVerboseFormatProcess::MakeVerboseFormat(aiMesh* pcMesh)
p = 0;
while (pcMesh->HasTextureCoords(p))
{
- delete pcMesh->mTextureCoords[p];
+ delete[] pcMesh->mTextureCoords[p];
pcMesh->mTextureCoords[p] = apvTextureCoords[p];
++p;
}
p = 0;
while (pcMesh->HasVertexColors(p))
{
- delete pcMesh->mColors[p];
+ delete[] pcMesh->mColors[p];
pcMesh->mColors[p] = apvColorSets[p];
++p;
}
diff --git a/code/MakeVerboseFormat.h b/code/MakeVerboseFormat.h
index 9832a3f65..292d9bea6 100644
--- a/code/MakeVerboseFormat.h
+++ b/code/MakeVerboseFormat.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/MaterialSystem.cpp b/code/MaterialSystem.cpp
index be73ff897..e9ca475fb 100644
--- a/code/MaterialSystem.cpp
+++ b/code/MaterialSystem.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -43,14 +44,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* @brief Implementation of the material system of the library
*/
-#include "Hash.h"
-#include "fast_atof.h"
-#include "ParsingUtils.h"
+#include <assimp/Hash.h>
+#include <assimp/fast_atof.h>
+#include <assimp/ParsingUtils.h>
#include "MaterialSystem.h"
#include <assimp/types.h>
#include <assimp/material.h>
#include <assimp/DefaultLogger.hpp>
-#include "Macros.h"
+#include <assimp/Macros.h>
using namespace Assimp;
@@ -62,9 +63,9 @@ aiReturn aiGetMaterialProperty(const aiMaterial* pMat,
unsigned int index,
const aiMaterialProperty** pPropOut)
{
- ai_assert (pMat != NULL);
- ai_assert (pKey != NULL);
- ai_assert (pPropOut != NULL);
+ ai_assert( pMat != NULL );
+ ai_assert( pKey != NULL );
+ ai_assert( pPropOut != NULL );
/* Just search for a property with exactly this name ..
* could be improved by hashing, but it's possibly
@@ -75,7 +76,7 @@ aiReturn aiGetMaterialProperty(const aiMaterial* pMat,
if (prop /* just for safety ... */
&& 0 == strcmp( prop->mKey.data, pKey )
- && (UINT_MAX == type || prop->mSemantic == type) /* UINT_MAX is a wildcard, but this is undocumented :-) */
+ && (UINT_MAX == type || prop->mSemantic == type) /* UINT_MAX is a wild-card, but this is undocumented :-) */
&& (UINT_MAX == index || prop->mIndex == index))
{
*pPropOut = pMat->mProperties[i];
@@ -95,8 +96,8 @@ aiReturn aiGetMaterialFloatArray(const aiMaterial* pMat,
ai_real* pOut,
unsigned int* pMax)
{
- ai_assert (pOut != NULL);
- ai_assert (pMat != NULL);
+ ai_assert( pOut != NULL );
+ ai_assert( pMat != NULL );
const aiMaterialProperty* prop;
aiGetMaterialProperty(pMat,pKey,type,index, (const aiMaterialProperty**) &prop);
@@ -159,7 +160,7 @@ aiReturn aiGetMaterialFloatArray(const aiMaterial* pMat,
break;
}
if ( !IsSpace(*cur) ) {
- DefaultLogger::get()->error("Material property" + std::string(pKey) +
+ ASSIMP_LOG_ERROR("Material property" + std::string(pKey) +
" is a string; failed to parse a float array out of it.");
return AI_FAILURE;
}
@@ -181,8 +182,8 @@ aiReturn aiGetMaterialIntegerArray(const aiMaterial* pMat,
int* pOut,
unsigned int* pMax)
{
- ai_assert (pOut != NULL);
- ai_assert (pMat != NULL);
+ ai_assert( pOut != NULL );
+ ai_assert( pMat != NULL );
const aiMaterialProperty* prop;
aiGetMaterialProperty(pMat,pKey,type,index,(const aiMaterialProperty**) &prop);
@@ -193,12 +194,18 @@ aiReturn aiGetMaterialIntegerArray(const aiMaterial* pMat,
// data is given in ints, simply copy it
unsigned int iWrite = 0;
if( aiPTI_Integer == prop->mType || aiPTI_Buffer == prop->mType) {
- iWrite = prop->mDataLength / sizeof(int32_t);
+ iWrite = std::max(static_cast<unsigned int>(prop->mDataLength / sizeof(int32_t)), 1u);
if (pMax) {
- iWrite = std::min(*pMax,iWrite); ;
+ iWrite = std::min(*pMax,iWrite);
}
- for (unsigned int a = 0; a < iWrite;++a) {
- pOut[a] = static_cast<int>(reinterpret_cast<int32_t*>(prop->mData)[a]);
+ if (1 == prop->mDataLength) {
+ // bool type, 1 byte
+ *pOut = static_cast<int>(*prop->mData);
+ }
+ else {
+ for (unsigned int a = 0; a < iWrite;++a) {
+ pOut[a] = static_cast<int>(reinterpret_cast<int32_t*>(prop->mData)[a]);
+ }
}
if (pMax) {
*pMax = iWrite;
@@ -232,7 +239,7 @@ aiReturn aiGetMaterialIntegerArray(const aiMaterial* pMat,
break;
}
if(!IsSpace(*cur)) {
- DefaultLogger::get()->error("Material property" + std::string(pKey) +
+ ASSIMP_LOG_ERROR("Material property" + std::string(pKey) +
" is a string; failed to parse an integer array out of it.");
return AI_FAILURE;
}
@@ -273,7 +280,7 @@ aiReturn aiGetMaterialUVTransform(const aiMaterial* pMat,
aiUVTransform* pOut)
{
unsigned int iMax = 4;
- return aiGetMaterialFloatArray(pMat,pKey,type,index,(ai_real*)pOut,&iMax);
+ return aiGetMaterialFloatArray(pMat,pKey,type,index,(ai_real*)pOut,&iMax);
}
// ------------------------------------------------------------------------------------------------
@@ -304,7 +311,7 @@ aiReturn aiGetMaterialString(const aiMaterial* pMat,
}
else {
// TODO - implement lexical cast as well
- DefaultLogger::get()->error("Material property" + std::string(pKey) +
+ ASSIMP_LOG_ERROR("Material property" + std::string(pKey) +
" was found, but is no string" );
return AI_FAILURE;
}
@@ -313,7 +320,7 @@ aiReturn aiGetMaterialString(const aiMaterial* pMat,
// ------------------------------------------------------------------------------------------------
// Get the number of textures on a particular texture stack
-ASSIMP_API unsigned int aiGetMaterialTextureCount(const C_STRUCT aiMaterial* pMat,
+unsigned int aiGetMaterialTextureCount(const C_STRUCT aiMaterial* pMat,
C_ENUM aiTextureType type)
{
ai_assert (pMat != NULL);
@@ -346,15 +353,18 @@ aiReturn aiGetMaterialTexture(const C_STRUCT aiMaterial* mat,
unsigned int* flags /*= NULL*/
)
{
- ai_assert(NULL != mat && NULL != path);
+ ai_assert( NULL != mat );
+ ai_assert( NULL != path );
// Get the path to the texture
if (AI_SUCCESS != aiGetMaterialString(mat,AI_MATKEY_TEXTURE(type,index),path)) {
return AI_FAILURE;
}
+
// Determine mapping type
- aiTextureMapping mapping = aiTextureMapping_UV;
- aiGetMaterialInteger(mat,AI_MATKEY_MAPPING(type,index),(int*)&mapping);
+ int mapping_ = static_cast<int>(aiTextureMapping_UV);
+ aiGetMaterialInteger(mat,AI_MATKEY_MAPPING(type,index), &mapping_);
+ aiTextureMapping mapping = static_cast<aiTextureMapping>(mapping_);
if (_mapping)
*_mapping = mapping;
@@ -379,15 +389,17 @@ aiReturn aiGetMaterialTexture(const C_STRUCT aiMaterial* mat,
if (flags){
aiGetMaterialInteger(mat,AI_MATKEY_TEXFLAGS(type,index),(int*)flags);
}
+
return AI_SUCCESS;
}
+
static const unsigned int DefaultNumAllocated = 5;
// ------------------------------------------------------------------------------------------------
// Construction. Actually the one and only way to get an aiMaterial instance
aiMaterial::aiMaterial()
-: mProperties( NULL )
+: mProperties( nullptr )
, mNumProperties( 0 )
, mNumAllocated( DefaultNumAllocated ) {
// Allocate 5 entries by default
@@ -403,11 +415,19 @@ aiMaterial::~aiMaterial()
}
// ------------------------------------------------------------------------------------------------
+aiString aiMaterial::GetName() {
+ aiString name;
+ Get(AI_MATKEY_NAME, name);
+
+ return name;
+}
+
+// ------------------------------------------------------------------------------------------------
void aiMaterial::Clear()
{
- for (unsigned int i = 0; i < mNumProperties;++i) {
+ for ( unsigned int i = 0; i < mNumProperties; ++i ) {
// delete this entry
- delete mProperties[i];
+ delete mProperties[ i ];
AI_DEBUG_INVALIDATE_PTR(mProperties[i]);
}
mNumProperties = 0;
@@ -416,11 +436,9 @@ void aiMaterial::Clear()
}
// ------------------------------------------------------------------------------------------------
-aiReturn aiMaterial::RemoveProperty (const char* pKey,unsigned int type,
- unsigned int index
- )
+aiReturn aiMaterial::RemoveProperty ( const char* pKey,unsigned int type, unsigned int index )
{
- ai_assert(NULL != pKey);
+ ai_assert( nullptr != pKey );
for (unsigned int i = 0; i < mNumProperties;++i) {
aiMaterialProperty* prop = mProperties[i];
@@ -452,14 +470,18 @@ aiReturn aiMaterial::AddBinaryProperty (const void* pInput,
aiPropertyTypeInfo pType
)
{
- ai_assert (pInput != NULL);
- ai_assert (pKey != NULL);
- ai_assert (0 != pSizeInBytes);
+ ai_assert( pInput != NULL );
+ ai_assert( pKey != NULL );
+ ai_assert( 0 != pSizeInBytes );
+
+ if ( 0 == pSizeInBytes ) {
+
+ }
// first search the list whether there is already an entry with this key
- unsigned int iOutIndex = UINT_MAX;
- for (unsigned int i = 0; i < mNumProperties;++i) {
- aiMaterialProperty* prop = mProperties[i];
+ unsigned int iOutIndex( UINT_MAX );
+ for ( unsigned int i = 0; i < mNumProperties; ++i ) {
+ aiMaterialProperty *prop( mProperties[ i ] );
if (prop /* just for safety */ && !strcmp( prop->mKey.data, pKey ) &&
prop->mSemantic == type && prop->mIndex == index){
@@ -511,6 +533,7 @@ aiReturn aiMaterial::AddBinaryProperty (const void* pInput,
}
// push back ...
mProperties[mNumProperties++] = pcNew;
+
return AI_SUCCESS;
}
diff --git a/code/MaterialSystem.h b/code/MaterialSystem.h
index b083a5bb8..d6f2cea46 100644
--- a/code/MaterialSystem.h
+++ b/code/MaterialSystem.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/NDOLoader.cpp b/code/NDOLoader.cpp
index 2586bac3e..17c9e135b 100644
--- a/code/NDOLoader.cpp
+++ b/code/NDOLoader.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -51,7 +52,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/IOSystem.hpp>
#include <assimp/scene.h>
#include <assimp/importerdesc.h>
-#include "StreamReader.h"
+#include <assimp/StreamReader.h>
#include <map>
using namespace Assimp;
@@ -129,18 +130,18 @@ void NDOImporter::InternReadFile( const std::string& pFile,
unsigned int file_format = 12;
if (!strncmp("1.0",head+6,3)) {
file_format = 10;
- DefaultLogger::get()->info("NDO file format is 1.0");
+ ASSIMP_LOG_INFO("NDO file format is 1.0");
}
else if (!strncmp("1.1",head+6,3)) {
file_format = 11;
- DefaultLogger::get()->info("NDO file format is 1.1");
+ ASSIMP_LOG_INFO("NDO file format is 1.1");
}
else if (!strncmp("1.2",head+6,3)) {
file_format = 12;
- DefaultLogger::get()->info("NDO file format is 1.2");
+ ASSIMP_LOG_INFO("NDO file format is 1.2");
}
else {
- DefaultLogger::get()->warn(std::string("Unrecognized nendo file format version, continuing happily ... :") + (head+6));
+ ASSIMP_LOG_WARN_F( "Unrecognized nendo file format version, continuing happily ... :", (head+6));
}
reader.IncPtr(2); /* skip flags */
diff --git a/code/NDOLoader.h b/code/NDOLoader.h
index 4fd315691..f2212edab 100644
--- a/code/NDOLoader.h
+++ b/code/NDOLoader.h
@@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define INCLUDED_AI_NDO_LOADER_H
#include <assimp/vector3.h>
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
#include <stdint.h>
#include <string>
#include <vector>
diff --git a/code/NFFLoader.cpp b/code/NFFLoader.cpp
index fa005ede4..1c7283db6 100644
--- a/code/NFFLoader.cpp
+++ b/code/NFFLoader.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -47,11 +48,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// internal headers
#include "NFFLoader.h"
-#include "ParsingUtils.h"
-#include "StandardShapes.h"
-#include "qnan.h"
-#include "fast_atof.h"
-#include "RemoveComments.h"
+#include <assimp/ParsingUtils.h>
+#include <assimp/StandardShapes.h>
+#include <assimp/qnan.h>
+#include <assimp/fast_atof.h>
+#include <assimp/RemoveComments.h>
#include <assimp/IOSystem.hpp>
#include <assimp/DefaultLogger.hpp>
#include <assimp/scene.h>
@@ -124,14 +125,14 @@ const aiImporterDesc* NFFImporter::GetInfo () const
do \
{ \
if (!GetNextLine(buffer,line)) \
- {DefaultLogger::get()->warn("NFF2: Unexpected EOF, can't read next token");break;} \
+ {ASSIMP_LOG_WARN("NFF2: Unexpected EOF, can't read next token");break;} \
SkipSpaces(line,&sz); \
} \
while(IsLineEnd(*sz))
// ------------------------------------------------------------------------------------------------
-// Loads the materail table for the NFF2 file format from an external file
+// Loads the material table for the NFF2 file format from an external file
void NFFImporter::LoadNFF2MaterialTable(std::vector<ShadingInfo>& output,
const std::string& path, IOSystem* pIOHandler)
{
@@ -139,7 +140,7 @@ void NFFImporter::LoadNFF2MaterialTable(std::vector<ShadingInfo>& output,
// Check whether we can read from the file
if( !file.get()) {
- DefaultLogger::get()->error("NFF2: Unable to open material library " + path + ".");
+ ASSIMP_LOG_ERROR("NFF2: Unable to open material library " + path + ".");
return;
}
@@ -157,7 +158,7 @@ void NFFImporter::LoadNFF2MaterialTable(std::vector<ShadingInfo>& output,
// The file should start with the magic sequence "mat"
if (!TokenMatch(buffer,"mat",3)) {
- DefaultLogger::get()->error("NFF2: Not a valid material library " + path + ".");
+ ASSIMP_LOG_ERROR_F("NFF2: Not a valid material library ", path, ".");
return;
}
@@ -173,7 +174,7 @@ void NFFImporter::LoadNFF2MaterialTable(std::vector<ShadingInfo>& output,
// 'version' defines the version of the file format
if (TokenMatch(sz,"version",7))
{
- DefaultLogger::get()->info("NFF (Sense8) material library file format: " + std::string(sz));
+ ASSIMP_LOG_INFO_F("NFF (Sense8) material library file format: ", std::string(sz));
}
// 'matdef' starts a new material in the file
else if (TokenMatch(sz,"matdef",6))
@@ -191,8 +192,7 @@ void NFFImporter::LoadNFF2MaterialTable(std::vector<ShadingInfo>& output,
{
if (!curShader)
{
- DefaultLogger::get()->error(std::string("NFF2 material library: Found element ") +
- sz + "but there is no active material");
+ ASSIMP_LOG_ERROR_F("NFF2 material library: Found element ", sz, "but there is no active material");
continue;
}
}
@@ -243,8 +243,6 @@ void NFFImporter::InternReadFile( const std::string& pFile,
if( !file.get())
throw DeadlyImportError( "Failed to open NFF file " + pFile + ".");
- unsigned int m = (unsigned int)file->FileSize();
-
// allocate storage and copy the contents of the file to a memory buffer
// (terminate it with zero)
std::vector<char> mBuffer2;
@@ -273,7 +271,7 @@ void NFFImporter::InternReadFile( const std::string& pFile,
ShadingInfo s; // current material info
- // degree of tesselation
+ // degree of tessellation
unsigned int iTesselation = 4;
// some temporary variables we need to parse the file
@@ -309,7 +307,7 @@ void NFFImporter::InternReadFile( const std::string& pFile,
SkipSpaces(line,&sz);
if (TokenMatch(sz,"version",7))
{
- DefaultLogger::get()->info("NFF (Sense8) file format: " + std::string(sz));
+ ASSIMP_LOG_INFO_F("NFF (Sense8) file format: ", sz );
}
else if (TokenMatch(sz,"viewpos",7))
{
@@ -347,7 +345,7 @@ void NFFImporter::InternReadFile( const std::string& pFile,
sz3 = sz;
while (!IsSpaceOrNewLine(*sz))++sz;
const unsigned int diff = (unsigned int)(sz-sz3);
- if (!diff)DefaultLogger::get()->warn("NFF2: Found empty mtable token");
+ if (!diff)ASSIMP_LOG_WARN("NFF2: Found empty mtable token");
else
{
// The material table has the file extension .mat.
@@ -469,10 +467,10 @@ void NFFImporter::InternReadFile( const std::string& pFile,
for (unsigned int a = 0; a < numIdx;++a)
{
SkipSpaces(sz,&sz);
- m = ::strtoul10(sz,&sz);
+ unsigned int m = ::strtoul10(sz,&sz);
if (m >= (unsigned int)tempPositions.size())
{
- DefaultLogger::get()->error("NFF2: Vertex index overflow");
+ ASSIMP_LOG_ERROR("NFF2: Vertex index overflow");
m= 0;
}
// mesh.vertices.push_back (tempPositions[idx]);
@@ -552,11 +550,11 @@ void NFFImporter::InternReadFile( const std::string& pFile,
case 'u':
case 'U':
- DefaultLogger::get()->warn("Unsupported NFF2 texture attribute: trans");
+ ASSIMP_LOG_WARN("Unsupported NFF2 texture attribute: trans");
};
if (!sz[1] || '_' != sz[2])
{
- DefaultLogger::get()->warn("NFF2: Expected underscore after texture attributes");
+ ASSIMP_LOG_WARN("NFF2: Expected underscore after texture attributes");
continue;
}
const char* sz2 = sz+3;
@@ -578,7 +576,7 @@ void NFFImporter::InternReadFile( const std::string& pFile,
matIdx = ::strtoul10(sz,&sz);
if (matIdx >= materialTable.size())
{
- DefaultLogger::get()->error("NFF2: Material index overflow.");
+ ASSIMP_LOG_ERROR("NFF2: Material index overflow.");
matIdx = 0;
}
@@ -635,7 +633,7 @@ void NFFImporter::InternReadFile( const std::string& pFile,
for (std::vector<unsigned int>::const_iterator it = tempIdx.begin(), end = tempIdx.end();
it != end;++it)
{
- m = *it;
+ unsigned int m = *it;
// copy colors -vertex color specifications override polygon color specifications
if (hasColor)
@@ -735,7 +733,7 @@ void NFFImporter::InternReadFile( const std::string& pFile,
sz = &line[1];out = currentMesh;
}
SkipSpaces(sz,&sz);
- m = strtoul10(sz);
+ unsigned int m = strtoul10(sz);
// ---- flip the face order
out->vertices.resize(out->vertices.size()+m);
@@ -751,7 +749,7 @@ void NFFImporter::InternReadFile( const std::string& pFile,
{
if(!GetNextLine(buffer,line))
{
- DefaultLogger::get()->error("NFF: Unexpected EOF was encountered. Patch definition incomplete");
+ ASSIMP_LOG_ERROR("NFF: Unexpected EOF was encountered. Patch definition incomplete");
continue;
}
@@ -944,7 +942,7 @@ void NFFImporter::InternReadFile( const std::string& pFile,
if(!GetNextLine(buffer,line))
{
- DefaultLogger::get()->error("NFF: Unexpected end of file (cone definition not complete)");
+ ASSIMP_LOG_ERROR("NFF: Unexpected end of file (cone definition not complete)");
break;
}
sz = line;
@@ -956,7 +954,7 @@ void NFFImporter::InternReadFile( const std::string& pFile,
if(!GetNextLine(buffer,line))
{
- DefaultLogger::get()->error("NFF: Unexpected end of file (cone definition not complete)");
+ ASSIMP_LOG_ERROR("NFF: Unexpected end of file (cone definition not complete)");
break;
}
sz = line;
@@ -972,7 +970,7 @@ void NFFImporter::InternReadFile( const std::string& pFile,
float f;
if (( f = currentMesh.dir.Length()) < 10e-3f )
{
- DefaultLogger::get()->error("NFF: Cone height is close to zero");
+ ASSIMP_LOG_ERROR("NFF: Cone height is close to zero");
continue;
}
currentMesh.dir /= f; // normalize
@@ -990,7 +988,7 @@ void NFFImporter::InternReadFile( const std::string& pFile,
::ai_snprintf(currentMesh.name,128,"cone_%i",cone++);
else ::ai_snprintf(currentMesh.name,128,"cylinder_%i",cylinder++);
}
- // 'tess' - tesselation
+ // 'tess' - tessellation
else if (TokenMatch(sz,"tess",4))
{
SkipSpaces(&sz);
@@ -1030,18 +1028,20 @@ void NFFImporter::InternReadFile( const std::string& pFile,
// 'pb' - bezier patch. Not supported yet
else if (TokenMatch(sz,"pb",2))
{
- DefaultLogger::get()->error("NFF: Encountered unsupported ID: bezier patch");
+ ASSIMP_LOG_ERROR("NFF: Encountered unsupported ID: bezier patch");
}
// 'pn' - NURBS. Not supported yet
else if (TokenMatch(sz,"pn",2) || TokenMatch(sz,"pnn",3))
{
- DefaultLogger::get()->error("NFF: Encountered unsupported ID: NURBS");
+ ASSIMP_LOG_ERROR("NFF: Encountered unsupported ID: NURBS");
}
// '' - comment
else if ('#' == line[0])
{
const char* sz;SkipSpaces(&line[1],&sz);
- if (!IsLineEnd(*sz))DefaultLogger::get()->info(sz);
+ if (!IsLineEnd(*sz)) {
+ ASSIMP_LOG_INFO(sz);
+ }
}
}
}
@@ -1081,7 +1081,9 @@ void NFFImporter::InternReadFile( const std::string& pFile,
// generate the camera
if (hasCam)
{
- aiNode* nd = *ppcChildren = new aiNode();
+ ai_assert(ppcChildren);
+ aiNode* nd = new aiNode();
+ *ppcChildren = nd;
nd->mName.Set("<NFF_Camera>");
nd->mParent = root;
@@ -1105,13 +1107,15 @@ void NFFImporter::InternReadFile( const std::string& pFile,
// generate light sources
if (!lights.empty())
{
+ ai_assert(ppcChildren);
pScene->mNumLights = (unsigned int)lights.size();
pScene->mLights = new aiLight*[pScene->mNumLights];
for (unsigned int i = 0; i < pScene->mNumLights;++i,++ppcChildren)
{
const Light& l = lights[i];
- aiNode* nd = *ppcChildren = new aiNode();
+ aiNode* nd = new aiNode();
+ *ppcChildren = nd;
nd->mParent = root;
nd->mName.length = ::ai_snprintf(nd->mName.data,1024,"<NFF_Light%u>",i);
@@ -1128,7 +1132,8 @@ void NFFImporter::InternReadFile( const std::string& pFile,
if (!pScene->mNumMeshes)throw DeadlyImportError("NFF: No meshes loaded");
pScene->mMeshes = new aiMesh*[pScene->mNumMeshes];
pScene->mMaterials = new aiMaterial*[pScene->mNumMaterials = pScene->mNumMeshes];
- for (it = meshes.begin(), m = 0; it != end;++it)
+ unsigned int m = 0;
+ for (it = meshes.begin(); it != end;++it)
{
if ((*it).faces.empty())continue;
diff --git a/code/NFFLoader.h b/code/NFFLoader.h
index 0640d4405..1e3f0bd26 100644
--- a/code/NFFLoader.h
+++ b/code/NFFLoader.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -45,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_NFFLOADER_H_INCLUDED
#define AI_NFFLOADER_H_INCLUDED
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
#include <assimp/types.h>
#include <assimp/material.h>
#include <vector>
diff --git a/code/OFFLoader.cpp b/code/OFFLoader.cpp
index 2723beb0e..a72e6d9d4 100644
--- a/code/OFFLoader.cpp
+++ b/code/OFFLoader.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -49,8 +50,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// internal headers
#include "OFFLoader.h"
-#include "ParsingUtils.h"
-#include "fast_atof.h"
+#include <assimp/ParsingUtils.h>
+#include <assimp/fast_atof.h>
#include <memory>
#include <assimp/IOSystem.hpp>
#include <assimp/scene.h>
@@ -94,7 +95,7 @@ bool OFFImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool
{
if (!pIOHandler)return true;
const char* tokens[] = {"off"};
- return SearchFileHeaderForToken(pIOHandler,pFile,tokens,1);
+ return SearchFileHeaderForToken(pIOHandler,pFile,tokens,1,3);
}
return false;
}
@@ -105,15 +106,23 @@ const aiImporterDesc* OFFImporter::GetInfo () const
return &desc;
}
+
+// skip blank space, lines and comments
+static void NextToken(const char **car, const char* end) {
+ SkipSpacesAndLineEnd(car);
+ while (*car < end && (**car == '#' || **car == '\n' || **car == '\r')) {
+ SkipLine(car);
+ SkipSpacesAndLineEnd(car);
+ }
+}
+
// ------------------------------------------------------------------------------------------------
// Imports the given file into the given scene structure.
-void OFFImporter::InternReadFile( const std::string& pFile,
- aiScene* pScene, IOSystem* pIOHandler)
-{
+void OFFImporter::InternReadFile( const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler) {
std::unique_ptr<IOStream> file( pIOHandler->Open( pFile, "rb"));
// Check whether we can read from the file
- if( file.get() == NULL) {
+ if( file.get() == nullptr) {
throw DeadlyImportError( "Failed to open OFF file " + pFile + ".");
}
@@ -122,15 +131,61 @@ void OFFImporter::InternReadFile( const std::string& pFile,
TextFileToBuffer(file.get(),mBuffer2);
const char* buffer = &mBuffer2[0];
- char line[4096];
- GetNextLine(buffer,line);
- if ('O' == line[0]) {
- GetNextLine(buffer,line); // skip the 'OFF' line
+ // Proper OFF header parser. We only implement normal loading for now.
+ bool hasTexCoord = false, hasNormals = false, hasColors = false;
+ bool hasHomogenous = false, hasDimension = false;
+ unsigned int dimensions = 3;
+ const char* car = buffer;
+ const char* end = buffer + mBuffer2.size();
+ NextToken(&car, end);
+
+ if (car < end - 2 && car[0] == 'S' && car[1] == 'T') {
+ hasTexCoord = true; car += 2;
+ }
+ if (car < end - 1 && car[0] == 'C') {
+ hasColors = true; car++;
+ }
+ if (car < end- 1 && car[0] == 'N') {
+ hasNormals = true; car++;
+ }
+ if (car < end - 1 && car[0] == '4') {
+ hasHomogenous = true; car++;
+ }
+ if (car < end - 1 && car[0] == 'n') {
+ hasDimension = true; car++;
+ }
+ if (car < end - 3 && car[0] == 'O' && car[1] == 'F' && car[2] == 'F') {
+ car += 3;
+ NextToken(&car, end);
+ } else {
+ // in case there is no OFF header (which is allowed by the
+ // specification...), then we might have unintentionally read an
+ // additional dimension from the primitive count fields
+ dimensions = 3;
+ hasHomogenous = false;
+ NextToken(&car, end);
+
+ // at this point the next token should be an integer number
+ if (car >= end - 1 || *car < '0' || *car > '9') {
+ throw DeadlyImportError("OFF: Header is invalid");
+ }
+ }
+ if (hasDimension) {
+ dimensions = strtoul10(car, &car);
+ NextToken(&car, end);
+ }
+ if (dimensions > 3) {
+ throw DeadlyImportError
+ ("OFF: Number of vertex coordinates higher than 3 unsupported");
}
- const char* sz = line; SkipSpaces(&sz);
- const unsigned int numVertices = strtoul10(sz,&sz);SkipSpaces(&sz);
- const unsigned int numFaces = strtoul10(sz,&sz);
+ NextToken(&car, end);
+ const unsigned int numVertices = strtoul10(car, &car);
+ NextToken(&car, end);
+ const unsigned int numFaces = strtoul10(car, &car);
+ NextToken(&car, end);
+ strtoul10(car, &car); // skip edge count
+ NextToken(&car, end);
if (!numVertices) {
throw DeadlyImportError("OFF: There are no valid vertices");
@@ -146,91 +201,127 @@ void OFFImporter::InternReadFile( const std::string& pFile,
pScene->mMeshes[0] = mesh;
mesh->mNumFaces = numFaces;
- aiFace* faces = new aiFace [mesh->mNumFaces];
+ aiFace* faces = new aiFace[mesh->mNumFaces];
mesh->mFaces = faces;
- std::vector<aiVector3D> tempPositions(numVertices);
-
- // now read all vertex lines
- for (unsigned int i = 0; i< numVertices;++i)
- {
- if(!GetNextLine(buffer,line))
- {
- DefaultLogger::get()->error("OFF: The number of verts in the header is incorrect");
- break;
- }
- aiVector3D& v = tempPositions[i];
+ mesh->mNumVertices = numVertices;
+ mesh->mVertices = new aiVector3D[numVertices];
+ mesh->mNormals = hasNormals ? new aiVector3D[numVertices] : nullptr;
+ mesh->mColors[0] = hasColors ? new aiColor4D[numVertices] : nullptr;
- sz = line; SkipSpaces(&sz);
- sz = fast_atoreal_move<ai_real>(sz,(ai_real&)v.x); SkipSpaces(&sz);
- sz = fast_atoreal_move<ai_real>(sz,(ai_real&)v.y); SkipSpaces(&sz);
- fast_atoreal_move<ai_real>(sz,(ai_real&)v.z);
+ if (hasTexCoord) {
+ mesh->mNumUVComponents[0] = 2;
+ mesh->mTextureCoords[0] = new aiVector3D[numVertices];
}
+ char line[4096];
+ buffer = car;
+ const char *sz = car;
-
- // First find out how many vertices we'll need
- const char* old = buffer;
- for (unsigned int i = 0; i< mesh->mNumFaces;++i)
- {
- if(!GetNextLine(buffer,line))
- {
- DefaultLogger::get()->error("OFF: The number of faces in the header is incorrect");
+ // now read all vertex lines
+ for (unsigned int i = 0; i < numVertices; ++i) {
+ if(!GetNextLine(buffer, line)) {
+ ASSIMP_LOG_ERROR("OFF: The number of verts in the header is incorrect");
break;
}
- sz = line;SkipSpaces(&sz);
- faces->mNumIndices = strtoul10(sz,&sz);
- if(!(faces->mNumIndices) || faces->mNumIndices > 9)
- {
- DefaultLogger::get()->error("OFF: Faces with zero indices aren't allowed");
- --mesh->mNumFaces;
- continue;
- }
- mesh->mNumVertices += faces->mNumIndices;
- ++faces;
+ aiVector3D& v = mesh->mVertices[i];
+ sz = line;
+
+ // helper array to write a for loop over possible dimension values
+ ai_real* vec[3] = {&v.x, &v.y, &v.z};
+
+ // stop at dimensions: this allows loading 1D or 2D coordinate vertices
+ for (unsigned int dim = 0; dim < dimensions; ++dim ) {
+ SkipSpaces(&sz);
+ sz = fast_atoreal_move<ai_real>(sz, *vec[dim]);
+ }
+
+ // if has homogenous coordinate, divide others by this one
+ if (hasHomogenous) {
+ SkipSpaces(&sz);
+ ai_real w = 1.;
+ sz = fast_atoreal_move<ai_real>(sz, w);
+ for (unsigned int dim = 0; dim < dimensions; ++dim ) {
+ *(vec[dim]) /= w;
+ }
+ }
+
+ // read optional normals
+ if (hasNormals) {
+ aiVector3D& n = mesh->mNormals[i];
+ SkipSpaces(&sz);
+ sz = fast_atoreal_move<ai_real>(sz,(ai_real&)n.x);
+ SkipSpaces(&sz);
+ sz = fast_atoreal_move<ai_real>(sz,(ai_real&)n.y);
+ SkipSpaces(&sz);
+ fast_atoreal_move<ai_real>(sz,(ai_real&)n.z);
+ }
+
+ // reading colors is a pain because the specification says it can be
+ // integers or floats, and any number of them between 1 and 4 included,
+ // until the next comment or end of line
+ // in theory should be testing type !
+ if (hasColors) {
+ aiColor4D& c = mesh->mColors[0][i];
+ SkipSpaces(&sz);
+ sz = fast_atoreal_move<ai_real>(sz,(ai_real&)c.r);
+ if (*sz != '#' && *sz != '\n' && *sz != '\r') {
+ SkipSpaces(&sz);
+ sz = fast_atoreal_move<ai_real>(sz,(ai_real&)c.g);
+ } else {
+ c.g = 0.;
+ }
+ if (*sz != '#' && *sz != '\n' && *sz != '\r') {
+ SkipSpaces(&sz);
+ sz = fast_atoreal_move<ai_real>(sz,(ai_real&)c.b);
+ } else {
+ c.b = 0.;
+ }
+ if (*sz != '#' && *sz != '\n' && *sz != '\r') {
+ SkipSpaces(&sz);
+ sz = fast_atoreal_move<ai_real>(sz,(ai_real&)c.a);
+ } else {
+ c.a = 1.;
+ }
+ }
+ if (hasTexCoord) {
+ aiVector3D& t = mesh->mTextureCoords[0][i];
+ SkipSpaces(&sz);
+ sz = fast_atoreal_move<ai_real>(sz,(ai_real&)t.x);
+ SkipSpaces(&sz);
+ fast_atoreal_move<ai_real>(sz,(ai_real&)t.y);
+ }
}
- if (!mesh->mNumVertices)
- throw DeadlyImportError("OFF: There are no valid faces");
-
- // allocate storage for the output vertices
- std::vector<aiVector3D> verts;
- verts.reserve(mesh->mNumVertices);
-
- // second: now parse all face indices
- buffer = old;
+ // load faces with their indices
faces = mesh->mFaces;
- for (unsigned int i = 0, p = 0; i< mesh->mNumFaces;)
- {
- if(!GetNextLine(buffer,line))break;
-
+ for (unsigned int i = 0; i < numFaces; ) {
+ if(!GetNextLine(buffer,line)) {
+ ASSIMP_LOG_ERROR("OFF: The number of faces in the header is incorrect");
+ break;
+ }
unsigned int idx;
- sz = line;SkipSpaces(&sz);
+ sz = line; SkipSpaces(&sz);
idx = strtoul10(sz,&sz);
- if(!(idx) || idx > 9)
+ if(!idx || idx > 9) {
+ ASSIMP_LOG_ERROR("OFF: Faces with zero indices aren't allowed");
+ --mesh->mNumFaces;
continue;
-
- faces->mIndices = new unsigned int [faces->mNumIndices];
- for (unsigned int m = 0; m < faces->mNumIndices;++m)
- {
+ }
+ faces->mNumIndices = idx;
+ faces->mIndices = new unsigned int[faces->mNumIndices];
+ for (unsigned int m = 0; m < faces->mNumIndices;++m) {
SkipSpaces(&sz);
idx = strtoul10(sz,&sz);
- if ((idx) >= numVertices)
- {
- DefaultLogger::get()->error("OFF: Vertex index is out of range");
- idx = numVertices-1;
+ if (idx >= numVertices) {
+ ASSIMP_LOG_ERROR("OFF: Vertex index is out of range");
+ idx = numVertices - 1;
}
- faces->mIndices[m] = p++;
- verts.push_back(tempPositions[idx]);
+ faces->mIndices[m] = idx;
}
++i;
++faces;
}
-
- if (mesh->mNumVertices != verts.size()) {
- throw DeadlyImportError("OFF: Vertex count mismatch");
- }
- mesh->mVertices = new aiVector3D[verts.size()];
- memcpy(mesh->mVertices, &verts[0], verts.size() * sizeof(aiVector3D));
+
// generate the output node graph
pScene->mRootNode = new aiNode();
pScene->mRootNode->mName.Set("<OFFRoot>");
@@ -247,8 +338,8 @@ void OFFImporter::InternReadFile( const std::string& pFile,
pcMat->AddProperty(&clr,1,AI_MATKEY_COLOR_DIFFUSE);
pScene->mMaterials[0] = pcMat;
- const int twosided =1;
- pcMat->AddProperty(&twosided,1,AI_MATKEY_TWOSIDED);
+ const int twosided = 1;
+ pcMat->AddProperty(&twosided, 1, AI_MATKEY_TWOSIDED);
}
#endif // !! ASSIMP_BUILD_NO_OFF_IMPORTER
diff --git a/code/OFFLoader.h b/code/OFFLoader.h
index 29a4927bd..ed1ed98c1 100644
--- a/code/OFFLoader.h
+++ b/code/OFFLoader.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -45,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_OFFLOADER_H_INCLUDED
#define AI_OFFLOADER_H_INCLUDED
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
#include <assimp/types.h>
#include <vector>
diff --git a/code/ObjExporter.cpp b/code/ObjExporter.cpp
index 14035c262..1542efebf 100644
--- a/code/ObjExporter.cpp
+++ b/code/ObjExporter.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -43,8 +44,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_NO_OBJ_EXPORTER
#include "ObjExporter.h"
-#include "Exceptional.h"
-#include "StringComparison.h"
+#include <assimp/Exceptional.h>
+#include <assimp/StringComparison.h>
#include <assimp/version.h>
#include <assimp/IOSystem.hpp>
#include <assimp/Exporter.hpp>
@@ -58,10 +59,14 @@ namespace Assimp {
// ------------------------------------------------------------------------------------------------
// Worker function for exporting a scene to Wavefront OBJ. Prototyped and registered in Exporter.cpp
-void ExportSceneObj(const char* pFile,IOSystem* pIOSystem, const aiScene* pScene, const ExportProperties* pProperties) {
+void ExportSceneObj(const char* pFile,IOSystem* pIOSystem, const aiScene* pScene, const ExportProperties* /*pProperties*/) {
// invoke the exporter
ObjExporter exporter(pFile, pScene);
+ if (exporter.mOutput.fail() || exporter.mOutputMat.fail()) {
+ throw DeadlyExportError("output data creation failed. Most likely the file became too large: " + std::string(pFile));
+ }
+
// we're still here - export successfully completed. Write both the main OBJ file and the material script
{
std::unique_ptr<IOStream> outfile (pIOSystem->Open(pFile,"wt"));
@@ -79,23 +84,44 @@ void ExportSceneObj(const char* pFile,IOSystem* pIOSystem, const aiScene* pScene
}
}
+// ------------------------------------------------------------------------------------------------
+// Worker function for exporting a scene to Wavefront OBJ without the material file. Prototyped and registered in Exporter.cpp
+void ExportSceneObjNoMtl(const char* pFile,IOSystem* pIOSystem, const aiScene* pScene, const ExportProperties* pProperties) {
+ // invoke the exporter
+ ObjExporter exporter(pFile, pScene, true);
+
+ if (exporter.mOutput.fail() || exporter.mOutputMat.fail()) {
+ throw DeadlyExportError("output data creation failed. Most likely the file became too large: " + std::string(pFile));
+ }
+
+ // we're still here - export successfully completed. Write both the main OBJ file and the material script
+ {
+ std::unique_ptr<IOStream> outfile (pIOSystem->Open(pFile,"wt"));
+ if(outfile == NULL) {
+ throw DeadlyExportError("could not open output .obj file: " + std::string(pFile));
+ }
+ outfile->Write( exporter.mOutput.str().c_str(), static_cast<size_t>(exporter.mOutput.tellp()),1);
+ }
+
+
+}
+
} // end of namespace Assimp
static const std::string MaterialExt = ".mtl";
// ------------------------------------------------------------------------------------------------
-ObjExporter::ObjExporter(const char* _filename, const aiScene* pScene)
+ObjExporter::ObjExporter(const char* _filename, const aiScene* pScene, bool noMtl)
: filename(_filename)
, pScene(pScene)
-, vp()
, vn()
, vt()
-, vc()
-, vpMap()
-, vnMap()
-, vtMap()
-, vcMap()
-, meshes()
+, vp()
+, useVc(false)
+, mVnMap()
+, mVtMap()
+, mVpMap()
+, mMeshes()
, endl("\n") {
// make sure that all formatting happens using the standard, C locale and not the user's current locale
const std::locale& l = std::locale("C");
@@ -104,18 +130,19 @@ ObjExporter::ObjExporter(const char* _filename, const aiScene* pScene)
mOutputMat.imbue(l);
mOutputMat.precision(16);
- WriteGeometryFile();
- WriteMaterialFile();
+ WriteGeometryFile(noMtl);
+ if ( !noMtl ) {
+ WriteMaterialFile();
+ }
}
// ------------------------------------------------------------------------------------------------
ObjExporter::~ObjExporter() {
-
+ // empty
}
// ------------------------------------------------------------------------------------------------
-std::string ObjExporter :: GetMaterialLibName()
-{
+std::string ObjExporter::GetMaterialLibName() {
// within the Obj file, we use just the relative file name with the path stripped
const std::string& s = GetMaterialLibFileName();
std::string::size_type il = s.find_last_of("/\\");
@@ -128,24 +155,30 @@ std::string ObjExporter :: GetMaterialLibName()
// ------------------------------------------------------------------------------------------------
std::string ObjExporter::GetMaterialLibFileName() {
- // Remove existing .obj file extention so that the final material file name will be fileName.mtl and not fileName.obj.mtl
+ // Remove existing .obj file extension so that the final material file name will be fileName.mtl and not fileName.obj.mtl
size_t lastdot = filename.find_last_of('.');
- if (lastdot != std::string::npos)
- return filename.substr(0, lastdot) + MaterialExt;
+ if ( lastdot != std::string::npos ) {
+ return filename.substr( 0, lastdot ) + MaterialExt;
+ }
return filename + MaterialExt;
}
// ------------------------------------------------------------------------------------------------
-void ObjExporter :: WriteHeader(std::ostringstream& out) {
+void ObjExporter::WriteHeader(std::ostringstream& out) {
out << "# File produced by Open Asset Import Library (http://www.assimp.sf.net)" << endl;
- out << "# (assimp v" << aiGetVersionMajor() << '.' << aiGetVersionMinor() << '.' << aiGetVersionRevision() << ")" << endl << endl;
+ out << "# (assimp v" << aiGetVersionMajor() << '.' << aiGetVersionMinor() << '.'
+ << aiGetVersionRevision() << ")" << endl << endl;
}
// ------------------------------------------------------------------------------------------------
-std::string ObjExporter :: GetMaterialName(unsigned int index)
-{
+std::string ObjExporter::GetMaterialName(unsigned int index) {
const aiMaterial* const mat = pScene->mMaterials[index];
+ if ( nullptr == mat ) {
+ static const std::string EmptyStr;
+ return EmptyStr;
+ }
+
aiString s;
if(AI_SUCCESS == mat->Get(AI_MATKEY_NAME,s)) {
return std::string(s.data,s.length);
@@ -157,8 +190,7 @@ std::string ObjExporter :: GetMaterialName(unsigned int index)
}
// ------------------------------------------------------------------------------------------------
-void ObjExporter::WriteMaterialFile()
-{
+void ObjExporter::WriteMaterialFile() {
WriteHeader(mOutputMat);
for(unsigned int i = 0; i < pScene->mNumMaterials; ++i) {
@@ -183,7 +215,7 @@ void ObjExporter::WriteMaterialFile()
if(AI_SUCCESS == mat->Get(AI_MATKEY_COLOR_TRANSPARENT,c)) {
mOutputMat << "Tf " << c.r << " " << c.g << " " << c.b << endl;
}
-
+
ai_real o;
if(AI_SUCCESS == mat->Get(AI_MATKEY_OPACITY,o)) {
mOutputMat << "d " << o << endl;
@@ -225,35 +257,32 @@ void ObjExporter::WriteMaterialFile()
}
}
-// ------------------------------------------------------------------------------------------------
-void ObjExporter::WriteGeometryFile() {
+void ObjExporter::WriteGeometryFile(bool noMtl) {
WriteHeader(mOutput);
- mOutput << "mtllib " << GetMaterialLibName() << endl << endl;
+ if (!noMtl)
+ mOutput << "mtllib " << GetMaterialLibName() << endl << endl;
// collect mesh geometry
aiMatrix4x4 mBase;
AddNode(pScene->mRootNode, mBase);
// write vertex positions with colors, if any
- vpMap.getVectors( vp );
- vcMap.getColors( vc );
- if ( vc.empty() ) {
+ mVpMap.getKeys( vp );
+ if ( !useVc ) {
mOutput << "# " << vp.size() << " vertex positions" << endl;
- for ( const aiVector3D& v : vp ) {
- mOutput << "v " << v.x << " " << v.y << " " << v.z << endl;
+ for ( const vertexData& v : vp ) {
+ mOutput << "v " << v.vp.x << " " << v.vp.y << " " << v.vp.z << endl;
}
} else {
mOutput << "# " << vp.size() << " vertex positions and colors" << endl;
- size_t colIdx = 0;
- for ( const aiVector3D& v : vp ) {
- mOutput << "v " << v.x << " " << v.y << " " << v.z << " " << vc[ colIdx ].r << " " << vc[ colIdx ].g << " " << vc[ colIdx ].b << endl;
- colIdx++;
+ for ( const vertexData& v : vp ) {
+ mOutput << "v " << v.vp.x << " " << v.vp.y << " " << v.vp.z << " " << v.vc.r << " " << v.vc.g << " " << v.vc.b << endl;
}
}
mOutput << endl;
// write uv coordinates
- vtMap.getVectors(vt);
+ mVtMap.getKeys(vt);
mOutput << "# " << vt.size() << " UV coordinates" << endl;
for(const aiVector3D& v : vt) {
mOutput << "vt " << v.x << " " << v.y << " " << v.z << endl;
@@ -261,7 +290,7 @@ void ObjExporter::WriteGeometryFile() {
mOutput << endl;
// write vertex normals
- vnMap.getVectors(vn);
+ mVnMap.getKeys(vn);
mOutput << "# " << vn.size() << " vertex normals" << endl;
for(const aiVector3D& v : vn) {
mOutput << "vn " << v.x << " " << v.y << " " << v.z << endl;
@@ -269,12 +298,14 @@ void ObjExporter::WriteGeometryFile() {
mOutput << endl;
// now write all mesh instances
- for(const MeshInstance& m : meshes) {
+ for(const MeshInstance& m : mMeshes) {
mOutput << "# Mesh \'" << m.name << "\' with " << m.faces.size() << " faces" << endl;
if (!m.name.empty()) {
mOutput << "g " << m.name << endl;
}
- mOutput << "usemtl " << m.matname << endl;
+ if ( !noMtl ) {
+ mOutput << "usemtl " << m.matname << endl;
+ }
for(const Face& f : m.faces) {
mOutput << f.kind << ' ';
@@ -301,54 +332,15 @@ void ObjExporter::WriteGeometryFile() {
}
// ------------------------------------------------------------------------------------------------
-int ObjExporter::vecIndexMap::getIndex(const aiVector3D& vec) {
- vecIndexMap::dataType::iterator vertIt = vecMap.find(vec);
- // vertex already exists, so reference it
- if(vertIt != vecMap.end()){
- return vertIt->second;
- }
- vecMap[vec] = mNextIndex;
- int ret = mNextIndex;
- mNextIndex++;
- return ret;
-}
-
-// ------------------------------------------------------------------------------------------------
-void ObjExporter::vecIndexMap::getVectors( std::vector<aiVector3D>& vecs ) {
- vecs.resize(vecMap.size());
- for(vecIndexMap::dataType::iterator it = vecMap.begin(); it != vecMap.end(); ++it){
- vecs[it->second-1] = it->first;
- }
-}
-
-// ------------------------------------------------------------------------------------------------
-int ObjExporter::colIndexMap::getIndex( const aiColor4D& col ) {
- colIndexMap::dataType::iterator vertIt = colMap.find( col );
- // vertex already exists, so reference it
- if ( vertIt != colMap.end() ) {
- return vertIt->second;
- }
- colMap[ col ] = mNextIndex;
- int ret = mNextIndex;
- mNextIndex++;
-
- return ret;
-}
+void ObjExporter::AddMesh(const aiString& name, const aiMesh* m, const aiMatrix4x4& mat) {
+ mMeshes.push_back(MeshInstance() );
+ MeshInstance& mesh = mMeshes.back();
-// ------------------------------------------------------------------------------------------------
-void ObjExporter::colIndexMap::getColors( std::vector<aiColor4D> &colors ) {
- colors.resize( colMap.size() );
- for ( colIndexMap::dataType::iterator it = colMap.begin(); it != colMap.end(); ++it ) {
- colors[ it->second - 1 ] = it->first;
+ if ( nullptr != m->mColors[ 0 ] ) {
+ useVc = true;
}
-}
-// ------------------------------------------------------------------------------------------------
-void ObjExporter::AddMesh(const aiString& name, const aiMesh* m, const aiMatrix4x4& mat) {
- meshes.push_back(MeshInstance());
- MeshInstance& mesh = meshes.back();
-
- mesh.name = std::string(name.data,name.length) + (m->mName.length ? "_" + std::string(m->mName.data,m->mName.length) : "");
+ mesh.name = std::string( name.data, name.length );
mesh.matname = GetMaterialName(m->mMaterialIndex);
mesh.faces.resize(m->mNumFaces);
@@ -373,24 +365,23 @@ void ObjExporter::AddMesh(const aiString& name, const aiMesh* m, const aiMatrix4
const unsigned int idx = f.mIndices[a];
aiVector3D vert = mat * m->mVertices[idx];
- face.indices[a].vp = vpMap.getIndex(vert);
- if (m->mNormals) {
- aiVector3D norm = aiMatrix3x3(mat) * m->mNormals[idx];
- face.indices[a].vn = vnMap.getIndex(norm);
+ if ( nullptr != m->mColors[ 0 ] ) {
+ aiColor4D col4 = m->mColors[ 0 ][ idx ];
+ face.indices[a].vp = mVpMap.getIndex({vert, aiColor3D(col4.r, col4.g, col4.b)});
} else {
- face.indices[a].vn = 0;
+ face.indices[a].vp = mVpMap.getIndex({vert, aiColor3D(0,0,0)});
}
- if ( nullptr != m->mColors[ 0 ] ) {
- aiColor4D col4 = m->mColors[ 0 ][ idx ];
- face.indices[ a ].vc = vcMap.getIndex( col4 );
+ if (m->mNormals) {
+ aiVector3D norm = aiMatrix3x3(mat) * m->mNormals[idx];
+ face.indices[a].vn = mVnMap.getIndex(norm);
} else {
- face.indices[ a ].vc = 0;
+ face.indices[a].vn = 0;
}
if ( m->mTextureCoords[ 0 ] ) {
- face.indices[a].vt = vtMap.getIndex(m->mTextureCoords[0][idx]);
+ face.indices[a].vt = mVtMap.getIndex(m->mTextureCoords[0][idx]);
} else {
face.indices[a].vt = 0;
}
@@ -399,12 +390,17 @@ void ObjExporter::AddMesh(const aiString& name, const aiMesh* m, const aiMatrix4
}
// ------------------------------------------------------------------------------------------------
-void ObjExporter::AddNode(const aiNode* nd, const aiMatrix4x4& mParent)
-{
+void ObjExporter::AddNode(const aiNode* nd, const aiMatrix4x4& mParent) {
const aiMatrix4x4& mAbs = mParent * nd->mTransformation;
+ aiMesh *cm( nullptr );
for(unsigned int i = 0; i < nd->mNumMeshes; ++i) {
- AddMesh(nd->mName, pScene->mMeshes[nd->mMeshes[i]], mAbs);
+ cm = pScene->mMeshes[nd->mMeshes[i]];
+ if (nullptr != cm) {
+ AddMesh(cm->mName, pScene->mMeshes[nd->mMeshes[i]], mAbs);
+ } else {
+ AddMesh(nd->mName, pScene->mMeshes[nd->mMeshes[i]], mAbs);
+ }
}
for(unsigned int i = 0; i < nd->mNumChildren; ++i) {
diff --git a/code/ObjExporter.h b/code/ObjExporter.h
index 0ba042b0b..bd745b593 100644
--- a/code/ObjExporter.h
+++ b/code/ObjExporter.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -62,7 +63,7 @@ namespace Assimp {
class ObjExporter {
public:
/// Constructor for a specific scene to export
- ObjExporter(const char* filename, const aiScene* pScene);
+ ObjExporter(const char* filename, const aiScene* pScene, bool noMtl=false);
~ObjExporter();
std::string GetMaterialLibName();
std::string GetMaterialLibFileName();
@@ -76,13 +77,12 @@ private:
FaceVertex()
: vp()
, vn()
- , vt()
- , vc() {
+ , vt() {
// empty
}
// one-based, 0 means: 'does not exist'
- unsigned int vp, vn, vt, vc;
+ unsigned int vp, vn, vt;
};
struct Face {
@@ -97,7 +97,7 @@ private:
void WriteHeader(std::ostringstream& out);
void WriteMaterialFile();
- void WriteGeometryFile();
+ void WriteGeometryFile(bool noMtl=false);
std::string GetMaterialName(unsigned int index);
void AddMesh(const aiString& name, const aiMesh* m, const aiMatrix4x4& mat);
void AddNode(const aiNode* nd, const aiMatrix4x4& mParent);
@@ -105,67 +105,81 @@ private:
private:
std::string filename;
const aiScene* const pScene;
- std::vector<aiVector3D> vp, vn, vt;
- std::vector<aiColor4D> vc;
- struct aiVectorCompare {
- bool operator() (const aiVector3D& a, const aiVector3D& b) const {
- if(a.x < b.x) return true;
- if(a.x > b.x) return false;
- if(a.y < b.y) return true;
- if(a.y > b.y) return false;
- if(a.z < b.z) return true;
+ struct vertexData {
+ aiVector3D vp;
+ aiColor3D vc; // OBJ does not support 4D color
+ };
+
+ std::vector<aiVector3D> vn, vt;
+ std::vector<aiColor4D> vc;
+ std::vector<vertexData> vp;
+ bool useVc;
+
+ struct vertexDataCompare {
+ bool operator() ( const vertexData& a, const vertexData& b ) const {
+ // position
+ if (a.vp.x < b.vp.x) return true;
+ if (a.vp.x > b.vp.x) return false;
+ if (a.vp.y < b.vp.y) return true;
+ if (a.vp.y > b.vp.y) return false;
+ if (a.vp.z < b.vp.z) return true;
+ if (a.vp.z > b.vp.z) return false;
+
+ // color
+ if (a.vc.r < b.vc.r) return true;
+ if (a.vc.r > b.vc.r) return false;
+ if (a.vc.g < b.vc.g) return true;
+ if (a.vc.g > b.vc.g) return false;
+ if (a.vc.b < b.vc.b) return true;
+ if (a.vc.b > b.vc.b) return false;
return false;
}
};
- struct aiColor4Compare {
- bool operator() ( const aiColor4D& a, const aiColor4D& b ) const {
- if ( a.r < b.r ) return true;
- if ( a.r > b.r ) return false;
- if ( a.g < b.g ) return true;
- if ( a.g > b.g ) return false;
- if ( a.b < b.b ) return true;
- if ( a.b > b.b ) return false;
- if ( a.a < b.a ) return true;
- if ( a.a > b.a ) return false;
+ struct aiVectorCompare {
+ bool operator() (const aiVector3D& a, const aiVector3D& b) const {
+ if(a.x < b.x) return true;
+ if(a.x > b.x) return false;
+ if(a.y < b.y) return true;
+ if(a.y > b.y) return false;
+ if(a.z < b.z) return true;
return false;
}
};
- class vecIndexMap {
+ template <class T, class Compare = std::less<T>>
+ class indexMap {
int mNextIndex;
- typedef std::map<aiVector3D, int, aiVectorCompare> dataType;
+ typedef std::map<T, int, Compare> dataType;
dataType vecMap;
public:
- vecIndexMap()
+ indexMap()
: mNextIndex(1) {
// empty
}
- int getIndex(const aiVector3D& vec);
- void getVectors( std::vector<aiVector3D>& vecs );
- };
-
- class colIndexMap {
- int mNextIndex;
- typedef std::map<aiColor4D, int, aiColor4Compare> dataType;
- dataType colMap;
-
- public:
- colIndexMap()
- : mNextIndex( 1 ) {
- // empty
- }
-
- int getIndex( const aiColor4D& col );
- void getColors( std::vector<aiColor4D> &colors );
+ int getIndex(const T& key) {
+ typename dataType::iterator vertIt = vecMap.find(key);
+ // vertex already exists, so reference it
+ if(vertIt != vecMap.end()){
+ return vertIt->second;
+ }
+ return vecMap[key] = mNextIndex++;
+ };
+
+ void getKeys( std::vector<T>& keys ) {
+ keys.resize(vecMap.size());
+ for(typename dataType::iterator it = vecMap.begin(); it != vecMap.end(); ++it){
+ keys[it->second-1] = it->first;
+ }
+ };
};
- vecIndexMap vpMap, vnMap, vtMap;
- colIndexMap vcMap;
- std::vector<MeshInstance> meshes;
+ indexMap<aiVector3D, aiVectorCompare> mVnMap, mVtMap;
+ indexMap<vertexData, vertexDataCompare> mVpMap;
+ std::vector<MeshInstance> mMeshes;
// this endl() doesn't flush() the stream
const std::string endl;
diff --git a/code/ObjFileData.h b/code/ObjFileData.h
index 2658f8a2a..38786e6f4 100644
--- a/code/ObjFileData.h
+++ b/code/ObjFileData.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/ObjFileImporter.cpp b/code/ObjFileImporter.cpp
index 9f3bdef97..6fd48cfa1 100644
--- a/code/ObjFileImporter.cpp
+++ b/code/ObjFileImporter.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -45,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "ObjFileImporter.h"
#include "ObjFileParser.h"
#include "ObjFileData.h"
-#include "IOStreamBuffer.h"
+#include <assimp/IOStreamBuffer.h>
#include <memory>
#include <assimp/DefaultIOSystem.h>
#include <assimp/Importer.hpp>
@@ -75,41 +76,36 @@ using namespace std;
// ------------------------------------------------------------------------------------------------
// Default constructor
-ObjFileImporter::ObjFileImporter() :
- m_Buffer(),
- m_pRootObject( NULL ),
- m_strAbsPath( "" )
-{
+ObjFileImporter::ObjFileImporter()
+: m_Buffer()
+, m_pRootObject( nullptr )
+, m_strAbsPath( "" ) {
DefaultIOSystem io;
m_strAbsPath = io.getOsSeparator();
}
// ------------------------------------------------------------------------------------------------
// Destructor.
-ObjFileImporter::~ObjFileImporter()
-{
+ObjFileImporter::~ObjFileImporter() {
delete m_pRootObject;
- m_pRootObject = NULL;
+ m_pRootObject = nullptr;
}
// ------------------------------------------------------------------------------------------------
// Returns true, if file is an obj file.
-bool ObjFileImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler , bool checkSig ) const
-{
- if(!checkSig) //Check File Extension
- {
+bool ObjFileImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler , bool checkSig ) const {
+ if(!checkSig) {
+ //Check File Extension
return SimpleExtensionCheck(pFile,"obj");
- }
- else //Check file Header
- {
+ } else {
+ // Check file Header
static const char *pTokens[] = { "mtllib", "usemtl", "v ", "vt ", "vn ", "o ", "g ", "s ", "f " };
- return BaseImporter::SearchFileHeaderForToken(pIOHandler, pFile, pTokens, 9 );
+ return BaseImporter::SearchFileHeaderForToken(pIOHandler, pFile, pTokens, 9, 200, false, true );
}
}
// ------------------------------------------------------------------------------------------------
-const aiImporterDesc* ObjFileImporter::GetInfo () const
-{
+const aiImporterDesc* ObjFileImporter::GetInfo() const {
return &desc;
}
@@ -206,36 +202,88 @@ void ObjFileImporter::CreateDataFromImport(const ObjFile::Model* pModel, aiScene
// Create the root node of the scene
pScene->mRootNode = new aiNode;
- if ( !pModel->m_ModelName.empty() )
- {
+ if ( !pModel->m_ModelName.empty() ) {
// Set the name of the scene
pScene->mRootNode->mName.Set(pModel->m_ModelName);
- }
- else
- {
+ } else {
// This is a fatal error, so break down the application
ai_assert(false);
}
- // Create nodes for the whole scene
- std::vector<aiMesh*> MeshArray;
- for (size_t index = 0; index < pModel->m_Objects.size(); index++)
- {
- createNodes(pModel, pModel->m_Objects[ index ], pScene->mRootNode, pScene, MeshArray);
- }
+ if (pModel->m_Objects.size() > 0) {
- // Create mesh pointer buffer for this scene
- if (pScene->mNumMeshes > 0)
- {
- pScene->mMeshes = new aiMesh*[ MeshArray.size() ];
- for (size_t index =0; index < MeshArray.size(); index++)
- {
- pScene->mMeshes[ index ] = MeshArray[ index ];
+ unsigned int meshCount = 0;
+ unsigned int childCount = 0;
+
+ for(size_t index = 0; index < pModel->m_Objects.size(); ++index) {
+ if(pModel->m_Objects[index]) {
+ ++childCount;
+ meshCount += (unsigned int)pModel->m_Objects[index]->m_Meshes.size();
+ }
+ }
+
+ // Allocate space for the child nodes on the root node
+ pScene->mRootNode->mChildren = new aiNode*[ childCount ];
+
+ // Create nodes for the whole scene
+ std::vector<aiMesh*> MeshArray;
+ MeshArray.reserve(meshCount);
+ for (size_t index = 0; index < pModel->m_Objects.size(); ++index) {
+ createNodes(pModel, pModel->m_Objects[index], pScene->mRootNode, pScene, MeshArray);
+ }
+
+ ai_assert(pScene->mRootNode->mNumChildren == childCount);
+
+ // Create mesh pointer buffer for this scene
+ if (pScene->mNumMeshes > 0) {
+ pScene->mMeshes = new aiMesh*[MeshArray.size()];
+ for (size_t index = 0; index < MeshArray.size(); ++index) {
+ pScene->mMeshes[index] = MeshArray[index];
+ }
+ }
+
+ // Create all materials
+ createMaterials(pModel, pScene);
+ }else {
+ if (pModel->m_Vertices.empty()){
+ return;
+ }
+
+ std::unique_ptr<aiMesh> mesh( new aiMesh );
+ mesh->mPrimitiveTypes = aiPrimitiveType_POINT;
+ unsigned int n = (unsigned int)pModel->m_Vertices.size();
+ mesh->mNumVertices = n;
+
+ mesh->mVertices = new aiVector3D[n];
+ memcpy(mesh->mVertices, pModel->m_Vertices.data(), n*sizeof(aiVector3D) );
+
+ if ( !pModel->m_Normals.empty() ) {
+ mesh->mNormals = new aiVector3D[n];
+ if (pModel->m_Normals.size() < n) {
+ throw DeadlyImportError("OBJ: vertex normal index out of range");
+ }
+ memcpy(mesh->mNormals, pModel->m_Normals.data(), n*sizeof(aiVector3D));
+ }
+
+ if ( !pModel->m_VertexColors.empty() ){
+ mesh->mColors[0] = new aiColor4D[mesh->mNumVertices];
+ for (unsigned int i = 0; i < n; ++i) {
+ if (i < pModel->m_VertexColors.size() ) {
+ const aiVector3D& color = pModel->m_VertexColors[i];
+ mesh->mColors[0][i] = aiColor4D(color.x, color.y, color.z, 1.0);
+ }else {
+ throw DeadlyImportError("OBJ: vertex color index out of range");
+ }
+ }
}
- }
- // Create all materials
- createMaterials( pModel, pScene );
+ pScene->mRootNode->mNumMeshes = 1;
+ pScene->mRootNode->mMeshes = new unsigned int[1];
+ pScene->mRootNode->mMeshes[0] = 0;
+ pScene->mMeshes = new aiMesh*[1];
+ pScene->mNumMeshes = 1;
+ pScene->mMeshes[0] = mesh.release();
+ }
}
// ------------------------------------------------------------------------------------------------
@@ -256,22 +304,23 @@ aiNode *ObjFileImporter::createNodes(const ObjFile::Model* pModel, const ObjFile
pNode->mName = pObject->m_strObjName;
// If we have a parent node, store it
- if( pParent != NULL ) {
- appendChildToParentNode( pParent, pNode );
- }
+ ai_assert( NULL != pParent );
+ appendChildToParentNode( pParent, pNode );
- for ( size_t i=0; i< pObject->m_Meshes.size(); i++ )
- {
+ for ( size_t i=0; i< pObject->m_Meshes.size(); ++i ) {
unsigned int meshId = pObject->m_Meshes[ i ];
aiMesh *pMesh = createTopology( pModel, pObject, meshId );
- if( pMesh && pMesh->mNumFaces > 0 ) {
- MeshArray.push_back( pMesh );
+ if( pMesh ) {
+ if (pMesh->mNumFaces > 0) {
+ MeshArray.push_back( pMesh );
+ } else {
+ delete pMesh;
+ }
}
}
// Create all nodes from the sub-objects stored in the current object
- if ( !pObject->m_SubObjects.empty() )
- {
+ if ( !pObject->m_SubObjects.empty() ) {
size_t numChilds = pObject->m_SubObjects.size();
pNode->mNumChildren = static_cast<unsigned int>( numChilds );
pNode->mChildren = new aiNode*[ numChilds ];
@@ -281,16 +330,14 @@ aiNode *ObjFileImporter::createNodes(const ObjFile::Model* pModel, const ObjFile
// Set mesh instances into scene- and node-instances
const size_t meshSizeDiff = MeshArray.size()- oldMeshSize;
- if ( meshSizeDiff > 0 )
- {
+ if ( meshSizeDiff > 0 ) {
pNode->mMeshes = new unsigned int[ meshSizeDiff ];
pNode->mNumMeshes = static_cast<unsigned int>( meshSizeDiff );
size_t index = 0;
- for (size_t i = oldMeshSize; i < MeshArray.size(); i++)
- {
+ for (size_t i = oldMeshSize; i < MeshArray.size(); ++i ) {
pNode->mMeshes[ index ] = pScene->mNumMeshes;
pScene->mNumMeshes++;
- index++;
+ ++index;
}
}
@@ -317,7 +364,7 @@ aiMesh *ObjFileImporter::createTopology( const ObjFile::Model* pModel, const Obj
return NULL;
}
- aiMesh* pMesh = new aiMesh;
+ std::unique_ptr<aiMesh> pMesh(new aiMesh);
if( !pObjMesh->m_name.empty() ) {
pMesh->mName.Set( pObjMesh->m_name );
}
@@ -382,9 +429,9 @@ aiMesh *ObjFileImporter::createTopology( const ObjFile::Model* pModel, const Obj
}
// Create mesh vertices
- createVertexArray(pModel, pData, meshIndex, pMesh, uiIdxCount);
+ createVertexArray(pModel, pData, meshIndex, pMesh.get(), uiIdxCount);
- return pMesh;
+ return pMesh.release();
}
// ------------------------------------------------------------------------------------------------
@@ -411,8 +458,8 @@ void ObjFileImporter::createVertexArray(const ObjFile::Model* pModel,
pMesh->mNumVertices = numIndices;
if (pMesh->mNumVertices == 0) {
throw DeadlyImportError( "OBJ: no vertices" );
- } else if (pMesh->mNumVertices > AI_MAX_ALLOC(aiVector3D)) {
- throw DeadlyImportError( "OBJ: Too many vertices, would run out of memory" );
+ } else if (pMesh->mNumVertices > AI_MAX_VERTICES) {
+ throw DeadlyImportError( "OBJ: Too many vertices" );
}
pMesh->mVertices = new aiVector3D[ pMesh->mNumVertices ];
@@ -444,6 +491,10 @@ void ObjFileImporter::createVertexArray(const ObjFile::Model* pModel,
throw DeadlyImportError( "OBJ: vertex index out of range" );
}
+ if ( pMesh->mNumVertices <= newIndex ) {
+ throw DeadlyImportError("OBJ: bad vertex index");
+ }
+
pMesh->mVertices[ newIndex ] = pModel->m_Vertices[ vertex ];
// Copy all normals
@@ -458,7 +509,7 @@ void ObjFileImporter::createVertexArray(const ObjFile::Model* pModel,
// Copy all vertex colors
if ( !pModel->m_VertexColors.empty())
{
- const aiVector3D color = pModel->m_VertexColors[ vertex ];
+ const aiVector3D& color = pModel->m_VertexColors[ vertex ];
pMesh->mColors[0][ newIndex ] = aiColor4D(color.x, color.y, color.z, 1.0);
}
@@ -466,7 +517,6 @@ void ObjFileImporter::createVertexArray(const ObjFile::Model* pModel,
if ( !pModel->m_TextureCoord.empty() && vertexIndex < pSourceFace->m_texturCoords.size())
{
const unsigned int tex = pSourceFace->m_texturCoords.at( vertexIndex );
- ai_assert( tex < pModel->m_TextureCoord.size() );
if ( tex >= pModel->m_TextureCoord.size() )
throw DeadlyImportError("OBJ: texture coordinate index out of range");
@@ -475,10 +525,6 @@ void ObjFileImporter::createVertexArray(const ObjFile::Model* pModel,
pMesh->mTextureCoords[ 0 ][ newIndex ] = aiVector3D( coord3d.x, coord3d.y, coord3d.z );
}
- if ( pMesh->mNumVertices <= newIndex ) {
- throw DeadlyImportError("OBJ: bad vertex index");
- }
-
// Get destination face
aiFace *pDestFace = &pMesh->mFaces[ outIndex ];
@@ -563,7 +609,7 @@ void ObjFileImporter::createMaterials(const ObjFile::Model* pModel, aiScene* pSc
const unsigned int numMaterials = (unsigned int) pModel->m_MaterialLib.size();
pScene->mNumMaterials = 0;
if ( pModel->m_MaterialLib.empty() ) {
- DefaultLogger::get()->debug("OBJ: no materials specified");
+ ASSIMP_LOG_DEBUG("OBJ: no materials specified");
return;
}
@@ -597,7 +643,7 @@ void ObjFileImporter::createMaterials(const ObjFile::Model* pModel, aiScene* pSc
break;
default:
sm = aiShadingMode_Gouraud;
- DefaultLogger::get()->error("OBJ: unexpected illumination model (0-2 recognized)");
+ ASSIMP_LOG_ERROR("OBJ: unexpected illumination model (0-2 recognized)");
}
mat->AddProperty<int>( &sm, 1, AI_MATKEY_SHADING_MODEL);
@@ -740,25 +786,8 @@ void ObjFileImporter::appendChildToParentNode(aiNode *pParent, aiNode *pChild)
// Assign parent to child
pChild->mParent = pParent;
- // If already children was assigned to the parent node, store them in a
- std::vector<aiNode*> temp;
- if (pParent->mChildren != NULL)
- {
- ai_assert( 0 != pParent->mNumChildren );
- for (size_t index = 0; index < pParent->mNumChildren; index++)
- {
- temp.push_back(pParent->mChildren [ index ] );
- }
- delete [] pParent->mChildren;
- }
-
// Copy node instances into parent node
pParent->mNumChildren++;
- pParent->mChildren = new aiNode*[ pParent->mNumChildren ];
- for (size_t index = 0; index < pParent->mNumChildren-1; index++)
- {
- pParent->mChildren[ index ] = temp [ index ];
- }
pParent->mChildren[ pParent->mNumChildren-1 ] = pChild;
}
diff --git a/code/ObjFileImporter.h b/code/ObjFileImporter.h
index 302cf951a..f564fe22b 100644
--- a/code/ObjFileImporter.h
+++ b/code/ObjFileImporter.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -41,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef OBJ_FILE_IMPORTER_H_INC
#define OBJ_FILE_IMPORTER_H_INC
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
#include <assimp/material.h>
#include <vector>
diff --git a/code/ObjFileMtlImporter.cpp b/code/ObjFileMtlImporter.cpp
index 69f35a67d..16bde1b43 100644
--- a/code/ObjFileMtlImporter.cpp
+++ b/code/ObjFileMtlImporter.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -47,28 +48,27 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "ObjFileMtlImporter.h"
#include "ObjTools.h"
#include "ObjFileData.h"
-#include "fast_atof.h"
-#include "ParsingUtils.h"
+#include <assimp/fast_atof.h>
+#include <assimp/ParsingUtils.h>
#include <assimp/material.h>
#include <assimp/DefaultLogger.hpp>
-
namespace Assimp {
-// Material specific token
-static const std::string DiffuseTexture = "map_Kd";
-static const std::string AmbientTexture = "map_Ka";
-static const std::string SpecularTexture = "map_Ks";
-static const std::string OpacityTexture = "map_d";
-static const std::string EmissiveTexture = "map_emissive";
-static const std::string EmissiveTexture_1 = "map_Ke";
-static const std::string BumpTexture1 = "map_bump";
-static const std::string BumpTexture2 = "map_Bump";
-static const std::string BumpTexture3 = "bump";
-static const std::string NormalTexture = "map_Kn";
-static const std::string ReflectionTexture = "refl";
-static const std::string DisplacementTexture = "disp";
-static const std::string SpecularityTexture = "map_ns";
+// Material specific token (case insensitive compare)
+static const std::string DiffuseTexture = "map_Kd";
+static const std::string AmbientTexture = "map_Ka";
+static const std::string SpecularTexture = "map_Ks";
+static const std::string OpacityTexture = "map_d";
+static const std::string EmissiveTexture1 = "map_emissive";
+static const std::string EmissiveTexture2 = "map_Ke";
+static const std::string BumpTexture1 = "map_bump";
+static const std::string BumpTexture2 = "bump";
+static const std::string NormalTexture = "map_Kn";
+static const std::string ReflectionTexture = "refl";
+static const std::string DisplacementTexture1 = "map_disp";
+static const std::string DisplacementTexture2 = "disp";
+static const std::string SpecularityTexture = "map_ns";
// texture option specific token
static const std::string BlendUOption = "-blendu";
@@ -84,8 +84,6 @@ static const std::string BumpOption = "-bm";
static const std::string ChannelOption = "-imfchan";
static const std::string TypeOption = "-type";
-
-
// -------------------------------------------------------------------
// Constructor
ObjFileMtlImporter::ObjFileMtlImporter( std::vector<char> &buffer,
@@ -303,11 +301,12 @@ void ObjFileMtlImporter::createMaterial()
// New Material created
m_pModel->m_pCurrentMaterial = new ObjFile::Material();
m_pModel->m_pCurrentMaterial->MaterialName.Set( name );
- if (m_pModel->m_pCurrentMesh) {
- m_pModel->m_pCurrentMesh->m_uiMaterialIndex = m_pModel->m_MaterialLib.size() - 1;
- }
m_pModel->m_MaterialLib.push_back( name );
m_pModel->m_MaterialMap[ name ] = m_pModel->m_pCurrentMaterial;
+
+ if (m_pModel->m_pCurrentMesh) {
+ m_pModel->m_pCurrentMesh->m_uiMaterialIndex = static_cast<unsigned int>(m_pModel->m_MaterialLib.size() - 1);
+ }
} else {
// Use older material
m_pModel->m_pCurrentMaterial = (*it).second;
@@ -329,46 +328,43 @@ void ObjFileMtlImporter::getTexture() {
// Ambient texture
out = & m_pModel->m_pCurrentMaterial->textureAmbient;
clampIndex = ObjFile::Material::TextureAmbientType;
- } else if (!ASSIMP_strincmp( pPtr, SpecularTexture.c_str(), static_cast<unsigned int>(SpecularTexture.size()) ) ) {
+ } else if ( !ASSIMP_strincmp( pPtr, SpecularTexture.c_str(), static_cast<unsigned int>(SpecularTexture.size()) ) ) {
// Specular texture
out = & m_pModel->m_pCurrentMaterial->textureSpecular;
clampIndex = ObjFile::Material::TextureSpecularType;
+ } else if ( !ASSIMP_strincmp( pPtr, DisplacementTexture1.c_str(), static_cast<unsigned int>(DisplacementTexture1.size()) ) ||
+ !ASSIMP_strincmp( pPtr, DisplacementTexture2.c_str(), static_cast<unsigned int>(DisplacementTexture2.size()) ) ) {
+ // Displacement texture
+ out = &m_pModel->m_pCurrentMaterial->textureDisp;
+ clampIndex = ObjFile::Material::TextureDispType;
} else if ( !ASSIMP_strincmp( pPtr, OpacityTexture.c_str(), static_cast<unsigned int>(OpacityTexture.size()) ) ) {
// Opacity texture
out = & m_pModel->m_pCurrentMaterial->textureOpacity;
clampIndex = ObjFile::Material::TextureOpacityType;
- } else if (!ASSIMP_strincmp( pPtr, EmissiveTexture.c_str(), static_cast<unsigned int>(EmissiveTexture.size()) ) ) {
+ } else if ( !ASSIMP_strincmp( pPtr, EmissiveTexture1.c_str(), static_cast<unsigned int>(EmissiveTexture1.size()) ) ||
+ !ASSIMP_strincmp( pPtr, EmissiveTexture2.c_str(), static_cast<unsigned int>(EmissiveTexture2.size()) ) ) {
// Emissive texture
out = & m_pModel->m_pCurrentMaterial->textureEmissive;
clampIndex = ObjFile::Material::TextureEmissiveType;
- } else if ( !ASSIMP_strincmp( pPtr, EmissiveTexture_1.c_str(), static_cast<unsigned int>(EmissiveTexture_1.size()) ) ) {
- // Emissive texture
- out = &m_pModel->m_pCurrentMaterial->textureEmissive;
- clampIndex = ObjFile::Material::TextureEmissiveType;
} else if ( !ASSIMP_strincmp( pPtr, BumpTexture1.c_str(), static_cast<unsigned int>(BumpTexture1.size()) ) ||
- !ASSIMP_strincmp( pPtr, BumpTexture2.c_str(), static_cast<unsigned int>(BumpTexture2.size()) ) ||
- !ASSIMP_strincmp( pPtr, BumpTexture3.c_str(), static_cast<unsigned int>(BumpTexture3.size()) ) ) {
+ !ASSIMP_strincmp( pPtr, BumpTexture2.c_str(), static_cast<unsigned int>(BumpTexture2.size()) ) ) {
// Bump texture
out = & m_pModel->m_pCurrentMaterial->textureBump;
clampIndex = ObjFile::Material::TextureBumpType;
- } else if (!ASSIMP_strincmp( pPtr,NormalTexture.c_str(), static_cast<unsigned int>(NormalTexture.size()) ) ) {
+ } else if ( !ASSIMP_strincmp( pPtr,NormalTexture.c_str(), static_cast<unsigned int>(NormalTexture.size()) ) ) {
// Normal map
out = & m_pModel->m_pCurrentMaterial->textureNormal;
clampIndex = ObjFile::Material::TextureNormalType;
- } else if(!ASSIMP_strincmp( pPtr, ReflectionTexture.c_str(), static_cast<unsigned int>(ReflectionTexture.size()) ) ) {
+ } else if( !ASSIMP_strincmp( pPtr, ReflectionTexture.c_str(), static_cast<unsigned int>(ReflectionTexture.size()) ) ) {
// Reflection texture(s)
//Do nothing here
return;
- } else if (!ASSIMP_strincmp( pPtr, DisplacementTexture.c_str(), static_cast<unsigned int>(DisplacementTexture.size()) ) ) {
- // Displacement texture
- out = &m_pModel->m_pCurrentMaterial->textureDisp;
- clampIndex = ObjFile::Material::TextureDispType;
- } else if (!ASSIMP_strincmp( pPtr, SpecularityTexture.c_str(), static_cast<unsigned int>(SpecularityTexture.size()) ) ) {
+ } else if ( !ASSIMP_strincmp( pPtr, SpecularityTexture.c_str(), static_cast<unsigned int>(SpecularityTexture.size()) ) ) {
// Specularity scaling (glossiness)
out = & m_pModel->m_pCurrentMaterial->textureSpecularity;
clampIndex = ObjFile::Material::TextureSpecularityType;
} else {
- DefaultLogger::get()->error("OBJ/MTL: Encountered unknown texture type");
+ ASSIMP_LOG_ERROR("OBJ/MTL: Encountered unknown texture type");
return;
}
diff --git a/code/ObjFileMtlImporter.h b/code/ObjFileMtlImporter.h
index c9bcc9a9f..d6a7b1f1a 100644
--- a/code/ObjFileMtlImporter.h
+++ b/code/ObjFileMtlImporter.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/ObjFileParser.cpp b/code/ObjFileParser.cpp
index dfa77dba2..7630127fa 100644
--- a/code/ObjFileParser.cpp
+++ b/code/ObjFileParser.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -45,8 +46,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "ObjFileMtlImporter.h"
#include "ObjTools.h"
#include "ObjFileData.h"
-#include "ParsingUtils.h"
-#include "BaseImporter.h"
+#include <assimp/ParsingUtils.h>
+#include <assimp/BaseImporter.h>
#include <assimp/DefaultIOSystem.h>
#include <assimp/DefaultLogger.hpp>
#include <assimp/material.h>
@@ -60,7 +61,7 @@ const std::string ObjFileParser::DEFAULT_MATERIAL = AI_DEFAULT_MATERIAL_NAME;
ObjFileParser::ObjFileParser()
: m_DataIt()
, m_DataItEnd()
-, m_pModel( NULL )
+, m_pModel( nullptr )
, m_uiLine( 0 )
, m_pIO( nullptr )
, m_progress( nullptr )
@@ -73,7 +74,7 @@ ObjFileParser::ObjFileParser( IOStreamBuffer<char> &streamBuffer, const std::str
const std::string &originalObjFileName) :
m_DataIt(),
m_DataItEnd(),
- m_pModel(NULL),
+ m_pModel(nullptr),
m_uiLine(0),
m_pIO( io ),
m_progress(progress),
@@ -82,7 +83,7 @@ ObjFileParser::ObjFileParser( IOStreamBuffer<char> &streamBuffer, const std::str
std::fill_n(m_buffer,Buffersize,0);
// Create the model instance to store all the data
- m_pModel = new ObjFile::Model();
+ m_pModel.reset(new ObjFile::Model());
m_pModel->m_ModelName = modelName;
// create default material and store it
@@ -96,8 +97,6 @@ ObjFileParser::ObjFileParser( IOStreamBuffer<char> &streamBuffer, const std::str
}
ObjFileParser::~ObjFileParser() {
- delete m_pModel;
- m_pModel = NULL;
}
void ObjFileParser::setBuffer( std::vector<char> &buffer ) {
@@ -106,7 +105,7 @@ void ObjFileParser::setBuffer( std::vector<char> &buffer ) {
}
ObjFile::Model *ObjFileParser::GetModel() const {
- return m_pModel;
+ return m_pModel.get();
}
void ObjFileParser::parseFile( IOStreamBuffer<char> &streamBuffer ) {
@@ -353,14 +352,13 @@ void ObjFileParser::getHomogeneousVector3( std::vector<aiVector3D> &point3d_arra
copyNextWord( m_buffer, Buffersize );
w = ( ai_real ) fast_atof( m_buffer );
- ai_assert( w != 0 );
+ if (w == 0)
+ throw DeadlyImportError("OBJ: Invalid component in homogeneous vector (Division by zero)");
point3d_array.push_back( aiVector3D( x/w, y/w, z/w ) );
m_DataIt = skipLine<DataArrayIt>( m_DataIt, m_DataItEnd, m_uiLine );
}
-// -------------------------------------------------------------------
-// Get values for two 3D vectors on the same line
void ObjFileParser::getTwoVectors3( std::vector<aiVector3D> &point3d_array_a, std::vector<aiVector3D> &point3d_array_b ) {
ai_real x, y, z;
copyNextWord(m_buffer, Buffersize);
@@ -388,8 +386,6 @@ void ObjFileParser::getTwoVectors3( std::vector<aiVector3D> &point3d_array_a, st
m_DataIt = skipLine<DataArrayIt>( m_DataIt, m_DataItEnd, m_uiLine );
}
-// -------------------------------------------------------------------
-// Get values for a new 2D vector instance
void ObjFileParser::getVector2( std::vector<aiVector2D> &point2d_array ) {
ai_real x, y;
copyNextWord(m_buffer, Buffersize);
@@ -405,8 +401,6 @@ void ObjFileParser::getVector2( std::vector<aiVector2D> &point2d_array ) {
static const std::string DefaultObjName = "defaultobject";
-// -------------------------------------------------------------------
-// Get values for a new face instance
void ObjFileParser::getFace( aiPrimitiveType type ) {
m_DataIt = getNextToken<DataArrayIt>( m_DataIt, m_DataItEnd );
if ( m_DataIt == m_DataItEnd || *m_DataIt == '\0' ) {
@@ -432,7 +426,7 @@ void ObjFileParser::getFace( aiPrimitiveType type ) {
if ( *m_DataIt =='/' ) {
if (type == aiPrimitiveType_POINT) {
- DefaultLogger::get()->error("Obj: Separator unexpected in point statement");
+ ASSIMP_LOG_ERROR("Obj: Separator unexpected in point statement");
}
if (iPos == 0) {
//if there are no texture coordinates in the file, but normals
@@ -481,13 +475,18 @@ void ObjFileParser::getFace( aiPrimitiveType type ) {
} else {
reportErrorTokenInFace();
}
+ } else {
+ //On error, std::atoi will return 0 which is not a valid value
+ delete face;
+ throw DeadlyImportError("OBJ: Invalid face indice");
}
+
}
m_DataIt += iStep;
}
if ( face->m_vertices.empty() ) {
- DefaultLogger::get()->error("Obj: Ignoring empty face");
+ ASSIMP_LOG_ERROR("Obj: Ignoring empty face");
// skip line and clean up
m_DataIt = skipLine<DataArrayIt>( m_DataIt, m_DataItEnd, m_uiLine );
delete face;
@@ -522,8 +521,6 @@ void ObjFileParser::getFace( aiPrimitiveType type ) {
m_DataIt = skipLine<DataArrayIt>( m_DataIt, m_DataItEnd, m_uiLine );
}
-// -------------------------------------------------------------------
-// Get values for a new material description
void ObjFileParser::getMaterialDesc() {
// Get next data for material data
m_DataIt = getNextToken<DataArrayIt>(m_DataIt, m_DataItEnd);
@@ -555,10 +552,15 @@ void ObjFileParser::getMaterialDesc() {
// Search for material
std::map<std::string, ObjFile::Material*>::iterator it = m_pModel->m_MaterialMap.find(strName);
if (it == m_pModel->m_MaterialMap.end()) {
- // Not found, use default material
- m_pModel->m_pCurrentMaterial = m_pModel->m_pDefaultMaterial;
- DefaultLogger::get()->error("OBJ: failed to locate material " + strName + ", skipping");
- strName = m_pModel->m_pDefaultMaterial->MaterialName.C_Str();
+ // Not found, so we don't know anything about the material except for its name.
+ // This may be the case if the material library is missing. We don't want to lose all
+ // materials if that happens, so create a new named material instead of discarding it
+ // completely.
+ ASSIMP_LOG_ERROR("OBJ: failed to locate material " + strName + ", creating new material");
+ m_pModel->m_pCurrentMaterial = new ObjFile::Material();
+ m_pModel->m_pCurrentMaterial->MaterialName.Set(strName);
+ m_pModel->m_MaterialLib.push_back(strName);
+ m_pModel->m_MaterialMap[strName] = m_pModel->m_pCurrentMaterial;
} else {
// Found, using detected material
m_pModel->m_pCurrentMaterial = (*it).second;
@@ -601,7 +603,7 @@ void ObjFileParser::getMaterialLib() {
// Check if directive is valid.
if ( 0 == strMatName.length() ) {
- DefaultLogger::get()->warn( "OBJ: no name for material library specified." );
+ ASSIMP_LOG_WARN( "OBJ: no name for material library specified." );
return;
}
@@ -610,19 +612,20 @@ void ObjFileParser::getMaterialLib() {
if ( '/' != *path.rbegin() ) {
path += '/';
}
- absName = path + strMatName;
+ absName += path;
+ absName += strMatName;
} else {
absName = strMatName;
}
- IOStream *pFile = m_pIO->Open( absName );
- if (!pFile ) {
- DefaultLogger::get()->error("OBJ: Unable to locate material file " + strMatName);
+ IOStream *pFile = m_pIO->Open( absName );
+ if ( nullptr == pFile ) {
+ ASSIMP_LOG_ERROR("OBJ: Unable to locate material file " + strMatName);
std::string strMatFallbackName = m_originalObjFileName.substr(0, m_originalObjFileName.length() - 3) + "mtl";
- DefaultLogger::get()->info("OBJ: Opening fallback material file " + strMatFallbackName);
+ ASSIMP_LOG_INFO("OBJ: Opening fallback material file " + strMatFallbackName);
pFile = m_pIO->Open(strMatFallbackName);
if (!pFile) {
- DefaultLogger::get()->error("OBJ: Unable to locate fallback material file " + strMatFallbackName);
+ ASSIMP_LOG_ERROR("OBJ: Unable to locate fallback material file " + strMatFallbackName);
m_DataIt = skipLine<DataArrayIt>(m_DataIt, m_DataItEnd, m_uiLine);
return;
}
@@ -637,7 +640,7 @@ void ObjFileParser::getMaterialLib() {
m_pIO->Close( pFile );
// Importing the material library
- ObjFileMtlImporter mtlImporter( buffer, strMatName, m_pModel );
+ ObjFileMtlImporter mtlImporter( buffer, strMatName, m_pModel.get() );
}
// -------------------------------------------------------------------
@@ -657,7 +660,7 @@ void ObjFileParser::getNewMaterial() {
std::map<std::string, ObjFile::Material*>::iterator it = m_pModel->m_MaterialMap.find( strMat );
if ( it == m_pModel->m_MaterialMap.end() ) {
// Show a warning, if material was not found
- DefaultLogger::get()->warn("OBJ: Unsupported material requested: " + strMat);
+ ASSIMP_LOG_WARN("OBJ: Unsupported material requested: " + strMat);
m_pModel->m_pCurrentMaterial = m_pModel->m_pDefaultMaterial;
} else {
// Set new material
@@ -814,7 +817,7 @@ void ObjFileParser::createMesh( const std::string &meshName )
}
else
{
- DefaultLogger::get()->error("OBJ: No object detected to attach a new mesh instance.");
+ ASSIMP_LOG_ERROR("OBJ: No object detected to attach a new mesh instance.");
}
}
@@ -848,7 +851,7 @@ bool ObjFileParser::needsNewMesh( const std::string &materialName )
void ObjFileParser::reportErrorTokenInFace()
{
m_DataIt = skipLine<DataArrayIt>( m_DataIt, m_DataItEnd, m_uiLine );
- DefaultLogger::get()->error("OBJ: Not supported token in face description detected");
+ ASSIMP_LOG_ERROR("OBJ: Not supported token in face description detected");
}
// -------------------------------------------------------------------
diff --git a/code/ObjFileParser.h b/code/ObjFileParser.h
index fa5b3ca31..7cf06ae05 100644
--- a/code/ObjFileParser.h
+++ b/code/ObjFileParser.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -44,10 +45,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <vector>
#include <string>
#include <map>
+#include <memory>
#include <assimp/vector2.h>
#include <assimp/vector3.h>
#include <assimp/mesh.h>
-#include "IOStreamBuffer.h"
+#include <assimp/IOStreamBuffer.h>
namespace Assimp {
@@ -145,7 +147,7 @@ private:
//! Iterator to end position of buffer
DataArrayIt m_DataItEnd;
//! Pointer to model instance
- ObjFile::Model *m_pModel;
+ std::unique_ptr<ObjFile::Model> m_pModel;
//! Current line (for debugging)
unsigned int m_uiLine;
//! Helper buffer
diff --git a/code/ObjTools.h b/code/ObjTools.h
index 7236cedc0..842efd749 100644
--- a/code/ObjTools.h
+++ b/code/ObjTools.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -45,8 +46,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef OBJ_TOOLS_H_INC
#define OBJ_TOOLS_H_INC
-#include "fast_atof.h"
-#include "ParsingUtils.h"
+#include <assimp/fast_atof.h>
+#include <assimp/ParsingUtils.h>
#include <vector>
namespace Assimp {
diff --git a/code/OgreBinarySerializer.cpp b/code/OgreBinarySerializer.cpp
index 95aec221f..8948844d0 100644
--- a/code/OgreBinarySerializer.cpp
+++ b/code/OgreBinarySerializer.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -43,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "OgreXmlSerializer.h"
#include "OgreParsingUtils.h"
-#include "TinyFormatter.h"
+#include <assimp/TinyFormatter.h>
#include <assimp/DefaultLogger.hpp>
@@ -175,7 +176,7 @@ uint16_t OgreBinarySerializer::ReadHeader(bool readLen)
#if (OGRE_BINARY_SERIALIZER_DEBUG == 1)
if (id != HEADER_CHUNK_ID)
{
- DefaultLogger::get()->debug(Formatter::format() << (assetMode == AM_Mesh
+ ASSIMP_LOG_DEBUG(Formatter::format() << (assetMode == AM_Mesh
? MeshHeaderToString(static_cast<MeshChunkId>(id)) : SkeletonHeaderToString(static_cast<SkeletonChunkId>(id))));
}
#endif
@@ -191,7 +192,7 @@ void OgreBinarySerializer::RollbackHeader()
void OgreBinarySerializer::SkipBytes(size_t numBytes)
{
#if (OGRE_BINARY_SERIALIZER_DEBUG == 1)
- DefaultLogger::get()->debug(Formatter::format() << "Skipping " << numBytes << " bytes");
+ ASSIMP_LOG_DEBUG_F( "Skipping ", numBytes, " bytes");
#endif
m_reader->IncPtr(numBytes);
@@ -236,8 +237,8 @@ void OgreBinarySerializer::ReadMesh(Mesh *mesh)
{
mesh->hasSkeletalAnimations = Read<bool>();
- DefaultLogger::get()->debug("Reading Mesh");
- DefaultLogger::get()->debug(Formatter::format() << " - Skeletal animations: " << (mesh->hasSkeletalAnimations ? "true" : "false"));
+ ASSIMP_LOG_DEBUG("Reading Mesh");
+ ASSIMP_LOG_DEBUG_F( " - Skeletal animations: ", mesh->hasSkeletalAnimations ? "true" : "false" );
if (!AtEnd())
{
@@ -419,9 +420,9 @@ void OgreBinarySerializer::ReadSubMesh(Mesh *mesh)
submesh->indexData->faceCount = static_cast<uint32_t>(submesh->indexData->count / 3);
submesh->indexData->is32bit = Read<bool>();
- DefaultLogger::get()->debug(Formatter::format() << "Reading SubMesh " << mesh->subMeshes.size());
- DefaultLogger::get()->debug(Formatter::format() << " - Material: '" << submesh->materialRef << "'");
- DefaultLogger::get()->debug(Formatter::format() << " - Uses shared geometry: " << (submesh->usesSharedVertexData ? "true" : "false"));
+ ASSIMP_LOG_DEBUG_F( "Reading SubMesh ", mesh->subMeshes.size());
+ ASSIMP_LOG_DEBUG_F( " - Material: '", submesh->materialRef, "'");
+ ASSIMP_LOG_DEBUG_F( " - Uses shared geometry: ", submesh->usesSharedVertexData ? "true" : "false" );
// Index buffer
if (submesh->indexData->count > 0)
@@ -430,9 +431,9 @@ void OgreBinarySerializer::ReadSubMesh(Mesh *mesh)
uint8_t *indexBuffer = ReadBytes(numBytes);
submesh->indexData->buffer = MemoryStreamPtr(new Assimp::MemoryIOStream(indexBuffer, numBytes, true));
- DefaultLogger::get()->debug(Formatter::format() << " - " << submesh->indexData->faceCount
- << " faces from " << submesh->indexData->count << (submesh->indexData->is32bit ? " 32bit" : " 16bit")
- << " indexes of " << numBytes << " bytes");
+ ASSIMP_LOG_DEBUG_F( " - ", submesh->indexData->faceCount,
+ " faces from ", submesh->indexData->count, (submesh->indexData->is32bit ? " 32bit" : " 16bit"),
+ " indexes of ", numBytes, " bytes");
}
// Vertex buffer if not referencing the shared geometry
@@ -548,7 +549,7 @@ void OgreBinarySerializer::ReadSubMeshNames(Mesh *mesh)
}
submesh->name = ReadLine();
- DefaultLogger::get()->debug(Formatter::format() << " - SubMesh " << submesh->index << " name '" << submesh->name << "'");
+ ASSIMP_LOG_DEBUG_F( " - SubMesh ", submesh->index, " name '", submesh->name, "'");
if (!AtEnd())
id = ReadHeader();
@@ -562,7 +563,7 @@ void OgreBinarySerializer::ReadGeometry(VertexData *dest)
{
dest->count = Read<uint32_t>();
- DefaultLogger::get()->debug(Formatter::format() << " - Reading geometry of " << dest->count << " vertices");
+ ASSIMP_LOG_DEBUG_F( " - Reading geometry of ", dest->count, " vertices");
if (!AtEnd())
{
@@ -619,8 +620,8 @@ void OgreBinarySerializer::ReadGeometryVertexElement(VertexData *dest)
element.offset = Read<uint16_t>();
element.index = Read<uint16_t>();
- DefaultLogger::get()->debug(Formatter::format() << " - Vertex element " << element.SemanticToString() << " of type "
- << element.TypeToString() << " index=" << element.index << " source=" << element.source);
+ ASSIMP_LOG_DEBUG_F( " - Vertex element ", element.SemanticToString(), " of type ",
+ element.TypeToString(), " index=", element.index, " source=", element.source);
dest->vertexElements.push_back(element);
}
@@ -641,7 +642,7 @@ void OgreBinarySerializer::ReadGeometryVertexBuffer(VertexData *dest)
uint8_t *vertexBuffer = ReadBytes(numBytes);
dest->vertexBindings[bindIndex] = MemoryStreamPtr(new Assimp::MemoryIOStream(vertexBuffer, numBytes, true));
- DefaultLogger::get()->debug(Formatter::format() << " - Read vertex buffer for source " << bindIndex << " of " << numBytes << " bytes");
+ ASSIMP_LOG_DEBUG_F( " - Read vertex buffer for source ", bindIndex, " of ", numBytes, " bytes");
}
void OgreBinarySerializer::ReadEdgeList(Mesh * /*mesh*/)
@@ -891,13 +892,13 @@ MemoryStreamReaderPtr OgreBinarySerializer::OpenReader(Assimp::IOSystem *pIOHand
{
if (!EndsWith(filename, ".skeleton", false))
{
- DefaultLogger::get()->error("Imported Mesh is referencing to unsupported '" + filename + "' skeleton file.");
+ ASSIMP_LOG_ERROR_F("Imported Mesh is referencing to unsupported '", filename, "' skeleton file.");
return MemoryStreamReaderPtr();
}
if (!pIOHandler->Exists(filename))
{
- DefaultLogger::get()->error("Failed to find skeleton file '" + filename + "' that is referenced by imported Mesh.");
+ ASSIMP_LOG_ERROR_F("Failed to find skeleton file '", filename, "' that is referenced by imported Mesh.");
return MemoryStreamReaderPtr();
}
@@ -924,7 +925,7 @@ void OgreBinarySerializer::ReadSkeleton(Skeleton *skeleton)
<< " Supported versions: " << SKELETON_VERSION_1_8 << " and " << SKELETON_VERSION_1_1);
}
- DefaultLogger::get()->debug("Reading Skeleton");
+ ASSIMP_LOG_DEBUG("Reading Skeleton");
bool firstBone = true;
bool firstAnim = true;
@@ -943,7 +944,7 @@ void OgreBinarySerializer::ReadSkeleton(Skeleton *skeleton)
{
if (firstBone)
{
- DefaultLogger::get()->debug(" - Bones");
+ ASSIMP_LOG_DEBUG(" - Bones");
firstBone = false;
}
@@ -959,7 +960,7 @@ void OgreBinarySerializer::ReadSkeleton(Skeleton *skeleton)
{
if (firstAnim)
{
- DefaultLogger::get()->debug(" - Animations");
+ ASSIMP_LOG_DEBUG(" - Animations");
firstAnim = false;
}
@@ -1002,7 +1003,7 @@ void OgreBinarySerializer::ReadBone(Skeleton *skeleton)
throw DeadlyImportError(Formatter::format() << "Ogre Skeleton bone indexes not contiguous. Error at bone index " << bone->id);
}
- DefaultLogger::get()->debug(Formatter::format() << " " << bone->id << " " << bone->name);
+ ASSIMP_LOG_DEBUG_F( " ", bone->id, " ", bone->name);
skeleton->bones.push_back(bone);
}
@@ -1052,7 +1053,7 @@ void OgreBinarySerializer::ReadSkeletonAnimation(Skeleton *skeleton)
skeleton->animations.push_back(anim);
- DefaultLogger::get()->debug(Formatter::format() << " " << anim->name << " (" << anim->length << " sec, " << anim->tracks.size() << " tracks)");
+ ASSIMP_LOG_DEBUG_F( " ", anim->name, " (", anim->length, " sec, ", anim->tracks.size(), " tracks)");
}
void OgreBinarySerializer::ReadSkeletonAnimationTrack(Skeleton * /*skeleton*/, Animation *dest)
diff --git a/code/OgreBinarySerializer.h b/code/OgreBinarySerializer.h
index c48e33dd6..a31047c70 100644
--- a/code/OgreBinarySerializer.h
+++ b/code/OgreBinarySerializer.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -45,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_NO_OGRE_IMPORTER
#include "OgreStructs.h"
-#include "StreamReader.h"
+#include <assimp/StreamReader.h>
namespace Assimp
{
diff --git a/code/OgreImporter.cpp b/code/OgreImporter.cpp
index 4dc802574..e77654d7b 100644
--- a/code/OgreImporter.cpp
+++ b/code/OgreImporter.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/OgreImporter.h b/code/OgreImporter.h
index 2b3009096..8f088a3cc 100644
--- a/code/OgreImporter.h
+++ b/code/OgreImporter.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -44,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_NO_OGRE_IMPORTER
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
#include "OgreStructs.h"
#include "OgreParsingUtils.h"
diff --git a/code/OgreMaterial.cpp b/code/OgreMaterial.cpp
index dfb77ffef..ceca04da1 100644
--- a/code/OgreMaterial.cpp
+++ b/code/OgreMaterial.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -44,11 +45,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_NO_OGRE_IMPORTER
#include "OgreImporter.h"
-#include "TinyFormatter.h"
+#include <assimp/TinyFormatter.h>
#include <assimp/material.h>
#include <assimp/scene.h>
#include <assimp/DefaultLogger.hpp>
-#include "fast_atof.h"
+#include <assimp/fast_atof.h>
#include <vector>
#include <sstream>
@@ -174,18 +175,18 @@ aiMaterial* OgreImporter::ReadMaterial(const std::string &pFile, Assimp::IOSyste
if (materialFile) {
break;
}
- DefaultLogger::get()->debug(Formatter::format() << "Source file for material '" << materialName << "' " << potentialFiles[i] << " does not exist");
+ ASSIMP_LOG_DEBUG_F( "Source file for material '", materialName, "' ", potentialFiles[i], " does not exist");
}
if (!materialFile)
{
- DefaultLogger::get()->error(Formatter::format() << "Failed to find source file for material '" << materialName << "'");
+ ASSIMP_LOG_ERROR_F( "Failed to find source file for material '", materialName, "'");
return 0;
}
std::unique_ptr<IOStream> stream(materialFile);
if (stream->FileSize() == 0)
{
- DefaultLogger::get()->warn(Formatter::format() << "Source file for material '" << materialName << "' is empty (size is 0 bytes)");
+ ASSIMP_LOG_WARN_F( "Source file for material '", materialName, "' is empty (size is 0 bytes)");
return 0;
}
@@ -200,7 +201,7 @@ aiMaterial* OgreImporter::ReadMaterial(const std::string &pFile, Assimp::IOSyste
ss << &data[0];
}
- DefaultLogger::get()->debug("Reading material '" + materialName + "'");
+ ASSIMP_LOG_DEBUG_F("Reading material '", materialName, "'");
aiMaterial *material = new aiMaterial();
m_textures.clear();
@@ -233,7 +234,6 @@ aiMaterial* OgreImporter::ReadMaterial(const std::string &pFile, Assimp::IOSyste
ss >> linePart;
if (linePart != materialName)
{
- //DefaultLogger::get()->debug(Formatter::format() << "Found material '" << linePart << "' that does not match at index " << ss.tellg());
ss >> linePart;
continue;
}
@@ -241,11 +241,11 @@ aiMaterial* OgreImporter::ReadMaterial(const std::string &pFile, Assimp::IOSyste
NextAfterNewLine(ss, linePart);
if (linePart != partBlockStart)
{
- DefaultLogger::get()->error(Formatter::format() << "Invalid material: block start missing near index " << ss.tellg());
+ ASSIMP_LOG_ERROR_F( "Invalid material: block start missing near index ", ss.tellg());
return material;
}
- DefaultLogger::get()->debug("material '" + materialName + "'");
+ ASSIMP_LOG_DEBUG_F("material '", materialName, "'");
while(linePart != partBlockEnd)
{
@@ -258,7 +258,7 @@ aiMaterial* OgreImporter::ReadMaterial(const std::string &pFile, Assimp::IOSyste
ReadTechnique(Trim(techniqueName), ss, material);
}
- // Read informations from a custom material
+ // Read information from a custom material
/** @todo This "set $x y" does not seem to be a official Ogre material system feature.
Materials can inherit other materials and override texture units by using the (unique)
parent texture unit name in your cloned material.
@@ -349,11 +349,11 @@ bool OgreImporter::ReadTechnique(const std::string &techniqueName, stringstream
if (linePart != partBlockStart)
{
- DefaultLogger::get()->error(Formatter::format() << "Invalid material: Technique block start missing near index " << ss.tellg());
+ ASSIMP_LOG_ERROR_F( "Invalid material: Technique block start missing near index ", ss.tellg());
return false;
}
- DefaultLogger::get()->debug(" technique '" + techniqueName + "'");
+ ASSIMP_LOG_DEBUG_F(" technique '", techniqueName, "'");
const string partPass = "pass";
@@ -385,11 +385,11 @@ bool OgreImporter::ReadPass(const std::string &passName, stringstream &ss, aiMat
if (linePart != partBlockStart)
{
- DefaultLogger::get()->error(Formatter::format() << "Invalid material: Pass block start missing near index " << ss.tellg());
+ ASSIMP_LOG_ERROR_F( "Invalid material: Pass block start missing near index ", ss.tellg());
return false;
}
- DefaultLogger::get()->debug(" pass '" + passName + "'");
+ ASSIMP_LOG_DEBUG_F(" pass '", passName, "'");
const string partAmbient = "ambient";
const string partDiffuse = "diffuse";
@@ -416,7 +416,7 @@ bool OgreImporter::ReadPass(const std::string &passName, stringstream &ss, aiMat
ss >> r >> g >> b;
const aiColor3D color(r, g, b);
- DefaultLogger::get()->debug(Formatter::format() << " " << linePart << " " << r << " " << g << " " << b);
+ ASSIMP_LOG_DEBUG_F( " ", linePart, " ", r, " ", g, " ", b);
if (linePart == partAmbient)
{
@@ -451,11 +451,11 @@ bool OgreImporter::ReadTextureUnit(const std::string &textureUnitName, stringstr
if (linePart != partBlockStart)
{
- DefaultLogger::get()->error(Formatter::format() << "Invalid material: Texture unit block start missing near index " << ss.tellg());
+ ASSIMP_LOG_ERROR_F( "Invalid material: Texture unit block start missing near index ", ss.tellg());
return false;
}
- DefaultLogger::get()->debug(" texture_unit '" + textureUnitName + "'");
+ ASSIMP_LOG_DEBUG_F(" texture_unit '", textureUnitName, "'");
const string partTexture = "texture";
const string partTextCoordSet = "tex_coord_set";
@@ -490,7 +490,7 @@ bool OgreImporter::ReadTextureUnit(const std::string &textureUnitName, stringstr
if (posSuffix != string::npos && posUnderscore != string::npos && posSuffix > posUnderscore)
{
string identifier = Ogre::ToLower(textureRef.substr(posUnderscore, posSuffix - posUnderscore));
- DefaultLogger::get()->debug(Formatter::format() << "Detecting texture type from filename postfix '" << identifier << "'");
+ ASSIMP_LOG_DEBUG_F( "Detecting texture type from filename postfix '", identifier, "'");
if (identifier == "_n" || identifier == "_nrm" || identifier == "_nrml" || identifier == "_normal" || identifier == "_normals" || identifier == "_normalmap")
{
@@ -568,20 +568,20 @@ bool OgreImporter::ReadTextureUnit(const std::string &textureUnitName, stringstr
if (textureRef.empty())
{
- DefaultLogger::get()->warn("Texture reference is empty, ignoring texture_unit.");
+ ASSIMP_LOG_WARN("Texture reference is empty, ignoring texture_unit.");
return false;
}
if (textureType == aiTextureType_NONE)
{
- DefaultLogger::get()->warn("Failed to detect texture type for '" + textureRef + "', ignoring texture_unit.");
+ ASSIMP_LOG_WARN("Failed to detect texture type for '" + textureRef + "', ignoring texture_unit.");
return false;
}
unsigned int textureTypeIndex = m_textures[textureType];
m_textures[textureType]++;
- DefaultLogger::get()->debug(Formatter::format() << " texture '" << textureRef << "' type " << textureType
- << " index " << textureTypeIndex << " UV " << uvCoord);
+ ASSIMP_LOG_DEBUG_F( " texture '", textureRef, "' type ", textureType,
+ " index ", textureTypeIndex, " UV ", uvCoord);
aiString assimpTextureRef(textureRef);
material->AddProperty(&assimpTextureRef, AI_MATKEY_TEXTURE(textureType, textureTypeIndex));
diff --git a/code/OgreParsingUtils.h b/code/OgreParsingUtils.h
index d1895374f..c6b6e0caf 100644
--- a/code/OgreParsingUtils.h
+++ b/code/OgreParsingUtils.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -44,34 +45,30 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_NO_OGRE_IMPORTER
-#include "ParsingUtils.h"
+#include <assimp/ParsingUtils.h>
#include <functional>
#include <algorithm>
#include <stdint.h>
#include <sstream>
#include <cctype>
-namespace Assimp
-{
-namespace Ogre
-{
+namespace Assimp {
+namespace Ogre {
/// Returns a lower cased copy of @s.
-static inline std::string ToLower(std::string s)
+static AI_FORCE_INLINE
+std::string ToLower(std::string s)
{
std::transform(s.begin(), s.end(), s.begin(), ::tolower);
return s;
}
/// Returns if @c s ends with @c suffix. If @c caseSensitive is false, both strings will be lower cased before matching.
-static inline bool EndsWith(const std::string &s, const std::string &suffix, bool caseSensitive = true)
-{
- if (s.empty() || suffix.empty())
- {
+static AI_FORCE_INLINE
+bool EndsWith(const std::string &s, const std::string &suffix, bool caseSensitive = true) {
+ if (s.empty() || suffix.empty()) {
return false;
- }
- else if (s.length() < suffix.length())
- {
+ } else if (s.length() < suffix.length()) {
return false;
}
@@ -81,48 +78,43 @@ static inline bool EndsWith(const std::string &s, const std::string &suffix, boo
size_t len = suffix.length();
std::string sSuffix = s.substr(s.length()-len, len);
+
return (ASSIMP_stricmp(sSuffix, suffix) == 0);
}
// Below trim functions adapted from http://stackoverflow.com/questions/216823/whats-the-best-way-to-trim-stdstring
/// Trim from start
-static inline std::string &TrimLeft(std::string &s, bool newlines = true)
-{
- if (!newlines)
- {
- s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::ptr_fun(Assimp::IsSpace<char>))));
- }
- else
- {
- s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::ptr_fun(Assimp::IsSpaceOrNewLine<char>))));
+static AI_FORCE_INLINE
+std::string &TrimLeft(std::string &s, bool newlines = true) {
+ if (!newlines) {
+ s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](char c) { return !Assimp::IsSpace<char>(c); }));
+ } else {
+ s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](char c) { return !Assimp::IsSpaceOrNewLine<char>(c); }));
}
return s;
}
/// Trim from end
-static inline std::string &TrimRight(std::string &s, bool newlines = true)
-{
- if (!newlines)
- {
- s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::ptr_fun(Assimp::IsSpace<char>))).base(),s.end());
- }
- else
- {
- s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::ptr_fun(Assimp::IsSpaceOrNewLine<char>))));
+static AI_FORCE_INLINE
+std::string &TrimRight(std::string &s, bool newlines = true) {
+ if (!newlines) {
+ s.erase(std::find_if(s.rbegin(), s.rend(), [](char c) { return !Assimp::IsSpace<char>(c); }).base(),s.end());
+ } else {
+ s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](char c) { return !Assimp::IsSpaceOrNewLine<char>(c); }));
}
return s;
}
/// Trim from both ends
-static inline std::string &Trim(std::string &s, bool newlines = true)
-{
+static AI_FORCE_INLINE
+std::string &Trim(std::string &s, bool newlines = true) {
return TrimLeft(TrimRight(s, newlines), newlines);
}
/// Skips a line from current @ss position until a newline. Returns the skipped part.
-static inline std::string SkipLine(std::stringstream &ss)
-{
+static AI_FORCE_INLINE
+std::string SkipLine(std::stringstream &ss) {
std::string skipped;
getline(ss, skipped);
return skipped;
@@ -130,8 +122,8 @@ static inline std::string SkipLine(std::stringstream &ss)
/// Skips a line and reads next element from @c ss to @c nextElement.
/** @return Skipped line content until newline. */
-static inline std::string NextAfterNewLine(std::stringstream &ss, std::string &nextElement)
-{
+static AI_FORCE_INLINE
+std::string NextAfterNewLine(std::stringstream &ss, std::string &nextElement) {
std::string skipped = SkipLine(ss);
ss >> nextElement;
return skipped;
diff --git a/code/OgreStructs.cpp b/code/OgreStructs.cpp
index 09597950a..b2ad8e089 100644
--- a/code/OgreStructs.cpp
+++ b/code/OgreStructs.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -42,10 +43,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_NO_OGRE_IMPORTER
#include "OgreStructs.h"
-#include "TinyFormatter.h"
+#include <assimp/TinyFormatter.h>
#include <assimp/scene.h>
#include <assimp/DefaultLogger.hpp>
-#include "Exceptional.h"
+#include <assimp/Exceptional.h>
namespace Assimp
@@ -610,7 +611,7 @@ aiMesh *SubMesh::ConvertToAssimpMesh(Mesh *parent)
}
else
{
- DefaultLogger::get()->warn(Formatter::format() << "Ogre imported UV0 type " << uv1Element->TypeToString() << " is not compatible with Assimp. Ignoring UV.");
+ ASSIMP_LOG_WARN(Formatter::format() << "Ogre imported UV0 type " << uv1Element->TypeToString() << " is not compatible with Assimp. Ignoring UV.");
uv1 = 0;
}
}
@@ -623,7 +624,7 @@ aiMesh *SubMesh::ConvertToAssimpMesh(Mesh *parent)
}
else
{
- DefaultLogger::get()->warn(Formatter::format() << "Ogre imported UV0 type " << uv2Element->TypeToString() << " is not compatible with Assimp. Ignoring UV.");
+ ASSIMP_LOG_WARN(Formatter::format() << "Ogre imported UV0 type " << uv2Element->TypeToString() << " is not compatible with Assimp. Ignoring UV.");
uv2 = 0;
}
}
diff --git a/code/OgreStructs.h b/code/OgreStructs.h
index 04383bc4e..dfe0346dc 100644
--- a/code/OgreStructs.h
+++ b/code/OgreStructs.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -44,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_NO_OGRE_IMPORTER
-#include "MemoryIOWrapper.h"
+#include <assimp/MemoryIOWrapper.h>
#include <memory>
#include <assimp/mesh.h>
#include <map>
diff --git a/code/OgreXmlSerializer.cpp b/code/OgreXmlSerializer.cpp
index b5d20cdf6..5805a528d 100644
--- a/code/OgreXmlSerializer.cpp
+++ b/code/OgreXmlSerializer.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -43,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "OgreBinarySerializer.h"
#include "OgreParsingUtils.h"
-#include "TinyFormatter.h"
+#include <assimp/TinyFormatter.h>
#include <assimp/DefaultLogger.hpp>
#include <memory>
@@ -71,11 +72,11 @@ AI_WONT_RETURN void ThrowAttibuteError(const XmlReader* reader, const std::strin
}
template<>
-int32_t OgreXmlSerializer::ReadAttribute<int32_t>(const std::string &name) const
+int32_t OgreXmlSerializer::ReadAttribute<int32_t>(const char *name) const
{
- if (HasAttribute(name.c_str()))
+ if (HasAttribute(name))
{
- return static_cast<int32_t>(m_reader->getAttributeValueAsInt(name.c_str()));
+ return static_cast<int32_t>(m_reader->getAttributeValueAsInt(name));
}
else
{
@@ -85,9 +86,9 @@ int32_t OgreXmlSerializer::ReadAttribute<int32_t>(const std::string &name) const
}
template<>
-uint32_t OgreXmlSerializer::ReadAttribute<uint32_t>(const std::string &name) const
+uint32_t OgreXmlSerializer::ReadAttribute<uint32_t>(const char *name) const
{
- if (HasAttribute(name.c_str()))
+ if (HasAttribute(name))
{
/** @note This is hackish. But we are never expecting unsigned values that go outside the
int32_t range. Just monitor for negative numbers and kill the import. */
@@ -109,9 +110,9 @@ uint32_t OgreXmlSerializer::ReadAttribute<uint32_t>(const std::string &name) con
}
template<>
-uint16_t OgreXmlSerializer::ReadAttribute<uint16_t>(const std::string &name) const
+uint16_t OgreXmlSerializer::ReadAttribute<uint16_t>(const char *name) const
{
- if (HasAttribute(name.c_str()))
+ if (HasAttribute(name))
{
return static_cast<uint16_t>(ReadAttribute<uint32_t>(name));
}
@@ -123,11 +124,11 @@ uint16_t OgreXmlSerializer::ReadAttribute<uint16_t>(const std::string &name) con
}
template<>
-float OgreXmlSerializer::ReadAttribute<float>(const std::string &name) const
+float OgreXmlSerializer::ReadAttribute<float>(const char *name) const
{
- if (HasAttribute(name.c_str()))
+ if (HasAttribute(name))
{
- return m_reader->getAttributeValueAsFloat(name.c_str());
+ return m_reader->getAttributeValueAsFloat(name);
}
else
{
@@ -137,9 +138,9 @@ float OgreXmlSerializer::ReadAttribute<float>(const std::string &name) const
}
template<>
-std::string OgreXmlSerializer::ReadAttribute<std::string>(const std::string &name) const
+std::string OgreXmlSerializer::ReadAttribute<std::string>(const char *name) const
{
- const char* value = m_reader->getAttributeValue(name.c_str());
+ const char* value = m_reader->getAttributeValue(name);
if (value)
{
return std::string(value);
@@ -152,7 +153,7 @@ std::string OgreXmlSerializer::ReadAttribute<std::string>(const std::string &nam
}
template<>
-bool OgreXmlSerializer::ReadAttribute<bool>(const std::string &name) const
+bool OgreXmlSerializer::ReadAttribute<bool>(const char *name) const
{
std::string value = Ogre::ToLower(ReadAttribute<std::string>(name));
if (ASSIMP_stricmp(value, "true") == 0)
@@ -170,9 +171,9 @@ bool OgreXmlSerializer::ReadAttribute<bool>(const std::string &name) const
}
}
-bool OgreXmlSerializer::HasAttribute(const std::string &name) const
+bool OgreXmlSerializer::HasAttribute(const char *name) const
{
- return (m_reader->getAttributeValue(name.c_str()) != 0);
+ return (m_reader->getAttributeValue(name) != 0);
}
std::string &OgreXmlSerializer::NextNode()
@@ -189,7 +190,7 @@ std::string &OgreXmlSerializer::NextNode()
CurrentNodeName(true);
#if (OGRE_XML_SERIALIZER_DEBUG == 1)
- DefaultLogger::get()->debug("<" + m_currentNodeName + ">");
+ ASSIMP_LOG_DEBUG"<" + m_currentNodeName + ">");
#endif
return m_currentNodeName;
}
@@ -209,115 +210,114 @@ std::string OgreXmlSerializer::CurrentNodeName(bool forceRead)
std::string &OgreXmlSerializer::SkipCurrentNode()
{
#if (OGRE_XML_SERIALIZER_DEBUG == 1)
- DefaultLogger::get()->debug("Skipping node <" + m_currentNodeName + ">");
+ ASSIMP_LOG_DEBUG("Skipping node <" + m_currentNodeName + ">");
#endif
- for(;;)
- {
- if (!m_reader->read())
- {
+ for(;;) {
+ if (!m_reader->read()) {
m_currentNodeName = "";
return m_currentNodeName;
}
- if (m_reader->getNodeType() != irr::io::EXN_ELEMENT_END)
+ if ( m_reader->getNodeType() != irr::io::EXN_ELEMENT_END ) {
continue;
- else if (std::string(m_reader->getNodeName()) == m_currentNodeName)
+ } else if ( std::string( m_reader->getNodeName() ) == m_currentNodeName ) {
break;
+ }
}
+
return NextNode();
}
// Mesh XML constants
// <mesh>
-const std::string nnMesh = "mesh";
-const std::string nnSharedGeometry = "sharedgeometry";
-const std::string nnSubMeshes = "submeshes";
-const std::string nnSubMesh = "submesh";
-const std::string nnSubMeshNames = "submeshnames";
-const std::string nnSkeletonLink = "skeletonlink";
-const std::string nnLOD = "levelofdetail";
-const std::string nnExtremes = "extremes";
-const std::string nnPoses = "poses";
-const std::string nnAnimations = "animations";
+static const char *nnMesh = "mesh";
+static const char *nnSharedGeometry = "sharedgeometry";
+static const char *nnSubMeshes = "submeshes";
+static const char *nnSubMesh = "submesh";
+static const char *nnSubMeshNames = "submeshnames";
+static const char *nnSkeletonLink = "skeletonlink";
+static const char *nnLOD = "levelofdetail";
+static const char *nnExtremes = "extremes";
+static const char *nnPoses = "poses";
+static const char *nnAnimations = "animations";
// <submesh>
-const std::string nnFaces = "faces";
-const std::string nnFace = "face";
-const std::string nnGeometry = "geometry";
-const std::string nnTextures = "textures";
+static const char *nnFaces = "faces";
+static const char *nnFace = "face";
+static const char *nnGeometry = "geometry";
+static const char *nnTextures = "textures";
// <mesh/submesh>
-const std::string nnBoneAssignments = "boneassignments";
+static const char *nnBoneAssignments = "boneassignments";
// <sharedgeometry/geometry>
-const std::string nnVertexBuffer = "vertexbuffer";
+static const char *nnVertexBuffer = "vertexbuffer";
// <vertexbuffer>
-const std::string nnVertex = "vertex";
-const std::string nnPosition = "position";
-const std::string nnNormal = "normal";
-const std::string nnTangent = "tangent";
-const std::string nnBinormal = "binormal";
-const std::string nnTexCoord = "texcoord";
-const std::string nnColorDiffuse = "colour_diffuse";
-const std::string nnColorSpecular = "colour_specular";
+static const char *nnVertex = "vertex";
+static const char *nnPosition = "position";
+static const char *nnNormal = "normal";
+static const char *nnTangent = "tangent";
+static const char *nnBinormal = "binormal";
+static const char *nnTexCoord = "texcoord";
+static const char *nnColorDiffuse = "colour_diffuse";
+static const char *nnColorSpecular = "colour_specular";
// <boneassignments>
-const std::string nnVertexBoneAssignment = "vertexboneassignment";
+static const char *nnVertexBoneAssignment = "vertexboneassignment";
// Skeleton XML constants
// <skeleton>
-const std::string nnSkeleton = "skeleton";
-const std::string nnBones = "bones";
-const std::string nnBoneHierarchy = "bonehierarchy";
-const std::string nnAnimationLinks = "animationlinks";
+static const char *nnSkeleton = "skeleton";
+static const char *nnBones = "bones";
+static const char *nnBoneHierarchy = "bonehierarchy";
+static const char *nnAnimationLinks = "animationlinks";
// <bones>
-const std::string nnBone = "bone";
-const std::string nnRotation = "rotation";
-const std::string nnAxis = "axis";
-const std::string nnScale = "scale";
+static const char *nnBone = "bone";
+static const char *nnRotation = "rotation";
+static const char *nnAxis = "axis";
+static const char *nnScale = "scale";
// <bonehierarchy>
-const std::string nnBoneParent = "boneparent";
+static const char *nnBoneParent = "boneparent";
// <animations>
-const std::string nnAnimation = "animation";
-const std::string nnTracks = "tracks";
+static const char *nnAnimation = "animation";
+static const char *nnTracks = "tracks";
// <tracks>
-const std::string nnTrack = "track";
-const std::string nnKeyFrames = "keyframes";
-const std::string nnKeyFrame = "keyframe";
-const std::string nnTranslate = "translate";
-const std::string nnRotate = "rotate";
+static const char *nnTrack = "track";
+static const char *nnKeyFrames = "keyframes";
+static const char *nnKeyFrame = "keyframe";
+static const char *nnTranslate = "translate";
+static const char *nnRotate = "rotate";
// Common XML constants
-const std::string anX = "x";
-const std::string anY = "y";
-const std::string anZ = "z";
+static const char *anX = "x";
+static const char *anY = "y";
+static const char *anZ = "z";
// Mesh
-MeshXml *OgreXmlSerializer::ImportMesh(XmlReader *reader)
-{
+MeshXml *OgreXmlSerializer::ImportMesh(XmlReader *reader) {
OgreXmlSerializer serializer(reader);
MeshXml *mesh = new MeshXml();
serializer.ReadMesh(mesh);
+
return mesh;
}
-void OgreXmlSerializer::ReadMesh(MeshXml *mesh)
-{
+void OgreXmlSerializer::ReadMesh(MeshXml *mesh) {
if (NextNode() != nnMesh) {
throw DeadlyImportError("Root node is <" + m_currentNodeName + "> expecting <mesh>");
}
- DefaultLogger::get()->debug("Reading Mesh");
+ ASSIMP_LOG_DEBUG("Reading Mesh");
NextNode();
@@ -351,7 +351,7 @@ void OgreXmlSerializer::ReadMesh(MeshXml *mesh)
else if (m_currentNodeName == nnSkeletonLink)
{
mesh->skeletonRef = ReadAttribute<std::string>("name");
- DefaultLogger::get()->debug("Read skeleton link " + mesh->skeletonRef);
+ ASSIMP_LOG_DEBUG_F("Read skeleton link ", mesh->skeletonRef);
NextNode();
}
// Assimp incompatible/ignored nodes
@@ -363,7 +363,7 @@ void OgreXmlSerializer::ReadMesh(MeshXml *mesh)
void OgreXmlSerializer::ReadGeometry(VertexDataXml *dest)
{
dest->count = ReadAttribute<uint32_t>("vertexcount");
- DefaultLogger::get()->debug(Formatter::format() << " - Reading geometry of " << dest->count << " vertices");
+ ASSIMP_LOG_DEBUG_F( " - Reading geometry of ", dest->count, " vertices");
NextNode();
while(m_currentNodeName == nnVertexBuffer) {
@@ -385,22 +385,22 @@ void OgreXmlSerializer::ReadGeometryVertexBuffer(VertexDataXml *dest)
if (positions)
{
- DefaultLogger::get()->debug(" - Contains positions");
+ ASSIMP_LOG_DEBUG(" - Contains positions");
dest->positions.reserve(dest->count);
}
if (normals)
{
- DefaultLogger::get()->debug(" - Contains normals");
+ ASSIMP_LOG_DEBUG(" - Contains normals");
dest->normals.reserve(dest->count);
}
if (tangents)
{
- DefaultLogger::get()->debug(" - Contains tangents");
+ ASSIMP_LOG_DEBUG(" - Contains tangents");
dest->tangents.reserve(dest->count);
}
if (uvs > 0)
{
- DefaultLogger::get()->debug(Formatter::format() << " - Contains " << uvs << " texture coords");
+ ASSIMP_LOG_DEBUG_F( " - Contains ", uvs, " texture coords");
dest->uvs.resize(uvs);
for(size_t i=0, len=dest->uvs.size(); i<len; ++i) {
dest->uvs[i].reserve(dest->count);
@@ -508,7 +508,7 @@ void OgreXmlSerializer::ReadGeometryVertexBuffer(VertexDataXml *dest)
}
}
if (warn) {
- DefaultLogger::get()->warn("Vertex buffer attribute read not implemented for element: " + m_currentNodeName);
+ ASSIMP_LOG_WARN_F("Vertex buffer attribute read not implemented for element: ", m_currentNodeName);
}
}
@@ -537,13 +537,13 @@ void OgreXmlSerializer::ReadGeometryVertexBuffer(VertexDataXml *dest)
void OgreXmlSerializer::ReadSubMesh(MeshXml *mesh)
{
- static const std::string anMaterial = "material";
- static const std::string anUseSharedVertices = "usesharedvertices";
- static const std::string anCount = "count";
- static const std::string anV1 = "v1";
- static const std::string anV2 = "v2";
- static const std::string anV3 = "v3";
- static const std::string anV4 = "v4";
+ static const char *anMaterial = "material";
+ static const char *anUseSharedVertices = "usesharedvertices";
+ static const char *anCount = "count";
+ static const char *anV1 = "v1";
+ static const char *anV2 = "v2";
+ static const char *anV3 = "v3";
+ static const char *anV4 = "v4";
SubMeshXml* submesh = new SubMeshXml();
@@ -554,9 +554,9 @@ void OgreXmlSerializer::ReadSubMesh(MeshXml *mesh)
submesh->usesSharedVertexData = ReadAttribute<bool>(anUseSharedVertices);
}
- DefaultLogger::get()->debug(Formatter::format() << "Reading SubMesh " << mesh->subMeshes.size());
- DefaultLogger::get()->debug(Formatter::format() << " - Material: '" << submesh->materialRef << "'");
- DefaultLogger::get()->debug(Formatter::format() << " - Uses shared geometry: " << (submesh->usesSharedVertexData ? "true" : "false"));
+ ASSIMP_LOG_DEBUG_F( "Reading SubMesh ", mesh->subMeshes.size());
+ ASSIMP_LOG_DEBUG_F( " - Material: '", submesh->materialRef, "'");
+ ASSIMP_LOG_DEBUG_F( " - Uses shared geometry: ", (submesh->usesSharedVertexData ? "true" : "false"));
// TODO: maybe we have always just 1 faces and 1 geometry and always in this order. this loop will only work correct, when the order
// of faces and geometry changed, and not if we have more than one of one
@@ -587,7 +587,7 @@ void OgreXmlSerializer::ReadSubMesh(MeshXml *mesh)
/// @todo Support quads if Ogre even supports them in XML (I'm not sure but I doubt it)
if (!quadWarned && HasAttribute(anV4)) {
- DefaultLogger::get()->warn("Submesh <face> has quads with <v4>, only triangles are supported at the moment!");
+ ASSIMP_LOG_WARN("Submesh <face> has quads with <v4>, only triangles are supported at the moment!");
quadWarned = true;
}
@@ -597,31 +597,25 @@ void OgreXmlSerializer::ReadSubMesh(MeshXml *mesh)
NextNode();
}
- if (submesh->indexData->faces.size() == submesh->indexData->faceCount)
- {
- DefaultLogger::get()->debug(Formatter::format() << " - Faces " << submesh->indexData->faceCount);
- }
- else
- {
+ if (submesh->indexData->faces.size() == submesh->indexData->faceCount) {
+ ASSIMP_LOG_DEBUG_F( " - Faces ", submesh->indexData->faceCount);
+ } else {
throw DeadlyImportError(Formatter::format() << "Read only " << submesh->indexData->faces.size() << " faces when should have read " << submesh->indexData->faceCount);
}
- }
- else if (m_currentNodeName == nnGeometry)
- {
+ } else if (m_currentNodeName == nnGeometry) {
if (submesh->usesSharedVertexData) {
throw DeadlyImportError("Found <geometry> in <submesh> when use shared geometry is true. Invalid mesh file.");
}
submesh->vertexData = new VertexDataXml();
ReadGeometry(submesh->vertexData);
- }
- else if (m_currentNodeName == nnBoneAssignments)
- {
+ } else if (m_currentNodeName == nnBoneAssignments) {
ReadBoneAssignments(submesh->vertexData);
}
// Assimp incompatible/ignored nodes
- else
+ else {
SkipCurrentNode();
+ }
}
submesh->index = static_cast<unsigned int>(mesh->subMeshes.size());
@@ -634,9 +628,9 @@ void OgreXmlSerializer::ReadBoneAssignments(VertexDataXml *dest)
throw DeadlyImportError("Cannot read bone assignments, vertex data is null.");
}
- static const std::string anVertexIndex = "vertexindex";
- static const std::string anBoneIndex = "boneindex";
- static const std::string anWeight = "weight";
+ static const char *anVertexIndex = "vertexindex";
+ static const char *anBoneIndex = "boneindex";
+ static const char *anWeight = "weight";
std::set<uint32_t> influencedVertices;
@@ -676,7 +670,7 @@ void OgreXmlSerializer::ReadBoneAssignments(VertexDataXml *dest)
}
}
- DefaultLogger::get()->debug(Formatter::format() << " - " << dest->boneAssignments.size() << " bone assignments");
+ ASSIMP_LOG_DEBUG_F( " - ", dest->boneAssignments.size(), " bone assignments");
}
// Skeleton
@@ -731,13 +725,13 @@ XmlReaderPtr OgreXmlSerializer::OpenReader(Assimp::IOSystem *pIOHandler, const s
{
if (!EndsWith(filename, ".skeleton.xml", false))
{
- DefaultLogger::get()->error("Imported Mesh is referencing to unsupported '" + filename + "' skeleton file.");
+ ASSIMP_LOG_ERROR_F("Imported Mesh is referencing to unsupported '", filename, "' skeleton file.");
return XmlReaderPtr();
}
if (!pIOHandler->Exists(filename))
{
- DefaultLogger::get()->error("Failed to find skeleton file '" + filename + "' that is referenced by imported Mesh.");
+ ASSIMP_LOG_ERROR_F("Failed to find skeleton file '", filename, "' that is referenced by imported Mesh.");
return XmlReaderPtr();
}
@@ -760,7 +754,7 @@ void OgreXmlSerializer::ReadSkeleton(Skeleton *skeleton)
throw DeadlyImportError("Root node is <" + m_currentNodeName + "> expecting <skeleton>");
}
- DefaultLogger::get()->debug("Reading Skeleton");
+ ASSIMP_LOG_DEBUG("Reading Skeleton");
// Optional blend mode from root node
if (HasAttribute("blendmode")) {
@@ -793,7 +787,7 @@ void OgreXmlSerializer::ReadAnimations(Skeleton *skeleton)
throw DeadlyImportError("Cannot read <animations> for a Skeleton without bones");
}
- DefaultLogger::get()->debug(" - Animations");
+ ASSIMP_LOG_DEBUG(" - Animations");
NextNode();
while(m_currentNodeName == nnAnimation)
@@ -809,7 +803,7 @@ void OgreXmlSerializer::ReadAnimations(Skeleton *skeleton)
ReadAnimationTracks(anim);
skeleton->animations.push_back(anim);
- DefaultLogger::get()->debug(Formatter::format() << " " << anim->name << " (" << anim->length << " sec, " << anim->tracks.size() << " tracks)");
+ ASSIMP_LOG_DEBUG_F( " ", anim->name, " (", anim->length, " sec, ", anim->tracks.size(), " tracks)");
}
}
@@ -867,7 +861,7 @@ void OgreXmlSerializer::ReadAnimationKeyFrames(Animation *anim, VertexAnimationT
{
axis.x = 1.0f;
if (angle != 0) {
- DefaultLogger::get()->warn("Found invalid a key frame with a zero rotation axis in animation: " + anim->name);
+ ASSIMP_LOG_WARN_F("Found invalid a key frame with a zero rotation axis in animation: ", anim->name);
}
}
keyframe.rotation = aiQuaternion(axis, angle);
@@ -915,14 +909,17 @@ void OgreXmlSerializer::ReadBoneHierarchy(Skeleton *skeleton)
}
}
-bool BoneCompare(Bone *a, Bone *b)
+static bool BoneCompare(Bone *a, Bone *b)
{
+ ai_assert( nullptr != a );
+ ai_assert( nullptr != b );
+
return (a->id < b->id);
}
void OgreXmlSerializer::ReadBones(Skeleton *skeleton)
{
- DefaultLogger::get()->debug(" - Bones");
+ ASSIMP_LOG_DEBUG(" - Bones");
NextNode();
while(m_currentNodeName == nnBone)
@@ -991,7 +988,7 @@ void OgreXmlSerializer::ReadBones(Skeleton *skeleton)
for (size_t i=0, len=skeleton->bones.size(); i<len; ++i)
{
Bone *b = skeleton->bones[i];
- DefaultLogger::get()->debug(Formatter::format() << " " << b->id << " " << b->name);
+ ASSIMP_LOG_DEBUG_F( " ", b->id, " ", b->name);
if (b->id != static_cast<uint16_t>(i)) {
throw DeadlyImportError(Formatter::format() << "Bone ids are not in sequence starting from 0. Missing index " << i);
diff --git a/code/OgreXmlSerializer.h b/code/OgreXmlSerializer.h
index 01b9a7b23..c0f09096c 100644
--- a/code/OgreXmlSerializer.h
+++ b/code/OgreXmlSerializer.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -45,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_NO_OGRE_IMPORTER
#include "OgreStructs.h"
-#include "irrXMLWrapper.h"
+#include <assimp/irrXMLWrapper.h>
namespace Assimp
{
@@ -97,8 +98,8 @@ private:
void ReadAnimationKeyFrames(Animation *anim, VertexAnimationTrack *dest);
template<typename T>
- T ReadAttribute(const std::string &name) const;
- bool HasAttribute(const std::string &name) const;
+ T ReadAttribute(const char *name) const;
+ bool HasAttribute(const char *name) const;
std::string &NextNode();
std::string &SkipCurrentNode();
diff --git a/code/OpenGEXExporter.cpp b/code/OpenGEXExporter.cpp
index ea3c770ec..ea2f64e8f 100644
--- a/code/OpenGEXExporter.cpp
+++ b/code/OpenGEXExporter.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -51,7 +52,7 @@ OpenGEXExporter::OpenGEXExporter() {
OpenGEXExporter::~OpenGEXExporter() {
}
-bool OpenGEXExporter::exportScene( const char *filename, const aiScene* pScene ) {
+bool OpenGEXExporter::exportScene( const char * /*filename*/, const aiScene* /*pScene*/ ) {
return true;
}
diff --git a/code/OpenGEXExporter.h b/code/OpenGEXExporter.h
index 9df9d853e..76d2418a4 100644
--- a/code/OpenGEXExporter.h
+++ b/code/OpenGEXExporter.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/OpenGEXImporter.cpp b/code/OpenGEXImporter.cpp
index 93c0169d2..2de0aabc0 100644
--- a/code/OpenGEXImporter.cpp
+++ b/code/OpenGEXImporter.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -44,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/DefaultIOSystem.h>
#include <assimp/DefaultLogger.hpp>
#include "MakeVerboseFormat.h"
-#include "StringComparison.h"
+#include <assimp/StringComparison.h>
#include <openddlparser/OpenDDLParser.h>
#include <assimp/scene.h>
@@ -220,12 +221,8 @@ static void propId2StdString( Property *prop, std::string &name, std::string &ke
//------------------------------------------------------------------------------------------------
OpenGEXImporter::VertexContainer::VertexContainer()
-: m_numVerts( 0 )
-, m_vertices( nullptr )
-, m_numColors( 0 )
+: m_numColors( 0 )
, m_colors( nullptr )
-, m_numNormals( 0 )
-, m_normals( nullptr )
, m_numUVComps()
, m_textureCoords() {
// empty
@@ -233,9 +230,7 @@ OpenGEXImporter::VertexContainer::VertexContainer()
//------------------------------------------------------------------------------------------------
OpenGEXImporter::VertexContainer::~VertexContainer() {
- delete[] m_vertices;
delete[] m_colors;
- delete[] m_normals;
for(auto &texcoords : m_textureCoords) {
delete [] texcoords;
@@ -261,6 +256,7 @@ OpenGEXImporter::OpenGEXImporter()
, m_nodeChildMap()
, m_meshCache()
, m_mesh2refMap()
+, m_material2refMap()
, m_ctx( nullptr )
, m_metrics()
, m_currentNode( nullptr )
@@ -306,6 +302,7 @@ void OpenGEXImporter::InternReadFile( const std::string &filename, aiScene *pSce
std::vector<char> buffer;
TextFileToBuffer( file, buffer );
+ pIOHandler->Close( file );
OpenDDLParser myParser;
myParser.setBuffer( &buffer[ 0 ], buffer.size() );
@@ -320,6 +317,7 @@ void OpenGEXImporter::InternReadFile( const std::string &filename, aiScene *pSce
copyMeshes( pScene );
copyCameras( pScene );
copyLights( pScene );
+ copyMaterials( pScene );
resolveReferences();
createNodeTree( pScene );
}
@@ -428,7 +426,7 @@ void OpenGEXImporter::handleNodes( DDLNode *node, aiScene *pScene ) {
}
//------------------------------------------------------------------------------------------------
-void OpenGEXImporter::handleMetricNode( DDLNode *node, aiScene *pScene ) {
+void OpenGEXImporter::handleMetricNode( DDLNode *node, aiScene * /*pScene*/ ) {
if( nullptr == node || nullptr == m_ctx ) {
return;
}
@@ -464,7 +462,7 @@ void OpenGEXImporter::handleMetricNode( DDLNode *node, aiScene *pScene ) {
}
//------------------------------------------------------------------------------------------------
-void OpenGEXImporter::handleNameNode( DDLNode *node, aiScene *pScene ) {
+void OpenGEXImporter::handleNameNode( DDLNode *node, aiScene * /*pScene*/ ) {
if( nullptr == m_currentNode ) {
throw DeadlyImportError( "No current node for name." );
return;
@@ -482,7 +480,10 @@ void OpenGEXImporter::handleNameNode( DDLNode *node, aiScene *pScene ) {
|| m_tokenType == Grammar::CameraNodeToken ) {
m_currentNode->mName.Set( name.c_str() );
} else if( m_tokenType == Grammar::MaterialToken ) {
-
+ aiString aiName;
+ aiName.Set( name );
+ m_currentMaterial->AddProperty( &aiName, AI_MATKEY_NAME );
+ m_material2refMap[ name ] = m_materialCache.size() - 1;
}
}
}
@@ -506,7 +507,7 @@ static void getRefNames( DDLNode *node, std::vector<std::string> &names ) {
}
//------------------------------------------------------------------------------------------------
-void OpenGEXImporter::handleObjectRefNode( DDLNode *node, aiScene *pScene ) {
+void OpenGEXImporter::handleObjectRefNode( DDLNode *node, aiScene * /*pScene*/ ) {
if( nullptr == m_currentNode ) {
throw DeadlyImportError( "No parent node for name." );
return;
@@ -520,7 +521,7 @@ void OpenGEXImporter::handleObjectRefNode( DDLNode *node, aiScene *pScene ) {
m_currentNode->mNumMeshes = static_cast<unsigned int>(objRefNames.size());
m_currentNode->mMeshes = new unsigned int[ objRefNames.size() ];
if ( !objRefNames.empty() ) {
- m_unresolvedRefStack.push_back( new RefInfo( m_currentNode, RefInfo::MeshRef, objRefNames ) );
+ m_unresolvedRefStack.push_back( std::unique_ptr<RefInfo>( new RefInfo( m_currentNode, RefInfo::MeshRef, objRefNames ) ) );
}
} else if ( m_tokenType == Grammar::LightNodeToken ) {
// TODO!
@@ -530,7 +531,7 @@ void OpenGEXImporter::handleObjectRefNode( DDLNode *node, aiScene *pScene ) {
}
//------------------------------------------------------------------------------------------------
-void OpenGEXImporter::handleMaterialRefNode( ODDLParser::DDLNode *node, aiScene *pScene ) {
+void OpenGEXImporter::handleMaterialRefNode( ODDLParser::DDLNode *node, aiScene * /*pScene*/ ) {
if( nullptr == m_currentNode ) {
throw DeadlyImportError( "No parent node for name." );
return;
@@ -539,7 +540,7 @@ void OpenGEXImporter::handleMaterialRefNode( ODDLParser::DDLNode *node, aiScene
std::vector<std::string> matRefNames;
getRefNames( node, matRefNames );
if( !matRefNames.empty() ) {
- m_unresolvedRefStack.push_back( new RefInfo( m_currentNode, RefInfo::MaterialRef, matRefNames ) );
+ m_unresolvedRefStack.push_back( std::unique_ptr<RefInfo>( new RefInfo( m_currentNode, RefInfo::MaterialRef, matRefNames ) ) );
}
}
@@ -646,6 +647,8 @@ static void setMatrix( aiNode *node, DataArrayList *transformData ) {
i++;
}
+ ai_assert(i == 16);
+
node->mTransformation.a1 = m[ 0 ];
node->mTransformation.a2 = m[ 4 ];
node->mTransformation.a3 = m[ 8 ];
@@ -668,7 +671,7 @@ static void setMatrix( aiNode *node, DataArrayList *transformData ) {
}
//------------------------------------------------------------------------------------------------
-void OpenGEXImporter::handleTransformNode( ODDLParser::DDLNode *node, aiScene *pScene ) {
+void OpenGEXImporter::handleTransformNode( ODDLParser::DDLNode *node, aiScene * /*pScene*/ ) {
if( nullptr == m_currentNode ) {
throw DeadlyImportError( "No parent node for name." );
return;
@@ -688,7 +691,8 @@ void OpenGEXImporter::handleTransformNode( ODDLParser::DDLNode *node, aiScene *p
void OpenGEXImporter::handleMeshNode( ODDLParser::DDLNode *node, aiScene *pScene ) {
m_currentMesh = new aiMesh;
const size_t meshidx( m_meshCache.size() );
- m_meshCache.push_back( m_currentMesh );
+ // ownership is transferred but a reference remains in m_currentMesh
+ m_meshCache.emplace_back( m_currentMesh );
Property *prop = node->getProperties();
if( nullptr != prop ) {
@@ -704,7 +708,7 @@ void OpenGEXImporter::handleMeshNode( ODDLParser::DDLNode *node, aiScene *pScene
} else if ( "quads" == propKey ) {
m_currentMesh->mPrimitiveTypes |= aiPrimitiveType_POLYGON;
} else {
- DefaultLogger::get()->warn( propKey + " is not supported primitive type." );
+ ASSIMP_LOG_WARN_F( propKey, " is not supported primitive type." );
}
}
}
@@ -727,17 +731,22 @@ enum MeshAttribute {
TexCoord
};
+static const std::string PosToken = "position";
+static const std::string ColToken = "color";
+static const std::string NormalToken = "normal";
+static const std::string TexCoordToken = "texcoord";
+
//------------------------------------------------------------------------------------------------
static MeshAttribute getAttributeByName( const char *attribName ) {
ai_assert( nullptr != attribName );
- if ( 0 == strncmp( "position", attribName, strlen( "position" ) ) ) {
+ if ( 0 == strncmp( PosToken.c_str(), attribName, PosToken.size() ) ) {
return Position;
- } else if ( 0 == strncmp( "color", attribName, strlen( "color" ) ) ) {
+ } else if ( 0 == strncmp( ColToken.c_str(), attribName, ColToken.size() ) ) {
return Color;
- } else if( 0 == strncmp( "normal", attribName, strlen( "normal" ) ) ) {
+ } else if( 0 == strncmp( NormalToken.c_str(), attribName, NormalToken.size() ) ) {
return Normal;
- } else if( 0 == strncmp( "texcoord", attribName, strlen( "texcoord" ) ) ) {
+ } else if( 0 == strncmp( TexCoordToken.c_str(), attribName, TexCoordToken.size() ) ) {
return TexCoord;
}
@@ -770,10 +779,22 @@ static void fillColor4( aiColor4D *col4, Value *vals ) {
Value *next( vals );
col4->r = next->getFloat();
next = next->m_next;
+ if (!next) {
+ throw DeadlyImportError( "OpenGEX: Not enough values to fill 4-element color, only 1" );
+ }
+
col4->g = next->getFloat();
next = next->m_next;
+ if (!next) {
+ throw DeadlyImportError( "OpenGEX: Not enough values to fill 4-element color, only 2" );
+ }
+
col4->b = next->getFloat();
next = next->m_next;
+ if (!next) {
+ throw DeadlyImportError( "OpenGEX: Not enough values to fill 4-element color, only 3" );
+ }
+
col4->a = next->getFloat();
}
@@ -813,7 +834,7 @@ static void copyColor4DArray( size_t numItems, DataArrayList *vaList, aiColor4D
}
//------------------------------------------------------------------------------------------------
-void OpenGEXImporter::handleVertexArrayNode( ODDLParser::DDLNode *node, aiScene *pScene ) {
+void OpenGEXImporter::handleVertexArrayNode( ODDLParser::DDLNode *node, aiScene * /*pScene*/ ) {
if( nullptr == node ) {
throw DeadlyImportError( "No parent node for name." );
return;
@@ -836,17 +857,15 @@ void OpenGEXImporter::handleVertexArrayNode( ODDLParser::DDLNode *node, aiScene
const size_t numItems( countDataArrayListItems( vaList ) );
if( Position == attribType ) {
- m_currentVertices.m_numVerts = numItems;
- m_currentVertices.m_vertices = new aiVector3D[ numItems ];
- copyVectorArray( numItems, vaList, m_currentVertices.m_vertices );
+ m_currentVertices.m_vertices.resize( numItems );
+ copyVectorArray( numItems, vaList, m_currentVertices.m_vertices.data() );
} else if ( Color == attribType ) {
m_currentVertices.m_numColors = numItems;
m_currentVertices.m_colors = new aiColor4D[ numItems ];
copyColor4DArray( numItems, vaList, m_currentVertices.m_colors );
} else if( Normal == attribType ) {
- m_currentVertices.m_numNormals = numItems;
- m_currentVertices.m_normals = new aiVector3D[ numItems ];
- copyVectorArray( numItems, vaList, m_currentVertices.m_normals );
+ m_currentVertices.m_normals.resize( numItems );
+ copyVectorArray( numItems, vaList, m_currentVertices.m_normals.data() );
} else if( TexCoord == attribType ) {
m_currentVertices.m_numUVComps[ 0 ] = numItems;
m_currentVertices.m_textureCoords[ 0 ] = new aiVector3D[ numItems ];
@@ -856,7 +875,7 @@ void OpenGEXImporter::handleVertexArrayNode( ODDLParser::DDLNode *node, aiScene
}
//------------------------------------------------------------------------------------------------
-void OpenGEXImporter::handleIndexArrayNode( ODDLParser::DDLNode *node, aiScene *pScene ) {
+void OpenGEXImporter::handleIndexArrayNode( ODDLParser::DDLNode *node, aiScene * /*pScene*/ ) {
if( nullptr == node ) {
throw DeadlyImportError( "No parent node for name." );
return;
@@ -883,7 +902,7 @@ void OpenGEXImporter::handleIndexArrayNode( ODDLParser::DDLNode *node, aiScene *
hasColors = true;
}
bool hasNormalCoords( false );
- if ( m_currentVertices.m_numNormals > 0 ) {
+ if ( !m_currentVertices.m_normals.empty() ) {
m_currentMesh->mNormals = new aiVector3D[ m_currentMesh->mNumVertices ];
hasNormalCoords = true;
}
@@ -901,7 +920,7 @@ void OpenGEXImporter::handleIndexArrayNode( ODDLParser::DDLNode *node, aiScene *
Value *next( vaList->m_dataList );
for( size_t indices = 0; indices < current.mNumIndices; indices++ ) {
const int idx( next->getUnsignedInt32() );
- ai_assert( static_cast<size_t>( idx ) <= m_currentVertices.m_numVerts );
+ ai_assert( static_cast<size_t>( idx ) <= m_currentVertices.m_vertices.size() );
ai_assert( index < m_currentMesh->mNumVertices );
aiVector3D &pos = ( m_currentVertices.m_vertices[ idx ] );
m_currentMesh->mVertices[ index ].Set( pos.x, pos.y, pos.z );
@@ -995,7 +1014,7 @@ void OpenGEXImporter::handleMaterialNode( ODDLParser::DDLNode *node, aiScene *pS
}
//------------------------------------------------------------------------------------------------
-void OpenGEXImporter::handleColorNode( ODDLParser::DDLNode *node, aiScene *pScene ) {
+void OpenGEXImporter::handleColorNode( ODDLParser::DDLNode *node, aiScene * /*pScene*/ ) {
if( nullptr == node ) {
return;
}
@@ -1034,7 +1053,7 @@ void OpenGEXImporter::handleColorNode( ODDLParser::DDLNode *node, aiScene *pScen
}
//------------------------------------------------------------------------------------------------
-void OpenGEXImporter::handleTextureNode( ODDLParser::DDLNode *node, aiScene *pScene ) {
+void OpenGEXImporter::handleTextureNode( ODDLParser::DDLNode *node, aiScene * /*pScene*/ ) {
if( nullptr == node ) {
return;
}
@@ -1050,7 +1069,6 @@ void OpenGEXImporter::handleTextureNode( ODDLParser::DDLNode *node, aiScene *pSc
m_currentMaterial->AddProperty( &tex, AI_MATKEY_TEXTURE_DIFFUSE( 0 ) );
} else if( prop->m_value->getString() == Grammar::SpecularPowerTextureToken ) {
m_currentMaterial->AddProperty( &tex, AI_MATKEY_TEXTURE_SPECULAR( 0 ) );
-
} else if( prop->m_value->getString() == Grammar::EmissionTextureToken ) {
m_currentMaterial->AddProperty( &tex, AI_MATKEY_TEXTURE_EMISSIVE( 0 ) );
} else if( prop->m_value->getString() == Grammar::OpacyTextureToken ) {
@@ -1069,7 +1087,7 @@ void OpenGEXImporter::handleTextureNode( ODDLParser::DDLNode *node, aiScene *pSc
}
//------------------------------------------------------------------------------------------------
-void OpenGEXImporter::handleParamNode( ODDLParser::DDLNode *node, aiScene *pScene ) {
+void OpenGEXImporter::handleParamNode( ODDLParser::DDLNode *node, aiScene * /*pScene*/ ) {
if ( nullptr == node ) {
return;
}
@@ -1085,20 +1103,18 @@ void OpenGEXImporter::handleParamNode( ODDLParser::DDLNode *node, aiScene *pScen
return;
}
const float floatVal( val->getFloat() );
- if ( prop->m_value != nullptr ) {
- if ( 0 == ASSIMP_strincmp( "fov", prop->m_value->getString(), 3 ) ) {
- m_currentCamera->mHorizontalFOV = floatVal;
- } else if ( 0 == ASSIMP_strincmp( "near", prop->m_value->getString(), 3 ) ) {
- m_currentCamera->mClipPlaneNear = floatVal;
- } else if ( 0 == ASSIMP_strincmp( "far", prop->m_value->getString(), 3 ) ) {
- m_currentCamera->mClipPlaneFar = floatVal;
- }
+ if ( 0 == ASSIMP_strincmp( "fov", prop->m_value->getString(), 3 ) ) {
+ m_currentCamera->mHorizontalFOV = floatVal;
+ } else if ( 0 == ASSIMP_strincmp( "near", prop->m_value->getString(), 4 ) ) {
+ m_currentCamera->mClipPlaneNear = floatVal;
+ } else if ( 0 == ASSIMP_strincmp( "far", prop->m_value->getString(), 3 ) ) {
+ m_currentCamera->mClipPlaneFar = floatVal;
}
}
}
//------------------------------------------------------------------------------------------------
-void OpenGEXImporter::handleAttenNode( ODDLParser::DDLNode *node, aiScene *pScene ) {
+void OpenGEXImporter::handleAttenNode( ODDLParser::DDLNode *node, aiScene * /*pScene*/ ) {
if ( nullptr == node ) {
return;
}
@@ -1125,7 +1141,9 @@ void OpenGEXImporter::copyMeshes( aiScene *pScene ) {
pScene->mNumMeshes = static_cast<unsigned int>(m_meshCache.size());
pScene->mMeshes = new aiMesh*[ pScene->mNumMeshes ];
- std::copy( m_meshCache.begin(), m_meshCache.end(), pScene->mMeshes );
+ for (unsigned int i = 0; i < pScene->mNumMeshes; i++) {
+ pScene->mMeshes[i] = m_meshCache[i].release();
+ }
}
//------------------------------------------------------------------------------------------------
@@ -1155,18 +1173,31 @@ void OpenGEXImporter::copyLights( aiScene *pScene ) {
}
//------------------------------------------------------------------------------------------------
+void OpenGEXImporter::copyMaterials( aiScene *pScene ) {
+ ai_assert( nullptr != pScene );
+
+ if ( m_materialCache.empty() ) {
+ return;
+ }
+
+ pScene->mNumMaterials = static_cast<unsigned int>(m_materialCache.size());
+ pScene->mMaterials = new aiMaterial*[ pScene->mNumMaterials ];
+ std::copy( m_materialCache.begin(), m_materialCache.end(), pScene->mMaterials );
+}
+
+//------------------------------------------------------------------------------------------------
void OpenGEXImporter::resolveReferences() {
if( m_unresolvedRefStack.empty() ) {
return;
}
RefInfo *currentRefInfo( nullptr );
- for( std::vector<RefInfo*>::iterator it = m_unresolvedRefStack.begin(); it != m_unresolvedRefStack.end(); ++it ) {
- currentRefInfo = *it;
+ for( auto it = m_unresolvedRefStack.begin(); it != m_unresolvedRefStack.end(); ++it ) {
+ currentRefInfo = it->get();
if( nullptr != currentRefInfo ) {
aiNode *node( currentRefInfo->m_node );
if( RefInfo::MeshRef == currentRefInfo->m_type ) {
- for( size_t i = 0; i < currentRefInfo->m_Names.size(); i++ ) {
+ for( size_t i = 0; i < currentRefInfo->m_Names.size(); ++i ) {
const std::string &name( currentRefInfo->m_Names[ i ] );
ReferenceMap::const_iterator it( m_mesh2refMap.find( name ) );
if( m_mesh2refMap.end() != it ) {
@@ -1175,7 +1206,21 @@ void OpenGEXImporter::resolveReferences() {
}
}
} else if( RefInfo::MaterialRef == currentRefInfo->m_type ) {
- // ToDo!
+ for ( size_t i = 0; i < currentRefInfo->m_Names.size(); ++i ) {
+ const std::string name( currentRefInfo->m_Names[ i ] );
+ ReferenceMap::const_iterator it( m_material2refMap.find( name ) );
+ if ( m_material2refMap.end() != it ) {
+ if ( nullptr != m_currentMesh ) {
+ unsigned int matIdx = static_cast< unsigned int >( m_material2refMap[ name ] );
+ if ( m_currentMesh->mMaterialIndex != 0 ) {
+ ASSIMP_LOG_WARN( "Override of material reference in current mesh by material reference." );
+ }
+ m_currentMesh->mMaterialIndex = matIdx;
+ } else {
+ ASSIMP_LOG_WARN( "Cannot resolve material reference, because no current mesh is there." );
+ }
+ }
+ }
} else {
throw DeadlyImportError( "Unknown reference info to resolve." );
}
@@ -1213,9 +1258,9 @@ void OpenGEXImporter::pushNode( aiNode *node, aiScene *pScene ) {
if( m_nodeChildMap.end() == it ) {
info = new ChildInfo;
m_root = info;
- m_nodeChildMap[ node->mParent ] = info;
+ m_nodeChildMap[ node->mParent ] = std::unique_ptr<ChildInfo>(info);
} else {
- info = it->second;
+ info = it->second.get();
}
info->m_children.push_back( node );
} else {
@@ -1225,9 +1270,9 @@ void OpenGEXImporter::pushNode( aiNode *node, aiScene *pScene ) {
NodeChildMap::iterator it( m_nodeChildMap.find( node->mParent ) );
if( m_nodeChildMap.end() == it ) {
info = new ChildInfo;
- m_nodeChildMap[ node->mParent ] = info;
+ m_nodeChildMap[ node->mParent ] = std::unique_ptr<ChildInfo>(info);
} else {
- info = it->second;
+ info = it->second.get();
}
info->m_children.push_back( node );
}
diff --git a/code/OpenGEXImporter.h b/code/OpenGEXImporter.h
index e3a0735f6..8e86a4aa8 100644
--- a/code/OpenGEXImporter.h
+++ b/code/OpenGEXImporter.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -43,12 +44,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_NO_OPENGEX_IMPORTER
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
#include <assimp/mesh.h>
#include <vector>
#include <list>
#include <map>
+#include <memory>
namespace ODDLParser {
class DDLNode;
@@ -132,6 +134,7 @@ protected:
void copyMeshes( aiScene *pScene );
void copyCameras( aiScene *pScene );
void copyLights( aiScene *pScene );
+ void copyMaterials( aiScene *pScene );
void resolveReferences();
void pushNode( aiNode *node, aiScene *pScene );
aiNode *popNode();
@@ -141,12 +144,10 @@ protected:
private:
struct VertexContainer {
- size_t m_numVerts;
- aiVector3D *m_vertices;
+ std::vector<aiVector3D> m_vertices;
size_t m_numColors;
aiColor4D *m_colors;
- size_t m_numNormals;
- aiVector3D *m_normals;
+ std::vector<aiVector3D> m_normals;
size_t m_numUVComps[ AI_MAX_NUMBER_OF_TEXTURECOORDS ];
aiVector3D *m_textureCoords[ AI_MAX_NUMBER_OF_TEXTURECOORDS ];
@@ -179,18 +180,19 @@ private:
std::list<aiNode*> m_children;
};
ChildInfo *m_root;
- typedef std::map<aiNode*, ChildInfo*> NodeChildMap;
+ typedef std::map<aiNode*, std::unique_ptr<ChildInfo> > NodeChildMap;
NodeChildMap m_nodeChildMap;
- std::vector<aiMesh*> m_meshCache;
+ std::vector<std::unique_ptr<aiMesh> > m_meshCache;
typedef std::map<std::string, size_t> ReferenceMap;
std::map<std::string, size_t> m_mesh2refMap;
+ std::map<std::string, size_t> m_material2refMap;
ODDLParser::Context *m_ctx;
MetricInfo m_metrics[ MetricInfo::Max ];
aiNode *m_currentNode;
VertexContainer m_currentVertices;
- aiMesh *m_currentMesh;
+ aiMesh *m_currentMesh; // not owned, target is owned by m_meshCache
aiMaterial *m_currentMaterial;
aiLight *m_currentLight;
aiCamera *m_currentCamera;
@@ -199,7 +201,7 @@ private:
std::vector<aiCamera*> m_cameraCache;
std::vector<aiLight*> m_lightCache;
std::vector<aiNode*> m_nodeStack;
- std::vector<RefInfo*> m_unresolvedRefStack;
+ std::vector<std::unique_ptr<RefInfo> > m_unresolvedRefStack;
};
} // Namespace OpenGEX
diff --git a/code/OpenGEXStructs.h b/code/OpenGEXStructs.h
index 6144a10c5..6cd7488e9 100644
--- a/code/OpenGEXStructs.h
+++ b/code/OpenGEXStructs.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/OptimizeGraph.cpp b/code/OptimizeGraph.cpp
index 04971af5e..59a764d5c 100644
--- a/code/OptimizeGraph.cpp
+++ b/code/OptimizeGraph.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -50,7 +51,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "OptimizeGraph.h"
#include "ProcessHelper.h"
#include <assimp/SceneCombiner.h>
-#include "Exceptional.h"
+#include <assimp/Exceptional.h>
#include <stdio.h>
using namespace Assimp;
@@ -72,28 +73,28 @@ using namespace Assimp;
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
OptimizeGraphProcess::OptimizeGraphProcess()
- : mScene()
- , nodes_in()
- , nodes_out()
- , count_merged()
-{}
+: mScene()
+, nodes_in()
+, nodes_out()
+, count_merged() {
+ // empty
+}
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
-OptimizeGraphProcess::~OptimizeGraphProcess()
-{}
+OptimizeGraphProcess::~OptimizeGraphProcess() {
+ // empty
+}
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag field.
-bool OptimizeGraphProcess::IsActive( unsigned int pFlags) const
-{
+bool OptimizeGraphProcess::IsActive( unsigned int pFlags) const {
return (0 != (pFlags & aiProcess_OptimizeGraph));
}
// ------------------------------------------------------------------------------------------------
-// Setup properties for the postprocessing step
-void OptimizeGraphProcess::SetupProperties(const Importer* pImp)
-{
+// Setup properties for the post-processing step
+void OptimizeGraphProcess::SetupProperties(const Importer* pImp) {
// Get value of AI_CONFIG_PP_OG_EXCLUDE_LIST
std::string tmp = pImp->GetPropertyString(AI_CONFIG_PP_OG_EXCLUDE_LIST,"");
AddLockedNodeList(tmp);
@@ -101,16 +102,14 @@ void OptimizeGraphProcess::SetupProperties(const Importer* pImp)
// ------------------------------------------------------------------------------------------------
// Collect new children
-void OptimizeGraphProcess::CollectNewChildren(aiNode* nd, std::list<aiNode*>& nodes)
-{
+void OptimizeGraphProcess::CollectNewChildren(aiNode* nd, std::list<aiNode*>& nodes) {
nodes_in += nd->mNumChildren;
// Process children
std::list<aiNode*> child_nodes;
for (unsigned int i = 0; i < nd->mNumChildren; ++i) {
-
CollectNewChildren(nd->mChildren[i],child_nodes);
- nd->mChildren[i] = NULL;
+ nd->mChildren[i] = nullptr;
}
// Check whether we need this node; if not we can replace it by our own children (warn, danger of incest).
@@ -129,13 +128,11 @@ void OptimizeGraphProcess::CollectNewChildren(aiNode* nd, std::list<aiNode*>& no
if (nd->mNumMeshes || !child_nodes.empty()) {
nodes.push_back(nd);
- }
- else {
+ } else {
delete nd; /* bye, node */
return;
}
- }
- else {
+ } else {
// Retain our current position in the hierarchy
nodes.push_back(nd);
@@ -159,14 +156,11 @@ void OptimizeGraphProcess::CollectNewChildren(aiNode* nd, std::list<aiNode*>& no
}
}
if (n == child->mNumMeshes) {
-
if (!join_master) {
join_master = child;
inv = join_master->mTransformation;
inv.Inverse();
- }
- else {
-
+ } else {
child->mTransformation = inv * child->mTransformation ;
join.push_back(child);
@@ -226,27 +220,29 @@ void OptimizeGraphProcess::CollectNewChildren(aiNode* nd, std::list<aiNode*>& no
delete[] nd->mChildren;
- if (!child_nodes.empty())
+ if (!child_nodes.empty()) {
nd->mChildren = new aiNode*[child_nodes.size()];
- else nd->mChildren = NULL;
+ }
+ else nd->mChildren = nullptr;
}
nd->mNumChildren = static_cast<unsigned int>(child_nodes.size());
- aiNode** tmp = nd->mChildren;
- for (std::list<aiNode*>::iterator it = child_nodes.begin(); it != child_nodes.end(); ++it) {
- aiNode* node = *tmp++ = *it;
- node->mParent = nd;
+ if (nd->mChildren) {
+ aiNode** tmp = nd->mChildren;
+ for (std::list<aiNode*>::iterator it = child_nodes.begin(); it != child_nodes.end(); ++it) {
+ aiNode* node = *tmp++ = *it;
+ node->mParent = nd;
+ }
}
nodes_out += static_cast<unsigned int>(child_nodes.size());
}
// ------------------------------------------------------------------------------------------------
-// Execute the postprocessing step on the given scene
-void OptimizeGraphProcess::Execute( aiScene* pScene)
-{
- DefaultLogger::get()->debug("OptimizeGraphProcess begin");
+// Execute the post-processing step on the given scene
+void OptimizeGraphProcess::Execute( aiScene* pScene) {
+ ASSIMP_LOG_DEBUG("OptimizeGraphProcess begin");
nodes_in = nodes_out = count_merged = 0;
mScene = pScene;
@@ -265,7 +261,6 @@ void OptimizeGraphProcess::Execute( aiScene* pScene)
for (unsigned int i = 0; i < pScene->mNumAnimations; ++i) {
for (unsigned int a = 0; a < pScene->mAnimations[i]->mNumChannels; ++a) {
-
aiNodeAnim* anim = pScene->mAnimations[i]->mChannels[a];
locked.insert(AI_OG_GETKEY(anim->mNodeName));
}
@@ -334,19 +329,17 @@ void OptimizeGraphProcess::Execute( aiScene* pScene)
pScene->mRootNode->mParent = NULL;
if (!DefaultLogger::isNullLogger()) {
if ( nodes_in != nodes_out) {
-
- char buf[512];
- ::ai_snprintf(buf,512,"OptimizeGraphProcess finished; Input nodes: %u, Output nodes: %u",nodes_in,nodes_out);
- DefaultLogger::get()->info(buf);
+ ASSIMP_LOG_INFO_F("OptimizeGraphProcess finished; Input nodes: ", nodes_in, ", Output nodes: ", nodes_out);
+ } else {
+ ASSIMP_LOG_DEBUG("OptimizeGraphProcess finished");
}
- else DefaultLogger::get()->debug("OptimizeGraphProcess finished");
}
meshes.clear();
locked.clear();
}
// ------------------------------------------------------------------------------------------------
-// Buidl a LUT of all instanced meshes
+// Build a LUT of all instanced meshes
void OptimizeGraphProcess::FindInstancedMeshes (aiNode* pNode)
{
for (unsigned int i = 0; i < pNode->mNumMeshes;++i) {
diff --git a/code/OptimizeGraph.h b/code/OptimizeGraph.h
index 22d53afff..6781ec534 100644
--- a/code/OptimizeGraph.h
+++ b/code/OptimizeGraph.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -101,7 +102,7 @@ public:
}
// -------------------------------------------------------------------
- /** @brief Rmeove a node from the list of locked nodes.
+ /** @brief Remove a node from the list of locked nodes.
* @param name Name to be unlocked
*/
inline void RemoveLockedNode(std::string& name)
diff --git a/code/OptimizeMeshes.cpp b/code/OptimizeMeshes.cpp
index 65a3cadce..25575b049 100644
--- a/code/OptimizeMeshes.cpp
+++ b/code/OptimizeMeshes.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -51,7 +52,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "OptimizeMeshes.h"
#include "ProcessHelper.h"
#include <assimp/SceneCombiner.h>
-#include "Exceptional.h"
+#include <assimp/Exceptional.h>
using namespace Assimp;
@@ -106,11 +107,11 @@ void OptimizeMeshesProcess::Execute( aiScene* pScene)
{
const unsigned int num_old = pScene->mNumMeshes;
if (num_old <= 1) {
- DefaultLogger::get()->debug("Skipping OptimizeMeshesProcess");
+ ASSIMP_LOG_DEBUG("Skipping OptimizeMeshesProcess");
return;
}
- DefaultLogger::get()->debug("OptimizeMeshesProcess begin");
+ ASSIMP_LOG_DEBUG("OptimizeMeshesProcess begin");
mScene = pScene;
// need to clear persistent members from previous runs
@@ -150,11 +151,9 @@ void OptimizeMeshesProcess::Execute( aiScene* pScene)
std::copy(output.begin(),output.end(),mScene->mMeshes);
if (output.size() != num_old) {
- char tmp[512];
- ::ai_snprintf(tmp,512,"OptimizeMeshesProcess finished. Input meshes: %u, Output meshes: %u",num_old,pScene->mNumMeshes);
- DefaultLogger::get()->info(tmp);
+ ASSIMP_LOG_DEBUG_F("OptimizeMeshesProcess finished. Input meshes: ", num_old, ", Output meshes: ", pScene->mNumMeshes);
} else {
- DefaultLogger::get()->debug( "OptimizeMeshesProcess finished" );
+ ASSIMP_LOG_DEBUG( "OptimizeMeshesProcess finished" );
}
}
@@ -181,11 +180,8 @@ void OptimizeMeshesProcess::ProcessNode( aiNode* pNode)
verts += mScene->mMeshes[am]->mNumVertices;
faces += mScene->mMeshes[am]->mNumFaces;
+ pNode->mMeshes[a] = pNode->mMeshes[pNode->mNumMeshes - 1];
--pNode->mNumMeshes;
- for( unsigned int n = a; n < pNode->mNumMeshes; ++n ) {
- pNode->mMeshes[ n ] = pNode->mMeshes[ n + 1 ];
- }
-
--a;
}
}
diff --git a/code/OptimizeMeshes.h b/code/OptimizeMeshes.h
index bcefe9247..3ebe60cd8 100644
--- a/code/OptimizeMeshes.h
+++ b/code/OptimizeMeshes.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -66,20 +67,22 @@ namespace Assimp {
class OptimizeMeshesProcess : public BaseProcess
{
public:
-
+ /// @brief The class constructor.
OptimizeMeshesProcess();
+
+ /// @brief The class destcructor,
~OptimizeMeshesProcess();
/** @brief Internal utility to store additional mesh info
*/
- struct MeshInfo
- {
- MeshInfo()
- : instance_cnt (0)
- , vertex_format (0)
- , output_id (0xffffffff)
- {}
+ struct MeshInfo {
+ MeshInfo() AI_NO_EXCEPT
+ : instance_cnt(0)
+ , vertex_format(0)
+ , output_id(0xffffffff) {
+ // empty
+ }
//! Number of times this mesh is referenced
unsigned int instance_cnt;
diff --git a/code/PlyExporter.cpp b/code/PlyExporter.cpp
index 2844cbd39..31c64a4d1 100644
--- a/code/PlyExporter.cpp
+++ b/code/PlyExporter.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -46,12 +47,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "PlyExporter.h"
#include <memory>
#include <cmath>
-#include "Exceptional.h"
+#include <assimp/Exceptional.h>
#include <assimp/scene.h>
#include <assimp/version.h>
#include <assimp/IOSystem.hpp>
#include <assimp/Exporter.hpp>
-#include "qnan.h"
+#include <assimp/qnan.h>
//using namespace Assimp;
@@ -65,11 +66,15 @@ template<> const char* type_of(double&) { return "double"; }
// ------------------------------------------------------------------------------------------------
// Worker function for exporting a scene to PLY. Prototyped and registered in Exporter.cpp
-void ExportScenePly(const char* pFile,IOSystem* pIOSystem, const aiScene* pScene, const ExportProperties* pProperties)
+void ExportScenePly(const char* pFile,IOSystem* pIOSystem, const aiScene* pScene, const ExportProperties* /*pProperties*/)
{
// invoke the exporter
PlyExporter exporter(pFile, pScene);
+ if (exporter.mOutput.fail()) {
+ throw DeadlyExportError("output data creation failed. Most likely the file became too large: " + std::string(pFile));
+ }
+
// we're still here - export successfully completed. Write the file.
std::unique_ptr<IOStream> outfile (pIOSystem->Open(pFile,"wt"));
if(outfile == NULL) {
@@ -79,7 +84,7 @@ void ExportScenePly(const char* pFile,IOSystem* pIOSystem, const aiScene* pScene
outfile->Write( exporter.mOutput.str().c_str(), static_cast<size_t>(exporter.mOutput.tellp()),1);
}
-void ExportScenePlyBinary(const char* pFile, IOSystem* pIOSystem, const aiScene* pScene, const ExportProperties* pProperties)
+void ExportScenePlyBinary(const char* pFile, IOSystem* pIOSystem, const aiScene* pScene, const ExportProperties* /*pProperties*/)
{
// invoke the exporter
PlyExporter exporter(pFile, pScene, true);
@@ -143,6 +148,17 @@ PlyExporter::PlyExporter(const char* _filename, const aiScene* pScene, bool bina
<< aiGetVersionMajor() << '.' << aiGetVersionMinor() << '.'
<< aiGetVersionRevision() << ")" << endl;
+ // Look through materials for a diffuse texture, and add it if found
+ for ( unsigned int i = 0; i < pScene->mNumMaterials; ++i )
+ {
+ const aiMaterial* const mat = pScene->mMaterials[i];
+ aiString s;
+ if ( AI_SUCCESS == mat->Get( AI_MATKEY_TEXTURE_DIFFUSE( 0 ), s ) )
+ {
+ mOutput << "comment TextureFile " << s.data << endl;
+ }
+ }
+
// TODO: probably want to check here rather than just assume something
// definitely not good to always write float even if we might have double precision
@@ -178,16 +194,16 @@ PlyExporter::PlyExporter(const char* _filename, const aiScene* pScene, bool bina
for (unsigned int n = PLY_EXPORT_HAS_COLORS, c = 0; (components & n) && c != AI_MAX_NUMBER_OF_COLOR_SETS; n <<= 1, ++c) {
if (!c) {
- mOutput << "property " << typeName << " r" << endl;
- mOutput << "property " << typeName << " g" << endl;
- mOutput << "property " << typeName << " b" << endl;
- mOutput << "property " << typeName << " a" << endl;
+ mOutput << "property " << "uchar" << " red" << endl;
+ mOutput << "property " << "uchar" << " green" << endl;
+ mOutput << "property " << "uchar" << " blue" << endl;
+ mOutput << "property " << "uchar" << " alpha" << endl;
}
else {
- mOutput << "property " << typeName << " r" << c << endl;
- mOutput << "property " << typeName << " g" << c << endl;
- mOutput << "property " << typeName << " b" << c << endl;
- mOutput << "property " << typeName << " a" << c << endl;
+ mOutput << "property " << "uchar" << " red" << c << endl;
+ mOutput << "property " << "uchar" << " green" << c << endl;
+ mOutput << "property " << "uchar" << " blue" << c << endl;
+ mOutput << "property " << "uchar" << " alpha" << c << endl;
}
}
@@ -272,13 +288,13 @@ void PlyExporter::WriteMeshVerts(const aiMesh* m, unsigned int components)
for (unsigned int n = PLY_EXPORT_HAS_COLORS, c = 0; (components & n) && c != AI_MAX_NUMBER_OF_COLOR_SETS; n <<= 1, ++c) {
if (m->HasVertexColors(c)) {
mOutput <<
- " " << m->mColors[c][i].r <<
- " " << m->mColors[c][i].g <<
- " " << m->mColors[c][i].b <<
- " " << m->mColors[c][i].a;
+ " " << (int)(m->mColors[c][i].r * 255) <<
+ " " << (int)(m->mColors[c][i].g * 255) <<
+ " " << (int)(m->mColors[c][i].b * 255) <<
+ " " << (int)(m->mColors[c][i].a * 255);
}
else {
- mOutput << " -1.0 -1.0 -1.0 -1.0";
+ mOutput << " 0 0 0";
}
}
diff --git a/code/PlyExporter.h b/code/PlyExporter.h
index d1d4eafbb..060aa7ceb 100644
--- a/code/PlyExporter.h
+++ b/code/PlyExporter.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/PlyLoader.cpp b/code/PlyLoader.cpp
index b62b373d5..7e55e6c3e 100644
--- a/code/PlyLoader.cpp
+++ b/code/PlyLoader.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -47,728 +48,636 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// internal headers
#include "PlyLoader.h"
-#include "IOStreamBuffer.h"
-#include "Macros.h"
+#include <assimp/IOStreamBuffer.h>
+#include <assimp/Macros.h>
#include <memory>
#include <assimp/IOSystem.hpp>
#include <assimp/scene.h>
#include <assimp/importerdesc.h>
-using namespace Assimp;
+using namespace ::Assimp;
static const aiImporterDesc desc = {
- "Stanford Polygon Library (PLY) Importer",
- "",
- "",
- "",
- aiImporterFlags_SupportBinaryFlavour | aiImporterFlags_SupportTextFlavour,
- 0,
- 0,
- 0,
- 0,
- "ply"
+ "Stanford Polygon Library (PLY) Importer",
+ "",
+ "",
+ "",
+ aiImporterFlags_SupportBinaryFlavour | aiImporterFlags_SupportTextFlavour,
+ 0,
+ 0,
+ 0,
+ 0,
+ "ply"
};
// ------------------------------------------------------------------------------------------------
// Internal stuff
-namespace
-{
- // ------------------------------------------------------------------------------------------------
- // Checks that property index is within range
- template <class T>
- const T &GetProperty(const std::vector<T> &props, int idx)
- {
- if (static_cast<size_t>(idx) >= props.size()) {
- throw DeadlyImportError("Invalid .ply file: Property index is out of range.");
- }
+namespace {
+ // ------------------------------------------------------------------------------------------------
+ // Checks that property index is within range
+ template <class T>
+ inline
+ const T &GetProperty(const std::vector<T> &props, int idx) {
+ if (static_cast<size_t>(idx) >= props.size()) {
+ throw DeadlyImportError("Invalid .ply file: Property index is out of range.");
+ }
- return props[idx];
- }
+ return props[idx];
+ }
}
-
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
PLYImporter::PLYImporter()
- : mBuffer()
- , pcDOM()
- , mGeneratedMesh(NULL){
- // empty
+: mBuffer(nullptr)
+, pcDOM(nullptr)
+, mGeneratedMesh(nullptr) {
+ // empty
}
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
PLYImporter::~PLYImporter() {
- // empty
+ // empty
}
// ------------------------------------------------------------------------------------------------
// Returns whether the class can handle the format of the given file.
-bool PLYImporter::CanRead(const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
-{
- const std::string extension = GetExtension(pFile);
+bool PLYImporter::CanRead(const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const {
+ const std::string extension = GetExtension(pFile);
+
+ if ( extension == "ply" ) {
+ return true;
+ } else if (!extension.length() || checkSig) {
+ if ( !pIOHandler ) {
+ return true;
+ }
+ static const char* tokens[] = { "ply" };
+ return SearchFileHeaderForToken(pIOHandler, pFile, tokens, 1);
+ }
- if (extension == "ply")
- return true;
- else if (!extension.length() || checkSig)
- {
- if (!pIOHandler)return true;
- const char* tokens[] = { "ply" };
- return SearchFileHeaderForToken(pIOHandler, pFile, tokens, 1);
- }
- return false;
+ return false;
}
// ------------------------------------------------------------------------------------------------
-const aiImporterDesc* PLYImporter::GetInfo() const
-{
- return &desc;
+const aiImporterDesc* PLYImporter::GetInfo() const {
+ return &desc;
}
// ------------------------------------------------------------------------------------------------
static bool isBigEndian(const char* szMe) {
- ai_assert(NULL != szMe);
+ ai_assert(nullptr != szMe);
- // binary_little_endian
- // binary_big_endian
- bool isBigEndian(false);
+ // binary_little_endian
+ // binary_big_endian
+ bool isBigEndian(false);
#if (defined AI_BUILD_BIG_ENDIAN)
- if ( 'l' == *szMe || 'L' == *szMe ) {
- isBigEndian = true;
- }
+ if ( 'l' == *szMe || 'L' == *szMe ) {
+ isBigEndian = true;
+ }
#else
- if ('b' == *szMe || 'B' == *szMe) {
- isBigEndian = true;
- }
+ if ('b' == *szMe || 'B' == *szMe) {
+ isBigEndian = true;
+ }
#endif // ! AI_BUILD_BIG_ENDIAN
- return isBigEndian;
+ return isBigEndian;
}
// ------------------------------------------------------------------------------------------------
// Imports the given file into the given scene structure.
-void PLYImporter::InternReadFile(const std::string& pFile,
- aiScene* pScene, IOSystem* pIOHandler)
-{
- static const std::string mode = "rb";
- std::unique_ptr<IOStream> fileStream(pIOHandler->Open(pFile, mode));
- if (!fileStream.get()) {
- throw DeadlyImportError("Failed to open file " + pFile + ".");
- }
+void PLYImporter::InternReadFile(const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler) {
+ const std::string mode = "rb";
+ std::unique_ptr<IOStream> fileStream(pIOHandler->Open(pFile, mode));
+ if (!fileStream.get()) {
+ throw DeadlyImportError("Failed to open file " + pFile + ".");
+ }
- // Get the file-size
- size_t fileSize = fileStream->FileSize();
+ // Get the file-size
+ const size_t fileSize( fileStream->FileSize() );
+ if ( 0 == fileSize ) {
+ throw DeadlyImportError("File " + pFile + " is empty.");
+ }
- IOStreamBuffer<char> streamedBuffer(1024 * 1024);
- streamedBuffer.open(fileStream.get());
+ IOStreamBuffer<char> streamedBuffer(1024 * 1024);
+ streamedBuffer.open(fileStream.get());
- // the beginning of the file must be PLY - magic, magic
- std::vector<char> headerCheck;
- streamedBuffer.getNextLine(headerCheck);
+ // the beginning of the file must be PLY - magic, magic
+ std::vector<char> headerCheck;
+ streamedBuffer.getNextLine(headerCheck);
- if ((headerCheck.size() >= 3) && (headerCheck[0] != 'P' && headerCheck[0] != 'p') ||
- (headerCheck[1] != 'L' && headerCheck[1] != 'l') ||
- (headerCheck[2] != 'Y' && headerCheck[2] != 'y'))
- {
- streamedBuffer.close();
- throw DeadlyImportError("Invalid .ply file: Magic number \'ply\' is no there");
- }
+ if ((headerCheck.size() < 3) ||
+ (headerCheck[0] != 'P' && headerCheck[0] != 'p') ||
+ (headerCheck[1] != 'L' && headerCheck[1] != 'l') ||
+ (headerCheck[2] != 'Y' && headerCheck[2] != 'y') ) {
+ streamedBuffer.close();
+ throw DeadlyImportError("Invalid .ply file: Magic number \'ply\' is no there");
+ }
- std::vector<char> mBuffer2;
- streamedBuffer.getNextLine(mBuffer2);
- mBuffer = (unsigned char*)&mBuffer2[0];
+ std::vector<char> mBuffer2;
+ streamedBuffer.getNextLine(mBuffer2);
+ mBuffer = (unsigned char*)&mBuffer2[0];
- char* szMe = (char*)&this->mBuffer[0];
- SkipSpacesAndLineEnd(szMe, (const char**)&szMe);
+ char* szMe = (char*)&this->mBuffer[0];
+ SkipSpacesAndLineEnd(szMe, (const char**)&szMe);
- // determine the format of the file data and construct the aimesh
- PLY::DOM sPlyDom;
- this->pcDOM = &sPlyDom;
+ // determine the format of the file data and construct the aiMesh
+ PLY::DOM sPlyDom;
+ this->pcDOM = &sPlyDom;
- if (TokenMatch(szMe, "format", 6)) {
- if (TokenMatch(szMe, "ascii", 5)) {
- SkipLine(szMe, (const char**)&szMe);
- if (!PLY::DOM::ParseInstance(streamedBuffer, &sPlyDom, this))
- {
- if (mGeneratedMesh != NULL)
- delete(mGeneratedMesh);
+ if (TokenMatch(szMe, "format", 6)) {
+ if (TokenMatch(szMe, "ascii", 5)) {
+ SkipLine(szMe, (const char**)&szMe);
+ if (!PLY::DOM::ParseInstance(streamedBuffer, &sPlyDom, this)) {
+ if (mGeneratedMesh != nullptr) {
+ delete(mGeneratedMesh);
+ mGeneratedMesh = nullptr;
+ }
- streamedBuffer.close();
- throw DeadlyImportError("Invalid .ply file: Unable to build DOM (#1)");
- }
- }
- else if (!::strncmp(szMe, "binary_", 7))
- {
- szMe += 7;
- const bool bIsBE(isBigEndian(szMe));
+ streamedBuffer.close();
+ throw DeadlyImportError("Invalid .ply file: Unable to build DOM (#1)");
+ }
+ } else if (!::strncmp(szMe, "binary_", 7)) {
+ szMe += 7;
+ const bool bIsBE(isBigEndian(szMe));
+
+ // skip the line, parse the rest of the header and build the DOM
+ if (!PLY::DOM::ParseInstanceBinary(streamedBuffer, &sPlyDom, this, bIsBE)) {
+ if (mGeneratedMesh != nullptr) {
+ delete(mGeneratedMesh);
+ mGeneratedMesh = nullptr;
+ }
+
+ streamedBuffer.close();
+ throw DeadlyImportError("Invalid .ply file: Unable to build DOM (#2)");
+ }
+ } else {
+ if (mGeneratedMesh != nullptr) {
+ delete(mGeneratedMesh);
+ mGeneratedMesh = nullptr;
+ }
- // skip the line, parse the rest of the header and build the DOM
- if (!PLY::DOM::ParseInstanceBinary(streamedBuffer, &sPlyDom, this, bIsBE))
- {
- if (mGeneratedMesh != NULL)
- delete(mGeneratedMesh);
+ streamedBuffer.close();
+ throw DeadlyImportError("Invalid .ply file: Unknown file format");
+ }
+ } else {
+ AI_DEBUG_INVALIDATE_PTR(this->mBuffer);
+ if (mGeneratedMesh != nullptr) {
+ delete(mGeneratedMesh);
+ mGeneratedMesh = nullptr;
+ }
streamedBuffer.close();
- throw DeadlyImportError("Invalid .ply file: Unable to build DOM (#2)");
- }
- }
- else
- {
- if (mGeneratedMesh != NULL)
- delete(mGeneratedMesh);
-
- streamedBuffer.close();
- throw DeadlyImportError("Invalid .ply file: Unknown file format");
+ throw DeadlyImportError("Invalid .ply file: Missing format specification");
}
- }
- else
- {
- AI_DEBUG_INVALIDATE_PTR(this->mBuffer);
- if (mGeneratedMesh != NULL)
- delete(mGeneratedMesh);
+ //free the file buffer
streamedBuffer.close();
- throw DeadlyImportError("Invalid .ply file: Missing format specification");
- }
-
- //free the file buffer
- streamedBuffer.close();
-
- if (mGeneratedMesh == NULL)
- {
- throw DeadlyImportError("Invalid .ply file: Unable to extract mesh data ");
- }
-
- // if no face list is existing we assume that the vertex
- // list is containing a list of points
- bool pointsOnly = mGeneratedMesh->mFaces == NULL ? true : false;
- if (pointsOnly)
- {
- if (mGeneratedMesh->mNumVertices < 3)
- {
- if (mGeneratedMesh != NULL)
- delete(mGeneratedMesh);
- streamedBuffer.close();
- throw DeadlyImportError("Invalid .ply file: Not enough "
- "vertices to build a proper face list. ");
+ if (mGeneratedMesh == nullptr) {
+ throw DeadlyImportError("Invalid .ply file: Unable to extract mesh data ");
}
- const unsigned int iNum = (unsigned int)mGeneratedMesh->mNumVertices / 3;
- mGeneratedMesh->mNumFaces = iNum;
- mGeneratedMesh->mFaces = new aiFace[mGeneratedMesh->mNumFaces];
-
- for (unsigned int i = 0; i < iNum; ++i)
- {
- mGeneratedMesh->mFaces[i].mNumIndices = 3;
- mGeneratedMesh->mFaces[i].mIndices = new unsigned int[3];
- mGeneratedMesh->mFaces[i].mIndices[0] = (i * 3);
- mGeneratedMesh->mFaces[i].mIndices[1] = (i * 3) + 1;
- mGeneratedMesh->mFaces[i].mIndices[2] = (i * 3) + 2;
+ // if no face list is existing we assume that the vertex
+ // list is containing a list of points
+ bool pointsOnly = mGeneratedMesh->mFaces == nullptr ? true : false;
+ if (pointsOnly) {
+ mGeneratedMesh->mPrimitiveTypes = aiPrimitiveType::aiPrimitiveType_POINT;
}
- }
- // now load a list of all materials
- std::vector<aiMaterial*> avMaterials;
- std::string defaultTexture;
- LoadMaterial(&avMaterials, defaultTexture, pointsOnly);
+ // now load a list of all materials
+ std::vector<aiMaterial*> avMaterials;
+ std::string defaultTexture;
+ LoadMaterial(&avMaterials, defaultTexture, pointsOnly);
- // now generate the output scene object. Fill the material list
- pScene->mNumMaterials = (unsigned int)avMaterials.size();
- pScene->mMaterials = new aiMaterial*[pScene->mNumMaterials];
- for (unsigned int i = 0; i < pScene->mNumMaterials; ++i) {
- pScene->mMaterials[i] = avMaterials[i];
- }
+ // now generate the output scene object. Fill the material list
+ pScene->mNumMaterials = (unsigned int)avMaterials.size();
+ pScene->mMaterials = new aiMaterial*[pScene->mNumMaterials];
+ for (unsigned int i = 0; i < pScene->mNumMaterials; ++i) {
+ pScene->mMaterials[i] = avMaterials[i];
+ }
- // fill the mesh list
- pScene->mNumMeshes = 1;
- pScene->mMeshes = new aiMesh*[pScene->mNumMeshes];
- pScene->mMeshes[0] = mGeneratedMesh;
+ // fill the mesh list
+ pScene->mNumMeshes = 1;
+ pScene->mMeshes = new aiMesh*[pScene->mNumMeshes];
+ pScene->mMeshes[0] = mGeneratedMesh;
+ mGeneratedMesh = nullptr;
- // generate a simple node structure
- pScene->mRootNode = new aiNode();
- pScene->mRootNode->mNumMeshes = pScene->mNumMeshes;
- pScene->mRootNode->mMeshes = new unsigned int[pScene->mNumMeshes];
+ // generate a simple node structure
+ pScene->mRootNode = new aiNode();
+ pScene->mRootNode->mNumMeshes = pScene->mNumMeshes;
+ pScene->mRootNode->mMeshes = new unsigned int[pScene->mNumMeshes];
- for (unsigned int i = 0; i < pScene->mRootNode->mNumMeshes; ++i) {
- pScene->mRootNode->mMeshes[i] = i;
- }
+ for (unsigned int i = 0; i < pScene->mRootNode->mNumMeshes; ++i) {
+ pScene->mRootNode->mMeshes[i] = i;
+ }
}
-void PLYImporter::LoadVertex(const PLY::Element* pcElement, const PLY::ElementInstance* instElement, unsigned int pos)
-{
- ai_assert(NULL != pcElement);
- ai_assert(NULL != instElement);
-
- ai_uint aiPositions[3] = { 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF };
- PLY::EDataType aiTypes[3] = { EDT_Char, EDT_Char, EDT_Char };
-
- ai_uint aiNormal[3] = { 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF };
- PLY::EDataType aiNormalTypes[3] = { EDT_Char, EDT_Char, EDT_Char };
+void PLYImporter::LoadVertex(const PLY::Element* pcElement, const PLY::ElementInstance* instElement, unsigned int pos) {
+ ai_assert(nullptr != pcElement);
+ ai_assert(nullptr != instElement);
- unsigned int aiColors[4] = { 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF };
- PLY::EDataType aiColorsTypes[4] = { EDT_Char, EDT_Char, EDT_Char, EDT_Char };
+ ai_uint aiPositions[3] = { 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF };
+ PLY::EDataType aiTypes[3] = { EDT_Char, EDT_Char, EDT_Char };
- unsigned int aiTexcoord[2] = { 0xFFFFFFFF, 0xFFFFFFFF };
- PLY::EDataType aiTexcoordTypes[2] = { EDT_Char, EDT_Char };
+ ai_uint aiNormal[3] = { 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF };
+ PLY::EDataType aiNormalTypes[3] = { EDT_Char, EDT_Char, EDT_Char };
- unsigned int cnt = 0;
+ unsigned int aiColors[4] = { 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF };
+ PLY::EDataType aiColorsTypes[4] = { EDT_Char, EDT_Char, EDT_Char, EDT_Char };
- // now check whether which normal components are available
- unsigned int _a = 0;
- for (std::vector<PLY::Property>::const_iterator a = pcElement->alProperties.begin();
- a != pcElement->alProperties.end(); ++a, ++_a)
- {
- if ((*a).bIsList)continue;
+ unsigned int aiTexcoord[2] = { 0xFFFFFFFF, 0xFFFFFFFF };
+ PLY::EDataType aiTexcoordTypes[2] = { EDT_Char, EDT_Char };
- // Positions
- if (PLY::EST_XCoord == (*a).Semantic)
- {
- cnt++;
- aiPositions[0] = _a;
- aiTypes[0] = (*a).eType;
- }
- else if (PLY::EST_YCoord == (*a).Semantic)
- {
- cnt++;
- aiPositions[1] = _a;
- aiTypes[1] = (*a).eType;
- }
- else if (PLY::EST_ZCoord == (*a).Semantic)
- {
- cnt++;
- aiPositions[2] = _a;
- aiTypes[2] = (*a).eType;
- }
+ // now check whether which normal components are available
+ unsigned int _a( 0 ), cnt( 0 );
+ for ( std::vector<PLY::Property>::const_iterator a = pcElement->alProperties.begin();
+ a != pcElement->alProperties.end(); ++a, ++_a) {
+ if ((*a).bIsList) {
+ continue;
+ }
- // Normals
- else if (PLY::EST_XNormal == (*a).Semantic)
- {
- cnt++;
- aiNormal[0] = _a;
- aiNormalTypes[0] = (*a).eType;
- }
- else if (PLY::EST_YNormal == (*a).Semantic)
- {
- cnt++;
- aiNormal[1] = _a;
- aiNormalTypes[1] = (*a).eType;
- }
- else if (PLY::EST_ZNormal == (*a).Semantic)
- {
- cnt++;
- aiNormal[2] = _a;
- aiNormalTypes[2] = (*a).eType;
- }
- // Colors
- else if (PLY::EST_Red == (*a).Semantic)
- {
- cnt++;
- aiColors[0] = _a;
- aiColorsTypes[0] = (*a).eType;
- }
- else if (PLY::EST_Green == (*a).Semantic)
- {
- cnt++;
- aiColors[1] = _a;
- aiColorsTypes[1] = (*a).eType;
- }
- else if (PLY::EST_Blue == (*a).Semantic)
- {
- cnt++;
- aiColors[2] = _a;
- aiColorsTypes[2] = (*a).eType;
- }
- else if (PLY::EST_Alpha == (*a).Semantic)
- {
- cnt++;
- aiColors[3] = _a;
- aiColorsTypes[3] = (*a).eType;
- }
- // Texture coordinates
- else if (PLY::EST_UTextureCoord == (*a).Semantic)
- {
- cnt++;
- aiTexcoord[0] = _a;
- aiTexcoordTypes[0] = (*a).eType;
- }
- else if (PLY::EST_VTextureCoord == (*a).Semantic)
- {
- cnt++;
- aiTexcoord[1] = _a;
- aiTexcoordTypes[1] = (*a).eType;
+ // Positions
+ if (PLY::EST_XCoord == (*a).Semantic) {
+ ++cnt;
+ aiPositions[0] = _a;
+ aiTypes[0] = (*a).eType;
+ } else if (PLY::EST_YCoord == (*a).Semantic) {
+ ++cnt;
+ aiPositions[1] = _a;
+ aiTypes[1] = (*a).eType;
+ } else if (PLY::EST_ZCoord == (*a).Semantic) {
+ ++cnt;
+ aiPositions[2] = _a;
+ aiTypes[2] = (*a).eType;
+ } else if (PLY::EST_XNormal == (*a).Semantic) {
+ // Normals
+ ++cnt;
+ aiNormal[0] = _a;
+ aiNormalTypes[0] = (*a).eType;
+ } else if (PLY::EST_YNormal == (*a).Semantic) {
+ ++cnt;
+ aiNormal[1] = _a;
+ aiNormalTypes[1] = (*a).eType;
+ } else if (PLY::EST_ZNormal == (*a).Semantic) {
+ ++cnt;
+ aiNormal[2] = _a;
+ aiNormalTypes[2] = (*a).eType;
+ } else if (PLY::EST_Red == (*a).Semantic) {
+ // Colors
+ ++cnt;
+ aiColors[0] = _a;
+ aiColorsTypes[0] = (*a).eType;
+ } else if (PLY::EST_Green == (*a).Semantic) {
+ ++cnt;
+ aiColors[1] = _a;
+ aiColorsTypes[1] = (*a).eType;
+ } else if (PLY::EST_Blue == (*a).Semantic) {
+ ++cnt;
+ aiColors[2] = _a;
+ aiColorsTypes[2] = (*a).eType;
+ } else if (PLY::EST_Alpha == (*a).Semantic) {
+ ++cnt;
+ aiColors[3] = _a;
+ aiColorsTypes[3] = (*a).eType;
+ } else if (PLY::EST_UTextureCoord == (*a).Semantic) {
+ // Texture coordinates
+ ++cnt;
+ aiTexcoord[0] = _a;
+ aiTexcoordTypes[0] = (*a).eType;
+ } else if (PLY::EST_VTextureCoord == (*a).Semantic) {
+ ++cnt;
+ aiTexcoord[1] = _a;
+ aiTexcoordTypes[1] = (*a).eType;
+ }
}
- }
- // check whether we have a valid source for the vertex data
- if (0 != cnt)
- {
- // Position
- aiVector3D vOut;
- if (0xFFFFFFFF != aiPositions[0])
- {
- vOut.x = PLY::PropertyInstance::ConvertTo<ai_real>(
- GetProperty(instElement->alProperties, aiPositions[0]).avList.front(), aiTypes[0]);
- }
+ // check whether we have a valid source for the vertex data
+ if (0 != cnt) {
+ // Position
+ aiVector3D vOut;
+ if (0xFFFFFFFF != aiPositions[0]) {
+ vOut.x = PLY::PropertyInstance::ConvertTo<ai_real>(
+ GetProperty(instElement->alProperties, aiPositions[0]).avList.front(), aiTypes[0]);
+ }
- if (0xFFFFFFFF != aiPositions[1])
- {
- vOut.y = PLY::PropertyInstance::ConvertTo<ai_real>(
- GetProperty(instElement->alProperties, aiPositions[1]).avList.front(), aiTypes[1]);
- }
+ if (0xFFFFFFFF != aiPositions[1]) {
+ vOut.y = PLY::PropertyInstance::ConvertTo<ai_real>(
+ GetProperty(instElement->alProperties, aiPositions[1]).avList.front(), aiTypes[1]);
+ }
- if (0xFFFFFFFF != aiPositions[2])
- {
- vOut.z = PLY::PropertyInstance::ConvertTo<ai_real>(
- GetProperty(instElement->alProperties, aiPositions[2]).avList.front(), aiTypes[2]);
- }
+ if (0xFFFFFFFF != aiPositions[2]) {
+ vOut.z = PLY::PropertyInstance::ConvertTo<ai_real>(
+ GetProperty(instElement->alProperties, aiPositions[2]).avList.front(), aiTypes[2]);
+ }
- // Normals
- aiVector3D nOut;
- bool haveNormal = false;
- if (0xFFFFFFFF != aiNormal[0])
- {
- nOut.x = PLY::PropertyInstance::ConvertTo<ai_real>(
- GetProperty(instElement->alProperties, aiNormal[0]).avList.front(), aiNormalTypes[0]);
- haveNormal = true;
- }
+ // Normals
+ aiVector3D nOut;
+ bool haveNormal = false;
+ if (0xFFFFFFFF != aiNormal[0]) {
+ nOut.x = PLY::PropertyInstance::ConvertTo<ai_real>(
+ GetProperty(instElement->alProperties, aiNormal[0]).avList.front(), aiNormalTypes[0]);
+ haveNormal = true;
+ }
- if (0xFFFFFFFF != aiNormal[1])
- {
- nOut.y = PLY::PropertyInstance::ConvertTo<ai_real>(
- GetProperty(instElement->alProperties, aiNormal[1]).avList.front(), aiNormalTypes[1]);
- haveNormal = true;
- }
+ if (0xFFFFFFFF != aiNormal[1]) {
+ nOut.y = PLY::PropertyInstance::ConvertTo<ai_real>(
+ GetProperty(instElement->alProperties, aiNormal[1]).avList.front(), aiNormalTypes[1]);
+ haveNormal = true;
+ }
- if (0xFFFFFFFF != aiNormal[2])
- {
- nOut.z = PLY::PropertyInstance::ConvertTo<ai_real>(
- GetProperty(instElement->alProperties, aiNormal[2]).avList.front(), aiNormalTypes[2]);
- haveNormal = true;
- }
+ if (0xFFFFFFFF != aiNormal[2]) {
+ nOut.z = PLY::PropertyInstance::ConvertTo<ai_real>(
+ GetProperty(instElement->alProperties, aiNormal[2]).avList.front(), aiNormalTypes[2]);
+ haveNormal = true;
+ }
- //Colors
- aiColor4D cOut;
- bool haveColor = false;
- if (0xFFFFFFFF != aiColors[0])
- {
- cOut.r = NormalizeColorValue(GetProperty(instElement->alProperties,
- aiColors[0]).avList.front(), aiColorsTypes[0]);
- haveColor = true;
- }
+ //Colors
+ aiColor4D cOut;
+ bool haveColor = false;
+ if (0xFFFFFFFF != aiColors[0]) {
+ cOut.r = NormalizeColorValue(GetProperty(instElement->alProperties,
+ aiColors[0]).avList.front(), aiColorsTypes[0]);
+ haveColor = true;
+ }
- if (0xFFFFFFFF != aiColors[1])
- {
- cOut.g = NormalizeColorValue(GetProperty(instElement->alProperties,
- aiColors[1]).avList.front(), aiColorsTypes[1]);
- haveColor = true;
- }
+ if (0xFFFFFFFF != aiColors[1]) {
+ cOut.g = NormalizeColorValue(GetProperty(instElement->alProperties,
+ aiColors[1]).avList.front(), aiColorsTypes[1]);
+ haveColor = true;
+ }
- if (0xFFFFFFFF != aiColors[2])
- {
- cOut.b = NormalizeColorValue(GetProperty(instElement->alProperties,
- aiColors[2]).avList.front(), aiColorsTypes[2]);
- haveColor = true;
- }
+ if (0xFFFFFFFF != aiColors[2]) {
+ cOut.b = NormalizeColorValue(GetProperty(instElement->alProperties,
+ aiColors[2]).avList.front(), aiColorsTypes[2]);
+ haveColor = true;
+ }
- // assume 1.0 for the alpha channel ifit is not set
- if (0xFFFFFFFF == aiColors[3])
- {
- cOut.a = 1.0;
- }
- else
- {
- cOut.a = NormalizeColorValue(GetProperty(instElement->alProperties,
- aiColors[3]).avList.front(), aiColorsTypes[3]);
+ // assume 1.0 for the alpha channel if it is not set
+ if (0xFFFFFFFF == aiColors[3]) {
+ cOut.a = 1.0;
+ } else {
+ cOut.a = NormalizeColorValue(GetProperty(instElement->alProperties,
+ aiColors[3]).avList.front(), aiColorsTypes[3]);
- haveColor = true;
- }
+ haveColor = true;
+ }
- //Texture coordinates
- aiVector3D tOut;
- tOut.z = 0;
- bool haveTextureCoords = false;
- if (0xFFFFFFFF != aiTexcoord[0])
- {
- tOut.x = PLY::PropertyInstance::ConvertTo<ai_real>(
- GetProperty(instElement->alProperties, aiTexcoord[0]).avList.front(), aiTexcoordTypes[0]);
- haveTextureCoords = true;
- }
+ //Texture coordinates
+ aiVector3D tOut;
+ tOut.z = 0;
+ bool haveTextureCoords = false;
+ if (0xFFFFFFFF != aiTexcoord[0]) {
+ tOut.x = PLY::PropertyInstance::ConvertTo<ai_real>(
+ GetProperty(instElement->alProperties, aiTexcoord[0]).avList.front(), aiTexcoordTypes[0]);
+ haveTextureCoords = true;
+ }
- if (0xFFFFFFFF != aiTexcoord[1])
- {
- tOut.y = PLY::PropertyInstance::ConvertTo<ai_real>(
- GetProperty(instElement->alProperties, aiTexcoord[1]).avList.front(), aiTexcoordTypes[1]);
- haveTextureCoords = true;
- }
+ if (0xFFFFFFFF != aiTexcoord[1]) {
+ tOut.y = PLY::PropertyInstance::ConvertTo<ai_real>(
+ GetProperty(instElement->alProperties, aiTexcoord[1]).avList.front(), aiTexcoordTypes[1]);
+ haveTextureCoords = true;
+ }
- //create aiMesh if needed
- if (mGeneratedMesh == NULL)
- {
- mGeneratedMesh = new aiMesh();
- mGeneratedMesh->mMaterialIndex = 0;
- }
+ //create aiMesh if needed
+ if ( nullptr == mGeneratedMesh ) {
+ mGeneratedMesh = new aiMesh();
+ mGeneratedMesh->mMaterialIndex = 0;
+ }
- if (mGeneratedMesh->mVertices == NULL)
- {
- mGeneratedMesh->mNumVertices = pcElement->NumOccur;
- mGeneratedMesh->mVertices = new aiVector3D[mGeneratedMesh->mNumVertices];
- }
+ if (nullptr == mGeneratedMesh->mVertices) {
+ mGeneratedMesh->mNumVertices = pcElement->NumOccur;
+ mGeneratedMesh->mVertices = new aiVector3D[mGeneratedMesh->mNumVertices];
+ }
- mGeneratedMesh->mVertices[pos] = vOut;
+ mGeneratedMesh->mVertices[pos] = vOut;
- if (haveNormal)
- {
- if (mGeneratedMesh->mNormals == NULL)
- mGeneratedMesh->mNormals = new aiVector3D[mGeneratedMesh->mNumVertices];
- mGeneratedMesh->mNormals[pos] = nOut;
- }
+ if (haveNormal) {
+ if (nullptr == mGeneratedMesh->mNormals)
+ mGeneratedMesh->mNormals = new aiVector3D[mGeneratedMesh->mNumVertices];
+ mGeneratedMesh->mNormals[pos] = nOut;
+ }
- if (haveColor)
- {
- if (mGeneratedMesh->mColors[0] == NULL)
- mGeneratedMesh->mColors[0] = new aiColor4D[mGeneratedMesh->mNumVertices];
- mGeneratedMesh->mColors[0][pos] = cOut;
- }
+ if (haveColor) {
+ if (nullptr == mGeneratedMesh->mColors[0])
+ mGeneratedMesh->mColors[0] = new aiColor4D[mGeneratedMesh->mNumVertices];
+ mGeneratedMesh->mColors[0][pos] = cOut;
+ }
- if (haveTextureCoords)
- {
- if (mGeneratedMesh->mTextureCoords[0] == NULL)
- {
- mGeneratedMesh->mNumUVComponents[0] = 2;
- mGeneratedMesh->mTextureCoords[0] = new aiVector3D[mGeneratedMesh->mNumVertices];
- }
- mGeneratedMesh->mTextureCoords[0][pos] = tOut;
+ if (haveTextureCoords) {
+ if (nullptr == mGeneratedMesh->mTextureCoords[0]) {
+ mGeneratedMesh->mNumUVComponents[0] = 2;
+ mGeneratedMesh->mTextureCoords[0] = new aiVector3D[mGeneratedMesh->mNumVertices];
+ }
+ mGeneratedMesh->mTextureCoords[0][pos] = tOut;
+ }
}
- }
}
// ------------------------------------------------------------------------------------------------
// Convert a color component to [0...1]
-ai_real PLYImporter::NormalizeColorValue(PLY::PropertyInstance::ValueUnion val,
- PLY::EDataType eType)
-{
- switch (eType)
- {
- case EDT_Float:
- return val.fFloat;
- case EDT_Double:
- return (ai_real)val.fDouble;
-
- case EDT_UChar:
- return (ai_real)val.iUInt / (ai_real)0xFF;
- case EDT_Char:
- return (ai_real)(val.iInt + (0xFF / 2)) / (ai_real)0xFF;
- case EDT_UShort:
- return (ai_real)val.iUInt / (ai_real)0xFFFF;
- case EDT_Short:
- return (ai_real)(val.iInt + (0xFFFF / 2)) / (ai_real)0xFFFF;
- case EDT_UInt:
- return (ai_real)val.iUInt / (ai_real)0xFFFF;
- case EDT_Int:
- return ((ai_real)val.iInt / (ai_real)0xFF) + 0.5f;
- default:;
- };
- return 0.0f;
+ai_real PLYImporter::NormalizeColorValue(PLY::PropertyInstance::ValueUnion val, PLY::EDataType eType) {
+ switch (eType) {
+ case EDT_Float:
+ return val.fFloat;
+ case EDT_Double:
+ return (ai_real)val.fDouble;
+ case EDT_UChar:
+ return (ai_real)val.iUInt / (ai_real)0xFF;
+ case EDT_Char:
+ return (ai_real)(val.iInt + (0xFF / 2)) / (ai_real)0xFF;
+ case EDT_UShort:
+ return (ai_real)val.iUInt / (ai_real)0xFFFF;
+ case EDT_Short:
+ return (ai_real)(val.iInt + (0xFFFF / 2)) / (ai_real)0xFFFF;
+ case EDT_UInt:
+ return (ai_real)val.iUInt / (ai_real)0xFFFF;
+ case EDT_Int:
+ return ((ai_real)val.iInt / (ai_real)0xFF) + 0.5f;
+ default:
+ break;
+ }
+
+ return 0.0f;
}
// ------------------------------------------------------------------------------------------------
// Try to extract proper faces from the PLY DOM
-void PLYImporter::LoadFace(const PLY::Element* pcElement, const PLY::ElementInstance* instElement, unsigned int pos)
-{
- ai_assert(NULL != pcElement);
- ai_assert(NULL != instElement);
-
- if (mGeneratedMesh == NULL)
- throw DeadlyImportError("Invalid .ply file: Vertices shoud be declared before faces");
-
- bool bOne = false;
-
- // index of the vertex index list
- unsigned int iProperty = 0xFFFFFFFF;
- PLY::EDataType eType = EDT_Char;
- bool bIsTriStrip = false;
-
- // index of the material index property
- //unsigned int iMaterialIndex = 0xFFFFFFFF;
- //PLY::EDataType eType2 = EDT_Char;
-
- // texture coordinates
- unsigned int iTextureCoord = 0xFFFFFFFF;
- PLY::EDataType eType3 = EDT_Char;
-
- // face = unique number of vertex indices
- if (PLY::EEST_Face == pcElement->eSemantic)
- {
- unsigned int _a = 0;
- for (std::vector<PLY::Property>::const_iterator a = pcElement->alProperties.begin();
- a != pcElement->alProperties.end(); ++a, ++_a)
- {
- if (PLY::EST_VertexIndex == (*a).Semantic)
- {
- // must be a dynamic list!
- if (!(*a).bIsList)
- continue;
-
- iProperty = _a;
- bOne = true;
- eType = (*a).eType;
- }
- /*else if (PLY::EST_MaterialIndex == (*a).Semantic)
- {
- if ((*a).bIsList)
- continue;
- iMaterialIndex = _a;
- bOne = true;
- eType2 = (*a).eType;
- }*/
- else if (PLY::EST_TextureCoordinates == (*a).Semantic)
- {
- // must be a dynamic list!
- if (!(*a).bIsList)
- continue;
- iTextureCoord = _a;
- bOne = true;
- eType3 = (*a).eType;
- }
- }
- }
- // triangle strip
- // TODO: triangle strip and material index support???
- else if (PLY::EEST_TriStrip == pcElement->eSemantic)
- {
- unsigned int _a = 0;
- for (std::vector<PLY::Property>::const_iterator a = pcElement->alProperties.begin();
- a != pcElement->alProperties.end(); ++a, ++_a)
- {
- // must be a dynamic list!
- if (!(*a).bIsList)
- continue;
- iProperty = _a;
- bOne = true;
- bIsTriStrip = true;
- eType = (*a).eType;
- break;
+void PLYImporter::LoadFace(const PLY::Element* pcElement, const PLY::ElementInstance* instElement,
+ unsigned int pos) {
+ ai_assert(nullptr != pcElement);
+ ai_assert(nullptr != instElement);
+
+ if (mGeneratedMesh == nullptr) {
+ throw DeadlyImportError("Invalid .ply file: Vertices should be declared before faces");
+ }
+
+ bool bOne = false;
+
+ // index of the vertex index list
+ unsigned int iProperty = 0xFFFFFFFF;
+ PLY::EDataType eType = EDT_Char;
+ bool bIsTriStrip = false;
+
+ // index of the material index property
+ //unsigned int iMaterialIndex = 0xFFFFFFFF;
+ //PLY::EDataType eType2 = EDT_Char;
+
+ // texture coordinates
+ unsigned int iTextureCoord = 0xFFFFFFFF;
+ PLY::EDataType eType3 = EDT_Char;
+
+ // face = unique number of vertex indices
+ if (PLY::EEST_Face == pcElement->eSemantic) {
+ unsigned int _a = 0;
+ for (std::vector<PLY::Property>::const_iterator a = pcElement->alProperties.begin();
+ a != pcElement->alProperties.end(); ++a, ++_a) {
+ if (PLY::EST_VertexIndex == (*a).Semantic) {
+ // must be a dynamic list!
+ if (!(*a).bIsList) {
+ continue;
+ }
+
+ iProperty = _a;
+ bOne = true;
+ eType = (*a).eType;
+ } else if (PLY::EST_TextureCoordinates == (*a).Semantic) {
+ // must be a dynamic list!
+ if (!(*a).bIsList) {
+ continue;
+ }
+ iTextureCoord = _a;
+ bOne = true;
+ eType3 = (*a).eType;
+ }
+ }
}
- }
-
- // check whether we have at least one per-face information set
- if (bOne)
- {
- if (mGeneratedMesh->mFaces == NULL)
- {
- mGeneratedMesh->mNumFaces = pcElement->NumOccur;
- mGeneratedMesh->mFaces = new aiFace[mGeneratedMesh->mNumFaces];
+ // triangle strip
+ // TODO: triangle strip and material index support???
+ else if (PLY::EEST_TriStrip == pcElement->eSemantic) {
+ unsigned int _a = 0;
+ for (std::vector<PLY::Property>::const_iterator a = pcElement->alProperties.begin();
+ a != pcElement->alProperties.end(); ++a, ++_a) {
+ // must be a dynamic list!
+ if (!(*a).bIsList) {
+ continue;
+ }
+ iProperty = _a;
+ bOne = true;
+ bIsTriStrip = true;
+ eType = (*a).eType;
+ break;
+ }
}
- if (!bIsTriStrip)
- {
- // parse the list of vertex indices
- if (0xFFFFFFFF != iProperty)
- {
- const unsigned int iNum = (unsigned int)GetProperty(instElement->alProperties, iProperty).avList.size();
- mGeneratedMesh->mFaces[pos].mNumIndices = iNum;
- mGeneratedMesh->mFaces[pos].mIndices = new unsigned int[iNum];
-
- std::vector<PLY::PropertyInstance::ValueUnion>::const_iterator p =
- GetProperty(instElement->alProperties, iProperty).avList.begin();
-
- for (unsigned int a = 0; a < iNum; ++a, ++p)
- {
- mGeneratedMesh->mFaces[pos].mIndices[a] = PLY::PropertyInstance::ConvertTo<unsigned int>(*p, eType);
+ // check whether we have at least one per-face information set
+ if (bOne) {
+ if (mGeneratedMesh->mFaces == nullptr) {
+ mGeneratedMesh->mNumFaces = pcElement->NumOccur;
+ mGeneratedMesh->mFaces = new aiFace[mGeneratedMesh->mNumFaces];
}
- }
- // parse the material index
- // cannot be handled without processing the whole file first
- /*if (0xFFFFFFFF != iMaterialIndex)
- {
- mGeneratedMesh->mFaces[pos]. = PLY::PropertyInstance::ConvertTo<unsigned int>(
- GetProperty(instElement->alProperties, iMaterialIndex).avList.front(), eType2);
- }*/
+ if (!bIsTriStrip) {
+ // parse the list of vertex indices
+ if (0xFFFFFFFF != iProperty) {
+ const unsigned int iNum = (unsigned int)GetProperty(instElement->alProperties, iProperty).avList.size();
+ mGeneratedMesh->mFaces[pos].mNumIndices = iNum;
+ mGeneratedMesh->mFaces[pos].mIndices = new unsigned int[iNum];
- if (0xFFFFFFFF != iTextureCoord)
- {
- const unsigned int iNum = (unsigned int)GetProperty(instElement->alProperties, iTextureCoord).avList.size();
-
- //should be 6 coords
- std::vector<PLY::PropertyInstance::ValueUnion>::const_iterator p =
- GetProperty(instElement->alProperties, iTextureCoord).avList.begin();
+ std::vector<PLY::PropertyInstance::ValueUnion>::const_iterator p =
+ GetProperty(instElement->alProperties, iProperty).avList.begin();
- if ((iNum / 3) == 2) // X Y coord
- {
- for (unsigned int a = 0; a < iNum; ++a, ++p)
- {
- unsigned int vindex = mGeneratedMesh->mFaces[pos].mIndices[a / 2];
- if (vindex < mGeneratedMesh->mNumVertices)
- {
- if (mGeneratedMesh->mTextureCoords[0] == NULL)
- {
- mGeneratedMesh->mNumUVComponents[0] = 2;
- mGeneratedMesh->mTextureCoords[0] = new aiVector3D[mGeneratedMesh->mNumVertices];
- }
-
- if (a % 2 == 0)
- mGeneratedMesh->mTextureCoords[0][vindex].x = PLY::PropertyInstance::ConvertTo<ai_real>(*p, eType3);
- else
- mGeneratedMesh->mTextureCoords[0][vindex].y = PLY::PropertyInstance::ConvertTo<ai_real>(*p, eType3);
-
- mGeneratedMesh->mTextureCoords[0][vindex].z = 0;
+ for (unsigned int a = 0; a < iNum; ++a, ++p) {
+ mGeneratedMesh->mFaces[pos].mIndices[a] = PLY::PropertyInstance::ConvertTo<unsigned int>(*p, eType);
+ }
}
- }
- }
- }
- }
- else // triangle strips
- {
- // normally we have only one triangle strip instance where
- // a value of -1 indicates a restart of the strip
- bool flip = false;
- const std::vector<PLY::PropertyInstance::ValueUnion>& quak = GetProperty(instElement->alProperties, iProperty).avList;
- //pvOut->reserve(pvOut->size() + quak.size() + (quak.size()>>2u)); //Limits memory consumption
-
- int aiTable[2] = { -1, -1 };
- for (std::vector<PLY::PropertyInstance::ValueUnion>::const_iterator a = quak.begin(); a != quak.end(); ++a) {
- const int p = PLY::PropertyInstance::ConvertTo<int>(*a, eType);
-
- if (-1 == p) {
- // restart the strip ...
- aiTable[0] = aiTable[1] = -1;
- flip = false;
- continue;
- }
- if (-1 == aiTable[0]) {
- aiTable[0] = p;
- continue;
- }
- if (-1 == aiTable[1]) {
- aiTable[1] = p;
- continue;
- }
- if (mGeneratedMesh->mFaces == NULL)
+ // parse the material index
+ // cannot be handled without processing the whole file first
+ /*if (0xFFFFFFFF != iMaterialIndex)
{
- mGeneratedMesh->mNumFaces = pcElement->NumOccur;
- mGeneratedMesh->mFaces = new aiFace[mGeneratedMesh->mNumFaces];
- }
-
- mGeneratedMesh->mFaces[pos].mNumIndices = 3;
- mGeneratedMesh->mFaces[pos].mIndices = new unsigned int[3];
- mGeneratedMesh->mFaces[pos].mIndices[0] = aiTable[0];
- mGeneratedMesh->mFaces[pos].mIndices[1] = aiTable[1];
- mGeneratedMesh->mFaces[pos].mIndices[2] = aiTable[2];
-
- if ((flip = !flip)) {
- std::swap(mGeneratedMesh->mFaces[pos].mIndices[0], mGeneratedMesh->mFaces[pos].mIndices[1]);
+ mGeneratedMesh->mFaces[pos]. = PLY::PropertyInstance::ConvertTo<unsigned int>(
+ GetProperty(instElement->alProperties, iMaterialIndex).avList.front(), eType2);
+ }*/
+
+ if (0xFFFFFFFF != iTextureCoord) {
+ const unsigned int iNum = (unsigned int)GetProperty(instElement->alProperties, iTextureCoord).avList.size();
+
+ //should be 6 coords
+ std::vector<PLY::PropertyInstance::ValueUnion>::const_iterator p =
+ GetProperty(instElement->alProperties, iTextureCoord).avList.begin();
+
+ if ((iNum / 3) == 2) // X Y coord
+ {
+ for (unsigned int a = 0; a < iNum; ++a, ++p) {
+ unsigned int vindex = mGeneratedMesh->mFaces[pos].mIndices[a / 2];
+ if (vindex < mGeneratedMesh->mNumVertices) {
+ if (mGeneratedMesh->mTextureCoords[0] == nullptr ) {
+ mGeneratedMesh->mNumUVComponents[0] = 2;
+ mGeneratedMesh->mTextureCoords[0] = new aiVector3D[mGeneratedMesh->mNumVertices];
+ }
+
+ if (a % 2 == 0) {
+ mGeneratedMesh->mTextureCoords[0][vindex].x = PLY::PropertyInstance::ConvertTo<ai_real>(*p, eType3);
+ } else {
+ mGeneratedMesh->mTextureCoords[0][vindex].y = PLY::PropertyInstance::ConvertTo<ai_real>(*p, eType3);
+ }
+
+ mGeneratedMesh->mTextureCoords[0][vindex].z = 0;
+ }
+ }
+ }
+ }
+ } else { // triangle strips
+ // normally we have only one triangle strip instance where
+ // a value of -1 indicates a restart of the strip
+ bool flip = false;
+ const std::vector<PLY::PropertyInstance::ValueUnion>& quak = GetProperty(instElement->alProperties, iProperty).avList;
+ //pvOut->reserve(pvOut->size() + quak.size() + (quak.size()>>2u)); //Limits memory consumption
+
+ int aiTable[2] = { -1, -1 };
+ for (std::vector<PLY::PropertyInstance::ValueUnion>::const_iterator a = quak.begin(); a != quak.end(); ++a) {
+ const int p = PLY::PropertyInstance::ConvertTo<int>(*a, eType);
+
+ if (-1 == p) {
+ // restart the strip ...
+ aiTable[0] = aiTable[1] = -1;
+ flip = false;
+ continue;
+ }
+ if (-1 == aiTable[0]) {
+ aiTable[0] = p;
+ continue;
+ }
+ if (-1 == aiTable[1]) {
+ aiTable[1] = p;
+ continue;
+ }
+
+ if (mGeneratedMesh->mFaces == nullptr) {
+ mGeneratedMesh->mNumFaces = pcElement->NumOccur;
+ mGeneratedMesh->mFaces = new aiFace[mGeneratedMesh->mNumFaces];
+ }
+
+ mGeneratedMesh->mFaces[pos].mNumIndices = 3;
+ mGeneratedMesh->mFaces[pos].mIndices = new unsigned int[3];
+ mGeneratedMesh->mFaces[pos].mIndices[0] = aiTable[0];
+ mGeneratedMesh->mFaces[pos].mIndices[1] = aiTable[1];
+ mGeneratedMesh->mFaces[pos].mIndices[2] = p;
+
+ // every second pass swap the indices.
+ flip = !flip;
+ if ( flip ) {
+ std::swap(mGeneratedMesh->mFaces[pos].mIndices[0], mGeneratedMesh->mFaces[pos].mIndices[1]);
+ }
+
+ aiTable[0] = aiTable[1];
+ aiTable[1] = p;
+ }
}
-
- aiTable[0] = aiTable[1];
- aiTable[1] = p;
- }
}
- }
}
// ------------------------------------------------------------------------------------------------
diff --git a/code/PlyLoader.h b/code/PlyLoader.h
index eb64a9036..9199e17d7 100644
--- a/code/PlyLoader.h
+++ b/code/PlyLoader.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -45,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_PLYLOADER_H_INCLUDED
#define AI_PLYLOADER_H_INCLUDED
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
#include <assimp/types.h>
#include "PlyParser.h"
#include <vector>
@@ -56,7 +57,6 @@ struct aiMesh;
namespace Assimp {
-
using namespace PLY;
// ---------------------------------------------------------------------------
diff --git a/code/PlyParser.cpp b/code/PlyParser.cpp
index e29005068..b51b6ac71 100644
--- a/code/PlyParser.cpp
+++ b/code/PlyParser.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -44,9 +45,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_NO_PLY_IMPORTER
-#include "fast_atof.h"
+#include <assimp/fast_atof.h>
#include <assimp/DefaultLogger.hpp>
-#include "ByteSwapper.h"
+#include <assimp/ByteSwapper.h>
#include "PlyLoader.h"
using namespace Assimp;
@@ -96,7 +97,7 @@ PLY::EDataType PLY::Property::ParseDataType(std::vector<char> &buffer) {
}
if (PLY::EDT_INVALID == eOut)
{
- DefaultLogger::get()->info("Found unknown data type in PLY file. This is OK");
+ ASSIMP_LOG_INFO("Found unknown data type in PLY file. This is OK");
}
return eOut;
@@ -228,7 +229,7 @@ PLY::ESemantic PLY::Property::ParseSemantic(std::vector<char> &buffer) {
eOut = PLY::EST_ZNormal;
}
else {
- DefaultLogger::get()->info("Found unknown property semantic in file. This is ok");
+ ASSIMP_LOG_INFO("Found unknown property semantic in file. This is ok");
PLY::DOM::SkipLine(buffer);
}
return eOut;
@@ -294,7 +295,7 @@ bool PLY::Property::ParseProperty(std::vector<char> &buffer, PLY::Property* pOut
if (PLY::EST_INVALID == pOut->Semantic)
{
- DefaultLogger::get()->info("Found unknown semantic in PLY file. This is OK");
+ ASSIMP_LOG_INFO("Found unknown semantic in PLY file. This is OK");
std::string(&buffer[0], &buffer[0] + strlen(&buffer[0]));
}
@@ -381,6 +382,11 @@ bool PLY::Element::ParseElement(IOStreamBuffer<char> &streamBuffer, std::vector<
{
char* endPos = &buffer[0] + (strlen(&buffer[0]) - 1);
pOut->szName = std::string(&buffer[0], endPos);
+
+ // go to the next line
+ PLY::DOM::SkipSpacesAndLineEnd(buffer);
+
+ return true;
}
//parse the number of occurrences of this element
@@ -508,7 +514,7 @@ bool PLY::DOM::SkipComments(std::vector<char> &buffer)
// ------------------------------------------------------------------------------------------------
bool PLY::DOM::ParseHeader(IOStreamBuffer<char> &streamBuffer, std::vector<char> &buffer, bool isBinary) {
- DefaultLogger::get()->debug("PLY::DOM::ParseHeader() begin");
+ ASSIMP_LOG_DEBUG("PLY::DOM::ParseHeader() begin");
// parse all elements
while (!buffer.empty())
@@ -537,14 +543,14 @@ bool PLY::DOM::ParseHeader(IOStreamBuffer<char> &streamBuffer, std::vector<char>
if (!isBinary) // it would occur an error, if binary data start with values as space or line end.
SkipSpacesAndLineEnd(buffer);
- DefaultLogger::get()->debug("PLY::DOM::ParseHeader() succeeded");
+ ASSIMP_LOG_DEBUG("PLY::DOM::ParseHeader() succeeded");
return true;
}
// ------------------------------------------------------------------------------------------------
bool PLY::DOM::ParseElementInstanceLists(IOStreamBuffer<char> &streamBuffer, std::vector<char> &buffer, PLYImporter* loader)
{
- DefaultLogger::get()->debug("PLY::DOM::ParseElementInstanceLists() begin");
+ ASSIMP_LOG_DEBUG("PLY::DOM::ParseElementInstanceLists() begin");
alElementData.resize(alElements.size());
std::vector<PLY::Element>::const_iterator i = alElements.begin();
@@ -565,7 +571,7 @@ bool PLY::DOM::ParseElementInstanceLists(IOStreamBuffer<char> &streamBuffer, std
}
}
- DefaultLogger::get()->debug("PLY::DOM::ParseElementInstanceLists() succeeded");
+ ASSIMP_LOG_DEBUG("PLY::DOM::ParseElementInstanceLists() succeeded");
return true;
}
@@ -576,7 +582,7 @@ bool PLY::DOM::ParseElementInstanceListsBinary(IOStreamBuffer<char> &streamBuffe
PLYImporter* loader,
bool p_bBE)
{
- DefaultLogger::get()->debug("PLY::DOM::ParseElementInstanceListsBinary() begin");
+ ASSIMP_LOG_DEBUG("PLY::DOM::ParseElementInstanceListsBinary() begin");
alElementData.resize(alElements.size());
std::vector<PLY::Element>::const_iterator i = alElements.begin();
@@ -596,7 +602,7 @@ bool PLY::DOM::ParseElementInstanceListsBinary(IOStreamBuffer<char> &streamBuffe
}
}
- DefaultLogger::get()->debug("PLY::DOM::ParseElementInstanceListsBinary() succeeded");
+ ASSIMP_LOG_DEBUG("PLY::DOM::ParseElementInstanceListsBinary() succeeded");
return true;
}
@@ -609,23 +615,23 @@ bool PLY::DOM::ParseInstanceBinary(IOStreamBuffer<char> &streamBuffer, DOM* p_pc
std::vector<char> buffer;
streamBuffer.getNextLine(buffer);
- DefaultLogger::get()->debug("PLY::DOM::ParseInstanceBinary() begin");
+ ASSIMP_LOG_DEBUG("PLY::DOM::ParseInstanceBinary() begin");
if (!p_pcOut->ParseHeader(streamBuffer, buffer, true))
{
- DefaultLogger::get()->debug("PLY::DOM::ParseInstanceBinary() failure");
+ ASSIMP_LOG_DEBUG("PLY::DOM::ParseInstanceBinary() failure");
return false;
}
streamBuffer.getNextBlock(buffer);
- unsigned int bufferSize = buffer.size();
+ unsigned int bufferSize = static_cast<unsigned int>(buffer.size());
const char* pCur = (char*)&buffer[0];
if (!p_pcOut->ParseElementInstanceListsBinary(streamBuffer, buffer, pCur, bufferSize, loader, p_bBE))
{
- DefaultLogger::get()->debug("PLY::DOM::ParseInstanceBinary() failure");
+ ASSIMP_LOG_DEBUG("PLY::DOM::ParseInstanceBinary() failure");
return false;
}
- DefaultLogger::get()->debug("PLY::DOM::ParseInstanceBinary() succeeded");
+ ASSIMP_LOG_DEBUG("PLY::DOM::ParseInstanceBinary() succeeded");
return true;
}
@@ -638,11 +644,11 @@ bool PLY::DOM::ParseInstance(IOStreamBuffer<char> &streamBuffer, DOM* p_pcOut, P
std::vector<char> buffer;
streamBuffer.getNextLine(buffer);
- DefaultLogger::get()->debug("PLY::DOM::ParseInstance() begin");
+ ASSIMP_LOG_DEBUG("PLY::DOM::ParseInstance() begin");
if (!p_pcOut->ParseHeader(streamBuffer, buffer, false))
{
- DefaultLogger::get()->debug("PLY::DOM::ParseInstance() failure");
+ ASSIMP_LOG_DEBUG("PLY::DOM::ParseInstance() failure");
return false;
}
@@ -650,10 +656,10 @@ bool PLY::DOM::ParseInstance(IOStreamBuffer<char> &streamBuffer, DOM* p_pcOut, P
streamBuffer.getNextLine(buffer);
if (!p_pcOut->ParseElementInstanceLists(streamBuffer, buffer, loader))
{
- DefaultLogger::get()->debug("PLY::DOM::ParseInstance() failure");
+ ASSIMP_LOG_DEBUG("PLY::DOM::ParseInstance() failure");
return false;
}
- DefaultLogger::get()->debug("PLY::DOM::ParseInstance() succeeded");
+ ASSIMP_LOG_DEBUG("PLY::DOM::ParseInstance() succeeded");
return true;
}
@@ -666,7 +672,6 @@ bool PLY::ElementInstanceList::ParseInstanceList(
PLYImporter* loader)
{
ai_assert(NULL != pcElement);
- const char* pCur = (const char*)&buffer[0];
// parse all elements
if (EEST_INVALID == pcElement->eSemantic || pcElement->alProperties.empty())
@@ -678,11 +683,11 @@ bool PLY::ElementInstanceList::ParseInstanceList(
PLY::DOM::SkipComments(buffer);
PLY::DOM::SkipLine(buffer);
streamBuffer.getNextLine(buffer);
- pCur = (buffer.empty()) ? NULL : (const char*)&buffer[0];
}
}
else
{
+ const char* pCur = (const char*)&buffer[0];
// be sure to have enough storage
for (unsigned int i = 0; i < pcElement->NumOccur; ++i)
{
@@ -782,7 +787,7 @@ bool PLY::ElementInstance::ParseInstance(const char* &pCur,
{
if (!(PLY::PropertyInstance::ParseInstance(pCur, &(*a), &(*i))))
{
- DefaultLogger::get()->warn("Unable to parse property instance. "
+ ASSIMP_LOG_WARN("Unable to parse property instance. "
"Skipping this element instance");
PLY::PropertyInstance::ValueUnion v = PLY::PropertyInstance::DefaultValue((*a).eType);
@@ -814,7 +819,7 @@ bool PLY::ElementInstance::ParseInstanceBinary(
{
if (!(PLY::PropertyInstance::ParseInstanceBinary(streamBuffer, buffer, pCur, bufferSize, &(*a), &(*i), p_bBE)))
{
- DefaultLogger::get()->warn("Unable to parse binary property instance. "
+ ASSIMP_LOG_WARN("Unable to parse binary property instance. "
"Skipping this element instance");
(*i).avList.push_back(PLY::PropertyInstance::DefaultValue((*a).eType));
@@ -933,32 +938,8 @@ bool PLY::PropertyInstance::ParseValue(const char* &pCur,
{
ai_assert(NULL != pCur);
ai_assert(NULL != out);
-
- //calc element size
- unsigned int lsize = 0;
- switch (eType)
- {
- case EDT_Char:
- case EDT_UChar:
- lsize = 1;
- break;
-
- case EDT_UShort:
- case EDT_Short:
- lsize = 2;
- break;
-
- case EDT_UInt:
- case EDT_Int:
- case EDT_Float:
- lsize = 4;
- break;
-
- case EDT_Double:
- lsize = 8;
- break;
- }
+ //calc element size
bool ret = true;
switch (eType)
{
@@ -990,6 +971,7 @@ bool PLY::PropertyInstance::ParseValue(const char* &pCur,
out->fDouble = (double)d;
break;
+ case EDT_INVALID:
default:
ret = false;
break;
@@ -1032,6 +1014,10 @@ bool PLY::PropertyInstance::ParseValueBinary(IOStreamBuffer<char> &streamBuffer,
case EDT_Double:
lsize = 8;
break;
+
+ case EDT_INVALID:
+ default:
+ break;
}
//read the next file block if needed
@@ -1044,7 +1030,7 @@ bool PLY::PropertyInstance::ParseValueBinary(IOStreamBuffer<char> &streamBuffer,
buffer = std::vector<char>(buffer.end() - bufferSize, buffer.end());
buffer.insert(buffer.end(), nbuffer.begin(), nbuffer.end());
nbuffer.clear();
- bufferSize = buffer.size();
+ bufferSize = static_cast<unsigned int>(buffer.size());
pCur = (char*)&buffer[0];
}
else
@@ -1057,71 +1043,91 @@ bool PLY::PropertyInstance::ParseValueBinary(IOStreamBuffer<char> &streamBuffer,
switch (eType)
{
case EDT_UInt:
- out->iUInt = (uint32_t)*((uint32_t*)pCur);
- pCur += 4;
+ {
+ uint32_t t;
+ memcpy(&t, pCur, sizeof(uint32_t));
+ pCur += sizeof(uint32_t);
// Swap endianness
- if (p_bBE)ByteSwap::Swap((int32_t*)&out->iUInt);
+ if (p_bBE)ByteSwap::Swap(&t);
+ out->iUInt = t;
break;
+ }
case EDT_UShort:
{
- uint16_t i = *((uint16_t*)pCur);
+ uint16_t t;
+ memcpy(&t, pCur, sizeof(uint16_t));
+ pCur += sizeof(uint16_t);
// Swap endianness
- if (p_bBE)ByteSwap::Swap(&i);
- out->iUInt = (uint32_t)i;
- pCur += 2;
+ if (p_bBE)ByteSwap::Swap(&t);
+ out->iUInt = t;
break;
}
case EDT_UChar:
{
- out->iUInt = (uint32_t)(*((uint8_t*)pCur));
- pCur++;
+ uint8_t t;
+ memcpy(&t, pCur, sizeof(uint8_t));
+ pCur += sizeof(uint8_t);
+ out->iUInt = t;
break;
}
case EDT_Int:
- out->iInt = *((int32_t*)pCur);
- pCur += 4;
+ {
+ int32_t t;
+ memcpy(&t, pCur, sizeof(int32_t));
+ pCur += sizeof(int32_t);
// Swap endianness
- if (p_bBE)ByteSwap::Swap(&out->iInt);
+ if (p_bBE)ByteSwap::Swap(&t);
+ out->iInt = t;
break;
+ }
case EDT_Short:
{
- int16_t i = *((int16_t*)pCur);
+ int16_t t;
+ memcpy(&t, pCur, sizeof(int16_t));
+ pCur += sizeof(int16_t);
// Swap endianness
- if (p_bBE)ByteSwap::Swap(&i);
- out->iInt = (int32_t)i;
- pCur += 2;
+ if (p_bBE)ByteSwap::Swap(&t);
+ out->iInt = t;
break;
}
case EDT_Char:
- out->iInt = (int32_t)*((int8_t*)pCur);
- pCur++;
+ {
+ int8_t t;
+ memcpy(&t, pCur, sizeof(int8_t));
+ pCur += sizeof(int8_t);
+ out->iInt = t;
break;
+ }
case EDT_Float:
{
- out->fFloat = *((float*)pCur);
+ float t;
+ memcpy(&t, pCur, sizeof(float));
+ pCur += sizeof(float);
// Swap endianness
- if (p_bBE)ByteSwap::Swap((int32_t*)&out->fFloat);
- pCur += 4;
+ if (p_bBE)ByteSwap::Swap(&t);
+ out->fFloat = t;
break;
}
case EDT_Double:
{
- out->fDouble = *((double*)pCur);
+ double t;
+ memcpy(&t, pCur, sizeof(double));
+ pCur += sizeof(double);
// Swap endianness
- if (p_bBE)ByteSwap::Swap((int64_t*)&out->fDouble);
- pCur += 8;
+ if (p_bBE)ByteSwap::Swap(&t);
+ out->fDouble = t;
break;
}
default:
diff --git a/code/PlyParser.h b/code/PlyParser.h
index b17b07341..b544c3b04 100644
--- a/code/PlyParser.h
+++ b/code/PlyParser.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
Redistribution and use of this software in source and binary forms,
@@ -38,14 +39,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----------------------------------------------------------------------
*/
-
/** @file Defines the helper data structures for importing PLY files */
+#pragma once
#ifndef AI_PLYFILEHELPER_H_INC
#define AI_PLYFILEHELPER_H_INC
-
-#include "ParsingUtils.h"
-#include "IOStreamBuffer.h"
+#include <assimp/ParsingUtils.h>
+#include <assimp/IOStreamBuffer.h>
#include <vector>
namespace Assimp
@@ -57,8 +57,7 @@ class PLYImporter;
// http://local.wasp.uwa.edu.au/~pbourke/dataformats/ply/
// http://w3.impa.br/~lvelho/outgoing/sossai/old/ViHAP_D4.4.2_PLY_format_v1.1.pdf
// http://www.okino.com/conv/exp_ply.htm
-namespace PLY
-{
+namespace PLY {
// ---------------------------------------------------------------------------------
/*
@@ -77,8 +76,7 @@ int8
int16
uint8 ... forms are also used
*/
-enum EDataType
-{
+enum EDataType {
EDT_Char = 0x0u,
EDT_UChar,
EDT_Short,
@@ -97,8 +95,7 @@ enum EDataType
*
* Semantics define the usage of a property, e.g. x coordinate
*/
-enum ESemantic
-{
+enum ESemantic {
//! vertex position x coordinate
EST_XCoord = 0x0u,
//! vertex position x coordinate
@@ -181,15 +178,14 @@ enum ESemantic
*
* Semantics define the usage of an element, e.g. vertex or material
*/
-enum EElementSemantic
-{
+enum EElementSemantic {
//! The element is a vertex
EEST_Vertex = 0x0u,
//! The element is a face description (index table)
EEST_Face,
- //! The element is a tristrip description (index table)
+ //! The element is a triangle-strip description (index table)
EEST_TriStrip,
//! The element is an edge description (ignored)
@@ -210,17 +206,16 @@ enum EElementSemantic
*
* This can e.g. be a part of the vertex declaration
*/
-class Property
-{
+class Property {
public:
-
//! Default constructor
- Property()
- : eType (EDT_Int),
- Semantic(),
- bIsList(false),
- eFirstType(EDT_UChar)
- {}
+ Property() AI_NO_EXCEPT
+ : eType (EDT_Int)
+ , Semantic()
+ , bIsList(false)
+ , eFirstType(EDT_UChar) {
+ // empty
+ }
//! Data type of the property
EDataType eType;
@@ -259,15 +254,14 @@ public:
* This can e.g. be the vertex declaration. Elements contain a
* well-defined number of properties.
*/
-class Element
-{
+class Element {
public:
-
//! Default constructor
- Element()
- : eSemantic (EEST_INVALID)
- , NumOccur(0)
- {}
+ Element() AI_NO_EXCEPT
+ : eSemantic (EEST_INVALID)
+ , NumOccur(0) {
+ // empty
+ }
//! List of properties assigned to the element
//! std::vector to support operator[]
@@ -303,8 +297,9 @@ class PropertyInstance
public:
//! Default constructor
- PropertyInstance ()
- {}
+ PropertyInstance() AI_NO_EXCEPT {
+ // empty
+ }
union ValueUnion
{
@@ -362,13 +357,13 @@ public:
// ---------------------------------------------------------------------------------
/** \brief Class for an element instance in a PLY file
*/
-class ElementInstance
-{
+class ElementInstance {
public:
-
//! Default constructor
- ElementInstance ()
- {}
+ ElementInstance() AI_NO_EXCEPT
+ : alProperties() {
+ // empty
+ }
//! List of all parsed properties
std::vector< PropertyInstance > alProperties;
@@ -392,8 +387,10 @@ class ElementInstanceList
public:
//! Default constructor
- ElementInstanceList ()
- {}
+ ElementInstanceList() AI_NO_EXCEPT
+ : alInstances() {
+ // empty
+ }
//! List of all element instances
std::vector< ElementInstance > alInstances;
@@ -417,8 +414,11 @@ class DOM
public:
//! Default constructor
- DOM()
- {}
+ DOM() AI_NO_EXCEPT
+ : alElements()
+ , alElementData() {
+
+ }
//! Contains all elements of the file format
diff --git a/code/PolyTools.h b/code/PolyTools.h
index 1089327ae..f43bd9de1 100644
--- a/code/PolyTools.h
+++ b/code/PolyTools.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/PostStepRegistry.cpp b/code/PostStepRegistry.cpp
index c80c373e5..646aeaeb0 100644
--- a/code/PostStepRegistry.cpp
+++ b/code/PostStepRegistry.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -61,6 +62,9 @@ corresponding preprocessor flag to selectively disable steps.
#ifndef ASSIMP_BUILD_NO_TRIANGULATE_PROCESS
# include "TriangulateProcess.h"
#endif
+#ifndef ASSIMP_BUILD_NO_DROPFACENORMALS_PROCESS
+# include "DropFaceNormalsProcess.h"
+#endif
#ifndef ASSIMP_BUILD_NO_GENFACENORMALS_PROCESS
# include "GenFaceNormalsProcess.h"
#endif
@@ -91,6 +95,9 @@ corresponding preprocessor flag to selectively disable steps.
#ifndef ASSIMP_BUILD_NO_REMOVE_REDUNDANTMATERIALS_PROCESS
# include "RemoveRedundantMaterials.h"
#endif
+#if (!defined ASSIMP_BUILD_NO_EMBEDTEXTURES_PROCESS)
+# include "EmbedTexturesProcess.h"
+#endif
#ifndef ASSIMP_BUILD_NO_FINDINVALIDDATA_PROCESS
# include "FindInvalidDataProcess.h"
#endif
@@ -121,6 +128,9 @@ corresponding preprocessor flag to selectively disable steps.
#ifndef ASSIMP_BUILD_NO_DEBONE_PROCESS
# include "DeboneProcess.h"
#endif
+#if (!defined ASSIMP_BUILD_NO_GLOBALSCALE_PROCESS)
+# include "ScaleProcess.h"
+#endif
namespace Assimp {
@@ -132,7 +142,7 @@ void GetPostProcessingStepInstanceList(std::vector< BaseProcess* >& out)
// of sequence it is executed. Steps that are added here are not
// validated - as RegisterPPStep() does - all dependencies must be given.
// ----------------------------------------------------------------------------
- out.reserve(25);
+ out.reserve(31);
#if (!defined ASSIMP_BUILD_NO_MAKELEFTHANDED_PROCESS)
out.push_back( new MakeLeftHandedProcess());
#endif
@@ -148,15 +158,15 @@ void GetPostProcessingStepInstanceList(std::vector< BaseProcess* >& out)
#if (!defined ASSIMP_BUILD_NO_REMOVE_REDUNDANTMATERIALS_PROCESS)
out.push_back( new RemoveRedundantMatsProcess());
#endif
+#if (!defined ASSIMP_BUILD_NO_EMBEDTEXTURES_PROCESS)
+ out.push_back( new EmbedTexturesProcess());
+#endif
#if (!defined ASSIMP_BUILD_NO_FINDINSTANCES_PROCESS)
out.push_back( new FindInstancesProcess());
#endif
#if (!defined ASSIMP_BUILD_NO_OPTIMIZEGRAPH_PROCESS)
out.push_back( new OptimizeGraphProcess());
#endif
-#if (!defined ASSIMP_BUILD_NO_FINDDEGENERATES_PROCESS)
- out.push_back( new FindDegeneratesProcess());
-#endif
#ifndef ASSIMP_BUILD_NO_GENUVCOORDS_PROCESS
out.push_back( new ComputeUVMappingProcess());
#endif
@@ -169,6 +179,12 @@ void GetPostProcessingStepInstanceList(std::vector< BaseProcess* >& out)
#if (!defined ASSIMP_BUILD_NO_TRIANGULATE_PROCESS)
out.push_back( new TriangulateProcess());
#endif
+#if (!defined ASSIMP_BUILD_NO_FINDDEGENERATES_PROCESS)
+ //find degenerates should run after triangulation (to sort out small
+ //generated triangles) but before sort by p types (in case there are lines
+ //and points generated and inserted into a mesh)
+ out.push_back( new FindDegeneratesProcess());
+#endif
#if (!defined ASSIMP_BUILD_NO_SORTBYPTYPE_PROCESS)
out.push_back( new SortByPTypeProcess());
#endif
@@ -188,9 +204,14 @@ void GetPostProcessingStepInstanceList(std::vector< BaseProcess* >& out)
out.push_back( new SplitLargeMeshesProcess_Triangle());
#endif
#if (!defined ASSIMP_BUILD_NO_GENFACENORMALS_PROCESS)
+ out.push_back( new DropFaceNormalsProcess());
+#endif
+#if (!defined ASSIMP_BUILD_NO_GENFACENORMALS_PROCESS)
out.push_back( new GenFaceNormalsProcess());
#endif
-
+#if (!defined ASSIMP_BUILD_NO_GLOBALSCALE_PROCESS)
+ out.push_back( new ScaleProcess());
+#endif
// .........................................................................
// DON'T change the order of these five ..
// XXX this is actually a design weakness that dates back to the time
diff --git a/code/PretransformVertices.cpp b/code/PretransformVertices.cpp
index 1339053f7..9745abd60 100644
--- a/code/PretransformVertices.cpp
+++ b/code/PretransformVertices.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -48,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "PretransformVertices.h"
#include "ProcessHelper.h"
#include <assimp/SceneCombiner.h>
-#include "Exceptional.h"
+#include <assimp/Exceptional.h>
using namespace Assimp;
@@ -59,14 +60,17 @@ using namespace Assimp;
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
PretransformVertices::PretransformVertices()
-: configKeepHierarchy (false), configNormalize(false), configTransform(false), configTransformation()
-{
+: configKeepHierarchy (false)
+, configNormalize(false)
+, configTransform(false)
+, configTransformation()
+, mConfigPointCloud( false ) {
+ // empty
}
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
-PretransformVertices::~PretransformVertices()
-{
+PretransformVertices::~PretransformVertices() {
// nothing to do here
}
@@ -88,6 +92,8 @@ void PretransformVertices::SetupProperties(const Importer* pImp)
configTransform = (0 != pImp->GetPropertyInteger(AI_CONFIG_PP_PTV_ADD_ROOT_TRANSFORMATION,0));
configTransformation = pImp->GetPropertyMatrix(AI_CONFIG_PP_PTV_ROOT_TRANSFORMATION, aiMatrix4x4());
+
+ mConfigPointCloud = pImp->GetPropertyBool(AI_CONFIG_EXPORT_POINT_CLOUDS);
}
// ------------------------------------------------------------------------------------------------
@@ -104,7 +110,7 @@ unsigned int PretransformVertices::CountNodes( aiNode* pcNode )
// ------------------------------------------------------------------------------------------------
// Get a bitwise combination identifying the vertex format of a mesh
-unsigned int PretransformVertices::GetMeshVFormat(aiMesh* pcMesh)
+unsigned int PretransformVertices::GetMeshVFormat( aiMesh* pcMesh )
{
// the vertex format is stored in aiMesh::mBones for later retrieval.
// there isn't a good reason to compute it a few hundred times
@@ -160,6 +166,11 @@ void PretransformVertices::CollectData( aiScene* pcScene, aiNode* pcNode, unsign
unsigned int& num_ref = num_refs[pcNode->mMeshes[i]];
ai_assert(0 != num_ref);
--num_ref;
+ // Save the name of the last mesh
+ if (num_ref==0)
+ {
+ pcMeshOut->mName = pcMesh->mName;
+ }
if (identity) {
// copy positions without modifying them
@@ -385,7 +396,7 @@ void PretransformVertices::BuildWCSMeshes(std::vector<aiMesh*>& out, aiMesh** in
}
if (node->mMeshes[i] < numIn) {
// Worst case. Need to operate on a full copy of the mesh
- DefaultLogger::get()->info("PretransformVertices: Copying mesh due to mismatching transforms");
+ ASSIMP_LOG_INFO("PretransformVertices: Copying mesh due to mismatching transforms");
aiMesh* ntz;
const unsigned int tmp = mesh->mNumBones; //
@@ -435,7 +446,7 @@ void PretransformVertices::BuildMeshRefCountArray(aiNode* nd, unsigned int * ref
// Executes the post processing step on the given imported data.
void PretransformVertices::Execute( aiScene* pScene)
{
- DefaultLogger::get()->debug("PretransformVerticesProcess begin");
+ ASSIMP_LOG_DEBUG("PretransformVerticesProcess begin");
// Return immediately if we have no meshes
if (!pScene->mNumMeshes)
@@ -496,9 +507,7 @@ void PretransformVertices::Execute( aiScene* pScene)
pScene->mMeshes[i]->mBones = NULL;
pScene->mMeshes[i]->mNumBones = 0;
}
- }
- else {
-
+ } else {
apcOutMeshes.reserve(pScene->mNumMaterials<<1u);
std::list<unsigned int> aiVFormats;
@@ -550,7 +559,8 @@ void PretransformVertices::Execute( aiScene* pScene)
}
// If no meshes are referenced in the node graph it is possible that we get no output meshes.
- if (apcOutMeshes.empty()) {
+ if (apcOutMeshes.empty()) {
+
throw DeadlyImportError("No output meshes: all meshes are orphaned and are not referenced by any nodes");
}
else
@@ -626,9 +636,10 @@ void PretransformVertices::Execute( aiScene* pScene)
// now delete all nodes in the scene and build a new
// flat node graph with a root node and some level 1 children
+ aiNode* newRoot = new aiNode();
+ newRoot->mName = pScene->mRootNode->mName;
delete pScene->mRootNode;
- pScene->mRootNode = new aiNode();
- pScene->mRootNode->mName.Set("<dummy_root>");
+ pScene->mRootNode = newRoot;
if (1 == pScene->mNumMeshes && !pScene->mNumLights && !pScene->mNumCameras)
{
@@ -644,9 +655,10 @@ void PretransformVertices::Execute( aiScene* pScene)
// generate mesh nodes
for (unsigned int i = 0; i < pScene->mNumMeshes;++i,++nodes)
{
- aiNode* pcNode = *nodes = new aiNode();
+ aiNode* pcNode = new aiNode();
+ *nodes = pcNode;
pcNode->mParent = pScene->mRootNode;
- pcNode->mName.length = ::ai_snprintf(pcNode->mName.data,MAXLEN,"mesh_%u",i);
+ pcNode->mName = pScene->mMeshes[i]->mName;
// setup mesh indices
pcNode->mNumMeshes = 1;
@@ -656,7 +668,8 @@ void PretransformVertices::Execute( aiScene* pScene)
// generate light nodes
for (unsigned int i = 0; i < pScene->mNumLights;++i,++nodes)
{
- aiNode* pcNode = *nodes = new aiNode();
+ aiNode* pcNode = new aiNode();
+ *nodes = pcNode;
pcNode->mParent = pScene->mRootNode;
pcNode->mName.length = ai_snprintf(pcNode->mName.data, MAXLEN, "light_%u",i);
pScene->mLights[i]->mName = pcNode->mName;
@@ -664,7 +677,8 @@ void PretransformVertices::Execute( aiScene* pScene)
// generate camera nodes
for (unsigned int i = 0; i < pScene->mNumCameras;++i,++nodes)
{
- aiNode* pcNode = *nodes = new aiNode();
+ aiNode* pcNode = new aiNode();
+ *nodes = pcNode;
pcNode->mParent = pScene->mRootNode;
pcNode->mName.length = ::ai_snprintf(pcNode->mName.data,MAXLEN,"cam_%u",i);
pScene->mCameras[i]->mName = pcNode->mName;
@@ -703,22 +717,12 @@ void PretransformVertices::Execute( aiScene* pScene)
}
// print statistics
- if (!DefaultLogger::isNullLogger())
- {
- char buffer[4096];
-
- DefaultLogger::get()->debug("PretransformVerticesProcess finished");
-
- ::ai_snprintf(buffer,4096,"Removed %u nodes and %u animation channels (%u output nodes)",
- iOldNodes,iOldAnimationChannels,CountNodes(pScene->mRootNode));
- DefaultLogger::get()->info(buffer);
-
- ai_snprintf(buffer, 4096,"Kept %u lights and %u cameras",
- pScene->mNumLights,pScene->mNumCameras);
- DefaultLogger::get()->info(buffer);
+ if (!DefaultLogger::isNullLogger()) {
+ ASSIMP_LOG_DEBUG("PretransformVerticesProcess finished");
- ai_snprintf(buffer, 4096,"Moved %u meshes to WCS (number of output meshes: %u)",
- iOldMeshes,pScene->mNumMeshes);
- DefaultLogger::get()->info(buffer);
+ ASSIMP_LOG_INFO_F("Removed ", iOldNodes, " nodes and ", iOldAnimationChannels, " animation channels (",
+ CountNodes(pScene->mRootNode) ," output nodes)" );
+ ASSIMP_LOG_INFO_F("Kept ", pScene->mNumLights, " lights and ", pScene->mNumCameras, " cameras." );
+ ASSIMP_LOG_INFO_F("Moved ", iOldMeshes, " meshes to WCS (number of output meshes: ", pScene->mNumMeshes, ")");
}
}
diff --git a/code/PretransformVertices.h b/code/PretransformVertices.h
index 65b4938b0..a8196289d 100644
--- a/code/PretransformVertices.h
+++ b/code/PretransformVertices.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -60,15 +61,11 @@ namespace Assimp {
* and removes the whole graph. The output is a list of meshes, one for
* each material.
*/
-class ASSIMP_API PretransformVertices : public BaseProcess
-{
+class ASSIMP_API PretransformVertices : public BaseProcess {
public:
-
PretransformVertices ();
~PretransformVertices ();
-public:
-
// -------------------------------------------------------------------
// Check whether step is active
bool IsActive( unsigned int pFlags) const;
@@ -81,7 +78,6 @@ public:
// Setup import settings
void SetupProperties(const Importer* pImp);
-
// -------------------------------------------------------------------
/** @brief Toggle the 'keep hierarchy' option
* @param d hm ... difficult to guess what this means, hu!?
@@ -99,7 +95,6 @@ public:
}
private:
-
// -------------------------------------------------------------------
// Count the number of nodes
unsigned int CountNodes( aiNode* pcNode );
@@ -160,6 +155,7 @@ private:
bool configNormalize;
bool configTransform;
aiMatrix4x4 configTransformation;
+ bool mConfigPointCloud;
};
} // end of namespace Assimp
diff --git a/code/ProcessHelper.cpp b/code/ProcessHelper.cpp
index c255979bd..7f3e4ba72 100644
--- a/code/ProcessHelper.cpp
+++ b/code/ProcessHelper.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -61,7 +62,7 @@ void ConvertListToStrings(const std::string& in, std::list<std::string>& out)
while (*s != '\'') {
++s;
if (*s == '\0') {
- DefaultLogger::get()->error("ConvertListToString: String list is ill-formatted");
+ ASSIMP_LOG_ERROR("ConvertListToString: String list is ill-formatted");
return;
}
}
diff --git a/code/ProcessHelper.h b/code/ProcessHelper.h
index a49115936..dcf71e853 100644
--- a/code/ProcessHelper.h
+++ b/code/ProcessHelper.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -49,9 +50,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/DefaultLogger.hpp>
#include <assimp/scene.h>
-#include "SpatialSort.h"
+#include <assimp/SpatialSort.h>
#include "BaseProcess.h"
-#include "ParsingUtils.h"
+#include <assimp/ParsingUtils.h>
#include <list>
@@ -211,7 +212,7 @@ template <> struct MinMaxChooser<aiVertexWeight> {
// -------------------------------------------------------------------------------
/** @brief Find the min/max values of an array of Ts
* @param in Input array
- * @param size Numebr of elements to process
+ * @param size Number of elements to process
* @param[out] min minimum value
* @param[out] max maximum value
*/
@@ -347,7 +348,7 @@ class ComputeSpatialSortProcess : public BaseProcess
void Execute( aiScene* pScene)
{
typedef std::pair<SpatialSort, ai_real> _Type;
- DefaultLogger::get()->debug("Generate spatially-sorted vertex cache");
+ ASSIMP_LOG_DEBUG("Generate spatially-sorted vertex cache");
std::vector<_Type>* p = new std::vector<_Type>(pScene->mNumMeshes);
std::vector<_Type>::iterator it = p->begin();
diff --git a/code/Q3BSPFileData.h b/code/Q3BSPFileData.h
index b836795f8..d814837c2 100644
--- a/code/Q3BSPFileData.h
+++ b/code/Q3BSPFileData.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -42,7 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define ASSIMP_Q3BSPFILEDATA_H_INC
#include <vector>
-#include <string.h> //memset
+#include <string.h>
#include <string>
namespace Assimp {
@@ -76,25 +77,21 @@ struct sQ3BSPHeader {
};
/// Describes an entry.
-struct sQ3BSPLump
-{
+struct sQ3BSPLump {
int iOffset; ///< Offset from start pointer of file
int iSize; ///< Size of part
};
-struct vec2f
-{
+struct vec2f {
float x,y;
};
-struct vec3f
-{
+struct vec3f {
float x, y, z;
};
/// Vertex of a Q3 level
-struct sQ3BSPVertex
-{
+struct sQ3BSPVertex {
vec3f vPosition; ///< Position of vertex
vec2f vTexCoord; ///< (u,v) Texturecoordinate of detailtexture
vec2f vLightmap; ///< (u,v) Texturecoordinate of lightmap
@@ -103,8 +100,7 @@ struct sQ3BSPVertex
};
/// A face in bsp format info
-struct sQ3BSPFace
-{
+struct sQ3BSPFace {
int iTextureID; ///< Index in texture array
int iEffect; ///< Index in effect array (-1 = no effect)
int iType; ///< 1=Polygon, 2=Patch, 3=Mesh, 4=Billboard
diff --git a/code/Q3BSPFileImporter.cpp b/code/Q3BSPFileImporter.cpp
index 9d6d8e870..58fbef985 100644
--- a/code/Q3BSPFileImporter.cpp
+++ b/code/Q3BSPFileImporter.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -46,6 +47,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "Q3BSPFileParser.h"
#include "Q3BSPFileData.h"
+#include <assimp/DefaultLogger.hpp>
+
#ifdef ASSIMP_BUILD_NO_OWN_ZLIB
# include <zlib.h>
#else
@@ -60,7 +63,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/importerdesc.h>
#include <vector>
#include <sstream>
-#include "StringComparison.h"
+#include <assimp/StringComparison.h>
static const aiImporterDesc desc = {
"Quake III BSP Importer",
@@ -81,39 +84,39 @@ using namespace Q3BSP;
// ------------------------------------------------------------------------------------------------
// Local function to create a material key name.
-static void createKey( int id1, int id2, std::string &rKey )
-{
+static void createKey( int id1, int id2, std::string &key ) {
std::ostringstream str;
str << id1 << "." << id2;
- rKey = str.str();
+ key = str.str();
}
// ------------------------------------------------------------------------------------------------
// Local function to extract the texture ids from a material key-name.
-static void extractIds( const std::string &rKey, int &rId1, int &rId2 )
-{
- rId1 = -1;
- rId2 = -1;
- if ( rKey.empty() )
+static void extractIds( const std::string &key, int &id1, int &id2 ) {
+ id1 = -1;
+ id2 = -1;
+ if (key.empty()) {
return;
+ }
- std::string::size_type pos = rKey.find( "." );
- if ( std::string::npos == pos )
+ const std::string::size_type pos = key.find( "." );
+ if (std::string::npos == pos) {
return;
+ }
- std::string tmp1 = rKey.substr( 0, pos );
- std::string tmp2 = rKey.substr( pos + 1, rKey.size() - pos - 1 );
- rId1 = atoi( tmp1.c_str() );
- rId2 = atoi( tmp2.c_str() );
+ std::string tmp1 = key.substr( 0, pos );
+ std::string tmp2 = key.substr( pos + 1, key.size() - pos - 1 );
+ id1 = atoi( tmp1.c_str() );
+ id2 = atoi( tmp2.c_str() );
}
// ------------------------------------------------------------------------------------------------
// Local helper function to normalize filenames.
-static void normalizePathName( const std::string &rPath, std::string &rNormalizedPath )
-{
- rNormalizedPath = "";
- if ( rPath.empty() )
+static void normalizePathName( const std::string &rPath, std::string &normalizedPath ) {
+ normalizedPath = "";
+ if (rPath.empty()) {
return;
+ }
#ifdef _WIN32
std::string sep = "\\";
@@ -123,14 +126,11 @@ static void normalizePathName( const std::string &rPath, std::string &rNormalize
static const unsigned int numDelimiters = 2;
const char delimiters[ numDelimiters ] = { '/', '\\' };
- rNormalizedPath = rPath;
- for (const char delimiter : delimiters)
- {
- for ( size_t j=0; j<rNormalizedPath.size(); j++ )
- {
- if ( rNormalizedPath[j] == delimiter )
- {
- rNormalizedPath[ j ] = sep[ 0 ];
+ normalizedPath = rPath;
+ for (const char delimiter : delimiters) {
+ for ( size_t j=0; j<normalizedPath.size(); ++j ) {
+ if ( normalizedPath[j] == delimiter ) {
+ normalizedPath[ j ] = sep[ 0 ];
}
}
}
@@ -138,20 +138,19 @@ static void normalizePathName( const std::string &rPath, std::string &rNormalize
// ------------------------------------------------------------------------------------------------
// Constructor.
-Q3BSPFileImporter::Q3BSPFileImporter() :
- m_pCurrentMesh( NULL ),
- m_pCurrentFace( NULL ),
- m_MaterialLookupMap(),
- mTextures()
-{
+Q3BSPFileImporter::Q3BSPFileImporter()
+: m_pCurrentMesh( nullptr )
+, m_pCurrentFace(nullptr)
+, m_MaterialLookupMap()
+, mTextures() {
// empty
}
// ------------------------------------------------------------------------------------------------
// Destructor.
Q3BSPFileImporter::~Q3BSPFileImporter() {
- m_pCurrentMesh = NULL;
- m_pCurrentFace = NULL;
+ m_pCurrentMesh = nullptr;
+ m_pCurrentFace = nullptr;
// Clear face-to-material map
for ( FaceMap::iterator it = m_MaterialLookupMap.begin(); it != m_MaterialLookupMap.end(); ++it ) {
@@ -165,92 +164,80 @@ Q3BSPFileImporter::~Q3BSPFileImporter() {
// ------------------------------------------------------------------------------------------------
// Returns true, if the loader can read this.
-bool Q3BSPFileImporter::CanRead( const std::string& rFile, IOSystem* /*pIOHandler*/, bool checkSig ) const
-{
+bool Q3BSPFileImporter::CanRead( const std::string& rFile, IOSystem* /*pIOHandler*/, bool checkSig ) const {
if(!checkSig) {
return SimpleExtensionCheck( rFile, "pk3", "bsp" );
}
- // TODO perhaps add keyword based detection
+
return false;
}
// ------------------------------------------------------------------------------------------------
// Adds extensions.
-const aiImporterDesc* Q3BSPFileImporter::GetInfo () const
-{
+const aiImporterDesc* Q3BSPFileImporter::GetInfo () const {
return &desc;
}
// ------------------------------------------------------------------------------------------------
// Import method.
-void Q3BSPFileImporter::InternReadFile(const std::string &rFile, aiScene* pScene, IOSystem* pIOHandler)
-{
- Q3BSPZipArchive Archive( pIOHandler, rFile );
- if ( !Archive.isOpen() )
- {
+void Q3BSPFileImporter::InternReadFile(const std::string &rFile, aiScene* scene, IOSystem* ioHandler) {
+ Q3BSPZipArchive Archive( ioHandler, rFile );
+ if ( !Archive.isOpen() ) {
throw DeadlyImportError( "Failed to open file " + rFile + "." );
}
std::string archiveName( "" ), mapName( "" );
separateMapName( rFile, archiveName, mapName );
- if ( mapName.empty() )
- {
- if ( !findFirstMapInArchive( Archive, mapName ) )
- {
+ if ( mapName.empty() ) {
+ if ( !findFirstMapInArchive( Archive, mapName ) ) {
return;
}
}
Q3BSPFileParser fileParser( mapName, &Archive );
Q3BSPModel *pBSPModel = fileParser.getModel();
- if ( NULL != pBSPModel )
- {
- CreateDataFromImport( pBSPModel, pScene, &Archive );
+ if ( nullptr != pBSPModel ) {
+ CreateDataFromImport( pBSPModel, scene, &Archive );
}
}
// ------------------------------------------------------------------------------------------------
// Separates the map name from the import name.
-void Q3BSPFileImporter::separateMapName( const std::string &rImportName, std::string &rArchiveName,
- std::string &rMapName )
-{
- rArchiveName = "";
- rMapName = "";
- if ( rImportName.empty() )
+void Q3BSPFileImporter::separateMapName( const std::string &importName, std::string &archiveName, std::string &mapName ) {
+ archiveName = "";
+ mapName = "";
+ if (importName.empty()) {
return;
+ }
- std::string::size_type pos = rImportName.rfind( "," );
- if ( std::string::npos == pos )
- {
- rArchiveName = rImportName;
+ const std::string::size_type pos = importName.rfind( "," );
+ if ( std::string::npos == pos ) {
+ archiveName = importName;
return;
}
- rArchiveName = rImportName.substr( 0, pos );
- rMapName = rImportName.substr( pos, rImportName.size() - pos - 1 );
+ archiveName = importName.substr( 0, pos );
+ mapName = importName.substr( pos, importName.size() - pos - 1 );
}
// ------------------------------------------------------------------------------------------------
// Returns the first map in the map archive.
-bool Q3BSPFileImporter::findFirstMapInArchive( Q3BSPZipArchive &rArchive, std::string &rMapName )
-{
- rMapName = "";
+bool Q3BSPFileImporter::findFirstMapInArchive( Q3BSPZipArchive &bspArchive, std::string &mapName ) {
+ mapName = "";
std::vector<std::string> fileList;
- rArchive.getFileList( fileList );
- if ( fileList.empty() )
+ bspArchive.getFileList( fileList );
+ if (fileList.empty()) {
return false;
+ }
- for ( std::vector<std::string>::iterator it = fileList.begin(); it != fileList.end();
- ++it )
- {
- std::string::size_type pos = (*it).find( "maps/" );
- if ( std::string::npos != pos )
- {
+ std::vector<std::string>::iterator it( fileList.begin() );
+ for ( ; it != fileList.end(); ++it ) {
+ const std::string::size_type pos = (*it).find( "maps/" );
+ if ( std::string::npos != pos ) {
std::string::size_type extPos = (*it).find( ".bsp" );
- if ( std::string::npos != extPos )
- {
- rMapName = *it;
+ if ( std::string::npos != extPos ) {
+ mapName = *it;
return true;
}
}
@@ -262,14 +249,13 @@ bool Q3BSPFileImporter::findFirstMapInArchive( Q3BSPZipArchive &rArchive, std::s
// ------------------------------------------------------------------------------------------------
// Creates the assimp specific data.
void Q3BSPFileImporter::CreateDataFromImport( const Q3BSP::Q3BSPModel *pModel, aiScene* pScene,
- Q3BSPZipArchive *pArchive )
-{
- if ( NULL == pModel || NULL == pScene )
+ Q3BSPZipArchive *pArchive ) {
+ if (nullptr == pModel || nullptr == pScene) {
return;
+ }
pScene->mRootNode = new aiNode;
- if ( !pModel->m_ModelName.empty() )
- {
+ if ( !pModel->m_ModelName.empty() ) {
pScene->mRootNode->mName.Set( pModel->m_ModelName );
}
@@ -286,47 +272,34 @@ void Q3BSPFileImporter::CreateDataFromImport( const Q3BSP::Q3BSPModel *pModel, a
// ------------------------------------------------------------------------------------------------
// Creates all assimp nodes.
void Q3BSPFileImporter::CreateNodes( const Q3BSP::Q3BSPModel *pModel, aiScene* pScene,
- aiNode *pParent )
-{
- ai_assert( NULL != pModel );
- if ( NULL == pModel )
- {
+ aiNode *pParent ) {
+ if ( nullptr == pModel ) {
return;
}
- unsigned int matIdx = 0;
+ unsigned int matIdx( 0 );
std::vector<aiMesh*> MeshArray;
std::vector<aiNode*> NodeArray;
- for ( FaceMapIt it = m_MaterialLookupMap.begin(); it != m_MaterialLookupMap.end(); ++it )
- {
+ for ( FaceMapIt it = m_MaterialLookupMap.begin(); it != m_MaterialLookupMap.end(); ++it ) {
std::vector<Q3BSP::sQ3BSPFace*> *pArray = (*it).second;
size_t numVerts = countData( *pArray );
- if ( 0 != numVerts )
- {
- aiMesh* pMesh = new aiMesh;
- aiNode *pNode = CreateTopology( pModel, matIdx, *pArray, pMesh );
- if ( NULL != pNode )
- {
+ if ( 0 != numVerts ) {
+ aiMesh *pMesh( nullptr );
+ aiNode *pNode = CreateTopology( pModel, matIdx, *pArray, &pMesh );
+ if ( nullptr != pNode ) {
NodeArray.push_back( pNode );
MeshArray.push_back( pMesh );
}
- else
- {
- delete pMesh;
- }
}
matIdx++;
}
pScene->mNumMeshes = static_cast<unsigned int>( MeshArray.size() );
- if ( pScene->mNumMeshes > 0 )
- {
+ if ( pScene->mNumMeshes > 0 ) {
pScene->mMeshes = new aiMesh*[ pScene->mNumMeshes ];
- for ( size_t i = 0; i < MeshArray.size(); i++ )
- {
+ for ( size_t i = 0; i < MeshArray.size(); i++ ) {
aiMesh *pMesh = MeshArray[ i ];
- if ( NULL != pMesh )
- {
+ if ( nullptr != pMesh ) {
pScene->mMeshes[ i ] = pMesh;
}
}
@@ -334,8 +307,7 @@ void Q3BSPFileImporter::CreateNodes( const Q3BSP::Q3BSPModel *pModel, aiScene* p
pParent->mNumChildren = static_cast<unsigned int>(MeshArray.size());
pParent->mChildren = new aiNode*[ pScene->mRootNode->mNumChildren ];
- for ( size_t i=0; i<NodeArray.size(); i++ )
- {
+ for ( size_t i=0; i<NodeArray.size(); i++ ) {
aiNode *pNode = NodeArray[ i ];
pNode->mParent = pParent;
pParent->mChildren[ i ] = pNode;
@@ -345,54 +317,46 @@ void Q3BSPFileImporter::CreateNodes( const Q3BSP::Q3BSPModel *pModel, aiScene* p
// ------------------------------------------------------------------------------------------------
// Creates the topology.
-aiNode *Q3BSPFileImporter::CreateTopology( const Q3BSP::Q3BSPModel *pModel,
- unsigned int materialIdx,
- std::vector<sQ3BSPFace*> &rArray,
- aiMesh* pMesh )
-{
+aiNode *Q3BSPFileImporter::CreateTopology( const Q3BSP::Q3BSPModel *pModel, unsigned int materialIdx,
+ std::vector<sQ3BSPFace*> &rArray, aiMesh **pMesh ) {
size_t numVerts = countData( rArray );
- if ( 0 == numVerts )
- {
- return NULL;
+ if ( 0 == numVerts ) {
+ return nullptr;
}
size_t numFaces = countFaces( rArray );
- if ( 0 == numFaces )
- {
- return NULL;
+ if ( 0 == numFaces ) {
+ return nullptr;
}
+ aiMesh *mesh = new aiMesh;
size_t numTriangles = countTriangles( rArray );
- pMesh->mPrimitiveTypes = aiPrimitiveType_TRIANGLE;
+ mesh->mPrimitiveTypes = aiPrimitiveType_TRIANGLE;
- pMesh->mFaces = new aiFace[ numTriangles ];
- pMesh->mNumFaces = static_cast<unsigned int>(numTriangles);
+ mesh->mFaces = new aiFace[ numTriangles ];
+ mesh->mNumFaces = static_cast<unsigned int>(numTriangles);
- pMesh->mNumVertices = static_cast<unsigned int>(numVerts);
- pMesh->mVertices = new aiVector3D[ numVerts ];
- pMesh->mNormals = new aiVector3D[ numVerts ];
- pMesh->mTextureCoords[ 0 ] = new aiVector3D[ numVerts ];
- pMesh->mTextureCoords[ 1 ] = new aiVector3D[ numVerts ];
- pMesh->mMaterialIndex = materialIdx;
+ mesh->mNumVertices = static_cast<unsigned int>(numVerts);
+ mesh->mVertices = new aiVector3D[ numVerts ];
+ mesh->mNormals = new aiVector3D[ numVerts ];
+ mesh->mTextureCoords[ 0 ] = new aiVector3D[ numVerts ];
+ mesh->mTextureCoords[ 1 ] = new aiVector3D[ numVerts ];
+ mesh->mMaterialIndex = materialIdx;
unsigned int faceIdx = 0;
unsigned int vertIdx = 0;
- pMesh->mNumUVComponents[ 0 ] = 2;
- pMesh->mNumUVComponents[ 1 ] = 2;
- for ( std::vector<sQ3BSPFace*>::const_iterator it = rArray.begin(); it != rArray.end(); ++it )
- {
+ mesh->mNumUVComponents[ 0 ] = 2;
+ mesh->mNumUVComponents[ 1 ] = 2;
+ for ( std::vector<sQ3BSPFace*>::const_iterator it = rArray.begin(); it != rArray.end(); ++it ) {
Q3BSP::sQ3BSPFace *pQ3BSPFace = *it;
ai_assert( NULL != pQ3BSPFace );
- if ( NULL == pQ3BSPFace )
- {
+ if ( nullptr == pQ3BSPFace ) {
continue;
}
- if ( pQ3BSPFace->iNumOfFaceVerts > 0 )
- {
- if ( pQ3BSPFace->iType == Polygon || pQ3BSPFace->iType == TriangleMesh )
- {
- createTriangleTopology( pModel, pQ3BSPFace, pMesh, faceIdx, vertIdx );
+ if ( pQ3BSPFace->iNumOfFaceVerts > 0 ) {
+ if ( pQ3BSPFace->iType == Polygon || pQ3BSPFace->iType == TriangleMesh ) {
+ createTriangleTopology( pModel, pQ3BSPFace, mesh, faceIdx, vertIdx );
}
}
}
@@ -400,78 +364,63 @@ aiNode *Q3BSPFileImporter::CreateTopology( const Q3BSP::Q3BSPModel *pModel,
aiNode *pNode = new aiNode;
pNode->mNumMeshes = 1;
pNode->mMeshes = new unsigned int[ 1 ];
+ *pMesh = mesh;
return pNode;
}
// ------------------------------------------------------------------------------------------------
// Creates the triangle topology from a face array.
-void Q3BSPFileImporter::createTriangleTopology( const Q3BSP::Q3BSPModel *pModel,
- Q3BSP::sQ3BSPFace *pQ3BSPFace,
- aiMesh* pMesh,
- unsigned int &rFaceIdx,
- unsigned int &rVertIdx )
-{
- ai_assert( rFaceIdx < pMesh->mNumFaces );
+void Q3BSPFileImporter::createTriangleTopology( const Q3BSP::Q3BSPModel *pModel, sQ3BSPFace *pQ3BSPFace,
+ aiMesh* pMesh, unsigned int &faceIdx, unsigned int &vertIdx ) {
+ ai_assert( faceIdx < pMesh->mNumFaces );
- m_pCurrentFace = getNextFace( pMesh, rFaceIdx );
- ai_assert( NULL != m_pCurrentFace );
- if ( NULL == m_pCurrentFace )
- {
+ m_pCurrentFace = getNextFace( pMesh, faceIdx );
+ if ( nullptr == m_pCurrentFace ) {
return;
}
m_pCurrentFace->mNumIndices = 3;
m_pCurrentFace->mIndices = new unsigned int[ m_pCurrentFace->mNumIndices ];
- size_t idx = 0;
- for ( size_t i = 0; i < (size_t) pQ3BSPFace->iNumOfFaceVerts; i++ )
- {
+ size_t idx( 0 );
+ for ( size_t i = 0; i < (size_t) pQ3BSPFace->iNumOfFaceVerts; ++i ) {
const size_t index = pQ3BSPFace->iVertexIndex + pModel->m_Indices[ pQ3BSPFace->iFaceVertexIndex + i ];
- ai_assert( index < pModel->m_Vertices.size() );
- if ( index >= pModel->m_Vertices.size() )
- {
+ if ( index >= pModel->m_Vertices.size() ) {
continue;
}
sQ3BSPVertex *pVertex = pModel->m_Vertices[ index ];
- ai_assert( NULL != pVertex );
- if ( NULL == pVertex )
- {
+ if ( nullptr == pVertex ) {
continue;
}
+ if (idx > 2) {
+ idx = 0;
+ m_pCurrentFace = getNextFace(pMesh, faceIdx);
+ if (nullptr != m_pCurrentFace) {
+ m_pCurrentFace->mNumIndices = 3;
+ m_pCurrentFace->mIndices = new unsigned int[3];
+ }
+ }
- pMesh->mVertices[ rVertIdx ].Set( pVertex->vPosition.x, pVertex->vPosition.y, pVertex->vPosition.z );
- pMesh->mNormals[ rVertIdx ].Set( pVertex->vNormal.x, pVertex->vNormal.y, pVertex->vNormal.z );
+ pMesh->mVertices[ vertIdx ].Set( pVertex->vPosition.x, pVertex->vPosition.y, pVertex->vPosition.z );
+ pMesh->mNormals[ vertIdx ].Set( pVertex->vNormal.x, pVertex->vNormal.y, pVertex->vNormal.z );
- pMesh->mTextureCoords[ 0 ][ rVertIdx ].Set( pVertex->vTexCoord.x, pVertex->vTexCoord.y, 0.0f );
- pMesh->mTextureCoords[ 1 ][ rVertIdx ].Set( pVertex->vLightmap.x, pVertex->vLightmap.y, 0.0f );
+ pMesh->mTextureCoords[ 0 ][ vertIdx ].Set( pVertex->vTexCoord.x, pVertex->vTexCoord.y, 0.0f );
+ pMesh->mTextureCoords[ 1 ][ vertIdx ].Set( pVertex->vLightmap.x, pVertex->vLightmap.y, 0.0f );
- m_pCurrentFace->mIndices[ idx ] = rVertIdx;
- rVertIdx++;
+ m_pCurrentFace->mIndices[ idx ] = vertIdx;
+ vertIdx++;
idx++;
- if ( idx > 2 )
- {
- idx = 0;
- m_pCurrentFace = getNextFace( pMesh, rFaceIdx );
- if ( NULL != m_pCurrentFace )
- {
- m_pCurrentFace->mNumIndices = 3;
- m_pCurrentFace->mIndices = new unsigned int[ 3 ];
- }
- }
}
- rFaceIdx--;
}
// ------------------------------------------------------------------------------------------------
// Creates all referenced materials.
void Q3BSPFileImporter::createMaterials( const Q3BSP::Q3BSPModel *pModel, aiScene* pScene,
- Q3BSPZipArchive *pArchive )
-{
- if ( m_MaterialLookupMap.empty() )
- {
+ Q3BSPZipArchive *pArchive ) {
+ if ( m_MaterialLookupMap.empty() ) {
return;
}
@@ -479,11 +428,9 @@ void Q3BSPFileImporter::createMaterials( const Q3BSP::Q3BSPModel *pModel, aiScen
aiString aiMatName;
int textureId( -1 ), lightmapId( -1 );
for ( FaceMapIt it = m_MaterialLookupMap.begin(); it != m_MaterialLookupMap.end();
- ++it )
- {
- const std::string matName = (*it).first;
- if ( matName.empty() )
- {
+ ++it ) {
+ const std::string matName( it->first );
+ if ( matName.empty() ) {
continue;
}
@@ -494,18 +441,16 @@ void Q3BSPFileImporter::createMaterials( const Q3BSP::Q3BSPModel *pModel, aiScen
extractIds( matName, textureId, lightmapId );
// Adding the texture
- if ( -1 != textureId )
- {
+ if ( -1 != textureId ) {
sQ3BSPTexture *pTexture = pModel->m_Textures[ textureId ];
- if ( NULL != pTexture )
- {
+ if ( nullptr != pTexture ) {
std::string tmp( "*" ), texName( "" );
tmp += pTexture->strName;
tmp += ".jpg";
normalizePathName( tmp, texName );
- if ( !importTextureFromArchive( pModel, pArchive, pScene, pMatHelper, textureId ) )
- {
+ if ( !importTextureFromArchive( pModel, pArchive, pScene, pMatHelper, textureId ) ) {
+ ASSIMP_LOG_ERROR("Cannot import texture from archive " + texName);
}
}
@@ -524,17 +469,16 @@ void Q3BSPFileImporter::createMaterials( const Q3BSP::Q3BSPModel *pModel, aiScen
// ------------------------------------------------------------------------------------------------
// Counts the number of referenced vertices.
-size_t Q3BSPFileImporter::countData( const std::vector<sQ3BSPFace*> &rArray ) const
-{
- size_t numVerts = 0;
- for ( std::vector<sQ3BSPFace*>::const_iterator it = rArray.begin(); it != rArray.end();
+size_t Q3BSPFileImporter::countData( const std::vector<sQ3BSPFace*> &faceArray ) const {
+ size_t numVerts( 0 );
+ for ( std::vector<sQ3BSPFace*>::const_iterator it = faceArray.begin(); it != faceArray.end();
++it )
{
sQ3BSPFace *pQ3BSPFace = *it;
if ( pQ3BSPFace->iType == Polygon || pQ3BSPFace->iType == TriangleMesh )
{
Q3BSP::sQ3BSPFace *pQ3BSPFace = *it;
- ai_assert( NULL != pQ3BSPFace );
+ ai_assert( nullptr != pQ3BSPFace );
numVerts += pQ3BSPFace->iNumOfFaceVerts;
}
}
@@ -580,8 +524,7 @@ size_t Q3BSPFileImporter::countTriangles( const std::vector<Q3BSP::sQ3BSPFace*>
// ------------------------------------------------------------------------------------------------
// Creates the faces-to-material map.
-void Q3BSPFileImporter::createMaterialMap( const Q3BSP::Q3BSPModel *pModel )
-{
+void Q3BSPFileImporter::createMaterialMap( const Q3BSP::Q3BSPModel *pModel ) {
std::string key( "" );
std::vector<sQ3BSPFace*> *pCurFaceArray = NULL;
for ( size_t idx = 0; idx < pModel->m_Faces.size(); idx++ )
@@ -591,8 +534,7 @@ void Q3BSPFileImporter::createMaterialMap( const Q3BSP::Q3BSPModel *pModel )
const int lightMapId = pQ3BSPFace->iLightmapID;
createKey( texId, lightMapId, key );
FaceMapIt it = m_MaterialLookupMap.find( key );
- if ( m_MaterialLookupMap.end() == it )
- {
+ if ( m_MaterialLookupMap.end() == it ) {
pCurFaceArray = new std::vector<Q3BSP::sQ3BSPFace*>;
m_MaterialLookupMap[ key ] = pCurFaceArray;
}
@@ -600,8 +542,8 @@ void Q3BSPFileImporter::createMaterialMap( const Q3BSP::Q3BSPModel *pModel )
{
pCurFaceArray = (*it).second;
}
- ai_assert( NULL != pCurFaceArray );
- if ( NULL != pCurFaceArray )
+ ai_assert( nullptr != pCurFaceArray );
+ if (nullptr != pCurFaceArray )
{
pCurFaceArray->push_back( pQ3BSPFace );
}
@@ -610,32 +552,31 @@ void Q3BSPFileImporter::createMaterialMap( const Q3BSP::Q3BSPModel *pModel )
// ------------------------------------------------------------------------------------------------
// Returns the next face.
-aiFace *Q3BSPFileImporter::getNextFace( aiMesh *pMesh, unsigned int &rFaceIdx )
-{
- aiFace *pFace( NULL );
- if ( rFaceIdx < pMesh->mNumFaces ) {
- pFace = &pMesh->mFaces[ rFaceIdx ];
- rFaceIdx++;
+aiFace *Q3BSPFileImporter::getNextFace( aiMesh *mesh, unsigned int &faceIdx ) {
+ aiFace *face( nullptr );
+ if ( faceIdx < mesh->mNumFaces ) {
+ face = &mesh->mFaces[ faceIdx ];
+ ++faceIdx;
}
- return pFace;
+ return face;
}
// ------------------------------------------------------------------------------------------------
// Imports a texture file.
-bool Q3BSPFileImporter::importTextureFromArchive( const Q3BSP::Q3BSPModel *pModel,
- Q3BSP::Q3BSPZipArchive *pArchive, aiScene*,
+bool Q3BSPFileImporter::importTextureFromArchive( const Q3BSP::Q3BSPModel *model,
+ Q3BSP::Q3BSPZipArchive *archive, aiScene*,
aiMaterial *pMatHelper, int textureId ) {
- if ( NULL == pArchive || NULL == pMatHelper ) {
+ if (nullptr == archive || nullptr == pMatHelper ) {
return false;
}
- if ( textureId < 0 || textureId >= static_cast<int>( pModel->m_Textures.size() ) ) {
+ if ( textureId < 0 || textureId >= static_cast<int>( model->m_Textures.size() ) ) {
return false;
}
bool res = true;
- sQ3BSPTexture *pTexture = pModel->m_Textures[ textureId ];
+ sQ3BSPTexture *pTexture = model->m_Textures[ textureId ];
if ( !pTexture ) {
return false;
}
@@ -645,8 +586,8 @@ bool Q3BSPFileImporter::importTextureFromArchive( const Q3BSP::Q3BSPModel *pMode
supportedExtensions.push_back( ".png" );
supportedExtensions.push_back( ".tga" );
std::string textureName, ext;
- if ( expandFile( pArchive, pTexture->strName, supportedExtensions, textureName, ext ) ) {
- IOStream *pTextureStream = pArchive->Open( textureName.c_str() );
+ if ( expandFile( archive, pTexture->strName, supportedExtensions, textureName, ext ) ) {
+ IOStream *pTextureStream = archive->Open( textureName.c_str() );
if ( pTextureStream ) {
size_t texSize = pTextureStream->FileSize();
aiTexture *pTexture = new aiTexture;
@@ -667,7 +608,7 @@ bool Q3BSPFileImporter::importTextureFromArchive( const Q3BSP::Q3BSPModel *pMode
name.data[ 0 ] = '*';
name.length = 1 + ASSIMP_itoa10( name.data + 1, static_cast<unsigned int>(MAXLEN-1), static_cast<int32_t>(mTextures.size()) );
- pArchive->Close( pTextureStream );
+ archive->Close( pTextureStream );
pMatHelper->AddProperty( &name, AI_MATKEY_TEXTURE_DIFFUSE( 0 ) );
mTextures.push_back( pTexture );
@@ -689,19 +630,16 @@ bool Q3BSPFileImporter::importTextureFromArchive( const Q3BSP::Q3BSPModel *pMode
bool Q3BSPFileImporter::importLightmap( const Q3BSP::Q3BSPModel *pModel, aiScene* pScene,
aiMaterial *pMatHelper, int lightmapId )
{
- if ( NULL == pModel || NULL == pScene || NULL == pMatHelper )
- {
+ if (nullptr == pModel || nullptr == pScene || nullptr == pMatHelper ) {
return false;
}
- if ( lightmapId < 0 || lightmapId >= static_cast<int>( pModel->m_Lightmaps.size() ) )
- {
+ if ( lightmapId < 0 || lightmapId >= static_cast<int>( pModel->m_Lightmaps.size() ) ) {
return false;
}
sQ3BSPLightmap *pLightMap = pModel->m_Lightmaps[ lightmapId ];
- if ( NULL == pLightMap )
- {
+ if (nullptr == pLightMap ) {
return false;
}
@@ -713,8 +651,7 @@ bool Q3BSPFileImporter::importLightmap( const Q3BSP::Q3BSPModel *pModel, aiScene
::memcpy( pTexture->pcData, pLightMap->bLMapData, pTexture->mWidth );
size_t p = 0;
- for ( size_t i = 0; i < CE_BSP_LIGHTMAPWIDTH * CE_BSP_LIGHTMAPHEIGHT; ++i )
- {
+ for ( size_t i = 0; i < CE_BSP_LIGHTMAPWIDTH * CE_BSP_LIGHTMAPHEIGHT; ++i ) {
pTexture->pcData[ i ].r = pLightMap->bLMapData[ p++ ];
pTexture->pcData[ i ].g = pLightMap->bLMapData[ p++ ];
pTexture->pcData[ i ].b = pLightMap->bLMapData[ p++ ];
@@ -731,7 +668,6 @@ bool Q3BSPFileImporter::importLightmap( const Q3BSP::Q3BSPModel *pModel, aiScene
return true;
}
-
// ------------------------------------------------------------------------------------------------
// Will search for a supported extension.
bool Q3BSPFileImporter::expandFile( Q3BSP::Q3BSPZipArchive *pArchive, const std::string &rFilename,
diff --git a/code/Q3BSPFileImporter.h b/code/Q3BSPFileImporter.h
index cf53d4db0..5f3e31157 100644
--- a/code/Q3BSPFileImporter.h
+++ b/code/Q3BSPFileImporter.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -41,9 +42,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_Q3BSPFILEIMPORTER_H_INC
#define ASSIMP_Q3BSPFILEIMPORTER_H_INC
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
#include <map>
+#include <string>
struct aiMesh;
struct aiNode;
@@ -52,6 +54,7 @@ struct aiMaterial;
struct aiTexture;
namespace Assimp {
+
namespace Q3BSP {
class Q3BSPZipArchive;
struct Q3BSPModel;
@@ -70,12 +73,11 @@ public:
/// @brief Destructor.
~Q3BSPFileImporter();
-public:
/// @brief Returns whether the class can handle the format of the given file.
/// @remark See BaseImporter::CanRead() for details.
bool CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig ) const;
-private:
+protected:
typedef std::map<std::string, std::vector<Q3BSP::sQ3BSPFace*>*> FaceMap;
typedef std::map<std::string, std::vector<Q3BSP::sQ3BSPFace*>* >::iterator FaceMapIt;
typedef std::map<std::string, std::vector<Q3BSP::sQ3BSPFace*>*>::const_iterator FaceMapConstIt;
@@ -87,7 +89,7 @@ private:
void CreateDataFromImport( const Q3BSP::Q3BSPModel *pModel, aiScene* pScene, Q3BSP::Q3BSPZipArchive *pArchive );
void CreateNodes( const Q3BSP::Q3BSPModel *pModel, aiScene* pScene, aiNode *pParent );
aiNode *CreateTopology( const Q3BSP::Q3BSPModel *pModel, unsigned int materialIdx,
- std::vector<Q3BSP::sQ3BSPFace*> &rArray, aiMesh* pMesh );
+ std::vector<Q3BSP::sQ3BSPFace*> &rArray, aiMesh **pMesh );
void createTriangleTopology( const Q3BSP::Q3BSPModel *pModel, Q3BSP::sQ3BSPFace *pQ3BSPFace, aiMesh* pMesh, unsigned int &rFaceIdx,
unsigned int &rVertIdx );
void createMaterials( const Q3BSP::Q3BSPModel *pModel, aiScene* pScene, Q3BSP::Q3BSPZipArchive *pArchive );
@@ -114,5 +116,4 @@ private:
} // Namespace Assimp
-
#endif // ASSIMP_Q3BSPFILEIMPORTER_H_INC
diff --git a/code/Q3BSPFileParser.cpp b/code/Q3BSPFileParser.cpp
index 69721fc2d..f7038adeb 100644
--- a/code/Q3BSPFileParser.cpp
+++ b/code/Q3BSPFileParser.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -54,56 +55,51 @@ namespace Assimp {
using namespace Q3BSP;
// ------------------------------------------------------------------------------------------------
-Q3BSPFileParser::Q3BSPFileParser( const std::string &rMapName, Q3BSPZipArchive *pZipArchive ) :
+Q3BSPFileParser::Q3BSPFileParser( const std::string &mapName, Q3BSPZipArchive *pZipArchive ) :
m_sOffset( 0 ),
m_Data(),
- m_pModel( NULL ),
+ m_pModel(nullptr),
m_pZipArchive( pZipArchive )
{
- ai_assert( NULL != m_pZipArchive );
- ai_assert( !rMapName.empty() );
+ ai_assert(nullptr != m_pZipArchive );
+ ai_assert( !mapName.empty() );
- if ( !readData( rMapName ) )
+ if ( !readData( mapName ) )
return;
m_pModel = new Q3BSPModel;
- m_pModel->m_ModelName = rMapName;
- if ( !parseFile() )
- {
+ m_pModel->m_ModelName = mapName;
+ if ( !parseFile() ) {
delete m_pModel;
- m_pModel = NULL;
+ m_pModel = nullptr;
}
}
// ------------------------------------------------------------------------------------------------
-Q3BSPFileParser::~Q3BSPFileParser()
-{
+Q3BSPFileParser::~Q3BSPFileParser() {
delete m_pModel;
- m_pModel = NULL;
+ m_pModel = nullptr;
}
// ------------------------------------------------------------------------------------------------
-Q3BSP::Q3BSPModel *Q3BSPFileParser::getModel() const
-{
+Q3BSP::Q3BSPModel *Q3BSPFileParser::getModel() const {
return m_pModel;
}
// ------------------------------------------------------------------------------------------------
-bool Q3BSPFileParser::readData( const std::string &rMapName )
-{
+bool Q3BSPFileParser::readData( const std::string &rMapName ) {
if ( !m_pZipArchive->Exists( rMapName.c_str() ) )
return false;
IOStream *pMapFile = m_pZipArchive->Open( rMapName.c_str() );
- if ( NULL == pMapFile )
+ if ( nullptr == pMapFile )
return false;
const size_t size = pMapFile->FileSize();
m_Data.resize( size );
const size_t readSize = pMapFile->Read( &m_Data[0], sizeof( char ), size );
- if ( readSize != size )
- {
+ if ( readSize != size ) {
m_Data.clear();
return false;
}
@@ -113,10 +109,8 @@ bool Q3BSPFileParser::readData( const std::string &rMapName )
}
// ------------------------------------------------------------------------------------------------
-bool Q3BSPFileParser::parseFile()
-{
- if ( m_Data.empty() )
- {
+bool Q3BSPFileParser::parseFile() {
+ if ( m_Data.empty() ) {
return false;
}
@@ -128,7 +122,7 @@ bool Q3BSPFileParser::parseFile()
// Imports the dictionary of the level
getLumps();
- // Conunt data and prepare model data
+ // Count data and prepare model data
countLumps();
// Read in Vertices
@@ -208,7 +202,7 @@ void Q3BSPFileParser::getVertices()
// ------------------------------------------------------------------------------------------------
void Q3BSPFileParser::getIndices()
{
- ai_assert( NULL != m_pModel );
+ ai_assert(nullptr != m_pModel );
sQ3BSPLump *lump = m_pModel->m_Lumps[ kMeshVerts ];
size_t Offset = (size_t) lump->iOffset;
@@ -220,7 +214,7 @@ void Q3BSPFileParser::getIndices()
// ------------------------------------------------------------------------------------------------
void Q3BSPFileParser::getFaces()
{
- ai_assert( NULL != m_pModel );
+ ai_assert(nullptr != m_pModel );
size_t Offset = m_pModel->m_Lumps[ kFaces ]->iOffset;
for ( size_t idx = 0; idx < m_pModel->m_Faces.size(); idx++ )
@@ -235,7 +229,7 @@ void Q3BSPFileParser::getFaces()
// ------------------------------------------------------------------------------------------------
void Q3BSPFileParser::getTextures()
{
- ai_assert( NULL != m_pModel );
+ ai_assert(nullptr != m_pModel );
size_t Offset = m_pModel->m_Lumps[ kTextures ]->iOffset;
for ( size_t idx=0; idx < m_pModel->m_Textures.size(); idx++ )
@@ -250,7 +244,7 @@ void Q3BSPFileParser::getTextures()
// ------------------------------------------------------------------------------------------------
void Q3BSPFileParser::getLightMaps()
{
- ai_assert( NULL != m_pModel );
+ ai_assert(nullptr != m_pModel );
size_t Offset = m_pModel->m_Lumps[kLightmaps]->iOffset;
for ( size_t idx=0; idx < m_pModel->m_Lightmaps.size(); idx++ )
@@ -263,12 +257,10 @@ void Q3BSPFileParser::getLightMaps()
}
// ------------------------------------------------------------------------------------------------
-void Q3BSPFileParser::getEntities()
-{
- int size = m_pModel->m_Lumps[ kEntities ]->iSize;
+void Q3BSPFileParser::getEntities() {
+ const int size = m_pModel->m_Lumps[ kEntities ]->iSize;
m_pModel->m_EntityData.resize( size );
- if ( size > 0 )
- {
+ if ( size > 0 ) {
size_t Offset = m_pModel->m_Lumps[ kEntities ]->iOffset;
memcpy( &m_pModel->m_EntityData[ 0 ], &m_Data[ Offset ], sizeof( char ) * size );
}
diff --git a/code/Q3BSPFileParser.h b/code/Q3BSPFileParser.h
index 1ee6d4aef..747d1d494 100644
--- a/code/Q3BSPFileParser.h
+++ b/code/Q3BSPFileParser.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -42,7 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_Q3BSPFILEPARSER_H_INC
#define ASSIMP_Q3BSPFILEPARSER_H_INC
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
#include <string>
namespace Assimp
diff --git a/code/Q3BSPZipArchive.cpp b/code/Q3BSPZipArchive.cpp
index 86f399659..3e1087b9a 100644
--- a/code/Q3BSPZipArchive.cpp
+++ b/code/Q3BSPZipArchive.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -39,12 +40,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----------------------------------------------------------------------
*/
-
-
#ifndef ASSIMP_BUILD_NO_Q3BSP_IMPORTER
#include "Q3BSPZipArchive.h"
-#include <algorithm>
#include <cassert>
#include <cstdlib>
#include <assimp/ai_assert.h>
@@ -137,7 +135,6 @@ zlib_filefunc_def IOSystem2Unzip::get(IOSystem* pIOHandler) {
return mapping;
}
-// ------------------------------------------------------------------------------------------------
ZipFile::ZipFile(size_t size) : m_Size(size) {
ai_assert(m_Size != 0);
@@ -186,7 +183,7 @@ Q3BSPZipArchive::Q3BSPZipArchive(IOSystem* pIOHandler, const std::string& rFile)
m_ZipFileHandle = unzOpen2(rFile.c_str(), &mapping);
- if(m_ZipFileHandle != NULL) {
+ if(m_ZipFileHandle != nullptr) {
mapArchive();
}
}
@@ -200,26 +197,23 @@ Q3BSPZipArchive::~Q3BSPZipArchive() {
}
m_ArchiveMap.clear();
- if(m_ZipFileHandle != NULL) {
+ if(m_ZipFileHandle != nullptr) {
unzClose(m_ZipFileHandle);
- m_ZipFileHandle = NULL;
+ m_ZipFileHandle = nullptr;
}
}
// ------------------------------------------------------------------------------------------------
// Returns true, if the archive is already open.
bool Q3BSPZipArchive::isOpen() const {
- return (m_ZipFileHandle != NULL);
+ return (m_ZipFileHandle != nullptr);
}
// ------------------------------------------------------------------------------------------------
// Returns true, if the filename is part of the archive.
bool Q3BSPZipArchive::Exists(const char* pFile) const {
- ai_assert(pFile != NULL);
-
bool exist = false;
-
- if (pFile != NULL) {
+ if (pFile != nullptr) {
std::string rFile(pFile);
std::map<std::string, ZipFile*>::const_iterator it = m_ArchiveMap.find(rFile);
@@ -244,9 +238,9 @@ char Q3BSPZipArchive::getOsSeparator() const {
// ------------------------------------------------------------------------------------------------
// Opens a file, which is part of the archive.
IOStream *Q3BSPZipArchive::Open(const char* pFile, const char* /*pMode*/) {
- ai_assert(pFile != NULL);
+ ai_assert(pFile != nullptr);
- IOStream* result = NULL;
+ IOStream* result = nullptr;
std::map<std::string, ZipFile*>::iterator it = m_ArchiveMap.find(pFile);
@@ -260,7 +254,8 @@ IOStream *Q3BSPZipArchive::Open(const char* pFile, const char* /*pMode*/) {
// ------------------------------------------------------------------------------------------------
// Close a filestream.
void Q3BSPZipArchive::Close(IOStream *pFile) {
- ai_assert(pFile != NULL);
+ (void)(pFile);
+ ai_assert(pFile != nullptr);
// We don't do anything in case the file would be opened again in the future
}
@@ -279,7 +274,7 @@ void Q3BSPZipArchive::getFileList(std::vector<std::string> &rFileList) {
bool Q3BSPZipArchive::mapArchive() {
bool success = false;
- if(m_ZipFileHandle != NULL) {
+ if(m_ZipFileHandle != nullptr) {
if(m_ArchiveMap.empty()) {
// At first ensure file is already open
if(unzGoToFirstFile(m_ZipFileHandle) == UNZ_OK) {
diff --git a/code/Q3BSPZipArchive.h b/code/Q3BSPZipArchive.h
index 280c44fc0..606f7b183 100644
--- a/code/Q3BSPZipArchive.h
+++ b/code/Q3BSPZipArchive.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -41,10 +42,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_Q3BSP_ZIPARCHIVE_H_INC
#define AI_Q3BSP_ZIPARCHIVE_H_INC
-#include <contrib/unzip/unzip.h>
+#include <unzip.h>
#include <assimp/IOStream.hpp>
#include <assimp/IOSystem.hpp>
-#include <string>
#include <vector>
#include <map>
#include <cassert>
diff --git a/code/Q3DLoader.cpp b/code/Q3DLoader.cpp
index 5aa639d09..f1165dc2c 100644
--- a/code/Q3DLoader.cpp
+++ b/code/Q3DLoader.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -49,8 +50,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// internal headers
#include "Q3DLoader.h"
-#include "StreamReader.h"
-#include "fast_atof.h"
+#include <assimp/StreamReader.h>
+#include <assimp/fast_atof.h>
#include <assimp/IOSystem.hpp>
#include <assimp/DefaultLogger.hpp>
#include <assimp/scene.h>
@@ -124,7 +125,7 @@ void Q3DImporter::InternReadFile( const std::string& pFile,
}
// Print the file format version
- DefaultLogger::get()->info("Quick3D File format version: " +
+ ASSIMP_LOG_INFO_F("Quick3D File format version: ",
std::string(&((const char*)stream.GetPtr())[8],2));
// ... an store it
@@ -412,7 +413,7 @@ outer:
// If we have no materials loaded - generate a default mat
if (materials.empty())
{
- DefaultLogger::get()->info("Quick3D: No material found, generating one");
+ ASSIMP_LOG_INFO("Quick3D: No material found, generating one");
materials.push_back(Material());
materials.back().diffuse = fgColor ;
}
@@ -432,7 +433,7 @@ outer:
{
if ((*fit).mat >= materials.size())
{
- DefaultLogger::get()->warn("Quick3D: Material index overflow");
+ ASSIMP_LOG_WARN("Quick3D: Material index overflow");
(*fit).mat = 0;
}
if (fidx[(*fit).mat].empty())++pScene->mNumMeshes;
@@ -527,7 +528,7 @@ outer:
{
if (face.indices[n] >= m.verts.size())
{
- DefaultLogger::get()->warn("Quick3D: Vertex index overflow");
+ ASSIMP_LOG_WARN("Quick3D: Vertex index overflow");
face.indices[n] = 0;
}
@@ -560,7 +561,7 @@ outer:
{
if (face.uvindices[n] >= m.uv.size())
{
- DefaultLogger::get()->warn("Quick3D: Texture coordinate index overflow");
+ ASSIMP_LOG_WARN("Quick3D: Texture coordinate index overflow");
face.uvindices[n] = 0;
}
*uv = m.uv[face.uvindices[n]];
diff --git a/code/Q3DLoader.h b/code/Q3DLoader.h
index 97184a5ff..bdb104df3 100644
--- a/code/Q3DLoader.h
+++ b/code/Q3DLoader.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -45,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_Q3DLOADER_H_INCLUDED
#define AI_Q3DLOADER_H_INCLUDED
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
#include <assimp/types.h>
#include <vector>
#include <stdint.h>
diff --git a/code/RawLoader.cpp b/code/RawLoader.cpp
index e14b5140d..1bc508759 100644
--- a/code/RawLoader.cpp
+++ b/code/RawLoader.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -49,8 +50,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// internal headers
#include "RawLoader.h"
-#include "ParsingUtils.h"
-#include "fast_atof.h"
+#include <assimp/ParsingUtils.h>
+#include <assimp/fast_atof.h>
#include <memory>
#include <assimp/IOSystem.hpp>
#include <assimp/DefaultLogger.hpp>
@@ -159,7 +160,7 @@ void RAWImporter::InternReadFile( const std::string& pFile,
}
if (num != 12 && num != 9)
{
- DefaultLogger::get()->error("A line may have either 9 or 12 floats and an optional texture");
+ ASSIMP_LOG_ERROR("A line may have either 9 or 12 floats and an optional texture");
continue;
}
@@ -243,8 +244,11 @@ void RAWImporter::InternReadFile( const std::string& pFile,
{
cc = &pScene->mRootNode;
pScene->mRootNode->mNumChildren = 0;
+ } else {
+ cc = new aiNode*[pScene->mRootNode->mNumChildren];
+ memset(cc, 0, sizeof(aiNode*) * pScene->mRootNode->mNumChildren);
+ pScene->mRootNode->mChildren = cc;
}
- else cc = pScene->mRootNode->mChildren = new aiNode*[pScene->mRootNode->mNumChildren];
pScene->mNumMaterials = pScene->mNumMeshes;
aiMaterial** mats = pScene->mMaterials = new aiMaterial*[pScene->mNumMaterials];
@@ -260,7 +264,7 @@ void RAWImporter::InternReadFile( const std::string& pFile,
node = *cc = new aiNode();
node->mParent = pScene->mRootNode;
}
- else node = *cc;++cc;
+ else node = *cc;
node->mName.Set(outGroup.name);
// add all meshes
diff --git a/code/RawLoader.h b/code/RawLoader.h
index 0a1a35815..f6e894fdd 100644
--- a/code/RawLoader.h
+++ b/code/RawLoader.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -45,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_RAWLOADER_H_INCLUDED
#define AI_RAWLOADER_H_INCLUDED
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
#include <assimp/types.h>
#include <vector>
diff --git a/code/RemoveComments.cpp b/code/RemoveComments.cpp
index 37d74124d..3ba3c60be 100644
--- a/code/RemoveComments.cpp
+++ b/code/RemoveComments.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -43,8 +44,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* @brief Defines the CommentRemover utility class
*/
-#include "RemoveComments.h"
-#include "ParsingUtils.h"
+#include <assimp/RemoveComments.h>
+#include <assimp/ParsingUtils.h>
namespace Assimp {
@@ -66,6 +67,10 @@ void CommentRemover::RemoveLineComments(const char* szComment,
if (!strncmp(szBuffer,szComment,len)) {
while (!IsLineEnd(*szBuffer))
*szBuffer++ = chReplacement;
+
+ if (!*szBuffer) {
+ break;
+ }
}
++szBuffer;
}
diff --git a/code/RemoveRedundantMaterials.cpp b/code/RemoveRedundantMaterials.cpp
index 154bf63ca..7194d3c8e 100644
--- a/code/RemoveRedundantMaterials.cpp
+++ b/code/RemoveRedundantMaterials.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -46,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// internal headers
#include "RemoveRedundantMaterials.h"
-#include "ParsingUtils.h"
+#include <assimp/ParsingUtils.h>
#include "ProcessHelper.h"
#include "MaterialSystem.h"
#include <stdio.h>
@@ -86,7 +87,7 @@ void RemoveRedundantMatsProcess::SetupProperties(const Importer* pImp)
// Executes the post processing step on the given imported data.
void RemoveRedundantMatsProcess::Execute( aiScene* pScene)
{
- DefaultLogger::get()->debug("RemoveRedundantMatsProcess begin");
+ ASSIMP_LOG_DEBUG("RemoveRedundantMatsProcess begin");
unsigned int redundantRemoved = 0, unreferencedRemoved = 0;
if (pScene->mNumMaterials)
@@ -121,7 +122,7 @@ void RemoveRedundantMatsProcess::Execute( aiScene* pScene)
// Keep this material even if no mesh references it
abReferenced[i] = true;
- DefaultLogger::get()->debug(std::string("Found positive match in exclusion list: \'") + name.data + "\'");
+ ASSIMP_LOG_DEBUG_F( "Found positive match in exclusion list: \'", name.data, "\'");
}
}
}
@@ -145,6 +146,7 @@ void RemoveRedundantMatsProcess::Execute( aiScene* pScene)
if (!abReferenced[i]) {
++unreferencedRemoved;
delete pScene->mMaterials[i];
+ pScene->mMaterials[i] = nullptr;
continue;
}
@@ -158,6 +160,7 @@ void RemoveRedundantMatsProcess::Execute( aiScene* pScene)
me = 0;
aiMappingTable[i] = aiMappingTable[a];
delete pScene->mMaterials[i];
+ pScene->mMaterials[i] = nullptr;
break;
}
}
@@ -169,6 +172,7 @@ void RemoveRedundantMatsProcess::Execute( aiScene* pScene)
// If the new material count differs from the original,
// we need to rebuild the material list and remap mesh material indexes.
if (iNewNum != pScene->mNumMaterials) {
+ ai_assert(iNewNum > 0);
aiMaterial** ppcMaterials = new aiMaterial*[iNewNum];
::memset(ppcMaterials,0,sizeof(void*)*iNewNum);
for (unsigned int p = 0; p < pScene->mNumMaterials;++p)
@@ -207,13 +211,11 @@ void RemoveRedundantMatsProcess::Execute( aiScene* pScene)
}
if (redundantRemoved == 0 && unreferencedRemoved == 0)
{
- DefaultLogger::get()->debug("RemoveRedundantMatsProcess finished ");
+ ASSIMP_LOG_DEBUG("RemoveRedundantMatsProcess finished ");
}
else
{
- char szBuffer[128]; // should be sufficiently large
- ::ai_snprintf(szBuffer,128,"RemoveRedundantMatsProcess finished. Removed %u redundant and %u unused materials.",
- redundantRemoved,unreferencedRemoved);
- DefaultLogger::get()->info(szBuffer);
+ ASSIMP_LOG_INFO_F("RemoveRedundantMatsProcess finished. Removed ", redundantRemoved, " redundant and ",
+ unreferencedRemoved, " unused materials.");
}
}
diff --git a/code/RemoveRedundantMaterials.h b/code/RemoveRedundantMaterials.h
index cb4ec02bb..314bbf345 100644
--- a/code/RemoveRedundantMaterials.h
+++ b/code/RemoveRedundantMaterials.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -49,6 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/mesh.h>
class RemoveRedundantMatsTest;
+
namespace Assimp {
// ---------------------------------------------------------------------------
diff --git a/code/RemoveVCProcess.cpp b/code/RemoveVCProcess.cpp
index 016757dbb..81249eab2 100644
--- a/code/RemoveVCProcess.cpp
+++ b/code/RemoveVCProcess.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -144,7 +145,7 @@ bool UpdateNodeGraph(aiNode* node,std::list<aiNode*>& childsOfParent,bool root)
// Executes the post processing step on the given imported data.
void RemoveVCProcess::Execute( aiScene* pScene)
{
- DefaultLogger::get()->debug("RemoveVCProcess begin");
+ ASSIMP_LOG_DEBUG("RemoveVCProcess begin");
bool bHas = false; //,bMasked = false;
mScene = pScene;
@@ -223,15 +224,18 @@ void RemoveVCProcess::Execute( aiScene* pScene)
if (!pScene->mNumMeshes || !pScene->mNumMaterials)
{
pScene->mFlags |= AI_SCENE_FLAGS_INCOMPLETE;
- DefaultLogger::get()->debug("Setting AI_SCENE_FLAGS_INCOMPLETE flag");
+ ASSIMP_LOG_DEBUG("Setting AI_SCENE_FLAGS_INCOMPLETE flag");
// If we have no meshes anymore we should also clear another flag ...
if (!pScene->mNumMeshes)
pScene->mFlags &= ~AI_SCENE_FLAGS_NON_VERBOSE_FORMAT;
}
- if (bHas)DefaultLogger::get()->info("RemoveVCProcess finished. Data structure cleanup has been done.");
- else DefaultLogger::get()->debug("RemoveVCProcess finished. Nothing to be done ...");
+ if (bHas) {
+ ASSIMP_LOG_INFO("RemoveVCProcess finished. Data structure cleanup has been done.");
+ } else {
+ ASSIMP_LOG_DEBUG("RemoveVCProcess finished. Nothing to be done ...");
+ }
}
// ------------------------------------------------------------------------------------------------
@@ -241,7 +245,7 @@ void RemoveVCProcess::SetupProperties(const Importer* pImp)
configDeleteFlags = pImp->GetPropertyInteger(AI_CONFIG_PP_RVC_FLAGS,0x0);
if (!configDeleteFlags)
{
- DefaultLogger::get()->warn("RemoveVCProcess: AI_CONFIG_PP_RVC_FLAGS is zero.");
+ ASSIMP_LOG_WARN("RemoveVCProcess: AI_CONFIG_PP_RVC_FLAGS is zero.");
}
}
diff --git a/code/RemoveVCProcess.h b/code/RemoveVCProcess.h
index 5735bf419..597de8584 100644
--- a/code/RemoveVCProcess.h
+++ b/code/RemoveVCProcess.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -54,8 +55,7 @@ namespace Assimp {
/** RemoveVCProcess: Class to exclude specific parts of the data structure
* from further processing by removing them,
*/
-class ASSIMP_API RemoveVCProcess : public BaseProcess
-{
+class ASSIMP_API RemoveVCProcess : public BaseProcess {
public:
/// The default class constructor.
RemoveVCProcess();
@@ -63,7 +63,6 @@ public:
/// The class destructor.
~RemoveVCProcess();
-public:
// -------------------------------------------------------------------
/** Returns whether the processing step is present in the given flag field.
* @param pFlags The processing flags the importer was called with. A bitwise
diff --git a/code/SGSpatialSort.cpp b/code/SGSpatialSort.cpp
index 7a80381e2..d74c57ed5 100644
--- a/code/SGSpatialSort.cpp
+++ b/code/SGSpatialSort.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -44,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
vertices close to a given position. Special implementation for
the 3ds loader handling smooth groups correctly */
-#include "SGSpatialSort.h"
+#include <assimp/SGSpatialSort.h>
using namespace Assimp;
diff --git a/code/SIBImporter.cpp b/code/SIBImporter.cpp
index 6cd398f48..7a69dd175 100644
--- a/code/SIBImporter.cpp
+++ b/code/SIBImporter.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -55,9 +56,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// internal headers
#include "SIBImporter.h"
-#include "ByteSwapper.h"
-#include "StreamReader.h"
-#include "TinyFormatter.h"
+#include <assimp/ByteSwapper.h>
+#include <assimp/StreamReader.h>
+#include <assimp/TinyFormatter.h>
//#include "../contrib/ConvertUTF/ConvertUTF.h"
#include "../contrib/utf8cpp/source/utf8.h"
#include <assimp/IOSystem.hpp>
@@ -149,7 +150,7 @@ static SIBChunk ReadChunk(StreamReaderLE* stream)
chunk.Tag = stream->GetU4();
chunk.Size = stream->GetU4();
if (chunk.Size > stream->GetRemainingSizeToLimit())
- DefaultLogger::get()->error("SIB: Chunk overflow");
+ ASSIMP_LOG_ERROR("SIB: Chunk overflow");
ByteSwap::Swap4(&chunk.Tag);
return chunk;
}
@@ -163,7 +164,7 @@ static aiColor3D ReadColor(StreamReaderLE* stream)
return aiColor3D(r, g, b);
}
-static void UnknownChunk(StreamReaderLE* stream, const SIBChunk& chunk)
+static void UnknownChunk(StreamReaderLE* /*stream*/, const SIBChunk& chunk)
{
char temp[5] = {
static_cast<char>(( chunk.Tag>>24 ) & 0xff),
@@ -172,40 +173,33 @@ static void UnknownChunk(StreamReaderLE* stream, const SIBChunk& chunk)
static_cast<char>(chunk.Tag & 0xff), '\0'
};
- DefaultLogger::get()->warn((Formatter::format(), "SIB: Skipping unknown '",temp,"' chunk."));
+ ASSIMP_LOG_WARN((Formatter::format(), "SIB: Skipping unknown '",temp,"' chunk."));
}
// Reads a UTF-16LE string and returns it at UTF-8.
-static aiString ReadString(StreamReaderLE* stream, uint32_t numWChars)
-{
- if ( 0 == numWChars ) {
+static aiString ReadString(StreamReaderLE *stream, uint32_t numWChars) {
+ if ( nullptr == stream || 0 == numWChars ) {
static const aiString empty;
return empty;
}
+
// Allocate buffers (max expansion is 1 byte -> 4 bytes for UTF-8)
- //UTF16* temp = new UTF16[numWChars];
std::vector<unsigned char> str;
- str.reserve(numWChars * 4 + 1);
- //unsigned char* str = new unsigned char[numWChars * 4 + 1];
- uint16_t *temp = new uint16_t[numWChars];
- for (uint32_t n=0;n<numWChars;n++)
- temp[n] = stream->GetU2();
+ str.reserve( numWChars * 4 + 1 );
+ uint16_t *temp = new uint16_t[ numWChars ];
+ for ( uint32_t n = 0; n < numWChars; ++n ) {
+ temp[ n ] = stream->GetU2();
+ }
// Convert it and NUL-terminate.
- //const UTF16 *start = temp, *end = temp + numWChars;
+ const uint16_t *start( temp ), *end( temp + numWChars );
+ utf8::utf16to8( start, end, back_inserter( str ) );
+ str[ str.size() - 1 ] = '\0';
- const uint16_t *start = temp, *end = temp + numWChars;
- utf8::utf16to8(start, end, back_inserter(str));
-
- //UTF8 *dest = str, *limit = str + numWChars*4;
- //ConvertUTF16toUTF8(&start, end, &dest, limit, lenientConversion);
- //*dest = '\0';
-
- str[str.size()-1] = '\0';
// Return the final string.
aiString result = aiString((const char *)&str[0]);
- //delete[] str;
delete[] temp;
+
return result;
}
@@ -223,26 +217,26 @@ SIBImporter::~SIBImporter() {
// ------------------------------------------------------------------------------------------------
// Returns whether the class can handle the format of the given file.
-bool SIBImporter::CanRead( const std::string& pFile, IOSystem* /*pIOHandler*/, bool /*checkSig*/) const
-{
+bool SIBImporter::CanRead( const std::string& pFile, IOSystem* /*pIOHandler*/, bool /*checkSig*/) const {
return SimpleExtensionCheck(pFile, "sib");
}
// ------------------------------------------------------------------------------------------------
-const aiImporterDesc* SIBImporter::GetInfo () const
-{
+const aiImporterDesc* SIBImporter::GetInfo () const {
return &desc;
}
// ------------------------------------------------------------------------------------------------
-static void ReadVerts(SIBMesh* mesh, StreamReaderLE* stream, uint32_t count)
-{
- mesh->pos.resize(count);
+static void ReadVerts(SIBMesh* mesh, StreamReaderLE* stream, uint32_t count) {
+ if ( nullptr == mesh || nullptr == stream ) {
+ return;
+ }
- for (uint32_t n=0;n<count;n++) {
- mesh->pos[n].x = stream->GetF4();
- mesh->pos[n].y = stream->GetF4();
- mesh->pos[n].z = stream->GetF4();
+ mesh->pos.resize(count);
+ for ( uint32_t n=0; n<count; ++n ) {
+ mesh->pos[ n ].x = stream->GetF4();
+ mesh->pos[ n ].y = stream->GetF4();
+ mesh->pos[ n ].z = stream->GetF4();
}
}
@@ -595,7 +589,7 @@ static void ReadShape(SIB* sib, StreamReaderLE* stream)
if (mtl >= meshes.size())
{
- DefaultLogger::get()->error("SIB: Face material index is invalid.");
+ ASSIMP_LOG_ERROR("SIB: Face material index is invalid.");
mtl = 0;
}
@@ -827,7 +821,7 @@ static void ReadInstance(SIB* sib, StreamReaderLE* stream)
static void CheckVersion(StreamReaderLE* stream)
{
uint32_t version = stream->GetU4();
- if ( version != 1 ) {
+ if ( version < 1 || version > 2 ) {
throw DeadlyImportError( "SIB: Unsupported file version." );
}
}
@@ -909,6 +903,7 @@ void SIBImporter::InternReadFile(const std::string& pFile,
// Add nodes for each object.
for (size_t n=0;n<sib.objs.size();n++)
{
+ ai_assert(root->mChildren);
SIBObject& obj = sib.objs[n];
aiNode* node = new aiNode;
root->mChildren[childIdx++] = node;
@@ -933,6 +928,7 @@ void SIBImporter::InternReadFile(const std::string& pFile,
// (no transformation as the light is already in world space)
for (size_t n=0;n<sib.lights.size();n++)
{
+ ai_assert(root->mChildren);
aiLight* light = sib.lights[n];
if ( nullptr != light ) {
aiNode* node = new aiNode;
diff --git a/code/SIBImporter.h b/code/SIBImporter.h
index e7e2ec0b9..9437af588 100644
--- a/code/SIBImporter.h
+++ b/code/SIBImporter.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -45,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_SIBIMPORTER_H_INCLUDED
#define AI_SIBIMPORTER_H_INCLUDED
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
#include <assimp/types.h>
#include <vector>
diff --git a/code/SMDLoader.cpp b/code/SMDLoader.cpp
index 1e9f86bea..c6ec61624 100644
--- a/code/SMDLoader.cpp
+++ b/code/SMDLoader.cpp
@@ -3,8 +3,7 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
-
+Copyright (c) 2006-2018, assimp team
All rights reserved.
@@ -47,16 +46,23 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_NO_SMD_IMPORTER
-// internal headers
-#include "SMDLoader.h"
-#include "fast_atof.h"
-#include "SkeletonMeshBuilder.h"
+#include <assimp/fast_atof.h>
+#include <assimp/SkeletonMeshBuilder.h>
#include <assimp/Importer.hpp>
#include <assimp/IOSystem.hpp>
#include <assimp/scene.h>
#include <assimp/DefaultLogger.hpp>
#include <assimp/importerdesc.h>
#include <memory>
+#include <assimp/DefaultIOSystem.h>
+#include <tuple>
+
+// internal headers
+#include "SMDLoader.h"
+
+#ifndef _WIN32
+#define strtok_s strtok_r
+#endif
using namespace Assimp;
@@ -76,14 +82,14 @@ static const aiImporterDesc desc = {
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
SMDImporter::SMDImporter()
-: configFrameID(),
-mBuffer(),
-pScene( nullptr ),
-iFileSize( 0 ),
-iSmallestFrame( -1 ),
-dLengthOfAnim( 0.0 ),
-bHasUVs(false ),
-iLineNumber(-1) {
+: configFrameID()
+, mBuffer()
+, pScene( nullptr )
+, iFileSize( 0 )
+, iSmallestFrame( INT_MAX )
+, dLengthOfAnim( 0.0 )
+, bHasUVs(false )
+, iLineNumber(-1) {
// empty
}
@@ -95,23 +101,20 @@ SMDImporter::~SMDImporter() {
// ------------------------------------------------------------------------------------------------
// Returns whether the class can handle the format of the given file.
-bool SMDImporter::CanRead( const std::string& pFile, IOSystem* /*pIOHandler*/, bool) const
-{
+bool SMDImporter::CanRead( const std::string& pFile, IOSystem* /*pIOHandler*/, bool) const {
// fixme: auto format detection
return SimpleExtensionCheck(pFile,"smd","vta");
}
// ------------------------------------------------------------------------------------------------
// Get a list of all supported file extensions
-const aiImporterDesc* SMDImporter::GetInfo () const
-{
+const aiImporterDesc* SMDImporter::GetInfo () const {
return &desc;
}
// ------------------------------------------------------------------------------------------------
// Setup configuration properties
-void SMDImporter::SetupProperties(const Importer* pImp)
-{
+void SMDImporter::SetupProperties(const Importer* pImp) {
// The
// AI_CONFIG_IMPORT_SMD_KEYFRAME option overrides the
// AI_CONFIG_IMPORT_GLOBAL_KEYFRAME option.
@@ -119,50 +122,21 @@ void SMDImporter::SetupProperties(const Importer* pImp)
if(static_cast<unsigned int>(-1) == configFrameID) {
configFrameID = pImp->GetPropertyInteger(AI_CONFIG_IMPORT_GLOBAL_KEYFRAME,0);
}
+
+ bLoadAnimationList = pImp->GetPropertyBool(AI_CONFIG_IMPORT_SMD_LOAD_ANIMATION_LIST, true);
+ noSkeletonMesh = pImp->GetPropertyBool(AI_CONFIG_IMPORT_NO_SKELETON_MESHES, false);
}
// ------------------------------------------------------------------------------------------------
// Imports the given file into the given scene structure.
-void SMDImporter::InternReadFile( const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler)
-{
- std::unique_ptr<IOStream> file( pIOHandler->Open( pFile, "rb"));
-
- // Check whether we can read from the file
- if( file.get() == NULL) {
- throw DeadlyImportError( "Failed to open SMD/VTA file " + pFile + ".");
- }
-
- iFileSize = (unsigned int)file->FileSize();
-
- // Allocate storage and copy the contents of the file to a memory buffer
+void SMDImporter::InternReadFile( const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler) {
this->pScene = pScene;
-
- mBuffer.resize( iFileSize + 1 );
- TextFileToBuffer(file.get(), mBuffer );
-
- iSmallestFrame = (1 << 31);
- bHasUVs = true;
- iLineNumber = 1;
-
- // Reserve enough space for ... hm ... 10 textures
- aszTextures.reserve(10);
-
- // Reserve enough space for ... hm ... 1000 triangles
- asTriangles.reserve(1000);
-
- // Reserve enough space for ... hm ... 20 bones
- asBones.reserve(20);
-
-
- // parse the file ...
- ParseFile();
+ ReadSmd(pFile, pIOHandler);
// If there are no triangles it seems to be an animation SMD,
// containing only the animation skeleton.
- if (asTriangles.empty())
- {
- if (asBones.empty())
- {
+ if (asTriangles.empty()) {
+ if (asBones.empty()) {
throw DeadlyImportError("SMD: No triangles and no bones have "
"been found in the file. This file seems to be invalid.");
}
@@ -172,80 +146,77 @@ void SMDImporter::InternReadFile( const std::string& pFile, aiScene* pScene, IOS
pScene->mFlags |= AI_SCENE_FLAGS_INCOMPLETE;
}
- if (!asBones.empty())
- {
+ if (!asBones.empty()) {
// Check whether all bones have been initialized
for (std::vector<SMD::Bone>::const_iterator
- i = asBones.begin();
- i != asBones.end();++i)
- {
- if (!(*i).mName.length())
- {
- DefaultLogger::get()->warn("SMD: Not all bones have been initialized");
+ i = asBones.begin();
+ i != asBones.end();++i) {
+ if (!(*i).mName.length()) {
+ ASSIMP_LOG_WARN("SMD: Not all bones have been initialized");
break;
}
}
// now fix invalid time values and make sure the animation starts at frame 0
FixTimeValues();
-
- // compute absolute bone transformation matrices
- // ComputeAbsoluteBoneTransformations();
}
- if (!(pScene->mFlags & AI_SCENE_FLAGS_INCOMPLETE))
- {
+ // build output nodes (bones are added as empty dummy nodes)
+ CreateOutputNodes();
+
+ if (!(pScene->mFlags & AI_SCENE_FLAGS_INCOMPLETE)) {
// create output meshes
CreateOutputMeshes();
// build an output material list
CreateOutputMaterials();
+
+ // use root node that renders all meshes
+ pScene->mRootNode->mNumMeshes = pScene->mNumMeshes;
+ pScene->mRootNode->mMeshes = new unsigned int[pScene->mNumMeshes];
+ for (unsigned int i = 0; i < pScene->mNumMeshes; ++i) {
+ pScene->mRootNode->mMeshes[i] = i;
+ }
}
// build the output animation
- CreateOutputAnimations();
+ CreateOutputAnimations(pFile, pIOHandler);
- // build output nodes (bones are added as empty dummy nodes)
- CreateOutputNodes();
-
- if (pScene->mFlags & AI_SCENE_FLAGS_INCOMPLETE)
- {
+ if ((pScene->mFlags & AI_SCENE_FLAGS_INCOMPLETE) && !noSkeletonMesh) {
SkeletonMeshBuilder skeleton(pScene);
}
}
+
// ------------------------------------------------------------------------------------------------
// Write an error message with line number to the log file
-void SMDImporter::LogErrorNoThrow(const char* msg)
-{
- char szTemp[1024];
- ai_snprintf(szTemp,1024,"Line %u: %s",iLineNumber,msg);
+void SMDImporter::LogErrorNoThrow(const char* msg) {
+ const size_t BufferSize = 1024;
+ char szTemp[BufferSize];
+ ai_snprintf(szTemp,BufferSize,"Line %u: %s",iLineNumber,msg);
DefaultLogger::get()->error(szTemp);
}
// ------------------------------------------------------------------------------------------------
// Write a warning with line number to the log file
-void SMDImporter::LogWarning(const char* msg)
-{
- char szTemp[1024];
+void SMDImporter::LogWarning(const char* msg) {
+ const size_t BufferSize = 1024;
+ char szTemp[BufferSize];
ai_assert(strlen(msg) < 1000);
- ai_snprintf(szTemp,1024,"Line %u: %s",iLineNumber,msg);
- DefaultLogger::get()->warn(szTemp);
+ ai_snprintf(szTemp,BufferSize,"Line %u: %s",iLineNumber,msg);
+ ASSIMP_LOG_WARN(szTemp);
}
// ------------------------------------------------------------------------------------------------
// Fix invalid time values in the file
-void SMDImporter::FixTimeValues()
-{
+void SMDImporter::FixTimeValues() {
double dDelta = (double)iSmallestFrame;
double dMax = 0.0f;
for (std::vector<SMD::Bone>::iterator
- iBone = asBones.begin();
- iBone != asBones.end();++iBone)
- {
+ iBone = asBones.begin();
+ iBone != asBones.end();++iBone) {
for (std::vector<SMD::Bone::Animation::MatrixKey>::iterator
- iKey = (*iBone).sAnim.asKeys.begin();
- iKey != (*iBone).sAnim.asKeys.end();++iKey)
- {
+ iKey = (*iBone).sAnim.asKeys.begin();
+ iKey != (*iBone).sAnim.asKeys.end();++iKey) {
(*iKey).dTime -= dDelta;
dMax = std::max(dMax, (*iKey).dTime);
}
@@ -255,10 +226,10 @@ void SMDImporter::FixTimeValues()
// ------------------------------------------------------------------------------------------------
// create output meshes
-void SMDImporter::CreateOutputMeshes()
-{
- if (aszTextures.empty())
+void SMDImporter::CreateOutputMeshes() {
+ if (aszTextures.empty()) {
aszTextures.push_back(std::string());
+ }
// we need to sort all faces by their material index
// in opposition to other loaders we can be sure that each
@@ -272,28 +243,27 @@ void SMDImporter::CreateOutputMeshes()
// approximate the space that will be required
unsigned int iNum = (unsigned int)asTriangles.size() / pScene->mNumMeshes;
iNum += iNum >> 1;
- for (unsigned int i = 0; i < pScene->mNumMeshes;++i)
+ for (unsigned int i = 0; i < pScene->mNumMeshes;++i) {
aaiFaces[i].reserve(iNum);
-
+ }
// collect all faces
iNum = 0;
for (std::vector<SMD::Face>::const_iterator
- iFace = asTriangles.begin();
- iFace != asTriangles.end();++iFace,++iNum)
- {
- if (UINT_MAX == (*iFace).iTexture)aaiFaces[(*iFace).iTexture].push_back( 0 );
- else if ((*iFace).iTexture >= aszTextures.size())
- {
- DefaultLogger::get()->error("[SMD/VTA] Material index overflow in face");
+ iFace = asTriangles.begin();
+ iFace != asTriangles.end();++iFace,++iNum) {
+ if (UINT_MAX == (*iFace).iTexture) {
+ aaiFaces[(*iFace).iTexture].push_back( 0 );
+ } else if ((*iFace).iTexture >= aszTextures.size()) {
+ ASSIMP_LOG_INFO("[SMD/VTA] Material index overflow in face");
aaiFaces[(*iFace).iTexture].push_back((unsigned int)aszTextures.size()-1);
+ } else {
+ aaiFaces[(*iFace).iTexture].push_back(iNum);
}
- else aaiFaces[(*iFace).iTexture].push_back(iNum);
}
// now create the output meshes
- for (unsigned int i = 0; i < pScene->mNumMeshes;++i)
- {
+ for (unsigned int i = 0; i < pScene->mNumMeshes;++i) {
aiMesh*& pcMesh = pScene->mMeshes[i] = new aiMesh();
ai_assert(!aaiFaces[i].empty()); // should not be empty ...
@@ -309,8 +279,7 @@ void SMDImporter::CreateOutputMeshes()
TempBoneWeightList* aaiBones = new TempBoneWeightList[asBones.size()]();
// try to reserve enough memory without wasting too much
- for (unsigned int iBone = 0; iBone < asBones.size();++iBone)
- {
+ for (unsigned int iBone = 0; iBone < asBones.size();++iBone) {
aaiBones[iBone].reserve(pcMesh->mNumVertices/asBones.size());
}
@@ -319,16 +288,14 @@ void SMDImporter::CreateOutputMeshes()
aiVector3D* pcNormals = pcMesh->mNormals = new aiVector3D[pcMesh->mNumVertices];
aiVector3D* pcVerts = pcMesh->mVertices = new aiVector3D[pcMesh->mNumVertices];
- aiVector3D* pcUVs = NULL;
- if (bHasUVs)
- {
+ aiVector3D* pcUVs = nullptr;
+ if (bHasUVs) {
pcUVs = pcMesh->mTextureCoords[0] = new aiVector3D[pcMesh->mNumVertices];
pcMesh->mNumUVComponents[0] = 2;
}
iNum = 0;
- for (unsigned int iFace = 0; iFace < pcMesh->mNumFaces;++iFace)
- {
+ for (unsigned int iFace = 0; iFace < pcMesh->mNumFaces;++iFace) {
pcMesh->mFaces[iFace].mIndices = new unsigned int[3];
pcMesh->mFaces[iFace].mNumIndices = 3;
@@ -346,26 +313,21 @@ void SMDImporter::CreateOutputMeshes()
*pcNormals++ = face.avVertices[2].nor;
// fill the texture coordinates
- if (pcUVs)
- {
+ if (pcUVs) {
*pcUVs++ = face.avVertices[0].uv;
*pcUVs++ = face.avVertices[1].uv;
*pcUVs++ = face.avVertices[2].uv;
}
- for (unsigned int iVert = 0; iVert < 3;++iVert)
- {
+ for (unsigned int iVert = 0; iVert < 3;++iVert) {
float fSum = 0.0f;
- for (unsigned int iBone = 0;iBone < face.avVertices[iVert].aiBoneLinks.size();++iBone)
- {
+ for (unsigned int iBone = 0;iBone < face.avVertices[iVert].aiBoneLinks.size();++iBone) {
TempWeightListEntry& pairval = face.avVertices[iVert].aiBoneLinks[iBone];
// FIX: The second check is here just to make sure we won't
// assign more than one weight to a single vertex index
- if (pairval.first >= asBones.size() ||
- pairval.first == face.avVertices[iVert].iParentNode)
- {
- DefaultLogger::get()->error("[SMD/VTA] Bone index overflow. "
+ if (pairval.first >= asBones.size() || pairval.first == face.avVertices[iVert].iParentNode) {
+ ASSIMP_LOG_ERROR("[SMD/VTA] Bone index overflow. "
"The bone index will be ignored, the weight will be assigned "
"to the vertex' parent node");
continue;
@@ -382,27 +344,23 @@ void SMDImporter::CreateOutputMeshes()
// that the parent of a vertex is 0xffffffff (if the corresponding
// entry in the file was unreadable)
// ******************************************************************
- if (fSum < 0.975f && face.avVertices[iVert].iParentNode != UINT_MAX)
- {
- if (face.avVertices[iVert].iParentNode >= asBones.size())
- {
- DefaultLogger::get()->error("[SMD/VTA] Bone index overflow. "
+ if (fSum < 0.975f && face.avVertices[iVert].iParentNode != UINT_MAX) {
+ if (face.avVertices[iVert].iParentNode >= asBones.size()) {
+ ASSIMP_LOG_ERROR("[SMD/VTA] Bone index overflow. "
"The index of the vertex parent bone is invalid. "
"The remaining weights will be normalized to 1.0");
- if (fSum)
- {
+ if (fSum) {
fSum = 1 / fSum;
- for (unsigned int iBone = 0;iBone < face.avVertices[iVert].aiBoneLinks.size();++iBone)
- {
+ for (unsigned int iBone = 0;iBone < face.avVertices[iVert].aiBoneLinks.size();++iBone) {
TempWeightListEntry& pairval = face.avVertices[iVert].aiBoneLinks[iBone];
- if (pairval.first >= asBones.size())continue;
+ if (pairval.first >= asBones.size()) {
+ continue;
+ }
aaiBones[pairval.first].back().second *= fSum;
}
}
- }
- else
- {
+ } else {
aaiBones[face.avVertices[iVert].iParentNode].push_back(
TempWeightListEntry(iNum,1.0f-fSum));
}
@@ -413,17 +371,18 @@ void SMDImporter::CreateOutputMeshes()
// now build all bones of the mesh
iNum = 0;
- for (unsigned int iBone = 0; iBone < asBones.size();++iBone)
+ for (unsigned int iBone = 0; iBone < asBones.size();++iBone) {
if (!aaiBones[iBone].empty())++iNum;
+ }
- if (false && iNum)
- {
+ if (iNum) {
pcMesh->mNumBones = iNum;
pcMesh->mBones = new aiBone*[pcMesh->mNumBones];
iNum = 0;
- for (unsigned int iBone = 0; iBone < asBones.size();++iBone)
- {
- if (aaiBones[iBone].empty())continue;
+ for (unsigned int iBone = 0; iBone < asBones.size();++iBone) {
+ if (aaiBones[iBone].empty()) {
+ continue;
+ }
aiBone*& bone = pcMesh->mBones[iNum] = new aiBone();
bone->mNumWeights = (unsigned int)aaiBones[iBone].size();
@@ -433,8 +392,7 @@ void SMDImporter::CreateOutputMeshes()
asBones[iBone].bIsUsed = true;
- for (unsigned int iWeight = 0; iWeight < bone->mNumWeights;++iWeight)
- {
+ for (unsigned int iWeight = 0; iWeight < bone->mNumWeights;++iWeight) {
bone->mWeights[iWeight].mVertexId = aaiBones[iBone][iWeight].first;
bone->mWeights[iWeight].mWeight = aaiBones[iBone][iWeight].second;
}
@@ -448,32 +406,44 @@ void SMDImporter::CreateOutputMeshes()
// ------------------------------------------------------------------------------------------------
// add bone child nodes
-void SMDImporter::AddBoneChildren(aiNode* pcNode, uint32_t iParent)
-{
- ai_assert(NULL != pcNode && 0 == pcNode->mNumChildren && NULL == pcNode->mChildren);
+void SMDImporter::AddBoneChildren(aiNode* pcNode, uint32_t iParent) {
+ ai_assert( nullptr != pcNode );
+ ai_assert( 0 == pcNode->mNumChildren );
+ ai_assert( nullptr == pcNode->mChildren);
// first count ...
- for (unsigned int i = 0; i < asBones.size();++i)
- {
+ for (unsigned int i = 0; i < asBones.size();++i) {
SMD::Bone& bone = asBones[i];
- if (bone.iParent == iParent)++pcNode->mNumChildren;
+ if (bone.iParent == iParent) {
+ ++pcNode->mNumChildren;
+ }
}
// now allocate the output array
pcNode->mChildren = new aiNode*[pcNode->mNumChildren];
// and fill all subnodes
- unsigned int qq = 0;
- for (unsigned int i = 0; i < asBones.size();++i)
- {
+ unsigned int qq( 0 );
+ for (unsigned int i = 0; i < asBones.size();++i) {
SMD::Bone& bone = asBones[i];
- if (bone.iParent != iParent)continue;
+ if (bone.iParent != iParent) {
+ continue;
+ }
aiNode* pc = pcNode->mChildren[qq++] = new aiNode();
pc->mName.Set(bone.mName);
// store the local transformation matrix of the bind pose
- pc->mTransformation = bone.sAnim.asKeys[bone.sAnim.iFirstTimeKey].matrix;
+ if (bone.sAnim.asKeys.size()) {
+ pc->mTransformation = bone.sAnim.asKeys[0].matrix;
+ }
+
+ if (bone.iParent == static_cast<uint32_t>(-1)) {
+ bone.mOffsetMatrix = pc->mTransformation;
+ } else {
+ bone.mOffsetMatrix = asBones[bone.iParent].mOffsetMatrix * pc->mTransformation;
+ }
+
pc->mParent = pcNode;
// add children to this node, too
@@ -483,31 +453,23 @@ void SMDImporter::AddBoneChildren(aiNode* pcNode, uint32_t iParent)
// ------------------------------------------------------------------------------------------------
// create output nodes
-void SMDImporter::CreateOutputNodes()
-{
+void SMDImporter::CreateOutputNodes() {
pScene->mRootNode = new aiNode();
- if (!(pScene->mFlags & AI_SCENE_FLAGS_INCOMPLETE))
- {
- // create one root node that renders all meshes
- pScene->mRootNode->mNumMeshes = pScene->mNumMeshes;
- pScene->mRootNode->mMeshes = new unsigned int[pScene->mNumMeshes];
- for (unsigned int i = 0; i < pScene->mNumMeshes;++i)
- pScene->mRootNode->mMeshes[i] = i;
- }
// now add all bones as dummy sub nodes to the graph
- // AddBoneChildren(pScene->mRootNode,(uint32_t)-1);
+ AddBoneChildren(pScene->mRootNode,(uint32_t)-1);
+ for (auto &bone : asBones) {
+ bone.mOffsetMatrix.Inverse();
+ }
// if we have only one bone we can even remove the root node
- if (pScene->mFlags & AI_SCENE_FLAGS_INCOMPLETE &&
- 1 == pScene->mRootNode->mNumChildren)
- {
+ if (pScene->mFlags & AI_SCENE_FLAGS_INCOMPLETE && 1 == pScene->mRootNode->mNumChildren) {
aiNode* pcOldRoot = pScene->mRootNode;
pScene->mRootNode = pcOldRoot->mChildren[0];
- pcOldRoot->mChildren[0] = NULL;
+ pcOldRoot->mChildren[0] = nullptr;
delete pcOldRoot;
- pScene->mRootNode->mParent = NULL;
+ pScene->mRootNode->mParent = nullptr;
}
else
{
@@ -518,60 +480,63 @@ void SMDImporter::CreateOutputNodes()
// ------------------------------------------------------------------------------------------------
// create output animations
-void SMDImporter::CreateOutputAnimations()
-{
- unsigned int iNumBones = 0;
- for (std::vector<SMD::Bone>::const_iterator
- i = asBones.begin();
- i != asBones.end();++i)
- {
- if ((*i).bIsUsed)++iNumBones;
+void SMDImporter::CreateOutputAnimations(const std::string &pFile, IOSystem* pIOHandler) {
+ std::vector<std::tuple<std::string, std::string>> animFileList;
+
+ if (bLoadAnimationList) {
+ GetAnimationFileList(pFile, pIOHandler, animFileList);
}
- if (!iNumBones)
- {
- // just make sure this case doesn't occur ... (it could occur
- // if the file was invalid)
- return;
+ int animCount = animFileList.size() + 1;
+ pScene->mNumAnimations = 1;
+ pScene->mAnimations = new aiAnimation*[animCount];
+ memset(pScene->mAnimations, 0, sizeof(aiAnimation*)*animCount);
+ CreateOutputAnimation(0, "");
+
+ for (auto &animFile : animFileList) {
+ ReadSmd(std::get<1>(animFile), pIOHandler);
+ if (asBones.empty()) {
+ continue;
+ }
+
+ FixTimeValues();
+ CreateOutputAnimation(pScene->mNumAnimations++, std::get<0>(animFile));
}
+}
- pScene->mNumAnimations = 1;
- pScene->mAnimations = new aiAnimation*[1];
- aiAnimation*& anim = pScene->mAnimations[0] = new aiAnimation();
+void SMDImporter::CreateOutputAnimation(int index, const std::string &name) {
+ aiAnimation*& anim = pScene->mAnimations[index] = new aiAnimation();
+ if (name.length()) {
+ anim->mName.Set(name.c_str());
+ }
anim->mDuration = dLengthOfAnim;
- anim->mNumChannels = iNumBones;
+ anim->mNumChannels = asBones.size();
anim->mTicksPerSecond = 25.0; // FIXME: is this correct?
aiNodeAnim** pp = anim->mChannels = new aiNodeAnim*[anim->mNumChannels];
// now build valid keys
unsigned int a = 0;
- for (std::vector<SMD::Bone>::const_iterator
- i = asBones.begin();
- i != asBones.end();++i)
- {
- if (!(*i).bIsUsed)continue;
-
+ for (std::vector<SMD::Bone>::const_iterator i = asBones.begin(); i != asBones.end(); ++i) {
aiNodeAnim* p = pp[a] = new aiNodeAnim();
// copy the name of the bone
- p->mNodeName.Set( i->mName);
+ p->mNodeName.Set(i->mName);
- p->mNumRotationKeys = (unsigned int) (*i).sAnim.asKeys.size();
- if (p->mNumRotationKeys)
- {
+ p->mNumRotationKeys = (unsigned int)(*i).sAnim.asKeys.size();
+ if (p->mNumRotationKeys){
p->mNumPositionKeys = p->mNumRotationKeys;
aiVectorKey* pVecKeys = p->mPositionKeys = new aiVectorKey[p->mNumRotationKeys];
aiQuatKey* pRotKeys = p->mRotationKeys = new aiQuatKey[p->mNumRotationKeys];
for (std::vector<SMD::Bone::Animation::MatrixKey>::const_iterator
- qq = (*i).sAnim.asKeys.begin();
- qq != (*i).sAnim.asKeys.end(); ++qq)
- {
+ qq = (*i).sAnim.asKeys.begin();
+ qq != (*i).sAnim.asKeys.end(); ++qq) {
pRotKeys->mTime = pVecKeys->mTime = (*qq).dTime;
// compute the rotation quaternion from the euler angles
- pRotKeys->mValue = aiQuaternion( (*qq).vRot.x, (*qq).vRot.y, (*qq).vRot.z );
+ // aiQuaternion: The order of the parameters is yzx?
+ pRotKeys->mValue = aiQuaternion((*qq).vRot.y, (*qq).vRot.z, (*qq).vRot.x);
pVecKeys->mValue = (*qq).vPos;
++pVecKeys; ++pRotKeys;
@@ -583,77 +548,65 @@ void SMDImporter::CreateOutputAnimations()
}
}
-// ------------------------------------------------------------------------------------------------
-void SMDImporter::ComputeAbsoluteBoneTransformations()
-{
- // For each bone: determine the key with the lowest time value
- // theoretically the SMD format should have all keyframes
- // in order. However, I've seen a file where this wasn't true.
- for (unsigned int i = 0; i < asBones.size();++i)
- {
- SMD::Bone& bone = asBones[i];
+void SMDImporter::GetAnimationFileList(const std::string &pFile, IOSystem* pIOHandler, std::vector<std::tuple<std::string, std::string>>& outList) {
+ auto base = DefaultIOSystem::absolutePath(pFile);
+ auto name = DefaultIOSystem::completeBaseName(pFile);
+ auto path = base + "/" + name + "_animation.txt";
- uint32_t iIndex = 0;
- double dMin = 10e10;
- for (unsigned int i = 0; i < bone.sAnim.asKeys.size();++i)
- {
- double d = std::min(bone.sAnim.asKeys[i].dTime,dMin);
- if (d < dMin)
- {
- dMin = d;
- iIndex = i;
- }
- }
- bone.sAnim.iFirstTimeKey = iIndex;
+ std::unique_ptr<IOStream> file(pIOHandler->Open(path.c_str(), "rb"));
+ if (file.get() == nullptr) {
+ return;
}
- unsigned int iParent = 0;
- while (iParent < asBones.size())
- {
- for (unsigned int iBone = 0; iBone < asBones.size();++iBone)
- {
- SMD::Bone& bone = asBones[iBone];
-
- if (iParent == bone.iParent)
- {
- SMD::Bone& parentBone = asBones[iParent];
-
-
- uint32_t iIndex = bone.sAnim.iFirstTimeKey;
- const aiMatrix4x4& mat = bone.sAnim.asKeys[iIndex].matrix;
- aiMatrix4x4& matOut = bone.sAnim.asKeys[iIndex].matrixAbsolute;
-
- // The same for the parent bone ...
- iIndex = parentBone.sAnim.iFirstTimeKey;
- const aiMatrix4x4& mat2 = parentBone.sAnim.asKeys[iIndex].matrixAbsolute;
-
- // Compute the absolute transformation matrix
- matOut = mat * mat2;
+ // Allocate storage and copy the contents of the file to a memory buffer
+ std::vector<char> buf;
+ size_t fileSize = file->FileSize();
+ buf.resize(fileSize + 1);
+ TextFileToBuffer(file.get(), buf);
+
+ /*
+ *_animation.txt format:
+ name path
+ idle idle.smd
+ jump anim/jump.smd
+ walk.smd
+ ...
+ */
+ std::string animName, animPath;
+ char *tok1, *tok2;
+ char *context1, *context2;
+
+ tok1 = strtok_s(&buf[0], "\r\n", &context1);
+ while (tok1 != NULL) {
+ tok2 = strtok_s(tok1, " \t", &context2);
+ if (tok2) {
+ char *p = tok2;
+ tok2 = strtok_s(nullptr, " \t", &context2);
+ if (tok2) {
+ animPath = tok2;
+ animName = p;
+ } else {
+ // No name
+ animPath = p;
+ animName = DefaultIOSystem::completeBaseName(animPath);
}
+ outList.push_back(std::make_tuple(animName, base + "/" + animPath));
}
- ++iParent;
- }
-
- // Store the inverse of the absolute transformation matrix
- // of the first key as bone offset matrix
- for (iParent = 0; iParent < asBones.size();++iParent)
- {
- SMD::Bone& bone = asBones[iParent];
- bone.mOffsetMatrix = bone.sAnim.asKeys[bone.sAnim.iFirstTimeKey].matrixAbsolute;
- bone.mOffsetMatrix.Inverse();
+ tok1 = strtok_s(nullptr, "\r\n", &context1);
}
}
-\
+
// ------------------------------------------------------------------------------------------------
// create output materials
-void SMDImporter::CreateOutputMaterials()
-{
+void SMDImporter::CreateOutputMaterials() {
+ ai_assert( nullptr != pScene );
+
pScene->mNumMaterials = (unsigned int)aszTextures.size();
pScene->mMaterials = new aiMaterial*[std::max(1u, pScene->mNumMaterials)];
- for (unsigned int iMat = 0; iMat < pScene->mNumMaterials;++iMat)
- {
+ for (unsigned int iMat = 0; iMat < pScene->mNumMaterials; ++iMat) {
aiMaterial* pcMat = new aiMaterial();
+ ai_assert( nullptr != pcMat );
pScene->mMaterials[iMat] = pcMat;
aiString szName;
@@ -669,14 +622,13 @@ void SMDImporter::CreateOutputMaterials()
}
// create a default material if necessary
- if (0 == pScene->mNumMaterials)
- {
+ if (0 == pScene->mNumMaterials) {
pScene->mNumMaterials = 1;
aiMaterial* pcHelper = new aiMaterial();
pScene->mMaterials[0] = pcHelper;
- int iMode = (int)aiShadingMode_Gouraud;
+ int iMode = static_cast<int>(aiShadingMode_Gouraud);
pcHelper->AddProperty<int>(&iMode, 1, AI_MATKEY_SHADING_MODEL);
aiColor3D clr;
@@ -695,66 +647,94 @@ void SMDImporter::CreateOutputMaterials()
// ------------------------------------------------------------------------------------------------
// Parse the file
-void SMDImporter::ParseFile()
-{
+void SMDImporter::ParseFile() {
const char* szCurrent = &mBuffer[0];
// read line per line ...
- for ( ;; )
- {
- if(!SkipSpacesAndLineEnd(szCurrent,&szCurrent)) break;
+ for ( ;; ) {
+ if(!SkipSpacesAndLineEnd(szCurrent,&szCurrent)) {
+ break;
+ }
// "version <n> \n", <n> should be 1 for hl and hl2 SMD files
- if (TokenMatch(szCurrent,"version",7))
- {
+ if (TokenMatch(szCurrent,"version",7)) {
if(!SkipSpaces(szCurrent,&szCurrent)) break;
- if (1 != strtoul10(szCurrent,&szCurrent))
- {
- DefaultLogger::get()->warn("SMD.version is not 1. This "
+ if (1 != strtoul10(szCurrent,&szCurrent)) {
+ ASSIMP_LOG_WARN("SMD.version is not 1. This "
"file format is not known. Continuing happily ...");
}
continue;
}
// "nodes\n" - Starts the node section
- if (TokenMatch(szCurrent,"nodes",5))
- {
+ if (TokenMatch(szCurrent,"nodes",5)) {
ParseNodesSection(szCurrent,&szCurrent);
continue;
}
// "triangles\n" - Starts the triangle section
- if (TokenMatch(szCurrent,"triangles",9))
- {
+ if (TokenMatch(szCurrent,"triangles",9)) {
ParseTrianglesSection(szCurrent,&szCurrent);
continue;
}
// "vertexanimation\n" - Starts the vertex animation section
- if (TokenMatch(szCurrent,"vertexanimation",15))
- {
+ if (TokenMatch(szCurrent,"vertexanimation",15)) {
bHasUVs = false;
ParseVASection(szCurrent,&szCurrent);
continue;
}
// "skeleton\n" - Starts the skeleton section
- if (TokenMatch(szCurrent,"skeleton",8))
- {
+ if (TokenMatch(szCurrent,"skeleton",8)) {
ParseSkeletonSection(szCurrent,&szCurrent);
continue;
}
SkipLine(szCurrent,&szCurrent);
}
- return;
+}
+
+void SMDImporter::ReadSmd(const std::string &pFile, IOSystem* pIOHandler) {
+ std::unique_ptr<IOStream> file(pIOHandler->Open(pFile, "rb"));
+
+ // Check whether we can read from the file
+ if (file.get() == nullptr) {
+ throw DeadlyImportError("Failed to open SMD/VTA file " + pFile + ".");
+ }
+
+ iFileSize = (unsigned int)file->FileSize();
+
+ // Allocate storage and copy the contents of the file to a memory buffer
+ mBuffer.resize(iFileSize + 1);
+ TextFileToBuffer(file.get(), mBuffer);
+
+ iSmallestFrame = INT_MAX;
+ bHasUVs = true;
+ iLineNumber = 1;
+
+ // Reserve enough space for ... hm ... 10 textures
+ aszTextures.reserve(10);
+
+ // Reserve enough space for ... hm ... 1000 triangles
+ asTriangles.reserve(1000);
+
+ // Reserve enough space for ... hm ... 20 bones
+ asBones.reserve(20);
+
+ aszTextures.clear();
+ asTriangles.clear();
+ asBones.clear();
+
+ // parse the file ...
+ ParseFile();
}
// ------------------------------------------------------------------------------------------------
-unsigned int SMDImporter::GetTextureIndex(const std::string& filename)
-{
+unsigned int SMDImporter::GetTextureIndex(const std::string& filename) {
unsigned int iIndex = 0;
for (std::vector<std::string>::const_iterator
- i = aszTextures.begin();
- i != aszTextures.end();++i,++iIndex)
- {
+ i = aszTextures.begin();
+ i != aszTextures.end();++i,++iIndex) {
// case-insensitive ... it's a path
- if (0 == ASSIMP_stricmp ( filename.c_str(),(*i).c_str()))return iIndex;
+ if (0 == ASSIMP_stricmp ( filename.c_str(),(*i).c_str())) {
+ return iIndex;
+ }
}
iIndex = (unsigned int)aszTextures.size();
aszTextures.push_back(filename);
@@ -763,15 +743,10 @@ unsigned int SMDImporter::GetTextureIndex(const std::string& filename)
// ------------------------------------------------------------------------------------------------
// Parse the nodes section of the file
-void SMDImporter::ParseNodesSection(const char* szCurrent,
- const char** szCurrentOut)
-{
- for ( ;; )
- {
+void SMDImporter::ParseNodesSection(const char* szCurrent, const char** szCurrentOut) {
+ for ( ;; ) {
// "end\n" - Ends the nodes section
- if (0 == ASSIMP_strincmp(szCurrent,"end",3) &&
- IsSpaceOrNewLine(*(szCurrent+3)))
- {
+ if (0 == ASSIMP_strincmp(szCurrent,"end",3) && IsSpaceOrNewLine(*(szCurrent+3))) {
szCurrent += 4;
break;
}
@@ -783,18 +758,18 @@ void SMDImporter::ParseNodesSection(const char* szCurrent,
// ------------------------------------------------------------------------------------------------
// Parse the triangles section of the file
-void SMDImporter::ParseTrianglesSection(const char* szCurrent,
- const char** szCurrentOut)
-{
+void SMDImporter::ParseTrianglesSection(const char* szCurrent, const char** szCurrentOut) {
// Parse a triangle, parse another triangle, parse the next triangle ...
// and so on until we reach a token that looks quite similar to "end"
- for ( ;; )
- {
- if(!SkipSpacesAndLineEnd(szCurrent,&szCurrent)) break;
+ for ( ;; ) {
+ if(!SkipSpacesAndLineEnd(szCurrent,&szCurrent)) {
+ break;
+ }
// "end\n" - Ends the triangles section
- if (TokenMatch(szCurrent,"end",3))
+ if (TokenMatch(szCurrent,"end",3)) {
break;
+ }
ParseTriangle(szCurrent,&szCurrent);
}
SkipSpacesAndLineEnd(szCurrent,&szCurrent);
@@ -802,40 +777,39 @@ void SMDImporter::ParseTrianglesSection(const char* szCurrent,
}
// ------------------------------------------------------------------------------------------------
// Parse the vertex animation section of the file
-void SMDImporter::ParseVASection(const char* szCurrent,
- const char** szCurrentOut)
-{
+void SMDImporter::ParseVASection(const char* szCurrent, const char** szCurrentOut) {
unsigned int iCurIndex = 0;
- for ( ;; )
- {
- if(!SkipSpacesAndLineEnd(szCurrent,&szCurrent)) break;
+ for ( ;; ) {
+ if (!SkipSpacesAndLineEnd(szCurrent,&szCurrent)) {
+ break;
+ }
// "end\n" - Ends the "vertexanimation" section
- if (TokenMatch(szCurrent,"end",3))
+ if (TokenMatch(szCurrent,"end",3)) {
break;
+ }
// "time <n>\n"
- if (TokenMatch(szCurrent,"time",4))
- {
+ if (TokenMatch(szCurrent,"time",4)) {
// NOTE: The doc says that time values COULD be negative ...
// NOTE2: this is the shape key -> valve docs
int iTime = 0;
- if(!ParseSignedInt(szCurrent,&szCurrent,iTime) || configFrameID != (unsigned int)iTime)break;
+ if(!ParseSignedInt(szCurrent,&szCurrent,iTime) || configFrameID != (unsigned int)iTime) {
+ break;
+ }
SkipLine(szCurrent,&szCurrent);
- }
- else
- {
- if(0 == iCurIndex)
- {
+ } else {
+ if(0 == iCurIndex) {
asTriangles.push_back(SMD::Face());
}
- if (++iCurIndex == 3)iCurIndex = 0;
+ if (++iCurIndex == 3) {
+ iCurIndex = 0;
+ }
ParseVertex(szCurrent,&szCurrent,asTriangles.back().avVertices[iCurIndex],true);
}
}
- if (iCurIndex != 2 && !asTriangles.empty())
- {
+ if (iCurIndex != 2 && !asTriangles.empty()) {
// we want to no degenerates, so throw this triangle away
asTriangles.pop_back();
}
@@ -843,30 +817,30 @@ void SMDImporter::ParseVASection(const char* szCurrent,
SkipSpacesAndLineEnd(szCurrent,&szCurrent);
*szCurrentOut = szCurrent;
}
+
// ------------------------------------------------------------------------------------------------
// Parse the skeleton section of the file
-void SMDImporter::ParseSkeletonSection(const char* szCurrent,
- const char** szCurrentOut)
-{
+void SMDImporter::ParseSkeletonSection(const char* szCurrent, const char** szCurrentOut) {
int iTime = 0;
- for ( ;; )
- {
- if(!SkipSpacesAndLineEnd(szCurrent,&szCurrent)) break;
+ for ( ;; ) {
+ if (!SkipSpacesAndLineEnd(szCurrent,&szCurrent)) {
+ break;
+ }
// "end\n" - Ends the skeleton section
- if (TokenMatch(szCurrent,"end",3))
+ if (TokenMatch(szCurrent,"end",3)) {
break;
-
+ } else if (TokenMatch(szCurrent,"time",4)) {
// "time <n>\n" - Specifies the current animation frame
- else if (TokenMatch(szCurrent,"time",4))
- {
- // NOTE: The doc says that time values COULD be negative ...
- if(!ParseSignedInt(szCurrent,&szCurrent,iTime))break;
+ if(!ParseSignedInt(szCurrent,&szCurrent,iTime)) {
+ break;
+ }
iSmallestFrame = std::min(iSmallestFrame,iTime);
SkipLine(szCurrent,&szCurrent);
+ } else {
+ ParseSkeletonElement(szCurrent,&szCurrent,iTime);
}
- else ParseSkeletonElement(szCurrent,&szCurrent,iTime);
}
*szCurrentOut = szCurrent;
}
@@ -879,45 +853,38 @@ void SMDImporter::ParseSkeletonSection(const char* szCurrent,
}
// ------------------------------------------------------------------------------------------------
// Parse a node line
-void SMDImporter::ParseNodeInfo(const char* szCurrent,
- const char** szCurrentOut)
-{
+void SMDImporter::ParseNodeInfo(const char* szCurrent, const char** szCurrentOut) {
unsigned int iBone = 0;
SkipSpacesAndLineEnd(szCurrent,&szCurrent);
- if(!ParseUnsignedInt(szCurrent,&szCurrent,iBone) || !SkipSpaces(szCurrent,&szCurrent))
- {
+ if ( !ParseUnsignedInt(szCurrent,&szCurrent,iBone) || !SkipSpaces(szCurrent,&szCurrent)) {
LogErrorNoThrow("Unexpected EOF/EOL while parsing bone index");
SMDI_PARSE_RETURN;
}
// add our bone to the list
- if (iBone >= asBones.size())asBones.resize(iBone+1);
+ if (iBone >= asBones.size()) {
+ asBones.resize(iBone+1);
+ }
SMD::Bone& bone = asBones[iBone];
bool bQuota = true;
- if ('\"' != *szCurrent)
- {
+ if ('\"' != *szCurrent) {
LogWarning("Bone name is expcted to be enclosed in "
"double quotation marks. ");
bQuota = false;
+ } else {
+ ++szCurrent;
}
- else ++szCurrent;
const char* szEnd = szCurrent;
- for ( ;; )
- {
- if (bQuota && '\"' == *szEnd)
- {
+ for ( ;; ) {
+ if (bQuota && '\"' == *szEnd) {
iBone = (unsigned int)(szEnd - szCurrent);
++szEnd;
break;
- }
- else if (IsSpaceOrNewLine(*szEnd))
- {
+ } else if (!bQuota && IsSpaceOrNewLine(*szEnd)) {
iBone = (unsigned int)(szEnd - szCurrent);
break;
- }
- else if (!(*szEnd))
- {
+ } else if (!(*szEnd)) {
LogErrorNoThrow("Unexpected EOF/EOL while parsing bone name");
SMDI_PARSE_RETURN;
}
@@ -927,8 +894,7 @@ void SMDImporter::ParseNodeInfo(const char* szCurrent,
szCurrent = szEnd;
// the only negative bone parent index that could occur is -1 AFAIK
- if(!ParseSignedInt(szCurrent,&szCurrent,(int&)bone.iParent))
- {
+ if(!ParseSignedInt(szCurrent,&szCurrent,(int&)bone.iParent)) {
LogErrorNoThrow("Unexpected EOF/EOL while parsing bone parent index. Assuming -1");
SMDI_PARSE_RETURN;
}
@@ -939,20 +905,16 @@ void SMDImporter::ParseNodeInfo(const char* szCurrent,
// ------------------------------------------------------------------------------------------------
// Parse a skeleton element
-void SMDImporter::ParseSkeletonElement(const char* szCurrent,
- const char** szCurrentOut,int iTime)
-{
+void SMDImporter::ParseSkeletonElement(const char* szCurrent, const char** szCurrentOut,int iTime) {
aiVector3D vPos;
aiVector3D vRot;
unsigned int iBone = 0;
- if(!ParseUnsignedInt(szCurrent,&szCurrent,iBone))
- {
- DefaultLogger::get()->error("Unexpected EOF/EOL while parsing bone index");
+ if(!ParseUnsignedInt(szCurrent,&szCurrent,iBone)) {
+ ASSIMP_LOG_ERROR("Unexpected EOF/EOL while parsing bone index");
SMDI_PARSE_RETURN;
}
- if (iBone >= asBones.size())
- {
+ if (iBone >= asBones.size()) {
LogErrorNoThrow("Bone index in skeleton section is out of range");
SMDI_PARSE_RETURN;
}
@@ -962,60 +924,51 @@ void SMDImporter::ParseSkeletonElement(const char* szCurrent,
SMD::Bone::Animation::MatrixKey& key = bone.sAnim.asKeys.back();
key.dTime = (double)iTime;
- if(!ParseFloat(szCurrent,&szCurrent,(float&)vPos.x))
- {
+ if(!ParseFloat(szCurrent,&szCurrent,(float&)vPos.x)) {
LogErrorNoThrow("Unexpected EOF/EOL while parsing bone.pos.x");
SMDI_PARSE_RETURN;
}
- if(!ParseFloat(szCurrent,&szCurrent,(float&)vPos.y))
- {
+ if(!ParseFloat(szCurrent,&szCurrent,(float&)vPos.y)) {
LogErrorNoThrow("Unexpected EOF/EOL while parsing bone.pos.y");
SMDI_PARSE_RETURN;
}
- if(!ParseFloat(szCurrent,&szCurrent,(float&)vPos.z))
- {
+ if(!ParseFloat(szCurrent,&szCurrent,(float&)vPos.z)) {
LogErrorNoThrow("Unexpected EOF/EOL while parsing bone.pos.z");
SMDI_PARSE_RETURN;
}
- if(!ParseFloat(szCurrent,&szCurrent,(float&)vRot.x))
- {
+ if(!ParseFloat(szCurrent,&szCurrent,(float&)vRot.x)) {
LogErrorNoThrow("Unexpected EOF/EOL while parsing bone.rot.x");
SMDI_PARSE_RETURN;
}
- if(!ParseFloat(szCurrent,&szCurrent,(float&)vRot.y))
- {
+ if(!ParseFloat(szCurrent,&szCurrent,(float&)vRot.y)) {
LogErrorNoThrow("Unexpected EOF/EOL while parsing bone.rot.y");
SMDI_PARSE_RETURN;
}
- if(!ParseFloat(szCurrent,&szCurrent,(float&)vRot.z))
- {
+ if(!ParseFloat(szCurrent,&szCurrent,(float&)vRot.z)) {
LogErrorNoThrow("Unexpected EOF/EOL while parsing bone.rot.z");
SMDI_PARSE_RETURN;
}
// build the transformation matrix of the key
- key.matrix.FromEulerAnglesXYZ(vRot.x,vRot.y,vRot.z);
- {
+ key.matrix.FromEulerAnglesXYZ(vRot.x,vRot.y,vRot.z); {
aiMatrix4x4 mTemp;
mTemp.a4 = vPos.x;
mTemp.b4 = vPos.y;
mTemp.c4 = vPos.z;
- key.matrix = key.matrix * mTemp;
+ key.matrix = mTemp * key.matrix;
}
-
+ key.vPos = vPos;
+ key.vRot = vRot;
// go to the beginning of the next line
SMDI_PARSE_RETURN;
}
// ------------------------------------------------------------------------------------------------
// Parse a triangle
-void SMDImporter::ParseTriangle(const char* szCurrent,
- const char** szCurrentOut)
-{
+void SMDImporter::ParseTriangle(const char* szCurrent, const char** szCurrentOut) {
asTriangles.push_back(SMD::Face());
SMD::Face& face = asTriangles.back();
- if(!SkipSpaces(szCurrent,&szCurrent))
- {
+ if(!SkipSpaces(szCurrent,&szCurrent)) {
LogErrorNoThrow("Unexpected EOF/EOL while parsing a triangle");
return;
}
@@ -1030,21 +983,18 @@ void SMDImporter::ParseTriangle(const char* szCurrent,
SkipSpacesAndLineEnd(szCurrent,&szCurrent);
// load three vertices
- for (unsigned int iVert = 0; iVert < 3;++iVert)
- {
- ParseVertex(szCurrent,&szCurrent,
- face.avVertices[iVert]);
+ for (unsigned int iVert = 0; iVert < 3;++iVert) {
+ ParseVertex(szCurrent,&szCurrent, face.avVertices[iVert]);
}
*szCurrentOut = szCurrent;
}
// ------------------------------------------------------------------------------------------------
// Parse a float
-bool SMDImporter::ParseFloat(const char* szCurrent,
- const char** szCurrentOut, float& out)
-{
- if(!SkipSpaces(&szCurrent))
+bool SMDImporter::ParseFloat(const char* szCurrent, const char** szCurrentOut, float& out) {
+ if(!SkipSpaces(&szCurrent)) {
return false;
+ }
*szCurrentOut = fast_atoreal_move<float>(szCurrent,out);
return true;
@@ -1052,11 +1002,10 @@ bool SMDImporter::ParseFloat(const char* szCurrent,
// ------------------------------------------------------------------------------------------------
// Parse an unsigned int
-bool SMDImporter::ParseUnsignedInt(const char* szCurrent,
- const char** szCurrentOut, unsigned int& out)
-{
- if(!SkipSpaces(&szCurrent))
+bool SMDImporter::ParseUnsignedInt(const char* szCurrent, const char** szCurrentOut, unsigned int& out) {
+ if(!SkipSpaces(&szCurrent)) {
return false;
+ }
out = strtoul10(szCurrent,szCurrentOut);
return true;
@@ -1064,11 +1013,10 @@ bool SMDImporter::ParseUnsignedInt(const char* szCurrent,
// ------------------------------------------------------------------------------------------------
// Parse a signed int
-bool SMDImporter::ParseSignedInt(const char* szCurrent,
- const char** szCurrentOut, int& out)
-{
- if(!SkipSpaces(&szCurrent))
+bool SMDImporter::ParseSignedInt(const char* szCurrent, const char** szCurrentOut, int& out) {
+ if(!SkipSpaces(&szCurrent)) {
return false;
+ }
out = strtol10(szCurrent,szCurrentOut);
return true;
@@ -1077,59 +1025,50 @@ bool SMDImporter::ParseSignedInt(const char* szCurrent,
// ------------------------------------------------------------------------------------------------
// Parse a vertex
void SMDImporter::ParseVertex(const char* szCurrent,
- const char** szCurrentOut, SMD::Vertex& vertex,
- bool bVASection /*= false*/)
-{
- if (SkipSpaces(&szCurrent) && IsLineEnd(*szCurrent))
- {
+ const char** szCurrentOut, SMD::Vertex& vertex,
+ bool bVASection /*= false*/) {
+ if (SkipSpaces(&szCurrent) && IsLineEnd(*szCurrent)) {
SkipSpacesAndLineEnd(szCurrent,&szCurrent);
return ParseVertex(szCurrent,szCurrentOut,vertex,bVASection);
}
- if(!ParseSignedInt(szCurrent,&szCurrent,(int&)vertex.iParentNode))
- {
+ if(!ParseSignedInt(szCurrent,&szCurrent,(int&)vertex.iParentNode)) {
LogErrorNoThrow("Unexpected EOF/EOL while parsing vertex.parent");
SMDI_PARSE_RETURN;
}
- if(!ParseFloat(szCurrent,&szCurrent,(float&)vertex.pos.x))
- {
+ if(!ParseFloat(szCurrent,&szCurrent,(float&)vertex.pos.x)) {
LogErrorNoThrow("Unexpected EOF/EOL while parsing vertex.pos.x");
SMDI_PARSE_RETURN;
}
- if(!ParseFloat(szCurrent,&szCurrent,(float&)vertex.pos.y))
- {
+ if(!ParseFloat(szCurrent,&szCurrent,(float&)vertex.pos.y)) {
LogErrorNoThrow("Unexpected EOF/EOL while parsing vertex.pos.y");
SMDI_PARSE_RETURN;
}
- if(!ParseFloat(szCurrent,&szCurrent,(float&)vertex.pos.z))
- {
+ if(!ParseFloat(szCurrent,&szCurrent,(float&)vertex.pos.z)) {
LogErrorNoThrow("Unexpected EOF/EOL while parsing vertex.pos.z");
SMDI_PARSE_RETURN;
}
- if(!ParseFloat(szCurrent,&szCurrent,(float&)vertex.nor.x))
- {
+ if(!ParseFloat(szCurrent,&szCurrent,(float&)vertex.nor.x)) {
LogErrorNoThrow("Unexpected EOF/EOL while parsing vertex.nor.x");
SMDI_PARSE_RETURN;
}
- if(!ParseFloat(szCurrent,&szCurrent,(float&)vertex.nor.y))
- {
+ if(!ParseFloat(szCurrent,&szCurrent,(float&)vertex.nor.y)) {
LogErrorNoThrow("Unexpected EOF/EOL while parsing vertex.nor.y");
SMDI_PARSE_RETURN;
}
- if(!ParseFloat(szCurrent,&szCurrent,(float&)vertex.nor.z))
- {
+ if(!ParseFloat(szCurrent,&szCurrent,(float&)vertex.nor.z)) {
LogErrorNoThrow("Unexpected EOF/EOL while parsing vertex.nor.z");
SMDI_PARSE_RETURN;
}
- if (bVASection)SMDI_PARSE_RETURN;
+ if (bVASection) {
+ SMDI_PARSE_RETURN;
+ }
- if(!ParseFloat(szCurrent,&szCurrent,(float&)vertex.uv.x))
- {
+ if(!ParseFloat(szCurrent,&szCurrent,(float&)vertex.uv.x)) {
LogErrorNoThrow("Unexpected EOF/EOL while parsing vertex.uv.x");
SMDI_PARSE_RETURN;
}
- if(!ParseFloat(szCurrent,&szCurrent,(float&)vertex.uv.y))
- {
+ if(!ParseFloat(szCurrent,&szCurrent,(float&)vertex.uv.y)) {
LogErrorNoThrow("Unexpected EOF/EOL while parsing vertex.uv.y");
SMDI_PARSE_RETURN;
}
@@ -1137,17 +1076,20 @@ void SMDImporter::ParseVertex(const char* szCurrent,
// now read the number of bones affecting this vertex
// all elements from now are fully optional, we don't need them
unsigned int iSize = 0;
- if(!ParseUnsignedInt(szCurrent,&szCurrent,iSize))SMDI_PARSE_RETURN;
+ if(!ParseUnsignedInt(szCurrent,&szCurrent,iSize)) {
+ SMDI_PARSE_RETURN;
+ }
vertex.aiBoneLinks.resize(iSize,std::pair<unsigned int, float>(0,0.0f));
for (std::vector<std::pair<unsigned int, float> >::iterator
- i = vertex.aiBoneLinks.begin();
- i != vertex.aiBoneLinks.end();++i)
- {
- if(!ParseUnsignedInt(szCurrent,&szCurrent,(*i).first))
+ i = vertex.aiBoneLinks.begin();
+ i != vertex.aiBoneLinks.end();++i) {
+ if(!ParseUnsignedInt(szCurrent,&szCurrent,(*i).first)) {
SMDI_PARSE_RETURN;
- if(!ParseFloat(szCurrent,&szCurrent,(*i).second))
+ }
+ if(!ParseFloat(szCurrent,&szCurrent,(*i).second)) {
SMDI_PARSE_RETURN;
+ }
}
// go to the beginning of the next line
diff --git a/code/SMDLoader.h b/code/SMDLoader.h
index c50b327e3..a791e7dde 100644
--- a/code/SMDLoader.h
+++ b/code/SMDLoader.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -47,8 +48,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define AI_SMDLOADER_H_INCLUDED
// internal headers
-#include "BaseImporter.h"
-#include "ParsingUtils.h"
+#include <assimp/BaseImporter.h>
+#include <assimp/ParsingUtils.h>
// public Assimp headers
#include <assimp/types.h>
@@ -61,17 +62,17 @@ struct aiNode;
// STL headers
#include <vector>
-namespace Assimp {
-
-namespace SMD {
+namespace Assimp {
+namespace SMD {
// ---------------------------------------------------------------------------
/** Data structure for a vertex in a SMD file
*/
-struct Vertex
-{
- Vertex() : iParentNode(UINT_MAX)
- {}
+struct Vertex {
+ Vertex() AI_NO_EXCEPT
+ : iParentNode(UINT_MAX) {
+ // empty
+ }
//! Vertex position, normal and texture coordinate
aiVector3D pos,nor,uv;
@@ -89,10 +90,12 @@ struct Vertex
// ---------------------------------------------------------------------------
/** Data structure for a face in a SMD file
*/
-struct Face
-{
- Face() : iTexture(0x0)
- {}
+struct Face {
+ Face() AI_NO_EXCEPT
+ : iTexture(0x0)
+ , avVertices{} {
+ // empty
+ }
//! Texture index for the face
unsigned int iTexture;
@@ -104,11 +107,12 @@ struct Face
// ---------------------------------------------------------------------------
/** Data structure for a bone in a SMD file
*/
-struct Bone
-{
+struct Bone {
//! Default constructor
- Bone() : iParent(UINT_MAX), bIsUsed(false)
- {
+ Bone() AI_NO_EXCEPT
+ : iParent(UINT_MAX)
+ , bIsUsed(false) {
+ // empty
}
//! Destructor
@@ -123,12 +127,10 @@ struct Bone
uint32_t iParent;
//! Animation of the bone
- struct Animation
- {
+ struct Animation {
//! Public default constructor
- Animation()
- : iFirstTimeKey()
- {
+ Animation() AI_NO_EXCEPT
+ : iFirstTimeKey() {
asKeys.reserve(20);
}
@@ -217,6 +219,7 @@ protected:
/** Parse the SMD file and create the output scene
*/
void ParseFile();
+ void ReadSmd(const std::string &pFile, IOSystem* pIOHandler);
// -------------------------------------------------------------------
/** Parse the triangles section of the SMD file
@@ -288,13 +291,6 @@ protected:
unsigned int GetTextureIndex(const std::string& filename);
// -------------------------------------------------------------------
- /** Computes absolute bone transformations
- * All output transformations are in worldspace.
- */
- void ComputeAbsoluteBoneTransformations();
-
-
- // -------------------------------------------------------------------
/** Parse a line in the skeleton section
*/
void ParseSkeletonElement(const char* szCurrent,
@@ -342,7 +338,9 @@ protected:
*/
void CreateOutputMeshes();
void CreateOutputNodes();
- void CreateOutputAnimations();
+ void CreateOutputAnimations(const std::string &pFile, IOSystem* pIOHandler);
+ void CreateOutputAnimation(int index, const std::string &name);
+ void GetAnimationFileList(const std::string &pFile, IOSystem* pIOHandler, std::vector<std::tuple<std::string, std::string>>& outList);
void CreateOutputMaterials();
@@ -411,6 +409,8 @@ private:
*/
unsigned int iLineNumber;
+ bool bLoadAnimationList = true;
+ bool noSkeletonMesh = false;
};
} // end of namespace Assimp
diff --git a/code/STEPFile.h b/code/STEPFile.h
index 529d4edbd..f5b56c31f 100644
--- a/code/STEPFile.h
+++ b/code/STEPFile.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -55,7 +56,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
#if _MSC_VER > 1500 || (defined __GNUC___)
# define ASSIMP_STEP_USE_UNORDERED_MULTIMAP
-# else
+#else
# define step_unordered_map map
# define step_unordered_multimap multimap
#endif
@@ -71,7 +72,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# endif
#endif
-#include "LineSplitter.h"
+#include <assimp/LineSplitter.h>
// uncomment this to have the loader evaluate all entities upon loading.
// this is intended as stress test - by default, entities are evaluated
@@ -138,10 +139,10 @@ namespace STEP {
* error (i.e. an entity expects a string but receives a bool) occurs.
* It is typically coupled with both an entity id and a line number.*/
// -------------------------------------------------------------------------------
- struct TypeError : DeadlyImportError
- {
+ struct TypeError : DeadlyImportError {
enum {
- ENTITY_NOT_SPECIFIED = 0xffffffffffffffffLL
+ ENTITY_NOT_SPECIFIED = 0xffffffffffffffffLL,
+ ENTITY_NOT_SPECIFIED_32 = 0x00000000ffffffff
};
TypeError (const std::string& s,uint64_t entity = ENTITY_NOT_SPECIFIED, uint64_t line = SyntaxError::LINE_NOT_SPECIFIED);
@@ -163,7 +164,6 @@ namespace STEP {
class DataType
{
public:
-
typedef std::shared_ptr<const DataType> Out;
public:
@@ -356,53 +356,60 @@ namespace STEP {
MemberList members;
};
+ class BINARY : public PrimitiveDataType<uint32_t> {
+ public:
+ BINARY(uint32_t val)
+ : PrimitiveDataType<uint32_t>(val) {
+ // empty
+ }
+
+ BINARY()
+ : PrimitiveDataType<uint32_t>(TypeError::ENTITY_NOT_SPECIFIED_32) {
+ // empty
+ }
+ };
// -------------------------------------------------------------------------------
/* Not exactly a full EXPRESS schema but rather a list of conversion functions
* to extract valid C++ objects out of a STEP file. Those conversion functions
* may, however, perform further schema validations. */
// -------------------------------------------------------------------------------
- class ConversionSchema
- {
-
+ class ConversionSchema {
public:
-
struct SchemaEntry {
- SchemaEntry(const char* name,ConvertObjectProc func)
- : name(name)
- , func(func)
- {}
+ SchemaEntry( const char *name, ConvertObjectProc func )
+ : mName( name )
+ , mFunc(func) {
+ // empty
+ }
- const char* name;
- ConvertObjectProc func;
+ const char* mName;
+ ConvertObjectProc mFunc;
};
typedef std::map<std::string,ConvertObjectProc> ConverterMap;
- public:
-
template <size_t N>
explicit ConversionSchema( const SchemaEntry (& schemas)[N]) {
*this = schemas;
}
- ConversionSchema() {}
+ ConversionSchema() {
- public:
+ }
ConvertObjectProc GetConverterProc(const std::string& name) const {
ConverterMap::const_iterator it = converters.find(name);
- return it == converters.end() ? NULL : (*it).second;
+ return it == converters.end() ? nullptr : (*it).second;
}
-
bool IsKnownToken(const std::string& name) const {
return converters.find(name) != converters.end();
}
const char* GetStaticStringForToken(const std::string& token) const {
ConverterMap::const_iterator it = converters.find(token);
- return it == converters.end() ? NULL : (*it).first.c_str();
+ return it == converters.end() ? nullptr : (*it).first.c_str();
}
@@ -410,13 +417,12 @@ namespace STEP {
const ConversionSchema& operator=( const SchemaEntry (& schemas)[N]) {
for(size_t i = 0; i < N; ++i ) {
const SchemaEntry& schema = schemas[i];
- converters[schema.name] = schema.func;
+ converters[schema.mName] = schema.mFunc;
}
return *this;
}
private:
-
ConverterMap converters;
};
}
@@ -451,8 +457,6 @@ namespace STEP {
// empty
}
- public:
-
// utilities to simplify casting to concrete types
template <typename T>
const T& To() const {
@@ -474,7 +478,6 @@ namespace STEP {
return dynamic_cast<T*>(this);
}
- public:
uint64_t GetID() const {
return id;
}
@@ -501,9 +504,11 @@ namespace STEP {
/** CRTP shared base class for use by concrete entity implementation classes */
// ------------------------------------------------------------------------------
template <typename TDerived, size_t arg_count>
- struct ObjectHelper : virtual Object
- {
- ObjectHelper() : aux_is_derived(0) {}
+ struct ObjectHelper : virtual Object {
+ ObjectHelper()
+ : aux_is_derived(0) {
+ // empty
+ }
static Object* Construct(const STEP::DB& db, const EXPRESS::LIST& params) {
// make sure we don't leak if Fill() throws an exception
@@ -532,10 +537,16 @@ namespace STEP {
/** Class template used to represent OPTIONAL data members in the converted schema */
// ------------------------------------------------------------------------------
template <typename T>
- struct Maybe
- {
- Maybe() : have() {}
- explicit Maybe(const T& ptr) : ptr(ptr), have(true) {
+ struct Maybe {
+ Maybe()
+ : have() {
+ // empty
+ }
+
+ explicit Maybe(const T& ptr)
+ : ptr(ptr)
+ , have(true) {
+ // empty
}
@@ -572,7 +583,6 @@ namespace STEP {
}
private:
-
template <typename T2> friend struct InternGenericConvert;
operator T&() {
@@ -587,16 +597,13 @@ namespace STEP {
/** A LazyObject is created when needed. Before this happens, we just keep
the text line that contains the object definition. */
// -------------------------------------------------------------------------------
- class LazyObject
- {
+ class LazyObject {
friend class DB;
- public:
+ public:
LazyObject(DB& db, uint64_t id, uint64_t line, const char* type,const char* args);
~LazyObject();
- public:
-
Object& operator * () {
if (!obj) {
LazyInit();
@@ -654,38 +661,37 @@ namespace STEP {
}
private:
-
void LazyInit() const;
private:
-
mutable uint64_t id;
const char* const type;
DB& db;
-
mutable const char* args;
mutable Object* obj;
};
template <typename T>
- inline bool operator==( std::shared_ptr<LazyObject> lo, T whatever ) {
+ inline
+ bool operator==( std::shared_ptr<LazyObject> lo, T whatever ) {
return *lo == whatever; // XXX use std::forward if we have 0x
}
template <typename T>
- inline bool operator==( const std::pair<uint64_t, std::shared_ptr<LazyObject> >& lo, T whatever ) {
+ inline
+ bool operator==( const std::pair<uint64_t, std::shared_ptr<LazyObject> >& lo, T whatever ) {
return *(lo.second) == whatever; // XXX use std::forward if we have 0x
}
-
// ------------------------------------------------------------------------------
/** Class template used to represent lazily evaluated object references in the converted schema */
// ------------------------------------------------------------------------------
template <typename T>
- struct Lazy
- {
+ struct Lazy {
typedef Lazy Out;
- Lazy(const LazyObject* obj = NULL) : obj(obj) {
+ Lazy(const LazyObject* obj = nullptr)
+ : obj(obj) {
+ // empty
}
operator const T*() const {
@@ -711,19 +717,15 @@ namespace STEP {
/** Class template used to represent LIST and SET data members in the converted schema */
// ------------------------------------------------------------------------------
template <typename T, uint64_t min_cnt, uint64_t max_cnt=0uL>
- struct ListOf : public std::vector<typename T::Out>
- {
+ struct ListOf : public std::vector<typename T::Out> {
typedef typename T::Out OutScalar;
typedef ListOf Out;
-
ListOf() {
static_assert(min_cnt <= max_cnt || !max_cnt, "min_cnt <= max_cnt || !max_cnt");
}
-
};
-
// ------------------------------------------------------------------------------
template <typename TOut>
struct PickBaseType {
@@ -735,7 +737,8 @@ namespace STEP {
typedef EXPRESS::ENTITY Type;
};
- template <> struct PickBaseType< std::shared_ptr< const EXPRESS::DataType > >;
+ template<>
+ struct PickBaseType< std::shared_ptr< const EXPRESS::DataType > >;
// ------------------------------------------------------------------------------
template <typename T>
@@ -743,8 +746,7 @@ namespace STEP {
void operator()(T& out, const std::shared_ptr< const EXPRESS::DataType >& in, const STEP::DB& /*db*/) {
try{
out = dynamic_cast< const typename PickBaseType<T>::Type& > ( *in );
- }
- catch(std::bad_cast&) {
+ } catch(std::bad_cast&) {
throw TypeError("type error reading literal field");
}
}
@@ -776,10 +778,10 @@ namespace STEP {
// XXX is this really how the EXPRESS notation ([?:3],[1:3]) is intended?
if (max_cnt && inp->GetSize() > max_cnt) {
- DefaultLogger::get()->warn("too many aggregate elements");
+ ASSIMP_LOG_WARN("too many aggregate elements");
}
else if (inp->GetSize() < min_cnt) {
- DefaultLogger::get()->warn("too few aggregate elements");
+ ASSIMP_LOG_WARN("too few aggregate elements");
}
out.reserve(inp->GetSize());
@@ -817,7 +819,6 @@ namespace STEP {
return InternGenericConvertList<T1,N1,N2>()(a,b,db);
}
-
// ------------------------------------------------------------------------------
/** Lightweight manager class that holds the map of all objects in a
* STEP file. DB's are exclusively maintained by the functions in
@@ -834,7 +835,6 @@ namespace STEP {
friend class LazyObject;
public:
-
// objects indexed by ID - this can grow pretty large (i.e some hundred million
// entries), so use raw pointers to avoid *any* overhead.
typedef std::map<uint64_t,const LazyObject* > ObjectMap;
@@ -859,19 +859,16 @@ namespace STEP {
: reader(reader)
, splitter(*reader,true,true)
, evaluated_count()
- , schema( NULL )
+ , schema( nullptr )
{}
public:
-
~DB() {
for(ObjectMap::value_type& o : objects) {
delete o.second;
}
}
- public:
-
uint64_t GetObjectCount() const {
return objects.size();
}
@@ -900,7 +897,6 @@ namespace STEP {
return refs;
}
-
bool KeepInverseIndicesForType(const char* const type) const {
return inv_whitelist.find(type) != inv_whitelist.end();
}
@@ -912,7 +908,7 @@ namespace STEP {
if (it != objects.end()) {
return (*it).second;
}
- return NULL;
+ return nullptr;
}
diff --git a/code/STLExporter.cpp b/code/STLExporter.cpp
index 629296724..e4a1dbb66 100644
--- a/code/STLExporter.cpp
+++ b/code/STLExporter.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -49,19 +50,26 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/scene.h>
#include <assimp/Exporter.hpp>
#include <memory>
-#include "Exceptional.h"
-#include "ByteSwapper.h"
+#include <assimp/Exceptional.h>
+#include <assimp/ByteSwapper.h>
using namespace Assimp;
+
namespace Assimp {
// ------------------------------------------------------------------------------------------------
// Worker function for exporting a scene to Stereolithograpy. Prototyped and registered in Exporter.cpp
-void ExportSceneSTL(const char* pFile,IOSystem* pIOSystem, const aiScene* pScene, const ExportProperties* pProperties)
+void ExportSceneSTL(const char* pFile,IOSystem* pIOSystem, const aiScene* pScene, const ExportProperties* pProperties )
{
+ bool exportPointClouds = pProperties->GetPropertyBool(AI_CONFIG_EXPORT_POINT_CLOUDS);
+
// invoke the exporter
- STLExporter exporter(pFile, pScene);
+ STLExporter exporter(pFile, pScene, exportPointClouds );
+ if (exporter.mOutput.fail()) {
+ throw DeadlyExportError("output data creation failed. Most likely the file became too large: " + std::string(pFile));
+ }
+
// we're still here - export successfully completed. Write the file.
std::unique_ptr<IOStream> outfile (pIOSystem->Open(pFile,"wt"));
if(outfile == NULL) {
@@ -70,11 +78,17 @@ void ExportSceneSTL(const char* pFile,IOSystem* pIOSystem, const aiScene* pScene
outfile->Write( exporter.mOutput.str().c_str(), static_cast<size_t>(exporter.mOutput.tellp()),1);
}
-void ExportSceneSTLBinary(const char* pFile,IOSystem* pIOSystem, const aiScene* pScene, const ExportProperties* pProperties)
+void ExportSceneSTLBinary(const char* pFile,IOSystem* pIOSystem, const aiScene* pScene, const ExportProperties* pProperties )
{
+ bool exportPointClouds = pProperties->GetPropertyBool(AI_CONFIG_EXPORT_POINT_CLOUDS);
+
// invoke the exporter
- STLExporter exporter(pFile, pScene, true);
+ STLExporter exporter(pFile, pScene, exportPointClouds, true);
+ if (exporter.mOutput.fail()) {
+ throw DeadlyExportError("output data creation failed. Most likely the file became too large: " + std::string(pFile));
+ }
+
// we're still here - export successfully completed. Write the file.
std::unique_ptr<IOStream> outfile (pIOSystem->Open(pFile,"wb"));
if(outfile == NULL) {
@@ -86,9 +100,11 @@ void ExportSceneSTLBinary(const char* pFile,IOSystem* pIOSystem, const aiScene*
} // end of namespace Assimp
+static const char *SolidToken = "solid";
+static const char *EndSolidToken = "endsolid";
// ------------------------------------------------------------------------------------------------
-STLExporter :: STLExporter(const char* _filename, const aiScene* pScene, bool binary)
+STLExporter::STLExporter(const char* _filename, const aiScene* pScene, bool exportPointClouds, bool binary)
: filename(_filename)
, endl("\n")
{
@@ -109,22 +125,55 @@ STLExporter :: STLExporter(const char* _filename, const aiScene* pScene, bool bi
}
AI_SWAP4(meshnum);
mOutput.write((char *)&meshnum, 4);
+
+ if (exportPointClouds) {
+
+ }
+
for(unsigned int i = 0; i < pScene->mNumMeshes; ++i) {
WriteMeshBinary(pScene->mMeshes[i]);
}
} else {
- const std::string& name = "AssimpScene";
- mOutput << "solid " << name << endl;
+ // Exporting only point clouds
+ if (exportPointClouds) {
+ WritePointCloud("Assimp_Pointcloud", pScene );
+ return;
+ }
+
+ // Export the assimp mesh
+ const std::string name = "AssimpScene";
+ mOutput << SolidToken << " " << name << endl;
for(unsigned int i = 0; i < pScene->mNumMeshes; ++i) {
- WriteMesh(pScene->mMeshes[i]);
+ WriteMesh(pScene->mMeshes[ i ]);
}
- mOutput << "endsolid " << name << endl;
+ mOutput << EndSolidToken << name << endl;
}
}
// ------------------------------------------------------------------------------------------------
-void STLExporter :: WriteMesh(const aiMesh* m)
+void STLExporter::WritePointCloud(const std::string &name, const aiScene* pScene) {
+ mOutput << " " << SolidToken << " " << name << endl;
+ aiVector3D nor;
+ mOutput << " facet normal " << nor.x << " " << nor.y << " " << nor.z << endl;
+ for (unsigned int i = 0; i < pScene->mNumMeshes; ++i) {
+ aiMesh *mesh = pScene->mMeshes[i];
+ if (nullptr == mesh) {
+ continue;
+ }
+
+ for (unsigned int a = 0; a < mesh->mNumVertices; ++a) {
+ const aiVector3D& v = mesh->mVertices[a];
+ mOutput << " vertex " << v.x << " " << v.y << " " << v.z << endl;
+ mOutput << " vertex " << v.x << " " << v.y << " " << v.z << endl;
+ mOutput << " vertex " << v.x << " " << v.y << " " << v.z << endl;
+ }
+ }
+ mOutput << EndSolidToken << " " << name << endl;
+}
+
+// ------------------------------------------------------------------------------------------------
+void STLExporter::WriteMesh(const aiMesh* m)
{
for (unsigned int i = 0; i < m->mNumFaces; ++i) {
const aiFace& f = m->mFaces[i];
@@ -136,7 +185,7 @@ void STLExporter :: WriteMesh(const aiMesh* m)
for(unsigned int a = 0; a < f.mNumIndices; ++a) {
nor += m->mNormals[f.mIndices[a]];
}
- nor.Normalize();
+ nor.NormalizeSafe();
}
mOutput << " facet normal " << nor.x << " " << nor.y << " " << nor.z << endl;
mOutput << " outer loop" << endl;
@@ -150,7 +199,7 @@ void STLExporter :: WriteMesh(const aiMesh* m)
}
}
-void STLExporter :: WriteMeshBinary(const aiMesh* m)
+void STLExporter::WriteMeshBinary(const aiMesh* m)
{
for (unsigned int i = 0; i < m->mNumFaces; ++i) {
const aiFace& f = m->mFaces[i];
@@ -163,12 +212,16 @@ void STLExporter :: WriteMeshBinary(const aiMesh* m)
}
nor.Normalize();
}
- ai_real nx = nor.x, ny = nor.y, nz = nor.z;
+ // STL binary files use 4-byte floats. This may possibly cause loss of precision
+ // for clients using 8-byte doubles
+ float nx = (float) nor.x;
+ float ny = (float) nor.y;
+ float nz = (float) nor.z;
AI_SWAP4(nx); AI_SWAP4(ny); AI_SWAP4(nz);
mOutput.write((char *)&nx, 4); mOutput.write((char *)&ny, 4); mOutput.write((char *)&nz, 4);
for(unsigned int a = 0; a < f.mNumIndices; ++a) {
const aiVector3D& v = m->mVertices[f.mIndices[a]];
- ai_real vx = v.x, vy = v.y, vz = v.z;
+ float vx = (float) v.x, vy = (float) v.y, vz = (float) v.z;
AI_SWAP4(vx); AI_SWAP4(vy); AI_SWAP4(vz);
mOutput.write((char *)&vx, 4); mOutput.write((char *)&vy, 4); mOutput.write((char *)&vz, 4);
}
diff --git a/code/STLExporter.h b/code/STLExporter.h
index 7fb6a3e75..6e8f90915 100644
--- a/code/STLExporter.h
+++ b/code/STLExporter.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -51,8 +52,7 @@ struct aiScene;
struct aiNode;
struct aiMesh;
-namespace Assimp
-{
+namespace Assimp {
// ------------------------------------------------------------------------------------------------
/** Helper class to export a given scene to a STL file. */
@@ -61,15 +61,13 @@ class STLExporter
{
public:
/// Constructor for a specific scene to export
- STLExporter(const char* filename, const aiScene* pScene, bool binary = false);
-
-public:
+ STLExporter(const char* filename, const aiScene* pScene, bool exportPOintClouds, bool binary = false);
/// public stringstreams to write all output into
std::ostringstream mOutput;
private:
-
+ void WritePointCloud(const std::string &name, const aiScene* pScene);
void WriteMesh(const aiMesh* m);
void WriteMeshBinary(const aiMesh* m);
diff --git a/code/STLLoader.cpp b/code/STLLoader.cpp
index f4d6ddda7..fb866bb7a 100644
--- a/code/STLLoader.cpp
+++ b/code/STLLoader.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -47,8 +48,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// internal headers
#include "STLLoader.h"
-#include "ParsingUtils.h"
-#include "fast_atof.h"
+#include <assimp/ParsingUtils.h>
+#include <assimp/fast_atof.h>
#include <memory>
#include <assimp/IOSystem.hpp>
#include <assimp/scene.h>
@@ -58,6 +59,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using namespace Assimp;
namespace {
+
static const aiImporterDesc desc = {
"Stereolithography (STL) Importer",
"",
@@ -80,12 +82,17 @@ static bool IsBinarySTL(const char* buffer, unsigned int fileSize) {
return false;
}
- const uint32_t faceCount = *reinterpret_cast<const uint32_t*>(buffer + 80);
+ const char *facecount_pos = buffer + 80;
+ uint32_t faceCount( 0 );
+ ::memcpy( &faceCount, facecount_pos, sizeof( uint32_t ) );
const uint32_t expectedBinaryFileSize = faceCount * 50 + 84;
return expectedBinaryFileSize == fileSize;
}
+static const size_t BufferSize = 500;
+static const char UnicodeBoundary = 127;
+
// An ascii STL buffer will begin with "solid NAME", where NAME is optional.
// Note: The "solid NAME" check is necessary, but not sufficient, to determine
// if the buffer is ASCII; a binary header could also begin with "solid NAME".
@@ -104,10 +111,10 @@ static bool IsAsciiSTL(const char* buffer, unsigned int fileSize) {
bool isASCII( strncmp( buffer, "solid", 5 ) == 0 );
if( isASCII ) {
// A lot of importers are write solid even if the file is binary. So we have to check for ASCII-characters.
- if( fileSize >= 500 ) {
+ if( fileSize >= BufferSize) {
isASCII = true;
- for( unsigned int i = 0; i < 500; i++ ) {
- if( buffer[ i ] > 127 ) {
+ for( unsigned int i = 0; i < BufferSize; i++ ) {
+ if( buffer[ i ] > UnicodeBoundary) {
isASCII = false;
break;
}
@@ -200,17 +207,11 @@ void STLImporter::InternReadFile( const std::string& pFile, aiScene* pScene, IOS
if (IsBinarySTL(mBuffer, fileSize)) {
bMatClr = LoadBinaryFile();
} else if (IsAsciiSTL(mBuffer, fileSize)) {
- LoadASCIIFile();
+ LoadASCIIFile( pScene->mRootNode );
} else {
throw DeadlyImportError( "Failed to determine STL storage representation for " + pFile + ".");
}
- // add all created meshes to the single node
- pScene->mRootNode->mNumMeshes = pScene->mNumMeshes;
- pScene->mRootNode->mMeshes = new unsigned int[pScene->mNumMeshes];
- for (unsigned int i = 0; i < pScene->mNumMeshes; i++)
- pScene->mRootNode->mMeshes[i] = i;
-
// create a single default material, using a white diffuse color for consistency with
// other geometric types (e.g., PLY).
aiMaterial* pcMat = new aiMaterial();
@@ -231,11 +232,12 @@ void STLImporter::InternReadFile( const std::string& pFile, aiScene* pScene, IOS
pScene->mMaterials = new aiMaterial*[1];
pScene->mMaterials[0] = pcMat;
}
+
// ------------------------------------------------------------------------------------------------
// Read an ASCII STL file
-void STLImporter::LoadASCIIFile()
-{
+void STLImporter::LoadASCIIFile( aiNode *root ) {
std::vector<aiMesh*> meshes;
+ std::vector<aiNode*> nodes;
const char* sz = mBuffer;
const char* bufferEnd = mBuffer + fileSize;
std::vector<aiVector3D> positionBuffer;
@@ -247,12 +249,15 @@ void STLImporter::LoadASCIIFile()
positionBuffer.reserve(sizeEstimate);
normalBuffer.reserve(sizeEstimate);
- while (IsAsciiSTL(sz, static_cast<unsigned int>(bufferEnd - sz)))
- {
+ while (IsAsciiSTL(sz, static_cast<unsigned int>(bufferEnd - sz))) {
+ std::vector<unsigned int> meshIndices;
aiMesh* pMesh = new aiMesh();
pMesh->mMaterialIndex = 0;
+ meshIndices.push_back((unsigned int) meshes.size() );
meshes.push_back(pMesh);
-
+ aiNode *node = new aiNode;
+ node->mParent = root;
+ nodes.push_back( node );
SkipSpaces(&sz);
ai_assert(!IsLineEnd(sz));
@@ -265,32 +270,33 @@ void STLImporter::LoadASCIIFile()
size_t temp;
// setup the name of the node
- if ((temp = (size_t)(sz-szMe))) {
+ if ((temp = (size_t)(sz-szMe))) {
if (temp >= MAXLEN) {
throw DeadlyImportError( "STL: Node name too long" );
}
-
- pScene->mRootNode->mName.length = temp;
- memcpy(pScene->mRootNode->mName.data,szMe,temp);
- pScene->mRootNode->mName.data[temp] = '\0';
+ std::string name( szMe, temp );
+ node->mName.Set( name.c_str() );
+ //pScene->mRootNode->mName.length = temp;
+ //memcpy(pScene->mRootNode->mName.data,szMe,temp);
+ //pScene->mRootNode->mName.data[temp] = '\0';
+ } else {
+ pScene->mRootNode->mName.Set("<STL_ASCII>");
}
- else pScene->mRootNode->mName.Set("<STL_ASCII>");
unsigned int faceVertexCounter = 3;
- for ( ;; )
- {
+ for ( ;; ) {
// go to the next token
if(!SkipSpacesAndLineEnd(&sz))
{
// seems we're finished although there was no end marker
- DefaultLogger::get()->warn("STL: unexpected EOF. \'endsolid\' keyword was expected");
+ ASSIMP_LOG_WARN("STL: unexpected EOF. \'endsolid\' keyword was expected");
break;
}
// facet normal -0.13 -0.13 -0.98
if (!strncmp(sz,"facet",5) && IsSpaceOrNewLine(*(sz+5)) && *(sz + 5) != '\0') {
if (faceVertexCounter != 3) {
- DefaultLogger::get()->warn("STL: A new facet begins but the old is not yet complete");
+ ASSIMP_LOG_WARN("STL: A new facet begins but the old is not yet complete");
}
faceVertexCounter = 0;
normalBuffer.push_back(aiVector3D());
@@ -299,10 +305,8 @@ void STLImporter::LoadASCIIFile()
sz += 6;
SkipSpaces(&sz);
if (strncmp(sz,"normal",6)) {
- DefaultLogger::get()->warn("STL: a facet normal vector was expected but not found");
- }
- else
- {
+ ASSIMP_LOG_WARN("STL: a facet normal vector was expected but not found");
+ } else {
if (sz[6] == '\0') {
throw DeadlyImportError("STL: unexpected EOF while parsing facet");
}
@@ -316,16 +320,11 @@ void STLImporter::LoadASCIIFile()
normalBuffer.push_back(*vn);
normalBuffer.push_back(*vn);
}
- }
- // vertex 1.50000 1.50000 0.00000
- else if (!strncmp(sz,"vertex",6) && ::IsSpaceOrNewLine(*(sz+6)))
- {
+ } else if (!strncmp(sz,"vertex",6) && ::IsSpaceOrNewLine(*(sz+6))) { // vertex 1.50000 1.50000 0.00000
if (faceVertexCounter >= 3) {
- DefaultLogger::get()->error("STL: a facet with more than 3 vertices has been found");
+ ASSIMP_LOG_ERROR("STL: a facet with more than 3 vertices has been found");
++sz;
- }
- else
- {
+ } else {
if (sz[6] == '\0') {
throw DeadlyImportError("STL: unexpected EOF while parsing facet");
}
@@ -340,17 +339,14 @@ void STLImporter::LoadASCIIFile()
sz = fast_atoreal_move<ai_real>(sz, (ai_real&)vn->z );
faceVertexCounter++;
}
- }
- else if (!::strncmp(sz,"endsolid",8)) {
+ } else if (!::strncmp(sz,"endsolid",8)) {
do {
++sz;
} while (!::IsLineEnd(*sz));
SkipSpacesAndLineEnd(&sz);
// finished!
break;
- }
- // else skip the whole identifier
- else {
+ } else { // else skip the whole identifier
do {
++sz;
} while (!::IsSpaceOrNewLine(*sz));
@@ -359,7 +355,7 @@ void STLImporter::LoadASCIIFile()
if (positionBuffer.empty()) {
pMesh->mNumFaces = 0;
- throw DeadlyImportError("STL: ASCII file is empty or invalid; no data loaded");
+ ASSIMP_LOG_WARN("STL: mesh is empty or invalid; no data loaded");
}
if (positionBuffer.size() % 3 != 0) {
pMesh->mNumFaces = 0;
@@ -369,24 +365,42 @@ void STLImporter::LoadASCIIFile()
pMesh->mNumFaces = 0;
throw DeadlyImportError("Normal buffer size does not match position buffer size");
}
- pMesh->mNumFaces = static_cast<unsigned int>(positionBuffer.size() / 3);
- pMesh->mNumVertices = static_cast<unsigned int>(positionBuffer.size());
- pMesh->mVertices = new aiVector3D[pMesh->mNumVertices];
- memcpy(pMesh->mVertices, &positionBuffer[0].x, pMesh->mNumVertices * sizeof(aiVector3D));
- positionBuffer.clear();
- pMesh->mNormals = new aiVector3D[pMesh->mNumVertices];
- memcpy(pMesh->mNormals, &normalBuffer[0].x, pMesh->mNumVertices * sizeof(aiVector3D));
- normalBuffer.clear();
+
+ // only process positionbuffer when filled, else exception when accessing with index operator
+ // see line 353: only warning is triggered
+ // see line 373(now): access to empty positionbuffer with index operator forced exception
+ if (!positionBuffer.empty()) {
+ pMesh->mNumFaces = static_cast<unsigned int>(positionBuffer.size() / 3);
+ pMesh->mNumVertices = static_cast<unsigned int>(positionBuffer.size());
+ pMesh->mVertices = new aiVector3D[pMesh->mNumVertices];
+ memcpy(pMesh->mVertices, &positionBuffer[0].x, pMesh->mNumVertices * sizeof(aiVector3D));
+ positionBuffer.clear();
+ }
+ // also only process normalBuffer when filled, else exception when accessing with index operator
+ if (!normalBuffer.empty()) {
+ pMesh->mNormals = new aiVector3D[pMesh->mNumVertices];
+ memcpy(pMesh->mNormals, &normalBuffer[0].x, pMesh->mNumVertices * sizeof(aiVector3D));
+ normalBuffer.clear();
+ }
// now copy faces
addFacesToMesh(pMesh);
+
+ // assign the meshes to the current node
+ pushMeshesToNode( meshIndices, node );
}
+
// now add the loaded meshes
pScene->mNumMeshes = (unsigned int)meshes.size();
pScene->mMeshes = new aiMesh*[pScene->mNumMeshes];
- for (size_t i = 0; i < meshes.size(); i++)
- {
- pScene->mMeshes[i] = meshes[i];
+ for (size_t i = 0; i < meshes.size(); i++) {
+ pScene->mMeshes[ i ] = meshes[i];
+ }
+
+ root->mNumChildren = (unsigned int) nodes.size();
+ root->mChildren = new aiNode*[ root->mNumChildren ];
+ for ( size_t i=0; i<nodes.size(); ++i ) {
+ root->mChildren[ i ] = nodes[ i ];
}
}
@@ -416,7 +430,7 @@ bool STLImporter::LoadBinaryFile()
// read the default vertex color for facets
bIsMaterialise = true;
- DefaultLogger::get()->info("STL: Taking code path for Materialise files");
+ ASSIMP_LOG_INFO("STL: Taking code path for Materialise files");
const ai_real invByte = (ai_real)1.0 / ( ai_real )255.0;
clrColorDefault.r = (*sz2++) * invByte;
clrColorDefault.g = (*sz2++) * invByte;
@@ -443,28 +457,47 @@ bool STLImporter::LoadBinaryFile()
pMesh->mNumVertices = pMesh->mNumFaces*3;
- aiVector3D* vp,*vn;
- vp = pMesh->mVertices = new aiVector3D[pMesh->mNumVertices];
- vn = pMesh->mNormals = new aiVector3D[pMesh->mNumVertices];
-
- for (unsigned int i = 0; i < pMesh->mNumFaces;++i) {
+
+ aiVector3D *vp = pMesh->mVertices = new aiVector3D[pMesh->mNumVertices];
+ aiVector3D *vn = pMesh->mNormals = new aiVector3D[pMesh->mNumVertices];
+ typedef aiVector3t<float> aiVector3F;
+ aiVector3F* theVec;
+ aiVector3F theVec3F;
+
+ for ( unsigned int i = 0; i < pMesh->mNumFaces; ++i ) {
// NOTE: Blender sometimes writes empty normals ... this is not
// our fault ... the RemoveInvalidData helper step should fix that
- *vn = *((aiVector3D*)sz);
- sz += sizeof(aiVector3D);
+
+ // There's one normal for the face in the STL; use it three times
+ // for vertex normals
+ theVec = (aiVector3F*) sz;
+ ::memcpy( &theVec3F, theVec, sizeof(aiVector3F) );
+ vn->x = theVec3F.x; vn->y = theVec3F.y; vn->z = theVec3F.z;
*(vn+1) = *vn;
*(vn+2) = *vn;
+ ++theVec;
vn += 3;
- *vp++ = *((aiVector3D*)sz);
- sz += sizeof(aiVector3D);
-
- *vp++ = *((aiVector3D*)sz);
- sz += sizeof(aiVector3D);
-
- *vp++ = *((aiVector3D*)sz);
- sz += sizeof(aiVector3D);
+ // vertex 1
+ ::memcpy( &theVec3F, theVec, sizeof(aiVector3F) );
+ vp->x = theVec3F.x; vp->y = theVec3F.y; vp->z = theVec3F.z;
+ ++theVec;
+ ++vp;
+
+ // vertex 2
+ ::memcpy( &theVec3F, theVec, sizeof(aiVector3F) );
+ vp->x = theVec3F.x; vp->y = theVec3F.y; vp->z = theVec3F.z;
+ ++theVec;
+ ++vp;
+
+ // vertex 3
+ ::memcpy( &theVec3F, theVec, sizeof(aiVector3F) );
+ vp->x = theVec3F.x; vp->y = theVec3F.y; vp->z = theVec3F.z;
+ ++theVec;
+ ++vp;
+
+ sz = (const unsigned char*) theVec;
uint16_t color = *((uint16_t*)sz);
sz += 2;
@@ -479,7 +512,7 @@ bool STLImporter::LoadBinaryFile()
*pMesh->mColors[0]++ = this->clrColorDefault;
pMesh->mColors[0] -= pMesh->mNumVertices;
- DefaultLogger::get()->info("STL: Mesh has vertex colors");
+ ASSIMP_LOG_INFO("STL: Mesh has vertex colors");
}
aiColor4D* clr = &pMesh->mColors[0][i*3];
clr->a = 1.0;
@@ -505,6 +538,22 @@ bool STLImporter::LoadBinaryFile()
// now copy faces
addFacesToMesh(pMesh);
+ aiNode* root = pScene->mRootNode;
+
+ // allocate one node
+ aiNode* node = new aiNode();
+ node->mParent = root;
+
+ root->mNumChildren = 1u;
+ root->mChildren = new aiNode*[root->mNumChildren];
+ root->mChildren[0] = node;
+
+ // add all created meshes to the single node
+ node->mNumMeshes = pScene->mNumMeshes;
+ node->mMeshes = new unsigned int[pScene->mNumMeshes];
+ for (unsigned int i = 0; i < pScene->mNumMeshes; i++)
+ node->mMeshes[i] = i;
+
if (bIsMaterialise && !pMesh->mColors[0])
{
// use the color as diffuse material color
@@ -513,4 +562,18 @@ bool STLImporter::LoadBinaryFile()
return false;
}
+void STLImporter::pushMeshesToNode( std::vector<unsigned int> &meshIndices, aiNode *node ) {
+ ai_assert( nullptr != node );
+ if ( meshIndices.empty() ) {
+ return;
+ }
+
+ node->mNumMeshes = static_cast<unsigned int>( meshIndices.size() );
+ node->mMeshes = new unsigned int[ meshIndices.size() ];
+ for ( size_t i=0; i<meshIndices.size(); ++i ) {
+ node->mMeshes[ i ] = meshIndices[ i ];
+ }
+ meshIndices.clear();
+}
+
#endif // !! ASSIMP_BUILD_NO_STL_IMPORTER
diff --git a/code/STLLoader.h b/code/STLLoader.h
index 87ed3288d..3b87f70a3 100644
--- a/code/STLLoader.h
+++ b/code/STLLoader.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -45,56 +46,64 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_STLLOADER_H_INCLUDED
#define AI_STLLOADER_H_INCLUDED
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
#include <assimp/types.h>
-namespace Assimp {
+// Forward declarations
+struct aiNode;
+
+namespace Assimp {
+
// ---------------------------------------------------------------------------
-/** Importer class for the sterolithography STL file format
-*/
-class STLImporter : public BaseImporter
-{
+/**
+ * @brief Importer class for the sterolithography STL file format.
+ */
+class STLImporter : public BaseImporter {
public:
+ /**
+ * @brief STLImporter, the class default constructor.
+ */
STLImporter();
- ~STLImporter();
+ /**
+ * @brief The class destructor.
+ */
+ ~STLImporter();
-public:
-
- // -------------------------------------------------------------------
- /** Returns whether the class can handle the format of the given file.
- * See BaseImporter::CanRead() for details.
+ /**
+ * @brief Returns whether the class can handle the format of the given file.
+ * See BaseImporter::CanRead() for details.
*/
- bool CanRead( const std::string& pFile, IOSystem* pIOHandler,
- bool checkSig) const;
+ bool CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const;
protected:
- // -------------------------------------------------------------------
- /** Return importer meta information.
- * See #BaseImporter::GetInfo for the details
+ /**
+ * @brief Return importer meta information.
+ * See #BaseImporter::GetInfo for the details
*/
const aiImporterDesc* GetInfo () const;
- // -------------------------------------------------------------------
- /** Imports the given file into the given scene structure.
+ /**
+ * @brief Imports the given file into the given scene structure.
* See BaseImporter::InternReadFile() for details
*/
void InternReadFile( const std::string& pFile, aiScene* pScene,
IOSystem* pIOHandler);
-
- // -------------------------------------------------------------------
- /** Loads a binary .stl file
+ /**
+ * @brief Loads a binary .stl file
* @return true if the default vertex color must be used as material color
- */
+ */
bool LoadBinaryFile();
- // -------------------------------------------------------------------
- /** Loads a ASCII text .stl file
- */
- void LoadASCIIFile();
+ /**
+ * @brief Loads a ASCII text .stl file
+ */
+ void LoadASCIIFile( aiNode *root );
+
+ void pushMeshesToNode( std::vector<unsigned int> &meshIndices, aiNode *node );
protected:
diff --git a/code/ScaleProcess.cpp b/code/ScaleProcess.cpp
new file mode 100644
index 000000000..facc39d7d
--- /dev/null
+++ b/code/ScaleProcess.cpp
@@ -0,0 +1,103 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2018, assimp 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 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.
+
+----------------------------------------------------------------------
+*/
+#ifndef ASSIMP_BUILD_NO_GLOBALSCALE_PROCESS
+
+#include "ScaleProcess.h"
+
+#include <assimp/scene.h>
+#include <assimp/postprocess.h>
+
+namespace Assimp {
+
+ScaleProcess::ScaleProcess()
+: BaseProcess()
+, mScale( AI_CONFIG_GLOBAL_SCALE_FACTOR_DEFAULT ) {
+ // empty
+}
+
+ScaleProcess::~ScaleProcess() {
+ // empty
+}
+
+void ScaleProcess::setScale( ai_real scale ) {
+ mScale = scale;
+}
+
+ai_real ScaleProcess::getScale() const {
+ return mScale;
+}
+
+bool ScaleProcess::IsActive( unsigned int pFlags ) const {
+ return ( pFlags & aiProcess_GlobalScale ) != 0;
+}
+
+void ScaleProcess::SetupProperties( const Importer* pImp ) {
+ mScale = pImp->GetPropertyFloat( AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY, 0 );
+}
+
+void ScaleProcess::Execute( aiScene* pScene ) {
+ if ( nullptr == pScene ) {
+ return;
+ }
+
+ if ( nullptr == pScene->mRootNode ) {
+ return;
+ }
+
+ traverseNodes( pScene->mRootNode );
+}
+
+void ScaleProcess::traverseNodes( aiNode *node ) {
+ applyScaling( node );
+}
+
+void ScaleProcess::applyScaling( aiNode *currentNode ) {
+ if ( nullptr != currentNode ) {
+ currentNode->mTransformation.a1 = currentNode->mTransformation.a1 * mScale;
+ currentNode->mTransformation.b2 = currentNode->mTransformation.b2 * mScale;
+ currentNode->mTransformation.c3 = currentNode->mTransformation.c3 * mScale;
+ }
+}
+
+} // Namespace Assimp
+
+#endif // !! ASSIMP_BUILD_NO_GLOBALSCALE_PROCESS
diff --git a/code/ScaleProcess.h b/code/ScaleProcess.h
new file mode 100644
index 000000000..0621220a8
--- /dev/null
+++ b/code/ScaleProcess.h
@@ -0,0 +1,88 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2018, assimp 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 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.
+
+----------------------------------------------------------------------
+*/
+#pragma once
+
+#include "BaseProcess.h"
+
+struct aiNode;
+
+#if (!defined AI_CONFIG_GLOBAL_SCALE_FACTOR_DEFAULT)
+# define AI_CONFIG_GLOBAL_SCALE_FACTOR_DEFAULT 1.0f
+#endif // !! AI_DEBONE_THRESHOLD
+
+namespace Assimp {
+
+// ---------------------------------------------------------------------------
+/** ScaleProcess: Class to rescale the whole model.
+*/
+class ASSIMP_API ScaleProcess : public BaseProcess {
+public:
+ /// The default class constructor.
+ ScaleProcess();
+
+ /// The class destructor.
+ virtual ~ScaleProcess();
+
+ /// Will set the scale manually.
+ void setScale( ai_real scale );
+
+ /// Returns the current scaling value.
+ ai_real getScale() const;
+
+ /// Overwritten, @see BaseProcess
+ virtual bool IsActive( unsigned int pFlags ) const;
+
+ /// Overwritten, @see BaseProcess
+ virtual void SetupProperties( const Importer* pImp );
+
+ /// Overwritten, @see BaseProcess
+ virtual void Execute( aiScene* pScene );
+
+private:
+ void traverseNodes( aiNode *currentNode );
+ void applyScaling( aiNode *currentNode );
+
+private:
+ ai_real mScale;
+};
+
+} // Namespace Assimp
diff --git a/code/SceneCombiner.cpp b/code/SceneCombiner.cpp
index 9bcce4275..883447372 100644
--- a/code/SceneCombiner.cpp
+++ b/code/SceneCombiner.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -52,12 +53,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
// ----------------------------------------------------------------------------
#include <assimp/SceneCombiner.h>
-#include "StringUtils.h"
-#include "fast_atof.h"
-#include "Hash.h"
+#include <assimp/StringUtils.h>
+#include <assimp/fast_atof.h>
+#include <assimp/metadata.h>
+#include <assimp/Hash.h>
#include "time.h"
#include <assimp/DefaultLogger.hpp>
#include <assimp/scene.h>
+#include <assimp/mesh.h>
#include <stdio.h>
#include "ScenePrivate.h"
@@ -65,14 +68,14 @@ namespace Assimp {
// ------------------------------------------------------------------------------------------------
// Add a prefix to a string
-inline void PrefixString(aiString& string,const char* prefix, unsigned int len)
-{
+inline
+void PrefixString(aiString& string,const char* prefix, unsigned int len) {
// If the string is already prefixed, we won't prefix it a second time
if (string.length >= 1 && string.data[0] == '$')
return;
if (len+string.length>=MAXLEN-1) {
- DefaultLogger::get()->debug("Can't add an unique prefix because the string is too long");
+ ASSIMP_LOG_DEBUG("Can't add an unique prefix because the string is too long");
ai_assert(false);
return;
}
@@ -87,8 +90,7 @@ inline void PrefixString(aiString& string,const char* prefix, unsigned int len)
// ------------------------------------------------------------------------------------------------
// Add node identifiers to a hashing set
-void SceneCombiner::AddNodeHashes(aiNode* node, std::set<unsigned int>& hashes)
-{
+void SceneCombiner::AddNodeHashes(aiNode* node, std::set<unsigned int>& hashes) {
// Add node name to hashing set if it is non-empty - empty nodes are allowed
// and they can't have any anims assigned so its absolutely safe to duplicate them.
if (node->mName.length) {
@@ -102,25 +104,23 @@ void SceneCombiner::AddNodeHashes(aiNode* node, std::set<unsigned int>& hashes)
// ------------------------------------------------------------------------------------------------
// Add a name prefix to all nodes in a hierarchy
-void SceneCombiner::AddNodePrefixes(aiNode* node, const char* prefix, unsigned int len)
-{
+void SceneCombiner::AddNodePrefixes(aiNode* node, const char* prefix, unsigned int len) {
ai_assert(NULL != prefix);
PrefixString(node->mName,prefix,len);
// Process all children recursively
- for (unsigned int i = 0; i < node->mNumChildren;++i)
- AddNodePrefixes(node->mChildren[i],prefix,len);
+ for ( unsigned int i = 0; i < node->mNumChildren; ++i ) {
+ AddNodePrefixes( node->mChildren[ i ], prefix, len );
+ }
}
// ------------------------------------------------------------------------------------------------
// Search for matching names
-bool SceneCombiner::FindNameMatch(const aiString& name, std::vector<SceneHelper>& input, unsigned int cur)
-{
+bool SceneCombiner::FindNameMatch(const aiString& name, std::vector<SceneHelper>& input, unsigned int cur) {
const unsigned int hash = SuperFastHash(name.data, static_cast<uint32_t>(name.length));
// Check whether we find a positive match in one of the given sets
for (unsigned int i = 0; i < input.size(); ++i) {
-
if (cur != i && input[i].hashes.find(hash) != input[i].hashes.end()) {
return true;
}
@@ -131,14 +131,12 @@ bool SceneCombiner::FindNameMatch(const aiString& name, std::vector<SceneHelper>
// ------------------------------------------------------------------------------------------------
// Add a name prefix to all nodes in a hierarchy if a hash match is found
void SceneCombiner::AddNodePrefixesChecked(aiNode* node, const char* prefix, unsigned int len,
- std::vector<SceneHelper>& input, unsigned int cur)
-{
+ std::vector<SceneHelper>& input, unsigned int cur) {
ai_assert(NULL != prefix);
const unsigned int hash = SuperFastHash(node->mName.data, static_cast<uint32_t>(node->mName.length));
// Check whether we find a positive match in one of the given sets
for (unsigned int i = 0; i < input.size(); ++i) {
-
if (cur != i && input[i].hashes.find(hash) != input[i].hashes.end()) {
PrefixString(node->mName,prefix,len);
break;
@@ -152,27 +150,25 @@ void SceneCombiner::AddNodePrefixesChecked(aiNode* node, const char* prefix, uns
// ------------------------------------------------------------------------------------------------
// Add an offset to all mesh indices in a node graph
-void SceneCombiner::OffsetNodeMeshIndices (aiNode* node, unsigned int offset)
-{
+void SceneCombiner::OffsetNodeMeshIndices (aiNode* node, unsigned int offset) {
for (unsigned int i = 0; i < node->mNumMeshes;++i)
node->mMeshes[i] += offset;
- for (unsigned int i = 0; i < node->mNumChildren;++i)
- OffsetNodeMeshIndices(node->mChildren[i],offset);
+ for ( unsigned int i = 0; i < node->mNumChildren; ++i ) {
+ OffsetNodeMeshIndices( node->mChildren[ i ], offset );
+ }
}
// ------------------------------------------------------------------------------------------------
// Merges two scenes. Currently only used by the LWS loader.
-void SceneCombiner::MergeScenes(aiScene** _dest,std::vector<aiScene*>& src,
- unsigned int flags)
-{
- ai_assert(NULL != _dest);
+void SceneCombiner::MergeScenes(aiScene** _dest,std::vector<aiScene*>& src, unsigned int flags) {
+ if ( nullptr == _dest ) {
+ return;
+ }
// if _dest points to NULL allocate a new scene. Otherwise clear the old and reuse it
- if (src.empty())
- {
- if (*_dest)
- {
+ if (src.empty()) {
+ if (*_dest) {
(*_dest)->~aiScene();
SceneCombiner::CopySceneFlat(_dest,src[0]);
}
@@ -197,8 +193,7 @@ void SceneCombiner::MergeScenes(aiScene** _dest,std::vector<aiScene*>& src,
}
// ------------------------------------------------------------------------------------------------
-void SceneCombiner::AttachToGraph (aiNode* attach, std::vector<NodeAttachmentInfo>& srcList)
-{
+void SceneCombiner::AttachToGraph (aiNode* attach, std::vector<NodeAttachmentInfo>& srcList) {
unsigned int cnt;
for ( cnt = 0; cnt < attach->mNumChildren; ++cnt ) {
AttachToGraph( attach->mChildren[ cnt ], srcList );
@@ -238,19 +233,16 @@ void SceneCombiner::AttachToGraph (aiNode* attach, std::vector<NodeAttachmentInf
}
// ------------------------------------------------------------------------------------------------
-void SceneCombiner::AttachToGraph ( aiScene* master,
- std::vector<NodeAttachmentInfo>& src)
-{
+void SceneCombiner::AttachToGraph ( aiScene* master, std::vector<NodeAttachmentInfo>& src) {
ai_assert(NULL != master);
AttachToGraph(master->mRootNode,src);
}
// ------------------------------------------------------------------------------------------------
-void SceneCombiner::MergeScenes(aiScene** _dest, aiScene* master,
- std::vector<AttachmentInfo>& srcList,
- unsigned int flags)
-{
- ai_assert(NULL != _dest);
+void SceneCombiner::MergeScenes(aiScene** _dest, aiScene* master, std::vector<AttachmentInfo>& srcList, unsigned int flags) {
+ if ( nullptr == _dest ) {
+ return;
+ }
// if _dest points to NULL allocate a new scene. Otherwise clear the old and reuse it
if (srcList.empty()) {
@@ -630,8 +622,8 @@ void SceneCombiner::MergeScenes(aiScene** _dest, aiScene* master,
}
}
if (!(*it).resolved) {
- DefaultLogger::get()->error(std::string("SceneCombiner: Failed to resolve attachment ")
- + (*it).node->mName.data + " " + (*it).attachToNode->mName.data);
+ ASSIMP_LOG_ERROR_F( "SceneCombiner: Failed to resolve attachment ", (*it).node->mName.data,
+ " ", (*it).attachToNode->mName.data );
}
}
}
@@ -707,36 +699,38 @@ void SceneCombiner::BuildUniqueBoneList(std::list<BoneWithHash>& asBones,
void SceneCombiner::MergeBones(aiMesh* out,std::vector<aiMesh*>::const_iterator it,
std::vector<aiMesh*>::const_iterator end)
{
- ai_assert(NULL != out && !out->mNumBones);
+ if ( nullptr == out || out->mNumBones == 0 ) {
+ return;
+ }
// find we need to build an unique list of all bones.
// we work with hashes to make the comparisons MUCH faster,
// at least if we have many bones.
std::list<BoneWithHash> asBones;
- BuildUniqueBoneList(asBones, it,end);
+ BuildUniqueBoneList( asBones, it, end );
// now create the output bones
out->mNumBones = 0;
out->mBones = new aiBone*[asBones.size()];
- for (std::list<BoneWithHash>::const_iterator it = asBones.begin(),end = asBones.end(); it != end;++it) {
+ for (std::list<BoneWithHash>::const_iterator boneIt = asBones.begin(),boneEnd = asBones.end(); boneIt != boneEnd; ++boneIt ) {
// Allocate a bone and setup it's name
aiBone* pc = out->mBones[out->mNumBones++] = new aiBone();
- pc->mName = aiString( *((*it).second ));
+ pc->mName = aiString( *( boneIt->second ));
- std::vector< BoneSrcIndex >::const_iterator wend = (*it).pSrcBones.end();
+ std::vector< BoneSrcIndex >::const_iterator wend = boneIt->pSrcBones.end();
// Loop through all bones to be joined for this bone
- for (std::vector< BoneSrcIndex >::const_iterator wmit = (*it).pSrcBones.begin(); wmit != wend; ++wmit) {
+ for (std::vector< BoneSrcIndex >::const_iterator wmit = boneIt->pSrcBones.begin(); wmit != wend; ++wmit) {
pc->mNumWeights += (*wmit).first->mNumWeights;
// NOTE: different offset matrices for bones with equal names
// are - at the moment - not handled correctly.
- if (wmit != (*it).pSrcBones.begin() && pc->mOffsetMatrix != (*wmit).first->mOffsetMatrix) {
- DefaultLogger::get()->warn("Bones with equal names but different offset matrices can't be joined at the moment");
+ if (wmit != boneIt->pSrcBones.begin() && pc->mOffsetMatrix != wmit->first->mOffsetMatrix) {
+ ASSIMP_LOG_WARN("Bones with equal names but different offset matrices can't be joined at the moment");
continue;
}
- pc->mOffsetMatrix = (*wmit).first->mOffsetMatrix;
+ pc->mOffsetMatrix = wmit->first->mOffsetMatrix;
}
// Allocate the vertex weight array
@@ -744,7 +738,7 @@ void SceneCombiner::MergeBones(aiMesh* out,std::vector<aiMesh*>::const_iterator
// And copy the final weights - adjust the vertex IDs by the
// face index offset of the corresponding mesh.
- for (std::vector< BoneSrcIndex >::const_iterator wmit = (*it).pSrcBones.begin(); wmit != wend; ++wmit) {
+ for (std::vector< BoneSrcIndex >::const_iterator wmit = (*boneIt).pSrcBones.begin(); wmit != wend; ++wmit) {
aiBone* pip = (*wmit).first;
for (unsigned int mp = 0; mp < pip->mNumWeights;++mp,++avw) {
const aiVertexWeight& vfi = pip->mWeights[mp];
@@ -757,11 +751,13 @@ void SceneCombiner::MergeBones(aiMesh* out,std::vector<aiMesh*>::const_iterator
// ------------------------------------------------------------------------------------------------
// Merge a list of meshes
-void SceneCombiner::MergeMeshes(aiMesh** _out,unsigned int /*flags*/,
+void SceneCombiner::MergeMeshes(aiMesh** _out, unsigned int /*flags*/,
std::vector<aiMesh*>::const_iterator begin,
std::vector<aiMesh*>::const_iterator end)
{
- ai_assert(NULL != _out);
+ if ( nullptr == _out ) {
+ return;
+ }
if (begin == end) {
*_out = NULL; // no meshes ...
@@ -772,8 +768,14 @@ void SceneCombiner::MergeMeshes(aiMesh** _out,unsigned int /*flags*/,
aiMesh* out = *_out = new aiMesh();
out->mMaterialIndex = (*begin)->mMaterialIndex;
+ std::string name;
// Find out how much output storage we'll need
- for (std::vector<aiMesh*>::const_iterator it = begin; it != end;++it) {
+ for (std::vector<aiMesh*>::const_iterator it = begin; it != end; ++it) {
+ const char *meshName( (*it)->mName.C_Str() );
+ name += std::string( meshName );
+ if ( it != end - 1 ) {
+ name += ".";
+ }
out->mNumVertices += (*it)->mNumVertices;
out->mNumFaces += (*it)->mNumFaces;
out->mNumBones += (*it)->mNumBones;
@@ -781,6 +783,7 @@ void SceneCombiner::MergeMeshes(aiMesh** _out,unsigned int /*flags*/,
// combine primitive type flags
out->mPrimitiveTypes |= (*it)->mPrimitiveTypes;
}
+ out->mName.Set( name.c_str() );
if (out->mNumVertices) {
aiVector3D* pv2;
@@ -789,11 +792,11 @@ void SceneCombiner::MergeMeshes(aiMesh** _out,unsigned int /*flags*/,
if ((**begin).HasPositions()) {
pv2 = out->mVertices = new aiVector3D[out->mNumVertices];
- for (std::vector<aiMesh*>::const_iterator it = begin; it != end;++it) {
+ for (std::vector<aiMesh*>::const_iterator it = begin; it != end; ++it) {
if ((*it)->mVertices) {
::memcpy(pv2,(*it)->mVertices,(*it)->mNumVertices*sizeof(aiVector3D));
}
- else DefaultLogger::get()->warn("JoinMeshes: Positions expected but input mesh contains no positions");
+ else ASSIMP_LOG_WARN("JoinMeshes: Positions expected but input mesh contains no positions");
pv2 += (*it)->mNumVertices;
}
}
@@ -804,39 +807,41 @@ void SceneCombiner::MergeMeshes(aiMesh** _out,unsigned int /*flags*/,
for (std::vector<aiMesh*>::const_iterator it = begin; it != end;++it) {
if ((*it)->mNormals) {
::memcpy(pv2,(*it)->mNormals,(*it)->mNumVertices*sizeof(aiVector3D));
+ } else {
+ ASSIMP_LOG_WARN( "JoinMeshes: Normals expected but input mesh contains no normals" );
}
- else DefaultLogger::get()->warn("JoinMeshes: Normals expected but input mesh contains no normals");
pv2 += (*it)->mNumVertices;
}
}
- // copy tangents and bitangents
+ // copy tangents and bi-tangents
if ((**begin).HasTangentsAndBitangents()) {
pv2 = out->mTangents = new aiVector3D[out->mNumVertices];
aiVector3D* pv2b = out->mBitangents = new aiVector3D[out->mNumVertices];
- for (std::vector<aiMesh*>::const_iterator it = begin; it != end;++it) {
+ for (std::vector<aiMesh*>::const_iterator it = begin; it != end;++it) {
if ((*it)->mTangents) {
::memcpy(pv2, (*it)->mTangents, (*it)->mNumVertices*sizeof(aiVector3D));
::memcpy(pv2b,(*it)->mBitangents,(*it)->mNumVertices*sizeof(aiVector3D));
+ } else {
+ ASSIMP_LOG_WARN( "JoinMeshes: Tangents expected but input mesh contains no tangents" );
}
- else DefaultLogger::get()->warn("JoinMeshes: Tangents expected but input mesh contains no tangents");
pv2 += (*it)->mNumVertices;
pv2b += (*it)->mNumVertices;
}
}
// copy texture coordinates
unsigned int n = 0;
- while ((**begin).HasTextureCoords(n)) {
+ while ((**begin).HasTextureCoords(n)) {
out->mNumUVComponents[n] = (*begin)->mNumUVComponents[n];
pv2 = out->mTextureCoords[n] = new aiVector3D[out->mNumVertices];
for (std::vector<aiMesh*>::const_iterator it = begin; it != end;++it) {
-
if ((*it)->mTextureCoords[n]) {
::memcpy(pv2,(*it)->mTextureCoords[n],(*it)->mNumVertices*sizeof(aiVector3D));
+ } else {
+ ASSIMP_LOG_WARN( "JoinMeshes: UVs expected but input mesh contains no UVs" );
}
- else DefaultLogger::get()->warn("JoinMeshes: UVs expected but input mesh contains no UVs");
pv2 += (*it)->mNumVertices;
}
++n;
@@ -844,14 +849,14 @@ void SceneCombiner::MergeMeshes(aiMesh** _out,unsigned int /*flags*/,
// copy vertex colors
n = 0;
while ((**begin).HasVertexColors(n)) {
- aiColor4D* pv2 = out->mColors[n] = new aiColor4D[out->mNumVertices];
- for (std::vector<aiMesh*>::const_iterator it = begin; it != end;++it) {
-
+ aiColor4D *pVec2 = out->mColors[n] = new aiColor4D[out->mNumVertices];
+ for ( std::vector<aiMesh*>::const_iterator it = begin; it != end; ++it ) {
if ((*it)->mColors[n]) {
- ::memcpy(pv2,(*it)->mColors[n],(*it)->mNumVertices*sizeof(aiColor4D));
+ ::memcpy( pVec2, (*it)->mColors[ n ], (*it)->mNumVertices * sizeof( aiColor4D ) ) ;
+ } else {
+ ASSIMP_LOG_WARN( "JoinMeshes: VCs expected but input mesh contains no VCs" );
}
- else DefaultLogger::get()->warn("JoinMeshes: VCs expected but input mesh contains no VCs");
- pv2 += (*it)->mNumVertices;
+ pVec2 += (*it)->mNumVertices;
}
++n;
}
@@ -895,7 +900,9 @@ void SceneCombiner::MergeMaterials(aiMaterial** dest,
std::vector<aiMaterial*>::const_iterator begin,
std::vector<aiMaterial*>::const_iterator end)
{
- ai_assert(NULL != dest);
+ if ( nullptr == dest ) {
+ return;
+ }
if (begin == end) {
*dest = NULL; // no materials ...
@@ -945,10 +952,9 @@ void SceneCombiner::MergeMaterials(aiMaterial** dest,
// ------------------------------------------------------------------------------------------------
template <typename Type>
-inline void CopyPtrArray (Type**& dest, const Type* const * src, ai_uint num)
-{
- if (!num)
- {
+inline
+void CopyPtrArray (Type**& dest, const Type* const * src, ai_uint num) {
+ if (!num) {
dest = NULL;
return;
}
@@ -960,9 +966,11 @@ inline void CopyPtrArray (Type**& dest, const Type* const * src, ai_uint num)
// ------------------------------------------------------------------------------------------------
template <typename Type>
-inline void GetArrayCopy (Type*& dest, ai_uint num )
-{
- if (!dest)return;
+inline
+void GetArrayCopy(Type*& dest, ai_uint num ) {
+ if ( !dest ) {
+ return;
+ }
Type* old = dest;
dest = new Type[num];
@@ -970,28 +978,38 @@ inline void GetArrayCopy (Type*& dest, ai_uint num )
}
// ------------------------------------------------------------------------------------------------
-void SceneCombiner::CopySceneFlat(aiScene** _dest,const aiScene* src)
-{
+void SceneCombiner::CopySceneFlat(aiScene** _dest,const aiScene* src) {
+ if ( nullptr == _dest || nullptr == src ) {
+ return;
+ }
+
// reuse the old scene or allocate a new?
if (*_dest) {
(*_dest)->~aiScene();
new (*_dest) aiScene();
+ } else {
+ *_dest = new aiScene();
}
- else *_dest = new aiScene();
::memcpy(*_dest,src,sizeof(aiScene));
}
// ------------------------------------------------------------------------------------------------
-void SceneCombiner::CopyScene(aiScene** _dest,const aiScene* src,bool allocate)
-{
- ai_assert(NULL != _dest && NULL != src);
+void SceneCombiner::CopyScene(aiScene** _dest,const aiScene* src,bool allocate) {
+ if ( nullptr == _dest || nullptr == src ) {
+ return;
+ }
if (allocate) {
*_dest = new aiScene();
}
aiScene* dest = *_dest;
- ai_assert(dest);
+ ai_assert(nullptr != dest);
+
+ // copy metadata
+ if ( nullptr != src->mMetaData ) {
+ dest->mMetaData = new aiMetadata( *src->mMetaData );
+ }
// copy animations
dest->mNumAnimations = src->mNumAnimations;
@@ -1036,9 +1054,10 @@ void SceneCombiner::CopyScene(aiScene** _dest,const aiScene* src,bool allocate)
}
// ------------------------------------------------------------------------------------------------
-void SceneCombiner::Copy (aiMesh** _dest, const aiMesh* src)
-{
- ai_assert(NULL != _dest && NULL != src);
+void SceneCombiner::Copy( aiMesh** _dest, const aiMesh* src ) {
+ if ( nullptr == _dest || nullptr == src ) {
+ return;
+ }
aiMesh* dest = *_dest = new aiMesh();
@@ -1064,17 +1083,17 @@ void SceneCombiner::Copy (aiMesh** _dest, const aiMesh* src)
// make a deep copy of all faces
GetArrayCopy(dest->mFaces,dest->mNumFaces);
- for (unsigned int i = 0; i < dest->mNumFaces;++i)
- {
+ for (unsigned int i = 0; i < dest->mNumFaces;++i) {
aiFace& f = dest->mFaces[i];
GetArrayCopy(f.mIndices,f.mNumIndices);
}
}
// ------------------------------------------------------------------------------------------------
-void SceneCombiner::Copy (aiMaterial** _dest, const aiMaterial* src)
-{
- ai_assert(NULL != _dest && NULL != src);
+void SceneCombiner::Copy (aiMaterial** _dest, const aiMaterial* src) {
+ if ( nullptr == _dest || nullptr == src ) {
+ return;
+ }
aiMaterial* dest = (aiMaterial*) ( *_dest = new aiMaterial() );
@@ -1102,9 +1121,10 @@ void SceneCombiner::Copy (aiMaterial** _dest, const aiMaterial* src)
}
// ------------------------------------------------------------------------------------------------
-void SceneCombiner::Copy (aiTexture** _dest, const aiTexture* src)
-{
- ai_assert(NULL != _dest && NULL != src);
+void SceneCombiner::Copy(aiTexture** _dest, const aiTexture* src) {
+ if ( nullptr == _dest || nullptr == src ) {
+ return;
+ }
aiTexture* dest = *_dest = new aiTexture();
@@ -1131,10 +1151,10 @@ void SceneCombiner::Copy (aiTexture** _dest, const aiTexture* src)
}
// ------------------------------------------------------------------------------------------------
-void SceneCombiner::Copy( aiAnimation** _dest, const aiAnimation* src )
-{
- ai_assert( NULL != _dest );
- ai_assert( NULL != src );
+void SceneCombiner::Copy( aiAnimation** _dest, const aiAnimation* src ) {
+ if ( nullptr == _dest || nullptr == src ) {
+ return;
+ }
aiAnimation* dest = *_dest = new aiAnimation();
@@ -1146,9 +1166,10 @@ void SceneCombiner::Copy( aiAnimation** _dest, const aiAnimation* src )
}
// ------------------------------------------------------------------------------------------------
-void SceneCombiner::Copy (aiNodeAnim** _dest, const aiNodeAnim* src)
-{
- ai_assert(NULL != _dest && NULL != src);
+void SceneCombiner::Copy(aiNodeAnim** _dest, const aiNodeAnim* src) {
+ if ( nullptr == _dest || nullptr == src ) {
+ return;
+ }
aiNodeAnim* dest = *_dest = new aiNodeAnim();
@@ -1162,9 +1183,10 @@ void SceneCombiner::Copy (aiNodeAnim** _dest, const aiNodeAnim* src)
}
// ------------------------------------------------------------------------------------------------
-void SceneCombiner::Copy (aiCamera** _dest,const aiCamera* src)
-{
- ai_assert(NULL != _dest && NULL != src);
+void SceneCombiner::Copy( aiCamera** _dest,const aiCamera* src) {
+ if ( nullptr == _dest || nullptr == src ) {
+ return;
+ }
aiCamera* dest = *_dest = new aiCamera();
@@ -1173,9 +1195,10 @@ void SceneCombiner::Copy (aiCamera** _dest,const aiCamera* src)
}
// ------------------------------------------------------------------------------------------------
-void SceneCombiner::Copy (aiLight** _dest, const aiLight* src)
-{
- ai_assert(NULL != _dest && NULL != src);
+void SceneCombiner::Copy(aiLight** _dest, const aiLight* src) {
+ if ( nullptr == _dest || nullptr == src ) {
+ return;
+ }
aiLight* dest = *_dest = new aiLight();
@@ -1184,9 +1207,10 @@ void SceneCombiner::Copy (aiLight** _dest, const aiLight* src)
}
// ------------------------------------------------------------------------------------------------
-void SceneCombiner::Copy (aiBone** _dest, const aiBone* src)
-{
- ai_assert(NULL != _dest && NULL != src);
+void SceneCombiner::Copy(aiBone** _dest, const aiBone* src) {
+ if ( nullptr == _dest || nullptr == src ) {
+ return;
+ }
aiBone* dest = *_dest = new aiBone();
@@ -1222,10 +1246,14 @@ void SceneCombiner::Copy (aiNode** _dest, const aiNode* src)
}
// ------------------------------------------------------------------------------------------------
-void SceneCombiner::Copy(aiMetadata** _dest, const aiMetadata* src)
-{
- ai_assert( NULL != _dest );
- ai_assert( NULL != src);
+void SceneCombiner::Copy(aiMetadata** _dest, const aiMetadata* src) {
+ if ( nullptr == _dest || nullptr == src ) {
+ return;
+ }
+
+ if ( 0 == src->mNumProperties ) {
+ return;
+ }
aiMetadata* dest = *_dest = aiMetadata::Alloc( src->mNumProperties );
std::copy(src->mKeys, src->mKeys + src->mNumProperties, dest->mKeys);
@@ -1236,31 +1264,33 @@ void SceneCombiner::Copy(aiMetadata** _dest, const aiMetadata* src)
aiMetadataEntry& out = dest->mValues[i];
out.mType = in.mType;
switch (dest->mValues[i].mType) {
- case AI_BOOL:
- out.mData = new bool(*static_cast<bool*>(in.mData));
- break;
- case AI_INT32:
- out.mData = new int32_t(*static_cast<int32_t*>(in.mData));
- break;
- case AI_UINT64:
- out.mData = new uint64_t(*static_cast<uint64_t*>(in.mData));
- break;
- case AI_FLOAT:
- out.mData = new float(*static_cast<float*>(in.mData));
- break;
- case AI_DOUBLE:
- out.mData = new double(*static_cast<double*>(in.mData));
- break;
- case AI_AISTRING:
- out.mData = new aiString(*static_cast<aiString*>(in.mData));
- break;
- case AI_AIVECTOR3D:
- out.mData = new aiVector3D(*static_cast<aiVector3D*>(in.mData));
- break;
- default:
- ai_assert(false);
+ case AI_BOOL:
+ out.mData = new bool(*static_cast<bool*>(in.mData));
+ break;
+ case AI_INT32:
+ out.mData = new int32_t(*static_cast<int32_t*>(in.mData));
+ break;
+ case AI_UINT64:
+ out.mData = new uint64_t(*static_cast<uint64_t*>(in.mData));
+ break;
+ case AI_FLOAT:
+ out.mData = new float(*static_cast<float*>(in.mData));
+ break;
+ case AI_DOUBLE:
+ out.mData = new double(*static_cast<double*>(in.mData));
+ break;
+ case AI_AISTRING:
+ out.mData = new aiString(*static_cast<aiString*>(in.mData));
+ break;
+ case AI_AIVECTOR3D:
+ out.mData = new aiVector3D(*static_cast<aiVector3D*>(in.mData));
+ break;
+ default:
+ ai_assert(false);
+ break;
}
}
}
-}
+} // Namespace Assimp
+
diff --git a/code/ScenePreprocessor.cpp b/code/ScenePreprocessor.cpp
index 0a6366b7d..1228ab2c2 100644
--- a/code/ScenePreprocessor.cpp
+++ b/code/ScenePreprocessor.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -80,7 +81,7 @@ void ScenePreprocessor::ProcessScene ()
name.Set(AI_DEFAULT_MATERIAL_NAME);
helper->AddProperty(&name,AI_MATKEY_NAME);
- DefaultLogger::get()->debug("ScenePreprocessor: Adding default material \'" AI_DEFAULT_MATERIAL_NAME "\'");
+ ASSIMP_LOG_DEBUG("ScenePreprocessor: Adding default material \'" AI_DEFAULT_MATERIAL_NAME "\'");
for (unsigned int i = 0; i < scene->mNumMeshes;++i) {
scene->mMeshes[i]->mMaterialIndex = scene->mNumMaterials;
@@ -103,7 +104,7 @@ void ScenePreprocessor::ProcessMesh (aiMesh* mesh)
aiVector3D* p = mesh->mTextureCoords[i], *end = p+mesh->mNumVertices;
- // Ensure unsued components are zeroed. This will make 1D texture channels work
+ // Ensure unused components are zeroed. This will make 1D texture channels work
// as if they were 2D channels .. just in case an application doesn't handle
// this case
if (2 == mesh->mNumUVComponents[i]) {
@@ -121,7 +122,7 @@ void ScenePreprocessor::ProcessMesh (aiMesh* mesh)
break;
}
if (p == end) {
- DefaultLogger::get()->warn("ScenePreprocessor: UVs are declared to be 3D but they're obviously not. Reverting to 2D.");
+ ASSIMP_LOG_WARN("ScenePreprocessor: UVs are declared to be 3D but they're obviously not. Reverting to 2D.");
mesh->mNumUVComponents[i] = 2;
}
}
@@ -223,7 +224,7 @@ void ScenePreprocessor::ProcessAnimation (aiAnimation* anim)
q.mTime = 0.;
q.mValue = rotation;
- DefaultLogger::get()->debug("ScenePreprocessor: Dummy rotation track has been generated");
+ ASSIMP_LOG_DEBUG("ScenePreprocessor: Dummy rotation track has been generated");
}
// No scaling keys? Generate a dummy track
@@ -235,7 +236,7 @@ void ScenePreprocessor::ProcessAnimation (aiAnimation* anim)
q.mTime = 0.;
q.mValue = scaling;
- DefaultLogger::get()->debug("ScenePreprocessor: Dummy scaling track has been generated");
+ ASSIMP_LOG_DEBUG("ScenePreprocessor: Dummy scaling track has been generated");
}
// No position keys? Generate a dummy track
@@ -247,14 +248,14 @@ void ScenePreprocessor::ProcessAnimation (aiAnimation* anim)
q.mTime = 0.;
q.mValue = position;
- DefaultLogger::get()->debug("ScenePreprocessor: Dummy position track has been generated");
+ ASSIMP_LOG_DEBUG("ScenePreprocessor: Dummy position track has been generated");
}
}
}
}
if (anim->mDuration == -1.) {
- DefaultLogger::get()->debug("ScenePreprocessor: Setting animation duration");
+ ASSIMP_LOG_DEBUG("ScenePreprocessor: Setting animation duration");
anim->mDuration = last - std::min( first, 0. );
}
}
diff --git a/code/ScenePreprocessor.h b/code/ScenePreprocessor.h
index 3311036c3..3900a237b 100644
--- a/code/ScenePreprocessor.h
+++ b/code/ScenePreprocessor.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/ScenePrivate.h b/code/ScenePrivate.h
index 90d34bade..775b9cb52 100644
--- a/code/ScenePrivate.h
+++ b/code/ScenePrivate.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -41,22 +42,21 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/** @file Stuff to deal with aiScene::mPrivate
*/
+#pragma once
#ifndef AI_SCENEPRIVATE_H_INCLUDED
#define AI_SCENEPRIVATE_H_INCLUDED
+#include <assimp/ai_assert.h>
#include <assimp/scene.h>
-namespace Assimp {
+namespace Assimp {
+// Forward declarations
class Importer;
struct ScenePrivateData {
-
- ScenePrivateData()
- : mOrigImporter()
- , mPPStepsApplied()
- , mIsCopy()
- {}
+ // The struct constructor.
+ ScenePrivateData() AI_NO_EXCEPT;
// Importer that originally loaded the scene though the C-API
// If set, this object is owned by this private data instance.
@@ -73,15 +73,33 @@ struct ScenePrivateData {
bool mIsCopy;
};
+inline
+ScenePrivateData::ScenePrivateData() AI_NO_EXCEPT
+: mOrigImporter( nullptr )
+, mPPStepsApplied( 0 )
+, mIsCopy( false ) {
+ // empty
+}
+
// Access private data stored in the scene
-inline ScenePrivateData* ScenePriv(aiScene* in) {
+inline
+ScenePrivateData* ScenePriv(aiScene* in) {
+ ai_assert( nullptr != in );
+ if ( nullptr == in ) {
+ return nullptr;
+ }
return static_cast<ScenePrivateData*>(in->mPrivate);
}
-inline const ScenePrivateData* ScenePriv(const aiScene* in) {
+inline
+const ScenePrivateData* ScenePriv(const aiScene* in) {
+ ai_assert( nullptr != in );
+ if ( nullptr == in ) {
+ return nullptr;
+ }
return static_cast<const ScenePrivateData*>(in->mPrivate);
}
-}
+} // Namespace Assimp
-#endif
+#endif // AI_SCENEPRIVATE_H_INCLUDED
diff --git a/code/SkeletonMeshBuilder.cpp b/code/SkeletonMeshBuilder.cpp
index e9f427113..ecfe8586f 100644
--- a/code/SkeletonMeshBuilder.cpp
+++ b/code/SkeletonMeshBuilder.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -44,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <assimp/scene.h>
-#include "SkeletonMeshBuilder.h"
+#include <assimp/SkeletonMeshBuilder.h>
using namespace Assimp;
diff --git a/code/SortByPTypeProcess.cpp b/code/SortByPTypeProcess.cpp
index e4b314e02..b67da5b95 100644
--- a/code/SortByPTypeProcess.cpp
+++ b/code/SortByPTypeProcess.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -49,7 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// internal headers
#include "ProcessHelper.h"
#include "SortByPTypeProcess.h"
-#include "Exceptional.h"
+#include <assimp/Exceptional.h>
using namespace Assimp;
@@ -84,8 +85,6 @@ void SortByPTypeProcess::SetupProperties(const Importer* pImp)
// Update changed meshes in all nodes
void UpdateNodes(const std::vector<unsigned int>& replaceMeshIndex, aiNode* node)
{
-// std::vector<unsigned int>::const_iterator it;
-
if (node->mNumMeshes)
{
unsigned int newSize = 0;
@@ -132,15 +131,13 @@ void UpdateNodes(const std::vector<unsigned int>& replaceMeshIndex, aiNode* node
// ------------------------------------------------------------------------------------------------
// Executes the post processing step on the given imported data.
-void SortByPTypeProcess::Execute( aiScene* pScene)
-{
- if (!pScene->mNumMeshes)
- {
- DefaultLogger::get()->debug("SortByPTypeProcess skipped, there are no meshes");
+void SortByPTypeProcess::Execute( aiScene* pScene) {
+ if ( 0 == pScene->mNumMeshes) {
+ ASSIMP_LOG_DEBUG("SortByPTypeProcess skipped, there are no meshes");
return;
}
- DefaultLogger::get()->debug("SortByPTypeProcess begin");
+ ASSIMP_LOG_DEBUG("SortByPTypeProcess begin");
unsigned int aiNumMeshesPerPType[4] = {0,0,0,0};
@@ -151,42 +148,38 @@ void SortByPTypeProcess::Execute( aiScene* pScene)
std::vector<unsigned int> replaceMeshIndex(pScene->mNumMeshes*4,UINT_MAX);
std::vector<unsigned int>::iterator meshIdx = replaceMeshIndex.begin();
- for (unsigned int i = 0; i < pScene->mNumMeshes;++i)
- {
+ for (unsigned int i = 0; i < pScene->mNumMeshes; ++i) {
aiMesh* const mesh = pScene->mMeshes[i];
ai_assert(0 != mesh->mPrimitiveTypes);
// if there's just one primitive type in the mesh there's nothing to do for us
unsigned int num = 0;
- if (mesh->mPrimitiveTypes & aiPrimitiveType_POINT)
- {
+ if (mesh->mPrimitiveTypes & aiPrimitiveType_POINT) {
++aiNumMeshesPerPType[0];
++num;
}
- if (mesh->mPrimitiveTypes & aiPrimitiveType_LINE)
- {
+ if (mesh->mPrimitiveTypes & aiPrimitiveType_LINE) {
++aiNumMeshesPerPType[1];
++num;
}
- if (mesh->mPrimitiveTypes & aiPrimitiveType_TRIANGLE)
- {
+ if (mesh->mPrimitiveTypes & aiPrimitiveType_TRIANGLE) {
++aiNumMeshesPerPType[2];
++num;
}
- if (mesh->mPrimitiveTypes & aiPrimitiveType_POLYGON)
- {
+ if (mesh->mPrimitiveTypes & aiPrimitiveType_POLYGON) {
++aiNumMeshesPerPType[3];
++num;
}
- if (1 == num)
- {
- if (!(configRemoveMeshes & mesh->mPrimitiveTypes))
- {
- *meshIdx = (unsigned int) outMeshes.size();
+ if (1 == num) {
+ if (!(configRemoveMeshes & mesh->mPrimitiveTypes)) {
+ *meshIdx = static_cast<unsigned int>( outMeshes.size() );
outMeshes.push_back(mesh);
+ } else {
+ delete mesh;
+ pScene->mMeshes[ i ] = nullptr;
+ bAnyChanges = true;
}
- else bAnyChanges = true;
meshIdx += 4;
continue;
@@ -194,14 +187,13 @@ void SortByPTypeProcess::Execute( aiScene* pScene)
bAnyChanges = true;
// reuse our current mesh arrays for the submesh
- // with the largest numer of primitives
+ // with the largest number of primitives
unsigned int aiNumPerPType[4] = {0,0,0,0};
aiFace* pFirstFace = mesh->mFaces;
aiFace* const pLastFace = pFirstFace + mesh->mNumFaces;
unsigned int numPolyVerts = 0;
- for (;pFirstFace != pLastFace; ++pFirstFace)
- {
+ for (;pFirstFace != pLastFace; ++pFirstFace) {
if (pFirstFace->mNumIndices <= 3)
++aiNumPerPType[pFirstFace->mNumIndices-1];
else
@@ -403,8 +395,8 @@ void SortByPTypeProcess::Execute( aiScene* pScene)
aiNumMeshesPerPType[1], ((configRemoveMeshes & aiPrimitiveType_LINE) ? "X" : ""),
aiNumMeshesPerPType[2], ((configRemoveMeshes & aiPrimitiveType_TRIANGLE) ? "X" : ""),
aiNumMeshesPerPType[3], ((configRemoveMeshes & aiPrimitiveType_POLYGON) ? "X" : ""));
- DefaultLogger::get()->info(buffer);
- DefaultLogger::get()->debug("SortByPTypeProcess finished");
+ ASSIMP_LOG_INFO(buffer);
+ ASSIMP_LOG_DEBUG("SortByPTypeProcess finished");
}
}
diff --git a/code/SortByPTypeProcess.h b/code/SortByPTypeProcess.h
index 0be7925ff..27bfa2155 100644
--- a/code/SortByPTypeProcess.h
+++ b/code/SortByPTypeProcess.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/SpatialSort.cpp b/code/SpatialSort.cpp
index 35724c2cd..b0ab6e412 100644
--- a/code/SpatialSort.cpp
+++ b/code/SpatialSort.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -42,7 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/** @file Implementation of the helper class to quickly find vertices close to a given position */
-#include "SpatialSort.h"
+#include <assimp/SpatialSort.h>
#include <assimp/ai_assert.h>
using namespace Assimp;
@@ -222,7 +223,7 @@ namespace {
if( (-42 == (~42 + 1)) && (binValue & 0x80000000))
return BinFloat(1 << (CHAR_BIT * sizeof(BinFloat) - 1)) - binValue;
// One's complement?
- else if( (-42 == ~42) && (binValue & 0x80000000))
+ else if ( (-42 == ~42) && (binValue & 0x80000000))
return BinFloat(-0) - binValue;
// Sign-magnitude?
else if( (-42 == (42 | (-0))) && (binValue & 0x80000000)) // -0 = 1000... binary
@@ -293,7 +294,7 @@ void SpatialSort::FindIdenticalPositions( const aiVector3D& pPosition,
index++;
// Now start iterating from there until the first position lays outside of the distance range.
- // Add all positions inside the distance range within the tolerance to the result aray
+ // Add all positions inside the distance range within the tolerance to the result array
std::vector<Entry>::const_iterator it = mPositions.begin() + index;
while( ToBinary(it->mDistance) < maxDistBinary)
{
diff --git a/code/SplitByBoneCountProcess.cpp b/code/SplitByBoneCountProcess.cpp
index a73dfe81e..6faf11086 100644
--- a/code/SplitByBoneCountProcess.cpp
+++ b/code/SplitByBoneCountProcess.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -49,7 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/DefaultLogger.hpp>
#include <limits>
-#include "TinyFormatter.h"
+#include <assimp/TinyFormatter.h>
using namespace Assimp;
using namespace Assimp::Formatter;
@@ -87,7 +88,7 @@ void SplitByBoneCountProcess::SetupProperties(const Importer* pImp)
// Executes the post processing step on the given imported data.
void SplitByBoneCountProcess::Execute( aiScene* pScene)
{
- DefaultLogger::get()->debug("SplitByBoneCountProcess begin");
+ ASSIMP_LOG_DEBUG("SplitByBoneCountProcess begin");
// early out
bool isNecessary = false;
@@ -97,7 +98,7 @@ void SplitByBoneCountProcess::Execute( aiScene* pScene)
if( !isNecessary )
{
- DefaultLogger::get()->debug( format() << "SplitByBoneCountProcess early-out: no meshes with more than " << mMaxBoneCount << " bones." );
+ ASSIMP_LOG_DEBUG( format() << "SplitByBoneCountProcess early-out: no meshes with more than " << mMaxBoneCount << " bones." );
return;
}
@@ -145,7 +146,7 @@ void SplitByBoneCountProcess::Execute( aiScene* pScene)
// recurse through all nodes and translate the node's mesh indices to fit the new mesh array
UpdateNode( pScene->mRootNode);
- DefaultLogger::get()->debug( format() << "SplitByBoneCountProcess end: split " << mSubMeshIndices.size() << " meshes into " << meshes.size() << " submeshes." );
+ ASSIMP_LOG_DEBUG( format() << "SplitByBoneCountProcess end: split " << mSubMeshIndices.size() << " meshes into " << meshes.size() << " submeshes." );
}
// ------------------------------------------------------------------------------------------------
@@ -392,7 +393,7 @@ void SplitByBoneCountProcess::UpdateNode( aiNode* pNode) const
newMeshList.insert( newMeshList.end(), replaceMeshes.begin(), replaceMeshes.end());
}
- delete pNode->mMeshes;
+ delete [] pNode->mMeshes;
pNode->mNumMeshes = static_cast<unsigned int>(newMeshList.size());
pNode->mMeshes = new unsigned int[pNode->mNumMeshes];
std::copy( newMeshList.begin(), newMeshList.end(), pNode->mMeshes);
diff --git a/code/SplitByBoneCountProcess.h b/code/SplitByBoneCountProcess.h
index 434ef9866..b46dd6b0f 100644
--- a/code/SplitByBoneCountProcess.h
+++ b/code/SplitByBoneCountProcess.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/SplitLargeMeshes.cpp b/code/SplitLargeMeshes.cpp
index 2066f7989..5cd3afe48 100644
--- a/code/SplitLargeMeshes.cpp
+++ b/code/SplitLargeMeshes.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -39,11 +40,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----------------------------------------------------------------------
*/
-
-/** @file Implementation of the SplitLargeMeshes postprocessing step
-*/
-
-
+/**
+ * @file Implementation of the SplitLargeMeshes postprocessing step
+ */
// internal headers of the post-processing framework
#include "SplitLargeMeshes.h"
@@ -51,60 +50,57 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using namespace Assimp;
-
// ------------------------------------------------------------------------------------------------
-SplitLargeMeshesProcess_Triangle::SplitLargeMeshesProcess_Triangle()
-{
+SplitLargeMeshesProcess_Triangle::SplitLargeMeshesProcess_Triangle() {
LIMIT = AI_SLM_DEFAULT_MAX_TRIANGLES;
}
// ------------------------------------------------------------------------------------------------
-SplitLargeMeshesProcess_Triangle::~SplitLargeMeshesProcess_Triangle()
-{
+SplitLargeMeshesProcess_Triangle::~SplitLargeMeshesProcess_Triangle() {
// nothing to do here
}
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag field.
-bool SplitLargeMeshesProcess_Triangle::IsActive( unsigned int pFlags) const
-{
+bool SplitLargeMeshesProcess_Triangle::IsActive( unsigned int pFlags) const {
return (pFlags & aiProcess_SplitLargeMeshes) != 0;
}
// ------------------------------------------------------------------------------------------------
// Executes the post processing step on the given imported data.
-void SplitLargeMeshesProcess_Triangle::Execute( aiScene* pScene)
-{
- if (0xffffffff == this->LIMIT)return;
+void SplitLargeMeshesProcess_Triangle::Execute( aiScene* pScene) {
+ if (0xffffffff == this->LIMIT || nullptr == pScene ) {
+ return;
+ }
- DefaultLogger::get()->debug("SplitLargeMeshesProcess_Triangle begin");
+ ASSIMP_LOG_DEBUG("SplitLargeMeshesProcess_Triangle begin");
std::vector<std::pair<aiMesh*, unsigned int> > avList;
- for( unsigned int a = 0; a < pScene->mNumMeshes; a++)
+ for( unsigned int a = 0; a < pScene->mNumMeshes; ++a) {
this->SplitMesh(a, pScene->mMeshes[a],avList);
+ }
- if (avList.size() != pScene->mNumMeshes)
- {
+ if (avList.size() != pScene->mNumMeshes) {
// it seems something has been split. rebuild the mesh list
delete[] pScene->mMeshes;
pScene->mNumMeshes = (unsigned int)avList.size();
pScene->mMeshes = new aiMesh*[avList.size()];
- for (unsigned int i = 0; i < avList.size();++i)
+ for (unsigned int i = 0; i < avList.size();++i) {
pScene->mMeshes[i] = avList[i].first;
+ }
// now we need to update all nodes
this->UpdateNode(pScene->mRootNode,avList);
- DefaultLogger::get()->info("SplitLargeMeshesProcess_Triangle finished. Meshes have been split");
+ ASSIMP_LOG_INFO("SplitLargeMeshesProcess_Triangle finished. Meshes have been split");
+ } else {
+ ASSIMP_LOG_DEBUG("SplitLargeMeshesProcess_Triangle finished. There was nothing to do");
}
- else DefaultLogger::get()->debug("SplitLargeMeshesProcess_Triangle finished. There was nothing to do");
- return;
}
// ------------------------------------------------------------------------------------------------
// Setup properties
-void SplitLargeMeshesProcess_Triangle::SetupProperties( const Importer* pImp)
-{
+void SplitLargeMeshesProcess_Triangle::SetupProperties( const Importer* pImp) {
// get the current value of the split property
this->LIMIT = pImp->GetPropertyInteger(AI_CONFIG_PP_SLM_TRIANGLE_LIMIT,AI_SLM_DEFAULT_MAX_TRIANGLES);
}
@@ -112,17 +108,13 @@ void SplitLargeMeshesProcess_Triangle::SetupProperties( const Importer* pImp)
// ------------------------------------------------------------------------------------------------
// Update a node after some meshes have been split
void SplitLargeMeshesProcess_Triangle::UpdateNode(aiNode* pcNode,
- const std::vector<std::pair<aiMesh*, unsigned int> >& avList)
-{
+ const std::vector<std::pair<aiMesh*, unsigned int> >& avList) {
// for every index in out list build a new entry
std::vector<unsigned int> aiEntries;
aiEntries.reserve(pcNode->mNumMeshes + 1);
- for (unsigned int i = 0; i < pcNode->mNumMeshes;++i)
- {
- for (unsigned int a = 0; a < avList.size();++a)
- {
- if (avList[a].second == pcNode->mMeshes[i])
- {
+ for (unsigned int i = 0; i < pcNode->mNumMeshes;++i) {
+ for (unsigned int a = 0; a < avList.size();++a) {
+ if (avList[a].second == pcNode->mMeshes[i]) {
aiEntries.push_back(a);
}
}
@@ -133,27 +125,24 @@ void SplitLargeMeshesProcess_Triangle::UpdateNode(aiNode* pcNode,
pcNode->mNumMeshes = (unsigned int)aiEntries.size();
pcNode->mMeshes = new unsigned int[pcNode->mNumMeshes];
- for (unsigned int b = 0; b < pcNode->mNumMeshes;++b)
+ for (unsigned int b = 0; b < pcNode->mNumMeshes;++b) {
pcNode->mMeshes[b] = aiEntries[b];
+ }
// recusively update all other nodes
- for (unsigned int i = 0; i < pcNode->mNumChildren;++i)
- {
+ for (unsigned int i = 0; i < pcNode->mNumChildren;++i) {
UpdateNode ( pcNode->mChildren[i], avList );
}
- return;
}
// ------------------------------------------------------------------------------------------------
// Executes the post processing step on the given imported data.
void SplitLargeMeshesProcess_Triangle::SplitMesh(
- unsigned int a,
- aiMesh* pMesh,
- std::vector<std::pair<aiMesh*, unsigned int> >& avList)
-{
- if (pMesh->mNumFaces > SplitLargeMeshesProcess_Triangle::LIMIT)
- {
- DefaultLogger::get()->info("Mesh exceeds the triangle limit. It will be split ...");
+ unsigned int a,
+ aiMesh* pMesh,
+ std::vector<std::pair<aiMesh*, unsigned int> >& avList) {
+ if (pMesh->mNumFaces > SplitLargeMeshesProcess_Triangle::LIMIT) {
+ ASSIMP_LOG_INFO("Mesh exceeds the triangle limit. It will be split ...");
// we need to split this mesh into sub meshes
// determine the size of a submesh
@@ -163,8 +152,7 @@ void SplitLargeMeshesProcess_Triangle::SplitMesh(
const unsigned int iOutVertexNum = iOutFaceNum * 3;
// now generate all submeshes
- for (unsigned int i = 0; i < iSubMeshes;++i)
- {
+ for (unsigned int i = 0; i < iSubMeshes;++i) {
aiMesh* pcMesh = new aiMesh;
pcMesh->mNumFaces = iOutFaceNum;
pcMesh->mMaterialIndex = pMesh->mMaterialIndex;
@@ -172,8 +160,7 @@ void SplitLargeMeshesProcess_Triangle::SplitMesh(
// the name carries the adjacency information between the meshes
pcMesh->mName = pMesh->mName;
- if (i == iSubMeshes-1)
- {
+ if (i == iSubMeshes-1) {
pcMesh->mNumFaces = iOutFaceNum + (
pMesh->mNumFaces - iOutFaceNum * iSubMeshes);
}
@@ -184,71 +171,62 @@ void SplitLargeMeshesProcess_Triangle::SplitMesh(
// get the total number of indices
unsigned int iCnt = 0;
- for (unsigned int p = iBase; p < pcMesh->mNumFaces + iBase;++p)
- {
+ for (unsigned int p = iBase; p < pcMesh->mNumFaces + iBase;++p) {
iCnt += pMesh->mFaces[p].mNumIndices;
}
pcMesh->mNumVertices = iCnt;
// allocate storage
- if (pMesh->mVertices != NULL)
+ if (pMesh->mVertices != nullptr) {
pcMesh->mVertices = new aiVector3D[iCnt];
+ }
- if (pMesh->HasNormals())
+ if (pMesh->HasNormals()) {
pcMesh->mNormals = new aiVector3D[iCnt];
+ }
- if (pMesh->HasTangentsAndBitangents())
- {
+ if (pMesh->HasTangentsAndBitangents()) {
pcMesh->mTangents = new aiVector3D[iCnt];
pcMesh->mBitangents = new aiVector3D[iCnt];
}
// texture coordinates
- for (unsigned int c = 0; c < AI_MAX_NUMBER_OF_TEXTURECOORDS;++c)
- {
+ for (unsigned int c = 0; c < AI_MAX_NUMBER_OF_TEXTURECOORDS;++c) {
pcMesh->mNumUVComponents[c] = pMesh->mNumUVComponents[c];
- if (pMesh->HasTextureCoords( c))
- {
+ if (pMesh->HasTextureCoords( c)) {
pcMesh->mTextureCoords[c] = new aiVector3D[iCnt];
}
}
// vertex colors
- for (unsigned int c = 0; c < AI_MAX_NUMBER_OF_COLOR_SETS;++c)
- {
- if (pMesh->HasVertexColors( c))
- {
+ for (unsigned int c = 0; c < AI_MAX_NUMBER_OF_COLOR_SETS;++c) {
+ if (pMesh->HasVertexColors( c)) {
pcMesh->mColors[c] = new aiColor4D[iCnt];
}
}
- if (pMesh->HasBones())
- {
+ if (pMesh->HasBones()) {
// assume the number of bones won't change in most cases
pcMesh->mBones = new aiBone*[pMesh->mNumBones];
// iterate through all bones of the mesh and find those which
// need to be copied to the split mesh
std::vector<aiVertexWeight> avTempWeights;
- for (unsigned int p = 0; p < pcMesh->mNumBones;++p)
- {
+ for (unsigned int p = 0; p < pcMesh->mNumBones;++p) {
aiBone* const bone = pcMesh->mBones[p];
avTempWeights.clear();
avTempWeights.reserve(bone->mNumWeights / iSubMeshes);
- for (unsigned int q = 0; q < bone->mNumWeights;++q)
- {
+ for (unsigned int q = 0; q < bone->mNumWeights;++q) {
aiVertexWeight& weight = bone->mWeights[q];
- if(weight.mVertexId >= iBase && weight.mVertexId < iBase + iOutVertexNum)
- {
+ if(weight.mVertexId >= iBase && weight.mVertexId < iBase + iOutVertexNum) {
avTempWeights.push_back(weight);
weight = avTempWeights.back();
weight.mVertexId -= iBase;
}
}
- if (!avTempWeights.empty())
- {
+ if (!avTempWeights.empty()) {
// we'll need this bone. Copy it ...
aiBone* pc = new aiBone();
pcMesh->mBones[pcMesh->mNumBones++] = pc;
@@ -259,12 +237,12 @@ void SplitLargeMeshesProcess_Triangle::SplitMesh(
// no need to reallocate the array for the last submesh.
// Here we can reuse the (large) source array, although
// we'll waste some memory
- if (iSubMeshes-1 == i)
- {
+ if (iSubMeshes-1 == i) {
pc->mWeights = bone->mWeights;
- bone->mWeights = NULL;
+ bone->mWeights = nullptr;
+ } else {
+ pc->mWeights = new aiVertexWeight[pc->mNumWeights];
}
- else pc->mWeights = new aiVertexWeight[pc->mNumWeights];
// copy the weights
::memcpy(pc->mWeights,&avTempWeights[0],sizeof(aiVertexWeight)*pc->mNumWeights);
@@ -274,8 +252,7 @@ void SplitLargeMeshesProcess_Triangle::SplitMesh(
// (we will also need to copy the array of indices)
unsigned int iCurrent = 0;
- for (unsigned int p = 0; p < pcMesh->mNumFaces;++p)
- {
+ for (unsigned int p = 0; p < pcMesh->mNumFaces;++p) {
pcMesh->mFaces[p].mNumIndices = 3;
// allocate a new array
const unsigned int iTemp = p + iBase;
@@ -287,8 +264,7 @@ void SplitLargeMeshesProcess_Triangle::SplitMesh(
unsigned int* piOut = pcMesh->mFaces[p].mIndices = new unsigned int[iNumIndices];
// need to update the output primitive types
- switch (iNumIndices)
- {
+ switch (iNumIndices) {
case 1:
pcMesh->mPrimitiveTypes |= aiPrimitiveType_POINT;
break;
@@ -303,38 +279,38 @@ void SplitLargeMeshesProcess_Triangle::SplitMesh(
}
// and copy the contents of the old array, offset by current base
- for (unsigned int v = 0; v < iNumIndices;++v)
- {
+ for (unsigned int v = 0; v < iNumIndices;++v) {
unsigned int iIndex = pi[v];
unsigned int iIndexOut = iCurrent++;
piOut[v] = iIndexOut;
// copy positions
- if (pMesh->mVertices != NULL)
+ if (pMesh->mVertices != nullptr) {
pcMesh->mVertices[iIndexOut] = pMesh->mVertices[iIndex];
+ }
// copy normals
- if (pMesh->HasNormals())
+ if (pMesh->HasNormals()) {
pcMesh->mNormals[iIndexOut] = pMesh->mNormals[iIndex];
+ }
// copy tangents/bitangents
- if (pMesh->HasTangentsAndBitangents())
- {
+ if (pMesh->HasTangentsAndBitangents()) {
pcMesh->mTangents[iIndexOut] = pMesh->mTangents[iIndex];
pcMesh->mBitangents[iIndexOut] = pMesh->mBitangents[iIndex];
}
// texture coordinates
- for (unsigned int c = 0; c < AI_MAX_NUMBER_OF_TEXTURECOORDS;++c)
- {
- if (pMesh->HasTextureCoords( c))
+ for (unsigned int c = 0; c < AI_MAX_NUMBER_OF_TEXTURECOORDS;++c) {
+ if (pMesh->HasTextureCoords( c ) ) {
pcMesh->mTextureCoords[c][iIndexOut] = pMesh->mTextureCoords[c][iIndex];
+ }
}
// vertex colors
- for (unsigned int c = 0; c < AI_MAX_NUMBER_OF_COLOR_SETS;++c)
- {
- if (pMesh->HasVertexColors( c))
+ for (unsigned int c = 0; c < AI_MAX_NUMBER_OF_COLOR_SETS;++c) {
+ if (pMesh->HasVertexColors( c)) {
pcMesh->mColors[c][iIndexOut] = pMesh->mColors[c][iIndex];
+ }
}
}
}
@@ -345,76 +321,81 @@ void SplitLargeMeshesProcess_Triangle::SplitMesh(
// now delete the old mesh data
delete pMesh;
+ } else {
+ avList.push_back(std::pair<aiMesh*, unsigned int>(pMesh,a));
}
- else avList.push_back(std::pair<aiMesh*, unsigned int>(pMesh,a));
- return;
}
// ------------------------------------------------------------------------------------------------
-SplitLargeMeshesProcess_Vertex::SplitLargeMeshesProcess_Vertex()
-{
+SplitLargeMeshesProcess_Vertex::SplitLargeMeshesProcess_Vertex() {
LIMIT = AI_SLM_DEFAULT_MAX_VERTICES;
}
// ------------------------------------------------------------------------------------------------
-SplitLargeMeshesProcess_Vertex::~SplitLargeMeshesProcess_Vertex()
-{
+SplitLargeMeshesProcess_Vertex::~SplitLargeMeshesProcess_Vertex() {
// nothing to do here
}
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag field.
-bool SplitLargeMeshesProcess_Vertex::IsActive( unsigned int pFlags) const
-{
+bool SplitLargeMeshesProcess_Vertex::IsActive( unsigned int pFlags) const {
return (pFlags & aiProcess_SplitLargeMeshes) != 0;
}
// ------------------------------------------------------------------------------------------------
// Executes the post processing step on the given imported data.
-void SplitLargeMeshesProcess_Vertex::Execute( aiScene* pScene)
-{
+void SplitLargeMeshesProcess_Vertex::Execute( aiScene* pScene) {
+ if (0xffffffff == this->LIMIT || nullptr == pScene ) {
+ return;
+ }
+
+ ASSIMP_LOG_DEBUG("SplitLargeMeshesProcess_Vertex begin");
+
std::vector<std::pair<aiMesh*, unsigned int> > avList;
- if (0xffffffff == this->LIMIT)return;
+ //Check for point cloud first,
+ //Do not process point cloud, splitMesh works only with faces data
+ for (unsigned int a = 0; a < pScene->mNumMeshes; a++) {
+ if ( pScene->mMeshes[a]->mPrimitiveTypes == aiPrimitiveType_POINT ) {
+ return;
+ }
+ }
- DefaultLogger::get()->debug("SplitLargeMeshesProcess_Vertex begin");
- for( unsigned int a = 0; a < pScene->mNumMeshes; a++)
- this->SplitMesh(a, pScene->mMeshes[a],avList);
+ for( unsigned int a = 0; a < pScene->mNumMeshes; ++a ) {
+ this->SplitMesh(a, pScene->mMeshes[a], avList);
+ }
- if (avList.size() != pScene->mNumMeshes)
- {
+ if (avList.size() != pScene->mNumMeshes) {
// it seems something has been split. rebuild the mesh list
delete[] pScene->mMeshes;
pScene->mNumMeshes = (unsigned int)avList.size();
pScene->mMeshes = new aiMesh*[avList.size()];
- for (unsigned int i = 0; i < avList.size();++i)
+ for (unsigned int i = 0; i < avList.size();++i) {
pScene->mMeshes[i] = avList[i].first;
+ }
// now we need to update all nodes
SplitLargeMeshesProcess_Triangle::UpdateNode(pScene->mRootNode,avList);
- DefaultLogger::get()->info("SplitLargeMeshesProcess_Vertex finished. Meshes have been split");
+ ASSIMP_LOG_INFO("SplitLargeMeshesProcess_Vertex finished. Meshes have been split");
+ } else {
+ ASSIMP_LOG_DEBUG("SplitLargeMeshesProcess_Vertex finished. There was nothing to do");
}
- else DefaultLogger::get()->debug("SplitLargeMeshesProcess_Vertex finished. There was nothing to do");
- return;
}
// ------------------------------------------------------------------------------------------------
// Setup properties
-void SplitLargeMeshesProcess_Vertex::SetupProperties( const Importer* pImp)
-{
+void SplitLargeMeshesProcess_Vertex::SetupProperties( const Importer* pImp) {
this->LIMIT = pImp->GetPropertyInteger(AI_CONFIG_PP_SLM_VERTEX_LIMIT,AI_SLM_DEFAULT_MAX_VERTICES);
}
// ------------------------------------------------------------------------------------------------
// Executes the post processing step on the given imported data.
void SplitLargeMeshesProcess_Vertex::SplitMesh(
- unsigned int a,
- aiMesh* pMesh,
- std::vector<std::pair<aiMesh*, unsigned int> >& avList)
-{
- if (pMesh->mNumVertices > SplitLargeMeshesProcess_Vertex::LIMIT)
- {
+ unsigned int a,
+ aiMesh* pMesh,
+ std::vector<std::pair<aiMesh*, unsigned int> >& avList) {
+ if (pMesh->mNumVertices > SplitLargeMeshesProcess_Vertex::LIMIT) {
typedef std::vector< std::pair<unsigned int,float> > VertexWeightTable;
// build a per-vertex weight list if necessary
@@ -424,7 +405,6 @@ void SplitLargeMeshesProcess_Vertex::SplitMesh(
// determine the estimated size of a submesh
// (this could be too large. Max waste is a single digit percentage)
const unsigned int iSubMeshes = (pMesh->mNumVertices / SplitLargeMeshesProcess_Vertex::LIMIT) + 1;
- //const unsigned int iOutVertexNum2 = pMesh->mNumVertices /iSubMeshes;
// create a std::vector<unsigned int> to indicate which vertices
// have already been copied
@@ -437,11 +417,9 @@ void SplitLargeMeshesProcess_Vertex::SplitMesh(
iEstimatedSize += iEstimatedSize >> 3;
// now generate all submeshes
- unsigned int iBase = 0;
- while (true)
- {
+ unsigned int iBase( 0 );
+ while (true) {
const unsigned int iOutVertexNum = SplitLargeMeshesProcess_Vertex::LIMIT;
-
aiMesh* pcMesh = new aiMesh;
pcMesh->mNumVertices = 0;
pcMesh->mMaterialIndex = pMesh->mMaterialIndex;
@@ -450,18 +428,15 @@ void SplitLargeMeshesProcess_Vertex::SplitMesh(
pcMesh->mName = pMesh->mName;
typedef std::vector<aiVertexWeight> BoneWeightList;
- if (pMesh->HasBones())
- {
+ if (pMesh->HasBones()) {
pcMesh->mBones = new aiBone*[pMesh->mNumBones];
::memset(pcMesh->mBones,0,sizeof(void*)*pMesh->mNumBones);
}
// clear the temporary helper array
- if (iBase)
- {
+ if (iBase) {
// we can't use memset here we unsigned int needn' be 32 bits
- for (auto &elem : avWasCopied)
- {
+ for (auto &elem : avWasCopied) {
elem = 0xffffffff;
}
}
@@ -470,50 +445,41 @@ void SplitLargeMeshesProcess_Vertex::SplitMesh(
std::vector<aiFace> vFaces;
// reserve enough storage for most cases
- if (pMesh->HasPositions())
- {
+ if (pMesh->HasPositions()) {
pcMesh->mVertices = new aiVector3D[iOutVertexNum];
}
- if (pMesh->HasNormals())
- {
+ if (pMesh->HasNormals()) {
pcMesh->mNormals = new aiVector3D[iOutVertexNum];
}
- if (pMesh->HasTangentsAndBitangents())
- {
+ if (pMesh->HasTangentsAndBitangents()) {
pcMesh->mTangents = new aiVector3D[iOutVertexNum];
pcMesh->mBitangents = new aiVector3D[iOutVertexNum];
}
- for (unsigned int c = 0; pMesh->HasVertexColors(c);++c)
- {
+ for (unsigned int c = 0; pMesh->HasVertexColors(c);++c) {
pcMesh->mColors[c] = new aiColor4D[iOutVertexNum];
}
- for (unsigned int c = 0; pMesh->HasTextureCoords(c);++c)
- {
+ for (unsigned int c = 0; pMesh->HasTextureCoords(c);++c) {
pcMesh->mNumUVComponents[c] = pMesh->mNumUVComponents[c];
pcMesh->mTextureCoords[c] = new aiVector3D[iOutVertexNum];
}
vFaces.reserve(iEstimatedSize);
// (we will also need to copy the array of indices)
- while (iBase < pMesh->mNumFaces)
- {
+ while (iBase < pMesh->mNumFaces) {
// allocate a new array
const unsigned int iNumIndices = pMesh->mFaces[iBase].mNumIndices;
// doesn't catch degenerates but is quite fast
unsigned int iNeed = 0;
- for (unsigned int v = 0; v < iNumIndices;++v)
- {
+ for (unsigned int v = 0; v < iNumIndices;++v) {
unsigned int iIndex = pMesh->mFaces[iBase].mIndices[v];
// check whether we do already have this vertex
- if (0xFFFFFFFF == avWasCopied[iIndex])
- {
+ if (0xFFFFFFFF == avWasCopied[iIndex]) {
iNeed++;
}
}
- if (pcMesh->mNumVertices + iNeed > iOutVertexNum)
- {
+ if (pcMesh->mNumVertices + iNeed > iOutVertexNum) {
// don't use this face
break;
}
@@ -526,8 +492,7 @@ void SplitLargeMeshesProcess_Vertex::SplitMesh(
rFace.mIndices = new unsigned int[iNumIndices];
// need to update the output primitive types
- switch (rFace.mNumIndices)
- {
+ switch (rFace.mNumIndices) {
case 1:
pcMesh->mPrimitiveTypes |= aiPrimitiveType_POINT;
break;
@@ -542,13 +507,11 @@ void SplitLargeMeshesProcess_Vertex::SplitMesh(
}
// and copy the contents of the old array, offset by current base
- for (unsigned int v = 0; v < iNumIndices;++v)
- {
+ for (unsigned int v = 0; v < iNumIndices;++v) {
unsigned int iIndex = pMesh->mFaces[iBase].mIndices[v];
// check whether we do already have this vertex
- if (0xFFFFFFFF != avWasCopied[iIndex])
- {
+ if (0xFFFFFFFF != avWasCopied[iIndex]) {
rFace.mIndices[v] = avWasCopied[iIndex];
continue;
}
@@ -557,49 +520,38 @@ void SplitLargeMeshesProcess_Vertex::SplitMesh(
pcMesh->mVertices[pcMesh->mNumVertices] = (pMesh->mVertices[iIndex]);
// copy normals
- if (pMesh->HasNormals())
- {
+ if (pMesh->HasNormals()) {
pcMesh->mNormals[pcMesh->mNumVertices] = (pMesh->mNormals[iIndex]);
}
// copy tangents/bitangents
- if (pMesh->HasTangentsAndBitangents())
- {
+ if (pMesh->HasTangentsAndBitangents()) {
pcMesh->mTangents[pcMesh->mNumVertices] = (pMesh->mTangents[iIndex]);
pcMesh->mBitangents[pcMesh->mNumVertices] = (pMesh->mBitangents[iIndex]);
}
// texture coordinates
- for (unsigned int c = 0; c < AI_MAX_NUMBER_OF_TEXTURECOORDS;++c)
- {
- if (pMesh->HasTextureCoords( c))
- {
+ for (unsigned int c = 0; c < AI_MAX_NUMBER_OF_TEXTURECOORDS;++c) {
+ if (pMesh->HasTextureCoords( c)) {
pcMesh->mTextureCoords[c][pcMesh->mNumVertices] = pMesh->mTextureCoords[c][iIndex];
}
}
// vertex colors
- for (unsigned int c = 0; c < AI_MAX_NUMBER_OF_COLOR_SETS;++c)
- {
- if (pMesh->HasVertexColors( c))
- {
+ for (unsigned int c = 0; c < AI_MAX_NUMBER_OF_COLOR_SETS;++c) {
+ if (pMesh->HasVertexColors( c)) {
pcMesh->mColors[c][pcMesh->mNumVertices] = pMesh->mColors[c][iIndex];
}
}
// check whether we have bone weights assigned to this vertex
rFace.mIndices[v] = pcMesh->mNumVertices;
- if (avPerVertexWeights)
- {
+ if (avPerVertexWeights) {
VertexWeightTable& table = avPerVertexWeights[ pcMesh->mNumVertices ];
- if( !table.empty() )
- {
- for (VertexWeightTable::const_iterator
- iter = table.begin();
- iter != table.end();++iter)
- {
+ if( !table.empty() ) {
+ for (VertexWeightTable::const_iterator iter = table.begin();
+ iter != table.end();++iter) {
// allocate the bone weight array if necessary
BoneWeightList* pcWeightList = (BoneWeightList*)pcMesh->mBones[(*iter).first];
- if (!pcWeightList)
- {
+ if (nullptr == pcWeightList) {
pcMesh->mBones[(*iter).first] = (aiBone*)(pcWeightList = new BoneWeightList());
}
pcWeightList->push_back(aiVertexWeight(pcMesh->mNumVertices,(*iter).second));
@@ -610,26 +562,22 @@ void SplitLargeMeshesProcess_Vertex::SplitMesh(
avWasCopied[iIndex] = pcMesh->mNumVertices;
pcMesh->mNumVertices++;
}
- iBase++;
- if(pcMesh->mNumVertices == iOutVertexNum)
- {
+ ++iBase;
+ if(pcMesh->mNumVertices == iOutVertexNum) {
// break here. The face is only added if it was complete
break;
}
}
// check which bones we'll need to create for this submesh
- if (pMesh->HasBones())
- {
+ if (pMesh->HasBones()) {
aiBone** ppCurrent = pcMesh->mBones;
- for (unsigned int k = 0; k < pMesh->mNumBones;++k)
- {
+ for (unsigned int k = 0; k < pMesh->mNumBones;++k) {
// check whether the bone is existing
BoneWeightList* pcWeightList;
- if ((pcWeightList = (BoneWeightList*)pcMesh->mBones[k]))
- {
+ if ((pcWeightList = (BoneWeightList*)pcMesh->mBones[k])) {
aiBone* pcOldBone = pMesh->mBones[k];
- aiBone* pcOut;
+ aiBone* pcOut( nullptr );
*ppCurrent++ = pcOut = new aiBone();
pcOut->mName = aiString(pcOldBone->mName);
pcOut->mOffsetMatrix = pcOldBone->mOffsetMatrix;
@@ -651,14 +599,14 @@ void SplitLargeMeshesProcess_Vertex::SplitMesh(
pcMesh->mFaces = new aiFace[vFaces.size()];
pcMesh->mNumFaces = (unsigned int)vFaces.size();
- for (unsigned int p = 0; p < pcMesh->mNumFaces;++p)
+ for (unsigned int p = 0; p < pcMesh->mNumFaces;++p) {
pcMesh->mFaces[p] = vFaces[p];
+ }
// add the newly created mesh to the list
avList.push_back(std::pair<aiMesh*, unsigned int>(pcMesh,a));
- if (iBase == pMesh->mNumFaces)
- {
+ if (iBase == pMesh->mNumFaces) {
// have all faces ... finish the outer loop, too
break;
}
@@ -672,5 +620,4 @@ void SplitLargeMeshesProcess_Vertex::SplitMesh(
return;
}
avList.push_back(std::pair<aiMesh*, unsigned int>(pMesh,a));
- return;
}
diff --git a/code/SplitLargeMeshes.h b/code/SplitLargeMeshes.h
index 7556e9fe8..7a977ff07 100644
--- a/code/SplitLargeMeshes.h
+++ b/code/SplitLargeMeshes.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/StandardShapes.cpp b/code/StandardShapes.cpp
index 4346a8d76..7d2319401 100644
--- a/code/StandardShapes.cpp
+++ b/code/StandardShapes.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -46,8 +47,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* http://geometrictools.com/Documentation/PlatonicSolids.pdf.
*/
-#include "StandardShapes.h"
-#include "StringComparison.h"
+#include <assimp/StandardShapes.h>
+#include <assimp/StringComparison.h>
#include <stddef.h>
#include <assimp/Defines.h>
#include <assimp/mesh.h>
@@ -376,7 +377,7 @@ void StandardShapes::MakeSphere(unsigned int tess,
MakeIcosahedron(positions);
// ... and subdivide it until the requested output
- // tesselation is reached
+ // tessellation is reached
for (unsigned int i = 0; i<tess;++i)
Subdivide(positions);
}
diff --git a/code/StdOStreamLogStream.h b/code/StdOStreamLogStream.h
index d9993b246..43b8d7de2 100644
--- a/code/StdOStreamLogStream.h
+++ b/code/StdOStreamLogStream.h
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/StepExporter.cpp b/code/StepExporter.cpp
index acf1b6dad..4368201b7 100644
--- a/code/StepExporter.cpp
+++ b/code/StepExporter.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -46,9 +47,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "StepExporter.h"
#include "ConvertToLHProcess.h"
-#include "Bitmap.h"
-#include "BaseImporter.h"
-#include "fast_atof.h"
+#include <assimp/Bitmap.h>
+#include <assimp/BaseImporter.h>
+#include <assimp/fast_atof.h>
#include <assimp/SceneCombiner.h>
#include <iostream>
#include <ctime>
@@ -56,7 +57,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <map>
#include <list>
#include <memory>
-#include "Exceptional.h"
+#include <assimp/Exceptional.h>
#include <assimp/DefaultIOSystem.h>
#include <assimp/IOSystem.hpp>
#include <assimp/scene.h>
@@ -161,7 +162,7 @@ void StepExporter::WriteFile()
// see http://shodhganga.inflibnet.ac.in:8080/jspui/bitstream/10603/14116/11/11_chapter%203.pdf
// note, that all realnumber values must be comma separated in x files
mOutput.setf(std::ios::fixed);
- // precission for double
+ // precision for double
// see http://stackoverflow.com/questions/554063/how-do-i-print-a-double-value-with-full-precision-using-cout
mOutput.precision(16);
diff --git a/code/StepExporter.h b/code/StepExporter.h
index e5cdda7a1..f1323bee8 100644
--- a/code/StepExporter.h
+++ b/code/StepExporter.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/Subdivision.cpp b/code/Subdivision.cpp
index bc5292dbe..2f2f09596 100644
--- a/code/Subdivision.cpp
+++ b/code/Subdivision.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -39,11 +40,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----------------------------------------------------------------------
*/
-#include "Subdivision.h"
+#include <assimp/Subdivision.h>
#include <assimp/SceneCombiner.h>
-#include "SpatialSort.h"
+#include <assimp/SpatialSort.h>
#include "ProcessHelper.h"
-#include "Vertex.h"
+#include <assimp/Vertex.h>
#include <assimp/ai_assert.h>
#include <stdio.h>
@@ -176,7 +177,7 @@ void CatmullClarkSubdivider::Subdivide (
aiMesh* i = smesh[s];
// FIX - mPrimitiveTypes might not yet be initialized
if (i->mPrimitiveTypes && (i->mPrimitiveTypes & (aiPrimitiveType_LINE|aiPrimitiveType_POINT))==i->mPrimitiveTypes) {
- DefaultLogger::get()->debug("Catmull-Clark Subdivider: Skipping pure line/point mesh");
+ ASSIMP_LOG_DEBUG("Catmull-Clark Subdivider: Skipping pure line/point mesh");
if (discard_input) {
out[s] = i;
@@ -197,12 +198,12 @@ void CatmullClarkSubdivider::Subdivide (
// checking any ranges.
ai_assert(inmeshes.size()==outmeshes.size()&&inmeshes.size()==maptbl.size());
if (inmeshes.empty()) {
- DefaultLogger::get()->warn("Catmull-Clark Subdivider: Pure point/line scene, I can't do anything");
+ ASSIMP_LOG_WARN("Catmull-Clark Subdivider: Pure point/line scene, I can't do anything");
return;
}
InternSubdivide(&inmeshes.front(),inmeshes.size(),&outmeshes.front(),num);
for (unsigned int i = 0; i < maptbl.size(); ++i) {
- ai_assert(outmeshes[i]);
+ ai_assert(nullptr != outmeshes[i]);
out[maptbl[i]] = outmeshes[i];
}
@@ -341,11 +342,8 @@ void CatmullClarkSubdivider::InternSubdivide (
// Report the number of bad edges. bad edges are referenced by less than two
// faces in the mesh. They occur at outer model boundaries in non-closed
// shapes.
- char tmp[512];
- ai_snprintf(tmp, 512, "Catmull-Clark Subdivider: got %u bad edges touching only one face (totally %u edges). ",
- bad_cnt,static_cast<unsigned int>(edges.size()));
-
- DefaultLogger::get()->debug(tmp);
+ ASSIMP_LOG_DEBUG_F("Catmull-Clark Subdivider: got ", bad_cnt, " bad edges touching only one face (totally ",
+ static_cast<unsigned int>(edges.size()), " edges). ");
}}
// ---------------------------------------------------------------------
@@ -403,7 +401,7 @@ void CatmullClarkSubdivider::InternSubdivide (
}
ai_assert(haveit);
if (!haveit) {
- DefaultLogger::get()->debug("Catmull-Clark Subdivider: Index not used");
+ ASSIMP_LOG_DEBUG("Catmull-Clark Subdivider: Index not used");
}
break;
}
@@ -562,7 +560,7 @@ void CatmullClarkSubdivider::InternSubdivide (
// this invariant *must* hold if the vertex-to-face adjacency table is valid
ai_assert(haveit);
if ( !haveit ) {
- DefaultLogger::get()->warn( "OBJ: no name for material library specified." );
+ ASSIMP_LOG_WARN( "OBJ: no name for material library specified." );
}
}
diff --git a/code/TargetAnimation.cpp b/code/TargetAnimation.cpp
index ab6b3d12f..2834b1f10 100644
--- a/code/TargetAnimation.cpp
+++ b/code/TargetAnimation.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/TargetAnimation.h b/code/TargetAnimation.h
index 21b66e591..bb37e6008 100644
--- a/code/TargetAnimation.h
+++ b/code/TargetAnimation.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/TerragenLoader.cpp b/code/TerragenLoader.cpp
index ecf33aae9..0eb22cef6 100644
--- a/code/TerragenLoader.cpp
+++ b/code/TerragenLoader.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -47,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_NO_TERRAGEN_IMPORTER
#include "TerragenLoader.h"
-#include "StreamReader.h"
+#include <assimp/StreamReader.h>
#include <assimp/Importer.hpp>
#include <assimp/IOSystem.hpp>
#include <assimp/scene.h>
@@ -141,9 +142,6 @@ void TerragenImporter::InternReadFile( const std::string& pFile,
throw DeadlyImportError( "TER: Magic string \'TERRAIN\' not found" );
unsigned int x = 0,y = 0,mode = 0;
- float rad = 6370.f;
- (void)rad;
-
aiNode* root = pScene->mRootNode = new aiNode();
root->mName.Set("<TERRAGEN.TERRAIN>");
@@ -187,14 +185,14 @@ void TerragenImporter::InternReadFile( const std::string& pFile,
// mapping == 1: earth radius
else if (!::strncmp(head,AI_TERR_CHUNK_CRAD,4))
{
- rad = reader.GetF4();
+ reader.GetF4();
}
// mapping mode
else if (!::strncmp(head,AI_TERR_CHUNK_CRVM,4))
{
mode = reader.GetI1();
if (0 != mode)
- DefaultLogger::get()->error("TER: Unsupported mapping mode, a flat terrain is returned");
+ ASSIMP_LOG_ERROR("TER: Unsupported mapping mode, a flat terrain is returned");
}
// actual terrain data
else if (!::strncmp(head,AI_TERR_CHUNK_ALTW,4))
diff --git a/code/TerragenLoader.h b/code/TerragenLoader.h
index a95bd6bff..a02889de1 100644
--- a/code/TerragenLoader.h
+++ b/code/TerragenLoader.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -45,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef INCLUDED_AI_TERRAGEN_TERRAIN_LOADER_H
#define INCLUDED_AI_TERRAGEN_TERRAIN_LOADER_H
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
namespace Assimp {
// Magic strings
diff --git a/code/TextureTransform.cpp b/code/TextureTransform.cpp
index 76f0ce58c..c7adbe7a9 100644
--- a/code/TextureTransform.cpp
+++ b/code/TextureTransform.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -49,7 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/scene.h>
#include "TextureTransform.h"
-#include "StringUtils.h"
+#include <assimp/StringUtils.h>
using namespace Assimp;
@@ -87,7 +88,7 @@ void TextureTransformStep::PreProcessUVTransform(STransformVecInfo& info)
{
/* This function tries to simplify the input UV transformation.
* That's very important as it allows us to reduce the number
- * of output UV channels. The oder in which the transformations
+ * of output UV channels. The order in which the transformations
* are applied is - as always - scaling, rotation, translation.
*/
@@ -104,12 +105,10 @@ void TextureTransformStep::PreProcessUVTransform(STransformVecInfo& info)
if (info.mRotation)
{
float out = info.mRotation;
- if ((rounded = (int)(info.mRotation / (float)AI_MATH_TWO_PI)))
+ if ((rounded = static_cast<int>((info.mRotation / static_cast<float>(AI_MATH_TWO_PI)))))
{
- out -= rounded*(float)AI_MATH_PI;
-
- ai_snprintf(szTemp, 512, "Texture coordinate rotation %f can be simplified to %f",info.mRotation,out);
- DefaultLogger::get()->info(szTemp);
+ out -= rounded * static_cast<float>(AI_MATH_PI);
+ ASSIMP_LOG_INFO_F("Texture coordinate rotation ", info.mRotation, " can be simplified to ", out);
}
// Next step - convert negative rotation angles to positives
@@ -149,7 +148,7 @@ void TextureTransformStep::PreProcessUVTransform(STransformVecInfo& info)
out = 1.f;
}
if (szTemp[0]) {
- DefaultLogger::get()->info(szTemp);
+ ASSIMP_LOG_INFO(szTemp);
info.mTranslation.x = out;
}
}
@@ -182,7 +181,7 @@ void TextureTransformStep::PreProcessUVTransform(STransformVecInfo& info)
out = 1.f;
}
if (szTemp[0]) {
- DefaultLogger::get()->info(szTemp);
+ ASSIMP_LOG_INFO(szTemp);
info.mTranslation.y = out;
}
}
@@ -220,7 +219,7 @@ inline const char* MappingModeToChar(aiTextureMapMode map)
// ------------------------------------------------------------------------------------------------
void TextureTransformStep::Execute( aiScene* pScene)
{
- DefaultLogger::get()->debug("TransformUVCoordsProcess begin");
+ ASSIMP_LOG_DEBUG("TransformUVCoordsProcess begin");
/* We build a per-mesh list of texture transformations we'll need
@@ -317,7 +316,7 @@ void TextureTransformStep::Execute( aiScene* pScene)
info.lockedPos = AI_TT_UV_IDX_LOCK_TBD;
}
- // Get all coresponding meshes
+ // Get all corresponding meshes
for (unsigned int n = 0; n < pScene->mNumMeshes;++n) {
aiMesh* mesh = pScene->mMeshes[n];
if (mesh->mMaterialIndex != i || !mesh->mTextureCoords[0])
@@ -330,7 +329,7 @@ void TextureTransformStep::Execute( aiScene* pScene)
}
if (mesh->mNumUVComponents[info.uvIndex] >= 3){
- DefaultLogger::get()->warn("UV transformations on 3D mapping channels are not supported");
+ ASSIMP_LOG_WARN("UV transformations on 3D mapping channels are not supported");
continue;
}
@@ -415,7 +414,7 @@ void TextureTransformStep::Execute( aiScene* pScene)
++it2;
if ((*it2).lockedPos != AI_TT_UV_IDX_LOCK_NONE) {
- DefaultLogger::get()->error("Channel mismatch, can't compute all transformations properly [design bug]");
+ ASSIMP_LOG_ERROR("Channel mismatch, can't compute all transformations properly [design bug]");
continue;
}
@@ -448,10 +447,8 @@ void TextureTransformStep::Execute( aiScene* pScene)
if (size > AI_MAX_NUMBER_OF_TEXTURECOORDS) {
if (!DefaultLogger::isNullLogger()) {
- ::ai_snprintf(buffer,1024,"%u UV channels required but just %u available",
- static_cast<unsigned int>(trafo.size()),AI_MAX_NUMBER_OF_TEXTURECOORDS);
-
- DefaultLogger::get()->error(buffer);
+ ASSIMP_LOG_ERROR_F(static_cast<unsigned int>(trafo.size()), " UV channels required but just ",
+ AI_MAX_NUMBER_OF_TEXTURECOORDS, " available");
}
size = AI_MAX_NUMBER_OF_TEXTURECOORDS;
}
@@ -486,7 +483,7 @@ void TextureTransformStep::Execute( aiScene* pScene)
MappingModeToChar ((*it).mapU),
MappingModeToChar ((*it).mapV));
- DefaultLogger::get()->info(buffer);
+ ASSIMP_LOG_INFO(buffer);
}
// Check whether we need a new buffer here
@@ -559,12 +556,10 @@ void TextureTransformStep::Execute( aiScene* pScene)
if (!DefaultLogger::isNullLogger()) {
if (transformedChannels) {
- ::ai_snprintf(buffer,1024,"TransformUVCoordsProcess end: %u output channels (in: %u, modified: %u)",
- outChannels,inChannels,transformedChannels);
-
- DefaultLogger::get()->info(buffer);
+ ASSIMP_LOG_INFO_F("TransformUVCoordsProcess end: ", outChannels, " output channels (in: ", inChannels, ", modified: ", transformedChannels,")");
+ } else {
+ ASSIMP_LOG_DEBUG("TransformUVCoordsProcess finished");
}
- else DefaultLogger::get()->debug("TransformUVCoordsProcess finished");
}
}
diff --git a/code/TextureTransform.h b/code/TextureTransform.h
index 7f1e4572f..99d5acf1e 100644
--- a/code/TextureTransform.h
+++ b/code/TextureTransform.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -43,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_TEXTURE_TRANSFORM_H_INCLUDED
#define AI_TEXTURE_TRANSFORM_H_INCLUDED
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
#include "BaseProcess.h"
#include <assimp/material.h>
@@ -64,14 +65,14 @@ namespace Assimp {
/** Small helper structure representing a shortcut into the material list
* to be able to update some values quickly.
*/
-struct TTUpdateInfo
-{
- TTUpdateInfo() :
- directShortcut (NULL)
- , mat (NULL)
- , semantic (0)
- , index (0)
- {}
+struct TTUpdateInfo {
+ TTUpdateInfo() AI_NO_EXCEPT
+ : directShortcut(nullptr)
+ , mat(nullptr)
+ , semantic(0)
+ , index(0) {
+ // empty
+ }
//! Direct shortcut, if available
unsigned int* directShortcut;
@@ -87,15 +88,14 @@ struct TTUpdateInfo
// ---------------------------------------------------------------------------
/** Helper class representing texture coordinate transformations
*/
-struct STransformVecInfo : public aiUVTransform
-{
-
- STransformVecInfo()
- : uvIndex (0)
- , mapU (aiTextureMapMode_Wrap)
- , mapV (aiTextureMapMode_Wrap)
- , lockedPos (AI_TT_UV_IDX_LOCK_NONE)
- {}
+struct STransformVecInfo : public aiUVTransform {
+ STransformVecInfo() AI_NO_EXCEPT
+ : uvIndex(0)
+ , mapU(aiTextureMapMode_Wrap)
+ , mapV(aiTextureMapMode_Wrap)
+ , lockedPos(AI_TT_UV_IDX_LOCK_NONE) {
+ // empty
+ }
//! Source texture coordinate index
unsigned int uvIndex;
diff --git a/code/TriangulateProcess.cpp b/code/TriangulateProcess.cpp
index e2d77a80f..b2ea46ef7 100644
--- a/code/TriangulateProcess.cpp
+++ b/code/TriangulateProcess.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -99,23 +100,24 @@ bool TriangulateProcess::IsActive( unsigned int pFlags) const
// Executes the post processing step on the given imported data.
void TriangulateProcess::Execute( aiScene* pScene)
{
- DefaultLogger::get()->debug("TriangulateProcess begin");
+ ASSIMP_LOG_DEBUG("TriangulateProcess begin");
bool bHas = false;
for( unsigned int a = 0; a < pScene->mNumMeshes; a++)
{
- if ( TriangulateMesh( pScene->mMeshes[ a ] ) ) {
- bHas = true;
+ if (pScene->mMeshes[ a ]) {
+ if ( TriangulateMesh( pScene->mMeshes[ a ] ) ) {
+ bHas = true;
+ }
}
}
if ( bHas ) {
- DefaultLogger::get()->info( "TriangulateProcess finished. All polygons have been triangulated." );
+ ASSIMP_LOG_INFO( "TriangulateProcess finished. All polygons have been triangulated." );
} else {
- DefaultLogger::get()->debug( "TriangulateProcess finished. There was nothing to be done." );
+ ASSIMP_LOG_DEBUG( "TriangulateProcess finished. There was nothing to be done." );
}
}
-
// ------------------------------------------------------------------------------------------------
// Triangulates the given mesh.
bool TriangulateProcess::TriangulateMesh( aiMesh* pMesh)
@@ -285,7 +287,7 @@ bool TriangulateProcess::TriangulateMesh( aiMesh* pMesh)
// We project it onto a plane to get a 2d triangle.
// Collect all vertices of of the polygon.
- for (tmp = 0; tmp < max; ++tmp) {
+ for (tmp = 0; tmp < max; ++tmp) {
temp_verts3d[tmp] = verts[idx[tmp]];
}
@@ -409,7 +411,7 @@ bool TriangulateProcess::TriangulateMesh( aiMesh* pMesh)
// Instead we're continuing with the standard tri-fanning algorithm which we'd
// use if we had only convex polygons. That's life.
- DefaultLogger::get()->error("Failed to triangulate polygon (no ear found). Probably not a simple polygon?");
+ ASSIMP_LOG_ERROR("Failed to triangulate polygon (no ear found). Probably not a simple polygon?");
#ifdef AI_BUILD_TRIANGULATE_DEBUG_POLYS
fprintf(fout,"critical error here, no ear found! ");
@@ -485,21 +487,22 @@ bool TriangulateProcess::TriangulateMesh( aiMesh* pMesh)
for(aiFace* f = last_face; f != curOut; ) {
unsigned int* i = f->mIndices;
- // drop dumb 0-area triangles
- if (std::fabs(GetArea2D(temp_verts[i[0]],temp_verts[i[1]],temp_verts[i[2]])) < 1e-5f) {
- DefaultLogger::get()->debug("Dropping triangle with area 0");
- --curOut;
-
- delete[] f->mIndices;
- f->mIndices = NULL;
-
- for(aiFace* ff = f; ff != curOut; ++ff) {
- ff->mNumIndices = (ff+1)->mNumIndices;
- ff->mIndices = (ff+1)->mIndices;
- (ff+1)->mIndices = NULL;
- }
- continue;
- }
+ // drop dumb 0-area triangles - deactivated for now:
+ //FindDegenerates post processing step can do the same thing
+ //if (std::fabs(GetArea2D(temp_verts[i[0]],temp_verts[i[1]],temp_verts[i[2]])) < 1e-5f) {
+ // ASSIMP_LOG_DEBUG("Dropping triangle with area 0");
+ // --curOut;
+
+ // delete[] f->mIndices;
+ // f->mIndices = nullptr;
+
+ // for(aiFace* ff = f; ff != curOut; ++ff) {
+ // ff->mNumIndices = (ff+1)->mNumIndices;
+ // ff->mIndices = (ff+1)->mIndices;
+ // (ff+1)->mIndices = nullptr;
+ // }
+ // continue;
+ //}
i[0] = idx[i[0]];
i[1] = idx[i[1]];
diff --git a/code/TriangulateProcess.h b/code/TriangulateProcess.h
index 6775eca7c..e6300085d 100644
--- a/code/TriangulateProcess.h
+++ b/code/TriangulateProcess.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/UnrealLoader.cpp b/code/UnrealLoader.cpp
index c8382cb01..64bfbb9e0 100644
--- a/code/UnrealLoader.cpp
+++ b/code/UnrealLoader.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -52,9 +53,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_NO_3D_IMPORTER
#include "UnrealLoader.h"
-#include "StreamReader.h"
-#include "ParsingUtils.h"
-#include "fast_atof.h"
+#include <assimp/StreamReader.h>
+#include <assimp/ParsingUtils.h>
+#include <assimp/fast_atof.h>
#include "ConvertToLHProcess.h"
#include <assimp/Importer.hpp>
@@ -152,12 +153,12 @@ void UnrealImporter::InternReadFile( const std::string& pFile,
a_path = extension+"_a.3d";
uc_path = extension+".uc";
- DefaultLogger::get()->debug("UNREAL: data file is " + d_path);
- DefaultLogger::get()->debug("UNREAL: aniv file is " + a_path);
- DefaultLogger::get()->debug("UNREAL: uc file is " + uc_path);
+ ASSIMP_LOG_DEBUG_F( "UNREAL: data file is ", d_path);
+ ASSIMP_LOG_DEBUG_F("UNREAL: aniv file is ", a_path);
+ ASSIMP_LOG_DEBUG_F("UNREAL: uc file is ", uc_path);
// and open the files ... we can't live without them
- IOStream* p = pIOHandler->Open(d_path);
+ std::unique_ptr<IOStream> p(pIOHandler->Open(d_path));
if (!p)
throw DeadlyImportError("UNREAL: Unable to open _d file");
StreamReaderLE d_reader(pIOHandler->Open(d_path));
@@ -178,7 +179,7 @@ void UnrealImporter::InternReadFile( const std::string& pFile,
tri.mVertex[i] = d_reader.GetI2();
if (tri.mVertex[i] >= numTris) {
- DefaultLogger::get()->warn("UNREAL: vertex index out of range");
+ ASSIMP_LOG_WARN("UNREAL: vertex index out of range");
tri.mVertex[i] = 0;
}
}
@@ -203,7 +204,7 @@ void UnrealImporter::InternReadFile( const std::string& pFile,
d_reader.IncPtr(1);
}
- p = pIOHandler->Open(a_path);
+ p.reset(pIOHandler->Open(a_path));
if (!p)
throw DeadlyImportError("UNREAL: Unable to open _a file");
StreamReaderLE a_reader(pIOHandler->Open(a_path));
@@ -323,7 +324,7 @@ void UnrealImporter::InternReadFile( const std::string& pFile,
}
}
else {
- DefaultLogger::get()->error("Unable to open .uc file");
+ ASSIMP_LOG_ERROR("Unable to open .uc file");
}
std::vector<Unreal::TempMat> materials;
diff --git a/code/UnrealLoader.h b/code/UnrealLoader.h
index a2ceb3d54..4095aa142 100644
--- a/code/UnrealLoader.h
+++ b/code/UnrealLoader.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -45,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef INCLUDED_AI_3D_LOADER_H
#define INCLUDED_AI_3D_LOADER_H
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
#include <stdint.h>
namespace Assimp {
diff --git a/code/ValidateDataStructure.cpp b/code/ValidateDataStructure.cpp
index a536058bc..931c52822 100644
--- a/code/ValidateDataStructure.cpp
+++ b/code/ValidateDataStructure.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -49,8 +50,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// internal headers
#include "ValidateDataStructure.h"
-#include "BaseImporter.h"
-#include "fast_atof.h"
+#include <assimp/BaseImporter.h>
+#include <assimp/fast_atof.h>
#include "ProcessHelper.h"
#include <memory>
@@ -89,9 +90,7 @@ AI_WONT_RETURN void ValidateDSProcess::ReportError(const char* msg,...)
ai_assert(iLen > 0);
va_end(args);
-#ifdef ASSIMP_BUILD_DEBUG
- ai_assert( false );
-#endif
+
throw DeadlyImportError("Validation failed: " + std::string(szBuffer,iLen));
}
// ------------------------------------------------------------------------------------------------
@@ -107,7 +106,7 @@ void ValidateDSProcess::ReportWarning(const char* msg,...)
ai_assert(iLen > 0);
va_end(args);
- DefaultLogger::get()->warn("Validation warning: " + std::string(szBuffer,iLen));
+ ASSIMP_LOG_WARN("Validation warning: " + std::string(szBuffer,iLen));
}
// ------------------------------------------------------------------------------------------------
@@ -207,7 +206,7 @@ inline void ValidateDSProcess::DoValidationWithNameCheck(T** array,
void ValidateDSProcess::Execute( aiScene* pScene)
{
this->mScene = pScene;
- DefaultLogger::get()->debug("ValidateDataStructureProcess begin");
+ ASSIMP_LOG_DEBUG("ValidateDataStructureProcess begin");
// validate the node graph of the scene
Validate(pScene->mRootNode);
@@ -274,7 +273,7 @@ void ValidateDSProcess::Execute( aiScene* pScene)
}
// if (!has)ReportError("The aiScene data structure is empty");
- DefaultLogger::get()->debug("ValidateDataStructureProcess end");
+ ASSIMP_LOG_DEBUG("ValidateDataStructureProcess end");
}
// ------------------------------------------------------------------------------------------------
@@ -336,28 +335,28 @@ void ValidateDSProcess::Validate( const aiMesh* pMesh)
case 1:
if (0 == (pMesh->mPrimitiveTypes & aiPrimitiveType_POINT))
{
- ReportError("aiMesh::mFaces[%i] is a POINT but aiMesh::mPrimtiveTypes "
+ ReportError("aiMesh::mFaces[%i] is a POINT but aiMesh::mPrimitiveTypes "
"does not report the POINT flag",i);
}
break;
case 2:
if (0 == (pMesh->mPrimitiveTypes & aiPrimitiveType_LINE))
{
- ReportError("aiMesh::mFaces[%i] is a LINE but aiMesh::mPrimtiveTypes "
+ ReportError("aiMesh::mFaces[%i] is a LINE but aiMesh::mPrimitiveTypes "
"does not report the LINE flag",i);
}
break;
case 3:
if (0 == (pMesh->mPrimitiveTypes & aiPrimitiveType_TRIANGLE))
{
- ReportError("aiMesh::mFaces[%i] is a TRIANGLE but aiMesh::mPrimtiveTypes "
+ ReportError("aiMesh::mFaces[%i] is a TRIANGLE but aiMesh::mPrimitiveTypes "
"does not report the TRIANGLE flag",i);
}
break;
default:
if (0 == (pMesh->mPrimitiveTypes & aiPrimitiveType_POLYGON))
{
- this->ReportError("aiMesh::mFaces[%i] is a POLYGON but aiMesh::mPrimtiveTypes "
+ this->ReportError("aiMesh::mFaces[%i] is a POLYGON but aiMesh::mPrimitiveTypes "
"does not report the POLYGON flag",i);
}
break;
@@ -370,7 +369,7 @@ void ValidateDSProcess::Validate( const aiMesh* pMesh)
// positions must always be there ...
if (!pMesh->mNumVertices || (!pMesh->mVertices && !mScene->mFlags)) {
- ReportError("The mesh contains no vertices");
+ ReportError("The mesh %s contains no vertices", pMesh->mName.C_Str());
}
if (pMesh->mNumVertices > AI_MAX_VERTICES) {
@@ -387,7 +386,7 @@ void ValidateDSProcess::Validate( const aiMesh* pMesh)
// faces, too
if (!pMesh->mNumFaces || (!pMesh->mFaces && !mScene->mFlags)) {
- ReportError("Mesh contains no faces");
+ ReportError("Mesh %s contains no faces", pMesh->mName.C_Str());
}
// now check whether the face indexing layout is correct:
@@ -409,12 +408,12 @@ void ValidateDSProcess::Validate( const aiMesh* pMesh)
// the MSB flag is temporarily used by the extra verbose
// mode to tell us that the JoinVerticesProcess might have
// been executed already.
- if ( !(this->mScene->mFlags & AI_SCENE_FLAGS_NON_VERBOSE_FORMAT ) && !(this->mScene->mFlags & AI_SCENE_FLAGS_ALLOW_SHARED) &&
+ /*if ( !(this->mScene->mFlags & AI_SCENE_FLAGS_NON_VERBOSE_FORMAT ) && !(this->mScene->mFlags & AI_SCENE_FLAGS_ALLOW_SHARED) &&
abRefList[face.mIndices[a]])
{
ReportError("aiMesh::mVertices[%i] is referenced twice - second "
"time by aiMesh::mFaces[%i]::mIndices[%i]",face.mIndices[a],i,a);
- }
+ }*/
abRefList[face.mIndices[a]] = true;
}
}
@@ -492,8 +491,12 @@ void ValidateDSProcess::Validate( const aiMesh* pMesh)
{
if (pMesh->mBones[i]->mName == pMesh->mBones[a]->mName)
{
- ReportError("aiMesh::mBones[%i] has the same name as "
- "aiMesh::mBones[%i]",i,a);
+ const char *name = "unknown";
+ if (nullptr != pMesh->mBones[ i ]->mName.C_Str()) {
+ name = pMesh->mBones[ i ]->mName.C_Str();
+ }
+ ReportError("aiMesh::mBones[%i], name = \"%s\" has the same name as "
+ "aiMesh::mBones[%i]", i, name, a );
}
}
}
diff --git a/code/ValidateDataStructure.h b/code/ValidateDataStructure.h
index 6daf9b87d..4e1636bfa 100644
--- a/code/ValidateDataStructure.h
+++ b/code/ValidateDataStructure.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -91,7 +92,7 @@ protected:
// -------------------------------------------------------------------
/** Report a validation warning. This won't throw an exception,
- * control will return to the callera.
+ * control will return to the caller.
* @param msg Format string for sprintf().*/
void ReportWarning(const char* msg,...);
@@ -165,7 +166,7 @@ private:
inline void DoValidation(T** array, unsigned int size,
const char* firstName, const char* secondName);
- // extended version: checks whethr T::mName occurs twice
+ // extended version: checks whether T::mName occurs twice
template <typename T>
inline void DoValidationEx(T** array, unsigned int size,
const char* firstName, const char* secondName);
diff --git a/code/Version.cpp b/code/Version.cpp
index fd8ed622c..b823abd68 100644
--- a/code/Version.cpp
+++ b/code/Version.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -45,11 +46,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/scene.h>
#include "ScenePrivate.h"
-static const unsigned int MajorVersion = 3;
-static const unsigned int MinorVersion = 3;
+static const unsigned int MajorVersion = 4;
+static const unsigned int MinorVersion = 1;
// --------------------------------------------------------------------------------
-// Legal information string - dont't remove this.
+// Legal information string - don't remove this.
static const char* LEGAL_INFORMATION =
"Open Asset Import Library (Assimp).\n"
@@ -107,34 +108,37 @@ ASSIMP_API unsigned int aiGetCompileFlags () {
#include "revision.h"
// ------------------------------------------------------------------------------------------------
-ASSIMP_API unsigned int aiGetVersionRevision ()
-{
+ASSIMP_API unsigned int aiGetVersionRevision() {
return GitVersion;
}
+ASSIMP_API const char *aiGetBranchName() {
+ return GitBranch;
+}
+
// ------------------------------------------------------------------------------------------------
ASSIMP_API aiScene::aiScene()
- : mFlags(0)
- , mRootNode(NULL)
- , mNumMeshes(0)
- , mMeshes(NULL)
- , mNumMaterials(0)
- , mMaterials(NULL)
- , mNumAnimations(0)
- , mAnimations(NULL)
- , mNumTextures(0)
- , mTextures(NULL)
- , mNumLights(0)
- , mLights(NULL)
- , mNumCameras(0)
- , mCameras(NULL)
- , mPrivate(new Assimp::ScenePrivateData())
- {
- }
+: mFlags(0)
+, mRootNode(nullptr)
+, mNumMeshes(0)
+, mMeshes(nullptr)
+, mNumMaterials(0)
+, mMaterials(nullptr)
+, mNumAnimations(0)
+, mAnimations(nullptr)
+, mNumTextures(0)
+, mTextures(nullptr)
+, mNumLights(0)
+, mLights(nullptr)
+, mNumCameras(0)
+, mCameras(nullptr)
+, mMetaData(nullptr)
+, mPrivate(new Assimp::ScenePrivateData()) {
+ // empty
+}
// ------------------------------------------------------------------------------------------------
-ASSIMP_API aiScene::~aiScene()
-{
+ASSIMP_API aiScene::~aiScene() {
// delete all sub-objects recursively
delete mRootNode;
@@ -146,9 +150,11 @@ ASSIMP_API aiScene::~aiScene()
delete mMeshes[a];
delete [] mMeshes;
- if (mNumMaterials && mMaterials)
- for( unsigned int a = 0; a < mNumMaterials; a++)
- delete mMaterials[a];
+ if (mNumMaterials && mMaterials) {
+ for (unsigned int a = 0; a < mNumMaterials; ++a ) {
+ delete mMaterials[ a ];
+ }
+ }
delete [] mMaterials;
if (mNumAnimations && mAnimations)
@@ -171,6 +177,9 @@ ASSIMP_API aiScene::~aiScene()
delete mCameras[a];
delete [] mCameras;
+ aiMetadata::Dealloc(mMetaData);
+ mMetaData = nullptr;
+
delete static_cast<Assimp::ScenePrivateData*>( mPrivate );
}
diff --git a/code/VertexTriangleAdjacency.cpp b/code/VertexTriangleAdjacency.cpp
index 09c0a51a7..b41fd029d 100644
--- a/code/VertexTriangleAdjacency.cpp
+++ b/code/VertexTriangleAdjacency.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -47,7 +48,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "VertexTriangleAdjacency.h"
#include <assimp/mesh.h>
-
using namespace Assimp;
// ------------------------------------------------------------------------------------------------
@@ -59,8 +59,8 @@ VertexTriangleAdjacency::VertexTriangleAdjacency(aiFace *pcFaces,
// compute the number of referenced vertices if it wasn't specified by the caller
const aiFace* const pcFaceEnd = pcFaces + iNumFaces;
if (!iNumVertices) {
-
for (aiFace* pcFace = pcFaces; pcFace != pcFaceEnd; ++pcFace) {
+ ai_assert( nullptr != pcFace );
ai_assert(3 == pcFace->mNumIndices);
iNumVertices = std::max(iNumVertices,pcFace->mIndices[0]);
iNumVertices = std::max(iNumVertices,pcFace->mIndices[1]);
@@ -68,19 +68,18 @@ VertexTriangleAdjacency::VertexTriangleAdjacency(aiFace *pcFaces,
}
}
- this->iNumVertices = iNumVertices;
+ mNumVertices = iNumVertices;
unsigned int* pi;
// allocate storage
if (bComputeNumTriangles) {
pi = mLiveTriangles = new unsigned int[iNumVertices+1];
- memset(mLiveTriangles,0,sizeof(unsigned int)*(iNumVertices+1));
+ ::memset(mLiveTriangles,0,sizeof(unsigned int)*(iNumVertices+1));
mOffsetTable = new unsigned int[iNumVertices+2]+1;
- }
- else {
+ } else {
pi = mOffsetTable = new unsigned int[iNumVertices+2]+1;
- memset(mOffsetTable,0,sizeof(unsigned int)*(iNumVertices+1));
+ ::memset(mOffsetTable,0,sizeof(unsigned int)*(iNumVertices+1));
mLiveTriangles = NULL; // important, otherwise the d'tor would crash
}
@@ -91,9 +90,11 @@ VertexTriangleAdjacency::VertexTriangleAdjacency(aiFace *pcFaces,
// first pass: compute the number of faces referencing each vertex
for (aiFace* pcFace = pcFaces; pcFace != pcFaceEnd; ++pcFace)
{
- pi[pcFace->mIndices[0]]++;
- pi[pcFace->mIndices[1]]++;
- pi[pcFace->mIndices[2]]++;
+ unsigned nind = pcFace->mNumIndices;
+ unsigned * ind = pcFace->mIndices;
+ if (nind > 0) pi[ind[0]]++;
+ if (nind > 1) pi[ind[1]]++;
+ if (nind > 2) pi[ind[2]]++;
}
// second pass: compute the final offset table
@@ -111,15 +112,12 @@ VertexTriangleAdjacency::VertexTriangleAdjacency(aiFace *pcFaces,
this->mAdjacencyTable = new unsigned int[iSum];
iSum = 0;
for (aiFace* pcFace = pcFaces; pcFace != pcFaceEnd; ++pcFace,++iSum) {
+ unsigned nind = pcFace->mNumIndices;
+ unsigned * ind = pcFace->mIndices;
- unsigned int idx = pcFace->mIndices[0];
- mAdjacencyTable[pi[idx]++] = iSum;
-
- idx = pcFace->mIndices[1];
- mAdjacencyTable[pi[idx]++] = iSum;
-
- idx = pcFace->mIndices[2];
- mAdjacencyTable[pi[idx]++] = iSum;
+ if (nind > 0) mAdjacencyTable[pi[ind[0]]++] = iSum;
+ if (nind > 1) mAdjacencyTable[pi[ind[1]]++] = iSum;
+ if (nind > 2) mAdjacencyTable[pi[ind[2]]++] = iSum;
}
// fourth pass: undo the offset computations made during the third pass
// We could do this in a separate buffer, but this would be TIMES slower.
diff --git a/code/VertexTriangleAdjacency.h b/code/VertexTriangleAdjacency.h
index ed7b83a6b..23624a5be 100644
--- a/code/VertexTriangleAdjacency.h
+++ b/code/VertexTriangleAdjacency.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -59,10 +60,8 @@ namespace Assimp {
* @note Although it is called #VertexTriangleAdjacency, the current version does also
* support arbitrary polygons. */
// --------------------------------------------------------------------------------------------
-class ASSIMP_API VertexTriangleAdjacency
-{
+class ASSIMP_API VertexTriangleAdjacency {
public:
-
// ----------------------------------------------------------------------------
/** @brief Construction from an existing index buffer
* @param pcFaces Index buffer
@@ -76,39 +75,30 @@ public:
unsigned int iNumVertices = 0,
bool bComputeNumTriangles = true);
-
// ----------------------------------------------------------------------------
/** @brief Destructor */
~VertexTriangleAdjacency();
-
-public:
-
// ----------------------------------------------------------------------------
/** @brief Get all triangles adjacent to a vertex
* @param iVertIndex Index of the vertex
* @return A pointer to the adjacency list. */
- unsigned int* GetAdjacentTriangles(unsigned int iVertIndex) const
- {
- ai_assert(iVertIndex < iNumVertices);
+ unsigned int* GetAdjacentTriangles(unsigned int iVertIndex) const {
+ ai_assert(iVertIndex < mNumVertices);
return &mAdjacencyTable[ mOffsetTable[iVertIndex]];
}
-
// ----------------------------------------------------------------------------
/** @brief Get the number of triangles that are referenced by
* a vertex. This function returns a reference that can be modified
* @param iVertIndex Index of the vertex
* @return Number of referenced triangles */
- unsigned int& GetNumTrianglesPtr(unsigned int iVertIndex)
- {
- ai_assert(iVertIndex < iNumVertices && NULL != mLiveTriangles);
+ unsigned int& GetNumTrianglesPtr(unsigned int iVertIndex) {
+ ai_assert( iVertIndex < mNumVertices );
+ ai_assert( nullptr != mLiveTriangles );
return mLiveTriangles[iVertIndex];
}
-
-public:
-
//! Offset table
unsigned int* mOffsetTable;
@@ -119,9 +109,9 @@ public:
unsigned int* mLiveTriangles;
//! Debug: Number of referenced vertices
- unsigned int iNumVertices;
-
+ unsigned int mNumVertices;
};
-}
+
+} //! ns Assimp
#endif // !! AI_VTADJACENCY_H_INC
diff --git a/code/Win32DebugLogStream.h b/code/Win32DebugLogStream.h
index 0833712f9..7bbe8002a 100644
--- a/code/Win32DebugLogStream.h
+++ b/code/Win32DebugLogStream.h
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/X3DExporter.cpp b/code/X3DExporter.cpp
index 31a391c47..9839e6ca6 100644
--- a/code/X3DExporter.cpp
+++ b/code/X3DExporter.cpp
@@ -9,8 +9,8 @@
#include "X3DExporter.hpp"
// Header files, Assimp.
-#include "Exceptional.h"
-#include "StringUtils.h"
+#include <assimp/Exceptional.h>
+#include <assimp/StringUtils.h>
#include <assimp/Exporter.hpp>
#include <assimp/IOSystem.hpp>
@@ -240,8 +240,12 @@ list<SAttribute> attr_list;
if((rotate_angle != 0) && (rotate_axis.Length() > 0))
attr_list.push_back({"rotation", Rotation2String(rotate_axis, rotate_angle)});
- if(!scale.Equal({1, 1, 1})) attr_list.push_back({"scale", Vector2String(scale)});
- if(translate.Length() > 0) attr_list.push_back({"translation", Vector2String(translate)});
+ if(!scale.Equal({1.0,1.0,1.0})) {
+ attr_list.push_back({"scale", Vector2String(scale)});
+ }
+ if(translate.Length() > 0) {
+ attr_list.push_back({"translation", Vector2String(translate)});
+ }
}
// Begin node if need.
@@ -692,7 +696,7 @@ bool found = false;
return true;
}
-X3DExporter::X3DExporter(const char* pFileName, IOSystem* pIOSystem, const aiScene* pScene, const ExportProperties* pProperties)
+X3DExporter::X3DExporter(const char* pFileName, IOSystem* pIOSystem, const aiScene* pScene, const ExportProperties* /*pProperties*/)
: mScene(pScene)
{
list<SAttribute> attr_list;
diff --git a/code/X3DExporter.hpp b/code/X3DExporter.hpp
index bf1e72218..dc1650b5a 100644
--- a/code/X3DExporter.hpp
+++ b/code/X3DExporter.hpp
@@ -26,8 +26,8 @@ namespace Assimp
/// Limitations.
///
/// Pay attention that X3D is format for interactive graphic and simulations for web browsers. aiScene can not contain all features of the X3D format.
-/// Also, aiScene contain rasterized-like data. For example, X3D can describe circle all cylinder with one tag, but aiScene contain result of tesselation:
-/// vertices, faces etc. Yes, you can use algorithm for detecting figures or shapes, but thats not good idea at all.
+/// Also, aiScene contain rasterized-like data. For example, X3D can describe circle all cylinder with one tag, but aiScene contain result of tessellation:
+/// vertices, faces etc. Yes, you can use algorithm for detecting figures or shapes, but that's not a good idea at all.
///
/// Supported nodes:
/// Core component:
@@ -96,7 +96,7 @@ private:
aiMatrix4x4 Matrix_GlobalToCurrent(const aiNode& pNode) const;
/// \fn void AttrHelper_CommaToPoint(std::string& pStringWithComma)
- /// Convert commas in string to points. Thats need because "std::to_string" result depend on locale (regional settings).
+ /// Convert commas in string to points. That's needed because "std::to_string" result depends on locale (regional settings).
/// \param [in, out] pStringWithComma - reference to string, which must be modified.
void AttrHelper_CommaToPoint(std::string& pStringWithComma) { for(char& c: pStringWithComma) { if(c == ',') c = '.'; } }
diff --git a/code/X3DImporter.cpp b/code/X3DImporter.cpp
index 2edb1b081..e6c915e90 100644
--- a/code/X3DImporter.cpp
+++ b/code/X3DImporter.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -47,15 +48,17 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "X3DImporter.hpp"
#include "X3DImporter_Macro.hpp"
-#include "StringUtils.h"
+#include <assimp/StringUtils.h>
// Header files, Assimp.
#include <assimp/DefaultIOSystem.h>
-#include "fast_atof.h"
+#include <assimp/fast_atof.h>
+#include "FIReader.hpp"
// Header files, stdlib.
#include <memory>
#include <string>
+#include <iterator>
namespace Assimp {
@@ -66,15 +69,52 @@ const aiImporterDesc X3DImporter::Description = {
"smalcom",
"",
"See documentation in source code. Chapter: Limitations.",
- aiImporterFlags_SupportTextFlavour | aiImporterFlags_LimitedSupport | aiImporterFlags_Experimental,
+ aiImporterFlags_SupportTextFlavour | aiImporterFlags_SupportBinaryFlavour | aiImporterFlags_LimitedSupport | aiImporterFlags_Experimental,
0,
0,
0,
0,
- "x3d"
+ "x3d x3db"
+};
+
+//const std::regex X3DImporter::pattern_nws(R"([^, \t\r\n]+)");
+//const std::regex X3DImporter::pattern_true(R"(^\s*(?:true|1)\s*$)", std::regex::icase);
+
+struct WordIterator: public std::iterator<std::input_iterator_tag, const char*> {
+ static const char *whitespace;
+ const char *start_, *end_;
+ WordIterator(const char *start, const char *end): start_(start), end_(end) {
+ start_ = start + strspn(start, whitespace);
+ if (start_ >= end_) {
+ start_ = 0;
+ }
+ }
+ WordIterator(): start_(0), end_(0) {}
+ WordIterator(const WordIterator &other): start_(other.start_), end_(other.end_) {}
+ WordIterator &operator=(const WordIterator &other) {
+ start_ = other.start_;
+ end_ = other.end_;
+ return *this;
+ }
+ bool operator==(const WordIterator &other) const { return start_ == other.start_; }
+ bool operator!=(const WordIterator &other) const { return start_ != other.start_; }
+ WordIterator &operator++() {
+ start_ += strcspn(start_, whitespace);
+ start_ += strspn(start_, whitespace);
+ if (start_ >= end_) {
+ start_ = 0;
+ }
+ return *this;
+ }
+ WordIterator operator++(int) {
+ WordIterator result(*this);
+ ++(*this);
+ return result;
+ }
+ const char *operator*() const { return start_; }
};
-const std::string X3DImporter::whitespace(" ,\t\n\r");
+const char *WordIterator::whitespace = ", \t\r\n";
X3DImporter::X3DImporter()
: NodeElement_Cur( nullptr )
@@ -83,7 +123,6 @@ X3DImporter::X3DImporter()
}
X3DImporter::~X3DImporter() {
- delete mReader;
// Clear() is accounting if data already is deleted. So, just check again if all data is deleted.
Clear();
}
@@ -370,38 +409,65 @@ bool X3DImporter::XML_SearchNode(const std::string& pNodeName)
bool X3DImporter::XML_ReadNode_GetAttrVal_AsBool(const int pAttrIdx)
{
-std::string val(mReader->getAttributeValue(pAttrIdx));
-
- if(val == "false")
- return false;
- else if(val == "true")
- return true;
- else
- throw DeadlyImportError("Bool attribute value can contain \"false\" or \"true\" not the \"" + val + "\"");
+ auto boolValue = std::dynamic_pointer_cast<const FIBoolValue>(mReader->getAttributeEncodedValue(pAttrIdx));
+ if (boolValue) {
+ if (boolValue->value.size() == 1) {
+ return boolValue->value.front();
+ }
+ throw DeadlyImportError("Invalid bool value");
+ }
+ else {
+ std::string val(mReader->getAttributeValue(pAttrIdx));
+
+ if(val == "false")
+ return false;
+ else if(val == "true")
+ return true;
+ else
+ throw DeadlyImportError("Bool attribute value can contain \"false\" or \"true\" not the \"" + val + "\"");
+ }
}
float X3DImporter::XML_ReadNode_GetAttrVal_AsFloat(const int pAttrIdx)
{
- std::string val;
- float tvalf;
+ auto floatValue = std::dynamic_pointer_cast<const FIFloatValue>(mReader->getAttributeEncodedValue(pAttrIdx));
+ if (floatValue) {
+ if (floatValue->value.size() == 1) {
+ return floatValue->value.front();
+ }
+ throw DeadlyImportError("Invalid float value");
+ }
+ else {
+ std::string val;
+ float tvalf;
- ParseHelper_FixTruncatedFloatString(mReader->getAttributeValue(pAttrIdx), val);
- fast_atoreal_move(val.c_str(), tvalf, false);
+ ParseHelper_FixTruncatedFloatString(mReader->getAttributeValue(pAttrIdx), val);
+ fast_atoreal_move(val.c_str(), tvalf, false);
- return tvalf;
+ return tvalf;
+ }
}
int32_t X3DImporter::XML_ReadNode_GetAttrVal_AsI32(const int pAttrIdx)
{
- return strtol10(mReader->getAttributeValue(pAttrIdx));
+ auto intValue = std::dynamic_pointer_cast<const FIIntValue>(mReader->getAttributeEncodedValue(pAttrIdx));
+ if (intValue) {
+ if (intValue->value.size() == 1) {
+ return intValue->value.front();
+ }
+ throw DeadlyImportError("Invalid int value");
+ }
+ else {
+ return strtol10(mReader->getAttributeValue(pAttrIdx));
+ }
}
void X3DImporter::XML_ReadNode_GetAttrVal_AsCol3f(const int pAttrIdx, aiColor3D& pValue)
{
- std::list<float> tlist;
- std::list<float>::iterator it;
+ std::vector<float> tlist;
+ std::vector<float>::iterator it;
- XML_ReadNode_GetAttrVal_AsListF(pAttrIdx, tlist);
+ XML_ReadNode_GetAttrVal_AsArrF(pAttrIdx, tlist);
if(tlist.size() != 3) Throw_ConvertFail_Str2ArrF(mReader->getAttributeValue(pAttrIdx));
it = tlist.begin();
@@ -412,10 +478,10 @@ void X3DImporter::XML_ReadNode_GetAttrVal_AsCol3f(const int pAttrIdx, aiColor3D&
void X3DImporter::XML_ReadNode_GetAttrVal_AsVec2f(const int pAttrIdx, aiVector2D& pValue)
{
- std::list<float> tlist;
- std::list<float>::iterator it;
+ std::vector<float> tlist;
+ std::vector<float>::iterator it;
- XML_ReadNode_GetAttrVal_AsListF(pAttrIdx, tlist);
+ XML_ReadNode_GetAttrVal_AsArrF(pAttrIdx, tlist);
if(tlist.size() != 2) Throw_ConvertFail_Str2ArrF(mReader->getAttributeValue(pAttrIdx));
it = tlist.begin();
@@ -425,10 +491,10 @@ void X3DImporter::XML_ReadNode_GetAttrVal_AsVec2f(const int pAttrIdx, aiVector2D
void X3DImporter::XML_ReadNode_GetAttrVal_AsVec3f(const int pAttrIdx, aiVector3D& pValue)
{
- std::list<float> tlist;
- std::list<float>::iterator it;
+ std::vector<float> tlist;
+ std::vector<float>::iterator it;
- XML_ReadNode_GetAttrVal_AsListF(pAttrIdx, tlist);
+ XML_ReadNode_GetAttrVal_AsArrF(pAttrIdx, tlist);
if(tlist.size() != 3) Throw_ConvertFail_Str2ArrF(mReader->getAttributeValue(pAttrIdx));
it = tlist.begin();
@@ -437,166 +503,95 @@ void X3DImporter::XML_ReadNode_GetAttrVal_AsVec3f(const int pAttrIdx, aiVector3D
pValue.z = *it;
}
-void X3DImporter::XML_ReadNode_GetAttrVal_AsListB(const int pAttrIdx, std::list<bool>& pValue)
-{
- const char *tok_cur = mReader->getAttributeValue(pAttrIdx);
- const char *tok_end = tok_cur + strlen(tok_cur);
-
- for(;;)
- {
- while((tok_cur < tok_end) && (whitespace.find_first_of(*tok_cur) != std::string::npos)) tok_cur++;// skip spaces between values.
- if (tok_cur >= tok_end)
- break;
-
- if(strncmp(tok_cur, "true", 4) == 0)
- {
- pValue.push_back(true);
- tok_cur += 4;
- }
- else if(strncmp(tok_cur, "false", 5) == 0)
- {
- pValue.push_back(false);
- tok_cur += 5;
- }
- else
- {
- Throw_IncorrectAttrValue(mReader->getAttributeName(pAttrIdx));
- }
- }// for(;;)
-}
-
void X3DImporter::XML_ReadNode_GetAttrVal_AsArrB(const int pAttrIdx, std::vector<bool>& pValue)
{
- std::list<bool> tlist;
-
- XML_ReadNode_GetAttrVal_AsListB(pAttrIdx, tlist);// read as list
- // and copy to array
- if(tlist.size() > 0)
- {
- pValue.reserve(tlist.size());
- for(std::list<bool>::iterator it = tlist.begin(); it != tlist.end(); it++) pValue.push_back(*it);
- }
-}
-
-void X3DImporter::XML_ReadNode_GetAttrVal_AsListI32(const int pAttrIdx, std::list<int32_t>& pValue)
-{
- const char* tstr = mReader->getAttributeValue(pAttrIdx);
- const char* tstr_end = tstr + strlen(tstr);
-
- do
- {
- const char* ostr;
-
- int32_t tval32;
-
- while((tstr < tstr_end) && (whitespace.find_first_of(*tstr) != std::string::npos)) tstr++;// skip spaces between values.
+ auto boolValue = std::dynamic_pointer_cast<const FIBoolValue>(mReader->getAttributeEncodedValue(pAttrIdx));
+ if (boolValue) {
+ pValue = boolValue->value;
+ }
+ else {
+ const char *val = mReader->getAttributeValue(pAttrIdx);
+ pValue.clear();
- tval32 = strtol10(tstr, &ostr);
- if(ostr == tstr) break;
+ //std::cregex_iterator wordItBegin(val, val + strlen(val), pattern_nws);
+ //const std::cregex_iterator wordItEnd;
+ //std::transform(wordItBegin, wordItEnd, std::back_inserter(pValue), [](const std::cmatch &match) { return std::regex_match(match.str(), pattern_true); });
- tstr = ostr;
- pValue.push_back(tval32);
- } while(tstr < tstr_end);
+ WordIterator wordItBegin(val, val + strlen(val));
+ WordIterator wordItEnd;
+ std::transform(wordItBegin, wordItEnd, std::back_inserter(pValue), [](const char *match) { return (::tolower(match[0]) == 't') || (match[0] == '1'); });
+ }
}
void X3DImporter::XML_ReadNode_GetAttrVal_AsArrI32(const int pAttrIdx, std::vector<int32_t>& pValue)
{
- std::list<int32_t> tlist;
-
- XML_ReadNode_GetAttrVal_AsListI32(pAttrIdx, tlist);// read as list
- // and copy to array
- if(tlist.size() > 0)
- {
- pValue.reserve(tlist.size());
- for(std::list<int32_t>::iterator it = tlist.begin(); it != tlist.end(); it++) pValue.push_back(*it);
- }
-}
-
-void X3DImporter::XML_ReadNode_GetAttrVal_AsListF(const int pAttrIdx, std::list<float>& pValue)
-{
- std::string str_fixed;
-
- // at first check string values like '.xxx'.
- ParseHelper_FixTruncatedFloatString(mReader->getAttributeValue(pAttrIdx), str_fixed);
-
- // and convert all values and place it in list.
- const char* pstr = str_fixed.c_str();
- const char* pstr_end = pstr + str_fixed.size();
-
- do
- {
- float tvalf;
+ auto intValue = std::dynamic_pointer_cast<const FIIntValue>(mReader->getAttributeEncodedValue(pAttrIdx));
+ if (intValue) {
+ pValue = intValue->value;
+ }
+ else {
+ const char *val = mReader->getAttributeValue(pAttrIdx);
+ pValue.clear();
- while((pstr < pstr_end) && (whitespace.find_first_of(*pstr) != std::string::npos)) pstr++;// skip spaces between values.
+ //std::cregex_iterator wordItBegin(val, val + strlen(val), pattern_nws);
+ //const std::cregex_iterator wordItEnd;
+ //std::transform(wordItBegin, wordItEnd, std::back_inserter(pValue), [](const std::cmatch &match) { return std::stoi(match.str()); });
- if(pstr < pstr_end)// additional check, because attribute value can be ended with spaces.
- {
- pstr = fast_atoreal_move(pstr, tvalf, false);
- pValue.push_back(tvalf);
- }
- } while(pstr < pstr_end);
+ WordIterator wordItBegin(val, val + strlen(val));
+ WordIterator wordItEnd;
+ std::transform(wordItBegin, wordItEnd, std::back_inserter(pValue), [](const char *match) { return atoi(match); });
+ }
}
void X3DImporter::XML_ReadNode_GetAttrVal_AsArrF(const int pAttrIdx, std::vector<float>& pValue)
{
- std::list<float> tlist;
-
- XML_ReadNode_GetAttrVal_AsListF(pAttrIdx, tlist);// read as list
- // and copy to array
- if(tlist.size() > 0)
- {
- pValue.reserve(tlist.size());
- for(std::list<float>::iterator it = tlist.begin(); it != tlist.end(); it++) pValue.push_back(*it);
- }
-}
-
-void X3DImporter::XML_ReadNode_GetAttrVal_AsListD(const int pAttrIdx, std::list<double>& pValue)
-{
- std::string str_fixed;
-
- // at first check string values like '.xxx'.
- ParseHelper_FixTruncatedFloatString(mReader->getAttributeValue(pAttrIdx), str_fixed);
-
- // and convert all values and place it in list.
- const char* pstr = str_fixed.c_str();
- const char* pstr_end = pstr + str_fixed.size();
-
- do
- {
- double tvald;
+ auto floatValue = std::dynamic_pointer_cast<const FIFloatValue>(mReader->getAttributeEncodedValue(pAttrIdx));
+ if (floatValue) {
+ pValue = floatValue->value;
+ }
+ else {
+ const char *val = mReader->getAttributeValue(pAttrIdx);
+ pValue.clear();
- while((pstr < pstr_end) && (whitespace.find_first_of(*pstr) != std::string::npos)) pstr++;// skip spaces between values.
+ //std::cregex_iterator wordItBegin(val, val + strlen(val), pattern_nws);
+ //const std::cregex_iterator wordItEnd;
+ //std::transform(wordItBegin, wordItEnd, std::back_inserter(pValue), [](const std::cmatch &match) { return std::stof(match.str()); });
- if(pstr < pstr_end)// additional check, because attribute value can be ended with spaces.
- {
- pstr = fast_atoreal_move(pstr, tvald, false);
- pValue.push_back(tvald);
- }
- } while(pstr < pstr_end);
+ WordIterator wordItBegin(val, val + strlen(val));
+ WordIterator wordItEnd;
+ std::transform(wordItBegin, wordItEnd, std::back_inserter(pValue), [](const char *match) { return static_cast<float>(atof(match)); });
+ }
}
void X3DImporter::XML_ReadNode_GetAttrVal_AsArrD(const int pAttrIdx, std::vector<double>& pValue)
{
- std::list<double> tlist;
+ auto doubleValue = std::dynamic_pointer_cast<const FIDoubleValue>(mReader->getAttributeEncodedValue(pAttrIdx));
+ if (doubleValue) {
+ pValue = doubleValue->value;
+ }
+ else {
+ const char *val = mReader->getAttributeValue(pAttrIdx);
+ pValue.clear();
- XML_ReadNode_GetAttrVal_AsListD(pAttrIdx, tlist);// read as list
- // and copy to array
- if(tlist.size() > 0)
- {
- pValue.reserve(tlist.size());
- for(std::list<double>::iterator it = tlist.begin(); it != tlist.end(); it++) pValue.push_back(*it);
- }
+ //std::cregex_iterator wordItBegin(val, val + strlen(val), pattern_nws);
+ //const std::cregex_iterator wordItEnd;
+ //std::transform(wordItBegin, wordItEnd, std::back_inserter(pValue), [](const std::cmatch &match) { return std::stod(match.str()); });
+
+ WordIterator wordItBegin(val, val + strlen(val));
+ WordIterator wordItEnd;
+ std::transform(wordItBegin, wordItEnd, std::back_inserter(pValue), [](const char *match) { return atof(match); });
+ }
}
void X3DImporter::XML_ReadNode_GetAttrVal_AsListCol3f(const int pAttrIdx, std::list<aiColor3D>& pValue)
{
- std::list<float> tlist;
+ std::vector<float> tlist;
- XML_ReadNode_GetAttrVal_AsListF(pAttrIdx, tlist);// read as list
+ XML_ReadNode_GetAttrVal_AsArrF(pAttrIdx, tlist);// read as list
if(tlist.size() % 3) Throw_ConvertFail_Str2ArrF(mReader->getAttributeValue(pAttrIdx));
// copy data to array
- for(std::list<float>::iterator it = tlist.begin(); it != tlist.end();)
+ for(std::vector<float>::iterator it = tlist.begin(); it != tlist.end();)
{
aiColor3D tcol;
@@ -622,13 +617,13 @@ void X3DImporter::XML_ReadNode_GetAttrVal_AsArrCol3f(const int pAttrIdx, std::ve
void X3DImporter::XML_ReadNode_GetAttrVal_AsListCol4f(const int pAttrIdx, std::list<aiColor4D>& pValue)
{
- std::list<float> tlist;
+ std::vector<float> tlist;
- XML_ReadNode_GetAttrVal_AsListF(pAttrIdx, tlist);// read as list
+ XML_ReadNode_GetAttrVal_AsArrF(pAttrIdx, tlist);// read as list
if(tlist.size() % 4) Throw_ConvertFail_Str2ArrF(mReader->getAttributeValue(pAttrIdx));
// copy data to array
- for(std::list<float>::iterator it = tlist.begin(); it != tlist.end();)
+ for(std::vector<float>::iterator it = tlist.begin(); it != tlist.end();)
{
aiColor4D tcol;
@@ -658,16 +653,16 @@ void X3DImporter::XML_ReadNode_GetAttrVal_AsArrCol4f(const int pAttrIdx, std::ve
void X3DImporter::XML_ReadNode_GetAttrVal_AsListVec2f(const int pAttrIdx, std::list<aiVector2D>& pValue)
{
- std::list<float> tlist;
+ std::vector<float> tlist;
- XML_ReadNode_GetAttrVal_AsListF(pAttrIdx, tlist);// read as list
+ XML_ReadNode_GetAttrVal_AsArrF(pAttrIdx, tlist);// read as list
if ( tlist.size() % 2 )
{
Throw_ConvertFail_Str2ArrF( mReader->getAttributeValue( pAttrIdx ) );
}
// copy data to array
- for(std::list<float>::iterator it = tlist.begin(); it != tlist.end();)
+ for(std::vector<float>::iterator it = tlist.begin(); it != tlist.end();)
{
aiVector2D tvec;
@@ -695,16 +690,16 @@ void X3DImporter::XML_ReadNode_GetAttrVal_AsArrVec2f(const int pAttrIdx, std::ve
void X3DImporter::XML_ReadNode_GetAttrVal_AsListVec3f(const int pAttrIdx, std::list<aiVector3D>& pValue)
{
- std::list<float> tlist;
+ std::vector<float> tlist;
- XML_ReadNode_GetAttrVal_AsListF(pAttrIdx, tlist);// read as list
+ XML_ReadNode_GetAttrVal_AsArrF(pAttrIdx, tlist);// read as list
if ( tlist.size() % 3 )
{
Throw_ConvertFail_Str2ArrF( mReader->getAttributeValue( pAttrIdx ) );
}
// copy data to array
- for(std::list<float>::iterator it = tlist.begin(); it != tlist.end();)
+ for(std::vector<float>::iterator it = tlist.begin(); it != tlist.end();)
{
aiVector3D tvec;
@@ -894,9 +889,9 @@ void X3DImporter::GeometryHelper_MakeQL_RectParallelepiped(const aiVector3D& pSi
#undef MESH_RectParallelepiped_CREATE_VERT
-void X3DImporter::GeometryHelper_CoordIdxStr2FacesArr(const std::list<int32_t>& pCoordIdx, std::vector<aiFace>& pFaces, unsigned int& pPrimitiveTypes) const
+void X3DImporter::GeometryHelper_CoordIdxStr2FacesArr(const std::vector<int32_t>& pCoordIdx, std::vector<aiFace>& pFaces, unsigned int& pPrimitiveTypes) const
{
- std::list<int32_t> f_data(pCoordIdx);
+ std::vector<int32_t> f_data(pCoordIdx);
std::vector<unsigned int> inds;
unsigned int prim_type = 0;
@@ -909,7 +904,7 @@ void X3DImporter::GeometryHelper_CoordIdxStr2FacesArr(const std::list<int32_t>&
pFaces.reserve(f_data.size() / 3);
inds.reserve(4);
//PrintVectorSet("build. ci", pCoordIdx);
- for(std::list<int32_t>::iterator it = f_data.begin(); it != f_data.end(); it++)
+ for(std::vector<int32_t>::iterator it = f_data.begin(); it != f_data.end(); it++)
{
// when face is got count how many indices in it.
if(*it == (-1))
@@ -1001,7 +996,7 @@ void X3DImporter::MeshGeometry_AddColor(aiMesh& pMesh, const std::list<aiColor4D
}// if(pColorPerVertex) else
}
-void X3DImporter::MeshGeometry_AddColor(aiMesh& pMesh, const std::list<int32_t>& pCoordIdx, const std::list<int32_t>& pColorIdx,
+void X3DImporter::MeshGeometry_AddColor(aiMesh& pMesh, const std::vector<int32_t>& pCoordIdx, const std::vector<int32_t>& pColorIdx,
const std::list<aiColor3D>& pColors, const bool pColorPerVertex) const
{
std::list<aiColor4D> tcol;
@@ -1016,7 +1011,7 @@ void X3DImporter::MeshGeometry_AddColor(aiMesh& pMesh, const std::list<int32_t>&
MeshGeometry_AddColor(pMesh, pCoordIdx, pColorIdx, tcol, pColorPerVertex);
}
-void X3DImporter::MeshGeometry_AddColor(aiMesh& pMesh, const std::list<int32_t>& pCoordIdx, const std::list<int32_t>& pColorIdx,
+void X3DImporter::MeshGeometry_AddColor(aiMesh& pMesh, const std::vector<int32_t>& pCoordIdx, const std::vector<int32_t>& pColorIdx,
const std::list<aiColor4D>& pColors, const bool pColorPerVertex) const
{
std::vector<aiColor4D> col_tgt_arr;
@@ -1047,7 +1042,7 @@ void X3DImporter::MeshGeometry_AddColor(aiMesh& pMesh, const std::list<int32_t>&
}
// create list with colors for every vertex.
col_tgt_arr.resize(pMesh.mNumVertices);
- for(std::list<int32_t>::const_iterator colidx_it = pColorIdx.begin(), coordidx_it = pCoordIdx.begin(); colidx_it != pColorIdx.end(); colidx_it++, coordidx_it++)
+ for(std::vector<int32_t>::const_iterator colidx_it = pColorIdx.begin(), coordidx_it = pCoordIdx.begin(); colidx_it != pColorIdx.end(); colidx_it++, coordidx_it++)
{
if ( *colidx_it == ( -1 ) )
{
@@ -1095,7 +1090,7 @@ void X3DImporter::MeshGeometry_AddColor(aiMesh& pMesh, const std::list<int32_t>&
// create list with colors for every vertex using faces indices.
col_tgt_arr.resize(pMesh.mNumFaces);
- std::list<int32_t>::const_iterator colidx_it = pColorIdx.begin();
+ std::vector<int32_t>::const_iterator colidx_it = pColorIdx.begin();
for(size_t fi = 0; fi < pMesh.mNumFaces; fi++)
{
if((unsigned int)*colidx_it > pMesh.mNumFaces) throw DeadlyImportError("MeshGeometry_AddColor2. Face idx is out of range.");
@@ -1125,7 +1120,7 @@ void X3DImporter::MeshGeometry_AddColor(aiMesh& pMesh, const std::list<int32_t>&
MeshGeometry_AddColor(pMesh, col_tgt_list, pColorPerVertex);
}
-void X3DImporter::MeshGeometry_AddNormal(aiMesh& pMesh, const std::list<int32_t>& pCoordIdx, const std::list<int32_t>& pNormalIdx,
+void X3DImporter::MeshGeometry_AddNormal(aiMesh& pMesh, const std::vector<int32_t>& pCoordIdx, const std::vector<int32_t>& pNormalIdx,
const std::list<aiVector3D>& pNormals, const bool pNormalPerVertex) const
{
std::vector<size_t> tind;
@@ -1146,7 +1141,7 @@ void X3DImporter::MeshGeometry_AddNormal(aiMesh& pMesh, const std::list<int32_t>
if(pNormalIdx.size() != pCoordIdx.size()) throw DeadlyImportError("Normals and Coords inidces count must be equal.");
tind.reserve(pNormalIdx.size());
- for(std::list<int32_t>::const_iterator it = pNormalIdx.begin(); it != pNormalIdx.end(); it++)
+ for(std::vector<int32_t>::const_iterator it = pNormalIdx.begin(); it != pNormalIdx.end(); it++)
{
if(*it != (-1)) tind.push_back(*it);
}
@@ -1178,7 +1173,7 @@ void X3DImporter::MeshGeometry_AddNormal(aiMesh& pMesh, const std::list<int32_t>
{
if(pMesh.mNumFaces != pNormalIdx.size()) throw DeadlyImportError("Normals faces count must be equal to mesh faces count.");
- std::list<int32_t>::const_iterator normidx_it = pNormalIdx.begin();
+ std::vector<int32_t>::const_iterator normidx_it = pNormalIdx.begin();
tind.reserve(pNormalIdx.size());
for(size_t i = 0, i_e = pNormalIdx.size(); i < i_e; i++) tind.push_back(*normidx_it++);
@@ -1231,7 +1226,7 @@ void X3DImporter::MeshGeometry_AddNormal(aiMesh& pMesh, const std::list<aiVector
}// if(pNormalPerVertex) else
}
-void X3DImporter::MeshGeometry_AddTexCoord(aiMesh& pMesh, const std::list<int32_t>& pCoordIdx, const std::list<int32_t>& pTexCoordIdx,
+void X3DImporter::MeshGeometry_AddTexCoord(aiMesh& pMesh, const std::vector<int32_t>& pCoordIdx, const std::vector<int32_t>& pTexCoordIdx,
const std::list<aiVector2D>& pTexCoords) const
{
std::vector<aiVector3D> texcoord_arr_copy;
@@ -1304,7 +1299,7 @@ void X3DImporter::MeshGeometry_AddTexCoord(aiMesh& pMesh, const std::list<aiVect
}
}
-aiMesh* X3DImporter::GeometryHelper_MakeMesh(const std::list<int32_t>& pCoordIdx, const std::list<aiVector3D>& pVertices) const
+aiMesh* X3DImporter::GeometryHelper_MakeMesh(const std::vector<int32_t>& pCoordIdx, const std::list<aiVector3D>& pVertices) const
{
std::vector<aiFace> faces;
unsigned int prim_type = 0;
@@ -1407,9 +1402,12 @@ void X3DImporter::ParseHelper_FixTruncatedFloatString(const char* pInStr, std::s
}
}
+extern FIVocabulary X3D_vocabulary_3_2;
+extern FIVocabulary X3D_vocabulary_3_3;
+
void X3DImporter::ParseFile(const std::string& pFile, IOSystem* pIOHandler)
{
- irr::io::IrrXMLReader* OldReader = mReader;// store current XMLreader.
+ std::unique_ptr<FIReader> OldReader = std::move(mReader);// store current XMLreader.
std::unique_ptr<IOStream> file(pIOHandler->Open(pFile, "rb"));
// Check whether we can read from the file
@@ -1417,19 +1415,18 @@ void X3DImporter::ParseFile(const std::string& pFile, IOSystem* pIOHandler)
{
throw DeadlyImportError( "Failed to open X3D file " + pFile + "." );
}
- // generate a XML reader for it
- std::unique_ptr<CIrrXML_IOStreamReader> mIOWrapper(new CIrrXML_IOStreamReader(file.get()));
- mReader = irr::io::createIrrXMLReader(mIOWrapper.get());
+ mReader = FIReader::create(file.get());
if ( !mReader )
{
throw DeadlyImportError( "Failed to create XML reader for file" + pFile + "." );
}
+ mReader->registerVocabulary("urn:web3d:x3d:fi-vocabulary-3.2", &X3D_vocabulary_3_2);
+ mReader->registerVocabulary("urn:web3d:x3d:fi-vocabulary-3.3", &X3D_vocabulary_3_3);
// start reading
ParseNode_Root();
- delete mReader;
// restore old XMLreader
- mReader = OldReader;
+ mReader = std::move(OldReader);
}
void X3DImporter::ParseNode_Root()
@@ -1643,7 +1640,7 @@ bool X3DImporter::CanRead(const std::string& pFile, IOSystem* pIOHandler, bool p
{
const std::string extension = GetExtension(pFile);
- if(extension == "x3d") return true;
+ if((extension == "x3d") || (extension == "x3db")) return true;
if(!extension.length() || pCheckSig)
{
@@ -1658,6 +1655,7 @@ bool X3DImporter::CanRead(const std::string& pFile, IOSystem* pIOHandler, bool p
void X3DImporter::GetExtensionList(std::set<std::string>& pExtensionList)
{
pExtensionList.insert("x3d");
+ pExtensionList.insert("x3db");
}
const aiImporterDesc* X3DImporter::GetInfo () const
@@ -1670,8 +1668,10 @@ void X3DImporter::InternReadFile(const std::string& pFile, aiScene* pScene, IOSy
mpIOHandler = pIOHandler;
Clear();// delete old graph.
- pIOHandler->PushDirectory(DefaultIOSystem::absolutePath(pFile));
+ std::string::size_type slashPos = pFile.find_last_of("\\/");
+ pIOHandler->PushDirectory(slashPos == std::string::npos ? std::string() : pFile.substr(0, slashPos + 1));
ParseFile(pFile, pIOHandler);
+ pIOHandler->PopDirectory();
//
// Assimp use static arrays of objects for fast speed of rendering. That's good, but need some additional operations/
// We know that geometry objects(meshes) are stored in <Shape>, also in <Shape>-><Appearance> materials(in Assimp logical view)
diff --git a/code/X3DImporter.hpp b/code/X3DImporter.hpp
index e02d1ab61..1c9dc5486 100644
--- a/code/X3DImporter.hpp
+++ b/code/X3DImporter.hpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -54,8 +55,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/importerdesc.h>
#include <assimp/ProgressHandler.hpp>
#include <assimp/types.h>
-#include "BaseImporter.h"
-#include "irrXMLWrapper.h"
+#include <assimp/BaseImporter.h>
+#include <assimp/irrXMLWrapper.h>
+#include "FIReader.hpp"
+//#include <regex>
namespace Assimp {
@@ -174,7 +177,7 @@ namespace Assimp {
/// Ignored attributes: "creaseAngle", "convex", "solid".
///
/// Texture coordinates generating: only for Sphere, Cone, Cylinder. In all other case used PLANE mapping.
-/// It's better that Assimp main code has powerfull texture coordinates generator. Then is not needed to
+/// It's better that Assimp main code has powerful texture coordinates generator. Then is not needed to
/// duplicate this code in every importer.
///
/// Lighting limitations.
@@ -399,10 +402,10 @@ private:
/************** Functions: XML set *************/
/***********************************************/
- /// Chek if current node is empty: <node />. If not then exception will throwed.
+ /// Check if current node is empty: <node />. If not then exception will throwed.
void XML_CheckNode_MustBeEmpty();
- /// Chek if current node name is equal to pNodeName.
+ /// Check if current node name is equal to pNodeName.
/// \param [in] pNodeName - name for checking.
/// return true if current node name is equal to pNodeName, else - false.
bool XML_CheckNode_NameEqual(const std::string& pNodeName) { return mReader->getNodeName() == pNodeName; }
@@ -449,33 +452,21 @@ private:
/// Read attribute value.
/// \param [in] pAttrIdx - attribute index (\ref mReader->getAttribute* set).
/// \param [out] pValue - read data.
- void XML_ReadNode_GetAttrVal_AsListB(const int pAttrIdx, std::list<bool>& pValue);
-
- /// \overload void XML_ReadNode_GetAttrVal_AsListBool(const int pAttrIdx, std::list<bool>& pValue)
void XML_ReadNode_GetAttrVal_AsArrB(const int pAttrIdx, std::vector<bool>& pValue);
/// Read attribute value.
/// \param [in] pAttrIdx - attribute index (\ref mReader->getAttribute* set).
/// \param [out] pValue - read data.
- void XML_ReadNode_GetAttrVal_AsListI32(const int pAttrIdx, std::list<int32_t>& pValue);
-
- /// \overload void XML_ReadNode_GetAttrVal_AsListI32(const int pAttrIdx, std::list<int32_t>& pValue)
void XML_ReadNode_GetAttrVal_AsArrI32(const int pAttrIdx, std::vector<int32_t>& pValue);
/// Read attribute value.
/// \param [in] pAttrIdx - attribute index (\ref mReader->getAttribute* set).
/// \param [out] pValue - read data.
- void XML_ReadNode_GetAttrVal_AsListF(const int pAttrIdx, std::list<float>& pValue);
-
- /// \overload void XML_ReadNode_GetAttrVal_AsListF(const int pAttrIdx, std::list<float>& pValue)
void XML_ReadNode_GetAttrVal_AsArrF(const int pAttrIdx, std::vector<float>& pValue);
/// Read attribute value.
/// \param [in] pAttrIdx - attribute index (\ref mReader->getAttribute* set).
/// \param [out] pValue - read data.
- void XML_ReadNode_GetAttrVal_AsListD(const int pAttrIdx, std::list<double>& pValue);
-
- /// \overload void XML_ReadNode_GetAttrVal_AsListD(const int pAttrIdx, std::list<double>& pValue)
void XML_ReadNode_GetAttrVal_AsArrD(const int pAttrIdx, std::vector<double>& pValue);
/// Read attribute value.
@@ -531,7 +522,7 @@ private:
/// \param [in] pStartAngle - angle in radians of start of the arc.
/// \param [in] pEndAngle - angle in radians of end of the arc.
/// \param [in] pRadius - radius of the arc.
- /// \param [out] pNumSegments - number of segments in arc. In other words - tesselation factor.
+ /// \param [out] pNumSegments - number of segments in arc. In other words - tessellation factor.
/// \param [out] pVertices - generated vertices.
void GeometryHelper_Make_Arc2D(const float pStartAngle, const float pEndAngle, const float pRadius, size_t pNumSegments, std::list<aiVector3D>& pVertices);
@@ -554,7 +545,7 @@ private:
/// \param [in] pCoordIdx - vertices indices divided by delimiter "-1".
/// \param [in] pFaces - created faces array.
/// \param [in] pPrimitiveTypes - type of primitives in faces.
- void GeometryHelper_CoordIdxStr2FacesArr(const std::list<int32_t>& pCoordIdx, std::vector<aiFace>& pFaces, unsigned int& pPrimitiveTypes) const;
+ void GeometryHelper_CoordIdxStr2FacesArr(const std::vector<int32_t>& pCoordIdx, std::vector<aiFace>& pFaces, unsigned int& pPrimitiveTypes) const;
/// Add colors to mesh.
/// a. If colorPerVertex is FALSE, colours are applied to each face, as follows:
@@ -573,11 +564,11 @@ private:
/// then pColorIdx contain color indices for every faces and must not contain delimiter "-1".
/// \param [in] pColors - defined colors.
/// \param [in] pColorPerVertex - if \ref pColorPerVertex is true then color in \ref pColors defined for every vertex, if false - for every face.
- void MeshGeometry_AddColor(aiMesh& pMesh, const std::list<int32_t>& pCoordIdx, const std::list<int32_t>& pColorIdx,
+ void MeshGeometry_AddColor(aiMesh& pMesh, const std::vector<int32_t>& pCoordIdx, const std::vector<int32_t>& pColorIdx,
const std::list<aiColor4D>& pColors, const bool pColorPerVertex) const;
/// \overload void MeshGeometry_AddColor(aiMesh& pMesh, const std::list<int32_t>& pCoordIdx, const std::list<int32_t>& pColorIdx, const std::list<aiColor4D>& pColors, const bool pColorPerVertex) const;
- void MeshGeometry_AddColor(aiMesh& pMesh, const std::list<int32_t>& pCoordIdx, const std::list<int32_t>& pColorIdx,
+ void MeshGeometry_AddColor(aiMesh& pMesh, const std::vector<int32_t>& pCoordIdx, const std::vector<int32_t>& pColorIdx,
const std::list<aiColor3D>& pColors, const bool pColorPerVertex) const;
/// Add colors to mesh.
@@ -590,14 +581,14 @@ private:
void MeshGeometry_AddColor(aiMesh& pMesh, const std::list<aiColor3D>& pColors, const bool pColorPerVertex) const;
/// Add normals to mesh. Function work similar to \ref MeshGeometry_AddColor;
- void MeshGeometry_AddNormal(aiMesh& pMesh, const std::list<int32_t>& pCoordIdx, const std::list<int32_t>& pNormalIdx,
+ void MeshGeometry_AddNormal(aiMesh& pMesh, const std::vector<int32_t>& pCoordIdx, const std::vector<int32_t>& pNormalIdx,
const std::list<aiVector3D>& pNormals, const bool pNormalPerVertex) const;
/// Add normals to mesh. Function work similar to \ref MeshGeometry_AddColor;
void MeshGeometry_AddNormal(aiMesh& pMesh, const std::list<aiVector3D>& pNormals, const bool pNormalPerVertex) const;
/// Add texture coordinates to mesh. Function work similar to \ref MeshGeometry_AddColor;
- void MeshGeometry_AddTexCoord(aiMesh& pMesh, const std::list<int32_t>& pCoordIdx, const std::list<int32_t>& pTexCoordIdx,
+ void MeshGeometry_AddTexCoord(aiMesh& pMesh, const std::vector<int32_t>& pCoordIdx, const std::vector<int32_t>& pTexCoordIdx,
const std::list<aiVector2D>& pTexCoords) const;
/// Add texture coordinates to mesh. Function work similar to \ref MeshGeometry_AddColor;
@@ -607,7 +598,7 @@ private:
/// \param [in] pCoordIdx - vertices indices divided by delimiter "-1".
/// \param [in] pVertices - vertices of mesh.
/// \return created mesh.
- aiMesh* GeometryHelper_MakeMesh(const std::list<int32_t>& pCoordIdx, const std::list<aiVector3D>& pVertices) const;
+ aiMesh* GeometryHelper_MakeMesh(const std::vector<int32_t>& pCoordIdx, const std::list<aiVector3D>& pVertices) const;
/***********************************************/
/******** Functions: parse set private *********/
@@ -826,13 +817,15 @@ private:
/****************** Constants ******************/
/***********************************************/
static const aiImporterDesc Description;
- static const std::string whitespace;
+ //static const std::regex pattern_nws;
+ //static const std::regex pattern_true;
+
/***********************************************/
/****************** Variables ******************/
/***********************************************/
CX3DImporter_NodeElement* NodeElement_Cur;///< Current element.
- irr::io::IrrXMLReader* mReader;///< Pointer to XML-reader object
+ std::unique_ptr<FIReader> mReader;///< Pointer to XML-reader object
IOSystem *mpIOHandler;
};// class X3DImporter
diff --git a/code/X3DImporter_Geometry2D.cpp b/code/X3DImporter_Geometry2D.cpp
index 895ba8798..5229017b3 100644
--- a/code/X3DImporter_Geometry2D.cpp
+++ b/code/X3DImporter_Geometry2D.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/X3DImporter_Geometry3D.cpp b/code/X3DImporter_Geometry3D.cpp
index 10dde6501..b6d130098 100644
--- a/code/X3DImporter_Geometry3D.cpp
+++ b/code/X3DImporter_Geometry3D.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -49,7 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "X3DImporter_Macro.hpp"
// Header files, Assimp.
-#include "StandardShapes.h"
+#include <assimp/StandardShapes.h>
namespace Assimp
{
@@ -135,7 +136,7 @@ void X3DImporter::ParseNode_Geometry3D_Cone()
}
else
{
- const unsigned int tess = 30;///TODO: IME tesselation factor through ai_property
+ const unsigned int tess = 30;///TODO: IME tessellation factor through ai_property
std::vector<aiVector3D> tvec;// temp array for vertices.
@@ -208,7 +209,7 @@ void X3DImporter::ParseNode_Geometry3D_Cylinder()
}
else
{
- const unsigned int tess = 30;///TODO: IME tesselation factor through ai_property
+ const unsigned int tess = 30;///TODO: IME tessellation factor through ai_property
std::vector<aiVector3D> tside;// temp array for vertices of side.
std::vector<aiVector3D> tcir;// temp array for vertices of circle.
@@ -285,7 +286,7 @@ void X3DImporter::ParseNode_Geometry3D_ElevationGrid()
bool ccw = true;
bool colorPerVertex = true;
float creaseAngle = 0;
- std::list<float> height;
+ std::vector<float> height;
bool normalPerVertex = true;
bool solid = true;
int32_t xDimension = 0;
@@ -301,7 +302,7 @@ void X3DImporter::ParseNode_Geometry3D_ElevationGrid()
MACRO_ATTRREAD_CHECK_RET("colorPerVertex", colorPerVertex, XML_ReadNode_GetAttrVal_AsBool);
MACRO_ATTRREAD_CHECK_RET("normalPerVertex", normalPerVertex, XML_ReadNode_GetAttrVal_AsBool);
MACRO_ATTRREAD_CHECK_RET("creaseAngle", creaseAngle, XML_ReadNode_GetAttrVal_AsFloat);
- MACRO_ATTRREAD_CHECK_REF("height", height, XML_ReadNode_GetAttrVal_AsListF);
+ MACRO_ATTRREAD_CHECK_REF("height", height, XML_ReadNode_GetAttrVal_AsArrF);
MACRO_ATTRREAD_CHECK_RET("xDimension", xDimension, XML_ReadNode_GetAttrVal_AsI32);
MACRO_ATTRREAD_CHECK_RET("xSpacing", xSpacing, XML_ReadNode_GetAttrVal_AsFloat);
MACRO_ATTRREAD_CHECK_RET("zDimension", zDimension, XML_ReadNode_GetAttrVal_AsI32);
@@ -326,7 +327,7 @@ void X3DImporter::ParseNode_Geometry3D_ElevationGrid()
CX3DImporter_NodeElement_ElevationGrid& grid_alias = *((CX3DImporter_NodeElement_ElevationGrid*)ne);// create alias for conveience
{// create grid vertices list
- std::list<float>::const_iterator he_it = height.begin();
+ std::vector<float>::const_iterator he_it = height.begin();
for(int32_t zi = 0; zi < zDimension; zi++)// rows
{
@@ -479,7 +480,7 @@ static aiVector3D GeometryHelper_Extrusion_GetNextY(const size_t pSpine_PointIdx
tvec = pSpine[1] - pSpine[0];
}
else
- {// The Y-axis used for the last point it is the vector from spine[n-2] to spine[n-1]. In our case(see above about droping tail) spine[n - 1] is
+ {// The Y-axis used for the last point it is the vector from spine[n-2] to spine[n-1]. In our case(see above about dropping tail) spine[n - 1] is
// the spine[0].
tvec = pSpine[spine_idx_last] - pSpine[spine_idx_last - 1];
}
@@ -863,29 +864,29 @@ void X3DImporter::ParseNode_Geometry3D_IndexedFaceSet()
{
std::string use, def;
bool ccw = true;
- std::list<int32_t> colorIndex;
+ std::vector<int32_t> colorIndex;
bool colorPerVertex = true;
bool convex = true;
- std::list<int32_t> coordIndex;
+ std::vector<int32_t> coordIndex;
float creaseAngle = 0;
- std::list<int32_t> normalIndex;
+ std::vector<int32_t> normalIndex;
bool normalPerVertex = true;
bool solid = true;
- std::list<int32_t> texCoordIndex;
+ std::vector<int32_t> texCoordIndex;
CX3DImporter_NodeElement* ne( nullptr );
MACRO_ATTRREAD_LOOPBEG;
MACRO_ATTRREAD_CHECKUSEDEF_RET(def, use);
MACRO_ATTRREAD_CHECK_RET("ccw", ccw, XML_ReadNode_GetAttrVal_AsBool);
- MACRO_ATTRREAD_CHECK_REF("colorIndex", colorIndex, XML_ReadNode_GetAttrVal_AsListI32);
+ MACRO_ATTRREAD_CHECK_REF("colorIndex", colorIndex, XML_ReadNode_GetAttrVal_AsArrI32);
MACRO_ATTRREAD_CHECK_RET("colorPerVertex", colorPerVertex, XML_ReadNode_GetAttrVal_AsBool);
MACRO_ATTRREAD_CHECK_RET("convex", convex, XML_ReadNode_GetAttrVal_AsBool);
- MACRO_ATTRREAD_CHECK_REF("coordIndex", coordIndex, XML_ReadNode_GetAttrVal_AsListI32);
+ MACRO_ATTRREAD_CHECK_REF("coordIndex", coordIndex, XML_ReadNode_GetAttrVal_AsArrI32);
MACRO_ATTRREAD_CHECK_RET("creaseAngle", creaseAngle, XML_ReadNode_GetAttrVal_AsFloat);
- MACRO_ATTRREAD_CHECK_REF("normalIndex", normalIndex, XML_ReadNode_GetAttrVal_AsListI32);
+ MACRO_ATTRREAD_CHECK_REF("normalIndex", normalIndex, XML_ReadNode_GetAttrVal_AsArrI32);
MACRO_ATTRREAD_CHECK_RET("normalPerVertex", normalPerVertex, XML_ReadNode_GetAttrVal_AsBool);
MACRO_ATTRREAD_CHECK_RET("solid", solid, XML_ReadNode_GetAttrVal_AsBool);
- MACRO_ATTRREAD_CHECK_REF("texCoordIndex", texCoordIndex, XML_ReadNode_GetAttrVal_AsListI32);
+ MACRO_ATTRREAD_CHECK_REF("texCoordIndex", texCoordIndex, XML_ReadNode_GetAttrVal_AsArrI32);
MACRO_ATTRREAD_LOOPEND;
// if "USE" defined then find already defined element.
@@ -949,7 +950,7 @@ void X3DImporter::ParseNode_Geometry3D_IndexedFaceSet()
void X3DImporter::ParseNode_Geometry3D_Sphere()
{
std::string use, def;
- float radius = 1;
+ ai_real radius = 1;
bool solid = true;
CX3DImporter_NodeElement* ne( nullptr );
@@ -966,7 +967,7 @@ void X3DImporter::ParseNode_Geometry3D_Sphere()
}
else
{
- const unsigned int tess = 3;///TODO: IME tesselation factor through ai_property
+ const unsigned int tess = 3;///TODO: IME tessellation factor through ai_property
std::vector<aiVector3D> tlist;
diff --git a/code/X3DImporter_Group.cpp b/code/X3DImporter_Group.cpp
index e7df97b4b..0c2e820de 100644
--- a/code/X3DImporter_Group.cpp
+++ b/code/X3DImporter_Group.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/X3DImporter_Light.cpp b/code/X3DImporter_Light.cpp
index ff450f7a9..4ffea4411 100644
--- a/code/X3DImporter_Light.cpp
+++ b/code/X3DImporter_Light.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -47,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "X3DImporter.hpp"
#include "X3DImporter_Macro.hpp"
-#include "StringUtils.h"
+#include <assimp/StringUtils.h>
namespace Assimp {
diff --git a/code/X3DImporter_Macro.hpp b/code/X3DImporter_Macro.hpp
index 6281efcd5..d1172798c 100644
--- a/code/X3DImporter_Macro.hpp
+++ b/code/X3DImporter_Macro.hpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -75,7 +76,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
}
/// \def MACRO_ATTRREAD_CHECK_REF
-/// Check curent attribute name and if it equal to requested then read value. Result write to output variable by reference. If result was read then
+/// Check current attribute name and if it equal to requested then read value. Result write to output variable by reference. If result was read then
/// "continue" will called.
/// \param [in] pAttrName - attribute name.
/// \param [out] pVarName - output variable name.
@@ -88,7 +89,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
}
/// \def MACRO_ATTRREAD_CHECK_RET
-/// Check curent attribute name and if it equal to requested then read value. Result write to output variable using return value of \ref pFunction.
+/// Check current attribute name and if it equal to requested then read value. Result write to output variable using return value of \ref pFunction.
/// If result was read then "continue" will called.
/// \param [in] pAttrName - attribute name.
/// \param [out] pVarName - output variable name.
diff --git a/code/X3DImporter_Metadata.cpp b/code/X3DImporter_Metadata.cpp
index febc9cc2f..a566f0aa9 100644
--- a/code/X3DImporter_Metadata.cpp
+++ b/code/X3DImporter_Metadata.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -78,7 +79,7 @@ namespace Assimp
if(!mReader->isEmptyElement()) \
ParseNode_Metadata(pNE, pMetaName);/* in that case node element will be added to child elements list of current node. */ \
else \
- NodeElement_Cur->Child.push_back(pNE);/* else - add element to child list manualy */ \
+ NodeElement_Cur->Child.push_back(pNE);/* else - add element to child list manually */ \
\
NodeElement_List.push_back(pNE);/* add new element to elements list. */ \
}/* if(!pUSE_Var.empty()) else */ \
@@ -105,7 +106,7 @@ bool X3DImporter::ParseHelper_CheckRead_X3DMetadataObject()
return true;
}
-void X3DImporter::ParseNode_Metadata(CX3DImporter_NodeElement* pParentElement, const std::string& pNodeName)
+void X3DImporter::ParseNode_Metadata(CX3DImporter_NodeElement* pParentElement, const std::string& /*pNodeName*/)
{
ParseHelper_Node_Enter(pParentElement);
MACRO_NODECHECK_METADATA(mReader->getNodeName());
@@ -123,14 +124,14 @@ void X3DImporter::ParseNode_MetadataBoolean()
{
std::string def, use;
std::string name, reference;
- std::list<bool> value;
+ std::vector<bool> value;
CX3DImporter_NodeElement* ne( nullptr );
MACRO_ATTRREAD_LOOPBEG;
MACRO_ATTRREAD_CHECKUSEDEF_RET(def, use);
MACRO_ATTRREAD_CHECK_RET("name", name, mReader->getAttributeValue);
MACRO_ATTRREAD_CHECK_RET("reference", reference, mReader->getAttributeValue);
- MACRO_ATTRREAD_CHECK_REF("value", value, XML_ReadNode_GetAttrVal_AsListB);
+ MACRO_ATTRREAD_CHECK_REF("value", value, XML_ReadNode_GetAttrVal_AsArrB);
MACRO_ATTRREAD_LOOPEND;
MACRO_METADATA_FINDCREATE(def, use, reference, value, ne, CX3DImporter_NodeElement_MetaBoolean, "MetadataBoolean", ENET_MetaBoolean);
@@ -147,14 +148,14 @@ void X3DImporter::ParseNode_MetadataDouble()
{
std::string def, use;
std::string name, reference;
- std::list<double> value;
+ std::vector<double> value;
CX3DImporter_NodeElement* ne( nullptr );
MACRO_ATTRREAD_LOOPBEG;
MACRO_ATTRREAD_CHECKUSEDEF_RET(def, use);
MACRO_ATTRREAD_CHECK_RET("name", name, mReader->getAttributeValue);
MACRO_ATTRREAD_CHECK_RET("reference", reference, mReader->getAttributeValue);
- MACRO_ATTRREAD_CHECK_REF("value", value, XML_ReadNode_GetAttrVal_AsListD);
+ MACRO_ATTRREAD_CHECK_REF("value", value, XML_ReadNode_GetAttrVal_AsArrD);
MACRO_ATTRREAD_LOOPEND;
MACRO_METADATA_FINDCREATE(def, use, reference, value, ne, CX3DImporter_NodeElement_MetaDouble, "MetadataDouble", ENET_MetaDouble);
@@ -171,14 +172,14 @@ void X3DImporter::ParseNode_MetadataFloat()
{
std::string def, use;
std::string name, reference;
- std::list<float> value;
+ std::vector<float> value;
CX3DImporter_NodeElement* ne( nullptr );
MACRO_ATTRREAD_LOOPBEG;
MACRO_ATTRREAD_CHECKUSEDEF_RET(def, use);
MACRO_ATTRREAD_CHECK_RET("name", name, mReader->getAttributeValue);
MACRO_ATTRREAD_CHECK_RET("reference", reference, mReader->getAttributeValue);
- MACRO_ATTRREAD_CHECK_REF("value", value, XML_ReadNode_GetAttrVal_AsListF);
+ MACRO_ATTRREAD_CHECK_REF("value", value, XML_ReadNode_GetAttrVal_AsArrF);
MACRO_ATTRREAD_LOOPEND;
MACRO_METADATA_FINDCREATE(def, use, reference, value, ne, CX3DImporter_NodeElement_MetaFloat, "MetadataFloat", ENET_MetaFloat);
@@ -195,14 +196,14 @@ void X3DImporter::ParseNode_MetadataInteger()
{
std::string def, use;
std::string name, reference;
- std::list<int32_t> value;
+ std::vector<int32_t> value;
CX3DImporter_NodeElement* ne( nullptr );
MACRO_ATTRREAD_LOOPBEG;
MACRO_ATTRREAD_CHECKUSEDEF_RET(def, use);
MACRO_ATTRREAD_CHECK_RET("name", name, mReader->getAttributeValue);
MACRO_ATTRREAD_CHECK_RET("reference", reference, mReader->getAttributeValue);
- MACRO_ATTRREAD_CHECK_REF("value", value, XML_ReadNode_GetAttrVal_AsListI32);
+ MACRO_ATTRREAD_CHECK_REF("value", value, XML_ReadNode_GetAttrVal_AsArrI32);
MACRO_ATTRREAD_LOOPEND;
MACRO_METADATA_FINDCREATE(def, use, reference, value, ne, CX3DImporter_NodeElement_MetaInteger, "MetadataInteger", ENET_MetaInteger);
diff --git a/code/X3DImporter_Networking.cpp b/code/X3DImporter_Networking.cpp
index 9d55900cb..9c15c4ac4 100644
--- a/code/X3DImporter_Networking.cpp
+++ b/code/X3DImporter_Networking.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -51,9 +52,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Header files, Assimp.
#include <assimp/DefaultIOSystem.h>
+//#include <regex>
+
namespace Assimp
{
+//static std::regex pattern_parentDir(R"((^|/)[^/]+/../)");
+static std::string parentDir("/../");
+
// <Inline
// DEF="" ID
// USE="" IDREF
@@ -89,11 +95,28 @@ void X3DImporter::ParseNode_Networking_Inline()
if(load && (url.size() > 0))
{
- std::string full_path;
-
- full_path = mpIOHandler->CurrentDirectory() + "/" + url.front();
+ std::string full_path = mpIOHandler->CurrentDirectory() + url.front();
+
+ //full_path = std::regex_replace(full_path, pattern_parentDir, "$1");
+ for (std::string::size_type pos = full_path.find(parentDir); pos != std::string::npos; pos = full_path.find(parentDir, pos)) {
+ if (pos > 0) {
+ std::string::size_type pos2 = full_path.rfind('/', pos - 1);
+ if (pos2 != std::string::npos) {
+ full_path.erase(pos2, pos - pos2 + 3);
+ pos = pos2;
+ }
+ else {
+ full_path.erase(0, pos + 4);
+ pos = 0;
+ }
+ }
+ else {
+ pos += 3;
+ }
+ }
// Attribute "url" can contain list of strings. But we need only one - first.
- mpIOHandler->PushDirectory(DefaultIOSystem::absolutePath(full_path));
+ std::string::size_type slashPos = full_path.find_last_of("\\/");
+ mpIOHandler->PushDirectory(slashPos == std::string::npos ? std::string() : full_path.substr(0, slashPos + 1));
ParseFile(full_path, mpIOHandler);
mpIOHandler->PopDirectory();
}
diff --git a/code/X3DImporter_Node.hpp b/code/X3DImporter_Node.hpp
index 7061d06bc..cb1317582 100644
--- a/code/X3DImporter_Node.hpp
+++ b/code/X3DImporter_Node.hpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -52,6 +53,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Header files, stdlib.
#include <list>
+#include <vector>
#include <string>
/// \class CX3DImporter_NodeElement
@@ -264,7 +266,7 @@ public:
/// This struct describe metavalue of type boolean.
struct CX3DImporter_NodeElement_MetaBoolean : public CX3DImporter_NodeElement_Meta
{
- std::list<bool> Value;///< Stored value.
+ std::vector<bool> Value;///< Stored value.
/// \fn CX3DImporter_NodeElement_MetaBoolean(CX3DImporter_NodeElement* pParent)
/// Constructor
@@ -279,7 +281,7 @@ struct CX3DImporter_NodeElement_MetaBoolean : public CX3DImporter_NodeElement_Me
/// This struct describe metavalue of type double.
struct CX3DImporter_NodeElement_MetaDouble : public CX3DImporter_NodeElement_Meta
{
- std::list<double> Value;///< Stored value.
+ std::vector<double> Value;///< Stored value.
/// \fn CX3DImporter_NodeElement_MetaDouble(CX3DImporter_NodeElement* pParent)
/// Constructor
@@ -294,7 +296,7 @@ struct CX3DImporter_NodeElement_MetaDouble : public CX3DImporter_NodeElement_Met
/// This struct describe metavalue of type float.
struct CX3DImporter_NodeElement_MetaFloat : public CX3DImporter_NodeElement_Meta
{
- std::list<float> Value;///< Stored value.
+ std::vector<float> Value;///< Stored value.
/// \fn CX3DImporter_NodeElement_MetaFloat(CX3DImporter_NodeElement* pParent)
/// Constructor
@@ -309,7 +311,7 @@ struct CX3DImporter_NodeElement_MetaFloat : public CX3DImporter_NodeElement_Meta
/// This struct describe metavalue of type integer.
struct CX3DImporter_NodeElement_MetaInteger : public CX3DImporter_NodeElement_Meta
{
- std::list<int32_t> Value;///< Stored value.
+ std::vector<int32_t> Value;///< Stored value.
/// \fn CX3DImporter_NodeElement_MetaInteger(CX3DImporter_NodeElement* pParent)
/// Constructor
@@ -508,7 +510,7 @@ public:
/// If the angle between the geometric normals of two adjacent faces is less than the crease angle, normals shall be calculated so that the faces are
/// shaded smoothly across the edge; otherwise, normals shall be calculated so that a lighting discontinuity across the edge is produced.
float CreaseAngle;
- std::list<int32_t> CoordIdx;///< Coordinates list by faces. In X3D format: "-1" - delimiter for faces.
+ std::vector<int32_t> CoordIdx;///< Coordinates list by faces. In X3D format: "-1" - delimiter for faces.
/***********************************************/
/****************** Functions ******************/
@@ -554,21 +556,21 @@ public:
/// direction. If normals are not generated but are supplied using a Normal node, and the orientation of the normals does not match the setting of the
/// ccw field, results are undefined.
bool CCW;
- std::list<int32_t> ColorIndex;///< Field to specify the polygonal faces by indexing into the <Color> or <ColorRGBA>.
+ std::vector<int32_t> ColorIndex;///< Field to specify the polygonal faces by indexing into the <Color> or <ColorRGBA>.
bool ColorPerVertex;///< If true then colors are defined for every vertex, else for every face(line).
/// \var Convex
/// The convex field indicates whether all polygons in the shape are convex (TRUE). A polygon is convex if it is planar, does not intersect itself,
/// and all of the interior angles at its vertices are less than 180 degrees. Non planar and self intersecting polygons may produce undefined results
/// even if the convex field is FALSE.
bool Convex;
- std::list<int32_t> CoordIndex;///< Field to specify the polygonal faces by indexing into the <Coordinate>.
+ std::vector<int32_t> CoordIndex;///< Field to specify the polygonal faces by indexing into the <Coordinate>.
/// \var CreaseAngle
/// If the angle between the geometric normals of two adjacent faces is less than the crease angle, normals shall be calculated so that the faces are
/// shaded smoothly across the edge; otherwise, normals shall be calculated so that a lighting discontinuity across the edge is produced.
float CreaseAngle;
- std::list<int32_t> NormalIndex;///< Field to specify the polygonal faces by indexing into the <Normal>.
+ std::vector<int32_t> NormalIndex;///< Field to specify the polygonal faces by indexing into the <Normal>.
bool NormalPerVertex;///< If true then normals are defined for every vertex, else for every face(line).
- std::list<int32_t> TexCoordIndex;///< Field to specify the polygonal faces by indexing into the <TextureCoordinate>.
+ std::vector<int32_t> TexCoordIndex;///< Field to specify the polygonal faces by indexing into the <TextureCoordinate>.
/***********************************************/
/****************** Functions ******************/
@@ -616,10 +618,10 @@ public:
bool CCW;
bool ColorPerVertex;///< If true then colors are defined for every vertex, else for every face(line).
bool NormalPerVertex;///< If true then normals are defined for every vertex, else for every face(line).
- std::list<int32_t> CoordIndex;///< Field to specify the polygonal faces by indexing into the <Coordinate>.
- std::list<int32_t> NormalIndex;///< Field to specify the polygonal faces by indexing into the <Normal>.
- std::list<int32_t> TexCoordIndex;///< Field to specify the polygonal faces by indexing into the <TextureCoordinate>.
- std::list<int32_t> VertexCount;///< Field describes how many vertices are to be used in each polyline(polygon) from the <Coordinate> field.
+ std::vector<int32_t> CoordIndex;///< Field to specify the polygonal faces by indexing into the <Coordinate>.
+ std::vector<int32_t> NormalIndex;///< Field to specify the polygonal faces by indexing into the <Normal>.
+ std::vector<int32_t> TexCoordIndex;///< Field to specify the polygonal faces by indexing into the <TextureCoordinate>.
+ std::vector<int32_t> VertexCount;///< Field describes how many vertices are to be used in each polyline(polygon) from the <Coordinate> field.
/***********************************************/
/****************** Functions ******************/
diff --git a/code/X3DImporter_Postprocess.cpp b/code/X3DImporter_Postprocess.cpp
index 0e3f3a8ae..c439a4004 100644
--- a/code/X3DImporter_Postprocess.cpp
+++ b/code/X3DImporter_Postprocess.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -48,8 +49,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "X3DImporter.hpp"
// Header files, Assimp.
-#include "StandardShapes.h"
-#include "StringUtils.h"
+#include <assimp/ai_assert.h>
+#include <assimp/StandardShapes.h>
+#include <assimp/StringUtils.h>
// Header files, stdlib.
#include <algorithm>
@@ -357,6 +359,7 @@ void X3DImporter::Postprocess_BuildMesh(const CX3DImporter_NodeElement& pNodeEle
// copy additional information from children
for(std::list<CX3DImporter_NodeElement*>::iterator ch_it = tnemesh.Child.begin(); ch_it != tnemesh.Child.end(); ch_it++)
{
+ ai_assert(*pMesh);
if((*ch_it)->Type == CX3DImporter_NodeElement::ENET_Color)
MeshGeometry_AddColor(**pMesh, tnemesh.CoordIndex, tnemesh.ColorIndex, ((CX3DImporter_NodeElement_Color*)*ch_it)->Value, tnemesh.ColorPerVertex);
else if((*ch_it)->Type == CX3DImporter_NodeElement::ENET_ColorRGBA)
@@ -389,6 +392,7 @@ void X3DImporter::Postprocess_BuildMesh(const CX3DImporter_NodeElement& pNodeEle
// copy additional information from children
for(std::list<CX3DImporter_NodeElement*>::iterator ch_it = tnemesh.Child.begin(); ch_it != tnemesh.Child.end(); ch_it++)
{
+ ai_assert(*pMesh);
if((*ch_it)->Type == CX3DImporter_NodeElement::ENET_Color)
MeshGeometry_AddColor(**pMesh, tnemesh.CoordIndex, tnemesh.ColorIndex, ((CX3DImporter_NodeElement_Color*)*ch_it)->Value, tnemesh.ColorPerVertex);
else if((*ch_it)->Type == CX3DImporter_NodeElement::ENET_ColorRGBA)
@@ -446,6 +450,7 @@ void X3DImporter::Postprocess_BuildMesh(const CX3DImporter_NodeElement& pNodeEle
// copy additional information from children
for(std::list<CX3DImporter_NodeElement*>::iterator ch_it = tnemesh.Child.begin(); ch_it != tnemesh.Child.end(); ch_it++)
{
+ ai_assert(*pMesh);
if((*ch_it)->Type == CX3DImporter_NodeElement::ENET_Color)
MeshGeometry_AddColor(**pMesh, ((CX3DImporter_NodeElement_Color*)*ch_it)->Value, true);
else if((*ch_it)->Type == CX3DImporter_NodeElement::ENET_ColorRGBA)
@@ -475,6 +480,7 @@ void X3DImporter::Postprocess_BuildMesh(const CX3DImporter_NodeElement& pNodeEle
// copy additional information from children
for(std::list<CX3DImporter_NodeElement*>::iterator ch_it = tnemesh.Child.begin(); ch_it != tnemesh.Child.end(); ch_it++)
{
+ ai_assert(*pMesh);
if((*ch_it)->Type == CX3DImporter_NodeElement::ENET_Color)
MeshGeometry_AddColor(**pMesh, ((CX3DImporter_NodeElement_Color*)*ch_it)->Value, true);
else if((*ch_it)->Type == CX3DImporter_NodeElement::ENET_ColorRGBA)
@@ -550,6 +556,7 @@ void X3DImporter::Postprocess_BuildMesh(const CX3DImporter_NodeElement& pNodeEle
// copy additional information from children
for(std::list<CX3DImporter_NodeElement*>::iterator ch_it = tnemesh.Child.begin(); ch_it != tnemesh.Child.end(); ch_it++)
{
+ ai_assert(*pMesh);
if((*ch_it)->Type == CX3DImporter_NodeElement::ENET_Color)
MeshGeometry_AddColor(**pMesh, ((CX3DImporter_NodeElement_Color*)*ch_it)->Value, tnemesh.ColorPerVertex);
else if((*ch_it)->Type == CX3DImporter_NodeElement::ENET_ColorRGBA)
@@ -584,6 +591,7 @@ void X3DImporter::Postprocess_BuildMesh(const CX3DImporter_NodeElement& pNodeEle
// copy additional information from children
for(std::list<CX3DImporter_NodeElement*>::iterator ch_it = tnemesh.Child.begin(); ch_it != tnemesh.Child.end(); ch_it++)
{
+ ai_assert(*pMesh);
if((*ch_it)->Type == CX3DImporter_NodeElement::ENET_Color)
MeshGeometry_AddColor(**pMesh, ((CX3DImporter_NodeElement_Color*)*ch_it)->Value, tnemesh.ColorPerVertex);
else if((*ch_it)->Type == CX3DImporter_NodeElement::ENET_ColorRGBA)
diff --git a/code/X3DImporter_Rendering.cpp b/code/X3DImporter_Rendering.cpp
index 39a493030..1b44f8c19 100644
--- a/code/X3DImporter_Rendering.cpp
+++ b/code/X3DImporter_Rendering.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -180,16 +181,16 @@ void X3DImporter::ParseNode_Rendering_Coordinate()
void X3DImporter::ParseNode_Rendering_IndexedLineSet()
{
std::string use, def;
- std::list<int32_t> colorIndex;
+ std::vector<int32_t> colorIndex;
bool colorPerVertex = true;
- std::list<int32_t> coordIndex;
+ std::vector<int32_t> coordIndex;
CX3DImporter_NodeElement* ne( nullptr );
MACRO_ATTRREAD_LOOPBEG;
MACRO_ATTRREAD_CHECKUSEDEF_RET(def, use);
- MACRO_ATTRREAD_CHECK_REF("colorIndex", colorIndex, XML_ReadNode_GetAttrVal_AsListI32);
+ MACRO_ATTRREAD_CHECK_REF("colorIndex", colorIndex, XML_ReadNode_GetAttrVal_AsArrI32);
MACRO_ATTRREAD_CHECK_RET("colorPerVertex", colorPerVertex, XML_ReadNode_GetAttrVal_AsBool);
- MACRO_ATTRREAD_CHECK_REF("coordIndex", coordIndex, XML_ReadNode_GetAttrVal_AsListI32);
+ MACRO_ATTRREAD_CHECK_REF("coordIndex", coordIndex, XML_ReadNode_GetAttrVal_AsArrI32);
MACRO_ATTRREAD_LOOPEND;
// if "USE" defined then find already defined element.
@@ -256,7 +257,7 @@ void X3DImporter::ParseNode_Rendering_IndexedTriangleFanSet()
std::string use, def;
bool ccw = true;
bool colorPerVertex = true;
- std::list<int32_t> index;
+ std::vector<int32_t> index;
bool normalPerVertex = true;
bool solid = true;
CX3DImporter_NodeElement* ne( nullptr );
@@ -265,7 +266,7 @@ void X3DImporter::ParseNode_Rendering_IndexedTriangleFanSet()
MACRO_ATTRREAD_CHECKUSEDEF_RET(def, use);
MACRO_ATTRREAD_CHECK_RET("ccw", ccw, XML_ReadNode_GetAttrVal_AsBool);
MACRO_ATTRREAD_CHECK_RET("colorPerVertex", colorPerVertex, XML_ReadNode_GetAttrVal_AsBool);
- MACRO_ATTRREAD_CHECK_REF("index", index, XML_ReadNode_GetAttrVal_AsListI32);
+ MACRO_ATTRREAD_CHECK_REF("index", index, XML_ReadNode_GetAttrVal_AsArrI32);
MACRO_ATTRREAD_CHECK_RET("normalPerVertex", normalPerVertex, XML_ReadNode_GetAttrVal_AsBool);
MACRO_ATTRREAD_CHECK_RET("solid", solid, XML_ReadNode_GetAttrVal_AsBool);
MACRO_ATTRREAD_LOOPEND;
@@ -294,7 +295,7 @@ void X3DImporter::ParseNode_Rendering_IndexedTriangleFanSet()
ne_alias.CoordIndex.clear();
int counter = 0;
int32_t idx[3];
- for(std::list<int32_t>::const_iterator idx_it = index.begin(); idx_it != index.end(); idx_it++)
+ for(std::vector<int32_t>::const_iterator idx_it = index.begin(); idx_it != index.end(); idx_it++)
{
idx[2] = *idx_it;
if (idx[2] < 0)
@@ -374,7 +375,7 @@ void X3DImporter::ParseNode_Rendering_IndexedTriangleSet()
std::string use, def;
bool ccw = true;
bool colorPerVertex = true;
- std::list<int32_t> index;
+ std::vector<int32_t> index;
bool normalPerVertex = true;
bool solid = true;
CX3DImporter_NodeElement* ne( nullptr );
@@ -383,7 +384,7 @@ void X3DImporter::ParseNode_Rendering_IndexedTriangleSet()
MACRO_ATTRREAD_CHECKUSEDEF_RET(def, use);
MACRO_ATTRREAD_CHECK_RET("ccw", ccw, XML_ReadNode_GetAttrVal_AsBool);
MACRO_ATTRREAD_CHECK_RET("colorPerVertex", colorPerVertex, XML_ReadNode_GetAttrVal_AsBool);
- MACRO_ATTRREAD_CHECK_REF("index", index, XML_ReadNode_GetAttrVal_AsListI32);
+ MACRO_ATTRREAD_CHECK_REF("index", index, XML_ReadNode_GetAttrVal_AsArrI32);
MACRO_ATTRREAD_CHECK_RET("normalPerVertex", normalPerVertex, XML_ReadNode_GetAttrVal_AsBool);
MACRO_ATTRREAD_CHECK_RET("solid", solid, XML_ReadNode_GetAttrVal_AsBool);
MACRO_ATTRREAD_LOOPEND;
@@ -412,7 +413,7 @@ void X3DImporter::ParseNode_Rendering_IndexedTriangleSet()
ne_alias.CoordIndex.clear();
int counter = 0;
int32_t idx[3];
- for(std::list<int32_t>::const_iterator idx_it = index.begin(); idx_it != index.end(); idx_it++)
+ for(std::vector<int32_t>::const_iterator idx_it = index.begin(); idx_it != index.end(); idx_it++)
{
idx[counter++] = *idx_it;
if (counter > 2)
@@ -480,7 +481,7 @@ void X3DImporter::ParseNode_Rendering_IndexedTriangleStripSet()
std::string use, def;
bool ccw = true;
bool colorPerVertex = true;
- std::list<int32_t> index;
+ std::vector<int32_t> index;
bool normalPerVertex = true;
bool solid = true;
CX3DImporter_NodeElement* ne( nullptr );
@@ -489,7 +490,7 @@ void X3DImporter::ParseNode_Rendering_IndexedTriangleStripSet()
MACRO_ATTRREAD_CHECKUSEDEF_RET(def, use);
MACRO_ATTRREAD_CHECK_RET("ccw", ccw, XML_ReadNode_GetAttrVal_AsBool);
MACRO_ATTRREAD_CHECK_RET("colorPerVertex", colorPerVertex, XML_ReadNode_GetAttrVal_AsBool);
- MACRO_ATTRREAD_CHECK_REF("index", index, XML_ReadNode_GetAttrVal_AsListI32);
+ MACRO_ATTRREAD_CHECK_REF("index", index, XML_ReadNode_GetAttrVal_AsArrI32);
MACRO_ATTRREAD_CHECK_RET("normalPerVertex", normalPerVertex, XML_ReadNode_GetAttrVal_AsBool);
MACRO_ATTRREAD_CHECK_RET("solid", solid, XML_ReadNode_GetAttrVal_AsBool);
MACRO_ATTRREAD_LOOPEND;
@@ -518,7 +519,7 @@ void X3DImporter::ParseNode_Rendering_IndexedTriangleStripSet()
ne_alias.CoordIndex.clear();
int counter = 0;
int32_t idx[3];
- for(std::list<int32_t>::const_iterator idx_it = index.begin(); idx_it != index.end(); idx_it++)
+ for(std::vector<int32_t>::const_iterator idx_it = index.begin(); idx_it != index.end(); idx_it++)
{
idx[2] = *idx_it;
if (idx[2] < 0)
@@ -587,12 +588,12 @@ void X3DImporter::ParseNode_Rendering_IndexedTriangleStripSet()
void X3DImporter::ParseNode_Rendering_LineSet()
{
std::string use, def;
- std::list<int32_t> vertexCount;
+ std::vector<int32_t> vertexCount;
CX3DImporter_NodeElement* ne( nullptr );
MACRO_ATTRREAD_LOOPBEG;
MACRO_ATTRREAD_CHECKUSEDEF_RET(def, use);
- MACRO_ATTRREAD_CHECK_REF("vertexCount", vertexCount, XML_ReadNode_GetAttrVal_AsListI32);
+ MACRO_ATTRREAD_CHECK_REF("vertexCount", vertexCount, XML_ReadNode_GetAttrVal_AsArrI32);
MACRO_ATTRREAD_LOOPEND;
// if "USE" defined then find already defined element.
@@ -616,7 +617,7 @@ void X3DImporter::ParseNode_Rendering_LineSet()
size_t coord_num = 0;
ne_alias.CoordIndex.clear();
- for(std::list<int32_t>::const_iterator vc_it = ne_alias.VertexCount.begin(); vc_it != ne_alias.VertexCount.end(); vc_it++)
+ for(std::vector<int32_t>::const_iterator vc_it = ne_alias.VertexCount.begin(); vc_it != ne_alias.VertexCount.end(); vc_it++)
{
if(*vc_it < 2) throw DeadlyImportError("LineSet. vertexCount shall be greater than or equal to two.");
@@ -722,7 +723,7 @@ void X3DImporter::ParseNode_Rendering_TriangleFanSet()
std::string use, def;
bool ccw = true;
bool colorPerVertex = true;
- std::list<int32_t> fanCount;
+ std::vector<int32_t> fanCount;
bool normalPerVertex = true;
bool solid = true;
CX3DImporter_NodeElement* ne( nullptr );
@@ -731,7 +732,7 @@ void X3DImporter::ParseNode_Rendering_TriangleFanSet()
MACRO_ATTRREAD_CHECKUSEDEF_RET(def, use);
MACRO_ATTRREAD_CHECK_RET("ccw", ccw, XML_ReadNode_GetAttrVal_AsBool);
MACRO_ATTRREAD_CHECK_RET("colorPerVertex", colorPerVertex, XML_ReadNode_GetAttrVal_AsBool);
- MACRO_ATTRREAD_CHECK_REF("fanCount", fanCount, XML_ReadNode_GetAttrVal_AsListI32);
+ MACRO_ATTRREAD_CHECK_REF("fanCount", fanCount, XML_ReadNode_GetAttrVal_AsArrI32);
MACRO_ATTRREAD_CHECK_RET("normalPerVertex", normalPerVertex, XML_ReadNode_GetAttrVal_AsBool);
MACRO_ATTRREAD_CHECK_RET("solid", solid, XML_ReadNode_GetAttrVal_AsBool);
MACRO_ATTRREAD_LOOPEND;
@@ -764,7 +765,7 @@ void X3DImporter::ParseNode_Rendering_TriangleFanSet()
// assign indices for first triangle
coord_num_first = 0;
coord_num_prev = 1;
- for(std::list<int32_t>::const_iterator vc_it = ne_alias.VertexCount.begin(); vc_it != ne_alias.VertexCount.end(); vc_it++)
+ for(std::vector<int32_t>::const_iterator vc_it = ne_alias.VertexCount.begin(); vc_it != ne_alias.VertexCount.end(); vc_it++)
{
if(*vc_it < 3) throw DeadlyImportError("TriangleFanSet. fanCount shall be greater than or equal to three.");
@@ -913,7 +914,7 @@ void X3DImporter::ParseNode_Rendering_TriangleStripSet()
std::string use, def;
bool ccw = true;
bool colorPerVertex = true;
- std::list<int32_t> stripCount;
+ std::vector<int32_t> stripCount;
bool normalPerVertex = true;
bool solid = true;
CX3DImporter_NodeElement* ne( nullptr );
@@ -922,7 +923,7 @@ void X3DImporter::ParseNode_Rendering_TriangleStripSet()
MACRO_ATTRREAD_CHECKUSEDEF_RET(def, use);
MACRO_ATTRREAD_CHECK_RET("ccw", ccw, XML_ReadNode_GetAttrVal_AsBool);
MACRO_ATTRREAD_CHECK_RET("colorPerVertex", colorPerVertex, XML_ReadNode_GetAttrVal_AsBool);
- MACRO_ATTRREAD_CHECK_REF("stripCount", stripCount, XML_ReadNode_GetAttrVal_AsListI32);
+ MACRO_ATTRREAD_CHECK_REF("stripCount", stripCount, XML_ReadNode_GetAttrVal_AsArrI32);
MACRO_ATTRREAD_CHECK_RET("normalPerVertex", normalPerVertex, XML_ReadNode_GetAttrVal_AsBool);
MACRO_ATTRREAD_CHECK_RET("solid", solid, XML_ReadNode_GetAttrVal_AsBool);
MACRO_ATTRREAD_LOOPEND;
@@ -955,7 +956,7 @@ void X3DImporter::ParseNode_Rendering_TriangleStripSet()
ne_alias.CoordIndex.clear();
coord_num_sb = 0;
- for(std::list<int32_t>::const_iterator vc_it = ne_alias.VertexCount.begin(); vc_it != ne_alias.VertexCount.end(); vc_it++)
+ for(std::vector<int32_t>::const_iterator vc_it = ne_alias.VertexCount.begin(); vc_it != ne_alias.VertexCount.end(); vc_it++)
{
if(*vc_it < 3) throw DeadlyImportError("TriangleStripSet. stripCount shall be greater than or equal to three.");
diff --git a/code/X3DImporter_Shape.cpp b/code/X3DImporter_Shape.cpp
index 55ce7fa99..43089c698 100644
--- a/code/X3DImporter_Shape.cpp
+++ b/code/X3DImporter_Shape.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/X3DImporter_Texturing.cpp b/code/X3DImporter_Texturing.cpp
index 40ea47797..807d19ff8 100644
--- a/code/X3DImporter_Texturing.cpp
+++ b/code/X3DImporter_Texturing.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/X3DVocabulary.cpp b/code/X3DVocabulary.cpp
new file mode 100644
index 000000000..dc361b7aa
--- /dev/null
+++ b/code/X3DVocabulary.cpp
@@ -0,0 +1,1676 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2018, assimp 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 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 X3DVocabulary.cpp
+/// \brief Vocabulary for Fast Infoset encoded binary X3D files.
+/// \date 2017
+/// \author Patrick Daehne
+
+#ifndef ASSIMP_BUILD_NO_X3D_IMPORTER
+
+#include "FIReader.hpp"
+
+namespace Assimp {
+
+static const char *encodingAlgorithmTable_3_2[] = {
+ "encoder://web3d.org/QuantizedFloatArrayEncoder",
+ "encoder://web3d.org/DeltazlibIntArrayEncoder",
+ "encoder://web3d.org/QuantizedzlibFloatArrayEncoder",
+ "encoder://web3d.org/zlibFloatArrayEncoder",
+ "encoder://web3d.org/QuantizedDoubleArrayEncoder",
+ "encoder://web3d.org/zlibDoubleArrayEncoder",
+ "encoder://web3d.org/QuantizedzlibDoubleArrayEncoder",
+ "encoder://web3d.org/RangeIntArrayEncoder"
+};
+
+static const std::shared_ptr<const FIValue> attributeValueTable_3_2[] = {
+ FIStringValue::create("false"),
+ FIStringValue::create("true")
+};
+
+static const FIQName elementNameTable_3_2[] = {
+ { "Shape", nullptr, nullptr },
+ { "Appearance", nullptr, nullptr },
+ { "Material", nullptr, nullptr },
+ { "IndexedFaceSet", nullptr, nullptr },
+ { "ProtoInstance", nullptr, nullptr },
+ { "Transform", nullptr, nullptr },
+ { "ImageTexture", nullptr, nullptr },
+ { "TextureTransform", nullptr, nullptr },
+ { "Coordinate", nullptr, nullptr },
+ { "Normal", nullptr, nullptr },
+ { "Color", nullptr, nullptr },
+ { "ColorRGBA", nullptr, nullptr },
+ { "TextureCoordinate", nullptr, nullptr },
+ { "ROUTE", nullptr, nullptr },
+ { "fieldValue", nullptr, nullptr },
+ { "Group", nullptr, nullptr },
+ { "LOD", nullptr, nullptr },
+ { "Switch", nullptr, nullptr },
+ { "Script", nullptr, nullptr },
+ { "IndexedTriangleFanSet", nullptr, nullptr },
+ { "IndexedTriangleSet", nullptr, nullptr },
+ { "IndexedTriangleStripSet", nullptr, nullptr },
+ { "MultiTexture", nullptr, nullptr },
+ { "MultiTextureCoordinate", nullptr, nullptr },
+ { "MultiTextureTransform", nullptr, nullptr },
+ { "IndexedLineSet", nullptr, nullptr },
+ { "PointSet", nullptr, nullptr },
+ { "StaticGroup", nullptr, nullptr },
+ { "Sphere", nullptr, nullptr },
+ { "Box", nullptr, nullptr },
+ { "Cone", nullptr, nullptr },
+ { "Anchor", nullptr, nullptr },
+ { "Arc2D", nullptr, nullptr },
+ { "ArcClose2D", nullptr, nullptr },
+ { "AudioClip", nullptr, nullptr },
+ { "Background", nullptr, nullptr },
+ { "Billboard", nullptr, nullptr },
+ { "BooleanFilter", nullptr, nullptr },
+ { "BooleanSequencer", nullptr, nullptr },
+ { "BooleanToggle", nullptr, nullptr },
+ { "BooleanTrigger", nullptr, nullptr },
+ { "Circle2D", nullptr, nullptr },
+ { "Collision", nullptr, nullptr },
+ { "ColorInterpolator", nullptr, nullptr },
+ { "Contour2D", nullptr, nullptr },
+ { "ContourPolyline2D", nullptr, nullptr },
+ { "CoordinateDouble", nullptr, nullptr },
+ { "CoordinateInterpolator", nullptr, nullptr },
+ { "CoordinateInterpolator2D", nullptr, nullptr },
+ { "Cylinder", nullptr, nullptr },
+ { "CylinderSensor", nullptr, nullptr },
+ { "DirectionalLight", nullptr, nullptr },
+ { "Disk2D", nullptr, nullptr },
+ { "EXPORT", nullptr, nullptr },
+ { "ElevationGrid", nullptr, nullptr },
+ { "EspduTransform", nullptr, nullptr },
+ { "ExternProtoDeclare", nullptr, nullptr },
+ { "Extrusion", nullptr, nullptr },
+ { "FillProperties", nullptr, nullptr },
+ { "Fog", nullptr, nullptr },
+ { "FontStyle", nullptr, nullptr },
+ { "GeoCoordinate", nullptr, nullptr },
+ { "GeoElevationGrid", nullptr, nullptr },
+ { "GeoLOD", nullptr, nullptr },
+ { "GeoLocation", nullptr, nullptr },
+ { "GeoMetadata", nullptr, nullptr },
+ { "GeoOrigin", nullptr, nullptr },
+ { "GeoPositionInterpolator", nullptr, nullptr },
+ { "GeoTouchSensor", nullptr, nullptr },
+ { "GeoViewpoint", nullptr, nullptr },
+ { "HAnimDisplacer", nullptr, nullptr },
+ { "HAnimHumanoid", nullptr, nullptr },
+ { "HAnimJoint", nullptr, nullptr },
+ { "HAnimSegment", nullptr, nullptr },
+ { "HAnimSite", nullptr, nullptr },
+ { "IMPORT", nullptr, nullptr },
+ { "IS", nullptr, nullptr },
+ { "Inline", nullptr, nullptr },
+ { "IntegerSequencer", nullptr, nullptr },
+ { "IntegerTrigger", nullptr, nullptr },
+ { "KeySensor", nullptr, nullptr },
+ { "LineProperties", nullptr, nullptr },
+ { "LineSet", nullptr, nullptr },
+ { "LoadSensor", nullptr, nullptr },
+ { "MetadataDouble", nullptr, nullptr },
+ { "MetadataFloat", nullptr, nullptr },
+ { "MetadataInteger", nullptr, nullptr },
+ { "MetadataSet", nullptr, nullptr },
+ { "MetadataString", nullptr, nullptr },
+ { "MovieTexture", nullptr, nullptr },
+ { "NavigationInfo", nullptr, nullptr },
+ { "NormalInterpolator", nullptr, nullptr },
+ { "NurbsCurve", nullptr, nullptr },
+ { "NurbsCurve2D", nullptr, nullptr },
+ { "NurbsOrientationInterpolator", nullptr, nullptr },
+ { "NurbsPatchSurface", nullptr, nullptr },
+ { "NurbsPositionInterpolator", nullptr, nullptr },
+ { "NurbsSet", nullptr, nullptr },
+ { "NurbsSurfaceInterpolator", nullptr, nullptr },
+ { "NurbsSweptSurface", nullptr, nullptr },
+ { "NurbsSwungSurface", nullptr, nullptr },
+ { "NurbsTextureCoordinate", nullptr, nullptr },
+ { "NurbsTrimmedSurface", nullptr, nullptr },
+ { "OrientationInterpolator", nullptr, nullptr },
+ { "PixelTexture", nullptr, nullptr },
+ { "PlaneSensor", nullptr, nullptr },
+ { "PointLight", nullptr, nullptr },
+ { "Polyline2D", nullptr, nullptr },
+ { "Polypoint2D", nullptr, nullptr },
+ { "PositionInterpolator", nullptr, nullptr },
+ { "PositionInterpolator2D", nullptr, nullptr },
+ { "ProtoBody", nullptr, nullptr },
+ { "ProtoDeclare", nullptr, nullptr },
+ { "ProtoInterface", nullptr, nullptr },
+ { "ProximitySensor", nullptr, nullptr },
+ { "ReceiverPdu", nullptr, nullptr },
+ { "Rectangle2D", nullptr, nullptr },
+ { "ScalarInterpolator", nullptr, nullptr },
+ { "Scene", nullptr, nullptr },
+ { "SignalPdu", nullptr, nullptr },
+ { "Sound", nullptr, nullptr },
+ { "SphereSensor", nullptr, nullptr },
+ { "SpotLight", nullptr, nullptr },
+ { "StringSensor", nullptr, nullptr },
+ { "Text", nullptr, nullptr },
+ { "TextureBackground", nullptr, nullptr },
+ { "TextureCoordinateGenerator", nullptr, nullptr },
+ { "TimeSensor", nullptr, nullptr },
+ { "TimeTrigger", nullptr, nullptr },
+ { "TouchSensor", nullptr, nullptr },
+ { "TransmitterPdu", nullptr, nullptr },
+ { "TriangleFanSet", nullptr, nullptr },
+ { "TriangleSet", nullptr, nullptr },
+ { "TriangleSet2D", nullptr, nullptr },
+ { "TriangleStripSet", nullptr, nullptr },
+ { "Viewpoint", nullptr, nullptr },
+ { "VisibilitySensor", nullptr, nullptr },
+ { "WorldInfo", nullptr, nullptr },
+ { "X3D", nullptr, nullptr },
+ { "component", nullptr, nullptr },
+ { "connect", nullptr, nullptr },
+ { "field", nullptr, nullptr },
+ { "head", nullptr, nullptr },
+ { "humanoidBodyType", nullptr, nullptr },
+ { "meta", nullptr, nullptr },
+ { "CADAssembly", nullptr, nullptr },
+ { "CADFace", nullptr, nullptr },
+ { "CADLayer", nullptr, nullptr },
+ { "CADPart", nullptr, nullptr },
+ { "ComposedCubeMapTexture", nullptr, nullptr },
+ { "ComposedShader", nullptr, nullptr },
+ { "ComposedTexture3D", nullptr, nullptr },
+ { "FloatVertexAttribute", nullptr, nullptr },
+ { "FogCoordinate", nullptr, nullptr },
+ { "GeneratedCubeMapTexture", nullptr, nullptr },
+ { "ImageCubeMapTexture", nullptr, nullptr },
+ { "ImageTexture3D", nullptr, nullptr },
+ { "IndexedQuadSet", nullptr, nullptr },
+ { "LocalFog", nullptr, nullptr },
+ { "Matrix3VertexAttribute", nullptr, nullptr },
+ { "Matrix4VertexAttribute", nullptr, nullptr },
+ { "PackagedShader", nullptr, nullptr },
+ { "PixelTexture3D", nullptr, nullptr },
+ { "ProgramShader", nullptr, nullptr },
+ { "QuadSet", nullptr, nullptr },
+ { "ShaderPart", nullptr, nullptr },
+ { "ShaderProgram", nullptr, nullptr },
+ { "TextureCoordinate3D", nullptr, nullptr },
+ { "TextureCoordinate4D", nullptr, nullptr },
+ { "TextureTransform3D", nullptr, nullptr },
+ { "TextureTransformMatrix3D", nullptr, nullptr },
+ { "BallJoint", nullptr, nullptr },
+ { "BoundedPhysicsModel", nullptr, nullptr },
+ { "ClipPlane", nullptr, nullptr },
+ { "CollidableOffset", nullptr, nullptr },
+ { "CollidableShape", nullptr, nullptr },
+ { "CollisionCollection", nullptr, nullptr },
+ { "CollisionSensor", nullptr, nullptr },
+ { "CollisionSpace", nullptr, nullptr },
+ { "ColorDamper", nullptr, nullptr },
+ { "ConeEmitter", nullptr, nullptr },
+ { "Contact", nullptr, nullptr },
+ { "CoordinateDamper", nullptr, nullptr },
+ { "DISEntityManager", nullptr, nullptr },
+ { "DISEntityTypeMapping", nullptr, nullptr },
+ { "DoubleAxisHingeJoint", nullptr, nullptr },
+ { "EaseInEaseOut", nullptr, nullptr },
+ { "ExplosionEmitter", nullptr, nullptr },
+ { "ForcePhysicsModel", nullptr, nullptr },
+ { "GeoProximitySensor", nullptr, nullptr },
+ { "GeoTransform", nullptr, nullptr },
+ { "Layer", nullptr, nullptr },
+ { "LayerSet", nullptr, nullptr },
+ { "Layout", nullptr, nullptr },
+ { "LayoutGroup", nullptr, nullptr },
+ { "LayoutLayer", nullptr, nullptr },
+ { "LinePickSensor", nullptr, nullptr },
+ { "MotorJoint", nullptr, nullptr },
+ { "OrientationChaser", nullptr, nullptr },
+ { "OrientationDamper", nullptr, nullptr },
+ { "OrthoViewpoint", nullptr, nullptr },
+ { "ParticleSystem", nullptr, nullptr },
+ { "PickableGroup", nullptr, nullptr },
+ { "PointEmitter", nullptr, nullptr },
+ { "PointPickSensor", nullptr, nullptr },
+ { "PolylineEmitter", nullptr, nullptr },
+ { "PositionChaser", nullptr, nullptr },
+ { "PositionChaser2D", nullptr, nullptr },
+ { "PositionDamper", nullptr, nullptr },
+ { "PositionDamper2D", nullptr, nullptr },
+ { "PrimitivePickSensor", nullptr, nullptr },
+ { "RigidBody", nullptr, nullptr },
+ { "RigidBodyCollection", nullptr, nullptr },
+ { "ScalarChaser", nullptr, nullptr },
+ { "ScreenFontStyle", nullptr, nullptr },
+ { "ScreenGroup", nullptr, nullptr },
+ { "SingleAxisHingeJoint", nullptr, nullptr },
+ { "SliderJoint", nullptr, nullptr },
+ { "SplinePositionInterpolator", nullptr, nullptr },
+ { "SplinePositionInterpolator2D", nullptr, nullptr },
+ { "SplineScalarInterpolator", nullptr, nullptr },
+ { "SquadOrientationInterpolator", nullptr, nullptr },
+ { "SurfaceEmitter", nullptr, nullptr },
+ { "TexCoordDamper", nullptr, nullptr },
+ { "TextureProperties", nullptr, nullptr },
+ { "TransformSensor", nullptr, nullptr },
+ { "TwoSidedMaterial", nullptr, nullptr },
+ { "UniversalJoint", nullptr, nullptr },
+ { "ViewpointGroup", nullptr, nullptr },
+ { "Viewport", nullptr, nullptr },
+ { "VolumeEmitter", nullptr, nullptr },
+ { "VolumePickSensor", nullptr, nullptr },
+ { "WindPhysicsModel", nullptr, nullptr }
+};
+
+static const FIQName attributeNameTable_3_2[] = {
+ { "DEF", nullptr, nullptr },
+ { "USE", nullptr, nullptr },
+ { "containerField", nullptr, nullptr },
+ { "fromNode", nullptr, nullptr },
+ { "fromField", nullptr, nullptr },
+ { "toNode", nullptr, nullptr },
+ { "toField", nullptr, nullptr },
+ { "name", nullptr, nullptr },
+ { "value", nullptr, nullptr },
+ { "color", nullptr, nullptr },
+ { "colorIndex", nullptr, nullptr },
+ { "coordIndex", nullptr, nullptr },
+ { "texCoordIndex", nullptr, nullptr },
+ { "normalIndex", nullptr, nullptr },
+ { "colorPerVertex", nullptr, nullptr },
+ { "normalPerVertex", nullptr, nullptr },
+ { "rotation", nullptr, nullptr },
+ { "scale", nullptr, nullptr },
+ { "center", nullptr, nullptr },
+ { "scaleOrientation", nullptr, nullptr },
+ { "translation", nullptr, nullptr },
+ { "url", nullptr, nullptr },
+ { "repeatS", nullptr, nullptr },
+ { "repeatT", nullptr, nullptr },
+ { "point", nullptr, nullptr },
+ { "vector", nullptr, nullptr },
+ { "range", nullptr, nullptr },
+ { "ambientIntensity", nullptr, nullptr },
+ { "diffuseColor", nullptr, nullptr },
+ { "emissiveColor", nullptr, nullptr },
+ { "shininess", nullptr, nullptr },
+ { "specularColor", nullptr, nullptr },
+ { "transparency", nullptr, nullptr },
+ { "whichChoice", nullptr, nullptr },
+ { "index", nullptr, nullptr },
+ { "mode", nullptr, nullptr },
+ { "source", nullptr, nullptr },
+ { "function", nullptr, nullptr },
+ { "alpha", nullptr, nullptr },
+ { "vertexCount", nullptr, nullptr },
+ { "radius", nullptr, nullptr },
+ { "size", nullptr, nullptr },
+ { "height", nullptr, nullptr },
+ { "solid", nullptr, nullptr },
+ { "ccw", nullptr, nullptr },
+ { "key", nullptr, nullptr },
+ { "keyValue", nullptr, nullptr },
+ { "enabled", nullptr, nullptr },
+ { "direction", nullptr, nullptr },
+ { "position", nullptr, nullptr },
+ { "orientation", nullptr, nullptr },
+ { "bboxCenter", nullptr, nullptr },
+ { "bboxSize", nullptr, nullptr },
+ { "AS", nullptr, nullptr },
+ { "InlineDEF", nullptr, nullptr },
+ { "accessType", nullptr, nullptr },
+ { "actionKeyPress", nullptr, nullptr },
+ { "actionKeyRelease", nullptr, nullptr },
+ { "address", nullptr, nullptr },
+ { "altKey", nullptr, nullptr },
+ { "antennaLocation", nullptr, nullptr },
+ { "antennaPatternLength", nullptr, nullptr },
+ { "antennaPatternType", nullptr, nullptr },
+ { "applicationID", nullptr, nullptr },
+ { "articulationParameterArray", nullptr, nullptr },
+ { "articulationParameterChangeIndicatorArray", nullptr, nullptr },
+ { "articulationParameterCount", nullptr, nullptr },
+ { "articulationParameterDesignatorArray", nullptr, nullptr },
+ { "articulationParameterIdPartAttachedArray", nullptr, nullptr },
+ { "articulationParameterTypeArray", nullptr, nullptr },
+ { "attenuation", nullptr, nullptr },
+ { "autoOffset", nullptr, nullptr },
+ { "avatarSize", nullptr, nullptr },
+ { "axisOfRotation", nullptr, nullptr },
+ { "backUrl", nullptr, nullptr },
+ { "beamWidth", nullptr, nullptr },
+ { "beginCap", nullptr, nullptr },
+ { "bindTime", nullptr, nullptr },
+ { "bottom", nullptr, nullptr },
+ { "bottomRadius", nullptr, nullptr },
+ { "bottomUrl", nullptr, nullptr },
+ { "centerOfMass", nullptr, nullptr },
+ { "centerOfRotation", nullptr, nullptr },
+ { "child1Url", nullptr, nullptr },
+ { "child2Url", nullptr, nullptr },
+ { "child3Url", nullptr, nullptr },
+ { "child4Url", nullptr, nullptr },
+ { "class", nullptr, nullptr },
+ { "closureType", nullptr, nullptr },
+ { "collideTime", nullptr, nullptr },
+ { "content", nullptr, nullptr },
+ { "controlKey", nullptr, nullptr },
+ { "controlPoint", nullptr, nullptr },
+ { "convex", nullptr, nullptr },
+ { "coordinateSystem", nullptr, nullptr },
+ { "copyright", nullptr, nullptr },
+ { "creaseAngle", nullptr, nullptr },
+ { "crossSection", nullptr, nullptr },
+ { "cryptoKeyID", nullptr, nullptr },
+ { "cryptoSystem", nullptr, nullptr },
+ { "cutOffAngle", nullptr, nullptr },
+ { "cycleInterval", nullptr, nullptr },
+ { "cycleTime", nullptr, nullptr },
+ { "data", nullptr, nullptr },
+ { "dataFormat", nullptr, nullptr },
+ { "dataLength", nullptr, nullptr },
+ { "dataUrl", nullptr, nullptr },
+ { "date", nullptr, nullptr },
+ { "deadReckoning", nullptr, nullptr },
+ { "deletionAllowed", nullptr, nullptr },
+ { "description", nullptr, nullptr },
+ { "detonateTime", nullptr, nullptr },
+ { "dir", nullptr, nullptr },
+ { "directOutput", nullptr, nullptr },
+ { "diskAngle", nullptr, nullptr },
+ { "displacements", nullptr, nullptr },
+ { "documentation", nullptr, nullptr },
+ { "elapsedTime", nullptr, nullptr },
+ { "ellipsoid", nullptr, nullptr },
+ { "encodingScheme", nullptr, nullptr },
+ { "endAngle", nullptr, nullptr },
+ { "endCap", nullptr, nullptr },
+ { "enterTime", nullptr, nullptr },
+ { "enteredText", nullptr, nullptr },
+ { "entityCategory", nullptr, nullptr },
+ { "entityCountry", nullptr, nullptr },
+ { "entityDomain", nullptr, nullptr },
+ { "entityExtra", nullptr, nullptr },
+ { "entityID", nullptr, nullptr },
+ { "entityKind", nullptr, nullptr },
+ { "entitySpecific", nullptr, nullptr },
+ { "entitySubCategory", nullptr, nullptr },
+ { "exitTime", nullptr, nullptr },
+ { "extent", nullptr, nullptr },
+ { "family", nullptr, nullptr },
+ { "fanCount", nullptr, nullptr },
+ { "fieldOfView", nullptr, nullptr },
+ { "filled", nullptr, nullptr },
+ { "finalText", nullptr, nullptr },
+ { "fireMissionIndex", nullptr, nullptr },
+ { "fired1", nullptr, nullptr },
+ { "fired2", nullptr, nullptr },
+ { "firedTime", nullptr, nullptr },
+ { "firingRange", nullptr, nullptr },
+ { "firingRate", nullptr, nullptr },
+ { "fogType", nullptr, nullptr },
+ { "forceID", nullptr, nullptr },
+ { "frequency", nullptr, nullptr },
+ { "frontUrl", nullptr, nullptr },
+ { "fuse", nullptr, nullptr },
+ { "geoCoords", nullptr, nullptr },
+ { "geoGridOrigin", nullptr, nullptr },
+ { "geoSystem", nullptr, nullptr },
+ { "groundAngle", nullptr, nullptr },
+ { "groundColor", nullptr, nullptr },
+ { "hatchColor", nullptr, nullptr },
+ { "hatchStyle", nullptr, nullptr },
+ { "hatched", nullptr, nullptr },
+ { "headlight", nullptr, nullptr },
+ { "horizontal", nullptr, nullptr },
+ { "horizontalDatum", nullptr, nullptr },
+ { "http-equiv", nullptr, nullptr },
+ { "image", nullptr, nullptr },
+ { "importedDEF", nullptr, nullptr },
+ { "info", nullptr, nullptr },
+ { "innerRadius", nullptr, nullptr },
+ { "inputFalse", nullptr, nullptr },
+ { "inputNegate", nullptr, nullptr },
+ { "inputSource", nullptr, nullptr },
+ { "inputTrue", nullptr, nullptr },
+ { "integerKey", nullptr, nullptr },
+ { "intensity", nullptr, nullptr },
+ { "jump", nullptr, nullptr },
+ { "justify", nullptr, nullptr },
+ { "keyPress", nullptr, nullptr },
+ { "keyRelease", nullptr, nullptr },
+ { "knot", nullptr, nullptr },
+ { "lang", nullptr, nullptr },
+ { "language", nullptr, nullptr },
+ { "leftToRight", nullptr, nullptr },
+ { "leftUrl", nullptr, nullptr },
+ { "length", nullptr, nullptr },
+ { "lengthOfModulationParameters", nullptr, nullptr },
+ { "level", nullptr, nullptr },
+ { "limitOrientation", nullptr, nullptr },
+ { "lineSegments", nullptr, nullptr },
+ { "linearAcceleration", nullptr, nullptr },
+ { "linearVelocity", nullptr, nullptr },
+ { "linetype", nullptr, nullptr },
+ { "linewidthScaleFactor", nullptr, nullptr },
+ { "llimit", nullptr, nullptr },
+ { "load", nullptr, nullptr },
+ { "loadTime", nullptr, nullptr },
+ { "localDEF", nullptr, nullptr },
+ { "location", nullptr, nullptr },
+ { "loop", nullptr, nullptr },
+ { "marking", nullptr, nullptr },
+ { "mass", nullptr, nullptr },
+ { "maxAngle", nullptr, nullptr },
+ { "maxBack", nullptr, nullptr },
+ { "maxExtent", nullptr, nullptr },
+ { "maxFront", nullptr, nullptr },
+ { "maxPosition", nullptr, nullptr },
+ { "metadataFormat", nullptr, nullptr },
+ { "minAngle", nullptr, nullptr },
+ { "minBack", nullptr, nullptr },
+ { "minFront", nullptr, nullptr },
+ { "minPosition", nullptr, nullptr },
+ { "modulationTypeDetail", nullptr, nullptr },
+ { "modulationTypeMajor", nullptr, nullptr },
+ { "modulationTypeSpreadSpectrum", nullptr, nullptr },
+ { "modulationTypeSystem", nullptr, nullptr },
+ { "momentsOfInertia", nullptr, nullptr },
+ { "multicastRelayHost", nullptr, nullptr },
+ { "multicastRelayPort", nullptr, nullptr },
+ { "munitionApplicationID", nullptr, nullptr },
+ { "munitionEndPoint", nullptr, nullptr },
+ { "munitionEntityID", nullptr, nullptr },
+ { "munitionQuantity", nullptr, nullptr },
+ { "munitionSiteID", nullptr, nullptr },
+ { "munitionStartPoint", nullptr, nullptr },
+ { "mustEvaluate", nullptr, nullptr },
+ { "navType", nullptr, nullptr },
+ { "networkMode", nullptr, nullptr },
+ { "next", nullptr, nullptr },
+ { "nodeField", nullptr, nullptr },
+ { "offset", nullptr, nullptr },
+ { "on", nullptr, nullptr },
+ { "order", nullptr, nullptr },
+ { "originator", nullptr, nullptr },
+ { "outerRadius", nullptr, nullptr },
+ { "parameter", nullptr, nullptr },
+ { "pauseTime", nullptr, nullptr },
+ { "pitch", nullptr, nullptr },
+ { "points", nullptr, nullptr },
+ { "port", nullptr, nullptr },
+ { "power", nullptr, nullptr },
+ { "previous", nullptr, nullptr },
+ { "priority", nullptr, nullptr },
+ { "profile", nullptr, nullptr },
+ { "progress", nullptr, nullptr },
+ { "protoField", nullptr, nullptr },
+ { "radioEntityTypeCategory", nullptr, nullptr },
+ { "radioEntityTypeCountry", nullptr, nullptr },
+ { "radioEntityTypeDomain", nullptr, nullptr },
+ { "radioEntityTypeKind", nullptr, nullptr },
+ { "radioEntityTypeNomenclature", nullptr, nullptr },
+ { "radioEntityTypeNomenclatureVersion", nullptr, nullptr },
+ { "radioID", nullptr, nullptr },
+ { "readInterval", nullptr, nullptr },
+ { "receivedPower", nullptr, nullptr },
+ { "receiverState", nullptr, nullptr },
+ { "reference", nullptr, nullptr },
+ { "relativeAntennaLocation", nullptr, nullptr },
+ { "resolution", nullptr, nullptr },
+ { "resumeTime", nullptr, nullptr },
+ { "rightUrl", nullptr, nullptr },
+ { "rootUrl", nullptr, nullptr },
+ { "rotateYUp", nullptr, nullptr },
+ { "rtpHeaderExpected", nullptr, nullptr },
+ { "sampleRate", nullptr, nullptr },
+ { "samples", nullptr, nullptr },
+ { "shiftKey", nullptr, nullptr },
+ { "side", nullptr, nullptr },
+ { "siteID", nullptr, nullptr },
+ { "skinCoordIndex", nullptr, nullptr },
+ { "skinCoordWeight", nullptr, nullptr },
+ { "skyAngle", nullptr, nullptr },
+ { "skyColor", nullptr, nullptr },
+ { "spacing", nullptr, nullptr },
+ { "spatialize", nullptr, nullptr },
+ { "speed", nullptr, nullptr },
+ { "speedFactor", nullptr, nullptr },
+ { "spine", nullptr, nullptr },
+ { "startAngle", nullptr, nullptr },
+ { "startTime", nullptr, nullptr },
+ { "stiffness", nullptr, nullptr },
+ { "stopTime", nullptr, nullptr },
+ { "string", nullptr, nullptr },
+ { "stripCount", nullptr, nullptr },
+ { "style", nullptr, nullptr },
+ { "summary", nullptr, nullptr },
+ { "tdlType", nullptr, nullptr },
+ { "tessellation", nullptr, nullptr },
+ { "tessellationScale", nullptr, nullptr },
+ { "time", nullptr, nullptr },
+ { "timeOut", nullptr, nullptr },
+ { "timestamp", nullptr, nullptr },
+ { "title", nullptr, nullptr },
+ { "toggle", nullptr, nullptr },
+ { "top", nullptr, nullptr },
+ { "topToBottom", nullptr, nullptr },
+ { "topUrl", nullptr, nullptr },
+ { "touchTime", nullptr, nullptr },
+ { "transmitFrequencyBandwidth", nullptr, nullptr },
+ { "transmitState", nullptr, nullptr },
+ { "transmitterApplicationID", nullptr, nullptr },
+ { "transmitterEntityID", nullptr, nullptr },
+ { "transmitterRadioID", nullptr, nullptr },
+ { "transmitterSiteID", nullptr, nullptr },
+ { "transparent", nullptr, nullptr },
+ { "triggerTime", nullptr, nullptr },
+ { "triggerTrue", nullptr, nullptr },
+ { "triggerValue", nullptr, nullptr },
+ { "type", nullptr, nullptr },
+ { "uDimension", nullptr, nullptr },
+ { "uKnot", nullptr, nullptr },
+ { "uOrder", nullptr, nullptr },
+ { "uTessellation", nullptr, nullptr },
+ { "ulimit", nullptr, nullptr },
+ { "vDimension", nullptr, nullptr },
+ { "vKnot", nullptr, nullptr },
+ { "vOrder", nullptr, nullptr },
+ { "vTessellation", nullptr, nullptr },
+ { "version", nullptr, nullptr },
+ { "verticalDatum", nullptr, nullptr },
+ { "vertices", nullptr, nullptr },
+ { "visibilityLimit", nullptr, nullptr },
+ { "visibilityRange", nullptr, nullptr },
+ { "warhead", nullptr, nullptr },
+ { "weight", nullptr, nullptr },
+ { "whichGeometry", nullptr, nullptr },
+ { "writeInterval", nullptr, nullptr },
+ { "xDimension", nullptr, nullptr },
+ { "xSpacing", nullptr, nullptr },
+ { "yScale", nullptr, nullptr },
+ { "zDimension", nullptr, nullptr },
+ { "zSpacing", nullptr, nullptr },
+ { "visible", nullptr, nullptr },
+ { "repeatR", nullptr, nullptr },
+ { "texture", nullptr, nullptr },
+ { "back", nullptr, nullptr },
+ { "front", nullptr, nullptr },
+ { "left", nullptr, nullptr },
+ { "right", nullptr, nullptr },
+ { "parts", nullptr, nullptr },
+ { "isSelected", nullptr, nullptr },
+ { "isValid", nullptr, nullptr },
+ { "numComponents", nullptr, nullptr },
+ { "depth", nullptr, nullptr },
+ { "update", nullptr, nullptr },
+ { "fogCoord", nullptr, nullptr },
+ { "texCoord", nullptr, nullptr },
+ { "activate", nullptr, nullptr },
+ { "programs", nullptr, nullptr },
+ { "matrix", nullptr, nullptr },
+ { "anchorPoint", nullptr, nullptr },
+ { "body1", nullptr, nullptr },
+ { "body2", nullptr, nullptr },
+ { "mustOutput", nullptr, nullptr },
+ { "body1AnchorPoint", nullptr, nullptr },
+ { "body2AnchorPoint", nullptr, nullptr },
+ { "plane", nullptr, nullptr },
+ { "appliedParameters", nullptr, nullptr },
+ { "bounce", nullptr, nullptr },
+ { "frictionCoefficients", nullptr, nullptr },
+ { "minBounceSpeed", nullptr, nullptr },
+ { "slipFactors", nullptr, nullptr },
+ { "softnessConstantForceMix", nullptr, nullptr },
+ { "softnessErrorCorrection", nullptr, nullptr },
+ { "surfaceSpeed", nullptr, nullptr },
+ { "isActive", nullptr, nullptr },
+ { "useGeometry", nullptr, nullptr },
+ { "set_destination", nullptr, nullptr },
+ { "set_value", nullptr, nullptr },
+ { "tau", nullptr, nullptr },
+ { "tolerance", nullptr, nullptr },
+ { "value_changed", nullptr, nullptr },
+ { "initialDestination", nullptr, nullptr },
+ { "initialValue", nullptr, nullptr },
+ { "angle", nullptr, nullptr },
+ { "variation", nullptr, nullptr },
+ { "surfaceArea", nullptr, nullptr },
+ { "frictionDirection", nullptr, nullptr },
+ { "slipCoefficients", nullptr, nullptr },
+ { "category", nullptr, nullptr },
+ { "country", nullptr, nullptr },
+ { "domain", nullptr, nullptr },
+ { "extra", nullptr, nullptr },
+ { "kind", nullptr, nullptr },
+ { "specific", nullptr, nullptr },
+ { "subcategory", nullptr, nullptr },
+ { "axis1", nullptr, nullptr },
+ { "axis2", nullptr, nullptr },
+ { "desiredAngularVelocity1", nullptr, nullptr },
+ { "desiredAngularVelocity2", nullptr, nullptr },
+ { "maxAngle1", nullptr, nullptr },
+ { "maxTorque1", nullptr, nullptr },
+ { "maxTorque2", nullptr, nullptr },
+ { "minAngle1", nullptr, nullptr },
+ { "stopBounce1", nullptr, nullptr },
+ { "stopConstantForceMix1", nullptr, nullptr },
+ { "stopErrorCorrection1", nullptr, nullptr },
+ { "suspensionErrorCorrection", nullptr, nullptr },
+ { "suspensionForce", nullptr, nullptr },
+ { "body1Axis", nullptr, nullptr },
+ { "body2Axis", nullptr, nullptr },
+ { "hinge1Angle", nullptr, nullptr },
+ { "hinge1AngleRate", nullptr, nullptr },
+ { "hinge2Angle", nullptr, nullptr },
+ { "hinge2AngleRate", nullptr, nullptr },
+ { "set_fraction", nullptr, nullptr },
+ { "easeInEaseOut", nullptr, nullptr },
+ { "modifiedFraction_changed", nullptr, nullptr },
+ { "force", nullptr, nullptr },
+ { "geoCenter", nullptr, nullptr },
+ { "centerOfRotation_changed", nullptr, nullptr },
+ { "geoCoord_changed", nullptr, nullptr },
+ { "orientation_changed", nullptr, nullptr },
+ { "position_changed", nullptr, nullptr },
+ { "isPickable", nullptr, nullptr },
+ { "viewport", nullptr, nullptr },
+ { "activeLayer", nullptr, nullptr },
+ { "align", nullptr, nullptr },
+ { "offsetUnits", nullptr, nullptr },
+ { "scaleMode", nullptr, nullptr },
+ { "sizeUnits", nullptr, nullptr },
+ { "layout", nullptr, nullptr },
+ { "objectType", nullptr, nullptr },
+ { "pickedNormal", nullptr, nullptr },
+ { "pickedPoint", nullptr, nullptr },
+ { "pickedTextureCoordinate", nullptr, nullptr },
+ { "intersectionType", nullptr, nullptr },
+ { "sortOrder", nullptr, nullptr },
+ { "axis1Angle", nullptr, nullptr },
+ { "axis1Torque", nullptr, nullptr },
+ { "axis2Angle", nullptr, nullptr },
+ { "axis2Torque", nullptr, nullptr },
+ { "axis3Angle", nullptr, nullptr },
+ { "axis3Torque", nullptr, nullptr },
+ { "enabledAxies", nullptr, nullptr },
+ { "motor1Axis", nullptr, nullptr },
+ { "motor2Axis", nullptr, nullptr },
+ { "motor3Axis", nullptr, nullptr },
+ { "stop1Bounce", nullptr, nullptr },
+ { "stop1ErrorCorrection", nullptr, nullptr },
+ { "stop2Bounce", nullptr, nullptr },
+ { "stop2ErrorCorrection", nullptr, nullptr },
+ { "stop3Bounce", nullptr, nullptr },
+ { "stop3ErrorCorrection", nullptr, nullptr },
+ { "motor1Angle", nullptr, nullptr },
+ { "motor1AngleRate", nullptr, nullptr },
+ { "motor2Angle", nullptr, nullptr },
+ { "motor2AngleRate", nullptr, nullptr },
+ { "motor3Angle", nullptr, nullptr },
+ { "motor3AngleRate", nullptr, nullptr },
+ { "autoCalc", nullptr, nullptr },
+ { "duration", nullptr, nullptr },
+ { "retainUserOffsets", nullptr, nullptr },
+ { "isBound", nullptr, nullptr },
+ { "appearance", nullptr, nullptr },
+ { "createParticles", nullptr, nullptr },
+ { "lifetimeVariation", nullptr, nullptr },
+ { "maxParticles", nullptr, nullptr },
+ { "particleLifetime", nullptr, nullptr },
+ { "particleSize", nullptr, nullptr },
+ { "colorKey", nullptr, nullptr },
+ { "geometryType", nullptr, nullptr },
+ { "texCoordKey", nullptr, nullptr },
+ { "pickable", nullptr, nullptr },
+ { "angularDampingFactor", nullptr, nullptr },
+ { "angularVelocity", nullptr, nullptr },
+ { "autoDamp", nullptr, nullptr },
+ { "autoDisable", nullptr, nullptr },
+ { "disableAngularSpeed", nullptr, nullptr },
+ { "disableLinearSpeed", nullptr, nullptr },
+ { "disableTime", nullptr, nullptr },
+ { "finiteRotationAxis", nullptr, nullptr },
+ { "fixed", nullptr, nullptr },
+ { "forces", nullptr, nullptr },
+ { "inertia", nullptr, nullptr },
+ { "linearDampingFactor", nullptr, nullptr },
+ { "torques", nullptr, nullptr },
+ { "useFiniteRotation", nullptr, nullptr },
+ { "useGlobalForce", nullptr, nullptr },
+ { "constantForceMix", nullptr, nullptr },
+ { "constantSurfaceThickness", nullptr, nullptr },
+ { "errorCorrection", nullptr, nullptr },
+ { "iterations", nullptr, nullptr },
+ { "maxCorrectionSpeed", nullptr, nullptr },
+ { "preferAccuracy", nullptr, nullptr },
+ { "pointSize", nullptr, nullptr },
+ { "stopBounce", nullptr, nullptr },
+ { "stopErrorCorrection", nullptr, nullptr },
+ { "angleRate", nullptr, nullptr },
+ { "maxSeparation", nullptr, nullptr },
+ { "minSeparation", nullptr, nullptr },
+ { "separation", nullptr, nullptr },
+ { "separationRate", nullptr, nullptr },
+ { "closed", nullptr, nullptr },
+ { "keyVelocity", nullptr, nullptr },
+ { "normalizeVelocity", nullptr, nullptr },
+ { "surface", nullptr, nullptr },
+ { "anisotropicDegree", nullptr, nullptr },
+ { "borderColor", nullptr, nullptr },
+ { "borderWidth", nullptr, nullptr },
+ { "boundaryModeS", nullptr, nullptr },
+ { "boundaryModeT", nullptr, nullptr },
+ { "boundaryModeR", nullptr, nullptr },
+ { "magnificationFilter", nullptr, nullptr },
+ { "minificationFilter", nullptr, nullptr },
+ { "textureCompression", nullptr, nullptr },
+ { "texturePriority", nullptr, nullptr },
+ { "generateMipMaps", nullptr, nullptr },
+ { "targetObject", nullptr, nullptr },
+ { "backAmbientIntensity", nullptr, nullptr },
+ { "backDiffuseColor", nullptr, nullptr },
+ { "backEmissiveColor", nullptr, nullptr },
+ { "backShininess", nullptr, nullptr },
+ { "backSpecularColor", nullptr, nullptr },
+ { "separateBackColor", nullptr, nullptr },
+ { "displayed", nullptr, nullptr },
+ { "clipBoundary", nullptr, nullptr },
+ { "internal", nullptr, nullptr },
+ { "gustiness", nullptr, nullptr },
+ { "turbulence", nullptr, nullptr }
+};
+
+FIVocabulary X3D_vocabulary_3_2 = {
+ nullptr, 0,
+ encodingAlgorithmTable_3_2, 8,
+ nullptr, 0,
+ nullptr, 0,
+ nullptr, 0,
+ nullptr, 0,
+ nullptr, 0,
+ attributeValueTable_3_2, 2,
+ nullptr, 0,
+ nullptr, 0,
+ elementNameTable_3_2, 233,
+ attributeNameTable_3_2, 516
+};
+
+static const char *encodingAlgorithmTable_3_3[] = {
+ "encoder://web3d.org/QuantizedFloatArrayEncoder",
+ "encoder://web3d.org/DeltazlibIntArrayEncoder",
+ "encoder://web3d.org/QuantizedzlibFloatArrayEncoder",
+ "encoder://web3d.org/zlibFloatArrayEncoder",
+ "encoder://web3d.org/QuantizedDoubleArrayEncoder",
+ "encoder://web3d.org/zlibDoubleArrayEncoder",
+ "encoder://web3d.org/QuantizedzlibDoubleArrayEncoder",
+ "encoder://web3d.org/RangeIntArrayEncoder"
+};
+
+static const std::shared_ptr<const FIValue> attributeValueTable_3_3[] = {
+ FIStringValue::create("false"),
+ FIStringValue::create("true")
+};
+
+static const FIQName elementNameTable_3_3[] = {
+ { "Shape", nullptr, nullptr },
+ { "Appearance", nullptr, nullptr },
+ { "Material", nullptr, nullptr },
+ { "IndexedFaceSet", nullptr, nullptr },
+ { "ProtoInstance", nullptr, nullptr },
+ { "Transform", nullptr, nullptr },
+ { "ImageTexture", nullptr, nullptr },
+ { "TextureTransform", nullptr, nullptr },
+ { "Coordinate", nullptr, nullptr },
+ { "Normal", nullptr, nullptr },
+ { "Color", nullptr, nullptr },
+ { "ColorRGBA", nullptr, nullptr },
+ { "TextureCoordinate", nullptr, nullptr },
+ { "ROUTE", nullptr, nullptr },
+ { "fieldValue", nullptr, nullptr },
+ { "Group", nullptr, nullptr },
+ { "LOD", nullptr, nullptr },
+ { "Switch", nullptr, nullptr },
+ { "Script", nullptr, nullptr },
+ { "IndexedTriangleFanSet", nullptr, nullptr },
+ { "IndexedTriangleSet", nullptr, nullptr },
+ { "IndexedTriangleStripSet", nullptr, nullptr },
+ { "MultiTexture", nullptr, nullptr },
+ { "MultiTextureCoordinate", nullptr, nullptr },
+ { "MultiTextureTransform", nullptr, nullptr },
+ { "IndexedLineSet", nullptr, nullptr },
+ { "PointSet", nullptr, nullptr },
+ { "StaticGroup", nullptr, nullptr },
+ { "Sphere", nullptr, nullptr },
+ { "Box", nullptr, nullptr },
+ { "Cone", nullptr, nullptr },
+ { "Anchor", nullptr, nullptr },
+ { "Arc2D", nullptr, nullptr },
+ { "ArcClose2D", nullptr, nullptr },
+ { "AudioClip", nullptr, nullptr },
+ { "Background", nullptr, nullptr },
+ { "Billboard", nullptr, nullptr },
+ { "BooleanFilter", nullptr, nullptr },
+ { "BooleanSequencer", nullptr, nullptr },
+ { "BooleanToggle", nullptr, nullptr },
+ { "BooleanTrigger", nullptr, nullptr },
+ { "Circle2D", nullptr, nullptr },
+ { "Collision", nullptr, nullptr },
+ { "ColorInterpolator", nullptr, nullptr },
+ { "Contour2D", nullptr, nullptr },
+ { "ContourPolyline2D", nullptr, nullptr },
+ { "CoordinateDouble", nullptr, nullptr },
+ { "CoordinateInterpolator", nullptr, nullptr },
+ { "CoordinateInterpolator2D", nullptr, nullptr },
+ { "Cylinder", nullptr, nullptr },
+ { "CylinderSensor", nullptr, nullptr },
+ { "DirectionalLight", nullptr, nullptr },
+ { "Disk2D", nullptr, nullptr },
+ { "EXPORT", nullptr, nullptr },
+ { "ElevationGrid", nullptr, nullptr },
+ { "EspduTransform", nullptr, nullptr },
+ { "ExternProtoDeclare", nullptr, nullptr },
+ { "Extrusion", nullptr, nullptr },
+ { "FillProperties", nullptr, nullptr },
+ { "Fog", nullptr, nullptr },
+ { "FontStyle", nullptr, nullptr },
+ { "GeoCoordinate", nullptr, nullptr },
+ { "GeoElevationGrid", nullptr, nullptr },
+ { "GeoLOD", nullptr, nullptr },
+ { "GeoLocation", nullptr, nullptr },
+ { "GeoMetadata", nullptr, nullptr },
+ { "GeoOrigin", nullptr, nullptr },
+ { "GeoPositionInterpolator", nullptr, nullptr },
+ { "GeoTouchSensor", nullptr, nullptr },
+ { "GeoViewpoint", nullptr, nullptr },
+ { "HAnimDisplacer", nullptr, nullptr },
+ { "HAnimHumanoid", nullptr, nullptr },
+ { "HAnimJoint", nullptr, nullptr },
+ { "HAnimSegment", nullptr, nullptr },
+ { "HAnimSite", nullptr, nullptr },
+ { "IMPORT", nullptr, nullptr },
+ { "IS", nullptr, nullptr },
+ { "Inline", nullptr, nullptr },
+ { "IntegerSequencer", nullptr, nullptr },
+ { "IntegerTrigger", nullptr, nullptr },
+ { "KeySensor", nullptr, nullptr },
+ { "LineProperties", nullptr, nullptr },
+ { "LineSet", nullptr, nullptr },
+ { "LoadSensor", nullptr, nullptr },
+ { "MetadataDouble", nullptr, nullptr },
+ { "MetadataFloat", nullptr, nullptr },
+ { "MetadataInteger", nullptr, nullptr },
+ { "MetadataSet", nullptr, nullptr },
+ { "MetadataString", nullptr, nullptr },
+ { "MovieTexture", nullptr, nullptr },
+ { "NavigationInfo", nullptr, nullptr },
+ { "NormalInterpolator", nullptr, nullptr },
+ { "NurbsCurve", nullptr, nullptr },
+ { "NurbsCurve2D", nullptr, nullptr },
+ { "NurbsOrientationInterpolator", nullptr, nullptr },
+ { "NurbsPatchSurface", nullptr, nullptr },
+ { "NurbsPositionInterpolator", nullptr, nullptr },
+ { "NurbsSet", nullptr, nullptr },
+ { "NurbsSurfaceInterpolator", nullptr, nullptr },
+ { "NurbsSweptSurface", nullptr, nullptr },
+ { "NurbsSwungSurface", nullptr, nullptr },
+ { "NurbsTextureCoordinate", nullptr, nullptr },
+ { "NurbsTrimmedSurface", nullptr, nullptr },
+ { "OrientationInterpolator", nullptr, nullptr },
+ { "PixelTexture", nullptr, nullptr },
+ { "PlaneSensor", nullptr, nullptr },
+ { "PointLight", nullptr, nullptr },
+ { "Polyline2D", nullptr, nullptr },
+ { "Polypoint2D", nullptr, nullptr },
+ { "PositionInterpolator", nullptr, nullptr },
+ { "PositionInterpolator2D", nullptr, nullptr },
+ { "ProtoBody", nullptr, nullptr },
+ { "ProtoDeclare", nullptr, nullptr },
+ { "ProtoInterface", nullptr, nullptr },
+ { "ProximitySensor", nullptr, nullptr },
+ { "ReceiverPdu", nullptr, nullptr },
+ { "Rectangle2D", nullptr, nullptr },
+ { "ScalarInterpolator", nullptr, nullptr },
+ { "Scene", nullptr, nullptr },
+ { "SignalPdu", nullptr, nullptr },
+ { "Sound", nullptr, nullptr },
+ { "SphereSensor", nullptr, nullptr },
+ { "SpotLight", nullptr, nullptr },
+ { "StringSensor", nullptr, nullptr },
+ { "Text", nullptr, nullptr },
+ { "TextureBackground", nullptr, nullptr },
+ { "TextureCoordinateGenerator", nullptr, nullptr },
+ { "TimeSensor", nullptr, nullptr },
+ { "TimeTrigger", nullptr, nullptr },
+ { "TouchSensor", nullptr, nullptr },
+ { "TransmitterPdu", nullptr, nullptr },
+ { "TriangleFanSet", nullptr, nullptr },
+ { "TriangleSet", nullptr, nullptr },
+ { "TriangleSet2D", nullptr, nullptr },
+ { "TriangleStripSet", nullptr, nullptr },
+ { "Viewpoint", nullptr, nullptr },
+ { "VisibilitySensor", nullptr, nullptr },
+ { "WorldInfo", nullptr, nullptr },
+ { "X3D", nullptr, nullptr },
+ { "component", nullptr, nullptr },
+ { "connect", nullptr, nullptr },
+ { "field", nullptr, nullptr },
+ { "head", nullptr, nullptr },
+ { "humanoidBodyType", nullptr, nullptr },
+ { "meta", nullptr, nullptr },
+ { "CADAssembly", nullptr, nullptr },
+ { "CADFace", nullptr, nullptr },
+ { "CADLayer", nullptr, nullptr },
+ { "CADPart", nullptr, nullptr },
+ { "ComposedCubeMapTexture", nullptr, nullptr },
+ { "ComposedShader", nullptr, nullptr },
+ { "ComposedTexture3D", nullptr, nullptr },
+ { "FloatVertexAttribute", nullptr, nullptr },
+ { "FogCoordinate", nullptr, nullptr },
+ { "GeneratedCubeMapTexture", nullptr, nullptr },
+ { "ImageCubeMapTexture", nullptr, nullptr },
+ { "ImageTexture3D", nullptr, nullptr },
+ { "IndexedQuadSet", nullptr, nullptr },
+ { "LocalFog", nullptr, nullptr },
+ { "Matrix3VertexAttribute", nullptr, nullptr },
+ { "Matrix4VertexAttribute", nullptr, nullptr },
+ { "PackagedShader", nullptr, nullptr },
+ { "PixelTexture3D", nullptr, nullptr },
+ { "ProgramShader", nullptr, nullptr },
+ { "QuadSet", nullptr, nullptr },
+ { "ShaderPart", nullptr, nullptr },
+ { "ShaderProgram", nullptr, nullptr },
+ { "TextureCoordinate3D", nullptr, nullptr },
+ { "TextureCoordinate4D", nullptr, nullptr },
+ { "TextureTransform3D", nullptr, nullptr },
+ { "TextureTransformMatrix3D", nullptr, nullptr },
+ { "BallJoint", nullptr, nullptr },
+ { "BoundedPhysicsModel", nullptr, nullptr },
+ { "ClipPlane", nullptr, nullptr },
+ { "CollidableOffset", nullptr, nullptr },
+ { "CollidableShape", nullptr, nullptr },
+ { "CollisionCollection", nullptr, nullptr },
+ { "CollisionSensor", nullptr, nullptr },
+ { "CollisionSpace", nullptr, nullptr },
+ { "ColorDamper", nullptr, nullptr },
+ { "ConeEmitter", nullptr, nullptr },
+ { "Contact", nullptr, nullptr },
+ { "CoordinateDamper", nullptr, nullptr },
+ { "DISEntityManager", nullptr, nullptr },
+ { "DISEntityTypeMapping", nullptr, nullptr },
+ { "DoubleAxisHingeJoint", nullptr, nullptr },
+ { "EaseInEaseOut", nullptr, nullptr },
+ { "ExplosionEmitter", nullptr, nullptr },
+ { "ForcePhysicsModel", nullptr, nullptr },
+ { "GeoProximitySensor", nullptr, nullptr },
+ { "GeoTransform", nullptr, nullptr },
+ { "Layer", nullptr, nullptr },
+ { "LayerSet", nullptr, nullptr },
+ { "Layout", nullptr, nullptr },
+ { "LayoutGroup", nullptr, nullptr },
+ { "LayoutLayer", nullptr, nullptr },
+ { "LinePickSensor", nullptr, nullptr },
+ { "MotorJoint", nullptr, nullptr },
+ { "OrientationChaser", nullptr, nullptr },
+ { "OrientationDamper", nullptr, nullptr },
+ { "OrthoViewpoint", nullptr, nullptr },
+ { "ParticleSystem", nullptr, nullptr },
+ { "PickableGroup", nullptr, nullptr },
+ { "PointEmitter", nullptr, nullptr },
+ { "PointPickSensor", nullptr, nullptr },
+ { "PolylineEmitter", nullptr, nullptr },
+ { "PositionChaser", nullptr, nullptr },
+ { "PositionChaser2D", nullptr, nullptr },
+ { "PositionDamper", nullptr, nullptr },
+ { "PositionDamper2D", nullptr, nullptr },
+ { "PrimitivePickSensor", nullptr, nullptr },
+ { "RigidBody", nullptr, nullptr },
+ { "RigidBodyCollection", nullptr, nullptr },
+ { "ScalarChaser", nullptr, nullptr },
+ { "ScreenFontStyle", nullptr, nullptr },
+ { "ScreenGroup", nullptr, nullptr },
+ { "SingleAxisHingeJoint", nullptr, nullptr },
+ { "SliderJoint", nullptr, nullptr },
+ { "SplinePositionInterpolator", nullptr, nullptr },
+ { "SplinePositionInterpolator2D", nullptr, nullptr },
+ { "SplineScalarInterpolator", nullptr, nullptr },
+ { "SquadOrientationInterpolator", nullptr, nullptr },
+ { "SurfaceEmitter", nullptr, nullptr },
+ { "TexCoordDamper2D", nullptr, nullptr },
+ { "TextureProperties", nullptr, nullptr },
+ { "TransformSensor", nullptr, nullptr },
+ { "TwoSidedMaterial", nullptr, nullptr },
+ { "UniversalJoint", nullptr, nullptr },
+ { "ViewpointGroup", nullptr, nullptr },
+ { "Viewport", nullptr, nullptr },
+ { "VolumeEmitter", nullptr, nullptr },
+ { "VolumePickSensor", nullptr, nullptr },
+ { "WindPhysicsModel", nullptr, nullptr },
+ { "BlendedVolumeStyle", nullptr, nullptr },
+ { "BoundaryEnhancementVolumeStyle", nullptr, nullptr },
+ { "CartoonVolumeStyle", nullptr, nullptr },
+ { "ComposedVolumeStyle", nullptr, nullptr },
+ { "EdgeEnhancementVolumeStyle", nullptr, nullptr },
+ { "IsoSurfaceVolumeData", nullptr, nullptr },
+ { "MetadataBoolean", nullptr, nullptr },
+ { "OpacityMapVolumeStyle", nullptr, nullptr },
+ { "ProjectionVolumeStyle", nullptr, nullptr },
+ { "SegmentedVolumeData", nullptr, nullptr },
+ { "ShadedVolumeStyle", nullptr, nullptr },
+ { "SilhouetteEnhancementVolumeStyle", nullptr, nullptr },
+ { "ToneMappedVolumeStyle", nullptr, nullptr },
+ { "VolumeData", nullptr, nullptr },
+ { "ColorChaser", nullptr, nullptr },
+ { "CoordinateChaser", nullptr, nullptr },
+ { "ScalarDamper", nullptr, nullptr },
+ { "TexCoordChaser2D", nullptr, nullptr },
+ { "unit", nullptr, nullptr }
+};
+
+static const FIQName attributeNameTable_3_3[] = {
+ { "DEF", nullptr, nullptr },
+ { "USE", nullptr, nullptr },
+ { "containerField", nullptr, nullptr },
+ { "fromNode", nullptr, nullptr },
+ { "fromField", nullptr, nullptr },
+ { "toNode", nullptr, nullptr },
+ { "toField", nullptr, nullptr },
+ { "name", nullptr, nullptr },
+ { "value", nullptr, nullptr },
+ { "color", nullptr, nullptr },
+ { "colorIndex", nullptr, nullptr },
+ { "coordIndex", nullptr, nullptr },
+ { "texCoordIndex", nullptr, nullptr },
+ { "normalIndex", nullptr, nullptr },
+ { "colorPerVertex", nullptr, nullptr },
+ { "normalPerVertex", nullptr, nullptr },
+ { "rotation", nullptr, nullptr },
+ { "scale", nullptr, nullptr },
+ { "center", nullptr, nullptr },
+ { "scaleOrientation", nullptr, nullptr },
+ { "translation", nullptr, nullptr },
+ { "url", nullptr, nullptr },
+ { "repeatS", nullptr, nullptr },
+ { "repeatT", nullptr, nullptr },
+ { "point", nullptr, nullptr },
+ { "vector", nullptr, nullptr },
+ { "range", nullptr, nullptr },
+ { "ambientIntensity", nullptr, nullptr },
+ { "diffuseColor", nullptr, nullptr },
+ { "emissiveColor", nullptr, nullptr },
+ { "shininess", nullptr, nullptr },
+ { "specularColor", nullptr, nullptr },
+ { "transparency", nullptr, nullptr },
+ { "whichChoice", nullptr, nullptr },
+ { "index", nullptr, nullptr },
+ { "mode", nullptr, nullptr },
+ { "source", nullptr, nullptr },
+ { "function", nullptr, nullptr },
+ { "alpha", nullptr, nullptr },
+ { "vertexCount", nullptr, nullptr },
+ { "radius", nullptr, nullptr },
+ { "size", nullptr, nullptr },
+ { "height", nullptr, nullptr },
+ { "solid", nullptr, nullptr },
+ { "ccw", nullptr, nullptr },
+ { "key", nullptr, nullptr },
+ { "keyValue", nullptr, nullptr },
+ { "enabled", nullptr, nullptr },
+ { "direction", nullptr, nullptr },
+ { "position", nullptr, nullptr },
+ { "orientation", nullptr, nullptr },
+ { "bboxCenter", nullptr, nullptr },
+ { "bboxSize", nullptr, nullptr },
+ { "AS", nullptr, nullptr },
+ { "InlineDEF", nullptr, nullptr },
+ { "accessType", nullptr, nullptr },
+ { "actionKeyPress", nullptr, nullptr },
+ { "actionKeyRelease", nullptr, nullptr },
+ { "address", nullptr, nullptr },
+ { "altKey", nullptr, nullptr },
+ { "antennaLocation", nullptr, nullptr },
+ { "antennaPatternLength", nullptr, nullptr },
+ { "antennaPatternType", nullptr, nullptr },
+ { "applicationID", nullptr, nullptr },
+ { "articulationParameterArray", nullptr, nullptr },
+ { "articulationParameterChangeIndicatorArray", nullptr, nullptr },
+ { "articulationParameterCount", nullptr, nullptr },
+ { "articulationParameterDesignatorArray", nullptr, nullptr },
+ { "articulationParameterIdPartAttachedArray", nullptr, nullptr },
+ { "articulationParameterTypeArray", nullptr, nullptr },
+ { "attenuation", nullptr, nullptr },
+ { "autoOffset", nullptr, nullptr },
+ { "avatarSize", nullptr, nullptr },
+ { "axisOfRotation", nullptr, nullptr },
+ { "backUrl", nullptr, nullptr },
+ { "beamWidth", nullptr, nullptr },
+ { "beginCap", nullptr, nullptr },
+ { "bindTime", nullptr, nullptr },
+ { "bottom", nullptr, nullptr },
+ { "bottomRadius", nullptr, nullptr },
+ { "bottomUrl", nullptr, nullptr },
+ { "centerOfMass", nullptr, nullptr },
+ { "centerOfRotation", nullptr, nullptr },
+ { "child1Url", nullptr, nullptr },
+ { "child2Url", nullptr, nullptr },
+ { "child3Url", nullptr, nullptr },
+ { "child4Url", nullptr, nullptr },
+ { "class", nullptr, nullptr },
+ { "closureType", nullptr, nullptr },
+ { "collideTime", nullptr, nullptr },
+ { "content", nullptr, nullptr },
+ { "controlKey", nullptr, nullptr },
+ { "controlPoint", nullptr, nullptr },
+ { "convex", nullptr, nullptr },
+ { "coordinateSystem", nullptr, nullptr },
+ { "copyright", nullptr, nullptr },
+ { "creaseAngle", nullptr, nullptr },
+ { "crossSection", nullptr, nullptr },
+ { "cryptoKeyID", nullptr, nullptr },
+ { "cryptoSystem", nullptr, nullptr },
+ { "cutOffAngle", nullptr, nullptr },
+ { "cycleInterval", nullptr, nullptr },
+ { "cycleTime", nullptr, nullptr },
+ { "data", nullptr, nullptr },
+ { "dataFormat", nullptr, nullptr },
+ { "dataLength", nullptr, nullptr },
+ { "dataUrl", nullptr, nullptr },
+ { "date", nullptr, nullptr },
+ { "deadReckoning", nullptr, nullptr },
+ { "deletionAllowed", nullptr, nullptr },
+ { "description", nullptr, nullptr },
+ { "detonateTime", nullptr, nullptr },
+ { "dir", nullptr, nullptr },
+ { "directOutput", nullptr, nullptr },
+ { "diskAngle", nullptr, nullptr },
+ { "displacements", nullptr, nullptr },
+ { "documentation", nullptr, nullptr },
+ { "elapsedTime", nullptr, nullptr },
+ { "ellipsoid", nullptr, nullptr },
+ { "encodingScheme", nullptr, nullptr },
+ { "endAngle", nullptr, nullptr },
+ { "endCap", nullptr, nullptr },
+ { "enterTime", nullptr, nullptr },
+ { "enteredText", nullptr, nullptr },
+ { "entityCategory", nullptr, nullptr },
+ { "entityCountry", nullptr, nullptr },
+ { "entityDomain", nullptr, nullptr },
+ { "entityExtra", nullptr, nullptr },
+ { "entityID", nullptr, nullptr },
+ { "entityKind", nullptr, nullptr },
+ { "entitySpecific", nullptr, nullptr },
+ { "entitySubCategory", nullptr, nullptr },
+ { "exitTime", nullptr, nullptr },
+ { "extent", nullptr, nullptr },
+ { "family", nullptr, nullptr },
+ { "fanCount", nullptr, nullptr },
+ { "fieldOfView", nullptr, nullptr },
+ { "filled", nullptr, nullptr },
+ { "finalText", nullptr, nullptr },
+ { "fireMissionIndex", nullptr, nullptr },
+ { "fired1", nullptr, nullptr },
+ { "fired2", nullptr, nullptr },
+ { "firedTime", nullptr, nullptr },
+ { "firingRange", nullptr, nullptr },
+ { "firingRate", nullptr, nullptr },
+ { "fogType", nullptr, nullptr },
+ { "forceID", nullptr, nullptr },
+ { "frequency", nullptr, nullptr },
+ { "frontUrl", nullptr, nullptr },
+ { "fuse", nullptr, nullptr },
+ { "geoCoords", nullptr, nullptr },
+ { "geoGridOrigin", nullptr, nullptr },
+ { "geoSystem", nullptr, nullptr },
+ { "groundAngle", nullptr, nullptr },
+ { "groundColor", nullptr, nullptr },
+ { "hatchColor", nullptr, nullptr },
+ { "hatchStyle", nullptr, nullptr },
+ { "hatched", nullptr, nullptr },
+ { "headlight", nullptr, nullptr },
+ { "horizontal", nullptr, nullptr },
+ { "horizontalDatum", nullptr, nullptr },
+ { "http-equiv", nullptr, nullptr },
+ { "image", nullptr, nullptr },
+ { "importedDEF", nullptr, nullptr },
+ { "info", nullptr, nullptr },
+ { "innerRadius", nullptr, nullptr },
+ { "inputFalse", nullptr, nullptr },
+ { "inputNegate", nullptr, nullptr },
+ { "inputSource", nullptr, nullptr },
+ { "inputTrue", nullptr, nullptr },
+ { "integerKey", nullptr, nullptr },
+ { "intensity", nullptr, nullptr },
+ { "jump", nullptr, nullptr },
+ { "justify", nullptr, nullptr },
+ { "keyPress", nullptr, nullptr },
+ { "keyRelease", nullptr, nullptr },
+ { "knot", nullptr, nullptr },
+ { "lang", nullptr, nullptr },
+ { "language", nullptr, nullptr },
+ { "leftToRight", nullptr, nullptr },
+ { "leftUrl", nullptr, nullptr },
+ { "length", nullptr, nullptr },
+ { "lengthOfModulationParameters", nullptr, nullptr },
+ { "level", nullptr, nullptr },
+ { "limitOrientation", nullptr, nullptr },
+ { "lineSegments", nullptr, nullptr },
+ { "linearAcceleration", nullptr, nullptr },
+ { "linearVelocity", nullptr, nullptr },
+ { "linetype", nullptr, nullptr },
+ { "linewidthScaleFactor", nullptr, nullptr },
+ { "llimit", nullptr, nullptr },
+ { "load", nullptr, nullptr },
+ { "loadTime", nullptr, nullptr },
+ { "localDEF", nullptr, nullptr },
+ { "location", nullptr, nullptr },
+ { "loop", nullptr, nullptr },
+ { "marking", nullptr, nullptr },
+ { "mass", nullptr, nullptr },
+ { "maxAngle", nullptr, nullptr },
+ { "maxBack", nullptr, nullptr },
+ { "maxExtent", nullptr, nullptr },
+ { "maxFront", nullptr, nullptr },
+ { "maxPosition", nullptr, nullptr },
+ { "metadataFormat", nullptr, nullptr },
+ { "minAngle", nullptr, nullptr },
+ { "minBack", nullptr, nullptr },
+ { "minFront", nullptr, nullptr },
+ { "minPosition", nullptr, nullptr },
+ { "modulationTypeDetail", nullptr, nullptr },
+ { "modulationTypeMajor", nullptr, nullptr },
+ { "modulationTypeSpreadSpectrum", nullptr, nullptr },
+ { "modulationTypeSystem", nullptr, nullptr },
+ { "momentsOfInertia", nullptr, nullptr },
+ { "multicastRelayHost", nullptr, nullptr },
+ { "multicastRelayPort", nullptr, nullptr },
+ { "munitionApplicationID", nullptr, nullptr },
+ { "munitionEndPoint", nullptr, nullptr },
+ { "munitionEntityID", nullptr, nullptr },
+ { "munitionQuantity", nullptr, nullptr },
+ { "munitionSiteID", nullptr, nullptr },
+ { "munitionStartPoint", nullptr, nullptr },
+ { "mustEvaluate", nullptr, nullptr },
+ { "navType", nullptr, nullptr },
+ { "networkMode", nullptr, nullptr },
+ { "next", nullptr, nullptr },
+ { "nodeField", nullptr, nullptr },
+ { "offset", nullptr, nullptr },
+ { "on", nullptr, nullptr },
+ { "order", nullptr, nullptr },
+ { "originator", nullptr, nullptr },
+ { "outerRadius", nullptr, nullptr },
+ { "parameter", nullptr, nullptr },
+ { "pauseTime", nullptr, nullptr },
+ { "pitch", nullptr, nullptr },
+ { "points", nullptr, nullptr },
+ { "port", nullptr, nullptr },
+ { "power", nullptr, nullptr },
+ { "previous", nullptr, nullptr },
+ { "priority", nullptr, nullptr },
+ { "profile", nullptr, nullptr },
+ { "progress", nullptr, nullptr },
+ { "protoField", nullptr, nullptr },
+ { "radioEntityTypeCategory", nullptr, nullptr },
+ { "radioEntityTypeCountry", nullptr, nullptr },
+ { "radioEntityTypeDomain", nullptr, nullptr },
+ { "radioEntityTypeKind", nullptr, nullptr },
+ { "radioEntityTypeNomenclature", nullptr, nullptr },
+ { "radioEntityTypeNomenclatureVersion", nullptr, nullptr },
+ { "radioID", nullptr, nullptr },
+ { "readInterval", nullptr, nullptr },
+ { "receivedPower", nullptr, nullptr },
+ { "receiverState", nullptr, nullptr },
+ { "reference", nullptr, nullptr },
+ { "relativeAntennaLocation", nullptr, nullptr },
+ { "resolution", nullptr, nullptr },
+ { "resumeTime", nullptr, nullptr },
+ { "rightUrl", nullptr, nullptr },
+ { "rootUrl", nullptr, nullptr },
+ { "rotateYUp", nullptr, nullptr },
+ { "rtpHeaderExpected", nullptr, nullptr },
+ { "sampleRate", nullptr, nullptr },
+ { "samples", nullptr, nullptr },
+ { "shiftKey", nullptr, nullptr },
+ { "side", nullptr, nullptr },
+ { "siteID", nullptr, nullptr },
+ { "skinCoordIndex", nullptr, nullptr },
+ { "skinCoordWeight", nullptr, nullptr },
+ { "skyAngle", nullptr, nullptr },
+ { "skyColor", nullptr, nullptr },
+ { "spacing", nullptr, nullptr },
+ { "spatialize", nullptr, nullptr },
+ { "speed", nullptr, nullptr },
+ { "speedFactor", nullptr, nullptr },
+ { "spine", nullptr, nullptr },
+ { "startAngle", nullptr, nullptr },
+ { "startTime", nullptr, nullptr },
+ { "stiffness", nullptr, nullptr },
+ { "stopTime", nullptr, nullptr },
+ { "string", nullptr, nullptr },
+ { "stripCount", nullptr, nullptr },
+ { "style", nullptr, nullptr },
+ { "summary", nullptr, nullptr },
+ { "tdlType", nullptr, nullptr },
+ { "tessellation", nullptr, nullptr },
+ { "tessellationScale", nullptr, nullptr },
+ { "time", nullptr, nullptr },
+ { "timeOut", nullptr, nullptr },
+ { "timestamp", nullptr, nullptr },
+ { "title", nullptr, nullptr },
+ { "toggle", nullptr, nullptr },
+ { "top", nullptr, nullptr },
+ { "topToBottom", nullptr, nullptr },
+ { "topUrl", nullptr, nullptr },
+ { "touchTime", nullptr, nullptr },
+ { "transmitFrequencyBandwidth", nullptr, nullptr },
+ { "transmitState", nullptr, nullptr },
+ { "transmitterApplicationID", nullptr, nullptr },
+ { "transmitterEntityID", nullptr, nullptr },
+ { "transmitterRadioID", nullptr, nullptr },
+ { "transmitterSiteID", nullptr, nullptr },
+ { "transparent", nullptr, nullptr },
+ { "triggerTime", nullptr, nullptr },
+ { "triggerTrue", nullptr, nullptr },
+ { "triggerValue", nullptr, nullptr },
+ { "type", nullptr, nullptr },
+ { "uDimension", nullptr, nullptr },
+ { "uKnot", nullptr, nullptr },
+ { "uOrder", nullptr, nullptr },
+ { "uTessellation", nullptr, nullptr },
+ { "ulimit", nullptr, nullptr },
+ { "vDimension", nullptr, nullptr },
+ { "vKnot", nullptr, nullptr },
+ { "vOrder", nullptr, nullptr },
+ { "vTessellation", nullptr, nullptr },
+ { "version", nullptr, nullptr },
+ { "verticalDatum", nullptr, nullptr },
+ { "vertices", nullptr, nullptr },
+ { "visibilityLimit", nullptr, nullptr },
+ { "visibilityRange", nullptr, nullptr },
+ { "warhead", nullptr, nullptr },
+ { "weight", nullptr, nullptr },
+ { "whichGeometry", nullptr, nullptr },
+ { "writeInterval", nullptr, nullptr },
+ { "xDimension", nullptr, nullptr },
+ { "xSpacing", nullptr, nullptr },
+ { "yScale", nullptr, nullptr },
+ { "zDimension", nullptr, nullptr },
+ { "zSpacing", nullptr, nullptr },
+ { "visible", nullptr, nullptr },
+ { "repeatR", nullptr, nullptr },
+ { "texture", nullptr, nullptr },
+ { "back", nullptr, nullptr },
+ { "front", nullptr, nullptr },
+ { "left", nullptr, nullptr },
+ { "right", nullptr, nullptr },
+ { "parts", nullptr, nullptr },
+ { "isSelected", nullptr, nullptr },
+ { "isValid", nullptr, nullptr },
+ { "numComponents", nullptr, nullptr },
+ { "depth", nullptr, nullptr },
+ { "update", nullptr, nullptr },
+ { "fogCoord", nullptr, nullptr },
+ { "texCoord", nullptr, nullptr },
+ { "activate", nullptr, nullptr },
+ { "programs", nullptr, nullptr },
+ { "matrix", nullptr, nullptr },
+ { "anchorPoint", nullptr, nullptr },
+ { "body1", nullptr, nullptr },
+ { "body2", nullptr, nullptr },
+ { "forceOutput", nullptr, nullptr },
+ { "body1AnchorPoint", nullptr, nullptr },
+ { "body2AnchorPoint", nullptr, nullptr },
+ { "plane", nullptr, nullptr },
+ { "appliedParameters", nullptr, nullptr },
+ { "bounce", nullptr, nullptr },
+ { "frictionCoefficients", nullptr, nullptr },
+ { "minBounceSpeed", nullptr, nullptr },
+ { "slipFactors", nullptr, nullptr },
+ { "softnessConstantForceMix", nullptr, nullptr },
+ { "softnessErrorCorrection", nullptr, nullptr },
+ { "surfaceSpeed", nullptr, nullptr },
+ { "isActive", nullptr, nullptr },
+ { "useGeometry", nullptr, nullptr },
+ { "set_destination", nullptr, nullptr },
+ { "set_value", nullptr, nullptr },
+ { "tau", nullptr, nullptr },
+ { "tolerance", nullptr, nullptr },
+ { "value_changed", nullptr, nullptr },
+ { "initialDestination", nullptr, nullptr },
+ { "initialValue", nullptr, nullptr },
+ { "angle", nullptr, nullptr },
+ { "variation", nullptr, nullptr },
+ { "surfaceArea", nullptr, nullptr },
+ { "frictionDirection", nullptr, nullptr },
+ { "slipCoefficients", nullptr, nullptr },
+ { "category", nullptr, nullptr },
+ { "country", nullptr, nullptr },
+ { "domain", nullptr, nullptr },
+ { "extra", nullptr, nullptr },
+ { "kind", nullptr, nullptr },
+ { "specific", nullptr, nullptr },
+ { "subcategory", nullptr, nullptr },
+ { "axis1", nullptr, nullptr },
+ { "axis2", nullptr, nullptr },
+ { "desiredAngularVelocity1", nullptr, nullptr },
+ { "desiredAngularVelocity2", nullptr, nullptr },
+ { "maxAngle1", nullptr, nullptr },
+ { "maxTorque1", nullptr, nullptr },
+ { "maxTorque2", nullptr, nullptr },
+ { "minAngle1", nullptr, nullptr },
+ { "stopBounce1", nullptr, nullptr },
+ { "stopConstantForceMix1", nullptr, nullptr },
+ { "stopErrorCorrection1", nullptr, nullptr },
+ { "suspensionErrorCorrection", nullptr, nullptr },
+ { "suspensionForce", nullptr, nullptr },
+ { "body1Axis", nullptr, nullptr },
+ { "body2Axis", nullptr, nullptr },
+ { "hinge1Angle", nullptr, nullptr },
+ { "hinge1AngleRate", nullptr, nullptr },
+ { "hinge2Angle", nullptr, nullptr },
+ { "hinge2AngleRate", nullptr, nullptr },
+ { "set_fraction", nullptr, nullptr },
+ { "easeInEaseOut", nullptr, nullptr },
+ { "modifiedFraction_changed", nullptr, nullptr },
+ { "force", nullptr, nullptr },
+ { "geoCenter", nullptr, nullptr },
+ { "centerOfRotation_changed", nullptr, nullptr },
+ { "geoCoord_changed", nullptr, nullptr },
+ { "orientation_changed", nullptr, nullptr },
+ { "position_changed", nullptr, nullptr },
+ { "isPickable", nullptr, nullptr },
+ { "viewport", nullptr, nullptr },
+ { "activeLayer", nullptr, nullptr },
+ { "align", nullptr, nullptr },
+ { "offsetUnits", nullptr, nullptr },
+ { "scaleMode", nullptr, nullptr },
+ { "sizeUnits", nullptr, nullptr },
+ { "layout", nullptr, nullptr },
+ { "objectType", nullptr, nullptr },
+ { "pickedNormal", nullptr, nullptr },
+ { "pickedPoint", nullptr, nullptr },
+ { "pickedTextureCoordinate", nullptr, nullptr },
+ { "intersectionType", nullptr, nullptr },
+ { "sortOrder", nullptr, nullptr },
+ { "axis1Angle", nullptr, nullptr },
+ { "axis1Torque", nullptr, nullptr },
+ { "axis2Angle", nullptr, nullptr },
+ { "axis2Torque", nullptr, nullptr },
+ { "axis3Angle", nullptr, nullptr },
+ { "axis3Torque", nullptr, nullptr },
+ { "enabledAxies", nullptr, nullptr },
+ { "motor1Axis", nullptr, nullptr },
+ { "motor2Axis", nullptr, nullptr },
+ { "motor3Axis", nullptr, nullptr },
+ { "stop1Bounce", nullptr, nullptr },
+ { "stop1ErrorCorrection", nullptr, nullptr },
+ { "stop2Bounce", nullptr, nullptr },
+ { "stop2ErrorCorrection", nullptr, nullptr },
+ { "stop3Bounce", nullptr, nullptr },
+ { "stop3ErrorCorrection", nullptr, nullptr },
+ { "motor1Angle", nullptr, nullptr },
+ { "motor1AngleRate", nullptr, nullptr },
+ { "motor2Angle", nullptr, nullptr },
+ { "motor2AngleRate", nullptr, nullptr },
+ { "motor3Angle", nullptr, nullptr },
+ { "motor3AngleRate", nullptr, nullptr },
+ { "autoCalc", nullptr, nullptr },
+ { "duration", nullptr, nullptr },
+ { "retainUserOffsets", nullptr, nullptr },
+ { "isBound", nullptr, nullptr },
+ { "appearance", nullptr, nullptr },
+ { "createParticles", nullptr, nullptr },
+ { "lifetimeVariation", nullptr, nullptr },
+ { "maxParticles", nullptr, nullptr },
+ { "particleLifetime", nullptr, nullptr },
+ { "particleSize", nullptr, nullptr },
+ { "colorKey", nullptr, nullptr },
+ { "geometryType", nullptr, nullptr },
+ { "texCoordKey", nullptr, nullptr },
+ { "pickable", nullptr, nullptr },
+ { "angularDampingFactor", nullptr, nullptr },
+ { "angularVelocity", nullptr, nullptr },
+ { "autoDamp", nullptr, nullptr },
+ { "autoDisable", nullptr, nullptr },
+ { "disableAngularSpeed", nullptr, nullptr },
+ { "disableLinearSpeed", nullptr, nullptr },
+ { "disableTime", nullptr, nullptr },
+ { "finiteRotationAxis", nullptr, nullptr },
+ { "fixed", nullptr, nullptr },
+ { "forces", nullptr, nullptr },
+ { "inertia", nullptr, nullptr },
+ { "linearDampingFactor", nullptr, nullptr },
+ { "torques", nullptr, nullptr },
+ { "useFiniteRotation", nullptr, nullptr },
+ { "useGlobalForce", nullptr, nullptr },
+ { "constantForceMix", nullptr, nullptr },
+ { "constantSurfaceThickness", nullptr, nullptr },
+ { "errorCorrection", nullptr, nullptr },
+ { "iterations", nullptr, nullptr },
+ { "maxCorrectionSpeed", nullptr, nullptr },
+ { "preferAccuracy", nullptr, nullptr },
+ { "pointSize", nullptr, nullptr },
+ { "stopBounce", nullptr, nullptr },
+ { "stopErrorCorrection", nullptr, nullptr },
+ { "angleRate", nullptr, nullptr },
+ { "maxSeparation", nullptr, nullptr },
+ { "minSeparation", nullptr, nullptr },
+ { "separation", nullptr, nullptr },
+ { "separationRate", nullptr, nullptr },
+ { "closed", nullptr, nullptr },
+ { "keyVelocity", nullptr, nullptr },
+ { "normalizeVelocity", nullptr, nullptr },
+ { "surface", nullptr, nullptr },
+ { "anisotropicDegree", nullptr, nullptr },
+ { "borderColor", nullptr, nullptr },
+ { "borderWidth", nullptr, nullptr },
+ { "boundaryModeS", nullptr, nullptr },
+ { "boundaryModeT", nullptr, nullptr },
+ { "boundaryModeR", nullptr, nullptr },
+ { "magnificationFilter", nullptr, nullptr },
+ { "minificationFilter", nullptr, nullptr },
+ { "textureCompression", nullptr, nullptr },
+ { "texturePriority", nullptr, nullptr },
+ { "generateMipMaps", nullptr, nullptr },
+ { "targetObject", nullptr, nullptr },
+ { "backAmbientIntensity", nullptr, nullptr },
+ { "backDiffuseColor", nullptr, nullptr },
+ { "backEmissiveColor", nullptr, nullptr },
+ { "backShininess", nullptr, nullptr },
+ { "backSpecularColor", nullptr, nullptr },
+ { "separateBackColor", nullptr, nullptr },
+ { "displayed", nullptr, nullptr },
+ { "clipBoundary", nullptr, nullptr },
+ { "internal", nullptr, nullptr },
+ { "gustiness", nullptr, nullptr },
+ { "turbulence", nullptr, nullptr },
+ { "unitCategory", nullptr, nullptr },
+ { "unitName", nullptr, nullptr },
+ { "unitConversionFactor", nullptr, nullptr },
+ { "weightConstant1", nullptr, nullptr },
+ { "weightConstant2", nullptr, nullptr },
+ { "weightFunction1", nullptr, nullptr },
+ { "weightFunction2", nullptr, nullptr },
+ { "boundaryOpacity", nullptr, nullptr },
+ { "opacityFactor", nullptr, nullptr },
+ { "retainedOpacity", nullptr, nullptr },
+ { "colorSteps", nullptr, nullptr },
+ { "orthogonalColor", nullptr, nullptr },
+ { "parallelColor", nullptr, nullptr },
+ { "ordered", nullptr, nullptr },
+ { "edgeColor", nullptr, nullptr },
+ { "gradientThreshold", nullptr, nullptr },
+ { "contourStepSize", nullptr, nullptr },
+ { "dimensions", nullptr, nullptr },
+ { "surfaceTolerance", nullptr, nullptr },
+ { "surfaceValues", nullptr, nullptr },
+ { "intensityThreshold", nullptr, nullptr },
+ { "segmentEnabled", nullptr, nullptr },
+ { "lighting", nullptr, nullptr },
+ { "shadows", nullptr, nullptr },
+ { "phaseFunction", nullptr, nullptr },
+ { "silhouetteBoundaryOpacity", nullptr, nullptr },
+ { "silhouetteRetainedOpacity", nullptr, nullptr },
+ { "silhouetteSharpness", nullptr, nullptr },
+ { "coolColor", nullptr, nullptr },
+ { "warmColor", nullptr, nullptr }
+};
+
+FIVocabulary X3D_vocabulary_3_3 = {
+ nullptr, 0,
+ encodingAlgorithmTable_3_3, 8,
+ nullptr, 0,
+ nullptr, 0,
+ nullptr, 0,
+ nullptr, 0,
+ nullptr, 0,
+ attributeValueTable_3_3, 2,
+ nullptr, 0,
+ nullptr, 0,
+ elementNameTable_3_3, 252,
+ attributeNameTable_3_3, 546
+};
+
+}// namespace Assimp
+
+#endif // !ASSIMP_BUILD_NO_X3D_IMPORTER
diff --git a/code/XFileExporter.cpp b/code/XFileExporter.cpp
index 7de494daf..1510ae6d4 100644
--- a/code/XFileExporter.cpp
+++ b/code/XFileExporter.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -46,15 +47,15 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "XFileExporter.h"
#include "ConvertToLHProcess.h"
-#include "Bitmap.h"
-#include "BaseImporter.h"
-#include "fast_atof.h"
+#include <assimp/Bitmap.h>
+#include <assimp/BaseImporter.h>
+#include <assimp/fast_atof.h>
#include <assimp/SceneCombiner.h>
#include <assimp/DefaultIOSystem.h>
#include <ctime>
#include <set>
#include <memory>
-#include "Exceptional.h"
+#include <assimp/Exceptional.h>
#include <assimp/IOSystem.hpp>
#include <assimp/scene.h>
#include <assimp/light.h>
@@ -80,6 +81,10 @@ void ExportSceneXFile(const char* pFile,IOSystem* pIOSystem, const aiScene* pSce
// invoke the exporter
XFileExporter iDoTheExportThing( pScene, pIOSystem, path, file, &props);
+ if (iDoTheExportThing.mOutput.fail()) {
+ throw DeadlyExportError("output data creation failed. Most likely the file became too large: " + std::string(pFile));
+ }
+
// we're still here - export successfully completed. Write result to the given IOSYstem
std::unique_ptr<IOStream> outfile (pIOSystem->Open(pFile,"wt"));
if(outfile == NULL) {
@@ -127,7 +132,7 @@ void XFileExporter::WriteFile()
{
// note, that all realnumber values must be comma separated in x files
mOutput.setf(std::ios::fixed);
- mOutput.precision(16); // precission for double
+ mOutput.precision(16); // precision for double
// entry of writing the file
WriteHeader();
diff --git a/code/XFileExporter.h b/code/XFileExporter.h
index 8d3478276..fc480f40b 100644
--- a/code/XFileExporter.h
+++ b/code/XFileExporter.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -93,7 +94,10 @@ protected:
void PushTag() { startstr.append( " "); }
/// Leaves an element, decreasing the indentation
- void PopTag() { ai_assert( startstr.length() > 1); startstr.erase( startstr.length() - 2); }
+ void PopTag() {
+ ai_assert( startstr.length() > 1);
+ startstr.erase( startstr.length() - 2);
+ }
public:
/// Stringstream to write all output into
diff --git a/code/XFileHelper.h b/code/XFileHelper.h
index e7c02c7c6..c51e2eba9 100644
--- a/code/XFileHelper.h
+++ b/code/XFileHelper.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -54,32 +55,33 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/anim.h>
#include <assimp/Defines.h>
-namespace Assimp
-{
-namespace XFile
-{
+namespace Assimp {
+namespace XFile {
/** Helper structure representing a XFile mesh face */
-struct Face
-{
+struct Face {
std::vector<unsigned int> mIndices;
};
/** Helper structure representing a texture filename inside a material and its potential source */
-struct TexEntry
-{
+struct TexEntry {
std::string mName;
bool mIsNormalMap; // true if the texname was specified in a NormalmapFilename tag
- TexEntry() { mIsNormalMap = false; }
- TexEntry( const std::string& pName, bool pIsNormalMap = false)
- : mName( pName), mIsNormalMap( pIsNormalMap)
- { /* done */ }
+ TexEntry() AI_NO_EXCEPT
+ : mName()
+ , mIsNormalMap(false) {
+ // empty
+ }
+ TexEntry(const std::string& pName, bool pIsNormalMap = false)
+ : mName(pName)
+ , mIsNormalMap(pIsNormalMap) {
+ // empty
+ }
};
/** Helper structure representing a XFile material */
-struct Material
-{
+struct Material {
std::string mName;
bool mIsReference; // if true, mName holds a name by which the actual material can be found in the material list
aiColor4D mDiffuse;
@@ -87,19 +89,18 @@ struct Material
aiColor3D mSpecular;
aiColor3D mEmissive;
std::vector<TexEntry> mTextures;
-
size_t sceneIndex; ///< the index under which it was stored in the scene's material list
- Material()
- : mIsReference(false),
- mSpecularExponent(),
- sceneIndex(SIZE_MAX)
- {}
+ Material() AI_NO_EXCEPT
+ : mIsReference(false)
+ , mSpecularExponent()
+ , sceneIndex(SIZE_MAX) {
+ // empty
+ }
};
/** Helper structure to represent a bone weight */
-struct BoneWeight
-{
+struct BoneWeight {
unsigned int mVertex;
ai_real mWeight;
};
@@ -113,8 +114,7 @@ struct Bone
};
/** Helper structure to represent an XFile mesh */
-struct Mesh
-{
+struct Mesh {
std::string mName;
std::vector<aiVector3D> mPositions;
std::vector<Face> mPosFaces;
@@ -130,38 +130,65 @@ struct Mesh
std::vector<Bone> mBones;
- explicit Mesh(const std::string &pName = "") { mName = pName; mNumTextures = 0; mNumColorSets = 0; }
+ explicit Mesh(const std::string &pName = "") AI_NO_EXCEPT
+ : mName( pName )
+ , mPositions()
+ , mPosFaces()
+ , mNormals()
+ , mNormFaces()
+ , mNumTextures(0)
+ , mTexCoords{}
+ , mNumColorSets(0)
+ , mColors{}
+ , mFaceMaterials()
+ , mMaterials()
+ , mBones() {
+ // empty
+ }
};
/** Helper structure to represent a XFile frame */
-struct Node
-{
+struct Node {
std::string mName;
aiMatrix4x4 mTrafoMatrix;
Node* mParent;
std::vector<Node*> mChildren;
std::vector<Mesh*> mMeshes;
- Node() { mParent = NULL; }
- explicit Node( Node* pParent) { mParent = pParent; }
- ~Node()
- {
- for( unsigned int a = 0; a < mChildren.size(); a++)
+ Node() AI_NO_EXCEPT
+ : mName()
+ , mTrafoMatrix()
+ , mParent(nullptr)
+ , mChildren()
+ , mMeshes() {
+ // empty
+ }
+ explicit Node( Node* pParent)
+ : mName()
+ , mTrafoMatrix()
+ , mParent(pParent)
+ , mChildren()
+ , mMeshes() {
+ // empty
+ }
+
+ ~Node() {
+ for (unsigned int a = 0; a < mChildren.size(); ++a ) {
delete mChildren[a];
- for( unsigned int a = 0; a < mMeshes.size(); a++)
+ }
+ for (unsigned int a = 0; a < mMeshes.size(); ++a) {
delete mMeshes[a];
+ }
}
};
-struct MatrixKey
-{
+struct MatrixKey {
double mTime;
aiMatrix4x4 mMatrix;
};
/** Helper structure representing a single animated bone in a XFile */
-struct AnimBone
-{
+struct AnimBone {
std::string mBoneName;
std::vector<aiVectorKey> mPosKeys; // either three separate key sequences for position, rotation, scaling
std::vector<aiQuatKey> mRotKeys;
@@ -193,14 +220,22 @@ struct Scene
std::vector<Animation*> mAnims;
unsigned int mAnimTicksPerSecond;
- Scene() { mRootNode = NULL; mAnimTicksPerSecond = 0; }
- ~Scene()
- {
+ Scene() AI_NO_EXCEPT
+ : mRootNode(nullptr)
+ , mGlobalMeshes()
+ , mGlobalMaterials()
+ , mAnimTicksPerSecond(0) {
+ // empty
+ }
+ ~Scene() {
delete mRootNode;
- for( unsigned int a = 0; a < mGlobalMeshes.size(); a++)
+ mRootNode = nullptr;
+ for (unsigned int a = 0; a < mGlobalMeshes.size(); ++a ) {
delete mGlobalMeshes[a];
- for( unsigned int a = 0; a < mAnims.size(); a++)
+ }
+ for (unsigned int a = 0; a < mAnims.size(); ++a ) {
delete mAnims[a];
+ }
}
};
diff --git a/code/XFileImporter.cpp b/code/XFileImporter.cpp
index f2b1dde7e..ae847eef8 100644
--- a/code/XFileImporter.cpp
+++ b/code/XFileImporter.cpp
@@ -3,8 +3,7 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
-
+Copyright (c) 2006-2018, assimp team
All rights reserved.
@@ -43,12 +42,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* @brief Implementation of the XFile importer class
*/
-
#ifndef ASSIMP_BUILD_NO_X_IMPORTER
#include "XFileImporter.h"
#include "XFileParser.h"
-#include "TinyFormatter.h"
+#include <assimp/TinyFormatter.h>
#include "ConvertToLHProcess.h"
#include <assimp/Defines.h>
#include <assimp/IOSystem.hpp>
@@ -78,17 +76,19 @@ static const aiImporterDesc desc = {
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
XFileImporter::XFileImporter()
-{}
+: mBuffer() {
+ // empty
+}
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
-XFileImporter::~XFileImporter()
-{}
+XFileImporter::~XFileImporter() {
+ // empty
+}
// ------------------------------------------------------------------------------------------------
// Returns whether the class can handle the format of the given file.
-bool XFileImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
-{
+bool XFileImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const {
std::string extension = GetExtension(pFile);
if(extension == "x") {
return true;
@@ -103,23 +103,24 @@ bool XFileImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, boo
// ------------------------------------------------------------------------------------------------
// Get file extension list
-const aiImporterDesc* XFileImporter::GetInfo () const
-{
+const aiImporterDesc* XFileImporter::GetInfo () const {
return &desc;
}
// ------------------------------------------------------------------------------------------------
// Imports the given file into the given scene structure.
-void XFileImporter::InternReadFile( const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler)
-{
+void XFileImporter::InternReadFile( const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler) {
// read file into memory
std::unique_ptr<IOStream> file( pIOHandler->Open( pFile));
- if( file.get() == NULL)
- throw DeadlyImportError( "Failed to open file " + pFile + ".");
+ if ( file.get() == NULL ) {
+ throw DeadlyImportError( "Failed to open file " + pFile + "." );
+ }
+ static const size_t MinSize = 16;
size_t fileSize = file->FileSize();
- if( fileSize < 16)
- throw DeadlyImportError( "XFile is too small.");
+ if ( fileSize < MinSize ) {
+ throw DeadlyImportError( "XFile is too small." );
+ }
// in the hope that binary files will never start with a BOM ...
mBuffer.resize( fileSize + 1);
@@ -133,8 +134,9 @@ void XFileImporter::InternReadFile( const std::string& pFile, aiScene* pScene, I
CreateDataRepresentationFromImport( pScene, parser.GetImportedData());
// if nothing came from it, report it as error
- if( !pScene->mRootNode)
- throw DeadlyImportError( "XFile is ill-formatted - no content imported.");
+ if ( !pScene->mRootNode ) {
+ throw DeadlyImportError( "XFile is ill-formatted - no content imported." );
+ }
}
// ------------------------------------------------------------------------------------------------
@@ -145,17 +147,15 @@ void XFileImporter::CreateDataRepresentationFromImport( aiScene* pScene, XFile::
ConvertMaterials( pScene, pData->mGlobalMaterials);
// copy nodes, extracting meshes and materials on the way
- pScene->mRootNode = CreateNodes( pScene, NULL, pData->mRootNode);
+ pScene->mRootNode = CreateNodes( pScene, nullptr, pData->mRootNode);
// extract animations
CreateAnimations( pScene, pData);
// read the global meshes that were stored outside of any node
- if( pData->mGlobalMeshes.size() > 0)
- {
+ if( !pData->mGlobalMeshes.empty() ) {
// create a root node to hold them if there isn't any, yet
- if( pScene->mRootNode == NULL)
- {
+ if( pScene->mRootNode == nullptr ) {
pScene->mRootNode = new aiNode;
pScene->mRootNode->mName.Set( "$dummy_node");
}
@@ -179,8 +179,7 @@ void XFileImporter::CreateDataRepresentationFromImport( aiScene* pScene, XFile::
flipper.Execute(pScene);
// finally: create a dummy material if not material was imported
- if( pScene->mNumMaterials == 0)
- {
+ if( pScene->mNumMaterials == 0) {
pScene->mNumMaterials = 1;
// create the Material
aiMaterial* mat = new aiMaterial;
@@ -204,10 +203,10 @@ void XFileImporter::CreateDataRepresentationFromImport( aiScene* pScene, XFile::
// ------------------------------------------------------------------------------------------------
// Recursively creates scene nodes from the imported hierarchy.
-aiNode* XFileImporter::CreateNodes( aiScene* pScene, aiNode* pParent, const XFile::Node* pNode)
-{
- if( !pNode)
- return NULL;
+aiNode* XFileImporter::CreateNodes( aiScene* pScene, aiNode* pParent, const XFile::Node* pNode) {
+ if ( !pNode ) {
+ return nullptr;
+ }
// create node
aiNode* node = new aiNode;
@@ -221,13 +220,13 @@ aiNode* XFileImporter::CreateNodes( aiScene* pScene, aiNode* pParent, const XFil
CreateMeshes( pScene, node, pNode->mMeshes);
// handle childs
- if( pNode->mChildren.size() > 0)
- {
+ if( !pNode->mChildren.empty() ) {
node->mNumChildren = (unsigned int)pNode->mChildren.size();
node->mChildren = new aiNode* [node->mNumChildren];
- for( unsigned int a = 0; a < pNode->mChildren.size(); a++)
- node->mChildren[a] = CreateNodes( pScene, node, pNode->mChildren[a]);
+ for ( unsigned int a = 0; a < pNode->mChildren.size(); ++a ) {
+ node->mChildren[ a ] = CreateNodes( pScene, node, pNode->mChildren[ a ] );
+ }
}
return node;
@@ -235,49 +234,47 @@ aiNode* XFileImporter::CreateNodes( aiScene* pScene, aiNode* pParent, const XFil
// ------------------------------------------------------------------------------------------------
// Creates the meshes for the given node.
-void XFileImporter::CreateMeshes( aiScene* pScene, aiNode* pNode, const std::vector<XFile::Mesh*>& pMeshes)
-{
- if( pMeshes.size() == 0)
+void XFileImporter::CreateMeshes( aiScene* pScene, aiNode* pNode, const std::vector<XFile::Mesh*>& pMeshes) {
+ if (pMeshes.empty()) {
return;
+ }
// create a mesh for each mesh-material combination in the source node
std::vector<aiMesh*> meshes;
- for( unsigned int a = 0; a < pMeshes.size(); a++)
- {
+ for( unsigned int a = 0; a < pMeshes.size(); ++a ) {
XFile::Mesh* sourceMesh = pMeshes[a];
+ if ( nullptr == sourceMesh ) {
+ continue;
+ }
+
// first convert its materials so that we can find them with their index afterwards
ConvertMaterials( pScene, sourceMesh->mMaterials);
unsigned int numMaterials = std::max( (unsigned int)sourceMesh->mMaterials.size(), 1u);
- for( unsigned int b = 0; b < numMaterials; b++)
- {
+ for( unsigned int b = 0; b < numMaterials; ++b ) {
// collect the faces belonging to this material
std::vector<unsigned int> faces;
unsigned int numVertices = 0;
- if( sourceMesh->mFaceMaterials.size() > 0)
- {
+ if( !sourceMesh->mFaceMaterials.empty() ) {
// if there is a per-face material defined, select the faces with the corresponding material
- for( unsigned int c = 0; c < sourceMesh->mFaceMaterials.size(); c++)
- {
- if( sourceMesh->mFaceMaterials[c] == b)
- {
+ for( unsigned int c = 0; c < sourceMesh->mFaceMaterials.size(); ++c ) {
+ if( sourceMesh->mFaceMaterials[c] == b) {
faces.push_back( c);
numVertices += (unsigned int)sourceMesh->mPosFaces[c].mIndices.size();
}
}
- } else
- {
+ } else {
// if there is no per-face material, place everything into one mesh
- for( unsigned int c = 0; c < sourceMesh->mPosFaces.size(); c++)
- {
+ for( unsigned int c = 0; c < sourceMesh->mPosFaces.size(); ++c ) {
faces.push_back( c);
numVertices += (unsigned int)sourceMesh->mPosFaces[c].mIndices.size();
}
}
// no faces/vertices using this material? strange...
- if( numVertices == 0)
+ if ( numVertices == 0 ) {
continue;
+ }
// create a submesh using this material
aiMesh* mesh = new aiMesh;
@@ -285,11 +282,9 @@ void XFileImporter::CreateMeshes( aiScene* pScene, aiNode* pNode, const std::vec
// find the material in the scene's material list. Either own material
// or referenced material, it should already have a valid index
- if( sourceMesh->mFaceMaterials.size() > 0)
- {
+ if( !sourceMesh->mFaceMaterials.empty() ) {
mesh->mMaterialIndex = static_cast<unsigned int>(sourceMesh->mMaterials[b].sceneIndex);
- } else
- {
+ } else {
mesh->mMaterialIndex = 0;
}
@@ -304,28 +299,28 @@ void XFileImporter::CreateMeshes( aiScene* pScene, aiNode* pNode, const std::vec
mesh->mName.Set(sourceMesh->mName);
// normals?
- if( sourceMesh->mNormals.size() > 0)
- mesh->mNormals = new aiVector3D[numVertices];
+ if ( sourceMesh->mNormals.size() > 0 ) {
+ mesh->mNormals = new aiVector3D[ numVertices ];
+ }
// texture coords
- for( unsigned int c = 0; c < AI_MAX_NUMBER_OF_TEXTURECOORDS; c++)
- {
- if( sourceMesh->mTexCoords[c].size() > 0)
- mesh->mTextureCoords[c] = new aiVector3D[numVertices];
+ for( unsigned int c = 0; c < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++c ) {
+ if ( !sourceMesh->mTexCoords[ c ].empty() ) {
+ mesh->mTextureCoords[ c ] = new aiVector3D[ numVertices ];
+ }
}
// vertex colors
- for( unsigned int c = 0; c < AI_MAX_NUMBER_OF_COLOR_SETS; c++)
- {
- if( sourceMesh->mColors[c].size() > 0)
- mesh->mColors[c] = new aiColor4D[numVertices];
+ for( unsigned int c = 0; c < AI_MAX_NUMBER_OF_COLOR_SETS; ++c ) {
+ if ( !sourceMesh->mColors[ c ].empty() ) {
+ mesh->mColors[ c ] = new aiColor4D[ numVertices ];
+ }
}
// now collect the vertex data of all data streams present in the imported mesh
- unsigned int newIndex = 0;
+ unsigned int newIndex( 0 );
std::vector<unsigned int> orgPoints; // from which original point each new vertex stems
orgPoints.resize( numVertices, 0);
- for( unsigned int c = 0; c < faces.size(); c++)
- {
+ for( unsigned int c = 0; c < faces.size(); ++c ) {
unsigned int f = faces[c]; // index of the source face
const XFile::Face& pf = sourceMesh->mPosFaces[f]; // position source face
@@ -335,30 +330,35 @@ void XFileImporter::CreateMeshes( aiScene* pScene, aiNode* pNode, const std::vec
df.mIndices = new unsigned int[ df.mNumIndices];
// collect vertex data for indices of this face
- for( unsigned int d = 0; d < df.mNumIndices; d++)
- {
+ for( unsigned int d = 0; d < df.mNumIndices; ++d ) {
df.mIndices[d] = newIndex;
+ const unsigned int newIdx( pf.mIndices[ d ] );
+ if ( newIdx > sourceMesh->mPositions.size() ) {
+ continue;
+ }
+
orgPoints[newIndex] = pf.mIndices[d];
// Position
mesh->mVertices[newIndex] = sourceMesh->mPositions[pf.mIndices[d]];
// Normal, if present
- if( mesh->HasNormals())
- mesh->mNormals[newIndex] = sourceMesh->mNormals[sourceMesh->mNormFaces[f].mIndices[d]];
+ if ( mesh->HasNormals() ) {
+ mesh->mNormals[ newIndex ] = sourceMesh->mNormals[ sourceMesh->mNormFaces[ f ].mIndices[ d ] ];
+ }
// texture coord sets
- for( unsigned int e = 0; e < AI_MAX_NUMBER_OF_TEXTURECOORDS; e++)
- {
- if( mesh->HasTextureCoords( e))
- {
+ for( unsigned int e = 0; e < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++e ) {
+ if( mesh->HasTextureCoords( e)) {
aiVector2D tex = sourceMesh->mTexCoords[e][pf.mIndices[d]];
mesh->mTextureCoords[e][newIndex] = aiVector3D( tex.x, 1.0f - tex.y, 0.0f);
}
}
// vertex color sets
- for( unsigned int e = 0; e < AI_MAX_NUMBER_OF_COLOR_SETS; e++)
- if( mesh->HasVertexColors( e))
- mesh->mColors[e][newIndex] = sourceMesh->mColors[e][pf.mIndices[d]];
+ for ( unsigned int e = 0; e < AI_MAX_NUMBER_OF_COLOR_SETS; ++e ) {
+ if ( mesh->HasVertexColors( e ) ) {
+ mesh->mColors[ e ][ newIndex ] = sourceMesh->mColors[ e ][ pf.mIndices[ d ] ];
+ }
+ }
newIndex++;
}
@@ -370,28 +370,29 @@ void XFileImporter::CreateMeshes( aiScene* pScene, aiNode* pNode, const std::vec
// convert all bones of the source mesh which influence vertices in this newly created mesh
const std::vector<XFile::Bone>& bones = sourceMesh->mBones;
std::vector<aiBone*> newBones;
- for( unsigned int c = 0; c < bones.size(); c++)
- {
+ for( unsigned int c = 0; c < bones.size(); ++c ) {
const XFile::Bone& obone = bones[c];
// set up a vertex-linear array of the weights for quick searching if a bone influences a vertex
std::vector<ai_real> oldWeights( sourceMesh->mPositions.size(), 0.0);
- for( unsigned int d = 0; d < obone.mWeights.size(); d++)
- oldWeights[obone.mWeights[d].mVertex] = obone.mWeights[d].mWeight;
+ for ( unsigned int d = 0; d < obone.mWeights.size(); ++d ) {
+ oldWeights[ obone.mWeights[ d ].mVertex ] = obone.mWeights[ d ].mWeight;
+ }
// collect all vertex weights that influence a vertex in the new mesh
std::vector<aiVertexWeight> newWeights;
newWeights.reserve( numVertices);
- for( unsigned int d = 0; d < orgPoints.size(); d++)
- {
+ for( unsigned int d = 0; d < orgPoints.size(); ++d ) {
// does the new vertex stem from an old vertex which was influenced by this bone?
ai_real w = oldWeights[orgPoints[d]];
- if( w > 0.0)
- newWeights.push_back( aiVertexWeight( d, w));
+ if ( w > 0.0 ) {
+ newWeights.push_back( aiVertexWeight( d, w ) );
+ }
}
// if the bone has no weights in the newly created mesh, ignore it
- if( newWeights.size() == 0)
+ if ( newWeights.empty() ) {
continue;
+ }
// create
aiBone* nbone = new aiBone;
@@ -401,14 +402,14 @@ void XFileImporter::CreateMeshes( aiScene* pScene, aiNode* pNode, const std::vec
nbone->mOffsetMatrix = obone.mOffsetMatrix;
nbone->mNumWeights = (unsigned int)newWeights.size();
nbone->mWeights = new aiVertexWeight[nbone->mNumWeights];
- for( unsigned int d = 0; d < newWeights.size(); d++)
- nbone->mWeights[d] = newWeights[d];
+ for ( unsigned int d = 0; d < newWeights.size(); ++d ) {
+ nbone->mWeights[ d ] = newWeights[ d ];
+ }
}
// store the bones in the mesh
mesh->mNumBones = (unsigned int)newBones.size();
- if( newBones.size() > 0)
- {
+ if( !newBones.empty()) {
mesh->mBones = new aiBone*[mesh->mNumBones];
std::copy( newBones.begin(), newBones.end(), mesh->mBones);
}
@@ -418,8 +419,7 @@ void XFileImporter::CreateMeshes( aiScene* pScene, aiNode* pNode, const std::vec
// reallocate scene mesh array to be large enough
aiMesh** prevArray = pScene->mMeshes;
pScene->mMeshes = new aiMesh*[pScene->mNumMeshes + meshes.size()];
- if( prevArray)
- {
+ if( prevArray) {
memcpy( pScene->mMeshes, prevArray, pScene->mNumMeshes * sizeof( aiMesh*));
delete [] prevArray;
}
@@ -429,8 +429,7 @@ void XFileImporter::CreateMeshes( aiScene* pScene, aiNode* pNode, const std::vec
pNode->mMeshes = new unsigned int[pNode->mNumMeshes];
// store all meshes in the mesh library of the scene and store their indices in the node
- for( unsigned int a = 0; a < meshes.size(); a++)
- {
+ for( unsigned int a = 0; a < meshes.size(); a++) {
pScene->mMeshes[pScene->mNumMeshes] = meshes[a];
pNode->mMeshes[a] = pScene->mNumMeshes;
pScene->mNumMeshes++;
@@ -439,16 +438,15 @@ void XFileImporter::CreateMeshes( aiScene* pScene, aiNode* pNode, const std::vec
// ------------------------------------------------------------------------------------------------
// Converts the animations from the given imported data and creates them in the scene.
-void XFileImporter::CreateAnimations( aiScene* pScene, const XFile::Scene* pData)
-{
+void XFileImporter::CreateAnimations( aiScene* pScene, const XFile::Scene* pData) {
std::vector<aiAnimation*> newAnims;
- for( unsigned int a = 0; a < pData->mAnims.size(); a++)
- {
+ for( unsigned int a = 0; a < pData->mAnims.size(); ++a ) {
const XFile::Animation* anim = pData->mAnims[a];
// some exporters mock me with empty animation tags.
- if( anim->mAnims.size() == 0)
+ if ( anim->mAnims.empty() ) {
continue;
+ }
// create a new animation to hold the data
aiAnimation* nanim = new aiAnimation;
@@ -460,15 +458,14 @@ void XFileImporter::CreateAnimations( aiScene* pScene, const XFile::Scene* pData
nanim->mNumChannels = (unsigned int)anim->mAnims.size();
nanim->mChannels = new aiNodeAnim*[nanim->mNumChannels];
- for( unsigned int b = 0; b < anim->mAnims.size(); b++)
- {
+ for( unsigned int b = 0; b < anim->mAnims.size(); ++b ) {
const XFile::AnimBone* bone = anim->mAnims[b];
aiNodeAnim* nbone = new aiNodeAnim;
nbone->mNodeName.Set( bone->mBoneName);
nanim->mChannels[b] = nbone;
- // keyframes are given as combined transformation matrix keys
- if( bone->mTrafoKeys.size() > 0)
+ // key-frames are given as combined transformation matrix keys
+ if( !bone->mTrafoKeys.empty() )
{
nbone->mNumPositionKeys = (unsigned int)bone->mTrafoKeys.size();
nbone->mPositionKeys = new aiVectorKey[nbone->mNumPositionKeys];
@@ -477,8 +474,7 @@ void XFileImporter::CreateAnimations( aiScene* pScene, const XFile::Scene* pData
nbone->mNumScalingKeys = (unsigned int)bone->mTrafoKeys.size();
nbone->mScalingKeys = new aiVectorKey[nbone->mNumScalingKeys];
- for( unsigned int c = 0; c < bone->mTrafoKeys.size(); c++)
- {
+ for( unsigned int c = 0; c < bone->mTrafoKeys.size(); ++c) {
// deconstruct each matrix into separate position, rotation and scaling
double time = bone->mTrafoKeys[c].mTime;
aiMatrix4x4 trafo = bone->mTrafoKeys[c].mMatrix;
@@ -510,13 +506,11 @@ void XFileImporter::CreateAnimations( aiScene* pScene, const XFile::Scene* pData
// longest lasting key sequence determines duration
nanim->mDuration = std::max( nanim->mDuration, bone->mTrafoKeys.back().mTime);
- } else
- {
+ } else {
// separate key sequences for position, rotation, scaling
nbone->mNumPositionKeys = (unsigned int)bone->mPosKeys.size();
nbone->mPositionKeys = new aiVectorKey[nbone->mNumPositionKeys];
- for( unsigned int c = 0; c < nbone->mNumPositionKeys; c++)
- {
+ for( unsigned int c = 0; c < nbone->mNumPositionKeys; ++c ) {
aiVector3D pos = bone->mPosKeys[c].mValue;
nbone->mPositionKeys[c].mTime = bone->mPosKeys[c].mTime;
@@ -526,8 +520,7 @@ void XFileImporter::CreateAnimations( aiScene* pScene, const XFile::Scene* pData
// rotation
nbone->mNumRotationKeys = (unsigned int)bone->mRotKeys.size();
nbone->mRotationKeys = new aiQuatKey[nbone->mNumRotationKeys];
- for( unsigned int c = 0; c < nbone->mNumRotationKeys; c++)
- {
+ for( unsigned int c = 0; c < nbone->mNumRotationKeys; ++c ) {
aiMatrix3x3 rotmat = bone->mRotKeys[c].mValue.GetMatrix();
nbone->mRotationKeys[c].mTime = bone->mRotKeys[c].mTime;
@@ -567,56 +560,51 @@ void XFileImporter::CreateAnimations( aiScene* pScene, const XFile::Scene* pData
void XFileImporter::ConvertMaterials( aiScene* pScene, std::vector<XFile::Material>& pMaterials)
{
// count the non-referrer materials in the array
- unsigned int numNewMaterials = 0;
- for( unsigned int a = 0; a < pMaterials.size(); a++)
- if( !pMaterials[a].mIsReference)
- numNewMaterials++;
+ unsigned int numNewMaterials( 0 );
+ for ( unsigned int a = 0; a < pMaterials.size(); ++a ) {
+ if ( !pMaterials[ a ].mIsReference ) {
+ ++numNewMaterials;
+ }
+ }
// resize the scene's material list to offer enough space for the new materials
- if( numNewMaterials > 0 )
- {
- aiMaterial** prevMats = pScene->mMaterials;
- pScene->mMaterials = new aiMaterial*[pScene->mNumMaterials + numNewMaterials];
- if( prevMats)
- {
- memcpy( pScene->mMaterials, prevMats, pScene->mNumMaterials * sizeof( aiMaterial*));
- delete [] prevMats;
- }
- }
+ if( numNewMaterials > 0 ) {
+ aiMaterial** prevMats = pScene->mMaterials;
+ pScene->mMaterials = new aiMaterial*[pScene->mNumMaterials + numNewMaterials];
+ if( nullptr != prevMats) {
+ ::memcpy( pScene->mMaterials, prevMats, pScene->mNumMaterials * sizeof( aiMaterial*));
+ delete [] prevMats;
+ }
+ }
// convert all the materials given in the array
- for( unsigned int a = 0; a < pMaterials.size(); a++)
- {
+ for( unsigned int a = 0; a < pMaterials.size(); ++a ) {
XFile::Material& oldMat = pMaterials[a];
- if( oldMat.mIsReference)
- {
- // find the material it refers to by name, and store its index
- for( size_t a = 0; a < pScene->mNumMaterials; ++a )
- {
- aiString name;
- pScene->mMaterials[a]->Get( AI_MATKEY_NAME, name);
- if( strcmp( name.C_Str(), oldMat.mName.data()) == 0 )
- {
- oldMat.sceneIndex = a;
- break;
- }
- }
+ if( oldMat.mIsReference) {
+ // find the material it refers to by name, and store its index
+ for( size_t a = 0; a < pScene->mNumMaterials; ++a ) {
+ aiString name;
+ pScene->mMaterials[a]->Get( AI_MATKEY_NAME, name);
+ if( strcmp( name.C_Str(), oldMat.mName.data()) == 0 ) {
+ oldMat.sceneIndex = a;
+ break;
+ }
+ }
- if( oldMat.sceneIndex == SIZE_MAX )
- {
- DefaultLogger::get()->warn( format() << "Could not resolve global material reference \"" << oldMat.mName << "\"" );
- oldMat.sceneIndex = 0;
- }
+ if( oldMat.sceneIndex == SIZE_MAX ) {
+ ASSIMP_LOG_WARN_F( "Could not resolve global material reference \"", oldMat.mName, "\"" );
+ oldMat.sceneIndex = 0;
+ }
- continue;
- }
+ continue;
+ }
aiMaterial* mat = new aiMaterial;
aiString name;
name.Set( oldMat.mName);
mat->AddProperty( &name, AI_MATKEY_NAME);
- // Shading model: hardcoded to PHONG, there is no such information in an XFile
+ // Shading model: hard-coded to PHONG, there is no such information in an XFile
// FIX (aramis): If the specular exponent is 0, use gouraud shading. This is a bugfix
// for some models in the SDK (e.g. good old tiny.x)
int shadeMode = (int)oldMat.mSpecularExponent == 0.0f
@@ -624,8 +612,8 @@ void XFileImporter::ConvertMaterials( aiScene* pScene, std::vector<XFile::Materi
mat->AddProperty<int>( &shadeMode, 1, AI_MATKEY_SHADING_MODEL);
// material colours
- // Unclear: there's no ambient colour, but emissive. What to put for ambient?
- // Probably nothing at all, let the user select a suitable default.
+ // Unclear: there's no ambient colour, but emissive. What to put for ambient?
+ // Probably nothing at all, let the user select a suitable default.
mat->AddProperty( &oldMat.mEmissive, 1, AI_MATKEY_COLOR_EMISSIVE);
mat->AddProperty( &oldMat.mDiffuse, 1, AI_MATKEY_COLOR_DIFFUSE);
mat->AddProperty( &oldMat.mSpecular, 1, AI_MATKEY_COLOR_SPECULAR);
@@ -633,36 +621,33 @@ void XFileImporter::ConvertMaterials( aiScene* pScene, std::vector<XFile::Materi
// texture, if there is one
- if (1 == oldMat.mTextures.size())
- {
+ if (1 == oldMat.mTextures.size() ) {
const XFile::TexEntry& otex = oldMat.mTextures.back();
- if (otex.mName.length())
- {
+ if (otex.mName.length()) {
// if there is only one texture assume it contains the diffuse color
aiString tex( otex.mName);
- if( otex.mIsNormalMap)
- mat->AddProperty( &tex, AI_MATKEY_TEXTURE_NORMALS(0));
- else
- mat->AddProperty( &tex, AI_MATKEY_TEXTURE_DIFFUSE(0));
+ if ( otex.mIsNormalMap ) {
+ mat->AddProperty( &tex, AI_MATKEY_TEXTURE_NORMALS( 0 ) );
+ } else {
+ mat->AddProperty( &tex, AI_MATKEY_TEXTURE_DIFFUSE( 0 ) );
+ }
}
- }
- else
- {
+ } else {
// Otherwise ... try to search for typical strings in the
// texture's file name like 'bump' or 'diffuse'
unsigned int iHM = 0,iNM = 0,iDM = 0,iSM = 0,iAM = 0,iEM = 0;
- for( unsigned int b = 0; b < oldMat.mTextures.size(); b++)
- {
+ for( unsigned int b = 0; b < oldMat.mTextures.size(); ++b ) {
const XFile::TexEntry& otex = oldMat.mTextures[b];
std::string sz = otex.mName;
- if (!sz.length())continue;
-
+ if ( !sz.length() ) {
+ continue;
+ }
// find the file name
- //const size_t iLen = sz.length();
std::string::size_type s = sz.find_last_of("\\/");
- if (std::string::npos == s)
+ if ( std::string::npos == s ) {
s = 0;
+ }
// cut off the file extension
std::string::size_type sExt = sz.find_last_of('.');
@@ -671,36 +656,27 @@ void XFileImporter::ConvertMaterials( aiScene* pScene, std::vector<XFile::Materi
}
// convert to lower case for easier comparison
- for( unsigned int c = 0; c < sz.length(); c++)
- if( isalpha( sz[c]))
- sz[c] = tolower( sz[c]);
-
+ for ( unsigned int c = 0; c < sz.length(); ++c ) {
+ if ( isalpha( sz[ c ] ) ) {
+ sz[ c ] = tolower( sz[ c ] );
+ }
+ }
// Place texture filename property under the corresponding name
aiString tex( oldMat.mTextures[b].mName);
// bump map
- if (std::string::npos != sz.find("bump", s) || std::string::npos != sz.find("height", s))
- {
+ if (std::string::npos != sz.find("bump", s) || std::string::npos != sz.find("height", s)) {
mat->AddProperty( &tex, AI_MATKEY_TEXTURE_HEIGHT(iHM++));
- } else
- if (otex.mIsNormalMap || std::string::npos != sz.find( "normal", s) || std::string::npos != sz.find("nm", s))
- {
+ } else if (otex.mIsNormalMap || std::string::npos != sz.find( "normal", s) || std::string::npos != sz.find("nm", s)) {
mat->AddProperty( &tex, AI_MATKEY_TEXTURE_NORMALS(iNM++));
- } else
- if (std::string::npos != sz.find( "spec", s) || std::string::npos != sz.find( "glanz", s))
- {
+ } else if (std::string::npos != sz.find( "spec", s) || std::string::npos != sz.find( "glanz", s)) {
mat->AddProperty( &tex, AI_MATKEY_TEXTURE_SPECULAR(iSM++));
- } else
- if (std::string::npos != sz.find( "ambi", s) || std::string::npos != sz.find( "env", s))
- {
+ } else if (std::string::npos != sz.find( "ambi", s) || std::string::npos != sz.find( "env", s)) {
mat->AddProperty( &tex, AI_MATKEY_TEXTURE_AMBIENT(iAM++));
- } else
- if (std::string::npos != sz.find( "emissive", s) || std::string::npos != sz.find( "self", s))
- {
+ } else if (std::string::npos != sz.find( "emissive", s) || std::string::npos != sz.find( "self", s)) {
mat->AddProperty( &tex, AI_MATKEY_TEXTURE_EMISSIVE(iEM++));
- } else
- {
+ } else {
// Assume it is a diffuse texture
mat->AddProperty( &tex, AI_MATKEY_TEXTURE_DIFFUSE(iDM++));
}
diff --git a/code/XFileImporter.h b/code/XFileImporter.h
index 528dcb851..b3c06eab1 100644
--- a/code/XFileImporter.h
+++ b/code/XFileImporter.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -48,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <map>
#include "XFileHelper.h"
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
#include <assimp/types.h>
@@ -65,14 +66,11 @@ struct Node;
/** The XFileImporter is a worker class capable of importing a scene from a
* DirectX file .x
*/
-class XFileImporter : public BaseImporter
-{
+class XFileImporter : public BaseImporter {
public:
XFileImporter();
~XFileImporter();
-
-public:
// -------------------------------------------------------------------
/** Returns whether the class can handle the format of the given file.
* See BaseImporter::CanRead() for details. */
diff --git a/code/XFileParser.cpp b/code/XFileParser.cpp
index f6030a0e0..e7bf8518c 100644
--- a/code/XFileParser.cpp
+++ b/code/XFileParser.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -47,11 +48,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "XFileParser.h"
#include "XFileHelper.h"
-#include "fast_atof.h"
-#include "Exceptional.h"
-#include "TinyFormatter.h"
-#include "ByteSwapper.h"
-#include "StringUtils.h"
+#include <assimp/fast_atof.h>
+#include <assimp/Exceptional.h>
+#include <assimp/TinyFormatter.h>
+#include <assimp/ByteSwapper.h>
+#include <assimp/StringUtils.h>
#include <assimp/DefaultLogger.hpp>
@@ -86,59 +87,60 @@ static void dummy_free (void* /*opaque*/, void* address) {
// ------------------------------------------------------------------------------------------------
// Constructor. Creates a data structure out of the XFile given in the memory block.
XFileParser::XFileParser( const std::vector<char>& pBuffer)
-{
- mMajorVersion = mMinorVersion = 0;
- mIsBinaryFormat = false;
- mBinaryNumCount = 0;
- P = End = NULL;
- mLineNumber = 0;
- mScene = NULL;
-
+: mMajorVersion( 0 )
+, mMinorVersion( 0 )
+, mIsBinaryFormat( false )
+, mBinaryNumCount( 0 )
+, mP( nullptr )
+, mEnd( nullptr )
+, mLineNumber( 0 )
+, mScene( nullptr ) {
// vector to store uncompressed file for INFLATE'd X files
std::vector<char> uncompressed;
// set up memory pointers
- P = &pBuffer.front();
- End = P + pBuffer.size() - 1;
+ mP = &pBuffer.front();
+ mEnd = mP + pBuffer.size() - 1;
// check header
- if( strncmp( P, "xof ", 4) != 0)
- throw DeadlyImportError( "Header mismatch, file is not an XFile.");
+ if ( 0 != strncmp( mP, "xof ", 4 ) ) {
+ throw DeadlyImportError( "Header mismatch, file is not an XFile." );
+ }
// read version. It comes in a four byte format such as "0302"
- mMajorVersion = (unsigned int)(P[4] - 48) * 10 + (unsigned int)(P[5] - 48);
- mMinorVersion = (unsigned int)(P[6] - 48) * 10 + (unsigned int)(P[7] - 48);
+ mMajorVersion = (unsigned int)(mP[4] - 48) * 10 + (unsigned int)(mP[5] - 48);
+ mMinorVersion = (unsigned int)(mP[6] - 48) * 10 + (unsigned int)(mP[7] - 48);
bool compressed = false;
// txt - pure ASCII text format
- if( strncmp( P + 8, "txt ", 4) == 0)
+ if( strncmp( mP + 8, "txt ", 4) == 0)
mIsBinaryFormat = false;
// bin - Binary format
- else if( strncmp( P + 8, "bin ", 4) == 0)
+ else if( strncmp( mP + 8, "bin ", 4) == 0)
mIsBinaryFormat = true;
// tzip - Inflate compressed text format
- else if( strncmp( P + 8, "tzip", 4) == 0)
+ else if( strncmp( mP + 8, "tzip", 4) == 0)
{
mIsBinaryFormat = false;
compressed = true;
}
// bzip - Inflate compressed binary format
- else if( strncmp( P + 8, "bzip", 4) == 0)
+ else if( strncmp( mP + 8, "bzip", 4) == 0)
{
mIsBinaryFormat = true;
compressed = true;
}
else ThrowException( format() << "Unsupported xfile format '" <<
- P[8] << P[9] << P[10] << P[11] << "'");
+ mP[8] << mP[9] << mP[10] << mP[11] << "'");
// float size
- mBinaryFloatSize = (unsigned int)(P[12] - 48) * 1000
- + (unsigned int)(P[13] - 48) * 100
- + (unsigned int)(P[14] - 48) * 10
- + (unsigned int)(P[15] - 48);
+ mBinaryFloatSize = (unsigned int)(mP[12] - 48) * 1000
+ + (unsigned int)(mP[13] - 48) * 100
+ + (unsigned int)(mP[14] - 48) * 10
+ + (unsigned int)(mP[15] - 48);
if( mBinaryFloatSize != 32 && mBinaryFloatSize != 64)
ThrowException( format() << "Unknown float size " << mBinaryFloatSize << " specified in xfile header." );
@@ -146,7 +148,7 @@ XFileParser::XFileParser( const std::vector<char>& pBuffer)
// The x format specifies size in bits, but we work in bytes
mBinaryFloatSize /= 8;
- P += 16;
+ mP += 16;
// If this is a compressed X file, apply the inflate algorithm to it
if (compressed)
@@ -185,13 +187,13 @@ XFileParser::XFileParser( const std::vector<char>& pBuffer)
::inflateInit2(&stream, -MAX_WBITS);
// skip unknown data (checksum, flags?)
- P += 6;
+ mP += 6;
// First find out how much storage we'll need. Count sections.
- const char* P1 = P;
+ const char* P1 = mP;
unsigned int est_out = 0;
- while (P1 + 3 < End)
+ while (P1 + 3 < mEnd)
{
// read next offset
uint16_t ofs = *((uint16_t*)P1);
@@ -215,18 +217,18 @@ XFileParser::XFileParser( const std::vector<char>& pBuffer)
// Allocate storage and terminating zero and do the actual uncompressing
uncompressed.resize(est_out + 1);
char* out = &uncompressed.front();
- while (P + 3 < End)
+ while (mP + 3 < mEnd)
{
- uint16_t ofs = *((uint16_t*)P);
+ uint16_t ofs = *((uint16_t*)mP);
AI_SWAP2(ofs);
- P += 4;
+ mP += 4;
- if (P + ofs > End + 2) {
+ if (mP + ofs > mEnd + 2) {
throw DeadlyImportError("X: Unexpected EOF in compressed chunk");
}
// push data to the stream
- stream.next_in = (Bytef*)P;
+ stream.next_in = (Bytef*)mP;
stream.avail_in = ofs;
stream.next_out = (Bytef*)out;
stream.avail_out = MSZIP_BLOCK;
@@ -241,19 +243,19 @@ XFileParser::XFileParser( const std::vector<char>& pBuffer)
// and advance to the next offset
out += MSZIP_BLOCK - stream.avail_out;
- P += ofs;
+ mP += ofs;
}
// terminate zlib
::inflateEnd(&stream);
// ok, update pointers to point to the uncompressed file data
- P = &uncompressed[0];
- End = out;
+ mP = &uncompressed[0];
+ mEnd = out;
// FIXME: we don't need the compressed data anymore, could release
// it already for better memory usage. Consider breaking const-co.
- DefaultLogger::get()->info("Successfully decompressed MSZIP-compressed file");
+ ASSIMP_LOG_INFO("Successfully decompressed MSZIP-compressed file");
#endif // !! ASSIMP_BUILD_NO_COMPRESSED_X
}
else
@@ -320,11 +322,11 @@ void XFileParser::ParseFile()
if( objectName == "}")
{
// whatever?
- DefaultLogger::get()->warn("} found in dataObject");
+ ASSIMP_LOG_WARN("} found in dataObject");
} else
{
// unknown format
- DefaultLogger::get()->warn("Unknown data object in animation of .x file");
+ ASSIMP_LOG_WARN("Unknown data object in animation of .x file");
ParseUnknownDataObject();
}
}
@@ -420,7 +422,7 @@ void XFileParser::ParseDataObjectFrame( Node* pParent)
ParseDataObjectMesh( mesh);
} else
{
- DefaultLogger::get()->warn("Unknown data object in frame in x file");
+ ASSIMP_LOG_WARN("Unknown data object in frame in x file");
ParseUnknownDataObject();
}
}
@@ -464,27 +466,25 @@ void XFileParser::ParseDataObjectMesh( Mesh* pMesh)
// read position faces
unsigned int numPosFaces = ReadInt();
pMesh->mPosFaces.resize( numPosFaces);
- for( unsigned int a = 0; a < numPosFaces; a++)
- {
- unsigned int numIndices = ReadInt();
- if( numIndices < 3) {
- ThrowException( format() << "Invalid index count " << numIndices << " for face " << a << "." );
- }
-
+ for( unsigned int a = 0; a < numPosFaces; ++a) {
// read indices
+ unsigned int numIndices = ReadInt();
Face& face = pMesh->mPosFaces[a];
- for( unsigned int b = 0; b < numIndices; b++)
- face.mIndices.push_back( ReadInt());
+ for (unsigned int b = 0; b < numIndices; ++b) {
+ const int idx( ReadInt() );
+ if ( static_cast<unsigned int>( idx ) <= numVertices ) {
+ face.mIndices.push_back( idx );
+ }
+ }
TestForSeparator();
}
// here, other data objects may follow
bool running = true;
- while ( running )
- {
+ while ( running ) {
std::string objectName = GetNextToken();
- if( objectName.size() == 0)
+ if( objectName.empty() )
ThrowException( "Unexpected end of file while parsing mesh structure");
else
if( objectName == "}")
@@ -512,15 +512,17 @@ void XFileParser::ParseDataObjectMesh( Mesh* pMesh)
ParseDataObjectSkinWeights( pMesh);
else
{
- DefaultLogger::get()->warn("Unknown data object in mesh in x file");
+ ASSIMP_LOG_WARN("Unknown data object in mesh in x file");
ParseUnknownDataObject();
}
}
}
// ------------------------------------------------------------------------------------------------
-void XFileParser::ParseDataObjectSkinWeights( Mesh *pMesh)
-{
+void XFileParser::ParseDataObjectSkinWeights( Mesh *pMesh) {
+ if ( nullptr == pMesh ) {
+ return;
+ }
readHeadOfDataObject();
std::string transformNodeName;
@@ -649,8 +651,8 @@ void XFileParser::ParseDataObjectMeshVertexColors( Mesh* pMesh)
if( !mIsBinaryFormat)
{
FindNextNoneWhiteSpace();
- if( *P == ';' || *P == ',')
- P++;
+ if( *mP == ';' || *mP == ',')
+ mP++;
}
}
@@ -680,8 +682,8 @@ void XFileParser::ParseDataObjectMeshMaterialList( Mesh* pMesh)
// commented out version check, as version 03.03 exported from blender also has 2 semicolons
if( !mIsBinaryFormat) // && MajorVersion == 3 && MinorVersion <= 2)
{
- if(P < End && *P == ';')
- ++P;
+ if(mP < mEnd && *mP == ';')
+ ++mP;
}
// if there was only a single material index, replicate it on all faces
@@ -720,7 +722,7 @@ void XFileParser::ParseDataObjectMeshMaterialList( Mesh* pMesh)
// ignore
} else
{
- DefaultLogger::get()->warn("Unknown data object in material list in x file");
+ ASSIMP_LOG_WARN("Unknown data object in material list in x file");
ParseUnknownDataObject();
}
}
@@ -768,7 +770,7 @@ void XFileParser::ParseDataObjectMaterial( Material* pMaterial)
pMaterial->mTextures.push_back( TexEntry( texname, true));
} else
{
- DefaultLogger::get()->warn("Unknown data object in material in x file");
+ ASSIMP_LOG_WARN("Unknown data object in material in x file");
ParseUnknownDataObject();
}
}
@@ -806,7 +808,7 @@ void XFileParser::ParseDataObjectAnimationSet()
ParseDataObjectAnimation( anim);
else
{
- DefaultLogger::get()->warn("Unknown data object in animation set in x file");
+ ASSIMP_LOG_WARN("Unknown data object in animation set in x file");
ParseUnknownDataObject();
}
}
@@ -843,7 +845,7 @@ void XFileParser::ParseDataObjectAnimation( Animation* pAnim)
CheckForClosingBrace();
} else
{
- DefaultLogger::get()->warn("Unknown data object in animation in x file");
+ ASSIMP_LOG_WARN("Unknown data object in animation in x file");
ParseUnknownDataObject();
}
}
@@ -951,7 +953,7 @@ void XFileParser::ParseDataObjectTextureFilename( std::string& pName)
// FIX: some files (e.g. AnimationTest.x) have "" as texture file name
if (!pName.length())
{
- DefaultLogger::get()->warn("Length of texture file name is zero. Skipping this texture.");
+ ASSIMP_LOG_WARN("Length of texture file name is zero. Skipping this texture.");
}
// some exporters write double backslash paths out. We simply replace them if we find them
@@ -1031,12 +1033,12 @@ void XFileParser::TestForSeparator()
return;
FindNextNoneWhiteSpace();
- if( P >= End)
+ if( mP >= mEnd)
return;
// test and skip
- if( *P == ';' || *P == ',')
- P++;
+ if( *mP == ';' || *mP == ',')
+ mP++;
}
// ------------------------------------------------------------------------------------------------
@@ -1048,62 +1050,73 @@ void XFileParser::readHeadOfDataObject( std::string* poName)
if( poName)
*poName = nameOrBrace;
- if( GetNextToken() != "{")
- ThrowException( "Opening brace expected.");
+ if ( GetNextToken() != "{" ) {
+ delete mScene;
+ ThrowException( "Opening brace expected." );
+ }
}
}
// ------------------------------------------------------------------------------------------------
-std::string XFileParser::GetNextToken()
-{
+std::string XFileParser::GetNextToken() {
std::string s;
// process binary-formatted file
- if( mIsBinaryFormat)
- {
+ if( mIsBinaryFormat) {
// in binary mode it will only return NAME and STRING token
// and (correctly) skip over other tokens.
-
- if( End - P < 2) return s;
+ if ( mEnd - mP < 2 ) {
+ return s;
+ }
unsigned int tok = ReadBinWord();
unsigned int len;
// standalone tokens
- switch( tok)
- {
- case 1:
+ switch( tok ) {
+ case 1: {
// name token
- if( End - P < 4) return s;
+ if ( mEnd - mP < 4 ) {
+ return s;
+ }
len = ReadBinDWord();
- if( End - P < int(len)) return s;
- s = std::string(P, len);
- P += len;
- return s;
+ const int bounds = int( mEnd - mP );
+ const int iLen = int( len );
+ if ( iLen < 0 ) {
+ return s;
+ }
+ if ( bounds < iLen ) {
+ return s;
+ }
+ s = std::string( mP, len );
+ mP += len;
+ }
+ return s;
+
case 2:
// string token
- if( End - P < 4) return s;
+ if( mEnd - mP < 4) return s;
len = ReadBinDWord();
- if( End - P < int(len)) return s;
- s = std::string(P, len);
- P += (len + 2);
+ if( mEnd - mP < int(len)) return s;
+ s = std::string(mP, len);
+ mP += (len + 2);
return s;
case 3:
// integer token
- P += 4;
+ mP += 4;
return "<integer>";
case 5:
// GUID token
- P += 16;
+ mP += 16;
return "<guid>";
case 6:
- if( End - P < 4) return s;
+ if( mEnd - mP < 4) return s;
len = ReadBinDWord();
- P += (len * 4);
+ mP += (len * 4);
return "<int_list>";
case 7:
- if( End - P < 4) return s;
+ if( mEnd - mP < 4) return s;
len = ReadBinDWord();
- P += (len * mBinaryFloatSize);
+ mP += (len * mBinaryFloatSize);
return "<flt_list>";
case 0x0a:
return "{";
@@ -1161,19 +1174,19 @@ std::string XFileParser::GetNextToken()
else
{
FindNextNoneWhiteSpace();
- if( P >= End)
+ if( mP >= mEnd)
return s;
- while( (P < End) && !isspace( (unsigned char) *P))
+ while( (mP < mEnd) && !isspace( (unsigned char) *mP))
{
// either keep token delimiters when already holding a token, or return if first valid char
- if( *P == ';' || *P == '}' || *P == '{' || *P == ',')
+ if( *mP == ';' || *mP == '}' || *mP == '{' || *mP == ',')
{
if( !s.size())
- s.append( P++, 1);
+ s.append( mP++, 1);
break; // stop for delimiter
}
- s.append( P++, 1);
+ s.append( mP++, 1);
}
}
return s;
@@ -1188,18 +1201,18 @@ void XFileParser::FindNextNoneWhiteSpace()
bool running = true;
while( running )
{
- while( P < End && isspace( (unsigned char) *P))
+ while( mP < mEnd && isspace( (unsigned char) *mP))
{
- if( *P == '\n')
+ if( *mP == '\n')
mLineNumber++;
- ++P;
+ ++mP;
}
- if( P >= End)
+ if( mP >= mEnd)
return;
// check if this is a comment
- if( (P[0] == '/' && P[1] == '/') || P[0] == '#')
+ if( (mP[0] == '/' && mP[1] == '/') || mP[0] == '#')
ReadUntilEndOfLine();
else
break;
@@ -1216,22 +1229,30 @@ void XFileParser::GetNextTokenAsString( std::string& poString)
}
FindNextNoneWhiteSpace();
- if( P >= End)
- ThrowException( "Unexpected end of file while parsing string");
+ if ( mP >= mEnd ) {
+ delete mScene;
+ ThrowException( "Unexpected end of file while parsing string" );
+ }
- if( *P != '"')
- ThrowException( "Expected quotation mark.");
- ++P;
+ if ( *mP != '"' ) {
+ delete mScene;
+ ThrowException( "Expected quotation mark." );
+ }
+ ++mP;
- while( P < End && *P != '"')
- poString.append( P++, 1);
+ while( mP < mEnd && *mP != '"')
+ poString.append( mP++, 1);
- if( P >= End-1)
- ThrowException( "Unexpected end of file while parsing string");
+ if ( mP >= mEnd - 1 ) {
+ delete mScene;
+ ThrowException( "Unexpected end of file while parsing string" );
+ }
- if( P[1] != ';' || P[0] != '"')
- ThrowException( "Expected quotation mark and semicolon at the end of a string.");
- P+=2;
+ if ( mP[ 1 ] != ';' || mP[ 0 ] != '"' ) {
+ delete mScene;
+ ThrowException( "Expected quotation mark and semicolon at the end of a string." );
+ }
+ mP+=2;
}
// ------------------------------------------------------------------------------------------------
@@ -1240,57 +1261,58 @@ void XFileParser::ReadUntilEndOfLine()
if( mIsBinaryFormat)
return;
- while( P < End)
+ while( mP < mEnd)
{
- if( *P == '\n' || *P == '\r')
+ if( *mP == '\n' || *mP == '\r')
{
- ++P; mLineNumber++;
+ ++mP; mLineNumber++;
return;
}
- ++P;
+ ++mP;
}
}
// ------------------------------------------------------------------------------------------------
unsigned short XFileParser::ReadBinWord()
{
- ai_assert(End - P >= 2);
- const unsigned char* q = (const unsigned char*) P;
+ ai_assert(mEnd - mP >= 2);
+ const unsigned char* q = (const unsigned char*) mP;
unsigned short tmp = q[0] | (q[1] << 8);
- P += 2;
+ mP += 2;
return tmp;
}
// ------------------------------------------------------------------------------------------------
-unsigned int XFileParser::ReadBinDWord()
-{
- ai_assert(End - P >= 4);
- const unsigned char* q = (const unsigned char*) P;
+unsigned int XFileParser::ReadBinDWord() {
+ ai_assert(mEnd - mP >= 4);
+
+ const unsigned char* q = (const unsigned char*) mP;
unsigned int tmp = q[0] | (q[1] << 8) | (q[2] << 16) | (q[3] << 24);
- P += 4;
+ mP += 4;
return tmp;
}
// ------------------------------------------------------------------------------------------------
unsigned int XFileParser::ReadInt()
{
- if( mIsBinaryFormat)
+ if( mIsBinaryFormat)
{
- if( mBinaryNumCount == 0 && End - P >= 2)
+ if( mBinaryNumCount == 0 && mEnd - mP >= 2)
{
unsigned short tmp = ReadBinWord(); // 0x06 or 0x03
- if( tmp == 0x06 && End - P >= 4) // array of ints follows
+ if( tmp == 0x06 && mEnd - mP >= 4) // array of ints follows
mBinaryNumCount = ReadBinDWord();
else // single int follows
mBinaryNumCount = 1;
}
--mBinaryNumCount;
- if ( End - P >= 4) {
+ const size_t len( mEnd - mP );
+ if ( len >= 4) {
return ReadBinDWord();
} else {
- P = End;
+ mP = mEnd;
return 0;
}
} else
@@ -1301,27 +1323,28 @@ unsigned int XFileParser::ReadInt()
// check preceding minus sign
bool isNegative = false;
- if( *P == '-')
+ if( *mP == '-')
{
isNegative = true;
- P++;
+ mP++;
}
// at least one digit expected
- if( !isdigit( *P))
+ if( !isdigit( *mP))
ThrowException( "Number expected.");
// read digits
unsigned int number = 0;
- while( P < End)
+ while( mP < mEnd)
{
- if( !isdigit( *P))
+ if( !isdigit( *mP))
break;
- number = number * 10 + (*P - 48);
- P++;
+ number = number * 10 + (*mP - 48);
+ mP++;
}
CheckForSeparator();
+
return isNegative ? ((unsigned int) -int( number)) : number;
}
}
@@ -1331,34 +1354,35 @@ ai_real XFileParser::ReadFloat()
{
if( mIsBinaryFormat)
{
- if( mBinaryNumCount == 0 && End - P >= 2)
+ if( mBinaryNumCount == 0 && mEnd - mP >= 2)
{
unsigned short tmp = ReadBinWord(); // 0x07 or 0x42
- if( tmp == 0x07 && End - P >= 4) // array of floats following
+ if( tmp == 0x07 && mEnd - mP >= 4) // array of floats following
mBinaryNumCount = ReadBinDWord();
else // single float following
mBinaryNumCount = 1;
}
--mBinaryNumCount;
- if( mBinaryFloatSize == 8)
- {
- if( End - P >= 8) {
- ai_real result = (ai_real) (*(double*) P);
- P += 8;
+ if( mBinaryFloatSize == 8) {
+ if( mEnd - mP >= 8) {
+ double res;
+ ::memcpy( &res, mP, 8 );
+ mP += 8;
+ const ai_real result( static_cast<ai_real>( res ) );
return result;
} else {
- P = End;
+ mP = mEnd;
return 0;
}
- } else
- {
- if( End - P >= 4) {
- ai_real result = *(ai_real*) P;
- P += 4;
+ } else {
+ if( mEnd - mP >= 4) {
+ ai_real result;
+ ::memcpy( &result, mP, 4 );
+ mP += 4;
return result;
} else {
- P = End;
+ mP = mEnd;
return 0;
}
}
@@ -1369,21 +1393,21 @@ ai_real XFileParser::ReadFloat()
// check for various special strings to allow reading files from faulty exporters
// I mean you, Blender!
// Reading is safe because of the terminating zero
- if( strncmp( P, "-1.#IND00", 9) == 0 || strncmp( P, "1.#IND00", 8) == 0)
+ if( strncmp( mP, "-1.#IND00", 9) == 0 || strncmp( mP, "1.#IND00", 8) == 0)
{
- P += 9;
+ mP += 9;
CheckForSeparator();
return 0.0;
} else
- if( strncmp( P, "1.#QNAN0", 8) == 0)
+ if( strncmp( mP, "1.#QNAN0", 8) == 0)
{
- P += 8;
+ mP += 8;
CheckForSeparator();
return 0.0;
}
ai_real result = 0.0;
- P = fast_atoreal_move<ai_real>( P, result);
+ mP = fast_atoreal_move<ai_real>( mP, result);
CheckForSeparator();
@@ -1440,15 +1464,14 @@ aiColor3D XFileParser::ReadRGB()
// ------------------------------------------------------------------------------------------------
// Throws an exception with a line number and the given text.
-AI_WONT_RETURN void XFileParser::ThrowException( const std::string& pText)
-{
- if( mIsBinaryFormat)
- throw DeadlyImportError( pText);
- else
+AI_WONT_RETURN void XFileParser::ThrowException( const std::string& pText) {
+ if ( mIsBinaryFormat ) {
+ throw DeadlyImportError( pText );
+ } else {
throw DeadlyImportError( format() << "Line " << mLineNumber << ": " << pText );
+ }
}
-
// ------------------------------------------------------------------------------------------------
// Filters the imported hierarchy for some degenerated cases that some exporters produce.
void XFileParser::FilterHierarchy( XFile::Node* pNode)
diff --git a/code/XFileParser.h b/code/XFileParser.h
index ec823bac0..24eb6104d 100644
--- a/code/XFileParser.h
+++ b/code/XFileParser.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -48,10 +49,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/types.h>
-namespace Assimp
-{
- namespace XFile
- {
+namespace Assimp {
+ namespace XFile {
struct Node;
struct Mesh;
struct Scene;
@@ -60,21 +59,20 @@ namespace Assimp
struct AnimBone;
}
-/** The XFileParser reads a XFile either in text or binary form and builds a temporary
- * data structure out of it.
- */
-class XFileParser
-{
+/**
+ * @brief The XFileParser reads a XFile either in text or binary form and builds a temporary
+ * data structure out of it.
+ */
+class XFileParser {
public:
- /** Constructor. Creates a data structure out of the XFile given in the memory block.
- * @param pBuffer Null-terminated memory buffer containing the XFile
- */
+ /// Constructor. Creates a data structure out of the XFile given in the memory block.
+ /// @param pBuffer Null-terminated memory buffer containing the XFile
explicit XFileParser( const std::vector<char>& pBuffer);
- /** Destructor. Destroys all imported data along with it */
+ /// Destructor. Destroys all imported data along with it
~XFileParser();
- /** Returns the temporary representation of the imported data */
+ /// Returns the temporary representation of the imported data.
XFile::Scene* GetImportedData() const { return mScene; }
protected:
@@ -100,10 +98,10 @@ protected:
//! places pointer to next begin of a token, and ignores comments
void FindNextNoneWhiteSpace();
- //! returns next parseable token. Returns empty string if no token there
+ //! returns next valid token. Returns empty string if no token there
std::string GetNextToken();
- //! reads header of dataobject including the opening brace.
+ //! reads header of data object including the opening brace.
//! returns false if error happened, and writes name of object
//! if there is one
void readHeadOfDataObject( std::string* poName = NULL);
@@ -117,8 +115,8 @@ protected:
//! checks for a separator char, either a ',' or a ';'
void CheckForSeparator();
- /// tests and possibly consumes a separator char, but does nothing if there was no separator
- void TestForSeparator();
+ /// tests and possibly consumes a separator char, but does nothing if there was no separator
+ void TestForSeparator();
//! reads a x file style string
void GetNextTokenAsString( std::string& poString);
@@ -137,27 +135,23 @@ protected:
/** Throws an exception with a line number and the given text. */
AI_WONT_RETURN void ThrowException( const std::string& pText) AI_WONT_RETURN_SUFFIX;
- /** Filters the imported hierarchy for some degenerated cases that some exporters produce.
- * @param pData The sub-hierarchy to filter
- */
+ /**
+ * @brief Filters the imported hierarchy for some degenerated cases that some exporters produce.
+ * @param pData The sub-hierarchy to filter
+ */
void FilterHierarchy( XFile::Node* pNode);
protected:
unsigned int mMajorVersion, mMinorVersion; ///< version numbers
bool mIsBinaryFormat; ///< true if the file is in binary, false if it's in text form
unsigned int mBinaryFloatSize; ///< float size in bytes, either 4 or 8
- // counter for number arrays in binary format
- unsigned int mBinaryNumCount;
-
- const char* P;
- const char* End;
-
- /// Line number when reading in text format
- unsigned int mLineNumber;
-
- /// Imported data
- XFile::Scene* mScene;
+ unsigned int mBinaryNumCount; /// < counter for number arrays in binary format
+ const char* mP;
+ const char* mEnd;
+ unsigned int mLineNumber; ///< Line number when reading in text format
+ XFile::Scene* mScene; ///< Imported data
};
-}
+} //! ns Assimp
+
#endif // AI_XFILEPARSER_H_INC
diff --git a/code/XGLLoader.cpp b/code/XGLLoader.cpp
index bafcda3f2..0706ffd55 100644
--- a/code/XGLLoader.cpp
+++ b/code/XGLLoader.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -46,11 +47,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_NO_XGL_IMPORTER
#include "XGLLoader.h"
-#include "ParsingUtils.h"
-#include "fast_atof.h"
+#include <assimp/ParsingUtils.h>
+#include <assimp/fast_atof.h>
-#include "StreamReader.h"
-#include "MemoryIOWrapper.h"
+#include <assimp/StreamReader.h>
+#include <assimp/MemoryIOWrapper.h>
#include <assimp/mesh.h>
#include <assimp/scene.h>
#include <assimp/importerdesc.h>
@@ -71,20 +72,12 @@ using namespace irr::io;
#endif
-// scopeguard for a malloc'ed buffer
-struct free_it
-{
- free_it(void* free) : free(free) {}
- ~free_it() {
- ::free(this->free);
- }
-
- void* free;
-};
-
namespace Assimp { // this has to be in here because LogFunctions is in ::Assimp
-template<> const std::string LogFunctions<XGLImporter>::log_prefix = "XGL: ";
-
+ template<> const char* LogFunctions<XGLImporter>::Prefix()
+ {
+ static auto prefix = "XGL: ";
+ return prefix;
+ }
}
static const aiImporterDesc desc = {
@@ -151,8 +144,7 @@ void XGLImporter::InternReadFile( const std::string& pFile,
aiScene* pScene, IOSystem* pIOHandler)
{
#ifndef ASSIMP_BUILD_NO_COMPRESSED_XGL
- Bytef* dest = NULL;
- free_it free_it_really(dest);
+ std::vector<Bytef> uncompressed;
#endif
m_scene = pScene;
@@ -188,6 +180,7 @@ void XGLImporter::InternReadFile( const std::string& pFile,
size_t total = 0l;
+ // TODO: be smarter about this, decompress directly into heap buffer
// and decompress the data .... do 1k chunks in the hope that we won't kill the stack
#define MYBLOCK 1024
Bytef block[MYBLOCK];
@@ -202,8 +195,8 @@ void XGLImporter::InternReadFile( const std::string& pFile,
}
const size_t have = MYBLOCK - zstream.avail_out;
total += have;
- dest = reinterpret_cast<Bytef*>( realloc(dest,total) );
- memcpy(dest + total - have,block,have);
+ uncompressed.resize(total);
+ memcpy(uncompressed.data() + total - have,block,have);
}
while (ret != Z_STREAM_END);
@@ -211,7 +204,7 @@ void XGLImporter::InternReadFile( const std::string& pFile,
inflateEnd(&zstream);
// replace the input stream with a memory stream
- stream.reset(new MemoryIOStream(reinterpret_cast<uint8_t*>(dest),total));
+ stream.reset(new MemoryIOStream(reinterpret_cast<uint8_t*>(uncompressed.data()),total));
#endif
}
@@ -356,7 +349,7 @@ void XGLImporter::ReadLighting(TempScope& scope)
// ------------------------------------------------------------------------------------------------
aiLight* XGLImporter::ReadDirectionalLight()
{
- ScopeGuard<aiLight> l(new aiLight());
+ std::unique_ptr<aiLight> l(new aiLight());
l->mType = aiLightSource_DIRECTIONAL;
while (ReadElementUpToClosing("directionallight")) {
@@ -371,13 +364,13 @@ aiLight* XGLImporter::ReadDirectionalLight()
l->mColorSpecular = ReadCol3();
}
}
- return l.dismiss();
+ return l.release();
}
// ------------------------------------------------------------------------------------------------
aiNode* XGLImporter::ReadObject(TempScope& scope, bool skipFirst, const char* closetag)
{
- ScopeGuard<aiNode> nd(new aiNode());
+ std::unique_ptr<aiNode> nd(new aiNode());
std::vector<aiNode*> children;
std::vector<unsigned int> meshes;
@@ -460,11 +453,11 @@ aiNode* XGLImporter::ReadObject(TempScope& scope, bool skipFirst, const char* cl
nd->mChildren = new aiNode*[nd->mNumChildren]();
for(unsigned int i = 0; i < nd->mNumChildren; ++i) {
nd->mChildren[i] = children[i];
- children[i]->mParent = nd;
+ children[i]->mParent = nd.get();
}
}
- return nd.dismiss();
+ return nd.release();
}
// ------------------------------------------------------------------------------------------------
@@ -505,7 +498,7 @@ aiMatrix4x4 XGLImporter::ReadTrafo()
right = forward ^ up;
if (std::fabs(up * forward) > 1e-4) {
// this is definitely wrong - a degenerate coordinate space ruins everything
- // so subtitute identity transform.
+ // so substitute identity transform.
LogError("<forward> and <up> vectors in <transform> are skewing, ignoring trafo");
return m;
}
@@ -536,7 +529,7 @@ aiMatrix4x4 XGLImporter::ReadTrafo()
// ------------------------------------------------------------------------------------------------
aiMesh* XGLImporter::ToOutputMesh(const TempMaterialMesh& m)
{
- ScopeGuard<aiMesh> mesh(new aiMesh());
+ std::unique_ptr<aiMesh> mesh(new aiMesh());
mesh->mNumVertices = static_cast<unsigned int>(m.positions.size());
mesh->mVertices = new aiVector3D[mesh->mNumVertices];
@@ -573,7 +566,7 @@ aiMesh* XGLImporter::ToOutputMesh(const TempMaterialMesh& m)
mesh->mPrimitiveTypes = m.pflags;
mesh->mMaterialIndex = m.matid;
- return mesh.dismiss();
+ return mesh.release();
}
// ------------------------------------------------------------------------------------------------
@@ -742,7 +735,7 @@ void XGLImporter::ReadMaterial(TempScope& scope)
{
const unsigned int mat_id = ReadIDAttr();
- ScopeGuard<aiMaterial> mat(new aiMaterial());
+ std::unique_ptr<aiMaterial> mat(new aiMaterial());
while (ReadElementUpToClosing("mat")) {
const std::string& s = GetElementName();
if (s == "amb") {
@@ -771,8 +764,8 @@ void XGLImporter::ReadMaterial(TempScope& scope)
}
}
- scope.materials[mat_id] = mat;
- scope.materials_linear.push_back(mat.dismiss());
+ scope.materials[mat_id] = mat.get();
+ scope.materials_linear.push_back(mat.release());
}
@@ -901,12 +894,14 @@ aiVector2D XGLImporter::ReadVec2()
}
const char* s = m_reader->getNodeData();
- for(int i = 0; i < 2; ++i) {
+ ai_real v[2];
+ for(int i = 0; i < 2; ++i) {
if(!SkipSpaces(&s)) {
LogError("unexpected EOL, failed to parse vec2");
return vec;
}
- vec[i] = fast_atof(&s);
+
+ v[i] = fast_atof(&s);
SkipSpaces(&s);
if (i != 1 && *s != ',') {
@@ -915,6 +910,8 @@ aiVector2D XGLImporter::ReadVec2()
}
++s;
}
+ vec.x = v[0];
+ vec.y = v[1];
return vec;
}
diff --git a/code/XGLLoader.h b/code/XGLLoader.h
index 97ae5f8a3..8ae05836a 100644
--- a/code/XGLLoader.h
+++ b/code/XGLLoader.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -45,9 +46,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_XGLLOADER_H_INCLUDED
#define AI_XGLLOADER_H_INCLUDED
-#include "BaseImporter.h"
-#include "irrXMLWrapper.h"
-#include "LogAux.h"
+#include <assimp/BaseImporter.h>
+#include <assimp/irrXMLWrapper.h>
+#include <assimp/LogAux.h>
#include <assimp/material.h>
#include <assimp/Importer.hpp>
#include <assimp/mesh.h>
diff --git a/code/glTF2Asset.h b/code/glTF2Asset.h
new file mode 100644
index 000000000..92be82f3b
--- /dev/null
+++ b/code/glTF2Asset.h
@@ -0,0 +1,1117 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2018, assimp 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 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 glTFAsset.h
+ * Declares a glTF class to handle gltf/glb files
+ *
+ * glTF Extensions Support:
+ * KHR_materials_pbrSpecularGlossiness full
+ * KHR_materials_unlit full
+ */
+#ifndef GLTF2ASSET_H_INC
+#define GLTF2ASSET_H_INC
+
+#ifndef ASSIMP_BUILD_NO_GLTF_IMPORTER
+
+#include <map>
+#include <string>
+#include <list>
+#include <vector>
+#include <algorithm>
+#include <stdexcept>
+
+#define RAPIDJSON_HAS_STDSTRING 1
+#include <rapidjson/rapidjson.h>
+#include <rapidjson/document.h>
+#include <rapidjson/error/en.h>
+
+#ifdef ASSIMP_API
+# include <memory>
+# include <assimp/DefaultIOSystem.h>
+# include <assimp/ByteSwapper.h>
+#else
+# include <memory>
+# define AI_SWAP4(p)
+# define ai_assert
+#endif
+
+
+#if _MSC_VER > 1500 || (defined __GNUC___)
+# define ASSIMP_GLTF_USE_UNORDERED_MULTIMAP
+# else
+# define gltf_unordered_map map
+#endif
+
+#ifdef ASSIMP_GLTF_USE_UNORDERED_MULTIMAP
+# include <unordered_map>
+# if _MSC_VER > 1600
+# define gltf_unordered_map unordered_map
+# else
+# define gltf_unordered_map tr1::unordered_map
+# endif
+#endif
+
+#include <assimp/StringUtils.h>
+
+namespace glTF2
+{
+#ifdef ASSIMP_API
+ using Assimp::IOStream;
+ using Assimp::IOSystem;
+ using std::shared_ptr;
+#else
+ using std::shared_ptr;
+
+ typedef std::runtime_error DeadlyImportError;
+ typedef std::runtime_error DeadlyExportError;
+
+ enum aiOrigin { aiOrigin_SET = 0, aiOrigin_CUR = 1, aiOrigin_END = 2 };
+ class IOSystem;
+ class IOStream
+ {
+ FILE* f;
+ public:
+ IOStream(FILE* file) : f(file) {}
+ ~IOStream() { fclose(f); f = 0; }
+
+ size_t Read(void* b, size_t sz, size_t n) { return fread(b, sz, n, f); }
+ size_t Write(const void* b, size_t sz, size_t n) { return fwrite(b, sz, n, f); }
+ int Seek(size_t off, aiOrigin orig) { return fseek(f, off, int(orig)); }
+ size_t Tell() const { return ftell(f); }
+
+ size_t FileSize() {
+ long p = Tell(), len = (Seek(0, aiOrigin_END), Tell());
+ return size_t((Seek(p, aiOrigin_SET), len));
+ }
+ };
+#endif
+
+ using rapidjson::Value;
+ using rapidjson::Document;
+
+ class Asset;
+ class AssetWriter;
+
+ struct BufferView; // here due to cross-reference
+ struct Texture;
+ struct Skin;
+
+ // Vec/matrix types, as raw float arrays
+ typedef float (vec3)[3];
+ typedef float (vec4)[4];
+ typedef float (mat4)[16];
+
+ namespace Util
+ {
+ void EncodeBase64(const uint8_t* in, size_t inLength, std::string& out);
+
+ size_t DecodeBase64(const char* in, size_t inLength, uint8_t*& out);
+
+ inline size_t DecodeBase64(const char* in, uint8_t*& out)
+ {
+ return DecodeBase64(in, strlen(in), out);
+ }
+
+ struct DataURI
+ {
+ const char* mediaType;
+ const char* charset;
+ bool base64;
+ const char* data;
+ size_t dataLength;
+ };
+
+ //! Check if a uri is a data URI
+ inline bool ParseDataURI(const char* uri, size_t uriLen, DataURI& out);
+ }
+
+
+ //! Magic number for GLB files
+ #define AI_GLB_MAGIC_NUMBER "glTF"
+ #include <assimp/pbrmaterial.h>
+
+ #ifdef ASSIMP_API
+ #include <assimp/Compiler/pushpack1.h>
+ #endif
+
+ //! For binary .glb files
+ //! 12-byte header (+ the JSON + a "body" data section)
+ struct GLB_Header
+ {
+ uint8_t magic[4]; //!< Magic number: "glTF"
+ uint32_t version; //!< Version number (always 2 as of the last update)
+ uint32_t length; //!< Total length of the Binary glTF, including header, scene, and body, in bytes
+ } PACK_STRUCT;
+
+ struct GLB_Chunk
+ {
+ uint32_t chunkLength;
+ uint32_t chunkType;
+ } PACK_STRUCT;
+
+ #ifdef ASSIMP_API
+ #include <assimp/Compiler/poppack1.h>
+ #endif
+
+
+ //! Values for the GLB_Chunk::chunkType field
+ enum ChunkType
+ {
+ ChunkType_JSON = 0x4E4F534A,
+ ChunkType_BIN = 0x004E4942
+ };
+
+ //! Values for the mesh primitive modes
+ enum PrimitiveMode
+ {
+ PrimitiveMode_POINTS = 0,
+ PrimitiveMode_LINES = 1,
+ PrimitiveMode_LINE_LOOP = 2,
+ PrimitiveMode_LINE_STRIP = 3,
+ PrimitiveMode_TRIANGLES = 4,
+ PrimitiveMode_TRIANGLE_STRIP = 5,
+ PrimitiveMode_TRIANGLE_FAN = 6
+ };
+
+ //! Values for the Accessor::componentType field
+ enum ComponentType
+ {
+ ComponentType_BYTE = 5120,
+ ComponentType_UNSIGNED_BYTE = 5121,
+ ComponentType_SHORT = 5122,
+ ComponentType_UNSIGNED_SHORT = 5123,
+ ComponentType_UNSIGNED_INT = 5125,
+ ComponentType_FLOAT = 5126
+ };
+
+ inline unsigned int ComponentTypeSize(ComponentType t)
+ {
+ switch (t) {
+ case ComponentType_SHORT:
+ case ComponentType_UNSIGNED_SHORT:
+ return 2;
+
+ case ComponentType_UNSIGNED_INT:
+ case ComponentType_FLOAT:
+ return 4;
+
+ case ComponentType_BYTE:
+ case ComponentType_UNSIGNED_BYTE:
+ return 1;
+ default:
+ throw DeadlyImportError("GLTF: Unsupported Component Type " + to_string(t));
+ }
+ }
+
+ //! Values for the BufferView::target field
+ enum BufferViewTarget
+ {
+ BufferViewTarget_ARRAY_BUFFER = 34962,
+ BufferViewTarget_ELEMENT_ARRAY_BUFFER = 34963
+ };
+
+ //! Values for the Sampler::magFilter field
+ enum class SamplerMagFilter: unsigned int
+ {
+ UNSET = 0,
+ SamplerMagFilter_Nearest = 9728,
+ SamplerMagFilter_Linear = 9729
+ };
+
+ //! Values for the Sampler::minFilter field
+ enum class SamplerMinFilter: unsigned int
+ {
+ UNSET = 0,
+ SamplerMinFilter_Nearest = 9728,
+ SamplerMinFilter_Linear = 9729,
+ SamplerMinFilter_Nearest_Mipmap_Nearest = 9984,
+ SamplerMinFilter_Linear_Mipmap_Nearest = 9985,
+ SamplerMinFilter_Nearest_Mipmap_Linear = 9986,
+ SamplerMinFilter_Linear_Mipmap_Linear = 9987
+ };
+
+ //! Values for the Sampler::wrapS and Sampler::wrapT field
+ enum class SamplerWrap: unsigned int
+ {
+ UNSET = 0,
+ Clamp_To_Edge = 33071,
+ Mirrored_Repeat = 33648,
+ Repeat = 10497
+ };
+
+ //! Values for the Texture::format and Texture::internalFormat fields
+ enum TextureFormat
+ {
+ TextureFormat_ALPHA = 6406,
+ TextureFormat_RGB = 6407,
+ TextureFormat_RGBA = 6408,
+ TextureFormat_LUMINANCE = 6409,
+ TextureFormat_LUMINANCE_ALPHA = 6410
+ };
+
+ //! Values for the Texture::target field
+ enum TextureTarget
+ {
+ TextureTarget_TEXTURE_2D = 3553
+ };
+
+ //! Values for the Texture::type field
+ enum TextureType
+ {
+ TextureType_UNSIGNED_BYTE = 5121,
+ TextureType_UNSIGNED_SHORT_5_6_5 = 33635,
+ TextureType_UNSIGNED_SHORT_4_4_4_4 = 32819,
+ TextureType_UNSIGNED_SHORT_5_5_5_1 = 32820
+ };
+
+ //! Values for the Animation::Target::path field
+ enum AnimationPath {
+ AnimationPath_TRANSLATION,
+ AnimationPath_ROTATION,
+ AnimationPath_SCALE,
+ AnimationPath_WEIGHTS,
+ };
+
+ //! Values for the Animation::Sampler::interpolation field
+ enum Interpolation {
+ Interpolation_LINEAR,
+ Interpolation_STEP,
+ Interpolation_CUBICSPLINE,
+ };
+
+ //! Values for the Accessor::type field (helper class)
+ class AttribType
+ {
+ public:
+ enum Value
+ { SCALAR, VEC2, VEC3, VEC4, MAT2, MAT3, MAT4 };
+
+ private:
+ static const size_t NUM_VALUES = static_cast<size_t>(MAT4)+1;
+
+ struct Info
+ { const char* name; unsigned int numComponents; };
+
+ template<int N> struct data
+ { static const Info infos[NUM_VALUES]; };
+
+ public:
+ inline static Value FromString(const char* str)
+ {
+ for (size_t i = 0; i < NUM_VALUES; ++i) {
+ if (strcmp(data<0>::infos[i].name, str) == 0) {
+ return static_cast<Value>(i);
+ }
+ }
+ return SCALAR;
+ }
+
+ inline static const char* ToString(Value type)
+ {
+ return data<0>::infos[static_cast<size_t>(type)].name;
+ }
+
+ inline static unsigned int GetNumComponents(Value type)
+ {
+ return data<0>::infos[static_cast<size_t>(type)].numComponents;
+ }
+ };
+
+ // must match the order of the AttribTypeTraits::Value enum!
+ template<int N> const AttribType::Info
+ AttribType::data<N>::infos[AttribType::NUM_VALUES] = {
+ { "SCALAR", 1 }, { "VEC2", 2 }, { "VEC3", 3 }, { "VEC4", 4 }, { "MAT2", 4 }, { "MAT3", 9 }, { "MAT4", 16 }
+ };
+
+
+
+ //! A reference to one top-level object, which is valid
+ //! until the Asset instance is destroyed
+ template<class T>
+ class Ref
+ {
+ std::vector<T*>* vector;
+ unsigned int index;
+
+ public:
+ Ref() : vector(0), index(0) {}
+ Ref(std::vector<T*>& vec, unsigned int idx) : vector(&vec), index(idx) {}
+
+ inline unsigned int GetIndex() const
+ { return index; }
+
+ operator bool() const
+ { return vector != 0; }
+
+ T* operator->()
+ { return (*vector)[index]; }
+
+ T& operator*()
+ { return *((*vector)[index]); }
+ };
+
+ //! Helper struct to represent values that might not be present
+ template<class T>
+ struct Nullable
+ {
+ T value;
+ bool isPresent;
+
+ Nullable() : isPresent(false) {}
+ Nullable(T& val) : value(val), isPresent(true) {}
+ };
+
+
+ //! Base class for all glTF top-level objects
+ struct Object
+ {
+ int index; //!< The index of this object within its property container
+ int oIndex; //!< The original index of this object defined in the JSON
+ std::string id; //!< The globally unique ID used to reference this object
+ std::string name; //!< The user-defined name of this object
+
+ //! Objects marked as special are not exported (used to emulate the binary body buffer)
+ virtual bool IsSpecial() const
+ { return false; }
+
+ virtual ~Object() {}
+
+ //! Maps special IDs to another ID, where needed. Subclasses may override it (statically)
+ static const char* TranslateId(Asset& /*r*/, const char* id)
+ { return id; }
+ };
+
+ //
+ // Classes for each glTF top-level object type
+ //
+
+ //! A typed view into a BufferView. A BufferView contains raw binary data.
+ //! An accessor provides a typed view into a BufferView or a subset of a BufferView
+ //! similar to how WebGL's vertexAttribPointer() defines an attribute in a buffer.
+ struct Accessor : public Object
+ {
+ Ref<BufferView> bufferView; //!< The ID of the bufferView. (required)
+ unsigned int byteOffset; //!< The offset relative to the start of the bufferView in bytes. (required)
+ ComponentType componentType; //!< The datatype of components in the attribute. (required)
+ unsigned int count; //!< The number of attributes referenced by this accessor. (required)
+ AttribType::Value type; //!< Specifies if the attribute is a scalar, vector, or matrix. (required)
+ std::vector<float> max; //!< Maximum value of each component in this attribute.
+ std::vector<float> min; //!< Minimum value of each component in this attribute.
+
+ unsigned int GetNumComponents();
+ unsigned int GetBytesPerComponent();
+ unsigned int GetElementSize();
+
+ inline uint8_t* GetPointer();
+
+ template<class T>
+ bool ExtractData(T*& outData);
+
+ void WriteData(size_t count, const void* src_buffer, size_t src_stride);
+
+ //! Helper class to iterate the data
+ class Indexer
+ {
+ friend struct Accessor;
+
+ Accessor& accessor;
+ uint8_t* data;
+ size_t elemSize, stride;
+
+ Indexer(Accessor& acc);
+
+ public:
+
+ //! Accesses the i-th value as defined by the accessor
+ template<class T>
+ T GetValue(int i);
+
+ //! Accesses the i-th value as defined by the accessor
+ inline unsigned int GetUInt(int i)
+ {
+ return GetValue<unsigned int>(i);
+ }
+
+ inline bool IsValid() const
+ {
+ return data != 0;
+ }
+ };
+
+ inline Indexer GetIndexer()
+ {
+ return Indexer(*this);
+ }
+
+ Accessor() {}
+ void Read(Value& obj, Asset& r);
+ };
+
+ //! A buffer points to binary geometry, animation, or skins.
+ struct Buffer : public Object
+ {
+ /********************* Types *********************/
+ public:
+
+ enum Type
+ {
+ Type_arraybuffer,
+ Type_text
+ };
+
+ /// \struct SEncodedRegion
+ /// Descriptor of encoded region in "bufferView".
+ struct SEncodedRegion
+ {
+ const size_t Offset;///< Offset from begin of "bufferView" to encoded region, in bytes.
+ const size_t EncodedData_Length;///< Size of encoded region, in bytes.
+ uint8_t* const DecodedData;///< Cached encoded data.
+ const size_t DecodedData_Length;///< Size of decoded region, in bytes.
+ const std::string ID;///< ID of the region.
+
+ /// \fn SEncodedRegion(const size_t pOffset, const size_t pEncodedData_Length, uint8_t* pDecodedData, const size_t pDecodedData_Length, const std::string pID)
+ /// Constructor.
+ /// \param [in] pOffset - offset from begin of "bufferView" to encoded region, in bytes.
+ /// \param [in] pEncodedData_Length - size of encoded region, in bytes.
+ /// \param [in] pDecodedData - pointer to decoded data array.
+ /// \param [in] pDecodedData_Length - size of encoded region, in bytes.
+ /// \param [in] pID - ID of the region.
+ SEncodedRegion(const size_t pOffset, const size_t pEncodedData_Length, uint8_t* pDecodedData, const size_t pDecodedData_Length, const std::string pID)
+ : Offset(pOffset), EncodedData_Length(pEncodedData_Length), DecodedData(pDecodedData), DecodedData_Length(pDecodedData_Length), ID(pID)
+ {}
+
+ /// \fn ~SEncodedRegion()
+ /// Destructor.
+ ~SEncodedRegion() { delete[] DecodedData; }
+ };
+
+ /******************* Variables *******************/
+
+ //std::string uri; //!< The uri of the buffer. Can be a filepath, a data uri, etc. (required)
+ size_t byteLength; //!< The length of the buffer in bytes. (default: 0)
+ //std::string type; //!< XMLHttpRequest responseType (default: "arraybuffer")
+
+ Type type;
+
+ /// \var EncodedRegion_Current
+ /// Pointer to currently active encoded region.
+ /// Why not decoding all regions at once and not to set one buffer with decoded data?
+ /// Yes, why not? Even "accessor" point to decoded data. I mean that fields "byteOffset", "byteStride" and "count" has values which describes decoded
+ /// data array. But only in range of mesh while is active parameters from "compressedData". For another mesh accessors point to decoded data too. But
+ /// offset is counted for another regions is encoded.
+ /// Example. You have two meshes. For every of it you have 4 bytes of data. That data compressed to 2 bytes. So, you have buffer with encoded data:
+ /// M1_E0, M1_E1, M2_E0, M2_E1.
+ /// After decoding you'll get:
+ /// M1_D0, M1_D1, M1_D2, M1_D3, M2_D0, M2_D1, M2_D2, M2_D3.
+ /// "accessors" must to use values that point to decoded data - obviously. So, you'll expect "accessors" like
+ /// "accessor_0" : { byteOffset: 0, byteLength: 4}, "accessor_1" : { byteOffset: 4, byteLength: 4}
+ /// but in real life you'll get:
+ /// "accessor_0" : { byteOffset: 0, byteLength: 4}, "accessor_1" : { byteOffset: 2, byteLength: 4}
+ /// Yes, accessor of next mesh has offset and length which mean: current mesh data is decoded, all other data is encoded.
+ /// And when before you start to read data of current mesh (with encoded data ofcourse) you must decode region of "bufferView", after read finished
+ /// delete encoding mark. And after that you can repeat process: decode data of mesh, read, delete decoded data.
+ ///
+ /// Remark. Encoding all data at once is good in world with computers which do not has RAM limitation. So, you must use step by step encoding in
+ /// exporter and importer. And, thanks to such way, there is no need to load whole file into memory.
+ SEncodedRegion* EncodedRegion_Current;
+
+ private:
+
+ shared_ptr<uint8_t> mData; //!< Pointer to the data
+ bool mIsSpecial; //!< Set to true for special cases (e.g. the body buffer)
+
+ /// \var EncodedRegion_List
+ /// List of encoded regions.
+ std::list<SEncodedRegion*> EncodedRegion_List;
+
+ /******************* Functions *******************/
+
+ public:
+
+ Buffer();
+ ~Buffer();
+
+ void Read(Value& obj, Asset& r);
+
+ bool LoadFromStream(IOStream& stream, size_t length = 0, size_t baseOffset = 0);
+
+ /// \fn void EncodedRegion_Mark(const size_t pOffset, const size_t pEncodedData_Length, uint8_t* pDecodedData, const size_t pDecodedData_Length, const std::string& pID)
+ /// Mark region of "bufferView" as encoded. When data is request from such region then "bufferView" use decoded data.
+ /// \param [in] pOffset - offset from begin of "bufferView" to encoded region, in bytes.
+ /// \param [in] pEncodedData_Length - size of encoded region, in bytes.
+ /// \param [in] pDecodedData - pointer to decoded data array.
+ /// \param [in] pDecodedData_Length - size of encoded region, in bytes.
+ /// \param [in] pID - ID of the region.
+ void EncodedRegion_Mark(const size_t pOffset, const size_t pEncodedData_Length, uint8_t* pDecodedData, const size_t pDecodedData_Length, const std::string& pID);
+
+ /// \fn void EncodedRegion_SetCurrent(const std::string& pID)
+ /// Select current encoded region by ID. \sa EncodedRegion_Current.
+ /// \param [in] pID - ID of the region.
+ void EncodedRegion_SetCurrent(const std::string& pID);
+
+ /// \fn bool ReplaceData(const size_t pBufferData_Offset, const size_t pBufferData_Count, const uint8_t* pReplace_Data, const size_t pReplace_Count)
+ /// Replace part of buffer data. Pay attention that function work with original array of data (\ref mData) not with encoded regions.
+ /// \param [in] pBufferData_Offset - index of first element in buffer from which new data will be placed.
+ /// \param [in] pBufferData_Count - count of bytes in buffer which will be replaced.
+ /// \param [in] pReplace_Data - pointer to array with new data for buffer.
+ /// \param [in] pReplace_Count - count of bytes in new data.
+ /// \return true - if successfully replaced, false if input arguments is out of range.
+ bool ReplaceData(const size_t pBufferData_Offset, const size_t pBufferData_Count, const uint8_t* pReplace_Data, const size_t pReplace_Count);
+ bool ReplaceData_joint(const size_t pBufferData_Offset, const size_t pBufferData_Count, const uint8_t* pReplace_Data, const size_t pReplace_Count);
+
+ size_t AppendData(uint8_t* data, size_t length);
+ void Grow(size_t amount);
+
+ uint8_t* GetPointer()
+ { return mData.get(); }
+
+ void MarkAsSpecial()
+ { mIsSpecial = true; }
+
+ bool IsSpecial() const
+ { return mIsSpecial; }
+
+ std::string GetURI()
+ { return std::string(this->id) + ".bin"; }
+
+ static const char* TranslateId(Asset& r, const char* id);
+ };
+
+ //! A view into a buffer generally representing a subset of the buffer.
+ struct BufferView : public Object
+ {
+ Ref<Buffer> buffer; //! The ID of the buffer. (required)
+ size_t byteOffset; //! The offset into the buffer in bytes. (required)
+ size_t byteLength; //! The length of the bufferView in bytes. (default: 0)
+ unsigned int byteStride; //!< The stride, in bytes, between attributes referenced by this accessor. (default: 0)
+
+ BufferViewTarget target; //! The target that the WebGL buffer should be bound to.
+
+ void Read(Value& obj, Asset& r);
+ };
+
+ struct Camera : public Object
+ {
+ enum Type
+ {
+ Perspective,
+ Orthographic
+ };
+
+ Type type;
+
+ union
+ {
+ struct {
+ float aspectRatio; //!<The floating - point aspect ratio of the field of view. (0 = undefined = use the canvas one)
+ float yfov; //!<The floating - point vertical field of view in radians. (required)
+ float zfar; //!<The floating - point distance to the far clipping plane. (required)
+ float znear; //!< The floating - point distance to the near clipping plane. (required)
+ } perspective;
+
+ struct {
+ float xmag; //! The floating-point horizontal magnification of the view. (required)
+ float ymag; //! The floating-point vertical magnification of the view. (required)
+ float zfar; //! The floating-point distance to the far clipping plane. (required)
+ float znear; //! The floating-point distance to the near clipping plane. (required)
+ } ortographic;
+ } cameraProperties;
+
+ Camera() {}
+ void Read(Value& obj, Asset& r);
+ };
+
+
+ //! Image data used to create a texture.
+ struct Image : public Object
+ {
+ std::string uri; //! The uri of the image, that can be a file path, a data URI, etc.. (required)
+
+ Ref<BufferView> bufferView;
+
+ std::string mimeType;
+
+ int width, height;
+
+ private:
+ std::unique_ptr<uint8_t[]> mData;
+ size_t mDataLength;
+
+ public:
+
+ Image();
+ void Read(Value& obj, Asset& r);
+
+ inline bool HasData() const
+ { return mDataLength > 0; }
+
+ inline size_t GetDataLength() const
+ { return mDataLength; }
+
+ inline const uint8_t* GetData() const
+ { return mData.get(); }
+
+ inline uint8_t* StealData();
+
+ inline void SetData(uint8_t* data, size_t length, Asset& r);
+ };
+
+ const vec4 defaultBaseColor = {1, 1, 1, 1};
+ const vec3 defaultEmissiveFactor = {0, 0, 0};
+ const vec4 defaultDiffuseFactor = {1, 1, 1, 1};
+ const vec3 defaultSpecularFactor = {1, 1, 1};
+
+ struct TextureInfo
+ {
+ Ref<Texture> texture;
+ unsigned int index;
+ unsigned int texCoord = 0;
+ };
+
+ struct NormalTextureInfo : TextureInfo
+ {
+ float scale = 1;
+ };
+
+ struct OcclusionTextureInfo : TextureInfo
+ {
+ float strength = 1;
+ };
+
+ struct PbrMetallicRoughness
+ {
+ vec4 baseColorFactor;
+ TextureInfo baseColorTexture;
+ TextureInfo metallicRoughnessTexture;
+ float metallicFactor;
+ float roughnessFactor;
+ };
+
+ struct PbrSpecularGlossiness
+ {
+ vec4 diffuseFactor;
+ vec3 specularFactor;
+ float glossinessFactor;
+ TextureInfo diffuseTexture;
+ TextureInfo specularGlossinessTexture;
+
+ PbrSpecularGlossiness() { SetDefaults(); }
+ void SetDefaults();
+ };
+
+ //! The material appearance of a primitive.
+ struct Material : public Object
+ {
+ //PBR metallic roughness properties
+ PbrMetallicRoughness pbrMetallicRoughness;
+
+ //other basic material properties
+ NormalTextureInfo normalTexture;
+ OcclusionTextureInfo occlusionTexture;
+ TextureInfo emissiveTexture;
+ vec3 emissiveFactor;
+ std::string alphaMode;
+ float alphaCutoff;
+ bool doubleSided;
+
+ //extension: KHR_materials_pbrSpecularGlossiness
+ Nullable<PbrSpecularGlossiness> pbrSpecularGlossiness;
+
+ //extension: KHR_materials_unlit
+ bool unlit;
+
+ Material() { SetDefaults(); }
+ void Read(Value& obj, Asset& r);
+ void SetDefaults();
+ };
+
+ //! A set of primitives to be rendered. A node can contain one or more meshes. A node's transform places the mesh in the scene.
+ struct Mesh : public Object
+ {
+ typedef std::vector< Ref<Accessor> > AccessorList;
+
+ struct Primitive
+ {
+ PrimitiveMode mode;
+
+ struct Attributes {
+ AccessorList position, normal, tangent, texcoord, color, joint, jointmatrix, weight;
+ } attributes;
+
+ Ref<Accessor> indices;
+
+ Ref<Material> material;
+
+ struct Target {
+ AccessorList position, normal, tangent;
+ };
+ std::vector<Target> targets;
+ };
+
+ std::vector<Primitive> primitives;
+
+ std::vector<float> weights;
+
+ Mesh() {}
+
+ /// \fn void Read(Value& pJSON_Object, Asset& pAsset_Root)
+ /// Get mesh data from JSON-object and place them to root asset.
+ /// \param [in] pJSON_Object - reference to pJSON-object from which data are read.
+ /// \param [out] pAsset_Root - reference to root assed where data will be stored.
+ void Read(Value& pJSON_Object, Asset& pAsset_Root);
+ };
+
+ struct Node : public Object
+ {
+ std::vector< Ref<Node> > children;
+ std::vector< Ref<Mesh> > meshes;
+
+ Nullable<mat4> matrix;
+ Nullable<vec3> translation;
+ Nullable<vec4> rotation;
+ Nullable<vec3> scale;
+
+ Ref<Camera> camera;
+
+ std::vector< Ref<Node> > skeletons; //!< The ID of skeleton nodes. Each of which is the root of a node hierarchy.
+ Ref<Skin> skin; //!< The ID of the skin referenced by this node.
+ std::string jointName; //!< Name used when this node is a joint in a skin.
+
+ Ref<Node> parent; //!< This is not part of the glTF specification. Used as a helper.
+
+ Node() {}
+ void Read(Value& obj, Asset& r);
+ };
+
+ struct Program : public Object
+ {
+ Program() {}
+ void Read(Value& obj, Asset& r);
+ };
+
+
+ struct Sampler : public Object
+ {
+ SamplerMagFilter magFilter; //!< The texture magnification filter.
+ SamplerMinFilter minFilter; //!< The texture minification filter.
+ SamplerWrap wrapS; //!< The texture wrapping in the S direction.
+ SamplerWrap wrapT; //!< The texture wrapping in the T direction.
+
+ Sampler() { SetDefaults(); }
+ void Read(Value& obj, Asset& r);
+ void SetDefaults();
+ };
+
+ struct Scene : public Object
+ {
+ std::vector< Ref<Node> > nodes;
+
+ Scene() {}
+ void Read(Value& obj, Asset& r);
+ };
+
+ struct Shader : public Object
+ {
+ Shader() {}
+ void Read(Value& obj, Asset& r);
+ };
+
+ struct Skin : public Object
+ {
+ Nullable<mat4> bindShapeMatrix; //!< Floating-point 4x4 transformation matrix stored in column-major order.
+ Ref<Accessor> inverseBindMatrices; //!< The ID of the accessor containing the floating-point 4x4 inverse-bind matrices.
+ std::vector<Ref<Node>> jointNames; //!< Joint names of the joints (nodes with a jointName property) in this skin.
+ std::string name; //!< The user-defined name of this object.
+
+ Skin() {}
+ void Read(Value& obj, Asset& r);
+ };
+
+ //! A texture and its sampler.
+ struct Texture : public Object
+ {
+ Ref<Sampler> sampler; //!< The ID of the sampler used by this texture. (required)
+ Ref<Image> source; //!< The ID of the image used by this texture. (required)
+
+ //TextureFormat format; //!< The texture's format. (default: TextureFormat_RGBA)
+ //TextureFormat internalFormat; //!< The texture's internal format. (default: TextureFormat_RGBA)
+
+ //TextureTarget target; //!< The target that the WebGL texture should be bound to. (default: TextureTarget_TEXTURE_2D)
+ //TextureType type; //!< Texel datatype. (default: TextureType_UNSIGNED_BYTE)
+
+ Texture() {}
+ void Read(Value& obj, Asset& r);
+ };
+
+ struct Animation : public Object
+ {
+ struct Sampler {
+ Sampler() : interpolation(Interpolation_LINEAR) {}
+
+ Ref<Accessor> input; //!< Accessor reference to the buffer storing the key-frame times.
+ Ref<Accessor> output; //!< Accessor reference to the buffer storing the key-frame values.
+ Interpolation interpolation; //!< Type of interpolation algorithm to use between key-frames.
+ };
+
+ struct Target {
+ Target() : path(AnimationPath_TRANSLATION) {}
+
+ Ref<Node> node; //!< The node to animate.
+ AnimationPath path; //!< The property of the node to animate.
+ };
+
+ struct Channel {
+ Channel() : sampler(-1) {}
+
+ int sampler; //!< The sampler index containing the animation data.
+ Target target; //!< The node and property to animate.
+ };
+
+ std::vector<Sampler> samplers; //!< All the key-frame data for this animation.
+ std::vector<Channel> channels; //!< Data to connect nodes to key-frames.
+
+ Animation() {}
+ void Read(Value& obj, Asset& r);
+ };
+
+ //! Base class for LazyDict that acts as an interface
+ class LazyDictBase
+ {
+ public:
+ virtual ~LazyDictBase() {}
+
+ virtual void AttachToDocument(Document& doc) = 0;
+ virtual void DetachFromDocument() = 0;
+
+ virtual void WriteObjects(AssetWriter& writer) = 0;
+ };
+
+
+ template<class T>
+ class LazyDict;
+
+ //! (Implemented in glTFAssetWriter.h)
+ template<class T>
+ void WriteLazyDict(LazyDict<T>& d, AssetWriter& w);
+
+
+ //! Manages lazy loading of the glTF top-level objects, and keeps a reference to them by ID
+ //! It is the owner the loaded objects, so when it is destroyed it also deletes them
+ template<class T>
+ class LazyDict : public LazyDictBase
+ {
+ friend class Asset;
+ friend class AssetWriter;
+
+ typedef typename std::gltf_unordered_map< unsigned int, unsigned int > Dict;
+ typedef typename std::gltf_unordered_map< std::string, unsigned int > IdDict;
+
+ std::vector<T*> mObjs; //! The read objects
+ Dict mObjsByOIndex; //! The read objects accessible by original index
+ IdDict mObjsById; //! The read objects accessible by id
+ const char* mDictId; //! ID of the dictionary object
+ const char* mExtId; //! ID of the extension defining the dictionary
+ Value* mDict; //! JSON dictionary object
+ Asset& mAsset; //! The asset instance
+
+ void AttachToDocument(Document& doc);
+ void DetachFromDocument();
+
+ void WriteObjects(AssetWriter& writer)
+ { WriteLazyDict<T>(*this, writer); }
+
+ Ref<T> Add(T* obj);
+
+ public:
+ LazyDict(Asset& asset, const char* dictId, const char* extId = 0);
+ ~LazyDict();
+
+ Ref<T> Retrieve(unsigned int i);
+
+ Ref<T> Get(unsigned int i);
+ Ref<T> Get(const char* id);
+
+ Ref<T> Create(const char* id);
+ Ref<T> Create(const std::string& id)
+ { return Create(id.c_str()); }
+
+ unsigned int Remove(const char* id);
+
+ inline unsigned int Size() const
+ { return unsigned(mObjs.size()); }
+
+ inline T& operator[](size_t i)
+ { return *mObjs[i]; }
+
+ };
+
+
+ struct AssetMetadata
+ {
+ std::string copyright; //!< A copyright message suitable for display to credit the content creator.
+ std::string generator; //!< Tool that generated this glTF model.Useful for debugging.
+
+ struct {
+ std::string api; //!< Specifies the target rendering API (default: "WebGL")
+ std::string version; //!< Specifies the target rendering API (default: "1.0.3")
+ } profile; //!< Specifies the target rendering API and version, e.g., WebGL 1.0.3. (default: {})
+
+ std::string version; //!< The glTF format version
+
+ void Read(Document& doc);
+
+ AssetMetadata() : version("") {}
+ };
+
+ //
+ // glTF Asset class
+ //
+
+ //! Root object for a glTF asset
+ class Asset
+ {
+ typedef std::gltf_unordered_map<std::string, int> IdMap;
+
+ template<class T>
+ friend class LazyDict;
+
+ friend struct Buffer; // To access OpenFile
+
+ friend class AssetWriter;
+
+ private:
+ IOSystem* mIOSystem;
+
+ std::string mCurrentAssetDir;
+
+ size_t mSceneLength;
+ size_t mBodyOffset, mBodyLength;
+
+ std::vector<LazyDictBase*> mDicts;
+
+ IdMap mUsedIds;
+
+ Ref<Buffer> mBodyBuffer;
+
+ Asset(Asset&);
+ Asset& operator=(const Asset&);
+
+ public:
+
+ //! Keeps info about the enabled extensions
+ struct Extensions
+ {
+ bool KHR_materials_pbrSpecularGlossiness;
+ bool KHR_materials_unlit;
+
+ } extensionsUsed;
+
+ AssetMetadata asset;
+
+
+ // Dictionaries for each type of object
+
+ LazyDict<Accessor> accessors;
+ LazyDict<Animation> animations;
+ LazyDict<Buffer> buffers;
+ LazyDict<BufferView> bufferViews;
+ LazyDict<Camera> cameras;
+ LazyDict<Image> images;
+ LazyDict<Material> materials;
+ LazyDict<Mesh> meshes;
+ LazyDict<Node> nodes;
+ LazyDict<Sampler> samplers;
+ LazyDict<Scene> scenes;
+ LazyDict<Skin> skins;
+ LazyDict<Texture> textures;
+
+ Ref<Scene> scene;
+
+ public:
+ Asset(IOSystem* io = 0)
+ : mIOSystem(io)
+ , asset()
+ , accessors (*this, "accessors")
+ , animations (*this, "animations")
+ , buffers (*this, "buffers")
+ , bufferViews (*this, "bufferViews")
+ , cameras (*this, "cameras")
+ , images (*this, "images")
+ , materials (*this, "materials")
+ , meshes (*this, "meshes")
+ , nodes (*this, "nodes")
+ , samplers (*this, "samplers")
+ , scenes (*this, "scenes")
+ , skins (*this, "skins")
+ , textures (*this, "textures")
+ {
+ memset(&extensionsUsed, 0, sizeof(extensionsUsed));
+ }
+
+ //! Main function
+ void Load(const std::string& file, bool isBinary = false);
+
+ //! Enables binary encoding on the asset
+ void SetAsBinary();
+
+ //! Search for an available name, starting from the given strings
+ std::string FindUniqueID(const std::string& str, const char* suffix);
+
+ Ref<Buffer> GetBodyBuffer()
+ { return mBodyBuffer; }
+
+ private:
+ void ReadBinaryHeader(IOStream& stream, std::vector<char>& sceneData);
+
+ void ReadExtensionsUsed(Document& doc);
+
+ IOStream* OpenFile(std::string path, const char* mode, bool absolute = false);
+ };
+
+}
+
+// Include the implementation of the methods
+#include "glTF2Asset.inl"
+
+#endif // ASSIMP_BUILD_NO_GLTF_IMPORTER
+
+#endif // GLTF2ASSET_H_INC
diff --git a/code/glTF2Asset.inl b/code/glTF2Asset.inl
new file mode 100755
index 000000000..ed37937f4
--- /dev/null
+++ b/code/glTF2Asset.inl
@@ -0,0 +1,1639 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2018, assimp 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 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 <assimp/StringUtils.h>
+
+// Header files, Assimp
+#include <assimp/DefaultLogger.hpp>
+
+using namespace Assimp;
+
+namespace glTF2 {
+
+namespace {
+
+ //
+ // JSON Value reading helpers
+ //
+
+ template<class T>
+ struct ReadHelper { static bool Read(Value& val, T& out) {
+ return val.IsInt() ? out = static_cast<T>(val.GetInt()), true : false;
+ }};
+
+ template<> struct ReadHelper<bool> { static bool Read(Value& val, bool& out) {
+ return val.IsBool() ? out = val.GetBool(), true : false;
+ }};
+
+ template<> struct ReadHelper<float> { static bool Read(Value& val, float& out) {
+ return val.IsNumber() ? out = static_cast<float>(val.GetDouble()), true : false;
+ }};
+
+ template<unsigned int N> struct ReadHelper<float[N]> { static bool Read(Value& val, float (&out)[N]) {
+ if (!val.IsArray() || val.Size() != N) return false;
+ for (unsigned int i = 0; i < N; ++i) {
+ if (val[i].IsNumber())
+ out[i] = static_cast<float>(val[i].GetDouble());
+ }
+ return true;
+ }};
+
+ template<> struct ReadHelper<const char*> { static bool Read(Value& val, const char*& out) {
+ return val.IsString() ? (out = val.GetString(), true) : false;
+ }};
+
+ template<> struct ReadHelper<std::string> { static bool Read(Value& val, std::string& out) {
+ return val.IsString() ? (out = std::string(val.GetString(), val.GetStringLength()), true) : false;
+ }};
+
+ template<class T> struct ReadHelper< Nullable<T> > { static bool Read(Value& val, Nullable<T>& out) {
+ return out.isPresent = ReadHelper<T>::Read(val, out.value);
+ }};
+
+ template<class T>
+ inline static bool ReadValue(Value& val, T& out)
+ {
+ return ReadHelper<T>::Read(val, out);
+ }
+
+ template<class T>
+ inline static bool ReadMember(Value& obj, const char* id, T& out)
+ {
+ Value::MemberIterator it = obj.FindMember(id);
+ if (it != obj.MemberEnd()) {
+ return ReadHelper<T>::Read(it->value, out);
+ }
+ return false;
+ }
+
+ template<class T>
+ inline static T MemberOrDefault(Value& obj, const char* id, T defaultValue)
+ {
+ T out;
+ return ReadMember(obj, id, out) ? out : defaultValue;
+ }
+
+ inline Value* FindMember(Value& val, const char* id)
+ {
+ Value::MemberIterator it = val.FindMember(id);
+ return (it != val.MemberEnd()) ? &it->value : 0;
+ }
+
+ inline Value* FindString(Value& val, const char* id)
+ {
+ Value::MemberIterator it = val.FindMember(id);
+ return (it != val.MemberEnd() && it->value.IsString()) ? &it->value : 0;
+ }
+
+ inline Value* FindNumber(Value& val, const char* id)
+ {
+ Value::MemberIterator it = val.FindMember(id);
+ return (it != val.MemberEnd() && it->value.IsNumber()) ? &it->value : 0;
+ }
+
+ inline Value* FindUInt(Value& val, const char* id)
+ {
+ Value::MemberIterator it = val.FindMember(id);
+ return (it != val.MemberEnd() && it->value.IsUint()) ? &it->value : 0;
+ }
+
+ inline Value* FindArray(Value& val, const char* id)
+ {
+ Value::MemberIterator it = val.FindMember(id);
+ return (it != val.MemberEnd() && it->value.IsArray()) ? &it->value : 0;
+ }
+
+ inline Value* FindObject(Value& val, const char* id)
+ {
+ Value::MemberIterator it = val.FindMember(id);
+ return (it != val.MemberEnd() && it->value.IsObject()) ? &it->value : 0;
+ }
+}
+
+//
+// LazyDict methods
+//
+
+template<class T>
+inline LazyDict<T>::LazyDict(Asset& asset, const char* dictId, const char* extId)
+ : mDictId(dictId), mExtId(extId), mDict(0), mAsset(asset)
+{
+ asset.mDicts.push_back(this); // register to the list of dictionaries
+}
+
+template<class T>
+inline LazyDict<T>::~LazyDict()
+{
+ for (size_t i = 0; i < mObjs.size(); ++i) {
+ delete mObjs[i];
+ }
+}
+
+
+template<class T>
+inline void LazyDict<T>::AttachToDocument(Document& doc)
+{
+ Value* container = 0;
+
+ if (mExtId) {
+ if (Value* exts = FindObject(doc, "extensions")) {
+ container = FindObject(*exts, mExtId);
+ }
+ }
+ else {
+ container = &doc;
+ }
+
+ if (container) {
+ mDict = FindArray(*container, mDictId);
+ }
+}
+
+template<class T>
+inline void LazyDict<T>::DetachFromDocument()
+{
+ mDict = 0;
+}
+
+template<class T>
+unsigned int LazyDict<T>::Remove(const char* id)
+{
+ id = T::TranslateId(mAsset, id);
+
+ typename IdDict::iterator it = mObjsById.find(id);
+
+ if (it == mObjsById.end()) {
+ throw DeadlyExportError("GLTF: Object with id \"" + std::string(id) + "\" is not found");
+ }
+
+ const unsigned int index = it->second;
+
+ mAsset.mUsedIds[id] = false;
+ mObjsById.erase(id);
+ mObjsByOIndex.erase(index);
+ mObjs.erase(mObjs.begin() + index);
+
+ //update index of object in mObjs;
+ for (unsigned int i = index; i < mObjs.size(); ++i) {
+ T *obj = mObjs[i];
+
+ obj->index = i;
+ }
+
+ for (IdDict::iterator it = mObjsById.begin(); it != mObjsById.end(); ++it) {
+ if (it->second <= index) {
+ continue;
+ }
+
+ mObjsById[it->first] = it->second - 1;
+ }
+
+ for (Dict::iterator it = mObjsByOIndex.begin(); it != mObjsByOIndex.end(); ++it) {
+ if (it->second <= index) {
+ continue;
+ }
+
+ mObjsByOIndex[it->first] = it->second - 1;
+ }
+
+ return index;
+}
+
+template<class T>
+Ref<T> LazyDict<T>::Retrieve(unsigned int i)
+{
+
+ typename Dict::iterator it = mObjsByOIndex.find(i);
+ if (it != mObjsByOIndex.end()) {// already created?
+ return Ref<T>(mObjs, it->second);
+ }
+
+ // read it from the JSON object
+ if (!mDict) {
+ throw DeadlyImportError("GLTF: Missing section \"" + std::string(mDictId) + "\"");
+ }
+
+ if (!mDict->IsArray()) {
+ throw DeadlyImportError("GLTF: Field is not an array \"" + std::string(mDictId) + "\"");
+ }
+
+ Value &obj = (*mDict)[i];
+
+ if (!obj.IsObject()) {
+ throw DeadlyImportError("GLTF: Object at index \"" + to_string(i) + "\" is not a JSON object");
+ }
+
+ T* inst = new T();
+ inst->id = std::string(mDictId) + "_" + to_string(i);
+ inst->oIndex = i;
+ ReadMember(obj, "name", inst->name);
+ inst->Read(obj, mAsset);
+
+ return Add(inst);
+}
+
+template<class T>
+Ref<T> LazyDict<T>::Get(unsigned int i)
+{
+
+ return Ref<T>(mObjs, i);
+
+}
+
+template<class T>
+Ref<T> LazyDict<T>::Get(const char* id)
+{
+ id = T::TranslateId(mAsset, id);
+
+ typename IdDict::iterator it = mObjsById.find(id);
+ if (it != mObjsById.end()) { // already created?
+ return Ref<T>(mObjs, it->second);
+ }
+
+ return Ref<T>();
+}
+
+template<class T>
+Ref<T> LazyDict<T>::Add(T* obj)
+{
+ unsigned int idx = unsigned(mObjs.size());
+ mObjs.push_back(obj);
+ mObjsByOIndex[obj->oIndex] = idx;
+ mObjsById[obj->id] = idx;
+ mAsset.mUsedIds[obj->id] = true;
+ return Ref<T>(mObjs, idx);
+}
+
+template<class T>
+Ref<T> LazyDict<T>::Create(const char* id)
+{
+ Asset::IdMap::iterator it = mAsset.mUsedIds.find(id);
+ if (it != mAsset.mUsedIds.end()) {
+ throw DeadlyImportError("GLTF: two objects with the same ID exist");
+ }
+ T* inst = new T();
+ unsigned int idx = unsigned(mObjs.size());
+ inst->id = id;
+ inst->index = idx;
+ inst->oIndex = idx;
+ return Add(inst);
+}
+
+
+//
+// glTF dictionary objects methods
+//
+
+
+inline Buffer::Buffer()
+ : byteLength(0), type(Type_arraybuffer), EncodedRegion_Current(nullptr), mIsSpecial(false)
+{ }
+
+inline Buffer::~Buffer()
+{
+ for(SEncodedRegion* reg : EncodedRegion_List) delete reg;
+}
+
+inline const char* Buffer::TranslateId(Asset& /*r*/, const char* id)
+{
+ return id;
+}
+
+inline void Buffer::Read(Value& obj, Asset& r)
+{
+ size_t statedLength = MemberOrDefault<size_t>(obj, "byteLength", 0);
+ byteLength = statedLength;
+
+ Value* it = FindString(obj, "uri");
+ if (!it) {
+ if (statedLength > 0) {
+ throw DeadlyImportError("GLTF: buffer with non-zero length missing the \"uri\" attribute");
+ }
+ return;
+ }
+
+ const char* uri = it->GetString();
+
+ Util::DataURI dataURI;
+ if (ParseDataURI(uri, it->GetStringLength(), dataURI)) {
+ if (dataURI.base64) {
+ uint8_t* data = 0;
+ this->byteLength = Util::DecodeBase64(dataURI.data, dataURI.dataLength, data);
+ this->mData.reset(data, std::default_delete<uint8_t[]>());
+
+ if (statedLength > 0 && this->byteLength != statedLength) {
+ throw DeadlyImportError("GLTF: buffer \"" + id + "\", expected " + to_string(statedLength) +
+ " bytes, but found " + to_string(dataURI.dataLength));
+ }
+ }
+ else { // assume raw data
+ if (statedLength != dataURI.dataLength) {
+ throw DeadlyImportError("GLTF: buffer \"" + id + "\", expected " + to_string(statedLength) +
+ " bytes, but found " + to_string(dataURI.dataLength));
+ }
+
+ this->mData.reset(new uint8_t[dataURI.dataLength], std::default_delete<uint8_t[]>());
+ memcpy( this->mData.get(), dataURI.data, dataURI.dataLength );
+ }
+ }
+ else { // Local file
+ if (byteLength > 0) {
+ std::string dir = !r.mCurrentAssetDir.empty() ? (r.mCurrentAssetDir + "/") : "";
+
+ IOStream* file = r.OpenFile(dir + uri, "rb");
+ if (file) {
+ bool ok = LoadFromStream(*file, byteLength);
+ delete file;
+
+ if (!ok)
+ throw DeadlyImportError("GLTF: error while reading referenced file \"" + std::string(uri) + "\"" );
+ }
+ else {
+ throw DeadlyImportError("GLTF: could not open referenced file \"" + std::string(uri) + "\"");
+ }
+ }
+ }
+}
+
+inline bool Buffer::LoadFromStream(IOStream& stream, size_t length, size_t baseOffset)
+{
+ byteLength = length ? length : stream.FileSize();
+
+ if (baseOffset) {
+ stream.Seek(baseOffset, aiOrigin_SET);
+ }
+
+ mData.reset(new uint8_t[byteLength], std::default_delete<uint8_t[]>());
+
+ if (stream.Read(mData.get(), byteLength, 1) != 1) {
+ return false;
+ }
+ return true;
+}
+
+inline void Buffer::EncodedRegion_Mark(const size_t pOffset, const size_t pEncodedData_Length, uint8_t* pDecodedData, const size_t pDecodedData_Length, const std::string& pID)
+{
+ // Check pointer to data
+ if(pDecodedData == nullptr) throw DeadlyImportError("GLTF: for marking encoded region pointer to decoded data must be provided.");
+
+ // Check offset
+ if(pOffset > byteLength)
+ {
+ const uint8_t val_size = 32;
+
+ char val[val_size];
+
+ ai_snprintf(val, val_size, "%llu", (long long)pOffset);
+ throw DeadlyImportError(std::string("GLTF: incorrect offset value (") + val + ") for marking encoded region.");
+ }
+
+ // Check length
+ if((pOffset + pEncodedData_Length) > byteLength)
+ {
+ const uint8_t val_size = 64;
+
+ char val[val_size];
+
+ ai_snprintf(val, val_size, "%llu, %llu", (long long)pOffset, (long long)pEncodedData_Length);
+ throw DeadlyImportError(std::string("GLTF: encoded region with offset/length (") + val + ") is out of range.");
+ }
+
+ // Add new region
+ EncodedRegion_List.push_back(new SEncodedRegion(pOffset, pEncodedData_Length, pDecodedData, pDecodedData_Length, pID));
+ // And set new value for "byteLength"
+ byteLength += (pDecodedData_Length - pEncodedData_Length);
+}
+
+inline void Buffer::EncodedRegion_SetCurrent(const std::string& pID)
+{
+ if((EncodedRegion_Current != nullptr) && (EncodedRegion_Current->ID == pID)) return;
+
+ for(SEncodedRegion* reg : EncodedRegion_List)
+ {
+ if(reg->ID == pID)
+ {
+ EncodedRegion_Current = reg;
+
+ return;
+ }
+
+ }
+
+ throw DeadlyImportError("GLTF: EncodedRegion with ID: \"" + pID + "\" not found.");
+}
+
+inline
+bool Buffer::ReplaceData(const size_t pBufferData_Offset, const size_t pBufferData_Count, const uint8_t* pReplace_Data, const size_t pReplace_Count)
+{
+
+ if((pBufferData_Count == 0) || (pReplace_Count == 0) || (pReplace_Data == nullptr)) {
+ return false;
+ }
+
+ const size_t new_data_size = byteLength + pReplace_Count - pBufferData_Count;
+ uint8_t *new_data = new uint8_t[new_data_size];
+ // Copy data which place before replacing part.
+ ::memcpy(new_data, mData.get(), pBufferData_Offset);
+ // Copy new data.
+ ::memcpy(&new_data[pBufferData_Offset], pReplace_Data, pReplace_Count);
+ // Copy data which place after replacing part.
+ ::memcpy(&new_data[pBufferData_Offset + pReplace_Count], &mData.get()[pBufferData_Offset + pBufferData_Count], pBufferData_Offset);
+ // Apply new data
+ mData.reset(new_data, std::default_delete<uint8_t[]>());
+ byteLength = new_data_size;
+
+ return true;
+}
+
+inline
+bool Buffer::ReplaceData_joint(const size_t pBufferData_Offset, const size_t pBufferData_Count, const uint8_t* pReplace_Data, const size_t pReplace_Count)
+{
+ if((pBufferData_Count == 0) || (pReplace_Count == 0) || (pReplace_Data == nullptr)) {
+ return false;
+ }
+
+ const size_t new_data_size = byteLength + pReplace_Count - pBufferData_Count;
+ uint8_t* new_data = new uint8_t[new_data_size];
+ // Copy data which place before replacing part.
+ memcpy(new_data, mData.get(), pBufferData_Offset);
+ // Copy new data.
+ memcpy(&new_data[pBufferData_Offset], pReplace_Data, pReplace_Count);
+ // Copy data which place after replacing part.
+ memcpy(&new_data[pBufferData_Offset + pReplace_Count], &mData.get()[pBufferData_Offset + pBufferData_Count]
+ , new_data_size - (pBufferData_Offset + pReplace_Count)
+ );
+ // Apply new data
+ mData.reset(new_data, std::default_delete<uint8_t[]>());
+ byteLength = new_data_size;
+
+ return true;
+}
+
+inline size_t Buffer::AppendData(uint8_t* data, size_t length)
+{
+ size_t offset = this->byteLength;
+ // Force alignment to 4 bits
+ Grow((length + 3) & ~3);
+ memcpy(mData.get() + offset, data, length);
+ return offset;
+}
+
+inline void Buffer::Grow(size_t amount)
+{
+ if (amount <= 0) return;
+ uint8_t* b = new uint8_t[byteLength + amount];
+ if (mData) memcpy(b, mData.get(), byteLength);
+ mData.reset(b, std::default_delete<uint8_t[]>());
+ byteLength += amount;
+}
+
+//
+// struct BufferView
+//
+
+inline void BufferView::Read(Value& obj, Asset& r)
+{
+
+ if (Value* bufferVal = FindUInt(obj, "buffer")) {
+ buffer = r.buffers.Retrieve(bufferVal->GetUint());
+ }
+
+ byteOffset = MemberOrDefault(obj, "byteOffset", 0u);
+ byteLength = MemberOrDefault(obj, "byteLength", 0u);
+ byteStride = MemberOrDefault(obj, "byteStride", 0u);
+}
+
+//
+// struct Accessor
+//
+
+inline void Accessor::Read(Value& obj, Asset& r)
+{
+
+ if (Value* bufferViewVal = FindUInt(obj, "bufferView")) {
+ bufferView = r.bufferViews.Retrieve(bufferViewVal->GetUint());
+ }
+
+ byteOffset = MemberOrDefault(obj, "byteOffset", 0u);
+ componentType = MemberOrDefault(obj, "componentType", ComponentType_BYTE);
+ count = MemberOrDefault(obj, "count", 0u);
+
+ const char* typestr;
+ type = ReadMember(obj, "type", typestr) ? AttribType::FromString(typestr) : AttribType::SCALAR;
+}
+
+inline unsigned int Accessor::GetNumComponents()
+{
+ return AttribType::GetNumComponents(type);
+}
+
+inline unsigned int Accessor::GetBytesPerComponent()
+{
+ return int(ComponentTypeSize(componentType));
+}
+
+inline unsigned int Accessor::GetElementSize()
+{
+ return GetNumComponents() * GetBytesPerComponent();
+}
+
+inline uint8_t* Accessor::GetPointer()
+{
+ if (!bufferView || !bufferView->buffer) return 0;
+ uint8_t* basePtr = bufferView->buffer->GetPointer();
+ if (!basePtr) return 0;
+
+ size_t offset = byteOffset + bufferView->byteOffset;
+
+ // Check if region is encoded.
+ if(bufferView->buffer->EncodedRegion_Current != nullptr)
+ {
+ const size_t begin = bufferView->buffer->EncodedRegion_Current->Offset;
+ const size_t end = begin + bufferView->buffer->EncodedRegion_Current->DecodedData_Length;
+
+ if((offset >= begin) && (offset < end))
+ return &bufferView->buffer->EncodedRegion_Current->DecodedData[offset - begin];
+ }
+
+ return basePtr + offset;
+}
+
+namespace {
+ inline void CopyData(size_t count,
+ const uint8_t* src, size_t src_stride,
+ uint8_t* dst, size_t dst_stride)
+ {
+ if (src_stride == dst_stride) {
+ memcpy(dst, src, count * src_stride);
+ }
+ else {
+ size_t sz = std::min(src_stride, dst_stride);
+ for (size_t i = 0; i < count; ++i) {
+ memcpy(dst, src, sz);
+ if (sz < dst_stride) {
+ memset(dst + sz, 0, dst_stride - sz);
+ }
+ src += src_stride;
+ dst += dst_stride;
+ }
+ }
+ }
+}
+
+template<class T>
+bool Accessor::ExtractData(T*& outData)
+{
+ uint8_t* data = GetPointer();
+ if (!data) return false;
+
+ const size_t elemSize = GetElementSize();
+ const size_t totalSize = elemSize * count;
+
+ const size_t stride = bufferView && bufferView->byteStride ? bufferView->byteStride : elemSize;
+
+ const size_t targetElemSize = sizeof(T);
+ ai_assert(elemSize <= targetElemSize);
+
+ ai_assert(count*stride <= bufferView->byteLength);
+
+ outData = new T[count];
+ if (stride == elemSize && targetElemSize == elemSize) {
+ memcpy(outData, data, totalSize);
+ }
+ else {
+ for (size_t i = 0; i < count; ++i) {
+ memcpy(outData + i, data + i*stride, elemSize);
+ }
+ }
+
+ return true;
+}
+
+inline void Accessor::WriteData(size_t count, const void* src_buffer, size_t src_stride)
+{
+ uint8_t* buffer_ptr = bufferView->buffer->GetPointer();
+ size_t offset = byteOffset + bufferView->byteOffset;
+
+ size_t dst_stride = GetNumComponents() * GetBytesPerComponent();
+
+ const uint8_t* src = reinterpret_cast<const uint8_t*>(src_buffer);
+ uint8_t* dst = reinterpret_cast< uint8_t*>(buffer_ptr + offset);
+
+ ai_assert(dst + count*dst_stride <= buffer_ptr + bufferView->buffer->byteLength);
+ CopyData(count, src, src_stride, dst, dst_stride);
+}
+
+
+
+inline Accessor::Indexer::Indexer(Accessor& acc)
+ : accessor(acc)
+ , data(acc.GetPointer())
+ , elemSize(acc.GetElementSize())
+ , stride(acc.bufferView && acc.bufferView->byteStride ? acc.bufferView->byteStride : elemSize)
+{
+
+}
+
+//! Accesses the i-th value as defined by the accessor
+template<class T>
+T Accessor::Indexer::GetValue(int i)
+{
+ ai_assert(data);
+ ai_assert(i*stride < accessor.bufferView->byteLength);
+ T value = T();
+ memcpy(&value, data + i*stride, elemSize);
+ //value >>= 8 * (sizeof(T) - elemSize);
+ return value;
+}
+
+inline Image::Image()
+ : width(0)
+ , height(0)
+ , mDataLength(0)
+{
+
+}
+
+inline void Image::Read(Value& obj, Asset& r)
+{
+ if (!mDataLength) {
+ if (Value* uri = FindString(obj, "uri")) {
+ const char* uristr = uri->GetString();
+
+ Util::DataURI dataURI;
+ if (ParseDataURI(uristr, uri->GetStringLength(), dataURI)) {
+ mimeType = dataURI.mediaType;
+ if (dataURI.base64) {
+ uint8_t *ptr = nullptr;
+ mDataLength = Util::DecodeBase64(dataURI.data, dataURI.dataLength, ptr);
+ mData.reset(ptr);
+ }
+ }
+ else {
+ this->uri = uristr;
+ }
+ }
+ else if (Value* bufferViewVal = FindUInt(obj, "bufferView")) {
+ this->bufferView = r.bufferViews.Retrieve(bufferViewVal->GetUint());
+ Ref<Buffer> buffer = this->bufferView->buffer;
+
+ this->mDataLength = this->bufferView->byteLength;
+ // maybe this memcpy could be avoided if aiTexture does not delete[] pcData at destruction.
+
+ this->mData.reset(new uint8_t[this->mDataLength]);
+ memcpy(this->mData.get(), buffer->GetPointer() + this->bufferView->byteOffset, this->mDataLength);
+
+ if (Value* mtype = FindString(obj, "mimeType")) {
+ this->mimeType = mtype->GetString();
+ }
+ }
+ }
+}
+
+inline uint8_t* Image::StealData()
+{
+ mDataLength = 0;
+ return mData.release();
+}
+
+inline void Image::SetData(uint8_t* data, size_t length, Asset& r)
+{
+ Ref<Buffer> b = r.GetBodyBuffer();
+ if (b) { // binary file: append to body
+ std::string bvId = r.FindUniqueID(this->id, "imgdata");
+ bufferView = r.bufferViews.Create(bvId);
+
+ bufferView->buffer = b;
+ bufferView->byteLength = length;
+ bufferView->byteOffset = b->AppendData(data, length);
+ }
+ else { // text file: will be stored as a data uri
+ this->mData.reset(data);
+ this->mDataLength = length;
+ }
+}
+
+inline void Sampler::Read(Value& obj, Asset& /*r*/)
+{
+ SetDefaults();
+
+ ReadMember(obj, "name", name);
+ ReadMember(obj, "magFilter", magFilter);
+ ReadMember(obj, "minFilter", minFilter);
+ ReadMember(obj, "wrapS", wrapS);
+ ReadMember(obj, "wrapT", wrapT);
+}
+
+inline void Sampler::SetDefaults()
+{
+ //only wrapping modes have defaults
+ wrapS = SamplerWrap::Repeat;
+ wrapT = SamplerWrap::Repeat;
+ magFilter = SamplerMagFilter::UNSET;
+ minFilter = SamplerMinFilter::UNSET;
+}
+
+inline void Texture::Read(Value& obj, Asset& r)
+{
+ if (Value* sourceVal = FindUInt(obj, "source")) {
+ source = r.images.Retrieve(sourceVal->GetUint());
+ }
+
+ if (Value* samplerVal = FindUInt(obj, "sampler")) {
+ sampler = r.samplers.Retrieve(samplerVal->GetUint());
+ }
+}
+
+namespace {
+ inline void SetTextureProperties(Asset& r, Value* prop, TextureInfo& out)
+ {
+ if (Value* index = FindUInt(*prop, "index")) {
+ out.texture = r.textures.Retrieve(index->GetUint());
+ }
+
+ if (Value* texcoord = FindUInt(*prop, "texCoord")) {
+ out.texCoord = texcoord->GetUint();
+ }
+ }
+
+ inline void ReadTextureProperty(Asset& r, Value& vals, const char* propName, TextureInfo& out)
+ {
+ if (Value* prop = FindMember(vals, propName)) {
+ SetTextureProperties(r, prop, out);
+ }
+ }
+
+ inline void ReadTextureProperty(Asset& r, Value& vals, const char* propName, NormalTextureInfo& out)
+ {
+ if (Value* prop = FindMember(vals, propName)) {
+ SetTextureProperties(r, prop, out);
+
+ if (Value* scale = FindNumber(*prop, "scale")) {
+ out.scale = static_cast<float>(scale->GetDouble());
+ }
+ }
+ }
+
+ inline void ReadTextureProperty(Asset& r, Value& vals, const char* propName, OcclusionTextureInfo& out)
+ {
+ if (Value* prop = FindMember(vals, propName)) {
+ SetTextureProperties(r, prop, out);
+
+ if (Value* strength = FindNumber(*prop, "strength")) {
+ out.strength = static_cast<float>(strength->GetDouble());
+ }
+ }
+ }
+}
+
+inline void Material::Read(Value& material, Asset& r)
+{
+ SetDefaults();
+
+ if (Value* pbrMetallicRoughness = FindObject(material, "pbrMetallicRoughness")) {
+ ReadMember(*pbrMetallicRoughness, "baseColorFactor", this->pbrMetallicRoughness.baseColorFactor);
+ ReadTextureProperty(r, *pbrMetallicRoughness, "baseColorTexture", this->pbrMetallicRoughness.baseColorTexture);
+ ReadTextureProperty(r, *pbrMetallicRoughness, "metallicRoughnessTexture", this->pbrMetallicRoughness.metallicRoughnessTexture);
+ ReadMember(*pbrMetallicRoughness, "metallicFactor", this->pbrMetallicRoughness.metallicFactor);
+ ReadMember(*pbrMetallicRoughness, "roughnessFactor", this->pbrMetallicRoughness.roughnessFactor);
+ }
+
+ ReadTextureProperty(r, material, "normalTexture", this->normalTexture);
+ ReadTextureProperty(r, material, "occlusionTexture", this->occlusionTexture);
+ ReadTextureProperty(r, material, "emissiveTexture", this->emissiveTexture);
+ ReadMember(material, "emissiveFactor", this->emissiveFactor);
+
+ ReadMember(material, "doubleSided", this->doubleSided);
+ ReadMember(material, "alphaMode", this->alphaMode);
+ ReadMember(material, "alphaCutoff", this->alphaCutoff);
+
+ if (Value* extensions = FindObject(material, "extensions")) {
+ if (r.extensionsUsed.KHR_materials_pbrSpecularGlossiness) {
+ if (Value* pbrSpecularGlossiness = FindObject(*extensions, "KHR_materials_pbrSpecularGlossiness")) {
+ PbrSpecularGlossiness pbrSG;
+
+ ReadMember(*pbrSpecularGlossiness, "diffuseFactor", pbrSG.diffuseFactor);
+ ReadTextureProperty(r, *pbrSpecularGlossiness, "diffuseTexture", pbrSG.diffuseTexture);
+ ReadTextureProperty(r, *pbrSpecularGlossiness, "specularGlossinessTexture", pbrSG.specularGlossinessTexture);
+ ReadMember(*pbrSpecularGlossiness, "specularFactor", pbrSG.specularFactor);
+ ReadMember(*pbrSpecularGlossiness, "glossinessFactor", pbrSG.glossinessFactor);
+
+ this->pbrSpecularGlossiness = Nullable<PbrSpecularGlossiness>(pbrSG);
+ }
+ }
+
+ unlit = nullptr != FindObject(*extensions, "KHR_materials_unlit");
+ }
+}
+
+namespace {
+ void SetVector(vec4& v, const float(&in)[4])
+ { v[0] = in[0]; v[1] = in[1]; v[2] = in[2]; v[3] = in[3]; }
+
+ void SetVector(vec3& v, const float(&in)[3])
+ { v[0] = in[0]; v[1] = in[1]; v[2] = in[2]; }
+}
+
+inline void Material::SetDefaults()
+{
+ //pbr materials
+ SetVector(pbrMetallicRoughness.baseColorFactor, defaultBaseColor);
+ pbrMetallicRoughness.metallicFactor = 1.0;
+ pbrMetallicRoughness.roughnessFactor = 1.0;
+
+ SetVector(emissiveFactor, defaultEmissiveFactor);
+ alphaMode = "OPAQUE";
+ alphaCutoff = 0.5;
+ doubleSided = false;
+ unlit = false;
+}
+
+inline void PbrSpecularGlossiness::SetDefaults()
+{
+ //pbrSpecularGlossiness properties
+ SetVector(diffuseFactor, defaultDiffuseFactor);
+ SetVector(specularFactor, defaultSpecularFactor);
+ glossinessFactor = 1.0;
+}
+
+namespace {
+
+ template<int N>
+ inline int Compare(const char* attr, const char (&str)[N]) {
+ return (strncmp(attr, str, N - 1) == 0) ? N - 1 : 0;
+ }
+
+ inline bool GetAttribVector(Mesh::Primitive& p, const char* attr, Mesh::AccessorList*& v, int& pos)
+ {
+ if ((pos = Compare(attr, "POSITION"))) {
+ v = &(p.attributes.position);
+ }
+ else if ((pos = Compare(attr, "NORMAL"))) {
+ v = &(p.attributes.normal);
+ }
+ else if ((pos = Compare(attr, "TANGENT"))) {
+ v = &(p.attributes.tangent);
+ }
+ else if ((pos = Compare(attr, "TEXCOORD"))) {
+ v = &(p.attributes.texcoord);
+ }
+ else if ((pos = Compare(attr, "COLOR"))) {
+ v = &(p.attributes.color);
+ }
+ else if ((pos = Compare(attr, "JOINT"))) {
+ v = &(p.attributes.joint);
+ }
+ else if ((pos = Compare(attr, "JOINTMATRIX"))) {
+ v = &(p.attributes.jointmatrix);
+ }
+ else if ((pos = Compare(attr, "WEIGHT"))) {
+ v = &(p.attributes.weight);
+ }
+ else return false;
+ return true;
+ }
+
+ inline bool GetAttribTargetVector(Mesh::Primitive& p, const int targetIndex, const char* attr, Mesh::AccessorList*& v, int& pos)
+ {
+ if ((pos = Compare(attr, "POSITION"))) {
+ v = &(p.targets[targetIndex].position);
+ }
+ else if ((pos = Compare(attr, "NORMAL"))) {
+ v = &(p.targets[targetIndex].normal);
+ }
+ else if ((pos = Compare(attr, "TANGENT"))) {
+ v = &(p.targets[targetIndex].tangent);
+ }
+ else return false;
+ return true;
+ }
+}
+
+inline void Mesh::Read(Value& pJSON_Object, Asset& pAsset_Root)
+{
+ if (Value* name = FindMember(pJSON_Object, "name")) {
+ this->name = name->GetString();
+ }
+
+ /****************** Mesh primitives ******************/
+ if (Value* primitives = FindArray(pJSON_Object, "primitives")) {
+ this->primitives.resize(primitives->Size());
+ for (unsigned int i = 0; i < primitives->Size(); ++i) {
+ Value& primitive = (*primitives)[i];
+
+ Primitive& prim = this->primitives[i];
+ prim.mode = MemberOrDefault(primitive, "mode", PrimitiveMode_TRIANGLES);
+
+ if (Value* attrs = FindObject(primitive, "attributes")) {
+ for (Value::MemberIterator it = attrs->MemberBegin(); it != attrs->MemberEnd(); ++it) {
+ if (!it->value.IsUint()) continue;
+ const char* attr = it->name.GetString();
+ // Valid attribute semantics include POSITION, NORMAL, TANGENT, TEXCOORD, COLOR, JOINT, JOINTMATRIX,
+ // and WEIGHT.Attribute semantics can be of the form[semantic]_[set_index], e.g., TEXCOORD_0, TEXCOORD_1, etc.
+
+ int undPos = 0;
+ Mesh::AccessorList* vec = 0;
+ if (GetAttribVector(prim, attr, vec, undPos)) {
+ size_t idx = (attr[undPos] == '_') ? atoi(attr + undPos + 1) : 0;
+ if ((*vec).size() <= idx) (*vec).resize(idx + 1);
+ (*vec)[idx] = pAsset_Root.accessors.Retrieve(it->value.GetUint());
+ }
+ }
+ }
+
+ if (Value* targetsArray = FindArray(primitive, "targets")) {
+ prim.targets.resize(targetsArray->Size());
+ for (unsigned int i = 0; i < targetsArray->Size(); ++i) {
+ Value& target = (*targetsArray)[i];
+ if (!target.IsObject()) continue;
+ for (Value::MemberIterator it = target.MemberBegin(); it != target.MemberEnd(); ++it) {
+ if (!it->value.IsUint()) continue;
+ const char* attr = it->name.GetString();
+ // Valid attribute semantics include POSITION, NORMAL, TANGENT
+ int undPos = 0;
+ Mesh::AccessorList* vec = 0;
+ if (GetAttribTargetVector(prim, i, attr, vec, undPos)) {
+ size_t idx = (attr[undPos] == '_') ? atoi(attr + undPos + 1) : 0;
+ if ((*vec).size() <= idx) (*vec).resize(idx + 1);
+ (*vec)[idx] = pAsset_Root.accessors.Retrieve(it->value.GetUint());
+ }
+ }
+ }
+ }
+
+ if (Value* indices = FindUInt(primitive, "indices")) {
+ prim.indices = pAsset_Root.accessors.Retrieve(indices->GetUint());
+ }
+
+ if (Value* material = FindUInt(primitive, "material")) {
+ prim.material = pAsset_Root.materials.Retrieve(material->GetUint());
+ }
+ }
+ }
+
+ if (Value* weights = FindArray(pJSON_Object, "weights")) {
+ this->weights.resize(weights->Size());
+ for (unsigned int i = 0; i < weights->Size(); ++i) {
+ Value& weightValue = (*weights)[i];
+ if (weightValue.IsNumber()) {
+ this->weights[i] = weightValue.GetFloat();
+ }
+ }
+ }
+}
+
+inline void Camera::Read(Value& obj, Asset& /*r*/)
+{
+ std::string type_string = std::string(MemberOrDefault(obj, "type", "perspective"));
+ if (type_string == "orthographic") {
+ type = Camera::Orthographic;
+ } else {
+ type = Camera::Perspective;
+ }
+
+ const char* subobjId = (type == Camera::Orthographic) ? "orthographic" : "perspective";
+
+ Value* it = FindObject(obj, subobjId);
+ if (!it) throw DeadlyImportError("GLTF: Camera missing its parameters");
+
+ if (type == Camera::Perspective) {
+ cameraProperties.perspective.aspectRatio = MemberOrDefault(*it, "aspectRatio", 0.f);
+ cameraProperties.perspective.yfov = MemberOrDefault(*it, "yfov", 3.1415f/2.f);
+ cameraProperties.perspective.zfar = MemberOrDefault(*it, "zfar", 100.f);
+ cameraProperties.perspective.znear = MemberOrDefault(*it, "znear", 0.01f);
+ }
+ else {
+ cameraProperties.ortographic.xmag = MemberOrDefault(obj, "xmag", 1.f);
+ cameraProperties.ortographic.ymag = MemberOrDefault(obj, "ymag", 1.f);
+ cameraProperties.ortographic.zfar = MemberOrDefault(obj, "zfar", 100.f);
+ cameraProperties.ortographic.znear = MemberOrDefault(obj, "znear", 0.01f);
+ }
+}
+
+inline void Node::Read(Value& obj, Asset& r)
+{
+
+ if (Value* children = FindArray(obj, "children")) {
+ this->children.reserve(children->Size());
+ for (unsigned int i = 0; i < children->Size(); ++i) {
+ Value& child = (*children)[i];
+ if (child.IsUint()) {
+ // get/create the child node
+ Ref<Node> chn = r.nodes.Retrieve(child.GetUint());
+ if (chn) this->children.push_back(chn);
+ }
+ }
+ }
+
+ if (Value* matrix = FindArray(obj, "matrix")) {
+ ReadValue(*matrix, this->matrix);
+ }
+ else {
+ ReadMember(obj, "translation", translation);
+ ReadMember(obj, "scale", scale);
+ ReadMember(obj, "rotation", rotation);
+ }
+
+ if (Value* mesh = FindUInt(obj, "mesh")) {
+ unsigned numMeshes = 1;
+
+ this->meshes.reserve(numMeshes);
+
+ Ref<Mesh> meshRef = r.meshes.Retrieve((*mesh).GetUint());
+
+ if (meshRef) this->meshes.push_back(meshRef);
+ }
+
+ if (Value* skin = FindUInt(obj, "skin")) {
+ this->skin = r.skins.Retrieve(skin->GetUint());
+ }
+
+ if (Value* camera = FindUInt(obj, "camera")) {
+ this->camera = r.cameras.Retrieve(camera->GetUint());
+ if (this->camera)
+ this->camera->id = this->id;
+ }
+}
+
+inline void Scene::Read(Value& obj, Asset& r)
+{
+ if (Value* array = FindArray(obj, "nodes")) {
+ for (unsigned int i = 0; i < array->Size(); ++i) {
+ if (!(*array)[i].IsUint()) continue;
+ Ref<Node> node = r.nodes.Retrieve((*array)[i].GetUint());
+ if (node)
+ this->nodes.push_back(node);
+ }
+ }
+}
+
+inline void Skin::Read(Value& obj, Asset& r)
+{
+ if (Value* matrices = FindUInt(obj, "inverseBindMatrices")) {
+ inverseBindMatrices = r.accessors.Retrieve(matrices->GetUint());
+ }
+
+ if (Value* joints = FindArray(obj, "joints")) {
+ for (unsigned i = 0; i < joints->Size(); ++i) {
+ if (!(*joints)[i].IsUint()) continue;
+ Ref<Node> node = r.nodes.Retrieve((*joints)[i].GetUint());
+ if (node) {
+ this->jointNames.push_back(node);
+ }
+ }
+ }
+}
+
+inline void Animation::Read(Value& obj, Asset& r)
+{
+ if (Value* samplers = FindArray(obj, "samplers")) {
+ for (unsigned i = 0; i < samplers->Size(); ++i) {
+ Value& sampler = (*samplers)[i];
+
+ Sampler s;
+ if (Value* input = FindUInt(sampler, "input")) {
+ s.input = r.accessors.Retrieve(input->GetUint());
+ }
+ if (Value* output = FindUInt(sampler, "output")) {
+ s.output = r.accessors.Retrieve(output->GetUint());
+ }
+ s.interpolation = Interpolation_LINEAR;
+ if (Value* interpolation = FindString(sampler, "interpolation")) {
+ const std::string interp = interpolation->GetString();
+ if (interp == "LINEAR") {
+ s.interpolation = Interpolation_LINEAR;
+ } else if (interp == "STEP") {
+ s.interpolation = Interpolation_STEP;
+ } else if (interp == "CUBICSPLINE") {
+ s.interpolation = Interpolation_CUBICSPLINE;
+ }
+ }
+ this->samplers.push_back(s);
+ }
+ }
+
+ if (Value* channels = FindArray(obj, "channels")) {
+ for (unsigned i = 0; i < channels->Size(); ++i) {
+ Value& channel = (*channels)[i];
+
+ Channel c;
+ if (Value* sampler = FindUInt(channel, "sampler")) {
+ c.sampler = sampler->GetUint();
+ }
+
+ if (Value* target = FindObject(channel, "target")) {
+ if (Value* node = FindUInt(*target, "node")) {
+ c.target.node = r.nodes.Retrieve(node->GetUint());
+ }
+ if (Value* path = FindString(*target, "path")) {
+ const std::string p = path->GetString();
+ if (p == "translation") {
+ c.target.path = AnimationPath_TRANSLATION;
+ } else if (p == "rotation") {
+ c.target.path = AnimationPath_ROTATION;
+ } else if (p == "scale") {
+ c.target.path = AnimationPath_SCALE;
+ } else if (p == "weights") {
+ c.target.path = AnimationPath_WEIGHTS;
+ }
+ }
+ }
+ this->channels.push_back(c);
+ }
+ }
+}
+
+inline void AssetMetadata::Read(Document& doc)
+{
+ if (Value* obj = FindObject(doc, "asset")) {
+ ReadMember(*obj, "copyright", copyright);
+ ReadMember(*obj, "generator", generator);
+
+ if (Value* versionString = FindString(*obj, "version")) {
+ version = versionString->GetString();
+ } else if (Value* versionNumber = FindNumber (*obj, "version")) {
+ char buf[4];
+
+ ai_snprintf(buf, 4, "%.1f", versionNumber->GetDouble());
+
+ version = buf;
+ }
+
+ if (Value* profile = FindObject(*obj, "profile")) {
+ ReadMember(*profile, "api", this->profile.api);
+ ReadMember(*profile, "version", this->profile.version);
+ }
+ }
+
+ if (version.empty() || version[0] != '2') {
+ throw DeadlyImportError("GLTF: Unsupported glTF version: " + version);
+ }
+}
+
+//
+// Asset methods implementation
+//
+
+inline void Asset::ReadBinaryHeader(IOStream& stream, std::vector<char>& sceneData)
+{
+ GLB_Header header;
+ if (stream.Read(&header, sizeof(header), 1) != 1) {
+ throw DeadlyImportError("GLTF: Unable to read the file header");
+ }
+
+ if (strncmp((char*)header.magic, AI_GLB_MAGIC_NUMBER, sizeof(header.magic)) != 0) {
+ throw DeadlyImportError("GLTF: Invalid binary glTF file");
+ }
+
+ AI_SWAP4(header.version);
+ asset.version = to_string(header.version);
+ if (header.version != 2) {
+ throw DeadlyImportError("GLTF: Unsupported binary glTF version");
+ }
+
+ GLB_Chunk chunk;
+ if (stream.Read(&chunk, sizeof(chunk), 1) != 1) {
+ throw DeadlyImportError("GLTF: Unable to read JSON chunk");
+ }
+
+ AI_SWAP4(chunk.chunkLength);
+ AI_SWAP4(chunk.chunkType);
+
+ if (chunk.chunkType != ChunkType_JSON) {
+ throw DeadlyImportError("GLTF: JSON chunk missing");
+ }
+
+ // read the scene data
+
+ mSceneLength = chunk.chunkLength;
+ sceneData.resize(mSceneLength + 1);
+ sceneData[mSceneLength] = '\0';
+
+ if (stream.Read(&sceneData[0], 1, mSceneLength) != mSceneLength) {
+ throw DeadlyImportError("GLTF: Could not read the file contents");
+ }
+
+ uint32_t padding = ((chunk.chunkLength + 3) & ~3) - chunk.chunkLength;
+ if (padding > 0) {
+ stream.Seek(padding, aiOrigin_CUR);
+ }
+
+ AI_SWAP4(header.length);
+ mBodyOffset = 12 + 8 + chunk.chunkLength + padding + 8;
+ if (header.length >= mBodyOffset) {
+ if (stream.Read(&chunk, sizeof(chunk), 1) != 1) {
+ throw DeadlyImportError("GLTF: Unable to read BIN chunk");
+ }
+
+ AI_SWAP4(chunk.chunkLength);
+ AI_SWAP4(chunk.chunkType);
+
+ if (chunk.chunkType != ChunkType_BIN) {
+ throw DeadlyImportError("GLTF: BIN chunk missing");
+ }
+
+ mBodyLength = chunk.chunkLength;
+ }
+ else {
+ mBodyOffset = mBodyLength = 0;
+ }
+}
+
+inline void Asset::Load(const std::string& pFile, bool isBinary)
+{
+ mCurrentAssetDir.clear();
+ int pos = std::max(int(pFile.rfind('/')), int(pFile.rfind('\\')));
+ if (pos != int(std::string::npos)) mCurrentAssetDir = pFile.substr(0, pos + 1);
+
+ shared_ptr<IOStream> stream(OpenFile(pFile.c_str(), "rb", true));
+ if (!stream) {
+ throw DeadlyImportError("GLTF: Could not open file for reading");
+ }
+
+ // is binary? then read the header
+ std::vector<char> sceneData;
+ if (isBinary) {
+ SetAsBinary(); // also creates the body buffer
+ ReadBinaryHeader(*stream, sceneData);
+ }
+ else {
+ mSceneLength = stream->FileSize();
+ mBodyLength = 0;
+
+
+ // read the scene data
+
+ sceneData.resize(mSceneLength + 1);
+ sceneData[mSceneLength] = '\0';
+
+ if (stream->Read(&sceneData[0], 1, mSceneLength) != mSceneLength) {
+ throw DeadlyImportError("GLTF: Could not read the file contents");
+ }
+ }
+
+
+ // parse the JSON document
+
+ Document doc;
+ doc.ParseInsitu(&sceneData[0]);
+
+ if (doc.HasParseError()) {
+ char buffer[32];
+ ai_snprintf(buffer, 32, "%d", static_cast<int>(doc.GetErrorOffset()));
+ throw DeadlyImportError(std::string("GLTF: JSON parse error, offset ") + buffer + ": "
+ + GetParseError_En(doc.GetParseError()));
+ }
+
+ if (!doc.IsObject()) {
+ throw DeadlyImportError("GLTF: JSON document root must be a JSON object");
+ }
+
+ // Fill the buffer instance for the current file embedded contents
+ if (mBodyLength > 0) {
+ if (!mBodyBuffer->LoadFromStream(*stream, mBodyLength, mBodyOffset)) {
+ throw DeadlyImportError("GLTF: Unable to read gltf file");
+ }
+ }
+
+
+ // Load the metadata
+ asset.Read(doc);
+ ReadExtensionsUsed(doc);
+
+ // Prepare the dictionaries
+ for (size_t i = 0; i < mDicts.size(); ++i) {
+ mDicts[i]->AttachToDocument(doc);
+ }
+
+ // Read the "scene" property, which specifies which scene to load
+ // and recursively load everything referenced by it
+ unsigned int sceneIndex = 0;
+ if (Value* scene = FindUInt(doc, "scene")) {
+ sceneIndex = scene->GetUint();
+ }
+
+ if (Value* scenesArray = FindArray(doc, "scenes")) {
+ if (sceneIndex < scenesArray->Size()) {
+ this->scene = scenes.Retrieve(sceneIndex);
+ }
+ }
+
+ // Force reading of skins since they're not always directly referenced
+ if (Value* skinsArray = FindArray(doc, "skins")) {
+ for (unsigned int i = 0; i < skinsArray->Size(); ++i) {
+ skins.Retrieve(i);
+ }
+ }
+
+ if (Value* animsArray = FindArray(doc, "animations")) {
+ for (unsigned int i = 0; i < animsArray->Size(); ++i) {
+ animations.Retrieve(i);
+ }
+ }
+
+ // Clean up
+ for (size_t i = 0; i < mDicts.size(); ++i) {
+ mDicts[i]->DetachFromDocument();
+ }
+}
+
+inline void Asset::SetAsBinary()
+{
+ if (!mBodyBuffer) {
+ mBodyBuffer = buffers.Create("binary_glTF");
+ mBodyBuffer->MarkAsSpecial();
+ }
+}
+
+
+inline void Asset::ReadExtensionsUsed(Document& doc)
+{
+ Value* extsUsed = FindArray(doc, "extensionsUsed");
+ if (!extsUsed) return;
+
+ std::gltf_unordered_map<std::string, bool> exts;
+
+ for (unsigned int i = 0; i < extsUsed->Size(); ++i) {
+ if ((*extsUsed)[i].IsString()) {
+ exts[(*extsUsed)[i].GetString()] = true;
+ }
+ }
+
+ #define CHECK_EXT(EXT) \
+ if (exts.find(#EXT) != exts.end()) extensionsUsed.EXT = true;
+
+ CHECK_EXT(KHR_materials_pbrSpecularGlossiness);
+ CHECK_EXT(KHR_materials_unlit);
+
+ #undef CHECK_EXT
+}
+
+inline IOStream* Asset::OpenFile(std::string path, const char* mode, bool /*absolute*/)
+{
+ #ifdef ASSIMP_API
+ return mIOSystem->Open(path, mode);
+ #else
+ if (path.size() < 2) return 0;
+ if (!absolute && path[1] != ':' && path[0] != '/') { // relative?
+ path = mCurrentAssetDir + path;
+ }
+ FILE* f = fopen(path.c_str(), mode);
+ return f ? new IOStream(f) : 0;
+ #endif
+}
+
+inline std::string Asset::FindUniqueID(const std::string& str, const char* suffix)
+{
+ std::string id = str;
+
+ if (!id.empty()) {
+ if (mUsedIds.find(id) == mUsedIds.end())
+ return id;
+
+ id += "_";
+ }
+
+ id += suffix;
+
+ Asset::IdMap::iterator it = mUsedIds.find(id);
+ if (it == mUsedIds.end())
+ return id;
+
+ std::vector<char> buffer;
+ buffer.resize(id.size() + 16);
+ int offset = ai_snprintf(buffer.data(), buffer.size(), "%s_", id.c_str());
+ for (int i = 0; it != mUsedIds.end(); ++i) {
+ ai_snprintf(buffer.data() + offset, buffer.size() - offset, "%d", i);
+ id = buffer.data();
+ it = mUsedIds.find(id);
+ }
+
+ return id;
+}
+
+namespace Util {
+
+ inline
+ bool ParseDataURI(const char* const_uri, size_t uriLen, DataURI& out) {
+ if ( NULL == const_uri ) {
+ return false;
+ }
+
+ if (const_uri[0] != 0x10) { // we already parsed this uri?
+ if (strncmp(const_uri, "data:", 5) != 0) // not a data uri?
+ return false;
+ }
+
+ // set defaults
+ out.mediaType = "text/plain";
+ out.charset = "US-ASCII";
+ out.base64 = false;
+
+ char* uri = const_cast<char*>(const_uri);
+ if (uri[0] != 0x10) {
+ uri[0] = 0x10;
+ uri[1] = uri[2] = uri[3] = uri[4] = 0;
+
+ size_t i = 5, j;
+ if (uri[i] != ';' && uri[i] != ',') { // has media type?
+ uri[1] = char(i);
+ for (; uri[i] != ';' && uri[i] != ',' && i < uriLen; ++i) {
+ // nothing to do!
+ }
+ }
+ while (uri[i] == ';' && i < uriLen) {
+ uri[i++] = '\0';
+ for (j = i; uri[i] != ';' && uri[i] != ',' && i < uriLen; ++i) {
+ // nothing to do!
+ }
+
+ if ( strncmp( uri + j, "charset=", 8 ) == 0 ) {
+ uri[2] = char(j + 8);
+ } else if ( strncmp( uri + j, "base64", 6 ) == 0 ) {
+ uri[3] = char(j);
+ }
+ }
+ if (i < uriLen) {
+ uri[i++] = '\0';
+ uri[4] = char(i);
+ } else {
+ uri[1] = uri[2] = uri[3] = 0;
+ uri[4] = 5;
+ }
+ }
+
+ if ( uri[ 1 ] != 0 ) {
+ out.mediaType = uri + uri[ 1 ];
+ }
+ if ( uri[ 2 ] != 0 ) {
+ out.charset = uri + uri[ 2 ];
+ }
+ if ( uri[ 3 ] != 0 ) {
+ out.base64 = true;
+ }
+ out.data = uri + uri[4];
+ out.dataLength = (uri + uriLen) - out.data;
+
+ return true;
+ }
+
+ template<bool B>
+ struct DATA
+ {
+ static const uint8_t tableDecodeBase64[128];
+ };
+
+ template<bool B>
+ const uint8_t DATA<B>::tableDecodeBase64[128] = {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 0, 0, 0, 63,
+ 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 0, 0, 0, 64, 0, 0,
+ 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, 0, 0, 0, 0,
+ 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 0, 0, 0, 0, 0
+ };
+
+ inline char EncodeCharBase64(uint8_t b)
+ {
+ return "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="[size_t(b)];
+ }
+
+ inline uint8_t DecodeCharBase64(char c)
+ {
+ return DATA<true>::tableDecodeBase64[size_t(c)]; // TODO faster with lookup table or ifs?
+ /*if (c >= 'A' && c <= 'Z') return c - 'A';
+ if (c >= 'a' && c <= 'z') return c - 'a' + 26;
+ if (c >= '0' && c <= '9') return c - '0' + 52;
+ if (c == '+') return 62;
+ if (c == '/') return 63;
+ return 64; // '-' */
+ }
+
+ inline size_t DecodeBase64(const char* in, size_t inLength, uint8_t*& out)
+ {
+ ai_assert(inLength % 4 == 0);
+
+ if (inLength < 4) {
+ out = 0;
+ return 0;
+ }
+
+ int nEquals = int(in[inLength - 1] == '=') +
+ int(in[inLength - 2] == '=');
+
+ size_t outLength = (inLength * 3) / 4 - nEquals;
+ out = new uint8_t[outLength];
+ memset(out, 0, outLength);
+
+ size_t i, j = 0;
+
+ for (i = 0; i + 4 < inLength; i += 4) {
+ uint8_t b0 = DecodeCharBase64(in[i]);
+ uint8_t b1 = DecodeCharBase64(in[i + 1]);
+ uint8_t b2 = DecodeCharBase64(in[i + 2]);
+ uint8_t b3 = DecodeCharBase64(in[i + 3]);
+
+ out[j++] = (uint8_t)((b0 << 2) | (b1 >> 4));
+ out[j++] = (uint8_t)((b1 << 4) | (b2 >> 2));
+ out[j++] = (uint8_t)((b2 << 6) | b3);
+ }
+
+ {
+ uint8_t b0 = DecodeCharBase64(in[i]);
+ uint8_t b1 = DecodeCharBase64(in[i + 1]);
+ uint8_t b2 = DecodeCharBase64(in[i + 2]);
+ uint8_t b3 = DecodeCharBase64(in[i + 3]);
+
+ out[j++] = (uint8_t)((b0 << 2) | (b1 >> 4));
+ if (b2 < 64) out[j++] = (uint8_t)((b1 << 4) | (b2 >> 2));
+ if (b3 < 64) out[j++] = (uint8_t)((b2 << 6) | b3);
+ }
+
+ return outLength;
+ }
+
+
+
+ inline void EncodeBase64(
+ const uint8_t* in, size_t inLength,
+ std::string& out)
+ {
+ size_t outLength = ((inLength + 2) / 3) * 4;
+
+ size_t j = out.size();
+ out.resize(j + outLength);
+
+ for (size_t i = 0; i < inLength; i += 3) {
+ uint8_t b = (in[i] & 0xFC) >> 2;
+ out[j++] = EncodeCharBase64(b);
+
+ b = (in[i] & 0x03) << 4;
+ if (i + 1 < inLength) {
+ b |= (in[i + 1] & 0xF0) >> 4;
+ out[j++] = EncodeCharBase64(b);
+
+ b = (in[i + 1] & 0x0F) << 2;
+ if (i + 2 < inLength) {
+ b |= (in[i + 2] & 0xC0) >> 6;
+ out[j++] = EncodeCharBase64(b);
+
+ b = in[i + 2] & 0x3F;
+ out[j++] = EncodeCharBase64(b);
+ }
+ else {
+ out[j++] = EncodeCharBase64(b);
+ out[j++] = '=';
+ }
+ }
+ else {
+ out[j++] = EncodeCharBase64(b);
+ out[j++] = '=';
+ out[j++] = '=';
+ }
+ }
+ }
+
+}
+
+} // ns glTF
diff --git a/code/glTF2AssetWriter.h b/code/glTF2AssetWriter.h
new file mode 100644
index 000000000..493ca1c0a
--- /dev/null
+++ b/code/glTF2AssetWriter.h
@@ -0,0 +1,96 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2018, assimp 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 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 glTFWriter.h
+ * Declares a class to write gltf/glb files
+ *
+ * glTF Extensions Support:
+ * KHR_materials_pbrSpecularGlossiness: full
+ * KHR_materials_unlit: full
+ */
+#ifndef GLTF2ASSETWRITER_H_INC
+#define GLTF2ASSETWRITER_H_INC
+
+#ifndef ASSIMP_BUILD_NO_GLTF_IMPORTER
+
+#include "glTF2Asset.h"
+
+namespace glTF2
+{
+
+using rapidjson::MemoryPoolAllocator;
+
+class AssetWriter
+{
+ template<class T>
+ friend void WriteLazyDict(LazyDict<T>& d, AssetWriter& w);
+
+private:
+
+ void WriteBinaryData(IOStream* outfile, size_t sceneLength);
+
+ void WriteMetadata();
+ void WriteExtensionsUsed();
+
+ template<class T>
+ void WriteObjects(LazyDict<T>& d);
+
+public:
+ Document mDoc;
+ Asset& mAsset;
+
+ MemoryPoolAllocator<>& mAl;
+
+ AssetWriter(Asset& asset);
+
+ void WriteFile(const char* path);
+ void WriteGLBFile(const char* path);
+};
+
+}
+
+// Include the implementation of the methods
+#include "glTF2AssetWriter.inl"
+
+#endif // ASSIMP_BUILD_NO_GLTF_IMPORTER
+
+#endif // GLTF2ASSETWRITER_H_INC
diff --git a/code/glTF2AssetWriter.inl b/code/glTF2AssetWriter.inl
new file mode 100644
index 000000000..50d855aaa
--- /dev/null
+++ b/code/glTF2AssetWriter.inl
@@ -0,0 +1,773 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2018, assimp 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 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 <rapidjson/stringbuffer.h>
+#include <rapidjson/writer.h>
+#include <rapidjson/prettywriter.h>
+
+namespace glTF2 {
+
+ using rapidjson::StringBuffer;
+ using rapidjson::PrettyWriter;
+ using rapidjson::Writer;
+ using rapidjson::StringRef;
+ using rapidjson::StringRef;
+
+ namespace {
+
+ template<size_t N>
+ inline Value& MakeValue(Value& val, float(&r)[N], MemoryPoolAllocator<>& al) {
+ val.SetArray();
+ val.Reserve(N, al);
+ for (decltype(N) i = 0; i < N; ++i) {
+ val.PushBack(r[i], al);
+ }
+ return val;
+ }
+
+ inline Value& MakeValue(Value& val, const std::vector<float> & r, MemoryPoolAllocator<>& al) {
+ val.SetArray();
+ val.Reserve(static_cast<rapidjson::SizeType>(r.size()), al);
+ for (unsigned int i = 0; i < r.size(); ++i) {
+ val.PushBack(r[i], al);
+ }
+ return val;
+ }
+
+ inline Value& MakeValue(Value& val, float r, MemoryPoolAllocator<>& /*al*/) {
+ val.SetDouble(r);
+
+ return val;
+ }
+
+ template<class T>
+ inline void AddRefsVector(Value& obj, const char* fieldId, std::vector< Ref<T> >& v, MemoryPoolAllocator<>& al) {
+ if (v.empty()) return;
+ Value lst;
+ lst.SetArray();
+ lst.Reserve(unsigned(v.size()), al);
+ for (size_t i = 0; i < v.size(); ++i) {
+ lst.PushBack(v[i]->index, al);
+ }
+ obj.AddMember(StringRef(fieldId), lst, al);
+ }
+
+
+ }
+
+ inline void Write(Value& obj, Accessor& a, AssetWriter& w)
+ {
+ obj.AddMember("bufferView", a.bufferView->index, w.mAl);
+ obj.AddMember("byteOffset", a.byteOffset, w.mAl);
+
+ obj.AddMember("componentType", int(a.componentType), w.mAl);
+ obj.AddMember("count", a.count, w.mAl);
+ obj.AddMember("type", StringRef(AttribType::ToString(a.type)), w.mAl);
+
+ Value vTmpMax, vTmpMin;
+ obj.AddMember("max", MakeValue(vTmpMax, a.max, w.mAl), w.mAl);
+ obj.AddMember("min", MakeValue(vTmpMin, a.min, w.mAl), w.mAl);
+ }
+
+ inline void Write(Value& obj, Animation& a, AssetWriter& w)
+ {
+ /****************** Channels *******************/
+ Value channels;
+ channels.SetArray();
+ channels.Reserve(unsigned(a.channels.size()), w.mAl);
+
+ for (size_t i = 0; i < unsigned(a.channels.size()); ++i) {
+ Animation::Channel& c = a.channels[i];
+ Value valChannel;
+ valChannel.SetObject();
+ {
+ valChannel.AddMember("sampler", c.sampler, w.mAl);
+
+ Value valTarget;
+ valTarget.SetObject();
+ {
+ valTarget.AddMember("node", c.target.node->index, w.mAl);
+ switch (c.target.path) {
+ case AnimationPath_TRANSLATION:
+ valTarget.AddMember("path", "translation", w.mAl);
+ break;
+ case AnimationPath_ROTATION:
+ valTarget.AddMember("path", "rotation", w.mAl);
+ break;
+ case AnimationPath_SCALE:
+ valTarget.AddMember("path", "scale", w.mAl);
+ break;
+ case AnimationPath_WEIGHTS:
+ valTarget.AddMember("path", "weights", w.mAl);
+ break;
+ }
+ }
+ valChannel.AddMember("target", valTarget, w.mAl);
+ }
+ channels.PushBack(valChannel, w.mAl);
+ }
+ obj.AddMember("channels", channels, w.mAl);
+
+ /****************** Samplers *******************/
+ Value valSamplers;
+ valSamplers.SetArray();
+
+ for (size_t i = 0; i < unsigned(a.samplers.size()); ++i) {
+ Animation::Sampler& s = a.samplers[i];
+ Value valSampler;
+ valSampler.SetObject();
+ {
+ valSampler.AddMember("input", s.input->index, w.mAl);
+ switch (s.interpolation) {
+ case Interpolation_LINEAR:
+ valSampler.AddMember("path", "LINEAR", w.mAl);
+ break;
+ case Interpolation_STEP:
+ valSampler.AddMember("path", "STEP", w.mAl);
+ break;
+ case Interpolation_CUBICSPLINE:
+ valSampler.AddMember("path", "CUBICSPLINE", w.mAl);
+ break;
+ }
+ valSampler.AddMember("output", s.output->index, w.mAl);
+ }
+ valSamplers.PushBack(valSampler, w.mAl);
+ }
+ obj.AddMember("samplers", valSamplers, w.mAl);
+ }
+
+ inline void Write(Value& obj, Buffer& b, AssetWriter& w)
+ {
+ obj.AddMember("byteLength", static_cast<uint64_t>(b.byteLength), w.mAl);
+
+ const auto uri = b.GetURI();
+ const auto relativeUri = uri.substr(uri.find_last_of("/\\") + 1u);
+ obj.AddMember("uri", Value(relativeUri, w.mAl).Move(), w.mAl);
+ }
+
+ inline void Write(Value& obj, BufferView& bv, AssetWriter& w)
+ {
+ obj.AddMember("buffer", bv.buffer->index, w.mAl);
+ obj.AddMember("byteOffset", static_cast<uint64_t>(bv.byteOffset), w.mAl);
+ obj.AddMember("byteLength", static_cast<uint64_t>(bv.byteLength), w.mAl);
+ if (bv.byteStride != 0) {
+ obj.AddMember("byteStride", bv.byteStride, w.mAl);
+ }
+ if (bv.target != 0) {
+ obj.AddMember("target", int(bv.target), w.mAl);
+ }
+ }
+
+ inline void Write(Value& /*obj*/, Camera& /*c*/, AssetWriter& /*w*/)
+ {
+
+ }
+
+ inline void Write(Value& obj, Image& img, AssetWriter& w)
+ {
+ if (img.bufferView) {
+ obj.AddMember("bufferView", img.bufferView->index, w.mAl);
+ obj.AddMember("mimeType", Value(img.mimeType, w.mAl).Move(), w.mAl);
+ }
+ else {
+ std::string uri;
+ if (img.HasData()) {
+ uri = "data:" + (img.mimeType.empty() ? "application/octet-stream" : img.mimeType);
+ uri += ";base64,";
+ Util::EncodeBase64(img.GetData(), img.GetDataLength(), uri);
+ }
+ else {
+ uri = img.uri;
+ }
+
+ obj.AddMember("uri", Value(uri, w.mAl).Move(), w.mAl);
+ }
+ }
+
+ namespace {
+ inline void SetTexBasic(TextureInfo t, Value& tex, MemoryPoolAllocator<>& al)
+ {
+ tex.SetObject();
+ tex.AddMember("index", t.texture->index, al);
+
+ if (t.texCoord != 0) {
+ tex.AddMember("texCoord", t.texCoord, al);
+ }
+ }
+
+ inline void WriteTex(Value& obj, TextureInfo t, const char* propName, MemoryPoolAllocator<>& al)
+ {
+
+ if (t.texture) {
+ Value tex;
+
+ SetTexBasic(t, tex, al);
+
+ obj.AddMember(StringRef(propName), tex, al);
+ }
+ }
+
+ inline void WriteTex(Value& obj, NormalTextureInfo t, const char* propName, MemoryPoolAllocator<>& al)
+ {
+
+ if (t.texture) {
+ Value tex;
+
+ SetTexBasic(t, tex, al);
+
+ if (t.scale != 1) {
+ tex.AddMember("scale", t.scale, al);
+ }
+
+ obj.AddMember(StringRef(propName), tex, al);
+ }
+ }
+
+ inline void WriteTex(Value& obj, OcclusionTextureInfo t, const char* propName, MemoryPoolAllocator<>& al)
+ {
+
+ if (t.texture) {
+ Value tex;
+
+ SetTexBasic(t, tex, al);
+
+ if (t.strength != 1) {
+ tex.AddMember("strength", t.strength, al);
+ }
+
+ obj.AddMember(StringRef(propName), tex, al);
+ }
+ }
+
+ template<size_t N>
+ inline void WriteVec(Value& obj, float(&prop)[N], const char* propName, MemoryPoolAllocator<>& al)
+ {
+ Value arr;
+ obj.AddMember(StringRef(propName), MakeValue(arr, prop, al), al);
+ }
+
+ template<size_t N>
+ inline void WriteVec(Value& obj, float(&prop)[N], const char* propName, const float(&defaultVal)[N], MemoryPoolAllocator<>& al)
+ {
+ if (!std::equal(std::begin(prop), std::end(prop), std::begin(defaultVal))) {
+ WriteVec(obj, prop, propName, al);
+ }
+ }
+
+ inline void WriteFloat(Value& obj, float prop, const char* propName, MemoryPoolAllocator<>& al)
+ {
+ Value num;
+ obj.AddMember(StringRef(propName), MakeValue(num, prop, al), al);
+ }
+ }
+
+ inline void Write(Value& obj, Material& m, AssetWriter& w)
+ {
+ Value pbrMetallicRoughness;
+ pbrMetallicRoughness.SetObject();
+ {
+ WriteTex(pbrMetallicRoughness, m.pbrMetallicRoughness.baseColorTexture, "baseColorTexture", w.mAl);
+ WriteTex(pbrMetallicRoughness, m.pbrMetallicRoughness.metallicRoughnessTexture, "metallicRoughnessTexture", w.mAl);
+ WriteVec(pbrMetallicRoughness, m.pbrMetallicRoughness.baseColorFactor, "baseColorFactor", defaultBaseColor, w.mAl);
+
+ if (m.pbrMetallicRoughness.metallicFactor != 1) {
+ WriteFloat(pbrMetallicRoughness, m.pbrMetallicRoughness.metallicFactor, "metallicFactor", w.mAl);
+ }
+
+ if (m.pbrMetallicRoughness.roughnessFactor != 1) {
+ WriteFloat(pbrMetallicRoughness, m.pbrMetallicRoughness.roughnessFactor, "roughnessFactor", w.mAl);
+ }
+ }
+
+ if (!pbrMetallicRoughness.ObjectEmpty()) {
+ obj.AddMember("pbrMetallicRoughness", pbrMetallicRoughness, w.mAl);
+ }
+
+ WriteTex(obj, m.normalTexture, "normalTexture", w.mAl);
+ WriteTex(obj, m.emissiveTexture, "emissiveTexture", w.mAl);
+ WriteTex(obj, m.occlusionTexture, "occlusionTexture", w.mAl);
+ WriteVec(obj, m.emissiveFactor, "emissiveFactor", defaultEmissiveFactor, w.mAl);
+
+ if (m.alphaCutoff != 0.5) {
+ WriteFloat(obj, m.alphaCutoff, "alphaCutoff", w.mAl);
+ }
+
+ if (m.alphaMode != "OPAQUE") {
+ obj.AddMember("alphaMode", Value(m.alphaMode, w.mAl).Move(), w.mAl);
+ }
+
+ if (m.doubleSided) {
+ obj.AddMember("doubleSided", m.doubleSided, w.mAl);
+ }
+
+ Value exts;
+ exts.SetObject();
+
+ if (m.pbrSpecularGlossiness.isPresent) {
+ Value pbrSpecularGlossiness;
+ pbrSpecularGlossiness.SetObject();
+
+ PbrSpecularGlossiness &pbrSG = m.pbrSpecularGlossiness.value;
+
+ //pbrSpecularGlossiness
+ WriteVec(pbrSpecularGlossiness, pbrSG.diffuseFactor, "diffuseFactor", defaultDiffuseFactor, w.mAl);
+ WriteVec(pbrSpecularGlossiness, pbrSG.specularFactor, "specularFactor", defaultSpecularFactor, w.mAl);
+
+ if (pbrSG.glossinessFactor != 1) {
+ WriteFloat(obj, pbrSG.glossinessFactor, "glossinessFactor", w.mAl);
+ }
+
+ WriteTex(pbrSpecularGlossiness, pbrSG.diffuseTexture, "diffuseTexture", w.mAl);
+ WriteTex(pbrSpecularGlossiness, pbrSG.specularGlossinessTexture, "specularGlossinessTexture", w.mAl);
+
+ if (!pbrSpecularGlossiness.ObjectEmpty()) {
+ exts.AddMember("KHR_materials_pbrSpecularGlossiness", pbrSpecularGlossiness, w.mAl);
+ }
+ }
+
+ if (m.unlit) {
+ Value unlit;
+ unlit.SetObject();
+ exts.AddMember("KHR_materials_unlit", unlit, w.mAl);
+ }
+
+ if (!exts.ObjectEmpty()) {
+ obj.AddMember("extensions", exts, w.mAl);
+ }
+ }
+
+ namespace {
+ inline void WriteAttrs(AssetWriter& w, Value& attrs, Mesh::AccessorList& lst,
+ const char* semantic, bool forceNumber = false)
+ {
+ if (lst.empty()) return;
+ if (lst.size() == 1 && !forceNumber) {
+ attrs.AddMember(StringRef(semantic), lst[0]->index, w.mAl);
+ }
+ else {
+ for (size_t i = 0; i < lst.size(); ++i) {
+ char buffer[32];
+ ai_snprintf(buffer, 32, "%s_%d", semantic, int(i));
+ attrs.AddMember(Value(buffer, w.mAl).Move(), lst[i]->index, w.mAl);
+ }
+ }
+ }
+ }
+
+ inline void Write(Value& obj, Mesh& m, AssetWriter& w)
+ {
+ /****************** Primitives *******************/
+ Value primitives;
+ primitives.SetArray();
+ primitives.Reserve(unsigned(m.primitives.size()), w.mAl);
+
+ for (size_t i = 0; i < m.primitives.size(); ++i) {
+ Mesh::Primitive& p = m.primitives[i];
+ Value prim;
+ prim.SetObject();
+ {
+ prim.AddMember("mode", Value(int(p.mode)).Move(), w.mAl);
+
+ if (p.material)
+ prim.AddMember("material", p.material->index, w.mAl);
+
+ if (p.indices)
+ prim.AddMember("indices", p.indices->index, w.mAl);
+
+ Value attrs;
+ attrs.SetObject();
+ {
+ WriteAttrs(w, attrs, p.attributes.position, "POSITION");
+ WriteAttrs(w, attrs, p.attributes.normal, "NORMAL");
+ WriteAttrs(w, attrs, p.attributes.texcoord, "TEXCOORD", true);
+ WriteAttrs(w, attrs, p.attributes.color, "COLOR", true);
+ WriteAttrs(w, attrs, p.attributes.joint, "JOINTS", true);
+ WriteAttrs(w, attrs, p.attributes.weight, "WEIGHTS", true);
+ }
+ prim.AddMember("attributes", attrs, w.mAl);
+ }
+ primitives.PushBack(prim, w.mAl);
+ }
+
+ obj.AddMember("primitives", primitives, w.mAl);
+ }
+
+ inline void Write(Value& obj, Node& n, AssetWriter& w)
+ {
+
+ if (n.matrix.isPresent) {
+ Value val;
+ obj.AddMember("matrix", MakeValue(val, n.matrix.value, w.mAl).Move(), w.mAl);
+ }
+
+ if (n.translation.isPresent) {
+ Value val;
+ obj.AddMember("translation", MakeValue(val, n.translation.value, w.mAl).Move(), w.mAl);
+ }
+
+ if (n.scale.isPresent) {
+ Value val;
+ obj.AddMember("scale", MakeValue(val, n.scale.value, w.mAl).Move(), w.mAl);
+ }
+ if (n.rotation.isPresent) {
+ Value val;
+ obj.AddMember("rotation", MakeValue(val, n.rotation.value, w.mAl).Move(), w.mAl);
+ }
+
+ AddRefsVector(obj, "children", n.children, w.mAl);
+
+ if (!n.meshes.empty()) {
+ obj.AddMember("mesh", n.meshes[0]->index, w.mAl);
+ }
+
+ AddRefsVector(obj, "skeletons", n.skeletons, w.mAl);
+
+ if (n.skin) {
+ obj.AddMember("skin", n.skin->index, w.mAl);
+ }
+
+ if (!n.jointName.empty()) {
+ obj.AddMember("jointName", n.jointName, w.mAl);
+ }
+ }
+
+ inline void Write(Value& /*obj*/, Program& /*b*/, AssetWriter& /*w*/)
+ {
+
+ }
+
+ inline void Write(Value& obj, Sampler& b, AssetWriter& w)
+ {
+ if (!b.name.empty()) {
+ obj.AddMember("name", b.name, w.mAl);
+ }
+
+ if (b.wrapS != SamplerWrap::UNSET && b.wrapS != SamplerWrap::Repeat) {
+ obj.AddMember("wrapS", static_cast<unsigned int>(b.wrapS), w.mAl);
+ }
+
+ if (b.wrapT != SamplerWrap::UNSET && b.wrapT != SamplerWrap::Repeat) {
+ obj.AddMember("wrapT", static_cast<unsigned int>(b.wrapT), w.mAl);
+ }
+
+ if (b.magFilter != SamplerMagFilter::UNSET) {
+ obj.AddMember("magFilter", static_cast<unsigned int>(b.magFilter), w.mAl);
+ }
+
+ if (b.minFilter != SamplerMinFilter::UNSET) {
+ obj.AddMember("minFilter", static_cast<unsigned int>(b.minFilter), w.mAl);
+ }
+ }
+
+ inline void Write(Value& scene, Scene& s, AssetWriter& w)
+ {
+ AddRefsVector(scene, "nodes", s.nodes, w.mAl);
+ }
+
+ inline void Write(Value& /*obj*/, Shader& /*b*/, AssetWriter& /*w*/)
+ {
+
+ }
+
+ inline void Write(Value& obj, Skin& b, AssetWriter& w)
+ {
+ /****************** jointNames *******************/
+ Value vJointNames;
+ vJointNames.SetArray();
+ vJointNames.Reserve(unsigned(b.jointNames.size()), w.mAl);
+
+ for (size_t i = 0; i < unsigned(b.jointNames.size()); ++i) {
+ vJointNames.PushBack(b.jointNames[i]->index, w.mAl);
+ }
+ obj.AddMember("joints", vJointNames, w.mAl);
+
+ if (b.bindShapeMatrix.isPresent) {
+ Value val;
+ obj.AddMember("bindShapeMatrix", MakeValue(val, b.bindShapeMatrix.value, w.mAl).Move(), w.mAl);
+ }
+
+ if (b.inverseBindMatrices) {
+ obj.AddMember("inverseBindMatrices", b.inverseBindMatrices->index, w.mAl);
+ }
+
+ }
+
+ inline void Write(Value& obj, Texture& tex, AssetWriter& w)
+ {
+ if (tex.source) {
+ obj.AddMember("source", tex.source->index, w.mAl);
+ }
+ if (tex.sampler) {
+ obj.AddMember("sampler", tex.sampler->index, w.mAl);
+ }
+ }
+
+
+ inline AssetWriter::AssetWriter(Asset& a)
+ : mDoc()
+ , mAsset(a)
+ , mAl(mDoc.GetAllocator())
+ {
+ mDoc.SetObject();
+
+ WriteMetadata();
+ WriteExtensionsUsed();
+
+ // Dump the contents of the dictionaries
+ for (size_t i = 0; i < a.mDicts.size(); ++i) {
+ a.mDicts[i]->WriteObjects(*this);
+ }
+
+ // Add the target scene field
+ if (mAsset.scene) {
+ mDoc.AddMember("scene", mAsset.scene->index, mAl);
+ }
+ }
+
+ inline void AssetWriter::WriteFile(const char* path)
+ {
+ std::unique_ptr<IOStream> jsonOutFile(mAsset.OpenFile(path, "wt", true));
+
+ if (jsonOutFile == 0) {
+ throw DeadlyExportError("Could not open output file: " + std::string(path));
+ }
+
+ StringBuffer docBuffer;
+
+ PrettyWriter<StringBuffer> writer(docBuffer);
+ mDoc.Accept(writer);
+
+ if (jsonOutFile->Write(docBuffer.GetString(), docBuffer.GetSize(), 1) != 1) {
+ throw DeadlyExportError("Failed to write scene data!");
+ }
+
+ // Write buffer data to separate .bin files
+ for (unsigned int i = 0; i < mAsset.buffers.Size(); ++i) {
+ Ref<Buffer> b = mAsset.buffers.Get(i);
+
+ std::string binPath = b->GetURI();
+
+ std::unique_ptr<IOStream> binOutFile(mAsset.OpenFile(binPath, "wb", true));
+
+ if (binOutFile == 0) {
+ throw DeadlyExportError("Could not open output file: " + binPath);
+ }
+
+ if (b->byteLength > 0) {
+ if (binOutFile->Write(b->GetPointer(), b->byteLength, 1) != 1) {
+ throw DeadlyExportError("Failed to write binary file: " + binPath);
+ }
+ }
+ }
+ }
+
+ inline void AssetWriter::WriteGLBFile(const char* path)
+ {
+ std::unique_ptr<IOStream> outfile(mAsset.OpenFile(path, "wb", true));
+
+ if (outfile == 0) {
+ throw DeadlyExportError("Could not open output file: " + std::string(path));
+ }
+
+ Ref<Buffer> bodyBuffer = mAsset.GetBodyBuffer();
+ if (bodyBuffer->byteLength > 0) {
+ rapidjson::Value glbBodyBuffer;
+ glbBodyBuffer.SetObject();
+ glbBodyBuffer.AddMember("byteLength", static_cast<uint64_t>(bodyBuffer->byteLength), mAl);
+ mDoc["buffers"].PushBack(glbBodyBuffer, mAl);
+ }
+
+ // Padding with spaces as required by the spec
+ uint32_t padding = 0x20202020;
+
+ //
+ // JSON chunk
+ //
+
+ StringBuffer docBuffer;
+ Writer<StringBuffer> writer(docBuffer);
+ mDoc.Accept(writer);
+
+ uint32_t jsonChunkLength = (docBuffer.GetSize() + 3) & ~3; // Round up to next multiple of 4
+ auto paddingLength = jsonChunkLength - docBuffer.GetSize();
+
+ GLB_Chunk jsonChunk;
+ jsonChunk.chunkLength = jsonChunkLength;
+ jsonChunk.chunkType = ChunkType_JSON;
+ AI_SWAP4(jsonChunk.chunkLength);
+
+ outfile->Seek(sizeof(GLB_Header), aiOrigin_SET);
+ if (outfile->Write(&jsonChunk, 1, sizeof(GLB_Chunk)) != sizeof(GLB_Chunk)) {
+ throw DeadlyExportError("Failed to write scene data header!");
+ }
+ if (outfile->Write(docBuffer.GetString(), 1, docBuffer.GetSize()) != docBuffer.GetSize()) {
+ throw DeadlyExportError("Failed to write scene data!");
+ }
+ if (paddingLength && outfile->Write(&padding, 1, paddingLength) != paddingLength) {
+ throw DeadlyExportError("Failed to write scene data padding!");
+ }
+
+ //
+ // Binary chunk
+ //
+
+ uint32_t binaryChunkLength = 0;
+ if (bodyBuffer->byteLength > 0) {
+ binaryChunkLength = (bodyBuffer->byteLength + 3) & ~3; // Round up to next multiple of 4
+ auto paddingLength = binaryChunkLength - bodyBuffer->byteLength;
+
+ GLB_Chunk binaryChunk;
+ binaryChunk.chunkLength = binaryChunkLength;
+ binaryChunk.chunkType = ChunkType_BIN;
+ AI_SWAP4(binaryChunk.chunkLength);
+
+ size_t bodyOffset = sizeof(GLB_Header) + sizeof(GLB_Chunk) + jsonChunk.chunkLength;
+ outfile->Seek(bodyOffset, aiOrigin_SET);
+ if (outfile->Write(&binaryChunk, 1, sizeof(GLB_Chunk)) != sizeof(GLB_Chunk)) {
+ throw DeadlyExportError("Failed to write body data header!");
+ }
+ if (outfile->Write(bodyBuffer->GetPointer(), 1, bodyBuffer->byteLength) != bodyBuffer->byteLength) {
+ throw DeadlyExportError("Failed to write body data!");
+ }
+ if (paddingLength && outfile->Write(&padding, 1, paddingLength) != paddingLength) {
+ throw DeadlyExportError("Failed to write body data padding!");
+ }
+ }
+
+ //
+ // Header
+ //
+
+ GLB_Header header;
+ memcpy(header.magic, AI_GLB_MAGIC_NUMBER, sizeof(header.magic));
+
+ header.version = 2;
+ AI_SWAP4(header.version);
+
+ header.length = uint32_t(sizeof(GLB_Header) + 2 * sizeof(GLB_Chunk) + jsonChunkLength + binaryChunkLength);
+ AI_SWAP4(header.length);
+
+ outfile->Seek(0, aiOrigin_SET);
+ if (outfile->Write(&header, 1, sizeof(GLB_Header)) != sizeof(GLB_Header)) {
+ throw DeadlyExportError("Failed to write the header!");
+ }
+ }
+
+ inline void AssetWriter::WriteMetadata()
+ {
+ Value asset;
+ asset.SetObject();
+ asset.AddMember("version", Value(mAsset.asset.version, mAl).Move(), mAl);
+ asset.AddMember("generator", Value(mAsset.asset.generator, mAl).Move(), mAl);
+ mDoc.AddMember("asset", asset, mAl);
+ }
+
+ inline void AssetWriter::WriteExtensionsUsed()
+ {
+ Value exts;
+ exts.SetArray();
+ {
+ // This is used to export pbrSpecularGlossiness materials with GLTF 2.
+ if (this->mAsset.extensionsUsed.KHR_materials_pbrSpecularGlossiness) {
+ exts.PushBack(StringRef("KHR_materials_pbrSpecularGlossiness"), mAl);
+ }
+
+ if (this->mAsset.extensionsUsed.KHR_materials_unlit) {
+ exts.PushBack(StringRef("KHR_materials_unlit"), mAl);
+ }
+ }
+
+ if (!exts.Empty())
+ mDoc.AddMember("extensionsUsed", exts, mAl);
+ }
+
+ template<class T>
+ void AssetWriter::WriteObjects(LazyDict<T>& d)
+ {
+ if (d.mObjs.empty()) return;
+
+ Value* container = &mDoc;
+
+ if (d.mExtId) {
+ Value* exts = FindObject(mDoc, "extensions");
+ if (!exts) {
+ mDoc.AddMember("extensions", Value().SetObject().Move(), mDoc.GetAllocator());
+ exts = FindObject(mDoc, "extensions");
+ }
+
+ if (!(container = FindObject(*exts, d.mExtId))) {
+ exts->AddMember(StringRef(d.mExtId), Value().SetObject().Move(), mDoc.GetAllocator());
+ container = FindObject(*exts, d.mExtId);
+ }
+ }
+
+ Value* dict;
+ if (!(dict = FindArray(*container, d.mDictId))) {
+ container->AddMember(StringRef(d.mDictId), Value().SetArray().Move(), mDoc.GetAllocator());
+ dict = FindArray(*container, d.mDictId);
+ }
+
+ for (size_t i = 0; i < d.mObjs.size(); ++i) {
+ if (d.mObjs[i]->IsSpecial()) continue;
+
+ Value obj;
+ obj.SetObject();
+
+ if (!d.mObjs[i]->name.empty()) {
+ obj.AddMember("name", StringRef(d.mObjs[i]->name.c_str()), mAl);
+ }
+
+ Write(obj, *d.mObjs[i], *this);
+
+ dict->PushBack(obj, mAl);
+ }
+ }
+
+ template<class T>
+ void WriteLazyDict(LazyDict<T>& d, AssetWriter& w)
+ {
+ w.WriteObjects(d);
+ }
+
+}
+
+
diff --git a/code/glTF2Exporter.cpp b/code/glTF2Exporter.cpp
new file mode 100644
index 000000000..40db27264
--- /dev/null
+++ b/code/glTF2Exporter.cpp
@@ -0,0 +1,1096 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2018, assimp 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 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.
+
+----------------------------------------------------------------------
+*/
+#ifndef ASSIMP_BUILD_NO_EXPORT
+#ifndef ASSIMP_BUILD_NO_GLTF_EXPORTER
+
+#include "glTF2Exporter.h"
+
+#include <assimp/Exceptional.h>
+#include <assimp/StringComparison.h>
+#include <assimp/ByteSwapper.h>
+
+#include "SplitLargeMeshes.h"
+
+#include <assimp/SceneCombiner.h>
+#include <assimp/version.h>
+#include <assimp/IOSystem.hpp>
+#include <assimp/Exporter.hpp>
+#include <assimp/material.h>
+#include <assimp/scene.h>
+
+// Header files, standard library.
+#include <memory>
+#include <inttypes.h>
+
+#include "glTF2AssetWriter.h"
+
+using namespace rapidjson;
+
+using namespace Assimp;
+using namespace glTF2;
+
+namespace Assimp {
+
+ // ------------------------------------------------------------------------------------------------
+ // Worker function for exporting a scene to GLTF. Prototyped and registered in Exporter.cpp
+ void ExportSceneGLTF2(const char* pFile, IOSystem* pIOSystem, const aiScene* pScene, const ExportProperties* pProperties)
+ {
+ // invoke the exporter
+ glTF2Exporter exporter(pFile, pIOSystem, pScene, pProperties, false);
+ }
+
+ // ------------------------------------------------------------------------------------------------
+ // Worker function for exporting a scene to GLB. Prototyped and registered in Exporter.cpp
+ void ExportSceneGLB2(const char* pFile, IOSystem* pIOSystem, const aiScene* pScene, const ExportProperties* pProperties)
+ {
+ // invoke the exporter
+ glTF2Exporter exporter(pFile, pIOSystem, pScene, pProperties, true);
+ }
+
+} // end of namespace Assimp
+
+glTF2Exporter::glTF2Exporter(const char* filename, IOSystem* pIOSystem, const aiScene* pScene,
+ const ExportProperties* pProperties, bool isBinary)
+ : mFilename(filename)
+ , mIOSystem(pIOSystem)
+ , mProperties(pProperties)
+{
+ mScene = pScene;
+
+ mAsset.reset( new Asset( pIOSystem ) );
+
+ if (isBinary) {
+ mAsset->SetAsBinary();
+ }
+
+ ExportMetadata();
+
+ ExportMaterials();
+
+ if (mScene->mRootNode) {
+ ExportNodeHierarchy(mScene->mRootNode);
+ }
+
+ ExportMeshes();
+ MergeMeshes();
+
+ ExportScene();
+
+ ExportAnimations();
+
+ AssetWriter writer(*mAsset);
+
+ if (isBinary) {
+ writer.WriteGLBFile(filename);
+ } else {
+ writer.WriteFile(filename);
+ }
+}
+
+glTF2Exporter::~glTF2Exporter() {
+ // empty
+}
+
+/*
+ * Copy a 4x4 matrix from struct aiMatrix to typedef mat4.
+ * Also converts from row-major to column-major storage.
+ */
+static void CopyValue(const aiMatrix4x4& v, mat4& o) {
+ o[ 0] = v.a1; o[ 1] = v.b1; o[ 2] = v.c1; o[ 3] = v.d1;
+ o[ 4] = v.a2; o[ 5] = v.b2; o[ 6] = v.c2; o[ 7] = v.d2;
+ o[ 8] = v.a3; o[ 9] = v.b3; o[10] = v.c3; o[11] = v.d3;
+ o[12] = v.a4; o[13] = v.b4; o[14] = v.c4; o[15] = v.d4;
+}
+
+static void CopyValue(const aiMatrix4x4& v, aiMatrix4x4& o) {
+ o.a1 = v.a1; o.a2 = v.a2; o.a3 = v.a3; o.a4 = v.a4;
+ o.b1 = v.b1; o.b2 = v.b2; o.b3 = v.b3; o.b4 = v.b4;
+ o.c1 = v.c1; o.c2 = v.c2; o.c3 = v.c3; o.c4 = v.c4;
+ o.d1 = v.d1; o.d2 = v.d2; o.d3 = v.d3; o.d4 = v.d4;
+}
+
+static void IdentityMatrix4(mat4& o) {
+ o[ 0] = 1; o[ 1] = 0; o[ 2] = 0; o[ 3] = 0;
+ o[ 4] = 0; o[ 5] = 1; o[ 6] = 0; o[ 7] = 0;
+ o[ 8] = 0; o[ 9] = 0; o[10] = 1; o[11] = 0;
+ o[12] = 0; o[13] = 0; o[14] = 0; o[15] = 1;
+}
+
+inline Ref<Accessor> ExportData(Asset& a, std::string& meshName, Ref<Buffer>& buffer,
+ unsigned int count, void* data, AttribType::Value typeIn, AttribType::Value typeOut, ComponentType compType, bool isIndices = false)
+{
+ if (!count || !data) {
+ return Ref<Accessor>();
+ }
+
+ unsigned int numCompsIn = AttribType::GetNumComponents(typeIn);
+ unsigned int numCompsOut = AttribType::GetNumComponents(typeOut);
+ unsigned int bytesPerComp = ComponentTypeSize(compType);
+
+ size_t offset = buffer->byteLength;
+ // make sure offset is correctly byte-aligned, as required by spec
+ size_t padding = offset % bytesPerComp;
+ offset += padding;
+ size_t length = count * numCompsOut * bytesPerComp;
+ buffer->Grow(length + padding);
+
+ // bufferView
+ Ref<BufferView> bv = a.bufferViews.Create(a.FindUniqueID(meshName, "view"));
+ bv->buffer = buffer;
+ bv->byteOffset = unsigned(offset);
+ bv->byteLength = length; //! The target that the WebGL buffer should be bound to.
+ bv->byteStride = 0;
+ bv->target = isIndices ? BufferViewTarget_ELEMENT_ARRAY_BUFFER : BufferViewTarget_ARRAY_BUFFER;
+
+ // accessor
+ Ref<Accessor> acc = a.accessors.Create(a.FindUniqueID(meshName, "accessor"));
+ acc->bufferView = bv;
+ acc->byteOffset = 0;
+ acc->componentType = compType;
+ acc->count = count;
+ acc->type = typeOut;
+
+ // calculate min and max values
+ {
+ // Allocate and initialize with large values.
+ float float_MAX = 10000000000000.0f;
+ for (unsigned int i = 0 ; i < numCompsOut ; i++) {
+ acc->min.push_back( float_MAX);
+ acc->max.push_back(-float_MAX);
+ }
+
+ // Search and set extreme values.
+ float valueTmp;
+ for (unsigned int i = 0 ; i < count ; i++) {
+ for (unsigned int j = 0 ; j < numCompsOut ; j++) {
+ if (numCompsOut == 1) {
+ valueTmp = static_cast<unsigned short*>(data)[i];
+ } else {
+ valueTmp = static_cast<aiVector3D*>(data)[i][j];
+ }
+
+ if (valueTmp < acc->min[j]) {
+ acc->min[j] = valueTmp;
+ }
+ if (valueTmp > acc->max[j]) {
+ acc->max[j] = valueTmp;
+ }
+ }
+ }
+ }
+
+ // copy the data
+ acc->WriteData(count, data, numCompsIn*bytesPerComp);
+
+ return acc;
+}
+
+inline void SetSamplerWrap(SamplerWrap& wrap, aiTextureMapMode map)
+{
+ switch (map) {
+ case aiTextureMapMode_Clamp:
+ wrap = SamplerWrap::Clamp_To_Edge;
+ break;
+ case aiTextureMapMode_Mirror:
+ wrap = SamplerWrap::Mirrored_Repeat;
+ break;
+ case aiTextureMapMode_Wrap:
+ case aiTextureMapMode_Decal:
+ default:
+ wrap = SamplerWrap::Repeat;
+ break;
+ };
+}
+
+void glTF2Exporter::GetTexSampler(const aiMaterial* mat, Ref<Texture> texture, aiTextureType tt, unsigned int slot)
+{
+ aiString aId;
+ std::string id;
+ if (aiGetMaterialString(mat, AI_MATKEY_GLTF_MAPPINGID(tt, slot), &aId) == AI_SUCCESS) {
+ id = aId.C_Str();
+ }
+
+ if (Ref<Sampler> ref = mAsset->samplers.Get(id.c_str())) {
+ texture->sampler = ref;
+ } else {
+ id = mAsset->FindUniqueID(id, "sampler");
+
+ texture->sampler = mAsset->samplers.Create(id.c_str());
+
+ aiTextureMapMode mapU, mapV;
+ SamplerMagFilter filterMag;
+ SamplerMinFilter filterMin;
+
+ if (aiGetMaterialInteger(mat, AI_MATKEY_MAPPINGMODE_U(tt, slot), (int*)&mapU) == AI_SUCCESS) {
+ SetSamplerWrap(texture->sampler->wrapS, mapU);
+ }
+
+ if (aiGetMaterialInteger(mat, AI_MATKEY_MAPPINGMODE_V(tt, slot), (int*)&mapV) == AI_SUCCESS) {
+ SetSamplerWrap(texture->sampler->wrapT, mapV);
+ }
+
+ if (aiGetMaterialInteger(mat, AI_MATKEY_GLTF_MAPPINGFILTER_MAG(tt, slot), (int*)&filterMag) == AI_SUCCESS) {
+ texture->sampler->magFilter = filterMag;
+ }
+
+ if (aiGetMaterialInteger(mat, AI_MATKEY_GLTF_MAPPINGFILTER_MIN(tt, slot), (int*)&filterMin) == AI_SUCCESS) {
+ texture->sampler->minFilter = filterMin;
+ }
+
+ aiString name;
+ if (aiGetMaterialString(mat, AI_MATKEY_GLTF_MAPPINGNAME(tt, slot), &name) == AI_SUCCESS) {
+ texture->sampler->name = name.C_Str();
+ }
+ }
+}
+
+void glTF2Exporter::GetMatTexProp(const aiMaterial* mat, unsigned int& prop, const char* propName, aiTextureType tt, unsigned int slot)
+{
+ std::string textureKey = std::string(_AI_MATKEY_TEXTURE_BASE) + "." + propName;
+
+ mat->Get(textureKey.c_str(), tt, slot, prop);
+}
+
+void glTF2Exporter::GetMatTexProp(const aiMaterial* mat, float& prop, const char* propName, aiTextureType tt, unsigned int slot)
+{
+ std::string textureKey = std::string(_AI_MATKEY_TEXTURE_BASE) + "." + propName;
+
+ mat->Get(textureKey.c_str(), tt, slot, prop);
+}
+
+void glTF2Exporter::GetMatTex(const aiMaterial* mat, Ref<Texture>& texture, aiTextureType tt, unsigned int slot = 0)
+{
+
+ if (mat->GetTextureCount(tt) > 0) {
+ aiString tex;
+
+ if (mat->Get(AI_MATKEY_TEXTURE(tt, slot), tex) == AI_SUCCESS) {
+ std::string path = tex.C_Str();
+
+ if (path.size() > 0) {
+ std::map<std::string, unsigned int>::iterator it = mTexturesByPath.find(path);
+ if (it != mTexturesByPath.end()) {
+ texture = mAsset->textures.Get(it->second);
+ }
+
+ if (!texture) {
+ std::string texId = mAsset->FindUniqueID("", "texture");
+ texture = mAsset->textures.Create(texId);
+ mTexturesByPath[path] = texture.GetIndex();
+
+ std::string imgId = mAsset->FindUniqueID("", "image");
+ texture->source = mAsset->images.Create(imgId);
+
+ if (path[0] == '*') { // embedded
+ aiTexture* tex = mScene->mTextures[atoi(&path[1])];
+
+ uint8_t* data = reinterpret_cast<uint8_t*>(tex->pcData);
+ texture->source->SetData(data, tex->mWidth, *mAsset);
+
+ if (tex->achFormatHint[0]) {
+ std::string mimeType = "image/";
+ mimeType += (memcmp(tex->achFormatHint, "jpg", 3) == 0) ? "jpeg" : tex->achFormatHint;
+ texture->source->mimeType = mimeType;
+ }
+ }
+ else {
+ texture->source->uri = path;
+ }
+
+ GetTexSampler(mat, texture, tt, slot);
+ }
+ }
+ }
+ }
+}
+
+void glTF2Exporter::GetMatTex(const aiMaterial* mat, TextureInfo& prop, aiTextureType tt, unsigned int slot = 0)
+{
+ Ref<Texture>& texture = prop.texture;
+
+ GetMatTex(mat, texture, tt, slot);
+
+ if (texture) {
+ GetMatTexProp(mat, prop.texCoord, "texCoord", tt, slot);
+ }
+}
+
+void glTF2Exporter::GetMatTex(const aiMaterial* mat, NormalTextureInfo& prop, aiTextureType tt, unsigned int slot = 0)
+{
+ Ref<Texture>& texture = prop.texture;
+
+ GetMatTex(mat, texture, tt, slot);
+
+ if (texture) {
+ GetMatTexProp(mat, prop.texCoord, "texCoord", tt, slot);
+ GetMatTexProp(mat, prop.scale, "scale", tt, slot);
+ }
+}
+
+void glTF2Exporter::GetMatTex(const aiMaterial* mat, OcclusionTextureInfo& prop, aiTextureType tt, unsigned int slot = 0)
+{
+ Ref<Texture>& texture = prop.texture;
+
+ GetMatTex(mat, texture, tt, slot);
+
+ if (texture) {
+ GetMatTexProp(mat, prop.texCoord, "texCoord", tt, slot);
+ GetMatTexProp(mat, prop.strength, "strength", tt, slot);
+ }
+}
+
+aiReturn glTF2Exporter::GetMatColor(const aiMaterial* mat, vec4& prop, const char* propName, int type, int idx)
+{
+ aiColor4D col;
+ aiReturn result = mat->Get(propName, type, idx, col);
+
+ if (result == AI_SUCCESS) {
+ prop[0] = col.r; prop[1] = col.g; prop[2] = col.b; prop[3] = col.a;
+ }
+
+ return result;
+}
+
+aiReturn glTF2Exporter::GetMatColor(const aiMaterial* mat, vec3& prop, const char* propName, int type, int idx)
+{
+ aiColor3D col;
+ aiReturn result = mat->Get(propName, type, idx, col);
+
+ if (result == AI_SUCCESS) {
+ prop[0] = col.r; prop[1] = col.g; prop[2] = col.b;
+ }
+
+ return result;
+}
+
+void glTF2Exporter::ExportMaterials()
+{
+ aiString aiName;
+ for (unsigned int i = 0; i < mScene->mNumMaterials; ++i) {
+ const aiMaterial* mat = mScene->mMaterials[i];
+
+ std::string id = "material_" + to_string(i);
+
+ Ref<Material> m = mAsset->materials.Create(id);
+
+ std::string name;
+ if (mat->Get(AI_MATKEY_NAME, aiName) == AI_SUCCESS) {
+ name = aiName.C_Str();
+ }
+ name = mAsset->FindUniqueID(name, "material");
+
+ m->name = name;
+
+ GetMatTex(mat, m->pbrMetallicRoughness.baseColorTexture, AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_BASE_COLOR_TEXTURE);
+
+ if (!m->pbrMetallicRoughness.baseColorTexture.texture) {
+ //if there wasn't a baseColorTexture defined in the source, fallback to any diffuse texture
+ GetMatTex(mat, m->pbrMetallicRoughness.baseColorTexture, aiTextureType_DIFFUSE);
+ }
+
+ GetMatTex(mat, m->pbrMetallicRoughness.metallicRoughnessTexture, AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_METALLICROUGHNESS_TEXTURE);
+
+ if (GetMatColor(mat, m->pbrMetallicRoughness.baseColorFactor, AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_BASE_COLOR_FACTOR) != AI_SUCCESS) {
+ // if baseColorFactor wasn't defined, then the source is likely not a metallic roughness material.
+ //a fallback to any diffuse color should be used instead
+ GetMatColor(mat, m->pbrMetallicRoughness.baseColorFactor, AI_MATKEY_COLOR_DIFFUSE);
+ }
+
+ if (mat->Get(AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_METALLIC_FACTOR, m->pbrMetallicRoughness.metallicFactor) != AI_SUCCESS) {
+ //if metallicFactor wasn't defined, then the source is likely not a PBR file, and the metallicFactor should be 0
+ m->pbrMetallicRoughness.metallicFactor = 0;
+ }
+
+ // get roughness if source is gltf2 file
+ if (mat->Get(AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_ROUGHNESS_FACTOR, m->pbrMetallicRoughness.roughnessFactor) != AI_SUCCESS) {
+ // otherwise, try to derive and convert from specular + shininess values
+ aiColor4D specularColor;
+ ai_real shininess;
+
+ if (
+ mat->Get(AI_MATKEY_COLOR_SPECULAR, specularColor) == AI_SUCCESS &&
+ mat->Get(AI_MATKEY_SHININESS, shininess) == AI_SUCCESS
+ ) {
+ // convert specular color to luminance
+ float specularIntensity = specularColor[0] * 0.2125f + specularColor[1] * 0.7154f + specularColor[2] * 0.0721f;
+ //normalize shininess (assuming max is 1000) with an inverse exponentional curve
+ float normalizedShininess = std::sqrt(shininess / 1000);
+
+ //clamp the shininess value between 0 and 1
+ normalizedShininess = std::min(std::max(normalizedShininess, 0.0f), 1.0f);
+ // low specular intensity values should produce a rough material even if shininess is high.
+ normalizedShininess = normalizedShininess * specularIntensity;
+
+ m->pbrMetallicRoughness.roughnessFactor = 1 - normalizedShininess;
+ }
+ }
+
+ GetMatTex(mat, m->normalTexture, aiTextureType_NORMALS);
+ GetMatTex(mat, m->occlusionTexture, aiTextureType_LIGHTMAP);
+ GetMatTex(mat, m->emissiveTexture, aiTextureType_EMISSIVE);
+ GetMatColor(mat, m->emissiveFactor, AI_MATKEY_COLOR_EMISSIVE);
+
+ mat->Get(AI_MATKEY_TWOSIDED, m->doubleSided);
+ mat->Get(AI_MATKEY_GLTF_ALPHACUTOFF, m->alphaCutoff);
+
+ aiString alphaMode;
+
+ if (mat->Get(AI_MATKEY_GLTF_ALPHAMODE, alphaMode) == AI_SUCCESS) {
+ m->alphaMode = alphaMode.C_Str();
+ } else {
+ float opacity;
+
+ if (mat->Get(AI_MATKEY_OPACITY, opacity) == AI_SUCCESS) {
+ if (opacity < 1) {
+ m->alphaMode = "BLEND";
+ m->pbrMetallicRoughness.baseColorFactor[3] *= opacity;
+ }
+ }
+ }
+
+ bool hasPbrSpecularGlossiness = false;
+ mat->Get(AI_MATKEY_GLTF_PBRSPECULARGLOSSINESS, hasPbrSpecularGlossiness);
+
+ if (hasPbrSpecularGlossiness) {
+
+ if (!mAsset->extensionsUsed.KHR_materials_pbrSpecularGlossiness) {
+ mAsset->extensionsUsed.KHR_materials_pbrSpecularGlossiness = true;
+ }
+
+ PbrSpecularGlossiness pbrSG;
+
+ GetMatColor(mat, pbrSG.diffuseFactor, AI_MATKEY_COLOR_DIFFUSE);
+ GetMatColor(mat, pbrSG.specularFactor, AI_MATKEY_COLOR_SPECULAR);
+
+ if (mat->Get(AI_MATKEY_GLTF_PBRSPECULARGLOSSINESS_GLOSSINESS_FACTOR, pbrSG.glossinessFactor) != AI_SUCCESS) {
+ float shininess;
+
+ if (mat->Get(AI_MATKEY_SHININESS, shininess) == AI_SUCCESS) {
+ pbrSG.glossinessFactor = shininess / 1000;
+ }
+ }
+
+ GetMatTex(mat, pbrSG.diffuseTexture, aiTextureType_DIFFUSE);
+ GetMatTex(mat, pbrSG.specularGlossinessTexture, aiTextureType_SPECULAR);
+
+ m->pbrSpecularGlossiness = Nullable<PbrSpecularGlossiness>(pbrSG);
+ }
+
+ bool unlit;
+ if (mat->Get(AI_MATKEY_GLTF_UNLIT, unlit) == AI_SUCCESS && unlit) {
+ mAsset->extensionsUsed.KHR_materials_unlit = true;
+ m->unlit = true;
+ }
+ }
+}
+
+/*
+ * Search through node hierarchy and find the node containing the given meshID.
+ * Returns true on success, and false otherwise.
+ */
+bool FindMeshNode(Ref<Node>& nodeIn, Ref<Node>& meshNode, std::string meshID)
+{
+ for (unsigned int i = 0; i < nodeIn->meshes.size(); ++i) {
+ if (meshID.compare(nodeIn->meshes[i]->id) == 0) {
+ meshNode = nodeIn;
+ return true;
+ }
+ }
+
+ for (unsigned int i = 0; i < nodeIn->children.size(); ++i) {
+ if(FindMeshNode(nodeIn->children[i], meshNode, meshID)) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+/*
+ * Find the root joint of the skeleton.
+ * Starts will any joint node and traces up the tree,
+ * until a parent is found that does not have a jointName.
+ * Returns the first parent Ref<Node> found that does not have a jointName.
+ */
+Ref<Node> FindSkeletonRootJoint(Ref<Skin>& skinRef)
+{
+ Ref<Node> startNodeRef;
+ Ref<Node> parentNodeRef;
+
+ // Arbitrarily use the first joint to start the search.
+ startNodeRef = skinRef->jointNames[0];
+ parentNodeRef = skinRef->jointNames[0];
+
+ do {
+ startNodeRef = parentNodeRef;
+ parentNodeRef = startNodeRef->parent;
+ } while (!parentNodeRef->jointName.empty());
+
+ return parentNodeRef;
+}
+
+void ExportSkin(Asset& mAsset, const aiMesh* aimesh, Ref<Mesh>& meshRef, Ref<Buffer>& bufferRef, Ref<Skin>& skinRef, std::vector<aiMatrix4x4>& inverseBindMatricesData)
+{
+ if (aimesh->mNumBones < 1) {
+ return;
+ }
+
+ // Store the vertex joint and weight data.
+ const size_t NumVerts( aimesh->mNumVertices );
+ vec4* vertexJointData = new vec4[ NumVerts ];
+ vec4* vertexWeightData = new vec4[ NumVerts ];
+ int* jointsPerVertex = new int[ NumVerts ];
+ for (size_t i = 0; i < NumVerts; ++i) {
+ jointsPerVertex[i] = 0;
+ for (size_t j = 0; j < 4; ++j) {
+ vertexJointData[i][j] = 0;
+ vertexWeightData[i][j] = 0;
+ }
+ }
+
+ for (unsigned int idx_bone = 0; idx_bone < aimesh->mNumBones; ++idx_bone) {
+ const aiBone* aib = aimesh->mBones[idx_bone];
+
+ // aib->mName =====> skinRef->jointNames
+ // Find the node with id = mName.
+ Ref<Node> nodeRef = mAsset.nodes.Get(aib->mName.C_Str());
+ nodeRef->jointName = nodeRef->name;
+
+ unsigned int jointNamesIndex = 0;
+ bool addJointToJointNames = true;
+ for ( unsigned int idx_joint = 0; idx_joint < skinRef->jointNames.size(); ++idx_joint) {
+ if (skinRef->jointNames[idx_joint]->jointName.compare(nodeRef->jointName) == 0) {
+ addJointToJointNames = false;
+ jointNamesIndex = idx_joint;
+ }
+ }
+
+ if (addJointToJointNames) {
+ skinRef->jointNames.push_back(nodeRef);
+
+ // aib->mOffsetMatrix =====> skinRef->inverseBindMatrices
+ aiMatrix4x4 tmpMatrix4;
+ CopyValue(aib->mOffsetMatrix, tmpMatrix4);
+ inverseBindMatricesData.push_back(tmpMatrix4);
+ jointNamesIndex = static_cast<unsigned int>(inverseBindMatricesData.size() - 1);
+ }
+
+ // aib->mWeights =====> vertexWeightData
+ for (unsigned int idx_weights = 0; idx_weights < aib->mNumWeights; ++idx_weights) {
+ unsigned int vertexId = aib->mWeights[idx_weights].mVertexId;
+ float vertWeight = aib->mWeights[idx_weights].mWeight;
+
+ // A vertex can only have at most four joint weights. Ignore all others.
+ if (jointsPerVertex[vertexId] > 3) {
+ continue;
+ }
+
+ vertexJointData[vertexId][jointsPerVertex[vertexId]] = static_cast<float>(jointNamesIndex);
+ vertexWeightData[vertexId][jointsPerVertex[vertexId]] = vertWeight;
+
+ jointsPerVertex[vertexId] += 1;
+ }
+
+ } // End: for-loop mNumMeshes
+
+ Mesh::Primitive& p = meshRef->primitives.back();
+ Ref<Accessor> vertexJointAccessor = ExportData(mAsset, skinRef->id, bufferRef, aimesh->mNumVertices, vertexJointData, AttribType::VEC4, AttribType::VEC4, ComponentType_FLOAT);
+ if ( vertexJointAccessor ) {
+ size_t offset = vertexJointAccessor->bufferView->byteOffset;
+ size_t bytesLen = vertexJointAccessor->bufferView->byteLength;
+ unsigned int s_bytesPerComp= ComponentTypeSize(ComponentType_UNSIGNED_SHORT);
+ unsigned int bytesPerComp = ComponentTypeSize(vertexJointAccessor->componentType);
+ size_t s_bytesLen = bytesLen * s_bytesPerComp / bytesPerComp;
+ Ref<Buffer> buf = vertexJointAccessor->bufferView->buffer;
+ uint8_t* arrys = new uint8_t[bytesLen];
+ unsigned int i = 0;
+ for ( unsigned int j = 0; j <= bytesLen; j += bytesPerComp ){
+ size_t len_p = offset + j;
+ float f_value = *(float *)&buf->GetPointer()[len_p];
+ unsigned short c = static_cast<unsigned short>(f_value);
+ uint8_t* data = new uint8_t[s_bytesPerComp];
+ data = (uint8_t*)&c;
+ memcpy(&arrys[i*s_bytesPerComp], data, s_bytesPerComp);
+ ++i;
+ }
+ buf->ReplaceData_joint(offset, bytesLen, arrys, bytesLen);
+ vertexJointAccessor->componentType = ComponentType_UNSIGNED_SHORT;
+ vertexJointAccessor->bufferView->byteLength = s_bytesLen;
+
+ p.attributes.joint.push_back( vertexJointAccessor );
+ }
+
+ Ref<Accessor> vertexWeightAccessor = ExportData(mAsset, skinRef->id, bufferRef, aimesh->mNumVertices, vertexWeightData, AttribType::VEC4, AttribType::VEC4, ComponentType_FLOAT);
+ if ( vertexWeightAccessor ) {
+ p.attributes.weight.push_back( vertexWeightAccessor );
+ }
+ delete[] jointsPerVertex;
+ delete[] vertexWeightData;
+ delete[] vertexJointData;
+}
+
+void glTF2Exporter::ExportMeshes()
+{
+ typedef decltype(aiFace::mNumIndices) IndicesType;
+
+ std::string fname = std::string(mFilename);
+ std::string bufferIdPrefix = fname.substr(0, fname.rfind(".gltf"));
+ std::string bufferId = mAsset->FindUniqueID("", bufferIdPrefix.c_str());
+
+ Ref<Buffer> b = mAsset->GetBodyBuffer();
+ if (!b) {
+ b = mAsset->buffers.Create(bufferId);
+ }
+
+ //----------------------------------------
+ // Initialize variables for the skin
+ bool createSkin = false;
+ for (unsigned int idx_mesh = 0; idx_mesh < mScene->mNumMeshes; ++idx_mesh) {
+ const aiMesh* aim = mScene->mMeshes[idx_mesh];
+ if(aim->HasBones()) {
+ createSkin = true;
+ break;
+ }
+ }
+
+ Ref<Skin> skinRef;
+ std::string skinName = mAsset->FindUniqueID("skin", "skin");
+ std::vector<aiMatrix4x4> inverseBindMatricesData;
+ if(createSkin) {
+ skinRef = mAsset->skins.Create(skinName);
+ skinRef->name = skinName;
+ }
+ //----------------------------------------
+
+ for (unsigned int idx_mesh = 0; idx_mesh < mScene->mNumMeshes; ++idx_mesh) {
+ const aiMesh* aim = mScene->mMeshes[idx_mesh];
+
+ std::string name = aim->mName.C_Str();
+
+ std::string meshId = mAsset->FindUniqueID(name, "mesh");
+ Ref<Mesh> m = mAsset->meshes.Create(meshId);
+ m->primitives.resize(1);
+ Mesh::Primitive& p = m->primitives.back();
+
+ m->name = name;
+
+ p.material = mAsset->materials.Get(aim->mMaterialIndex);
+
+ /******************* Vertices ********************/
+ Ref<Accessor> v = ExportData(*mAsset, meshId, b, aim->mNumVertices, aim->mVertices, AttribType::VEC3, AttribType::VEC3, ComponentType_FLOAT);
+ if (v) p.attributes.position.push_back(v);
+
+ /******************** Normals ********************/
+ // Normalize all normals as the validator can emit a warning otherwise
+ if ( nullptr != aim->mNormals) {
+ for ( auto i = 0u; i < aim->mNumVertices; ++i ) {
+ aim->mNormals[ i ].Normalize();
+ }
+ }
+
+ Ref<Accessor> n = ExportData(*mAsset, meshId, b, aim->mNumVertices, aim->mNormals, AttribType::VEC3, AttribType::VEC3, ComponentType_FLOAT);
+ if (n) p.attributes.normal.push_back(n);
+
+ /************** Texture coordinates **************/
+ for (int i = 0; i < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++i) {
+ // Flip UV y coords
+ if (aim -> mNumUVComponents[i] > 1) {
+ for (unsigned int j = 0; j < aim->mNumVertices; ++j) {
+ aim->mTextureCoords[i][j].y = 1 - aim->mTextureCoords[i][j].y;
+ }
+ }
+
+ if (aim->mNumUVComponents[i] > 0) {
+ AttribType::Value type = (aim->mNumUVComponents[i] == 2) ? AttribType::VEC2 : AttribType::VEC3;
+
+ Ref<Accessor> tc = ExportData(*mAsset, meshId, b, aim->mNumVertices, aim->mTextureCoords[i], AttribType::VEC3, type, ComponentType_FLOAT, false);
+ if (tc) p.attributes.texcoord.push_back(tc);
+ }
+ }
+
+ /*************** Vertex colors ****************/
+ for (unsigned int indexColorChannel = 0; indexColorChannel < aim->GetNumColorChannels(); ++indexColorChannel)
+ {
+ Ref<Accessor> c = ExportData(*mAsset, meshId, b, aim->mNumVertices, aim->mColors[indexColorChannel], AttribType::VEC4, AttribType::VEC4, ComponentType_FLOAT, false);
+ if (c)
+ p.attributes.color.push_back(c);
+ }
+
+ /*************** Vertices indices ****************/
+ if (aim->mNumFaces > 0) {
+ std::vector<IndicesType> indices;
+ unsigned int nIndicesPerFace = aim->mFaces[0].mNumIndices;
+ indices.resize(aim->mNumFaces * nIndicesPerFace);
+ for (size_t i = 0; i < aim->mNumFaces; ++i) {
+ for (size_t j = 0; j < nIndicesPerFace; ++j) {
+ indices[i*nIndicesPerFace + j] = IndicesType(aim->mFaces[i].mIndices[j]);
+ }
+ }
+
+ p.indices = ExportData(*mAsset, meshId, b, unsigned(indices.size()), &indices[0], AttribType::SCALAR, AttribType::SCALAR, ComponentType_UNSIGNED_INT, true);
+ }
+
+ switch (aim->mPrimitiveTypes) {
+ case aiPrimitiveType_POLYGON:
+ p.mode = PrimitiveMode_TRIANGLES; break; // TODO implement this
+ case aiPrimitiveType_LINE:
+ p.mode = PrimitiveMode_LINES; break;
+ case aiPrimitiveType_POINT:
+ p.mode = PrimitiveMode_POINTS; break;
+ default: // aiPrimitiveType_TRIANGLE
+ p.mode = PrimitiveMode_TRIANGLES;
+ }
+
+ /*************** Skins ****************/
+ if(aim->HasBones()) {
+ ExportSkin(*mAsset, aim, m, b, skinRef, inverseBindMatricesData);
+ }
+ }
+
+ //----------------------------------------
+ // Finish the skin
+ // Create the Accessor for skinRef->inverseBindMatrices
+ if (createSkin) {
+ mat4* invBindMatrixData = new mat4[inverseBindMatricesData.size()];
+ for ( unsigned int idx_joint = 0; idx_joint < inverseBindMatricesData.size(); ++idx_joint) {
+ CopyValue(inverseBindMatricesData[idx_joint], invBindMatrixData[idx_joint]);
+ }
+
+ Ref<Accessor> invBindMatrixAccessor = ExportData(*mAsset, skinName, b, static_cast<unsigned int>(inverseBindMatricesData.size()), invBindMatrixData, AttribType::MAT4, AttribType::MAT4, ComponentType_FLOAT);
+ if (invBindMatrixAccessor) skinRef->inverseBindMatrices = invBindMatrixAccessor;
+
+ // Identity Matrix =====> skinRef->bindShapeMatrix
+ // Temporary. Hard-coded identity matrix here
+ skinRef->bindShapeMatrix.isPresent = true;
+ IdentityMatrix4(skinRef->bindShapeMatrix.value);
+
+ // Find nodes that contain a mesh with bones and add "skeletons" and "skin" attributes to those nodes.
+ Ref<Node> rootNode = mAsset->nodes.Get(unsigned(0));
+ Ref<Node> meshNode;
+ for (unsigned int meshIndex = 0; meshIndex < mAsset->meshes.Size(); ++meshIndex) {
+ Ref<Mesh> mesh = mAsset->meshes.Get(meshIndex);
+ bool hasBones = false;
+ for (unsigned int i = 0; i < mesh->primitives.size(); ++i) {
+ if (!mesh->primitives[i].attributes.weight.empty()) {
+ hasBones = true;
+ break;
+ }
+ }
+ if (!hasBones) {
+ continue;
+ }
+ std::string meshID = mesh->id;
+ FindMeshNode(rootNode, meshNode, meshID);
+ Ref<Node> rootJoint = FindSkeletonRootJoint(skinRef);
+ meshNode->skeletons.push_back(rootJoint);
+ meshNode->skin = skinRef;
+ }
+ }
+}
+
+//merges a node's multiple meshes (with one primitive each) into one mesh with multiple primitives
+void glTF2Exporter::MergeMeshes()
+{
+ for (unsigned int n = 0; n < mAsset->nodes.Size(); ++n) {
+ Ref<Node> node = mAsset->nodes.Get(n);
+
+ unsigned int nMeshes = static_cast<unsigned int>(node->meshes.size());
+
+ //skip if it's 1 or less meshes per node
+ if (nMeshes > 1) {
+ Ref<Mesh> firstMesh = node->meshes.at(0);
+
+ //loop backwards to allow easy removal of a mesh from a node once it's merged
+ for (unsigned int m = nMeshes - 1; m >= 1; --m) {
+ Ref<Mesh> mesh = node->meshes.at(m);
+
+ //append this mesh's primitives to the first mesh's primitives
+ firstMesh->primitives.insert(
+ firstMesh->primitives.end(),
+ mesh->primitives.begin(),
+ mesh->primitives.end()
+ );
+
+ //remove the mesh from the list of meshes
+ unsigned int removedIndex = mAsset->meshes.Remove(mesh->id.c_str());
+
+ //find the presence of the removed mesh in other nodes
+ for (unsigned int nn = 0; nn < mAsset->nodes.Size(); ++nn) {
+ Ref<Node> node = mAsset->nodes.Get(nn);
+
+ for (unsigned int mm = 0; mm < node->meshes.size(); ++mm) {
+ Ref<Mesh>& meshRef = node->meshes.at(mm);
+ unsigned int meshIndex = meshRef.GetIndex();
+
+ if (meshIndex == removedIndex) {
+ node->meshes.erase(node->meshes.begin() + mm);
+ } else if (meshIndex > removedIndex) {
+ Ref<Mesh> newMeshRef = mAsset->meshes.Get(meshIndex - 1);
+
+ meshRef = newMeshRef;
+ }
+ }
+ }
+ }
+
+ //since we were looping backwards, reverse the order of merged primitives to their original order
+ std::reverse(firstMesh->primitives.begin() + 1, firstMesh->primitives.end());
+ }
+ }
+}
+
+/*
+ * Export the root node of the node hierarchy.
+ * Calls ExportNode for all children.
+ */
+unsigned int glTF2Exporter::ExportNodeHierarchy(const aiNode* n)
+{
+ Ref<Node> node = mAsset->nodes.Create(mAsset->FindUniqueID(n->mName.C_Str(), "node"));
+
+ node->name = n->mName.C_Str();
+
+ if (!n->mTransformation.IsIdentity()) {
+ node->matrix.isPresent = true;
+ CopyValue(n->mTransformation, node->matrix.value);
+ }
+
+ for (unsigned int i = 0; i < n->mNumMeshes; ++i) {
+ node->meshes.push_back(mAsset->meshes.Get(n->mMeshes[i]));
+ }
+
+ for (unsigned int i = 0; i < n->mNumChildren; ++i) {
+ unsigned int idx = ExportNode(n->mChildren[i], node);
+ node->children.push_back(mAsset->nodes.Get(idx));
+ }
+
+ return node.GetIndex();
+}
+
+/*
+ * Export node and recursively calls ExportNode for all children.
+ * Since these nodes are not the root node, we also export the parent Ref<Node>
+ */
+unsigned int glTF2Exporter::ExportNode(const aiNode* n, Ref<Node>& parent)
+{
+ std::string name = mAsset->FindUniqueID(n->mName.C_Str(), "node");
+ Ref<Node> node = mAsset->nodes.Create(name);
+
+ node->parent = parent;
+ node->name = name;
+
+ if (!n->mTransformation.IsIdentity()) {
+ node->matrix.isPresent = true;
+ CopyValue(n->mTransformation, node->matrix.value);
+ }
+
+ for (unsigned int i = 0; i < n->mNumMeshes; ++i) {
+ node->meshes.push_back(mAsset->meshes.Get(n->mMeshes[i]));
+ }
+
+ for (unsigned int i = 0; i < n->mNumChildren; ++i) {
+ unsigned int idx = ExportNode(n->mChildren[i], node);
+ node->children.push_back(mAsset->nodes.Get(idx));
+ }
+
+ return node.GetIndex();
+}
+
+
+void glTF2Exporter::ExportScene()
+{
+ const char* sceneName = "defaultScene";
+ Ref<Scene> scene = mAsset->scenes.Create(sceneName);
+
+ // root node will be the first one exported (idx 0)
+ if (mAsset->nodes.Size() > 0) {
+ scene->nodes.push_back(mAsset->nodes.Get(0u));
+ }
+
+ // set as the default scene
+ mAsset->scene = scene;
+}
+
+void glTF2Exporter::ExportMetadata()
+{
+ AssetMetadata& asset = mAsset->asset;
+ asset.version = "2.0";
+
+ char buffer[256];
+ ai_snprintf(buffer, 256, "Open Asset Import Library (assimp v%d.%d.%d)",
+ aiGetVersionMajor(), aiGetVersionMinor(), aiGetVersionRevision());
+
+ asset.generator = buffer;
+}
+
+inline Ref<Accessor> GetSamplerInputRef(Asset& asset, std::string& animId, Ref<Buffer>& buffer, std::vector<float>& times)
+{
+ return ExportData(asset, animId, buffer, times.size(), &times[0], AttribType::SCALAR, AttribType::SCALAR, ComponentType_FLOAT);
+}
+
+inline void ExtractTranslationSampler(Asset& asset, std::string& animId, Ref<Buffer>& buffer, const aiNodeAnim* nodeChannel, float ticksPerSecond, Animation::Sampler& sampler)
+{
+ const unsigned int numKeyframes = nodeChannel->mNumPositionKeys;
+ if (numKeyframes == 0) {
+ return;
+ }
+
+ std::vector<float> times(numKeyframes);
+ std::vector<float> values(numKeyframes * 3);
+ for (unsigned int i = 0; i < numKeyframes; ++i) {
+ const aiVectorKey& key = nodeChannel->mPositionKeys[i];
+ // mTime is measured in ticks, but GLTF time is measured in seconds, so convert.
+ times[i] = static_cast<float>(key.mTime / ticksPerSecond);
+ values[(i * 3) + 0] = key.mValue.x;
+ values[(i * 3) + 1] = key.mValue.y;
+ values[(i * 3) + 2] = key.mValue.z;
+ }
+
+ sampler.input = GetSamplerInputRef(asset, animId, buffer, times);
+ sampler.output = ExportData(asset, animId, buffer, numKeyframes, &values[0], AttribType::VEC3, AttribType::VEC3, ComponentType_FLOAT);
+ sampler.interpolation = Interpolation_LINEAR;
+}
+
+inline void ExtractScaleSampler(Asset& asset, std::string& animId, Ref<Buffer>& buffer, const aiNodeAnim* nodeChannel, float ticksPerSecond, Animation::Sampler& sampler)
+{
+ const unsigned int numKeyframes = nodeChannel->mNumScalingKeys;
+ if (numKeyframes == 0) {
+ return;
+ }
+
+ std::vector<float> times(numKeyframes);
+ std::vector<float> values(numKeyframes * 3);
+ for (unsigned int i = 0; i < numKeyframes; ++i) {
+ const aiVectorKey& key = nodeChannel->mScalingKeys[i];
+ // mTime is measured in ticks, but GLTF time is measured in seconds, so convert.
+ times[i] = static_cast<float>(key.mTime / ticksPerSecond);
+ values[(i * 3) + 0] = key.mValue.x;
+ values[(i * 3) + 1] = key.mValue.y;
+ values[(i * 3) + 2] = key.mValue.z;
+ }
+
+ sampler.input = GetSamplerInputRef(asset, animId, buffer, times);
+ sampler.output = ExportData(asset, animId, buffer, numKeyframes, &values[0], AttribType::VEC3, AttribType::VEC3, ComponentType_FLOAT);
+ sampler.interpolation = Interpolation_LINEAR;
+}
+
+inline void ExtractRotationSampler(Asset& asset, std::string& animId, Ref<Buffer>& buffer, const aiNodeAnim* nodeChannel, float ticksPerSecond, Animation::Sampler& sampler)
+{
+ const unsigned int numKeyframes = nodeChannel->mNumRotationKeys;
+ if (numKeyframes == 0) {
+ return;
+ }
+
+ std::vector<float> times(numKeyframes);
+ std::vector<float> values(numKeyframes * 4);
+ for (unsigned int i = 0; i < numKeyframes; ++i) {
+ const aiQuatKey& key = nodeChannel->mRotationKeys[i];
+ // mTime is measured in ticks, but GLTF time is measured in seconds, so convert.
+ times[i] = static_cast<float>(key.mTime / ticksPerSecond);
+ values[(i * 4) + 0] = key.mValue.x;
+ values[(i * 4) + 1] = key.mValue.y;
+ values[(i * 4) + 2] = key.mValue.z;
+ values[(i * 4) + 3] = key.mValue.w;
+ }
+
+ sampler.input = GetSamplerInputRef(asset, animId, buffer, times);
+ sampler.output = ExportData(asset, animId, buffer, numKeyframes, &values[0], AttribType::VEC4, AttribType::VEC4, ComponentType_FLOAT);
+ sampler.interpolation = Interpolation_LINEAR;
+}
+
+static void AddSampler(Ref<Animation>& animRef, Ref<Node>& nodeRef, Animation::Sampler& sampler, AnimationPath path)
+{
+ Animation::Channel channel;
+ channel.sampler = static_cast<int>(animRef->samplers.size());
+ channel.target.path = path;
+ channel.target.node = nodeRef;
+ animRef->channels.push_back(channel);
+ animRef->samplers.push_back(sampler);
+}
+
+void glTF2Exporter::ExportAnimations()
+{
+ Ref<Buffer> bufferRef = mAsset->buffers.Get(unsigned (0));
+
+ for (unsigned int i = 0; i < mScene->mNumAnimations; ++i) {
+ const aiAnimation* anim = mScene->mAnimations[i];
+ const float ticksPerSecond = static_cast<float>(anim->mTicksPerSecond);
+
+ std::string nameAnim = "anim";
+ if (anim->mName.length > 0) {
+ nameAnim = anim->mName.C_Str();
+ }
+
+ for (unsigned int channelIndex = 0; channelIndex < anim->mNumChannels; ++channelIndex) {
+ const aiNodeAnim* nodeChannel = anim->mChannels[channelIndex];
+
+ // It appears that assimp stores this type of animation as multiple animations.
+ // where each aiNodeAnim in mChannels animates a specific node.
+ std::string name = nameAnim + "_" + to_string(channelIndex);
+ name = mAsset->FindUniqueID(name, "animation");
+ Ref<Animation> animRef = mAsset->animations.Create(name);
+
+ Ref<Node> animNode = mAsset->nodes.Get(nodeChannel->mNodeName.C_Str());
+
+ Animation::Sampler translationSampler;
+ ExtractTranslationSampler(*mAsset, name, bufferRef, nodeChannel, ticksPerSecond, translationSampler);
+ AddSampler(animRef, animNode, translationSampler, AnimationPath_TRANSLATION);
+
+ Animation::Sampler rotationSampler;
+ ExtractRotationSampler(*mAsset, name, bufferRef, nodeChannel, ticksPerSecond, rotationSampler);
+ AddSampler(animRef, animNode, rotationSampler, AnimationPath_ROTATION);
+
+ Animation::Sampler scaleSampler;
+ ExtractScaleSampler(*mAsset, name, bufferRef, nodeChannel, ticksPerSecond, scaleSampler);
+ AddSampler(animRef, animNode, scaleSampler, AnimationPath_SCALE);
+ }
+
+ // Assimp documentation staes this is not used (not implemented)
+ // for (unsigned int channelIndex = 0; channelIndex < anim->mNumMeshChannels; ++channelIndex) {
+ // const aiMeshAnim* meshChannel = anim->mMeshChannels[channelIndex];
+ // }
+
+ } // End: for-loop mNumAnimations
+}
+
+
+#endif // ASSIMP_BUILD_NO_GLTF_EXPORTER
+#endif // ASSIMP_BUILD_NO_EXPORT
diff --git a/code/glTF2Exporter.h b/code/glTF2Exporter.h
new file mode 100644
index 000000000..06bc5ad40
--- /dev/null
+++ b/code/glTF2Exporter.h
@@ -0,0 +1,131 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2018, assimp 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 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 GltfExporter.h
+* Declares the exporter class to write a scene to a gltf/glb file
+*/
+#ifndef AI_GLTF2EXPORTER_H_INC
+#define AI_GLTF2EXPORTER_H_INC
+
+#ifndef ASSIMP_BUILD_NO_GLTF_IMPORTER
+
+#include <assimp/types.h>
+#include <assimp/material.h>
+
+#include <sstream>
+#include <vector>
+#include <map>
+#include <memory>
+
+struct aiScene;
+struct aiNode;
+struct aiMaterial;
+
+namespace glTF2
+{
+ template<class T>
+ class Ref;
+
+ class Asset;
+ struct TexProperty;
+ struct TextureInfo;
+ struct NormalTextureInfo;
+ struct OcclusionTextureInfo;
+ struct Node;
+ struct Texture;
+
+ // Vec/matrix types, as raw float arrays
+ typedef float (vec3)[3];
+ typedef float (vec4)[4];
+}
+
+namespace Assimp
+{
+ class IOSystem;
+ class IOStream;
+ class ExportProperties;
+
+ // ------------------------------------------------------------------------------------------------
+ /** Helper class to export a given scene to an glTF file. */
+ // ------------------------------------------------------------------------------------------------
+ class glTF2Exporter {
+ public:
+ /// Constructor for a specific scene to export
+ glTF2Exporter(const char* filename, IOSystem* pIOSystem, const aiScene* pScene,
+ const ExportProperties* pProperties, bool binary);
+ ~glTF2Exporter();
+
+ protected:
+ void WriteBinaryData(IOStream* outfile, std::size_t sceneLength);
+ void GetTexSampler(const aiMaterial* mat, glTF2::Ref<glTF2::Texture> texture, aiTextureType tt, unsigned int slot);
+ void GetMatTexProp(const aiMaterial* mat, unsigned int& prop, const char* propName, aiTextureType tt, unsigned int idx);
+ void GetMatTexProp(const aiMaterial* mat, float& prop, const char* propName, aiTextureType tt, unsigned int idx);
+ void GetMatTex(const aiMaterial* mat, glTF2::Ref<glTF2::Texture>& texture, aiTextureType tt, unsigned int slot);
+ void GetMatTex(const aiMaterial* mat, glTF2::TextureInfo& prop, aiTextureType tt, unsigned int slot);
+ void GetMatTex(const aiMaterial* mat, glTF2::NormalTextureInfo& prop, aiTextureType tt, unsigned int slot);
+ void GetMatTex(const aiMaterial* mat, glTF2::OcclusionTextureInfo& prop, aiTextureType tt, unsigned int slot);
+ aiReturn GetMatColor(const aiMaterial* mat, glTF2::vec4& prop, const char* propName, int type, int idx);
+ aiReturn GetMatColor(const aiMaterial* mat, glTF2::vec3& prop, const char* propName, int type, int idx);
+ void ExportMetadata();
+ void ExportMaterials();
+ void ExportMeshes();
+ void MergeMeshes();
+ unsigned int ExportNodeHierarchy(const aiNode* n);
+ unsigned int ExportNode(const aiNode* node, glTF2::Ref<glTF2::Node>& parent);
+ void ExportScene();
+ void ExportAnimations();
+
+ private:
+ const char* mFilename;
+ IOSystem* mIOSystem;
+ const aiScene* mScene;
+ const ExportProperties* mProperties;
+ std::map<std::string, unsigned int> mTexturesByPath;
+ std::shared_ptr<glTF2::Asset> mAsset;
+ std::vector<unsigned char> mBodyData;
+ };
+
+}
+
+#endif // ASSIMP_BUILD_NO_GLTF_IMPORTER
+
+#endif // AI_GLTF2EXPORTER_H_INC
diff --git a/code/glTF2Importer.cpp b/code/glTF2Importer.cpp
new file mode 100755
index 000000000..107281a33
--- /dev/null
+++ b/code/glTF2Importer.cpp
@@ -0,0 +1,1150 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2018, assimp 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 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.
+
+----------------------------------------------------------------------
+*/
+
+#ifndef ASSIMP_BUILD_NO_GLTF_IMPORTER
+
+#include "glTF2Importer.h"
+#include <assimp/StringComparison.h>
+#include <assimp/StringUtils.h>
+
+#include <assimp/Importer.hpp>
+#include <assimp/scene.h>
+#include <assimp/ai_assert.h>
+#include <assimp/DefaultLogger.hpp>
+#include <assimp/importerdesc.h>
+#include <assimp/CreateAnimMesh.h>
+
+#include <memory>
+#include <unordered_map>
+
+#include "MakeVerboseFormat.h"
+
+#include "glTF2Asset.h"
+// This is included here so WriteLazyDict<T>'s definition is found.
+#include "glTF2AssetWriter.h"
+#include <rapidjson/document.h>
+#include <rapidjson/rapidjson.h>
+
+using namespace Assimp;
+using namespace glTF2;
+
+namespace {
+ // generate bitangents from normals and tangents according to spec
+ struct Tangent {
+ aiVector3D xyz;
+ ai_real w;
+ };
+} // namespace
+
+//
+// glTF2Importer
+//
+
+static const aiImporterDesc desc = {
+ "glTF2 Importer",
+ "",
+ "",
+ "",
+ aiImporterFlags_SupportTextFlavour | aiImporterFlags_SupportBinaryFlavour | aiImporterFlags_LimitedSupport | aiImporterFlags_Experimental,
+ 0,
+ 0,
+ 0,
+ 0,
+ "gltf glb"
+};
+
+glTF2Importer::glTF2Importer()
+: BaseImporter()
+, meshOffsets()
+, embeddedTexIdxs()
+, mScene( NULL ) {
+ // empty
+}
+
+glTF2Importer::~glTF2Importer() {
+ // empty
+}
+
+const aiImporterDesc* glTF2Importer::GetInfo() const
+{
+ return &desc;
+}
+
+bool glTF2Importer::CanRead(const std::string& pFile, IOSystem* pIOHandler, bool /* checkSig */) const
+{
+ const std::string &extension = GetExtension(pFile);
+
+ if (extension != "gltf" && extension != "glb")
+ return false;
+
+ if (pIOHandler) {
+ glTF2::Asset asset(pIOHandler);
+ asset.Load(pFile, extension == "glb");
+ std::string version = asset.asset.version;
+ return !version.empty() && version[0] == '2';
+ }
+
+ return false;
+}
+
+static aiTextureMapMode ConvertWrappingMode(SamplerWrap gltfWrapMode)
+{
+ switch (gltfWrapMode) {
+ case SamplerWrap::Mirrored_Repeat:
+ return aiTextureMapMode_Mirror;
+
+ case SamplerWrap::Clamp_To_Edge:
+ return aiTextureMapMode_Clamp;
+
+ case SamplerWrap::UNSET:
+ case SamplerWrap::Repeat:
+ default:
+ return aiTextureMapMode_Wrap;
+ }
+}
+
+//static void CopyValue(const glTF2::vec3& v, aiColor3D& out)
+//{
+// out.r = v[0]; out.g = v[1]; out.b = v[2];
+//}
+
+static void CopyValue(const glTF2::vec4& v, aiColor4D& out)
+{
+ out.r = v[0]; out.g = v[1]; out.b = v[2]; out.a = v[3];
+}
+
+/*static void CopyValue(const glTF2::vec4& v, aiColor3D& out)
+{
+ out.r = v[0]; out.g = v[1]; out.b = v[2];
+}*/
+
+static void CopyValue(const glTF2::vec3& v, aiColor4D& out)
+{
+ out.r = v[0]; out.g = v[1]; out.b = v[2]; out.a = 1.0;
+}
+
+static void CopyValue(const glTF2::vec3& v, aiVector3D& out)
+{
+ out.x = v[0]; out.y = v[1]; out.z = v[2];
+}
+
+static void CopyValue(const glTF2::vec4& v, aiQuaternion& out)
+{
+ out.x = v[0]; out.y = v[1]; out.z = v[2]; out.w = v[3];
+}
+
+static void CopyValue(const glTF2::mat4& v, aiMatrix4x4& o)
+{
+ o.a1 = v[ 0]; o.b1 = v[ 1]; o.c1 = v[ 2]; o.d1 = v[ 3];
+ o.a2 = v[ 4]; o.b2 = v[ 5]; o.c2 = v[ 6]; o.d2 = v[ 7];
+ o.a3 = v[ 8]; o.b3 = v[ 9]; o.c3 = v[10]; o.d3 = v[11];
+ o.a4 = v[12]; o.b4 = v[13]; o.c4 = v[14]; o.d4 = v[15];
+}
+
+inline void SetMaterialColorProperty(Asset& /*r*/, vec4& prop, aiMaterial* mat, const char* pKey, unsigned int type, unsigned int idx)
+{
+ aiColor4D col;
+ CopyValue(prop, col);
+ mat->AddProperty(&col, 1, pKey, type, idx);
+}
+
+inline void SetMaterialColorProperty(Asset& /*r*/, vec3& prop, aiMaterial* mat, const char* pKey, unsigned int type, unsigned int idx)
+{
+ aiColor4D col;
+ CopyValue(prop, col);
+ mat->AddProperty(&col, 1, pKey, type, idx);
+}
+
+inline void SetMaterialTextureProperty(std::vector<int>& embeddedTexIdxs, Asset& /*r*/, glTF2::TextureInfo prop, aiMaterial* mat, aiTextureType texType, unsigned int texSlot = 0)
+{
+ if (prop.texture && prop.texture->source) {
+ aiString uri(prop.texture->source->uri);
+
+ int texIdx = embeddedTexIdxs[prop.texture->source.GetIndex()];
+ if (texIdx != -1) { // embedded
+ // setup texture reference string (copied from ColladaLoader::FindFilenameForEffectTexture)
+ uri.data[0] = '*';
+ uri.length = 1 + ASSIMP_itoa10(uri.data + 1, MAXLEN - 1, texIdx);
+ }
+
+ mat->AddProperty(&uri, AI_MATKEY_TEXTURE(texType, texSlot));
+ mat->AddProperty(&prop.texCoord, 1, _AI_MATKEY_GLTF_TEXTURE_TEXCOORD_BASE, texType, texSlot);
+
+ if (prop.texture->sampler) {
+ Ref<Sampler> sampler = prop.texture->sampler;
+
+ aiString name(sampler->name);
+ aiString id(sampler->id);
+
+ mat->AddProperty(&name, AI_MATKEY_GLTF_MAPPINGNAME(texType, texSlot));
+ mat->AddProperty(&id, AI_MATKEY_GLTF_MAPPINGID(texType, texSlot));
+
+ aiTextureMapMode wrapS = ConvertWrappingMode(sampler->wrapS);
+ aiTextureMapMode wrapT = ConvertWrappingMode(sampler->wrapT);
+ mat->AddProperty(&wrapS, 1, AI_MATKEY_MAPPINGMODE_U(texType, texSlot));
+ mat->AddProperty(&wrapT, 1, AI_MATKEY_MAPPINGMODE_V(texType, texSlot));
+
+ if (sampler->magFilter != SamplerMagFilter::UNSET) {
+ mat->AddProperty(&sampler->magFilter, 1, AI_MATKEY_GLTF_MAPPINGFILTER_MAG(texType, texSlot));
+ }
+
+ if (sampler->minFilter != SamplerMinFilter::UNSET) {
+ mat->AddProperty(&sampler->minFilter, 1, AI_MATKEY_GLTF_MAPPINGFILTER_MIN(texType, texSlot));
+ }
+ }
+ }
+}
+
+inline void SetMaterialTextureProperty(std::vector<int>& embeddedTexIdxs, Asset& r, glTF2::NormalTextureInfo& prop, aiMaterial* mat, aiTextureType texType, unsigned int texSlot = 0)
+{
+ SetMaterialTextureProperty( embeddedTexIdxs, r, (glTF2::TextureInfo) prop, mat, texType, texSlot );
+
+ if (prop.texture && prop.texture->source) {
+ mat->AddProperty(&prop.scale, 1, AI_MATKEY_GLTF_TEXTURE_SCALE(texType, texSlot));
+ }
+}
+
+inline void SetMaterialTextureProperty(std::vector<int>& embeddedTexIdxs, Asset& r, glTF2::OcclusionTextureInfo& prop, aiMaterial* mat, aiTextureType texType, unsigned int texSlot = 0)
+{
+ SetMaterialTextureProperty( embeddedTexIdxs, r, (glTF2::TextureInfo) prop, mat, texType, texSlot );
+
+ if (prop.texture && prop.texture->source) {
+ mat->AddProperty(&prop.strength, 1, AI_MATKEY_GLTF_TEXTURE_STRENGTH(texType, texSlot));
+ }
+}
+
+static aiMaterial* ImportMaterial(std::vector<int>& embeddedTexIdxs, Asset& r, Material& mat)
+{
+ aiMaterial* aimat = new aiMaterial();
+
+ if (!mat.name.empty()) {
+ aiString str(mat.name);
+
+ aimat->AddProperty(&str, AI_MATKEY_NAME);
+ }
+
+ SetMaterialColorProperty(r, mat.pbrMetallicRoughness.baseColorFactor, aimat, AI_MATKEY_COLOR_DIFFUSE);
+ SetMaterialColorProperty(r, mat.pbrMetallicRoughness.baseColorFactor, aimat, AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_BASE_COLOR_FACTOR);
+
+ SetMaterialTextureProperty(embeddedTexIdxs, r, mat.pbrMetallicRoughness.baseColorTexture, aimat, aiTextureType_DIFFUSE);
+ SetMaterialTextureProperty(embeddedTexIdxs, r, mat.pbrMetallicRoughness.baseColorTexture, aimat, AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_BASE_COLOR_TEXTURE);
+
+ SetMaterialTextureProperty(embeddedTexIdxs, r, mat.pbrMetallicRoughness.metallicRoughnessTexture, aimat, AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_METALLICROUGHNESS_TEXTURE);
+
+ aimat->AddProperty(&mat.pbrMetallicRoughness.metallicFactor, 1, AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_METALLIC_FACTOR);
+ aimat->AddProperty(&mat.pbrMetallicRoughness.roughnessFactor, 1, AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_ROUGHNESS_FACTOR);
+
+ float roughnessAsShininess = 1 - mat.pbrMetallicRoughness.roughnessFactor;
+ roughnessAsShininess *= roughnessAsShininess * 1000;
+ aimat->AddProperty(&roughnessAsShininess, 1, AI_MATKEY_SHININESS);
+
+ SetMaterialTextureProperty(embeddedTexIdxs, r, mat.normalTexture, aimat, aiTextureType_NORMALS);
+ SetMaterialTextureProperty(embeddedTexIdxs, r, mat.occlusionTexture, aimat, aiTextureType_LIGHTMAP);
+ SetMaterialTextureProperty(embeddedTexIdxs, r, mat.emissiveTexture, aimat, aiTextureType_EMISSIVE);
+ SetMaterialColorProperty(r, mat.emissiveFactor, aimat, AI_MATKEY_COLOR_EMISSIVE);
+
+ aimat->AddProperty(&mat.doubleSided, 1, AI_MATKEY_TWOSIDED);
+
+ aiString alphaMode(mat.alphaMode);
+ aimat->AddProperty(&alphaMode, AI_MATKEY_GLTF_ALPHAMODE);
+ aimat->AddProperty(&mat.alphaCutoff, 1, AI_MATKEY_GLTF_ALPHACUTOFF);
+
+ //pbrSpecularGlossiness
+ if (mat.pbrSpecularGlossiness.isPresent) {
+ PbrSpecularGlossiness &pbrSG = mat.pbrSpecularGlossiness.value;
+
+ aimat->AddProperty(&mat.pbrSpecularGlossiness.isPresent, 1, AI_MATKEY_GLTF_PBRSPECULARGLOSSINESS);
+ SetMaterialColorProperty(r, pbrSG.diffuseFactor, aimat, AI_MATKEY_COLOR_DIFFUSE);
+ SetMaterialColorProperty(r, pbrSG.specularFactor, aimat, AI_MATKEY_COLOR_SPECULAR);
+
+ float glossinessAsShininess = pbrSG.glossinessFactor * 1000.0f;
+ aimat->AddProperty(&glossinessAsShininess, 1, AI_MATKEY_SHININESS);
+ aimat->AddProperty(&pbrSG.glossinessFactor, 1, AI_MATKEY_GLTF_PBRSPECULARGLOSSINESS_GLOSSINESS_FACTOR);
+
+ SetMaterialTextureProperty(embeddedTexIdxs, r, pbrSG.diffuseTexture, aimat, aiTextureType_DIFFUSE);
+
+ SetMaterialTextureProperty(embeddedTexIdxs, r, pbrSG.specularGlossinessTexture, aimat, aiTextureType_SPECULAR);
+ }
+ if (mat.unlit) {
+ aimat->AddProperty(&mat.unlit, 1, AI_MATKEY_GLTF_UNLIT);
+ }
+
+ return aimat;
+}
+
+void glTF2Importer::ImportMaterials(glTF2::Asset& r)
+{
+ const unsigned int numImportedMaterials = unsigned(r.materials.Size());
+ Material defaultMaterial;
+
+ mScene->mNumMaterials = numImportedMaterials + 1;
+ mScene->mMaterials = new aiMaterial*[mScene->mNumMaterials];
+ mScene->mMaterials[numImportedMaterials] = ImportMaterial(embeddedTexIdxs, r, defaultMaterial);
+
+ for (unsigned int i = 0; i < numImportedMaterials; ++i) {
+ mScene->mMaterials[i] = ImportMaterial(embeddedTexIdxs, r, r.materials[i]);
+ }
+}
+
+
+static inline void SetFace(aiFace& face, int a)
+{
+ face.mNumIndices = 1;
+ face.mIndices = new unsigned int[1];
+ face.mIndices[0] = a;
+}
+
+static inline void SetFace(aiFace& face, int a, int b)
+{
+ face.mNumIndices = 2;
+ face.mIndices = new unsigned int[2];
+ face.mIndices[0] = a;
+ face.mIndices[1] = b;
+}
+
+static inline void SetFace(aiFace& face, int a, int b, int c)
+{
+ face.mNumIndices = 3;
+ face.mIndices = new unsigned int[3];
+ face.mIndices[0] = a;
+ face.mIndices[1] = b;
+ face.mIndices[2] = c;
+}
+
+#ifdef ASSIMP_BUILD_DEBUG
+static inline bool CheckValidFacesIndices(aiFace* faces, unsigned nFaces, unsigned nVerts)
+{
+ for (unsigned i = 0; i < nFaces; ++i) {
+ for (unsigned j = 0; j < faces[i].mNumIndices; ++j) {
+ unsigned idx = faces[i].mIndices[j];
+ if (idx >= nVerts)
+ return false;
+ }
+ }
+ return true;
+}
+#endif // ASSIMP_BUILD_DEBUG
+
+void glTF2Importer::ImportMeshes(glTF2::Asset& r)
+{
+ std::vector<aiMesh*> meshes;
+
+ unsigned int k = 0;
+
+ for (unsigned int m = 0; m < r.meshes.Size(); ++m) {
+ Mesh& mesh = r.meshes[m];
+
+ meshOffsets.push_back(k);
+ k += unsigned(mesh.primitives.size());
+
+ for (unsigned int p = 0; p < mesh.primitives.size(); ++p) {
+ Mesh::Primitive& prim = mesh.primitives[p];
+
+ aiMesh* aim = new aiMesh();
+ meshes.push_back(aim);
+
+ aim->mName = mesh.name.empty() ? mesh.id : mesh.name;
+
+ if (mesh.primitives.size() > 1) {
+ size_t& len = aim->mName.length;
+ aim->mName.data[len] = '-';
+ len += 1 + ASSIMP_itoa10(aim->mName.data + len + 1, unsigned(MAXLEN - len - 1), p);
+ }
+
+ switch (prim.mode) {
+ case PrimitiveMode_POINTS:
+ aim->mPrimitiveTypes |= aiPrimitiveType_POINT;
+ break;
+
+ case PrimitiveMode_LINES:
+ case PrimitiveMode_LINE_LOOP:
+ case PrimitiveMode_LINE_STRIP:
+ aim->mPrimitiveTypes |= aiPrimitiveType_LINE;
+ break;
+
+ case PrimitiveMode_TRIANGLES:
+ case PrimitiveMode_TRIANGLE_STRIP:
+ case PrimitiveMode_TRIANGLE_FAN:
+ aim->mPrimitiveTypes |= aiPrimitiveType_TRIANGLE;
+ break;
+
+ }
+
+ Mesh::Primitive::Attributes& attr = prim.attributes;
+
+ if (attr.position.size() > 0 && attr.position[0]) {
+ aim->mNumVertices = attr.position[0]->count;
+ attr.position[0]->ExtractData(aim->mVertices);
+ }
+
+ if (attr.normal.size() > 0 && attr.normal[0]) {
+ attr.normal[0]->ExtractData(aim->mNormals);
+
+ // only extract tangents if normals are present
+ if (attr.tangent.size() > 0 && attr.tangent[0]) {
+ // generate bitangents from normals and tangents according to spec
+ Tangent *tangents = nullptr;
+
+ attr.tangent[0]->ExtractData(tangents);
+
+ aim->mTangents = new aiVector3D[aim->mNumVertices];
+ aim->mBitangents = new aiVector3D[aim->mNumVertices];
+
+ for (unsigned int i = 0; i < aim->mNumVertices; ++i) {
+ aim->mTangents[i] = tangents[i].xyz;
+ aim->mBitangents[i] = (aim->mNormals[i] ^ tangents[i].xyz) * tangents[i].w;
+ }
+
+ delete [] tangents;
+ }
+ }
+
+ for (size_t tc = 0; tc < attr.texcoord.size() && tc < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++tc) {
+ if (!attr.texcoord[tc]) {
+ DefaultLogger::get()->warn("NULL texcoord encountered in mesh \"" + mesh.name +
+ "\" and will be ignored");
+ continue;
+ }
+
+ if (attr.texcoord[tc]->count != aim->mNumVertices) {
+ DefaultLogger::get()->warn("Texcoord stream size in mesh \"" + mesh.name +
+ "\" does not match the vertex count");
+ continue;
+ }
+
+ attr.texcoord[tc]->ExtractData(aim->mTextureCoords[tc]);
+ aim->mNumUVComponents[tc] = attr.texcoord[tc]->GetNumComponents();
+
+ aiVector3D* values = aim->mTextureCoords[tc];
+ for (unsigned int i = 0; i < aim->mNumVertices; ++i) {
+ values[i].y = 1 - values[i].y; // Flip Y coords
+ }
+ }
+
+ std::vector<Mesh::Primitive::Target>& targets = prim.targets;
+ if (targets.size() > 0) {
+ aim->mNumAnimMeshes = (unsigned int)targets.size();
+ aim->mAnimMeshes = new aiAnimMesh*[aim->mNumAnimMeshes];
+ for (size_t i = 0; i < targets.size(); i++) {
+ aim->mAnimMeshes[i] = aiCreateAnimMesh(aim);
+ aiAnimMesh& aiAnimMesh = *(aim->mAnimMeshes[i]);
+ Mesh::Primitive::Target& target = targets[i];
+
+ if (target.position.size() > 0) {
+ aiVector3D *positionDiff = nullptr;
+ target.position[0]->ExtractData(positionDiff);
+ for(unsigned int vertexId = 0; vertexId < aim->mNumVertices; vertexId++) {
+ aiAnimMesh.mVertices[vertexId] += positionDiff[vertexId];
+ }
+ delete [] positionDiff;
+ }
+ if (target.normal.size() > 0) {
+ aiVector3D *normalDiff = nullptr;
+ target.normal[0]->ExtractData(normalDiff);
+ for(unsigned int vertexId = 0; vertexId < aim->mNumVertices; vertexId++) {
+ aiAnimMesh.mNormals[vertexId] += normalDiff[vertexId];
+ }
+ delete [] normalDiff;
+ }
+ if (target.tangent.size() > 0) {
+ Tangent *tangent = nullptr;
+ attr.tangent[0]->ExtractData(tangent);
+
+ aiVector3D *tangentDiff = nullptr;
+ target.tangent[0]->ExtractData(tangentDiff);
+
+ for (unsigned int vertexId = 0; vertexId < aim->mNumVertices; ++vertexId) {
+ tangent[vertexId].xyz += tangentDiff[vertexId];
+ aiAnimMesh.mTangents[vertexId] = tangent[vertexId].xyz;
+ aiAnimMesh.mBitangents[vertexId] = (aiAnimMesh.mNormals[vertexId] ^ tangent[vertexId].xyz) * tangent[vertexId].w;
+ }
+ delete [] tangent;
+ delete [] tangentDiff;
+ }
+ if (mesh.weights.size() > i) {
+ aiAnimMesh.mWeight = mesh.weights[i];
+ }
+ }
+ }
+
+
+ aiFace* faces = 0;
+ unsigned int nFaces = 0;
+
+ if (prim.indices) {
+ unsigned int count = prim.indices->count;
+
+ Accessor::Indexer data = prim.indices->GetIndexer();
+ ai_assert(data.IsValid());
+
+ switch (prim.mode) {
+ case PrimitiveMode_POINTS: {
+ nFaces = count;
+ faces = new aiFace[nFaces];
+ for (unsigned int i = 0; i < count; ++i) {
+ SetFace(faces[i], data.GetUInt(i));
+ }
+ break;
+ }
+
+ case PrimitiveMode_LINES: {
+ nFaces = count / 2;
+ faces = new aiFace[nFaces];
+ for (unsigned int i = 0; i < count; i += 2) {
+ SetFace(faces[i / 2], data.GetUInt(i), data.GetUInt(i + 1));
+ }
+ break;
+ }
+
+ case PrimitiveMode_LINE_LOOP:
+ case PrimitiveMode_LINE_STRIP: {
+ nFaces = count - ((prim.mode == PrimitiveMode_LINE_STRIP) ? 1 : 0);
+ faces = new aiFace[nFaces];
+ SetFace(faces[0], data.GetUInt(0), data.GetUInt(1));
+ for (unsigned int i = 2; i < count; ++i) {
+ SetFace(faces[i - 1], faces[i - 2].mIndices[1], data.GetUInt(i));
+ }
+ if (prim.mode == PrimitiveMode_LINE_LOOP) { // close the loop
+ SetFace(faces[count - 1], faces[count - 2].mIndices[1], faces[0].mIndices[0]);
+ }
+ break;
+ }
+
+ case PrimitiveMode_TRIANGLES: {
+ nFaces = count / 3;
+ faces = new aiFace[nFaces];
+ for (unsigned int i = 0; i < count; i += 3) {
+ SetFace(faces[i / 3], data.GetUInt(i), data.GetUInt(i + 1), data.GetUInt(i + 2));
+ }
+ break;
+ }
+ case PrimitiveMode_TRIANGLE_STRIP: {
+ nFaces = count - 2;
+ faces = new aiFace[nFaces];
+ for (unsigned int i = 0; i < nFaces; ++i) {
+ //The ordering is to ensure that the triangles are all drawn with the same orientation
+ if ((i + 1) % 2 == 0)
+ {
+ //For even n, vertices n + 1, n, and n + 2 define triangle n
+ SetFace(faces[i], data.GetUInt(i + 1), data.GetUInt(i), data.GetUInt(i + 2));
+ }
+ else
+ {
+ //For odd n, vertices n, n+1, and n+2 define triangle n
+ SetFace(faces[i], data.GetUInt(i), data.GetUInt(i + 1), data.GetUInt(i + 2));
+ }
+ }
+ break;
+ }
+ case PrimitiveMode_TRIANGLE_FAN:
+ nFaces = count - 2;
+ faces = new aiFace[nFaces];
+ SetFace(faces[0], data.GetUInt(0), data.GetUInt(1), data.GetUInt(2));
+ for (unsigned int i = 1; i < nFaces; ++i) {
+ SetFace(faces[i], faces[0].mIndices[0], faces[i - 1].mIndices[2], data.GetUInt(i + 2));
+ }
+ break;
+ }
+ }
+ else { // no indices provided so directly generate from counts
+
+ // use the already determined count as it includes checks
+ unsigned int count = aim->mNumVertices;
+
+ switch (prim.mode) {
+ case PrimitiveMode_POINTS: {
+ nFaces = count;
+ faces = new aiFace[nFaces];
+ for (unsigned int i = 0; i < count; ++i) {
+ SetFace(faces[i], i);
+ }
+ break;
+ }
+
+ case PrimitiveMode_LINES: {
+ nFaces = count / 2;
+ faces = new aiFace[nFaces];
+ for (unsigned int i = 0; i < count; i += 2) {
+ SetFace(faces[i / 2], i, i + 1);
+ }
+ break;
+ }
+
+ case PrimitiveMode_LINE_LOOP:
+ case PrimitiveMode_LINE_STRIP: {
+ nFaces = count - ((prim.mode == PrimitiveMode_LINE_STRIP) ? 1 : 0);
+ faces = new aiFace[nFaces];
+ SetFace(faces[0], 0, 1);
+ for (unsigned int i = 2; i < count; ++i) {
+ SetFace(faces[i - 1], faces[i - 2].mIndices[1], i);
+ }
+ if (prim.mode == PrimitiveMode_LINE_LOOP) { // close the loop
+ SetFace(faces[count - 1], faces[count - 2].mIndices[1], faces[0].mIndices[0]);
+ }
+ break;
+ }
+
+ case PrimitiveMode_TRIANGLES: {
+ nFaces = count / 3;
+ faces = new aiFace[nFaces];
+ for (unsigned int i = 0; i < count; i += 3) {
+ SetFace(faces[i / 3], i, i + 1, i + 2);
+ }
+ break;
+ }
+ case PrimitiveMode_TRIANGLE_STRIP: {
+ nFaces = count - 2;
+ faces = new aiFace[nFaces];
+ for (unsigned int i = 0; i < nFaces; ++i) {
+ //The ordering is to ensure that the triangles are all drawn with the same orientation
+ if ((i+1) % 2 == 0)
+ {
+ //For even n, vertices n + 1, n, and n + 2 define triangle n
+ SetFace(faces[i], i+1, i, i+2);
+ }
+ else
+ {
+ //For odd n, vertices n, n+1, and n+2 define triangle n
+ SetFace(faces[i], i, i+1, i+2);
+ }
+ }
+ break;
+ }
+ case PrimitiveMode_TRIANGLE_FAN:
+ nFaces = count - 2;
+ faces = new aiFace[nFaces];
+ SetFace(faces[0], 0, 1, 2);
+ for (unsigned int i = 1; i < nFaces; ++i) {
+ SetFace(faces[i], faces[0].mIndices[0], faces[i - 1].mIndices[2], i + 2);
+ }
+ break;
+ }
+ }
+
+ if (faces) {
+ aim->mFaces = faces;
+ aim->mNumFaces = nFaces;
+ ai_assert(CheckValidFacesIndices(faces, nFaces, aim->mNumVertices));
+ }
+
+ if (prim.material) {
+ aim->mMaterialIndex = prim.material.GetIndex();
+ }
+ else {
+ aim->mMaterialIndex = mScene->mNumMaterials - 1;
+ }
+
+ }
+ }
+
+ meshOffsets.push_back(k);
+
+ CopyVector(meshes, mScene->mMeshes, mScene->mNumMeshes);
+}
+
+void glTF2Importer::ImportCameras(glTF2::Asset& r)
+{
+ if (!r.cameras.Size()) return;
+
+ mScene->mNumCameras = r.cameras.Size();
+ mScene->mCameras = new aiCamera*[r.cameras.Size()];
+
+ for (size_t i = 0; i < r.cameras.Size(); ++i) {
+ Camera& cam = r.cameras[i];
+
+ aiCamera* aicam = mScene->mCameras[i] = new aiCamera();
+
+ // cameras point in -Z by default, rest is specified in node transform
+ aicam->mLookAt = aiVector3D(0.f,0.f,-1.f);
+
+ if (cam.type == Camera::Perspective) {
+
+ aicam->mAspect = cam.cameraProperties.perspective.aspectRatio;
+ aicam->mHorizontalFOV = cam.cameraProperties.perspective.yfov * aicam->mAspect;
+ aicam->mClipPlaneFar = cam.cameraProperties.perspective.zfar;
+ aicam->mClipPlaneNear = cam.cameraProperties.perspective.znear;
+ }
+ else {
+ // assimp does not support orthographic cameras
+ }
+ }
+}
+
+static void GetNodeTransform(aiMatrix4x4& matrix, const glTF2::Node& node) {
+ if (node.matrix.isPresent) {
+ CopyValue(node.matrix.value, matrix);
+ }
+ else {
+ if (node.translation.isPresent) {
+ aiVector3D trans;
+ CopyValue(node.translation.value, trans);
+ aiMatrix4x4 t;
+ aiMatrix4x4::Translation(trans, t);
+ matrix = matrix * t;
+ }
+
+ if (node.rotation.isPresent) {
+ aiQuaternion rot;
+ CopyValue(node.rotation.value, rot);
+ matrix = matrix * aiMatrix4x4(rot.GetMatrix());
+ }
+
+ if (node.scale.isPresent) {
+ aiVector3D scal(1.f);
+ CopyValue(node.scale.value, scal);
+ aiMatrix4x4 s;
+ aiMatrix4x4::Scaling(scal, s);
+ matrix = matrix * s;
+ }
+ }
+}
+
+static void BuildVertexWeightMapping(Mesh::Primitive& primitive, std::vector<std::vector<aiVertexWeight>>& map)
+{
+ Mesh::Primitive::Attributes& attr = primitive.attributes;
+ if (attr.weight.empty() || attr.joint.empty()) {
+ return;
+ }
+ if (attr.weight[0]->count != attr.joint[0]->count) {
+ return;
+ }
+
+ const int num_vertices = attr.weight[0]->count;
+
+ struct Weights { float values[4]; };
+ Weights* weights = nullptr;
+ attr.weight[0]->ExtractData(weights);
+
+ struct Indices8 { uint8_t values[4]; };
+ struct Indices16 { uint16_t values[4]; };
+ Indices8* indices8 = nullptr;
+ Indices16* indices16 = nullptr;
+ if (attr.joint[0]->GetElementSize() == 4) {
+ attr.joint[0]->ExtractData(indices8);
+ }else {
+ attr.joint[0]->ExtractData(indices16);
+ }
+
+ for (int i = 0; i < num_vertices; ++i) {
+ for (int j = 0; j < 4; ++j) {
+ const unsigned int bone = (indices8!=nullptr) ? indices8[i].values[j] : indices16[i].values[j];
+ const float weight = weights[i].values[j];
+ if (weight > 0 && bone < map.size()) {
+ map[bone].reserve(8);
+ map[bone].emplace_back(i, weight);
+ }
+ }
+ }
+
+ delete[] weights;
+ delete[] indices8;
+ delete[] indices16;
+}
+
+aiNode* ImportNode(aiScene* pScene, glTF2::Asset& r, std::vector<unsigned int>& meshOffsets, glTF2::Ref<glTF2::Node>& ptr)
+{
+ Node& node = *ptr;
+
+ std::string nameOrId = node.name.empty() ? node.id : node.name;
+
+ aiNode* ainode = new aiNode(nameOrId);
+
+ if (!node.children.empty()) {
+ ainode->mNumChildren = unsigned(node.children.size());
+ ainode->mChildren = new aiNode*[ainode->mNumChildren];
+
+ for (unsigned int i = 0; i < ainode->mNumChildren; ++i) {
+ aiNode* child = ImportNode(pScene, r, meshOffsets, node.children[i]);
+ child->mParent = ainode;
+ ainode->mChildren[i] = child;
+ }
+ }
+
+ GetNodeTransform(ainode->mTransformation, node);
+
+ if (!node.meshes.empty()) {
+ // GLTF files contain at most 1 mesh per node.
+ assert(node.meshes.size() == 1);
+ int mesh_idx = node.meshes[0].GetIndex();
+ int count = meshOffsets[mesh_idx + 1] - meshOffsets[mesh_idx];
+
+ ainode->mNumMeshes = count;
+ ainode->mMeshes = new unsigned int[count];
+
+ if (node.skin) {
+ for (int primitiveNo = 0; primitiveNo < count; ++primitiveNo) {
+ aiMesh* mesh = pScene->mMeshes[meshOffsets[mesh_idx]+primitiveNo];
+ mesh->mNumBones = node.skin->jointNames.size();
+ mesh->mBones = new aiBone*[mesh->mNumBones];
+
+ // GLTF and Assimp choose to store bone weights differently.
+ // GLTF has each vertex specify which bones influence the vertex.
+ // Assimp has each bone specify which vertices it has influence over.
+ // To convert this data, we first read over the vertex data and pull
+ // out the bone-to-vertex mapping. Then, when creating the aiBones,
+ // we copy the bone-to-vertex mapping into the bone. This is unfortunate
+ // both because it's somewhat slow and because, for many applications,
+ // we then need to reconvert the data back into the vertex-to-bone
+ // mapping which makes things doubly-slow.
+ std::vector<std::vector<aiVertexWeight>> weighting(mesh->mNumBones);
+ BuildVertexWeightMapping(node.meshes[0]->primitives[primitiveNo], weighting);
+
+ for (size_t i = 0; i < mesh->mNumBones; ++i) {
+ aiBone* bone = new aiBone();
+
+ Ref<Node> joint = node.skin->jointNames[i];
+ if (!joint->name.empty()) {
+ bone->mName = joint->name;
+ } else {
+ // Assimp expects each bone to have a unique name.
+ static const std::string kDefaultName = "bone_";
+ char postfix[10] = {0};
+ ASSIMP_itoa10(postfix, i);
+ bone->mName = (kDefaultName + postfix);
+ }
+ GetNodeTransform(bone->mOffsetMatrix, *joint);
+
+ std::vector<aiVertexWeight>& weights = weighting[i];
+
+ bone->mNumWeights = weights.size();
+ if (bone->mNumWeights > 0) {
+ bone->mWeights = new aiVertexWeight[bone->mNumWeights];
+ memcpy(bone->mWeights, weights.data(), bone->mNumWeights * sizeof(aiVertexWeight));
+ } else {
+ // Assimp expects all bones to have at least 1 weight.
+ bone->mWeights = new aiVertexWeight[1];
+ bone->mNumWeights = 1;
+ bone->mWeights->mVertexId = 0;
+ bone->mWeights->mWeight = 0.f;
+ }
+ mesh->mBones[i] = bone;
+ }
+ }
+ }
+
+ int k = 0;
+ for (unsigned int j = meshOffsets[mesh_idx]; j < meshOffsets[mesh_idx + 1]; ++j, ++k) {
+ ainode->mMeshes[k] = j;
+ }
+ }
+
+ if (node.camera) {
+ pScene->mCameras[node.camera.GetIndex()]->mName = ainode->mName;
+ }
+
+ return ainode;
+}
+
+void glTF2Importer::ImportNodes(glTF2::Asset& r)
+{
+ if (!r.scene) return;
+
+ std::vector< Ref<Node> > rootNodes = r.scene->nodes;
+
+ // The root nodes
+ unsigned int numRootNodes = unsigned(rootNodes.size());
+ if (numRootNodes == 1) { // a single root node: use it
+ mScene->mRootNode = ImportNode(mScene, r, meshOffsets, rootNodes[0]);
+ }
+ else if (numRootNodes > 1) { // more than one root node: create a fake root
+ aiNode* root = new aiNode("ROOT");
+ root->mChildren = new aiNode*[numRootNodes];
+ for (unsigned int i = 0; i < numRootNodes; ++i) {
+ aiNode* node = ImportNode(mScene, r, meshOffsets, rootNodes[i]);
+ node->mParent = root;
+ root->mChildren[root->mNumChildren++] = node;
+ }
+ mScene->mRootNode = root;
+ }
+
+ //if (!mScene->mRootNode) {
+ // mScene->mRootNode = new aiNode("EMPTY");
+ //}
+}
+
+struct AnimationSamplers {
+ AnimationSamplers() : translation(nullptr), rotation(nullptr), scale(nullptr) {}
+
+ Animation::Sampler* translation;
+ Animation::Sampler* rotation;
+ Animation::Sampler* scale;
+};
+
+aiNodeAnim* CreateNodeAnim(glTF2::Asset& r, Node& node, AnimationSamplers& samplers)
+{
+ aiNodeAnim* anim = new aiNodeAnim();
+ anim->mNodeName = node.name;
+
+ static const float kMillisecondsFromSeconds = 1000.f;
+
+ if (samplers.translation) {
+ float* times = nullptr;
+ samplers.translation->input->ExtractData(times);
+ aiVector3D* values = nullptr;
+ samplers.translation->output->ExtractData(values);
+ anim->mNumPositionKeys = samplers.translation->input->count;
+ anim->mPositionKeys = new aiVectorKey[anim->mNumPositionKeys];
+ for (unsigned int i = 0; i < anim->mNumPositionKeys; ++i) {
+ anim->mPositionKeys[i].mTime = times[i] * kMillisecondsFromSeconds;
+ anim->mPositionKeys[i].mValue = values[i];
+ }
+ delete[] times;
+ delete[] values;
+ } else if (node.translation.isPresent) {
+ anim->mNumPositionKeys = 1;
+ anim->mPositionKeys = new aiVectorKey();
+ anim->mPositionKeys->mTime = 0.f;
+ anim->mPositionKeys->mValue.x = node.translation.value[0];
+ anim->mPositionKeys->mValue.y = node.translation.value[1];
+ anim->mPositionKeys->mValue.z = node.translation.value[2];
+ }
+
+ if (samplers.rotation) {
+ float* times = nullptr;
+ samplers.rotation->input->ExtractData(times);
+ aiQuaternion* values = nullptr;
+ samplers.rotation->output->ExtractData(values);
+ anim->mNumRotationKeys = samplers.rotation->input->count;
+ anim->mRotationKeys = new aiQuatKey[anim->mNumRotationKeys];
+ for (unsigned int i = 0; i < anim->mNumRotationKeys; ++i) {
+ anim->mRotationKeys[i].mTime = times[i] * kMillisecondsFromSeconds;
+ anim->mRotationKeys[i].mValue.x = values[i].w;
+ anim->mRotationKeys[i].mValue.y = values[i].x;
+ anim->mRotationKeys[i].mValue.z = values[i].y;
+ anim->mRotationKeys[i].mValue.w = values[i].z;
+ }
+ delete[] times;
+ delete[] values;
+ } else if (node.rotation.isPresent) {
+ anim->mNumRotationKeys = 1;
+ anim->mRotationKeys = new aiQuatKey();
+ anim->mRotationKeys->mTime = 0.f;
+ anim->mRotationKeys->mValue.x = node.rotation.value[0];
+ anim->mRotationKeys->mValue.y = node.rotation.value[1];
+ anim->mRotationKeys->mValue.z = node.rotation.value[2];
+ anim->mRotationKeys->mValue.w = node.rotation.value[3];
+ }
+
+ if (samplers.scale) {
+ float* times = nullptr;
+ samplers.scale->input->ExtractData(times);
+ aiVector3D* values = nullptr;
+ samplers.scale->output->ExtractData(values);
+ anim->mNumScalingKeys = samplers.scale->input->count;
+ anim->mScalingKeys = new aiVectorKey[anim->mNumScalingKeys];
+ for (unsigned int i = 0; i < anim->mNumScalingKeys; ++i) {
+ anim->mScalingKeys[i].mTime = times[i] * kMillisecondsFromSeconds;
+ anim->mScalingKeys[i].mValue = values[i];
+ }
+ delete[] times;
+ delete[] values;
+ } else if (node.scale.isPresent) {
+ anim->mNumScalingKeys = 1;
+ anim->mScalingKeys = new aiVectorKey();
+ anim->mScalingKeys->mTime = 0.f;
+ anim->mScalingKeys->mValue.x = node.scale.value[0];
+ anim->mScalingKeys->mValue.y = node.scale.value[1];
+ anim->mScalingKeys->mValue.z = node.scale.value[2];
+ }
+
+ return anim;
+}
+
+std::unordered_map<unsigned int, AnimationSamplers> GatherSamplers(Animation& anim)
+{
+ std::unordered_map<unsigned int, AnimationSamplers> samplers;
+ for (unsigned int c = 0; c < anim.channels.size(); ++c) {
+ Animation::Channel& channel = anim.channels[c];
+ if (channel.sampler >= static_cast<int>(anim.samplers.size())) {
+ continue;
+ }
+
+ const unsigned int node_index = channel.target.node.GetIndex();
+
+ AnimationSamplers& sampler = samplers[node_index];
+ if (channel.target.path == AnimationPath_TRANSLATION) {
+ sampler.translation = &anim.samplers[channel.sampler];
+ } else if (channel.target.path == AnimationPath_ROTATION) {
+ sampler.rotation = &anim.samplers[channel.sampler];
+ } else if (channel.target.path == AnimationPath_SCALE) {
+ sampler.scale = &anim.samplers[channel.sampler];
+ }
+ }
+
+ return samplers;
+}
+
+void glTF2Importer::ImportAnimations(glTF2::Asset& r)
+{
+ if (!r.scene) return;
+
+ mScene->mNumAnimations = r.animations.Size();
+ if (mScene->mNumAnimations == 0) {
+ return;
+ }
+
+ mScene->mAnimations = new aiAnimation*[mScene->mNumAnimations];
+ for (unsigned int i = 0; i < r.animations.Size(); ++i) {
+ Animation& anim = r.animations[i];
+
+ aiAnimation* ai_anim = new aiAnimation();
+ ai_anim->mName = anim.name;
+ ai_anim->mDuration = 0;
+ ai_anim->mTicksPerSecond = 0;
+
+ std::unordered_map<unsigned int, AnimationSamplers> samplers = GatherSamplers(anim);
+
+ ai_anim->mNumChannels = samplers.size();
+ if (ai_anim->mNumChannels > 0) {
+ ai_anim->mChannels = new aiNodeAnim*[ai_anim->mNumChannels];
+ int j = 0;
+ for (auto& iter : samplers) {
+ ai_anim->mChannels[j] = CreateNodeAnim(r, r.nodes[iter.first], iter.second);
+ ++j;
+ }
+ }
+
+ // Use the latest keyframe for the duration of the animation
+ double maxDuration = 0;
+ for (unsigned int j = 0; j < ai_anim->mNumChannels; ++j) {
+ auto chan = ai_anim->mChannels[j];
+ if (chan->mNumPositionKeys) {
+ auto lastPosKey = chan->mPositionKeys[chan->mNumPositionKeys - 1];
+ if (lastPosKey.mTime > maxDuration) {
+ maxDuration = lastPosKey.mTime;
+ }
+ }
+ if (chan->mNumRotationKeys) {
+ auto lastRotKey = chan->mRotationKeys[chan->mNumRotationKeys - 1];
+ if (lastRotKey.mTime > maxDuration) {
+ maxDuration = lastRotKey.mTime;
+ }
+ }
+ if (chan->mNumScalingKeys) {
+ auto lastScaleKey = chan->mScalingKeys[chan->mNumScalingKeys - 1];
+ if (lastScaleKey.mTime > maxDuration) {
+ maxDuration = lastScaleKey.mTime;
+ }
+ }
+ }
+ ai_anim->mDuration = maxDuration;
+
+ mScene->mAnimations[i] = ai_anim;
+ }
+}
+
+void glTF2Importer::ImportEmbeddedTextures(glTF2::Asset& r)
+{
+ embeddedTexIdxs.resize(r.images.Size(), -1);
+
+ int numEmbeddedTexs = 0;
+ for (size_t i = 0; i < r.images.Size(); ++i) {
+ if (r.images[i].HasData())
+ numEmbeddedTexs += 1;
+ }
+
+ if (numEmbeddedTexs == 0)
+ return;
+
+ mScene->mTextures = new aiTexture*[numEmbeddedTexs];
+
+ // Add the embedded textures
+ for (size_t i = 0; i < r.images.Size(); ++i) {
+ Image &img = r.images[i];
+ if (!img.HasData()) continue;
+
+ int idx = mScene->mNumTextures++;
+ embeddedTexIdxs[i] = idx;
+
+ aiTexture* tex = mScene->mTextures[idx] = new aiTexture();
+
+ size_t length = img.GetDataLength();
+ void* data = img.StealData();
+
+ tex->mWidth = static_cast<unsigned int>(length);
+ tex->mHeight = 0;
+ tex->pcData = reinterpret_cast<aiTexel*>(data);
+
+ if (!img.mimeType.empty()) {
+ const char* ext = strchr(img.mimeType.c_str(), '/') + 1;
+ if (ext) {
+ if (strcmp(ext, "jpeg") == 0) ext = "jpg";
+
+ size_t len = strlen(ext);
+ if (len <= 3) {
+ strcpy(tex->achFormatHint, ext);
+ }
+ }
+ }
+ }
+}
+
+void glTF2Importer::InternReadFile(const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler) {
+
+ this->mScene = pScene;
+
+ // read the asset file
+ glTF2::Asset asset(pIOHandler);
+ asset.Load(pFile, GetExtension(pFile) == "glb");
+
+ //
+ // Copy the data out
+ //
+
+ ImportEmbeddedTextures(asset);
+ ImportMaterials(asset);
+
+ ImportMeshes(asset);
+
+ ImportCameras(asset);
+
+ ImportNodes(asset);
+
+ ImportAnimations(asset);
+
+ if (pScene->mNumMeshes == 0) {
+ pScene->mFlags |= AI_SCENE_FLAGS_INCOMPLETE;
+ }
+}
+
+#endif // ASSIMP_BUILD_NO_GLTF_IMPORTER
+
diff --git a/code/glTF2Importer.h b/code/glTF2Importer.h
new file mode 100644
index 000000000..7414e2f95
--- /dev/null
+++ b/code/glTF2Importer.h
@@ -0,0 +1,92 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2018, assimp 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 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.
+
+----------------------------------------------------------------------
+*/
+#ifndef AI_GLTF2IMPORTER_H_INC
+#define AI_GLTF2IMPORTER_H_INC
+
+#include <assimp/BaseImporter.h>
+#include <assimp/DefaultIOSystem.h>
+
+struct aiNode;
+
+
+namespace glTF2
+{
+ class Asset;
+}
+
+namespace Assimp {
+
+/**
+ * Load the glTF2 format.
+ * https://github.com/KhronosGroup/glTF/tree/master/specification
+ */
+class glTF2Importer : public BaseImporter{
+public:
+ glTF2Importer();
+ virtual ~glTF2Importer();
+ virtual bool CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig ) const;
+
+protected:
+ virtual const aiImporterDesc* GetInfo() const;
+ virtual void InternReadFile( const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler );
+
+private:
+
+ std::vector<unsigned int> meshOffsets;
+
+ std::vector<int> embeddedTexIdxs;
+
+ aiScene* mScene;
+
+ void ImportEmbeddedTextures(glTF2::Asset& a);
+ void ImportMaterials(glTF2::Asset& a);
+ void ImportMeshes(glTF2::Asset& a);
+ void ImportCameras(glTF2::Asset& a);
+ void ImportLights(glTF2::Asset& a);
+ void ImportNodes(glTF2::Asset& a);
+ void ImportAnimations(glTF2::Asset& a);
+};
+
+} // Namespace assimp
+
+#endif // AI_GLTF2IMPORTER_H_INC
+
diff --git a/code/glTFAsset.h b/code/glTFAsset.h
index 41d0dfd06..b04692901 100644
--- a/code/glTFAsset.h
+++ b/code/glTFAsset.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -66,7 +67,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifdef ASSIMP_API
# include <memory>
# include <assimp/DefaultIOSystem.h>
-# include "ByteSwapper.h"
+# include <assimp/ByteSwapper.h>
#else
# include <memory>
# define AI_SWAP4(p)
@@ -169,7 +170,7 @@ namespace glTF
#define AI_GLB_MAGIC_NUMBER "glTF"
#ifdef ASSIMP_API
- #include "./../include/assimp/Compiler/pushpack1.h"
+ #include <assimp/Compiler/pushpack1.h>
#endif
//! For the KHR_binary_glTF extension (binary .glb file)
@@ -184,7 +185,7 @@ namespace glTF
} PACK_STRUCT;
#ifdef ASSIMP_API
- #include "./../include/assimp/Compiler/poppack1.h"
+ #include <assimp/Compiler/poppack1.h>
#endif
@@ -232,7 +233,9 @@ namespace glTF
case ComponentType_UNSIGNED_BYTE:
return 1;
default:
- throw DeadlyImportError("GLTF: Unsupported Component Type "+t);
+ std::string err = "GLTF: Unsupported Component Type ";
+ err += t;
+ throw DeadlyImportError(err);
}
}
@@ -378,7 +381,7 @@ namespace glTF
};
- //! Base classe for all glTF top-level objects
+ //! Base class for all glTF top-level objects
struct Object
{
std::string id; //!< The globally unique ID used to reference this object
@@ -391,7 +394,7 @@ namespace glTF
virtual ~Object() {}
//! Maps special IDs to another ID, where needed. Subclasses may override it (statically)
- static const char* TranslateId(Asset& r, const char* id)
+ static const char* TranslateId(Asset& /*r*/, const char* id)
{ return id; }
};
@@ -647,7 +650,7 @@ namespace glTF
int width, height;
private:
- uint8_t* mData;
+ std::unique_ptr<uint8_t[]> mData;
size_t mDataLength;
public:
@@ -662,7 +665,7 @@ namespace glTF
{ return mDataLength; }
inline const uint8_t* GetData() const
- { return mData; }
+ { return mData.get(); }
inline uint8_t* StealData();
@@ -1058,13 +1061,13 @@ namespace glTF
std::string version; //!< Specifies the target rendering API (default: "1.0.3")
} profile; //!< Specifies the target rendering API and version, e.g., WebGL 1.0.3. (default: {})
- int version; //!< The glTF format version (should be 1)
+ std::string version; //!< The glTF format version (should be 1.0)
void Read(Document& doc);
AssetMetadata()
: premultipliedAlpha(false)
- , version(0)
+ , version("")
{
}
};
diff --git a/code/glTFAsset.inl b/code/glTFAsset.inl
index fe29dde70..267cbd4a3 100644
--- a/code/glTFAsset.inl
+++ b/code/glTFAsset.inl
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -39,7 +40,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----------------------------------------------------------------------
*/
-#include "StringUtils.h"
+#include <assimp/StringUtils.h>
+#include <iomanip>
// Header files, Assimp
#include <assimp/DefaultLogger.hpp>
@@ -128,6 +130,12 @@ namespace {
return (it != val.MemberEnd() && it->value.IsString()) ? &it->value : 0;
}
+ inline Value* FindNumber(Value& val, const char* id)
+ {
+ Value::MemberIterator it = val.FindMember(id);
+ return (it != val.MemberEnd() && it->value.IsNumber()) ? &it->value : 0;
+ }
+
inline Value* FindArray(Value& val, const char* id)
{
Value::MemberIterator it = val.FindMember(id);
@@ -290,7 +298,7 @@ inline void Buffer::Read(Value& obj, Asset& r)
if (dataURI.base64) {
uint8_t* data = 0;
this->byteLength = Util::DecodeBase64(dataURI.data, dataURI.dataLength, data);
- this->mData.reset(data);
+ this->mData.reset(data, std::default_delete<uint8_t[]>());
if (statedLength > 0 && this->byteLength != statedLength) {
throw DeadlyImportError("GLTF: buffer \"" + id + "\", expected " + to_string(statedLength) +
@@ -309,7 +317,9 @@ inline void Buffer::Read(Value& obj, Asset& r)
}
else { // Local file
if (byteLength > 0) {
- IOStream* file = r.OpenFile(uri, "rb");
+ std::string dir = !r.mCurrentAssetDir.empty() ? (r.mCurrentAssetDir + "/") : "";
+
+ IOStream* file = r.OpenFile(dir + uri, "rb");
if (file) {
bool ok = LoadFromStream(*file, byteLength);
delete file;
@@ -332,7 +342,7 @@ inline bool Buffer::LoadFromStream(IOStream& stream, size_t length, size_t baseO
stream.Seek(baseOffset, aiOrigin_SET);
}
- mData.reset(new uint8_t[byteLength]);
+ mData.reset(new uint8_t[byteLength], std::default_delete<uint8_t[]>());
if (stream.Read(mData.get(), byteLength, 1) != 1) {
return false;
@@ -592,7 +602,6 @@ T Accessor::Indexer::GetValue(int i)
inline Image::Image()
: width(0)
, height(0)
- , mData(0)
, mDataLength(0)
{
@@ -615,8 +624,8 @@ inline void Image::Read(Value& obj, Asset& r)
Ref<BufferView> bv = r.bufferViews.Get(bufferViewId);
if (bv) {
mDataLength = bv->byteLength;
- mData = new uint8_t[mDataLength];
- memcpy(mData, bv->buffer->GetPointer() + bv->byteOffset, mDataLength);
+ mData.reset(new uint8_t[mDataLength]);
+ memcpy(mData.get(), bv->buffer->GetPointer() + bv->byteOffset, mDataLength);
}
}
}
@@ -631,7 +640,9 @@ inline void Image::Read(Value& obj, Asset& r)
if (ParseDataURI(uristr, uri->GetStringLength(), dataURI)) {
mimeType = dataURI.mediaType;
if (dataURI.base64) {
- mDataLength = Util::DecodeBase64(dataURI.data, dataURI.dataLength, mData);
+ uint8_t *ptr = nullptr;
+ mDataLength = Util::DecodeBase64(dataURI.data, dataURI.dataLength, ptr);
+ mData.reset(ptr);
}
}
else {
@@ -643,10 +654,8 @@ inline void Image::Read(Value& obj, Asset& r)
inline uint8_t* Image::StealData()
{
- uint8_t* data = mData;
mDataLength = 0;
- mData = 0;
- return data;
+ return mData.release();
}
inline void Image::SetData(uint8_t* data, size_t length, Asset& r)
@@ -661,12 +670,12 @@ inline void Image::SetData(uint8_t* data, size_t length, Asset& r)
bufferView->byteOffset = b->AppendData(data, length);
}
else { // text file: will be stored as a data uri
- this->mData = data;
+ this->mData.reset(data);
this->mDataLength = length;
}
}
-inline void Sampler::Read(Value& obj, Asset& r)
+inline void Sampler::Read(Value& obj, Asset& /*r*/)
{
SetDefaults();
@@ -860,7 +869,7 @@ inline void Mesh::Read(Value& pJSON_Object, Asset& pAsset_Root)
if(comp_data == nullptr) throw DeadlyImportError("GLTF: \"Open3DGC-compression\" must has \"compressedData\".");
- DefaultLogger::get()->info("GLTF: Decompressing Open3DGC data.");
+ ASSIMP_LOG_INFO("GLTF: Decompressing Open3DGC data.");
/************** Read data from JSON-document **************/
#define MESH_READ_COMPRESSEDDATA_MEMBER(pFieldName, pOut) \
@@ -939,24 +948,24 @@ Ref<Buffer> buf = pAsset_Root.buffers.Get(pCompression_Open3DGC.Buffer);
size_t size_coordindex = ifs.GetNCoordIndex() * 3;// See float attributes note.
if(primitives[0].indices->count != size_coordindex)
- throw DeadlyImportError("GLTF: Open3DGC. Compressed indices count (" + std::to_string(size_coordindex) +
- ") not equal to uncompressed (" + std::to_string(primitives[0].indices->count) + ").");
+ throw DeadlyImportError("GLTF: Open3DGC. Compressed indices count (" + to_string(size_coordindex) +
+ ") not equal to uncompressed (" + to_string(primitives[0].indices->count) + ").");
size_coordindex *= sizeof(IndicesType);
// Coordinates
size_t size_coord = ifs.GetNCoord();// See float attributes note.
if(primitives[0].attributes.position[0]->count != size_coord)
- throw DeadlyImportError("GLTF: Open3DGC. Compressed positions count (" + std::to_string(size_coord) +
- ") not equal to uncompressed (" + std::to_string(primitives[0].attributes.position[0]->count) + ").");
+ throw DeadlyImportError("GLTF: Open3DGC. Compressed positions count (" + to_string(size_coord) +
+ ") not equal to uncompressed (" + to_string(primitives[0].attributes.position[0]->count) + ").");
size_coord *= 3 * sizeof(float);
// Normals
size_t size_normal = ifs.GetNNormal();// See float attributes note.
if(primitives[0].attributes.normal[0]->count != size_normal)
- throw DeadlyImportError("GLTF: Open3DGC. Compressed normals count (" + std::to_string(size_normal) +
- ") not equal to uncompressed (" + std::to_string(primitives[0].attributes.normal[0]->count) + ").");
+ throw DeadlyImportError("GLTF: Open3DGC. Compressed normals count (" + to_string(size_normal) +
+ ") not equal to uncompressed (" + to_string(primitives[0].attributes.normal[0]->count) + ").");
size_normal *= 3 * sizeof(float);
// Additional attributes.
@@ -980,8 +989,8 @@ Ref<Buffer> buf = pAsset_Root.buffers.Get(pCompression_Open3DGC.Buffer);
if(idx_texcoord < primitives[0].attributes.texcoord.size())
{
if(primitives[0].attributes.texcoord[idx]->count != tval)
- throw DeadlyImportError("GLTF: Open3DGC. Compressed texture coordinates count (" + std::to_string(tval) +
- ") not equal to uncompressed (" + std::to_string(primitives[0].attributes.texcoord[idx]->count) + ").");
+ throw DeadlyImportError("GLTF: Open3DGC. Compressed texture coordinates count (" + to_string(tval) +
+ ") not equal to uncompressed (" + to_string(primitives[0].attributes.texcoord[idx]->count) + ").");
idx_texcoord++;
}
@@ -1084,7 +1093,7 @@ Ref<Buffer> buf = pAsset_Root.buffers.Get(pCompression_Open3DGC.Buffer);
}
#endif
-inline void Camera::Read(Value& obj, Asset& r)
+inline void Camera::Read(Value& obj, Asset& /*r*/)
{
type = MemberOrDefault(obj, "type", Camera::Perspective);
@@ -1107,7 +1116,7 @@ inline void Camera::Read(Value& obj, Asset& r)
}
}
-inline void Light::Read(Value& obj, Asset& r)
+inline void Light::Read(Value& obj, Asset& /*r*/)
{
SetDefaults();
@@ -1228,13 +1237,21 @@ inline void Scene::Read(Value& obj, Asset& r)
inline void AssetMetadata::Read(Document& doc)
{
// read the version, etc.
- int statedVersion = 0;
if (Value* obj = FindObject(doc, "asset")) {
ReadMember(*obj, "copyright", copyright);
ReadMember(*obj, "generator", generator);
premultipliedAlpha = MemberOrDefault(*obj, "premultipliedAlpha", false);
- statedVersion = MemberOrDefault(*obj, "version", 0);
+
+ if (Value* versionString = FindString(*obj, "version")) {
+ version = versionString->GetString();
+ } else if (Value* versionNumber = FindNumber (*obj, "version")) {
+ char buf[4];
+
+ ai_snprintf(buf, 4, "%.1f", versionNumber->GetDouble());
+
+ version = buf;
+ }
if (Value* profile = FindObject(*obj, "profile")) {
ReadMember(*profile, "api", this->profile.api);
@@ -1242,16 +1259,8 @@ inline void AssetMetadata::Read(Document& doc)
}
}
- version = std::max(statedVersion, version);
- if (version == 0) {
- // if missing version, we'll assume version 1...
- version = 1;
- }
-
- if (version != 1) {
- char msg[128];
- ai_snprintf(msg, 128, "GLTF: Unsupported glTF version: %d", version);
- throw DeadlyImportError(msg);
+ if (version.empty() || version[0] != '1') {
+ throw DeadlyImportError("GLTF: Unsupported glTF version: " + version);
}
}
@@ -1273,7 +1282,7 @@ inline void Asset::ReadBinaryHeader(IOStream& stream)
}
AI_SWAP4(header.version);
- asset.version = header.version;
+ asset.version = to_string(header.version);
if (header.version != 1) {
throw DeadlyImportError("GLTF: Unsupported binary glTF version");
}
@@ -1405,7 +1414,7 @@ inline void Asset::ReadExtensionsUsed(Document& doc)
#undef CHECK_EXT
}
-inline IOStream* Asset::OpenFile(std::string path, const char* mode, bool absolute)
+inline IOStream* Asset::OpenFile(std::string path, const char* mode, bool /*absolute*/)
{
#ifdef ASSIMP_API
return mIOSystem->Open(path, mode);
diff --git a/code/glTFAssetWriter.h b/code/glTFAssetWriter.h
index 186d32a15..bbe89fc77 100644
--- a/code/glTFAssetWriter.h
+++ b/code/glTFAssetWriter.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/glTFAssetWriter.inl b/code/glTFAssetWriter.inl
index d3a553c27..fd29a96b4 100644
--- a/code/glTFAssetWriter.inl
+++ b/code/glTFAssetWriter.inl
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -187,7 +188,7 @@ namespace glTF {
obj.AddMember("target", int(bv.target), w.mAl);
}
- inline void Write(Value& obj, Camera& c, AssetWriter& w)
+ inline void Write(Value& /*obj*/, Camera& /*c*/, AssetWriter& /*w*/)
{
}
@@ -398,7 +399,7 @@ namespace glTF {
}
}
- inline void Write(Value& obj, Program& b, AssetWriter& w)
+ inline void Write(Value& /*obj*/, Program& /*b*/, AssetWriter& /*w*/)
{
}
@@ -424,7 +425,7 @@ namespace glTF {
AddRefsVector(scene, "nodes", s.nodes, w.mAl);
}
- inline void Write(Value& obj, Shader& b, AssetWriter& w)
+ inline void Write(Value& /*obj*/, Shader& /*b*/, AssetWriter& /*w*/)
{
}
@@ -452,7 +453,7 @@ namespace glTF {
}
- inline void Write(Value& obj, Technique& b, AssetWriter& w)
+ inline void Write(Value& /*obj*/, Technique& /*b*/, AssetWriter& /*w*/)
{
}
@@ -467,7 +468,7 @@ namespace glTF {
}
}
- inline void Write(Value& obj, Light& b, AssetWriter& w)
+ inline void Write(Value& /*obj*/, Light& /*b*/, AssetWriter& /*w*/)
{
}
@@ -606,13 +607,8 @@ namespace glTF {
{
Value asset;
asset.SetObject();
- {
- char versionChar[10];
- ai_snprintf(versionChar, sizeof(versionChar), "%d", mAsset.asset.version);
- asset.AddMember("version", Value(versionChar, mAl).Move(), mAl);
-
- asset.AddMember("generator", Value(mAsset.asset.generator, mAl).Move(), mAl);
- }
+ asset.AddMember("version", Value(mAsset.asset.version, mAl).Move(), mAl);
+ asset.AddMember("generator", Value(mAsset.asset.generator, mAl).Move(), mAl);
mDoc.AddMember("asset", asset, mAl);
}
diff --git a/code/glTFExporter.cpp b/code/glTFExporter.cpp
index aeb5069aa..29a88af8b 100644
--- a/code/glTFExporter.cpp
+++ b/code/glTFExporter.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -43,9 +44,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "glTFExporter.h"
-#include "Exceptional.h"
-#include "StringComparison.h"
-#include "ByteSwapper.h"
+#include <assimp/Exceptional.h>
+#include <assimp/StringComparison.h>
+#include <assimp/ByteSwapper.h>
#include "SplitLargeMeshes.h"
@@ -56,7 +57,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/material.h>
#include <assimp/scene.h>
-// Header files, standart library.
+// Header files, standard library.
#include <memory>
#include <inttypes.h>
@@ -444,7 +445,7 @@ void ExportSkin(Asset& mAsset, const aiMesh* aimesh, Ref<Mesh>& meshRef, Ref<Buf
Ref<Node> nodeRef = mAsset.nodes.Get(aib->mName.C_Str());
nodeRef->jointName = nodeRef->id;
- unsigned int jointNamesIndex;
+ unsigned int jointNamesIndex = 0;
bool addJointToJointNames = true;
for ( unsigned int idx_joint = 0; idx_joint < skinRef->jointNames.size(); ++idx_joint) {
if (skinRef->jointNames[idx_joint]->jointName.compare(nodeRef->jointName) == 0) {
@@ -469,11 +470,11 @@ void ExportSkin(Asset& mAsset, const aiMesh* aimesh, Ref<Mesh>& meshRef, Ref<Buf
float vertWeight = aib->mWeights[idx_weights].mWeight;
// A vertex can only have at most four joint weights. Ignore all others.
- if (jointsPerVertex[vertexId] > 3) {
- continue;
+ if (jointsPerVertex[vertexId] > 3) {
+ continue;
}
- vertexJointData[vertexId][jointsPerVertex[vertexId]] = jointNamesIndex;
+ vertexJointData[vertexId][jointsPerVertex[vertexId]] = static_cast<float>(jointNamesIndex);
vertexWeightData[vertexId][jointsPerVertex[vertexId]] = vertWeight;
jointsPerVertex[vertexId] += 1;
@@ -507,7 +508,7 @@ void glTFExporter::ExportMeshes()
// Variables needed for compression. BEGIN.
// Indices, not pointers - because pointer to buffer is changing while writing to it.
- size_t idx_srcdata_begin;// Index of buffer before writing mesh data. Also, index of begin of coordinates array in buffer.
+ size_t idx_srcdata_begin = 0; // Index of buffer before writing mesh data. Also, index of begin of coordinates array in buffer.
size_t idx_srcdata_normal = SIZE_MAX;// Index of begin of normals array in buffer. SIZE_MAX - mean that mesh has no normals.
std::vector<size_t> idx_srcdata_tc;// Array of indices. Every index point to begin of texture coordinates array in buffer.
size_t idx_srcdata_ind;// Index of begin of coordinates indices array in buffer.
@@ -567,7 +568,7 @@ void glTFExporter::ExportMeshes()
else
msg = "mesh must has vertices and faces.";
- DefaultLogger::get()->warn("GLTF: can not use Open3DGC-compression: " + msg);
+ ASSIMP_LOG_WARN_F("GLTF: can not use Open3DGC-compression: ", msg);
comp_allow = false;
}
@@ -702,7 +703,7 @@ void glTFExporter::ExportMeshes()
// Coordinates indices
comp_o3dgc_ifs.SetNCoordIndex(aim->mNumFaces);
comp_o3dgc_ifs.SetCoordIndex((IndicesType* const)&b->GetPointer()[idx_srcdata_ind]);
- // Prepare to enconding
+ // Prepare to encoding
comp_o3dgc_params.SetNumFloatAttributes(comp_o3dgc_ifs.GetNumFloatAttributes());
if(mProperties->GetPropertyBool("extensions.Open3DGC.binary", true))
comp_o3dgc_params.SetStreamType(o3dgc::O3DGC_STREAM_TYPE_BINARY);
@@ -834,7 +835,7 @@ void glTFExporter::ExportScene()
void glTFExporter::ExportMetadata()
{
glTF::AssetMetadata& asset = mAsset->asset;
- asset.version = 1;
+ asset.version = "1.0";
char buffer[256];
ai_snprintf(buffer, 256, "Open Asset Import Library (assimp v%d.%d.%d)",
@@ -872,10 +873,10 @@ inline void ExtractAnimationData(Asset& mAsset, std::string& animId, Ref<Animati
size_t frameIndex = i * nodeChannel->mNumPositionKeys / numKeyframes;
// mTime is measured in ticks, but GLTF time is measured in seconds, so convert.
// Check if we have to cast type here. e.g. uint16_t()
- timeData[i] = nodeChannel->mPositionKeys[frameIndex].mTime / ticksPerSecond;
+ timeData[i] = static_cast<float>(nodeChannel->mPositionKeys[frameIndex].mTime / ticksPerSecond);
}
- Ref<Accessor> timeAccessor = ExportData(mAsset, animId, buffer, numKeyframes, &timeData[0], AttribType::SCALAR, AttribType::SCALAR, ComponentType_FLOAT);
+ Ref<Accessor> timeAccessor = ExportData(mAsset, animId, buffer, static_cast<unsigned int>(numKeyframes), &timeData[0], AttribType::SCALAR, AttribType::SCALAR, ComponentType_FLOAT);
if (timeAccessor) animRef->Parameters.TIME = timeAccessor;
}
@@ -888,7 +889,7 @@ inline void ExtractAnimationData(Asset& mAsset, std::string& animId, Ref<Animati
translationData[i] = nodeChannel->mPositionKeys[frameIndex].mValue;
}
- Ref<Accessor> tranAccessor = ExportData(mAsset, animId, buffer, numKeyframes, translationData, AttribType::VEC3, AttribType::VEC3, ComponentType_FLOAT);
+ Ref<Accessor> tranAccessor = ExportData(mAsset, animId, buffer, static_cast<unsigned int>(numKeyframes), translationData, AttribType::VEC3, AttribType::VEC3, ComponentType_FLOAT);
if ( tranAccessor ) {
animRef->Parameters.translation = tranAccessor;
}
@@ -904,7 +905,7 @@ inline void ExtractAnimationData(Asset& mAsset, std::string& animId, Ref<Animati
scaleData[i] = nodeChannel->mScalingKeys[frameIndex].mValue;
}
- Ref<Accessor> scaleAccessor = ExportData(mAsset, animId, buffer, numKeyframes, scaleData, AttribType::VEC3, AttribType::VEC3, ComponentType_FLOAT);
+ Ref<Accessor> scaleAccessor = ExportData(mAsset, animId, buffer, static_cast<unsigned int>(numKeyframes), scaleData, AttribType::VEC3, AttribType::VEC3, ComponentType_FLOAT);
if ( scaleAccessor ) {
animRef->Parameters.scale = scaleAccessor;
}
@@ -923,7 +924,7 @@ inline void ExtractAnimationData(Asset& mAsset, std::string& animId, Ref<Animati
rotationData[i][3] = nodeChannel->mRotationKeys[frameIndex].mValue.w;
}
- Ref<Accessor> rotAccessor = ExportData(mAsset, animId, buffer, numKeyframes, rotationData, AttribType::VEC4, AttribType::VEC4, ComponentType_FLOAT);
+ Ref<Accessor> rotAccessor = ExportData(mAsset, animId, buffer, static_cast<unsigned int>(numKeyframes), rotationData, AttribType::VEC4, AttribType::VEC4, ComponentType_FLOAT);
if ( rotAccessor ) {
animRef->Parameters.rotation = rotAccessor;
}
@@ -953,7 +954,7 @@ void glTFExporter::ExportAnimations()
Ref<Animation> animRef = mAsset->animations.Create(name);
/******************* Parameters ********************/
- ExtractAnimationData(*mAsset, name, animRef, bufferRef, nodeChannel, anim->mTicksPerSecond);
+ ExtractAnimationData(*mAsset, name, animRef, bufferRef, nodeChannel, static_cast<float>(anim->mTicksPerSecond));
for (unsigned int j = 0; j < 3; ++j) {
std::string channelType;
diff --git a/code/glTFExporter.h b/code/glTFExporter.h
index c813fff44..061dac5e8 100644
--- a/code/glTFExporter.h
+++ b/code/glTFExporter.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -45,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_GLTFEXPORTER_H_INC
#define AI_GLTFEXPORTER_H_INC
-#ifndef ASSIMP_BUILD_NO_GLTF_IMPORTER
+#ifndef ASSIMP_BUILD_NO_GLTF_EXPORTER
#include <assimp/types.h>
#include <assimp/material.h>
@@ -113,6 +114,6 @@ namespace Assimp
}
-#endif // ASSIMP_BUILD_NO_GLTF_IMPORTER
+#endif // ASSIMP_BUILD_NO_GLTF_EXPORTER
#endif // AI_GLTFEXPORTER_H_INC
diff --git a/code/glTFImporter.cpp b/code/glTFImporter.cpp
index 0ded26294..c68969dc6 100644..100755
--- a/code/glTFImporter.cpp
+++ b/code/glTFImporter.cpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -42,8 +43,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_NO_GLTF_IMPORTER
#include "glTFImporter.h"
-#include "StringComparison.h"
-#include "StringUtils.h"
+#include <assimp/StringComparison.h>
+#include <assimp/StringUtils.h>
#include <assimp/Importer.hpp>
#include <assimp/scene.h>
@@ -98,26 +99,21 @@ const aiImporterDesc* glTFImporter::GetInfo() const
return &desc;
}
-bool glTFImporter::CanRead(const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
+bool glTFImporter::CanRead(const std::string& pFile, IOSystem* pIOHandler, bool /* checkSig */) const
{
- const std::string& extension = GetExtension(pFile);
-
- if (extension == "gltf" || extension == "glb")
- return true;
-
- if ((checkSig || !extension.length()) && pIOHandler) {
- char buffer[4];
-
- std::unique_ptr<IOStream> pStream(pIOHandler->Open(pFile));
- if (pStream && pStream->Read(buffer, sizeof(buffer), 1) == 1) {
- if (memcmp(buffer, AI_GLB_MAGIC_NUMBER, sizeof(buffer)) == 0) {
- return true; // Has GLB header
- }
- else if (memcmp(buffer, "{\r\n ", sizeof(buffer)) == 0
- || memcmp(buffer, "{\n ", sizeof(buffer)) == 0) {
- // seems a JSON file, and we're the only format that can read them
- return true;
- }
+ const std::string &extension = GetExtension(pFile);
+
+ if (extension != "gltf" && extension != "glb")
+ return false;
+
+ if (pIOHandler) {
+ glTF::Asset asset(pIOHandler);
+ try {
+ asset.Load(pFile, extension == "glb");
+ std::string version = asset.asset.version;
+ return !version.empty() && version[0] == '1';
+ } catch (...) {
+ return false;
}
}
@@ -159,7 +155,7 @@ static void CopyValue(const glTF::mat4& v, aiMatrix4x4& o)
o.a4 = v[12]; o.b4 = v[13]; o.c4 = v[14]; o.d4 = v[15];
}
-inline void SetMaterialColorProperty(std::vector<int>& embeddedTexIdxs, Asset& r, glTF::TexProperty prop, aiMaterial* mat,
+inline void SetMaterialColorProperty(std::vector<int>& embeddedTexIdxs, Asset& /*r*/, glTF::TexProperty prop, aiMaterial* mat,
aiTextureType texType, const char* pKey, unsigned int type, unsigned int idx)
{
if (prop.texture) {
@@ -179,9 +175,7 @@ inline void SetMaterialColorProperty(std::vector<int>& embeddedTexIdxs, Asset& r
else {
aiColor4D col;
CopyValue(prop.color, col);
- if (col.r != 1.f || col.g != 1.f || col.b != 1.f || col.a != 1.f) {
- mat->AddProperty(&col, 1, pKey, type, idx);
- }
+ mat->AddProperty(&col, 1, pKey, type, idx);
}
}
@@ -200,9 +194,16 @@ void glTFImporter::ImportMaterials(glTF::Asset& r)
aimat->AddProperty(&str, AI_MATKEY_NAME);
}
- SetMaterialColorProperty(embeddedTexIdxs, r, mat.diffuse, aimat, aiTextureType_DIFFUSE, AI_MATKEY_COLOR_DIFFUSE);
+ SetMaterialColorProperty(embeddedTexIdxs, r, mat.ambient, aimat, aiTextureType_AMBIENT, AI_MATKEY_COLOR_AMBIENT );
+ SetMaterialColorProperty(embeddedTexIdxs, r, mat.diffuse, aimat, aiTextureType_DIFFUSE, AI_MATKEY_COLOR_DIFFUSE );
SetMaterialColorProperty(embeddedTexIdxs, r, mat.specular, aimat, aiTextureType_SPECULAR, AI_MATKEY_COLOR_SPECULAR);
- SetMaterialColorProperty(embeddedTexIdxs, r, mat.ambient, aimat, aiTextureType_AMBIENT, AI_MATKEY_COLOR_AMBIENT);
+ SetMaterialColorProperty(embeddedTexIdxs, r, mat.emission, aimat, aiTextureType_EMISSIVE, AI_MATKEY_COLOR_EMISSIVE);
+
+ aimat->AddProperty(&mat.doubleSided, 1, AI_MATKEY_TWOSIDED);
+
+ if (mat.transparent && (mat.transparency != 1.0f)) {
+ aimat->AddProperty(&mat.transparency, 1, AI_MATKEY_OPACITY);
+ }
if (mat.shininess > 0.f) {
aimat->AddProperty(&mat.shininess, 1, AI_MATKEY_SHININESS);
@@ -241,6 +242,7 @@ static inline void SetFace(aiFace& face, int a, int b, int c)
face.mIndices[2] = c;
}
+#ifdef ASSIMP_BUILD_DEBUG
static inline bool CheckValidFacesIndices(aiFace* faces, unsigned nFaces, unsigned nVerts)
{
for (unsigned i = 0; i < nFaces; ++i) {
@@ -252,6 +254,7 @@ static inline bool CheckValidFacesIndices(aiFace* faces, unsigned nFaces, unsign
}
return true;
}
+#endif // ASSIMP_BUILD_DEBUG
void glTFImporter::ImportMeshes(glTF::Asset& r)
{
@@ -348,10 +351,10 @@ void glTFImporter::ImportMeshes(glTF::Asset& r)
}
- if (prim.indices) {
- aiFace* faces = 0;
- unsigned int nFaces = 0;
+ aiFace* faces = 0;
+ unsigned int nFaces = 0;
+ if (prim.indices) {
unsigned int count = prim.indices->count;
Accessor::Indexer data = prim.indices->GetIndexer();
@@ -416,14 +419,78 @@ void glTFImporter::ImportMeshes(glTF::Asset& r)
}
break;
}
+ }
+ else { // no indices provided so directly generate from counts
- if (faces) {
- aim->mFaces = faces;
- aim->mNumFaces = nFaces;
- ai_assert(CheckValidFacesIndices(faces, nFaces, aim->mNumVertices));
+ // use the already determined count as it includes checks
+ unsigned int count = aim->mNumVertices;
+
+ switch (prim.mode) {
+ case PrimitiveMode_POINTS: {
+ nFaces = count;
+ faces = new aiFace[nFaces];
+ for (unsigned int i = 0; i < count; ++i) {
+ SetFace(faces[i], i);
+ }
+ break;
+ }
+
+ case PrimitiveMode_LINES: {
+ nFaces = count / 2;
+ faces = new aiFace[nFaces];
+ for (unsigned int i = 0; i < count; i += 2) {
+ SetFace(faces[i / 2], i, i + 1);
+ }
+ break;
+ }
+
+ case PrimitiveMode_LINE_LOOP:
+ case PrimitiveMode_LINE_STRIP: {
+ nFaces = count - ((prim.mode == PrimitiveMode_LINE_STRIP) ? 1 : 0);
+ faces = new aiFace[nFaces];
+ SetFace(faces[0], 0, 1);
+ for (unsigned int i = 2; i < count; ++i) {
+ SetFace(faces[i - 1], faces[i - 2].mIndices[1], i);
+ }
+ if (prim.mode == PrimitiveMode_LINE_LOOP) { // close the loop
+ SetFace(faces[count - 1], faces[count - 2].mIndices[1], faces[0].mIndices[0]);
+ }
+ break;
+ }
+
+ case PrimitiveMode_TRIANGLES: {
+ nFaces = count / 3;
+ faces = new aiFace[nFaces];
+ for (unsigned int i = 0; i < count; i += 3) {
+ SetFace(faces[i / 3], i, i + 1, i + 2);
+ }
+ break;
+ }
+ case PrimitiveMode_TRIANGLE_STRIP: {
+ nFaces = count - 2;
+ faces = new aiFace[nFaces];
+ SetFace(faces[0], 0, 1, 2);
+ for (unsigned int i = 3; i < count; ++i) {
+ SetFace(faces[i - 2], faces[i - 1].mIndices[1], faces[i - 1].mIndices[2], i);
+ }
+ break;
+ }
+ case PrimitiveMode_TRIANGLE_FAN:
+ nFaces = count - 2;
+ faces = new aiFace[nFaces];
+ SetFace(faces[0], 0, 1, 2);
+ for (unsigned int i = 3; i < count; ++i) {
+ SetFace(faces[i - 2], faces[0].mIndices[0], faces[i - 1].mIndices[2], i);
+ }
+ break;
}
}
+ if (faces) {
+ aim->mFaces = faces;
+ aim->mNumFaces = nFaces;
+ ai_assert(CheckValidFacesIndices(faces, nFaces, aim->mNumVertices));
+ }
if (prim.material) {
aim->mMaterialIndex = prim.material.GetIndex();
@@ -621,7 +688,7 @@ void glTFImporter::ImportEmbeddedTextures(glTF::Asset& r)
// Add the embedded textures
for (size_t i = 0; i < r.images.Size(); ++i) {
- Image img = r.images[i];
+ Image &img = r.images[i];
if (!img.HasData()) continue;
int idx = mScene->mNumTextures++;
@@ -673,11 +740,6 @@ void glTFImporter::InternReadFile(const std::string& pFile, aiScene* pScene, IOS
ImportNodes(asset);
- // TODO: it does not split the loaded vertices, should it?
- //pScene->mFlags |= AI_SCENE_FLAGS_NON_VERBOSE_FORMAT;
- MakeVerboseFormatProcess process;
- process.Execute(pScene);
-
if (pScene->mNumMeshes == 0) {
pScene->mFlags |= AI_SCENE_FLAGS_INCOMPLETE;
diff --git a/code/glTFImporter.h b/code/glTFImporter.h
index 46f450f86..064d6dc1a 100644
--- a/code/glTFImporter.h
+++ b/code/glTFImporter.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -41,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_GLTFIMPORTER_H_INC
#define AI_GLTFIMPORTER_H_INC
-#include "BaseImporter.h"
+#include <assimp/BaseImporter.h>
#include <assimp/DefaultIOSystem.h>
struct aiNode;
diff --git a/code/makefile.mingw b/code/makefile.mingw
index 341642c04..711d57f57 100644
--- a/code/makefile.mingw
+++ b/code/makefile.mingw
@@ -1,105 +1,105 @@
-### USE OF THIS MAKEFILE IS NOT RECOMMENDED.
-### It is no longer maintained. Use CMAKE instead.
-
-# ---------------------------------------------------------------------------
-# Makefile for Open Asset Import Library (MinGW32-make)
-# aramis_acg@users.sourceforge.net
-# - just a quick'n'dirty one, could be buggy ...
-#
-# Usage: mingw32-make -f makefile.mingw <target> <macros>
-
-# TARGETS:
-# all Build a shared so from the whole library
-# clean Cleanup object files, prepare for rebuild
-# static Build a static library (*.a)
-
-# MACROS: (make clean before you change one)
-# NOBOOST=1 Build against boost workaround
-# SINGLETHREADED=1 Build single-threaded library
-# DEBUG=1 Build debug build of library
-#
-# ---------------------------------------------------------------------------
-
-# C++ object files
-OBJECTS := $(patsubst %.cpp,%.o, $(wildcard *.cpp))
-OBJECTS += $(patsubst %.cpp,%.o, $(wildcard extra/*.cpp))
-OBJECTS += $(patsubst %.cpp,%.o, $(wildcard ./../contrib/irrXML/*.cpp))
-
-# C object files
-OBJECTSC := $(patsubst %.c,%.oc, $(wildcard ./../contrib/zlib/*.c))
-OBJECTSC += $(patsubst %.c,%.oc, $(wildcard ./../contrib/ConvertUTF/*.c))
-OBJECTSC += $(patsubst %.c,%.oc, $(wildcard ./../contrib/unzip/*.c))
-
-# Include flags for gcc
-INCLUDEFLAGS =
-
-# Preprocessor defines for gcc
-DEFINEFLAGS =
-
-# Suffix for the output binary, represents build type
-NAMESUFFIX =
-
-# Output path for binaries
-BINPATH = ../bin/mingw/
-
-# GCC compiler flags
-CPPFLAGS=-Wall
-
-# Setup environment for noboost build
-ifeq ($(NOBOOST),1)
- SINGLETHREADED = 1
- INCLUDEFLAGS += -I./BoostWorkaround/
- DEFINEFLAGS += -DASSIMP_BUILD_BOOST_WORKAROUND
-# NAMESUFFIX += -noboost
-else
- # adjust this manually if your boost is stored elsewhere
- INCLUDEFLAGS += -I"C:/Program Files/boost/boost_1_38"
- #INCLUDEFLAGS += -I"$(BOOST_DIR)"
-
-endif
-
-# Setup environment for st build
-ifeq ($(SINGLETHREADED),1)
- DEFINEFLAGS += -DASSIMP_BUILD_SINGLETHREADED
-# NAMESUFFIX += -st
-endif
-
-# Setup environment for debug build
-ifeq ($(DEBUG),1)
- DEFINEFLAGS += -D_DEBUG -DDEBUG
- CPPFLAGS += -g
-# NAMESUFFIX += -debug
-else
- CPPFLAGS += -O2 -s
- DEFINEFLAGS += -DNDEBUG -D_NDEBUG
-endif
-
-# Output name of shared library
-SHARED_TARGET = $(BINPATH)/libassimp$(NAMESUFFIX).so
-
-# Output name of static library
-STATIC = $(BINPATH)/libassimp$(NAMESUFFIX).a
-
-# target: all
-# usage : build a shared library (*.so)
-all: $(SHARED_TARGET)
-
-$(SHARED_TARGET): $(OBJECTS) $(OBJECTSC)
- gcc -o $@ $(OBJECTS) $(OBJECTSC) -shared -lstdc++
-%.o:%.cpp
- $(CXX) -c $(CPPFLAGS) $? -o $@ $(INCLUDEFLAGS) $(DEFINEFLAGS)
-%.oc:%.c
- $(CXX) -x c -c -ansi $(CPPFLAGS) $? -o $@
-
-# target: clean
-# usage : cleanup all object files, prepare for a rebuild
-.PHONY: clean
-clean:
- -del *.o .\..\contrib\irrXML\*.o .\..\contrib\zlib\*.oc .\..\contrib\unzip\*.oc .\..\contrib\ConvertUTF\*.oc
-
-# target: static
-# usage : build a static library (*.a)
-static: $(STATIC)
-$(STATIC): $(OBJECTS) $(OBJECTSC)
- ar rcs $@ $(OBJECTS) $(OBJECTSC)
-
+### USE OF THIS MAKEFILE IS NOT RECOMMENDED.
+### It is no longer maintained. Use CMAKE instead.
+
+# ---------------------------------------------------------------------------
+# Makefile for Open Asset Import Library (MinGW32-make)
+# aramis_acg@users.sourceforge.net
+# - just a quick'n'dirty one, could be buggy ...
+#
+# Usage: mingw32-make -f makefile.mingw <target> <macros>
+
+# TARGETS:
+# all Build a shared so from the whole library
+# clean Cleanup object files, prepare for rebuild
+# static Build a static library (*.a)
+
+# MACROS: (make clean before you change one)
+# NOBOOST=1 Build against boost workaround
+# SINGLETHREADED=1 Build single-threaded library
+# DEBUG=1 Build debug build of library
+#
+# ---------------------------------------------------------------------------
+
+# C++ object files
+OBJECTS := $(patsubst %.cpp,%.o, $(wildcard *.cpp))
+OBJECTS += $(patsubst %.cpp,%.o, $(wildcard extra/*.cpp))
+OBJECTS += $(patsubst %.cpp,%.o, $(wildcard ./../contrib/irrXML/*.cpp))
+
+# C object files
+OBJECTSC := $(patsubst %.c,%.oc, $(wildcard ./../contrib/zlib/*.c))
+OBJECTSC += $(patsubst %.c,%.oc, $(wildcard ./../contrib/ConvertUTF/*.c))
+OBJECTSC += $(patsubst %.c,%.oc, $(wildcard ./../contrib/unzip/*.c))
+
+# Include flags for gcc
+INCLUDEFLAGS =
+
+# Preprocessor defines for gcc
+DEFINEFLAGS =
+
+# Suffix for the output binary, represents build type
+NAMESUFFIX =
+
+# Output path for binaries
+BINPATH = ../bin/mingw/
+
+# GCC compiler flags
+CPPFLAGS=-Wall
+
+# Setup environment for noboost build
+ifeq ($(NOBOOST),1)
+ SINGLETHREADED = 1
+ INCLUDEFLAGS += -I./BoostWorkaround/
+ DEFINEFLAGS += -DASSIMP_BUILD_BOOST_WORKAROUND
+# NAMESUFFIX += -noboost
+else
+ # adjust this manually if your boost is stored elsewhere
+ INCLUDEFLAGS += -I"C:/Program Files/boost/boost_1_38"
+ #INCLUDEFLAGS += -I"$(BOOST_DIR)"
+
+endif
+
+# Setup environment for st build
+ifeq ($(SINGLETHREADED),1)
+ DEFINEFLAGS += -DASSIMP_BUILD_SINGLETHREADED
+# NAMESUFFIX += -st
+endif
+
+# Setup environment for debug build
+ifeq ($(DEBUG),1)
+ DEFINEFLAGS += -D_DEBUG -DDEBUG
+ CPPFLAGS += -g
+# NAMESUFFIX += -debug
+else
+ CPPFLAGS += -O2 -s
+ DEFINEFLAGS += -DNDEBUG -D_NDEBUG
+endif
+
+# Output name of shared library
+SHARED_TARGET = $(BINPATH)/libassimp$(NAMESUFFIX).so
+
+# Output name of static library
+STATIC = $(BINPATH)/libassimp$(NAMESUFFIX).a
+
+# target: all
+# usage : build a shared library (*.so)
+all: $(SHARED_TARGET)
+
+$(SHARED_TARGET): $(OBJECTS) $(OBJECTSC)
+ gcc -o $@ $(OBJECTS) $(OBJECTSC) -shared -lstdc++
+%.o:%.cpp
+ $(CXX) -c $(CPPFLAGS) $? -o $@ $(INCLUDEFLAGS) $(DEFINEFLAGS)
+%.oc:%.c
+ $(CXX) -x c -c -ansi $(CPPFLAGS) $? -o $@
+
+# target: clean
+# usage : cleanup all object files, prepare for a rebuild
+.PHONY: clean
+clean:
+ -del *.o .\..\contrib\irrXML\*.o .\..\contrib\zlib\*.oc .\..\contrib\unzip\*.oc .\..\contrib\ConvertUTF\*.oc
+
+# target: static
+# usage : build a static library (*.a)
+static: $(STATIC)
+$(STATIC): $(OBJECTS) $(OBJECTSC)
+ ar rcs $@ $(OBJECTS) $(OBJECTSC)
+
diff --git a/code/scene.cpp b/code/scene.cpp
index 467a2895d..676051163 100644
--- a/code/scene.cpp
+++ b/code/scene.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/simd.cpp b/code/simd.cpp
new file mode 100644
index 000000000..9e2a83a60
--- /dev/null
+++ b/code/simd.cpp
@@ -0,0 +1,79 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2018, assimp 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 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 "simd.h"
+
+namespace Assimp {
+
+bool CPUSupportsSSE2() {
+#if defined(__x86_64__) || defined(_M_X64)
+ //* x86_64 always has SSE2 instructions */
+ return true;
+#elif defined(__GNUC__) && defined(i386)
+ // for GCC x86 we check cpuid
+ unsigned int d;
+ __asm__(
+ "pushl %%ebx\n\t"
+ "cpuid\n\t"
+ "popl %%ebx\n\t"
+ : "=d" ( d )
+ :"a" ( 1 ) );
+ return ( d & 0x04000000 ) != 0;
+#elif (defined(_MSC_VER) && defined(_M_IX86))
+ // also check cpuid for MSVC x86
+ unsigned int d;
+ __asm {
+ xor eax, eax
+ inc eax
+ push ebx
+ cpuid
+ pop ebx
+ mov d, edx
+ }
+ return ( d & 0x04000000 ) != 0;
+#else
+ return false;
+#endif
+}
+
+
+} // Namespace Assimp
diff --git a/code/simd.h b/code/simd.h
new file mode 100644
index 000000000..19117569d
--- /dev/null
+++ b/code/simd.h
@@ -0,0 +1,53 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2018, assimp 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 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.
+---------------------------------------------------------------------------
+*/
+#pragma once
+
+#include <assimp/defs.h>
+
+namespace Assimp {
+
+/// @brief Checks if the platform supports SSE2 optimization
+/// @return true, if SSE2 is supported. false if SSE2 is not supported.
+bool ASSIMP_API CPUSupportsSSE2();
+
+} // Namespace Assimp
diff --git a/contrib/Open3DGC/o3dgcAdjacencyInfo.h b/contrib/Open3DGC/o3dgcAdjacencyInfo.h
index 6b53a242d..72fe3d4c6 100644
--- a/contrib/Open3DGC/o3dgcAdjacencyInfo.h
+++ b/contrib/Open3DGC/o3dgcAdjacencyInfo.h
@@ -140,8 +140,8 @@ namespace o3dgc
{
return End(element) - Begin(element);
}
- long * const GetNumNeighborsBuffer() { return m_numNeighbors;}
- long * const GetNeighborsBuffer() { return m_neighbors;}
+ long * GetNumNeighborsBuffer() { return m_numNeighbors;}
+ long * GetNeighborsBuffer() { return m_neighbors;}
private:
long m_neighborsSize; // actual allocated size for m_neighbors
diff --git a/contrib/Open3DGC/o3dgcArithmeticCodec.cpp b/contrib/Open3DGC/o3dgcArithmeticCodec.cpp
index 1d160ba95..3597ec39a 100644
--- a/contrib/Open3DGC/o3dgcArithmeticCodec.cpp
+++ b/contrib/Open3DGC/o3dgcArithmeticCodec.cpp
@@ -820,6 +820,7 @@ namespace o3dgc
for (unsigned n = 0; n < data_symbols; n++)
total_count += (symbol_count[n] = (symbol_count[n] + 1) >> 1);
}
+ assert(total_count > 0);
// compute cumulative distribution, decoder table
unsigned k, sum = 0, s = 0;
unsigned scale = 0x80000000U / total_count;
@@ -830,6 +831,7 @@ namespace o3dgc
sum += symbol_count[k];
}
else {
+ assert(decoder_table);
for (k = 0; k < data_symbols; k++) {
distribution[k] = (scale * sum) >> (31 - DM__LengthShift);
sum += symbol_count[k];
diff --git a/contrib/Open3DGC/o3dgcBinaryStream.h b/contrib/Open3DGC/o3dgcBinaryStream.h
index 9f4aefe55..b7b7678b7 100644
--- a/contrib/Open3DGC/o3dgcBinaryStream.h
+++ b/contrib/Open3DGC/o3dgcBinaryStream.h
@@ -231,7 +231,8 @@ namespace o3dgc
float ReadFloat32Bin(unsigned long & position) const
{
unsigned long value = ReadUInt32Bin(position);
- float fvalue = *((float *)(&value));
+ float fvalue;
+ memcpy(&fvalue, &value, 4);
return fvalue;
}
unsigned long ReadUInt32Bin(unsigned long & position) const
@@ -261,7 +262,8 @@ namespace o3dgc
void WriteFloat32ASCII(float value)
{
- unsigned long uiValue = *((unsigned long *)(&value));
+ unsigned long uiValue;
+ memcpy(&uiValue, &value, 4);
WriteUInt32ASCII(uiValue);
}
void WriteUInt32ASCII(unsigned long position, unsigned long value)
@@ -314,7 +316,8 @@ namespace o3dgc
float ReadFloat32ASCII(unsigned long & position) const
{
unsigned long value = ReadUInt32ASCII(position);
- float fvalue = *((float *)(&value));
+ float fvalue;
+ memcpy(&fvalue, &value, 4);
return fvalue;
}
unsigned long ReadUInt32ASCII(unsigned long & position) const
@@ -395,15 +398,15 @@ namespace o3dgc
{
return m_stream.GetSize();
}
- const unsigned char * const GetBuffer(unsigned long position) const
+ const unsigned char * GetBuffer(unsigned long position) const
{
return m_stream.GetBuffer() + position;
}
- unsigned char * const GetBuffer(unsigned long position)
+ unsigned char * GetBuffer(unsigned long position)
{
return (m_stream.GetBuffer() + position);
}
- unsigned char * const GetBuffer()
+ unsigned char * GetBuffer()
{
return m_stream.GetBuffer();
}
diff --git a/contrib/Open3DGC/o3dgcDynamicVector.h b/contrib/Open3DGC/o3dgcDynamicVector.h
index edc97d83c..aa7fb3142 100644
--- a/contrib/Open3DGC/o3dgcDynamicVector.h
+++ b/contrib/Open3DGC/o3dgcDynamicVector.h
@@ -48,10 +48,10 @@ namespace o3dgc
unsigned long GetNVector() const { return m_num;}
unsigned long GetDimVector() const { return m_dim;}
unsigned long GetStride() const { return m_stride;}
- const Real * const GetMin() const { return m_min;}
- const Real * const GetMax() const { return m_max;}
- const Real * const GetVectors() const { return m_vectors;}
- Real * const GetVectors() { return m_vectors;}
+ const Real * GetMin() const { return m_min;}
+ const Real * GetMax() const { return m_max;}
+ const Real * GetVectors() const { return m_vectors;}
+ Real * GetVectors() { return m_vectors;}
Real GetMin(unsigned long j) const { return m_min[j];}
Real GetMax(unsigned long j) const { return m_max[j];}
diff --git a/contrib/Open3DGC/o3dgcFIFO.h b/contrib/Open3DGC/o3dgcFIFO.h
index 874c26475..4a5555f2a 100644
--- a/contrib/Open3DGC/o3dgcFIFO.h
+++ b/contrib/Open3DGC/o3dgcFIFO.h
@@ -81,8 +81,8 @@ namespace o3dgc
m_end = 0;
}
}
- const unsigned long GetSize() const { return m_size;};
- const unsigned long GetAllocatedSize() const { return m_allocated;};
+ unsigned long GetSize() const { return m_size;};
+ unsigned long GetAllocatedSize() const { return m_allocated;};
void Clear() { m_start = m_end = m_size = 0;};
private:
diff --git a/contrib/Open3DGC/o3dgcIndexedFaceSet.h b/contrib/Open3DGC/o3dgcIndexedFaceSet.h
index 4af9de437..adb8cb001 100644
--- a/contrib/Open3DGC/o3dgcIndexedFaceSet.h
+++ b/contrib/Open3DGC/o3dgcIndexedFaceSet.h
@@ -62,26 +62,26 @@ namespace o3dgc
}
unsigned long GetNumFloatAttributes() const { return m_numFloatAttributes;}
unsigned long GetNumIntAttributes() const { return m_numIntAttributes ;}
- const Real * const GetCoordMin () const { return m_coordMin;}
- const Real * const GetCoordMax () const { return m_coordMax;}
- const Real * const GetNormalMin () const { return m_normalMin;}
- const Real * const GetNormalMax () const { return m_normalMax;}
+ const Real * GetCoordMin () const { return m_coordMin;}
+ const Real * GetCoordMax () const { return m_coordMax;}
+ const Real * GetNormalMin () const { return m_normalMin;}
+ const Real * GetNormalMax () const { return m_normalMax;}
Real GetCoordMin (int j) const { return m_coordMin[j] ;}
Real GetCoordMax (int j) const { return m_coordMax[j] ;}
Real GetNormalMin (int j) const { return m_normalMin[j] ;}
Real GetNormalMax (int j) const { return m_normalMax[j] ;}
- const O3DGCIFSFloatAttributeType GetFloatAttributeType(unsigned long a) const
+ O3DGCIFSFloatAttributeType GetFloatAttributeType(unsigned long a) const
{
assert(a < O3DGC_SC3DMC_MAX_NUM_FLOAT_ATTRIBUTES);
return m_typeFloatAttribute[a];
}
- const O3DGCIFSIntAttributeType GetIntAttributeType(unsigned long a) const
+ O3DGCIFSIntAttributeType GetIntAttributeType(unsigned long a) const
{
assert(a < O3DGC_SC3DMC_MAX_NUM_INT_ATTRIBUTES);
return m_typeIntAttribute[a];
}
- const unsigned long GetFloatAttributeDim(unsigned long a) const
+ unsigned long GetFloatAttributeDim(unsigned long a) const
{
assert(a < O3DGC_SC3DMC_MAX_NUM_FLOAT_ATTRIBUTES);
return m_dimFloatAttribute[a];
@@ -91,12 +91,12 @@ namespace o3dgc
assert(a < O3DGC_SC3DMC_MAX_NUM_INT_ATTRIBUTES);
return m_dimIntAttribute[a];
}
- const Real * const GetFloatAttributeMin(unsigned long a) const
+ const Real * GetFloatAttributeMin(unsigned long a) const
{
assert(a < O3DGC_SC3DMC_MAX_NUM_FLOAT_ATTRIBUTES);
return &(m_minFloatAttribute[a * O3DGC_SC3DMC_MAX_DIM_ATTRIBUTES]);
}
- const Real * const GetFloatAttributeMax(unsigned long a) const
+ const Real * GetFloatAttributeMax(unsigned long a) const
{
assert(a < O3DGC_SC3DMC_MAX_NUM_FLOAT_ATTRIBUTES);
return &(m_maxFloatAttribute[a * O3DGC_SC3DMC_MAX_DIM_ATTRIBUTES]);
@@ -118,17 +118,17 @@ namespace o3dgc
bool GetSolid() const { return m_solid ;}
bool GetConvex() const { return m_convex ;}
bool GetIsTriangularMesh() const { return m_isTriangularMesh;}
- const unsigned long * const GetIndexBufferID() const { return m_indexBufferID ;}
- const T * const GetCoordIndex() const { return m_coordIndex;}
- T * const GetCoordIndex() { return m_coordIndex;}
- Real * const GetCoord() const { return m_coord ;}
- Real * const GetNormal() const { return m_normal ;}
- Real * const GetFloatAttribute(unsigned long a) const
+ const unsigned long * GetIndexBufferID() const { return m_indexBufferID ;}
+ const T * GetCoordIndex() const { return m_coordIndex;}
+ T * GetCoordIndex() { return m_coordIndex;}
+ Real * GetCoord() const { return m_coord ;}
+ Real * GetNormal() const { return m_normal ;}
+ Real * GetFloatAttribute(unsigned long a) const
{
assert(a < O3DGC_SC3DMC_MAX_NUM_FLOAT_ATTRIBUTES);
return m_floatAttribute[a];
}
- long * const GetIntAttribute(unsigned long a) const
+ long * GetIntAttribute(unsigned long a) const
{
assert(a < O3DGC_SC3DMC_MAX_NUM_INT_ATTRIBUTES);
return m_intAttribute[a] ;
diff --git a/contrib/Open3DGC/o3dgcSC3DMCDecoder.inl b/contrib/Open3DGC/o3dgcSC3DMCDecoder.inl
index d36b62f2b..aa6f24b73 100644
--- a/contrib/Open3DGC/o3dgcSC3DMCDecoder.inl
+++ b/contrib/Open3DGC/o3dgcSC3DMCDecoder.inl
@@ -425,7 +425,7 @@ namespace o3dgc
const AdjacencyInfo & v2T = m_triangleListDecoder.GetVertexToTriangle();
const T * const triangles = ifs.GetCoordIndex();
Vec3<long> p1, p2, p3, n0, nt;
- long na0, nb0;
+ long na0 = 0, nb0 = 0;
Real rna0, rnb0, norm0;
char ni0 = 0, ni1 = 0;
long a, b, c;
diff --git a/contrib/Open3DGC/o3dgcSC3DMCEncoder.inl b/contrib/Open3DGC/o3dgcSC3DMCEncoder.inl
index b2c438814..2d30b05a2 100644
--- a/contrib/Open3DGC/o3dgcSC3DMCEncoder.inl
+++ b/contrib/Open3DGC/o3dgcSC3DMCEncoder.inl
@@ -762,8 +762,8 @@ namespace o3dgc
const Real * const originalNormals = ifs.GetNormal();
Vec3<long> p1, p2, p3, n0, nt;
Vec3<Real> n1;
- long na0, nb0;
- Real rna0, rnb0, na1, nb1, norm0, norm1;
+ long na0 = 0, nb0 = 0;
+ Real rna0, rnb0, na1 = 0, nb1 = 0, norm0, norm1;
char ni0 = 0, ni1 = 0;
long a, b, c, v;
m_predictors.Clear();
diff --git a/contrib/Open3DGC/o3dgcTimer.h b/contrib/Open3DGC/o3dgcTimer.h
index 00fe5b653..d9a285968 100644
--- a/contrib/Open3DGC/o3dgcTimer.h
+++ b/contrib/Open3DGC/o3dgcTimer.h
@@ -30,7 +30,7 @@ THE SOFTWARE.
/* Thank you, Microsoft, for file WinDef.h with min/max redefinition. */
#define NOMINMAX
#include <windows.h>
-#elif __MACH__
+#elif __APPLE__
#include <mach/clock.h>
#include <mach/mach.h>
#else
@@ -73,7 +73,7 @@ namespace o3dgc
LARGE_INTEGER m_freq;
};
-#elif __MACH__
+#elif __APPLE__
class Timer
{
public:
diff --git a/contrib/Open3DGC/o3dgcTriangleListEncoder.h b/contrib/Open3DGC/o3dgcTriangleListEncoder.h
index cf790ecc3..c09172273 100644
--- a/contrib/Open3DGC/o3dgcTriangleListEncoder.h
+++ b/contrib/Open3DGC/o3dgcTriangleListEncoder.h
@@ -50,10 +50,10 @@ namespace o3dgc
BinaryStream & bstream);
O3DGCStreamType GetStreamType() const { return m_streamType; }
void SetStreamType(O3DGCStreamType streamType) { m_streamType = streamType; }
- const long * const GetInvVMap() const { return m_invVMap;}
- const long * const GetInvTMap() const { return m_invTMap;}
- const long * const GetVMap() const { return m_vmap;}
- const long * const GetTMap() const { return m_tmap;}
+ const long * GetInvVMap() const { return m_invVMap;}
+ const long * GetInvTMap() const { return m_invTMap;}
+ const long * GetVMap() const { return m_vmap;}
+ const long * GetTMap() const { return m_tmap;}
const AdjacencyInfo & GetVertexToTriangle() const { return m_vertexToTriangle;}
private:
diff --git a/contrib/Open3DGC/o3dgcTriangleListEncoder.inl b/contrib/Open3DGC/o3dgcTriangleListEncoder.inl
index d499f6dc9..017dd86bf 100644
--- a/contrib/Open3DGC/o3dgcTriangleListEncoder.inl
+++ b/contrib/Open3DGC/o3dgcTriangleListEncoder.inl
@@ -125,7 +125,7 @@ namespace o3dgc
}
return true;
}
- inline bool IsCase6(long degree, long numIndices, const long * const ops, const long * const indices)
+ inline bool IsCase6(long degree, long numIndices, const long * const ops, const long * const /*indices*/)
{
// ops: 0000000 indices:
if (numIndices!= 0)
diff --git a/contrib/Open3DGC/o3dgcVector.h b/contrib/Open3DGC/o3dgcVector.h
index e766e2b7f..08d3ed564 100644
--- a/contrib/Open3DGC/o3dgcVector.h
+++ b/contrib/Open3DGC/o3dgcVector.h
@@ -88,8 +88,8 @@ namespace o3dgc
assert(m_size < m_allocated);
m_buffer[m_size++] = value;
}
- const T * const GetBuffer() const { return m_buffer;};
- T * const GetBuffer() { return m_buffer;};
+ const T * GetBuffer() const { return m_buffer;};
+ T * GetBuffer() { return m_buffer;};
unsigned long GetSize() const { return m_size;};
void SetSize(unsigned long size)
{
diff --git a/contrib/android-cmake/AndroidNdkGdb.cmake b/contrib/android-cmake/AndroidNdkGdb.cmake
new file mode 100644
index 000000000..0677dcda9
--- /dev/null
+++ b/contrib/android-cmake/AndroidNdkGdb.cmake
@@ -0,0 +1,96 @@
+# Copyright (c) 2014, Pavel Rojtberg
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+#
+# 2. 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.
+#
+# 3. Neither the name of the copyright holder nor the names of its
+# contributors may be used to endorse or promote products derived from this
+# software without specific prior written permission.
+#
+# 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 HOLDER 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.
+
+# ------------------------------------------------------------------------------
+# Usage:
+# 1. place AndroidNdkGdb.cmake somewhere inside ${CMAKE_MODULE_PATH}
+# 2. inside your project add
+#
+# include(AndroidNdkGdb)
+# android_ndk_gdb_enable()
+# # for each target
+# add_library(MyLibrary ...)
+# android_ndk_gdb_debuggable(MyLibrary)
+
+
+# add gdbserver and general gdb configuration to project
+# also create a mininal NDK skeleton so ndk-gdb finds the paths
+#
+# the optional parameter defines the path to the android project.
+# uses PROJECT_SOURCE_DIR by default.
+macro(android_ndk_gdb_enable)
+ if(ANDROID)
+ # create custom target that depends on the real target so it gets executed afterwards
+ add_custom_target(NDK_GDB ALL)
+
+ if(${ARGC})
+ set(ANDROID_PROJECT_DIR ${ARGV0})
+ else()
+ set(ANDROID_PROJECT_DIR ${PROJECT_SOURCE_DIR})
+ endif()
+
+ set(NDK_GDB_SOLIB_PATH ${ANDROID_PROJECT_DIR}/obj/local/${ANDROID_NDK_ABI_NAME}/)
+ file(MAKE_DIRECTORY ${NDK_GDB_SOLIB_PATH})
+
+ # 1. generate essential Android Makefiles
+ file(MAKE_DIRECTORY ${ANDROID_PROJECT_DIR}/jni)
+ if(NOT EXISTS ${ANDROID_PROJECT_DIR}/jni/Android.mk)
+ file(WRITE ${ANDROID_PROJECT_DIR}/jni/Android.mk "APP_ABI := ${ANDROID_NDK_ABI_NAME}\n")
+ endif()
+ if(NOT EXISTS ${ANDROID_PROJECT_DIR}/jni/Application.mk)
+ file(WRITE ${ANDROID_PROJECT_DIR}/jni/Application.mk "APP_ABI := ${ANDROID_NDK_ABI_NAME}\n")
+ endif()
+
+ # 2. generate gdb.setup
+ get_directory_property(PROJECT_INCLUDES DIRECTORY ${PROJECT_SOURCE_DIR} INCLUDE_DIRECTORIES)
+ string(REGEX REPLACE ";" " " PROJECT_INCLUDES "${PROJECT_INCLUDES}")
+ file(WRITE ${LIBRARY_OUTPUT_PATH}/gdb.setup "set solib-search-path ${NDK_GDB_SOLIB_PATH}\n")
+ file(APPEND ${LIBRARY_OUTPUT_PATH}/gdb.setup "directory ${PROJECT_INCLUDES}\n")
+
+ # 3. copy gdbserver executable
+ file(COPY ${ANDROID_NDK}/prebuilt/android-${ANDROID_ARCH_NAME}/gdbserver/gdbserver DESTINATION ${LIBRARY_OUTPUT_PATH})
+ endif()
+endmacro()
+
+# register a target for remote debugging
+# copies the debug version to NDK_GDB_SOLIB_PATH then strips symbols of original
+macro(android_ndk_gdb_debuggable TARGET_NAME)
+ if(ANDROID)
+ get_property(TARGET_LOCATION TARGET ${TARGET_NAME} PROPERTY LOCATION)
+
+ # create custom target that depends on the real target so it gets executed afterwards
+ add_dependencies(NDK_GDB ${TARGET_NAME})
+
+ # 4. copy lib to obj
+ add_custom_command(TARGET NDK_GDB POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different ${TARGET_LOCATION} ${NDK_GDB_SOLIB_PATH})
+
+ # 5. strip symbols
+ add_custom_command(TARGET NDK_GDB POST_BUILD COMMAND ${CMAKE_STRIP} ${TARGET_LOCATION})
+ endif()
+endmacro()
diff --git a/contrib/android-cmake/AndroidNdkModules.cmake b/contrib/android-cmake/AndroidNdkModules.cmake
new file mode 100644
index 000000000..64f37fdee
--- /dev/null
+++ b/contrib/android-cmake/AndroidNdkModules.cmake
@@ -0,0 +1,58 @@
+# Copyright (c) 2014, Pavel Rojtberg
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+#
+# 2. 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.
+#
+# 3. Neither the name of the copyright holder nor the names of its
+# contributors may be used to endorse or promote products derived from this
+# software without specific prior written permission.
+#
+# 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 HOLDER 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.
+
+macro(android_ndk_import_module_cpufeatures)
+ if(ANDROID)
+ include_directories(${ANDROID_NDK}/sources/android/cpufeatures)
+ add_library(cpufeatures ${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c)
+ target_link_libraries(cpufeatures dl)
+ endif()
+endmacro()
+
+macro(android_ndk_import_module_native_app_glue)
+ if(ANDROID)
+ include_directories(${ANDROID_NDK}/sources/android/native_app_glue)
+ add_library(native_app_glue ${ANDROID_NDK}/sources/android/native_app_glue/android_native_app_glue.c)
+ target_link_libraries(native_app_glue log)
+ endif()
+endmacro()
+
+macro(android_ndk_import_module_ndk_helper)
+ if(ANDROID)
+ android_ndk_import_module_cpufeatures()
+ android_ndk_import_module_native_app_glue()
+
+ include_directories(${ANDROID_NDK}/sources/android/ndk_helper)
+ file(GLOB _NDK_HELPER_SRCS ${ANDROID_NDK}/sources/android/ndk_helper/*.cpp ${ANDROID_NDK}/sources/android/ndk_helper/gl3stub.c)
+ add_library(ndk_helper ${_NDK_HELPER_SRCS})
+ target_link_libraries(ndk_helper log android EGL GLESv2 cpufeatures native_app_glue)
+
+ unset(_NDK_HELPER_SRCS)
+ endif()
+endmacro() \ No newline at end of file
diff --git a/contrib/android-cmake/README.md b/contrib/android-cmake/README.md
new file mode 100644
index 000000000..ee6302128
--- /dev/null
+++ b/contrib/android-cmake/README.md
@@ -0,0 +1,240 @@
+# android-cmake
+
+CMake is great, and so is Android. This is a collection of CMake scripts that may be useful to the Android NDK community. It is based on experience from porting OpenCV library to Android: http://opencv.org/platforms/android.html
+
+Main goal is to share these scripts so that devs that use CMake as their build system may easily compile native code for Android.
+
+## TL;DR
+
+ cmake -DCMAKE_TOOLCHAIN_FILE=android.toolchain.cmake \
+ -DANDROID_NDK=<ndk_path> \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DANDROID_ABI="armeabi-v7a with NEON" \
+ <source_path>
+ cmake --build .
+
+One-liner:
+
+ cmake -DCMAKE_TOOLCHAIN_FILE=android.toolchain.cmake -DANDROID_NDK=<ndk_path> -DCMAKE_BUILD_TYPE=Release -DANDROID_ABI="armeabi-v7a with NEON" <source_path> && cmake --build .
+
+_android-cmake_ will search for your NDK install in the following order:
+
+1. Value of `ANDROID_NDK` CMake variable;
+1. Value of `ANDROID_NDK` environment variable;
+1. Search under paths from `ANDROID_NDK_SEARCH_PATHS` CMake variable;
+1. Search platform specific locations (home folder, Windows "Program Files", etc).
+
+So if you have installed the NDK as `~/android-ndk-r10d` then _android-cmake_ will locate it automatically.
+
+## Getting started
+
+To build a cmake-based C/C++ project for Android you need:
+
+* Android NDK (>= r5) http://developer.android.com/tools/sdk/ndk/index.html
+* CMake (>= v2.6.3, >= v2.8.9 recommended) http://www.cmake.org/download
+
+The _android-cmake_ is also capable to build with NDK from AOSP or Linaro Android source tree, but you may be required to manually specify path to `libm` binary to link with.
+
+## Difference from traditional CMake
+
+Folowing the _ndk-build_ the _android-cmake_ supports **only two build targets**:
+
+* `-DCMAKE_BUILD_TYPE=Release`
+* `-DCMAKE_BUILD_TYPE=Debug`
+
+So don't even try other targets that can be found in CMake documentation and don't forget to explicitly specify `Release` or `Debug` because CMake builds without a build configuration by default.
+
+## Difference from _ndk-build_
+
+* Latest GCC available in NDK is used as the default compiler;
+* `Release` builds with `-O3` instead of `-Os`;
+* `Release` builds without debug info (without `-g`) (because _ndk-build_ always creates a stripped version but cmake delays this for `install/strip` target);
+* `-fsigned-char` is added to compiler flags to make `char` signed by default as it is on x86/x86_64;
+* GCC's stack protector is not used neither in `Debug` nor `Release` configurations;
+* No builds for multiple platforms (e.g. building for both arm and x86 require to run cmake twice with different parameters);
+* No file level Neon via `.neon` suffix;
+
+The following features of _ndk-build_ are not supported by the _android-cmake_ yet:
+
+* `armeabi-v7a-hard` ABI
+* `libc++_static`/`libc++_shared` STL runtime
+
+## Basic options
+
+Similarly to the NDK build system _android-cmake_ allows to select between several compiler toolchains and target platforms. Most of the options can be set either as cmake arguments: `-D<NAME>=<VALUE>` or as environment variables:
+
+* **ANDROID_NDK** - path to the Android NDK. If not set then _android-cmake_ will search for the most recent version of supported NDK in commonly used locations;
+* **ANDROID_ABI** - specifies the target Application Binary Interface (ABI). This option nearly matches to the APP_ABI variable used by ndk-build tool from Android NDK. If not specified then set to `armeabi-v7a`. Possible target names are:
+ * `armeabi` - ARMv5TE based CPU with software floating point operations;
+ * **`armeabi-v7a`** - ARMv7 based devices with hardware FPU instructions (VFPv3_D16);
+ * `armeabi-v7a with NEON` - same as armeabi-v7a, but sets NEON as floating-point unit;
+ * `armeabi-v7a with VFPV3` - same as armeabi-v7a, but sets VFPv3_D32 as floating-point unit;
+ * `armeabi-v6 with VFP` - tuned for ARMv6 processors having VFP;
+ * `x86` - IA-32 instruction set
+ * `mips` - MIPS32 instruction set
+ * `arm64-v8a` - ARMv8 AArch64 instruction set - only for NDK r10 and newer
+ * `x86_64` - Intel64 instruction set (r1) - only for NDK r10 and newer
+ * `mips64` - MIPS64 instruction set (r6) - only for NDK r10 and newer
+* **ANDROID_NATIVE_API_LEVEL** - level of android API to build for. Can be set either to full name (example: `android-8`) or a numeric value (example: `17`). The default API level depends on the target ABI:
+ * `android-8` for ARM;
+ * `android-9` for x86 and MIPS;
+ * `android-21` for 64-bit ABIs.
+
+ Building for `android-L` is possible only when it is explicitly selected.
+* **ANDROID_TOOLCHAIN_NAME** - the name of compiler toolchain to be used. This option allows to select between different GCC and Clang versions. The list of possible values depends on the NDK version and will be printed by toolchain file if an invalid value is set. By default _android-cmake_ selects the most recent version of GCC which can build for specified `ANDROID_ABI`.
+
+ Example values are:
+ * `aarch64-linux-android-4.9`
+ * `aarch64-linux-android-clang3.5`
+ * `arm-linux-androideabi-4.8`
+ * `arm-linux-androideabi-4.9`
+ * `arm-linux-androideabi-clang3.5`
+ * `mips64el-linux-android-4.9`
+ * `mipsel-linux-android-4.8`
+ * `x86-4.9`
+ * `x86_64-4.9`
+ * etc.
+* **ANDROID_STL** - the name of C++ runtime to use. The default is `gnustl_static`.
+ * `none` - do not configure the runtime.
+ * `system` - use the default minimal system C++ runtime library.
+ * Implies `-fno-rtti -fno-exceptions`.
+ * `system_re` - use the default minimal system C++ runtime library.
+ * Implies `-frtti -fexceptions`.
+ * `gabi++_static` - use the GAbi++ runtime as a static library.
+ * Implies `-frtti -fno-exceptions`.
+ * Available for NDK r7 and newer.
+ * `gabi++_shared` - use the GAbi++ runtime as a shared library.
+ * Implies `-frtti -fno-exceptions`.
+ * Available for NDK r7 and newer.
+ * `stlport_static` - use the STLport runtime as a static library.
+ * Implies `-fno-rtti -fno-exceptions` for NDK before r7.
+ * Implies `-frtti -fno-exceptions` for NDK r7 and newer.
+ * `stlport_shared` - use the STLport runtime as a shared library.
+ * Implies `-fno-rtti -fno-exceptions` for NDK before r7.
+ * Implies `-frtti -fno-exceptions` for NDK r7 and newer.
+ * **`gnustl_static`** - use the GNU STL as a static library.
+ * Implies `-frtti -fexceptions`.
+ * `gnustl_shared` - use the GNU STL as a shared library.
+ * Implies `-frtti -fno-exceptions`.
+ * Available for NDK r7b and newer.
+ * Silently degrades to `gnustl_static` if not available.
+* **NDK_CCACHE** - path to `ccache` executable. If not set then initialized from `NDK_CCACHE` environment variable.
+
+## Advanced _android-cmake_ options
+
+Normally _android-cmake_ users are not supposed to touch these variables but they might be useful to workaround some build issues:
+
+* **ANDROID_FORCE_ARM_BUILD** = `OFF` - generate 32-bit ARM instructions instead of Thumb. Applicable only for arm ABIs and is forced to be `ON` for `armeabi-v6 with VFP`;
+* **ANDROID_NO_UNDEFINED** = `ON` - show all undefined symbols as linker errors;
+* **ANDROID_SO_UNDEFINED** = `OFF` - allow undefined symbols in shared libraries;
+ * actually it is turned `ON` by default for NDK older than `r7`
+* **ANDROID_STL_FORCE_FEATURES** = `ON` - automatically configure rtti and exceptions support based on C++ runtime;
+* **ANDROID_NDK_LAYOUT** = `RELEASE` - inner layout of Android NDK, should be detected automatically. Possible values are:
+ * `RELEASE` - public releases from Google;
+ * `LINARO` - NDK from Linaro project;
+ * `ANDROID` - NDK from AOSP.
+* **ANDROID_FUNCTION_LEVEL_LINKING** = `ON` - enables saparate putting each function and data items into separate sections and enable garbage collection of unused input sections at link time (`-fdata-sections -ffunction-sections -Wl,--gc-sections`);
+* **ANDROID_GOLD_LINKER** = `ON` - use gold linker with GCC 4.6 for NDK r8b and newer (only for ARM and x86);
+* **ANDROID_NOEXECSTACK** = `ON` - enables or disables stack execution protection code (`-Wl,-z,noexecstack`);
+* **ANDROID_RELRO** = `ON` - Enables RELRO - a memory corruption mitigation technique (`-Wl,-z,relro -Wl,-z,now`);
+* **ANDROID_LIBM_PATH** - path to `libm.so` (set to something like `$(TOP)/out/target/product/<product_name>/obj/lib/libm.so`) to workaround unresolved `sincos`.
+
+## Fine-tuning `CMakeLists.txt` for _android-cmake_
+
+### Recognizing Android build
+
+_android-cmake_ defines `ANDROID` CMake variable which can be used to add Android-specific stuff:
+
+ if (ANDROID)
+ message(STATUS "Hello from Android build!")
+ endif()
+
+The recommended way to identify ARM/MIPS/x86 architecture is examining `CMAKE_SYSTEM_PROCESSOR` which is set to the appropriate value:
+
+* `armv5te` - for `armeabi` ABI
+* `armv6` - for `armeabi-v6 with VFP` ABI
+* `armv7-a` - for `armeabi-v7a`, `armeabi-v7a with VFPV3` and `armeabi-v7a with NEON` ABIs
+* `aarch64` - for `arm64-v8a` ABI
+* `i686` - for `x86` ABI
+* `x86_64` - for `x86_64` ABI
+* `mips` - for `mips` ABI
+* `mips64` - for `mips64` ABI
+
+Other variables that are set by _android-cmake_ and can be used for the fine-grained build configuration are:
+
+* `NEON` - set if target ABI supports Neon;
+* `ANDROID_NATIVE_API_LEVEL` - native Android API level we are building for (note: Java part of Andoid application can be built for another API level)
+* `ANDROID_NDK_RELEASE` - version of the Android NDK
+* `ANDROID_NDK_HOST_SYSTEM_NAME` - "windows", "linux-x86" or "darwin-x86" depending on the host platform
+* `ANDROID_RTTI` - set if rtti is enabled by the runtime
+* `ANDROID_EXCEPTIONS` - set if exceptions are enabled by the runtime
+
+### Finding packages
+
+When crosscompiling CMake `find_*` commands are normally expected to find libraries and packages belonging to the same build target. So _android-cmake_ configures CMake to search in Android-specific paths only and ignore your host system locations. So
+
+ find_package(ZLIB)
+
+will surely find libz.so within the Android NDK.
+
+However sometimes you need to locate a host package even when cross-compiling. For example you can be searching for your documentation generator. The _android-cmake_ recommends you to use `find_host_package` and `find_host_program` macro defined in the `android.toolchain.cmake`:
+
+ find_host_package(Doxygen)
+ find_host_program(PDFLATEX pdflatex)
+
+However this will break regular builds so instead of wrapping package search into platform-specific logic you can copy the following snippet into your project (put it after your top-level `project()` command):
+
+ # Search packages for host system instead of packages for target system
+ # in case of cross compilation these macro should be defined by toolchain file
+ if(NOT COMMAND find_host_package)
+ macro(find_host_package)
+ find_package(${ARGN})
+ endmacro()
+ endif()
+ if(NOT COMMAND find_host_program)
+ macro(find_host_program)
+ find_program(${ARGN})
+ endmacro()
+ endif()
+
+### Compiler flags recycling
+
+Make sure to do the following in your scripts:
+
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${my_cxx_flags}")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${my_cxx_flags}")
+
+The flags will be prepopulated with critical flags, so don't loose them. Also be aware that _android-cmake_ also sets configuration-specific compiler and linker flags.
+
+## Troubleshooting
+
+### Building on Windows
+
+First of all `cygwin` builds are **NOT supported** and will not be supported by _android-cmake_. To build natively on Windows you need a port of make but I recommend http://martine.github.io/ninja/ instead.
+
+To build with Ninja you need:
+
+* Ensure you are using CMake newer than 2.8.9;
+* Download the latest Ninja from https://github.com/martine/ninja/releases;
+* Put the `ninja.exe` into your PATH (or add path to `ninja.exe` to your PATH environment variable);
+* Pass `-GNinja` to `cmake` alongside with other arguments (or choose Ninja generator in `cmake-gui`).
+* Enjoy the fast native multithreaded build :)
+
+But if you still want to stick to old make then:
+
+* Get a Windows port of GNU Make:
+ * Android NDK r7 (and newer) already has `make.exe` on board;
+ * `mingw-make` should work as fine;
+ * Download some other port. For example, this one: http://gnuwin32.sourceforge.net/packages/make.htm.
+* Add path to your `make.exe` to system PATH or always use full path;
+* Pass `-G"MinGW Makefiles"` and `-DCMAKE_MAKE_PROGRAM="<full/path/to/>make.exe"`
+ * It must be `MinGW Makefiles` and not `Unix Makefiles` even if your `make.exe` is not a MinGW's make.
+* Run `make.exe` or `cmake --build .` for single-threaded build.
+
+### Projects with assembler files
+
+The _android-cmake_ should correctly handle projects with assembler sources (`*.s` or `*.S`). But if you still facing problems with assembler then try to upgrade your CMake to version newer than 2.8.5
+
+## Copying
+
+_android-cmake_ is distributed under the terms of [BSD 3-Clause License](http://opensource.org/licenses/BSD-3-Clause) \ No newline at end of file
diff --git a/contrib/android-cmake/android.toolchain.cmake b/contrib/android-cmake/android.toolchain.cmake
new file mode 100644
index 000000000..ffa26126a
--- /dev/null
+++ b/contrib/android-cmake/android.toolchain.cmake
@@ -0,0 +1,1693 @@
+# Copyright (c) 2010-2011, Ethan Rublee
+# Copyright (c) 2011-2014, Andrey Kamaev
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+#
+# 2. 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.
+#
+# 3. Neither the name of the copyright holder nor the names of its
+# contributors may be used to endorse or promote products derived from this
+# software without specific prior written permission.
+#
+# 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 HOLDER 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.
+
+# ------------------------------------------------------------------------------
+# Android CMake toolchain file, for use with the Android NDK r5-r10d
+# Requires cmake 2.6.3 or newer (2.8.9 or newer is recommended).
+# See home page: https://github.com/taka-no-me/android-cmake
+#
+# Usage Linux:
+# $ export ANDROID_NDK=/absolute/path/to/the/android-ndk
+# $ mkdir build && cd build
+# $ cmake -DCMAKE_TOOLCHAIN_FILE=path/to/the/android.toolchain.cmake ..
+# $ make -j8
+#
+# Usage Windows:
+# You need native port of make to build your project.
+# Android NDK r7 (and newer) already has make.exe on board.
+# For older NDK you have to install it separately.
+# For example, this one: http://gnuwin32.sourceforge.net/packages/make.htm
+#
+# $ SET ANDROID_NDK=C:\absolute\path\to\the\android-ndk
+# $ mkdir build && cd build
+# $ cmake.exe -G"MinGW Makefiles"
+# -DCMAKE_TOOLCHAIN_FILE=path\to\the\android.toolchain.cmake
+# -DCMAKE_MAKE_PROGRAM="%ANDROID_NDK%\prebuilt\windows\bin\make.exe" ..
+# $ cmake.exe --build .
+#
+#
+# Options (can be set as cmake parameters: -D<option_name>=<value>):
+# ANDROID_NDK=/opt/android-ndk - path to the NDK root.
+# Can be set as environment variable. Can be set only at first cmake run.
+#
+# ANDROID_ABI=armeabi-v7a - specifies the target Application Binary
+# Interface (ABI). This option nearly matches to the APP_ABI variable
+# used by ndk-build tool from Android NDK.
+#
+# Possible targets are:
+# "armeabi" - ARMv5TE based CPU with software floating point operations
+# "armeabi-v7a" - ARMv7 based devices with hardware FPU instructions
+# this ABI target is used by default
+# "armeabi-v7a with NEON" - same as armeabi-v7a, but
+# sets NEON as floating-point unit
+# "armeabi-v7a with VFPV3" - same as armeabi-v7a, but
+# sets VFPV3 as floating-point unit (has 32 registers instead of 16)
+# "armeabi-v6 with VFP" - tuned for ARMv6 processors having VFP
+# "x86" - IA-32 instruction set
+# "mips" - MIPS32 instruction set
+#
+# 64-bit ABIs for NDK r10 and newer:
+# "arm64-v8a" - ARMv8 AArch64 instruction set
+# "x86_64" - Intel64 instruction set (r1)
+# "mips64" - MIPS64 instruction set (r6)
+#
+# ANDROID_NATIVE_API_LEVEL=android-8 - level of Android API compile for.
+# Option is read-only when standalone toolchain is used.
+# Note: building for "android-L" requires explicit configuration.
+#
+# ANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-4.9 - the name of compiler
+# toolchain to be used. The list of possible values depends on the NDK
+# version. For NDK r10c the possible values are:
+#
+# * aarch64-linux-android-4.9
+# * aarch64-linux-android-clang3.4
+# * aarch64-linux-android-clang3.5
+# * arm-linux-androideabi-4.6
+# * arm-linux-androideabi-4.8
+# * arm-linux-androideabi-4.9 (default)
+# * arm-linux-androideabi-clang3.4
+# * arm-linux-androideabi-clang3.5
+# * mips64el-linux-android-4.9
+# * mips64el-linux-android-clang3.4
+# * mips64el-linux-android-clang3.5
+# * mipsel-linux-android-4.6
+# * mipsel-linux-android-4.8
+# * mipsel-linux-android-4.9
+# * mipsel-linux-android-clang3.4
+# * mipsel-linux-android-clang3.5
+# * x86-4.6
+# * x86-4.8
+# * x86-4.9
+# * x86-clang3.4
+# * x86-clang3.5
+# * x86_64-4.9
+# * x86_64-clang3.4
+# * x86_64-clang3.5
+#
+# ANDROID_FORCE_ARM_BUILD=OFF - set ON to generate 32-bit ARM instructions
+# instead of Thumb. Is not available for "armeabi-v6 with VFP"
+# (is forced to be ON) ABI.
+#
+# ANDROID_NO_UNDEFINED=ON - set ON to show all undefined symbols as linker
+# errors even if they are not used.
+#
+# ANDROID_SO_UNDEFINED=OFF - set ON to allow undefined symbols in shared
+# libraries. Automatically turned for NDK r5x and r6x due to GLESv2
+# problems.
+#
+# ANDROID_STL=gnustl_static - specify the runtime to use.
+#
+# Possible values are:
+# none -> Do not configure the runtime.
+# system -> Use the default minimal system C++ runtime library.
+# Implies -fno-rtti -fno-exceptions.
+# Is not available for standalone toolchain.
+# system_re -> Use the default minimal system C++ runtime library.
+# Implies -frtti -fexceptions.
+# Is not available for standalone toolchain.
+# gabi++_static -> Use the GAbi++ runtime as a static library.
+# Implies -frtti -fno-exceptions.
+# Available for NDK r7 and newer.
+# Is not available for standalone toolchain.
+# gabi++_shared -> Use the GAbi++ runtime as a shared library.
+# Implies -frtti -fno-exceptions.
+# Available for NDK r7 and newer.
+# Is not available for standalone toolchain.
+# stlport_static -> Use the STLport runtime as a static library.
+# Implies -fno-rtti -fno-exceptions for NDK before r7.
+# Implies -frtti -fno-exceptions for NDK r7 and newer.
+# Is not available for standalone toolchain.
+# stlport_shared -> Use the STLport runtime as a shared library.
+# Implies -fno-rtti -fno-exceptions for NDK before r7.
+# Implies -frtti -fno-exceptions for NDK r7 and newer.
+# Is not available for standalone toolchain.
+# gnustl_static -> Use the GNU STL as a static library.
+# Implies -frtti -fexceptions.
+# gnustl_shared -> Use the GNU STL as a shared library.
+# Implies -frtti -fno-exceptions.
+# Available for NDK r7b and newer.
+# Silently degrades to gnustl_static if not available.
+#
+# ANDROID_STL_FORCE_FEATURES=ON - turn rtti and exceptions support based on
+# chosen runtime. If disabled, then the user is responsible for settings
+# these options.
+#
+# What?:
+# android-cmake toolchain searches for NDK/toolchain in the following order:
+# ANDROID_NDK - cmake parameter
+# ANDROID_NDK - environment variable
+# ANDROID_STANDALONE_TOOLCHAIN - cmake parameter
+# ANDROID_STANDALONE_TOOLCHAIN - environment variable
+# ANDROID_NDK - default locations
+# ANDROID_STANDALONE_TOOLCHAIN - default locations
+#
+# Make sure to do the following in your scripts:
+# SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${my_cxx_flags}" )
+# SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${my_cxx_flags}" )
+# The flags will be prepopulated with critical flags, so don't loose them.
+# Also be aware that toolchain also sets configuration-specific compiler
+# flags and linker flags.
+#
+# ANDROID and BUILD_ANDROID will be set to true, you may test any of these
+# variables to make necessary Android-specific configuration changes.
+#
+# Also ARMEABI or ARMEABI_V7A or X86 or MIPS or ARM64_V8A or X86_64 or MIPS64
+# will be set true, mutually exclusive. NEON option will be set true
+# if VFP is set to NEON.
+#
+# ------------------------------------------------------------------------------
+
+cmake_minimum_required( VERSION 2.6.3 )
+
+if( DEFINED CMAKE_CROSSCOMPILING )
+ # subsequent toolchain loading is not really needed
+ return()
+endif()
+
+if( CMAKE_TOOLCHAIN_FILE )
+ # touch toolchain variable to suppress "unused variable" warning
+endif()
+
+# inherit settings in recursive loads
+get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE )
+if( _CMAKE_IN_TRY_COMPILE )
+ include( "${CMAKE_CURRENT_SOURCE_DIR}/../android.toolchain.config.cmake" OPTIONAL )
+endif()
+
+# this one is important
+if( CMAKE_VERSION VERSION_GREATER "3.0.99" )
+ set( CMAKE_SYSTEM_NAME Android )
+else()
+ set( CMAKE_SYSTEM_NAME Linux )
+endif()
+
+# this one not so much
+set( CMAKE_SYSTEM_VERSION 1 )
+
+# rpath makes low sense for Android
+set( CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "" )
+set( CMAKE_SKIP_RPATH TRUE CACHE BOOL "If set, runtime paths are not added when using shared libraries." )
+
+# NDK search paths
+set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r10d -r10c -r10b -r10 -r9d -r9c -r9b -r9 -r8e -r8d -r8c -r8b -r8 -r7c -r7b -r7 -r6b -r6 -r5c -r5b -r5 "" )
+if( NOT DEFINED ANDROID_NDK_SEARCH_PATHS )
+ if( CMAKE_HOST_WIN32 )
+ file( TO_CMAKE_PATH "$ENV{PROGRAMFILES}" ANDROID_NDK_SEARCH_PATHS )
+ set( ANDROID_NDK_SEARCH_PATHS "${ANDROID_NDK_SEARCH_PATHS}" "$ENV{SystemDrive}/NVPACK" )
+ else()
+ file( TO_CMAKE_PATH "$ENV{HOME}" ANDROID_NDK_SEARCH_PATHS )
+ set( ANDROID_NDK_SEARCH_PATHS /opt "${ANDROID_NDK_SEARCH_PATHS}/NVPACK" )
+ endif()
+endif()
+if( NOT DEFINED ANDROID_STANDALONE_TOOLCHAIN_SEARCH_PATH )
+ set( ANDROID_STANDALONE_TOOLCHAIN_SEARCH_PATH /opt/android-toolchain )
+endif()
+
+# known ABIs
+set( ANDROID_SUPPORTED_ABIS_arm "armeabi-v7a;armeabi;armeabi-v7a with NEON;armeabi-v7a with VFPV3;armeabi-v6 with VFP" )
+set( ANDROID_SUPPORTED_ABIS_arm64 "arm64-v8a" )
+set( ANDROID_SUPPORTED_ABIS_x86 "x86" )
+set( ANDROID_SUPPORTED_ABIS_x86_64 "x86_64" )
+set( ANDROID_SUPPORTED_ABIS_mips "mips" )
+set( ANDROID_SUPPORTED_ABIS_mips64 "mips64" )
+
+# API level defaults
+set( ANDROID_DEFAULT_NDK_API_LEVEL 8 )
+set( ANDROID_DEFAULT_NDK_API_LEVEL_arm64 21 )
+set( ANDROID_DEFAULT_NDK_API_LEVEL_x86 9 )
+set( ANDROID_DEFAULT_NDK_API_LEVEL_x86_64 21 )
+set( ANDROID_DEFAULT_NDK_API_LEVEL_mips 9 )
+set( ANDROID_DEFAULT_NDK_API_LEVEL_mips64 21 )
+
+
+macro( __LIST_FILTER listvar regex )
+ if( ${listvar} )
+ foreach( __val ${${listvar}} )
+ if( __val MATCHES "${regex}" )
+ list( REMOVE_ITEM ${listvar} "${__val}" )
+ endif()
+ endforeach()
+ endif()
+endmacro()
+
+macro( __INIT_VARIABLE var_name )
+ set( __test_path 0 )
+ foreach( __var ${ARGN} )
+ if( __var STREQUAL "PATH" )
+ set( __test_path 1 )
+ break()
+ endif()
+ endforeach()
+
+ if( __test_path AND NOT EXISTS "${${var_name}}" )
+ unset( ${var_name} CACHE )
+ endif()
+
+ if( " ${${var_name}}" STREQUAL " " )
+ set( __values 0 )
+ foreach( __var ${ARGN} )
+ if( __var STREQUAL "VALUES" )
+ set( __values 1 )
+ elseif( NOT __var STREQUAL "PATH" )
+ if( __var MATCHES "^ENV_.*$" )
+ string( REPLACE "ENV_" "" __var "${__var}" )
+ set( __value "$ENV{${__var}}" )
+ elseif( DEFINED ${__var} )
+ set( __value "${${__var}}" )
+ elseif( __values )
+ set( __value "${__var}" )
+ else()
+ set( __value "" )
+ endif()
+
+ if( NOT " ${__value}" STREQUAL " " AND (NOT __test_path OR EXISTS "${__value}") )
+ set( ${var_name} "${__value}" )
+ break()
+ endif()
+ endif()
+ endforeach()
+ unset( __value )
+ unset( __values )
+ endif()
+
+ if( __test_path )
+ file( TO_CMAKE_PATH "${${var_name}}" ${var_name} )
+ endif()
+ unset( __test_path )
+endmacro()
+
+macro( __DETECT_NATIVE_API_LEVEL _var _path )
+ set( __ndkApiLevelRegex "^[\t ]*#define[\t ]+__ANDROID_API__[\t ]+([0-9]+)[\t ]*.*$" )
+ file( STRINGS ${_path} __apiFileContent REGEX "${__ndkApiLevelRegex}" )
+ if( NOT __apiFileContent )
+ message( SEND_ERROR "Could not get Android native API level. Probably you have specified invalid level value, or your copy of NDK/toolchain is broken." )
+ endif()
+ string( REGEX REPLACE "${__ndkApiLevelRegex}" "\\1" ${_var} "${__apiFileContent}" )
+ unset( __apiFileContent )
+ unset( __ndkApiLevelRegex )
+endmacro()
+
+macro( __DETECT_TOOLCHAIN_MACHINE_NAME _var _root )
+ if( EXISTS "${_root}" )
+ file( GLOB __gccExePath RELATIVE "${_root}/bin/" "${_root}/bin/*-gcc${TOOL_OS_SUFFIX}" )
+ __LIST_FILTER( __gccExePath "^[.].*" )
+ list( LENGTH __gccExePath __gccExePathsCount )
+ if( NOT __gccExePathsCount EQUAL 1 AND NOT _CMAKE_IN_TRY_COMPILE )
+ message( WARNING "Could not determine machine name for compiler from ${_root}" )
+ set( ${_var} "" )
+ else()
+ get_filename_component( __gccExeName "${__gccExePath}" NAME_WE )
+ string( REPLACE "-gcc" "" ${_var} "${__gccExeName}" )
+ endif()
+ unset( __gccExePath )
+ unset( __gccExePathsCount )
+ unset( __gccExeName )
+ else()
+ set( ${_var} "" )
+ endif()
+endmacro()
+
+
+# fight against cygwin
+set( ANDROID_FORBID_SYGWIN TRUE CACHE BOOL "Prevent cmake from working under cygwin and using cygwin tools")
+mark_as_advanced( ANDROID_FORBID_SYGWIN )
+if( ANDROID_FORBID_SYGWIN )
+ if( CYGWIN )
+ message( FATAL_ERROR "Android NDK and android-cmake toolchain are not welcome Cygwin. It is unlikely that this cmake toolchain will work under cygwin. But if you want to try then you can set cmake variable ANDROID_FORBID_SYGWIN to FALSE and rerun cmake." )
+ endif()
+
+ if( CMAKE_HOST_WIN32 )
+ # remove cygwin from PATH
+ set( __new_path "$ENV{PATH}")
+ __LIST_FILTER( __new_path "cygwin" )
+ set(ENV{PATH} "${__new_path}")
+ unset(__new_path)
+ endif()
+endif()
+
+
+# detect current host platform
+if( NOT DEFINED ANDROID_NDK_HOST_X64 AND (CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "amd64|x86_64|AMD64" OR CMAKE_HOST_APPLE) )
+ set( ANDROID_NDK_HOST_X64 1 CACHE BOOL "Try to use 64-bit compiler toolchain" )
+ mark_as_advanced( ANDROID_NDK_HOST_X64 )
+endif()
+
+set( TOOL_OS_SUFFIX "" )
+if( CMAKE_HOST_APPLE )
+ set( ANDROID_NDK_HOST_SYSTEM_NAME "darwin-x86_64" )
+ set( ANDROID_NDK_HOST_SYSTEM_NAME2 "darwin-x86" )
+elseif( CMAKE_HOST_WIN32 )
+ set( ANDROID_NDK_HOST_SYSTEM_NAME "windows-x86_64" )
+ set( ANDROID_NDK_HOST_SYSTEM_NAME2 "windows" )
+ set( TOOL_OS_SUFFIX ".exe" )
+elseif( CMAKE_HOST_UNIX )
+ set( ANDROID_NDK_HOST_SYSTEM_NAME "linux-x86_64" )
+ set( ANDROID_NDK_HOST_SYSTEM_NAME2 "linux-x86" )
+else()
+ message( FATAL_ERROR "Cross-compilation on your platform is not supported by this cmake toolchain" )
+endif()
+
+if( NOT ANDROID_NDK_HOST_X64 )
+ set( ANDROID_NDK_HOST_SYSTEM_NAME ${ANDROID_NDK_HOST_SYSTEM_NAME2} )
+endif()
+
+# see if we have path to Android NDK
+if( NOT ANDROID_NDK AND NOT ANDROID_STANDALONE_TOOLCHAIN )
+ __INIT_VARIABLE( ANDROID_NDK PATH ENV_ANDROID_NDK )
+endif()
+if( NOT ANDROID_NDK )
+ # see if we have path to Android standalone toolchain
+ __INIT_VARIABLE( ANDROID_STANDALONE_TOOLCHAIN PATH ENV_ANDROID_STANDALONE_TOOLCHAIN )
+
+ if( NOT ANDROID_STANDALONE_TOOLCHAIN )
+ #try to find Android NDK in one of the the default locations
+ set( __ndkSearchPaths )
+ foreach( __ndkSearchPath ${ANDROID_NDK_SEARCH_PATHS} )
+ foreach( suffix ${ANDROID_SUPPORTED_NDK_VERSIONS} )
+ list( APPEND __ndkSearchPaths "${__ndkSearchPath}/android-ndk${suffix}" )
+ endforeach()
+ endforeach()
+ __INIT_VARIABLE( ANDROID_NDK PATH VALUES ${__ndkSearchPaths} )
+ unset( __ndkSearchPaths )
+
+ if( ANDROID_NDK )
+ message( STATUS "Using default path for Android NDK: ${ANDROID_NDK}" )
+ message( STATUS " If you prefer to use a different location, please define a cmake or environment variable: ANDROID_NDK" )
+ else()
+ #try to find Android standalone toolchain in one of the the default locations
+ __INIT_VARIABLE( ANDROID_STANDALONE_TOOLCHAIN PATH ANDROID_STANDALONE_TOOLCHAIN_SEARCH_PATH )
+
+ if( ANDROID_STANDALONE_TOOLCHAIN )
+ message( STATUS "Using default path for standalone toolchain ${ANDROID_STANDALONE_TOOLCHAIN}" )
+ message( STATUS " If you prefer to use a different location, please define the variable: ANDROID_STANDALONE_TOOLCHAIN" )
+ endif( ANDROID_STANDALONE_TOOLCHAIN )
+ endif( ANDROID_NDK )
+ endif( NOT ANDROID_STANDALONE_TOOLCHAIN )
+endif( NOT ANDROID_NDK )
+
+# remember found paths
+if( ANDROID_NDK )
+ get_filename_component( ANDROID_NDK "${ANDROID_NDK}" ABSOLUTE )
+ set( ANDROID_NDK "${ANDROID_NDK}" CACHE INTERNAL "Path of the Android NDK" FORCE )
+ set( BUILD_WITH_ANDROID_NDK True )
+ if( EXISTS "${ANDROID_NDK}/RELEASE.TXT" )
+ file( STRINGS "${ANDROID_NDK}/RELEASE.TXT" ANDROID_NDK_RELEASE_FULL LIMIT_COUNT 1 REGEX "r[0-9]+[a-z]?" )
+ string( REGEX MATCH "r([0-9]+)([a-z]?)" ANDROID_NDK_RELEASE "${ANDROID_NDK_RELEASE_FULL}" )
+ else()
+ set( ANDROID_NDK_RELEASE "r1x" )
+ set( ANDROID_NDK_RELEASE_FULL "unreleased" )
+ endif()
+ string( REGEX REPLACE "r([0-9]+)([a-z]?)" "\\1*1000" ANDROID_NDK_RELEASE_NUM "${ANDROID_NDK_RELEASE}" )
+ string( FIND " abcdefghijklmnopqastuvwxyz" "${CMAKE_MATCH_2}" __ndkReleaseLetterNum )
+ math( EXPR ANDROID_NDK_RELEASE_NUM "${ANDROID_NDK_RELEASE_NUM}+${__ndkReleaseLetterNum}" )
+elseif( ANDROID_STANDALONE_TOOLCHAIN )
+ get_filename_component( ANDROID_STANDALONE_TOOLCHAIN "${ANDROID_STANDALONE_TOOLCHAIN}" ABSOLUTE )
+ # try to detect change
+ if( CMAKE_AR )
+ string( LENGTH "${ANDROID_STANDALONE_TOOLCHAIN}" __length )
+ string( SUBSTRING "${CMAKE_AR}" 0 ${__length} __androidStandaloneToolchainPreviousPath )
+ if( NOT __androidStandaloneToolchainPreviousPath STREQUAL ANDROID_STANDALONE_TOOLCHAIN )
+ message( FATAL_ERROR "It is not possible to change path to the Android standalone toolchain on subsequent run." )
+ endif()
+ unset( __androidStandaloneToolchainPreviousPath )
+ unset( __length )
+ endif()
+ set( ANDROID_STANDALONE_TOOLCHAIN "${ANDROID_STANDALONE_TOOLCHAIN}" CACHE INTERNAL "Path of the Android standalone toolchain" FORCE )
+ set( BUILD_WITH_STANDALONE_TOOLCHAIN True )
+else()
+ list(GET ANDROID_NDK_SEARCH_PATHS 0 ANDROID_NDK_SEARCH_PATH)
+ message( FATAL_ERROR "Could not find neither Android NDK nor Android standalone toolchain.
+ You should either set an environment variable:
+ export ANDROID_NDK=~/my-android-ndk
+ or
+ export ANDROID_STANDALONE_TOOLCHAIN=~/my-android-toolchain
+ or put the toolchain or NDK in the default path:
+ sudo ln -s ~/my-android-ndk ${ANDROID_NDK_SEARCH_PATH}/android-ndk
+ sudo ln -s ~/my-android-toolchain ${ANDROID_STANDALONE_TOOLCHAIN_SEARCH_PATH}" )
+endif()
+
+# android NDK layout
+if( BUILD_WITH_ANDROID_NDK )
+ if( NOT DEFINED ANDROID_NDK_LAYOUT )
+ # try to automatically detect the layout
+ if( EXISTS "${ANDROID_NDK}/RELEASE.TXT")
+ set( ANDROID_NDK_LAYOUT "RELEASE" )
+ elseif( EXISTS "${ANDROID_NDK}/../../linux-x86/toolchain/" )
+ set( ANDROID_NDK_LAYOUT "LINARO" )
+ elseif( EXISTS "${ANDROID_NDK}/../../gcc/" )
+ set( ANDROID_NDK_LAYOUT "ANDROID" )
+ endif()
+ endif()
+ set( ANDROID_NDK_LAYOUT "${ANDROID_NDK_LAYOUT}" CACHE STRING "The inner layout of NDK" )
+ mark_as_advanced( ANDROID_NDK_LAYOUT )
+ if( ANDROID_NDK_LAYOUT STREQUAL "LINARO" )
+ set( ANDROID_NDK_HOST_SYSTEM_NAME ${ANDROID_NDK_HOST_SYSTEM_NAME2} ) # only 32-bit at the moment
+ set( ANDROID_NDK_TOOLCHAINS_PATH "${ANDROID_NDK}/../../${ANDROID_NDK_HOST_SYSTEM_NAME}/toolchain" )
+ set( ANDROID_NDK_TOOLCHAINS_SUBPATH "" )
+ set( ANDROID_NDK_TOOLCHAINS_SUBPATH2 "" )
+ elseif( ANDROID_NDK_LAYOUT STREQUAL "ANDROID" )
+ set( ANDROID_NDK_HOST_SYSTEM_NAME ${ANDROID_NDK_HOST_SYSTEM_NAME2} ) # only 32-bit at the moment
+ set( ANDROID_NDK_TOOLCHAINS_PATH "${ANDROID_NDK}/../../gcc/${ANDROID_NDK_HOST_SYSTEM_NAME}/arm" )
+ set( ANDROID_NDK_TOOLCHAINS_SUBPATH "" )
+ set( ANDROID_NDK_TOOLCHAINS_SUBPATH2 "" )
+ else() # ANDROID_NDK_LAYOUT STREQUAL "RELEASE"
+ set( ANDROID_NDK_TOOLCHAINS_PATH "${ANDROID_NDK}/toolchains" )
+ set( ANDROID_NDK_TOOLCHAINS_SUBPATH "/prebuilt/${ANDROID_NDK_HOST_SYSTEM_NAME}" )
+ set( ANDROID_NDK_TOOLCHAINS_SUBPATH2 "/prebuilt/${ANDROID_NDK_HOST_SYSTEM_NAME2}" )
+ endif()
+ get_filename_component( ANDROID_NDK_TOOLCHAINS_PATH "${ANDROID_NDK_TOOLCHAINS_PATH}" ABSOLUTE )
+
+ # try to detect change of NDK
+ if( CMAKE_AR )
+ string( LENGTH "${ANDROID_NDK_TOOLCHAINS_PATH}" __length )
+ string( SUBSTRING "${CMAKE_AR}" 0 ${__length} __androidNdkPreviousPath )
+ if( NOT __androidNdkPreviousPath STREQUAL ANDROID_NDK_TOOLCHAINS_PATH )
+ message( FATAL_ERROR "It is not possible to change the path to the NDK on subsequent CMake run. You must remove all generated files from your build folder first.
+ " )
+ endif()
+ unset( __androidNdkPreviousPath )
+ unset( __length )
+ endif()
+endif()
+
+
+# get all the details about standalone toolchain
+if( BUILD_WITH_STANDALONE_TOOLCHAIN )
+ __DETECT_NATIVE_API_LEVEL( ANDROID_SUPPORTED_NATIVE_API_LEVELS "${ANDROID_STANDALONE_TOOLCHAIN}/sysroot/usr/include/android/api-level.h" )
+ set( ANDROID_STANDALONE_TOOLCHAIN_API_LEVEL ${ANDROID_SUPPORTED_NATIVE_API_LEVELS} )
+ set( __availableToolchains "standalone" )
+ __DETECT_TOOLCHAIN_MACHINE_NAME( __availableToolchainMachines "${ANDROID_STANDALONE_TOOLCHAIN}" )
+ if( NOT __availableToolchainMachines )
+ message( FATAL_ERROR "Could not determine machine name of your toolchain. Probably your Android standalone toolchain is broken." )
+ endif()
+ if( __availableToolchainMachines MATCHES x86_64 )
+ set( __availableToolchainArchs "x86_64" )
+ elseif( __availableToolchainMachines MATCHES i686 )
+ set( __availableToolchainArchs "x86" )
+ elseif( __availableToolchainMachines MATCHES aarch64 )
+ set( __availableToolchainArchs "arm64" )
+ elseif( __availableToolchainMachines MATCHES arm )
+ set( __availableToolchainArchs "arm" )
+ elseif( __availableToolchainMachines MATCHES mips64el )
+ set( __availableToolchainArchs "mips64" )
+ elseif( __availableToolchainMachines MATCHES mipsel )
+ set( __availableToolchainArchs "mips" )
+ endif()
+ execute_process( COMMAND "${ANDROID_STANDALONE_TOOLCHAIN}/bin/${__availableToolchainMachines}-gcc${TOOL_OS_SUFFIX}" -dumpversion
+ OUTPUT_VARIABLE __availableToolchainCompilerVersions OUTPUT_STRIP_TRAILING_WHITESPACE )
+ string( REGEX MATCH "[0-9]+[.][0-9]+([.][0-9]+)?" __availableToolchainCompilerVersions "${__availableToolchainCompilerVersions}" )
+ if( EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/bin/clang${TOOL_OS_SUFFIX}" )
+ list( APPEND __availableToolchains "standalone-clang" )
+ list( APPEND __availableToolchainMachines ${__availableToolchainMachines} )
+ list( APPEND __availableToolchainArchs ${__availableToolchainArchs} )
+ list( APPEND __availableToolchainCompilerVersions ${__availableToolchainCompilerVersions} )
+ endif()
+endif()
+
+macro( __GLOB_NDK_TOOLCHAINS __availableToolchainsVar __availableToolchainsLst __toolchain_subpath )
+ foreach( __toolchain ${${__availableToolchainsLst}} )
+ if( "${__toolchain}" MATCHES "-clang3[.][0-9]$" AND NOT EXISTS "${ANDROID_NDK_TOOLCHAINS_PATH}/${__toolchain}${__toolchain_subpath}" )
+ SET( __toolchainVersionRegex "^TOOLCHAIN_VERSION[\t ]+:=[\t ]+(.*)$" )
+ FILE( STRINGS "${ANDROID_NDK_TOOLCHAINS_PATH}/${__toolchain}/setup.mk" __toolchainVersionStr REGEX "${__toolchainVersionRegex}" )
+ if( __toolchainVersionStr )
+ string( REGEX REPLACE "${__toolchainVersionRegex}" "\\1" __toolchainVersionStr "${__toolchainVersionStr}" )
+ string( REGEX REPLACE "-clang3[.][0-9]$" "-${__toolchainVersionStr}" __gcc_toolchain "${__toolchain}" )
+ else()
+ string( REGEX REPLACE "-clang3[.][0-9]$" "-4.6" __gcc_toolchain "${__toolchain}" )
+ endif()
+ unset( __toolchainVersionStr )
+ unset( __toolchainVersionRegex )
+ else()
+ set( __gcc_toolchain "${__toolchain}" )
+ endif()
+ __DETECT_TOOLCHAIN_MACHINE_NAME( __machine "${ANDROID_NDK_TOOLCHAINS_PATH}/${__gcc_toolchain}${__toolchain_subpath}" )
+ if( __machine )
+ string( REGEX MATCH "[0-9]+[.][0-9]+([.][0-9x]+)?$" __version "${__gcc_toolchain}" )
+ if( __machine MATCHES x86_64 )
+ set( __arch "x86_64" )
+ elseif( __machine MATCHES i686 )
+ set( __arch "x86" )
+ elseif( __machine MATCHES aarch64 )
+ set( __arch "arm64" )
+ elseif( __machine MATCHES arm )
+ set( __arch "arm" )
+ elseif( __machine MATCHES mips64el )
+ set( __arch "mips64" )
+ elseif( __machine MATCHES mipsel )
+ set( __arch "mips" )
+ else()
+ set( __arch "" )
+ endif()
+ #message("machine: !${__machine}!\narch: !${__arch}!\nversion: !${__version}!\ntoolchain: !${__toolchain}!\n")
+ if (__arch)
+ list( APPEND __availableToolchainMachines "${__machine}" )
+ list( APPEND __availableToolchainArchs "${__arch}" )
+ list( APPEND __availableToolchainCompilerVersions "${__version}" )
+ list( APPEND ${__availableToolchainsVar} "${__toolchain}" )
+ endif()
+ endif()
+ unset( __gcc_toolchain )
+ endforeach()
+endmacro()
+
+# get all the details about NDK
+if( BUILD_WITH_ANDROID_NDK )
+ file( GLOB ANDROID_SUPPORTED_NATIVE_API_LEVELS RELATIVE "${ANDROID_NDK}/platforms" "${ANDROID_NDK}/platforms/android-*" )
+ string( REPLACE "android-" "" ANDROID_SUPPORTED_NATIVE_API_LEVELS "${ANDROID_SUPPORTED_NATIVE_API_LEVELS}" )
+ set( __availableToolchains "" )
+ set( __availableToolchainMachines "" )
+ set( __availableToolchainArchs "" )
+ set( __availableToolchainCompilerVersions "" )
+ if( ANDROID_TOOLCHAIN_NAME AND EXISTS "${ANDROID_NDK_TOOLCHAINS_PATH}/${ANDROID_TOOLCHAIN_NAME}/" )
+ # do not go through all toolchains if we know the name
+ set( __availableToolchainsLst "${ANDROID_TOOLCHAIN_NAME}" )
+ __GLOB_NDK_TOOLCHAINS( __availableToolchains __availableToolchainsLst "${ANDROID_NDK_TOOLCHAINS_SUBPATH}" )
+ if( NOT __availableToolchains AND NOT ANDROID_NDK_TOOLCHAINS_SUBPATH STREQUAL ANDROID_NDK_TOOLCHAINS_SUBPATH2 )
+ __GLOB_NDK_TOOLCHAINS( __availableToolchains __availableToolchainsLst "${ANDROID_NDK_TOOLCHAINS_SUBPATH2}" )
+ if( __availableToolchains )
+ set( ANDROID_NDK_TOOLCHAINS_SUBPATH ${ANDROID_NDK_TOOLCHAINS_SUBPATH2} )
+ endif()
+ endif()
+ endif()
+ if( NOT __availableToolchains )
+ file( GLOB __availableToolchainsLst RELATIVE "${ANDROID_NDK_TOOLCHAINS_PATH}" "${ANDROID_NDK_TOOLCHAINS_PATH}/*" )
+ if( __availableToolchainsLst )
+ list(SORT __availableToolchainsLst) # we need clang to go after gcc
+ endif()
+ __LIST_FILTER( __availableToolchainsLst "^[.]" )
+ __LIST_FILTER( __availableToolchainsLst "llvm" )
+ __LIST_FILTER( __availableToolchainsLst "renderscript" )
+ __GLOB_NDK_TOOLCHAINS( __availableToolchains __availableToolchainsLst "${ANDROID_NDK_TOOLCHAINS_SUBPATH}" )
+ if( NOT __availableToolchains AND NOT ANDROID_NDK_TOOLCHAINS_SUBPATH STREQUAL ANDROID_NDK_TOOLCHAINS_SUBPATH2 )
+ __GLOB_NDK_TOOLCHAINS( __availableToolchains __availableToolchainsLst "${ANDROID_NDK_TOOLCHAINS_SUBPATH2}" )
+ if( __availableToolchains )
+ set( ANDROID_NDK_TOOLCHAINS_SUBPATH ${ANDROID_NDK_TOOLCHAINS_SUBPATH2} )
+ endif()
+ endif()
+ endif()
+ if( NOT __availableToolchains )
+ message( FATAL_ERROR "Could not find any working toolchain in the NDK. Probably your Android NDK is broken." )
+ endif()
+endif()
+
+# build list of available ABIs
+set( ANDROID_SUPPORTED_ABIS "" )
+set( __uniqToolchainArchNames ${__availableToolchainArchs} )
+list( REMOVE_DUPLICATES __uniqToolchainArchNames )
+list( SORT __uniqToolchainArchNames )
+foreach( __arch ${__uniqToolchainArchNames} )
+ list( APPEND ANDROID_SUPPORTED_ABIS ${ANDROID_SUPPORTED_ABIS_${__arch}} )
+endforeach()
+unset( __uniqToolchainArchNames )
+if( NOT ANDROID_SUPPORTED_ABIS )
+ message( FATAL_ERROR "No one of known Android ABIs is supported by this cmake toolchain." )
+endif()
+
+# choose target ABI
+__INIT_VARIABLE( ANDROID_ABI VALUES ${ANDROID_SUPPORTED_ABIS} )
+# verify that target ABI is supported
+list( FIND ANDROID_SUPPORTED_ABIS "${ANDROID_ABI}" __androidAbiIdx )
+if( __androidAbiIdx EQUAL -1 )
+ string( REPLACE ";" "\", \"" PRINTABLE_ANDROID_SUPPORTED_ABIS "${ANDROID_SUPPORTED_ABIS}" )
+ message( FATAL_ERROR "Specified ANDROID_ABI = \"${ANDROID_ABI}\" is not supported by this cmake toolchain or your NDK/toolchain.
+ Supported values are: \"${PRINTABLE_ANDROID_SUPPORTED_ABIS}\"
+ " )
+endif()
+unset( __androidAbiIdx )
+
+# set target ABI options
+if( ANDROID_ABI STREQUAL "x86" )
+ set( X86 true )
+ set( ANDROID_NDK_ABI_NAME "x86" )
+ set( ANDROID_ARCH_NAME "x86" )
+ set( ANDROID_LLVM_TRIPLE "i686-none-linux-android" )
+ set( CMAKE_SYSTEM_PROCESSOR "i686" )
+elseif( ANDROID_ABI STREQUAL "x86_64" )
+ set( X86 true )
+ set( X86_64 true )
+ set( ANDROID_NDK_ABI_NAME "x86_64" )
+ set( ANDROID_ARCH_NAME "x86_64" )
+ set( CMAKE_SYSTEM_PROCESSOR "x86_64" )
+ set( ANDROID_LLVM_TRIPLE "x86_64-none-linux-android" )
+elseif( ANDROID_ABI STREQUAL "mips64" )
+ set( MIPS64 true )
+ set( ANDROID_NDK_ABI_NAME "mips64" )
+ set( ANDROID_ARCH_NAME "mips64" )
+ set( ANDROID_LLVM_TRIPLE "mips64el-none-linux-android" )
+ set( CMAKE_SYSTEM_PROCESSOR "mips64" )
+elseif( ANDROID_ABI STREQUAL "mips" )
+ set( MIPS true )
+ set( ANDROID_NDK_ABI_NAME "mips" )
+ set( ANDROID_ARCH_NAME "mips" )
+ set( ANDROID_LLVM_TRIPLE "mipsel-none-linux-android" )
+ set( CMAKE_SYSTEM_PROCESSOR "mips" )
+elseif( ANDROID_ABI STREQUAL "arm64-v8a" )
+ set( ARM64_V8A true )
+ set( ANDROID_NDK_ABI_NAME "arm64-v8a" )
+ set( ANDROID_ARCH_NAME "arm64" )
+ set( ANDROID_LLVM_TRIPLE "aarch64-none-linux-android" )
+ set( CMAKE_SYSTEM_PROCESSOR "aarch64" )
+ set( VFPV3 true )
+ set( NEON true )
+elseif( ANDROID_ABI STREQUAL "armeabi" )
+ set( ARMEABI true )
+ set( ANDROID_NDK_ABI_NAME "armeabi" )
+ set( ANDROID_ARCH_NAME "arm" )
+ set( ANDROID_LLVM_TRIPLE "armv5te-none-linux-androideabi" )
+ set( CMAKE_SYSTEM_PROCESSOR "armv5te" )
+elseif( ANDROID_ABI STREQUAL "armeabi-v6 with VFP" )
+ set( ARMEABI_V6 true )
+ set( ANDROID_NDK_ABI_NAME "armeabi" )
+ set( ANDROID_ARCH_NAME "arm" )
+ set( ANDROID_LLVM_TRIPLE "armv5te-none-linux-androideabi" )
+ set( CMAKE_SYSTEM_PROCESSOR "armv6" )
+ # need always fallback to older platform
+ set( ARMEABI true )
+elseif( ANDROID_ABI STREQUAL "armeabi-v7a")
+ set( ARMEABI_V7A true )
+ set( ANDROID_NDK_ABI_NAME "armeabi-v7a" )
+ set( ANDROID_ARCH_NAME "arm" )
+ set( ANDROID_LLVM_TRIPLE "armv7-none-linux-androideabi" )
+ set( CMAKE_SYSTEM_PROCESSOR "armv7-a" )
+elseif( ANDROID_ABI STREQUAL "armeabi-v7a with VFPV3" )
+ set( ARMEABI_V7A true )
+ set( ANDROID_NDK_ABI_NAME "armeabi-v7a" )
+ set( ANDROID_ARCH_NAME "arm" )
+ set( ANDROID_LLVM_TRIPLE "armv7-none-linux-androideabi" )
+ set( CMAKE_SYSTEM_PROCESSOR "armv7-a" )
+ set( VFPV3 true )
+elseif( ANDROID_ABI STREQUAL "armeabi-v7a with NEON" )
+ set( ARMEABI_V7A true )
+ set( ANDROID_NDK_ABI_NAME "armeabi-v7a" )
+ set( ANDROID_ARCH_NAME "arm" )
+ set( ANDROID_LLVM_TRIPLE "armv7-none-linux-androideabi" )
+ set( CMAKE_SYSTEM_PROCESSOR "armv7-a" )
+ set( VFPV3 true )
+ set( NEON true )
+else()
+ message( SEND_ERROR "Unknown ANDROID_ABI=\"${ANDROID_ABI}\" is specified." )
+endif()
+
+if( CMAKE_BINARY_DIR AND EXISTS "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeSystem.cmake" )
+ # really dirty hack
+ # it is not possible to change CMAKE_SYSTEM_PROCESSOR after the first run...
+ file( APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeSystem.cmake" "SET(CMAKE_SYSTEM_PROCESSOR \"${CMAKE_SYSTEM_PROCESSOR}\")\n" )
+endif()
+
+if( ANDROID_ARCH_NAME STREQUAL "arm" AND NOT ARMEABI_V6 )
+ __INIT_VARIABLE( ANDROID_FORCE_ARM_BUILD VALUES OFF )
+ set( ANDROID_FORCE_ARM_BUILD ${ANDROID_FORCE_ARM_BUILD} CACHE BOOL "Use 32-bit ARM instructions instead of Thumb-1" FORCE )
+ mark_as_advanced( ANDROID_FORCE_ARM_BUILD )
+else()
+ unset( ANDROID_FORCE_ARM_BUILD CACHE )
+endif()
+
+# choose toolchain
+if( ANDROID_TOOLCHAIN_NAME )
+ list( FIND __availableToolchains "${ANDROID_TOOLCHAIN_NAME}" __toolchainIdx )
+ if( __toolchainIdx EQUAL -1 )
+ list( SORT __availableToolchains )
+ string( REPLACE ";" "\n * " toolchains_list "${__availableToolchains}" )
+ set( toolchains_list " * ${toolchains_list}")
+ message( FATAL_ERROR "Specified toolchain \"${ANDROID_TOOLCHAIN_NAME}\" is missing in your NDK or broken. Please verify that your NDK is working or select another compiler toolchain.
+To configure the toolchain set CMake variable ANDROID_TOOLCHAIN_NAME to one of the following values:\n${toolchains_list}\n" )
+ endif()
+ list( GET __availableToolchainArchs ${__toolchainIdx} __toolchainArch )
+ if( NOT __toolchainArch STREQUAL ANDROID_ARCH_NAME )
+ message( SEND_ERROR "Selected toolchain \"${ANDROID_TOOLCHAIN_NAME}\" is not able to compile binaries for the \"${ANDROID_ARCH_NAME}\" platform." )
+ endif()
+else()
+ set( __toolchainIdx -1 )
+ set( __applicableToolchains "" )
+ set( __toolchainMaxVersion "0.0.0" )
+ list( LENGTH __availableToolchains __availableToolchainsCount )
+ math( EXPR __availableToolchainsCount "${__availableToolchainsCount}-1" )
+ foreach( __idx RANGE ${__availableToolchainsCount} )
+ list( GET __availableToolchainArchs ${__idx} __toolchainArch )
+ if( __toolchainArch STREQUAL ANDROID_ARCH_NAME )
+ list( GET __availableToolchainCompilerVersions ${__idx} __toolchainVersion )
+ string( REPLACE "x" "99" __toolchainVersion "${__toolchainVersion}")
+ if( __toolchainVersion VERSION_GREATER __toolchainMaxVersion )
+ set( __toolchainMaxVersion "${__toolchainVersion}" )
+ set( __toolchainIdx ${__idx} )
+ endif()
+ endif()
+ endforeach()
+ unset( __availableToolchainsCount )
+ unset( __toolchainMaxVersion )
+ unset( __toolchainVersion )
+endif()
+unset( __toolchainArch )
+if( __toolchainIdx EQUAL -1 )
+ message( FATAL_ERROR "No one of available compiler toolchains is able to compile for ${ANDROID_ARCH_NAME} platform." )
+endif()
+list( GET __availableToolchains ${__toolchainIdx} ANDROID_TOOLCHAIN_NAME )
+list( GET __availableToolchainMachines ${__toolchainIdx} ANDROID_TOOLCHAIN_MACHINE_NAME )
+list( GET __availableToolchainCompilerVersions ${__toolchainIdx} ANDROID_COMPILER_VERSION )
+
+unset( __toolchainIdx )
+unset( __availableToolchains )
+unset( __availableToolchainMachines )
+unset( __availableToolchainArchs )
+unset( __availableToolchainCompilerVersions )
+
+# choose native API level
+__INIT_VARIABLE( ANDROID_NATIVE_API_LEVEL ENV_ANDROID_NATIVE_API_LEVEL ANDROID_API_LEVEL ENV_ANDROID_API_LEVEL ANDROID_STANDALONE_TOOLCHAIN_API_LEVEL ANDROID_DEFAULT_NDK_API_LEVEL_${ANDROID_ARCH_NAME} ANDROID_DEFAULT_NDK_API_LEVEL )
+string( REPLACE "android-" "" ANDROID_NATIVE_API_LEVEL "${ANDROID_NATIVE_API_LEVEL}" )
+string( STRIP "${ANDROID_NATIVE_API_LEVEL}" ANDROID_NATIVE_API_LEVEL )
+# adjust API level
+set( __real_api_level ${ANDROID_DEFAULT_NDK_API_LEVEL_${ANDROID_ARCH_NAME}} )
+foreach( __level ${ANDROID_SUPPORTED_NATIVE_API_LEVELS} )
+ if( (__level LESS ANDROID_NATIVE_API_LEVEL OR __level STREQUAL ANDROID_NATIVE_API_LEVEL) AND NOT __level LESS __real_api_level )
+ set( __real_api_level ${__level} )
+ endif()
+endforeach()
+if( __real_api_level AND NOT ANDROID_NATIVE_API_LEVEL STREQUAL __real_api_level )
+ message( STATUS "Adjusting Android API level 'android-${ANDROID_NATIVE_API_LEVEL}' to 'android-${__real_api_level}'")
+ set( ANDROID_NATIVE_API_LEVEL ${__real_api_level} )
+endif()
+unset(__real_api_level)
+# validate
+list( FIND ANDROID_SUPPORTED_NATIVE_API_LEVELS "${ANDROID_NATIVE_API_LEVEL}" __levelIdx )
+if( __levelIdx EQUAL -1 )
+ message( SEND_ERROR "Specified Android native API level 'android-${ANDROID_NATIVE_API_LEVEL}' is not supported by your NDK/toolchain." )
+else()
+ if( BUILD_WITH_ANDROID_NDK )
+ __DETECT_NATIVE_API_LEVEL( __realApiLevel "${ANDROID_NDK}/platforms/android-${ANDROID_NATIVE_API_LEVEL}/arch-${ANDROID_ARCH_NAME}/usr/include/android/api-level.h" )
+ if( NOT __realApiLevel EQUAL ANDROID_NATIVE_API_LEVEL AND NOT __realApiLevel GREATER 9000 )
+ message( SEND_ERROR "Specified Android API level (${ANDROID_NATIVE_API_LEVEL}) does not match to the level found (${__realApiLevel}). Probably your copy of NDK is broken." )
+ endif()
+ unset( __realApiLevel )
+ endif()
+ set( ANDROID_NATIVE_API_LEVEL "${ANDROID_NATIVE_API_LEVEL}" CACHE STRING "Android API level for native code" FORCE )
+ set( CMAKE_ANDROID_API ${ANDROID_NATIVE_API_LEVEL} )
+ if( CMAKE_VERSION VERSION_GREATER "2.8" )
+ list( SORT ANDROID_SUPPORTED_NATIVE_API_LEVELS )
+ set_property( CACHE ANDROID_NATIVE_API_LEVEL PROPERTY STRINGS ${ANDROID_SUPPORTED_NATIVE_API_LEVELS} )
+ endif()
+endif()
+unset( __levelIdx )
+
+
+# remember target ABI
+set( ANDROID_ABI "${ANDROID_ABI}" CACHE STRING "The target ABI for Android. If arm, then armeabi-v7a is recommended for hardware floating point." FORCE )
+if( CMAKE_VERSION VERSION_GREATER "2.8" )
+ list( SORT ANDROID_SUPPORTED_ABIS_${ANDROID_ARCH_NAME} )
+ set_property( CACHE ANDROID_ABI PROPERTY STRINGS ${ANDROID_SUPPORTED_ABIS_${ANDROID_ARCH_NAME}} )
+endif()
+
+
+# runtime choice (STL, rtti, exceptions)
+if( NOT ANDROID_STL )
+ set( ANDROID_STL gnustl_static )
+endif()
+set( ANDROID_STL "${ANDROID_STL}" CACHE STRING "C++ runtime" )
+set( ANDROID_STL_FORCE_FEATURES ON CACHE BOOL "automatically configure rtti and exceptions support based on C++ runtime" )
+mark_as_advanced( ANDROID_STL ANDROID_STL_FORCE_FEATURES )
+
+if( BUILD_WITH_ANDROID_NDK )
+ if( NOT "${ANDROID_STL}" MATCHES "^(none|system|system_re|gabi\\+\\+_static|gabi\\+\\+_shared|stlport_static|stlport_shared|gnustl_static|gnustl_shared)$")
+ message( FATAL_ERROR "ANDROID_STL is set to invalid value \"${ANDROID_STL}\".
+The possible values are:
+ none -> Do not configure the runtime.
+ system -> Use the default minimal system C++ runtime library.
+ system_re -> Same as system but with rtti and exceptions.
+ gabi++_static -> Use the GAbi++ runtime as a static library.
+ gabi++_shared -> Use the GAbi++ runtime as a shared library.
+ stlport_static -> Use the STLport runtime as a static library.
+ stlport_shared -> Use the STLport runtime as a shared library.
+ gnustl_static -> (default) Use the GNU STL as a static library.
+ gnustl_shared -> Use the GNU STL as a shared library.
+" )
+ endif()
+elseif( BUILD_WITH_STANDALONE_TOOLCHAIN )
+ if( NOT "${ANDROID_STL}" MATCHES "^(none|gnustl_static|gnustl_shared)$")
+ message( FATAL_ERROR "ANDROID_STL is set to invalid value \"${ANDROID_STL}\".
+The possible values are:
+ none -> Do not configure the runtime.
+ gnustl_static -> (default) Use the GNU STL as a static library.
+ gnustl_shared -> Use the GNU STL as a shared library.
+" )
+ endif()
+endif()
+
+unset( ANDROID_RTTI )
+unset( ANDROID_EXCEPTIONS )
+unset( ANDROID_STL_INCLUDE_DIRS )
+unset( __libstl )
+unset( __libsupcxx )
+
+if( NOT _CMAKE_IN_TRY_COMPILE AND ANDROID_NDK_RELEASE STREQUAL "r7b" AND ARMEABI_V7A AND NOT VFPV3 AND ANDROID_STL MATCHES "gnustl" )
+ message( WARNING "The GNU STL armeabi-v7a binaries from NDK r7b can crash non-NEON devices. The files provided with NDK r7b were not configured properly, resulting in crashes on Tegra2-based devices and others when trying to use certain floating-point functions (e.g., cosf, sinf, expf).
+You are strongly recommended to switch to another NDK release.
+" )
+endif()
+
+if( NOT _CMAKE_IN_TRY_COMPILE AND X86 AND ANDROID_STL MATCHES "gnustl" AND ANDROID_NDK_RELEASE STREQUAL "r6" )
+ message( WARNING "The x86 system header file from NDK r6 has incorrect definition for ptrdiff_t. You are recommended to upgrade to a newer NDK release or manually patch the header:
+See https://android.googlesource.com/platform/development.git f907f4f9d4e56ccc8093df6fee54454b8bcab6c2
+ diff --git a/ndk/platforms/android-9/arch-x86/include/machine/_types.h b/ndk/platforms/android-9/arch-x86/include/machine/_types.h
+ index 5e28c64..65892a1 100644
+ --- a/ndk/platforms/android-9/arch-x86/include/machine/_types.h
+ +++ b/ndk/platforms/android-9/arch-x86/include/machine/_types.h
+ @@ -51,7 +51,11 @@ typedef long int ssize_t;
+ #endif
+ #ifndef _PTRDIFF_T
+ #define _PTRDIFF_T
+ -typedef long ptrdiff_t;
+ +# ifdef __ANDROID__
+ + typedef int ptrdiff_t;
+ +# else
+ + typedef long ptrdiff_t;
+ +# endif
+ #endif
+" )
+endif()
+
+
+# setup paths and STL for standalone toolchain
+if( BUILD_WITH_STANDALONE_TOOLCHAIN )
+ set( ANDROID_TOOLCHAIN_ROOT "${ANDROID_STANDALONE_TOOLCHAIN}" )
+ set( ANDROID_CLANG_TOOLCHAIN_ROOT "${ANDROID_STANDALONE_TOOLCHAIN}" )
+ set( ANDROID_SYSROOT "${ANDROID_STANDALONE_TOOLCHAIN}/sysroot" )
+
+ if( NOT ANDROID_STL STREQUAL "none" )
+ set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_STANDALONE_TOOLCHAIN}/include/c++/${ANDROID_COMPILER_VERSION}" )
+ if( NOT EXISTS "${ANDROID_STL_INCLUDE_DIRS}" )
+ # old location ( pre r8c )
+ set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/include/c++/${ANDROID_COMPILER_VERSION}" )
+ endif()
+ if( ARMEABI_V7A AND EXISTS "${ANDROID_STL_INCLUDE_DIRS}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/${CMAKE_SYSTEM_PROCESSOR}/bits" )
+ list( APPEND ANDROID_STL_INCLUDE_DIRS "${ANDROID_STL_INCLUDE_DIRS}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/${CMAKE_SYSTEM_PROCESSOR}" )
+ elseif( ARMEABI AND NOT ANDROID_FORCE_ARM_BUILD AND EXISTS "${ANDROID_STL_INCLUDE_DIRS}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/thumb/bits" )
+ list( APPEND ANDROID_STL_INCLUDE_DIRS "${ANDROID_STL_INCLUDE_DIRS}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/thumb" )
+ else()
+ list( APPEND ANDROID_STL_INCLUDE_DIRS "${ANDROID_STL_INCLUDE_DIRS}/${ANDROID_TOOLCHAIN_MACHINE_NAME}" )
+ endif()
+ # always search static GNU STL to get the location of libsupc++.a
+ if( ARMEABI_V7A AND NOT ANDROID_FORCE_ARM_BUILD AND EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/thumb/libstdc++.a" )
+ set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/thumb" )
+ elseif( ARMEABI_V7A AND EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/libstdc++.a" )
+ set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}" )
+ elseif( ARMEABI AND NOT ANDROID_FORCE_ARM_BUILD AND EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/thumb/libstdc++.a" )
+ set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/thumb" )
+ elseif( EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/libstdc++.a" )
+ set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib" )
+ endif()
+ if( __libstl )
+ set( __libsupcxx "${__libstl}/libsupc++.a" )
+ set( __libstl "${__libstl}/libstdc++.a" )
+ endif()
+ if( NOT EXISTS "${__libsupcxx}" )
+ message( FATAL_ERROR "The required libstdsupc++.a is missing in your standalone toolchain.
+ Usually it happens because of bug in make-standalone-toolchain.sh script from NDK r7, r7b and r7c.
+ You need to either upgrade to newer NDK or manually copy
+ $ANDROID_NDK/sources/cxx-stl/gnu-libstdc++/libs/${ANDROID_NDK_ABI_NAME}/libsupc++.a
+ to
+ ${__libsupcxx}
+ " )
+ endif()
+ if( ANDROID_STL STREQUAL "gnustl_shared" )
+ if( ARMEABI_V7A AND EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/libgnustl_shared.so" )
+ set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/libgnustl_shared.so" )
+ elseif( ARMEABI AND NOT ANDROID_FORCE_ARM_BUILD AND EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/thumb/libgnustl_shared.so" )
+ set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/thumb/libgnustl_shared.so" )
+ elseif( EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/libgnustl_shared.so" )
+ set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/libgnustl_shared.so" )
+ endif()
+ endif()
+ endif()
+endif()
+
+# clang
+if( "${ANDROID_TOOLCHAIN_NAME}" STREQUAL "standalone-clang" )
+ set( ANDROID_COMPILER_IS_CLANG 1 )
+ execute_process( COMMAND "${ANDROID_CLANG_TOOLCHAIN_ROOT}/bin/clang${TOOL_OS_SUFFIX}" --version OUTPUT_VARIABLE ANDROID_CLANG_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE )
+ string( REGEX MATCH "[0-9]+[.][0-9]+" ANDROID_CLANG_VERSION "${ANDROID_CLANG_VERSION}")
+elseif( "${ANDROID_TOOLCHAIN_NAME}" MATCHES "-clang3[.][0-9]?$" )
+ string( REGEX MATCH "3[.][0-9]$" ANDROID_CLANG_VERSION "${ANDROID_TOOLCHAIN_NAME}")
+ string( REGEX REPLACE "-clang${ANDROID_CLANG_VERSION}$" "-${ANDROID_COMPILER_VERSION}" ANDROID_GCC_TOOLCHAIN_NAME "${ANDROID_TOOLCHAIN_NAME}" )
+ if( NOT EXISTS "${ANDROID_NDK_TOOLCHAINS_PATH}/llvm-${ANDROID_CLANG_VERSION}${ANDROID_NDK_TOOLCHAINS_SUBPATH}/bin/clang${TOOL_OS_SUFFIX}" )
+ message( FATAL_ERROR "Could not find the Clang compiler driver" )
+ endif()
+ set( ANDROID_COMPILER_IS_CLANG 1 )
+ set( ANDROID_CLANG_TOOLCHAIN_ROOT "${ANDROID_NDK_TOOLCHAINS_PATH}/llvm-${ANDROID_CLANG_VERSION}${ANDROID_NDK_TOOLCHAINS_SUBPATH}" )
+else()
+ set( ANDROID_GCC_TOOLCHAIN_NAME "${ANDROID_TOOLCHAIN_NAME}" )
+ unset( ANDROID_COMPILER_IS_CLANG CACHE )
+endif()
+
+string( REPLACE "." "" _clang_name "clang${ANDROID_CLANG_VERSION}" )
+if( NOT EXISTS "${ANDROID_CLANG_TOOLCHAIN_ROOT}/bin/${_clang_name}${TOOL_OS_SUFFIX}" )
+ set( _clang_name "clang" )
+endif()
+
+
+# setup paths and STL for NDK
+if( BUILD_WITH_ANDROID_NDK )
+ set( ANDROID_TOOLCHAIN_ROOT "${ANDROID_NDK_TOOLCHAINS_PATH}/${ANDROID_GCC_TOOLCHAIN_NAME}${ANDROID_NDK_TOOLCHAINS_SUBPATH}" )
+ set( ANDROID_SYSROOT "${ANDROID_NDK}/platforms/android-${ANDROID_NATIVE_API_LEVEL}/arch-${ANDROID_ARCH_NAME}" )
+
+ if( ANDROID_STL STREQUAL "none" )
+ # do nothing
+ elseif( ANDROID_STL STREQUAL "system" )
+ set( ANDROID_RTTI OFF )
+ set( ANDROID_EXCEPTIONS OFF )
+ set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_NDK}/sources/cxx-stl/system/include" )
+ elseif( ANDROID_STL STREQUAL "system_re" )
+ set( ANDROID_RTTI ON )
+ set( ANDROID_EXCEPTIONS ON )
+ set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_NDK}/sources/cxx-stl/system/include" )
+ elseif( ANDROID_STL MATCHES "gabi" )
+ if( ANDROID_NDK_RELEASE_NUM LESS 7000 ) # before r7
+ message( FATAL_ERROR "gabi++ is not available in your NDK. You have to upgrade to NDK r7 or newer to use gabi++.")
+ endif()
+ set( ANDROID_RTTI ON )
+ set( ANDROID_EXCEPTIONS OFF )
+ set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_NDK}/sources/cxx-stl/gabi++/include" )
+ set( __libstl "${ANDROID_NDK}/sources/cxx-stl/gabi++/libs/${ANDROID_NDK_ABI_NAME}/libgabi++_static.a" )
+ elseif( ANDROID_STL MATCHES "stlport" )
+ if( NOT ANDROID_NDK_RELEASE_NUM LESS 8004 ) # before r8d
+ set( ANDROID_EXCEPTIONS ON )
+ else()
+ set( ANDROID_EXCEPTIONS OFF )
+ endif()
+ if( ANDROID_NDK_RELEASE_NUM LESS 7000 ) # before r7
+ set( ANDROID_RTTI OFF )
+ else()
+ set( ANDROID_RTTI ON )
+ endif()
+ set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_NDK}/sources/cxx-stl/stlport/stlport" )
+ set( __libstl "${ANDROID_NDK}/sources/cxx-stl/stlport/libs/${ANDROID_NDK_ABI_NAME}/libstlport_static.a" )
+ elseif( ANDROID_STL MATCHES "gnustl" )
+ set( ANDROID_EXCEPTIONS ON )
+ set( ANDROID_RTTI ON )
+ if( EXISTS "${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${ANDROID_COMPILER_VERSION}" )
+ if( ARMEABI_V7A AND ANDROID_COMPILER_VERSION VERSION_EQUAL "4.7" AND ANDROID_NDK_RELEASE STREQUAL "r8d" )
+ # gnustl binary for 4.7 compiler is buggy :(
+ # TODO: look for right fix
+ set( __libstl "${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/4.6" )
+ else()
+ set( __libstl "${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${ANDROID_COMPILER_VERSION}" )
+ endif()
+ else()
+ set( __libstl "${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++" )
+ endif()
+ set( ANDROID_STL_INCLUDE_DIRS "${__libstl}/include" "${__libstl}/libs/${ANDROID_NDK_ABI_NAME}/include" "${__libstl}/include/backward" )
+ if( EXISTS "${__libstl}/libs/${ANDROID_NDK_ABI_NAME}/libgnustl_static.a" )
+ set( __libstl "${__libstl}/libs/${ANDROID_NDK_ABI_NAME}/libgnustl_static.a" )
+ else()
+ set( __libstl "${__libstl}/libs/${ANDROID_NDK_ABI_NAME}/libstdc++.a" )
+ endif()
+ else()
+ message( FATAL_ERROR "Unknown runtime: ${ANDROID_STL}" )
+ endif()
+ # find libsupc++.a - rtti & exceptions
+ if( ANDROID_STL STREQUAL "system_re" OR ANDROID_STL MATCHES "gnustl" )
+ set( __libsupcxx "${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${ANDROID_COMPILER_VERSION}/libs/${ANDROID_NDK_ABI_NAME}/libsupc++.a" ) # r8b or newer
+ if( NOT EXISTS "${__libsupcxx}" )
+ set( __libsupcxx "${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/libs/${ANDROID_NDK_ABI_NAME}/libsupc++.a" ) # r7-r8
+ endif()
+ if( NOT EXISTS "${__libsupcxx}" ) # before r7
+ if( ARMEABI_V7A )
+ if( ANDROID_FORCE_ARM_BUILD )
+ set( __libsupcxx "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/libsupc++.a" )
+ else()
+ set( __libsupcxx "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/thumb/libsupc++.a" )
+ endif()
+ elseif( ARMEABI AND NOT ANDROID_FORCE_ARM_BUILD )
+ set( __libsupcxx "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/thumb/libsupc++.a" )
+ else()
+ set( __libsupcxx "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/libsupc++.a" )
+ endif()
+ endif()
+ if( NOT EXISTS "${__libsupcxx}")
+ message( ERROR "Could not find libsupc++.a for a chosen platform. Either your NDK is not supported or is broken.")
+ endif()
+ endif()
+endif()
+
+
+# case of shared STL linkage
+if( ANDROID_STL MATCHES "shared" AND DEFINED __libstl )
+ string( REPLACE "_static.a" "_shared.so" __libstl "${__libstl}" )
+ # TODO: check if .so file exists before the renaming
+endif()
+
+
+# ccache support
+__INIT_VARIABLE( _ndk_ccache NDK_CCACHE ENV_NDK_CCACHE )
+if( _ndk_ccache )
+ if( DEFINED NDK_CCACHE AND NOT EXISTS NDK_CCACHE )
+ unset( NDK_CCACHE CACHE )
+ endif()
+ find_program( NDK_CCACHE "${_ndk_ccache}" DOC "The path to ccache binary")
+else()
+ unset( NDK_CCACHE CACHE )
+endif()
+unset( _ndk_ccache )
+
+
+# setup the cross-compiler
+if( NOT CMAKE_C_COMPILER )
+ if( NDK_CCACHE AND NOT ANDROID_SYSROOT MATCHES "[ ;\"]" )
+ set( CMAKE_C_COMPILER "${NDK_CCACHE}" CACHE PATH "ccache as C compiler" )
+ set( CMAKE_CXX_COMPILER "${NDK_CCACHE}" CACHE PATH "ccache as C++ compiler" )
+ if( ANDROID_COMPILER_IS_CLANG )
+ set( CMAKE_C_COMPILER_ARG1 "${ANDROID_CLANG_TOOLCHAIN_ROOT}/bin/${_clang_name}${TOOL_OS_SUFFIX}" CACHE PATH "C compiler")
+ set( CMAKE_CXX_COMPILER_ARG1 "${ANDROID_CLANG_TOOLCHAIN_ROOT}/bin/${_clang_name}++${TOOL_OS_SUFFIX}" CACHE PATH "C++ compiler")
+ else()
+ set( CMAKE_C_COMPILER_ARG1 "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-gcc${TOOL_OS_SUFFIX}" CACHE PATH "C compiler")
+ set( CMAKE_CXX_COMPILER_ARG1 "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-g++${TOOL_OS_SUFFIX}" CACHE PATH "C++ compiler")
+ endif()
+ else()
+ if( ANDROID_COMPILER_IS_CLANG )
+ set( CMAKE_C_COMPILER "${ANDROID_CLANG_TOOLCHAIN_ROOT}/bin/${_clang_name}${TOOL_OS_SUFFIX}" CACHE PATH "C compiler")
+ set( CMAKE_CXX_COMPILER "${ANDROID_CLANG_TOOLCHAIN_ROOT}/bin/${_clang_name}++${TOOL_OS_SUFFIX}" CACHE PATH "C++ compiler")
+ else()
+ set( CMAKE_C_COMPILER "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-gcc${TOOL_OS_SUFFIX}" CACHE PATH "C compiler" )
+ set( CMAKE_CXX_COMPILER "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-g++${TOOL_OS_SUFFIX}" CACHE PATH "C++ compiler" )
+ endif()
+ endif()
+ set( CMAKE_ASM_COMPILER "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-gcc${TOOL_OS_SUFFIX}" CACHE PATH "assembler" )
+ set( CMAKE_STRIP "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-strip${TOOL_OS_SUFFIX}" CACHE PATH "strip" )
+ if( EXISTS "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-gcc-ar${TOOL_OS_SUFFIX}" )
+ # Use gcc-ar if we have it for better LTO support.
+ set( CMAKE_AR "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-gcc-ar${TOOL_OS_SUFFIX}" CACHE PATH "archive" )
+ else()
+ set( CMAKE_AR "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-ar${TOOL_OS_SUFFIX}" CACHE PATH "archive" )
+ endif()
+ set( CMAKE_LINKER "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-ld${TOOL_OS_SUFFIX}" CACHE PATH "linker" )
+ set( CMAKE_NM "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-nm${TOOL_OS_SUFFIX}" CACHE PATH "nm" )
+ set( CMAKE_OBJCOPY "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-objcopy${TOOL_OS_SUFFIX}" CACHE PATH "objcopy" )
+ set( CMAKE_OBJDUMP "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-objdump${TOOL_OS_SUFFIX}" CACHE PATH "objdump" )
+ set( CMAKE_RANLIB "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-ranlib${TOOL_OS_SUFFIX}" CACHE PATH "ranlib" )
+endif()
+
+set( _CMAKE_TOOLCHAIN_PREFIX "${ANDROID_TOOLCHAIN_MACHINE_NAME}-" )
+if( CMAKE_VERSION VERSION_LESS 2.8.5 )
+ set( CMAKE_ASM_COMPILER_ARG1 "-c" )
+endif()
+if( APPLE )
+ find_program( CMAKE_INSTALL_NAME_TOOL NAMES install_name_tool )
+ if( NOT CMAKE_INSTALL_NAME_TOOL )
+ message( FATAL_ERROR "Could not find install_name_tool, please check your installation." )
+ endif()
+ mark_as_advanced( CMAKE_INSTALL_NAME_TOOL )
+endif()
+
+# Force set compilers because standard identification works badly for us
+include( CMakeForceCompiler )
+CMAKE_FORCE_C_COMPILER( "${CMAKE_C_COMPILER}" GNU )
+if( ANDROID_COMPILER_IS_CLANG )
+ set( CMAKE_C_COMPILER_ID Clang )
+endif()
+set( CMAKE_C_PLATFORM_ID Linux )
+if( X86_64 OR MIPS64 OR ARM64_V8A )
+ set( CMAKE_C_SIZEOF_DATA_PTR 8 )
+else()
+ set( CMAKE_C_SIZEOF_DATA_PTR 4 )
+endif()
+set( CMAKE_C_HAS_ISYSROOT 1 )
+set( CMAKE_C_COMPILER_ABI ELF )
+CMAKE_FORCE_CXX_COMPILER( "${CMAKE_CXX_COMPILER}" GNU )
+if( ANDROID_COMPILER_IS_CLANG )
+ set( CMAKE_CXX_COMPILER_ID Clang)
+endif()
+set( CMAKE_CXX_PLATFORM_ID Linux )
+set( CMAKE_CXX_SIZEOF_DATA_PTR ${CMAKE_C_SIZEOF_DATA_PTR} )
+set( CMAKE_CXX_HAS_ISYSROOT 1 )
+set( CMAKE_CXX_COMPILER_ABI ELF )
+set( CMAKE_CXX_SOURCE_FILE_EXTENSIONS cc cp cxx cpp CPP c++ C )
+# force ASM compiler (required for CMake < 2.8.5)
+set( CMAKE_ASM_COMPILER_ID_RUN TRUE )
+set( CMAKE_ASM_COMPILER_ID GNU )
+set( CMAKE_ASM_COMPILER_WORKS TRUE )
+set( CMAKE_ASM_COMPILER_FORCED TRUE )
+set( CMAKE_COMPILER_IS_GNUASM 1)
+set( CMAKE_ASM_SOURCE_FILE_EXTENSIONS s S asm )
+
+foreach( lang C CXX ASM )
+ if( ANDROID_COMPILER_IS_CLANG )
+ set( CMAKE_${lang}_COMPILER_VERSION ${ANDROID_CLANG_VERSION} )
+ else()
+ set( CMAKE_${lang}_COMPILER_VERSION ${ANDROID_COMPILER_VERSION} )
+ endif()
+endforeach()
+
+# flags and definitions
+remove_definitions( -DANDROID )
+add_definitions( -DANDROID )
+
+if( ANDROID_SYSROOT MATCHES "[ ;\"]" )
+ if( CMAKE_HOST_WIN32 )
+ # try to convert path to 8.3 form
+ file( WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/cvt83.cmd" "@echo %~s1" )
+ execute_process( COMMAND "$ENV{ComSpec}" /c "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/cvt83.cmd" "${ANDROID_SYSROOT}"
+ OUTPUT_VARIABLE __path OUTPUT_STRIP_TRAILING_WHITESPACE
+ RESULT_VARIABLE __result ERROR_QUIET )
+ if( __result EQUAL 0 )
+ file( TO_CMAKE_PATH "${__path}" ANDROID_SYSROOT )
+ set( ANDROID_CXX_FLAGS "--sysroot=${ANDROID_SYSROOT}" )
+ else()
+ set( ANDROID_CXX_FLAGS "--sysroot=\"${ANDROID_SYSROOT}\"" )
+ endif()
+ else()
+ set( ANDROID_CXX_FLAGS "'--sysroot=${ANDROID_SYSROOT}'" )
+ endif()
+ if( NOT _CMAKE_IN_TRY_COMPILE )
+ # quotes can break try_compile and compiler identification
+ message(WARNING "Path to your Android NDK (or toolchain) has non-alphanumeric symbols.\nThe build might be broken.\n")
+ endif()
+else()
+ set( ANDROID_CXX_FLAGS "--sysroot=${ANDROID_SYSROOT}" )
+endif()
+
+# NDK flags
+if (ARM64_V8A )
+ set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -funwind-tables" )
+ set( ANDROID_CXX_FLAGS_RELEASE "-fomit-frame-pointer -fstrict-aliasing" )
+ set( ANDROID_CXX_FLAGS_DEBUG "-fno-omit-frame-pointer -fno-strict-aliasing" )
+ if( NOT ANDROID_COMPILER_IS_CLANG )
+ set( ANDROID_CXX_FLAGS_RELEASE "${ANDROID_CXX_FLAGS_RELEASE} -funswitch-loops -finline-limit=300" )
+ endif()
+elseif( ARMEABI OR ARMEABI_V7A)
+ set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -funwind-tables" )
+ if( NOT ANDROID_FORCE_ARM_BUILD AND NOT ARMEABI_V6 )
+ set( ANDROID_CXX_FLAGS_RELEASE "-mthumb -fomit-frame-pointer -fno-strict-aliasing" )
+ set( ANDROID_CXX_FLAGS_DEBUG "-marm -fno-omit-frame-pointer -fno-strict-aliasing" )
+ if( NOT ANDROID_COMPILER_IS_CLANG )
+ set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -finline-limit=64" )
+ endif()
+ else()
+ # always compile ARMEABI_V6 in arm mode; otherwise there is no difference from ARMEABI
+ set( ANDROID_CXX_FLAGS_RELEASE "-marm -fomit-frame-pointer -fstrict-aliasing" )
+ set( ANDROID_CXX_FLAGS_DEBUG "-marm -fno-omit-frame-pointer -fno-strict-aliasing" )
+ if( NOT ANDROID_COMPILER_IS_CLANG )
+ set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -funswitch-loops -finline-limit=300" )
+ endif()
+ endif()
+elseif( X86 OR X86_64 )
+ set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -funwind-tables" )
+ if( NOT ANDROID_COMPILER_IS_CLANG )
+ set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -funswitch-loops -finline-limit=300" )
+ endif()
+ set( ANDROID_CXX_FLAGS_RELEASE "-fomit-frame-pointer -fstrict-aliasing" )
+ set( ANDROID_CXX_FLAGS_DEBUG "-fno-omit-frame-pointer -fno-strict-aliasing" )
+elseif( MIPS OR MIPS64 )
+ set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -fno-strict-aliasing -finline-functions -funwind-tables -fmessage-length=0" )
+ set( ANDROID_CXX_FLAGS_RELEASE "-fomit-frame-pointer" )
+ set( ANDROID_CXX_FLAGS_DEBUG "-fno-omit-frame-pointer" )
+ if( NOT ANDROID_COMPILER_IS_CLANG )
+ set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -fno-inline-functions-called-once -fgcse-after-reload -frerun-cse-after-loop -frename-registers" )
+ set( ANDROID_CXX_FLAGS_RELEASE "${ANDROID_CXX_FLAGS_RELEASE} -funswitch-loops -finline-limit=300" )
+ endif()
+elseif()
+ set( ANDROID_CXX_FLAGS_RELEASE "" )
+ set( ANDROID_CXX_FLAGS_DEBUG "" )
+endif()
+
+set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -fsigned-char" ) # good/necessary when porting desktop libraries
+
+if( NOT X86 AND NOT ANDROID_COMPILER_IS_CLANG )
+ set( ANDROID_CXX_FLAGS "-Wno-psabi ${ANDROID_CXX_FLAGS}" )
+endif()
+
+if( NOT ANDROID_COMPILER_VERSION VERSION_LESS "4.6" )
+ set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -no-canonical-prefixes" ) # see https://android-review.googlesource.com/#/c/47564/
+endif()
+
+# ABI-specific flags
+if( ARMEABI_V7A )
+ set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -march=armv7-a -mfloat-abi=softfp" )
+ if( NEON )
+ set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -mfpu=neon" )
+ elseif( VFPV3 )
+ set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -mfpu=vfpv3" )
+ else()
+ set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -mfpu=vfpv3-d16" )
+ endif()
+elseif( ARMEABI_V6 )
+ set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -march=armv6 -mfloat-abi=softfp -mfpu=vfp" ) # vfp == vfpv2
+elseif( ARMEABI )
+ set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -march=armv5te -mtune=xscale -msoft-float" )
+endif()
+
+if( ANDROID_STL MATCHES "gnustl" AND (EXISTS "${__libstl}" OR EXISTS "${__libsupcxx}") )
+ set( CMAKE_CXX_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>" )
+ set( CMAKE_CXX_CREATE_SHARED_MODULE "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>" )
+ set( CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_C_COMPILER> <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>" )
+else()
+ set( CMAKE_CXX_CREATE_SHARED_LIBRARY "<CMAKE_CXX_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>" )
+ set( CMAKE_CXX_CREATE_SHARED_MODULE "<CMAKE_CXX_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>" )
+ set( CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_CXX_COMPILER> <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>" )
+endif()
+
+# STL
+if( EXISTS "${__libstl}" OR EXISTS "${__libsupcxx}" )
+ if( EXISTS "${__libstl}" )
+ set( CMAKE_CXX_CREATE_SHARED_LIBRARY "${CMAKE_CXX_CREATE_SHARED_LIBRARY} \"${__libstl}\"" )
+ set( CMAKE_CXX_CREATE_SHARED_MODULE "${CMAKE_CXX_CREATE_SHARED_MODULE} \"${__libstl}\"" )
+ set( CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} \"${__libstl}\"" )
+ endif()
+ if( EXISTS "${__libsupcxx}" )
+ set( CMAKE_CXX_CREATE_SHARED_LIBRARY "${CMAKE_CXX_CREATE_SHARED_LIBRARY} \"${__libsupcxx}\"" )
+ set( CMAKE_CXX_CREATE_SHARED_MODULE "${CMAKE_CXX_CREATE_SHARED_MODULE} \"${__libsupcxx}\"" )
+ set( CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} \"${__libsupcxx}\"" )
+ # C objects:
+ set( CMAKE_C_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_C_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>" )
+ set( CMAKE_C_CREATE_SHARED_MODULE "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_C_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>" )
+ set( CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> <FLAGS> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>" )
+ set( CMAKE_C_CREATE_SHARED_LIBRARY "${CMAKE_C_CREATE_SHARED_LIBRARY} \"${__libsupcxx}\"" )
+ set( CMAKE_C_CREATE_SHARED_MODULE "${CMAKE_C_CREATE_SHARED_MODULE} \"${__libsupcxx}\"" )
+ set( CMAKE_C_LINK_EXECUTABLE "${CMAKE_C_LINK_EXECUTABLE} \"${__libsupcxx}\"" )
+ endif()
+ if( ANDROID_STL MATCHES "gnustl" )
+ if( NOT EXISTS "${ANDROID_LIBM_PATH}" )
+ set( ANDROID_LIBM_PATH -lm )
+ endif()
+ set( CMAKE_CXX_CREATE_SHARED_LIBRARY "${CMAKE_CXX_CREATE_SHARED_LIBRARY} ${ANDROID_LIBM_PATH}" )
+ set( CMAKE_CXX_CREATE_SHARED_MODULE "${CMAKE_CXX_CREATE_SHARED_MODULE} ${ANDROID_LIBM_PATH}" )
+ set( CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} ${ANDROID_LIBM_PATH}" )
+ endif()
+endif()
+
+# variables controlling optional build flags
+if( ANDROID_NDK_RELEASE_NUM LESS 7000 ) # before r7
+ # libGLESv2.so in NDK's prior to r7 refers to missing external symbols.
+ # So this flag option is required for all projects using OpenGL from native.
+ __INIT_VARIABLE( ANDROID_SO_UNDEFINED VALUES ON )
+else()
+ __INIT_VARIABLE( ANDROID_SO_UNDEFINED VALUES OFF )
+endif()
+__INIT_VARIABLE( ANDROID_NO_UNDEFINED VALUES ON )
+__INIT_VARIABLE( ANDROID_FUNCTION_LEVEL_LINKING VALUES ON )
+__INIT_VARIABLE( ANDROID_GOLD_LINKER VALUES ON )
+__INIT_VARIABLE( ANDROID_NOEXECSTACK VALUES ON )
+__INIT_VARIABLE( ANDROID_RELRO VALUES ON )
+
+set( ANDROID_NO_UNDEFINED ${ANDROID_NO_UNDEFINED} CACHE BOOL "Show all undefined symbols as linker errors" )
+set( ANDROID_SO_UNDEFINED ${ANDROID_SO_UNDEFINED} CACHE BOOL "Allows or disallows undefined symbols in shared libraries" )
+set( ANDROID_FUNCTION_LEVEL_LINKING ${ANDROID_FUNCTION_LEVEL_LINKING} CACHE BOOL "Put each function in separate section and enable garbage collection of unused input sections at link time" )
+set( ANDROID_GOLD_LINKER ${ANDROID_GOLD_LINKER} CACHE BOOL "Enables gold linker" )
+set( ANDROID_NOEXECSTACK ${ANDROID_NOEXECSTACK} CACHE BOOL "Allows or disallows undefined symbols in shared libraries" )
+set( ANDROID_RELRO ${ANDROID_RELRO} CACHE BOOL "Enables RELRO - a memory corruption mitigation technique" )
+mark_as_advanced( ANDROID_NO_UNDEFINED ANDROID_SO_UNDEFINED ANDROID_FUNCTION_LEVEL_LINKING ANDROID_GOLD_LINKER ANDROID_NOEXECSTACK ANDROID_RELRO )
+
+# linker flags
+set( ANDROID_LINKER_FLAGS "" )
+
+if( ARMEABI_V7A )
+ # this is *required* to use the following linker flags that routes around
+ # a CPU bug in some Cortex-A8 implementations:
+ set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -Wl,--fix-cortex-a8" )
+endif()
+
+if( ANDROID_NO_UNDEFINED )
+ if( MIPS )
+ # there is some sysroot-related problem in mips linker...
+ if( NOT ANDROID_SYSROOT MATCHES "[ ;\"]" )
+ set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -Wl,--no-undefined -Wl,-rpath-link,${ANDROID_SYSROOT}/usr/lib" )
+ endif()
+ else()
+ set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -Wl,--no-undefined" )
+ endif()
+endif()
+
+if( ANDROID_SO_UNDEFINED )
+ set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -Wl,-allow-shlib-undefined" )
+endif()
+
+if( ANDROID_FUNCTION_LEVEL_LINKING )
+ set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -fdata-sections -ffunction-sections" )
+ set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -Wl,--gc-sections" )
+endif()
+
+if( ANDROID_COMPILER_VERSION VERSION_EQUAL "4.6" )
+ if( ANDROID_GOLD_LINKER AND (CMAKE_HOST_UNIX OR ANDROID_NDK_RELEASE_NUM GREATER 8002) AND (ARMEABI OR ARMEABI_V7A OR X86) )
+ set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -fuse-ld=gold" )
+ elseif( ANDROID_NDK_RELEASE_NUM GREATER 8002 ) # after r8b
+ set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -fuse-ld=bfd" )
+ elseif( ANDROID_NDK_RELEASE STREQUAL "r8b" AND ARMEABI AND NOT _CMAKE_IN_TRY_COMPILE )
+ message( WARNING "The default bfd linker from arm GCC 4.6 toolchain can fail with 'unresolvable R_ARM_THM_CALL relocation' error message. See https://code.google.com/p/android/issues/detail?id=35342
+ On Linux and OS X host platform you can workaround this problem using gold linker (default).
+ Rerun cmake with -DANDROID_GOLD_LINKER=ON option in case of problems.
+" )
+ endif()
+endif() # version 4.6
+
+if( ANDROID_NOEXECSTACK )
+ if( ANDROID_COMPILER_IS_CLANG )
+ set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -Xclang -mnoexecstack" )
+ else()
+ set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -Wa,--noexecstack" )
+ endif()
+ set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -Wl,-z,noexecstack" )
+endif()
+
+if( ANDROID_RELRO )
+ set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -Wl,-z,relro -Wl,-z,now" )
+endif()
+
+if( ANDROID_COMPILER_IS_CLANG )
+ set( ANDROID_CXX_FLAGS "-target ${ANDROID_LLVM_TRIPLE} -Qunused-arguments ${ANDROID_CXX_FLAGS}" )
+ if( BUILD_WITH_ANDROID_NDK )
+ set( ANDROID_CXX_FLAGS "-gcc-toolchain ${ANDROID_TOOLCHAIN_ROOT} ${ANDROID_CXX_FLAGS}" )
+ endif()
+endif()
+
+# cache flags
+set( CMAKE_CXX_FLAGS "" CACHE STRING "c++ flags" )
+set( CMAKE_C_FLAGS "" CACHE STRING "c flags" )
+set( CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "c++ Release flags" )
+set( CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "c Release flags" )
+set( CMAKE_CXX_FLAGS_DEBUG "-O0 -g -DDEBUG -D_DEBUG" CACHE STRING "c++ Debug flags" )
+set( CMAKE_C_FLAGS_DEBUG "-O0 -g -DDEBUG -D_DEBUG" CACHE STRING "c Debug flags" )
+set( CMAKE_SHARED_LINKER_FLAGS "" CACHE STRING "shared linker flags" )
+set( CMAKE_MODULE_LINKER_FLAGS "" CACHE STRING "module linker flags" )
+set( CMAKE_EXE_LINKER_FLAGS "-Wl,-z,nocopyreloc" CACHE STRING "executable linker flags" )
+
+# put flags to cache (for debug purpose only)
+set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS}" CACHE INTERNAL "Android specific c/c++ flags" )
+set( ANDROID_CXX_FLAGS_RELEASE "${ANDROID_CXX_FLAGS_RELEASE}" CACHE INTERNAL "Android specific c/c++ Release flags" )
+set( ANDROID_CXX_FLAGS_DEBUG "${ANDROID_CXX_FLAGS_DEBUG}" CACHE INTERNAL "Android specific c/c++ Debug flags" )
+set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS}" CACHE INTERNAL "Android specific c/c++ linker flags" )
+
+# finish flags
+set( CMAKE_CXX_FLAGS "${ANDROID_CXX_FLAGS} ${CMAKE_CXX_FLAGS}" )
+set( CMAKE_C_FLAGS "${ANDROID_CXX_FLAGS} ${CMAKE_C_FLAGS}" )
+set( CMAKE_CXX_FLAGS_RELEASE "${ANDROID_CXX_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_RELEASE}" )
+set( CMAKE_C_FLAGS_RELEASE "${ANDROID_CXX_FLAGS_RELEASE} ${CMAKE_C_FLAGS_RELEASE}" )
+set( CMAKE_CXX_FLAGS_DEBUG "${ANDROID_CXX_FLAGS_DEBUG} ${CMAKE_CXX_FLAGS_DEBUG}" )
+set( CMAKE_C_FLAGS_DEBUG "${ANDROID_CXX_FLAGS_DEBUG} ${CMAKE_C_FLAGS_DEBUG}" )
+set( CMAKE_SHARED_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS}" )
+set( CMAKE_MODULE_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} ${CMAKE_MODULE_LINKER_FLAGS}" )
+set( CMAKE_EXE_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}" )
+
+if( MIPS AND BUILD_WITH_ANDROID_NDK AND ANDROID_NDK_RELEASE STREQUAL "r8" )
+ set( CMAKE_SHARED_LINKER_FLAGS "-Wl,-T,${ANDROID_NDK_TOOLCHAINS_PATH}/${ANDROID_GCC_TOOLCHAIN_NAME}/mipself.xsc ${CMAKE_SHARED_LINKER_FLAGS}" )
+ set( CMAKE_MODULE_LINKER_FLAGS "-Wl,-T,${ANDROID_NDK_TOOLCHAINS_PATH}/${ANDROID_GCC_TOOLCHAIN_NAME}/mipself.xsc ${CMAKE_MODULE_LINKER_FLAGS}" )
+ set( CMAKE_EXE_LINKER_FLAGS "-Wl,-T,${ANDROID_NDK_TOOLCHAINS_PATH}/${ANDROID_GCC_TOOLCHAIN_NAME}/mipself.x ${CMAKE_EXE_LINKER_FLAGS}" )
+endif()
+
+# pie/pic
+if( NOT (ANDROID_NATIVE_API_LEVEL LESS 16) AND (NOT DEFINED ANDROID_APP_PIE OR ANDROID_APP_PIE) AND (CMAKE_VERSION VERSION_GREATER 2.8.8) )
+ set( CMAKE_POSITION_INDEPENDENT_CODE TRUE )
+ set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fPIE -pie")
+else()
+ set( CMAKE_POSITION_INDEPENDENT_CODE FALSE )
+ set( CMAKE_CXX_FLAGS "-fpic ${CMAKE_CXX_FLAGS}" )
+ set( CMAKE_C_FLAGS "-fpic ${CMAKE_C_FLAGS}" )
+endif()
+
+# configure rtti
+if( DEFINED ANDROID_RTTI AND ANDROID_STL_FORCE_FEATURES )
+ if( ANDROID_RTTI )
+ set( CMAKE_CXX_FLAGS "-frtti ${CMAKE_CXX_FLAGS}" )
+ else()
+ set( CMAKE_CXX_FLAGS "-fno-rtti ${CMAKE_CXX_FLAGS}" )
+ endif()
+endif()
+
+# configure exceptios
+if( DEFINED ANDROID_EXCEPTIONS AND ANDROID_STL_FORCE_FEATURES )
+ if( ANDROID_EXCEPTIONS )
+ set( CMAKE_CXX_FLAGS "-fexceptions ${CMAKE_CXX_FLAGS}" )
+ set( CMAKE_C_FLAGS "-fexceptions ${CMAKE_C_FLAGS}" )
+ else()
+ set( CMAKE_CXX_FLAGS "-fno-exceptions ${CMAKE_CXX_FLAGS}" )
+ set( CMAKE_C_FLAGS "-fno-exceptions ${CMAKE_C_FLAGS}" )
+ endif()
+endif()
+
+# global includes and link directories
+include_directories( SYSTEM "${ANDROID_SYSROOT}/usr/include" ${ANDROID_STL_INCLUDE_DIRS} )
+get_filename_component(__android_install_path "${CMAKE_INSTALL_PREFIX}/libs/${ANDROID_NDK_ABI_NAME}" ABSOLUTE) # avoid CMP0015 policy warning
+link_directories( "${__android_install_path}" )
+
+# detect if need link crtbegin_so.o explicitly
+if( NOT DEFINED ANDROID_EXPLICIT_CRT_LINK )
+ set( __cmd "${CMAKE_CXX_CREATE_SHARED_LIBRARY}" )
+ string( REPLACE "<CMAKE_CXX_COMPILER>" "${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1}" __cmd "${__cmd}" )
+ string( REPLACE "<CMAKE_C_COMPILER>" "${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_ARG1}" __cmd "${__cmd}" )
+ string( REPLACE "<CMAKE_SHARED_LIBRARY_CXX_FLAGS>" "${CMAKE_CXX_FLAGS}" __cmd "${__cmd}" )
+ string( REPLACE "<LANGUAGE_COMPILE_FLAGS>" "" __cmd "${__cmd}" )
+ string( REPLACE "<LINK_FLAGS>" "${CMAKE_SHARED_LINKER_FLAGS}" __cmd "${__cmd}" )
+ string( REPLACE "<CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS>" "-shared" __cmd "${__cmd}" )
+ string( REPLACE "<CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG>" "" __cmd "${__cmd}" )
+ string( REPLACE "<TARGET_SONAME>" "" __cmd "${__cmd}" )
+ string( REPLACE "<TARGET>" "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/toolchain_crtlink_test.so" __cmd "${__cmd}" )
+ string( REPLACE "<OBJECTS>" "\"${ANDROID_SYSROOT}/usr/lib/crtbegin_so.o\"" __cmd "${__cmd}" )
+ string( REPLACE "<LINK_LIBRARIES>" "" __cmd "${__cmd}" )
+ separate_arguments( __cmd )
+ foreach( __var ANDROID_NDK ANDROID_NDK_TOOLCHAINS_PATH ANDROID_STANDALONE_TOOLCHAIN )
+ if( ${__var} )
+ set( __tmp "${${__var}}" )
+ separate_arguments( __tmp )
+ string( REPLACE "${__tmp}" "${${__var}}" __cmd "${__cmd}")
+ endif()
+ endforeach()
+ string( REPLACE "'" "" __cmd "${__cmd}" )
+ string( REPLACE "\"" "" __cmd "${__cmd}" )
+ execute_process( COMMAND ${__cmd} RESULT_VARIABLE __cmd_result OUTPUT_QUIET ERROR_QUIET )
+ if( __cmd_result EQUAL 0 )
+ set( ANDROID_EXPLICIT_CRT_LINK ON )
+ else()
+ set( ANDROID_EXPLICIT_CRT_LINK OFF )
+ endif()
+endif()
+
+if( ANDROID_EXPLICIT_CRT_LINK )
+ set( CMAKE_CXX_CREATE_SHARED_LIBRARY "${CMAKE_CXX_CREATE_SHARED_LIBRARY} \"${ANDROID_SYSROOT}/usr/lib/crtbegin_so.o\"" )
+ set( CMAKE_CXX_CREATE_SHARED_MODULE "${CMAKE_CXX_CREATE_SHARED_MODULE} \"${ANDROID_SYSROOT}/usr/lib/crtbegin_so.o\"" )
+endif()
+
+# setup output directories
+set( CMAKE_INSTALL_PREFIX "${ANDROID_TOOLCHAIN_ROOT}/user" CACHE STRING "path for installing" )
+
+if( DEFINED LIBRARY_OUTPUT_PATH_ROOT
+ OR EXISTS "${CMAKE_SOURCE_DIR}/AndroidManifest.xml"
+ OR (EXISTS "${CMAKE_SOURCE_DIR}/../AndroidManifest.xml" AND EXISTS "${CMAKE_SOURCE_DIR}/../jni/") )
+ set( LIBRARY_OUTPUT_PATH_ROOT ${CMAKE_SOURCE_DIR} CACHE PATH "Root for binaries output, set this to change where Android libs are installed to" )
+ if( NOT _CMAKE_IN_TRY_COMPILE )
+ if( EXISTS "${CMAKE_SOURCE_DIR}/jni/CMakeLists.txt" )
+ set( EXECUTABLE_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH_ROOT}/bin/${ANDROID_NDK_ABI_NAME}" CACHE PATH "Output directory for applications" )
+ else()
+ set( EXECUTABLE_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH_ROOT}/bin" CACHE PATH "Output directory for applications" )
+ endif()
+ set( LIBRARY_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH_ROOT}/libs/${ANDROID_NDK_ABI_NAME}" CACHE PATH "Output directory for Android libs" )
+ endif()
+endif()
+
+# copy shaed stl library to build directory
+if( NOT _CMAKE_IN_TRY_COMPILE AND __libstl MATCHES "[.]so$" AND DEFINED LIBRARY_OUTPUT_PATH )
+ get_filename_component( __libstlname "${__libstl}" NAME )
+ execute_process( COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${__libstl}" "${LIBRARY_OUTPUT_PATH}/${__libstlname}" RESULT_VARIABLE __fileCopyProcess )
+ if( NOT __fileCopyProcess EQUAL 0 OR NOT EXISTS "${LIBRARY_OUTPUT_PATH}/${__libstlname}")
+ message( SEND_ERROR "Failed copying of ${__libstl} to the ${LIBRARY_OUTPUT_PATH}/${__libstlname}" )
+ endif()
+ unset( __fileCopyProcess )
+ unset( __libstlname )
+endif()
+
+
+# set these global flags for cmake client scripts to change behavior
+set( ANDROID True )
+set( BUILD_ANDROID True )
+
+# where is the target environment
+set( CMAKE_FIND_ROOT_PATH "${ANDROID_TOOLCHAIN_ROOT}/bin" "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}" "${ANDROID_SYSROOT}" "${CMAKE_INSTALL_PREFIX}" "${CMAKE_INSTALL_PREFIX}/share" )
+
+# only search for libraries and includes in the ndk toolchain
+set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )
+set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
+set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
+
+
+# macro to find packages on the host OS
+macro( find_host_package )
+ set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER )
+ set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER )
+ set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER )
+ if( CMAKE_HOST_WIN32 )
+ SET( WIN32 1 )
+ SET( UNIX )
+ elseif( CMAKE_HOST_APPLE )
+ SET( APPLE 1 )
+ SET( UNIX )
+ endif()
+ find_package( ${ARGN} )
+ SET( WIN32 )
+ SET( APPLE )
+ SET( UNIX 1 )
+ set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )
+ set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
+ set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
+endmacro()
+
+
+# macro to find programs on the host OS
+macro( find_host_program )
+ set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER )
+ set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER )
+ set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER )
+ if( CMAKE_HOST_WIN32 )
+ SET( WIN32 1 )
+ SET( UNIX )
+ elseif( CMAKE_HOST_APPLE )
+ SET( APPLE 1 )
+ SET( UNIX )
+ endif()
+ find_program( ${ARGN} )
+ SET( WIN32 )
+ SET( APPLE )
+ SET( UNIX 1 )
+ set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )
+ set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
+ set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
+endmacro()
+
+
+# export toolchain settings for the try_compile() command
+if( NOT _CMAKE_IN_TRY_COMPILE )
+ set( __toolchain_config "")
+ foreach( __var NDK_CCACHE LIBRARY_OUTPUT_PATH_ROOT ANDROID_FORBID_SYGWIN
+ ANDROID_NDK_HOST_X64
+ ANDROID_NDK
+ ANDROID_NDK_LAYOUT
+ ANDROID_STANDALONE_TOOLCHAIN
+ ANDROID_TOOLCHAIN_NAME
+ ANDROID_ABI
+ ANDROID_NATIVE_API_LEVEL
+ ANDROID_STL
+ ANDROID_STL_FORCE_FEATURES
+ ANDROID_FORCE_ARM_BUILD
+ ANDROID_NO_UNDEFINED
+ ANDROID_SO_UNDEFINED
+ ANDROID_FUNCTION_LEVEL_LINKING
+ ANDROID_GOLD_LINKER
+ ANDROID_NOEXECSTACK
+ ANDROID_RELRO
+ ANDROID_LIBM_PATH
+ ANDROID_EXPLICIT_CRT_LINK
+ ANDROID_APP_PIE
+ )
+ if( DEFINED ${__var} )
+ if( ${__var} MATCHES " ")
+ set( __toolchain_config "${__toolchain_config}set( ${__var} \"${${__var}}\" CACHE INTERNAL \"\" )\n" )
+ else()
+ set( __toolchain_config "${__toolchain_config}set( ${__var} ${${__var}} CACHE INTERNAL \"\" )\n" )
+ endif()
+ endif()
+ endforeach()
+ file( WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/android.toolchain.config.cmake" "${__toolchain_config}" )
+ unset( __toolchain_config )
+endif()
+
+
+# force cmake to produce / instead of \ in build commands for Ninja generator
+if( CMAKE_GENERATOR MATCHES "Ninja" AND CMAKE_HOST_WIN32 )
+ # it is a bad hack after all
+ # CMake generates Ninja makefiles with UNIX paths only if it thinks that we are going to build with MinGW
+ set( CMAKE_COMPILER_IS_MINGW TRUE ) # tell CMake that we are MinGW
+ set( CMAKE_CROSSCOMPILING TRUE ) # stop recursion
+ enable_language( C )
+ enable_language( CXX )
+ # unset( CMAKE_COMPILER_IS_MINGW ) # can't unset because CMake does not convert back-slashes in response files without it
+ unset( MINGW )
+endif()
+
+
+# Variables controlling behavior or set by cmake toolchain:
+# ANDROID_ABI : "armeabi-v7a" (default), "armeabi", "armeabi-v7a with NEON", "armeabi-v7a with VFPV3", "armeabi-v6 with VFP", "x86", "mips", "arm64-v8a", "x86_64", "mips64"
+# ANDROID_NATIVE_API_LEVEL : 3,4,5,8,9,14,15,16,17,18,19,21 (depends on NDK version)
+# ANDROID_STL : gnustl_static/gnustl_shared/stlport_static/stlport_shared/gabi++_static/gabi++_shared/system_re/system/none
+# ANDROID_FORBID_SYGWIN : ON/OFF
+# ANDROID_NO_UNDEFINED : ON/OFF
+# ANDROID_SO_UNDEFINED : OFF/ON (default depends on NDK version)
+# ANDROID_FUNCTION_LEVEL_LINKING : ON/OFF
+# ANDROID_GOLD_LINKER : ON/OFF
+# ANDROID_NOEXECSTACK : ON/OFF
+# ANDROID_RELRO : ON/OFF
+# ANDROID_FORCE_ARM_BUILD : ON/OFF
+# ANDROID_STL_FORCE_FEATURES : ON/OFF
+# ANDROID_LIBM_PATH : path to libm.so (set to something like $(TOP)/out/target/product/<product_name>/obj/lib/libm.so) to workaround unresolved `sincos`
+# Can be set only at the first run:
+# ANDROID_NDK : path to your NDK install
+# NDK_CCACHE : path to your ccache executable
+# ANDROID_TOOLCHAIN_NAME : the NDK name of compiler toolchain
+# ANDROID_NDK_HOST_X64 : try to use x86_64 toolchain (default for x64 host systems)
+# ANDROID_NDK_LAYOUT : the inner NDK structure (RELEASE, LINARO, ANDROID)
+# LIBRARY_OUTPUT_PATH_ROOT : <any valid path>
+# ANDROID_STANDALONE_TOOLCHAIN
+#
+# Primary read-only variables:
+# ANDROID : always TRUE
+# ARMEABI : TRUE for arm v6 and older devices
+# ARMEABI_V6 : TRUE for arm v6
+# ARMEABI_V7A : TRUE for arm v7a
+# ARM64_V8A : TRUE for arm64-v8a
+# NEON : TRUE if NEON unit is enabled
+# VFPV3 : TRUE if VFP version 3 is enabled
+# X86 : TRUE if configured for x86
+# X86_64 : TRUE if configured for x86_64
+# MIPS : TRUE if configured for mips
+# MIPS64 : TRUE if configured for mips64
+# BUILD_WITH_ANDROID_NDK : TRUE if NDK is used
+# BUILD_WITH_STANDALONE_TOOLCHAIN : TRUE if standalone toolchain is used
+# ANDROID_NDK_HOST_SYSTEM_NAME : "windows", "linux-x86" or "darwin-x86" depending on host platform
+# ANDROID_NDK_ABI_NAME : "armeabi", "armeabi-v7a", "x86", "mips", "arm64-v8a", "x86_64", "mips64" depending on ANDROID_ABI
+# ANDROID_NDK_RELEASE : from r5 to r10d; set only for NDK
+# ANDROID_NDK_RELEASE_NUM : numeric ANDROID_NDK_RELEASE version (1000*major+minor)
+# ANDROID_ARCH_NAME : "arm", "x86", "mips", "arm64", "x86_64", "mips64" depending on ANDROID_ABI
+# ANDROID_SYSROOT : path to the compiler sysroot
+# TOOL_OS_SUFFIX : "" or ".exe" depending on host platform
+# ANDROID_COMPILER_IS_CLANG : TRUE if clang compiler is used
+#
+# Secondary (less stable) read-only variables:
+# ANDROID_COMPILER_VERSION : GCC version used (not Clang version)
+# ANDROID_CLANG_VERSION : version of clang compiler if clang is used
+# ANDROID_CXX_FLAGS : C/C++ compiler flags required by Android platform
+# ANDROID_SUPPORTED_ABIS : list of currently allowed values for ANDROID_ABI
+# ANDROID_TOOLCHAIN_MACHINE_NAME : "arm-linux-androideabi", "arm-eabi" or "i686-android-linux"
+# ANDROID_TOOLCHAIN_ROOT : path to the top level of toolchain (standalone or placed inside NDK)
+# ANDROID_CLANG_TOOLCHAIN_ROOT : path to clang tools
+# ANDROID_SUPPORTED_NATIVE_API_LEVELS : list of native API levels found inside NDK
+# ANDROID_STL_INCLUDE_DIRS : stl include paths
+# ANDROID_RTTI : if rtti is enabled by the runtime
+# ANDROID_EXCEPTIONS : if exceptions are enabled by the runtime
+# ANDROID_GCC_TOOLCHAIN_NAME : read-only, differs from ANDROID_TOOLCHAIN_NAME only if clang is used
+#
+# Defaults:
+# ANDROID_DEFAULT_NDK_API_LEVEL
+# ANDROID_DEFAULT_NDK_API_LEVEL_${ARCH}
+# ANDROID_NDK_SEARCH_PATHS
+# ANDROID_SUPPORTED_ABIS_${ARCH}
+# ANDROID_SUPPORTED_NDK_VERSIONS
diff --git a/contrib/android-cmake/ndk_links.md b/contrib/android-cmake/ndk_links.md
new file mode 100644
index 000000000..6d93d61d2
--- /dev/null
+++ b/contrib/android-cmake/ndk_links.md
@@ -0,0 +1,211 @@
+
+============== r1 ============== (dead links)
+
+* http://dl.google.com/android/ndk/android-ndk-1.5_r1-windows.zip
+* http://dl.google.com/android/ndk/android-ndk-1.5_r1-darwin-x86.zip
+* http://dl.google.com/android/ndk/android-ndk-1.5_r1-linux-x86.zip
+
+============== r2 ==============
+
+* http://dl.google.com/android/ndk/android-ndk-1.6_r1-windows.zip
+* http://dl.google.com/android/ndk/android-ndk-1.6_r1-darwin-x86.zip
+* http://dl.google.com/android/ndk/android-ndk-1.6_r1-linux-x86.zip
+
+============== r3 ==============
+
+* http://dl.google.com/android/ndk/android-ndk-r3-windows.zip
+* http://dl.google.com/android/ndk/android-ndk-r3-darwin-x86.zip
+* http://dl.google.com/android/ndk/android-ndk-r3-linux-x86.zip
+
+============== r4 ==============
+
+* http://dl.google.com/android/ndk/android-ndk-r4-windows.zip
+* http://dl.google.com/android/ndk/android-ndk-r4-darwin-x86.zip
+* http://dl.google.com/android/ndk/android-ndk-r4-linux-x86.zip
+
+============== r4b ==============
+
+* http://dl.google.com/android/ndk/android-ndk-r4b-windows.zip
+* http://dl.google.com/android/ndk/android-ndk-r4b-darwin-x86.zip
+* http://dl.google.com/android/ndk/android-ndk-r4b-linux-x86.zip
+
+============== r5 ==============
+
+* http://dl.google.com/android/ndk/android-ndk-r5-windows.zip
+* http://dl.google.com/android/ndk/android-ndk-r5-darwin-x86.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk-r5-linux-x86.tar.bz2
+
+============== r5b ==============
+
+* http://dl.google.com/android/ndk/android-ndk-r5b-windows.zip
+* http://dl.google.com/android/ndk/android-ndk-r5b-darwin-x86.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk-r5b-linux-x86.tar.bz2
+
+============== r5c ==============
+
+* http://dl.google.com/android/ndk/android-ndk-r5c-windows.zip
+* http://dl.google.com/android/ndk/android-ndk-r5c-darwin-x86.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk-r5c-linux-x86.tar.bz2
+
+============== r6 ==============
+
+* http://dl.google.com/android/ndk/android-ndk-r6-windows.zip
+* http://dl.google.com/android/ndk/android-ndk-r6-darwin-x86.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk-r6-linux-x86.tar.bz2
+
+============== r6b ==============
+
+* http://dl.google.com/android/ndk/android-ndk-r6b-windows.zip
+* http://dl.google.com/android/ndk/android-ndk-r6b-darwin-x86.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk-r6b-linux-x86.tar.bz2
+
+============== r7 ==============
+
+* http://dl.google.com/android/ndk/android-ndk-r7-windows.zip
+* http://dl.google.com/android/ndk/android-ndk-r7-darwin-x86.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk-r7-linux-x86.tar.bz2
+
+============== r7b ==============
+
+* http://dl.google.com/android/ndk/android-ndk-r7b-windows.zip
+* http://dl.google.com/android/ndk/android-ndk-r7b-darwin-x86.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk-r7b-linux-x86.tar.bz2
+
+============== r7c ==============
+
+* http://dl.google.com/android/ndk/android-ndk-r7c-windows.zip
+* http://dl.google.com/android/ndk/android-ndk-r7c-darwin-x86.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk-r7c-linux-x86.tar.bz2
+
+============== r8 ==============
+
+* http://dl.google.com/android/ndk/android-ndk-r8-windows.zip
+* http://dl.google.com/android/ndk/android-ndk-r8-darwin-x86.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk-r8-linux-x86.tar.bz2
+
+============== r8b ==============
+
+* http://dl.google.com/android/ndk/android-ndk-r8b-windows.zip
+* http://dl.google.com/android/ndk/android-ndk-r8b-darwin-x86.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk-r8b-linux-x86.tar.bz2
+
+============== r8c ==============
+
+* http://dl.google.com/android/ndk/android-ndk-r8c-windows.zip
+* http://dl.google.com/android/ndk/android-ndk-r8c-darwin-x86.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk-r8c-linux-x86.tar.bz2
+
+============== r8d ==============
+
+* http://dl.google.com/android/ndk/android-ndk-r8d-windows.zip
+* http://dl.google.com/android/ndk/android-ndk-r8d-darwin-x86.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk-r8d-linux-x86.tar.bz2
+
+============== r8e ==============
+
+* http://dl.google.com/android/ndk/android-ndk-r8e-windows-x86.zip
+* http://dl.google.com/android/ndk/android-ndk-r8e-windows-x86_64.zip
+* http://dl.google.com/android/ndk/android-ndk-r8e-darwin-x86.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk-r8e-darwin-x86_64.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk-r8e-linux-x86.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk-r8e-linux-x86_64.tar.bz2
+
+============== r9 ==============
+
+* http://dl.google.com/android/ndk/android-ndk-r9-windows-x86.zip
+* http://dl.google.com/android/ndk/android-ndk-r9-windows-x86-legacy-toolchains.zip
+* http://dl.google.com/android/ndk/android-ndk-r9-windows-x86_64.zip
+* http://dl.google.com/android/ndk/android-ndk-r9-windows-x86_64-legacy-toolchains.zip
+* http://dl.google.com/android/ndk/android-ndk-r9-darwin-x86.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk-r9-darwin-x86-legacy-toolchains.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk-r9-darwin-x86_64.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk-r9-darwin-x86_64-legacy-toolchains.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk-r9-linux-x86.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk-r9-linux-x86-legacy-toolchains.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk-r9-linux-x86_64.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk-r9-linux-x86_64-legacy-toolchains.tar.bz2
+
+============== r9b ==============
+
+* http://dl.google.com/android/ndk/android-ndk-r9b-windows-x86.zip
+* http://dl.google.com/android/ndk/android-ndk-r9b-windows-x86-legacy-toolchains.zip
+* http://dl.google.com/android/ndk/android-ndk-r9b-windows-x86_64.zip
+* http://dl.google.com/android/ndk/android-ndk-r9b-windows-x86_64-legacy-toolchains.zip
+* http://dl.google.com/android/ndk/android-ndk-r9b-darwin-x86.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk-r9b-darwin-x86-legacy-toolchains.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk-r9b-darwin-x86_64.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk-r9b-darwin-x86_64-legacy-toolchains.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk-r9b-linux-x86.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk-r9b-linux-x86-legacy-toolchains.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk-r9b-linux-x86_64.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk-r9b-linux-x86_64-legacy-toolchains.tar.bz2
+
+============== r9c ==============
+
+* http://dl.google.com/android/ndk/android-ndk-r9c-windows-x86.zip
+* http://dl.google.com/android/ndk/android-ndk-r9c-windows-x86_64.zip
+* http://dl.google.com/android/ndk/android-ndk-r9c-darwin-x86.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk-r9c-darwin-x86_64.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk-r9c-linux-x86.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk-r9c-linux-x86_64.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk-r9c-cxx-stl-libs-with-debugging-info.zip
+
+============== r9d ==============
+
+* http://dl.google.com/android/ndk/android-ndk-r9d-windows-x86.zip
+* http://dl.google.com/android/ndk/android-ndk-r9d-windows-x86_64.zip
+* http://dl.google.com/android/ndk/android-ndk-r9d-darwin-x86.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk-r9d-darwin-x86_64.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk-r9d-linux-x86.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk-r9d-linux-x86_64.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk-r9d-cxx-stl-libs-with-debug-info.zip
+
+============== r10 ==============
+
+* http://dl.google.com/android/ndk/android-ndk32-r10-windows-x86.zip
+* http://dl.google.com/android/ndk/android-ndk32-r10-windows-x86_64.zip
+* http://dl.google.com/android/ndk/android-ndk32-r10-darwin-x86.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk32-r10-darwin-x86_64.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk32-r10-linux-x86.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk32-r10-linux-x86_64.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk64-r10-windows-x86.zip
+* http://dl.google.com/android/ndk/android-ndk64-r10-windows-x86_64.zip
+* http://dl.google.com/android/ndk/android-ndk64-r10-darwin-x86.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk64-r10-darwin-x86_64.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk64-r10-linux-x86.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk64-r10-linux-x86_64.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk-r10-cxx-stl-libs-with-debug-info.zip
+
+============== r10b ==============
+
+* http://dl.google.com/android/ndk/android-ndk32-r10b-windows-x86.zip
+* http://dl.google.com/android/ndk/android-ndk32-r10b-windows-x86_64.zip
+* http://dl.google.com/android/ndk/android-ndk32-r10b-darwin-x86.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk32-r10b-darwin-x86_64.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk32-r10b-linux-x86.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk32-r10b-linux-x86_64.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk64-r10b-windows-x86.zip
+* http://dl.google.com/android/ndk/android-ndk64-r10b-windows-x86_64.zip
+* http://dl.google.com/android/ndk/android-ndk64-r10b-darwin-x86.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk64-r10b-darwin-x86_64.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk64-r10b-linux-x86.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk64-r10b-linux-x86_64.tar.bz2
+* http://dl.google.com/android/ndk/android-ndk-r10b-cxx-stl-libs-with-debug-info.zip
+
+============== r10c ==============
+
+* http://dl.google.com/android/ndk/android-ndk-r10c-windows-x86.exe
+* http://dl.google.com/android/ndk/android-ndk-r10c-windows-x86_64.exe
+* http://dl.google.com/android/ndk/android-ndk-r10c-darwin-x86.bin
+* http://dl.google.com/android/ndk/android-ndk-r10c-darwin-x86_64.bin
+* http://dl.google.com/android/ndk/android-ndk-r10c-linux-x86.bin
+* http://dl.google.com/android/ndk/android-ndk-r10c-linux-x86_64.bin
+
+============== r10d ==============
+
+* http://dl.google.com/android/ndk/android-ndk-r10d-windows-x86.exe
+* http://dl.google.com/android/ndk/android-ndk-r10d-windows-x86_64.exe
+* http://dl.google.com/android/ndk/android-ndk-r10d-darwin-x86.bin
+* http://dl.google.com/android/ndk/android-ndk-r10d-darwin-x86_64.bin
+* http://dl.google.com/android/ndk/android-ndk-r10d-linux-x86.bin
+* http://dl.google.com/android/ndk/android-ndk-r10d-linux-x86_64.bin
diff --git a/contrib/clipper/clipper.cpp b/contrib/clipper/clipper.cpp
index 7d2af7d3a..074f22b21 100644
--- a/contrib/clipper/clipper.cpp
+++ b/contrib/clipper/clipper.cpp
@@ -43,6 +43,7 @@
#include <vector>
#include <algorithm>
#include <stdexcept>
+#include <cassert>
#include <cstring>
#include <cstdlib>
#include <ostream>
@@ -2365,6 +2366,7 @@ void Clipper::ProcessHorizontal(TEdge *horzEdge)
//ok, so far it looks like we're still in range of the horizontal edge
if ( e->xcurr == horzEdge->xtop && !eMaxPair )
{
+ assert(horzEdge->nextInLML);
if (SlopesEqual(*e, *horzEdge->nextInLML, m_UseFullRange))
{
//if output polygons share an edge, they'll need joining later ...
@@ -2429,6 +2431,7 @@ void Clipper::ProcessHorizontal(TEdge *horzEdge)
if ( horzEdge->outIdx >= 0 )
IntersectEdges( horzEdge, eMaxPair,
IntPoint(horzEdge->xtop, horzEdge->ycurr), ipBoth);
+ assert(eMaxPair);
if (eMaxPair->outIdx >= 0) throw clipperException("ProcessHorizontal error");
DeleteFromAEL(eMaxPair);
DeleteFromAEL(horzEdge);
diff --git a/contrib/irrXML/CMakeLists.txt b/contrib/irrXML/CMakeLists.txt
index 82ede3a04..48941970a 100644
--- a/contrib/irrXML/CMakeLists.txt
+++ b/contrib/irrXML/CMakeLists.txt
@@ -8,6 +8,15 @@ set( IrrXML_SRCS
irrXML.h
)
+if ( MSVC )
+ ADD_DEFINITIONS( -D_SCL_SECURE_NO_WARNINGS )
+ ADD_DEFINITIONS( -D_CRT_SECURE_NO_WARNINGS )
+endif ( MSVC )
+
add_library(IrrXML STATIC ${IrrXML_SRCS})
set(IRRXML_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}" CACHE INTERNAL "IrrXML_Include" )
set(IRRXML_LIBRARY "IrrXML" CACHE INTERNAL "IrrXML" )
+
+install(TARGETS IrrXML
+ ARCHIVE DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
+ COMPONENT ${LIBASSIMP_COMPONENT})
diff --git a/contrib/irrXML/CXMLReaderImpl.h b/contrib/irrXML/CXMLReaderImpl.h
index 63b700dc1..7d33b9404 100644
--- a/contrib/irrXML/CXMLReaderImpl.h
+++ b/contrib/irrXML/CXMLReaderImpl.h
@@ -9,6 +9,8 @@
#include "irrString.h"
#include "irrArray.h"
+#include <cassert>
+
using namespace Assimp;
#ifdef _DEBUG
@@ -664,12 +666,9 @@ private:
TextData = new char_type[sizeWithoutHeader];
// MSVC debugger complains here about loss of data ...
-
-
- // FIXME - gcc complains about 'shift width larger than width of type'
- // for T == unsigned long. Avoid it by messing around volatile ..
- volatile unsigned int c = 3;
- const src_char_type cc = (src_char_type)((((uint64_t)1u << (sizeof( char_type)<<c)) - 1));
+ size_t numShift = sizeof( char_type) * 8;
+ assert(numShift < 64);
+ const src_char_type cc = (src_char_type)(((uint64_t(1u) << numShift) - 1));
for (int i=0; i<sizeWithoutHeader; ++i)
TextData[i] = char_type( source[i] & cc);
diff --git a/contrib/irrXML/irrArray.h b/contrib/irrXML/irrArray.h
index 40c822590..51302680e 100644
--- a/contrib/irrXML/irrArray.h
+++ b/contrib/irrXML/irrArray.h
@@ -21,8 +21,7 @@ class array
{
public:
-
- array()
+ array()
: data(0), allocated(0), used(0),
free_when_destroyed(true), is_sorted(true)
{
diff --git a/contrib/irrXML/irrXML.cpp b/contrib/irrXML/irrXML.cpp
index 42509b5f3..532eed544 100644
--- a/contrib/irrXML/irrXML.cpp
+++ b/contrib/irrXML/irrXML.cpp
@@ -9,7 +9,7 @@
#include "irrXML.h"
#include "irrString.h"
#include "irrArray.h"
-#include "./../../code/fast_atof.h"
+#include <assimp/fast_atof.h>
#include "CXMLReaderImpl.h"
namespace irr
diff --git a/contrib/openddlparser/code/DDLNode.cpp b/contrib/openddlparser/code/DDLNode.cpp
index 6548cdf24..a7c557fc5 100644
--- a/contrib/openddlparser/code/DDLNode.cpp
+++ b/contrib/openddlparser/code/DDLNode.cpp
@@ -191,7 +191,7 @@ Reference *DDLNode::getReferences() const {
return m_references;
}
-void DDLNode::dump(IOStreamBase &stream) {
+void DDLNode::dump(IOStreamBase &/*stream*/) {
// Todo!
}
diff --git a/contrib/openddlparser/code/OpenDDLExport.cpp b/contrib/openddlparser/code/OpenDDLExport.cpp
index a85bc5676..e45fb041a 100644
--- a/contrib/openddlparser/code/OpenDDLExport.cpp
+++ b/contrib/openddlparser/code/OpenDDLExport.cpp
@@ -135,10 +135,9 @@ bool OpenDDLExport::writeToStream( const std::string &statement ) {
}
bool OpenDDLExport::writeNode( DDLNode *node, std::string &statement ) {
- bool success( true );
writeNodeHeader( node, statement );
if (node->hasProperties()) {
- success |= writeProperties( node, statement );
+ writeProperties( node, statement );
}
writeLineEnd( statement );
@@ -360,11 +359,10 @@ bool OpenDDLExport::writeValueArray( DataArrayList *al, std::string &statement )
}
DataArrayList *nextDataArrayList = al ;
- Value *nextValue( nextDataArrayList->m_dataList );
while (ddl_nullptr != nextDataArrayList) {
if (ddl_nullptr != nextDataArrayList) {
statement += "{ ";
- nextValue = nextDataArrayList->m_dataList;
+ Value *nextValue( nextDataArrayList->m_dataList );
size_t idx( 0 );
while (ddl_nullptr != nextValue) {
if (idx > 0) {
diff --git a/contrib/openddlparser/code/OpenDDLParser.cpp b/contrib/openddlparser/code/OpenDDLParser.cpp
index dab976fad..91831ba27 100644
--- a/contrib/openddlparser/code/OpenDDLParser.cpp
+++ b/contrib/openddlparser/code/OpenDDLParser.cpp
@@ -27,6 +27,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <iostream>
#include <sstream>
#include <algorithm>
+#include <memory>
#include <math.h>
#ifdef _WIN32
@@ -99,9 +100,15 @@ static bool isUnsignedIntegerType( Value::ValueType integerType ) {
}
static DDLNode *createDDLNode( Text *id, OpenDDLParser *parser ) {
+ // Basic checks
if( ddl_nullptr == id || ddl_nullptr == parser ) {
return ddl_nullptr;
}
+
+ // If the buffer is empty ( an empty node ) return nullptr
+ if ( ddl_nullptr == id->m_buffer ) {
+ return ddl_nullptr;
+ }
const std::string type( id->m_buffer );
DDLNode *parent( parser->top() );
@@ -275,22 +282,24 @@ char *OpenDDLParser::parseHeader( char *in, char *end ) {
}
delete id;
- Name *name(ddl_nullptr);
- in = OpenDDLParser::parseName(in, end, &name);
+ Name *name_(ddl_nullptr);
+ in = OpenDDLParser::parseName(in, end, &name_);
+ std::unique_ptr<Name> name(name_);
if( ddl_nullptr != name && ddl_nullptr != node ) {
const std::string nodeName( name->m_id->m_buffer );
node->setName( nodeName );
- delete name;
}
- Property *first(ddl_nullptr);
+ std::unique_ptr<Property> first;
in = lookForNextToken(in, end);
if (*in == Grammar::OpenPropertyToken[0]) {
in++;
- Property *prop(ddl_nullptr), *prev(ddl_nullptr);
+ std::unique_ptr<Property> prop, prev;
while (*in != Grammar::ClosePropertyToken[0] && in != end) {
- in = OpenDDLParser::parseProperty(in, end, &prop);
+ Property *prop_(ddl_nullptr);
+ in = OpenDDLParser::parseProperty(in, end, &prop_);
+ prop.reset(prop_);
in = lookForNextToken(in, end);
if (*in != Grammar::CommaSeparator[0] && *in != Grammar::ClosePropertyToken[0]) {
@@ -300,20 +309,20 @@ char *OpenDDLParser::parseHeader( char *in, char *end ) {
if (ddl_nullptr != prop && *in != Grammar::CommaSeparator[0]) {
if (ddl_nullptr == first) {
- first = prop;
+ first = std::move(prop);
}
if (ddl_nullptr != prev) {
- prev->m_next = prop;
+ prev->m_next = prop.release();
}
- prev = prop;
+ prev = std::move(prop);
}
}
++in;
}
// set the properties
- if (ddl_nullptr != first && ddl_nullptr != node) {
- node->setProperties(first);
+ if (first && ddl_nullptr != node) {
+ node->setProperties(first.release());
}
}
@@ -339,7 +348,6 @@ char *OpenDDLParser::parseStructure( char *in, char *end ) {
} else {
++in;
logInvalidTokenError( in, std::string( Grammar::OpenBracketToken ), m_logCallback );
- error = true;
return ddl_nullptr;
}
in = lookForNextToken( in, end );
diff --git a/contrib/openddlparser/code/Value.cpp b/contrib/openddlparser/code/Value.cpp
index 3c8b06a10..b5a35e722 100644
--- a/contrib/openddlparser/code/Value.cpp
+++ b/contrib/openddlparser/code/Value.cpp
@@ -294,7 +294,7 @@ Reference *Value::getRef() const {
return (Reference*) m_data;
}
-void Value::dump( IOStreamBase &stream ) {
+void Value::dump( IOStreamBase &/*stream*/ ) {
switch( m_type ) {
case ddl_none:
std::cout << "None" << std::endl;
diff --git a/contrib/openddlparser/include/openddlparser/OpenDDLParser.h b/contrib/openddlparser/include/openddlparser/OpenDDLParser.h
index e9ac665b5..ef7f3a72e 100644
--- a/contrib/openddlparser/include/openddlparser/OpenDDLParser.h
+++ b/contrib/openddlparser/include/openddlparser/OpenDDLParser.h
@@ -42,6 +42,10 @@ struct Property;
template<class T>
inline
bool isEmbeddedCommentOpenTag( T *in, T *end ) {
+ if ( in == end ) {
+ return false;
+ }
+
if ( in == '/' && in+1 == '*' ) {
return true;
}
diff --git a/contrib/openddlparser/include/openddlparser/OpenDDLParserUtils.h b/contrib/openddlparser/include/openddlparser/OpenDDLParserUtils.h
index 64897436e..f0762ac67 100644
--- a/contrib/openddlparser/include/openddlparser/OpenDDLParserUtils.h
+++ b/contrib/openddlparser/include/openddlparser/OpenDDLParserUtils.h
@@ -59,32 +59,10 @@ bool isSeparator( T in ) {
return false;
}
-static const unsigned char chartype_table[ 256 ] = {
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0-15
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 16-31
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 32-47
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, // 48-63
-
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 64-79
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 80-95
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 96-111
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 112-127
-
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // > 127
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
template<class T>
inline
bool isNumeric( const T in ) {
- return ( chartype_table[ static_cast<size_t>( in ) ] == 1 );
+ return ( in >= '0' && in <= '9' );
}
template<class T>
diff --git a/contrib/rapidjson/include/rapidjson/allocators.h b/contrib/rapidjson/include/rapidjson/allocators.h
index d74a67155..655f4a385 100644
--- a/contrib/rapidjson/include/rapidjson/allocators.h
+++ b/contrib/rapidjson/include/rapidjson/allocators.h
@@ -179,9 +179,10 @@ public:
size = RAPIDJSON_ALIGN(size);
if (chunkHead_ == 0 || chunkHead_->size + size > chunkHead_->capacity)
- AddChunk(chunk_capacity_ > size ? chunk_capacity_ : size);
+ if (!AddChunk(chunk_capacity_ > size ? chunk_capacity_ : size))
+ return NULL;
- void *buffer = reinterpret_cast<char *>(chunkHead_ + 1) + chunkHead_->size;
+ void *buffer = reinterpret_cast<char *>(chunkHead_) + RAPIDJSON_ALIGN(sizeof(ChunkHeader)) + chunkHead_->size;
chunkHead_->size += size;
return buffer;
}
@@ -194,14 +195,16 @@ public:
if (newSize == 0)
return NULL;
+ originalSize = RAPIDJSON_ALIGN(originalSize);
+ newSize = RAPIDJSON_ALIGN(newSize);
+
// Do not shrink if new size is smaller than original
if (originalSize >= newSize)
return originalPtr;
// Simply expand it if it is the last allocation and there is sufficient space
- if (originalPtr == (char *)(chunkHead_ + 1) + chunkHead_->size - originalSize) {
+ if (originalPtr == reinterpret_cast<char *>(chunkHead_) + RAPIDJSON_ALIGN(sizeof(ChunkHeader)) + chunkHead_->size - originalSize) {
size_t increment = static_cast<size_t>(newSize - originalSize);
- increment = RAPIDJSON_ALIGN(increment);
if (chunkHead_->size + increment <= chunkHead_->capacity) {
chunkHead_->size += increment;
return originalPtr;
@@ -209,11 +212,13 @@ public:
}
// Realloc process: allocate and copy memory, do not free original buffer.
- void* newBuffer = Malloc(newSize);
- RAPIDJSON_ASSERT(newBuffer != 0); // Do not handle out-of-memory explicitly.
- if (originalSize)
- std::memcpy(newBuffer, originalPtr, originalSize);
- return newBuffer;
+ if (void* newBuffer = Malloc(newSize)) {
+ if (originalSize)
+ std::memcpy(newBuffer, originalPtr, originalSize);
+ return newBuffer;
+ }
+ else
+ return NULL;
}
//! Frees a memory block (concept Allocator)
@@ -227,15 +232,20 @@ private:
//! Creates a new chunk.
/*! \param capacity Capacity of the chunk in bytes.
+ \return true if success.
*/
- void AddChunk(size_t capacity) {
+ bool AddChunk(size_t capacity) {
if (!baseAllocator_)
- ownBaseAllocator_ = baseAllocator_ = RAPIDJSON_NEW(BaseAllocator());
- ChunkHeader* chunk = reinterpret_cast<ChunkHeader*>(baseAllocator_->Malloc(sizeof(ChunkHeader) + capacity));
- chunk->capacity = capacity;
- chunk->size = 0;
- chunk->next = chunkHead_;
- chunkHead_ = chunk;
+ ownBaseAllocator_ = baseAllocator_ = RAPIDJSON_NEW(BaseAllocator)();
+ if (ChunkHeader* chunk = reinterpret_cast<ChunkHeader*>(baseAllocator_->Malloc(RAPIDJSON_ALIGN(sizeof(ChunkHeader)) + capacity))) {
+ chunk->capacity = capacity;
+ chunk->size = 0;
+ chunk->next = chunkHead_;
+ chunkHead_ = chunk;
+ return true;
+ }
+ else
+ return false;
}
static const int kDefaultChunkCapacity = 64 * 1024; //!< Default chunk capacity.
diff --git a/contrib/rapidjson/include/rapidjson/document.h b/contrib/rapidjson/include/rapidjson/document.h
index c6acbd907..93b091f64 100644
--- a/contrib/rapidjson/include/rapidjson/document.h
+++ b/contrib/rapidjson/include/rapidjson/document.h
@@ -20,40 +20,29 @@
#include "reader.h"
#include "internal/meta.h"
#include "internal/strfunc.h"
+#include "memorystream.h"
+#include "encodedstream.h"
#include <new> // placement new
+#include <limits>
-#ifdef _MSC_VER
RAPIDJSON_DIAG_PUSH
+#ifdef _MSC_VER
RAPIDJSON_DIAG_OFF(4127) // conditional expression is constant
-#elif defined(__GNUC__)
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(effc++)
+RAPIDJSON_DIAG_OFF(4244) // conversion from kXxxFlags to 'uint16_t', possible loss of data
#endif
-///////////////////////////////////////////////////////////////////////////////
-// RAPIDJSON_HAS_STDSTRING
-
-#ifndef RAPIDJSON_HAS_STDSTRING
-#ifdef RAPIDJSON_DOXYGEN_RUNNING
-#define RAPIDJSON_HAS_STDSTRING 1 // force generation of documentation
-#else
-#define RAPIDJSON_HAS_STDSTRING 0 // no std::string support by default
+#ifdef __clang__
+RAPIDJSON_DIAG_OFF(padded)
+RAPIDJSON_DIAG_OFF(switch-enum)
+RAPIDJSON_DIAG_OFF(c++98-compat)
#endif
-/*! \def RAPIDJSON_HAS_STDSTRING
- \ingroup RAPIDJSON_CONFIG
- \brief Enable RapidJSON support for \c std::string
- By defining this preprocessor symbol to \c 1, several convenience functions for using
- \ref rapidjson::GenericValue with \c std::string are enabled, especially
- for construction and comparison.
-
- \hideinitializer
-*/
-#endif // !defined(RAPIDJSON_HAS_STDSTRING)
-
-#if RAPIDJSON_HAS_STDSTRING
-#include <string>
-#endif // RAPIDJSON_HAS_STDSTRING
+#ifdef __GNUC__
+RAPIDJSON_DIAG_OFF(effc++)
+#if __GNUC__ >= 6
+RAPIDJSON_DIAG_OFF(terminate) // ignore throwing RAPIDJSON_ASSERT in RAPIDJSON_NOEXCEPT functions
+#endif
+#endif // __GNUC__
#ifndef RAPIDJSON_NOMEMBERITERATORCLASS
#include <iterator> // std::iterator, std::random_access_iterator_tag
@@ -69,6 +58,9 @@ RAPIDJSON_NAMESPACE_BEGIN
template <typename Encoding, typename Allocator>
class GenericValue;
+template <typename Encoding, typename Allocator, typename StackAllocator>
+class GenericDocument;
+
//! Name-value pair in a JSON object value.
/*!
This class was internal to GenericValue. It used to be a inner struct.
@@ -155,6 +147,7 @@ public:
Otherwise, the copy constructor is implicitly defined.
*/
GenericMemberIterator(const NonConstIterator & it) : ptr_(it.ptr_) {}
+ Iterator& operator=(const NonConstIterator & it) { ptr_ = it.ptr_; return *this; }
//! @name stepping
//@{
@@ -257,6 +250,7 @@ struct GenericStringRef {
typedef CharType Ch; //!< character type of the string
//! Create string reference from \c const character array
+#ifndef __clang__ // -Wdocumentation
/*!
This constructor implicitly creates a constant string reference from
a \c const character array. It has better performance than
@@ -279,11 +273,13 @@ struct GenericStringRef {
In such cases, the referenced string should be \b copied to the
GenericValue instead.
*/
+#endif
template<SizeType N>
GenericStringRef(const CharType (&str)[N]) RAPIDJSON_NOEXCEPT
: s(str), length(N-1) {}
//! Explicitly create string reference from \c const character pointer
+#ifndef __clang__ // -Wdocumentation
/*!
This constructor can be used to \b explicitly create a reference to
a constant string pointer.
@@ -302,18 +298,23 @@ struct GenericStringRef {
In such cases, the referenced string should be \b copied to the
GenericValue instead.
*/
+#endif
explicit GenericStringRef(const CharType* str)
- : s(str), length(internal::StrLen(str)){ RAPIDJSON_ASSERT(s != NULL); }
+ : s(str), length(NotNullStrLen(str)) {}
//! Create constant string reference from pointer and length
+#ifndef __clang__ // -Wdocumentation
/*! \param str constant string, lifetime assumed to be longer than the use of the string in e.g. a GenericValue
\param len length of the string, excluding the trailing NULL terminator
\post \ref s == str && \ref length == len
\note Constant complexity.
*/
+#endif
GenericStringRef(const CharType* str, SizeType len)
- : s(str), length(len) { RAPIDJSON_ASSERT(s != NULL); }
+ : s(RAPIDJSON_LIKELY(str) ? str : emptyString), length(len) { RAPIDJSON_ASSERT(str != 0 || len == 0u); }
+
+ GenericStringRef(const GenericStringRef& rhs) : s(rhs.s), length(rhs.length) {}
//! implicit conversion to plain CharType pointer
operator const Ch *() const { return s; }
@@ -322,13 +323,24 @@ struct GenericStringRef {
const SizeType length; //!< length of the string (excluding the trailing NULL terminator)
private:
- //! Disallow copy-assignment
- GenericStringRef operator=(const GenericStringRef&);
+ SizeType NotNullStrLen(const CharType* str) {
+ RAPIDJSON_ASSERT(str != 0);
+ return internal::StrLen(str);
+ }
+
+ /// Empty string - used when passing in a NULL pointer
+ static const Ch emptyString[];
+
//! Disallow construction from non-const array
template<SizeType N>
GenericStringRef(CharType (&str)[N]) /* = delete */;
+ //! Copy assignment operator not permitted - immutable type
+ GenericStringRef& operator=(const GenericStringRef& rhs) /* = delete */;
};
+template<typename CharType>
+const CharType GenericStringRef<CharType>::emptyString[] = { CharType() };
+
//! Mark a character pointer as constant string
/*! Mark a plain character pointer as a "string literal". This function
can be used to avoid copying a character string to be referenced as a
@@ -343,7 +355,7 @@ private:
*/
template<typename CharType>
inline GenericStringRef<CharType> StringRef(const CharType* str) {
- return GenericStringRef<CharType>(str, internal::StrLen(str));
+ return GenericStringRef<CharType>(str);
}
//! Mark a character pointer as constant string
@@ -402,6 +414,127 @@ template <typename T> struct IsGenericValue : IsGenericValueImpl<T>::Type {};
} // namespace internal
///////////////////////////////////////////////////////////////////////////////
+// TypeHelper
+
+namespace internal {
+
+template <typename ValueType, typename T>
+struct TypeHelper {};
+
+template<typename ValueType>
+struct TypeHelper<ValueType, bool> {
+ static bool Is(const ValueType& v) { return v.IsBool(); }
+ static bool Get(const ValueType& v) { return v.GetBool(); }
+ static ValueType& Set(ValueType& v, bool data) { return v.SetBool(data); }
+ static ValueType& Set(ValueType& v, bool data, typename ValueType::AllocatorType&) { return v.SetBool(data); }
+};
+
+template<typename ValueType>
+struct TypeHelper<ValueType, int> {
+ static bool Is(const ValueType& v) { return v.IsInt(); }
+ static int Get(const ValueType& v) { return v.GetInt(); }
+ static ValueType& Set(ValueType& v, int data) { return v.SetInt(data); }
+ static ValueType& Set(ValueType& v, int data, typename ValueType::AllocatorType&) { return v.SetInt(data); }
+};
+
+template<typename ValueType>
+struct TypeHelper<ValueType, unsigned> {
+ static bool Is(const ValueType& v) { return v.IsUint(); }
+ static unsigned Get(const ValueType& v) { return v.GetUint(); }
+ static ValueType& Set(ValueType& v, unsigned data) { return v.SetUint(data); }
+ static ValueType& Set(ValueType& v, unsigned data, typename ValueType::AllocatorType&) { return v.SetUint(data); }
+};
+
+template<typename ValueType>
+struct TypeHelper<ValueType, int64_t> {
+ static bool Is(const ValueType& v) { return v.IsInt64(); }
+ static int64_t Get(const ValueType& v) { return v.GetInt64(); }
+ static ValueType& Set(ValueType& v, int64_t data) { return v.SetInt64(data); }
+ static ValueType& Set(ValueType& v, int64_t data, typename ValueType::AllocatorType&) { return v.SetInt64(data); }
+};
+
+template<typename ValueType>
+struct TypeHelper<ValueType, uint64_t> {
+ static bool Is(const ValueType& v) { return v.IsUint64(); }
+ static uint64_t Get(const ValueType& v) { return v.GetUint64(); }
+ static ValueType& Set(ValueType& v, uint64_t data) { return v.SetUint64(data); }
+ static ValueType& Set(ValueType& v, uint64_t data, typename ValueType::AllocatorType&) { return v.SetUint64(data); }
+};
+
+template<typename ValueType>
+struct TypeHelper<ValueType, double> {
+ static bool Is(const ValueType& v) { return v.IsDouble(); }
+ static double Get(const ValueType& v) { return v.GetDouble(); }
+ static ValueType& Set(ValueType& v, double data) { return v.SetDouble(data); }
+ static ValueType& Set(ValueType& v, double data, typename ValueType::AllocatorType&) { return v.SetDouble(data); }
+};
+
+template<typename ValueType>
+struct TypeHelper<ValueType, float> {
+ static bool Is(const ValueType& v) { return v.IsFloat(); }
+ static float Get(const ValueType& v) { return v.GetFloat(); }
+ static ValueType& Set(ValueType& v, float data) { return v.SetFloat(data); }
+ static ValueType& Set(ValueType& v, float data, typename ValueType::AllocatorType&) { return v.SetFloat(data); }
+};
+
+template<typename ValueType>
+struct TypeHelper<ValueType, const typename ValueType::Ch*> {
+ typedef const typename ValueType::Ch* StringType;
+ static bool Is(const ValueType& v) { return v.IsString(); }
+ static StringType Get(const ValueType& v) { return v.GetString(); }
+ static ValueType& Set(ValueType& v, const StringType data) { return v.SetString(typename ValueType::StringRefType(data)); }
+ static ValueType& Set(ValueType& v, const StringType data, typename ValueType::AllocatorType& a) { return v.SetString(data, a); }
+};
+
+#if RAPIDJSON_HAS_STDSTRING
+template<typename ValueType>
+struct TypeHelper<ValueType, std::basic_string<typename ValueType::Ch> > {
+ typedef std::basic_string<typename ValueType::Ch> StringType;
+ static bool Is(const ValueType& v) { return v.IsString(); }
+ static StringType Get(const ValueType& v) { return StringType(v.GetString(), v.GetStringLength()); }
+ static ValueType& Set(ValueType& v, const StringType& data, typename ValueType::AllocatorType& a) { return v.SetString(data, a); }
+};
+#endif
+
+template<typename ValueType>
+struct TypeHelper<ValueType, typename ValueType::Array> {
+ typedef typename ValueType::Array ArrayType;
+ static bool Is(const ValueType& v) { return v.IsArray(); }
+ static ArrayType Get(ValueType& v) { return v.GetArray(); }
+ static ValueType& Set(ValueType& v, ArrayType data) { return v = data; }
+ static ValueType& Set(ValueType& v, ArrayType data, typename ValueType::AllocatorType&) { return v = data; }
+};
+
+template<typename ValueType>
+struct TypeHelper<ValueType, typename ValueType::ConstArray> {
+ typedef typename ValueType::ConstArray ArrayType;
+ static bool Is(const ValueType& v) { return v.IsArray(); }
+ static ArrayType Get(const ValueType& v) { return v.GetArray(); }
+};
+
+template<typename ValueType>
+struct TypeHelper<ValueType, typename ValueType::Object> {
+ typedef typename ValueType::Object ObjectType;
+ static bool Is(const ValueType& v) { return v.IsObject(); }
+ static ObjectType Get(ValueType& v) { return v.GetObject(); }
+ static ValueType& Set(ValueType& v, ObjectType data) { return v = data; }
+ static ValueType& Set(ValueType& v, ObjectType data, typename ValueType::AllocatorType&) { return v = data; }
+};
+
+template<typename ValueType>
+struct TypeHelper<ValueType, typename ValueType::ConstObject> {
+ typedef typename ValueType::ConstObject ObjectType;
+ static bool Is(const ValueType& v) { return v.IsObject(); }
+ static ObjectType Get(const ValueType& v) { return v.GetObject(); }
+};
+
+} // namespace internal
+
+// Forward declarations
+template <bool, typename> class GenericArray;
+template <bool, typename> class GenericObject;
+
+///////////////////////////////////////////////////////////////////////////////
// GenericValue
//! Represents a JSON value. Use Value for UTF8 encoding and default allocator.
@@ -428,17 +561,21 @@ public:
typedef GenericValue* ValueIterator; //!< Value iterator for iterating in array.
typedef const GenericValue* ConstValueIterator; //!< Constant value iterator for iterating in array.
typedef GenericValue<Encoding, Allocator> ValueType; //!< Value type of itself.
+ typedef GenericArray<false, ValueType> Array;
+ typedef GenericArray<true, ValueType> ConstArray;
+ typedef GenericObject<false, ValueType> Object;
+ typedef GenericObject<true, ValueType> ConstObject;
//!@name Constructors and destructor.
//@{
//! Default constructor creates a null value.
- GenericValue() RAPIDJSON_NOEXCEPT : data_(), flags_(kNullFlag) {}
+ GenericValue() RAPIDJSON_NOEXCEPT : data_() { data_.f.flags = kNullFlag; }
#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
//! Move constructor in C++11
- GenericValue(GenericValue&& rhs) RAPIDJSON_NOEXCEPT : data_(rhs.data_), flags_(rhs.flags_) {
- rhs.flags_ = kNullFlag; // give up contents
+ GenericValue(GenericValue&& rhs) RAPIDJSON_NOEXCEPT : data_(rhs.data_) {
+ rhs.data_.f.flags = kNullFlag; // give up contents
}
#endif
@@ -446,6 +583,16 @@ private:
//! Copy constructor is not permitted.
GenericValue(const GenericValue& rhs);
+#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
+ //! Moving from a GenericDocument is not permitted.
+ template <typename StackAllocator>
+ GenericValue(GenericDocument<Encoding,Allocator,StackAllocator>&& rhs);
+
+ //! Move assignment from a GenericDocument is not permitted.
+ template <typename StackAllocator>
+ GenericValue& operator=(GenericDocument<Encoding,Allocator,StackAllocator>&& rhs);
+#endif
+
public:
//! Constructor with JSON value type.
@@ -453,13 +600,13 @@ public:
\param type Type of the value.
\note Default content for number is zero.
*/
- explicit GenericValue(Type type) RAPIDJSON_NOEXCEPT : data_(), flags_() {
- static const unsigned defaultFlags[7] = {
+ explicit GenericValue(Type type) RAPIDJSON_NOEXCEPT : data_() {
+ static const uint16_t defaultFlags[7] = {
kNullFlag, kFalseFlag, kTrueFlag, kObjectFlag, kArrayFlag, kShortStringFlag,
kNumberAnyFlag
};
- RAPIDJSON_ASSERT(type <= kNumberType);
- flags_ = defaultFlags[type];
+ RAPIDJSON_ASSERT(type >= kNullType && type <= kNumberType);
+ data_.f.flags = defaultFlags[type];
// Use ShortString to store empty string.
if (type == kStringType)
@@ -471,10 +618,50 @@ public:
\tparam SourceAllocator allocator of \c rhs
\param rhs Value to copy from (read-only)
\param allocator Allocator for allocating copied elements and buffers. Commonly use GenericDocument::GetAllocator().
+ \param copyConstStrings Force copying of constant strings (e.g. referencing an in-situ buffer)
\see CopyFrom()
*/
- template< typename SourceAllocator >
- GenericValue(const GenericValue<Encoding, SourceAllocator>& rhs, Allocator & allocator);
+ template <typename SourceAllocator>
+ GenericValue(const GenericValue<Encoding,SourceAllocator>& rhs, Allocator& allocator, bool copyConstStrings = false) {
+ switch (rhs.GetType()) {
+ case kObjectType: {
+ SizeType count = rhs.data_.o.size;
+ Member* lm = reinterpret_cast<Member*>(allocator.Malloc(count * sizeof(Member)));
+ const typename GenericValue<Encoding,SourceAllocator>::Member* rm = rhs.GetMembersPointer();
+ for (SizeType i = 0; i < count; i++) {
+ new (&lm[i].name) GenericValue(rm[i].name, allocator, copyConstStrings);
+ new (&lm[i].value) GenericValue(rm[i].value, allocator, copyConstStrings);
+ }
+ data_.f.flags = kObjectFlag;
+ data_.o.size = data_.o.capacity = count;
+ SetMembersPointer(lm);
+ }
+ break;
+ case kArrayType: {
+ SizeType count = rhs.data_.a.size;
+ GenericValue* le = reinterpret_cast<GenericValue*>(allocator.Malloc(count * sizeof(GenericValue)));
+ const GenericValue<Encoding,SourceAllocator>* re = rhs.GetElementsPointer();
+ for (SizeType i = 0; i < count; i++)
+ new (&le[i]) GenericValue(re[i], allocator, copyConstStrings);
+ data_.f.flags = kArrayFlag;
+ data_.a.size = data_.a.capacity = count;
+ SetElementsPointer(le);
+ }
+ break;
+ case kStringType:
+ if (rhs.data_.f.flags == kConstStringFlag && !copyConstStrings) {
+ data_.f.flags = rhs.data_.f.flags;
+ data_ = *reinterpret_cast<const Data*>(&rhs.data_);
+ }
+ else
+ SetStringRaw(StringRef(rhs.GetString(), rhs.GetStringLength()), allocator);
+ break;
+ default:
+ data_.f.flags = rhs.data_.f.flags;
+ data_ = *reinterpret_cast<const Data*>(&rhs.data_);
+ break;
+ }
+ }
//! Constructor for boolean value.
/*! \param b Boolean value
@@ -484,96 +671,125 @@ public:
*/
#ifndef RAPIDJSON_DOXYGEN_RUNNING // hide SFINAE from Doxygen
template <typename T>
- explicit GenericValue(T b, RAPIDJSON_ENABLEIF((internal::IsSame<T,bool>))) RAPIDJSON_NOEXCEPT
+ explicit GenericValue(T b, RAPIDJSON_ENABLEIF((internal::IsSame<bool, T>))) RAPIDJSON_NOEXCEPT // See #472
#else
explicit GenericValue(bool b) RAPIDJSON_NOEXCEPT
#endif
- : data_(), flags_(b ? kTrueFlag : kFalseFlag) {
+ : data_() {
// safe-guard against failing SFINAE
RAPIDJSON_STATIC_ASSERT((internal::IsSame<bool,T>::Value));
+ data_.f.flags = b ? kTrueFlag : kFalseFlag;
}
//! Constructor for int value.
- explicit GenericValue(int i) RAPIDJSON_NOEXCEPT : data_(), flags_(kNumberIntFlag) {
+ explicit GenericValue(int i) RAPIDJSON_NOEXCEPT : data_() {
data_.n.i64 = i;
- if (i >= 0)
- flags_ |= kUintFlag | kUint64Flag;
+ data_.f.flags = (i >= 0) ? (kNumberIntFlag | kUintFlag | kUint64Flag) : kNumberIntFlag;
}
//! Constructor for unsigned value.
- explicit GenericValue(unsigned u) RAPIDJSON_NOEXCEPT : data_(), flags_(kNumberUintFlag) {
+ explicit GenericValue(unsigned u) RAPIDJSON_NOEXCEPT : data_() {
data_.n.u64 = u;
- if (!(u & 0x80000000))
- flags_ |= kIntFlag | kInt64Flag;
+ data_.f.flags = (u & 0x80000000) ? kNumberUintFlag : (kNumberUintFlag | kIntFlag | kInt64Flag);
}
//! Constructor for int64_t value.
- explicit GenericValue(int64_t i64) RAPIDJSON_NOEXCEPT : data_(), flags_(kNumberInt64Flag) {
+ explicit GenericValue(int64_t i64) RAPIDJSON_NOEXCEPT : data_() {
data_.n.i64 = i64;
+ data_.f.flags = kNumberInt64Flag;
if (i64 >= 0) {
- flags_ |= kNumberUint64Flag;
+ data_.f.flags |= kNumberUint64Flag;
if (!(static_cast<uint64_t>(i64) & RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0x00000000)))
- flags_ |= kUintFlag;
+ data_.f.flags |= kUintFlag;
if (!(static_cast<uint64_t>(i64) & RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0x80000000)))
- flags_ |= kIntFlag;
+ data_.f.flags |= kIntFlag;
}
else if (i64 >= static_cast<int64_t>(RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0x80000000)))
- flags_ |= kIntFlag;
+ data_.f.flags |= kIntFlag;
}
//! Constructor for uint64_t value.
- explicit GenericValue(uint64_t u64) RAPIDJSON_NOEXCEPT : data_(), flags_(kNumberUint64Flag) {
+ explicit GenericValue(uint64_t u64) RAPIDJSON_NOEXCEPT : data_() {
data_.n.u64 = u64;
+ data_.f.flags = kNumberUint64Flag;
if (!(u64 & RAPIDJSON_UINT64_C2(0x80000000, 0x00000000)))
- flags_ |= kInt64Flag;
+ data_.f.flags |= kInt64Flag;
if (!(u64 & RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0x00000000)))
- flags_ |= kUintFlag;
+ data_.f.flags |= kUintFlag;
if (!(u64 & RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0x80000000)))
- flags_ |= kIntFlag;
+ data_.f.flags |= kIntFlag;
}
//! Constructor for double value.
- explicit GenericValue(double d) RAPIDJSON_NOEXCEPT : data_(), flags_(kNumberDoubleFlag) { data_.n.d = d; }
+ explicit GenericValue(double d) RAPIDJSON_NOEXCEPT : data_() { data_.n.d = d; data_.f.flags = kNumberDoubleFlag; }
+
+ //! Constructor for float value.
+ explicit GenericValue(float f) RAPIDJSON_NOEXCEPT : data_() { data_.n.d = static_cast<double>(f); data_.f.flags = kNumberDoubleFlag; }
//! Constructor for constant string (i.e. do not make a copy of string)
- GenericValue(const Ch* s, SizeType length) RAPIDJSON_NOEXCEPT : data_(), flags_() { SetStringRaw(StringRef(s, length)); }
+ GenericValue(const Ch* s, SizeType length) RAPIDJSON_NOEXCEPT : data_() { SetStringRaw(StringRef(s, length)); }
//! Constructor for constant string (i.e. do not make a copy of string)
- explicit GenericValue(StringRefType s) RAPIDJSON_NOEXCEPT : data_(), flags_() { SetStringRaw(s); }
+ explicit GenericValue(StringRefType s) RAPIDJSON_NOEXCEPT : data_() { SetStringRaw(s); }
//! Constructor for copy-string (i.e. do make a copy of string)
- GenericValue(const Ch* s, SizeType length, Allocator& allocator) : data_(), flags_() { SetStringRaw(StringRef(s, length), allocator); }
+ GenericValue(const Ch* s, SizeType length, Allocator& allocator) : data_() { SetStringRaw(StringRef(s, length), allocator); }
//! Constructor for copy-string (i.e. do make a copy of string)
- GenericValue(const Ch*s, Allocator& allocator) : data_(), flags_() { SetStringRaw(StringRef(s), allocator); }
+ GenericValue(const Ch*s, Allocator& allocator) : data_() { SetStringRaw(StringRef(s), allocator); }
#if RAPIDJSON_HAS_STDSTRING
//! Constructor for copy-string from a string object (i.e. do make a copy of string)
/*! \note Requires the definition of the preprocessor symbol \ref RAPIDJSON_HAS_STDSTRING.
*/
- GenericValue(const std::basic_string<Ch>& s, Allocator& allocator) : data_(), flags_() { SetStringRaw(StringRef(s), allocator); }
+ GenericValue(const std::basic_string<Ch>& s, Allocator& allocator) : data_() { SetStringRaw(StringRef(s), allocator); }
#endif
+ //! Constructor for Array.
+ /*!
+ \param a An array obtained by \c GetArray().
+ \note \c Array is always pass-by-value.
+ \note the source array is moved into this value and the sourec array becomes empty.
+ */
+ GenericValue(Array a) RAPIDJSON_NOEXCEPT : data_(a.value_.data_) {
+ a.value_.data_ = Data();
+ a.value_.data_.f.flags = kArrayFlag;
+ }
+
+ //! Constructor for Object.
+ /*!
+ \param o An object obtained by \c GetObject().
+ \note \c Object is always pass-by-value.
+ \note the source object is moved into this value and the sourec object becomes empty.
+ */
+ GenericValue(Object o) RAPIDJSON_NOEXCEPT : data_(o.value_.data_) {
+ o.value_.data_ = Data();
+ o.value_.data_.f.flags = kObjectFlag;
+ }
+
//! Destructor.
/*! Need to destruct elements of array, members of object, or copy-string.
*/
~GenericValue() {
if (Allocator::kNeedFree) { // Shortcut by Allocator's trait
- switch(flags_) {
+ switch(data_.f.flags) {
case kArrayFlag:
- for (GenericValue* v = data_.a.elements; v != data_.a.elements + data_.a.size; ++v)
- v->~GenericValue();
- Allocator::Free(data_.a.elements);
+ {
+ GenericValue* e = GetElementsPointer();
+ for (GenericValue* v = e; v != e + data_.a.size; ++v)
+ v->~GenericValue();
+ Allocator::Free(e);
+ }
break;
case kObjectFlag:
for (MemberIterator m = MemberBegin(); m != MemberEnd(); ++m)
m->~Member();
- Allocator::Free(data_.o.members);
+ Allocator::Free(GetMembersPointer());
break;
case kCopyStringFlag:
- Allocator::Free(const_cast<Ch*>(data_.s.str));
+ Allocator::Free(const_cast<Ch*>(GetStringPointer()));
break;
default:
@@ -638,12 +854,13 @@ public:
\tparam SourceAllocator Allocator type of \c rhs
\param rhs Value to copy from (read-only)
\param allocator Allocator to use for copying
+ \param copyConstStrings Force copying of constant strings (e.g. referencing an in-situ buffer)
*/
template <typename SourceAllocator>
- GenericValue& CopyFrom(const GenericValue<Encoding, SourceAllocator>& rhs, Allocator& allocator) {
- RAPIDJSON_ASSERT((void*)this != (void const*)&rhs);
+ GenericValue& CopyFrom(const GenericValue<Encoding, SourceAllocator>& rhs, Allocator& allocator, bool copyConstStrings = false) {
+ RAPIDJSON_ASSERT(static_cast<void*>(this) != static_cast<void const*>(&rhs));
this->~GenericValue();
- new (this) GenericValue(rhs, allocator);
+ new (this) GenericValue(rhs, allocator, copyConstStrings);
return *this;
}
@@ -660,6 +877,20 @@ public:
return *this;
}
+ //! free-standing swap function helper
+ /*!
+ Helper function to enable support for common swap implementation pattern based on \c std::swap:
+ \code
+ void swap(MyClass& a, MyClass& b) {
+ using std::swap;
+ swap(a.value, b.value);
+ // ...
+ }
+ \endcode
+ \see Swap()
+ */
+ friend inline void swap(GenericValue& a, GenericValue& b) RAPIDJSON_NOEXCEPT { a.Swap(b); }
+
//! Prepare Value for move semantics
/*! \return *this */
GenericValue& Move() RAPIDJSON_NOEXCEPT { return *this; }
@@ -709,7 +940,7 @@ public:
else
return data_.n.u64 == rhs.data_.n.u64;
- default: // kTrueType, kFalseType, kNullType
+ default:
return true;
}
}
@@ -757,20 +988,58 @@ public:
//!@name Type
//@{
- Type GetType() const { return static_cast<Type>(flags_ & kTypeMask); }
- bool IsNull() const { return flags_ == kNullFlag; }
- bool IsFalse() const { return flags_ == kFalseFlag; }
- bool IsTrue() const { return flags_ == kTrueFlag; }
- bool IsBool() const { return (flags_ & kBoolFlag) != 0; }
- bool IsObject() const { return flags_ == kObjectFlag; }
- bool IsArray() const { return flags_ == kArrayFlag; }
- bool IsNumber() const { return (flags_ & kNumberFlag) != 0; }
- bool IsInt() const { return (flags_ & kIntFlag) != 0; }
- bool IsUint() const { return (flags_ & kUintFlag) != 0; }
- bool IsInt64() const { return (flags_ & kInt64Flag) != 0; }
- bool IsUint64() const { return (flags_ & kUint64Flag) != 0; }
- bool IsDouble() const { return (flags_ & kDoubleFlag) != 0; }
- bool IsString() const { return (flags_ & kStringFlag) != 0; }
+ Type GetType() const { return static_cast<Type>(data_.f.flags & kTypeMask); }
+ bool IsNull() const { return data_.f.flags == kNullFlag; }
+ bool IsFalse() const { return data_.f.flags == kFalseFlag; }
+ bool IsTrue() const { return data_.f.flags == kTrueFlag; }
+ bool IsBool() const { return (data_.f.flags & kBoolFlag) != 0; }
+ bool IsObject() const { return data_.f.flags == kObjectFlag; }
+ bool IsArray() const { return data_.f.flags == kArrayFlag; }
+ bool IsNumber() const { return (data_.f.flags & kNumberFlag) != 0; }
+ bool IsInt() const { return (data_.f.flags & kIntFlag) != 0; }
+ bool IsUint() const { return (data_.f.flags & kUintFlag) != 0; }
+ bool IsInt64() const { return (data_.f.flags & kInt64Flag) != 0; }
+ bool IsUint64() const { return (data_.f.flags & kUint64Flag) != 0; }
+ bool IsDouble() const { return (data_.f.flags & kDoubleFlag) != 0; }
+ bool IsString() const { return (data_.f.flags & kStringFlag) != 0; }
+
+ // Checks whether a number can be losslessly converted to a double.
+ bool IsLosslessDouble() const {
+ if (!IsNumber()) return false;
+ if (IsUint64()) {
+ uint64_t u = GetUint64();
+ volatile double d = static_cast<double>(u);
+ return (d >= 0.0)
+ && (d < static_cast<double>((std::numeric_limits<uint64_t>::max)()))
+ && (u == static_cast<uint64_t>(d));
+ }
+ if (IsInt64()) {
+ int64_t i = GetInt64();
+ volatile double d = static_cast<double>(i);
+ return (d >= static_cast<double>((std::numeric_limits<int64_t>::min)()))
+ && (d < static_cast<double>((std::numeric_limits<int64_t>::max)()))
+ && (i == static_cast<int64_t>(d));
+ }
+ return true; // double, int, uint are always lossless
+ }
+
+ // Checks whether a number is a float (possible lossy).
+ bool IsFloat() const {
+ if ((data_.f.flags & kDoubleFlag) == 0)
+ return false;
+ double d = GetDouble();
+ return d >= -3.4028234e38 && d <= 3.4028234e38;
+ }
+ // Checks whether a number can be losslessly converted to a float.
+ bool IsLosslessFloat() const {
+ if (!IsNumber()) return false;
+ double a = GetDouble();
+ if (a < static_cast<double>(-(std::numeric_limits<float>::max)())
+ || a > static_cast<double>((std::numeric_limits<float>::max)()))
+ return false;
+ double b = static_cast<double>(static_cast<float>(a));
+ return a >= b && a <= b; // Prevent -Wfloat-equal
+ }
//@}
@@ -784,7 +1053,7 @@ public:
//!@name Bool
//@{
- bool GetBool() const { RAPIDJSON_ASSERT(IsBool()); return flags_ == kTrueFlag; }
+ bool GetBool() const { RAPIDJSON_ASSERT(IsBool()); return data_.f.flags == kTrueFlag; }
//!< Set boolean value
/*! \post IsBool() == true */
GenericValue& SetBool(bool b) { this->~GenericValue(); new (this) GenericValue(b); return *this; }
@@ -837,8 +1106,14 @@ public:
return member->value;
else {
RAPIDJSON_ASSERT(false); // see above note
- static GenericValue NullValue;
- return NullValue;
+
+ // This will generate -Wexit-time-destructors in clang
+ // static GenericValue NullValue;
+ // return NullValue;
+
+ // Use static buffer and placement-new to prevent destruction
+ static char buffer[sizeof(GenericValue)];
+ return *new (buffer) GenericValue();
}
}
template <typename SourceAllocator>
@@ -852,16 +1127,16 @@ public:
//! Const member iterator
/*! \pre IsObject() == true */
- ConstMemberIterator MemberBegin() const { RAPIDJSON_ASSERT(IsObject()); return ConstMemberIterator(data_.o.members); }
+ ConstMemberIterator MemberBegin() const { RAPIDJSON_ASSERT(IsObject()); return ConstMemberIterator(GetMembersPointer()); }
//! Const \em past-the-end member iterator
/*! \pre IsObject() == true */
- ConstMemberIterator MemberEnd() const { RAPIDJSON_ASSERT(IsObject()); return ConstMemberIterator(data_.o.members + data_.o.size); }
+ ConstMemberIterator MemberEnd() const { RAPIDJSON_ASSERT(IsObject()); return ConstMemberIterator(GetMembersPointer() + data_.o.size); }
//! Member iterator
/*! \pre IsObject() == true */
- MemberIterator MemberBegin() { RAPIDJSON_ASSERT(IsObject()); return MemberIterator(data_.o.members); }
+ MemberIterator MemberBegin() { RAPIDJSON_ASSERT(IsObject()); return MemberIterator(GetMembersPointer()); }
//! \em Past-the-end member iterator
/*! \pre IsObject() == true */
- MemberIterator MemberEnd() { RAPIDJSON_ASSERT(IsObject()); return MemberIterator(data_.o.members + data_.o.size); }
+ MemberIterator MemberEnd() { RAPIDJSON_ASSERT(IsObject()); return MemberIterator(GetMembersPointer() + data_.o.size); }
//! Check whether a member exists in the object.
/*!
@@ -949,8 +1224,8 @@ public:
\return Iterator to member, if it exists.
Otherwise returns \ref MemberEnd().
*/
- MemberIterator FindMember(const std::basic_string<Ch>& name) { return FindMember(StringRef(name)); }
- ConstMemberIterator FindMember(const std::basic_string<Ch>& name) const { return FindMember(StringRef(name)); }
+ MemberIterator FindMember(const std::basic_string<Ch>& name) { return FindMember(GenericValue(StringRef(name))); }
+ ConstMemberIterator FindMember(const std::basic_string<Ch>& name) const { return FindMember(GenericValue(StringRef(name))); }
#endif
//! Add a member (name-value pair) to the object.
@@ -967,20 +1242,21 @@ public:
RAPIDJSON_ASSERT(IsObject());
RAPIDJSON_ASSERT(name.IsString());
- Object& o = data_.o;
+ ObjectData& o = data_.o;
if (o.size >= o.capacity) {
if (o.capacity == 0) {
o.capacity = kDefaultObjectCapacity;
- o.members = reinterpret_cast<Member*>(allocator.Malloc(o.capacity * sizeof(Member)));
+ SetMembersPointer(reinterpret_cast<Member*>(allocator.Malloc(o.capacity * sizeof(Member))));
}
else {
SizeType oldCapacity = o.capacity;
o.capacity += (oldCapacity + 1) / 2; // grow by factor 1.5
- o.members = reinterpret_cast<Member*>(allocator.Realloc(o.members, oldCapacity * sizeof(Member), o.capacity * sizeof(Member)));
+ SetMembersPointer(reinterpret_cast<Member*>(allocator.Realloc(GetMembersPointer(), oldCapacity * sizeof(Member), o.capacity * sizeof(Member))));
}
}
- o.members[o.size].name.RawAssign(name);
- o.members[o.size].value.RawAssign(value);
+ Member* members = GetMembersPointer();
+ members[o.size].name.RawAssign(name);
+ members[o.size].value.RawAssign(value);
o.size++;
return *this;
}
@@ -1159,18 +1435,14 @@ public:
MemberIterator RemoveMember(MemberIterator m) {
RAPIDJSON_ASSERT(IsObject());
RAPIDJSON_ASSERT(data_.o.size > 0);
- RAPIDJSON_ASSERT(data_.o.members != 0);
+ RAPIDJSON_ASSERT(GetMembersPointer() != 0);
RAPIDJSON_ASSERT(m >= MemberBegin() && m < MemberEnd());
- MemberIterator last(data_.o.members + (data_.o.size - 1));
- if (data_.o.size > 1 && m != last) {
- // Move the last one to this place
- *m = *last;
- }
- else {
- // Only one left, just destroy
- m->~Member();
- }
+ MemberIterator last(GetMembersPointer() + (data_.o.size - 1));
+ if (data_.o.size > 1 && m != last)
+ *m = *last; // Move the last one to this place
+ else
+ m->~Member(); // Only one left, just destroy
--data_.o.size;
return m;
}
@@ -1200,7 +1472,7 @@ public:
MemberIterator EraseMember(ConstMemberIterator first, ConstMemberIterator last) {
RAPIDJSON_ASSERT(IsObject());
RAPIDJSON_ASSERT(data_.o.size > 0);
- RAPIDJSON_ASSERT(data_.o.members != 0);
+ RAPIDJSON_ASSERT(GetMembersPointer() != 0);
RAPIDJSON_ASSERT(first >= MemberBegin());
RAPIDJSON_ASSERT(first <= last);
RAPIDJSON_ASSERT(last <= MemberEnd());
@@ -1208,11 +1480,39 @@ public:
MemberIterator pos = MemberBegin() + (first - MemberBegin());
for (MemberIterator itr = pos; itr != last; ++itr)
itr->~Member();
- std::memmove(&*pos, &*last, (MemberEnd() - last) * sizeof(Member));
- data_.o.size -= (last - first);
+ std::memmove(&*pos, &*last, static_cast<size_t>(MemberEnd() - last) * sizeof(Member));
+ data_.o.size -= static_cast<SizeType>(last - first);
return pos;
}
+ //! Erase a member in object by its name.
+ /*! \param name Name of member to be removed.
+ \return Whether the member existed.
+ \note Linear time complexity.
+ */
+ bool EraseMember(const Ch* name) {
+ GenericValue n(StringRef(name));
+ return EraseMember(n);
+ }
+
+#if RAPIDJSON_HAS_STDSTRING
+ bool EraseMember(const std::basic_string<Ch>& name) { return EraseMember(GenericValue(StringRef(name))); }
+#endif
+
+ template <typename SourceAllocator>
+ bool EraseMember(const GenericValue<Encoding, SourceAllocator>& name) {
+ MemberIterator m = FindMember(name);
+ if (m != MemberEnd()) {
+ EraseMember(m);
+ return true;
+ }
+ else
+ return false;
+ }
+
+ Object GetObject() { RAPIDJSON_ASSERT(IsObject()); return Object(*this); }
+ ConstObject GetObject() const { RAPIDJSON_ASSERT(IsObject()); return ConstObject(*this); }
+
//@}
//!@name Array
@@ -1220,7 +1520,7 @@ public:
//! Set this value as an empty array.
/*! \post IsArray == true */
- GenericValue& SetArray() { this->~GenericValue(); new (this) GenericValue(kArrayType); return *this; }
+ GenericValue& SetArray() { this->~GenericValue(); new (this) GenericValue(kArrayType); return *this; }
//! Get the number of elements in array.
SizeType Size() const { RAPIDJSON_ASSERT(IsArray()); return data_.a.size; }
@@ -1237,8 +1537,9 @@ public:
*/
void Clear() {
RAPIDJSON_ASSERT(IsArray());
- for (SizeType i = 0; i < data_.a.size; ++i)
- data_.a.elements[i].~GenericValue();
+ GenericValue* e = GetElementsPointer();
+ for (GenericValue* v = e; v != e + data_.a.size; ++v)
+ v->~GenericValue();
data_.a.size = 0;
}
@@ -1250,16 +1551,16 @@ public:
GenericValue& operator[](SizeType index) {
RAPIDJSON_ASSERT(IsArray());
RAPIDJSON_ASSERT(index < data_.a.size);
- return data_.a.elements[index];
+ return GetElementsPointer()[index];
}
const GenericValue& operator[](SizeType index) const { return const_cast<GenericValue&>(*this)[index]; }
//! Element iterator
/*! \pre IsArray() == true */
- ValueIterator Begin() { RAPIDJSON_ASSERT(IsArray()); return data_.a.elements; }
+ ValueIterator Begin() { RAPIDJSON_ASSERT(IsArray()); return GetElementsPointer(); }
//! \em Past-the-end element iterator
/*! \pre IsArray() == true */
- ValueIterator End() { RAPIDJSON_ASSERT(IsArray()); return data_.a.elements + data_.a.size; }
+ ValueIterator End() { RAPIDJSON_ASSERT(IsArray()); return GetElementsPointer() + data_.a.size; }
//! Constant element iterator
/*! \pre IsArray() == true */
ConstValueIterator Begin() const { return const_cast<GenericValue&>(*this).Begin(); }
@@ -1276,7 +1577,7 @@ public:
GenericValue& Reserve(SizeType newCapacity, Allocator &allocator) {
RAPIDJSON_ASSERT(IsArray());
if (newCapacity > data_.a.capacity) {
- data_.a.elements = (GenericValue*)allocator.Realloc(data_.a.elements, data_.a.capacity * sizeof(GenericValue), newCapacity * sizeof(GenericValue));
+ SetElementsPointer(reinterpret_cast<GenericValue*>(allocator.Realloc(GetElementsPointer(), data_.a.capacity * sizeof(GenericValue), newCapacity * sizeof(GenericValue))));
data_.a.capacity = newCapacity;
}
return *this;
@@ -1296,7 +1597,7 @@ public:
RAPIDJSON_ASSERT(IsArray());
if (data_.a.size >= data_.a.capacity)
Reserve(data_.a.capacity == 0 ? kDefaultArrayCapacity : (data_.a.capacity + (data_.a.capacity + 1) / 2), allocator);
- data_.a.elements[data_.a.size++].RawAssign(value);
+ GetElementsPointer()[data_.a.size++].RawAssign(value);
return *this;
}
@@ -1350,7 +1651,7 @@ public:
GenericValue& PopBack() {
RAPIDJSON_ASSERT(IsArray());
RAPIDJSON_ASSERT(!Empty());
- data_.a.elements[--data_.a.size].~GenericValue();
+ GetElementsPointer()[--data_.a.size].~GenericValue();
return *this;
}
@@ -1376,35 +1677,48 @@ public:
ValueIterator Erase(ConstValueIterator first, ConstValueIterator last) {
RAPIDJSON_ASSERT(IsArray());
RAPIDJSON_ASSERT(data_.a.size > 0);
- RAPIDJSON_ASSERT(data_.a.elements != 0);
+ RAPIDJSON_ASSERT(GetElementsPointer() != 0);
RAPIDJSON_ASSERT(first >= Begin());
RAPIDJSON_ASSERT(first <= last);
RAPIDJSON_ASSERT(last <= End());
ValueIterator pos = Begin() + (first - Begin());
for (ValueIterator itr = pos; itr != last; ++itr)
itr->~GenericValue();
- std::memmove(pos, last, (End() - last) * sizeof(GenericValue));
- data_.a.size -= (last - first);
+ std::memmove(pos, last, static_cast<size_t>(End() - last) * sizeof(GenericValue));
+ data_.a.size -= static_cast<SizeType>(last - first);
return pos;
}
+ Array GetArray() { RAPIDJSON_ASSERT(IsArray()); return Array(*this); }
+ ConstArray GetArray() const { RAPIDJSON_ASSERT(IsArray()); return ConstArray(*this); }
+
//@}
//!@name Number
//@{
- int GetInt() const { RAPIDJSON_ASSERT(flags_ & kIntFlag); return data_.n.i.i; }
- unsigned GetUint() const { RAPIDJSON_ASSERT(flags_ & kUintFlag); return data_.n.u.u; }
- int64_t GetInt64() const { RAPIDJSON_ASSERT(flags_ & kInt64Flag); return data_.n.i64; }
- uint64_t GetUint64() const { RAPIDJSON_ASSERT(flags_ & kUint64Flag); return data_.n.u64; }
+ int GetInt() const { RAPIDJSON_ASSERT(data_.f.flags & kIntFlag); return data_.n.i.i; }
+ unsigned GetUint() const { RAPIDJSON_ASSERT(data_.f.flags & kUintFlag); return data_.n.u.u; }
+ int64_t GetInt64() const { RAPIDJSON_ASSERT(data_.f.flags & kInt64Flag); return data_.n.i64; }
+ uint64_t GetUint64() const { RAPIDJSON_ASSERT(data_.f.flags & kUint64Flag); return data_.n.u64; }
+ //! Get the value as double type.
+ /*! \note If the value is 64-bit integer type, it may lose precision. Use \c IsLosslessDouble() to check whether the converison is lossless.
+ */
double GetDouble() const {
RAPIDJSON_ASSERT(IsNumber());
- if ((flags_ & kDoubleFlag) != 0) return data_.n.d; // exact type, no conversion.
- if ((flags_ & kIntFlag) != 0) return data_.n.i.i; // int -> double
- if ((flags_ & kUintFlag) != 0) return data_.n.u.u; // unsigned -> double
- if ((flags_ & kInt64Flag) != 0) return (double)data_.n.i64; // int64_t -> double (may lose precision)
- RAPIDJSON_ASSERT((flags_ & kUint64Flag) != 0); return (double)data_.n.u64; // uint64_t -> double (may lose precision)
+ if ((data_.f.flags & kDoubleFlag) != 0) return data_.n.d; // exact type, no conversion.
+ if ((data_.f.flags & kIntFlag) != 0) return data_.n.i.i; // int -> double
+ if ((data_.f.flags & kUintFlag) != 0) return data_.n.u.u; // unsigned -> double
+ if ((data_.f.flags & kInt64Flag) != 0) return static_cast<double>(data_.n.i64); // int64_t -> double (may lose precision)
+ RAPIDJSON_ASSERT((data_.f.flags & kUint64Flag) != 0); return static_cast<double>(data_.n.u64); // uint64_t -> double (may lose precision)
+ }
+
+ //! Get the value as float type.
+ /*! \note If the value is 64-bit integer type, it may lose precision. Use \c IsLosslessFloat() to check whether the converison is lossless.
+ */
+ float GetFloat() const {
+ return static_cast<float>(GetDouble());
}
GenericValue& SetInt(int i) { this->~GenericValue(); new (this) GenericValue(i); return *this; }
@@ -1412,18 +1726,19 @@ public:
GenericValue& SetInt64(int64_t i64) { this->~GenericValue(); new (this) GenericValue(i64); return *this; }
GenericValue& SetUint64(uint64_t u64) { this->~GenericValue(); new (this) GenericValue(u64); return *this; }
GenericValue& SetDouble(double d) { this->~GenericValue(); new (this) GenericValue(d); return *this; }
+ GenericValue& SetFloat(float f) { this->~GenericValue(); new (this) GenericValue(static_cast<double>(f)); return *this; }
//@}
//!@name String
//@{
- const Ch* GetString() const { RAPIDJSON_ASSERT(IsString()); return ((flags_ & kInlineStrFlag) ? data_.ss.str : data_.s.str); }
+ const Ch* GetString() const { RAPIDJSON_ASSERT(IsString()); return (data_.f.flags & kInlineStrFlag) ? data_.ss.str : GetStringPointer(); }
//! Get the length of string.
/*! Since rapidjson permits "\\u0000" in the json string, strlen(v.GetString()) may not equal to v.GetStringLength().
*/
- SizeType GetStringLength() const { RAPIDJSON_ASSERT(IsString()); return ((flags_ & kInlineStrFlag) ? (data_.ss.GetLength()) : data_.s.length); }
+ SizeType GetStringLength() const { RAPIDJSON_ASSERT(IsString()); return ((data_.f.flags & kInlineStrFlag) ? (data_.ss.GetLength()) : data_.s.length); }
//! Set this value as a string without copying source string.
/*! This version has better performance with supplied length, and also support string containing null character.
@@ -1450,7 +1765,7 @@ public:
\return The value itself for fluent API.
\post IsString() == true && GetString() != s && strcmp(GetString(),s) == 0 && GetStringLength() == length
*/
- GenericValue& SetString(const Ch* s, SizeType length, Allocator& allocator) { this->~GenericValue(); SetStringRaw(StringRef(s, length), allocator); return *this; }
+ GenericValue& SetString(const Ch* s, SizeType length, Allocator& allocator) { return SetString(StringRef(s, length), allocator); }
//! Set this value as a string by copying from source string.
/*! \param s source string.
@@ -1458,7 +1773,15 @@ public:
\return The value itself for fluent API.
\post IsString() == true && GetString() != s && strcmp(GetString(),s) == 0 && GetStringLength() == length
*/
- GenericValue& SetString(const Ch* s, Allocator& allocator) { return SetString(s, internal::StrLen(s), allocator); }
+ GenericValue& SetString(const Ch* s, Allocator& allocator) { return SetString(StringRef(s), allocator); }
+
+ //! Set this value as a string by copying from source string.
+ /*! \param s source string reference
+ \param allocator Allocator for allocating copied buffer. Commonly use GenericDocument::GetAllocator().
+ \return The value itself for fluent API.
+ \post IsString() == true && GetString() != s.s && strcmp(GetString(),s) == 0 && GetStringLength() == length
+ */
+ GenericValue& SetString(StringRefType s, Allocator& allocator) { this->~GenericValue(); SetStringRaw(s, allocator); return *this; }
#if RAPIDJSON_HAS_STDSTRING
//! Set this value as a string by copying from source string.
@@ -1468,11 +1791,35 @@ public:
\post IsString() == true && GetString() != s.data() && strcmp(GetString(),s.data() == 0 && GetStringLength() == s.size()
\note Requires the definition of the preprocessor symbol \ref RAPIDJSON_HAS_STDSTRING.
*/
- GenericValue& SetString(const std::basic_string<Ch>& s, Allocator& allocator) { return SetString(s.data(), SizeType(s.size()), allocator); }
+ GenericValue& SetString(const std::basic_string<Ch>& s, Allocator& allocator) { return SetString(StringRef(s), allocator); }
#endif
//@}
+ //!@name Array
+ //@{
+
+ //! Templated version for checking whether this value is type T.
+ /*!
+ \tparam T Either \c bool, \c int, \c unsigned, \c int64_t, \c uint64_t, \c double, \c float, \c const \c char*, \c std::basic_string<Ch>
+ */
+ template <typename T>
+ bool Is() const { return internal::TypeHelper<ValueType, T>::Is(*this); }
+
+ template <typename T>
+ T Get() const { return internal::TypeHelper<ValueType, T>::Get(*this); }
+
+ template <typename T>
+ T Get() { return internal::TypeHelper<ValueType, T>::Get(*this); }
+
+ template<typename T>
+ ValueType& Set(const T& data) { return internal::TypeHelper<ValueType, T>::Set(*this, data); }
+
+ template<typename T>
+ ValueType& Set(const T& data, AllocatorType& allocator) { return internal::TypeHelper<ValueType, T>::Set(*this, data, allocator); }
+
+ //@}
+
//! Generate events of this value to a Handler.
/*! This function adopts the GoF visitor pattern.
Typical usage is to output this JSON value as JSON text via Writer, which is a Handler.
@@ -1488,35 +1835,35 @@ public:
case kTrueType: return handler.Bool(true);
case kObjectType:
- if (!handler.StartObject())
+ if (RAPIDJSON_UNLIKELY(!handler.StartObject()))
return false;
for (ConstMemberIterator m = MemberBegin(); m != MemberEnd(); ++m) {
RAPIDJSON_ASSERT(m->name.IsString()); // User may change the type of name by MemberIterator.
- if (!handler.Key(m->name.GetString(), m->name.GetStringLength(), (m->name.flags_ & kCopyFlag) != 0))
+ if (RAPIDJSON_UNLIKELY(!handler.Key(m->name.GetString(), m->name.GetStringLength(), (m->name.data_.f.flags & kCopyFlag) != 0)))
return false;
- if (!m->value.Accept(handler))
+ if (RAPIDJSON_UNLIKELY(!m->value.Accept(handler)))
return false;
}
return handler.EndObject(data_.o.size);
case kArrayType:
- if (!handler.StartArray())
+ if (RAPIDJSON_UNLIKELY(!handler.StartArray()))
return false;
- for (GenericValue* v = data_.a.elements; v != data_.a.elements + data_.a.size; ++v)
- if (!v->Accept(handler))
+ for (const GenericValue* v = Begin(); v != End(); ++v)
+ if (RAPIDJSON_UNLIKELY(!v->Accept(handler)))
return false;
return handler.EndArray(data_.a.size);
case kStringType:
- return handler.String(GetString(), GetStringLength(), (flags_ & kCopyFlag) != 0);
+ return handler.String(GetString(), GetStringLength(), (data_.f.flags & kCopyFlag) != 0);
default:
RAPIDJSON_ASSERT(GetType() == kNumberType);
- if (IsInt()) return handler.Int(data_.n.i.i);
+ if (IsDouble()) return handler.Double(data_.n.d);
+ else if (IsInt()) return handler.Int(data_.n.i.i);
else if (IsUint()) return handler.Uint(data_.n.u.u);
else if (IsInt64()) return handler.Int64(data_.n.i64);
- else if (IsUint64()) return handler.Uint64(data_.n.u64);
- else return handler.Double(data_.n.d);
+ else return handler.Uint64(data_.n.u64);
}
}
@@ -1525,16 +1872,16 @@ private:
template <typename, typename, typename> friend class GenericDocument;
enum {
- kBoolFlag = 0x100,
- kNumberFlag = 0x200,
- kIntFlag = 0x400,
- kUintFlag = 0x800,
- kInt64Flag = 0x1000,
- kUint64Flag = 0x2000,
- kDoubleFlag = 0x4000,
- kStringFlag = 0x100000,
- kCopyFlag = 0x200000,
- kInlineStrFlag = 0x400000,
+ kBoolFlag = 0x0008,
+ kNumberFlag = 0x0010,
+ kIntFlag = 0x0020,
+ kUintFlag = 0x0040,
+ kInt64Flag = 0x0080,
+ kUint64Flag = 0x0100,
+ kDoubleFlag = 0x0200,
+ kStringFlag = 0x0400,
+ kCopyFlag = 0x0800,
+ kInlineStrFlag = 0x1000,
// Initial flags of different types.
kNullFlag = kNullType,
@@ -1552,16 +1899,27 @@ private:
kObjectFlag = kObjectType,
kArrayFlag = kArrayType,
- kTypeMask = 0xFF // bitwise-and with mask of 0xFF can be optimized by compiler
+ kTypeMask = 0x07
};
static const SizeType kDefaultArrayCapacity = 16;
static const SizeType kDefaultObjectCapacity = 16;
+ struct Flag {
+#if RAPIDJSON_48BITPOINTER_OPTIMIZATION
+ char payload[sizeof(SizeType) * 2 + 6]; // 2 x SizeType + lower 48-bit pointer
+#elif RAPIDJSON_64BIT
+ char payload[sizeof(SizeType) * 2 + sizeof(void*) + 6]; // 6 padding bytes
+#else
+ char payload[sizeof(SizeType) * 2 + sizeof(void*) + 2]; // 2 padding bytes
+#endif
+ uint16_t flags;
+ };
+
struct String {
- const Ch* str;
SizeType length;
- unsigned hashcode; //!< reserved
+ SizeType hashcode; //!< reserved
+ const Ch* str;
}; // 12 bytes in 32-bit mode, 16 bytes in 64-bit mode
// implementation detail: ShortString can represent zero-terminated strings up to MaxSize chars
@@ -1570,15 +1928,15 @@ private:
// to store has the maximal length of MaxSize then str[LenPos] will be 0 and therefore act as
// the string terminator as well. For getting the string length back from that value just use
// "MaxSize - str[LenPos]".
- // This allows to store 11-chars strings in 32-bit mode and 15-chars strings in 64-bit mode
- // inline (for `UTF8`-encoded strings).
+ // This allows to store 13-chars strings in 32-bit mode, 21-chars strings in 64-bit mode,
+ // 13-chars strings for RAPIDJSON_48BITPOINTER_OPTIMIZATION=1 inline (for `UTF8`-encoded strings).
struct ShortString {
- enum { MaxChars = sizeof(String) / sizeof(Ch), MaxSize = MaxChars - 1, LenPos = MaxSize };
+ enum { MaxChars = sizeof(static_cast<Flag*>(0)->payload) / sizeof(Ch), MaxSize = MaxChars - 1, LenPos = MaxSize };
Ch str[MaxChars];
- inline static bool Usable(SizeType len) { return (MaxSize >= len); }
- inline void SetLength(SizeType len) { str[LenPos] = (Ch)(MaxSize - len); }
- inline SizeType GetLength() const { return (SizeType)(MaxSize - str[LenPos]); }
+ inline static bool Usable(SizeType len) { return (MaxSize >= len); }
+ inline void SetLength(SizeType len) { str[LenPos] = static_cast<Ch>(MaxSize - len); }
+ inline SizeType GetLength() const { return static_cast<SizeType>(MaxSize - str[LenPos]); }
}; // at most as many bytes as "String" above => 12 bytes in 32-bit mode, 16 bytes in 64-bit mode
// By using proper binary layout, retrieval of different integer types do not need conversions.
@@ -1607,69 +1965,79 @@ private:
double d;
}; // 8 bytes
- struct Object {
- Member* members;
+ struct ObjectData {
SizeType size;
SizeType capacity;
+ Member* members;
}; // 12 bytes in 32-bit mode, 16 bytes in 64-bit mode
- struct Array {
- GenericValue* elements;
+ struct ArrayData {
SizeType size;
SizeType capacity;
+ GenericValue* elements;
}; // 12 bytes in 32-bit mode, 16 bytes in 64-bit mode
union Data {
String s;
ShortString ss;
Number n;
- Object o;
- Array a;
- }; // 12 bytes in 32-bit mode, 16 bytes in 64-bit mode
+ ObjectData o;
+ ArrayData a;
+ Flag f;
+ }; // 16 bytes in 32-bit mode, 24 bytes in 64-bit mode, 16 bytes in 64-bit with RAPIDJSON_48BITPOINTER_OPTIMIZATION
+
+ RAPIDJSON_FORCEINLINE const Ch* GetStringPointer() const { return RAPIDJSON_GETPOINTER(Ch, data_.s.str); }
+ RAPIDJSON_FORCEINLINE const Ch* SetStringPointer(const Ch* str) { return RAPIDJSON_SETPOINTER(Ch, data_.s.str, str); }
+ RAPIDJSON_FORCEINLINE GenericValue* GetElementsPointer() const { return RAPIDJSON_GETPOINTER(GenericValue, data_.a.elements); }
+ RAPIDJSON_FORCEINLINE GenericValue* SetElementsPointer(GenericValue* elements) { return RAPIDJSON_SETPOINTER(GenericValue, data_.a.elements, elements); }
+ RAPIDJSON_FORCEINLINE Member* GetMembersPointer() const { return RAPIDJSON_GETPOINTER(Member, data_.o.members); }
+ RAPIDJSON_FORCEINLINE Member* SetMembersPointer(Member* members) { return RAPIDJSON_SETPOINTER(Member, data_.o.members, members); }
// Initialize this value as array with initial data, without calling destructor.
void SetArrayRaw(GenericValue* values, SizeType count, Allocator& allocator) {
- flags_ = kArrayFlag;
+ data_.f.flags = kArrayFlag;
if (count) {
- data_.a.elements = (GenericValue*)allocator.Malloc(count * sizeof(GenericValue));
- std::memcpy(data_.a.elements, values, count * sizeof(GenericValue));
+ GenericValue* e = static_cast<GenericValue*>(allocator.Malloc(count * sizeof(GenericValue)));
+ SetElementsPointer(e);
+ std::memcpy(e, values, count * sizeof(GenericValue));
}
else
- data_.a.elements = NULL;
+ SetElementsPointer(0);
data_.a.size = data_.a.capacity = count;
}
//! Initialize this value as object with initial data, without calling destructor.
void SetObjectRaw(Member* members, SizeType count, Allocator& allocator) {
- flags_ = kObjectFlag;
+ data_.f.flags = kObjectFlag;
if (count) {
- data_.o.members = (Member*)allocator.Malloc(count * sizeof(Member));
- std::memcpy(data_.o.members, members, count * sizeof(Member));
+ Member* m = static_cast<Member*>(allocator.Malloc(count * sizeof(Member)));
+ SetMembersPointer(m);
+ std::memcpy(m, members, count * sizeof(Member));
}
else
- data_.o.members = NULL;
+ SetMembersPointer(0);
data_.o.size = data_.o.capacity = count;
}
//! Initialize this value as constant string, without calling destructor.
void SetStringRaw(StringRefType s) RAPIDJSON_NOEXCEPT {
- flags_ = kConstStringFlag;
- data_.s.str = s;
+ data_.f.flags = kConstStringFlag;
+ SetStringPointer(s);
data_.s.length = s.length;
}
//! Initialize this value as copy string with initial data, without calling destructor.
void SetStringRaw(StringRefType s, Allocator& allocator) {
- Ch* str = NULL;
- if(ShortString::Usable(s.length)) {
- flags_ = kShortStringFlag;
+ Ch* str = 0;
+ if (ShortString::Usable(s.length)) {
+ data_.f.flags = kShortStringFlag;
data_.ss.SetLength(s.length);
str = data_.ss.str;
} else {
- flags_ = kCopyStringFlag;
+ data_.f.flags = kCopyStringFlag;
data_.s.length = s.length;
- str = (Ch *)allocator.Malloc((s.length + 1) * sizeof(Ch));
- data_.s.str = str;
+ str = static_cast<Ch *>(allocator.Malloc((s.length + 1) * sizeof(Ch)));
+ SetStringPointer(str);
}
std::memcpy(str, s, s.length * sizeof(Ch));
str[s.length] = '\0';
@@ -1678,8 +2046,8 @@ private:
//! Assignment without calling destructor
void RawAssign(GenericValue& rhs) RAPIDJSON_NOEXCEPT {
data_ = rhs.data_;
- flags_ = rhs.flags_;
- rhs.flags_ = kNullFlag;
+ // data_.f.flags = rhs.data_.f.flags;
+ rhs.data_.f.flags = kNullFlag;
}
template <typename SourceAllocator>
@@ -1699,7 +2067,6 @@ private:
}
Data data_;
- unsigned flags_;
};
//! GenericValue with UTF8 encoding
@@ -1724,7 +2091,22 @@ public:
typedef Allocator AllocatorType; //!< Allocator type from template parameter.
//! Constructor
- /*! \param allocator Optional allocator for allocating memory.
+ /*! Creates an empty document of specified type.
+ \param type Mandatory type of object to create.
+ \param allocator Optional allocator for allocating memory.
+ \param stackCapacity Optional initial capacity of stack in bytes.
+ \param stackAllocator Optional allocator for allocating memory for stack.
+ */
+ explicit GenericDocument(Type type, Allocator* allocator = 0, size_t stackCapacity = kDefaultStackCapacity, StackAllocator* stackAllocator = 0) :
+ GenericValue<Encoding, Allocator>(type), allocator_(allocator), ownAllocator_(0), stack_(stackAllocator, stackCapacity), parseResult_()
+ {
+ if (!allocator_)
+ ownAllocator_ = allocator_ = RAPIDJSON_NEW(Allocator)();
+ }
+
+ //! Constructor
+ /*! Creates an empty document which type is Null.
+ \param allocator Optional allocator for allocating memory.
\param stackCapacity Optional initial capacity of stack in bytes.
\param stackAllocator Optional allocator for allocating memory for stack.
*/
@@ -1732,13 +2114,13 @@ public:
allocator_(allocator), ownAllocator_(0), stack_(stackAllocator, stackCapacity), parseResult_()
{
if (!allocator_)
- ownAllocator_ = allocator_ = RAPIDJSON_NEW(Allocator());
+ ownAllocator_ = allocator_ = RAPIDJSON_NEW(Allocator)();
}
#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
//! Move constructor in C++11
GenericDocument(GenericDocument&& rhs) RAPIDJSON_NOEXCEPT
- : ValueType(std::move(rhs)),
+ : ValueType(std::forward<ValueType>(rhs)), // explicit cast to avoid prohibited move from Document
allocator_(rhs.allocator_),
ownAllocator_(rhs.ownAllocator_),
stack_(std::move(rhs.stack_)),
@@ -1778,6 +2160,54 @@ public:
}
#endif
+ //! Exchange the contents of this document with those of another.
+ /*!
+ \param rhs Another document.
+ \note Constant complexity.
+ \see GenericValue::Swap
+ */
+ GenericDocument& Swap(GenericDocument& rhs) RAPIDJSON_NOEXCEPT {
+ ValueType::Swap(rhs);
+ stack_.Swap(rhs.stack_);
+ internal::Swap(allocator_, rhs.allocator_);
+ internal::Swap(ownAllocator_, rhs.ownAllocator_);
+ internal::Swap(parseResult_, rhs.parseResult_);
+ return *this;
+ }
+
+ // Allow Swap with ValueType.
+ // Refer to Effective C++ 3rd Edition/Item 33: Avoid hiding inherited names.
+ using ValueType::Swap;
+
+ //! free-standing swap function helper
+ /*!
+ Helper function to enable support for common swap implementation pattern based on \c std::swap:
+ \code
+ void swap(MyClass& a, MyClass& b) {
+ using std::swap;
+ swap(a.doc, b.doc);
+ // ...
+ }
+ \endcode
+ \see Swap()
+ */
+ friend inline void swap(GenericDocument& a, GenericDocument& b) RAPIDJSON_NOEXCEPT { a.Swap(b); }
+
+ //! Populate this document by a generator which produces SAX events.
+ /*! \tparam Generator A functor with <tt>bool f(Handler)</tt> prototype.
+ \param g Generator functor which sends SAX events to the parameter.
+ \return The document itself for fluent API.
+ */
+ template <typename Generator>
+ GenericDocument& Populate(Generator& g) {
+ ClearStackOnExit scope(*this);
+ if (g(*this)) {
+ RAPIDJSON_ASSERT(stack_.GetSize() == sizeof(ValueType)); // Got one and only one root object
+ ValueType::operator=(*stack_.template Pop<ValueType>(1));// Move value from stack to document
+ }
+ return *this;
+ }
+
//!@name Parse from stream
//!@{
@@ -1790,13 +2220,13 @@ public:
*/
template <unsigned parseFlags, typename SourceEncoding, typename InputStream>
GenericDocument& ParseStream(InputStream& is) {
- ValueType::SetNull(); // Remove existing root if exist
- GenericReader<SourceEncoding, Encoding, StackAllocator> reader(&stack_.GetAllocator());
+ GenericReader<SourceEncoding, Encoding, StackAllocator> reader(
+ stack_.HasAllocator() ? &stack_.GetAllocator() : 0);
ClearStackOnExit scope(*this);
parseResult_ = reader.template Parse<parseFlags>(is, *this);
if (parseResult_) {
RAPIDJSON_ASSERT(stack_.GetSize() == sizeof(ValueType)); // Got one and only one root object
- this->RawAssign(*stack_.template Pop<ValueType>(1)); // Add this-> to prevent issue 13.
+ ValueType::operator=(*stack_.template Pop<ValueType>(1));// Move value from stack to document
}
return *this;
}
@@ -1855,7 +2285,7 @@ public:
\param str Read-only zero-terminated string to be parsed.
*/
template <unsigned parseFlags, typename SourceEncoding>
- GenericDocument& Parse(const Ch* str) {
+ GenericDocument& Parse(const typename SourceEncoding::Ch* str) {
RAPIDJSON_ASSERT(!(parseFlags & kParseInsituFlag));
GenericStringStream<SourceEncoding> s(str);
return ParseStream<parseFlags, SourceEncoding>(s);
@@ -1876,6 +2306,42 @@ public:
GenericDocument& Parse(const Ch* str) {
return Parse<kParseDefaultFlags>(str);
}
+
+ template <unsigned parseFlags, typename SourceEncoding>
+ GenericDocument& Parse(const typename SourceEncoding::Ch* str, size_t length) {
+ RAPIDJSON_ASSERT(!(parseFlags & kParseInsituFlag));
+ MemoryStream ms(reinterpret_cast<const char*>(str), length * sizeof(typename SourceEncoding::Ch));
+ EncodedInputStream<SourceEncoding, MemoryStream> is(ms);
+ ParseStream<parseFlags, SourceEncoding>(is);
+ return *this;
+ }
+
+ template <unsigned parseFlags>
+ GenericDocument& Parse(const Ch* str, size_t length) {
+ return Parse<parseFlags, Encoding>(str, length);
+ }
+
+ GenericDocument& Parse(const Ch* str, size_t length) {
+ return Parse<kParseDefaultFlags>(str, length);
+ }
+
+#if RAPIDJSON_HAS_STDSTRING
+ template <unsigned parseFlags, typename SourceEncoding>
+ GenericDocument& Parse(const std::basic_string<typename SourceEncoding::Ch>& str) {
+ // c_str() is constant complexity according to standard. Should be faster than Parse(const char*, size_t)
+ return Parse<parseFlags, SourceEncoding>(str.c_str());
+ }
+
+ template <unsigned parseFlags>
+ GenericDocument& Parse(const std::basic_string<Ch>& str) {
+ return Parse<parseFlags, Encoding>(str.c_str());
+ }
+
+ GenericDocument& Parse(const std::basic_string<Ch>& str) {
+ return Parse<kParseDefaultFlags>(str);
+ }
+#endif // RAPIDJSON_HAS_STDSTRING
+
//!@}
//!@name Handling parse errors
@@ -1890,10 +2356,26 @@ public:
//! Get the position of last parsing error in input, 0 otherwise.
size_t GetErrorOffset() const { return parseResult_.Offset(); }
+ //! Implicit conversion to get the last parse result
+#ifndef __clang // -Wdocumentation
+ /*! \return \ref ParseResult of the last parse operation
+
+ \code
+ Document doc;
+ ParseResult ok = doc.Parse(json);
+ if (!ok)
+ printf( "JSON parse error: %s (%u)\n", GetParseError_En(ok.Code()), ok.Offset());
+ \endcode
+ */
+#endif
+ operator ParseResult() const { return parseResult_; }
//!@}
//! Get the allocator of this document.
- Allocator& GetAllocator() { return *allocator_; }
+ Allocator& GetAllocator() {
+ RAPIDJSON_ASSERT(allocator_);
+ return *allocator_;
+ }
//! Get the capacity of stack in bytes.
size_t GetStackCapacity() const { return stack_.GetCapacity(); }
@@ -1910,9 +2392,10 @@ private:
};
// callers of the following private Handler functions
- template <typename,typename,typename> friend class GenericReader; // for parsing
+ // template <typename,typename,typename> friend class GenericReader; // for parsing
template <typename, typename> friend class GenericValue; // for deep copying
+public:
// Implementation of Handler
bool Null() { new (stack_.template Push<ValueType>()) ValueType(); return true; }
bool Bool(bool b) { new (stack_.template Push<ValueType>()) ValueType(b); return true; }
@@ -1922,6 +2405,14 @@ private:
bool Uint64(uint64_t i) { new (stack_.template Push<ValueType>()) ValueType(i); return true; }
bool Double(double d) { new (stack_.template Push<ValueType>()) ValueType(d); return true; }
+ bool RawNumber(const Ch* str, SizeType length, bool copy) {
+ if (copy)
+ new (stack_.template Push<ValueType>()) ValueType(str, length, GetAllocator());
+ else
+ new (stack_.template Push<ValueType>()) ValueType(str, length);
+ return true;
+ }
+
bool String(const Ch* str, SizeType length, bool copy) {
if (copy)
new (stack_.template Push<ValueType>()) ValueType(str, length, GetAllocator());
@@ -1936,7 +2427,7 @@ private:
bool EndObject(SizeType memberCount) {
typename ValueType::Member* members = stack_.template Pop<typename ValueType::Member>(memberCount);
- stack_.template Top<ValueType>()->SetObjectRaw(members, (SizeType)memberCount, GetAllocator());
+ stack_.template Top<ValueType>()->SetObjectRaw(members, memberCount, GetAllocator());
return true;
}
@@ -1977,38 +2468,146 @@ private:
//! GenericDocument with UTF8 encoding
typedef GenericDocument<UTF8<> > Document;
-// defined here due to the dependency on GenericDocument
-template <typename Encoding, typename Allocator>
-template <typename SourceAllocator>
-inline
-GenericValue<Encoding,Allocator>::GenericValue(const GenericValue<Encoding,SourceAllocator>& rhs, Allocator& allocator)
-{
- switch (rhs.GetType()) {
- case kObjectType:
- case kArrayType: { // perform deep copy via SAX Handler
- GenericDocument<Encoding,Allocator> d(&allocator);
- rhs.Accept(d);
- RawAssign(*d.stack_.template Pop<GenericValue>(1));
- }
- break;
- case kStringType:
- if (rhs.flags_ == kConstStringFlag) {
- flags_ = rhs.flags_;
- data_ = *reinterpret_cast<const Data*>(&rhs.data_);
- } else {
- SetStringRaw(StringRef(rhs.GetString(), rhs.GetStringLength()), allocator);
- }
- break;
- default: // kNumberType, kTrueType, kFalseType, kNullType
- flags_ = rhs.flags_;
- data_ = *reinterpret_cast<const Data*>(&rhs.data_);
- }
-}
+//! Helper class for accessing Value of array type.
+/*!
+ Instance of this helper class is obtained by \c GenericValue::GetArray().
+ In addition to all APIs for array type, it provides range-based for loop if \c RAPIDJSON_HAS_CXX11_RANGE_FOR=1.
+*/
+template <bool Const, typename ValueT>
+class GenericArray {
+public:
+ typedef GenericArray<true, ValueT> ConstArray;
+ typedef GenericArray<false, ValueT> Array;
+ typedef ValueT PlainType;
+ typedef typename internal::MaybeAddConst<Const,PlainType>::Type ValueType;
+ typedef ValueType* ValueIterator; // This may be const or non-const iterator
+ typedef const ValueT* ConstValueIterator;
+ typedef typename ValueType::AllocatorType AllocatorType;
+ typedef typename ValueType::StringRefType StringRefType;
+
+ template <typename, typename>
+ friend class GenericValue;
+
+ GenericArray(const GenericArray& rhs) : value_(rhs.value_) {}
+ GenericArray& operator=(const GenericArray& rhs) { value_ = rhs.value_; return *this; }
+ ~GenericArray() {}
+
+ SizeType Size() const { return value_.Size(); }
+ SizeType Capacity() const { return value_.Capacity(); }
+ bool Empty() const { return value_.Empty(); }
+ void Clear() const { value_.Clear(); }
+ ValueType& operator[](SizeType index) const { return value_[index]; }
+ ValueIterator Begin() const { return value_.Begin(); }
+ ValueIterator End() const { return value_.End(); }
+ GenericArray Reserve(SizeType newCapacity, AllocatorType &allocator) const { value_.Reserve(newCapacity, allocator); return *this; }
+ GenericArray PushBack(ValueType& value, AllocatorType& allocator) const { value_.PushBack(value, allocator); return *this; }
+#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
+ GenericArray PushBack(ValueType&& value, AllocatorType& allocator) const { value_.PushBack(value, allocator); return *this; }
+#endif // RAPIDJSON_HAS_CXX11_RVALUE_REFS
+ GenericArray PushBack(StringRefType value, AllocatorType& allocator) const { value_.PushBack(value, allocator); return *this; }
+ template <typename T> RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T>, internal::IsGenericValue<T> >), (const GenericArray&)) PushBack(T value, AllocatorType& allocator) const { value_.PushBack(value, allocator); return *this; }
+ GenericArray PopBack() const { value_.PopBack(); return *this; }
+ ValueIterator Erase(ConstValueIterator pos) const { return value_.Erase(pos); }
+ ValueIterator Erase(ConstValueIterator first, ConstValueIterator last) const { return value_.Erase(first, last); }
+
+#if RAPIDJSON_HAS_CXX11_RANGE_FOR
+ ValueIterator begin() const { return value_.Begin(); }
+ ValueIterator end() const { return value_.End(); }
+#endif
-RAPIDJSON_NAMESPACE_END
+private:
+ GenericArray();
+ GenericArray(ValueType& value) : value_(value) {}
+ ValueType& value_;
+};
-#if defined(_MSC_VER) || defined(__GNUC__)
-RAPIDJSON_DIAG_POP
+//! Helper class for accessing Value of object type.
+/*!
+ Instance of this helper class is obtained by \c GenericValue::GetObject().
+ In addition to all APIs for array type, it provides range-based for loop if \c RAPIDJSON_HAS_CXX11_RANGE_FOR=1.
+*/
+template <bool Const, typename ValueT>
+class GenericObject {
+public:
+ typedef GenericObject<true, ValueT> ConstObject;
+ typedef GenericObject<false, ValueT> Object;
+ typedef ValueT PlainType;
+ typedef typename internal::MaybeAddConst<Const,PlainType>::Type ValueType;
+ typedef GenericMemberIterator<Const, typename ValueT::EncodingType, typename ValueT::AllocatorType> MemberIterator; // This may be const or non-const iterator
+ typedef GenericMemberIterator<true, typename ValueT::EncodingType, typename ValueT::AllocatorType> ConstMemberIterator;
+ typedef typename ValueType::AllocatorType AllocatorType;
+ typedef typename ValueType::StringRefType StringRefType;
+ typedef typename ValueType::EncodingType EncodingType;
+ typedef typename ValueType::Ch Ch;
+
+ template <typename, typename>
+ friend class GenericValue;
+
+ GenericObject(const GenericObject& rhs) : value_(rhs.value_) {}
+ GenericObject& operator=(const GenericObject& rhs) { value_ = rhs.value_; return *this; }
+ ~GenericObject() {}
+
+ SizeType MemberCount() const { return value_.MemberCount(); }
+ bool ObjectEmpty() const { return value_.ObjectEmpty(); }
+ template <typename T> ValueType& operator[](T* name) const { return value_[name]; }
+ template <typename SourceAllocator> ValueType& operator[](const GenericValue<EncodingType, SourceAllocator>& name) const { return value_[name]; }
+#if RAPIDJSON_HAS_STDSTRING
+ ValueType& operator[](const std::basic_string<Ch>& name) const { return value_[name]; }
+#endif
+ MemberIterator MemberBegin() const { return value_.MemberBegin(); }
+ MemberIterator MemberEnd() const { return value_.MemberEnd(); }
+ bool HasMember(const Ch* name) const { return value_.HasMember(name); }
+#if RAPIDJSON_HAS_STDSTRING
+ bool HasMember(const std::basic_string<Ch>& name) const { return value_.HasMember(name); }
+#endif
+ template <typename SourceAllocator> bool HasMember(const GenericValue<EncodingType, SourceAllocator>& name) const { return value_.HasMember(name); }
+ MemberIterator FindMember(const Ch* name) const { return value_.FindMember(name); }
+ template <typename SourceAllocator> MemberIterator FindMember(const GenericValue<EncodingType, SourceAllocator>& name) const { return value_.FindMember(name); }
+#if RAPIDJSON_HAS_STDSTRING
+ MemberIterator FindMember(const std::basic_string<Ch>& name) const { return value_.FindMember(name); }
#endif
+ GenericObject AddMember(ValueType& name, ValueType& value, AllocatorType& allocator) const { value_.AddMember(name, value, allocator); return *this; }
+ GenericObject AddMember(ValueType& name, StringRefType value, AllocatorType& allocator) const { value_.AddMember(name, value, allocator); return *this; }
+#if RAPIDJSON_HAS_STDSTRING
+ GenericObject AddMember(ValueType& name, std::basic_string<Ch>& value, AllocatorType& allocator) const { value_.AddMember(name, value, allocator); return *this; }
+#endif
+ template <typename T> RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T>, internal::IsGenericValue<T> >), (ValueType&)) AddMember(ValueType& name, T value, AllocatorType& allocator) const { value_.AddMember(name, value, allocator); return *this; }
+#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
+ GenericObject AddMember(ValueType&& name, ValueType&& value, AllocatorType& allocator) const { value_.AddMember(name, value, allocator); return *this; }
+ GenericObject AddMember(ValueType&& name, ValueType& value, AllocatorType& allocator) const { value_.AddMember(name, value, allocator); return *this; }
+ GenericObject AddMember(ValueType& name, ValueType&& value, AllocatorType& allocator) const { value_.AddMember(name, value, allocator); return *this; }
+ GenericObject AddMember(StringRefType name, ValueType&& value, AllocatorType& allocator) const { value_.AddMember(name, value, allocator); return *this; }
+#endif // RAPIDJSON_HAS_CXX11_RVALUE_REFS
+ GenericObject AddMember(StringRefType name, ValueType& value, AllocatorType& allocator) const { value_.AddMember(name, value, allocator); return *this; }
+ GenericObject AddMember(StringRefType name, StringRefType value, AllocatorType& allocator) const { value_.AddMember(name, value, allocator); return *this; }
+ template <typename T> RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T>, internal::IsGenericValue<T> >), (GenericObject)) AddMember(StringRefType name, T value, AllocatorType& allocator) const { value_.AddMember(name, value, allocator); return *this; }
+ void RemoveAllMembers() { value_.RemoveAllMembers(); }
+ bool RemoveMember(const Ch* name) const { return value_.RemoveMember(name); }
+#if RAPIDJSON_HAS_STDSTRING
+ bool RemoveMember(const std::basic_string<Ch>& name) const { return value_.RemoveMember(name); }
+#endif
+ template <typename SourceAllocator> bool RemoveMember(const GenericValue<EncodingType, SourceAllocator>& name) const { return value_.RemoveMember(name); }
+ MemberIterator RemoveMember(MemberIterator m) const { return value_.RemoveMember(m); }
+ MemberIterator EraseMember(ConstMemberIterator pos) const { return value_.EraseMember(pos); }
+ MemberIterator EraseMember(ConstMemberIterator first, ConstMemberIterator last) const { return value_.EraseMember(first, last); }
+ bool EraseMember(const Ch* name) const { return value_.EraseMember(name); }
+#if RAPIDJSON_HAS_STDSTRING
+ bool EraseMember(const std::basic_string<Ch>& name) const { return EraseMember(ValueType(StringRef(name))); }
+#endif
+ template <typename SourceAllocator> bool EraseMember(const GenericValue<EncodingType, SourceAllocator>& name) const { return value_.EraseMember(name); }
+
+#if RAPIDJSON_HAS_CXX11_RANGE_FOR
+ MemberIterator begin() const { return value_.MemberBegin(); }
+ MemberIterator end() const { return value_.MemberEnd(); }
+#endif
+
+private:
+ GenericObject();
+ GenericObject(ValueType& value) : value_(value) {}
+ ValueType& value_;
+};
+
+RAPIDJSON_NAMESPACE_END
+RAPIDJSON_DIAG_POP
#endif // RAPIDJSON_DOCUMENT_H_
diff --git a/contrib/rapidjson/include/rapidjson/encodedstream.h b/contrib/rapidjson/include/rapidjson/encodedstream.h
index 7c8863fee..223601c05 100644
--- a/contrib/rapidjson/include/rapidjson/encodedstream.h
+++ b/contrib/rapidjson/include/rapidjson/encodedstream.h
@@ -15,13 +15,19 @@
#ifndef RAPIDJSON_ENCODEDSTREAM_H_
#define RAPIDJSON_ENCODEDSTREAM_H_
-#include "rapidjson.h"
+#include "stream.h"
+#include "memorystream.h"
#ifdef __GNUC__
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF(effc++)
#endif
+#ifdef __clang__
+RAPIDJSON_DIAG_PUSH
+RAPIDJSON_DIAG_OFF(padded)
+#endif
+
RAPIDJSON_NAMESPACE_BEGIN
//! Input byte stream wrapper with a statically bound encoding.
@@ -57,10 +63,38 @@ private:
Ch current_;
};
+//! Specialized for UTF8 MemoryStream.
+template <>
+class EncodedInputStream<UTF8<>, MemoryStream> {
+public:
+ typedef UTF8<>::Ch Ch;
+
+ EncodedInputStream(MemoryStream& is) : is_(is) {
+ if (static_cast<unsigned char>(is_.Peek()) == 0xEFu) is_.Take();
+ if (static_cast<unsigned char>(is_.Peek()) == 0xBBu) is_.Take();
+ if (static_cast<unsigned char>(is_.Peek()) == 0xBFu) is_.Take();
+ }
+ Ch Peek() const { return is_.Peek(); }
+ Ch Take() { return is_.Take(); }
+ size_t Tell() const { return is_.Tell(); }
+
+ // Not implemented
+ void Put(Ch) {}
+ void Flush() {}
+ Ch* PutBegin() { return 0; }
+ size_t PutEnd(Ch*) { return 0; }
+
+ MemoryStream& is_;
+
+private:
+ EncodedInputStream(const EncodedInputStream&);
+ EncodedInputStream& operator=(const EncodedInputStream&);
+};
+
//! Output byte stream wrapper with statically bound encoding.
/*!
\tparam Encoding The interpretation of encoding of the stream. Either UTF8, UTF16LE, UTF16BE, UTF32LE, UTF32BE.
- \tparam InputByteStream Type of input byte stream. For example, FileWriteStream.
+ \tparam OutputByteStream Type of input byte stream. For example, FileWriteStream.
*/
template <typename Encoding, typename OutputByteStream>
class EncodedOutputStream {
@@ -77,8 +111,8 @@ public:
void Flush() { os_.Flush(); }
// Not implemented
- Ch Peek() const { RAPIDJSON_ASSERT(false); }
- Ch Take() { RAPIDJSON_ASSERT(false); }
+ Ch Peek() const { RAPIDJSON_ASSERT(false); return 0;}
+ Ch Take() { RAPIDJSON_ASSERT(false); return 0;}
size_t Tell() const { RAPIDJSON_ASSERT(false); return 0; }
Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; }
size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; }
@@ -142,11 +176,11 @@ private:
// FF FE UTF-16LE
// EF BB BF UTF-8
- const unsigned char* c = (const unsigned char *)is_->Peek4();
+ const unsigned char* c = reinterpret_cast<const unsigned char *>(is_->Peek4());
if (!c)
return;
- unsigned bom = c[0] | (c[1] << 8) | (c[2] << 16) | (c[3] << 24);
+ unsigned bom = static_cast<unsigned>(c[0] | (c[1] << 8) | (c[2] << 16) | (c[3] << 24));
hasBOM_ = false;
if (bom == 0xFFFE0000) { type_ = kUTF32BE; hasBOM_ = true; is_->Take(); is_->Take(); is_->Take(); is_->Take(); }
else if (bom == 0x0000FEFF) { type_ = kUTF32LE; hasBOM_ = true; is_->Take(); is_->Take(); is_->Take(); is_->Take(); }
@@ -166,7 +200,7 @@ private:
// xx xx xx xx UTF-8
if (!hasBOM_) {
- unsigned pattern = (c[0] ? 1 : 0) | (c[1] ? 2 : 0) | (c[2] ? 4 : 0) | (c[3] ? 8 : 0);
+ int pattern = (c[0] ? 1 : 0) | (c[1] ? 2 : 0) | (c[2] ? 4 : 0) | (c[3] ? 8 : 0);
switch (pattern) {
case 0x08: type_ = kUTF32BE; break;
case 0x0A: type_ = kUTF16BE; break;
@@ -193,7 +227,7 @@ private:
//! Output stream wrapper with dynamically bound encoding and automatic encoding detection.
/*!
\tparam CharType Type of character for writing.
- \tparam InputByteStream type of output byte stream to be wrapped.
+ \tparam OutputByteStream type of output byte stream to be wrapped.
*/
template <typename CharType, typename OutputByteStream>
class AutoUTFOutputStream {
@@ -227,8 +261,8 @@ public:
void Flush() { os_->Flush(); }
// Not implemented
- Ch Peek() const { RAPIDJSON_ASSERT(false); }
- Ch Take() { RAPIDJSON_ASSERT(false); }
+ Ch Peek() const { RAPIDJSON_ASSERT(false); return 0;}
+ Ch Take() { RAPIDJSON_ASSERT(false); return 0;}
size_t Tell() const { RAPIDJSON_ASSERT(false); return 0; }
Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; }
size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; }
@@ -254,6 +288,10 @@ private:
RAPIDJSON_NAMESPACE_END
+#ifdef __clang__
+RAPIDJSON_DIAG_POP
+#endif
+
#ifdef __GNUC__
RAPIDJSON_DIAG_POP
#endif
diff --git a/contrib/rapidjson/include/rapidjson/encodings.h b/contrib/rapidjson/include/rapidjson/encodings.h
index 90b46ed32..0df1c3435 100644
--- a/contrib/rapidjson/include/rapidjson/encodings.h
+++ b/contrib/rapidjson/include/rapidjson/encodings.h
@@ -120,19 +120,45 @@ struct UTF8 {
}
}
+ template<typename OutputStream>
+ static void EncodeUnsafe(OutputStream& os, unsigned codepoint) {
+ if (codepoint <= 0x7F)
+ PutUnsafe(os, static_cast<Ch>(codepoint & 0xFF));
+ else if (codepoint <= 0x7FF) {
+ PutUnsafe(os, static_cast<Ch>(0xC0 | ((codepoint >> 6) & 0xFF)));
+ PutUnsafe(os, static_cast<Ch>(0x80 | ((codepoint & 0x3F))));
+ }
+ else if (codepoint <= 0xFFFF) {
+ PutUnsafe(os, static_cast<Ch>(0xE0 | ((codepoint >> 12) & 0xFF)));
+ PutUnsafe(os, static_cast<Ch>(0x80 | ((codepoint >> 6) & 0x3F)));
+ PutUnsafe(os, static_cast<Ch>(0x80 | (codepoint & 0x3F)));
+ }
+ else {
+ RAPIDJSON_ASSERT(codepoint <= 0x10FFFF);
+ PutUnsafe(os, static_cast<Ch>(0xF0 | ((codepoint >> 18) & 0xFF)));
+ PutUnsafe(os, static_cast<Ch>(0x80 | ((codepoint >> 12) & 0x3F)));
+ PutUnsafe(os, static_cast<Ch>(0x80 | ((codepoint >> 6) & 0x3F)));
+ PutUnsafe(os, static_cast<Ch>(0x80 | (codepoint & 0x3F)));
+ }
+ }
+
template <typename InputStream>
static bool Decode(InputStream& is, unsigned* codepoint) {
-#define COPY() c = is.Take(); *codepoint = (*codepoint << 6) | ((unsigned char)c & 0x3Fu)
-#define TRANS(mask) result &= ((GetRange((unsigned char)c) & mask) != 0)
+#define COPY() c = is.Take(); *codepoint = (*codepoint << 6) | (static_cast<unsigned char>(c) & 0x3Fu)
+#define TRANS(mask) result &= ((GetRange(static_cast<unsigned char>(c)) & mask) != 0)
#define TAIL() COPY(); TRANS(0x70)
- Ch c = is.Take();
+ typename InputStream::Ch c = is.Take();
if (!(c & 0x80)) {
- *codepoint = (unsigned char)c;
+ *codepoint = static_cast<unsigned char>(c);
return true;
}
- unsigned char type = GetRange((unsigned char)c);
- *codepoint = (0xFF >> type) & (unsigned char)c;
+ unsigned char type = GetRange(static_cast<unsigned char>(c));
+ if (type >= 32) {
+ *codepoint = 0;
+ } else {
+ *codepoint = (0xFFu >> type) & static_cast<unsigned char>(c);
+ }
bool result = true;
switch (type) {
case 2: TAIL(); return result;
@@ -152,7 +178,7 @@ struct UTF8 {
template <typename InputStream, typename OutputStream>
static bool Validate(InputStream& is, OutputStream& os) {
#define COPY() os.Put(c = is.Take())
-#define TRANS(mask) result &= ((GetRange((unsigned char)c) & mask) != 0)
+#define TRANS(mask) result &= ((GetRange(static_cast<unsigned char>(c)) & mask) != 0)
#define TAIL() COPY(); TRANS(0x70)
Ch c;
COPY();
@@ -160,7 +186,7 @@ struct UTF8 {
return true;
bool result = true;
- switch (GetRange((unsigned char)c)) {
+ switch (GetRange(static_cast<unsigned char>(c))) {
case 2: TAIL(); return result;
case 3: TAIL(); TAIL(); return result;
case 4: COPY(); TRANS(0x50); TAIL(); return result;
@@ -196,12 +222,12 @@ struct UTF8 {
template <typename InputByteStream>
static CharType TakeBOM(InputByteStream& is) {
RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);
- Ch c = Take(is);
- if ((unsigned char)c != 0xEFu) return c;
+ typename InputByteStream::Ch c = Take(is);
+ if (static_cast<unsigned char>(c) != 0xEFu) return c;
c = is.Take();
- if ((unsigned char)c != 0xBBu) return c;
+ if (static_cast<unsigned char>(c) != 0xBBu) return c;
c = is.Take();
- if ((unsigned char)c != 0xBFu) return c;
+ if (static_cast<unsigned char>(c) != 0xBFu) return c;
c = is.Take();
return c;
}
@@ -209,13 +235,15 @@ struct UTF8 {
template <typename InputByteStream>
static Ch Take(InputByteStream& is) {
RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);
- return is.Take();
+ return static_cast<Ch>(is.Take());
}
template <typename OutputByteStream>
static void PutBOM(OutputByteStream& os) {
RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);
- os.Put(0xEFu); os.Put(0xBBu); os.Put(0xBFu);
+ os.Put(static_cast<typename OutputByteStream::Ch>(0xEFu));
+ os.Put(static_cast<typename OutputByteStream::Ch>(0xBBu));
+ os.Put(static_cast<typename OutputByteStream::Ch>(0xBFu));
}
template <typename OutputByteStream>
@@ -255,22 +283,38 @@ struct UTF16 {
RAPIDJSON_ASSERT(codepoint <= 0x10FFFF);
unsigned v = codepoint - 0x10000;
os.Put(static_cast<typename OutputStream::Ch>((v >> 10) | 0xD800));
- os.Put((v & 0x3FF) | 0xDC00);
+ os.Put(static_cast<typename OutputStream::Ch>((v & 0x3FF) | 0xDC00));
+ }
+ }
+
+
+ template<typename OutputStream>
+ static void EncodeUnsafe(OutputStream& os, unsigned codepoint) {
+ RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputStream::Ch) >= 2);
+ if (codepoint <= 0xFFFF) {
+ RAPIDJSON_ASSERT(codepoint < 0xD800 || codepoint > 0xDFFF); // Code point itself cannot be surrogate pair
+ PutUnsafe(os, static_cast<typename OutputStream::Ch>(codepoint));
+ }
+ else {
+ RAPIDJSON_ASSERT(codepoint <= 0x10FFFF);
+ unsigned v = codepoint - 0x10000;
+ PutUnsafe(os, static_cast<typename OutputStream::Ch>((v >> 10) | 0xD800));
+ PutUnsafe(os, static_cast<typename OutputStream::Ch>((v & 0x3FF) | 0xDC00));
}
}
template <typename InputStream>
static bool Decode(InputStream& is, unsigned* codepoint) {
RAPIDJSON_STATIC_ASSERT(sizeof(typename InputStream::Ch) >= 2);
- Ch c = is.Take();
+ typename InputStream::Ch c = is.Take();
if (c < 0xD800 || c > 0xDFFF) {
- *codepoint = c;
+ *codepoint = static_cast<unsigned>(c);
return true;
}
else if (c <= 0xDBFF) {
- *codepoint = (c & 0x3FF) << 10;
+ *codepoint = (static_cast<unsigned>(c) & 0x3FF) << 10;
c = is.Take();
- *codepoint |= (c & 0x3FF);
+ *codepoint |= (static_cast<unsigned>(c) & 0x3FF);
*codepoint += 0x10000;
return c >= 0xDC00 && c <= 0xDFFF;
}
@@ -281,8 +325,8 @@ struct UTF16 {
static bool Validate(InputStream& is, OutputStream& os) {
RAPIDJSON_STATIC_ASSERT(sizeof(typename InputStream::Ch) >= 2);
RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputStream::Ch) >= 2);
- Ch c;
- os.Put(c = is.Take());
+ typename InputStream::Ch c;
+ os.Put(static_cast<typename OutputStream::Ch>(c = is.Take()));
if (c < 0xD800 || c > 0xDFFF)
return true;
else if (c <= 0xDBFF) {
@@ -300,28 +344,29 @@ struct UTF16LE : UTF16<CharType> {
static CharType TakeBOM(InputByteStream& is) {
RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);
CharType c = Take(is);
- return (unsigned short)c == 0xFEFFu ? Take(is) : c;
+ return static_cast<uint16_t>(c) == 0xFEFFu ? Take(is) : c;
}
template <typename InputByteStream>
static CharType Take(InputByteStream& is) {
RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);
- CharType c = (unsigned char)is.Take();
- c |= (unsigned char)is.Take() << 8;
- return c;
+ unsigned c = static_cast<uint8_t>(is.Take());
+ c |= static_cast<unsigned>(static_cast<uint8_t>(is.Take())) << 8;
+ return static_cast<CharType>(c);
}
template <typename OutputByteStream>
static void PutBOM(OutputByteStream& os) {
RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);
- os.Put(0xFFu); os.Put(0xFEu);
+ os.Put(static_cast<typename OutputByteStream::Ch>(0xFFu));
+ os.Put(static_cast<typename OutputByteStream::Ch>(0xFEu));
}
template <typename OutputByteStream>
static void Put(OutputByteStream& os, CharType c) {
RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);
- os.Put(c & 0xFFu);
- os.Put((c >> 8) & 0xFFu);
+ os.Put(static_cast<typename OutputByteStream::Ch>(static_cast<unsigned>(c) & 0xFFu));
+ os.Put(static_cast<typename OutputByteStream::Ch>((static_cast<unsigned>(c) >> 8) & 0xFFu));
}
};
@@ -332,28 +377,29 @@ struct UTF16BE : UTF16<CharType> {
static CharType TakeBOM(InputByteStream& is) {
RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);
CharType c = Take(is);
- return (unsigned short)c == 0xFEFFu ? Take(is) : c;
+ return static_cast<uint16_t>(c) == 0xFEFFu ? Take(is) : c;
}
template <typename InputByteStream>
static CharType Take(InputByteStream& is) {
RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);
- CharType c = (unsigned char)is.Take() << 8;
- c |= (unsigned char)is.Take();
- return c;
+ unsigned c = static_cast<unsigned>(static_cast<uint8_t>(is.Take())) << 8;
+ c |= static_cast<uint8_t>(is.Take());
+ return static_cast<CharType>(c);
}
template <typename OutputByteStream>
static void PutBOM(OutputByteStream& os) {
RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);
- os.Put(0xFEu); os.Put(0xFFu);
+ os.Put(static_cast<typename OutputByteStream::Ch>(0xFEu));
+ os.Put(static_cast<typename OutputByteStream::Ch>(0xFFu));
}
template <typename OutputByteStream>
static void Put(OutputByteStream& os, CharType c) {
RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);
- os.Put((c >> 8) & 0xFFu);
- os.Put(c & 0xFFu);
+ os.Put(static_cast<typename OutputByteStream::Ch>((static_cast<unsigned>(c) >> 8) & 0xFFu));
+ os.Put(static_cast<typename OutputByteStream::Ch>(static_cast<unsigned>(c) & 0xFFu));
}
};
@@ -382,6 +428,13 @@ struct UTF32 {
os.Put(codepoint);
}
+ template<typename OutputStream>
+ static void EncodeUnsafe(OutputStream& os, unsigned codepoint) {
+ RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputStream::Ch) >= 4);
+ RAPIDJSON_ASSERT(codepoint <= 0x10FFFF);
+ PutUnsafe(os, codepoint);
+ }
+
template <typename InputStream>
static bool Decode(InputStream& is, unsigned* codepoint) {
RAPIDJSON_STATIC_ASSERT(sizeof(typename InputStream::Ch) >= 4);
@@ -406,32 +459,35 @@ struct UTF32LE : UTF32<CharType> {
static CharType TakeBOM(InputByteStream& is) {
RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);
CharType c = Take(is);
- return (unsigned)c == 0x0000FEFFu ? Take(is) : c;
+ return static_cast<uint32_t>(c) == 0x0000FEFFu ? Take(is) : c;
}
template <typename InputByteStream>
static CharType Take(InputByteStream& is) {
RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);
- CharType c = (unsigned char)is.Take();
- c |= (unsigned char)is.Take() << 8;
- c |= (unsigned char)is.Take() << 16;
- c |= (unsigned char)is.Take() << 24;
- return c;
+ unsigned c = static_cast<uint8_t>(is.Take());
+ c |= static_cast<unsigned>(static_cast<uint8_t>(is.Take())) << 8;
+ c |= static_cast<unsigned>(static_cast<uint8_t>(is.Take())) << 16;
+ c |= static_cast<unsigned>(static_cast<uint8_t>(is.Take())) << 24;
+ return static_cast<CharType>(c);
}
template <typename OutputByteStream>
static void PutBOM(OutputByteStream& os) {
RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);
- os.Put(0xFFu); os.Put(0xFEu); os.Put(0x00u); os.Put(0x00u);
+ os.Put(static_cast<typename OutputByteStream::Ch>(0xFFu));
+ os.Put(static_cast<typename OutputByteStream::Ch>(0xFEu));
+ os.Put(static_cast<typename OutputByteStream::Ch>(0x00u));
+ os.Put(static_cast<typename OutputByteStream::Ch>(0x00u));
}
template <typename OutputByteStream>
static void Put(OutputByteStream& os, CharType c) {
RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);
- os.Put(c & 0xFFu);
- os.Put((c >> 8) & 0xFFu);
- os.Put((c >> 16) & 0xFFu);
- os.Put((c >> 24) & 0xFFu);
+ os.Put(static_cast<typename OutputByteStream::Ch>(c & 0xFFu));
+ os.Put(static_cast<typename OutputByteStream::Ch>((c >> 8) & 0xFFu));
+ os.Put(static_cast<typename OutputByteStream::Ch>((c >> 16) & 0xFFu));
+ os.Put(static_cast<typename OutputByteStream::Ch>((c >> 24) & 0xFFu));
}
};
@@ -442,32 +498,35 @@ struct UTF32BE : UTF32<CharType> {
static CharType TakeBOM(InputByteStream& is) {
RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);
CharType c = Take(is);
- return (unsigned)c == 0x0000FEFFu ? Take(is) : c;
+ return static_cast<uint32_t>(c) == 0x0000FEFFu ? Take(is) : c;
}
template <typename InputByteStream>
static CharType Take(InputByteStream& is) {
RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);
- CharType c = (unsigned char)is.Take() << 24;
- c |= (unsigned char)is.Take() << 16;
- c |= (unsigned char)is.Take() << 8;
- c |= (unsigned char)is.Take();
- return c;
+ unsigned c = static_cast<unsigned>(static_cast<uint8_t>(is.Take())) << 24;
+ c |= static_cast<unsigned>(static_cast<uint8_t>(is.Take())) << 16;
+ c |= static_cast<unsigned>(static_cast<uint8_t>(is.Take())) << 8;
+ c |= static_cast<unsigned>(static_cast<uint8_t>(is.Take()));
+ return static_cast<CharType>(c);
}
template <typename OutputByteStream>
static void PutBOM(OutputByteStream& os) {
RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);
- os.Put(0x00u); os.Put(0x00u); os.Put(0xFEu); os.Put(0xFFu);
+ os.Put(static_cast<typename OutputByteStream::Ch>(0x00u));
+ os.Put(static_cast<typename OutputByteStream::Ch>(0x00u));
+ os.Put(static_cast<typename OutputByteStream::Ch>(0xFEu));
+ os.Put(static_cast<typename OutputByteStream::Ch>(0xFFu));
}
template <typename OutputByteStream>
static void Put(OutputByteStream& os, CharType c) {
RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);
- os.Put((c >> 24) & 0xFFu);
- os.Put((c >> 16) & 0xFFu);
- os.Put((c >> 8) & 0xFFu);
- os.Put(c & 0xFFu);
+ os.Put(static_cast<typename OutputByteStream::Ch>((c >> 24) & 0xFFu));
+ os.Put(static_cast<typename OutputByteStream::Ch>((c >> 16) & 0xFFu));
+ os.Put(static_cast<typename OutputByteStream::Ch>((c >> 8) & 0xFFu));
+ os.Put(static_cast<typename OutputByteStream::Ch>(c & 0xFFu));
}
};
@@ -491,31 +550,37 @@ struct ASCII {
os.Put(static_cast<Ch>(codepoint & 0xFF));
}
+ template<typename OutputStream>
+ static void EncodeUnsafe(OutputStream& os, unsigned codepoint) {
+ RAPIDJSON_ASSERT(codepoint <= 0x7F);
+ PutUnsafe(os, static_cast<Ch>(codepoint & 0xFF));
+ }
+
template <typename InputStream>
static bool Decode(InputStream& is, unsigned* codepoint) {
- unsigned char c = static_cast<unsigned char>(is.Take());
+ uint8_t c = static_cast<uint8_t>(is.Take());
*codepoint = c;
return c <= 0X7F;
}
template <typename InputStream, typename OutputStream>
static bool Validate(InputStream& is, OutputStream& os) {
- unsigned char c = is.Take();
- os.Put(c);
+ uint8_t c = static_cast<uint8_t>(is.Take());
+ os.Put(static_cast<typename OutputStream::Ch>(c));
return c <= 0x7F;
}
template <typename InputByteStream>
static CharType TakeBOM(InputByteStream& is) {
RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);
- Ch c = Take(is);
- return c;
+ uint8_t c = static_cast<uint8_t>(Take(is));
+ return static_cast<Ch>(c);
}
template <typename InputByteStream>
static Ch Take(InputByteStream& is) {
RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);
- return is.Take();
+ return static_cast<Ch>(is.Take());
}
template <typename OutputByteStream>
@@ -555,21 +620,28 @@ struct AutoUTF {
#define RAPIDJSON_ENCODINGS_FUNC(x) UTF8<Ch>::x, UTF16LE<Ch>::x, UTF16BE<Ch>::x, UTF32LE<Ch>::x, UTF32BE<Ch>::x
template<typename OutputStream>
- RAPIDJSON_FORCEINLINE static void Encode(OutputStream& os, unsigned codepoint) {
+ static RAPIDJSON_FORCEINLINE void Encode(OutputStream& os, unsigned codepoint) {
typedef void (*EncodeFunc)(OutputStream&, unsigned);
static const EncodeFunc f[] = { RAPIDJSON_ENCODINGS_FUNC(Encode) };
(*f[os.GetType()])(os, codepoint);
}
+ template<typename OutputStream>
+ static RAPIDJSON_FORCEINLINE void EncodeUnsafe(OutputStream& os, unsigned codepoint) {
+ typedef void (*EncodeFunc)(OutputStream&, unsigned);
+ static const EncodeFunc f[] = { RAPIDJSON_ENCODINGS_FUNC(EncodeUnsafe) };
+ (*f[os.GetType()])(os, codepoint);
+ }
+
template <typename InputStream>
- RAPIDJSON_FORCEINLINE static bool Decode(InputStream& is, unsigned* codepoint) {
+ static RAPIDJSON_FORCEINLINE bool Decode(InputStream& is, unsigned* codepoint) {
typedef bool (*DecodeFunc)(InputStream&, unsigned*);
static const DecodeFunc f[] = { RAPIDJSON_ENCODINGS_FUNC(Decode) };
return (*f[is.GetType()])(is, codepoint);
}
template <typename InputStream, typename OutputStream>
- RAPIDJSON_FORCEINLINE static bool Validate(InputStream& is, OutputStream& os) {
+ static RAPIDJSON_FORCEINLINE bool Validate(InputStream& is, OutputStream& os) {
typedef bool (*ValidateFunc)(InputStream&, OutputStream&);
static const ValidateFunc f[] = { RAPIDJSON_ENCODINGS_FUNC(Validate) };
return (*f[is.GetType()])(is, os);
@@ -586,7 +658,7 @@ template<typename SourceEncoding, typename TargetEncoding>
struct Transcoder {
//! Take one Unicode codepoint from source encoding, convert it to target encoding and put it to the output stream.
template<typename InputStream, typename OutputStream>
- RAPIDJSON_FORCEINLINE static bool Transcode(InputStream& is, OutputStream& os) {
+ static RAPIDJSON_FORCEINLINE bool Transcode(InputStream& is, OutputStream& os) {
unsigned codepoint;
if (!SourceEncoding::Decode(is, &codepoint))
return false;
@@ -594,31 +666,50 @@ struct Transcoder {
return true;
}
+ template<typename InputStream, typename OutputStream>
+ static RAPIDJSON_FORCEINLINE bool TranscodeUnsafe(InputStream& is, OutputStream& os) {
+ unsigned codepoint;
+ if (!SourceEncoding::Decode(is, &codepoint))
+ return false;
+ TargetEncoding::EncodeUnsafe(os, codepoint);
+ return true;
+ }
+
//! Validate one Unicode codepoint from an encoded stream.
template<typename InputStream, typename OutputStream>
- RAPIDJSON_FORCEINLINE static bool Validate(InputStream& is, OutputStream& os) {
+ static RAPIDJSON_FORCEINLINE bool Validate(InputStream& is, OutputStream& os) {
return Transcode(is, os); // Since source/target encoding is different, must transcode.
}
};
+// Forward declaration.
+template<typename Stream>
+inline void PutUnsafe(Stream& stream, typename Stream::Ch c);
+
//! Specialization of Transcoder with same source and target encoding.
template<typename Encoding>
struct Transcoder<Encoding, Encoding> {
template<typename InputStream, typename OutputStream>
- RAPIDJSON_FORCEINLINE static bool Transcode(InputStream& is, OutputStream& os) {
+ static RAPIDJSON_FORCEINLINE bool Transcode(InputStream& is, OutputStream& os) {
os.Put(is.Take()); // Just copy one code unit. This semantic is different from primary template class.
return true;
}
template<typename InputStream, typename OutputStream>
- RAPIDJSON_FORCEINLINE static bool Validate(InputStream& is, OutputStream& os) {
+ static RAPIDJSON_FORCEINLINE bool TranscodeUnsafe(InputStream& is, OutputStream& os) {
+ PutUnsafe(os, is.Take()); // Just copy one code unit. This semantic is different from primary template class.
+ return true;
+ }
+
+ template<typename InputStream, typename OutputStream>
+ static RAPIDJSON_FORCEINLINE bool Validate(InputStream& is, OutputStream& os) {
return Encoding::Validate(is, os); // source/target encoding are the same
}
};
RAPIDJSON_NAMESPACE_END
-#if defined(__GNUC__) || defined(_MSV_VER)
+#if defined(__GNUC__) || defined(_MSC_VER)
RAPIDJSON_DIAG_POP
#endif
diff --git a/contrib/rapidjson/include/rapidjson/error/en.h b/contrib/rapidjson/include/rapidjson/error/en.h
index d5f9caab8..2db838bff 100644
--- a/contrib/rapidjson/include/rapidjson/error/en.h
+++ b/contrib/rapidjson/include/rapidjson/error/en.h
@@ -12,11 +12,17 @@
// CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.
-#ifndef RAPIDJSON_ERROR_EN_H__
-#define RAPIDJSON_ERROR_EN_H__
+#ifndef RAPIDJSON_ERROR_EN_H_
+#define RAPIDJSON_ERROR_EN_H_
#include "error.h"
+#ifdef __clang__
+RAPIDJSON_DIAG_PUSH
+RAPIDJSON_DIAG_OFF(switch-enum)
+RAPIDJSON_DIAG_OFF(covered-switch-default)
+#endif
+
RAPIDJSON_NAMESPACE_BEGIN
//! Maps error code of parsing into error message.
@@ -32,7 +38,7 @@ inline const RAPIDJSON_ERROR_CHARTYPE* GetParseError_En(ParseErrorCode parseErro
case kParseErrorNone: return RAPIDJSON_ERROR_STRING("No error.");
case kParseErrorDocumentEmpty: return RAPIDJSON_ERROR_STRING("The document is empty.");
- case kParseErrorDocumentRootNotSingular: return RAPIDJSON_ERROR_STRING("The document root must not follow by other values.");
+ case kParseErrorDocumentRootNotSingular: return RAPIDJSON_ERROR_STRING("The document root must not be followed by other values.");
case kParseErrorValueInvalid: return RAPIDJSON_ERROR_STRING("Invalid value.");
@@ -55,11 +61,14 @@ inline const RAPIDJSON_ERROR_CHARTYPE* GetParseError_En(ParseErrorCode parseErro
case kParseErrorTermination: return RAPIDJSON_ERROR_STRING("Terminate parsing due to Handler error.");
case kParseErrorUnspecificSyntaxError: return RAPIDJSON_ERROR_STRING("Unspecific syntax error.");
- default:
- return RAPIDJSON_ERROR_STRING("Unknown error.");
+ default: return RAPIDJSON_ERROR_STRING("Unknown error.");
}
}
RAPIDJSON_NAMESPACE_END
-#endif // RAPIDJSON_ERROR_EN_H__
+#ifdef __clang__
+RAPIDJSON_DIAG_POP
+#endif
+
+#endif // RAPIDJSON_ERROR_EN_H_
diff --git a/contrib/rapidjson/include/rapidjson/error/error.h b/contrib/rapidjson/include/rapidjson/error/error.h
index f9094fb95..9311d2f03 100644
--- a/contrib/rapidjson/include/rapidjson/error/error.h
+++ b/contrib/rapidjson/include/rapidjson/error/error.h
@@ -12,11 +12,16 @@
// CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.
-#ifndef RAPIDJSON_ERROR_ERROR_H__
-#define RAPIDJSON_ERROR_ERROR_H__
+#ifndef RAPIDJSON_ERROR_ERROR_H_
+#define RAPIDJSON_ERROR_ERROR_H_
#include "../rapidjson.h"
+#ifdef __clang__
+RAPIDJSON_DIAG_PUSH
+RAPIDJSON_DIAG_OFF(padded)
+#endif
+
/*! \file error.h */
/*! \defgroup RAPIDJSON_ERRORS RapidJSON error handling */
@@ -99,7 +104,9 @@ enum ParseErrorCode {
\see GenericReader::Parse, GenericDocument::Parse
*/
struct ParseResult {
-
+ //!! Unspecified boolean type
+ typedef bool (ParseResult::*BooleanType)() const;
+public:
//! Default constructor, no error.
ParseResult() : code_(kParseErrorNone), offset_(0) {}
//! Constructor to set an error.
@@ -110,8 +117,8 @@ struct ParseResult {
//! Get the error offset, if \ref IsError(), 0 otherwise.
size_t Offset() const { return offset_; }
- //! Conversion to \c bool, returns \c true, iff !\ref IsError().
- operator bool() const { return !IsError(); }
+ //! Explicit conversion to \c bool, returns \c true, iff !\ref IsError().
+ operator BooleanType() const { return !IsError() ? &ParseResult::IsError : NULL; }
//! Whether the result is an error.
bool IsError() const { return code_ != kParseErrorNone; }
@@ -119,6 +126,10 @@ struct ParseResult {
bool operator==(ParseErrorCode code) const { return code_ == code; }
friend bool operator==(ParseErrorCode code, const ParseResult & err) { return code == err.code_; }
+ bool operator!=(const ParseResult& that) const { return !(*this == that); }
+ bool operator!=(ParseErrorCode code) const { return !(*this == code); }
+ friend bool operator!=(ParseErrorCode code, const ParseResult & err) { return err != code; }
+
//! Reset error code.
void Clear() { Set(kParseErrorNone); }
//! Update error code and offset.
@@ -143,4 +154,8 @@ typedef const RAPIDJSON_ERROR_CHARTYPE* (*GetParseErrorFunc)(ParseErrorCode);
RAPIDJSON_NAMESPACE_END
-#endif // RAPIDJSON_ERROR_ERROR_H__
+#ifdef __clang__
+RAPIDJSON_DIAG_POP
+#endif
+
+#endif // RAPIDJSON_ERROR_ERROR_H_
diff --git a/contrib/rapidjson/include/rapidjson/filereadstream.h b/contrib/rapidjson/include/rapidjson/filereadstream.h
index 3913eb74b..b56ea13b3 100644
--- a/contrib/rapidjson/include/rapidjson/filereadstream.h
+++ b/contrib/rapidjson/include/rapidjson/filereadstream.h
@@ -15,9 +15,16 @@
#ifndef RAPIDJSON_FILEREADSTREAM_H_
#define RAPIDJSON_FILEREADSTREAM_H_
-#include "rapidjson.h"
+#include "stream.h"
#include <cstdio>
+#ifdef __clang__
+RAPIDJSON_DIAG_PUSH
+RAPIDJSON_DIAG_OFF(padded)
+RAPIDJSON_DIAG_OFF(unreachable-code)
+RAPIDJSON_DIAG_OFF(missing-noreturn)
+#endif
+
RAPIDJSON_NAMESPACE_BEGIN
//! File byte stream for input using fread().
@@ -85,4 +92,8 @@ private:
RAPIDJSON_NAMESPACE_END
+#ifdef __clang__
+RAPIDJSON_DIAG_POP
+#endif
+
#endif // RAPIDJSON_FILESTREAM_H_
diff --git a/contrib/rapidjson/include/rapidjson/filewritestream.h b/contrib/rapidjson/include/rapidjson/filewritestream.h
index dfb9cbd02..6378dd60e 100644
--- a/contrib/rapidjson/include/rapidjson/filewritestream.h
+++ b/contrib/rapidjson/include/rapidjson/filewritestream.h
@@ -15,9 +15,14 @@
#ifndef RAPIDJSON_FILEWRITESTREAM_H_
#define RAPIDJSON_FILEWRITESTREAM_H_
-#include "rapidjson.h"
+#include "stream.h"
#include <cstdio>
+#ifdef __clang__
+RAPIDJSON_DIAG_PUSH
+RAPIDJSON_DIAG_OFF(unreachable-code)
+#endif
+
RAPIDJSON_NAMESPACE_BEGIN
//! Wrapper of C file stream for input using fread().
@@ -57,7 +62,11 @@ public:
void Flush() {
if (current_ != buffer_) {
- fwrite(buffer_, 1, static_cast<size_t>(current_ - buffer_), fp_);
+ size_t result = fwrite(buffer_, 1, static_cast<size_t>(current_ - buffer_), fp_);
+ if (result < static_cast<size_t>(current_ - buffer_)) {
+ // failure deliberately ignored at this time
+ // added to avoid warn_unused_result build errors
+ }
current_ = buffer_;
}
}
@@ -88,4 +97,8 @@ inline void PutN(FileWriteStream& stream, char c, size_t n) {
RAPIDJSON_NAMESPACE_END
+#ifdef __clang__
+RAPIDJSON_DIAG_POP
+#endif
+
#endif // RAPIDJSON_FILESTREAM_H_
diff --git a/contrib/rapidjson/include/rapidjson/fwd.h b/contrib/rapidjson/include/rapidjson/fwd.h
new file mode 100644
index 000000000..e8104e841
--- /dev/null
+++ b/contrib/rapidjson/include/rapidjson/fwd.h
@@ -0,0 +1,151 @@
+// Tencent is pleased to support the open source community by making RapidJSON available.
+//
+// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
+//
+// Licensed under the MIT License (the "License"); you may not use this file except
+// in compliance with the License. You may obtain a copy of the License at
+//
+// http://opensource.org/licenses/MIT
+//
+// Unless required by applicable law or agreed to in writing, software distributed
+// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+// CONDITIONS OF ANY KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations under the License.
+
+#ifndef RAPIDJSON_FWD_H_
+#define RAPIDJSON_FWD_H_
+
+#include "rapidjson.h"
+
+RAPIDJSON_NAMESPACE_BEGIN
+
+// encodings.h
+
+template<typename CharType> struct UTF8;
+template<typename CharType> struct UTF16;
+template<typename CharType> struct UTF16BE;
+template<typename CharType> struct UTF16LE;
+template<typename CharType> struct UTF32;
+template<typename CharType> struct UTF32BE;
+template<typename CharType> struct UTF32LE;
+template<typename CharType> struct ASCII;
+template<typename CharType> struct AutoUTF;
+
+template<typename SourceEncoding, typename TargetEncoding>
+struct Transcoder;
+
+// allocators.h
+
+class CrtAllocator;
+
+template <typename BaseAllocator>
+class MemoryPoolAllocator;
+
+// stream.h
+
+template <typename Encoding>
+struct GenericStringStream;
+
+typedef GenericStringStream<UTF8<char> > StringStream;
+
+template <typename Encoding>
+struct GenericInsituStringStream;
+
+typedef GenericInsituStringStream<UTF8<char> > InsituStringStream;
+
+// stringbuffer.h
+
+template <typename Encoding, typename Allocator>
+class GenericStringBuffer;
+
+typedef GenericStringBuffer<UTF8<char>, CrtAllocator> StringBuffer;
+
+// filereadstream.h
+
+class FileReadStream;
+
+// filewritestream.h
+
+class FileWriteStream;
+
+// memorybuffer.h
+
+template <typename Allocator>
+struct GenericMemoryBuffer;
+
+typedef GenericMemoryBuffer<CrtAllocator> MemoryBuffer;
+
+// memorystream.h
+
+struct MemoryStream;
+
+// reader.h
+
+template<typename Encoding, typename Derived>
+struct BaseReaderHandler;
+
+template <typename SourceEncoding, typename TargetEncoding, typename StackAllocator>
+class GenericReader;
+
+typedef GenericReader<UTF8<char>, UTF8<char>, CrtAllocator> Reader;
+
+// writer.h
+
+template<typename OutputStream, typename SourceEncoding, typename TargetEncoding, typename StackAllocator, unsigned writeFlags>
+class Writer;
+
+// prettywriter.h
+
+template<typename OutputStream, typename SourceEncoding, typename TargetEncoding, typename StackAllocator, unsigned writeFlags>
+class PrettyWriter;
+
+// document.h
+
+template <typename Encoding, typename Allocator>
+struct GenericMember;
+
+template <bool Const, typename Encoding, typename Allocator>
+class GenericMemberIterator;
+
+template<typename CharType>
+struct GenericStringRef;
+
+template <typename Encoding, typename Allocator>
+class GenericValue;
+
+typedef GenericValue<UTF8<char>, MemoryPoolAllocator<CrtAllocator> > Value;
+
+template <typename Encoding, typename Allocator, typename StackAllocator>
+class GenericDocument;
+
+typedef GenericDocument<UTF8<char>, MemoryPoolAllocator<CrtAllocator>, CrtAllocator> Document;
+
+// pointer.h
+
+template <typename ValueType, typename Allocator>
+class GenericPointer;
+
+typedef GenericPointer<Value, CrtAllocator> Pointer;
+
+// schema.h
+
+template <typename SchemaDocumentType>
+class IGenericRemoteSchemaDocumentProvider;
+
+template <typename ValueT, typename Allocator>
+class GenericSchemaDocument;
+
+typedef GenericSchemaDocument<Value, CrtAllocator> SchemaDocument;
+typedef IGenericRemoteSchemaDocumentProvider<SchemaDocument> IRemoteSchemaDocumentProvider;
+
+template <
+ typename SchemaDocumentType,
+ typename OutputHandler,
+ typename StateAllocator>
+class GenericSchemaValidator;
+
+typedef GenericSchemaValidator<SchemaDocument, BaseReaderHandler<UTF8<char>, void>, CrtAllocator> SchemaValidator;
+
+RAPIDJSON_NAMESPACE_END
+
+#endif // RAPIDJSON_RAPIDJSONFWD_H_
diff --git a/contrib/rapidjson/include/rapidjson/internal/biginteger.h b/contrib/rapidjson/include/rapidjson/internal/biginteger.h
index 99a30acf6..9d3e88c99 100644
--- a/contrib/rapidjson/include/rapidjson/internal/biginteger.h
+++ b/contrib/rapidjson/include/rapidjson/internal/biginteger.h
@@ -19,6 +19,7 @@
#if defined(_MSC_VER) && defined(_M_AMD64)
#include <intrin.h> // for _umul128
+#pragma intrinsic(_umul128)
#endif
RAPIDJSON_NAMESPACE_BEGIN
@@ -50,7 +51,16 @@ public:
if (length > 0)
AppendDecimal64(decimals + i, decimals + i + length);
}
-
+
+ BigInteger& operator=(const BigInteger &rhs)
+ {
+ if (this != &rhs) {
+ count_ = rhs.count_;
+ std::memcpy(digits_, rhs.digits_, count_ * sizeof(Type));
+ }
+ return *this;
+ }
+
BigInteger& operator=(uint64_t u) {
digits_[0] = u;
count_ = 1;
@@ -230,7 +240,7 @@ private:
uint64_t r = 0;
for (const char* p = begin; p != end; ++p) {
RAPIDJSON_ASSERT(*p >= '0' && *p <= '9');
- r = r * 10 + (*p - '0');
+ r = r * 10u + static_cast<unsigned>(*p - '0');
}
return r;
}
diff --git a/contrib/rapidjson/include/rapidjson/internal/diyfp.h b/contrib/rapidjson/include/rapidjson/internal/diyfp.h
index 3b6c4238c..29abf8046 100644
--- a/contrib/rapidjson/include/rapidjson/internal/diyfp.h
+++ b/contrib/rapidjson/include/rapidjson/internal/diyfp.h
@@ -21,9 +21,10 @@
#include "../rapidjson.h"
-#if defined(_MSC_VER) && defined(_M_AMD64)
+#if defined(_MSC_VER) && defined(_M_AMD64) && !defined(__INTEL_COMPILER)
#include <intrin.h>
#pragma intrinsic(_BitScanReverse64)
+#pragma intrinsic(_umul128)
#endif
RAPIDJSON_NAMESPACE_BEGIN
@@ -34,8 +35,13 @@ RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF(effc++)
#endif
+#ifdef __clang__
+RAPIDJSON_DIAG_PUSH
+RAPIDJSON_DIAG_OFF(padded)
+#endif
+
struct DiyFp {
- DiyFp() {}
+ DiyFp() : f(), e() {}
DiyFp(uint64_t fp, int exp) : f(fp), e(exp) {}
@@ -232,8 +238,8 @@ inline DiyFp GetCachedPower(int e, int* K) {
}
inline DiyFp GetCachedPower10(int exp, int *outExp) {
- unsigned index = (exp + 348) / 8;
- *outExp = -348 + index * 8;
+ unsigned index = (static_cast<unsigned>(exp) + 348u) / 8u;
+ *outExp = -348 + static_cast<int>(index) * 8;
return GetCachedPowerByIndex(index);
}
@@ -241,6 +247,11 @@ inline DiyFp GetCachedPower10(int exp, int *outExp) {
RAPIDJSON_DIAG_POP
#endif
+#ifdef __clang__
+RAPIDJSON_DIAG_POP
+RAPIDJSON_DIAG_OFF(padded)
+#endif
+
} // namespace internal
RAPIDJSON_NAMESPACE_END
diff --git a/contrib/rapidjson/include/rapidjson/internal/dtoa.h b/contrib/rapidjson/include/rapidjson/internal/dtoa.h
index 2d8d2e46a..bf2e9b2e5 100644
--- a/contrib/rapidjson/include/rapidjson/internal/dtoa.h
+++ b/contrib/rapidjson/include/rapidjson/internal/dtoa.h
@@ -29,6 +29,7 @@ namespace internal {
#ifdef __GNUC__
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF(effc++)
+RAPIDJSON_DIAG_OFF(array-bounds) // some gcc versions generate wrong warnings https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59124
#endif
inline void GrisuRound(char* buffer, int len, uint64_t delta, uint64_t rest, uint64_t ten_kappa, uint64_t wp_w) {
@@ -40,7 +41,7 @@ inline void GrisuRound(char* buffer, int len, uint64_t delta, uint64_t rest, uin
}
}
-inline unsigned CountDecimalDigit32(uint32_t n) {
+inline int CountDecimalDigit32(uint32_t n) {
// Simple pure C++ implementation was faster than __builtin_clz version in this situation.
if (n < 10) return 1;
if (n < 100) return 2;
@@ -101,7 +102,8 @@ inline void DigitGen(const DiyFp& W, const DiyFp& Mp, uint64_t delta, char* buff
kappa--;
if (p2 < delta) {
*K += kappa;
- GrisuRound(buffer, *len, delta, p2, one.f, wp_w.f * kPow10[-kappa]);
+ int index = -kappa;
+ GrisuRound(buffer, *len, delta, p2, one.f, wp_w.f * (index < 9 ? kPow10[index] : 0));
return;
}
}
@@ -145,10 +147,10 @@ inline char* WriteExponent(int K, char* buffer) {
return buffer;
}
-inline char* Prettify(char* buffer, int length, int k) {
+inline char* Prettify(char* buffer, int length, int k, int maxDecimalPlaces) {
const int kk = length + k; // 10^(kk-1) <= v < 10^kk
- if (length <= kk && kk <= 21) {
+ if (0 <= k && kk <= 21) {
// 1234e7 -> 12340000000
for (int i = length; i < kk; i++)
buffer[i] = '0';
@@ -158,19 +160,44 @@ inline char* Prettify(char* buffer, int length, int k) {
}
else if (0 < kk && kk <= 21) {
// 1234e-2 -> 12.34
- std::memmove(&buffer[kk + 1], &buffer[kk], length - kk);
+ std::memmove(&buffer[kk + 1], &buffer[kk], static_cast<size_t>(length - kk));
buffer[kk] = '.';
- return &buffer[length + 1];
+ if (0 > k + maxDecimalPlaces) {
+ // When maxDecimalPlaces = 2, 1.2345 -> 1.23, 1.102 -> 1.1
+ // Remove extra trailing zeros (at least one) after truncation.
+ for (int i = kk + maxDecimalPlaces; i > kk + 1; i--)
+ if (buffer[i] != '0')
+ return &buffer[i + 1];
+ return &buffer[kk + 2]; // Reserve one zero
+ }
+ else
+ return &buffer[length + 1];
}
else if (-6 < kk && kk <= 0) {
// 1234e-6 -> 0.001234
const int offset = 2 - kk;
- std::memmove(&buffer[offset], &buffer[0], length);
+ std::memmove(&buffer[offset], &buffer[0], static_cast<size_t>(length));
buffer[0] = '0';
buffer[1] = '.';
for (int i = 2; i < offset; i++)
buffer[i] = '0';
- return &buffer[length + offset];
+ if (length - kk > maxDecimalPlaces) {
+ // When maxDecimalPlaces = 2, 0.123 -> 0.12, 0.102 -> 0.1
+ // Remove extra trailing zeros (at least one) after truncation.
+ for (int i = maxDecimalPlaces + 1; i > 2; i--)
+ if (buffer[i] != '0')
+ return &buffer[i + 1];
+ return &buffer[3]; // Reserve one zero
+ }
+ else
+ return &buffer[length + offset];
+ }
+ else if (kk < -maxDecimalPlaces) {
+ // Truncate to zero
+ buffer[0] = '0';
+ buffer[1] = '.';
+ buffer[2] = '0';
+ return &buffer[3];
}
else if (length == 1) {
// 1e30
@@ -179,14 +206,15 @@ inline char* Prettify(char* buffer, int length, int k) {
}
else {
// 1234e30 -> 1.234e33
- std::memmove(&buffer[2], &buffer[1], length - 1);
+ std::memmove(&buffer[2], &buffer[1], static_cast<size_t>(length - 1));
buffer[1] = '.';
buffer[length + 1] = 'e';
return WriteExponent(kk - 1, &buffer[0 + length + 2]);
}
}
-inline char* dtoa(double value, char* buffer) {
+inline char* dtoa(double value, char* buffer, int maxDecimalPlaces = 324) {
+ RAPIDJSON_ASSERT(maxDecimalPlaces >= 1);
Double d(value);
if (d.IsZero()) {
if (d.Sign())
@@ -203,7 +231,7 @@ inline char* dtoa(double value, char* buffer) {
}
int length, K;
Grisu2(value, buffer, &length, &K);
- return Prettify(buffer, length, K);
+ return Prettify(buffer, length, K, maxDecimalPlaces);
}
}
diff --git a/contrib/rapidjson/include/rapidjson/internal/ieee754.h b/contrib/rapidjson/include/rapidjson/internal/ieee754.h
index e3f03364c..c2684ba2a 100644
--- a/contrib/rapidjson/include/rapidjson/internal/ieee754.h
+++ b/contrib/rapidjson/include/rapidjson/internal/ieee754.h
@@ -40,6 +40,7 @@ public:
bool IsNan() const { return (u_ & kExponentMask) == kExponentMask && Significand() != 0; }
bool IsInf() const { return (u_ & kExponentMask) == kExponentMask && Significand() == 0; }
+ bool IsNanOrInf() const { return (u_ & kExponentMask) == kExponentMask; }
bool IsNormal() const { return (u_ & kExponentMask) != 0 || Significand() == 0; }
bool IsZero() const { return (u_ & (kExponentMask | kSignificandMask)) == 0; }
@@ -47,7 +48,7 @@ public:
int IntegerExponent() const { return (IsNormal() ? Exponent() : kDenormalExponent) - kSignificandSize; }
uint64_t ToBias() const { return (u_ & kSignMask) ? ~u_ + 1 : u_ | kSignMask; }
- static unsigned EffectiveSignificandSize(int order) {
+ static int EffectiveSignificandSize(int order) {
if (order >= -1021)
return 53;
else if (order <= -1074)
diff --git a/contrib/rapidjson/include/rapidjson/internal/regex.h b/contrib/rapidjson/include/rapidjson/internal/regex.h
new file mode 100644
index 000000000..e1a2faae5
--- /dev/null
+++ b/contrib/rapidjson/include/rapidjson/internal/regex.h
@@ -0,0 +1,734 @@
+// Tencent is pleased to support the open source community by making RapidJSON available.
+//
+// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
+//
+// Licensed under the MIT License (the "License"); you may not use this file except
+// in compliance with the License. You may obtain a copy of the License at
+//
+// http://opensource.org/licenses/MIT
+//
+// Unless required by applicable law or agreed to in writing, software distributed
+// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+// CONDITIONS OF ANY KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations under the License.
+
+#ifndef RAPIDJSON_INTERNAL_REGEX_H_
+#define RAPIDJSON_INTERNAL_REGEX_H_
+
+#include "../allocators.h"
+#include "../stream.h"
+#include "stack.h"
+
+#ifdef __clang__
+RAPIDJSON_DIAG_PUSH
+RAPIDJSON_DIAG_OFF(padded)
+RAPIDJSON_DIAG_OFF(switch-enum)
+RAPIDJSON_DIAG_OFF(implicit-fallthrough)
+#endif
+
+#ifdef __GNUC__
+RAPIDJSON_DIAG_PUSH
+RAPIDJSON_DIAG_OFF(effc++)
+#if __GNUC__ >= 7
+RAPIDJSON_DIAG_OFF(implicit-fallthrough)
+#endif
+#endif
+
+#ifdef _MSC_VER
+RAPIDJSON_DIAG_PUSH
+RAPIDJSON_DIAG_OFF(4512) // assignment operator could not be generated
+#endif
+
+#ifndef RAPIDJSON_REGEX_VERBOSE
+#define RAPIDJSON_REGEX_VERBOSE 0
+#endif
+
+RAPIDJSON_NAMESPACE_BEGIN
+namespace internal {
+
+///////////////////////////////////////////////////////////////////////////////
+// DecodedStream
+
+template <typename SourceStream, typename Encoding>
+class DecodedStream {
+public:
+ DecodedStream(SourceStream& ss) : ss_(ss), codepoint_() { Decode(); }
+ unsigned Peek() { return codepoint_; }
+ unsigned Take() {
+ unsigned c = codepoint_;
+ if (c) // No further decoding when '\0'
+ Decode();
+ return c;
+ }
+
+private:
+ void Decode() {
+ if (!Encoding::Decode(ss_, &codepoint_))
+ codepoint_ = 0;
+ }
+
+ SourceStream& ss_;
+ unsigned codepoint_;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+// GenericRegex
+
+static const SizeType kRegexInvalidState = ~SizeType(0); //!< Represents an invalid index in GenericRegex::State::out, out1
+static const SizeType kRegexInvalidRange = ~SizeType(0);
+
+template <typename Encoding, typename Allocator>
+class GenericRegexSearch;
+
+//! Regular expression engine with subset of ECMAscript grammar.
+/*!
+ Supported regular expression syntax:
+ - \c ab Concatenation
+ - \c a|b Alternation
+ - \c a? Zero or one
+ - \c a* Zero or more
+ - \c a+ One or more
+ - \c a{3} Exactly 3 times
+ - \c a{3,} At least 3 times
+ - \c a{3,5} 3 to 5 times
+ - \c (ab) Grouping
+ - \c ^a At the beginning
+ - \c a$ At the end
+ - \c . Any character
+ - \c [abc] Character classes
+ - \c [a-c] Character class range
+ - \c [a-z0-9_] Character class combination
+ - \c [^abc] Negated character classes
+ - \c [^a-c] Negated character class range
+ - \c [\b] Backspace (U+0008)
+ - \c \\| \\\\ ... Escape characters
+ - \c \\f Form feed (U+000C)
+ - \c \\n Line feed (U+000A)
+ - \c \\r Carriage return (U+000D)
+ - \c \\t Tab (U+0009)
+ - \c \\v Vertical tab (U+000B)
+
+ \note This is a Thompson NFA engine, implemented with reference to
+ Cox, Russ. "Regular Expression Matching Can Be Simple And Fast (but is slow in Java, Perl, PHP, Python, Ruby,...).",
+ https://swtch.com/~rsc/regexp/regexp1.html
+*/
+template <typename Encoding, typename Allocator = CrtAllocator>
+class GenericRegex {
+public:
+ typedef Encoding EncodingType;
+ typedef typename Encoding::Ch Ch;
+ template <typename, typename> friend class GenericRegexSearch;
+
+ GenericRegex(const Ch* source, Allocator* allocator = 0) :
+ states_(allocator, 256), ranges_(allocator, 256), root_(kRegexInvalidState), stateCount_(), rangeCount_(),
+ anchorBegin_(), anchorEnd_()
+ {
+ GenericStringStream<Encoding> ss(source);
+ DecodedStream<GenericStringStream<Encoding>, Encoding> ds(ss);
+ Parse(ds);
+ }
+
+ ~GenericRegex() {}
+
+ bool IsValid() const {
+ return root_ != kRegexInvalidState;
+ }
+
+private:
+ enum Operator {
+ kZeroOrOne,
+ kZeroOrMore,
+ kOneOrMore,
+ kConcatenation,
+ kAlternation,
+ kLeftParenthesis
+ };
+
+ static const unsigned kAnyCharacterClass = 0xFFFFFFFF; //!< For '.'
+ static const unsigned kRangeCharacterClass = 0xFFFFFFFE;
+ static const unsigned kRangeNegationFlag = 0x80000000;
+
+ struct Range {
+ unsigned start; //
+ unsigned end;
+ SizeType next;
+ };
+
+ struct State {
+ SizeType out; //!< Equals to kInvalid for matching state
+ SizeType out1; //!< Equals to non-kInvalid for split
+ SizeType rangeStart;
+ unsigned codepoint;
+ };
+
+ struct Frag {
+ Frag(SizeType s, SizeType o, SizeType m) : start(s), out(o), minIndex(m) {}
+ SizeType start;
+ SizeType out; //!< link-list of all output states
+ SizeType minIndex;
+ };
+
+ State& GetState(SizeType index) {
+ RAPIDJSON_ASSERT(index < stateCount_);
+ return states_.template Bottom<State>()[index];
+ }
+
+ const State& GetState(SizeType index) const {
+ RAPIDJSON_ASSERT(index < stateCount_);
+ return states_.template Bottom<State>()[index];
+ }
+
+ Range& GetRange(SizeType index) {
+ RAPIDJSON_ASSERT(index < rangeCount_);
+ return ranges_.template Bottom<Range>()[index];
+ }
+
+ const Range& GetRange(SizeType index) const {
+ RAPIDJSON_ASSERT(index < rangeCount_);
+ return ranges_.template Bottom<Range>()[index];
+ }
+
+ template <typename InputStream>
+ void Parse(DecodedStream<InputStream, Encoding>& ds) {
+ Allocator allocator;
+ Stack<Allocator> operandStack(&allocator, 256); // Frag
+ Stack<Allocator> operatorStack(&allocator, 256); // Operator
+ Stack<Allocator> atomCountStack(&allocator, 256); // unsigned (Atom per parenthesis)
+
+ *atomCountStack.template Push<unsigned>() = 0;
+
+ unsigned codepoint;
+ while (ds.Peek() != 0) {
+ switch (codepoint = ds.Take()) {
+ case '^':
+ anchorBegin_ = true;
+ break;
+
+ case '$':
+ anchorEnd_ = true;
+ break;
+
+ case '|':
+ while (!operatorStack.Empty() && *operatorStack.template Top<Operator>() < kAlternation)
+ if (!Eval(operandStack, *operatorStack.template Pop<Operator>(1)))
+ return;
+ *operatorStack.template Push<Operator>() = kAlternation;
+ *atomCountStack.template Top<unsigned>() = 0;
+ break;
+
+ case '(':
+ *operatorStack.template Push<Operator>() = kLeftParenthesis;
+ *atomCountStack.template Push<unsigned>() = 0;
+ break;
+
+ case ')':
+ while (!operatorStack.Empty() && *operatorStack.template Top<Operator>() != kLeftParenthesis)
+ if (!Eval(operandStack, *operatorStack.template Pop<Operator>(1)))
+ return;
+ if (operatorStack.Empty())
+ return;
+ operatorStack.template Pop<Operator>(1);
+ atomCountStack.template Pop<unsigned>(1);
+ ImplicitConcatenation(atomCountStack, operatorStack);
+ break;
+
+ case '?':
+ if (!Eval(operandStack, kZeroOrOne))
+ return;
+ break;
+
+ case '*':
+ if (!Eval(operandStack, kZeroOrMore))
+ return;
+ break;
+
+ case '+':
+ if (!Eval(operandStack, kOneOrMore))
+ return;
+ break;
+
+ case '{':
+ {
+ unsigned n, m;
+ if (!ParseUnsigned(ds, &n))
+ return;
+
+ if (ds.Peek() == ',') {
+ ds.Take();
+ if (ds.Peek() == '}')
+ m = kInfinityQuantifier;
+ else if (!ParseUnsigned(ds, &m) || m < n)
+ return;
+ }
+ else
+ m = n;
+
+ if (!EvalQuantifier(operandStack, n, m) || ds.Peek() != '}')
+ return;
+ ds.Take();
+ }
+ break;
+
+ case '.':
+ PushOperand(operandStack, kAnyCharacterClass);
+ ImplicitConcatenation(atomCountStack, operatorStack);
+ break;
+
+ case '[':
+ {
+ SizeType range;
+ if (!ParseRange(ds, &range))
+ return;
+ SizeType s = NewState(kRegexInvalidState, kRegexInvalidState, kRangeCharacterClass);
+ GetState(s).rangeStart = range;
+ *operandStack.template Push<Frag>() = Frag(s, s, s);
+ }
+ ImplicitConcatenation(atomCountStack, operatorStack);
+ break;
+
+ case '\\': // Escape character
+ if (!CharacterEscape(ds, &codepoint))
+ return; // Unsupported escape character
+ // fall through to default
+
+ default: // Pattern character
+ PushOperand(operandStack, codepoint);
+ ImplicitConcatenation(atomCountStack, operatorStack);
+ }
+ }
+
+ while (!operatorStack.Empty())
+ if (!Eval(operandStack, *operatorStack.template Pop<Operator>(1)))
+ return;
+
+ // Link the operand to matching state.
+ if (operandStack.GetSize() == sizeof(Frag)) {
+ Frag* e = operandStack.template Pop<Frag>(1);
+ Patch(e->out, NewState(kRegexInvalidState, kRegexInvalidState, 0));
+ root_ = e->start;
+
+#if RAPIDJSON_REGEX_VERBOSE
+ printf("root: %d\n", root_);
+ for (SizeType i = 0; i < stateCount_ ; i++) {
+ State& s = GetState(i);
+ printf("[%2d] out: %2d out1: %2d c: '%c'\n", i, s.out, s.out1, (char)s.codepoint);
+ }
+ printf("\n");
+#endif
+ }
+ }
+
+ SizeType NewState(SizeType out, SizeType out1, unsigned codepoint) {
+ State* s = states_.template Push<State>();
+ s->out = out;
+ s->out1 = out1;
+ s->codepoint = codepoint;
+ s->rangeStart = kRegexInvalidRange;
+ return stateCount_++;
+ }
+
+ void PushOperand(Stack<Allocator>& operandStack, unsigned codepoint) {
+ SizeType s = NewState(kRegexInvalidState, kRegexInvalidState, codepoint);
+ *operandStack.template Push<Frag>() = Frag(s, s, s);
+ }
+
+ void ImplicitConcatenation(Stack<Allocator>& atomCountStack, Stack<Allocator>& operatorStack) {
+ if (*atomCountStack.template Top<unsigned>())
+ *operatorStack.template Push<Operator>() = kConcatenation;
+ (*atomCountStack.template Top<unsigned>())++;
+ }
+
+ SizeType Append(SizeType l1, SizeType l2) {
+ SizeType old = l1;
+ while (GetState(l1).out != kRegexInvalidState)
+ l1 = GetState(l1).out;
+ GetState(l1).out = l2;
+ return old;
+ }
+
+ void Patch(SizeType l, SizeType s) {
+ for (SizeType next; l != kRegexInvalidState; l = next) {
+ next = GetState(l).out;
+ GetState(l).out = s;
+ }
+ }
+
+ bool Eval(Stack<Allocator>& operandStack, Operator op) {
+ switch (op) {
+ case kConcatenation:
+ RAPIDJSON_ASSERT(operandStack.GetSize() >= sizeof(Frag) * 2);
+ {
+ Frag e2 = *operandStack.template Pop<Frag>(1);
+ Frag e1 = *operandStack.template Pop<Frag>(1);
+ Patch(e1.out, e2.start);
+ *operandStack.template Push<Frag>() = Frag(e1.start, e2.out, Min(e1.minIndex, e2.minIndex));
+ }
+ return true;
+
+ case kAlternation:
+ if (operandStack.GetSize() >= sizeof(Frag) * 2) {
+ Frag e2 = *operandStack.template Pop<Frag>(1);
+ Frag e1 = *operandStack.template Pop<Frag>(1);
+ SizeType s = NewState(e1.start, e2.start, 0);
+ *operandStack.template Push<Frag>() = Frag(s, Append(e1.out, e2.out), Min(e1.minIndex, e2.minIndex));
+ return true;
+ }
+ return false;
+
+ case kZeroOrOne:
+ if (operandStack.GetSize() >= sizeof(Frag)) {
+ Frag e = *operandStack.template Pop<Frag>(1);
+ SizeType s = NewState(kRegexInvalidState, e.start, 0);
+ *operandStack.template Push<Frag>() = Frag(s, Append(e.out, s), e.minIndex);
+ return true;
+ }
+ return false;
+
+ case kZeroOrMore:
+ if (operandStack.GetSize() >= sizeof(Frag)) {
+ Frag e = *operandStack.template Pop<Frag>(1);
+ SizeType s = NewState(kRegexInvalidState, e.start, 0);
+ Patch(e.out, s);
+ *operandStack.template Push<Frag>() = Frag(s, s, e.minIndex);
+ return true;
+ }
+ return false;
+
+ default:
+ RAPIDJSON_ASSERT(op == kOneOrMore);
+ if (operandStack.GetSize() >= sizeof(Frag)) {
+ Frag e = *operandStack.template Pop<Frag>(1);
+ SizeType s = NewState(kRegexInvalidState, e.start, 0);
+ Patch(e.out, s);
+ *operandStack.template Push<Frag>() = Frag(e.start, s, e.minIndex);
+ return true;
+ }
+ return false;
+ }
+ }
+
+ bool EvalQuantifier(Stack<Allocator>& operandStack, unsigned n, unsigned m) {
+ RAPIDJSON_ASSERT(n <= m);
+ RAPIDJSON_ASSERT(operandStack.GetSize() >= sizeof(Frag));
+
+ if (n == 0) {
+ if (m == 0) // a{0} not support
+ return false;
+ else if (m == kInfinityQuantifier)
+ Eval(operandStack, kZeroOrMore); // a{0,} -> a*
+ else {
+ Eval(operandStack, kZeroOrOne); // a{0,5} -> a?
+ for (unsigned i = 0; i < m - 1; i++)
+ CloneTopOperand(operandStack); // a{0,5} -> a? a? a? a? a?
+ for (unsigned i = 0; i < m - 1; i++)
+ Eval(operandStack, kConcatenation); // a{0,5} -> a?a?a?a?a?
+ }
+ return true;
+ }
+
+ for (unsigned i = 0; i < n - 1; i++) // a{3} -> a a a
+ CloneTopOperand(operandStack);
+
+ if (m == kInfinityQuantifier)
+ Eval(operandStack, kOneOrMore); // a{3,} -> a a a+
+ else if (m > n) {
+ CloneTopOperand(operandStack); // a{3,5} -> a a a a
+ Eval(operandStack, kZeroOrOne); // a{3,5} -> a a a a?
+ for (unsigned i = n; i < m - 1; i++)
+ CloneTopOperand(operandStack); // a{3,5} -> a a a a? a?
+ for (unsigned i = n; i < m; i++)
+ Eval(operandStack, kConcatenation); // a{3,5} -> a a aa?a?
+ }
+
+ for (unsigned i = 0; i < n - 1; i++)
+ Eval(operandStack, kConcatenation); // a{3} -> aaa, a{3,} -> aaa+, a{3.5} -> aaaa?a?
+
+ return true;
+ }
+
+ static SizeType Min(SizeType a, SizeType b) { return a < b ? a : b; }
+
+ void CloneTopOperand(Stack<Allocator>& operandStack) {
+ const Frag src = *operandStack.template Top<Frag>(); // Copy constructor to prevent invalidation
+ SizeType count = stateCount_ - src.minIndex; // Assumes top operand contains states in [src->minIndex, stateCount_)
+ State* s = states_.template Push<State>(count);
+ memcpy(s, &GetState(src.minIndex), count * sizeof(State));
+ for (SizeType j = 0; j < count; j++) {
+ if (s[j].out != kRegexInvalidState)
+ s[j].out += count;
+ if (s[j].out1 != kRegexInvalidState)
+ s[j].out1 += count;
+ }
+ *operandStack.template Push<Frag>() = Frag(src.start + count, src.out + count, src.minIndex + count);
+ stateCount_ += count;
+ }
+
+ template <typename InputStream>
+ bool ParseUnsigned(DecodedStream<InputStream, Encoding>& ds, unsigned* u) {
+ unsigned r = 0;
+ if (ds.Peek() < '0' || ds.Peek() > '9')
+ return false;
+ while (ds.Peek() >= '0' && ds.Peek() <= '9') {
+ if (r >= 429496729 && ds.Peek() > '5') // 2^32 - 1 = 4294967295
+ return false; // overflow
+ r = r * 10 + (ds.Take() - '0');
+ }
+ *u = r;
+ return true;
+ }
+
+ template <typename InputStream>
+ bool ParseRange(DecodedStream<InputStream, Encoding>& ds, SizeType* range) {
+ bool isBegin = true;
+ bool negate = false;
+ int step = 0;
+ SizeType start = kRegexInvalidRange;
+ SizeType current = kRegexInvalidRange;
+ unsigned codepoint;
+ while ((codepoint = ds.Take()) != 0) {
+ if (isBegin) {
+ isBegin = false;
+ if (codepoint == '^') {
+ negate = true;
+ continue;
+ }
+ }
+
+ switch (codepoint) {
+ case ']':
+ if (start == kRegexInvalidRange)
+ return false; // Error: nothing inside []
+ if (step == 2) { // Add trailing '-'
+ SizeType r = NewRange('-');
+ RAPIDJSON_ASSERT(current != kRegexInvalidRange);
+ GetRange(current).next = r;
+ }
+ if (negate)
+ GetRange(start).start |= kRangeNegationFlag;
+ *range = start;
+ return true;
+
+ case '\\':
+ if (ds.Peek() == 'b') {
+ ds.Take();
+ codepoint = 0x0008; // Escape backspace character
+ }
+ else if (!CharacterEscape(ds, &codepoint))
+ return false;
+ // fall through to default
+
+ default:
+ switch (step) {
+ case 1:
+ if (codepoint == '-') {
+ step++;
+ break;
+ }
+ // fall through to step 0 for other characters
+
+ case 0:
+ {
+ SizeType r = NewRange(codepoint);
+ if (current != kRegexInvalidRange)
+ GetRange(current).next = r;
+ if (start == kRegexInvalidRange)
+ start = r;
+ current = r;
+ }
+ step = 1;
+ break;
+
+ default:
+ RAPIDJSON_ASSERT(step == 2);
+ GetRange(current).end = codepoint;
+ step = 0;
+ }
+ }
+ }
+ return false;
+ }
+
+ SizeType NewRange(unsigned codepoint) {
+ Range* r = ranges_.template Push<Range>();
+ r->start = r->end = codepoint;
+ r->next = kRegexInvalidRange;
+ return rangeCount_++;
+ }
+
+ template <typename InputStream>
+ bool CharacterEscape(DecodedStream<InputStream, Encoding>& ds, unsigned* escapedCodepoint) {
+ unsigned codepoint;
+ switch (codepoint = ds.Take()) {
+ case '^':
+ case '$':
+ case '|':
+ case '(':
+ case ')':
+ case '?':
+ case '*':
+ case '+':
+ case '.':
+ case '[':
+ case ']':
+ case '{':
+ case '}':
+ case '\\':
+ *escapedCodepoint = codepoint; return true;
+ case 'f': *escapedCodepoint = 0x000C; return true;
+ case 'n': *escapedCodepoint = 0x000A; return true;
+ case 'r': *escapedCodepoint = 0x000D; return true;
+ case 't': *escapedCodepoint = 0x0009; return true;
+ case 'v': *escapedCodepoint = 0x000B; return true;
+ default:
+ return false; // Unsupported escape character
+ }
+ }
+
+ Stack<Allocator> states_;
+ Stack<Allocator> ranges_;
+ SizeType root_;
+ SizeType stateCount_;
+ SizeType rangeCount_;
+
+ static const unsigned kInfinityQuantifier = ~0u;
+
+ // For SearchWithAnchoring()
+ bool anchorBegin_;
+ bool anchorEnd_;
+};
+
+template <typename RegexType, typename Allocator = CrtAllocator>
+class GenericRegexSearch {
+public:
+ typedef typename RegexType::EncodingType Encoding;
+ typedef typename Encoding::Ch Ch;
+
+ GenericRegexSearch(const RegexType& regex, Allocator* allocator = 0) :
+ regex_(regex), allocator_(allocator), ownAllocator_(0),
+ state0_(allocator, 0), state1_(allocator, 0), stateSet_()
+ {
+ RAPIDJSON_ASSERT(regex_.IsValid());
+ if (!allocator_)
+ ownAllocator_ = allocator_ = RAPIDJSON_NEW(Allocator)();
+ stateSet_ = static_cast<unsigned*>(allocator_->Malloc(GetStateSetSize()));
+ state0_.template Reserve<SizeType>(regex_.stateCount_);
+ state1_.template Reserve<SizeType>(regex_.stateCount_);
+ }
+
+ ~GenericRegexSearch() {
+ Allocator::Free(stateSet_);
+ RAPIDJSON_DELETE(ownAllocator_);
+ }
+
+ template <typename InputStream>
+ bool Match(InputStream& is) {
+ return SearchWithAnchoring(is, true, true);
+ }
+
+ bool Match(const Ch* s) {
+ GenericStringStream<Encoding> is(s);
+ return Match(is);
+ }
+
+ template <typename InputStream>
+ bool Search(InputStream& is) {
+ return SearchWithAnchoring(is, regex_.anchorBegin_, regex_.anchorEnd_);
+ }
+
+ bool Search(const Ch* s) {
+ GenericStringStream<Encoding> is(s);
+ return Search(is);
+ }
+
+private:
+ typedef typename RegexType::State State;
+ typedef typename RegexType::Range Range;
+
+ template <typename InputStream>
+ bool SearchWithAnchoring(InputStream& is, bool anchorBegin, bool anchorEnd) {
+ DecodedStream<InputStream, Encoding> ds(is);
+
+ state0_.Clear();
+ Stack<Allocator> *current = &state0_, *next = &state1_;
+ const size_t stateSetSize = GetStateSetSize();
+ std::memset(stateSet_, 0, stateSetSize);
+
+ bool matched = AddState(*current, regex_.root_);
+ unsigned codepoint;
+ while (!current->Empty() && (codepoint = ds.Take()) != 0) {
+ std::memset(stateSet_, 0, stateSetSize);
+ next->Clear();
+ matched = false;
+ for (const SizeType* s = current->template Bottom<SizeType>(); s != current->template End<SizeType>(); ++s) {
+ const State& sr = regex_.GetState(*s);
+ if (sr.codepoint == codepoint ||
+ sr.codepoint == RegexType::kAnyCharacterClass ||
+ (sr.codepoint == RegexType::kRangeCharacterClass && MatchRange(sr.rangeStart, codepoint)))
+ {
+ matched = AddState(*next, sr.out) || matched;
+ if (!anchorEnd && matched)
+ return true;
+ }
+ if (!anchorBegin)
+ AddState(*next, regex_.root_);
+ }
+ internal::Swap(current, next);
+ }
+
+ return matched;
+ }
+
+ size_t GetStateSetSize() const {
+ return (regex_.stateCount_ + 31) / 32 * 4;
+ }
+
+ // Return whether the added states is a match state
+ bool AddState(Stack<Allocator>& l, SizeType index) {
+ RAPIDJSON_ASSERT(index != kRegexInvalidState);
+
+ const State& s = regex_.GetState(index);
+ if (s.out1 != kRegexInvalidState) { // Split
+ bool matched = AddState(l, s.out);
+ return AddState(l, s.out1) || matched;
+ }
+ else if (!(stateSet_[index >> 5] & (1u << (index & 31)))) {
+ stateSet_[index >> 5] |= (1u << (index & 31));
+ *l.template PushUnsafe<SizeType>() = index;
+ }
+ return s.out == kRegexInvalidState; // by using PushUnsafe() above, we can ensure s is not validated due to reallocation.
+ }
+
+ bool MatchRange(SizeType rangeIndex, unsigned codepoint) const {
+ bool yes = (regex_.GetRange(rangeIndex).start & RegexType::kRangeNegationFlag) == 0;
+ while (rangeIndex != kRegexInvalidRange) {
+ const Range& r = regex_.GetRange(rangeIndex);
+ if (codepoint >= (r.start & ~RegexType::kRangeNegationFlag) && codepoint <= r.end)
+ return yes;
+ rangeIndex = r.next;
+ }
+ return !yes;
+ }
+
+ const RegexType& regex_;
+ Allocator* allocator_;
+ Allocator* ownAllocator_;
+ Stack<Allocator> state0_;
+ Stack<Allocator> state1_;
+ uint32_t* stateSet_;
+};
+
+typedef GenericRegex<UTF8<> > Regex;
+typedef GenericRegexSearch<Regex> RegexSearch;
+
+} // namespace internal
+RAPIDJSON_NAMESPACE_END
+
+#ifdef __clang__
+RAPIDJSON_DIAG_POP
+#endif
+
+#ifdef _MSC_VER
+RAPIDJSON_DIAG_POP
+#endif
+
+#endif // RAPIDJSON_INTERNAL_REGEX_H_
diff --git a/contrib/rapidjson/include/rapidjson/internal/stack.h b/contrib/rapidjson/include/rapidjson/internal/stack.h
index 722d56923..5c5398c35 100644
--- a/contrib/rapidjson/include/rapidjson/internal/stack.h
+++ b/contrib/rapidjson/include/rapidjson/internal/stack.h
@@ -15,7 +15,13 @@
#ifndef RAPIDJSON_INTERNAL_STACK_H_
#define RAPIDJSON_INTERNAL_STACK_H_
-#include "../rapidjson.h"
+#include "../allocators.h"
+#include "swap.h"
+
+#if defined(__clang__)
+RAPIDJSON_DIAG_PUSH
+RAPIDJSON_DIAG_OFF(c++98-compat)
+#endif
RAPIDJSON_NAMESPACE_BEGIN
namespace internal {
@@ -32,7 +38,6 @@ public:
// Optimization note: Do not allocate memory for stack_ in constructor.
// Do it lazily when first Push() -> Expand() -> Resize().
Stack(Allocator* allocator, size_t stackCapacity) : allocator_(allocator), ownAllocator_(0), stack_(0), stackTop_(0), stackEnd_(0), initialCapacity_(stackCapacity) {
- RAPIDJSON_ASSERT(stackCapacity > 0);
}
#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
@@ -81,6 +86,15 @@ public:
}
#endif
+ void Swap(Stack& rhs) RAPIDJSON_NOEXCEPT {
+ internal::Swap(allocator_, rhs.allocator_);
+ internal::Swap(ownAllocator_, rhs.ownAllocator_);
+ internal::Swap(stack_, rhs.stack_);
+ internal::Swap(stackTop_, rhs.stackTop_);
+ internal::Swap(stackEnd_, rhs.stackEnd_);
+ internal::Swap(initialCapacity_, rhs.initialCapacity_);
+ }
+
void Clear() { stackTop_ = stack_; }
void ShrinkToFit() {
@@ -98,11 +112,22 @@ public:
// Optimization note: try to minimize the size of this function for force inline.
// Expansion is run very infrequently, so it is moved to another (probably non-inline) function.
template<typename T>
- RAPIDJSON_FORCEINLINE T* Push(size_t count = 1) {
+ RAPIDJSON_FORCEINLINE void Reserve(size_t count = 1) {
// Expand the stack if needed
- if (stackTop_ + sizeof(T) * count >= stackEnd_)
+ if (RAPIDJSON_UNLIKELY(stackTop_ + sizeof(T) * count > stackEnd_))
Expand<T>(count);
+ }
+
+ template<typename T>
+ RAPIDJSON_FORCEINLINE T* Push(size_t count = 1) {
+ Reserve<T>(count);
+ return PushUnsafe<T>(count);
+ }
+ template<typename T>
+ RAPIDJSON_FORCEINLINE T* PushUnsafe(size_t count = 1) {
+ RAPIDJSON_ASSERT(stackTop_);
+ RAPIDJSON_ASSERT(stackTop_ + sizeof(T) * count <= stackEnd_);
T* ret = reinterpret_cast<T*>(stackTop_);
stackTop_ += sizeof(T) * count;
return ret;
@@ -122,9 +147,32 @@ public:
}
template<typename T>
- T* Bottom() { return (T*)stack_; }
+ const T* Top() const {
+ RAPIDJSON_ASSERT(GetSize() >= sizeof(T));
+ return reinterpret_cast<T*>(stackTop_ - sizeof(T));
+ }
+
+ template<typename T>
+ T* End() { return reinterpret_cast<T*>(stackTop_); }
+
+ template<typename T>
+ const T* End() const { return reinterpret_cast<T*>(stackTop_); }
+
+ template<typename T>
+ T* Bottom() { return reinterpret_cast<T*>(stack_); }
+
+ template<typename T>
+ const T* Bottom() const { return reinterpret_cast<T*>(stack_); }
+
+ bool HasAllocator() const {
+ return allocator_ != 0;
+ }
+
+ Allocator& GetAllocator() {
+ RAPIDJSON_ASSERT(allocator_);
+ return *allocator_;
+ }
- Allocator& GetAllocator() { return *allocator_; }
bool Empty() const { return stackTop_ == stack_; }
size_t GetSize() const { return static_cast<size_t>(stackTop_ - stack_); }
size_t GetCapacity() const { return static_cast<size_t>(stackEnd_ - stack_); }
@@ -136,7 +184,7 @@ private:
size_t newCapacity;
if (stack_ == 0) {
if (!allocator_)
- ownAllocator_ = allocator_ = RAPIDJSON_NEW(Allocator());
+ ownAllocator_ = allocator_ = RAPIDJSON_NEW(Allocator)();
newCapacity = initialCapacity_;
} else {
newCapacity = GetCapacity();
@@ -151,7 +199,7 @@ private:
void Resize(size_t newCapacity) {
const size_t size = GetSize(); // Backup the current size
- stack_ = (char*)allocator_->Realloc(stack_, GetCapacity(), newCapacity);
+ stack_ = static_cast<char*>(allocator_->Realloc(stack_, GetCapacity(), newCapacity));
stackTop_ = stack_ + size;
stackEnd_ = stack_ + newCapacity;
}
@@ -176,4 +224,8 @@ private:
} // namespace internal
RAPIDJSON_NAMESPACE_END
+#if defined(__clang__)
+RAPIDJSON_DIAG_POP
+#endif
+
#endif // RAPIDJSON_STACK_H_
diff --git a/contrib/rapidjson/include/rapidjson/internal/strfunc.h b/contrib/rapidjson/include/rapidjson/internal/strfunc.h
index 84405065a..226439a76 100644
--- a/contrib/rapidjson/include/rapidjson/internal/strfunc.h
+++ b/contrib/rapidjson/include/rapidjson/internal/strfunc.h
@@ -15,7 +15,8 @@
#ifndef RAPIDJSON_INTERNAL_STRFUNC_H_
#define RAPIDJSON_INTERNAL_STRFUNC_H_
-#include "../rapidjson.h"
+#include "../stream.h"
+#include <cwchar>
RAPIDJSON_NAMESPACE_BEGIN
namespace internal {
@@ -28,11 +29,40 @@ namespace internal {
*/
template <typename Ch>
inline SizeType StrLen(const Ch* s) {
+ RAPIDJSON_ASSERT(s != 0);
const Ch* p = s;
while (*p) ++p;
return SizeType(p - s);
}
+template <>
+inline SizeType StrLen(const char* s) {
+ return SizeType(std::strlen(s));
+}
+
+template <>
+inline SizeType StrLen(const wchar_t* s) {
+ return SizeType(std::wcslen(s));
+}
+
+//! Returns number of code points in a encoded string.
+template<typename Encoding>
+bool CountStringCodePoint(const typename Encoding::Ch* s, SizeType length, SizeType* outCount) {
+ RAPIDJSON_ASSERT(s != 0);
+ RAPIDJSON_ASSERT(outCount != 0);
+ GenericStringStream<Encoding> is(s);
+ const typename Encoding::Ch* end = s + length;
+ SizeType count = 0;
+ while (is.src_ < end) {
+ unsigned codepoint;
+ if (!Encoding::Decode(is, &codepoint))
+ return false;
+ count++;
+ }
+ *outCount = count;
+ return true;
+}
+
} // namespace internal
RAPIDJSON_NAMESPACE_END
diff --git a/contrib/rapidjson/include/rapidjson/internal/strtod.h b/contrib/rapidjson/include/rapidjson/internal/strtod.h
index ace65f677..adf49e349 100644
--- a/contrib/rapidjson/include/rapidjson/internal/strtod.h
+++ b/contrib/rapidjson/include/rapidjson/internal/strtod.h
@@ -15,7 +15,6 @@
#ifndef RAPIDJSON_STRTOD_
#define RAPIDJSON_STRTOD_
-#include "../rapidjson.h"
#include "ieee754.h"
#include "biginteger.h"
#include "diyfp.h"
@@ -95,13 +94,13 @@ inline int CheckWithinHalfULP(double b, const BigInteger& d, int dExp) {
hS_Exp2 -= common_Exp2;
BigInteger dS = d;
- dS.MultiplyPow5(dS_Exp5) <<= dS_Exp2;
+ dS.MultiplyPow5(static_cast<unsigned>(dS_Exp5)) <<= static_cast<unsigned>(dS_Exp2);
BigInteger bS(bInt);
- bS.MultiplyPow5(bS_Exp5) <<= bS_Exp2;
+ bS.MultiplyPow5(static_cast<unsigned>(bS_Exp5)) <<= static_cast<unsigned>(bS_Exp2);
BigInteger hS(1);
- hS.MultiplyPow5(hS_Exp5) <<= hS_Exp2;
+ hS.MultiplyPow5(static_cast<unsigned>(hS_Exp5)) <<= static_cast<unsigned>(hS_Exp2);
BigInteger delta(0);
dS.Difference(bS, &delta);
@@ -134,22 +133,22 @@ inline bool StrtodDiyFp(const char* decimals, size_t length, size_t decimalPosit
if (significand > RAPIDJSON_UINT64_C2(0x19999999, 0x99999999) ||
(significand == RAPIDJSON_UINT64_C2(0x19999999, 0x99999999) && decimals[i] > '5'))
break;
- significand = significand * 10 + (decimals[i] - '0');
+ significand = significand * 10u + static_cast<unsigned>(decimals[i] - '0');
}
if (i < length && decimals[i] >= '5') // Rounding
significand++;
size_t remaining = length - i;
- const unsigned kUlpShift = 3;
- const unsigned kUlp = 1 << kUlpShift;
- int error = (remaining == 0) ? 0 : kUlp / 2;
+ const int kUlpShift = 3;
+ const int kUlp = 1 << kUlpShift;
+ int64_t error = (remaining == 0) ? 0 : kUlp / 2;
DiyFp v(significand, 0);
v = v.Normalize();
error <<= -v.e;
- const int dExp = (int)decimalPosition - (int)i + exp;
+ const int dExp = static_cast<int>(decimalPosition) - static_cast<int>(i) + exp;
int actualExp;
DiyFp cachedPower = GetCachedPower10(dExp, &actualExp);
@@ -163,10 +162,10 @@ inline bool StrtodDiyFp(const char* decimals, size_t length, size_t decimalPosit
DiyFp(RAPIDJSON_UINT64_C2(0xf4240000, 00000000), -44), // 10^6
DiyFp(RAPIDJSON_UINT64_C2(0x98968000, 00000000), -40) // 10^7
};
- int adjustment = dExp - actualExp - 1;
+ int adjustment = dExp - actualExp - 1;
RAPIDJSON_ASSERT(adjustment >= 0 && adjustment < 7);
v = v * kPow10[adjustment];
- if (length + adjustment > 19) // has more digits than decimal digits in 64-bit
+ if (length + static_cast<unsigned>(adjustment)> 19u) // has more digits than decimal digits in 64-bit
error += kUlp / 2;
}
@@ -178,10 +177,10 @@ inline bool StrtodDiyFp(const char* decimals, size_t length, size_t decimalPosit
v = v.Normalize();
error <<= oldExp - v.e;
- const unsigned effectiveSignificandSize = Double::EffectiveSignificandSize(64 + v.e);
- unsigned precisionSize = 64 - effectiveSignificandSize;
+ const int effectiveSignificandSize = Double::EffectiveSignificandSize(64 + v.e);
+ int precisionSize = 64 - effectiveSignificandSize;
if (precisionSize + kUlpShift >= 64) {
- unsigned scaleExp = (precisionSize + kUlpShift) - 63;
+ int scaleExp = (precisionSize + kUlpShift) - 63;
v.f >>= scaleExp;
v.e += scaleExp;
error = (error >> scaleExp) + 1 + kUlp;
@@ -191,7 +190,7 @@ inline bool StrtodDiyFp(const char* decimals, size_t length, size_t decimalPosit
DiyFp rounded(v.f >> precisionSize, v.e + precisionSize);
const uint64_t precisionBits = (v.f & ((uint64_t(1) << precisionSize) - 1)) * kUlp;
const uint64_t halfWay = (uint64_t(1) << (precisionSize - 1)) * kUlp;
- if (precisionBits >= halfWay + error) {
+ if (precisionBits >= halfWay + static_cast<unsigned>(error)) {
rounded.f++;
if (rounded.f & (DiyFp::kDpHiddenBit << 1)) { // rounding overflows mantissa (issue #340)
rounded.f >>= 1;
@@ -201,12 +200,12 @@ inline bool StrtodDiyFp(const char* decimals, size_t length, size_t decimalPosit
*result = rounded.ToDouble();
- return halfWay - error >= precisionBits || precisionBits >= halfWay + error;
+ return halfWay - static_cast<unsigned>(error) >= precisionBits || precisionBits >= halfWay + static_cast<unsigned>(error);
}
inline double StrtodBigInteger(double approx, const char* decimals, size_t length, size_t decimalPosition, int exp) {
const BigInteger dInt(decimals, length);
- const int dExp = (int)decimalPosition - (int)length + exp;
+ const int dExp = static_cast<int>(decimalPosition) - static_cast<int>(length) + exp;
Double a(approx);
int cmp = CheckWithinHalfULP(a.Value(), dInt, dExp);
if (cmp < 0)
@@ -246,10 +245,10 @@ inline double StrtodFullPrecision(double d, int p, const char* decimals, size_t
// Trim right-most digits
const int kMaxDecimalDigit = 780;
- if ((int)length > kMaxDecimalDigit) {
- int delta = (int(length) - kMaxDecimalDigit);
+ if (static_cast<int>(length) > kMaxDecimalDigit) {
+ int delta = (static_cast<int>(length) - kMaxDecimalDigit);
exp += delta;
- decimalPosition -= delta;
+ decimalPosition -= static_cast<unsigned>(delta);
length = kMaxDecimalDigit;
}
diff --git a/contrib/rapidjson/include/rapidjson/internal/swap.h b/contrib/rapidjson/include/rapidjson/internal/swap.h
index 0590921f1..666e49f97 100644
--- a/contrib/rapidjson/include/rapidjson/internal/swap.h
+++ b/contrib/rapidjson/include/rapidjson/internal/swap.h
@@ -17,6 +17,11 @@
#include "../rapidjson.h"
+#if defined(__clang__)
+RAPIDJSON_DIAG_PUSH
+RAPIDJSON_DIAG_OFF(c++98-compat)
+#endif
+
RAPIDJSON_NAMESPACE_BEGIN
namespace internal {
@@ -34,4 +39,8 @@ inline void Swap(T& a, T& b) RAPIDJSON_NOEXCEPT {
} // namespace internal
RAPIDJSON_NAMESPACE_END
+#if defined(__clang__)
+RAPIDJSON_DIAG_POP
+#endif
+
#endif // RAPIDJSON_INTERNAL_SWAP_H_
diff --git a/contrib/rapidjson/include/rapidjson/istreamwrapper.h b/contrib/rapidjson/include/rapidjson/istreamwrapper.h
new file mode 100644
index 000000000..8639c8c3c
--- /dev/null
+++ b/contrib/rapidjson/include/rapidjson/istreamwrapper.h
@@ -0,0 +1,115 @@
+// Tencent is pleased to support the open source community by making RapidJSON available.
+//
+// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
+//
+// Licensed under the MIT License (the "License"); you may not use this file except
+// in compliance with the License. You may obtain a copy of the License at
+//
+// http://opensource.org/licenses/MIT
+//
+// Unless required by applicable law or agreed to in writing, software distributed
+// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+// CONDITIONS OF ANY KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations under the License.
+
+#ifndef RAPIDJSON_ISTREAMWRAPPER_H_
+#define RAPIDJSON_ISTREAMWRAPPER_H_
+
+#include "stream.h"
+#include <iosfwd>
+
+#ifdef __clang__
+RAPIDJSON_DIAG_PUSH
+RAPIDJSON_DIAG_OFF(padded)
+#endif
+
+#ifdef _MSC_VER
+RAPIDJSON_DIAG_PUSH
+RAPIDJSON_DIAG_OFF(4351) // new behavior: elements of array 'array' will be default initialized
+#endif
+
+RAPIDJSON_NAMESPACE_BEGIN
+
+//! Wrapper of \c std::basic_istream into RapidJSON's Stream concept.
+/*!
+ The classes can be wrapped including but not limited to:
+
+ - \c std::istringstream
+ - \c std::stringstream
+ - \c std::wistringstream
+ - \c std::wstringstream
+ - \c std::ifstream
+ - \c std::fstream
+ - \c std::wifstream
+ - \c std::wfstream
+
+ \tparam StreamType Class derived from \c std::basic_istream.
+*/
+
+template <typename StreamType>
+class BasicIStreamWrapper {
+public:
+ typedef typename StreamType::char_type Ch;
+ BasicIStreamWrapper(StreamType& stream) : stream_(stream), count_(), peekBuffer_() {}
+
+ Ch Peek() const {
+ typename StreamType::int_type c = stream_.peek();
+ return RAPIDJSON_LIKELY(c != StreamType::traits_type::eof()) ? static_cast<Ch>(c) : static_cast<Ch>('\0');
+ }
+
+ Ch Take() {
+ typename StreamType::int_type c = stream_.get();
+ if (RAPIDJSON_LIKELY(c != StreamType::traits_type::eof())) {
+ count_++;
+ return static_cast<Ch>(c);
+ }
+ else
+ return '\0';
+ }
+
+ // tellg() may return -1 when failed. So we count by ourself.
+ size_t Tell() const { return count_; }
+
+ Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; }
+ void Put(Ch) { RAPIDJSON_ASSERT(false); }
+ void Flush() { RAPIDJSON_ASSERT(false); }
+ size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; }
+
+ // For encoding detection only.
+ const Ch* Peek4() const {
+ RAPIDJSON_ASSERT(sizeof(Ch) == 1); // Only usable for byte stream.
+ int i;
+ bool hasError = false;
+ for (i = 0; i < 4; ++i) {
+ typename StreamType::int_type c = stream_.get();
+ if (c == StreamType::traits_type::eof()) {
+ hasError = true;
+ stream_.clear();
+ break;
+ }
+ peekBuffer_[i] = static_cast<Ch>(c);
+ }
+ for (--i; i >= 0; --i)
+ stream_.putback(peekBuffer_[i]);
+ return !hasError ? peekBuffer_ : 0;
+ }
+
+private:
+ BasicIStreamWrapper(const BasicIStreamWrapper&);
+ BasicIStreamWrapper& operator=(const BasicIStreamWrapper&);
+
+ StreamType& stream_;
+ size_t count_; //!< Number of characters read. Note:
+ mutable Ch peekBuffer_[4];
+};
+
+typedef BasicIStreamWrapper<std::istream> IStreamWrapper;
+typedef BasicIStreamWrapper<std::wistream> WIStreamWrapper;
+
+#if defined(__clang__) || defined(_MSC_VER)
+RAPIDJSON_DIAG_POP
+#endif
+
+RAPIDJSON_NAMESPACE_END
+
+#endif // RAPIDJSON_ISTREAMWRAPPER_H_
diff --git a/contrib/rapidjson/include/rapidjson/memorybuffer.h b/contrib/rapidjson/include/rapidjson/memorybuffer.h
index 2484b2185..39bee1dec 100644
--- a/contrib/rapidjson/include/rapidjson/memorybuffer.h
+++ b/contrib/rapidjson/include/rapidjson/memorybuffer.h
@@ -15,7 +15,7 @@
#ifndef RAPIDJSON_MEMORYBUFFER_H_
#define RAPIDJSON_MEMORYBUFFER_H_
-#include "rapidjson.h"
+#include "stream.h"
#include "internal/stack.h"
RAPIDJSON_NAMESPACE_BEGIN
diff --git a/contrib/rapidjson/include/rapidjson/memorystream.h b/contrib/rapidjson/include/rapidjson/memorystream.h
index 99feae5d7..1d71d8a4f 100644
--- a/contrib/rapidjson/include/rapidjson/memorystream.h
+++ b/contrib/rapidjson/include/rapidjson/memorystream.h
@@ -15,7 +15,13 @@
#ifndef RAPIDJSON_MEMORYSTREAM_H_
#define RAPIDJSON_MEMORYSTREAM_H_
-#include "rapidjson.h"
+#include "stream.h"
+
+#ifdef __clang__
+RAPIDJSON_DIAG_PUSH
+RAPIDJSON_DIAG_OFF(unreachable-code)
+RAPIDJSON_DIAG_OFF(missing-noreturn)
+#endif
RAPIDJSON_NAMESPACE_BEGIN
@@ -36,8 +42,8 @@ struct MemoryStream {
MemoryStream(const Ch *src, size_t size) : src_(src), begin_(src), end_(src + size), size_(size) {}
- Ch Peek() const { return (src_ == end_) ? '\0' : *src_; }
- Ch Take() { return (src_ == end_) ? '\0' : *src_++; }
+ Ch Peek() const { return RAPIDJSON_UNLIKELY(src_ == end_) ? '\0' : *src_; }
+ Ch Take() { return RAPIDJSON_UNLIKELY(src_ == end_) ? '\0' : *src_++; }
size_t Tell() const { return static_cast<size_t>(src_ - begin_); }
Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; }
@@ -58,4 +64,8 @@ struct MemoryStream {
RAPIDJSON_NAMESPACE_END
+#ifdef __clang__
+RAPIDJSON_DIAG_POP
+#endif
+
#endif // RAPIDJSON_MEMORYBUFFER_H_
diff --git a/contrib/rapidjson/include/rapidjson/msinttypes/stdint.h b/contrib/rapidjson/include/rapidjson/msinttypes/stdint.h
index a26fff4bf..3d4477b9a 100644
--- a/contrib/rapidjson/include/rapidjson/msinttypes/stdint.h
+++ b/contrib/rapidjson/include/rapidjson/msinttypes/stdint.h
@@ -89,14 +89,14 @@
#include <limits.h>
// For Visual Studio 6 in C++ mode and for many Visual Studio versions when
-// compiling for ARM we should wrap <wchar.h> include with 'extern "C++" {}'
-// or compiler give many errors like this:
+// compiling for ARM we have to wrap <wchar.h> include with 'extern "C++" {}'
+// or compiler would give many errors like this:
// error C2733: second C linkage of overloaded function 'wmemchr' not allowed
-#ifdef __cplusplus
+#if defined(__cplusplus) && !defined(_M_ARM)
extern "C" {
#endif
# include <wchar.h>
-#ifdef __cplusplus
+#if defined(__cplusplus) && !defined(_M_ARM)
}
#endif
diff --git a/contrib/rapidjson/include/rapidjson/ostreamwrapper.h b/contrib/rapidjson/include/rapidjson/ostreamwrapper.h
new file mode 100644
index 000000000..6f4667c08
--- /dev/null
+++ b/contrib/rapidjson/include/rapidjson/ostreamwrapper.h
@@ -0,0 +1,81 @@
+// Tencent is pleased to support the open source community by making RapidJSON available.
+//
+// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
+//
+// Licensed under the MIT License (the "License"); you may not use this file except
+// in compliance with the License. You may obtain a copy of the License at
+//
+// http://opensource.org/licenses/MIT
+//
+// Unless required by applicable law or agreed to in writing, software distributed
+// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+// CONDITIONS OF ANY KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations under the License.
+
+#ifndef RAPIDJSON_OSTREAMWRAPPER_H_
+#define RAPIDJSON_OSTREAMWRAPPER_H_
+
+#include "stream.h"
+#include <iosfwd>
+
+#ifdef __clang__
+RAPIDJSON_DIAG_PUSH
+RAPIDJSON_DIAG_OFF(padded)
+#endif
+
+RAPIDJSON_NAMESPACE_BEGIN
+
+//! Wrapper of \c std::basic_ostream into RapidJSON's Stream concept.
+/*!
+ The classes can be wrapped including but not limited to:
+
+ - \c std::ostringstream
+ - \c std::stringstream
+ - \c std::wpstringstream
+ - \c std::wstringstream
+ - \c std::ifstream
+ - \c std::fstream
+ - \c std::wofstream
+ - \c std::wfstream
+
+ \tparam StreamType Class derived from \c std::basic_ostream.
+*/
+
+template <typename StreamType>
+class BasicOStreamWrapper {
+public:
+ typedef typename StreamType::char_type Ch;
+ BasicOStreamWrapper(StreamType& stream) : stream_(stream) {}
+
+ void Put(Ch c) {
+ stream_.put(c);
+ }
+
+ void Flush() {
+ stream_.flush();
+ }
+
+ // Not implemented
+ char Peek() const { RAPIDJSON_ASSERT(false); return 0; }
+ char Take() { RAPIDJSON_ASSERT(false); return 0; }
+ size_t Tell() const { RAPIDJSON_ASSERT(false); return 0; }
+ char* PutBegin() { RAPIDJSON_ASSERT(false); return 0; }
+ size_t PutEnd(char*) { RAPIDJSON_ASSERT(false); return 0; }
+
+private:
+ BasicOStreamWrapper(const BasicOStreamWrapper&);
+ BasicOStreamWrapper& operator=(const BasicOStreamWrapper&);
+
+ StreamType& stream_;
+};
+
+typedef BasicOStreamWrapper<std::ostream> OStreamWrapper;
+typedef BasicOStreamWrapper<std::wostream> WOStreamWrapper;
+
+#ifdef __clang__
+RAPIDJSON_DIAG_POP
+#endif
+
+RAPIDJSON_NAMESPACE_END
+
+#endif // RAPIDJSON_OSTREAMWRAPPER_H_
diff --git a/contrib/rapidjson/include/rapidjson/pointer.h b/contrib/rapidjson/include/rapidjson/pointer.h
index 5d2aa8d63..0f377efec 100644
--- a/contrib/rapidjson/include/rapidjson/pointer.h
+++ b/contrib/rapidjson/include/rapidjson/pointer.h
@@ -18,6 +18,16 @@
#include "document.h"
#include "internal/itoa.h"
+#ifdef __clang__
+RAPIDJSON_DIAG_PUSH
+RAPIDJSON_DIAG_OFF(switch-enum)
+#endif
+
+#ifdef _MSC_VER
+RAPIDJSON_DIAG_PUSH
+RAPIDJSON_DIAG_OFF(4512) // assignment operator could not be generated
+#endif
+
RAPIDJSON_NAMESPACE_BEGIN
static const SizeType kPointerInvalidIndex = ~SizeType(0); //!< Represents an invalid index in GenericPointer::Token
@@ -71,7 +81,7 @@ template <typename ValueType, typename Allocator = CrtAllocator>
class GenericPointer {
public:
typedef typename ValueType::EncodingType EncodingType; //!< Encoding type from Value
- typedef typename EncodingType::Ch Ch; //!< Character type from Value
+ typedef typename ValueType::Ch Ch; //!< Character type from Value
//! A token is the basic units of internal representation.
/*!
@@ -96,7 +106,7 @@ public:
//@{
//! Default constructor.
- GenericPointer() : allocator_(), ownAllocator_(), nameBuffer_(), tokens_(), tokenCount_(), parseErrorOffset_(), parseErrorCode_(kPointerParseErrorNone) {}
+ GenericPointer(Allocator* allocator = 0) : allocator_(allocator), ownAllocator_(), nameBuffer_(), tokens_(), tokenCount_(), parseErrorOffset_(), parseErrorCode_(kPointerParseErrorNone) {}
//! Constructor that parses a string or URI fragment representation.
/*!
@@ -155,7 +165,7 @@ public:
GenericPointer(const Token* tokens, size_t tokenCount) : allocator_(), ownAllocator_(), nameBuffer_(), tokens_(const_cast<Token*>(tokens)), tokenCount_(tokenCount), parseErrorOffset_(), parseErrorCode_(kPointerParseErrorNone) {}
//! Copy constructor.
- GenericPointer(const GenericPointer& rhs) : allocator_(), ownAllocator_(), nameBuffer_(), tokens_(), tokenCount_(), parseErrorOffset_(), parseErrorCode_(kPointerParseErrorNone) {
+ GenericPointer(const GenericPointer& rhs, Allocator* allocator = 0) : allocator_(allocator), ownAllocator_(), nameBuffer_(), tokens_(), tokenCount_(), parseErrorOffset_(), parseErrorCode_(kPointerParseErrorNone) {
*this = rhs;
}
@@ -230,7 +240,7 @@ public:
template <typename T>
RAPIDJSON_DISABLEIF_RETURN((internal::NotExpr<internal::IsSame<typename internal::RemoveConst<T>::Type, Ch> >), (GenericPointer))
Append(T* name, Allocator* allocator = 0) const {
- return Append(name, StrLen(name), allocator);
+ return Append(name, internal::StrLen(name), allocator);
}
#if RAPIDJSON_HAS_STDSTRING
@@ -253,17 +263,18 @@ public:
*/
GenericPointer Append(SizeType index, Allocator* allocator = 0) const {
char buffer[21];
- SizeType length = (sizeof(SizeType) == 4 ? internal::u32toa(index, buffer): internal::u64toa(index, buffer)) - buffer;
+ char* end = sizeof(SizeType) == 4 ? internal::u32toa(index, buffer) : internal::u64toa(index, buffer);
+ SizeType length = static_cast<SizeType>(end - buffer);
buffer[length] = '\0';
if (sizeof(Ch) == 1) {
- Token token = { (Ch*)buffer, length, index };
+ Token token = { reinterpret_cast<Ch*>(buffer), length, index };
return Append(token, allocator);
}
else {
Ch name[21];
for (size_t i = 0; i <= length; i++)
- name[i] = buffer[i];
+ name[i] = static_cast<Ch>(buffer[i]);
Token token = { name, length, index };
return Append(token, allocator);
}
@@ -271,7 +282,7 @@ public:
//! Append a token by value, and return a new Pointer
/*!
- \param value Value (either Uint or String) to be appended.
+ \param token token to be appended.
\param allocator Allocator for the newly return Pointer.
\return A new Pointer with appended token.
*/
@@ -299,6 +310,9 @@ public:
//@}
+ //! Get the allocator of this pointer.
+ Allocator& GetAllocator() { return *allocator_; }
+
//!@name Tokens
//@{
@@ -390,7 +404,7 @@ public:
bool exist = true;
for (const Token *t = tokens_; t != tokens_ + tokenCount_; ++t) {
if (v->IsArray() && t->name[0] == '-' && t->length == 1) {
- v->PushBack(Value().Move(), allocator);
+ v->PushBack(ValueType().Move(), allocator);
v = &((*v)[v->Size() - 1]);
exist = false;
}
@@ -408,7 +422,7 @@ public:
if (t->index >= v->Size()) {
v->Reserve(t->index + 1, allocator);
while (t->index >= v->Size())
- v->PushBack(Value().Move(), allocator);
+ v->PushBack(ValueType().Move(), allocator);
exist = false;
}
v = &((*v)[t->index]);
@@ -416,7 +430,7 @@ public:
else {
typename ValueType::MemberIterator m = v->FindMember(GenericStringRef<Ch>(t->name, t->length));
if (m == v->MemberEnd()) {
- v->AddMember(Value(t->name, t->length, allocator).Move(), Value().Move(), allocator);
+ v->AddMember(ValueType(t->name, t->length, allocator).Move(), ValueType().Move(), allocator);
v = &(--v->MemberEnd())->value; // Assumes AddMember() appends at the end
exist = false;
}
@@ -435,7 +449,6 @@ public:
//! Creates a value in a document.
/*!
\param document A document to be resolved.
- \param allocator Allocator for creating the values if the specified value or its parents are not exist.
\param alreadyExist If non-null, it stores whether the resolved value is already exist.
\return The resolved newly created, or already exists value.
*/
@@ -452,9 +465,18 @@ public:
//! Query a value in a subtree.
/*!
\param root Root value of a DOM sub-tree to be resolved. It can be any value other than document root.
+ \param unresolvedTokenIndex If the pointer cannot resolve a token in the pointer, this parameter can obtain the index of unresolved token.
\return Pointer to the value if it can be resolved. Otherwise null.
+
+ \note
+ There are only 3 situations when a value cannot be resolved:
+ 1. A value in the path is not an array nor object.
+ 2. An object value does not contain the token.
+ 3. A token is out of range of an array value.
+
+ Use unresolvedTokenIndex to retrieve the token index.
*/
- ValueType* Get(ValueType& root) const {
+ ValueType* Get(ValueType& root, size_t* unresolvedTokenIndex = 0) const {
RAPIDJSON_ASSERT(IsValid());
ValueType* v = &root;
for (const Token *t = tokens_; t != tokens_ + tokenCount_; ++t) {
@@ -463,18 +485,23 @@ public:
{
typename ValueType::MemberIterator m = v->FindMember(GenericStringRef<Ch>(t->name, t->length));
if (m == v->MemberEnd())
- return 0;
+ break;
v = &m->value;
}
- break;
+ continue;
case kArrayType:
if (t->index == kPointerInvalidIndex || t->index >= v->Size())
- return 0;
+ break;
v = &((*v)[t->index]);
- break;
+ continue;
default:
- return 0;
+ break;
}
+
+ // Error: unresolved token
+ if (unresolvedTokenIndex)
+ *unresolvedTokenIndex = static_cast<size_t>(t - tokens_);
+ return 0;
}
return v;
}
@@ -484,7 +511,9 @@ public:
\param root Root value of a DOM sub-tree to be resolved. It can be any value other than document root.
\return Pointer to the value if it can be resolved. Otherwise null.
*/
- const ValueType* Get(const ValueType& root) const { return Get(const_cast<ValueType&>(root)); }
+ const ValueType* Get(const ValueType& root, size_t* unresolvedTokenIndex = 0) const {
+ return Get(const_cast<ValueType&>(root), unresolvedTokenIndex);
+ }
//@}
@@ -525,7 +554,7 @@ public:
//! Query a value in a subtree with default primitive value.
/*!
- \tparam T \tparam T Either \ref Type, \c int, \c unsigned, \c int64_t, \c uint64_t, \c bool
+ \tparam T Either \ref Type, \c int, \c unsigned, \c int64_t, \c uint64_t, \c bool
*/
template <typename T>
RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T>, internal::IsGenericValue<T> >), (ValueType&))
@@ -555,7 +584,7 @@ public:
//! Query a value in a document with default primitive value.
/*!
- \tparam T \tparam T Either \ref Type, \c int, \c unsigned, \c int64_t, \c uint64_t, \c bool
+ \tparam T Either \ref Type, \c int, \c unsigned, \c int64_t, \c uint64_t, \c bool
*/
template <typename T, typename stackAllocator>
RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T>, internal::IsGenericValue<T> >), (ValueType&))
@@ -601,7 +630,7 @@ public:
//! Set a primitive value in a subtree.
/*!
- \tparam T \tparam T Either \ref Type, \c int, \c unsigned, \c int64_t, \c uint64_t, \c bool
+ \tparam T Either \ref Type, \c int, \c unsigned, \c int64_t, \c uint64_t, \c bool
*/
template <typename T>
RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T>, internal::IsGenericValue<T> >), (ValueType&))
@@ -637,7 +666,7 @@ public:
//! Set a primitive value in a document.
/*!
- \tparam T \tparam T Either \ref Type, \c int, \c unsigned, \c int64_t, \c uint64_t, \c bool
+ \tparam T Either \ref Type, \c int, \c unsigned, \c int64_t, \c uint64_t, \c bool
*/
template <typename T, typename stackAllocator>
RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T>, internal::IsGenericValue<T> >), (ValueType&))
@@ -729,7 +758,7 @@ private:
*/
Ch* CopyFromRaw(const GenericPointer& rhs, size_t extraToken = 0, size_t extraNameBufferSize = 0) {
if (!allocator_) // allocator is independently owned.
- ownAllocator_ = allocator_ = RAPIDJSON_NEW(Allocator());
+ ownAllocator_ = allocator_ = RAPIDJSON_NEW(Allocator)();
size_t nameBufferSize = rhs.tokenCount_; // null terminators for tokens
for (Token *t = rhs.tokens_; t != rhs.tokens_ + rhs.tokenCount_; ++t)
@@ -738,8 +767,12 @@ private:
tokenCount_ = rhs.tokenCount_ + extraToken;
tokens_ = static_cast<Token *>(allocator_->Malloc(tokenCount_ * sizeof(Token) + (nameBufferSize + extraNameBufferSize) * sizeof(Ch)));
nameBuffer_ = reinterpret_cast<Ch *>(tokens_ + tokenCount_);
- std::memcpy(tokens_, rhs.tokens_, rhs.tokenCount_ * sizeof(Token));
- std::memcpy(nameBuffer_, rhs.nameBuffer_, nameBufferSize * sizeof(Ch));
+ if (rhs.tokenCount_ > 0) {
+ std::memcpy(tokens_, rhs.tokens_, rhs.tokenCount_ * sizeof(Token));
+ }
+ if (nameBufferSize > 0) {
+ std::memcpy(nameBuffer_, rhs.nameBuffer_, nameBufferSize * sizeof(Ch));
+ }
// Adjust pointers to name buffer
std::ptrdiff_t diff = nameBuffer_ - rhs.nameBuffer_;
@@ -759,11 +792,13 @@ private:
}
//! Parse a JSON String or its URI fragment representation into tokens.
+#ifndef __clang__ // -Wdocumentation
/*!
\param source Either a JSON Pointer string, or its URI fragment representation. Not need to be null terminated.
\param length Length of the source string.
\note Source cannot be JSON String Representation of JSON Pointer, e.g. In "/\u0000", \u0000 will not be unescaped.
*/
+#endif
void Parse(const Ch* source, size_t length) {
RAPIDJSON_ASSERT(source != NULL);
RAPIDJSON_ASSERT(nameBuffer_ == 0);
@@ -771,7 +806,7 @@ private:
// Create own allocator if user did not supply.
if (!allocator_)
- ownAllocator_ = allocator_ = RAPIDJSON_NEW(Allocator());
+ ownAllocator_ = allocator_ = RAPIDJSON_NEW(Allocator)();
// Count number of '/' as tokenCount
tokenCount_ = 0;
@@ -857,7 +892,7 @@ private:
*name++ = c;
}
- token->length = name - token->name;
+ token->length = static_cast<SizeType>(name - token->name);
if (token->length == 0)
isNumber = false;
*name++ = '\0'; // Null terminator
@@ -944,6 +979,8 @@ private:
*/
class PercentDecodeStream {
public:
+ typedef typename ValueType::Ch Ch;
+
//! Constructor
/*!
\param source Start of the stream
@@ -959,11 +996,11 @@ private:
src_++;
Ch c = 0;
for (int j = 0; j < 2; j++) {
- c <<= 4;
+ c = static_cast<Ch>(c << 4);
Ch h = *src_;
- if (h >= '0' && h <= '9') c += h - '0';
- else if (h >= 'A' && h <= 'F') c += h - 'A' + 10;
- else if (h >= 'a' && h <= 'f') c += h - 'a' + 10;
+ if (h >= '0' && h <= '9') c = static_cast<Ch>(c + h - '0');
+ else if (h >= 'A' && h <= 'F') c = static_cast<Ch>(c + h - 'A' + 10);
+ else if (h >= 'a' && h <= 'f') c = static_cast<Ch>(c + h - 'a' + 10);
else {
valid_ = false;
return 0;
@@ -973,7 +1010,7 @@ private:
return c;
}
- size_t Tell() const { return src_ - head_; }
+ size_t Tell() const { return static_cast<size_t>(src_ - head_); }
bool IsValid() const { return valid_; }
private:
@@ -992,8 +1029,8 @@ private:
unsigned char u = static_cast<unsigned char>(c);
static const char hexDigits[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
os_.Put('%');
- os_.Put(hexDigits[u >> 4]);
- os_.Put(hexDigits[u & 15]);
+ os_.Put(static_cast<typename OutputStream::Ch>(hexDigits[u >> 4]));
+ os_.Put(static_cast<typename OutputStream::Ch>(hexDigits[u & 15]));
}
private:
OutputStream& os_;
@@ -1041,23 +1078,23 @@ typename DocumentType::ValueType& CreateValueByPointer(DocumentType& document, c
//////////////////////////////////////////////////////////////////////////////
template <typename T>
-typename T::ValueType* GetValueByPointer(T& root, const GenericPointer<typename T::ValueType>& pointer) {
- return pointer.Get(root);
+typename T::ValueType* GetValueByPointer(T& root, const GenericPointer<typename T::ValueType>& pointer, size_t* unresolvedTokenIndex = 0) {
+ return pointer.Get(root, unresolvedTokenIndex);
}
template <typename T>
-const typename T::ValueType* GetValueByPointer(const T& root, const GenericPointer<typename T::ValueType>& pointer) {
- return pointer.Get(root);
+const typename T::ValueType* GetValueByPointer(const T& root, const GenericPointer<typename T::ValueType>& pointer, size_t* unresolvedTokenIndex = 0) {
+ return pointer.Get(root, unresolvedTokenIndex);
}
template <typename T, typename CharType, size_t N>
-typename T::ValueType* GetValueByPointer(T& root, const CharType (&source)[N]) {
- return GenericPointer<typename T::ValueType>(source, N - 1).Get(root);
+typename T::ValueType* GetValueByPointer(T& root, const CharType (&source)[N], size_t* unresolvedTokenIndex = 0) {
+ return GenericPointer<typename T::ValueType>(source, N - 1).Get(root, unresolvedTokenIndex);
}
template <typename T, typename CharType, size_t N>
-const typename T::ValueType* GetValueByPointer(const T& root, const CharType(&source)[N]) {
- return GenericPointer<typename T::ValueType>(source, N - 1).Get(root);
+const typename T::ValueType* GetValueByPointer(const T& root, const CharType(&source)[N], size_t* unresolvedTokenIndex = 0) {
+ return GenericPointer<typename T::ValueType>(source, N - 1).Get(root, unresolvedTokenIndex);
}
//////////////////////////////////////////////////////////////////////////////
@@ -1310,4 +1347,12 @@ bool EraseValueByPointer(T& root, const CharType(&source)[N]) {
RAPIDJSON_NAMESPACE_END
+#ifdef __clang__
+RAPIDJSON_DIAG_POP
+#endif
+
+#ifdef _MSC_VER
+RAPIDJSON_DIAG_POP
+#endif
+
#endif // RAPIDJSON_POINTER_H_
diff --git a/contrib/rapidjson/include/rapidjson/prettywriter.h b/contrib/rapidjson/include/rapidjson/prettywriter.h
index 416dd492e..98dfb3060 100644
--- a/contrib/rapidjson/include/rapidjson/prettywriter.h
+++ b/contrib/rapidjson/include/rapidjson/prettywriter.h
@@ -22,8 +22,21 @@ RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF(effc++)
#endif
+#if defined(__clang__)
+RAPIDJSON_DIAG_PUSH
+RAPIDJSON_DIAG_OFF(c++98-compat)
+#endif
+
RAPIDJSON_NAMESPACE_BEGIN
+//! Combination of PrettyWriter format flags.
+/*! \see PrettyWriter::SetFormatOptions
+ */
+enum PrettyFormatOptions {
+ kFormatDefault = 0, //!< Default pretty formatting.
+ kFormatSingleLineArray = 1 //!< Format arrays on a single line.
+};
+
//! Writer with indentation and spacing.
/*!
\tparam OutputStream Type of ouptut os.
@@ -31,10 +44,10 @@ RAPIDJSON_NAMESPACE_BEGIN
\tparam TargetEncoding Encoding of output stream.
\tparam StackAllocator Type of allocator for allocating memory of stack.
*/
-template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator>
-class PrettyWriter : public Writer<OutputStream, SourceEncoding, TargetEncoding, StackAllocator> {
+template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags>
+class PrettyWriter : public Writer<OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags> {
public:
- typedef Writer<OutputStream, SourceEncoding, TargetEncoding, StackAllocator> Base;
+ typedef Writer<OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags> Base;
typedef typename Base::Ch Ch;
//! Constructor
@@ -42,8 +55,17 @@ public:
\param allocator User supplied allocator. If it is null, it will create a private one.
\param levelDepth Initial capacity of stack.
*/
- PrettyWriter(OutputStream& os, StackAllocator* allocator = 0, size_t levelDepth = Base::kDefaultLevelDepth) :
- Base(os, allocator, levelDepth), indentChar_(' '), indentCharCount_(4) {}
+ explicit PrettyWriter(OutputStream& os, StackAllocator* allocator = 0, size_t levelDepth = Base::kDefaultLevelDepth) :
+ Base(os, allocator, levelDepth), indentChar_(' '), indentCharCount_(4), formatOptions_(kFormatDefault) {}
+
+
+ explicit PrettyWriter(StackAllocator* allocator = 0, size_t levelDepth = Base::kDefaultLevelDepth) :
+ Base(allocator, levelDepth), indentChar_(' '), indentCharCount_(4) {}
+
+#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
+ PrettyWriter(PrettyWriter&& rhs) :
+ Base(std::forward<PrettyWriter>(rhs)), indentChar_(rhs.indentChar_), indentCharCount_(rhs.indentCharCount_), formatOptions_(rhs.formatOptions_) {}
+#endif
//! Set custom indentation.
/*! \param indentChar Character for indentation. Must be whitespace character (' ', '\\t', '\\n', '\\r').
@@ -57,6 +79,14 @@ public:
return *this;
}
+ //! Set pretty writer formatting options.
+ /*! \param options Formatting options.
+ */
+ PrettyWriter& SetFormatOptions(PrettyFormatOptions options) {
+ formatOptions_ = options;
+ return *this;
+ }
+
/*! @name Implementation of Handler
\see Handler
*/
@@ -70,7 +100,15 @@ public:
bool Uint64(uint64_t u64) { PrettyPrefix(kNumberType); return Base::WriteUint64(u64); }
bool Double(double d) { PrettyPrefix(kNumberType); return Base::WriteDouble(d); }
+ bool RawNumber(const Ch* str, SizeType length, bool copy = false) {
+ RAPIDJSON_ASSERT(str != 0);
+ (void)copy;
+ PrettyPrefix(kNumberType);
+ return Base::WriteString(str, length);
+ }
+
bool String(const Ch* str, SizeType length, bool copy = false) {
+ RAPIDJSON_ASSERT(str != 0);
(void)copy;
PrettyPrefix(kStringType);
return Base::WriteString(str, length);
@@ -89,11 +127,19 @@ public:
}
bool Key(const Ch* str, SizeType length, bool copy = false) { return String(str, length, copy); }
+
+#if RAPIDJSON_HAS_STDSTRING
+ bool Key(const std::basic_string<Ch>& str) {
+ return Key(str.data(), SizeType(str.size()));
+ }
+#endif
bool EndObject(SizeType memberCount = 0) {
(void)memberCount;
- RAPIDJSON_ASSERT(Base::level_stack_.GetSize() >= sizeof(typename Base::Level));
- RAPIDJSON_ASSERT(!Base::level_stack_.template Top<typename Base::Level>()->inArray);
+ RAPIDJSON_ASSERT(Base::level_stack_.GetSize() >= sizeof(typename Base::Level)); // not inside an Object
+ RAPIDJSON_ASSERT(!Base::level_stack_.template Top<typename Base::Level>()->inArray); // currently inside an Array, not Object
+ RAPIDJSON_ASSERT(0 == Base::level_stack_.template Top<typename Base::Level>()->valueCount % 2); // Object has a Key without a Value
+
bool empty = Base::level_stack_.template Pop<typename Base::Level>(1)->valueCount == 0;
if (!empty) {
@@ -104,7 +150,7 @@ public:
(void)ret;
RAPIDJSON_ASSERT(ret == true);
if (Base::level_stack_.Empty()) // end of json text
- Base::os_->Flush();
+ Base::Flush();
return true;
}
@@ -120,7 +166,7 @@ public:
RAPIDJSON_ASSERT(Base::level_stack_.template Top<typename Base::Level>()->inArray);
bool empty = Base::level_stack_.template Pop<typename Base::Level>(1)->valueCount == 0;
- if (!empty) {
+ if (!empty && !(formatOptions_ & kFormatSingleLineArray)) {
Base::os_->Put('\n');
WriteIndent();
}
@@ -128,7 +174,7 @@ public:
(void)ret;
RAPIDJSON_ASSERT(ret == true);
if (Base::level_stack_.Empty()) // end of json text
- Base::os_->Flush();
+ Base::Flush();
return true;
}
@@ -142,6 +188,22 @@ public:
bool Key(const Ch* str) { return Key(str, internal::StrLen(str)); }
//@}
+
+ //! Write a raw JSON value.
+ /*!
+ For user to write a stringified JSON as a value.
+
+ \param json A well-formed JSON value. It should not contain null character within [0, length - 1] range.
+ \param length Length of the json.
+ \param type Type of the root of json.
+ \note When using PrettyWriter::RawValue(), the result json may not be indented correctly.
+ */
+ bool RawValue(const Ch* json, size_t length, Type type) {
+ RAPIDJSON_ASSERT(json != 0);
+ PrettyPrefix(type);
+ return Base::WriteRawValue(json, length);
+ }
+
protected:
void PrettyPrefix(Type type) {
(void)type;
@@ -151,11 +213,14 @@ protected:
if (level->inArray) {
if (level->valueCount > 0) {
Base::os_->Put(','); // add comma if it is not the first element in array
- Base::os_->Put('\n');
+ if (formatOptions_ & kFormatSingleLineArray)
+ Base::os_->Put(' ');
}
- else
+
+ if (!(formatOptions_ & kFormatSingleLineArray)) {
Base::os_->Put('\n');
- WriteIndent();
+ WriteIndent();
+ }
}
else { // in object
if (level->valueCount > 0) {
@@ -186,11 +251,12 @@ protected:
void WriteIndent() {
size_t count = (Base::level_stack_.GetSize() / sizeof(typename Base::Level)) * indentCharCount_;
- PutN(*Base::os_, indentChar_, count);
+ PutN(*Base::os_, static_cast<typename OutputStream::Ch>(indentChar_), count);
}
Ch indentChar_;
unsigned indentCharCount_;
+ PrettyFormatOptions formatOptions_;
private:
// Prohibit copy constructor & assignment operator.
@@ -200,6 +266,10 @@ private:
RAPIDJSON_NAMESPACE_END
+#if defined(__clang__)
+RAPIDJSON_DIAG_POP
+#endif
+
#ifdef __GNUC__
RAPIDJSON_DIAG_POP
#endif
diff --git a/contrib/rapidjson/include/rapidjson/rapidjson.h b/contrib/rapidjson/include/rapidjson/rapidjson.h
index f22130d3c..5716fdc06 100644
--- a/contrib/rapidjson/include/rapidjson/rapidjson.h
+++ b/contrib/rapidjson/include/rapidjson/rapidjson.h
@@ -49,6 +49,11 @@
// token stringification
#define RAPIDJSON_STRINGIFY(x) RAPIDJSON_DO_STRINGIFY(x)
#define RAPIDJSON_DO_STRINGIFY(x) #x
+
+// token concatenation
+#define RAPIDJSON_JOIN(X, Y) RAPIDJSON_DO_JOIN(X, Y)
+#define RAPIDJSON_DO_JOIN(X, Y) RAPIDJSON_DO_JOIN2(X, Y)
+#define RAPIDJSON_DO_JOIN2(X, Y) X##Y
//!@endcond
/*! \def RAPIDJSON_MAJOR_VERSION
@@ -68,8 +73,8 @@
\brief Version of RapidJSON in "<major>.<minor>.<patch>" string format.
*/
#define RAPIDJSON_MAJOR_VERSION 1
-#define RAPIDJSON_MINOR_VERSION 0
-#define RAPIDJSON_PATCH_VERSION 2
+#define RAPIDJSON_MINOR_VERSION 1
+#define RAPIDJSON_PATCH_VERSION 0
#define RAPIDJSON_VERSION_STRING \
RAPIDJSON_STRINGIFY(RAPIDJSON_MAJOR_VERSION.RAPIDJSON_MINOR_VERSION.RAPIDJSON_PATCH_VERSION)
@@ -120,6 +125,31 @@
#endif
///////////////////////////////////////////////////////////////////////////////
+// RAPIDJSON_HAS_STDSTRING
+
+#ifndef RAPIDJSON_HAS_STDSTRING
+#ifdef RAPIDJSON_DOXYGEN_RUNNING
+#define RAPIDJSON_HAS_STDSTRING 1 // force generation of documentation
+#else
+#define RAPIDJSON_HAS_STDSTRING 0 // no std::string support by default
+#endif
+/*! \def RAPIDJSON_HAS_STDSTRING
+ \ingroup RAPIDJSON_CONFIG
+ \brief Enable RapidJSON support for \c std::string
+
+ By defining this preprocessor symbol to \c 1, several convenience functions for using
+ \ref rapidjson::GenericValue with \c std::string are enabled, especially
+ for construction and comparison.
+
+ \hideinitializer
+*/
+#endif // !defined(RAPIDJSON_HAS_STDSTRING)
+
+#if RAPIDJSON_HAS_STDSTRING
+#include <string>
+#endif // RAPIDJSON_HAS_STDSTRING
+
+///////////////////////////////////////////////////////////////////////////////
// RAPIDJSON_NO_INT64DEFINE
/*! \def RAPIDJSON_NO_INT64DEFINE
@@ -134,7 +164,7 @@
*/
#ifndef RAPIDJSON_NO_INT64DEFINE
//!@cond RAPIDJSON_HIDDEN_FROM_DOXYGEN
-#ifdef _MSC_VER
+#if defined(_MSC_VER) && (_MSC_VER < 1800) // Visual Studio 2013
#include "msinttypes/stdint.h"
#include "msinttypes/inttypes.h"
#else
@@ -153,9 +183,9 @@
#ifndef RAPIDJSON_FORCEINLINE
//!@cond RAPIDJSON_HIDDEN_FROM_DOXYGEN
-#if defined(_MSC_VER) && !defined(NDEBUG)
+#if defined(_MSC_VER) && defined(NDEBUG)
#define RAPIDJSON_FORCEINLINE __forceinline
-#elif defined(__GNUC__) && __GNUC__ >= 4 && !defined(NDEBUG)
+#elif defined(__GNUC__) && __GNUC__ >= 4 && defined(NDEBUG)
#define RAPIDJSON_FORCEINLINE __attribute__((always_inline))
#else
#define RAPIDJSON_FORCEINLINE
@@ -211,6 +241,8 @@
# define RAPIDJSON_ENDIAN RAPIDJSON_BIGENDIAN
# elif defined(__i386__) || defined(__alpha__) || defined(__ia64) || defined(__ia64__) || defined(_M_IX86) || defined(_M_IA64) || defined(_M_ALPHA) || defined(__amd64) || defined(__amd64__) || defined(_M_AMD64) || defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || defined(__bfin__)
# define RAPIDJSON_ENDIAN RAPIDJSON_LITTLEENDIAN
+# elif defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_ARM64))
+# define RAPIDJSON_ENDIAN RAPIDJSON_LITTLEENDIAN
# elif defined(RAPIDJSON_DOXYGEN_RUNNING)
# define RAPIDJSON_ENDIAN
# else
@@ -223,7 +255,7 @@
//! Whether using 64-bit architecture
#ifndef RAPIDJSON_64BIT
-#if defined(__LP64__) || defined(_WIN64)
+#if defined(__LP64__) || (defined(__x86_64__) && defined(__ILP32__)) || defined(_WIN64) || defined(__EMSCRIPTEN__)
#define RAPIDJSON_64BIT 1
#else
#define RAPIDJSON_64BIT 0
@@ -238,13 +270,14 @@
\param x pointer to align
Some machines require strict data alignment. Currently the default uses 4 bytes
- alignment. User can customize by defining the RAPIDJSON_ALIGN function macro.,
+ alignment on 32-bit platforms and 8 bytes alignment for 64-bit platforms.
+ User can customize by defining the RAPIDJSON_ALIGN function macro.
*/
#ifndef RAPIDJSON_ALIGN
#if RAPIDJSON_64BIT == 1
-#define RAPIDJSON_ALIGN(x) ((x + 7u) & ~7u)
+#define RAPIDJSON_ALIGN(x) (((x) + static_cast<uint64_t>(7u)) & ~static_cast<uint64_t>(7u))
#else
-#define RAPIDJSON_ALIGN(x) ((x + 3u) & ~3u)
+#define RAPIDJSON_ALIGN(x) (((x) + 3u) & ~3u)
#endif
#endif
@@ -262,17 +295,47 @@
#endif
///////////////////////////////////////////////////////////////////////////////
-// RAPIDJSON_SSE2/RAPIDJSON_SSE42/RAPIDJSON_SIMD
+// RAPIDJSON_48BITPOINTER_OPTIMIZATION
+
+//! Use only lower 48-bit address for some pointers.
+/*!
+ \ingroup RAPIDJSON_CONFIG
+
+ This optimization uses the fact that current X86-64 architecture only implement lower 48-bit virtual address.
+ The higher 16-bit can be used for storing other data.
+ \c GenericValue uses this optimization to reduce its size form 24 bytes to 16 bytes in 64-bit architecture.
+*/
+#ifndef RAPIDJSON_48BITPOINTER_OPTIMIZATION
+#if defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) || defined(_M_X64) || defined(_M_AMD64)
+#define RAPIDJSON_48BITPOINTER_OPTIMIZATION 1
+#else
+#define RAPIDJSON_48BITPOINTER_OPTIMIZATION 0
+#endif
+#endif // RAPIDJSON_48BITPOINTER_OPTIMIZATION
+
+#if RAPIDJSON_48BITPOINTER_OPTIMIZATION == 1
+#if RAPIDJSON_64BIT != 1
+#error RAPIDJSON_48BITPOINTER_OPTIMIZATION can only be set to 1 when RAPIDJSON_64BIT=1
+#endif
+#define RAPIDJSON_SETPOINTER(type, p, x) (p = reinterpret_cast<type *>((reinterpret_cast<uintptr_t>(p) & static_cast<uintptr_t>(RAPIDJSON_UINT64_C2(0xFFFF0000, 0x00000000))) | reinterpret_cast<uintptr_t>(reinterpret_cast<const void*>(x))))
+#define RAPIDJSON_GETPOINTER(type, p) (reinterpret_cast<type *>(reinterpret_cast<uintptr_t>(p) & static_cast<uintptr_t>(RAPIDJSON_UINT64_C2(0x0000FFFF, 0xFFFFFFFF))))
+#else
+#define RAPIDJSON_SETPOINTER(type, p, x) (p = (x))
+#define RAPIDJSON_GETPOINTER(type, p) (p)
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+// RAPIDJSON_SSE2/RAPIDJSON_SSE42/RAPIDJSON_NEON/RAPIDJSON_SIMD
/*! \def RAPIDJSON_SIMD
\ingroup RAPIDJSON_CONFIG
- \brief Enable SSE2/SSE4.2 optimization.
+ \brief Enable SSE2/SSE4.2/Neon optimization.
RapidJSON supports optimized implementations for some parsing operations
- based on the SSE2 or SSE4.2 SIMD extensions on modern Intel-compatible
- processors.
+ based on the SSE2, SSE4.2 or NEon SIMD extensions on modern Intel
+ or ARM compatible processors.
- To enable these optimizations, two different symbols can be defined;
+ To enable these optimizations, three different symbols can be defined;
\code
// Enable SSE2 optimization.
#define RAPIDJSON_SSE2
@@ -281,13 +344,17 @@
#define RAPIDJSON_SSE42
\endcode
- \c RAPIDJSON_SSE42 takes precedence, if both are defined.
+ // Enable ARM Neon optimization.
+ #define RAPIDJSON_NEON
+ \endcode
+
+ \c RAPIDJSON_SSE42 takes precedence over SSE2, if both are defined.
If any of these symbols is defined, RapidJSON defines the macro
\c RAPIDJSON_SIMD to indicate the availability of the optimized code.
*/
#if defined(RAPIDJSON_SSE2) || defined(RAPIDJSON_SSE42) \
- || defined(RAPIDJSON_DOXYGEN_RUNNING)
+ || defined(RAPIDJSON_NEON) || defined(RAPIDJSON_DOXYGEN_RUNNING)
#define RAPIDJSON_SIMD
#endif
@@ -347,25 +414,33 @@ RAPIDJSON_NAMESPACE_END
///////////////////////////////////////////////////////////////////////////////
// RAPIDJSON_STATIC_ASSERT
-// Adopt from boost
+// Prefer C++11 static_assert, if available
#ifndef RAPIDJSON_STATIC_ASSERT
+#if __cplusplus >= 201103L || ( defined(_MSC_VER) && _MSC_VER >= 1800 )
+#define RAPIDJSON_STATIC_ASSERT(x) \
+ static_assert(x, RAPIDJSON_STRINGIFY(x))
+#endif // C++11
+#endif // RAPIDJSON_STATIC_ASSERT
+
+// Adopt C++03 implementation from boost
+#ifndef RAPIDJSON_STATIC_ASSERT
+#ifndef __clang__
//!@cond RAPIDJSON_HIDDEN_FROM_DOXYGEN
+#endif
RAPIDJSON_NAMESPACE_BEGIN
template <bool x> struct STATIC_ASSERTION_FAILURE;
template <> struct STATIC_ASSERTION_FAILURE<true> { enum { value = 1 }; };
-template<int x> struct StaticAssertTest {};
+template <size_t x> struct StaticAssertTest {};
RAPIDJSON_NAMESPACE_END
-#define RAPIDJSON_JOIN(X, Y) RAPIDJSON_DO_JOIN(X, Y)
-#define RAPIDJSON_DO_JOIN(X, Y) RAPIDJSON_DO_JOIN2(X, Y)
-#define RAPIDJSON_DO_JOIN2(X, Y) X##Y
-
#if defined(__GNUC__)
#define RAPIDJSON_STATIC_ASSERT_UNUSED_ATTRIBUTE __attribute__((unused))
#else
#define RAPIDJSON_STATIC_ASSERT_UNUSED_ATTRIBUTE
#endif
+#ifndef __clang__
//!@endcond
+#endif
/*! \def RAPIDJSON_STATIC_ASSERT
\brief (Internal) macro to check for conditions at compile-time
@@ -376,6 +451,35 @@ RAPIDJSON_NAMESPACE_END
typedef ::RAPIDJSON_NAMESPACE::StaticAssertTest< \
sizeof(::RAPIDJSON_NAMESPACE::STATIC_ASSERTION_FAILURE<bool(x) >)> \
RAPIDJSON_JOIN(StaticAssertTypedef, __LINE__) RAPIDJSON_STATIC_ASSERT_UNUSED_ATTRIBUTE
+#endif // RAPIDJSON_STATIC_ASSERT
+
+///////////////////////////////////////////////////////////////////////////////
+// RAPIDJSON_LIKELY, RAPIDJSON_UNLIKELY
+
+//! Compiler branching hint for expression with high probability to be true.
+/*!
+ \ingroup RAPIDJSON_CONFIG
+ \param x Boolean expression likely to be true.
+*/
+#ifndef RAPIDJSON_LIKELY
+#if defined(__GNUC__) || defined(__clang__)
+#define RAPIDJSON_LIKELY(x) __builtin_expect(!!(x), 1)
+#else
+#define RAPIDJSON_LIKELY(x) (x)
+#endif
+#endif
+
+//! Compiler branching hint for expression with low probability to be true.
+/*!
+ \ingroup RAPIDJSON_CONFIG
+ \param x Boolean expression unlikely to be true.
+*/
+#ifndef RAPIDJSON_UNLIKELY
+#if defined(__GNUC__) || defined(__clang__)
+#define RAPIDJSON_UNLIKELY(x) __builtin_expect(!!(x), 0)
+#else
+#define RAPIDJSON_UNLIKELY(x) (x)
+#endif
#endif
///////////////////////////////////////////////////////////////////////////////
@@ -438,8 +542,12 @@ RAPIDJSON_NAMESPACE_END
#ifndef RAPIDJSON_HAS_CXX11_RVALUE_REFS
#if defined(__clang__)
-#define RAPIDJSON_HAS_CXX11_RVALUE_REFS __has_feature(cxx_rvalue_references) && \
+#if __has_feature(cxx_rvalue_references) && \
(defined(_LIBCPP_VERSION) || defined(__GLIBCXX__) && __GLIBCXX__ >= 20080306)
+#define RAPIDJSON_HAS_CXX11_RVALUE_REFS 1
+#else
+#define RAPIDJSON_HAS_CXX11_RVALUE_REFS 0
+#endif
#elif (defined(RAPIDJSON_GNUC) && (RAPIDJSON_GNUC >= RAPIDJSON_VERSION_CODE(4,3,0)) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || \
(defined(_MSC_VER) && _MSC_VER >= 1600)
@@ -470,6 +578,17 @@ RAPIDJSON_NAMESPACE_END
#define RAPIDJSON_HAS_CXX11_TYPETRAITS 0
#endif
+#ifndef RAPIDJSON_HAS_CXX11_RANGE_FOR
+#if defined(__clang__)
+#define RAPIDJSON_HAS_CXX11_RANGE_FOR __has_feature(cxx_range_for)
+#elif (defined(RAPIDJSON_GNUC) && (RAPIDJSON_GNUC >= RAPIDJSON_VERSION_CODE(4,6,0)) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || \
+ (defined(_MSC_VER) && _MSC_VER >= 1700)
+#define RAPIDJSON_HAS_CXX11_RANGE_FOR 1
+#else
+#define RAPIDJSON_HAS_CXX11_RANGE_FOR 0
+#endif
+#endif // RAPIDJSON_HAS_CXX11_RANGE_FOR
+
//!@endcond
///////////////////////////////////////////////////////////////////////////////
@@ -477,7 +596,7 @@ RAPIDJSON_NAMESPACE_END
#ifndef RAPIDJSON_NEW
///! customization point for global \c new
-#define RAPIDJSON_NEW(x) new x
+#define RAPIDJSON_NEW(TypeName) new TypeName
#endif
#ifndef RAPIDJSON_DELETE
///! customization point for global \c delete
@@ -485,10 +604,7 @@ RAPIDJSON_NAMESPACE_END
#endif
///////////////////////////////////////////////////////////////////////////////
-// Allocators and Encodings
-
-#include "allocators.h"
-#include "encodings.h"
+// Type
/*! \namespace rapidjson
\brief main RapidJSON namespace
@@ -496,148 +612,6 @@ RAPIDJSON_NAMESPACE_END
*/
RAPIDJSON_NAMESPACE_BEGIN
-///////////////////////////////////////////////////////////////////////////////
-// Stream
-
-/*! \class rapidjson::Stream
- \brief Concept for reading and writing characters.
-
- For read-only stream, no need to implement PutBegin(), Put(), Flush() and PutEnd().
-
- For write-only stream, only need to implement Put() and Flush().
-
-\code
-concept Stream {
- typename Ch; //!< Character type of the stream.
-
- //! Read the current character from stream without moving the read cursor.
- Ch Peek() const;
-
- //! Read the current character from stream and moving the read cursor to next character.
- Ch Take();
-
- //! Get the current read cursor.
- //! \return Number of characters read from start.
- size_t Tell();
-
- //! Begin writing operation at the current read pointer.
- //! \return The begin writer pointer.
- Ch* PutBegin();
-
- //! Write a character.
- void Put(Ch c);
-
- //! Flush the buffer.
- void Flush();
-
- //! End the writing operation.
- //! \param begin The begin write pointer returned by PutBegin().
- //! \return Number of characters written.
- size_t PutEnd(Ch* begin);
-}
-\endcode
-*/
-
-//! Provides additional information for stream.
-/*!
- By using traits pattern, this type provides a default configuration for stream.
- For custom stream, this type can be specialized for other configuration.
- See TEST(Reader, CustomStringStream) in readertest.cpp for example.
-*/
-template<typename Stream>
-struct StreamTraits {
- //! Whether to make local copy of stream for optimization during parsing.
- /*!
- By default, for safety, streams do not use local copy optimization.
- Stream that can be copied fast should specialize this, like StreamTraits<StringStream>.
- */
- enum { copyOptimization = 0 };
-};
-
-//! Put N copies of a character to a stream.
-template<typename Stream, typename Ch>
-inline void PutN(Stream& stream, Ch c, size_t n) {
- for (size_t i = 0; i < n; i++)
- stream.Put(c);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// StringStream
-
-//! Read-only string stream.
-/*! \note implements Stream concept
-*/
-template <typename Encoding>
-struct GenericStringStream {
- typedef typename Encoding::Ch Ch;
-
- GenericStringStream(const Ch *src) : src_(src), head_(src) {}
-
- Ch Peek() const { return *src_; }
- Ch Take() { return *src_++; }
- size_t Tell() const { return static_cast<size_t>(src_ - head_); }
-
- Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; }
- void Put(Ch) { RAPIDJSON_ASSERT(false); }
- void Flush() { RAPIDJSON_ASSERT(false); }
- size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; }
-
- const Ch* src_; //!< Current read position.
- const Ch* head_; //!< Original head of the string.
-};
-
-template <typename Encoding>
-struct StreamTraits<GenericStringStream<Encoding> > {
- enum { copyOptimization = 1 };
-};
-
-//! String stream with UTF8 encoding.
-typedef GenericStringStream<UTF8<> > StringStream;
-
-///////////////////////////////////////////////////////////////////////////////
-// InsituStringStream
-
-//! A read-write string stream.
-/*! This string stream is particularly designed for in-situ parsing.
- \note implements Stream concept
-*/
-template <typename Encoding>
-struct GenericInsituStringStream {
- typedef typename Encoding::Ch Ch;
-
- GenericInsituStringStream(Ch *src) : src_(src), dst_(0), head_(src) {}
-
- // Read
- Ch Peek() { return *src_; }
- Ch Take() { return *src_++; }
- size_t Tell() { return static_cast<size_t>(src_ - head_); }
-
- // Write
- void Put(Ch c) { RAPIDJSON_ASSERT(dst_ != 0); *dst_++ = c; }
-
- Ch* PutBegin() { return dst_ = src_; }
- size_t PutEnd(Ch* begin) { return static_cast<size_t>(dst_ - begin); }
- void Flush() {}
-
- Ch* Push(size_t count) { Ch* begin = dst_; dst_ += count; return begin; }
- void Pop(size_t count) { dst_ -= count; }
-
- Ch* src_;
- Ch* dst_;
- Ch* head_;
-};
-
-template <typename Encoding>
-struct StreamTraits<GenericInsituStringStream<Encoding> > {
- enum { copyOptimization = 1 };
-};
-
-//! Insitu string stream with UTF8 encoding.
-typedef GenericInsituStringStream<UTF8<> > InsituStringStream;
-
-///////////////////////////////////////////////////////////////////////////////
-// Type
-
//! Type of JSON value
enum Type {
kNullType = 0, //!< null
diff --git a/contrib/rapidjson/include/rapidjson/reader.h b/contrib/rapidjson/include/rapidjson/reader.h
index c5ecf4be5..120c31115 100644
--- a/contrib/rapidjson/include/rapidjson/reader.h
+++ b/contrib/rapidjson/include/rapidjson/reader.h
@@ -1,5 +1,5 @@
// Tencent is pleased to support the open source community by making RapidJSON available.
-//
+//
// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
//
// Licensed under the MIT License (the "License"); you may not use this file except
@@ -7,9 +7,9 @@
//
// http://opensource.org/licenses/MIT
//
-// Unless required by applicable law or agreed to in writing, software distributed
-// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-// CONDITIONS OF ANY KIND, either express or implied. See the License for the
+// Unless required by applicable law or agreed to in writing, software distributed
+// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+// CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.
#ifndef RAPIDJSON_READER_H_
@@ -17,11 +17,13 @@
/*! \file reader.h */
-#include "rapidjson.h"
-#include "encodings.h"
+#include "allocators.h"
+#include "stream.h"
+#include "encodedstream.h"
#include "internal/meta.h"
#include "internal/stack.h"
#include "internal/strtod.h"
+#include <limits>
#if defined(RAPIDJSON_SIMD) && defined(_MSC_VER)
#include <intrin.h>
@@ -31,6 +33,8 @@
#include <nmmintrin.h>
#elif defined(RAPIDJSON_SSE2)
#include <emmintrin.h>
+#elif defined(RAPIDJSON_NEON)
+#include <arm_neon.h>
#endif
#ifdef _MSC_VER
@@ -39,6 +43,13 @@ RAPIDJSON_DIAG_OFF(4127) // conditional expression is constant
RAPIDJSON_DIAG_OFF(4702) // unreachable code
#endif
+#ifdef __clang__
+RAPIDJSON_DIAG_PUSH
+RAPIDJSON_DIAG_OFF(old-style-cast)
+RAPIDJSON_DIAG_OFF(padded)
+RAPIDJSON_DIAG_OFF(switch-enum)
+#endif
+
#ifdef __GNUC__
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF(effc++)
@@ -49,7 +60,7 @@ RAPIDJSON_DIAG_OFF(effc++)
#ifndef RAPIDJSON_PARSE_ERROR_EARLY_RETURN
#define RAPIDJSON_PARSE_ERROR_EARLY_RETURN(value) \
RAPIDJSON_MULTILINEMACRO_BEGIN \
- if (HasParseError()) { return value; } \
+ if (RAPIDJSON_UNLIKELY(HasParseError())) { return value; } \
RAPIDJSON_MULTILINEMACRO_END
#endif
#define RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID \
@@ -120,7 +131,7 @@ RAPIDJSON_NAMESPACE_BEGIN
///////////////////////////////////////////////////////////////////////////////
// ParseFlag
-/*! \def RAPIDJSON_PARSE_DEFAULT_FLAGS
+/*! \def RAPIDJSON_PARSE_DEFAULT_FLAGS
\ingroup RAPIDJSON_CONFIG
\brief User-defined kParseDefaultFlags definition.
@@ -140,6 +151,10 @@ enum ParseFlag {
kParseIterativeFlag = 4, //!< Iterative(constant complexity in terms of function call stack size) parsing.
kParseStopWhenDoneFlag = 8, //!< After parsing a complete JSON root from stream, stop further processing the rest of stream. When this flag is used, parser will not generate kParseErrorDocumentRootNotSingular error.
kParseFullPrecisionFlag = 16, //!< Parse number in full precision (but slower).
+ kParseCommentsFlag = 32, //!< Allow one-line (//) and multi-line (/**/) comments.
+ kParseNumbersAsStringsFlag = 64, //!< Parse all numbers (ints/doubles) as strings.
+ kParseTrailingCommasFlag = 128, //!< Allow trailing commas at the end of objects and arrays.
+ kParseNanAndInfFlag = 256, //!< Allow parsing NaN, Inf, Infinity, -Inf and -Infinity as doubles.
kParseDefaultFlags = RAPIDJSON_PARSE_DEFAULT_FLAGS //!< Default parse flags. Can be customized by defining RAPIDJSON_PARSE_DEFAULT_FLAGS
};
@@ -148,7 +163,7 @@ enum ParseFlag {
/*! \class rapidjson::Handler
\brief Concept for receiving events from GenericReader upon parsing.
- The functions return true if no error occurs. If they return false,
+ The functions return true if no error occurs. If they return false,
the event publisher should terminate the process.
\code
concept Handler {
@@ -161,6 +176,8 @@ concept Handler {
bool Int64(int64_t i);
bool Uint64(uint64_t i);
bool Double(double d);
+ /// enabled via kParseNumbersAsStringsFlag, string is not null-terminated (use length)
+ bool RawNumber(const Ch* str, SizeType length, bool copy);
bool String(const Ch* str, SizeType length, bool copy);
bool StartObject();
bool Key(const Ch* str, SizeType length, bool copy);
@@ -191,6 +208,8 @@ struct BaseReaderHandler {
bool Int64(int64_t) { return static_cast<Override&>(*this).Default(); }
bool Uint64(uint64_t) { return static_cast<Override&>(*this).Default(); }
bool Double(double) { return static_cast<Override&>(*this).Default(); }
+ /// enabled via kParseNumbersAsStringsFlag, string is not null-terminated (use length)
+ bool RawNumber(const Ch* str, SizeType len, bool copy) { return static_cast<Override&>(*this).String(str, len, copy); }
bool String(const Ch*, SizeType, bool) { return static_cast<Override&>(*this).Default(); }
bool StartObject() { return static_cast<Override&>(*this).Default(); }
bool Key(const Ch* str, SizeType len, bool copy) { return static_cast<Override&>(*this).String(str, len, copy); }
@@ -248,10 +267,17 @@ void SkipWhitespace(InputStream& is) {
internal::StreamLocalCopy<InputStream> copy(is);
InputStream& s(copy.s);
- while (s.Peek() == ' ' || s.Peek() == '\n' || s.Peek() == '\r' || s.Peek() == '\t')
+ typename InputStream::Ch c;
+ while ((c = s.Peek()) == ' ' || c == '\n' || c == '\r' || c == '\t')
s.Take();
}
+inline const char* SkipWhitespace(const char* p, const char* end) {
+ while (p != end && (*p == ' ' || *p == '\n' || *p == '\r' || *p == '\t'))
+ ++p;
+ return p;
+}
+
#ifdef RAPIDJSON_SSE42
//! Skip whitespace with SSE 4.2 pcmpistrm instruction, testing 16 8-byte characters at once.
inline const char *SkipWhitespace_SIMD(const char* p) {
@@ -262,7 +288,7 @@ inline const char *SkipWhitespace_SIMD(const char* p) {
return p;
// 16-byte align to the next boundary
- const char* nextAligned = reinterpret_cast<const char*>((reinterpret_cast<size_t>(p) + 15) & ~15);
+ const char* nextAligned = reinterpret_cast<const char*>((reinterpret_cast<size_t>(p) + 15) & static_cast<size_t>(~15));
while (p != nextAligned)
if (*p == ' ' || *p == '\n' || *p == '\r' || *p == '\t')
++p;
@@ -271,23 +297,37 @@ inline const char *SkipWhitespace_SIMD(const char* p) {
// The rest of string using SIMD
static const char whitespace[16] = " \n\r\t";
- const __m128i w = _mm_load_si128((const __m128i *)&whitespace[0]);
+ const __m128i w = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&whitespace[0]));
for (;; p += 16) {
- const __m128i s = _mm_load_si128((const __m128i *)p);
- const unsigned r = _mm_cvtsi128_si32(_mm_cmpistrm(w, s, _SIDD_UBYTE_OPS | _SIDD_CMP_EQUAL_ANY | _SIDD_BIT_MASK | _SIDD_NEGATIVE_POLARITY));
- if (r != 0) { // some of characters is non-whitespace
-#ifdef _MSC_VER // Find the index of first non-whitespace
- unsigned long offset;
- _BitScanForward(&offset, r);
- return p + offset;
-#else
- return p + __builtin_ffs(r) - 1;
-#endif
- }
+ const __m128i s = _mm_load_si128(reinterpret_cast<const __m128i *>(p));
+ const int r = _mm_cmpistri(w, s, _SIDD_UBYTE_OPS | _SIDD_CMP_EQUAL_ANY | _SIDD_LEAST_SIGNIFICANT | _SIDD_NEGATIVE_POLARITY);
+ if (r != 16) // some of characters is non-whitespace
+ return p + r;
}
}
+inline const char *SkipWhitespace_SIMD(const char* p, const char* end) {
+ // Fast return for single non-whitespace
+ if (p != end && (*p == ' ' || *p == '\n' || *p == '\r' || *p == '\t'))
+ ++p;
+ else
+ return p;
+
+ // The middle of string using SIMD
+ static const char whitespace[16] = " \n\r\t";
+ const __m128i w = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&whitespace[0]));
+
+ for (; p <= end - 16; p += 16) {
+ const __m128i s = _mm_loadu_si128(reinterpret_cast<const __m128i *>(p));
+ const int r = _mm_cmpistri(w, s, _SIDD_UBYTE_OPS | _SIDD_CMP_EQUAL_ANY | _SIDD_LEAST_SIGNIFICANT | _SIDD_NEGATIVE_POLARITY);
+ if (r != 16) // some of characters is non-whitespace
+ return p + r;
+ }
+
+ return SkipWhitespace(p, end);
+}
+
#elif defined(RAPIDJSON_SSE2)
//! Skip whitespace with SSE2 instructions, testing 16 8-byte characters at once.
@@ -299,7 +339,7 @@ inline const char *SkipWhitespace_SIMD(const char* p) {
return p;
// 16-byte align to the next boundary
- const char* nextAligned = reinterpret_cast<const char*>((reinterpret_cast<size_t>(p) + 15) & ~15);
+ const char* nextAligned = reinterpret_cast<const char*>((reinterpret_cast<size_t>(p) + 15) & static_cast<size_t>(~15));
while (p != nextAligned)
if (*p == ' ' || *p == '\n' || *p == '\r' || *p == '\t')
++p;
@@ -307,24 +347,58 @@ inline const char *SkipWhitespace_SIMD(const char* p) {
return p;
// The rest of string
- static const char whitespaces[4][17] = {
- " ",
- "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",
- "\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r",
- "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"};
+ #define C16(c) { c, c, c, c, c, c, c, c, c, c, c, c, c, c, c, c }
+ static const char whitespaces[4][16] = { C16(' '), C16('\n'), C16('\r'), C16('\t') };
+ #undef C16
- const __m128i w0 = _mm_loadu_si128((const __m128i *)&whitespaces[0][0]);
- const __m128i w1 = _mm_loadu_si128((const __m128i *)&whitespaces[1][0]);
- const __m128i w2 = _mm_loadu_si128((const __m128i *)&whitespaces[2][0]);
- const __m128i w3 = _mm_loadu_si128((const __m128i *)&whitespaces[3][0]);
+ const __m128i w0 = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&whitespaces[0][0]));
+ const __m128i w1 = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&whitespaces[1][0]));
+ const __m128i w2 = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&whitespaces[2][0]));
+ const __m128i w3 = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&whitespaces[3][0]));
for (;; p += 16) {
- const __m128i s = _mm_load_si128((const __m128i *)p);
+ const __m128i s = _mm_load_si128(reinterpret_cast<const __m128i *>(p));
+ __m128i x = _mm_cmpeq_epi8(s, w0);
+ x = _mm_or_si128(x, _mm_cmpeq_epi8(s, w1));
+ x = _mm_or_si128(x, _mm_cmpeq_epi8(s, w2));
+ x = _mm_or_si128(x, _mm_cmpeq_epi8(s, w3));
+ unsigned short r = static_cast<unsigned short>(~_mm_movemask_epi8(x));
+ if (r != 0) { // some of characters may be non-whitespace
+#ifdef _MSC_VER // Find the index of first non-whitespace
+ unsigned long offset;
+ _BitScanForward(&offset, r);
+ return p + offset;
+#else
+ return p + __builtin_ffs(r) - 1;
+#endif
+ }
+ }
+}
+
+inline const char *SkipWhitespace_SIMD(const char* p, const char* end) {
+ // Fast return for single non-whitespace
+ if (p != end && (*p == ' ' || *p == '\n' || *p == '\r' || *p == '\t'))
+ ++p;
+ else
+ return p;
+
+ // The rest of string
+ #define C16(c) { c, c, c, c, c, c, c, c, c, c, c, c, c, c, c, c }
+ static const char whitespaces[4][16] = { C16(' '), C16('\n'), C16('\r'), C16('\t') };
+ #undef C16
+
+ const __m128i w0 = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&whitespaces[0][0]));
+ const __m128i w1 = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&whitespaces[1][0]));
+ const __m128i w2 = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&whitespaces[2][0]));
+ const __m128i w3 = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&whitespaces[3][0]));
+
+ for (; p <= end - 16; p += 16) {
+ const __m128i s = _mm_loadu_si128(reinterpret_cast<const __m128i *>(p));
__m128i x = _mm_cmpeq_epi8(s, w0);
x = _mm_or_si128(x, _mm_cmpeq_epi8(s, w1));
x = _mm_or_si128(x, _mm_cmpeq_epi8(s, w2));
x = _mm_or_si128(x, _mm_cmpeq_epi8(s, w3));
- unsigned short r = (unsigned short)~_mm_movemask_epi8(x);
+ unsigned short r = static_cast<unsigned short>(~_mm_movemask_epi8(x));
if (r != 0) { // some of characters may be non-whitespace
#ifdef _MSC_VER // Find the index of first non-whitespace
unsigned long offset;
@@ -335,13 +409,100 @@ inline const char *SkipWhitespace_SIMD(const char* p) {
#endif
}
}
+
+ return SkipWhitespace(p, end);
+}
+
+#elif defined(RAPIDJSON_NEON)
+
+//! Skip whitespace with ARM Neon instructions, testing 16 8-byte characters at once.
+inline const char *SkipWhitespace_SIMD(const char* p) {
+ // Fast return for single non-whitespace
+ if (*p == ' ' || *p == '\n' || *p == '\r' || *p == '\t')
+ ++p;
+ else
+ return p;
+
+ // 16-byte align to the next boundary
+ const char* nextAligned = reinterpret_cast<const char*>((reinterpret_cast<size_t>(p) + 15) & static_cast<size_t>(~15));
+ while (p != nextAligned)
+ if (*p == ' ' || *p == '\n' || *p == '\r' || *p == '\t')
+ ++p;
+ else
+ return p;
+
+ const uint8x16_t w0 = vmovq_n_u8(' ');
+ const uint8x16_t w1 = vmovq_n_u8('\n');
+ const uint8x16_t w2 = vmovq_n_u8('\r');
+ const uint8x16_t w3 = vmovq_n_u8('\t');
+
+ for (;; p += 16) {
+ const uint8x16_t s = vld1q_u8(reinterpret_cast<const uint8_t *>(p));
+ uint8x16_t x = vceqq_u8(s, w0);
+ x = vorrq_u8(x, vceqq_u8(s, w1));
+ x = vorrq_u8(x, vceqq_u8(s, w2));
+ x = vorrq_u8(x, vceqq_u8(s, w3));
+
+ x = vmvnq_u8(x); // Negate
+ x = vrev64q_u8(x); // Rev in 64
+ uint64_t low = vgetq_lane_u64(reinterpret_cast<uint64x2_t>(x), 0); // extract
+ uint64_t high = vgetq_lane_u64(reinterpret_cast<uint64x2_t>(x), 1); // extract
+
+ if (low == 0) {
+ if (high != 0) {
+ int lz =__builtin_clzll(high);;
+ return p + 8 + (lz >> 3);
+ }
+ } else {
+ int lz = __builtin_clzll(low);;
+ return p + (lz >> 3);
+ }
+ }
+}
+
+inline const char *SkipWhitespace_SIMD(const char* p, const char* end) {
+ // Fast return for single non-whitespace
+ if (p != end && (*p == ' ' || *p == '\n' || *p == '\r' || *p == '\t'))
+ ++p;
+ else
+ return p;
+
+ const uint8x16_t w0 = vmovq_n_u8(' ');
+ const uint8x16_t w1 = vmovq_n_u8('\n');
+ const uint8x16_t w2 = vmovq_n_u8('\r');
+ const uint8x16_t w3 = vmovq_n_u8('\t');
+
+ for (; p <= end - 16; p += 16) {
+ const uint8x16_t s = vld1q_u8(reinterpret_cast<const uint8_t *>(p));
+ uint8x16_t x = vceqq_u8(s, w0);
+ x = vorrq_u8(x, vceqq_u8(s, w1));
+ x = vorrq_u8(x, vceqq_u8(s, w2));
+ x = vorrq_u8(x, vceqq_u8(s, w3));
+
+ x = vmvnq_u8(x); // Negate
+ x = vrev64q_u8(x); // Rev in 64
+ uint64_t low = vgetq_lane_u64(reinterpret_cast<uint64x2_t>(x), 0); // extract
+ uint64_t high = vgetq_lane_u64(reinterpret_cast<uint64x2_t>(x), 1); // extract
+
+ if (low == 0) {
+ if (high != 0) {
+ int lz = __builtin_clzll(high);
+ return p + 8 + (lz >> 3);
+ }
+ } else {
+ int lz = __builtin_clzll(low);
+ return p + (lz >> 3);
+ }
+ }
+
+ return SkipWhitespace(p, end);
}
-#endif // RAPIDJSON_SSE2
+#endif // RAPIDJSON_NEON
#ifdef RAPIDJSON_SIMD
//! Template function specialization for InsituStringStream
-template<> inline void SkipWhitespace(InsituStringStream& is) {
+template<> inline void SkipWhitespace(InsituStringStream& is) {
is.src_ = const_cast<char*>(SkipWhitespace_SIMD(is.src_));
}
@@ -349,23 +510,27 @@ template<> inline void SkipWhitespace(InsituStringStream& is) {
template<> inline void SkipWhitespace(StringStream& is) {
is.src_ = SkipWhitespace_SIMD(is.src_);
}
+
+template<> inline void SkipWhitespace(EncodedInputStream<UTF8<>, MemoryStream>& is) {
+ is.is_.src_ = SkipWhitespace_SIMD(is.is_.src_, is.is_.end_);
+}
#endif // RAPIDJSON_SIMD
///////////////////////////////////////////////////////////////////////////////
// GenericReader
//! SAX-style JSON parser. Use \ref Reader for UTF8 encoding and default allocator.
-/*! GenericReader parses JSON text from a stream, and send events synchronously to an
+/*! GenericReader parses JSON text from a stream, and send events synchronously to an
object implementing Handler concept.
- It needs to allocate a stack for storing a single decoded string during
+ It needs to allocate a stack for storing a single decoded string during
non-destructive parsing.
- For in-situ parsing, the decoded string is directly written to the source
+ For in-situ parsing, the decoded string is directly written to the source
text string, no temporary buffer is required.
A GenericReader object can be reused for parsing multiple JSON text.
-
+
\tparam SourceEncoding Encoding of the input stream.
\tparam TargetEncoding Encoding of the parse output.
\tparam StackAllocator Allocator type for stack.
@@ -398,9 +563,10 @@ public:
ClearStackOnExit scope(*this);
- SkipWhitespace(is);
+ SkipWhitespaceAndComments<parseFlags>(is);
+ RAPIDJSON_PARSE_ERROR_EARLY_RETURN(parseResult_);
- if (is.Peek() == '\0') {
+ if (RAPIDJSON_UNLIKELY(is.Peek() == '\0')) {
RAPIDJSON_PARSE_ERROR_NORETURN(kParseErrorDocumentEmpty, is.Tell());
RAPIDJSON_PARSE_ERROR_EARLY_RETURN(parseResult_);
}
@@ -409,9 +575,10 @@ public:
RAPIDJSON_PARSE_ERROR_EARLY_RETURN(parseResult_);
if (!(parseFlags & kParseStopWhenDoneFlag)) {
- SkipWhitespace(is);
+ SkipWhitespaceAndComments<parseFlags>(is);
+ RAPIDJSON_PARSE_ERROR_EARLY_RETURN(parseResult_);
- if (is.Peek() != '\0') {
+ if (RAPIDJSON_UNLIKELY(is.Peek() != '\0')) {
RAPIDJSON_PARSE_ERROR_NORETURN(kParseErrorDocumentRootNotSingular, is.Tell());
RAPIDJSON_PARSE_ERROR_EARLY_RETURN(parseResult_);
}
@@ -433,9 +600,86 @@ public:
return Parse<kParseDefaultFlags>(is, handler);
}
+ //! Initialize JSON text token-by-token parsing
+ /*!
+ */
+ void IterativeParseInit() {
+ parseResult_.Clear();
+ state_ = IterativeParsingStartState;
+ }
+
+ //! Parse one token from JSON text
+ /*! \tparam InputStream Type of input stream, implementing Stream concept
+ \tparam Handler Type of handler, implementing Handler concept.
+ \param is Input stream to be parsed.
+ \param handler The handler to receive events.
+ \return Whether the parsing is successful.
+ */
+ template <unsigned parseFlags, typename InputStream, typename Handler>
+ bool IterativeParseNext(InputStream& is, Handler& handler) {
+ while (RAPIDJSON_LIKELY(is.Peek() != '\0')) {
+ SkipWhitespaceAndComments<parseFlags>(is);
+
+ Token t = Tokenize(is.Peek());
+ IterativeParsingState n = Predict(state_, t);
+ IterativeParsingState d = Transit<parseFlags>(state_, t, n, is, handler);
+
+ // If we've finished or hit an error...
+ if (RAPIDJSON_UNLIKELY(IsIterativeParsingCompleteState(d))) {
+ // Report errors.
+ if (d == IterativeParsingErrorState) {
+ HandleError(state_, is);
+ return false;
+ }
+
+ // Transition to the finish state.
+ RAPIDJSON_ASSERT(d == IterativeParsingFinishState);
+ state_ = d;
+
+ // If StopWhenDone is not set...
+ if (!(parseFlags & kParseStopWhenDoneFlag)) {
+ // ... and extra non-whitespace data is found...
+ SkipWhitespaceAndComments<parseFlags>(is);
+ if (is.Peek() != '\0') {
+ // ... this is considered an error.
+ HandleError(state_, is);
+ return false;
+ }
+ }
+
+ // Success! We are done!
+ return true;
+ }
+
+ // Transition to the new state.
+ state_ = d;
+
+ // If we parsed anything other than a delimiter, we invoked the handler, so we can return true now.
+ if (!IsIterativeParsingDelimiterState(n))
+ return true;
+ }
+
+ // We reached the end of file.
+ stack_.Clear();
+
+ if (state_ != IterativeParsingFinishState) {
+ HandleError(state_, is);
+ return false;
+ }
+
+ return true;
+ }
+
+ //! Check if token-by-token parsing JSON text is complete
+ /*! \return Whether the JSON has been fully decoded.
+ */
+ RAPIDJSON_FORCEINLINE bool IterativeParseComplete() {
+ return IsIterativeParsingCompleteState(state_);
+ }
+
//! Whether a parse error has occured in the last parsing.
bool HasParseError() const { return parseResult_.IsError(); }
-
+
//! Get the \ref ParseErrorCode of last parsing.
ParseErrorCode GetParseErrorCode() const { return parseResult_.Code(); }
@@ -462,52 +706,98 @@ private:
ClearStackOnExit& operator=(const ClearStackOnExit&);
};
+ template<unsigned parseFlags, typename InputStream>
+ void SkipWhitespaceAndComments(InputStream& is) {
+ SkipWhitespace(is);
+
+ if (parseFlags & kParseCommentsFlag) {
+ while (RAPIDJSON_UNLIKELY(Consume(is, '/'))) {
+ if (Consume(is, '*')) {
+ while (true) {
+ if (RAPIDJSON_UNLIKELY(is.Peek() == '\0'))
+ RAPIDJSON_PARSE_ERROR(kParseErrorUnspecificSyntaxError, is.Tell());
+ else if (Consume(is, '*')) {
+ if (Consume(is, '/'))
+ break;
+ }
+ else
+ is.Take();
+ }
+ }
+ else if (RAPIDJSON_LIKELY(Consume(is, '/')))
+ while (is.Peek() != '\0' && is.Take() != '\n') {}
+ else
+ RAPIDJSON_PARSE_ERROR(kParseErrorUnspecificSyntaxError, is.Tell());
+
+ SkipWhitespace(is);
+ }
+ }
+ }
+
// Parse object: { string : value, ... }
template<unsigned parseFlags, typename InputStream, typename Handler>
void ParseObject(InputStream& is, Handler& handler) {
RAPIDJSON_ASSERT(is.Peek() == '{');
is.Take(); // Skip '{'
-
- if (!handler.StartObject())
+
+ if (RAPIDJSON_UNLIKELY(!handler.StartObject()))
RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell());
- SkipWhitespace(is);
+ SkipWhitespaceAndComments<parseFlags>(is);
+ RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;
- if (is.Peek() == '}') {
- is.Take();
- if (!handler.EndObject(0)) // empty object
+ if (Consume(is, '}')) {
+ if (RAPIDJSON_UNLIKELY(!handler.EndObject(0))) // empty object
RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell());
return;
}
for (SizeType memberCount = 0;;) {
- if (is.Peek() != '"')
+ if (RAPIDJSON_UNLIKELY(is.Peek() != '"'))
RAPIDJSON_PARSE_ERROR(kParseErrorObjectMissName, is.Tell());
ParseString<parseFlags>(is, handler, true);
RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;
- SkipWhitespace(is);
+ SkipWhitespaceAndComments<parseFlags>(is);
+ RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;
- if (is.Take() != ':')
+ if (RAPIDJSON_UNLIKELY(!Consume(is, ':')))
RAPIDJSON_PARSE_ERROR(kParseErrorObjectMissColon, is.Tell());
- SkipWhitespace(is);
+ SkipWhitespaceAndComments<parseFlags>(is);
+ RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;
ParseValue<parseFlags>(is, handler);
RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;
- SkipWhitespace(is);
+ SkipWhitespaceAndComments<parseFlags>(is);
+ RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;
++memberCount;
- switch (is.Take()) {
- case ',': SkipWhitespace(is); break;
- case '}':
- if (!handler.EndObject(memberCount))
+ switch (is.Peek()) {
+ case ',':
+ is.Take();
+ SkipWhitespaceAndComments<parseFlags>(is);
+ RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;
+ break;
+ case '}':
+ is.Take();
+ if (RAPIDJSON_UNLIKELY(!handler.EndObject(memberCount)))
RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell());
return;
- default: RAPIDJSON_PARSE_ERROR(kParseErrorObjectMissCommaOrCurlyBracket, is.Tell());
+ default:
+ RAPIDJSON_PARSE_ERROR(kParseErrorObjectMissCommaOrCurlyBracket, is.Tell()); break; // This useless break is only for making warning and coverage happy
+ }
+
+ if (parseFlags & kParseTrailingCommasFlag) {
+ if (is.Peek() == '}') {
+ if (RAPIDJSON_UNLIKELY(!handler.EndObject(memberCount)))
+ RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell());
+ is.Take();
+ return;
+ }
}
}
}
@@ -517,15 +807,15 @@ private:
void ParseArray(InputStream& is, Handler& handler) {
RAPIDJSON_ASSERT(is.Peek() == '[');
is.Take(); // Skip '['
-
- if (!handler.StartArray())
+
+ if (RAPIDJSON_UNLIKELY(!handler.StartArray()))
RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell());
-
- SkipWhitespace(is);
- if (is.Peek() == ']') {
- is.Take();
- if (!handler.EndArray(0)) // empty array
+ SkipWhitespaceAndComments<parseFlags>(is);
+ RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;
+
+ if (Consume(is, ']')) {
+ if (RAPIDJSON_UNLIKELY(!handler.EndArray(0))) // empty array
RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell());
return;
}
@@ -535,15 +825,28 @@ private:
RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;
++elementCount;
- SkipWhitespace(is);
+ SkipWhitespaceAndComments<parseFlags>(is);
+ RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;
- switch (is.Take()) {
- case ',': SkipWhitespace(is); break;
- case ']':
- if (!handler.EndArray(elementCount))
+ if (Consume(is, ',')) {
+ SkipWhitespaceAndComments<parseFlags>(is);
+ RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;
+ }
+ else if (Consume(is, ']')) {
+ if (RAPIDJSON_UNLIKELY(!handler.EndArray(elementCount)))
+ RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell());
+ return;
+ }
+ else
+ RAPIDJSON_PARSE_ERROR(kParseErrorArrayMissCommaOrSquareBracket, is.Tell());
+
+ if (parseFlags & kParseTrailingCommasFlag) {
+ if (is.Peek() == ']') {
+ if (RAPIDJSON_UNLIKELY(!handler.EndArray(elementCount)))
RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell());
+ is.Take();
return;
- default: RAPIDJSON_PARSE_ERROR(kParseErrorArrayMissCommaOrSquareBracket, is.Tell());
+ }
}
}
}
@@ -553,12 +856,12 @@ private:
RAPIDJSON_ASSERT(is.Peek() == 'n');
is.Take();
- if (is.Take() == 'u' && is.Take() == 'l' && is.Take() == 'l') {
- if (!handler.Null())
+ if (RAPIDJSON_LIKELY(Consume(is, 'u') && Consume(is, 'l') && Consume(is, 'l'))) {
+ if (RAPIDJSON_UNLIKELY(!handler.Null()))
RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell());
}
else
- RAPIDJSON_PARSE_ERROR(kParseErrorValueInvalid, is.Tell() - 1);
+ RAPIDJSON_PARSE_ERROR(kParseErrorValueInvalid, is.Tell());
}
template<unsigned parseFlags, typename InputStream, typename Handler>
@@ -566,12 +869,12 @@ private:
RAPIDJSON_ASSERT(is.Peek() == 't');
is.Take();
- if (is.Take() == 'r' && is.Take() == 'u' && is.Take() == 'e') {
- if (!handler.Bool(true))
+ if (RAPIDJSON_LIKELY(Consume(is, 'r') && Consume(is, 'u') && Consume(is, 'e'))) {
+ if (RAPIDJSON_UNLIKELY(!handler.Bool(true)))
RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell());
}
else
- RAPIDJSON_PARSE_ERROR(kParseErrorValueInvalid, is.Tell() - 1);
+ RAPIDJSON_PARSE_ERROR(kParseErrorValueInvalid, is.Tell());
}
template<unsigned parseFlags, typename InputStream, typename Handler>
@@ -579,20 +882,30 @@ private:
RAPIDJSON_ASSERT(is.Peek() == 'f');
is.Take();
- if (is.Take() == 'a' && is.Take() == 'l' && is.Take() == 's' && is.Take() == 'e') {
- if (!handler.Bool(false))
+ if (RAPIDJSON_LIKELY(Consume(is, 'a') && Consume(is, 'l') && Consume(is, 's') && Consume(is, 'e'))) {
+ if (RAPIDJSON_UNLIKELY(!handler.Bool(false)))
RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell());
}
else
- RAPIDJSON_PARSE_ERROR(kParseErrorValueInvalid, is.Tell() - 1);
+ RAPIDJSON_PARSE_ERROR(kParseErrorValueInvalid, is.Tell());
+ }
+
+ template<typename InputStream>
+ RAPIDJSON_FORCEINLINE static bool Consume(InputStream& is, typename InputStream::Ch expect) {
+ if (RAPIDJSON_LIKELY(is.Peek() == expect)) {
+ is.Take();
+ return true;
+ }
+ else
+ return false;
}
// Helper function to parse four hexidecimal digits in \uXXXX in ParseString().
template<typename InputStream>
- unsigned ParseHex4(InputStream& is) {
+ unsigned ParseHex4(InputStream& is, size_t escapeOffset) {
unsigned codepoint = 0;
for (int i = 0; i < 4; i++) {
- Ch c = is.Take();
+ Ch c = is.Peek();
codepoint <<= 4;
codepoint += static_cast<unsigned>(c);
if (c >= '0' && c <= '9')
@@ -602,9 +915,10 @@ private:
else if (c >= 'a' && c <= 'f')
codepoint -= 'a' - 10;
else {
- RAPIDJSON_PARSE_ERROR_NORETURN(kParseErrorStringUnicodeEscapeInvalidHex, is.Tell() - 1);
+ RAPIDJSON_PARSE_ERROR_NORETURN(kParseErrorStringUnicodeEscapeInvalidHex, escapeOffset);
RAPIDJSON_PARSE_ERROR_EARLY_RETURN(0);
}
+ is.Take();
}
return codepoint;
}
@@ -619,7 +933,14 @@ private:
*stack_.template Push<Ch>() = c;
++length_;
}
+
+ RAPIDJSON_FORCEINLINE void* Push(SizeType count) {
+ length_ += count;
+ return stack_.template Push<Ch>(count);
+ }
+
size_t Length() const { return length_; }
+
Ch* Pop() {
return stack_.template Pop<Ch>(length_);
}
@@ -638,6 +959,9 @@ private:
internal::StreamLocalCopy<InputStream> copy(is);
InputStream& s(copy.s);
+ RAPIDJSON_ASSERT(s.Peek() == '\"');
+ s.Take(); // Skip '\"'
+
bool success = false;
if (parseFlags & kParseInsituFlag) {
typename InputStream::Ch *head = s.PutBegin();
@@ -645,7 +969,7 @@ private:
RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;
size_t length = s.PutEnd(head) - 1;
RAPIDJSON_ASSERT(length <= 0xFFFFFFFF);
- const typename TargetEncoding::Ch* const str = (typename TargetEncoding::Ch*)head;
+ const typename TargetEncoding::Ch* const str = reinterpret_cast<typename TargetEncoding::Ch*>(head);
success = (isKey ? handler.Key(str, SizeType(length), false) : handler.String(str, SizeType(length), false));
}
else {
@@ -656,7 +980,7 @@ private:
const typename TargetEncoding::Ch* const str = stackStream.Pop();
success = (isKey ? handler.Key(str, length, true) : handler.String(str, length, true));
}
- if (!success)
+ if (RAPIDJSON_UNLIKELY(!success))
RAPIDJSON_PARSE_ERROR(kParseErrorTermination, s.Tell());
}
@@ -667,74 +991,421 @@ private:
//!@cond RAPIDJSON_HIDDEN_FROM_DOXYGEN
#define Z16 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
static const char escape[256] = {
- Z16, Z16, 0, 0,'\"', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,'/',
- Z16, Z16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,'\\', 0, 0, 0,
- 0, 0,'\b', 0, 0, 0,'\f', 0, 0, 0, 0, 0, 0, 0,'\n', 0,
- 0, 0,'\r', 0,'\t', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ Z16, Z16, 0, 0,'\"', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,'/',
+ Z16, Z16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,'\\', 0, 0, 0,
+ 0, 0,'\b', 0, 0, 0,'\f', 0, 0, 0, 0, 0, 0, 0,'\n', 0,
+ 0, 0,'\r', 0,'\t', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Z16, Z16, Z16, Z16, Z16, Z16, Z16, Z16
};
#undef Z16
//!@endcond
- RAPIDJSON_ASSERT(is.Peek() == '\"');
- is.Take(); // Skip '\"'
-
for (;;) {
+ // Scan and copy string before "\\\"" or < 0x20. This is an optional optimzation.
+ if (!(parseFlags & kParseValidateEncodingFlag))
+ ScanCopyUnescapedString(is, os);
+
Ch c = is.Peek();
- if (c == '\\') { // Escape
+ if (RAPIDJSON_UNLIKELY(c == '\\')) { // Escape
+ size_t escapeOffset = is.Tell(); // For invalid escaping, report the inital '\\' as error offset
is.Take();
- Ch e = is.Take();
- if ((sizeof(Ch) == 1 || unsigned(e) < 256) && escape[(unsigned char)e]) {
- os.Put(escape[(unsigned char)e]);
+ Ch e = is.Peek();
+ if ((sizeof(Ch) == 1 || unsigned(e) < 256) && RAPIDJSON_LIKELY(escape[static_cast<unsigned char>(e)])) {
+ is.Take();
+ os.Put(static_cast<typename TEncoding::Ch>(escape[static_cast<unsigned char>(e)]));
}
- else if (e == 'u') { // Unicode
- unsigned codepoint = ParseHex4(is);
+ else if (RAPIDJSON_LIKELY(e == 'u')) { // Unicode
+ is.Take();
+ unsigned codepoint = ParseHex4(is, escapeOffset);
RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;
- if (codepoint >= 0xD800 && codepoint <= 0xDBFF) {
+ if (RAPIDJSON_UNLIKELY(codepoint >= 0xD800 && codepoint <= 0xDBFF)) {
// Handle UTF-16 surrogate pair
- if (is.Take() != '\\' || is.Take() != 'u')
- RAPIDJSON_PARSE_ERROR(kParseErrorStringUnicodeSurrogateInvalid, is.Tell() - 2);
- unsigned codepoint2 = ParseHex4(is);
+ if (RAPIDJSON_UNLIKELY(!Consume(is, '\\') || !Consume(is, 'u')))
+ RAPIDJSON_PARSE_ERROR(kParseErrorStringUnicodeSurrogateInvalid, escapeOffset);
+ unsigned codepoint2 = ParseHex4(is, escapeOffset);
RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;
- if (codepoint2 < 0xDC00 || codepoint2 > 0xDFFF)
- RAPIDJSON_PARSE_ERROR(kParseErrorStringUnicodeSurrogateInvalid, is.Tell() - 2);
+ if (RAPIDJSON_UNLIKELY(codepoint2 < 0xDC00 || codepoint2 > 0xDFFF))
+ RAPIDJSON_PARSE_ERROR(kParseErrorStringUnicodeSurrogateInvalid, escapeOffset);
codepoint = (((codepoint - 0xD800) << 10) | (codepoint2 - 0xDC00)) + 0x10000;
}
TEncoding::Encode(os, codepoint);
}
else
- RAPIDJSON_PARSE_ERROR(kParseErrorStringEscapeInvalid, is.Tell() - 1);
+ RAPIDJSON_PARSE_ERROR(kParseErrorStringEscapeInvalid, escapeOffset);
}
- else if (c == '"') { // Closing double quote
+ else if (RAPIDJSON_UNLIKELY(c == '"')) { // Closing double quote
is.Take();
os.Put('\0'); // null-terminate the string
return;
}
- else if (c == '\0')
- RAPIDJSON_PARSE_ERROR(kParseErrorStringMissQuotationMark, is.Tell() - 1);
- else if ((unsigned)c < 0x20) // RFC 4627: unescaped = %x20-21 / %x23-5B / %x5D-10FFFF
- RAPIDJSON_PARSE_ERROR(kParseErrorStringEscapeInvalid, is.Tell() - 1);
- else {
- if (parseFlags & kParseValidateEncodingFlag ?
- !Transcoder<SEncoding, TEncoding>::Validate(is, os) :
- !Transcoder<SEncoding, TEncoding>::Transcode(is, os))
+ else if (RAPIDJSON_UNLIKELY(static_cast<unsigned>(c) < 0x20)) { // RFC 4627: unescaped = %x20-21 / %x23-5B / %x5D-10FFFF
+ if (c == '\0')
+ RAPIDJSON_PARSE_ERROR(kParseErrorStringMissQuotationMark, is.Tell());
+ else
RAPIDJSON_PARSE_ERROR(kParseErrorStringInvalidEncoding, is.Tell());
}
+ else {
+ size_t offset = is.Tell();
+ if (RAPIDJSON_UNLIKELY((parseFlags & kParseValidateEncodingFlag ?
+ !Transcoder<SEncoding, TEncoding>::Validate(is, os) :
+ !Transcoder<SEncoding, TEncoding>::Transcode(is, os))))
+ RAPIDJSON_PARSE_ERROR(kParseErrorStringInvalidEncoding, offset);
+ }
}
}
- template<typename InputStream, bool backup>
+ template<typename InputStream, typename OutputStream>
+ static RAPIDJSON_FORCEINLINE void ScanCopyUnescapedString(InputStream&, OutputStream&) {
+ // Do nothing for generic version
+ }
+
+#if defined(RAPIDJSON_SSE2) || defined(RAPIDJSON_SSE42)
+ // StringStream -> StackStream<char>
+ static RAPIDJSON_FORCEINLINE void ScanCopyUnescapedString(StringStream& is, StackStream<char>& os) {
+ const char* p = is.src_;
+
+ // Scan one by one until alignment (unaligned load may cross page boundary and cause crash)
+ const char* nextAligned = reinterpret_cast<const char*>((reinterpret_cast<size_t>(p) + 15) & static_cast<size_t>(~15));
+ while (p != nextAligned)
+ if (RAPIDJSON_UNLIKELY(*p == '\"') || RAPIDJSON_UNLIKELY(*p == '\\') || RAPIDJSON_UNLIKELY(static_cast<unsigned>(*p) < 0x20)) {
+ is.src_ = p;
+ return;
+ }
+ else
+ os.Put(*p++);
+
+ // The rest of string using SIMD
+ static const char dquote[16] = { '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"' };
+ static const char bslash[16] = { '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\' };
+ static const char space[16] = { 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F };
+ const __m128i dq = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&dquote[0]));
+ const __m128i bs = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&bslash[0]));
+ const __m128i sp = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&space[0]));
+
+ for (;; p += 16) {
+ const __m128i s = _mm_load_si128(reinterpret_cast<const __m128i *>(p));
+ const __m128i t1 = _mm_cmpeq_epi8(s, dq);
+ const __m128i t2 = _mm_cmpeq_epi8(s, bs);
+ const __m128i t3 = _mm_cmpeq_epi8(_mm_max_epu8(s, sp), sp); // s < 0x20 <=> max(s, 0x1F) == 0x1F
+ const __m128i x = _mm_or_si128(_mm_or_si128(t1, t2), t3);
+ unsigned short r = static_cast<unsigned short>(_mm_movemask_epi8(x));
+ if (RAPIDJSON_UNLIKELY(r != 0)) { // some of characters is escaped
+ SizeType length;
+ #ifdef _MSC_VER // Find the index of first escaped
+ unsigned long offset;
+ _BitScanForward(&offset, r);
+ length = offset;
+ #else
+ length = static_cast<SizeType>(__builtin_ffs(r) - 1);
+ #endif
+ if (length != 0) {
+ char* q = reinterpret_cast<char*>(os.Push(length));
+ for (size_t i = 0; i < length; i++)
+ q[i] = p[i];
+
+ p += length;
+ }
+ break;
+ }
+ _mm_storeu_si128(reinterpret_cast<__m128i *>(os.Push(16)), s);
+ }
+
+ is.src_ = p;
+ }
+
+ // InsituStringStream -> InsituStringStream
+ static RAPIDJSON_FORCEINLINE void ScanCopyUnescapedString(InsituStringStream& is, InsituStringStream& os) {
+ RAPIDJSON_ASSERT(&is == &os);
+ (void)os;
+
+ if (is.src_ == is.dst_) {
+ SkipUnescapedString(is);
+ return;
+ }
+
+ char* p = is.src_;
+ char *q = is.dst_;
+
+ // Scan one by one until alignment (unaligned load may cross page boundary and cause crash)
+ const char* nextAligned = reinterpret_cast<const char*>((reinterpret_cast<size_t>(p) + 15) & static_cast<size_t>(~15));
+ while (p != nextAligned)
+ if (RAPIDJSON_UNLIKELY(*p == '\"') || RAPIDJSON_UNLIKELY(*p == '\\') || RAPIDJSON_UNLIKELY(static_cast<unsigned>(*p) < 0x20)) {
+ is.src_ = p;
+ is.dst_ = q;
+ return;
+ }
+ else
+ *q++ = *p++;
+
+ // The rest of string using SIMD
+ static const char dquote[16] = { '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"' };
+ static const char bslash[16] = { '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\' };
+ static const char space[16] = { 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F };
+ const __m128i dq = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&dquote[0]));
+ const __m128i bs = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&bslash[0]));
+ const __m128i sp = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&space[0]));
+
+ for (;; p += 16, q += 16) {
+ const __m128i s = _mm_load_si128(reinterpret_cast<const __m128i *>(p));
+ const __m128i t1 = _mm_cmpeq_epi8(s, dq);
+ const __m128i t2 = _mm_cmpeq_epi8(s, bs);
+ const __m128i t3 = _mm_cmpeq_epi8(_mm_max_epu8(s, sp), sp); // s < 0x20 <=> max(s, 0x1F) == 0x1F
+ const __m128i x = _mm_or_si128(_mm_or_si128(t1, t2), t3);
+ unsigned short r = static_cast<unsigned short>(_mm_movemask_epi8(x));
+ if (RAPIDJSON_UNLIKELY(r != 0)) { // some of characters is escaped
+ size_t length;
+#ifdef _MSC_VER // Find the index of first escaped
+ unsigned long offset;
+ _BitScanForward(&offset, r);
+ length = offset;
+#else
+ length = static_cast<size_t>(__builtin_ffs(r) - 1);
+#endif
+ for (const char* pend = p + length; p != pend; )
+ *q++ = *p++;
+ break;
+ }
+ _mm_storeu_si128(reinterpret_cast<__m128i *>(q), s);
+ }
+
+ is.src_ = p;
+ is.dst_ = q;
+ }
+
+ // When read/write pointers are the same for insitu stream, just skip unescaped characters
+ static RAPIDJSON_FORCEINLINE void SkipUnescapedString(InsituStringStream& is) {
+ RAPIDJSON_ASSERT(is.src_ == is.dst_);
+ char* p = is.src_;
+
+ // Scan one by one until alignment (unaligned load may cross page boundary and cause crash)
+ const char* nextAligned = reinterpret_cast<const char*>((reinterpret_cast<size_t>(p) + 15) & static_cast<size_t>(~15));
+ for (; p != nextAligned; p++)
+ if (RAPIDJSON_UNLIKELY(*p == '\"') || RAPIDJSON_UNLIKELY(*p == '\\') || RAPIDJSON_UNLIKELY(static_cast<unsigned>(*p) < 0x20)) {
+ is.src_ = is.dst_ = p;
+ return;
+ }
+
+ // The rest of string using SIMD
+ static const char dquote[16] = { '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"' };
+ static const char bslash[16] = { '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\' };
+ static const char space[16] = { 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F };
+ const __m128i dq = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&dquote[0]));
+ const __m128i bs = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&bslash[0]));
+ const __m128i sp = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&space[0]));
+
+ for (;; p += 16) {
+ const __m128i s = _mm_load_si128(reinterpret_cast<const __m128i *>(p));
+ const __m128i t1 = _mm_cmpeq_epi8(s, dq);
+ const __m128i t2 = _mm_cmpeq_epi8(s, bs);
+ const __m128i t3 = _mm_cmpeq_epi8(_mm_max_epu8(s, sp), sp); // s < 0x20 <=> max(s, 0x1F) == 0x1F
+ const __m128i x = _mm_or_si128(_mm_or_si128(t1, t2), t3);
+ unsigned short r = static_cast<unsigned short>(_mm_movemask_epi8(x));
+ if (RAPIDJSON_UNLIKELY(r != 0)) { // some of characters is escaped
+ size_t length;
+#ifdef _MSC_VER // Find the index of first escaped
+ unsigned long offset;
+ _BitScanForward(&offset, r);
+ length = offset;
+#else
+ length = static_cast<size_t>(__builtin_ffs(r) - 1);
+#endif
+ p += length;
+ break;
+ }
+ }
+
+ is.src_ = is.dst_ = p;
+ }
+#elif defined(RAPIDJSON_NEON)
+ // StringStream -> StackStream<char>
+ static RAPIDJSON_FORCEINLINE void ScanCopyUnescapedString(StringStream& is, StackStream<char>& os) {
+ const char* p = is.src_;
+
+ // Scan one by one until alignment (unaligned load may cross page boundary and cause crash)
+ const char* nextAligned = reinterpret_cast<const char*>((reinterpret_cast<size_t>(p) + 15) & static_cast<size_t>(~15));
+ while (p != nextAligned)
+ if (RAPIDJSON_UNLIKELY(*p == '\"') || RAPIDJSON_UNLIKELY(*p == '\\') || RAPIDJSON_UNLIKELY(static_cast<unsigned>(*p) < 0x20)) {
+ is.src_ = p;
+ return;
+ }
+ else
+ os.Put(*p++);
+
+ // The rest of string using SIMD
+ const uint8x16_t s0 = vmovq_n_u8('"');
+ const uint8x16_t s1 = vmovq_n_u8('\\');
+ const uint8x16_t s2 = vmovq_n_u8('\b');
+ const uint8x16_t s3 = vmovq_n_u8(32);
+
+ for (;; p += 16) {
+ const uint8x16_t s = vld1q_u8(reinterpret_cast<const uint8_t *>(p));
+ uint8x16_t x = vceqq_u8(s, s0);
+ x = vorrq_u8(x, vceqq_u8(s, s1));
+ x = vorrq_u8(x, vceqq_u8(s, s2));
+ x = vorrq_u8(x, vcltq_u8(s, s3));
+
+ x = vrev64q_u8(x); // Rev in 64
+ uint64_t low = vgetq_lane_u64(reinterpret_cast<uint64x2_t>(x), 0); // extract
+ uint64_t high = vgetq_lane_u64(reinterpret_cast<uint64x2_t>(x), 1); // extract
+
+ SizeType length = 0;
+ bool escaped = false;
+ if (low == 0) {
+ if (high != 0) {
+ unsigned lz = (unsigned)__builtin_clzll(high);;
+ length = 8 + (lz >> 3);
+ escaped = true;
+ }
+ } else {
+ unsigned lz = (unsigned)__builtin_clzll(low);;
+ length = lz >> 3;
+ escaped = true;
+ }
+ if (RAPIDJSON_UNLIKELY(escaped)) { // some of characters is escaped
+ if (length != 0) {
+ char* q = reinterpret_cast<char*>(os.Push(length));
+ for (size_t i = 0; i < length; i++)
+ q[i] = p[i];
+
+ p += length;
+ }
+ break;
+ }
+ vst1q_u8(reinterpret_cast<uint8_t *>(os.Push(16)), s);
+ }
+
+ is.src_ = p;
+ }
+
+ // InsituStringStream -> InsituStringStream
+ static RAPIDJSON_FORCEINLINE void ScanCopyUnescapedString(InsituStringStream& is, InsituStringStream& os) {
+ RAPIDJSON_ASSERT(&is == &os);
+ (void)os;
+
+ if (is.src_ == is.dst_) {
+ SkipUnescapedString(is);
+ return;
+ }
+
+ char* p = is.src_;
+ char *q = is.dst_;
+
+ // Scan one by one until alignment (unaligned load may cross page boundary and cause crash)
+ const char* nextAligned = reinterpret_cast<const char*>((reinterpret_cast<size_t>(p) + 15) & static_cast<size_t>(~15));
+ while (p != nextAligned)
+ if (RAPIDJSON_UNLIKELY(*p == '\"') || RAPIDJSON_UNLIKELY(*p == '\\') || RAPIDJSON_UNLIKELY(static_cast<unsigned>(*p) < 0x20)) {
+ is.src_ = p;
+ is.dst_ = q;
+ return;
+ }
+ else
+ *q++ = *p++;
+
+ // The rest of string using SIMD
+ const uint8x16_t s0 = vmovq_n_u8('"');
+ const uint8x16_t s1 = vmovq_n_u8('\\');
+ const uint8x16_t s2 = vmovq_n_u8('\b');
+ const uint8x16_t s3 = vmovq_n_u8(32);
+
+ for (;; p += 16, q += 16) {
+ const uint8x16_t s = vld1q_u8(reinterpret_cast<uint8_t *>(p));
+ uint8x16_t x = vceqq_u8(s, s0);
+ x = vorrq_u8(x, vceqq_u8(s, s1));
+ x = vorrq_u8(x, vceqq_u8(s, s2));
+ x = vorrq_u8(x, vcltq_u8(s, s3));
+
+ x = vrev64q_u8(x); // Rev in 64
+ uint64_t low = vgetq_lane_u64(reinterpret_cast<uint64x2_t>(x), 0); // extract
+ uint64_t high = vgetq_lane_u64(reinterpret_cast<uint64x2_t>(x), 1); // extract
+
+ SizeType length = 0;
+ bool escaped = false;
+ if (low == 0) {
+ if (high != 0) {
+ unsigned lz = (unsigned)__builtin_clzll(high);
+ length = 8 + (lz >> 3);
+ escaped = true;
+ }
+ } else {
+ unsigned lz = (unsigned)__builtin_clzll(low);
+ length = lz >> 3;
+ escaped = true;
+ }
+ if (RAPIDJSON_UNLIKELY(escaped)) { // some of characters is escaped
+ for (const char* pend = p + length; p != pend; ) {
+ *q++ = *p++;
+ }
+ break;
+ }
+ vst1q_u8(reinterpret_cast<uint8_t *>(q), s);
+ }
+
+ is.src_ = p;
+ is.dst_ = q;
+ }
+
+ // When read/write pointers are the same for insitu stream, just skip unescaped characters
+ static RAPIDJSON_FORCEINLINE void SkipUnescapedString(InsituStringStream& is) {
+ RAPIDJSON_ASSERT(is.src_ == is.dst_);
+ char* p = is.src_;
+
+ // Scan one by one until alignment (unaligned load may cross page boundary and cause crash)
+ const char* nextAligned = reinterpret_cast<const char*>((reinterpret_cast<size_t>(p) + 15) & static_cast<size_t>(~15));
+ for (; p != nextAligned; p++)
+ if (RAPIDJSON_UNLIKELY(*p == '\"') || RAPIDJSON_UNLIKELY(*p == '\\') || RAPIDJSON_UNLIKELY(static_cast<unsigned>(*p) < 0x20)) {
+ is.src_ = is.dst_ = p;
+ return;
+ }
+
+ // The rest of string using SIMD
+ const uint8x16_t s0 = vmovq_n_u8('"');
+ const uint8x16_t s1 = vmovq_n_u8('\\');
+ const uint8x16_t s2 = vmovq_n_u8('\b');
+ const uint8x16_t s3 = vmovq_n_u8(32);
+
+ for (;; p += 16) {
+ const uint8x16_t s = vld1q_u8(reinterpret_cast<uint8_t *>(p));
+ uint8x16_t x = vceqq_u8(s, s0);
+ x = vorrq_u8(x, vceqq_u8(s, s1));
+ x = vorrq_u8(x, vceqq_u8(s, s2));
+ x = vorrq_u8(x, vcltq_u8(s, s3));
+
+ x = vrev64q_u8(x); // Rev in 64
+ uint64_t low = vgetq_lane_u64(reinterpret_cast<uint64x2_t>(x), 0); // extract
+ uint64_t high = vgetq_lane_u64(reinterpret_cast<uint64x2_t>(x), 1); // extract
+
+ if (low == 0) {
+ if (high != 0) {
+ int lz = __builtin_clzll(high);
+ p += 8 + (lz >> 3);
+ break;
+ }
+ } else {
+ int lz = __builtin_clzll(low);
+ p += lz >> 3;
+ break;
+ }
+ }
+
+ is.src_ = is.dst_ = p;
+ }
+#endif // RAPIDJSON_NEON
+
+ template<typename InputStream, bool backup, bool pushOnTake>
class NumberStream;
template<typename InputStream>
- class NumberStream<InputStream, false> {
+ class NumberStream<InputStream, false, false> {
public:
+ typedef typename InputStream::Ch Ch;
+
NumberStream(GenericReader& reader, InputStream& s) : is(s) { (void)reader; }
- ~NumberStream() {}
RAPIDJSON_FORCEINLINE Ch Peek() const { return is.Peek(); }
RAPIDJSON_FORCEINLINE Ch TakePush() { return is.Take(); }
RAPIDJSON_FORCEINLINE Ch Take() { return is.Take(); }
+ RAPIDJSON_FORCEINLINE void Push(char) {}
+
size_t Tell() { return is.Tell(); }
size_t Length() { return 0; }
const char* Pop() { return 0; }
@@ -746,17 +1417,20 @@ private:
};
template<typename InputStream>
- class NumberStream<InputStream, true> : public NumberStream<InputStream, false> {
- typedef NumberStream<InputStream, false> Base;
+ class NumberStream<InputStream, true, false> : public NumberStream<InputStream, false, false> {
+ typedef NumberStream<InputStream, false, false> Base;
public:
- NumberStream(GenericReader& reader, InputStream& is) : NumberStream<InputStream, false>(reader, is), stackStream(reader.stack_) {}
- ~NumberStream() {}
+ NumberStream(GenericReader& reader, InputStream& is) : Base(reader, is), stackStream(reader.stack_) {}
RAPIDJSON_FORCEINLINE Ch TakePush() {
- stackStream.Put((char)Base::is.Peek());
+ stackStream.Put(static_cast<char>(Base::is.Peek()));
return Base::is.Take();
}
+ RAPIDJSON_FORCEINLINE void Push(char c) {
+ stackStream.Put(c);
+ }
+
size_t Length() { return stackStream.Length(); }
const char* Pop() {
@@ -768,34 +1442,48 @@ private:
StackStream<char> stackStream;
};
+ template<typename InputStream>
+ class NumberStream<InputStream, true, true> : public NumberStream<InputStream, true, false> {
+ typedef NumberStream<InputStream, true, false> Base;
+ public:
+ NumberStream(GenericReader& reader, InputStream& is) : Base(reader, is) {}
+
+ RAPIDJSON_FORCEINLINE Ch Take() { return Base::TakePush(); }
+ };
+
template<unsigned parseFlags, typename InputStream, typename Handler>
void ParseNumber(InputStream& is, Handler& handler) {
internal::StreamLocalCopy<InputStream> copy(is);
- NumberStream<InputStream, (parseFlags & kParseFullPrecisionFlag) != 0> s(*this, copy.s);
+ NumberStream<InputStream,
+ ((parseFlags & kParseNumbersAsStringsFlag) != 0) ?
+ ((parseFlags & kParseInsituFlag) == 0) :
+ ((parseFlags & kParseFullPrecisionFlag) != 0),
+ (parseFlags & kParseNumbersAsStringsFlag) != 0 &&
+ (parseFlags & kParseInsituFlag) == 0> s(*this, copy.s);
+
+ size_t startOffset = s.Tell();
+ double d = 0.0;
+ bool useNanOrInf = false;
// Parse minus
- bool minus = false;
- if (s.Peek() == '-') {
- minus = true;
- s.Take();
- }
+ bool minus = Consume(s, '-');
// Parse int: zero / ( digit1-9 *DIGIT )
unsigned i = 0;
uint64_t i64 = 0;
bool use64bit = false;
int significandDigit = 0;
- if (s.Peek() == '0') {
+ if (RAPIDJSON_UNLIKELY(s.Peek() == '0')) {
i = 0;
s.TakePush();
}
- else if (s.Peek() >= '1' && s.Peek() <= '9') {
+ else if (RAPIDJSON_LIKELY(s.Peek() >= '1' && s.Peek() <= '9')) {
i = static_cast<unsigned>(s.TakePush() - '0');
if (minus)
- while (s.Peek() >= '0' && s.Peek() <= '9') {
- if (i >= 214748364) { // 2^31 = 2147483648
- if (i != 214748364 || s.Peek() > '8') {
+ while (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) {
+ if (RAPIDJSON_UNLIKELY(i >= 214748364)) { // 2^31 = 2147483648
+ if (RAPIDJSON_LIKELY(i != 214748364 || s.Peek() > '8')) {
i64 = i;
use64bit = true;
break;
@@ -805,9 +1493,9 @@ private:
significandDigit++;
}
else
- while (s.Peek() >= '0' && s.Peek() <= '9') {
- if (i >= 429496729) { // 2^32 - 1 = 4294967295
- if (i != 429496729 || s.Peek() > '5') {
+ while (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) {
+ if (RAPIDJSON_UNLIKELY(i >= 429496729)) { // 2^32 - 1 = 4294967295
+ if (RAPIDJSON_LIKELY(i != 429496729 || s.Peek() > '5')) {
i64 = i;
use64bit = true;
break;
@@ -817,18 +1505,41 @@ private:
significandDigit++;
}
}
+ // Parse NaN or Infinity here
+ else if ((parseFlags & kParseNanAndInfFlag) && RAPIDJSON_LIKELY((s.Peek() == 'I' || s.Peek() == 'N'))) {
+ if (Consume(s, 'N')) {
+ if (Consume(s, 'a') && Consume(s, 'N')) {
+ d = std::numeric_limits<double>::quiet_NaN();
+ useNanOrInf = true;
+ }
+ }
+ else if (RAPIDJSON_LIKELY(Consume(s, 'I'))) {
+ if (Consume(s, 'n') && Consume(s, 'f')) {
+ d = (minus ? -std::numeric_limits<double>::infinity() : std::numeric_limits<double>::infinity());
+ useNanOrInf = true;
+
+ if (RAPIDJSON_UNLIKELY(s.Peek() == 'i' && !(Consume(s, 'i') && Consume(s, 'n')
+ && Consume(s, 'i') && Consume(s, 't') && Consume(s, 'y')))) {
+ RAPIDJSON_PARSE_ERROR(kParseErrorValueInvalid, s.Tell());
+ }
+ }
+ }
+
+ if (RAPIDJSON_UNLIKELY(!useNanOrInf)) {
+ RAPIDJSON_PARSE_ERROR(kParseErrorValueInvalid, s.Tell());
+ }
+ }
else
RAPIDJSON_PARSE_ERROR(kParseErrorValueInvalid, s.Tell());
// Parse 64bit int
bool useDouble = false;
- double d = 0.0;
if (use64bit) {
- if (minus)
- while (s.Peek() >= '0' && s.Peek() <= '9') {
- if (i64 >= RAPIDJSON_UINT64_C2(0x0CCCCCCC, 0xCCCCCCCC)) // 2^63 = 9223372036854775808
- if (i64 != RAPIDJSON_UINT64_C2(0x0CCCCCCC, 0xCCCCCCCC) || s.Peek() > '8') {
- d = i64;
+ if (minus)
+ while (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) {
+ if (RAPIDJSON_UNLIKELY(i64 >= RAPIDJSON_UINT64_C2(0x0CCCCCCC, 0xCCCCCCCC))) // 2^63 = 9223372036854775808
+ if (RAPIDJSON_LIKELY(i64 != RAPIDJSON_UINT64_C2(0x0CCCCCCC, 0xCCCCCCCC) || s.Peek() > '8')) {
+ d = static_cast<double>(i64);
useDouble = true;
break;
}
@@ -836,10 +1547,10 @@ private:
significandDigit++;
}
else
- while (s.Peek() >= '0' && s.Peek() <= '9') {
- if (i64 >= RAPIDJSON_UINT64_C2(0x19999999, 0x99999999)) // 2^64 - 1 = 18446744073709551615
- if (i64 != RAPIDJSON_UINT64_C2(0x19999999, 0x99999999) || s.Peek() > '5') {
- d = i64;
+ while (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) {
+ if (RAPIDJSON_UNLIKELY(i64 >= RAPIDJSON_UINT64_C2(0x19999999, 0x99999999))) // 2^64 - 1 = 18446744073709551615
+ if (RAPIDJSON_LIKELY(i64 != RAPIDJSON_UINT64_C2(0x19999999, 0x99999999) || s.Peek() > '5')) {
+ d = static_cast<double>(i64);
useDouble = true;
break;
}
@@ -850,9 +1561,9 @@ private:
// Force double for big integer
if (useDouble) {
- while (s.Peek() >= '0' && s.Peek() <= '9') {
- if (d >= 1.7976931348623157e307) // DBL_MAX / 10.0
- RAPIDJSON_PARSE_ERROR(kParseErrorNumberTooBig, s.Tell());
+ while (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) {
+ if (RAPIDJSON_UNLIKELY(d >= 1.7976931348623157e307)) // DBL_MAX / 10.0
+ RAPIDJSON_PARSE_ERROR(kParseErrorNumberTooBig, startOffset);
d = d * 10 + (s.TakePush() - '0');
}
}
@@ -860,11 +1571,10 @@ private:
// Parse frac = decimal-point 1*DIGIT
int expFrac = 0;
size_t decimalPosition;
- if (s.Peek() == '.') {
- s.Take();
+ if (Consume(s, '.')) {
decimalPosition = s.Length();
- if (!(s.Peek() >= '0' && s.Peek() <= '9'))
+ if (RAPIDJSON_UNLIKELY(!(s.Peek() >= '0' && s.Peek() <= '9')))
RAPIDJSON_PARSE_ERROR(kParseErrorNumberMissFraction, s.Tell());
if (!useDouble) {
@@ -872,8 +1582,8 @@ private:
// Use i64 to store significand in 64-bit architecture
if (!use64bit)
i64 = i;
-
- while (s.Peek() >= '0' && s.Peek() <= '9') {
+
+ while (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) {
if (i64 > RAPIDJSON_UINT64_C2(0x1FFFFF, 0xFFFFFFFF)) // 2^53 - 1 for fast path
break;
else {
@@ -884,19 +1594,19 @@ private:
}
}
- d = (double)i64;
+ d = static_cast<double>(i64);
#else
// Use double to store significand in 32-bit architecture
- d = use64bit ? (double)i64 : (double)i;
+ d = static_cast<double>(use64bit ? i64 : i);
#endif
useDouble = true;
}
- while (s.Peek() >= '0' && s.Peek() <= '9') {
+ while (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) {
if (significandDigit < 17) {
d = d * 10.0 + (s.TakePush() - '0');
--expFrac;
- if (d > 0.0)
+ if (RAPIDJSON_LIKELY(d > 0.0))
significandDigit++;
}
else
@@ -908,38 +1618,35 @@ private:
// Parse exp = e [ minus / plus ] 1*DIGIT
int exp = 0;
- if (s.Peek() == 'e' || s.Peek() == 'E') {
+ if (Consume(s, 'e') || Consume(s, 'E')) {
if (!useDouble) {
- d = use64bit ? i64 : i;
+ d = static_cast<double>(use64bit ? i64 : i);
useDouble = true;
}
- s.Take();
bool expMinus = false;
- if (s.Peek() == '+')
- s.Take();
- else if (s.Peek() == '-') {
- s.Take();
+ if (Consume(s, '+'))
+ ;
+ else if (Consume(s, '-'))
expMinus = true;
- }
- if (s.Peek() >= '0' && s.Peek() <= '9') {
- exp = s.Take() - '0';
+ if (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) {
+ exp = static_cast<int>(s.Take() - '0');
if (expMinus) {
- while (s.Peek() >= '0' && s.Peek() <= '9') {
- exp = exp * 10 + (s.Take() - '0');
+ while (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) {
+ exp = exp * 10 + static_cast<int>(s.Take() - '0');
if (exp >= 214748364) { // Issue #313: prevent overflow exponent
- while (s.Peek() >= '0' && s.Peek() <= '9') // Consume the rest of exponent
+ while (RAPIDJSON_UNLIKELY(s.Peek() >= '0' && s.Peek() <= '9')) // Consume the rest of exponent
s.Take();
}
}
}
else { // positive exp
int maxExp = 308 - expFrac;
- while (s.Peek() >= '0' && s.Peek() <= '9') {
- exp = exp * 10 + (s.Take() - '0');
- if (exp > maxExp)
- RAPIDJSON_PARSE_ERROR(kParseErrorNumberTooBig, s.Tell());
+ while (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) {
+ exp = exp * 10 + static_cast<int>(s.Take() - '0');
+ if (RAPIDJSON_UNLIKELY(exp > maxExp))
+ RAPIDJSON_PARSE_ERROR(kParseErrorNumberTooBig, startOffset);
}
}
}
@@ -952,34 +1659,63 @@ private:
// Finish parsing, call event according to the type of number.
bool cont = true;
- size_t length = s.Length();
- const char* decimal = s.Pop(); // Pop stack no matter if it will be used or not.
-
- if (useDouble) {
- int p = exp + expFrac;
- if (parseFlags & kParseFullPrecisionFlag)
- d = internal::StrtodFullPrecision(d, p, decimal, length, decimalPosition, exp);
- else
- d = internal::StrtodNormalPrecision(d, p);
- cont = handler.Double(minus ? -d : d);
- }
- else {
- if (use64bit) {
- if (minus)
- cont = handler.Int64(-(int64_t)i64);
- else
- cont = handler.Uint64(i64);
+ if (parseFlags & kParseNumbersAsStringsFlag) {
+ if (parseFlags & kParseInsituFlag) {
+ s.Pop(); // Pop stack no matter if it will be used or not.
+ typename InputStream::Ch* head = is.PutBegin();
+ const size_t length = s.Tell() - startOffset;
+ RAPIDJSON_ASSERT(length <= 0xFFFFFFFF);
+ // unable to insert the \0 character here, it will erase the comma after this number
+ const typename TargetEncoding::Ch* const str = reinterpret_cast<typename TargetEncoding::Ch*>(head);
+ cont = handler.RawNumber(str, SizeType(length), false);
}
else {
- if (minus)
- cont = handler.Int(-(int)i);
- else
- cont = handler.Uint(i);
+ SizeType numCharsToCopy = static_cast<SizeType>(s.Length());
+ StringStream srcStream(s.Pop());
+ StackStream<typename TargetEncoding::Ch> dstStream(stack_);
+ while (numCharsToCopy--) {
+ Transcoder<UTF8<>, TargetEncoding>::Transcode(srcStream, dstStream);
+ }
+ dstStream.Put('\0');
+ const typename TargetEncoding::Ch* str = dstStream.Pop();
+ const SizeType length = static_cast<SizeType>(dstStream.Length()) - 1;
+ cont = handler.RawNumber(str, SizeType(length), true);
}
}
- if (!cont)
- RAPIDJSON_PARSE_ERROR(kParseErrorTermination, s.Tell());
+ else {
+ size_t length = s.Length();
+ const char* decimal = s.Pop(); // Pop stack no matter if it will be used or not.
+
+ if (useDouble) {
+ int p = exp + expFrac;
+ if (parseFlags & kParseFullPrecisionFlag)
+ d = internal::StrtodFullPrecision(d, p, decimal, length, decimalPosition, exp);
+ else
+ d = internal::StrtodNormalPrecision(d, p);
+
+ cont = handler.Double(minus ? -d : d);
+ }
+ else if (useNanOrInf) {
+ cont = handler.Double(d);
+ }
+ else {
+ if (use64bit) {
+ if (minus)
+ cont = handler.Int64(static_cast<int64_t>(~i64 + 1));
+ else
+ cont = handler.Uint64(i64);
+ }
+ else {
+ if (minus)
+ cont = handler.Int(static_cast<int32_t>(~i + 1));
+ else
+ cont = handler.Uint(i);
+ }
+ }
+ }
+ if (RAPIDJSON_UNLIKELY(!cont))
+ RAPIDJSON_PARSE_ERROR(kParseErrorTermination, startOffset);
}
// Parse any JSON value
@@ -992,7 +1728,10 @@ private:
case '"': ParseString<parseFlags>(is, handler); break;
case '{': ParseObject<parseFlags>(is, handler); break;
case '[': ParseArray <parseFlags>(is, handler); break;
- default : ParseNumber<parseFlags>(is, handler);
+ default :
+ ParseNumber<parseFlags>(is, handler);
+ break;
+
}
}
@@ -1000,27 +1739,29 @@ private:
// States
enum IterativeParsingState {
- IterativeParsingStartState = 0,
- IterativeParsingFinishState,
- IterativeParsingErrorState,
+ IterativeParsingFinishState = 0, // sink states at top
+ IterativeParsingErrorState, // sink states at top
+ IterativeParsingStartState,
// Object states
IterativeParsingObjectInitialState,
IterativeParsingMemberKeyState,
- IterativeParsingKeyValueDelimiterState,
IterativeParsingMemberValueState,
- IterativeParsingMemberDelimiterState,
IterativeParsingObjectFinishState,
// Array states
IterativeParsingArrayInitialState,
IterativeParsingElementState,
- IterativeParsingElementDelimiterState,
IterativeParsingArrayFinishState,
// Single value state
IterativeParsingValueState,
-
+
+ // Delimiter states (at bottom)
+ IterativeParsingElementDelimiterState,
+ IterativeParsingMemberDelimiterState,
+ IterativeParsingKeyValueDelimiterState,
+
cIterativeParsingStateCount
};
@@ -1064,9 +1805,9 @@ private:
#undef N
#undef N16
//!@endcond
-
- if (sizeof(Ch) == 1 || unsigned(c) < 256)
- return (Token)tokenMap[(unsigned char)c];
+
+ if (sizeof(Ch) == 1 || static_cast<unsigned>(c) < 256)
+ return static_cast<Token>(tokenMap[static_cast<unsigned char>(c)]);
else
return NumberToken;
}
@@ -1074,6 +1815,18 @@ private:
RAPIDJSON_FORCEINLINE IterativeParsingState Predict(IterativeParsingState state, Token token) {
// current state x one lookahead token -> new state
static const char G[cIterativeParsingStateCount][kTokenCount] = {
+ // Finish(sink state)
+ {
+ IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState,
+ IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState,
+ IterativeParsingErrorState
+ },
+ // Error(sink state)
+ {
+ IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState,
+ IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState,
+ IterativeParsingErrorState
+ },
// Start
{
IterativeParsingArrayInitialState, // Left bracket
@@ -1088,18 +1841,6 @@ private:
IterativeParsingValueState, // Null
IterativeParsingValueState // Number
},
- // Finish(sink state)
- {
- IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState,
- IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState,
- IterativeParsingErrorState
- },
- // Error(sink state)
- {
- IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState,
- IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState,
- IterativeParsingErrorState
- },
// ObjectInitial
{
IterativeParsingErrorState, // Left bracket
@@ -1128,20 +1869,6 @@ private:
IterativeParsingErrorState, // Null
IterativeParsingErrorState // Number
},
- // KeyValueDelimiter
- {
- IterativeParsingArrayInitialState, // Left bracket(push MemberValue state)
- IterativeParsingErrorState, // Right bracket
- IterativeParsingObjectInitialState, // Left curly bracket(push MemberValue state)
- IterativeParsingErrorState, // Right curly bracket
- IterativeParsingErrorState, // Comma
- IterativeParsingErrorState, // Colon
- IterativeParsingMemberValueState, // String
- IterativeParsingMemberValueState, // False
- IterativeParsingMemberValueState, // True
- IterativeParsingMemberValueState, // Null
- IterativeParsingMemberValueState // Number
- },
// MemberValue
{
IterativeParsingErrorState, // Left bracket
@@ -1156,20 +1883,6 @@ private:
IterativeParsingErrorState, // Null
IterativeParsingErrorState // Number
},
- // MemberDelimiter
- {
- IterativeParsingErrorState, // Left bracket
- IterativeParsingErrorState, // Right bracket
- IterativeParsingErrorState, // Left curly bracket
- IterativeParsingErrorState, // Right curly bracket
- IterativeParsingErrorState, // Comma
- IterativeParsingErrorState, // Colon
- IterativeParsingMemberKeyState, // String
- IterativeParsingErrorState, // False
- IterativeParsingErrorState, // True
- IterativeParsingErrorState, // Null
- IterativeParsingErrorState // Number
- },
// ObjectFinish(sink state)
{
IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState,
@@ -1204,10 +1917,22 @@ private:
IterativeParsingErrorState, // Null
IterativeParsingErrorState // Number
},
+ // ArrayFinish(sink state)
+ {
+ IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState,
+ IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState,
+ IterativeParsingErrorState
+ },
+ // Single Value (sink state)
+ {
+ IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState,
+ IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState,
+ IterativeParsingErrorState
+ },
// ElementDelimiter
{
IterativeParsingArrayInitialState, // Left bracket(push Element state)
- IterativeParsingErrorState, // Right bracket
+ IterativeParsingArrayFinishState, // Right bracket
IterativeParsingObjectInitialState, // Left curly bracket(push Element state)
IterativeParsingErrorState, // Right curly bracket
IterativeParsingErrorState, // Comma
@@ -1218,21 +1943,37 @@ private:
IterativeParsingElementState, // Null
IterativeParsingElementState // Number
},
- // ArrayFinish(sink state)
+ // MemberDelimiter
{
- IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState,
- IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState,
- IterativeParsingErrorState
+ IterativeParsingErrorState, // Left bracket
+ IterativeParsingErrorState, // Right bracket
+ IterativeParsingErrorState, // Left curly bracket
+ IterativeParsingObjectFinishState, // Right curly bracket
+ IterativeParsingErrorState, // Comma
+ IterativeParsingErrorState, // Colon
+ IterativeParsingMemberKeyState, // String
+ IterativeParsingErrorState, // False
+ IterativeParsingErrorState, // True
+ IterativeParsingErrorState, // Null
+ IterativeParsingErrorState // Number
},
- // Single Value (sink state)
+ // KeyValueDelimiter
{
- IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState,
- IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState,
- IterativeParsingErrorState
- }
+ IterativeParsingArrayInitialState, // Left bracket(push MemberValue state)
+ IterativeParsingErrorState, // Right bracket
+ IterativeParsingObjectInitialState, // Left curly bracket(push MemberValue state)
+ IterativeParsingErrorState, // Right curly bracket
+ IterativeParsingErrorState, // Comma
+ IterativeParsingErrorState, // Colon
+ IterativeParsingMemberValueState, // String
+ IterativeParsingMemberValueState, // False
+ IterativeParsingMemberValueState, // True
+ IterativeParsingMemberValueState, // Null
+ IterativeParsingMemberValueState // Number
+ },
}; // End of G
- return (IterativeParsingState)G[state][token];
+ return static_cast<IterativeParsingState>(G[state][token]);
}
// Make an advance in the token stream and state based on the candidate destination state which was returned by Transit().
@@ -1309,6 +2050,11 @@ private:
case IterativeParsingObjectFinishState:
{
+ // Transit from delimiter is only allowed when trailing commas are enabled
+ if (!(parseFlags & kParseTrailingCommasFlag) && src == IterativeParsingMemberDelimiterState) {
+ RAPIDJSON_PARSE_ERROR_NORETURN(kParseErrorObjectMissName, is.Tell());
+ return IterativeParsingErrorState;
+ }
// Get member count.
SizeType c = *stack_.template Pop<SizeType>(1);
// If the object is not empty, count the last member.
@@ -1334,6 +2080,11 @@ private:
case IterativeParsingArrayFinishState:
{
+ // Transit from delimiter is only allowed when trailing commas are enabled
+ if (!(parseFlags & kParseTrailingCommasFlag) && src == IterativeParsingElementDelimiterState) {
+ RAPIDJSON_PARSE_ERROR_NORETURN(kParseErrorValueInvalid, is.Tell());
+ return IterativeParsingErrorState;
+ }
// Get element count.
SizeType c = *stack_.template Pop<SizeType>(1);
// If the array is not empty, count the last element.
@@ -1385,55 +2136,68 @@ private:
// Error flag has been set.
return;
}
-
+
switch (src) {
- case IterativeParsingStartState: RAPIDJSON_PARSE_ERROR(kParseErrorDocumentEmpty, is.Tell());
- case IterativeParsingFinishState: RAPIDJSON_PARSE_ERROR(kParseErrorDocumentRootNotSingular, is.Tell());
+ case IterativeParsingStartState: RAPIDJSON_PARSE_ERROR(kParseErrorDocumentEmpty, is.Tell()); return;
+ case IterativeParsingFinishState: RAPIDJSON_PARSE_ERROR(kParseErrorDocumentRootNotSingular, is.Tell()); return;
case IterativeParsingObjectInitialState:
- case IterativeParsingMemberDelimiterState: RAPIDJSON_PARSE_ERROR(kParseErrorObjectMissName, is.Tell());
- case IterativeParsingMemberKeyState: RAPIDJSON_PARSE_ERROR(kParseErrorObjectMissColon, is.Tell());
- case IterativeParsingMemberValueState: RAPIDJSON_PARSE_ERROR(kParseErrorObjectMissCommaOrCurlyBracket, is.Tell());
- case IterativeParsingElementState: RAPIDJSON_PARSE_ERROR(kParseErrorArrayMissCommaOrSquareBracket, is.Tell());
- default: RAPIDJSON_PARSE_ERROR(kParseErrorUnspecificSyntaxError, is.Tell());
- }
+ case IterativeParsingMemberDelimiterState: RAPIDJSON_PARSE_ERROR(kParseErrorObjectMissName, is.Tell()); return;
+ case IterativeParsingMemberKeyState: RAPIDJSON_PARSE_ERROR(kParseErrorObjectMissColon, is.Tell()); return;
+ case IterativeParsingMemberValueState: RAPIDJSON_PARSE_ERROR(kParseErrorObjectMissCommaOrCurlyBracket, is.Tell()); return;
+ case IterativeParsingKeyValueDelimiterState:
+ case IterativeParsingArrayInitialState:
+ case IterativeParsingElementDelimiterState: RAPIDJSON_PARSE_ERROR(kParseErrorValueInvalid, is.Tell()); return;
+ default: RAPIDJSON_ASSERT(src == IterativeParsingElementState); RAPIDJSON_PARSE_ERROR(kParseErrorArrayMissCommaOrSquareBracket, is.Tell()); return;
+ }
}
+ RAPIDJSON_FORCEINLINE bool IsIterativeParsingDelimiterState(IterativeParsingState s) {
+ return s >= IterativeParsingElementDelimiterState;
+ }
+
+ RAPIDJSON_FORCEINLINE bool IsIterativeParsingCompleteState(IterativeParsingState s) {
+ return s <= IterativeParsingErrorState;
+ }
+
template <unsigned parseFlags, typename InputStream, typename Handler>
ParseResult IterativeParse(InputStream& is, Handler& handler) {
parseResult_.Clear();
ClearStackOnExit scope(*this);
IterativeParsingState state = IterativeParsingStartState;
-
- SkipWhitespace(is);
+
+ SkipWhitespaceAndComments<parseFlags>(is);
+ RAPIDJSON_PARSE_ERROR_EARLY_RETURN(parseResult_);
while (is.Peek() != '\0') {
Token t = Tokenize(is.Peek());
IterativeParsingState n = Predict(state, t);
IterativeParsingState d = Transit<parseFlags>(state, t, n, is, handler);
-
+
if (d == IterativeParsingErrorState) {
HandleError(state, is);
break;
}
-
+
state = d;
-
+
// Do not further consume streams if a root JSON has been parsed.
if ((parseFlags & kParseStopWhenDoneFlag) && state == IterativeParsingFinishState)
break;
-
- SkipWhitespace(is);
+
+ SkipWhitespaceAndComments<parseFlags>(is);
+ RAPIDJSON_PARSE_ERROR_EARLY_RETURN(parseResult_);
}
-
+
// Handle the end of file.
if (state != IterativeParsingFinishState)
HandleError(state, is);
-
+
return parseResult_;
}
static const size_t kDefaultStackCapacity = 256; //!< Default stack capacity in bytes for storing a single decoded string.
internal::Stack<StackAllocator> stack_; //!< A stack for storing decoded string temporarily during non-destructive parsing.
ParseResult parseResult_;
+ IterativeParsingState state_;
}; // class GenericReader
//! Reader with UTF8 encoding and default allocator.
@@ -1441,6 +2205,11 @@ typedef GenericReader<UTF8<>, UTF8<> > Reader;
RAPIDJSON_NAMESPACE_END
+#ifdef __clang__
+RAPIDJSON_DIAG_POP
+#endif
+
+
#ifdef __GNUC__
RAPIDJSON_DIAG_POP
#endif
diff --git a/contrib/rapidjson/include/rapidjson/schema.h b/contrib/rapidjson/include/rapidjson/schema.h
new file mode 100644
index 000000000..abcf1a102
--- /dev/null
+++ b/contrib/rapidjson/include/rapidjson/schema.h
@@ -0,0 +1,2016 @@
+// Tencent is pleased to support the open source community by making RapidJSON available->
+//
+// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip-> All rights reserved->
+//
+// Licensed under the MIT License (the "License"); you may not use this file except
+// in compliance with the License-> You may obtain a copy of the License at
+//
+// http://opensource->org/licenses/MIT
+//
+// Unless required by applicable law or agreed to in writing, software distributed
+// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+// CONDITIONS OF ANY KIND, either express or implied-> See the License for the
+// specific language governing permissions and limitations under the License->
+
+#ifndef RAPIDJSON_SCHEMA_H_
+#define RAPIDJSON_SCHEMA_H_
+
+#include "document.h"
+#include "pointer.h"
+#include <cmath> // abs, floor
+
+#if !defined(RAPIDJSON_SCHEMA_USE_INTERNALREGEX)
+#define RAPIDJSON_SCHEMA_USE_INTERNALREGEX 1
+#else
+#define RAPIDJSON_SCHEMA_USE_INTERNALREGEX 0
+#endif
+
+#if !RAPIDJSON_SCHEMA_USE_INTERNALREGEX && !defined(RAPIDJSON_SCHEMA_USE_STDREGEX) && (__cplusplus >=201103L || (defined(_MSC_VER) && _MSC_VER >= 1800))
+#define RAPIDJSON_SCHEMA_USE_STDREGEX 1
+#else
+#define RAPIDJSON_SCHEMA_USE_STDREGEX 0
+#endif
+
+#if RAPIDJSON_SCHEMA_USE_INTERNALREGEX
+#include "internal/regex.h"
+#elif RAPIDJSON_SCHEMA_USE_STDREGEX
+#include <regex>
+#endif
+
+#if RAPIDJSON_SCHEMA_USE_INTERNALREGEX || RAPIDJSON_SCHEMA_USE_STDREGEX
+#define RAPIDJSON_SCHEMA_HAS_REGEX 1
+#else
+#define RAPIDJSON_SCHEMA_HAS_REGEX 0
+#endif
+
+#ifndef RAPIDJSON_SCHEMA_VERBOSE
+#define RAPIDJSON_SCHEMA_VERBOSE 0
+#endif
+
+#if RAPIDJSON_SCHEMA_VERBOSE
+#include "stringbuffer.h"
+#endif
+
+RAPIDJSON_DIAG_PUSH
+
+#if defined(__GNUC__)
+RAPIDJSON_DIAG_OFF(effc++)
+#endif
+
+#ifdef __clang__
+RAPIDJSON_DIAG_OFF(weak-vtables)
+RAPIDJSON_DIAG_OFF(exit-time-destructors)
+RAPIDJSON_DIAG_OFF(c++98-compat-pedantic)
+RAPIDJSON_DIAG_OFF(variadic-macros)
+#endif
+
+#ifdef _MSC_VER
+RAPIDJSON_DIAG_OFF(4512) // assignment operator could not be generated
+#endif
+
+RAPIDJSON_NAMESPACE_BEGIN
+
+///////////////////////////////////////////////////////////////////////////////
+// Verbose Utilities
+
+#if RAPIDJSON_SCHEMA_VERBOSE
+
+namespace internal {
+
+inline void PrintInvalidKeyword(const char* keyword) {
+ printf("Fail keyword: %s\n", keyword);
+}
+
+inline void PrintInvalidKeyword(const wchar_t* keyword) {
+ wprintf(L"Fail keyword: %ls\n", keyword);
+}
+
+inline void PrintInvalidDocument(const char* document) {
+ printf("Fail document: %s\n\n", document);
+}
+
+inline void PrintInvalidDocument(const wchar_t* document) {
+ wprintf(L"Fail document: %ls\n\n", document);
+}
+
+inline void PrintValidatorPointers(unsigned depth, const char* s, const char* d) {
+ printf("S: %*s%s\nD: %*s%s\n\n", depth * 4, " ", s, depth * 4, " ", d);
+}
+
+inline void PrintValidatorPointers(unsigned depth, const wchar_t* s, const wchar_t* d) {
+ wprintf(L"S: %*ls%ls\nD: %*ls%ls\n\n", depth * 4, L" ", s, depth * 4, L" ", d);
+}
+
+} // namespace internal
+
+#endif // RAPIDJSON_SCHEMA_VERBOSE
+
+///////////////////////////////////////////////////////////////////////////////
+// RAPIDJSON_INVALID_KEYWORD_RETURN
+
+#if RAPIDJSON_SCHEMA_VERBOSE
+#define RAPIDJSON_INVALID_KEYWORD_VERBOSE(keyword) internal::PrintInvalidKeyword(keyword)
+#else
+#define RAPIDJSON_INVALID_KEYWORD_VERBOSE(keyword)
+#endif
+
+#define RAPIDJSON_INVALID_KEYWORD_RETURN(keyword)\
+RAPIDJSON_MULTILINEMACRO_BEGIN\
+ context.invalidKeyword = keyword.GetString();\
+ RAPIDJSON_INVALID_KEYWORD_VERBOSE(keyword.GetString());\
+ return false;\
+RAPIDJSON_MULTILINEMACRO_END
+
+///////////////////////////////////////////////////////////////////////////////
+// Forward declarations
+
+template <typename ValueType, typename Allocator>
+class GenericSchemaDocument;
+
+namespace internal {
+
+template <typename SchemaDocumentType>
+class Schema;
+
+///////////////////////////////////////////////////////////////////////////////
+// ISchemaValidator
+
+class ISchemaValidator {
+public:
+ virtual ~ISchemaValidator() {}
+ virtual bool IsValid() const = 0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+// ISchemaStateFactory
+
+template <typename SchemaType>
+class ISchemaStateFactory {
+public:
+ virtual ~ISchemaStateFactory() {}
+ virtual ISchemaValidator* CreateSchemaValidator(const SchemaType&) = 0;
+ virtual void DestroySchemaValidator(ISchemaValidator* validator) = 0;
+ virtual void* CreateHasher() = 0;
+ virtual uint64_t GetHashCode(void* hasher) = 0;
+ virtual void DestroryHasher(void* hasher) = 0;
+ virtual void* MallocState(size_t size) = 0;
+ virtual void FreeState(void* p) = 0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+// Hasher
+
+// For comparison of compound value
+template<typename Encoding, typename Allocator>
+class Hasher {
+public:
+ typedef typename Encoding::Ch Ch;
+
+ Hasher(Allocator* allocator = 0, size_t stackCapacity = kDefaultSize) : stack_(allocator, stackCapacity) {}
+
+ bool Null() { return WriteType(kNullType); }
+ bool Bool(bool b) { return WriteType(b ? kTrueType : kFalseType); }
+ bool Int(int i) { Number n; n.u.i = i; n.d = static_cast<double>(i); return WriteNumber(n); }
+ bool Uint(unsigned u) { Number n; n.u.u = u; n.d = static_cast<double>(u); return WriteNumber(n); }
+ bool Int64(int64_t i) { Number n; n.u.i = i; n.d = static_cast<double>(i); return WriteNumber(n); }
+ bool Uint64(uint64_t u) { Number n; n.u.u = u; n.d = static_cast<double>(u); return WriteNumber(n); }
+ bool Double(double d) {
+ Number n;
+ if (d < 0) n.u.i = static_cast<int64_t>(d);
+ else n.u.u = static_cast<uint64_t>(d);
+ n.d = d;
+ return WriteNumber(n);
+ }
+
+ bool RawNumber(const Ch* str, SizeType len, bool) {
+ WriteBuffer(kNumberType, str, len * sizeof(Ch));
+ return true;
+ }
+
+ bool String(const Ch* str, SizeType len, bool) {
+ WriteBuffer(kStringType, str, len * sizeof(Ch));
+ return true;
+ }
+
+ bool StartObject() { return true; }
+ bool Key(const Ch* str, SizeType len, bool copy) { return String(str, len, copy); }
+ bool EndObject(SizeType memberCount) {
+ uint64_t h = Hash(0, kObjectType);
+ uint64_t* kv = stack_.template Pop<uint64_t>(memberCount * 2);
+ for (SizeType i = 0; i < memberCount; i++)
+ h ^= Hash(kv[i * 2], kv[i * 2 + 1]); // Use xor to achieve member order insensitive
+ *stack_.template Push<uint64_t>() = h;
+ return true;
+ }
+
+ bool StartArray() { return true; }
+ bool EndArray(SizeType elementCount) {
+ uint64_t h = Hash(0, kArrayType);
+ uint64_t* e = stack_.template Pop<uint64_t>(elementCount);
+ for (SizeType i = 0; i < elementCount; i++)
+ h = Hash(h, e[i]); // Use hash to achieve element order sensitive
+ *stack_.template Push<uint64_t>() = h;
+ return true;
+ }
+
+ bool IsValid() const { return stack_.GetSize() == sizeof(uint64_t); }
+
+ uint64_t GetHashCode() const {
+ RAPIDJSON_ASSERT(IsValid());
+ return *stack_.template Top<uint64_t>();
+ }
+
+private:
+ static const size_t kDefaultSize = 256;
+ struct Number {
+ union U {
+ uint64_t u;
+ int64_t i;
+ }u;
+ double d;
+ };
+
+ bool WriteType(Type type) { return WriteBuffer(type, 0, 0); }
+
+ bool WriteNumber(const Number& n) { return WriteBuffer(kNumberType, &n, sizeof(n)); }
+
+ bool WriteBuffer(Type type, const void* data, size_t len) {
+ // FNV-1a from http://isthe.com/chongo/tech/comp/fnv/
+ uint64_t h = Hash(RAPIDJSON_UINT64_C2(0x84222325, 0xcbf29ce4), type);
+ const unsigned char* d = static_cast<const unsigned char*>(data);
+ for (size_t i = 0; i < len; i++)
+ h = Hash(h, d[i]);
+ *stack_.template Push<uint64_t>() = h;
+ return true;
+ }
+
+ static uint64_t Hash(uint64_t h, uint64_t d) {
+ static const uint64_t kPrime = RAPIDJSON_UINT64_C2(0x00000100, 0x000001b3);
+ h ^= d;
+ h *= kPrime;
+ return h;
+ }
+
+ Stack<Allocator> stack_;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+// SchemaValidationContext
+
+template <typename SchemaDocumentType>
+struct SchemaValidationContext {
+ typedef Schema<SchemaDocumentType> SchemaType;
+ typedef ISchemaStateFactory<SchemaType> SchemaValidatorFactoryType;
+ typedef typename SchemaType::ValueType ValueType;
+ typedef typename ValueType::Ch Ch;
+
+ enum PatternValidatorType {
+ kPatternValidatorOnly,
+ kPatternValidatorWithProperty,
+ kPatternValidatorWithAdditionalProperty
+ };
+
+ SchemaValidationContext(SchemaValidatorFactoryType& f, const SchemaType* s) :
+ factory(f),
+ schema(s),
+ valueSchema(),
+ invalidKeyword(),
+ hasher(),
+ arrayElementHashCodes(),
+ validators(),
+ validatorCount(),
+ patternPropertiesValidators(),
+ patternPropertiesValidatorCount(),
+ patternPropertiesSchemas(),
+ patternPropertiesSchemaCount(),
+ valuePatternValidatorType(kPatternValidatorOnly),
+ propertyExist(),
+ inArray(false),
+ valueUniqueness(false),
+ arrayUniqueness(false)
+ {
+ }
+
+ ~SchemaValidationContext() {
+ if (hasher)
+ factory.DestroryHasher(hasher);
+ if (validators) {
+ for (SizeType i = 0; i < validatorCount; i++)
+ factory.DestroySchemaValidator(validators[i]);
+ factory.FreeState(validators);
+ }
+ if (patternPropertiesValidators) {
+ for (SizeType i = 0; i < patternPropertiesValidatorCount; i++)
+ factory.DestroySchemaValidator(patternPropertiesValidators[i]);
+ factory.FreeState(patternPropertiesValidators);
+ }
+ if (patternPropertiesSchemas)
+ factory.FreeState(patternPropertiesSchemas);
+ if (propertyExist)
+ factory.FreeState(propertyExist);
+ }
+
+ SchemaValidatorFactoryType& factory;
+ const SchemaType* schema;
+ const SchemaType* valueSchema;
+ const Ch* invalidKeyword;
+ void* hasher; // Only validator access
+ void* arrayElementHashCodes; // Only validator access this
+ ISchemaValidator** validators;
+ SizeType validatorCount;
+ ISchemaValidator** patternPropertiesValidators;
+ SizeType patternPropertiesValidatorCount;
+ const SchemaType** patternPropertiesSchemas;
+ SizeType patternPropertiesSchemaCount;
+ PatternValidatorType valuePatternValidatorType;
+ PatternValidatorType objectPatternValidatorType;
+ SizeType arrayElementIndex;
+ bool* propertyExist;
+ bool inArray;
+ bool valueUniqueness;
+ bool arrayUniqueness;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+// Schema
+
+template <typename SchemaDocumentType>
+class Schema {
+public:
+ typedef typename SchemaDocumentType::ValueType ValueType;
+ typedef typename SchemaDocumentType::AllocatorType AllocatorType;
+ typedef typename SchemaDocumentType::PointerType PointerType;
+ typedef typename ValueType::EncodingType EncodingType;
+ typedef typename EncodingType::Ch Ch;
+ typedef SchemaValidationContext<SchemaDocumentType> Context;
+ typedef Schema<SchemaDocumentType> SchemaType;
+ typedef GenericValue<EncodingType, AllocatorType> SValue;
+ friend class GenericSchemaDocument<ValueType, AllocatorType>;
+
+ Schema(SchemaDocumentType* schemaDocument, const PointerType& p, const ValueType& value, const ValueType& document, AllocatorType* allocator) :
+ allocator_(allocator),
+ typeless_(schemaDocument->GetTypeless()),
+ enum_(),
+ enumCount_(),
+ not_(),
+ type_((1 << kTotalSchemaType) - 1), // typeless
+ validatorCount_(),
+ properties_(),
+ additionalPropertiesSchema_(),
+ patternProperties_(),
+ patternPropertyCount_(),
+ propertyCount_(),
+ minProperties_(),
+ maxProperties_(SizeType(~0)),
+ additionalProperties_(true),
+ hasDependencies_(),
+ hasRequired_(),
+ hasSchemaDependencies_(),
+ additionalItemsSchema_(),
+ itemsList_(),
+ itemsTuple_(),
+ itemsTupleCount_(),
+ minItems_(),
+ maxItems_(SizeType(~0)),
+ additionalItems_(true),
+ uniqueItems_(false),
+ pattern_(),
+ minLength_(0),
+ maxLength_(~SizeType(0)),
+ exclusiveMinimum_(false),
+ exclusiveMaximum_(false)
+ {
+ typedef typename SchemaDocumentType::ValueType ValueType;
+ typedef typename ValueType::ConstValueIterator ConstValueIterator;
+ typedef typename ValueType::ConstMemberIterator ConstMemberIterator;
+
+ if (!value.IsObject())
+ return;
+
+ if (const ValueType* v = GetMember(value, GetTypeString())) {
+ type_ = 0;
+ if (v->IsString())
+ AddType(*v);
+ else if (v->IsArray())
+ for (ConstValueIterator itr = v->Begin(); itr != v->End(); ++itr)
+ AddType(*itr);
+ }
+
+ if (const ValueType* v = GetMember(value, GetEnumString()))
+ if (v->IsArray() && v->Size() > 0) {
+ enum_ = static_cast<uint64_t*>(allocator_->Malloc(sizeof(uint64_t) * v->Size()));
+ for (ConstValueIterator itr = v->Begin(); itr != v->End(); ++itr) {
+ typedef Hasher<EncodingType, MemoryPoolAllocator<> > EnumHasherType;
+ char buffer[256 + 24];
+ MemoryPoolAllocator<> hasherAllocator(buffer, sizeof(buffer));
+ EnumHasherType h(&hasherAllocator, 256);
+ itr->Accept(h);
+ enum_[enumCount_++] = h.GetHashCode();
+ }
+ }
+
+ if (schemaDocument) {
+ AssignIfExist(allOf_, *schemaDocument, p, value, GetAllOfString(), document);
+ AssignIfExist(anyOf_, *schemaDocument, p, value, GetAnyOfString(), document);
+ AssignIfExist(oneOf_, *schemaDocument, p, value, GetOneOfString(), document);
+ }
+
+ if (const ValueType* v = GetMember(value, GetNotString())) {
+ schemaDocument->CreateSchema(&not_, p.Append(GetNotString(), allocator_), *v, document);
+ notValidatorIndex_ = validatorCount_;
+ validatorCount_++;
+ }
+
+ // Object
+
+ const ValueType* properties = GetMember(value, GetPropertiesString());
+ const ValueType* required = GetMember(value, GetRequiredString());
+ const ValueType* dependencies = GetMember(value, GetDependenciesString());
+ {
+ // Gather properties from properties/required/dependencies
+ SValue allProperties(kArrayType);
+
+ if (properties && properties->IsObject())
+ for (ConstMemberIterator itr = properties->MemberBegin(); itr != properties->MemberEnd(); ++itr)
+ AddUniqueElement(allProperties, itr->name);
+
+ if (required && required->IsArray())
+ for (ConstValueIterator itr = required->Begin(); itr != required->End(); ++itr)
+ if (itr->IsString())
+ AddUniqueElement(allProperties, *itr);
+
+ if (dependencies && dependencies->IsObject())
+ for (ConstMemberIterator itr = dependencies->MemberBegin(); itr != dependencies->MemberEnd(); ++itr) {
+ AddUniqueElement(allProperties, itr->name);
+ if (itr->value.IsArray())
+ for (ConstValueIterator i = itr->value.Begin(); i != itr->value.End(); ++i)
+ if (i->IsString())
+ AddUniqueElement(allProperties, *i);
+ }
+
+ if (allProperties.Size() > 0) {
+ propertyCount_ = allProperties.Size();
+ properties_ = static_cast<Property*>(allocator_->Malloc(sizeof(Property) * propertyCount_));
+ for (SizeType i = 0; i < propertyCount_; i++) {
+ new (&properties_[i]) Property();
+ properties_[i].name = allProperties[i];
+ properties_[i].schema = typeless_;
+ }
+ }
+ }
+
+ if (properties && properties->IsObject()) {
+ PointerType q = p.Append(GetPropertiesString(), allocator_);
+ for (ConstMemberIterator itr = properties->MemberBegin(); itr != properties->MemberEnd(); ++itr) {
+ SizeType index;
+ if (FindPropertyIndex(itr->name, &index))
+ schemaDocument->CreateSchema(&properties_[index].schema, q.Append(itr->name, allocator_), itr->value, document);
+ }
+ }
+
+ if (const ValueType* v = GetMember(value, GetPatternPropertiesString())) {
+ PointerType q = p.Append(GetPatternPropertiesString(), allocator_);
+ patternProperties_ = static_cast<PatternProperty*>(allocator_->Malloc(sizeof(PatternProperty) * v->MemberCount()));
+ patternPropertyCount_ = 0;
+
+ for (ConstMemberIterator itr = v->MemberBegin(); itr != v->MemberEnd(); ++itr) {
+ new (&patternProperties_[patternPropertyCount_]) PatternProperty();
+ patternProperties_[patternPropertyCount_].pattern = CreatePattern(itr->name);
+ schemaDocument->CreateSchema(&patternProperties_[patternPropertyCount_].schema, q.Append(itr->name, allocator_), itr->value, document);
+ patternPropertyCount_++;
+ }
+ }
+
+ if (required && required->IsArray())
+ for (ConstValueIterator itr = required->Begin(); itr != required->End(); ++itr)
+ if (itr->IsString()) {
+ SizeType index;
+ if (FindPropertyIndex(*itr, &index)) {
+ properties_[index].required = true;
+ hasRequired_ = true;
+ }
+ }
+
+ if (dependencies && dependencies->IsObject()) {
+ PointerType q = p.Append(GetDependenciesString(), allocator_);
+ hasDependencies_ = true;
+ for (ConstMemberIterator itr = dependencies->MemberBegin(); itr != dependencies->MemberEnd(); ++itr) {
+ SizeType sourceIndex;
+ if (FindPropertyIndex(itr->name, &sourceIndex)) {
+ if (itr->value.IsArray()) {
+ properties_[sourceIndex].dependencies = static_cast<bool*>(allocator_->Malloc(sizeof(bool) * propertyCount_));
+ std::memset(properties_[sourceIndex].dependencies, 0, sizeof(bool)* propertyCount_);
+ for (ConstValueIterator targetItr = itr->value.Begin(); targetItr != itr->value.End(); ++targetItr) {
+ SizeType targetIndex;
+ if (FindPropertyIndex(*targetItr, &targetIndex))
+ properties_[sourceIndex].dependencies[targetIndex] = true;
+ }
+ }
+ else if (itr->value.IsObject()) {
+ hasSchemaDependencies_ = true;
+ schemaDocument->CreateSchema(&properties_[sourceIndex].dependenciesSchema, q.Append(itr->name, allocator_), itr->value, document);
+ properties_[sourceIndex].dependenciesValidatorIndex = validatorCount_;
+ validatorCount_++;
+ }
+ }
+ }
+ }
+
+ if (const ValueType* v = GetMember(value, GetAdditionalPropertiesString())) {
+ if (v->IsBool())
+ additionalProperties_ = v->GetBool();
+ else if (v->IsObject())
+ schemaDocument->CreateSchema(&additionalPropertiesSchema_, p.Append(GetAdditionalPropertiesString(), allocator_), *v, document);
+ }
+
+ AssignIfExist(minProperties_, value, GetMinPropertiesString());
+ AssignIfExist(maxProperties_, value, GetMaxPropertiesString());
+
+ // Array
+ if (const ValueType* v = GetMember(value, GetItemsString())) {
+ PointerType q = p.Append(GetItemsString(), allocator_);
+ if (v->IsObject()) // List validation
+ schemaDocument->CreateSchema(&itemsList_, q, *v, document);
+ else if (v->IsArray()) { // Tuple validation
+ itemsTuple_ = static_cast<const Schema**>(allocator_->Malloc(sizeof(const Schema*) * v->Size()));
+ SizeType index = 0;
+ for (ConstValueIterator itr = v->Begin(); itr != v->End(); ++itr, index++)
+ schemaDocument->CreateSchema(&itemsTuple_[itemsTupleCount_++], q.Append(index, allocator_), *itr, document);
+ }
+ }
+
+ AssignIfExist(minItems_, value, GetMinItemsString());
+ AssignIfExist(maxItems_, value, GetMaxItemsString());
+
+ if (const ValueType* v = GetMember(value, GetAdditionalItemsString())) {
+ if (v->IsBool())
+ additionalItems_ = v->GetBool();
+ else if (v->IsObject())
+ schemaDocument->CreateSchema(&additionalItemsSchema_, p.Append(GetAdditionalItemsString(), allocator_), *v, document);
+ }
+
+ AssignIfExist(uniqueItems_, value, GetUniqueItemsString());
+
+ // String
+ AssignIfExist(minLength_, value, GetMinLengthString());
+ AssignIfExist(maxLength_, value, GetMaxLengthString());
+
+ if (const ValueType* v = GetMember(value, GetPatternString()))
+ pattern_ = CreatePattern(*v);
+
+ // Number
+ if (const ValueType* v = GetMember(value, GetMinimumString()))
+ if (v->IsNumber())
+ minimum_.CopyFrom(*v, *allocator_);
+
+ if (const ValueType* v = GetMember(value, GetMaximumString()))
+ if (v->IsNumber())
+ maximum_.CopyFrom(*v, *allocator_);
+
+ AssignIfExist(exclusiveMinimum_, value, GetExclusiveMinimumString());
+ AssignIfExist(exclusiveMaximum_, value, GetExclusiveMaximumString());
+
+ if (const ValueType* v = GetMember(value, GetMultipleOfString()))
+ if (v->IsNumber() && v->GetDouble() > 0.0)
+ multipleOf_.CopyFrom(*v, *allocator_);
+ }
+
+ ~Schema() {
+ AllocatorType::Free(enum_);
+ if (properties_) {
+ for (SizeType i = 0; i < propertyCount_; i++)
+ properties_[i].~Property();
+ AllocatorType::Free(properties_);
+ }
+ if (patternProperties_) {
+ for (SizeType i = 0; i < patternPropertyCount_; i++)
+ patternProperties_[i].~PatternProperty();
+ AllocatorType::Free(patternProperties_);
+ }
+ AllocatorType::Free(itemsTuple_);
+#if RAPIDJSON_SCHEMA_HAS_REGEX
+ if (pattern_) {
+ pattern_->~RegexType();
+ AllocatorType::Free(pattern_);
+ }
+#endif
+ }
+
+ bool BeginValue(Context& context) const {
+ if (context.inArray) {
+ if (uniqueItems_)
+ context.valueUniqueness = true;
+
+ if (itemsList_)
+ context.valueSchema = itemsList_;
+ else if (itemsTuple_) {
+ if (context.arrayElementIndex < itemsTupleCount_)
+ context.valueSchema = itemsTuple_[context.arrayElementIndex];
+ else if (additionalItemsSchema_)
+ context.valueSchema = additionalItemsSchema_;
+ else if (additionalItems_)
+ context.valueSchema = typeless_;
+ else
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetItemsString());
+ }
+ else
+ context.valueSchema = typeless_;
+
+ context.arrayElementIndex++;
+ }
+ return true;
+ }
+
+ RAPIDJSON_FORCEINLINE bool EndValue(Context& context) const {
+ if (context.patternPropertiesValidatorCount > 0) {
+ bool otherValid = false;
+ SizeType count = context.patternPropertiesValidatorCount;
+ if (context.objectPatternValidatorType != Context::kPatternValidatorOnly)
+ otherValid = context.patternPropertiesValidators[--count]->IsValid();
+
+ bool patternValid = true;
+ for (SizeType i = 0; i < count; i++)
+ if (!context.patternPropertiesValidators[i]->IsValid()) {
+ patternValid = false;
+ break;
+ }
+
+ if (context.objectPatternValidatorType == Context::kPatternValidatorOnly) {
+ if (!patternValid)
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetPatternPropertiesString());
+ }
+ else if (context.objectPatternValidatorType == Context::kPatternValidatorWithProperty) {
+ if (!patternValid || !otherValid)
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetPatternPropertiesString());
+ }
+ else if (!patternValid && !otherValid) // kPatternValidatorWithAdditionalProperty)
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetPatternPropertiesString());
+ }
+
+ if (enum_) {
+ const uint64_t h = context.factory.GetHashCode(context.hasher);
+ for (SizeType i = 0; i < enumCount_; i++)
+ if (enum_[i] == h)
+ goto foundEnum;
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetEnumString());
+ foundEnum:;
+ }
+
+ if (allOf_.schemas)
+ for (SizeType i = allOf_.begin; i < allOf_.begin + allOf_.count; i++)
+ if (!context.validators[i]->IsValid())
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetAllOfString());
+
+ if (anyOf_.schemas) {
+ for (SizeType i = anyOf_.begin; i < anyOf_.begin + anyOf_.count; i++)
+ if (context.validators[i]->IsValid())
+ goto foundAny;
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetAnyOfString());
+ foundAny:;
+ }
+
+ if (oneOf_.schemas) {
+ bool oneValid = false;
+ for (SizeType i = oneOf_.begin; i < oneOf_.begin + oneOf_.count; i++)
+ if (context.validators[i]->IsValid()) {
+ if (oneValid)
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetOneOfString());
+ else
+ oneValid = true;
+ }
+ if (!oneValid)
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetOneOfString());
+ }
+
+ if (not_ && context.validators[notValidatorIndex_]->IsValid())
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetNotString());
+
+ return true;
+ }
+
+ bool Null(Context& context) const {
+ if (!(type_ & (1 << kNullSchemaType)))
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetTypeString());
+ return CreateParallelValidator(context);
+ }
+
+ bool Bool(Context& context, bool) const {
+ if (!(type_ & (1 << kBooleanSchemaType)))
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetTypeString());
+ return CreateParallelValidator(context);
+ }
+
+ bool Int(Context& context, int i) const {
+ if (!CheckInt(context, i))
+ return false;
+ return CreateParallelValidator(context);
+ }
+
+ bool Uint(Context& context, unsigned u) const {
+ if (!CheckUint(context, u))
+ return false;
+ return CreateParallelValidator(context);
+ }
+
+ bool Int64(Context& context, int64_t i) const {
+ if (!CheckInt(context, i))
+ return false;
+ return CreateParallelValidator(context);
+ }
+
+ bool Uint64(Context& context, uint64_t u) const {
+ if (!CheckUint(context, u))
+ return false;
+ return CreateParallelValidator(context);
+ }
+
+ bool Double(Context& context, double d) const {
+ if (!(type_ & (1 << kNumberSchemaType)))
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetTypeString());
+
+ if (!minimum_.IsNull() && !CheckDoubleMinimum(context, d))
+ return false;
+
+ if (!maximum_.IsNull() && !CheckDoubleMaximum(context, d))
+ return false;
+
+ if (!multipleOf_.IsNull() && !CheckDoubleMultipleOf(context, d))
+ return false;
+
+ return CreateParallelValidator(context);
+ }
+
+ bool String(Context& context, const Ch* str, SizeType length, bool) const {
+ if (!(type_ & (1 << kStringSchemaType)))
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetTypeString());
+
+ if (minLength_ != 0 || maxLength_ != SizeType(~0)) {
+ SizeType count;
+ if (internal::CountStringCodePoint<EncodingType>(str, length, &count)) {
+ if (count < minLength_)
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetMinLengthString());
+ if (count > maxLength_)
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetMaxLengthString());
+ }
+ }
+
+ if (pattern_ && !IsPatternMatch(pattern_, str, length))
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetPatternString());
+
+ return CreateParallelValidator(context);
+ }
+
+ bool StartObject(Context& context) const {
+ if (!(type_ & (1 << kObjectSchemaType)))
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetTypeString());
+
+ if (hasDependencies_ || hasRequired_) {
+ context.propertyExist = static_cast<bool*>(context.factory.MallocState(sizeof(bool) * propertyCount_));
+ std::memset(context.propertyExist, 0, sizeof(bool) * propertyCount_);
+ }
+
+ if (patternProperties_) { // pre-allocate schema array
+ SizeType count = patternPropertyCount_ + 1; // extra for valuePatternValidatorType
+ context.patternPropertiesSchemas = static_cast<const SchemaType**>(context.factory.MallocState(sizeof(const SchemaType*) * count));
+ context.patternPropertiesSchemaCount = 0;
+ std::memset(context.patternPropertiesSchemas, 0, sizeof(SchemaType*) * count);
+ }
+
+ return CreateParallelValidator(context);
+ }
+
+ bool Key(Context& context, const Ch* str, SizeType len, bool) const {
+ if (patternProperties_) {
+ context.patternPropertiesSchemaCount = 0;
+ for (SizeType i = 0; i < patternPropertyCount_; i++)
+ if (patternProperties_[i].pattern && IsPatternMatch(patternProperties_[i].pattern, str, len)) {
+ context.patternPropertiesSchemas[context.patternPropertiesSchemaCount++] = patternProperties_[i].schema;
+ context.valueSchema = typeless_;
+ }
+ }
+
+ SizeType index;
+ if (FindPropertyIndex(ValueType(str, len).Move(), &index)) {
+ if (context.patternPropertiesSchemaCount > 0) {
+ context.patternPropertiesSchemas[context.patternPropertiesSchemaCount++] = properties_[index].schema;
+ context.valueSchema = typeless_;
+ context.valuePatternValidatorType = Context::kPatternValidatorWithProperty;
+ }
+ else
+ context.valueSchema = properties_[index].schema;
+
+ if (context.propertyExist)
+ context.propertyExist[index] = true;
+
+ return true;
+ }
+
+ if (additionalPropertiesSchema_) {
+ if (additionalPropertiesSchema_ && context.patternPropertiesSchemaCount > 0) {
+ context.patternPropertiesSchemas[context.patternPropertiesSchemaCount++] = additionalPropertiesSchema_;
+ context.valueSchema = typeless_;
+ context.valuePatternValidatorType = Context::kPatternValidatorWithAdditionalProperty;
+ }
+ else
+ context.valueSchema = additionalPropertiesSchema_;
+ return true;
+ }
+ else if (additionalProperties_) {
+ context.valueSchema = typeless_;
+ return true;
+ }
+
+ if (context.patternPropertiesSchemaCount == 0) // patternProperties are not additional properties
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetAdditionalPropertiesString());
+
+ return true;
+ }
+
+ bool EndObject(Context& context, SizeType memberCount) const {
+ if (hasRequired_)
+ for (SizeType index = 0; index < propertyCount_; index++)
+ if (properties_[index].required)
+ if (!context.propertyExist[index])
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetRequiredString());
+
+ if (memberCount < minProperties_)
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetMinPropertiesString());
+
+ if (memberCount > maxProperties_)
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetMaxPropertiesString());
+
+ if (hasDependencies_) {
+ for (SizeType sourceIndex = 0; sourceIndex < propertyCount_; sourceIndex++)
+ if (context.propertyExist[sourceIndex]) {
+ if (properties_[sourceIndex].dependencies) {
+ for (SizeType targetIndex = 0; targetIndex < propertyCount_; targetIndex++)
+ if (properties_[sourceIndex].dependencies[targetIndex] && !context.propertyExist[targetIndex])
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetDependenciesString());
+ }
+ else if (properties_[sourceIndex].dependenciesSchema)
+ if (!context.validators[properties_[sourceIndex].dependenciesValidatorIndex]->IsValid())
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetDependenciesString());
+ }
+ }
+
+ return true;
+ }
+
+ bool StartArray(Context& context) const {
+ if (!(type_ & (1 << kArraySchemaType)))
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetTypeString());
+
+ context.arrayElementIndex = 0;
+ context.inArray = true;
+
+ return CreateParallelValidator(context);
+ }
+
+ bool EndArray(Context& context, SizeType elementCount) const {
+ context.inArray = false;
+
+ if (elementCount < minItems_)
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetMinItemsString());
+
+ if (elementCount > maxItems_)
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetMaxItemsString());
+
+ return true;
+ }
+
+ // Generate functions for string literal according to Ch
+#define RAPIDJSON_STRING_(name, ...) \
+ static const ValueType& Get##name##String() {\
+ static const Ch s[] = { __VA_ARGS__, '\0' };\
+ static const ValueType v(s, static_cast<SizeType>(sizeof(s) / sizeof(Ch) - 1));\
+ return v;\
+ }
+
+ RAPIDJSON_STRING_(Null, 'n', 'u', 'l', 'l')
+ RAPIDJSON_STRING_(Boolean, 'b', 'o', 'o', 'l', 'e', 'a', 'n')
+ RAPIDJSON_STRING_(Object, 'o', 'b', 'j', 'e', 'c', 't')
+ RAPIDJSON_STRING_(Array, 'a', 'r', 'r', 'a', 'y')
+ RAPIDJSON_STRING_(String, 's', 't', 'r', 'i', 'n', 'g')
+ RAPIDJSON_STRING_(Number, 'n', 'u', 'm', 'b', 'e', 'r')
+ RAPIDJSON_STRING_(Integer, 'i', 'n', 't', 'e', 'g', 'e', 'r')
+ RAPIDJSON_STRING_(Type, 't', 'y', 'p', 'e')
+ RAPIDJSON_STRING_(Enum, 'e', 'n', 'u', 'm')
+ RAPIDJSON_STRING_(AllOf, 'a', 'l', 'l', 'O', 'f')
+ RAPIDJSON_STRING_(AnyOf, 'a', 'n', 'y', 'O', 'f')
+ RAPIDJSON_STRING_(OneOf, 'o', 'n', 'e', 'O', 'f')
+ RAPIDJSON_STRING_(Not, 'n', 'o', 't')
+ RAPIDJSON_STRING_(Properties, 'p', 'r', 'o', 'p', 'e', 'r', 't', 'i', 'e', 's')
+ RAPIDJSON_STRING_(Required, 'r', 'e', 'q', 'u', 'i', 'r', 'e', 'd')
+ RAPIDJSON_STRING_(Dependencies, 'd', 'e', 'p', 'e', 'n', 'd', 'e', 'n', 'c', 'i', 'e', 's')
+ RAPIDJSON_STRING_(PatternProperties, 'p', 'a', 't', 't', 'e', 'r', 'n', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'i', 'e', 's')
+ RAPIDJSON_STRING_(AdditionalProperties, 'a', 'd', 'd', 'i', 't', 'i', 'o', 'n', 'a', 'l', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'i', 'e', 's')
+ RAPIDJSON_STRING_(MinProperties, 'm', 'i', 'n', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'i', 'e', 's')
+ RAPIDJSON_STRING_(MaxProperties, 'm', 'a', 'x', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'i', 'e', 's')
+ RAPIDJSON_STRING_(Items, 'i', 't', 'e', 'm', 's')
+ RAPIDJSON_STRING_(MinItems, 'm', 'i', 'n', 'I', 't', 'e', 'm', 's')
+ RAPIDJSON_STRING_(MaxItems, 'm', 'a', 'x', 'I', 't', 'e', 'm', 's')
+ RAPIDJSON_STRING_(AdditionalItems, 'a', 'd', 'd', 'i', 't', 'i', 'o', 'n', 'a', 'l', 'I', 't', 'e', 'm', 's')
+ RAPIDJSON_STRING_(UniqueItems, 'u', 'n', 'i', 'q', 'u', 'e', 'I', 't', 'e', 'm', 's')
+ RAPIDJSON_STRING_(MinLength, 'm', 'i', 'n', 'L', 'e', 'n', 'g', 't', 'h')
+ RAPIDJSON_STRING_(MaxLength, 'm', 'a', 'x', 'L', 'e', 'n', 'g', 't', 'h')
+ RAPIDJSON_STRING_(Pattern, 'p', 'a', 't', 't', 'e', 'r', 'n')
+ RAPIDJSON_STRING_(Minimum, 'm', 'i', 'n', 'i', 'm', 'u', 'm')
+ RAPIDJSON_STRING_(Maximum, 'm', 'a', 'x', 'i', 'm', 'u', 'm')
+ RAPIDJSON_STRING_(ExclusiveMinimum, 'e', 'x', 'c', 'l', 'u', 's', 'i', 'v', 'e', 'M', 'i', 'n', 'i', 'm', 'u', 'm')
+ RAPIDJSON_STRING_(ExclusiveMaximum, 'e', 'x', 'c', 'l', 'u', 's', 'i', 'v', 'e', 'M', 'a', 'x', 'i', 'm', 'u', 'm')
+ RAPIDJSON_STRING_(MultipleOf, 'm', 'u', 'l', 't', 'i', 'p', 'l', 'e', 'O', 'f')
+
+#undef RAPIDJSON_STRING_
+
+private:
+ enum SchemaValueType {
+ kNullSchemaType,
+ kBooleanSchemaType,
+ kObjectSchemaType,
+ kArraySchemaType,
+ kStringSchemaType,
+ kNumberSchemaType,
+ kIntegerSchemaType,
+ kTotalSchemaType
+ };
+
+#if RAPIDJSON_SCHEMA_USE_INTERNALREGEX
+ typedef internal::GenericRegex<EncodingType> RegexType;
+#elif RAPIDJSON_SCHEMA_USE_STDREGEX
+ typedef std::basic_regex<Ch> RegexType;
+#else
+ typedef char RegexType;
+#endif
+
+ struct SchemaArray {
+ SchemaArray() : schemas(), count() {}
+ ~SchemaArray() { AllocatorType::Free(schemas); }
+ const SchemaType** schemas;
+ SizeType begin; // begin index of context.validators
+ SizeType count;
+ };
+
+ template <typename V1, typename V2>
+ void AddUniqueElement(V1& a, const V2& v) {
+ for (typename V1::ConstValueIterator itr = a.Begin(); itr != a.End(); ++itr)
+ if (*itr == v)
+ return;
+ V1 c(v, *allocator_);
+ a.PushBack(c, *allocator_);
+ }
+
+ static const ValueType* GetMember(const ValueType& value, const ValueType& name) {
+ typename ValueType::ConstMemberIterator itr = value.FindMember(name);
+ return itr != value.MemberEnd() ? &(itr->value) : 0;
+ }
+
+ static void AssignIfExist(bool& out, const ValueType& value, const ValueType& name) {
+ if (const ValueType* v = GetMember(value, name))
+ if (v->IsBool())
+ out = v->GetBool();
+ }
+
+ static void AssignIfExist(SizeType& out, const ValueType& value, const ValueType& name) {
+ if (const ValueType* v = GetMember(value, name))
+ if (v->IsUint64() && v->GetUint64() <= SizeType(~0))
+ out = static_cast<SizeType>(v->GetUint64());
+ }
+
+ void AssignIfExist(SchemaArray& out, SchemaDocumentType& schemaDocument, const PointerType& p, const ValueType& value, const ValueType& name, const ValueType& document) {
+ if (const ValueType* v = GetMember(value, name)) {
+ if (v->IsArray() && v->Size() > 0) {
+ PointerType q = p.Append(name, allocator_);
+ out.count = v->Size();
+ out.schemas = static_cast<const Schema**>(allocator_->Malloc(out.count * sizeof(const Schema*)));
+ memset(out.schemas, 0, sizeof(Schema*)* out.count);
+ for (SizeType i = 0; i < out.count; i++)
+ schemaDocument.CreateSchema(&out.schemas[i], q.Append(i, allocator_), (*v)[i], document);
+ out.begin = validatorCount_;
+ validatorCount_ += out.count;
+ }
+ }
+ }
+
+#if RAPIDJSON_SCHEMA_USE_INTERNALREGEX
+ template <typename ValueType>
+ RegexType* CreatePattern(const ValueType& value) {
+ if (value.IsString()) {
+ RegexType* r = new (allocator_->Malloc(sizeof(RegexType))) RegexType(value.GetString());
+ if (!r->IsValid()) {
+ r->~RegexType();
+ AllocatorType::Free(r);
+ r = 0;
+ }
+ return r;
+ }
+ return 0;
+ }
+
+ static bool IsPatternMatch(const RegexType* pattern, const Ch *str, SizeType) {
+ GenericRegexSearch<RegexType> rs(*pattern);
+ return rs.Search(str);
+ }
+#elif RAPIDJSON_SCHEMA_USE_STDREGEX
+ template <typename ValueType>
+ RegexType* CreatePattern(const ValueType& value) {
+ if (value.IsString())
+ try {
+ return new (allocator_->Malloc(sizeof(RegexType))) RegexType(value.GetString(), std::size_t(value.GetStringLength()), std::regex_constants::ECMAScript);
+ }
+ catch (const std::regex_error&) {
+ }
+ return 0;
+ }
+
+ static bool IsPatternMatch(const RegexType* pattern, const Ch *str, SizeType length) {
+ std::match_results<const Ch*> r;
+ return std::regex_search(str, str + length, r, *pattern);
+ }
+#else
+ template <typename ValueType>
+ RegexType* CreatePattern(const ValueType&) { return 0; }
+
+ static bool IsPatternMatch(const RegexType*, const Ch *, SizeType) { return true; }
+#endif // RAPIDJSON_SCHEMA_USE_STDREGEX
+
+ void AddType(const ValueType& type) {
+ if (type == GetNullString() ) type_ |= 1 << kNullSchemaType;
+ else if (type == GetBooleanString()) type_ |= 1 << kBooleanSchemaType;
+ else if (type == GetObjectString() ) type_ |= 1 << kObjectSchemaType;
+ else if (type == GetArrayString() ) type_ |= 1 << kArraySchemaType;
+ else if (type == GetStringString() ) type_ |= 1 << kStringSchemaType;
+ else if (type == GetIntegerString()) type_ |= 1 << kIntegerSchemaType;
+ else if (type == GetNumberString() ) type_ |= (1 << kNumberSchemaType) | (1 << kIntegerSchemaType);
+ }
+
+ bool CreateParallelValidator(Context& context) const {
+ if (enum_ || context.arrayUniqueness)
+ context.hasher = context.factory.CreateHasher();
+
+ if (validatorCount_) {
+ RAPIDJSON_ASSERT(context.validators == 0);
+ context.validators = static_cast<ISchemaValidator**>(context.factory.MallocState(sizeof(ISchemaValidator*) * validatorCount_));
+ context.validatorCount = validatorCount_;
+
+ if (allOf_.schemas)
+ CreateSchemaValidators(context, allOf_);
+
+ if (anyOf_.schemas)
+ CreateSchemaValidators(context, anyOf_);
+
+ if (oneOf_.schemas)
+ CreateSchemaValidators(context, oneOf_);
+
+ if (not_)
+ context.validators[notValidatorIndex_] = context.factory.CreateSchemaValidator(*not_);
+
+ if (hasSchemaDependencies_) {
+ for (SizeType i = 0; i < propertyCount_; i++)
+ if (properties_[i].dependenciesSchema)
+ context.validators[properties_[i].dependenciesValidatorIndex] = context.factory.CreateSchemaValidator(*properties_[i].dependenciesSchema);
+ }
+ }
+
+ return true;
+ }
+
+ void CreateSchemaValidators(Context& context, const SchemaArray& schemas) const {
+ for (SizeType i = 0; i < schemas.count; i++)
+ context.validators[schemas.begin + i] = context.factory.CreateSchemaValidator(*schemas.schemas[i]);
+ }
+
+ // O(n)
+ bool FindPropertyIndex(const ValueType& name, SizeType* outIndex) const {
+ SizeType len = name.GetStringLength();
+ const Ch* str = name.GetString();
+ for (SizeType index = 0; index < propertyCount_; index++)
+ if (properties_[index].name.GetStringLength() == len &&
+ (std::memcmp(properties_[index].name.GetString(), str, sizeof(Ch) * len) == 0))
+ {
+ *outIndex = index;
+ return true;
+ }
+ return false;
+ }
+
+ bool CheckInt(Context& context, int64_t i) const {
+ if (!(type_ & ((1 << kIntegerSchemaType) | (1 << kNumberSchemaType))))
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetTypeString());
+
+ if (!minimum_.IsNull()) {
+ if (minimum_.IsInt64()) {
+ if (exclusiveMinimum_ ? i <= minimum_.GetInt64() : i < minimum_.GetInt64())
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetMinimumString());
+ }
+ else if (minimum_.IsUint64()) {
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetMinimumString()); // i <= max(int64_t) < minimum.GetUint64()
+ }
+ else if (!CheckDoubleMinimum(context, static_cast<double>(i)))
+ return false;
+ }
+
+ if (!maximum_.IsNull()) {
+ if (maximum_.IsInt64()) {
+ if (exclusiveMaximum_ ? i >= maximum_.GetInt64() : i > maximum_.GetInt64())
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetMaximumString());
+ }
+ else if (maximum_.IsUint64()) { }
+ /* do nothing */ // i <= max(int64_t) < maximum_.GetUint64()
+ else if (!CheckDoubleMaximum(context, static_cast<double>(i)))
+ return false;
+ }
+
+ if (!multipleOf_.IsNull()) {
+ if (multipleOf_.IsUint64()) {
+ if (static_cast<uint64_t>(i >= 0 ? i : -i) % multipleOf_.GetUint64() != 0)
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetMultipleOfString());
+ }
+ else if (!CheckDoubleMultipleOf(context, static_cast<double>(i)))
+ return false;
+ }
+
+ return true;
+ }
+
+ bool CheckUint(Context& context, uint64_t i) const {
+ if (!(type_ & ((1 << kIntegerSchemaType) | (1 << kNumberSchemaType))))
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetTypeString());
+
+ if (!minimum_.IsNull()) {
+ if (minimum_.IsUint64()) {
+ if (exclusiveMinimum_ ? i <= minimum_.GetUint64() : i < minimum_.GetUint64())
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetMinimumString());
+ }
+ else if (minimum_.IsInt64())
+ /* do nothing */; // i >= 0 > minimum.Getint64()
+ else if (!CheckDoubleMinimum(context, static_cast<double>(i)))
+ return false;
+ }
+
+ if (!maximum_.IsNull()) {
+ if (maximum_.IsUint64()) {
+ if (exclusiveMaximum_ ? i >= maximum_.GetUint64() : i > maximum_.GetUint64())
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetMaximumString());
+ }
+ else if (maximum_.IsInt64())
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetMaximumString()); // i >= 0 > maximum_
+ else if (!CheckDoubleMaximum(context, static_cast<double>(i)))
+ return false;
+ }
+
+ if (!multipleOf_.IsNull()) {
+ if (multipleOf_.IsUint64()) {
+ if (i % multipleOf_.GetUint64() != 0)
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetMultipleOfString());
+ }
+ else if (!CheckDoubleMultipleOf(context, static_cast<double>(i)))
+ return false;
+ }
+
+ return true;
+ }
+
+ bool CheckDoubleMinimum(Context& context, double d) const {
+ if (exclusiveMinimum_ ? d <= minimum_.GetDouble() : d < minimum_.GetDouble())
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetMinimumString());
+ return true;
+ }
+
+ bool CheckDoubleMaximum(Context& context, double d) const {
+ if (exclusiveMaximum_ ? d >= maximum_.GetDouble() : d > maximum_.GetDouble())
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetMaximumString());
+ return true;
+ }
+
+ bool CheckDoubleMultipleOf(Context& context, double d) const {
+ double a = std::abs(d), b = std::abs(multipleOf_.GetDouble());
+ double q = std::floor(a / b);
+ double r = a - q * b;
+ if (r > 0.0)
+ RAPIDJSON_INVALID_KEYWORD_RETURN(GetMultipleOfString());
+ return true;
+ }
+
+ struct Property {
+ Property() : schema(), dependenciesSchema(), dependenciesValidatorIndex(), dependencies(), required(false) {}
+ ~Property() { AllocatorType::Free(dependencies); }
+ SValue name;
+ const SchemaType* schema;
+ const SchemaType* dependenciesSchema;
+ SizeType dependenciesValidatorIndex;
+ bool* dependencies;
+ bool required;
+ };
+
+ struct PatternProperty {
+ PatternProperty() : schema(), pattern() {}
+ ~PatternProperty() {
+ if (pattern) {
+ pattern->~RegexType();
+ AllocatorType::Free(pattern);
+ }
+ }
+ const SchemaType* schema;
+ RegexType* pattern;
+ };
+
+ AllocatorType* allocator_;
+ const SchemaType* typeless_;
+ uint64_t* enum_;
+ SizeType enumCount_;
+ SchemaArray allOf_;
+ SchemaArray anyOf_;
+ SchemaArray oneOf_;
+ const SchemaType* not_;
+ unsigned type_; // bitmask of kSchemaType
+ SizeType validatorCount_;
+ SizeType notValidatorIndex_;
+
+ Property* properties_;
+ const SchemaType* additionalPropertiesSchema_;
+ PatternProperty* patternProperties_;
+ SizeType patternPropertyCount_;
+ SizeType propertyCount_;
+ SizeType minProperties_;
+ SizeType maxProperties_;
+ bool additionalProperties_;
+ bool hasDependencies_;
+ bool hasRequired_;
+ bool hasSchemaDependencies_;
+
+ const SchemaType* additionalItemsSchema_;
+ const SchemaType* itemsList_;
+ const SchemaType** itemsTuple_;
+ SizeType itemsTupleCount_;
+ SizeType minItems_;
+ SizeType maxItems_;
+ bool additionalItems_;
+ bool uniqueItems_;
+
+ RegexType* pattern_;
+ SizeType minLength_;
+ SizeType maxLength_;
+
+ SValue minimum_;
+ SValue maximum_;
+ SValue multipleOf_;
+ bool exclusiveMinimum_;
+ bool exclusiveMaximum_;
+};
+
+template<typename Stack, typename Ch>
+struct TokenHelper {
+ RAPIDJSON_FORCEINLINE static void AppendIndexToken(Stack& documentStack, SizeType index) {
+ *documentStack.template Push<Ch>() = '/';
+ char buffer[21];
+ size_t length = static_cast<size_t>((sizeof(SizeType) == 4 ? u32toa(index, buffer) : u64toa(index, buffer)) - buffer);
+ for (size_t i = 0; i < length; i++)
+ *documentStack.template Push<Ch>() = static_cast<Ch>(buffer[i]);
+ }
+};
+
+// Partial specialized version for char to prevent buffer copying.
+template <typename Stack>
+struct TokenHelper<Stack, char> {
+ RAPIDJSON_FORCEINLINE static void AppendIndexToken(Stack& documentStack, SizeType index) {
+ if (sizeof(SizeType) == 4) {
+ char *buffer = documentStack.template Push<char>(1 + 10); // '/' + uint
+ *buffer++ = '/';
+ const char* end = internal::u32toa(index, buffer);
+ documentStack.template Pop<char>(static_cast<size_t>(10 - (end - buffer)));
+ }
+ else {
+ char *buffer = documentStack.template Push<char>(1 + 20); // '/' + uint64
+ *buffer++ = '/';
+ const char* end = internal::u64toa(index, buffer);
+ documentStack.template Pop<char>(static_cast<size_t>(20 - (end - buffer)));
+ }
+ }
+};
+
+} // namespace internal
+
+///////////////////////////////////////////////////////////////////////////////
+// IGenericRemoteSchemaDocumentProvider
+
+template <typename SchemaDocumentType>
+class IGenericRemoteSchemaDocumentProvider {
+public:
+ typedef typename SchemaDocumentType::Ch Ch;
+
+ virtual ~IGenericRemoteSchemaDocumentProvider() {}
+ virtual const SchemaDocumentType* GetRemoteDocument(const Ch* uri, SizeType length) = 0;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+// GenericSchemaDocument
+
+//! JSON schema document.
+/*!
+ A JSON schema document is a compiled version of a JSON schema.
+ It is basically a tree of internal::Schema.
+
+ \note This is an immutable class (i.e. its instance cannot be modified after construction).
+ \tparam ValueT Type of JSON value (e.g. \c Value ), which also determine the encoding.
+ \tparam Allocator Allocator type for allocating memory of this document.
+*/
+template <typename ValueT, typename Allocator = CrtAllocator>
+class GenericSchemaDocument {
+public:
+ typedef ValueT ValueType;
+ typedef IGenericRemoteSchemaDocumentProvider<GenericSchemaDocument> IRemoteSchemaDocumentProviderType;
+ typedef Allocator AllocatorType;
+ typedef typename ValueType::EncodingType EncodingType;
+ typedef typename EncodingType::Ch Ch;
+ typedef internal::Schema<GenericSchemaDocument> SchemaType;
+ typedef GenericPointer<ValueType, Allocator> PointerType;
+ friend class internal::Schema<GenericSchemaDocument>;
+ template <typename, typename, typename>
+ friend class GenericSchemaValidator;
+
+ //! Constructor.
+ /*!
+ Compile a JSON document into schema document.
+
+ \param document A JSON document as source.
+ \param remoteProvider An optional remote schema document provider for resolving remote reference. Can be null.
+ \param allocator An optional allocator instance for allocating memory. Can be null.
+ */
+ explicit GenericSchemaDocument(const ValueType& document, IRemoteSchemaDocumentProviderType* remoteProvider = 0, Allocator* allocator = 0) :
+ remoteProvider_(remoteProvider),
+ allocator_(allocator),
+ ownAllocator_(),
+ root_(),
+ typeless_(),
+ schemaMap_(allocator, kInitialSchemaMapSize),
+ schemaRef_(allocator, kInitialSchemaRefSize)
+ {
+ if (!allocator_)
+ ownAllocator_ = allocator_ = RAPIDJSON_NEW(Allocator)();
+
+ typeless_ = static_cast<SchemaType*>(allocator_->Malloc(sizeof(SchemaType)));
+ new (typeless_) SchemaType(this, PointerType(), ValueType(kObjectType).Move(), ValueType(kObjectType).Move(), 0);
+
+ // Generate root schema, it will call CreateSchema() to create sub-schemas,
+ // And call AddRefSchema() if there are $ref.
+ CreateSchemaRecursive(&root_, PointerType(), document, document);
+
+ // Resolve $ref
+ while (!schemaRef_.Empty()) {
+ SchemaRefEntry* refEntry = schemaRef_.template Pop<SchemaRefEntry>(1);
+ if (const SchemaType* s = GetSchema(refEntry->target)) {
+ if (refEntry->schema)
+ *refEntry->schema = s;
+
+ // Create entry in map if not exist
+ if (!GetSchema(refEntry->source)) {
+ new (schemaMap_.template Push<SchemaEntry>()) SchemaEntry(refEntry->source, const_cast<SchemaType*>(s), false, allocator_);
+ }
+ }
+ else if (refEntry->schema)
+ *refEntry->schema = typeless_;
+
+ refEntry->~SchemaRefEntry();
+ }
+
+ RAPIDJSON_ASSERT(root_ != 0);
+
+ schemaRef_.ShrinkToFit(); // Deallocate all memory for ref
+ }
+
+#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
+ //! Move constructor in C++11
+ GenericSchemaDocument(GenericSchemaDocument&& rhs) RAPIDJSON_NOEXCEPT :
+ remoteProvider_(rhs.remoteProvider_),
+ allocator_(rhs.allocator_),
+ ownAllocator_(rhs.ownAllocator_),
+ root_(rhs.root_),
+ typeless_(rhs.typeless_),
+ schemaMap_(std::move(rhs.schemaMap_)),
+ schemaRef_(std::move(rhs.schemaRef_))
+ {
+ rhs.remoteProvider_ = 0;
+ rhs.allocator_ = 0;
+ rhs.ownAllocator_ = 0;
+ rhs.typeless_ = 0;
+ }
+#endif
+
+ //! Destructor
+ ~GenericSchemaDocument() {
+ while (!schemaMap_.Empty())
+ schemaMap_.template Pop<SchemaEntry>(1)->~SchemaEntry();
+
+ if (typeless_) {
+ typeless_->~SchemaType();
+ Allocator::Free(typeless_);
+ }
+
+ RAPIDJSON_DELETE(ownAllocator_);
+ }
+
+ //! Get the root schema.
+ const SchemaType& GetRoot() const { return *root_; }
+
+private:
+ //! Prohibit copying
+ GenericSchemaDocument(const GenericSchemaDocument&);
+ //! Prohibit assignment
+ GenericSchemaDocument& operator=(const GenericSchemaDocument&);
+
+ struct SchemaRefEntry {
+ SchemaRefEntry(const PointerType& s, const PointerType& t, const SchemaType** outSchema, Allocator *allocator) : source(s, allocator), target(t, allocator), schema(outSchema) {}
+ PointerType source;
+ PointerType target;
+ const SchemaType** schema;
+ };
+
+ struct SchemaEntry {
+ SchemaEntry(const PointerType& p, SchemaType* s, bool o, Allocator* allocator) : pointer(p, allocator), schema(s), owned(o) {}
+ ~SchemaEntry() {
+ if (owned) {
+ schema->~SchemaType();
+ Allocator::Free(schema);
+ }
+ }
+ PointerType pointer;
+ SchemaType* schema;
+ bool owned;
+ };
+
+ void CreateSchemaRecursive(const SchemaType** schema, const PointerType& pointer, const ValueType& v, const ValueType& document) {
+ if (schema)
+ *schema = typeless_;
+
+ if (v.GetType() == kObjectType) {
+ const SchemaType* s = GetSchema(pointer);
+ if (!s)
+ CreateSchema(schema, pointer, v, document);
+
+ for (typename ValueType::ConstMemberIterator itr = v.MemberBegin(); itr != v.MemberEnd(); ++itr)
+ CreateSchemaRecursive(0, pointer.Append(itr->name, allocator_), itr->value, document);
+ }
+ else if (v.GetType() == kArrayType)
+ for (SizeType i = 0; i < v.Size(); i++)
+ CreateSchemaRecursive(0, pointer.Append(i, allocator_), v[i], document);
+ }
+
+ void CreateSchema(const SchemaType** schema, const PointerType& pointer, const ValueType& v, const ValueType& document) {
+ RAPIDJSON_ASSERT(pointer.IsValid());
+ if (v.IsObject()) {
+ if (!HandleRefSchema(pointer, schema, v, document)) {
+ SchemaType* s = new (allocator_->Malloc(sizeof(SchemaType))) SchemaType(this, pointer, v, document, allocator_);
+ new (schemaMap_.template Push<SchemaEntry>()) SchemaEntry(pointer, s, true, allocator_);
+ if (schema)
+ *schema = s;
+ }
+ }
+ }
+
+ bool HandleRefSchema(const PointerType& source, const SchemaType** schema, const ValueType& v, const ValueType& document) {
+ static const Ch kRefString[] = { '$', 'r', 'e', 'f', '\0' };
+ static const ValueType kRefValue(kRefString, 4);
+
+ typename ValueType::ConstMemberIterator itr = v.FindMember(kRefValue);
+ if (itr == v.MemberEnd())
+ return false;
+
+ if (itr->value.IsString()) {
+ SizeType len = itr->value.GetStringLength();
+ if (len > 0) {
+ const Ch* s = itr->value.GetString();
+ SizeType i = 0;
+ while (i < len && s[i] != '#') // Find the first #
+ i++;
+
+ if (i > 0) { // Remote reference, resolve immediately
+ if (remoteProvider_) {
+ if (const GenericSchemaDocument* remoteDocument = remoteProvider_->GetRemoteDocument(s, i)) {
+ PointerType pointer(&s[i], len - i, allocator_);
+ if (pointer.IsValid()) {
+ if (const SchemaType* sc = remoteDocument->GetSchema(pointer)) {
+ if (schema)
+ *schema = sc;
+ return true;
+ }
+ }
+ }
+ }
+ }
+ else if (s[i] == '#') { // Local reference, defer resolution
+ PointerType pointer(&s[i], len - i, allocator_);
+ if (pointer.IsValid()) {
+ if (const ValueType* nv = pointer.Get(document))
+ if (HandleRefSchema(source, schema, *nv, document))
+ return true;
+
+ new (schemaRef_.template Push<SchemaRefEntry>()) SchemaRefEntry(source, pointer, schema, allocator_);
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+ }
+
+ const SchemaType* GetSchema(const PointerType& pointer) const {
+ for (const SchemaEntry* target = schemaMap_.template Bottom<SchemaEntry>(); target != schemaMap_.template End<SchemaEntry>(); ++target)
+ if (pointer == target->pointer)
+ return target->schema;
+ return 0;
+ }
+
+ PointerType GetPointer(const SchemaType* schema) const {
+ for (const SchemaEntry* target = schemaMap_.template Bottom<SchemaEntry>(); target != schemaMap_.template End<SchemaEntry>(); ++target)
+ if (schema == target->schema)
+ return target->pointer;
+ return PointerType();
+ }
+
+ const SchemaType* GetTypeless() const { return typeless_; }
+
+ static const size_t kInitialSchemaMapSize = 64;
+ static const size_t kInitialSchemaRefSize = 64;
+
+ IRemoteSchemaDocumentProviderType* remoteProvider_;
+ Allocator *allocator_;
+ Allocator *ownAllocator_;
+ const SchemaType* root_; //!< Root schema.
+ SchemaType* typeless_;
+ internal::Stack<Allocator> schemaMap_; // Stores created Pointer -> Schemas
+ internal::Stack<Allocator> schemaRef_; // Stores Pointer from $ref and schema which holds the $ref
+};
+
+//! GenericSchemaDocument using Value type.
+typedef GenericSchemaDocument<Value> SchemaDocument;
+//! IGenericRemoteSchemaDocumentProvider using SchemaDocument.
+typedef IGenericRemoteSchemaDocumentProvider<SchemaDocument> IRemoteSchemaDocumentProvider;
+
+///////////////////////////////////////////////////////////////////////////////
+// GenericSchemaValidator
+
+//! JSON Schema Validator.
+/*!
+ A SAX style JSON schema validator.
+ It uses a \c GenericSchemaDocument to validate SAX events.
+ It delegates the incoming SAX events to an output handler.
+ The default output handler does nothing.
+ It can be reused multiple times by calling \c Reset().
+
+ \tparam SchemaDocumentType Type of schema document.
+ \tparam OutputHandler Type of output handler. Default handler does nothing.
+ \tparam StateAllocator Allocator for storing the internal validation states.
+*/
+template <
+ typename SchemaDocumentType,
+ typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>,
+ typename StateAllocator = CrtAllocator>
+class GenericSchemaValidator :
+ public internal::ISchemaStateFactory<typename SchemaDocumentType::SchemaType>,
+ public internal::ISchemaValidator
+{
+public:
+ typedef typename SchemaDocumentType::SchemaType SchemaType;
+ typedef typename SchemaDocumentType::PointerType PointerType;
+ typedef typename SchemaType::EncodingType EncodingType;
+ typedef typename EncodingType::Ch Ch;
+
+ //! Constructor without output handler.
+ /*!
+ \param schemaDocument The schema document to conform to.
+ \param allocator Optional allocator for storing internal validation states.
+ \param schemaStackCapacity Optional initial capacity of schema path stack.
+ \param documentStackCapacity Optional initial capacity of document path stack.
+ */
+ GenericSchemaValidator(
+ const SchemaDocumentType& schemaDocument,
+ StateAllocator* allocator = 0,
+ size_t schemaStackCapacity = kDefaultSchemaStackCapacity,
+ size_t documentStackCapacity = kDefaultDocumentStackCapacity)
+ :
+ schemaDocument_(&schemaDocument),
+ root_(schemaDocument.GetRoot()),
+ stateAllocator_(allocator),
+ ownStateAllocator_(0),
+ schemaStack_(allocator, schemaStackCapacity),
+ documentStack_(allocator, documentStackCapacity),
+ outputHandler_(0),
+ valid_(true)
+#if RAPIDJSON_SCHEMA_VERBOSE
+ , depth_(0)
+#endif
+ {
+ }
+
+ //! Constructor with output handler.
+ /*!
+ \param schemaDocument The schema document to conform to.
+ \param allocator Optional allocator for storing internal validation states.
+ \param schemaStackCapacity Optional initial capacity of schema path stack.
+ \param documentStackCapacity Optional initial capacity of document path stack.
+ */
+ GenericSchemaValidator(
+ const SchemaDocumentType& schemaDocument,
+ OutputHandler& outputHandler,
+ StateAllocator* allocator = 0,
+ size_t schemaStackCapacity = kDefaultSchemaStackCapacity,
+ size_t documentStackCapacity = kDefaultDocumentStackCapacity)
+ :
+ schemaDocument_(&schemaDocument),
+ root_(schemaDocument.GetRoot()),
+ stateAllocator_(allocator),
+ ownStateAllocator_(0),
+ schemaStack_(allocator, schemaStackCapacity),
+ documentStack_(allocator, documentStackCapacity),
+ outputHandler_(&outputHandler),
+ valid_(true)
+#if RAPIDJSON_SCHEMA_VERBOSE
+ , depth_(0)
+#endif
+ {
+ }
+
+ //! Destructor.
+ ~GenericSchemaValidator() {
+ Reset();
+ RAPIDJSON_DELETE(ownStateAllocator_);
+ }
+
+ //! Reset the internal states.
+ void Reset() {
+ while (!schemaStack_.Empty())
+ PopSchema();
+ documentStack_.Clear();
+ valid_ = true;
+ }
+
+ //! Checks whether the current state is valid.
+ // Implementation of ISchemaValidator
+ virtual bool IsValid() const { return valid_; }
+
+ //! Gets the JSON pointer pointed to the invalid schema.
+ PointerType GetInvalidSchemaPointer() const {
+ return schemaStack_.Empty() ? PointerType() : schemaDocument_->GetPointer(&CurrentSchema());
+ }
+
+ //! Gets the keyword of invalid schema.
+ const Ch* GetInvalidSchemaKeyword() const {
+ return schemaStack_.Empty() ? 0 : CurrentContext().invalidKeyword;
+ }
+
+ //! Gets the JSON pointer pointed to the invalid value.
+ PointerType GetInvalidDocumentPointer() const {
+ return documentStack_.Empty() ? PointerType() : PointerType(documentStack_.template Bottom<Ch>(), documentStack_.GetSize() / sizeof(Ch));
+ }
+
+#if RAPIDJSON_SCHEMA_VERBOSE
+#define RAPIDJSON_SCHEMA_HANDLE_BEGIN_VERBOSE_() \
+RAPIDJSON_MULTILINEMACRO_BEGIN\
+ *documentStack_.template Push<Ch>() = '\0';\
+ documentStack_.template Pop<Ch>(1);\
+ internal::PrintInvalidDocument(documentStack_.template Bottom<Ch>());\
+RAPIDJSON_MULTILINEMACRO_END
+#else
+#define RAPIDJSON_SCHEMA_HANDLE_BEGIN_VERBOSE_()
+#endif
+
+#define RAPIDJSON_SCHEMA_HANDLE_BEGIN_(method, arg1)\
+ if (!valid_) return false; \
+ if (!BeginValue() || !CurrentSchema().method arg1) {\
+ RAPIDJSON_SCHEMA_HANDLE_BEGIN_VERBOSE_();\
+ return valid_ = false;\
+ }
+
+#define RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(method, arg2)\
+ for (Context* context = schemaStack_.template Bottom<Context>(); context != schemaStack_.template End<Context>(); context++) {\
+ if (context->hasher)\
+ static_cast<HasherType*>(context->hasher)->method arg2;\
+ if (context->validators)\
+ for (SizeType i_ = 0; i_ < context->validatorCount; i_++)\
+ static_cast<GenericSchemaValidator*>(context->validators[i_])->method arg2;\
+ if (context->patternPropertiesValidators)\
+ for (SizeType i_ = 0; i_ < context->patternPropertiesValidatorCount; i_++)\
+ static_cast<GenericSchemaValidator*>(context->patternPropertiesValidators[i_])->method arg2;\
+ }
+
+#define RAPIDJSON_SCHEMA_HANDLE_END_(method, arg2)\
+ return valid_ = EndValue() && (!outputHandler_ || outputHandler_->method arg2)
+
+#define RAPIDJSON_SCHEMA_HANDLE_VALUE_(method, arg1, arg2) \
+ RAPIDJSON_SCHEMA_HANDLE_BEGIN_ (method, arg1);\
+ RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(method, arg2);\
+ RAPIDJSON_SCHEMA_HANDLE_END_ (method, arg2)
+
+ bool Null() { RAPIDJSON_SCHEMA_HANDLE_VALUE_(Null, (CurrentContext() ), ( )); }
+ bool Bool(bool b) { RAPIDJSON_SCHEMA_HANDLE_VALUE_(Bool, (CurrentContext(), b), (b)); }
+ bool Int(int i) { RAPIDJSON_SCHEMA_HANDLE_VALUE_(Int, (CurrentContext(), i), (i)); }
+ bool Uint(unsigned u) { RAPIDJSON_SCHEMA_HANDLE_VALUE_(Uint, (CurrentContext(), u), (u)); }
+ bool Int64(int64_t i) { RAPIDJSON_SCHEMA_HANDLE_VALUE_(Int64, (CurrentContext(), i), (i)); }
+ bool Uint64(uint64_t u) { RAPIDJSON_SCHEMA_HANDLE_VALUE_(Uint64, (CurrentContext(), u), (u)); }
+ bool Double(double d) { RAPIDJSON_SCHEMA_HANDLE_VALUE_(Double, (CurrentContext(), d), (d)); }
+ bool RawNumber(const Ch* str, SizeType length, bool copy)
+ { RAPIDJSON_SCHEMA_HANDLE_VALUE_(String, (CurrentContext(), str, length, copy), (str, length, copy)); }
+ bool String(const Ch* str, SizeType length, bool copy)
+ { RAPIDJSON_SCHEMA_HANDLE_VALUE_(String, (CurrentContext(), str, length, copy), (str, length, copy)); }
+
+ bool StartObject() {
+ RAPIDJSON_SCHEMA_HANDLE_BEGIN_(StartObject, (CurrentContext()));
+ RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(StartObject, ());
+ return valid_ = !outputHandler_ || outputHandler_->StartObject();
+ }
+
+ bool Key(const Ch* str, SizeType len, bool copy) {
+ if (!valid_) return false;
+ AppendToken(str, len);
+ if (!CurrentSchema().Key(CurrentContext(), str, len, copy)) return valid_ = false;
+ RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(Key, (str, len, copy));
+ return valid_ = !outputHandler_ || outputHandler_->Key(str, len, copy);
+ }
+
+ bool EndObject(SizeType memberCount) {
+ if (!valid_) return false;
+ RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(EndObject, (memberCount));
+ if (!CurrentSchema().EndObject(CurrentContext(), memberCount)) return valid_ = false;
+ RAPIDJSON_SCHEMA_HANDLE_END_(EndObject, (memberCount));
+ }
+
+ bool StartArray() {
+ RAPIDJSON_SCHEMA_HANDLE_BEGIN_(StartArray, (CurrentContext()));
+ RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(StartArray, ());
+ return valid_ = !outputHandler_ || outputHandler_->StartArray();
+ }
+
+ bool EndArray(SizeType elementCount) {
+ if (!valid_) return false;
+ RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(EndArray, (elementCount));
+ if (!CurrentSchema().EndArray(CurrentContext(), elementCount)) return valid_ = false;
+ RAPIDJSON_SCHEMA_HANDLE_END_(EndArray, (elementCount));
+ }
+
+#undef RAPIDJSON_SCHEMA_HANDLE_BEGIN_VERBOSE_
+#undef RAPIDJSON_SCHEMA_HANDLE_BEGIN_
+#undef RAPIDJSON_SCHEMA_HANDLE_PARALLEL_
+#undef RAPIDJSON_SCHEMA_HANDLE_VALUE_
+
+ // Implementation of ISchemaStateFactory<SchemaType>
+ virtual ISchemaValidator* CreateSchemaValidator(const SchemaType& root) {
+ return new (GetStateAllocator().Malloc(sizeof(GenericSchemaValidator))) GenericSchemaValidator(*schemaDocument_, root,
+#if RAPIDJSON_SCHEMA_VERBOSE
+ depth_ + 1,
+#endif
+ &GetStateAllocator());
+ }
+
+ virtual void DestroySchemaValidator(ISchemaValidator* validator) {
+ GenericSchemaValidator* v = static_cast<GenericSchemaValidator*>(validator);
+ v->~GenericSchemaValidator();
+ StateAllocator::Free(v);
+ }
+
+ virtual void* CreateHasher() {
+ return new (GetStateAllocator().Malloc(sizeof(HasherType))) HasherType(&GetStateAllocator());
+ }
+
+ virtual uint64_t GetHashCode(void* hasher) {
+ return static_cast<HasherType*>(hasher)->GetHashCode();
+ }
+
+ virtual void DestroryHasher(void* hasher) {
+ HasherType* h = static_cast<HasherType*>(hasher);
+ h->~HasherType();
+ StateAllocator::Free(h);
+ }
+
+ virtual void* MallocState(size_t size) {
+ return GetStateAllocator().Malloc(size);
+ }
+
+ virtual void FreeState(void* p) {
+ StateAllocator::Free(p);
+ }
+
+private:
+ typedef typename SchemaType::Context Context;
+ typedef GenericValue<UTF8<>, StateAllocator> HashCodeArray;
+ typedef internal::Hasher<EncodingType, StateAllocator> HasherType;
+
+ GenericSchemaValidator(
+ const SchemaDocumentType& schemaDocument,
+ const SchemaType& root,
+#if RAPIDJSON_SCHEMA_VERBOSE
+ unsigned depth,
+#endif
+ StateAllocator* allocator = 0,
+ size_t schemaStackCapacity = kDefaultSchemaStackCapacity,
+ size_t documentStackCapacity = kDefaultDocumentStackCapacity)
+ :
+ schemaDocument_(&schemaDocument),
+ root_(root),
+ stateAllocator_(allocator),
+ ownStateAllocator_(0),
+ schemaStack_(allocator, schemaStackCapacity),
+ documentStack_(allocator, documentStackCapacity),
+ outputHandler_(0),
+ valid_(true)
+#if RAPIDJSON_SCHEMA_VERBOSE
+ , depth_(depth)
+#endif
+ {
+ }
+
+ StateAllocator& GetStateAllocator() {
+ if (!stateAllocator_)
+ stateAllocator_ = ownStateAllocator_ = RAPIDJSON_NEW(StateAllocator)();
+ return *stateAllocator_;
+ }
+
+ bool BeginValue() {
+ if (schemaStack_.Empty())
+ PushSchema(root_);
+ else {
+ if (CurrentContext().inArray)
+ internal::TokenHelper<internal::Stack<StateAllocator>, Ch>::AppendIndexToken(documentStack_, CurrentContext().arrayElementIndex);
+
+ if (!CurrentSchema().BeginValue(CurrentContext()))
+ return false;
+
+ SizeType count = CurrentContext().patternPropertiesSchemaCount;
+ const SchemaType** sa = CurrentContext().patternPropertiesSchemas;
+ typename Context::PatternValidatorType patternValidatorType = CurrentContext().valuePatternValidatorType;
+ bool valueUniqueness = CurrentContext().valueUniqueness;
+ RAPIDJSON_ASSERT(CurrentContext().valueSchema);
+ PushSchema(*CurrentContext().valueSchema);
+
+ if (count > 0) {
+ CurrentContext().objectPatternValidatorType = patternValidatorType;
+ ISchemaValidator**& va = CurrentContext().patternPropertiesValidators;
+ SizeType& validatorCount = CurrentContext().patternPropertiesValidatorCount;
+ va = static_cast<ISchemaValidator**>(MallocState(sizeof(ISchemaValidator*) * count));
+ for (SizeType i = 0; i < count; i++)
+ va[validatorCount++] = CreateSchemaValidator(*sa[i]);
+ }
+
+ CurrentContext().arrayUniqueness = valueUniqueness;
+ }
+ return true;
+ }
+
+ bool EndValue() {
+ if (!CurrentSchema().EndValue(CurrentContext()))
+ return false;
+
+#if RAPIDJSON_SCHEMA_VERBOSE
+ GenericStringBuffer<EncodingType> sb;
+ schemaDocument_->GetPointer(&CurrentSchema()).Stringify(sb);
+
+ *documentStack_.template Push<Ch>() = '\0';
+ documentStack_.template Pop<Ch>(1);
+ internal::PrintValidatorPointers(depth_, sb.GetString(), documentStack_.template Bottom<Ch>());
+#endif
+
+ uint64_t h = CurrentContext().arrayUniqueness ? static_cast<HasherType*>(CurrentContext().hasher)->GetHashCode() : 0;
+
+ PopSchema();
+
+ if (!schemaStack_.Empty()) {
+ Context& context = CurrentContext();
+ if (context.valueUniqueness) {
+ HashCodeArray* a = static_cast<HashCodeArray*>(context.arrayElementHashCodes);
+ if (!a)
+ CurrentContext().arrayElementHashCodes = a = new (GetStateAllocator().Malloc(sizeof(HashCodeArray))) HashCodeArray(kArrayType);
+ for (typename HashCodeArray::ConstValueIterator itr = a->Begin(); itr != a->End(); ++itr)
+ if (itr->GetUint64() == h)
+ RAPIDJSON_INVALID_KEYWORD_RETURN(SchemaType::GetUniqueItemsString());
+ a->PushBack(h, GetStateAllocator());
+ }
+ }
+
+ // Remove the last token of document pointer
+ while (!documentStack_.Empty() && *documentStack_.template Pop<Ch>(1) != '/')
+ ;
+
+ return true;
+ }
+
+ void AppendToken(const Ch* str, SizeType len) {
+ documentStack_.template Reserve<Ch>(1 + len * 2); // worst case all characters are escaped as two characters
+ *documentStack_.template PushUnsafe<Ch>() = '/';
+ for (SizeType i = 0; i < len; i++) {
+ if (str[i] == '~') {
+ *documentStack_.template PushUnsafe<Ch>() = '~';
+ *documentStack_.template PushUnsafe<Ch>() = '0';
+ }
+ else if (str[i] == '/') {
+ *documentStack_.template PushUnsafe<Ch>() = '~';
+ *documentStack_.template PushUnsafe<Ch>() = '1';
+ }
+ else
+ *documentStack_.template PushUnsafe<Ch>() = str[i];
+ }
+ }
+
+ RAPIDJSON_FORCEINLINE void PushSchema(const SchemaType& schema) { new (schemaStack_.template Push<Context>()) Context(*this, &schema); }
+
+ RAPIDJSON_FORCEINLINE void PopSchema() {
+ Context* c = schemaStack_.template Pop<Context>(1);
+ if (HashCodeArray* a = static_cast<HashCodeArray*>(c->arrayElementHashCodes)) {
+ a->~HashCodeArray();
+ StateAllocator::Free(a);
+ }
+ c->~Context();
+ }
+
+ const SchemaType& CurrentSchema() const { return *schemaStack_.template Top<Context>()->schema; }
+ Context& CurrentContext() { return *schemaStack_.template Top<Context>(); }
+ const Context& CurrentContext() const { return *schemaStack_.template Top<Context>(); }
+
+ static const size_t kDefaultSchemaStackCapacity = 1024;
+ static const size_t kDefaultDocumentStackCapacity = 256;
+ const SchemaDocumentType* schemaDocument_;
+ const SchemaType& root_;
+ StateAllocator* stateAllocator_;
+ StateAllocator* ownStateAllocator_;
+ internal::Stack<StateAllocator> schemaStack_; //!< stack to store the current path of schema (BaseSchemaType *)
+ internal::Stack<StateAllocator> documentStack_; //!< stack to store the current path of validating document (Ch)
+ OutputHandler* outputHandler_;
+ bool valid_;
+#if RAPIDJSON_SCHEMA_VERBOSE
+ unsigned depth_;
+#endif
+};
+
+typedef GenericSchemaValidator<SchemaDocument> SchemaValidator;
+
+///////////////////////////////////////////////////////////////////////////////
+// SchemaValidatingReader
+
+//! A helper class for parsing with validation.
+/*!
+ This helper class is a functor, designed as a parameter of \ref GenericDocument::Populate().
+
+ \tparam parseFlags Combination of \ref ParseFlag.
+ \tparam InputStream Type of input stream, implementing Stream concept.
+ \tparam SourceEncoding Encoding of the input stream.
+ \tparam SchemaDocumentType Type of schema document.
+ \tparam StackAllocator Allocator type for stack.
+*/
+template <
+ unsigned parseFlags,
+ typename InputStream,
+ typename SourceEncoding,
+ typename SchemaDocumentType = SchemaDocument,
+ typename StackAllocator = CrtAllocator>
+class SchemaValidatingReader {
+public:
+ typedef typename SchemaDocumentType::PointerType PointerType;
+ typedef typename InputStream::Ch Ch;
+
+ //! Constructor
+ /*!
+ \param is Input stream.
+ \param sd Schema document.
+ */
+ SchemaValidatingReader(InputStream& is, const SchemaDocumentType& sd) : is_(is), sd_(sd), invalidSchemaKeyword_(), isValid_(true) {}
+
+ template <typename Handler>
+ bool operator()(Handler& handler) {
+ GenericReader<SourceEncoding, typename SchemaDocumentType::EncodingType, StackAllocator> reader;
+ GenericSchemaValidator<SchemaDocumentType, Handler> validator(sd_, handler);
+ parseResult_ = reader.template Parse<parseFlags>(is_, validator);
+
+ isValid_ = validator.IsValid();
+ if (isValid_) {
+ invalidSchemaPointer_ = PointerType();
+ invalidSchemaKeyword_ = 0;
+ invalidDocumentPointer_ = PointerType();
+ }
+ else {
+ invalidSchemaPointer_ = validator.GetInvalidSchemaPointer();
+ invalidSchemaKeyword_ = validator.GetInvalidSchemaKeyword();
+ invalidDocumentPointer_ = validator.GetInvalidDocumentPointer();
+ }
+
+ return parseResult_;
+ }
+
+ const ParseResult& GetParseResult() const { return parseResult_; }
+ bool IsValid() const { return isValid_; }
+ const PointerType& GetInvalidSchemaPointer() const { return invalidSchemaPointer_; }
+ const Ch* GetInvalidSchemaKeyword() const { return invalidSchemaKeyword_; }
+ const PointerType& GetInvalidDocumentPointer() const { return invalidDocumentPointer_; }
+
+private:
+ InputStream& is_;
+ const SchemaDocumentType& sd_;
+
+ ParseResult parseResult_;
+ PointerType invalidSchemaPointer_;
+ const Ch* invalidSchemaKeyword_;
+ PointerType invalidDocumentPointer_;
+ bool isValid_;
+};
+
+RAPIDJSON_NAMESPACE_END
+RAPIDJSON_DIAG_POP
+
+#endif // RAPIDJSON_SCHEMA_H_
diff --git a/contrib/rapidjson/include/rapidjson/stream.h b/contrib/rapidjson/include/rapidjson/stream.h
new file mode 100644
index 000000000..fef82c252
--- /dev/null
+++ b/contrib/rapidjson/include/rapidjson/stream.h
@@ -0,0 +1,179 @@
+// Tencent is pleased to support the open source community by making RapidJSON available.
+//
+// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
+//
+// Licensed under the MIT License (the "License"); you may not use this file except
+// in compliance with the License. You may obtain a copy of the License at
+//
+// http://opensource.org/licenses/MIT
+//
+// Unless required by applicable law or agreed to in writing, software distributed
+// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+// CONDITIONS OF ANY KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations under the License.
+
+#include "rapidjson.h"
+
+#ifndef RAPIDJSON_STREAM_H_
+#define RAPIDJSON_STREAM_H_
+
+#include "encodings.h"
+
+RAPIDJSON_NAMESPACE_BEGIN
+
+///////////////////////////////////////////////////////////////////////////////
+// Stream
+
+/*! \class rapidjson::Stream
+ \brief Concept for reading and writing characters.
+
+ For read-only stream, no need to implement PutBegin(), Put(), Flush() and PutEnd().
+
+ For write-only stream, only need to implement Put() and Flush().
+
+\code
+concept Stream {
+ typename Ch; //!< Character type of the stream.
+
+ //! Read the current character from stream without moving the read cursor.
+ Ch Peek() const;
+
+ //! Read the current character from stream and moving the read cursor to next character.
+ Ch Take();
+
+ //! Get the current read cursor.
+ //! \return Number of characters read from start.
+ size_t Tell();
+
+ //! Begin writing operation at the current read pointer.
+ //! \return The begin writer pointer.
+ Ch* PutBegin();
+
+ //! Write a character.
+ void Put(Ch c);
+
+ //! Flush the buffer.
+ void Flush();
+
+ //! End the writing operation.
+ //! \param begin The begin write pointer returned by PutBegin().
+ //! \return Number of characters written.
+ size_t PutEnd(Ch* begin);
+}
+\endcode
+*/
+
+//! Provides additional information for stream.
+/*!
+ By using traits pattern, this type provides a default configuration for stream.
+ For custom stream, this type can be specialized for other configuration.
+ See TEST(Reader, CustomStringStream) in readertest.cpp for example.
+*/
+template<typename Stream>
+struct StreamTraits {
+ //! Whether to make local copy of stream for optimization during parsing.
+ /*!
+ By default, for safety, streams do not use local copy optimization.
+ Stream that can be copied fast should specialize this, like StreamTraits<StringStream>.
+ */
+ enum { copyOptimization = 0 };
+};
+
+//! Reserve n characters for writing to a stream.
+template<typename Stream>
+inline void PutReserve(Stream& stream, size_t count) {
+ (void)stream;
+ (void)count;
+}
+
+//! Write character to a stream, presuming buffer is reserved.
+template<typename Stream>
+inline void PutUnsafe(Stream& stream, typename Stream::Ch c) {
+ stream.Put(c);
+}
+
+//! Put N copies of a character to a stream.
+template<typename Stream, typename Ch>
+inline void PutN(Stream& stream, Ch c, size_t n) {
+ PutReserve(stream, n);
+ for (size_t i = 0; i < n; i++)
+ PutUnsafe(stream, c);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// StringStream
+
+//! Read-only string stream.
+/*! \note implements Stream concept
+*/
+template <typename Encoding>
+struct GenericStringStream {
+ typedef typename Encoding::Ch Ch;
+
+ GenericStringStream(const Ch *src) : src_(src), head_(src) {}
+
+ Ch Peek() const { return *src_; }
+ Ch Take() { return *src_++; }
+ size_t Tell() const { return static_cast<size_t>(src_ - head_); }
+
+ Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; }
+ void Put(Ch) { RAPIDJSON_ASSERT(false); }
+ void Flush() { RAPIDJSON_ASSERT(false); }
+ size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; }
+
+ const Ch* src_; //!< Current read position.
+ const Ch* head_; //!< Original head of the string.
+};
+
+template <typename Encoding>
+struct StreamTraits<GenericStringStream<Encoding> > {
+ enum { copyOptimization = 1 };
+};
+
+//! String stream with UTF8 encoding.
+typedef GenericStringStream<UTF8<> > StringStream;
+
+///////////////////////////////////////////////////////////////////////////////
+// InsituStringStream
+
+//! A read-write string stream.
+/*! This string stream is particularly designed for in-situ parsing.
+ \note implements Stream concept
+*/
+template <typename Encoding>
+struct GenericInsituStringStream {
+ typedef typename Encoding::Ch Ch;
+
+ GenericInsituStringStream(Ch *src) : src_(src), dst_(0), head_(src) {}
+
+ // Read
+ Ch Peek() { return *src_; }
+ Ch Take() { return *src_++; }
+ size_t Tell() { return static_cast<size_t>(src_ - head_); }
+
+ // Write
+ void Put(Ch c) { RAPIDJSON_ASSERT(dst_ != 0); *dst_++ = c; }
+
+ Ch* PutBegin() { return dst_ = src_; }
+ size_t PutEnd(Ch* begin) { return static_cast<size_t>(dst_ - begin); }
+ void Flush() {}
+
+ Ch* Push(size_t count) { Ch* begin = dst_; dst_ += count; return begin; }
+ void Pop(size_t count) { dst_ -= count; }
+
+ Ch* src_;
+ Ch* dst_;
+ Ch* head_;
+};
+
+template <typename Encoding>
+struct StreamTraits<GenericInsituStringStream<Encoding> > {
+ enum { copyOptimization = 1 };
+};
+
+//! Insitu string stream with UTF8 encoding.
+typedef GenericInsituStringStream<UTF8<> > InsituStringStream;
+
+RAPIDJSON_NAMESPACE_END
+
+#endif // RAPIDJSON_STREAM_H_
diff --git a/contrib/rapidjson/include/rapidjson/stringbuffer.h b/contrib/rapidjson/include/rapidjson/stringbuffer.h
index 1c9c80b79..4e38b82c3 100644
--- a/contrib/rapidjson/include/rapidjson/stringbuffer.h
+++ b/contrib/rapidjson/include/rapidjson/stringbuffer.h
@@ -15,7 +15,8 @@
#ifndef RAPIDJSON_STRINGBUFFER_H_
#define RAPIDJSON_STRINGBUFFER_H_
-#include "rapidjson.h"
+#include "stream.h"
+#include "internal/stack.h"
#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
#include <utility> // std::move
@@ -23,6 +24,11 @@
#include "internal/stack.h"
+#if defined(__clang__)
+RAPIDJSON_DIAG_PUSH
+RAPIDJSON_DIAG_OFF(c++98-compat)
+#endif
+
RAPIDJSON_NAMESPACE_BEGIN
//! Represents an in-memory output stream.
@@ -48,6 +54,7 @@ public:
#endif
void Put(Ch c) { *stack_.template Push<Ch>() = c; }
+ void PutUnsafe(Ch c) { *stack_.template PushUnsafe<Ch>() = c; }
void Flush() {}
void Clear() { stack_.Clear(); }
@@ -57,7 +64,10 @@ public:
stack_.ShrinkToFit();
stack_.template Pop<Ch>(1);
}
+
+ void Reserve(size_t count) { stack_.template Reserve<Ch>(count); }
Ch* Push(size_t count) { return stack_.template Push<Ch>(count); }
+ Ch* PushUnsafe(size_t count) { return stack_.template PushUnsafe<Ch>(count); }
void Pop(size_t count) { stack_.template Pop<Ch>(count); }
const Ch* GetString() const {
@@ -68,8 +78,12 @@ public:
return stack_.template Bottom<Ch>();
}
+ //! Get the size of string in bytes in the string buffer.
size_t GetSize() const { return stack_.GetSize(); }
+ //! Get the length of string in Ch in the string buffer.
+ size_t GetLength() const { return stack_.GetSize() / sizeof(Ch); }
+
static const size_t kDefaultCapacity = 256;
mutable internal::Stack<Allocator> stack_;
@@ -82,6 +96,16 @@ private:
//! String buffer with UTF8 encoding
typedef GenericStringBuffer<UTF8<> > StringBuffer;
+template<typename Encoding, typename Allocator>
+inline void PutReserve(GenericStringBuffer<Encoding, Allocator>& stream, size_t count) {
+ stream.Reserve(count);
+}
+
+template<typename Encoding, typename Allocator>
+inline void PutUnsafe(GenericStringBuffer<Encoding, Allocator>& stream, typename Encoding::Ch c) {
+ stream.PutUnsafe(c);
+}
+
//! Implement specialized version of PutN() with memset() for better performance.
template<>
inline void PutN(GenericStringBuffer<UTF8<> >& stream, char c, size_t n) {
@@ -90,4 +114,8 @@ inline void PutN(GenericStringBuffer<UTF8<> >& stream, char c, size_t n) {
RAPIDJSON_NAMESPACE_END
+#if defined(__clang__)
+RAPIDJSON_DIAG_POP
+#endif
+
#endif // RAPIDJSON_STRINGBUFFER_H_
diff --git a/contrib/rapidjson/include/rapidjson/writer.h b/contrib/rapidjson/include/rapidjson/writer.h
index e1eea38b9..e610ebb60 100644
--- a/contrib/rapidjson/include/rapidjson/writer.h
+++ b/contrib/rapidjson/include/rapidjson/writer.h
@@ -15,7 +15,8 @@
#ifndef RAPIDJSON_WRITER_H_
#define RAPIDJSON_WRITER_H_
-#include "rapidjson.h"
+#include "stream.h"
+#include "internal/meta.h"
#include "internal/stack.h"
#include "internal/strfunc.h"
#include "internal/dtoa.h"
@@ -23,8 +24,16 @@
#include "stringbuffer.h"
#include <new> // placement new
-#if RAPIDJSON_HAS_STDSTRING
-#include <string>
+#if defined(RAPIDJSON_SIMD) && defined(_MSC_VER)
+#include <intrin.h>
+#pragma intrinsic(_BitScanForward)
+#endif
+#ifdef RAPIDJSON_SSE42
+#include <nmmintrin.h>
+#elif defined(RAPIDJSON_SSE2)
+#include <emmintrin.h>
+#elif defined(RAPIDJSON_NEON)
+#include <arm_neon.h>
#endif
#ifdef _MSC_VER
@@ -32,8 +41,36 @@ RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF(4127) // conditional expression is constant
#endif
+#ifdef __clang__
+RAPIDJSON_DIAG_PUSH
+RAPIDJSON_DIAG_OFF(padded)
+RAPIDJSON_DIAG_OFF(unreachable-code)
+RAPIDJSON_DIAG_OFF(c++98-compat)
+#endif
+
RAPIDJSON_NAMESPACE_BEGIN
+///////////////////////////////////////////////////////////////////////////////
+// WriteFlag
+
+/*! \def RAPIDJSON_WRITE_DEFAULT_FLAGS
+ \ingroup RAPIDJSON_CONFIG
+ \brief User-defined kWriteDefaultFlags definition.
+
+ User can define this as any \c WriteFlag combinations.
+*/
+#ifndef RAPIDJSON_WRITE_DEFAULT_FLAGS
+#define RAPIDJSON_WRITE_DEFAULT_FLAGS kWriteNoFlags
+#endif
+
+//! Combination of writeFlags
+enum WriteFlag {
+ kWriteNoFlags = 0, //!< No flags are set.
+ kWriteValidateEncodingFlag = 1, //!< Validate encoding of JSON strings.
+ kWriteNanAndInfFlag = 2, //!< Allow writing of Infinity, -Infinity and NaN.
+ kWriteDefaultFlags = RAPIDJSON_WRITE_DEFAULT_FLAGS //!< Default write flags. Can be customized by defining RAPIDJSON_WRITE_DEFAULT_FLAGS
+};
+
//! JSON writer
/*! Writer implements the concept Handler.
It generates JSON text by events to an output os.
@@ -50,11 +87,13 @@ RAPIDJSON_NAMESPACE_BEGIN
\tparam StackAllocator Type of allocator for allocating memory of stack.
\note implements Handler concept
*/
-template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator>
+template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags>
class Writer {
public:
typedef typename SourceEncoding::Ch Ch;
+ static const int kDefaultMaxDecimalPlaces = 324;
+
//! Constructor
/*! \param os Output stream.
\param stackAllocator User supplied allocator. If it is null, it will create a private one.
@@ -62,11 +101,18 @@ public:
*/
explicit
Writer(OutputStream& os, StackAllocator* stackAllocator = 0, size_t levelDepth = kDefaultLevelDepth) :
- os_(&os), level_stack_(stackAllocator, levelDepth * sizeof(Level)), hasRoot_(false) {}
+ os_(&os), level_stack_(stackAllocator, levelDepth * sizeof(Level)), maxDecimalPlaces_(kDefaultMaxDecimalPlaces), hasRoot_(false) {}
explicit
Writer(StackAllocator* allocator = 0, size_t levelDepth = kDefaultLevelDepth) :
- os_(0), level_stack_(allocator, levelDepth * sizeof(Level)), hasRoot_(false) {}
+ os_(0), level_stack_(allocator, levelDepth * sizeof(Level)), maxDecimalPlaces_(kDefaultMaxDecimalPlaces), hasRoot_(false) {}
+
+#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
+ Writer(Writer&& rhs) :
+ os_(rhs.os_), level_stack_(std::move(rhs.level_stack_)), maxDecimalPlaces_(rhs.maxDecimalPlaces_), hasRoot_(rhs.hasRoot_) {
+ rhs.os_ = 0;
+ }
+#endif
//! Reset the writer with a new stream.
/*!
@@ -100,29 +146,66 @@ public:
return hasRoot_ && level_stack_.Empty();
}
+ int GetMaxDecimalPlaces() const {
+ return maxDecimalPlaces_;
+ }
+
+ //! Sets the maximum number of decimal places for double output.
+ /*!
+ This setting truncates the output with specified number of decimal places.
+
+ For example,
+
+ \code
+ writer.SetMaxDecimalPlaces(3);
+ writer.StartArray();
+ writer.Double(0.12345); // "0.123"
+ writer.Double(0.0001); // "0.0"
+ writer.Double(1.234567890123456e30); // "1.234567890123456e30" (do not truncate significand for positive exponent)
+ writer.Double(1.23e-4); // "0.0" (do truncate significand for negative exponent)
+ writer.EndArray();
+ \endcode
+
+ The default setting does not truncate any decimal places. You can restore to this setting by calling
+ \code
+ writer.SetMaxDecimalPlaces(Writer::kDefaultMaxDecimalPlaces);
+ \endcode
+ */
+ void SetMaxDecimalPlaces(int maxDecimalPlaces) {
+ maxDecimalPlaces_ = maxDecimalPlaces;
+ }
+
/*!@name Implementation of Handler
\see Handler
*/
//@{
- bool Null() { Prefix(kNullType); return WriteNull(); }
- bool Bool(bool b) { Prefix(b ? kTrueType : kFalseType); return WriteBool(b); }
- bool Int(int i) { Prefix(kNumberType); return WriteInt(i); }
- bool Uint(unsigned u) { Prefix(kNumberType); return WriteUint(u); }
- bool Int64(int64_t i64) { Prefix(kNumberType); return WriteInt64(i64); }
- bool Uint64(uint64_t u64) { Prefix(kNumberType); return WriteUint64(u64); }
+ bool Null() { Prefix(kNullType); return EndValue(WriteNull()); }
+ bool Bool(bool b) { Prefix(b ? kTrueType : kFalseType); return EndValue(WriteBool(b)); }
+ bool Int(int i) { Prefix(kNumberType); return EndValue(WriteInt(i)); }
+ bool Uint(unsigned u) { Prefix(kNumberType); return EndValue(WriteUint(u)); }
+ bool Int64(int64_t i64) { Prefix(kNumberType); return EndValue(WriteInt64(i64)); }
+ bool Uint64(uint64_t u64) { Prefix(kNumberType); return EndValue(WriteUint64(u64)); }
//! Writes the given \c double value to the stream
/*!
\param d The value to be written.
\return Whether it is succeed.
*/
- bool Double(double d) { Prefix(kNumberType); return WriteDouble(d); }
+ bool Double(double d) { Prefix(kNumberType); return EndValue(WriteDouble(d)); }
+
+ bool RawNumber(const Ch* str, SizeType length, bool copy = false) {
+ RAPIDJSON_ASSERT(str != 0);
+ (void)copy;
+ Prefix(kNumberType);
+ return EndValue(WriteString(str, length));
+ }
bool String(const Ch* str, SizeType length, bool copy = false) {
+ RAPIDJSON_ASSERT(str != 0);
(void)copy;
Prefix(kStringType);
- return WriteString(str, length);
+ return EndValue(WriteString(str, length));
}
#if RAPIDJSON_HAS_STDSTRING
@@ -138,16 +221,21 @@ public:
}
bool Key(const Ch* str, SizeType length, bool copy = false) { return String(str, length, copy); }
+
+#if RAPIDJSON_HAS_STDSTRING
+ bool Key(const std::basic_string<Ch>& str)
+ {
+ return Key(str.data(), SizeType(str.size()));
+ }
+#endif
bool EndObject(SizeType memberCount = 0) {
(void)memberCount;
- RAPIDJSON_ASSERT(level_stack_.GetSize() >= sizeof(Level));
- RAPIDJSON_ASSERT(!level_stack_.template Top<Level>()->inArray);
+ RAPIDJSON_ASSERT(level_stack_.GetSize() >= sizeof(Level)); // not inside an Object
+ RAPIDJSON_ASSERT(!level_stack_.template Top<Level>()->inArray); // currently inside an Array, not Object
+ RAPIDJSON_ASSERT(0 == level_stack_.template Top<Level>()->valueCount % 2); // Object has a Key without a Value
level_stack_.template Pop<Level>(1);
- bool ret = WriteEndObject();
- if (level_stack_.Empty()) // end of json text
- os_->Flush();
- return ret;
+ return EndValue(WriteEndObject());
}
bool StartArray() {
@@ -161,10 +249,7 @@ public:
RAPIDJSON_ASSERT(level_stack_.GetSize() >= sizeof(Level));
RAPIDJSON_ASSERT(level_stack_.template Top<Level>()->inArray);
level_stack_.template Pop<Level>(1);
- bool ret = WriteEndArray();
- if (level_stack_.Empty()) // end of json text
- os_->Flush();
- return ret;
+ return EndValue(WriteEndArray());
}
//@}
@@ -172,11 +257,33 @@ public:
//@{
//! Simpler but slower overload.
- bool String(const Ch* str) { return String(str, internal::StrLen(str)); }
- bool Key(const Ch* str) { return Key(str, internal::StrLen(str)); }
-
+ bool String(const Ch* const& str) { return String(str, internal::StrLen(str)); }
+ bool Key(const Ch* const& str) { return Key(str, internal::StrLen(str)); }
+
//@}
+ //! Write a raw JSON value.
+ /*!
+ For user to write a stringified JSON as a value.
+
+ \param json A well-formed JSON value. It should not contain null character within [0, length - 1] range.
+ \param length Length of the json.
+ \param type Type of the root of json.
+ */
+ bool RawValue(const Ch* json, size_t length, Type type) {
+ RAPIDJSON_ASSERT(json != 0);
+ Prefix(type);
+ return EndValue(WriteRawValue(json, length));
+ }
+
+ //! Flush the output stream.
+ /*!
+ Allows the user to flush the output stream immediately.
+ */
+ void Flush() {
+ os_->Flush();
+ }
+
protected:
//! Information for each nested level
struct Level {
@@ -188,15 +295,18 @@ protected:
static const size_t kDefaultLevelDepth = 32;
bool WriteNull() {
- os_->Put('n'); os_->Put('u'); os_->Put('l'); os_->Put('l'); return true;
+ PutReserve(*os_, 4);
+ PutUnsafe(*os_, 'n'); PutUnsafe(*os_, 'u'); PutUnsafe(*os_, 'l'); PutUnsafe(*os_, 'l'); return true;
}
bool WriteBool(bool b) {
if (b) {
- os_->Put('t'); os_->Put('r'); os_->Put('u'); os_->Put('e');
+ PutReserve(*os_, 4);
+ PutUnsafe(*os_, 't'); PutUnsafe(*os_, 'r'); PutUnsafe(*os_, 'u'); PutUnsafe(*os_, 'e');
}
else {
- os_->Put('f'); os_->Put('a'); os_->Put('l'); os_->Put('s'); os_->Put('e');
+ PutReserve(*os_, 5);
+ PutUnsafe(*os_, 'f'); PutUnsafe(*os_, 'a'); PutUnsafe(*os_, 'l'); PutUnsafe(*os_, 's'); PutUnsafe(*os_, 'e');
}
return true;
}
@@ -204,45 +314,69 @@ protected:
bool WriteInt(int i) {
char buffer[11];
const char* end = internal::i32toa(i, buffer);
+ PutReserve(*os_, static_cast<size_t>(end - buffer));
for (const char* p = buffer; p != end; ++p)
- os_->Put(*p);
+ PutUnsafe(*os_, static_cast<typename OutputStream::Ch>(*p));
return true;
}
bool WriteUint(unsigned u) {
char buffer[10];
const char* end = internal::u32toa(u, buffer);
+ PutReserve(*os_, static_cast<size_t>(end - buffer));
for (const char* p = buffer; p != end; ++p)
- os_->Put(*p);
+ PutUnsafe(*os_, static_cast<typename OutputStream::Ch>(*p));
return true;
}
bool WriteInt64(int64_t i64) {
char buffer[21];
const char* end = internal::i64toa(i64, buffer);
+ PutReserve(*os_, static_cast<size_t>(end - buffer));
for (const char* p = buffer; p != end; ++p)
- os_->Put(*p);
+ PutUnsafe(*os_, static_cast<typename OutputStream::Ch>(*p));
return true;
}
bool WriteUint64(uint64_t u64) {
char buffer[20];
char* end = internal::u64toa(u64, buffer);
+ PutReserve(*os_, static_cast<size_t>(end - buffer));
for (char* p = buffer; p != end; ++p)
- os_->Put(*p);
+ PutUnsafe(*os_, static_cast<typename OutputStream::Ch>(*p));
return true;
}
bool WriteDouble(double d) {
+ if (internal::Double(d).IsNanOrInf()) {
+ if (!(writeFlags & kWriteNanAndInfFlag))
+ return false;
+ if (internal::Double(d).IsNan()) {
+ PutReserve(*os_, 3);
+ PutUnsafe(*os_, 'N'); PutUnsafe(*os_, 'a'); PutUnsafe(*os_, 'N');
+ return true;
+ }
+ if (internal::Double(d).Sign()) {
+ PutReserve(*os_, 9);
+ PutUnsafe(*os_, '-');
+ }
+ else
+ PutReserve(*os_, 8);
+ PutUnsafe(*os_, 'I'); PutUnsafe(*os_, 'n'); PutUnsafe(*os_, 'f');
+ PutUnsafe(*os_, 'i'); PutUnsafe(*os_, 'n'); PutUnsafe(*os_, 'i'); PutUnsafe(*os_, 't'); PutUnsafe(*os_, 'y');
+ return true;
+ }
+
char buffer[25];
- char* end = internal::dtoa(d, buffer);
+ char* end = internal::dtoa(d, buffer, maxDecimalPlaces_);
+ PutReserve(*os_, static_cast<size_t>(end - buffer));
for (char* p = buffer; p != end; ++p)
- os_->Put(*p);
+ PutUnsafe(*os_, static_cast<typename OutputStream::Ch>(*p));
return true;
}
bool WriteString(const Ch* str, SizeType length) {
- static const char hexDigits[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
+ static const typename OutputStream::Ch hexDigits[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
static const char escape[256] = {
#define Z16 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
//0 1 2 3 4 5 6 7 8 9 A B C D E F
@@ -255,22 +389,27 @@ protected:
#undef Z16
};
- os_->Put('\"');
+ if (TargetEncoding::supportUnicode)
+ PutReserve(*os_, 2 + length * 6); // "\uxxxx..."
+ else
+ PutReserve(*os_, 2 + length * 12); // "\uxxxx\uyyyy..."
+
+ PutUnsafe(*os_, '\"');
GenericStringStream<SourceEncoding> is(str);
- while (is.Tell() < length) {
+ while (ScanWriteUnescapedString(is, length)) {
const Ch c = is.Peek();
- if (!TargetEncoding::supportUnicode && (unsigned)c >= 0x80) {
+ if (!TargetEncoding::supportUnicode && static_cast<unsigned>(c) >= 0x80) {
// Unicode escaping
unsigned codepoint;
- if (!SourceEncoding::Decode(is, &codepoint))
+ if (RAPIDJSON_UNLIKELY(!SourceEncoding::Decode(is, &codepoint)))
return false;
- os_->Put('\\');
- os_->Put('u');
+ PutUnsafe(*os_, '\\');
+ PutUnsafe(*os_, 'u');
if (codepoint <= 0xD7FF || (codepoint >= 0xE000 && codepoint <= 0xFFFF)) {
- os_->Put(hexDigits[(codepoint >> 12) & 15]);
- os_->Put(hexDigits[(codepoint >> 8) & 15]);
- os_->Put(hexDigits[(codepoint >> 4) & 15]);
- os_->Put(hexDigits[(codepoint ) & 15]);
+ PutUnsafe(*os_, hexDigits[(codepoint >> 12) & 15]);
+ PutUnsafe(*os_, hexDigits[(codepoint >> 8) & 15]);
+ PutUnsafe(*os_, hexDigits[(codepoint >> 4) & 15]);
+ PutUnsafe(*os_, hexDigits[(codepoint ) & 15]);
}
else {
RAPIDJSON_ASSERT(codepoint >= 0x010000 && codepoint <= 0x10FFFF);
@@ -278,45 +417,59 @@ protected:
unsigned s = codepoint - 0x010000;
unsigned lead = (s >> 10) + 0xD800;
unsigned trail = (s & 0x3FF) + 0xDC00;
- os_->Put(hexDigits[(lead >> 12) & 15]);
- os_->Put(hexDigits[(lead >> 8) & 15]);
- os_->Put(hexDigits[(lead >> 4) & 15]);
- os_->Put(hexDigits[(lead ) & 15]);
- os_->Put('\\');
- os_->Put('u');
- os_->Put(hexDigits[(trail >> 12) & 15]);
- os_->Put(hexDigits[(trail >> 8) & 15]);
- os_->Put(hexDigits[(trail >> 4) & 15]);
- os_->Put(hexDigits[(trail ) & 15]);
+ PutUnsafe(*os_, hexDigits[(lead >> 12) & 15]);
+ PutUnsafe(*os_, hexDigits[(lead >> 8) & 15]);
+ PutUnsafe(*os_, hexDigits[(lead >> 4) & 15]);
+ PutUnsafe(*os_, hexDigits[(lead ) & 15]);
+ PutUnsafe(*os_, '\\');
+ PutUnsafe(*os_, 'u');
+ PutUnsafe(*os_, hexDigits[(trail >> 12) & 15]);
+ PutUnsafe(*os_, hexDigits[(trail >> 8) & 15]);
+ PutUnsafe(*os_, hexDigits[(trail >> 4) & 15]);
+ PutUnsafe(*os_, hexDigits[(trail ) & 15]);
}
}
- else if ((sizeof(Ch) == 1 || (unsigned)c < 256) && escape[(unsigned char)c]) {
+ else if ((sizeof(Ch) == 1 || static_cast<unsigned>(c) < 256) && RAPIDJSON_UNLIKELY(escape[static_cast<unsigned char>(c)])) {
is.Take();
- os_->Put('\\');
- os_->Put(escape[(unsigned char)c]);
- if (escape[(unsigned char)c] == 'u') {
- os_->Put('0');
- os_->Put('0');
- os_->Put(hexDigits[(unsigned char)c >> 4]);
- os_->Put(hexDigits[(unsigned char)c & 0xF]);
+ PutUnsafe(*os_, '\\');
+ PutUnsafe(*os_, static_cast<typename OutputStream::Ch>(escape[static_cast<unsigned char>(c)]));
+ if (escape[static_cast<unsigned char>(c)] == 'u') {
+ PutUnsafe(*os_, '0');
+ PutUnsafe(*os_, '0');
+ PutUnsafe(*os_, hexDigits[static_cast<unsigned char>(c) >> 4]);
+ PutUnsafe(*os_, hexDigits[static_cast<unsigned char>(c) & 0xF]);
}
}
- else
- if (!Transcoder<SourceEncoding, TargetEncoding>::Transcode(is, *os_))
- return false;
+ else if (RAPIDJSON_UNLIKELY(!(writeFlags & kWriteValidateEncodingFlag ?
+ Transcoder<SourceEncoding, TargetEncoding>::Validate(is, *os_) :
+ Transcoder<SourceEncoding, TargetEncoding>::TranscodeUnsafe(is, *os_))))
+ return false;
}
- os_->Put('\"');
+ PutUnsafe(*os_, '\"');
return true;
}
+ bool ScanWriteUnescapedString(GenericStringStream<SourceEncoding>& is, size_t length) {
+ return RAPIDJSON_LIKELY(is.Tell() < length);
+ }
+
bool WriteStartObject() { os_->Put('{'); return true; }
bool WriteEndObject() { os_->Put('}'); return true; }
bool WriteStartArray() { os_->Put('['); return true; }
bool WriteEndArray() { os_->Put(']'); return true; }
+ bool WriteRawValue(const Ch* json, size_t length) {
+ PutReserve(*os_, length);
+ for (size_t i = 0; i < length; i++) {
+ RAPIDJSON_ASSERT(json[i] != '\0');
+ PutUnsafe(*os_, json[i]);
+ }
+ return true;
+ }
+
void Prefix(Type type) {
(void)type;
- if (level_stack_.GetSize() != 0) { // this value is not at root
+ if (RAPIDJSON_LIKELY(level_stack_.GetSize() != 0)) { // this value is not at root
Level* level = level_stack_.template Top<Level>();
if (level->valueCount > 0) {
if (level->inArray)
@@ -334,8 +487,16 @@ protected:
}
}
+ // Flush the value if it is the top level one.
+ bool EndValue(bool ret) {
+ if (RAPIDJSON_UNLIKELY(level_stack_.Empty())) // end of json text
+ Flush();
+ return ret;
+ }
+
OutputStream* os_;
internal::Stack<StackAllocator> level_stack_;
+ int maxDecimalPlaces_;
bool hasRoot_;
private:
@@ -350,7 +511,7 @@ template<>
inline bool Writer<StringBuffer>::WriteInt(int i) {
char *buffer = os_->Push(11);
const char* end = internal::i32toa(i, buffer);
- os_->Pop(11 - (end - buffer));
+ os_->Pop(static_cast<size_t>(11 - (end - buffer)));
return true;
}
@@ -358,7 +519,7 @@ template<>
inline bool Writer<StringBuffer>::WriteUint(unsigned u) {
char *buffer = os_->Push(10);
const char* end = internal::u32toa(u, buffer);
- os_->Pop(10 - (end - buffer));
+ os_->Pop(static_cast<size_t>(10 - (end - buffer)));
return true;
}
@@ -366,7 +527,7 @@ template<>
inline bool Writer<StringBuffer>::WriteInt64(int64_t i64) {
char *buffer = os_->Push(21);
const char* end = internal::i64toa(i64, buffer);
- os_->Pop(21 - (end - buffer));
+ os_->Pop(static_cast<size_t>(21 - (end - buffer)));
return true;
}
@@ -374,22 +535,177 @@ template<>
inline bool Writer<StringBuffer>::WriteUint64(uint64_t u) {
char *buffer = os_->Push(20);
const char* end = internal::u64toa(u, buffer);
- os_->Pop(20 - (end - buffer));
+ os_->Pop(static_cast<size_t>(20 - (end - buffer)));
return true;
}
template<>
inline bool Writer<StringBuffer>::WriteDouble(double d) {
+ if (internal::Double(d).IsNanOrInf()) {
+ // Note: This code path can only be reached if (RAPIDJSON_WRITE_DEFAULT_FLAGS & kWriteNanAndInfFlag).
+ if (!(kWriteDefaultFlags & kWriteNanAndInfFlag))
+ return false;
+ if (internal::Double(d).IsNan()) {
+ PutReserve(*os_, 3);
+ PutUnsafe(*os_, 'N'); PutUnsafe(*os_, 'a'); PutUnsafe(*os_, 'N');
+ return true;
+ }
+ if (internal::Double(d).Sign()) {
+ PutReserve(*os_, 9);
+ PutUnsafe(*os_, '-');
+ }
+ else
+ PutReserve(*os_, 8);
+ PutUnsafe(*os_, 'I'); PutUnsafe(*os_, 'n'); PutUnsafe(*os_, 'f');
+ PutUnsafe(*os_, 'i'); PutUnsafe(*os_, 'n'); PutUnsafe(*os_, 'i'); PutUnsafe(*os_, 't'); PutUnsafe(*os_, 'y');
+ return true;
+ }
+
char *buffer = os_->Push(25);
- char* end = internal::dtoa(d, buffer);
- os_->Pop(25 - (end - buffer));
+ char* end = internal::dtoa(d, buffer, maxDecimalPlaces_);
+ os_->Pop(static_cast<size_t>(25 - (end - buffer)));
return true;
}
+#if defined(RAPIDJSON_SSE2) || defined(RAPIDJSON_SSE42)
+template<>
+inline bool Writer<StringBuffer>::ScanWriteUnescapedString(StringStream& is, size_t length) {
+ if (length < 16)
+ return RAPIDJSON_LIKELY(is.Tell() < length);
+
+ if (!RAPIDJSON_LIKELY(is.Tell() < length))
+ return false;
+
+ const char* p = is.src_;
+ const char* end = is.head_ + length;
+ const char* nextAligned = reinterpret_cast<const char*>((reinterpret_cast<size_t>(p) + 15) & static_cast<size_t>(~15));
+ const char* endAligned = reinterpret_cast<const char*>(reinterpret_cast<size_t>(end) & static_cast<size_t>(~15));
+ if (nextAligned > end)
+ return true;
+
+ while (p != nextAligned)
+ if (*p < 0x20 || *p == '\"' || *p == '\\') {
+ is.src_ = p;
+ return RAPIDJSON_LIKELY(is.Tell() < length);
+ }
+ else
+ os_->PutUnsafe(*p++);
+
+ // The rest of string using SIMD
+ static const char dquote[16] = { '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"' };
+ static const char bslash[16] = { '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\' };
+ static const char space[16] = { 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F };
+ const __m128i dq = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&dquote[0]));
+ const __m128i bs = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&bslash[0]));
+ const __m128i sp = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&space[0]));
+
+ for (; p != endAligned; p += 16) {
+ const __m128i s = _mm_load_si128(reinterpret_cast<const __m128i *>(p));
+ const __m128i t1 = _mm_cmpeq_epi8(s, dq);
+ const __m128i t2 = _mm_cmpeq_epi8(s, bs);
+ const __m128i t3 = _mm_cmpeq_epi8(_mm_max_epu8(s, sp), sp); // s < 0x20 <=> max(s, 0x1F) == 0x1F
+ const __m128i x = _mm_or_si128(_mm_or_si128(t1, t2), t3);
+ unsigned short r = static_cast<unsigned short>(_mm_movemask_epi8(x));
+ if (RAPIDJSON_UNLIKELY(r != 0)) { // some of characters is escaped
+ SizeType len;
+#ifdef _MSC_VER // Find the index of first escaped
+ unsigned long offset;
+ _BitScanForward(&offset, r);
+ len = offset;
+#else
+ len = static_cast<SizeType>(__builtin_ffs(r) - 1);
+#endif
+ char* q = reinterpret_cast<char*>(os_->PushUnsafe(len));
+ for (size_t i = 0; i < len; i++)
+ q[i] = p[i];
+
+ p += len;
+ break;
+ }
+ _mm_storeu_si128(reinterpret_cast<__m128i *>(os_->PushUnsafe(16)), s);
+ }
+
+ is.src_ = p;
+ return RAPIDJSON_LIKELY(is.Tell() < length);
+}
+#elif defined(RAPIDJSON_NEON)
+template<>
+inline bool Writer<StringBuffer>::ScanWriteUnescapedString(StringStream& is, size_t length) {
+ if (length < 16)
+ return RAPIDJSON_LIKELY(is.Tell() < length);
+
+ if (!RAPIDJSON_LIKELY(is.Tell() < length))
+ return false;
+
+ const char* p = is.src_;
+ const char* end = is.head_ + length;
+ const char* nextAligned = reinterpret_cast<const char*>((reinterpret_cast<size_t>(p) + 15) & static_cast<size_t>(~15));
+ const char* endAligned = reinterpret_cast<const char*>(reinterpret_cast<size_t>(end) & static_cast<size_t>(~15));
+ if (nextAligned > end)
+ return true;
+
+ while (p != nextAligned)
+ if (*p < 0x20 || *p == '\"' || *p == '\\') {
+ is.src_ = p;
+ return RAPIDJSON_LIKELY(is.Tell() < length);
+ }
+ else
+ os_->PutUnsafe(*p++);
+
+ // The rest of string using SIMD
+ const uint8x16_t s0 = vmovq_n_u8('"');
+ const uint8x16_t s1 = vmovq_n_u8('\\');
+ const uint8x16_t s2 = vmovq_n_u8('\b');
+ const uint8x16_t s3 = vmovq_n_u8(32);
+
+ for (; p != endAligned; p += 16) {
+ const uint8x16_t s = vld1q_u8(reinterpret_cast<const uint8_t *>(p));
+ uint8x16_t x = vceqq_u8(s, s0);
+ x = vorrq_u8(x, vceqq_u8(s, s1));
+ x = vorrq_u8(x, vceqq_u8(s, s2));
+ x = vorrq_u8(x, vcltq_u8(s, s3));
+
+ x = vrev64q_u8(x); // Rev in 64
+ uint64_t low = vgetq_lane_u64(reinterpret_cast<uint64x2_t>(x), 0); // extract
+ uint64_t high = vgetq_lane_u64(reinterpret_cast<uint64x2_t>(x), 1); // extract
+
+ SizeType len = 0;
+ bool escaped = false;
+ if (low == 0) {
+ if (high != 0) {
+ unsigned lz = (unsigned)__builtin_clzll(high);
+ len = 8 + (lz >> 3);
+ escaped = true;
+ }
+ } else {
+ unsigned lz = (unsigned)__builtin_clzll(low);
+ len = lz >> 3;
+ escaped = true;
+ }
+ if (RAPIDJSON_UNLIKELY(escaped)) { // some of characters is escaped
+ char* q = reinterpret_cast<char*>(os_->PushUnsafe(len));
+ for (size_t i = 0; i < len; i++)
+ q[i] = p[i];
+
+ p += len;
+ break;
+ }
+ vst1q_u8(reinterpret_cast<uint8_t *>(os_->PushUnsafe(16)), s);
+ }
+
+ is.src_ = p;
+ return RAPIDJSON_LIKELY(is.Tell() < length);
+}
+#endif // RAPIDJSON_NEON
+
RAPIDJSON_NAMESPACE_END
#ifdef _MSC_VER
RAPIDJSON_DIAG_POP
#endif
+#ifdef __clang__
+RAPIDJSON_DIAG_POP
+#endif
+
#endif // RAPIDJSON_RAPIDJSON_H_
diff --git a/contrib/rapidjson/license.txt b/contrib/rapidjson/license.txt
index 879293afa..7ccc161c8 100644
--- a/contrib/rapidjson/license.txt
+++ b/contrib/rapidjson/license.txt
@@ -3,7 +3,7 @@ Tencent is pleased to support the open source community by making RapidJSON avai
Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
If you have downloaded a copy of the RapidJSON binary from Tencent, please note that the RapidJSON binary is licensed under the MIT License.
-If you have downloaded a copy of the RapidJSON source code from Tencent, please note that RapidJSON source code is licensed under the MIT License, except for the third-party components listed below which are subject to different license terms. Your integration of RapidJSON into your own projects may require compliance with the MIT License, as well as the other licenses applicable to the third-party components included within RapidJSON.
+If you have downloaded a copy of the RapidJSON source code from Tencent, please note that RapidJSON source code is licensed under the MIT License, except for the third-party components listed below which are subject to different license terms. Your integration of RapidJSON into your own projects may require compliance with the MIT License, as well as the other licenses applicable to the third-party components included within RapidJSON. To avoid the problematic JSON license in your own projects, it's sufficient to exclude the bin/jsonchecker/ directory, as it's the only code under the JSON license.
A copy of the MIT License is included in this file.
Other dependencies and licenses:
diff --git a/contrib/rapidjson/readme.md b/contrib/rapidjson/readme.md
index 19da38667..b833a98e8 100644
--- a/contrib/rapidjson/readme.md
+++ b/contrib/rapidjson/readme.md
@@ -1,17 +1,17 @@
-![](doc/logo/rapidjson.png)
+![RapidJSON logo](doc/logo/rapidjson.png)
-![](https://img.shields.io/badge/release-v1.0.2-blue.png)
+![Release version](https://img.shields.io/badge/release-v1.1.0-blue.svg)
-## A fast JSON parser/generator for C++ with both SAX/DOM style API
+## A fast JSON parser/generator for C++ with both SAX/DOM style API
Tencent is pleased to support the open source community by making RapidJSON available.
Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-* [RapidJSON GitHub](https://github.com/miloyip/rapidjson/)
+* [RapidJSON GitHub](https://github.com/Tencent/rapidjson/)
* RapidJSON Documentation
- * [English](http://miloyip.github.io/rapidjson/)
- * [简体中文](http://miloyip.github.io/rapidjson/zh-cn/)
+ * [English](http://rapidjson.org/)
+ * [简体中文](http://rapidjson.org/zh-cn/)
* [GitBook](https://www.gitbook.com/book/miloyip/rapidjson/) with downloadable PDF/EPUB/MOBI, without API reference.
## Build status
@@ -20,33 +20,43 @@ Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights
| :---------------: | :-----------------: | :-------------------: |
| ![lin-badge] | ![win-badge] | ![cov-badge] |
-[lin-badge]: https://travis-ci.org/miloyip/rapidjson.png?branch=master "Travis build status"
-[lin-link]: https://travis-ci.org/miloyip/rapidjson "Travis build status"
-[win-badge]: https://ci.appveyor.com/api/projects/status/u658dcuwxo14a8m9/branch/master "AppVeyor build status"
-[win-link]: https://ci.appveyor.com/project/miloyip/rapidjson/branch/master "AppVeyor build status"
-[cov-badge]: https://coveralls.io/repos/miloyip/rapidjson/badge.png?branch=master
-[cov-link]: https://coveralls.io/r/miloyip/rapidjson?branch=master
+[lin-badge]: https://travis-ci.org/Tencent/rapidjson.svg?branch=master "Travis build status"
+[lin-link]: https://travis-ci.org/Tencent/rapidjson "Travis build status"
+[win-badge]: https://ci.appveyor.com/api/projects/status/l6qulgqahcayidrf/branch/master?svg=true "AppVeyor build status"
+[win-link]: https://ci.appveyor.com/project/miloyip/rapidjson-0fdqj/branch/master "AppVeyor build status"
+[cov-badge]: https://coveralls.io/repos/Tencent/rapidjson/badge.svg?branch=master "Coveralls coverage"
+[cov-link]: https://coveralls.io/r/Tencent/rapidjson?branch=master "Coveralls coverage"
## Introduction
RapidJSON is a JSON parser and generator for C++. It was inspired by [RapidXml](http://rapidxml.sourceforge.net/).
-* RapidJSON is small but complete. It supports both SAX and DOM style API. The SAX parser is only a half thousand lines of code.
+* RapidJSON is **small** but **complete**. It supports both SAX and DOM style API. The SAX parser is only a half thousand lines of code.
-* RapidJSON is fast. Its performance can be comparable to `strlen()`. It also optionally supports SSE2/SSE4.2 for acceleration.
+* RapidJSON is **fast**. Its performance can be comparable to `strlen()`. It also optionally supports SSE2/SSE4.2 for acceleration.
-* RapidJSON is self-contained. It does not depend on external libraries such as BOOST. It even does not depend on STL.
+* RapidJSON is **self-contained** and **header-only**. It does not depend on external libraries such as BOOST. It even does not depend on STL.
-* RapidJSON is memory friendly. Each JSON value occupies exactly 16/20 bytes for most 32/64-bit machines (excluding text string). By default it uses a fast memory allocator, and the parser allocates memory compactly during parsing.
+* RapidJSON is **memory-friendly**. Each JSON value occupies exactly 16 bytes for most 32/64-bit machines (excluding text string). By default it uses a fast memory allocator, and the parser allocates memory compactly during parsing.
-* RapidJSON is Unicode friendly. It supports UTF-8, UTF-16, UTF-32 (LE & BE), and their detection, validation and transcoding internally. For example, you can read a UTF-8 file and let RapidJSON transcode the JSON strings into UTF-16 in the DOM. It also supports surrogates and "\u0000" (null character).
+* RapidJSON is **Unicode-friendly**. It supports UTF-8, UTF-16, UTF-32 (LE & BE), and their detection, validation and transcoding internally. For example, you can read a UTF-8 file and let RapidJSON transcode the JSON strings into UTF-16 in the DOM. It also supports surrogates and "\u0000" (null character).
More features can be read [here](doc/features.md).
-JSON(JavaScript Object Notation) is a light-weight data exchange format. RapidJSON should be in fully compliance with RFC7159/ECMA-404. More information about JSON can be obtained at
+JSON(JavaScript Object Notation) is a light-weight data exchange format. RapidJSON should be in fully compliance with RFC7159/ECMA-404, with optional support of relaxed syntax. More information about JSON can be obtained at
* [Introducing JSON](http://json.org/)
-* [RFC7159: The JavaScript Object Notation (JSON) Data Interchange Format](http://www.ietf.org/rfc/rfc7159.txt)
-* [Standard ECMA-404: The JSON Data Interchange Format](http://www.ecma-international.org/publications/standards/Ecma-404.htm)
+* [RFC7159: The JavaScript Object Notation (JSON) Data Interchange Format](https://tools.ietf.org/html/rfc7159)
+* [Standard ECMA-404: The JSON Data Interchange Format](https://www.ecma-international.org/publications/standards/Ecma-404.htm)
+
+## Highlights in v1.1 (2016-8-25)
+
+* Added [JSON Pointer](doc/pointer.md)
+* Added [JSON Schema](doc/schema.md)
+* Added [relaxed JSON syntax](doc/dom.md) (comment, trailing comma, NaN/Infinity)
+* Iterating array/object with [C++11 Range-based for loop](doc/tutorial.md)
+* Reduce memory overhead of each `Value` from 24 bytes to 16 bytes in x86-64 architecture.
+
+For other changes please refer to [change log](CHANGELOG.md).
## Compatibility
@@ -63,9 +73,9 @@ Users can build and run the unit tests on their platform/compiler.
RapidJSON is a header-only C++ library. Just copy the `include/rapidjson` folder to system or project's include path.
RapidJSON uses following software as its dependencies:
-* [CMake](http://www.cmake.org) as a general build tool
-* (optional)[Doxygen](http://www.doxygen.org) to build documentation
-* (optional)[googletest](https://code.google.com/p/googletest/) for unit and performance testing
+* [CMake](https://cmake.org/) as a general build tool
+* (optional) [Doxygen](http://www.doxygen.org) to build documentation
+* (optional) [googletest](https://github.com/google/googletest) for unit and performance testing
To generate user documentation and run tests please proceed with the steps below:
@@ -74,7 +84,7 @@ To generate user documentation and run tests please proceed with the steps below
3. Change to `build` directory and run `cmake ..` command to configure your build. Windows users can do the same with cmake-gui application.
4. On Windows, build the solution found in the build directory. On Linux, run `make` from the build directory.
-On successfull build you will find compiled test and example binaries in `bin`
+On successful build you will find compiled test and example binaries in `bin`
directory. The generated documentation will be available in `doc/html`
directory of the build tree. To run tests after finished build please run `make
test` or `ctest` from your build tree. You can get detailed output using `ctest
@@ -126,4 +136,25 @@ The following diagram shows the process.
![simpledom](doc/diagram/simpledom.png)
-More [examples](https://github.com/miloyip/rapidjson/tree/master/example) are available.
+More [examples](https://github.com/Tencent/rapidjson/tree/master/example) are available:
+
+* DOM API
+ * [tutorial](https://github.com/Tencent/rapidjson/blob/master/example/tutorial/tutorial.cpp): Basic usage of DOM API.
+
+* SAX API
+ * [simplereader](https://github.com/Tencent/rapidjson/blob/master/example/simplereader/simplereader.cpp): Dumps all SAX events while parsing a JSON by `Reader`.
+ * [condense](https://github.com/Tencent/rapidjson/blob/master/example/condense/condense.cpp): A command line tool to rewrite a JSON, with all whitespaces removed.
+ * [pretty](https://github.com/Tencent/rapidjson/blob/master/example/pretty/pretty.cpp): A command line tool to rewrite a JSON with indents and newlines by `PrettyWriter`.
+ * [capitalize](https://github.com/Tencent/rapidjson/blob/master/example/capitalize/capitalize.cpp): A command line tool to capitalize strings in JSON.
+ * [messagereader](https://github.com/Tencent/rapidjson/blob/master/example/messagereader/messagereader.cpp): Parse a JSON message with SAX API.
+ * [serialize](https://github.com/Tencent/rapidjson/blob/master/example/serialize/serialize.cpp): Serialize a C++ object into JSON with SAX API.
+ * [jsonx](https://github.com/Tencent/rapidjson/blob/master/example/jsonx/jsonx.cpp): Implements a `JsonxWriter` which stringify SAX events into [JSONx](https://www-01.ibm.com/support/knowledgecenter/SS9H2Y_7.1.0/com.ibm.dp.doc/json_jsonx.html) (a kind of XML) format. The example is a command line tool which converts input JSON into JSONx format.
+
+* Schema
+ * [schemavalidator](https://github.com/Tencent/rapidjson/blob/master/example/schemavalidator/schemavalidator.cpp) : A command line tool to validate a JSON with a JSON schema.
+
+* Advanced
+ * [prettyauto](https://github.com/Tencent/rapidjson/blob/master/example/prettyauto/prettyauto.cpp): A modified version of [pretty](https://github.com/Tencent/rapidjson/blob/master/example/pretty/pretty.cpp) to automatically handle JSON with any UTF encodings.
+ * [parsebyparts](https://github.com/Tencent/rapidjson/blob/master/example/parsebyparts/parsebyparts.cpp): Implements an `AsyncDocumentParser` which can parse JSON in parts, using C++11 thread.
+ * [filterkey](https://github.com/Tencent/rapidjson/blob/master/example/filterkey/filterkey.cpp): A command line tool to remove all values with user-specified key.
+ * [filterkeydom](https://github.com/Tencent/rapidjson/blob/master/example/filterkeydom/filterkeydom.cpp): Same tool as above, but it demonstrates how to use a generator to populate a `Document`.
diff --git a/contrib/unzip/crypt.h b/contrib/unzip/crypt.h
index 622f4bc2e..2aa99c284 100644
--- a/contrib/unzip/crypt.h
+++ b/contrib/unzip/crypt.h
@@ -32,7 +32,7 @@
/***********************************************************************
* Return the next byte in the pseudo-random sequence
*/
-static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab)
+static int decrypt_byte(unsigned long* pkeys, const z_crc_t* pcrc_32_tab)
{
unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an
* unpredictable manner on 16-bit systems; not a problem
@@ -45,7 +45,7 @@ static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab)
/***********************************************************************
* Update the encryption keys with the next byte of plain text
*/
-static int update_keys(unsigned long* pkeys,const unsigned long* pcrc_32_tab,int c)
+static int update_keys(unsigned long* pkeys,const z_crc_t* pcrc_32_tab,int c)
{
(*(pkeys+0)) = CRC32((*(pkeys+0)), c);
(*(pkeys+1)) += (*(pkeys+0)) & 0xff;
@@ -62,7 +62,7 @@ static int update_keys(unsigned long* pkeys,const unsigned long* pcrc_32_tab,int
* Initialize the encryption keys and the random header according to
* the given password.
*/
-static void init_keys(const char* passwd,unsigned long* pkeys,const unsigned long* pcrc_32_tab)
+static void init_keys(const char* passwd,unsigned long* pkeys,const z_crc_t* pcrc_32_tab)
{
*(pkeys+0) = 305419896L;
*(pkeys+1) = 591751049L;
diff --git a/contrib/unzip/ioapi.c b/contrib/unzip/ioapi.c
index b7200df75..f1bee23e6 100644
--- a/contrib/unzip/ioapi.c
+++ b/contrib/unzip/ioapi.c
@@ -10,11 +10,7 @@
#include <stdlib.h>
#include <string.h>
-# ifdef ASSIMP_BUILD_NO_OWN_ZLIB
-# include <zlib.h>
-# else
-# include "../zlib/zlib.h"
-# endif
+#include "zlib.h"
#include "ioapi.h"
@@ -33,40 +29,40 @@
#define SEEK_SET 0
#endif
-voidpf ZCALLBACK fopen_file_func (
+voidpf ZCALLBACK fopen_file_func OF((
voidpf opaque,
const char* filename,
- int mode);
+ int mode));
-uLong ZCALLBACK fread_file_func (
+uLong ZCALLBACK fread_file_func OF((
voidpf opaque,
voidpf stream,
void* buf,
- uLong size);
+ uLong size));
-uLong ZCALLBACK fwrite_file_func (
+uLong ZCALLBACK fwrite_file_func OF((
voidpf opaque,
voidpf stream,
const void* buf,
- uLong size);
+ uLong size));
-long ZCALLBACK ftell_file_func (
+long ZCALLBACK ftell_file_func OF((
voidpf opaque,
- voidpf stream);
+ voidpf stream));
-long ZCALLBACK fseek_file_func (
+long ZCALLBACK fseek_file_func OF((
voidpf opaque,
voidpf stream,
uLong offset,
- int origin);
+ int origin));
-int ZCALLBACK fclose_file_func (
+int ZCALLBACK fclose_file_func OF((
voidpf opaque,
- voidpf stream);
+ voidpf stream));
-int ZCALLBACK ferror_file_func (
+int ZCALLBACK ferror_file_func OF((
voidpf opaque,
- voidpf stream);
+ voidpf stream));
voidpf ZCALLBACK fopen_file_func (opaque, filename, mode)
diff --git a/contrib/unzip/ioapi.h b/contrib/unzip/ioapi.h
index 06fdd15e9..7d457baab 100644
--- a/contrib/unzip/ioapi.h
+++ b/contrib/unzip/ioapi.h
@@ -35,13 +35,13 @@
extern "C" {
#endif
-typedef voidpf (ZCALLBACK *open_file_func) (voidpf opaque, const char* filename, int mode);
-typedef uLong (ZCALLBACK *read_file_func) (voidpf opaque, voidpf stream, void* buf, uLong size);
-typedef uLong (ZCALLBACK *write_file_func)(voidpf opaque, voidpf stream, const void* buf, uLong size);
-typedef long (ZCALLBACK *tell_file_func) (voidpf opaque, voidpf stream);
-typedef long (ZCALLBACK *seek_file_func) (voidpf opaque, voidpf stream, uLong offset, int origin);
-typedef int (ZCALLBACK *close_file_func) (voidpf opaque, voidpf stream);
-typedef int (ZCALLBACK *testerror_file_func) (voidpf opaque, voidpf stream);
+typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode));
+typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size));
+typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size));
+typedef long (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream));
+typedef long (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin));
+typedef int (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream));
+typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream));
typedef struct zlib_filefunc_def_s
{
@@ -57,7 +57,7 @@ typedef struct zlib_filefunc_def_s
-void fill_fopen_filefunc (zlib_filefunc_def* pzlib_filefunc_def);
+void fill_fopen_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def));
#define ZREAD(filefunc,filestream,buf,size) ((*((filefunc).zread_file))((filefunc).opaque,filestream,buf,size))
#define ZWRITE(filefunc,filestream,buf,size) ((*((filefunc).zwrite_file))((filefunc).opaque,filestream,buf,size))
diff --git a/contrib/unzip/unzip.c b/contrib/unzip/unzip.c
index af00f7d6f..fea6e8913 100644
--- a/contrib/unzip/unzip.c
+++ b/contrib/unzip/unzip.c
@@ -38,7 +38,12 @@ woven in by Terry Thorsen 1/2003.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "./unzip.h"
+#include "zlib.h"
+#include "unzip.h"
+
+#if ZLIB_VERNUM < 0x1270
+typedef unsigned long z_crc_t;
+#endif
#ifdef STDC
# include <stddef.h>
@@ -146,7 +151,7 @@ typedef struct
int encrypted;
# ifndef NOUNCRYPT
unsigned long keys[3]; /* keys defining the pseudo-random sequence */
- const unsigned long* pcrc_32_tab;
+ const z_crc_t* pcrc_32_tab;
# endif
} unz_s;
@@ -162,10 +167,10 @@ typedef struct
*/
-local int unzlocal_getByte (
+local int unzlocal_getByte OF((
const zlib_filefunc_def* pzlib_filefunc_def,
voidpf filestream,
- int *pi);
+ int *pi));
local int unzlocal_getByte(pzlib_filefunc_def,filestream,pi)
const zlib_filefunc_def* pzlib_filefunc_def;
@@ -192,10 +197,10 @@ local int unzlocal_getByte(pzlib_filefunc_def,filestream,pi)
/* ===========================================================================
Reads a long in LSB order from the given gz_stream. Sets
*/
-local int unzlocal_getShort (
+local int unzlocal_getShort OF((
const zlib_filefunc_def* pzlib_filefunc_def,
voidpf filestream,
- uLong *pX);
+ uLong *pX));
local int unzlocal_getShort (pzlib_filefunc_def,filestream,pX)
const zlib_filefunc_def* pzlib_filefunc_def;
@@ -203,7 +208,7 @@ local int unzlocal_getShort (pzlib_filefunc_def,filestream,pX)
uLong *pX;
{
uLong x ;
- int i;
+ int i = 0;
int err;
err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
@@ -220,10 +225,10 @@ local int unzlocal_getShort (pzlib_filefunc_def,filestream,pX)
return err;
}
-local int unzlocal_getLong (
+local int unzlocal_getLong OF((
const zlib_filefunc_def* pzlib_filefunc_def,
voidpf filestream,
- uLong *pX);
+ uLong *pX));
local int unzlocal_getLong (pzlib_filefunc_def,filestream,pX)
const zlib_filefunc_def* pzlib_filefunc_def;
@@ -231,7 +236,7 @@ local int unzlocal_getLong (pzlib_filefunc_def,filestream,pX)
uLong *pX;
{
uLong x ;
- int i;
+ int i = 0;
int err;
err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
@@ -323,9 +328,9 @@ extern int ZEXPORT unzStringFileNameCompare (fileName1,fileName2,iCaseSensitivit
Locate the Central directory of a zipfile (at the end, just before
the global comment)
*/
-local uLong unzlocal_SearchCentralDir (
+local uLong unzlocal_SearchCentralDir OF((
const zlib_filefunc_def* pzlib_filefunc_def,
- voidpf filestream);
+ voidpf filestream));
local uLong unzlocal_SearchCentralDir(pzlib_filefunc_def,filestream)
const zlib_filefunc_def* pzlib_filefunc_def;
@@ -562,7 +567,7 @@ local void unzlocal_DosDateToTmuDate (ulDosDate, ptm)
/*
Get Info about the current file in the zipfile, with internal only info
*/
-local int unzlocal_GetCurrentFileInfoInternal (unzFile file,
+local int unzlocal_GetCurrentFileInfoInternal OF((unzFile file,
unz_file_info *pfile_info,
unz_file_info_internal
*pfile_info_internal,
@@ -571,7 +576,7 @@ local int unzlocal_GetCurrentFileInfoInternal (unzFile file,
void *extraField,
uLong extraFieldBufferSize,
char *szComment,
- uLong commentBufferSize);
+ uLong commentBufferSize));
local int unzlocal_GetCurrentFileInfoInternal (file,
pfile_info,
@@ -609,9 +614,13 @@ local int unzlocal_GetCurrentFileInfoInternal (file,
if (err==UNZ_OK)
{
if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK)
+ {
err=UNZ_ERRNO;
+ }
else if (uMagic!=0x02014b50)
+ {
err=UNZ_BADZIPFILE;
+ }
}
if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.version) != UNZ_OK)
@@ -701,8 +710,9 @@ local int unzlocal_GetCurrentFileInfoInternal (file,
lSeek += file_info.size_file_extra - uSizeRead;
}
else
+ {
lSeek+=file_info.size_file_extra;
-
+ }
if ((err==UNZ_OK) && (szComment!=NULL))
{
@@ -713,22 +723,22 @@ local int unzlocal_GetCurrentFileInfoInternal (file,
uSizeRead = file_info.size_file_comment;
}
else
+ {
uSizeRead = commentBufferSize;
+ }
if (lSeek!=0)
{
- if (ZSEEK(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
- lSeek=0;
- else
+ if (ZSEEK(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)!=0)
err=UNZ_ERRNO;
}
if ((file_info.size_file_comment>0) && (commentBufferSize>0))
if (ZREAD(s->z_filefunc, s->filestream,szComment,uSizeRead)!=uSizeRead)
err=UNZ_ERRNO;
- lSeek+=file_info.size_file_comment - uSizeRead;
}
else
- lSeek+=file_info.size_file_comment;
+ {
+ }
if ((err==UNZ_OK) && (pfile_info!=NULL))
*pfile_info=file_info;
@@ -988,7 +998,7 @@ local int unzlocal_CheckCurrentFileCoherencyHeader (s,piSizeVar,
else if (uMagic!=0x04034b50)
err=UNZ_BADZIPFILE;
}
-
+
if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK)
err=UNZ_ERRNO;
/*
@@ -1119,7 +1129,7 @@ extern int ZEXPORT unzOpenCurrentFile3 (file, method, level, raw, password)
if ((s->cur_file_info.compression_method!=0) &&
(s->cur_file_info.compression_method!=Z_DEFLATED))
- err=UNZ_BADZIPFILE;
+ return UNZ_BADZIPFILE;
pfile_in_zip_read_info->crc32_wait=s->cur_file_info.crc;
pfile_in_zip_read_info->crc32=0;
@@ -1541,6 +1551,7 @@ extern int ZEXPORT unzGetGlobalComment (file, szComment, uSizeBuf)
char *szComment;
uLong uSizeBuf;
{
+ int err=UNZ_OK;
unz_s* s;
uLong uReadThis ;
if (file==NULL)
diff --git a/contrib/unzip/unzip.h b/contrib/unzip/unzip.h
index e3b7f24ee..b247937c8 100644
--- a/contrib/unzip/unzip.h
+++ b/contrib/unzip/unzip.h
@@ -50,11 +50,7 @@ extern "C" {
#endif
#ifndef _ZLIB_H
-# ifdef ASSIMP_BUILD_NO_OWN_ZLIB
-# include <zlib.h>
-# else
-# include "../zlib/zlib.h"
-# endif
+#include "zlib.h"
#endif
#ifndef _ZLIBIOAPI_H
@@ -123,9 +119,9 @@ typedef struct unz_file_info_s
tm_unz tmu_date;
} unz_file_info;
-extern int ZEXPORT unzStringFileNameCompare (const char* fileName1,
+extern int ZEXPORT unzStringFileNameCompare OF ((const char* fileName1,
const char* fileName2,
- int iCaseSensitivity);
+ int iCaseSensitivity));
/*
Compare two filename (fileName1,fileName2).
If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp)
@@ -136,7 +132,7 @@ extern int ZEXPORT unzStringFileNameCompare (const char* fileName1,
*/
-extern unzFile ZEXPORT unzOpen (const char *path);
+extern unzFile ZEXPORT unzOpen OF((const char *path));
/*
Open a Zip file. path contain the full pathname (by example,
on a Windows XP computer "c:\\zlib\\zlib113.zip" or on an Unix computer
@@ -147,31 +143,31 @@ extern unzFile ZEXPORT unzOpen (const char *path);
of this unzip package.
*/
-extern unzFile ZEXPORT unzOpen2 (const char *path,
- zlib_filefunc_def* pzlib_filefunc_def);
+extern unzFile ZEXPORT unzOpen2 OF((const char *path,
+ zlib_filefunc_def* pzlib_filefunc_def));
/*
Open a Zip file, like unzOpen, but provide a set of file low level API
for read/write the zip file (see ioapi.h)
*/
-extern int ZEXPORT unzClose (unzFile file);
+extern int ZEXPORT unzClose OF((unzFile file));
/*
Close a ZipFile opened with unzipOpen.
If there is files inside the .Zip opened with unzOpenCurrentFile (see later),
these files MUST be closed with unzipCloseCurrentFile before call unzipClose.
return UNZ_OK if there is no problem. */
-extern int ZEXPORT unzGetGlobalInfo (unzFile file,
- unz_global_info *pglobal_info);
+extern int ZEXPORT unzGetGlobalInfo OF((unzFile file,
+ unz_global_info *pglobal_info));
/*
Write info about the ZipFile in the *pglobal_info structure.
No preparation of the structure is needed
return UNZ_OK if there is no problem. */
-extern int ZEXPORT unzGetGlobalComment (unzFile file,
+extern int ZEXPORT unzGetGlobalComment OF((unzFile file,
char *szComment,
- uLong uSizeBuf);
+ uLong uSizeBuf));
/*
Get the global comment string of the ZipFile, in the szComment buffer.
uSizeBuf is the size of the szComment buffer.
@@ -182,22 +178,22 @@ extern int ZEXPORT unzGetGlobalComment (unzFile file,
/***************************************************************************/
/* Unzip package allow you browse the directory of the zipfile */
-extern int ZEXPORT unzGoToFirstFile (unzFile file);
+extern int ZEXPORT unzGoToFirstFile OF((unzFile file));
/*
Set the current file of the zipfile to the first file.
return UNZ_OK if there is no problem
*/
-extern int ZEXPORT unzGoToNextFile (unzFile file);
+extern int ZEXPORT unzGoToNextFile OF((unzFile file));
/*
Set the current file of the zipfile to the next file.
return UNZ_OK if there is no problem
return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest.
*/
-extern int ZEXPORT unzLocateFile (unzFile file,
+extern int ZEXPORT unzLocateFile OF((unzFile file,
const char *szFileName,
- int iCaseSensitivity);
+ int iCaseSensitivity));
/*
Try locate the file szFileName in the zipfile.
For the iCaseSensitivity signification, see unzStringFileNameCompare
@@ -227,14 +223,14 @@ extern int ZEXPORT unzGoToFilePos(
/* ****************************************** */
-extern int ZEXPORT unzGetCurrentFileInfo (unzFile file,
+extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file,
unz_file_info *pfile_info,
char *szFileName,
uLong fileNameBufferSize,
void *extraField,
uLong extraFieldBufferSize,
char *szComment,
- uLong commentBufferSize);
+ uLong commentBufferSize));
/*
Get Info about the current file
if pfile_info!=NULL, the *pfile_info structure will contain somes info about
@@ -253,24 +249,24 @@ extern int ZEXPORT unzGetCurrentFileInfo (unzFile file,
from it, and close it (you can close it before reading all the file)
*/
-extern int ZEXPORT unzOpenCurrentFile (unzFile file);
+extern int ZEXPORT unzOpenCurrentFile OF((unzFile file));
/*
Open for reading data the current file in the zipfile.
If there is no error, the return value is UNZ_OK.
*/
-extern int ZEXPORT unzOpenCurrentFilePassword (unzFile file,
- const char* password);
+extern int ZEXPORT unzOpenCurrentFilePassword OF((unzFile file,
+ const char* password));
/*
Open for reading data the current file in the zipfile.
password is a crypting password
If there is no error, the return value is UNZ_OK.
*/
-extern int ZEXPORT unzOpenCurrentFile2 (unzFile file,
+extern int ZEXPORT unzOpenCurrentFile2 OF((unzFile file,
int* method,
int* level,
- int raw);
+ int raw));
/*
Same than unzOpenCurrentFile, but open for read raw the file (not uncompress)
if raw==1
@@ -280,11 +276,11 @@ extern int ZEXPORT unzOpenCurrentFile2 (unzFile file,
but you CANNOT set method parameter as NULL
*/
-extern int ZEXPORT unzOpenCurrentFile3 (unzFile file,
+extern int ZEXPORT unzOpenCurrentFile3 OF((unzFile file,
int* method,
int* level,
int raw,
- const char* password);
+ const char* password));
/*
Same than unzOpenCurrentFile, but open for read raw the file (not uncompress)
if raw==1
@@ -295,15 +291,15 @@ extern int ZEXPORT unzOpenCurrentFile3 (unzFile file,
*/
-extern int ZEXPORT unzCloseCurrentFile (unzFile file);
+extern int ZEXPORT unzCloseCurrentFile OF((unzFile file));
/*
Close the file in zip opened with unzOpenCurrentFile
Return UNZ_CRCERROR if all the file was read but the CRC is not good
*/
-extern int ZEXPORT unzReadCurrentFile (unzFile file,
+extern int ZEXPORT unzReadCurrentFile OF((unzFile file,
voidp buf,
- unsigned len);
+ unsigned len));
/*
Read bytes from the current file (opened by unzOpenCurrentFile)
buf contain buffer where data must be copied
@@ -315,19 +311,19 @@ extern int ZEXPORT unzReadCurrentFile (unzFile file,
(UNZ_ERRNO for IO error, or zLib error for uncompress error)
*/
-extern z_off_t ZEXPORT unztell (unzFile file);
+extern z_off_t ZEXPORT unztell OF((unzFile file));
/*
Give the current position in uncompressed data
*/
-extern int ZEXPORT unzeof (unzFile file);
+extern int ZEXPORT unzeof OF((unzFile file));
/*
return 1 if the end of file was reached, 0 elsewhere
*/
-extern int ZEXPORT unzGetLocalExtrafield (unzFile file,
+extern int ZEXPORT unzGetLocalExtrafield OF((unzFile file,
voidp buf,
- unsigned len);
+ unsigned len));
/*
Read extra field from the current file (opened by unzOpenCurrentFile)
This is the local-header version of the extra field (sometimes, there is
diff --git a/contrib/zip/.gitignore b/contrib/zip/.gitignore
new file mode 100644
index 000000000..4f9972c56
--- /dev/null
+++ b/contrib/zip/.gitignore
@@ -0,0 +1,38 @@
+/build/
+/test/build/
+/xcodeproj/
+
+# Object files
+*.o
+*.ko
+*.obj
+*.elf
+
+# Precompiled Headers
+*.gch
+*.pch
+
+# Libraries
+*.lib
+*.a
+*.la
+*.lo
+
+# Shared objects (inc. Windows DLLs)
+*.dll
+*.so
+*.so.*
+*.dylib
+*.suo
+
+# Executables
+*.exe
+*.out
+*.app
+*.i*86
+*.x86_64
+*.hex
+
+# Temporary
+*.swp
+.DS_Store
diff --git a/contrib/zip/.travis.yml b/contrib/zip/.travis.yml
new file mode 100644
index 000000000..d8ccb728d
--- /dev/null
+++ b/contrib/zip/.travis.yml
@@ -0,0 +1,10 @@
+language: c
+# Compiler selection
+compiler:
+ - clang
+ - gcc
+# Build steps
+script:
+ - mkdir build
+ - cd build
+ - cmake -DCMAKE_BUILD_TYPE=Debug .. && make && make test
diff --git a/contrib/zip/CMakeLists.txt b/contrib/zip/CMakeLists.txt
new file mode 100644
index 000000000..450ef3a98
--- /dev/null
+++ b/contrib/zip/CMakeLists.txt
@@ -0,0 +1,18 @@
+cmake_minimum_required(VERSION 2.8)
+project(zip)
+
+if (MSVC)
+ # Use secure functions by defaualt and suppress warnings about "deprecated" functions
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /D _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /D _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /D _CRT_NONSTDC_NO_WARNINGS=1 /D _CRT_SECURE_NO_WARNINGS=1")
+endif (MSVC)
+
+# zip
+set(SRC src/miniz.h src/zip.h src/zip.c)
+add_library(${CMAKE_PROJECT_NAME} ${SRC})
+
+# test
+enable_testing()
+add_subdirectory(test)
+
diff --git a/contrib/zip/README.md b/contrib/zip/README.md
new file mode 100644
index 000000000..24de5e61a
--- /dev/null
+++ b/contrib/zip/README.md
@@ -0,0 +1,139 @@
+### A portable (OSX/Linux/Windows), simple zip library written in C
+This is done by hacking awesome [miniz](https://code.google.com/p/miniz) library and layering functions on top of the miniz v1.15 API.
+
+[![Windows][win-badge]][win-link] [![OS X][osx-linux-badge]][osx-linux-link]
+
+[win-badge]: https://img.shields.io/appveyor/ci/kuba--/zip/master.svg?label=windows "AppVeyor build status"
+[win-link]: https://ci.appveyor.com/project/kuba--/zip "AppVeyor build status"
+[osx-linux-badge]: https://img.shields.io/travis/kuba--/zip/master.svg?label=linux/osx "Travis CI build status"
+[osx-linux-link]: https://travis-ci.org/kuba--/zip "Travis CI build status"
+
+# The Idea
+<img src="zip.png" name="zip" />
+... Some day, I was looking for zip library written in C for my project, but I could not find anything simple enough and lightweight.
+Everything what I tried required 'crazy mental gymnastics' to integrate or had some limitations or was too heavy.
+I hate frameworks, factories and adding new dependencies. If I must to install all those dependencies and link new library, I'm getting almost sick.
+I wanted something powerfull and small enough, so I could add just a few files and compile them into my project.
+And finally I found miniz.
+Miniz is a lossless, high performance data compression library in a single source file. I only needed simple interface to append buffers or files to the current zip-entry. Thanks to this feature I'm able to merge many files/buffers and compress them on-the-fly.
+
+It was the reason, why I decided to write zip module on top of the miniz. It required a little bit hacking and wrapping some functions, but I kept simplicity. So, you can grab these 3 files and compile them into your project. I hope that interface is also extremely simple, so you will not have any problems to understand it.
+
+# Examples
+
+* Create a new zip archive with default compression level.
+```c
+ struct zip_t *zip = zip_open("foo.zip", ZIP_DEFAULT_COMPRESSION_LEVEL, 'w');
+ {
+ zip_entry_open(zip, "foo-1.txt");
+ {
+ char *buf = "Some data here...";
+ zip_entry_write(zip, buf, strlen(buf));
+ }
+ zip_entry_close(zip);
+
+ zip_entry_open(zip, "foo-2.txt");
+ {
+ // merge 3 files into one entry and compress them on-the-fly.
+ zip_entry_fwrite(zip, "foo-2.1.txt");
+ zip_entry_fwrite(zip, "foo-2.2.txt");
+ zip_entry_fwrite(zip, "foo-2.3.txt");
+ }
+ zip_entry_close(zip);
+ }
+ zip_close(zip);
+```
+
+* Append to the existing zip archive.
+```c
+ struct zip_t *zip = zip_open("foo.zip", ZIP_DEFAULT_COMPRESSION_LEVEL, 'a');
+ {
+ zip_entry_open(zip, "foo-3.txt");
+ {
+ char *buf = "Append some data here...";
+ zip_entry_write(zip, buf, strlen(buf));
+ }
+ zip_entry_close(zip);
+ }
+ zip_close(zip);
+```
+
+* Extract a zip archive into a folder.
+```c
+ int on_extract_entry(const char *filename, void *arg) {
+ static int i = 0;
+ int n = *(int *)arg;
+ printf("Extracted: %s (%d of %d)\n", filename, ++i, n);
+
+ return 0;
+ }
+
+ int arg = 2;
+ zip_extract("foo.zip", "/tmp", on_extract_entry, &arg);
+```
+
+* Extract a zip entry into memory.
+```c
+ void *buf = NULL;
+ size_t bufsize;
+
+ struct zip_t *zip = zip_open("foo.zip", 0, 'r');
+ {
+ zip_entry_open(zip, "foo-1.txt");
+ {
+ zip_entry_read(zip, &buf, &bufsize);
+ }
+ zip_entry_close(zip);
+ }
+ zip_close(zip);
+
+ free(buf);
+```
+
+* Extract a zip entry into memory using callback.
+```c
+ struct buffer_t {
+ char *data;
+ size_t size;
+ };
+
+ static size_t on_extract(void *arg, unsigned long long offset, const void *data, size_t size) {
+ struct buffer_t *buf = (struct buffer_t *)arg;
+ buf->data = realloc(buf->data, buf->size + size + 1);
+ assert(NULL != buf->data);
+
+ memcpy(&(buf->data[buf->size]), data, size);
+ buf->size += size;
+ buf->data[buf->size] = 0;
+
+ return size;
+ }
+
+ struct buffer_t buf = {0};
+ struct zip_t *zip = zip_open("foo.zip", 0, 'r');
+ {
+ zip_entry_open(zip, "foo-1.txt");
+ {
+ zip_entry_extract(zip, on_extract, &buf);
+ }
+ zip_entry_close(zip);
+ }
+ zip_close(zip);
+
+ free(buf.data);
+```
+
+
+* Extract a zip entry into a file.
+```c
+ struct zip_t *zip = zip_open("foo.zip", 0, 'r');
+ {
+ zip_entry_open(zip, "foo-2.txt");
+ {
+ zip_entry_fread(zip, "foo-2.txt");
+ }
+ zip_entry_close(zip);
+ }
+ zip_close(zip);
+```
+
diff --git a/contrib/zip/UNLICENSE b/contrib/zip/UNLICENSE
new file mode 100644
index 000000000..ed7cccdf2
--- /dev/null
+++ b/contrib/zip/UNLICENSE
@@ -0,0 +1,26 @@
+/*
+ This is free and unencumbered software released into the public domain.
+
+ Anyone is free to copy, modify, publish, use, compile, sell, or
+ distribute this software, either in source code form or as a compiled
+ binary, for any purpose, commercial or non-commercial, and by any
+ means.
+
+ In jurisdictions that recognize copyright laws, the author or authors
+ of this software dedicate any and all copyright interest in the
+ software to the public domain. We make this dedication for the benefit
+ of the public at large and to the detriment of our heirs and
+ successors. We intend this dedication to be an overt act of
+ relinquishment in perpetuity of all present and future rights to this
+ software under copyright law.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ OTHER DEALINGS IN THE SOFTWARE.
+
+ For more information, please refer to <http://unlicense.org/>
+*/
diff --git a/contrib/zip/appveyor.yml b/contrib/zip/appveyor.yml
new file mode 100644
index 000000000..297cad8b0
--- /dev/null
+++ b/contrib/zip/appveyor.yml
@@ -0,0 +1,14 @@
+version: 1.0.{build}
+build_script:
+- cmd: >-
+ cd c:\projects\zip
+
+ mkdir build
+
+ cd build
+
+ cmake -G"Visual Studio 14" -DCMAKE_BUILD_TYPE=Debug ..
+
+ cmake --build . --config %CMAKE_BUILD_TYPE%
+
+ ctest --verbose -C "Debug"
diff --git a/contrib/zip/src/miniz.h b/contrib/zip/src/miniz.h
new file mode 100644
index 000000000..935f7de2e
--- /dev/null
+++ b/contrib/zip/src/miniz.h
@@ -0,0 +1,4927 @@
+/*
+ miniz.c v1.15 - public domain deflate/inflate, zlib-subset, ZIP reading/writing/appending, PNG writing
+ See "unlicense" statement at the end of this file.
+ Rich Geldreich <richgel99@gmail.com>, last updated Oct. 13, 2013
+ Implements RFC 1950: http://www.ietf.org/rfc/rfc1950.txt and RFC 1951: http://www.ietf.org/rfc/rfc1951.txt
+
+ Most API's defined in miniz.c are optional. For example, to disable the archive related functions just define
+ MINIZ_NO_ARCHIVE_APIS, or to get rid of all stdio usage define MINIZ_NO_STDIO (see the list below for more macros).
+
+ * Change History
+ 10/13/13 v1.15 r4 - Interim bugfix release while I work on the next major release with Zip64 support (almost there!):
+ - Critical fix for the MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY bug (thanks kahmyong.moon@hp.com) which could cause locate files to not find files. This bug
+ would only have occured in earlier versions if you explicitly used this flag, OR if you used mz_zip_extract_archive_file_to_heap() or mz_zip_add_mem_to_archive_file_in_place()
+ (which used this flag). If you can't switch to v1.15 but want to fix this bug, just remove the uses of this flag from both helper funcs (and of course don't use the flag).
+ - Bugfix in mz_zip_reader_extract_to_mem_no_alloc() from kymoon when pUser_read_buf is not NULL and compressed size is > uncompressed size
+ - Fixing mz_zip_reader_extract_*() funcs so they don't try to extract compressed data from directory entries, to account for weird zipfiles which contain zero-size compressed data on dir entries.
+ Hopefully this fix won't cause any issues on weird zip archives, because it assumes the low 16-bits of zip external attributes are DOS attributes (which I believe they always are in practice).
+ - Fixing mz_zip_reader_is_file_a_directory() so it doesn't check the internal attributes, just the filename and external attributes
+ - mz_zip_reader_init_file() - missing MZ_FCLOSE() call if the seek failed
+ - Added cmake support for Linux builds which builds all the examples, tested with clang v3.3 and gcc v4.6.
+ - Clang fix for tdefl_write_image_to_png_file_in_memory() from toffaletti
+ - Merged MZ_FORCEINLINE fix from hdeanclark
+ - Fix <time.h> include before config #ifdef, thanks emil.brink
+ - Added tdefl_write_image_to_png_file_in_memory_ex(): supports Y flipping (super useful for OpenGL apps), and explicit control over the compression level (so you can
+ set it to 1 for real-time compression).
+ - Merged in some compiler fixes from paulharris's github repro.
+ - Retested this build under Windows (VS 2010, including static analysis), tcc 0.9.26, gcc v4.6 and clang v3.3.
+ - Added example6.c, which dumps an image of the mandelbrot set to a PNG file.
+ - Modified example2 to help test the MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY flag more.
+ - In r3: Bugfix to mz_zip_writer_add_file() found during merge: Fix possible src file fclose() leak if alignment bytes+local header file write faiiled
+  - In r4: Minor bugfix to mz_zip_writer_add_from_zip_reader(): Was pushing the wrong central dir header offset, appears harmless in this release, but it became a problem in the zip64 branch
+ 5/20/12 v1.14 - MinGW32/64 GCC 4.6.1 compiler fixes: added MZ_FORCEINLINE, #include <time.h> (thanks fermtect).
+ 5/19/12 v1.13 - From jason@cornsyrup.org and kelwert@mtu.edu - Fix mz_crc32() so it doesn't compute the wrong CRC-32's when mz_ulong is 64-bit.
+ - Temporarily/locally slammed in "typedef unsigned long mz_ulong" and re-ran a randomized regression test on ~500k files.
+ - Eliminated a bunch of warnings when compiling with GCC 32-bit/64.
+ - Ran all examples, miniz.c, and tinfl.c through MSVC 2008's /analyze (static analysis) option and fixed all warnings (except for the silly
+ "Use of the comma-operator in a tested expression.." analysis warning, which I purposely use to work around a MSVC compiler warning).
+ - Created 32-bit and 64-bit Codeblocks projects/workspace. Built and tested Linux executables. The codeblocks workspace is compatible with Linux+Win32/x64.
+ - Added miniz_tester solution/project, which is a useful little app derived from LZHAM's tester app that I use as part of the regression test.
+ - Ran miniz.c and tinfl.c through another series of regression testing on ~500,000 files and archives.
+ - Modified example5.c so it purposely disables a bunch of high-level functionality (MINIZ_NO_STDIO, etc.). (Thanks to corysama for the MINIZ_NO_STDIO bug report.)
+ - Fix ftell() usage in examples so they exit with an error on files which are too large (a limitation of the examples, not miniz itself).
+ 4/12/12 v1.12 - More comments, added low-level example5.c, fixed a couple minor level_and_flags issues in the archive API's.
+ level_and_flags can now be set to MZ_DEFAULT_COMPRESSION. Thanks to Bruce Dawson <bruced@valvesoftware.com> for the feedback/bug report.
+ 5/28/11 v1.11 - Added statement from unlicense.org
+ 5/27/11 v1.10 - Substantial compressor optimizations:
+ - Level 1 is now ~4x faster than before. The L1 compressor's throughput now varies between 70-110MB/sec. on a
+ - Core i7 (actual throughput varies depending on the type of data, and x64 vs. x86).
+ - Improved baseline L2-L9 compression perf. Also, greatly improved compression perf. issues on some file types.
+ - Refactored the compression code for better readability and maintainability.
+ - Added level 10 compression level (L10 has slightly better ratio than level 9, but could have a potentially large
+ drop in throughput on some files).
+ 5/15/11 v1.09 - Initial stable release.
+
+ * Low-level Deflate/Inflate implementation notes:
+
+ Compression: Use the "tdefl" API's. The compressor supports raw, static, and dynamic blocks, lazy or
+ greedy parsing, match length filtering, RLE-only, and Huffman-only streams. It performs and compresses
+ approximately as well as zlib.
+
+ Decompression: Use the "tinfl" API's. The entire decompressor is implemented as a single function
+ coroutine: see tinfl_decompress(). It supports decompression into a 32KB (or larger power of 2) wrapping buffer, or into a memory
+ block large enough to hold the entire file.
+
+ The low-level tdefl/tinfl API's do not make any use of dynamic memory allocation.
+
+ * zlib-style API notes:
+
+ miniz.c implements a fairly large subset of zlib. There's enough functionality present for it to be a drop-in
+ zlib replacement in many apps:
+ The z_stream struct, optional memory allocation callbacks
+ deflateInit/deflateInit2/deflate/deflateReset/deflateEnd/deflateBound
+ inflateInit/inflateInit2/inflate/inflateEnd
+ compress, compress2, compressBound, uncompress
+ CRC-32, Adler-32 - Using modern, minimal code size, CPU cache friendly routines.
+ Supports raw deflate streams or standard zlib streams with adler-32 checking.
+
+ Limitations:
+ The callback API's are not implemented yet. No support for gzip headers or zlib static dictionaries.
+ I've tried to closely emulate zlib's various flavors of stream flushing and return status codes, but
+ there are no guarantees that miniz.c pulls this off perfectly.
+
+ * PNG writing: See the tdefl_write_image_to_png_file_in_memory() function, originally written by
+ Alex Evans. Supports 1-4 bytes/pixel images.
+
+ * ZIP archive API notes:
+
+ The ZIP archive API's where designed with simplicity and efficiency in mind, with just enough abstraction to
+ get the job done with minimal fuss. There are simple API's to retrieve file information, read files from
+ existing archives, create new archives, append new files to existing archives, or clone archive data from
+ one archive to another. It supports archives located in memory or the heap, on disk (using stdio.h),
+ or you can specify custom file read/write callbacks.
+
+ - Archive reading: Just call this function to read a single file from a disk archive:
+
+ void *mz_zip_extract_archive_file_to_heap(const char *pZip_filename, const char *pArchive_name,
+ size_t *pSize, mz_uint zip_flags);
+
+ For more complex cases, use the "mz_zip_reader" functions. Upon opening an archive, the entire central
+ directory is located and read as-is into memory, and subsequent file access only occurs when reading individual files.
+
+ - Archives file scanning: The simple way is to use this function to scan a loaded archive for a specific file:
+
+ int mz_zip_reader_locate_file(mz_zip_archive *pZip, const char *pName, const char *pComment, mz_uint flags);
+
+ The locate operation can optionally check file comments too, which (as one example) can be used to identify
+ multiple versions of the same file in an archive. This function uses a simple linear search through the central
+ directory, so it's not very fast.
+
+ Alternately, you can iterate through all the files in an archive (using mz_zip_reader_get_num_files()) and
+ retrieve detailed info on each file by calling mz_zip_reader_file_stat().
+
+ - Archive creation: Use the "mz_zip_writer" functions. The ZIP writer immediately writes compressed file data
+ to disk and builds an exact image of the central directory in memory. The central directory image is written
+ all at once at the end of the archive file when the archive is finalized.
+
+ The archive writer can optionally align each file's local header and file data to any power of 2 alignment,
+ which can be useful when the archive will be read from optical media. Also, the writer supports placing
+ arbitrary data blobs at the very beginning of ZIP archives. Archives written using either feature are still
+ readable by any ZIP tool.
+
+ - Archive appending: The simple way to add a single file to an archive is to call this function:
+
+ mz_bool mz_zip_add_mem_to_archive_file_in_place(const char *pZip_filename, const char *pArchive_name,
+ const void *pBuf, size_t buf_size, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags);
+
+ The archive will be created if it doesn't already exist, otherwise it'll be appended to.
+ Note the appending is done in-place and is not an atomic operation, so if something goes wrong
+ during the operation it's possible the archive could be left without a central directory (although the local
+ file headers and file data will be fine, so the archive will be recoverable).
+
+ For more complex archive modification scenarios:
+ 1. The safest way is to use a mz_zip_reader to read the existing archive, cloning only those bits you want to
+ preserve into a new archive using using the mz_zip_writer_add_from_zip_reader() function (which compiles the
+ compressed file data as-is). When you're done, delete the old archive and rename the newly written archive, and
+ you're done. This is safe but requires a bunch of temporary disk space or heap memory.
+
+ 2. Or, you can convert an mz_zip_reader in-place to an mz_zip_writer using mz_zip_writer_init_from_reader(),
+ append new files as needed, then finalize the archive which will write an updated central directory to the
+ original archive. (This is basically what mz_zip_add_mem_to_archive_file_in_place() does.) There's a
+ possibility that the archive's central directory could be lost with this method if anything goes wrong, though.
+
+ - ZIP archive support limitations:
+ No zip64 or spanning support. Extraction functions can only handle unencrypted, stored or deflated files.
+ Requires streams capable of seeking.
+
+ * This is a header file library, like stb_image.c. To get only a header file, either cut and paste the
+ below header, or create miniz.h, #define MINIZ_HEADER_FILE_ONLY, and then include miniz.c from it.
+
+ * Important: For best perf. be sure to customize the below macros for your target platform:
+ #define MINIZ_USE_UNALIGNED_LOADS_AND_STORES 1
+ #define MINIZ_LITTLE_ENDIAN 1
+ #define MINIZ_HAS_64BIT_REGISTERS 1
+
+ * On platforms using glibc, Be sure to "#define _LARGEFILE64_SOURCE 1" before including miniz.c to ensure miniz
+ uses the 64-bit variants: fopen64(), stat64(), etc. Otherwise you won't be able to process large files
+ (i.e. 32-bit stat() fails for me on files > 0x7FFFFFFF bytes).
+*/
+
+#ifndef MINIZ_HEADER_INCLUDED
+#define MINIZ_HEADER_INCLUDED
+
+#include <stdlib.h>
+
+// Defines to completely disable specific portions of miniz.c:
+// If all macros here are defined the only functionality remaining will be CRC-32, adler-32, tinfl, and tdefl.
+
+// Define MINIZ_NO_STDIO to disable all usage and any functions which rely on stdio for file I/O.
+//#define MINIZ_NO_STDIO
+
+// If MINIZ_NO_TIME is specified then the ZIP archive functions will not be able to get the current time, or
+// get/set file times, and the C run-time funcs that get/set times won't be called.
+// The current downside is the times written to your archives will be from 1979.
+//#define MINIZ_NO_TIME
+
+// Define MINIZ_NO_ARCHIVE_APIS to disable all ZIP archive API's.
+//#define MINIZ_NO_ARCHIVE_APIS
+
+// Define MINIZ_NO_ARCHIVE_APIS to disable all writing related ZIP archive API's.
+//#define MINIZ_NO_ARCHIVE_WRITING_APIS
+
+// Define MINIZ_NO_ZLIB_APIS to remove all ZLIB-style compression/decompression API's.
+//#define MINIZ_NO_ZLIB_APIS
+
+// Define MINIZ_NO_ZLIB_COMPATIBLE_NAME to disable zlib names, to prevent conflicts against stock zlib.
+//#define MINIZ_NO_ZLIB_COMPATIBLE_NAMES
+
+// Define MINIZ_NO_MALLOC to disable all calls to malloc, free, and realloc.
+// Note if MINIZ_NO_MALLOC is defined then the user must always provide custom user alloc/free/realloc
+// callbacks to the zlib and archive API's, and a few stand-alone helper API's which don't provide custom user
+// functions (such as tdefl_compress_mem_to_heap() and tinfl_decompress_mem_to_heap()) won't work.
+//#define MINIZ_NO_MALLOC
+
+#if defined(__TINYC__) && (defined(__linux) || defined(__linux__))
+ // TODO: Work around "error: include file 'sys\utime.h' when compiling with tcc on Linux
+ #define MINIZ_NO_TIME
+#endif
+
+#if !defined(MINIZ_NO_TIME) && !defined(MINIZ_NO_ARCHIVE_APIS)
+ #include <time.h>
+#endif
+
+#if defined(_M_IX86) || defined(_M_X64) || defined(__i386__) || defined(__i386) || defined(__i486__) || defined(__i486) || defined(i386) || defined(__ia64__) || defined(__x86_64__)
+// MINIZ_X86_OR_X64_CPU is only used to help set the below macros.
+#define MINIZ_X86_OR_X64_CPU 1
+#endif
+
+#if (__BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__) || MINIZ_X86_OR_X64_CPU
+// Set MINIZ_LITTLE_ENDIAN to 1 if the processor is little endian.
+#define MINIZ_LITTLE_ENDIAN 1
+#endif
+
+#if MINIZ_X86_OR_X64_CPU
+// Set MINIZ_USE_UNALIGNED_LOADS_AND_STORES to 1 on CPU's that permit efficient integer loads and stores from unaligned addresses.
+#define MINIZ_USE_UNALIGNED_LOADS_AND_STORES 0
+#endif
+
+#if defined(_M_X64) || defined(_WIN64) || defined(__MINGW64__) || defined(_LP64) || defined(__LP64__) || defined(__ia64__) || defined(__x86_64__)
+// Set MINIZ_HAS_64BIT_REGISTERS to 1 if operations on 64-bit integers are reasonably fast (and don't involve compiler generated calls to helper functions).
+#define MINIZ_HAS_64BIT_REGISTERS 1
+#endif
+
+#ifdef __APPLE__
+#define ftello64 ftello
+#define fseeko64 fseeko
+#define fopen64 fopen
+#define freopen64 freopen
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// ------------------- zlib-style API Definitions.
+
+// For more compatibility with zlib, miniz.c uses unsigned long for some parameters/struct members. Beware: mz_ulong can be either 32 or 64-bits!
+typedef unsigned long mz_ulong;
+
+// mz_free() internally uses the MZ_FREE() macro (which by default calls free() unless you've modified the MZ_MALLOC macro) to release a block allocated from the heap.
+void mz_free(void *p);
+
+#define MZ_ADLER32_INIT (1)
+// mz_adler32() returns the initial adler-32 value to use when called with ptr==NULL.
+mz_ulong mz_adler32(mz_ulong adler, const unsigned char *ptr, size_t buf_len);
+
+#define MZ_CRC32_INIT (0)
+// mz_crc32() returns the initial CRC-32 value to use when called with ptr==NULL.
+mz_ulong mz_crc32(mz_ulong crc, const unsigned char *ptr, size_t buf_len);
+
+// Compression strategies.
+enum { MZ_DEFAULT_STRATEGY = 0, MZ_FILTERED = 1, MZ_HUFFMAN_ONLY = 2, MZ_RLE = 3, MZ_FIXED = 4 };
+
+// Method
+#define MZ_DEFLATED 8
+
+#ifndef MINIZ_NO_ZLIB_APIS
+
+// Heap allocation callbacks.
+// Note that mz_alloc_func parameter types purpsosely differ from zlib's: items/size is size_t, not unsigned long.
+typedef void *(*mz_alloc_func)(void *opaque, size_t items, size_t size);
+typedef void (*mz_free_func)(void *opaque, void *address);
+typedef void *(*mz_realloc_func)(void *opaque, void *address, size_t items, size_t size);
+
+#define MZ_VERSION "9.1.15"
+#define MZ_VERNUM 0x91F0
+#define MZ_VER_MAJOR 9
+#define MZ_VER_MINOR 1
+#define MZ_VER_REVISION 15
+#define MZ_VER_SUBREVISION 0
+
+// Flush values. For typical usage you only need MZ_NO_FLUSH and MZ_FINISH. The other values are for advanced use (refer to the zlib docs).
+enum { MZ_NO_FLUSH = 0, MZ_PARTIAL_FLUSH = 1, MZ_SYNC_FLUSH = 2, MZ_FULL_FLUSH = 3, MZ_FINISH = 4, MZ_BLOCK = 5 };
+
+// Return status codes. MZ_PARAM_ERROR is non-standard.
+enum { MZ_OK = 0, MZ_STREAM_END = 1, MZ_NEED_DICT = 2, MZ_ERRNO = -1, MZ_STREAM_ERROR = -2, MZ_DATA_ERROR = -3, MZ_MEM_ERROR = -4, MZ_BUF_ERROR = -5, MZ_VERSION_ERROR = -6, MZ_PARAM_ERROR = -10000 };
+
+// Compression levels: 0-9 are the standard zlib-style levels, 10 is best possible compression (not zlib compatible, and may be very slow), MZ_DEFAULT_COMPRESSION=MZ_DEFAULT_LEVEL.
+enum { MZ_NO_COMPRESSION = 0, MZ_BEST_SPEED = 1, MZ_BEST_COMPRESSION = 9, MZ_UBER_COMPRESSION = 10, MZ_DEFAULT_LEVEL = 6, MZ_DEFAULT_COMPRESSION = -1 };
+
+// Window bits
+#define MZ_DEFAULT_WINDOW_BITS 15
+
+struct mz_internal_state;
+
+// Compression/decompression stream struct.
+typedef struct mz_stream_s
+{
+ const unsigned char *next_in; // pointer to next byte to read
+ unsigned int avail_in; // number of bytes available at next_in
+ mz_ulong total_in; // total number of bytes consumed so far
+
+ unsigned char *next_out; // pointer to next byte to write
+ unsigned int avail_out; // number of bytes that can be written to next_out
+ mz_ulong total_out; // total number of bytes produced so far
+
+ char *msg; // error msg (unused)
+ struct mz_internal_state *state; // internal state, allocated by zalloc/zfree
+
+ mz_alloc_func zalloc; // optional heap allocation function (defaults to malloc)
+ mz_free_func zfree; // optional heap free function (defaults to free)
+ void *opaque; // heap alloc function user pointer
+
+ int data_type; // data_type (unused)
+ mz_ulong adler; // adler32 of the source or uncompressed data
+ mz_ulong reserved; // not used
+} mz_stream;
+
+typedef mz_stream *mz_streamp;
+
+// Returns the version string of miniz.c.
+const char *mz_version(void);
+
+// mz_deflateInit() initializes a compressor with default options:
+// Parameters:
+// pStream must point to an initialized mz_stream struct.
+// level must be between [MZ_NO_COMPRESSION, MZ_BEST_COMPRESSION].
+// level 1 enables a specially optimized compression function that's been optimized purely for performance, not ratio.
+// (This special func. is currently only enabled when MINIZ_USE_UNALIGNED_LOADS_AND_STORES and MINIZ_LITTLE_ENDIAN are defined.)
+// Return values:
+// MZ_OK on success.
+// MZ_STREAM_ERROR if the stream is bogus.
+// MZ_PARAM_ERROR if the input parameters are bogus.
+// MZ_MEM_ERROR on out of memory.
+int mz_deflateInit(mz_streamp pStream, int level);
+
+// mz_deflateInit2() is like mz_deflate(), except with more control:
+// Additional parameters:
+// method must be MZ_DEFLATED
+// window_bits must be MZ_DEFAULT_WINDOW_BITS (to wrap the deflate stream with zlib header/adler-32 footer) or -MZ_DEFAULT_WINDOW_BITS (raw deflate/no header or footer)
+// mem_level must be between [1, 9] (it's checked but ignored by miniz.c)
+int mz_deflateInit2(mz_streamp pStream, int level, int method, int window_bits, int mem_level, int strategy);
+
+// Quickly resets a compressor without having to reallocate anything. Same as calling mz_deflateEnd() followed by mz_deflateInit()/mz_deflateInit2().
+int mz_deflateReset(mz_streamp pStream);
+
+// mz_deflate() compresses the input to output, consuming as much of the input and producing as much output as possible.
+// Parameters:
+// pStream is the stream to read from and write to. You must initialize/update the next_in, avail_in, next_out, and avail_out members.
+// flush may be MZ_NO_FLUSH, MZ_PARTIAL_FLUSH/MZ_SYNC_FLUSH, MZ_FULL_FLUSH, or MZ_FINISH.
+// Return values:
+// MZ_OK on success (when flushing, or if more input is needed but not available, and/or there's more output to be written but the output buffer is full).
+// MZ_STREAM_END if all input has been consumed and all output bytes have been written. Don't call mz_deflate() on the stream anymore.
+// MZ_STREAM_ERROR if the stream is bogus.
+// MZ_PARAM_ERROR if one of the parameters is invalid.
+// MZ_BUF_ERROR if no forward progress is possible because the input and/or output buffers are empty. (Fill up the input buffer or free up some output space and try again.)
+int mz_deflate(mz_streamp pStream, int flush);
+
+// mz_deflateEnd() deinitializes a compressor:
+// Return values:
+// MZ_OK on success.
+// MZ_STREAM_ERROR if the stream is bogus.
+int mz_deflateEnd(mz_streamp pStream);
+
+// mz_deflateBound() returns a (very) conservative upper bound on the amount of data that could be generated by deflate(), assuming flush is set to only MZ_NO_FLUSH or MZ_FINISH.
+mz_ulong mz_deflateBound(mz_streamp pStream, mz_ulong source_len);
+
+// Single-call compression functions mz_compress() and mz_compress2():
+// Returns MZ_OK on success, or one of the error codes from mz_deflate() on failure.
+int mz_compress(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len);
+int mz_compress2(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len, int level);
+
+// mz_compressBound() returns a (very) conservative upper bound on the amount of data that could be generated by calling mz_compress().
+mz_ulong mz_compressBound(mz_ulong source_len);
+
+// Initializes a decompressor.
+int mz_inflateInit(mz_streamp pStream);
+
+// mz_inflateInit2() is like mz_inflateInit() with an additional option that controls the window size and whether or not the stream has been wrapped with a zlib header/footer:
+// window_bits must be MZ_DEFAULT_WINDOW_BITS (to parse zlib header/footer) or -MZ_DEFAULT_WINDOW_BITS (raw deflate).
+int mz_inflateInit2(mz_streamp pStream, int window_bits);
+
+// Decompresses the input stream to the output, consuming only as much of the input as needed, and writing as much to the output as possible.
+// Parameters:
+// pStream is the stream to read from and write to. You must initialize/update the next_in, avail_in, next_out, and avail_out members.
+// flush may be MZ_NO_FLUSH, MZ_SYNC_FLUSH, or MZ_FINISH.
+// On the first call, if flush is MZ_FINISH it's assumed the input and output buffers are both sized large enough to decompress the entire stream in a single call (this is slightly faster).
+// MZ_FINISH implies that there are no more source bytes available beside what's already in the input buffer, and that the output buffer is large enough to hold the rest of the decompressed data.
+// Return values:
+// MZ_OK on success. Either more input is needed but not available, and/or there's more output to be written but the output buffer is full.
+// MZ_STREAM_END if all needed input has been consumed and all output bytes have been written. For zlib streams, the adler-32 of the decompressed data has also been verified.
+// MZ_STREAM_ERROR if the stream is bogus.
+// MZ_DATA_ERROR if the deflate stream is invalid.
+// MZ_PARAM_ERROR if one of the parameters is invalid.
+// MZ_BUF_ERROR if no forward progress is possible because the input buffer is empty but the inflater needs more input to continue, or if the output buffer is not large enough. Call mz_inflate() again
+// with more input data, or with more room in the output buffer (except when using single call decompression, described above).
+int mz_inflate(mz_streamp pStream, int flush);
+
+// Deinitializes a decompressor.
+int mz_inflateEnd(mz_streamp pStream);
+
+// Single-call decompression.
+// Returns MZ_OK on success, or one of the error codes from mz_inflate() on failure.
+int mz_uncompress(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len);
+
+// Returns a string description of the specified error code, or NULL if the error code is invalid.
+const char *mz_error(int err);
+
+// Redefine zlib-compatible names to miniz equivalents, so miniz.c can be used as a drop-in replacement for the subset of zlib that miniz.c supports.
+// Define MINIZ_NO_ZLIB_COMPATIBLE_NAMES to disable zlib-compatibility if you use zlib in the same project.
+#ifndef MINIZ_NO_ZLIB_COMPATIBLE_NAMES
+ typedef unsigned char Byte;
+ typedef unsigned int uInt;
+ typedef mz_ulong uLong;
+ typedef Byte Bytef;
+ typedef uInt uIntf;
+ typedef char charf;
+ typedef int intf;
+ typedef void *voidpf;
+ typedef uLong uLongf;
+ typedef void *voidp;
+ typedef void *const voidpc;
+ #define Z_NULL 0
+ #define Z_NO_FLUSH MZ_NO_FLUSH
+ #define Z_PARTIAL_FLUSH MZ_PARTIAL_FLUSH
+ #define Z_SYNC_FLUSH MZ_SYNC_FLUSH
+ #define Z_FULL_FLUSH MZ_FULL_FLUSH
+ #define Z_FINISH MZ_FINISH
+ #define Z_BLOCK MZ_BLOCK
+ #define Z_OK MZ_OK
+ #define Z_STREAM_END MZ_STREAM_END
+ #define Z_NEED_DICT MZ_NEED_DICT
+ #define Z_ERRNO MZ_ERRNO
+ #define Z_STREAM_ERROR MZ_STREAM_ERROR
+ #define Z_DATA_ERROR MZ_DATA_ERROR
+ #define Z_MEM_ERROR MZ_MEM_ERROR
+ #define Z_BUF_ERROR MZ_BUF_ERROR
+ #define Z_VERSION_ERROR MZ_VERSION_ERROR
+ #define Z_PARAM_ERROR MZ_PARAM_ERROR
+ #define Z_NO_COMPRESSION MZ_NO_COMPRESSION
+ #define Z_BEST_SPEED MZ_BEST_SPEED
+ #define Z_BEST_COMPRESSION MZ_BEST_COMPRESSION
+ #define Z_DEFAULT_COMPRESSION MZ_DEFAULT_COMPRESSION
+ #define Z_DEFAULT_STRATEGY MZ_DEFAULT_STRATEGY
+ #define Z_FILTERED MZ_FILTERED
+ #define Z_HUFFMAN_ONLY MZ_HUFFMAN_ONLY
+ #define Z_RLE MZ_RLE
+ #define Z_FIXED MZ_FIXED
+ #define Z_DEFLATED MZ_DEFLATED
+ #define Z_DEFAULT_WINDOW_BITS MZ_DEFAULT_WINDOW_BITS
+ #define alloc_func mz_alloc_func
+ #define free_func mz_free_func
+ #define internal_state mz_internal_state
+ #define z_stream mz_stream
+ #define deflateInit mz_deflateInit
+ #define deflateInit2 mz_deflateInit2
+ #define deflateReset mz_deflateReset
+ #define deflate mz_deflate
+ #define deflateEnd mz_deflateEnd
+ #define deflateBound mz_deflateBound
+ #define compress mz_compress
+ #define compress2 mz_compress2
+ #define compressBound mz_compressBound
+ #define inflateInit mz_inflateInit
+ #define inflateInit2 mz_inflateInit2
+ #define inflate mz_inflate
+ #define inflateEnd mz_inflateEnd
+ #define uncompress mz_uncompress
+ #define crc32 mz_crc32
+ #define adler32 mz_adler32
+ #define MAX_WBITS 15
+ #define MAX_MEM_LEVEL 9
+ #define zError mz_error
+ #define ZLIB_VERSION MZ_VERSION
+ #define ZLIB_VERNUM MZ_VERNUM
+ #define ZLIB_VER_MAJOR MZ_VER_MAJOR
+ #define ZLIB_VER_MINOR MZ_VER_MINOR
+ #define ZLIB_VER_REVISION MZ_VER_REVISION
+ #define ZLIB_VER_SUBREVISION MZ_VER_SUBREVISION
+ #define zlibVersion mz_version
+ #define zlib_version mz_version()
+#endif // #ifndef MINIZ_NO_ZLIB_COMPATIBLE_NAMES
+
+#endif // MINIZ_NO_ZLIB_APIS
+
+// ------------------- Types and macros
+
+typedef unsigned char mz_uint8;
+typedef signed short mz_int16;
+typedef unsigned short mz_uint16;
+typedef unsigned int mz_uint32;
+typedef unsigned int mz_uint;
+typedef long long mz_int64;
+typedef unsigned long long mz_uint64;
+typedef int mz_bool;
+
+#define MZ_FALSE (0)
+#define MZ_TRUE (1)
+
+// An attempt to work around MSVC's spammy "warning C4127: conditional expression is constant" message.
+#ifdef _MSC_VER
+ #define MZ_MACRO_END while (0, 0)
+#else
+ #define MZ_MACRO_END while (0)
+#endif
+
+// ------------------- ZIP archive reading/writing
+
+#ifndef MINIZ_NO_ARCHIVE_APIS
+
+enum
+{
+ MZ_ZIP_MAX_IO_BUF_SIZE = 64*1024,
+ MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE = 260,
+ MZ_ZIP_MAX_ARCHIVE_FILE_COMMENT_SIZE = 256
+};
+
+typedef struct
+{
+ mz_uint32 m_file_index;
+ mz_uint32 m_central_dir_ofs;
+ mz_uint16 m_version_made_by;
+ mz_uint16 m_version_needed;
+ mz_uint16 m_bit_flag;
+ mz_uint16 m_method;
+#ifndef MINIZ_NO_TIME
+ time_t m_time;
+#endif
+ mz_uint32 m_crc32;
+ mz_uint64 m_comp_size;
+ mz_uint64 m_uncomp_size;
+ mz_uint16 m_internal_attr;
+ mz_uint32 m_external_attr;
+ mz_uint64 m_local_header_ofs;
+ mz_uint32 m_comment_size;
+ char m_filename[MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE];
+ char m_comment[MZ_ZIP_MAX_ARCHIVE_FILE_COMMENT_SIZE];
+} mz_zip_archive_file_stat;
+
+typedef size_t (*mz_file_read_func)(void *pOpaque, mz_uint64 file_ofs, void *pBuf, size_t n);
+typedef size_t (*mz_file_write_func)(void *pOpaque, mz_uint64 file_ofs, const void *pBuf, size_t n);
+
+struct mz_zip_internal_state_tag;
+typedef struct mz_zip_internal_state_tag mz_zip_internal_state;
+
+typedef enum
+{
+ MZ_ZIP_MODE_INVALID = 0,
+ MZ_ZIP_MODE_READING = 1,
+ MZ_ZIP_MODE_WRITING = 2,
+ MZ_ZIP_MODE_WRITING_HAS_BEEN_FINALIZED = 3
+} mz_zip_mode;
+
+typedef struct mz_zip_archive_tag
+{
+ mz_uint64 m_archive_size;
+ mz_uint64 m_central_directory_file_ofs;
+ mz_uint m_total_files;
+ mz_zip_mode m_zip_mode;
+
+ mz_uint m_file_offset_alignment;
+
+ mz_alloc_func m_pAlloc;
+ mz_free_func m_pFree;
+ mz_realloc_func m_pRealloc;
+ void *m_pAlloc_opaque;
+
+ mz_file_read_func m_pRead;
+ mz_file_write_func m_pWrite;
+ void *m_pIO_opaque;
+
+ mz_zip_internal_state *m_pState;
+
+} mz_zip_archive;
+
+typedef enum
+{
+ MZ_ZIP_FLAG_CASE_SENSITIVE = 0x0100,
+ MZ_ZIP_FLAG_IGNORE_PATH = 0x0200,
+ MZ_ZIP_FLAG_COMPRESSED_DATA = 0x0400,
+ MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY = 0x0800
+} mz_zip_flags;
+
+// ZIP archive reading
+
+// Inits a ZIP archive reader.
+// These functions read and validate the archive's central directory.
+mz_bool mz_zip_reader_init(mz_zip_archive *pZip, mz_uint64 size, mz_uint32 flags);
+mz_bool mz_zip_reader_init_mem(mz_zip_archive *pZip, const void *pMem, size_t size, mz_uint32 flags);
+
+#ifndef MINIZ_NO_STDIO
+mz_bool mz_zip_reader_init_file(mz_zip_archive *pZip, const char *pFilename, mz_uint32 flags);
+#endif
+
+// Returns the total number of files in the archive.
+mz_uint mz_zip_reader_get_num_files(mz_zip_archive *pZip);
+
+// Returns detailed information about an archive file entry.
+mz_bool mz_zip_reader_file_stat(mz_zip_archive *pZip, mz_uint file_index, mz_zip_archive_file_stat *pStat);
+
+// Determines if an archive file entry is a directory entry.
+mz_bool mz_zip_reader_is_file_a_directory(mz_zip_archive *pZip, mz_uint file_index);
+mz_bool mz_zip_reader_is_file_encrypted(mz_zip_archive *pZip, mz_uint file_index);
+
+// Retrieves the filename of an archive file entry.
+// Returns the number of bytes written to pFilename, or if filename_buf_size is 0 this function returns the number of bytes needed to fully store the filename.
+mz_uint mz_zip_reader_get_filename(mz_zip_archive *pZip, mz_uint file_index, char *pFilename, mz_uint filename_buf_size);
+
+// Attempts to locates a file in the archive's central directory.
+// Valid flags: MZ_ZIP_FLAG_CASE_SENSITIVE, MZ_ZIP_FLAG_IGNORE_PATH
+// Returns -1 if the file cannot be found.
+int mz_zip_reader_locate_file(mz_zip_archive *pZip, const char *pName, const char *pComment, mz_uint flags);
+
+// Extracts a archive file to a memory buffer using no memory allocation.
+mz_bool mz_zip_reader_extract_to_mem_no_alloc(mz_zip_archive *pZip, mz_uint file_index, void *pBuf, size_t buf_size, mz_uint flags, void *pUser_read_buf, size_t user_read_buf_size);
+mz_bool mz_zip_reader_extract_file_to_mem_no_alloc(mz_zip_archive *pZip, const char *pFilename, void *pBuf, size_t buf_size, mz_uint flags, void *pUser_read_buf, size_t user_read_buf_size);
+
+// Extracts a archive file to a memory buffer.
+mz_bool mz_zip_reader_extract_to_mem(mz_zip_archive *pZip, mz_uint file_index, void *pBuf, size_t buf_size, mz_uint flags);
+mz_bool mz_zip_reader_extract_file_to_mem(mz_zip_archive *pZip, const char *pFilename, void *pBuf, size_t buf_size, mz_uint flags);
+
+// Extracts a archive file to a dynamically allocated heap buffer.
+void *mz_zip_reader_extract_to_heap(mz_zip_archive *pZip, mz_uint file_index, size_t *pSize, mz_uint flags);
+void *mz_zip_reader_extract_file_to_heap(mz_zip_archive *pZip, const char *pFilename, size_t *pSize, mz_uint flags);
+
+// Extracts a archive file using a callback function to output the file's data.
+mz_bool mz_zip_reader_extract_to_callback(mz_zip_archive *pZip, mz_uint file_index, mz_file_write_func pCallback, void *pOpaque, mz_uint flags);
+mz_bool mz_zip_reader_extract_file_to_callback(mz_zip_archive *pZip, const char *pFilename, mz_file_write_func pCallback, void *pOpaque, mz_uint flags);
+
+#ifndef MINIZ_NO_STDIO
+// Extracts a archive file to a disk file and sets its last accessed and modified times.
+// This function only extracts files, not archive directory records.
+mz_bool mz_zip_reader_extract_to_file(mz_zip_archive *pZip, mz_uint file_index, const char *pDst_filename, mz_uint flags);
+mz_bool mz_zip_reader_extract_file_to_file(mz_zip_archive *pZip, const char *pArchive_filename, const char *pDst_filename, mz_uint flags);
+#endif
+
+// Ends archive reading, freeing all allocations, and closing the input archive file if mz_zip_reader_init_file() was used.
+mz_bool mz_zip_reader_end(mz_zip_archive *pZip);
+
+// ZIP archive writing
+
+#ifndef MINIZ_NO_ARCHIVE_WRITING_APIS
+
+// Inits a ZIP archive writer.
+mz_bool mz_zip_writer_init(mz_zip_archive *pZip, mz_uint64 existing_size);
+mz_bool mz_zip_writer_init_heap(mz_zip_archive *pZip, size_t size_to_reserve_at_beginning, size_t initial_allocation_size);
+
+#ifndef MINIZ_NO_STDIO
+mz_bool mz_zip_writer_init_file(mz_zip_archive *pZip, const char *pFilename, mz_uint64 size_to_reserve_at_beginning);
+#endif
+
+// Converts a ZIP archive reader object into a writer object, to allow efficient in-place file appends to occur on an existing archive.
+// For archives opened using mz_zip_reader_init_file, pFilename must be the archive's filename so it can be reopened for writing. If the file can't be reopened, mz_zip_reader_end() will be called.
+// For archives opened using mz_zip_reader_init_mem, the memory block must be growable using the realloc callback (which defaults to realloc unless you've overridden it).
+// Finally, for archives opened using mz_zip_reader_init, the mz_zip_archive's user provided m_pWrite function cannot be NULL.
+// Note: In-place archive modification is not recommended unless you know what you're doing, because if execution stops or something goes wrong before
+// the archive is finalized the file's central directory will be hosed.
+mz_bool mz_zip_writer_init_from_reader(mz_zip_archive *pZip, const char *pFilename);
+
+// Adds the contents of a memory buffer to an archive. These functions record the current local time into the archive.
+// To add a directory entry, call this method with an archive name ending in a forwardslash with empty buffer.
+// level_and_flags - compression level (0-10, see MZ_BEST_SPEED, MZ_BEST_COMPRESSION, etc.) logically OR'd with zero or more mz_zip_flags, or just set to MZ_DEFAULT_COMPRESSION.
+mz_bool mz_zip_writer_add_mem(mz_zip_archive *pZip, const char *pArchive_name, const void *pBuf, size_t buf_size, mz_uint level_and_flags);
+mz_bool mz_zip_writer_add_mem_ex(mz_zip_archive *pZip, const char *pArchive_name, const void *pBuf, size_t buf_size, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags, mz_uint64 uncomp_size, mz_uint32 uncomp_crc32);
+
+#ifndef MINIZ_NO_STDIO
+// Adds the contents of a disk file to an archive. This function also records the disk file's modified time into the archive.
+// level_and_flags - compression level (0-10, see MZ_BEST_SPEED, MZ_BEST_COMPRESSION, etc.) logically OR'd with zero or more mz_zip_flags, or just set to MZ_DEFAULT_COMPRESSION.
+mz_bool mz_zip_writer_add_file(mz_zip_archive *pZip, const char *pArchive_name, const char *pSrc_filename, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags);
+#endif
+
+// Adds a file to an archive by fully cloning the data from another archive.
+// This function fully clones the source file's compressed data (no recompression), along with its full filename, extra data, and comment fields.
+mz_bool mz_zip_writer_add_from_zip_reader(mz_zip_archive *pZip, mz_zip_archive *pSource_zip, mz_uint file_index);
+
+// Finalizes the archive by writing the central directory records followed by the end of central directory record.
+// After an archive is finalized, the only valid call on the mz_zip_archive struct is mz_zip_writer_end().
+// An archive must be manually finalized by calling this function for it to be valid.
+mz_bool mz_zip_writer_finalize_archive(mz_zip_archive *pZip);
+mz_bool mz_zip_writer_finalize_heap_archive(mz_zip_archive *pZip, void **pBuf, size_t *pSize);
+
+// Ends archive writing, freeing all allocations, and closing the output file if mz_zip_writer_init_file() was used.
+// Note for the archive to be valid, it must have been finalized before ending.
+mz_bool mz_zip_writer_end(mz_zip_archive *pZip);
+
+// Misc. high-level helper functions:
+
+// mz_zip_add_mem_to_archive_file_in_place() efficiently (but not atomically) appends a memory blob to a ZIP archive.
+// level_and_flags - compression level (0-10, see MZ_BEST_SPEED, MZ_BEST_COMPRESSION, etc.) logically OR'd with zero or more mz_zip_flags, or just set to MZ_DEFAULT_COMPRESSION.
+mz_bool mz_zip_add_mem_to_archive_file_in_place(const char *pZip_filename, const char *pArchive_name, const void *pBuf, size_t buf_size, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags);
+
+// Reads a single file from an archive into a heap block.
+// Returns NULL on failure.
+void *mz_zip_extract_archive_file_to_heap(const char *pZip_filename, const char *pArchive_name, size_t *pSize, mz_uint zip_flags);
+
+#endif // #ifndef MINIZ_NO_ARCHIVE_WRITING_APIS
+
+#endif // #ifndef MINIZ_NO_ARCHIVE_APIS
+
+// ------------------- Low-level Decompression API Definitions
+
+// Decompression flags used by tinfl_decompress().
+// TINFL_FLAG_PARSE_ZLIB_HEADER: If set, the input has a valid zlib header and ends with an adler32 checksum (it's a valid zlib stream). Otherwise, the input is a raw deflate stream.
+// TINFL_FLAG_HAS_MORE_INPUT: If set, there are more input bytes available beyond the end of the supplied input buffer. If clear, the input buffer contains all remaining input.
+// TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF: If set, the output buffer is large enough to hold the entire decompressed stream. If clear, the output buffer is at least the size of the dictionary (typically 32KB).
+// TINFL_FLAG_COMPUTE_ADLER32: Force adler-32 checksum computation of the decompressed bytes.
+enum
+{
+ TINFL_FLAG_PARSE_ZLIB_HEADER = 1,
+ TINFL_FLAG_HAS_MORE_INPUT = 2,
+ TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF = 4,
+ TINFL_FLAG_COMPUTE_ADLER32 = 8
+};
+
+// High level decompression functions:
+// tinfl_decompress_mem_to_heap() decompresses a block in memory to a heap block allocated via malloc().
+// On entry:
+// pSrc_buf, src_buf_len: Pointer and size of the Deflate or zlib source data to decompress.
+// On return:
+// Function returns a pointer to the decompressed data, or NULL on failure.
+// *pOut_len will be set to the decompressed data's size, which could be larger than src_buf_len on uncompressible data.
+// The caller must call mz_free() on the returned block when it's no longer needed.
+void *tinfl_decompress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags);
+
+// tinfl_decompress_mem_to_mem() decompresses a block in memory to another block in memory.
+// Returns TINFL_DECOMPRESS_MEM_TO_MEM_FAILED on failure, or the number of bytes written on success.
+#define TINFL_DECOMPRESS_MEM_TO_MEM_FAILED ((size_t)(-1))
+size_t tinfl_decompress_mem_to_mem(void *pOut_buf, size_t out_buf_len, const void *pSrc_buf, size_t src_buf_len, int flags);
+
+// tinfl_decompress_mem_to_callback() decompresses a block in memory to an internal 32KB buffer, and a user provided callback function will be called to flush the buffer.
+// Returns 1 on success or 0 on failure.
+typedef int (*tinfl_put_buf_func_ptr)(const void* pBuf, int len, void *pUser);
+int tinfl_decompress_mem_to_callback(const void *pIn_buf, size_t *pIn_buf_size, tinfl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags);
+
+struct tinfl_decompressor_tag; typedef struct tinfl_decompressor_tag tinfl_decompressor;
+
+// Max size of LZ dictionary.
+#define TINFL_LZ_DICT_SIZE 32768
+
+// Return status.
+typedef enum
+{
+ TINFL_STATUS_BAD_PARAM = -3,
+ TINFL_STATUS_ADLER32_MISMATCH = -2,
+ TINFL_STATUS_FAILED = -1,
+ TINFL_STATUS_DONE = 0,
+ TINFL_STATUS_NEEDS_MORE_INPUT = 1,
+ TINFL_STATUS_HAS_MORE_OUTPUT = 2
+} tinfl_status;
+
+// Initializes the decompressor to its initial state.
+#define tinfl_init(r) do { (r)->m_state = 0; } MZ_MACRO_END
+#define tinfl_get_adler32(r) (r)->m_check_adler32
+
+// Main low-level decompressor coroutine function. This is the only function actually needed for decompression. All the other functions are just high-level helpers for improved usability.
+// This is a universal API, i.e. it can be used as a building block to build any desired higher level decompression API. In the limit case, it can be called once per every byte input or output.
+tinfl_status tinfl_decompress(tinfl_decompressor *r, const mz_uint8 *pIn_buf_next, size_t *pIn_buf_size, mz_uint8 *pOut_buf_start, mz_uint8 *pOut_buf_next, size_t *pOut_buf_size, const mz_uint32 decomp_flags);
+
+// Internal/private bits follow.
+enum
+{
+ TINFL_MAX_HUFF_TABLES = 3, TINFL_MAX_HUFF_SYMBOLS_0 = 288, TINFL_MAX_HUFF_SYMBOLS_1 = 32, TINFL_MAX_HUFF_SYMBOLS_2 = 19,
+ TINFL_FAST_LOOKUP_BITS = 10, TINFL_FAST_LOOKUP_SIZE = 1 << TINFL_FAST_LOOKUP_BITS
+};
+
+typedef struct
+{
+ mz_uint8 m_code_size[TINFL_MAX_HUFF_SYMBOLS_0];
+ mz_int16 m_look_up[TINFL_FAST_LOOKUP_SIZE], m_tree[TINFL_MAX_HUFF_SYMBOLS_0 * 2];
+} tinfl_huff_table;
+
+#if MINIZ_HAS_64BIT_REGISTERS
+ #define TINFL_USE_64BIT_BITBUF 1
+#endif
+
+#if TINFL_USE_64BIT_BITBUF
+ typedef mz_uint64 tinfl_bit_buf_t;
+ #define TINFL_BITBUF_SIZE (64)
+#else
+ typedef mz_uint32 tinfl_bit_buf_t;
+ #define TINFL_BITBUF_SIZE (32)
+#endif
+
+struct tinfl_decompressor_tag
+{
+ mz_uint32 m_state, m_num_bits, m_zhdr0, m_zhdr1, m_z_adler32, m_final, m_type, m_check_adler32, m_dist, m_counter, m_num_extra, m_table_sizes[TINFL_MAX_HUFF_TABLES];
+ tinfl_bit_buf_t m_bit_buf;
+ size_t m_dist_from_out_buf_start;
+ tinfl_huff_table m_tables[TINFL_MAX_HUFF_TABLES];
+ mz_uint8 m_raw_header[4], m_len_codes[TINFL_MAX_HUFF_SYMBOLS_0 + TINFL_MAX_HUFF_SYMBOLS_1 + 137];
+};
+
+// ------------------- Low-level Compression API Definitions
+
+// Set TDEFL_LESS_MEMORY to 1 to use less memory (compression will be slightly slower, and raw/dynamic blocks will be output more frequently).
+#define TDEFL_LESS_MEMORY 0
+
+// tdefl_init() compression flags logically OR'd together (low 12 bits contain the max. number of probes per dictionary search):
+// TDEFL_DEFAULT_MAX_PROBES: The compressor defaults to 128 dictionary probes per dictionary search. 0=Huffman only, 1=Huffman+LZ (fastest/crap compression), 4095=Huffman+LZ (slowest/best compression).
+enum
+{
+ TDEFL_HUFFMAN_ONLY = 0, TDEFL_DEFAULT_MAX_PROBES = 128, TDEFL_MAX_PROBES_MASK = 0xFFF
+};
+
+// TDEFL_WRITE_ZLIB_HEADER: If set, the compressor outputs a zlib header before the deflate data, and the Adler-32 of the source data at the end. Otherwise, you'll get raw deflate data.
+// TDEFL_COMPUTE_ADLER32: Always compute the adler-32 of the input data (even when not writing zlib headers).
+// TDEFL_GREEDY_PARSING_FLAG: Set to use faster greedy parsing, instead of more efficient lazy parsing.
+// TDEFL_NONDETERMINISTIC_PARSING_FLAG: Enable to decrease the compressor's initialization time to the minimum, but the output may vary from run to run given the same input (depending on the contents of memory).
+// TDEFL_RLE_MATCHES: Only look for RLE matches (matches with a distance of 1)
+// TDEFL_FILTER_MATCHES: Discards matches <= 5 chars if enabled.
+// TDEFL_FORCE_ALL_STATIC_BLOCKS: Disable usage of optimized Huffman tables.
+// TDEFL_FORCE_ALL_RAW_BLOCKS: Only use raw (uncompressed) deflate blocks.
+// The low 12 bits are reserved to control the max # of hash probes per dictionary lookup (see TDEFL_MAX_PROBES_MASK).
+enum
+{
+ TDEFL_WRITE_ZLIB_HEADER = 0x01000,
+ TDEFL_COMPUTE_ADLER32 = 0x02000,
+ TDEFL_GREEDY_PARSING_FLAG = 0x04000,
+ TDEFL_NONDETERMINISTIC_PARSING_FLAG = 0x08000,
+ TDEFL_RLE_MATCHES = 0x10000,
+ TDEFL_FILTER_MATCHES = 0x20000,
+ TDEFL_FORCE_ALL_STATIC_BLOCKS = 0x40000,
+ TDEFL_FORCE_ALL_RAW_BLOCKS = 0x80000
+};
+
+// High level compression functions:
+// tdefl_compress_mem_to_heap() compresses a block in memory to a heap block allocated via malloc().
+// On entry:
+// pSrc_buf, src_buf_len: Pointer and size of source block to compress.
+// flags: The max match finder probes (default is 128) logically OR'd against the above flags. Higher probes are slower but improve compression.
+// On return:
+// Function returns a pointer to the compressed data, or NULL on failure.
+// *pOut_len will be set to the compressed data's size, which could be larger than src_buf_len on uncompressible data.
+// The caller must free() the returned block when it's no longer needed.
+void *tdefl_compress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags);
+
+// tdefl_compress_mem_to_mem() compresses a block in memory to another block in memory.
+// Returns 0 on failure.
+size_t tdefl_compress_mem_to_mem(void *pOut_buf, size_t out_buf_len, const void *pSrc_buf, size_t src_buf_len, int flags);
+
+// Compresses an image to a compressed PNG file in memory.
+// On entry:
+// pImage, w, h, and num_chans describe the image to compress. num_chans may be 1, 2, 3, or 4.
+// The image pitch in bytes per scanline will be w*num_chans. The leftmost pixel on the top scanline is stored first in memory.
+// level may range from [0,10], use MZ_NO_COMPRESSION, MZ_BEST_SPEED, MZ_BEST_COMPRESSION, etc. or a decent default is MZ_DEFAULT_LEVEL
+// If flip is true, the image will be flipped on the Y axis (useful for OpenGL apps).
+// On return:
+// Function returns a pointer to the compressed data, or NULL on failure.
+// *pLen_out will be set to the size of the PNG image file.
+// The caller must mz_free() the returned heap block (which will typically be larger than *pLen_out) when it's no longer needed.
+void *tdefl_write_image_to_png_file_in_memory_ex(const void *pImage, int w, int h, int num_chans, size_t *pLen_out, mz_uint level, mz_bool flip);
+void *tdefl_write_image_to_png_file_in_memory(const void *pImage, int w, int h, int num_chans, size_t *pLen_out);
+
+// Output stream interface. The compressor uses this interface to write compressed data. It'll typically be called TDEFL_OUT_BUF_SIZE at a time.
+typedef mz_bool (*tdefl_put_buf_func_ptr)(const void* pBuf, int len, void *pUser);
+
+// tdefl_compress_mem_to_output() compresses a block to an output stream. The above helpers use this function internally.
+mz_bool tdefl_compress_mem_to_output(const void *pBuf, size_t buf_len, tdefl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags);
+
+enum { TDEFL_MAX_HUFF_TABLES = 3, TDEFL_MAX_HUFF_SYMBOLS_0 = 288, TDEFL_MAX_HUFF_SYMBOLS_1 = 32, TDEFL_MAX_HUFF_SYMBOLS_2 = 19, TDEFL_LZ_DICT_SIZE = 32768, TDEFL_LZ_DICT_SIZE_MASK = TDEFL_LZ_DICT_SIZE - 1, TDEFL_MIN_MATCH_LEN = 3, TDEFL_MAX_MATCH_LEN = 258 };
+
+// TDEFL_OUT_BUF_SIZE MUST be large enough to hold a single entire compressed output block (using static/fixed Huffman codes).
+#if TDEFL_LESS_MEMORY
+enum { TDEFL_LZ_CODE_BUF_SIZE = 24 * 1024, TDEFL_OUT_BUF_SIZE = (TDEFL_LZ_CODE_BUF_SIZE * 13 ) / 10, TDEFL_MAX_HUFF_SYMBOLS = 288, TDEFL_LZ_HASH_BITS = 12, TDEFL_LEVEL1_HASH_SIZE_MASK = 4095, TDEFL_LZ_HASH_SHIFT = (TDEFL_LZ_HASH_BITS + 2) / 3, TDEFL_LZ_HASH_SIZE = 1 << TDEFL_LZ_HASH_BITS };
+#else
+enum { TDEFL_LZ_CODE_BUF_SIZE = 64 * 1024, TDEFL_OUT_BUF_SIZE = (TDEFL_LZ_CODE_BUF_SIZE * 13 ) / 10, TDEFL_MAX_HUFF_SYMBOLS = 288, TDEFL_LZ_HASH_BITS = 15, TDEFL_LEVEL1_HASH_SIZE_MASK = 4095, TDEFL_LZ_HASH_SHIFT = (TDEFL_LZ_HASH_BITS + 2) / 3, TDEFL_LZ_HASH_SIZE = 1 << TDEFL_LZ_HASH_BITS };
+#endif
+
+// The low-level tdefl functions below may be used directly if the above helper functions aren't flexible enough. The low-level functions don't make any heap allocations, unlike the above helper functions.
+typedef enum
+{
+ TDEFL_STATUS_BAD_PARAM = -2,
+ TDEFL_STATUS_PUT_BUF_FAILED = -1,
+ TDEFL_STATUS_OKAY = 0,
+ TDEFL_STATUS_DONE = 1,
+} tdefl_status;
+
+// Must map to MZ_NO_FLUSH, MZ_SYNC_FLUSH, etc. enums
+typedef enum
+{
+ TDEFL_NO_FLUSH = 0,
+ TDEFL_SYNC_FLUSH = 2,
+ TDEFL_FULL_FLUSH = 3,
+ TDEFL_FINISH = 4
+} tdefl_flush;
+
+// tdefl's compression state structure.
+typedef struct
+{
+ tdefl_put_buf_func_ptr m_pPut_buf_func;
+ void *m_pPut_buf_user;
+ mz_uint m_flags, m_max_probes[2];
+ int m_greedy_parsing;
+ mz_uint m_adler32, m_lookahead_pos, m_lookahead_size, m_dict_size;
+ mz_uint8 *m_pLZ_code_buf, *m_pLZ_flags, *m_pOutput_buf, *m_pOutput_buf_end;
+ mz_uint m_num_flags_left, m_total_lz_bytes, m_lz_code_buf_dict_pos, m_bits_in, m_bit_buffer;
+ mz_uint m_saved_match_dist, m_saved_match_len, m_saved_lit, m_output_flush_ofs, m_output_flush_remaining, m_finished, m_block_index, m_wants_to_finish;
+ tdefl_status m_prev_return_status;
+ const void *m_pIn_buf;
+ void *m_pOut_buf;
+ size_t *m_pIn_buf_size, *m_pOut_buf_size;
+ tdefl_flush m_flush;
+ const mz_uint8 *m_pSrc;
+ size_t m_src_buf_left, m_out_buf_ofs;
+ mz_uint8 m_dict[TDEFL_LZ_DICT_SIZE + TDEFL_MAX_MATCH_LEN - 1];
+ mz_uint16 m_huff_count[TDEFL_MAX_HUFF_TABLES][TDEFL_MAX_HUFF_SYMBOLS];
+ mz_uint16 m_huff_codes[TDEFL_MAX_HUFF_TABLES][TDEFL_MAX_HUFF_SYMBOLS];
+ mz_uint8 m_huff_code_sizes[TDEFL_MAX_HUFF_TABLES][TDEFL_MAX_HUFF_SYMBOLS];
+ mz_uint8 m_lz_code_buf[TDEFL_LZ_CODE_BUF_SIZE];
+ mz_uint16 m_next[TDEFL_LZ_DICT_SIZE];
+ mz_uint16 m_hash[TDEFL_LZ_HASH_SIZE];
+ mz_uint8 m_output_buf[TDEFL_OUT_BUF_SIZE];
+} tdefl_compressor;
+
+// Initializes the compressor.
+// There is no corresponding deinit() function because the tdefl API's do not dynamically allocate memory.
+// pBut_buf_func: If NULL, output data will be supplied to the specified callback. In this case, the user should call the tdefl_compress_buffer() API for compression.
+// If pBut_buf_func is NULL the user should always call the tdefl_compress() API.
+// flags: See the above enums (TDEFL_HUFFMAN_ONLY, TDEFL_WRITE_ZLIB_HEADER, etc.)
+tdefl_status tdefl_init(tdefl_compressor *d, tdefl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags);
+
+// Compresses a block of data, consuming as much of the specified input buffer as possible, and writing as much compressed data to the specified output buffer as possible.
+tdefl_status tdefl_compress(tdefl_compressor *d, const void *pIn_buf, size_t *pIn_buf_size, void *pOut_buf, size_t *pOut_buf_size, tdefl_flush flush);
+
+// tdefl_compress_buffer() is only usable when the tdefl_init() is called with a non-NULL tdefl_put_buf_func_ptr.
+// tdefl_compress_buffer() always consumes the entire input buffer.
+tdefl_status tdefl_compress_buffer(tdefl_compressor *d, const void *pIn_buf, size_t in_buf_size, tdefl_flush flush);
+
+tdefl_status tdefl_get_prev_return_status(tdefl_compressor *d);
+mz_uint32 tdefl_get_adler32(tdefl_compressor *d);
+
+// Can't use tdefl_create_comp_flags_from_zip_params if MINIZ_NO_ZLIB_APIS isn't defined, because it uses some of its macros.
+#ifndef MINIZ_NO_ZLIB_APIS
+// Create tdefl_compress() flags given zlib-style compression parameters.
+// level may range from [0,10] (where 10 is absolute max compression, but may be much slower on some files)
+// window_bits may be -15 (raw deflate) or 15 (zlib)
+// strategy may be either MZ_DEFAULT_STRATEGY, MZ_FILTERED, MZ_HUFFMAN_ONLY, MZ_RLE, or MZ_FIXED
+mz_uint tdefl_create_comp_flags_from_zip_params(int level, int window_bits, int strategy);
+#endif // #ifndef MINIZ_NO_ZLIB_APIS
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // MINIZ_HEADER_INCLUDED
+
+// ------------------- End of Header: Implementation follows. (If you only want the header, define MINIZ_HEADER_FILE_ONLY.)
+
+#ifndef MINIZ_HEADER_FILE_ONLY
+
+typedef unsigned char mz_validate_uint16[sizeof(mz_uint16)==2 ? 1 : -1];
+typedef unsigned char mz_validate_uint32[sizeof(mz_uint32)==4 ? 1 : -1];
+typedef unsigned char mz_validate_uint64[sizeof(mz_uint64)==8 ? 1 : -1];
+
+#include <string.h>
+#include <assert.h>
+
+#define MZ_ASSERT(x) assert(x)
+
+#ifdef MINIZ_NO_MALLOC
+ #define MZ_MALLOC(x) NULL
+ #define MZ_FREE(x) (void)x, ((void)0)
+ #define MZ_REALLOC(p, x) NULL
+#else
+ #define MZ_MALLOC(x) malloc(x)
+ #define MZ_FREE(x) free(x)
+ #define MZ_REALLOC(p, x) realloc(p, x)
+#endif
+
+#define MZ_MAX(a,b) (((a)>(b))?(a):(b))
+#define MZ_MIN(a,b) (((a)<(b))?(a):(b))
+#define MZ_CLEAR_OBJ(obj) memset(&(obj), 0, sizeof(obj))
+
+#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN
+ #define MZ_READ_LE16(p) *((const mz_uint16 *)(p))
+ #define MZ_READ_LE32(p) *((const mz_uint32 *)(p))
+#else
+ #define MZ_READ_LE16(p) ((mz_uint32)(((const mz_uint8 *)(p))[0]) | ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
+ #define MZ_READ_LE32(p) ((mz_uint32)(((const mz_uint8 *)(p))[0]) | ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) | ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) | ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
+#endif
+
+#ifdef _MSC_VER
+ #define MZ_FORCEINLINE __forceinline
+#elif defined(__GNUC__)
+ #define MZ_FORCEINLINE inline __attribute__((__always_inline__))
+#else
+ #define MZ_FORCEINLINE inline
+#endif
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+// ------------------- zlib-style API's
+
+mz_ulong mz_adler32(mz_ulong adler, const unsigned char *ptr, size_t buf_len)
+{
+ mz_uint32 i, s1 = (mz_uint32)(adler & 0xffff), s2 = (mz_uint32)(adler >> 16); size_t block_len = buf_len % 5552;
+ if (!ptr) return MZ_ADLER32_INIT;
+ while (buf_len) {
+ for (i = 0; i + 7 < block_len; i += 8, ptr += 8) {
+ s1 += ptr[0], s2 += s1; s1 += ptr[1], s2 += s1; s1 += ptr[2], s2 += s1; s1 += ptr[3], s2 += s1;
+ s1 += ptr[4], s2 += s1; s1 += ptr[5], s2 += s1; s1 += ptr[6], s2 += s1; s1 += ptr[7], s2 += s1;
+ }
+ for ( ; i < block_len; ++i) s1 += *ptr++, s2 += s1;
+ s1 %= 65521U, s2 %= 65521U; buf_len -= block_len; block_len = 5552;
+ }
+ return (s2 << 16) + s1;
+}
+
+// Karl Malbrain's compact CRC-32. See "A compact CCITT crc16 and crc32 C implementation that balances processor cache usage against speed": http://www.geocities.com/malbrain/
+mz_ulong mz_crc32(mz_ulong crc, const mz_uint8 *ptr, size_t buf_len)
+{
+ static const mz_uint32 s_crc32[16] = { 0, 0x1db71064, 0x3b6e20c8, 0x26d930ac, 0x76dc4190, 0x6b6b51f4, 0x4db26158, 0x5005713c,
+ 0xedb88320, 0xf00f9344, 0xd6d6a3e8, 0xcb61b38c, 0x9b64c2b0, 0x86d3d2d4, 0xa00ae278, 0xbdbdf21c };
+ mz_uint32 crcu32 = (mz_uint32)crc;
+ if (!ptr) return MZ_CRC32_INIT;
+ crcu32 = ~crcu32; while (buf_len--) { mz_uint8 b = *ptr++; crcu32 = (crcu32 >> 4) ^ s_crc32[(crcu32 & 0xF) ^ (b & 0xF)]; crcu32 = (crcu32 >> 4) ^ s_crc32[(crcu32 & 0xF) ^ (b >> 4)]; }
+ return ~crcu32;
+}
+
+void mz_free(void *p)
+{
+ MZ_FREE(p);
+}
+
+#ifndef MINIZ_NO_ZLIB_APIS
+
+static void *def_alloc_func(void *opaque, size_t items, size_t size) { (void)opaque, (void)items, (void)size; return MZ_MALLOC(items * size); }
+static void def_free_func(void *opaque, void *address) { (void)opaque, (void)address; MZ_FREE(address); }
+static void *def_realloc_func(void *opaque, void *address, size_t items, size_t size) { (void)opaque, (void)address, (void)items, (void)size; return MZ_REALLOC(address, items * size); }
+
+const char *mz_version(void)
+{
+ return MZ_VERSION;
+}
+
+int mz_deflateInit(mz_streamp pStream, int level)
+{
+ return mz_deflateInit2(pStream, level, MZ_DEFLATED, MZ_DEFAULT_WINDOW_BITS, 9, MZ_DEFAULT_STRATEGY);
+}
+
+int mz_deflateInit2(mz_streamp pStream, int level, int method, int window_bits, int mem_level, int strategy)
+{
+ tdefl_compressor *pComp;
+ mz_uint comp_flags = TDEFL_COMPUTE_ADLER32 | tdefl_create_comp_flags_from_zip_params(level, window_bits, strategy);
+
+ if (!pStream) return MZ_STREAM_ERROR;
+ if ((method != MZ_DEFLATED) || ((mem_level < 1) || (mem_level > 9)) || ((window_bits != MZ_DEFAULT_WINDOW_BITS) && (-window_bits != MZ_DEFAULT_WINDOW_BITS))) return MZ_PARAM_ERROR;
+
+ pStream->data_type = 0;
+ pStream->adler = MZ_ADLER32_INIT;
+ pStream->msg = NULL;
+ pStream->reserved = 0;
+ pStream->total_in = 0;
+ pStream->total_out = 0;
+ if (!pStream->zalloc) pStream->zalloc = def_alloc_func;
+ if (!pStream->zfree) pStream->zfree = def_free_func;
+
+ pComp = (tdefl_compressor *)pStream->zalloc(pStream->opaque, 1, sizeof(tdefl_compressor));
+ if (!pComp)
+ return MZ_MEM_ERROR;
+
+ pStream->state = (struct mz_internal_state *)pComp;
+
+ if (tdefl_init(pComp, NULL, NULL, comp_flags) != TDEFL_STATUS_OKAY)
+ {
+ mz_deflateEnd(pStream);
+ return MZ_PARAM_ERROR;
+ }
+
+ return MZ_OK;
+}
+
+int mz_deflateReset(mz_streamp pStream)
+{
+ if ((!pStream) || (!pStream->state) || (!pStream->zalloc) || (!pStream->zfree)) return MZ_STREAM_ERROR;
+ pStream->total_in = pStream->total_out = 0;
+ tdefl_init((tdefl_compressor*)pStream->state, NULL, NULL, ((tdefl_compressor*)pStream->state)->m_flags);
+ return MZ_OK;
+}
+
+int mz_deflate(mz_streamp pStream, int flush)
+{
+ size_t in_bytes, out_bytes;
+ mz_ulong orig_total_in, orig_total_out;
+ int mz_status = MZ_OK;
+
+ if ((!pStream) || (!pStream->state) || (flush < 0) || (flush > MZ_FINISH) || (!pStream->next_out)) return MZ_STREAM_ERROR;
+ if (!pStream->avail_out) return MZ_BUF_ERROR;
+
+ if (flush == MZ_PARTIAL_FLUSH) flush = MZ_SYNC_FLUSH;
+
+ if (((tdefl_compressor*)pStream->state)->m_prev_return_status == TDEFL_STATUS_DONE)
+ return (flush == MZ_FINISH) ? MZ_STREAM_END : MZ_BUF_ERROR;
+
+ orig_total_in = pStream->total_in; orig_total_out = pStream->total_out;
+ for ( ; ; )
+ {
+ tdefl_status defl_status;
+ in_bytes = pStream->avail_in; out_bytes = pStream->avail_out;
+
+ defl_status = tdefl_compress((tdefl_compressor*)pStream->state, pStream->next_in, &in_bytes, pStream->next_out, &out_bytes, (tdefl_flush)flush);
+ pStream->next_in += (mz_uint)in_bytes; pStream->avail_in -= (mz_uint)in_bytes;
+ pStream->total_in += (mz_uint)in_bytes; pStream->adler = tdefl_get_adler32((tdefl_compressor*)pStream->state);
+
+ pStream->next_out += (mz_uint)out_bytes; pStream->avail_out -= (mz_uint)out_bytes;
+ pStream->total_out += (mz_uint)out_bytes;
+
+ if (defl_status < 0)
+ {
+ mz_status = MZ_STREAM_ERROR;
+ break;
+ }
+ else if (defl_status == TDEFL_STATUS_DONE)
+ {
+ mz_status = MZ_STREAM_END;
+ break;
+ }
+ else if (!pStream->avail_out)
+ break;
+ else if ((!pStream->avail_in) && (flush != MZ_FINISH))
+ {
+ if ((flush) || (pStream->total_in != orig_total_in) || (pStream->total_out != orig_total_out))
+ break;
+ return MZ_BUF_ERROR; // Can't make forward progress without some input.
+ }
+ }
+ return mz_status;
+}
+
+int mz_deflateEnd(mz_streamp pStream)
+{
+ if (!pStream) return MZ_STREAM_ERROR;
+ if (pStream->state)
+ {
+ pStream->zfree(pStream->opaque, pStream->state);
+ pStream->state = NULL;
+ }
+ return MZ_OK;
+}
+
+mz_ulong mz_deflateBound(mz_streamp pStream, mz_ulong source_len)
+{
+ (void)pStream;
+ // This is really over conservative. (And lame, but it's actually pretty tricky to compute a true upper bound given the way tdefl's blocking works.)
+ return MZ_MAX(128 + (source_len * 110) / 100, 128 + source_len + ((source_len / (31 * 1024)) + 1) * 5);
+}
+
+int mz_compress2(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len, int level)
+{
+ int status;
+ mz_stream stream;
+ memset(&stream, 0, sizeof(stream));
+
+ // In case mz_ulong is 64-bits (argh I hate longs).
+ if ((source_len | *pDest_len) > 0xFFFFFFFFU) return MZ_PARAM_ERROR;
+
+ stream.next_in = pSource;
+ stream.avail_in = (mz_uint32)source_len;
+ stream.next_out = pDest;
+ stream.avail_out = (mz_uint32)*pDest_len;
+
+ status = mz_deflateInit(&stream, level);
+ if (status != MZ_OK) return status;
+
+ status = mz_deflate(&stream, MZ_FINISH);
+ if (status != MZ_STREAM_END)
+ {
+ mz_deflateEnd(&stream);
+ return (status == MZ_OK) ? MZ_BUF_ERROR : status;
+ }
+
+ *pDest_len = stream.total_out;
+ return mz_deflateEnd(&stream);
+}
+
+int mz_compress(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len)
+{
+ return mz_compress2(pDest, pDest_len, pSource, source_len, MZ_DEFAULT_COMPRESSION);
+}
+
+mz_ulong mz_compressBound(mz_ulong source_len)
+{
+ return mz_deflateBound(NULL, source_len);
+}
+
+typedef struct
+{
+ tinfl_decompressor m_decomp;
+ mz_uint m_dict_ofs, m_dict_avail, m_first_call, m_has_flushed; int m_window_bits;
+ mz_uint8 m_dict[TINFL_LZ_DICT_SIZE];
+ tinfl_status m_last_status;
+} inflate_state;
+
+int mz_inflateInit2(mz_streamp pStream, int window_bits)
+{
+ inflate_state *pDecomp;
+ if (!pStream) return MZ_STREAM_ERROR;
+ if ((window_bits != MZ_DEFAULT_WINDOW_BITS) && (-window_bits != MZ_DEFAULT_WINDOW_BITS)) return MZ_PARAM_ERROR;
+
+ pStream->data_type = 0;
+ pStream->adler = 0;
+ pStream->msg = NULL;
+ pStream->total_in = 0;
+ pStream->total_out = 0;
+ pStream->reserved = 0;
+ if (!pStream->zalloc) pStream->zalloc = def_alloc_func;
+ if (!pStream->zfree) pStream->zfree = def_free_func;
+
+ pDecomp = (inflate_state*)pStream->zalloc(pStream->opaque, 1, sizeof(inflate_state));
+ if (!pDecomp) return MZ_MEM_ERROR;
+
+ pStream->state = (struct mz_internal_state *)pDecomp;
+
+ tinfl_init(&pDecomp->m_decomp);
+ pDecomp->m_dict_ofs = 0;
+ pDecomp->m_dict_avail = 0;
+ pDecomp->m_last_status = TINFL_STATUS_NEEDS_MORE_INPUT;
+ pDecomp->m_first_call = 1;
+ pDecomp->m_has_flushed = 0;
+ pDecomp->m_window_bits = window_bits;
+
+ return MZ_OK;
+}
+
+int mz_inflateInit(mz_streamp pStream)
+{
+ return mz_inflateInit2(pStream, MZ_DEFAULT_WINDOW_BITS);
+}
+
+int mz_inflate(mz_streamp pStream, int flush)
+{
+ inflate_state* pState;
+ mz_uint n, first_call, decomp_flags = TINFL_FLAG_COMPUTE_ADLER32;
+ size_t in_bytes, out_bytes, orig_avail_in;
+ tinfl_status status;
+
+ if ((!pStream) || (!pStream->state)) return MZ_STREAM_ERROR;
+ if (flush == MZ_PARTIAL_FLUSH) flush = MZ_SYNC_FLUSH;
+ if ((flush) && (flush != MZ_SYNC_FLUSH) && (flush != MZ_FINISH)) return MZ_STREAM_ERROR;
+
+ pState = (inflate_state*)pStream->state;
+ if (pState->m_window_bits > 0) decomp_flags |= TINFL_FLAG_PARSE_ZLIB_HEADER;
+ orig_avail_in = pStream->avail_in;
+
+ first_call = pState->m_first_call; pState->m_first_call = 0;
+ if (pState->m_last_status < 0) return MZ_DATA_ERROR;
+
+ if (pState->m_has_flushed && (flush != MZ_FINISH)) return MZ_STREAM_ERROR;
+ pState->m_has_flushed |= (flush == MZ_FINISH);
+
+ if ((flush == MZ_FINISH) && (first_call))
+ {
+ // MZ_FINISH on the first call implies that the input and output buffers are large enough to hold the entire compressed/decompressed file.
+ decomp_flags |= TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF;
+ in_bytes = pStream->avail_in; out_bytes = pStream->avail_out;
+ status = tinfl_decompress(&pState->m_decomp, pStream->next_in, &in_bytes, pStream->next_out, pStream->next_out, &out_bytes, decomp_flags);
+ pState->m_last_status = status;
+ pStream->next_in += (mz_uint)in_bytes; pStream->avail_in -= (mz_uint)in_bytes; pStream->total_in += (mz_uint)in_bytes;
+ pStream->adler = tinfl_get_adler32(&pState->m_decomp);
+ pStream->next_out += (mz_uint)out_bytes; pStream->avail_out -= (mz_uint)out_bytes; pStream->total_out += (mz_uint)out_bytes;
+
+ if (status < 0)
+ return MZ_DATA_ERROR;
+ else if (status != TINFL_STATUS_DONE)
+ {
+ pState->m_last_status = TINFL_STATUS_FAILED;
+ return MZ_BUF_ERROR;
+ }
+ return MZ_STREAM_END;
+ }
+ // flush != MZ_FINISH then we must assume there's more input.
+ if (flush != MZ_FINISH) decomp_flags |= TINFL_FLAG_HAS_MORE_INPUT;
+
+ if (pState->m_dict_avail)
+ {
+ n = MZ_MIN(pState->m_dict_avail, pStream->avail_out);
+ memcpy(pStream->next_out, pState->m_dict + pState->m_dict_ofs, n);
+ pStream->next_out += n; pStream->avail_out -= n; pStream->total_out += n;
+ pState->m_dict_avail -= n; pState->m_dict_ofs = (pState->m_dict_ofs + n) & (TINFL_LZ_DICT_SIZE - 1);
+ return ((pState->m_last_status == TINFL_STATUS_DONE) && (!pState->m_dict_avail)) ? MZ_STREAM_END : MZ_OK;
+ }
+
+ for ( ; ; )
+ {
+ in_bytes = pStream->avail_in;
+ out_bytes = TINFL_LZ_DICT_SIZE - pState->m_dict_ofs;
+
+ status = tinfl_decompress(&pState->m_decomp, pStream->next_in, &in_bytes, pState->m_dict, pState->m_dict + pState->m_dict_ofs, &out_bytes, decomp_flags);
+ pState->m_last_status = status;
+
+ pStream->next_in += (mz_uint)in_bytes; pStream->avail_in -= (mz_uint)in_bytes;
+ pStream->total_in += (mz_uint)in_bytes; pStream->adler = tinfl_get_adler32(&pState->m_decomp);
+
+ pState->m_dict_avail = (mz_uint)out_bytes;
+
+ n = MZ_MIN(pState->m_dict_avail, pStream->avail_out);
+ memcpy(pStream->next_out, pState->m_dict + pState->m_dict_ofs, n);
+ pStream->next_out += n; pStream->avail_out -= n; pStream->total_out += n;
+ pState->m_dict_avail -= n; pState->m_dict_ofs = (pState->m_dict_ofs + n) & (TINFL_LZ_DICT_SIZE - 1);
+
+ if (status < 0)
+ return MZ_DATA_ERROR; // Stream is corrupted (there could be some uncompressed data left in the output dictionary - oh well).
+ else if ((status == TINFL_STATUS_NEEDS_MORE_INPUT) && (!orig_avail_in))
+ return MZ_BUF_ERROR; // Signal caller that we can't make forward progress without supplying more input or by setting flush to MZ_FINISH.
+ else if (flush == MZ_FINISH)
+ {
+ // The output buffer MUST be large to hold the remaining uncompressed data when flush==MZ_FINISH.
+ if (status == TINFL_STATUS_DONE)
+ return pState->m_dict_avail ? MZ_BUF_ERROR : MZ_STREAM_END;
+ // status here must be TINFL_STATUS_HAS_MORE_OUTPUT, which means there's at least 1 more byte on the way. If there's no more room left in the output buffer then something is wrong.
+ else if (!pStream->avail_out)
+ return MZ_BUF_ERROR;
+ }
+ else if ((status == TINFL_STATUS_DONE) || (!pStream->avail_in) || (!pStream->avail_out) || (pState->m_dict_avail))
+ break;
+ }
+
+ return ((status == TINFL_STATUS_DONE) && (!pState->m_dict_avail)) ? MZ_STREAM_END : MZ_OK;
+}
+
+int mz_inflateEnd(mz_streamp pStream)
+{
+ if (!pStream)
+ return MZ_STREAM_ERROR;
+ if (pStream->state)
+ {
+ pStream->zfree(pStream->opaque, pStream->state);
+ pStream->state = NULL;
+ }
+ return MZ_OK;
+}
+
+int mz_uncompress(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len)
+{
+ mz_stream stream;
+ int status;
+ memset(&stream, 0, sizeof(stream));
+
+ // In case mz_ulong is 64-bits (argh I hate longs).
+ if ((source_len | *pDest_len) > 0xFFFFFFFFU) return MZ_PARAM_ERROR;
+
+ stream.next_in = pSource;
+ stream.avail_in = (mz_uint32)source_len;
+ stream.next_out = pDest;
+ stream.avail_out = (mz_uint32)*pDest_len;
+
+ status = mz_inflateInit(&stream);
+ if (status != MZ_OK)
+ return status;
+
+ status = mz_inflate(&stream, MZ_FINISH);
+ if (status != MZ_STREAM_END)
+ {
+ mz_inflateEnd(&stream);
+ return ((status == MZ_BUF_ERROR) && (!stream.avail_in)) ? MZ_DATA_ERROR : status;
+ }
+ *pDest_len = stream.total_out;
+
+ return mz_inflateEnd(&stream);
+}
+
+const char *mz_error(int err)
+{
+ static struct { int m_err; const char *m_pDesc; } s_error_descs[] =
+ {
+ { MZ_OK, "" }, { MZ_STREAM_END, "stream end" }, { MZ_NEED_DICT, "need dictionary" }, { MZ_ERRNO, "file error" }, { MZ_STREAM_ERROR, "stream error" },
+ { MZ_DATA_ERROR, "data error" }, { MZ_MEM_ERROR, "out of memory" }, { MZ_BUF_ERROR, "buf error" }, { MZ_VERSION_ERROR, "version error" }, { MZ_PARAM_ERROR, "parameter error" }
+ };
+ mz_uint i; for (i = 0; i < sizeof(s_error_descs) / sizeof(s_error_descs[0]); ++i) if (s_error_descs[i].m_err == err) return s_error_descs[i].m_pDesc;
+ return NULL;
+}
+
+#endif //MINIZ_NO_ZLIB_APIS
+
+// ------------------- Low-level Decompression (completely independent from all compression API's)
+
+#define TINFL_MEMCPY(d, s, l) memcpy(d, s, l)
+#define TINFL_MEMSET(p, c, l) memset(p, c, l)
+
+#define TINFL_CR_BEGIN switch(r->m_state) { case 0:
+#define TINFL_CR_RETURN(state_index, result) do { status = result; r->m_state = state_index; goto common_exit; case state_index:; } MZ_MACRO_END
+#define TINFL_CR_RETURN_FOREVER(state_index, result) do { for ( ; ; ) { TINFL_CR_RETURN(state_index, result); } } MZ_MACRO_END
+#define TINFL_CR_FINISH }
+
+// TODO: If the caller has indicated that there's no more input, and we attempt to read beyond the input buf, then something is wrong with the input because the inflator never
+// reads ahead more than it needs to. Currently TINFL_GET_BYTE() pads the end of the stream with 0's in this scenario.
+#define TINFL_GET_BYTE(state_index, c) do { \
+ if (pIn_buf_cur >= pIn_buf_end) { \
+ for ( ; ; ) { \
+ if (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT) { \
+ TINFL_CR_RETURN(state_index, TINFL_STATUS_NEEDS_MORE_INPUT); \
+ if (pIn_buf_cur < pIn_buf_end) { \
+ c = *pIn_buf_cur++; \
+ break; \
+ } \
+ } else { \
+ c = 0; \
+ break; \
+ } \
+ } \
+ } else c = *pIn_buf_cur++; } MZ_MACRO_END
+
+#define TINFL_NEED_BITS(state_index, n) do { mz_uint c; TINFL_GET_BYTE(state_index, c); bit_buf |= (((tinfl_bit_buf_t)c) << num_bits); num_bits += 8; } while (num_bits < (mz_uint)(n))
+#define TINFL_SKIP_BITS(state_index, n) do { if (num_bits < (mz_uint)(n)) { TINFL_NEED_BITS(state_index, n); } bit_buf >>= (n); num_bits -= (n); } MZ_MACRO_END
+#define TINFL_GET_BITS(state_index, b, n) do { if (num_bits < (mz_uint)(n)) { TINFL_NEED_BITS(state_index, n); } b = bit_buf & ((1 << (n)) - 1); bit_buf >>= (n); num_bits -= (n); } MZ_MACRO_END
+
+// TINFL_HUFF_BITBUF_FILL() is only used rarely, when the number of bytes remaining in the input buffer falls below 2.
+// It reads just enough bytes from the input stream that are needed to decode the next Huffman code (and absolutely no more). It works by trying to fully decode a
+// Huffman code by using whatever bits are currently present in the bit buffer. If this fails, it reads another byte, and tries again until it succeeds or until the
+// bit buffer contains >=15 bits (deflate's max. Huffman code size).
+#define TINFL_HUFF_BITBUF_FILL(state_index, pHuff) \
+ do { \
+ temp = (pHuff)->m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]; \
+ if (temp >= 0) { \
+ code_len = temp >> 9; \
+ if ((code_len) && (num_bits >= code_len)) \
+ break; \
+ } else if (num_bits > TINFL_FAST_LOOKUP_BITS) { \
+ code_len = TINFL_FAST_LOOKUP_BITS; \
+ do { \
+ temp = (pHuff)->m_tree[~temp + ((bit_buf >> code_len++) & 1)]; \
+ } while ((temp < 0) && (num_bits >= (code_len + 1))); if (temp >= 0) break; \
+ } TINFL_GET_BYTE(state_index, c); bit_buf |= (((tinfl_bit_buf_t)c) << num_bits); num_bits += 8; \
+ } while (num_bits < 15);
+
+// TINFL_HUFF_DECODE() decodes the next Huffman coded symbol. It's more complex than you would initially expect because the zlib API expects the decompressor to never read
+// beyond the final byte of the deflate stream. (In other words, when this macro wants to read another byte from the input, it REALLY needs another byte in order to fully
+// decode the next Huffman code.) Handling this properly is particularly important on raw deflate (non-zlib) streams, which aren't followed by a byte aligned adler-32.
+// The slow path is only executed at the very end of the input buffer.
+#define TINFL_HUFF_DECODE(state_index, sym, pHuff) do { \
+ int temp; mz_uint code_len, c; \
+ if (num_bits < 15) { \
+ if ((pIn_buf_end - pIn_buf_cur) < 2) { \
+ TINFL_HUFF_BITBUF_FILL(state_index, pHuff); \
+ } else { \
+ bit_buf |= (((tinfl_bit_buf_t)pIn_buf_cur[0]) << num_bits) | (((tinfl_bit_buf_t)pIn_buf_cur[1]) << (num_bits + 8)); pIn_buf_cur += 2; num_bits += 16; \
+ } \
+ } \
+ if ((temp = (pHuff)->m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) \
+ code_len = temp >> 9, temp &= 511; \
+ else { \
+ code_len = TINFL_FAST_LOOKUP_BITS; do { temp = (pHuff)->m_tree[~temp + ((bit_buf >> code_len++) & 1)]; } while (temp < 0); \
+ } sym = temp; bit_buf >>= code_len; num_bits -= code_len; } MZ_MACRO_END
+
+tinfl_status tinfl_decompress(tinfl_decompressor *r, const mz_uint8 *pIn_buf_next, size_t *pIn_buf_size, mz_uint8 *pOut_buf_start, mz_uint8 *pOut_buf_next, size_t *pOut_buf_size, const mz_uint32 decomp_flags)
+{
+ static const int s_length_base[31] = { 3,4,5,6,7,8,9,10,11,13, 15,17,19,23,27,31,35,43,51,59, 67,83,99,115,131,163,195,227,258,0,0 };
+ static const int s_length_extra[31]= { 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 };
+ static const int s_dist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193, 257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0};
+ static const int s_dist_extra[32] = { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13};
+ static const mz_uint8 s_length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 };
+ static const int s_min_table_sizes[3] = { 257, 1, 4 };
+
+ tinfl_status status = TINFL_STATUS_FAILED; mz_uint32 num_bits, dist, counter, num_extra; tinfl_bit_buf_t bit_buf;
+ const mz_uint8 *pIn_buf_cur = pIn_buf_next, *const pIn_buf_end = pIn_buf_next + *pIn_buf_size;
+ mz_uint8 *pOut_buf_cur = pOut_buf_next, *const pOut_buf_end = pOut_buf_next + *pOut_buf_size;
+ size_t out_buf_size_mask = (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF) ? (size_t)-1 : ((pOut_buf_next - pOut_buf_start) + *pOut_buf_size) - 1, dist_from_out_buf_start;
+
+ // Ensure the output buffer's size is a power of 2, unless the output buffer is large enough to hold the entire output file (in which case it doesn't matter).
+ if (((out_buf_size_mask + 1) & out_buf_size_mask) || (pOut_buf_next < pOut_buf_start)) { *pIn_buf_size = *pOut_buf_size = 0; return TINFL_STATUS_BAD_PARAM; }
+
+ num_bits = r->m_num_bits; bit_buf = r->m_bit_buf; dist = r->m_dist; counter = r->m_counter; num_extra = r->m_num_extra; dist_from_out_buf_start = r->m_dist_from_out_buf_start;
+ TINFL_CR_BEGIN
+
+ bit_buf = num_bits = dist = counter = num_extra = r->m_zhdr0 = r->m_zhdr1 = 0; r->m_z_adler32 = r->m_check_adler32 = 1;
+ if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER)
+ {
+ TINFL_GET_BYTE(1, r->m_zhdr0); TINFL_GET_BYTE(2, r->m_zhdr1);
+ counter = (((r->m_zhdr0 * 256 + r->m_zhdr1) % 31 != 0) || (r->m_zhdr1 & 32) || ((r->m_zhdr0 & 15) != 8));
+ if (!(decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) counter |= (((1U << (8U + (r->m_zhdr0 >> 4))) > 32768U) || ((out_buf_size_mask + 1) < (size_t)(1U << (8U + (r->m_zhdr0 >> 4)))));
+ if (counter) { TINFL_CR_RETURN_FOREVER(36, TINFL_STATUS_FAILED); }
+ }
+
+ do
+ {
+ TINFL_GET_BITS(3, r->m_final, 3); r->m_type = r->m_final >> 1;
+ if (r->m_type == 0)
+ {
+ TINFL_SKIP_BITS(5, num_bits & 7);
+ for (counter = 0; counter < 4; ++counter) { if (num_bits) TINFL_GET_BITS(6, r->m_raw_header[counter], 8); else TINFL_GET_BYTE(7, r->m_raw_header[counter]); }
+ if ((counter = (r->m_raw_header[0] | (r->m_raw_header[1] << 8))) != (mz_uint)(0xFFFF ^ (r->m_raw_header[2] | (r->m_raw_header[3] << 8)))) { TINFL_CR_RETURN_FOREVER(39, TINFL_STATUS_FAILED); }
+ while ((counter) && (num_bits))
+ {
+ TINFL_GET_BITS(51, dist, 8);
+ while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(52, TINFL_STATUS_HAS_MORE_OUTPUT); }
+ *pOut_buf_cur++ = (mz_uint8)dist;
+ counter--;
+ }
+ while (counter)
+ {
+ size_t n; while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(9, TINFL_STATUS_HAS_MORE_OUTPUT); }
+ while (pIn_buf_cur >= pIn_buf_end)
+ {
+ if (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT)
+ {
+ TINFL_CR_RETURN(38, TINFL_STATUS_NEEDS_MORE_INPUT);
+ }
+ else
+ {
+ TINFL_CR_RETURN_FOREVER(40, TINFL_STATUS_FAILED);
+ }
+ }
+ n = MZ_MIN(MZ_MIN((size_t)(pOut_buf_end - pOut_buf_cur), (size_t)(pIn_buf_end - pIn_buf_cur)), counter);
+ TINFL_MEMCPY(pOut_buf_cur, pIn_buf_cur, n); pIn_buf_cur += n; pOut_buf_cur += n; counter -= (mz_uint)n;
+ }
+ }
+ else if (r->m_type == 3)
+ {
+ TINFL_CR_RETURN_FOREVER(10, TINFL_STATUS_FAILED);
+ }
+ else
+ {
+ if (r->m_type == 1)
+ {
+ mz_uint8 *p = r->m_tables[0].m_code_size; mz_uint i;
+ r->m_table_sizes[0] = 288; r->m_table_sizes[1] = 32; TINFL_MEMSET(r->m_tables[1].m_code_size, 5, 32);
+ for ( i = 0; i <= 143; ++i) *p++ = 8; for ( ; i <= 255; ++i) *p++ = 9; for ( ; i <= 279; ++i) *p++ = 7; for ( ; i <= 287; ++i) *p++ = 8;
+ }
+ else
+ {
+ for (counter = 0; counter < 3; counter++) { TINFL_GET_BITS(11, r->m_table_sizes[counter], "\05\05\04"[counter]); r->m_table_sizes[counter] += s_min_table_sizes[counter]; }
+ MZ_CLEAR_OBJ(r->m_tables[2].m_code_size); for (counter = 0; counter < r->m_table_sizes[2]; counter++) { mz_uint s; TINFL_GET_BITS(14, s, 3); r->m_tables[2].m_code_size[s_length_dezigzag[counter]] = (mz_uint8)s; }
+ r->m_table_sizes[2] = 19;
+ }
+ for ( ; (int)r->m_type >= 0; r->m_type--)
+ {
+ int tree_next, tree_cur; tinfl_huff_table *pTable;
+ mz_uint i, j, used_syms, total, sym_index, next_code[17], total_syms[16]; pTable = &r->m_tables[r->m_type]; MZ_CLEAR_OBJ(total_syms); MZ_CLEAR_OBJ(pTable->m_look_up); MZ_CLEAR_OBJ(pTable->m_tree);
+ for (i = 0; i < r->m_table_sizes[r->m_type]; ++i) total_syms[pTable->m_code_size[i]]++;
+ used_syms = 0, total = 0; next_code[0] = next_code[1] = 0;
+ for (i = 1; i <= 15; ++i) { used_syms += total_syms[i]; next_code[i + 1] = (total = ((total + total_syms[i]) << 1)); }
+ if ((65536 != total) && (used_syms > 1))
+ {
+ TINFL_CR_RETURN_FOREVER(35, TINFL_STATUS_FAILED);
+ }
+ for (tree_next = -1, sym_index = 0; sym_index < r->m_table_sizes[r->m_type]; ++sym_index)
+ {
+ mz_uint rev_code = 0, l, cur_code, code_size = pTable->m_code_size[sym_index]; if (!code_size) continue;
+ cur_code = next_code[code_size]++; for (l = code_size; l > 0; l--, cur_code >>= 1) rev_code = (rev_code << 1) | (cur_code & 1);
+ if (code_size <= TINFL_FAST_LOOKUP_BITS) { mz_int16 k = (mz_int16)((code_size << 9) | sym_index); while (rev_code < TINFL_FAST_LOOKUP_SIZE) { pTable->m_look_up[rev_code] = k; rev_code += (1 << code_size); } continue; }
+ if (0 == (tree_cur = pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)])) { pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; }
+ rev_code >>= (TINFL_FAST_LOOKUP_BITS - 1);
+ for (j = code_size; j > (TINFL_FAST_LOOKUP_BITS + 1); j--)
+ {
+ tree_cur -= ((rev_code >>= 1) & 1);
+ if (!pTable->m_tree[-tree_cur - 1]) { pTable->m_tree[-tree_cur - 1] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } else tree_cur = pTable->m_tree[-tree_cur - 1];
+ }
+ tree_cur -= ((rev_code >>= 1) & 1); pTable->m_tree[-tree_cur - 1] = (mz_int16)sym_index;
+ }
+ if (r->m_type == 2)
+ {
+ for (counter = 0; counter < (r->m_table_sizes[0] + r->m_table_sizes[1]); )
+ {
+ mz_uint s; TINFL_HUFF_DECODE(16, dist, &r->m_tables[2]); if (dist < 16) { r->m_len_codes[counter++] = (mz_uint8)dist; continue; }
+ if ((dist == 16) && (!counter))
+ {
+ TINFL_CR_RETURN_FOREVER(17, TINFL_STATUS_FAILED);
+ }
+ num_extra = "\02\03\07"[dist - 16]; TINFL_GET_BITS(18, s, num_extra); s += "\03\03\013"[dist - 16];
+ TINFL_MEMSET(r->m_len_codes + counter, (dist == 16) ? r->m_len_codes[counter - 1] : 0, s); counter += s;
+ }
+ if ((r->m_table_sizes[0] + r->m_table_sizes[1]) != counter)
+ {
+ TINFL_CR_RETURN_FOREVER(21, TINFL_STATUS_FAILED);
+ }
+ TINFL_MEMCPY(r->m_tables[0].m_code_size, r->m_len_codes, r->m_table_sizes[0]); TINFL_MEMCPY(r->m_tables[1].m_code_size, r->m_len_codes + r->m_table_sizes[0], r->m_table_sizes[1]);
+ }
+ }
+ for ( ; ; )
+ {
+ mz_uint8 *pSrc;
+ for ( ; ; )
+ {
+ if (((pIn_buf_end - pIn_buf_cur) < 4) || ((pOut_buf_end - pOut_buf_cur) < 2))
+ {
+ TINFL_HUFF_DECODE(23, counter, &r->m_tables[0]);
+ if (counter >= 256)
+ break;
+ while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(24, TINFL_STATUS_HAS_MORE_OUTPUT); }
+ *pOut_buf_cur++ = (mz_uint8)counter;
+ }
+ else
+ {
+ int sym2; mz_uint code_len;
+#if TINFL_USE_64BIT_BITBUF
+ if (num_bits < 30) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE32(pIn_buf_cur)) << num_bits); pIn_buf_cur += 4; num_bits += 32; }
+#else
+ if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; }
+#endif
+ if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0)
+ code_len = sym2 >> 9;
+ else
+ {
+ code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0);
+ }
+ counter = sym2; bit_buf >>= code_len; num_bits -= code_len;
+ if (counter & 256)
+ break;
+
+#if !TINFL_USE_64BIT_BITBUF
+ if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; }
+#endif
+ if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0)
+ code_len = sym2 >> 9;
+ else
+ {
+ code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0);
+ }
+ bit_buf >>= code_len; num_bits -= code_len;
+
+ pOut_buf_cur[0] = (mz_uint8)counter;
+ if (sym2 & 256)
+ {
+ pOut_buf_cur++;
+ counter = sym2;
+ break;
+ }
+ pOut_buf_cur[1] = (mz_uint8)sym2;
+ pOut_buf_cur += 2;
+ }
+ }
+ if ((counter &= 511) == 256) break;
+
+ num_extra = s_length_extra[counter - 257]; counter = s_length_base[counter - 257];
+ if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(25, extra_bits, num_extra); counter += extra_bits; }
+
+ TINFL_HUFF_DECODE(26, dist, &r->m_tables[1]);
+ num_extra = s_dist_extra[dist]; dist = s_dist_base[dist];
+ if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(27, extra_bits, num_extra); dist += extra_bits; }
+
+ dist_from_out_buf_start = pOut_buf_cur - pOut_buf_start;
+ if ((dist > dist_from_out_buf_start) && (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF))
+ {
+ TINFL_CR_RETURN_FOREVER(37, TINFL_STATUS_FAILED);
+ }
+
+ pSrc = pOut_buf_start + ((dist_from_out_buf_start - dist) & out_buf_size_mask);
+
+ if ((MZ_MAX(pOut_buf_cur, pSrc) + counter) > pOut_buf_end)
+ {
+ while (counter--)
+ {
+ while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(53, TINFL_STATUS_HAS_MORE_OUTPUT); }
+ *pOut_buf_cur++ = pOut_buf_start[(dist_from_out_buf_start++ - dist) & out_buf_size_mask];
+ }
+ continue;
+ }
+#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES
+ else if ((counter >= 9) && (counter <= dist))
+ {
+ const mz_uint8 *pSrc_end = pSrc + (counter & ~7);
+ do
+ {
+ ((mz_uint32 *)pOut_buf_cur)[0] = ((const mz_uint32 *)pSrc)[0];
+ ((mz_uint32 *)pOut_buf_cur)[1] = ((const mz_uint32 *)pSrc)[1];
+ pOut_buf_cur += 8;
+ } while ((pSrc += 8) < pSrc_end);
+ if ((counter &= 7) < 3)
+ {
+ if (counter)
+ {
+ pOut_buf_cur[0] = pSrc[0];
+ if (counter > 1)
+ pOut_buf_cur[1] = pSrc[1];
+ pOut_buf_cur += counter;
+ }
+ continue;
+ }
+ }
+#endif
+ do
+ {
+ pOut_buf_cur[0] = pSrc[0];
+ pOut_buf_cur[1] = pSrc[1];
+ pOut_buf_cur[2] = pSrc[2];
+ pOut_buf_cur += 3; pSrc += 3;
+ } while ((int)(counter -= 3) > 2);
+ if ((int)counter > 0)
+ {
+ pOut_buf_cur[0] = pSrc[0];
+ if ((int)counter > 1)
+ pOut_buf_cur[1] = pSrc[1];
+ pOut_buf_cur += counter;
+ }
+ }
+ }
+ } while (!(r->m_final & 1));
+ if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER)
+ {
+ TINFL_SKIP_BITS(32, num_bits & 7); for (counter = 0; counter < 4; ++counter) { mz_uint s; if (num_bits) TINFL_GET_BITS(41, s, 8); else TINFL_GET_BYTE(42, s); r->m_z_adler32 = (r->m_z_adler32 << 8) | s; }
+ }
+ TINFL_CR_RETURN_FOREVER(34, TINFL_STATUS_DONE);
+ TINFL_CR_FINISH
+
+common_exit:
+ r->m_num_bits = num_bits; r->m_bit_buf = bit_buf; r->m_dist = dist; r->m_counter = counter; r->m_num_extra = num_extra; r->m_dist_from_out_buf_start = dist_from_out_buf_start;
+ *pIn_buf_size = pIn_buf_cur - pIn_buf_next; *pOut_buf_size = pOut_buf_cur - pOut_buf_next;
+ if ((decomp_flags & (TINFL_FLAG_PARSE_ZLIB_HEADER | TINFL_FLAG_COMPUTE_ADLER32)) && (status >= 0))
+ {
+ const mz_uint8 *ptr = pOut_buf_next; size_t buf_len = *pOut_buf_size;
+ mz_uint32 i, s1 = r->m_check_adler32 & 0xffff, s2 = r->m_check_adler32 >> 16; size_t block_len = buf_len % 5552;
+ while (buf_len)
+ {
+ for (i = 0; i + 7 < block_len; i += 8, ptr += 8)
+ {
+ s1 += ptr[0], s2 += s1; s1 += ptr[1], s2 += s1; s1 += ptr[2], s2 += s1; s1 += ptr[3], s2 += s1;
+ s1 += ptr[4], s2 += s1; s1 += ptr[5], s2 += s1; s1 += ptr[6], s2 += s1; s1 += ptr[7], s2 += s1;
+ }
+ for ( ; i < block_len; ++i) s1 += *ptr++, s2 += s1;
+ s1 %= 65521U, s2 %= 65521U; buf_len -= block_len; block_len = 5552;
+ }
+ r->m_check_adler32 = (s2 << 16) + s1; if ((status == TINFL_STATUS_DONE) && (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) && (r->m_check_adler32 != r->m_z_adler32)) status = TINFL_STATUS_ADLER32_MISMATCH;
+ }
+ return status;
+}
+
+// Higher level helper functions.
+void *tinfl_decompress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags)
+{
+ tinfl_decompressor decomp; void *pBuf = NULL, *pNew_buf; size_t src_buf_ofs = 0, out_buf_capacity = 0;
+ *pOut_len = 0;
+ tinfl_init(&decomp);
+ for ( ; ; )
+ {
+ size_t src_buf_size = src_buf_len - src_buf_ofs, dst_buf_size = out_buf_capacity - *pOut_len, new_out_buf_capacity;
+ tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8*)pSrc_buf + src_buf_ofs, &src_buf_size, (mz_uint8*)pBuf, pBuf ? (mz_uint8*)pBuf + *pOut_len : NULL, &dst_buf_size,
+ (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF);
+ if ((status < 0) || (status == TINFL_STATUS_NEEDS_MORE_INPUT))
+ {
+ MZ_FREE(pBuf); *pOut_len = 0; return NULL;
+ }
+ src_buf_ofs += src_buf_size;
+ *pOut_len += dst_buf_size;
+ if (status == TINFL_STATUS_DONE) break;
+ new_out_buf_capacity = out_buf_capacity * 2; if (new_out_buf_capacity < 128) new_out_buf_capacity = 128;
+ pNew_buf = MZ_REALLOC(pBuf, new_out_buf_capacity);
+ if (!pNew_buf)
+ {
+ MZ_FREE(pBuf); *pOut_len = 0; return NULL;
+ }
+ pBuf = pNew_buf; out_buf_capacity = new_out_buf_capacity;
+ }
+ return pBuf;
+}
+
+size_t tinfl_decompress_mem_to_mem(void *pOut_buf, size_t out_buf_len, const void *pSrc_buf, size_t src_buf_len, int flags)
+{
+ tinfl_decompressor decomp; tinfl_status status; tinfl_init(&decomp);
+ status = tinfl_decompress(&decomp, (const mz_uint8*)pSrc_buf, &src_buf_len, (mz_uint8*)pOut_buf, (mz_uint8*)pOut_buf, &out_buf_len, (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF);
+ return (status != TINFL_STATUS_DONE) ? TINFL_DECOMPRESS_MEM_TO_MEM_FAILED : out_buf_len;
+}
+
+int tinfl_decompress_mem_to_callback(const void *pIn_buf, size_t *pIn_buf_size, tinfl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags)
+{
+ int result = 0;
+ tinfl_decompressor decomp;
+ mz_uint8 *pDict = (mz_uint8*)MZ_MALLOC(TINFL_LZ_DICT_SIZE); size_t in_buf_ofs = 0, dict_ofs = 0;
+ if (!pDict)
+ return TINFL_STATUS_FAILED;
+ tinfl_init(&decomp);
+ for ( ; ; )
+ {
+ size_t in_buf_size = *pIn_buf_size - in_buf_ofs, dst_buf_size = TINFL_LZ_DICT_SIZE - dict_ofs;
+ tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8*)pIn_buf + in_buf_ofs, &in_buf_size, pDict, pDict + dict_ofs, &dst_buf_size,
+ (flags & ~(TINFL_FLAG_HAS_MORE_INPUT | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)));
+ in_buf_ofs += in_buf_size;
+ if ((dst_buf_size) && (!(*pPut_buf_func)(pDict + dict_ofs, (int)dst_buf_size, pPut_buf_user)))
+ break;
+ if (status != TINFL_STATUS_HAS_MORE_OUTPUT)
+ {
+ result = (status == TINFL_STATUS_DONE);
+ break;
+ }
+ dict_ofs = (dict_ofs + dst_buf_size) & (TINFL_LZ_DICT_SIZE - 1);
+ }
+ MZ_FREE(pDict);
+ *pIn_buf_size = in_buf_ofs;
+ return result;
+}
+
+// ------------------- Low-level Compression (independent from all decompression API's)
+
+// Purposely making these tables static for faster init and thread safety.
+static const mz_uint16 s_tdefl_len_sym[256] = {
+ 257,258,259,260,261,262,263,264,265,265,266,266,267,267,268,268,269,269,269,269,270,270,270,270,271,271,271,271,272,272,272,272,
+ 273,273,273,273,273,273,273,273,274,274,274,274,274,274,274,274,275,275,275,275,275,275,275,275,276,276,276,276,276,276,276,276,
+ 277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,
+ 279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,
+ 281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,
+ 282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,
+ 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,
+ 284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,285 };
+
+static const mz_uint8 s_tdefl_len_extra[256] = {
+ 0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
+ 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
+ 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
+ 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0 };
+
+static const mz_uint8 s_tdefl_small_dist_sym[512] = {
+ 0,1,2,3,4,4,5,5,6,6,6,6,7,7,7,7,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,
+ 11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,
+ 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,14,14,14,14,
+ 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
+ 14,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,
+ 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,16,16,16,16,16,16,16,16,16,16,16,16,16,
+ 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
+ 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
+ 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
+ 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
+ 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
+ 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17 };
+
+static const mz_uint8 s_tdefl_small_dist_extra[512] = {
+ 0,0,0,0,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,
+ 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
+ 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
+ 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
+ 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
+ 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
+ 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
+ 7,7,7,7,7,7,7,7 };
+
+static const mz_uint8 s_tdefl_large_dist_sym[128] = {
+ 0,0,18,19,20,20,21,21,22,22,22,22,23,23,23,23,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26,
+ 26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+ 28,28,28,28,28,28,28,28,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29 };
+
+static const mz_uint8 s_tdefl_large_dist_extra[128] = {
+ 0,0,8,8,9,9,9,9,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
+ 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,
+ 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13 };
+
+// Radix sorts tdefl_sym_freq[] array by 16-bit key m_key. Returns ptr to sorted values.
+typedef struct { mz_uint16 m_key, m_sym_index; } tdefl_sym_freq;
+static tdefl_sym_freq* tdefl_radix_sort_syms(mz_uint num_syms, tdefl_sym_freq* pSyms0, tdefl_sym_freq* pSyms1)
+{
+ mz_uint32 total_passes = 2, pass_shift, pass, i, hist[256 * 2]; tdefl_sym_freq* pCur_syms = pSyms0, *pNew_syms = pSyms1; MZ_CLEAR_OBJ(hist);
+ for (i = 0; i < num_syms; i++) { mz_uint freq = pSyms0[i].m_key; hist[freq & 0xFF]++; hist[256 + ((freq >> 8) & 0xFF)]++; }
+ while ((total_passes > 1) && (num_syms == hist[(total_passes - 1) * 256])) total_passes--;
+ for (pass_shift = 0, pass = 0; pass < total_passes; pass++, pass_shift += 8)
+ {
+ const mz_uint32* pHist = &hist[pass << 8];
+ mz_uint offsets[256], cur_ofs = 0;
+ for (i = 0; i < 256; i++) { offsets[i] = cur_ofs; cur_ofs += pHist[i]; }
+ for (i = 0; i < num_syms; i++) pNew_syms[offsets[(pCur_syms[i].m_key >> pass_shift) & 0xFF]++] = pCur_syms[i];
+ { tdefl_sym_freq* t = pCur_syms; pCur_syms = pNew_syms; pNew_syms = t; }
+ }
+ return pCur_syms;
+}
+
+// tdefl_calculate_minimum_redundancy() originally written by: Alistair Moffat, alistair@cs.mu.oz.au, Jyrki Katajainen, jyrki@diku.dk, November 1996.
+static void tdefl_calculate_minimum_redundancy(tdefl_sym_freq *A, int n)
+{
+ int root, leaf, next, avbl, used, dpth;
+ if (n==0) return; else if (n==1) { A[0].m_key = 1; return; }
+ A[0].m_key += A[1].m_key; root = 0; leaf = 2;
+ for (next=1; next < n-1; next++)
+ {
+ if (leaf>=n || A[root].m_key<A[leaf].m_key) { A[next].m_key = A[root].m_key; A[root++].m_key = (mz_uint16)next; } else A[next].m_key = A[leaf++].m_key;
+ if (leaf>=n || (root<next && A[root].m_key<A[leaf].m_key)) { A[next].m_key = (mz_uint16)(A[next].m_key + A[root].m_key); A[root++].m_key = (mz_uint16)next; } else A[next].m_key = (mz_uint16)(A[next].m_key + A[leaf++].m_key);
+ }
+ A[n-2].m_key = 0; for (next=n-3; next>=0; next--) A[next].m_key = A[A[next].m_key].m_key+1;
+ avbl = 1; used = dpth = 0; root = n-2; next = n-1;
+ while (avbl>0)
+ {
+ while (root>=0 && (int)A[root].m_key==dpth) { used++; root--; }
+ while (avbl>used) { A[next--].m_key = (mz_uint16)(dpth); avbl--; }
+ avbl = 2*used; dpth++; used = 0;
+ }
+}
+
+// Limits canonical Huffman code table's max code size.
+enum { TDEFL_MAX_SUPPORTED_HUFF_CODESIZE = 32 };
+static void tdefl_huffman_enforce_max_code_size(int *pNum_codes, int code_list_len, int max_code_size)
+{
+ int i; mz_uint32 total = 0; if (code_list_len <= 1) return;
+ for (i = max_code_size + 1; i <= TDEFL_MAX_SUPPORTED_HUFF_CODESIZE; i++) pNum_codes[max_code_size] += pNum_codes[i];
+ for (i = max_code_size; i > 0; i--) total += (((mz_uint32)pNum_codes[i]) << (max_code_size - i));
+ while (total != (1UL << max_code_size))
+ {
+ pNum_codes[max_code_size]--;
+ for (i = max_code_size - 1; i > 0; i--) if (pNum_codes[i]) { pNum_codes[i]--; pNum_codes[i + 1] += 2; break; }
+ total--;
+ }
+}
+
+static void tdefl_optimize_huffman_table(tdefl_compressor *d, int table_num, int table_len, int code_size_limit, int static_table)
+{
+ int i, j, l, num_codes[1 + TDEFL_MAX_SUPPORTED_HUFF_CODESIZE]; mz_uint next_code[TDEFL_MAX_SUPPORTED_HUFF_CODESIZE + 1]; MZ_CLEAR_OBJ(num_codes);
+ if (static_table)
+ {
+ for (i = 0; i < table_len; i++) num_codes[d->m_huff_code_sizes[table_num][i]]++;
+ }
+ else
+ {
+ tdefl_sym_freq syms0[TDEFL_MAX_HUFF_SYMBOLS], syms1[TDEFL_MAX_HUFF_SYMBOLS], *pSyms;
+ int num_used_syms = 0;
+ const mz_uint16 *pSym_count = &d->m_huff_count[table_num][0];
+ for (i = 0; i < table_len; i++) if (pSym_count[i]) { syms0[num_used_syms].m_key = (mz_uint16)pSym_count[i]; syms0[num_used_syms++].m_sym_index = (mz_uint16)i; }
+
+ pSyms = tdefl_radix_sort_syms(num_used_syms, syms0, syms1); tdefl_calculate_minimum_redundancy(pSyms, num_used_syms);
+
+ for (i = 0; i < num_used_syms; i++) num_codes[pSyms[i].m_key]++;
+
+ tdefl_huffman_enforce_max_code_size(num_codes, num_used_syms, code_size_limit);
+
+ MZ_CLEAR_OBJ(d->m_huff_code_sizes[table_num]); MZ_CLEAR_OBJ(d->m_huff_codes[table_num]);
+ for (i = 1, j = num_used_syms; i <= code_size_limit; i++)
+ for (l = num_codes[i]; l > 0; l--) d->m_huff_code_sizes[table_num][pSyms[--j].m_sym_index] = (mz_uint8)(i);
+ }
+
+ next_code[1] = 0; for (j = 0, i = 2; i <= code_size_limit; i++) next_code[i] = j = ((j + num_codes[i - 1]) << 1);
+
+ for (i = 0; i < table_len; i++)
+ {
+ mz_uint rev_code = 0, code, code_size; if ((code_size = d->m_huff_code_sizes[table_num][i]) == 0) continue;
+ code = next_code[code_size]++; for (l = code_size; l > 0; l--, code >>= 1) rev_code = (rev_code << 1) | (code & 1);
+ d->m_huff_codes[table_num][i] = (mz_uint16)rev_code;
+ }
+}
+
+#define TDEFL_PUT_BITS(b, l) do { \
+ mz_uint bits = b; mz_uint len = l; MZ_ASSERT(bits <= ((1U << len) - 1U)); \
+ d->m_bit_buffer |= (bits << d->m_bits_in); d->m_bits_in += len; \
+ while (d->m_bits_in >= 8) { \
+ if (d->m_pOutput_buf < d->m_pOutput_buf_end) \
+ *d->m_pOutput_buf++ = (mz_uint8)(d->m_bit_buffer); \
+ d->m_bit_buffer >>= 8; \
+ d->m_bits_in -= 8; \
+ } \
+} MZ_MACRO_END
+
+#define TDEFL_RLE_PREV_CODE_SIZE() { if (rle_repeat_count) { \
+ if (rle_repeat_count < 3) { \
+ d->m_huff_count[2][prev_code_size] = (mz_uint16)(d->m_huff_count[2][prev_code_size] + rle_repeat_count); \
+ while (rle_repeat_count--) packed_code_sizes[num_packed_code_sizes++] = prev_code_size; \
+ } else { \
+ d->m_huff_count[2][16] = (mz_uint16)(d->m_huff_count[2][16] + 1); packed_code_sizes[num_packed_code_sizes++] = 16; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_repeat_count - 3); \
+} rle_repeat_count = 0; } }
+
+#define TDEFL_RLE_ZERO_CODE_SIZE() { if (rle_z_count) { \
+ if (rle_z_count < 3) { \
+ d->m_huff_count[2][0] = (mz_uint16)(d->m_huff_count[2][0] + rle_z_count); while (rle_z_count--) packed_code_sizes[num_packed_code_sizes++] = 0; \
+ } else if (rle_z_count <= 10) { \
+ d->m_huff_count[2][17] = (mz_uint16)(d->m_huff_count[2][17] + 1); packed_code_sizes[num_packed_code_sizes++] = 17; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_z_count - 3); \
+ } else { \
+ d->m_huff_count[2][18] = (mz_uint16)(d->m_huff_count[2][18] + 1); packed_code_sizes[num_packed_code_sizes++] = 18; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_z_count - 11); \
+} rle_z_count = 0; } }
+
+static mz_uint8 s_tdefl_packed_code_size_syms_swizzle[] = { 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 };
+
+static void tdefl_start_dynamic_block(tdefl_compressor *d)
+{
+ int num_lit_codes, num_dist_codes, num_bit_lengths; mz_uint i, total_code_sizes_to_pack, num_packed_code_sizes, rle_z_count, rle_repeat_count, packed_code_sizes_index;
+ mz_uint8 code_sizes_to_pack[TDEFL_MAX_HUFF_SYMBOLS_0 + TDEFL_MAX_HUFF_SYMBOLS_1], packed_code_sizes[TDEFL_MAX_HUFF_SYMBOLS_0 + TDEFL_MAX_HUFF_SYMBOLS_1], prev_code_size = 0xFF;
+
+ d->m_huff_count[0][256] = 1;
+
+ tdefl_optimize_huffman_table(d, 0, TDEFL_MAX_HUFF_SYMBOLS_0, 15, MZ_FALSE);
+ tdefl_optimize_huffman_table(d, 1, TDEFL_MAX_HUFF_SYMBOLS_1, 15, MZ_FALSE);
+
+ for (num_lit_codes = 286; num_lit_codes > 257; num_lit_codes--) if (d->m_huff_code_sizes[0][num_lit_codes - 1]) break;
+ for (num_dist_codes = 30; num_dist_codes > 1; num_dist_codes--) if (d->m_huff_code_sizes[1][num_dist_codes - 1]) break;
+
+ memcpy(code_sizes_to_pack, &d->m_huff_code_sizes[0][0], num_lit_codes);
+ memcpy(code_sizes_to_pack + num_lit_codes, &d->m_huff_code_sizes[1][0], num_dist_codes);
+ total_code_sizes_to_pack = num_lit_codes + num_dist_codes; num_packed_code_sizes = 0; rle_z_count = 0; rle_repeat_count = 0;
+
+ memset(&d->m_huff_count[2][0], 0, sizeof(d->m_huff_count[2][0]) * TDEFL_MAX_HUFF_SYMBOLS_2);
+ for (i = 0; i < total_code_sizes_to_pack; i++)
+ {
+ mz_uint8 code_size = code_sizes_to_pack[i];
+ if (!code_size)
+ {
+ TDEFL_RLE_PREV_CODE_SIZE();
+ if (++rle_z_count == 138) { TDEFL_RLE_ZERO_CODE_SIZE(); }
+ }
+ else
+ {
+ TDEFL_RLE_ZERO_CODE_SIZE();
+ if (code_size != prev_code_size)
+ {
+ TDEFL_RLE_PREV_CODE_SIZE();
+ d->m_huff_count[2][code_size] = (mz_uint16)(d->m_huff_count[2][code_size] + 1); packed_code_sizes[num_packed_code_sizes++] = code_size;
+ }
+ else if (++rle_repeat_count == 6)
+ {
+ TDEFL_RLE_PREV_CODE_SIZE();
+ }
+ }
+ prev_code_size = code_size;
+ }
+ if (rle_repeat_count) { TDEFL_RLE_PREV_CODE_SIZE(); } else { TDEFL_RLE_ZERO_CODE_SIZE(); }
+
+ tdefl_optimize_huffman_table(d, 2, TDEFL_MAX_HUFF_SYMBOLS_2, 7, MZ_FALSE);
+
+ TDEFL_PUT_BITS(2, 2);
+
+ TDEFL_PUT_BITS(num_lit_codes - 257, 5);
+ TDEFL_PUT_BITS(num_dist_codes - 1, 5);
+
+ for (num_bit_lengths = 18; num_bit_lengths >= 0; num_bit_lengths--) if (d->m_huff_code_sizes[2][s_tdefl_packed_code_size_syms_swizzle[num_bit_lengths]]) break;
+ num_bit_lengths = MZ_MAX(4, (num_bit_lengths + 1)); TDEFL_PUT_BITS(num_bit_lengths - 4, 4);
+ for (i = 0; (int)i < num_bit_lengths; i++) TDEFL_PUT_BITS(d->m_huff_code_sizes[2][s_tdefl_packed_code_size_syms_swizzle[i]], 3);
+
+ for (packed_code_sizes_index = 0; packed_code_sizes_index < num_packed_code_sizes; )
+ {
+ mz_uint code = packed_code_sizes[packed_code_sizes_index++]; MZ_ASSERT(code < TDEFL_MAX_HUFF_SYMBOLS_2);
+ TDEFL_PUT_BITS(d->m_huff_codes[2][code], d->m_huff_code_sizes[2][code]);
+ if (code >= 16) TDEFL_PUT_BITS(packed_code_sizes[packed_code_sizes_index++], "\02\03\07"[code - 16]);
+ }
+}
+
+static void tdefl_start_static_block(tdefl_compressor *d)
+{
+ mz_uint i;
+ mz_uint8 *p = &d->m_huff_code_sizes[0][0];
+
+ for (i = 0; i <= 143; ++i) *p++ = 8;
+ for ( ; i <= 255; ++i) *p++ = 9;
+ for ( ; i <= 279; ++i) *p++ = 7;
+ for ( ; i <= 287; ++i) *p++ = 8;
+
+ memset(d->m_huff_code_sizes[1], 5, 32);
+
+ tdefl_optimize_huffman_table(d, 0, 288, 15, MZ_TRUE);
+ tdefl_optimize_huffman_table(d, 1, 32, 15, MZ_TRUE);
+
+ TDEFL_PUT_BITS(1, 2);
+}
+
+static const mz_uint mz_bitmasks[17] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000F, 0x001F, 0x003F, 0x007F, 0x00FF, 0x01FF, 0x03FF, 0x07FF, 0x0FFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF };
+
+#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN && MINIZ_HAS_64BIT_REGISTERS
+static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d)
+{
+ mz_uint flags;
+ mz_uint8 *pLZ_codes;
+ mz_uint8 *pOutput_buf = d->m_pOutput_buf;
+ mz_uint8 *pLZ_code_buf_end = d->m_pLZ_code_buf;
+ mz_uint64 bit_buffer = d->m_bit_buffer;
+ mz_uint bits_in = d->m_bits_in;
+
+#define TDEFL_PUT_BITS_FAST(b, l) { bit_buffer |= (((mz_uint64)(b)) << bits_in); bits_in += (l); }
+
+ flags = 1;
+ for (pLZ_codes = d->m_lz_code_buf; pLZ_codes < pLZ_code_buf_end; flags >>= 1)
+ {
+ if (flags == 1)
+ flags = *pLZ_codes++ | 0x100;
+
+ if (flags & 1)
+ {
+ mz_uint s0, s1, n0, n1, sym, num_extra_bits;
+ mz_uint match_len = pLZ_codes[0], match_dist = *(const mz_uint16 *)(pLZ_codes + 1); pLZ_codes += 3;
+
+ MZ_ASSERT(d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]);
+ TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][s_tdefl_len_sym[match_len]], d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]);
+ TDEFL_PUT_BITS_FAST(match_len & mz_bitmasks[s_tdefl_len_extra[match_len]], s_tdefl_len_extra[match_len]);
+
+ // This sequence coaxes MSVC into using cmov's vs. jmp's.
+ s0 = s_tdefl_small_dist_sym[match_dist & 511];
+ n0 = s_tdefl_small_dist_extra[match_dist & 511];
+ s1 = s_tdefl_large_dist_sym[match_dist >> 8];
+ n1 = s_tdefl_large_dist_extra[match_dist >> 8];
+ sym = (match_dist < 512) ? s0 : s1;
+ num_extra_bits = (match_dist < 512) ? n0 : n1;
+
+ MZ_ASSERT(d->m_huff_code_sizes[1][sym]);
+ TDEFL_PUT_BITS_FAST(d->m_huff_codes[1][sym], d->m_huff_code_sizes[1][sym]);
+ TDEFL_PUT_BITS_FAST(match_dist & mz_bitmasks[num_extra_bits], num_extra_bits);
+ }
+ else
+ {
+ mz_uint lit = *pLZ_codes++;
+ MZ_ASSERT(d->m_huff_code_sizes[0][lit]);
+ TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]);
+
+ if (((flags & 2) == 0) && (pLZ_codes < pLZ_code_buf_end))
+ {
+ flags >>= 1;
+ lit = *pLZ_codes++;
+ MZ_ASSERT(d->m_huff_code_sizes[0][lit]);
+ TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]);
+
+ if (((flags & 2) == 0) && (pLZ_codes < pLZ_code_buf_end))
+ {
+ flags >>= 1;
+ lit = *pLZ_codes++;
+ MZ_ASSERT(d->m_huff_code_sizes[0][lit]);
+ TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]);
+ }
+ }
+ }
+
+ if (pOutput_buf >= d->m_pOutput_buf_end)
+ return MZ_FALSE;
+
+ *(mz_uint64*)pOutput_buf = bit_buffer;
+ pOutput_buf += (bits_in >> 3);
+ bit_buffer >>= (bits_in & ~7);
+ bits_in &= 7;
+ }
+
+#undef TDEFL_PUT_BITS_FAST
+
+ d->m_pOutput_buf = pOutput_buf;
+ d->m_bits_in = 0;
+ d->m_bit_buffer = 0;
+
+ while (bits_in)
+ {
+ mz_uint32 n = MZ_MIN(bits_in, 16);
+ TDEFL_PUT_BITS((mz_uint)bit_buffer & mz_bitmasks[n], n);
+ bit_buffer >>= n;
+ bits_in -= n;
+ }
+
+ TDEFL_PUT_BITS(d->m_huff_codes[0][256], d->m_huff_code_sizes[0][256]);
+
+ return (d->m_pOutput_buf < d->m_pOutput_buf_end);
+}
+#else
+static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d)
+{
+ mz_uint flags;
+ mz_uint8 *pLZ_codes;
+
+ flags = 1;
+ for (pLZ_codes = d->m_lz_code_buf; pLZ_codes < d->m_pLZ_code_buf; flags >>= 1)
+ {
+ if (flags == 1)
+ flags = *pLZ_codes++ | 0x100;
+ if (flags & 1)
+ {
+ mz_uint sym, num_extra_bits;
+ mz_uint match_len = pLZ_codes[0], match_dist = (pLZ_codes[1] | (pLZ_codes[2] << 8)); pLZ_codes += 3;
+
+ MZ_ASSERT(d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]);
+ TDEFL_PUT_BITS(d->m_huff_codes[0][s_tdefl_len_sym[match_len]], d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]);
+ TDEFL_PUT_BITS(match_len & mz_bitmasks[s_tdefl_len_extra[match_len]], s_tdefl_len_extra[match_len]);
+
+ if (match_dist < 512)
+ {
+ sym = s_tdefl_small_dist_sym[match_dist]; num_extra_bits = s_tdefl_small_dist_extra[match_dist];
+ }
+ else
+ {
+ sym = s_tdefl_large_dist_sym[match_dist >> 8]; num_extra_bits = s_tdefl_large_dist_extra[match_dist >> 8];
+ }
+ MZ_ASSERT(d->m_huff_code_sizes[1][sym]);
+ TDEFL_PUT_BITS(d->m_huff_codes[1][sym], d->m_huff_code_sizes[1][sym]);
+ TDEFL_PUT_BITS(match_dist & mz_bitmasks[num_extra_bits], num_extra_bits);
+ }
+ else
+ {
+ mz_uint lit = *pLZ_codes++;
+ MZ_ASSERT(d->m_huff_code_sizes[0][lit]);
+ TDEFL_PUT_BITS(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]);
+ }
+ }
+
+ TDEFL_PUT_BITS(d->m_huff_codes[0][256], d->m_huff_code_sizes[0][256]);
+
+ return (d->m_pOutput_buf < d->m_pOutput_buf_end);
+}
+#endif // MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN && MINIZ_HAS_64BIT_REGISTERS
+
+static mz_bool tdefl_compress_block(tdefl_compressor *d, mz_bool static_block)
+{
+ if (static_block)
+ tdefl_start_static_block(d);
+ else
+ tdefl_start_dynamic_block(d);
+ return tdefl_compress_lz_codes(d);
+}
+
+static int tdefl_flush_block(tdefl_compressor *d, int flush)
+{
+ mz_uint saved_bit_buf, saved_bits_in;
+ mz_uint8 *pSaved_output_buf;
+ mz_bool comp_block_succeeded = MZ_FALSE;
+ int n, use_raw_block = ((d->m_flags & TDEFL_FORCE_ALL_RAW_BLOCKS) != 0) && (d->m_lookahead_pos - d->m_lz_code_buf_dict_pos) <= d->m_dict_size;
+ mz_uint8 *pOutput_buf_start = ((d->m_pPut_buf_func == NULL) && ((*d->m_pOut_buf_size - d->m_out_buf_ofs) >= TDEFL_OUT_BUF_SIZE)) ? ((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs) : d->m_output_buf;
+
+ d->m_pOutput_buf = pOutput_buf_start;
+ d->m_pOutput_buf_end = d->m_pOutput_buf + TDEFL_OUT_BUF_SIZE - 16;
+
+ MZ_ASSERT(!d->m_output_flush_remaining);
+ d->m_output_flush_ofs = 0;
+ d->m_output_flush_remaining = 0;
+
+ *d->m_pLZ_flags = (mz_uint8)(*d->m_pLZ_flags >> d->m_num_flags_left);
+ d->m_pLZ_code_buf -= (d->m_num_flags_left == 8);
+
+ if ((d->m_flags & TDEFL_WRITE_ZLIB_HEADER) && (!d->m_block_index))
+ {
+ TDEFL_PUT_BITS(0x78, 8); TDEFL_PUT_BITS(0x01, 8);
+ }
+
+ TDEFL_PUT_BITS(flush == TDEFL_FINISH, 1);
+
+ pSaved_output_buf = d->m_pOutput_buf; saved_bit_buf = d->m_bit_buffer; saved_bits_in = d->m_bits_in;
+
+ if (!use_raw_block)
+ comp_block_succeeded = tdefl_compress_block(d, (d->m_flags & TDEFL_FORCE_ALL_STATIC_BLOCKS) || (d->m_total_lz_bytes < 48));
+
+ // If the block gets expanded, forget the current contents of the output buffer and send a raw block instead.
+ if ( ((use_raw_block) || ((d->m_total_lz_bytes) && ((d->m_pOutput_buf - pSaved_output_buf + 1U) >= d->m_total_lz_bytes))) &&
+ ((d->m_lookahead_pos - d->m_lz_code_buf_dict_pos) <= d->m_dict_size) )
+ {
+ mz_uint i; d->m_pOutput_buf = pSaved_output_buf; d->m_bit_buffer = saved_bit_buf, d->m_bits_in = saved_bits_in;
+ TDEFL_PUT_BITS(0, 2);
+ if (d->m_bits_in) { TDEFL_PUT_BITS(0, 8 - d->m_bits_in); }
+ for (i = 2; i; --i, d->m_total_lz_bytes ^= 0xFFFF)
+ {
+ TDEFL_PUT_BITS(d->m_total_lz_bytes & 0xFFFF, 16);
+ }
+ for (i = 0; i < d->m_total_lz_bytes; ++i)
+ {
+ TDEFL_PUT_BITS(d->m_dict[(d->m_lz_code_buf_dict_pos + i) & TDEFL_LZ_DICT_SIZE_MASK], 8);
+ }
+ }
+ // Check for the extremely unlikely (if not impossible) case of the compressed block not fitting into the output buffer when using dynamic codes.
+ else if (!comp_block_succeeded)
+ {
+ d->m_pOutput_buf = pSaved_output_buf; d->m_bit_buffer = saved_bit_buf, d->m_bits_in = saved_bits_in;
+ tdefl_compress_block(d, MZ_TRUE);
+ }
+
+ if (flush)
+ {
+ if (flush == TDEFL_FINISH)
+ {
+ if (d->m_bits_in) { TDEFL_PUT_BITS(0, 8 - d->m_bits_in); }
+ if (d->m_flags & TDEFL_WRITE_ZLIB_HEADER) { mz_uint i, a = d->m_adler32; for (i = 0; i < 4; i++) { TDEFL_PUT_BITS((a >> 24) & 0xFF, 8); a <<= 8; } }
+ }
+ else
+ {
+ mz_uint i, z = 0; TDEFL_PUT_BITS(0, 3); if (d->m_bits_in) { TDEFL_PUT_BITS(0, 8 - d->m_bits_in); } for (i = 2; i; --i, z ^= 0xFFFF) { TDEFL_PUT_BITS(z & 0xFFFF, 16); }
+ }
+ }
+
+ MZ_ASSERT(d->m_pOutput_buf < d->m_pOutput_buf_end);
+
+ memset(&d->m_huff_count[0][0], 0, sizeof(d->m_huff_count[0][0]) * TDEFL_MAX_HUFF_SYMBOLS_0);
+ memset(&d->m_huff_count[1][0], 0, sizeof(d->m_huff_count[1][0]) * TDEFL_MAX_HUFF_SYMBOLS_1);
+
+ d->m_pLZ_code_buf = d->m_lz_code_buf + 1; d->m_pLZ_flags = d->m_lz_code_buf; d->m_num_flags_left = 8; d->m_lz_code_buf_dict_pos += d->m_total_lz_bytes; d->m_total_lz_bytes = 0; d->m_block_index++;
+
+ if ((n = (int)(d->m_pOutput_buf - pOutput_buf_start)) != 0)
+ {
+ if (d->m_pPut_buf_func)
+ {
+ *d->m_pIn_buf_size = d->m_pSrc - (const mz_uint8 *)d->m_pIn_buf;
+ if (!(*d->m_pPut_buf_func)(d->m_output_buf, n, d->m_pPut_buf_user))
+ return (d->m_prev_return_status = TDEFL_STATUS_PUT_BUF_FAILED);
+ }
+ else if (pOutput_buf_start == d->m_output_buf)
+ {
+ int bytes_to_copy = (int)MZ_MIN((size_t)n, (size_t)(*d->m_pOut_buf_size - d->m_out_buf_ofs));
+ memcpy((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs, d->m_output_buf, bytes_to_copy);
+ d->m_out_buf_ofs += bytes_to_copy;
+ if ((n -= bytes_to_copy) != 0)
+ {
+ d->m_output_flush_ofs = bytes_to_copy;
+ d->m_output_flush_remaining = n;
+ }
+ }
+ else
+ {
+ d->m_out_buf_ofs += n;
+ }
+ }
+
+ return d->m_output_flush_remaining;
+}
+
+#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES
+#define TDEFL_READ_UNALIGNED_WORD(p) *(const mz_uint16*)(p)
+static MZ_FORCEINLINE void tdefl_find_match(tdefl_compressor *d, mz_uint lookahead_pos, mz_uint max_dist, mz_uint max_match_len, mz_uint *pMatch_dist, mz_uint *pMatch_len)
+{
+ mz_uint dist, pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK, match_len = *pMatch_len, probe_pos = pos, next_probe_pos, probe_len;
+ mz_uint num_probes_left = d->m_max_probes[match_len >= 32];
+ const mz_uint16 *s = (const mz_uint16*)(d->m_dict + pos), *p, *q;
+ mz_uint16 c01 = TDEFL_READ_UNALIGNED_WORD(&d->m_dict[pos + match_len - 1]), s01 = TDEFL_READ_UNALIGNED_WORD(s);
+ MZ_ASSERT(max_match_len <= TDEFL_MAX_MATCH_LEN); if (max_match_len <= match_len) return;
+ for ( ; ; )
+ {
+ for ( ; ; )
+ {
+ if (--num_probes_left == 0) return;
+ #define TDEFL_PROBE \
+ next_probe_pos = d->m_next[probe_pos]; \
+ if ((!next_probe_pos) || ((dist = (mz_uint16)(lookahead_pos - next_probe_pos)) > max_dist)) return; \
+ probe_pos = next_probe_pos & TDEFL_LZ_DICT_SIZE_MASK; \
+ if (TDEFL_READ_UNALIGNED_WORD(&d->m_dict[probe_pos + match_len - 1]) == c01) break;
+ TDEFL_PROBE; TDEFL_PROBE; TDEFL_PROBE;
+ }
+ if (!dist) break; q = (const mz_uint16*)(d->m_dict + probe_pos); if (TDEFL_READ_UNALIGNED_WORD(q) != s01) continue; p = s; probe_len = 32;
+ do { } while ( (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) &&
+ (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (--probe_len > 0) );
+ if (!probe_len)
+ {
+ *pMatch_dist = dist; *pMatch_len = MZ_MIN(max_match_len, TDEFL_MAX_MATCH_LEN); break;
+ }
+ else if ((probe_len = ((mz_uint)(p - s) * 2) + (mz_uint)(*(const mz_uint8*)p == *(const mz_uint8*)q)) > match_len)
+ {
+ *pMatch_dist = dist; if ((*pMatch_len = match_len = MZ_MIN(max_match_len, probe_len)) == max_match_len) break;
+ c01 = TDEFL_READ_UNALIGNED_WORD(&d->m_dict[pos + match_len - 1]);
+ }
+ }
+}
+#else
+static MZ_FORCEINLINE void tdefl_find_match(tdefl_compressor *d, mz_uint lookahead_pos, mz_uint max_dist, mz_uint max_match_len, mz_uint *pMatch_dist, mz_uint *pMatch_len)
+{
+ mz_uint dist, pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK, match_len = *pMatch_len, probe_pos = pos, next_probe_pos, probe_len;
+ mz_uint num_probes_left = d->m_max_probes[match_len >= 32];
+ const mz_uint8 *s = d->m_dict + pos, *p, *q;
+ mz_uint8 c0 = d->m_dict[pos + match_len], c1 = d->m_dict[pos + match_len - 1];
+ MZ_ASSERT(max_match_len <= TDEFL_MAX_MATCH_LEN); if (max_match_len <= match_len) return;
+ for ( ; ; )
+ {
+ for ( ; ; )
+ {
+ if (--num_probes_left == 0) return;
+ #define TDEFL_PROBE \
+ next_probe_pos = d->m_next[probe_pos]; \
+ if ((!next_probe_pos) || ((dist = (mz_uint16)(lookahead_pos - next_probe_pos)) > max_dist)) return; \
+ probe_pos = next_probe_pos & TDEFL_LZ_DICT_SIZE_MASK; \
+ if ((d->m_dict[probe_pos + match_len] == c0) && (d->m_dict[probe_pos + match_len - 1] == c1)) break;
+ TDEFL_PROBE; TDEFL_PROBE; TDEFL_PROBE;
+ }
+ if (!dist) break; p = s; q = d->m_dict + probe_pos; for (probe_len = 0; probe_len < max_match_len; probe_len++) if (*p++ != *q++) break;
+ if (probe_len > match_len)
+ {
+ *pMatch_dist = dist; if ((*pMatch_len = match_len = probe_len) == max_match_len) return;
+ c0 = d->m_dict[pos + match_len]; c1 = d->m_dict[pos + match_len - 1];
+ }
+ }
+}
+#endif // #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES
+
+#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN
+static mz_bool tdefl_compress_fast(tdefl_compressor *d)
+{
+ // Faster, minimally featured LZRW1-style match+parse loop with better register utilization. Intended for applications where raw throughput is valued more highly than ratio.
+ mz_uint lookahead_pos = d->m_lookahead_pos, lookahead_size = d->m_lookahead_size, dict_size = d->m_dict_size, total_lz_bytes = d->m_total_lz_bytes, num_flags_left = d->m_num_flags_left;
+ mz_uint8 *pLZ_code_buf = d->m_pLZ_code_buf, *pLZ_flags = d->m_pLZ_flags;
+ mz_uint cur_pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK;
+
+ while ((d->m_src_buf_left) || ((d->m_flush) && (lookahead_size)))
+ {
+ const mz_uint TDEFL_COMP_FAST_LOOKAHEAD_SIZE = 4096;
+ mz_uint dst_pos = (lookahead_pos + lookahead_size) & TDEFL_LZ_DICT_SIZE_MASK;
+ mz_uint num_bytes_to_process = (mz_uint)MZ_MIN(d->m_src_buf_left, TDEFL_COMP_FAST_LOOKAHEAD_SIZE - lookahead_size);
+ d->m_src_buf_left -= num_bytes_to_process;
+ lookahead_size += num_bytes_to_process;
+
+ while (num_bytes_to_process)
+ {
+ mz_uint32 n = MZ_MIN(TDEFL_LZ_DICT_SIZE - dst_pos, num_bytes_to_process);
+ memcpy(d->m_dict + dst_pos, d->m_pSrc, n);
+ if (dst_pos < (TDEFL_MAX_MATCH_LEN - 1))
+ memcpy(d->m_dict + TDEFL_LZ_DICT_SIZE + dst_pos, d->m_pSrc, MZ_MIN(n, (TDEFL_MAX_MATCH_LEN - 1) - dst_pos));
+ d->m_pSrc += n;
+ dst_pos = (dst_pos + n) & TDEFL_LZ_DICT_SIZE_MASK;
+ num_bytes_to_process -= n;
+ }
+
+ dict_size = MZ_MIN(TDEFL_LZ_DICT_SIZE - lookahead_size, dict_size);
+ if ((!d->m_flush) && (lookahead_size < TDEFL_COMP_FAST_LOOKAHEAD_SIZE)) break;
+
+ while (lookahead_size >= 4)
+ {
+ mz_uint cur_match_dist, cur_match_len = 1;
+ mz_uint8 *pCur_dict = d->m_dict + cur_pos;
+ mz_uint first_trigram = (*(const mz_uint32 *)pCur_dict) & 0xFFFFFF;
+ mz_uint hash = (first_trigram ^ (first_trigram >> (24 - (TDEFL_LZ_HASH_BITS - 8)))) & TDEFL_LEVEL1_HASH_SIZE_MASK;
+ mz_uint probe_pos = d->m_hash[hash];
+ d->m_hash[hash] = (mz_uint16)lookahead_pos;
+
+ if (((cur_match_dist = (mz_uint16)(lookahead_pos - probe_pos)) <= dict_size) && ((*(const mz_uint32 *)(d->m_dict + (probe_pos &= TDEFL_LZ_DICT_SIZE_MASK)) & 0xFFFFFF) == first_trigram))
+ {
+ const mz_uint16 *p = (const mz_uint16 *)pCur_dict;
+ const mz_uint16 *q = (const mz_uint16 *)(d->m_dict + probe_pos);
+ mz_uint32 probe_len = 32;
+ do { } while ( (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) &&
+ (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (--probe_len > 0) );
+ cur_match_len = ((mz_uint)(p - (const mz_uint16 *)pCur_dict) * 2) + (mz_uint)(*(const mz_uint8 *)p == *(const mz_uint8 *)q);
+ if (!probe_len)
+ cur_match_len = cur_match_dist ? TDEFL_MAX_MATCH_LEN : 0;
+
+ if ((cur_match_len < TDEFL_MIN_MATCH_LEN) || ((cur_match_len == TDEFL_MIN_MATCH_LEN) && (cur_match_dist >= 8U*1024U)))
+ {
+ cur_match_len = 1;
+ *pLZ_code_buf++ = (mz_uint8)first_trigram;
+ *pLZ_flags = (mz_uint8)(*pLZ_flags >> 1);
+ d->m_huff_count[0][(mz_uint8)first_trigram]++;
+ }
+ else
+ {
+ mz_uint32 s0, s1;
+ cur_match_len = MZ_MIN(cur_match_len, lookahead_size);
+
+ MZ_ASSERT((cur_match_len >= TDEFL_MIN_MATCH_LEN) && (cur_match_dist >= 1) && (cur_match_dist <= TDEFL_LZ_DICT_SIZE));
+
+ cur_match_dist--;
+
+ pLZ_code_buf[0] = (mz_uint8)(cur_match_len - TDEFL_MIN_MATCH_LEN);
+ *(mz_uint16 *)(&pLZ_code_buf[1]) = (mz_uint16)cur_match_dist;
+ pLZ_code_buf += 3;
+ *pLZ_flags = (mz_uint8)((*pLZ_flags >> 1) | 0x80);
+
+ s0 = s_tdefl_small_dist_sym[cur_match_dist & 511];
+ s1 = s_tdefl_large_dist_sym[cur_match_dist >> 8];
+ d->m_huff_count[1][(cur_match_dist < 512) ? s0 : s1]++;
+
+ d->m_huff_count[0][s_tdefl_len_sym[cur_match_len - TDEFL_MIN_MATCH_LEN]]++;
+ }
+ }
+ else
+ {
+ *pLZ_code_buf++ = (mz_uint8)first_trigram;
+ *pLZ_flags = (mz_uint8)(*pLZ_flags >> 1);
+ d->m_huff_count[0][(mz_uint8)first_trigram]++;
+ }
+
+ if (--num_flags_left == 0) { num_flags_left = 8; pLZ_flags = pLZ_code_buf++; }
+
+ total_lz_bytes += cur_match_len;
+ lookahead_pos += cur_match_len;
+ dict_size = MZ_MIN(dict_size + cur_match_len, TDEFL_LZ_DICT_SIZE);
+ cur_pos = (cur_pos + cur_match_len) & TDEFL_LZ_DICT_SIZE_MASK;
+ MZ_ASSERT(lookahead_size >= cur_match_len);
+ lookahead_size -= cur_match_len;
+
+ if (pLZ_code_buf > &d->m_lz_code_buf[TDEFL_LZ_CODE_BUF_SIZE - 8])
+ {
+ int n;
+ d->m_lookahead_pos = lookahead_pos; d->m_lookahead_size = lookahead_size; d->m_dict_size = dict_size;
+ d->m_total_lz_bytes = total_lz_bytes; d->m_pLZ_code_buf = pLZ_code_buf; d->m_pLZ_flags = pLZ_flags; d->m_num_flags_left = num_flags_left;
+ if ((n = tdefl_flush_block(d, 0)) != 0)
+ return (n < 0) ? MZ_FALSE : MZ_TRUE;
+ total_lz_bytes = d->m_total_lz_bytes; pLZ_code_buf = d->m_pLZ_code_buf; pLZ_flags = d->m_pLZ_flags; num_flags_left = d->m_num_flags_left;
+ }
+ }
+
+ while (lookahead_size)
+ {
+ mz_uint8 lit = d->m_dict[cur_pos];
+
+ total_lz_bytes++;
+ *pLZ_code_buf++ = lit;
+ *pLZ_flags = (mz_uint8)(*pLZ_flags >> 1);
+ if (--num_flags_left == 0) { num_flags_left = 8; pLZ_flags = pLZ_code_buf++; }
+
+ d->m_huff_count[0][lit]++;
+
+ lookahead_pos++;
+ dict_size = MZ_MIN(dict_size + 1, TDEFL_LZ_DICT_SIZE);
+ cur_pos = (cur_pos + 1) & TDEFL_LZ_DICT_SIZE_MASK;
+ lookahead_size--;
+
+ if (pLZ_code_buf > &d->m_lz_code_buf[TDEFL_LZ_CODE_BUF_SIZE - 8])
+ {
+ int n;
+ d->m_lookahead_pos = lookahead_pos; d->m_lookahead_size = lookahead_size; d->m_dict_size = dict_size;
+ d->m_total_lz_bytes = total_lz_bytes; d->m_pLZ_code_buf = pLZ_code_buf; d->m_pLZ_flags = pLZ_flags; d->m_num_flags_left = num_flags_left;
+ if ((n = tdefl_flush_block(d, 0)) != 0)
+ return (n < 0) ? MZ_FALSE : MZ_TRUE;
+ total_lz_bytes = d->m_total_lz_bytes; pLZ_code_buf = d->m_pLZ_code_buf; pLZ_flags = d->m_pLZ_flags; num_flags_left = d->m_num_flags_left;
+ }
+ }
+ }
+
+ d->m_lookahead_pos = lookahead_pos; d->m_lookahead_size = lookahead_size; d->m_dict_size = dict_size;
+ d->m_total_lz_bytes = total_lz_bytes; d->m_pLZ_code_buf = pLZ_code_buf; d->m_pLZ_flags = pLZ_flags; d->m_num_flags_left = num_flags_left;
+ return MZ_TRUE;
+}
+#endif // MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN
+
+static MZ_FORCEINLINE void tdefl_record_literal(tdefl_compressor *d, mz_uint8 lit)
+{
+ d->m_total_lz_bytes++;
+ *d->m_pLZ_code_buf++ = lit;
+ *d->m_pLZ_flags = (mz_uint8)(*d->m_pLZ_flags >> 1); if (--d->m_num_flags_left == 0) { d->m_num_flags_left = 8; d->m_pLZ_flags = d->m_pLZ_code_buf++; }
+ d->m_huff_count[0][lit]++;
+}
+
+static MZ_FORCEINLINE void tdefl_record_match(tdefl_compressor *d, mz_uint match_len, mz_uint match_dist)
+{
+ mz_uint32 s0, s1;
+
+ MZ_ASSERT((match_len >= TDEFL_MIN_MATCH_LEN) && (match_dist >= 1) && (match_dist <= TDEFL_LZ_DICT_SIZE));
+
+ d->m_total_lz_bytes += match_len;
+
+ d->m_pLZ_code_buf[0] = (mz_uint8)(match_len - TDEFL_MIN_MATCH_LEN);
+
+ match_dist -= 1;
+ d->m_pLZ_code_buf[1] = (mz_uint8)(match_dist & 0xFF);
+ d->m_pLZ_code_buf[2] = (mz_uint8)(match_dist >> 8); d->m_pLZ_code_buf += 3;
+
+ *d->m_pLZ_flags = (mz_uint8)((*d->m_pLZ_flags >> 1) | 0x80); if (--d->m_num_flags_left == 0) { d->m_num_flags_left = 8; d->m_pLZ_flags = d->m_pLZ_code_buf++; }
+
+ s0 = s_tdefl_small_dist_sym[match_dist & 511]; s1 = s_tdefl_large_dist_sym[(match_dist >> 8) & 127];
+ d->m_huff_count[1][(match_dist < 512) ? s0 : s1]++;
+
+ if (match_len >= TDEFL_MIN_MATCH_LEN) d->m_huff_count[0][s_tdefl_len_sym[match_len - TDEFL_MIN_MATCH_LEN]]++;
+}
+
+static mz_bool tdefl_compress_normal(tdefl_compressor *d)
+{
+ const mz_uint8 *pSrc = d->m_pSrc; size_t src_buf_left = d->m_src_buf_left;
+ tdefl_flush flush = d->m_flush;
+
+ while ((src_buf_left) || ((flush) && (d->m_lookahead_size)))
+ {
+ mz_uint len_to_move, cur_match_dist, cur_match_len, cur_pos;
+ // Update dictionary and hash chains. Keeps the lookahead size equal to TDEFL_MAX_MATCH_LEN.
+ if ((d->m_lookahead_size + d->m_dict_size) >= (TDEFL_MIN_MATCH_LEN - 1))
+ {
+ mz_uint dst_pos = (d->m_lookahead_pos + d->m_lookahead_size) & TDEFL_LZ_DICT_SIZE_MASK, ins_pos = d->m_lookahead_pos + d->m_lookahead_size - 2;
+ mz_uint hash = (d->m_dict[ins_pos & TDEFL_LZ_DICT_SIZE_MASK] << TDEFL_LZ_HASH_SHIFT) ^ d->m_dict[(ins_pos + 1) & TDEFL_LZ_DICT_SIZE_MASK];
+ mz_uint num_bytes_to_process = (mz_uint)MZ_MIN(src_buf_left, TDEFL_MAX_MATCH_LEN - d->m_lookahead_size);
+ const mz_uint8 *pSrc_end = pSrc + num_bytes_to_process;
+ src_buf_left -= num_bytes_to_process;
+ d->m_lookahead_size += num_bytes_to_process;
+ while (pSrc != pSrc_end)
+ {
+ mz_uint8 c = *pSrc++; d->m_dict[dst_pos] = c; if (dst_pos < (TDEFL_MAX_MATCH_LEN - 1)) d->m_dict[TDEFL_LZ_DICT_SIZE + dst_pos] = c;
+ hash = ((hash << TDEFL_LZ_HASH_SHIFT) ^ c) & (TDEFL_LZ_HASH_SIZE - 1);
+ d->m_next[ins_pos & TDEFL_LZ_DICT_SIZE_MASK] = d->m_hash[hash]; d->m_hash[hash] = (mz_uint16)(ins_pos);
+ dst_pos = (dst_pos + 1) & TDEFL_LZ_DICT_SIZE_MASK; ins_pos++;
+ }
+ }
+ else
+ {
+ while ((src_buf_left) && (d->m_lookahead_size < TDEFL_MAX_MATCH_LEN))
+ {
+ mz_uint8 c = *pSrc++;
+ mz_uint dst_pos = (d->m_lookahead_pos + d->m_lookahead_size) & TDEFL_LZ_DICT_SIZE_MASK;
+ src_buf_left--;
+ d->m_dict[dst_pos] = c;
+ if (dst_pos < (TDEFL_MAX_MATCH_LEN - 1))
+ d->m_dict[TDEFL_LZ_DICT_SIZE + dst_pos] = c;
+ if ((++d->m_lookahead_size + d->m_dict_size) >= TDEFL_MIN_MATCH_LEN)
+ {
+ mz_uint ins_pos = d->m_lookahead_pos + (d->m_lookahead_size - 1) - 2;
+ mz_uint hash = ((d->m_dict[ins_pos & TDEFL_LZ_DICT_SIZE_MASK] << (TDEFL_LZ_HASH_SHIFT * 2)) ^ (d->m_dict[(ins_pos + 1) & TDEFL_LZ_DICT_SIZE_MASK] << TDEFL_LZ_HASH_SHIFT) ^ c) & (TDEFL_LZ_HASH_SIZE - 1);
+ d->m_next[ins_pos & TDEFL_LZ_DICT_SIZE_MASK] = d->m_hash[hash]; d->m_hash[hash] = (mz_uint16)(ins_pos);
+ }
+ }
+ }
+ d->m_dict_size = MZ_MIN(TDEFL_LZ_DICT_SIZE - d->m_lookahead_size, d->m_dict_size);
+ if ((!flush) && (d->m_lookahead_size < TDEFL_MAX_MATCH_LEN))
+ break;
+
+ // Simple lazy/greedy parsing state machine.
+ len_to_move = 1; cur_match_dist = 0; cur_match_len = d->m_saved_match_len ? d->m_saved_match_len : (TDEFL_MIN_MATCH_LEN - 1); cur_pos = d->m_lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK;
+ if (d->m_flags & (TDEFL_RLE_MATCHES | TDEFL_FORCE_ALL_RAW_BLOCKS))
+ {
+ if ((d->m_dict_size) && (!(d->m_flags & TDEFL_FORCE_ALL_RAW_BLOCKS)))
+ {
+ mz_uint8 c = d->m_dict[(cur_pos - 1) & TDEFL_LZ_DICT_SIZE_MASK];
+ cur_match_len = 0; while (cur_match_len < d->m_lookahead_size) { if (d->m_dict[cur_pos + cur_match_len] != c) break; cur_match_len++; }
+ if (cur_match_len < TDEFL_MIN_MATCH_LEN) cur_match_len = 0; else cur_match_dist = 1;
+ }
+ }
+ else
+ {
+ tdefl_find_match(d, d->m_lookahead_pos, d->m_dict_size, d->m_lookahead_size, &cur_match_dist, &cur_match_len);
+ }
+ if (((cur_match_len == TDEFL_MIN_MATCH_LEN) && (cur_match_dist >= 8U*1024U)) || (cur_pos == cur_match_dist) || ((d->m_flags & TDEFL_FILTER_MATCHES) && (cur_match_len <= 5)))
+ {
+ cur_match_dist = cur_match_len = 0;
+ }
+ if (d->m_saved_match_len)
+ {
+ if (cur_match_len > d->m_saved_match_len)
+ {
+ tdefl_record_literal(d, (mz_uint8)d->m_saved_lit);
+ if (cur_match_len >= 128)
+ {
+ tdefl_record_match(d, cur_match_len, cur_match_dist);
+ d->m_saved_match_len = 0; len_to_move = cur_match_len;
+ }
+ else
+ {
+ d->m_saved_lit = d->m_dict[cur_pos]; d->m_saved_match_dist = cur_match_dist; d->m_saved_match_len = cur_match_len;
+ }
+ }
+ else
+ {
+ tdefl_record_match(d, d->m_saved_match_len, d->m_saved_match_dist);
+ len_to_move = d->m_saved_match_len - 1; d->m_saved_match_len = 0;
+ }
+ }
+ else if (!cur_match_dist)
+ tdefl_record_literal(d, d->m_dict[MZ_MIN(cur_pos, sizeof(d->m_dict) - 1)]);
+ else if ((d->m_greedy_parsing) || (d->m_flags & TDEFL_RLE_MATCHES) || (cur_match_len >= 128))
+ {
+ tdefl_record_match(d, cur_match_len, cur_match_dist);
+ len_to_move = cur_match_len;
+ }
+ else
+ {
+ d->m_saved_lit = d->m_dict[MZ_MIN(cur_pos, sizeof(d->m_dict) - 1)]; d->m_saved_match_dist = cur_match_dist; d->m_saved_match_len = cur_match_len;
+ }
+ // Move the lookahead forward by len_to_move bytes.
+ d->m_lookahead_pos += len_to_move;
+ MZ_ASSERT(d->m_lookahead_size >= len_to_move);
+ d->m_lookahead_size -= len_to_move;
+ d->m_dict_size = MZ_MIN(d->m_dict_size + len_to_move, TDEFL_LZ_DICT_SIZE);
+ // Check if it's time to flush the current LZ codes to the internal output buffer.
+ if ( (d->m_pLZ_code_buf > &d->m_lz_code_buf[TDEFL_LZ_CODE_BUF_SIZE - 8]) ||
+ ( (d->m_total_lz_bytes > 31*1024) && (((((mz_uint)(d->m_pLZ_code_buf - d->m_lz_code_buf) * 115) >> 7) >= d->m_total_lz_bytes) || (d->m_flags & TDEFL_FORCE_ALL_RAW_BLOCKS))) )
+ {
+ int n;
+ d->m_pSrc = pSrc; d->m_src_buf_left = src_buf_left;
+ if ((n = tdefl_flush_block(d, 0)) != 0)
+ return (n < 0) ? MZ_FALSE : MZ_TRUE;
+ }
+ }
+
+ d->m_pSrc = pSrc; d->m_src_buf_left = src_buf_left;
+ return MZ_TRUE;
+}
+
+static tdefl_status tdefl_flush_output_buffer(tdefl_compressor *d)
+{
+ if (d->m_pIn_buf_size)
+ {
+ *d->m_pIn_buf_size = d->m_pSrc - (const mz_uint8 *)d->m_pIn_buf;
+ }
+
+ if (d->m_pOut_buf_size)
+ {
+ size_t n = MZ_MIN(*d->m_pOut_buf_size - d->m_out_buf_ofs, d->m_output_flush_remaining);
+ memcpy((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs, d->m_output_buf + d->m_output_flush_ofs, n);
+ d->m_output_flush_ofs += (mz_uint)n;
+ d->m_output_flush_remaining -= (mz_uint)n;
+ d->m_out_buf_ofs += n;
+
+ *d->m_pOut_buf_size = d->m_out_buf_ofs;
+ }
+
+ return (d->m_finished && !d->m_output_flush_remaining) ? TDEFL_STATUS_DONE : TDEFL_STATUS_OKAY;
+}
+
+tdefl_status tdefl_compress(tdefl_compressor *d, const void *pIn_buf, size_t *pIn_buf_size, void *pOut_buf, size_t *pOut_buf_size, tdefl_flush flush)
+{
+ if (!d)
+ {
+ if (pIn_buf_size) *pIn_buf_size = 0;
+ if (pOut_buf_size) *pOut_buf_size = 0;
+ return TDEFL_STATUS_BAD_PARAM;
+ }
+
+ d->m_pIn_buf = pIn_buf; d->m_pIn_buf_size = pIn_buf_size;
+ d->m_pOut_buf = pOut_buf; d->m_pOut_buf_size = pOut_buf_size;
+ d->m_pSrc = (const mz_uint8 *)(pIn_buf); d->m_src_buf_left = pIn_buf_size ? *pIn_buf_size : 0;
+ d->m_out_buf_ofs = 0;
+ d->m_flush = flush;
+
+ if ( ((d->m_pPut_buf_func != NULL) == ((pOut_buf != NULL) || (pOut_buf_size != NULL))) || (d->m_prev_return_status != TDEFL_STATUS_OKAY) ||
+ (d->m_wants_to_finish && (flush != TDEFL_FINISH)) || (pIn_buf_size && *pIn_buf_size && !pIn_buf) || (pOut_buf_size && *pOut_buf_size && !pOut_buf) )
+ {
+ if (pIn_buf_size) *pIn_buf_size = 0;
+ if (pOut_buf_size) *pOut_buf_size = 0;
+ return (d->m_prev_return_status = TDEFL_STATUS_BAD_PARAM);
+ }
+ d->m_wants_to_finish |= (flush == TDEFL_FINISH);
+
+ if ((d->m_output_flush_remaining) || (d->m_finished))
+ return (d->m_prev_return_status = tdefl_flush_output_buffer(d));
+
+#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN
+ if (((d->m_flags & TDEFL_MAX_PROBES_MASK) == 1) &&
+ ((d->m_flags & TDEFL_GREEDY_PARSING_FLAG) != 0) &&
+ ((d->m_flags & (TDEFL_FILTER_MATCHES | TDEFL_FORCE_ALL_RAW_BLOCKS | TDEFL_RLE_MATCHES)) == 0))
+ {
+ if (!tdefl_compress_fast(d))
+ return d->m_prev_return_status;
+ }
+ else
+#endif // #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN
+ {
+ if (!tdefl_compress_normal(d))
+ return d->m_prev_return_status;
+ }
+
+ if ((d->m_flags & (TDEFL_WRITE_ZLIB_HEADER | TDEFL_COMPUTE_ADLER32)) && (pIn_buf))
+ d->m_adler32 = (mz_uint32)mz_adler32(d->m_adler32, (const mz_uint8 *)pIn_buf, d->m_pSrc - (const mz_uint8 *)pIn_buf);
+
+ if ((flush) && (!d->m_lookahead_size) && (!d->m_src_buf_left) && (!d->m_output_flush_remaining))
+ {
+ if (tdefl_flush_block(d, flush) < 0)
+ return d->m_prev_return_status;
+ d->m_finished = (flush == TDEFL_FINISH);
+ if (flush == TDEFL_FULL_FLUSH) { MZ_CLEAR_OBJ(d->m_hash); MZ_CLEAR_OBJ(d->m_next); d->m_dict_size = 0; }
+ }
+
+ return (d->m_prev_return_status = tdefl_flush_output_buffer(d));
+}
+
+tdefl_status tdefl_compress_buffer(tdefl_compressor *d, const void *pIn_buf, size_t in_buf_size, tdefl_flush flush)
+{
+ MZ_ASSERT(d->m_pPut_buf_func); return tdefl_compress(d, pIn_buf, &in_buf_size, NULL, NULL, flush);
+}
+
+tdefl_status tdefl_init(tdefl_compressor *d, tdefl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags)
+{
+ d->m_pPut_buf_func = pPut_buf_func; d->m_pPut_buf_user = pPut_buf_user;
+ d->m_flags = (mz_uint)(flags); d->m_max_probes[0] = 1 + ((flags & 0xFFF) + 2) / 3; d->m_greedy_parsing = (flags & TDEFL_GREEDY_PARSING_FLAG) != 0;
+ d->m_max_probes[1] = 1 + (((flags & 0xFFF) >> 2) + 2) / 3;
+ if (!(flags & TDEFL_NONDETERMINISTIC_PARSING_FLAG)) MZ_CLEAR_OBJ(d->m_hash);
+ d->m_lookahead_pos = d->m_lookahead_size = d->m_dict_size = d->m_total_lz_bytes = d->m_lz_code_buf_dict_pos = d->m_bits_in = 0;
+ d->m_output_flush_ofs = d->m_output_flush_remaining = d->m_finished = d->m_block_index = d->m_bit_buffer = d->m_wants_to_finish = 0;
+ d->m_pLZ_code_buf = d->m_lz_code_buf + 1; d->m_pLZ_flags = d->m_lz_code_buf; d->m_num_flags_left = 8;
+ d->m_pOutput_buf = d->m_output_buf; d->m_pOutput_buf_end = d->m_output_buf; d->m_prev_return_status = TDEFL_STATUS_OKAY;
+ d->m_saved_match_dist = d->m_saved_match_len = d->m_saved_lit = 0; d->m_adler32 = 1;
+ d->m_pIn_buf = NULL; d->m_pOut_buf = NULL;
+ d->m_pIn_buf_size = NULL; d->m_pOut_buf_size = NULL;
+ d->m_flush = TDEFL_NO_FLUSH; d->m_pSrc = NULL; d->m_src_buf_left = 0; d->m_out_buf_ofs = 0;
+ memset(&d->m_huff_count[0][0], 0, sizeof(d->m_huff_count[0][0]) * TDEFL_MAX_HUFF_SYMBOLS_0);
+ memset(&d->m_huff_count[1][0], 0, sizeof(d->m_huff_count[1][0]) * TDEFL_MAX_HUFF_SYMBOLS_1);
+ return TDEFL_STATUS_OKAY;
+}
+
+tdefl_status tdefl_get_prev_return_status(tdefl_compressor *d)
+{
+ return d->m_prev_return_status;
+}
+
+mz_uint32 tdefl_get_adler32(tdefl_compressor *d)
+{
+ return d->m_adler32;
+}
+
+mz_bool tdefl_compress_mem_to_output(const void *pBuf, size_t buf_len, tdefl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags)
+{
+ tdefl_compressor *pComp; mz_bool succeeded; if (((buf_len) && (!pBuf)) || (!pPut_buf_func)) return MZ_FALSE;
+ pComp = (tdefl_compressor*)MZ_MALLOC(sizeof(tdefl_compressor)); if (!pComp) return MZ_FALSE;
+ succeeded = (tdefl_init(pComp, pPut_buf_func, pPut_buf_user, flags) == TDEFL_STATUS_OKAY);
+ succeeded = succeeded && (tdefl_compress_buffer(pComp, pBuf, buf_len, TDEFL_FINISH) == TDEFL_STATUS_DONE);
+ MZ_FREE(pComp); return succeeded;
+}
+
+typedef struct
+{
+ size_t m_size, m_capacity;
+ mz_uint8 *m_pBuf;
+ mz_bool m_expandable;
+} tdefl_output_buffer;
+
+static mz_bool tdefl_output_buffer_putter(const void *pBuf, int len, void *pUser)
+{
+ tdefl_output_buffer *p = (tdefl_output_buffer *)pUser;
+ size_t new_size = p->m_size + len;
+ if (new_size > p->m_capacity)
+ {
+ size_t new_capacity = p->m_capacity; mz_uint8 *pNew_buf; if (!p->m_expandable) return MZ_FALSE;
+ do { new_capacity = MZ_MAX(128U, new_capacity << 1U); } while (new_size > new_capacity);
+ pNew_buf = (mz_uint8*)MZ_REALLOC(p->m_pBuf, new_capacity); if (!pNew_buf) return MZ_FALSE;
+ p->m_pBuf = pNew_buf; p->m_capacity = new_capacity;
+ }
+ memcpy((mz_uint8*)p->m_pBuf + p->m_size, pBuf, len); p->m_size = new_size;
+ return MZ_TRUE;
+}
+
+void *tdefl_compress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags)
+{
+ tdefl_output_buffer out_buf; MZ_CLEAR_OBJ(out_buf);
+ if (!pOut_len) return MZ_FALSE; else *pOut_len = 0;
+ out_buf.m_expandable = MZ_TRUE;
+ if (!tdefl_compress_mem_to_output(pSrc_buf, src_buf_len, tdefl_output_buffer_putter, &out_buf, flags)) return NULL;
+ *pOut_len = out_buf.m_size; return out_buf.m_pBuf;
+}
+
+size_t tdefl_compress_mem_to_mem(void *pOut_buf, size_t out_buf_len, const void *pSrc_buf, size_t src_buf_len, int flags)
+{
+ tdefl_output_buffer out_buf; MZ_CLEAR_OBJ(out_buf);
+ if (!pOut_buf) return 0;
+ out_buf.m_pBuf = (mz_uint8*)pOut_buf; out_buf.m_capacity = out_buf_len;
+ if (!tdefl_compress_mem_to_output(pSrc_buf, src_buf_len, tdefl_output_buffer_putter, &out_buf, flags)) return 0;
+ return out_buf.m_size;
+}
+
+#ifndef MINIZ_NO_ZLIB_APIS
+static const mz_uint s_tdefl_num_probes[11] = { 0, 1, 6, 32, 16, 32, 128, 256, 512, 768, 1500 };
+
+// level may actually range from [0,10] (10 is a "hidden" max level, where we want a bit more compression and it's fine if throughput to fall off a cliff on some files).
+mz_uint tdefl_create_comp_flags_from_zip_params(int level, int window_bits, int strategy)
+{
+ mz_uint comp_flags = s_tdefl_num_probes[(level >= 0) ? MZ_MIN(10, level) : MZ_DEFAULT_LEVEL] | ((level <= 3) ? TDEFL_GREEDY_PARSING_FLAG : 0);
+ if (window_bits > 0) comp_flags |= TDEFL_WRITE_ZLIB_HEADER;
+
+ if (!level) comp_flags |= TDEFL_FORCE_ALL_RAW_BLOCKS;
+ else if (strategy == MZ_FILTERED) comp_flags |= TDEFL_FILTER_MATCHES;
+ else if (strategy == MZ_HUFFMAN_ONLY) comp_flags &= ~TDEFL_MAX_PROBES_MASK;
+ else if (strategy == MZ_FIXED) comp_flags |= TDEFL_FORCE_ALL_STATIC_BLOCKS;
+ else if (strategy == MZ_RLE) comp_flags |= TDEFL_RLE_MATCHES;
+
+ return comp_flags;
+}
+#endif //MINIZ_NO_ZLIB_APIS
+
+#ifdef _MSC_VER
+#pragma warning (push)
+#pragma warning (disable:4204) // nonstandard extension used : non-constant aggregate initializer (also supported by GNU C and C99, so no big deal)
+#endif
+
+// Simple PNG writer function by Alex Evans, 2011. Released into the public domain: https://gist.github.com/908299, more context at
+// http://altdevblogaday.org/2011/04/06/a-smaller-jpg-encoder/.
+// This is actually a modification of Alex's original code so PNG files generated by this function pass pngcheck.
+void *tdefl_write_image_to_png_file_in_memory_ex(const void *pImage, int w, int h, int num_chans, size_t *pLen_out, mz_uint level, mz_bool flip)
+{
+ // Using a local copy of this array here in case MINIZ_NO_ZLIB_APIS was defined.
+ static const mz_uint s_tdefl_png_num_probes[11] = { 0, 1, 6, 32, 16, 32, 128, 256, 512, 768, 1500 };
+ tdefl_compressor *pComp = (tdefl_compressor *)MZ_MALLOC(sizeof(tdefl_compressor)); tdefl_output_buffer out_buf; int i, bpl = w * num_chans, y, z; mz_uint32 c; *pLen_out = 0;
+ if (!pComp) return NULL;
+ MZ_CLEAR_OBJ(out_buf); out_buf.m_expandable = MZ_TRUE; out_buf.m_capacity = 57+MZ_MAX(64, (1+bpl)*h); if (NULL == (out_buf.m_pBuf = (mz_uint8*)MZ_MALLOC(out_buf.m_capacity))) { MZ_FREE(pComp); return NULL; }
+ // write dummy header
+ for (z = 41; z; --z) tdefl_output_buffer_putter(&z, 1, &out_buf);
+ // compress image data
+ tdefl_init(pComp, tdefl_output_buffer_putter, &out_buf, s_tdefl_png_num_probes[MZ_MIN(10, level)] | TDEFL_WRITE_ZLIB_HEADER);
+ for (y = 0; y < h; ++y) { tdefl_compress_buffer(pComp, &z, 1, TDEFL_NO_FLUSH); tdefl_compress_buffer(pComp, (mz_uint8*)pImage + (flip ? (h - 1 - y) : y) * bpl, bpl, TDEFL_NO_FLUSH); }
+ if (tdefl_compress_buffer(pComp, NULL, 0, TDEFL_FINISH) != TDEFL_STATUS_DONE) { MZ_FREE(pComp); MZ_FREE(out_buf.m_pBuf); return NULL; }
+ // write real header
+ *pLen_out = out_buf.m_size-41;
+ {
+ static const mz_uint8 chans[] = {0x00, 0x00, 0x04, 0x02, 0x06};
+ mz_uint8 pnghdr[41]={0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,0x44,0x52,
+ 0,0,(mz_uint8)(w>>8),(mz_uint8)w,0,0,(mz_uint8)(h>>8),(mz_uint8)h,8,chans[num_chans],0,0,0,0,0,0,0,
+ (mz_uint8)(*pLen_out>>24),(mz_uint8)(*pLen_out>>16),(mz_uint8)(*pLen_out>>8),(mz_uint8)*pLen_out,0x49,0x44,0x41,0x54};
+ c=(mz_uint32)mz_crc32(MZ_CRC32_INIT,pnghdr+12,17); for (i=0; i<4; ++i, c<<=8) ((mz_uint8*)(pnghdr+29))[i]=(mz_uint8)(c>>24);
+ memcpy(out_buf.m_pBuf, pnghdr, 41);
+ }
+ // write footer (IDAT CRC-32, followed by IEND chunk)
+ if (!tdefl_output_buffer_putter("\0\0\0\0\0\0\0\0\x49\x45\x4e\x44\xae\x42\x60\x82", 16, &out_buf)) { *pLen_out = 0; MZ_FREE(pComp); MZ_FREE(out_buf.m_pBuf); return NULL; }
+ c = (mz_uint32)mz_crc32(MZ_CRC32_INIT,out_buf.m_pBuf+41-4, *pLen_out+4); for (i=0; i<4; ++i, c<<=8) (out_buf.m_pBuf+out_buf.m_size-16)[i] = (mz_uint8)(c >> 24);
+ // compute final size of file, grab compressed data buffer and return
+ *pLen_out += 57; MZ_FREE(pComp); return out_buf.m_pBuf;
+}
+void *tdefl_write_image_to_png_file_in_memory(const void *pImage, int w, int h, int num_chans, size_t *pLen_out)
+{
+ // Level 6 corresponds to TDEFL_DEFAULT_MAX_PROBES or MZ_DEFAULT_LEVEL (but we can't depend on MZ_DEFAULT_LEVEL being available in case the zlib API's where #defined out)
+ return tdefl_write_image_to_png_file_in_memory_ex(pImage, w, h, num_chans, pLen_out, 6, MZ_FALSE);
+}
+
+#ifdef _MSC_VER
+#pragma warning (pop)
+#endif
+
+// ------------------- .ZIP archive reading
+
+#ifndef MINIZ_NO_ARCHIVE_APIS
+
+#ifdef MINIZ_NO_STDIO
+ #define MZ_FILE void *
+#else
+ #include <stdio.h>
+ #include <sys/stat.h>
+
+ #if defined(_MSC_VER) || defined(__MINGW64__)
+ static FILE *mz_fopen(const char *pFilename, const char *pMode)
+ {
+ FILE* pFile = NULL;
+ fopen_s(&pFile, pFilename, pMode);
+ return pFile;
+ }
+ static FILE *mz_freopen(const char *pPath, const char *pMode, FILE *pStream)
+ {
+ FILE* pFile = NULL;
+ if (freopen_s(&pFile, pPath, pMode, pStream))
+ return NULL;
+ return pFile;
+ }
+ #ifndef MINIZ_NO_TIME
+ #include <sys/utime.h>
+ #endif
+ #define MZ_FILE FILE
+ #define MZ_FOPEN mz_fopen
+ #define MZ_FCLOSE fclose
+ #define MZ_FREAD fread
+ #define MZ_FWRITE fwrite
+ #define MZ_FTELL64 _ftelli64
+ #define MZ_FSEEK64 _fseeki64
+ #define MZ_FILE_STAT_STRUCT _stat
+ #define MZ_FILE_STAT _stat
+ #define MZ_FFLUSH fflush
+ #define MZ_FREOPEN mz_freopen
+ #define MZ_DELETE_FILE remove
+ #elif defined(__MINGW32__)
+ #ifndef MINIZ_NO_TIME
+ #include <sys/utime.h>
+ #endif
+ #define MZ_FILE FILE
+ #define MZ_FOPEN(f, m) fopen(f, m)
+ #define MZ_FCLOSE fclose
+ #define MZ_FREAD fread
+ #define MZ_FWRITE fwrite
+ #define MZ_FTELL64 ftello64
+ #define MZ_FSEEK64 fseeko64
+ #define MZ_FILE_STAT_STRUCT _stat
+ #define MZ_FILE_STAT _stat
+ #define MZ_FFLUSH fflush
+ #define MZ_FREOPEN(f, m, s) freopen(f, m, s)
+ #define MZ_DELETE_FILE remove
+ #elif defined(__TINYC__)
+ #ifndef MINIZ_NO_TIME
+ #include <sys/utime.h>
+ #endif
+ #define MZ_FILE FILE
+ #define MZ_FOPEN(f, m) fopen(f, m)
+ #define MZ_FCLOSE fclose
+ #define MZ_FREAD fread
+ #define MZ_FWRITE fwrite
+ #define MZ_FTELL64 ftell
+ #define MZ_FSEEK64 fseek
+ #define MZ_FILE_STAT_STRUCT stat
+ #define MZ_FILE_STAT stat
+ #define MZ_FFLUSH fflush
+ #define MZ_FREOPEN(f, m, s) freopen(f, m, s)
+ #define MZ_DELETE_FILE remove
+ #elif defined(__GNUC__) && _LARGEFILE64_SOURCE
+ #ifndef MINIZ_NO_TIME
+ #include <utime.h>
+ #endif
+ #define MZ_FILE FILE
+ #define MZ_FOPEN(f, m) fopen64(f, m)
+ #define MZ_FCLOSE fclose
+ #define MZ_FREAD fread
+ #define MZ_FWRITE fwrite
+ #define MZ_FTELL64 ftello64
+ #define MZ_FSEEK64 fseeko64
+ #define MZ_FILE_STAT_STRUCT stat64
+ #define MZ_FILE_STAT stat64
+ #define MZ_FFLUSH fflush
+ #define MZ_FREOPEN(p, m, s) freopen64(p, m, s)
+ #define MZ_DELETE_FILE remove
+ #else
+ #ifndef MINIZ_NO_TIME
+ #include <utime.h>
+ #endif
+ #define MZ_FILE FILE
+ #define MZ_FOPEN(f, m) fopen(f, m)
+ #define MZ_FCLOSE fclose
+ #define MZ_FREAD fread
+ #define MZ_FWRITE fwrite
+ #define MZ_FTELL64 ftello
+ #define MZ_FSEEK64 fseeko
+ #define MZ_FILE_STAT_STRUCT stat
+ #define MZ_FILE_STAT stat
+ #define MZ_FFLUSH fflush
+ #define MZ_FREOPEN(f, m, s) freopen(f, m, s)
+ #define MZ_DELETE_FILE remove
+ #endif // #ifdef _MSC_VER
+#endif // #ifdef MINIZ_NO_STDIO
+
+#define MZ_TOLOWER(c) ((((c) >= 'A') && ((c) <= 'Z')) ? ((c) - 'A' + 'a') : (c))
+
+// Various ZIP archive enums. To completely avoid cross platform compiler alignment and platform endian issues, miniz.c doesn't use structs for any of this stuff.
+enum
+{
+ // ZIP archive identifiers and record sizes
+ MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG = 0x06054b50, MZ_ZIP_CENTRAL_DIR_HEADER_SIG = 0x02014b50, MZ_ZIP_LOCAL_DIR_HEADER_SIG = 0x04034b50,
+ MZ_ZIP_LOCAL_DIR_HEADER_SIZE = 30, MZ_ZIP_CENTRAL_DIR_HEADER_SIZE = 46, MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE = 22,
+ // Central directory header record offsets
+ MZ_ZIP_CDH_SIG_OFS = 0, MZ_ZIP_CDH_VERSION_MADE_BY_OFS = 4, MZ_ZIP_CDH_VERSION_NEEDED_OFS = 6, MZ_ZIP_CDH_BIT_FLAG_OFS = 8,
+ MZ_ZIP_CDH_METHOD_OFS = 10, MZ_ZIP_CDH_FILE_TIME_OFS = 12, MZ_ZIP_CDH_FILE_DATE_OFS = 14, MZ_ZIP_CDH_CRC32_OFS = 16,
+ MZ_ZIP_CDH_COMPRESSED_SIZE_OFS = 20, MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS = 24, MZ_ZIP_CDH_FILENAME_LEN_OFS = 28, MZ_ZIP_CDH_EXTRA_LEN_OFS = 30,
+ MZ_ZIP_CDH_COMMENT_LEN_OFS = 32, MZ_ZIP_CDH_DISK_START_OFS = 34, MZ_ZIP_CDH_INTERNAL_ATTR_OFS = 36, MZ_ZIP_CDH_EXTERNAL_ATTR_OFS = 38, MZ_ZIP_CDH_LOCAL_HEADER_OFS = 42,
+ // Local directory header offsets
+ MZ_ZIP_LDH_SIG_OFS = 0, MZ_ZIP_LDH_VERSION_NEEDED_OFS = 4, MZ_ZIP_LDH_BIT_FLAG_OFS = 6, MZ_ZIP_LDH_METHOD_OFS = 8, MZ_ZIP_LDH_FILE_TIME_OFS = 10,
+ MZ_ZIP_LDH_FILE_DATE_OFS = 12, MZ_ZIP_LDH_CRC32_OFS = 14, MZ_ZIP_LDH_COMPRESSED_SIZE_OFS = 18, MZ_ZIP_LDH_DECOMPRESSED_SIZE_OFS = 22,
+ MZ_ZIP_LDH_FILENAME_LEN_OFS = 26, MZ_ZIP_LDH_EXTRA_LEN_OFS = 28,
+ // End of central directory offsets
+ MZ_ZIP_ECDH_SIG_OFS = 0, MZ_ZIP_ECDH_NUM_THIS_DISK_OFS = 4, MZ_ZIP_ECDH_NUM_DISK_CDIR_OFS = 6, MZ_ZIP_ECDH_CDIR_NUM_ENTRIES_ON_DISK_OFS = 8,
+ MZ_ZIP_ECDH_CDIR_TOTAL_ENTRIES_OFS = 10, MZ_ZIP_ECDH_CDIR_SIZE_OFS = 12, MZ_ZIP_ECDH_CDIR_OFS_OFS = 16, MZ_ZIP_ECDH_COMMENT_SIZE_OFS = 20,
+};
+
+typedef struct
+{
+ void *m_p;
+ size_t m_size, m_capacity;
+ mz_uint m_element_size;
+} mz_zip_array;
+
+struct mz_zip_internal_state_tag
+{
+ mz_zip_array m_central_dir;
+ mz_zip_array m_central_dir_offsets;
+ mz_zip_array m_sorted_central_dir_offsets;
+ MZ_FILE *m_pFile;
+ void *m_pMem;
+ size_t m_mem_size;
+ size_t m_mem_capacity;
+};
+
+#define MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(array_ptr, element_size) (array_ptr)->m_element_size = element_size
+#define MZ_ZIP_ARRAY_ELEMENT(array_ptr, element_type, index) ((element_type *)((array_ptr)->m_p))[index]
+
+static MZ_FORCEINLINE void mz_zip_array_clear(mz_zip_archive *pZip, mz_zip_array *pArray)
+{
+ pZip->m_pFree(pZip->m_pAlloc_opaque, pArray->m_p);
+ memset(pArray, 0, sizeof(mz_zip_array));
+}
+
+static mz_bool mz_zip_array_ensure_capacity(mz_zip_archive *pZip, mz_zip_array *pArray, size_t min_new_capacity, mz_uint growing)
+{
+ void *pNew_p; size_t new_capacity = min_new_capacity; MZ_ASSERT(pArray->m_element_size); if (pArray->m_capacity >= min_new_capacity) return MZ_TRUE;
+ if (growing) { new_capacity = MZ_MAX(1, pArray->m_capacity); while (new_capacity < min_new_capacity) new_capacity *= 2; }
+ if (NULL == (pNew_p = pZip->m_pRealloc(pZip->m_pAlloc_opaque, pArray->m_p, pArray->m_element_size, new_capacity))) return MZ_FALSE;
+ pArray->m_p = pNew_p; pArray->m_capacity = new_capacity;
+ return MZ_TRUE;
+}
+
+static MZ_FORCEINLINE mz_bool mz_zip_array_reserve(mz_zip_archive *pZip, mz_zip_array *pArray, size_t new_capacity, mz_uint growing)
+{
+ if (new_capacity > pArray->m_capacity) { if (!mz_zip_array_ensure_capacity(pZip, pArray, new_capacity, growing)) return MZ_FALSE; }
+ return MZ_TRUE;
+}
+
+static MZ_FORCEINLINE mz_bool mz_zip_array_resize(mz_zip_archive *pZip, mz_zip_array *pArray, size_t new_size, mz_uint growing)
+{
+ if (new_size > pArray->m_capacity) { if (!mz_zip_array_ensure_capacity(pZip, pArray, new_size, growing)) return MZ_FALSE; }
+ pArray->m_size = new_size;
+ return MZ_TRUE;
+}
+
+static MZ_FORCEINLINE mz_bool mz_zip_array_ensure_room(mz_zip_archive *pZip, mz_zip_array *pArray, size_t n)
+{
+ return mz_zip_array_reserve(pZip, pArray, pArray->m_size + n, MZ_TRUE);
+}
+
+static MZ_FORCEINLINE mz_bool mz_zip_array_push_back(mz_zip_archive *pZip, mz_zip_array *pArray, const void *pElements, size_t n)
+{
+ if (n==0) return MZ_TRUE;
+ assert(NULL!=pElements);
+ size_t orig_size = pArray->m_size; if (!mz_zip_array_resize(pZip, pArray, orig_size + n, MZ_TRUE)) return MZ_FALSE;
+ memcpy((mz_uint8*)pArray->m_p + orig_size * pArray->m_element_size, pElements, n * pArray->m_element_size);
+ return MZ_TRUE;
+}
+
+#ifndef MINIZ_NO_TIME
+static time_t mz_zip_dos_to_time_t(int dos_time, int dos_date)
+{
+ struct tm tm;
+ memset(&tm, 0, sizeof(tm)); tm.tm_isdst = -1;
+ tm.tm_year = ((dos_date >> 9) & 127) + 1980 - 1900; tm.tm_mon = ((dos_date >> 5) & 15) - 1; tm.tm_mday = dos_date & 31;
+ tm.tm_hour = (dos_time >> 11) & 31; tm.tm_min = (dos_time >> 5) & 63; tm.tm_sec = (dos_time << 1) & 62;
+ return mktime(&tm);
+}
+
+static void mz_zip_time_to_dos_time(time_t time, mz_uint16 *pDOS_time, mz_uint16 *pDOS_date)
+{
+#ifdef _MSC_VER
+ struct tm tm_struct;
+ struct tm *tm = &tm_struct;
+ errno_t err = localtime_s(tm, &time);
+ if (err)
+ {
+ *pDOS_date = 0; *pDOS_time = 0;
+ return;
+ }
+#else
+ struct tm *tm = localtime(&time);
+#endif
+ *pDOS_time = (mz_uint16)(((tm->tm_hour) << 11) + ((tm->tm_min) << 5) + ((tm->tm_sec) >> 1));
+ *pDOS_date = (mz_uint16)(((tm->tm_year + 1900 - 1980) << 9) + ((tm->tm_mon + 1) << 5) + tm->tm_mday);
+}
+#endif
+
+#ifndef MINIZ_NO_STDIO
+static mz_bool mz_zip_get_file_modified_time(const char *pFilename, mz_uint16 *pDOS_time, mz_uint16 *pDOS_date)
+{
+#ifdef MINIZ_NO_TIME
+ (void)pFilename; *pDOS_date = *pDOS_time = 0;
+#else
+ struct MZ_FILE_STAT_STRUCT file_stat;
+ // On Linux with x86 glibc, this call will fail on large files (>= 0x80000000 bytes) unless you compiled with _LARGEFILE64_SOURCE. Argh.
+ if (MZ_FILE_STAT(pFilename, &file_stat) != 0)
+ return MZ_FALSE;
+ mz_zip_time_to_dos_time(file_stat.st_mtime, pDOS_time, pDOS_date);
+#endif // #ifdef MINIZ_NO_TIME
+ return MZ_TRUE;
+}
+
+#ifndef MINIZ_NO_TIME
+static mz_bool mz_zip_set_file_times(const char *pFilename, time_t access_time, time_t modified_time)
+{
+ struct utimbuf t; t.actime = access_time; t.modtime = modified_time;
+ return !utime(pFilename, &t);
+}
+#endif // #ifndef MINIZ_NO_TIME
+#endif // #ifndef MINIZ_NO_STDIO
+
+static mz_bool mz_zip_reader_init_internal(mz_zip_archive *pZip, mz_uint32 flags)
+{
+ (void)flags;
+ if ((!pZip) || (pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_INVALID))
+ return MZ_FALSE;
+
+ if (!pZip->m_pAlloc) pZip->m_pAlloc = def_alloc_func;
+ if (!pZip->m_pFree) pZip->m_pFree = def_free_func;
+ if (!pZip->m_pRealloc) pZip->m_pRealloc = def_realloc_func;
+
+ pZip->m_zip_mode = MZ_ZIP_MODE_READING;
+ pZip->m_archive_size = 0;
+ pZip->m_central_directory_file_ofs = 0;
+ pZip->m_total_files = 0;
+
+ if (NULL == (pZip->m_pState = (mz_zip_internal_state *)pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, sizeof(mz_zip_internal_state))))
+ return MZ_FALSE;
+ memset(pZip->m_pState, 0, sizeof(mz_zip_internal_state));
+ MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_central_dir, sizeof(mz_uint8));
+ MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_central_dir_offsets, sizeof(mz_uint32));
+ MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_sorted_central_dir_offsets, sizeof(mz_uint32));
+ return MZ_TRUE;
+}
+
+static MZ_FORCEINLINE mz_bool mz_zip_reader_filename_less(const mz_zip_array *pCentral_dir_array, const mz_zip_array *pCentral_dir_offsets, mz_uint l_index, mz_uint r_index)
+{
+ const mz_uint8 *pL = &MZ_ZIP_ARRAY_ELEMENT(pCentral_dir_array, mz_uint8, MZ_ZIP_ARRAY_ELEMENT(pCentral_dir_offsets, mz_uint32, l_index)), *pE;
+ const mz_uint8 *pR = &MZ_ZIP_ARRAY_ELEMENT(pCentral_dir_array, mz_uint8, MZ_ZIP_ARRAY_ELEMENT(pCentral_dir_offsets, mz_uint32, r_index));
+ mz_uint l_len = MZ_READ_LE16(pL + MZ_ZIP_CDH_FILENAME_LEN_OFS), r_len = MZ_READ_LE16(pR + MZ_ZIP_CDH_FILENAME_LEN_OFS);
+ mz_uint8 l = 0, r = 0;
+ pL += MZ_ZIP_CENTRAL_DIR_HEADER_SIZE; pR += MZ_ZIP_CENTRAL_DIR_HEADER_SIZE;
+ pE = pL + MZ_MIN(l_len, r_len);
+ while (pL < pE)
+ {
+ if ((l = MZ_TOLOWER(*pL)) != (r = MZ_TOLOWER(*pR)))
+ break;
+ pL++; pR++;
+ }
+ return (pL == pE) ? (l_len < r_len) : (l < r);
+}
+
+#define MZ_SWAP_UINT32(a, b) do { mz_uint32 t = a; a = b; b = t; } MZ_MACRO_END
+
+// Heap sort of lowercased filenames, used to help accelerate plain central directory searches by mz_zip_reader_locate_file(). (Could also use qsort(), but it could allocate memory.)
+static void mz_zip_reader_sort_central_dir_offsets_by_filename(mz_zip_archive *pZip)
+{
+ mz_zip_internal_state *pState = pZip->m_pState;
+ const mz_zip_array *pCentral_dir_offsets = &pState->m_central_dir_offsets;
+ const mz_zip_array *pCentral_dir = &pState->m_central_dir;
+ mz_uint32 *pIndices = &MZ_ZIP_ARRAY_ELEMENT(&pState->m_sorted_central_dir_offsets, mz_uint32, 0);
+ const int size = pZip->m_total_files;
+ int start = (size - 2) >> 1, end;
+ while (start >= 0)
+ {
+ int child, root = start;
+ for ( ; ; )
+ {
+ if ((child = (root << 1) + 1) >= size)
+ break;
+ child += (((child + 1) < size) && (mz_zip_reader_filename_less(pCentral_dir, pCentral_dir_offsets, pIndices[child], pIndices[child + 1])));
+ if (!mz_zip_reader_filename_less(pCentral_dir, pCentral_dir_offsets, pIndices[root], pIndices[child]))
+ break;
+ MZ_SWAP_UINT32(pIndices[root], pIndices[child]); root = child;
+ }
+ start--;
+ }
+
+ end = size - 1;
+ while (end > 0)
+ {
+ int child, root = 0;
+ MZ_SWAP_UINT32(pIndices[end], pIndices[0]);
+ for ( ; ; )
+ {
+ if ((child = (root << 1) + 1) >= end)
+ break;
+ child += (((child + 1) < end) && mz_zip_reader_filename_less(pCentral_dir, pCentral_dir_offsets, pIndices[child], pIndices[child + 1]));
+ if (!mz_zip_reader_filename_less(pCentral_dir, pCentral_dir_offsets, pIndices[root], pIndices[child]))
+ break;
+ MZ_SWAP_UINT32(pIndices[root], pIndices[child]); root = child;
+ }
+ end--;
+ }
+}
+
+static mz_bool mz_zip_reader_read_central_dir(mz_zip_archive *pZip, mz_uint32 flags)
+{
+ mz_uint cdir_size, num_this_disk, cdir_disk_index;
+ mz_uint64 cdir_ofs;
+ mz_int64 cur_file_ofs;
+ const mz_uint8 *p;
+ mz_uint32 buf_u32[4096 / sizeof(mz_uint32)]; mz_uint8 *pBuf = (mz_uint8 *)buf_u32;
+ mz_bool sort_central_dir = ((flags & MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY) == 0);
+ // Basic sanity checks - reject files which are too small, and check the first 4 bytes of the file to make sure a local header is there.
+ if (pZip->m_archive_size < MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE)
+ return MZ_FALSE;
+ // Find the end of central directory record by scanning the file from the end towards the beginning.
+ cur_file_ofs = MZ_MAX((mz_int64)pZip->m_archive_size - (mz_int64)sizeof(buf_u32), 0);
+ for ( ; ; )
+ {
+ int i, n = (int)MZ_MIN(sizeof(buf_u32), pZip->m_archive_size - cur_file_ofs);
+ if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pBuf, n) != (mz_uint)n)
+ return MZ_FALSE;
+ for (i = n - 4; i >= 0; --i)
+ if (MZ_READ_LE32(pBuf + i) == MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG)
+ break;
+ if (i >= 0)
+ {
+ cur_file_ofs += i;
+ break;
+ }
+ if ((!cur_file_ofs) || ((pZip->m_archive_size - cur_file_ofs) >= (0xFFFF + MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE)))
+ return MZ_FALSE;
+ cur_file_ofs = MZ_MAX(cur_file_ofs - (sizeof(buf_u32) - 3), 0);
+ }
+ // Read and verify the end of central directory record.
+ if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pBuf, MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE) != MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE)
+ return MZ_FALSE;
+ if ((MZ_READ_LE32(pBuf + MZ_ZIP_ECDH_SIG_OFS) != MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG) ||
+ ((pZip->m_total_files = MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_CDIR_TOTAL_ENTRIES_OFS)) != MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_CDIR_NUM_ENTRIES_ON_DISK_OFS)))
+ return MZ_FALSE;
+
+ num_this_disk = MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_NUM_THIS_DISK_OFS);
+ cdir_disk_index = MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_NUM_DISK_CDIR_OFS);
+ if (((num_this_disk | cdir_disk_index) != 0) && ((num_this_disk != 1) || (cdir_disk_index != 1)))
+ return MZ_FALSE;
+
+ if ((cdir_size = MZ_READ_LE32(pBuf + MZ_ZIP_ECDH_CDIR_SIZE_OFS)) < pZip->m_total_files * MZ_ZIP_CENTRAL_DIR_HEADER_SIZE)
+ return MZ_FALSE;
+
+ cdir_ofs = MZ_READ_LE32(pBuf + MZ_ZIP_ECDH_CDIR_OFS_OFS);
+ if ((cdir_ofs + (mz_uint64)cdir_size) > pZip->m_archive_size)
+ return MZ_FALSE;
+
+ pZip->m_central_directory_file_ofs = cdir_ofs;
+
+ if (pZip->m_total_files)
+ {
+ mz_uint i, n;
+
+ // Read the entire central directory into a heap block, and allocate another heap block to hold the unsorted central dir file record offsets, and another to hold the sorted indices.
+ if ((!mz_zip_array_resize(pZip, &pZip->m_pState->m_central_dir, cdir_size, MZ_FALSE)) ||
+ (!mz_zip_array_resize(pZip, &pZip->m_pState->m_central_dir_offsets, pZip->m_total_files, MZ_FALSE)))
+ return MZ_FALSE;
+
+ if (sort_central_dir)
+ {
+ if (!mz_zip_array_resize(pZip, &pZip->m_pState->m_sorted_central_dir_offsets, pZip->m_total_files, MZ_FALSE))
+ return MZ_FALSE;
+ }
+
+ if (pZip->m_pRead(pZip->m_pIO_opaque, cdir_ofs, pZip->m_pState->m_central_dir.m_p, cdir_size) != cdir_size)
+ return MZ_FALSE;
+
+ // Now create an index into the central directory file records, do some basic sanity checking on each record, and check for zip64 entries (which are not yet supported).
+ p = (const mz_uint8 *)pZip->m_pState->m_central_dir.m_p;
+ for (n = cdir_size, i = 0; i < pZip->m_total_files; ++i)
+ {
+ mz_uint total_header_size, comp_size, decomp_size, disk_index;
+ if ((n < MZ_ZIP_CENTRAL_DIR_HEADER_SIZE) || (MZ_READ_LE32(p) != MZ_ZIP_CENTRAL_DIR_HEADER_SIG))
+ return MZ_FALSE;
+ MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_central_dir_offsets, mz_uint32, i) = (mz_uint32)(p - (const mz_uint8 *)pZip->m_pState->m_central_dir.m_p);
+ if (sort_central_dir)
+ MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_sorted_central_dir_offsets, mz_uint32, i) = i;
+ comp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_COMPRESSED_SIZE_OFS);
+ decomp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS);
+ if (((!MZ_READ_LE32(p + MZ_ZIP_CDH_METHOD_OFS)) && (decomp_size != comp_size)) || (decomp_size && !comp_size) || (decomp_size == 0xFFFFFFFF) || (comp_size == 0xFFFFFFFF))
+ return MZ_FALSE;
+ disk_index = MZ_READ_LE16(p + MZ_ZIP_CDH_DISK_START_OFS);
+ if ((disk_index != num_this_disk) && (disk_index != 1))
+ return MZ_FALSE;
+ if (((mz_uint64)MZ_READ_LE32(p + MZ_ZIP_CDH_LOCAL_HEADER_OFS) + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + comp_size) > pZip->m_archive_size)
+ return MZ_FALSE;
+ if ((total_header_size = MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS) + MZ_READ_LE16(p + MZ_ZIP_CDH_EXTRA_LEN_OFS) + MZ_READ_LE16(p + MZ_ZIP_CDH_COMMENT_LEN_OFS)) > n)
+ return MZ_FALSE;
+ n -= total_header_size; p += total_header_size;
+ }
+ }
+
+ if (sort_central_dir)
+ mz_zip_reader_sort_central_dir_offsets_by_filename(pZip);
+
+ return MZ_TRUE;
+}
+
+mz_bool mz_zip_reader_init(mz_zip_archive *pZip, mz_uint64 size, mz_uint32 flags)
+{
+ if ((!pZip) || (!pZip->m_pRead))
+ return MZ_FALSE;
+ if (!mz_zip_reader_init_internal(pZip, flags))
+ return MZ_FALSE;
+ pZip->m_archive_size = size;
+ if (!mz_zip_reader_read_central_dir(pZip, flags))
+ {
+ mz_zip_reader_end(pZip);
+ return MZ_FALSE;
+ }
+ return MZ_TRUE;
+}
+
+static size_t mz_zip_mem_read_func(void *pOpaque, mz_uint64 file_ofs, void *pBuf, size_t n)
+{
+ mz_zip_archive *pZip = (mz_zip_archive *)pOpaque;
+ size_t s = (file_ofs >= pZip->m_archive_size) ? 0 : (size_t)MZ_MIN(pZip->m_archive_size - file_ofs, n);
+ memcpy(pBuf, (const mz_uint8 *)pZip->m_pState->m_pMem + file_ofs, s);
+ return s;
+}
+
+mz_bool mz_zip_reader_init_mem(mz_zip_archive *pZip, const void *pMem, size_t size, mz_uint32 flags)
+{
+ if (!mz_zip_reader_init_internal(pZip, flags))
+ return MZ_FALSE;
+ pZip->m_archive_size = size;
+ pZip->m_pRead = mz_zip_mem_read_func;
+ pZip->m_pIO_opaque = pZip;
+#ifdef __cplusplus
+ pZip->m_pState->m_pMem = const_cast<void *>(pMem);
+#else
+ pZip->m_pState->m_pMem = (void *)pMem;
+#endif
+ pZip->m_pState->m_mem_size = size;
+ if (!mz_zip_reader_read_central_dir(pZip, flags))
+ {
+ mz_zip_reader_end(pZip);
+ return MZ_FALSE;
+ }
+ return MZ_TRUE;
+}
+
+#ifndef MINIZ_NO_STDIO
+static size_t mz_zip_file_read_func(void *pOpaque, mz_uint64 file_ofs, void *pBuf, size_t n)
+{
+ mz_zip_archive *pZip = (mz_zip_archive *)pOpaque;
+ mz_int64 cur_ofs = MZ_FTELL64(pZip->m_pState->m_pFile);
+ if (((mz_int64)file_ofs < 0) || (((cur_ofs != (mz_int64)file_ofs)) && (MZ_FSEEK64(pZip->m_pState->m_pFile, (mz_int64)file_ofs, SEEK_SET))))
+ return 0;
+ return MZ_FREAD(pBuf, 1, n, pZip->m_pState->m_pFile);
+}
+
+mz_bool mz_zip_reader_init_file(mz_zip_archive *pZip, const char *pFilename, mz_uint32 flags)
+{
+ mz_uint64 file_size;
+ MZ_FILE *pFile = MZ_FOPEN(pFilename, "rb");
+ if (!pFile)
+ return MZ_FALSE;
+ if (MZ_FSEEK64(pFile, 0, SEEK_END))
+ {
+ MZ_FCLOSE(pFile);
+ return MZ_FALSE;
+ }
+ file_size = MZ_FTELL64(pFile);
+ if (!mz_zip_reader_init_internal(pZip, flags))
+ {
+ MZ_FCLOSE(pFile);
+ return MZ_FALSE;
+ }
+ pZip->m_pRead = mz_zip_file_read_func;
+ pZip->m_pIO_opaque = pZip;
+ pZip->m_pState->m_pFile = pFile;
+ pZip->m_archive_size = file_size;
+ if (!mz_zip_reader_read_central_dir(pZip, flags))
+ {
+ mz_zip_reader_end(pZip);
+ return MZ_FALSE;
+ }
+ return MZ_TRUE;
+}
+#endif // #ifndef MINIZ_NO_STDIO
+
+mz_uint mz_zip_reader_get_num_files(mz_zip_archive *pZip)
+{
+ return pZip ? pZip->m_total_files : 0;
+}
+
+static MZ_FORCEINLINE const mz_uint8 *mz_zip_reader_get_cdh(mz_zip_archive *pZip, mz_uint file_index)
+{
+ if ((!pZip) || (!pZip->m_pState) || (file_index >= pZip->m_total_files) || (pZip->m_zip_mode != MZ_ZIP_MODE_READING))
+ return NULL;
+ return &MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_central_dir, mz_uint8, MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_central_dir_offsets, mz_uint32, file_index));
+}
+
+mz_bool mz_zip_reader_is_file_encrypted(mz_zip_archive *pZip, mz_uint file_index)
+{
+ mz_uint m_bit_flag;
+ const mz_uint8 *p = mz_zip_reader_get_cdh(pZip, file_index);
+ if (!p)
+ return MZ_FALSE;
+ m_bit_flag = MZ_READ_LE16(p + MZ_ZIP_CDH_BIT_FLAG_OFS);
+ return (m_bit_flag & 1);
+}
+
+mz_bool mz_zip_reader_is_file_a_directory(mz_zip_archive *pZip, mz_uint file_index)
+{
+ mz_uint filename_len, external_attr;
+ const mz_uint8 *p = mz_zip_reader_get_cdh(pZip, file_index);
+ if (!p)
+ return MZ_FALSE;
+
+ // First see if the filename ends with a '/' character.
+ filename_len = MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS);
+ if (filename_len)
+ {
+ if (*(p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + filename_len - 1) == '/')
+ return MZ_TRUE;
+ }
+
+ // Bugfix: This code was also checking if the internal attribute was non-zero, which wasn't correct.
+ // Most/all zip writers (hopefully) set DOS file/directory attributes in the low 16-bits, so check for the DOS directory flag and ignore the source OS ID in the created by field.
+ // FIXME: Remove this check? Is it necessary - we already check the filename.
+ external_attr = MZ_READ_LE32(p + MZ_ZIP_CDH_EXTERNAL_ATTR_OFS);
+ if ((external_attr & 0x10) != 0)
+ return MZ_TRUE;
+
+ return MZ_FALSE;
+}
+
+mz_bool mz_zip_reader_file_stat(mz_zip_archive *pZip, mz_uint file_index, mz_zip_archive_file_stat *pStat)
+{
+ mz_uint n;
+ const mz_uint8 *p = mz_zip_reader_get_cdh(pZip, file_index);
+ if ((!p) || (!pStat))
+ return MZ_FALSE;
+
+ // Unpack the central directory record.
+ pStat->m_file_index = file_index;
+ pStat->m_central_dir_ofs = MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_central_dir_offsets, mz_uint32, file_index);
+ pStat->m_version_made_by = MZ_READ_LE16(p + MZ_ZIP_CDH_VERSION_MADE_BY_OFS);
+ pStat->m_version_needed = MZ_READ_LE16(p + MZ_ZIP_CDH_VERSION_NEEDED_OFS);
+ pStat->m_bit_flag = MZ_READ_LE16(p + MZ_ZIP_CDH_BIT_FLAG_OFS);
+ pStat->m_method = MZ_READ_LE16(p + MZ_ZIP_CDH_METHOD_OFS);
+#ifndef MINIZ_NO_TIME
+ pStat->m_time = mz_zip_dos_to_time_t(MZ_READ_LE16(p + MZ_ZIP_CDH_FILE_TIME_OFS), MZ_READ_LE16(p + MZ_ZIP_CDH_FILE_DATE_OFS));
+#endif
+ pStat->m_crc32 = MZ_READ_LE32(p + MZ_ZIP_CDH_CRC32_OFS);
+ pStat->m_comp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_COMPRESSED_SIZE_OFS);
+ pStat->m_uncomp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS);
+ pStat->m_internal_attr = MZ_READ_LE16(p + MZ_ZIP_CDH_INTERNAL_ATTR_OFS);
+ pStat->m_external_attr = MZ_READ_LE32(p + MZ_ZIP_CDH_EXTERNAL_ATTR_OFS);
+ pStat->m_local_header_ofs = MZ_READ_LE32(p + MZ_ZIP_CDH_LOCAL_HEADER_OFS);
+
+ // Copy as much of the filename and comment as possible.
+ n = MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS); n = MZ_MIN(n, MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE - 1);
+ memcpy(pStat->m_filename, p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE, n); pStat->m_filename[n] = '\0';
+
+ n = MZ_READ_LE16(p + MZ_ZIP_CDH_COMMENT_LEN_OFS); n = MZ_MIN(n, MZ_ZIP_MAX_ARCHIVE_FILE_COMMENT_SIZE - 1);
+ pStat->m_comment_size = n;
+ memcpy(pStat->m_comment, p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS) + MZ_READ_LE16(p + MZ_ZIP_CDH_EXTRA_LEN_OFS), n); pStat->m_comment[n] = '\0';
+
+ return MZ_TRUE;
+}
+
+mz_uint mz_zip_reader_get_filename(mz_zip_archive *pZip, mz_uint file_index, char *pFilename, mz_uint filename_buf_size)
+{
+ mz_uint n;
+ const mz_uint8 *p = mz_zip_reader_get_cdh(pZip, file_index);
+ if (!p) { if (filename_buf_size) pFilename[0] = '\0'; return 0; }
+ n = MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS);
+ if (filename_buf_size)
+ {
+ n = MZ_MIN(n, filename_buf_size - 1);
+ memcpy(pFilename, p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE, n);
+ pFilename[n] = '\0';
+ }
+ return n + 1;
+}
+
+static MZ_FORCEINLINE mz_bool mz_zip_reader_string_equal(const char *pA, const char *pB, mz_uint len, mz_uint flags)
+{
+ mz_uint i;
+ if (flags & MZ_ZIP_FLAG_CASE_SENSITIVE)
+ return 0 == memcmp(pA, pB, len);
+ for (i = 0; i < len; ++i)
+ if (MZ_TOLOWER(pA[i]) != MZ_TOLOWER(pB[i]))
+ return MZ_FALSE;
+ return MZ_TRUE;
+}
+
+static MZ_FORCEINLINE int mz_zip_reader_filename_compare(const mz_zip_array *pCentral_dir_array, const mz_zip_array *pCentral_dir_offsets, mz_uint l_index, const char *pR, mz_uint r_len)
+{
+ const mz_uint8 *pL = &MZ_ZIP_ARRAY_ELEMENT(pCentral_dir_array, mz_uint8, MZ_ZIP_ARRAY_ELEMENT(pCentral_dir_offsets, mz_uint32, l_index)), *pE;
+ mz_uint l_len = MZ_READ_LE16(pL + MZ_ZIP_CDH_FILENAME_LEN_OFS);
+ mz_uint8 l = 0, r = 0;
+ pL += MZ_ZIP_CENTRAL_DIR_HEADER_SIZE;
+ pE = pL + MZ_MIN(l_len, r_len);
+ while (pL < pE)
+ {
+ if ((l = MZ_TOLOWER(*pL)) != (r = MZ_TOLOWER(*pR)))
+ break;
+ pL++; pR++;
+ }
+ return (pL == pE) ? (int)(l_len - r_len) : (l - r);
+}
+
+static int mz_zip_reader_locate_file_binary_search(mz_zip_archive *pZip, const char *pFilename)
+{
+ mz_zip_internal_state *pState = pZip->m_pState;
+ const mz_zip_array *pCentral_dir_offsets = &pState->m_central_dir_offsets;
+ const mz_zip_array *pCentral_dir = &pState->m_central_dir;
+ mz_uint32 *pIndices = &MZ_ZIP_ARRAY_ELEMENT(&pState->m_sorted_central_dir_offsets, mz_uint32, 0);
+ const int size = pZip->m_total_files;
+ const mz_uint filename_len = (mz_uint)strlen(pFilename);
+ int l = 0, h = size - 1;
+ while (l <= h)
+ {
+ int m = (l + h) >> 1, file_index = pIndices[m], comp = mz_zip_reader_filename_compare(pCentral_dir, pCentral_dir_offsets, file_index, pFilename, filename_len);
+ if (!comp)
+ return file_index;
+ else if (comp < 0)
+ l = m + 1;
+ else
+ h = m - 1;
+ }
+ return -1;
+}
+
+int mz_zip_reader_locate_file(mz_zip_archive *pZip, const char *pName, const char *pComment, mz_uint flags)
+{
+ mz_uint file_index; size_t name_len, comment_len;
+ if ((!pZip) || (!pZip->m_pState) || (!pName) || (pZip->m_zip_mode != MZ_ZIP_MODE_READING))
+ return -1;
+ if (((flags & (MZ_ZIP_FLAG_IGNORE_PATH | MZ_ZIP_FLAG_CASE_SENSITIVE)) == 0) && (!pComment) && (pZip->m_pState->m_sorted_central_dir_offsets.m_size))
+ return mz_zip_reader_locate_file_binary_search(pZip, pName);
+ name_len = strlen(pName); if (name_len > 0xFFFF) return -1;
+ comment_len = pComment ? strlen(pComment) : 0; if (comment_len > 0xFFFF) return -1;
+ for (file_index = 0; file_index < pZip->m_total_files; file_index++)
+ {
+ const mz_uint8 *pHeader = &MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_central_dir, mz_uint8, MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_central_dir_offsets, mz_uint32, file_index));
+ mz_uint filename_len = MZ_READ_LE16(pHeader + MZ_ZIP_CDH_FILENAME_LEN_OFS);
+ const char *pFilename = (const char *)pHeader + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE;
+ if (filename_len < name_len)
+ continue;
+ if (comment_len)
+ {
+ mz_uint file_extra_len = MZ_READ_LE16(pHeader + MZ_ZIP_CDH_EXTRA_LEN_OFS), file_comment_len = MZ_READ_LE16(pHeader + MZ_ZIP_CDH_COMMENT_LEN_OFS);
+ const char *pFile_comment = pFilename + filename_len + file_extra_len;
+ if ((file_comment_len != comment_len) || (!mz_zip_reader_string_equal(pComment, pFile_comment, file_comment_len, flags)))
+ continue;
+ }
+ if ((flags & MZ_ZIP_FLAG_IGNORE_PATH) && (filename_len))
+ {
+ int ofs = filename_len - 1;
+ do
+ {
+ if ((pFilename[ofs] == '/') || (pFilename[ofs] == '\\') || (pFilename[ofs] == ':'))
+ break;
+ } while (--ofs >= 0);
+ ofs++;
+ pFilename += ofs; filename_len -= ofs;
+ }
+ if ((filename_len == name_len) && (mz_zip_reader_string_equal(pName, pFilename, filename_len, flags)))
+ return file_index;
+ }
+ return -1;
+}
+
+mz_bool mz_zip_reader_extract_to_mem_no_alloc(mz_zip_archive *pZip, mz_uint file_index, void *pBuf, size_t buf_size, mz_uint flags, void *pUser_read_buf, size_t user_read_buf_size)
+{
+ int status = TINFL_STATUS_DONE;
+ mz_uint64 needed_size, cur_file_ofs, comp_remaining, out_buf_ofs = 0, read_buf_size, read_buf_ofs = 0, read_buf_avail;
+ mz_zip_archive_file_stat file_stat;
+ void *pRead_buf;
+ mz_uint32 local_header_u32[(MZ_ZIP_LOCAL_DIR_HEADER_SIZE + sizeof(mz_uint32) - 1) / sizeof(mz_uint32)]; mz_uint8 *pLocal_header = (mz_uint8 *)local_header_u32;
+ tinfl_decompressor inflator;
+
+ if ((buf_size) && (!pBuf))
+ return MZ_FALSE;
+
+ if (!mz_zip_reader_file_stat(pZip, file_index, &file_stat))
+ return MZ_FALSE;
+
+ // Empty file, or a directory (but not always a directory - I've seen odd zips with directories that have compressed data which inflates to 0 bytes)
+ if (!file_stat.m_comp_size)
+ return MZ_TRUE;
+
+ // Entry is a subdirectory (I've seen old zips with dir entries which have compressed deflate data which inflates to 0 bytes, but these entries claim to uncompress to 512 bytes in the headers).
+ // I'm torn how to handle this case - should it fail instead?
+ if (mz_zip_reader_is_file_a_directory(pZip, file_index))
+ return MZ_TRUE;
+
+ // Encryption and patch files are not supported.
+ if (file_stat.m_bit_flag & (1 | 32))
+ return MZ_FALSE;
+
+ // This function only supports stored and deflate.
+ if ((!(flags & MZ_ZIP_FLAG_COMPRESSED_DATA)) && (file_stat.m_method != 0) && (file_stat.m_method != MZ_DEFLATED))
+ return MZ_FALSE;
+
+ // Ensure supplied output buffer is large enough.
+ needed_size = (flags & MZ_ZIP_FLAG_COMPRESSED_DATA) ? file_stat.m_comp_size : file_stat.m_uncomp_size;
+ if (buf_size < needed_size)
+ return MZ_FALSE;
+
+ // Read and parse the local directory entry.
+ cur_file_ofs = file_stat.m_local_header_ofs;
+ if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pLocal_header, MZ_ZIP_LOCAL_DIR_HEADER_SIZE) != MZ_ZIP_LOCAL_DIR_HEADER_SIZE)
+ return MZ_FALSE;
+ if (MZ_READ_LE32(pLocal_header) != MZ_ZIP_LOCAL_DIR_HEADER_SIG)
+ return MZ_FALSE;
+
+ cur_file_ofs += MZ_ZIP_LOCAL_DIR_HEADER_SIZE + MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_FILENAME_LEN_OFS) + MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_EXTRA_LEN_OFS);
+ if ((cur_file_ofs + file_stat.m_comp_size) > pZip->m_archive_size)
+ return MZ_FALSE;
+
+ if ((flags & MZ_ZIP_FLAG_COMPRESSED_DATA) || (!file_stat.m_method))
+ {
+ // The file is stored or the caller has requested the compressed data.
+ if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pBuf, (size_t)needed_size) != needed_size)
+ return MZ_FALSE;
+ return ((flags & MZ_ZIP_FLAG_COMPRESSED_DATA) != 0) || (mz_crc32(MZ_CRC32_INIT, (const mz_uint8 *)pBuf, (size_t)file_stat.m_uncomp_size) == file_stat.m_crc32);
+ }
+
+ // Decompress the file either directly from memory or from a file input buffer.
+ tinfl_init(&inflator);
+
+ if (pZip->m_pState->m_pMem)
+ {
+ // Read directly from the archive in memory.
+ pRead_buf = (mz_uint8 *)pZip->m_pState->m_pMem + cur_file_ofs;
+ read_buf_size = read_buf_avail = file_stat.m_comp_size;
+ comp_remaining = 0;
+ }
+ else if (pUser_read_buf)
+ {
+ // Use a user provided read buffer.
+ if (!user_read_buf_size)
+ return MZ_FALSE;
+ pRead_buf = (mz_uint8 *)pUser_read_buf;
+ read_buf_size = user_read_buf_size;
+ read_buf_avail = 0;
+ comp_remaining = file_stat.m_comp_size;
+ }
+ else
+ {
+ // Temporarily allocate a read buffer.
+ read_buf_size = MZ_MIN(file_stat.m_comp_size, MZ_ZIP_MAX_IO_BUF_SIZE);
+#ifdef _MSC_VER
+ if (((0, sizeof(size_t) == sizeof(mz_uint32))) && (read_buf_size > 0x7FFFFFFF))
+#else
+ if (((sizeof(size_t) == sizeof(mz_uint32))) && (read_buf_size > 0x7FFFFFFF))
+#endif
+ return MZ_FALSE;
+ if (NULL == (pRead_buf = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, (size_t)read_buf_size)))
+ return MZ_FALSE;
+ read_buf_avail = 0;
+ comp_remaining = file_stat.m_comp_size;
+ }
+
+ do
+ {
+ size_t in_buf_size, out_buf_size = (size_t)(file_stat.m_uncomp_size - out_buf_ofs);
+ if ((!read_buf_avail) && (!pZip->m_pState->m_pMem))
+ {
+ read_buf_avail = MZ_MIN(read_buf_size, comp_remaining);
+ if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pRead_buf, (size_t)read_buf_avail) != read_buf_avail)
+ {
+ status = TINFL_STATUS_FAILED;
+ break;
+ }
+ cur_file_ofs += read_buf_avail;
+ comp_remaining -= read_buf_avail;
+ read_buf_ofs = 0;
+ }
+ in_buf_size = (size_t)read_buf_avail;
+ status = tinfl_decompress(&inflator, (mz_uint8 *)pRead_buf + read_buf_ofs, &in_buf_size, (mz_uint8 *)pBuf, (mz_uint8 *)pBuf + out_buf_ofs, &out_buf_size, TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF | (comp_remaining ? TINFL_FLAG_HAS_MORE_INPUT : 0));
+ read_buf_avail -= in_buf_size;
+ read_buf_ofs += in_buf_size;
+ out_buf_ofs += out_buf_size;
+ } while (status == TINFL_STATUS_NEEDS_MORE_INPUT);
+
+ if (status == TINFL_STATUS_DONE)
+ {
+ // Make sure the entire file was decompressed, and check its CRC.
+ if ((out_buf_ofs != file_stat.m_uncomp_size) || (mz_crc32(MZ_CRC32_INIT, (const mz_uint8 *)pBuf, (size_t)file_stat.m_uncomp_size) != file_stat.m_crc32))
+ status = TINFL_STATUS_FAILED;
+ }
+
+ if ((!pZip->m_pState->m_pMem) && (!pUser_read_buf))
+ pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf);
+
+ return status == TINFL_STATUS_DONE;
+}
+
+mz_bool mz_zip_reader_extract_file_to_mem_no_alloc(mz_zip_archive *pZip, const char *pFilename, void *pBuf, size_t buf_size, mz_uint flags, void *pUser_read_buf, size_t user_read_buf_size)
+{
+ int file_index = mz_zip_reader_locate_file(pZip, pFilename, NULL, flags);
+ if (file_index < 0)
+ return MZ_FALSE;
+ return mz_zip_reader_extract_to_mem_no_alloc(pZip, file_index, pBuf, buf_size, flags, pUser_read_buf, user_read_buf_size);
+}
+
+mz_bool mz_zip_reader_extract_to_mem(mz_zip_archive *pZip, mz_uint file_index, void *pBuf, size_t buf_size, mz_uint flags)
+{
+ return mz_zip_reader_extract_to_mem_no_alloc(pZip, file_index, pBuf, buf_size, flags, NULL, 0);
+}
+
+mz_bool mz_zip_reader_extract_file_to_mem(mz_zip_archive *pZip, const char *pFilename, void *pBuf, size_t buf_size, mz_uint flags)
+{
+ return mz_zip_reader_extract_file_to_mem_no_alloc(pZip, pFilename, pBuf, buf_size, flags, NULL, 0);
+}
+
+void *mz_zip_reader_extract_to_heap(mz_zip_archive *pZip, mz_uint file_index, size_t *pSize, mz_uint flags)
+{
+ mz_uint64 comp_size, uncomp_size, alloc_size;
+ const mz_uint8 *p = mz_zip_reader_get_cdh(pZip, file_index);
+ void *pBuf;
+
+ if (pSize)
+ *pSize = 0;
+ if (!p)
+ return NULL;
+
+ comp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_COMPRESSED_SIZE_OFS);
+ uncomp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS);
+
+ alloc_size = (flags & MZ_ZIP_FLAG_COMPRESSED_DATA) ? comp_size : uncomp_size;
+#ifdef _MSC_VER
+ if (((0, sizeof(size_t) == sizeof(mz_uint32))) && (alloc_size > 0x7FFFFFFF))
+#else
+ if (((sizeof(size_t) == sizeof(mz_uint32))) && (alloc_size > 0x7FFFFFFF))
+#endif
+ return NULL;
+ if (NULL == (pBuf = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, (size_t)alloc_size)))
+ return NULL;
+
+ if (!mz_zip_reader_extract_to_mem(pZip, file_index, pBuf, (size_t)alloc_size, flags))
+ {
+ pZip->m_pFree(pZip->m_pAlloc_opaque, pBuf);
+ return NULL;
+ }
+
+ if (pSize) *pSize = (size_t)alloc_size;
+ return pBuf;
+}
+
+void *mz_zip_reader_extract_file_to_heap(mz_zip_archive *pZip, const char *pFilename, size_t *pSize, mz_uint flags)
+{
+ int file_index = mz_zip_reader_locate_file(pZip, pFilename, NULL, flags);
+ if (file_index < 0)
+ {
+ if (pSize) *pSize = 0;
+ return MZ_FALSE;
+ }
+ return mz_zip_reader_extract_to_heap(pZip, file_index, pSize, flags);
+}
+
+mz_bool mz_zip_reader_extract_to_callback(mz_zip_archive *pZip, mz_uint file_index, mz_file_write_func pCallback, void *pOpaque, mz_uint flags)
+{
+ int status = TINFL_STATUS_DONE; mz_uint file_crc32 = MZ_CRC32_INIT;
+ mz_uint64 read_buf_size, read_buf_ofs = 0, read_buf_avail, comp_remaining, out_buf_ofs = 0, cur_file_ofs;
+ mz_zip_archive_file_stat file_stat;
+ void *pRead_buf = NULL; void *pWrite_buf = NULL;
+ mz_uint32 local_header_u32[(MZ_ZIP_LOCAL_DIR_HEADER_SIZE + sizeof(mz_uint32) - 1) / sizeof(mz_uint32)]; mz_uint8 *pLocal_header = (mz_uint8 *)local_header_u32;
+
+ if (!mz_zip_reader_file_stat(pZip, file_index, &file_stat))
+ return MZ_FALSE;
+
+ // Empty file, or a directory (but not always a directory - I've seen odd zips with directories that have compressed data which inflates to 0 bytes)
+ if (!file_stat.m_comp_size)
+ return MZ_TRUE;
+
+ // Entry is a subdirectory (I've seen old zips with dir entries which have compressed deflate data which inflates to 0 bytes, but these entries claim to uncompress to 512 bytes in the headers).
+ // I'm torn how to handle this case - should it fail instead?
+ if (mz_zip_reader_is_file_a_directory(pZip, file_index))
+ return MZ_TRUE;
+
+ // Encryption and patch files are not supported.
+ if (file_stat.m_bit_flag & (1 | 32))
+ return MZ_FALSE;
+
+ // This function only supports stored and deflate.
+ if ((!(flags & MZ_ZIP_FLAG_COMPRESSED_DATA)) && (file_stat.m_method != 0) && (file_stat.m_method != MZ_DEFLATED))
+ return MZ_FALSE;
+
+ // Read and parse the local directory entry.
+ cur_file_ofs = file_stat.m_local_header_ofs;
+ if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pLocal_header, MZ_ZIP_LOCAL_DIR_HEADER_SIZE) != MZ_ZIP_LOCAL_DIR_HEADER_SIZE)
+ return MZ_FALSE;
+ if (MZ_READ_LE32(pLocal_header) != MZ_ZIP_LOCAL_DIR_HEADER_SIG)
+ return MZ_FALSE;
+
+ cur_file_ofs += MZ_ZIP_LOCAL_DIR_HEADER_SIZE + MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_FILENAME_LEN_OFS) + MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_EXTRA_LEN_OFS);
+ if ((cur_file_ofs + file_stat.m_comp_size) > pZip->m_archive_size)
+ return MZ_FALSE;
+
+ // Decompress the file either directly from memory or from a file input buffer.
+ if (pZip->m_pState->m_pMem)
+ {
+ pRead_buf = (mz_uint8 *)pZip->m_pState->m_pMem + cur_file_ofs;
+ read_buf_size = read_buf_avail = file_stat.m_comp_size;
+ comp_remaining = 0;
+ }
+ else
+ {
+ read_buf_size = MZ_MIN(file_stat.m_comp_size, MZ_ZIP_MAX_IO_BUF_SIZE);
+ if (NULL == (pRead_buf = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, (size_t)read_buf_size)))
+ return MZ_FALSE;
+ read_buf_avail = 0;
+ comp_remaining = file_stat.m_comp_size;
+ }
+
+ if ((flags & MZ_ZIP_FLAG_COMPRESSED_DATA) || (!file_stat.m_method))
+ {
+ // The file is stored or the caller has requested the compressed data.
+ if (pZip->m_pState->m_pMem)
+ {
+#ifdef _MSC_VER
+ if (((0, sizeof(size_t) == sizeof(mz_uint32))) && (file_stat.m_comp_size > 0xFFFFFFFF))
+#else
+ if (((sizeof(size_t) == sizeof(mz_uint32))) && (file_stat.m_comp_size > 0xFFFFFFFF))
+#endif
+ return MZ_FALSE;
+ if (pCallback(pOpaque, out_buf_ofs, pRead_buf, (size_t)file_stat.m_comp_size) != file_stat.m_comp_size)
+ status = TINFL_STATUS_FAILED;
+ else if (!(flags & MZ_ZIP_FLAG_COMPRESSED_DATA))
+ file_crc32 = (mz_uint32)mz_crc32(file_crc32, (const mz_uint8 *)pRead_buf, (size_t)file_stat.m_comp_size);
+ out_buf_ofs += file_stat.m_comp_size;
+ }
+ else
+ {
+ while (comp_remaining)
+ {
+ read_buf_avail = MZ_MIN(read_buf_size, comp_remaining);
+ if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pRead_buf, (size_t)read_buf_avail) != read_buf_avail)
+ {
+ status = TINFL_STATUS_FAILED;
+ break;
+ }
+
+ if (!(flags & MZ_ZIP_FLAG_COMPRESSED_DATA))
+ file_crc32 = (mz_uint32)mz_crc32(file_crc32, (const mz_uint8 *)pRead_buf, (size_t)read_buf_avail);
+
+ if (pCallback(pOpaque, out_buf_ofs, pRead_buf, (size_t)read_buf_avail) != read_buf_avail)
+ {
+ status = TINFL_STATUS_FAILED;
+ break;
+ }
+ cur_file_ofs += read_buf_avail;
+ out_buf_ofs += read_buf_avail;
+ comp_remaining -= read_buf_avail;
+ }
+ }
+ }
+ else
+ {
+ tinfl_decompressor inflator;
+ tinfl_init(&inflator);
+
+ if (NULL == (pWrite_buf = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, TINFL_LZ_DICT_SIZE)))
+ status = TINFL_STATUS_FAILED;
+ else
+ {
+ do
+ {
+ mz_uint8 *pWrite_buf_cur = (mz_uint8 *)pWrite_buf + (out_buf_ofs & (TINFL_LZ_DICT_SIZE - 1));
+ size_t in_buf_size, out_buf_size = TINFL_LZ_DICT_SIZE - (out_buf_ofs & (TINFL_LZ_DICT_SIZE - 1));
+ if ((!read_buf_avail) && (!pZip->m_pState->m_pMem))
+ {
+ read_buf_avail = MZ_MIN(read_buf_size, comp_remaining);
+ if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pRead_buf, (size_t)read_buf_avail) != read_buf_avail)
+ {
+ status = TINFL_STATUS_FAILED;
+ break;
+ }
+ cur_file_ofs += read_buf_avail;
+ comp_remaining -= read_buf_avail;
+ read_buf_ofs = 0;
+ }
+
+ in_buf_size = (size_t)read_buf_avail;
+ status = tinfl_decompress(&inflator, (const mz_uint8 *)pRead_buf + read_buf_ofs, &in_buf_size, (mz_uint8 *)pWrite_buf, pWrite_buf_cur, &out_buf_size, comp_remaining ? TINFL_FLAG_HAS_MORE_INPUT : 0);
+ read_buf_avail -= in_buf_size;
+ read_buf_ofs += in_buf_size;
+
+ if (out_buf_size)
+ {
+ if (pCallback(pOpaque, out_buf_ofs, pWrite_buf_cur, out_buf_size) != out_buf_size)
+ {
+ status = TINFL_STATUS_FAILED;
+ break;
+ }
+ file_crc32 = (mz_uint32)mz_crc32(file_crc32, pWrite_buf_cur, out_buf_size);
+ if ((out_buf_ofs += out_buf_size) > file_stat.m_uncomp_size)
+ {
+ status = TINFL_STATUS_FAILED;
+ break;
+ }
+ }
+ } while ((status == TINFL_STATUS_NEEDS_MORE_INPUT) || (status == TINFL_STATUS_HAS_MORE_OUTPUT));
+ }
+ }
+
+ if ((status == TINFL_STATUS_DONE) && (!(flags & MZ_ZIP_FLAG_COMPRESSED_DATA)))
+ {
+ // Make sure the entire file was decompressed, and check its CRC.
+ if ((out_buf_ofs != file_stat.m_uncomp_size) || (file_crc32 != file_stat.m_crc32))
+ status = TINFL_STATUS_FAILED;
+ }
+
+ if (!pZip->m_pState->m_pMem)
+ pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf);
+ if (pWrite_buf)
+ pZip->m_pFree(pZip->m_pAlloc_opaque, pWrite_buf);
+
+ return status == TINFL_STATUS_DONE;
+}
+
+mz_bool mz_zip_reader_extract_file_to_callback(mz_zip_archive *pZip, const char *pFilename, mz_file_write_func pCallback, void *pOpaque, mz_uint flags)
+{
+ int file_index = mz_zip_reader_locate_file(pZip, pFilename, NULL, flags);
+ if (file_index < 0)
+ return MZ_FALSE;
+ return mz_zip_reader_extract_to_callback(pZip, file_index, pCallback, pOpaque, flags);
+}
+
+#ifndef MINIZ_NO_STDIO
+static size_t mz_zip_file_write_callback(void *pOpaque, mz_uint64 ofs, const void *pBuf, size_t n)
+{
+ (void)ofs; return MZ_FWRITE(pBuf, 1, n, (MZ_FILE*)pOpaque);
+}
+
+mz_bool mz_zip_reader_extract_to_file(mz_zip_archive *pZip, mz_uint file_index, const char *pDst_filename, mz_uint flags)
+{
+ mz_bool status;
+ mz_zip_archive_file_stat file_stat;
+ MZ_FILE *pFile;
+ if (!mz_zip_reader_file_stat(pZip, file_index, &file_stat))
+ return MZ_FALSE;
+ pFile = MZ_FOPEN(pDst_filename, "wb");
+ if (!pFile)
+ return MZ_FALSE;
+ status = mz_zip_reader_extract_to_callback(pZip, file_index, mz_zip_file_write_callback, pFile, flags);
+ if (MZ_FCLOSE(pFile) == EOF)
+ return MZ_FALSE;
+#ifndef MINIZ_NO_TIME
+ if (status)
+ mz_zip_set_file_times(pDst_filename, file_stat.m_time, file_stat.m_time);
+#endif
+ return status;
+}
+#endif // #ifndef MINIZ_NO_STDIO
+
+mz_bool mz_zip_reader_end(mz_zip_archive *pZip)
+{
+ if ((!pZip) || (!pZip->m_pState) || (!pZip->m_pAlloc) || (!pZip->m_pFree) || (pZip->m_zip_mode != MZ_ZIP_MODE_READING))
+ return MZ_FALSE;
+
+ if (pZip->m_pState)
+ {
+ mz_zip_internal_state *pState = pZip->m_pState; pZip->m_pState = NULL;
+ mz_zip_array_clear(pZip, &pState->m_central_dir);
+ mz_zip_array_clear(pZip, &pState->m_central_dir_offsets);
+ mz_zip_array_clear(pZip, &pState->m_sorted_central_dir_offsets);
+
+#ifndef MINIZ_NO_STDIO
+ if (pState->m_pFile)
+ {
+ MZ_FCLOSE(pState->m_pFile);
+ pState->m_pFile = NULL;
+ }
+#endif // #ifndef MINIZ_NO_STDIO
+
+ pZip->m_pFree(pZip->m_pAlloc_opaque, pState);
+ }
+ pZip->m_zip_mode = MZ_ZIP_MODE_INVALID;
+
+ return MZ_TRUE;
+}
+
+#ifndef MINIZ_NO_STDIO
+mz_bool mz_zip_reader_extract_file_to_file(mz_zip_archive *pZip, const char *pArchive_filename, const char *pDst_filename, mz_uint flags)
+{
+ int file_index = mz_zip_reader_locate_file(pZip, pArchive_filename, NULL, flags);
+ if (file_index < 0)
+ return MZ_FALSE;
+ return mz_zip_reader_extract_to_file(pZip, file_index, pDst_filename, flags);
+}
+#endif
+
+// ------------------- .ZIP archive writing
+
+#ifndef MINIZ_NO_ARCHIVE_WRITING_APIS
+
+static void mz_write_le16(mz_uint8 *p, mz_uint16 v) { p[0] = (mz_uint8)v; p[1] = (mz_uint8)(v >> 8); }
+static void mz_write_le32(mz_uint8 *p, mz_uint32 v) { p[0] = (mz_uint8)v; p[1] = (mz_uint8)(v >> 8); p[2] = (mz_uint8)(v >> 16); p[3] = (mz_uint8)(v >> 24); }
+#define MZ_WRITE_LE16(p, v) mz_write_le16((mz_uint8 *)(p), (mz_uint16)(v))
+#define MZ_WRITE_LE32(p, v) mz_write_le32((mz_uint8 *)(p), (mz_uint32)(v))
+
+mz_bool mz_zip_writer_init(mz_zip_archive *pZip, mz_uint64 existing_size)
+{
+ if ((!pZip) || (pZip->m_pState) || (!pZip->m_pWrite) || (pZip->m_zip_mode != MZ_ZIP_MODE_INVALID))
+ return MZ_FALSE;
+
+ if (pZip->m_file_offset_alignment)
+ {
+ // Ensure user specified file offset alignment is a power of 2.
+ if (pZip->m_file_offset_alignment & (pZip->m_file_offset_alignment - 1))
+ return MZ_FALSE;
+ }
+
+ if (!pZip->m_pAlloc) pZip->m_pAlloc = def_alloc_func;
+ if (!pZip->m_pFree) pZip->m_pFree = def_free_func;
+ if (!pZip->m_pRealloc) pZip->m_pRealloc = def_realloc_func;
+
+ pZip->m_zip_mode = MZ_ZIP_MODE_WRITING;
+ pZip->m_archive_size = existing_size;
+ pZip->m_central_directory_file_ofs = 0;
+ pZip->m_total_files = 0;
+
+ if (NULL == (pZip->m_pState = (mz_zip_internal_state *)pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, sizeof(mz_zip_internal_state))))
+ return MZ_FALSE;
+ memset(pZip->m_pState, 0, sizeof(mz_zip_internal_state));
+ MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_central_dir, sizeof(mz_uint8));
+ MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_central_dir_offsets, sizeof(mz_uint32));
+ MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_sorted_central_dir_offsets, sizeof(mz_uint32));
+ return MZ_TRUE;
+}
+
+static size_t mz_zip_heap_write_func(void *pOpaque, mz_uint64 file_ofs, const void *pBuf, size_t n)
+{
+ mz_zip_archive *pZip = (mz_zip_archive *)pOpaque;
+ mz_zip_internal_state *pState = pZip->m_pState;
+ mz_uint64 new_size = MZ_MAX(file_ofs + n, pState->m_mem_size);
+#ifdef _MSC_VER
+ if ((!n) || ((0, sizeof(size_t) == sizeof(mz_uint32)) && (new_size > 0x7FFFFFFF)))
+#else
+ if ((!n) || ((sizeof(size_t) == sizeof(mz_uint32)) && (new_size > 0x7FFFFFFF)))
+#endif
+ return 0;
+ if (new_size > pState->m_mem_capacity)
+ {
+ void *pNew_block;
+ size_t new_capacity = MZ_MAX(64, pState->m_mem_capacity); while (new_capacity < new_size) new_capacity *= 2;
+ if (NULL == (pNew_block = pZip->m_pRealloc(pZip->m_pAlloc_opaque, pState->m_pMem, 1, new_capacity)))
+ return 0;
+ pState->m_pMem = pNew_block; pState->m_mem_capacity = new_capacity;
+ }
+ memcpy((mz_uint8 *)pState->m_pMem + file_ofs, pBuf, n);
+ pState->m_mem_size = (size_t)new_size;
+ return n;
+}
+
+mz_bool mz_zip_writer_init_heap(mz_zip_archive *pZip, size_t size_to_reserve_at_beginning, size_t initial_allocation_size)
+{
+ pZip->m_pWrite = mz_zip_heap_write_func;
+ pZip->m_pIO_opaque = pZip;
+ if (!mz_zip_writer_init(pZip, size_to_reserve_at_beginning))
+ return MZ_FALSE;
+ if (0 != (initial_allocation_size = MZ_MAX(initial_allocation_size, size_to_reserve_at_beginning)))
+ {
+ if (NULL == (pZip->m_pState->m_pMem = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, initial_allocation_size)))
+ {
+ mz_zip_writer_end(pZip);
+ return MZ_FALSE;
+ }
+ pZip->m_pState->m_mem_capacity = initial_allocation_size;
+ }
+ return MZ_TRUE;
+}
+
+#ifndef MINIZ_NO_STDIO
+static size_t mz_zip_file_write_func(void *pOpaque, mz_uint64 file_ofs, const void *pBuf, size_t n)
+{
+ mz_zip_archive *pZip = (mz_zip_archive *)pOpaque;
+ mz_int64 cur_ofs = MZ_FTELL64(pZip->m_pState->m_pFile);
+ if (((mz_int64)file_ofs < 0) || (((cur_ofs != (mz_int64)file_ofs)) && (MZ_FSEEK64(pZip->m_pState->m_pFile, (mz_int64)file_ofs, SEEK_SET))))
+ return 0;
+ return MZ_FWRITE(pBuf, 1, n, pZip->m_pState->m_pFile);
+}
+
+mz_bool mz_zip_writer_init_file(mz_zip_archive *pZip, const char *pFilename, mz_uint64 size_to_reserve_at_beginning)
+{
+ MZ_FILE *pFile;
+ pZip->m_pWrite = mz_zip_file_write_func;
+ pZip->m_pIO_opaque = pZip;
+ if (!mz_zip_writer_init(pZip, size_to_reserve_at_beginning))
+ return MZ_FALSE;
+ if (NULL == (pFile = MZ_FOPEN(pFilename, "wb")))
+ {
+ mz_zip_writer_end(pZip);
+ return MZ_FALSE;
+ }
+ pZip->m_pState->m_pFile = pFile;
+ if (size_to_reserve_at_beginning)
+ {
+ mz_uint64 cur_ofs = 0; char buf[4096]; MZ_CLEAR_OBJ(buf);
+ do
+ {
+ size_t n = (size_t)MZ_MIN(sizeof(buf), size_to_reserve_at_beginning);
+ if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_ofs, buf, n) != n)
+ {
+ mz_zip_writer_end(pZip);
+ return MZ_FALSE;
+ }
+ cur_ofs += n; size_to_reserve_at_beginning -= n;
+ } while (size_to_reserve_at_beginning);
+ }
+ return MZ_TRUE;
+}
+#endif // #ifndef MINIZ_NO_STDIO
+
+mz_bool mz_zip_writer_init_from_reader(mz_zip_archive *pZip, const char *pFilename)
+{
+ mz_zip_internal_state *pState;
+ if ((!pZip) || (!pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_READING))
+ return MZ_FALSE;
+ // No sense in trying to write to an archive that's already at the support max size
+ if ((pZip->m_total_files == 0xFFFF) || ((pZip->m_archive_size + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + MZ_ZIP_LOCAL_DIR_HEADER_SIZE) > 0xFFFFFFFF))
+ return MZ_FALSE;
+
+ pState = pZip->m_pState;
+
+ if (pState->m_pFile)
+ {
+#ifdef MINIZ_NO_STDIO
+ pFilename; return MZ_FALSE;
+#else
+ // Archive is being read from stdio - try to reopen as writable.
+ if (pZip->m_pIO_opaque != pZip)
+ return MZ_FALSE;
+ if (!pFilename)
+ return MZ_FALSE;
+ pZip->m_pWrite = mz_zip_file_write_func;
+ if (NULL == (pState->m_pFile = MZ_FREOPEN(pFilename, "r+b", pState->m_pFile)))
+ {
+ // The mz_zip_archive is now in a bogus state because pState->m_pFile is NULL, so just close it.
+ mz_zip_reader_end(pZip);
+ return MZ_FALSE;
+ }
+#endif // #ifdef MINIZ_NO_STDIO
+ }
+ else if (pState->m_pMem)
+ {
+ // Archive lives in a memory block. Assume it's from the heap that we can resize using the realloc callback.
+ if (pZip->m_pIO_opaque != pZip)
+ return MZ_FALSE;
+ pState->m_mem_capacity = pState->m_mem_size;
+ pZip->m_pWrite = mz_zip_heap_write_func;
+ }
+ // Archive is being read via a user provided read function - make sure the user has specified a write function too.
+ else if (!pZip->m_pWrite)
+ return MZ_FALSE;
+
+ // Start writing new files at the archive's current central directory location.
+ pZip->m_archive_size = pZip->m_central_directory_file_ofs;
+ pZip->m_zip_mode = MZ_ZIP_MODE_WRITING;
+ pZip->m_central_directory_file_ofs = 0;
+
+ return MZ_TRUE;
+}
+
+mz_bool mz_zip_writer_add_mem(mz_zip_archive *pZip, const char *pArchive_name, const void *pBuf, size_t buf_size, mz_uint level_and_flags)
+{
+ return mz_zip_writer_add_mem_ex(pZip, pArchive_name, pBuf, buf_size, NULL, 0, level_and_flags, 0, 0);
+}
+
+typedef struct
+{
+ mz_zip_archive *m_pZip;
+ mz_uint64 m_cur_archive_file_ofs;
+ mz_uint64 m_comp_size;
+} mz_zip_writer_add_state;
+
+static mz_bool mz_zip_writer_add_put_buf_callback(const void* pBuf, int len, void *pUser)
+{
+ mz_zip_writer_add_state *pState = (mz_zip_writer_add_state *)pUser;
+ if ((int)pState->m_pZip->m_pWrite(pState->m_pZip->m_pIO_opaque, pState->m_cur_archive_file_ofs, pBuf, len) != len)
+ return MZ_FALSE;
+ pState->m_cur_archive_file_ofs += len;
+ pState->m_comp_size += len;
+ return MZ_TRUE;
+}
+
+static mz_bool mz_zip_writer_create_local_dir_header(mz_zip_archive *pZip, mz_uint8 *pDst, mz_uint16 filename_size, mz_uint16 extra_size, mz_uint64 uncomp_size, mz_uint64 comp_size, mz_uint32 uncomp_crc32, mz_uint16 method, mz_uint16 bit_flags, mz_uint16 dos_time, mz_uint16 dos_date)
+{
+ (void)pZip;
+ memset(pDst, 0, MZ_ZIP_LOCAL_DIR_HEADER_SIZE);
+ MZ_WRITE_LE32(pDst + MZ_ZIP_LDH_SIG_OFS, MZ_ZIP_LOCAL_DIR_HEADER_SIG);
+ MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_VERSION_NEEDED_OFS, method ? 20 : 0);
+ MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_BIT_FLAG_OFS, bit_flags);
+ MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_METHOD_OFS, method);
+ MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_FILE_TIME_OFS, dos_time);
+ MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_FILE_DATE_OFS, dos_date);
+ MZ_WRITE_LE32(pDst + MZ_ZIP_LDH_CRC32_OFS, uncomp_crc32);
+ MZ_WRITE_LE32(pDst + MZ_ZIP_LDH_COMPRESSED_SIZE_OFS, comp_size);
+ MZ_WRITE_LE32(pDst + MZ_ZIP_LDH_DECOMPRESSED_SIZE_OFS, uncomp_size);
+ MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_FILENAME_LEN_OFS, filename_size);
+ MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_EXTRA_LEN_OFS, extra_size);
+ return MZ_TRUE;
+}
+
+static mz_bool mz_zip_writer_create_central_dir_header(mz_zip_archive *pZip, mz_uint8 *pDst, mz_uint16 filename_size, mz_uint16 extra_size, mz_uint16 comment_size, mz_uint64 uncomp_size, mz_uint64 comp_size, mz_uint32 uncomp_crc32, mz_uint16 method, mz_uint16 bit_flags, mz_uint16 dos_time, mz_uint16 dos_date, mz_uint64 local_header_ofs, mz_uint32 ext_attributes)
+{
+ (void)pZip;
+ memset(pDst, 0, MZ_ZIP_CENTRAL_DIR_HEADER_SIZE);
+ MZ_WRITE_LE32(pDst + MZ_ZIP_CDH_SIG_OFS, MZ_ZIP_CENTRAL_DIR_HEADER_SIG);
+ MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_VERSION_NEEDED_OFS, method ? 20 : 0);
+ MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_BIT_FLAG_OFS, bit_flags);
+ MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_METHOD_OFS, method);
+ MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_FILE_TIME_OFS, dos_time);
+ MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_FILE_DATE_OFS, dos_date);
+ MZ_WRITE_LE32(pDst + MZ_ZIP_CDH_CRC32_OFS, uncomp_crc32);
+ MZ_WRITE_LE32(pDst + MZ_ZIP_CDH_COMPRESSED_SIZE_OFS, comp_size);
+ MZ_WRITE_LE32(pDst + MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS, uncomp_size);
+ MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_FILENAME_LEN_OFS, filename_size);
+ MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_EXTRA_LEN_OFS, extra_size);
+ MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_COMMENT_LEN_OFS, comment_size);
+ MZ_WRITE_LE32(pDst + MZ_ZIP_CDH_EXTERNAL_ATTR_OFS, ext_attributes);
+ MZ_WRITE_LE32(pDst + MZ_ZIP_CDH_LOCAL_HEADER_OFS, local_header_ofs);
+ return MZ_TRUE;
+}
+
+static mz_bool mz_zip_writer_add_to_central_dir(mz_zip_archive *pZip, const char *pFilename, mz_uint16 filename_size, const void *pExtra, mz_uint16 extra_size, const void *pComment, mz_uint16 comment_size, mz_uint64 uncomp_size, mz_uint64 comp_size, mz_uint32 uncomp_crc32, mz_uint16 method, mz_uint16 bit_flags, mz_uint16 dos_time, mz_uint16 dos_date, mz_uint64 local_header_ofs, mz_uint32 ext_attributes)
+{
+ mz_zip_internal_state *pState = pZip->m_pState;
+ mz_uint32 central_dir_ofs = (mz_uint32)pState->m_central_dir.m_size;
+ size_t orig_central_dir_size = pState->m_central_dir.m_size;
+ mz_uint8 central_dir_header[MZ_ZIP_CENTRAL_DIR_HEADER_SIZE];
+
+ // No zip64 support yet
+ if ((local_header_ofs > 0xFFFFFFFF) || (((mz_uint64)pState->m_central_dir.m_size + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + filename_size + extra_size + comment_size) > 0xFFFFFFFF))
+ return MZ_FALSE;
+
+ if (!mz_zip_writer_create_central_dir_header(pZip, central_dir_header, filename_size, extra_size, comment_size, uncomp_size, comp_size, uncomp_crc32, method, bit_flags, dos_time, dos_date, local_header_ofs, ext_attributes))
+ return MZ_FALSE;
+
+ if ((!mz_zip_array_push_back(pZip, &pState->m_central_dir, central_dir_header, MZ_ZIP_CENTRAL_DIR_HEADER_SIZE)) ||
+ (!mz_zip_array_push_back(pZip, &pState->m_central_dir, pFilename, filename_size)) ||
+ (!mz_zip_array_push_back(pZip, &pState->m_central_dir, pExtra, extra_size)) ||
+ (!mz_zip_array_push_back(pZip, &pState->m_central_dir, pComment, comment_size)) ||
+ (!mz_zip_array_push_back(pZip, &pState->m_central_dir_offsets, &central_dir_ofs, 1)))
+ {
+ // Try to push the central directory array back into its original state.
+ mz_zip_array_resize(pZip, &pState->m_central_dir, orig_central_dir_size, MZ_FALSE);
+ return MZ_FALSE;
+ }
+
+ return MZ_TRUE;
+}
+
+static mz_bool mz_zip_writer_validate_archive_name(const char *pArchive_name)
+{
+ // Basic ZIP archive filename validity checks: Valid filenames cannot start with a forward slash, cannot contain a drive letter, and cannot use DOS-style backward slashes.
+ if (*pArchive_name == '/')
+ return MZ_FALSE;
+ while (*pArchive_name)
+ {
+ if ((*pArchive_name == '\\') || (*pArchive_name == ':'))
+ return MZ_FALSE;
+ pArchive_name++;
+ }
+ return MZ_TRUE;
+}
+
+static mz_uint mz_zip_writer_compute_padding_needed_for_file_alignment(mz_zip_archive *pZip)
+{
+ mz_uint32 n;
+ if (!pZip->m_file_offset_alignment)
+ return 0;
+ n = (mz_uint32)(pZip->m_archive_size & (pZip->m_file_offset_alignment - 1));
+ return (pZip->m_file_offset_alignment - n) & (pZip->m_file_offset_alignment - 1);
+}
+
+static mz_bool mz_zip_writer_write_zeros(mz_zip_archive *pZip, mz_uint64 cur_file_ofs, mz_uint32 n)
+{
+ char buf[4096];
+ memset(buf, 0, MZ_MIN(sizeof(buf), n));
+ while (n)
+ {
+ mz_uint32 s = MZ_MIN(sizeof(buf), n);
+ if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_file_ofs, buf, s) != s)
+ return MZ_FALSE;
+ cur_file_ofs += s; n -= s;
+ }
+ return MZ_TRUE;
+}
+
+mz_bool mz_zip_writer_add_mem_ex(mz_zip_archive *pZip, const char *pArchive_name, const void *pBuf, size_t buf_size, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags, mz_uint64 uncomp_size, mz_uint32 uncomp_crc32)
+{
+ mz_uint16 method = 0, dos_time = 0, dos_date = 0;
+ mz_uint level, ext_attributes = 0, num_alignment_padding_bytes;
+ mz_uint64 local_dir_header_ofs, cur_archive_file_ofs, comp_size = 0;
+ size_t archive_name_size;
+ mz_uint8 local_dir_header[MZ_ZIP_LOCAL_DIR_HEADER_SIZE];
+ tdefl_compressor *pComp = NULL;
+ mz_bool store_data_uncompressed;
+ mz_zip_internal_state *pState;
+
+ if ((int)level_and_flags < 0)
+ level_and_flags = MZ_DEFAULT_LEVEL;
+ level = level_and_flags & 0xF;
+ store_data_uncompressed = ((!level) || (level_and_flags & MZ_ZIP_FLAG_COMPRESSED_DATA));
+
+ if ((!pZip) || (!pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_WRITING) || ((buf_size) && (!pBuf)) || (!pArchive_name) || ((comment_size) && (!pComment)) || (pZip->m_total_files == 0xFFFF) || (level > MZ_UBER_COMPRESSION))
+ return MZ_FALSE;
+
+ local_dir_header_ofs = cur_archive_file_ofs = pZip->m_archive_size;
+ pState = pZip->m_pState;
+
+ if ((!(level_and_flags & MZ_ZIP_FLAG_COMPRESSED_DATA)) && (uncomp_size))
+ return MZ_FALSE;
+ // No zip64 support yet
+ if ((buf_size > 0xFFFFFFFF) || (uncomp_size > 0xFFFFFFFF))
+ return MZ_FALSE;
+ if (!mz_zip_writer_validate_archive_name(pArchive_name))
+ return MZ_FALSE;
+
+#ifndef MINIZ_NO_TIME
+ {
+ time_t cur_time; time(&cur_time);
+ mz_zip_time_to_dos_time(cur_time, &dos_time, &dos_date);
+ }
+#endif // #ifndef MINIZ_NO_TIME
+
+ archive_name_size = strlen(pArchive_name);
+ if (archive_name_size > 0xFFFF)
+ return MZ_FALSE;
+
+ num_alignment_padding_bytes = mz_zip_writer_compute_padding_needed_for_file_alignment(pZip);
+
+ // no zip64 support yet
+ if ((pZip->m_total_files == 0xFFFF) || ((pZip->m_archive_size + num_alignment_padding_bytes + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + comment_size + archive_name_size) > 0xFFFFFFFF))
+ return MZ_FALSE;
+
+ if ((archive_name_size) && (pArchive_name[archive_name_size - 1] == '/'))
+ {
+ // Set DOS Subdirectory attribute bit.
+ ext_attributes |= 0x10;
+ // Subdirectories cannot contain data.
+ if ((buf_size) || (uncomp_size))
+ return MZ_FALSE;
+ }
+
+ // Try to do any allocations before writing to the archive, so if an allocation fails the file remains unmodified. (A good idea if we're doing an in-place modification.)
+ if ((!mz_zip_array_ensure_room(pZip, &pState->m_central_dir, MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + archive_name_size + comment_size)) || (!mz_zip_array_ensure_room(pZip, &pState->m_central_dir_offsets, 1)))
+ return MZ_FALSE;
+
+ if ((!store_data_uncompressed) && (buf_size))
+ {
+ if (NULL == (pComp = (tdefl_compressor *)pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, sizeof(tdefl_compressor))))
+ return MZ_FALSE;
+ }
+
+ if (!mz_zip_writer_write_zeros(pZip, cur_archive_file_ofs, num_alignment_padding_bytes + sizeof(local_dir_header)))
+ {
+ pZip->m_pFree(pZip->m_pAlloc_opaque, pComp);
+ return MZ_FALSE;
+ }
+ local_dir_header_ofs += num_alignment_padding_bytes;
+ if (pZip->m_file_offset_alignment) { MZ_ASSERT((local_dir_header_ofs & (pZip->m_file_offset_alignment - 1)) == 0); }
+ cur_archive_file_ofs += num_alignment_padding_bytes + sizeof(local_dir_header);
+
+ MZ_CLEAR_OBJ(local_dir_header);
+ if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, pArchive_name, archive_name_size) != archive_name_size)
+ {
+ pZip->m_pFree(pZip->m_pAlloc_opaque, pComp);
+ return MZ_FALSE;
+ }
+ cur_archive_file_ofs += archive_name_size;
+
+ if (!(level_and_flags & MZ_ZIP_FLAG_COMPRESSED_DATA))
+ {
+ uncomp_crc32 = (mz_uint32)mz_crc32(MZ_CRC32_INIT, (const mz_uint8*)pBuf, buf_size);
+ uncomp_size = buf_size;
+ if (uncomp_size <= 3)
+ {
+ level = 0;
+ store_data_uncompressed = MZ_TRUE;
+ }
+ }
+
+ if (store_data_uncompressed)
+ {
+ if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, pBuf, buf_size) != buf_size)
+ {
+ pZip->m_pFree(pZip->m_pAlloc_opaque, pComp);
+ return MZ_FALSE;
+ }
+
+ cur_archive_file_ofs += buf_size;
+ comp_size = buf_size;
+
+ if (level_and_flags & MZ_ZIP_FLAG_COMPRESSED_DATA)
+ method = MZ_DEFLATED;
+ }
+ else if (buf_size)
+ {
+ mz_zip_writer_add_state state;
+
+ state.m_pZip = pZip;
+ state.m_cur_archive_file_ofs = cur_archive_file_ofs;
+ state.m_comp_size = 0;
+
+ if ((tdefl_init(pComp, mz_zip_writer_add_put_buf_callback, &state, tdefl_create_comp_flags_from_zip_params(level, -15, MZ_DEFAULT_STRATEGY)) != TDEFL_STATUS_OKAY) ||
+ (tdefl_compress_buffer(pComp, pBuf, buf_size, TDEFL_FINISH) != TDEFL_STATUS_DONE))
+ {
+ pZip->m_pFree(pZip->m_pAlloc_opaque, pComp);
+ return MZ_FALSE;
+ }
+
+ comp_size = state.m_comp_size;
+ cur_archive_file_ofs = state.m_cur_archive_file_ofs;
+
+ method = MZ_DEFLATED;
+ }
+
+ pZip->m_pFree(pZip->m_pAlloc_opaque, pComp);
+ pComp = NULL;
+
+ // no zip64 support yet
+ if ((comp_size > 0xFFFFFFFF) || (cur_archive_file_ofs > 0xFFFFFFFF))
+ return MZ_FALSE;
+
+ if (!mz_zip_writer_create_local_dir_header(pZip, local_dir_header, (mz_uint16)archive_name_size, 0, uncomp_size, comp_size, uncomp_crc32, method, 0, dos_time, dos_date))
+ return MZ_FALSE;
+
+ if (pZip->m_pWrite(pZip->m_pIO_opaque, local_dir_header_ofs, local_dir_header, sizeof(local_dir_header)) != sizeof(local_dir_header))
+ return MZ_FALSE;
+
+ if (!mz_zip_writer_add_to_central_dir(pZip, pArchive_name, (mz_uint16)archive_name_size, NULL, 0, pComment, comment_size, uncomp_size, comp_size, uncomp_crc32, method, 0, dos_time, dos_date, local_dir_header_ofs, ext_attributes))
+ return MZ_FALSE;
+
+ pZip->m_total_files++;
+ pZip->m_archive_size = cur_archive_file_ofs;
+
+ return MZ_TRUE;
+}
+
+#ifndef MINIZ_NO_STDIO
+mz_bool mz_zip_writer_add_file(mz_zip_archive *pZip, const char *pArchive_name, const char *pSrc_filename, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags)
+{
+ mz_uint uncomp_crc32 = MZ_CRC32_INIT, level, num_alignment_padding_bytes;
+ mz_uint16 method = 0, dos_time = 0, dos_date = 0, ext_attributes = 0;
+ mz_uint64 local_dir_header_ofs, cur_archive_file_ofs, uncomp_size = 0, comp_size = 0;
+ size_t archive_name_size;
+ mz_uint8 local_dir_header[MZ_ZIP_LOCAL_DIR_HEADER_SIZE];
+ MZ_FILE *pSrc_file = NULL;
+
+ if ((!pZip) || (!pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_WRITING) || (!pArchive_name) || ((comment_size) && (!pComment)) || ( level_and_flags > MZ_UBER_COMPRESSION))
+ return MZ_FALSE;
+
+ local_dir_header_ofs = cur_archive_file_ofs = pZip->m_archive_size;
+
+ if ((int)level_and_flags < 0)
+ level_and_flags = MZ_DEFAULT_LEVEL;
+ level = level_and_flags & 0xF;
+
+ if (level_and_flags & MZ_ZIP_FLAG_COMPRESSED_DATA)
+ return MZ_FALSE;
+ if (!mz_zip_writer_validate_archive_name(pArchive_name))
+ return MZ_FALSE;
+
+ archive_name_size = strlen(pArchive_name);
+ if (archive_name_size > 0xFFFF)
+ return MZ_FALSE;
+
+ num_alignment_padding_bytes = mz_zip_writer_compute_padding_needed_for_file_alignment(pZip);
+
+ // no zip64 support yet
+ if ((pZip->m_total_files == 0xFFFF) || ((pZip->m_archive_size + num_alignment_padding_bytes + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + comment_size + archive_name_size) > 0xFFFFFFFF))
+ return MZ_FALSE;
+
+ if (!mz_zip_get_file_modified_time(pSrc_filename, &dos_time, &dos_date))
+ return MZ_FALSE;
+
+ pSrc_file = MZ_FOPEN(pSrc_filename, "rb");
+ if (!pSrc_file)
+ return MZ_FALSE;
+ MZ_FSEEK64(pSrc_file, 0, SEEK_END);
+ uncomp_size = MZ_FTELL64(pSrc_file);
+ MZ_FSEEK64(pSrc_file, 0, SEEK_SET);
+
+ if (uncomp_size > 0xFFFFFFFF)
+ {
+ // No zip64 support yet
+ MZ_FCLOSE(pSrc_file);
+ return MZ_FALSE;
+ }
+ if (uncomp_size <= 3)
+ level = 0;
+
+ if (!mz_zip_writer_write_zeros(pZip, cur_archive_file_ofs, num_alignment_padding_bytes + sizeof(local_dir_header)))
+ {
+ MZ_FCLOSE(pSrc_file);
+ return MZ_FALSE;
+ }
+ local_dir_header_ofs += num_alignment_padding_bytes;
+ if (pZip->m_file_offset_alignment) { MZ_ASSERT((local_dir_header_ofs & (pZip->m_file_offset_alignment - 1)) == 0); }
+ cur_archive_file_ofs += num_alignment_padding_bytes + sizeof(local_dir_header);
+
+ MZ_CLEAR_OBJ(local_dir_header);
+ if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, pArchive_name, archive_name_size) != archive_name_size)
+ {
+ MZ_FCLOSE(pSrc_file);
+ return MZ_FALSE;
+ }
+ cur_archive_file_ofs += archive_name_size;
+
+ if (uncomp_size)
+ {
+ mz_uint64 uncomp_remaining = uncomp_size;
+ void *pRead_buf = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, MZ_ZIP_MAX_IO_BUF_SIZE);
+ if (!pRead_buf)
+ {
+ MZ_FCLOSE(pSrc_file);
+ return MZ_FALSE;
+ }
+
+ if (!level)
+ {
+ while (uncomp_remaining)
+ {
+ mz_uint n = (mz_uint)MZ_MIN(MZ_ZIP_MAX_IO_BUF_SIZE, uncomp_remaining);
+ if ((MZ_FREAD(pRead_buf, 1, n, pSrc_file) != n) || (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, pRead_buf, n) != n))
+ {
+ pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf);
+ MZ_FCLOSE(pSrc_file);
+ return MZ_FALSE;
+ }
+ uncomp_crc32 = (mz_uint32)mz_crc32(uncomp_crc32, (const mz_uint8 *)pRead_buf, n);
+ uncomp_remaining -= n;
+ cur_archive_file_ofs += n;
+ }
+ comp_size = uncomp_size;
+ }
+ else
+ {
+ mz_bool result = MZ_FALSE;
+ mz_zip_writer_add_state state;
+ tdefl_compressor *pComp = (tdefl_compressor *)pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, sizeof(tdefl_compressor));
+ if (!pComp)
+ {
+ pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf);
+ MZ_FCLOSE(pSrc_file);
+ return MZ_FALSE;
+ }
+
+ state.m_pZip = pZip;
+ state.m_cur_archive_file_ofs = cur_archive_file_ofs;
+ state.m_comp_size = 0;
+
+ if (tdefl_init(pComp, mz_zip_writer_add_put_buf_callback, &state, tdefl_create_comp_flags_from_zip_params(level, -15, MZ_DEFAULT_STRATEGY)) != TDEFL_STATUS_OKAY)
+ {
+ pZip->m_pFree(pZip->m_pAlloc_opaque, pComp);
+ pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf);
+ MZ_FCLOSE(pSrc_file);
+ return MZ_FALSE;
+ }
+
+ for ( ; ; )
+ {
+ size_t in_buf_size = (mz_uint32)MZ_MIN(uncomp_remaining, MZ_ZIP_MAX_IO_BUF_SIZE);
+ tdefl_status status;
+
+ if (MZ_FREAD(pRead_buf, 1, in_buf_size, pSrc_file) != in_buf_size)
+ break;
+
+ uncomp_crc32 = (mz_uint32)mz_crc32(uncomp_crc32, (const mz_uint8 *)pRead_buf, in_buf_size);
+ uncomp_remaining -= in_buf_size;
+
+ status = tdefl_compress_buffer(pComp, pRead_buf, in_buf_size, uncomp_remaining ? TDEFL_NO_FLUSH : TDEFL_FINISH);
+ if (status == TDEFL_STATUS_DONE)
+ {
+ result = MZ_TRUE;
+ break;
+ }
+ else if (status != TDEFL_STATUS_OKAY)
+ break;
+ }
+
+ pZip->m_pFree(pZip->m_pAlloc_opaque, pComp);
+
+ if (!result)
+ {
+ pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf);
+ MZ_FCLOSE(pSrc_file);
+ return MZ_FALSE;
+ }
+
+ comp_size = state.m_comp_size;
+ cur_archive_file_ofs = state.m_cur_archive_file_ofs;
+
+ method = MZ_DEFLATED;
+ }
+
+ pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf);
+ }
+
+ MZ_FCLOSE(pSrc_file); pSrc_file = NULL;
+
+ // no zip64 support yet
+ if ((comp_size > 0xFFFFFFFF) || (cur_archive_file_ofs > 0xFFFFFFFF))
+ return MZ_FALSE;
+
+ if (!mz_zip_writer_create_local_dir_header(pZip, local_dir_header, (mz_uint16)archive_name_size, 0, uncomp_size, comp_size, uncomp_crc32, method, 0, dos_time, dos_date))
+ return MZ_FALSE;
+
+ if (pZip->m_pWrite(pZip->m_pIO_opaque, local_dir_header_ofs, local_dir_header, sizeof(local_dir_header)) != sizeof(local_dir_header))
+ return MZ_FALSE;
+
+ if (!mz_zip_writer_add_to_central_dir(pZip, pArchive_name, (mz_uint16)archive_name_size, NULL, 0, pComment, comment_size, uncomp_size, comp_size, uncomp_crc32, method, 0, dos_time, dos_date, local_dir_header_ofs, ext_attributes))
+ return MZ_FALSE;
+
+ pZip->m_total_files++;
+ pZip->m_archive_size = cur_archive_file_ofs;
+
+ return MZ_TRUE;
+}
+#endif // #ifndef MINIZ_NO_STDIO
+
+mz_bool mz_zip_writer_add_from_zip_reader(mz_zip_archive *pZip, mz_zip_archive *pSource_zip, mz_uint file_index)
+{
+ mz_uint n, bit_flags, num_alignment_padding_bytes;
+ mz_uint64 comp_bytes_remaining, local_dir_header_ofs;
+ mz_uint64 cur_src_file_ofs, cur_dst_file_ofs;
+ mz_uint32 local_header_u32[(MZ_ZIP_LOCAL_DIR_HEADER_SIZE + sizeof(mz_uint32) - 1) / sizeof(mz_uint32)]; mz_uint8 *pLocal_header = (mz_uint8 *)local_header_u32;
+ mz_uint8 central_header[MZ_ZIP_CENTRAL_DIR_HEADER_SIZE];
+ size_t orig_central_dir_size;
+ mz_zip_internal_state *pState;
+ void *pBuf; const mz_uint8 *pSrc_central_header;
+
+ if ((!pZip) || (!pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_WRITING))
+ return MZ_FALSE;
+ if (NULL == (pSrc_central_header = mz_zip_reader_get_cdh(pSource_zip, file_index)))
+ return MZ_FALSE;
+ pState = pZip->m_pState;
+
+ num_alignment_padding_bytes = mz_zip_writer_compute_padding_needed_for_file_alignment(pZip);
+
+ // no zip64 support yet
+ if ((pZip->m_total_files == 0xFFFF) || ((pZip->m_archive_size + num_alignment_padding_bytes + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE) > 0xFFFFFFFF))
+ return MZ_FALSE;
+
+ cur_src_file_ofs = MZ_READ_LE32(pSrc_central_header + MZ_ZIP_CDH_LOCAL_HEADER_OFS);
+ cur_dst_file_ofs = pZip->m_archive_size;
+
+ if (pSource_zip->m_pRead(pSource_zip->m_pIO_opaque, cur_src_file_ofs, pLocal_header, MZ_ZIP_LOCAL_DIR_HEADER_SIZE) != MZ_ZIP_LOCAL_DIR_HEADER_SIZE)
+ return MZ_FALSE;
+ if (MZ_READ_LE32(pLocal_header) != MZ_ZIP_LOCAL_DIR_HEADER_SIG)
+ return MZ_FALSE;
+ cur_src_file_ofs += MZ_ZIP_LOCAL_DIR_HEADER_SIZE;
+
+ if (!mz_zip_writer_write_zeros(pZip, cur_dst_file_ofs, num_alignment_padding_bytes))
+ return MZ_FALSE;
+ cur_dst_file_ofs += num_alignment_padding_bytes;
+ local_dir_header_ofs = cur_dst_file_ofs;
+ if (pZip->m_file_offset_alignment) { MZ_ASSERT((local_dir_header_ofs & (pZip->m_file_offset_alignment - 1)) == 0); }
+
+ if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_dst_file_ofs, pLocal_header, MZ_ZIP_LOCAL_DIR_HEADER_SIZE) != MZ_ZIP_LOCAL_DIR_HEADER_SIZE)
+ return MZ_FALSE;
+ cur_dst_file_ofs += MZ_ZIP_LOCAL_DIR_HEADER_SIZE;
+
+ n = MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_FILENAME_LEN_OFS) + MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_EXTRA_LEN_OFS);
+ comp_bytes_remaining = n + MZ_READ_LE32(pSrc_central_header + MZ_ZIP_CDH_COMPRESSED_SIZE_OFS);
+
+ if (NULL == (pBuf = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, (size_t)MZ_MAX(sizeof(mz_uint32) * 4, MZ_MIN(MZ_ZIP_MAX_IO_BUF_SIZE, comp_bytes_remaining)))))
+ return MZ_FALSE;
+
+ while (comp_bytes_remaining)
+ {
+ n = (mz_uint)MZ_MIN(MZ_ZIP_MAX_IO_BUF_SIZE, comp_bytes_remaining);
+ if (pSource_zip->m_pRead(pSource_zip->m_pIO_opaque, cur_src_file_ofs, pBuf, n) != n)
+ {
+ pZip->m_pFree(pZip->m_pAlloc_opaque, pBuf);
+ return MZ_FALSE;
+ }
+ cur_src_file_ofs += n;
+
+ if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_dst_file_ofs, pBuf, n) != n)
+ {
+ pZip->m_pFree(pZip->m_pAlloc_opaque, pBuf);
+ return MZ_FALSE;
+ }
+ cur_dst_file_ofs += n;
+
+ comp_bytes_remaining -= n;
+ }
+
+ bit_flags = MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_BIT_FLAG_OFS);
+ if (bit_flags & 8)
+ {
+ // Copy data descriptor
+ if (pSource_zip->m_pRead(pSource_zip->m_pIO_opaque, cur_src_file_ofs, pBuf, sizeof(mz_uint32) * 4) != sizeof(mz_uint32) * 4)
+ {
+ pZip->m_pFree(pZip->m_pAlloc_opaque, pBuf);
+ return MZ_FALSE;
+ }
+
+ n = sizeof(mz_uint32) * ((MZ_READ_LE32(pBuf) == 0x08074b50) ? 4 : 3);
+ if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_dst_file_ofs, pBuf, n) != n)
+ {
+ pZip->m_pFree(pZip->m_pAlloc_opaque, pBuf);
+ return MZ_FALSE;
+ }
+
+ cur_dst_file_ofs += n;
+ }
+ pZip->m_pFree(pZip->m_pAlloc_opaque, pBuf);
+
+ // no zip64 support yet
+ if (cur_dst_file_ofs > 0xFFFFFFFF)
+ return MZ_FALSE;
+
+ orig_central_dir_size = pState->m_central_dir.m_size;
+
+ memcpy(central_header, pSrc_central_header, MZ_ZIP_CENTRAL_DIR_HEADER_SIZE);
+ MZ_WRITE_LE32(central_header + MZ_ZIP_CDH_LOCAL_HEADER_OFS, local_dir_header_ofs);
+ if (!mz_zip_array_push_back(pZip, &pState->m_central_dir, central_header, MZ_ZIP_CENTRAL_DIR_HEADER_SIZE))
+ return MZ_FALSE;
+
+ n = MZ_READ_LE16(pSrc_central_header + MZ_ZIP_CDH_FILENAME_LEN_OFS) + MZ_READ_LE16(pSrc_central_header + MZ_ZIP_CDH_EXTRA_LEN_OFS) + MZ_READ_LE16(pSrc_central_header + MZ_ZIP_CDH_COMMENT_LEN_OFS);
+ if (!mz_zip_array_push_back(pZip, &pState->m_central_dir, pSrc_central_header + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE, n))
+ {
+ mz_zip_array_resize(pZip, &pState->m_central_dir, orig_central_dir_size, MZ_FALSE);
+ return MZ_FALSE;
+ }
+
+ if (pState->m_central_dir.m_size > 0xFFFFFFFF)
+ return MZ_FALSE;
+ n = (mz_uint32)orig_central_dir_size;
+ if (!mz_zip_array_push_back(pZip, &pState->m_central_dir_offsets, &n, 1))
+ {
+ mz_zip_array_resize(pZip, &pState->m_central_dir, orig_central_dir_size, MZ_FALSE);
+ return MZ_FALSE;
+ }
+
+ pZip->m_total_files++;
+ pZip->m_archive_size = cur_dst_file_ofs;
+
+ return MZ_TRUE;
+}
+
+mz_bool mz_zip_writer_finalize_archive(mz_zip_archive *pZip)
+{
+ mz_zip_internal_state *pState;
+ mz_uint64 central_dir_ofs, central_dir_size;
+ mz_uint8 hdr[MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE];
+
+ if ((!pZip) || (!pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_WRITING))
+ return MZ_FALSE;
+
+ pState = pZip->m_pState;
+
+ // no zip64 support yet
+ if ((pZip->m_total_files > 0xFFFF) || ((pZip->m_archive_size + pState->m_central_dir.m_size + MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE) > 0xFFFFFFFF))
+ return MZ_FALSE;
+
+ central_dir_ofs = 0;
+ central_dir_size = 0;
+ if (pZip->m_total_files)
+ {
+ // Write central directory
+ central_dir_ofs = pZip->m_archive_size;
+ central_dir_size = pState->m_central_dir.m_size;
+ pZip->m_central_directory_file_ofs = central_dir_ofs;
+ if (pZip->m_pWrite(pZip->m_pIO_opaque, central_dir_ofs, pState->m_central_dir.m_p, (size_t)central_dir_size) != central_dir_size)
+ return MZ_FALSE;
+ pZip->m_archive_size += central_dir_size;
+ }
+
+ // Write end of central directory record
+ MZ_CLEAR_OBJ(hdr);
+ MZ_WRITE_LE32(hdr + MZ_ZIP_ECDH_SIG_OFS, MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG);
+ MZ_WRITE_LE16(hdr + MZ_ZIP_ECDH_CDIR_NUM_ENTRIES_ON_DISK_OFS, pZip->m_total_files);
+ MZ_WRITE_LE16(hdr + MZ_ZIP_ECDH_CDIR_TOTAL_ENTRIES_OFS, pZip->m_total_files);
+ MZ_WRITE_LE32(hdr + MZ_ZIP_ECDH_CDIR_SIZE_OFS, central_dir_size);
+ MZ_WRITE_LE32(hdr + MZ_ZIP_ECDH_CDIR_OFS_OFS, central_dir_ofs);
+
+ if (pZip->m_pWrite(pZip->m_pIO_opaque, pZip->m_archive_size, hdr, sizeof(hdr)) != sizeof(hdr))
+ return MZ_FALSE;
+#ifndef MINIZ_NO_STDIO
+ if ((pState->m_pFile) && (MZ_FFLUSH(pState->m_pFile) == EOF))
+ return MZ_FALSE;
+#endif // #ifndef MINIZ_NO_STDIO
+
+ pZip->m_archive_size += sizeof(hdr);
+
+ pZip->m_zip_mode = MZ_ZIP_MODE_WRITING_HAS_BEEN_FINALIZED;
+ return MZ_TRUE;
+}
+
+mz_bool mz_zip_writer_finalize_heap_archive(mz_zip_archive *pZip, void **pBuf, size_t *pSize)
+{
+ if ((!pZip) || (!pZip->m_pState) || (!pBuf) || (!pSize))
+ return MZ_FALSE;
+ if (pZip->m_pWrite != mz_zip_heap_write_func)
+ return MZ_FALSE;
+ if (!mz_zip_writer_finalize_archive(pZip))
+ return MZ_FALSE;
+
+ *pBuf = pZip->m_pState->m_pMem;
+ *pSize = pZip->m_pState->m_mem_size;
+ pZip->m_pState->m_pMem = NULL;
+ pZip->m_pState->m_mem_size = pZip->m_pState->m_mem_capacity = 0;
+ return MZ_TRUE;
+}
+
+mz_bool mz_zip_writer_end(mz_zip_archive *pZip)
+{
+ mz_zip_internal_state *pState;
+ mz_bool status = MZ_TRUE;
+ if ((!pZip) || (!pZip->m_pState) || (!pZip->m_pAlloc) || (!pZip->m_pFree) || ((pZip->m_zip_mode != MZ_ZIP_MODE_WRITING) && (pZip->m_zip_mode != MZ_ZIP_MODE_WRITING_HAS_BEEN_FINALIZED)))
+ return MZ_FALSE;
+
+ pState = pZip->m_pState;
+ pZip->m_pState = NULL;
+ mz_zip_array_clear(pZip, &pState->m_central_dir);
+ mz_zip_array_clear(pZip, &pState->m_central_dir_offsets);
+ mz_zip_array_clear(pZip, &pState->m_sorted_central_dir_offsets);
+
+#ifndef MINIZ_NO_STDIO
+ if (pState->m_pFile)
+ {
+ MZ_FCLOSE(pState->m_pFile);
+ pState->m_pFile = NULL;
+ }
+#endif // #ifndef MINIZ_NO_STDIO
+
+ if ((pZip->m_pWrite == mz_zip_heap_write_func) && (pState->m_pMem))
+ {
+ pZip->m_pFree(pZip->m_pAlloc_opaque, pState->m_pMem);
+ pState->m_pMem = NULL;
+ }
+
+ pZip->m_pFree(pZip->m_pAlloc_opaque, pState);
+ pZip->m_zip_mode = MZ_ZIP_MODE_INVALID;
+ return status;
+}
+
+#ifndef MINIZ_NO_STDIO
+mz_bool mz_zip_add_mem_to_archive_file_in_place(const char *pZip_filename, const char *pArchive_name, const void *pBuf, size_t buf_size, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags)
+{
+ mz_bool status, created_new_archive = MZ_FALSE;
+ mz_zip_archive zip_archive;
+ struct MZ_FILE_STAT_STRUCT file_stat;
+ MZ_CLEAR_OBJ(zip_archive);
+ if ((int)level_and_flags < 0)
+ level_and_flags = MZ_DEFAULT_LEVEL;
+ if ((!pZip_filename) || (!pArchive_name) || ((buf_size) && (!pBuf)) || ((comment_size) && (!pComment)) || ((level_and_flags & 0xF) > MZ_UBER_COMPRESSION))
+ return MZ_FALSE;
+ if (!mz_zip_writer_validate_archive_name(pArchive_name))
+ return MZ_FALSE;
+ if (MZ_FILE_STAT(pZip_filename, &file_stat) != 0)
+ {
+ // Create a new archive.
+ if (!mz_zip_writer_init_file(&zip_archive, pZip_filename, 0))
+ return MZ_FALSE;
+ created_new_archive = MZ_TRUE;
+ }
+ else
+ {
+ // Append to an existing archive.
+ if (!mz_zip_reader_init_file(&zip_archive, pZip_filename, level_and_flags | MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY))
+ return MZ_FALSE;
+ if (!mz_zip_writer_init_from_reader(&zip_archive, pZip_filename))
+ {
+ mz_zip_reader_end(&zip_archive);
+ return MZ_FALSE;
+ }
+ }
+ status = mz_zip_writer_add_mem_ex(&zip_archive, pArchive_name, pBuf, buf_size, pComment, comment_size, level_and_flags, 0, 0);
+ // Always finalize, even if adding failed for some reason, so we have a valid central directory. (This may not always succeed, but we can try.)
+ if (!mz_zip_writer_finalize_archive(&zip_archive))
+ status = MZ_FALSE;
+ if (!mz_zip_writer_end(&zip_archive))
+ status = MZ_FALSE;
+ if ((!status) && (created_new_archive))
+ {
+ // It's a new archive and something went wrong, so just delete it.
+ int ignoredStatus = MZ_DELETE_FILE(pZip_filename);
+ (void)ignoredStatus;
+ }
+ return status;
+}
+
+void *mz_zip_extract_archive_file_to_heap(const char *pZip_filename, const char *pArchive_name, size_t *pSize, mz_uint flags)
+{
+ int file_index;
+ mz_zip_archive zip_archive;
+ void *p = NULL;
+
+ if (pSize)
+ *pSize = 0;
+
+ if ((!pZip_filename) || (!pArchive_name))
+ return NULL;
+
+ MZ_CLEAR_OBJ(zip_archive);
+ if (!mz_zip_reader_init_file(&zip_archive, pZip_filename, flags | MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY))
+ return NULL;
+
+ if ((file_index = mz_zip_reader_locate_file(&zip_archive, pArchive_name, NULL, flags)) >= 0)
+ p = mz_zip_reader_extract_to_heap(&zip_archive, file_index, pSize, flags);
+
+ mz_zip_reader_end(&zip_archive);
+ return p;
+}
+
+#endif // #ifndef MINIZ_NO_STDIO
+
+#endif // #ifndef MINIZ_NO_ARCHIVE_WRITING_APIS
+
+#endif // #ifndef MINIZ_NO_ARCHIVE_APIS
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // MINIZ_HEADER_FILE_ONLY
+
+/*
+ This is free and unencumbered software released into the public domain.
+
+ Anyone is free to copy, modify, publish, use, compile, sell, or
+ distribute this software, either in source code form or as a compiled
+ binary, for any purpose, commercial or non-commercial, and by any
+ means.
+
+ In jurisdictions that recognize copyright laws, the author or authors
+ of this software dedicate any and all copyright interest in the
+ software to the public domain. We make this dedication for the benefit
+ of the public at large and to the detriment of our heirs and
+ successors. We intend this dedication to be an overt act of
+ relinquishment in perpetuity of all present and future rights to this
+ software under copyright law.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ OTHER DEALINGS IN THE SOFTWARE.
+
+ For more information, please refer to <http://unlicense.org/>
+*/
diff --git a/contrib/zip/src/zip.c b/contrib/zip/src/zip.c
new file mode 100644
index 000000000..80573096b
--- /dev/null
+++ b/contrib/zip/src/zip.c
@@ -0,0 +1,640 @@
+/*
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "zip.h"
+#include "miniz.h"
+
+#include <errno.h>
+#include <sys/stat.h>
+#include <time.h>
+
+#if defined _WIN32 || defined __WIN32__
+/* Win32, DOS */
+#include <direct.h>
+
+#define MKDIR(DIRNAME) _mkdir(DIRNAME)
+#define STRCLONE(STR) ((STR) ? _strdup(STR) : NULL)
+#define HAS_DEVICE(P) \
+ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) && \
+ (P)[1] == ':')
+#define FILESYSTEM_PREFIX_LEN(P) (HAS_DEVICE(P) ? 2 : 0)
+#define ISSLASH(C) ((C) == '/' || (C) == '\\')
+
+#else
+#define MKDIR(DIRNAME) mkdir(DIRNAME, 0755)
+#define STRCLONE(STR) ((STR) ? strdup(STR) : NULL)
+#endif
+
+#ifndef FILESYSTEM_PREFIX_LEN
+#define FILESYSTEM_PREFIX_LEN(P) 0
+#endif
+
+#ifndef ISSLASH
+#define ISSLASH(C) ((C) == '/')
+#endif
+
+#define CLEANUP(ptr) \
+ do { \
+ if (ptr) { \
+ free((void *)ptr); \
+ ptr = NULL; \
+ } \
+ } while (0)
+
+static char *basename(const char *name) {
+ char const *p;
+ char const *base = name += FILESYSTEM_PREFIX_LEN(name);
+ int all_slashes = 1;
+
+ for (p = name; *p; p++) {
+ if (ISSLASH(*p))
+ base = p + 1;
+ else
+ all_slashes = 0;
+ }
+
+ /* If NAME is all slashes, arrange to return `/'. */
+ if (*base == '\0' && ISSLASH(*name) && all_slashes) --base;
+
+ return (char *)base;
+}
+
+static int mkpath(const char *path) {
+ char const *p;
+ char npath[MAX_PATH + 1] = {0};
+ int len = 0;
+
+ for (p = path; *p && len < MAX_PATH; p++) {
+ if (ISSLASH(*p) && len > 0) {
+ if (MKDIR(npath) == -1)
+ if (errno != EEXIST) return -1;
+ }
+ npath[len++] = *p;
+ }
+
+ return 0;
+}
+
+static char *strrpl(const char *str, char oldchar, char newchar) {
+ char *rpl = (char *)malloc(sizeof(char) * (1 + strlen(str)));
+ char *begin = rpl;
+ char c;
+ while((c = *str++)) {
+ if (c == oldchar) {
+ c = newchar;
+ }
+ *rpl++ = c;
+ }
+ *rpl = '\0';
+
+ return begin;
+}
+
+struct zip_entry_t {
+ int index;
+ const char *name;
+ mz_uint64 uncomp_size;
+ mz_uint64 comp_size;
+ mz_uint32 uncomp_crc32;
+ mz_uint64 offset;
+ mz_uint8 header[MZ_ZIP_LOCAL_DIR_HEADER_SIZE];
+ mz_uint64 header_offset;
+ mz_uint16 method;
+ mz_zip_writer_add_state state;
+ tdefl_compressor comp;
+};
+
+struct zip_t {
+ mz_zip_archive archive;
+ mz_uint level;
+ struct zip_entry_t entry;
+ char mode;
+};
+
+struct zip_t *zip_open(const char *zipname, int level, char mode) {
+ struct zip_t *zip = NULL;
+
+ if (!zipname || strlen(zipname) < 1) {
+ // zip_t archive name is empty or NULL
+ goto cleanup;
+ }
+
+ if (level < 0) level = MZ_DEFAULT_LEVEL;
+ if ((level & 0xF) > MZ_UBER_COMPRESSION) {
+ // Wrong compression level
+ goto cleanup;
+ }
+
+ zip = (struct zip_t *)calloc((size_t)1, sizeof(struct zip_t));
+ if (!zip) goto cleanup;
+
+ zip->level = level;
+ zip->mode = mode;
+ switch (mode) {
+ case 'w':
+ // Create a new archive.
+ if (!mz_zip_writer_init_file(&(zip->archive), zipname, 0)) {
+ // Cannot initialize zip_archive writer
+ goto cleanup;
+ }
+ break;
+
+ case 'r':
+ case 'a':
+ if (!mz_zip_reader_init_file(
+ &(zip->archive), zipname,
+ level | MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY)) {
+ // An archive file does not exist or cannot initialize
+ // zip_archive reader
+ goto cleanup;
+ }
+
+ if (mode == 'a' &&
+ !mz_zip_writer_init_from_reader(&(zip->archive), zipname)) {
+ mz_zip_reader_end(&(zip->archive));
+ goto cleanup;
+ }
+
+ break;
+
+ default:
+ goto cleanup;
+ }
+
+ return zip;
+
+cleanup:
+ CLEANUP(zip);
+ return NULL;
+}
+
+void zip_close(struct zip_t *zip) {
+ if (zip) {
+ // Always finalize, even if adding failed for some reason, so we have a
+ // valid central directory.
+ mz_zip_writer_finalize_archive(&(zip->archive));
+
+ mz_zip_writer_end(&(zip->archive));
+ mz_zip_reader_end(&(zip->archive));
+
+ CLEANUP(zip);
+ }
+}
+
+int zip_entry_open(struct zip_t *zip, const char *entryname) {
+ char *locname = NULL;
+ size_t entrylen = 0;
+ mz_zip_archive *pzip = NULL;
+ mz_uint num_alignment_padding_bytes, level;
+
+ if (!zip || !entryname) {
+ return -1;
+ }
+
+ entrylen = strlen(entryname);
+ if (entrylen < 1) {
+ return -1;
+ }
+
+ pzip = &(zip->archive);
+ /*
+ .ZIP File Format Specification Version: 6.3.3
+
+ 4.4.17.1 The name of the file, with optional relative path.
+ The path stored MUST not contain a drive or
+ device letter, or a leading slash. All slashes
+ MUST be forward slashes '/' as opposed to
+ backwards slashes '\' for compatibility with Amiga
+ and UNIX file systems etc. If input came from standard
+ input, there is no file name field.
+ */
+ locname = strrpl(entryname, '\\', '/');
+
+ if (zip->mode == 'r') {
+ zip->entry.index = mz_zip_reader_locate_file(pzip, locname, NULL, 0);
+ CLEANUP(locname);
+ return (zip->entry.index < 0) ? -1 : 0;
+ }
+
+ zip->entry.index = zip->archive.m_total_files;
+ zip->entry.name = locname;
+ if (!zip->entry.name) {
+ // Cannot parse zip entry name
+ return -1;
+ }
+
+ zip->entry.comp_size = 0;
+ zip->entry.uncomp_size = 0;
+ zip->entry.uncomp_crc32 = MZ_CRC32_INIT;
+ zip->entry.offset = zip->archive.m_archive_size;
+ zip->entry.header_offset = zip->archive.m_archive_size;
+ memset(zip->entry.header, 0,
+ MZ_ZIP_LOCAL_DIR_HEADER_SIZE * sizeof(mz_uint8));
+ zip->entry.method = 0;
+
+ num_alignment_padding_bytes =
+ mz_zip_writer_compute_padding_needed_for_file_alignment(pzip);
+
+ if (!pzip->m_pState || (pzip->m_zip_mode != MZ_ZIP_MODE_WRITING)) {
+ // Wrong zip mode
+ return -1;
+ }
+ if (zip->level & MZ_ZIP_FLAG_COMPRESSED_DATA) {
+ // Wrong zip compression level
+ return -1;
+ }
+ // no zip64 support yet
+ if ((pzip->m_total_files == 0xFFFF) ||
+ ((pzip->m_archive_size + num_alignment_padding_bytes +
+ MZ_ZIP_LOCAL_DIR_HEADER_SIZE + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE +
+ entrylen) > 0xFFFFFFFF)) {
+ // No zip64 support yet
+ return -1;
+ }
+ if (!mz_zip_writer_write_zeros(
+ pzip, zip->entry.offset,
+ num_alignment_padding_bytes + sizeof(zip->entry.header))) {
+ // Cannot memset zip entry header
+ return -1;
+ }
+
+ zip->entry.header_offset += num_alignment_padding_bytes;
+ if (pzip->m_file_offset_alignment) {
+ MZ_ASSERT((zip->entry.header_offset &
+ (pzip->m_file_offset_alignment - 1)) == 0);
+ }
+ zip->entry.offset +=
+ num_alignment_padding_bytes + sizeof(zip->entry.header);
+
+ if (pzip->m_pWrite(pzip->m_pIO_opaque, zip->entry.offset, zip->entry.name,
+ entrylen) != entrylen) {
+ // Cannot write data to zip entry
+ return -1;
+ }
+
+ zip->entry.offset += entrylen;
+ level = zip->level & 0xF;
+ if (level) {
+ zip->entry.state.m_pZip = pzip;
+ zip->entry.state.m_cur_archive_file_ofs = zip->entry.offset;
+ zip->entry.state.m_comp_size = 0;
+
+ if (tdefl_init(&(zip->entry.comp), mz_zip_writer_add_put_buf_callback,
+ &(zip->entry.state),
+ tdefl_create_comp_flags_from_zip_params(
+ level, -15, MZ_DEFAULT_STRATEGY)) !=
+ TDEFL_STATUS_OKAY) {
+ // Cannot initialize the zip compressor
+ return -1;
+ }
+ }
+
+ return 0;
+}
+
+int zip_entry_close(struct zip_t *zip) {
+ mz_zip_archive *pzip = NULL;
+ mz_uint level;
+ tdefl_status done;
+ mz_uint16 entrylen;
+ time_t t;
+ struct tm *tm;
+ mz_uint16 dos_time, dos_date;
+ int status = -1;
+
+ if (!zip) {
+ // zip_t handler is not initialized
+ return -1;
+ }
+
+ if (zip->mode == 'r') {
+ return 0;
+ }
+
+ pzip = &(zip->archive);
+ level = zip->level & 0xF;
+ if (level) {
+ done = tdefl_compress_buffer(&(zip->entry.comp), "", 0, TDEFL_FINISH);
+ if (done != TDEFL_STATUS_DONE && done != TDEFL_STATUS_OKAY) {
+ // Cannot flush compressed buffer
+ goto cleanup;
+ }
+ zip->entry.comp_size = zip->entry.state.m_comp_size;
+ zip->entry.offset = zip->entry.state.m_cur_archive_file_ofs;
+ zip->entry.method = MZ_DEFLATED;
+ }
+
+ entrylen = (mz_uint16)strlen(zip->entry.name);
+ t = time(NULL);
+ tm = localtime(&t);
+ dos_time = (mz_uint16)(((tm->tm_hour) << 11) + ((tm->tm_min) << 5) +
+ ((tm->tm_sec) >> 1));
+ dos_date = (mz_uint16)(((tm->tm_year + 1900 - 1980) << 9) +
+ ((tm->tm_mon + 1) << 5) + tm->tm_mday);
+
+ // no zip64 support yet
+ if ((zip->entry.comp_size > 0xFFFFFFFF) ||
+ (zip->entry.offset > 0xFFFFFFFF)) {
+ // No zip64 support, yet
+ goto cleanup;
+ }
+
+ if (!mz_zip_writer_create_local_dir_header(
+ pzip, zip->entry.header, entrylen, 0, zip->entry.uncomp_size,
+ zip->entry.comp_size, zip->entry.uncomp_crc32, zip->entry.method, 0,
+ dos_time, dos_date)) {
+ // Cannot create zip entry header
+ goto cleanup;
+ }
+
+ if (pzip->m_pWrite(pzip->m_pIO_opaque, zip->entry.header_offset,
+ zip->entry.header, sizeof(zip->entry.header)) !=
+ sizeof(zip->entry.header)) {
+ // Cannot write zip entry header
+ goto cleanup;
+ }
+
+ if (!mz_zip_writer_add_to_central_dir(
+ pzip, zip->entry.name, entrylen, NULL, 0, "", 0,
+ zip->entry.uncomp_size, zip->entry.comp_size,
+ zip->entry.uncomp_crc32, zip->entry.method, 0, dos_time, dos_date,
+ zip->entry.header_offset, 0)) {
+ // Cannot write to zip central dir
+ goto cleanup;
+ }
+
+ pzip->m_total_files++;
+ pzip->m_archive_size = zip->entry.offset;
+ status = 0;
+
+cleanup:
+ CLEANUP(zip->entry.name);
+ return status;
+}
+
+int zip_entry_write(struct zip_t *zip, const void *buf, size_t bufsize) {
+ mz_uint level;
+ mz_zip_archive *pzip = NULL;
+ tdefl_status status;
+
+ if (!zip) {
+ // zip_t handler is not initialized
+ return -1;
+ }
+
+ pzip = &(zip->archive);
+ if (buf && bufsize > 0) {
+ zip->entry.uncomp_size += bufsize;
+ zip->entry.uncomp_crc32 = (mz_uint32)mz_crc32(
+ zip->entry.uncomp_crc32, (const mz_uint8 *)buf, bufsize);
+
+ level = zip->level & 0xF;
+ if (!level) {
+ if ((pzip->m_pWrite(pzip->m_pIO_opaque, zip->entry.offset, buf,
+ bufsize) != bufsize)) {
+ // Cannot write buffer
+ return -1;
+ }
+ zip->entry.offset += bufsize;
+ zip->entry.comp_size += bufsize;
+ } else {
+ status = tdefl_compress_buffer(&(zip->entry.comp), buf, bufsize,
+ TDEFL_NO_FLUSH);
+ if (status != TDEFL_STATUS_DONE && status != TDEFL_STATUS_OKAY) {
+ // Cannot compress buffer
+ return -1;
+ }
+ }
+ }
+
+ return 0;
+}
+
+int zip_entry_fwrite(struct zip_t *zip, const char *filename) {
+ int status = 0;
+ size_t n = 0;
+ FILE *stream = NULL;
+ mz_uint8 buf[MZ_ZIP_MAX_IO_BUF_SIZE] = {0};
+
+ if (!zip) {
+ // zip_t handler is not initialized
+ return -1;
+ }
+
+ stream = fopen(filename, "rb");
+ if (!stream) {
+ // Cannot open filename
+ return -1;
+ }
+
+ while ((n = fread(buf, sizeof(mz_uint8), MZ_ZIP_MAX_IO_BUF_SIZE, stream)) >
+ 0) {
+ if (zip_entry_write(zip, buf, n) < 0) {
+ status = -1;
+ break;
+ }
+ }
+ fclose(stream);
+
+ return status;
+}
+
+int zip_entry_read(struct zip_t *zip, void **buf, size_t *bufsize) {
+ mz_zip_archive *pzip = NULL;
+ mz_uint idx;
+
+ if (!zip) {
+ // zip_t handler is not initialized
+ return -1;
+ }
+
+ if (zip->mode != 'r' || zip->entry.index < 0) {
+ // the entry is not found or we do not have read access
+ return -1;
+ }
+
+ pzip = &(zip->archive);
+ idx = (mz_uint)zip->entry.index;
+ if (mz_zip_reader_is_file_a_directory(pzip, idx)) {
+ // the entry is a directory
+ return -1;
+ }
+
+ *buf = mz_zip_reader_extract_to_heap(pzip, idx, bufsize, 0);
+ return (*buf) ? 0 : -1;
+}
+
+int zip_entry_fread(struct zip_t *zip, const char *filename) {
+ mz_zip_archive *pzip = NULL;
+ mz_uint idx;
+
+ if (!zip) {
+ // zip_t handler is not initialized
+ return -1;
+ }
+
+ if (zip->mode != 'r' || zip->entry.index < 0) {
+ // the entry is not found or we do not have read access
+ return -1;
+ }
+
+ pzip = &(zip->archive);
+ idx = (mz_uint)zip->entry.index;
+ if (mz_zip_reader_is_file_a_directory(pzip, idx)) {
+ // the entry is a directory
+ return -1;
+ }
+
+ return (mz_zip_reader_extract_to_file(pzip, idx, filename, 0)) ? 0 : -1;
+}
+
+int zip_entry_extract(struct zip_t *zip,
+ size_t (*on_extract)(void *arg, unsigned long long offset,
+ const void *buf, size_t bufsize),
+ void *arg) {
+ mz_zip_archive *pzip = NULL;
+ mz_uint idx;
+
+ if (!zip) {
+ // zip_t handler is not initialized
+ return -1;
+ }
+
+ if (zip->mode != 'r' || zip->entry.index < 0) {
+ // the entry is not found or we do not have read access
+ return -1;
+ }
+
+ pzip = &(zip->archive);
+ idx = (mz_uint)zip->entry.index;
+
+ return (mz_zip_reader_extract_to_callback(pzip, idx, on_extract, arg, 0))
+ ? 0
+ : -1;
+}
+
+int zip_create(const char *zipname, const char *filenames[], size_t len) {
+ int status = 0;
+ size_t i;
+ mz_zip_archive zip_archive;
+
+ if (!zipname || strlen(zipname) < 1) {
+ // zip_t archive name is empty or NULL
+ return -1;
+ }
+
+ // Create a new archive.
+ if (!memset(&(zip_archive), 0, sizeof(zip_archive))) {
+ // Cannot memset zip archive
+ return -1;
+ }
+
+ if (!mz_zip_writer_init_file(&zip_archive, zipname, 0)) {
+ // Cannot initialize zip_archive writer
+ return -1;
+ }
+
+ for (i = 0; i < len; ++i) {
+ const char *name = filenames[i];
+ if (!name) {
+ status = -1;
+ break;
+ }
+
+ if (!mz_zip_writer_add_file(&zip_archive, basename(name), name, "", 0,
+ ZIP_DEFAULT_COMPRESSION_LEVEL)) {
+ // Cannot add file to zip_archive
+ status = -1;
+ break;
+ }
+ }
+
+ mz_zip_writer_finalize_archive(&zip_archive);
+ mz_zip_writer_end(&zip_archive);
+ return status;
+}
+
+int zip_extract(const char *zipname, const char *dir,
+ int (*on_extract)(const char *filename, void *arg), void *arg) {
+ int status = -1;
+ mz_uint i, n;
+ char path[MAX_PATH + 1] = {0};
+ mz_zip_archive zip_archive;
+ mz_zip_archive_file_stat info;
+ size_t dirlen = 0;
+
+ if (!memset(&(zip_archive), 0, sizeof(zip_archive))) {
+ // Cannot memset zip archive
+ return -1;
+ }
+
+ if (!zipname || !dir) {
+ // Cannot parse zip archive name
+ return -1;
+ }
+
+ dirlen = strlen(dir);
+ if (dirlen + 1 > MAX_PATH) {
+ return -1;
+ }
+
+ // Now try to open the archive.
+ if (!mz_zip_reader_init_file(&zip_archive, zipname, 0)) {
+ // Cannot initialize zip_archive reader
+ return -1;
+ }
+
+ strcpy(path, dir);
+ if (!ISSLASH(path[dirlen - 1])) {
+#if defined _WIN32 || defined __WIN32__
+ path[dirlen] = '\\';
+#else
+ path[dirlen] = '/';
+#endif
+ ++dirlen;
+ }
+
+ // Get and print information about each file in the archive.
+ n = mz_zip_reader_get_num_files(&zip_archive);
+ for (i = 0; i < n; ++i) {
+ if (!mz_zip_reader_file_stat(&zip_archive, i, &info)) {
+ // Cannot get information about zip archive;
+ goto out;
+ }
+ strncpy(&path[dirlen], info.m_filename, MAX_PATH - dirlen);
+ if (mkpath(path) < 0) {
+ // Cannot make a path
+ goto out;
+ }
+
+ if (!mz_zip_reader_is_file_a_directory(&zip_archive, i)) {
+ if (!mz_zip_reader_extract_to_file(&zip_archive, i, path, 0)) {
+ // Cannot extract zip archive to file
+ goto out;
+ }
+ }
+
+ if (on_extract) {
+ if (on_extract(path, arg) < 0) {
+ goto out;
+ }
+ }
+ }
+ status = 0;
+
+out:
+ // Close the archive, freeing any resources it was using
+ if (!mz_zip_reader_end(&zip_archive)) {
+ // Cannot end zip reader
+ status = -1;
+ }
+
+ return status;
+}
diff --git a/contrib/zip/src/zip.h b/contrib/zip/src/zip.h
new file mode 100644
index 000000000..1611b5417
--- /dev/null
+++ b/contrib/zip/src/zip.h
@@ -0,0 +1,193 @@
+/*
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#pragma once
+#ifndef ZIP_H
+#define ZIP_H
+
+#include <string.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef MAX_PATH
+#define MAX_PATH 32767 /* # chars in a path name including NULL */
+#endif
+
+#define ZIP_DEFAULT_COMPRESSION_LEVEL 6
+
+/*
+ This data structure is used throughout the library to represent zip archive
+ - forward declaration.
+*/
+struct zip_t;
+
+/*
+ Opens zip archive with compression level using the given mode.
+
+ Args:
+ zipname: zip archive file name.
+ level: compression level (0-9 are the standard zlib-style levels).
+ mode: file access mode.
+ 'r': opens a file for reading/extracting (the file must exists).
+ 'w': creates an empty file for writing.
+ 'a': appends to an existing archive.
+
+ Returns:
+ The zip archive handler or NULL on error
+*/
+extern struct zip_t *zip_open(const char *zipname, int level, char mode);
+
+/*
+ Closes zip archive, releases resources - always finalize.
+
+ Args:
+ zip: zip archive handler.
+*/
+extern void zip_close(struct zip_t *zip);
+
+/*
+ Opens a new entry for writing in a zip archive.
+
+ Args:
+ zip: zip archive handler.
+ entryname: an entry name in local dictionary.
+
+ Returns:
+ The return code - 0 on success, negative number (< 0) on error.
+*/
+extern int zip_entry_open(struct zip_t *zip, const char *entryname);
+
+/*
+ Closes a zip entry, flushes buffer and releases resources.
+
+ Args:
+ zip: zip archive handler.
+
+ Returns:
+ The return code - 0 on success, negative number (< 0) on error.
+*/
+extern int zip_entry_close(struct zip_t *zip);
+
+/*
+ Compresses an input buffer for the current zip entry.
+
+ Args:
+ zip: zip archive handler.
+ buf: input buffer.
+ bufsize: input buffer size (in bytes).
+
+ Returns:
+ The return code - 0 on success, negative number (< 0) on error.
+*/
+extern int zip_entry_write(struct zip_t *zip, const void *buf, size_t bufsize);
+
+/*
+ Compresses a file for the current zip entry.
+
+ Args:
+ zip: zip archive handler.
+ filename: input file.
+
+ Returns:
+ The return code - 0 on success, negative number (< 0) on error.
+*/
+extern int zip_entry_fwrite(struct zip_t *zip, const char *filename);
+
+/*
+ Extracts the current zip entry into output buffer.
+ The function allocates sufficient memory for a output buffer.
+
+ Args:
+ zip: zip archive handler.
+ buf: output buffer.
+ bufsize: output buffer size (in bytes).
+
+ Note:
+ - remember to release memory allocated for a output buffer.
+ - for large entries, please take a look at zip_entry_extract function.
+
+ Returns:
+ The return code - 0 on success, negative number (< 0) on error.
+*/
+extern int zip_entry_read(struct zip_t *zip, void **buf, size_t *bufsize);
+
+/*
+ Extracts the current zip entry into output file.
+
+ Args:
+ zip: zip archive handler.
+ filename: output file.
+
+ Returns:
+ The return code - 0 on success, negative number (< 0) on error.
+*/
+extern int zip_entry_fread(struct zip_t *zip, const char *filename);
+
+/*
+ Extract the current zip entry using a callback function (on_extract).
+
+ Args:
+ zip: zip archive handler.
+ on_extract: callback function.
+ arg: opaque pointer (optional argument,
+ which you can pass to the on_extract callback)
+
+ Returns:
+ The return code - 0 on success, negative number (< 0) on error.
+ */
+extern int zip_entry_extract(struct zip_t *zip,
+ size_t (*on_extract)(void *arg,
+ unsigned long long offset,
+ const void *data,
+ size_t size),
+ void *arg);
+
+/*
+ Creates a new archive and puts files into a single zip archive.
+
+ Args:
+ zipname: zip archive file.
+ filenames: input files.
+ len: number of input files.
+
+ Returns:
+ The return code - 0 on success, negative number (< 0) on error.
+*/
+extern int zip_create(const char *zipname, const char *filenames[], size_t len);
+
+/*
+ Extracts a zip archive file into directory.
+
+ If on_extract_entry is not NULL, the callback will be called after
+ successfully extracted each zip entry.
+ Returning a negative value from the callback will cause abort and return an
+ error. The last argument (void *arg) is optional, which you can use to pass
+ data to the on_extract_entry callback.
+
+ Args:
+ zipname: zip archive file.
+ dir: output directory.
+ on_extract_entry: on extract callback.
+ arg: opaque pointer.
+
+ Returns:
+ The return code - 0 on success, negative number (< 0) on error.
+*/
+extern int zip_extract(const char *zipname, const char *dir,
+ int (*on_extract_entry)(const char *filename, void *arg),
+ void *arg);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/contrib/zip/test/CMakeLists.txt b/contrib/zip/test/CMakeLists.txt
new file mode 100644
index 000000000..7734dcbe7
--- /dev/null
+++ b/contrib/zip/test/CMakeLists.txt
@@ -0,0 +1,7 @@
+cmake_minimum_required(VERSION 2.8)
+
+# test
+include_directories(../src)
+add_executable(test.exe test.c ../src/zip.c)
+
+add_test(NAME test COMMAND test.exe)
diff --git a/contrib/zip/test/test.c b/contrib/zip/test/test.c
new file mode 100644
index 000000000..0b9c9f7b6
--- /dev/null
+++ b/contrib/zip/test/test.c
@@ -0,0 +1,105 @@
+#include <zip.h>
+
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#define ZIPNAME "test.zip"
+#define TESTDATA1 "Some test data 1...\0"
+#define TESTDATA2 "Some test data 2...\0"
+
+static void test_write(void) {
+ struct zip_t *zip = zip_open(ZIPNAME, ZIP_DEFAULT_COMPRESSION_LEVEL, 'w');
+ assert(zip != NULL);
+
+ assert(0 == zip_entry_open(zip, "test/test-1.txt"));
+ assert(0 == zip_entry_write(zip, TESTDATA1, strlen(TESTDATA1)));
+ assert(0 == zip_entry_close(zip));
+
+ zip_close(zip);
+}
+
+static void test_append(void) {
+ struct zip_t *zip = zip_open(ZIPNAME, ZIP_DEFAULT_COMPRESSION_LEVEL, 'a');
+ assert(zip != NULL);
+
+ assert(0 == zip_entry_open(zip, "test\\test-2.txt"));
+ assert(0 == zip_entry_write(zip, TESTDATA2, strlen(TESTDATA2)));
+ assert(0 == zip_entry_close(zip));
+
+ zip_close(zip);
+}
+
+static void test_read(void) {
+ char *buf = NULL;
+ size_t bufsize;
+ struct zip_t *zip = zip_open(ZIPNAME, 0, 'r');
+ assert(zip != NULL);
+
+ assert(0 == zip_entry_open(zip, "test\\test-1.txt"));
+ assert(0 == zip_entry_read(zip, (void **)&buf, &bufsize));
+ assert(bufsize == strlen(TESTDATA1));
+ assert(0 == strncmp(buf, TESTDATA1, bufsize));
+ assert(0 == zip_entry_close(zip));
+ free(buf);
+ buf = NULL;
+ bufsize = 0;
+
+ assert(0 == zip_entry_open(zip, "test/test-2.txt"));
+ assert(0 == zip_entry_read(zip, (void **)&buf, &bufsize));
+ assert(bufsize == strlen(TESTDATA2));
+ assert(0 == strncmp(buf, TESTDATA2, bufsize));
+ assert(0 == zip_entry_close(zip));
+ free(buf);
+ buf = NULL;
+ bufsize = 0;
+
+ zip_close(zip);
+}
+
+struct buffer_t {
+ char *data;
+ size_t size;
+};
+
+static size_t on_extract(void *arg, unsigned long long offset, const void *data,
+ size_t size) {
+ struct buffer_t *buf = (struct buffer_t *)arg;
+ buf->data = realloc(buf->data, buf->size + size + 1);
+ assert(NULL != buf->data);
+
+ memcpy(&(buf->data[buf->size]), data, size);
+ buf->size += size;
+ buf->data[buf->size] = 0;
+
+ return size;
+}
+
+static void test_extract(void) {
+ struct buffer_t buf = {0};
+
+ struct zip_t *zip = zip_open(ZIPNAME, 0, 'r');
+ assert(zip != NULL);
+
+ assert(0 == zip_entry_open(zip, "test/test-1.txt"));
+ assert(0 == zip_entry_extract(zip, on_extract, &buf));
+
+ assert(buf.size == strlen(TESTDATA1));
+ assert(0 == strncmp(buf.data, TESTDATA1, buf.size));
+ assert(0 == zip_entry_close(zip));
+ free(buf.data);
+ buf.data = NULL;
+ buf.size = 0;
+
+ zip_close(zip);
+}
+
+int main(int argc, char *argv[]) {
+ test_write();
+ test_append();
+ test_read();
+ test_extract();
+
+ return remove(ZIPNAME);
+}
diff --git a/contrib/zip/zip.png b/contrib/zip/zip.png
new file mode 100644
index 000000000..244681007
--- /dev/null
+++ b/contrib/zip/zip.png
Binary files differ
diff --git a/contrib/zlib/CMakeLists.txt b/contrib/zlib/CMakeLists.txt
index 022d3dfba..5f1368adb 100644
--- a/contrib/zlib/CMakeLists.txt
+++ b/contrib/zlib/CMakeLists.txt
@@ -10,10 +10,10 @@ endif()
project(zlib C)
cmake_policy(POP)
-set(VERSION "1.2.8")
+set(VERSION "1.2.11.1")
-option(ASM686 "Enable building i686 assembly implementation for zlib")
-option(AMD64 "Enable building amd64 assembly implementation for zlib")
+option(ASM686 "Enable building i686 assembly implementation")
+option(AMD64 "Enable building amd64 assembly implementation")
#set(INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables")
#set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries")
@@ -90,7 +90,6 @@ configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/zlib.pc.cmakein
${ZLIB_PC} @ONLY)
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.cmakein
${CMAKE_CURRENT_BINARY_DIR}/zconf.h @ONLY)
-
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR})
@@ -191,7 +190,11 @@ if(MINGW)
set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj)
endif(MINGW)
+add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
+set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL)
+set_target_properties(zlib PROPERTIES SOVERSION 1)
+
INSTALL( TARGETS zlibstatic
LIBRARY DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
ARCHIVE DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
diff --git a/contrib/zlib/README b/contrib/zlib/README
index 5ca9d127e..41777d06d 100644
--- a/contrib/zlib/README
+++ b/contrib/zlib/README
@@ -1,6 +1,6 @@
ZLIB DATA COMPRESSION LIBRARY
-zlib 1.2.8 is a general purpose data compression library. All the code is
+zlib 1.2.11.1 is a general purpose data compression library. All the code is
thread safe. The data format used by the zlib library is described by RFCs
(Request for Comments) 1950 to 1952 in the files
http://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and
@@ -31,7 +31,7 @@ Mark Nelson <markn@ieee.org> wrote an article about zlib for the Jan. 1997
issue of Dr. Dobb's Journal; a copy of the article is available at
http://marknelson.us/1997/01/01/zlib-engine/ .
-The changes made in version 1.2.8 are documented in the file ChangeLog.
+The changes made in version 1.2.11.1 are documented in the file ChangeLog.
Unsupported third party contributions are provided in directory contrib/ .
@@ -84,7 +84,7 @@ Acknowledgments:
Copyright notice:
- (C) 1995-2013 Jean-loup Gailly and Mark Adler
+ (C) 1995-2017 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/contrib/zlib/adler32.c b/contrib/zlib/adler32.c
index a868f073d..d0be4380a 100644
--- a/contrib/zlib/adler32.c
+++ b/contrib/zlib/adler32.c
@@ -1,5 +1,5 @@
/* adler32.c -- compute the Adler-32 checksum of a data stream
- * Copyright (C) 1995-2011 Mark Adler
+ * Copyright (C) 1995-2011, 2016 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -7,11 +7,9 @@
#include "zutil.h"
-#define local static
-
local uLong adler32_combine_ OF((uLong adler1, uLong adler2, z_off64_t len2));
-#define BASE 65521 /* largest prime smaller than 65536 */
+#define BASE 65521U /* largest prime smaller than 65536 */
#define NMAX 5552
/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
@@ -62,10 +60,10 @@ local uLong adler32_combine_ OF((uLong adler1, uLong adler2, z_off64_t len2));
#endif
/* ========================================================================= */
-uLong ZEXPORT adler32(adler, buf, len)
+uLong ZEXPORT adler32_z(adler, buf, len)
uLong adler;
const Bytef *buf;
- uInt len;
+ z_size_t len;
{
unsigned long sum2;
unsigned n;
@@ -133,6 +131,15 @@ uLong ZEXPORT adler32(adler, buf, len)
}
/* ========================================================================= */
+uLong ZEXPORT adler32(adler, buf, len)
+ uLong adler;
+ const Bytef *buf;
+ uInt len;
+{
+ return adler32_z(adler, buf, len);
+}
+
+/* ========================================================================= */
local uLong adler32_combine_(adler1, adler2, len2)
uLong adler1;
uLong adler2;
@@ -156,7 +163,7 @@ local uLong adler32_combine_(adler1, adler2, len2)
sum2 += ((adler1 >> 16) & 0xffff) + ((adler2 >> 16) & 0xffff) + BASE - rem;
if (sum1 >= BASE) sum1 -= BASE;
if (sum1 >= BASE) sum1 -= BASE;
- if (sum2 >= (BASE << 1)) sum2 -= (BASE << 1);
+ if (sum2 >= ((unsigned long)BASE << 1)) sum2 -= ((unsigned long)BASE << 1);
if (sum2 >= BASE) sum2 -= BASE;
return sum1 | (sum2 << 16);
}
diff --git a/contrib/zlib/compress.c b/contrib/zlib/compress.c
index 6e9762676..e2db404ab 100644
--- a/contrib/zlib/compress.c
+++ b/contrib/zlib/compress.c
@@ -1,5 +1,5 @@
/* compress.c -- compress a memory buffer
- * Copyright (C) 1995-2005 Jean-loup Gailly.
+ * Copyright (C) 1995-2005, 2014, 2016 Jean-loup Gailly, Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -28,16 +28,11 @@ int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)
{
z_stream stream;
int err;
+ const uInt max = (uInt)-1;
+ uLong left;
- stream.next_in = (z_const Bytef *)source;
- stream.avail_in = (uInt)sourceLen;
-#ifdef MAXSEG_64K
- /* Check for source > 64K on 16-bit machine: */
- if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR;
-#endif
- stream.next_out = dest;
- stream.avail_out = (uInt)*destLen;
- if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR;
+ left = *destLen;
+ *destLen = 0;
stream.zalloc = (alloc_func)0;
stream.zfree = (free_func)0;
@@ -46,15 +41,26 @@ int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)
err = deflateInit(&stream, level);
if (err != Z_OK) return err;
- err = deflate(&stream, Z_FINISH);
- if (err != Z_STREAM_END) {
- deflateEnd(&stream);
- return err == Z_OK ? Z_BUF_ERROR : err;
- }
- *destLen = stream.total_out;
+ stream.next_out = dest;
+ stream.avail_out = 0;
+ stream.next_in = (z_const Bytef *)source;
+ stream.avail_in = 0;
+
+ do {
+ if (stream.avail_out == 0) {
+ stream.avail_out = left > (uLong)max ? max : (uInt)left;
+ left -= stream.avail_out;
+ }
+ if (stream.avail_in == 0) {
+ stream.avail_in = sourceLen > (uLong)max ? max : (uInt)sourceLen;
+ sourceLen -= stream.avail_in;
+ }
+ err = deflate(&stream, sourceLen ? Z_NO_FLUSH : Z_FINISH);
+ } while (err == Z_OK);
- err = deflateEnd(&stream);
- return err;
+ *destLen = stream.total_out;
+ deflateEnd(&stream);
+ return err == Z_STREAM_END ? Z_OK : err;
}
/* ===========================================================================
diff --git a/contrib/zlib/contrib/README.contrib b/contrib/zlib/contrib/README.contrib
new file mode 100644
index 000000000..a411d5c39
--- /dev/null
+++ b/contrib/zlib/contrib/README.contrib
@@ -0,0 +1,78 @@
+All files under this contrib directory are UNSUPPORTED. There were
+provided by users of zlib and were not tested by the authors of zlib.
+Use at your own risk. Please contact the authors of the contributions
+for help about these, not the zlib authors. Thanks.
+
+
+ada/ by Dmitriy Anisimkov <anisimkov@yahoo.com>
+ Support for Ada
+ See http://zlib-ada.sourceforge.net/
+
+amd64/ by Mikhail Teterin <mi@ALDAN.algebra.com>
+ asm code for AMD64
+ See patch at http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/96393
+
+asm686/ by Brian Raiter <breadbox@muppetlabs.com>
+ asm code for Pentium and PPro/PII, using the AT&T (GNU as) syntax
+ See http://www.muppetlabs.com/~breadbox/software/assembly.html
+
+blast/ by Mark Adler <madler@alumni.caltech.edu>
+ Decompressor for output of PKWare Data Compression Library (DCL)
+
+delphi/ by Cosmin Truta <cosmint@cs.ubbcluj.ro>
+ Support for Delphi and C++ Builder
+
+dotzlib/ by Henrik Ravn <henrik@ravn.com>
+ Support for Microsoft .Net and Visual C++ .Net
+
+gcc_gvmat64/by Gilles Vollant <info@winimage.com>
+ GCC Version of x86 64-bit (AMD64 and Intel EM64t) code for x64
+ assembler to replace longest_match() and inflate_fast()
+
+infback9/ by Mark Adler <madler@alumni.caltech.edu>
+ Unsupported diffs to infback to decode the deflate64 format
+
+inflate86/ by Chris Anderson <christop@charm.net>
+ Tuned x86 gcc asm code to replace inflate_fast()
+
+iostream/ by Kevin Ruland <kevin@rodin.wustl.edu>
+ A C++ I/O streams interface to the zlib gz* functions
+
+iostream2/ by Tyge Løvset <Tyge.Lovset@cmr.no>
+ Another C++ I/O streams interface
+
+iostream3/ by Ludwig Schwardt <schwardt@sun.ac.za>
+ and Kevin Ruland <kevin@rodin.wustl.edu>
+ Yet another C++ I/O streams interface
+
+masmx64/ by Gilles Vollant <info@winimage.com>
+ x86 64-bit (AMD64 and Intel EM64t) code for x64 assembler to
+ replace longest_match() and inflate_fast(), also masm x86
+ 64-bits translation of Chris Anderson inflate_fast()
+
+masmx86/ by Gilles Vollant <info@winimage.com>
+ x86 asm code to replace longest_match() and inflate_fast(),
+ for Visual C++ and MASM (32 bits).
+ Based on Brian Raiter (asm686) and Chris Anderson (inflate86)
+
+minizip/ by Gilles Vollant <info@winimage.com>
+ Mini zip and unzip based on zlib
+ Includes Zip64 support by Mathias Svensson <mathias@result42.com>
+ See http://www.winimage.com/zLibDll/minizip.html
+
+pascal/ by Bob Dellaca <bobdl@xtra.co.nz> et al.
+ Support for Pascal
+
+puff/ by Mark Adler <madler@alumni.caltech.edu>
+ Small, low memory usage inflate. Also serves to provide an
+ unambiguous description of the deflate format.
+
+testzlib/ by Gilles Vollant <info@winimage.com>
+ Example of the use of zlib
+
+untgz/ by Pedro A. Aranda Gutierrez <paag@tid.es>
+ A very simple tar.gz file extractor using zlib
+
+vstudio/ by Gilles Vollant <info@winimage.com>
+ Building a minizip-enhanced zlib with Microsoft Visual Studio
+ Includes vc11 from kreuzerkrieg and vc12 from davispuh
diff --git a/contrib/zlib/contrib/ada/buffer_demo.adb b/contrib/zlib/contrib/ada/buffer_demo.adb
new file mode 100644
index 000000000..46b863810
--- /dev/null
+++ b/contrib/zlib/contrib/ada/buffer_demo.adb
@@ -0,0 +1,106 @@
+----------------------------------------------------------------
+-- ZLib for Ada thick binding. --
+-- --
+-- Copyright (C) 2002-2004 Dmitriy Anisimkov --
+-- --
+-- Open source license information is in the zlib.ads file. --
+----------------------------------------------------------------
+--
+-- $Id: buffer_demo.adb,v 1.3 2004/09/06 06:55:35 vagul Exp $
+
+-- This demo program provided by Dr Steve Sangwine <sjs@essex.ac.uk>
+--
+-- Demonstration of a problem with Zlib-Ada (already fixed) when a buffer
+-- of exactly the correct size is used for decompressed data, and the last
+-- few bytes passed in to Zlib are checksum bytes.
+
+-- This program compresses a string of text, and then decompresses the
+-- compressed text into a buffer of the same size as the original text.
+
+with Ada.Streams; use Ada.Streams;
+with Ada.Text_IO;
+
+with ZLib; use ZLib;
+
+procedure Buffer_Demo is
+ EOL : Character renames ASCII.LF;
+ Text : constant String
+ := "Four score and seven years ago our fathers brought forth," & EOL &
+ "upon this continent, a new nation, conceived in liberty," & EOL &
+ "and dedicated to the proposition that `all men are created equal'.";
+
+ Source : Stream_Element_Array (1 .. Text'Length);
+ for Source'Address use Text'Address;
+
+begin
+ Ada.Text_IO.Put (Text);
+ Ada.Text_IO.New_Line;
+ Ada.Text_IO.Put_Line
+ ("Uncompressed size : " & Positive'Image (Text'Length) & " bytes");
+
+ declare
+ Compressed_Data : Stream_Element_Array (1 .. Text'Length);
+ L : Stream_Element_Offset;
+ begin
+ Compress : declare
+ Compressor : Filter_Type;
+ I : Stream_Element_Offset;
+ begin
+ Deflate_Init (Compressor);
+
+ -- Compress the whole of T at once.
+
+ Translate (Compressor, Source, I, Compressed_Data, L, Finish);
+ pragma Assert (I = Source'Last);
+
+ Close (Compressor);
+
+ Ada.Text_IO.Put_Line
+ ("Compressed size : "
+ & Stream_Element_Offset'Image (L) & " bytes");
+ end Compress;
+
+ -- Now we decompress the data, passing short blocks of data to Zlib
+ -- (because this demonstrates the problem - the last block passed will
+ -- contain checksum information and there will be no output, only a
+ -- check inside Zlib that the checksum is correct).
+
+ Decompress : declare
+ Decompressor : Filter_Type;
+
+ Uncompressed_Data : Stream_Element_Array (1 .. Text'Length);
+
+ Block_Size : constant := 4;
+ -- This makes sure that the last block contains
+ -- only Adler checksum data.
+
+ P : Stream_Element_Offset := Compressed_Data'First - 1;
+ O : Stream_Element_Offset;
+ begin
+ Inflate_Init (Decompressor);
+
+ loop
+ Translate
+ (Decompressor,
+ Compressed_Data
+ (P + 1 .. Stream_Element_Offset'Min (P + Block_Size, L)),
+ P,
+ Uncompressed_Data
+ (Total_Out (Decompressor) + 1 .. Uncompressed_Data'Last),
+ O,
+ No_Flush);
+
+ Ada.Text_IO.Put_Line
+ ("Total in : " & Count'Image (Total_In (Decompressor)) &
+ ", out : " & Count'Image (Total_Out (Decompressor)));
+
+ exit when P = L;
+ end loop;
+
+ Ada.Text_IO.New_Line;
+ Ada.Text_IO.Put_Line
+ ("Decompressed text matches original text : "
+ & Boolean'Image (Uncompressed_Data = Source));
+ end Decompress;
+ end;
+end Buffer_Demo;
diff --git a/contrib/zlib/contrib/ada/mtest.adb b/contrib/zlib/contrib/ada/mtest.adb
new file mode 100644
index 000000000..c4dfd080f
--- /dev/null
+++ b/contrib/zlib/contrib/ada/mtest.adb
@@ -0,0 +1,156 @@
+----------------------------------------------------------------
+-- ZLib for Ada thick binding. --
+-- --
+-- Copyright (C) 2002-2003 Dmitriy Anisimkov --
+-- --
+-- Open source license information is in the zlib.ads file. --
+----------------------------------------------------------------
+-- Continuous test for ZLib multithreading. If the test would fail
+-- we should provide thread safe allocation routines for the Z_Stream.
+--
+-- $Id: mtest.adb,v 1.4 2004/07/23 07:49:54 vagul Exp $
+
+with ZLib;
+with Ada.Streams;
+with Ada.Numerics.Discrete_Random;
+with Ada.Text_IO;
+with Ada.Exceptions;
+with Ada.Task_Identification;
+
+procedure MTest is
+ use Ada.Streams;
+ use ZLib;
+
+ Stop : Boolean := False;
+
+ pragma Atomic (Stop);
+
+ subtype Visible_Symbols is Stream_Element range 16#20# .. 16#7E#;
+
+ package Random_Elements is
+ new Ada.Numerics.Discrete_Random (Visible_Symbols);
+
+ task type Test_Task;
+
+ task body Test_Task is
+ Buffer : Stream_Element_Array (1 .. 100_000);
+ Gen : Random_Elements.Generator;
+
+ Buffer_First : Stream_Element_Offset;
+ Compare_First : Stream_Element_Offset;
+
+ Deflate : Filter_Type;
+ Inflate : Filter_Type;
+
+ procedure Further (Item : in Stream_Element_Array);
+
+ procedure Read_Buffer
+ (Item : out Ada.Streams.Stream_Element_Array;
+ Last : out Ada.Streams.Stream_Element_Offset);
+
+ -------------
+ -- Further --
+ -------------
+
+ procedure Further (Item : in Stream_Element_Array) is
+
+ procedure Compare (Item : in Stream_Element_Array);
+
+ -------------
+ -- Compare --
+ -------------
+
+ procedure Compare (Item : in Stream_Element_Array) is
+ Next_First : Stream_Element_Offset := Compare_First + Item'Length;
+ begin
+ if Buffer (Compare_First .. Next_First - 1) /= Item then
+ raise Program_Error;
+ end if;
+
+ Compare_First := Next_First;
+ end Compare;
+
+ procedure Compare_Write is new ZLib.Write (Write => Compare);
+ begin
+ Compare_Write (Inflate, Item, No_Flush);
+ end Further;
+
+ -----------------
+ -- Read_Buffer --
+ -----------------
+
+ procedure Read_Buffer
+ (Item : out Ada.Streams.Stream_Element_Array;
+ Last : out Ada.Streams.Stream_Element_Offset)
+ is
+ Buff_Diff : Stream_Element_Offset := Buffer'Last - Buffer_First;
+ Next_First : Stream_Element_Offset;
+ begin
+ if Item'Length <= Buff_Diff then
+ Last := Item'Last;
+
+ Next_First := Buffer_First + Item'Length;
+
+ Item := Buffer (Buffer_First .. Next_First - 1);
+
+ Buffer_First := Next_First;
+ else
+ Last := Item'First + Buff_Diff;
+ Item (Item'First .. Last) := Buffer (Buffer_First .. Buffer'Last);
+ Buffer_First := Buffer'Last + 1;
+ end if;
+ end Read_Buffer;
+
+ procedure Translate is new Generic_Translate
+ (Data_In => Read_Buffer,
+ Data_Out => Further);
+
+ begin
+ Random_Elements.Reset (Gen);
+
+ Buffer := (others => 20);
+
+ Main : loop
+ for J in Buffer'Range loop
+ Buffer (J) := Random_Elements.Random (Gen);
+
+ Deflate_Init (Deflate);
+ Inflate_Init (Inflate);
+
+ Buffer_First := Buffer'First;
+ Compare_First := Buffer'First;
+
+ Translate (Deflate);
+
+ if Compare_First /= Buffer'Last + 1 then
+ raise Program_Error;
+ end if;
+
+ Ada.Text_IO.Put_Line
+ (Ada.Task_Identification.Image
+ (Ada.Task_Identification.Current_Task)
+ & Stream_Element_Offset'Image (J)
+ & ZLib.Count'Image (Total_Out (Deflate)));
+
+ Close (Deflate);
+ Close (Inflate);
+
+ exit Main when Stop;
+ end loop;
+ end loop Main;
+ exception
+ when E : others =>
+ Ada.Text_IO.Put_Line (Ada.Exceptions.Exception_Information (E));
+ Stop := True;
+ end Test_Task;
+
+ Test : array (1 .. 4) of Test_Task;
+
+ pragma Unreferenced (Test);
+
+ Dummy : Character;
+
+begin
+ Ada.Text_IO.Get_Immediate (Dummy);
+ Stop := True;
+end MTest;
diff --git a/contrib/zlib/contrib/ada/read.adb b/contrib/zlib/contrib/ada/read.adb
new file mode 100644
index 000000000..1f2efbfeb
--- /dev/null
+++ b/contrib/zlib/contrib/ada/read.adb
@@ -0,0 +1,156 @@
+----------------------------------------------------------------
+-- ZLib for Ada thick binding. --
+-- --
+-- Copyright (C) 2002-2003 Dmitriy Anisimkov --
+-- --
+-- Open source license information is in the zlib.ads file. --
+----------------------------------------------------------------
+
+-- $Id: read.adb,v 1.8 2004/05/31 10:53:40 vagul Exp $
+
+-- Test/demo program for the generic read interface.
+
+with Ada.Numerics.Discrete_Random;
+with Ada.Streams;
+with Ada.Text_IO;
+
+with ZLib;
+
+procedure Read is
+
+ use Ada.Streams;
+
+ ------------------------------------
+ -- Test configuration parameters --
+ ------------------------------------
+
+ File_Size : Stream_Element_Offset := 100_000;
+
+ Continuous : constant Boolean := False;
+ -- If this constant is True, the test would be repeated again and again,
+ -- with increment File_Size for every iteration.
+
+ Header : constant ZLib.Header_Type := ZLib.Default;
+ -- Do not use Header other than Default in ZLib versions 1.1.4 and older.
+
+ Init_Random : constant := 8;
+ -- We are using the same random sequence, in case of we catch bug,
+ -- so we would be able to reproduce it.
+
+ -- End --
+
+ Pack_Size : Stream_Element_Offset;
+ Offset : Stream_Element_Offset;
+
+ Filter : ZLib.Filter_Type;
+
+ subtype Visible_Symbols
+ is Stream_Element range 16#20# .. 16#7E#;
+
+ package Random_Elements is new
+ Ada.Numerics.Discrete_Random (Visible_Symbols);
+
+ Gen : Random_Elements.Generator;
+ Period : constant Stream_Element_Offset := 200;
+ -- Period constant variable for random generator not to be very random.
+ -- Bigger period, harder random.
+
+ Read_Buffer : Stream_Element_Array (1 .. 2048);
+ Read_First : Stream_Element_Offset;
+ Read_Last : Stream_Element_Offset;
+
+ procedure Reset;
+
+ procedure Read
+ (Item : out Stream_Element_Array;
+ Last : out Stream_Element_Offset);
+ -- this procedure is for generic instantiation of
+ -- ZLib.Read
+ -- reading data from the File_In.
+
+ procedure Read is new ZLib.Read
+ (Read,
+ Read_Buffer,
+ Rest_First => Read_First,
+ Rest_Last => Read_Last);
+
+ ----------
+ -- Read --
+ ----------
+
+ procedure Read
+ (Item : out Stream_Element_Array;
+ Last : out Stream_Element_Offset) is
+ begin
+ Last := Stream_Element_Offset'Min
+ (Item'Last,
+ Item'First + File_Size - Offset);
+
+ for J in Item'First .. Last loop
+ if J < Item'First + Period then
+ Item (J) := Random_Elements.Random (Gen);
+ else
+ Item (J) := Item (J - Period);
+ end if;
+
+ Offset := Offset + 1;
+ end loop;
+ end Read;
+
+ -----------
+ -- Reset --
+ -----------
+
+ procedure Reset is
+ begin
+ Random_Elements.Reset (Gen, Init_Random);
+ Pack_Size := 0;
+ Offset := 1;
+ Read_First := Read_Buffer'Last + 1;
+ Read_Last := Read_Buffer'Last;
+ end Reset;
+
+begin
+ Ada.Text_IO.Put_Line ("ZLib " & ZLib.Version);
+
+ loop
+ for Level in ZLib.Compression_Level'Range loop
+
+ Ada.Text_IO.Put ("Level ="
+ & ZLib.Compression_Level'Image (Level));
+
+ -- Deflate using generic instantiation.
+
+ ZLib.Deflate_Init
+ (Filter,
+ Level,
+ Header => Header);
+
+ Reset;
+
+ Ada.Text_IO.Put
+ (Stream_Element_Offset'Image (File_Size) & " ->");
+
+ loop
+ declare
+ Buffer : Stream_Element_Array (1 .. 1024);
+ Last : Stream_Element_Offset;
+ begin
+ Read (Filter, Buffer, Last);
+
+ Pack_Size := Pack_Size + Last - Buffer'First + 1;
+
+ exit when Last < Buffer'Last;
+ end;
+ end loop;
+
+ Ada.Text_IO.Put_Line (Stream_Element_Offset'Image (Pack_Size));
+
+ ZLib.Close (Filter);
+ end loop;
+
+ exit when not Continuous;
+
+ File_Size := File_Size + 1;
+ end loop;
+end Read;
diff --git a/contrib/zlib/contrib/ada/readme.txt b/contrib/zlib/contrib/ada/readme.txt
new file mode 100644
index 000000000..ce4d2cadf
--- /dev/null
+++ b/contrib/zlib/contrib/ada/readme.txt
@@ -0,0 +1,65 @@
+ ZLib for Ada thick binding (ZLib.Ada)
+ Release 1.3
+
+ZLib.Ada is a thick binding interface to the popular ZLib data
+compression library, available at http://www.gzip.org/zlib/.
+It provides Ada-style access to the ZLib C library.
+
+
+ Here are the main changes since ZLib.Ada 1.2:
+
+- Attension: ZLib.Read generic routine have a initialization requirement
+ for Read_Last parameter now. It is a bit incompartible with previous version,
+ but extends functionality, we could use new parameters Allow_Read_Some and
+ Flush now.
+
+- Added Is_Open routines to ZLib and ZLib.Streams packages.
+
+- Add pragma Assert to check Stream_Element is 8 bit.
+
+- Fix extraction to buffer with exact known decompressed size. Error reported by
+ Steve Sangwine.
+
+- Fix definition of ULong (changed to unsigned_long), fix regression on 64 bits
+ computers. Patch provided by Pascal Obry.
+
+- Add Status_Error exception definition.
+
+- Add pragma Assertion that Ada.Streams.Stream_Element size is 8 bit.
+
+
+ How to build ZLib.Ada under GNAT
+
+You should have the ZLib library already build on your computer, before
+building ZLib.Ada. Make the directory of ZLib.Ada sources current and
+issue the command:
+
+ gnatmake test -largs -L<directory where libz.a is> -lz
+
+Or use the GNAT project file build for GNAT 3.15 or later:
+
+ gnatmake -Pzlib.gpr -L<directory where libz.a is>
+
+
+ How to build ZLib.Ada under Aonix ObjectAda for Win32 7.2.2
+
+1. Make a project with all *.ads and *.adb files from the distribution.
+2. Build the libz.a library from the ZLib C sources.
+3. Rename libz.a to z.lib.
+4. Add the library z.lib to the project.
+5. Add the libc.lib library from the ObjectAda distribution to the project.
+6. Build the executable using test.adb as a main procedure.
+
+
+ How to use ZLib.Ada
+
+The source files test.adb and read.adb are small demo programs that show
+the main functionality of ZLib.Ada.
+
+The routines from the package specifications are commented.
+
+
+Homepage: http://zlib-ada.sourceforge.net/
+Author: Dmitriy Anisimkov <anisimkov@yahoo.com>
+
+Contributors: Pascal Obry <pascal@obry.org>, Steve Sangwine <sjs@essex.ac.uk>
diff --git a/contrib/zlib/contrib/ada/test.adb b/contrib/zlib/contrib/ada/test.adb
new file mode 100644
index 000000000..90773acfa
--- /dev/null
+++ b/contrib/zlib/contrib/ada/test.adb
@@ -0,0 +1,463 @@
+----------------------------------------------------------------
+-- ZLib for Ada thick binding. --
+-- --
+-- Copyright (C) 2002-2003 Dmitriy Anisimkov --
+-- --
+-- Open source license information is in the zlib.ads file. --
+----------------------------------------------------------------
+
+-- $Id: test.adb,v 1.17 2003/08/12 12:13:30 vagul Exp $
+
+-- The program has a few aims.
+-- 1. Test ZLib.Ada95 thick binding functionality.
+-- 2. Show the example of use main functionality of the ZLib.Ada95 binding.
+-- 3. Build this program automatically compile all ZLib.Ada95 packages under
+-- GNAT Ada95 compiler.
+
+with ZLib.Streams;
+with Ada.Streams.Stream_IO;
+with Ada.Numerics.Discrete_Random;
+
+with Ada.Text_IO;
+
+with Ada.Calendar;
+
+procedure Test is
+
+ use Ada.Streams;
+ use Stream_IO;
+
+ ------------------------------------
+ -- Test configuration parameters --
+ ------------------------------------
+
+ File_Size : Count := 100_000;
+ Continuous : constant Boolean := False;
+
+ Header : constant ZLib.Header_Type := ZLib.Default;
+ -- ZLib.None;
+ -- ZLib.Auto;
+ -- ZLib.GZip;
+ -- Do not use Header other then Default in ZLib versions 1.1.4
+ -- and older.
+
+ Strategy : constant ZLib.Strategy_Type := ZLib.Default_Strategy;
+ Init_Random : constant := 10;
+
+ -- End --
+
+ In_File_Name : constant String := "testzlib.in";
+ -- Name of the input file
+
+ Z_File_Name : constant String := "testzlib.zlb";
+ -- Name of the compressed file.
+
+ Out_File_Name : constant String := "testzlib.out";
+ -- Name of the decompressed file.
+
+ File_In : File_Type;
+ File_Out : File_Type;
+ File_Back : File_Type;
+ File_Z : ZLib.Streams.Stream_Type;
+
+ Filter : ZLib.Filter_Type;
+
+ Time_Stamp : Ada.Calendar.Time;
+
+ procedure Generate_File;
+ -- Generate file of spetsified size with some random data.
+ -- The random data is repeatable, for the good compression.
+
+ procedure Compare_Streams
+ (Left, Right : in out Root_Stream_Type'Class);
+ -- The procedure compearing data in 2 streams.
+ -- It is for compare data before and after compression/decompression.
+
+ procedure Compare_Files (Left, Right : String);
+ -- Compare files. Based on the Compare_Streams.
+
+ procedure Copy_Streams
+ (Source, Target : in out Root_Stream_Type'Class;
+ Buffer_Size : in Stream_Element_Offset := 1024);
+ -- Copying data from one stream to another. It is for test stream
+ -- interface of the library.
+
+ procedure Data_In
+ (Item : out Stream_Element_Array;
+ Last : out Stream_Element_Offset);
+ -- this procedure is for generic instantiation of
+ -- ZLib.Generic_Translate.
+ -- reading data from the File_In.
+
+ procedure Data_Out (Item : in Stream_Element_Array);
+ -- this procedure is for generic instantiation of
+ -- ZLib.Generic_Translate.
+ -- writing data to the File_Out.
+
+ procedure Stamp;
+ -- Store the timestamp to the local variable.
+
+ procedure Print_Statistic (Msg : String; Data_Size : ZLib.Count);
+ -- Print the time statistic with the message.
+
+ procedure Translate is new ZLib.Generic_Translate
+ (Data_In => Data_In,
+ Data_Out => Data_Out);
+ -- This procedure is moving data from File_In to File_Out
+ -- with compression or decompression, depend on initialization of
+ -- Filter parameter.
+
+ -------------------
+ -- Compare_Files --
+ -------------------
+
+ procedure Compare_Files (Left, Right : String) is
+ Left_File, Right_File : File_Type;
+ begin
+ Open (Left_File, In_File, Left);
+ Open (Right_File, In_File, Right);
+ Compare_Streams (Stream (Left_File).all, Stream (Right_File).all);
+ Close (Left_File);
+ Close (Right_File);
+ end Compare_Files;
+
+ ---------------------
+ -- Compare_Streams --
+ ---------------------
+
+ procedure Compare_Streams
+ (Left, Right : in out Ada.Streams.Root_Stream_Type'Class)
+ is
+ Left_Buffer, Right_Buffer : Stream_Element_Array (0 .. 16#FFF#);
+ Left_Last, Right_Last : Stream_Element_Offset;
+ begin
+ loop
+ Read (Left, Left_Buffer, Left_Last);
+ Read (Right, Right_Buffer, Right_Last);
+
+ if Left_Last /= Right_Last then
+ Ada.Text_IO.Put_Line ("Compare error :"
+ & Stream_Element_Offset'Image (Left_Last)
+ & " /= "
+ & Stream_Element_Offset'Image (Right_Last));
+
+ raise Constraint_Error;
+
+ elsif Left_Buffer (0 .. Left_Last)
+ /= Right_Buffer (0 .. Right_Last)
+ then
+ Ada.Text_IO.Put_Line ("ERROR: IN and OUT files is not equal.");
+ raise Constraint_Error;
+
+ end if;
+
+ exit when Left_Last < Left_Buffer'Last;
+ end loop;
+ end Compare_Streams;
+
+ ------------------
+ -- Copy_Streams --
+ ------------------
+
+ procedure Copy_Streams
+ (Source, Target : in out Ada.Streams.Root_Stream_Type'Class;
+ Buffer_Size : in Stream_Element_Offset := 1024)
+ is
+ Buffer : Stream_Element_Array (1 .. Buffer_Size);
+ Last : Stream_Element_Offset;
+ begin
+ loop
+ Read (Source, Buffer, Last);
+ Write (Target, Buffer (1 .. Last));
+
+ exit when Last < Buffer'Last;
+ end loop;
+ end Copy_Streams;
+
+ -------------
+ -- Data_In --
+ -------------
+
+ procedure Data_In
+ (Item : out Stream_Element_Array;
+ Last : out Stream_Element_Offset) is
+ begin
+ Read (File_In, Item, Last);
+ end Data_In;
+
+ --------------
+ -- Data_Out --
+ --------------
+
+ procedure Data_Out (Item : in Stream_Element_Array) is
+ begin
+ Write (File_Out, Item);
+ end Data_Out;
+
+ -------------------
+ -- Generate_File --
+ -------------------
+
+ procedure Generate_File is
+ subtype Visible_Symbols is Stream_Element range 16#20# .. 16#7E#;
+
+ package Random_Elements is
+ new Ada.Numerics.Discrete_Random (Visible_Symbols);
+
+ Gen : Random_Elements.Generator;
+ Buffer : Stream_Element_Array := (1 .. 77 => 16#20#) & 10;
+
+ Buffer_Count : constant Count := File_Size / Buffer'Length;
+ -- Number of same buffers in the packet.
+
+ Density : constant Count := 30; -- from 0 to Buffer'Length - 2;
+
+ procedure Fill_Buffer (J, D : in Count);
+ -- Change the part of the buffer.
+
+ -----------------
+ -- Fill_Buffer --
+ -----------------
+
+ procedure Fill_Buffer (J, D : in Count) is
+ begin
+ for K in 0 .. D loop
+ Buffer
+ (Stream_Element_Offset ((J + K) mod (Buffer'Length - 1) + 1))
+ := Random_Elements.Random (Gen);
+
+ end loop;
+ end Fill_Buffer;
+
+ begin
+ Random_Elements.Reset (Gen, Init_Random);
+
+ Create (File_In, Out_File, In_File_Name);
+
+ Fill_Buffer (1, Buffer'Length - 2);
+
+ for J in 1 .. Buffer_Count loop
+ Write (File_In, Buffer);
+
+ Fill_Buffer (J, Density);
+ end loop;
+
+ -- fill remain size.
+
+ Write
+ (File_In,
+ Buffer
+ (1 .. Stream_Element_Offset
+ (File_Size - Buffer'Length * Buffer_Count)));
+
+ Flush (File_In);
+ Close (File_In);
+ end Generate_File;
+
+ ---------------------
+ -- Print_Statistic --
+ ---------------------
+
+ procedure Print_Statistic (Msg : String; Data_Size : ZLib.Count) is
+ use Ada.Calendar;
+ use Ada.Text_IO;
+
+ package Count_IO is new Integer_IO (ZLib.Count);
+
+ Curr_Dur : Duration := Clock - Time_Stamp;
+ begin
+ Put (Msg);
+
+ Set_Col (20);
+ Ada.Text_IO.Put ("size =");
+
+ Count_IO.Put
+ (Data_Size,
+ Width => Stream_IO.Count'Image (File_Size)'Length);
+
+ Put_Line (" duration =" & Duration'Image (Curr_Dur));
+ end Print_Statistic;
+
+ -----------
+ -- Stamp --
+ -----------
+
+ procedure Stamp is
+ begin
+ Time_Stamp := Ada.Calendar.Clock;
+ end Stamp;
+
+begin
+ Ada.Text_IO.Put_Line ("ZLib " & ZLib.Version);
+
+ loop
+ Generate_File;
+
+ for Level in ZLib.Compression_Level'Range loop
+
+ Ada.Text_IO.Put_Line ("Level ="
+ & ZLib.Compression_Level'Image (Level));
+
+ -- Test generic interface.
+ Open (File_In, In_File, In_File_Name);
+ Create (File_Out, Out_File, Z_File_Name);
+
+ Stamp;
+
+ -- Deflate using generic instantiation.
+
+ ZLib.Deflate_Init
+ (Filter => Filter,
+ Level => Level,
+ Strategy => Strategy,
+ Header => Header);
+
+ Translate (Filter);
+ Print_Statistic ("Generic compress", ZLib.Total_Out (Filter));
+ ZLib.Close (Filter);
+
+ Close (File_In);
+ Close (File_Out);
+
+ Open (File_In, In_File, Z_File_Name);
+ Create (File_Out, Out_File, Out_File_Name);
+
+ Stamp;
+
+ -- Inflate using generic instantiation.
+
+ ZLib.Inflate_Init (Filter, Header => Header);
+
+ Translate (Filter);
+ Print_Statistic ("Generic decompress", ZLib.Total_Out (Filter));
+
+ ZLib.Close (Filter);
+
+ Close (File_In);
+ Close (File_Out);
+
+ Compare_Files (In_File_Name, Out_File_Name);
+
+ -- Test stream interface.
+
+ -- Compress to the back stream.
+
+ Open (File_In, In_File, In_File_Name);
+ Create (File_Back, Out_File, Z_File_Name);
+
+ Stamp;
+
+ ZLib.Streams.Create
+ (Stream => File_Z,
+ Mode => ZLib.Streams.Out_Stream,
+ Back => ZLib.Streams.Stream_Access
+ (Stream (File_Back)),
+ Back_Compressed => True,
+ Level => Level,
+ Strategy => Strategy,
+ Header => Header);
+
+ Copy_Streams
+ (Source => Stream (File_In).all,
+ Target => File_Z);
+
+ -- Flushing internal buffers to the back stream.
+
+ ZLib.Streams.Flush (File_Z, ZLib.Finish);
+
+ Print_Statistic ("Write compress",
+ ZLib.Streams.Write_Total_Out (File_Z));
+
+ ZLib.Streams.Close (File_Z);
+
+ Close (File_In);
+ Close (File_Back);
+
+ -- Compare reading from original file and from
+ -- decompression stream.
+
+ Open (File_In, In_File, In_File_Name);
+ Open (File_Back, In_File, Z_File_Name);
+
+ ZLib.Streams.Create
+ (Stream => File_Z,
+ Mode => ZLib.Streams.In_Stream,
+ Back => ZLib.Streams.Stream_Access
+ (Stream (File_Back)),
+ Back_Compressed => True,
+ Header => Header);
+
+ Stamp;
+ Compare_Streams (Stream (File_In).all, File_Z);
+
+ Print_Statistic ("Read decompress",
+ ZLib.Streams.Read_Total_Out (File_Z));
+
+ ZLib.Streams.Close (File_Z);
+ Close (File_In);
+ Close (File_Back);
+
+ -- Compress by reading from compression stream.
+
+ Open (File_Back, In_File, In_File_Name);
+ Create (File_Out, Out_File, Z_File_Name);
+
+ ZLib.Streams.Create
+ (Stream => File_Z,
+ Mode => ZLib.Streams.In_Stream,
+ Back => ZLib.Streams.Stream_Access
+ (Stream (File_Back)),
+ Back_Compressed => False,
+ Level => Level,
+ Strategy => Strategy,
+ Header => Header);
+
+ Stamp;
+ Copy_Streams
+ (Source => File_Z,
+ Target => Stream (File_Out).all);
+
+ Print_Statistic ("Read compress",
+ ZLib.Streams.Read_Total_Out (File_Z));
+
+ ZLib.Streams.Close (File_Z);
+
+ Close (File_Out);
+ Close (File_Back);
+
+ -- Decompress to decompression stream.
+
+ Open (File_In, In_File, Z_File_Name);
+ Create (File_Back, Out_File, Out_File_Name);
+
+ ZLib.Streams.Create
+ (Stream => File_Z,
+ Mode => ZLib.Streams.Out_Stream,
+ Back => ZLib.Streams.Stream_Access
+ (Stream (File_Back)),
+ Back_Compressed => False,
+ Header => Header);
+
+ Stamp;
+
+ Copy_Streams
+ (Source => Stream (File_In).all,
+ Target => File_Z);
+
+ Print_Statistic ("Write decompress",
+ ZLib.Streams.Write_Total_Out (File_Z));
+
+ ZLib.Streams.Close (File_Z);
+ Close (File_In);
+ Close (File_Back);
+
+ Compare_Files (In_File_Name, Out_File_Name);
+ end loop;
+
+ Ada.Text_IO.Put_Line (Count'Image (File_Size) & " Ok.");
+
+ exit when not Continuous;
+
+ File_Size := File_Size + 1;
+ end loop;
+end Test;
diff --git a/contrib/zlib/contrib/ada/zlib-streams.adb b/contrib/zlib/contrib/ada/zlib-streams.adb
new file mode 100644
index 000000000..b6497bae2
--- /dev/null
+++ b/contrib/zlib/contrib/ada/zlib-streams.adb
@@ -0,0 +1,225 @@
+----------------------------------------------------------------
+-- ZLib for Ada thick binding. --
+-- --
+-- Copyright (C) 2002-2003 Dmitriy Anisimkov --
+-- --
+-- Open source license information is in the zlib.ads file. --
+----------------------------------------------------------------
+
+-- $Id: zlib-streams.adb,v 1.10 2004/05/31 10:53:40 vagul Exp $
+
+with Ada.Unchecked_Deallocation;
+
+package body ZLib.Streams is
+
+ -----------
+ -- Close --
+ -----------
+
+ procedure Close (Stream : in out Stream_Type) is
+ procedure Free is new Ada.Unchecked_Deallocation
+ (Stream_Element_Array, Buffer_Access);
+ begin
+ if Stream.Mode = Out_Stream or Stream.Mode = Duplex then
+ -- We should flush the data written by the writer.
+
+ Flush (Stream, Finish);
+
+ Close (Stream.Writer);
+ end if;
+
+ if Stream.Mode = In_Stream or Stream.Mode = Duplex then
+ Close (Stream.Reader);
+ Free (Stream.Buffer);
+ end if;
+ end Close;
+
+ ------------
+ -- Create --
+ ------------
+
+ procedure Create
+ (Stream : out Stream_Type;
+ Mode : in Stream_Mode;
+ Back : in Stream_Access;
+ Back_Compressed : in Boolean;
+ Level : in Compression_Level := Default_Compression;
+ Strategy : in Strategy_Type := Default_Strategy;
+ Header : in Header_Type := Default;
+ Read_Buffer_Size : in Ada.Streams.Stream_Element_Offset
+ := Default_Buffer_Size;
+ Write_Buffer_Size : in Ada.Streams.Stream_Element_Offset
+ := Default_Buffer_Size)
+ is
+
+ subtype Buffer_Subtype is Stream_Element_Array (1 .. Read_Buffer_Size);
+
+ procedure Init_Filter
+ (Filter : in out Filter_Type;
+ Compress : in Boolean);
+
+ -----------------
+ -- Init_Filter --
+ -----------------
+
+ procedure Init_Filter
+ (Filter : in out Filter_Type;
+ Compress : in Boolean) is
+ begin
+ if Compress then
+ Deflate_Init
+ (Filter, Level, Strategy, Header => Header);
+ else
+ Inflate_Init (Filter, Header => Header);
+ end if;
+ end Init_Filter;
+
+ begin
+ Stream.Back := Back;
+ Stream.Mode := Mode;
+
+ if Mode = Out_Stream or Mode = Duplex then
+ Init_Filter (Stream.Writer, Back_Compressed);
+ Stream.Buffer_Size := Write_Buffer_Size;
+ else
+ Stream.Buffer_Size := 0;
+ end if;
+
+ if Mode = In_Stream or Mode = Duplex then
+ Init_Filter (Stream.Reader, not Back_Compressed);
+
+ Stream.Buffer := new Buffer_Subtype;
+ Stream.Rest_First := Stream.Buffer'Last + 1;
+ Stream.Rest_Last := Stream.Buffer'Last;
+ end if;
+ end Create;
+
+ -----------
+ -- Flush --
+ -----------
+
+ procedure Flush
+ (Stream : in out Stream_Type;
+ Mode : in Flush_Mode := Sync_Flush)
+ is
+ Buffer : Stream_Element_Array (1 .. Stream.Buffer_Size);
+ Last : Stream_Element_Offset;
+ begin
+ loop
+ Flush (Stream.Writer, Buffer, Last, Mode);
+
+ Ada.Streams.Write (Stream.Back.all, Buffer (1 .. Last));
+
+ exit when Last < Buffer'Last;
+ end loop;
+ end Flush;
+
+ -------------
+ -- Is_Open --
+ -------------
+
+ function Is_Open (Stream : Stream_Type) return Boolean is
+ begin
+ return Is_Open (Stream.Reader) or else Is_Open (Stream.Writer);
+ end Is_Open;
+
+ ----------
+ -- Read --
+ ----------
+
+ procedure Read
+ (Stream : in out Stream_Type;
+ Item : out Stream_Element_Array;
+ Last : out Stream_Element_Offset)
+ is
+
+ procedure Read
+ (Item : out Stream_Element_Array;
+ Last : out Stream_Element_Offset);
+
+ ----------
+ -- Read --
+ ----------
+
+ procedure Read
+ (Item : out Stream_Element_Array;
+ Last : out Stream_Element_Offset) is
+ begin
+ Ada.Streams.Read (Stream.Back.all, Item, Last);
+ end Read;
+
+ procedure Read is new ZLib.Read
+ (Read => Read,
+ Buffer => Stream.Buffer.all,
+ Rest_First => Stream.Rest_First,
+ Rest_Last => Stream.Rest_Last);
+
+ begin
+ Read (Stream.Reader, Item, Last);
+ end Read;
+
+ -------------------
+ -- Read_Total_In --
+ -------------------
+
+ function Read_Total_In (Stream : in Stream_Type) return Count is
+ begin
+ return Total_In (Stream.Reader);
+ end Read_Total_In;
+
+ --------------------
+ -- Read_Total_Out --
+ --------------------
+
+ function Read_Total_Out (Stream : in Stream_Type) return Count is
+ begin
+ return Total_Out (Stream.Reader);
+ end Read_Total_Out;
+
+ -----------
+ -- Write --
+ -----------
+
+ procedure Write
+ (Stream : in out Stream_Type;
+ Item : in Stream_Element_Array)
+ is
+
+ procedure Write (Item : in Stream_Element_Array);
+
+ -----------
+ -- Write --
+ -----------
+
+ procedure Write (Item : in Stream_Element_Array) is
+ begin
+ Ada.Streams.Write (Stream.Back.all, Item);
+ end Write;
+
+ procedure Write is new ZLib.Write
+ (Write => Write,
+ Buffer_Size => Stream.Buffer_Size);
+
+ begin
+ Write (Stream.Writer, Item, No_Flush);
+ end Write;
+
+ --------------------
+ -- Write_Total_In --
+ --------------------
+
+ function Write_Total_In (Stream : in Stream_Type) return Count is
+ begin
+ return Total_In (Stream.Writer);
+ end Write_Total_In;
+
+ ---------------------
+ -- Write_Total_Out --
+ ---------------------
+
+ function Write_Total_Out (Stream : in Stream_Type) return Count is
+ begin
+ return Total_Out (Stream.Writer);
+ end Write_Total_Out;
+
+end ZLib.Streams;
diff --git a/contrib/zlib/contrib/ada/zlib-streams.ads b/contrib/zlib/contrib/ada/zlib-streams.ads
new file mode 100644
index 000000000..8e26cd450
--- /dev/null
+++ b/contrib/zlib/contrib/ada/zlib-streams.ads
@@ -0,0 +1,114 @@
+----------------------------------------------------------------
+-- ZLib for Ada thick binding. --
+-- --
+-- Copyright (C) 2002-2003 Dmitriy Anisimkov --
+-- --
+-- Open source license information is in the zlib.ads file. --
+----------------------------------------------------------------
+
+-- $Id: zlib-streams.ads,v 1.12 2004/05/31 10:53:40 vagul Exp $
+
+package ZLib.Streams is
+
+ type Stream_Mode is (In_Stream, Out_Stream, Duplex);
+
+ type Stream_Access is access all Ada.Streams.Root_Stream_Type'Class;
+
+ type Stream_Type is
+ new Ada.Streams.Root_Stream_Type with private;
+
+ procedure Read
+ (Stream : in out Stream_Type;
+ Item : out Ada.Streams.Stream_Element_Array;
+ Last : out Ada.Streams.Stream_Element_Offset);
+
+ procedure Write
+ (Stream : in out Stream_Type;
+ Item : in Ada.Streams.Stream_Element_Array);
+
+ procedure Flush
+ (Stream : in out Stream_Type;
+ Mode : in Flush_Mode := Sync_Flush);
+ -- Flush the written data to the back stream,
+ -- all data placed to the compressor is flushing to the Back stream.
+ -- Should not be used until necessary, because it is decreasing
+ -- compression.
+
+ function Read_Total_In (Stream : in Stream_Type) return Count;
+ pragma Inline (Read_Total_In);
+ -- Return total number of bytes read from back stream so far.
+
+ function Read_Total_Out (Stream : in Stream_Type) return Count;
+ pragma Inline (Read_Total_Out);
+ -- Return total number of bytes read so far.
+
+ function Write_Total_In (Stream : in Stream_Type) return Count;
+ pragma Inline (Write_Total_In);
+ -- Return total number of bytes written so far.
+
+ function Write_Total_Out (Stream : in Stream_Type) return Count;
+ pragma Inline (Write_Total_Out);
+ -- Return total number of bytes written to the back stream.
+
+ procedure Create
+ (Stream : out Stream_Type;
+ Mode : in Stream_Mode;
+ Back : in Stream_Access;
+ Back_Compressed : in Boolean;
+ Level : in Compression_Level := Default_Compression;
+ Strategy : in Strategy_Type := Default_Strategy;
+ Header : in Header_Type := Default;
+ Read_Buffer_Size : in Ada.Streams.Stream_Element_Offset
+ := Default_Buffer_Size;
+ Write_Buffer_Size : in Ada.Streams.Stream_Element_Offset
+ := Default_Buffer_Size);
+ -- Create the Comression/Decompression stream.
+ -- If mode is In_Stream then Write operation is disabled.
+ -- If mode is Out_Stream then Read operation is disabled.
+
+ -- If Back_Compressed is true then
+ -- Data written to the Stream is compressing to the Back stream
+ -- and data read from the Stream is decompressed data from the Back stream.
+
+ -- If Back_Compressed is false then
+ -- Data written to the Stream is decompressing to the Back stream
+ -- and data read from the Stream is compressed data from the Back stream.
+
+ -- !!! When the Need_Header is False ZLib-Ada is using undocumented
+ -- ZLib 1.1.4 functionality to do not create/wait for ZLib headers.
+
+ function Is_Open (Stream : Stream_Type) return Boolean;
+
+ procedure Close (Stream : in out Stream_Type);
+
+private
+
+ use Ada.Streams;
+
+ type Buffer_Access is access all Stream_Element_Array;
+
+ type Stream_Type
+ is new Root_Stream_Type with
+ record
+ Mode : Stream_Mode;
+
+ Buffer : Buffer_Access;
+ Rest_First : Stream_Element_Offset;
+ Rest_Last : Stream_Element_Offset;
+ -- Buffer for Read operation.
+ -- We need to have this buffer in the record
+ -- because not all read data from back stream
+ -- could be processed during the read operation.
+
+ Buffer_Size : Stream_Element_Offset;
+ -- Buffer size for write operation.
+ -- We do not need to have this buffer
+ -- in the record because all data could be
+ -- processed in the write operation.
+
+ Back : Stream_Access;
+ Reader : Filter_Type;
+ Writer : Filter_Type;
+ end record;
+
+end ZLib.Streams;
diff --git a/contrib/zlib/contrib/ada/zlib-thin.adb b/contrib/zlib/contrib/ada/zlib-thin.adb
new file mode 100644
index 000000000..0ca4a7120
--- /dev/null
+++ b/contrib/zlib/contrib/ada/zlib-thin.adb
@@ -0,0 +1,141 @@
+----------------------------------------------------------------
+-- ZLib for Ada thick binding. --
+-- --
+-- Copyright (C) 2002-2003 Dmitriy Anisimkov --
+-- --
+-- Open source license information is in the zlib.ads file. --
+----------------------------------------------------------------
+
+-- $Id: zlib-thin.adb,v 1.8 2003/12/14 18:27:31 vagul Exp $
+
+package body ZLib.Thin is
+
+ ZLIB_VERSION : constant Chars_Ptr := zlibVersion;
+
+ Z_Stream_Size : constant Int := Z_Stream'Size / System.Storage_Unit;
+
+ --------------
+ -- Avail_In --
+ --------------
+
+ function Avail_In (Strm : in Z_Stream) return UInt is
+ begin
+ return Strm.Avail_In;
+ end Avail_In;
+
+ ---------------
+ -- Avail_Out --
+ ---------------
+
+ function Avail_Out (Strm : in Z_Stream) return UInt is
+ begin
+ return Strm.Avail_Out;
+ end Avail_Out;
+
+ ------------------
+ -- Deflate_Init --
+ ------------------
+
+ function Deflate_Init
+ (strm : Z_Streamp;
+ level : Int;
+ method : Int;
+ windowBits : Int;
+ memLevel : Int;
+ strategy : Int)
+ return Int is
+ begin
+ return deflateInit2
+ (strm,
+ level,
+ method,
+ windowBits,
+ memLevel,
+ strategy,
+ ZLIB_VERSION,
+ Z_Stream_Size);
+ end Deflate_Init;
+
+ ------------------
+ -- Inflate_Init --
+ ------------------
+
+ function Inflate_Init (strm : Z_Streamp; windowBits : Int) return Int is
+ begin
+ return inflateInit2 (strm, windowBits, ZLIB_VERSION, Z_Stream_Size);
+ end Inflate_Init;
+
+ ------------------------
+ -- Last_Error_Message --
+ ------------------------
+
+ function Last_Error_Message (Strm : in Z_Stream) return String is
+ use Interfaces.C.Strings;
+ begin
+ if Strm.msg = Null_Ptr then
+ return "";
+ else
+ return Value (Strm.msg);
+ end if;
+ end Last_Error_Message;
+
+ ------------
+ -- Set_In --
+ ------------
+
+ procedure Set_In
+ (Strm : in out Z_Stream;
+ Buffer : in Voidp;
+ Size : in UInt) is
+ begin
+ Strm.Next_In := Buffer;
+ Strm.Avail_In := Size;
+ end Set_In;
+
+ ------------------
+ -- Set_Mem_Func --
+ ------------------
+
+ procedure Set_Mem_Func
+ (Strm : in out Z_Stream;
+ Opaque : in Voidp;
+ Alloc : in alloc_func;
+ Free : in free_func) is
+ begin
+ Strm.opaque := Opaque;
+ Strm.zalloc := Alloc;
+ Strm.zfree := Free;
+ end Set_Mem_Func;
+
+ -------------
+ -- Set_Out --
+ -------------
+
+ procedure Set_Out
+ (Strm : in out Z_Stream;
+ Buffer : in Voidp;
+ Size : in UInt) is
+ begin
+ Strm.Next_Out := Buffer;
+ Strm.Avail_Out := Size;
+ end Set_Out;
+
+ --------------
+ -- Total_In --
+ --------------
+
+ function Total_In (Strm : in Z_Stream) return ULong is
+ begin
+ return Strm.Total_In;
+ end Total_In;
+
+ ---------------
+ -- Total_Out --
+ ---------------
+
+ function Total_Out (Strm : in Z_Stream) return ULong is
+ begin
+ return Strm.Total_Out;
+ end Total_Out;
+
+end ZLib.Thin;
diff --git a/contrib/zlib/contrib/ada/zlib-thin.ads b/contrib/zlib/contrib/ada/zlib-thin.ads
new file mode 100644
index 000000000..810173cff
--- /dev/null
+++ b/contrib/zlib/contrib/ada/zlib-thin.ads
@@ -0,0 +1,450 @@
+----------------------------------------------------------------
+-- ZLib for Ada thick binding. --
+-- --
+-- Copyright (C) 2002-2003 Dmitriy Anisimkov --
+-- --
+-- Open source license information is in the zlib.ads file. --
+----------------------------------------------------------------
+
+-- $Id: zlib-thin.ads,v 1.11 2004/07/23 06:33:11 vagul Exp $
+
+with Interfaces.C.Strings;
+
+with System;
+
+private package ZLib.Thin is
+
+ -- From zconf.h
+
+ MAX_MEM_LEVEL : constant := 9; -- zconf.h:105
+ -- zconf.h:105
+ MAX_WBITS : constant := 15; -- zconf.h:115
+ -- 32K LZ77 window
+ -- zconf.h:115
+ SEEK_SET : constant := 8#0000#; -- zconf.h:244
+ -- Seek from beginning of file.
+ -- zconf.h:244
+ SEEK_CUR : constant := 1; -- zconf.h:245
+ -- Seek from current position.
+ -- zconf.h:245
+ SEEK_END : constant := 2; -- zconf.h:246
+ -- Set file pointer to EOF plus "offset"
+ -- zconf.h:246
+
+ type Byte is new Interfaces.C.unsigned_char; -- 8 bits
+ -- zconf.h:214
+ type UInt is new Interfaces.C.unsigned; -- 16 bits or more
+ -- zconf.h:216
+ type Int is new Interfaces.C.int;
+
+ type ULong is new Interfaces.C.unsigned_long; -- 32 bits or more
+ -- zconf.h:217
+ subtype Chars_Ptr is Interfaces.C.Strings.chars_ptr;
+
+ type ULong_Access is access ULong;
+ type Int_Access is access Int;
+
+ subtype Voidp is System.Address; -- zconf.h:232
+
+ subtype Byte_Access is Voidp;
+
+ Nul : constant Voidp := System.Null_Address;
+ -- end from zconf
+
+ Z_NO_FLUSH : constant := 8#0000#; -- zlib.h:125
+ -- zlib.h:125
+ Z_PARTIAL_FLUSH : constant := 1; -- zlib.h:126
+ -- will be removed, use
+ -- Z_SYNC_FLUSH instead
+ -- zlib.h:126
+ Z_SYNC_FLUSH : constant := 2; -- zlib.h:127
+ -- zlib.h:127
+ Z_FULL_FLUSH : constant := 3; -- zlib.h:128
+ -- zlib.h:128
+ Z_FINISH : constant := 4; -- zlib.h:129
+ -- zlib.h:129
+ Z_OK : constant := 8#0000#; -- zlib.h:132
+ -- zlib.h:132
+ Z_STREAM_END : constant := 1; -- zlib.h:133
+ -- zlib.h:133
+ Z_NEED_DICT : constant := 2; -- zlib.h:134
+ -- zlib.h:134
+ Z_ERRNO : constant := -1; -- zlib.h:135
+ -- zlib.h:135
+ Z_STREAM_ERROR : constant := -2; -- zlib.h:136
+ -- zlib.h:136
+ Z_DATA_ERROR : constant := -3; -- zlib.h:137
+ -- zlib.h:137
+ Z_MEM_ERROR : constant := -4; -- zlib.h:138
+ -- zlib.h:138
+ Z_BUF_ERROR : constant := -5; -- zlib.h:139
+ -- zlib.h:139
+ Z_VERSION_ERROR : constant := -6; -- zlib.h:140
+ -- zlib.h:140
+ Z_NO_COMPRESSION : constant := 8#0000#; -- zlib.h:145
+ -- zlib.h:145
+ Z_BEST_SPEED : constant := 1; -- zlib.h:146
+ -- zlib.h:146
+ Z_BEST_COMPRESSION : constant := 9; -- zlib.h:147
+ -- zlib.h:147
+ Z_DEFAULT_COMPRESSION : constant := -1; -- zlib.h:148
+ -- zlib.h:148
+ Z_FILTERED : constant := 1; -- zlib.h:151
+ -- zlib.h:151
+ Z_HUFFMAN_ONLY : constant := 2; -- zlib.h:152
+ -- zlib.h:152
+ Z_DEFAULT_STRATEGY : constant := 8#0000#; -- zlib.h:153
+ -- zlib.h:153
+ Z_BINARY : constant := 8#0000#; -- zlib.h:156
+ -- zlib.h:156
+ Z_ASCII : constant := 1; -- zlib.h:157
+ -- zlib.h:157
+ Z_UNKNOWN : constant := 2; -- zlib.h:158
+ -- zlib.h:158
+ Z_DEFLATED : constant := 8; -- zlib.h:161
+ -- zlib.h:161
+ Z_NULL : constant := 8#0000#; -- zlib.h:164
+ -- for initializing zalloc, zfree, opaque
+ -- zlib.h:164
+ type gzFile is new Voidp; -- zlib.h:646
+
+ type Z_Stream is private;
+
+ type Z_Streamp is access all Z_Stream; -- zlib.h:89
+
+ type alloc_func is access function
+ (Opaque : Voidp;
+ Items : UInt;
+ Size : UInt)
+ return Voidp; -- zlib.h:63
+
+ type free_func is access procedure (opaque : Voidp; address : Voidp);
+
+ function zlibVersion return Chars_Ptr;
+
+ function Deflate (strm : Z_Streamp; flush : Int) return Int;
+
+ function DeflateEnd (strm : Z_Streamp) return Int;
+
+ function Inflate (strm : Z_Streamp; flush : Int) return Int;
+
+ function InflateEnd (strm : Z_Streamp) return Int;
+
+ function deflateSetDictionary
+ (strm : Z_Streamp;
+ dictionary : Byte_Access;
+ dictLength : UInt)
+ return Int;
+
+ function deflateCopy (dest : Z_Streamp; source : Z_Streamp) return Int;
+ -- zlib.h:478
+
+ function deflateReset (strm : Z_Streamp) return Int; -- zlib.h:495
+
+ function deflateParams
+ (strm : Z_Streamp;
+ level : Int;
+ strategy : Int)
+ return Int; -- zlib.h:506
+
+ function inflateSetDictionary
+ (strm : Z_Streamp;
+ dictionary : Byte_Access;
+ dictLength : UInt)
+ return Int; -- zlib.h:548
+
+ function inflateSync (strm : Z_Streamp) return Int; -- zlib.h:565
+
+ function inflateReset (strm : Z_Streamp) return Int; -- zlib.h:580
+
+ function compress
+ (dest : Byte_Access;
+ destLen : ULong_Access;
+ source : Byte_Access;
+ sourceLen : ULong)
+ return Int; -- zlib.h:601
+
+ function compress2
+ (dest : Byte_Access;
+ destLen : ULong_Access;
+ source : Byte_Access;
+ sourceLen : ULong;
+ level : Int)
+ return Int; -- zlib.h:615
+
+ function uncompress
+ (dest : Byte_Access;
+ destLen : ULong_Access;
+ source : Byte_Access;
+ sourceLen : ULong)
+ return Int;
+
+ function gzopen (path : Chars_Ptr; mode : Chars_Ptr) return gzFile;
+
+ function gzdopen (fd : Int; mode : Chars_Ptr) return gzFile;
+
+ function gzsetparams
+ (file : gzFile;
+ level : Int;
+ strategy : Int)
+ return Int;
+
+ function gzread
+ (file : gzFile;
+ buf : Voidp;
+ len : UInt)
+ return Int;
+
+ function gzwrite
+ (file : in gzFile;
+ buf : in Voidp;
+ len : in UInt)
+ return Int;
+
+ function gzprintf (file : in gzFile; format : in Chars_Ptr) return Int;
+
+ function gzputs (file : in gzFile; s : in Chars_Ptr) return Int;
+
+ function gzgets
+ (file : gzFile;
+ buf : Chars_Ptr;
+ len : Int)
+ return Chars_Ptr;
+
+ function gzputc (file : gzFile; char : Int) return Int;
+
+ function gzgetc (file : gzFile) return Int;
+
+ function gzflush (file : gzFile; flush : Int) return Int;
+
+ function gzseek
+ (file : gzFile;
+ offset : Int;
+ whence : Int)
+ return Int;
+
+ function gzrewind (file : gzFile) return Int;
+
+ function gztell (file : gzFile) return Int;
+
+ function gzeof (file : gzFile) return Int;
+
+ function gzclose (file : gzFile) return Int;
+
+ function gzerror (file : gzFile; errnum : Int_Access) return Chars_Ptr;
+
+ function adler32
+ (adler : ULong;
+ buf : Byte_Access;
+ len : UInt)
+ return ULong;
+
+ function crc32
+ (crc : ULong;
+ buf : Byte_Access;
+ len : UInt)
+ return ULong;
+
+ function deflateInit
+ (strm : Z_Streamp;
+ level : Int;
+ version : Chars_Ptr;
+ stream_size : Int)
+ return Int;
+
+ function deflateInit2
+ (strm : Z_Streamp;
+ level : Int;
+ method : Int;
+ windowBits : Int;
+ memLevel : Int;
+ strategy : Int;
+ version : Chars_Ptr;
+ stream_size : Int)
+ return Int;
+
+ function Deflate_Init
+ (strm : Z_Streamp;
+ level : Int;
+ method : Int;
+ windowBits : Int;
+ memLevel : Int;
+ strategy : Int)
+ return Int;
+ pragma Inline (Deflate_Init);
+
+ function inflateInit
+ (strm : Z_Streamp;
+ version : Chars_Ptr;
+ stream_size : Int)
+ return Int;
+
+ function inflateInit2
+ (strm : in Z_Streamp;
+ windowBits : in Int;
+ version : in Chars_Ptr;
+ stream_size : in Int)
+ return Int;
+
+ function inflateBackInit
+ (strm : in Z_Streamp;
+ windowBits : in Int;
+ window : in Byte_Access;
+ version : in Chars_Ptr;
+ stream_size : in Int)
+ return Int;
+ -- Size of window have to be 2**windowBits.
+
+ function Inflate_Init (strm : Z_Streamp; windowBits : Int) return Int;
+ pragma Inline (Inflate_Init);
+
+ function zError (err : Int) return Chars_Ptr;
+
+ function inflateSyncPoint (z : Z_Streamp) return Int;
+
+ function get_crc_table return ULong_Access;
+
+ -- Interface to the available fields of the z_stream structure.
+ -- The application must update next_in and avail_in when avail_in has
+ -- dropped to zero. It must update next_out and avail_out when avail_out
+ -- has dropped to zero. The application must initialize zalloc, zfree and
+ -- opaque before calling the init function.
+
+ procedure Set_In
+ (Strm : in out Z_Stream;
+ Buffer : in Voidp;
+ Size : in UInt);
+ pragma Inline (Set_In);
+
+ procedure Set_Out
+ (Strm : in out Z_Stream;
+ Buffer : in Voidp;
+ Size : in UInt);
+ pragma Inline (Set_Out);
+
+ procedure Set_Mem_Func
+ (Strm : in out Z_Stream;
+ Opaque : in Voidp;
+ Alloc : in alloc_func;
+ Free : in free_func);
+ pragma Inline (Set_Mem_Func);
+
+ function Last_Error_Message (Strm : in Z_Stream) return String;
+ pragma Inline (Last_Error_Message);
+
+ function Avail_Out (Strm : in Z_Stream) return UInt;
+ pragma Inline (Avail_Out);
+
+ function Avail_In (Strm : in Z_Stream) return UInt;
+ pragma Inline (Avail_In);
+
+ function Total_In (Strm : in Z_Stream) return ULong;
+ pragma Inline (Total_In);
+
+ function Total_Out (Strm : in Z_Stream) return ULong;
+ pragma Inline (Total_Out);
+
+ function inflateCopy
+ (dest : in Z_Streamp;
+ Source : in Z_Streamp)
+ return Int;
+
+ function compressBound (Source_Len : in ULong) return ULong;
+
+ function deflateBound
+ (Strm : in Z_Streamp;
+ Source_Len : in ULong)
+ return ULong;
+
+ function gzungetc (C : in Int; File : in gzFile) return Int;
+
+ function zlibCompileFlags return ULong;
+
+private
+
+ type Z_Stream is record -- zlib.h:68
+ Next_In : Voidp := Nul; -- next input byte
+ Avail_In : UInt := 0; -- number of bytes available at next_in
+ Total_In : ULong := 0; -- total nb of input bytes read so far
+ Next_Out : Voidp := Nul; -- next output byte should be put there
+ Avail_Out : UInt := 0; -- remaining free space at next_out
+ Total_Out : ULong := 0; -- total nb of bytes output so far
+ msg : Chars_Ptr; -- last error message, NULL if no error
+ state : Voidp; -- not visible by applications
+ zalloc : alloc_func := null; -- used to allocate the internal state
+ zfree : free_func := null; -- used to free the internal state
+ opaque : Voidp; -- private data object passed to
+ -- zalloc and zfree
+ data_type : Int; -- best guess about the data type:
+ -- ascii or binary
+ adler : ULong; -- adler32 value of the uncompressed
+ -- data
+ reserved : ULong; -- reserved for future use
+ end record;
+
+ pragma Convention (C, Z_Stream);
+
+ pragma Import (C, zlibVersion, "zlibVersion");
+ pragma Import (C, Deflate, "deflate");
+ pragma Import (C, DeflateEnd, "deflateEnd");
+ pragma Import (C, Inflate, "inflate");
+ pragma Import (C, InflateEnd, "inflateEnd");
+ pragma Import (C, deflateSetDictionary, "deflateSetDictionary");
+ pragma Import (C, deflateCopy, "deflateCopy");
+ pragma Import (C, deflateReset, "deflateReset");
+ pragma Import (C, deflateParams, "deflateParams");
+ pragma Import (C, inflateSetDictionary, "inflateSetDictionary");
+ pragma Import (C, inflateSync, "inflateSync");
+ pragma Import (C, inflateReset, "inflateReset");
+ pragma Import (C, compress, "compress");
+ pragma Import (C, compress2, "compress2");
+ pragma Import (C, uncompress, "uncompress");
+ pragma Import (C, gzopen, "gzopen");
+ pragma Import (C, gzdopen, "gzdopen");
+ pragma Import (C, gzsetparams, "gzsetparams");
+ pragma Import (C, gzread, "gzread");
+ pragma Import (C, gzwrite, "gzwrite");
+ pragma Import (C, gzprintf, "gzprintf");
+ pragma Import (C, gzputs, "gzputs");
+ pragma Import (C, gzgets, "gzgets");
+ pragma Import (C, gzputc, "gzputc");
+ pragma Import (C, gzgetc, "gzgetc");
+ pragma Import (C, gzflush, "gzflush");
+ pragma Import (C, gzseek, "gzseek");
+ pragma Import (C, gzrewind, "gzrewind");
+ pragma Import (C, gztell, "gztell");
+ pragma Import (C, gzeof, "gzeof");
+ pragma Import (C, gzclose, "gzclose");
+ pragma Import (C, gzerror, "gzerror");
+ pragma Import (C, adler32, "adler32");
+ pragma Import (C, crc32, "crc32");
+ pragma Import (C, deflateInit, "deflateInit_");
+ pragma Import (C, inflateInit, "inflateInit_");
+ pragma Import (C, deflateInit2, "deflateInit2_");
+ pragma Import (C, inflateInit2, "inflateInit2_");
+ pragma Import (C, zError, "zError");
+ pragma Import (C, inflateSyncPoint, "inflateSyncPoint");
+ pragma Import (C, get_crc_table, "get_crc_table");
+
+ -- since zlib 1.2.0:
+
+ pragma Import (C, inflateCopy, "inflateCopy");
+ pragma Import (C, compressBound, "compressBound");
+ pragma Import (C, deflateBound, "deflateBound");
+ pragma Import (C, gzungetc, "gzungetc");
+ pragma Import (C, zlibCompileFlags, "zlibCompileFlags");
+
+ pragma Import (C, inflateBackInit, "inflateBackInit_");
+
+ -- I stopped binding the inflateBack routines, because realize that
+ -- it does not support zlib and gzip headers for now, and have no
+ -- symmetric deflateBack routines.
+ -- ZLib-Ada is symmetric regarding deflate/inflate data transformation
+ -- and has a similar generic callback interface for the
+ -- deflate/inflate transformation based on the regular Deflate/Inflate
+ -- routines.
+
+ -- pragma Import (C, inflateBack, "inflateBack");
+ -- pragma Import (C, inflateBackEnd, "inflateBackEnd");
+
+end ZLib.Thin;
diff --git a/contrib/zlib/contrib/ada/zlib.adb b/contrib/zlib/contrib/ada/zlib.adb
new file mode 100644
index 000000000..8b6fd686a
--- /dev/null
+++ b/contrib/zlib/contrib/ada/zlib.adb
@@ -0,0 +1,701 @@
+----------------------------------------------------------------
+-- ZLib for Ada thick binding. --
+-- --
+-- Copyright (C) 2002-2004 Dmitriy Anisimkov --
+-- --
+-- Open source license information is in the zlib.ads file. --
+----------------------------------------------------------------
+
+-- $Id: zlib.adb,v 1.31 2004/09/06 06:53:19 vagul Exp $
+
+with Ada.Exceptions;
+with Ada.Unchecked_Conversion;
+with Ada.Unchecked_Deallocation;
+
+with Interfaces.C.Strings;
+
+with ZLib.Thin;
+
+package body ZLib is
+
+ use type Thin.Int;
+
+ type Z_Stream is new Thin.Z_Stream;
+
+ type Return_Code_Enum is
+ (OK,
+ STREAM_END,
+ NEED_DICT,
+ ERRNO,
+ STREAM_ERROR,
+ DATA_ERROR,
+ MEM_ERROR,
+ BUF_ERROR,
+ VERSION_ERROR);
+
+ type Flate_Step_Function is access
+ function (Strm : in Thin.Z_Streamp; Flush : in Thin.Int) return Thin.Int;
+ pragma Convention (C, Flate_Step_Function);
+
+ type Flate_End_Function is access
+ function (Ctrm : in Thin.Z_Streamp) return Thin.Int;
+ pragma Convention (C, Flate_End_Function);
+
+ type Flate_Type is record
+ Step : Flate_Step_Function;
+ Done : Flate_End_Function;
+ end record;
+
+ subtype Footer_Array is Stream_Element_Array (1 .. 8);
+
+ Simple_GZip_Header : constant Stream_Element_Array (1 .. 10)
+ := (16#1f#, 16#8b#, -- Magic header
+ 16#08#, -- Z_DEFLATED
+ 16#00#, -- Flags
+ 16#00#, 16#00#, 16#00#, 16#00#, -- Time
+ 16#00#, -- XFlags
+ 16#03# -- OS code
+ );
+ -- The simplest gzip header is not for informational, but just for
+ -- gzip format compatibility.
+ -- Note that some code below is using assumption
+ -- Simple_GZip_Header'Last > Footer_Array'Last, so do not make
+ -- Simple_GZip_Header'Last <= Footer_Array'Last.
+
+ Return_Code : constant array (Thin.Int range <>) of Return_Code_Enum
+ := (0 => OK,
+ 1 => STREAM_END,
+ 2 => NEED_DICT,
+ -1 => ERRNO,
+ -2 => STREAM_ERROR,
+ -3 => DATA_ERROR,
+ -4 => MEM_ERROR,
+ -5 => BUF_ERROR,
+ -6 => VERSION_ERROR);
+
+ Flate : constant array (Boolean) of Flate_Type
+ := (True => (Step => Thin.Deflate'Access,
+ Done => Thin.DeflateEnd'Access),
+ False => (Step => Thin.Inflate'Access,
+ Done => Thin.InflateEnd'Access));
+
+ Flush_Finish : constant array (Boolean) of Flush_Mode
+ := (True => Finish, False => No_Flush);
+
+ procedure Raise_Error (Stream : in Z_Stream);
+ pragma Inline (Raise_Error);
+
+ procedure Raise_Error (Message : in String);
+ pragma Inline (Raise_Error);
+
+ procedure Check_Error (Stream : in Z_Stream; Code : in Thin.Int);
+
+ procedure Free is new Ada.Unchecked_Deallocation
+ (Z_Stream, Z_Stream_Access);
+
+ function To_Thin_Access is new Ada.Unchecked_Conversion
+ (Z_Stream_Access, Thin.Z_Streamp);
+
+ procedure Translate_GZip
+ (Filter : in out Filter_Type;
+ In_Data : in Ada.Streams.Stream_Element_Array;
+ In_Last : out Ada.Streams.Stream_Element_Offset;
+ Out_Data : out Ada.Streams.Stream_Element_Array;
+ Out_Last : out Ada.Streams.Stream_Element_Offset;
+ Flush : in Flush_Mode);
+ -- Separate translate routine for make gzip header.
+
+ procedure Translate_Auto
+ (Filter : in out Filter_Type;
+ In_Data : in Ada.Streams.Stream_Element_Array;
+ In_Last : out Ada.Streams.Stream_Element_Offset;
+ Out_Data : out Ada.Streams.Stream_Element_Array;
+ Out_Last : out Ada.Streams.Stream_Element_Offset;
+ Flush : in Flush_Mode);
+ -- translate routine without additional headers.
+
+ -----------------
+ -- Check_Error --
+ -----------------
+
+ procedure Check_Error (Stream : in Z_Stream; Code : in Thin.Int) is
+ use type Thin.Int;
+ begin
+ if Code /= Thin.Z_OK then
+ Raise_Error
+ (Return_Code_Enum'Image (Return_Code (Code))
+ & ": " & Last_Error_Message (Stream));
+ end if;
+ end Check_Error;
+
+ -----------
+ -- Close --
+ -----------
+
+ procedure Close
+ (Filter : in out Filter_Type;
+ Ignore_Error : in Boolean := False)
+ is
+ Code : Thin.Int;
+ begin
+ if not Ignore_Error and then not Is_Open (Filter) then
+ raise Status_Error;
+ end if;
+
+ Code := Flate (Filter.Compression).Done (To_Thin_Access (Filter.Strm));
+
+ if Ignore_Error or else Code = Thin.Z_OK then
+ Free (Filter.Strm);
+ else
+ declare
+ Error_Message : constant String
+ := Last_Error_Message (Filter.Strm.all);
+ begin
+ Free (Filter.Strm);
+ Ada.Exceptions.Raise_Exception
+ (ZLib_Error'Identity,
+ Return_Code_Enum'Image (Return_Code (Code))
+ & ": " & Error_Message);
+ end;
+ end if;
+ end Close;
+
+ -----------
+ -- CRC32 --
+ -----------
+
+ function CRC32
+ (CRC : in Unsigned_32;
+ Data : in Ada.Streams.Stream_Element_Array)
+ return Unsigned_32
+ is
+ use Thin;
+ begin
+ return Unsigned_32 (crc32 (ULong (CRC),
+ Data'Address,
+ Data'Length));
+ end CRC32;
+
+ procedure CRC32
+ (CRC : in out Unsigned_32;
+ Data : in Ada.Streams.Stream_Element_Array) is
+ begin
+ CRC := CRC32 (CRC, Data);
+ end CRC32;
+
+ ------------------
+ -- Deflate_Init --
+ ------------------
+
+ procedure Deflate_Init
+ (Filter : in out Filter_Type;
+ Level : in Compression_Level := Default_Compression;
+ Strategy : in Strategy_Type := Default_Strategy;
+ Method : in Compression_Method := Deflated;
+ Window_Bits : in Window_Bits_Type := Default_Window_Bits;
+ Memory_Level : in Memory_Level_Type := Default_Memory_Level;
+ Header : in Header_Type := Default)
+ is
+ use type Thin.Int;
+ Win_Bits : Thin.Int := Thin.Int (Window_Bits);
+ begin
+ if Is_Open (Filter) then
+ raise Status_Error;
+ end if;
+
+ -- We allow ZLib to make header only in case of default header type.
+ -- Otherwise we would either do header by ourselfs, or do not do
+ -- header at all.
+
+ if Header = None or else Header = GZip then
+ Win_Bits := -Win_Bits;
+ end if;
+
+ -- For the GZip CRC calculation and make headers.
+
+ if Header = GZip then
+ Filter.CRC := 0;
+ Filter.Offset := Simple_GZip_Header'First;
+ else
+ Filter.Offset := Simple_GZip_Header'Last + 1;
+ end if;
+
+ Filter.Strm := new Z_Stream;
+ Filter.Compression := True;
+ Filter.Stream_End := False;
+ Filter.Header := Header;
+
+ if Thin.Deflate_Init
+ (To_Thin_Access (Filter.Strm),
+ Level => Thin.Int (Level),
+ method => Thin.Int (Method),
+ windowBits => Win_Bits,
+ memLevel => Thin.Int (Memory_Level),
+ strategy => Thin.Int (Strategy)) /= Thin.Z_OK
+ then
+ Raise_Error (Filter.Strm.all);
+ end if;
+ end Deflate_Init;
+
+ -----------
+ -- Flush --
+ -----------
+
+ procedure Flush
+ (Filter : in out Filter_Type;
+ Out_Data : out Ada.Streams.Stream_Element_Array;
+ Out_Last : out Ada.Streams.Stream_Element_Offset;
+ Flush : in Flush_Mode)
+ is
+ No_Data : Stream_Element_Array := (1 .. 0 => 0);
+ Last : Stream_Element_Offset;
+ begin
+ Translate (Filter, No_Data, Last, Out_Data, Out_Last, Flush);
+ end Flush;
+
+ -----------------------
+ -- Generic_Translate --
+ -----------------------
+
+ procedure Generic_Translate
+ (Filter : in out ZLib.Filter_Type;
+ In_Buffer_Size : in Integer := Default_Buffer_Size;
+ Out_Buffer_Size : in Integer := Default_Buffer_Size)
+ is
+ In_Buffer : Stream_Element_Array
+ (1 .. Stream_Element_Offset (In_Buffer_Size));
+ Out_Buffer : Stream_Element_Array
+ (1 .. Stream_Element_Offset (Out_Buffer_Size));
+ Last : Stream_Element_Offset;
+ In_Last : Stream_Element_Offset;
+ In_First : Stream_Element_Offset;
+ Out_Last : Stream_Element_Offset;
+ begin
+ Main : loop
+ Data_In (In_Buffer, Last);
+
+ In_First := In_Buffer'First;
+
+ loop
+ Translate
+ (Filter => Filter,
+ In_Data => In_Buffer (In_First .. Last),
+ In_Last => In_Last,
+ Out_Data => Out_Buffer,
+ Out_Last => Out_Last,
+ Flush => Flush_Finish (Last < In_Buffer'First));
+
+ if Out_Buffer'First <= Out_Last then
+ Data_Out (Out_Buffer (Out_Buffer'First .. Out_Last));
+ end if;
+
+ exit Main when Stream_End (Filter);
+
+ -- The end of in buffer.
+
+ exit when In_Last = Last;
+
+ In_First := In_Last + 1;
+ end loop;
+ end loop Main;
+
+ end Generic_Translate;
+
+ ------------------
+ -- Inflate_Init --
+ ------------------
+
+ procedure Inflate_Init
+ (Filter : in out Filter_Type;
+ Window_Bits : in Window_Bits_Type := Default_Window_Bits;
+ Header : in Header_Type := Default)
+ is
+ use type Thin.Int;
+ Win_Bits : Thin.Int := Thin.Int (Window_Bits);
+
+ procedure Check_Version;
+ -- Check the latest header types compatibility.
+
+ procedure Check_Version is
+ begin
+ if Version <= "1.1.4" then
+ Raise_Error
+ ("Inflate header type " & Header_Type'Image (Header)
+ & " incompatible with ZLib version " & Version);
+ end if;
+ end Check_Version;
+
+ begin
+ if Is_Open (Filter) then
+ raise Status_Error;
+ end if;
+
+ case Header is
+ when None =>
+ Check_Version;
+
+ -- Inflate data without headers determined
+ -- by negative Win_Bits.
+
+ Win_Bits := -Win_Bits;
+ when GZip =>
+ Check_Version;
+
+ -- Inflate gzip data defined by flag 16.
+
+ Win_Bits := Win_Bits + 16;
+ when Auto =>
+ Check_Version;
+
+ -- Inflate with automatic detection
+ -- of gzip or native header defined by flag 32.
+
+ Win_Bits := Win_Bits + 32;
+ when Default => null;
+ end case;
+
+ Filter.Strm := new Z_Stream;
+ Filter.Compression := False;
+ Filter.Stream_End := False;
+ Filter.Header := Header;
+
+ if Thin.Inflate_Init
+ (To_Thin_Access (Filter.Strm), Win_Bits) /= Thin.Z_OK
+ then
+ Raise_Error (Filter.Strm.all);
+ end if;
+ end Inflate_Init;
+
+ -------------
+ -- Is_Open --
+ -------------
+
+ function Is_Open (Filter : in Filter_Type) return Boolean is
+ begin
+ return Filter.Strm /= null;
+ end Is_Open;
+
+ -----------------
+ -- Raise_Error --
+ -----------------
+
+ procedure Raise_Error (Message : in String) is
+ begin
+ Ada.Exceptions.Raise_Exception (ZLib_Error'Identity, Message);
+ end Raise_Error;
+
+ procedure Raise_Error (Stream : in Z_Stream) is
+ begin
+ Raise_Error (Last_Error_Message (Stream));
+ end Raise_Error;
+
+ ----------
+ -- Read --
+ ----------
+
+ procedure Read
+ (Filter : in out Filter_Type;
+ Item : out Ada.Streams.Stream_Element_Array;
+ Last : out Ada.Streams.Stream_Element_Offset;
+ Flush : in Flush_Mode := No_Flush)
+ is
+ In_Last : Stream_Element_Offset;
+ Item_First : Ada.Streams.Stream_Element_Offset := Item'First;
+ V_Flush : Flush_Mode := Flush;
+
+ begin
+ pragma Assert (Rest_First in Buffer'First .. Buffer'Last + 1);
+ pragma Assert (Rest_Last in Buffer'First - 1 .. Buffer'Last);
+
+ loop
+ if Rest_Last = Buffer'First - 1 then
+ V_Flush := Finish;
+
+ elsif Rest_First > Rest_Last then
+ Read (Buffer, Rest_Last);
+ Rest_First := Buffer'First;
+
+ if Rest_Last < Buffer'First then
+ V_Flush := Finish;
+ end if;
+ end if;
+
+ Translate
+ (Filter => Filter,
+ In_Data => Buffer (Rest_First .. Rest_Last),
+ In_Last => In_Last,
+ Out_Data => Item (Item_First .. Item'Last),
+ Out_Last => Last,
+ Flush => V_Flush);
+
+ Rest_First := In_Last + 1;
+
+ exit when Stream_End (Filter)
+ or else Last = Item'Last
+ or else (Last >= Item'First and then Allow_Read_Some);
+
+ Item_First := Last + 1;
+ end loop;
+ end Read;
+
+ ----------------
+ -- Stream_End --
+ ----------------
+
+ function Stream_End (Filter : in Filter_Type) return Boolean is
+ begin
+ if Filter.Header = GZip and Filter.Compression then
+ return Filter.Stream_End
+ and then Filter.Offset = Footer_Array'Last + 1;
+ else
+ return Filter.Stream_End;
+ end if;
+ end Stream_End;
+
+ --------------
+ -- Total_In --
+ --------------
+
+ function Total_In (Filter : in Filter_Type) return Count is
+ begin
+ return Count (Thin.Total_In (To_Thin_Access (Filter.Strm).all));
+ end Total_In;
+
+ ---------------
+ -- Total_Out --
+ ---------------
+
+ function Total_Out (Filter : in Filter_Type) return Count is
+ begin
+ return Count (Thin.Total_Out (To_Thin_Access (Filter.Strm).all));
+ end Total_Out;
+
+ ---------------
+ -- Translate --
+ ---------------
+
+ procedure Translate
+ (Filter : in out Filter_Type;
+ In_Data : in Ada.Streams.Stream_Element_Array;
+ In_Last : out Ada.Streams.Stream_Element_Offset;
+ Out_Data : out Ada.Streams.Stream_Element_Array;
+ Out_Last : out Ada.Streams.Stream_Element_Offset;
+ Flush : in Flush_Mode) is
+ begin
+ if Filter.Header = GZip and then Filter.Compression then
+ Translate_GZip
+ (Filter => Filter,
+ In_Data => In_Data,
+ In_Last => In_Last,
+ Out_Data => Out_Data,
+ Out_Last => Out_Last,
+ Flush => Flush);
+ else
+ Translate_Auto
+ (Filter => Filter,
+ In_Data => In_Data,
+ In_Last => In_Last,
+ Out_Data => Out_Data,
+ Out_Last => Out_Last,
+ Flush => Flush);
+ end if;
+ end Translate;
+
+ --------------------
+ -- Translate_Auto --
+ --------------------
+
+ procedure Translate_Auto
+ (Filter : in out Filter_Type;
+ In_Data : in Ada.Streams.Stream_Element_Array;
+ In_Last : out Ada.Streams.Stream_Element_Offset;
+ Out_Data : out Ada.Streams.Stream_Element_Array;
+ Out_Last : out Ada.Streams.Stream_Element_Offset;
+ Flush : in Flush_Mode)
+ is
+ use type Thin.Int;
+ Code : Thin.Int;
+
+ begin
+ if not Is_Open (Filter) then
+ raise Status_Error;
+ end if;
+
+ if Out_Data'Length = 0 and then In_Data'Length = 0 then
+ raise Constraint_Error;
+ end if;
+
+ Set_Out (Filter.Strm.all, Out_Data'Address, Out_Data'Length);
+ Set_In (Filter.Strm.all, In_Data'Address, In_Data'Length);
+
+ Code := Flate (Filter.Compression).Step
+ (To_Thin_Access (Filter.Strm),
+ Thin.Int (Flush));
+
+ if Code = Thin.Z_STREAM_END then
+ Filter.Stream_End := True;
+ else
+ Check_Error (Filter.Strm.all, Code);
+ end if;
+
+ In_Last := In_Data'Last
+ - Stream_Element_Offset (Avail_In (Filter.Strm.all));
+ Out_Last := Out_Data'Last
+ - Stream_Element_Offset (Avail_Out (Filter.Strm.all));
+ end Translate_Auto;
+
+ --------------------
+ -- Translate_GZip --
+ --------------------
+
+ procedure Translate_GZip
+ (Filter : in out Filter_Type;
+ In_Data : in Ada.Streams.Stream_Element_Array;
+ In_Last : out Ada.Streams.Stream_Element_Offset;
+ Out_Data : out Ada.Streams.Stream_Element_Array;
+ Out_Last : out Ada.Streams.Stream_Element_Offset;
+ Flush : in Flush_Mode)
+ is
+ Out_First : Stream_Element_Offset;
+
+ procedure Add_Data (Data : in Stream_Element_Array);
+ -- Add data to stream from the Filter.Offset till necessary,
+ -- used for add gzip headr/footer.
+
+ procedure Put_32
+ (Item : in out Stream_Element_Array;
+ Data : in Unsigned_32);
+ pragma Inline (Put_32);
+
+ --------------
+ -- Add_Data --
+ --------------
+
+ procedure Add_Data (Data : in Stream_Element_Array) is
+ Data_First : Stream_Element_Offset renames Filter.Offset;
+ Data_Last : Stream_Element_Offset;
+ Data_Len : Stream_Element_Offset; -- -1
+ Out_Len : Stream_Element_Offset; -- -1
+ begin
+ Out_First := Out_Last + 1;
+
+ if Data_First > Data'Last then
+ return;
+ end if;
+
+ Data_Len := Data'Last - Data_First;
+ Out_Len := Out_Data'Last - Out_First;
+
+ if Data_Len <= Out_Len then
+ Out_Last := Out_First + Data_Len;
+ Data_Last := Data'Last;
+ else
+ Out_Last := Out_Data'Last;
+ Data_Last := Data_First + Out_Len;
+ end if;
+
+ Out_Data (Out_First .. Out_Last) := Data (Data_First .. Data_Last);
+
+ Data_First := Data_Last + 1;
+ Out_First := Out_Last + 1;
+ end Add_Data;
+
+ ------------
+ -- Put_32 --
+ ------------
+
+ procedure Put_32
+ (Item : in out Stream_Element_Array;
+ Data : in Unsigned_32)
+ is
+ D : Unsigned_32 := Data;
+ begin
+ for J in Item'First .. Item'First + 3 loop
+ Item (J) := Stream_Element (D and 16#FF#);
+ D := Shift_Right (D, 8);
+ end loop;
+ end Put_32;
+
+ begin
+ Out_Last := Out_Data'First - 1;
+
+ if not Filter.Stream_End then
+ Add_Data (Simple_GZip_Header);
+
+ Translate_Auto
+ (Filter => Filter,
+ In_Data => In_Data,
+ In_Last => In_Last,
+ Out_Data => Out_Data (Out_First .. Out_Data'Last),
+ Out_Last => Out_Last,
+ Flush => Flush);
+
+ CRC32 (Filter.CRC, In_Data (In_Data'First .. In_Last));
+ end if;
+
+ if Filter.Stream_End and then Out_Last <= Out_Data'Last then
+ -- This detection method would work only when
+ -- Simple_GZip_Header'Last > Footer_Array'Last
+
+ if Filter.Offset = Simple_GZip_Header'Last + 1 then
+ Filter.Offset := Footer_Array'First;
+ end if;
+
+ declare
+ Footer : Footer_Array;
+ begin
+ Put_32 (Footer, Filter.CRC);
+ Put_32 (Footer (Footer'First + 4 .. Footer'Last),
+ Unsigned_32 (Total_In (Filter)));
+ Add_Data (Footer);
+ end;
+ end if;
+ end Translate_GZip;
+
+ -------------
+ -- Version --
+ -------------
+
+ function Version return String is
+ begin
+ return Interfaces.C.Strings.Value (Thin.zlibVersion);
+ end Version;
+
+ -----------
+ -- Write --
+ -----------
+
+ procedure Write
+ (Filter : in out Filter_Type;
+ Item : in Ada.Streams.Stream_Element_Array;
+ Flush : in Flush_Mode := No_Flush)
+ is
+ Buffer : Stream_Element_Array (1 .. Buffer_Size);
+ In_Last : Stream_Element_Offset;
+ Out_Last : Stream_Element_Offset;
+ In_First : Stream_Element_Offset := Item'First;
+ begin
+ if Item'Length = 0 and Flush = No_Flush then
+ return;
+ end if;
+
+ loop
+ Translate
+ (Filter => Filter,
+ In_Data => Item (In_First .. Item'Last),
+ In_Last => In_Last,
+ Out_Data => Buffer,
+ Out_Last => Out_Last,
+ Flush => Flush);
+
+ if Out_Last >= Buffer'First then
+ Write (Buffer (1 .. Out_Last));
+ end if;
+
+ exit when In_Last = Item'Last or Stream_End (Filter);
+
+ In_First := In_Last + 1;
+ end loop;
+ end Write;
+
+end ZLib;
diff --git a/contrib/zlib/contrib/ada/zlib.ads b/contrib/zlib/contrib/ada/zlib.ads
new file mode 100644
index 000000000..79ffc4095
--- /dev/null
+++ b/contrib/zlib/contrib/ada/zlib.ads
@@ -0,0 +1,328 @@
+------------------------------------------------------------------------------
+-- ZLib for Ada thick binding. --
+-- --
+-- Copyright (C) 2002-2004 Dmitriy Anisimkov --
+-- --
+-- This library is free software; you can redistribute it and/or modify --
+-- it under the terms of the GNU General Public License as published by --
+-- the Free Software Foundation; either version 2 of the License, or (at --
+-- your option) any later version. --
+-- --
+-- This library is distributed in the hope that it will be useful, but --
+-- WITHOUT ANY WARRANTY; without even the implied warranty of --
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --
+-- General Public License for more details. --
+-- --
+-- You should have received a copy of the GNU General Public License --
+-- along with this library; if not, write to the Free Software Foundation, --
+-- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --
+-- --
+-- As a special exception, if other files instantiate generics from this --
+-- unit, or you link this unit with other files to produce an executable, --
+-- this unit does not by itself cause the resulting executable to be --
+-- covered by the GNU General Public License. This exception does not --
+-- however invalidate any other reasons why the executable file might be --
+-- covered by the GNU Public License. --
+------------------------------------------------------------------------------
+
+-- $Id: zlib.ads,v 1.26 2004/09/06 06:53:19 vagul Exp $
+
+with Ada.Streams;
+
+with Interfaces;
+
+package ZLib is
+
+ ZLib_Error : exception;
+ Status_Error : exception;
+
+ type Compression_Level is new Integer range -1 .. 9;
+
+ type Flush_Mode is private;
+
+ type Compression_Method is private;
+
+ type Window_Bits_Type is new Integer range 8 .. 15;
+
+ type Memory_Level_Type is new Integer range 1 .. 9;
+
+ type Unsigned_32 is new Interfaces.Unsigned_32;
+
+ type Strategy_Type is private;
+
+ type Header_Type is (None, Auto, Default, GZip);
+ -- Header type usage have a some limitation for inflate.
+ -- See comment for Inflate_Init.
+
+ subtype Count is Ada.Streams.Stream_Element_Count;
+
+ Default_Memory_Level : constant Memory_Level_Type := 8;
+ Default_Window_Bits : constant Window_Bits_Type := 15;
+
+ ----------------------------------
+ -- Compression method constants --
+ ----------------------------------
+
+ Deflated : constant Compression_Method;
+ -- Only one method allowed in this ZLib version
+
+ ---------------------------------
+ -- Compression level constants --
+ ---------------------------------
+
+ No_Compression : constant Compression_Level := 0;
+ Best_Speed : constant Compression_Level := 1;
+ Best_Compression : constant Compression_Level := 9;
+ Default_Compression : constant Compression_Level := -1;
+
+ --------------------------
+ -- Flush mode constants --
+ --------------------------
+
+ No_Flush : constant Flush_Mode;
+ -- Regular way for compression, no flush
+
+ Partial_Flush : constant Flush_Mode;
+ -- Will be removed, use Z_SYNC_FLUSH instead
+
+ Sync_Flush : constant Flush_Mode;
+ -- All pending output is flushed to the output buffer and the output
+ -- is aligned on a byte boundary, so that the decompressor can get all
+ -- input data available so far. (In particular avail_in is zero after the
+ -- call if enough output space has been provided before the call.)
+ -- Flushing may degrade compression for some compression algorithms and so
+ -- it should be used only when necessary.
+
+ Block_Flush : constant Flush_Mode;
+ -- Z_BLOCK requests that inflate() stop
+ -- if and when it get to the next deflate block boundary. When decoding the
+ -- zlib or gzip format, this will cause inflate() to return immediately
+ -- after the header and before the first block. When doing a raw inflate,
+ -- inflate() will go ahead and process the first block, and will return
+ -- when it gets to the end of that block, or when it runs out of data.
+
+ Full_Flush : constant Flush_Mode;
+ -- All output is flushed as with SYNC_FLUSH, and the compression state
+ -- is reset so that decompression can restart from this point if previous
+ -- compressed data has been damaged or if random access is desired. Using
+ -- Full_Flush too often can seriously degrade the compression.
+
+ Finish : constant Flush_Mode;
+ -- Just for tell the compressor that input data is complete.
+
+ ------------------------------------
+ -- Compression strategy constants --
+ ------------------------------------
+
+ -- RLE stategy could be used only in version 1.2.0 and later.
+
+ Filtered : constant Strategy_Type;
+ Huffman_Only : constant Strategy_Type;
+ RLE : constant Strategy_Type;
+ Default_Strategy : constant Strategy_Type;
+
+ Default_Buffer_Size : constant := 4096;
+
+ type Filter_Type is tagged limited private;
+ -- The filter is for compression and for decompression.
+ -- The usage of the type is depend of its initialization.
+
+ function Version return String;
+ pragma Inline (Version);
+ -- Return string representation of the ZLib version.
+
+ procedure Deflate_Init
+ (Filter : in out Filter_Type;
+ Level : in Compression_Level := Default_Compression;
+ Strategy : in Strategy_Type := Default_Strategy;
+ Method : in Compression_Method := Deflated;
+ Window_Bits : in Window_Bits_Type := Default_Window_Bits;
+ Memory_Level : in Memory_Level_Type := Default_Memory_Level;
+ Header : in Header_Type := Default);
+ -- Compressor initialization.
+ -- When Header parameter is Auto or Default, then default zlib header
+ -- would be provided for compressed data.
+ -- When Header is GZip, then gzip header would be set instead of
+ -- default header.
+ -- When Header is None, no header would be set for compressed data.
+
+ procedure Inflate_Init
+ (Filter : in out Filter_Type;
+ Window_Bits : in Window_Bits_Type := Default_Window_Bits;
+ Header : in Header_Type := Default);
+ -- Decompressor initialization.
+ -- Default header type mean that ZLib default header is expecting in the
+ -- input compressed stream.
+ -- Header type None mean that no header is expecting in the input stream.
+ -- GZip header type mean that GZip header is expecting in the
+ -- input compressed stream.
+ -- Auto header type mean that header type (GZip or Native) would be
+ -- detected automatically in the input stream.
+ -- Note that header types parameter values None, GZip and Auto are
+ -- supported for inflate routine only in ZLib versions 1.2.0.2 and later.
+ -- Deflate_Init is supporting all header types.
+
+ function Is_Open (Filter : in Filter_Type) return Boolean;
+ pragma Inline (Is_Open);
+ -- Is the filter opened for compression or decompression.
+
+ procedure Close
+ (Filter : in out Filter_Type;
+ Ignore_Error : in Boolean := False);
+ -- Closing the compression or decompressor.
+ -- If stream is closing before the complete and Ignore_Error is False,
+ -- The exception would be raised.
+
+ generic
+ with procedure Data_In
+ (Item : out Ada.Streams.Stream_Element_Array;
+ Last : out Ada.Streams.Stream_Element_Offset);
+ with procedure Data_Out
+ (Item : in Ada.Streams.Stream_Element_Array);
+ procedure Generic_Translate
+ (Filter : in out Filter_Type;
+ In_Buffer_Size : in Integer := Default_Buffer_Size;
+ Out_Buffer_Size : in Integer := Default_Buffer_Size);
+ -- Compress/decompress data fetch from Data_In routine and pass the result
+ -- to the Data_Out routine. User should provide Data_In and Data_Out
+ -- for compression/decompression data flow.
+ -- Compression or decompression depend on Filter initialization.
+
+ function Total_In (Filter : in Filter_Type) return Count;
+ pragma Inline (Total_In);
+ -- Returns total number of input bytes read so far
+
+ function Total_Out (Filter : in Filter_Type) return Count;
+ pragma Inline (Total_Out);
+ -- Returns total number of bytes output so far
+
+ function CRC32
+ (CRC : in Unsigned_32;
+ Data : in Ada.Streams.Stream_Element_Array)
+ return Unsigned_32;
+ pragma Inline (CRC32);
+ -- Compute CRC32, it could be necessary for make gzip format
+
+ procedure CRC32
+ (CRC : in out Unsigned_32;
+ Data : in Ada.Streams.Stream_Element_Array);
+ pragma Inline (CRC32);
+ -- Compute CRC32, it could be necessary for make gzip format
+
+ -------------------------------------------------
+ -- Below is more complex low level routines. --
+ -------------------------------------------------
+
+ procedure Translate
+ (Filter : in out Filter_Type;
+ In_Data : in Ada.Streams.Stream_Element_Array;
+ In_Last : out Ada.Streams.Stream_Element_Offset;
+ Out_Data : out Ada.Streams.Stream_Element_Array;
+ Out_Last : out Ada.Streams.Stream_Element_Offset;
+ Flush : in Flush_Mode);
+ -- Compress/decompress the In_Data buffer and place the result into
+ -- Out_Data. In_Last is the index of last element from In_Data accepted by
+ -- the Filter. Out_Last is the last element of the received data from
+ -- Filter. To tell the filter that incoming data are complete put the
+ -- Flush parameter to Finish.
+
+ function Stream_End (Filter : in Filter_Type) return Boolean;
+ pragma Inline (Stream_End);
+ -- Return the true when the stream is complete.
+
+ procedure Flush
+ (Filter : in out Filter_Type;
+ Out_Data : out Ada.Streams.Stream_Element_Array;
+ Out_Last : out Ada.Streams.Stream_Element_Offset;
+ Flush : in Flush_Mode);
+ pragma Inline (Flush);
+ -- Flushing the data from the compressor.
+
+ generic
+ with procedure Write
+ (Item : in Ada.Streams.Stream_Element_Array);
+ -- User should provide this routine for accept
+ -- compressed/decompressed data.
+
+ Buffer_Size : in Ada.Streams.Stream_Element_Offset
+ := Default_Buffer_Size;
+ -- Buffer size for Write user routine.
+
+ procedure Write
+ (Filter : in out Filter_Type;
+ Item : in Ada.Streams.Stream_Element_Array;
+ Flush : in Flush_Mode := No_Flush);
+ -- Compress/Decompress data from Item to the generic parameter procedure
+ -- Write. Output buffer size could be set in Buffer_Size generic parameter.
+
+ generic
+ with procedure Read
+ (Item : out Ada.Streams.Stream_Element_Array;
+ Last : out Ada.Streams.Stream_Element_Offset);
+ -- User should provide data for compression/decompression
+ -- thru this routine.
+
+ Buffer : in out Ada.Streams.Stream_Element_Array;
+ -- Buffer for keep remaining data from the previous
+ -- back read.
+
+ Rest_First, Rest_Last : in out Ada.Streams.Stream_Element_Offset;
+ -- Rest_First have to be initialized to Buffer'Last + 1
+ -- Rest_Last have to be initialized to Buffer'Last
+ -- before usage.
+
+ Allow_Read_Some : in Boolean := False;
+ -- Is it allowed to return Last < Item'Last before end of data.
+
+ procedure Read
+ (Filter : in out Filter_Type;
+ Item : out Ada.Streams.Stream_Element_Array;
+ Last : out Ada.Streams.Stream_Element_Offset;
+ Flush : in Flush_Mode := No_Flush);
+ -- Compress/Decompress data from generic parameter procedure Read to the
+ -- Item. User should provide Buffer and initialized Rest_First, Rest_Last
+ -- indicators. If Allow_Read_Some is True, Read routines could return
+ -- Last < Item'Last only at end of stream.
+
+private
+
+ use Ada.Streams;
+
+ pragma Assert (Ada.Streams.Stream_Element'Size = 8);
+ pragma Assert (Ada.Streams.Stream_Element'Modulus = 2**8);
+
+ type Flush_Mode is new Integer range 0 .. 5;
+
+ type Compression_Method is new Integer range 8 .. 8;
+
+ type Strategy_Type is new Integer range 0 .. 3;
+
+ No_Flush : constant Flush_Mode := 0;
+ Partial_Flush : constant Flush_Mode := 1;
+ Sync_Flush : constant Flush_Mode := 2;
+ Full_Flush : constant Flush_Mode := 3;
+ Finish : constant Flush_Mode := 4;
+ Block_Flush : constant Flush_Mode := 5;
+
+ Filtered : constant Strategy_Type := 1;
+ Huffman_Only : constant Strategy_Type := 2;
+ RLE : constant Strategy_Type := 3;
+ Default_Strategy : constant Strategy_Type := 0;
+
+ Deflated : constant Compression_Method := 8;
+
+ type Z_Stream;
+
+ type Z_Stream_Access is access all Z_Stream;
+
+ type Filter_Type is tagged limited record
+ Strm : Z_Stream_Access;
+ Compression : Boolean;
+ Stream_End : Boolean;
+ Header : Header_Type;
+ CRC : Unsigned_32;
+ Offset : Stream_Element_Offset;
+ -- Offset for gzip header/footer output.
+ end record;
+
+end ZLib;
diff --git a/contrib/zlib/contrib/ada/zlib.gpr b/contrib/zlib/contrib/ada/zlib.gpr
new file mode 100644
index 000000000..296b22aa9
--- /dev/null
+++ b/contrib/zlib/contrib/ada/zlib.gpr
@@ -0,0 +1,20 @@
+project Zlib is
+
+ for Languages use ("Ada");
+ for Source_Dirs use (".");
+ for Object_Dir use ".";
+ for Main use ("test.adb", "mtest.adb", "read.adb", "buffer_demo");
+
+ package Compiler is
+ for Default_Switches ("ada") use ("-gnatwcfilopru", "-gnatVcdfimorst", "-gnatyabcefhiklmnoprst");
+ end Compiler;
+
+ package Linker is
+ for Default_Switches ("ada") use ("-lz");
+ end Linker;
+
+ package Builder is
+ for Default_Switches ("ada") use ("-s", "-gnatQ");
+ end Builder;
+
+end Zlib;
diff --git a/contrib/zlib/contrib/amd64/amd64-match.S b/contrib/zlib/contrib/amd64/amd64-match.S
new file mode 100644
index 000000000..81d4a1c94
--- /dev/null
+++ b/contrib/zlib/contrib/amd64/amd64-match.S
@@ -0,0 +1,452 @@
+/*
+ * match.S -- optimized version of longest_match()
+ * based on the similar work by Gilles Vollant, and Brian Raiter, written 1998
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the BSD License. Use by owners of Che Guevarra
+ * parafernalia is prohibited, where possible, and highly discouraged
+ * elsewhere.
+ */
+
+#ifndef NO_UNDERLINE
+# define match_init _match_init
+# define longest_match _longest_match
+#endif
+
+#define scanend ebx
+#define scanendw bx
+#define chainlenwmask edx /* high word: current chain len low word: s->wmask */
+#define curmatch rsi
+#define curmatchd esi
+#define windowbestlen r8
+#define scanalign r9
+#define scanalignd r9d
+#define window r10
+#define bestlen r11
+#define bestlend r11d
+#define scanstart r12d
+#define scanstartw r12w
+#define scan r13
+#define nicematch r14d
+#define limit r15
+#define limitd r15d
+#define prev rcx
+
+/*
+ * The 258 is a "magic number, not a parameter -- changing it
+ * breaks the hell loose
+ */
+#define MAX_MATCH (258)
+#define MIN_MATCH (3)
+#define MIN_LOOKAHEAD (MAX_MATCH + MIN_MATCH + 1)
+#define MAX_MATCH_8 ((MAX_MATCH + 7) & ~7)
+
+/* stack frame offsets */
+#define LocalVarsSize (112)
+#define _chainlenwmask ( 8-LocalVarsSize)(%rsp)
+#define _windowbestlen (16-LocalVarsSize)(%rsp)
+#define save_r14 (24-LocalVarsSize)(%rsp)
+#define save_rsi (32-LocalVarsSize)(%rsp)
+#define save_rbx (40-LocalVarsSize)(%rsp)
+#define save_r12 (56-LocalVarsSize)(%rsp)
+#define save_r13 (64-LocalVarsSize)(%rsp)
+#define save_r15 (80-LocalVarsSize)(%rsp)
+
+
+.globl match_init, longest_match
+
+/*
+ * On AMD64 the first argument of a function (in our case -- the pointer to
+ * deflate_state structure) is passed in %rdi, hence our offsets below are
+ * all off of that.
+ */
+
+/* you can check the structure offset by running
+
+#include <stdlib.h>
+#include <stdio.h>
+#include "deflate.h"
+
+void print_depl()
+{
+deflate_state ds;
+deflate_state *s=&ds;
+printf("size pointer=%u\n",(int)sizeof(void*));
+
+printf("#define dsWSize (%3u)(%%rdi)\n",(int)(((char*)&(s->w_size))-((char*)s)));
+printf("#define dsWMask (%3u)(%%rdi)\n",(int)(((char*)&(s->w_mask))-((char*)s)));
+printf("#define dsWindow (%3u)(%%rdi)\n",(int)(((char*)&(s->window))-((char*)s)));
+printf("#define dsPrev (%3u)(%%rdi)\n",(int)(((char*)&(s->prev))-((char*)s)));
+printf("#define dsMatchLen (%3u)(%%rdi)\n",(int)(((char*)&(s->match_length))-((char*)s)));
+printf("#define dsPrevMatch (%3u)(%%rdi)\n",(int)(((char*)&(s->prev_match))-((char*)s)));
+printf("#define dsStrStart (%3u)(%%rdi)\n",(int)(((char*)&(s->strstart))-((char*)s)));
+printf("#define dsMatchStart (%3u)(%%rdi)\n",(int)(((char*)&(s->match_start))-((char*)s)));
+printf("#define dsLookahead (%3u)(%%rdi)\n",(int)(((char*)&(s->lookahead))-((char*)s)));
+printf("#define dsPrevLen (%3u)(%%rdi)\n",(int)(((char*)&(s->prev_length))-((char*)s)));
+printf("#define dsMaxChainLen (%3u)(%%rdi)\n",(int)(((char*)&(s->max_chain_length))-((char*)s)));
+printf("#define dsGoodMatch (%3u)(%%rdi)\n",(int)(((char*)&(s->good_match))-((char*)s)));
+printf("#define dsNiceMatch (%3u)(%%rdi)\n",(int)(((char*)&(s->nice_match))-((char*)s)));
+}
+
+*/
+
+
+/*
+ to compile for XCode 3.2 on MacOSX x86_64
+ - run "gcc -g -c -DXCODE_MAC_X64_STRUCTURE amd64-match.S"
+ */
+
+
+#ifndef CURRENT_LINX_XCODE_MAC_X64_STRUCTURE
+#define dsWSize ( 68)(%rdi)
+#define dsWMask ( 76)(%rdi)
+#define dsWindow ( 80)(%rdi)
+#define dsPrev ( 96)(%rdi)
+#define dsMatchLen (144)(%rdi)
+#define dsPrevMatch (148)(%rdi)
+#define dsStrStart (156)(%rdi)
+#define dsMatchStart (160)(%rdi)
+#define dsLookahead (164)(%rdi)
+#define dsPrevLen (168)(%rdi)
+#define dsMaxChainLen (172)(%rdi)
+#define dsGoodMatch (188)(%rdi)
+#define dsNiceMatch (192)(%rdi)
+
+#else
+
+#ifndef STRUCT_OFFSET
+# define STRUCT_OFFSET (0)
+#endif
+
+
+#define dsWSize ( 56 + STRUCT_OFFSET)(%rdi)
+#define dsWMask ( 64 + STRUCT_OFFSET)(%rdi)
+#define dsWindow ( 72 + STRUCT_OFFSET)(%rdi)
+#define dsPrev ( 88 + STRUCT_OFFSET)(%rdi)
+#define dsMatchLen (136 + STRUCT_OFFSET)(%rdi)
+#define dsPrevMatch (140 + STRUCT_OFFSET)(%rdi)
+#define dsStrStart (148 + STRUCT_OFFSET)(%rdi)
+#define dsMatchStart (152 + STRUCT_OFFSET)(%rdi)
+#define dsLookahead (156 + STRUCT_OFFSET)(%rdi)
+#define dsPrevLen (160 + STRUCT_OFFSET)(%rdi)
+#define dsMaxChainLen (164 + STRUCT_OFFSET)(%rdi)
+#define dsGoodMatch (180 + STRUCT_OFFSET)(%rdi)
+#define dsNiceMatch (184 + STRUCT_OFFSET)(%rdi)
+
+#endif
+
+
+
+
+.text
+
+/* uInt longest_match(deflate_state *deflatestate, IPos curmatch) */
+
+longest_match:
+/*
+ * Retrieve the function arguments. %curmatch will hold cur_match
+ * throughout the entire function (passed via rsi on amd64).
+ * rdi will hold the pointer to the deflate_state (first arg on amd64)
+ */
+ mov %rsi, save_rsi
+ mov %rbx, save_rbx
+ mov %r12, save_r12
+ mov %r13, save_r13
+ mov %r14, save_r14
+ mov %r15, save_r15
+
+/* uInt wmask = s->w_mask; */
+/* unsigned chain_length = s->max_chain_length; */
+/* if (s->prev_length >= s->good_match) { */
+/* chain_length >>= 2; */
+/* } */
+
+ movl dsPrevLen, %eax
+ movl dsGoodMatch, %ebx
+ cmpl %ebx, %eax
+ movl dsWMask, %eax
+ movl dsMaxChainLen, %chainlenwmask
+ jl LastMatchGood
+ shrl $2, %chainlenwmask
+LastMatchGood:
+
+/* chainlen is decremented once beforehand so that the function can */
+/* use the sign flag instead of the zero flag for the exit test. */
+/* It is then shifted into the high word, to make room for the wmask */
+/* value, which it will always accompany. */
+
+ decl %chainlenwmask
+ shll $16, %chainlenwmask
+ orl %eax, %chainlenwmask
+
+/* if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; */
+
+ movl dsNiceMatch, %eax
+ movl dsLookahead, %ebx
+ cmpl %eax, %ebx
+ jl LookaheadLess
+ movl %eax, %ebx
+LookaheadLess: movl %ebx, %nicematch
+
+/* register Bytef *scan = s->window + s->strstart; */
+
+ mov dsWindow, %window
+ movl dsStrStart, %limitd
+ lea (%limit, %window), %scan
+
+/* Determine how many bytes the scan ptr is off from being */
+/* dword-aligned. */
+
+ mov %scan, %scanalign
+ negl %scanalignd
+ andl $3, %scanalignd
+
+/* IPos limit = s->strstart > (IPos)MAX_DIST(s) ? */
+/* s->strstart - (IPos)MAX_DIST(s) : NIL; */
+
+ movl dsWSize, %eax
+ subl $MIN_LOOKAHEAD, %eax
+ xorl %ecx, %ecx
+ subl %eax, %limitd
+ cmovng %ecx, %limitd
+
+/* int best_len = s->prev_length; */
+
+ movl dsPrevLen, %bestlend
+
+/* Store the sum of s->window + best_len in %windowbestlen locally, and in memory. */
+
+ lea (%window, %bestlen), %windowbestlen
+ mov %windowbestlen, _windowbestlen
+
+/* register ush scan_start = *(ushf*)scan; */
+/* register ush scan_end = *(ushf*)(scan+best_len-1); */
+/* Posf *prev = s->prev; */
+
+ movzwl (%scan), %scanstart
+ movzwl -1(%scan, %bestlen), %scanend
+ mov dsPrev, %prev
+
+/* Jump into the main loop. */
+
+ movl %chainlenwmask, _chainlenwmask
+ jmp LoopEntry
+
+.balign 16
+
+/* do {
+ * match = s->window + cur_match;
+ * if (*(ushf*)(match+best_len-1) != scan_end ||
+ * *(ushf*)match != scan_start) continue;
+ * [...]
+ * } while ((cur_match = prev[cur_match & wmask]) > limit
+ * && --chain_length != 0);
+ *
+ * Here is the inner loop of the function. The function will spend the
+ * majority of its time in this loop, and majority of that time will
+ * be spent in the first ten instructions.
+ */
+LookupLoop:
+ andl %chainlenwmask, %curmatchd
+ movzwl (%prev, %curmatch, 2), %curmatchd
+ cmpl %limitd, %curmatchd
+ jbe LeaveNow
+ subl $0x00010000, %chainlenwmask
+ js LeaveNow
+LoopEntry: cmpw -1(%windowbestlen, %curmatch), %scanendw
+ jne LookupLoop
+ cmpw %scanstartw, (%window, %curmatch)
+ jne LookupLoop
+
+/* Store the current value of chainlen. */
+ movl %chainlenwmask, _chainlenwmask
+
+/* %scan is the string under scrutiny, and %prev to the string we */
+/* are hoping to match it up with. In actuality, %esi and %edi are */
+/* both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and %edx is */
+/* initialized to -(MAX_MATCH_8 - scanalign). */
+
+ mov $(-MAX_MATCH_8), %rdx
+ lea (%curmatch, %window), %windowbestlen
+ lea MAX_MATCH_8(%windowbestlen, %scanalign), %windowbestlen
+ lea MAX_MATCH_8(%scan, %scanalign), %prev
+
+/* the prefetching below makes very little difference... */
+ prefetcht1 (%windowbestlen, %rdx)
+ prefetcht1 (%prev, %rdx)
+
+/*
+ * Test the strings for equality, 8 bytes at a time. At the end,
+ * adjust %rdx so that it is offset to the exact byte that mismatched.
+ *
+ * It should be confessed that this loop usually does not represent
+ * much of the total running time. Replacing it with a more
+ * straightforward "rep cmpsb" would not drastically degrade
+ * performance -- unrolling it, for example, makes no difference.
+ */
+
+#undef USE_SSE /* works, but is 6-7% slower, than non-SSE... */
+
+LoopCmps:
+#ifdef USE_SSE
+ /* Preload the SSE registers */
+ movdqu (%windowbestlen, %rdx), %xmm1
+ movdqu (%prev, %rdx), %xmm2
+ pcmpeqb %xmm2, %xmm1
+ movdqu 16(%windowbestlen, %rdx), %xmm3
+ movdqu 16(%prev, %rdx), %xmm4
+ pcmpeqb %xmm4, %xmm3
+ movdqu 32(%windowbestlen, %rdx), %xmm5
+ movdqu 32(%prev, %rdx), %xmm6
+ pcmpeqb %xmm6, %xmm5
+ movdqu 48(%windowbestlen, %rdx), %xmm7
+ movdqu 48(%prev, %rdx), %xmm8
+ pcmpeqb %xmm8, %xmm7
+
+ /* Check the comparisions' results */
+ pmovmskb %xmm1, %rax
+ notw %ax
+ bsfw %ax, %ax
+ jnz LeaveLoopCmps
+
+ /* this is the only iteration of the loop with a possibility of having
+ incremented rdx by 0x108 (each loop iteration add 16*4 = 0x40
+ and (0x40*4)+8=0x108 */
+ add $8, %rdx
+ jz LenMaximum
+ add $8, %rdx
+
+
+ pmovmskb %xmm3, %rax
+ notw %ax
+ bsfw %ax, %ax
+ jnz LeaveLoopCmps
+
+
+ add $16, %rdx
+
+
+ pmovmskb %xmm5, %rax
+ notw %ax
+ bsfw %ax, %ax
+ jnz LeaveLoopCmps
+
+ add $16, %rdx
+
+
+ pmovmskb %xmm7, %rax
+ notw %ax
+ bsfw %ax, %ax
+ jnz LeaveLoopCmps
+
+ add $16, %rdx
+
+ jmp LoopCmps
+LeaveLoopCmps: add %rax, %rdx
+#else
+ mov (%windowbestlen, %rdx), %rax
+ xor (%prev, %rdx), %rax
+ jnz LeaveLoopCmps
+
+ mov 8(%windowbestlen, %rdx), %rax
+ xor 8(%prev, %rdx), %rax
+ jnz LeaveLoopCmps8
+
+ mov 16(%windowbestlen, %rdx), %rax
+ xor 16(%prev, %rdx), %rax
+ jnz LeaveLoopCmps16
+
+ add $24, %rdx
+ jnz LoopCmps
+ jmp LenMaximum
+# if 0
+/*
+ * This three-liner is tantalizingly simple, but bsf is a slow instruction,
+ * and the complicated alternative down below is quite a bit faster. Sad...
+ */
+
+LeaveLoopCmps: bsf %rax, %rax /* find the first non-zero bit */
+ shrl $3, %eax /* divide by 8 to get the byte */
+ add %rax, %rdx
+# else
+LeaveLoopCmps16:
+ add $8, %rdx
+LeaveLoopCmps8:
+ add $8, %rdx
+LeaveLoopCmps: testl $0xFFFFFFFF, %eax /* Check the first 4 bytes */
+ jnz Check16
+ add $4, %rdx
+ shr $32, %rax
+Check16: testw $0xFFFF, %ax
+ jnz LenLower
+ add $2, %rdx
+ shrl $16, %eax
+LenLower: subb $1, %al
+ adc $0, %rdx
+# endif
+#endif
+
+/* Calculate the length of the match. If it is longer than MAX_MATCH, */
+/* then automatically accept it as the best possible match and leave. */
+
+ lea (%prev, %rdx), %rax
+ sub %scan, %rax
+ cmpl $MAX_MATCH, %eax
+ jge LenMaximum
+
+/* If the length of the match is not longer than the best match we */
+/* have so far, then forget it and return to the lookup loop. */
+
+ cmpl %bestlend, %eax
+ jg LongerMatch
+ mov _windowbestlen, %windowbestlen
+ mov dsPrev, %prev
+ movl _chainlenwmask, %edx
+ jmp LookupLoop
+
+/* s->match_start = cur_match; */
+/* best_len = len; */
+/* if (len >= nice_match) break; */
+/* scan_end = *(ushf*)(scan+best_len-1); */
+
+LongerMatch:
+ movl %eax, %bestlend
+ movl %curmatchd, dsMatchStart
+ cmpl %nicematch, %eax
+ jge LeaveNow
+
+ lea (%window, %bestlen), %windowbestlen
+ mov %windowbestlen, _windowbestlen
+
+ movzwl -1(%scan, %rax), %scanend
+ mov dsPrev, %prev
+ movl _chainlenwmask, %chainlenwmask
+ jmp LookupLoop
+
+/* Accept the current string, with the maximum possible length. */
+
+LenMaximum:
+ movl $MAX_MATCH, %bestlend
+ movl %curmatchd, dsMatchStart
+
+/* if ((uInt)best_len <= s->lookahead) return (uInt)best_len; */
+/* return s->lookahead; */
+
+LeaveNow:
+ movl dsLookahead, %eax
+ cmpl %eax, %bestlend
+ cmovngl %bestlend, %eax
+LookaheadRet:
+
+/* Restore the registers and return from whence we came. */
+
+ mov save_rsi, %rsi
+ mov save_rbx, %rbx
+ mov save_r12, %r12
+ mov save_r13, %r13
+ mov save_r14, %r14
+ mov save_r15, %r15
+
+ ret
+
+match_init: ret
diff --git a/contrib/zlib/contrib/asm686/README.686 b/contrib/zlib/contrib/asm686/README.686
new file mode 100644
index 000000000..a0bf3bea4
--- /dev/null
+++ b/contrib/zlib/contrib/asm686/README.686
@@ -0,0 +1,51 @@
+This is a patched version of zlib, modified to use
+Pentium-Pro-optimized assembly code in the deflation algorithm. The
+files changed/added by this patch are:
+
+README.686
+match.S
+
+The speedup that this patch provides varies, depending on whether the
+compiler used to build the original version of zlib falls afoul of the
+PPro's speed traps. My own tests show a speedup of around 10-20% at
+the default compression level, and 20-30% using -9, against a version
+compiled using gcc 2.7.2.3. Your mileage may vary.
+
+Note that this code has been tailored for the PPro/PII in particular,
+and will not perform particuarly well on a Pentium.
+
+If you are using an assembler other than GNU as, you will have to
+translate match.S to use your assembler's syntax. (Have fun.)
+
+Brian Raiter
+breadbox@muppetlabs.com
+April, 1998
+
+
+Added for zlib 1.1.3:
+
+The patches come from
+http://www.muppetlabs.com/~breadbox/software/assembly.html
+
+To compile zlib with this asm file, copy match.S to the zlib directory
+then do:
+
+CFLAGS="-O3 -DASMV" ./configure
+make OBJA=match.o
+
+
+Update:
+
+I've been ignoring these assembly routines for years, believing that
+gcc's generated code had caught up with it sometime around gcc 2.95
+and the major rearchitecting of the Pentium 4. However, I recently
+learned that, despite what I believed, this code still has some life
+in it. On the Pentium 4 and AMD64 chips, it continues to run about 8%
+faster than the code produced by gcc 4.1.
+
+In acknowledgement of its continuing usefulness, I've altered the
+license to match that of the rest of zlib. Share and Enjoy!
+
+Brian Raiter
+breadbox@muppetlabs.com
+April, 2007
diff --git a/contrib/zlib/contrib/asm686/match.S b/contrib/zlib/contrib/asm686/match.S
new file mode 100644
index 000000000..fa4210927
--- /dev/null
+++ b/contrib/zlib/contrib/asm686/match.S
@@ -0,0 +1,357 @@
+/* match.S -- x86 assembly version of the zlib longest_match() function.
+ * Optimized for the Intel 686 chips (PPro and later).
+ *
+ * Copyright (C) 1998, 2007 Brian Raiter <breadbox@muppetlabs.com>
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty. In no event will the author be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ * claim that you wrote the original software. If you use this software
+ * in a product, an acknowledgment in the product documentation would be
+ * appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ * misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ */
+
+#ifndef NO_UNDERLINE
+#define match_init _match_init
+#define longest_match _longest_match
+#endif
+
+#define MAX_MATCH (258)
+#define MIN_MATCH (3)
+#define MIN_LOOKAHEAD (MAX_MATCH + MIN_MATCH + 1)
+#define MAX_MATCH_8 ((MAX_MATCH + 7) & ~7)
+
+/* stack frame offsets */
+
+#define chainlenwmask 0 /* high word: current chain len */
+ /* low word: s->wmask */
+#define window 4 /* local copy of s->window */
+#define windowbestlen 8 /* s->window + bestlen */
+#define scanstart 16 /* first two bytes of string */
+#define scanend 12 /* last two bytes of string */
+#define scanalign 20 /* dword-misalignment of string */
+#define nicematch 24 /* a good enough match size */
+#define bestlen 28 /* size of best match so far */
+#define scan 32 /* ptr to string wanting match */
+
+#define LocalVarsSize (36)
+/* saved ebx 36 */
+/* saved edi 40 */
+/* saved esi 44 */
+/* saved ebp 48 */
+/* return address 52 */
+#define deflatestate 56 /* the function arguments */
+#define curmatch 60
+
+/* All the +zlib1222add offsets are due to the addition of fields
+ * in zlib in the deflate_state structure since the asm code was first written
+ * (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)").
+ * (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0").
+ * if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8").
+ */
+
+#define zlib1222add (8)
+
+#define dsWSize (36+zlib1222add)
+#define dsWMask (44+zlib1222add)
+#define dsWindow (48+zlib1222add)
+#define dsPrev (56+zlib1222add)
+#define dsMatchLen (88+zlib1222add)
+#define dsPrevMatch (92+zlib1222add)
+#define dsStrStart (100+zlib1222add)
+#define dsMatchStart (104+zlib1222add)
+#define dsLookahead (108+zlib1222add)
+#define dsPrevLen (112+zlib1222add)
+#define dsMaxChainLen (116+zlib1222add)
+#define dsGoodMatch (132+zlib1222add)
+#define dsNiceMatch (136+zlib1222add)
+
+
+.file "match.S"
+
+.globl match_init, longest_match
+
+.text
+
+/* uInt longest_match(deflate_state *deflatestate, IPos curmatch) */
+.cfi_sections .debug_frame
+
+longest_match:
+
+.cfi_startproc
+/* Save registers that the compiler may be using, and adjust %esp to */
+/* make room for our stack frame. */
+
+ pushl %ebp
+ .cfi_def_cfa_offset 8
+ .cfi_offset ebp, -8
+ pushl %edi
+ .cfi_def_cfa_offset 12
+ pushl %esi
+ .cfi_def_cfa_offset 16
+ pushl %ebx
+ .cfi_def_cfa_offset 20
+ subl $LocalVarsSize, %esp
+ .cfi_def_cfa_offset LocalVarsSize+20
+
+/* Retrieve the function arguments. %ecx will hold cur_match */
+/* throughout the entire function. %edx will hold the pointer to the */
+/* deflate_state structure during the function's setup (before */
+/* entering the main loop). */
+
+ movl deflatestate(%esp), %edx
+ movl curmatch(%esp), %ecx
+
+/* uInt wmask = s->w_mask; */
+/* unsigned chain_length = s->max_chain_length; */
+/* if (s->prev_length >= s->good_match) { */
+/* chain_length >>= 2; */
+/* } */
+
+ movl dsPrevLen(%edx), %eax
+ movl dsGoodMatch(%edx), %ebx
+ cmpl %ebx, %eax
+ movl dsWMask(%edx), %eax
+ movl dsMaxChainLen(%edx), %ebx
+ jl LastMatchGood
+ shrl $2, %ebx
+LastMatchGood:
+
+/* chainlen is decremented once beforehand so that the function can */
+/* use the sign flag instead of the zero flag for the exit test. */
+/* It is then shifted into the high word, to make room for the wmask */
+/* value, which it will always accompany. */
+
+ decl %ebx
+ shll $16, %ebx
+ orl %eax, %ebx
+ movl %ebx, chainlenwmask(%esp)
+
+/* if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; */
+
+ movl dsNiceMatch(%edx), %eax
+ movl dsLookahead(%edx), %ebx
+ cmpl %eax, %ebx
+ jl LookaheadLess
+ movl %eax, %ebx
+LookaheadLess: movl %ebx, nicematch(%esp)
+
+/* register Bytef *scan = s->window + s->strstart; */
+
+ movl dsWindow(%edx), %esi
+ movl %esi, window(%esp)
+ movl dsStrStart(%edx), %ebp
+ lea (%esi,%ebp), %edi
+ movl %edi, scan(%esp)
+
+/* Determine how many bytes the scan ptr is off from being */
+/* dword-aligned. */
+
+ movl %edi, %eax
+ negl %eax
+ andl $3, %eax
+ movl %eax, scanalign(%esp)
+
+/* IPos limit = s->strstart > (IPos)MAX_DIST(s) ? */
+/* s->strstart - (IPos)MAX_DIST(s) : NIL; */
+
+ movl dsWSize(%edx), %eax
+ subl $MIN_LOOKAHEAD, %eax
+ subl %eax, %ebp
+ jg LimitPositive
+ xorl %ebp, %ebp
+LimitPositive:
+
+/* int best_len = s->prev_length; */
+
+ movl dsPrevLen(%edx), %eax
+ movl %eax, bestlen(%esp)
+
+/* Store the sum of s->window + best_len in %esi locally, and in %esi. */
+
+ addl %eax, %esi
+ movl %esi, windowbestlen(%esp)
+
+/* register ush scan_start = *(ushf*)scan; */
+/* register ush scan_end = *(ushf*)(scan+best_len-1); */
+/* Posf *prev = s->prev; */
+
+ movzwl (%edi), %ebx
+ movl %ebx, scanstart(%esp)
+ movzwl -1(%edi,%eax), %ebx
+ movl %ebx, scanend(%esp)
+ movl dsPrev(%edx), %edi
+
+/* Jump into the main loop. */
+
+ movl chainlenwmask(%esp), %edx
+ jmp LoopEntry
+
+.balign 16
+
+/* do {
+ * match = s->window + cur_match;
+ * if (*(ushf*)(match+best_len-1) != scan_end ||
+ * *(ushf*)match != scan_start) continue;
+ * [...]
+ * } while ((cur_match = prev[cur_match & wmask]) > limit
+ * && --chain_length != 0);
+ *
+ * Here is the inner loop of the function. The function will spend the
+ * majority of its time in this loop, and majority of that time will
+ * be spent in the first ten instructions.
+ *
+ * Within this loop:
+ * %ebx = scanend
+ * %ecx = curmatch
+ * %edx = chainlenwmask - i.e., ((chainlen << 16) | wmask)
+ * %esi = windowbestlen - i.e., (window + bestlen)
+ * %edi = prev
+ * %ebp = limit
+ */
+LookupLoop:
+ andl %edx, %ecx
+ movzwl (%edi,%ecx,2), %ecx
+ cmpl %ebp, %ecx
+ jbe LeaveNow
+ subl $0x00010000, %edx
+ js LeaveNow
+LoopEntry: movzwl -1(%esi,%ecx), %eax
+ cmpl %ebx, %eax
+ jnz LookupLoop
+ movl window(%esp), %eax
+ movzwl (%eax,%ecx), %eax
+ cmpl scanstart(%esp), %eax
+ jnz LookupLoop
+
+/* Store the current value of chainlen. */
+
+ movl %edx, chainlenwmask(%esp)
+
+/* Point %edi to the string under scrutiny, and %esi to the string we */
+/* are hoping to match it up with. In actuality, %esi and %edi are */
+/* both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and %edx is */
+/* initialized to -(MAX_MATCH_8 - scanalign). */
+
+ movl window(%esp), %esi
+ movl scan(%esp), %edi
+ addl %ecx, %esi
+ movl scanalign(%esp), %eax
+ movl $(-MAX_MATCH_8), %edx
+ lea MAX_MATCH_8(%edi,%eax), %edi
+ lea MAX_MATCH_8(%esi,%eax), %esi
+
+/* Test the strings for equality, 8 bytes at a time. At the end,
+ * adjust %edx so that it is offset to the exact byte that mismatched.
+ *
+ * We already know at this point that the first three bytes of the
+ * strings match each other, and they can be safely passed over before
+ * starting the compare loop. So what this code does is skip over 0-3
+ * bytes, as much as necessary in order to dword-align the %edi
+ * pointer. (%esi will still be misaligned three times out of four.)
+ *
+ * It should be confessed that this loop usually does not represent
+ * much of the total running time. Replacing it with a more
+ * straightforward "rep cmpsb" would not drastically degrade
+ * performance.
+ */
+LoopCmps:
+ movl (%esi,%edx), %eax
+ xorl (%edi,%edx), %eax
+ jnz LeaveLoopCmps
+ movl 4(%esi,%edx), %eax
+ xorl 4(%edi,%edx), %eax
+ jnz LeaveLoopCmps4
+ addl $8, %edx
+ jnz LoopCmps
+ jmp LenMaximum
+LeaveLoopCmps4: addl $4, %edx
+LeaveLoopCmps: testl $0x0000FFFF, %eax
+ jnz LenLower
+ addl $2, %edx
+ shrl $16, %eax
+LenLower: subb $1, %al
+ adcl $0, %edx
+
+/* Calculate the length of the match. If it is longer than MAX_MATCH, */
+/* then automatically accept it as the best possible match and leave. */
+
+ lea (%edi,%edx), %eax
+ movl scan(%esp), %edi
+ subl %edi, %eax
+ cmpl $MAX_MATCH, %eax
+ jge LenMaximum
+
+/* If the length of the match is not longer than the best match we */
+/* have so far, then forget it and return to the lookup loop. */
+
+ movl deflatestate(%esp), %edx
+ movl bestlen(%esp), %ebx
+ cmpl %ebx, %eax
+ jg LongerMatch
+ movl windowbestlen(%esp), %esi
+ movl dsPrev(%edx), %edi
+ movl scanend(%esp), %ebx
+ movl chainlenwmask(%esp), %edx
+ jmp LookupLoop
+
+/* s->match_start = cur_match; */
+/* best_len = len; */
+/* if (len >= nice_match) break; */
+/* scan_end = *(ushf*)(scan+best_len-1); */
+
+LongerMatch: movl nicematch(%esp), %ebx
+ movl %eax, bestlen(%esp)
+ movl %ecx, dsMatchStart(%edx)
+ cmpl %ebx, %eax
+ jge LeaveNow
+ movl window(%esp), %esi
+ addl %eax, %esi
+ movl %esi, windowbestlen(%esp)
+ movzwl -1(%edi,%eax), %ebx
+ movl dsPrev(%edx), %edi
+ movl %ebx, scanend(%esp)
+ movl chainlenwmask(%esp), %edx
+ jmp LookupLoop
+
+/* Accept the current string, with the maximum possible length. */
+
+LenMaximum: movl deflatestate(%esp), %edx
+ movl $MAX_MATCH, bestlen(%esp)
+ movl %ecx, dsMatchStart(%edx)
+
+/* if ((uInt)best_len <= s->lookahead) return (uInt)best_len; */
+/* return s->lookahead; */
+
+LeaveNow:
+ movl deflatestate(%esp), %edx
+ movl bestlen(%esp), %ebx
+ movl dsLookahead(%edx), %eax
+ cmpl %eax, %ebx
+ jg LookaheadRet
+ movl %ebx, %eax
+LookaheadRet:
+
+/* Restore the stack and return from whence we came. */
+
+ addl $LocalVarsSize, %esp
+ .cfi_def_cfa_offset 20
+ popl %ebx
+ .cfi_def_cfa_offset 16
+ popl %esi
+ .cfi_def_cfa_offset 12
+ popl %edi
+ .cfi_def_cfa_offset 8
+ popl %ebp
+ .cfi_def_cfa_offset 4
+.cfi_endproc
+match_init: ret
diff --git a/contrib/zlib/contrib/blast/README b/contrib/zlib/contrib/blast/README
new file mode 100644
index 000000000..e3a60b3f5
--- /dev/null
+++ b/contrib/zlib/contrib/blast/README
@@ -0,0 +1,4 @@
+Read blast.h for purpose and usage.
+
+Mark Adler
+madler@alumni.caltech.edu
diff --git a/contrib/zlib/contrib/blast/blast.c b/contrib/zlib/contrib/blast/blast.c
new file mode 100644
index 000000000..e6e659073
--- /dev/null
+++ b/contrib/zlib/contrib/blast/blast.c
@@ -0,0 +1,466 @@
+/* blast.c
+ * Copyright (C) 2003, 2012, 2013 Mark Adler
+ * For conditions of distribution and use, see copyright notice in blast.h
+ * version 1.3, 24 Aug 2013
+ *
+ * blast.c decompresses data compressed by the PKWare Compression Library.
+ * This function provides functionality similar to the explode() function of
+ * the PKWare library, hence the name "blast".
+ *
+ * This decompressor is based on the excellent format description provided by
+ * Ben Rudiak-Gould in comp.compression on August 13, 2001. Interestingly, the
+ * example Ben provided in the post is incorrect. The distance 110001 should
+ * instead be 111000. When corrected, the example byte stream becomes:
+ *
+ * 00 04 82 24 25 8f 80 7f
+ *
+ * which decompresses to "AIAIAIAIAIAIA" (without the quotes).
+ */
+
+/*
+ * Change history:
+ *
+ * 1.0 12 Feb 2003 - First version
+ * 1.1 16 Feb 2003 - Fixed distance check for > 4 GB uncompressed data
+ * 1.2 24 Oct 2012 - Add note about using binary mode in stdio
+ * - Fix comparisons of differently signed integers
+ * 1.3 24 Aug 2013 - Return unused input from blast()
+ * - Fix test code to correctly report unused input
+ * - Enable the provision of initial input to blast()
+ */
+
+#include <stddef.h> /* for NULL */
+#include <setjmp.h> /* for setjmp(), longjmp(), and jmp_buf */
+#include "blast.h" /* prototype for blast() */
+
+#define local static /* for local function definitions */
+#define MAXBITS 13 /* maximum code length */
+#define MAXWIN 4096 /* maximum window size */
+
+/* input and output state */
+struct state {
+ /* input state */
+ blast_in infun; /* input function provided by user */
+ void *inhow; /* opaque information passed to infun() */
+ unsigned char *in; /* next input location */
+ unsigned left; /* available input at in */
+ int bitbuf; /* bit buffer */
+ int bitcnt; /* number of bits in bit buffer */
+
+ /* input limit error return state for bits() and decode() */
+ jmp_buf env;
+
+ /* output state */
+ blast_out outfun; /* output function provided by user */
+ void *outhow; /* opaque information passed to outfun() */
+ unsigned next; /* index of next write location in out[] */
+ int first; /* true to check distances (for first 4K) */
+ unsigned char out[MAXWIN]; /* output buffer and sliding window */
+};
+
+/*
+ * Return need bits from the input stream. This always leaves less than
+ * eight bits in the buffer. bits() works properly for need == 0.
+ *
+ * Format notes:
+ *
+ * - Bits are stored in bytes from the least significant bit to the most
+ * significant bit. Therefore bits are dropped from the bottom of the bit
+ * buffer, using shift right, and new bytes are appended to the top of the
+ * bit buffer, using shift left.
+ */
+local int bits(struct state *s, int need)
+{
+ int val; /* bit accumulator */
+
+ /* load at least need bits into val */
+ val = s->bitbuf;
+ while (s->bitcnt < need) {
+ if (s->left == 0) {
+ s->left = s->infun(s->inhow, &(s->in));
+ if (s->left == 0) longjmp(s->env, 1); /* out of input */
+ }
+ val |= (int)(*(s->in)++) << s->bitcnt; /* load eight bits */
+ s->left--;
+ s->bitcnt += 8;
+ }
+
+ /* drop need bits and update buffer, always zero to seven bits left */
+ s->bitbuf = val >> need;
+ s->bitcnt -= need;
+
+ /* return need bits, zeroing the bits above that */
+ return val & ((1 << need) - 1);
+}
+
+/*
+ * Huffman code decoding tables. count[1..MAXBITS] is the number of symbols of
+ * each length, which for a canonical code are stepped through in order.
+ * symbol[] are the symbol values in canonical order, where the number of
+ * entries is the sum of the counts in count[]. The decoding process can be
+ * seen in the function decode() below.
+ */
+struct huffman {
+ short *count; /* number of symbols of each length */
+ short *symbol; /* canonically ordered symbols */
+};
+
+/*
+ * Decode a code from the stream s using huffman table h. Return the symbol or
+ * a negative value if there is an error. If all of the lengths are zero, i.e.
+ * an empty code, or if the code is incomplete and an invalid code is received,
+ * then -9 is returned after reading MAXBITS bits.
+ *
+ * Format notes:
+ *
+ * - The codes as stored in the compressed data are bit-reversed relative to
+ * a simple integer ordering of codes of the same lengths. Hence below the
+ * bits are pulled from the compressed data one at a time and used to
+ * build the code value reversed from what is in the stream in order to
+ * permit simple integer comparisons for decoding.
+ *
+ * - The first code for the shortest length is all ones. Subsequent codes of
+ * the same length are simply integer decrements of the previous code. When
+ * moving up a length, a one bit is appended to the code. For a complete
+ * code, the last code of the longest length will be all zeros. To support
+ * this ordering, the bits pulled during decoding are inverted to apply the
+ * more "natural" ordering starting with all zeros and incrementing.
+ */
+local int decode(struct state *s, struct huffman *h)
+{
+ int len; /* current number of bits in code */
+ int code; /* len bits being decoded */
+ int first; /* first code of length len */
+ int count; /* number of codes of length len */
+ int index; /* index of first code of length len in symbol table */
+ int bitbuf; /* bits from stream */
+ int left; /* bits left in next or left to process */
+ short *next; /* next number of codes */
+
+ bitbuf = s->bitbuf;
+ left = s->bitcnt;
+ code = first = index = 0;
+ len = 1;
+ next = h->count + 1;
+ while (1) {
+ while (left--) {
+ code |= (bitbuf & 1) ^ 1; /* invert code */
+ bitbuf >>= 1;
+ count = *next++;
+ if (code < first + count) { /* if length len, return symbol */
+ s->bitbuf = bitbuf;
+ s->bitcnt = (s->bitcnt - len) & 7;
+ return h->symbol[index + (code - first)];
+ }
+ index += count; /* else update for next length */
+ first += count;
+ first <<= 1;
+ code <<= 1;
+ len++;
+ }
+ left = (MAXBITS+1) - len;
+ if (left == 0) break;
+ if (s->left == 0) {
+ s->left = s->infun(s->inhow, &(s->in));
+ if (s->left == 0) longjmp(s->env, 1); /* out of input */
+ }
+ bitbuf = *(s->in)++;
+ s->left--;
+ if (left > 8) left = 8;
+ }
+ return -9; /* ran out of codes */
+}
+
+/*
+ * Given a list of repeated code lengths rep[0..n-1], where each byte is a
+ * count (high four bits + 1) and a code length (low four bits), generate the
+ * list of code lengths. This compaction reduces the size of the object code.
+ * Then given the list of code lengths length[0..n-1] representing a canonical
+ * Huffman code for n symbols, construct the tables required to decode those
+ * codes. Those tables are the number of codes of each length, and the symbols
+ * sorted by length, retaining their original order within each length. The
+ * return value is zero for a complete code set, negative for an over-
+ * subscribed code set, and positive for an incomplete code set. The tables
+ * can be used if the return value is zero or positive, but they cannot be used
+ * if the return value is negative. If the return value is zero, it is not
+ * possible for decode() using that table to return an error--any stream of
+ * enough bits will resolve to a symbol. If the return value is positive, then
+ * it is possible for decode() using that table to return an error for received
+ * codes past the end of the incomplete lengths.
+ */
+local int construct(struct huffman *h, const unsigned char *rep, int n)
+{
+ int symbol; /* current symbol when stepping through length[] */
+ int len; /* current length when stepping through h->count[] */
+ int left; /* number of possible codes left of current length */
+ short offs[MAXBITS+1]; /* offsets in symbol table for each length */
+ short length[256]; /* code lengths */
+
+ /* convert compact repeat counts into symbol bit length list */
+ symbol = 0;
+ do {
+ len = *rep++;
+ left = (len >> 4) + 1;
+ len &= 15;
+ do {
+ length[symbol++] = len;
+ } while (--left);
+ } while (--n);
+ n = symbol;
+
+ /* count number of codes of each length */
+ for (len = 0; len <= MAXBITS; len++)
+ h->count[len] = 0;
+ for (symbol = 0; symbol < n; symbol++)
+ (h->count[length[symbol]])++; /* assumes lengths are within bounds */
+ if (h->count[0] == n) /* no codes! */
+ return 0; /* complete, but decode() will fail */
+
+ /* check for an over-subscribed or incomplete set of lengths */
+ left = 1; /* one possible code of zero length */
+ for (len = 1; len <= MAXBITS; len++) {
+ left <<= 1; /* one more bit, double codes left */
+ left -= h->count[len]; /* deduct count from possible codes */
+ if (left < 0) return left; /* over-subscribed--return negative */
+ } /* left > 0 means incomplete */
+
+ /* generate offsets into symbol table for each length for sorting */
+ offs[1] = 0;
+ for (len = 1; len < MAXBITS; len++)
+ offs[len + 1] = offs[len] + h->count[len];
+
+ /*
+ * put symbols in table sorted by length, by symbol order within each
+ * length
+ */
+ for (symbol = 0; symbol < n; symbol++)
+ if (length[symbol] != 0)
+ h->symbol[offs[length[symbol]]++] = symbol;
+
+ /* return zero for complete set, positive for incomplete set */
+ return left;
+}
+
+/*
+ * Decode PKWare Compression Library stream.
+ *
+ * Format notes:
+ *
+ * - First byte is 0 if literals are uncoded or 1 if they are coded. Second
+ * byte is 4, 5, or 6 for the number of extra bits in the distance code.
+ * This is the base-2 logarithm of the dictionary size minus six.
+ *
+ * - Compressed data is a combination of literals and length/distance pairs
+ * terminated by an end code. Literals are either Huffman coded or
+ * uncoded bytes. A length/distance pair is a coded length followed by a
+ * coded distance to represent a string that occurs earlier in the
+ * uncompressed data that occurs again at the current location.
+ *
+ * - A bit preceding a literal or length/distance pair indicates which comes
+ * next, 0 for literals, 1 for length/distance.
+ *
+ * - If literals are uncoded, then the next eight bits are the literal, in the
+ * normal bit order in the stream, i.e. no bit-reversal is needed. Similarly,
+ * no bit reversal is needed for either the length extra bits or the distance
+ * extra bits.
+ *
+ * - Literal bytes are simply written to the output. A length/distance pair is
+ * an instruction to copy previously uncompressed bytes to the output. The
+ * copy is from distance bytes back in the output stream, copying for length
+ * bytes.
+ *
+ * - Distances pointing before the beginning of the output data are not
+ * permitted.
+ *
+ * - Overlapped copies, where the length is greater than the distance, are
+ * allowed and common. For example, a distance of one and a length of 518
+ * simply copies the last byte 518 times. A distance of four and a length of
+ * twelve copies the last four bytes three times. A simple forward copy
+ * ignoring whether the length is greater than the distance or not implements
+ * this correctly.
+ */
+local int decomp(struct state *s)
+{
+ int lit; /* true if literals are coded */
+ int dict; /* log2(dictionary size) - 6 */
+ int symbol; /* decoded symbol, extra bits for distance */
+ int len; /* length for copy */
+ unsigned dist; /* distance for copy */
+ int copy; /* copy counter */
+ unsigned char *from, *to; /* copy pointers */
+ static int virgin = 1; /* build tables once */
+ static short litcnt[MAXBITS+1], litsym[256]; /* litcode memory */
+ static short lencnt[MAXBITS+1], lensym[16]; /* lencode memory */
+ static short distcnt[MAXBITS+1], distsym[64]; /* distcode memory */
+ static struct huffman litcode = {litcnt, litsym}; /* length code */
+ static struct huffman lencode = {lencnt, lensym}; /* length code */
+ static struct huffman distcode = {distcnt, distsym};/* distance code */
+ /* bit lengths of literal codes */
+ static const unsigned char litlen[] = {
+ 11, 124, 8, 7, 28, 7, 188, 13, 76, 4, 10, 8, 12, 10, 12, 10, 8, 23, 8,
+ 9, 7, 6, 7, 8, 7, 6, 55, 8, 23, 24, 12, 11, 7, 9, 11, 12, 6, 7, 22, 5,
+ 7, 24, 6, 11, 9, 6, 7, 22, 7, 11, 38, 7, 9, 8, 25, 11, 8, 11, 9, 12,
+ 8, 12, 5, 38, 5, 38, 5, 11, 7, 5, 6, 21, 6, 10, 53, 8, 7, 24, 10, 27,
+ 44, 253, 253, 253, 252, 252, 252, 13, 12, 45, 12, 45, 12, 61, 12, 45,
+ 44, 173};
+ /* bit lengths of length codes 0..15 */
+ static const unsigned char lenlen[] = {2, 35, 36, 53, 38, 23};
+ /* bit lengths of distance codes 0..63 */
+ static const unsigned char distlen[] = {2, 20, 53, 230, 247, 151, 248};
+ static const short base[16] = { /* base for length codes */
+ 3, 2, 4, 5, 6, 7, 8, 9, 10, 12, 16, 24, 40, 72, 136, 264};
+ static const char extra[16] = { /* extra bits for length codes */
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8};
+
+ /* set up decoding tables (once--might not be thread-safe) */
+ if (virgin) {
+ construct(&litcode, litlen, sizeof(litlen));
+ construct(&lencode, lenlen, sizeof(lenlen));
+ construct(&distcode, distlen, sizeof(distlen));
+ virgin = 0;
+ }
+
+ /* read header */
+ lit = bits(s, 8);
+ if (lit > 1) return -1;
+ dict = bits(s, 8);
+ if (dict < 4 || dict > 6) return -2;
+
+ /* decode literals and length/distance pairs */
+ do {
+ if (bits(s, 1)) {
+ /* get length */
+ symbol = decode(s, &lencode);
+ len = base[symbol] + bits(s, extra[symbol]);
+ if (len == 519) break; /* end code */
+
+ /* get distance */
+ symbol = len == 2 ? 2 : dict;
+ dist = decode(s, &distcode) << symbol;
+ dist += bits(s, symbol);
+ dist++;
+ if (s->first && dist > s->next)
+ return -3; /* distance too far back */
+
+ /* copy length bytes from distance bytes back */
+ do {
+ to = s->out + s->next;
+ from = to - dist;
+ copy = MAXWIN;
+ if (s->next < dist) {
+ from += copy;
+ copy = dist;
+ }
+ copy -= s->next;
+ if (copy > len) copy = len;
+ len -= copy;
+ s->next += copy;
+ do {
+ *to++ = *from++;
+ } while (--copy);
+ if (s->next == MAXWIN) {
+ if (s->outfun(s->outhow, s->out, s->next)) return 1;
+ s->next = 0;
+ s->first = 0;
+ }
+ } while (len != 0);
+ }
+ else {
+ /* get literal and write it */
+ symbol = lit ? decode(s, &litcode) : bits(s, 8);
+ s->out[s->next++] = symbol;
+ if (s->next == MAXWIN) {
+ if (s->outfun(s->outhow, s->out, s->next)) return 1;
+ s->next = 0;
+ s->first = 0;
+ }
+ }
+ } while (1);
+ return 0;
+}
+
+/* See comments in blast.h */
+int blast(blast_in infun, void *inhow, blast_out outfun, void *outhow,
+ unsigned *left, unsigned char **in)
+{
+ struct state s; /* input/output state */
+ int err; /* return value */
+
+ /* initialize input state */
+ s.infun = infun;
+ s.inhow = inhow;
+ if (left != NULL && *left) {
+ s.left = *left;
+ s.in = *in;
+ }
+ else
+ s.left = 0;
+ s.bitbuf = 0;
+ s.bitcnt = 0;
+
+ /* initialize output state */
+ s.outfun = outfun;
+ s.outhow = outhow;
+ s.next = 0;
+ s.first = 1;
+
+ /* return if bits() or decode() tries to read past available input */
+ if (setjmp(s.env) != 0) /* if came back here via longjmp(), */
+ err = 2; /* then skip decomp(), return error */
+ else
+ err = decomp(&s); /* decompress */
+
+ /* return unused input */
+ if (left != NULL)
+ *left = s.left;
+ if (in != NULL)
+ *in = s.left ? s.in : NULL;
+
+ /* write any leftover output and update the error code if needed */
+ if (err != 1 && s.next && s.outfun(s.outhow, s.out, s.next) && err == 0)
+ err = 1;
+ return err;
+}
+
+#ifdef TEST
+/* Example of how to use blast() */
+#include <stdio.h>
+#include <stdlib.h>
+
+#define CHUNK 16384
+
+local unsigned inf(void *how, unsigned char **buf)
+{
+ static unsigned char hold[CHUNK];
+
+ *buf = hold;
+ return fread(hold, 1, CHUNK, (FILE *)how);
+}
+
+local int outf(void *how, unsigned char *buf, unsigned len)
+{
+ return fwrite(buf, 1, len, (FILE *)how) != len;
+}
+
+/* Decompress a PKWare Compression Library stream from stdin to stdout */
+int main(void)
+{
+ int ret;
+ unsigned left;
+
+ /* decompress to stdout */
+ left = 0;
+ ret = blast(inf, stdin, outf, stdout, &left, NULL);
+ if (ret != 0)
+ fprintf(stderr, "blast error: %d\n", ret);
+
+ /* count any leftover bytes */
+ while (getchar() != EOF)
+ left++;
+ if (left)
+ fprintf(stderr, "blast warning: %u unused bytes of input\n", left);
+
+ /* return blast() error code */
+ return ret;
+}
+#endif
diff --git a/contrib/zlib/contrib/blast/blast.h b/contrib/zlib/contrib/blast/blast.h
new file mode 100644
index 000000000..6cf65eda1
--- /dev/null
+++ b/contrib/zlib/contrib/blast/blast.h
@@ -0,0 +1,83 @@
+/* blast.h -- interface for blast.c
+ Copyright (C) 2003, 2012, 2013 Mark Adler
+ version 1.3, 24 Aug 2013
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the author be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+ Mark Adler madler@alumni.caltech.edu
+ */
+
+
+/*
+ * blast() decompresses the PKWare Data Compression Library (DCL) compressed
+ * format. It provides the same functionality as the explode() function in
+ * that library. (Note: PKWare overused the "implode" verb, and the format
+ * used by their library implode() function is completely different and
+ * incompatible with the implode compression method supported by PKZIP.)
+ *
+ * The binary mode for stdio functions should be used to assure that the
+ * compressed data is not corrupted when read or written. For example:
+ * fopen(..., "rb") and fopen(..., "wb").
+ */
+
+
+typedef unsigned (*blast_in)(void *how, unsigned char **buf);
+typedef int (*blast_out)(void *how, unsigned char *buf, unsigned len);
+/* Definitions for input/output functions passed to blast(). See below for
+ * what the provided functions need to do.
+ */
+
+
+int blast(blast_in infun, void *inhow, blast_out outfun, void *outhow,
+ unsigned *left, unsigned char **in);
+/* Decompress input to output using the provided infun() and outfun() calls.
+ * On success, the return value of blast() is zero. If there is an error in
+ * the source data, i.e. it is not in the proper format, then a negative value
+ * is returned. If there is not enough input available or there is not enough
+ * output space, then a positive error is returned.
+ *
+ * The input function is invoked: len = infun(how, &buf), where buf is set by
+ * infun() to point to the input buffer, and infun() returns the number of
+ * available bytes there. If infun() returns zero, then blast() returns with
+ * an input error. (blast() only asks for input if it needs it.) inhow is for
+ * use by the application to pass an input descriptor to infun(), if desired.
+ *
+ * If left and in are not NULL and *left is not zero when blast() is called,
+ * then the *left bytes are *in are consumed for input before infun() is used.
+ *
+ * The output function is invoked: err = outfun(how, buf, len), where the bytes
+ * to be written are buf[0..len-1]. If err is not zero, then blast() returns
+ * with an output error. outfun() is always called with len <= 4096. outhow
+ * is for use by the application to pass an output descriptor to outfun(), if
+ * desired.
+ *
+ * If there is any unused input, *left is set to the number of bytes that were
+ * read and *in points to them. Otherwise *left is set to zero and *in is set
+ * to NULL. If left or in are NULL, then they are not set.
+ *
+ * The return codes are:
+ *
+ * 2: ran out of input before completing decompression
+ * 1: output error before completing decompression
+ * 0: successful decompression
+ * -1: literal flag not zero or one
+ * -2: dictionary size not in 4..6
+ * -3: distance is too far back
+ *
+ * At the bottom of blast.c is an example program that uses blast() that can be
+ * compiled to produce a command-line decompression filter by defining TEST.
+ */
diff --git a/contrib/zlib/contrib/blast/test.pk b/contrib/zlib/contrib/blast/test.pk
new file mode 100644
index 000000000..be10b2bbb
--- /dev/null
+++ b/contrib/zlib/contrib/blast/test.pk
Binary files differ
diff --git a/contrib/zlib/contrib/blast/test.txt b/contrib/zlib/contrib/blast/test.txt
new file mode 100644
index 000000000..bfdf1c5dc
--- /dev/null
+++ b/contrib/zlib/contrib/blast/test.txt
@@ -0,0 +1 @@
+AIAIAIAIAIAIA \ No newline at end of file
diff --git a/contrib/zlib/contrib/delphi/ZLib.pas b/contrib/zlib/contrib/delphi/ZLib.pas
new file mode 100644
index 000000000..060e19911
--- /dev/null
+++ b/contrib/zlib/contrib/delphi/ZLib.pas
@@ -0,0 +1,557 @@
+{*******************************************************}
+{ }
+{ Borland Delphi Supplemental Components }
+{ ZLIB Data Compression Interface Unit }
+{ }
+{ Copyright (c) 1997,99 Borland Corporation }
+{ }
+{*******************************************************}
+
+{ Updated for zlib 1.2.x by Cosmin Truta <cosmint@cs.ubbcluj.ro> }
+
+unit ZLib;
+
+interface
+
+uses SysUtils, Classes;
+
+type
+ TAlloc = function (AppData: Pointer; Items, Size: Integer): Pointer; cdecl;
+ TFree = procedure (AppData, Block: Pointer); cdecl;
+
+ // Internal structure. Ignore.
+ TZStreamRec = packed record
+ next_in: PChar; // next input byte
+ avail_in: Integer; // number of bytes available at next_in
+ total_in: Longint; // total nb of input bytes read so far
+
+ next_out: PChar; // next output byte should be put here
+ avail_out: Integer; // remaining free space at next_out
+ total_out: Longint; // total nb of bytes output so far
+
+ msg: PChar; // last error message, NULL if no error
+ internal: Pointer; // not visible by applications
+
+ zalloc: TAlloc; // used to allocate the internal state
+ zfree: TFree; // used to free the internal state
+ AppData: Pointer; // private data object passed to zalloc and zfree
+
+ data_type: Integer; // best guess about the data type: ascii or binary
+ adler: Longint; // adler32 value of the uncompressed data
+ reserved: Longint; // reserved for future use
+ end;
+
+ // Abstract ancestor class
+ TCustomZlibStream = class(TStream)
+ private
+ FStrm: TStream;
+ FStrmPos: Integer;
+ FOnProgress: TNotifyEvent;
+ FZRec: TZStreamRec;
+ FBuffer: array [Word] of Char;
+ protected
+ procedure Progress(Sender: TObject); dynamic;
+ property OnProgress: TNotifyEvent read FOnProgress write FOnProgress;
+ constructor Create(Strm: TStream);
+ end;
+
+{ TCompressionStream compresses data on the fly as data is written to it, and
+ stores the compressed data to another stream.
+
+ TCompressionStream is write-only and strictly sequential. Reading from the
+ stream will raise an exception. Using Seek to move the stream pointer
+ will raise an exception.
+
+ Output data is cached internally, written to the output stream only when
+ the internal output buffer is full. All pending output data is flushed
+ when the stream is destroyed.
+
+ The Position property returns the number of uncompressed bytes of
+ data that have been written to the stream so far.
+
+ CompressionRate returns the on-the-fly percentage by which the original
+ data has been compressed: (1 - (CompressedBytes / UncompressedBytes)) * 100
+ If raw data size = 100 and compressed data size = 25, the CompressionRate
+ is 75%
+
+ The OnProgress event is called each time the output buffer is filled and
+ written to the output stream. This is useful for updating a progress
+ indicator when you are writing a large chunk of data to the compression
+ stream in a single call.}
+
+
+ TCompressionLevel = (clNone, clFastest, clDefault, clMax);
+
+ TCompressionStream = class(TCustomZlibStream)
+ private
+ function GetCompressionRate: Single;
+ public
+ constructor Create(CompressionLevel: TCompressionLevel; Dest: TStream);
+ destructor Destroy; override;
+ function Read(var Buffer; Count: Longint): Longint; override;
+ function Write(const Buffer; Count: Longint): Longint; override;
+ function Seek(Offset: Longint; Origin: Word): Longint; override;
+ property CompressionRate: Single read GetCompressionRate;
+ property OnProgress;
+ end;
+
+{ TDecompressionStream decompresses data on the fly as data is read from it.
+
+ Compressed data comes from a separate source stream. TDecompressionStream
+ is read-only and unidirectional; you can seek forward in the stream, but not
+ backwards. The special case of setting the stream position to zero is
+ allowed. Seeking forward decompresses data until the requested position in
+ the uncompressed data has been reached. Seeking backwards, seeking relative
+ to the end of the stream, requesting the size of the stream, and writing to
+ the stream will raise an exception.
+
+ The Position property returns the number of bytes of uncompressed data that
+ have been read from the stream so far.
+
+ The OnProgress event is called each time the internal input buffer of
+ compressed data is exhausted and the next block is read from the input stream.
+ This is useful for updating a progress indicator when you are reading a
+ large chunk of data from the decompression stream in a single call.}
+
+ TDecompressionStream = class(TCustomZlibStream)
+ public
+ constructor Create(Source: TStream);
+ destructor Destroy; override;
+ function Read(var Buffer; Count: Longint): Longint; override;
+ function Write(const Buffer; Count: Longint): Longint; override;
+ function Seek(Offset: Longint; Origin: Word): Longint; override;
+ property OnProgress;
+ end;
+
+
+
+{ CompressBuf compresses data, buffer to buffer, in one call.
+ In: InBuf = ptr to compressed data
+ InBytes = number of bytes in InBuf
+ Out: OutBuf = ptr to newly allocated buffer containing decompressed data
+ OutBytes = number of bytes in OutBuf }
+procedure CompressBuf(const InBuf: Pointer; InBytes: Integer;
+ out OutBuf: Pointer; out OutBytes: Integer);
+
+
+{ DecompressBuf decompresses data, buffer to buffer, in one call.
+ In: InBuf = ptr to compressed data
+ InBytes = number of bytes in InBuf
+ OutEstimate = zero, or est. size of the decompressed data
+ Out: OutBuf = ptr to newly allocated buffer containing decompressed data
+ OutBytes = number of bytes in OutBuf }
+procedure DecompressBuf(const InBuf: Pointer; InBytes: Integer;
+ OutEstimate: Integer; out OutBuf: Pointer; out OutBytes: Integer);
+
+{ DecompressToUserBuf decompresses data, buffer to buffer, in one call.
+ In: InBuf = ptr to compressed data
+ InBytes = number of bytes in InBuf
+ Out: OutBuf = ptr to user-allocated buffer to contain decompressed data
+ BufSize = number of bytes in OutBuf }
+procedure DecompressToUserBuf(const InBuf: Pointer; InBytes: Integer;
+ const OutBuf: Pointer; BufSize: Integer);
+
+const
+ zlib_version = '1.2.11';
+
+type
+ EZlibError = class(Exception);
+ ECompressionError = class(EZlibError);
+ EDecompressionError = class(EZlibError);
+
+implementation
+
+uses ZLibConst;
+
+const
+ Z_NO_FLUSH = 0;
+ Z_PARTIAL_FLUSH = 1;
+ Z_SYNC_FLUSH = 2;
+ Z_FULL_FLUSH = 3;
+ Z_FINISH = 4;
+
+ Z_OK = 0;
+ Z_STREAM_END = 1;
+ Z_NEED_DICT = 2;
+ Z_ERRNO = (-1);
+ Z_STREAM_ERROR = (-2);
+ Z_DATA_ERROR = (-3);
+ Z_MEM_ERROR = (-4);
+ Z_BUF_ERROR = (-5);
+ Z_VERSION_ERROR = (-6);
+
+ Z_NO_COMPRESSION = 0;
+ Z_BEST_SPEED = 1;
+ Z_BEST_COMPRESSION = 9;
+ Z_DEFAULT_COMPRESSION = (-1);
+
+ Z_FILTERED = 1;
+ Z_HUFFMAN_ONLY = 2;
+ Z_RLE = 3;
+ Z_DEFAULT_STRATEGY = 0;
+
+ Z_BINARY = 0;
+ Z_ASCII = 1;
+ Z_UNKNOWN = 2;
+
+ Z_DEFLATED = 8;
+
+
+{$L adler32.obj}
+{$L compress.obj}
+{$L crc32.obj}
+{$L deflate.obj}
+{$L infback.obj}
+{$L inffast.obj}
+{$L inflate.obj}
+{$L inftrees.obj}
+{$L trees.obj}
+{$L uncompr.obj}
+{$L zutil.obj}
+
+procedure adler32; external;
+procedure compressBound; external;
+procedure crc32; external;
+procedure deflateInit2_; external;
+procedure deflateParams; external;
+
+function _malloc(Size: Integer): Pointer; cdecl;
+begin
+ Result := AllocMem(Size);
+end;
+
+procedure _free(Block: Pointer); cdecl;
+begin
+ FreeMem(Block);
+end;
+
+procedure _memset(P: Pointer; B: Byte; count: Integer); cdecl;
+begin
+ FillChar(P^, count, B);
+end;
+
+procedure _memcpy(dest, source: Pointer; count: Integer); cdecl;
+begin
+ Move(source^, dest^, count);
+end;
+
+
+
+// deflate compresses data
+function deflateInit_(var strm: TZStreamRec; level: Integer; version: PChar;
+ recsize: Integer): Integer; external;
+function deflate(var strm: TZStreamRec; flush: Integer): Integer; external;
+function deflateEnd(var strm: TZStreamRec): Integer; external;
+
+// inflate decompresses data
+function inflateInit_(var strm: TZStreamRec; version: PChar;
+ recsize: Integer): Integer; external;
+function inflate(var strm: TZStreamRec; flush: Integer): Integer; external;
+function inflateEnd(var strm: TZStreamRec): Integer; external;
+function inflateReset(var strm: TZStreamRec): Integer; external;
+
+
+function zlibAllocMem(AppData: Pointer; Items, Size: Integer): Pointer; cdecl;
+begin
+// GetMem(Result, Items*Size);
+ Result := AllocMem(Items * Size);
+end;
+
+procedure zlibFreeMem(AppData, Block: Pointer); cdecl;
+begin
+ FreeMem(Block);
+end;
+
+{function zlibCheck(code: Integer): Integer;
+begin
+ Result := code;
+ if code < 0 then
+ raise EZlibError.Create('error'); //!!
+end;}
+
+function CCheck(code: Integer): Integer;
+begin
+ Result := code;
+ if code < 0 then
+ raise ECompressionError.Create('error'); //!!
+end;
+
+function DCheck(code: Integer): Integer;
+begin
+ Result := code;
+ if code < 0 then
+ raise EDecompressionError.Create('error'); //!!
+end;
+
+procedure CompressBuf(const InBuf: Pointer; InBytes: Integer;
+ out OutBuf: Pointer; out OutBytes: Integer);
+var
+ strm: TZStreamRec;
+ P: Pointer;
+begin
+ FillChar(strm, sizeof(strm), 0);
+ strm.zalloc := zlibAllocMem;
+ strm.zfree := zlibFreeMem;
+ OutBytes := ((InBytes + (InBytes div 10) + 12) + 255) and not 255;
+ GetMem(OutBuf, OutBytes);
+ try
+ strm.next_in := InBuf;
+ strm.avail_in := InBytes;
+ strm.next_out := OutBuf;
+ strm.avail_out := OutBytes;
+ CCheck(deflateInit_(strm, Z_BEST_COMPRESSION, zlib_version, sizeof(strm)));
+ try
+ while CCheck(deflate(strm, Z_FINISH)) <> Z_STREAM_END do
+ begin
+ P := OutBuf;
+ Inc(OutBytes, 256);
+ ReallocMem(OutBuf, OutBytes);
+ strm.next_out := PChar(Integer(OutBuf) + (Integer(strm.next_out) - Integer(P)));
+ strm.avail_out := 256;
+ end;
+ finally
+ CCheck(deflateEnd(strm));
+ end;
+ ReallocMem(OutBuf, strm.total_out);
+ OutBytes := strm.total_out;
+ except
+ FreeMem(OutBuf);
+ raise
+ end;
+end;
+
+
+procedure DecompressBuf(const InBuf: Pointer; InBytes: Integer;
+ OutEstimate: Integer; out OutBuf: Pointer; out OutBytes: Integer);
+var
+ strm: TZStreamRec;
+ P: Pointer;
+ BufInc: Integer;
+begin
+ FillChar(strm, sizeof(strm), 0);
+ strm.zalloc := zlibAllocMem;
+ strm.zfree := zlibFreeMem;
+ BufInc := (InBytes + 255) and not 255;
+ if OutEstimate = 0 then
+ OutBytes := BufInc
+ else
+ OutBytes := OutEstimate;
+ GetMem(OutBuf, OutBytes);
+ try
+ strm.next_in := InBuf;
+ strm.avail_in := InBytes;
+ strm.next_out := OutBuf;
+ strm.avail_out := OutBytes;
+ DCheck(inflateInit_(strm, zlib_version, sizeof(strm)));
+ try
+ while DCheck(inflate(strm, Z_NO_FLUSH)) <> Z_STREAM_END do
+ begin
+ P := OutBuf;
+ Inc(OutBytes, BufInc);
+ ReallocMem(OutBuf, OutBytes);
+ strm.next_out := PChar(Integer(OutBuf) + (Integer(strm.next_out) - Integer(P)));
+ strm.avail_out := BufInc;
+ end;
+ finally
+ DCheck(inflateEnd(strm));
+ end;
+ ReallocMem(OutBuf, strm.total_out);
+ OutBytes := strm.total_out;
+ except
+ FreeMem(OutBuf);
+ raise
+ end;
+end;
+
+procedure DecompressToUserBuf(const InBuf: Pointer; InBytes: Integer;
+ const OutBuf: Pointer; BufSize: Integer);
+var
+ strm: TZStreamRec;
+begin
+ FillChar(strm, sizeof(strm), 0);
+ strm.zalloc := zlibAllocMem;
+ strm.zfree := zlibFreeMem;
+ strm.next_in := InBuf;
+ strm.avail_in := InBytes;
+ strm.next_out := OutBuf;
+ strm.avail_out := BufSize;
+ DCheck(inflateInit_(strm, zlib_version, sizeof(strm)));
+ try
+ if DCheck(inflate(strm, Z_FINISH)) <> Z_STREAM_END then
+ raise EZlibError.CreateRes(@sTargetBufferTooSmall);
+ finally
+ DCheck(inflateEnd(strm));
+ end;
+end;
+
+// TCustomZlibStream
+
+constructor TCustomZLibStream.Create(Strm: TStream);
+begin
+ inherited Create;
+ FStrm := Strm;
+ FStrmPos := Strm.Position;
+ FZRec.zalloc := zlibAllocMem;
+ FZRec.zfree := zlibFreeMem;
+end;
+
+procedure TCustomZLibStream.Progress(Sender: TObject);
+begin
+ if Assigned(FOnProgress) then FOnProgress(Sender);
+end;
+
+
+// TCompressionStream
+
+constructor TCompressionStream.Create(CompressionLevel: TCompressionLevel;
+ Dest: TStream);
+const
+ Levels: array [TCompressionLevel] of ShortInt =
+ (Z_NO_COMPRESSION, Z_BEST_SPEED, Z_DEFAULT_COMPRESSION, Z_BEST_COMPRESSION);
+begin
+ inherited Create(Dest);
+ FZRec.next_out := FBuffer;
+ FZRec.avail_out := sizeof(FBuffer);
+ CCheck(deflateInit_(FZRec, Levels[CompressionLevel], zlib_version, sizeof(FZRec)));
+end;
+
+destructor TCompressionStream.Destroy;
+begin
+ FZRec.next_in := nil;
+ FZRec.avail_in := 0;
+ try
+ if FStrm.Position <> FStrmPos then FStrm.Position := FStrmPos;
+ while (CCheck(deflate(FZRec, Z_FINISH)) <> Z_STREAM_END)
+ and (FZRec.avail_out = 0) do
+ begin
+ FStrm.WriteBuffer(FBuffer, sizeof(FBuffer));
+ FZRec.next_out := FBuffer;
+ FZRec.avail_out := sizeof(FBuffer);
+ end;
+ if FZRec.avail_out < sizeof(FBuffer) then
+ FStrm.WriteBuffer(FBuffer, sizeof(FBuffer) - FZRec.avail_out);
+ finally
+ deflateEnd(FZRec);
+ end;
+ inherited Destroy;
+end;
+
+function TCompressionStream.Read(var Buffer; Count: Longint): Longint;
+begin
+ raise ECompressionError.CreateRes(@sInvalidStreamOp);
+end;
+
+function TCompressionStream.Write(const Buffer; Count: Longint): Longint;
+begin
+ FZRec.next_in := @Buffer;
+ FZRec.avail_in := Count;
+ if FStrm.Position <> FStrmPos then FStrm.Position := FStrmPos;
+ while (FZRec.avail_in > 0) do
+ begin
+ CCheck(deflate(FZRec, 0));
+ if FZRec.avail_out = 0 then
+ begin
+ FStrm.WriteBuffer(FBuffer, sizeof(FBuffer));
+ FZRec.next_out := FBuffer;
+ FZRec.avail_out := sizeof(FBuffer);
+ FStrmPos := FStrm.Position;
+ Progress(Self);
+ end;
+ end;
+ Result := Count;
+end;
+
+function TCompressionStream.Seek(Offset: Longint; Origin: Word): Longint;
+begin
+ if (Offset = 0) and (Origin = soFromCurrent) then
+ Result := FZRec.total_in
+ else
+ raise ECompressionError.CreateRes(@sInvalidStreamOp);
+end;
+
+function TCompressionStream.GetCompressionRate: Single;
+begin
+ if FZRec.total_in = 0 then
+ Result := 0
+ else
+ Result := (1.0 - (FZRec.total_out / FZRec.total_in)) * 100.0;
+end;
+
+
+// TDecompressionStream
+
+constructor TDecompressionStream.Create(Source: TStream);
+begin
+ inherited Create(Source);
+ FZRec.next_in := FBuffer;
+ FZRec.avail_in := 0;
+ DCheck(inflateInit_(FZRec, zlib_version, sizeof(FZRec)));
+end;
+
+destructor TDecompressionStream.Destroy;
+begin
+ FStrm.Seek(-FZRec.avail_in, 1);
+ inflateEnd(FZRec);
+ inherited Destroy;
+end;
+
+function TDecompressionStream.Read(var Buffer; Count: Longint): Longint;
+begin
+ FZRec.next_out := @Buffer;
+ FZRec.avail_out := Count;
+ if FStrm.Position <> FStrmPos then FStrm.Position := FStrmPos;
+ while (FZRec.avail_out > 0) do
+ begin
+ if FZRec.avail_in = 0 then
+ begin
+ FZRec.avail_in := FStrm.Read(FBuffer, sizeof(FBuffer));
+ if FZRec.avail_in = 0 then
+ begin
+ Result := Count - FZRec.avail_out;
+ Exit;
+ end;
+ FZRec.next_in := FBuffer;
+ FStrmPos := FStrm.Position;
+ Progress(Self);
+ end;
+ CCheck(inflate(FZRec, 0));
+ end;
+ Result := Count;
+end;
+
+function TDecompressionStream.Write(const Buffer; Count: Longint): Longint;
+begin
+ raise EDecompressionError.CreateRes(@sInvalidStreamOp);
+end;
+
+function TDecompressionStream.Seek(Offset: Longint; Origin: Word): Longint;
+var
+ I: Integer;
+ Buf: array [0..4095] of Char;
+begin
+ if (Offset = 0) and (Origin = soFromBeginning) then
+ begin
+ DCheck(inflateReset(FZRec));
+ FZRec.next_in := FBuffer;
+ FZRec.avail_in := 0;
+ FStrm.Position := 0;
+ FStrmPos := 0;
+ end
+ else if ( (Offset >= 0) and (Origin = soFromCurrent)) or
+ ( ((Offset - FZRec.total_out) > 0) and (Origin = soFromBeginning)) then
+ begin
+ if Origin = soFromBeginning then Dec(Offset, FZRec.total_out);
+ if Offset > 0 then
+ begin
+ for I := 1 to Offset div sizeof(Buf) do
+ ReadBuffer(Buf, sizeof(Buf));
+ ReadBuffer(Buf, Offset mod sizeof(Buf));
+ end;
+ end
+ else
+ raise EDecompressionError.CreateRes(@sInvalidStreamOp);
+ Result := FZRec.total_out;
+end;
+
+
+end.
diff --git a/contrib/zlib/contrib/delphi/ZLibConst.pas b/contrib/zlib/contrib/delphi/ZLibConst.pas
new file mode 100644
index 000000000..cdfe13671
--- /dev/null
+++ b/contrib/zlib/contrib/delphi/ZLibConst.pas
@@ -0,0 +1,11 @@
+unit ZLibConst;
+
+interface
+
+resourcestring
+ sTargetBufferTooSmall = 'ZLib error: target buffer may be too small';
+ sInvalidStreamOp = 'Invalid stream operation';
+
+implementation
+
+end.
diff --git a/contrib/zlib/contrib/delphi/readme.txt b/contrib/zlib/contrib/delphi/readme.txt
new file mode 100644
index 000000000..2dc9a8bba
--- /dev/null
+++ b/contrib/zlib/contrib/delphi/readme.txt
@@ -0,0 +1,76 @@
+
+Overview
+========
+
+This directory contains an update to the ZLib interface unit,
+distributed by Borland as a Delphi supplemental component.
+
+The original ZLib unit is Copyright (c) 1997,99 Borland Corp.,
+and is based on zlib version 1.0.4. There are a series of bugs
+and security problems associated with that old zlib version, and
+we recommend the users to update their ZLib unit.
+
+
+Summary of modifications
+========================
+
+- Improved makefile, adapted to zlib version 1.2.1.
+
+- Some field types from TZStreamRec are changed from Integer to
+ Longint, for consistency with the zlib.h header, and for 64-bit
+ readiness.
+
+- The zlib_version constant is updated.
+
+- The new Z_RLE strategy has its corresponding symbolic constant.
+
+- The allocation and deallocation functions and function types
+ (TAlloc, TFree, zlibAllocMem and zlibFreeMem) are now cdecl,
+ and _malloc and _free are added as C RTL stubs. As a result,
+ the original C sources of zlib can be compiled out of the box,
+ and linked to the ZLib unit.
+
+
+Suggestions for improvements
+============================
+
+Currently, the ZLib unit provides only a limited wrapper around
+the zlib library, and much of the original zlib functionality is
+missing. Handling compressed file formats like ZIP/GZIP or PNG
+cannot be implemented without having this functionality.
+Applications that handle these formats are either using their own,
+duplicated code, or not using the ZLib unit at all.
+
+Here are a few suggestions:
+
+- Checksum class wrappers around adler32() and crc32(), similar
+ to the Java classes that implement the java.util.zip.Checksum
+ interface.
+
+- The ability to read and write raw deflate streams, without the
+ zlib stream header and trailer. Raw deflate streams are used
+ in the ZIP file format.
+
+- The ability to read and write gzip streams, used in the GZIP
+ file format, and normally produced by the gzip program.
+
+- The ability to select a different compression strategy, useful
+ to PNG and MNG image compression, and to multimedia compression
+ in general. Besides the compression level
+
+ TCompressionLevel = (clNone, clFastest, clDefault, clMax);
+
+ which, in fact, could have used the 'z' prefix and avoided
+ TColor-like symbols
+
+ TCompressionLevel = (zcNone, zcFastest, zcDefault, zcMax);
+
+ there could be a compression strategy
+
+ TCompressionStrategy = (zsDefault, zsFiltered, zsHuffmanOnly, zsRle);
+
+- ZIP and GZIP stream handling via TStreams.
+
+
+--
+Cosmin Truta <cosmint@cs.ubbcluj.ro>
diff --git a/contrib/zlib/contrib/delphi/zlibd32.mak b/contrib/zlib/contrib/delphi/zlibd32.mak
new file mode 100644
index 000000000..9bb00b7cc
--- /dev/null
+++ b/contrib/zlib/contrib/delphi/zlibd32.mak
@@ -0,0 +1,99 @@
+# Makefile for zlib
+# For use with Delphi and C++ Builder under Win32
+# Updated for zlib 1.2.x by Cosmin Truta
+
+# ------------ Borland C++ ------------
+
+# This project uses the Delphi (fastcall/register) calling convention:
+LOC = -DZEXPORT=__fastcall -DZEXPORTVA=__cdecl
+
+CC = bcc32
+LD = bcc32
+AR = tlib
+# do not use "-pr" in CFLAGS
+CFLAGS = -a -d -k- -O2 $(LOC)
+LDFLAGS =
+
+
+# variables
+ZLIB_LIB = zlib.lib
+
+OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj
+OBJ2 = gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
+OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzclose.obj+gzlib.obj+gzread.obj
+OBJP2 = +gzwrite.obj+infback.obj+inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj
+
+
+# targets
+all: $(ZLIB_LIB) example.exe minigzip.exe
+
+.c.obj:
+ $(CC) -c $(CFLAGS) $*.c
+
+adler32.obj: adler32.c zlib.h zconf.h
+
+compress.obj: compress.c zlib.h zconf.h
+
+crc32.obj: crc32.c zlib.h zconf.h crc32.h
+
+deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
+
+gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h
+
+gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h
+
+gzread.obj: gzread.c zlib.h zconf.h gzguts.h
+
+gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h
+
+infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
+ inffast.h inffixed.h
+
+inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
+ inffast.h
+
+inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
+ inffast.h inffixed.h
+
+inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
+
+trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
+
+uncompr.obj: uncompr.c zlib.h zconf.h
+
+zutil.obj: zutil.c zutil.h zlib.h zconf.h
+
+example.obj: test/example.c zlib.h zconf.h
+
+minigzip.obj: test/minigzip.c zlib.h zconf.h
+
+
+# For the sake of the old Borland make,
+# the command line is cut to fit in the MS-DOS 128 byte limit:
+$(ZLIB_LIB): $(OBJ1) $(OBJ2)
+ -del $(ZLIB_LIB)
+ $(AR) $(ZLIB_LIB) $(OBJP1)
+ $(AR) $(ZLIB_LIB) $(OBJP2)
+
+
+# testing
+test: example.exe minigzip.exe
+ example
+ echo hello world | minigzip | minigzip -d
+
+example.exe: example.obj $(ZLIB_LIB)
+ $(LD) $(LDFLAGS) example.obj $(ZLIB_LIB)
+
+minigzip.exe: minigzip.obj $(ZLIB_LIB)
+ $(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB)
+
+
+# cleanup
+clean:
+ -del *.obj
+ -del *.exe
+ -del *.lib
+ -del *.tds
+ -del zlib.bak
+ -del foo.gz
+
diff --git a/contrib/zlib/contrib/dotzlib/DotZLib.build b/contrib/zlib/contrib/dotzlib/DotZLib.build
new file mode 100644
index 000000000..e69630cec
--- /dev/null
+++ b/contrib/zlib/contrib/dotzlib/DotZLib.build
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<project name="DotZLib" default="build" basedir="./DotZLib">
+ <description>A .Net wrapper library around ZLib1.dll</description>
+
+ <property name="nunit.location" value="c:/program files/NUnit V2.1/bin" />
+ <property name="build.root" value="bin" />
+
+ <property name="debug" value="true" />
+ <property name="nunit" value="true" />
+
+ <property name="build.folder" value="${build.root}/debug/" if="${debug}" />
+ <property name="build.folder" value="${build.root}/release/" unless="${debug}" />
+
+ <target name="clean" description="Remove all generated files">
+ <delete dir="${build.root}" failonerror="false" />
+ </target>
+
+ <target name="build" description="compiles the source code">
+
+ <mkdir dir="${build.folder}" />
+ <csc target="library" output="${build.folder}DotZLib.dll" debug="${debug}">
+ <references basedir="${nunit.location}">
+ <includes if="${nunit}" name="nunit.framework.dll" />
+ </references>
+ <sources>
+ <includes name="*.cs" />
+ <excludes name="UnitTests.cs" unless="${nunit}" />
+ </sources>
+ <arg value="/d:nunit" if="${nunit}" />
+ </csc>
+ </target>
+
+</project> \ No newline at end of file
diff --git a/contrib/zlib/contrib/dotzlib/DotZLib.chm b/contrib/zlib/contrib/dotzlib/DotZLib.chm
new file mode 100644
index 000000000..f214a444a
--- /dev/null
+++ b/contrib/zlib/contrib/dotzlib/DotZLib.chm
Binary files differ
diff --git a/contrib/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs b/contrib/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs
new file mode 100644
index 000000000..724c5347f
--- /dev/null
+++ b/contrib/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs
@@ -0,0 +1,58 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTitle("DotZLib")]
+[assembly: AssemblyDescription(".Net bindings for ZLib compression dll 1.2.x")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Henrik Ravn")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("(c) 2004 by Henrik Ravn")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+//
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+
+[assembly: AssemblyVersion("1.0.*")]
+
+//
+// In order to sign your assembly you must specify a key to use. Refer to the
+// Microsoft .NET Framework documentation for more information on assembly signing.
+//
+// Use the attributes below to control which key is used for signing.
+//
+// Notes:
+// (*) If no key is specified, the assembly is not signed.
+// (*) KeyName refers to a key that has been installed in the Crypto Service
+// Provider (CSP) on your machine. KeyFile refers to a file which contains
+// a key.
+// (*) If the KeyFile and the KeyName values are both specified, the
+// following processing occurs:
+// (1) If the KeyName can be found in the CSP, that key is used.
+// (2) If the KeyName does not exist and the KeyFile does exist, the key
+// in the KeyFile is installed into the CSP and used.
+// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
+// When specifying the KeyFile, the location of the KeyFile should be
+// relative to the project output directory which is
+// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
+// located in the project directory, you would specify the AssemblyKeyFile
+// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
+// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
+// documentation for more information on this.
+//
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("")]
+[assembly: AssemblyKeyName("")]
diff --git a/contrib/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs b/contrib/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs
new file mode 100644
index 000000000..b110dae6a
--- /dev/null
+++ b/contrib/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs
@@ -0,0 +1,202 @@
+//
+// © Copyright Henrik Ravn 2004
+//
+// Use, modification and distribution are subject to 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)
+//
+
+using System;
+using System.Runtime.InteropServices;
+using System.Text;
+
+
+namespace DotZLib
+{
+ #region ChecksumGeneratorBase
+ /// <summary>
+ /// Implements the common functionality needed for all <see cref="ChecksumGenerator"/>s
+ /// </summary>
+ /// <example></example>
+ public abstract class ChecksumGeneratorBase : ChecksumGenerator
+ {
+ /// <summary>
+ /// The value of the current checksum
+ /// </summary>
+ protected uint _current;
+
+ /// <summary>
+ /// Initializes a new instance of the checksum generator base - the current checksum is
+ /// set to zero
+ /// </summary>
+ public ChecksumGeneratorBase()
+ {
+ _current = 0;
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the checksum generator basewith a specified value
+ /// </summary>
+ /// <param name="initialValue">The value to set the current checksum to</param>
+ public ChecksumGeneratorBase(uint initialValue)
+ {
+ _current = initialValue;
+ }
+
+ /// <summary>
+ /// Resets the current checksum to zero
+ /// </summary>
+ public void Reset() { _current = 0; }
+
+ /// <summary>
+ /// Gets the current checksum value
+ /// </summary>
+ public uint Value { get { return _current; } }
+
+ /// <summary>
+ /// Updates the current checksum with part of an array of bytes
+ /// </summary>
+ /// <param name="data">The data to update the checksum with</param>
+ /// <param name="offset">Where in <c>data</c> to start updating</param>
+ /// <param name="count">The number of bytes from <c>data</c> to use</param>
+ /// <exception cref="ArgumentException">The sum of offset and count is larger than the length of <c>data</c></exception>
+ /// <exception cref="NullReferenceException"><c>data</c> is a null reference</exception>
+ /// <exception cref="ArgumentOutOfRangeException">Offset or count is negative.</exception>
+ /// <remarks>All the other <c>Update</c> methods are implmeneted in terms of this one.
+ /// This is therefore the only method a derived class has to implement</remarks>
+ public abstract void Update(byte[] data, int offset, int count);
+
+ /// <summary>
+ /// Updates the current checksum with an array of bytes.
+ /// </summary>
+ /// <param name="data">The data to update the checksum with</param>
+ public void Update(byte[] data)
+ {
+ Update(data, 0, data.Length);
+ }
+
+ /// <summary>
+ /// Updates the current checksum with the data from a string
+ /// </summary>
+ /// <param name="data">The string to update the checksum with</param>
+ /// <remarks>The characters in the string are converted by the UTF-8 encoding</remarks>
+ public void Update(string data)
+ {
+ Update(Encoding.UTF8.GetBytes(data));
+ }
+
+ /// <summary>
+ /// Updates the current checksum with the data from a string, using a specific encoding
+ /// </summary>
+ /// <param name="data">The string to update the checksum with</param>
+ /// <param name="encoding">The encoding to use</param>
+ public void Update(string data, Encoding encoding)
+ {
+ Update(encoding.GetBytes(data));
+ }
+
+ }
+ #endregion
+
+ #region CRC32
+ /// <summary>
+ /// Implements a CRC32 checksum generator
+ /// </summary>
+ public sealed class CRC32Checksum : ChecksumGeneratorBase
+ {
+ #region DLL imports
+
+ [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
+ private static extern uint crc32(uint crc, int data, uint length);
+
+ #endregion
+
+ /// <summary>
+ /// Initializes a new instance of the CRC32 checksum generator
+ /// </summary>
+ public CRC32Checksum() : base() {}
+
+ /// <summary>
+ /// Initializes a new instance of the CRC32 checksum generator with a specified value
+ /// </summary>
+ /// <param name="initialValue">The value to set the current checksum to</param>
+ public CRC32Checksum(uint initialValue) : base(initialValue) {}
+
+ /// <summary>
+ /// Updates the current checksum with part of an array of bytes
+ /// </summary>
+ /// <param name="data">The data to update the checksum with</param>
+ /// <param name="offset">Where in <c>data</c> to start updating</param>
+ /// <param name="count">The number of bytes from <c>data</c> to use</param>
+ /// <exception cref="ArgumentException">The sum of offset and count is larger than the length of <c>data</c></exception>
+ /// <exception cref="NullReferenceException"><c>data</c> is a null reference</exception>
+ /// <exception cref="ArgumentOutOfRangeException">Offset or count is negative.</exception>
+ public override void Update(byte[] data, int offset, int count)
+ {
+ if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException();
+ if ((offset+count) > data.Length) throw new ArgumentException();
+ GCHandle hData = GCHandle.Alloc(data, GCHandleType.Pinned);
+ try
+ {
+ _current = crc32(_current, hData.AddrOfPinnedObject().ToInt32()+offset, (uint)count);
+ }
+ finally
+ {
+ hData.Free();
+ }
+ }
+
+ }
+ #endregion
+
+ #region Adler
+ /// <summary>
+ /// Implements a checksum generator that computes the Adler checksum on data
+ /// </summary>
+ public sealed class AdlerChecksum : ChecksumGeneratorBase
+ {
+ #region DLL imports
+
+ [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
+ private static extern uint adler32(uint adler, int data, uint length);
+
+ #endregion
+
+ /// <summary>
+ /// Initializes a new instance of the Adler checksum generator
+ /// </summary>
+ public AdlerChecksum() : base() {}
+
+ /// <summary>
+ /// Initializes a new instance of the Adler checksum generator with a specified value
+ /// </summary>
+ /// <param name="initialValue">The value to set the current checksum to</param>
+ public AdlerChecksum(uint initialValue) : base(initialValue) {}
+
+ /// <summary>
+ /// Updates the current checksum with part of an array of bytes
+ /// </summary>
+ /// <param name="data">The data to update the checksum with</param>
+ /// <param name="offset">Where in <c>data</c> to start updating</param>
+ /// <param name="count">The number of bytes from <c>data</c> to use</param>
+ /// <exception cref="ArgumentException">The sum of offset and count is larger than the length of <c>data</c></exception>
+ /// <exception cref="NullReferenceException"><c>data</c> is a null reference</exception>
+ /// <exception cref="ArgumentOutOfRangeException">Offset or count is negative.</exception>
+ public override void Update(byte[] data, int offset, int count)
+ {
+ if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException();
+ if ((offset+count) > data.Length) throw new ArgumentException();
+ GCHandle hData = GCHandle.Alloc(data, GCHandleType.Pinned);
+ try
+ {
+ _current = adler32(_current, hData.AddrOfPinnedObject().ToInt32()+offset, (uint)count);
+ }
+ finally
+ {
+ hData.Free();
+ }
+ }
+
+ }
+ #endregion
+
+} \ No newline at end of file
diff --git a/contrib/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs b/contrib/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs
new file mode 100644
index 000000000..9c8d60195
--- /dev/null
+++ b/contrib/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs
@@ -0,0 +1,83 @@
+//
+// © Copyright Henrik Ravn 2004
+//
+// Use, modification and distribution are subject to 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)
+//
+
+using System;
+using System.Diagnostics;
+
+namespace DotZLib
+{
+
+ /// <summary>
+ /// This class implements a circular buffer
+ /// </summary>
+ internal class CircularBuffer
+ {
+ #region Private data
+ private int _capacity;
+ private int _head;
+ private int _tail;
+ private int _size;
+ private byte[] _buffer;
+ #endregion
+
+ public CircularBuffer(int capacity)
+ {
+ Debug.Assert( capacity > 0 );
+ _buffer = new byte[capacity];
+ _capacity = capacity;
+ _head = 0;
+ _tail = 0;
+ _size = 0;
+ }
+
+ public int Size { get { return _size; } }
+
+ public int Put(byte[] source, int offset, int count)
+ {
+ Debug.Assert( count > 0 );
+ int trueCount = Math.Min(count, _capacity - Size);
+ for (int i = 0; i < trueCount; ++i)
+ _buffer[(_tail+i) % _capacity] = source[offset+i];
+ _tail += trueCount;
+ _tail %= _capacity;
+ _size += trueCount;
+ return trueCount;
+ }
+
+ public bool Put(byte b)
+ {
+ if (Size == _capacity) // no room
+ return false;
+ _buffer[_tail++] = b;
+ _tail %= _capacity;
+ ++_size;
+ return true;
+ }
+
+ public int Get(byte[] destination, int offset, int count)
+ {
+ int trueCount = Math.Min(count,Size);
+ for (int i = 0; i < trueCount; ++i)
+ destination[offset + i] = _buffer[(_head+i) % _capacity];
+ _head += trueCount;
+ _head %= _capacity;
+ _size -= trueCount;
+ return trueCount;
+ }
+
+ public int Get()
+ {
+ if (Size == 0)
+ return -1;
+
+ int result = (int)_buffer[_head++ % _capacity];
+ --_size;
+ return result;
+ }
+
+ }
+}
diff --git a/contrib/zlib/contrib/dotzlib/DotZLib/CodecBase.cs b/contrib/zlib/contrib/dotzlib/DotZLib/CodecBase.cs
new file mode 100644
index 000000000..b0eb78a02
--- /dev/null
+++ b/contrib/zlib/contrib/dotzlib/DotZLib/CodecBase.cs
@@ -0,0 +1,198 @@
+//
+// © Copyright Henrik Ravn 2004
+//
+// Use, modification and distribution are subject to 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)
+//
+
+using System;
+using System.Runtime.InteropServices;
+
+namespace DotZLib
+{
+ /// <summary>
+ /// Implements the common functionality needed for all <see cref="Codec"/>s
+ /// </summary>
+ public abstract class CodecBase : Codec, IDisposable
+ {
+
+ #region Data members
+
+ /// <summary>
+ /// Instance of the internal zlib buffer structure that is
+ /// passed to all functions in the zlib dll
+ /// </summary>
+ internal ZStream _ztream = new ZStream();
+
+ /// <summary>
+ /// True if the object instance has been disposed, false otherwise
+ /// </summary>
+ protected bool _isDisposed = false;
+
+ /// <summary>
+ /// The size of the internal buffers
+ /// </summary>
+ protected const int kBufferSize = 16384;
+
+ private byte[] _outBuffer = new byte[kBufferSize];
+ private byte[] _inBuffer = new byte[kBufferSize];
+
+ private GCHandle _hInput;
+ private GCHandle _hOutput;
+
+ private uint _checksum = 0;
+
+ #endregion
+
+ /// <summary>
+ /// Initializes a new instance of the <c>CodeBase</c> class.
+ /// </summary>
+ public CodecBase()
+ {
+ try
+ {
+ _hInput = GCHandle.Alloc(_inBuffer, GCHandleType.Pinned);
+ _hOutput = GCHandle.Alloc(_outBuffer, GCHandleType.Pinned);
+ }
+ catch (Exception)
+ {
+ CleanUp(false);
+ throw;
+ }
+ }
+
+
+ #region Codec Members
+
+ /// <summary>
+ /// Occurs when more processed data are available.
+ /// </summary>
+ public event DataAvailableHandler DataAvailable;
+
+ /// <summary>
+ /// Fires the <see cref="DataAvailable"/> event
+ /// </summary>
+ protected void OnDataAvailable()
+ {
+ if (_ztream.total_out > 0)
+ {
+ if (DataAvailable != null)
+ DataAvailable( _outBuffer, 0, (int)_ztream.total_out);
+ resetOutput();
+ }
+ }
+
+ /// <summary>
+ /// Adds more data to the codec to be processed.
+ /// </summary>
+ /// <param name="data">Byte array containing the data to be added to the codec</param>
+ /// <remarks>Adding data may, or may not, raise the <c>DataAvailable</c> event</remarks>
+ public void Add(byte[] data)
+ {
+ Add(data,0,data.Length);
+ }
+
+ /// <summary>
+ /// Adds more data to the codec to be processed.
+ /// </summary>
+ /// <param name="data">Byte array containing the data to be added to the codec</param>
+ /// <param name="offset">The index of the first byte to add from <c>data</c></param>
+ /// <param name="count">The number of bytes to add</param>
+ /// <remarks>Adding data may, or may not, raise the <c>DataAvailable</c> event</remarks>
+ /// <remarks>This must be implemented by a derived class</remarks>
+ public abstract void Add(byte[] data, int offset, int count);
+
+ /// <summary>
+ /// Finishes up any pending data that needs to be processed and handled.
+ /// </summary>
+ /// <remarks>This must be implemented by a derived class</remarks>
+ public abstract void Finish();
+
+ /// <summary>
+ /// Gets the checksum of the data that has been added so far
+ /// </summary>
+ public uint Checksum { get { return _checksum; } }
+
+ #endregion
+
+ #region Destructor & IDisposable stuff
+
+ /// <summary>
+ /// Destroys this instance
+ /// </summary>
+ ~CodecBase()
+ {
+ CleanUp(false);
+ }
+
+ /// <summary>
+ /// Releases any unmanaged resources and calls the <see cref="CleanUp()"/> method of the derived class
+ /// </summary>
+ public void Dispose()
+ {
+ CleanUp(true);
+ }
+
+ /// <summary>
+ /// Performs any codec specific cleanup
+ /// </summary>
+ /// <remarks>This must be implemented by a derived class</remarks>
+ protected abstract void CleanUp();
+
+ // performs the release of the handles and calls the dereived CleanUp()
+ private void CleanUp(bool isDisposing)
+ {
+ if (!_isDisposed)
+ {
+ CleanUp();
+ if (_hInput.IsAllocated)
+ _hInput.Free();
+ if (_hOutput.IsAllocated)
+ _hOutput.Free();
+
+ _isDisposed = true;
+ }
+ }
+
+
+ #endregion
+
+ #region Helper methods
+
+ /// <summary>
+ /// Copies a number of bytes to the internal codec buffer - ready for proccesing
+ /// </summary>
+ /// <param name="data">The byte array that contains the data to copy</param>
+ /// <param name="startIndex">The index of the first byte to copy</param>
+ /// <param name="count">The number of bytes to copy from <c>data</c></param>
+ protected void copyInput(byte[] data, int startIndex, int count)
+ {
+ Array.Copy(data, startIndex, _inBuffer,0, count);
+ _ztream.next_in = _hInput.AddrOfPinnedObject();
+ _ztream.total_in = 0;
+ _ztream.avail_in = (uint)count;
+
+ }
+
+ /// <summary>
+ /// Resets the internal output buffers to a known state - ready for processing
+ /// </summary>
+ protected void resetOutput()
+ {
+ _ztream.total_out = 0;
+ _ztream.avail_out = kBufferSize;
+ _ztream.next_out = _hOutput.AddrOfPinnedObject();
+ }
+
+ /// <summary>
+ /// Updates the running checksum property
+ /// </summary>
+ /// <param name="newSum">The new checksum value</param>
+ protected void setChecksum(uint newSum)
+ {
+ _checksum = newSum;
+ }
+ #endregion
+
+ }
+}
diff --git a/contrib/zlib/contrib/dotzlib/DotZLib/Deflater.cs b/contrib/zlib/contrib/dotzlib/DotZLib/Deflater.cs
new file mode 100644
index 000000000..9039f41f6
--- /dev/null
+++ b/contrib/zlib/contrib/dotzlib/DotZLib/Deflater.cs
@@ -0,0 +1,106 @@
+//
+// © Copyright Henrik Ravn 2004
+//
+// Use, modification and distribution are subject to 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)
+//
+
+using System;
+using System.Diagnostics;
+using System.Runtime.InteropServices;
+
+namespace DotZLib
+{
+
+ /// <summary>
+ /// Implements a data compressor, using the deflate algorithm in the ZLib dll
+ /// </summary>
+ public sealed class Deflater : CodecBase
+ {
+ #region Dll imports
+ [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl, CharSet=CharSet.Ansi)]
+ private static extern int deflateInit_(ref ZStream sz, int level, string vs, int size);
+
+ [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
+ private static extern int deflate(ref ZStream sz, int flush);
+
+ [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
+ private static extern int deflateReset(ref ZStream sz);
+
+ [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
+ private static extern int deflateEnd(ref ZStream sz);
+ #endregion
+
+ /// <summary>
+ /// Constructs an new instance of the <c>Deflater</c>
+ /// </summary>
+ /// <param name="level">The compression level to use for this <c>Deflater</c></param>
+ public Deflater(CompressLevel level) : base()
+ {
+ int retval = deflateInit_(ref _ztream, (int)level, Info.Version, Marshal.SizeOf(_ztream));
+ if (retval != 0)
+ throw new ZLibException(retval, "Could not initialize deflater");
+
+ resetOutput();
+ }
+
+ /// <summary>
+ /// Adds more data to the codec to be processed.
+ /// </summary>
+ /// <param name="data">Byte array containing the data to be added to the codec</param>
+ /// <param name="offset">The index of the first byte to add from <c>data</c></param>
+ /// <param name="count">The number of bytes to add</param>
+ /// <remarks>Adding data may, or may not, raise the <c>DataAvailable</c> event</remarks>
+ public override void Add(byte[] data, int offset, int count)
+ {
+ if (data == null) throw new ArgumentNullException();
+ if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException();
+ if ((offset+count) > data.Length) throw new ArgumentException();
+
+ int total = count;
+ int inputIndex = offset;
+ int err = 0;
+
+ while (err >= 0 && inputIndex < total)
+ {
+ copyInput(data, inputIndex, Math.Min(total - inputIndex, kBufferSize));
+ while (err >= 0 && _ztream.avail_in > 0)
+ {
+ err = deflate(ref _ztream, (int)FlushTypes.None);
+ if (err == 0)
+ while (_ztream.avail_out == 0)
+ {
+ OnDataAvailable();
+ err = deflate(ref _ztream, (int)FlushTypes.None);
+ }
+ inputIndex += (int)_ztream.total_in;
+ }
+ }
+ setChecksum( _ztream.adler );
+ }
+
+
+ /// <summary>
+ /// Finishes up any pending data that needs to be processed and handled.
+ /// </summary>
+ public override void Finish()
+ {
+ int err;
+ do
+ {
+ err = deflate(ref _ztream, (int)FlushTypes.Finish);
+ OnDataAvailable();
+ }
+ while (err == 0);
+ setChecksum( _ztream.adler );
+ deflateReset(ref _ztream);
+ resetOutput();
+ }
+
+ /// <summary>
+ /// Closes the internal zlib deflate stream
+ /// </summary>
+ protected override void CleanUp() { deflateEnd(ref _ztream); }
+
+ }
+}
diff --git a/contrib/zlib/contrib/dotzlib/DotZLib/DotZLib.cs b/contrib/zlib/contrib/dotzlib/DotZLib/DotZLib.cs
new file mode 100644
index 000000000..90c7c3b38
--- /dev/null
+++ b/contrib/zlib/contrib/dotzlib/DotZLib/DotZLib.cs
@@ -0,0 +1,288 @@
+//
+// © Copyright Henrik Ravn 2004
+//
+// Use, modification and distribution are subject to 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)
+//
+
+using System;
+using System.IO;
+using System.Runtime.InteropServices;
+using System.Text;
+
+
+namespace DotZLib
+{
+
+ #region Internal types
+
+ /// <summary>
+ /// Defines constants for the various flush types used with zlib
+ /// </summary>
+ internal enum FlushTypes
+ {
+ None, Partial, Sync, Full, Finish, Block
+ }
+
+ #region ZStream structure
+ // internal mapping of the zlib zstream structure for marshalling
+ [StructLayoutAttribute(LayoutKind.Sequential, Pack=4, Size=0, CharSet=CharSet.Ansi)]
+ internal struct ZStream
+ {
+ public IntPtr next_in;
+ public uint avail_in;
+ public uint total_in;
+
+ public IntPtr next_out;
+ public uint avail_out;
+ public uint total_out;
+
+ [MarshalAs(UnmanagedType.LPStr)]
+ string msg;
+ uint state;
+
+ uint zalloc;
+ uint zfree;
+ uint opaque;
+
+ int data_type;
+ public uint adler;
+ uint reserved;
+ }
+
+ #endregion
+
+ #endregion
+
+ #region Public enums
+ /// <summary>
+ /// Defines constants for the available compression levels in zlib
+ /// </summary>
+ public enum CompressLevel : int
+ {
+ /// <summary>
+ /// The default compression level with a reasonable compromise between compression and speed
+ /// </summary>
+ Default = -1,
+ /// <summary>
+ /// No compression at all. The data are passed straight through.
+ /// </summary>
+ None = 0,
+ /// <summary>
+ /// The maximum compression rate available.
+ /// </summary>
+ Best = 9,
+ /// <summary>
+ /// The fastest available compression level.
+ /// </summary>
+ Fastest = 1
+ }
+ #endregion
+
+ #region Exception classes
+ /// <summary>
+ /// The exception that is thrown when an error occurs on the zlib dll
+ /// </summary>
+ public class ZLibException : ApplicationException
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ZLibException"/> class with a specified
+ /// error message and error code
+ /// </summary>
+ /// <param name="errorCode">The zlib error code that caused the exception</param>
+ /// <param name="msg">A message that (hopefully) describes the error</param>
+ public ZLibException(int errorCode, string msg) : base(String.Format("ZLib error {0} {1}", errorCode, msg))
+ {
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ZLibException"/> class with a specified
+ /// error code
+ /// </summary>
+ /// <param name="errorCode">The zlib error code that caused the exception</param>
+ public ZLibException(int errorCode) : base(String.Format("ZLib error {0}", errorCode))
+ {
+ }
+ }
+ #endregion
+
+ #region Interfaces
+
+ /// <summary>
+ /// Declares methods and properties that enables a running checksum to be calculated
+ /// </summary>
+ public interface ChecksumGenerator
+ {
+ /// <summary>
+ /// Gets the current value of the checksum
+ /// </summary>
+ uint Value { get; }
+
+ /// <summary>
+ /// Clears the current checksum to 0
+ /// </summary>
+ void Reset();
+
+ /// <summary>
+ /// Updates the current checksum with an array of bytes
+ /// </summary>
+ /// <param name="data">The data to update the checksum with</param>
+ void Update(byte[] data);
+
+ /// <summary>
+ /// Updates the current checksum with part of an array of bytes
+ /// </summary>
+ /// <param name="data">The data to update the checksum with</param>
+ /// <param name="offset">Where in <c>data</c> to start updating</param>
+ /// <param name="count">The number of bytes from <c>data</c> to use</param>
+ /// <exception cref="ArgumentException">The sum of offset and count is larger than the length of <c>data</c></exception>
+ /// <exception cref="ArgumentNullException"><c>data</c> is a null reference</exception>
+ /// <exception cref="ArgumentOutOfRangeException">Offset or count is negative.</exception>
+ void Update(byte[] data, int offset, int count);
+
+ /// <summary>
+ /// Updates the current checksum with the data from a string
+ /// </summary>
+ /// <param name="data">The string to update the checksum with</param>
+ /// <remarks>The characters in the string are converted by the UTF-8 encoding</remarks>
+ void Update(string data);
+
+ /// <summary>
+ /// Updates the current checksum with the data from a string, using a specific encoding
+ /// </summary>
+ /// <param name="data">The string to update the checksum with</param>
+ /// <param name="encoding">The encoding to use</param>
+ void Update(string data, Encoding encoding);
+ }
+
+
+ /// <summary>
+ /// Represents the method that will be called from a codec when new data
+ /// are available.
+ /// </summary>
+ /// <paramref name="data">The byte array containing the processed data</paramref>
+ /// <paramref name="startIndex">The index of the first processed byte in <c>data</c></paramref>
+ /// <paramref name="count">The number of processed bytes available</paramref>
+ /// <remarks>On return from this method, the data may be overwritten, so grab it while you can.
+ /// You cannot assume that startIndex will be zero.
+ /// </remarks>
+ public delegate void DataAvailableHandler(byte[] data, int startIndex, int count);
+
+ /// <summary>
+ /// Declares methods and events for implementing compressors/decompressors
+ /// </summary>
+ public interface Codec
+ {
+ /// <summary>
+ /// Occurs when more processed data are available.
+ /// </summary>
+ event DataAvailableHandler DataAvailable;
+
+ /// <summary>
+ /// Adds more data to the codec to be processed.
+ /// </summary>
+ /// <param name="data">Byte array containing the data to be added to the codec</param>
+ /// <remarks>Adding data may, or may not, raise the <c>DataAvailable</c> event</remarks>
+ void Add(byte[] data);
+
+ /// <summary>
+ /// Adds more data to the codec to be processed.
+ /// </summary>
+ /// <param name="data">Byte array containing the data to be added to the codec</param>
+ /// <param name="offset">The index of the first byte to add from <c>data</c></param>
+ /// <param name="count">The number of bytes to add</param>
+ /// <remarks>Adding data may, or may not, raise the <c>DataAvailable</c> event</remarks>
+ void Add(byte[] data, int offset, int count);
+
+ /// <summary>
+ /// Finishes up any pending data that needs to be processed and handled.
+ /// </summary>
+ void Finish();
+
+ /// <summary>
+ /// Gets the checksum of the data that has been added so far
+ /// </summary>
+ uint Checksum { get; }
+
+
+ }
+
+ #endregion
+
+ #region Classes
+ /// <summary>
+ /// Encapsulates general information about the ZLib library
+ /// </summary>
+ public class Info
+ {
+ #region DLL imports
+ [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
+ private static extern uint zlibCompileFlags();
+
+ [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
+ private static extern string zlibVersion();
+ #endregion
+
+ #region Private stuff
+ private uint _flags;
+
+ // helper function that unpacks a bitsize mask
+ private static int bitSize(uint bits)
+ {
+ switch (bits)
+ {
+ case 0: return 16;
+ case 1: return 32;
+ case 2: return 64;
+ }
+ return -1;
+ }
+ #endregion
+
+ /// <summary>
+ /// Constructs an instance of the <c>Info</c> class.
+ /// </summary>
+ public Info()
+ {
+ _flags = zlibCompileFlags();
+ }
+
+ /// <summary>
+ /// True if the library is compiled with debug info
+ /// </summary>
+ public bool HasDebugInfo { get { return 0 != (_flags & 0x100); } }
+
+ /// <summary>
+ /// True if the library is compiled with assembly optimizations
+ /// </summary>
+ public bool UsesAssemblyCode { get { return 0 != (_flags & 0x200); } }
+
+ /// <summary>
+ /// Gets the size of the unsigned int that was compiled into Zlib
+ /// </summary>
+ public int SizeOfUInt { get { return bitSize(_flags & 3); } }
+
+ /// <summary>
+ /// Gets the size of the unsigned long that was compiled into Zlib
+ /// </summary>
+ public int SizeOfULong { get { return bitSize((_flags >> 2) & 3); } }
+
+ /// <summary>
+ /// Gets the size of the pointers that were compiled into Zlib
+ /// </summary>
+ public int SizeOfPointer { get { return bitSize((_flags >> 4) & 3); } }
+
+ /// <summary>
+ /// Gets the size of the z_off_t type that was compiled into Zlib
+ /// </summary>
+ public int SizeOfOffset { get { return bitSize((_flags >> 6) & 3); } }
+
+ /// <summary>
+ /// Gets the version of ZLib as a string, e.g. "1.2.1"
+ /// </summary>
+ public static string Version { get { return zlibVersion(); } }
+ }
+
+ #endregion
+
+}
diff --git a/contrib/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj b/contrib/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj
new file mode 100644
index 000000000..dea7fb16a
--- /dev/null
+++ b/contrib/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj
@@ -0,0 +1,141 @@
+<VisualStudioProject>
+ <CSHARP
+ ProjectType = "Local"
+ ProductVersion = "7.10.3077"
+ SchemaVersion = "2.0"
+ ProjectGuid = "{BB1EE0B1-1808-46CB-B786-949D91117FC5}"
+ >
+ <Build>
+ <Settings
+ ApplicationIcon = ""
+ AssemblyKeyContainerName = ""
+ AssemblyName = "DotZLib"
+ AssemblyOriginatorKeyFile = ""
+ DefaultClientScript = "JScript"
+ DefaultHTMLPageLayout = "Grid"
+ DefaultTargetSchema = "IE50"
+ DelaySign = "false"
+ OutputType = "Library"
+ PreBuildEvent = ""
+ PostBuildEvent = ""
+ RootNamespace = "DotZLib"
+ RunPostBuildEvent = "OnBuildSuccess"
+ StartupObject = ""
+ >
+ <Config
+ Name = "Debug"
+ AllowUnsafeBlocks = "false"
+ BaseAddress = "285212672"
+ CheckForOverflowUnderflow = "false"
+ ConfigurationOverrideFile = ""
+ DefineConstants = "DEBUG;TRACE"
+ DocumentationFile = "docs\DotZLib.xml"
+ DebugSymbols = "true"
+ FileAlignment = "4096"
+ IncrementalBuild = "false"
+ NoStdLib = "false"
+ NoWarn = "1591"
+ Optimize = "false"
+ OutputPath = "bin\Debug\"
+ RegisterForComInterop = "false"
+ RemoveIntegerChecks = "false"
+ TreatWarningsAsErrors = "false"
+ WarningLevel = "4"
+ />
+ <Config
+ Name = "Release"
+ AllowUnsafeBlocks = "false"
+ BaseAddress = "285212672"
+ CheckForOverflowUnderflow = "false"
+ ConfigurationOverrideFile = ""
+ DefineConstants = "TRACE"
+ DocumentationFile = "docs\DotZLib.xml"
+ DebugSymbols = "false"
+ FileAlignment = "4096"
+ IncrementalBuild = "false"
+ NoStdLib = "false"
+ NoWarn = ""
+ Optimize = "true"
+ OutputPath = "bin\Release\"
+ RegisterForComInterop = "false"
+ RemoveIntegerChecks = "false"
+ TreatWarningsAsErrors = "false"
+ WarningLevel = "4"
+ />
+ </Settings>
+ <References>
+ <Reference
+ Name = "System"
+ AssemblyName = "System"
+ HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\System.dll"
+ />
+ <Reference
+ Name = "System.Data"
+ AssemblyName = "System.Data"
+ HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
+ />
+ <Reference
+ Name = "System.XML"
+ AssemblyName = "System.Xml"
+ HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
+ />
+ <Reference
+ Name = "nunit.framework"
+ AssemblyName = "nunit.framework"
+ HintPath = "E:\apps\NUnit V2.1\\bin\nunit.framework.dll"
+ AssemblyFolderKey = "hklm\dn\nunit.framework"
+ />
+ </References>
+ </Build>
+ <Files>
+ <Include>
+ <File
+ RelPath = "AssemblyInfo.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "ChecksumImpl.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "CircularBuffer.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "CodecBase.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "Deflater.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "DotZLib.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "GZipStream.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "Inflater.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "UnitTests.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ </Include>
+ </Files>
+ </CSHARP>
+</VisualStudioProject>
+
diff --git a/contrib/zlib/contrib/dotzlib/DotZLib/GZipStream.cs b/contrib/zlib/contrib/dotzlib/DotZLib/GZipStream.cs
new file mode 100644
index 000000000..f0eada1d2
--- /dev/null
+++ b/contrib/zlib/contrib/dotzlib/DotZLib/GZipStream.cs
@@ -0,0 +1,301 @@
+//
+// © Copyright Henrik Ravn 2004
+//
+// Use, modification and distribution are subject to 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)
+//
+
+using System;
+using System.IO;
+using System.Runtime.InteropServices;
+
+namespace DotZLib
+{
+ /// <summary>
+ /// Implements a compressed <see cref="Stream"/>, in GZip (.gz) format.
+ /// </summary>
+ public class GZipStream : Stream, IDisposable
+ {
+ #region Dll Imports
+ [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl, CharSet=CharSet.Ansi)]
+ private static extern IntPtr gzopen(string name, string mode);
+
+ [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
+ private static extern int gzclose(IntPtr gzFile);
+
+ [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
+ private static extern int gzwrite(IntPtr gzFile, int data, int length);
+
+ [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
+ private static extern int gzread(IntPtr gzFile, int data, int length);
+
+ [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
+ private static extern int gzgetc(IntPtr gzFile);
+
+ [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
+ private static extern int gzputc(IntPtr gzFile, int c);
+
+ #endregion
+
+ #region Private data
+ private IntPtr _gzFile;
+ private bool _isDisposed = false;
+ private bool _isWriting;
+ #endregion
+
+ #region Constructors
+ /// <summary>
+ /// Creates a new file as a writeable GZipStream
+ /// </summary>
+ /// <param name="fileName">The name of the compressed file to create</param>
+ /// <param name="level">The compression level to use when adding data</param>
+ /// <exception cref="ZLibException">If an error occurred in the internal zlib function</exception>
+ public GZipStream(string fileName, CompressLevel level)
+ {
+ _isWriting = true;
+ _gzFile = gzopen(fileName, String.Format("wb{0}", (int)level));
+ if (_gzFile == IntPtr.Zero)
+ throw new ZLibException(-1, "Could not open " + fileName);
+ }
+
+ /// <summary>
+ /// Opens an existing file as a readable GZipStream
+ /// </summary>
+ /// <param name="fileName">The name of the file to open</param>
+ /// <exception cref="ZLibException">If an error occurred in the internal zlib function</exception>
+ public GZipStream(string fileName)
+ {
+ _isWriting = false;
+ _gzFile = gzopen(fileName, "rb");
+ if (_gzFile == IntPtr.Zero)
+ throw new ZLibException(-1, "Could not open " + fileName);
+
+ }
+ #endregion
+
+ #region Access properties
+ /// <summary>
+ /// Returns true of this stream can be read from, false otherwise
+ /// </summary>
+ public override bool CanRead
+ {
+ get
+ {
+ return !_isWriting;
+ }
+ }
+
+
+ /// <summary>
+ /// Returns false.
+ /// </summary>
+ public override bool CanSeek
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ /// <summary>
+ /// Returns true if this tsream is writeable, false otherwise
+ /// </summary>
+ public override bool CanWrite
+ {
+ get
+ {
+ return _isWriting;
+ }
+ }
+ #endregion
+
+ #region Destructor & IDispose stuff
+
+ /// <summary>
+ /// Destroys this instance
+ /// </summary>
+ ~GZipStream()
+ {
+ cleanUp(false);
+ }
+
+ /// <summary>
+ /// Closes the external file handle
+ /// </summary>
+ public void Dispose()
+ {
+ cleanUp(true);
+ }
+
+ // Does the actual closing of the file handle.
+ private void cleanUp(bool isDisposing)
+ {
+ if (!_isDisposed)
+ {
+ gzclose(_gzFile);
+ _isDisposed = true;
+ }
+ }
+ #endregion
+
+ #region Basic reading and writing
+ /// <summary>
+ /// Attempts to read a number of bytes from the stream.
+ /// </summary>
+ /// <param name="buffer">The destination data buffer</param>
+ /// <param name="offset">The index of the first destination byte in <c>buffer</c></param>
+ /// <param name="count">The number of bytes requested</param>
+ /// <returns>The number of bytes read</returns>
+ /// <exception cref="ArgumentNullException">If <c>buffer</c> is null</exception>
+ /// <exception cref="ArgumentOutOfRangeException">If <c>count</c> or <c>offset</c> are negative</exception>
+ /// <exception cref="ArgumentException">If <c>offset</c> + <c>count</c> is &gt; buffer.Length</exception>
+ /// <exception cref="NotSupportedException">If this stream is not readable.</exception>
+ /// <exception cref="ObjectDisposedException">If this stream has been disposed.</exception>
+ public override int Read(byte[] buffer, int offset, int count)
+ {
+ if (!CanRead) throw new NotSupportedException();
+ if (buffer == null) throw new ArgumentNullException();
+ if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException();
+ if ((offset+count) > buffer.Length) throw new ArgumentException();
+ if (_isDisposed) throw new ObjectDisposedException("GZipStream");
+
+ GCHandle h = GCHandle.Alloc(buffer, GCHandleType.Pinned);
+ int result;
+ try
+ {
+ result = gzread(_gzFile, h.AddrOfPinnedObject().ToInt32() + offset, count);
+ if (result < 0)
+ throw new IOException();
+ }
+ finally
+ {
+ h.Free();
+ }
+ return result;
+ }
+
+ /// <summary>
+ /// Attempts to read a single byte from the stream.
+ /// </summary>
+ /// <returns>The byte that was read, or -1 in case of error or End-Of-File</returns>
+ public override int ReadByte()
+ {
+ if (!CanRead) throw new NotSupportedException();
+ if (_isDisposed) throw new ObjectDisposedException("GZipStream");
+ return gzgetc(_gzFile);
+ }
+
+ /// <summary>
+ /// Writes a number of bytes to the stream
+ /// </summary>
+ /// <param name="buffer"></param>
+ /// <param name="offset"></param>
+ /// <param name="count"></param>
+ /// <exception cref="ArgumentNullException">If <c>buffer</c> is null</exception>
+ /// <exception cref="ArgumentOutOfRangeException">If <c>count</c> or <c>offset</c> are negative</exception>
+ /// <exception cref="ArgumentException">If <c>offset</c> + <c>count</c> is &gt; buffer.Length</exception>
+ /// <exception cref="NotSupportedException">If this stream is not writeable.</exception>
+ /// <exception cref="ObjectDisposedException">If this stream has been disposed.</exception>
+ public override void Write(byte[] buffer, int offset, int count)
+ {
+ if (!CanWrite) throw new NotSupportedException();
+ if (buffer == null) throw new ArgumentNullException();
+ if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException();
+ if ((offset+count) > buffer.Length) throw new ArgumentException();
+ if (_isDisposed) throw new ObjectDisposedException("GZipStream");
+
+ GCHandle h = GCHandle.Alloc(buffer, GCHandleType.Pinned);
+ try
+ {
+ int result = gzwrite(_gzFile, h.AddrOfPinnedObject().ToInt32() + offset, count);
+ if (result < 0)
+ throw new IOException();
+ }
+ finally
+ {
+ h.Free();
+ }
+ }
+
+ /// <summary>
+ /// Writes a single byte to the stream
+ /// </summary>
+ /// <param name="value">The byte to add to the stream.</param>
+ /// <exception cref="NotSupportedException">If this stream is not writeable.</exception>
+ /// <exception cref="ObjectDisposedException">If this stream has been disposed.</exception>
+ public override void WriteByte(byte value)
+ {
+ if (!CanWrite) throw new NotSupportedException();
+ if (_isDisposed) throw new ObjectDisposedException("GZipStream");
+
+ int result = gzputc(_gzFile, (int)value);
+ if (result < 0)
+ throw new IOException();
+ }
+ #endregion
+
+ #region Position & length stuff
+ /// <summary>
+ /// Not supported.
+ /// </summary>
+ /// <param name="value"></param>
+ /// <exception cref="NotSupportedException">Always thrown</exception>
+ public override void SetLength(long value)
+ {
+ throw new NotSupportedException();
+ }
+
+ /// <summary>
+ /// Not suppported.
+ /// </summary>
+ /// <param name="offset"></param>
+ /// <param name="origin"></param>
+ /// <returns></returns>
+ /// <exception cref="NotSupportedException">Always thrown</exception>
+ public override long Seek(long offset, SeekOrigin origin)
+ {
+ throw new NotSupportedException();
+ }
+
+ /// <summary>
+ /// Flushes the <c>GZipStream</c>.
+ /// </summary>
+ /// <remarks>In this implementation, this method does nothing. This is because excessive
+ /// flushing may degrade the achievable compression rates.</remarks>
+ public override void Flush()
+ {
+ // left empty on purpose
+ }
+
+ /// <summary>
+ /// Gets/sets the current position in the <c>GZipStream</c>. Not suppported.
+ /// </summary>
+ /// <remarks>In this implementation this property is not supported</remarks>
+ /// <exception cref="NotSupportedException">Always thrown</exception>
+ public override long Position
+ {
+ get
+ {
+ throw new NotSupportedException();
+ }
+ set
+ {
+ throw new NotSupportedException();
+ }
+ }
+
+ /// <summary>
+ /// Gets the size of the stream. Not suppported.
+ /// </summary>
+ /// <remarks>In this implementation this property is not supported</remarks>
+ /// <exception cref="NotSupportedException">Always thrown</exception>
+ public override long Length
+ {
+ get
+ {
+ throw new NotSupportedException();
+ }
+ }
+ #endregion
+ }
+}
diff --git a/contrib/zlib/contrib/dotzlib/DotZLib/Inflater.cs b/contrib/zlib/contrib/dotzlib/DotZLib/Inflater.cs
new file mode 100644
index 000000000..d295f2680
--- /dev/null
+++ b/contrib/zlib/contrib/dotzlib/DotZLib/Inflater.cs
@@ -0,0 +1,105 @@
+//
+// © Copyright Henrik Ravn 2004
+//
+// Use, modification and distribution are subject to 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)
+//
+
+using System;
+using System.Diagnostics;
+using System.Runtime.InteropServices;
+
+namespace DotZLib
+{
+
+ /// <summary>
+ /// Implements a data decompressor, using the inflate algorithm in the ZLib dll
+ /// </summary>
+ public class Inflater : CodecBase
+ {
+ #region Dll imports
+ [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl, CharSet=CharSet.Ansi)]
+ private static extern int inflateInit_(ref ZStream sz, string vs, int size);
+
+ [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
+ private static extern int inflate(ref ZStream sz, int flush);
+
+ [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
+ private static extern int inflateReset(ref ZStream sz);
+
+ [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
+ private static extern int inflateEnd(ref ZStream sz);
+ #endregion
+
+ /// <summary>
+ /// Constructs an new instance of the <c>Inflater</c>
+ /// </summary>
+ public Inflater() : base()
+ {
+ int retval = inflateInit_(ref _ztream, Info.Version, Marshal.SizeOf(_ztream));
+ if (retval != 0)
+ throw new ZLibException(retval, "Could not initialize inflater");
+
+ resetOutput();
+ }
+
+
+ /// <summary>
+ /// Adds more data to the codec to be processed.
+ /// </summary>
+ /// <param name="data">Byte array containing the data to be added to the codec</param>
+ /// <param name="offset">The index of the first byte to add from <c>data</c></param>
+ /// <param name="count">The number of bytes to add</param>
+ /// <remarks>Adding data may, or may not, raise the <c>DataAvailable</c> event</remarks>
+ public override void Add(byte[] data, int offset, int count)
+ {
+ if (data == null) throw new ArgumentNullException();
+ if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException();
+ if ((offset+count) > data.Length) throw new ArgumentException();
+
+ int total = count;
+ int inputIndex = offset;
+ int err = 0;
+
+ while (err >= 0 && inputIndex < total)
+ {
+ copyInput(data, inputIndex, Math.Min(total - inputIndex, kBufferSize));
+ err = inflate(ref _ztream, (int)FlushTypes.None);
+ if (err == 0)
+ while (_ztream.avail_out == 0)
+ {
+ OnDataAvailable();
+ err = inflate(ref _ztream, (int)FlushTypes.None);
+ }
+
+ inputIndex += (int)_ztream.total_in;
+ }
+ setChecksum( _ztream.adler );
+ }
+
+
+ /// <summary>
+ /// Finishes up any pending data that needs to be processed and handled.
+ /// </summary>
+ public override void Finish()
+ {
+ int err;
+ do
+ {
+ err = inflate(ref _ztream, (int)FlushTypes.Finish);
+ OnDataAvailable();
+ }
+ while (err == 0);
+ setChecksum( _ztream.adler );
+ inflateReset(ref _ztream);
+ resetOutput();
+ }
+
+ /// <summary>
+ /// Closes the internal zlib inflate stream
+ /// </summary>
+ protected override void CleanUp() { inflateEnd(ref _ztream); }
+
+
+ }
+}
diff --git a/contrib/zlib/contrib/dotzlib/DotZLib/UnitTests.cs b/contrib/zlib/contrib/dotzlib/DotZLib/UnitTests.cs
new file mode 100644
index 000000000..6d8aebb79
--- /dev/null
+++ b/contrib/zlib/contrib/dotzlib/DotZLib/UnitTests.cs
@@ -0,0 +1,274 @@
+//
+// © Copyright Henrik Ravn 2004
+//
+// Use, modification and distribution are subject to 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)
+//
+
+using System;
+using System.Collections;
+using System.IO;
+
+// uncomment the define below to include unit tests
+//#define nunit
+#if nunit
+using NUnit.Framework;
+
+// Unit tests for the DotZLib class library
+// ----------------------------------------
+//
+// Use this with NUnit 2 from http://www.nunit.org
+//
+
+namespace DotZLibTests
+{
+ using DotZLib;
+
+ // helper methods
+ internal class Utils
+ {
+ public static bool byteArrEqual( byte[] lhs, byte[] rhs )
+ {
+ if (lhs.Length != rhs.Length)
+ return false;
+ for (int i = lhs.Length-1; i >= 0; --i)
+ if (lhs[i] != rhs[i])
+ return false;
+ return true;
+ }
+
+ }
+
+
+ [TestFixture]
+ public class CircBufferTests
+ {
+ #region Circular buffer tests
+ [Test]
+ public void SinglePutGet()
+ {
+ CircularBuffer buf = new CircularBuffer(10);
+ Assert.AreEqual( 0, buf.Size );
+ Assert.AreEqual( -1, buf.Get() );
+
+ Assert.IsTrue(buf.Put( 1 ));
+ Assert.AreEqual( 1, buf.Size );
+ Assert.AreEqual( 1, buf.Get() );
+ Assert.AreEqual( 0, buf.Size );
+ Assert.AreEqual( -1, buf.Get() );
+ }
+
+ [Test]
+ public void BlockPutGet()
+ {
+ CircularBuffer buf = new CircularBuffer(10);
+ byte[] arr = {1,2,3,4,5,6,7,8,9,10};
+ Assert.AreEqual( 10, buf.Put(arr,0,10) );
+ Assert.AreEqual( 10, buf.Size );
+ Assert.IsFalse( buf.Put(11) );
+ Assert.AreEqual( 1, buf.Get() );
+ Assert.IsTrue( buf.Put(11) );
+
+ byte[] arr2 = (byte[])arr.Clone();
+ Assert.AreEqual( 9, buf.Get(arr2,1,9) );
+ Assert.IsTrue( Utils.byteArrEqual(arr,arr2) );
+ }
+
+ #endregion
+ }
+
+ [TestFixture]
+ public class ChecksumTests
+ {
+ #region CRC32 Tests
+ [Test]
+ public void CRC32_Null()
+ {
+ CRC32Checksum crc32 = new CRC32Checksum();
+ Assert.AreEqual( 0, crc32.Value );
+
+ crc32 = new CRC32Checksum(1);
+ Assert.AreEqual( 1, crc32.Value );
+
+ crc32 = new CRC32Checksum(556);
+ Assert.AreEqual( 556, crc32.Value );
+ }
+
+ [Test]
+ public void CRC32_Data()
+ {
+ CRC32Checksum crc32 = new CRC32Checksum();
+ byte[] data = { 1,2,3,4,5,6,7 };
+ crc32.Update(data);
+ Assert.AreEqual( 0x70e46888, crc32.Value );
+
+ crc32 = new CRC32Checksum();
+ crc32.Update("penguin");
+ Assert.AreEqual( 0x0e5c1a120, crc32.Value );
+
+ crc32 = new CRC32Checksum(1);
+ crc32.Update("penguin");
+ Assert.AreEqual(0x43b6aa94, crc32.Value);
+
+ }
+ #endregion
+
+ #region Adler tests
+
+ [Test]
+ public void Adler_Null()
+ {
+ AdlerChecksum adler = new AdlerChecksum();
+ Assert.AreEqual(0, adler.Value);
+
+ adler = new AdlerChecksum(1);
+ Assert.AreEqual( 1, adler.Value );
+
+ adler = new AdlerChecksum(556);
+ Assert.AreEqual( 556, adler.Value );
+ }
+
+ [Test]
+ public void Adler_Data()
+ {
+ AdlerChecksum adler = new AdlerChecksum(1);
+ byte[] data = { 1,2,3,4,5,6,7 };
+ adler.Update(data);
+ Assert.AreEqual( 0x5b001d, adler.Value );
+
+ adler = new AdlerChecksum();
+ adler.Update("penguin");
+ Assert.AreEqual(0x0bcf02f6, adler.Value );
+
+ adler = new AdlerChecksum(1);
+ adler.Update("penguin");
+ Assert.AreEqual(0x0bd602f7, adler.Value);
+
+ }
+ #endregion
+ }
+
+ [TestFixture]
+ public class InfoTests
+ {
+ #region Info tests
+ [Test]
+ public void Info_Version()
+ {
+ Info info = new Info();
+ Assert.AreEqual("1.2.11", Info.Version);
+ Assert.AreEqual(32, info.SizeOfUInt);
+ Assert.AreEqual(32, info.SizeOfULong);
+ Assert.AreEqual(32, info.SizeOfPointer);
+ Assert.AreEqual(32, info.SizeOfOffset);
+ }
+ #endregion
+ }
+
+ [TestFixture]
+ public class DeflateInflateTests
+ {
+ #region Deflate tests
+ [Test]
+ public void Deflate_Init()
+ {
+ using (Deflater def = new Deflater(CompressLevel.Default))
+ {
+ }
+ }
+
+ private ArrayList compressedData = new ArrayList();
+ private uint adler1;
+
+ private ArrayList uncompressedData = new ArrayList();
+ private uint adler2;
+
+ public void CDataAvail(byte[] data, int startIndex, int count)
+ {
+ for (int i = 0; i < count; ++i)
+ compressedData.Add(data[i+startIndex]);
+ }
+
+ [Test]
+ public void Deflate_Compress()
+ {
+ compressedData.Clear();
+
+ byte[] testData = new byte[35000];
+ for (int i = 0; i < testData.Length; ++i)
+ testData[i] = 5;
+
+ using (Deflater def = new Deflater((CompressLevel)5))
+ {
+ def.DataAvailable += new DataAvailableHandler(CDataAvail);
+ def.Add(testData);
+ def.Finish();
+ adler1 = def.Checksum;
+ }
+ }
+ #endregion
+
+ #region Inflate tests
+ [Test]
+ public void Inflate_Init()
+ {
+ using (Inflater inf = new Inflater())
+ {
+ }
+ }
+
+ private void DDataAvail(byte[] data, int startIndex, int count)
+ {
+ for (int i = 0; i < count; ++i)
+ uncompressedData.Add(data[i+startIndex]);
+ }
+
+ [Test]
+ public void Inflate_Expand()
+ {
+ uncompressedData.Clear();
+
+ using (Inflater inf = new Inflater())
+ {
+ inf.DataAvailable += new DataAvailableHandler(DDataAvail);
+ inf.Add((byte[])compressedData.ToArray(typeof(byte)));
+ inf.Finish();
+ adler2 = inf.Checksum;
+ }
+ Assert.AreEqual( adler1, adler2 );
+ }
+ #endregion
+ }
+
+ [TestFixture]
+ public class GZipStreamTests
+ {
+ #region GZipStream test
+ [Test]
+ public void GZipStream_WriteRead()
+ {
+ using (GZipStream gzOut = new GZipStream("gzstream.gz", CompressLevel.Best))
+ {
+ BinaryWriter writer = new BinaryWriter(gzOut);
+ writer.Write("hi there");
+ writer.Write(Math.PI);
+ writer.Write(42);
+ }
+
+ using (GZipStream gzIn = new GZipStream("gzstream.gz"))
+ {
+ BinaryReader reader = new BinaryReader(gzIn);
+ string s = reader.ReadString();
+ Assert.AreEqual("hi there",s);
+ double d = reader.ReadDouble();
+ Assert.AreEqual(Math.PI, d);
+ int i = reader.ReadInt32();
+ Assert.AreEqual(42,i);
+ }
+
+ }
+ #endregion
+ }
+}
+
+#endif
diff --git a/contrib/zlib/contrib/dotzlib/LICENSE_1_0.txt b/contrib/zlib/contrib/dotzlib/LICENSE_1_0.txt
new file mode 100644
index 000000000..127a5bc39
--- /dev/null
+++ b/contrib/zlib/contrib/dotzlib/LICENSE_1_0.txt
@@ -0,0 +1,23 @@
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE. \ No newline at end of file
diff --git a/contrib/zlib/contrib/dotzlib/readme.txt b/contrib/zlib/contrib/dotzlib/readme.txt
new file mode 100644
index 000000000..4d8c2dd93
--- /dev/null
+++ b/contrib/zlib/contrib/dotzlib/readme.txt
@@ -0,0 +1,58 @@
+This directory contains a .Net wrapper class library for the ZLib1.dll
+
+The wrapper includes support for inflating/deflating memory buffers,
+.Net streaming wrappers for the gz streams part of zlib, and wrappers
+for the checksum parts of zlib. See DotZLib/UnitTests.cs for examples.
+
+Directory structure:
+--------------------
+
+LICENSE_1_0.txt - License file.
+readme.txt - This file.
+DotZLib.chm - Class library documentation
+DotZLib.build - NAnt build file
+DotZLib.sln - Microsoft Visual Studio 2003 solution file
+
+DotZLib\*.cs - Source files for the class library
+
+Unit tests:
+-----------
+The file DotZLib/UnitTests.cs contains unit tests for use with NUnit 2.1 or higher.
+To include unit tests in the build, define nunit before building.
+
+
+Build instructions:
+-------------------
+
+1. Using Visual Studio.Net 2003:
+ Open DotZLib.sln in VS.Net and build from there. Output file (DotZLib.dll)
+ will be found ./DotZLib/bin/release or ./DotZLib/bin/debug, depending on
+ you are building the release or debug version of the library. Check
+ DotZLib/UnitTests.cs for instructions on how to include unit tests in the
+ build.
+
+2. Using NAnt:
+ Open a command prompt with access to the build environment and run nant
+ in the same directory as the DotZLib.build file.
+ You can define 2 properties on the nant command-line to control the build:
+ debug={true|false} to toggle between release/debug builds (default=true).
+ nunit={true|false} to include or esclude unit tests (default=true).
+ Also the target clean will remove binaries.
+ Output file (DotZLib.dll) will be found in either ./DotZLib/bin/release
+ or ./DotZLib/bin/debug, depending on whether you are building the release
+ or debug version of the library.
+
+ Examples:
+ nant -D:debug=false -D:nunit=false
+ will build a release mode version of the library without unit tests.
+ nant
+ will build a debug version of the library with unit tests
+ nant clean
+ will remove all previously built files.
+
+
+---------------------------------
+Copyright (c) Henrik Ravn 2004
+
+Use, modification and distribution are subject to 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)
diff --git a/contrib/zlib/contrib/gcc_gvmat64/gvmat64.S b/contrib/zlib/contrib/gcc_gvmat64/gvmat64.S
new file mode 100644
index 000000000..23309fa28
--- /dev/null
+++ b/contrib/zlib/contrib/gcc_gvmat64/gvmat64.S
@@ -0,0 +1,574 @@
+/*
+;uInt longest_match_x64(
+; deflate_state *s,
+; IPos cur_match); // current match
+
+; gvmat64.S -- Asm portion of the optimized longest_match for 32 bits x86_64
+; (AMD64 on Athlon 64, Opteron, Phenom
+; and Intel EM64T on Pentium 4 with EM64T, Pentium D, Core 2 Duo, Core I5/I7)
+; this file is translation from gvmat64.asm to GCC 4.x (for Linux, Mac XCode)
+; Copyright (C) 1995-2010 Jean-loup Gailly, Brian Raiter and Gilles Vollant.
+;
+; File written by Gilles Vollant, by converting to assembly the longest_match
+; from Jean-loup Gailly in deflate.c of zLib and infoZip zip.
+; and by taking inspiration on asm686 with masm, optimised assembly code
+; from Brian Raiter, written 1998
+;
+; This software is provided 'as-is', without any express or implied
+; warranty. In no event will the authors be held liable for any damages
+; arising from the use of this software.
+;
+; Permission is granted to anyone to use this software for any purpose,
+; including commercial applications, and to alter it and redistribute it
+; freely, subject to the following restrictions:
+;
+; 1. The origin of this software must not be misrepresented; you must not
+; claim that you wrote the original software. If you use this software
+; in a product, an acknowledgment in the product documentation would be
+; appreciated but is not required.
+; 2. Altered source versions must be plainly marked as such, and must not be
+; misrepresented as being the original software
+; 3. This notice may not be removed or altered from any source distribution.
+;
+; http://www.zlib.net
+; http://www.winimage.com/zLibDll
+; http://www.muppetlabs.com/~breadbox/software/assembly.html
+;
+; to compile this file for zLib, I use option:
+; gcc -c -arch x86_64 gvmat64.S
+
+
+;uInt longest_match(s, cur_match)
+; deflate_state *s;
+; IPos cur_match; // current match /
+;
+; with XCode for Mac, I had strange error with some jump on intel syntax
+; this is why BEFORE_JMP and AFTER_JMP are used
+ */
+
+
+#define BEFORE_JMP .att_syntax
+#define AFTER_JMP .intel_syntax noprefix
+
+#ifndef NO_UNDERLINE
+# define match_init _match_init
+# define longest_match _longest_match
+#endif
+
+.intel_syntax noprefix
+
+.globl match_init, longest_match
+.text
+longest_match:
+
+
+
+#define LocalVarsSize 96
+/*
+; register used : rax,rbx,rcx,rdx,rsi,rdi,r8,r9,r10,r11,r12
+; free register : r14,r15
+; register can be saved : rsp
+*/
+
+#define chainlenwmask (rsp + 8 - LocalVarsSize)
+#define nicematch (rsp + 16 - LocalVarsSize)
+
+#define save_rdi (rsp + 24 - LocalVarsSize)
+#define save_rsi (rsp + 32 - LocalVarsSize)
+#define save_rbx (rsp + 40 - LocalVarsSize)
+#define save_rbp (rsp + 48 - LocalVarsSize)
+#define save_r12 (rsp + 56 - LocalVarsSize)
+#define save_r13 (rsp + 64 - LocalVarsSize)
+#define save_r14 (rsp + 72 - LocalVarsSize)
+#define save_r15 (rsp + 80 - LocalVarsSize)
+
+
+/*
+; all the +4 offsets are due to the addition of pending_buf_size (in zlib
+; in the deflate_state structure since the asm code was first written
+; (if you compile with zlib 1.0.4 or older, remove the +4).
+; Note : these value are good with a 8 bytes boundary pack structure
+*/
+
+#define MAX_MATCH 258
+#define MIN_MATCH 3
+#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
+
+/*
+;;; Offsets for fields in the deflate_state structure. These numbers
+;;; are calculated from the definition of deflate_state, with the
+;;; assumption that the compiler will dword-align the fields. (Thus,
+;;; changing the definition of deflate_state could easily cause this
+;;; program to crash horribly, without so much as a warning at
+;;; compile time. Sigh.)
+
+; all the +zlib1222add offsets are due to the addition of fields
+; in zlib in the deflate_state structure since the asm code was first written
+; (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)").
+; (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0").
+; if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8").
+*/
+
+
+
+/* you can check the structure offset by running
+
+#include <stdlib.h>
+#include <stdio.h>
+#include "deflate.h"
+
+void print_depl()
+{
+deflate_state ds;
+deflate_state *s=&ds;
+printf("size pointer=%u\n",(int)sizeof(void*));
+
+printf("#define dsWSize %u\n",(int)(((char*)&(s->w_size))-((char*)s)));
+printf("#define dsWMask %u\n",(int)(((char*)&(s->w_mask))-((char*)s)));
+printf("#define dsWindow %u\n",(int)(((char*)&(s->window))-((char*)s)));
+printf("#define dsPrev %u\n",(int)(((char*)&(s->prev))-((char*)s)));
+printf("#define dsMatchLen %u\n",(int)(((char*)&(s->match_length))-((char*)s)));
+printf("#define dsPrevMatch %u\n",(int)(((char*)&(s->prev_match))-((char*)s)));
+printf("#define dsStrStart %u\n",(int)(((char*)&(s->strstart))-((char*)s)));
+printf("#define dsMatchStart %u\n",(int)(((char*)&(s->match_start))-((char*)s)));
+printf("#define dsLookahead %u\n",(int)(((char*)&(s->lookahead))-((char*)s)));
+printf("#define dsPrevLen %u\n",(int)(((char*)&(s->prev_length))-((char*)s)));
+printf("#define dsMaxChainLen %u\n",(int)(((char*)&(s->max_chain_length))-((char*)s)));
+printf("#define dsGoodMatch %u\n",(int)(((char*)&(s->good_match))-((char*)s)));
+printf("#define dsNiceMatch %u\n",(int)(((char*)&(s->nice_match))-((char*)s)));
+}
+*/
+
+#define dsWSize 68
+#define dsWMask 76
+#define dsWindow 80
+#define dsPrev 96
+#define dsMatchLen 144
+#define dsPrevMatch 148
+#define dsStrStart 156
+#define dsMatchStart 160
+#define dsLookahead 164
+#define dsPrevLen 168
+#define dsMaxChainLen 172
+#define dsGoodMatch 188
+#define dsNiceMatch 192
+
+#define window_size [ rcx + dsWSize]
+#define WMask [ rcx + dsWMask]
+#define window_ad [ rcx + dsWindow]
+#define prev_ad [ rcx + dsPrev]
+#define strstart [ rcx + dsStrStart]
+#define match_start [ rcx + dsMatchStart]
+#define Lookahead [ rcx + dsLookahead] //; 0ffffffffh on infozip
+#define prev_length [ rcx + dsPrevLen]
+#define max_chain_length [ rcx + dsMaxChainLen]
+#define good_match [ rcx + dsGoodMatch]
+#define nice_match [ rcx + dsNiceMatch]
+
+/*
+; windows:
+; parameter 1 in rcx(deflate state s), param 2 in rdx (cur match)
+
+; see http://weblogs.asp.net/oldnewthing/archive/2004/01/14/58579.aspx and
+; http://msdn.microsoft.com/library/en-us/kmarch/hh/kmarch/64bitAMD_8e951dd2-ee77-4728-8702-55ce4b5dd24a.xml.asp
+;
+; All registers must be preserved across the call, except for
+; rax, rcx, rdx, r8, r9, r10, and r11, which are scratch.
+
+;
+; gcc on macosx-linux:
+; see http://www.x86-64.org/documentation/abi-0.99.pdf
+; param 1 in rdi, param 2 in rsi
+; rbx, rsp, rbp, r12 to r15 must be preserved
+
+;;; Save registers that the compiler may be using, and adjust esp to
+;;; make room for our stack frame.
+
+
+;;; Retrieve the function arguments. r8d will hold cur_match
+;;; throughout the entire function. edx will hold the pointer to the
+;;; deflate_state structure during the function's setup (before
+;;; entering the main loop.
+
+; ms: parameter 1 in rcx (deflate_state* s), param 2 in edx -> r8 (cur match)
+; mac: param 1 in rdi, param 2 rsi
+; this clear high 32 bits of r8, which can be garbage in both r8 and rdx
+*/
+ mov [save_rbx],rbx
+ mov [save_rbp],rbp
+
+
+ mov rcx,rdi
+
+ mov r8d,esi
+
+
+ mov [save_r12],r12
+ mov [save_r13],r13
+ mov [save_r14],r14
+ mov [save_r15],r15
+
+
+//;;; uInt wmask = s->w_mask;
+//;;; unsigned chain_length = s->max_chain_length;
+//;;; if (s->prev_length >= s->good_match) {
+//;;; chain_length >>= 2;
+//;;; }
+
+
+ mov edi, prev_length
+ mov esi, good_match
+ mov eax, WMask
+ mov ebx, max_chain_length
+ cmp edi, esi
+ jl LastMatchGood
+ shr ebx, 2
+LastMatchGood:
+
+//;;; chainlen is decremented once beforehand so that the function can
+//;;; use the sign flag instead of the zero flag for the exit test.
+//;;; It is then shifted into the high word, to make room for the wmask
+//;;; value, which it will always accompany.
+
+ dec ebx
+ shl ebx, 16
+ or ebx, eax
+
+//;;; on zlib only
+//;;; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
+
+
+
+ mov eax, nice_match
+ mov [chainlenwmask], ebx
+ mov r10d, Lookahead
+ cmp r10d, eax
+ cmovnl r10d, eax
+ mov [nicematch],r10d
+
+
+
+//;;; register Bytef *scan = s->window + s->strstart;
+ mov r10, window_ad
+ mov ebp, strstart
+ lea r13, [r10 + rbp]
+
+//;;; Determine how many bytes the scan ptr is off from being
+//;;; dword-aligned.
+
+ mov r9,r13
+ neg r13
+ and r13,3
+
+//;;; IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
+//;;; s->strstart - (IPos)MAX_DIST(s) : NIL;
+
+
+ mov eax, window_size
+ sub eax, MIN_LOOKAHEAD
+
+
+ xor edi,edi
+ sub ebp, eax
+
+ mov r11d, prev_length
+
+ cmovng ebp,edi
+
+//;;; int best_len = s->prev_length;
+
+
+//;;; Store the sum of s->window + best_len in esi locally, and in esi.
+
+ lea rsi,[r10+r11]
+
+//;;; register ush scan_start = *(ushf*)scan;
+//;;; register ush scan_end = *(ushf*)(scan+best_len-1);
+//;;; Posf *prev = s->prev;
+
+ movzx r12d,word ptr [r9]
+ movzx ebx, word ptr [r9 + r11 - 1]
+
+ mov rdi, prev_ad
+
+//;;; Jump into the main loop.
+
+ mov edx, [chainlenwmask]
+
+ cmp bx,word ptr [rsi + r8 - 1]
+ jz LookupLoopIsZero
+
+
+
+LookupLoop1:
+ and r8d, edx
+
+ movzx r8d, word ptr [rdi + r8*2]
+ cmp r8d, ebp
+ jbe LeaveNow
+
+
+
+ sub edx, 0x00010000
+ BEFORE_JMP
+ js LeaveNow
+ AFTER_JMP
+
+LoopEntry1:
+ cmp bx,word ptr [rsi + r8 - 1]
+ BEFORE_JMP
+ jz LookupLoopIsZero
+ AFTER_JMP
+
+LookupLoop2:
+ and r8d, edx
+
+ movzx r8d, word ptr [rdi + r8*2]
+ cmp r8d, ebp
+ BEFORE_JMP
+ jbe LeaveNow
+ AFTER_JMP
+ sub edx, 0x00010000
+ BEFORE_JMP
+ js LeaveNow
+ AFTER_JMP
+
+LoopEntry2:
+ cmp bx,word ptr [rsi + r8 - 1]
+ BEFORE_JMP
+ jz LookupLoopIsZero
+ AFTER_JMP
+
+LookupLoop4:
+ and r8d, edx
+
+ movzx r8d, word ptr [rdi + r8*2]
+ cmp r8d, ebp
+ BEFORE_JMP
+ jbe LeaveNow
+ AFTER_JMP
+ sub edx, 0x00010000
+ BEFORE_JMP
+ js LeaveNow
+ AFTER_JMP
+
+LoopEntry4:
+
+ cmp bx,word ptr [rsi + r8 - 1]
+ BEFORE_JMP
+ jnz LookupLoop1
+ jmp LookupLoopIsZero
+ AFTER_JMP
+/*
+;;; do {
+;;; match = s->window + cur_match;
+;;; if (*(ushf*)(match+best_len-1) != scan_end ||
+;;; *(ushf*)match != scan_start) continue;
+;;; [...]
+;;; } while ((cur_match = prev[cur_match & wmask]) > limit
+;;; && --chain_length != 0);
+;;;
+;;; Here is the inner loop of the function. The function will spend the
+;;; majority of its time in this loop, and majority of that time will
+;;; be spent in the first ten instructions.
+;;;
+;;; Within this loop:
+;;; ebx = scanend
+;;; r8d = curmatch
+;;; edx = chainlenwmask - i.e., ((chainlen << 16) | wmask)
+;;; esi = windowbestlen - i.e., (window + bestlen)
+;;; edi = prev
+;;; ebp = limit
+*/
+.balign 16
+LookupLoop:
+ and r8d, edx
+
+ movzx r8d, word ptr [rdi + r8*2]
+ cmp r8d, ebp
+ BEFORE_JMP
+ jbe LeaveNow
+ AFTER_JMP
+ sub edx, 0x00010000
+ BEFORE_JMP
+ js LeaveNow
+ AFTER_JMP
+
+LoopEntry:
+
+ cmp bx,word ptr [rsi + r8 - 1]
+ BEFORE_JMP
+ jnz LookupLoop1
+ AFTER_JMP
+LookupLoopIsZero:
+ cmp r12w, word ptr [r10 + r8]
+ BEFORE_JMP
+ jnz LookupLoop1
+ AFTER_JMP
+
+
+//;;; Store the current value of chainlen.
+ mov [chainlenwmask], edx
+/*
+;;; Point edi to the string under scrutiny, and esi to the string we
+;;; are hoping to match it up with. In actuality, esi and edi are
+;;; both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and edx is
+;;; initialized to -(MAX_MATCH_8 - scanalign).
+*/
+ lea rsi,[r8+r10]
+ mov rdx, 0xfffffffffffffef8 //; -(MAX_MATCH_8)
+ lea rsi, [rsi + r13 + 0x0108] //;MAX_MATCH_8]
+ lea rdi, [r9 + r13 + 0x0108] //;MAX_MATCH_8]
+
+ prefetcht1 [rsi+rdx]
+ prefetcht1 [rdi+rdx]
+
+/*
+;;; Test the strings for equality, 8 bytes at a time. At the end,
+;;; adjust rdx so that it is offset to the exact byte that mismatched.
+;;;
+;;; We already know at this point that the first three bytes of the
+;;; strings match each other, and they can be safely passed over before
+;;; starting the compare loop. So what this code does is skip over 0-3
+;;; bytes, as much as necessary in order to dword-align the edi
+;;; pointer. (rsi will still be misaligned three times out of four.)
+;;;
+;;; It should be confessed that this loop usually does not represent
+;;; much of the total running time. Replacing it with a more
+;;; straightforward "rep cmpsb" would not drastically degrade
+;;; performance.
+*/
+
+LoopCmps:
+ mov rax, [rsi + rdx]
+ xor rax, [rdi + rdx]
+ jnz LeaveLoopCmps
+
+ mov rax, [rsi + rdx + 8]
+ xor rax, [rdi + rdx + 8]
+ jnz LeaveLoopCmps8
+
+
+ mov rax, [rsi + rdx + 8+8]
+ xor rax, [rdi + rdx + 8+8]
+ jnz LeaveLoopCmps16
+
+ add rdx,8+8+8
+
+ BEFORE_JMP
+ jnz LoopCmps
+ jmp LenMaximum
+ AFTER_JMP
+
+LeaveLoopCmps16: add rdx,8
+LeaveLoopCmps8: add rdx,8
+LeaveLoopCmps:
+
+ test eax, 0x0000FFFF
+ jnz LenLower
+
+ test eax,0xffffffff
+
+ jnz LenLower32
+
+ add rdx,4
+ shr rax,32
+ or ax,ax
+ BEFORE_JMP
+ jnz LenLower
+ AFTER_JMP
+
+LenLower32:
+ shr eax,16
+ add rdx,2
+
+LenLower:
+ sub al, 1
+ adc rdx, 0
+//;;; Calculate the length of the match. If it is longer than MAX_MATCH,
+//;;; then automatically accept it as the best possible match and leave.
+
+ lea rax, [rdi + rdx]
+ sub rax, r9
+ cmp eax, MAX_MATCH
+ BEFORE_JMP
+ jge LenMaximum
+ AFTER_JMP
+/*
+;;; If the length of the match is not longer than the best match we
+;;; have so far, then forget it and return to the lookup loop.
+;///////////////////////////////////
+*/
+ cmp eax, r11d
+ jg LongerMatch
+
+ lea rsi,[r10+r11]
+
+ mov rdi, prev_ad
+ mov edx, [chainlenwmask]
+ BEFORE_JMP
+ jmp LookupLoop
+ AFTER_JMP
+/*
+;;; s->match_start = cur_match;
+;;; best_len = len;
+;;; if (len >= nice_match) break;
+;;; scan_end = *(ushf*)(scan+best_len-1);
+*/
+LongerMatch:
+ mov r11d, eax
+ mov match_start, r8d
+ cmp eax, [nicematch]
+ BEFORE_JMP
+ jge LeaveNow
+ AFTER_JMP
+
+ lea rsi,[r10+rax]
+
+ movzx ebx, word ptr [r9 + rax - 1]
+ mov rdi, prev_ad
+ mov edx, [chainlenwmask]
+ BEFORE_JMP
+ jmp LookupLoop
+ AFTER_JMP
+
+//;;; Accept the current string, with the maximum possible length.
+
+LenMaximum:
+ mov r11d,MAX_MATCH
+ mov match_start, r8d
+
+//;;; if ((uInt)best_len <= s->lookahead) return (uInt)best_len;
+//;;; return s->lookahead;
+
+LeaveNow:
+ mov eax, Lookahead
+ cmp r11d, eax
+ cmovng eax, r11d
+
+
+
+//;;; Restore the stack and return from whence we came.
+
+
+// mov rsi,[save_rsi]
+// mov rdi,[save_rdi]
+ mov rbx,[save_rbx]
+ mov rbp,[save_rbp]
+ mov r12,[save_r12]
+ mov r13,[save_r13]
+ mov r14,[save_r14]
+ mov r15,[save_r15]
+
+
+ ret 0
+//; please don't remove this string !
+//; Your can freely use gvmat64 in any free or commercial app
+//; but it is far better don't remove the string in the binary!
+ // db 0dh,0ah,"asm686 with masm, optimised assembly code from Brian Raiter, written 1998, converted to amd 64 by Gilles Vollant 2005",0dh,0ah,0
+
+
+match_init:
+ ret 0
+
+
diff --git a/contrib/zlib/contrib/infback9/README b/contrib/zlib/contrib/infback9/README
new file mode 100644
index 000000000..e75ed1329
--- /dev/null
+++ b/contrib/zlib/contrib/infback9/README
@@ -0,0 +1 @@
+See infback9.h for what this is and how to use it.
diff --git a/contrib/zlib/contrib/infback9/infback9.c b/contrib/zlib/contrib/infback9/infback9.c
new file mode 100644
index 000000000..05fb3e338
--- /dev/null
+++ b/contrib/zlib/contrib/infback9/infback9.c
@@ -0,0 +1,615 @@
+/* infback9.c -- inflate deflate64 data using a call-back interface
+ * Copyright (C) 1995-2008 Mark Adler
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+#include "zutil.h"
+#include "infback9.h"
+#include "inftree9.h"
+#include "inflate9.h"
+
+#define WSIZE 65536UL
+
+/*
+ strm provides memory allocation functions in zalloc and zfree, or
+ Z_NULL to use the library memory allocation functions.
+
+ window is a user-supplied window and output buffer that is 64K bytes.
+ */
+int ZEXPORT inflateBack9Init_(strm, window, version, stream_size)
+z_stream FAR *strm;
+unsigned char FAR *window;
+const char *version;
+int stream_size;
+{
+ struct inflate_state FAR *state;
+
+ if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
+ stream_size != (int)(sizeof(z_stream)))
+ return Z_VERSION_ERROR;
+ if (strm == Z_NULL || window == Z_NULL)
+ return Z_STREAM_ERROR;
+ strm->msg = Z_NULL; /* in case we return an error */
+ if (strm->zalloc == (alloc_func)0) {
+ strm->zalloc = zcalloc;
+ strm->opaque = (voidpf)0;
+ }
+ if (strm->zfree == (free_func)0) strm->zfree = zcfree;
+ state = (struct inflate_state FAR *)ZALLOC(strm, 1,
+ sizeof(struct inflate_state));
+ if (state == Z_NULL) return Z_MEM_ERROR;
+ Tracev((stderr, "inflate: allocated\n"));
+ strm->state = (voidpf)state;
+ state->window = window;
+ return Z_OK;
+}
+
+/*
+ Build and output length and distance decoding tables for fixed code
+ decoding.
+ */
+#ifdef MAKEFIXED
+#include <stdio.h>
+
+void makefixed9(void)
+{
+ unsigned sym, bits, low, size;
+ code *next, *lenfix, *distfix;
+ struct inflate_state state;
+ code fixed[544];
+
+ /* literal/length table */
+ sym = 0;
+ while (sym < 144) state.lens[sym++] = 8;
+ while (sym < 256) state.lens[sym++] = 9;
+ while (sym < 280) state.lens[sym++] = 7;
+ while (sym < 288) state.lens[sym++] = 8;
+ next = fixed;
+ lenfix = next;
+ bits = 9;
+ inflate_table9(LENS, state.lens, 288, &(next), &(bits), state.work);
+
+ /* distance table */
+ sym = 0;
+ while (sym < 32) state.lens[sym++] = 5;
+ distfix = next;
+ bits = 5;
+ inflate_table9(DISTS, state.lens, 32, &(next), &(bits), state.work);
+
+ /* write tables */
+ puts(" /* inffix9.h -- table for decoding deflate64 fixed codes");
+ puts(" * Generated automatically by makefixed9().");
+ puts(" */");
+ puts("");
+ puts(" /* WARNING: this file should *not* be used by applications.");
+ puts(" It is part of the implementation of this library and is");
+ puts(" subject to change. Applications should only use zlib.h.");
+ puts(" */");
+ puts("");
+ size = 1U << 9;
+ printf(" static const code lenfix[%u] = {", size);
+ low = 0;
+ for (;;) {
+ if ((low % 6) == 0) printf("\n ");
+ printf("{%u,%u,%d}", lenfix[low].op, lenfix[low].bits,
+ lenfix[low].val);
+ if (++low == size) break;
+ putchar(',');
+ }
+ puts("\n };");
+ size = 1U << 5;
+ printf("\n static const code distfix[%u] = {", size);
+ low = 0;
+ for (;;) {
+ if ((low % 5) == 0) printf("\n ");
+ printf("{%u,%u,%d}", distfix[low].op, distfix[low].bits,
+ distfix[low].val);
+ if (++low == size) break;
+ putchar(',');
+ }
+ puts("\n };");
+}
+#endif /* MAKEFIXED */
+
+/* Macros for inflateBack(): */
+
+/* Clear the input bit accumulator */
+#define INITBITS() \
+ do { \
+ hold = 0; \
+ bits = 0; \
+ } while (0)
+
+/* Assure that some input is available. If input is requested, but denied,
+ then return a Z_BUF_ERROR from inflateBack(). */
+#define PULL() \
+ do { \
+ if (have == 0) { \
+ have = in(in_desc, &next); \
+ if (have == 0) { \
+ next = Z_NULL; \
+ ret = Z_BUF_ERROR; \
+ goto inf_leave; \
+ } \
+ } \
+ } while (0)
+
+/* Get a byte of input into the bit accumulator, or return from inflateBack()
+ with an error if there is no input available. */
+#define PULLBYTE() \
+ do { \
+ PULL(); \
+ have--; \
+ hold += (unsigned long)(*next++) << bits; \
+ bits += 8; \
+ } while (0)
+
+/* Assure that there are at least n bits in the bit accumulator. If there is
+ not enough available input to do that, then return from inflateBack() with
+ an error. */
+#define NEEDBITS(n) \
+ do { \
+ while (bits < (unsigned)(n)) \
+ PULLBYTE(); \
+ } while (0)
+
+/* Return the low n bits of the bit accumulator (n <= 16) */
+#define BITS(n) \
+ ((unsigned)hold & ((1U << (n)) - 1))
+
+/* Remove n bits from the bit accumulator */
+#define DROPBITS(n) \
+ do { \
+ hold >>= (n); \
+ bits -= (unsigned)(n); \
+ } while (0)
+
+/* Remove zero to seven bits as needed to go to a byte boundary */
+#define BYTEBITS() \
+ do { \
+ hold >>= bits & 7; \
+ bits -= bits & 7; \
+ } while (0)
+
+/* Assure that some output space is available, by writing out the window
+ if it's full. If the write fails, return from inflateBack() with a
+ Z_BUF_ERROR. */
+#define ROOM() \
+ do { \
+ if (left == 0) { \
+ put = window; \
+ left = WSIZE; \
+ wrap = 1; \
+ if (out(out_desc, put, (unsigned)left)) { \
+ ret = Z_BUF_ERROR; \
+ goto inf_leave; \
+ } \
+ } \
+ } while (0)
+
+/*
+ strm provides the memory allocation functions and window buffer on input,
+ and provides information on the unused input on return. For Z_DATA_ERROR
+ returns, strm will also provide an error message.
+
+ in() and out() are the call-back input and output functions. When
+ inflateBack() needs more input, it calls in(). When inflateBack() has
+ filled the window with output, or when it completes with data in the
+ window, it calls out() to write out the data. The application must not
+ change the provided input until in() is called again or inflateBack()
+ returns. The application must not change the window/output buffer until
+ inflateBack() returns.
+
+ in() and out() are called with a descriptor parameter provided in the
+ inflateBack() call. This parameter can be a structure that provides the
+ information required to do the read or write, as well as accumulated
+ information on the input and output such as totals and check values.
+
+ in() should return zero on failure. out() should return non-zero on
+ failure. If either in() or out() fails, than inflateBack() returns a
+ Z_BUF_ERROR. strm->next_in can be checked for Z_NULL to see whether it
+ was in() or out() that caused in the error. Otherwise, inflateBack()
+ returns Z_STREAM_END on success, Z_DATA_ERROR for an deflate format
+ error, or Z_MEM_ERROR if it could not allocate memory for the state.
+ inflateBack() can also return Z_STREAM_ERROR if the input parameters
+ are not correct, i.e. strm is Z_NULL or the state was not initialized.
+ */
+int ZEXPORT inflateBack9(strm, in, in_desc, out, out_desc)
+z_stream FAR *strm;
+in_func in;
+void FAR *in_desc;
+out_func out;
+void FAR *out_desc;
+{
+ struct inflate_state FAR *state;
+ z_const unsigned char FAR *next; /* next input */
+ unsigned char FAR *put; /* next output */
+ unsigned have; /* available input */
+ unsigned long left; /* available output */
+ inflate_mode mode; /* current inflate mode */
+ int lastblock; /* true if processing last block */
+ int wrap; /* true if the window has wrapped */
+ unsigned char FAR *window; /* allocated sliding window, if needed */
+ unsigned long hold; /* bit buffer */
+ unsigned bits; /* bits in bit buffer */
+ unsigned extra; /* extra bits needed */
+ unsigned long length; /* literal or length of data to copy */
+ unsigned long offset; /* distance back to copy string from */
+ unsigned long copy; /* number of stored or match bytes to copy */
+ unsigned char FAR *from; /* where to copy match bytes from */
+ code const FAR *lencode; /* starting table for length/literal codes */
+ code const FAR *distcode; /* starting table for distance codes */
+ unsigned lenbits; /* index bits for lencode */
+ unsigned distbits; /* index bits for distcode */
+ code here; /* current decoding table entry */
+ code last; /* parent table entry */
+ unsigned len; /* length to copy for repeats, bits to drop */
+ int ret; /* return code */
+ static const unsigned short order[19] = /* permutation of code lengths */
+ {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
+#include "inffix9.h"
+
+ /* Check that the strm exists and that the state was initialized */
+ if (strm == Z_NULL || strm->state == Z_NULL)
+ return Z_STREAM_ERROR;
+ state = (struct inflate_state FAR *)strm->state;
+
+ /* Reset the state */
+ strm->msg = Z_NULL;
+ mode = TYPE;
+ lastblock = 0;
+ wrap = 0;
+ window = state->window;
+ next = strm->next_in;
+ have = next != Z_NULL ? strm->avail_in : 0;
+ hold = 0;
+ bits = 0;
+ put = window;
+ left = WSIZE;
+ lencode = Z_NULL;
+ distcode = Z_NULL;
+
+ /* Inflate until end of block marked as last */
+ for (;;)
+ switch (mode) {
+ case TYPE:
+ /* determine and dispatch block type */
+ if (lastblock) {
+ BYTEBITS();
+ mode = DONE;
+ break;
+ }
+ NEEDBITS(3);
+ lastblock = BITS(1);
+ DROPBITS(1);
+ switch (BITS(2)) {
+ case 0: /* stored block */
+ Tracev((stderr, "inflate: stored block%s\n",
+ lastblock ? " (last)" : ""));
+ mode = STORED;
+ break;
+ case 1: /* fixed block */
+ lencode = lenfix;
+ lenbits = 9;
+ distcode = distfix;
+ distbits = 5;
+ Tracev((stderr, "inflate: fixed codes block%s\n",
+ lastblock ? " (last)" : ""));
+ mode = LEN; /* decode codes */
+ break;
+ case 2: /* dynamic block */
+ Tracev((stderr, "inflate: dynamic codes block%s\n",
+ lastblock ? " (last)" : ""));
+ mode = TABLE;
+ break;
+ case 3:
+ strm->msg = (char *)"invalid block type";
+ mode = BAD;
+ }
+ DROPBITS(2);
+ break;
+
+ case STORED:
+ /* get and verify stored block length */
+ BYTEBITS(); /* go to byte boundary */
+ NEEDBITS(32);
+ if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) {
+ strm->msg = (char *)"invalid stored block lengths";
+ mode = BAD;
+ break;
+ }
+ length = (unsigned)hold & 0xffff;
+ Tracev((stderr, "inflate: stored length %lu\n",
+ length));
+ INITBITS();
+
+ /* copy stored block from input to output */
+ while (length != 0) {
+ copy = length;
+ PULL();
+ ROOM();
+ if (copy > have) copy = have;
+ if (copy > left) copy = left;
+ zmemcpy(put, next, copy);
+ have -= copy;
+ next += copy;
+ left -= copy;
+ put += copy;
+ length -= copy;
+ }
+ Tracev((stderr, "inflate: stored end\n"));
+ mode = TYPE;
+ break;
+
+ case TABLE:
+ /* get dynamic table entries descriptor */
+ NEEDBITS(14);
+ state->nlen = BITS(5) + 257;
+ DROPBITS(5);
+ state->ndist = BITS(5) + 1;
+ DROPBITS(5);
+ state->ncode = BITS(4) + 4;
+ DROPBITS(4);
+ if (state->nlen > 286) {
+ strm->msg = (char *)"too many length symbols";
+ mode = BAD;
+ break;
+ }
+ Tracev((stderr, "inflate: table sizes ok\n"));
+
+ /* get code length code lengths (not a typo) */
+ state->have = 0;
+ while (state->have < state->ncode) {
+ NEEDBITS(3);
+ state->lens[order[state->have++]] = (unsigned short)BITS(3);
+ DROPBITS(3);
+ }
+ while (state->have < 19)
+ state->lens[order[state->have++]] = 0;
+ state->next = state->codes;
+ lencode = (code const FAR *)(state->next);
+ lenbits = 7;
+ ret = inflate_table9(CODES, state->lens, 19, &(state->next),
+ &(lenbits), state->work);
+ if (ret) {
+ strm->msg = (char *)"invalid code lengths set";
+ mode = BAD;
+ break;
+ }
+ Tracev((stderr, "inflate: code lengths ok\n"));
+
+ /* get length and distance code code lengths */
+ state->have = 0;
+ while (state->have < state->nlen + state->ndist) {
+ for (;;) {
+ here = lencode[BITS(lenbits)];
+ if ((unsigned)(here.bits) <= bits) break;
+ PULLBYTE();
+ }
+ if (here.val < 16) {
+ NEEDBITS(here.bits);
+ DROPBITS(here.bits);
+ state->lens[state->have++] = here.val;
+ }
+ else {
+ if (here.val == 16) {
+ NEEDBITS(here.bits + 2);
+ DROPBITS(here.bits);
+ if (state->have == 0) {
+ strm->msg = (char *)"invalid bit length repeat";
+ mode = BAD;
+ break;
+ }
+ len = (unsigned)(state->lens[state->have - 1]);
+ copy = 3 + BITS(2);
+ DROPBITS(2);
+ }
+ else if (here.val == 17) {
+ NEEDBITS(here.bits + 3);
+ DROPBITS(here.bits);
+ len = 0;
+ copy = 3 + BITS(3);
+ DROPBITS(3);
+ }
+ else {
+ NEEDBITS(here.bits + 7);
+ DROPBITS(here.bits);
+ len = 0;
+ copy = 11 + BITS(7);
+ DROPBITS(7);
+ }
+ if (state->have + copy > state->nlen + state->ndist) {
+ strm->msg = (char *)"invalid bit length repeat";
+ mode = BAD;
+ break;
+ }
+ while (copy--)
+ state->lens[state->have++] = (unsigned short)len;
+ }
+ }
+
+ /* handle error breaks in while */
+ if (mode == BAD) break;
+
+ /* check for end-of-block code (better have one) */
+ if (state->lens[256] == 0) {
+ strm->msg = (char *)"invalid code -- missing end-of-block";
+ mode = BAD;
+ break;
+ }
+
+ /* build code tables -- note: do not change the lenbits or distbits
+ values here (9 and 6) without reading the comments in inftree9.h
+ concerning the ENOUGH constants, which depend on those values */
+ state->next = state->codes;
+ lencode = (code const FAR *)(state->next);
+ lenbits = 9;
+ ret = inflate_table9(LENS, state->lens, state->nlen,
+ &(state->next), &(lenbits), state->work);
+ if (ret) {
+ strm->msg = (char *)"invalid literal/lengths set";
+ mode = BAD;
+ break;
+ }
+ distcode = (code const FAR *)(state->next);
+ distbits = 6;
+ ret = inflate_table9(DISTS, state->lens + state->nlen,
+ state->ndist, &(state->next), &(distbits),
+ state->work);
+ if (ret) {
+ strm->msg = (char *)"invalid distances set";
+ mode = BAD;
+ break;
+ }
+ Tracev((stderr, "inflate: codes ok\n"));
+ mode = LEN;
+
+ case LEN:
+ /* get a literal, length, or end-of-block code */
+ for (;;) {
+ here = lencode[BITS(lenbits)];
+ if ((unsigned)(here.bits) <= bits) break;
+ PULLBYTE();
+ }
+ if (here.op && (here.op & 0xf0) == 0) {
+ last = here;
+ for (;;) {
+ here = lencode[last.val +
+ (BITS(last.bits + last.op) >> last.bits)];
+ if ((unsigned)(last.bits + here.bits) <= bits) break;
+ PULLBYTE();
+ }
+ DROPBITS(last.bits);
+ }
+ DROPBITS(here.bits);
+ length = (unsigned)here.val;
+
+ /* process literal */
+ if (here.op == 0) {
+ Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
+ "inflate: literal '%c'\n" :
+ "inflate: literal 0x%02x\n", here.val));
+ ROOM();
+ *put++ = (unsigned char)(length);
+ left--;
+ mode = LEN;
+ break;
+ }
+
+ /* process end of block */
+ if (here.op & 32) {
+ Tracevv((stderr, "inflate: end of block\n"));
+ mode = TYPE;
+ break;
+ }
+
+ /* invalid code */
+ if (here.op & 64) {
+ strm->msg = (char *)"invalid literal/length code";
+ mode = BAD;
+ break;
+ }
+
+ /* length code -- get extra bits, if any */
+ extra = (unsigned)(here.op) & 31;
+ if (extra != 0) {
+ NEEDBITS(extra);
+ length += BITS(extra);
+ DROPBITS(extra);
+ }
+ Tracevv((stderr, "inflate: length %lu\n", length));
+
+ /* get distance code */
+ for (;;) {
+ here = distcode[BITS(distbits)];
+ if ((unsigned)(here.bits) <= bits) break;
+ PULLBYTE();
+ }
+ if ((here.op & 0xf0) == 0) {
+ last = here;
+ for (;;) {
+ here = distcode[last.val +
+ (BITS(last.bits + last.op) >> last.bits)];
+ if ((unsigned)(last.bits + here.bits) <= bits) break;
+ PULLBYTE();
+ }
+ DROPBITS(last.bits);
+ }
+ DROPBITS(here.bits);
+ if (here.op & 64) {
+ strm->msg = (char *)"invalid distance code";
+ mode = BAD;
+ break;
+ }
+ offset = (unsigned)here.val;
+
+ /* get distance extra bits, if any */
+ extra = (unsigned)(here.op) & 15;
+ if (extra != 0) {
+ NEEDBITS(extra);
+ offset += BITS(extra);
+ DROPBITS(extra);
+ }
+ if (offset > WSIZE - (wrap ? 0: left)) {
+ strm->msg = (char *)"invalid distance too far back";
+ mode = BAD;
+ break;
+ }
+ Tracevv((stderr, "inflate: distance %lu\n", offset));
+
+ /* copy match from window to output */
+ do {
+ ROOM();
+ copy = WSIZE - offset;
+ if (copy < left) {
+ from = put + copy;
+ copy = left - copy;
+ }
+ else {
+ from = put - offset;
+ copy = left;
+ }
+ if (copy > length) copy = length;
+ length -= copy;
+ left -= copy;
+ do {
+ *put++ = *from++;
+ } while (--copy);
+ } while (length != 0);
+ break;
+
+ case DONE:
+ /* inflate stream terminated properly -- write leftover output */
+ ret = Z_STREAM_END;
+ if (left < WSIZE) {
+ if (out(out_desc, window, (unsigned)(WSIZE - left)))
+ ret = Z_BUF_ERROR;
+ }
+ goto inf_leave;
+
+ case BAD:
+ ret = Z_DATA_ERROR;
+ goto inf_leave;
+
+ default: /* can't happen, but makes compilers happy */
+ ret = Z_STREAM_ERROR;
+ goto inf_leave;
+ }
+
+ /* Return unused input */
+ inf_leave:
+ strm->next_in = next;
+ strm->avail_in = have;
+ return ret;
+}
+
+int ZEXPORT inflateBack9End(strm)
+z_stream FAR *strm;
+{
+ if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
+ return Z_STREAM_ERROR;
+ ZFREE(strm, strm->state);
+ strm->state = Z_NULL;
+ Tracev((stderr, "inflate: end\n"));
+ return Z_OK;
+}
diff --git a/contrib/zlib/contrib/infback9/infback9.h b/contrib/zlib/contrib/infback9/infback9.h
new file mode 100644
index 000000000..1073c0a38
--- /dev/null
+++ b/contrib/zlib/contrib/infback9/infback9.h
@@ -0,0 +1,37 @@
+/* infback9.h -- header for using inflateBack9 functions
+ * Copyright (C) 2003 Mark Adler
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/*
+ * This header file and associated patches provide a decoder for PKWare's
+ * undocumented deflate64 compression method (method 9). Use with infback9.c,
+ * inftree9.h, inftree9.c, and inffix9.h. These patches are not supported.
+ * This should be compiled with zlib, since it uses zutil.h and zutil.o.
+ * This code has not yet been tested on 16-bit architectures. See the
+ * comments in zlib.h for inflateBack() usage. These functions are used
+ * identically, except that there is no windowBits parameter, and a 64K
+ * window must be provided. Also if int's are 16 bits, then a zero for
+ * the third parameter of the "out" function actually means 65536UL.
+ * zlib.h must be included before this header file.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ZEXTERN int ZEXPORT inflateBack9 OF((z_stream FAR *strm,
+ in_func in, void FAR *in_desc,
+ out_func out, void FAR *out_desc));
+ZEXTERN int ZEXPORT inflateBack9End OF((z_stream FAR *strm));
+ZEXTERN int ZEXPORT inflateBack9Init_ OF((z_stream FAR *strm,
+ unsigned char FAR *window,
+ const char *version,
+ int stream_size));
+#define inflateBack9Init(strm, window) \
+ inflateBack9Init_((strm), (window), \
+ ZLIB_VERSION, sizeof(z_stream))
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/contrib/zlib/contrib/infback9/inffix9.h b/contrib/zlib/contrib/infback9/inffix9.h
new file mode 100644
index 000000000..ee5671d2d
--- /dev/null
+++ b/contrib/zlib/contrib/infback9/inffix9.h
@@ -0,0 +1,107 @@
+ /* inffix9.h -- table for decoding deflate64 fixed codes
+ * Generated automatically by makefixed9().
+ */
+
+ /* WARNING: this file should *not* be used by applications.
+ It is part of the implementation of this library and is
+ subject to change. Applications should only use zlib.h.
+ */
+
+ static const code lenfix[512] = {
+ {96,7,0},{0,8,80},{0,8,16},{132,8,115},{130,7,31},{0,8,112},
+ {0,8,48},{0,9,192},{128,7,10},{0,8,96},{0,8,32},{0,9,160},
+ {0,8,0},{0,8,128},{0,8,64},{0,9,224},{128,7,6},{0,8,88},
+ {0,8,24},{0,9,144},{131,7,59},{0,8,120},{0,8,56},{0,9,208},
+ {129,7,17},{0,8,104},{0,8,40},{0,9,176},{0,8,8},{0,8,136},
+ {0,8,72},{0,9,240},{128,7,4},{0,8,84},{0,8,20},{133,8,227},
+ {131,7,43},{0,8,116},{0,8,52},{0,9,200},{129,7,13},{0,8,100},
+ {0,8,36},{0,9,168},{0,8,4},{0,8,132},{0,8,68},{0,9,232},
+ {128,7,8},{0,8,92},{0,8,28},{0,9,152},{132,7,83},{0,8,124},
+ {0,8,60},{0,9,216},{130,7,23},{0,8,108},{0,8,44},{0,9,184},
+ {0,8,12},{0,8,140},{0,8,76},{0,9,248},{128,7,3},{0,8,82},
+ {0,8,18},{133,8,163},{131,7,35},{0,8,114},{0,8,50},{0,9,196},
+ {129,7,11},{0,8,98},{0,8,34},{0,9,164},{0,8,2},{0,8,130},
+ {0,8,66},{0,9,228},{128,7,7},{0,8,90},{0,8,26},{0,9,148},
+ {132,7,67},{0,8,122},{0,8,58},{0,9,212},{130,7,19},{0,8,106},
+ {0,8,42},{0,9,180},{0,8,10},{0,8,138},{0,8,74},{0,9,244},
+ {128,7,5},{0,8,86},{0,8,22},{65,8,0},{131,7,51},{0,8,118},
+ {0,8,54},{0,9,204},{129,7,15},{0,8,102},{0,8,38},{0,9,172},
+ {0,8,6},{0,8,134},{0,8,70},{0,9,236},{128,7,9},{0,8,94},
+ {0,8,30},{0,9,156},{132,7,99},{0,8,126},{0,8,62},{0,9,220},
+ {130,7,27},{0,8,110},{0,8,46},{0,9,188},{0,8,14},{0,8,142},
+ {0,8,78},{0,9,252},{96,7,0},{0,8,81},{0,8,17},{133,8,131},
+ {130,7,31},{0,8,113},{0,8,49},{0,9,194},{128,7,10},{0,8,97},
+ {0,8,33},{0,9,162},{0,8,1},{0,8,129},{0,8,65},{0,9,226},
+ {128,7,6},{0,8,89},{0,8,25},{0,9,146},{131,7,59},{0,8,121},
+ {0,8,57},{0,9,210},{129,7,17},{0,8,105},{0,8,41},{0,9,178},
+ {0,8,9},{0,8,137},{0,8,73},{0,9,242},{128,7,4},{0,8,85},
+ {0,8,21},{144,8,3},{131,7,43},{0,8,117},{0,8,53},{0,9,202},
+ {129,7,13},{0,8,101},{0,8,37},{0,9,170},{0,8,5},{0,8,133},
+ {0,8,69},{0,9,234},{128,7,8},{0,8,93},{0,8,29},{0,9,154},
+ {132,7,83},{0,8,125},{0,8,61},{0,9,218},{130,7,23},{0,8,109},
+ {0,8,45},{0,9,186},{0,8,13},{0,8,141},{0,8,77},{0,9,250},
+ {128,7,3},{0,8,83},{0,8,19},{133,8,195},{131,7,35},{0,8,115},
+ {0,8,51},{0,9,198},{129,7,11},{0,8,99},{0,8,35},{0,9,166},
+ {0,8,3},{0,8,131},{0,8,67},{0,9,230},{128,7,7},{0,8,91},
+ {0,8,27},{0,9,150},{132,7,67},{0,8,123},{0,8,59},{0,9,214},
+ {130,7,19},{0,8,107},{0,8,43},{0,9,182},{0,8,11},{0,8,139},
+ {0,8,75},{0,9,246},{128,7,5},{0,8,87},{0,8,23},{77,8,0},
+ {131,7,51},{0,8,119},{0,8,55},{0,9,206},{129,7,15},{0,8,103},
+ {0,8,39},{0,9,174},{0,8,7},{0,8,135},{0,8,71},{0,9,238},
+ {128,7,9},{0,8,95},{0,8,31},{0,9,158},{132,7,99},{0,8,127},
+ {0,8,63},{0,9,222},{130,7,27},{0,8,111},{0,8,47},{0,9,190},
+ {0,8,15},{0,8,143},{0,8,79},{0,9,254},{96,7,0},{0,8,80},
+ {0,8,16},{132,8,115},{130,7,31},{0,8,112},{0,8,48},{0,9,193},
+ {128,7,10},{0,8,96},{0,8,32},{0,9,161},{0,8,0},{0,8,128},
+ {0,8,64},{0,9,225},{128,7,6},{0,8,88},{0,8,24},{0,9,145},
+ {131,7,59},{0,8,120},{0,8,56},{0,9,209},{129,7,17},{0,8,104},
+ {0,8,40},{0,9,177},{0,8,8},{0,8,136},{0,8,72},{0,9,241},
+ {128,7,4},{0,8,84},{0,8,20},{133,8,227},{131,7,43},{0,8,116},
+ {0,8,52},{0,9,201},{129,7,13},{0,8,100},{0,8,36},{0,9,169},
+ {0,8,4},{0,8,132},{0,8,68},{0,9,233},{128,7,8},{0,8,92},
+ {0,8,28},{0,9,153},{132,7,83},{0,8,124},{0,8,60},{0,9,217},
+ {130,7,23},{0,8,108},{0,8,44},{0,9,185},{0,8,12},{0,8,140},
+ {0,8,76},{0,9,249},{128,7,3},{0,8,82},{0,8,18},{133,8,163},
+ {131,7,35},{0,8,114},{0,8,50},{0,9,197},{129,7,11},{0,8,98},
+ {0,8,34},{0,9,165},{0,8,2},{0,8,130},{0,8,66},{0,9,229},
+ {128,7,7},{0,8,90},{0,8,26},{0,9,149},{132,7,67},{0,8,122},
+ {0,8,58},{0,9,213},{130,7,19},{0,8,106},{0,8,42},{0,9,181},
+ {0,8,10},{0,8,138},{0,8,74},{0,9,245},{128,7,5},{0,8,86},
+ {0,8,22},{65,8,0},{131,7,51},{0,8,118},{0,8,54},{0,9,205},
+ {129,7,15},{0,8,102},{0,8,38},{0,9,173},{0,8,6},{0,8,134},
+ {0,8,70},{0,9,237},{128,7,9},{0,8,94},{0,8,30},{0,9,157},
+ {132,7,99},{0,8,126},{0,8,62},{0,9,221},{130,7,27},{0,8,110},
+ {0,8,46},{0,9,189},{0,8,14},{0,8,142},{0,8,78},{0,9,253},
+ {96,7,0},{0,8,81},{0,8,17},{133,8,131},{130,7,31},{0,8,113},
+ {0,8,49},{0,9,195},{128,7,10},{0,8,97},{0,8,33},{0,9,163},
+ {0,8,1},{0,8,129},{0,8,65},{0,9,227},{128,7,6},{0,8,89},
+ {0,8,25},{0,9,147},{131,7,59},{0,8,121},{0,8,57},{0,9,211},
+ {129,7,17},{0,8,105},{0,8,41},{0,9,179},{0,8,9},{0,8,137},
+ {0,8,73},{0,9,243},{128,7,4},{0,8,85},{0,8,21},{144,8,3},
+ {131,7,43},{0,8,117},{0,8,53},{0,9,203},{129,7,13},{0,8,101},
+ {0,8,37},{0,9,171},{0,8,5},{0,8,133},{0,8,69},{0,9,235},
+ {128,7,8},{0,8,93},{0,8,29},{0,9,155},{132,7,83},{0,8,125},
+ {0,8,61},{0,9,219},{130,7,23},{0,8,109},{0,8,45},{0,9,187},
+ {0,8,13},{0,8,141},{0,8,77},{0,9,251},{128,7,3},{0,8,83},
+ {0,8,19},{133,8,195},{131,7,35},{0,8,115},{0,8,51},{0,9,199},
+ {129,7,11},{0,8,99},{0,8,35},{0,9,167},{0,8,3},{0,8,131},
+ {0,8,67},{0,9,231},{128,7,7},{0,8,91},{0,8,27},{0,9,151},
+ {132,7,67},{0,8,123},{0,8,59},{0,9,215},{130,7,19},{0,8,107},
+ {0,8,43},{0,9,183},{0,8,11},{0,8,139},{0,8,75},{0,9,247},
+ {128,7,5},{0,8,87},{0,8,23},{77,8,0},{131,7,51},{0,8,119},
+ {0,8,55},{0,9,207},{129,7,15},{0,8,103},{0,8,39},{0,9,175},
+ {0,8,7},{0,8,135},{0,8,71},{0,9,239},{128,7,9},{0,8,95},
+ {0,8,31},{0,9,159},{132,7,99},{0,8,127},{0,8,63},{0,9,223},
+ {130,7,27},{0,8,111},{0,8,47},{0,9,191},{0,8,15},{0,8,143},
+ {0,8,79},{0,9,255}
+ };
+
+ static const code distfix[32] = {
+ {128,5,1},{135,5,257},{131,5,17},{139,5,4097},{129,5,5},
+ {137,5,1025},{133,5,65},{141,5,16385},{128,5,3},{136,5,513},
+ {132,5,33},{140,5,8193},{130,5,9},{138,5,2049},{134,5,129},
+ {142,5,32769},{128,5,2},{135,5,385},{131,5,25},{139,5,6145},
+ {129,5,7},{137,5,1537},{133,5,97},{141,5,24577},{128,5,4},
+ {136,5,769},{132,5,49},{140,5,12289},{130,5,13},{138,5,3073},
+ {134,5,193},{142,5,49153}
+ };
diff --git a/contrib/zlib/contrib/infback9/inflate9.h b/contrib/zlib/contrib/infback9/inflate9.h
new file mode 100644
index 000000000..ee9a79394
--- /dev/null
+++ b/contrib/zlib/contrib/infback9/inflate9.h
@@ -0,0 +1,47 @@
+/* inflate9.h -- internal inflate state definition
+ * Copyright (C) 1995-2003 Mark Adler
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* WARNING: this file should *not* be used by applications. It is
+ part of the implementation of the compression library and is
+ subject to change. Applications should only use zlib.h.
+ */
+
+/* Possible inflate modes between inflate() calls */
+typedef enum {
+ TYPE, /* i: waiting for type bits, including last-flag bit */
+ STORED, /* i: waiting for stored size (length and complement) */
+ TABLE, /* i: waiting for dynamic block table lengths */
+ LEN, /* i: waiting for length/lit code */
+ DONE, /* finished check, done -- remain here until reset */
+ BAD /* got a data error -- remain here until reset */
+} inflate_mode;
+
+/*
+ State transitions between above modes -
+
+ (most modes can go to the BAD mode -- not shown for clarity)
+
+ Read deflate blocks:
+ TYPE -> STORED or TABLE or LEN or DONE
+ STORED -> TYPE
+ TABLE -> LENLENS -> CODELENS -> LEN
+ Read deflate codes:
+ LEN -> LEN or TYPE
+ */
+
+/* state maintained between inflate() calls. Approximately 7K bytes. */
+struct inflate_state {
+ /* sliding window */
+ unsigned char FAR *window; /* allocated sliding window, if needed */
+ /* dynamic table building */
+ unsigned ncode; /* number of code length code lengths */
+ unsigned nlen; /* number of length code lengths */
+ unsigned ndist; /* number of distance code lengths */
+ unsigned have; /* number of code lengths in lens[] */
+ code FAR *next; /* next available space in codes[] */
+ unsigned short lens[320]; /* temporary storage for code lengths */
+ unsigned short work[288]; /* work area for code table building */
+ code codes[ENOUGH]; /* space for code tables */
+};
diff --git a/contrib/zlib/contrib/infback9/inftree9.c b/contrib/zlib/contrib/infback9/inftree9.c
new file mode 100644
index 000000000..5f4a76798
--- /dev/null
+++ b/contrib/zlib/contrib/infback9/inftree9.c
@@ -0,0 +1,324 @@
+/* inftree9.c -- generate Huffman trees for efficient decoding
+ * Copyright (C) 1995-2017 Mark Adler
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+#include "zutil.h"
+#include "inftree9.h"
+
+#define MAXBITS 15
+
+const char inflate9_copyright[] =
+ " inflate9 1.2.11 Copyright 1995-2017 Mark Adler ";
+/*
+ If you use the zlib library in a product, an acknowledgment is welcome
+ in the documentation of your product. If for some reason you cannot
+ include such an acknowledgment, I would appreciate that you keep this
+ copyright string in the executable of your product.
+ */
+
+/*
+ Build a set of tables to decode the provided canonical Huffman code.
+ The code lengths are lens[0..codes-1]. The result starts at *table,
+ whose indices are 0..2^bits-1. work is a writable array of at least
+ lens shorts, which is used as a work area. type is the type of code
+ to be generated, CODES, LENS, or DISTS. On return, zero is success,
+ -1 is an invalid code, and +1 means that ENOUGH isn't enough. table
+ on return points to the next available entry's address. bits is the
+ requested root table index bits, and on return it is the actual root
+ table index bits. It will differ if the request is greater than the
+ longest code or if it is less than the shortest code.
+ */
+int inflate_table9(type, lens, codes, table, bits, work)
+codetype type;
+unsigned short FAR *lens;
+unsigned codes;
+code FAR * FAR *table;
+unsigned FAR *bits;
+unsigned short FAR *work;
+{
+ unsigned len; /* a code's length in bits */
+ unsigned sym; /* index of code symbols */
+ unsigned min, max; /* minimum and maximum code lengths */
+ unsigned root; /* number of index bits for root table */
+ unsigned curr; /* number of index bits for current table */
+ unsigned drop; /* code bits to drop for sub-table */
+ int left; /* number of prefix codes available */
+ unsigned used; /* code entries in table used */
+ unsigned huff; /* Huffman code */
+ unsigned incr; /* for incrementing code, index */
+ unsigned fill; /* index for replicating entries */
+ unsigned low; /* low bits for current root entry */
+ unsigned mask; /* mask for low root bits */
+ code this; /* table entry for duplication */
+ code FAR *next; /* next available space in table */
+ const unsigned short FAR *base; /* base value table to use */
+ const unsigned short FAR *extra; /* extra bits table to use */
+ int end; /* use base and extra for symbol > end */
+ unsigned short count[MAXBITS+1]; /* number of codes of each length */
+ unsigned short offs[MAXBITS+1]; /* offsets in table for each length */
+ static const unsigned short lbase[31] = { /* Length codes 257..285 base */
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17,
+ 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115,
+ 131, 163, 195, 227, 3, 0, 0};
+ static const unsigned short lext[31] = { /* Length codes 257..285 extra */
+ 128, 128, 128, 128, 128, 128, 128, 128, 129, 129, 129, 129,
+ 130, 130, 130, 130, 131, 131, 131, 131, 132, 132, 132, 132,
+ 133, 133, 133, 133, 144, 77, 202};
+ static const unsigned short dbase[32] = { /* Distance codes 0..31 base */
+ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49,
+ 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073,
+ 4097, 6145, 8193, 12289, 16385, 24577, 32769, 49153};
+ static const unsigned short dext[32] = { /* Distance codes 0..31 extra */
+ 128, 128, 128, 128, 129, 129, 130, 130, 131, 131, 132, 132,
+ 133, 133, 134, 134, 135, 135, 136, 136, 137, 137, 138, 138,
+ 139, 139, 140, 140, 141, 141, 142, 142};
+
+ /*
+ Process a set of code lengths to create a canonical Huffman code. The
+ code lengths are lens[0..codes-1]. Each length corresponds to the
+ symbols 0..codes-1. The Huffman code is generated by first sorting the
+ symbols by length from short to long, and retaining the symbol order
+ for codes with equal lengths. Then the code starts with all zero bits
+ for the first code of the shortest length, and the codes are integer
+ increments for the same length, and zeros are appended as the length
+ increases. For the deflate format, these bits are stored backwards
+ from their more natural integer increment ordering, and so when the
+ decoding tables are built in the large loop below, the integer codes
+ are incremented backwards.
+
+ This routine assumes, but does not check, that all of the entries in
+ lens[] are in the range 0..MAXBITS. The caller must assure this.
+ 1..MAXBITS is interpreted as that code length. zero means that that
+ symbol does not occur in this code.
+
+ The codes are sorted by computing a count of codes for each length,
+ creating from that a table of starting indices for each length in the
+ sorted table, and then entering the symbols in order in the sorted
+ table. The sorted table is work[], with that space being provided by
+ the caller.
+
+ The length counts are used for other purposes as well, i.e. finding
+ the minimum and maximum length codes, determining if there are any
+ codes at all, checking for a valid set of lengths, and looking ahead
+ at length counts to determine sub-table sizes when building the
+ decoding tables.
+ */
+
+ /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */
+ for (len = 0; len <= MAXBITS; len++)
+ count[len] = 0;
+ for (sym = 0; sym < codes; sym++)
+ count[lens[sym]]++;
+
+ /* bound code lengths, force root to be within code lengths */
+ root = *bits;
+ for (max = MAXBITS; max >= 1; max--)
+ if (count[max] != 0) break;
+ if (root > max) root = max;
+ if (max == 0) return -1; /* no codes! */
+ for (min = 1; min <= MAXBITS; min++)
+ if (count[min] != 0) break;
+ if (root < min) root = min;
+
+ /* check for an over-subscribed or incomplete set of lengths */
+ left = 1;
+ for (len = 1; len <= MAXBITS; len++) {
+ left <<= 1;
+ left -= count[len];
+ if (left < 0) return -1; /* over-subscribed */
+ }
+ if (left > 0 && (type == CODES || max != 1))
+ return -1; /* incomplete set */
+
+ /* generate offsets into symbol table for each length for sorting */
+ offs[1] = 0;
+ for (len = 1; len < MAXBITS; len++)
+ offs[len + 1] = offs[len] + count[len];
+
+ /* sort symbols by length, by symbol order within each length */
+ for (sym = 0; sym < codes; sym++)
+ if (lens[sym] != 0) work[offs[lens[sym]]++] = (unsigned short)sym;
+
+ /*
+ Create and fill in decoding tables. In this loop, the table being
+ filled is at next and has curr index bits. The code being used is huff
+ with length len. That code is converted to an index by dropping drop
+ bits off of the bottom. For codes where len is less than drop + curr,
+ those top drop + curr - len bits are incremented through all values to
+ fill the table with replicated entries.
+
+ root is the number of index bits for the root table. When len exceeds
+ root, sub-tables are created pointed to by the root entry with an index
+ of the low root bits of huff. This is saved in low to check for when a
+ new sub-table should be started. drop is zero when the root table is
+ being filled, and drop is root when sub-tables are being filled.
+
+ When a new sub-table is needed, it is necessary to look ahead in the
+ code lengths to determine what size sub-table is needed. The length
+ counts are used for this, and so count[] is decremented as codes are
+ entered in the tables.
+
+ used keeps track of how many table entries have been allocated from the
+ provided *table space. It is checked for LENS and DIST tables against
+ the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in
+ the initial root table size constants. See the comments in inftree9.h
+ for more information.
+
+ sym increments through all symbols, and the loop terminates when
+ all codes of length max, i.e. all codes, have been processed. This
+ routine permits incomplete codes, so another loop after this one fills
+ in the rest of the decoding tables with invalid code markers.
+ */
+
+ /* set up for code type */
+ switch (type) {
+ case CODES:
+ base = extra = work; /* dummy value--not used */
+ end = 19;
+ break;
+ case LENS:
+ base = lbase;
+ base -= 257;
+ extra = lext;
+ extra -= 257;
+ end = 256;
+ break;
+ default: /* DISTS */
+ base = dbase;
+ extra = dext;
+ end = -1;
+ }
+
+ /* initialize state for loop */
+ huff = 0; /* starting code */
+ sym = 0; /* starting code symbol */
+ len = min; /* starting code length */
+ next = *table; /* current table to fill in */
+ curr = root; /* current table index bits */
+ drop = 0; /* current bits to drop from code for index */
+ low = (unsigned)(-1); /* trigger new sub-table when len > root */
+ used = 1U << root; /* use root table entries */
+ mask = used - 1; /* mask for comparing low */
+
+ /* check available table space */
+ if ((type == LENS && used >= ENOUGH_LENS) ||
+ (type == DISTS && used >= ENOUGH_DISTS))
+ return 1;
+
+ /* process all codes and make table entries */
+ for (;;) {
+ /* create table entry */
+ this.bits = (unsigned char)(len - drop);
+ if ((int)(work[sym]) < end) {
+ this.op = (unsigned char)0;
+ this.val = work[sym];
+ }
+ else if ((int)(work[sym]) > end) {
+ this.op = (unsigned char)(extra[work[sym]]);
+ this.val = base[work[sym]];
+ }
+ else {
+ this.op = (unsigned char)(32 + 64); /* end of block */
+ this.val = 0;
+ }
+
+ /* replicate for those indices with low len bits equal to huff */
+ incr = 1U << (len - drop);
+ fill = 1U << curr;
+ do {
+ fill -= incr;
+ next[(huff >> drop) + fill] = this;
+ } while (fill != 0);
+
+ /* backwards increment the len-bit code huff */
+ incr = 1U << (len - 1);
+ while (huff & incr)
+ incr >>= 1;
+ if (incr != 0) {
+ huff &= incr - 1;
+ huff += incr;
+ }
+ else
+ huff = 0;
+
+ /* go to next symbol, update count, len */
+ sym++;
+ if (--(count[len]) == 0) {
+ if (len == max) break;
+ len = lens[work[sym]];
+ }
+
+ /* create new sub-table if needed */
+ if (len > root && (huff & mask) != low) {
+ /* if first time, transition to sub-tables */
+ if (drop == 0)
+ drop = root;
+
+ /* increment past last table */
+ next += 1U << curr;
+
+ /* determine length of next table */
+ curr = len - drop;
+ left = (int)(1 << curr);
+ while (curr + drop < max) {
+ left -= count[curr + drop];
+ if (left <= 0) break;
+ curr++;
+ left <<= 1;
+ }
+
+ /* check for enough space */
+ used += 1U << curr;
+ if ((type == LENS && used >= ENOUGH_LENS) ||
+ (type == DISTS && used >= ENOUGH_DISTS))
+ return 1;
+
+ /* point entry in root table to sub-table */
+ low = huff & mask;
+ (*table)[low].op = (unsigned char)curr;
+ (*table)[low].bits = (unsigned char)root;
+ (*table)[low].val = (unsigned short)(next - *table);
+ }
+ }
+
+ /*
+ Fill in rest of table for incomplete codes. This loop is similar to the
+ loop above in incrementing huff for table indices. It is assumed that
+ len is equal to curr + drop, so there is no loop needed to increment
+ through high index bits. When the current sub-table is filled, the loop
+ drops back to the root table to fill in any remaining entries there.
+ */
+ this.op = (unsigned char)64; /* invalid code marker */
+ this.bits = (unsigned char)(len - drop);
+ this.val = (unsigned short)0;
+ while (huff != 0) {
+ /* when done with sub-table, drop back to root table */
+ if (drop != 0 && (huff & mask) != low) {
+ drop = 0;
+ len = root;
+ next = *table;
+ curr = root;
+ this.bits = (unsigned char)len;
+ }
+
+ /* put invalid code marker in table */
+ next[huff >> drop] = this;
+
+ /* backwards increment the len-bit code huff */
+ incr = 1U << (len - 1);
+ while (huff & incr)
+ incr >>= 1;
+ if (incr != 0) {
+ huff &= incr - 1;
+ huff += incr;
+ }
+ else
+ huff = 0;
+ }
+
+ /* set return parameters */
+ *table += used;
+ *bits = root;
+ return 0;
+}
diff --git a/contrib/zlib/contrib/infback9/inftree9.h b/contrib/zlib/contrib/infback9/inftree9.h
new file mode 100644
index 000000000..5ab21f0c6
--- /dev/null
+++ b/contrib/zlib/contrib/infback9/inftree9.h
@@ -0,0 +1,61 @@
+/* inftree9.h -- header to use inftree9.c
+ * Copyright (C) 1995-2008 Mark Adler
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* WARNING: this file should *not* be used by applications. It is
+ part of the implementation of the compression library and is
+ subject to change. Applications should only use zlib.h.
+ */
+
+/* Structure for decoding tables. Each entry provides either the
+ information needed to do the operation requested by the code that
+ indexed that table entry, or it provides a pointer to another
+ table that indexes more bits of the code. op indicates whether
+ the entry is a pointer to another table, a literal, a length or
+ distance, an end-of-block, or an invalid code. For a table
+ pointer, the low four bits of op is the number of index bits of
+ that table. For a length or distance, the low four bits of op
+ is the number of extra bits to get after the code. bits is
+ the number of bits in this code or part of the code to drop off
+ of the bit buffer. val is the actual byte to output in the case
+ of a literal, the base length or distance, or the offset from
+ the current table to the next table. Each entry is four bytes. */
+typedef struct {
+ unsigned char op; /* operation, extra bits, table bits */
+ unsigned char bits; /* bits in this part of the code */
+ unsigned short val; /* offset in table or code value */
+} code;
+
+/* op values as set by inflate_table():
+ 00000000 - literal
+ 0000tttt - table link, tttt != 0 is the number of table index bits
+ 100eeeee - length or distance, eeee is the number of extra bits
+ 01100000 - end of block
+ 01000000 - invalid code
+ */
+
+/* Maximum size of the dynamic table. The maximum number of code structures is
+ 1446, which is the sum of 852 for literal/length codes and 594 for distance
+ codes. These values were found by exhaustive searches using the program
+ examples/enough.c found in the zlib distribtution. The arguments to that
+ program are the number of symbols, the initial root table size, and the
+ maximum bit length of a code. "enough 286 9 15" for literal/length codes
+ returns returns 852, and "enough 32 6 15" for distance codes returns 594.
+ The initial root table size (9 or 6) is found in the fifth argument of the
+ inflate_table() calls in infback9.c. If the root table size is changed,
+ then these maximum sizes would be need to be recalculated and updated. */
+#define ENOUGH_LENS 852
+#define ENOUGH_DISTS 594
+#define ENOUGH (ENOUGH_LENS+ENOUGH_DISTS)
+
+/* Type of code to build for inflate_table9() */
+typedef enum {
+ CODES,
+ LENS,
+ DISTS
+} codetype;
+
+extern int inflate_table9 OF((codetype type, unsigned short FAR *lens,
+ unsigned codes, code FAR * FAR *table,
+ unsigned FAR *bits, unsigned short FAR *work));
diff --git a/contrib/zlib/contrib/inflate86/inffas86.c b/contrib/zlib/contrib/inflate86/inffas86.c
new file mode 100644
index 000000000..7292f67b7
--- /dev/null
+++ b/contrib/zlib/contrib/inflate86/inffas86.c
@@ -0,0 +1,1157 @@
+/* inffas86.c is a hand tuned assembler version of
+ *
+ * inffast.c -- fast decoding
+ * Copyright (C) 1995-2003 Mark Adler
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ *
+ * Copyright (C) 2003 Chris Anderson <christop@charm.net>
+ * Please use the copyright conditions above.
+ *
+ * Dec-29-2003 -- I added AMD64 inflate asm support. This version is also
+ * slightly quicker on x86 systems because, instead of using rep movsb to copy
+ * data, it uses rep movsw, which moves data in 2-byte chunks instead of single
+ * bytes. I've tested the AMD64 code on a Fedora Core 1 + the x86_64 updates
+ * from http://fedora.linux.duke.edu/fc1_x86_64
+ * which is running on an Athlon 64 3000+ / Gigabyte GA-K8VT800M system with
+ * 1GB ram. The 64-bit version is about 4% faster than the 32-bit version,
+ * when decompressing mozilla-source-1.3.tar.gz.
+ *
+ * Mar-13-2003 -- Most of this is derived from inffast.S which is derived from
+ * the gcc -S output of zlib-1.2.0/inffast.c. Zlib-1.2.0 is in beta release at
+ * the moment. I have successfully compiled and tested this code with gcc2.96,
+ * gcc3.2, icc5.0, msvc6.0. It is very close to the speed of inffast.S
+ * compiled with gcc -DNO_MMX, but inffast.S is still faster on the P3 with MMX
+ * enabled. I will attempt to merge the MMX code into this version. Newer
+ * versions of this and inffast.S can be found at
+ * http://www.eetbeetee.com/zlib/ and http://www.charm.net/~christop/zlib/
+ */
+
+#include "zutil.h"
+#include "inftrees.h"
+#include "inflate.h"
+#include "inffast.h"
+
+/* Mark Adler's comments from inffast.c: */
+
+/*
+ Decode literal, length, and distance codes and write out the resulting
+ literal and match bytes until either not enough input or output is
+ available, an end-of-block is encountered, or a data error is encountered.
+ When large enough input and output buffers are supplied to inflate(), for
+ example, a 16K input buffer and a 64K output buffer, more than 95% of the
+ inflate execution time is spent in this routine.
+
+ Entry assumptions:
+
+ state->mode == LEN
+ strm->avail_in >= 6
+ strm->avail_out >= 258
+ start >= strm->avail_out
+ state->bits < 8
+
+ On return, state->mode is one of:
+
+ LEN -- ran out of enough output space or enough available input
+ TYPE -- reached end of block code, inflate() to interpret next block
+ BAD -- error in block data
+
+ Notes:
+
+ - The maximum input bits used by a length/distance pair is 15 bits for the
+ length code, 5 bits for the length extra, 15 bits for the distance code,
+ and 13 bits for the distance extra. This totals 48 bits, or six bytes.
+ Therefore if strm->avail_in >= 6, then there is enough input to avoid
+ checking for available input while decoding.
+
+ - The maximum bytes that a single length/distance pair can output is 258
+ bytes, which is the maximum length that can be coded. inflate_fast()
+ requires strm->avail_out >= 258 for each loop to avoid checking for
+ output space.
+ */
+void inflate_fast(strm, start)
+z_streamp strm;
+unsigned start; /* inflate()'s starting value for strm->avail_out */
+{
+ struct inflate_state FAR *state;
+ struct inffast_ar {
+/* 64 32 x86 x86_64 */
+/* ar offset register */
+/* 0 0 */ void *esp; /* esp save */
+/* 8 4 */ void *ebp; /* ebp save */
+/* 16 8 */ unsigned char FAR *in; /* esi rsi local strm->next_in */
+/* 24 12 */ unsigned char FAR *last; /* r9 while in < last */
+/* 32 16 */ unsigned char FAR *out; /* edi rdi local strm->next_out */
+/* 40 20 */ unsigned char FAR *beg; /* inflate()'s init next_out */
+/* 48 24 */ unsigned char FAR *end; /* r10 while out < end */
+/* 56 28 */ unsigned char FAR *window;/* size of window, wsize!=0 */
+/* 64 32 */ code const FAR *lcode; /* ebp rbp local strm->lencode */
+/* 72 36 */ code const FAR *dcode; /* r11 local strm->distcode */
+/* 80 40 */ unsigned long hold; /* edx rdx local strm->hold */
+/* 88 44 */ unsigned bits; /* ebx rbx local strm->bits */
+/* 92 48 */ unsigned wsize; /* window size */
+/* 96 52 */ unsigned write; /* window write index */
+/*100 56 */ unsigned lmask; /* r12 mask for lcode */
+/*104 60 */ unsigned dmask; /* r13 mask for dcode */
+/*108 64 */ unsigned len; /* r14 match length */
+/*112 68 */ unsigned dist; /* r15 match distance */
+/*116 72 */ unsigned status; /* set when state chng*/
+ } ar;
+
+#if defined( __GNUC__ ) && defined( __amd64__ ) && ! defined( __i386 )
+#define PAD_AVAIL_IN 6
+#define PAD_AVAIL_OUT 258
+#else
+#define PAD_AVAIL_IN 5
+#define PAD_AVAIL_OUT 257
+#endif
+
+ /* copy state to local variables */
+ state = (struct inflate_state FAR *)strm->state;
+ ar.in = strm->next_in;
+ ar.last = ar.in + (strm->avail_in - PAD_AVAIL_IN);
+ ar.out = strm->next_out;
+ ar.beg = ar.out - (start - strm->avail_out);
+ ar.end = ar.out + (strm->avail_out - PAD_AVAIL_OUT);
+ ar.wsize = state->wsize;
+ ar.write = state->wnext;
+ ar.window = state->window;
+ ar.hold = state->hold;
+ ar.bits = state->bits;
+ ar.lcode = state->lencode;
+ ar.dcode = state->distcode;
+ ar.lmask = (1U << state->lenbits) - 1;
+ ar.dmask = (1U << state->distbits) - 1;
+
+ /* decode literals and length/distances until end-of-block or not enough
+ input data or output space */
+
+ /* align in on 1/2 hold size boundary */
+ while (((unsigned long)(void *)ar.in & (sizeof(ar.hold) / 2 - 1)) != 0) {
+ ar.hold += (unsigned long)*ar.in++ << ar.bits;
+ ar.bits += 8;
+ }
+
+#if defined( __GNUC__ ) && defined( __amd64__ ) && ! defined( __i386 )
+ __asm__ __volatile__ (
+" leaq %0, %%rax\n"
+" movq %%rbp, 8(%%rax)\n" /* save regs rbp and rsp */
+" movq %%rsp, (%%rax)\n"
+" movq %%rax, %%rsp\n" /* make rsp point to &ar */
+" movq 16(%%rsp), %%rsi\n" /* rsi = in */
+" movq 32(%%rsp), %%rdi\n" /* rdi = out */
+" movq 24(%%rsp), %%r9\n" /* r9 = last */
+" movq 48(%%rsp), %%r10\n" /* r10 = end */
+" movq 64(%%rsp), %%rbp\n" /* rbp = lcode */
+" movq 72(%%rsp), %%r11\n" /* r11 = dcode */
+" movq 80(%%rsp), %%rdx\n" /* rdx = hold */
+" movl 88(%%rsp), %%ebx\n" /* ebx = bits */
+" movl 100(%%rsp), %%r12d\n" /* r12d = lmask */
+" movl 104(%%rsp), %%r13d\n" /* r13d = dmask */
+ /* r14d = len */
+ /* r15d = dist */
+" cld\n"
+" cmpq %%rdi, %%r10\n"
+" je .L_one_time\n" /* if only one decode left */
+" cmpq %%rsi, %%r9\n"
+" je .L_one_time\n"
+" jmp .L_do_loop\n"
+
+".L_one_time:\n"
+" movq %%r12, %%r8\n" /* r8 = lmask */
+" cmpb $32, %%bl\n"
+" ja .L_get_length_code_one_time\n"
+
+" lodsl\n" /* eax = *(uint *)in++ */
+" movb %%bl, %%cl\n" /* cl = bits, needs it for shifting */
+" addb $32, %%bl\n" /* bits += 32 */
+" shlq %%cl, %%rax\n"
+" orq %%rax, %%rdx\n" /* hold |= *((uint *)in)++ << bits */
+" jmp .L_get_length_code_one_time\n"
+
+".align 32,0x90\n"
+".L_while_test:\n"
+" cmpq %%rdi, %%r10\n"
+" jbe .L_break_loop\n"
+" cmpq %%rsi, %%r9\n"
+" jbe .L_break_loop\n"
+
+".L_do_loop:\n"
+" movq %%r12, %%r8\n" /* r8 = lmask */
+" cmpb $32, %%bl\n"
+" ja .L_get_length_code\n" /* if (32 < bits) */
+
+" lodsl\n" /* eax = *(uint *)in++ */
+" movb %%bl, %%cl\n" /* cl = bits, needs it for shifting */
+" addb $32, %%bl\n" /* bits += 32 */
+" shlq %%cl, %%rax\n"
+" orq %%rax, %%rdx\n" /* hold |= *((uint *)in)++ << bits */
+
+".L_get_length_code:\n"
+" andq %%rdx, %%r8\n" /* r8 &= hold */
+" movl (%%rbp,%%r8,4), %%eax\n" /* eax = lcode[hold & lmask] */
+
+" movb %%ah, %%cl\n" /* cl = this.bits */
+" subb %%ah, %%bl\n" /* bits -= this.bits */
+" shrq %%cl, %%rdx\n" /* hold >>= this.bits */
+
+" testb %%al, %%al\n"
+" jnz .L_test_for_length_base\n" /* if (op != 0) 45.7% */
+
+" movq %%r12, %%r8\n" /* r8 = lmask */
+" shrl $16, %%eax\n" /* output this.val char */
+" stosb\n"
+
+".L_get_length_code_one_time:\n"
+" andq %%rdx, %%r8\n" /* r8 &= hold */
+" movl (%%rbp,%%r8,4), %%eax\n" /* eax = lcode[hold & lmask] */
+
+".L_dolen:\n"
+" movb %%ah, %%cl\n" /* cl = this.bits */
+" subb %%ah, %%bl\n" /* bits -= this.bits */
+" shrq %%cl, %%rdx\n" /* hold >>= this.bits */
+
+" testb %%al, %%al\n"
+" jnz .L_test_for_length_base\n" /* if (op != 0) 45.7% */
+
+" shrl $16, %%eax\n" /* output this.val char */
+" stosb\n"
+" jmp .L_while_test\n"
+
+".align 32,0x90\n"
+".L_test_for_length_base:\n"
+" movl %%eax, %%r14d\n" /* len = this */
+" shrl $16, %%r14d\n" /* len = this.val */
+" movb %%al, %%cl\n"
+
+" testb $16, %%al\n"
+" jz .L_test_for_second_level_length\n" /* if ((op & 16) == 0) 8% */
+" andb $15, %%cl\n" /* op &= 15 */
+" jz .L_decode_distance\n" /* if (!op) */
+
+".L_add_bits_to_len:\n"
+" subb %%cl, %%bl\n"
+" xorl %%eax, %%eax\n"
+" incl %%eax\n"
+" shll %%cl, %%eax\n"
+" decl %%eax\n"
+" andl %%edx, %%eax\n" /* eax &= hold */
+" shrq %%cl, %%rdx\n"
+" addl %%eax, %%r14d\n" /* len += hold & mask[op] */
+
+".L_decode_distance:\n"
+" movq %%r13, %%r8\n" /* r8 = dmask */
+" cmpb $32, %%bl\n"
+" ja .L_get_distance_code\n" /* if (32 < bits) */
+
+" lodsl\n" /* eax = *(uint *)in++ */
+" movb %%bl, %%cl\n" /* cl = bits, needs it for shifting */
+" addb $32, %%bl\n" /* bits += 32 */
+" shlq %%cl, %%rax\n"
+" orq %%rax, %%rdx\n" /* hold |= *((uint *)in)++ << bits */
+
+".L_get_distance_code:\n"
+" andq %%rdx, %%r8\n" /* r8 &= hold */
+" movl (%%r11,%%r8,4), %%eax\n" /* eax = dcode[hold & dmask] */
+
+".L_dodist:\n"
+" movl %%eax, %%r15d\n" /* dist = this */
+" shrl $16, %%r15d\n" /* dist = this.val */
+" movb %%ah, %%cl\n"
+" subb %%ah, %%bl\n" /* bits -= this.bits */
+" shrq %%cl, %%rdx\n" /* hold >>= this.bits */
+" movb %%al, %%cl\n" /* cl = this.op */
+
+" testb $16, %%al\n" /* if ((op & 16) == 0) */
+" jz .L_test_for_second_level_dist\n"
+" andb $15, %%cl\n" /* op &= 15 */
+" jz .L_check_dist_one\n"
+
+".L_add_bits_to_dist:\n"
+" subb %%cl, %%bl\n"
+" xorl %%eax, %%eax\n"
+" incl %%eax\n"
+" shll %%cl, %%eax\n"
+" decl %%eax\n" /* (1 << op) - 1 */
+" andl %%edx, %%eax\n" /* eax &= hold */
+" shrq %%cl, %%rdx\n"
+" addl %%eax, %%r15d\n" /* dist += hold & ((1 << op) - 1) */
+
+".L_check_window:\n"
+" movq %%rsi, %%r8\n" /* save in so from can use it's reg */
+" movq %%rdi, %%rax\n"
+" subq 40(%%rsp), %%rax\n" /* nbytes = out - beg */
+
+" cmpl %%r15d, %%eax\n"
+" jb .L_clip_window\n" /* if (dist > nbytes) 4.2% */
+
+" movl %%r14d, %%ecx\n" /* ecx = len */
+" movq %%rdi, %%rsi\n"
+" subq %%r15, %%rsi\n" /* from = out - dist */
+
+" sarl %%ecx\n"
+" jnc .L_copy_two\n" /* if len % 2 == 0 */
+
+" rep movsw\n"
+" movb (%%rsi), %%al\n"
+" movb %%al, (%%rdi)\n"
+" incq %%rdi\n"
+
+" movq %%r8, %%rsi\n" /* move in back to %rsi, toss from */
+" jmp .L_while_test\n"
+
+".L_copy_two:\n"
+" rep movsw\n"
+" movq %%r8, %%rsi\n" /* move in back to %rsi, toss from */
+" jmp .L_while_test\n"
+
+".align 32,0x90\n"
+".L_check_dist_one:\n"
+" cmpl $1, %%r15d\n" /* if dist 1, is a memset */
+" jne .L_check_window\n"
+" cmpq %%rdi, 40(%%rsp)\n" /* if out == beg, outside window */
+" je .L_check_window\n"
+
+" movl %%r14d, %%ecx\n" /* ecx = len */
+" movb -1(%%rdi), %%al\n"
+" movb %%al, %%ah\n"
+
+" sarl %%ecx\n"
+" jnc .L_set_two\n"
+" movb %%al, (%%rdi)\n"
+" incq %%rdi\n"
+
+".L_set_two:\n"
+" rep stosw\n"
+" jmp .L_while_test\n"
+
+".align 32,0x90\n"
+".L_test_for_second_level_length:\n"
+" testb $64, %%al\n"
+" jnz .L_test_for_end_of_block\n" /* if ((op & 64) != 0) */
+
+" xorl %%eax, %%eax\n"
+" incl %%eax\n"
+" shll %%cl, %%eax\n"
+" decl %%eax\n"
+" andl %%edx, %%eax\n" /* eax &= hold */
+" addl %%r14d, %%eax\n" /* eax += len */
+" movl (%%rbp,%%rax,4), %%eax\n" /* eax = lcode[val+(hold&mask[op])]*/
+" jmp .L_dolen\n"
+
+".align 32,0x90\n"
+".L_test_for_second_level_dist:\n"
+" testb $64, %%al\n"
+" jnz .L_invalid_distance_code\n" /* if ((op & 64) != 0) */
+
+" xorl %%eax, %%eax\n"
+" incl %%eax\n"
+" shll %%cl, %%eax\n"
+" decl %%eax\n"
+" andl %%edx, %%eax\n" /* eax &= hold */
+" addl %%r15d, %%eax\n" /* eax += dist */
+" movl (%%r11,%%rax,4), %%eax\n" /* eax = dcode[val+(hold&mask[op])]*/
+" jmp .L_dodist\n"
+
+".align 32,0x90\n"
+".L_clip_window:\n"
+" movl %%eax, %%ecx\n" /* ecx = nbytes */
+" movl 92(%%rsp), %%eax\n" /* eax = wsize, prepare for dist cmp */
+" negl %%ecx\n" /* nbytes = -nbytes */
+
+" cmpl %%r15d, %%eax\n"
+" jb .L_invalid_distance_too_far\n" /* if (dist > wsize) */
+
+" addl %%r15d, %%ecx\n" /* nbytes = dist - nbytes */
+" cmpl $0, 96(%%rsp)\n"
+" jne .L_wrap_around_window\n" /* if (write != 0) */
+
+" movq 56(%%rsp), %%rsi\n" /* from = window */
+" subl %%ecx, %%eax\n" /* eax -= nbytes */
+" addq %%rax, %%rsi\n" /* from += wsize - nbytes */
+
+" movl %%r14d, %%eax\n" /* eax = len */
+" cmpl %%ecx, %%r14d\n"
+" jbe .L_do_copy\n" /* if (nbytes >= len) */
+
+" subl %%ecx, %%eax\n" /* eax -= nbytes */
+" rep movsb\n"
+" movq %%rdi, %%rsi\n"
+" subq %%r15, %%rsi\n" /* from = &out[ -dist ] */
+" jmp .L_do_copy\n"
+
+".align 32,0x90\n"
+".L_wrap_around_window:\n"
+" movl 96(%%rsp), %%eax\n" /* eax = write */
+" cmpl %%eax, %%ecx\n"
+" jbe .L_contiguous_in_window\n" /* if (write >= nbytes) */
+
+" movl 92(%%rsp), %%esi\n" /* from = wsize */
+" addq 56(%%rsp), %%rsi\n" /* from += window */
+" addq %%rax, %%rsi\n" /* from += write */
+" subq %%rcx, %%rsi\n" /* from -= nbytes */
+" subl %%eax, %%ecx\n" /* nbytes -= write */
+
+" movl %%r14d, %%eax\n" /* eax = len */
+" cmpl %%ecx, %%eax\n"
+" jbe .L_do_copy\n" /* if (nbytes >= len) */
+
+" subl %%ecx, %%eax\n" /* len -= nbytes */
+" rep movsb\n"
+" movq 56(%%rsp), %%rsi\n" /* from = window */
+" movl 96(%%rsp), %%ecx\n" /* nbytes = write */
+" cmpl %%ecx, %%eax\n"
+" jbe .L_do_copy\n" /* if (nbytes >= len) */
+
+" subl %%ecx, %%eax\n" /* len -= nbytes */
+" rep movsb\n"
+" movq %%rdi, %%rsi\n"
+" subq %%r15, %%rsi\n" /* from = out - dist */
+" jmp .L_do_copy\n"
+
+".align 32,0x90\n"
+".L_contiguous_in_window:\n"
+" movq 56(%%rsp), %%rsi\n" /* rsi = window */
+" addq %%rax, %%rsi\n"
+" subq %%rcx, %%rsi\n" /* from += write - nbytes */
+
+" movl %%r14d, %%eax\n" /* eax = len */
+" cmpl %%ecx, %%eax\n"
+" jbe .L_do_copy\n" /* if (nbytes >= len) */
+
+" subl %%ecx, %%eax\n" /* len -= nbytes */
+" rep movsb\n"
+" movq %%rdi, %%rsi\n"
+" subq %%r15, %%rsi\n" /* from = out - dist */
+" jmp .L_do_copy\n" /* if (nbytes >= len) */
+
+".align 32,0x90\n"
+".L_do_copy:\n"
+" movl %%eax, %%ecx\n" /* ecx = len */
+" rep movsb\n"
+
+" movq %%r8, %%rsi\n" /* move in back to %esi, toss from */
+" jmp .L_while_test\n"
+
+".L_test_for_end_of_block:\n"
+" testb $32, %%al\n"
+" jz .L_invalid_literal_length_code\n"
+" movl $1, 116(%%rsp)\n"
+" jmp .L_break_loop_with_status\n"
+
+".L_invalid_literal_length_code:\n"
+" movl $2, 116(%%rsp)\n"
+" jmp .L_break_loop_with_status\n"
+
+".L_invalid_distance_code:\n"
+" movl $3, 116(%%rsp)\n"
+" jmp .L_break_loop_with_status\n"
+
+".L_invalid_distance_too_far:\n"
+" movl $4, 116(%%rsp)\n"
+" jmp .L_break_loop_with_status\n"
+
+".L_break_loop:\n"
+" movl $0, 116(%%rsp)\n"
+
+".L_break_loop_with_status:\n"
+/* put in, out, bits, and hold back into ar and pop esp */
+" movq %%rsi, 16(%%rsp)\n" /* in */
+" movq %%rdi, 32(%%rsp)\n" /* out */
+" movl %%ebx, 88(%%rsp)\n" /* bits */
+" movq %%rdx, 80(%%rsp)\n" /* hold */
+" movq (%%rsp), %%rax\n" /* restore rbp and rsp */
+" movq 8(%%rsp), %%rbp\n"
+" movq %%rax, %%rsp\n"
+ :
+ : "m" (ar)
+ : "memory", "%rax", "%rbx", "%rcx", "%rdx", "%rsi", "%rdi",
+ "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15"
+ );
+#elif ( defined( __GNUC__ ) || defined( __ICC ) ) && defined( __i386 )
+ __asm__ __volatile__ (
+" leal %0, %%eax\n"
+" movl %%esp, (%%eax)\n" /* save esp, ebp */
+" movl %%ebp, 4(%%eax)\n"
+" movl %%eax, %%esp\n"
+" movl 8(%%esp), %%esi\n" /* esi = in */
+" movl 16(%%esp), %%edi\n" /* edi = out */
+" movl 40(%%esp), %%edx\n" /* edx = hold */
+" movl 44(%%esp), %%ebx\n" /* ebx = bits */
+" movl 32(%%esp), %%ebp\n" /* ebp = lcode */
+
+" cld\n"
+" jmp .L_do_loop\n"
+
+".align 32,0x90\n"
+".L_while_test:\n"
+" cmpl %%edi, 24(%%esp)\n" /* out < end */
+" jbe .L_break_loop\n"
+" cmpl %%esi, 12(%%esp)\n" /* in < last */
+" jbe .L_break_loop\n"
+
+".L_do_loop:\n"
+" cmpb $15, %%bl\n"
+" ja .L_get_length_code\n" /* if (15 < bits) */
+
+" xorl %%eax, %%eax\n"
+" lodsw\n" /* al = *(ushort *)in++ */
+" movb %%bl, %%cl\n" /* cl = bits, needs it for shifting */
+" addb $16, %%bl\n" /* bits += 16 */
+" shll %%cl, %%eax\n"
+" orl %%eax, %%edx\n" /* hold |= *((ushort *)in)++ << bits */
+
+".L_get_length_code:\n"
+" movl 56(%%esp), %%eax\n" /* eax = lmask */
+" andl %%edx, %%eax\n" /* eax &= hold */
+" movl (%%ebp,%%eax,4), %%eax\n" /* eax = lcode[hold & lmask] */
+
+".L_dolen:\n"
+" movb %%ah, %%cl\n" /* cl = this.bits */
+" subb %%ah, %%bl\n" /* bits -= this.bits */
+" shrl %%cl, %%edx\n" /* hold >>= this.bits */
+
+" testb %%al, %%al\n"
+" jnz .L_test_for_length_base\n" /* if (op != 0) 45.7% */
+
+" shrl $16, %%eax\n" /* output this.val char */
+" stosb\n"
+" jmp .L_while_test\n"
+
+".align 32,0x90\n"
+".L_test_for_length_base:\n"
+" movl %%eax, %%ecx\n" /* len = this */
+" shrl $16, %%ecx\n" /* len = this.val */
+" movl %%ecx, 64(%%esp)\n" /* save len */
+" movb %%al, %%cl\n"
+
+" testb $16, %%al\n"
+" jz .L_test_for_second_level_length\n" /* if ((op & 16) == 0) 8% */
+" andb $15, %%cl\n" /* op &= 15 */
+" jz .L_decode_distance\n" /* if (!op) */
+" cmpb %%cl, %%bl\n"
+" jae .L_add_bits_to_len\n" /* if (op <= bits) */
+
+" movb %%cl, %%ch\n" /* stash op in ch, freeing cl */
+" xorl %%eax, %%eax\n"
+" lodsw\n" /* al = *(ushort *)in++ */
+" movb %%bl, %%cl\n" /* cl = bits, needs it for shifting */
+" addb $16, %%bl\n" /* bits += 16 */
+" shll %%cl, %%eax\n"
+" orl %%eax, %%edx\n" /* hold |= *((ushort *)in)++ << bits */
+" movb %%ch, %%cl\n" /* move op back to ecx */
+
+".L_add_bits_to_len:\n"
+" subb %%cl, %%bl\n"
+" xorl %%eax, %%eax\n"
+" incl %%eax\n"
+" shll %%cl, %%eax\n"
+" decl %%eax\n"
+" andl %%edx, %%eax\n" /* eax &= hold */
+" shrl %%cl, %%edx\n"
+" addl %%eax, 64(%%esp)\n" /* len += hold & mask[op] */
+
+".L_decode_distance:\n"
+" cmpb $15, %%bl\n"
+" ja .L_get_distance_code\n" /* if (15 < bits) */
+
+" xorl %%eax, %%eax\n"
+" lodsw\n" /* al = *(ushort *)in++ */
+" movb %%bl, %%cl\n" /* cl = bits, needs it for shifting */
+" addb $16, %%bl\n" /* bits += 16 */
+" shll %%cl, %%eax\n"
+" orl %%eax, %%edx\n" /* hold |= *((ushort *)in)++ << bits */
+
+".L_get_distance_code:\n"
+" movl 60(%%esp), %%eax\n" /* eax = dmask */
+" movl 36(%%esp), %%ecx\n" /* ecx = dcode */
+" andl %%edx, %%eax\n" /* eax &= hold */
+" movl (%%ecx,%%eax,4), %%eax\n"/* eax = dcode[hold & dmask] */
+
+".L_dodist:\n"
+" movl %%eax, %%ebp\n" /* dist = this */
+" shrl $16, %%ebp\n" /* dist = this.val */
+" movb %%ah, %%cl\n"
+" subb %%ah, %%bl\n" /* bits -= this.bits */
+" shrl %%cl, %%edx\n" /* hold >>= this.bits */
+" movb %%al, %%cl\n" /* cl = this.op */
+
+" testb $16, %%al\n" /* if ((op & 16) == 0) */
+" jz .L_test_for_second_level_dist\n"
+" andb $15, %%cl\n" /* op &= 15 */
+" jz .L_check_dist_one\n"
+" cmpb %%cl, %%bl\n"
+" jae .L_add_bits_to_dist\n" /* if (op <= bits) 97.6% */
+
+" movb %%cl, %%ch\n" /* stash op in ch, freeing cl */
+" xorl %%eax, %%eax\n"
+" lodsw\n" /* al = *(ushort *)in++ */
+" movb %%bl, %%cl\n" /* cl = bits, needs it for shifting */
+" addb $16, %%bl\n" /* bits += 16 */
+" shll %%cl, %%eax\n"
+" orl %%eax, %%edx\n" /* hold |= *((ushort *)in)++ << bits */
+" movb %%ch, %%cl\n" /* move op back to ecx */
+
+".L_add_bits_to_dist:\n"
+" subb %%cl, %%bl\n"
+" xorl %%eax, %%eax\n"
+" incl %%eax\n"
+" shll %%cl, %%eax\n"
+" decl %%eax\n" /* (1 << op) - 1 */
+" andl %%edx, %%eax\n" /* eax &= hold */
+" shrl %%cl, %%edx\n"
+" addl %%eax, %%ebp\n" /* dist += hold & ((1 << op) - 1) */
+
+".L_check_window:\n"
+" movl %%esi, 8(%%esp)\n" /* save in so from can use it's reg */
+" movl %%edi, %%eax\n"
+" subl 20(%%esp), %%eax\n" /* nbytes = out - beg */
+
+" cmpl %%ebp, %%eax\n"
+" jb .L_clip_window\n" /* if (dist > nbytes) 4.2% */
+
+" movl 64(%%esp), %%ecx\n" /* ecx = len */
+" movl %%edi, %%esi\n"
+" subl %%ebp, %%esi\n" /* from = out - dist */
+
+" sarl %%ecx\n"
+" jnc .L_copy_two\n" /* if len % 2 == 0 */
+
+" rep movsw\n"
+" movb (%%esi), %%al\n"
+" movb %%al, (%%edi)\n"
+" incl %%edi\n"
+
+" movl 8(%%esp), %%esi\n" /* move in back to %esi, toss from */
+" movl 32(%%esp), %%ebp\n" /* ebp = lcode */
+" jmp .L_while_test\n"
+
+".L_copy_two:\n"
+" rep movsw\n"
+" movl 8(%%esp), %%esi\n" /* move in back to %esi, toss from */
+" movl 32(%%esp), %%ebp\n" /* ebp = lcode */
+" jmp .L_while_test\n"
+
+".align 32,0x90\n"
+".L_check_dist_one:\n"
+" cmpl $1, %%ebp\n" /* if dist 1, is a memset */
+" jne .L_check_window\n"
+" cmpl %%edi, 20(%%esp)\n"
+" je .L_check_window\n" /* out == beg, if outside window */
+
+" movl 64(%%esp), %%ecx\n" /* ecx = len */
+" movb -1(%%edi), %%al\n"
+" movb %%al, %%ah\n"
+
+" sarl %%ecx\n"
+" jnc .L_set_two\n"
+" movb %%al, (%%edi)\n"
+" incl %%edi\n"
+
+".L_set_two:\n"
+" rep stosw\n"
+" movl 32(%%esp), %%ebp\n" /* ebp = lcode */
+" jmp .L_while_test\n"
+
+".align 32,0x90\n"
+".L_test_for_second_level_length:\n"
+" testb $64, %%al\n"
+" jnz .L_test_for_end_of_block\n" /* if ((op & 64) != 0) */
+
+" xorl %%eax, %%eax\n"
+" incl %%eax\n"
+" shll %%cl, %%eax\n"
+" decl %%eax\n"
+" andl %%edx, %%eax\n" /* eax &= hold */
+" addl 64(%%esp), %%eax\n" /* eax += len */
+" movl (%%ebp,%%eax,4), %%eax\n" /* eax = lcode[val+(hold&mask[op])]*/
+" jmp .L_dolen\n"
+
+".align 32,0x90\n"
+".L_test_for_second_level_dist:\n"
+" testb $64, %%al\n"
+" jnz .L_invalid_distance_code\n" /* if ((op & 64) != 0) */
+
+" xorl %%eax, %%eax\n"
+" incl %%eax\n"
+" shll %%cl, %%eax\n"
+" decl %%eax\n"
+" andl %%edx, %%eax\n" /* eax &= hold */
+" addl %%ebp, %%eax\n" /* eax += dist */
+" movl 36(%%esp), %%ecx\n" /* ecx = dcode */
+" movl (%%ecx,%%eax,4), %%eax\n" /* eax = dcode[val+(hold&mask[op])]*/
+" jmp .L_dodist\n"
+
+".align 32,0x90\n"
+".L_clip_window:\n"
+" movl %%eax, %%ecx\n"
+" movl 48(%%esp), %%eax\n" /* eax = wsize */
+" negl %%ecx\n" /* nbytes = -nbytes */
+" movl 28(%%esp), %%esi\n" /* from = window */
+
+" cmpl %%ebp, %%eax\n"
+" jb .L_invalid_distance_too_far\n" /* if (dist > wsize) */
+
+" addl %%ebp, %%ecx\n" /* nbytes = dist - nbytes */
+" cmpl $0, 52(%%esp)\n"
+" jne .L_wrap_around_window\n" /* if (write != 0) */
+
+" subl %%ecx, %%eax\n"
+" addl %%eax, %%esi\n" /* from += wsize - nbytes */
+
+" movl 64(%%esp), %%eax\n" /* eax = len */
+" cmpl %%ecx, %%eax\n"
+" jbe .L_do_copy\n" /* if (nbytes >= len) */
+
+" subl %%ecx, %%eax\n" /* len -= nbytes */
+" rep movsb\n"
+" movl %%edi, %%esi\n"
+" subl %%ebp, %%esi\n" /* from = out - dist */
+" jmp .L_do_copy\n"
+
+".align 32,0x90\n"
+".L_wrap_around_window:\n"
+" movl 52(%%esp), %%eax\n" /* eax = write */
+" cmpl %%eax, %%ecx\n"
+" jbe .L_contiguous_in_window\n" /* if (write >= nbytes) */
+
+" addl 48(%%esp), %%esi\n" /* from += wsize */
+" addl %%eax, %%esi\n" /* from += write */
+" subl %%ecx, %%esi\n" /* from -= nbytes */
+" subl %%eax, %%ecx\n" /* nbytes -= write */
+
+" movl 64(%%esp), %%eax\n" /* eax = len */
+" cmpl %%ecx, %%eax\n"
+" jbe .L_do_copy\n" /* if (nbytes >= len) */
+
+" subl %%ecx, %%eax\n" /* len -= nbytes */
+" rep movsb\n"
+" movl 28(%%esp), %%esi\n" /* from = window */
+" movl 52(%%esp), %%ecx\n" /* nbytes = write */
+" cmpl %%ecx, %%eax\n"
+" jbe .L_do_copy\n" /* if (nbytes >= len) */
+
+" subl %%ecx, %%eax\n" /* len -= nbytes */
+" rep movsb\n"
+" movl %%edi, %%esi\n"
+" subl %%ebp, %%esi\n" /* from = out - dist */
+" jmp .L_do_copy\n"
+
+".align 32,0x90\n"
+".L_contiguous_in_window:\n"
+" addl %%eax, %%esi\n"
+" subl %%ecx, %%esi\n" /* from += write - nbytes */
+
+" movl 64(%%esp), %%eax\n" /* eax = len */
+" cmpl %%ecx, %%eax\n"
+" jbe .L_do_copy\n" /* if (nbytes >= len) */
+
+" subl %%ecx, %%eax\n" /* len -= nbytes */
+" rep movsb\n"
+" movl %%edi, %%esi\n"
+" subl %%ebp, %%esi\n" /* from = out - dist */
+" jmp .L_do_copy\n" /* if (nbytes >= len) */
+
+".align 32,0x90\n"
+".L_do_copy:\n"
+" movl %%eax, %%ecx\n"
+" rep movsb\n"
+
+" movl 8(%%esp), %%esi\n" /* move in back to %esi, toss from */
+" movl 32(%%esp), %%ebp\n" /* ebp = lcode */
+" jmp .L_while_test\n"
+
+".L_test_for_end_of_block:\n"
+" testb $32, %%al\n"
+" jz .L_invalid_literal_length_code\n"
+" movl $1, 72(%%esp)\n"
+" jmp .L_break_loop_with_status\n"
+
+".L_invalid_literal_length_code:\n"
+" movl $2, 72(%%esp)\n"
+" jmp .L_break_loop_with_status\n"
+
+".L_invalid_distance_code:\n"
+" movl $3, 72(%%esp)\n"
+" jmp .L_break_loop_with_status\n"
+
+".L_invalid_distance_too_far:\n"
+" movl 8(%%esp), %%esi\n"
+" movl $4, 72(%%esp)\n"
+" jmp .L_break_loop_with_status\n"
+
+".L_break_loop:\n"
+" movl $0, 72(%%esp)\n"
+
+".L_break_loop_with_status:\n"
+/* put in, out, bits, and hold back into ar and pop esp */
+" movl %%esi, 8(%%esp)\n" /* save in */
+" movl %%edi, 16(%%esp)\n" /* save out */
+" movl %%ebx, 44(%%esp)\n" /* save bits */
+" movl %%edx, 40(%%esp)\n" /* save hold */
+" movl 4(%%esp), %%ebp\n" /* restore esp, ebp */
+" movl (%%esp), %%esp\n"
+ :
+ : "m" (ar)
+ : "memory", "%eax", "%ebx", "%ecx", "%edx", "%esi", "%edi"
+ );
+#elif defined( _MSC_VER ) && ! defined( _M_AMD64 )
+ __asm {
+ lea eax, ar
+ mov [eax], esp /* save esp, ebp */
+ mov [eax+4], ebp
+ mov esp, eax
+ mov esi, [esp+8] /* esi = in */
+ mov edi, [esp+16] /* edi = out */
+ mov edx, [esp+40] /* edx = hold */
+ mov ebx, [esp+44] /* ebx = bits */
+ mov ebp, [esp+32] /* ebp = lcode */
+
+ cld
+ jmp L_do_loop
+
+ALIGN 4
+L_while_test:
+ cmp [esp+24], edi
+ jbe L_break_loop
+ cmp [esp+12], esi
+ jbe L_break_loop
+
+L_do_loop:
+ cmp bl, 15
+ ja L_get_length_code /* if (15 < bits) */
+
+ xor eax, eax
+ lodsw /* al = *(ushort *)in++ */
+ mov cl, bl /* cl = bits, needs it for shifting */
+ add bl, 16 /* bits += 16 */
+ shl eax, cl
+ or edx, eax /* hold |= *((ushort *)in)++ << bits */
+
+L_get_length_code:
+ mov eax, [esp+56] /* eax = lmask */
+ and eax, edx /* eax &= hold */
+ mov eax, [ebp+eax*4] /* eax = lcode[hold & lmask] */
+
+L_dolen:
+ mov cl, ah /* cl = this.bits */
+ sub bl, ah /* bits -= this.bits */
+ shr edx, cl /* hold >>= this.bits */
+
+ test al, al
+ jnz L_test_for_length_base /* if (op != 0) 45.7% */
+
+ shr eax, 16 /* output this.val char */
+ stosb
+ jmp L_while_test
+
+ALIGN 4
+L_test_for_length_base:
+ mov ecx, eax /* len = this */
+ shr ecx, 16 /* len = this.val */
+ mov [esp+64], ecx /* save len */
+ mov cl, al
+
+ test al, 16
+ jz L_test_for_second_level_length /* if ((op & 16) == 0) 8% */
+ and cl, 15 /* op &= 15 */
+ jz L_decode_distance /* if (!op) */
+ cmp bl, cl
+ jae L_add_bits_to_len /* if (op <= bits) */
+
+ mov ch, cl /* stash op in ch, freeing cl */
+ xor eax, eax
+ lodsw /* al = *(ushort *)in++ */
+ mov cl, bl /* cl = bits, needs it for shifting */
+ add bl, 16 /* bits += 16 */
+ shl eax, cl
+ or edx, eax /* hold |= *((ushort *)in)++ << bits */
+ mov cl, ch /* move op back to ecx */
+
+L_add_bits_to_len:
+ sub bl, cl
+ xor eax, eax
+ inc eax
+ shl eax, cl
+ dec eax
+ and eax, edx /* eax &= hold */
+ shr edx, cl
+ add [esp+64], eax /* len += hold & mask[op] */
+
+L_decode_distance:
+ cmp bl, 15
+ ja L_get_distance_code /* if (15 < bits) */
+
+ xor eax, eax
+ lodsw /* al = *(ushort *)in++ */
+ mov cl, bl /* cl = bits, needs it for shifting */
+ add bl, 16 /* bits += 16 */
+ shl eax, cl
+ or edx, eax /* hold |= *((ushort *)in)++ << bits */
+
+L_get_distance_code:
+ mov eax, [esp+60] /* eax = dmask */
+ mov ecx, [esp+36] /* ecx = dcode */
+ and eax, edx /* eax &= hold */
+ mov eax, [ecx+eax*4]/* eax = dcode[hold & dmask] */
+
+L_dodist:
+ mov ebp, eax /* dist = this */
+ shr ebp, 16 /* dist = this.val */
+ mov cl, ah
+ sub bl, ah /* bits -= this.bits */
+ shr edx, cl /* hold >>= this.bits */
+ mov cl, al /* cl = this.op */
+
+ test al, 16 /* if ((op & 16) == 0) */
+ jz L_test_for_second_level_dist
+ and cl, 15 /* op &= 15 */
+ jz L_check_dist_one
+ cmp bl, cl
+ jae L_add_bits_to_dist /* if (op <= bits) 97.6% */
+
+ mov ch, cl /* stash op in ch, freeing cl */
+ xor eax, eax
+ lodsw /* al = *(ushort *)in++ */
+ mov cl, bl /* cl = bits, needs it for shifting */
+ add bl, 16 /* bits += 16 */
+ shl eax, cl
+ or edx, eax /* hold |= *((ushort *)in)++ << bits */
+ mov cl, ch /* move op back to ecx */
+
+L_add_bits_to_dist:
+ sub bl, cl
+ xor eax, eax
+ inc eax
+ shl eax, cl
+ dec eax /* (1 << op) - 1 */
+ and eax, edx /* eax &= hold */
+ shr edx, cl
+ add ebp, eax /* dist += hold & ((1 << op) - 1) */
+
+L_check_window:
+ mov [esp+8], esi /* save in so from can use it's reg */
+ mov eax, edi
+ sub eax, [esp+20] /* nbytes = out - beg */
+
+ cmp eax, ebp
+ jb L_clip_window /* if (dist > nbytes) 4.2% */
+
+ mov ecx, [esp+64] /* ecx = len */
+ mov esi, edi
+ sub esi, ebp /* from = out - dist */
+
+ sar ecx, 1
+ jnc L_copy_two
+
+ rep movsw
+ mov al, [esi]
+ mov [edi], al
+ inc edi
+
+ mov esi, [esp+8] /* move in back to %esi, toss from */
+ mov ebp, [esp+32] /* ebp = lcode */
+ jmp L_while_test
+
+L_copy_two:
+ rep movsw
+ mov esi, [esp+8] /* move in back to %esi, toss from */
+ mov ebp, [esp+32] /* ebp = lcode */
+ jmp L_while_test
+
+ALIGN 4
+L_check_dist_one:
+ cmp ebp, 1 /* if dist 1, is a memset */
+ jne L_check_window
+ cmp [esp+20], edi
+ je L_check_window /* out == beg, if outside window */
+
+ mov ecx, [esp+64] /* ecx = len */
+ mov al, [edi-1]
+ mov ah, al
+
+ sar ecx, 1
+ jnc L_set_two
+ mov [edi], al /* memset out with from[-1] */
+ inc edi
+
+L_set_two:
+ rep stosw
+ mov ebp, [esp+32] /* ebp = lcode */
+ jmp L_while_test
+
+ALIGN 4
+L_test_for_second_level_length:
+ test al, 64
+ jnz L_test_for_end_of_block /* if ((op & 64) != 0) */
+
+ xor eax, eax
+ inc eax
+ shl eax, cl
+ dec eax
+ and eax, edx /* eax &= hold */
+ add eax, [esp+64] /* eax += len */
+ mov eax, [ebp+eax*4] /* eax = lcode[val+(hold&mask[op])]*/
+ jmp L_dolen
+
+ALIGN 4
+L_test_for_second_level_dist:
+ test al, 64
+ jnz L_invalid_distance_code /* if ((op & 64) != 0) */
+
+ xor eax, eax
+ inc eax
+ shl eax, cl
+ dec eax
+ and eax, edx /* eax &= hold */
+ add eax, ebp /* eax += dist */
+ mov ecx, [esp+36] /* ecx = dcode */
+ mov eax, [ecx+eax*4] /* eax = dcode[val+(hold&mask[op])]*/
+ jmp L_dodist
+
+ALIGN 4
+L_clip_window:
+ mov ecx, eax
+ mov eax, [esp+48] /* eax = wsize */
+ neg ecx /* nbytes = -nbytes */
+ mov esi, [esp+28] /* from = window */
+
+ cmp eax, ebp
+ jb L_invalid_distance_too_far /* if (dist > wsize) */
+
+ add ecx, ebp /* nbytes = dist - nbytes */
+ cmp dword ptr [esp+52], 0
+ jne L_wrap_around_window /* if (write != 0) */
+
+ sub eax, ecx
+ add esi, eax /* from += wsize - nbytes */
+
+ mov eax, [esp+64] /* eax = len */
+ cmp eax, ecx
+ jbe L_do_copy /* if (nbytes >= len) */
+
+ sub eax, ecx /* len -= nbytes */
+ rep movsb
+ mov esi, edi
+ sub esi, ebp /* from = out - dist */
+ jmp L_do_copy
+
+ALIGN 4
+L_wrap_around_window:
+ mov eax, [esp+52] /* eax = write */
+ cmp ecx, eax
+ jbe L_contiguous_in_window /* if (write >= nbytes) */
+
+ add esi, [esp+48] /* from += wsize */
+ add esi, eax /* from += write */
+ sub esi, ecx /* from -= nbytes */
+ sub ecx, eax /* nbytes -= write */
+
+ mov eax, [esp+64] /* eax = len */
+ cmp eax, ecx
+ jbe L_do_copy /* if (nbytes >= len) */
+
+ sub eax, ecx /* len -= nbytes */
+ rep movsb
+ mov esi, [esp+28] /* from = window */
+ mov ecx, [esp+52] /* nbytes = write */
+ cmp eax, ecx
+ jbe L_do_copy /* if (nbytes >= len) */
+
+ sub eax, ecx /* len -= nbytes */
+ rep movsb
+ mov esi, edi
+ sub esi, ebp /* from = out - dist */
+ jmp L_do_copy
+
+ALIGN 4
+L_contiguous_in_window:
+ add esi, eax
+ sub esi, ecx /* from += write - nbytes */
+
+ mov eax, [esp+64] /* eax = len */
+ cmp eax, ecx
+ jbe L_do_copy /* if (nbytes >= len) */
+
+ sub eax, ecx /* len -= nbytes */
+ rep movsb
+ mov esi, edi
+ sub esi, ebp /* from = out - dist */
+ jmp L_do_copy
+
+ALIGN 4
+L_do_copy:
+ mov ecx, eax
+ rep movsb
+
+ mov esi, [esp+8] /* move in back to %esi, toss from */
+ mov ebp, [esp+32] /* ebp = lcode */
+ jmp L_while_test
+
+L_test_for_end_of_block:
+ test al, 32
+ jz L_invalid_literal_length_code
+ mov dword ptr [esp+72], 1
+ jmp L_break_loop_with_status
+
+L_invalid_literal_length_code:
+ mov dword ptr [esp+72], 2
+ jmp L_break_loop_with_status
+
+L_invalid_distance_code:
+ mov dword ptr [esp+72], 3
+ jmp L_break_loop_with_status
+
+L_invalid_distance_too_far:
+ mov esi, [esp+4]
+ mov dword ptr [esp+72], 4
+ jmp L_break_loop_with_status
+
+L_break_loop:
+ mov dword ptr [esp+72], 0
+
+L_break_loop_with_status:
+/* put in, out, bits, and hold back into ar and pop esp */
+ mov [esp+8], esi /* save in */
+ mov [esp+16], edi /* save out */
+ mov [esp+44], ebx /* save bits */
+ mov [esp+40], edx /* save hold */
+ mov ebp, [esp+4] /* restore esp, ebp */
+ mov esp, [esp]
+ }
+#else
+#error "x86 architecture not defined"
+#endif
+
+ if (ar.status > 1) {
+ if (ar.status == 2)
+ strm->msg = "invalid literal/length code";
+ else if (ar.status == 3)
+ strm->msg = "invalid distance code";
+ else
+ strm->msg = "invalid distance too far back";
+ state->mode = BAD;
+ }
+ else if ( ar.status == 1 ) {
+ state->mode = TYPE;
+ }
+
+ /* return unused bytes (on entry, bits < 8, so in won't go too far back) */
+ ar.len = ar.bits >> 3;
+ ar.in -= ar.len;
+ ar.bits -= ar.len << 3;
+ ar.hold &= (1U << ar.bits) - 1;
+
+ /* update state and return */
+ strm->next_in = ar.in;
+ strm->next_out = ar.out;
+ strm->avail_in = (unsigned)(ar.in < ar.last ?
+ PAD_AVAIL_IN + (ar.last - ar.in) :
+ PAD_AVAIL_IN - (ar.in - ar.last));
+ strm->avail_out = (unsigned)(ar.out < ar.end ?
+ PAD_AVAIL_OUT + (ar.end - ar.out) :
+ PAD_AVAIL_OUT - (ar.out - ar.end));
+ state->hold = ar.hold;
+ state->bits = ar.bits;
+ return;
+}
+
diff --git a/contrib/zlib/contrib/inflate86/inffast.S b/contrib/zlib/contrib/inflate86/inffast.S
new file mode 100644
index 000000000..2245a2905
--- /dev/null
+++ b/contrib/zlib/contrib/inflate86/inffast.S
@@ -0,0 +1,1368 @@
+/*
+ * inffast.S is a hand tuned assembler version of:
+ *
+ * inffast.c -- fast decoding
+ * Copyright (C) 1995-2003 Mark Adler
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ *
+ * Copyright (C) 2003 Chris Anderson <christop@charm.net>
+ * Please use the copyright conditions above.
+ *
+ * This version (Jan-23-2003) of inflate_fast was coded and tested under
+ * GNU/Linux on a pentium 3, using the gcc-3.2 compiler distribution. On that
+ * machine, I found that gzip style archives decompressed about 20% faster than
+ * the gcc-3.2 -O3 -fomit-frame-pointer compiled version. Your results will
+ * depend on how large of a buffer is used for z_stream.next_in & next_out
+ * (8K-32K worked best for my 256K cpu cache) and how much overhead there is in
+ * stream processing I/O and crc32/addler32. In my case, this routine used
+ * 70% of the cpu time and crc32 used 20%.
+ *
+ * I am confident that this version will work in the general case, but I have
+ * not tested a wide variety of datasets or a wide variety of platforms.
+ *
+ * Jan-24-2003 -- Added -DUSE_MMX define for slightly faster inflating.
+ * It should be a runtime flag instead of compile time flag...
+ *
+ * Jan-26-2003 -- Added runtime check for MMX support with cpuid instruction.
+ * With -DUSE_MMX, only MMX code is compiled. With -DNO_MMX, only non-MMX code
+ * is compiled. Without either option, runtime detection is enabled. Runtime
+ * detection should work on all modern cpus and the recomended algorithm (flip
+ * ID bit on eflags and then use the cpuid instruction) is used in many
+ * multimedia applications. Tested under win2k with gcc-2.95 and gas-2.12
+ * distributed with cygwin3. Compiling with gcc-2.95 -c inffast.S -o
+ * inffast.obj generates a COFF object which can then be linked with MSVC++
+ * compiled code. Tested under FreeBSD 4.7 with gcc-2.95.
+ *
+ * Jan-28-2003 -- Tested Athlon XP... MMX mode is slower than no MMX (and
+ * slower than compiler generated code). Adjusted cpuid check to use the MMX
+ * code only for Pentiums < P4 until I have more data on the P4. Speed
+ * improvment is only about 15% on the Athlon when compared with code generated
+ * with MSVC++. Not sure yet, but I think the P4 will also be slower using the
+ * MMX mode because many of it's x86 ALU instructions execute in .5 cycles and
+ * have less latency than MMX ops. Added code to buffer the last 11 bytes of
+ * the input stream since the MMX code grabs bits in chunks of 32, which
+ * differs from the inffast.c algorithm. I don't think there would have been
+ * read overruns where a page boundary was crossed (a segfault), but there
+ * could have been overruns when next_in ends on unaligned memory (unintialized
+ * memory read).
+ *
+ * Mar-13-2003 -- P4 MMX is slightly slower than P4 NO_MMX. I created a C
+ * version of the non-MMX code so that it doesn't depend on zstrm and zstate
+ * structure offsets which are hard coded in this file. This was last tested
+ * with zlib-1.2.0 which is currently in beta testing, newer versions of this
+ * and inffas86.c can be found at http://www.eetbeetee.com/zlib/ and
+ * http://www.charm.net/~christop/zlib/
+ */
+
+
+/*
+ * if you have underscore linking problems (_inflate_fast undefined), try
+ * using -DGAS_COFF
+ */
+#if ! defined( GAS_COFF ) && ! defined( GAS_ELF )
+
+#if defined( WIN32 ) || defined( __CYGWIN__ )
+#define GAS_COFF /* windows object format */
+#else
+#define GAS_ELF
+#endif
+
+#endif /* ! GAS_COFF && ! GAS_ELF */
+
+
+#if defined( GAS_COFF )
+
+/* coff externals have underscores */
+#define inflate_fast _inflate_fast
+#define inflate_fast_use_mmx _inflate_fast_use_mmx
+
+#endif /* GAS_COFF */
+
+
+.file "inffast.S"
+
+.globl inflate_fast
+
+.text
+.align 4,0
+.L_invalid_literal_length_code_msg:
+.string "invalid literal/length code"
+
+.align 4,0
+.L_invalid_distance_code_msg:
+.string "invalid distance code"
+
+.align 4,0
+.L_invalid_distance_too_far_msg:
+.string "invalid distance too far back"
+
+#if ! defined( NO_MMX )
+.align 4,0
+.L_mask: /* mask[N] = ( 1 << N ) - 1 */
+.long 0
+.long 1
+.long 3
+.long 7
+.long 15
+.long 31
+.long 63
+.long 127
+.long 255
+.long 511
+.long 1023
+.long 2047
+.long 4095
+.long 8191
+.long 16383
+.long 32767
+.long 65535
+.long 131071
+.long 262143
+.long 524287
+.long 1048575
+.long 2097151
+.long 4194303
+.long 8388607
+.long 16777215
+.long 33554431
+.long 67108863
+.long 134217727
+.long 268435455
+.long 536870911
+.long 1073741823
+.long 2147483647
+.long 4294967295
+#endif /* NO_MMX */
+
+.text
+
+/*
+ * struct z_stream offsets, in zlib.h
+ */
+#define next_in_strm 0 /* strm->next_in */
+#define avail_in_strm 4 /* strm->avail_in */
+#define next_out_strm 12 /* strm->next_out */
+#define avail_out_strm 16 /* strm->avail_out */
+#define msg_strm 24 /* strm->msg */
+#define state_strm 28 /* strm->state */
+
+/*
+ * struct inflate_state offsets, in inflate.h
+ */
+#define mode_state 0 /* state->mode */
+#define wsize_state 32 /* state->wsize */
+#define write_state 40 /* state->write */
+#define window_state 44 /* state->window */
+#define hold_state 48 /* state->hold */
+#define bits_state 52 /* state->bits */
+#define lencode_state 68 /* state->lencode */
+#define distcode_state 72 /* state->distcode */
+#define lenbits_state 76 /* state->lenbits */
+#define distbits_state 80 /* state->distbits */
+
+/*
+ * inflate_fast's activation record
+ */
+#define local_var_size 64 /* how much local space for vars */
+#define strm_sp 88 /* first arg: z_stream * (local_var_size + 24) */
+#define start_sp 92 /* second arg: unsigned int (local_var_size + 28) */
+
+/*
+ * offsets for local vars on stack
+ */
+#define out 60 /* unsigned char* */
+#define window 56 /* unsigned char* */
+#define wsize 52 /* unsigned int */
+#define write 48 /* unsigned int */
+#define in 44 /* unsigned char* */
+#define beg 40 /* unsigned char* */
+#define buf 28 /* char[ 12 ] */
+#define len 24 /* unsigned int */
+#define last 20 /* unsigned char* */
+#define end 16 /* unsigned char* */
+#define dcode 12 /* code* */
+#define lcode 8 /* code* */
+#define dmask 4 /* unsigned int */
+#define lmask 0 /* unsigned int */
+
+/*
+ * typedef enum inflate_mode consts, in inflate.h
+ */
+#define INFLATE_MODE_TYPE 11 /* state->mode flags enum-ed in inflate.h */
+#define INFLATE_MODE_BAD 26
+
+
+#if ! defined( USE_MMX ) && ! defined( NO_MMX )
+
+#define RUN_TIME_MMX
+
+#define CHECK_MMX 1
+#define DO_USE_MMX 2
+#define DONT_USE_MMX 3
+
+.globl inflate_fast_use_mmx
+
+.data
+
+.align 4,0
+inflate_fast_use_mmx: /* integer flag for run time control 1=check,2=mmx,3=no */
+.long CHECK_MMX
+
+#if defined( GAS_ELF )
+/* elf info */
+.type inflate_fast_use_mmx,@object
+.size inflate_fast_use_mmx,4
+#endif
+
+#endif /* RUN_TIME_MMX */
+
+#if defined( GAS_COFF )
+/* coff info: scl 2 = extern, type 32 = function */
+.def inflate_fast; .scl 2; .type 32; .endef
+#endif
+
+.text
+
+.align 32,0x90
+inflate_fast:
+ pushl %edi
+ pushl %esi
+ pushl %ebp
+ pushl %ebx
+ pushf /* save eflags (strm_sp, state_sp assumes this is 32 bits) */
+ subl $local_var_size, %esp
+ cld
+
+#define strm_r %esi
+#define state_r %edi
+
+ movl strm_sp(%esp), strm_r
+ movl state_strm(strm_r), state_r
+
+ /* in = strm->next_in;
+ * out = strm->next_out;
+ * last = in + strm->avail_in - 11;
+ * beg = out - (start - strm->avail_out);
+ * end = out + (strm->avail_out - 257);
+ */
+ movl avail_in_strm(strm_r), %edx
+ movl next_in_strm(strm_r), %eax
+
+ addl %eax, %edx /* avail_in += next_in */
+ subl $11, %edx /* avail_in -= 11 */
+
+ movl %eax, in(%esp)
+ movl %edx, last(%esp)
+
+ movl start_sp(%esp), %ebp
+ movl avail_out_strm(strm_r), %ecx
+ movl next_out_strm(strm_r), %ebx
+
+ subl %ecx, %ebp /* start -= avail_out */
+ negl %ebp /* start = -start */
+ addl %ebx, %ebp /* start += next_out */
+
+ subl $257, %ecx /* avail_out -= 257 */
+ addl %ebx, %ecx /* avail_out += out */
+
+ movl %ebx, out(%esp)
+ movl %ebp, beg(%esp)
+ movl %ecx, end(%esp)
+
+ /* wsize = state->wsize;
+ * write = state->write;
+ * window = state->window;
+ * hold = state->hold;
+ * bits = state->bits;
+ * lcode = state->lencode;
+ * dcode = state->distcode;
+ * lmask = ( 1 << state->lenbits ) - 1;
+ * dmask = ( 1 << state->distbits ) - 1;
+ */
+
+ movl lencode_state(state_r), %eax
+ movl distcode_state(state_r), %ecx
+
+ movl %eax, lcode(%esp)
+ movl %ecx, dcode(%esp)
+
+ movl $1, %eax
+ movl lenbits_state(state_r), %ecx
+ shll %cl, %eax
+ decl %eax
+ movl %eax, lmask(%esp)
+
+ movl $1, %eax
+ movl distbits_state(state_r), %ecx
+ shll %cl, %eax
+ decl %eax
+ movl %eax, dmask(%esp)
+
+ movl wsize_state(state_r), %eax
+ movl write_state(state_r), %ecx
+ movl window_state(state_r), %edx
+
+ movl %eax, wsize(%esp)
+ movl %ecx, write(%esp)
+ movl %edx, window(%esp)
+
+ movl hold_state(state_r), %ebp
+ movl bits_state(state_r), %ebx
+
+#undef strm_r
+#undef state_r
+
+#define in_r %esi
+#define from_r %esi
+#define out_r %edi
+
+ movl in(%esp), in_r
+ movl last(%esp), %ecx
+ cmpl in_r, %ecx
+ ja .L_align_long /* if in < last */
+
+ addl $11, %ecx /* ecx = &in[ avail_in ] */
+ subl in_r, %ecx /* ecx = avail_in */
+ movl $12, %eax
+ subl %ecx, %eax /* eax = 12 - avail_in */
+ leal buf(%esp), %edi
+ rep movsb /* memcpy( buf, in, avail_in ) */
+ movl %eax, %ecx
+ xorl %eax, %eax
+ rep stosb /* memset( &buf[ avail_in ], 0, 12 - avail_in ) */
+ leal buf(%esp), in_r /* in = buf */
+ movl in_r, last(%esp) /* last = in, do just one iteration */
+ jmp .L_is_aligned
+
+ /* align in_r on long boundary */
+.L_align_long:
+ testl $3, in_r
+ jz .L_is_aligned
+ xorl %eax, %eax
+ movb (in_r), %al
+ incl in_r
+ movl %ebx, %ecx
+ addl $8, %ebx
+ shll %cl, %eax
+ orl %eax, %ebp
+ jmp .L_align_long
+
+.L_is_aligned:
+ movl out(%esp), out_r
+
+#if defined( NO_MMX )
+ jmp .L_do_loop
+#endif
+
+#if defined( USE_MMX )
+ jmp .L_init_mmx
+#endif
+
+/*** Runtime MMX check ***/
+
+#if defined( RUN_TIME_MMX )
+.L_check_mmx:
+ cmpl $DO_USE_MMX, inflate_fast_use_mmx
+ je .L_init_mmx
+ ja .L_do_loop /* > 2 */
+
+ pushl %eax
+ pushl %ebx
+ pushl %ecx
+ pushl %edx
+ pushf
+ movl (%esp), %eax /* copy eflags to eax */
+ xorl $0x200000, (%esp) /* try toggling ID bit of eflags (bit 21)
+ * to see if cpu supports cpuid...
+ * ID bit method not supported by NexGen but
+ * bios may load a cpuid instruction and
+ * cpuid may be disabled on Cyrix 5-6x86 */
+ popf
+ pushf
+ popl %edx /* copy new eflags to edx */
+ xorl %eax, %edx /* test if ID bit is flipped */
+ jz .L_dont_use_mmx /* not flipped if zero */
+ xorl %eax, %eax
+ cpuid
+ cmpl $0x756e6547, %ebx /* check for GenuineIntel in ebx,ecx,edx */
+ jne .L_dont_use_mmx
+ cmpl $0x6c65746e, %ecx
+ jne .L_dont_use_mmx
+ cmpl $0x49656e69, %edx
+ jne .L_dont_use_mmx
+ movl $1, %eax
+ cpuid /* get cpu features */
+ shrl $8, %eax
+ andl $15, %eax
+ cmpl $6, %eax /* check for Pentium family, is 0xf for P4 */
+ jne .L_dont_use_mmx
+ testl $0x800000, %edx /* test if MMX feature is set (bit 23) */
+ jnz .L_use_mmx
+ jmp .L_dont_use_mmx
+.L_use_mmx:
+ movl $DO_USE_MMX, inflate_fast_use_mmx
+ jmp .L_check_mmx_pop
+.L_dont_use_mmx:
+ movl $DONT_USE_MMX, inflate_fast_use_mmx
+.L_check_mmx_pop:
+ popl %edx
+ popl %ecx
+ popl %ebx
+ popl %eax
+ jmp .L_check_mmx
+#endif
+
+
+/*** Non-MMX code ***/
+
+#if defined ( NO_MMX ) || defined( RUN_TIME_MMX )
+
+#define hold_r %ebp
+#define bits_r %bl
+#define bitslong_r %ebx
+
+.align 32,0x90
+.L_while_test:
+ /* while (in < last && out < end)
+ */
+ cmpl out_r, end(%esp)
+ jbe .L_break_loop /* if (out >= end) */
+
+ cmpl in_r, last(%esp)
+ jbe .L_break_loop
+
+.L_do_loop:
+ /* regs: %esi = in, %ebp = hold, %bl = bits, %edi = out
+ *
+ * do {
+ * if (bits < 15) {
+ * hold |= *((unsigned short *)in)++ << bits;
+ * bits += 16
+ * }
+ * this = lcode[hold & lmask]
+ */
+ cmpb $15, bits_r
+ ja .L_get_length_code /* if (15 < bits) */
+
+ xorl %eax, %eax
+ lodsw /* al = *(ushort *)in++ */
+ movb bits_r, %cl /* cl = bits, needs it for shifting */
+ addb $16, bits_r /* bits += 16 */
+ shll %cl, %eax
+ orl %eax, hold_r /* hold |= *((ushort *)in)++ << bits */
+
+.L_get_length_code:
+ movl lmask(%esp), %edx /* edx = lmask */
+ movl lcode(%esp), %ecx /* ecx = lcode */
+ andl hold_r, %edx /* edx &= hold */
+ movl (%ecx,%edx,4), %eax /* eax = lcode[hold & lmask] */
+
+.L_dolen:
+ /* regs: %esi = in, %ebp = hold, %bl = bits, %edi = out
+ *
+ * dolen:
+ * bits -= this.bits;
+ * hold >>= this.bits
+ */
+ movb %ah, %cl /* cl = this.bits */
+ subb %ah, bits_r /* bits -= this.bits */
+ shrl %cl, hold_r /* hold >>= this.bits */
+
+ /* check if op is a literal
+ * if (op == 0) {
+ * PUP(out) = this.val;
+ * }
+ */
+ testb %al, %al
+ jnz .L_test_for_length_base /* if (op != 0) 45.7% */
+
+ shrl $16, %eax /* output this.val char */
+ stosb
+ jmp .L_while_test
+
+.L_test_for_length_base:
+ /* regs: %esi = in, %ebp = hold, %bl = bits, %edi = out, %edx = len
+ *
+ * else if (op & 16) {
+ * len = this.val
+ * op &= 15
+ * if (op) {
+ * if (op > bits) {
+ * hold |= *((unsigned short *)in)++ << bits;
+ * bits += 16
+ * }
+ * len += hold & mask[op];
+ * bits -= op;
+ * hold >>= op;
+ * }
+ */
+#define len_r %edx
+ movl %eax, len_r /* len = this */
+ shrl $16, len_r /* len = this.val */
+ movb %al, %cl
+
+ testb $16, %al
+ jz .L_test_for_second_level_length /* if ((op & 16) == 0) 8% */
+ andb $15, %cl /* op &= 15 */
+ jz .L_save_len /* if (!op) */
+ cmpb %cl, bits_r
+ jae .L_add_bits_to_len /* if (op <= bits) */
+
+ movb %cl, %ch /* stash op in ch, freeing cl */
+ xorl %eax, %eax
+ lodsw /* al = *(ushort *)in++ */
+ movb bits_r, %cl /* cl = bits, needs it for shifting */
+ addb $16, bits_r /* bits += 16 */
+ shll %cl, %eax
+ orl %eax, hold_r /* hold |= *((ushort *)in)++ << bits */
+ movb %ch, %cl /* move op back to ecx */
+
+.L_add_bits_to_len:
+ movl $1, %eax
+ shll %cl, %eax
+ decl %eax
+ subb %cl, bits_r
+ andl hold_r, %eax /* eax &= hold */
+ shrl %cl, hold_r
+ addl %eax, len_r /* len += hold & mask[op] */
+
+.L_save_len:
+ movl len_r, len(%esp) /* save len */
+#undef len_r
+
+.L_decode_distance:
+ /* regs: %esi = in, %ebp = hold, %bl = bits, %edi = out, %edx = dist
+ *
+ * if (bits < 15) {
+ * hold |= *((unsigned short *)in)++ << bits;
+ * bits += 16
+ * }
+ * this = dcode[hold & dmask];
+ * dodist:
+ * bits -= this.bits;
+ * hold >>= this.bits;
+ * op = this.op;
+ */
+
+ cmpb $15, bits_r
+ ja .L_get_distance_code /* if (15 < bits) */
+
+ xorl %eax, %eax
+ lodsw /* al = *(ushort *)in++ */
+ movb bits_r, %cl /* cl = bits, needs it for shifting */
+ addb $16, bits_r /* bits += 16 */
+ shll %cl, %eax
+ orl %eax, hold_r /* hold |= *((ushort *)in)++ << bits */
+
+.L_get_distance_code:
+ movl dmask(%esp), %edx /* edx = dmask */
+ movl dcode(%esp), %ecx /* ecx = dcode */
+ andl hold_r, %edx /* edx &= hold */
+ movl (%ecx,%edx,4), %eax /* eax = dcode[hold & dmask] */
+
+#define dist_r %edx
+.L_dodist:
+ movl %eax, dist_r /* dist = this */
+ shrl $16, dist_r /* dist = this.val */
+ movb %ah, %cl
+ subb %ah, bits_r /* bits -= this.bits */
+ shrl %cl, hold_r /* hold >>= this.bits */
+
+ /* if (op & 16) {
+ * dist = this.val
+ * op &= 15
+ * if (op > bits) {
+ * hold |= *((unsigned short *)in)++ << bits;
+ * bits += 16
+ * }
+ * dist += hold & mask[op];
+ * bits -= op;
+ * hold >>= op;
+ */
+ movb %al, %cl /* cl = this.op */
+
+ testb $16, %al /* if ((op & 16) == 0) */
+ jz .L_test_for_second_level_dist
+ andb $15, %cl /* op &= 15 */
+ jz .L_check_dist_one
+ cmpb %cl, bits_r
+ jae .L_add_bits_to_dist /* if (op <= bits) 97.6% */
+
+ movb %cl, %ch /* stash op in ch, freeing cl */
+ xorl %eax, %eax
+ lodsw /* al = *(ushort *)in++ */
+ movb bits_r, %cl /* cl = bits, needs it for shifting */
+ addb $16, bits_r /* bits += 16 */
+ shll %cl, %eax
+ orl %eax, hold_r /* hold |= *((ushort *)in)++ << bits */
+ movb %ch, %cl /* move op back to ecx */
+
+.L_add_bits_to_dist:
+ movl $1, %eax
+ shll %cl, %eax
+ decl %eax /* (1 << op) - 1 */
+ subb %cl, bits_r
+ andl hold_r, %eax /* eax &= hold */
+ shrl %cl, hold_r
+ addl %eax, dist_r /* dist += hold & ((1 << op) - 1) */
+ jmp .L_check_window
+
+.L_check_window:
+ /* regs: %esi = from, %ebp = hold, %bl = bits, %edi = out, %edx = dist
+ * %ecx = nbytes
+ *
+ * nbytes = out - beg;
+ * if (dist <= nbytes) {
+ * from = out - dist;
+ * do {
+ * PUP(out) = PUP(from);
+ * } while (--len > 0) {
+ * }
+ */
+
+ movl in_r, in(%esp) /* save in so from can use it's reg */
+ movl out_r, %eax
+ subl beg(%esp), %eax /* nbytes = out - beg */
+
+ cmpl dist_r, %eax
+ jb .L_clip_window /* if (dist > nbytes) 4.2% */
+
+ movl len(%esp), %ecx
+ movl out_r, from_r
+ subl dist_r, from_r /* from = out - dist */
+
+ subl $3, %ecx
+ movb (from_r), %al
+ movb %al, (out_r)
+ movb 1(from_r), %al
+ movb 2(from_r), %dl
+ addl $3, from_r
+ movb %al, 1(out_r)
+ movb %dl, 2(out_r)
+ addl $3, out_r
+ rep movsb
+
+ movl in(%esp), in_r /* move in back to %esi, toss from */
+ jmp .L_while_test
+
+.align 16,0x90
+.L_check_dist_one:
+ cmpl $1, dist_r
+ jne .L_check_window
+ cmpl out_r, beg(%esp)
+ je .L_check_window
+
+ decl out_r
+ movl len(%esp), %ecx
+ movb (out_r), %al
+ subl $3, %ecx
+
+ movb %al, 1(out_r)
+ movb %al, 2(out_r)
+ movb %al, 3(out_r)
+ addl $4, out_r
+ rep stosb
+
+ jmp .L_while_test
+
+.align 16,0x90
+.L_test_for_second_level_length:
+ /* else if ((op & 64) == 0) {
+ * this = lcode[this.val + (hold & mask[op])];
+ * }
+ */
+ testb $64, %al
+ jnz .L_test_for_end_of_block /* if ((op & 64) != 0) */
+
+ movl $1, %eax
+ shll %cl, %eax
+ decl %eax
+ andl hold_r, %eax /* eax &= hold */
+ addl %edx, %eax /* eax += this.val */
+ movl lcode(%esp), %edx /* edx = lcode */
+ movl (%edx,%eax,4), %eax /* eax = lcode[val + (hold&mask[op])] */
+ jmp .L_dolen
+
+.align 16,0x90
+.L_test_for_second_level_dist:
+ /* else if ((op & 64) == 0) {
+ * this = dcode[this.val + (hold & mask[op])];
+ * }
+ */
+ testb $64, %al
+ jnz .L_invalid_distance_code /* if ((op & 64) != 0) */
+
+ movl $1, %eax
+ shll %cl, %eax
+ decl %eax
+ andl hold_r, %eax /* eax &= hold */
+ addl %edx, %eax /* eax += this.val */
+ movl dcode(%esp), %edx /* edx = dcode */
+ movl (%edx,%eax,4), %eax /* eax = dcode[val + (hold&mask[op])] */
+ jmp .L_dodist
+
+.align 16,0x90
+.L_clip_window:
+ /* regs: %esi = from, %ebp = hold, %bl = bits, %edi = out, %edx = dist
+ * %ecx = nbytes
+ *
+ * else {
+ * if (dist > wsize) {
+ * invalid distance
+ * }
+ * from = window;
+ * nbytes = dist - nbytes;
+ * if (write == 0) {
+ * from += wsize - nbytes;
+ */
+#define nbytes_r %ecx
+ movl %eax, nbytes_r
+ movl wsize(%esp), %eax /* prepare for dist compare */
+ negl nbytes_r /* nbytes = -nbytes */
+ movl window(%esp), from_r /* from = window */
+
+ cmpl dist_r, %eax
+ jb .L_invalid_distance_too_far /* if (dist > wsize) */
+
+ addl dist_r, nbytes_r /* nbytes = dist - nbytes */
+ cmpl $0, write(%esp)
+ jne .L_wrap_around_window /* if (write != 0) */
+
+ subl nbytes_r, %eax
+ addl %eax, from_r /* from += wsize - nbytes */
+
+ /* regs: %esi = from, %ebp = hold, %bl = bits, %edi = out, %edx = dist
+ * %ecx = nbytes, %eax = len
+ *
+ * if (nbytes < len) {
+ * len -= nbytes;
+ * do {
+ * PUP(out) = PUP(from);
+ * } while (--nbytes);
+ * from = out - dist;
+ * }
+ * }
+ */
+#define len_r %eax
+ movl len(%esp), len_r
+ cmpl nbytes_r, len_r
+ jbe .L_do_copy1 /* if (nbytes >= len) */
+
+ subl nbytes_r, len_r /* len -= nbytes */
+ rep movsb
+ movl out_r, from_r
+ subl dist_r, from_r /* from = out - dist */
+ jmp .L_do_copy1
+
+ cmpl nbytes_r, len_r
+ jbe .L_do_copy1 /* if (nbytes >= len) */
+
+ subl nbytes_r, len_r /* len -= nbytes */
+ rep movsb
+ movl out_r, from_r
+ subl dist_r, from_r /* from = out - dist */
+ jmp .L_do_copy1
+
+.L_wrap_around_window:
+ /* regs: %esi = from, %ebp = hold, %bl = bits, %edi = out, %edx = dist
+ * %ecx = nbytes, %eax = write, %eax = len
+ *
+ * else if (write < nbytes) {
+ * from += wsize + write - nbytes;
+ * nbytes -= write;
+ * if (nbytes < len) {
+ * len -= nbytes;
+ * do {
+ * PUP(out) = PUP(from);
+ * } while (--nbytes);
+ * from = window;
+ * nbytes = write;
+ * if (nbytes < len) {
+ * len -= nbytes;
+ * do {
+ * PUP(out) = PUP(from);
+ * } while(--nbytes);
+ * from = out - dist;
+ * }
+ * }
+ * }
+ */
+#define write_r %eax
+ movl write(%esp), write_r
+ cmpl write_r, nbytes_r
+ jbe .L_contiguous_in_window /* if (write >= nbytes) */
+
+ addl wsize(%esp), from_r
+ addl write_r, from_r
+ subl nbytes_r, from_r /* from += wsize + write - nbytes */
+ subl write_r, nbytes_r /* nbytes -= write */
+#undef write_r
+
+ movl len(%esp), len_r
+ cmpl nbytes_r, len_r
+ jbe .L_do_copy1 /* if (nbytes >= len) */
+
+ subl nbytes_r, len_r /* len -= nbytes */
+ rep movsb
+ movl window(%esp), from_r /* from = window */
+ movl write(%esp), nbytes_r /* nbytes = write */
+ cmpl nbytes_r, len_r
+ jbe .L_do_copy1 /* if (nbytes >= len) */
+
+ subl nbytes_r, len_r /* len -= nbytes */
+ rep movsb
+ movl out_r, from_r
+ subl dist_r, from_r /* from = out - dist */
+ jmp .L_do_copy1
+
+.L_contiguous_in_window:
+ /* regs: %esi = from, %ebp = hold, %bl = bits, %edi = out, %edx = dist
+ * %ecx = nbytes, %eax = write, %eax = len
+ *
+ * else {
+ * from += write - nbytes;
+ * if (nbytes < len) {
+ * len -= nbytes;
+ * do {
+ * PUP(out) = PUP(from);
+ * } while (--nbytes);
+ * from = out - dist;
+ * }
+ * }
+ */
+#define write_r %eax
+ addl write_r, from_r
+ subl nbytes_r, from_r /* from += write - nbytes */
+#undef write_r
+
+ movl len(%esp), len_r
+ cmpl nbytes_r, len_r
+ jbe .L_do_copy1 /* if (nbytes >= len) */
+
+ subl nbytes_r, len_r /* len -= nbytes */
+ rep movsb
+ movl out_r, from_r
+ subl dist_r, from_r /* from = out - dist */
+
+.L_do_copy1:
+ /* regs: %esi = from, %esi = in, %ebp = hold, %bl = bits, %edi = out
+ * %eax = len
+ *
+ * while (len > 0) {
+ * PUP(out) = PUP(from);
+ * len--;
+ * }
+ * }
+ * } while (in < last && out < end);
+ */
+#undef nbytes_r
+#define in_r %esi
+ movl len_r, %ecx
+ rep movsb
+
+ movl in(%esp), in_r /* move in back to %esi, toss from */
+ jmp .L_while_test
+
+#undef len_r
+#undef dist_r
+
+#endif /* NO_MMX || RUN_TIME_MMX */
+
+
+/*** MMX code ***/
+
+#if defined( USE_MMX ) || defined( RUN_TIME_MMX )
+
+.align 32,0x90
+.L_init_mmx:
+ emms
+
+#undef bits_r
+#undef bitslong_r
+#define bitslong_r %ebp
+#define hold_mm %mm0
+ movd %ebp, hold_mm
+ movl %ebx, bitslong_r
+
+#define used_mm %mm1
+#define dmask2_mm %mm2
+#define lmask2_mm %mm3
+#define lmask_mm %mm4
+#define dmask_mm %mm5
+#define tmp_mm %mm6
+
+ movd lmask(%esp), lmask_mm
+ movq lmask_mm, lmask2_mm
+ movd dmask(%esp), dmask_mm
+ movq dmask_mm, dmask2_mm
+ pxor used_mm, used_mm
+ movl lcode(%esp), %ebx /* ebx = lcode */
+ jmp .L_do_loop_mmx
+
+.align 32,0x90
+.L_while_test_mmx:
+ /* while (in < last && out < end)
+ */
+ cmpl out_r, end(%esp)
+ jbe .L_break_loop /* if (out >= end) */
+
+ cmpl in_r, last(%esp)
+ jbe .L_break_loop
+
+.L_do_loop_mmx:
+ psrlq used_mm, hold_mm /* hold_mm >>= last bit length */
+
+ cmpl $32, bitslong_r
+ ja .L_get_length_code_mmx /* if (32 < bits) */
+
+ movd bitslong_r, tmp_mm
+ movd (in_r), %mm7
+ addl $4, in_r
+ psllq tmp_mm, %mm7
+ addl $32, bitslong_r
+ por %mm7, hold_mm /* hold_mm |= *((uint *)in)++ << bits */
+
+.L_get_length_code_mmx:
+ pand hold_mm, lmask_mm
+ movd lmask_mm, %eax
+ movq lmask2_mm, lmask_mm
+ movl (%ebx,%eax,4), %eax /* eax = lcode[hold & lmask] */
+
+.L_dolen_mmx:
+ movzbl %ah, %ecx /* ecx = this.bits */
+ movd %ecx, used_mm
+ subl %ecx, bitslong_r /* bits -= this.bits */
+
+ testb %al, %al
+ jnz .L_test_for_length_base_mmx /* if (op != 0) 45.7% */
+
+ shrl $16, %eax /* output this.val char */
+ stosb
+ jmp .L_while_test_mmx
+
+.L_test_for_length_base_mmx:
+#define len_r %edx
+ movl %eax, len_r /* len = this */
+ shrl $16, len_r /* len = this.val */
+
+ testb $16, %al
+ jz .L_test_for_second_level_length_mmx /* if ((op & 16) == 0) 8% */
+ andl $15, %eax /* op &= 15 */
+ jz .L_decode_distance_mmx /* if (!op) */
+
+ psrlq used_mm, hold_mm /* hold_mm >>= last bit length */
+ movd %eax, used_mm
+ movd hold_mm, %ecx
+ subl %eax, bitslong_r
+ andl .L_mask(,%eax,4), %ecx
+ addl %ecx, len_r /* len += hold & mask[op] */
+
+.L_decode_distance_mmx:
+ psrlq used_mm, hold_mm /* hold_mm >>= last bit length */
+
+ cmpl $32, bitslong_r
+ ja .L_get_dist_code_mmx /* if (32 < bits) */
+
+ movd bitslong_r, tmp_mm
+ movd (in_r), %mm7
+ addl $4, in_r
+ psllq tmp_mm, %mm7
+ addl $32, bitslong_r
+ por %mm7, hold_mm /* hold_mm |= *((uint *)in)++ << bits */
+
+.L_get_dist_code_mmx:
+ movl dcode(%esp), %ebx /* ebx = dcode */
+ pand hold_mm, dmask_mm
+ movd dmask_mm, %eax
+ movq dmask2_mm, dmask_mm
+ movl (%ebx,%eax,4), %eax /* eax = dcode[hold & lmask] */
+
+.L_dodist_mmx:
+#define dist_r %ebx
+ movzbl %ah, %ecx /* ecx = this.bits */
+ movl %eax, dist_r
+ shrl $16, dist_r /* dist = this.val */
+ subl %ecx, bitslong_r /* bits -= this.bits */
+ movd %ecx, used_mm
+
+ testb $16, %al /* if ((op & 16) == 0) */
+ jz .L_test_for_second_level_dist_mmx
+ andl $15, %eax /* op &= 15 */
+ jz .L_check_dist_one_mmx
+
+.L_add_bits_to_dist_mmx:
+ psrlq used_mm, hold_mm /* hold_mm >>= last bit length */
+ movd %eax, used_mm /* save bit length of current op */
+ movd hold_mm, %ecx /* get the next bits on input stream */
+ subl %eax, bitslong_r /* bits -= op bits */
+ andl .L_mask(,%eax,4), %ecx /* ecx = hold & mask[op] */
+ addl %ecx, dist_r /* dist += hold & mask[op] */
+
+.L_check_window_mmx:
+ movl in_r, in(%esp) /* save in so from can use it's reg */
+ movl out_r, %eax
+ subl beg(%esp), %eax /* nbytes = out - beg */
+
+ cmpl dist_r, %eax
+ jb .L_clip_window_mmx /* if (dist > nbytes) 4.2% */
+
+ movl len_r, %ecx
+ movl out_r, from_r
+ subl dist_r, from_r /* from = out - dist */
+
+ subl $3, %ecx
+ movb (from_r), %al
+ movb %al, (out_r)
+ movb 1(from_r), %al
+ movb 2(from_r), %dl
+ addl $3, from_r
+ movb %al, 1(out_r)
+ movb %dl, 2(out_r)
+ addl $3, out_r
+ rep movsb
+
+ movl in(%esp), in_r /* move in back to %esi, toss from */
+ movl lcode(%esp), %ebx /* move lcode back to %ebx, toss dist */
+ jmp .L_while_test_mmx
+
+.align 16,0x90
+.L_check_dist_one_mmx:
+ cmpl $1, dist_r
+ jne .L_check_window_mmx
+ cmpl out_r, beg(%esp)
+ je .L_check_window_mmx
+
+ decl out_r
+ movl len_r, %ecx
+ movb (out_r), %al
+ subl $3, %ecx
+
+ movb %al, 1(out_r)
+ movb %al, 2(out_r)
+ movb %al, 3(out_r)
+ addl $4, out_r
+ rep stosb
+
+ movl lcode(%esp), %ebx /* move lcode back to %ebx, toss dist */
+ jmp .L_while_test_mmx
+
+.align 16,0x90
+.L_test_for_second_level_length_mmx:
+ testb $64, %al
+ jnz .L_test_for_end_of_block /* if ((op & 64) != 0) */
+
+ andl $15, %eax
+ psrlq used_mm, hold_mm /* hold_mm >>= last bit length */
+ movd hold_mm, %ecx
+ andl .L_mask(,%eax,4), %ecx
+ addl len_r, %ecx
+ movl (%ebx,%ecx,4), %eax /* eax = lcode[hold & lmask] */
+ jmp .L_dolen_mmx
+
+.align 16,0x90
+.L_test_for_second_level_dist_mmx:
+ testb $64, %al
+ jnz .L_invalid_distance_code /* if ((op & 64) != 0) */
+
+ andl $15, %eax
+ psrlq used_mm, hold_mm /* hold_mm >>= last bit length */
+ movd hold_mm, %ecx
+ andl .L_mask(,%eax,4), %ecx
+ movl dcode(%esp), %eax /* ecx = dcode */
+ addl dist_r, %ecx
+ movl (%eax,%ecx,4), %eax /* eax = lcode[hold & lmask] */
+ jmp .L_dodist_mmx
+
+.align 16,0x90
+.L_clip_window_mmx:
+#define nbytes_r %ecx
+ movl %eax, nbytes_r
+ movl wsize(%esp), %eax /* prepare for dist compare */
+ negl nbytes_r /* nbytes = -nbytes */
+ movl window(%esp), from_r /* from = window */
+
+ cmpl dist_r, %eax
+ jb .L_invalid_distance_too_far /* if (dist > wsize) */
+
+ addl dist_r, nbytes_r /* nbytes = dist - nbytes */
+ cmpl $0, write(%esp)
+ jne .L_wrap_around_window_mmx /* if (write != 0) */
+
+ subl nbytes_r, %eax
+ addl %eax, from_r /* from += wsize - nbytes */
+
+ cmpl nbytes_r, len_r
+ jbe .L_do_copy1_mmx /* if (nbytes >= len) */
+
+ subl nbytes_r, len_r /* len -= nbytes */
+ rep movsb
+ movl out_r, from_r
+ subl dist_r, from_r /* from = out - dist */
+ jmp .L_do_copy1_mmx
+
+ cmpl nbytes_r, len_r
+ jbe .L_do_copy1_mmx /* if (nbytes >= len) */
+
+ subl nbytes_r, len_r /* len -= nbytes */
+ rep movsb
+ movl out_r, from_r
+ subl dist_r, from_r /* from = out - dist */
+ jmp .L_do_copy1_mmx
+
+.L_wrap_around_window_mmx:
+#define write_r %eax
+ movl write(%esp), write_r
+ cmpl write_r, nbytes_r
+ jbe .L_contiguous_in_window_mmx /* if (write >= nbytes) */
+
+ addl wsize(%esp), from_r
+ addl write_r, from_r
+ subl nbytes_r, from_r /* from += wsize + write - nbytes */
+ subl write_r, nbytes_r /* nbytes -= write */
+#undef write_r
+
+ cmpl nbytes_r, len_r
+ jbe .L_do_copy1_mmx /* if (nbytes >= len) */
+
+ subl nbytes_r, len_r /* len -= nbytes */
+ rep movsb
+ movl window(%esp), from_r /* from = window */
+ movl write(%esp), nbytes_r /* nbytes = write */
+ cmpl nbytes_r, len_r
+ jbe .L_do_copy1_mmx /* if (nbytes >= len) */
+
+ subl nbytes_r, len_r /* len -= nbytes */
+ rep movsb
+ movl out_r, from_r
+ subl dist_r, from_r /* from = out - dist */
+ jmp .L_do_copy1_mmx
+
+.L_contiguous_in_window_mmx:
+#define write_r %eax
+ addl write_r, from_r
+ subl nbytes_r, from_r /* from += write - nbytes */
+#undef write_r
+
+ cmpl nbytes_r, len_r
+ jbe .L_do_copy1_mmx /* if (nbytes >= len) */
+
+ subl nbytes_r, len_r /* len -= nbytes */
+ rep movsb
+ movl out_r, from_r
+ subl dist_r, from_r /* from = out - dist */
+
+.L_do_copy1_mmx:
+#undef nbytes_r
+#define in_r %esi
+ movl len_r, %ecx
+ rep movsb
+
+ movl in(%esp), in_r /* move in back to %esi, toss from */
+ movl lcode(%esp), %ebx /* move lcode back to %ebx, toss dist */
+ jmp .L_while_test_mmx
+
+#undef hold_r
+#undef bitslong_r
+
+#endif /* USE_MMX || RUN_TIME_MMX */
+
+
+/*** USE_MMX, NO_MMX, and RUNTIME_MMX from here on ***/
+
+.L_invalid_distance_code:
+ /* else {
+ * strm->msg = "invalid distance code";
+ * state->mode = BAD;
+ * }
+ */
+ movl $.L_invalid_distance_code_msg, %ecx
+ movl $INFLATE_MODE_BAD, %edx
+ jmp .L_update_stream_state
+
+.L_test_for_end_of_block:
+ /* else if (op & 32) {
+ * state->mode = TYPE;
+ * break;
+ * }
+ */
+ testb $32, %al
+ jz .L_invalid_literal_length_code /* if ((op & 32) == 0) */
+
+ movl $0, %ecx
+ movl $INFLATE_MODE_TYPE, %edx
+ jmp .L_update_stream_state
+
+.L_invalid_literal_length_code:
+ /* else {
+ * strm->msg = "invalid literal/length code";
+ * state->mode = BAD;
+ * }
+ */
+ movl $.L_invalid_literal_length_code_msg, %ecx
+ movl $INFLATE_MODE_BAD, %edx
+ jmp .L_update_stream_state
+
+.L_invalid_distance_too_far:
+ /* strm->msg = "invalid distance too far back";
+ * state->mode = BAD;
+ */
+ movl in(%esp), in_r /* from_r has in's reg, put in back */
+ movl $.L_invalid_distance_too_far_msg, %ecx
+ movl $INFLATE_MODE_BAD, %edx
+ jmp .L_update_stream_state
+
+.L_update_stream_state:
+ /* set strm->msg = %ecx, strm->state->mode = %edx */
+ movl strm_sp(%esp), %eax
+ testl %ecx, %ecx /* if (msg != NULL) */
+ jz .L_skip_msg
+ movl %ecx, msg_strm(%eax) /* strm->msg = msg */
+.L_skip_msg:
+ movl state_strm(%eax), %eax /* state = strm->state */
+ movl %edx, mode_state(%eax) /* state->mode = edx (BAD | TYPE) */
+ jmp .L_break_loop
+
+.align 32,0x90
+.L_break_loop:
+
+/*
+ * Regs:
+ *
+ * bits = %ebp when mmx, and in %ebx when non-mmx
+ * hold = %hold_mm when mmx, and in %ebp when non-mmx
+ * in = %esi
+ * out = %edi
+ */
+
+#if defined( USE_MMX ) || defined( RUN_TIME_MMX )
+
+#if defined( RUN_TIME_MMX )
+
+ cmpl $DO_USE_MMX, inflate_fast_use_mmx
+ jne .L_update_next_in
+
+#endif /* RUN_TIME_MMX */
+
+ movl %ebp, %ebx
+
+.L_update_next_in:
+
+#endif
+
+#define strm_r %eax
+#define state_r %edx
+
+ /* len = bits >> 3;
+ * in -= len;
+ * bits -= len << 3;
+ * hold &= (1U << bits) - 1;
+ * state->hold = hold;
+ * state->bits = bits;
+ * strm->next_in = in;
+ * strm->next_out = out;
+ */
+ movl strm_sp(%esp), strm_r
+ movl %ebx, %ecx
+ movl state_strm(strm_r), state_r
+ shrl $3, %ecx
+ subl %ecx, in_r
+ shll $3, %ecx
+ subl %ecx, %ebx
+ movl out_r, next_out_strm(strm_r)
+ movl %ebx, bits_state(state_r)
+ movl %ebx, %ecx
+
+ leal buf(%esp), %ebx
+ cmpl %ebx, last(%esp)
+ jne .L_buf_not_used /* if buf != last */
+
+ subl %ebx, in_r /* in -= buf */
+ movl next_in_strm(strm_r), %ebx
+ movl %ebx, last(%esp) /* last = strm->next_in */
+ addl %ebx, in_r /* in += strm->next_in */
+ movl avail_in_strm(strm_r), %ebx
+ subl $11, %ebx
+ addl %ebx, last(%esp) /* last = &strm->next_in[ avail_in - 11 ] */
+
+.L_buf_not_used:
+ movl in_r, next_in_strm(strm_r)
+
+ movl $1, %ebx
+ shll %cl, %ebx
+ decl %ebx
+
+#if defined( USE_MMX ) || defined( RUN_TIME_MMX )
+
+#if defined( RUN_TIME_MMX )
+
+ cmpl $DO_USE_MMX, inflate_fast_use_mmx
+ jne .L_update_hold
+
+#endif /* RUN_TIME_MMX */
+
+ psrlq used_mm, hold_mm /* hold_mm >>= last bit length */
+ movd hold_mm, %ebp
+
+ emms
+
+.L_update_hold:
+
+#endif /* USE_MMX || RUN_TIME_MMX */
+
+ andl %ebx, %ebp
+ movl %ebp, hold_state(state_r)
+
+#define last_r %ebx
+
+ /* strm->avail_in = in < last ? 11 + (last - in) : 11 - (in - last) */
+ movl last(%esp), last_r
+ cmpl in_r, last_r
+ jbe .L_last_is_smaller /* if (in >= last) */
+
+ subl in_r, last_r /* last -= in */
+ addl $11, last_r /* last += 11 */
+ movl last_r, avail_in_strm(strm_r)
+ jmp .L_fixup_out
+.L_last_is_smaller:
+ subl last_r, in_r /* in -= last */
+ negl in_r /* in = -in */
+ addl $11, in_r /* in += 11 */
+ movl in_r, avail_in_strm(strm_r)
+
+#undef last_r
+#define end_r %ebx
+
+.L_fixup_out:
+ /* strm->avail_out = out < end ? 257 + (end - out) : 257 - (out - end)*/
+ movl end(%esp), end_r
+ cmpl out_r, end_r
+ jbe .L_end_is_smaller /* if (out >= end) */
+
+ subl out_r, end_r /* end -= out */
+ addl $257, end_r /* end += 257 */
+ movl end_r, avail_out_strm(strm_r)
+ jmp .L_done
+.L_end_is_smaller:
+ subl end_r, out_r /* out -= end */
+ negl out_r /* out = -out */
+ addl $257, out_r /* out += 257 */
+ movl out_r, avail_out_strm(strm_r)
+
+#undef end_r
+#undef strm_r
+#undef state_r
+
+.L_done:
+ addl $local_var_size, %esp
+ popf
+ popl %ebx
+ popl %ebp
+ popl %esi
+ popl %edi
+ ret
+
+#if defined( GAS_ELF )
+/* elf info */
+.type inflate_fast,@function
+.size inflate_fast,.-inflate_fast
+#endif
diff --git a/contrib/zlib/contrib/iostream/test.cpp b/contrib/zlib/contrib/iostream/test.cpp
new file mode 100644
index 000000000..7d265b3b5
--- /dev/null
+++ b/contrib/zlib/contrib/iostream/test.cpp
@@ -0,0 +1,24 @@
+
+#include "zfstream.h"
+
+int main() {
+
+ // Construct a stream object with this filebuffer. Anything sent
+ // to this stream will go to standard out.
+ gzofstream os( 1, ios::out );
+
+ // This text is getting compressed and sent to stdout.
+ // To prove this, run 'test | zcat'.
+ os << "Hello, Mommy" << endl;
+
+ os << setcompressionlevel( Z_NO_COMPRESSION );
+ os << "hello, hello, hi, ho!" << endl;
+
+ setcompressionlevel( os, Z_DEFAULT_COMPRESSION )
+ << "I'm compressing again" << endl;
+
+ os.close();
+
+ return 0;
+
+}
diff --git a/contrib/zlib/contrib/iostream/zfstream.cpp b/contrib/zlib/contrib/iostream/zfstream.cpp
new file mode 100644
index 000000000..d0cd85faa
--- /dev/null
+++ b/contrib/zlib/contrib/iostream/zfstream.cpp
@@ -0,0 +1,329 @@
+
+#include "zfstream.h"
+
+gzfilebuf::gzfilebuf() :
+ file(NULL),
+ mode(0),
+ own_file_descriptor(0)
+{ }
+
+gzfilebuf::~gzfilebuf() {
+
+ sync();
+ if ( own_file_descriptor )
+ close();
+
+}
+
+gzfilebuf *gzfilebuf::open( const char *name,
+ int io_mode ) {
+
+ if ( is_open() )
+ return NULL;
+
+ char char_mode[10];
+ char *p = char_mode;
+
+ if ( io_mode & ios::in ) {
+ mode = ios::in;
+ *p++ = 'r';
+ } else if ( io_mode & ios::app ) {
+ mode = ios::app;
+ *p++ = 'a';
+ } else {
+ mode = ios::out;
+ *p++ = 'w';
+ }
+
+ if ( io_mode & ios::binary ) {
+ mode |= ios::binary;
+ *p++ = 'b';
+ }
+
+ // Hard code the compression level
+ if ( io_mode & (ios::out|ios::app )) {
+ *p++ = '9';
+ }
+
+ // Put the end-of-string indicator
+ *p = '\0';
+
+ if ( (file = gzopen(name, char_mode)) == NULL )
+ return NULL;
+
+ own_file_descriptor = 1;
+
+ return this;
+
+}
+
+gzfilebuf *gzfilebuf::attach( int file_descriptor,
+ int io_mode ) {
+
+ if ( is_open() )
+ return NULL;
+
+ char char_mode[10];
+ char *p = char_mode;
+
+ if ( io_mode & ios::in ) {
+ mode = ios::in;
+ *p++ = 'r';
+ } else if ( io_mode & ios::app ) {
+ mode = ios::app;
+ *p++ = 'a';
+ } else {
+ mode = ios::out;
+ *p++ = 'w';
+ }
+
+ if ( io_mode & ios::binary ) {
+ mode |= ios::binary;
+ *p++ = 'b';
+ }
+
+ // Hard code the compression level
+ if ( io_mode & (ios::out|ios::app )) {
+ *p++ = '9';
+ }
+
+ // Put the end-of-string indicator
+ *p = '\0';
+
+ if ( (file = gzdopen(file_descriptor, char_mode)) == NULL )
+ return NULL;
+
+ own_file_descriptor = 0;
+
+ return this;
+
+}
+
+gzfilebuf *gzfilebuf::close() {
+
+ if ( is_open() ) {
+
+ sync();
+ gzclose( file );
+ file = NULL;
+
+ }
+
+ return this;
+
+}
+
+int gzfilebuf::setcompressionlevel( int comp_level ) {
+
+ return gzsetparams(file, comp_level, -2);
+
+}
+
+int gzfilebuf::setcompressionstrategy( int comp_strategy ) {
+
+ return gzsetparams(file, -2, comp_strategy);
+
+}
+
+
+streampos gzfilebuf::seekoff( streamoff off, ios::seek_dir dir, int which ) {
+
+ return streampos(EOF);
+
+}
+
+int gzfilebuf::underflow() {
+
+ // If the file hasn't been opened for reading, error.
+ if ( !is_open() || !(mode & ios::in) )
+ return EOF;
+
+ // if a buffer doesn't exists, allocate one.
+ if ( !base() ) {
+
+ if ( (allocate()) == EOF )
+ return EOF;
+ setp(0,0);
+
+ } else {
+
+ if ( in_avail() )
+ return (unsigned char) *gptr();
+
+ if ( out_waiting() ) {
+ if ( flushbuf() == EOF )
+ return EOF;
+ }
+
+ }
+
+ // Attempt to fill the buffer.
+
+ int result = fillbuf();
+ if ( result == EOF ) {
+ // disable get area
+ setg(0,0,0);
+ return EOF;
+ }
+
+ return (unsigned char) *gptr();
+
+}
+
+int gzfilebuf::overflow( int c ) {
+
+ if ( !is_open() || !(mode & ios::out) )
+ return EOF;
+
+ if ( !base() ) {
+ if ( allocate() == EOF )
+ return EOF;
+ setg(0,0,0);
+ } else {
+ if (in_avail()) {
+ return EOF;
+ }
+ if (out_waiting()) {
+ if (flushbuf() == EOF)
+ return EOF;
+ }
+ }
+
+ int bl = blen();
+ setp( base(), base() + bl);
+
+ if ( c != EOF ) {
+
+ *pptr() = c;
+ pbump(1);
+
+ }
+
+ return 0;
+
+}
+
+int gzfilebuf::sync() {
+
+ if ( !is_open() )
+ return EOF;
+
+ if ( out_waiting() )
+ return flushbuf();
+
+ return 0;
+
+}
+
+int gzfilebuf::flushbuf() {
+
+ int n;
+ char *q;
+
+ q = pbase();
+ n = pptr() - q;
+
+ if ( gzwrite( file, q, n) < n )
+ return EOF;
+
+ setp(0,0);
+
+ return 0;
+
+}
+
+int gzfilebuf::fillbuf() {
+
+ int required;
+ char *p;
+
+ p = base();
+
+ required = blen();
+
+ int t = gzread( file, p, required );
+
+ if ( t <= 0) return EOF;
+
+ setg( base(), base(), base()+t);
+
+ return t;
+
+}
+
+gzfilestream_common::gzfilestream_common() :
+ ios( gzfilestream_common::rdbuf() )
+{ }
+
+gzfilestream_common::~gzfilestream_common()
+{ }
+
+void gzfilestream_common::attach( int fd, int io_mode ) {
+
+ if ( !buffer.attach( fd, io_mode) )
+ clear( ios::failbit | ios::badbit );
+ else
+ clear();
+
+}
+
+void gzfilestream_common::open( const char *name, int io_mode ) {
+
+ if ( !buffer.open( name, io_mode ) )
+ clear( ios::failbit | ios::badbit );
+ else
+ clear();
+
+}
+
+void gzfilestream_common::close() {
+
+ if ( !buffer.close() )
+ clear( ios::failbit | ios::badbit );
+
+}
+
+gzfilebuf *gzfilestream_common::rdbuf()
+{
+ return &buffer;
+}
+
+gzifstream::gzifstream() :
+ ios( gzfilestream_common::rdbuf() )
+{
+ clear( ios::badbit );
+}
+
+gzifstream::gzifstream( const char *name, int io_mode ) :
+ ios( gzfilestream_common::rdbuf() )
+{
+ gzfilestream_common::open( name, io_mode );
+}
+
+gzifstream::gzifstream( int fd, int io_mode ) :
+ ios( gzfilestream_common::rdbuf() )
+{
+ gzfilestream_common::attach( fd, io_mode );
+}
+
+gzifstream::~gzifstream() { }
+
+gzofstream::gzofstream() :
+ ios( gzfilestream_common::rdbuf() )
+{
+ clear( ios::badbit );
+}
+
+gzofstream::gzofstream( const char *name, int io_mode ) :
+ ios( gzfilestream_common::rdbuf() )
+{
+ gzfilestream_common::open( name, io_mode );
+}
+
+gzofstream::gzofstream( int fd, int io_mode ) :
+ ios( gzfilestream_common::rdbuf() )
+{
+ gzfilestream_common::attach( fd, io_mode );
+}
+
+gzofstream::~gzofstream() { }
diff --git a/contrib/zlib/contrib/iostream/zfstream.h b/contrib/zlib/contrib/iostream/zfstream.h
new file mode 100644
index 000000000..ed79098a3
--- /dev/null
+++ b/contrib/zlib/contrib/iostream/zfstream.h
@@ -0,0 +1,128 @@
+
+#ifndef zfstream_h
+#define zfstream_h
+
+#include <fstream.h>
+#include "zlib.h"
+
+class gzfilebuf : public streambuf {
+
+public:
+
+ gzfilebuf( );
+ virtual ~gzfilebuf();
+
+ gzfilebuf *open( const char *name, int io_mode );
+ gzfilebuf *attach( int file_descriptor, int io_mode );
+ gzfilebuf *close();
+
+ int setcompressionlevel( int comp_level );
+ int setcompressionstrategy( int comp_strategy );
+
+ inline int is_open() const { return (file !=NULL); }
+
+ virtual streampos seekoff( streamoff, ios::seek_dir, int );
+
+ virtual int sync();
+
+protected:
+
+ virtual int underflow();
+ virtual int overflow( int = EOF );
+
+private:
+
+ gzFile file;
+ short mode;
+ short own_file_descriptor;
+
+ int flushbuf();
+ int fillbuf();
+
+};
+
+class gzfilestream_common : virtual public ios {
+
+ friend class gzifstream;
+ friend class gzofstream;
+ friend gzofstream &setcompressionlevel( gzofstream &, int );
+ friend gzofstream &setcompressionstrategy( gzofstream &, int );
+
+public:
+ virtual ~gzfilestream_common();
+
+ void attach( int fd, int io_mode );
+ void open( const char *name, int io_mode );
+ void close();
+
+protected:
+ gzfilestream_common();
+
+private:
+ gzfilebuf *rdbuf();
+
+ gzfilebuf buffer;
+
+};
+
+class gzifstream : public gzfilestream_common, public istream {
+
+public:
+
+ gzifstream();
+ gzifstream( const char *name, int io_mode = ios::in );
+ gzifstream( int fd, int io_mode = ios::in );
+
+ virtual ~gzifstream();
+
+};
+
+class gzofstream : public gzfilestream_common, public ostream {
+
+public:
+
+ gzofstream();
+ gzofstream( const char *name, int io_mode = ios::out );
+ gzofstream( int fd, int io_mode = ios::out );
+
+ virtual ~gzofstream();
+
+};
+
+template<class T> class gzomanip {
+ friend gzofstream &operator<<(gzofstream &, const gzomanip<T> &);
+public:
+ gzomanip(gzofstream &(*f)(gzofstream &, T), T v) : func(f), val(v) { }
+private:
+ gzofstream &(*func)(gzofstream &, T);
+ T val;
+};
+
+template<class T> gzofstream &operator<<(gzofstream &s, const gzomanip<T> &m)
+{
+ return (*m.func)(s, m.val);
+}
+
+inline gzofstream &setcompressionlevel( gzofstream &s, int l )
+{
+ (s.rdbuf())->setcompressionlevel(l);
+ return s;
+}
+
+inline gzofstream &setcompressionstrategy( gzofstream &s, int l )
+{
+ (s.rdbuf())->setcompressionstrategy(l);
+ return s;
+}
+
+inline gzomanip<int> setcompressionlevel(int l)
+{
+ return gzomanip<int>(&setcompressionlevel,l);
+}
+
+inline gzomanip<int> setcompressionstrategy(int l)
+{
+ return gzomanip<int>(&setcompressionstrategy,l);
+}
+
+#endif
diff --git a/contrib/zlib/contrib/iostream2/zstream.h b/contrib/zlib/contrib/iostream2/zstream.h
new file mode 100644
index 000000000..43d2332b7
--- /dev/null
+++ b/contrib/zlib/contrib/iostream2/zstream.h
@@ -0,0 +1,307 @@
+/*
+ *
+ * Copyright (c) 1997
+ * Christian Michelsen Research AS
+ * Advanced Computing
+ * Fantoftvegen 38, 5036 BERGEN, Norway
+ * http://www.cmr.no
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Christian Michelsen Research AS makes no
+ * representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied warranty.
+ *
+ */
+
+#ifndef ZSTREAM__H
+#define ZSTREAM__H
+
+/*
+ * zstream.h - C++ interface to the 'zlib' general purpose compression library
+ * $Id: zstream.h 1.1 1997-06-25 12:00:56+02 tyge Exp tyge $
+ */
+
+#include <strstream.h>
+#include <string.h>
+#include <stdio.h>
+#include "zlib.h"
+
+#if defined(_WIN32)
+# include <fcntl.h>
+# include <io.h>
+# define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
+#else
+# define SET_BINARY_MODE(file)
+#endif
+
+class zstringlen {
+public:
+ zstringlen(class izstream&);
+ zstringlen(class ozstream&, const char*);
+ size_t value() const { return val.word; }
+private:
+ struct Val { unsigned char byte; size_t word; } val;
+};
+
+// ----------------------------- izstream -----------------------------
+
+class izstream
+{
+ public:
+ izstream() : m_fp(0) {}
+ izstream(FILE* fp) : m_fp(0) { open(fp); }
+ izstream(const char* name) : m_fp(0) { open(name); }
+ ~izstream() { close(); }
+
+ /* Opens a gzip (.gz) file for reading.
+ * open() can be used to read a file which is not in gzip format;
+ * in this case read() will directly read from the file without
+ * decompression. errno can be checked to distinguish two error
+ * cases (if errno is zero, the zlib error is Z_MEM_ERROR).
+ */
+ void open(const char* name) {
+ if (m_fp) close();
+ m_fp = ::gzopen(name, "rb");
+ }
+
+ void open(FILE* fp) {
+ SET_BINARY_MODE(fp);
+ if (m_fp) close();
+ m_fp = ::gzdopen(fileno(fp), "rb");
+ }
+
+ /* Flushes all pending input if necessary, closes the compressed file
+ * and deallocates all the (de)compression state. The return value is
+ * the zlib error number (see function error() below).
+ */
+ int close() {
+ int r = ::gzclose(m_fp);
+ m_fp = 0; return r;
+ }
+
+ /* Binary read the given number of bytes from the compressed file.
+ */
+ int read(void* buf, size_t len) {
+ return ::gzread(m_fp, buf, len);
+ }
+
+ /* Returns the error message for the last error which occurred on the
+ * given compressed file. errnum is set to zlib error number. If an
+ * error occurred in the file system and not in the compression library,
+ * errnum is set to Z_ERRNO and the application may consult errno
+ * to get the exact error code.
+ */
+ const char* error(int* errnum) {
+ return ::gzerror(m_fp, errnum);
+ }
+
+ gzFile fp() { return m_fp; }
+
+ private:
+ gzFile m_fp;
+};
+
+/*
+ * Binary read the given (array of) object(s) from the compressed file.
+ * If the input file was not in gzip format, read() copies the objects number
+ * of bytes into the buffer.
+ * returns the number of uncompressed bytes actually read
+ * (0 for end of file, -1 for error).
+ */
+template <class T, class Items>
+inline int read(izstream& zs, T* x, Items items) {
+ return ::gzread(zs.fp(), x, items*sizeof(T));
+}
+
+/*
+ * Binary input with the '>' operator.
+ */
+template <class T>
+inline izstream& operator>(izstream& zs, T& x) {
+ ::gzread(zs.fp(), &x, sizeof(T));
+ return zs;
+}
+
+
+inline zstringlen::zstringlen(izstream& zs) {
+ zs > val.byte;
+ if (val.byte == 255) zs > val.word;
+ else val.word = val.byte;
+}
+
+/*
+ * Read length of string + the string with the '>' operator.
+ */
+inline izstream& operator>(izstream& zs, char* x) {
+ zstringlen len(zs);
+ ::gzread(zs.fp(), x, len.value());
+ x[len.value()] = '\0';
+ return zs;
+}
+
+inline char* read_string(izstream& zs) {
+ zstringlen len(zs);
+ char* x = new char[len.value()+1];
+ ::gzread(zs.fp(), x, len.value());
+ x[len.value()] = '\0';
+ return x;
+}
+
+// ----------------------------- ozstream -----------------------------
+
+class ozstream
+{
+ public:
+ ozstream() : m_fp(0), m_os(0) {
+ }
+ ozstream(FILE* fp, int level = Z_DEFAULT_COMPRESSION)
+ : m_fp(0), m_os(0) {
+ open(fp, level);
+ }
+ ozstream(const char* name, int level = Z_DEFAULT_COMPRESSION)
+ : m_fp(0), m_os(0) {
+ open(name, level);
+ }
+ ~ozstream() {
+ close();
+ }
+
+ /* Opens a gzip (.gz) file for writing.
+ * The compression level parameter should be in 0..9
+ * errno can be checked to distinguish two error cases
+ * (if errno is zero, the zlib error is Z_MEM_ERROR).
+ */
+ void open(const char* name, int level = Z_DEFAULT_COMPRESSION) {
+ char mode[4] = "wb\0";
+ if (level != Z_DEFAULT_COMPRESSION) mode[2] = '0'+level;
+ if (m_fp) close();
+ m_fp = ::gzopen(name, mode);
+ }
+
+ /* open from a FILE pointer.
+ */
+ void open(FILE* fp, int level = Z_DEFAULT_COMPRESSION) {
+ SET_BINARY_MODE(fp);
+ char mode[4] = "wb\0";
+ if (level != Z_DEFAULT_COMPRESSION) mode[2] = '0'+level;
+ if (m_fp) close();
+ m_fp = ::gzdopen(fileno(fp), mode);
+ }
+
+ /* Flushes all pending output if necessary, closes the compressed file
+ * and deallocates all the (de)compression state. The return value is
+ * the zlib error number (see function error() below).
+ */
+ int close() {
+ if (m_os) {
+ ::gzwrite(m_fp, m_os->str(), m_os->pcount());
+ delete[] m_os->str(); delete m_os; m_os = 0;
+ }
+ int r = ::gzclose(m_fp); m_fp = 0; return r;
+ }
+
+ /* Binary write the given number of bytes into the compressed file.
+ */
+ int write(const void* buf, size_t len) {
+ return ::gzwrite(m_fp, (voidp) buf, len);
+ }
+
+ /* Flushes all pending output into the compressed file. The parameter
+ * _flush is as in the deflate() function. The return value is the zlib
+ * error number (see function gzerror below). flush() returns Z_OK if
+ * the flush_ parameter is Z_FINISH and all output could be flushed.
+ * flush() should be called only when strictly necessary because it can
+ * degrade compression.
+ */
+ int flush(int _flush) {
+ os_flush();
+ return ::gzflush(m_fp, _flush);
+ }
+
+ /* Returns the error message for the last error which occurred on the
+ * given compressed file. errnum is set to zlib error number. If an
+ * error occurred in the file system and not in the compression library,
+ * errnum is set to Z_ERRNO and the application may consult errno
+ * to get the exact error code.
+ */
+ const char* error(int* errnum) {
+ return ::gzerror(m_fp, errnum);
+ }
+
+ gzFile fp() { return m_fp; }
+
+ ostream& os() {
+ if (m_os == 0) m_os = new ostrstream;
+ return *m_os;
+ }
+
+ void os_flush() {
+ if (m_os && m_os->pcount()>0) {
+ ostrstream* oss = new ostrstream;
+ oss->fill(m_os->fill());
+ oss->flags(m_os->flags());
+ oss->precision(m_os->precision());
+ oss->width(m_os->width());
+ ::gzwrite(m_fp, m_os->str(), m_os->pcount());
+ delete[] m_os->str(); delete m_os; m_os = oss;
+ }
+ }
+
+ private:
+ gzFile m_fp;
+ ostrstream* m_os;
+};
+
+/*
+ * Binary write the given (array of) object(s) into the compressed file.
+ * returns the number of uncompressed bytes actually written
+ * (0 in case of error).
+ */
+template <class T, class Items>
+inline int write(ozstream& zs, const T* x, Items items) {
+ return ::gzwrite(zs.fp(), (voidp) x, items*sizeof(T));
+}
+
+/*
+ * Binary output with the '<' operator.
+ */
+template <class T>
+inline ozstream& operator<(ozstream& zs, const T& x) {
+ ::gzwrite(zs.fp(), (voidp) &x, sizeof(T));
+ return zs;
+}
+
+inline zstringlen::zstringlen(ozstream& zs, const char* x) {
+ val.byte = 255; val.word = ::strlen(x);
+ if (val.word < 255) zs < (val.byte = val.word);
+ else zs < val;
+}
+
+/*
+ * Write length of string + the string with the '<' operator.
+ */
+inline ozstream& operator<(ozstream& zs, const char* x) {
+ zstringlen len(zs, x);
+ ::gzwrite(zs.fp(), (voidp) x, len.value());
+ return zs;
+}
+
+#ifdef _MSC_VER
+inline ozstream& operator<(ozstream& zs, char* const& x) {
+ return zs < (const char*) x;
+}
+#endif
+
+/*
+ * Ascii write with the << operator;
+ */
+template <class T>
+inline ostream& operator<<(ozstream& zs, const T& x) {
+ zs.os_flush();
+ return zs.os() << x;
+}
+
+#endif
diff --git a/contrib/zlib/contrib/iostream2/zstream_test.cpp b/contrib/zlib/contrib/iostream2/zstream_test.cpp
new file mode 100644
index 000000000..6273f62d6
--- /dev/null
+++ b/contrib/zlib/contrib/iostream2/zstream_test.cpp
@@ -0,0 +1,25 @@
+#include "zstream.h"
+#include <math.h>
+#include <stdlib.h>
+#include <iomanip.h>
+
+void main() {
+ char h[256] = "Hello";
+ char* g = "Goodbye";
+ ozstream out("temp.gz");
+ out < "This works well" < h < g;
+ out.close();
+
+ izstream in("temp.gz"); // read it back
+ char *x = read_string(in), *y = new char[256], z[256];
+ in > y > z;
+ in.close();
+ cout << x << endl << y << endl << z << endl;
+
+ out.open("temp.gz"); // try ascii output; zcat temp.gz to see the results
+ out << setw(50) << setfill('#') << setprecision(20) << x << endl << y << endl << z << endl;
+ out << z << endl << y << endl << x << endl;
+ out << 1.1234567890123456789 << endl;
+
+ delete[] x; delete[] y;
+}
diff --git a/contrib/zlib/contrib/iostream3/README b/contrib/zlib/contrib/iostream3/README
new file mode 100644
index 000000000..f7b319ab9
--- /dev/null
+++ b/contrib/zlib/contrib/iostream3/README
@@ -0,0 +1,35 @@
+These classes provide a C++ stream interface to the zlib library. It allows you
+to do things like:
+
+ gzofstream outf("blah.gz");
+ outf << "These go into the gzip file " << 123 << endl;
+
+It does this by deriving a specialized stream buffer for gzipped files, which is
+the way Stroustrup would have done it. :->
+
+The gzifstream and gzofstream classes were originally written by Kevin Ruland
+and made available in the zlib contrib/iostream directory. The older version still
+compiles under gcc 2.xx, but not under gcc 3.xx, which sparked the development of
+this version.
+
+The new classes are as standard-compliant as possible, closely following the
+approach of the standard library's fstream classes. It compiles under gcc versions
+3.2 and 3.3, but not under gcc 2.xx. This is mainly due to changes in the standard
+library naming scheme. The new version of gzifstream/gzofstream/gzfilebuf differs
+from the previous one in the following respects:
+- added showmanyc
+- added setbuf, with support for unbuffered output via setbuf(0,0)
+- a few bug fixes of stream behavior
+- gzipped output file opened with default compression level instead of maximum level
+- setcompressionlevel()/strategy() members replaced by single setcompression()
+
+The code is provided "as is", with the permission to use, copy, modify, distribute
+and sell it for any purpose without fee.
+
+Ludwig Schwardt
+<schwardt@sun.ac.za>
+
+DSP Lab
+Electrical & Electronic Engineering Department
+University of Stellenbosch
+South Africa
diff --git a/contrib/zlib/contrib/iostream3/TODO b/contrib/zlib/contrib/iostream3/TODO
new file mode 100644
index 000000000..7032f97be
--- /dev/null
+++ b/contrib/zlib/contrib/iostream3/TODO
@@ -0,0 +1,17 @@
+Possible upgrades to gzfilebuf:
+
+- The ability to do putback (e.g. putbackfail)
+
+- The ability to seek (zlib supports this, but could be slow/tricky)
+
+- Simultaneous read/write access (does it make sense?)
+
+- Support for ios_base::ate open mode
+
+- Locale support?
+
+- Check public interface to see which calls give problems
+ (due to dependence on library internals)
+
+- Override operator<<(ostream&, gzfilebuf*) to allow direct copying
+ of stream buffer to stream ( i.e. os << is.rdbuf(); )
diff --git a/contrib/zlib/contrib/iostream3/test.cc b/contrib/zlib/contrib/iostream3/test.cc
new file mode 100644
index 000000000..94235334f
--- /dev/null
+++ b/contrib/zlib/contrib/iostream3/test.cc
@@ -0,0 +1,50 @@
+/*
+ * Test program for gzifstream and gzofstream
+ *
+ * by Ludwig Schwardt <schwardt@sun.ac.za>
+ * original version by Kevin Ruland <kevin@rodin.wustl.edu>
+ */
+
+#include "zfstream.h"
+#include <iostream> // for cout
+
+int main() {
+
+ gzofstream outf;
+ gzifstream inf;
+ char buf[80];
+
+ outf.open("test1.txt.gz");
+ outf << "The quick brown fox sidestepped the lazy canine\n"
+ << 1.3 << "\nPlan " << 9 << std::endl;
+ outf.close();
+ std::cout << "Wrote the following message to 'test1.txt.gz' (check with zcat or zless):\n"
+ << "The quick brown fox sidestepped the lazy canine\n"
+ << 1.3 << "\nPlan " << 9 << std::endl;
+
+ std::cout << "\nReading 'test1.txt.gz' (buffered) produces:\n";
+ inf.open("test1.txt.gz");
+ while (inf.getline(buf,80,'\n')) {
+ std::cout << buf << "\t(" << inf.rdbuf()->in_avail() << " chars left in buffer)\n";
+ }
+ inf.close();
+
+ outf.rdbuf()->pubsetbuf(0,0);
+ outf.open("test2.txt.gz");
+ outf << setcompression(Z_NO_COMPRESSION)
+ << "The quick brown fox sidestepped the lazy canine\n"
+ << 1.3 << "\nPlan " << 9 << std::endl;
+ outf.close();
+ std::cout << "\nWrote the same message to 'test2.txt.gz' in uncompressed form";
+
+ std::cout << "\nReading 'test2.txt.gz' (unbuffered) produces:\n";
+ inf.rdbuf()->pubsetbuf(0,0);
+ inf.open("test2.txt.gz");
+ while (inf.getline(buf,80,'\n')) {
+ std::cout << buf << "\t(" << inf.rdbuf()->in_avail() << " chars left in buffer)\n";
+ }
+ inf.close();
+
+ return 0;
+
+}
diff --git a/contrib/zlib/contrib/iostream3/zfstream.cc b/contrib/zlib/contrib/iostream3/zfstream.cc
new file mode 100644
index 000000000..94eb93344
--- /dev/null
+++ b/contrib/zlib/contrib/iostream3/zfstream.cc
@@ -0,0 +1,479 @@
+/*
+ * A C++ I/O streams interface to the zlib gz* functions
+ *
+ * by Ludwig Schwardt <schwardt@sun.ac.za>
+ * original version by Kevin Ruland <kevin@rodin.wustl.edu>
+ *
+ * This version is standard-compliant and compatible with gcc 3.x.
+ */
+
+#include "zfstream.h"
+#include <cstring> // for strcpy, strcat, strlen (mode strings)
+#include <cstdio> // for BUFSIZ
+
+// Internal buffer sizes (default and "unbuffered" versions)
+#define BIGBUFSIZE BUFSIZ
+#define SMALLBUFSIZE 1
+
+/*****************************************************************************/
+
+// Default constructor
+gzfilebuf::gzfilebuf()
+: file(NULL), io_mode(std::ios_base::openmode(0)), own_fd(false),
+ buffer(NULL), buffer_size(BIGBUFSIZE), own_buffer(true)
+{
+ // No buffers to start with
+ this->disable_buffer();
+}
+
+// Destructor
+gzfilebuf::~gzfilebuf()
+{
+ // Sync output buffer and close only if responsible for file
+ // (i.e. attached streams should be left open at this stage)
+ this->sync();
+ if (own_fd)
+ this->close();
+ // Make sure internal buffer is deallocated
+ this->disable_buffer();
+}
+
+// Set compression level and strategy
+int
+gzfilebuf::setcompression(int comp_level,
+ int comp_strategy)
+{
+ return gzsetparams(file, comp_level, comp_strategy);
+}
+
+// Open gzipped file
+gzfilebuf*
+gzfilebuf::open(const char *name,
+ std::ios_base::openmode mode)
+{
+ // Fail if file already open
+ if (this->is_open())
+ return NULL;
+ // Don't support simultaneous read/write access (yet)
+ if ((mode & std::ios_base::in) && (mode & std::ios_base::out))
+ return NULL;
+
+ // Build mode string for gzopen and check it [27.8.1.3.2]
+ char char_mode[6] = "\0\0\0\0\0";
+ if (!this->open_mode(mode, char_mode))
+ return NULL;
+
+ // Attempt to open file
+ if ((file = gzopen(name, char_mode)) == NULL)
+ return NULL;
+
+ // On success, allocate internal buffer and set flags
+ this->enable_buffer();
+ io_mode = mode;
+ own_fd = true;
+ return this;
+}
+
+// Attach to gzipped file
+gzfilebuf*
+gzfilebuf::attach(int fd,
+ std::ios_base::openmode mode)
+{
+ // Fail if file already open
+ if (this->is_open())
+ return NULL;
+ // Don't support simultaneous read/write access (yet)
+ if ((mode & std::ios_base::in) && (mode & std::ios_base::out))
+ return NULL;
+
+ // Build mode string for gzdopen and check it [27.8.1.3.2]
+ char char_mode[6] = "\0\0\0\0\0";
+ if (!this->open_mode(mode, char_mode))
+ return NULL;
+
+ // Attempt to attach to file
+ if ((file = gzdopen(fd, char_mode)) == NULL)
+ return NULL;
+
+ // On success, allocate internal buffer and set flags
+ this->enable_buffer();
+ io_mode = mode;
+ own_fd = false;
+ return this;
+}
+
+// Close gzipped file
+gzfilebuf*
+gzfilebuf::close()
+{
+ // Fail immediately if no file is open
+ if (!this->is_open())
+ return NULL;
+ // Assume success
+ gzfilebuf* retval = this;
+ // Attempt to sync and close gzipped file
+ if (this->sync() == -1)
+ retval = NULL;
+ if (gzclose(file) < 0)
+ retval = NULL;
+ // File is now gone anyway (postcondition [27.8.1.3.8])
+ file = NULL;
+ own_fd = false;
+ // Destroy internal buffer if it exists
+ this->disable_buffer();
+ return retval;
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+// Convert int open mode to mode string
+bool
+gzfilebuf::open_mode(std::ios_base::openmode mode,
+ char* c_mode) const
+{
+ bool testb = mode & std::ios_base::binary;
+ bool testi = mode & std::ios_base::in;
+ bool testo = mode & std::ios_base::out;
+ bool testt = mode & std::ios_base::trunc;
+ bool testa = mode & std::ios_base::app;
+
+ // Check for valid flag combinations - see [27.8.1.3.2] (Table 92)
+ // Original zfstream hardcoded the compression level to maximum here...
+ // Double the time for less than 1% size improvement seems
+ // excessive though - keeping it at the default level
+ // To change back, just append "9" to the next three mode strings
+ if (!testi && testo && !testt && !testa)
+ strcpy(c_mode, "w");
+ if (!testi && testo && !testt && testa)
+ strcpy(c_mode, "a");
+ if (!testi && testo && testt && !testa)
+ strcpy(c_mode, "w");
+ if (testi && !testo && !testt && !testa)
+ strcpy(c_mode, "r");
+ // No read/write mode yet
+// if (testi && testo && !testt && !testa)
+// strcpy(c_mode, "r+");
+// if (testi && testo && testt && !testa)
+// strcpy(c_mode, "w+");
+
+ // Mode string should be empty for invalid combination of flags
+ if (strlen(c_mode) == 0)
+ return false;
+ if (testb)
+ strcat(c_mode, "b");
+ return true;
+}
+
+// Determine number of characters in internal get buffer
+std::streamsize
+gzfilebuf::showmanyc()
+{
+ // Calls to underflow will fail if file not opened for reading
+ if (!this->is_open() || !(io_mode & std::ios_base::in))
+ return -1;
+ // Make sure get area is in use
+ if (this->gptr() && (this->gptr() < this->egptr()))
+ return std::streamsize(this->egptr() - this->gptr());
+ else
+ return 0;
+}
+
+// Fill get area from gzipped file
+gzfilebuf::int_type
+gzfilebuf::underflow()
+{
+ // If something is left in the get area by chance, return it
+ // (this shouldn't normally happen, as underflow is only supposed
+ // to be called when gptr >= egptr, but it serves as error check)
+ if (this->gptr() && (this->gptr() < this->egptr()))
+ return traits_type::to_int_type(*(this->gptr()));
+
+ // If the file hasn't been opened for reading, produce error
+ if (!this->is_open() || !(io_mode & std::ios_base::in))
+ return traits_type::eof();
+
+ // Attempt to fill internal buffer from gzipped file
+ // (buffer must be guaranteed to exist...)
+ int bytes_read = gzread(file, buffer, buffer_size);
+ // Indicates error or EOF
+ if (bytes_read <= 0)
+ {
+ // Reset get area
+ this->setg(buffer, buffer, buffer);
+ return traits_type::eof();
+ }
+ // Make all bytes read from file available as get area
+ this->setg(buffer, buffer, buffer + bytes_read);
+
+ // Return next character in get area
+ return traits_type::to_int_type(*(this->gptr()));
+}
+
+// Write put area to gzipped file
+gzfilebuf::int_type
+gzfilebuf::overflow(int_type c)
+{
+ // Determine whether put area is in use
+ if (this->pbase())
+ {
+ // Double-check pointer range
+ if (this->pptr() > this->epptr() || this->pptr() < this->pbase())
+ return traits_type::eof();
+ // Add extra character to buffer if not EOF
+ if (!traits_type::eq_int_type(c, traits_type::eof()))
+ {
+ *(this->pptr()) = traits_type::to_char_type(c);
+ this->pbump(1);
+ }
+ // Number of characters to write to file
+ int bytes_to_write = this->pptr() - this->pbase();
+ // Overflow doesn't fail if nothing is to be written
+ if (bytes_to_write > 0)
+ {
+ // If the file hasn't been opened for writing, produce error
+ if (!this->is_open() || !(io_mode & std::ios_base::out))
+ return traits_type::eof();
+ // If gzipped file won't accept all bytes written to it, fail
+ if (gzwrite(file, this->pbase(), bytes_to_write) != bytes_to_write)
+ return traits_type::eof();
+ // Reset next pointer to point to pbase on success
+ this->pbump(-bytes_to_write);
+ }
+ }
+ // Write extra character to file if not EOF
+ else if (!traits_type::eq_int_type(c, traits_type::eof()))
+ {
+ // If the file hasn't been opened for writing, produce error
+ if (!this->is_open() || !(io_mode & std::ios_base::out))
+ return traits_type::eof();
+ // Impromptu char buffer (allows "unbuffered" output)
+ char_type last_char = traits_type::to_char_type(c);
+ // If gzipped file won't accept this character, fail
+ if (gzwrite(file, &last_char, 1) != 1)
+ return traits_type::eof();
+ }
+
+ // If you got here, you have succeeded (even if c was EOF)
+ // The return value should therefore be non-EOF
+ if (traits_type::eq_int_type(c, traits_type::eof()))
+ return traits_type::not_eof(c);
+ else
+ return c;
+}
+
+// Assign new buffer
+std::streambuf*
+gzfilebuf::setbuf(char_type* p,
+ std::streamsize n)
+{
+ // First make sure stuff is sync'ed, for safety
+ if (this->sync() == -1)
+ return NULL;
+ // If buffering is turned off on purpose via setbuf(0,0), still allocate one...
+ // "Unbuffered" only really refers to put [27.8.1.4.10], while get needs at
+ // least a buffer of size 1 (very inefficient though, therefore make it bigger?)
+ // This follows from [27.5.2.4.3]/12 (gptr needs to point at something, it seems)
+ if (!p || !n)
+ {
+ // Replace existing buffer (if any) with small internal buffer
+ this->disable_buffer();
+ buffer = NULL;
+ buffer_size = 0;
+ own_buffer = true;
+ this->enable_buffer();
+ }
+ else
+ {
+ // Replace existing buffer (if any) with external buffer
+ this->disable_buffer();
+ buffer = p;
+ buffer_size = n;
+ own_buffer = false;
+ this->enable_buffer();
+ }
+ return this;
+}
+
+// Write put area to gzipped file (i.e. ensures that put area is empty)
+int
+gzfilebuf::sync()
+{
+ return traits_type::eq_int_type(this->overflow(), traits_type::eof()) ? -1 : 0;
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+// Allocate internal buffer
+void
+gzfilebuf::enable_buffer()
+{
+ // If internal buffer required, allocate one
+ if (own_buffer && !buffer)
+ {
+ // Check for buffered vs. "unbuffered"
+ if (buffer_size > 0)
+ {
+ // Allocate internal buffer
+ buffer = new char_type[buffer_size];
+ // Get area starts empty and will be expanded by underflow as need arises
+ this->setg(buffer, buffer, buffer);
+ // Setup entire internal buffer as put area.
+ // The one-past-end pointer actually points to the last element of the buffer,
+ // so that overflow(c) can safely add the extra character c to the sequence.
+ // These pointers remain in place for the duration of the buffer
+ this->setp(buffer, buffer + buffer_size - 1);
+ }
+ else
+ {
+ // Even in "unbuffered" case, (small?) get buffer is still required
+ buffer_size = SMALLBUFSIZE;
+ buffer = new char_type[buffer_size];
+ this->setg(buffer, buffer, buffer);
+ // "Unbuffered" means no put buffer
+ this->setp(0, 0);
+ }
+ }
+ else
+ {
+ // If buffer already allocated, reset buffer pointers just to make sure no
+ // stale chars are lying around
+ this->setg(buffer, buffer, buffer);
+ this->setp(buffer, buffer + buffer_size - 1);
+ }
+}
+
+// Destroy internal buffer
+void
+gzfilebuf::disable_buffer()
+{
+ // If internal buffer exists, deallocate it
+ if (own_buffer && buffer)
+ {
+ // Preserve unbuffered status by zeroing size
+ if (!this->pbase())
+ buffer_size = 0;
+ delete[] buffer;
+ buffer = NULL;
+ this->setg(0, 0, 0);
+ this->setp(0, 0);
+ }
+ else
+ {
+ // Reset buffer pointers to initial state if external buffer exists
+ this->setg(buffer, buffer, buffer);
+ if (buffer)
+ this->setp(buffer, buffer + buffer_size - 1);
+ else
+ this->setp(0, 0);
+ }
+}
+
+/*****************************************************************************/
+
+// Default constructor initializes stream buffer
+gzifstream::gzifstream()
+: std::istream(NULL), sb()
+{ this->init(&sb); }
+
+// Initialize stream buffer and open file
+gzifstream::gzifstream(const char* name,
+ std::ios_base::openmode mode)
+: std::istream(NULL), sb()
+{
+ this->init(&sb);
+ this->open(name, mode);
+}
+
+// Initialize stream buffer and attach to file
+gzifstream::gzifstream(int fd,
+ std::ios_base::openmode mode)
+: std::istream(NULL), sb()
+{
+ this->init(&sb);
+ this->attach(fd, mode);
+}
+
+// Open file and go into fail() state if unsuccessful
+void
+gzifstream::open(const char* name,
+ std::ios_base::openmode mode)
+{
+ if (!sb.open(name, mode | std::ios_base::in))
+ this->setstate(std::ios_base::failbit);
+ else
+ this->clear();
+}
+
+// Attach to file and go into fail() state if unsuccessful
+void
+gzifstream::attach(int fd,
+ std::ios_base::openmode mode)
+{
+ if (!sb.attach(fd, mode | std::ios_base::in))
+ this->setstate(std::ios_base::failbit);
+ else
+ this->clear();
+}
+
+// Close file
+void
+gzifstream::close()
+{
+ if (!sb.close())
+ this->setstate(std::ios_base::failbit);
+}
+
+/*****************************************************************************/
+
+// Default constructor initializes stream buffer
+gzofstream::gzofstream()
+: std::ostream(NULL), sb()
+{ this->init(&sb); }
+
+// Initialize stream buffer and open file
+gzofstream::gzofstream(const char* name,
+ std::ios_base::openmode mode)
+: std::ostream(NULL), sb()
+{
+ this->init(&sb);
+ this->open(name, mode);
+}
+
+// Initialize stream buffer and attach to file
+gzofstream::gzofstream(int fd,
+ std::ios_base::openmode mode)
+: std::ostream(NULL), sb()
+{
+ this->init(&sb);
+ this->attach(fd, mode);
+}
+
+// Open file and go into fail() state if unsuccessful
+void
+gzofstream::open(const char* name,
+ std::ios_base::openmode mode)
+{
+ if (!sb.open(name, mode | std::ios_base::out))
+ this->setstate(std::ios_base::failbit);
+ else
+ this->clear();
+}
+
+// Attach to file and go into fail() state if unsuccessful
+void
+gzofstream::attach(int fd,
+ std::ios_base::openmode mode)
+{
+ if (!sb.attach(fd, mode | std::ios_base::out))
+ this->setstate(std::ios_base::failbit);
+ else
+ this->clear();
+}
+
+// Close file
+void
+gzofstream::close()
+{
+ if (!sb.close())
+ this->setstate(std::ios_base::failbit);
+}
diff --git a/contrib/zlib/contrib/iostream3/zfstream.h b/contrib/zlib/contrib/iostream3/zfstream.h
new file mode 100644
index 000000000..8574479ae
--- /dev/null
+++ b/contrib/zlib/contrib/iostream3/zfstream.h
@@ -0,0 +1,466 @@
+/*
+ * A C++ I/O streams interface to the zlib gz* functions
+ *
+ * by Ludwig Schwardt <schwardt@sun.ac.za>
+ * original version by Kevin Ruland <kevin@rodin.wustl.edu>
+ *
+ * This version is standard-compliant and compatible with gcc 3.x.
+ */
+
+#ifndef ZFSTREAM_H
+#define ZFSTREAM_H
+
+#include <istream> // not iostream, since we don't need cin/cout
+#include <ostream>
+#include "zlib.h"
+
+/*****************************************************************************/
+
+/**
+ * @brief Gzipped file stream buffer class.
+ *
+ * This class implements basic_filebuf for gzipped files. It doesn't yet support
+ * seeking (allowed by zlib but slow/limited), putback and read/write access
+ * (tricky). Otherwise, it attempts to be a drop-in replacement for the standard
+ * file streambuf.
+*/
+class gzfilebuf : public std::streambuf
+{
+public:
+ // Default constructor.
+ gzfilebuf();
+
+ // Destructor.
+ virtual
+ ~gzfilebuf();
+
+ /**
+ * @brief Set compression level and strategy on the fly.
+ * @param comp_level Compression level (see zlib.h for allowed values)
+ * @param comp_strategy Compression strategy (see zlib.h for allowed values)
+ * @return Z_OK on success, Z_STREAM_ERROR otherwise.
+ *
+ * Unfortunately, these parameters cannot be modified separately, as the
+ * previous zfstream version assumed. Since the strategy is seldom changed,
+ * it can default and setcompression(level) then becomes like the old
+ * setcompressionlevel(level).
+ */
+ int
+ setcompression(int comp_level,
+ int comp_strategy = Z_DEFAULT_STRATEGY);
+
+ /**
+ * @brief Check if file is open.
+ * @return True if file is open.
+ */
+ bool
+ is_open() const { return (file != NULL); }
+
+ /**
+ * @brief Open gzipped file.
+ * @param name File name.
+ * @param mode Open mode flags.
+ * @return @c this on success, NULL on failure.
+ */
+ gzfilebuf*
+ open(const char* name,
+ std::ios_base::openmode mode);
+
+ /**
+ * @brief Attach to already open gzipped file.
+ * @param fd File descriptor.
+ * @param mode Open mode flags.
+ * @return @c this on success, NULL on failure.
+ */
+ gzfilebuf*
+ attach(int fd,
+ std::ios_base::openmode mode);
+
+ /**
+ * @brief Close gzipped file.
+ * @return @c this on success, NULL on failure.
+ */
+ gzfilebuf*
+ close();
+
+protected:
+ /**
+ * @brief Convert ios open mode int to mode string used by zlib.
+ * @return True if valid mode flag combination.
+ */
+ bool
+ open_mode(std::ios_base::openmode mode,
+ char* c_mode) const;
+
+ /**
+ * @brief Number of characters available in stream buffer.
+ * @return Number of characters.
+ *
+ * This indicates number of characters in get area of stream buffer.
+ * These characters can be read without accessing the gzipped file.
+ */
+ virtual std::streamsize
+ showmanyc();
+
+ /**
+ * @brief Fill get area from gzipped file.
+ * @return First character in get area on success, EOF on error.
+ *
+ * This actually reads characters from gzipped file to stream
+ * buffer. Always buffered.
+ */
+ virtual int_type
+ underflow();
+
+ /**
+ * @brief Write put area to gzipped file.
+ * @param c Extra character to add to buffer contents.
+ * @return Non-EOF on success, EOF on error.
+ *
+ * This actually writes characters in stream buffer to
+ * gzipped file. With unbuffered output this is done one
+ * character at a time.
+ */
+ virtual int_type
+ overflow(int_type c = traits_type::eof());
+
+ /**
+ * @brief Installs external stream buffer.
+ * @param p Pointer to char buffer.
+ * @param n Size of external buffer.
+ * @return @c this on success, NULL on failure.
+ *
+ * Call setbuf(0,0) to enable unbuffered output.
+ */
+ virtual std::streambuf*
+ setbuf(char_type* p,
+ std::streamsize n);
+
+ /**
+ * @brief Flush stream buffer to file.
+ * @return 0 on success, -1 on error.
+ *
+ * This calls underflow(EOF) to do the job.
+ */
+ virtual int
+ sync();
+
+//
+// Some future enhancements
+//
+// virtual int_type uflow();
+// virtual int_type pbackfail(int_type c = traits_type::eof());
+// virtual pos_type
+// seekoff(off_type off,
+// std::ios_base::seekdir way,
+// std::ios_base::openmode mode = std::ios_base::in|std::ios_base::out);
+// virtual pos_type
+// seekpos(pos_type sp,
+// std::ios_base::openmode mode = std::ios_base::in|std::ios_base::out);
+
+private:
+ /**
+ * @brief Allocate internal buffer.
+ *
+ * This function is safe to call multiple times. It will ensure
+ * that a proper internal buffer exists if it is required. If the
+ * buffer already exists or is external, the buffer pointers will be
+ * reset to their original state.
+ */
+ void
+ enable_buffer();
+
+ /**
+ * @brief Destroy internal buffer.
+ *
+ * This function is safe to call multiple times. It will ensure
+ * that the internal buffer is deallocated if it exists. In any
+ * case, it will also reset the buffer pointers.
+ */
+ void
+ disable_buffer();
+
+ /**
+ * Underlying file pointer.
+ */
+ gzFile file;
+
+ /**
+ * Mode in which file was opened.
+ */
+ std::ios_base::openmode io_mode;
+
+ /**
+ * @brief True if this object owns file descriptor.
+ *
+ * This makes the class responsible for closing the file
+ * upon destruction.
+ */
+ bool own_fd;
+
+ /**
+ * @brief Stream buffer.
+ *
+ * For simplicity this remains allocated on the free store for the
+ * entire life span of the gzfilebuf object, unless replaced by setbuf.
+ */
+ char_type* buffer;
+
+ /**
+ * @brief Stream buffer size.
+ *
+ * Defaults to system default buffer size (typically 8192 bytes).
+ * Modified by setbuf.
+ */
+ std::streamsize buffer_size;
+
+ /**
+ * @brief True if this object owns stream buffer.
+ *
+ * This makes the class responsible for deleting the buffer
+ * upon destruction.
+ */
+ bool own_buffer;
+};
+
+/*****************************************************************************/
+
+/**
+ * @brief Gzipped file input stream class.
+ *
+ * This class implements ifstream for gzipped files. Seeking and putback
+ * is not supported yet.
+*/
+class gzifstream : public std::istream
+{
+public:
+ // Default constructor
+ gzifstream();
+
+ /**
+ * @brief Construct stream on gzipped file to be opened.
+ * @param name File name.
+ * @param mode Open mode flags (forced to contain ios::in).
+ */
+ explicit
+ gzifstream(const char* name,
+ std::ios_base::openmode mode = std::ios_base::in);
+
+ /**
+ * @brief Construct stream on already open gzipped file.
+ * @param fd File descriptor.
+ * @param mode Open mode flags (forced to contain ios::in).
+ */
+ explicit
+ gzifstream(int fd,
+ std::ios_base::openmode mode = std::ios_base::in);
+
+ /**
+ * Obtain underlying stream buffer.
+ */
+ gzfilebuf*
+ rdbuf() const
+ { return const_cast<gzfilebuf*>(&sb); }
+
+ /**
+ * @brief Check if file is open.
+ * @return True if file is open.
+ */
+ bool
+ is_open() { return sb.is_open(); }
+
+ /**
+ * @brief Open gzipped file.
+ * @param name File name.
+ * @param mode Open mode flags (forced to contain ios::in).
+ *
+ * Stream will be in state good() if file opens successfully;
+ * otherwise in state fail(). This differs from the behavior of
+ * ifstream, which never sets the state to good() and therefore
+ * won't allow you to reuse the stream for a second file unless
+ * you manually clear() the state. The choice is a matter of
+ * convenience.
+ */
+ void
+ open(const char* name,
+ std::ios_base::openmode mode = std::ios_base::in);
+
+ /**
+ * @brief Attach to already open gzipped file.
+ * @param fd File descriptor.
+ * @param mode Open mode flags (forced to contain ios::in).
+ *
+ * Stream will be in state good() if attach succeeded; otherwise
+ * in state fail().
+ */
+ void
+ attach(int fd,
+ std::ios_base::openmode mode = std::ios_base::in);
+
+ /**
+ * @brief Close gzipped file.
+ *
+ * Stream will be in state fail() if close failed.
+ */
+ void
+ close();
+
+private:
+ /**
+ * Underlying stream buffer.
+ */
+ gzfilebuf sb;
+};
+
+/*****************************************************************************/
+
+/**
+ * @brief Gzipped file output stream class.
+ *
+ * This class implements ofstream for gzipped files. Seeking and putback
+ * is not supported yet.
+*/
+class gzofstream : public std::ostream
+{
+public:
+ // Default constructor
+ gzofstream();
+
+ /**
+ * @brief Construct stream on gzipped file to be opened.
+ * @param name File name.
+ * @param mode Open mode flags (forced to contain ios::out).
+ */
+ explicit
+ gzofstream(const char* name,
+ std::ios_base::openmode mode = std::ios_base::out);
+
+ /**
+ * @brief Construct stream on already open gzipped file.
+ * @param fd File descriptor.
+ * @param mode Open mode flags (forced to contain ios::out).
+ */
+ explicit
+ gzofstream(int fd,
+ std::ios_base::openmode mode = std::ios_base::out);
+
+ /**
+ * Obtain underlying stream buffer.
+ */
+ gzfilebuf*
+ rdbuf() const
+ { return const_cast<gzfilebuf*>(&sb); }
+
+ /**
+ * @brief Check if file is open.
+ * @return True if file is open.
+ */
+ bool
+ is_open() { return sb.is_open(); }
+
+ /**
+ * @brief Open gzipped file.
+ * @param name File name.
+ * @param mode Open mode flags (forced to contain ios::out).
+ *
+ * Stream will be in state good() if file opens successfully;
+ * otherwise in state fail(). This differs from the behavior of
+ * ofstream, which never sets the state to good() and therefore
+ * won't allow you to reuse the stream for a second file unless
+ * you manually clear() the state. The choice is a matter of
+ * convenience.
+ */
+ void
+ open(const char* name,
+ std::ios_base::openmode mode = std::ios_base::out);
+
+ /**
+ * @brief Attach to already open gzipped file.
+ * @param fd File descriptor.
+ * @param mode Open mode flags (forced to contain ios::out).
+ *
+ * Stream will be in state good() if attach succeeded; otherwise
+ * in state fail().
+ */
+ void
+ attach(int fd,
+ std::ios_base::openmode mode = std::ios_base::out);
+
+ /**
+ * @brief Close gzipped file.
+ *
+ * Stream will be in state fail() if close failed.
+ */
+ void
+ close();
+
+private:
+ /**
+ * Underlying stream buffer.
+ */
+ gzfilebuf sb;
+};
+
+/*****************************************************************************/
+
+/**
+ * @brief Gzipped file output stream manipulator class.
+ *
+ * This class defines a two-argument manipulator for gzofstream. It is used
+ * as base for the setcompression(int,int) manipulator.
+*/
+template<typename T1, typename T2>
+ class gzomanip2
+ {
+ public:
+ // Allows insertor to peek at internals
+ template <typename Ta, typename Tb>
+ friend gzofstream&
+ operator<<(gzofstream&,
+ const gzomanip2<Ta,Tb>&);
+
+ // Constructor
+ gzomanip2(gzofstream& (*f)(gzofstream&, T1, T2),
+ T1 v1,
+ T2 v2);
+ private:
+ // Underlying manipulator function
+ gzofstream&
+ (*func)(gzofstream&, T1, T2);
+
+ // Arguments for manipulator function
+ T1 val1;
+ T2 val2;
+ };
+
+/*****************************************************************************/
+
+// Manipulator function thunks through to stream buffer
+inline gzofstream&
+setcompression(gzofstream &gzs, int l, int s = Z_DEFAULT_STRATEGY)
+{
+ (gzs.rdbuf())->setcompression(l, s);
+ return gzs;
+}
+
+// Manipulator constructor stores arguments
+template<typename T1, typename T2>
+ inline
+ gzomanip2<T1,T2>::gzomanip2(gzofstream &(*f)(gzofstream &, T1, T2),
+ T1 v1,
+ T2 v2)
+ : func(f), val1(v1), val2(v2)
+ { }
+
+// Insertor applies underlying manipulator function to stream
+template<typename T1, typename T2>
+ inline gzofstream&
+ operator<<(gzofstream& s, const gzomanip2<T1,T2>& m)
+ { return (*m.func)(s, m.val1, m.val2); }
+
+// Insert this onto stream to simplify setting of compression level
+inline gzomanip2<int,int>
+setcompression(int l, int s = Z_DEFAULT_STRATEGY)
+{ return gzomanip2<int,int>(&setcompression, l, s); }
+
+#endif // ZFSTREAM_H
diff --git a/contrib/zlib/contrib/masmx64/bld_ml64.bat b/contrib/zlib/contrib/masmx64/bld_ml64.bat
new file mode 100644
index 000000000..f74bcef5b
--- /dev/null
+++ b/contrib/zlib/contrib/masmx64/bld_ml64.bat
@@ -0,0 +1,2 @@
+ml64.exe /Flinffasx64 /c /Zi inffasx64.asm
+ml64.exe /Flgvmat64 /c /Zi gvmat64.asm
diff --git a/contrib/zlib/contrib/masmx64/gvmat64.asm b/contrib/zlib/contrib/masmx64/gvmat64.asm
new file mode 100644
index 000000000..c1817f1be
--- /dev/null
+++ b/contrib/zlib/contrib/masmx64/gvmat64.asm
@@ -0,0 +1,553 @@
+;uInt longest_match_x64(
+; deflate_state *s,
+; IPos cur_match); /* current match */
+
+; gvmat64.asm -- Asm portion of the optimized longest_match for 32 bits x86_64
+; (AMD64 on Athlon 64, Opteron, Phenom
+; and Intel EM64T on Pentium 4 with EM64T, Pentium D, Core 2 Duo, Core I5/I7)
+; Copyright (C) 1995-2010 Jean-loup Gailly, Brian Raiter and Gilles Vollant.
+;
+; File written by Gilles Vollant, by converting to assembly the longest_match
+; from Jean-loup Gailly in deflate.c of zLib and infoZip zip.
+;
+; and by taking inspiration on asm686 with masm, optimised assembly code
+; from Brian Raiter, written 1998
+;
+; This software is provided 'as-is', without any express or implied
+; warranty. In no event will the authors be held liable for any damages
+; arising from the use of this software.
+;
+; Permission is granted to anyone to use this software for any purpose,
+; including commercial applications, and to alter it and redistribute it
+; freely, subject to the following restrictions:
+;
+; 1. The origin of this software must not be misrepresented; you must not
+; claim that you wrote the original software. If you use this software
+; in a product, an acknowledgment in the product documentation would be
+; appreciated but is not required.
+; 2. Altered source versions must be plainly marked as such, and must not be
+; misrepresented as being the original software
+; 3. This notice may not be removed or altered from any source distribution.
+;
+;
+;
+; http://www.zlib.net
+; http://www.winimage.com/zLibDll
+; http://www.muppetlabs.com/~breadbox/software/assembly.html
+;
+; to compile this file for infozip Zip, I use option:
+; ml64.exe /Flgvmat64 /c /Zi /DINFOZIP gvmat64.asm
+;
+; to compile this file for zLib, I use option:
+; ml64.exe /Flgvmat64 /c /Zi gvmat64.asm
+; Be carrefull to adapt zlib1222add below to your version of zLib
+; (if you use a version of zLib before 1.0.4 or after 1.2.2.2, change
+; value of zlib1222add later)
+;
+; This file compile with Microsoft Macro Assembler (x64) for AMD64
+;
+; ml64.exe is given with Visual Studio 2005/2008/2010 and Windows WDK
+;
+; (you can get Windows WDK with ml64 for AMD64 from
+; http://www.microsoft.com/whdc/Devtools/wdk/default.mspx for low price)
+;
+
+
+;uInt longest_match(s, cur_match)
+; deflate_state *s;
+; IPos cur_match; /* current match */
+.code
+longest_match PROC
+
+
+;LocalVarsSize equ 88
+ LocalVarsSize equ 72
+
+; register used : rax,rbx,rcx,rdx,rsi,rdi,r8,r9,r10,r11,r12
+; free register : r14,r15
+; register can be saved : rsp
+
+ chainlenwmask equ rsp + 8 - LocalVarsSize ; high word: current chain len
+ ; low word: s->wmask
+;window equ rsp + xx - LocalVarsSize ; local copy of s->window ; stored in r10
+;windowbestlen equ rsp + xx - LocalVarsSize ; s->window + bestlen , use r10+r11
+;scanstart equ rsp + xx - LocalVarsSize ; first two bytes of string ; stored in r12w
+;scanend equ rsp + xx - LocalVarsSize ; last two bytes of string use ebx
+;scanalign equ rsp + xx - LocalVarsSize ; dword-misalignment of string r13
+;bestlen equ rsp + xx - LocalVarsSize ; size of best match so far -> r11d
+;scan equ rsp + xx - LocalVarsSize ; ptr to string wanting match -> r9
+IFDEF INFOZIP
+ELSE
+ nicematch equ (rsp + 16 - LocalVarsSize) ; a good enough match size
+ENDIF
+
+save_rdi equ rsp + 24 - LocalVarsSize
+save_rsi equ rsp + 32 - LocalVarsSize
+save_rbx equ rsp + 40 - LocalVarsSize
+save_rbp equ rsp + 48 - LocalVarsSize
+save_r12 equ rsp + 56 - LocalVarsSize
+save_r13 equ rsp + 64 - LocalVarsSize
+;save_r14 equ rsp + 72 - LocalVarsSize
+;save_r15 equ rsp + 80 - LocalVarsSize
+
+
+; summary of register usage
+; scanend ebx
+; scanendw bx
+; chainlenwmask edx
+; curmatch rsi
+; curmatchd esi
+; windowbestlen r8
+; scanalign r9
+; scanalignd r9d
+; window r10
+; bestlen r11
+; bestlend r11d
+; scanstart r12d
+; scanstartw r12w
+; scan r13
+; nicematch r14d
+; limit r15
+; limitd r15d
+; prev rcx
+
+; all the +4 offsets are due to the addition of pending_buf_size (in zlib
+; in the deflate_state structure since the asm code was first written
+; (if you compile with zlib 1.0.4 or older, remove the +4).
+; Note : these value are good with a 8 bytes boundary pack structure
+
+
+ MAX_MATCH equ 258
+ MIN_MATCH equ 3
+ MIN_LOOKAHEAD equ (MAX_MATCH+MIN_MATCH+1)
+
+
+;;; Offsets for fields in the deflate_state structure. These numbers
+;;; are calculated from the definition of deflate_state, with the
+;;; assumption that the compiler will dword-align the fields. (Thus,
+;;; changing the definition of deflate_state could easily cause this
+;;; program to crash horribly, without so much as a warning at
+;;; compile time. Sigh.)
+
+; all the +zlib1222add offsets are due to the addition of fields
+; in zlib in the deflate_state structure since the asm code was first written
+; (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)").
+; (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0").
+; if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8").
+
+
+IFDEF INFOZIP
+
+_DATA SEGMENT
+COMM window_size:DWORD
+; WMask ; 7fff
+COMM window:BYTE:010040H
+COMM prev:WORD:08000H
+; MatchLen : unused
+; PrevMatch : unused
+COMM strstart:DWORD
+COMM match_start:DWORD
+; Lookahead : ignore
+COMM prev_length:DWORD ; PrevLen
+COMM max_chain_length:DWORD
+COMM good_match:DWORD
+COMM nice_match:DWORD
+prev_ad equ OFFSET prev
+window_ad equ OFFSET window
+nicematch equ nice_match
+_DATA ENDS
+WMask equ 07fffh
+
+ELSE
+
+ IFNDEF zlib1222add
+ zlib1222add equ 8
+ ENDIF
+dsWSize equ 56+zlib1222add+(zlib1222add/2)
+dsWMask equ 64+zlib1222add+(zlib1222add/2)
+dsWindow equ 72+zlib1222add
+dsPrev equ 88+zlib1222add
+dsMatchLen equ 128+zlib1222add
+dsPrevMatch equ 132+zlib1222add
+dsStrStart equ 140+zlib1222add
+dsMatchStart equ 144+zlib1222add
+dsLookahead equ 148+zlib1222add
+dsPrevLen equ 152+zlib1222add
+dsMaxChainLen equ 156+zlib1222add
+dsGoodMatch equ 172+zlib1222add
+dsNiceMatch equ 176+zlib1222add
+
+window_size equ [ rcx + dsWSize]
+WMask equ [ rcx + dsWMask]
+window_ad equ [ rcx + dsWindow]
+prev_ad equ [ rcx + dsPrev]
+strstart equ [ rcx + dsStrStart]
+match_start equ [ rcx + dsMatchStart]
+Lookahead equ [ rcx + dsLookahead] ; 0ffffffffh on infozip
+prev_length equ [ rcx + dsPrevLen]
+max_chain_length equ [ rcx + dsMaxChainLen]
+good_match equ [ rcx + dsGoodMatch]
+nice_match equ [ rcx + dsNiceMatch]
+ENDIF
+
+; parameter 1 in r8(deflate state s), param 2 in rdx (cur match)
+
+; see http://weblogs.asp.net/oldnewthing/archive/2004/01/14/58579.aspx and
+; http://msdn.microsoft.com/library/en-us/kmarch/hh/kmarch/64bitAMD_8e951dd2-ee77-4728-8702-55ce4b5dd24a.xml.asp
+;
+; All registers must be preserved across the call, except for
+; rax, rcx, rdx, r8, r9, r10, and r11, which are scratch.
+
+
+
+;;; Save registers that the compiler may be using, and adjust esp to
+;;; make room for our stack frame.
+
+
+;;; Retrieve the function arguments. r8d will hold cur_match
+;;; throughout the entire function. edx will hold the pointer to the
+;;; deflate_state structure during the function's setup (before
+;;; entering the main loop.
+
+; parameter 1 in rcx (deflate_state* s), param 2 in edx -> r8 (cur match)
+
+; this clear high 32 bits of r8, which can be garbage in both r8 and rdx
+
+ mov [save_rdi],rdi
+ mov [save_rsi],rsi
+ mov [save_rbx],rbx
+ mov [save_rbp],rbp
+IFDEF INFOZIP
+ mov r8d,ecx
+ELSE
+ mov r8d,edx
+ENDIF
+ mov [save_r12],r12
+ mov [save_r13],r13
+; mov [save_r14],r14
+; mov [save_r15],r15
+
+
+;;; uInt wmask = s->w_mask;
+;;; unsigned chain_length = s->max_chain_length;
+;;; if (s->prev_length >= s->good_match) {
+;;; chain_length >>= 2;
+;;; }
+
+ mov edi, prev_length
+ mov esi, good_match
+ mov eax, WMask
+ mov ebx, max_chain_length
+ cmp edi, esi
+ jl LastMatchGood
+ shr ebx, 2
+LastMatchGood:
+
+;;; chainlen is decremented once beforehand so that the function can
+;;; use the sign flag instead of the zero flag for the exit test.
+;;; It is then shifted into the high word, to make room for the wmask
+;;; value, which it will always accompany.
+
+ dec ebx
+ shl ebx, 16
+ or ebx, eax
+
+;;; on zlib only
+;;; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
+
+IFDEF INFOZIP
+ mov [chainlenwmask], ebx
+; on infozip nice_match = [nice_match]
+ELSE
+ mov eax, nice_match
+ mov [chainlenwmask], ebx
+ mov r10d, Lookahead
+ cmp r10d, eax
+ cmovnl r10d, eax
+ mov [nicematch],r10d
+ENDIF
+
+;;; register Bytef *scan = s->window + s->strstart;
+ mov r10, window_ad
+ mov ebp, strstart
+ lea r13, [r10 + rbp]
+
+;;; Determine how many bytes the scan ptr is off from being
+;;; dword-aligned.
+
+ mov r9,r13
+ neg r13
+ and r13,3
+
+;;; IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
+;;; s->strstart - (IPos)MAX_DIST(s) : NIL;
+IFDEF INFOZIP
+ mov eax,07efah ; MAX_DIST = (WSIZE-MIN_LOOKAHEAD) (0x8000-(3+8+1))
+ELSE
+ mov eax, window_size
+ sub eax, MIN_LOOKAHEAD
+ENDIF
+ xor edi,edi
+ sub ebp, eax
+
+ mov r11d, prev_length
+
+ cmovng ebp,edi
+
+;;; int best_len = s->prev_length;
+
+
+;;; Store the sum of s->window + best_len in esi locally, and in esi.
+
+ lea rsi,[r10+r11]
+
+;;; register ush scan_start = *(ushf*)scan;
+;;; register ush scan_end = *(ushf*)(scan+best_len-1);
+;;; Posf *prev = s->prev;
+
+ movzx r12d,word ptr [r9]
+ movzx ebx, word ptr [r9 + r11 - 1]
+
+ mov rdi, prev_ad
+
+;;; Jump into the main loop.
+
+ mov edx, [chainlenwmask]
+
+ cmp bx,word ptr [rsi + r8 - 1]
+ jz LookupLoopIsZero
+
+LookupLoop1:
+ and r8d, edx
+
+ movzx r8d, word ptr [rdi + r8*2]
+ cmp r8d, ebp
+ jbe LeaveNow
+ sub edx, 00010000h
+ js LeaveNow
+
+LoopEntry1:
+ cmp bx,word ptr [rsi + r8 - 1]
+ jz LookupLoopIsZero
+
+LookupLoop2:
+ and r8d, edx
+
+ movzx r8d, word ptr [rdi + r8*2]
+ cmp r8d, ebp
+ jbe LeaveNow
+ sub edx, 00010000h
+ js LeaveNow
+
+LoopEntry2:
+ cmp bx,word ptr [rsi + r8 - 1]
+ jz LookupLoopIsZero
+
+LookupLoop4:
+ and r8d, edx
+
+ movzx r8d, word ptr [rdi + r8*2]
+ cmp r8d, ebp
+ jbe LeaveNow
+ sub edx, 00010000h
+ js LeaveNow
+
+LoopEntry4:
+
+ cmp bx,word ptr [rsi + r8 - 1]
+ jnz LookupLoop1
+ jmp LookupLoopIsZero
+
+
+;;; do {
+;;; match = s->window + cur_match;
+;;; if (*(ushf*)(match+best_len-1) != scan_end ||
+;;; *(ushf*)match != scan_start) continue;
+;;; [...]
+;;; } while ((cur_match = prev[cur_match & wmask]) > limit
+;;; && --chain_length != 0);
+;;;
+;;; Here is the inner loop of the function. The function will spend the
+;;; majority of its time in this loop, and majority of that time will
+;;; be spent in the first ten instructions.
+;;;
+;;; Within this loop:
+;;; ebx = scanend
+;;; r8d = curmatch
+;;; edx = chainlenwmask - i.e., ((chainlen << 16) | wmask)
+;;; esi = windowbestlen - i.e., (window + bestlen)
+;;; edi = prev
+;;; ebp = limit
+
+LookupLoop:
+ and r8d, edx
+
+ movzx r8d, word ptr [rdi + r8*2]
+ cmp r8d, ebp
+ jbe LeaveNow
+ sub edx, 00010000h
+ js LeaveNow
+
+LoopEntry:
+
+ cmp bx,word ptr [rsi + r8 - 1]
+ jnz LookupLoop1
+LookupLoopIsZero:
+ cmp r12w, word ptr [r10 + r8]
+ jnz LookupLoop1
+
+
+;;; Store the current value of chainlen.
+ mov [chainlenwmask], edx
+
+;;; Point edi to the string under scrutiny, and esi to the string we
+;;; are hoping to match it up with. In actuality, esi and edi are
+;;; both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and edx is
+;;; initialized to -(MAX_MATCH_8 - scanalign).
+
+ lea rsi,[r8+r10]
+ mov rdx, 0fffffffffffffef8h; -(MAX_MATCH_8)
+ lea rsi, [rsi + r13 + 0108h] ;MAX_MATCH_8]
+ lea rdi, [r9 + r13 + 0108h] ;MAX_MATCH_8]
+
+ prefetcht1 [rsi+rdx]
+ prefetcht1 [rdi+rdx]
+
+
+;;; Test the strings for equality, 8 bytes at a time. At the end,
+;;; adjust rdx so that it is offset to the exact byte that mismatched.
+;;;
+;;; We already know at this point that the first three bytes of the
+;;; strings match each other, and they can be safely passed over before
+;;; starting the compare loop. So what this code does is skip over 0-3
+;;; bytes, as much as necessary in order to dword-align the edi
+;;; pointer. (rsi will still be misaligned three times out of four.)
+;;;
+;;; It should be confessed that this loop usually does not represent
+;;; much of the total running time. Replacing it with a more
+;;; straightforward "rep cmpsb" would not drastically degrade
+;;; performance.
+
+
+LoopCmps:
+ mov rax, [rsi + rdx]
+ xor rax, [rdi + rdx]
+ jnz LeaveLoopCmps
+
+ mov rax, [rsi + rdx + 8]
+ xor rax, [rdi + rdx + 8]
+ jnz LeaveLoopCmps8
+
+
+ mov rax, [rsi + rdx + 8+8]
+ xor rax, [rdi + rdx + 8+8]
+ jnz LeaveLoopCmps16
+
+ add rdx,8+8+8
+
+ jnz short LoopCmps
+ jmp short LenMaximum
+LeaveLoopCmps16: add rdx,8
+LeaveLoopCmps8: add rdx,8
+LeaveLoopCmps:
+
+ test eax, 0000FFFFh
+ jnz LenLower
+
+ test eax,0ffffffffh
+
+ jnz LenLower32
+
+ add rdx,4
+ shr rax,32
+ or ax,ax
+ jnz LenLower
+
+LenLower32:
+ shr eax,16
+ add rdx,2
+LenLower: sub al, 1
+ adc rdx, 0
+;;; Calculate the length of the match. If it is longer than MAX_MATCH,
+;;; then automatically accept it as the best possible match and leave.
+
+ lea rax, [rdi + rdx]
+ sub rax, r9
+ cmp eax, MAX_MATCH
+ jge LenMaximum
+
+;;; If the length of the match is not longer than the best match we
+;;; have so far, then forget it and return to the lookup loop.
+;///////////////////////////////////
+
+ cmp eax, r11d
+ jg LongerMatch
+
+ lea rsi,[r10+r11]
+
+ mov rdi, prev_ad
+ mov edx, [chainlenwmask]
+ jmp LookupLoop
+
+;;; s->match_start = cur_match;
+;;; best_len = len;
+;;; if (len >= nice_match) break;
+;;; scan_end = *(ushf*)(scan+best_len-1);
+
+LongerMatch:
+ mov r11d, eax
+ mov match_start, r8d
+ cmp eax, [nicematch]
+ jge LeaveNow
+
+ lea rsi,[r10+rax]
+
+ movzx ebx, word ptr [r9 + rax - 1]
+ mov rdi, prev_ad
+ mov edx, [chainlenwmask]
+ jmp LookupLoop
+
+;;; Accept the current string, with the maximum possible length.
+
+LenMaximum:
+ mov r11d,MAX_MATCH
+ mov match_start, r8d
+
+;;; if ((uInt)best_len <= s->lookahead) return (uInt)best_len;
+;;; return s->lookahead;
+
+LeaveNow:
+IFDEF INFOZIP
+ mov eax,r11d
+ELSE
+ mov eax, Lookahead
+ cmp r11d, eax
+ cmovng eax, r11d
+ENDIF
+
+;;; Restore the stack and return from whence we came.
+
+
+ mov rsi,[save_rsi]
+ mov rdi,[save_rdi]
+ mov rbx,[save_rbx]
+ mov rbp,[save_rbp]
+ mov r12,[save_r12]
+ mov r13,[save_r13]
+; mov r14,[save_r14]
+; mov r15,[save_r15]
+
+
+ ret 0
+; please don't remove this string !
+; Your can freely use gvmat64 in any free or commercial app
+; but it is far better don't remove the string in the binary!
+ db 0dh,0ah,"asm686 with masm, optimised assembly code from Brian Raiter, written 1998, converted to amd 64 by Gilles Vollant 2005",0dh,0ah,0
+longest_match ENDP
+
+match_init PROC
+ ret 0
+match_init ENDP
+
+
+END
diff --git a/contrib/zlib/contrib/masmx64/inffas8664.c b/contrib/zlib/contrib/masmx64/inffas8664.c
new file mode 100644
index 000000000..aa861a333
--- /dev/null
+++ b/contrib/zlib/contrib/masmx64/inffas8664.c
@@ -0,0 +1,186 @@
+/* inffas8664.c is a hand tuned assembler version of inffast.c - fast decoding
+ * version for AMD64 on Windows using Microsoft C compiler
+ *
+ * Copyright (C) 1995-2003 Mark Adler
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ *
+ * Copyright (C) 2003 Chris Anderson <christop@charm.net>
+ * Please use the copyright conditions above.
+ *
+ * 2005 - Adaptation to Microsoft C Compiler for AMD64 by Gilles Vollant
+ *
+ * inffas8664.c call function inffas8664fnc in inffasx64.asm
+ * inffasx64.asm is automatically convert from AMD64 portion of inffas86.c
+ *
+ * Dec-29-2003 -- I added AMD64 inflate asm support. This version is also
+ * slightly quicker on x86 systems because, instead of using rep movsb to copy
+ * data, it uses rep movsw, which moves data in 2-byte chunks instead of single
+ * bytes. I've tested the AMD64 code on a Fedora Core 1 + the x86_64 updates
+ * from http://fedora.linux.duke.edu/fc1_x86_64
+ * which is running on an Athlon 64 3000+ / Gigabyte GA-K8VT800M system with
+ * 1GB ram. The 64-bit version is about 4% faster than the 32-bit version,
+ * when decompressing mozilla-source-1.3.tar.gz.
+ *
+ * Mar-13-2003 -- Most of this is derived from inffast.S which is derived from
+ * the gcc -S output of zlib-1.2.0/inffast.c. Zlib-1.2.0 is in beta release at
+ * the moment. I have successfully compiled and tested this code with gcc2.96,
+ * gcc3.2, icc5.0, msvc6.0. It is very close to the speed of inffast.S
+ * compiled with gcc -DNO_MMX, but inffast.S is still faster on the P3 with MMX
+ * enabled. I will attempt to merge the MMX code into this version. Newer
+ * versions of this and inffast.S can be found at
+ * http://www.eetbeetee.com/zlib/ and http://www.charm.net/~christop/zlib/
+ *
+ */
+
+#include <stdio.h>
+#include "zutil.h"
+#include "inftrees.h"
+#include "inflate.h"
+#include "inffast.h"
+
+/* Mark Adler's comments from inffast.c: */
+
+/*
+ Decode literal, length, and distance codes and write out the resulting
+ literal and match bytes until either not enough input or output is
+ available, an end-of-block is encountered, or a data error is encountered.
+ When large enough input and output buffers are supplied to inflate(), for
+ example, a 16K input buffer and a 64K output buffer, more than 95% of the
+ inflate execution time is spent in this routine.
+
+ Entry assumptions:
+
+ state->mode == LEN
+ strm->avail_in >= 6
+ strm->avail_out >= 258
+ start >= strm->avail_out
+ state->bits < 8
+
+ On return, state->mode is one of:
+
+ LEN -- ran out of enough output space or enough available input
+ TYPE -- reached end of block code, inflate() to interpret next block
+ BAD -- error in block data
+
+ Notes:
+
+ - The maximum input bits used by a length/distance pair is 15 bits for the
+ length code, 5 bits for the length extra, 15 bits for the distance code,
+ and 13 bits for the distance extra. This totals 48 bits, or six bytes.
+ Therefore if strm->avail_in >= 6, then there is enough input to avoid
+ checking for available input while decoding.
+
+ - The maximum bytes that a single length/distance pair can output is 258
+ bytes, which is the maximum length that can be coded. inflate_fast()
+ requires strm->avail_out >= 258 for each loop to avoid checking for
+ output space.
+ */
+
+
+
+ typedef struct inffast_ar {
+/* 64 32 x86 x86_64 */
+/* ar offset register */
+/* 0 0 */ void *esp; /* esp save */
+/* 8 4 */ void *ebp; /* ebp save */
+/* 16 8 */ unsigned char FAR *in; /* esi rsi local strm->next_in */
+/* 24 12 */ unsigned char FAR *last; /* r9 while in < last */
+/* 32 16 */ unsigned char FAR *out; /* edi rdi local strm->next_out */
+/* 40 20 */ unsigned char FAR *beg; /* inflate()'s init next_out */
+/* 48 24 */ unsigned char FAR *end; /* r10 while out < end */
+/* 56 28 */ unsigned char FAR *window;/* size of window, wsize!=0 */
+/* 64 32 */ code const FAR *lcode; /* ebp rbp local strm->lencode */
+/* 72 36 */ code const FAR *dcode; /* r11 local strm->distcode */
+/* 80 40 */ size_t /*unsigned long */hold; /* edx rdx local strm->hold */
+/* 88 44 */ unsigned bits; /* ebx rbx local strm->bits */
+/* 92 48 */ unsigned wsize; /* window size */
+/* 96 52 */ unsigned write; /* window write index */
+/*100 56 */ unsigned lmask; /* r12 mask for lcode */
+/*104 60 */ unsigned dmask; /* r13 mask for dcode */
+/*108 64 */ unsigned len; /* r14 match length */
+/*112 68 */ unsigned dist; /* r15 match distance */
+/*116 72 */ unsigned status; /* set when state chng*/
+ } type_ar;
+#ifdef ASMINF
+
+void inflate_fast(strm, start)
+z_streamp strm;
+unsigned start; /* inflate()'s starting value for strm->avail_out */
+{
+ struct inflate_state FAR *state;
+ type_ar ar;
+ void inffas8664fnc(struct inffast_ar * par);
+
+
+
+#if (defined( __GNUC__ ) && defined( __amd64__ ) && ! defined( __i386 )) || (defined(_MSC_VER) && defined(_M_AMD64))
+#define PAD_AVAIL_IN 6
+#define PAD_AVAIL_OUT 258
+#else
+#define PAD_AVAIL_IN 5
+#define PAD_AVAIL_OUT 257
+#endif
+
+ /* copy state to local variables */
+ state = (struct inflate_state FAR *)strm->state;
+
+ ar.in = strm->next_in;
+ ar.last = ar.in + (strm->avail_in - PAD_AVAIL_IN);
+ ar.out = strm->next_out;
+ ar.beg = ar.out - (start - strm->avail_out);
+ ar.end = ar.out + (strm->avail_out - PAD_AVAIL_OUT);
+ ar.wsize = state->wsize;
+ ar.write = state->wnext;
+ ar.window = state->window;
+ ar.hold = state->hold;
+ ar.bits = state->bits;
+ ar.lcode = state->lencode;
+ ar.dcode = state->distcode;
+ ar.lmask = (1U << state->lenbits) - 1;
+ ar.dmask = (1U << state->distbits) - 1;
+
+ /* decode literals and length/distances until end-of-block or not enough
+ input data or output space */
+
+ /* align in on 1/2 hold size boundary */
+ while (((size_t)(void *)ar.in & (sizeof(ar.hold) / 2 - 1)) != 0) {
+ ar.hold += (unsigned long)*ar.in++ << ar.bits;
+ ar.bits += 8;
+ }
+
+ inffas8664fnc(&ar);
+
+ if (ar.status > 1) {
+ if (ar.status == 2)
+ strm->msg = "invalid literal/length code";
+ else if (ar.status == 3)
+ strm->msg = "invalid distance code";
+ else
+ strm->msg = "invalid distance too far back";
+ state->mode = BAD;
+ }
+ else if ( ar.status == 1 ) {
+ state->mode = TYPE;
+ }
+
+ /* return unused bytes (on entry, bits < 8, so in won't go too far back) */
+ ar.len = ar.bits >> 3;
+ ar.in -= ar.len;
+ ar.bits -= ar.len << 3;
+ ar.hold &= (1U << ar.bits) - 1;
+
+ /* update state and return */
+ strm->next_in = ar.in;
+ strm->next_out = ar.out;
+ strm->avail_in = (unsigned)(ar.in < ar.last ?
+ PAD_AVAIL_IN + (ar.last - ar.in) :
+ PAD_AVAIL_IN - (ar.in - ar.last));
+ strm->avail_out = (unsigned)(ar.out < ar.end ?
+ PAD_AVAIL_OUT + (ar.end - ar.out) :
+ PAD_AVAIL_OUT - (ar.out - ar.end));
+ state->hold = (unsigned long)ar.hold;
+ state->bits = ar.bits;
+ return;
+}
+
+#endif
diff --git a/contrib/zlib/contrib/masmx64/inffasx64.asm b/contrib/zlib/contrib/masmx64/inffasx64.asm
new file mode 100644
index 000000000..41ec82392
--- /dev/null
+++ b/contrib/zlib/contrib/masmx64/inffasx64.asm
@@ -0,0 +1,396 @@
+; inffasx64.asm is a hand tuned assembler version of inffast.c - fast decoding
+; version for AMD64 on Windows using Microsoft C compiler
+;
+; inffasx64.asm is automatically convert from AMD64 portion of inffas86.c
+; inffasx64.asm is called by inffas8664.c, which contain more info.
+
+
+; to compile this file, I use option
+; ml64.exe /Flinffasx64 /c /Zi inffasx64.asm
+; with Microsoft Macro Assembler (x64) for AMD64
+;
+
+; This file compile with Microsoft Macro Assembler (x64) for AMD64
+;
+; ml64.exe is given with Visual Studio 2005/2008/2010 and Windows WDK
+;
+; (you can get Windows WDK with ml64 for AMD64 from
+; http://www.microsoft.com/whdc/Devtools/wdk/default.mspx for low price)
+;
+
+
+.code
+inffas8664fnc PROC
+
+; see http://weblogs.asp.net/oldnewthing/archive/2004/01/14/58579.aspx and
+; http://msdn.microsoft.com/library/en-us/kmarch/hh/kmarch/64bitAMD_8e951dd2-ee77-4728-8702-55ce4b5dd24a.xml.asp
+;
+; All registers must be preserved across the call, except for
+; rax, rcx, rdx, r8, r-9, r10, and r11, which are scratch.
+
+
+ mov [rsp-8],rsi
+ mov [rsp-16],rdi
+ mov [rsp-24],r12
+ mov [rsp-32],r13
+ mov [rsp-40],r14
+ mov [rsp-48],r15
+ mov [rsp-56],rbx
+
+ mov rax,rcx
+
+ mov [rax+8], rbp ; /* save regs rbp and rsp */
+ mov [rax], rsp
+
+ mov rsp, rax ; /* make rsp point to &ar */
+
+ mov rsi, [rsp+16] ; /* rsi = in */
+ mov rdi, [rsp+32] ; /* rdi = out */
+ mov r9, [rsp+24] ; /* r9 = last */
+ mov r10, [rsp+48] ; /* r10 = end */
+ mov rbp, [rsp+64] ; /* rbp = lcode */
+ mov r11, [rsp+72] ; /* r11 = dcode */
+ mov rdx, [rsp+80] ; /* rdx = hold */
+ mov ebx, [rsp+88] ; /* ebx = bits */
+ mov r12d, [rsp+100] ; /* r12d = lmask */
+ mov r13d, [rsp+104] ; /* r13d = dmask */
+ ; /* r14d = len */
+ ; /* r15d = dist */
+
+
+ cld
+ cmp r10, rdi
+ je L_one_time ; /* if only one decode left */
+ cmp r9, rsi
+
+ jne L_do_loop
+
+
+L_one_time:
+ mov r8, r12 ; /* r8 = lmask */
+ cmp bl, 32
+ ja L_get_length_code_one_time
+
+ lodsd ; /* eax = *(uint *)in++ */
+ mov cl, bl ; /* cl = bits, needs it for shifting */
+ add bl, 32 ; /* bits += 32 */
+ shl rax, cl
+ or rdx, rax ; /* hold |= *((uint *)in)++ << bits */
+ jmp L_get_length_code_one_time
+
+ALIGN 4
+L_while_test:
+ cmp r10, rdi
+ jbe L_break_loop
+ cmp r9, rsi
+ jbe L_break_loop
+
+L_do_loop:
+ mov r8, r12 ; /* r8 = lmask */
+ cmp bl, 32
+ ja L_get_length_code ; /* if (32 < bits) */
+
+ lodsd ; /* eax = *(uint *)in++ */
+ mov cl, bl ; /* cl = bits, needs it for shifting */
+ add bl, 32 ; /* bits += 32 */
+ shl rax, cl
+ or rdx, rax ; /* hold |= *((uint *)in)++ << bits */
+
+L_get_length_code:
+ and r8, rdx ; /* r8 &= hold */
+ mov eax, [rbp+r8*4] ; /* eax = lcode[hold & lmask] */
+
+ mov cl, ah ; /* cl = this.bits */
+ sub bl, ah ; /* bits -= this.bits */
+ shr rdx, cl ; /* hold >>= this.bits */
+
+ test al, al
+ jnz L_test_for_length_base ; /* if (op != 0) 45.7% */
+
+ mov r8, r12 ; /* r8 = lmask */
+ shr eax, 16 ; /* output this.val char */
+ stosb
+
+L_get_length_code_one_time:
+ and r8, rdx ; /* r8 &= hold */
+ mov eax, [rbp+r8*4] ; /* eax = lcode[hold & lmask] */
+
+L_dolen:
+ mov cl, ah ; /* cl = this.bits */
+ sub bl, ah ; /* bits -= this.bits */
+ shr rdx, cl ; /* hold >>= this.bits */
+
+ test al, al
+ jnz L_test_for_length_base ; /* if (op != 0) 45.7% */
+
+ shr eax, 16 ; /* output this.val char */
+ stosb
+ jmp L_while_test
+
+ALIGN 4
+L_test_for_length_base:
+ mov r14d, eax ; /* len = this */
+ shr r14d, 16 ; /* len = this.val */
+ mov cl, al
+
+ test al, 16
+ jz L_test_for_second_level_length ; /* if ((op & 16) == 0) 8% */
+ and cl, 15 ; /* op &= 15 */
+ jz L_decode_distance ; /* if (!op) */
+
+L_add_bits_to_len:
+ sub bl, cl
+ xor eax, eax
+ inc eax
+ shl eax, cl
+ dec eax
+ and eax, edx ; /* eax &= hold */
+ shr rdx, cl
+ add r14d, eax ; /* len += hold & mask[op] */
+
+L_decode_distance:
+ mov r8, r13 ; /* r8 = dmask */
+ cmp bl, 32
+ ja L_get_distance_code ; /* if (32 < bits) */
+
+ lodsd ; /* eax = *(uint *)in++ */
+ mov cl, bl ; /* cl = bits, needs it for shifting */
+ add bl, 32 ; /* bits += 32 */
+ shl rax, cl
+ or rdx, rax ; /* hold |= *((uint *)in)++ << bits */
+
+L_get_distance_code:
+ and r8, rdx ; /* r8 &= hold */
+ mov eax, [r11+r8*4] ; /* eax = dcode[hold & dmask] */
+
+L_dodist:
+ mov r15d, eax ; /* dist = this */
+ shr r15d, 16 ; /* dist = this.val */
+ mov cl, ah
+ sub bl, ah ; /* bits -= this.bits */
+ shr rdx, cl ; /* hold >>= this.bits */
+ mov cl, al ; /* cl = this.op */
+
+ test al, 16 ; /* if ((op & 16) == 0) */
+ jz L_test_for_second_level_dist
+ and cl, 15 ; /* op &= 15 */
+ jz L_check_dist_one
+
+L_add_bits_to_dist:
+ sub bl, cl
+ xor eax, eax
+ inc eax
+ shl eax, cl
+ dec eax ; /* (1 << op) - 1 */
+ and eax, edx ; /* eax &= hold */
+ shr rdx, cl
+ add r15d, eax ; /* dist += hold & ((1 << op) - 1) */
+
+L_check_window:
+ mov r8, rsi ; /* save in so from can use it's reg */
+ mov rax, rdi
+ sub rax, [rsp+40] ; /* nbytes = out - beg */
+
+ cmp eax, r15d
+ jb L_clip_window ; /* if (dist > nbytes) 4.2% */
+
+ mov ecx, r14d ; /* ecx = len */
+ mov rsi, rdi
+ sub rsi, r15 ; /* from = out - dist */
+
+ sar ecx, 1
+ jnc L_copy_two ; /* if len % 2 == 0 */
+
+ rep movsw
+ mov al, [rsi]
+ mov [rdi], al
+ inc rdi
+
+ mov rsi, r8 ; /* move in back to %rsi, toss from */
+ jmp L_while_test
+
+L_copy_two:
+ rep movsw
+ mov rsi, r8 ; /* move in back to %rsi, toss from */
+ jmp L_while_test
+
+ALIGN 4
+L_check_dist_one:
+ cmp r15d, 1 ; /* if dist 1, is a memset */
+ jne L_check_window
+ cmp [rsp+40], rdi ; /* if out == beg, outside window */
+ je L_check_window
+
+ mov ecx, r14d ; /* ecx = len */
+ mov al, [rdi-1]
+ mov ah, al
+
+ sar ecx, 1
+ jnc L_set_two
+ mov [rdi], al
+ inc rdi
+
+L_set_two:
+ rep stosw
+ jmp L_while_test
+
+ALIGN 4
+L_test_for_second_level_length:
+ test al, 64
+ jnz L_test_for_end_of_block ; /* if ((op & 64) != 0) */
+
+ xor eax, eax
+ inc eax
+ shl eax, cl
+ dec eax
+ and eax, edx ; /* eax &= hold */
+ add eax, r14d ; /* eax += len */
+ mov eax, [rbp+rax*4] ; /* eax = lcode[val+(hold&mask[op])]*/
+ jmp L_dolen
+
+ALIGN 4
+L_test_for_second_level_dist:
+ test al, 64
+ jnz L_invalid_distance_code ; /* if ((op & 64) != 0) */
+
+ xor eax, eax
+ inc eax
+ shl eax, cl
+ dec eax
+ and eax, edx ; /* eax &= hold */
+ add eax, r15d ; /* eax += dist */
+ mov eax, [r11+rax*4] ; /* eax = dcode[val+(hold&mask[op])]*/
+ jmp L_dodist
+
+ALIGN 4
+L_clip_window:
+ mov ecx, eax ; /* ecx = nbytes */
+ mov eax, [rsp+92] ; /* eax = wsize, prepare for dist cmp */
+ neg ecx ; /* nbytes = -nbytes */
+
+ cmp eax, r15d
+ jb L_invalid_distance_too_far ; /* if (dist > wsize) */
+
+ add ecx, r15d ; /* nbytes = dist - nbytes */
+ cmp dword ptr [rsp+96], 0
+ jne L_wrap_around_window ; /* if (write != 0) */
+
+ mov rsi, [rsp+56] ; /* from = window */
+ sub eax, ecx ; /* eax -= nbytes */
+ add rsi, rax ; /* from += wsize - nbytes */
+
+ mov eax, r14d ; /* eax = len */
+ cmp r14d, ecx
+ jbe L_do_copy ; /* if (nbytes >= len) */
+
+ sub eax, ecx ; /* eax -= nbytes */
+ rep movsb
+ mov rsi, rdi
+ sub rsi, r15 ; /* from = &out[ -dist ] */
+ jmp L_do_copy
+
+ALIGN 4
+L_wrap_around_window:
+ mov eax, [rsp+96] ; /* eax = write */
+ cmp ecx, eax
+ jbe L_contiguous_in_window ; /* if (write >= nbytes) */
+
+ mov esi, [rsp+92] ; /* from = wsize */
+ add rsi, [rsp+56] ; /* from += window */
+ add rsi, rax ; /* from += write */
+ sub rsi, rcx ; /* from -= nbytes */
+ sub ecx, eax ; /* nbytes -= write */
+
+ mov eax, r14d ; /* eax = len */
+ cmp eax, ecx
+ jbe L_do_copy ; /* if (nbytes >= len) */
+
+ sub eax, ecx ; /* len -= nbytes */
+ rep movsb
+ mov rsi, [rsp+56] ; /* from = window */
+ mov ecx, [rsp+96] ; /* nbytes = write */
+ cmp eax, ecx
+ jbe L_do_copy ; /* if (nbytes >= len) */
+
+ sub eax, ecx ; /* len -= nbytes */
+ rep movsb
+ mov rsi, rdi
+ sub rsi, r15 ; /* from = out - dist */
+ jmp L_do_copy
+
+ALIGN 4
+L_contiguous_in_window:
+ mov rsi, [rsp+56] ; /* rsi = window */
+ add rsi, rax
+ sub rsi, rcx ; /* from += write - nbytes */
+
+ mov eax, r14d ; /* eax = len */
+ cmp eax, ecx
+ jbe L_do_copy ; /* if (nbytes >= len) */
+
+ sub eax, ecx ; /* len -= nbytes */
+ rep movsb
+ mov rsi, rdi
+ sub rsi, r15 ; /* from = out - dist */
+ jmp L_do_copy ; /* if (nbytes >= len) */
+
+ALIGN 4
+L_do_copy:
+ mov ecx, eax ; /* ecx = len */
+ rep movsb
+
+ mov rsi, r8 ; /* move in back to %esi, toss from */
+ jmp L_while_test
+
+L_test_for_end_of_block:
+ test al, 32
+ jz L_invalid_literal_length_code
+ mov dword ptr [rsp+116], 1
+ jmp L_break_loop_with_status
+
+L_invalid_literal_length_code:
+ mov dword ptr [rsp+116], 2
+ jmp L_break_loop_with_status
+
+L_invalid_distance_code:
+ mov dword ptr [rsp+116], 3
+ jmp L_break_loop_with_status
+
+L_invalid_distance_too_far:
+ mov dword ptr [rsp+116], 4
+ jmp L_break_loop_with_status
+
+L_break_loop:
+ mov dword ptr [rsp+116], 0
+
+L_break_loop_with_status:
+; /* put in, out, bits, and hold back into ar and pop esp */
+ mov [rsp+16], rsi ; /* in */
+ mov [rsp+32], rdi ; /* out */
+ mov [rsp+88], ebx ; /* bits */
+ mov [rsp+80], rdx ; /* hold */
+
+ mov rax, [rsp] ; /* restore rbp and rsp */
+ mov rbp, [rsp+8]
+ mov rsp, rax
+
+
+
+ mov rsi,[rsp-8]
+ mov rdi,[rsp-16]
+ mov r12,[rsp-24]
+ mov r13,[rsp-32]
+ mov r14,[rsp-40]
+ mov r15,[rsp-48]
+ mov rbx,[rsp-56]
+
+ ret 0
+; :
+; : "m" (ar)
+; : "memory", "%rax", "%rbx", "%rcx", "%rdx", "%rsi", "%rdi",
+; "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15"
+; );
+
+inffas8664fnc ENDP
+;_TEXT ENDS
+END
diff --git a/contrib/zlib/contrib/masmx64/readme.txt b/contrib/zlib/contrib/masmx64/readme.txt
new file mode 100644
index 000000000..652571c7a
--- /dev/null
+++ b/contrib/zlib/contrib/masmx64/readme.txt
@@ -0,0 +1,31 @@
+Summary
+-------
+This directory contains ASM implementations of the functions
+longest_match() and inflate_fast(), for 64 bits x86 (both AMD64 and Intel EM64t),
+for use with Microsoft Macro Assembler (x64) for AMD64 and Microsoft C++ 64 bits.
+
+gvmat64.asm is written by Gilles Vollant (2005), by using Brian Raiter 686/32 bits
+ assembly optimized version from Jean-loup Gailly original longest_match function
+
+inffasx64.asm and inffas8664.c were written by Chris Anderson, by optimizing
+ original function from Mark Adler
+
+Use instructions
+----------------
+Assemble the .asm files using MASM and put the object files into the zlib source
+directory. You can also get object files here:
+
+ http://www.winimage.com/zLibDll/zlib124_masm_obj.zip
+
+define ASMV and ASMINF in your project. Include inffas8664.c in your source tree,
+and inffasx64.obj and gvmat64.obj as object to link.
+
+
+Build instructions
+------------------
+run bld_64.bat with Microsoft Macro Assembler (x64) for AMD64 (ml64.exe)
+
+ml64.exe is given with Visual Studio 2005, Windows 2003 server DDK
+
+You can get Windows 2003 server DDK with ml64 and cl for AMD64 from
+ http://www.microsoft.com/whdc/devtools/ddk/default.mspx for low price)
diff --git a/contrib/zlib/contrib/masmx86/bld_ml32.bat b/contrib/zlib/contrib/masmx86/bld_ml32.bat
new file mode 100644
index 000000000..fcf5755e4
--- /dev/null
+++ b/contrib/zlib/contrib/masmx86/bld_ml32.bat
@@ -0,0 +1,2 @@
+ml /coff /Zi /c /Flmatch686.lst match686.asm
+ml /coff /Zi /c /Flinffas32.lst inffas32.asm
diff --git a/contrib/zlib/contrib/masmx86/inffas32.asm b/contrib/zlib/contrib/masmx86/inffas32.asm
new file mode 100644
index 000000000..cb37a81e4
--- /dev/null
+++ b/contrib/zlib/contrib/masmx86/inffas32.asm
@@ -0,0 +1,1080 @@
+;/* inffas32.asm is a hand tuned assembler version of inffast.c -- fast decoding
+; *
+; * inffas32.asm is derivated from inffas86.c, with translation of assembly code
+; *
+; * Copyright (C) 1995-2003 Mark Adler
+; * For conditions of distribution and use, see copyright notice in zlib.h
+; *
+; * Copyright (C) 2003 Chris Anderson <christop@charm.net>
+; * Please use the copyright conditions above.
+; *
+; * Mar-13-2003 -- Most of this is derived from inffast.S which is derived from
+; * the gcc -S output of zlib-1.2.0/inffast.c. Zlib-1.2.0 is in beta release at
+; * the moment. I have successfully compiled and tested this code with gcc2.96,
+; * gcc3.2, icc5.0, msvc6.0. It is very close to the speed of inffast.S
+; * compiled with gcc -DNO_MMX, but inffast.S is still faster on the P3 with MMX
+; * enabled. I will attempt to merge the MMX code into this version. Newer
+; * versions of this and inffast.S can be found at
+; * http://www.eetbeetee.com/zlib/ and http://www.charm.net/~christop/zlib/
+; *
+; * 2005 : modification by Gilles Vollant
+; */
+; For Visual C++ 4.x and higher and ML 6.x and higher
+; ml.exe is in directory \MASM611C of Win95 DDK
+; ml.exe is also distributed in http://www.masm32.com/masmdl.htm
+; and in VC++2003 toolkit at http://msdn.microsoft.com/visualc/vctoolkit2003/
+;
+;
+; compile with command line option
+; ml /coff /Zi /c /Flinffas32.lst inffas32.asm
+
+; if you define NO_GZIP (see inflate.h), compile with
+; ml /coff /Zi /c /Flinffas32.lst /DNO_GUNZIP inffas32.asm
+
+
+; zlib122sup is 0 fort zlib 1.2.2.1 and lower
+; zlib122sup is 8 fort zlib 1.2.2.2 and more (with addition of dmax and head
+; in inflate_state in inflate.h)
+zlib1222sup equ 8
+
+
+IFDEF GUNZIP
+ INFLATE_MODE_TYPE equ 11
+ INFLATE_MODE_BAD equ 26
+ELSE
+ IFNDEF NO_GUNZIP
+ INFLATE_MODE_TYPE equ 11
+ INFLATE_MODE_BAD equ 26
+ ELSE
+ INFLATE_MODE_TYPE equ 3
+ INFLATE_MODE_BAD equ 17
+ ENDIF
+ENDIF
+
+
+; 75 "inffast.S"
+;FILE "inffast.S"
+
+;;;GLOBAL _inflate_fast
+
+;;;SECTION .text
+
+
+
+ .586p
+ .mmx
+
+ name inflate_fast_x86
+ .MODEL FLAT
+
+_DATA segment
+inflate_fast_use_mmx:
+ dd 1
+
+
+_TEXT segment
+
+
+
+ALIGN 4
+ db 'Fast decoding Code from Chris Anderson'
+ db 0
+
+ALIGN 4
+invalid_literal_length_code_msg:
+ db 'invalid literal/length code'
+ db 0
+
+ALIGN 4
+invalid_distance_code_msg:
+ db 'invalid distance code'
+ db 0
+
+ALIGN 4
+invalid_distance_too_far_msg:
+ db 'invalid distance too far back'
+ db 0
+
+
+ALIGN 4
+inflate_fast_mask:
+dd 0
+dd 1
+dd 3
+dd 7
+dd 15
+dd 31
+dd 63
+dd 127
+dd 255
+dd 511
+dd 1023
+dd 2047
+dd 4095
+dd 8191
+dd 16383
+dd 32767
+dd 65535
+dd 131071
+dd 262143
+dd 524287
+dd 1048575
+dd 2097151
+dd 4194303
+dd 8388607
+dd 16777215
+dd 33554431
+dd 67108863
+dd 134217727
+dd 268435455
+dd 536870911
+dd 1073741823
+dd 2147483647
+dd 4294967295
+
+
+mode_state equ 0 ;/* state->mode */
+wsize_state equ (32+zlib1222sup) ;/* state->wsize */
+write_state equ (36+4+zlib1222sup) ;/* state->write */
+window_state equ (40+4+zlib1222sup) ;/* state->window */
+hold_state equ (44+4+zlib1222sup) ;/* state->hold */
+bits_state equ (48+4+zlib1222sup) ;/* state->bits */
+lencode_state equ (64+4+zlib1222sup) ;/* state->lencode */
+distcode_state equ (68+4+zlib1222sup) ;/* state->distcode */
+lenbits_state equ (72+4+zlib1222sup) ;/* state->lenbits */
+distbits_state equ (76+4+zlib1222sup) ;/* state->distbits */
+
+
+;;SECTION .text
+; 205 "inffast.S"
+;GLOBAL inflate_fast_use_mmx
+
+;SECTION .data
+
+
+; GLOBAL inflate_fast_use_mmx:object
+;.size inflate_fast_use_mmx, 4
+; 226 "inffast.S"
+;SECTION .text
+
+ALIGN 4
+_inflate_fast proc near
+.FPO (16, 4, 0, 0, 1, 0)
+ push edi
+ push esi
+ push ebp
+ push ebx
+ pushfd
+ sub esp,64
+ cld
+
+
+
+
+ mov esi, [esp+88]
+ mov edi, [esi+28]
+
+
+
+
+
+
+
+ mov edx, [esi+4]
+ mov eax, [esi+0]
+
+ add edx,eax
+ sub edx,11
+
+ mov [esp+44],eax
+ mov [esp+20],edx
+
+ mov ebp, [esp+92]
+ mov ecx, [esi+16]
+ mov ebx, [esi+12]
+
+ sub ebp,ecx
+ neg ebp
+ add ebp,ebx
+
+ sub ecx,257
+ add ecx,ebx
+
+ mov [esp+60],ebx
+ mov [esp+40],ebp
+ mov [esp+16],ecx
+; 285 "inffast.S"
+ mov eax, [edi+lencode_state]
+ mov ecx, [edi+distcode_state]
+
+ mov [esp+8],eax
+ mov [esp+12],ecx
+
+ mov eax,1
+ mov ecx, [edi+lenbits_state]
+ shl eax,cl
+ dec eax
+ mov [esp+0],eax
+
+ mov eax,1
+ mov ecx, [edi+distbits_state]
+ shl eax,cl
+ dec eax
+ mov [esp+4],eax
+
+ mov eax, [edi+wsize_state]
+ mov ecx, [edi+write_state]
+ mov edx, [edi+window_state]
+
+ mov [esp+52],eax
+ mov [esp+48],ecx
+ mov [esp+56],edx
+
+ mov ebp, [edi+hold_state]
+ mov ebx, [edi+bits_state]
+; 321 "inffast.S"
+ mov esi, [esp+44]
+ mov ecx, [esp+20]
+ cmp ecx,esi
+ ja L_align_long
+
+ add ecx,11
+ sub ecx,esi
+ mov eax,12
+ sub eax,ecx
+ lea edi, [esp+28]
+ rep movsb
+ mov ecx,eax
+ xor eax,eax
+ rep stosb
+ lea esi, [esp+28]
+ mov [esp+20],esi
+ jmp L_is_aligned
+
+
+L_align_long:
+ test esi,3
+ jz L_is_aligned
+ xor eax,eax
+ mov al, [esi]
+ inc esi
+ mov ecx,ebx
+ add ebx,8
+ shl eax,cl
+ or ebp,eax
+ jmp L_align_long
+
+L_is_aligned:
+ mov edi, [esp+60]
+; 366 "inffast.S"
+L_check_mmx:
+ cmp dword ptr [inflate_fast_use_mmx],2
+ je L_init_mmx
+ ja L_do_loop
+
+ push eax
+ push ebx
+ push ecx
+ push edx
+ pushfd
+ mov eax, [esp]
+ xor dword ptr [esp],0200000h
+
+
+
+
+ popfd
+ pushfd
+ pop edx
+ xor edx,eax
+ jz L_dont_use_mmx
+ xor eax,eax
+ cpuid
+ cmp ebx,0756e6547h
+ jne L_dont_use_mmx
+ cmp ecx,06c65746eh
+ jne L_dont_use_mmx
+ cmp edx,049656e69h
+ jne L_dont_use_mmx
+ mov eax,1
+ cpuid
+ shr eax,8
+ and eax,15
+ cmp eax,6
+ jne L_dont_use_mmx
+ test edx,0800000h
+ jnz L_use_mmx
+ jmp L_dont_use_mmx
+L_use_mmx:
+ mov dword ptr [inflate_fast_use_mmx],2
+ jmp L_check_mmx_pop
+L_dont_use_mmx:
+ mov dword ptr [inflate_fast_use_mmx],3
+L_check_mmx_pop:
+ pop edx
+ pop ecx
+ pop ebx
+ pop eax
+ jmp L_check_mmx
+; 426 "inffast.S"
+ALIGN 4
+L_do_loop:
+; 437 "inffast.S"
+ cmp bl,15
+ ja L_get_length_code
+
+ xor eax,eax
+ lodsw
+ mov cl,bl
+ add bl,16
+ shl eax,cl
+ or ebp,eax
+
+L_get_length_code:
+ mov edx, [esp+0]
+ mov ecx, [esp+8]
+ and edx,ebp
+ mov eax, [ecx+edx*4]
+
+L_dolen:
+
+
+
+
+
+
+ mov cl,ah
+ sub bl,ah
+ shr ebp,cl
+
+
+
+
+
+
+ test al,al
+ jnz L_test_for_length_base
+
+ shr eax,16
+ stosb
+
+L_while_test:
+
+
+ cmp [esp+16],edi
+ jbe L_break_loop
+
+ cmp [esp+20],esi
+ ja L_do_loop
+ jmp L_break_loop
+
+L_test_for_length_base:
+; 502 "inffast.S"
+ mov edx,eax
+ shr edx,16
+ mov cl,al
+
+ test al,16
+ jz L_test_for_second_level_length
+ and cl,15
+ jz L_save_len
+ cmp bl,cl
+ jae L_add_bits_to_len
+
+ mov ch,cl
+ xor eax,eax
+ lodsw
+ mov cl,bl
+ add bl,16
+ shl eax,cl
+ or ebp,eax
+ mov cl,ch
+
+L_add_bits_to_len:
+ mov eax,1
+ shl eax,cl
+ dec eax
+ sub bl,cl
+ and eax,ebp
+ shr ebp,cl
+ add edx,eax
+
+L_save_len:
+ mov [esp+24],edx
+
+
+L_decode_distance:
+; 549 "inffast.S"
+ cmp bl,15
+ ja L_get_distance_code
+
+ xor eax,eax
+ lodsw
+ mov cl,bl
+ add bl,16
+ shl eax,cl
+ or ebp,eax
+
+L_get_distance_code:
+ mov edx, [esp+4]
+ mov ecx, [esp+12]
+ and edx,ebp
+ mov eax, [ecx+edx*4]
+
+
+L_dodist:
+ mov edx,eax
+ shr edx,16
+ mov cl,ah
+ sub bl,ah
+ shr ebp,cl
+; 584 "inffast.S"
+ mov cl,al
+
+ test al,16
+ jz L_test_for_second_level_dist
+ and cl,15
+ jz L_check_dist_one
+ cmp bl,cl
+ jae L_add_bits_to_dist
+
+ mov ch,cl
+ xor eax,eax
+ lodsw
+ mov cl,bl
+ add bl,16
+ shl eax,cl
+ or ebp,eax
+ mov cl,ch
+
+L_add_bits_to_dist:
+ mov eax,1
+ shl eax,cl
+ dec eax
+ sub bl,cl
+ and eax,ebp
+ shr ebp,cl
+ add edx,eax
+ jmp L_check_window
+
+L_check_window:
+; 625 "inffast.S"
+ mov [esp+44],esi
+ mov eax,edi
+ sub eax, [esp+40]
+
+ cmp eax,edx
+ jb L_clip_window
+
+ mov ecx, [esp+24]
+ mov esi,edi
+ sub esi,edx
+
+ sub ecx,3
+ mov al, [esi]
+ mov [edi],al
+ mov al, [esi+1]
+ mov dl, [esi+2]
+ add esi,3
+ mov [edi+1],al
+ mov [edi+2],dl
+ add edi,3
+ rep movsb
+
+ mov esi, [esp+44]
+ jmp L_while_test
+
+ALIGN 4
+L_check_dist_one:
+ cmp edx,1
+ jne L_check_window
+ cmp [esp+40],edi
+ je L_check_window
+
+ dec edi
+ mov ecx, [esp+24]
+ mov al, [edi]
+ sub ecx,3
+
+ mov [edi+1],al
+ mov [edi+2],al
+ mov [edi+3],al
+ add edi,4
+ rep stosb
+
+ jmp L_while_test
+
+ALIGN 4
+L_test_for_second_level_length:
+
+
+
+
+ test al,64
+ jnz L_test_for_end_of_block
+
+ mov eax,1
+ shl eax,cl
+ dec eax
+ and eax,ebp
+ add eax,edx
+ mov edx, [esp+8]
+ mov eax, [edx+eax*4]
+ jmp L_dolen
+
+ALIGN 4
+L_test_for_second_level_dist:
+
+
+
+
+ test al,64
+ jnz L_invalid_distance_code
+
+ mov eax,1
+ shl eax,cl
+ dec eax
+ and eax,ebp
+ add eax,edx
+ mov edx, [esp+12]
+ mov eax, [edx+eax*4]
+ jmp L_dodist
+
+ALIGN 4
+L_clip_window:
+; 721 "inffast.S"
+ mov ecx,eax
+ mov eax, [esp+52]
+ neg ecx
+ mov esi, [esp+56]
+
+ cmp eax,edx
+ jb L_invalid_distance_too_far
+
+ add ecx,edx
+ cmp dword ptr [esp+48],0
+ jne L_wrap_around_window
+
+ sub eax,ecx
+ add esi,eax
+; 749 "inffast.S"
+ mov eax, [esp+24]
+ cmp eax,ecx
+ jbe L_do_copy1
+
+ sub eax,ecx
+ rep movsb
+ mov esi,edi
+ sub esi,edx
+ jmp L_do_copy1
+
+ cmp eax,ecx
+ jbe L_do_copy1
+
+ sub eax,ecx
+ rep movsb
+ mov esi,edi
+ sub esi,edx
+ jmp L_do_copy1
+
+L_wrap_around_window:
+; 793 "inffast.S"
+ mov eax, [esp+48]
+ cmp ecx,eax
+ jbe L_contiguous_in_window
+
+ add esi, [esp+52]
+ add esi,eax
+ sub esi,ecx
+ sub ecx,eax
+
+
+ mov eax, [esp+24]
+ cmp eax,ecx
+ jbe L_do_copy1
+
+ sub eax,ecx
+ rep movsb
+ mov esi, [esp+56]
+ mov ecx, [esp+48]
+ cmp eax,ecx
+ jbe L_do_copy1
+
+ sub eax,ecx
+ rep movsb
+ mov esi,edi
+ sub esi,edx
+ jmp L_do_copy1
+
+L_contiguous_in_window:
+; 836 "inffast.S"
+ add esi,eax
+ sub esi,ecx
+
+
+ mov eax, [esp+24]
+ cmp eax,ecx
+ jbe L_do_copy1
+
+ sub eax,ecx
+ rep movsb
+ mov esi,edi
+ sub esi,edx
+
+L_do_copy1:
+; 862 "inffast.S"
+ mov ecx,eax
+ rep movsb
+
+ mov esi, [esp+44]
+ jmp L_while_test
+; 878 "inffast.S"
+ALIGN 4
+L_init_mmx:
+ emms
+
+
+
+
+
+ movd mm0,ebp
+ mov ebp,ebx
+; 896 "inffast.S"
+ movd mm4,dword ptr [esp+0]
+ movq mm3,mm4
+ movd mm5,dword ptr [esp+4]
+ movq mm2,mm5
+ pxor mm1,mm1
+ mov ebx, [esp+8]
+ jmp L_do_loop_mmx
+
+ALIGN 4
+L_do_loop_mmx:
+ psrlq mm0,mm1
+
+ cmp ebp,32
+ ja L_get_length_code_mmx
+
+ movd mm6,ebp
+ movd mm7,dword ptr [esi]
+ add esi,4
+ psllq mm7,mm6
+ add ebp,32
+ por mm0,mm7
+
+L_get_length_code_mmx:
+ pand mm4,mm0
+ movd eax,mm4
+ movq mm4,mm3
+ mov eax, [ebx+eax*4]
+
+L_dolen_mmx:
+ movzx ecx,ah
+ movd mm1,ecx
+ sub ebp,ecx
+
+ test al,al
+ jnz L_test_for_length_base_mmx
+
+ shr eax,16
+ stosb
+
+L_while_test_mmx:
+
+
+ cmp [esp+16],edi
+ jbe L_break_loop
+
+ cmp [esp+20],esi
+ ja L_do_loop_mmx
+ jmp L_break_loop
+
+L_test_for_length_base_mmx:
+
+ mov edx,eax
+ shr edx,16
+
+ test al,16
+ jz L_test_for_second_level_length_mmx
+ and eax,15
+ jz L_decode_distance_mmx
+
+ psrlq mm0,mm1
+ movd mm1,eax
+ movd ecx,mm0
+ sub ebp,eax
+ and ecx, [inflate_fast_mask+eax*4]
+ add edx,ecx
+
+L_decode_distance_mmx:
+ psrlq mm0,mm1
+
+ cmp ebp,32
+ ja L_get_dist_code_mmx
+
+ movd mm6,ebp
+ movd mm7,dword ptr [esi]
+ add esi,4
+ psllq mm7,mm6
+ add ebp,32
+ por mm0,mm7
+
+L_get_dist_code_mmx:
+ mov ebx, [esp+12]
+ pand mm5,mm0
+ movd eax,mm5
+ movq mm5,mm2
+ mov eax, [ebx+eax*4]
+
+L_dodist_mmx:
+
+ movzx ecx,ah
+ mov ebx,eax
+ shr ebx,16
+ sub ebp,ecx
+ movd mm1,ecx
+
+ test al,16
+ jz L_test_for_second_level_dist_mmx
+ and eax,15
+ jz L_check_dist_one_mmx
+
+L_add_bits_to_dist_mmx:
+ psrlq mm0,mm1
+ movd mm1,eax
+ movd ecx,mm0
+ sub ebp,eax
+ and ecx, [inflate_fast_mask+eax*4]
+ add ebx,ecx
+
+L_check_window_mmx:
+ mov [esp+44],esi
+ mov eax,edi
+ sub eax, [esp+40]
+
+ cmp eax,ebx
+ jb L_clip_window_mmx
+
+ mov ecx,edx
+ mov esi,edi
+ sub esi,ebx
+
+ sub ecx,3
+ mov al, [esi]
+ mov [edi],al
+ mov al, [esi+1]
+ mov dl, [esi+2]
+ add esi,3
+ mov [edi+1],al
+ mov [edi+2],dl
+ add edi,3
+ rep movsb
+
+ mov esi, [esp+44]
+ mov ebx, [esp+8]
+ jmp L_while_test_mmx
+
+ALIGN 4
+L_check_dist_one_mmx:
+ cmp ebx,1
+ jne L_check_window_mmx
+ cmp [esp+40],edi
+ je L_check_window_mmx
+
+ dec edi
+ mov ecx,edx
+ mov al, [edi]
+ sub ecx,3
+
+ mov [edi+1],al
+ mov [edi+2],al
+ mov [edi+3],al
+ add edi,4
+ rep stosb
+
+ mov ebx, [esp+8]
+ jmp L_while_test_mmx
+
+ALIGN 4
+L_test_for_second_level_length_mmx:
+ test al,64
+ jnz L_test_for_end_of_block
+
+ and eax,15
+ psrlq mm0,mm1
+ movd ecx,mm0
+ and ecx, [inflate_fast_mask+eax*4]
+ add ecx,edx
+ mov eax, [ebx+ecx*4]
+ jmp L_dolen_mmx
+
+ALIGN 4
+L_test_for_second_level_dist_mmx:
+ test al,64
+ jnz L_invalid_distance_code
+
+ and eax,15
+ psrlq mm0,mm1
+ movd ecx,mm0
+ and ecx, [inflate_fast_mask+eax*4]
+ mov eax, [esp+12]
+ add ecx,ebx
+ mov eax, [eax+ecx*4]
+ jmp L_dodist_mmx
+
+ALIGN 4
+L_clip_window_mmx:
+
+ mov ecx,eax
+ mov eax, [esp+52]
+ neg ecx
+ mov esi, [esp+56]
+
+ cmp eax,ebx
+ jb L_invalid_distance_too_far
+
+ add ecx,ebx
+ cmp dword ptr [esp+48],0
+ jne L_wrap_around_window_mmx
+
+ sub eax,ecx
+ add esi,eax
+
+ cmp edx,ecx
+ jbe L_do_copy1_mmx
+
+ sub edx,ecx
+ rep movsb
+ mov esi,edi
+ sub esi,ebx
+ jmp L_do_copy1_mmx
+
+ cmp edx,ecx
+ jbe L_do_copy1_mmx
+
+ sub edx,ecx
+ rep movsb
+ mov esi,edi
+ sub esi,ebx
+ jmp L_do_copy1_mmx
+
+L_wrap_around_window_mmx:
+
+ mov eax, [esp+48]
+ cmp ecx,eax
+ jbe L_contiguous_in_window_mmx
+
+ add esi, [esp+52]
+ add esi,eax
+ sub esi,ecx
+ sub ecx,eax
+
+
+ cmp edx,ecx
+ jbe L_do_copy1_mmx
+
+ sub edx,ecx
+ rep movsb
+ mov esi, [esp+56]
+ mov ecx, [esp+48]
+ cmp edx,ecx
+ jbe L_do_copy1_mmx
+
+ sub edx,ecx
+ rep movsb
+ mov esi,edi
+ sub esi,ebx
+ jmp L_do_copy1_mmx
+
+L_contiguous_in_window_mmx:
+
+ add esi,eax
+ sub esi,ecx
+
+
+ cmp edx,ecx
+ jbe L_do_copy1_mmx
+
+ sub edx,ecx
+ rep movsb
+ mov esi,edi
+ sub esi,ebx
+
+L_do_copy1_mmx:
+
+
+ mov ecx,edx
+ rep movsb
+
+ mov esi, [esp+44]
+ mov ebx, [esp+8]
+ jmp L_while_test_mmx
+; 1174 "inffast.S"
+L_invalid_distance_code:
+
+
+
+
+
+ mov ecx, invalid_distance_code_msg
+ mov edx,INFLATE_MODE_BAD
+ jmp L_update_stream_state
+
+L_test_for_end_of_block:
+
+
+
+
+
+ test al,32
+ jz L_invalid_literal_length_code
+
+ mov ecx,0
+ mov edx,INFLATE_MODE_TYPE
+ jmp L_update_stream_state
+
+L_invalid_literal_length_code:
+
+
+
+
+
+ mov ecx, invalid_literal_length_code_msg
+ mov edx,INFLATE_MODE_BAD
+ jmp L_update_stream_state
+
+L_invalid_distance_too_far:
+
+
+
+ mov esi, [esp+44]
+ mov ecx, invalid_distance_too_far_msg
+ mov edx,INFLATE_MODE_BAD
+ jmp L_update_stream_state
+
+L_update_stream_state:
+
+ mov eax, [esp+88]
+ test ecx,ecx
+ jz L_skip_msg
+ mov [eax+24],ecx
+L_skip_msg:
+ mov eax, [eax+28]
+ mov [eax+mode_state],edx
+ jmp L_break_loop
+
+ALIGN 4
+L_break_loop:
+; 1243 "inffast.S"
+ cmp dword ptr [inflate_fast_use_mmx],2
+ jne L_update_next_in
+
+
+
+ mov ebx,ebp
+
+L_update_next_in:
+; 1266 "inffast.S"
+ mov eax, [esp+88]
+ mov ecx,ebx
+ mov edx, [eax+28]
+ shr ecx,3
+ sub esi,ecx
+ shl ecx,3
+ sub ebx,ecx
+ mov [eax+12],edi
+ mov [edx+bits_state],ebx
+ mov ecx,ebx
+
+ lea ebx, [esp+28]
+ cmp [esp+20],ebx
+ jne L_buf_not_used
+
+ sub esi,ebx
+ mov ebx, [eax+0]
+ mov [esp+20],ebx
+ add esi,ebx
+ mov ebx, [eax+4]
+ sub ebx,11
+ add [esp+20],ebx
+
+L_buf_not_used:
+ mov [eax+0],esi
+
+ mov ebx,1
+ shl ebx,cl
+ dec ebx
+
+
+
+
+
+ cmp dword ptr [inflate_fast_use_mmx],2
+ jne L_update_hold
+
+
+
+ psrlq mm0,mm1
+ movd ebp,mm0
+
+ emms
+
+L_update_hold:
+
+
+
+ and ebp,ebx
+ mov [edx+hold_state],ebp
+
+
+
+
+ mov ebx, [esp+20]
+ cmp ebx,esi
+ jbe L_last_is_smaller
+
+ sub ebx,esi
+ add ebx,11
+ mov [eax+4],ebx
+ jmp L_fixup_out
+L_last_is_smaller:
+ sub esi,ebx
+ neg esi
+ add esi,11
+ mov [eax+4],esi
+
+
+
+
+L_fixup_out:
+
+ mov ebx, [esp+16]
+ cmp ebx,edi
+ jbe L_end_is_smaller
+
+ sub ebx,edi
+ add ebx,257
+ mov [eax+16],ebx
+ jmp L_done
+L_end_is_smaller:
+ sub edi,ebx
+ neg edi
+ add edi,257
+ mov [eax+16],edi
+
+
+
+
+
+L_done:
+ add esp,64
+ popfd
+ pop ebx
+ pop ebp
+ pop esi
+ pop edi
+ ret
+_inflate_fast endp
+
+_TEXT ends
+end
diff --git a/contrib/zlib/contrib/masmx86/match686.asm b/contrib/zlib/contrib/masmx86/match686.asm
new file mode 100644
index 000000000..69e0eed01
--- /dev/null
+++ b/contrib/zlib/contrib/masmx86/match686.asm
@@ -0,0 +1,479 @@
+; match686.asm -- Asm portion of the optimized longest_match for 32 bits x86
+; Copyright (C) 1995-1996 Jean-loup Gailly, Brian Raiter and Gilles Vollant.
+; File written by Gilles Vollant, by converting match686.S from Brian Raiter
+; for MASM. This is as assembly version of longest_match
+; from Jean-loup Gailly in deflate.c
+;
+; http://www.zlib.net
+; http://www.winimage.com/zLibDll
+; http://www.muppetlabs.com/~breadbox/software/assembly.html
+;
+; For Visual C++ 4.x and higher and ML 6.x and higher
+; ml.exe is distributed in
+; http://www.microsoft.com/downloads/details.aspx?FamilyID=7a1c9da0-0510-44a2-b042-7ef370530c64
+;
+; this file contain two implementation of longest_match
+;
+; this longest_match was written by Brian raiter (1998), optimized for Pentium Pro
+; (and the faster known version of match_init on modern Core 2 Duo and AMD Phenom)
+;
+; for using an assembly version of longest_match, you need define ASMV in project
+;
+; compile the asm file running
+; ml /coff /Zi /c /Flmatch686.lst match686.asm
+; and do not include match686.obj in your project
+;
+; note: contrib of zLib 1.2.3 and earlier contained both a deprecated version for
+; Pentium (prior Pentium Pro) and this version for Pentium Pro and modern processor
+; with autoselect (with cpu detection code)
+; if you want support the old pentium optimization, you can still use these version
+;
+; this file is not optimized for old pentium, but it compatible with all x86 32 bits
+; processor (starting 80386)
+;
+;
+; see below : zlib1222add must be adjuster if you use a zlib version < 1.2.2.2
+
+;uInt longest_match(s, cur_match)
+; deflate_state *s;
+; IPos cur_match; /* current match */
+
+ NbStack equ 76
+ cur_match equ dword ptr[esp+NbStack-0]
+ str_s equ dword ptr[esp+NbStack-4]
+; 5 dword on top (ret,ebp,esi,edi,ebx)
+ adrret equ dword ptr[esp+NbStack-8]
+ pushebp equ dword ptr[esp+NbStack-12]
+ pushedi equ dword ptr[esp+NbStack-16]
+ pushesi equ dword ptr[esp+NbStack-20]
+ pushebx equ dword ptr[esp+NbStack-24]
+
+ chain_length equ dword ptr [esp+NbStack-28]
+ limit equ dword ptr [esp+NbStack-32]
+ best_len equ dword ptr [esp+NbStack-36]
+ window equ dword ptr [esp+NbStack-40]
+ prev equ dword ptr [esp+NbStack-44]
+ scan_start equ word ptr [esp+NbStack-48]
+ wmask equ dword ptr [esp+NbStack-52]
+ match_start_ptr equ dword ptr [esp+NbStack-56]
+ nice_match equ dword ptr [esp+NbStack-60]
+ scan equ dword ptr [esp+NbStack-64]
+
+ windowlen equ dword ptr [esp+NbStack-68]
+ match_start equ dword ptr [esp+NbStack-72]
+ strend equ dword ptr [esp+NbStack-76]
+ NbStackAdd equ (NbStack-24)
+
+ .386p
+
+ name gvmatch
+ .MODEL FLAT
+
+
+
+; all the +zlib1222add offsets are due to the addition of fields
+; in zlib in the deflate_state structure since the asm code was first written
+; (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)").
+; (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0").
+; if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8").
+
+ zlib1222add equ 8
+
+; Note : these value are good with a 8 bytes boundary pack structure
+ dep_chain_length equ 74h+zlib1222add
+ dep_window equ 30h+zlib1222add
+ dep_strstart equ 64h+zlib1222add
+ dep_prev_length equ 70h+zlib1222add
+ dep_nice_match equ 88h+zlib1222add
+ dep_w_size equ 24h+zlib1222add
+ dep_prev equ 38h+zlib1222add
+ dep_w_mask equ 2ch+zlib1222add
+ dep_good_match equ 84h+zlib1222add
+ dep_match_start equ 68h+zlib1222add
+ dep_lookahead equ 6ch+zlib1222add
+
+
+_TEXT segment
+
+IFDEF NOUNDERLINE
+ public longest_match
+ public match_init
+ELSE
+ public _longest_match
+ public _match_init
+ENDIF
+
+ MAX_MATCH equ 258
+ MIN_MATCH equ 3
+ MIN_LOOKAHEAD equ (MAX_MATCH+MIN_MATCH+1)
+
+
+
+MAX_MATCH equ 258
+MIN_MATCH equ 3
+MIN_LOOKAHEAD equ (MAX_MATCH + MIN_MATCH + 1)
+MAX_MATCH_8_ equ ((MAX_MATCH + 7) AND 0FFF0h)
+
+
+;;; stack frame offsets
+
+chainlenwmask equ esp + 0 ; high word: current chain len
+ ; low word: s->wmask
+window equ esp + 4 ; local copy of s->window
+windowbestlen equ esp + 8 ; s->window + bestlen
+scanstart equ esp + 16 ; first two bytes of string
+scanend equ esp + 12 ; last two bytes of string
+scanalign equ esp + 20 ; dword-misalignment of string
+nicematch equ esp + 24 ; a good enough match size
+bestlen equ esp + 28 ; size of best match so far
+scan equ esp + 32 ; ptr to string wanting match
+
+LocalVarsSize equ 36
+; saved ebx byte esp + 36
+; saved edi byte esp + 40
+; saved esi byte esp + 44
+; saved ebp byte esp + 48
+; return address byte esp + 52
+deflatestate equ esp + 56 ; the function arguments
+curmatch equ esp + 60
+
+;;; Offsets for fields in the deflate_state structure. These numbers
+;;; are calculated from the definition of deflate_state, with the
+;;; assumption that the compiler will dword-align the fields. (Thus,
+;;; changing the definition of deflate_state could easily cause this
+;;; program to crash horribly, without so much as a warning at
+;;; compile time. Sigh.)
+
+dsWSize equ 36+zlib1222add
+dsWMask equ 44+zlib1222add
+dsWindow equ 48+zlib1222add
+dsPrev equ 56+zlib1222add
+dsMatchLen equ 88+zlib1222add
+dsPrevMatch equ 92+zlib1222add
+dsStrStart equ 100+zlib1222add
+dsMatchStart equ 104+zlib1222add
+dsLookahead equ 108+zlib1222add
+dsPrevLen equ 112+zlib1222add
+dsMaxChainLen equ 116+zlib1222add
+dsGoodMatch equ 132+zlib1222add
+dsNiceMatch equ 136+zlib1222add
+
+
+;;; match686.asm -- Pentium-Pro-optimized version of longest_match()
+;;; Written for zlib 1.1.2
+;;; Copyright (C) 1998 Brian Raiter <breadbox@muppetlabs.com>
+;;; You can look at http://www.muppetlabs.com/~breadbox/software/assembly.html
+;;;
+;;
+;; This software is provided 'as-is', without any express or implied
+;; warranty. In no event will the authors be held liable for any damages
+;; arising from the use of this software.
+;;
+;; Permission is granted to anyone to use this software for any purpose,
+;; including commercial applications, and to alter it and redistribute it
+;; freely, subject to the following restrictions:
+;;
+;; 1. The origin of this software must not be misrepresented; you must not
+;; claim that you wrote the original software. If you use this software
+;; in a product, an acknowledgment in the product documentation would be
+;; appreciated but is not required.
+;; 2. Altered source versions must be plainly marked as such, and must not be
+;; misrepresented as being the original software
+;; 3. This notice may not be removed or altered from any source distribution.
+;;
+
+;GLOBAL _longest_match, _match_init
+
+
+;SECTION .text
+
+;;; uInt longest_match(deflate_state *deflatestate, IPos curmatch)
+
+;_longest_match:
+ IFDEF NOUNDERLINE
+ longest_match proc near
+ ELSE
+ _longest_match proc near
+ ENDIF
+.FPO (9, 4, 0, 0, 1, 0)
+
+;;; Save registers that the compiler may be using, and adjust esp to
+;;; make room for our stack frame.
+
+ push ebp
+ push edi
+ push esi
+ push ebx
+ sub esp, LocalVarsSize
+
+;;; Retrieve the function arguments. ecx will hold cur_match
+;;; throughout the entire function. edx will hold the pointer to the
+;;; deflate_state structure during the function's setup (before
+;;; entering the main loop.
+
+ mov edx, [deflatestate]
+ mov ecx, [curmatch]
+
+;;; uInt wmask = s->w_mask;
+;;; unsigned chain_length = s->max_chain_length;
+;;; if (s->prev_length >= s->good_match) {
+;;; chain_length >>= 2;
+;;; }
+
+ mov eax, [edx + dsPrevLen]
+ mov ebx, [edx + dsGoodMatch]
+ cmp eax, ebx
+ mov eax, [edx + dsWMask]
+ mov ebx, [edx + dsMaxChainLen]
+ jl LastMatchGood
+ shr ebx, 2
+LastMatchGood:
+
+;;; chainlen is decremented once beforehand so that the function can
+;;; use the sign flag instead of the zero flag for the exit test.
+;;; It is then shifted into the high word, to make room for the wmask
+;;; value, which it will always accompany.
+
+ dec ebx
+ shl ebx, 16
+ or ebx, eax
+ mov [chainlenwmask], ebx
+
+;;; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
+
+ mov eax, [edx + dsNiceMatch]
+ mov ebx, [edx + dsLookahead]
+ cmp ebx, eax
+ jl LookaheadLess
+ mov ebx, eax
+LookaheadLess: mov [nicematch], ebx
+
+;;; register Bytef *scan = s->window + s->strstart;
+
+ mov esi, [edx + dsWindow]
+ mov [window], esi
+ mov ebp, [edx + dsStrStart]
+ lea edi, [esi + ebp]
+ mov [scan], edi
+
+;;; Determine how many bytes the scan ptr is off from being
+;;; dword-aligned.
+
+ mov eax, edi
+ neg eax
+ and eax, 3
+ mov [scanalign], eax
+
+;;; IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
+;;; s->strstart - (IPos)MAX_DIST(s) : NIL;
+
+ mov eax, [edx + dsWSize]
+ sub eax, MIN_LOOKAHEAD
+ sub ebp, eax
+ jg LimitPositive
+ xor ebp, ebp
+LimitPositive:
+
+;;; int best_len = s->prev_length;
+
+ mov eax, [edx + dsPrevLen]
+ mov [bestlen], eax
+
+;;; Store the sum of s->window + best_len in esi locally, and in esi.
+
+ add esi, eax
+ mov [windowbestlen], esi
+
+;;; register ush scan_start = *(ushf*)scan;
+;;; register ush scan_end = *(ushf*)(scan+best_len-1);
+;;; Posf *prev = s->prev;
+
+ movzx ebx, word ptr [edi]
+ mov [scanstart], ebx
+ movzx ebx, word ptr [edi + eax - 1]
+ mov [scanend], ebx
+ mov edi, [edx + dsPrev]
+
+;;; Jump into the main loop.
+
+ mov edx, [chainlenwmask]
+ jmp short LoopEntry
+
+align 4
+
+;;; do {
+;;; match = s->window + cur_match;
+;;; if (*(ushf*)(match+best_len-1) != scan_end ||
+;;; *(ushf*)match != scan_start) continue;
+;;; [...]
+;;; } while ((cur_match = prev[cur_match & wmask]) > limit
+;;; && --chain_length != 0);
+;;;
+;;; Here is the inner loop of the function. The function will spend the
+;;; majority of its time in this loop, and majority of that time will
+;;; be spent in the first ten instructions.
+;;;
+;;; Within this loop:
+;;; ebx = scanend
+;;; ecx = curmatch
+;;; edx = chainlenwmask - i.e., ((chainlen << 16) | wmask)
+;;; esi = windowbestlen - i.e., (window + bestlen)
+;;; edi = prev
+;;; ebp = limit
+
+LookupLoop:
+ and ecx, edx
+ movzx ecx, word ptr [edi + ecx*2]
+ cmp ecx, ebp
+ jbe LeaveNow
+ sub edx, 00010000h
+ js LeaveNow
+LoopEntry: movzx eax, word ptr [esi + ecx - 1]
+ cmp eax, ebx
+ jnz LookupLoop
+ mov eax, [window]
+ movzx eax, word ptr [eax + ecx]
+ cmp eax, [scanstart]
+ jnz LookupLoop
+
+;;; Store the current value of chainlen.
+
+ mov [chainlenwmask], edx
+
+;;; Point edi to the string under scrutiny, and esi to the string we
+;;; are hoping to match it up with. In actuality, esi and edi are
+;;; both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and edx is
+;;; initialized to -(MAX_MATCH_8 - scanalign).
+
+ mov esi, [window]
+ mov edi, [scan]
+ add esi, ecx
+ mov eax, [scanalign]
+ mov edx, 0fffffef8h; -(MAX_MATCH_8)
+ lea edi, [edi + eax + 0108h] ;MAX_MATCH_8]
+ lea esi, [esi + eax + 0108h] ;MAX_MATCH_8]
+
+;;; Test the strings for equality, 8 bytes at a time. At the end,
+;;; adjust edx so that it is offset to the exact byte that mismatched.
+;;;
+;;; We already know at this point that the first three bytes of the
+;;; strings match each other, and they can be safely passed over before
+;;; starting the compare loop. So what this code does is skip over 0-3
+;;; bytes, as much as necessary in order to dword-align the edi
+;;; pointer. (esi will still be misaligned three times out of four.)
+;;;
+;;; It should be confessed that this loop usually does not represent
+;;; much of the total running time. Replacing it with a more
+;;; straightforward "rep cmpsb" would not drastically degrade
+;;; performance.
+
+LoopCmps:
+ mov eax, [esi + edx]
+ xor eax, [edi + edx]
+ jnz LeaveLoopCmps
+ mov eax, [esi + edx + 4]
+ xor eax, [edi + edx + 4]
+ jnz LeaveLoopCmps4
+ add edx, 8
+ jnz LoopCmps
+ jmp short LenMaximum
+LeaveLoopCmps4: add edx, 4
+LeaveLoopCmps: test eax, 0000FFFFh
+ jnz LenLower
+ add edx, 2
+ shr eax, 16
+LenLower: sub al, 1
+ adc edx, 0
+
+;;; Calculate the length of the match. If it is longer than MAX_MATCH,
+;;; then automatically accept it as the best possible match and leave.
+
+ lea eax, [edi + edx]
+ mov edi, [scan]
+ sub eax, edi
+ cmp eax, MAX_MATCH
+ jge LenMaximum
+
+;;; If the length of the match is not longer than the best match we
+;;; have so far, then forget it and return to the lookup loop.
+
+ mov edx, [deflatestate]
+ mov ebx, [bestlen]
+ cmp eax, ebx
+ jg LongerMatch
+ mov esi, [windowbestlen]
+ mov edi, [edx + dsPrev]
+ mov ebx, [scanend]
+ mov edx, [chainlenwmask]
+ jmp LookupLoop
+
+;;; s->match_start = cur_match;
+;;; best_len = len;
+;;; if (len >= nice_match) break;
+;;; scan_end = *(ushf*)(scan+best_len-1);
+
+LongerMatch: mov ebx, [nicematch]
+ mov [bestlen], eax
+ mov [edx + dsMatchStart], ecx
+ cmp eax, ebx
+ jge LeaveNow
+ mov esi, [window]
+ add esi, eax
+ mov [windowbestlen], esi
+ movzx ebx, word ptr [edi + eax - 1]
+ mov edi, [edx + dsPrev]
+ mov [scanend], ebx
+ mov edx, [chainlenwmask]
+ jmp LookupLoop
+
+;;; Accept the current string, with the maximum possible length.
+
+LenMaximum: mov edx, [deflatestate]
+ mov dword ptr [bestlen], MAX_MATCH
+ mov [edx + dsMatchStart], ecx
+
+;;; if ((uInt)best_len <= s->lookahead) return (uInt)best_len;
+;;; return s->lookahead;
+
+LeaveNow:
+ mov edx, [deflatestate]
+ mov ebx, [bestlen]
+ mov eax, [edx + dsLookahead]
+ cmp ebx, eax
+ jg LookaheadRet
+ mov eax, ebx
+LookaheadRet:
+
+;;; Restore the stack and return from whence we came.
+
+ add esp, LocalVarsSize
+ pop ebx
+ pop esi
+ pop edi
+ pop ebp
+
+ ret
+; please don't remove this string !
+; Your can freely use match686 in any free or commercial app if you don't remove the string in the binary!
+ db 0dh,0ah,"asm686 with masm, optimised assembly code from Brian Raiter, written 1998",0dh,0ah
+
+
+ IFDEF NOUNDERLINE
+ longest_match endp
+ ELSE
+ _longest_match endp
+ ENDIF
+
+ IFDEF NOUNDERLINE
+ match_init proc near
+ ret
+ match_init endp
+ ELSE
+ _match_init proc near
+ ret
+ _match_init endp
+ ENDIF
+
+
+_TEXT ends
+end
diff --git a/contrib/zlib/contrib/masmx86/readme.txt b/contrib/zlib/contrib/masmx86/readme.txt
new file mode 100644
index 000000000..3f8888679
--- /dev/null
+++ b/contrib/zlib/contrib/masmx86/readme.txt
@@ -0,0 +1,27 @@
+
+Summary
+-------
+This directory contains ASM implementations of the functions
+longest_match() and inflate_fast().
+
+
+Use instructions
+----------------
+Assemble using MASM, and copy the object files into the zlib source
+directory, then run the appropriate makefile, as suggested below. You can
+donwload MASM from here:
+
+ http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=7a1c9da0-0510-44a2-b042-7ef370530c64
+
+You can also get objects files here:
+
+ http://www.winimage.com/zLibDll/zlib124_masm_obj.zip
+
+Build instructions
+------------------
+* With Microsoft C and MASM:
+nmake -f win32/Makefile.msc LOC="-DASMV -DASMINF" OBJA="match686.obj inffas32.obj"
+
+* With Borland C and TASM:
+make -f win32/Makefile.bor LOCAL_ZLIB="-DASMV -DASMINF" OBJA="match686.obj inffas32.obj" OBJPA="+match686c.obj+match686.obj+inffas32.obj"
+
diff --git a/contrib/zlib/contrib/minizip/Makefile.am b/contrib/zlib/contrib/minizip/Makefile.am
new file mode 100644
index 000000000..d343011eb
--- /dev/null
+++ b/contrib/zlib/contrib/minizip/Makefile.am
@@ -0,0 +1,45 @@
+lib_LTLIBRARIES = libminizip.la
+
+if COND_DEMOS
+bin_PROGRAMS = miniunzip minizip
+endif
+
+zlib_top_srcdir = $(top_srcdir)/../..
+zlib_top_builddir = $(top_builddir)/../..
+
+AM_CPPFLAGS = -I$(zlib_top_srcdir)
+AM_LDFLAGS = -L$(zlib_top_builddir)
+
+if WIN32
+iowin32_src = iowin32.c
+iowin32_h = iowin32.h
+endif
+
+libminizip_la_SOURCES = \
+ ioapi.c \
+ mztools.c \
+ unzip.c \
+ zip.c \
+ ${iowin32_src}
+
+libminizip_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:0:0 -lz
+
+minizip_includedir = $(includedir)/minizip
+minizip_include_HEADERS = \
+ crypt.h \
+ ioapi.h \
+ mztools.h \
+ unzip.h \
+ zip.h \
+ ${iowin32_h}
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = minizip.pc
+
+EXTRA_PROGRAMS = miniunzip minizip
+
+miniunzip_SOURCES = miniunz.c
+miniunzip_LDADD = libminizip.la
+
+minizip_SOURCES = minizip.c
+minizip_LDADD = libminizip.la -lz
diff --git a/contrib/zlib/contrib/minizip/MiniZip64_Changes.txt b/contrib/zlib/contrib/minizip/MiniZip64_Changes.txt
new file mode 100644
index 000000000..13a1bd91a
--- /dev/null
+++ b/contrib/zlib/contrib/minizip/MiniZip64_Changes.txt
@@ -0,0 +1,6 @@
+
+MiniZip 1.1 was derrived from MiniZip at version 1.01f
+
+Change in 1.0 (Okt 2009)
+ - **TODO - Add history**
+
diff --git a/contrib/zlib/contrib/minizip/MiniZip64_info.txt b/contrib/zlib/contrib/minizip/MiniZip64_info.txt
new file mode 100644
index 000000000..57d715242
--- /dev/null
+++ b/contrib/zlib/contrib/minizip/MiniZip64_info.txt
@@ -0,0 +1,74 @@
+MiniZip - Copyright (c) 1998-2010 - by Gilles Vollant - version 1.1 64 bits from Mathias Svensson
+
+Introduction
+---------------------
+MiniZip 1.1 is built from MiniZip 1.0 by Gilles Vollant ( http://www.winimage.com/zLibDll/minizip.html )
+
+When adding ZIP64 support into minizip it would result into risk of breaking compatibility with minizip 1.0.
+All possible work was done for compatibility.
+
+
+Background
+---------------------
+When adding ZIP64 support Mathias Svensson found that Even Rouault have added ZIP64
+support for unzip.c into minizip for a open source project called gdal ( http://www.gdal.org/ )
+
+That was used as a starting point. And after that ZIP64 support was added to zip.c
+some refactoring and code cleanup was also done.
+
+
+Changed from MiniZip 1.0 to MiniZip 1.1
+---------------------------------------
+* Added ZIP64 support for unzip ( by Even Rouault )
+* Added ZIP64 support for zip ( by Mathias Svensson )
+* Reverted some changed that Even Rouault did.
+* Bunch of patches received from Gulles Vollant that he received for MiniZip from various users.
+* Added unzip patch for BZIP Compression method (patch create by Daniel Borca)
+* Added BZIP Compress method for zip
+* Did some refactoring and code cleanup
+
+
+Credits
+
+ Gilles Vollant - Original MiniZip author
+ Even Rouault - ZIP64 unzip Support
+ Daniel Borca - BZip Compression method support in unzip
+ Mathias Svensson - ZIP64 zip support
+ Mathias Svensson - BZip Compression method support in zip
+
+ Resources
+
+ ZipLayout http://result42.com/projects/ZipFileLayout
+ Command line tool for Windows that shows the layout and information of the headers in a zip archive.
+ Used when debugging and validating the creation of zip files using MiniZip64
+
+
+ ZIP App Note http://www.pkware.com/documents/casestudies/APPNOTE.TXT
+ Zip File specification
+
+
+Notes.
+ * To be able to use BZip compression method in zip64.c or unzip64.c the BZIP2 lib is needed and HAVE_BZIP2 need to be defined.
+
+License
+----------------------------------------------------------
+ Condition of use and distribution are the same than zlib :
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+----------------------------------------------------------
+
diff --git a/contrib/zlib/contrib/minizip/configure.ac b/contrib/zlib/contrib/minizip/configure.ac
new file mode 100644
index 000000000..5b1197097
--- /dev/null
+++ b/contrib/zlib/contrib/minizip/configure.ac
@@ -0,0 +1,32 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_INIT([minizip], [1.2.11], [bugzilla.redhat.com])
+AC_CONFIG_SRCDIR([minizip.c])
+AM_INIT_AUTOMAKE([foreign])
+LT_INIT
+
+AC_MSG_CHECKING([whether to build example programs])
+AC_ARG_ENABLE([demos], AC_HELP_STRING([--enable-demos], [build example programs]))
+AM_CONDITIONAL([COND_DEMOS], [test "$enable_demos" = yes])
+if test "$enable_demos" = yes
+then
+ AC_MSG_RESULT([yes])
+else
+ AC_MSG_RESULT([no])
+fi
+
+case "${host}" in
+ *-mingw* | mingw*)
+ WIN32="yes"
+ ;;
+ *)
+ ;;
+esac
+AM_CONDITIONAL([WIN32], [test "${WIN32}" = "yes"])
+
+
+AC_SUBST([HAVE_UNISTD_H], [0])
+AC_CHECK_HEADER([unistd.h], [HAVE_UNISTD_H=1], [])
+AC_CONFIG_FILES([Makefile minizip.pc])
+AC_OUTPUT
diff --git a/contrib/zlib/contrib/minizip/crypt.h b/contrib/zlib/contrib/minizip/crypt.h
new file mode 100644
index 000000000..1e9e8200b
--- /dev/null
+++ b/contrib/zlib/contrib/minizip/crypt.h
@@ -0,0 +1,131 @@
+/* crypt.h -- base code for crypt/uncrypt ZIPfile
+
+
+ Version 1.01e, February 12th, 2005
+
+ Copyright (C) 1998-2005 Gilles Vollant
+
+ This code is a modified version of crypting code in Infozip distribution
+
+ The encryption/decryption parts of this source code (as opposed to the
+ non-echoing password parts) were originally written in Europe. The
+ whole source package can be freely distributed, including from the USA.
+ (Prior to January 2000, re-export from the US was a violation of US law.)
+
+ This encryption code is a direct transcription of the algorithm from
+ Roger Schlafly, described by Phil Katz in the file appnote.txt. This
+ file (appnote.txt) is distributed with the PKZIP program (even in the
+ version without encryption capabilities).
+
+ If you don't need crypting in your application, just define symbols
+ NOCRYPT and NOUNCRYPT.
+
+ This code support the "Traditional PKWARE Encryption".
+
+ The new AES encryption added on Zip format by Winzip (see the page
+ http://www.winzip.com/aes_info.htm ) and PKWare PKZip 5.x Strong
+ Encryption is not supported.
+*/
+
+#define CRC32(c, b) ((*(pcrc_32_tab+(((int)(c) ^ (b)) & 0xff))) ^ ((c) >> 8))
+
+/***********************************************************************
+ * Return the next byte in the pseudo-random sequence
+ */
+static int decrypt_byte(unsigned long* pkeys, const z_crc_t* pcrc_32_tab)
+{
+ unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an
+ * unpredictable manner on 16-bit systems; not a problem
+ * with any known compiler so far, though */
+
+ temp = ((unsigned)(*(pkeys+2)) & 0xffff) | 2;
+ return (int)(((temp * (temp ^ 1)) >> 8) & 0xff);
+}
+
+/***********************************************************************
+ * Update the encryption keys with the next byte of plain text
+ */
+static int update_keys(unsigned long* pkeys,const z_crc_t* pcrc_32_tab,int c)
+{
+ (*(pkeys+0)) = CRC32((*(pkeys+0)), c);
+ (*(pkeys+1)) += (*(pkeys+0)) & 0xff;
+ (*(pkeys+1)) = (*(pkeys+1)) * 134775813L + 1;
+ {
+ register int keyshift = (int)((*(pkeys+1)) >> 24);
+ (*(pkeys+2)) = CRC32((*(pkeys+2)), keyshift);
+ }
+ return c;
+}
+
+
+/***********************************************************************
+ * Initialize the encryption keys and the random header according to
+ * the given password.
+ */
+static void init_keys(const char* passwd,unsigned long* pkeys,const z_crc_t* pcrc_32_tab)
+{
+ *(pkeys+0) = 305419896L;
+ *(pkeys+1) = 591751049L;
+ *(pkeys+2) = 878082192L;
+ while (*passwd != '\0') {
+ update_keys(pkeys,pcrc_32_tab,(int)*passwd);
+ passwd++;
+ }
+}
+
+#define zdecode(pkeys,pcrc_32_tab,c) \
+ (update_keys(pkeys,pcrc_32_tab,c ^= decrypt_byte(pkeys,pcrc_32_tab)))
+
+#define zencode(pkeys,pcrc_32_tab,c,t) \
+ (t=decrypt_byte(pkeys,pcrc_32_tab), update_keys(pkeys,pcrc_32_tab,c), t^(c))
+
+#ifdef INCLUDECRYPTINGCODE_IFCRYPTALLOWED
+
+#define RAND_HEAD_LEN 12
+ /* "last resort" source for second part of crypt seed pattern */
+# ifndef ZCR_SEED2
+# define ZCR_SEED2 3141592654UL /* use PI as default pattern */
+# endif
+
+static int crypthead(const char* passwd, /* password string */
+ unsigned char* buf, /* where to write header */
+ int bufSize,
+ unsigned long* pkeys,
+ const z_crc_t* pcrc_32_tab,
+ unsigned long crcForCrypting)
+{
+ int n; /* index in random header */
+ int t; /* temporary */
+ int c; /* random byte */
+ unsigned char header[RAND_HEAD_LEN-2]; /* random header */
+ static unsigned calls = 0; /* ensure different random header each time */
+
+ if (bufSize<RAND_HEAD_LEN)
+ return 0;
+
+ /* First generate RAND_HEAD_LEN-2 random bytes. We encrypt the
+ * output of rand() to get less predictability, since rand() is
+ * often poorly implemented.
+ */
+ if (++calls == 1)
+ {
+ srand((unsigned)(time(NULL) ^ ZCR_SEED2));
+ }
+ init_keys(passwd, pkeys, pcrc_32_tab);
+ for (n = 0; n < RAND_HEAD_LEN-2; n++)
+ {
+ c = (rand() >> 7) & 0xff;
+ header[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, c, t);
+ }
+ /* Encrypt random header (last two bytes is high word of crc) */
+ init_keys(passwd, pkeys, pcrc_32_tab);
+ for (n = 0; n < RAND_HEAD_LEN-2; n++)
+ {
+ buf[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, header[n], t);
+ }
+ buf[n++] = (unsigned char)zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 16) & 0xff, t);
+ buf[n++] = (unsigned char)zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 24) & 0xff, t);
+ return n;
+}
+
+#endif
diff --git a/contrib/zlib/contrib/minizip/ioapi.c b/contrib/zlib/contrib/minizip/ioapi.c
new file mode 100644
index 000000000..7f5c191b2
--- /dev/null
+++ b/contrib/zlib/contrib/minizip/ioapi.c
@@ -0,0 +1,247 @@
+/* ioapi.h -- IO base function header for compress/uncompress .zip
+ part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
+
+ Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
+
+ Modifications for Zip64 support
+ Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
+
+ For more info read MiniZip_info.txt
+
+*/
+
+#if defined(_WIN32) && (!(defined(_CRT_SECURE_NO_WARNINGS)))
+ #define _CRT_SECURE_NO_WARNINGS
+#endif
+
+#if defined(__APPLE__) || defined(IOAPI_NO_64)
+// In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions
+#define FOPEN_FUNC(filename, mode) fopen(filename, mode)
+#define FTELLO_FUNC(stream) ftello(stream)
+#define FSEEKO_FUNC(stream, offset, origin) fseeko(stream, offset, origin)
+#else
+#define FOPEN_FUNC(filename, mode) fopen64(filename, mode)
+#define FTELLO_FUNC(stream) ftello64(stream)
+#define FSEEKO_FUNC(stream, offset, origin) fseeko64(stream, offset, origin)
+#endif
+
+
+#include "ioapi.h"
+
+voidpf call_zopen64 (const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode)
+{
+ if (pfilefunc->zfile_func64.zopen64_file != NULL)
+ return (*(pfilefunc->zfile_func64.zopen64_file)) (pfilefunc->zfile_func64.opaque,filename,mode);
+ else
+ {
+ return (*(pfilefunc->zopen32_file))(pfilefunc->zfile_func64.opaque,(const char*)filename,mode);
+ }
+}
+
+long call_zseek64 (const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset, int origin)
+{
+ if (pfilefunc->zfile_func64.zseek64_file != NULL)
+ return (*(pfilefunc->zfile_func64.zseek64_file)) (pfilefunc->zfile_func64.opaque,filestream,offset,origin);
+ else
+ {
+ uLong offsetTruncated = (uLong)offset;
+ if (offsetTruncated != offset)
+ return -1;
+ else
+ return (*(pfilefunc->zseek32_file))(pfilefunc->zfile_func64.opaque,filestream,offsetTruncated,origin);
+ }
+}
+
+ZPOS64_T call_ztell64 (const zlib_filefunc64_32_def* pfilefunc,voidpf filestream)
+{
+ if (pfilefunc->zfile_func64.zseek64_file != NULL)
+ return (*(pfilefunc->zfile_func64.ztell64_file)) (pfilefunc->zfile_func64.opaque,filestream);
+ else
+ {
+ uLong tell_uLong = (*(pfilefunc->ztell32_file))(pfilefunc->zfile_func64.opaque,filestream);
+ if ((tell_uLong) == MAXU32)
+ return (ZPOS64_T)-1;
+ else
+ return tell_uLong;
+ }
+}
+
+void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filefunc64_32,const zlib_filefunc_def* p_filefunc32)
+{
+ p_filefunc64_32->zfile_func64.zopen64_file = NULL;
+ p_filefunc64_32->zopen32_file = p_filefunc32->zopen_file;
+ p_filefunc64_32->zfile_func64.zerror_file = p_filefunc32->zerror_file;
+ p_filefunc64_32->zfile_func64.zread_file = p_filefunc32->zread_file;
+ p_filefunc64_32->zfile_func64.zwrite_file = p_filefunc32->zwrite_file;
+ p_filefunc64_32->zfile_func64.ztell64_file = NULL;
+ p_filefunc64_32->zfile_func64.zseek64_file = NULL;
+ p_filefunc64_32->zfile_func64.zclose_file = p_filefunc32->zclose_file;
+ p_filefunc64_32->zfile_func64.zerror_file = p_filefunc32->zerror_file;
+ p_filefunc64_32->zfile_func64.opaque = p_filefunc32->opaque;
+ p_filefunc64_32->zseek32_file = p_filefunc32->zseek_file;
+ p_filefunc64_32->ztell32_file = p_filefunc32->ztell_file;
+}
+
+
+
+static voidpf ZCALLBACK fopen_file_func OF((voidpf opaque, const char* filename, int mode));
+static uLong ZCALLBACK fread_file_func OF((voidpf opaque, voidpf stream, void* buf, uLong size));
+static uLong ZCALLBACK fwrite_file_func OF((voidpf opaque, voidpf stream, const void* buf,uLong size));
+static ZPOS64_T ZCALLBACK ftell64_file_func OF((voidpf opaque, voidpf stream));
+static long ZCALLBACK fseek64_file_func OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin));
+static int ZCALLBACK fclose_file_func OF((voidpf opaque, voidpf stream));
+static int ZCALLBACK ferror_file_func OF((voidpf opaque, voidpf stream));
+
+static voidpf ZCALLBACK fopen_file_func (voidpf opaque, const char* filename, int mode)
+{
+ FILE* file = NULL;
+ const char* mode_fopen = NULL;
+ if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)
+ mode_fopen = "rb";
+ else
+ if (mode & ZLIB_FILEFUNC_MODE_EXISTING)
+ mode_fopen = "r+b";
+ else
+ if (mode & ZLIB_FILEFUNC_MODE_CREATE)
+ mode_fopen = "wb";
+
+ if ((filename!=NULL) && (mode_fopen != NULL))
+ file = fopen(filename, mode_fopen);
+ return file;
+}
+
+static voidpf ZCALLBACK fopen64_file_func (voidpf opaque, const void* filename, int mode)
+{
+ FILE* file = NULL;
+ const char* mode_fopen = NULL;
+ if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)
+ mode_fopen = "rb";
+ else
+ if (mode & ZLIB_FILEFUNC_MODE_EXISTING)
+ mode_fopen = "r+b";
+ else
+ if (mode & ZLIB_FILEFUNC_MODE_CREATE)
+ mode_fopen = "wb";
+
+ if ((filename!=NULL) && (mode_fopen != NULL))
+ file = FOPEN_FUNC((const char*)filename, mode_fopen);
+ return file;
+}
+
+
+static uLong ZCALLBACK fread_file_func (voidpf opaque, voidpf stream, void* buf, uLong size)
+{
+ uLong ret;
+ ret = (uLong)fread(buf, 1, (size_t)size, (FILE *)stream);
+ return ret;
+}
+
+static uLong ZCALLBACK fwrite_file_func (voidpf opaque, voidpf stream, const void* buf, uLong size)
+{
+ uLong ret;
+ ret = (uLong)fwrite(buf, 1, (size_t)size, (FILE *)stream);
+ return ret;
+}
+
+static long ZCALLBACK ftell_file_func (voidpf opaque, voidpf stream)
+{
+ long ret;
+ ret = ftell((FILE *)stream);
+ return ret;
+}
+
+
+static ZPOS64_T ZCALLBACK ftell64_file_func (voidpf opaque, voidpf stream)
+{
+ ZPOS64_T ret;
+ ret = FTELLO_FUNC((FILE *)stream);
+ return ret;
+}
+
+static long ZCALLBACK fseek_file_func (voidpf opaque, voidpf stream, uLong offset, int origin)
+{
+ int fseek_origin=0;
+ long ret;
+ switch (origin)
+ {
+ case ZLIB_FILEFUNC_SEEK_CUR :
+ fseek_origin = SEEK_CUR;
+ break;
+ case ZLIB_FILEFUNC_SEEK_END :
+ fseek_origin = SEEK_END;
+ break;
+ case ZLIB_FILEFUNC_SEEK_SET :
+ fseek_origin = SEEK_SET;
+ break;
+ default: return -1;
+ }
+ ret = 0;
+ if (fseek((FILE *)stream, offset, fseek_origin) != 0)
+ ret = -1;
+ return ret;
+}
+
+static long ZCALLBACK fseek64_file_func (voidpf opaque, voidpf stream, ZPOS64_T offset, int origin)
+{
+ int fseek_origin=0;
+ long ret;
+ switch (origin)
+ {
+ case ZLIB_FILEFUNC_SEEK_CUR :
+ fseek_origin = SEEK_CUR;
+ break;
+ case ZLIB_FILEFUNC_SEEK_END :
+ fseek_origin = SEEK_END;
+ break;
+ case ZLIB_FILEFUNC_SEEK_SET :
+ fseek_origin = SEEK_SET;
+ break;
+ default: return -1;
+ }
+ ret = 0;
+
+ if(FSEEKO_FUNC((FILE *)stream, offset, fseek_origin) != 0)
+ ret = -1;
+
+ return ret;
+}
+
+
+static int ZCALLBACK fclose_file_func (voidpf opaque, voidpf stream)
+{
+ int ret;
+ ret = fclose((FILE *)stream);
+ return ret;
+}
+
+static int ZCALLBACK ferror_file_func (voidpf opaque, voidpf stream)
+{
+ int ret;
+ ret = ferror((FILE *)stream);
+ return ret;
+}
+
+void fill_fopen_filefunc (pzlib_filefunc_def)
+ zlib_filefunc_def* pzlib_filefunc_def;
+{
+ pzlib_filefunc_def->zopen_file = fopen_file_func;
+ pzlib_filefunc_def->zread_file = fread_file_func;
+ pzlib_filefunc_def->zwrite_file = fwrite_file_func;
+ pzlib_filefunc_def->ztell_file = ftell_file_func;
+ pzlib_filefunc_def->zseek_file = fseek_file_func;
+ pzlib_filefunc_def->zclose_file = fclose_file_func;
+ pzlib_filefunc_def->zerror_file = ferror_file_func;
+ pzlib_filefunc_def->opaque = NULL;
+}
+
+void fill_fopen64_filefunc (zlib_filefunc64_def* pzlib_filefunc_def)
+{
+ pzlib_filefunc_def->zopen64_file = fopen64_file_func;
+ pzlib_filefunc_def->zread_file = fread_file_func;
+ pzlib_filefunc_def->zwrite_file = fwrite_file_func;
+ pzlib_filefunc_def->ztell64_file = ftell64_file_func;
+ pzlib_filefunc_def->zseek64_file = fseek64_file_func;
+ pzlib_filefunc_def->zclose_file = fclose_file_func;
+ pzlib_filefunc_def->zerror_file = ferror_file_func;
+ pzlib_filefunc_def->opaque = NULL;
+}
diff --git a/contrib/zlib/contrib/minizip/ioapi.h b/contrib/zlib/contrib/minizip/ioapi.h
new file mode 100644
index 000000000..8dcbdb06e
--- /dev/null
+++ b/contrib/zlib/contrib/minizip/ioapi.h
@@ -0,0 +1,208 @@
+/* ioapi.h -- IO base function header for compress/uncompress .zip
+ part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
+
+ Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
+
+ Modifications for Zip64 support
+ Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
+
+ For more info read MiniZip_info.txt
+
+ Changes
+
+ Oct-2009 - Defined ZPOS64_T to fpos_t on windows and u_int64_t on linux. (might need to find a better why for this)
+ Oct-2009 - Change to fseeko64, ftello64 and fopen64 so large files would work on linux.
+ More if/def section may be needed to support other platforms
+ Oct-2009 - Defined fxxxx64 calls to normal fopen/ftell/fseek so they would compile on windows.
+ (but you should use iowin32.c for windows instead)
+
+*/
+
+#ifndef _ZLIBIOAPI64_H
+#define _ZLIBIOAPI64_H
+
+#if (!defined(_WIN32)) && (!defined(WIN32)) && (!defined(__APPLE__))
+
+ // Linux needs this to support file operation on files larger then 4+GB
+ // But might need better if/def to select just the platforms that needs them.
+
+ #ifndef __USE_FILE_OFFSET64
+ #define __USE_FILE_OFFSET64
+ #endif
+ #ifndef __USE_LARGEFILE64
+ #define __USE_LARGEFILE64
+ #endif
+ #ifndef _LARGEFILE64_SOURCE
+ #define _LARGEFILE64_SOURCE
+ #endif
+ #ifndef _FILE_OFFSET_BIT
+ #define _FILE_OFFSET_BIT 64
+ #endif
+
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "zlib.h"
+
+#if defined(USE_FILE32API)
+#define fopen64 fopen
+#define ftello64 ftell
+#define fseeko64 fseek
+#else
+#ifdef __FreeBSD__
+#define fopen64 fopen
+#define ftello64 ftello
+#define fseeko64 fseeko
+#endif
+#ifdef _MSC_VER
+ #define fopen64 fopen
+ #if (_MSC_VER >= 1400) && (!(defined(NO_MSCVER_FILE64_FUNC)))
+ #define ftello64 _ftelli64
+ #define fseeko64 _fseeki64
+ #else // old MSC
+ #define ftello64 ftell
+ #define fseeko64 fseek
+ #endif
+#endif
+#endif
+
+/*
+#ifndef ZPOS64_T
+ #ifdef _WIN32
+ #define ZPOS64_T fpos_t
+ #else
+ #include <stdint.h>
+ #define ZPOS64_T uint64_t
+ #endif
+#endif
+*/
+
+#ifdef HAVE_MINIZIP64_CONF_H
+#include "mz64conf.h"
+#endif
+
+/* a type choosen by DEFINE */
+#ifdef HAVE_64BIT_INT_CUSTOM
+typedef 64BIT_INT_CUSTOM_TYPE ZPOS64_T;
+#else
+#ifdef HAS_STDINT_H
+#include "stdint.h"
+typedef uint64_t ZPOS64_T;
+#else
+
+/* Maximum unsigned 32-bit value used as placeholder for zip64 */
+#define MAXU32 0xffffffff
+
+#if defined(_MSC_VER) || defined(__BORLANDC__)
+typedef unsigned __int64 ZPOS64_T;
+#else
+typedef unsigned long long int ZPOS64_T;
+#endif
+#endif
+#endif
+
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#define ZLIB_FILEFUNC_SEEK_CUR (1)
+#define ZLIB_FILEFUNC_SEEK_END (2)
+#define ZLIB_FILEFUNC_SEEK_SET (0)
+
+#define ZLIB_FILEFUNC_MODE_READ (1)
+#define ZLIB_FILEFUNC_MODE_WRITE (2)
+#define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3)
+
+#define ZLIB_FILEFUNC_MODE_EXISTING (4)
+#define ZLIB_FILEFUNC_MODE_CREATE (8)
+
+
+#ifndef ZCALLBACK
+ #if (defined(WIN32) || defined(_WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK)
+ #define ZCALLBACK CALLBACK
+ #else
+ #define ZCALLBACK
+ #endif
+#endif
+
+
+
+
+typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode));
+typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size));
+typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size));
+typedef int (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream));
+typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream));
+
+typedef long (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream));
+typedef long (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin));
+
+
+/* here is the "old" 32 bits structure structure */
+typedef struct zlib_filefunc_def_s
+{
+ open_file_func zopen_file;
+ read_file_func zread_file;
+ write_file_func zwrite_file;
+ tell_file_func ztell_file;
+ seek_file_func zseek_file;
+ close_file_func zclose_file;
+ testerror_file_func zerror_file;
+ voidpf opaque;
+} zlib_filefunc_def;
+
+typedef ZPOS64_T (ZCALLBACK *tell64_file_func) OF((voidpf opaque, voidpf stream));
+typedef long (ZCALLBACK *seek64_file_func) OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin));
+typedef voidpf (ZCALLBACK *open64_file_func) OF((voidpf opaque, const void* filename, int mode));
+
+typedef struct zlib_filefunc64_def_s
+{
+ open64_file_func zopen64_file;
+ read_file_func zread_file;
+ write_file_func zwrite_file;
+ tell64_file_func ztell64_file;
+ seek64_file_func zseek64_file;
+ close_file_func zclose_file;
+ testerror_file_func zerror_file;
+ voidpf opaque;
+} zlib_filefunc64_def;
+
+void fill_fopen64_filefunc OF((zlib_filefunc64_def* pzlib_filefunc_def));
+void fill_fopen_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def));
+
+/* now internal definition, only for zip.c and unzip.h */
+typedef struct zlib_filefunc64_32_def_s
+{
+ zlib_filefunc64_def zfile_func64;
+ open_file_func zopen32_file;
+ tell_file_func ztell32_file;
+ seek_file_func zseek32_file;
+} zlib_filefunc64_32_def;
+
+
+#define ZREAD64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zread_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size))
+#define ZWRITE64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zwrite_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size))
+//#define ZTELL64(filefunc,filestream) ((*((filefunc).ztell64_file)) ((filefunc).opaque,filestream))
+//#define ZSEEK64(filefunc,filestream,pos,mode) ((*((filefunc).zseek64_file)) ((filefunc).opaque,filestream,pos,mode))
+#define ZCLOSE64(filefunc,filestream) ((*((filefunc).zfile_func64.zclose_file)) ((filefunc).zfile_func64.opaque,filestream))
+#define ZERROR64(filefunc,filestream) ((*((filefunc).zfile_func64.zerror_file)) ((filefunc).zfile_func64.opaque,filestream))
+
+voidpf call_zopen64 OF((const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode));
+long call_zseek64 OF((const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset, int origin));
+ZPOS64_T call_ztell64 OF((const zlib_filefunc64_32_def* pfilefunc,voidpf filestream));
+
+void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filefunc64_32,const zlib_filefunc_def* p_filefunc32);
+
+#define ZOPEN64(filefunc,filename,mode) (call_zopen64((&(filefunc)),(filename),(mode)))
+#define ZTELL64(filefunc,filestream) (call_ztell64((&(filefunc)),(filestream)))
+#define ZSEEK64(filefunc,filestream,pos,mode) (call_zseek64((&(filefunc)),(filestream),(pos),(mode)))
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/contrib/zlib/contrib/minizip/iowin32.c b/contrib/zlib/contrib/minizip/iowin32.c
new file mode 100644
index 000000000..274f39eb1
--- /dev/null
+++ b/contrib/zlib/contrib/minizip/iowin32.c
@@ -0,0 +1,462 @@
+/* iowin32.c -- IO base function header for compress/uncompress .zip
+ Version 1.1, February 14h, 2010
+ part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
+
+ Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
+
+ Modifications for Zip64 support
+ Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
+
+ For more info read MiniZip_info.txt
+
+*/
+
+#include <stdlib.h>
+
+#include "zlib.h"
+#include "ioapi.h"
+#include "iowin32.h"
+
+#ifndef INVALID_HANDLE_VALUE
+#define INVALID_HANDLE_VALUE (0xFFFFFFFF)
+#endif
+
+#ifndef INVALID_SET_FILE_POINTER
+#define INVALID_SET_FILE_POINTER ((DWORD)-1)
+#endif
+
+
+// see Include/shared/winapifamily.h in the Windows Kit
+#if defined(WINAPI_FAMILY_PARTITION) && (!(defined(IOWIN32_USING_WINRT_API)))
+#if WINAPI_FAMILY_ONE_PARTITION(WINAPI_FAMILY, WINAPI_PARTITION_APP)
+#define IOWIN32_USING_WINRT_API 1
+#endif
+#endif
+
+voidpf ZCALLBACK win32_open_file_func OF((voidpf opaque, const char* filename, int mode));
+uLong ZCALLBACK win32_read_file_func OF((voidpf opaque, voidpf stream, void* buf, uLong size));
+uLong ZCALLBACK win32_write_file_func OF((voidpf opaque, voidpf stream, const void* buf, uLong size));
+ZPOS64_T ZCALLBACK win32_tell64_file_func OF((voidpf opaque, voidpf stream));
+long ZCALLBACK win32_seek64_file_func OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin));
+int ZCALLBACK win32_close_file_func OF((voidpf opaque, voidpf stream));
+int ZCALLBACK win32_error_file_func OF((voidpf opaque, voidpf stream));
+
+typedef struct
+{
+ HANDLE hf;
+ int error;
+} WIN32FILE_IOWIN;
+
+
+static void win32_translate_open_mode(int mode,
+ DWORD* lpdwDesiredAccess,
+ DWORD* lpdwCreationDisposition,
+ DWORD* lpdwShareMode,
+ DWORD* lpdwFlagsAndAttributes)
+{
+ *lpdwDesiredAccess = *lpdwShareMode = *lpdwFlagsAndAttributes = *lpdwCreationDisposition = 0;
+
+ if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)
+ {
+ *lpdwDesiredAccess = GENERIC_READ;
+ *lpdwCreationDisposition = OPEN_EXISTING;
+ *lpdwShareMode = FILE_SHARE_READ;
+ }
+ else if (mode & ZLIB_FILEFUNC_MODE_EXISTING)
+ {
+ *lpdwDesiredAccess = GENERIC_WRITE | GENERIC_READ;
+ *lpdwCreationDisposition = OPEN_EXISTING;
+ }
+ else if (mode & ZLIB_FILEFUNC_MODE_CREATE)
+ {
+ *lpdwDesiredAccess = GENERIC_WRITE | GENERIC_READ;
+ *lpdwCreationDisposition = CREATE_ALWAYS;
+ }
+}
+
+static voidpf win32_build_iowin(HANDLE hFile)
+{
+ voidpf ret=NULL;
+
+ if ((hFile != NULL) && (hFile != INVALID_HANDLE_VALUE))
+ {
+ WIN32FILE_IOWIN w32fiow;
+ w32fiow.hf = hFile;
+ w32fiow.error = 0;
+ ret = malloc(sizeof(WIN32FILE_IOWIN));
+
+ if (ret==NULL)
+ CloseHandle(hFile);
+ else
+ *((WIN32FILE_IOWIN*)ret) = w32fiow;
+ }
+ return ret;
+}
+
+voidpf ZCALLBACK win32_open64_file_func (voidpf opaque,const void* filename,int mode)
+{
+ const char* mode_fopen = NULL;
+ DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ;
+ HANDLE hFile = NULL;
+
+ win32_translate_open_mode(mode,&dwDesiredAccess,&dwCreationDisposition,&dwShareMode,&dwFlagsAndAttributes);
+
+#ifdef IOWIN32_USING_WINRT_API
+#ifdef UNICODE
+ if ((filename!=NULL) && (dwDesiredAccess != 0))
+ hFile = CreateFile2((LPCTSTR)filename, dwDesiredAccess, dwShareMode, dwCreationDisposition, NULL);
+#else
+ if ((filename!=NULL) && (dwDesiredAccess != 0))
+ {
+ WCHAR filenameW[FILENAME_MAX + 0x200 + 1];
+ MultiByteToWideChar(CP_ACP,0,(const char*)filename,-1,filenameW,FILENAME_MAX + 0x200);
+ hFile = CreateFile2(filenameW, dwDesiredAccess, dwShareMode, dwCreationDisposition, NULL);
+ }
+#endif
+#else
+ if ((filename!=NULL) && (dwDesiredAccess != 0))
+ hFile = CreateFile((LPCTSTR)filename, dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, dwFlagsAndAttributes, NULL);
+#endif
+
+ return win32_build_iowin(hFile);
+}
+
+
+voidpf ZCALLBACK win32_open64_file_funcA (voidpf opaque,const void* filename,int mode)
+{
+ const char* mode_fopen = NULL;
+ DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ;
+ HANDLE hFile = NULL;
+
+ win32_translate_open_mode(mode,&dwDesiredAccess,&dwCreationDisposition,&dwShareMode,&dwFlagsAndAttributes);
+
+#ifdef IOWIN32_USING_WINRT_API
+ if ((filename!=NULL) && (dwDesiredAccess != 0))
+ {
+ WCHAR filenameW[FILENAME_MAX + 0x200 + 1];
+ MultiByteToWideChar(CP_ACP,0,(const char*)filename,-1,filenameW,FILENAME_MAX + 0x200);
+ hFile = CreateFile2(filenameW, dwDesiredAccess, dwShareMode, dwCreationDisposition, NULL);
+ }
+#else
+ if ((filename!=NULL) && (dwDesiredAccess != 0))
+ hFile = CreateFileA((LPCSTR)filename, dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, dwFlagsAndAttributes, NULL);
+#endif
+
+ return win32_build_iowin(hFile);
+}
+
+
+voidpf ZCALLBACK win32_open64_file_funcW (voidpf opaque,const void* filename,int mode)
+{
+ const char* mode_fopen = NULL;
+ DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ;
+ HANDLE hFile = NULL;
+
+ win32_translate_open_mode(mode,&dwDesiredAccess,&dwCreationDisposition,&dwShareMode,&dwFlagsAndAttributes);
+
+#ifdef IOWIN32_USING_WINRT_API
+ if ((filename!=NULL) && (dwDesiredAccess != 0))
+ hFile = CreateFile2((LPCWSTR)filename, dwDesiredAccess, dwShareMode, dwCreationDisposition,NULL);
+#else
+ if ((filename!=NULL) && (dwDesiredAccess != 0))
+ hFile = CreateFileW((LPCWSTR)filename, dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, dwFlagsAndAttributes, NULL);
+#endif
+
+ return win32_build_iowin(hFile);
+}
+
+
+voidpf ZCALLBACK win32_open_file_func (voidpf opaque,const char* filename,int mode)
+{
+ const char* mode_fopen = NULL;
+ DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ;
+ HANDLE hFile = NULL;
+
+ win32_translate_open_mode(mode,&dwDesiredAccess,&dwCreationDisposition,&dwShareMode,&dwFlagsAndAttributes);
+
+#ifdef IOWIN32_USING_WINRT_API
+#ifdef UNICODE
+ if ((filename!=NULL) && (dwDesiredAccess != 0))
+ hFile = CreateFile2((LPCTSTR)filename, dwDesiredAccess, dwShareMode, dwCreationDisposition, NULL);
+#else
+ if ((filename!=NULL) && (dwDesiredAccess != 0))
+ {
+ WCHAR filenameW[FILENAME_MAX + 0x200 + 1];
+ MultiByteToWideChar(CP_ACP,0,(const char*)filename,-1,filenameW,FILENAME_MAX + 0x200);
+ hFile = CreateFile2(filenameW, dwDesiredAccess, dwShareMode, dwCreationDisposition, NULL);
+ }
+#endif
+#else
+ if ((filename!=NULL) && (dwDesiredAccess != 0))
+ hFile = CreateFile((LPCTSTR)filename, dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, dwFlagsAndAttributes, NULL);
+#endif
+
+ return win32_build_iowin(hFile);
+}
+
+
+uLong ZCALLBACK win32_read_file_func (voidpf opaque, voidpf stream, void* buf,uLong size)
+{
+ uLong ret=0;
+ HANDLE hFile = NULL;
+ if (stream!=NULL)
+ hFile = ((WIN32FILE_IOWIN*)stream) -> hf;
+
+ if (hFile != NULL)
+ {
+ if (!ReadFile(hFile, buf, size, &ret, NULL))
+ {
+ DWORD dwErr = GetLastError();
+ if (dwErr == ERROR_HANDLE_EOF)
+ dwErr = 0;
+ ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr;
+ }
+ }
+
+ return ret;
+}
+
+
+uLong ZCALLBACK win32_write_file_func (voidpf opaque,voidpf stream,const void* buf,uLong size)
+{
+ uLong ret=0;
+ HANDLE hFile = NULL;
+ if (stream!=NULL)
+ hFile = ((WIN32FILE_IOWIN*)stream) -> hf;
+
+ if (hFile != NULL)
+ {
+ if (!WriteFile(hFile, buf, size, &ret, NULL))
+ {
+ DWORD dwErr = GetLastError();
+ if (dwErr == ERROR_HANDLE_EOF)
+ dwErr = 0;
+ ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr;
+ }
+ }
+
+ return ret;
+}
+
+static BOOL MySetFilePointerEx(HANDLE hFile, LARGE_INTEGER pos, LARGE_INTEGER *newPos, DWORD dwMoveMethod)
+{
+#ifdef IOWIN32_USING_WINRT_API
+ return SetFilePointerEx(hFile, pos, newPos, dwMoveMethod);
+#else
+ LONG lHigh = pos.HighPart;
+ DWORD dwNewPos = SetFilePointer(hFile, pos.LowPart, &lHigh, dwMoveMethod);
+ BOOL fOk = TRUE;
+ if (dwNewPos == 0xFFFFFFFF)
+ if (GetLastError() != NO_ERROR)
+ fOk = FALSE;
+ if ((newPos != NULL) && (fOk))
+ {
+ newPos->LowPart = dwNewPos;
+ newPos->HighPart = lHigh;
+ }
+ return fOk;
+#endif
+}
+
+long ZCALLBACK win32_tell_file_func (voidpf opaque,voidpf stream)
+{
+ long ret=-1;
+ HANDLE hFile = NULL;
+ if (stream!=NULL)
+ hFile = ((WIN32FILE_IOWIN*)stream) -> hf;
+ if (hFile != NULL)
+ {
+ LARGE_INTEGER pos;
+ pos.QuadPart = 0;
+
+ if (!MySetFilePointerEx(hFile, pos, &pos, FILE_CURRENT))
+ {
+ DWORD dwErr = GetLastError();
+ ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr;
+ ret = -1;
+ }
+ else
+ ret=(long)pos.LowPart;
+ }
+ return ret;
+}
+
+ZPOS64_T ZCALLBACK win32_tell64_file_func (voidpf opaque, voidpf stream)
+{
+ ZPOS64_T ret= (ZPOS64_T)-1;
+ HANDLE hFile = NULL;
+ if (stream!=NULL)
+ hFile = ((WIN32FILE_IOWIN*)stream)->hf;
+
+ if (hFile)
+ {
+ LARGE_INTEGER pos;
+ pos.QuadPart = 0;
+
+ if (!MySetFilePointerEx(hFile, pos, &pos, FILE_CURRENT))
+ {
+ DWORD dwErr = GetLastError();
+ ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr;
+ ret = (ZPOS64_T)-1;
+ }
+ else
+ ret=pos.QuadPart;
+ }
+ return ret;
+}
+
+
+long ZCALLBACK win32_seek_file_func (voidpf opaque,voidpf stream,uLong offset,int origin)
+{
+ DWORD dwMoveMethod=0xFFFFFFFF;
+ HANDLE hFile = NULL;
+
+ long ret=-1;
+ if (stream!=NULL)
+ hFile = ((WIN32FILE_IOWIN*)stream) -> hf;
+ switch (origin)
+ {
+ case ZLIB_FILEFUNC_SEEK_CUR :
+ dwMoveMethod = FILE_CURRENT;
+ break;
+ case ZLIB_FILEFUNC_SEEK_END :
+ dwMoveMethod = FILE_END;
+ break;
+ case ZLIB_FILEFUNC_SEEK_SET :
+ dwMoveMethod = FILE_BEGIN;
+ break;
+ default: return -1;
+ }
+
+ if (hFile != NULL)
+ {
+ LARGE_INTEGER pos;
+ pos.QuadPart = offset;
+ if (!MySetFilePointerEx(hFile, pos, NULL, dwMoveMethod))
+ {
+ DWORD dwErr = GetLastError();
+ ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr;
+ ret = -1;
+ }
+ else
+ ret=0;
+ }
+ return ret;
+}
+
+long ZCALLBACK win32_seek64_file_func (voidpf opaque, voidpf stream,ZPOS64_T offset,int origin)
+{
+ DWORD dwMoveMethod=0xFFFFFFFF;
+ HANDLE hFile = NULL;
+ long ret=-1;
+
+ if (stream!=NULL)
+ hFile = ((WIN32FILE_IOWIN*)stream)->hf;
+
+ switch (origin)
+ {
+ case ZLIB_FILEFUNC_SEEK_CUR :
+ dwMoveMethod = FILE_CURRENT;
+ break;
+ case ZLIB_FILEFUNC_SEEK_END :
+ dwMoveMethod = FILE_END;
+ break;
+ case ZLIB_FILEFUNC_SEEK_SET :
+ dwMoveMethod = FILE_BEGIN;
+ break;
+ default: return -1;
+ }
+
+ if (hFile)
+ {
+ LARGE_INTEGER pos;
+ pos.QuadPart = offset;
+ if (!MySetFilePointerEx(hFile, pos, NULL, dwMoveMethod))
+ {
+ DWORD dwErr = GetLastError();
+ ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr;
+ ret = -1;
+ }
+ else
+ ret=0;
+ }
+ return ret;
+}
+
+int ZCALLBACK win32_close_file_func (voidpf opaque, voidpf stream)
+{
+ int ret=-1;
+
+ if (stream!=NULL)
+ {
+ HANDLE hFile;
+ hFile = ((WIN32FILE_IOWIN*)stream) -> hf;
+ if (hFile != NULL)
+ {
+ CloseHandle(hFile);
+ ret=0;
+ }
+ free(stream);
+ }
+ return ret;
+}
+
+int ZCALLBACK win32_error_file_func (voidpf opaque,voidpf stream)
+{
+ int ret=-1;
+ if (stream!=NULL)
+ {
+ ret = ((WIN32FILE_IOWIN*)stream) -> error;
+ }
+ return ret;
+}
+
+void fill_win32_filefunc (zlib_filefunc_def* pzlib_filefunc_def)
+{
+ pzlib_filefunc_def->zopen_file = win32_open_file_func;
+ pzlib_filefunc_def->zread_file = win32_read_file_func;
+ pzlib_filefunc_def->zwrite_file = win32_write_file_func;
+ pzlib_filefunc_def->ztell_file = win32_tell_file_func;
+ pzlib_filefunc_def->zseek_file = win32_seek_file_func;
+ pzlib_filefunc_def->zclose_file = win32_close_file_func;
+ pzlib_filefunc_def->zerror_file = win32_error_file_func;
+ pzlib_filefunc_def->opaque = NULL;
+}
+
+void fill_win32_filefunc64(zlib_filefunc64_def* pzlib_filefunc_def)
+{
+ pzlib_filefunc_def->zopen64_file = win32_open64_file_func;
+ pzlib_filefunc_def->zread_file = win32_read_file_func;
+ pzlib_filefunc_def->zwrite_file = win32_write_file_func;
+ pzlib_filefunc_def->ztell64_file = win32_tell64_file_func;
+ pzlib_filefunc_def->zseek64_file = win32_seek64_file_func;
+ pzlib_filefunc_def->zclose_file = win32_close_file_func;
+ pzlib_filefunc_def->zerror_file = win32_error_file_func;
+ pzlib_filefunc_def->opaque = NULL;
+}
+
+
+void fill_win32_filefunc64A(zlib_filefunc64_def* pzlib_filefunc_def)
+{
+ pzlib_filefunc_def->zopen64_file = win32_open64_file_funcA;
+ pzlib_filefunc_def->zread_file = win32_read_file_func;
+ pzlib_filefunc_def->zwrite_file = win32_write_file_func;
+ pzlib_filefunc_def->ztell64_file = win32_tell64_file_func;
+ pzlib_filefunc_def->zseek64_file = win32_seek64_file_func;
+ pzlib_filefunc_def->zclose_file = win32_close_file_func;
+ pzlib_filefunc_def->zerror_file = win32_error_file_func;
+ pzlib_filefunc_def->opaque = NULL;
+}
+
+
+void fill_win32_filefunc64W(zlib_filefunc64_def* pzlib_filefunc_def)
+{
+ pzlib_filefunc_def->zopen64_file = win32_open64_file_funcW;
+ pzlib_filefunc_def->zread_file = win32_read_file_func;
+ pzlib_filefunc_def->zwrite_file = win32_write_file_func;
+ pzlib_filefunc_def->ztell64_file = win32_tell64_file_func;
+ pzlib_filefunc_def->zseek64_file = win32_seek64_file_func;
+ pzlib_filefunc_def->zclose_file = win32_close_file_func;
+ pzlib_filefunc_def->zerror_file = win32_error_file_func;
+ pzlib_filefunc_def->opaque = NULL;
+}
diff --git a/contrib/zlib/contrib/minizip/iowin32.h b/contrib/zlib/contrib/minizip/iowin32.h
new file mode 100644
index 000000000..0ca0969a7
--- /dev/null
+++ b/contrib/zlib/contrib/minizip/iowin32.h
@@ -0,0 +1,28 @@
+/* iowin32.h -- IO base function header for compress/uncompress .zip
+ Version 1.1, February 14h, 2010
+ part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
+
+ Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
+
+ Modifications for Zip64 support
+ Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
+
+ For more info read MiniZip_info.txt
+
+*/
+
+#include <windows.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void fill_win32_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def));
+void fill_win32_filefunc64 OF((zlib_filefunc64_def* pzlib_filefunc_def));
+void fill_win32_filefunc64A OF((zlib_filefunc64_def* pzlib_filefunc_def));
+void fill_win32_filefunc64W OF((zlib_filefunc64_def* pzlib_filefunc_def));
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/contrib/zlib/contrib/minizip/make_vms.com b/contrib/zlib/contrib/minizip/make_vms.com
new file mode 100644
index 000000000..9ac13a98f
--- /dev/null
+++ b/contrib/zlib/contrib/minizip/make_vms.com
@@ -0,0 +1,25 @@
+$ if f$search("ioapi.h_orig") .eqs. "" then copy ioapi.h ioapi.h_orig
+$ open/write zdef vmsdefs.h
+$ copy sys$input: zdef
+$ deck
+#define unix
+#define fill_zlib_filefunc64_32_def_from_filefunc32 fillzffunc64from
+#define Write_Zip64EndOfCentralDirectoryLocator Write_Zip64EoDLocator
+#define Write_Zip64EndOfCentralDirectoryRecord Write_Zip64EoDRecord
+#define Write_EndOfCentralDirectoryRecord Write_EoDRecord
+$ eod
+$ close zdef
+$ copy vmsdefs.h,ioapi.h_orig ioapi.h
+$ cc/include=[--]/prefix=all ioapi.c
+$ cc/include=[--]/prefix=all miniunz.c
+$ cc/include=[--]/prefix=all unzip.c
+$ cc/include=[--]/prefix=all minizip.c
+$ cc/include=[--]/prefix=all zip.c
+$ link miniunz,unzip,ioapi,[--]libz.olb/lib
+$ link minizip,zip,ioapi,[--]libz.olb/lib
+$ mcr []minizip test minizip_info.txt
+$ mcr []miniunz -l test.zip
+$ rename minizip_info.txt; minizip_info.txt_old
+$ mcr []miniunz test.zip
+$ delete test.zip;*
+$exit
diff --git a/contrib/zlib/contrib/minizip/miniunz.c b/contrib/zlib/contrib/minizip/miniunz.c
new file mode 100644
index 000000000..3d65401be
--- /dev/null
+++ b/contrib/zlib/contrib/minizip/miniunz.c
@@ -0,0 +1,660 @@
+/*
+ miniunz.c
+ Version 1.1, February 14h, 2010
+ sample part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
+
+ Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
+
+ Modifications of Unzip for Zip64
+ Copyright (C) 2007-2008 Even Rouault
+
+ Modifications for Zip64 support on both zip and unzip
+ Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
+*/
+
+#if (!defined(_WIN32)) && (!defined(WIN32)) && (!defined(__APPLE__))
+ #ifndef __USE_FILE_OFFSET64
+ #define __USE_FILE_OFFSET64
+ #endif
+ #ifndef __USE_LARGEFILE64
+ #define __USE_LARGEFILE64
+ #endif
+ #ifndef _LARGEFILE64_SOURCE
+ #define _LARGEFILE64_SOURCE
+ #endif
+ #ifndef _FILE_OFFSET_BIT
+ #define _FILE_OFFSET_BIT 64
+ #endif
+#endif
+
+#ifdef __APPLE__
+// In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions
+#define FOPEN_FUNC(filename, mode) fopen(filename, mode)
+#define FTELLO_FUNC(stream) ftello(stream)
+#define FSEEKO_FUNC(stream, offset, origin) fseeko(stream, offset, origin)
+#else
+#define FOPEN_FUNC(filename, mode) fopen64(filename, mode)
+#define FTELLO_FUNC(stream) ftello64(stream)
+#define FSEEKO_FUNC(stream, offset, origin) fseeko64(stream, offset, origin)
+#endif
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <errno.h>
+#include <fcntl.h>
+
+#ifdef _WIN32
+# include <direct.h>
+# include <io.h>
+#else
+# include <unistd.h>
+# include <utime.h>
+#endif
+
+
+#include "unzip.h"
+
+#define CASESENSITIVITY (0)
+#define WRITEBUFFERSIZE (8192)
+#define MAXFILENAME (256)
+
+#ifdef _WIN32
+#define USEWIN32IOAPI
+#include "iowin32.h"
+#endif
+/*
+ mini unzip, demo of unzip package
+
+ usage :
+ Usage : miniunz [-exvlo] file.zip [file_to_extract] [-d extractdir]
+
+ list the file in the zipfile, and print the content of FILE_ID.ZIP or README.TXT
+ if it exists
+*/
+
+
+/* change_file_date : change the date/time of a file
+ filename : the filename of the file where date/time must be modified
+ dosdate : the new date at the MSDos format (4 bytes)
+ tmu_date : the SAME new date at the tm_unz format */
+void change_file_date(filename,dosdate,tmu_date)
+ const char *filename;
+ uLong dosdate;
+ tm_unz tmu_date;
+{
+#ifdef _WIN32
+ HANDLE hFile;
+ FILETIME ftm,ftLocal,ftCreate,ftLastAcc,ftLastWrite;
+
+ hFile = CreateFileA(filename,GENERIC_READ | GENERIC_WRITE,
+ 0,NULL,OPEN_EXISTING,0,NULL);
+ GetFileTime(hFile,&ftCreate,&ftLastAcc,&ftLastWrite);
+ DosDateTimeToFileTime((WORD)(dosdate>>16),(WORD)dosdate,&ftLocal);
+ LocalFileTimeToFileTime(&ftLocal,&ftm);
+ SetFileTime(hFile,&ftm,&ftLastAcc,&ftm);
+ CloseHandle(hFile);
+#else
+#ifdef unix || __APPLE__
+ struct utimbuf ut;
+ struct tm newdate;
+ newdate.tm_sec = tmu_date.tm_sec;
+ newdate.tm_min=tmu_date.tm_min;
+ newdate.tm_hour=tmu_date.tm_hour;
+ newdate.tm_mday=tmu_date.tm_mday;
+ newdate.tm_mon=tmu_date.tm_mon;
+ if (tmu_date.tm_year > 1900)
+ newdate.tm_year=tmu_date.tm_year - 1900;
+ else
+ newdate.tm_year=tmu_date.tm_year ;
+ newdate.tm_isdst=-1;
+
+ ut.actime=ut.modtime=mktime(&newdate);
+ utime(filename,&ut);
+#endif
+#endif
+}
+
+
+/* mymkdir and change_file_date are not 100 % portable
+ As I don't know well Unix, I wait feedback for the unix portion */
+
+int mymkdir(dirname)
+ const char* dirname;
+{
+ int ret=0;
+#ifdef _WIN32
+ ret = _mkdir(dirname);
+#elif unix
+ ret = mkdir (dirname,0775);
+#elif __APPLE__
+ ret = mkdir (dirname,0775);
+#endif
+ return ret;
+}
+
+int makedir (newdir)
+ char *newdir;
+{
+ char *buffer ;
+ char *p;
+ int len = (int)strlen(newdir);
+
+ if (len <= 0)
+ return 0;
+
+ buffer = (char*)malloc(len+1);
+ if (buffer==NULL)
+ {
+ printf("Error allocating memory\n");
+ return UNZ_INTERNALERROR;
+ }
+ strcpy(buffer,newdir);
+
+ if (buffer[len-1] == '/') {
+ buffer[len-1] = '\0';
+ }
+ if (mymkdir(buffer) == 0)
+ {
+ free(buffer);
+ return 1;
+ }
+
+ p = buffer+1;
+ while (1)
+ {
+ char hold;
+
+ while(*p && *p != '\\' && *p != '/')
+ p++;
+ hold = *p;
+ *p = 0;
+ if ((mymkdir(buffer) == -1) && (errno == ENOENT))
+ {
+ printf("couldn't create directory %s\n",buffer);
+ free(buffer);
+ return 0;
+ }
+ if (hold == 0)
+ break;
+ *p++ = hold;
+ }
+ free(buffer);
+ return 1;
+}
+
+void do_banner()
+{
+ printf("MiniUnz 1.01b, demo of zLib + Unz package written by Gilles Vollant\n");
+ printf("more info at http://www.winimage.com/zLibDll/unzip.html\n\n");
+}
+
+void do_help()
+{
+ printf("Usage : miniunz [-e] [-x] [-v] [-l] [-o] [-p password] file.zip [file_to_extr.] [-d extractdir]\n\n" \
+ " -e Extract without pathname (junk paths)\n" \
+ " -x Extract with pathname\n" \
+ " -v list files\n" \
+ " -l list files\n" \
+ " -d directory to extract into\n" \
+ " -o overwrite files without prompting\n" \
+ " -p extract crypted file using password\n\n");
+}
+
+void Display64BitsSize(ZPOS64_T n, int size_char)
+{
+ /* to avoid compatibility problem , we do here the conversion */
+ char number[21];
+ int offset=19;
+ int pos_string = 19;
+ number[20]=0;
+ for (;;) {
+ number[offset]=(char)((n%10)+'0');
+ if (number[offset] != '0')
+ pos_string=offset;
+ n/=10;
+ if (offset==0)
+ break;
+ offset--;
+ }
+ {
+ int size_display_string = 19-pos_string;
+ while (size_char > size_display_string)
+ {
+ size_char--;
+ printf(" ");
+ }
+ }
+
+ printf("%s",&number[pos_string]);
+}
+
+int do_list(uf)
+ unzFile uf;
+{
+ uLong i;
+ unz_global_info64 gi;
+ int err;
+
+ err = unzGetGlobalInfo64(uf,&gi);
+ if (err!=UNZ_OK)
+ printf("error %d with zipfile in unzGetGlobalInfo \n",err);
+ printf(" Length Method Size Ratio Date Time CRC-32 Name\n");
+ printf(" ------ ------ ---- ----- ---- ---- ------ ----\n");
+ for (i=0;i<gi.number_entry;i++)
+ {
+ char filename_inzip[256];
+ unz_file_info64 file_info;
+ uLong ratio=0;
+ const char *string_method;
+ char charCrypt=' ';
+ err = unzGetCurrentFileInfo64(uf,&file_info,filename_inzip,sizeof(filename_inzip),NULL,0,NULL,0);
+ if (err!=UNZ_OK)
+ {
+ printf("error %d with zipfile in unzGetCurrentFileInfo\n",err);
+ break;
+ }
+ if (file_info.uncompressed_size>0)
+ ratio = (uLong)((file_info.compressed_size*100)/file_info.uncompressed_size);
+
+ /* display a '*' if the file is crypted */
+ if ((file_info.flag & 1) != 0)
+ charCrypt='*';
+
+ if (file_info.compression_method==0)
+ string_method="Stored";
+ else
+ if (file_info.compression_method==Z_DEFLATED)
+ {
+ uInt iLevel=(uInt)((file_info.flag & 0x6)/2);
+ if (iLevel==0)
+ string_method="Defl:N";
+ else if (iLevel==1)
+ string_method="Defl:X";
+ else if ((iLevel==2) || (iLevel==3))
+ string_method="Defl:F"; /* 2:fast , 3 : extra fast*/
+ }
+ else
+ if (file_info.compression_method==Z_BZIP2ED)
+ {
+ string_method="BZip2 ";
+ }
+ else
+ string_method="Unkn. ";
+
+ Display64BitsSize(file_info.uncompressed_size,7);
+ printf(" %6s%c",string_method,charCrypt);
+ Display64BitsSize(file_info.compressed_size,7);
+ printf(" %3lu%% %2.2lu-%2.2lu-%2.2lu %2.2lu:%2.2lu %8.8lx %s\n",
+ ratio,
+ (uLong)file_info.tmu_date.tm_mon + 1,
+ (uLong)file_info.tmu_date.tm_mday,
+ (uLong)file_info.tmu_date.tm_year % 100,
+ (uLong)file_info.tmu_date.tm_hour,(uLong)file_info.tmu_date.tm_min,
+ (uLong)file_info.crc,filename_inzip);
+ if ((i+1)<gi.number_entry)
+ {
+ err = unzGoToNextFile(uf);
+ if (err!=UNZ_OK)
+ {
+ printf("error %d with zipfile in unzGoToNextFile\n",err);
+ break;
+ }
+ }
+ }
+
+ return 0;
+}
+
+
+int do_extract_currentfile(uf,popt_extract_without_path,popt_overwrite,password)
+ unzFile uf;
+ const int* popt_extract_without_path;
+ int* popt_overwrite;
+ const char* password;
+{
+ char filename_inzip[256];
+ char* filename_withoutpath;
+ char* p;
+ int err=UNZ_OK;
+ FILE *fout=NULL;
+ void* buf;
+ uInt size_buf;
+
+ unz_file_info64 file_info;
+ uLong ratio=0;
+ err = unzGetCurrentFileInfo64(uf,&file_info,filename_inzip,sizeof(filename_inzip),NULL,0,NULL,0);
+
+ if (err!=UNZ_OK)
+ {
+ printf("error %d with zipfile in unzGetCurrentFileInfo\n",err);
+ return err;
+ }
+
+ size_buf = WRITEBUFFERSIZE;
+ buf = (void*)malloc(size_buf);
+ if (buf==NULL)
+ {
+ printf("Error allocating memory\n");
+ return UNZ_INTERNALERROR;
+ }
+
+ p = filename_withoutpath = filename_inzip;
+ while ((*p) != '\0')
+ {
+ if (((*p)=='/') || ((*p)=='\\'))
+ filename_withoutpath = p+1;
+ p++;
+ }
+
+ if ((*filename_withoutpath)=='\0')
+ {
+ if ((*popt_extract_without_path)==0)
+ {
+ printf("creating directory: %s\n",filename_inzip);
+ mymkdir(filename_inzip);
+ }
+ }
+ else
+ {
+ const char* write_filename;
+ int skip=0;
+
+ if ((*popt_extract_without_path)==0)
+ write_filename = filename_inzip;
+ else
+ write_filename = filename_withoutpath;
+
+ err = unzOpenCurrentFilePassword(uf,password);
+ if (err!=UNZ_OK)
+ {
+ printf("error %d with zipfile in unzOpenCurrentFilePassword\n",err);
+ }
+
+ if (((*popt_overwrite)==0) && (err==UNZ_OK))
+ {
+ char rep=0;
+ FILE* ftestexist;
+ ftestexist = FOPEN_FUNC(write_filename,"rb");
+ if (ftestexist!=NULL)
+ {
+ fclose(ftestexist);
+ do
+ {
+ char answer[128];
+ int ret;
+
+ printf("The file %s exists. Overwrite ? [y]es, [n]o, [A]ll: ",write_filename);
+ ret = scanf("%1s",answer);
+ if (ret != 1)
+ {
+ exit(EXIT_FAILURE);
+ }
+ rep = answer[0] ;
+ if ((rep>='a') && (rep<='z'))
+ rep -= 0x20;
+ }
+ while ((rep!='Y') && (rep!='N') && (rep!='A'));
+ }
+
+ if (rep == 'N')
+ skip = 1;
+
+ if (rep == 'A')
+ *popt_overwrite=1;
+ }
+
+ if ((skip==0) && (err==UNZ_OK))
+ {
+ fout=FOPEN_FUNC(write_filename,"wb");
+ /* some zipfile don't contain directory alone before file */
+ if ((fout==NULL) && ((*popt_extract_without_path)==0) &&
+ (filename_withoutpath!=(char*)filename_inzip))
+ {
+ char c=*(filename_withoutpath-1);
+ *(filename_withoutpath-1)='\0';
+ makedir(write_filename);
+ *(filename_withoutpath-1)=c;
+ fout=FOPEN_FUNC(write_filename,"wb");
+ }
+
+ if (fout==NULL)
+ {
+ printf("error opening %s\n",write_filename);
+ }
+ }
+
+ if (fout!=NULL)
+ {
+ printf(" extracting: %s\n",write_filename);
+
+ do
+ {
+ err = unzReadCurrentFile(uf,buf,size_buf);
+ if (err<0)
+ {
+ printf("error %d with zipfile in unzReadCurrentFile\n",err);
+ break;
+ }
+ if (err>0)
+ if (fwrite(buf,err,1,fout)!=1)
+ {
+ printf("error in writing extracted file\n");
+ err=UNZ_ERRNO;
+ break;
+ }
+ }
+ while (err>0);
+ if (fout)
+ fclose(fout);
+
+ if (err==0)
+ change_file_date(write_filename,file_info.dosDate,
+ file_info.tmu_date);
+ }
+
+ if (err==UNZ_OK)
+ {
+ err = unzCloseCurrentFile (uf);
+ if (err!=UNZ_OK)
+ {
+ printf("error %d with zipfile in unzCloseCurrentFile\n",err);
+ }
+ }
+ else
+ unzCloseCurrentFile(uf); /* don't lose the error */
+ }
+
+ free(buf);
+ return err;
+}
+
+
+int do_extract(uf,opt_extract_without_path,opt_overwrite,password)
+ unzFile uf;
+ int opt_extract_without_path;
+ int opt_overwrite;
+ const char* password;
+{
+ uLong i;
+ unz_global_info64 gi;
+ int err;
+ FILE* fout=NULL;
+
+ err = unzGetGlobalInfo64(uf,&gi);
+ if (err!=UNZ_OK)
+ printf("error %d with zipfile in unzGetGlobalInfo \n",err);
+
+ for (i=0;i<gi.number_entry;i++)
+ {
+ if (do_extract_currentfile(uf,&opt_extract_without_path,
+ &opt_overwrite,
+ password) != UNZ_OK)
+ break;
+
+ if ((i+1)<gi.number_entry)
+ {
+ err = unzGoToNextFile(uf);
+ if (err!=UNZ_OK)
+ {
+ printf("error %d with zipfile in unzGoToNextFile\n",err);
+ break;
+ }
+ }
+ }
+
+ return 0;
+}
+
+int do_extract_onefile(uf,filename,opt_extract_without_path,opt_overwrite,password)
+ unzFile uf;
+ const char* filename;
+ int opt_extract_without_path;
+ int opt_overwrite;
+ const char* password;
+{
+ int err = UNZ_OK;
+ if (unzLocateFile(uf,filename,CASESENSITIVITY)!=UNZ_OK)
+ {
+ printf("file %s not found in the zipfile\n",filename);
+ return 2;
+ }
+
+ if (do_extract_currentfile(uf,&opt_extract_without_path,
+ &opt_overwrite,
+ password) == UNZ_OK)
+ return 0;
+ else
+ return 1;
+}
+
+
+int main(argc,argv)
+ int argc;
+ char *argv[];
+{
+ const char *zipfilename=NULL;
+ const char *filename_to_extract=NULL;
+ const char *password=NULL;
+ char filename_try[MAXFILENAME+16] = "";
+ int i;
+ int ret_value=0;
+ int opt_do_list=0;
+ int opt_do_extract=1;
+ int opt_do_extract_withoutpath=0;
+ int opt_overwrite=0;
+ int opt_extractdir=0;
+ const char *dirname=NULL;
+ unzFile uf=NULL;
+
+ do_banner();
+ if (argc==1)
+ {
+ do_help();
+ return 0;
+ }
+ else
+ {
+ for (i=1;i<argc;i++)
+ {
+ if ((*argv[i])=='-')
+ {
+ const char *p=argv[i]+1;
+
+ while ((*p)!='\0')
+ {
+ char c=*(p++);;
+ if ((c=='l') || (c=='L'))
+ opt_do_list = 1;
+ if ((c=='v') || (c=='V'))
+ opt_do_list = 1;
+ if ((c=='x') || (c=='X'))
+ opt_do_extract = 1;
+ if ((c=='e') || (c=='E'))
+ opt_do_extract = opt_do_extract_withoutpath = 1;
+ if ((c=='o') || (c=='O'))
+ opt_overwrite=1;
+ if ((c=='d') || (c=='D'))
+ {
+ opt_extractdir=1;
+ dirname=argv[i+1];
+ }
+
+ if (((c=='p') || (c=='P')) && (i+1<argc))
+ {
+ password=argv[i+1];
+ i++;
+ }
+ }
+ }
+ else
+ {
+ if (zipfilename == NULL)
+ zipfilename = argv[i];
+ else if ((filename_to_extract==NULL) && (!opt_extractdir))
+ filename_to_extract = argv[i] ;
+ }
+ }
+ }
+
+ if (zipfilename!=NULL)
+ {
+
+# ifdef USEWIN32IOAPI
+ zlib_filefunc64_def ffunc;
+# endif
+
+ strncpy(filename_try, zipfilename,MAXFILENAME-1);
+ /* strncpy doesnt append the trailing NULL, of the string is too long. */
+ filename_try[ MAXFILENAME ] = '\0';
+
+# ifdef USEWIN32IOAPI
+ fill_win32_filefunc64A(&ffunc);
+ uf = unzOpen2_64(zipfilename,&ffunc);
+# else
+ uf = unzOpen64(zipfilename);
+# endif
+ if (uf==NULL)
+ {
+ strcat(filename_try,".zip");
+# ifdef USEWIN32IOAPI
+ uf = unzOpen2_64(filename_try,&ffunc);
+# else
+ uf = unzOpen64(filename_try);
+# endif
+ }
+ }
+
+ if (uf==NULL)
+ {
+ printf("Cannot open %s or %s.zip\n",zipfilename,zipfilename);
+ return 1;
+ }
+ printf("%s opened\n",filename_try);
+
+ if (opt_do_list==1)
+ ret_value = do_list(uf);
+ else if (opt_do_extract==1)
+ {
+#ifdef _WIN32
+ if (opt_extractdir && _chdir(dirname))
+#else
+ if (opt_extractdir && chdir(dirname))
+#endif
+ {
+ printf("Error changing into %s, aborting\n", dirname);
+ exit(-1);
+ }
+
+ if (filename_to_extract == NULL)
+ ret_value = do_extract(uf, opt_do_extract_withoutpath, opt_overwrite, password);
+ else
+ ret_value = do_extract_onefile(uf, filename_to_extract, opt_do_extract_withoutpath, opt_overwrite, password);
+ }
+
+ unzClose(uf);
+
+ return ret_value;
+}
diff --git a/contrib/zlib/contrib/minizip/miniunzip.1 b/contrib/zlib/contrib/minizip/miniunzip.1
new file mode 100644
index 000000000..111ac6919
--- /dev/null
+++ b/contrib/zlib/contrib/minizip/miniunzip.1
@@ -0,0 +1,63 @@
+.\" Hey, EMACS: -*- nroff -*-
+.TH miniunzip 1 "Nov 7, 2001"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh disable hyphenation
+.\" .hy enable hyphenation
+.\" .ad l left justify
+.\" .ad b justify to both left and right margins
+.\" .nf disable filling
+.\" .fi enable filling
+.\" .br insert line break
+.\" .sp <n> insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+miniunzip - uncompress and examine ZIP archives
+.SH SYNOPSIS
+.B miniunzip
+.RI [ -exvlo ]
+zipfile [ files_to_extract ] [-d tempdir]
+.SH DESCRIPTION
+.B minizip
+is a simple tool which allows the extraction of compressed file
+archives in the ZIP format used by the MS-DOS utility PKZIP. It was
+written as a demonstration of the
+.IR zlib (3)
+library and therefore lack many of the features of the
+.IR unzip (1)
+program.
+.SH OPTIONS
+A number of options are supported. With the exception of
+.BI \-d\ tempdir
+these must be supplied before any
+other arguments and are:
+.TP
+.BI \-l\ ,\ \-\-v
+List the files in the archive without extracting them.
+.TP
+.B \-o
+Overwrite files without prompting for confirmation.
+.TP
+.B \-x
+Extract files (default).
+.PP
+The
+.I zipfile
+argument is the name of the archive to process. The next argument can be used
+to specify a single file to extract from the archive.
+
+Lastly, the following option can be specified at the end of the command-line:
+.TP
+.BI \-d\ tempdir
+Extract the archive in the directory
+.I tempdir
+rather than the current directory.
+.SH SEE ALSO
+.BR minizip (1),
+.BR zlib (3),
+.BR unzip (1).
+.SH AUTHOR
+This program was written by Gilles Vollant. This manual page was
+written by Mark Brown <broonie@sirena.org.uk>. The -d tempdir option
+was added by Dirk Eddelbuettel <edd@debian.org>.
diff --git a/contrib/zlib/contrib/minizip/minizip.1 b/contrib/zlib/contrib/minizip/minizip.1
new file mode 100644
index 000000000..1154484c1
--- /dev/null
+++ b/contrib/zlib/contrib/minizip/minizip.1
@@ -0,0 +1,46 @@
+.\" Hey, EMACS: -*- nroff -*-
+.TH minizip 1 "May 2, 2001"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh disable hyphenation
+.\" .hy enable hyphenation
+.\" .ad l left justify
+.\" .ad b justify to both left and right margins
+.\" .nf disable filling
+.\" .fi enable filling
+.\" .br insert line break
+.\" .sp <n> insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+minizip - create ZIP archives
+.SH SYNOPSIS
+.B minizip
+.RI [ -o ]
+zipfile [ " files" ... ]
+.SH DESCRIPTION
+.B minizip
+is a simple tool which allows the creation of compressed file archives
+in the ZIP format used by the MS-DOS utility PKZIP. It was written as
+a demonstration of the
+.IR zlib (3)
+library and therefore lack many of the features of the
+.IR zip (1)
+program.
+.SH OPTIONS
+The first argument supplied is the name of the ZIP archive to create or
+.RI -o
+in which case it is ignored and the second argument treated as the
+name of the ZIP file. If the ZIP file already exists it will be
+overwritten.
+.PP
+Subsequent arguments specify a list of files to place in the ZIP
+archive. If none are specified then an empty archive will be created.
+.SH SEE ALSO
+.BR miniunzip (1),
+.BR zlib (3),
+.BR zip (1).
+.SH AUTHOR
+This program was written by Gilles Vollant. This manual page was
+written by Mark Brown <broonie@sirena.org.uk>.
+
diff --git a/contrib/zlib/contrib/minizip/minizip.c b/contrib/zlib/contrib/minizip/minizip.c
new file mode 100644
index 000000000..4288962ec
--- /dev/null
+++ b/contrib/zlib/contrib/minizip/minizip.c
@@ -0,0 +1,520 @@
+/*
+ minizip.c
+ Version 1.1, February 14h, 2010
+ sample part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
+
+ Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
+
+ Modifications of Unzip for Zip64
+ Copyright (C) 2007-2008 Even Rouault
+
+ Modifications for Zip64 support on both zip and unzip
+ Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
+*/
+
+
+#if (!defined(_WIN32)) && (!defined(WIN32)) && (!defined(__APPLE__))
+ #ifndef __USE_FILE_OFFSET64
+ #define __USE_FILE_OFFSET64
+ #endif
+ #ifndef __USE_LARGEFILE64
+ #define __USE_LARGEFILE64
+ #endif
+ #ifndef _LARGEFILE64_SOURCE
+ #define _LARGEFILE64_SOURCE
+ #endif
+ #ifndef _FILE_OFFSET_BIT
+ #define _FILE_OFFSET_BIT 64
+ #endif
+#endif
+
+#ifdef __APPLE__
+// In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions
+#define FOPEN_FUNC(filename, mode) fopen(filename, mode)
+#define FTELLO_FUNC(stream) ftello(stream)
+#define FSEEKO_FUNC(stream, offset, origin) fseeko(stream, offset, origin)
+#else
+#define FOPEN_FUNC(filename, mode) fopen64(filename, mode)
+#define FTELLO_FUNC(stream) ftello64(stream)
+#define FSEEKO_FUNC(stream, offset, origin) fseeko64(stream, offset, origin)
+#endif
+
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <errno.h>
+#include <fcntl.h>
+
+#ifdef _WIN32
+# include <direct.h>
+# include <io.h>
+#else
+# include <unistd.h>
+# include <utime.h>
+# include <sys/types.h>
+# include <sys/stat.h>
+#endif
+
+#include "zip.h"
+
+#ifdef _WIN32
+ #define USEWIN32IOAPI
+ #include "iowin32.h"
+#endif
+
+
+
+#define WRITEBUFFERSIZE (16384)
+#define MAXFILENAME (256)
+
+#ifdef _WIN32
+uLong filetime(f, tmzip, dt)
+ char *f; /* name of file to get info on */
+ tm_zip *tmzip; /* return value: access, modific. and creation times */
+ uLong *dt; /* dostime */
+{
+ int ret = 0;
+ {
+ FILETIME ftLocal;
+ HANDLE hFind;
+ WIN32_FIND_DATAA ff32;
+
+ hFind = FindFirstFileA(f,&ff32);
+ if (hFind != INVALID_HANDLE_VALUE)
+ {
+ FileTimeToLocalFileTime(&(ff32.ftLastWriteTime),&ftLocal);
+ FileTimeToDosDateTime(&ftLocal,((LPWORD)dt)+1,((LPWORD)dt)+0);
+ FindClose(hFind);
+ ret = 1;
+ }
+ }
+ return ret;
+}
+#else
+#ifdef unix || __APPLE__
+uLong filetime(f, tmzip, dt)
+ char *f; /* name of file to get info on */
+ tm_zip *tmzip; /* return value: access, modific. and creation times */
+ uLong *dt; /* dostime */
+{
+ int ret=0;
+ struct stat s; /* results of stat() */
+ struct tm* filedate;
+ time_t tm_t=0;
+
+ if (strcmp(f,"-")!=0)
+ {
+ char name[MAXFILENAME+1];
+ int len = strlen(f);
+ if (len > MAXFILENAME)
+ len = MAXFILENAME;
+
+ strncpy(name, f,MAXFILENAME-1);
+ /* strncpy doesnt append the trailing NULL, of the string is too long. */
+ name[ MAXFILENAME ] = '\0';
+
+ if (name[len - 1] == '/')
+ name[len - 1] = '\0';
+ /* not all systems allow stat'ing a file with / appended */
+ if (stat(name,&s)==0)
+ {
+ tm_t = s.st_mtime;
+ ret = 1;
+ }
+ }
+ filedate = localtime(&tm_t);
+
+ tmzip->tm_sec = filedate->tm_sec;
+ tmzip->tm_min = filedate->tm_min;
+ tmzip->tm_hour = filedate->tm_hour;
+ tmzip->tm_mday = filedate->tm_mday;
+ tmzip->tm_mon = filedate->tm_mon ;
+ tmzip->tm_year = filedate->tm_year;
+
+ return ret;
+}
+#else
+uLong filetime(f, tmzip, dt)
+ char *f; /* name of file to get info on */
+ tm_zip *tmzip; /* return value: access, modific. and creation times */
+ uLong *dt; /* dostime */
+{
+ return 0;
+}
+#endif
+#endif
+
+
+
+
+int check_exist_file(filename)
+ const char* filename;
+{
+ FILE* ftestexist;
+ int ret = 1;
+ ftestexist = FOPEN_FUNC(filename,"rb");
+ if (ftestexist==NULL)
+ ret = 0;
+ else
+ fclose(ftestexist);
+ return ret;
+}
+
+void do_banner()
+{
+ printf("MiniZip 1.1, demo of zLib + MiniZip64 package, written by Gilles Vollant\n");
+ printf("more info on MiniZip at http://www.winimage.com/zLibDll/minizip.html\n\n");
+}
+
+void do_help()
+{
+ printf("Usage : minizip [-o] [-a] [-0 to -9] [-p password] [-j] file.zip [files_to_add]\n\n" \
+ " -o Overwrite existing file.zip\n" \
+ " -a Append to existing file.zip\n" \
+ " -0 Store only\n" \
+ " -1 Compress faster\n" \
+ " -9 Compress better\n\n" \
+ " -j exclude path. store only the file name.\n\n");
+}
+
+/* calculate the CRC32 of a file,
+ because to encrypt a file, we need known the CRC32 of the file before */
+int getFileCrc(const char* filenameinzip,void*buf,unsigned long size_buf,unsigned long* result_crc)
+{
+ unsigned long calculate_crc=0;
+ int err=ZIP_OK;
+ FILE * fin = FOPEN_FUNC(filenameinzip,"rb");
+
+ unsigned long size_read = 0;
+ unsigned long total_read = 0;
+ if (fin==NULL)
+ {
+ err = ZIP_ERRNO;
+ }
+
+ if (err == ZIP_OK)
+ do
+ {
+ err = ZIP_OK;
+ size_read = (int)fread(buf,1,size_buf,fin);
+ if (size_read < size_buf)
+ if (feof(fin)==0)
+ {
+ printf("error in reading %s\n",filenameinzip);
+ err = ZIP_ERRNO;
+ }
+
+ if (size_read>0)
+ calculate_crc = crc32(calculate_crc,buf,size_read);
+ total_read += size_read;
+
+ } while ((err == ZIP_OK) && (size_read>0));
+
+ if (fin)
+ fclose(fin);
+
+ *result_crc=calculate_crc;
+ printf("file %s crc %lx\n", filenameinzip, calculate_crc);
+ return err;
+}
+
+int isLargeFile(const char* filename)
+{
+ int largeFile = 0;
+ ZPOS64_T pos = 0;
+ FILE* pFile = FOPEN_FUNC(filename, "rb");
+
+ if(pFile != NULL)
+ {
+ int n = FSEEKO_FUNC(pFile, 0, SEEK_END);
+ pos = FTELLO_FUNC(pFile);
+
+ printf("File : %s is %lld bytes\n", filename, pos);
+
+ if(pos >= 0xffffffff)
+ largeFile = 1;
+
+ fclose(pFile);
+ }
+
+ return largeFile;
+}
+
+int main(argc,argv)
+ int argc;
+ char *argv[];
+{
+ int i;
+ int opt_overwrite=0;
+ int opt_compress_level=Z_DEFAULT_COMPRESSION;
+ int opt_exclude_path=0;
+ int zipfilenamearg = 0;
+ char filename_try[MAXFILENAME+16];
+ int zipok;
+ int err=0;
+ int size_buf=0;
+ void* buf=NULL;
+ const char* password=NULL;
+
+
+ do_banner();
+ if (argc==1)
+ {
+ do_help();
+ return 0;
+ }
+ else
+ {
+ for (i=1;i<argc;i++)
+ {
+ if ((*argv[i])=='-')
+ {
+ const char *p=argv[i]+1;
+
+ while ((*p)!='\0')
+ {
+ char c=*(p++);;
+ if ((c=='o') || (c=='O'))
+ opt_overwrite = 1;
+ if ((c=='a') || (c=='A'))
+ opt_overwrite = 2;
+ if ((c>='0') && (c<='9'))
+ opt_compress_level = c-'0';
+ if ((c=='j') || (c=='J'))
+ opt_exclude_path = 1;
+
+ if (((c=='p') || (c=='P')) && (i+1<argc))
+ {
+ password=argv[i+1];
+ i++;
+ }
+ }
+ }
+ else
+ {
+ if (zipfilenamearg == 0)
+ {
+ zipfilenamearg = i ;
+ }
+ }
+ }
+ }
+
+ size_buf = WRITEBUFFERSIZE;
+ buf = (void*)malloc(size_buf);
+ if (buf==NULL)
+ {
+ printf("Error allocating memory\n");
+ return ZIP_INTERNALERROR;
+ }
+
+ if (zipfilenamearg==0)
+ {
+ zipok=0;
+ }
+ else
+ {
+ int i,len;
+ int dot_found=0;
+
+ zipok = 1 ;
+ strncpy(filename_try, argv[zipfilenamearg],MAXFILENAME-1);
+ /* strncpy doesnt append the trailing NULL, of the string is too long. */
+ filename_try[ MAXFILENAME ] = '\0';
+
+ len=(int)strlen(filename_try);
+ for (i=0;i<len;i++)
+ if (filename_try[i]=='.')
+ dot_found=1;
+
+ if (dot_found==0)
+ strcat(filename_try,".zip");
+
+ if (opt_overwrite==2)
+ {
+ /* if the file don't exist, we not append file */
+ if (check_exist_file(filename_try)==0)
+ opt_overwrite=1;
+ }
+ else
+ if (opt_overwrite==0)
+ if (check_exist_file(filename_try)!=0)
+ {
+ char rep=0;
+ do
+ {
+ char answer[128];
+ int ret;
+ printf("The file %s exists. Overwrite ? [y]es, [n]o, [a]ppend : ",filename_try);
+ ret = scanf("%1s",answer);
+ if (ret != 1)
+ {
+ exit(EXIT_FAILURE);
+ }
+ rep = answer[0] ;
+ if ((rep>='a') && (rep<='z'))
+ rep -= 0x20;
+ }
+ while ((rep!='Y') && (rep!='N') && (rep!='A'));
+ if (rep=='N')
+ zipok = 0;
+ if (rep=='A')
+ opt_overwrite = 2;
+ }
+ }
+
+ if (zipok==1)
+ {
+ zipFile zf;
+ int errclose;
+# ifdef USEWIN32IOAPI
+ zlib_filefunc64_def ffunc;
+ fill_win32_filefunc64A(&ffunc);
+ zf = zipOpen2_64(filename_try,(opt_overwrite==2) ? 2 : 0,NULL,&ffunc);
+# else
+ zf = zipOpen64(filename_try,(opt_overwrite==2) ? 2 : 0);
+# endif
+
+ if (zf == NULL)
+ {
+ printf("error opening %s\n",filename_try);
+ err= ZIP_ERRNO;
+ }
+ else
+ printf("creating %s\n",filename_try);
+
+ for (i=zipfilenamearg+1;(i<argc) && (err==ZIP_OK);i++)
+ {
+ if (!((((*(argv[i]))=='-') || ((*(argv[i]))=='/')) &&
+ ((argv[i][1]=='o') || (argv[i][1]=='O') ||
+ (argv[i][1]=='a') || (argv[i][1]=='A') ||
+ (argv[i][1]=='p') || (argv[i][1]=='P') ||
+ ((argv[i][1]>='0') || (argv[i][1]<='9'))) &&
+ (strlen(argv[i]) == 2)))
+ {
+ FILE * fin;
+ int size_read;
+ const char* filenameinzip = argv[i];
+ const char *savefilenameinzip;
+ zip_fileinfo zi;
+ unsigned long crcFile=0;
+ int zip64 = 0;
+
+ zi.tmz_date.tm_sec = zi.tmz_date.tm_min = zi.tmz_date.tm_hour =
+ zi.tmz_date.tm_mday = zi.tmz_date.tm_mon = zi.tmz_date.tm_year = 0;
+ zi.dosDate = 0;
+ zi.internal_fa = 0;
+ zi.external_fa = 0;
+ filetime(filenameinzip,&zi.tmz_date,&zi.dosDate);
+
+/*
+ err = zipOpenNewFileInZip(zf,filenameinzip,&zi,
+ NULL,0,NULL,0,NULL / * comment * /,
+ (opt_compress_level != 0) ? Z_DEFLATED : 0,
+ opt_compress_level);
+*/
+ if ((password != NULL) && (err==ZIP_OK))
+ err = getFileCrc(filenameinzip,buf,size_buf,&crcFile);
+
+ zip64 = isLargeFile(filenameinzip);
+
+ /* The path name saved, should not include a leading slash. */
+ /*if it did, windows/xp and dynazip couldn't read the zip file. */
+ savefilenameinzip = filenameinzip;
+ while( savefilenameinzip[0] == '\\' || savefilenameinzip[0] == '/' )
+ {
+ savefilenameinzip++;
+ }
+
+ /*should the zip file contain any path at all?*/
+ if( opt_exclude_path )
+ {
+ const char *tmpptr;
+ const char *lastslash = 0;
+ for( tmpptr = savefilenameinzip; *tmpptr; tmpptr++)
+ {
+ if( *tmpptr == '\\' || *tmpptr == '/')
+ {
+ lastslash = tmpptr;
+ }
+ }
+ if( lastslash != NULL )
+ {
+ savefilenameinzip = lastslash+1; // base filename follows last slash.
+ }
+ }
+
+ /**/
+ err = zipOpenNewFileInZip3_64(zf,savefilenameinzip,&zi,
+ NULL,0,NULL,0,NULL /* comment*/,
+ (opt_compress_level != 0) ? Z_DEFLATED : 0,
+ opt_compress_level,0,
+ /* -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, */
+ -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY,
+ password,crcFile, zip64);
+
+ if (err != ZIP_OK)
+ printf("error in opening %s in zipfile\n",filenameinzip);
+ else
+ {
+ fin = FOPEN_FUNC(filenameinzip,"rb");
+ if (fin==NULL)
+ {
+ err=ZIP_ERRNO;
+ printf("error in opening %s for reading\n",filenameinzip);
+ }
+ }
+
+ if (err == ZIP_OK)
+ do
+ {
+ err = ZIP_OK;
+ size_read = (int)fread(buf,1,size_buf,fin);
+ if (size_read < size_buf)
+ if (feof(fin)==0)
+ {
+ printf("error in reading %s\n",filenameinzip);
+ err = ZIP_ERRNO;
+ }
+
+ if (size_read>0)
+ {
+ err = zipWriteInFileInZip (zf,buf,size_read);
+ if (err<0)
+ {
+ printf("error in writing %s in the zipfile\n",
+ filenameinzip);
+ }
+
+ }
+ } while ((err == ZIP_OK) && (size_read>0));
+
+ if (fin)
+ fclose(fin);
+
+ if (err<0)
+ err=ZIP_ERRNO;
+ else
+ {
+ err = zipCloseFileInZip(zf);
+ if (err!=ZIP_OK)
+ printf("error in closing %s in the zipfile\n",
+ filenameinzip);
+ }
+ }
+ }
+ errclose = zipClose(zf,NULL);
+ if (errclose != ZIP_OK)
+ printf("error in closing %s\n",filename_try);
+ }
+ else
+ {
+ do_help();
+ }
+
+ free(buf);
+ return 0;
+}
diff --git a/contrib/zlib/contrib/minizip/minizip.pc.in b/contrib/zlib/contrib/minizip/minizip.pc.in
new file mode 100644
index 000000000..69b5b7fdc
--- /dev/null
+++ b/contrib/zlib/contrib/minizip/minizip.pc.in
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@/minizip
+
+Name: minizip
+Description: Minizip zip file manipulation library
+Requires:
+Version: @PACKAGE_VERSION@
+Libs: -L${libdir} -lminizip
+Libs.private: -lz
+Cflags: -I${includedir}
diff --git a/contrib/zlib/contrib/minizip/mztools.c b/contrib/zlib/contrib/minizip/mztools.c
new file mode 100644
index 000000000..96891c2e0
--- /dev/null
+++ b/contrib/zlib/contrib/minizip/mztools.c
@@ -0,0 +1,291 @@
+/*
+ Additional tools for Minizip
+ Code: Xavier Roche '2004
+ License: Same as ZLIB (www.gzip.org)
+*/
+
+/* Code */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "zlib.h"
+#include "unzip.h"
+
+#define READ_8(adr) ((unsigned char)*(adr))
+#define READ_16(adr) ( READ_8(adr) | (READ_8(adr+1) << 8) )
+#define READ_32(adr) ( READ_16(adr) | (READ_16((adr)+2) << 16) )
+
+#define WRITE_8(buff, n) do { \
+ *((unsigned char*)(buff)) = (unsigned char) ((n) & 0xff); \
+} while(0)
+#define WRITE_16(buff, n) do { \
+ WRITE_8((unsigned char*)(buff), n); \
+ WRITE_8(((unsigned char*)(buff)) + 1, (n) >> 8); \
+} while(0)
+#define WRITE_32(buff, n) do { \
+ WRITE_16((unsigned char*)(buff), (n) & 0xffff); \
+ WRITE_16((unsigned char*)(buff) + 2, (n) >> 16); \
+} while(0)
+
+extern int ZEXPORT unzRepair(file, fileOut, fileOutTmp, nRecovered, bytesRecovered)
+const char* file;
+const char* fileOut;
+const char* fileOutTmp;
+uLong* nRecovered;
+uLong* bytesRecovered;
+{
+ int err = Z_OK;
+ FILE* fpZip = fopen(file, "rb");
+ FILE* fpOut = fopen(fileOut, "wb");
+ FILE* fpOutCD = fopen(fileOutTmp, "wb");
+ if (fpZip != NULL && fpOut != NULL) {
+ int entries = 0;
+ uLong totalBytes = 0;
+ char header[30];
+ char filename[1024];
+ char extra[1024];
+ int offset = 0;
+ int offsetCD = 0;
+ while ( fread(header, 1, 30, fpZip) == 30 ) {
+ int currentOffset = offset;
+
+ /* File entry */
+ if (READ_32(header) == 0x04034b50) {
+ unsigned int version = READ_16(header + 4);
+ unsigned int gpflag = READ_16(header + 6);
+ unsigned int method = READ_16(header + 8);
+ unsigned int filetime = READ_16(header + 10);
+ unsigned int filedate = READ_16(header + 12);
+ unsigned int crc = READ_32(header + 14); /* crc */
+ unsigned int cpsize = READ_32(header + 18); /* compressed size */
+ unsigned int uncpsize = READ_32(header + 22); /* uncompressed sz */
+ unsigned int fnsize = READ_16(header + 26); /* file name length */
+ unsigned int extsize = READ_16(header + 28); /* extra field length */
+ filename[0] = extra[0] = '\0';
+
+ /* Header */
+ if (fwrite(header, 1, 30, fpOut) == 30) {
+ offset += 30;
+ } else {
+ err = Z_ERRNO;
+ break;
+ }
+
+ /* Filename */
+ if (fnsize > 0) {
+ if (fnsize < sizeof(filename)) {
+ if (fread(filename, 1, fnsize, fpZip) == fnsize) {
+ if (fwrite(filename, 1, fnsize, fpOut) == fnsize) {
+ offset += fnsize;
+ } else {
+ err = Z_ERRNO;
+ break;
+ }
+ } else {
+ err = Z_ERRNO;
+ break;
+ }
+ } else {
+ err = Z_ERRNO;
+ break;
+ }
+ } else {
+ err = Z_STREAM_ERROR;
+ break;
+ }
+
+ /* Extra field */
+ if (extsize > 0) {
+ if (extsize < sizeof(extra)) {
+ if (fread(extra, 1, extsize, fpZip) == extsize) {
+ if (fwrite(extra, 1, extsize, fpOut) == extsize) {
+ offset += extsize;
+ } else {
+ err = Z_ERRNO;
+ break;
+ }
+ } else {
+ err = Z_ERRNO;
+ break;
+ }
+ } else {
+ err = Z_ERRNO;
+ break;
+ }
+ }
+
+ /* Data */
+ {
+ int dataSize = cpsize;
+ if (dataSize == 0) {
+ dataSize = uncpsize;
+ }
+ if (dataSize > 0) {
+ char* data = malloc(dataSize);
+ if (data != NULL) {
+ if ((int)fread(data, 1, dataSize, fpZip) == dataSize) {
+ if ((int)fwrite(data, 1, dataSize, fpOut) == dataSize) {
+ offset += dataSize;
+ totalBytes += dataSize;
+ } else {
+ err = Z_ERRNO;
+ }
+ } else {
+ err = Z_ERRNO;
+ }
+ free(data);
+ if (err != Z_OK) {
+ break;
+ }
+ } else {
+ err = Z_MEM_ERROR;
+ break;
+ }
+ }
+ }
+
+ /* Central directory entry */
+ {
+ char header[46];
+ char* comment = "";
+ int comsize = (int) strlen(comment);
+ WRITE_32(header, 0x02014b50);
+ WRITE_16(header + 4, version);
+ WRITE_16(header + 6, version);
+ WRITE_16(header + 8, gpflag);
+ WRITE_16(header + 10, method);
+ WRITE_16(header + 12, filetime);
+ WRITE_16(header + 14, filedate);
+ WRITE_32(header + 16, crc);
+ WRITE_32(header + 20, cpsize);
+ WRITE_32(header + 24, uncpsize);
+ WRITE_16(header + 28, fnsize);
+ WRITE_16(header + 30, extsize);
+ WRITE_16(header + 32, comsize);
+ WRITE_16(header + 34, 0); /* disk # */
+ WRITE_16(header + 36, 0); /* int attrb */
+ WRITE_32(header + 38, 0); /* ext attrb */
+ WRITE_32(header + 42, currentOffset);
+ /* Header */
+ if (fwrite(header, 1, 46, fpOutCD) == 46) {
+ offsetCD += 46;
+
+ /* Filename */
+ if (fnsize > 0) {
+ if (fwrite(filename, 1, fnsize, fpOutCD) == fnsize) {
+ offsetCD += fnsize;
+ } else {
+ err = Z_ERRNO;
+ break;
+ }
+ } else {
+ err = Z_STREAM_ERROR;
+ break;
+ }
+
+ /* Extra field */
+ if (extsize > 0) {
+ if (fwrite(extra, 1, extsize, fpOutCD) == extsize) {
+ offsetCD += extsize;
+ } else {
+ err = Z_ERRNO;
+ break;
+ }
+ }
+
+ /* Comment field */
+ if (comsize > 0) {
+ if ((int)fwrite(comment, 1, comsize, fpOutCD) == comsize) {
+ offsetCD += comsize;
+ } else {
+ err = Z_ERRNO;
+ break;
+ }
+ }
+
+
+ } else {
+ err = Z_ERRNO;
+ break;
+ }
+ }
+
+ /* Success */
+ entries++;
+
+ } else {
+ break;
+ }
+ }
+
+ /* Final central directory */
+ {
+ int entriesZip = entries;
+ char header[22];
+ char* comment = ""; // "ZIP File recovered by zlib/minizip/mztools";
+ int comsize = (int) strlen(comment);
+ if (entriesZip > 0xffff) {
+ entriesZip = 0xffff;
+ }
+ WRITE_32(header, 0x06054b50);
+ WRITE_16(header + 4, 0); /* disk # */
+ WRITE_16(header + 6, 0); /* disk # */
+ WRITE_16(header + 8, entriesZip); /* hack */
+ WRITE_16(header + 10, entriesZip); /* hack */
+ WRITE_32(header + 12, offsetCD); /* size of CD */
+ WRITE_32(header + 16, offset); /* offset to CD */
+ WRITE_16(header + 20, comsize); /* comment */
+
+ /* Header */
+ if (fwrite(header, 1, 22, fpOutCD) == 22) {
+
+ /* Comment field */
+ if (comsize > 0) {
+ if ((int)fwrite(comment, 1, comsize, fpOutCD) != comsize) {
+ err = Z_ERRNO;
+ }
+ }
+
+ } else {
+ err = Z_ERRNO;
+ }
+ }
+
+ /* Final merge (file + central directory) */
+ fclose(fpOutCD);
+ if (err == Z_OK) {
+ fpOutCD = fopen(fileOutTmp, "rb");
+ if (fpOutCD != NULL) {
+ int nRead;
+ char buffer[8192];
+ while ( (nRead = (int)fread(buffer, 1, sizeof(buffer), fpOutCD)) > 0) {
+ if ((int)fwrite(buffer, 1, nRead, fpOut) != nRead) {
+ err = Z_ERRNO;
+ break;
+ }
+ }
+ fclose(fpOutCD);
+ }
+ }
+
+ /* Close */
+ fclose(fpZip);
+ fclose(fpOut);
+
+ /* Wipe temporary file */
+ (void)remove(fileOutTmp);
+
+ /* Number of recovered entries */
+ if (err == Z_OK) {
+ if (nRecovered != NULL) {
+ *nRecovered = entries;
+ }
+ if (bytesRecovered != NULL) {
+ *bytesRecovered = totalBytes;
+ }
+ }
+ } else {
+ err = Z_STREAM_ERROR;
+ }
+ return err;
+}
diff --git a/contrib/zlib/contrib/minizip/mztools.h b/contrib/zlib/contrib/minizip/mztools.h
new file mode 100644
index 000000000..a49a426ec
--- /dev/null
+++ b/contrib/zlib/contrib/minizip/mztools.h
@@ -0,0 +1,37 @@
+/*
+ Additional tools for Minizip
+ Code: Xavier Roche '2004
+ License: Same as ZLIB (www.gzip.org)
+*/
+
+#ifndef _zip_tools_H
+#define _zip_tools_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _ZLIB_H
+#include "zlib.h"
+#endif
+
+#include "unzip.h"
+
+/* Repair a ZIP file (missing central directory)
+ file: file to recover
+ fileOut: output file after recovery
+ fileOutTmp: temporary file name used for recovery
+*/
+extern int ZEXPORT unzRepair(const char* file,
+ const char* fileOut,
+ const char* fileOutTmp,
+ uLong* nRecovered,
+ uLong* bytesRecovered);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif
diff --git a/contrib/zlib/contrib/minizip/unzip.c b/contrib/zlib/contrib/minizip/unzip.c
new file mode 100644
index 000000000..bcfb9416e
--- /dev/null
+++ b/contrib/zlib/contrib/minizip/unzip.c
@@ -0,0 +1,2125 @@
+/* unzip.c -- IO for uncompress .zip files using zlib
+ Version 1.1, February 14h, 2010
+ part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
+
+ Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
+
+ Modifications of Unzip for Zip64
+ Copyright (C) 2007-2008 Even Rouault
+
+ Modifications for Zip64 support on both zip and unzip
+ Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
+
+ For more info read MiniZip_info.txt
+
+
+ ------------------------------------------------------------------------------------
+ Decryption code comes from crypt.c by Info-ZIP but has been greatly reduced in terms of
+ compatibility with older software. The following is from the original crypt.c.
+ Code woven in by Terry Thorsen 1/2003.
+
+ Copyright (c) 1990-2000 Info-ZIP. All rights reserved.
+
+ See the accompanying file LICENSE, version 2000-Apr-09 or later
+ (the contents of which are also included in zip.h) for terms of use.
+ If, for some reason, all these files are missing, the Info-ZIP license
+ also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html
+
+ crypt.c (full version) by Info-ZIP. Last revised: [see crypt.h]
+
+ The encryption/decryption parts of this source code (as opposed to the
+ non-echoing password parts) were originally written in Europe. The
+ whole source package can be freely distributed, including from the USA.
+ (Prior to January 2000, re-export from the US was a violation of US law.)
+
+ This encryption code is a direct transcription of the algorithm from
+ Roger Schlafly, described by Phil Katz in the file appnote.txt. This
+ file (appnote.txt) is distributed with the PKZIP program (even in the
+ version without encryption capabilities).
+
+ ------------------------------------------------------------------------------------
+
+ Changes in unzip.c
+
+ 2007-2008 - Even Rouault - Addition of cpl_unzGetCurrentFileZStreamPos
+ 2007-2008 - Even Rouault - Decoration of symbol names unz* -> cpl_unz*
+ 2007-2008 - Even Rouault - Remove old C style function prototypes
+ 2007-2008 - Even Rouault - Add unzip support for ZIP64
+
+ Copyright (C) 2007-2008 Even Rouault
+
+
+ Oct-2009 - Mathias Svensson - Removed cpl_* from symbol names (Even Rouault added them but since this is now moved to a new project (minizip64) I renamed them again).
+ Oct-2009 - Mathias Svensson - Fixed problem if uncompressed size was > 4G and compressed size was <4G
+ should only read the compressed/uncompressed size from the Zip64 format if
+ the size from normal header was 0xFFFFFFFF
+ Oct-2009 - Mathias Svensson - Applied some bug fixes from paches recived from Gilles Vollant
+ Oct-2009 - Mathias Svensson - Applied support to unzip files with compression mathod BZIP2 (bzip2 lib is required)
+ Patch created by Daniel Borca
+
+ Jan-2010 - back to unzip and minizip 1.0 name scheme, with compatibility layer
+
+ Copyright (C) 1998 - 2010 Gilles Vollant, Even Rouault, Mathias Svensson
+
+*/
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifndef NOUNCRYPT
+ #define NOUNCRYPT
+#endif
+
+#include "zlib.h"
+#include "unzip.h"
+
+#ifdef STDC
+# include <stddef.h>
+# include <string.h>
+# include <stdlib.h>
+#endif
+#ifdef NO_ERRNO_H
+ extern int errno;
+#else
+# include <errno.h>
+#endif
+
+
+#ifndef local
+# define local static
+#endif
+/* compile with -Dlocal if your debugger can't find static symbols */
+
+
+#ifndef CASESENSITIVITYDEFAULT_NO
+# if !defined(unix) && !defined(CASESENSITIVITYDEFAULT_YES)
+# define CASESENSITIVITYDEFAULT_NO
+# endif
+#endif
+
+
+#ifndef UNZ_BUFSIZE
+#define UNZ_BUFSIZE (16384)
+#endif
+
+#ifndef UNZ_MAXFILENAMEINZIP
+#define UNZ_MAXFILENAMEINZIP (256)
+#endif
+
+#ifndef ALLOC
+# define ALLOC(size) (malloc(size))
+#endif
+#ifndef TRYFREE
+# define TRYFREE(p) {if (p) free(p);}
+#endif
+
+#define SIZECENTRALDIRITEM (0x2e)
+#define SIZEZIPLOCALHEADER (0x1e)
+
+
+const char unz_copyright[] =
+ " unzip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll";
+
+/* unz_file_info_interntal contain internal info about a file in zipfile*/
+typedef struct unz_file_info64_internal_s
+{
+ ZPOS64_T offset_curfile;/* relative offset of local header 8 bytes */
+} unz_file_info64_internal;
+
+
+/* file_in_zip_read_info_s contain internal information about a file in zipfile,
+ when reading and decompress it */
+typedef struct
+{
+ char *read_buffer; /* internal buffer for compressed data */
+ z_stream stream; /* zLib stream structure for inflate */
+
+#ifdef HAVE_BZIP2
+ bz_stream bstream; /* bzLib stream structure for bziped */
+#endif
+
+ ZPOS64_T pos_in_zipfile; /* position in byte on the zipfile, for fseek*/
+ uLong stream_initialised; /* flag set if stream structure is initialised*/
+
+ ZPOS64_T offset_local_extrafield;/* offset of the local extra field */
+ uInt size_local_extrafield;/* size of the local extra field */
+ ZPOS64_T pos_local_extrafield; /* position in the local extra field in read*/
+ ZPOS64_T total_out_64;
+
+ uLong crc32; /* crc32 of all data uncompressed */
+ uLong crc32_wait; /* crc32 we must obtain after decompress all */
+ ZPOS64_T rest_read_compressed; /* number of byte to be decompressed */
+ ZPOS64_T rest_read_uncompressed;/*number of byte to be obtained after decomp*/
+ zlib_filefunc64_32_def z_filefunc;
+ voidpf filestream; /* io structore of the zipfile */
+ uLong compression_method; /* compression method (0==store) */
+ ZPOS64_T byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/
+ int raw;
+} file_in_zip64_read_info_s;
+
+
+/* unz64_s contain internal information about the zipfile
+*/
+typedef struct
+{
+ zlib_filefunc64_32_def z_filefunc;
+ int is64bitOpenFunction;
+ voidpf filestream; /* io structore of the zipfile */
+ unz_global_info64 gi; /* public global information */
+ ZPOS64_T byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/
+ ZPOS64_T num_file; /* number of the current file in the zipfile*/
+ ZPOS64_T pos_in_central_dir; /* pos of the current file in the central dir*/
+ ZPOS64_T current_file_ok; /* flag about the usability of the current file*/
+ ZPOS64_T central_pos; /* position of the beginning of the central dir*/
+
+ ZPOS64_T size_central_dir; /* size of the central directory */
+ ZPOS64_T offset_central_dir; /* offset of start of central directory with
+ respect to the starting disk number */
+
+ unz_file_info64 cur_file_info; /* public info about the current file in zip*/
+ unz_file_info64_internal cur_file_info_internal; /* private info about it*/
+ file_in_zip64_read_info_s* pfile_in_zip_read; /* structure about the current
+ file if we are decompressing it */
+ int encrypted;
+
+ int isZip64;
+
+# ifndef NOUNCRYPT
+ unsigned long keys[3]; /* keys defining the pseudo-random sequence */
+ const z_crc_t* pcrc_32_tab;
+# endif
+} unz64_s;
+
+
+#ifndef NOUNCRYPT
+#include "crypt.h"
+#endif
+
+/* ===========================================================================
+ Read a byte from a gz_stream; update next_in and avail_in. Return EOF
+ for end of file.
+ IN assertion: the stream s has been successfully opened for reading.
+*/
+
+
+local int unz64local_getByte OF((
+ const zlib_filefunc64_32_def* pzlib_filefunc_def,
+ voidpf filestream,
+ int *pi));
+
+local int unz64local_getByte(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, int *pi)
+{
+ unsigned char c;
+ int err = (int)ZREAD64(*pzlib_filefunc_def,filestream,&c,1);
+ if (err==1)
+ {
+ *pi = (int)c;
+ return UNZ_OK;
+ }
+ else
+ {
+ if (ZERROR64(*pzlib_filefunc_def,filestream))
+ return UNZ_ERRNO;
+ else
+ return UNZ_EOF;
+ }
+}
+
+
+/* ===========================================================================
+ Reads a long in LSB order from the given gz_stream. Sets
+*/
+local int unz64local_getShort OF((
+ const zlib_filefunc64_32_def* pzlib_filefunc_def,
+ voidpf filestream,
+ uLong *pX));
+
+local int unz64local_getShort (const zlib_filefunc64_32_def* pzlib_filefunc_def,
+ voidpf filestream,
+ uLong *pX)
+{
+ uLong x ;
+ int i = 0;
+ int err;
+
+ err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
+ x = (uLong)i;
+
+ if (err==UNZ_OK)
+ err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
+ x |= ((uLong)i)<<8;
+
+ if (err==UNZ_OK)
+ *pX = x;
+ else
+ *pX = 0;
+ return err;
+}
+
+local int unz64local_getLong OF((
+ const zlib_filefunc64_32_def* pzlib_filefunc_def,
+ voidpf filestream,
+ uLong *pX));
+
+local int unz64local_getLong (const zlib_filefunc64_32_def* pzlib_filefunc_def,
+ voidpf filestream,
+ uLong *pX)
+{
+ uLong x ;
+ int i = 0;
+ int err;
+
+ err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
+ x = (uLong)i;
+
+ if (err==UNZ_OK)
+ err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
+ x |= ((uLong)i)<<8;
+
+ if (err==UNZ_OK)
+ err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
+ x |= ((uLong)i)<<16;
+
+ if (err==UNZ_OK)
+ err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
+ x += ((uLong)i)<<24;
+
+ if (err==UNZ_OK)
+ *pX = x;
+ else
+ *pX = 0;
+ return err;
+}
+
+local int unz64local_getLong64 OF((
+ const zlib_filefunc64_32_def* pzlib_filefunc_def,
+ voidpf filestream,
+ ZPOS64_T *pX));
+
+
+local int unz64local_getLong64 (const zlib_filefunc64_32_def* pzlib_filefunc_def,
+ voidpf filestream,
+ ZPOS64_T *pX)
+{
+ ZPOS64_T x ;
+ int i = 0;
+ int err;
+
+ err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
+ x = (ZPOS64_T)i;
+
+ if (err==UNZ_OK)
+ err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
+ x |= ((ZPOS64_T)i)<<8;
+
+ if (err==UNZ_OK)
+ err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
+ x |= ((ZPOS64_T)i)<<16;
+
+ if (err==UNZ_OK)
+ err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
+ x |= ((ZPOS64_T)i)<<24;
+
+ if (err==UNZ_OK)
+ err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
+ x |= ((ZPOS64_T)i)<<32;
+
+ if (err==UNZ_OK)
+ err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
+ x |= ((ZPOS64_T)i)<<40;
+
+ if (err==UNZ_OK)
+ err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
+ x |= ((ZPOS64_T)i)<<48;
+
+ if (err==UNZ_OK)
+ err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
+ x |= ((ZPOS64_T)i)<<56;
+
+ if (err==UNZ_OK)
+ *pX = x;
+ else
+ *pX = 0;
+ return err;
+}
+
+/* My own strcmpi / strcasecmp */
+local int strcmpcasenosensitive_internal (const char* fileName1, const char* fileName2)
+{
+ for (;;)
+ {
+ char c1=*(fileName1++);
+ char c2=*(fileName2++);
+ if ((c1>='a') && (c1<='z'))
+ c1 -= 0x20;
+ if ((c2>='a') && (c2<='z'))
+ c2 -= 0x20;
+ if (c1=='\0')
+ return ((c2=='\0') ? 0 : -1);
+ if (c2=='\0')
+ return 1;
+ if (c1<c2)
+ return -1;
+ if (c1>c2)
+ return 1;
+ }
+}
+
+
+#ifdef CASESENSITIVITYDEFAULT_NO
+#define CASESENSITIVITYDEFAULTVALUE 2
+#else
+#define CASESENSITIVITYDEFAULTVALUE 1
+#endif
+
+#ifndef STRCMPCASENOSENTIVEFUNCTION
+#define STRCMPCASENOSENTIVEFUNCTION strcmpcasenosensitive_internal
+#endif
+
+/*
+ Compare two filename (fileName1,fileName2).
+ If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp)
+ If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi
+ or strcasecmp)
+ If iCaseSenisivity = 0, case sensitivity is defaut of your operating system
+ (like 1 on Unix, 2 on Windows)
+
+*/
+extern int ZEXPORT unzStringFileNameCompare (const char* fileName1,
+ const char* fileName2,
+ int iCaseSensitivity)
+
+{
+ if (iCaseSensitivity==0)
+ iCaseSensitivity=CASESENSITIVITYDEFAULTVALUE;
+
+ if (iCaseSensitivity==1)
+ return strcmp(fileName1,fileName2);
+
+ return STRCMPCASENOSENTIVEFUNCTION(fileName1,fileName2);
+}
+
+#ifndef BUFREADCOMMENT
+#define BUFREADCOMMENT (0x400)
+#endif
+
+/*
+ Locate the Central directory of a zipfile (at the end, just before
+ the global comment)
+*/
+local ZPOS64_T unz64local_SearchCentralDir OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream));
+local ZPOS64_T unz64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream)
+{
+ unsigned char* buf;
+ ZPOS64_T uSizeFile;
+ ZPOS64_T uBackRead;
+ ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */
+ ZPOS64_T uPosFound=0;
+
+ if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0)
+ return 0;
+
+
+ uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream);
+
+ if (uMaxBack>uSizeFile)
+ uMaxBack = uSizeFile;
+
+ buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4);
+ if (buf==NULL)
+ return 0;
+
+ uBackRead = 4;
+ while (uBackRead<uMaxBack)
+ {
+ uLong uReadSize;
+ ZPOS64_T uReadPos ;
+ int i;
+ if (uBackRead+BUFREADCOMMENT>uMaxBack)
+ uBackRead = uMaxBack;
+ else
+ uBackRead+=BUFREADCOMMENT;
+ uReadPos = uSizeFile-uBackRead ;
+
+ uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ?
+ (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos);
+ if (ZSEEK64(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0)
+ break;
+
+ if (ZREAD64(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize)
+ break;
+
+ for (i=(int)uReadSize-3; (i--)>0;)
+ if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) &&
+ ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06))
+ {
+ uPosFound = uReadPos+i;
+ break;
+ }
+
+ if (uPosFound!=0)
+ break;
+ }
+ TRYFREE(buf);
+ return uPosFound;
+}
+
+
+/*
+ Locate the Central directory 64 of a zipfile (at the end, just before
+ the global comment)
+*/
+local ZPOS64_T unz64local_SearchCentralDir64 OF((
+ const zlib_filefunc64_32_def* pzlib_filefunc_def,
+ voidpf filestream));
+
+local ZPOS64_T unz64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib_filefunc_def,
+ voidpf filestream)
+{
+ unsigned char* buf;
+ ZPOS64_T uSizeFile;
+ ZPOS64_T uBackRead;
+ ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */
+ ZPOS64_T uPosFound=0;
+ uLong uL;
+ ZPOS64_T relativeOffset;
+
+ if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0)
+ return 0;
+
+
+ uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream);
+
+ if (uMaxBack>uSizeFile)
+ uMaxBack = uSizeFile;
+
+ buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4);
+ if (buf==NULL)
+ return 0;
+
+ uBackRead = 4;
+ while (uBackRead<uMaxBack)
+ {
+ uLong uReadSize;
+ ZPOS64_T uReadPos;
+ int i;
+ if (uBackRead+BUFREADCOMMENT>uMaxBack)
+ uBackRead = uMaxBack;
+ else
+ uBackRead+=BUFREADCOMMENT;
+ uReadPos = uSizeFile-uBackRead ;
+
+ uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ?
+ (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos);
+ if (ZSEEK64(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0)
+ break;
+
+ if (ZREAD64(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize)
+ break;
+
+ for (i=(int)uReadSize-3; (i--)>0;)
+ if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) &&
+ ((*(buf+i+2))==0x06) && ((*(buf+i+3))==0x07))
+ {
+ uPosFound = uReadPos+i;
+ break;
+ }
+
+ if (uPosFound!=0)
+ break;
+ }
+ TRYFREE(buf);
+ if (uPosFound == 0)
+ return 0;
+
+ /* Zip64 end of central directory locator */
+ if (ZSEEK64(*pzlib_filefunc_def,filestream, uPosFound,ZLIB_FILEFUNC_SEEK_SET)!=0)
+ return 0;
+
+ /* the signature, already checked */
+ if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK)
+ return 0;
+
+ /* number of the disk with the start of the zip64 end of central directory */
+ if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK)
+ return 0;
+ if (uL != 0)
+ return 0;
+
+ /* relative offset of the zip64 end of central directory record */
+ if (unz64local_getLong64(pzlib_filefunc_def,filestream,&relativeOffset)!=UNZ_OK)
+ return 0;
+
+ /* total number of disks */
+ if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK)
+ return 0;
+ if (uL != 1)
+ return 0;
+
+ /* Goto end of central directory record */
+ if (ZSEEK64(*pzlib_filefunc_def,filestream, relativeOffset,ZLIB_FILEFUNC_SEEK_SET)!=0)
+ return 0;
+
+ /* the signature */
+ if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK)
+ return 0;
+
+ if (uL != 0x06064b50)
+ return 0;
+
+ return relativeOffset;
+}
+
+/*
+ Open a Zip file. path contain the full pathname (by example,
+ on a Windows NT computer "c:\\test\\zlib114.zip" or on an Unix computer
+ "zlib/zlib114.zip".
+ If the zipfile cannot be opened (file doesn't exist or in not valid), the
+ return value is NULL.
+ Else, the return value is a unzFile Handle, usable with other function
+ of this unzip package.
+*/
+local unzFile unzOpenInternal (const void *path,
+ zlib_filefunc64_32_def* pzlib_filefunc64_32_def,
+ int is64bitOpenFunction)
+{
+ unz64_s us;
+ unz64_s *s;
+ ZPOS64_T central_pos;
+ uLong uL;
+
+ uLong number_disk; /* number of the current dist, used for
+ spaning ZIP, unsupported, always 0*/
+ uLong number_disk_with_CD; /* number the the disk with central dir, used
+ for spaning ZIP, unsupported, always 0*/
+ ZPOS64_T number_entry_CD; /* total number of entries in
+ the central dir
+ (same than number_entry on nospan) */
+
+ int err=UNZ_OK;
+
+ if (unz_copyright[0]!=' ')
+ return NULL;
+
+ us.z_filefunc.zseek32_file = NULL;
+ us.z_filefunc.ztell32_file = NULL;
+ if (pzlib_filefunc64_32_def==NULL)
+ fill_fopen64_filefunc(&us.z_filefunc.zfile_func64);
+ else
+ us.z_filefunc = *pzlib_filefunc64_32_def;
+ us.is64bitOpenFunction = is64bitOpenFunction;
+
+
+
+ us.filestream = ZOPEN64(us.z_filefunc,
+ path,
+ ZLIB_FILEFUNC_MODE_READ |
+ ZLIB_FILEFUNC_MODE_EXISTING);
+ if (us.filestream==NULL)
+ return NULL;
+
+ central_pos = unz64local_SearchCentralDir64(&us.z_filefunc,us.filestream);
+ if (central_pos)
+ {
+ uLong uS;
+ ZPOS64_T uL64;
+
+ us.isZip64 = 1;
+
+ if (ZSEEK64(us.z_filefunc, us.filestream,
+ central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0)
+ err=UNZ_ERRNO;
+
+ /* the signature, already checked */
+ if (unz64local_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK)
+ err=UNZ_ERRNO;
+
+ /* size of zip64 end of central directory record */
+ if (unz64local_getLong64(&us.z_filefunc, us.filestream,&uL64)!=UNZ_OK)
+ err=UNZ_ERRNO;
+
+ /* version made by */
+ if (unz64local_getShort(&us.z_filefunc, us.filestream,&uS)!=UNZ_OK)
+ err=UNZ_ERRNO;
+
+ /* version needed to extract */
+ if (unz64local_getShort(&us.z_filefunc, us.filestream,&uS)!=UNZ_OK)
+ err=UNZ_ERRNO;
+
+ /* number of this disk */
+ if (unz64local_getLong(&us.z_filefunc, us.filestream,&number_disk)!=UNZ_OK)
+ err=UNZ_ERRNO;
+
+ /* number of the disk with the start of the central directory */
+ if (unz64local_getLong(&us.z_filefunc, us.filestream,&number_disk_with_CD)!=UNZ_OK)
+ err=UNZ_ERRNO;
+
+ /* total number of entries in the central directory on this disk */
+ if (unz64local_getLong64(&us.z_filefunc, us.filestream,&us.gi.number_entry)!=UNZ_OK)
+ err=UNZ_ERRNO;
+
+ /* total number of entries in the central directory */
+ if (unz64local_getLong64(&us.z_filefunc, us.filestream,&number_entry_CD)!=UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if ((number_entry_CD!=us.gi.number_entry) ||
+ (number_disk_with_CD!=0) ||
+ (number_disk!=0))
+ err=UNZ_BADZIPFILE;
+
+ /* size of the central directory */
+ if (unz64local_getLong64(&us.z_filefunc, us.filestream,&us.size_central_dir)!=UNZ_OK)
+ err=UNZ_ERRNO;
+
+ /* offset of start of central directory with respect to the
+ starting disk number */
+ if (unz64local_getLong64(&us.z_filefunc, us.filestream,&us.offset_central_dir)!=UNZ_OK)
+ err=UNZ_ERRNO;
+
+ us.gi.size_comment = 0;
+ }
+ else
+ {
+ central_pos = unz64local_SearchCentralDir(&us.z_filefunc,us.filestream);
+ if (central_pos==0)
+ err=UNZ_ERRNO;
+
+ us.isZip64 = 0;
+
+ if (ZSEEK64(us.z_filefunc, us.filestream,
+ central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0)
+ err=UNZ_ERRNO;
+
+ /* the signature, already checked */
+ if (unz64local_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK)
+ err=UNZ_ERRNO;
+
+ /* number of this disk */
+ if (unz64local_getShort(&us.z_filefunc, us.filestream,&number_disk)!=UNZ_OK)
+ err=UNZ_ERRNO;
+
+ /* number of the disk with the start of the central directory */
+ if (unz64local_getShort(&us.z_filefunc, us.filestream,&number_disk_with_CD)!=UNZ_OK)
+ err=UNZ_ERRNO;
+
+ /* total number of entries in the central dir on this disk */
+ if (unz64local_getShort(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK)
+ err=UNZ_ERRNO;
+ us.gi.number_entry = uL;
+
+ /* total number of entries in the central dir */
+ if (unz64local_getShort(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK)
+ err=UNZ_ERRNO;
+ number_entry_CD = uL;
+
+ if ((number_entry_CD!=us.gi.number_entry) ||
+ (number_disk_with_CD!=0) ||
+ (number_disk!=0))
+ err=UNZ_BADZIPFILE;
+
+ /* size of the central directory */
+ if (unz64local_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK)
+ err=UNZ_ERRNO;
+ us.size_central_dir = uL;
+
+ /* offset of start of central directory with respect to the
+ starting disk number */
+ if (unz64local_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK)
+ err=UNZ_ERRNO;
+ us.offset_central_dir = uL;
+
+ /* zipfile comment length */
+ if (unz64local_getShort(&us.z_filefunc, us.filestream,&us.gi.size_comment)!=UNZ_OK)
+ err=UNZ_ERRNO;
+ }
+
+ if ((central_pos<us.offset_central_dir+us.size_central_dir) &&
+ (err==UNZ_OK))
+ err=UNZ_BADZIPFILE;
+
+ if (err!=UNZ_OK)
+ {
+ ZCLOSE64(us.z_filefunc, us.filestream);
+ return NULL;
+ }
+
+ us.byte_before_the_zipfile = central_pos -
+ (us.offset_central_dir+us.size_central_dir);
+ us.central_pos = central_pos;
+ us.pfile_in_zip_read = NULL;
+ us.encrypted = 0;
+
+
+ s=(unz64_s*)ALLOC(sizeof(unz64_s));
+ if( s != NULL)
+ {
+ *s=us;
+ unzGoToFirstFile((unzFile)s);
+ }
+ return (unzFile)s;
+}
+
+
+extern unzFile ZEXPORT unzOpen2 (const char *path,
+ zlib_filefunc_def* pzlib_filefunc32_def)
+{
+ if (pzlib_filefunc32_def != NULL)
+ {
+ zlib_filefunc64_32_def zlib_filefunc64_32_def_fill;
+ fill_zlib_filefunc64_32_def_from_filefunc32(&zlib_filefunc64_32_def_fill,pzlib_filefunc32_def);
+ return unzOpenInternal(path, &zlib_filefunc64_32_def_fill, 0);
+ }
+ else
+ return unzOpenInternal(path, NULL, 0);
+}
+
+extern unzFile ZEXPORT unzOpen2_64 (const void *path,
+ zlib_filefunc64_def* pzlib_filefunc_def)
+{
+ if (pzlib_filefunc_def != NULL)
+ {
+ zlib_filefunc64_32_def zlib_filefunc64_32_def_fill;
+ zlib_filefunc64_32_def_fill.zfile_func64 = *pzlib_filefunc_def;
+ zlib_filefunc64_32_def_fill.ztell32_file = NULL;
+ zlib_filefunc64_32_def_fill.zseek32_file = NULL;
+ return unzOpenInternal(path, &zlib_filefunc64_32_def_fill, 1);
+ }
+ else
+ return unzOpenInternal(path, NULL, 1);
+}
+
+extern unzFile ZEXPORT unzOpen (const char *path)
+{
+ return unzOpenInternal(path, NULL, 0);
+}
+
+extern unzFile ZEXPORT unzOpen64 (const void *path)
+{
+ return unzOpenInternal(path, NULL, 1);
+}
+
+/*
+ Close a ZipFile opened with unzOpen.
+ If there is files inside the .Zip opened with unzOpenCurrentFile (see later),
+ these files MUST be closed with unzCloseCurrentFile before call unzClose.
+ return UNZ_OK if there is no problem. */
+extern int ZEXPORT unzClose (unzFile file)
+{
+ unz64_s* s;
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz64_s*)file;
+
+ if (s->pfile_in_zip_read!=NULL)
+ unzCloseCurrentFile(file);
+
+ ZCLOSE64(s->z_filefunc, s->filestream);
+ TRYFREE(s);
+ return UNZ_OK;
+}
+
+
+/*
+ Write info about the ZipFile in the *pglobal_info structure.
+ No preparation of the structure is needed
+ return UNZ_OK if there is no problem. */
+extern int ZEXPORT unzGetGlobalInfo64 (unzFile file, unz_global_info64* pglobal_info)
+{
+ unz64_s* s;
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz64_s*)file;
+ *pglobal_info=s->gi;
+ return UNZ_OK;
+}
+
+extern int ZEXPORT unzGetGlobalInfo (unzFile file, unz_global_info* pglobal_info32)
+{
+ unz64_s* s;
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz64_s*)file;
+ /* to do : check if number_entry is not truncated */
+ pglobal_info32->number_entry = (uLong)s->gi.number_entry;
+ pglobal_info32->size_comment = s->gi.size_comment;
+ return UNZ_OK;
+}
+/*
+ Translate date/time from Dos format to tm_unz (readable more easilty)
+*/
+local void unz64local_DosDateToTmuDate (ZPOS64_T ulDosDate, tm_unz* ptm)
+{
+ ZPOS64_T uDate;
+ uDate = (ZPOS64_T)(ulDosDate>>16);
+ ptm->tm_mday = (uInt)(uDate&0x1f) ;
+ ptm->tm_mon = (uInt)((((uDate)&0x1E0)/0x20)-1) ;
+ ptm->tm_year = (uInt)(((uDate&0x0FE00)/0x0200)+1980) ;
+
+ ptm->tm_hour = (uInt) ((ulDosDate &0xF800)/0x800);
+ ptm->tm_min = (uInt) ((ulDosDate&0x7E0)/0x20) ;
+ ptm->tm_sec = (uInt) (2*(ulDosDate&0x1f)) ;
+}
+
+/*
+ Get Info about the current file in the zipfile, with internal only info
+*/
+local int unz64local_GetCurrentFileInfoInternal OF((unzFile file,
+ unz_file_info64 *pfile_info,
+ unz_file_info64_internal
+ *pfile_info_internal,
+ char *szFileName,
+ uLong fileNameBufferSize,
+ void *extraField,
+ uLong extraFieldBufferSize,
+ char *szComment,
+ uLong commentBufferSize));
+
+local int unz64local_GetCurrentFileInfoInternal (unzFile file,
+ unz_file_info64 *pfile_info,
+ unz_file_info64_internal
+ *pfile_info_internal,
+ char *szFileName,
+ uLong fileNameBufferSize,
+ void *extraField,
+ uLong extraFieldBufferSize,
+ char *szComment,
+ uLong commentBufferSize)
+{
+ unz64_s* s;
+ unz_file_info64 file_info;
+ unz_file_info64_internal file_info_internal;
+ int err=UNZ_OK;
+ uLong uMagic;
+ long lSeek=0;
+ uLong uL;
+
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz64_s*)file;
+ if (ZSEEK64(s->z_filefunc, s->filestream,
+ s->pos_in_central_dir+s->byte_before_the_zipfile,
+ ZLIB_FILEFUNC_SEEK_SET)!=0)
+ err=UNZ_ERRNO;
+
+
+ /* we check the magic */
+ if (err==UNZ_OK)
+ {
+ if (unz64local_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK)
+ err=UNZ_ERRNO;
+ else if (uMagic!=0x02014b50)
+ err=UNZ_BADZIPFILE;
+ }
+
+ if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.version) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.version_needed) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.flag) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.compression_method) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unz64local_getLong(&s->z_filefunc, s->filestream,&file_info.dosDate) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ unz64local_DosDateToTmuDate(file_info.dosDate,&file_info.tmu_date);
+
+ if (unz64local_getLong(&s->z_filefunc, s->filestream,&file_info.crc) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK)
+ err=UNZ_ERRNO;
+ file_info.compressed_size = uL;
+
+ if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK)
+ err=UNZ_ERRNO;
+ file_info.uncompressed_size = uL;
+
+ if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.size_filename) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_extra) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_comment) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.disk_num_start) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.internal_fa) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unz64local_getLong(&s->z_filefunc, s->filestream,&file_info.external_fa) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ // relative offset of local header
+ if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK)
+ err=UNZ_ERRNO;
+ file_info_internal.offset_curfile = uL;
+
+ lSeek+=file_info.size_filename;
+ if ((err==UNZ_OK) && (szFileName!=NULL))
+ {
+ uLong uSizeRead ;
+ if (file_info.size_filename<fileNameBufferSize)
+ {
+ *(szFileName+file_info.size_filename)='\0';
+ uSizeRead = file_info.size_filename;
+ }
+ else
+ uSizeRead = fileNameBufferSize;
+
+ if ((file_info.size_filename>0) && (fileNameBufferSize>0))
+ if (ZREAD64(s->z_filefunc, s->filestream,szFileName,uSizeRead)!=uSizeRead)
+ err=UNZ_ERRNO;
+ lSeek -= uSizeRead;
+ }
+
+ // Read extrafield
+ if ((err==UNZ_OK) && (extraField!=NULL))
+ {
+ ZPOS64_T uSizeRead ;
+ if (file_info.size_file_extra<extraFieldBufferSize)
+ uSizeRead = file_info.size_file_extra;
+ else
+ uSizeRead = extraFieldBufferSize;
+
+ if (lSeek!=0)
+ {
+ if (ZSEEK64(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
+ lSeek=0;
+ else
+ err=UNZ_ERRNO;
+ }
+
+ if ((file_info.size_file_extra>0) && (extraFieldBufferSize>0))
+ if (ZREAD64(s->z_filefunc, s->filestream,extraField,(uLong)uSizeRead)!=uSizeRead)
+ err=UNZ_ERRNO;
+
+ lSeek += file_info.size_file_extra - (uLong)uSizeRead;
+ }
+ else
+ lSeek += file_info.size_file_extra;
+
+
+ if ((err==UNZ_OK) && (file_info.size_file_extra != 0))
+ {
+ uLong acc = 0;
+
+ // since lSeek now points to after the extra field we need to move back
+ lSeek -= file_info.size_file_extra;
+
+ if (lSeek!=0)
+ {
+ if (ZSEEK64(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
+ lSeek=0;
+ else
+ err=UNZ_ERRNO;
+ }
+
+ while(acc < file_info.size_file_extra)
+ {
+ uLong headerId;
+ uLong dataSize;
+
+ if (unz64local_getShort(&s->z_filefunc, s->filestream,&headerId) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unz64local_getShort(&s->z_filefunc, s->filestream,&dataSize) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ /* ZIP64 extra fields */
+ if (headerId == 0x0001)
+ {
+ uLong uL;
+
+ if(file_info.uncompressed_size == MAXU32)
+ {
+ if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info.uncompressed_size) != UNZ_OK)
+ err=UNZ_ERRNO;
+ }
+
+ if(file_info.compressed_size == MAXU32)
+ {
+ if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info.compressed_size) != UNZ_OK)
+ err=UNZ_ERRNO;
+ }
+
+ if(file_info_internal.offset_curfile == MAXU32)
+ {
+ /* Relative Header offset */
+ if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info_internal.offset_curfile) != UNZ_OK)
+ err=UNZ_ERRNO;
+ }
+
+ if(file_info.disk_num_start == MAXU32)
+ {
+ /* Disk Start Number */
+ if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK)
+ err=UNZ_ERRNO;
+ }
+
+ }
+ else
+ {
+ if (ZSEEK64(s->z_filefunc, s->filestream,dataSize,ZLIB_FILEFUNC_SEEK_CUR)!=0)
+ err=UNZ_ERRNO;
+ }
+
+ acc += 2 + 2 + dataSize;
+ }
+ }
+
+ if ((err==UNZ_OK) && (szComment!=NULL))
+ {
+ uLong uSizeRead ;
+ if (file_info.size_file_comment<commentBufferSize)
+ {
+ *(szComment+file_info.size_file_comment)='\0';
+ uSizeRead = file_info.size_file_comment;
+ }
+ else
+ uSizeRead = commentBufferSize;
+
+ if (lSeek!=0)
+ {
+ if (ZSEEK64(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
+ lSeek=0;
+ else
+ err=UNZ_ERRNO;
+ }
+
+ if ((file_info.size_file_comment>0) && (commentBufferSize>0))
+ if (ZREAD64(s->z_filefunc, s->filestream,szComment,uSizeRead)!=uSizeRead)
+ err=UNZ_ERRNO;
+ lSeek+=file_info.size_file_comment - uSizeRead;
+ }
+ else
+ lSeek+=file_info.size_file_comment;
+
+
+ if ((err==UNZ_OK) && (pfile_info!=NULL))
+ *pfile_info=file_info;
+
+ if ((err==UNZ_OK) && (pfile_info_internal!=NULL))
+ *pfile_info_internal=file_info_internal;
+
+ return err;
+}
+
+
+
+/*
+ Write info about the ZipFile in the *pglobal_info structure.
+ No preparation of the structure is needed
+ return UNZ_OK if there is no problem.
+*/
+extern int ZEXPORT unzGetCurrentFileInfo64 (unzFile file,
+ unz_file_info64 * pfile_info,
+ char * szFileName, uLong fileNameBufferSize,
+ void *extraField, uLong extraFieldBufferSize,
+ char* szComment, uLong commentBufferSize)
+{
+ return unz64local_GetCurrentFileInfoInternal(file,pfile_info,NULL,
+ szFileName,fileNameBufferSize,
+ extraField,extraFieldBufferSize,
+ szComment,commentBufferSize);
+}
+
+extern int ZEXPORT unzGetCurrentFileInfo (unzFile file,
+ unz_file_info * pfile_info,
+ char * szFileName, uLong fileNameBufferSize,
+ void *extraField, uLong extraFieldBufferSize,
+ char* szComment, uLong commentBufferSize)
+{
+ int err;
+ unz_file_info64 file_info64;
+ err = unz64local_GetCurrentFileInfoInternal(file,&file_info64,NULL,
+ szFileName,fileNameBufferSize,
+ extraField,extraFieldBufferSize,
+ szComment,commentBufferSize);
+ if ((err==UNZ_OK) && (pfile_info != NULL))
+ {
+ pfile_info->version = file_info64.version;
+ pfile_info->version_needed = file_info64.version_needed;
+ pfile_info->flag = file_info64.flag;
+ pfile_info->compression_method = file_info64.compression_method;
+ pfile_info->dosDate = file_info64.dosDate;
+ pfile_info->crc = file_info64.crc;
+
+ pfile_info->size_filename = file_info64.size_filename;
+ pfile_info->size_file_extra = file_info64.size_file_extra;
+ pfile_info->size_file_comment = file_info64.size_file_comment;
+
+ pfile_info->disk_num_start = file_info64.disk_num_start;
+ pfile_info->internal_fa = file_info64.internal_fa;
+ pfile_info->external_fa = file_info64.external_fa;
+
+ pfile_info->tmu_date = file_info64.tmu_date,
+
+
+ pfile_info->compressed_size = (uLong)file_info64.compressed_size;
+ pfile_info->uncompressed_size = (uLong)file_info64.uncompressed_size;
+
+ }
+ return err;
+}
+/*
+ Set the current file of the zipfile to the first file.
+ return UNZ_OK if there is no problem
+*/
+extern int ZEXPORT unzGoToFirstFile (unzFile file)
+{
+ int err=UNZ_OK;
+ unz64_s* s;
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz64_s*)file;
+ s->pos_in_central_dir=s->offset_central_dir;
+ s->num_file=0;
+ err=unz64local_GetCurrentFileInfoInternal(file,&s->cur_file_info,
+ &s->cur_file_info_internal,
+ NULL,0,NULL,0,NULL,0);
+ s->current_file_ok = (err == UNZ_OK);
+ return err;
+}
+
+/*
+ Set the current file of the zipfile to the next file.
+ return UNZ_OK if there is no problem
+ return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest.
+*/
+extern int ZEXPORT unzGoToNextFile (unzFile file)
+{
+ unz64_s* s;
+ int err;
+
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz64_s*)file;
+ if (!s->current_file_ok)
+ return UNZ_END_OF_LIST_OF_FILE;
+ if (s->gi.number_entry != 0xffff) /* 2^16 files overflow hack */
+ if (s->num_file+1==s->gi.number_entry)
+ return UNZ_END_OF_LIST_OF_FILE;
+
+ s->pos_in_central_dir += SIZECENTRALDIRITEM + s->cur_file_info.size_filename +
+ s->cur_file_info.size_file_extra + s->cur_file_info.size_file_comment ;
+ s->num_file++;
+ err = unz64local_GetCurrentFileInfoInternal(file,&s->cur_file_info,
+ &s->cur_file_info_internal,
+ NULL,0,NULL,0,NULL,0);
+ s->current_file_ok = (err == UNZ_OK);
+ return err;
+}
+
+
+/*
+ Try locate the file szFileName in the zipfile.
+ For the iCaseSensitivity signification, see unzStringFileNameCompare
+
+ return value :
+ UNZ_OK if the file is found. It becomes the current file.
+ UNZ_END_OF_LIST_OF_FILE if the file is not found
+*/
+extern int ZEXPORT unzLocateFile (unzFile file, const char *szFileName, int iCaseSensitivity)
+{
+ unz64_s* s;
+ int err;
+
+ /* We remember the 'current' position in the file so that we can jump
+ * back there if we fail.
+ */
+ unz_file_info64 cur_file_infoSaved;
+ unz_file_info64_internal cur_file_info_internalSaved;
+ ZPOS64_T num_fileSaved;
+ ZPOS64_T pos_in_central_dirSaved;
+
+
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+
+ if (strlen(szFileName)>=UNZ_MAXFILENAMEINZIP)
+ return UNZ_PARAMERROR;
+
+ s=(unz64_s*)file;
+ if (!s->current_file_ok)
+ return UNZ_END_OF_LIST_OF_FILE;
+
+ /* Save the current state */
+ num_fileSaved = s->num_file;
+ pos_in_central_dirSaved = s->pos_in_central_dir;
+ cur_file_infoSaved = s->cur_file_info;
+ cur_file_info_internalSaved = s->cur_file_info_internal;
+
+ err = unzGoToFirstFile(file);
+
+ while (err == UNZ_OK)
+ {
+ char szCurrentFileName[UNZ_MAXFILENAMEINZIP+1];
+ err = unzGetCurrentFileInfo64(file,NULL,
+ szCurrentFileName,sizeof(szCurrentFileName)-1,
+ NULL,0,NULL,0);
+ if (err == UNZ_OK)
+ {
+ if (unzStringFileNameCompare(szCurrentFileName,
+ szFileName,iCaseSensitivity)==0)
+ return UNZ_OK;
+ err = unzGoToNextFile(file);
+ }
+ }
+
+ /* We failed, so restore the state of the 'current file' to where we
+ * were.
+ */
+ s->num_file = num_fileSaved ;
+ s->pos_in_central_dir = pos_in_central_dirSaved ;
+ s->cur_file_info = cur_file_infoSaved;
+ s->cur_file_info_internal = cur_file_info_internalSaved;
+ return err;
+}
+
+
+/*
+///////////////////////////////////////////
+// Contributed by Ryan Haksi (mailto://cryogen@infoserve.net)
+// I need random access
+//
+// Further optimization could be realized by adding an ability
+// to cache the directory in memory. The goal being a single
+// comprehensive file read to put the file I need in a memory.
+*/
+
+/*
+typedef struct unz_file_pos_s
+{
+ ZPOS64_T pos_in_zip_directory; // offset in file
+ ZPOS64_T num_of_file; // # of file
+} unz_file_pos;
+*/
+
+extern int ZEXPORT unzGetFilePos64(unzFile file, unz64_file_pos* file_pos)
+{
+ unz64_s* s;
+
+ if (file==NULL || file_pos==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz64_s*)file;
+ if (!s->current_file_ok)
+ return UNZ_END_OF_LIST_OF_FILE;
+
+ file_pos->pos_in_zip_directory = s->pos_in_central_dir;
+ file_pos->num_of_file = s->num_file;
+
+ return UNZ_OK;
+}
+
+extern int ZEXPORT unzGetFilePos(
+ unzFile file,
+ unz_file_pos* file_pos)
+{
+ unz64_file_pos file_pos64;
+ int err = unzGetFilePos64(file,&file_pos64);
+ if (err==UNZ_OK)
+ {
+ file_pos->pos_in_zip_directory = (uLong)file_pos64.pos_in_zip_directory;
+ file_pos->num_of_file = (uLong)file_pos64.num_of_file;
+ }
+ return err;
+}
+
+extern int ZEXPORT unzGoToFilePos64(unzFile file, const unz64_file_pos* file_pos)
+{
+ unz64_s* s;
+ int err;
+
+ if (file==NULL || file_pos==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz64_s*)file;
+
+ /* jump to the right spot */
+ s->pos_in_central_dir = file_pos->pos_in_zip_directory;
+ s->num_file = file_pos->num_of_file;
+
+ /* set the current file */
+ err = unz64local_GetCurrentFileInfoInternal(file,&s->cur_file_info,
+ &s->cur_file_info_internal,
+ NULL,0,NULL,0,NULL,0);
+ /* return results */
+ s->current_file_ok = (err == UNZ_OK);
+ return err;
+}
+
+extern int ZEXPORT unzGoToFilePos(
+ unzFile file,
+ unz_file_pos* file_pos)
+{
+ unz64_file_pos file_pos64;
+ if (file_pos == NULL)
+ return UNZ_PARAMERROR;
+
+ file_pos64.pos_in_zip_directory = file_pos->pos_in_zip_directory;
+ file_pos64.num_of_file = file_pos->num_of_file;
+ return unzGoToFilePos64(file,&file_pos64);
+}
+
+/*
+// Unzip Helper Functions - should be here?
+///////////////////////////////////////////
+*/
+
+/*
+ Read the local header of the current zipfile
+ Check the coherency of the local header and info in the end of central
+ directory about this file
+ store in *piSizeVar the size of extra info in local header
+ (filename and size of extra field data)
+*/
+local int unz64local_CheckCurrentFileCoherencyHeader (unz64_s* s, uInt* piSizeVar,
+ ZPOS64_T * poffset_local_extrafield,
+ uInt * psize_local_extrafield)
+{
+ uLong uMagic,uData,uFlags;
+ uLong size_filename;
+ uLong size_extra_field;
+ int err=UNZ_OK;
+
+ *piSizeVar = 0;
+ *poffset_local_extrafield = 0;
+ *psize_local_extrafield = 0;
+
+ if (ZSEEK64(s->z_filefunc, s->filestream,s->cur_file_info_internal.offset_curfile +
+ s->byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET)!=0)
+ return UNZ_ERRNO;
+
+
+ if (err==UNZ_OK)
+ {
+ if (unz64local_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK)
+ err=UNZ_ERRNO;
+ else if (uMagic!=0x04034b50)
+ err=UNZ_BADZIPFILE;
+ }
+
+ if (unz64local_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK)
+ err=UNZ_ERRNO;
+/*
+ else if ((err==UNZ_OK) && (uData!=s->cur_file_info.wVersion))
+ err=UNZ_BADZIPFILE;
+*/
+ if (unz64local_getShort(&s->z_filefunc, s->filestream,&uFlags) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unz64local_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK)
+ err=UNZ_ERRNO;
+ else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compression_method))
+ err=UNZ_BADZIPFILE;
+
+ if ((err==UNZ_OK) && (s->cur_file_info.compression_method!=0) &&
+/* #ifdef HAVE_BZIP2 */
+ (s->cur_file_info.compression_method!=Z_BZIP2ED) &&
+/* #endif */
+ (s->cur_file_info.compression_method!=Z_DEFLATED))
+ err=UNZ_BADZIPFILE;
+
+ if (unz64local_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* date/time */
+ err=UNZ_ERRNO;
+
+ if (unz64local_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* crc */
+ err=UNZ_ERRNO;
+ else if ((err==UNZ_OK) && (uData!=s->cur_file_info.crc) && ((uFlags & 8)==0))
+ err=UNZ_BADZIPFILE;
+
+ if (unz64local_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size compr */
+ err=UNZ_ERRNO;
+ else if (uData != 0xFFFFFFFF && (err==UNZ_OK) && (uData!=s->cur_file_info.compressed_size) && ((uFlags & 8)==0))
+ err=UNZ_BADZIPFILE;
+
+ if (unz64local_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size uncompr */
+ err=UNZ_ERRNO;
+ else if (uData != 0xFFFFFFFF && (err==UNZ_OK) && (uData!=s->cur_file_info.uncompressed_size) && ((uFlags & 8)==0))
+ err=UNZ_BADZIPFILE;
+
+ if (unz64local_getShort(&s->z_filefunc, s->filestream,&size_filename) != UNZ_OK)
+ err=UNZ_ERRNO;
+ else if ((err==UNZ_OK) && (size_filename!=s->cur_file_info.size_filename))
+ err=UNZ_BADZIPFILE;
+
+ *piSizeVar += (uInt)size_filename;
+
+ if (unz64local_getShort(&s->z_filefunc, s->filestream,&size_extra_field) != UNZ_OK)
+ err=UNZ_ERRNO;
+ *poffset_local_extrafield= s->cur_file_info_internal.offset_curfile +
+ SIZEZIPLOCALHEADER + size_filename;
+ *psize_local_extrafield = (uInt)size_extra_field;
+
+ *piSizeVar += (uInt)size_extra_field;
+
+ return err;
+}
+
+/*
+ Open for reading data the current file in the zipfile.
+ If there is no error and the file is opened, the return value is UNZ_OK.
+*/
+extern int ZEXPORT unzOpenCurrentFile3 (unzFile file, int* method,
+ int* level, int raw, const char* password)
+{
+ int err=UNZ_OK;
+ uInt iSizeVar;
+ unz64_s* s;
+ file_in_zip64_read_info_s* pfile_in_zip_read_info;
+ ZPOS64_T offset_local_extrafield; /* offset of the local extra field */
+ uInt size_local_extrafield; /* size of the local extra field */
+# ifndef NOUNCRYPT
+ char source[12];
+# else
+ if (password != NULL)
+ return UNZ_PARAMERROR;
+# endif
+
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz64_s*)file;
+ if (!s->current_file_ok)
+ return UNZ_PARAMERROR;
+
+ if (s->pfile_in_zip_read != NULL)
+ unzCloseCurrentFile(file);
+
+ if (unz64local_CheckCurrentFileCoherencyHeader(s,&iSizeVar, &offset_local_extrafield,&size_local_extrafield)!=UNZ_OK)
+ return UNZ_BADZIPFILE;
+
+ pfile_in_zip_read_info = (file_in_zip64_read_info_s*)ALLOC(sizeof(file_in_zip64_read_info_s));
+ if (pfile_in_zip_read_info==NULL)
+ return UNZ_INTERNALERROR;
+
+ pfile_in_zip_read_info->read_buffer=(char*)ALLOC(UNZ_BUFSIZE);
+ pfile_in_zip_read_info->offset_local_extrafield = offset_local_extrafield;
+ pfile_in_zip_read_info->size_local_extrafield = size_local_extrafield;
+ pfile_in_zip_read_info->pos_local_extrafield=0;
+ pfile_in_zip_read_info->raw=raw;
+
+ if (pfile_in_zip_read_info->read_buffer==NULL)
+ {
+ TRYFREE(pfile_in_zip_read_info);
+ return UNZ_INTERNALERROR;
+ }
+
+ pfile_in_zip_read_info->stream_initialised=0;
+
+ if (method!=NULL)
+ *method = (int)s->cur_file_info.compression_method;
+
+ if (level!=NULL)
+ {
+ *level = 6;
+ switch (s->cur_file_info.flag & 0x06)
+ {
+ case 6 : *level = 1; break;
+ case 4 : *level = 2; break;
+ case 2 : *level = 9; break;
+ }
+ }
+
+ if ((s->cur_file_info.compression_method!=0) &&
+/* #ifdef HAVE_BZIP2 */
+ (s->cur_file_info.compression_method!=Z_BZIP2ED) &&
+/* #endif */
+ (s->cur_file_info.compression_method!=Z_DEFLATED))
+
+ err=UNZ_BADZIPFILE;
+
+ pfile_in_zip_read_info->crc32_wait=s->cur_file_info.crc;
+ pfile_in_zip_read_info->crc32=0;
+ pfile_in_zip_read_info->total_out_64=0;
+ pfile_in_zip_read_info->compression_method = s->cur_file_info.compression_method;
+ pfile_in_zip_read_info->filestream=s->filestream;
+ pfile_in_zip_read_info->z_filefunc=s->z_filefunc;
+ pfile_in_zip_read_info->byte_before_the_zipfile=s->byte_before_the_zipfile;
+
+ pfile_in_zip_read_info->stream.total_out = 0;
+
+ if ((s->cur_file_info.compression_method==Z_BZIP2ED) && (!raw))
+ {
+#ifdef HAVE_BZIP2
+ pfile_in_zip_read_info->bstream.bzalloc = (void *(*) (void *, int, int))0;
+ pfile_in_zip_read_info->bstream.bzfree = (free_func)0;
+ pfile_in_zip_read_info->bstream.opaque = (voidpf)0;
+ pfile_in_zip_read_info->bstream.state = (voidpf)0;
+
+ pfile_in_zip_read_info->stream.zalloc = (alloc_func)0;
+ pfile_in_zip_read_info->stream.zfree = (free_func)0;
+ pfile_in_zip_read_info->stream.opaque = (voidpf)0;
+ pfile_in_zip_read_info->stream.next_in = (voidpf)0;
+ pfile_in_zip_read_info->stream.avail_in = 0;
+
+ err=BZ2_bzDecompressInit(&pfile_in_zip_read_info->bstream, 0, 0);
+ if (err == Z_OK)
+ pfile_in_zip_read_info->stream_initialised=Z_BZIP2ED;
+ else
+ {
+ TRYFREE(pfile_in_zip_read_info);
+ return err;
+ }
+#else
+ pfile_in_zip_read_info->raw=1;
+#endif
+ }
+ else if ((s->cur_file_info.compression_method==Z_DEFLATED) && (!raw))
+ {
+ pfile_in_zip_read_info->stream.zalloc = (alloc_func)0;
+ pfile_in_zip_read_info->stream.zfree = (free_func)0;
+ pfile_in_zip_read_info->stream.opaque = (voidpf)0;
+ pfile_in_zip_read_info->stream.next_in = 0;
+ pfile_in_zip_read_info->stream.avail_in = 0;
+
+ err=inflateInit2(&pfile_in_zip_read_info->stream, -MAX_WBITS);
+ if (err == Z_OK)
+ pfile_in_zip_read_info->stream_initialised=Z_DEFLATED;
+ else
+ {
+ TRYFREE(pfile_in_zip_read_info);
+ return err;
+ }
+ /* windowBits is passed < 0 to tell that there is no zlib header.
+ * Note that in this case inflate *requires* an extra "dummy" byte
+ * after the compressed stream in order to complete decompression and
+ * return Z_STREAM_END.
+ * In unzip, i don't wait absolutely Z_STREAM_END because I known the
+ * size of both compressed and uncompressed data
+ */
+ }
+ pfile_in_zip_read_info->rest_read_compressed =
+ s->cur_file_info.compressed_size ;
+ pfile_in_zip_read_info->rest_read_uncompressed =
+ s->cur_file_info.uncompressed_size ;
+
+
+ pfile_in_zip_read_info->pos_in_zipfile =
+ s->cur_file_info_internal.offset_curfile + SIZEZIPLOCALHEADER +
+ iSizeVar;
+
+ pfile_in_zip_read_info->stream.avail_in = (uInt)0;
+
+ s->pfile_in_zip_read = pfile_in_zip_read_info;
+ s->encrypted = 0;
+
+# ifndef NOUNCRYPT
+ if (password != NULL)
+ {
+ int i;
+ s->pcrc_32_tab = get_crc_table();
+ init_keys(password,s->keys,s->pcrc_32_tab);
+ if (ZSEEK64(s->z_filefunc, s->filestream,
+ s->pfile_in_zip_read->pos_in_zipfile +
+ s->pfile_in_zip_read->byte_before_the_zipfile,
+ SEEK_SET)!=0)
+ return UNZ_INTERNALERROR;
+ if(ZREAD64(s->z_filefunc, s->filestream,source, 12)<12)
+ return UNZ_INTERNALERROR;
+
+ for (i = 0; i<12; i++)
+ zdecode(s->keys,s->pcrc_32_tab,source[i]);
+
+ s->pfile_in_zip_read->pos_in_zipfile+=12;
+ s->encrypted=1;
+ }
+# endif
+
+
+ return UNZ_OK;
+}
+
+extern int ZEXPORT unzOpenCurrentFile (unzFile file)
+{
+ return unzOpenCurrentFile3(file, NULL, NULL, 0, NULL);
+}
+
+extern int ZEXPORT unzOpenCurrentFilePassword (unzFile file, const char* password)
+{
+ return unzOpenCurrentFile3(file, NULL, NULL, 0, password);
+}
+
+extern int ZEXPORT unzOpenCurrentFile2 (unzFile file, int* method, int* level, int raw)
+{
+ return unzOpenCurrentFile3(file, method, level, raw, NULL);
+}
+
+/** Addition for GDAL : START */
+
+extern ZPOS64_T ZEXPORT unzGetCurrentFileZStreamPos64( unzFile file)
+{
+ unz64_s* s;
+ file_in_zip64_read_info_s* pfile_in_zip_read_info;
+ s=(unz64_s*)file;
+ if (file==NULL)
+ return 0; //UNZ_PARAMERROR;
+ pfile_in_zip_read_info=s->pfile_in_zip_read;
+ if (pfile_in_zip_read_info==NULL)
+ return 0; //UNZ_PARAMERROR;
+ return pfile_in_zip_read_info->pos_in_zipfile +
+ pfile_in_zip_read_info->byte_before_the_zipfile;
+}
+
+/** Addition for GDAL : END */
+
+/*
+ Read bytes from the current file.
+ buf contain buffer where data must be copied
+ len the size of buf.
+
+ return the number of byte copied if somes bytes are copied
+ return 0 if the end of file was reached
+ return <0 with error code if there is an error
+ (UNZ_ERRNO for IO error, or zLib error for uncompress error)
+*/
+extern int ZEXPORT unzReadCurrentFile (unzFile file, voidp buf, unsigned len)
+{
+ int err=UNZ_OK;
+ uInt iRead = 0;
+ unz64_s* s;
+ file_in_zip64_read_info_s* pfile_in_zip_read_info;
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz64_s*)file;
+ pfile_in_zip_read_info=s->pfile_in_zip_read;
+
+ if (pfile_in_zip_read_info==NULL)
+ return UNZ_PARAMERROR;
+
+
+ if (pfile_in_zip_read_info->read_buffer == NULL)
+ return UNZ_END_OF_LIST_OF_FILE;
+ if (len==0)
+ return 0;
+
+ pfile_in_zip_read_info->stream.next_out = (Bytef*)buf;
+
+ pfile_in_zip_read_info->stream.avail_out = (uInt)len;
+
+ if ((len>pfile_in_zip_read_info->rest_read_uncompressed) &&
+ (!(pfile_in_zip_read_info->raw)))
+ pfile_in_zip_read_info->stream.avail_out =
+ (uInt)pfile_in_zip_read_info->rest_read_uncompressed;
+
+ if ((len>pfile_in_zip_read_info->rest_read_compressed+
+ pfile_in_zip_read_info->stream.avail_in) &&
+ (pfile_in_zip_read_info->raw))
+ pfile_in_zip_read_info->stream.avail_out =
+ (uInt)pfile_in_zip_read_info->rest_read_compressed+
+ pfile_in_zip_read_info->stream.avail_in;
+
+ while (pfile_in_zip_read_info->stream.avail_out>0)
+ {
+ if ((pfile_in_zip_read_info->stream.avail_in==0) &&
+ (pfile_in_zip_read_info->rest_read_compressed>0))
+ {
+ uInt uReadThis = UNZ_BUFSIZE;
+ if (pfile_in_zip_read_info->rest_read_compressed<uReadThis)
+ uReadThis = (uInt)pfile_in_zip_read_info->rest_read_compressed;
+ if (uReadThis == 0)
+ return UNZ_EOF;
+ if (ZSEEK64(pfile_in_zip_read_info->z_filefunc,
+ pfile_in_zip_read_info->filestream,
+ pfile_in_zip_read_info->pos_in_zipfile +
+ pfile_in_zip_read_info->byte_before_the_zipfile,
+ ZLIB_FILEFUNC_SEEK_SET)!=0)
+ return UNZ_ERRNO;
+ if (ZREAD64(pfile_in_zip_read_info->z_filefunc,
+ pfile_in_zip_read_info->filestream,
+ pfile_in_zip_read_info->read_buffer,
+ uReadThis)!=uReadThis)
+ return UNZ_ERRNO;
+
+
+# ifndef NOUNCRYPT
+ if(s->encrypted)
+ {
+ uInt i;
+ for(i=0;i<uReadThis;i++)
+ pfile_in_zip_read_info->read_buffer[i] =
+ zdecode(s->keys,s->pcrc_32_tab,
+ pfile_in_zip_read_info->read_buffer[i]);
+ }
+# endif
+
+
+ pfile_in_zip_read_info->pos_in_zipfile += uReadThis;
+
+ pfile_in_zip_read_info->rest_read_compressed-=uReadThis;
+
+ pfile_in_zip_read_info->stream.next_in =
+ (Bytef*)pfile_in_zip_read_info->read_buffer;
+ pfile_in_zip_read_info->stream.avail_in = (uInt)uReadThis;
+ }
+
+ if ((pfile_in_zip_read_info->compression_method==0) || (pfile_in_zip_read_info->raw))
+ {
+ uInt uDoCopy,i ;
+
+ if ((pfile_in_zip_read_info->stream.avail_in == 0) &&
+ (pfile_in_zip_read_info->rest_read_compressed == 0))
+ return (iRead==0) ? UNZ_EOF : iRead;
+
+ if (pfile_in_zip_read_info->stream.avail_out <
+ pfile_in_zip_read_info->stream.avail_in)
+ uDoCopy = pfile_in_zip_read_info->stream.avail_out ;
+ else
+ uDoCopy = pfile_in_zip_read_info->stream.avail_in ;
+
+ for (i=0;i<uDoCopy;i++)
+ *(pfile_in_zip_read_info->stream.next_out+i) =
+ *(pfile_in_zip_read_info->stream.next_in+i);
+
+ pfile_in_zip_read_info->total_out_64 = pfile_in_zip_read_info->total_out_64 + uDoCopy;
+
+ pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32,
+ pfile_in_zip_read_info->stream.next_out,
+ uDoCopy);
+ pfile_in_zip_read_info->rest_read_uncompressed-=uDoCopy;
+ pfile_in_zip_read_info->stream.avail_in -= uDoCopy;
+ pfile_in_zip_read_info->stream.avail_out -= uDoCopy;
+ pfile_in_zip_read_info->stream.next_out += uDoCopy;
+ pfile_in_zip_read_info->stream.next_in += uDoCopy;
+ pfile_in_zip_read_info->stream.total_out += uDoCopy;
+ iRead += uDoCopy;
+ }
+ else if (pfile_in_zip_read_info->compression_method==Z_BZIP2ED)
+ {
+#ifdef HAVE_BZIP2
+ uLong uTotalOutBefore,uTotalOutAfter;
+ const Bytef *bufBefore;
+ uLong uOutThis;
+
+ pfile_in_zip_read_info->bstream.next_in = (char*)pfile_in_zip_read_info->stream.next_in;
+ pfile_in_zip_read_info->bstream.avail_in = pfile_in_zip_read_info->stream.avail_in;
+ pfile_in_zip_read_info->bstream.total_in_lo32 = pfile_in_zip_read_info->stream.total_in;
+ pfile_in_zip_read_info->bstream.total_in_hi32 = 0;
+ pfile_in_zip_read_info->bstream.next_out = (char*)pfile_in_zip_read_info->stream.next_out;
+ pfile_in_zip_read_info->bstream.avail_out = pfile_in_zip_read_info->stream.avail_out;
+ pfile_in_zip_read_info->bstream.total_out_lo32 = pfile_in_zip_read_info->stream.total_out;
+ pfile_in_zip_read_info->bstream.total_out_hi32 = 0;
+
+ uTotalOutBefore = pfile_in_zip_read_info->bstream.total_out_lo32;
+ bufBefore = (const Bytef *)pfile_in_zip_read_info->bstream.next_out;
+
+ err=BZ2_bzDecompress(&pfile_in_zip_read_info->bstream);
+
+ uTotalOutAfter = pfile_in_zip_read_info->bstream.total_out_lo32;
+ uOutThis = uTotalOutAfter-uTotalOutBefore;
+
+ pfile_in_zip_read_info->total_out_64 = pfile_in_zip_read_info->total_out_64 + uOutThis;
+
+ pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32,bufBefore, (uInt)(uOutThis));
+ pfile_in_zip_read_info->rest_read_uncompressed -= uOutThis;
+ iRead += (uInt)(uTotalOutAfter - uTotalOutBefore);
+
+ pfile_in_zip_read_info->stream.next_in = (Bytef*)pfile_in_zip_read_info->bstream.next_in;
+ pfile_in_zip_read_info->stream.avail_in = pfile_in_zip_read_info->bstream.avail_in;
+ pfile_in_zip_read_info->stream.total_in = pfile_in_zip_read_info->bstream.total_in_lo32;
+ pfile_in_zip_read_info->stream.next_out = (Bytef*)pfile_in_zip_read_info->bstream.next_out;
+ pfile_in_zip_read_info->stream.avail_out = pfile_in_zip_read_info->bstream.avail_out;
+ pfile_in_zip_read_info->stream.total_out = pfile_in_zip_read_info->bstream.total_out_lo32;
+
+ if (err==BZ_STREAM_END)
+ return (iRead==0) ? UNZ_EOF : iRead;
+ if (err!=BZ_OK)
+ break;
+#endif
+ } // end Z_BZIP2ED
+ else
+ {
+ ZPOS64_T uTotalOutBefore,uTotalOutAfter;
+ const Bytef *bufBefore;
+ ZPOS64_T uOutThis;
+ int flush=Z_SYNC_FLUSH;
+
+ uTotalOutBefore = pfile_in_zip_read_info->stream.total_out;
+ bufBefore = pfile_in_zip_read_info->stream.next_out;
+
+ /*
+ if ((pfile_in_zip_read_info->rest_read_uncompressed ==
+ pfile_in_zip_read_info->stream.avail_out) &&
+ (pfile_in_zip_read_info->rest_read_compressed == 0))
+ flush = Z_FINISH;
+ */
+ err=inflate(&pfile_in_zip_read_info->stream,flush);
+
+ if ((err>=0) && (pfile_in_zip_read_info->stream.msg!=NULL))
+ err = Z_DATA_ERROR;
+
+ uTotalOutAfter = pfile_in_zip_read_info->stream.total_out;
+ uOutThis = uTotalOutAfter-uTotalOutBefore;
+
+ pfile_in_zip_read_info->total_out_64 = pfile_in_zip_read_info->total_out_64 + uOutThis;
+
+ pfile_in_zip_read_info->crc32 =
+ crc32(pfile_in_zip_read_info->crc32,bufBefore,
+ (uInt)(uOutThis));
+
+ pfile_in_zip_read_info->rest_read_uncompressed -=
+ uOutThis;
+
+ iRead += (uInt)(uTotalOutAfter - uTotalOutBefore);
+
+ if (err==Z_STREAM_END)
+ return (iRead==0) ? UNZ_EOF : iRead;
+ if (err!=Z_OK)
+ break;
+ }
+ }
+
+ if (err==Z_OK)
+ return iRead;
+ return err;
+}
+
+
+/*
+ Give the current position in uncompressed data
+*/
+extern z_off_t ZEXPORT unztell (unzFile file)
+{
+ unz64_s* s;
+ file_in_zip64_read_info_s* pfile_in_zip_read_info;
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz64_s*)file;
+ pfile_in_zip_read_info=s->pfile_in_zip_read;
+
+ if (pfile_in_zip_read_info==NULL)
+ return UNZ_PARAMERROR;
+
+ return (z_off_t)pfile_in_zip_read_info->stream.total_out;
+}
+
+extern ZPOS64_T ZEXPORT unztell64 (unzFile file)
+{
+
+ unz64_s* s;
+ file_in_zip64_read_info_s* pfile_in_zip_read_info;
+ if (file==NULL)
+ return (ZPOS64_T)-1;
+ s=(unz64_s*)file;
+ pfile_in_zip_read_info=s->pfile_in_zip_read;
+
+ if (pfile_in_zip_read_info==NULL)
+ return (ZPOS64_T)-1;
+
+ return pfile_in_zip_read_info->total_out_64;
+}
+
+
+/*
+ return 1 if the end of file was reached, 0 elsewhere
+*/
+extern int ZEXPORT unzeof (unzFile file)
+{
+ unz64_s* s;
+ file_in_zip64_read_info_s* pfile_in_zip_read_info;
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz64_s*)file;
+ pfile_in_zip_read_info=s->pfile_in_zip_read;
+
+ if (pfile_in_zip_read_info==NULL)
+ return UNZ_PARAMERROR;
+
+ if (pfile_in_zip_read_info->rest_read_uncompressed == 0)
+ return 1;
+ else
+ return 0;
+}
+
+
+
+/*
+Read extra field from the current file (opened by unzOpenCurrentFile)
+This is the local-header version of the extra field (sometimes, there is
+more info in the local-header version than in the central-header)
+
+ if buf==NULL, it return the size of the local extra field that can be read
+
+ if buf!=NULL, len is the size of the buffer, the extra header is copied in
+ buf.
+ the return value is the number of bytes copied in buf, or (if <0)
+ the error code
+*/
+extern int ZEXPORT unzGetLocalExtrafield (unzFile file, voidp buf, unsigned len)
+{
+ unz64_s* s;
+ file_in_zip64_read_info_s* pfile_in_zip_read_info;
+ uInt read_now;
+ ZPOS64_T size_to_read;
+
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz64_s*)file;
+ pfile_in_zip_read_info=s->pfile_in_zip_read;
+
+ if (pfile_in_zip_read_info==NULL)
+ return UNZ_PARAMERROR;
+
+ size_to_read = (pfile_in_zip_read_info->size_local_extrafield -
+ pfile_in_zip_read_info->pos_local_extrafield);
+
+ if (buf==NULL)
+ return (int)size_to_read;
+
+ if (len>size_to_read)
+ read_now = (uInt)size_to_read;
+ else
+ read_now = (uInt)len ;
+
+ if (read_now==0)
+ return 0;
+
+ if (ZSEEK64(pfile_in_zip_read_info->z_filefunc,
+ pfile_in_zip_read_info->filestream,
+ pfile_in_zip_read_info->offset_local_extrafield +
+ pfile_in_zip_read_info->pos_local_extrafield,
+ ZLIB_FILEFUNC_SEEK_SET)!=0)
+ return UNZ_ERRNO;
+
+ if (ZREAD64(pfile_in_zip_read_info->z_filefunc,
+ pfile_in_zip_read_info->filestream,
+ buf,read_now)!=read_now)
+ return UNZ_ERRNO;
+
+ return (int)read_now;
+}
+
+/*
+ Close the file in zip opened with unzOpenCurrentFile
+ Return UNZ_CRCERROR if all the file was read but the CRC is not good
+*/
+extern int ZEXPORT unzCloseCurrentFile (unzFile file)
+{
+ int err=UNZ_OK;
+
+ unz64_s* s;
+ file_in_zip64_read_info_s* pfile_in_zip_read_info;
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz64_s*)file;
+ pfile_in_zip_read_info=s->pfile_in_zip_read;
+
+ if (pfile_in_zip_read_info==NULL)
+ return UNZ_PARAMERROR;
+
+
+ if ((pfile_in_zip_read_info->rest_read_uncompressed == 0) &&
+ (!pfile_in_zip_read_info->raw))
+ {
+ if (pfile_in_zip_read_info->crc32 != pfile_in_zip_read_info->crc32_wait)
+ err=UNZ_CRCERROR;
+ }
+
+
+ TRYFREE(pfile_in_zip_read_info->read_buffer);
+ pfile_in_zip_read_info->read_buffer = NULL;
+ if (pfile_in_zip_read_info->stream_initialised == Z_DEFLATED)
+ inflateEnd(&pfile_in_zip_read_info->stream);
+#ifdef HAVE_BZIP2
+ else if (pfile_in_zip_read_info->stream_initialised == Z_BZIP2ED)
+ BZ2_bzDecompressEnd(&pfile_in_zip_read_info->bstream);
+#endif
+
+
+ pfile_in_zip_read_info->stream_initialised = 0;
+ TRYFREE(pfile_in_zip_read_info);
+
+ s->pfile_in_zip_read=NULL;
+
+ return err;
+}
+
+
+/*
+ Get the global comment string of the ZipFile, in the szComment buffer.
+ uSizeBuf is the size of the szComment buffer.
+ return the number of byte copied or an error code <0
+*/
+extern int ZEXPORT unzGetGlobalComment (unzFile file, char * szComment, uLong uSizeBuf)
+{
+ unz64_s* s;
+ uLong uReadThis ;
+ if (file==NULL)
+ return (int)UNZ_PARAMERROR;
+ s=(unz64_s*)file;
+
+ uReadThis = uSizeBuf;
+ if (uReadThis>s->gi.size_comment)
+ uReadThis = s->gi.size_comment;
+
+ if (ZSEEK64(s->z_filefunc,s->filestream,s->central_pos+22,ZLIB_FILEFUNC_SEEK_SET)!=0)
+ return UNZ_ERRNO;
+
+ if (uReadThis>0)
+ {
+ *szComment='\0';
+ if (ZREAD64(s->z_filefunc,s->filestream,szComment,uReadThis)!=uReadThis)
+ return UNZ_ERRNO;
+ }
+
+ if ((szComment != NULL) && (uSizeBuf > s->gi.size_comment))
+ *(szComment+s->gi.size_comment)='\0';
+ return (int)uReadThis;
+}
+
+/* Additions by RX '2004 */
+extern ZPOS64_T ZEXPORT unzGetOffset64(unzFile file)
+{
+ unz64_s* s;
+
+ if (file==NULL)
+ return 0; //UNZ_PARAMERROR;
+ s=(unz64_s*)file;
+ if (!s->current_file_ok)
+ return 0;
+ if (s->gi.number_entry != 0 && s->gi.number_entry != 0xffff)
+ if (s->num_file==s->gi.number_entry)
+ return 0;
+ return s->pos_in_central_dir;
+}
+
+extern uLong ZEXPORT unzGetOffset (unzFile file)
+{
+ ZPOS64_T offset64;
+
+ if (file==NULL)
+ return 0; //UNZ_PARAMERROR;
+ offset64 = unzGetOffset64(file);
+ return (uLong)offset64;
+}
+
+extern int ZEXPORT unzSetOffset64(unzFile file, ZPOS64_T pos)
+{
+ unz64_s* s;
+ int err;
+
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz64_s*)file;
+
+ s->pos_in_central_dir = pos;
+ s->num_file = s->gi.number_entry; /* hack */
+ err = unz64local_GetCurrentFileInfoInternal(file,&s->cur_file_info,
+ &s->cur_file_info_internal,
+ NULL,0,NULL,0,NULL,0);
+ s->current_file_ok = (err == UNZ_OK);
+ return err;
+}
+
+extern int ZEXPORT unzSetOffset (unzFile file, uLong pos)
+{
+ return unzSetOffset64(file,pos);
+}
diff --git a/contrib/zlib/contrib/minizip/unzip.h b/contrib/zlib/contrib/minizip/unzip.h
new file mode 100644
index 000000000..2104e3915
--- /dev/null
+++ b/contrib/zlib/contrib/minizip/unzip.h
@@ -0,0 +1,437 @@
+/* unzip.h -- IO for uncompress .zip files using zlib
+ Version 1.1, February 14h, 2010
+ part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
+
+ Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
+
+ Modifications of Unzip for Zip64
+ Copyright (C) 2007-2008 Even Rouault
+
+ Modifications for Zip64 support on both zip and unzip
+ Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
+
+ For more info read MiniZip_info.txt
+
+ ---------------------------------------------------------------------------------
+
+ Condition of use and distribution are the same than zlib :
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+ ---------------------------------------------------------------------------------
+
+ Changes
+
+ See header of unzip64.c
+
+*/
+
+#ifndef _unz64_H
+#define _unz64_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _ZLIB_H
+#include "zlib.h"
+#endif
+
+#ifndef _ZLIBIOAPI_H
+#include "ioapi.h"
+#endif
+
+#ifdef HAVE_BZIP2
+#include "bzlib.h"
+#endif
+
+#define Z_BZIP2ED 12
+
+#if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP)
+/* like the STRICT of WIN32, we define a pointer that cannot be converted
+ from (void*) without cast */
+typedef struct TagunzFile__ { int unused; } unzFile__;
+typedef unzFile__ *unzFile;
+#else
+typedef voidp unzFile;
+#endif
+
+
+#define UNZ_OK (0)
+#define UNZ_END_OF_LIST_OF_FILE (-100)
+#define UNZ_ERRNO (Z_ERRNO)
+#define UNZ_EOF (0)
+#define UNZ_PARAMERROR (-102)
+#define UNZ_BADZIPFILE (-103)
+#define UNZ_INTERNALERROR (-104)
+#define UNZ_CRCERROR (-105)
+
+/* tm_unz contain date/time info */
+typedef struct tm_unz_s
+{
+ uInt tm_sec; /* seconds after the minute - [0,59] */
+ uInt tm_min; /* minutes after the hour - [0,59] */
+ uInt tm_hour; /* hours since midnight - [0,23] */
+ uInt tm_mday; /* day of the month - [1,31] */
+ uInt tm_mon; /* months since January - [0,11] */
+ uInt tm_year; /* years - [1980..2044] */
+} tm_unz;
+
+/* unz_global_info structure contain global data about the ZIPfile
+ These data comes from the end of central dir */
+typedef struct unz_global_info64_s
+{
+ ZPOS64_T number_entry; /* total number of entries in
+ the central dir on this disk */
+ uLong size_comment; /* size of the global comment of the zipfile */
+} unz_global_info64;
+
+typedef struct unz_global_info_s
+{
+ uLong number_entry; /* total number of entries in
+ the central dir on this disk */
+ uLong size_comment; /* size of the global comment of the zipfile */
+} unz_global_info;
+
+/* unz_file_info contain information about a file in the zipfile */
+typedef struct unz_file_info64_s
+{
+ uLong version; /* version made by 2 bytes */
+ uLong version_needed; /* version needed to extract 2 bytes */
+ uLong flag; /* general purpose bit flag 2 bytes */
+ uLong compression_method; /* compression method 2 bytes */
+ uLong dosDate; /* last mod file date in Dos fmt 4 bytes */
+ uLong crc; /* crc-32 4 bytes */
+ ZPOS64_T compressed_size; /* compressed size 8 bytes */
+ ZPOS64_T uncompressed_size; /* uncompressed size 8 bytes */
+ uLong size_filename; /* filename length 2 bytes */
+ uLong size_file_extra; /* extra field length 2 bytes */
+ uLong size_file_comment; /* file comment length 2 bytes */
+
+ uLong disk_num_start; /* disk number start 2 bytes */
+ uLong internal_fa; /* internal file attributes 2 bytes */
+ uLong external_fa; /* external file attributes 4 bytes */
+
+ tm_unz tmu_date;
+} unz_file_info64;
+
+typedef struct unz_file_info_s
+{
+ uLong version; /* version made by 2 bytes */
+ uLong version_needed; /* version needed to extract 2 bytes */
+ uLong flag; /* general purpose bit flag 2 bytes */
+ uLong compression_method; /* compression method 2 bytes */
+ uLong dosDate; /* last mod file date in Dos fmt 4 bytes */
+ uLong crc; /* crc-32 4 bytes */
+ uLong compressed_size; /* compressed size 4 bytes */
+ uLong uncompressed_size; /* uncompressed size 4 bytes */
+ uLong size_filename; /* filename length 2 bytes */
+ uLong size_file_extra; /* extra field length 2 bytes */
+ uLong size_file_comment; /* file comment length 2 bytes */
+
+ uLong disk_num_start; /* disk number start 2 bytes */
+ uLong internal_fa; /* internal file attributes 2 bytes */
+ uLong external_fa; /* external file attributes 4 bytes */
+
+ tm_unz tmu_date;
+} unz_file_info;
+
+extern int ZEXPORT unzStringFileNameCompare OF ((const char* fileName1,
+ const char* fileName2,
+ int iCaseSensitivity));
+/*
+ Compare two filename (fileName1,fileName2).
+ If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp)
+ If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi
+ or strcasecmp)
+ If iCaseSenisivity = 0, case sensitivity is defaut of your operating system
+ (like 1 on Unix, 2 on Windows)
+*/
+
+
+extern unzFile ZEXPORT unzOpen OF((const char *path));
+extern unzFile ZEXPORT unzOpen64 OF((const void *path));
+/*
+ Open a Zip file. path contain the full pathname (by example,
+ on a Windows XP computer "c:\\zlib\\zlib113.zip" or on an Unix computer
+ "zlib/zlib113.zip".
+ If the zipfile cannot be opened (file don't exist or in not valid), the
+ return value is NULL.
+ Else, the return value is a unzFile Handle, usable with other function
+ of this unzip package.
+ the "64" function take a const void* pointer, because the path is just the
+ value passed to the open64_file_func callback.
+ Under Windows, if UNICODE is defined, using fill_fopen64_filefunc, the path
+ is a pointer to a wide unicode string (LPCTSTR is LPCWSTR), so const char*
+ does not describe the reality
+*/
+
+
+extern unzFile ZEXPORT unzOpen2 OF((const char *path,
+ zlib_filefunc_def* pzlib_filefunc_def));
+/*
+ Open a Zip file, like unzOpen, but provide a set of file low level API
+ for read/write the zip file (see ioapi.h)
+*/
+
+extern unzFile ZEXPORT unzOpen2_64 OF((const void *path,
+ zlib_filefunc64_def* pzlib_filefunc_def));
+/*
+ Open a Zip file, like unz64Open, but provide a set of file low level API
+ for read/write the zip file (see ioapi.h)
+*/
+
+extern int ZEXPORT unzClose OF((unzFile file));
+/*
+ Close a ZipFile opened with unzOpen.
+ If there is files inside the .Zip opened with unzOpenCurrentFile (see later),
+ these files MUST be closed with unzCloseCurrentFile before call unzClose.
+ return UNZ_OK if there is no problem. */
+
+extern int ZEXPORT unzGetGlobalInfo OF((unzFile file,
+ unz_global_info *pglobal_info));
+
+extern int ZEXPORT unzGetGlobalInfo64 OF((unzFile file,
+ unz_global_info64 *pglobal_info));
+/*
+ Write info about the ZipFile in the *pglobal_info structure.
+ No preparation of the structure is needed
+ return UNZ_OK if there is no problem. */
+
+
+extern int ZEXPORT unzGetGlobalComment OF((unzFile file,
+ char *szComment,
+ uLong uSizeBuf));
+/*
+ Get the global comment string of the ZipFile, in the szComment buffer.
+ uSizeBuf is the size of the szComment buffer.
+ return the number of byte copied or an error code <0
+*/
+
+
+/***************************************************************************/
+/* Unzip package allow you browse the directory of the zipfile */
+
+extern int ZEXPORT unzGoToFirstFile OF((unzFile file));
+/*
+ Set the current file of the zipfile to the first file.
+ return UNZ_OK if there is no problem
+*/
+
+extern int ZEXPORT unzGoToNextFile OF((unzFile file));
+/*
+ Set the current file of the zipfile to the next file.
+ return UNZ_OK if there is no problem
+ return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest.
+*/
+
+extern int ZEXPORT unzLocateFile OF((unzFile file,
+ const char *szFileName,
+ int iCaseSensitivity));
+/*
+ Try locate the file szFileName in the zipfile.
+ For the iCaseSensitivity signification, see unzStringFileNameCompare
+
+ return value :
+ UNZ_OK if the file is found. It becomes the current file.
+ UNZ_END_OF_LIST_OF_FILE if the file is not found
+*/
+
+
+/* ****************************************** */
+/* Ryan supplied functions */
+/* unz_file_info contain information about a file in the zipfile */
+typedef struct unz_file_pos_s
+{
+ uLong pos_in_zip_directory; /* offset in zip file directory */
+ uLong num_of_file; /* # of file */
+} unz_file_pos;
+
+extern int ZEXPORT unzGetFilePos(
+ unzFile file,
+ unz_file_pos* file_pos);
+
+extern int ZEXPORT unzGoToFilePos(
+ unzFile file,
+ unz_file_pos* file_pos);
+
+typedef struct unz64_file_pos_s
+{
+ ZPOS64_T pos_in_zip_directory; /* offset in zip file directory */
+ ZPOS64_T num_of_file; /* # of file */
+} unz64_file_pos;
+
+extern int ZEXPORT unzGetFilePos64(
+ unzFile file,
+ unz64_file_pos* file_pos);
+
+extern int ZEXPORT unzGoToFilePos64(
+ unzFile file,
+ const unz64_file_pos* file_pos);
+
+/* ****************************************** */
+
+extern int ZEXPORT unzGetCurrentFileInfo64 OF((unzFile file,
+ unz_file_info64 *pfile_info,
+ char *szFileName,
+ uLong fileNameBufferSize,
+ void *extraField,
+ uLong extraFieldBufferSize,
+ char *szComment,
+ uLong commentBufferSize));
+
+extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file,
+ unz_file_info *pfile_info,
+ char *szFileName,
+ uLong fileNameBufferSize,
+ void *extraField,
+ uLong extraFieldBufferSize,
+ char *szComment,
+ uLong commentBufferSize));
+/*
+ Get Info about the current file
+ if pfile_info!=NULL, the *pfile_info structure will contain somes info about
+ the current file
+ if szFileName!=NULL, the filemane string will be copied in szFileName
+ (fileNameBufferSize is the size of the buffer)
+ if extraField!=NULL, the extra field information will be copied in extraField
+ (extraFieldBufferSize is the size of the buffer).
+ This is the Central-header version of the extra field
+ if szComment!=NULL, the comment string of the file will be copied in szComment
+ (commentBufferSize is the size of the buffer)
+*/
+
+
+/** Addition for GDAL : START */
+
+extern ZPOS64_T ZEXPORT unzGetCurrentFileZStreamPos64 OF((unzFile file));
+
+/** Addition for GDAL : END */
+
+
+/***************************************************************************/
+/* for reading the content of the current zipfile, you can open it, read data
+ from it, and close it (you can close it before reading all the file)
+ */
+
+extern int ZEXPORT unzOpenCurrentFile OF((unzFile file));
+/*
+ Open for reading data the current file in the zipfile.
+ If there is no error, the return value is UNZ_OK.
+*/
+
+extern int ZEXPORT unzOpenCurrentFilePassword OF((unzFile file,
+ const char* password));
+/*
+ Open for reading data the current file in the zipfile.
+ password is a crypting password
+ If there is no error, the return value is UNZ_OK.
+*/
+
+extern int ZEXPORT unzOpenCurrentFile2 OF((unzFile file,
+ int* method,
+ int* level,
+ int raw));
+/*
+ Same than unzOpenCurrentFile, but open for read raw the file (not uncompress)
+ if raw==1
+ *method will receive method of compression, *level will receive level of
+ compression
+ note : you can set level parameter as NULL (if you did not want known level,
+ but you CANNOT set method parameter as NULL
+*/
+
+extern int ZEXPORT unzOpenCurrentFile3 OF((unzFile file,
+ int* method,
+ int* level,
+ int raw,
+ const char* password));
+/*
+ Same than unzOpenCurrentFile, but open for read raw the file (not uncompress)
+ if raw==1
+ *method will receive method of compression, *level will receive level of
+ compression
+ note : you can set level parameter as NULL (if you did not want known level,
+ but you CANNOT set method parameter as NULL
+*/
+
+
+extern int ZEXPORT unzCloseCurrentFile OF((unzFile file));
+/*
+ Close the file in zip opened with unzOpenCurrentFile
+ Return UNZ_CRCERROR if all the file was read but the CRC is not good
+*/
+
+extern int ZEXPORT unzReadCurrentFile OF((unzFile file,
+ voidp buf,
+ unsigned len));
+/*
+ Read bytes from the current file (opened by unzOpenCurrentFile)
+ buf contain buffer where data must be copied
+ len the size of buf.
+
+ return the number of byte copied if somes bytes are copied
+ return 0 if the end of file was reached
+ return <0 with error code if there is an error
+ (UNZ_ERRNO for IO error, or zLib error for uncompress error)
+*/
+
+extern z_off_t ZEXPORT unztell OF((unzFile file));
+
+extern ZPOS64_T ZEXPORT unztell64 OF((unzFile file));
+/*
+ Give the current position in uncompressed data
+*/
+
+extern int ZEXPORT unzeof OF((unzFile file));
+/*
+ return 1 if the end of file was reached, 0 elsewhere
+*/
+
+extern int ZEXPORT unzGetLocalExtrafield OF((unzFile file,
+ voidp buf,
+ unsigned len));
+/*
+ Read extra field from the current file (opened by unzOpenCurrentFile)
+ This is the local-header version of the extra field (sometimes, there is
+ more info in the local-header version than in the central-header)
+
+ if buf==NULL, it return the size of the local extra field
+
+ if buf!=NULL, len is the size of the buffer, the extra header is copied in
+ buf.
+ the return value is the number of bytes copied in buf, or (if <0)
+ the error code
+*/
+
+/***************************************************************************/
+
+/* Get the current file offset */
+extern ZPOS64_T ZEXPORT unzGetOffset64 (unzFile file);
+extern uLong ZEXPORT unzGetOffset (unzFile file);
+
+/* Set the current file offset */
+extern int ZEXPORT unzSetOffset64 (unzFile file, ZPOS64_T pos);
+extern int ZEXPORT unzSetOffset (unzFile file, uLong pos);
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _unz64_H */
diff --git a/contrib/zlib/contrib/minizip/zip.c b/contrib/zlib/contrib/minizip/zip.c
new file mode 100644
index 000000000..44e88a9cb
--- /dev/null
+++ b/contrib/zlib/contrib/minizip/zip.c
@@ -0,0 +1,2007 @@
+/* zip.c -- IO on .zip files using zlib
+ Version 1.1, February 14h, 2010
+ part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
+
+ Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
+
+ Modifications for Zip64 support
+ Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
+
+ For more info read MiniZip_info.txt
+
+ Changes
+ Oct-2009 - Mathias Svensson - Remove old C style function prototypes
+ Oct-2009 - Mathias Svensson - Added Zip64 Support when creating new file archives
+ Oct-2009 - Mathias Svensson - Did some code cleanup and refactoring to get better overview of some functions.
+ Oct-2009 - Mathias Svensson - Added zipRemoveExtraInfoBlock to strip extra field data from its ZIP64 data
+ It is used when recreting zip archive with RAW when deleting items from a zip.
+ ZIP64 data is automatically added to items that needs it, and existing ZIP64 data need to be removed.
+ Oct-2009 - Mathias Svensson - Added support for BZIP2 as compression mode (bzip2 lib is required)
+ Jan-2010 - back to unzip and minizip 1.0 name scheme, with compatibility layer
+
+*/
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include "zlib.h"
+#include "zip.h"
+
+#ifdef STDC
+# include <stddef.h>
+# include <string.h>
+# include <stdlib.h>
+#endif
+#ifdef NO_ERRNO_H
+ extern int errno;
+#else
+# include <errno.h>
+#endif
+
+
+#ifndef local
+# define local static
+#endif
+/* compile with -Dlocal if your debugger can't find static symbols */
+
+#ifndef VERSIONMADEBY
+# define VERSIONMADEBY (0x0) /* platform depedent */
+#endif
+
+#ifndef Z_BUFSIZE
+#define Z_BUFSIZE (64*1024) //(16384)
+#endif
+
+#ifndef Z_MAXFILENAMEINZIP
+#define Z_MAXFILENAMEINZIP (256)
+#endif
+
+#ifndef ALLOC
+# define ALLOC(size) (malloc(size))
+#endif
+#ifndef TRYFREE
+# define TRYFREE(p) {if (p) free(p);}
+#endif
+
+/*
+#define SIZECENTRALDIRITEM (0x2e)
+#define SIZEZIPLOCALHEADER (0x1e)
+*/
+
+/* I've found an old Unix (a SunOS 4.1.3_U1) without all SEEK_* defined.... */
+
+
+// NOT sure that this work on ALL platform
+#define MAKEULONG64(a, b) ((ZPOS64_T)(((unsigned long)(a)) | ((ZPOS64_T)((unsigned long)(b))) << 32))
+
+#ifndef SEEK_CUR
+#define SEEK_CUR 1
+#endif
+
+#ifndef SEEK_END
+#define SEEK_END 2
+#endif
+
+#ifndef SEEK_SET
+#define SEEK_SET 0
+#endif
+
+#ifndef DEF_MEM_LEVEL
+#if MAX_MEM_LEVEL >= 8
+# define DEF_MEM_LEVEL 8
+#else
+# define DEF_MEM_LEVEL MAX_MEM_LEVEL
+#endif
+#endif
+const char zip_copyright[] =" zip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll";
+
+
+#define SIZEDATA_INDATABLOCK (4096-(4*4))
+
+#define LOCALHEADERMAGIC (0x04034b50)
+#define CENTRALHEADERMAGIC (0x02014b50)
+#define ENDHEADERMAGIC (0x06054b50)
+#define ZIP64ENDHEADERMAGIC (0x6064b50)
+#define ZIP64ENDLOCHEADERMAGIC (0x7064b50)
+
+#define FLAG_LOCALHEADER_OFFSET (0x06)
+#define CRC_LOCALHEADER_OFFSET (0x0e)
+
+#define SIZECENTRALHEADER (0x2e) /* 46 */
+
+typedef struct linkedlist_datablock_internal_s
+{
+ struct linkedlist_datablock_internal_s* next_datablock;
+ uLong avail_in_this_block;
+ uLong filled_in_this_block;
+ uLong unused; /* for future use and alignment */
+ unsigned char data[SIZEDATA_INDATABLOCK];
+} linkedlist_datablock_internal;
+
+typedef struct linkedlist_data_s
+{
+ linkedlist_datablock_internal* first_block;
+ linkedlist_datablock_internal* last_block;
+} linkedlist_data;
+
+
+typedef struct
+{
+ z_stream stream; /* zLib stream structure for inflate */
+#ifdef HAVE_BZIP2
+ bz_stream bstream; /* bzLib stream structure for bziped */
+#endif
+
+ int stream_initialised; /* 1 is stream is initialised */
+ uInt pos_in_buffered_data; /* last written byte in buffered_data */
+
+ ZPOS64_T pos_local_header; /* offset of the local header of the file
+ currenty writing */
+ char* central_header; /* central header data for the current file */
+ uLong size_centralExtra;
+ uLong size_centralheader; /* size of the central header for cur file */
+ uLong size_centralExtraFree; /* Extra bytes allocated to the centralheader but that are not used */
+ uLong flag; /* flag of the file currently writing */
+
+ int method; /* compression method of file currenty wr.*/
+ int raw; /* 1 for directly writing raw data */
+ Byte buffered_data[Z_BUFSIZE];/* buffer contain compressed data to be writ*/
+ uLong dosDate;
+ uLong crc32;
+ int encrypt;
+ int zip64; /* Add ZIP64 extened information in the extra field */
+ ZPOS64_T pos_zip64extrainfo;
+ ZPOS64_T totalCompressedData;
+ ZPOS64_T totalUncompressedData;
+#ifndef NOCRYPT
+ unsigned long keys[3]; /* keys defining the pseudo-random sequence */
+ const z_crc_t* pcrc_32_tab;
+ int crypt_header_size;
+#endif
+} curfile64_info;
+
+typedef struct
+{
+ zlib_filefunc64_32_def z_filefunc;
+ voidpf filestream; /* io structore of the zipfile */
+ linkedlist_data central_dir;/* datablock with central dir in construction*/
+ int in_opened_file_inzip; /* 1 if a file in the zip is currently writ.*/
+ curfile64_info ci; /* info on the file curretly writing */
+
+ ZPOS64_T begin_pos; /* position of the beginning of the zipfile */
+ ZPOS64_T add_position_when_writing_offset;
+ ZPOS64_T number_entry;
+
+#ifndef NO_ADDFILEINEXISTINGZIP
+ char *globalcomment;
+#endif
+
+} zip64_internal;
+
+
+#ifndef NOCRYPT
+#define INCLUDECRYPTINGCODE_IFCRYPTALLOWED
+#include "crypt.h"
+#endif
+
+local linkedlist_datablock_internal* allocate_new_datablock()
+{
+ linkedlist_datablock_internal* ldi;
+ ldi = (linkedlist_datablock_internal*)
+ ALLOC(sizeof(linkedlist_datablock_internal));
+ if (ldi!=NULL)
+ {
+ ldi->next_datablock = NULL ;
+ ldi->filled_in_this_block = 0 ;
+ ldi->avail_in_this_block = SIZEDATA_INDATABLOCK ;
+ }
+ return ldi;
+}
+
+local void free_datablock(linkedlist_datablock_internal* ldi)
+{
+ while (ldi!=NULL)
+ {
+ linkedlist_datablock_internal* ldinext = ldi->next_datablock;
+ TRYFREE(ldi);
+ ldi = ldinext;
+ }
+}
+
+local void init_linkedlist(linkedlist_data* ll)
+{
+ ll->first_block = ll->last_block = NULL;
+}
+
+local void free_linkedlist(linkedlist_data* ll)
+{
+ free_datablock(ll->first_block);
+ ll->first_block = ll->last_block = NULL;
+}
+
+
+local int add_data_in_datablock(linkedlist_data* ll, const void* buf, uLong len)
+{
+ linkedlist_datablock_internal* ldi;
+ const unsigned char* from_copy;
+
+ if (ll==NULL)
+ return ZIP_INTERNALERROR;
+
+ if (ll->last_block == NULL)
+ {
+ ll->first_block = ll->last_block = allocate_new_datablock();
+ if (ll->first_block == NULL)
+ return ZIP_INTERNALERROR;
+ }
+
+ ldi = ll->last_block;
+ from_copy = (unsigned char*)buf;
+
+ while (len>0)
+ {
+ uInt copy_this;
+ uInt i;
+ unsigned char* to_copy;
+
+ if (ldi->avail_in_this_block==0)
+ {
+ ldi->next_datablock = allocate_new_datablock();
+ if (ldi->next_datablock == NULL)
+ return ZIP_INTERNALERROR;
+ ldi = ldi->next_datablock ;
+ ll->last_block = ldi;
+ }
+
+ if (ldi->avail_in_this_block < len)
+ copy_this = (uInt)ldi->avail_in_this_block;
+ else
+ copy_this = (uInt)len;
+
+ to_copy = &(ldi->data[ldi->filled_in_this_block]);
+
+ for (i=0;i<copy_this;i++)
+ *(to_copy+i)=*(from_copy+i);
+
+ ldi->filled_in_this_block += copy_this;
+ ldi->avail_in_this_block -= copy_this;
+ from_copy += copy_this ;
+ len -= copy_this;
+ }
+ return ZIP_OK;
+}
+
+
+
+/****************************************************************************/
+
+#ifndef NO_ADDFILEINEXISTINGZIP
+/* ===========================================================================
+ Inputs a long in LSB order to the given file
+ nbByte == 1, 2 ,4 or 8 (byte, short or long, ZPOS64_T)
+*/
+
+local int zip64local_putValue OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T x, int nbByte));
+local int zip64local_putValue (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T x, int nbByte)
+{
+ unsigned char buf[8];
+ int n;
+ for (n = 0; n < nbByte; n++)
+ {
+ buf[n] = (unsigned char)(x & 0xff);
+ x >>= 8;
+ }
+ if (x != 0)
+ { /* data overflow - hack for ZIP64 (X Roche) */
+ for (n = 0; n < nbByte; n++)
+ {
+ buf[n] = 0xff;
+ }
+ }
+
+ if (ZWRITE64(*pzlib_filefunc_def,filestream,buf,nbByte)!=(uLong)nbByte)
+ return ZIP_ERRNO;
+ else
+ return ZIP_OK;
+}
+
+local void zip64local_putValue_inmemory OF((void* dest, ZPOS64_T x, int nbByte));
+local void zip64local_putValue_inmemory (void* dest, ZPOS64_T x, int nbByte)
+{
+ unsigned char* buf=(unsigned char*)dest;
+ int n;
+ for (n = 0; n < nbByte; n++) {
+ buf[n] = (unsigned char)(x & 0xff);
+ x >>= 8;
+ }
+
+ if (x != 0)
+ { /* data overflow - hack for ZIP64 */
+ for (n = 0; n < nbByte; n++)
+ {
+ buf[n] = 0xff;
+ }
+ }
+}
+
+/****************************************************************************/
+
+
+local uLong zip64local_TmzDateToDosDate(const tm_zip* ptm)
+{
+ uLong year = (uLong)ptm->tm_year;
+ if (year>=1980)
+ year-=1980;
+ else if (year>=80)
+ year-=80;
+ return
+ (uLong) (((ptm->tm_mday) + (32 * (ptm->tm_mon+1)) + (512 * year)) << 16) |
+ ((ptm->tm_sec/2) + (32* ptm->tm_min) + (2048 * (uLong)ptm->tm_hour));
+}
+
+
+/****************************************************************************/
+
+local int zip64local_getByte OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, int *pi));
+
+local int zip64local_getByte(const zlib_filefunc64_32_def* pzlib_filefunc_def,voidpf filestream,int* pi)
+{
+ unsigned char c;
+ int err = (int)ZREAD64(*pzlib_filefunc_def,filestream,&c,1);
+ if (err==1)
+ {
+ *pi = (int)c;
+ return ZIP_OK;
+ }
+ else
+ {
+ if (ZERROR64(*pzlib_filefunc_def,filestream))
+ return ZIP_ERRNO;
+ else
+ return ZIP_EOF;
+ }
+}
+
+
+/* ===========================================================================
+ Reads a long in LSB order from the given gz_stream. Sets
+*/
+local int zip64local_getShort OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong *pX));
+
+local int zip64local_getShort (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong* pX)
+{
+ uLong x ;
+ int i = 0;
+ int err;
+
+ err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
+ x = (uLong)i;
+
+ if (err==ZIP_OK)
+ err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
+ x += ((uLong)i)<<8;
+
+ if (err==ZIP_OK)
+ *pX = x;
+ else
+ *pX = 0;
+ return err;
+}
+
+local int zip64local_getLong OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong *pX));
+
+local int zip64local_getLong (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong* pX)
+{
+ uLong x ;
+ int i = 0;
+ int err;
+
+ err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
+ x = (uLong)i;
+
+ if (err==ZIP_OK)
+ err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
+ x += ((uLong)i)<<8;
+
+ if (err==ZIP_OK)
+ err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
+ x += ((uLong)i)<<16;
+
+ if (err==ZIP_OK)
+ err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
+ x += ((uLong)i)<<24;
+
+ if (err==ZIP_OK)
+ *pX = x;
+ else
+ *pX = 0;
+ return err;
+}
+
+local int zip64local_getLong64 OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T *pX));
+
+
+local int zip64local_getLong64 (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T *pX)
+{
+ ZPOS64_T x;
+ int i = 0;
+ int err;
+
+ err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
+ x = (ZPOS64_T)i;
+
+ if (err==ZIP_OK)
+ err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
+ x += ((ZPOS64_T)i)<<8;
+
+ if (err==ZIP_OK)
+ err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
+ x += ((ZPOS64_T)i)<<16;
+
+ if (err==ZIP_OK)
+ err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
+ x += ((ZPOS64_T)i)<<24;
+
+ if (err==ZIP_OK)
+ err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
+ x += ((ZPOS64_T)i)<<32;
+
+ if (err==ZIP_OK)
+ err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
+ x += ((ZPOS64_T)i)<<40;
+
+ if (err==ZIP_OK)
+ err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
+ x += ((ZPOS64_T)i)<<48;
+
+ if (err==ZIP_OK)
+ err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
+ x += ((ZPOS64_T)i)<<56;
+
+ if (err==ZIP_OK)
+ *pX = x;
+ else
+ *pX = 0;
+
+ return err;
+}
+
+#ifndef BUFREADCOMMENT
+#define BUFREADCOMMENT (0x400)
+#endif
+/*
+ Locate the Central directory of a zipfile (at the end, just before
+ the global comment)
+*/
+local ZPOS64_T zip64local_SearchCentralDir OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream));
+
+local ZPOS64_T zip64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream)
+{
+ unsigned char* buf;
+ ZPOS64_T uSizeFile;
+ ZPOS64_T uBackRead;
+ ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */
+ ZPOS64_T uPosFound=0;
+
+ if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0)
+ return 0;
+
+
+ uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream);
+
+ if (uMaxBack>uSizeFile)
+ uMaxBack = uSizeFile;
+
+ buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4);
+ if (buf==NULL)
+ return 0;
+
+ uBackRead = 4;
+ while (uBackRead<uMaxBack)
+ {
+ uLong uReadSize;
+ ZPOS64_T uReadPos ;
+ int i;
+ if (uBackRead+BUFREADCOMMENT>uMaxBack)
+ uBackRead = uMaxBack;
+ else
+ uBackRead+=BUFREADCOMMENT;
+ uReadPos = uSizeFile-uBackRead ;
+
+ uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ?
+ (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos);
+ if (ZSEEK64(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0)
+ break;
+
+ if (ZREAD64(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize)
+ break;
+
+ for (i=(int)uReadSize-3; (i--)>0;)
+ if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) &&
+ ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06))
+ {
+ uPosFound = uReadPos+i;
+ break;
+ }
+
+ if (uPosFound!=0)
+ break;
+ }
+ TRYFREE(buf);
+ return uPosFound;
+}
+
+/*
+Locate the End of Zip64 Central directory locator and from there find the CD of a zipfile (at the end, just before
+the global comment)
+*/
+local ZPOS64_T zip64local_SearchCentralDir64 OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream));
+
+local ZPOS64_T zip64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream)
+{
+ unsigned char* buf;
+ ZPOS64_T uSizeFile;
+ ZPOS64_T uBackRead;
+ ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */
+ ZPOS64_T uPosFound=0;
+ uLong uL;
+ ZPOS64_T relativeOffset;
+
+ if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0)
+ return 0;
+
+ uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream);
+
+ if (uMaxBack>uSizeFile)
+ uMaxBack = uSizeFile;
+
+ buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4);
+ if (buf==NULL)
+ return 0;
+
+ uBackRead = 4;
+ while (uBackRead<uMaxBack)
+ {
+ uLong uReadSize;
+ ZPOS64_T uReadPos;
+ int i;
+ if (uBackRead+BUFREADCOMMENT>uMaxBack)
+ uBackRead = uMaxBack;
+ else
+ uBackRead+=BUFREADCOMMENT;
+ uReadPos = uSizeFile-uBackRead ;
+
+ uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ?
+ (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos);
+ if (ZSEEK64(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0)
+ break;
+
+ if (ZREAD64(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize)
+ break;
+
+ for (i=(int)uReadSize-3; (i--)>0;)
+ {
+ // Signature "0x07064b50" Zip64 end of central directory locater
+ if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && ((*(buf+i+2))==0x06) && ((*(buf+i+3))==0x07))
+ {
+ uPosFound = uReadPos+i;
+ break;
+ }
+ }
+
+ if (uPosFound!=0)
+ break;
+ }
+
+ TRYFREE(buf);
+ if (uPosFound == 0)
+ return 0;
+
+ /* Zip64 end of central directory locator */
+ if (ZSEEK64(*pzlib_filefunc_def,filestream, uPosFound,ZLIB_FILEFUNC_SEEK_SET)!=0)
+ return 0;
+
+ /* the signature, already checked */
+ if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK)
+ return 0;
+
+ /* number of the disk with the start of the zip64 end of central directory */
+ if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK)
+ return 0;
+ if (uL != 0)
+ return 0;
+
+ /* relative offset of the zip64 end of central directory record */
+ if (zip64local_getLong64(pzlib_filefunc_def,filestream,&relativeOffset)!=ZIP_OK)
+ return 0;
+
+ /* total number of disks */
+ if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK)
+ return 0;
+ if (uL != 1)
+ return 0;
+
+ /* Goto Zip64 end of central directory record */
+ if (ZSEEK64(*pzlib_filefunc_def,filestream, relativeOffset,ZLIB_FILEFUNC_SEEK_SET)!=0)
+ return 0;
+
+ /* the signature */
+ if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK)
+ return 0;
+
+ if (uL != 0x06064b50) // signature of 'Zip64 end of central directory'
+ return 0;
+
+ return relativeOffset;
+}
+
+int LoadCentralDirectoryRecord(zip64_internal* pziinit)
+{
+ int err=ZIP_OK;
+ ZPOS64_T byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/
+
+ ZPOS64_T size_central_dir; /* size of the central directory */
+ ZPOS64_T offset_central_dir; /* offset of start of central directory */
+ ZPOS64_T central_pos;
+ uLong uL;
+
+ uLong number_disk; /* number of the current dist, used for
+ spaning ZIP, unsupported, always 0*/
+ uLong number_disk_with_CD; /* number the the disk with central dir, used
+ for spaning ZIP, unsupported, always 0*/
+ ZPOS64_T number_entry;
+ ZPOS64_T number_entry_CD; /* total number of entries in
+ the central dir
+ (same than number_entry on nospan) */
+ uLong VersionMadeBy;
+ uLong VersionNeeded;
+ uLong size_comment;
+
+ int hasZIP64Record = 0;
+
+ // check first if we find a ZIP64 record
+ central_pos = zip64local_SearchCentralDir64(&pziinit->z_filefunc,pziinit->filestream);
+ if(central_pos > 0)
+ {
+ hasZIP64Record = 1;
+ }
+ else if(central_pos == 0)
+ {
+ central_pos = zip64local_SearchCentralDir(&pziinit->z_filefunc,pziinit->filestream);
+ }
+
+/* disable to allow appending to empty ZIP archive
+ if (central_pos==0)
+ err=ZIP_ERRNO;
+*/
+
+ if(hasZIP64Record)
+ {
+ ZPOS64_T sizeEndOfCentralDirectory;
+ if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, central_pos, ZLIB_FILEFUNC_SEEK_SET) != 0)
+ err=ZIP_ERRNO;
+
+ /* the signature, already checked */
+ if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&uL)!=ZIP_OK)
+ err=ZIP_ERRNO;
+
+ /* size of zip64 end of central directory record */
+ if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream, &sizeEndOfCentralDirectory)!=ZIP_OK)
+ err=ZIP_ERRNO;
+
+ /* version made by */
+ if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &VersionMadeBy)!=ZIP_OK)
+ err=ZIP_ERRNO;
+
+ /* version needed to extract */
+ if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &VersionNeeded)!=ZIP_OK)
+ err=ZIP_ERRNO;
+
+ /* number of this disk */
+ if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&number_disk)!=ZIP_OK)
+ err=ZIP_ERRNO;
+
+ /* number of the disk with the start of the central directory */
+ if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&number_disk_with_CD)!=ZIP_OK)
+ err=ZIP_ERRNO;
+
+ /* total number of entries in the central directory on this disk */
+ if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream, &number_entry)!=ZIP_OK)
+ err=ZIP_ERRNO;
+
+ /* total number of entries in the central directory */
+ if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream,&number_entry_CD)!=ZIP_OK)
+ err=ZIP_ERRNO;
+
+ if ((number_entry_CD!=number_entry) || (number_disk_with_CD!=0) || (number_disk!=0))
+ err=ZIP_BADZIPFILE;
+
+ /* size of the central directory */
+ if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream,&size_central_dir)!=ZIP_OK)
+ err=ZIP_ERRNO;
+
+ /* offset of start of central directory with respect to the
+ starting disk number */
+ if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream,&offset_central_dir)!=ZIP_OK)
+ err=ZIP_ERRNO;
+
+ // TODO..
+ // read the comment from the standard central header.
+ size_comment = 0;
+ }
+ else
+ {
+ // Read End of central Directory info
+ if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0)
+ err=ZIP_ERRNO;
+
+ /* the signature, already checked */
+ if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&uL)!=ZIP_OK)
+ err=ZIP_ERRNO;
+
+ /* number of this disk */
+ if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream,&number_disk)!=ZIP_OK)
+ err=ZIP_ERRNO;
+
+ /* number of the disk with the start of the central directory */
+ if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream,&number_disk_with_CD)!=ZIP_OK)
+ err=ZIP_ERRNO;
+
+ /* total number of entries in the central dir on this disk */
+ number_entry = 0;
+ if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK)
+ err=ZIP_ERRNO;
+ else
+ number_entry = uL;
+
+ /* total number of entries in the central dir */
+ number_entry_CD = 0;
+ if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK)
+ err=ZIP_ERRNO;
+ else
+ number_entry_CD = uL;
+
+ if ((number_entry_CD!=number_entry) || (number_disk_with_CD!=0) || (number_disk!=0))
+ err=ZIP_BADZIPFILE;
+
+ /* size of the central directory */
+ size_central_dir = 0;
+ if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK)
+ err=ZIP_ERRNO;
+ else
+ size_central_dir = uL;
+
+ /* offset of start of central directory with respect to the starting disk number */
+ offset_central_dir = 0;
+ if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK)
+ err=ZIP_ERRNO;
+ else
+ offset_central_dir = uL;
+
+
+ /* zipfile global comment length */
+ if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &size_comment)!=ZIP_OK)
+ err=ZIP_ERRNO;
+ }
+
+ if ((central_pos<offset_central_dir+size_central_dir) &&
+ (err==ZIP_OK))
+ err=ZIP_BADZIPFILE;
+
+ if (err!=ZIP_OK)
+ {
+ ZCLOSE64(pziinit->z_filefunc, pziinit->filestream);
+ return ZIP_ERRNO;
+ }
+
+ if (size_comment>0)
+ {
+ pziinit->globalcomment = (char*)ALLOC(size_comment+1);
+ if (pziinit->globalcomment)
+ {
+ size_comment = ZREAD64(pziinit->z_filefunc, pziinit->filestream, pziinit->globalcomment,size_comment);
+ pziinit->globalcomment[size_comment]=0;
+ }
+ }
+
+ byte_before_the_zipfile = central_pos - (offset_central_dir+size_central_dir);
+ pziinit->add_position_when_writing_offset = byte_before_the_zipfile;
+
+ {
+ ZPOS64_T size_central_dir_to_read = size_central_dir;
+ size_t buf_size = SIZEDATA_INDATABLOCK;
+ void* buf_read = (void*)ALLOC(buf_size);
+ if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, offset_central_dir + byte_before_the_zipfile, ZLIB_FILEFUNC_SEEK_SET) != 0)
+ err=ZIP_ERRNO;
+
+ while ((size_central_dir_to_read>0) && (err==ZIP_OK))
+ {
+ ZPOS64_T read_this = SIZEDATA_INDATABLOCK;
+ if (read_this > size_central_dir_to_read)
+ read_this = size_central_dir_to_read;
+
+ if (ZREAD64(pziinit->z_filefunc, pziinit->filestream,buf_read,(uLong)read_this) != read_this)
+ err=ZIP_ERRNO;
+
+ if (err==ZIP_OK)
+ err = add_data_in_datablock(&pziinit->central_dir,buf_read, (uLong)read_this);
+
+ size_central_dir_to_read-=read_this;
+ }
+ TRYFREE(buf_read);
+ }
+ pziinit->begin_pos = byte_before_the_zipfile;
+ pziinit->number_entry = number_entry_CD;
+
+ if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, offset_central_dir+byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET) != 0)
+ err=ZIP_ERRNO;
+
+ return err;
+}
+
+
+#endif /* !NO_ADDFILEINEXISTINGZIP*/
+
+
+/************************************************************/
+extern zipFile ZEXPORT zipOpen3 (const void *pathname, int append, zipcharpc* globalcomment, zlib_filefunc64_32_def* pzlib_filefunc64_32_def)
+{
+ zip64_internal ziinit;
+ zip64_internal* zi;
+ int err=ZIP_OK;
+
+ ziinit.z_filefunc.zseek32_file = NULL;
+ ziinit.z_filefunc.ztell32_file = NULL;
+ if (pzlib_filefunc64_32_def==NULL)
+ fill_fopen64_filefunc(&ziinit.z_filefunc.zfile_func64);
+ else
+ ziinit.z_filefunc = *pzlib_filefunc64_32_def;
+
+ ziinit.filestream = ZOPEN64(ziinit.z_filefunc,
+ pathname,
+ (append == APPEND_STATUS_CREATE) ?
+ (ZLIB_FILEFUNC_MODE_READ | ZLIB_FILEFUNC_MODE_WRITE | ZLIB_FILEFUNC_MODE_CREATE) :
+ (ZLIB_FILEFUNC_MODE_READ | ZLIB_FILEFUNC_MODE_WRITE | ZLIB_FILEFUNC_MODE_EXISTING));
+
+ if (ziinit.filestream == NULL)
+ return NULL;
+
+ if (append == APPEND_STATUS_CREATEAFTER)
+ ZSEEK64(ziinit.z_filefunc,ziinit.filestream,0,SEEK_END);
+
+ ziinit.begin_pos = ZTELL64(ziinit.z_filefunc,ziinit.filestream);
+ ziinit.in_opened_file_inzip = 0;
+ ziinit.ci.stream_initialised = 0;
+ ziinit.number_entry = 0;
+ ziinit.add_position_when_writing_offset = 0;
+ init_linkedlist(&(ziinit.central_dir));
+
+
+
+ zi = (zip64_internal*)ALLOC(sizeof(zip64_internal));
+ if (zi==NULL)
+ {
+ ZCLOSE64(ziinit.z_filefunc,ziinit.filestream);
+ return NULL;
+ }
+
+ /* now we add file in a zipfile */
+# ifndef NO_ADDFILEINEXISTINGZIP
+ ziinit.globalcomment = NULL;
+ if (append == APPEND_STATUS_ADDINZIP)
+ {
+ // Read and Cache Central Directory Records
+ err = LoadCentralDirectoryRecord(&ziinit);
+ }
+
+ if (globalcomment)
+ {
+ *globalcomment = ziinit.globalcomment;
+ }
+# endif /* !NO_ADDFILEINEXISTINGZIP*/
+
+ if (err != ZIP_OK)
+ {
+# ifndef NO_ADDFILEINEXISTINGZIP
+ TRYFREE(ziinit.globalcomment);
+# endif /* !NO_ADDFILEINEXISTINGZIP*/
+ TRYFREE(zi);
+ return NULL;
+ }
+ else
+ {
+ *zi = ziinit;
+ return (zipFile)zi;
+ }
+}
+
+extern zipFile ZEXPORT zipOpen2 (const char *pathname, int append, zipcharpc* globalcomment, zlib_filefunc_def* pzlib_filefunc32_def)
+{
+ if (pzlib_filefunc32_def != NULL)
+ {
+ zlib_filefunc64_32_def zlib_filefunc64_32_def_fill;
+ fill_zlib_filefunc64_32_def_from_filefunc32(&zlib_filefunc64_32_def_fill,pzlib_filefunc32_def);
+ return zipOpen3(pathname, append, globalcomment, &zlib_filefunc64_32_def_fill);
+ }
+ else
+ return zipOpen3(pathname, append, globalcomment, NULL);
+}
+
+extern zipFile ZEXPORT zipOpen2_64 (const void *pathname, int append, zipcharpc* globalcomment, zlib_filefunc64_def* pzlib_filefunc_def)
+{
+ if (pzlib_filefunc_def != NULL)
+ {
+ zlib_filefunc64_32_def zlib_filefunc64_32_def_fill;
+ zlib_filefunc64_32_def_fill.zfile_func64 = *pzlib_filefunc_def;
+ zlib_filefunc64_32_def_fill.ztell32_file = NULL;
+ zlib_filefunc64_32_def_fill.zseek32_file = NULL;
+ return zipOpen3(pathname, append, globalcomment, &zlib_filefunc64_32_def_fill);
+ }
+ else
+ return zipOpen3(pathname, append, globalcomment, NULL);
+}
+
+
+
+extern zipFile ZEXPORT zipOpen (const char* pathname, int append)
+{
+ return zipOpen3((const void*)pathname,append,NULL,NULL);
+}
+
+extern zipFile ZEXPORT zipOpen64 (const void* pathname, int append)
+{
+ return zipOpen3(pathname,append,NULL,NULL);
+}
+
+int Write_LocalFileHeader(zip64_internal* zi, const char* filename, uInt size_extrafield_local, const void* extrafield_local)
+{
+ /* write the local header */
+ int err;
+ uInt size_filename = (uInt)strlen(filename);
+ uInt size_extrafield = size_extrafield_local;
+
+ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)LOCALHEADERMAGIC, 4);
+
+ if (err==ZIP_OK)
+ {
+ if(zi->ci.zip64)
+ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)45,2);/* version needed to extract */
+ else
+ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)20,2);/* version needed to extract */
+ }
+
+ if (err==ZIP_OK)
+ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.flag,2);
+
+ if (err==ZIP_OK)
+ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.method,2);
+
+ if (err==ZIP_OK)
+ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.dosDate,4);
+
+ // CRC / Compressed size / Uncompressed size will be filled in later and rewritten later
+ if (err==ZIP_OK)
+ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* crc 32, unknown */
+ if (err==ZIP_OK)
+ {
+ if(zi->ci.zip64)
+ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xFFFFFFFF,4); /* compressed size, unknown */
+ else
+ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* compressed size, unknown */
+ }
+ if (err==ZIP_OK)
+ {
+ if(zi->ci.zip64)
+ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xFFFFFFFF,4); /* uncompressed size, unknown */
+ else
+ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* uncompressed size, unknown */
+ }
+
+ if (err==ZIP_OK)
+ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_filename,2);
+
+ if(zi->ci.zip64)
+ {
+ size_extrafield += 20;
+ }
+
+ if (err==ZIP_OK)
+ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_extrafield,2);
+
+ if ((err==ZIP_OK) && (size_filename > 0))
+ {
+ if (ZWRITE64(zi->z_filefunc,zi->filestream,filename,size_filename)!=size_filename)
+ err = ZIP_ERRNO;
+ }
+
+ if ((err==ZIP_OK) && (size_extrafield_local > 0))
+ {
+ if (ZWRITE64(zi->z_filefunc, zi->filestream, extrafield_local, size_extrafield_local) != size_extrafield_local)
+ err = ZIP_ERRNO;
+ }
+
+
+ if ((err==ZIP_OK) && (zi->ci.zip64))
+ {
+ // write the Zip64 extended info
+ short HeaderID = 1;
+ short DataSize = 16;
+ ZPOS64_T CompressedSize = 0;
+ ZPOS64_T UncompressedSize = 0;
+
+ // Remember position of Zip64 extended info for the local file header. (needed when we update size after done with file)
+ zi->ci.pos_zip64extrainfo = ZTELL64(zi->z_filefunc,zi->filestream);
+
+ err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (short)HeaderID,2);
+ err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (short)DataSize,2);
+
+ err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)UncompressedSize,8);
+ err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)CompressedSize,8);
+ }
+
+ return err;
+}
+
+/*
+ NOTE.
+ When writing RAW the ZIP64 extended information in extrafield_local and extrafield_global needs to be stripped
+ before calling this function it can be done with zipRemoveExtraInfoBlock
+
+ It is not done here because then we need to realloc a new buffer since parameters are 'const' and I want to minimize
+ unnecessary allocations.
+ */
+extern int ZEXPORT zipOpenNewFileInZip4_64 (zipFile file, const char* filename, const zip_fileinfo* zipfi,
+ const void* extrafield_local, uInt size_extrafield_local,
+ const void* extrafield_global, uInt size_extrafield_global,
+ const char* comment, int method, int level, int raw,
+ int windowBits,int memLevel, int strategy,
+ const char* password, uLong crcForCrypting,
+ uLong versionMadeBy, uLong flagBase, int zip64)
+{
+ zip64_internal* zi;
+ uInt size_filename;
+ uInt size_comment;
+ uInt i;
+ int err = ZIP_OK;
+
+# ifdef NOCRYPT
+ (crcForCrypting);
+ if (password != NULL)
+ return ZIP_PARAMERROR;
+# endif
+
+ if (file == NULL)
+ return ZIP_PARAMERROR;
+
+#ifdef HAVE_BZIP2
+ if ((method!=0) && (method!=Z_DEFLATED) && (method!=Z_BZIP2ED))
+ return ZIP_PARAMERROR;
+#else
+ if ((method!=0) && (method!=Z_DEFLATED))
+ return ZIP_PARAMERROR;
+#endif
+
+ zi = (zip64_internal*)file;
+
+ if (zi->in_opened_file_inzip == 1)
+ {
+ err = zipCloseFileInZip (file);
+ if (err != ZIP_OK)
+ return err;
+ }
+
+ if (filename==NULL)
+ filename="-";
+
+ if (comment==NULL)
+ size_comment = 0;
+ else
+ size_comment = (uInt)strlen(comment);
+
+ size_filename = (uInt)strlen(filename);
+
+ if (zipfi == NULL)
+ zi->ci.dosDate = 0;
+ else
+ {
+ if (zipfi->dosDate != 0)
+ zi->ci.dosDate = zipfi->dosDate;
+ else
+ zi->ci.dosDate = zip64local_TmzDateToDosDate(&zipfi->tmz_date);
+ }
+
+ zi->ci.flag = flagBase;
+ if ((level==8) || (level==9))
+ zi->ci.flag |= 2;
+ if (level==2)
+ zi->ci.flag |= 4;
+ if (level==1)
+ zi->ci.flag |= 6;
+ if (password != NULL)
+ zi->ci.flag |= 1;
+
+ zi->ci.crc32 = 0;
+ zi->ci.method = method;
+ zi->ci.encrypt = 0;
+ zi->ci.stream_initialised = 0;
+ zi->ci.pos_in_buffered_data = 0;
+ zi->ci.raw = raw;
+ zi->ci.pos_local_header = ZTELL64(zi->z_filefunc,zi->filestream);
+
+ zi->ci.size_centralheader = SIZECENTRALHEADER + size_filename + size_extrafield_global + size_comment;
+ zi->ci.size_centralExtraFree = 32; // Extra space we have reserved in case we need to add ZIP64 extra info data
+
+ zi->ci.central_header = (char*)ALLOC((uInt)zi->ci.size_centralheader + zi->ci.size_centralExtraFree);
+
+ zi->ci.size_centralExtra = size_extrafield_global;
+ zip64local_putValue_inmemory(zi->ci.central_header,(uLong)CENTRALHEADERMAGIC,4);
+ /* version info */
+ zip64local_putValue_inmemory(zi->ci.central_header+4,(uLong)versionMadeBy,2);
+ zip64local_putValue_inmemory(zi->ci.central_header+6,(uLong)20,2);
+ zip64local_putValue_inmemory(zi->ci.central_header+8,(uLong)zi->ci.flag,2);
+ zip64local_putValue_inmemory(zi->ci.central_header+10,(uLong)zi->ci.method,2);
+ zip64local_putValue_inmemory(zi->ci.central_header+12,(uLong)zi->ci.dosDate,4);
+ zip64local_putValue_inmemory(zi->ci.central_header+16,(uLong)0,4); /*crc*/
+ zip64local_putValue_inmemory(zi->ci.central_header+20,(uLong)0,4); /*compr size*/
+ zip64local_putValue_inmemory(zi->ci.central_header+24,(uLong)0,4); /*uncompr size*/
+ zip64local_putValue_inmemory(zi->ci.central_header+28,(uLong)size_filename,2);
+ zip64local_putValue_inmemory(zi->ci.central_header+30,(uLong)size_extrafield_global,2);
+ zip64local_putValue_inmemory(zi->ci.central_header+32,(uLong)size_comment,2);
+ zip64local_putValue_inmemory(zi->ci.central_header+34,(uLong)0,2); /*disk nm start*/
+
+ if (zipfi==NULL)
+ zip64local_putValue_inmemory(zi->ci.central_header+36,(uLong)0,2);
+ else
+ zip64local_putValue_inmemory(zi->ci.central_header+36,(uLong)zipfi->internal_fa,2);
+
+ if (zipfi==NULL)
+ zip64local_putValue_inmemory(zi->ci.central_header+38,(uLong)0,4);
+ else
+ zip64local_putValue_inmemory(zi->ci.central_header+38,(uLong)zipfi->external_fa,4);
+
+ if(zi->ci.pos_local_header >= 0xffffffff)
+ zip64local_putValue_inmemory(zi->ci.central_header+42,(uLong)0xffffffff,4);
+ else
+ zip64local_putValue_inmemory(zi->ci.central_header+42,(uLong)zi->ci.pos_local_header - zi->add_position_when_writing_offset,4);
+
+ for (i=0;i<size_filename;i++)
+ *(zi->ci.central_header+SIZECENTRALHEADER+i) = *(filename+i);
+
+ for (i=0;i<size_extrafield_global;i++)
+ *(zi->ci.central_header+SIZECENTRALHEADER+size_filename+i) =
+ *(((const char*)extrafield_global)+i);
+
+ for (i=0;i<size_comment;i++)
+ *(zi->ci.central_header+SIZECENTRALHEADER+size_filename+
+ size_extrafield_global+i) = *(comment+i);
+ if (zi->ci.central_header == NULL)
+ return ZIP_INTERNALERROR;
+
+ zi->ci.zip64 = zip64;
+ zi->ci.totalCompressedData = 0;
+ zi->ci.totalUncompressedData = 0;
+ zi->ci.pos_zip64extrainfo = 0;
+
+ err = Write_LocalFileHeader(zi, filename, size_extrafield_local, extrafield_local);
+
+#ifdef HAVE_BZIP2
+ zi->ci.bstream.avail_in = (uInt)0;
+ zi->ci.bstream.avail_out = (uInt)Z_BUFSIZE;
+ zi->ci.bstream.next_out = (char*)zi->ci.buffered_data;
+ zi->ci.bstream.total_in_hi32 = 0;
+ zi->ci.bstream.total_in_lo32 = 0;
+ zi->ci.bstream.total_out_hi32 = 0;
+ zi->ci.bstream.total_out_lo32 = 0;
+#endif
+
+ zi->ci.stream.avail_in = (uInt)0;
+ zi->ci.stream.avail_out = (uInt)Z_BUFSIZE;
+ zi->ci.stream.next_out = zi->ci.buffered_data;
+ zi->ci.stream.total_in = 0;
+ zi->ci.stream.total_out = 0;
+ zi->ci.stream.data_type = Z_BINARY;
+
+#ifdef HAVE_BZIP2
+ if ((err==ZIP_OK) && (zi->ci.method == Z_DEFLATED || zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw))
+#else
+ if ((err==ZIP_OK) && (zi->ci.method == Z_DEFLATED) && (!zi->ci.raw))
+#endif
+ {
+ if(zi->ci.method == Z_DEFLATED)
+ {
+ zi->ci.stream.zalloc = (alloc_func)0;
+ zi->ci.stream.zfree = (free_func)0;
+ zi->ci.stream.opaque = (voidpf)0;
+
+ if (windowBits>0)
+ windowBits = -windowBits;
+
+ err = deflateInit2(&zi->ci.stream, level, Z_DEFLATED, windowBits, memLevel, strategy);
+
+ if (err==Z_OK)
+ zi->ci.stream_initialised = Z_DEFLATED;
+ }
+ else if(zi->ci.method == Z_BZIP2ED)
+ {
+#ifdef HAVE_BZIP2
+ // Init BZip stuff here
+ zi->ci.bstream.bzalloc = 0;
+ zi->ci.bstream.bzfree = 0;
+ zi->ci.bstream.opaque = (voidpf)0;
+
+ err = BZ2_bzCompressInit(&zi->ci.bstream, level, 0,35);
+ if(err == BZ_OK)
+ zi->ci.stream_initialised = Z_BZIP2ED;
+#endif
+ }
+
+ }
+
+# ifndef NOCRYPT
+ zi->ci.crypt_header_size = 0;
+ if ((err==Z_OK) && (password != NULL))
+ {
+ unsigned char bufHead[RAND_HEAD_LEN];
+ unsigned int sizeHead;
+ zi->ci.encrypt = 1;
+ zi->ci.pcrc_32_tab = get_crc_table();
+ /*init_keys(password,zi->ci.keys,zi->ci.pcrc_32_tab);*/
+
+ sizeHead=crypthead(password,bufHead,RAND_HEAD_LEN,zi->ci.keys,zi->ci.pcrc_32_tab,crcForCrypting);
+ zi->ci.crypt_header_size = sizeHead;
+
+ if (ZWRITE64(zi->z_filefunc,zi->filestream,bufHead,sizeHead) != sizeHead)
+ err = ZIP_ERRNO;
+ }
+# endif
+
+ if (err==Z_OK)
+ zi->in_opened_file_inzip = 1;
+ return err;
+}
+
+extern int ZEXPORT zipOpenNewFileInZip4 (zipFile file, const char* filename, const zip_fileinfo* zipfi,
+ const void* extrafield_local, uInt size_extrafield_local,
+ const void* extrafield_global, uInt size_extrafield_global,
+ const char* comment, int method, int level, int raw,
+ int windowBits,int memLevel, int strategy,
+ const char* password, uLong crcForCrypting,
+ uLong versionMadeBy, uLong flagBase)
+{
+ return zipOpenNewFileInZip4_64 (file, filename, zipfi,
+ extrafield_local, size_extrafield_local,
+ extrafield_global, size_extrafield_global,
+ comment, method, level, raw,
+ windowBits, memLevel, strategy,
+ password, crcForCrypting, versionMadeBy, flagBase, 0);
+}
+
+extern int ZEXPORT zipOpenNewFileInZip3 (zipFile file, const char* filename, const zip_fileinfo* zipfi,
+ const void* extrafield_local, uInt size_extrafield_local,
+ const void* extrafield_global, uInt size_extrafield_global,
+ const char* comment, int method, int level, int raw,
+ int windowBits,int memLevel, int strategy,
+ const char* password, uLong crcForCrypting)
+{
+ return zipOpenNewFileInZip4_64 (file, filename, zipfi,
+ extrafield_local, size_extrafield_local,
+ extrafield_global, size_extrafield_global,
+ comment, method, level, raw,
+ windowBits, memLevel, strategy,
+ password, crcForCrypting, VERSIONMADEBY, 0, 0);
+}
+
+extern int ZEXPORT zipOpenNewFileInZip3_64(zipFile file, const char* filename, const zip_fileinfo* zipfi,
+ const void* extrafield_local, uInt size_extrafield_local,
+ const void* extrafield_global, uInt size_extrafield_global,
+ const char* comment, int method, int level, int raw,
+ int windowBits,int memLevel, int strategy,
+ const char* password, uLong crcForCrypting, int zip64)
+{
+ return zipOpenNewFileInZip4_64 (file, filename, zipfi,
+ extrafield_local, size_extrafield_local,
+ extrafield_global, size_extrafield_global,
+ comment, method, level, raw,
+ windowBits, memLevel, strategy,
+ password, crcForCrypting, VERSIONMADEBY, 0, zip64);
+}
+
+extern int ZEXPORT zipOpenNewFileInZip2(zipFile file, const char* filename, const zip_fileinfo* zipfi,
+ const void* extrafield_local, uInt size_extrafield_local,
+ const void* extrafield_global, uInt size_extrafield_global,
+ const char* comment, int method, int level, int raw)
+{
+ return zipOpenNewFileInZip4_64 (file, filename, zipfi,
+ extrafield_local, size_extrafield_local,
+ extrafield_global, size_extrafield_global,
+ comment, method, level, raw,
+ -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY,
+ NULL, 0, VERSIONMADEBY, 0, 0);
+}
+
+extern int ZEXPORT zipOpenNewFileInZip2_64(zipFile file, const char* filename, const zip_fileinfo* zipfi,
+ const void* extrafield_local, uInt size_extrafield_local,
+ const void* extrafield_global, uInt size_extrafield_global,
+ const char* comment, int method, int level, int raw, int zip64)
+{
+ return zipOpenNewFileInZip4_64 (file, filename, zipfi,
+ extrafield_local, size_extrafield_local,
+ extrafield_global, size_extrafield_global,
+ comment, method, level, raw,
+ -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY,
+ NULL, 0, VERSIONMADEBY, 0, zip64);
+}
+
+extern int ZEXPORT zipOpenNewFileInZip64 (zipFile file, const char* filename, const zip_fileinfo* zipfi,
+ const void* extrafield_local, uInt size_extrafield_local,
+ const void*extrafield_global, uInt size_extrafield_global,
+ const char* comment, int method, int level, int zip64)
+{
+ return zipOpenNewFileInZip4_64 (file, filename, zipfi,
+ extrafield_local, size_extrafield_local,
+ extrafield_global, size_extrafield_global,
+ comment, method, level, 0,
+ -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY,
+ NULL, 0, VERSIONMADEBY, 0, zip64);
+}
+
+extern int ZEXPORT zipOpenNewFileInZip (zipFile file, const char* filename, const zip_fileinfo* zipfi,
+ const void* extrafield_local, uInt size_extrafield_local,
+ const void*extrafield_global, uInt size_extrafield_global,
+ const char* comment, int method, int level)
+{
+ return zipOpenNewFileInZip4_64 (file, filename, zipfi,
+ extrafield_local, size_extrafield_local,
+ extrafield_global, size_extrafield_global,
+ comment, method, level, 0,
+ -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY,
+ NULL, 0, VERSIONMADEBY, 0, 0);
+}
+
+local int zip64FlushWriteBuffer(zip64_internal* zi)
+{
+ int err=ZIP_OK;
+
+ if (zi->ci.encrypt != 0)
+ {
+#ifndef NOCRYPT
+ uInt i;
+ int t;
+ for (i=0;i<zi->ci.pos_in_buffered_data;i++)
+ zi->ci.buffered_data[i] = zencode(zi->ci.keys, zi->ci.pcrc_32_tab, zi->ci.buffered_data[i],t);
+#endif
+ }
+
+ if (ZWRITE64(zi->z_filefunc,zi->filestream,zi->ci.buffered_data,zi->ci.pos_in_buffered_data) != zi->ci.pos_in_buffered_data)
+ err = ZIP_ERRNO;
+
+ zi->ci.totalCompressedData += zi->ci.pos_in_buffered_data;
+
+#ifdef HAVE_BZIP2
+ if(zi->ci.method == Z_BZIP2ED)
+ {
+ zi->ci.totalUncompressedData += zi->ci.bstream.total_in_lo32;
+ zi->ci.bstream.total_in_lo32 = 0;
+ zi->ci.bstream.total_in_hi32 = 0;
+ }
+ else
+#endif
+ {
+ zi->ci.totalUncompressedData += zi->ci.stream.total_in;
+ zi->ci.stream.total_in = 0;
+ }
+
+
+ zi->ci.pos_in_buffered_data = 0;
+
+ return err;
+}
+
+extern int ZEXPORT zipWriteInFileInZip (zipFile file,const void* buf,unsigned int len)
+{
+ zip64_internal* zi;
+ int err=ZIP_OK;
+
+ if (file == NULL)
+ return ZIP_PARAMERROR;
+ zi = (zip64_internal*)file;
+
+ if (zi->in_opened_file_inzip == 0)
+ return ZIP_PARAMERROR;
+
+ zi->ci.crc32 = crc32(zi->ci.crc32,buf,(uInt)len);
+
+#ifdef HAVE_BZIP2
+ if(zi->ci.method == Z_BZIP2ED && (!zi->ci.raw))
+ {
+ zi->ci.bstream.next_in = (void*)buf;
+ zi->ci.bstream.avail_in = len;
+ err = BZ_RUN_OK;
+
+ while ((err==BZ_RUN_OK) && (zi->ci.bstream.avail_in>0))
+ {
+ if (zi->ci.bstream.avail_out == 0)
+ {
+ if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO)
+ err = ZIP_ERRNO;
+ zi->ci.bstream.avail_out = (uInt)Z_BUFSIZE;
+ zi->ci.bstream.next_out = (char*)zi->ci.buffered_data;
+ }
+
+
+ if(err != BZ_RUN_OK)
+ break;
+
+ if ((zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw))
+ {
+ uLong uTotalOutBefore_lo = zi->ci.bstream.total_out_lo32;
+// uLong uTotalOutBefore_hi = zi->ci.bstream.total_out_hi32;
+ err=BZ2_bzCompress(&zi->ci.bstream, BZ_RUN);
+
+ zi->ci.pos_in_buffered_data += (uInt)(zi->ci.bstream.total_out_lo32 - uTotalOutBefore_lo) ;
+ }
+ }
+
+ if(err == BZ_RUN_OK)
+ err = ZIP_OK;
+ }
+ else
+#endif
+ {
+ zi->ci.stream.next_in = (Bytef*)buf;
+ zi->ci.stream.avail_in = len;
+
+ while ((err==ZIP_OK) && (zi->ci.stream.avail_in>0))
+ {
+ if (zi->ci.stream.avail_out == 0)
+ {
+ if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO)
+ err = ZIP_ERRNO;
+ zi->ci.stream.avail_out = (uInt)Z_BUFSIZE;
+ zi->ci.stream.next_out = zi->ci.buffered_data;
+ }
+
+
+ if(err != ZIP_OK)
+ break;
+
+ if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw))
+ {
+ uLong uTotalOutBefore = zi->ci.stream.total_out;
+ err=deflate(&zi->ci.stream, Z_NO_FLUSH);
+ if(uTotalOutBefore > zi->ci.stream.total_out)
+ {
+ int bBreak = 0;
+ bBreak++;
+ }
+
+ zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ;
+ }
+ else
+ {
+ uInt copy_this,i;
+ if (zi->ci.stream.avail_in < zi->ci.stream.avail_out)
+ copy_this = zi->ci.stream.avail_in;
+ else
+ copy_this = zi->ci.stream.avail_out;
+
+ for (i = 0; i < copy_this; i++)
+ *(((char*)zi->ci.stream.next_out)+i) =
+ *(((const char*)zi->ci.stream.next_in)+i);
+ {
+ zi->ci.stream.avail_in -= copy_this;
+ zi->ci.stream.avail_out-= copy_this;
+ zi->ci.stream.next_in+= copy_this;
+ zi->ci.stream.next_out+= copy_this;
+ zi->ci.stream.total_in+= copy_this;
+ zi->ci.stream.total_out+= copy_this;
+ zi->ci.pos_in_buffered_data += copy_this;
+ }
+ }
+ }// while(...)
+ }
+
+ return err;
+}
+
+extern int ZEXPORT zipCloseFileInZipRaw (zipFile file, uLong uncompressed_size, uLong crc32)
+{
+ return zipCloseFileInZipRaw64 (file, uncompressed_size, crc32);
+}
+
+extern int ZEXPORT zipCloseFileInZipRaw64 (zipFile file, ZPOS64_T uncompressed_size, uLong crc32)
+{
+ zip64_internal* zi;
+ ZPOS64_T compressed_size;
+ uLong invalidValue = 0xffffffff;
+ short datasize = 0;
+ int err=ZIP_OK;
+
+ if (file == NULL)
+ return ZIP_PARAMERROR;
+ zi = (zip64_internal*)file;
+
+ if (zi->in_opened_file_inzip == 0)
+ return ZIP_PARAMERROR;
+ zi->ci.stream.avail_in = 0;
+
+ if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw))
+ {
+ while (err==ZIP_OK)
+ {
+ uLong uTotalOutBefore;
+ if (zi->ci.stream.avail_out == 0)
+ {
+ if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO)
+ err = ZIP_ERRNO;
+ zi->ci.stream.avail_out = (uInt)Z_BUFSIZE;
+ zi->ci.stream.next_out = zi->ci.buffered_data;
+ }
+ uTotalOutBefore = zi->ci.stream.total_out;
+ err=deflate(&zi->ci.stream, Z_FINISH);
+ zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ;
+ }
+ }
+ else if ((zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw))
+ {
+#ifdef HAVE_BZIP2
+ err = BZ_FINISH_OK;
+ while (err==BZ_FINISH_OK)
+ {
+ uLong uTotalOutBefore;
+ if (zi->ci.bstream.avail_out == 0)
+ {
+ if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO)
+ err = ZIP_ERRNO;
+ zi->ci.bstream.avail_out = (uInt)Z_BUFSIZE;
+ zi->ci.bstream.next_out = (char*)zi->ci.buffered_data;
+ }
+ uTotalOutBefore = zi->ci.bstream.total_out_lo32;
+ err=BZ2_bzCompress(&zi->ci.bstream, BZ_FINISH);
+ if(err == BZ_STREAM_END)
+ err = Z_STREAM_END;
+
+ zi->ci.pos_in_buffered_data += (uInt)(zi->ci.bstream.total_out_lo32 - uTotalOutBefore);
+ }
+
+ if(err == BZ_FINISH_OK)
+ err = ZIP_OK;
+#endif
+ }
+
+ if (err==Z_STREAM_END)
+ err=ZIP_OK; /* this is normal */
+
+ if ((zi->ci.pos_in_buffered_data>0) && (err==ZIP_OK))
+ {
+ if (zip64FlushWriteBuffer(zi)==ZIP_ERRNO)
+ err = ZIP_ERRNO;
+ }
+
+ if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw))
+ {
+ int tmp_err = deflateEnd(&zi->ci.stream);
+ if (err == ZIP_OK)
+ err = tmp_err;
+ zi->ci.stream_initialised = 0;
+ }
+#ifdef HAVE_BZIP2
+ else if((zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw))
+ {
+ int tmperr = BZ2_bzCompressEnd(&zi->ci.bstream);
+ if (err==ZIP_OK)
+ err = tmperr;
+ zi->ci.stream_initialised = 0;
+ }
+#endif
+
+ if (!zi->ci.raw)
+ {
+ crc32 = (uLong)zi->ci.crc32;
+ uncompressed_size = zi->ci.totalUncompressedData;
+ }
+ compressed_size = zi->ci.totalCompressedData;
+
+# ifndef NOCRYPT
+ compressed_size += zi->ci.crypt_header_size;
+# endif
+
+ // update Current Item crc and sizes,
+ if(compressed_size >= 0xffffffff || uncompressed_size >= 0xffffffff || zi->ci.pos_local_header >= 0xffffffff)
+ {
+ /*version Made by*/
+ zip64local_putValue_inmemory(zi->ci.central_header+4,(uLong)45,2);
+ /*version needed*/
+ zip64local_putValue_inmemory(zi->ci.central_header+6,(uLong)45,2);
+
+ }
+
+ zip64local_putValue_inmemory(zi->ci.central_header+16,crc32,4); /*crc*/
+
+
+ if(compressed_size >= 0xffffffff)
+ zip64local_putValue_inmemory(zi->ci.central_header+20, invalidValue,4); /*compr size*/
+ else
+ zip64local_putValue_inmemory(zi->ci.central_header+20, compressed_size,4); /*compr size*/
+
+ /// set internal file attributes field
+ if (zi->ci.stream.data_type == Z_ASCII)
+ zip64local_putValue_inmemory(zi->ci.central_header+36,(uLong)Z_ASCII,2);
+
+ if(uncompressed_size >= 0xffffffff)
+ zip64local_putValue_inmemory(zi->ci.central_header+24, invalidValue,4); /*uncompr size*/
+ else
+ zip64local_putValue_inmemory(zi->ci.central_header+24, uncompressed_size,4); /*uncompr size*/
+
+ // Add ZIP64 extra info field for uncompressed size
+ if(uncompressed_size >= 0xffffffff)
+ datasize += 8;
+
+ // Add ZIP64 extra info field for compressed size
+ if(compressed_size >= 0xffffffff)
+ datasize += 8;
+
+ // Add ZIP64 extra info field for relative offset to local file header of current file
+ if(zi->ci.pos_local_header >= 0xffffffff)
+ datasize += 8;
+
+ if(datasize > 0)
+ {
+ char* p = NULL;
+
+ if((uLong)(datasize + 4) > zi->ci.size_centralExtraFree)
+ {
+ // we can not write more data to the buffer that we have room for.
+ return ZIP_BADZIPFILE;
+ }
+
+ p = zi->ci.central_header + zi->ci.size_centralheader;
+
+ // Add Extra Information Header for 'ZIP64 information'
+ zip64local_putValue_inmemory(p, 0x0001, 2); // HeaderID
+ p += 2;
+ zip64local_putValue_inmemory(p, datasize, 2); // DataSize
+ p += 2;
+
+ if(uncompressed_size >= 0xffffffff)
+ {
+ zip64local_putValue_inmemory(p, uncompressed_size, 8);
+ p += 8;
+ }
+
+ if(compressed_size >= 0xffffffff)
+ {
+ zip64local_putValue_inmemory(p, compressed_size, 8);
+ p += 8;
+ }
+
+ if(zi->ci.pos_local_header >= 0xffffffff)
+ {
+ zip64local_putValue_inmemory(p, zi->ci.pos_local_header, 8);
+ p += 8;
+ }
+
+ // Update how much extra free space we got in the memory buffer
+ // and increase the centralheader size so the new ZIP64 fields are included
+ // ( 4 below is the size of HeaderID and DataSize field )
+ zi->ci.size_centralExtraFree -= datasize + 4;
+ zi->ci.size_centralheader += datasize + 4;
+
+ // Update the extra info size field
+ zi->ci.size_centralExtra += datasize + 4;
+ zip64local_putValue_inmemory(zi->ci.central_header+30,(uLong)zi->ci.size_centralExtra,2);
+ }
+
+ if (err==ZIP_OK)
+ err = add_data_in_datablock(&zi->central_dir, zi->ci.central_header, (uLong)zi->ci.size_centralheader);
+
+ free(zi->ci.central_header);
+
+ if (err==ZIP_OK)
+ {
+ // Update the LocalFileHeader with the new values.
+
+ ZPOS64_T cur_pos_inzip = ZTELL64(zi->z_filefunc,zi->filestream);
+
+ if (ZSEEK64(zi->z_filefunc,zi->filestream, zi->ci.pos_local_header + 14,ZLIB_FILEFUNC_SEEK_SET)!=0)
+ err = ZIP_ERRNO;
+
+ if (err==ZIP_OK)
+ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,crc32,4); /* crc 32, unknown */
+
+ if(uncompressed_size >= 0xffffffff || compressed_size >= 0xffffffff )
+ {
+ if(zi->ci.pos_zip64extrainfo > 0)
+ {
+ // Update the size in the ZIP64 extended field.
+ if (ZSEEK64(zi->z_filefunc,zi->filestream, zi->ci.pos_zip64extrainfo + 4,ZLIB_FILEFUNC_SEEK_SET)!=0)
+ err = ZIP_ERRNO;
+
+ if (err==ZIP_OK) /* compressed size, unknown */
+ err = zip64local_putValue(&zi->z_filefunc, zi->filestream, uncompressed_size, 8);
+
+ if (err==ZIP_OK) /* uncompressed size, unknown */
+ err = zip64local_putValue(&zi->z_filefunc, zi->filestream, compressed_size, 8);
+ }
+ else
+ err = ZIP_BADZIPFILE; // Caller passed zip64 = 0, so no room for zip64 info -> fatal
+ }
+ else
+ {
+ if (err==ZIP_OK) /* compressed size, unknown */
+ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,compressed_size,4);
+
+ if (err==ZIP_OK) /* uncompressed size, unknown */
+ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,uncompressed_size,4);
+ }
+
+ if (ZSEEK64(zi->z_filefunc,zi->filestream, cur_pos_inzip,ZLIB_FILEFUNC_SEEK_SET)!=0)
+ err = ZIP_ERRNO;
+ }
+
+ zi->number_entry ++;
+ zi->in_opened_file_inzip = 0;
+
+ return err;
+}
+
+extern int ZEXPORT zipCloseFileInZip (zipFile file)
+{
+ return zipCloseFileInZipRaw (file,0,0);
+}
+
+int Write_Zip64EndOfCentralDirectoryLocator(zip64_internal* zi, ZPOS64_T zip64eocd_pos_inzip)
+{
+ int err = ZIP_OK;
+ ZPOS64_T pos = zip64eocd_pos_inzip - zi->add_position_when_writing_offset;
+
+ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)ZIP64ENDLOCHEADERMAGIC,4);
+
+ /*num disks*/
+ if (err==ZIP_OK) /* number of the disk with the start of the central directory */
+ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4);
+
+ /*relative offset*/
+ if (err==ZIP_OK) /* Relative offset to the Zip64EndOfCentralDirectory */
+ err = zip64local_putValue(&zi->z_filefunc,zi->filestream, pos,8);
+
+ /*total disks*/ /* Do not support spawning of disk so always say 1 here*/
+ if (err==ZIP_OK) /* number of the disk with the start of the central directory */
+ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)1,4);
+
+ return err;
+}
+
+int Write_Zip64EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip)
+{
+ int err = ZIP_OK;
+
+ uLong Zip64DataSize = 44;
+
+ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)ZIP64ENDHEADERMAGIC,4);
+
+ if (err==ZIP_OK) /* size of this 'zip64 end of central directory' */
+ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(ZPOS64_T)Zip64DataSize,8); // why ZPOS64_T of this ?
+
+ if (err==ZIP_OK) /* version made by */
+ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)45,2);
+
+ if (err==ZIP_OK) /* version needed */
+ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)45,2);
+
+ if (err==ZIP_OK) /* number of this disk */
+ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4);
+
+ if (err==ZIP_OK) /* number of the disk with the start of the central directory */
+ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4);
+
+ if (err==ZIP_OK) /* total number of entries in the central dir on this disk */
+ err = zip64local_putValue(&zi->z_filefunc, zi->filestream, zi->number_entry, 8);
+
+ if (err==ZIP_OK) /* total number of entries in the central dir */
+ err = zip64local_putValue(&zi->z_filefunc, zi->filestream, zi->number_entry, 8);
+
+ if (err==ZIP_OK) /* size of the central directory */
+ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(ZPOS64_T)size_centraldir,8);
+
+ if (err==ZIP_OK) /* offset of start of central directory with respect to the starting disk number */
+ {
+ ZPOS64_T pos = centraldir_pos_inzip - zi->add_position_when_writing_offset;
+ err = zip64local_putValue(&zi->z_filefunc,zi->filestream, (ZPOS64_T)pos,8);
+ }
+ return err;
+}
+int Write_EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip)
+{
+ int err = ZIP_OK;
+
+ /*signature*/
+ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)ENDHEADERMAGIC,4);
+
+ if (err==ZIP_OK) /* number of this disk */
+ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,2);
+
+ if (err==ZIP_OK) /* number of the disk with the start of the central directory */
+ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,2);
+
+ if (err==ZIP_OK) /* total number of entries in the central dir on this disk */
+ {
+ {
+ if(zi->number_entry >= 0xFFFF)
+ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xffff,2); // use value in ZIP64 record
+ else
+ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->number_entry,2);
+ }
+ }
+
+ if (err==ZIP_OK) /* total number of entries in the central dir */
+ {
+ if(zi->number_entry >= 0xFFFF)
+ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xffff,2); // use value in ZIP64 record
+ else
+ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->number_entry,2);
+ }
+
+ if (err==ZIP_OK) /* size of the central directory */
+ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_centraldir,4);
+
+ if (err==ZIP_OK) /* offset of start of central directory with respect to the starting disk number */
+ {
+ ZPOS64_T pos = centraldir_pos_inzip - zi->add_position_when_writing_offset;
+ if(pos >= 0xffffffff)
+ {
+ err = zip64local_putValue(&zi->z_filefunc,zi->filestream, (uLong)0xffffffff,4);
+ }
+ else
+ err = zip64local_putValue(&zi->z_filefunc,zi->filestream, (uLong)(centraldir_pos_inzip - zi->add_position_when_writing_offset),4);
+ }
+
+ return err;
+}
+
+int Write_GlobalComment(zip64_internal* zi, const char* global_comment)
+{
+ int err = ZIP_OK;
+ uInt size_global_comment = 0;
+
+ if(global_comment != NULL)
+ size_global_comment = (uInt)strlen(global_comment);
+
+ err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_global_comment,2);
+
+ if (err == ZIP_OK && size_global_comment > 0)
+ {
+ if (ZWRITE64(zi->z_filefunc,zi->filestream, global_comment, size_global_comment) != size_global_comment)
+ err = ZIP_ERRNO;
+ }
+ return err;
+}
+
+extern int ZEXPORT zipClose (zipFile file, const char* global_comment)
+{
+ zip64_internal* zi;
+ int err = 0;
+ uLong size_centraldir = 0;
+ ZPOS64_T centraldir_pos_inzip;
+ ZPOS64_T pos;
+
+ if (file == NULL)
+ return ZIP_PARAMERROR;
+
+ zi = (zip64_internal*)file;
+
+ if (zi->in_opened_file_inzip == 1)
+ {
+ err = zipCloseFileInZip (file);
+ }
+
+#ifndef NO_ADDFILEINEXISTINGZIP
+ if (global_comment==NULL)
+ global_comment = zi->globalcomment;
+#endif
+
+ centraldir_pos_inzip = ZTELL64(zi->z_filefunc,zi->filestream);
+
+ if (err==ZIP_OK)
+ {
+ linkedlist_datablock_internal* ldi = zi->central_dir.first_block;
+ while (ldi!=NULL)
+ {
+ if ((err==ZIP_OK) && (ldi->filled_in_this_block>0))
+ {
+ if (ZWRITE64(zi->z_filefunc,zi->filestream, ldi->data, ldi->filled_in_this_block) != ldi->filled_in_this_block)
+ err = ZIP_ERRNO;
+ }
+
+ size_centraldir += ldi->filled_in_this_block;
+ ldi = ldi->next_datablock;
+ }
+ }
+ free_linkedlist(&(zi->central_dir));
+
+ pos = centraldir_pos_inzip - zi->add_position_when_writing_offset;
+ if(pos >= 0xffffffff || zi->number_entry > 0xFFFF)
+ {
+ ZPOS64_T Zip64EOCDpos = ZTELL64(zi->z_filefunc,zi->filestream);
+ Write_Zip64EndOfCentralDirectoryRecord(zi, size_centraldir, centraldir_pos_inzip);
+
+ Write_Zip64EndOfCentralDirectoryLocator(zi, Zip64EOCDpos);
+ }
+
+ if (err==ZIP_OK)
+ err = Write_EndOfCentralDirectoryRecord(zi, size_centraldir, centraldir_pos_inzip);
+
+ if(err == ZIP_OK)
+ err = Write_GlobalComment(zi, global_comment);
+
+ if (ZCLOSE64(zi->z_filefunc,zi->filestream) != 0)
+ if (err == ZIP_OK)
+ err = ZIP_ERRNO;
+
+#ifndef NO_ADDFILEINEXISTINGZIP
+ TRYFREE(zi->globalcomment);
+#endif
+ TRYFREE(zi);
+
+ return err;
+}
+
+extern int ZEXPORT zipRemoveExtraInfoBlock (char* pData, int* dataLen, short sHeader)
+{
+ char* p = pData;
+ int size = 0;
+ char* pNewHeader;
+ char* pTmp;
+ short header;
+ short dataSize;
+
+ int retVal = ZIP_OK;
+
+ if(pData == NULL || *dataLen < 4)
+ return ZIP_PARAMERROR;
+
+ pNewHeader = (char*)ALLOC(*dataLen);
+ pTmp = pNewHeader;
+
+ while(p < (pData + *dataLen))
+ {
+ header = *(short*)p;
+ dataSize = *(((short*)p)+1);
+
+ if( header == sHeader ) // Header found.
+ {
+ p += dataSize + 4; // skip it. do not copy to temp buffer
+ }
+ else
+ {
+ // Extra Info block should not be removed, So copy it to the temp buffer.
+ memcpy(pTmp, p, dataSize + 4);
+ p += dataSize + 4;
+ size += dataSize + 4;
+ }
+
+ }
+
+ if(size < *dataLen)
+ {
+ // clean old extra info block.
+ memset(pData,0, *dataLen);
+
+ // copy the new extra info block over the old
+ if(size > 0)
+ memcpy(pData, pNewHeader, size);
+
+ // set the new extra info size
+ *dataLen = size;
+
+ retVal = ZIP_OK;
+ }
+ else
+ retVal = ZIP_ERRNO;
+
+ TRYFREE(pNewHeader);
+
+ return retVal;
+}
diff --git a/contrib/zlib/contrib/minizip/zip.h b/contrib/zlib/contrib/minizip/zip.h
new file mode 100644
index 000000000..8aaebb623
--- /dev/null
+++ b/contrib/zlib/contrib/minizip/zip.h
@@ -0,0 +1,362 @@
+/* zip.h -- IO on .zip files using zlib
+ Version 1.1, February 14h, 2010
+ part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
+
+ Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
+
+ Modifications for Zip64 support
+ Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
+
+ For more info read MiniZip_info.txt
+
+ ---------------------------------------------------------------------------
+
+ Condition of use and distribution are the same than zlib :
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+ ---------------------------------------------------------------------------
+
+ Changes
+
+ See header of zip.h
+
+*/
+
+#ifndef _zip12_H
+#define _zip12_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+//#define HAVE_BZIP2
+
+#ifndef _ZLIB_H
+#include "zlib.h"
+#endif
+
+#ifndef _ZLIBIOAPI_H
+#include "ioapi.h"
+#endif
+
+#ifdef HAVE_BZIP2
+#include "bzlib.h"
+#endif
+
+#define Z_BZIP2ED 12
+
+#if defined(STRICTZIP) || defined(STRICTZIPUNZIP)
+/* like the STRICT of WIN32, we define a pointer that cannot be converted
+ from (void*) without cast */
+typedef struct TagzipFile__ { int unused; } zipFile__;
+typedef zipFile__ *zipFile;
+#else
+typedef voidp zipFile;
+#endif
+
+#define ZIP_OK (0)
+#define ZIP_EOF (0)
+#define ZIP_ERRNO (Z_ERRNO)
+#define ZIP_PARAMERROR (-102)
+#define ZIP_BADZIPFILE (-103)
+#define ZIP_INTERNALERROR (-104)
+
+#ifndef DEF_MEM_LEVEL
+# if MAX_MEM_LEVEL >= 8
+# define DEF_MEM_LEVEL 8
+# else
+# define DEF_MEM_LEVEL MAX_MEM_LEVEL
+# endif
+#endif
+/* default memLevel */
+
+/* tm_zip contain date/time info */
+typedef struct tm_zip_s
+{
+ uInt tm_sec; /* seconds after the minute - [0,59] */
+ uInt tm_min; /* minutes after the hour - [0,59] */
+ uInt tm_hour; /* hours since midnight - [0,23] */
+ uInt tm_mday; /* day of the month - [1,31] */
+ uInt tm_mon; /* months since January - [0,11] */
+ uInt tm_year; /* years - [1980..2044] */
+} tm_zip;
+
+typedef struct
+{
+ tm_zip tmz_date; /* date in understandable format */
+ uLong dosDate; /* if dos_date == 0, tmu_date is used */
+/* uLong flag; */ /* general purpose bit flag 2 bytes */
+
+ uLong internal_fa; /* internal file attributes 2 bytes */
+ uLong external_fa; /* external file attributes 4 bytes */
+} zip_fileinfo;
+
+typedef const char* zipcharpc;
+
+
+#define APPEND_STATUS_CREATE (0)
+#define APPEND_STATUS_CREATEAFTER (1)
+#define APPEND_STATUS_ADDINZIP (2)
+
+extern zipFile ZEXPORT zipOpen OF((const char *pathname, int append));
+extern zipFile ZEXPORT zipOpen64 OF((const void *pathname, int append));
+/*
+ Create a zipfile.
+ pathname contain on Windows XP a filename like "c:\\zlib\\zlib113.zip" or on
+ an Unix computer "zlib/zlib113.zip".
+ if the file pathname exist and append==APPEND_STATUS_CREATEAFTER, the zip
+ will be created at the end of the file.
+ (useful if the file contain a self extractor code)
+ if the file pathname exist and append==APPEND_STATUS_ADDINZIP, we will
+ add files in existing zip (be sure you don't add file that doesn't exist)
+ If the zipfile cannot be opened, the return value is NULL.
+ Else, the return value is a zipFile Handle, usable with other function
+ of this zip package.
+*/
+
+/* Note : there is no delete function into a zipfile.
+ If you want delete file into a zipfile, you must open a zipfile, and create another
+ Of couse, you can use RAW reading and writing to copy the file you did not want delte
+*/
+
+extern zipFile ZEXPORT zipOpen2 OF((const char *pathname,
+ int append,
+ zipcharpc* globalcomment,
+ zlib_filefunc_def* pzlib_filefunc_def));
+
+extern zipFile ZEXPORT zipOpen2_64 OF((const void *pathname,
+ int append,
+ zipcharpc* globalcomment,
+ zlib_filefunc64_def* pzlib_filefunc_def));
+
+extern int ZEXPORT zipOpenNewFileInZip OF((zipFile file,
+ const char* filename,
+ const zip_fileinfo* zipfi,
+ const void* extrafield_local,
+ uInt size_extrafield_local,
+ const void* extrafield_global,
+ uInt size_extrafield_global,
+ const char* comment,
+ int method,
+ int level));
+
+extern int ZEXPORT zipOpenNewFileInZip64 OF((zipFile file,
+ const char* filename,
+ const zip_fileinfo* zipfi,
+ const void* extrafield_local,
+ uInt size_extrafield_local,
+ const void* extrafield_global,
+ uInt size_extrafield_global,
+ const char* comment,
+ int method,
+ int level,
+ int zip64));
+
+/*
+ Open a file in the ZIP for writing.
+ filename : the filename in zip (if NULL, '-' without quote will be used
+ *zipfi contain supplemental information
+ if extrafield_local!=NULL and size_extrafield_local>0, extrafield_local
+ contains the extrafield data the the local header
+ if extrafield_global!=NULL and size_extrafield_global>0, extrafield_global
+ contains the extrafield data the the local header
+ if comment != NULL, comment contain the comment string
+ method contain the compression method (0 for store, Z_DEFLATED for deflate)
+ level contain the level of compression (can be Z_DEFAULT_COMPRESSION)
+ zip64 is set to 1 if a zip64 extended information block should be added to the local file header.
+ this MUST be '1' if the uncompressed size is >= 0xffffffff.
+
+*/
+
+
+extern int ZEXPORT zipOpenNewFileInZip2 OF((zipFile file,
+ const char* filename,
+ const zip_fileinfo* zipfi,
+ const void* extrafield_local,
+ uInt size_extrafield_local,
+ const void* extrafield_global,
+ uInt size_extrafield_global,
+ const char* comment,
+ int method,
+ int level,
+ int raw));
+
+
+extern int ZEXPORT zipOpenNewFileInZip2_64 OF((zipFile file,
+ const char* filename,
+ const zip_fileinfo* zipfi,
+ const void* extrafield_local,
+ uInt size_extrafield_local,
+ const void* extrafield_global,
+ uInt size_extrafield_global,
+ const char* comment,
+ int method,
+ int level,
+ int raw,
+ int zip64));
+/*
+ Same than zipOpenNewFileInZip, except if raw=1, we write raw file
+ */
+
+extern int ZEXPORT zipOpenNewFileInZip3 OF((zipFile file,
+ const char* filename,
+ const zip_fileinfo* zipfi,
+ const void* extrafield_local,
+ uInt size_extrafield_local,
+ const void* extrafield_global,
+ uInt size_extrafield_global,
+ const char* comment,
+ int method,
+ int level,
+ int raw,
+ int windowBits,
+ int memLevel,
+ int strategy,
+ const char* password,
+ uLong crcForCrypting));
+
+extern int ZEXPORT zipOpenNewFileInZip3_64 OF((zipFile file,
+ const char* filename,
+ const zip_fileinfo* zipfi,
+ const void* extrafield_local,
+ uInt size_extrafield_local,
+ const void* extrafield_global,
+ uInt size_extrafield_global,
+ const char* comment,
+ int method,
+ int level,
+ int raw,
+ int windowBits,
+ int memLevel,
+ int strategy,
+ const char* password,
+ uLong crcForCrypting,
+ int zip64
+ ));
+
+/*
+ Same than zipOpenNewFileInZip2, except
+ windowBits,memLevel,,strategy : see parameter strategy in deflateInit2
+ password : crypting password (NULL for no crypting)
+ crcForCrypting : crc of file to compress (needed for crypting)
+ */
+
+extern int ZEXPORT zipOpenNewFileInZip4 OF((zipFile file,
+ const char* filename,
+ const zip_fileinfo* zipfi,
+ const void* extrafield_local,
+ uInt size_extrafield_local,
+ const void* extrafield_global,
+ uInt size_extrafield_global,
+ const char* comment,
+ int method,
+ int level,
+ int raw,
+ int windowBits,
+ int memLevel,
+ int strategy,
+ const char* password,
+ uLong crcForCrypting,
+ uLong versionMadeBy,
+ uLong flagBase
+ ));
+
+
+extern int ZEXPORT zipOpenNewFileInZip4_64 OF((zipFile file,
+ const char* filename,
+ const zip_fileinfo* zipfi,
+ const void* extrafield_local,
+ uInt size_extrafield_local,
+ const void* extrafield_global,
+ uInt size_extrafield_global,
+ const char* comment,
+ int method,
+ int level,
+ int raw,
+ int windowBits,
+ int memLevel,
+ int strategy,
+ const char* password,
+ uLong crcForCrypting,
+ uLong versionMadeBy,
+ uLong flagBase,
+ int zip64
+ ));
+/*
+ Same than zipOpenNewFileInZip4, except
+ versionMadeBy : value for Version made by field
+ flag : value for flag field (compression level info will be added)
+ */
+
+
+extern int ZEXPORT zipWriteInFileInZip OF((zipFile file,
+ const void* buf,
+ unsigned len));
+/*
+ Write data in the zipfile
+*/
+
+extern int ZEXPORT zipCloseFileInZip OF((zipFile file));
+/*
+ Close the current file in the zipfile
+*/
+
+extern int ZEXPORT zipCloseFileInZipRaw OF((zipFile file,
+ uLong uncompressed_size,
+ uLong crc32));
+
+extern int ZEXPORT zipCloseFileInZipRaw64 OF((zipFile file,
+ ZPOS64_T uncompressed_size,
+ uLong crc32));
+
+/*
+ Close the current file in the zipfile, for file opened with
+ parameter raw=1 in zipOpenNewFileInZip2
+ uncompressed_size and crc32 are value for the uncompressed size
+*/
+
+extern int ZEXPORT zipClose OF((zipFile file,
+ const char* global_comment));
+/*
+ Close the zipfile
+*/
+
+
+extern int ZEXPORT zipRemoveExtraInfoBlock OF((char* pData, int* dataLen, short sHeader));
+/*
+ zipRemoveExtraInfoBlock - Added by Mathias Svensson
+
+ Remove extra information block from a extra information data for the local file header or central directory header
+
+ It is needed to remove ZIP64 extra information blocks when before data is written if using RAW mode.
+
+ 0x0001 is the signature header for the ZIP64 extra information blocks
+
+ usage.
+ Remove ZIP64 Extra information from a central director extra field data
+ zipRemoveExtraInfoBlock(pCenDirExtraFieldData, &nCenDirExtraFieldDataLen, 0x0001);
+
+ Remove ZIP64 Extra information from a Local File Header extra field data
+ zipRemoveExtraInfoBlock(pLocalHeaderExtraFieldData, &nLocalHeaderExtraFieldDataLen, 0x0001);
+*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _zip64_H */
diff --git a/contrib/zlib/contrib/pascal/example.pas b/contrib/zlib/contrib/pascal/example.pas
new file mode 100644
index 000000000..5518b36a7
--- /dev/null
+++ b/contrib/zlib/contrib/pascal/example.pas
@@ -0,0 +1,599 @@
+(* example.c -- usage example of the zlib compression library
+ * Copyright (C) 1995-2003 Jean-loup Gailly.
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ *
+ * Pascal translation
+ * Copyright (C) 1998 by Jacques Nomssi Nzali.
+ * For conditions of distribution and use, see copyright notice in readme.txt
+ *
+ * Adaptation to the zlibpas interface
+ * Copyright (C) 2003 by Cosmin Truta.
+ * For conditions of distribution and use, see copyright notice in readme.txt
+ *)
+
+program example;
+
+{$DEFINE TEST_COMPRESS}
+{DO NOT $DEFINE TEST_GZIO}
+{$DEFINE TEST_DEFLATE}
+{$DEFINE TEST_INFLATE}
+{$DEFINE TEST_FLUSH}
+{$DEFINE TEST_SYNC}
+{$DEFINE TEST_DICT}
+
+uses SysUtils, zlibpas;
+
+const TESTFILE = 'foo.gz';
+
+(* "hello world" would be more standard, but the repeated "hello"
+ * stresses the compression code better, sorry...
+ *)
+const hello: PChar = 'hello, hello!';
+
+const dictionary: PChar = 'hello';
+
+var dictId: LongInt; (* Adler32 value of the dictionary *)
+
+procedure CHECK_ERR(err: Integer; msg: String);
+begin
+ if err <> Z_OK then
+ begin
+ WriteLn(msg, ' error: ', err);
+ Halt(1);
+ end;
+end;
+
+procedure EXIT_ERR(const msg: String);
+begin
+ WriteLn('Error: ', msg);
+ Halt(1);
+end;
+
+(* ===========================================================================
+ * Test compress and uncompress
+ *)
+{$IFDEF TEST_COMPRESS}
+procedure test_compress(compr: Pointer; comprLen: LongInt;
+ uncompr: Pointer; uncomprLen: LongInt);
+var err: Integer;
+ len: LongInt;
+begin
+ len := StrLen(hello)+1;
+
+ err := compress(compr, comprLen, hello, len);
+ CHECK_ERR(err, 'compress');
+
+ StrCopy(PChar(uncompr), 'garbage');
+
+ err := uncompress(uncompr, uncomprLen, compr, comprLen);
+ CHECK_ERR(err, 'uncompress');
+
+ if StrComp(PChar(uncompr), hello) <> 0 then
+ EXIT_ERR('bad uncompress')
+ else
+ WriteLn('uncompress(): ', PChar(uncompr));
+end;
+{$ENDIF}
+
+(* ===========================================================================
+ * Test read/write of .gz files
+ *)
+{$IFDEF TEST_GZIO}
+procedure test_gzio(const fname: PChar; (* compressed file name *)
+ uncompr: Pointer;
+ uncomprLen: LongInt);
+var err: Integer;
+ len: Integer;
+ zfile: gzFile;
+ pos: LongInt;
+begin
+ len := StrLen(hello)+1;
+
+ zfile := gzopen(fname, 'wb');
+ if zfile = NIL then
+ begin
+ WriteLn('gzopen error');
+ Halt(1);
+ end;
+ gzputc(zfile, 'h');
+ if gzputs(zfile, 'ello') <> 4 then
+ begin
+ WriteLn('gzputs err: ', gzerror(zfile, err));
+ Halt(1);
+ end;
+ {$IFDEF GZ_FORMAT_STRING}
+ if gzprintf(zfile, ', %s!', 'hello') <> 8 then
+ begin
+ WriteLn('gzprintf err: ', gzerror(zfile, err));
+ Halt(1);
+ end;
+ {$ELSE}
+ if gzputs(zfile, ', hello!') <> 8 then
+ begin
+ WriteLn('gzputs err: ', gzerror(zfile, err));
+ Halt(1);
+ end;
+ {$ENDIF}
+ gzseek(zfile, 1, SEEK_CUR); (* add one zero byte *)
+ gzclose(zfile);
+
+ zfile := gzopen(fname, 'rb');
+ if zfile = NIL then
+ begin
+ WriteLn('gzopen error');
+ Halt(1);
+ end;
+
+ StrCopy(PChar(uncompr), 'garbage');
+
+ if gzread(zfile, uncompr, uncomprLen) <> len then
+ begin
+ WriteLn('gzread err: ', gzerror(zfile, err));
+ Halt(1);
+ end;
+ if StrComp(PChar(uncompr), hello) <> 0 then
+ begin
+ WriteLn('bad gzread: ', PChar(uncompr));
+ Halt(1);
+ end
+ else
+ WriteLn('gzread(): ', PChar(uncompr));
+
+ pos := gzseek(zfile, -8, SEEK_CUR);
+ if (pos <> 6) or (gztell(zfile) <> pos) then
+ begin
+ WriteLn('gzseek error, pos=', pos, ', gztell=', gztell(zfile));
+ Halt(1);
+ end;
+
+ if gzgetc(zfile) <> ' ' then
+ begin
+ WriteLn('gzgetc error');
+ Halt(1);
+ end;
+
+ if gzungetc(' ', zfile) <> ' ' then
+ begin
+ WriteLn('gzungetc error');
+ Halt(1);
+ end;
+
+ gzgets(zfile, PChar(uncompr), uncomprLen);
+ uncomprLen := StrLen(PChar(uncompr));
+ if uncomprLen <> 7 then (* " hello!" *)
+ begin
+ WriteLn('gzgets err after gzseek: ', gzerror(zfile, err));
+ Halt(1);
+ end;
+ if StrComp(PChar(uncompr), hello + 6) <> 0 then
+ begin
+ WriteLn('bad gzgets after gzseek');
+ Halt(1);
+ end
+ else
+ WriteLn('gzgets() after gzseek: ', PChar(uncompr));
+
+ gzclose(zfile);
+end;
+{$ENDIF}
+
+(* ===========================================================================
+ * Test deflate with small buffers
+ *)
+{$IFDEF TEST_DEFLATE}
+procedure test_deflate(compr: Pointer; comprLen: LongInt);
+var c_stream: z_stream; (* compression stream *)
+ err: Integer;
+ len: LongInt;
+begin
+ len := StrLen(hello)+1;
+
+ c_stream.zalloc := NIL;
+ c_stream.zfree := NIL;
+ c_stream.opaque := NIL;
+
+ err := deflateInit(c_stream, Z_DEFAULT_COMPRESSION);
+ CHECK_ERR(err, 'deflateInit');
+
+ c_stream.next_in := hello;
+ c_stream.next_out := compr;
+
+ while (c_stream.total_in <> len) and
+ (c_stream.total_out < comprLen) do
+ begin
+ c_stream.avail_out := 1; { force small buffers }
+ c_stream.avail_in := 1;
+ err := deflate(c_stream, Z_NO_FLUSH);
+ CHECK_ERR(err, 'deflate');
+ end;
+
+ (* Finish the stream, still forcing small buffers: *)
+ while TRUE do
+ begin
+ c_stream.avail_out := 1;
+ err := deflate(c_stream, Z_FINISH);
+ if err = Z_STREAM_END then
+ break;
+ CHECK_ERR(err, 'deflate');
+ end;
+
+ err := deflateEnd(c_stream);
+ CHECK_ERR(err, 'deflateEnd');
+end;
+{$ENDIF}
+
+(* ===========================================================================
+ * Test inflate with small buffers
+ *)
+{$IFDEF TEST_INFLATE}
+procedure test_inflate(compr: Pointer; comprLen : LongInt;
+ uncompr: Pointer; uncomprLen : LongInt);
+var err: Integer;
+ d_stream: z_stream; (* decompression stream *)
+begin
+ StrCopy(PChar(uncompr), 'garbage');
+
+ d_stream.zalloc := NIL;
+ d_stream.zfree := NIL;
+ d_stream.opaque := NIL;
+
+ d_stream.next_in := compr;
+ d_stream.avail_in := 0;
+ d_stream.next_out := uncompr;
+
+ err := inflateInit(d_stream);
+ CHECK_ERR(err, 'inflateInit');
+
+ while (d_stream.total_out < uncomprLen) and
+ (d_stream.total_in < comprLen) do
+ begin
+ d_stream.avail_out := 1; (* force small buffers *)
+ d_stream.avail_in := 1;
+ err := inflate(d_stream, Z_NO_FLUSH);
+ if err = Z_STREAM_END then
+ break;
+ CHECK_ERR(err, 'inflate');
+ end;
+
+ err := inflateEnd(d_stream);
+ CHECK_ERR(err, 'inflateEnd');
+
+ if StrComp(PChar(uncompr), hello) <> 0 then
+ EXIT_ERR('bad inflate')
+ else
+ WriteLn('inflate(): ', PChar(uncompr));
+end;
+{$ENDIF}
+
+(* ===========================================================================
+ * Test deflate with large buffers and dynamic change of compression level
+ *)
+{$IFDEF TEST_DEFLATE}
+procedure test_large_deflate(compr: Pointer; comprLen: LongInt;
+ uncompr: Pointer; uncomprLen: LongInt);
+var c_stream: z_stream; (* compression stream *)
+ err: Integer;
+begin
+ c_stream.zalloc := NIL;
+ c_stream.zfree := NIL;
+ c_stream.opaque := NIL;
+
+ err := deflateInit(c_stream, Z_BEST_SPEED);
+ CHECK_ERR(err, 'deflateInit');
+
+ c_stream.next_out := compr;
+ c_stream.avail_out := Integer(comprLen);
+
+ (* At this point, uncompr is still mostly zeroes, so it should compress
+ * very well:
+ *)
+ c_stream.next_in := uncompr;
+ c_stream.avail_in := Integer(uncomprLen);
+ err := deflate(c_stream, Z_NO_FLUSH);
+ CHECK_ERR(err, 'deflate');
+ if c_stream.avail_in <> 0 then
+ EXIT_ERR('deflate not greedy');
+
+ (* Feed in already compressed data and switch to no compression: *)
+ deflateParams(c_stream, Z_NO_COMPRESSION, Z_DEFAULT_STRATEGY);
+ c_stream.next_in := compr;
+ c_stream.avail_in := Integer(comprLen div 2);
+ err := deflate(c_stream, Z_NO_FLUSH);
+ CHECK_ERR(err, 'deflate');
+
+ (* Switch back to compressing mode: *)
+ deflateParams(c_stream, Z_BEST_COMPRESSION, Z_FILTERED);
+ c_stream.next_in := uncompr;
+ c_stream.avail_in := Integer(uncomprLen);
+ err := deflate(c_stream, Z_NO_FLUSH);
+ CHECK_ERR(err, 'deflate');
+
+ err := deflate(c_stream, Z_FINISH);
+ if err <> Z_STREAM_END then
+ EXIT_ERR('deflate should report Z_STREAM_END');
+
+ err := deflateEnd(c_stream);
+ CHECK_ERR(err, 'deflateEnd');
+end;
+{$ENDIF}
+
+(* ===========================================================================
+ * Test inflate with large buffers
+ *)
+{$IFDEF TEST_INFLATE}
+procedure test_large_inflate(compr: Pointer; comprLen: LongInt;
+ uncompr: Pointer; uncomprLen: LongInt);
+var err: Integer;
+ d_stream: z_stream; (* decompression stream *)
+begin
+ StrCopy(PChar(uncompr), 'garbage');
+
+ d_stream.zalloc := NIL;
+ d_stream.zfree := NIL;
+ d_stream.opaque := NIL;
+
+ d_stream.next_in := compr;
+ d_stream.avail_in := Integer(comprLen);
+
+ err := inflateInit(d_stream);
+ CHECK_ERR(err, 'inflateInit');
+
+ while TRUE do
+ begin
+ d_stream.next_out := uncompr; (* discard the output *)
+ d_stream.avail_out := Integer(uncomprLen);
+ err := inflate(d_stream, Z_NO_FLUSH);
+ if err = Z_STREAM_END then
+ break;
+ CHECK_ERR(err, 'large inflate');
+ end;
+
+ err := inflateEnd(d_stream);
+ CHECK_ERR(err, 'inflateEnd');
+
+ if d_stream.total_out <> 2 * uncomprLen + comprLen div 2 then
+ begin
+ WriteLn('bad large inflate: ', d_stream.total_out);
+ Halt(1);
+ end
+ else
+ WriteLn('large_inflate(): OK');
+end;
+{$ENDIF}
+
+(* ===========================================================================
+ * Test deflate with full flush
+ *)
+{$IFDEF TEST_FLUSH}
+procedure test_flush(compr: Pointer; var comprLen : LongInt);
+var c_stream: z_stream; (* compression stream *)
+ err: Integer;
+ len: Integer;
+begin
+ len := StrLen(hello)+1;
+
+ c_stream.zalloc := NIL;
+ c_stream.zfree := NIL;
+ c_stream.opaque := NIL;
+
+ err := deflateInit(c_stream, Z_DEFAULT_COMPRESSION);
+ CHECK_ERR(err, 'deflateInit');
+
+ c_stream.next_in := hello;
+ c_stream.next_out := compr;
+ c_stream.avail_in := 3;
+ c_stream.avail_out := Integer(comprLen);
+ err := deflate(c_stream, Z_FULL_FLUSH);
+ CHECK_ERR(err, 'deflate');
+
+ Inc(PByteArray(compr)^[3]); (* force an error in first compressed block *)
+ c_stream.avail_in := len - 3;
+
+ err := deflate(c_stream, Z_FINISH);
+ if err <> Z_STREAM_END then
+ CHECK_ERR(err, 'deflate');
+
+ err := deflateEnd(c_stream);
+ CHECK_ERR(err, 'deflateEnd');
+
+ comprLen := c_stream.total_out;
+end;
+{$ENDIF}
+
+(* ===========================================================================
+ * Test inflateSync()
+ *)
+{$IFDEF TEST_SYNC}
+procedure test_sync(compr: Pointer; comprLen: LongInt;
+ uncompr: Pointer; uncomprLen : LongInt);
+var err: Integer;
+ d_stream: z_stream; (* decompression stream *)
+begin
+ StrCopy(PChar(uncompr), 'garbage');
+
+ d_stream.zalloc := NIL;
+ d_stream.zfree := NIL;
+ d_stream.opaque := NIL;
+
+ d_stream.next_in := compr;
+ d_stream.avail_in := 2; (* just read the zlib header *)
+
+ err := inflateInit(d_stream);
+ CHECK_ERR(err, 'inflateInit');
+
+ d_stream.next_out := uncompr;
+ d_stream.avail_out := Integer(uncomprLen);
+
+ inflate(d_stream, Z_NO_FLUSH);
+ CHECK_ERR(err, 'inflate');
+
+ d_stream.avail_in := Integer(comprLen-2); (* read all compressed data *)
+ err := inflateSync(d_stream); (* but skip the damaged part *)
+ CHECK_ERR(err, 'inflateSync');
+
+ err := inflate(d_stream, Z_FINISH);
+ if err <> Z_DATA_ERROR then
+ EXIT_ERR('inflate should report DATA_ERROR');
+ (* Because of incorrect adler32 *)
+
+ err := inflateEnd(d_stream);
+ CHECK_ERR(err, 'inflateEnd');
+
+ WriteLn('after inflateSync(): hel', PChar(uncompr));
+end;
+{$ENDIF}
+
+(* ===========================================================================
+ * Test deflate with preset dictionary
+ *)
+{$IFDEF TEST_DICT}
+procedure test_dict_deflate(compr: Pointer; comprLen: LongInt);
+var c_stream: z_stream; (* compression stream *)
+ err: Integer;
+begin
+ c_stream.zalloc := NIL;
+ c_stream.zfree := NIL;
+ c_stream.opaque := NIL;
+
+ err := deflateInit(c_stream, Z_BEST_COMPRESSION);
+ CHECK_ERR(err, 'deflateInit');
+
+ err := deflateSetDictionary(c_stream, dictionary, StrLen(dictionary));
+ CHECK_ERR(err, 'deflateSetDictionary');
+
+ dictId := c_stream.adler;
+ c_stream.next_out := compr;
+ c_stream.avail_out := Integer(comprLen);
+
+ c_stream.next_in := hello;
+ c_stream.avail_in := StrLen(hello)+1;
+
+ err := deflate(c_stream, Z_FINISH);
+ if err <> Z_STREAM_END then
+ EXIT_ERR('deflate should report Z_STREAM_END');
+
+ err := deflateEnd(c_stream);
+ CHECK_ERR(err, 'deflateEnd');
+end;
+{$ENDIF}
+
+(* ===========================================================================
+ * Test inflate with a preset dictionary
+ *)
+{$IFDEF TEST_DICT}
+procedure test_dict_inflate(compr: Pointer; comprLen: LongInt;
+ uncompr: Pointer; uncomprLen: LongInt);
+var err: Integer;
+ d_stream: z_stream; (* decompression stream *)
+begin
+ StrCopy(PChar(uncompr), 'garbage');
+
+ d_stream.zalloc := NIL;
+ d_stream.zfree := NIL;
+ d_stream.opaque := NIL;
+
+ d_stream.next_in := compr;
+ d_stream.avail_in := Integer(comprLen);
+
+ err := inflateInit(d_stream);
+ CHECK_ERR(err, 'inflateInit');
+
+ d_stream.next_out := uncompr;
+ d_stream.avail_out := Integer(uncomprLen);
+
+ while TRUE do
+ begin
+ err := inflate(d_stream, Z_NO_FLUSH);
+ if err = Z_STREAM_END then
+ break;
+ if err = Z_NEED_DICT then
+ begin
+ if d_stream.adler <> dictId then
+ EXIT_ERR('unexpected dictionary');
+ err := inflateSetDictionary(d_stream, dictionary, StrLen(dictionary));
+ end;
+ CHECK_ERR(err, 'inflate with dict');
+ end;
+
+ err := inflateEnd(d_stream);
+ CHECK_ERR(err, 'inflateEnd');
+
+ if StrComp(PChar(uncompr), hello) <> 0 then
+ EXIT_ERR('bad inflate with dict')
+ else
+ WriteLn('inflate with dictionary: ', PChar(uncompr));
+end;
+{$ENDIF}
+
+var compr, uncompr: Pointer;
+ comprLen, uncomprLen: LongInt;
+
+begin
+ if zlibVersion^ <> ZLIB_VERSION[1] then
+ EXIT_ERR('Incompatible zlib version');
+
+ WriteLn('zlib version: ', zlibVersion);
+ WriteLn('zlib compile flags: ', Format('0x%x', [zlibCompileFlags]));
+
+ comprLen := 10000 * SizeOf(Integer); (* don't overflow on MSDOS *)
+ uncomprLen := comprLen;
+ GetMem(compr, comprLen);
+ GetMem(uncompr, uncomprLen);
+ if (compr = NIL) or (uncompr = NIL) then
+ EXIT_ERR('Out of memory');
+ (* compr and uncompr are cleared to avoid reading uninitialized
+ * data and to ensure that uncompr compresses well.
+ *)
+ FillChar(compr^, comprLen, 0);
+ FillChar(uncompr^, uncomprLen, 0);
+
+ {$IFDEF TEST_COMPRESS}
+ WriteLn('** Testing compress');
+ test_compress(compr, comprLen, uncompr, uncomprLen);
+ {$ENDIF}
+
+ {$IFDEF TEST_GZIO}
+ WriteLn('** Testing gzio');
+ if ParamCount >= 1 then
+ test_gzio(ParamStr(1), uncompr, uncomprLen)
+ else
+ test_gzio(TESTFILE, uncompr, uncomprLen);
+ {$ENDIF}
+
+ {$IFDEF TEST_DEFLATE}
+ WriteLn('** Testing deflate with small buffers');
+ test_deflate(compr, comprLen);
+ {$ENDIF}
+ {$IFDEF TEST_INFLATE}
+ WriteLn('** Testing inflate with small buffers');
+ test_inflate(compr, comprLen, uncompr, uncomprLen);
+ {$ENDIF}
+
+ {$IFDEF TEST_DEFLATE}
+ WriteLn('** Testing deflate with large buffers');
+ test_large_deflate(compr, comprLen, uncompr, uncomprLen);
+ {$ENDIF}
+ {$IFDEF TEST_INFLATE}
+ WriteLn('** Testing inflate with large buffers');
+ test_large_inflate(compr, comprLen, uncompr, uncomprLen);
+ {$ENDIF}
+
+ {$IFDEF TEST_FLUSH}
+ WriteLn('** Testing deflate with full flush');
+ test_flush(compr, comprLen);
+ {$ENDIF}
+ {$IFDEF TEST_SYNC}
+ WriteLn('** Testing inflateSync');
+ test_sync(compr, comprLen, uncompr, uncomprLen);
+ {$ENDIF}
+ comprLen := uncomprLen;
+
+ {$IFDEF TEST_DICT}
+ WriteLn('** Testing deflate and inflate with preset dictionary');
+ test_dict_deflate(compr, comprLen);
+ test_dict_inflate(compr, comprLen, uncompr, uncomprLen);
+ {$ENDIF}
+
+ FreeMem(compr, comprLen);
+ FreeMem(uncompr, uncomprLen);
+end.
diff --git a/contrib/zlib/contrib/pascal/readme.txt b/contrib/zlib/contrib/pascal/readme.txt
new file mode 100644
index 000000000..60e87c8a3
--- /dev/null
+++ b/contrib/zlib/contrib/pascal/readme.txt
@@ -0,0 +1,76 @@
+
+This directory contains a Pascal (Delphi, Kylix) interface to the
+zlib data compression library.
+
+
+Directory listing
+=================
+
+zlibd32.mak makefile for Borland C++
+example.pas usage example of zlib
+zlibpas.pas the Pascal interface to zlib
+readme.txt this file
+
+
+Compatibility notes
+===================
+
+- Although the name "zlib" would have been more normal for the
+ zlibpas unit, this name is already taken by Borland's ZLib unit.
+ This is somehow unfortunate, because that unit is not a genuine
+ interface to the full-fledged zlib functionality, but a suite of
+ class wrappers around zlib streams. Other essential features,
+ such as checksums, are missing.
+ It would have been more appropriate for that unit to have a name
+ like "ZStreams", or something similar.
+
+- The C and zlib-supplied types int, uInt, long, uLong, etc. are
+ translated directly into Pascal types of similar sizes (Integer,
+ LongInt, etc.), to avoid namespace pollution. In particular,
+ there is no conversion of unsigned int into a Pascal unsigned
+ integer. The Word type is non-portable and has the same size
+ (16 bits) both in a 16-bit and in a 32-bit environment, unlike
+ Integer. Even if there is a 32-bit Cardinal type, there is no
+ real need for unsigned int in zlib under a 32-bit environment.
+
+- Except for the callbacks, the zlib function interfaces are
+ assuming the calling convention normally used in Pascal
+ (__pascal for DOS and Windows16, __fastcall for Windows32).
+ Since the cdecl keyword is used, the old Turbo Pascal does
+ not work with this interface.
+
+- The gz* function interfaces are not translated, to avoid
+ interfacing problems with the C runtime library. Besides,
+ gzprintf(gzFile file, const char *format, ...)
+ cannot be translated into Pascal.
+
+
+Legal issues
+============
+
+The zlibpas interface is:
+ Copyright (C) 1995-2003 Jean-loup Gailly and Mark Adler.
+ Copyright (C) 1998 by Bob Dellaca.
+ Copyright (C) 2003 by Cosmin Truta.
+
+The example program is:
+ Copyright (C) 1995-2003 by Jean-loup Gailly.
+ Copyright (C) 1998,1999,2000 by Jacques Nomssi Nzali.
+ Copyright (C) 2003 by Cosmin Truta.
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the author be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
diff --git a/contrib/zlib/contrib/pascal/zlibd32.mak b/contrib/zlib/contrib/pascal/zlibd32.mak
new file mode 100644
index 000000000..9bb00b7cc
--- /dev/null
+++ b/contrib/zlib/contrib/pascal/zlibd32.mak
@@ -0,0 +1,99 @@
+# Makefile for zlib
+# For use with Delphi and C++ Builder under Win32
+# Updated for zlib 1.2.x by Cosmin Truta
+
+# ------------ Borland C++ ------------
+
+# This project uses the Delphi (fastcall/register) calling convention:
+LOC = -DZEXPORT=__fastcall -DZEXPORTVA=__cdecl
+
+CC = bcc32
+LD = bcc32
+AR = tlib
+# do not use "-pr" in CFLAGS
+CFLAGS = -a -d -k- -O2 $(LOC)
+LDFLAGS =
+
+
+# variables
+ZLIB_LIB = zlib.lib
+
+OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj
+OBJ2 = gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
+OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzclose.obj+gzlib.obj+gzread.obj
+OBJP2 = +gzwrite.obj+infback.obj+inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj
+
+
+# targets
+all: $(ZLIB_LIB) example.exe minigzip.exe
+
+.c.obj:
+ $(CC) -c $(CFLAGS) $*.c
+
+adler32.obj: adler32.c zlib.h zconf.h
+
+compress.obj: compress.c zlib.h zconf.h
+
+crc32.obj: crc32.c zlib.h zconf.h crc32.h
+
+deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
+
+gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h
+
+gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h
+
+gzread.obj: gzread.c zlib.h zconf.h gzguts.h
+
+gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h
+
+infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
+ inffast.h inffixed.h
+
+inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
+ inffast.h
+
+inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
+ inffast.h inffixed.h
+
+inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
+
+trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
+
+uncompr.obj: uncompr.c zlib.h zconf.h
+
+zutil.obj: zutil.c zutil.h zlib.h zconf.h
+
+example.obj: test/example.c zlib.h zconf.h
+
+minigzip.obj: test/minigzip.c zlib.h zconf.h
+
+
+# For the sake of the old Borland make,
+# the command line is cut to fit in the MS-DOS 128 byte limit:
+$(ZLIB_LIB): $(OBJ1) $(OBJ2)
+ -del $(ZLIB_LIB)
+ $(AR) $(ZLIB_LIB) $(OBJP1)
+ $(AR) $(ZLIB_LIB) $(OBJP2)
+
+
+# testing
+test: example.exe minigzip.exe
+ example
+ echo hello world | minigzip | minigzip -d
+
+example.exe: example.obj $(ZLIB_LIB)
+ $(LD) $(LDFLAGS) example.obj $(ZLIB_LIB)
+
+minigzip.exe: minigzip.obj $(ZLIB_LIB)
+ $(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB)
+
+
+# cleanup
+clean:
+ -del *.obj
+ -del *.exe
+ -del *.lib
+ -del *.tds
+ -del zlib.bak
+ -del foo.gz
+
diff --git a/contrib/zlib/contrib/pascal/zlibpas.pas b/contrib/zlib/contrib/pascal/zlibpas.pas
new file mode 100644
index 000000000..a0dff11b5
--- /dev/null
+++ b/contrib/zlib/contrib/pascal/zlibpas.pas
@@ -0,0 +1,276 @@
+(* zlibpas -- Pascal interface to the zlib data compression library
+ *
+ * Copyright (C) 2003 Cosmin Truta.
+ * Derived from original sources by Bob Dellaca.
+ * For conditions of distribution and use, see copyright notice in readme.txt
+ *)
+
+unit zlibpas;
+
+interface
+
+const
+ ZLIB_VERSION = '1.2.11';
+ ZLIB_VERNUM = $12a0;
+
+type
+ alloc_func = function(opaque: Pointer; items, size: Integer): Pointer;
+ cdecl;
+ free_func = procedure(opaque, address: Pointer);
+ cdecl;
+
+ in_func = function(opaque: Pointer; var buf: PByte): Integer;
+ cdecl;
+ out_func = function(opaque: Pointer; buf: PByte; size: Integer): Integer;
+ cdecl;
+
+ z_streamp = ^z_stream;
+ z_stream = packed record
+ next_in: PChar; (* next input byte *)
+ avail_in: Integer; (* number of bytes available at next_in *)
+ total_in: LongInt; (* total nb of input bytes read so far *)
+
+ next_out: PChar; (* next output byte should be put there *)
+ avail_out: Integer; (* remaining free space at next_out *)
+ total_out: LongInt; (* total nb of bytes output so far *)
+
+ msg: PChar; (* last error message, NULL if no error *)
+ state: Pointer; (* not visible by applications *)
+
+ zalloc: alloc_func; (* used to allocate the internal state *)
+ zfree: free_func; (* used to free the internal state *)
+ opaque: Pointer; (* private data object passed to zalloc and zfree *)
+
+ data_type: Integer; (* best guess about the data type: ascii or binary *)
+ adler: LongInt; (* adler32 value of the uncompressed data *)
+ reserved: LongInt; (* reserved for future use *)
+ end;
+
+ gz_headerp = ^gz_header;
+ gz_header = packed record
+ text: Integer; (* true if compressed data believed to be text *)
+ time: LongInt; (* modification time *)
+ xflags: Integer; (* extra flags (not used when writing a gzip file) *)
+ os: Integer; (* operating system *)
+ extra: PChar; (* pointer to extra field or Z_NULL if none *)
+ extra_len: Integer; (* extra field length (valid if extra != Z_NULL) *)
+ extra_max: Integer; (* space at extra (only when reading header) *)
+ name: PChar; (* pointer to zero-terminated file name or Z_NULL *)
+ name_max: Integer; (* space at name (only when reading header) *)
+ comment: PChar; (* pointer to zero-terminated comment or Z_NULL *)
+ comm_max: Integer; (* space at comment (only when reading header) *)
+ hcrc: Integer; (* true if there was or will be a header crc *)
+ done: Integer; (* true when done reading gzip header *)
+ end;
+
+(* constants *)
+const
+ Z_NO_FLUSH = 0;
+ Z_PARTIAL_FLUSH = 1;
+ Z_SYNC_FLUSH = 2;
+ Z_FULL_FLUSH = 3;
+ Z_FINISH = 4;
+ Z_BLOCK = 5;
+ Z_TREES = 6;
+
+ Z_OK = 0;
+ Z_STREAM_END = 1;
+ Z_NEED_DICT = 2;
+ Z_ERRNO = -1;
+ Z_STREAM_ERROR = -2;
+ Z_DATA_ERROR = -3;
+ Z_MEM_ERROR = -4;
+ Z_BUF_ERROR = -5;
+ Z_VERSION_ERROR = -6;
+
+ Z_NO_COMPRESSION = 0;
+ Z_BEST_SPEED = 1;
+ Z_BEST_COMPRESSION = 9;
+ Z_DEFAULT_COMPRESSION = -1;
+
+ Z_FILTERED = 1;
+ Z_HUFFMAN_ONLY = 2;
+ Z_RLE = 3;
+ Z_FIXED = 4;
+ Z_DEFAULT_STRATEGY = 0;
+
+ Z_BINARY = 0;
+ Z_TEXT = 1;
+ Z_ASCII = 1;
+ Z_UNKNOWN = 2;
+
+ Z_DEFLATED = 8;
+
+(* basic functions *)
+function zlibVersion: PChar;
+function deflateInit(var strm: z_stream; level: Integer): Integer;
+function deflate(var strm: z_stream; flush: Integer): Integer;
+function deflateEnd(var strm: z_stream): Integer;
+function inflateInit(var strm: z_stream): Integer;
+function inflate(var strm: z_stream; flush: Integer): Integer;
+function inflateEnd(var strm: z_stream): Integer;
+
+(* advanced functions *)
+function deflateInit2(var strm: z_stream; level, method, windowBits,
+ memLevel, strategy: Integer): Integer;
+function deflateSetDictionary(var strm: z_stream; const dictionary: PChar;
+ dictLength: Integer): Integer;
+function deflateCopy(var dest, source: z_stream): Integer;
+function deflateReset(var strm: z_stream): Integer;
+function deflateParams(var strm: z_stream; level, strategy: Integer): Integer;
+function deflateTune(var strm: z_stream; good_length, max_lazy, nice_length, max_chain: Integer): Integer;
+function deflateBound(var strm: z_stream; sourceLen: LongInt): LongInt;
+function deflatePending(var strm: z_stream; var pending: Integer; var bits: Integer): Integer;
+function deflatePrime(var strm: z_stream; bits, value: Integer): Integer;
+function deflateSetHeader(var strm: z_stream; head: gz_header): Integer;
+function inflateInit2(var strm: z_stream; windowBits: Integer): Integer;
+function inflateSetDictionary(var strm: z_stream; const dictionary: PChar;
+ dictLength: Integer): Integer;
+function inflateSync(var strm: z_stream): Integer;
+function inflateCopy(var dest, source: z_stream): Integer;
+function inflateReset(var strm: z_stream): Integer;
+function inflateReset2(var strm: z_stream; windowBits: Integer): Integer;
+function inflatePrime(var strm: z_stream; bits, value: Integer): Integer;
+function inflateMark(var strm: z_stream): LongInt;
+function inflateGetHeader(var strm: z_stream; var head: gz_header): Integer;
+function inflateBackInit(var strm: z_stream;
+ windowBits: Integer; window: PChar): Integer;
+function inflateBack(var strm: z_stream; in_fn: in_func; in_desc: Pointer;
+ out_fn: out_func; out_desc: Pointer): Integer;
+function inflateBackEnd(var strm: z_stream): Integer;
+function zlibCompileFlags: LongInt;
+
+(* utility functions *)
+function compress(dest: PChar; var destLen: LongInt;
+ const source: PChar; sourceLen: LongInt): Integer;
+function compress2(dest: PChar; var destLen: LongInt;
+ const source: PChar; sourceLen: LongInt;
+ level: Integer): Integer;
+function compressBound(sourceLen: LongInt): LongInt;
+function uncompress(dest: PChar; var destLen: LongInt;
+ const source: PChar; sourceLen: LongInt): Integer;
+
+(* checksum functions *)
+function adler32(adler: LongInt; const buf: PChar; len: Integer): LongInt;
+function adler32_combine(adler1, adler2, len2: LongInt): LongInt;
+function crc32(crc: LongInt; const buf: PChar; len: Integer): LongInt;
+function crc32_combine(crc1, crc2, len2: LongInt): LongInt;
+
+(* various hacks, don't look :) *)
+function deflateInit_(var strm: z_stream; level: Integer;
+ const version: PChar; stream_size: Integer): Integer;
+function inflateInit_(var strm: z_stream; const version: PChar;
+ stream_size: Integer): Integer;
+function deflateInit2_(var strm: z_stream;
+ level, method, windowBits, memLevel, strategy: Integer;
+ const version: PChar; stream_size: Integer): Integer;
+function inflateInit2_(var strm: z_stream; windowBits: Integer;
+ const version: PChar; stream_size: Integer): Integer;
+function inflateBackInit_(var strm: z_stream;
+ windowBits: Integer; window: PChar;
+ const version: PChar; stream_size: Integer): Integer;
+
+
+implementation
+
+{$L adler32.obj}
+{$L compress.obj}
+{$L crc32.obj}
+{$L deflate.obj}
+{$L infback.obj}
+{$L inffast.obj}
+{$L inflate.obj}
+{$L inftrees.obj}
+{$L trees.obj}
+{$L uncompr.obj}
+{$L zutil.obj}
+
+function adler32; external;
+function adler32_combine; external;
+function compress; external;
+function compress2; external;
+function compressBound; external;
+function crc32; external;
+function crc32_combine; external;
+function deflate; external;
+function deflateBound; external;
+function deflateCopy; external;
+function deflateEnd; external;
+function deflateInit_; external;
+function deflateInit2_; external;
+function deflateParams; external;
+function deflatePending; external;
+function deflatePrime; external;
+function deflateReset; external;
+function deflateSetDictionary; external;
+function deflateSetHeader; external;
+function deflateTune; external;
+function inflate; external;
+function inflateBack; external;
+function inflateBackEnd; external;
+function inflateBackInit_; external;
+function inflateCopy; external;
+function inflateEnd; external;
+function inflateGetHeader; external;
+function inflateInit_; external;
+function inflateInit2_; external;
+function inflateMark; external;
+function inflatePrime; external;
+function inflateReset; external;
+function inflateReset2; external;
+function inflateSetDictionary; external;
+function inflateSync; external;
+function uncompress; external;
+function zlibCompileFlags; external;
+function zlibVersion; external;
+
+function deflateInit(var strm: z_stream; level: Integer): Integer;
+begin
+ Result := deflateInit_(strm, level, ZLIB_VERSION, sizeof(z_stream));
+end;
+
+function deflateInit2(var strm: z_stream; level, method, windowBits, memLevel,
+ strategy: Integer): Integer;
+begin
+ Result := deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
+ ZLIB_VERSION, sizeof(z_stream));
+end;
+
+function inflateInit(var strm: z_stream): Integer;
+begin
+ Result := inflateInit_(strm, ZLIB_VERSION, sizeof(z_stream));
+end;
+
+function inflateInit2(var strm: z_stream; windowBits: Integer): Integer;
+begin
+ Result := inflateInit2_(strm, windowBits, ZLIB_VERSION, sizeof(z_stream));
+end;
+
+function inflateBackInit(var strm: z_stream;
+ windowBits: Integer; window: PChar): Integer;
+begin
+ Result := inflateBackInit_(strm, windowBits, window,
+ ZLIB_VERSION, sizeof(z_stream));
+end;
+
+function _malloc(Size: Integer): Pointer; cdecl;
+begin
+ GetMem(Result, Size);
+end;
+
+procedure _free(Block: Pointer); cdecl;
+begin
+ FreeMem(Block);
+end;
+
+procedure _memset(P: Pointer; B: Byte; count: Integer); cdecl;
+begin
+ FillChar(P^, count, B);
+end;
+
+procedure _memcpy(dest, source: Pointer; count: Integer); cdecl;
+begin
+ Move(source^, dest^, count);
+end;
+
+end.
diff --git a/contrib/zlib/contrib/puff/README b/contrib/zlib/contrib/puff/README
new file mode 100644
index 000000000..bbc4cb595
--- /dev/null
+++ b/contrib/zlib/contrib/puff/README
@@ -0,0 +1,63 @@
+Puff -- A Simple Inflate
+3 Mar 2003
+Mark Adler
+madler@alumni.caltech.edu
+
+What this is --
+
+puff.c provides the routine puff() to decompress the deflate data format. It
+does so more slowly than zlib, but the code is about one-fifth the size of the
+inflate code in zlib, and written to be very easy to read.
+
+Why I wrote this --
+
+puff.c was written to document the deflate format unambiguously, by virtue of
+being working C code. It is meant to supplement RFC 1951, which formally
+describes the deflate format. I have received many questions on details of the
+deflate format, and I hope that reading this code will answer those questions.
+puff.c is heavily commented with details of the deflate format, especially
+those little nooks and cranies of the format that might not be obvious from a
+specification.
+
+puff.c may also be useful in applications where code size or memory usage is a
+very limited resource, and speed is not as important.
+
+How to use it --
+
+Well, most likely you should just be reading puff.c and using zlib for actual
+applications, but if you must ...
+
+Include puff.h in your code, which provides this prototype:
+
+int puff(unsigned char *dest, /* pointer to destination pointer */
+ unsigned long *destlen, /* amount of output space */
+ unsigned char *source, /* pointer to source data pointer */
+ unsigned long *sourcelen); /* amount of input available */
+
+Then you can call puff() to decompress a deflate stream that is in memory in
+its entirety at source, to a sufficiently sized block of memory for the
+decompressed data at dest. puff() is the only external symbol in puff.c The
+only C library functions that puff.c needs are setjmp() and longjmp(), which
+are used to simplify error checking in the code to improve readabilty. puff.c
+does no memory allocation, and uses less than 2K bytes off of the stack.
+
+If destlen is not enough space for the uncompressed data, then inflate will
+return an error without writing more than destlen bytes. Note that this means
+that in order to decompress the deflate data successfully, you need to know
+the size of the uncompressed data ahead of time.
+
+If needed, puff() can determine the size of the uncompressed data with no
+output space. This is done by passing dest equal to (unsigned char *)0. Then
+the initial value of *destlen is ignored and *destlen is set to the length of
+the uncompressed data. So if the size of the uncompressed data is not known,
+then two passes of puff() can be used--first to determine the size, and second
+to do the actual inflation after allocating the appropriate memory. Not
+pretty, but it works. (This is one of the reasons you should be using zlib.)
+
+The deflate format is self-terminating. If the deflate stream does not end
+in *sourcelen bytes, puff() will return an error without reading at or past
+endsource.
+
+On return, *sourcelen is updated to the amount of input data consumed, and
+*destlen is updated to the size of the uncompressed data. See the comments
+in puff.c for the possible return codes for puff().
diff --git a/contrib/zlib/contrib/puff/puff.c b/contrib/zlib/contrib/puff/puff.c
new file mode 100644
index 000000000..c6c90d714
--- /dev/null
+++ b/contrib/zlib/contrib/puff/puff.c
@@ -0,0 +1,840 @@
+/*
+ * puff.c
+ * Copyright (C) 2002-2013 Mark Adler
+ * For conditions of distribution and use, see copyright notice in puff.h
+ * version 2.3, 21 Jan 2013
+ *
+ * puff.c is a simple inflate written to be an unambiguous way to specify the
+ * deflate format. It is not written for speed but rather simplicity. As a
+ * side benefit, this code might actually be useful when small code is more
+ * important than speed, such as bootstrap applications. For typical deflate
+ * data, zlib's inflate() is about four times as fast as puff(). zlib's
+ * inflate compiles to around 20K on my machine, whereas puff.c compiles to
+ * around 4K on my machine (a PowerPC using GNU cc). If the faster decode()
+ * function here is used, then puff() is only twice as slow as zlib's
+ * inflate().
+ *
+ * All dynamically allocated memory comes from the stack. The stack required
+ * is less than 2K bytes. This code is compatible with 16-bit int's and
+ * assumes that long's are at least 32 bits. puff.c uses the short data type,
+ * assumed to be 16 bits, for arrays in order to conserve memory. The code
+ * works whether integers are stored big endian or little endian.
+ *
+ * In the comments below are "Format notes" that describe the inflate process
+ * and document some of the less obvious aspects of the format. This source
+ * code is meant to supplement RFC 1951, which formally describes the deflate
+ * format:
+ *
+ * http://www.zlib.org/rfc-deflate.html
+ */
+
+/*
+ * Change history:
+ *
+ * 1.0 10 Feb 2002 - First version
+ * 1.1 17 Feb 2002 - Clarifications of some comments and notes
+ * - Update puff() dest and source pointers on negative
+ * errors to facilitate debugging deflators
+ * - Remove longest from struct huffman -- not needed
+ * - Simplify offs[] index in construct()
+ * - Add input size and checking, using longjmp() to
+ * maintain easy readability
+ * - Use short data type for large arrays
+ * - Use pointers instead of long to specify source and
+ * destination sizes to avoid arbitrary 4 GB limits
+ * 1.2 17 Mar 2002 - Add faster version of decode(), doubles speed (!),
+ * but leave simple version for readabilty
+ * - Make sure invalid distances detected if pointers
+ * are 16 bits
+ * - Fix fixed codes table error
+ * - Provide a scanning mode for determining size of
+ * uncompressed data
+ * 1.3 20 Mar 2002 - Go back to lengths for puff() parameters [Gailly]
+ * - Add a puff.h file for the interface
+ * - Add braces in puff() for else do [Gailly]
+ * - Use indexes instead of pointers for readability
+ * 1.4 31 Mar 2002 - Simplify construct() code set check
+ * - Fix some comments
+ * - Add FIXLCODES #define
+ * 1.5 6 Apr 2002 - Minor comment fixes
+ * 1.6 7 Aug 2002 - Minor format changes
+ * 1.7 3 Mar 2003 - Added test code for distribution
+ * - Added zlib-like license
+ * 1.8 9 Jan 2004 - Added some comments on no distance codes case
+ * 1.9 21 Feb 2008 - Fix bug on 16-bit integer architectures [Pohland]
+ * - Catch missing end-of-block symbol error
+ * 2.0 25 Jul 2008 - Add #define to permit distance too far back
+ * - Add option in TEST code for puff to write the data
+ * - Add option in TEST code to skip input bytes
+ * - Allow TEST code to read from piped stdin
+ * 2.1 4 Apr 2010 - Avoid variable initialization for happier compilers
+ * - Avoid unsigned comparisons for even happier compilers
+ * 2.2 25 Apr 2010 - Fix bug in variable initializations [Oberhumer]
+ * - Add const where appropriate [Oberhumer]
+ * - Split if's and ?'s for coverage testing
+ * - Break out test code to separate file
+ * - Move NIL to puff.h
+ * - Allow incomplete code only if single code length is 1
+ * - Add full code coverage test to Makefile
+ * 2.3 21 Jan 2013 - Check for invalid code length codes in dynamic blocks
+ */
+
+#include <setjmp.h> /* for setjmp(), longjmp(), and jmp_buf */
+#include "puff.h" /* prototype for puff() */
+
+#define local static /* for local function definitions */
+
+/*
+ * Maximums for allocations and loops. It is not useful to change these --
+ * they are fixed by the deflate format.
+ */
+#define MAXBITS 15 /* maximum bits in a code */
+#define MAXLCODES 286 /* maximum number of literal/length codes */
+#define MAXDCODES 30 /* maximum number of distance codes */
+#define MAXCODES (MAXLCODES+MAXDCODES) /* maximum codes lengths to read */
+#define FIXLCODES 288 /* number of fixed literal/length codes */
+
+/* input and output state */
+struct state {
+ /* output state */
+ unsigned char *out; /* output buffer */
+ unsigned long outlen; /* available space at out */
+ unsigned long outcnt; /* bytes written to out so far */
+
+ /* input state */
+ const unsigned char *in; /* input buffer */
+ unsigned long inlen; /* available input at in */
+ unsigned long incnt; /* bytes read so far */
+ int bitbuf; /* bit buffer */
+ int bitcnt; /* number of bits in bit buffer */
+
+ /* input limit error return state for bits() and decode() */
+ jmp_buf env;
+};
+
+/*
+ * Return need bits from the input stream. This always leaves less than
+ * eight bits in the buffer. bits() works properly for need == 0.
+ *
+ * Format notes:
+ *
+ * - Bits are stored in bytes from the least significant bit to the most
+ * significant bit. Therefore bits are dropped from the bottom of the bit
+ * buffer, using shift right, and new bytes are appended to the top of the
+ * bit buffer, using shift left.
+ */
+local int bits(struct state *s, int need)
+{
+ long val; /* bit accumulator (can use up to 20 bits) */
+
+ /* load at least need bits into val */
+ val = s->bitbuf;
+ while (s->bitcnt < need) {
+ if (s->incnt == s->inlen)
+ longjmp(s->env, 1); /* out of input */
+ val |= (long)(s->in[s->incnt++]) << s->bitcnt; /* load eight bits */
+ s->bitcnt += 8;
+ }
+
+ /* drop need bits and update buffer, always zero to seven bits left */
+ s->bitbuf = (int)(val >> need);
+ s->bitcnt -= need;
+
+ /* return need bits, zeroing the bits above that */
+ return (int)(val & ((1L << need) - 1));
+}
+
+/*
+ * Process a stored block.
+ *
+ * Format notes:
+ *
+ * - After the two-bit stored block type (00), the stored block length and
+ * stored bytes are byte-aligned for fast copying. Therefore any leftover
+ * bits in the byte that has the last bit of the type, as many as seven, are
+ * discarded. The value of the discarded bits are not defined and should not
+ * be checked against any expectation.
+ *
+ * - The second inverted copy of the stored block length does not have to be
+ * checked, but it's probably a good idea to do so anyway.
+ *
+ * - A stored block can have zero length. This is sometimes used to byte-align
+ * subsets of the compressed data for random access or partial recovery.
+ */
+local int stored(struct state *s)
+{
+ unsigned len; /* length of stored block */
+
+ /* discard leftover bits from current byte (assumes s->bitcnt < 8) */
+ s->bitbuf = 0;
+ s->bitcnt = 0;
+
+ /* get length and check against its one's complement */
+ if (s->incnt + 4 > s->inlen)
+ return 2; /* not enough input */
+ len = s->in[s->incnt++];
+ len |= s->in[s->incnt++] << 8;
+ if (s->in[s->incnt++] != (~len & 0xff) ||
+ s->in[s->incnt++] != ((~len >> 8) & 0xff))
+ return -2; /* didn't match complement! */
+
+ /* copy len bytes from in to out */
+ if (s->incnt + len > s->inlen)
+ return 2; /* not enough input */
+ if (s->out != NIL) {
+ if (s->outcnt + len > s->outlen)
+ return 1; /* not enough output space */
+ while (len--)
+ s->out[s->outcnt++] = s->in[s->incnt++];
+ }
+ else { /* just scanning */
+ s->outcnt += len;
+ s->incnt += len;
+ }
+
+ /* done with a valid stored block */
+ return 0;
+}
+
+/*
+ * Huffman code decoding tables. count[1..MAXBITS] is the number of symbols of
+ * each length, which for a canonical code are stepped through in order.
+ * symbol[] are the symbol values in canonical order, where the number of
+ * entries is the sum of the counts in count[]. The decoding process can be
+ * seen in the function decode() below.
+ */
+struct huffman {
+ short *count; /* number of symbols of each length */
+ short *symbol; /* canonically ordered symbols */
+};
+
+/*
+ * Decode a code from the stream s using huffman table h. Return the symbol or
+ * a negative value if there is an error. If all of the lengths are zero, i.e.
+ * an empty code, or if the code is incomplete and an invalid code is received,
+ * then -10 is returned after reading MAXBITS bits.
+ *
+ * Format notes:
+ *
+ * - The codes as stored in the compressed data are bit-reversed relative to
+ * a simple integer ordering of codes of the same lengths. Hence below the
+ * bits are pulled from the compressed data one at a time and used to
+ * build the code value reversed from what is in the stream in order to
+ * permit simple integer comparisons for decoding. A table-based decoding
+ * scheme (as used in zlib) does not need to do this reversal.
+ *
+ * - The first code for the shortest length is all zeros. Subsequent codes of
+ * the same length are simply integer increments of the previous code. When
+ * moving up a length, a zero bit is appended to the code. For a complete
+ * code, the last code of the longest length will be all ones.
+ *
+ * - Incomplete codes are handled by this decoder, since they are permitted
+ * in the deflate format. See the format notes for fixed() and dynamic().
+ */
+#ifdef SLOW
+local int decode(struct state *s, const struct huffman *h)
+{
+ int len; /* current number of bits in code */
+ int code; /* len bits being decoded */
+ int first; /* first code of length len */
+ int count; /* number of codes of length len */
+ int index; /* index of first code of length len in symbol table */
+
+ code = first = index = 0;
+ for (len = 1; len <= MAXBITS; len++) {
+ code |= bits(s, 1); /* get next bit */
+ count = h->count[len];
+ if (code - count < first) /* if length len, return symbol */
+ return h->symbol[index + (code - first)];
+ index += count; /* else update for next length */
+ first += count;
+ first <<= 1;
+ code <<= 1;
+ }
+ return -10; /* ran out of codes */
+}
+
+/*
+ * A faster version of decode() for real applications of this code. It's not
+ * as readable, but it makes puff() twice as fast. And it only makes the code
+ * a few percent larger.
+ */
+#else /* !SLOW */
+local int decode(struct state *s, const struct huffman *h)
+{
+ int len; /* current number of bits in code */
+ int code; /* len bits being decoded */
+ int first; /* first code of length len */
+ int count; /* number of codes of length len */
+ int index; /* index of first code of length len in symbol table */
+ int bitbuf; /* bits from stream */
+ int left; /* bits left in next or left to process */
+ short *next; /* next number of codes */
+
+ bitbuf = s->bitbuf;
+ left = s->bitcnt;
+ code = first = index = 0;
+ len = 1;
+ next = h->count + 1;
+ while (1) {
+ while (left--) {
+ code |= bitbuf & 1;
+ bitbuf >>= 1;
+ count = *next++;
+ if (code - count < first) { /* if length len, return symbol */
+ s->bitbuf = bitbuf;
+ s->bitcnt = (s->bitcnt - len) & 7;
+ return h->symbol[index + (code - first)];
+ }
+ index += count; /* else update for next length */
+ first += count;
+ first <<= 1;
+ code <<= 1;
+ len++;
+ }
+ left = (MAXBITS+1) - len;
+ if (left == 0)
+ break;
+ if (s->incnt == s->inlen)
+ longjmp(s->env, 1); /* out of input */
+ bitbuf = s->in[s->incnt++];
+ if (left > 8)
+ left = 8;
+ }
+ return -10; /* ran out of codes */
+}
+#endif /* SLOW */
+
+/*
+ * Given the list of code lengths length[0..n-1] representing a canonical
+ * Huffman code for n symbols, construct the tables required to decode those
+ * codes. Those tables are the number of codes of each length, and the symbols
+ * sorted by length, retaining their original order within each length. The
+ * return value is zero for a complete code set, negative for an over-
+ * subscribed code set, and positive for an incomplete code set. The tables
+ * can be used if the return value is zero or positive, but they cannot be used
+ * if the return value is negative. If the return value is zero, it is not
+ * possible for decode() using that table to return an error--any stream of
+ * enough bits will resolve to a symbol. If the return value is positive, then
+ * it is possible for decode() using that table to return an error for received
+ * codes past the end of the incomplete lengths.
+ *
+ * Not used by decode(), but used for error checking, h->count[0] is the number
+ * of the n symbols not in the code. So n - h->count[0] is the number of
+ * codes. This is useful for checking for incomplete codes that have more than
+ * one symbol, which is an error in a dynamic block.
+ *
+ * Assumption: for all i in 0..n-1, 0 <= length[i] <= MAXBITS
+ * This is assured by the construction of the length arrays in dynamic() and
+ * fixed() and is not verified by construct().
+ *
+ * Format notes:
+ *
+ * - Permitted and expected examples of incomplete codes are one of the fixed
+ * codes and any code with a single symbol which in deflate is coded as one
+ * bit instead of zero bits. See the format notes for fixed() and dynamic().
+ *
+ * - Within a given code length, the symbols are kept in ascending order for
+ * the code bits definition.
+ */
+local int construct(struct huffman *h, const short *length, int n)
+{
+ int symbol; /* current symbol when stepping through length[] */
+ int len; /* current length when stepping through h->count[] */
+ int left; /* number of possible codes left of current length */
+ short offs[MAXBITS+1]; /* offsets in symbol table for each length */
+
+ /* count number of codes of each length */
+ for (len = 0; len <= MAXBITS; len++)
+ h->count[len] = 0;
+ for (symbol = 0; symbol < n; symbol++)
+ (h->count[length[symbol]])++; /* assumes lengths are within bounds */
+ if (h->count[0] == n) /* no codes! */
+ return 0; /* complete, but decode() will fail */
+
+ /* check for an over-subscribed or incomplete set of lengths */
+ left = 1; /* one possible code of zero length */
+ for (len = 1; len <= MAXBITS; len++) {
+ left <<= 1; /* one more bit, double codes left */
+ left -= h->count[len]; /* deduct count from possible codes */
+ if (left < 0)
+ return left; /* over-subscribed--return negative */
+ } /* left > 0 means incomplete */
+
+ /* generate offsets into symbol table for each length for sorting */
+ offs[1] = 0;
+ for (len = 1; len < MAXBITS; len++)
+ offs[len + 1] = offs[len] + h->count[len];
+
+ /*
+ * put symbols in table sorted by length, by symbol order within each
+ * length
+ */
+ for (symbol = 0; symbol < n; symbol++)
+ if (length[symbol] != 0)
+ h->symbol[offs[length[symbol]]++] = symbol;
+
+ /* return zero for complete set, positive for incomplete set */
+ return left;
+}
+
+/*
+ * Decode literal/length and distance codes until an end-of-block code.
+ *
+ * Format notes:
+ *
+ * - Compressed data that is after the block type if fixed or after the code
+ * description if dynamic is a combination of literals and length/distance
+ * pairs terminated by and end-of-block code. Literals are simply Huffman
+ * coded bytes. A length/distance pair is a coded length followed by a
+ * coded distance to represent a string that occurs earlier in the
+ * uncompressed data that occurs again at the current location.
+ *
+ * - Literals, lengths, and the end-of-block code are combined into a single
+ * code of up to 286 symbols. They are 256 literals (0..255), 29 length
+ * symbols (257..285), and the end-of-block symbol (256).
+ *
+ * - There are 256 possible lengths (3..258), and so 29 symbols are not enough
+ * to represent all of those. Lengths 3..10 and 258 are in fact represented
+ * by just a length symbol. Lengths 11..257 are represented as a symbol and
+ * some number of extra bits that are added as an integer to the base length
+ * of the length symbol. The number of extra bits is determined by the base
+ * length symbol. These are in the static arrays below, lens[] for the base
+ * lengths and lext[] for the corresponding number of extra bits.
+ *
+ * - The reason that 258 gets its own symbol is that the longest length is used
+ * often in highly redundant files. Note that 258 can also be coded as the
+ * base value 227 plus the maximum extra value of 31. While a good deflate
+ * should never do this, it is not an error, and should be decoded properly.
+ *
+ * - If a length is decoded, including its extra bits if any, then it is
+ * followed a distance code. There are up to 30 distance symbols. Again
+ * there are many more possible distances (1..32768), so extra bits are added
+ * to a base value represented by the symbol. The distances 1..4 get their
+ * own symbol, but the rest require extra bits. The base distances and
+ * corresponding number of extra bits are below in the static arrays dist[]
+ * and dext[].
+ *
+ * - Literal bytes are simply written to the output. A length/distance pair is
+ * an instruction to copy previously uncompressed bytes to the output. The
+ * copy is from distance bytes back in the output stream, copying for length
+ * bytes.
+ *
+ * - Distances pointing before the beginning of the output data are not
+ * permitted.
+ *
+ * - Overlapped copies, where the length is greater than the distance, are
+ * allowed and common. For example, a distance of one and a length of 258
+ * simply copies the last byte 258 times. A distance of four and a length of
+ * twelve copies the last four bytes three times. A simple forward copy
+ * ignoring whether the length is greater than the distance or not implements
+ * this correctly. You should not use memcpy() since its behavior is not
+ * defined for overlapped arrays. You should not use memmove() or bcopy()
+ * since though their behavior -is- defined for overlapping arrays, it is
+ * defined to do the wrong thing in this case.
+ */
+local int codes(struct state *s,
+ const struct huffman *lencode,
+ const struct huffman *distcode)
+{
+ int symbol; /* decoded symbol */
+ int len; /* length for copy */
+ unsigned dist; /* distance for copy */
+ static const short lens[29] = { /* Size base for length codes 257..285 */
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
+ 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258};
+ static const short lext[29] = { /* Extra bits for length codes 257..285 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2,
+ 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0};
+ static const short dists[30] = { /* Offset base for distance codes 0..29 */
+ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
+ 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
+ 8193, 12289, 16385, 24577};
+ static const short dext[30] = { /* Extra bits for distance codes 0..29 */
+ 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6,
+ 7, 7, 8, 8, 9, 9, 10, 10, 11, 11,
+ 12, 12, 13, 13};
+
+ /* decode literals and length/distance pairs */
+ do {
+ symbol = decode(s, lencode);
+ if (symbol < 0)
+ return symbol; /* invalid symbol */
+ if (symbol < 256) { /* literal: symbol is the byte */
+ /* write out the literal */
+ if (s->out != NIL) {
+ if (s->outcnt == s->outlen)
+ return 1;
+ s->out[s->outcnt] = symbol;
+ }
+ s->outcnt++;
+ }
+ else if (symbol > 256) { /* length */
+ /* get and compute length */
+ symbol -= 257;
+ if (symbol >= 29)
+ return -10; /* invalid fixed code */
+ len = lens[symbol] + bits(s, lext[symbol]);
+
+ /* get and check distance */
+ symbol = decode(s, distcode);
+ if (symbol < 0)
+ return symbol; /* invalid symbol */
+ dist = dists[symbol] + bits(s, dext[symbol]);
+#ifndef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
+ if (dist > s->outcnt)
+ return -11; /* distance too far back */
+#endif
+
+ /* copy length bytes from distance bytes back */
+ if (s->out != NIL) {
+ if (s->outcnt + len > s->outlen)
+ return 1;
+ while (len--) {
+ s->out[s->outcnt] =
+#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
+ dist > s->outcnt ?
+ 0 :
+#endif
+ s->out[s->outcnt - dist];
+ s->outcnt++;
+ }
+ }
+ else
+ s->outcnt += len;
+ }
+ } while (symbol != 256); /* end of block symbol */
+
+ /* done with a valid fixed or dynamic block */
+ return 0;
+}
+
+/*
+ * Process a fixed codes block.
+ *
+ * Format notes:
+ *
+ * - This block type can be useful for compressing small amounts of data for
+ * which the size of the code descriptions in a dynamic block exceeds the
+ * benefit of custom codes for that block. For fixed codes, no bits are
+ * spent on code descriptions. Instead the code lengths for literal/length
+ * codes and distance codes are fixed. The specific lengths for each symbol
+ * can be seen in the "for" loops below.
+ *
+ * - The literal/length code is complete, but has two symbols that are invalid
+ * and should result in an error if received. This cannot be implemented
+ * simply as an incomplete code since those two symbols are in the "middle"
+ * of the code. They are eight bits long and the longest literal/length\
+ * code is nine bits. Therefore the code must be constructed with those
+ * symbols, and the invalid symbols must be detected after decoding.
+ *
+ * - The fixed distance codes also have two invalid symbols that should result
+ * in an error if received. Since all of the distance codes are the same
+ * length, this can be implemented as an incomplete code. Then the invalid
+ * codes are detected while decoding.
+ */
+local int fixed(struct state *s)
+{
+ static int virgin = 1;
+ static short lencnt[MAXBITS+1], lensym[FIXLCODES];
+ static short distcnt[MAXBITS+1], distsym[MAXDCODES];
+ static struct huffman lencode, distcode;
+
+ /* build fixed huffman tables if first call (may not be thread safe) */
+ if (virgin) {
+ int symbol;
+ short lengths[FIXLCODES];
+
+ /* construct lencode and distcode */
+ lencode.count = lencnt;
+ lencode.symbol = lensym;
+ distcode.count = distcnt;
+ distcode.symbol = distsym;
+
+ /* literal/length table */
+ for (symbol = 0; symbol < 144; symbol++)
+ lengths[symbol] = 8;
+ for (; symbol < 256; symbol++)
+ lengths[symbol] = 9;
+ for (; symbol < 280; symbol++)
+ lengths[symbol] = 7;
+ for (; symbol < FIXLCODES; symbol++)
+ lengths[symbol] = 8;
+ construct(&lencode, lengths, FIXLCODES);
+
+ /* distance table */
+ for (symbol = 0; symbol < MAXDCODES; symbol++)
+ lengths[symbol] = 5;
+ construct(&distcode, lengths, MAXDCODES);
+
+ /* do this just once */
+ virgin = 0;
+ }
+
+ /* decode data until end-of-block code */
+ return codes(s, &lencode, &distcode);
+}
+
+/*
+ * Process a dynamic codes block.
+ *
+ * Format notes:
+ *
+ * - A dynamic block starts with a description of the literal/length and
+ * distance codes for that block. New dynamic blocks allow the compressor to
+ * rapidly adapt to changing data with new codes optimized for that data.
+ *
+ * - The codes used by the deflate format are "canonical", which means that
+ * the actual bits of the codes are generated in an unambiguous way simply
+ * from the number of bits in each code. Therefore the code descriptions
+ * are simply a list of code lengths for each symbol.
+ *
+ * - The code lengths are stored in order for the symbols, so lengths are
+ * provided for each of the literal/length symbols, and for each of the
+ * distance symbols.
+ *
+ * - If a symbol is not used in the block, this is represented by a zero as
+ * as the code length. This does not mean a zero-length code, but rather
+ * that no code should be created for this symbol. There is no way in the
+ * deflate format to represent a zero-length code.
+ *
+ * - The maximum number of bits in a code is 15, so the possible lengths for
+ * any code are 1..15.
+ *
+ * - The fact that a length of zero is not permitted for a code has an
+ * interesting consequence. Normally if only one symbol is used for a given
+ * code, then in fact that code could be represented with zero bits. However
+ * in deflate, that code has to be at least one bit. So for example, if
+ * only a single distance base symbol appears in a block, then it will be
+ * represented by a single code of length one, in particular one 0 bit. This
+ * is an incomplete code, since if a 1 bit is received, it has no meaning,
+ * and should result in an error. So incomplete distance codes of one symbol
+ * should be permitted, and the receipt of invalid codes should be handled.
+ *
+ * - It is also possible to have a single literal/length code, but that code
+ * must be the end-of-block code, since every dynamic block has one. This
+ * is not the most efficient way to create an empty block (an empty fixed
+ * block is fewer bits), but it is allowed by the format. So incomplete
+ * literal/length codes of one symbol should also be permitted.
+ *
+ * - If there are only literal codes and no lengths, then there are no distance
+ * codes. This is represented by one distance code with zero bits.
+ *
+ * - The list of up to 286 length/literal lengths and up to 30 distance lengths
+ * are themselves compressed using Huffman codes and run-length encoding. In
+ * the list of code lengths, a 0 symbol means no code, a 1..15 symbol means
+ * that length, and the symbols 16, 17, and 18 are run-length instructions.
+ * Each of 16, 17, and 18 are follwed by extra bits to define the length of
+ * the run. 16 copies the last length 3 to 6 times. 17 represents 3 to 10
+ * zero lengths, and 18 represents 11 to 138 zero lengths. Unused symbols
+ * are common, hence the special coding for zero lengths.
+ *
+ * - The symbols for 0..18 are Huffman coded, and so that code must be
+ * described first. This is simply a sequence of up to 19 three-bit values
+ * representing no code (0) or the code length for that symbol (1..7).
+ *
+ * - A dynamic block starts with three fixed-size counts from which is computed
+ * the number of literal/length code lengths, the number of distance code
+ * lengths, and the number of code length code lengths (ok, you come up with
+ * a better name!) in the code descriptions. For the literal/length and
+ * distance codes, lengths after those provided are considered zero, i.e. no
+ * code. The code length code lengths are received in a permuted order (see
+ * the order[] array below) to make a short code length code length list more
+ * likely. As it turns out, very short and very long codes are less likely
+ * to be seen in a dynamic code description, hence what may appear initially
+ * to be a peculiar ordering.
+ *
+ * - Given the number of literal/length code lengths (nlen) and distance code
+ * lengths (ndist), then they are treated as one long list of nlen + ndist
+ * code lengths. Therefore run-length coding can and often does cross the
+ * boundary between the two sets of lengths.
+ *
+ * - So to summarize, the code description at the start of a dynamic block is
+ * three counts for the number of code lengths for the literal/length codes,
+ * the distance codes, and the code length codes. This is followed by the
+ * code length code lengths, three bits each. This is used to construct the
+ * code length code which is used to read the remainder of the lengths. Then
+ * the literal/length code lengths and distance lengths are read as a single
+ * set of lengths using the code length codes. Codes are constructed from
+ * the resulting two sets of lengths, and then finally you can start
+ * decoding actual compressed data in the block.
+ *
+ * - For reference, a "typical" size for the code description in a dynamic
+ * block is around 80 bytes.
+ */
+local int dynamic(struct state *s)
+{
+ int nlen, ndist, ncode; /* number of lengths in descriptor */
+ int index; /* index of lengths[] */
+ int err; /* construct() return value */
+ short lengths[MAXCODES]; /* descriptor code lengths */
+ short lencnt[MAXBITS+1], lensym[MAXLCODES]; /* lencode memory */
+ short distcnt[MAXBITS+1], distsym[MAXDCODES]; /* distcode memory */
+ struct huffman lencode, distcode; /* length and distance codes */
+ static const short order[19] = /* permutation of code length codes */
+ {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
+
+ /* construct lencode and distcode */
+ lencode.count = lencnt;
+ lencode.symbol = lensym;
+ distcode.count = distcnt;
+ distcode.symbol = distsym;
+
+ /* get number of lengths in each table, check lengths */
+ nlen = bits(s, 5) + 257;
+ ndist = bits(s, 5) + 1;
+ ncode = bits(s, 4) + 4;
+ if (nlen > MAXLCODES || ndist > MAXDCODES)
+ return -3; /* bad counts */
+
+ /* read code length code lengths (really), missing lengths are zero */
+ for (index = 0; index < ncode; index++)
+ lengths[order[index]] = bits(s, 3);
+ for (; index < 19; index++)
+ lengths[order[index]] = 0;
+
+ /* build huffman table for code lengths codes (use lencode temporarily) */
+ err = construct(&lencode, lengths, 19);
+ if (err != 0) /* require complete code set here */
+ return -4;
+
+ /* read length/literal and distance code length tables */
+ index = 0;
+ while (index < nlen + ndist) {
+ int symbol; /* decoded value */
+ int len; /* last length to repeat */
+
+ symbol = decode(s, &lencode);
+ if (symbol < 0)
+ return symbol; /* invalid symbol */
+ if (symbol < 16) /* length in 0..15 */
+ lengths[index++] = symbol;
+ else { /* repeat instruction */
+ len = 0; /* assume repeating zeros */
+ if (symbol == 16) { /* repeat last length 3..6 times */
+ if (index == 0)
+ return -5; /* no last length! */
+ len = lengths[index - 1]; /* last length */
+ symbol = 3 + bits(s, 2);
+ }
+ else if (symbol == 17) /* repeat zero 3..10 times */
+ symbol = 3 + bits(s, 3);
+ else /* == 18, repeat zero 11..138 times */
+ symbol = 11 + bits(s, 7);
+ if (index + symbol > nlen + ndist)
+ return -6; /* too many lengths! */
+ while (symbol--) /* repeat last or zero symbol times */
+ lengths[index++] = len;
+ }
+ }
+
+ /* check for end-of-block code -- there better be one! */
+ if (lengths[256] == 0)
+ return -9;
+
+ /* build huffman table for literal/length codes */
+ err = construct(&lencode, lengths, nlen);
+ if (err && (err < 0 || nlen != lencode.count[0] + lencode.count[1]))
+ return -7; /* incomplete code ok only for single length 1 code */
+
+ /* build huffman table for distance codes */
+ err = construct(&distcode, lengths + nlen, ndist);
+ if (err && (err < 0 || ndist != distcode.count[0] + distcode.count[1]))
+ return -8; /* incomplete code ok only for single length 1 code */
+
+ /* decode data until end-of-block code */
+ return codes(s, &lencode, &distcode);
+}
+
+/*
+ * Inflate source to dest. On return, destlen and sourcelen are updated to the
+ * size of the uncompressed data and the size of the deflate data respectively.
+ * On success, the return value of puff() is zero. If there is an error in the
+ * source data, i.e. it is not in the deflate format, then a negative value is
+ * returned. If there is not enough input available or there is not enough
+ * output space, then a positive error is returned. In that case, destlen and
+ * sourcelen are not updated to facilitate retrying from the beginning with the
+ * provision of more input data or more output space. In the case of invalid
+ * inflate data (a negative error), the dest and source pointers are updated to
+ * facilitate the debugging of deflators.
+ *
+ * puff() also has a mode to determine the size of the uncompressed output with
+ * no output written. For this dest must be (unsigned char *)0. In this case,
+ * the input value of *destlen is ignored, and on return *destlen is set to the
+ * size of the uncompressed output.
+ *
+ * The return codes are:
+ *
+ * 2: available inflate data did not terminate
+ * 1: output space exhausted before completing inflate
+ * 0: successful inflate
+ * -1: invalid block type (type == 3)
+ * -2: stored block length did not match one's complement
+ * -3: dynamic block code description: too many length or distance codes
+ * -4: dynamic block code description: code lengths codes incomplete
+ * -5: dynamic block code description: repeat lengths with no first length
+ * -6: dynamic block code description: repeat more than specified lengths
+ * -7: dynamic block code description: invalid literal/length code lengths
+ * -8: dynamic block code description: invalid distance code lengths
+ * -9: dynamic block code description: missing end-of-block code
+ * -10: invalid literal/length or distance code in fixed or dynamic block
+ * -11: distance is too far back in fixed or dynamic block
+ *
+ * Format notes:
+ *
+ * - Three bits are read for each block to determine the kind of block and
+ * whether or not it is the last block. Then the block is decoded and the
+ * process repeated if it was not the last block.
+ *
+ * - The leftover bits in the last byte of the deflate data after the last
+ * block (if it was a fixed or dynamic block) are undefined and have no
+ * expected values to check.
+ */
+int puff(unsigned char *dest, /* pointer to destination pointer */
+ unsigned long *destlen, /* amount of output space */
+ const unsigned char *source, /* pointer to source data pointer */
+ unsigned long *sourcelen) /* amount of input available */
+{
+ struct state s; /* input/output state */
+ int last, type; /* block information */
+ int err; /* return value */
+
+ /* initialize output state */
+ s.out = dest;
+ s.outlen = *destlen; /* ignored if dest is NIL */
+ s.outcnt = 0;
+
+ /* initialize input state */
+ s.in = source;
+ s.inlen = *sourcelen;
+ s.incnt = 0;
+ s.bitbuf = 0;
+ s.bitcnt = 0;
+
+ /* return if bits() or decode() tries to read past available input */
+ if (setjmp(s.env) != 0) /* if came back here via longjmp() */
+ err = 2; /* then skip do-loop, return error */
+ else {
+ /* process blocks until last block or error */
+ do {
+ last = bits(&s, 1); /* one if last block */
+ type = bits(&s, 2); /* block type 0..3 */
+ err = type == 0 ?
+ stored(&s) :
+ (type == 1 ?
+ fixed(&s) :
+ (type == 2 ?
+ dynamic(&s) :
+ -1)); /* type == 3, invalid */
+ if (err != 0)
+ break; /* return with error */
+ } while (!last);
+ }
+
+ /* update the lengths and return */
+ if (err <= 0) {
+ *destlen = s.outcnt;
+ *sourcelen = s.incnt;
+ }
+ return err;
+}
diff --git a/contrib/zlib/contrib/puff/puff.h b/contrib/zlib/contrib/puff/puff.h
new file mode 100644
index 000000000..e23a24543
--- /dev/null
+++ b/contrib/zlib/contrib/puff/puff.h
@@ -0,0 +1,35 @@
+/* puff.h
+ Copyright (C) 2002-2013 Mark Adler, all rights reserved
+ version 2.3, 21 Jan 2013
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the author be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+ Mark Adler madler@alumni.caltech.edu
+ */
+
+
+/*
+ * See puff.c for purpose and usage.
+ */
+#ifndef NIL
+# define NIL ((unsigned char *)0) /* for no output option */
+#endif
+
+int puff(unsigned char *dest, /* pointer to destination pointer */
+ unsigned long *destlen, /* amount of output space */
+ const unsigned char *source, /* pointer to source data pointer */
+ unsigned long *sourcelen); /* amount of input available */
diff --git a/contrib/zlib/contrib/puff/pufftest.c b/contrib/zlib/contrib/puff/pufftest.c
new file mode 100644
index 000000000..776481488
--- /dev/null
+++ b/contrib/zlib/contrib/puff/pufftest.c
@@ -0,0 +1,165 @@
+/*
+ * pufftest.c
+ * Copyright (C) 2002-2013 Mark Adler
+ * For conditions of distribution and use, see copyright notice in puff.h
+ * version 2.3, 21 Jan 2013
+ */
+
+/* Example of how to use puff().
+
+ Usage: puff [-w] [-f] [-nnn] file
+ ... | puff [-w] [-f] [-nnn]
+
+ where file is the input file with deflate data, nnn is the number of bytes
+ of input to skip before inflating (e.g. to skip a zlib or gzip header), and
+ -w is used to write the decompressed data to stdout. -f is for coverage
+ testing, and causes pufftest to fail with not enough output space (-f does
+ a write like -w, so -w is not required). */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "puff.h"
+
+#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__)
+# include <fcntl.h>
+# include <io.h>
+# define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
+#else
+# define SET_BINARY_MODE(file)
+#endif
+
+#define local static
+
+/* Return size times approximately the cube root of 2, keeping the result as 1,
+ 3, or 5 times a power of 2 -- the result is always > size, until the result
+ is the maximum value of an unsigned long, where it remains. This is useful
+ to keep reallocations less than ~33% over the actual data. */
+local size_t bythirds(size_t size)
+{
+ int n;
+ size_t m;
+
+ m = size;
+ for (n = 0; m; n++)
+ m >>= 1;
+ if (n < 3)
+ return size + 1;
+ n -= 3;
+ m = size >> n;
+ m += m == 6 ? 2 : 1;
+ m <<= n;
+ return m > size ? m : (size_t)(-1);
+}
+
+/* Read the input file *name, or stdin if name is NULL, into allocated memory.
+ Reallocate to larger buffers until the entire file is read in. Return a
+ pointer to the allocated data, or NULL if there was a memory allocation
+ failure. *len is the number of bytes of data read from the input file (even
+ if load() returns NULL). If the input file was empty or could not be opened
+ or read, *len is zero. */
+local void *load(const char *name, size_t *len)
+{
+ size_t size;
+ void *buf, *swap;
+ FILE *in;
+
+ *len = 0;
+ buf = malloc(size = 4096);
+ if (buf == NULL)
+ return NULL;
+ in = name == NULL ? stdin : fopen(name, "rb");
+ if (in != NULL) {
+ for (;;) {
+ *len += fread((char *)buf + *len, 1, size - *len, in);
+ if (*len < size) break;
+ size = bythirds(size);
+ if (size == *len || (swap = realloc(buf, size)) == NULL) {
+ free(buf);
+ buf = NULL;
+ break;
+ }
+ buf = swap;
+ }
+ fclose(in);
+ }
+ return buf;
+}
+
+int main(int argc, char **argv)
+{
+ int ret, put = 0, fail = 0;
+ unsigned skip = 0;
+ char *arg, *name = NULL;
+ unsigned char *source = NULL, *dest;
+ size_t len = 0;
+ unsigned long sourcelen, destlen;
+
+ /* process arguments */
+ while (arg = *++argv, --argc)
+ if (arg[0] == '-') {
+ if (arg[1] == 'w' && arg[2] == 0)
+ put = 1;
+ else if (arg[1] == 'f' && arg[2] == 0)
+ fail = 1, put = 1;
+ else if (arg[1] >= '0' && arg[1] <= '9')
+ skip = (unsigned)atoi(arg + 1);
+ else {
+ fprintf(stderr, "invalid option %s\n", arg);
+ return 3;
+ }
+ }
+ else if (name != NULL) {
+ fprintf(stderr, "only one file name allowed\n");
+ return 3;
+ }
+ else
+ name = arg;
+ source = load(name, &len);
+ if (source == NULL) {
+ fprintf(stderr, "memory allocation failure\n");
+ return 4;
+ }
+ if (len == 0) {
+ fprintf(stderr, "could not read %s, or it was empty\n",
+ name == NULL ? "<stdin>" : name);
+ free(source);
+ return 3;
+ }
+ if (skip >= len) {
+ fprintf(stderr, "skip request of %d leaves no input\n", skip);
+ free(source);
+ return 3;
+ }
+
+ /* test inflate data with offset skip */
+ len -= skip;
+ sourcelen = (unsigned long)len;
+ ret = puff(NIL, &destlen, source + skip, &sourcelen);
+ if (ret)
+ fprintf(stderr, "puff() failed with return code %d\n", ret);
+ else {
+ fprintf(stderr, "puff() succeeded uncompressing %lu bytes\n", destlen);
+ if (sourcelen < len) fprintf(stderr, "%lu compressed bytes unused\n",
+ len - sourcelen);
+ }
+
+ /* if requested, inflate again and write decompressd data to stdout */
+ if (put && ret == 0) {
+ if (fail)
+ destlen >>= 1;
+ dest = malloc(destlen);
+ if (dest == NULL) {
+ fprintf(stderr, "memory allocation failure\n");
+ free(source);
+ return 4;
+ }
+ puff(dest, &destlen, source + skip, &sourcelen);
+ SET_BINARY_MODE(stdout);
+ fwrite(dest, 1, destlen, stdout);
+ free(dest);
+ }
+
+ /* clean up */
+ free(source);
+ return ret;
+}
diff --git a/contrib/zlib/contrib/puff/zeros.raw b/contrib/zlib/contrib/puff/zeros.raw
new file mode 100644
index 000000000..0a90e76b3
--- /dev/null
+++ b/contrib/zlib/contrib/puff/zeros.raw
Binary files differ
diff --git a/contrib/zlib/contrib/testzlib/testzlib.c b/contrib/zlib/contrib/testzlib/testzlib.c
new file mode 100644
index 000000000..8626c92ad
--- /dev/null
+++ b/contrib/zlib/contrib/testzlib/testzlib.c
@@ -0,0 +1,275 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <windows.h>
+
+#include "zlib.h"
+
+
+void MyDoMinus64(LARGE_INTEGER *R,LARGE_INTEGER A,LARGE_INTEGER B)
+{
+ R->HighPart = A.HighPart - B.HighPart;
+ if (A.LowPart >= B.LowPart)
+ R->LowPart = A.LowPart - B.LowPart;
+ else
+ {
+ R->LowPart = A.LowPart - B.LowPart;
+ R->HighPart --;
+ }
+}
+
+#ifdef _M_X64
+// see http://msdn2.microsoft.com/library/twchhe95(en-us,vs.80).aspx for __rdtsc
+unsigned __int64 __rdtsc(void);
+void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64)
+{
+ // printf("rdtsc = %I64x\n",__rdtsc());
+ pbeginTime64->QuadPart=__rdtsc();
+}
+
+LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf)
+{
+ LARGE_INTEGER LIres;
+ unsigned _int64 res=__rdtsc()-((unsigned _int64)(beginTime64.QuadPart));
+ LIres.QuadPart=res;
+ // printf("rdtsc = %I64x\n",__rdtsc());
+ return LIres;
+}
+#else
+#ifdef _M_IX86
+void myGetRDTSC32(LARGE_INTEGER * pbeginTime64)
+{
+ DWORD dwEdx,dwEax;
+ _asm
+ {
+ rdtsc
+ mov dwEax,eax
+ mov dwEdx,edx
+ }
+ pbeginTime64->LowPart=dwEax;
+ pbeginTime64->HighPart=dwEdx;
+}
+
+void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64)
+{
+ myGetRDTSC32(pbeginTime64);
+}
+
+LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf)
+{
+ LARGE_INTEGER LIres,endTime64;
+ myGetRDTSC32(&endTime64);
+
+ LIres.LowPart=LIres.HighPart=0;
+ MyDoMinus64(&LIres,endTime64,beginTime64);
+ return LIres;
+}
+#else
+void myGetRDTSC32(LARGE_INTEGER * pbeginTime64)
+{
+}
+
+void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64)
+{
+}
+
+LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf)
+{
+ LARGE_INTEGER lr;
+ lr.QuadPart=0;
+ return lr;
+}
+#endif
+#endif
+
+void BeginCountPerfCounter(LARGE_INTEGER * pbeginTime64,BOOL fComputeTimeQueryPerf)
+{
+ if ((!fComputeTimeQueryPerf) || (!QueryPerformanceCounter(pbeginTime64)))
+ {
+ pbeginTime64->LowPart = GetTickCount();
+ pbeginTime64->HighPart = 0;
+ }
+}
+
+DWORD GetMsecSincePerfCounter(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf)
+{
+ LARGE_INTEGER endTime64,ticksPerSecond,ticks;
+ DWORDLONG ticksShifted,tickSecShifted;
+ DWORD dwLog=16+0;
+ DWORD dwRet;
+ if ((!fComputeTimeQueryPerf) || (!QueryPerformanceCounter(&endTime64)))
+ dwRet = (GetTickCount() - beginTime64.LowPart)*1;
+ else
+ {
+ MyDoMinus64(&ticks,endTime64,beginTime64);
+ QueryPerformanceFrequency(&ticksPerSecond);
+
+
+ {
+ ticksShifted = Int64ShrlMod32(*(DWORDLONG*)&ticks,dwLog);
+ tickSecShifted = Int64ShrlMod32(*(DWORDLONG*)&ticksPerSecond,dwLog);
+
+ }
+
+ dwRet = (DWORD)((((DWORD)ticksShifted)*1000)/(DWORD)(tickSecShifted));
+ dwRet *=1;
+ }
+ return dwRet;
+}
+
+int ReadFileMemory(const char* filename,long* plFileSize,unsigned char** pFilePtr)
+{
+ FILE* stream;
+ unsigned char* ptr;
+ int retVal=1;
+ stream=fopen(filename, "rb");
+ if (stream==NULL)
+ return 0;
+
+ fseek(stream,0,SEEK_END);
+
+ *plFileSize=ftell(stream);
+ fseek(stream,0,SEEK_SET);
+ ptr=malloc((*plFileSize)+1);
+ if (ptr==NULL)
+ retVal=0;
+ else
+ {
+ if (fread(ptr, 1, *plFileSize,stream) != (*plFileSize))
+ retVal=0;
+ }
+ fclose(stream);
+ *pFilePtr=ptr;
+ return retVal;
+}
+
+int main(int argc, char *argv[])
+{
+ int BlockSizeCompress=0x8000;
+ int BlockSizeUncompress=0x8000;
+ int cprLevel=Z_DEFAULT_COMPRESSION ;
+ long lFileSize;
+ unsigned char* FilePtr;
+ long lBufferSizeCpr;
+ long lBufferSizeUncpr;
+ long lCompressedSize=0;
+ unsigned char* CprPtr;
+ unsigned char* UncprPtr;
+ long lSizeCpr,lSizeUncpr;
+ DWORD dwGetTick,dwMsecQP;
+ LARGE_INTEGER li_qp,li_rdtsc,dwResRdtsc;
+
+ if (argc<=1)
+ {
+ printf("run TestZlib <File> [BlockSizeCompress] [BlockSizeUncompress] [compres. level]\n");
+ return 0;
+ }
+
+ if (ReadFileMemory(argv[1],&lFileSize,&FilePtr)==0)
+ {
+ printf("error reading %s\n",argv[1]);
+ return 1;
+ }
+ else printf("file %s read, %u bytes\n",argv[1],lFileSize);
+
+ if (argc>=3)
+ BlockSizeCompress=atol(argv[2]);
+
+ if (argc>=4)
+ BlockSizeUncompress=atol(argv[3]);
+
+ if (argc>=5)
+ cprLevel=(int)atol(argv[4]);
+
+ lBufferSizeCpr = lFileSize + (lFileSize/0x10) + 0x200;
+ lBufferSizeUncpr = lBufferSizeCpr;
+
+ CprPtr=(unsigned char*)malloc(lBufferSizeCpr + BlockSizeCompress);
+
+ BeginCountPerfCounter(&li_qp,TRUE);
+ dwGetTick=GetTickCount();
+ BeginCountRdtsc(&li_rdtsc);
+ {
+ z_stream zcpr;
+ int ret=Z_OK;
+ long lOrigToDo = lFileSize;
+ long lOrigDone = 0;
+ int step=0;
+ memset(&zcpr,0,sizeof(z_stream));
+ deflateInit(&zcpr,cprLevel);
+
+ zcpr.next_in = FilePtr;
+ zcpr.next_out = CprPtr;
+
+
+ do
+ {
+ long all_read_before = zcpr.total_in;
+ zcpr.avail_in = min(lOrigToDo,BlockSizeCompress);
+ zcpr.avail_out = BlockSizeCompress;
+ ret=deflate(&zcpr,(zcpr.avail_in==lOrigToDo) ? Z_FINISH : Z_SYNC_FLUSH);
+ lOrigDone += (zcpr.total_in-all_read_before);
+ lOrigToDo -= (zcpr.total_in-all_read_before);
+ step++;
+ } while (ret==Z_OK);
+
+ lSizeCpr=zcpr.total_out;
+ deflateEnd(&zcpr);
+ dwGetTick=GetTickCount()-dwGetTick;
+ dwMsecQP=GetMsecSincePerfCounter(li_qp,TRUE);
+ dwResRdtsc=GetResRdtsc(li_rdtsc,TRUE);
+ printf("total compress size = %u, in %u step\n",lSizeCpr,step);
+ printf("time = %u msec = %f sec\n",dwGetTick,dwGetTick/(double)1000.);
+ printf("defcpr time QP = %u msec = %f sec\n",dwMsecQP,dwMsecQP/(double)1000.);
+ printf("defcpr result rdtsc = %I64x\n\n",dwResRdtsc.QuadPart);
+ }
+
+ CprPtr=(unsigned char*)realloc(CprPtr,lSizeCpr);
+ UncprPtr=(unsigned char*)malloc(lBufferSizeUncpr + BlockSizeUncompress);
+
+ BeginCountPerfCounter(&li_qp,TRUE);
+ dwGetTick=GetTickCount();
+ BeginCountRdtsc(&li_rdtsc);
+ {
+ z_stream zcpr;
+ int ret=Z_OK;
+ long lOrigToDo = lSizeCpr;
+ long lOrigDone = 0;
+ int step=0;
+ memset(&zcpr,0,sizeof(z_stream));
+ inflateInit(&zcpr);
+
+ zcpr.next_in = CprPtr;
+ zcpr.next_out = UncprPtr;
+
+
+ do
+ {
+ long all_read_before = zcpr.total_in;
+ zcpr.avail_in = min(lOrigToDo,BlockSizeUncompress);
+ zcpr.avail_out = BlockSizeUncompress;
+ ret=inflate(&zcpr,Z_SYNC_FLUSH);
+ lOrigDone += (zcpr.total_in-all_read_before);
+ lOrigToDo -= (zcpr.total_in-all_read_before);
+ step++;
+ } while (ret==Z_OK);
+
+ lSizeUncpr=zcpr.total_out;
+ inflateEnd(&zcpr);
+ dwGetTick=GetTickCount()-dwGetTick;
+ dwMsecQP=GetMsecSincePerfCounter(li_qp,TRUE);
+ dwResRdtsc=GetResRdtsc(li_rdtsc,TRUE);
+ printf("total uncompress size = %u, in %u step\n",lSizeUncpr,step);
+ printf("time = %u msec = %f sec\n",dwGetTick,dwGetTick/(double)1000.);
+ printf("uncpr time QP = %u msec = %f sec\n",dwMsecQP,dwMsecQP/(double)1000.);
+ printf("uncpr result rdtsc = %I64x\n\n",dwResRdtsc.QuadPart);
+ }
+
+ if (lSizeUncpr==lFileSize)
+ {
+ if (memcmp(FilePtr,UncprPtr,lFileSize)==0)
+ printf("compare ok\n");
+
+ }
+
+ return 0;
+}
diff --git a/contrib/zlib/contrib/testzlib/testzlib.txt b/contrib/zlib/contrib/testzlib/testzlib.txt
new file mode 100644
index 000000000..e508bb22f
--- /dev/null
+++ b/contrib/zlib/contrib/testzlib/testzlib.txt
@@ -0,0 +1,10 @@
+To build testzLib with Visual Studio 2005:
+
+copy to a directory file from :
+- root of zLib tree
+- contrib/testzlib
+- contrib/masmx86
+- contrib/masmx64
+- contrib/vstudio/vc7
+
+and open testzlib8.sln \ No newline at end of file
diff --git a/contrib/zlib/contrib/untgz/Makefile.msc b/contrib/zlib/contrib/untgz/Makefile.msc
new file mode 100644
index 000000000..77b860221
--- /dev/null
+++ b/contrib/zlib/contrib/untgz/Makefile.msc
@@ -0,0 +1,17 @@
+CC=cl
+CFLAGS=-MD
+
+untgz.exe: untgz.obj ..\..\zlib.lib
+ $(CC) $(CFLAGS) untgz.obj ..\..\zlib.lib
+
+untgz.obj: untgz.c ..\..\zlib.h
+ $(CC) $(CFLAGS) -c -I..\.. untgz.c
+
+..\..\zlib.lib:
+ cd ..\..
+ $(MAKE) -f win32\makefile.msc
+ cd contrib\untgz
+
+clean:
+ -del untgz.obj
+ -del untgz.exe
diff --git a/contrib/zlib/contrib/untgz/untgz.c b/contrib/zlib/contrib/untgz/untgz.c
new file mode 100644
index 000000000..2c391e598
--- /dev/null
+++ b/contrib/zlib/contrib/untgz/untgz.c
@@ -0,0 +1,674 @@
+/*
+ * untgz.c -- Display contents and extract files from a gzip'd TAR file
+ *
+ * written by Pedro A. Aranda Gutierrez <paag@tid.es>
+ * adaptation to Unix by Jean-loup Gailly <jloup@gzip.org>
+ * various fixes by Cosmin Truta <cosmint@cs.ubbcluj.ro>
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <errno.h>
+
+#include "zlib.h"
+
+#ifdef unix
+# include <unistd.h>
+#else
+# include <direct.h>
+# include <io.h>
+#endif
+
+#ifdef WIN32
+#include <windows.h>
+# ifndef F_OK
+# define F_OK 0
+# endif
+# define mkdir(dirname,mode) _mkdir(dirname)
+# ifdef _MSC_VER
+# define access(path,mode) _access(path,mode)
+# define chmod(path,mode) _chmod(path,mode)
+# define strdup(str) _strdup(str)
+# endif
+#else
+# include <utime.h>
+#endif
+
+
+/* values used in typeflag field */
+
+#define REGTYPE '0' /* regular file */
+#define AREGTYPE '\0' /* regular file */
+#define LNKTYPE '1' /* link */
+#define SYMTYPE '2' /* reserved */
+#define CHRTYPE '3' /* character special */
+#define BLKTYPE '4' /* block special */
+#define DIRTYPE '5' /* directory */
+#define FIFOTYPE '6' /* FIFO special */
+#define CONTTYPE '7' /* reserved */
+
+/* GNU tar extensions */
+
+#define GNUTYPE_DUMPDIR 'D' /* file names from dumped directory */
+#define GNUTYPE_LONGLINK 'K' /* long link name */
+#define GNUTYPE_LONGNAME 'L' /* long file name */
+#define GNUTYPE_MULTIVOL 'M' /* continuation of file from another volume */
+#define GNUTYPE_NAMES 'N' /* file name that does not fit into main hdr */
+#define GNUTYPE_SPARSE 'S' /* sparse file */
+#define GNUTYPE_VOLHDR 'V' /* tape/volume header */
+
+
+/* tar header */
+
+#define BLOCKSIZE 512
+#define SHORTNAMESIZE 100
+
+struct tar_header
+{ /* byte offset */
+ char name[100]; /* 0 */
+ char mode[8]; /* 100 */
+ char uid[8]; /* 108 */
+ char gid[8]; /* 116 */
+ char size[12]; /* 124 */
+ char mtime[12]; /* 136 */
+ char chksum[8]; /* 148 */
+ char typeflag; /* 156 */
+ char linkname[100]; /* 157 */
+ char magic[6]; /* 257 */
+ char version[2]; /* 263 */
+ char uname[32]; /* 265 */
+ char gname[32]; /* 297 */
+ char devmajor[8]; /* 329 */
+ char devminor[8]; /* 337 */
+ char prefix[155]; /* 345 */
+ /* 500 */
+};
+
+union tar_buffer
+{
+ char buffer[BLOCKSIZE];
+ struct tar_header header;
+};
+
+struct attr_item
+{
+ struct attr_item *next;
+ char *fname;
+ int mode;
+ time_t time;
+};
+
+enum { TGZ_EXTRACT, TGZ_LIST, TGZ_INVALID };
+
+char *TGZfname OF((const char *));
+void TGZnotfound OF((const char *));
+
+int getoct OF((char *, int));
+char *strtime OF((time_t *));
+int setfiletime OF((char *, time_t));
+void push_attr OF((struct attr_item **, char *, int, time_t));
+void restore_attr OF((struct attr_item **));
+
+int ExprMatch OF((char *, char *));
+
+int makedir OF((char *));
+int matchname OF((int, int, char **, char *));
+
+void error OF((const char *));
+int tar OF((gzFile, int, int, int, char **));
+
+void help OF((int));
+int main OF((int, char **));
+
+char *prog;
+
+const char *TGZsuffix[] = { "\0", ".tar", ".tar.gz", ".taz", ".tgz", NULL };
+
+/* return the file name of the TGZ archive */
+/* or NULL if it does not exist */
+
+char *TGZfname (const char *arcname)
+{
+ static char buffer[1024];
+ int origlen,i;
+
+ strcpy(buffer,arcname);
+ origlen = strlen(buffer);
+
+ for (i=0; TGZsuffix[i]; i++)
+ {
+ strcpy(buffer+origlen,TGZsuffix[i]);
+ if (access(buffer,F_OK) == 0)
+ return buffer;
+ }
+ return NULL;
+}
+
+
+/* error message for the filename */
+
+void TGZnotfound (const char *arcname)
+{
+ int i;
+
+ fprintf(stderr,"%s: Couldn't find ",prog);
+ for (i=0;TGZsuffix[i];i++)
+ fprintf(stderr,(TGZsuffix[i+1]) ? "%s%s, " : "or %s%s\n",
+ arcname,
+ TGZsuffix[i]);
+ exit(1);
+}
+
+
+/* convert octal digits to int */
+/* on error return -1 */
+
+int getoct (char *p,int width)
+{
+ int result = 0;
+ char c;
+
+ while (width--)
+ {
+ c = *p++;
+ if (c == 0)
+ break;
+ if (c == ' ')
+ continue;
+ if (c < '0' || c > '7')
+ return -1;
+ result = result * 8 + (c - '0');
+ }
+ return result;
+}
+
+
+/* convert time_t to string */
+/* use the "YYYY/MM/DD hh:mm:ss" format */
+
+char *strtime (time_t *t)
+{
+ struct tm *local;
+ static char result[32];
+
+ local = localtime(t);
+ sprintf(result,"%4d/%02d/%02d %02d:%02d:%02d",
+ local->tm_year+1900, local->tm_mon+1, local->tm_mday,
+ local->tm_hour, local->tm_min, local->tm_sec);
+ return result;
+}
+
+
+/* set file time */
+
+int setfiletime (char *fname,time_t ftime)
+{
+#ifdef WIN32
+ static int isWinNT = -1;
+ SYSTEMTIME st;
+ FILETIME locft, modft;
+ struct tm *loctm;
+ HANDLE hFile;
+ int result;
+
+ loctm = localtime(&ftime);
+ if (loctm == NULL)
+ return -1;
+
+ st.wYear = (WORD)loctm->tm_year + 1900;
+ st.wMonth = (WORD)loctm->tm_mon + 1;
+ st.wDayOfWeek = (WORD)loctm->tm_wday;
+ st.wDay = (WORD)loctm->tm_mday;
+ st.wHour = (WORD)loctm->tm_hour;
+ st.wMinute = (WORD)loctm->tm_min;
+ st.wSecond = (WORD)loctm->tm_sec;
+ st.wMilliseconds = 0;
+ if (!SystemTimeToFileTime(&st, &locft) ||
+ !LocalFileTimeToFileTime(&locft, &modft))
+ return -1;
+
+ if (isWinNT < 0)
+ isWinNT = (GetVersion() < 0x80000000) ? 1 : 0;
+ hFile = CreateFile(fname, GENERIC_WRITE, 0, NULL, OPEN_EXISTING,
+ (isWinNT ? FILE_FLAG_BACKUP_SEMANTICS : 0),
+ NULL);
+ if (hFile == INVALID_HANDLE_VALUE)
+ return -1;
+ result = SetFileTime(hFile, NULL, NULL, &modft) ? 0 : -1;
+ CloseHandle(hFile);
+ return result;
+#else
+ struct utimbuf settime;
+
+ settime.actime = settime.modtime = ftime;
+ return utime(fname,&settime);
+#endif
+}
+
+
+/* push file attributes */
+
+void push_attr(struct attr_item **list,char *fname,int mode,time_t time)
+{
+ struct attr_item *item;
+
+ item = (struct attr_item *)malloc(sizeof(struct attr_item));
+ if (item == NULL)
+ error("Out of memory");
+ item->fname = strdup(fname);
+ item->mode = mode;
+ item->time = time;
+ item->next = *list;
+ *list = item;
+}
+
+
+/* restore file attributes */
+
+void restore_attr(struct attr_item **list)
+{
+ struct attr_item *item, *prev;
+
+ for (item = *list; item != NULL; )
+ {
+ setfiletime(item->fname,item->time);
+ chmod(item->fname,item->mode);
+ prev = item;
+ item = item->next;
+ free(prev);
+ }
+ *list = NULL;
+}
+
+
+/* match regular expression */
+
+#define ISSPECIAL(c) (((c) == '*') || ((c) == '/'))
+
+int ExprMatch (char *string,char *expr)
+{
+ while (1)
+ {
+ if (ISSPECIAL(*expr))
+ {
+ if (*expr == '/')
+ {
+ if (*string != '\\' && *string != '/')
+ return 0;
+ string ++; expr++;
+ }
+ else if (*expr == '*')
+ {
+ if (*expr ++ == 0)
+ return 1;
+ while (*++string != *expr)
+ if (*string == 0)
+ return 0;
+ }
+ }
+ else
+ {
+ if (*string != *expr)
+ return 0;
+ if (*expr++ == 0)
+ return 1;
+ string++;
+ }
+ }
+}
+
+
+/* recursive mkdir */
+/* abort on ENOENT; ignore other errors like "directory already exists" */
+/* return 1 if OK */
+/* 0 on error */
+
+int makedir (char *newdir)
+{
+ char *buffer = strdup(newdir);
+ char *p;
+ int len = strlen(buffer);
+
+ if (len <= 0) {
+ free(buffer);
+ return 0;
+ }
+ if (buffer[len-1] == '/') {
+ buffer[len-1] = '\0';
+ }
+ if (mkdir(buffer, 0755) == 0)
+ {
+ free(buffer);
+ return 1;
+ }
+
+ p = buffer+1;
+ while (1)
+ {
+ char hold;
+
+ while(*p && *p != '\\' && *p != '/')
+ p++;
+ hold = *p;
+ *p = 0;
+ if ((mkdir(buffer, 0755) == -1) && (errno == ENOENT))
+ {
+ fprintf(stderr,"%s: Couldn't create directory %s\n",prog,buffer);
+ free(buffer);
+ return 0;
+ }
+ if (hold == 0)
+ break;
+ *p++ = hold;
+ }
+ free(buffer);
+ return 1;
+}
+
+
+int matchname (int arg,int argc,char **argv,char *fname)
+{
+ if (arg == argc) /* no arguments given (untgz tgzarchive) */
+ return 1;
+
+ while (arg < argc)
+ if (ExprMatch(fname,argv[arg++]))
+ return 1;
+
+ return 0; /* ignore this for the moment being */
+}
+
+
+/* tar file list or extract */
+
+int tar (gzFile in,int action,int arg,int argc,char **argv)
+{
+ union tar_buffer buffer;
+ int len;
+ int err;
+ int getheader = 1;
+ int remaining = 0;
+ FILE *outfile = NULL;
+ char fname[BLOCKSIZE];
+ int tarmode;
+ time_t tartime;
+ struct attr_item *attributes = NULL;
+
+ if (action == TGZ_LIST)
+ printf(" date time size file\n"
+ " ---------- -------- --------- -------------------------------------\n");
+ while (1)
+ {
+ len = gzread(in, &buffer, BLOCKSIZE);
+ if (len < 0)
+ error(gzerror(in, &err));
+ /*
+ * Always expect complete blocks to process
+ * the tar information.
+ */
+ if (len != BLOCKSIZE)
+ {
+ action = TGZ_INVALID; /* force error exit */
+ remaining = 0; /* force I/O cleanup */
+ }
+
+ /*
+ * If we have to get a tar header
+ */
+ if (getheader >= 1)
+ {
+ /*
+ * if we met the end of the tar
+ * or the end-of-tar block,
+ * we are done
+ */
+ if (len == 0 || buffer.header.name[0] == 0)
+ break;
+
+ tarmode = getoct(buffer.header.mode,8);
+ tartime = (time_t)getoct(buffer.header.mtime,12);
+ if (tarmode == -1 || tartime == (time_t)-1)
+ {
+ buffer.header.name[0] = 0;
+ action = TGZ_INVALID;
+ }
+
+ if (getheader == 1)
+ {
+ strncpy(fname,buffer.header.name,SHORTNAMESIZE);
+ if (fname[SHORTNAMESIZE-1] != 0)
+ fname[SHORTNAMESIZE] = 0;
+ }
+ else
+ {
+ /*
+ * The file name is longer than SHORTNAMESIZE
+ */
+ if (strncmp(fname,buffer.header.name,SHORTNAMESIZE-1) != 0)
+ error("bad long name");
+ getheader = 1;
+ }
+
+ /*
+ * Act according to the type flag
+ */
+ switch (buffer.header.typeflag)
+ {
+ case DIRTYPE:
+ if (action == TGZ_LIST)
+ printf(" %s <dir> %s\n",strtime(&tartime),fname);
+ if (action == TGZ_EXTRACT)
+ {
+ makedir(fname);
+ push_attr(&attributes,fname,tarmode,tartime);
+ }
+ break;
+ case REGTYPE:
+ case AREGTYPE:
+ remaining = getoct(buffer.header.size,12);
+ if (remaining == -1)
+ {
+ action = TGZ_INVALID;
+ break;
+ }
+ if (action == TGZ_LIST)
+ printf(" %s %9d %s\n",strtime(&tartime),remaining,fname);
+ else if (action == TGZ_EXTRACT)
+ {
+ if (matchname(arg,argc,argv,fname))
+ {
+ outfile = fopen(fname,"wb");
+ if (outfile == NULL) {
+ /* try creating directory */
+ char *p = strrchr(fname, '/');
+ if (p != NULL) {
+ *p = '\0';
+ makedir(fname);
+ *p = '/';
+ outfile = fopen(fname,"wb");
+ }
+ }
+ if (outfile != NULL)
+ printf("Extracting %s\n",fname);
+ else
+ fprintf(stderr, "%s: Couldn't create %s",prog,fname);
+ }
+ else
+ outfile = NULL;
+ }
+ getheader = 0;
+ break;
+ case GNUTYPE_LONGLINK:
+ case GNUTYPE_LONGNAME:
+ remaining = getoct(buffer.header.size,12);
+ if (remaining < 0 || remaining >= BLOCKSIZE)
+ {
+ action = TGZ_INVALID;
+ break;
+ }
+ len = gzread(in, fname, BLOCKSIZE);
+ if (len < 0)
+ error(gzerror(in, &err));
+ if (fname[BLOCKSIZE-1] != 0 || (int)strlen(fname) > remaining)
+ {
+ action = TGZ_INVALID;
+ break;
+ }
+ getheader = 2;
+ break;
+ default:
+ if (action == TGZ_LIST)
+ printf(" %s <---> %s\n",strtime(&tartime),fname);
+ break;
+ }
+ }
+ else
+ {
+ unsigned int bytes = (remaining > BLOCKSIZE) ? BLOCKSIZE : remaining;
+
+ if (outfile != NULL)
+ {
+ if (fwrite(&buffer,sizeof(char),bytes,outfile) != bytes)
+ {
+ fprintf(stderr,
+ "%s: Error writing %s -- skipping\n",prog,fname);
+ fclose(outfile);
+ outfile = NULL;
+ remove(fname);
+ }
+ }
+ remaining -= bytes;
+ }
+
+ if (remaining == 0)
+ {
+ getheader = 1;
+ if (outfile != NULL)
+ {
+ fclose(outfile);
+ outfile = NULL;
+ if (action != TGZ_INVALID)
+ push_attr(&attributes,fname,tarmode,tartime);
+ }
+ }
+
+ /*
+ * Abandon if errors are found
+ */
+ if (action == TGZ_INVALID)
+ {
+ error("broken archive");
+ break;
+ }
+ }
+
+ /*
+ * Restore file modes and time stamps
+ */
+ restore_attr(&attributes);
+
+ if (gzclose(in) != Z_OK)
+ error("failed gzclose");
+
+ return 0;
+}
+
+
+/* ============================================================ */
+
+void help(int exitval)
+{
+ printf("untgz version 0.2.1\n"
+ " using zlib version %s\n\n",
+ zlibVersion());
+ printf("Usage: untgz file.tgz extract all files\n"
+ " untgz file.tgz fname ... extract selected files\n"
+ " untgz -l file.tgz list archive contents\n"
+ " untgz -h display this help\n");
+ exit(exitval);
+}
+
+void error(const char *msg)
+{
+ fprintf(stderr, "%s: %s\n", prog, msg);
+ exit(1);
+}
+
+
+/* ============================================================ */
+
+#if defined(WIN32) && defined(__GNUC__)
+int _CRT_glob = 0; /* disable argument globbing in MinGW */
+#endif
+
+int main(int argc,char **argv)
+{
+ int action = TGZ_EXTRACT;
+ int arg = 1;
+ char *TGZfile;
+ gzFile *f;
+
+ prog = strrchr(argv[0],'\\');
+ if (prog == NULL)
+ {
+ prog = strrchr(argv[0],'/');
+ if (prog == NULL)
+ {
+ prog = strrchr(argv[0],':');
+ if (prog == NULL)
+ prog = argv[0];
+ else
+ prog++;
+ }
+ else
+ prog++;
+ }
+ else
+ prog++;
+
+ if (argc == 1)
+ help(0);
+
+ if (strcmp(argv[arg],"-l") == 0)
+ {
+ action = TGZ_LIST;
+ if (argc == ++arg)
+ help(0);
+ }
+ else if (strcmp(argv[arg],"-h") == 0)
+ {
+ help(0);
+ }
+
+ if ((TGZfile = TGZfname(argv[arg])) == NULL)
+ TGZnotfound(argv[arg]);
+
+ ++arg;
+ if ((action == TGZ_LIST) && (arg != argc))
+ help(1);
+
+/*
+ * Process the TGZ file
+ */
+ switch(action)
+ {
+ case TGZ_LIST:
+ case TGZ_EXTRACT:
+ f = gzopen(TGZfile,"rb");
+ if (f == NULL)
+ {
+ fprintf(stderr,"%s: Couldn't gzopen %s\n",prog,TGZfile);
+ return 1;
+ }
+ exit(tar(f, action, arg, argc, argv));
+ break;
+
+ default:
+ error("Unknown option");
+ exit(1);
+ }
+
+ return 0;
+}
diff --git a/contrib/zlib/contrib/vstudio/readme.txt b/contrib/zlib/contrib/vstudio/readme.txt
new file mode 100644
index 000000000..48cccc0d2
--- /dev/null
+++ b/contrib/zlib/contrib/vstudio/readme.txt
@@ -0,0 +1,78 @@
+Building instructions for the DLL versions of Zlib 1.2.11
+========================================================
+
+This directory contains projects that build zlib and minizip using
+Microsoft Visual C++ 9.0/10.0.
+
+You don't need to build these projects yourself. You can download the
+binaries from:
+ http://www.winimage.com/zLibDll
+
+More information can be found at this site.
+
+
+
+
+
+Build instructions for Visual Studio 2008 (32 bits or 64 bits)
+--------------------------------------------------------------
+- Decompress current zlib, including all contrib/* files
+- Compile assembly code (with Visual Studio Command Prompt) by running:
+ bld_ml64.bat (in contrib\masmx64)
+ bld_ml32.bat (in contrib\masmx86)
+- Open contrib\vstudio\vc9\zlibvc.sln with Microsoft Visual C++ 2008
+- Or run: vcbuild /rebuild contrib\vstudio\vc9\zlibvc.sln "Release|Win32"
+
+Build instructions for Visual Studio 2010 (32 bits or 64 bits)
+--------------------------------------------------------------
+- Decompress current zlib, including all contrib/* files
+- Open contrib\vstudio\vc10\zlibvc.sln with Microsoft Visual C++ 2010
+
+Build instructions for Visual Studio 2012 (32 bits or 64 bits)
+--------------------------------------------------------------
+- Decompress current zlib, including all contrib/* files
+- Open contrib\vstudio\vc11\zlibvc.sln with Microsoft Visual C++ 2012
+
+Build instructions for Visual Studio 2013 (32 bits or 64 bits)
+--------------------------------------------------------------
+- Decompress current zlib, including all contrib/* files
+- Open contrib\vstudio\vc12\zlibvc.sln with Microsoft Visual C++ 2013
+
+Build instructions for Visual Studio 2015 (32 bits or 64 bits)
+--------------------------------------------------------------
+- Decompress current zlib, including all contrib/* files
+- Open contrib\vstudio\vc14\zlibvc.sln with Microsoft Visual C++ 2015
+
+
+Important
+---------
+- To use zlibwapi.dll in your application, you must define the
+ macro ZLIB_WINAPI when compiling your application's source files.
+
+
+Additional notes
+----------------
+- This DLL, named zlibwapi.dll, is compatible to the old zlib.dll built
+ by Gilles Vollant from the zlib 1.1.x sources, and distributed at
+ http://www.winimage.com/zLibDll
+ It uses the WINAPI calling convention for the exported functions, and
+ includes the minizip functionality. If your application needs that
+ particular build of zlib.dll, you can rename zlibwapi.dll to zlib.dll.
+
+- The new DLL was renamed because there exist several incompatible
+ versions of zlib.dll on the Internet.
+
+- There is also an official DLL build of zlib, named zlib1.dll. This one
+ is exporting the functions using the CDECL convention. See the file
+ win32\DLL_FAQ.txt found in this zlib distribution.
+
+- There used to be a ZLIB_DLL macro in zlib 1.1.x, but now this symbol
+ has a slightly different effect. To avoid compatibility problems, do
+ not define it here.
+
+
+Gilles Vollant
+info@winimage.com
+
+Visual Studio 2013 and 2015 Projects from Sean Hunt
+seandhunt_7@yahoo.com
diff --git a/contrib/zlib/contrib/vstudio/vc10/zlib.rc b/contrib/zlib/contrib/vstudio/vc10/zlib.rc
new file mode 100644
index 000000000..c4e4b016e
--- /dev/null
+++ b/contrib/zlib/contrib/vstudio/vc10/zlib.rc
@@ -0,0 +1,32 @@
+#include <windows.h>
+
+#define IDR_VERSION1 1
+IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
+ FILEVERSION 1, 2, 11, 0
+ PRODUCTVERSION 1, 2, 11, 0
+ FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
+ FILEFLAGS 0
+ FILEOS VOS_DOS_WINDOWS32
+ FILETYPE VFT_DLL
+ FILESUBTYPE 0 // not used
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904E4"
+ //language ID = U.S. English, char set = Windows, Multilingual
+
+ BEGIN
+ VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
+ VALUE "FileVersion", "1.2.11\0"
+ VALUE "InternalName", "zlib\0"
+ VALUE "OriginalFilename", "zlibwapi.dll\0"
+ VALUE "ProductName", "ZLib.DLL\0"
+ VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
+ VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0409, 1252
+ END
+END
diff --git a/contrib/zlib/contrib/vstudio/vc10/zlibvc.def b/contrib/zlib/contrib/vstudio/vc10/zlibvc.def
new file mode 100644
index 000000000..f876c3bca
--- /dev/null
+++ b/contrib/zlib/contrib/vstudio/vc10/zlibvc.def
@@ -0,0 +1,153 @@
+LIBRARY
+; zlib data compression and ZIP file I/O library
+
+VERSION 1.2
+
+EXPORTS
+ adler32 @1
+ compress @2
+ crc32 @3
+ deflate @4
+ deflateCopy @5
+ deflateEnd @6
+ deflateInit2_ @7
+ deflateInit_ @8
+ deflateParams @9
+ deflateReset @10
+ deflateSetDictionary @11
+ gzclose @12
+ gzdopen @13
+ gzerror @14
+ gzflush @15
+ gzopen @16
+ gzread @17
+ gzwrite @18
+ inflate @19
+ inflateEnd @20
+ inflateInit2_ @21
+ inflateInit_ @22
+ inflateReset @23
+ inflateSetDictionary @24
+ inflateSync @25
+ uncompress @26
+ zlibVersion @27
+ gzprintf @28
+ gzputc @29
+ gzgetc @30
+ gzseek @31
+ gzrewind @32
+ gztell @33
+ gzeof @34
+ gzsetparams @35
+ zError @36
+ inflateSyncPoint @37
+ get_crc_table @38
+ compress2 @39
+ gzputs @40
+ gzgets @41
+ inflateCopy @42
+ inflateBackInit_ @43
+ inflateBack @44
+ inflateBackEnd @45
+ compressBound @46
+ deflateBound @47
+ gzclearerr @48
+ gzungetc @49
+ zlibCompileFlags @50
+ deflatePrime @51
+ deflatePending @52
+
+ unzOpen @61
+ unzClose @62
+ unzGetGlobalInfo @63
+ unzGetCurrentFileInfo @64
+ unzGoToFirstFile @65
+ unzGoToNextFile @66
+ unzOpenCurrentFile @67
+ unzReadCurrentFile @68
+ unzOpenCurrentFile3 @69
+ unztell @70
+ unzeof @71
+ unzCloseCurrentFile @72
+ unzGetGlobalComment @73
+ unzStringFileNameCompare @74
+ unzLocateFile @75
+ unzGetLocalExtrafield @76
+ unzOpen2 @77
+ unzOpenCurrentFile2 @78
+ unzOpenCurrentFilePassword @79
+
+ zipOpen @80
+ zipOpenNewFileInZip @81
+ zipWriteInFileInZip @82
+ zipCloseFileInZip @83
+ zipClose @84
+ zipOpenNewFileInZip2 @86
+ zipCloseFileInZipRaw @87
+ zipOpen2 @88
+ zipOpenNewFileInZip3 @89
+
+ unzGetFilePos @100
+ unzGoToFilePos @101
+
+ fill_win32_filefunc @110
+
+; zlibwapi v1.2.4 added:
+ fill_win32_filefunc64 @111
+ fill_win32_filefunc64A @112
+ fill_win32_filefunc64W @113
+
+ unzOpen64 @120
+ unzOpen2_64 @121
+ unzGetGlobalInfo64 @122
+ unzGetCurrentFileInfo64 @124
+ unzGetCurrentFileZStreamPos64 @125
+ unztell64 @126
+ unzGetFilePos64 @127
+ unzGoToFilePos64 @128
+
+ zipOpen64 @130
+ zipOpen2_64 @131
+ zipOpenNewFileInZip64 @132
+ zipOpenNewFileInZip2_64 @133
+ zipOpenNewFileInZip3_64 @134
+ zipOpenNewFileInZip4_64 @135
+ zipCloseFileInZipRaw64 @136
+
+; zlib1 v1.2.4 added:
+ adler32_combine @140
+ crc32_combine @142
+ deflateSetHeader @144
+ deflateTune @145
+ gzbuffer @146
+ gzclose_r @147
+ gzclose_w @148
+ gzdirect @149
+ gzoffset @150
+ inflateGetHeader @156
+ inflateMark @157
+ inflatePrime @158
+ inflateReset2 @159
+ inflateUndermine @160
+
+; zlib1 v1.2.6 added:
+ gzgetc_ @161
+ inflateResetKeep @163
+ deflateResetKeep @164
+
+; zlib1 v1.2.7 added:
+ gzopen_w @165
+
+; zlib1 v1.2.8 added:
+ inflateGetDictionary @166
+ gzvprintf @167
+
+; zlib1 v1.2.9 added:
+ inflateCodesUsed @168
+ inflateValidate @169
+ uncompress2 @170
+ gzfread @171
+ gzfwrite @172
+ deflateGetDictionary @173
+ adler32_z @174
+ crc32_z @175
diff --git a/contrib/zlib/contrib/vstudio/vc11/zlib.rc b/contrib/zlib/contrib/vstudio/vc11/zlib.rc
new file mode 100644
index 000000000..c4e4b016e
--- /dev/null
+++ b/contrib/zlib/contrib/vstudio/vc11/zlib.rc
@@ -0,0 +1,32 @@
+#include <windows.h>
+
+#define IDR_VERSION1 1
+IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
+ FILEVERSION 1, 2, 11, 0
+ PRODUCTVERSION 1, 2, 11, 0
+ FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
+ FILEFLAGS 0
+ FILEOS VOS_DOS_WINDOWS32
+ FILETYPE VFT_DLL
+ FILESUBTYPE 0 // not used
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904E4"
+ //language ID = U.S. English, char set = Windows, Multilingual
+
+ BEGIN
+ VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
+ VALUE "FileVersion", "1.2.11\0"
+ VALUE "InternalName", "zlib\0"
+ VALUE "OriginalFilename", "zlibwapi.dll\0"
+ VALUE "ProductName", "ZLib.DLL\0"
+ VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
+ VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0409, 1252
+ END
+END
diff --git a/contrib/zlib/contrib/vstudio/vc11/zlibvc.def b/contrib/zlib/contrib/vstudio/vc11/zlibvc.def
new file mode 100644
index 000000000..f876c3bca
--- /dev/null
+++ b/contrib/zlib/contrib/vstudio/vc11/zlibvc.def
@@ -0,0 +1,153 @@
+LIBRARY
+; zlib data compression and ZIP file I/O library
+
+VERSION 1.2
+
+EXPORTS
+ adler32 @1
+ compress @2
+ crc32 @3
+ deflate @4
+ deflateCopy @5
+ deflateEnd @6
+ deflateInit2_ @7
+ deflateInit_ @8
+ deflateParams @9
+ deflateReset @10
+ deflateSetDictionary @11
+ gzclose @12
+ gzdopen @13
+ gzerror @14
+ gzflush @15
+ gzopen @16
+ gzread @17
+ gzwrite @18
+ inflate @19
+ inflateEnd @20
+ inflateInit2_ @21
+ inflateInit_ @22
+ inflateReset @23
+ inflateSetDictionary @24
+ inflateSync @25
+ uncompress @26
+ zlibVersion @27
+ gzprintf @28
+ gzputc @29
+ gzgetc @30
+ gzseek @31
+ gzrewind @32
+ gztell @33
+ gzeof @34
+ gzsetparams @35
+ zError @36
+ inflateSyncPoint @37
+ get_crc_table @38
+ compress2 @39
+ gzputs @40
+ gzgets @41
+ inflateCopy @42
+ inflateBackInit_ @43
+ inflateBack @44
+ inflateBackEnd @45
+ compressBound @46
+ deflateBound @47
+ gzclearerr @48
+ gzungetc @49
+ zlibCompileFlags @50
+ deflatePrime @51
+ deflatePending @52
+
+ unzOpen @61
+ unzClose @62
+ unzGetGlobalInfo @63
+ unzGetCurrentFileInfo @64
+ unzGoToFirstFile @65
+ unzGoToNextFile @66
+ unzOpenCurrentFile @67
+ unzReadCurrentFile @68
+ unzOpenCurrentFile3 @69
+ unztell @70
+ unzeof @71
+ unzCloseCurrentFile @72
+ unzGetGlobalComment @73
+ unzStringFileNameCompare @74
+ unzLocateFile @75
+ unzGetLocalExtrafield @76
+ unzOpen2 @77
+ unzOpenCurrentFile2 @78
+ unzOpenCurrentFilePassword @79
+
+ zipOpen @80
+ zipOpenNewFileInZip @81
+ zipWriteInFileInZip @82
+ zipCloseFileInZip @83
+ zipClose @84
+ zipOpenNewFileInZip2 @86
+ zipCloseFileInZipRaw @87
+ zipOpen2 @88
+ zipOpenNewFileInZip3 @89
+
+ unzGetFilePos @100
+ unzGoToFilePos @101
+
+ fill_win32_filefunc @110
+
+; zlibwapi v1.2.4 added:
+ fill_win32_filefunc64 @111
+ fill_win32_filefunc64A @112
+ fill_win32_filefunc64W @113
+
+ unzOpen64 @120
+ unzOpen2_64 @121
+ unzGetGlobalInfo64 @122
+ unzGetCurrentFileInfo64 @124
+ unzGetCurrentFileZStreamPos64 @125
+ unztell64 @126
+ unzGetFilePos64 @127
+ unzGoToFilePos64 @128
+
+ zipOpen64 @130
+ zipOpen2_64 @131
+ zipOpenNewFileInZip64 @132
+ zipOpenNewFileInZip2_64 @133
+ zipOpenNewFileInZip3_64 @134
+ zipOpenNewFileInZip4_64 @135
+ zipCloseFileInZipRaw64 @136
+
+; zlib1 v1.2.4 added:
+ adler32_combine @140
+ crc32_combine @142
+ deflateSetHeader @144
+ deflateTune @145
+ gzbuffer @146
+ gzclose_r @147
+ gzclose_w @148
+ gzdirect @149
+ gzoffset @150
+ inflateGetHeader @156
+ inflateMark @157
+ inflatePrime @158
+ inflateReset2 @159
+ inflateUndermine @160
+
+; zlib1 v1.2.6 added:
+ gzgetc_ @161
+ inflateResetKeep @163
+ deflateResetKeep @164
+
+; zlib1 v1.2.7 added:
+ gzopen_w @165
+
+; zlib1 v1.2.8 added:
+ inflateGetDictionary @166
+ gzvprintf @167
+
+; zlib1 v1.2.9 added:
+ inflateCodesUsed @168
+ inflateValidate @169
+ uncompress2 @170
+ gzfread @171
+ gzfwrite @172
+ deflateGetDictionary @173
+ adler32_z @174
+ crc32_z @175
diff --git a/contrib/zlib/contrib/vstudio/vc12/zlib.rc b/contrib/zlib/contrib/vstudio/vc12/zlib.rc
new file mode 100644
index 000000000..c4e4b016e
--- /dev/null
+++ b/contrib/zlib/contrib/vstudio/vc12/zlib.rc
@@ -0,0 +1,32 @@
+#include <windows.h>
+
+#define IDR_VERSION1 1
+IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
+ FILEVERSION 1, 2, 11, 0
+ PRODUCTVERSION 1, 2, 11, 0
+ FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
+ FILEFLAGS 0
+ FILEOS VOS_DOS_WINDOWS32
+ FILETYPE VFT_DLL
+ FILESUBTYPE 0 // not used
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904E4"
+ //language ID = U.S. English, char set = Windows, Multilingual
+
+ BEGIN
+ VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
+ VALUE "FileVersion", "1.2.11\0"
+ VALUE "InternalName", "zlib\0"
+ VALUE "OriginalFilename", "zlibwapi.dll\0"
+ VALUE "ProductName", "ZLib.DLL\0"
+ VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
+ VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0409, 1252
+ END
+END
diff --git a/contrib/zlib/contrib/vstudio/vc12/zlibvc.def b/contrib/zlib/contrib/vstudio/vc12/zlibvc.def
new file mode 100644
index 000000000..f876c3bca
--- /dev/null
+++ b/contrib/zlib/contrib/vstudio/vc12/zlibvc.def
@@ -0,0 +1,153 @@
+LIBRARY
+; zlib data compression and ZIP file I/O library
+
+VERSION 1.2
+
+EXPORTS
+ adler32 @1
+ compress @2
+ crc32 @3
+ deflate @4
+ deflateCopy @5
+ deflateEnd @6
+ deflateInit2_ @7
+ deflateInit_ @8
+ deflateParams @9
+ deflateReset @10
+ deflateSetDictionary @11
+ gzclose @12
+ gzdopen @13
+ gzerror @14
+ gzflush @15
+ gzopen @16
+ gzread @17
+ gzwrite @18
+ inflate @19
+ inflateEnd @20
+ inflateInit2_ @21
+ inflateInit_ @22
+ inflateReset @23
+ inflateSetDictionary @24
+ inflateSync @25
+ uncompress @26
+ zlibVersion @27
+ gzprintf @28
+ gzputc @29
+ gzgetc @30
+ gzseek @31
+ gzrewind @32
+ gztell @33
+ gzeof @34
+ gzsetparams @35
+ zError @36
+ inflateSyncPoint @37
+ get_crc_table @38
+ compress2 @39
+ gzputs @40
+ gzgets @41
+ inflateCopy @42
+ inflateBackInit_ @43
+ inflateBack @44
+ inflateBackEnd @45
+ compressBound @46
+ deflateBound @47
+ gzclearerr @48
+ gzungetc @49
+ zlibCompileFlags @50
+ deflatePrime @51
+ deflatePending @52
+
+ unzOpen @61
+ unzClose @62
+ unzGetGlobalInfo @63
+ unzGetCurrentFileInfo @64
+ unzGoToFirstFile @65
+ unzGoToNextFile @66
+ unzOpenCurrentFile @67
+ unzReadCurrentFile @68
+ unzOpenCurrentFile3 @69
+ unztell @70
+ unzeof @71
+ unzCloseCurrentFile @72
+ unzGetGlobalComment @73
+ unzStringFileNameCompare @74
+ unzLocateFile @75
+ unzGetLocalExtrafield @76
+ unzOpen2 @77
+ unzOpenCurrentFile2 @78
+ unzOpenCurrentFilePassword @79
+
+ zipOpen @80
+ zipOpenNewFileInZip @81
+ zipWriteInFileInZip @82
+ zipCloseFileInZip @83
+ zipClose @84
+ zipOpenNewFileInZip2 @86
+ zipCloseFileInZipRaw @87
+ zipOpen2 @88
+ zipOpenNewFileInZip3 @89
+
+ unzGetFilePos @100
+ unzGoToFilePos @101
+
+ fill_win32_filefunc @110
+
+; zlibwapi v1.2.4 added:
+ fill_win32_filefunc64 @111
+ fill_win32_filefunc64A @112
+ fill_win32_filefunc64W @113
+
+ unzOpen64 @120
+ unzOpen2_64 @121
+ unzGetGlobalInfo64 @122
+ unzGetCurrentFileInfo64 @124
+ unzGetCurrentFileZStreamPos64 @125
+ unztell64 @126
+ unzGetFilePos64 @127
+ unzGoToFilePos64 @128
+
+ zipOpen64 @130
+ zipOpen2_64 @131
+ zipOpenNewFileInZip64 @132
+ zipOpenNewFileInZip2_64 @133
+ zipOpenNewFileInZip3_64 @134
+ zipOpenNewFileInZip4_64 @135
+ zipCloseFileInZipRaw64 @136
+
+; zlib1 v1.2.4 added:
+ adler32_combine @140
+ crc32_combine @142
+ deflateSetHeader @144
+ deflateTune @145
+ gzbuffer @146
+ gzclose_r @147
+ gzclose_w @148
+ gzdirect @149
+ gzoffset @150
+ inflateGetHeader @156
+ inflateMark @157
+ inflatePrime @158
+ inflateReset2 @159
+ inflateUndermine @160
+
+; zlib1 v1.2.6 added:
+ gzgetc_ @161
+ inflateResetKeep @163
+ deflateResetKeep @164
+
+; zlib1 v1.2.7 added:
+ gzopen_w @165
+
+; zlib1 v1.2.8 added:
+ inflateGetDictionary @166
+ gzvprintf @167
+
+; zlib1 v1.2.9 added:
+ inflateCodesUsed @168
+ inflateValidate @169
+ uncompress2 @170
+ gzfread @171
+ gzfwrite @172
+ deflateGetDictionary @173
+ adler32_z @174
+ crc32_z @175
diff --git a/contrib/zlib/contrib/vstudio/vc14/zlib.rc b/contrib/zlib/contrib/vstudio/vc14/zlib.rc
new file mode 100644
index 000000000..c4e4b016e
--- /dev/null
+++ b/contrib/zlib/contrib/vstudio/vc14/zlib.rc
@@ -0,0 +1,32 @@
+#include <windows.h>
+
+#define IDR_VERSION1 1
+IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
+ FILEVERSION 1, 2, 11, 0
+ PRODUCTVERSION 1, 2, 11, 0
+ FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
+ FILEFLAGS 0
+ FILEOS VOS_DOS_WINDOWS32
+ FILETYPE VFT_DLL
+ FILESUBTYPE 0 // not used
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904E4"
+ //language ID = U.S. English, char set = Windows, Multilingual
+
+ BEGIN
+ VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
+ VALUE "FileVersion", "1.2.11\0"
+ VALUE "InternalName", "zlib\0"
+ VALUE "OriginalFilename", "zlibwapi.dll\0"
+ VALUE "ProductName", "ZLib.DLL\0"
+ VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
+ VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0409, 1252
+ END
+END
diff --git a/contrib/zlib/contrib/vstudio/vc14/zlibvc.def b/contrib/zlib/contrib/vstudio/vc14/zlibvc.def
new file mode 100644
index 000000000..f876c3bca
--- /dev/null
+++ b/contrib/zlib/contrib/vstudio/vc14/zlibvc.def
@@ -0,0 +1,153 @@
+LIBRARY
+; zlib data compression and ZIP file I/O library
+
+VERSION 1.2
+
+EXPORTS
+ adler32 @1
+ compress @2
+ crc32 @3
+ deflate @4
+ deflateCopy @5
+ deflateEnd @6
+ deflateInit2_ @7
+ deflateInit_ @8
+ deflateParams @9
+ deflateReset @10
+ deflateSetDictionary @11
+ gzclose @12
+ gzdopen @13
+ gzerror @14
+ gzflush @15
+ gzopen @16
+ gzread @17
+ gzwrite @18
+ inflate @19
+ inflateEnd @20
+ inflateInit2_ @21
+ inflateInit_ @22
+ inflateReset @23
+ inflateSetDictionary @24
+ inflateSync @25
+ uncompress @26
+ zlibVersion @27
+ gzprintf @28
+ gzputc @29
+ gzgetc @30
+ gzseek @31
+ gzrewind @32
+ gztell @33
+ gzeof @34
+ gzsetparams @35
+ zError @36
+ inflateSyncPoint @37
+ get_crc_table @38
+ compress2 @39
+ gzputs @40
+ gzgets @41
+ inflateCopy @42
+ inflateBackInit_ @43
+ inflateBack @44
+ inflateBackEnd @45
+ compressBound @46
+ deflateBound @47
+ gzclearerr @48
+ gzungetc @49
+ zlibCompileFlags @50
+ deflatePrime @51
+ deflatePending @52
+
+ unzOpen @61
+ unzClose @62
+ unzGetGlobalInfo @63
+ unzGetCurrentFileInfo @64
+ unzGoToFirstFile @65
+ unzGoToNextFile @66
+ unzOpenCurrentFile @67
+ unzReadCurrentFile @68
+ unzOpenCurrentFile3 @69
+ unztell @70
+ unzeof @71
+ unzCloseCurrentFile @72
+ unzGetGlobalComment @73
+ unzStringFileNameCompare @74
+ unzLocateFile @75
+ unzGetLocalExtrafield @76
+ unzOpen2 @77
+ unzOpenCurrentFile2 @78
+ unzOpenCurrentFilePassword @79
+
+ zipOpen @80
+ zipOpenNewFileInZip @81
+ zipWriteInFileInZip @82
+ zipCloseFileInZip @83
+ zipClose @84
+ zipOpenNewFileInZip2 @86
+ zipCloseFileInZipRaw @87
+ zipOpen2 @88
+ zipOpenNewFileInZip3 @89
+
+ unzGetFilePos @100
+ unzGoToFilePos @101
+
+ fill_win32_filefunc @110
+
+; zlibwapi v1.2.4 added:
+ fill_win32_filefunc64 @111
+ fill_win32_filefunc64A @112
+ fill_win32_filefunc64W @113
+
+ unzOpen64 @120
+ unzOpen2_64 @121
+ unzGetGlobalInfo64 @122
+ unzGetCurrentFileInfo64 @124
+ unzGetCurrentFileZStreamPos64 @125
+ unztell64 @126
+ unzGetFilePos64 @127
+ unzGoToFilePos64 @128
+
+ zipOpen64 @130
+ zipOpen2_64 @131
+ zipOpenNewFileInZip64 @132
+ zipOpenNewFileInZip2_64 @133
+ zipOpenNewFileInZip3_64 @134
+ zipOpenNewFileInZip4_64 @135
+ zipCloseFileInZipRaw64 @136
+
+; zlib1 v1.2.4 added:
+ adler32_combine @140
+ crc32_combine @142
+ deflateSetHeader @144
+ deflateTune @145
+ gzbuffer @146
+ gzclose_r @147
+ gzclose_w @148
+ gzdirect @149
+ gzoffset @150
+ inflateGetHeader @156
+ inflateMark @157
+ inflatePrime @158
+ inflateReset2 @159
+ inflateUndermine @160
+
+; zlib1 v1.2.6 added:
+ gzgetc_ @161
+ inflateResetKeep @163
+ deflateResetKeep @164
+
+; zlib1 v1.2.7 added:
+ gzopen_w @165
+
+; zlib1 v1.2.8 added:
+ inflateGetDictionary @166
+ gzvprintf @167
+
+; zlib1 v1.2.9 added:
+ inflateCodesUsed @168
+ inflateValidate @169
+ uncompress2 @170
+ gzfread @171
+ gzfwrite @172
+ deflateGetDictionary @173
+ adler32_z @174
+ crc32_z @175
diff --git a/contrib/zlib/contrib/vstudio/vc9/zlib.rc b/contrib/zlib/contrib/vstudio/vc9/zlib.rc
new file mode 100644
index 000000000..c4e4b016e
--- /dev/null
+++ b/contrib/zlib/contrib/vstudio/vc9/zlib.rc
@@ -0,0 +1,32 @@
+#include <windows.h>
+
+#define IDR_VERSION1 1
+IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
+ FILEVERSION 1, 2, 11, 0
+ PRODUCTVERSION 1, 2, 11, 0
+ FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
+ FILEFLAGS 0
+ FILEOS VOS_DOS_WINDOWS32
+ FILETYPE VFT_DLL
+ FILESUBTYPE 0 // not used
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904E4"
+ //language ID = U.S. English, char set = Windows, Multilingual
+
+ BEGIN
+ VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
+ VALUE "FileVersion", "1.2.11\0"
+ VALUE "InternalName", "zlib\0"
+ VALUE "OriginalFilename", "zlibwapi.dll\0"
+ VALUE "ProductName", "ZLib.DLL\0"
+ VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
+ VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0409, 1252
+ END
+END
diff --git a/contrib/zlib/contrib/vstudio/vc9/zlibvc.def b/contrib/zlib/contrib/vstudio/vc9/zlibvc.def
new file mode 100644
index 000000000..f876c3bca
--- /dev/null
+++ b/contrib/zlib/contrib/vstudio/vc9/zlibvc.def
@@ -0,0 +1,153 @@
+LIBRARY
+; zlib data compression and ZIP file I/O library
+
+VERSION 1.2
+
+EXPORTS
+ adler32 @1
+ compress @2
+ crc32 @3
+ deflate @4
+ deflateCopy @5
+ deflateEnd @6
+ deflateInit2_ @7
+ deflateInit_ @8
+ deflateParams @9
+ deflateReset @10
+ deflateSetDictionary @11
+ gzclose @12
+ gzdopen @13
+ gzerror @14
+ gzflush @15
+ gzopen @16
+ gzread @17
+ gzwrite @18
+ inflate @19
+ inflateEnd @20
+ inflateInit2_ @21
+ inflateInit_ @22
+ inflateReset @23
+ inflateSetDictionary @24
+ inflateSync @25
+ uncompress @26
+ zlibVersion @27
+ gzprintf @28
+ gzputc @29
+ gzgetc @30
+ gzseek @31
+ gzrewind @32
+ gztell @33
+ gzeof @34
+ gzsetparams @35
+ zError @36
+ inflateSyncPoint @37
+ get_crc_table @38
+ compress2 @39
+ gzputs @40
+ gzgets @41
+ inflateCopy @42
+ inflateBackInit_ @43
+ inflateBack @44
+ inflateBackEnd @45
+ compressBound @46
+ deflateBound @47
+ gzclearerr @48
+ gzungetc @49
+ zlibCompileFlags @50
+ deflatePrime @51
+ deflatePending @52
+
+ unzOpen @61
+ unzClose @62
+ unzGetGlobalInfo @63
+ unzGetCurrentFileInfo @64
+ unzGoToFirstFile @65
+ unzGoToNextFile @66
+ unzOpenCurrentFile @67
+ unzReadCurrentFile @68
+ unzOpenCurrentFile3 @69
+ unztell @70
+ unzeof @71
+ unzCloseCurrentFile @72
+ unzGetGlobalComment @73
+ unzStringFileNameCompare @74
+ unzLocateFile @75
+ unzGetLocalExtrafield @76
+ unzOpen2 @77
+ unzOpenCurrentFile2 @78
+ unzOpenCurrentFilePassword @79
+
+ zipOpen @80
+ zipOpenNewFileInZip @81
+ zipWriteInFileInZip @82
+ zipCloseFileInZip @83
+ zipClose @84
+ zipOpenNewFileInZip2 @86
+ zipCloseFileInZipRaw @87
+ zipOpen2 @88
+ zipOpenNewFileInZip3 @89
+
+ unzGetFilePos @100
+ unzGoToFilePos @101
+
+ fill_win32_filefunc @110
+
+; zlibwapi v1.2.4 added:
+ fill_win32_filefunc64 @111
+ fill_win32_filefunc64A @112
+ fill_win32_filefunc64W @113
+
+ unzOpen64 @120
+ unzOpen2_64 @121
+ unzGetGlobalInfo64 @122
+ unzGetCurrentFileInfo64 @124
+ unzGetCurrentFileZStreamPos64 @125
+ unztell64 @126
+ unzGetFilePos64 @127
+ unzGoToFilePos64 @128
+
+ zipOpen64 @130
+ zipOpen2_64 @131
+ zipOpenNewFileInZip64 @132
+ zipOpenNewFileInZip2_64 @133
+ zipOpenNewFileInZip3_64 @134
+ zipOpenNewFileInZip4_64 @135
+ zipCloseFileInZipRaw64 @136
+
+; zlib1 v1.2.4 added:
+ adler32_combine @140
+ crc32_combine @142
+ deflateSetHeader @144
+ deflateTune @145
+ gzbuffer @146
+ gzclose_r @147
+ gzclose_w @148
+ gzdirect @149
+ gzoffset @150
+ inflateGetHeader @156
+ inflateMark @157
+ inflatePrime @158
+ inflateReset2 @159
+ inflateUndermine @160
+
+; zlib1 v1.2.6 added:
+ gzgetc_ @161
+ inflateResetKeep @163
+ deflateResetKeep @164
+
+; zlib1 v1.2.7 added:
+ gzopen_w @165
+
+; zlib1 v1.2.8 added:
+ inflateGetDictionary @166
+ gzvprintf @167
+
+; zlib1 v1.2.9 added:
+ inflateCodesUsed @168
+ inflateValidate @169
+ uncompress2 @170
+ gzfread @171
+ gzfwrite @172
+ deflateGetDictionary @173
+ adler32_z @174
+ crc32_z @175
diff --git a/contrib/zlib/crc32.c b/contrib/zlib/crc32.c
index 979a7190a..e72636a50 100644
--- a/contrib/zlib/crc32.c
+++ b/contrib/zlib/crc32.c
@@ -1,5 +1,5 @@
/* crc32.c -- compute the CRC-32 of a data stream
- * Copyright (C) 1995-2006, 2010, 2011, 2012 Mark Adler
+ * Copyright (C) 1995-2006, 2010, 2011, 2012, 2016 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*
* Thanks to Rodney Brown <rbrown64@csc.com.au> for his contribution of faster
@@ -30,17 +30,15 @@
#include "zutil.h" /* for STDC and FAR definitions */
-#define local static
-
/* Definitions for doing the crc four data bytes at a time. */
#if !defined(NOBYFOUR) && defined(Z_U4)
# define BYFOUR
#endif
#ifdef BYFOUR
local unsigned long crc32_little OF((unsigned long,
- const unsigned char FAR *, unsigned));
+ const unsigned char FAR *, z_size_t));
local unsigned long crc32_big OF((unsigned long,
- const unsigned char FAR *, unsigned));
+ const unsigned char FAR *, z_size_t));
# define TBLS 8
#else
# define TBLS 1
@@ -201,10 +199,10 @@ const z_crc_t FAR * ZEXPORT get_crc_table()
#define DO8 DO1; DO1; DO1; DO1; DO1; DO1; DO1; DO1
/* ========================================================================= */
-unsigned long ZEXPORT crc32(crc, buf, len)
+unsigned long ZEXPORT crc32_z(crc, buf, len)
unsigned long crc;
const unsigned char FAR *buf;
- uInt len;
+ z_size_t len;
{
if (buf == Z_NULL) return 0UL;
@@ -214,7 +212,7 @@ unsigned long ZEXPORT crc32(crc, buf, len)
#endif /* DYNAMIC_CRC_TABLE */
#ifdef BYFOUR
- if (sizeof(void *) == sizeof(ptrdiff_t)) {
+ if (sizeof(void *) == sizeof(z_size_t)) {
z_crc_t endian;
endian = 1;
@@ -235,8 +233,29 @@ unsigned long ZEXPORT crc32(crc, buf, len)
return crc ^ 0xffffffffUL;
}
+/* ========================================================================= */
+unsigned long ZEXPORT crc32(crc, buf, len)
+ unsigned long crc;
+ const unsigned char FAR *buf;
+ uInt len;
+{
+ return crc32_z(crc, buf, len);
+}
+
#ifdef BYFOUR
+/*
+ This BYFOUR code accesses the passed unsigned char * buffer with a 32-bit
+ integer pointer type. This violates the strict aliasing rule, where a
+ compiler can assume, for optimization purposes, that two pointers to
+ fundamentally different types won't ever point to the same memory. This can
+ manifest as a problem only if one of the pointers is written to. This code
+ only reads from those pointers. So long as this code remains isolated in
+ this compilation unit, there won't be a problem. For this reason, this code
+ should not be copied and pasted into a compilation unit in which other code
+ writes to the buffer that is passed to these routines.
+ */
+
/* ========================================================================= */
#define DOLIT4 c ^= *buf4++; \
c = crc_table[3][c & 0xff] ^ crc_table[2][(c >> 8) & 0xff] ^ \
@@ -247,14 +266,14 @@ unsigned long ZEXPORT crc32(crc, buf, len)
local unsigned long crc32_little(crc, buf, len)
unsigned long crc;
const unsigned char FAR *buf;
- unsigned len;
+ z_size_t len;
{
register z_crc_t c;
register const z_crc_t FAR *buf4;
c = (z_crc_t)crc;
c = ~c;
- while (len && ((ptrdiff_t)buf & 3)) {
+ while (len && ((z_size_t)buf & 3)) {
c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8);
len--;
}
@@ -278,7 +297,7 @@ local unsigned long crc32_little(crc, buf, len)
}
/* ========================================================================= */
-#define DOBIG4 c ^= *++buf4; \
+#define DOBIG4 c ^= *buf4++; \
c = crc_table[4][c & 0xff] ^ crc_table[5][(c >> 8) & 0xff] ^ \
crc_table[6][(c >> 16) & 0xff] ^ crc_table[7][c >> 24]
#define DOBIG32 DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4
@@ -287,20 +306,19 @@ local unsigned long crc32_little(crc, buf, len)
local unsigned long crc32_big(crc, buf, len)
unsigned long crc;
const unsigned char FAR *buf;
- unsigned len;
+ z_size_t len;
{
register z_crc_t c;
register const z_crc_t FAR *buf4;
c = ZSWAP32((z_crc_t)crc);
c = ~c;
- while (len && ((ptrdiff_t)buf & 3)) {
+ while (len && ((z_size_t)buf & 3)) {
c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8);
len--;
}
buf4 = (const z_crc_t FAR *)(const void FAR *)buf;
- buf4--;
while (len >= 32) {
DOBIG32;
len -= 32;
@@ -309,7 +327,6 @@ local unsigned long crc32_big(crc, buf, len)
DOBIG4;
len -= 4;
}
- buf4++;
buf = (const unsigned char FAR *)buf4;
if (len) do {
diff --git a/contrib/zlib/deflate.c b/contrib/zlib/deflate.c
index 696957705..568eaddbe 100644
--- a/contrib/zlib/deflate.c
+++ b/contrib/zlib/deflate.c
@@ -1,5 +1,5 @@
/* deflate.c -- compress data using the deflation algorithm
- * Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
+ * Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -52,7 +52,7 @@
#include "deflate.h"
const char deflate_copyright[] =
- " deflate 1.2.8 Copyright 1995-2013 Jean-loup Gailly and Mark Adler ";
+ " deflate 1.2.11.1 Copyright 1995-2017 Jean-loup Gailly and Mark Adler ";
/*
If you use the zlib library in a product, an acknowledgment is welcome
in the documentation of your product. If for some reason you cannot
@@ -73,6 +73,8 @@ typedef enum {
typedef block_state (*compress_func) OF((deflate_state *s, int flush));
/* Compression function. Returns the block state after the call. */
+local int deflateStateCheck OF((z_streamp strm));
+local void slide_hash OF((deflate_state *s));
local void fill_window OF((deflate_state *s));
local block_state deflate_stored OF((deflate_state *s, int flush));
local block_state deflate_fast OF((deflate_state *s, int flush));
@@ -84,15 +86,16 @@ local block_state deflate_huff OF((deflate_state *s, int flush));
local void lm_init OF((deflate_state *s));
local void putShortMSB OF((deflate_state *s, uInt b));
local void flush_pending OF((z_streamp strm));
-local int read_buf OF((z_streamp strm, Bytef *buf, unsigned size));
+local unsigned read_buf OF((z_streamp strm, Bytef *buf, unsigned size));
#ifdef ASMV
+# pragma message("Assembler code may have bugs -- use at your own risk")
void match_init OF((void)); /* asm code initialization */
uInt longest_match OF((deflate_state *s, IPos cur_match));
#else
local uInt longest_match OF((deflate_state *s, IPos cur_match));
#endif
-#ifdef DEBUG
+#ifdef ZLIB_DEBUG
local void check_match OF((deflate_state *s, IPos start, IPos match,
int length));
#endif
@@ -148,21 +151,14 @@ local const config configuration_table[10] = {
* meaning.
*/
-#define EQUAL 0
-/* result of memcmp for equal strings */
-
-#ifndef NO_DUMMY_DECL
-struct static_tree_desc_s {int dummy;}; /* for buggy compilers */
-#endif
-
/* rank Z_BLOCK between Z_NO_FLUSH and Z_PARTIAL_FLUSH */
-#define RANK(f) (((f) << 1) - ((f) > 4 ? 9 : 0))
+#define RANK(f) (((f) * 2) - ((f) > 4 ? 9 : 0))
/* ===========================================================================
* Update a hash value with the given input byte
- * IN assertion: all calls to to UPDATE_HASH are made with consecutive
- * input characters, so that a running hash key can be computed from the
- * previous key instead of complete recalculation each time.
+ * IN assertion: all calls to UPDATE_HASH are made with consecutive input
+ * characters, so that a running hash key can be computed from the previous
+ * key instead of complete recalculation each time.
*/
#define UPDATE_HASH(s,h,c) (h = (((h)<<s->hash_shift) ^ (c)) & s->hash_mask)
@@ -173,9 +169,9 @@ struct static_tree_desc_s {int dummy;}; /* for buggy compilers */
* the previous length of the hash chain.
* If this file is compiled with -DFASTEST, the compression level is forced
* to 1, and no hash chains are maintained.
- * IN assertion: all calls to to INSERT_STRING are made with consecutive
- * input characters and the first MIN_MATCH bytes of str are valid
- * (except for the last MIN_MATCH-1 bytes of the input file).
+ * IN assertion: all calls to INSERT_STRING are made with consecutive input
+ * characters and the first MIN_MATCH bytes of str are valid (except for
+ * the last MIN_MATCH-1 bytes of the input file).
*/
#ifdef FASTEST
#define INSERT_STRING(s, str, match_head) \
@@ -194,8 +190,42 @@ struct static_tree_desc_s {int dummy;}; /* for buggy compilers */
* prev[] will be initialized on the fly.
*/
#define CLEAR_HASH(s) \
- s->head[s->hash_size-1] = NIL; \
- zmemzero((Bytef *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head));
+ do { \
+ s->head[s->hash_size-1] = NIL; \
+ zmemzero((Bytef *)s->head, \
+ (unsigned)(s->hash_size-1)*sizeof(*s->head)); \
+ } while (0)
+
+/* ===========================================================================
+ * Slide the hash table when sliding the window down (could be avoided with 32
+ * bit values at the expense of memory usage). We slide even when level == 0 to
+ * keep the hash table consistent if we switch back to level > 0 later.
+ */
+local void slide_hash(s)
+ deflate_state *s;
+{
+ unsigned n, m;
+ Posf *p;
+ uInt wsize = s->w_size;
+
+ n = s->hash_size;
+ p = &s->head[n];
+ do {
+ m = *--p;
+ *p = (Pos)(m >= wsize ? m - wsize : NIL);
+ } while (--n);
+ n = wsize;
+#ifndef FASTEST
+ p = &s->prev[n];
+ do {
+ m = *--p;
+ *p = (Pos)(m >= wsize ? m - wsize : NIL);
+ /* If n is not on any hash chain, prev[n] is garbage but
+ * its value will never be used.
+ */
+ } while (--n);
+#endif
+}
/* ========================================================================= */
int ZEXPORT deflateInit_(strm, level, version, stream_size)
@@ -270,7 +300,7 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
#endif
if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED ||
windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||
- strategy < 0 || strategy > Z_FIXED) {
+ strategy < 0 || strategy > Z_FIXED || (windowBits == 8 && wrap != 1)) {
return Z_STREAM_ERROR;
}
if (windowBits == 8) windowBits = 9; /* until 256-byte window bug fixed */
@@ -278,14 +308,15 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
if (s == Z_NULL) return Z_MEM_ERROR;
strm->state = (struct internal_state FAR *)s;
s->strm = strm;
+ s->status = INIT_STATE; /* to pass state test in deflateReset() */
s->wrap = wrap;
s->gzhead = Z_NULL;
- s->w_bits = windowBits;
+ s->w_bits = (uInt)windowBits;
s->w_size = 1 << s->w_bits;
s->w_mask = s->w_size - 1;
- s->hash_bits = memLevel + 7;
+ s->hash_bits = (uInt)memLevel + 7;
s->hash_size = 1 << s->hash_bits;
s->hash_mask = s->hash_size - 1;
s->hash_shift = ((s->hash_bits+MIN_MATCH-1)/MIN_MATCH);
@@ -319,6 +350,31 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
return deflateReset(strm);
}
+/* =========================================================================
+ * Check for a valid deflate stream state. Return 0 if ok, 1 if not.
+ */
+local int deflateStateCheck (strm)
+ z_streamp strm;
+{
+ deflate_state *s;
+ if (strm == Z_NULL ||
+ strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0)
+ return 1;
+ s = strm->state;
+ if (s == Z_NULL || s->strm != strm || (s->status != INIT_STATE &&
+#ifdef GZIP
+ s->status != GZIP_STATE &&
+#endif
+ s->status != EXTRA_STATE &&
+ s->status != NAME_STATE &&
+ s->status != COMMENT_STATE &&
+ s->status != HCRC_STATE &&
+ s->status != BUSY_STATE &&
+ s->status != FINISH_STATE))
+ return 1;
+ return 0;
+}
+
/* ========================================================================= */
int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength)
z_streamp strm;
@@ -331,7 +387,7 @@ int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength)
unsigned avail;
z_const unsigned char *next;
- if (strm == Z_NULL || strm->state == Z_NULL || dictionary == Z_NULL)
+ if (deflateStateCheck(strm) || dictionary == Z_NULL)
return Z_STREAM_ERROR;
s = strm->state;
wrap = s->wrap;
@@ -389,13 +445,34 @@ int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength)
}
/* ========================================================================= */
+int ZEXPORT deflateGetDictionary (strm, dictionary, dictLength)
+ z_streamp strm;
+ Bytef *dictionary;
+ uInt *dictLength;
+{
+ deflate_state *s;
+ uInt len;
+
+ if (deflateStateCheck(strm))
+ return Z_STREAM_ERROR;
+ s = strm->state;
+ len = s->strstart + s->lookahead;
+ if (len > s->w_size)
+ len = s->w_size;
+ if (dictionary != Z_NULL && len)
+ zmemcpy(dictionary, s->window + s->strstart + s->lookahead - len, len);
+ if (dictLength != Z_NULL)
+ *dictLength = len;
+ return Z_OK;
+}
+
+/* ========================================================================= */
int ZEXPORT deflateResetKeep (strm)
z_streamp strm;
{
deflate_state *s;
- if (strm == Z_NULL || strm->state == Z_NULL ||
- strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0) {
+ if (deflateStateCheck(strm)) {
return Z_STREAM_ERROR;
}
@@ -410,13 +487,17 @@ int ZEXPORT deflateResetKeep (strm)
if (s->wrap < 0) {
s->wrap = -s->wrap; /* was made negative by deflate(..., Z_FINISH); */
}
- s->status = s->wrap ? INIT_STATE : BUSY_STATE;
+ s->status =
+#ifdef GZIP
+ s->wrap == 2 ? GZIP_STATE :
+#endif
+ s->wrap ? INIT_STATE : BUSY_STATE;
strm->adler =
#ifdef GZIP
s->wrap == 2 ? crc32(0L, Z_NULL, 0) :
#endif
adler32(0L, Z_NULL, 0);
- s->last_flush = Z_NO_FLUSH;
+ s->last_flush = -2;
_tr_init(s);
@@ -440,8 +521,8 @@ int ZEXPORT deflateSetHeader (strm, head)
z_streamp strm;
gz_headerp head;
{
- if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
- if (strm->state->wrap != 2) return Z_STREAM_ERROR;
+ if (deflateStateCheck(strm) || strm->state->wrap != 2)
+ return Z_STREAM_ERROR;
strm->state->gzhead = head;
return Z_OK;
}
@@ -452,7 +533,7 @@ int ZEXPORT deflatePending (strm, pending, bits)
int *bits;
z_streamp strm;
{
- if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ if (deflateStateCheck(strm)) return Z_STREAM_ERROR;
if (pending != Z_NULL)
*pending = strm->state->pending;
if (bits != Z_NULL)
@@ -469,7 +550,7 @@ int ZEXPORT deflatePrime (strm, bits, value)
deflate_state *s;
int put;
- if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ if (deflateStateCheck(strm)) return Z_STREAM_ERROR;
s = strm->state;
if ((Bytef *)(s->d_buf) < s->pending_out + ((Buf_size + 7) >> 3))
return Z_BUF_ERROR;
@@ -494,9 +575,8 @@ int ZEXPORT deflateParams(strm, level, strategy)
{
deflate_state *s;
compress_func func;
- int err = Z_OK;
- if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ if (deflateStateCheck(strm)) return Z_STREAM_ERROR;
s = strm->state;
#ifdef FASTEST
@@ -510,13 +590,22 @@ int ZEXPORT deflateParams(strm, level, strategy)
func = configuration_table[s->level].func;
if ((strategy != s->strategy || func != configuration_table[level].func) &&
- strm->total_in != 0) {
+ s->last_flush != -2) {
/* Flush the last buffer: */
- err = deflate(strm, Z_BLOCK);
- if (err == Z_BUF_ERROR && s->pending == 0)
- err = Z_OK;
+ int err = deflate(strm, Z_BLOCK);
+ if (err == Z_STREAM_ERROR)
+ return err;
+ if (strm->avail_in || (s->strstart - s->block_start) + s->lookahead)
+ return Z_BUF_ERROR;
}
if (s->level != level) {
+ if (s->level == 0 && s->matches != 0) {
+ if (s->matches == 1)
+ slide_hash(s);
+ else
+ CLEAR_HASH(s);
+ s->matches = 0;
+ }
s->level = level;
s->max_lazy_match = configuration_table[level].max_lazy;
s->good_match = configuration_table[level].good_length;
@@ -524,7 +613,7 @@ int ZEXPORT deflateParams(strm, level, strategy)
s->max_chain_length = configuration_table[level].max_chain;
}
s->strategy = strategy;
- return err;
+ return Z_OK;
}
/* ========================================================================= */
@@ -537,12 +626,12 @@ int ZEXPORT deflateTune(strm, good_length, max_lazy, nice_length, max_chain)
{
deflate_state *s;
- if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ if (deflateStateCheck(strm)) return Z_STREAM_ERROR;
s = strm->state;
- s->good_match = good_length;
- s->max_lazy_match = max_lazy;
+ s->good_match = (uInt)good_length;
+ s->max_lazy_match = (uInt)max_lazy;
s->nice_match = nice_length;
- s->max_chain_length = max_chain;
+ s->max_chain_length = (uInt)max_chain;
return Z_OK;
}
@@ -569,14 +658,13 @@ uLong ZEXPORT deflateBound(strm, sourceLen)
{
deflate_state *s;
uLong complen, wraplen;
- Bytef *str;
/* conservative upper bound for compressed data */
complen = sourceLen +
((sourceLen + 7) >> 3) + ((sourceLen + 63) >> 6) + 5;
/* if can't get parameters, return conservative bound plus zlib wrapper */
- if (strm == Z_NULL || strm->state == Z_NULL)
+ if (deflateStateCheck(strm))
return complen + 6;
/* compute wrapper length */
@@ -588,9 +676,11 @@ uLong ZEXPORT deflateBound(strm, sourceLen)
case 1: /* zlib wrapper */
wraplen = 6 + (s->strstart ? 4 : 0);
break;
+#ifdef GZIP
case 2: /* gzip wrapper */
wraplen = 18;
if (s->gzhead != Z_NULL) { /* user-supplied gzip header */
+ Bytef *str;
if (s->gzhead->extra != Z_NULL)
wraplen += 2 + s->gzhead->extra_len;
str = s->gzhead->name;
@@ -607,6 +697,7 @@ uLong ZEXPORT deflateBound(strm, sourceLen)
wraplen += 2;
}
break;
+#endif
default: /* for compiler happiness */
wraplen = 6;
}
@@ -634,10 +725,10 @@ local void putShortMSB (s, b)
}
/* =========================================================================
- * Flush as much pending output as possible. All deflate() output goes
- * through this function so some applications may wish to modify it
- * to avoid allocating a large strm->next_out buffer and copying into it.
- * (See also read_buf()).
+ * Flush as much pending output as possible. All deflate() output, except for
+ * some deflate_stored() output, goes through this function so some
+ * applications may wish to modify it to avoid allocating a large
+ * strm->next_out buffer and copying into it. (See also read_buf()).
*/
local void flush_pending(strm)
z_streamp strm;
@@ -654,13 +745,23 @@ local void flush_pending(strm)
strm->next_out += len;
s->pending_out += len;
strm->total_out += len;
- strm->avail_out -= len;
- s->pending -= len;
+ strm->avail_out -= len;
+ s->pending -= len;
if (s->pending == 0) {
s->pending_out = s->pending_buf;
}
}
+/* ===========================================================================
+ * Update the header CRC with the bytes s->pending_buf[beg..s->pending - 1].
+ */
+#define HCRC_UPDATE(beg) \
+ do { \
+ if (s->gzhead->hcrc && s->pending > (beg)) \
+ strm->adler = crc32(strm->adler, s->pending_buf + (beg), \
+ s->pending - (beg)); \
+ } while (0)
+
/* ========================================================================= */
int ZEXPORT deflate (strm, flush)
z_streamp strm;
@@ -669,230 +770,229 @@ int ZEXPORT deflate (strm, flush)
int old_flush; /* value of flush param for previous deflate call */
deflate_state *s;
- if (strm == Z_NULL || strm->state == Z_NULL ||
- flush > Z_BLOCK || flush < 0) {
+ if (deflateStateCheck(strm) || flush > Z_BLOCK || flush < 0) {
return Z_STREAM_ERROR;
}
s = strm->state;
if (strm->next_out == Z_NULL ||
- (strm->next_in == Z_NULL && strm->avail_in != 0) ||
+ (strm->avail_in != 0 && strm->next_in == Z_NULL) ||
(s->status == FINISH_STATE && flush != Z_FINISH)) {
ERR_RETURN(strm, Z_STREAM_ERROR);
}
if (strm->avail_out == 0) ERR_RETURN(strm, Z_BUF_ERROR);
- s->strm = strm; /* just in case */
old_flush = s->last_flush;
s->last_flush = flush;
+ /* Flush as much pending output as possible */
+ if (s->pending != 0) {
+ flush_pending(strm);
+ if (strm->avail_out == 0) {
+ /* Since avail_out is 0, deflate will be called again with
+ * more output space, but possibly with both pending and
+ * avail_in equal to zero. There won't be anything to do,
+ * but this is not an error situation so make sure we
+ * return OK instead of BUF_ERROR at next call of deflate:
+ */
+ s->last_flush = -1;
+ return Z_OK;
+ }
+
+ /* Make sure there is something to do and avoid duplicate consecutive
+ * flushes. For repeated and useless calls with Z_FINISH, we keep
+ * returning Z_STREAM_END instead of Z_BUF_ERROR.
+ */
+ } else if (strm->avail_in == 0 && RANK(flush) <= RANK(old_flush) &&
+ flush != Z_FINISH) {
+ ERR_RETURN(strm, Z_BUF_ERROR);
+ }
+
+ /* User must not provide more input after the first FINISH: */
+ if (s->status == FINISH_STATE && strm->avail_in != 0) {
+ ERR_RETURN(strm, Z_BUF_ERROR);
+ }
+
/* Write the header */
if (s->status == INIT_STATE) {
-#ifdef GZIP
- if (s->wrap == 2) {
- strm->adler = crc32(0L, Z_NULL, 0);
- put_byte(s, 31);
- put_byte(s, 139);
- put_byte(s, 8);
- if (s->gzhead == Z_NULL) {
- put_byte(s, 0);
- put_byte(s, 0);
- put_byte(s, 0);
- put_byte(s, 0);
- put_byte(s, 0);
- put_byte(s, s->level == 9 ? 2 :
- (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ?
- 4 : 0));
- put_byte(s, OS_CODE);
- s->status = BUSY_STATE;
- }
- else {
- put_byte(s, (s->gzhead->text ? 1 : 0) +
- (s->gzhead->hcrc ? 2 : 0) +
- (s->gzhead->extra == Z_NULL ? 0 : 4) +
- (s->gzhead->name == Z_NULL ? 0 : 8) +
- (s->gzhead->comment == Z_NULL ? 0 : 16)
- );
- put_byte(s, (Byte)(s->gzhead->time & 0xff));
- put_byte(s, (Byte)((s->gzhead->time >> 8) & 0xff));
- put_byte(s, (Byte)((s->gzhead->time >> 16) & 0xff));
- put_byte(s, (Byte)((s->gzhead->time >> 24) & 0xff));
- put_byte(s, s->level == 9 ? 2 :
- (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ?
- 4 : 0));
- put_byte(s, s->gzhead->os & 0xff);
- if (s->gzhead->extra != Z_NULL) {
- put_byte(s, s->gzhead->extra_len & 0xff);
- put_byte(s, (s->gzhead->extra_len >> 8) & 0xff);
- }
- if (s->gzhead->hcrc)
- strm->adler = crc32(strm->adler, s->pending_buf,
- s->pending);
- s->gzindex = 0;
- s->status = EXTRA_STATE;
- }
- }
+ /* zlib header */
+ uInt header = (Z_DEFLATED + ((s->w_bits-8)<<4)) << 8;
+ uInt level_flags;
+
+ if (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2)
+ level_flags = 0;
+ else if (s->level < 6)
+ level_flags = 1;
+ else if (s->level == 6)
+ level_flags = 2;
else
-#endif
- {
- uInt header = (Z_DEFLATED + ((s->w_bits-8)<<4)) << 8;
- uInt level_flags;
-
- if (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2)
- level_flags = 0;
- else if (s->level < 6)
- level_flags = 1;
- else if (s->level == 6)
- level_flags = 2;
- else
- level_flags = 3;
- header |= (level_flags << 6);
- if (s->strstart != 0) header |= PRESET_DICT;
- header += 31 - (header % 31);
+ level_flags = 3;
+ header |= (level_flags << 6);
+ if (s->strstart != 0) header |= PRESET_DICT;
+ header += 31 - (header % 31);
+
+ putShortMSB(s, header);
+ /* Save the adler32 of the preset dictionary: */
+ if (s->strstart != 0) {
+ putShortMSB(s, (uInt)(strm->adler >> 16));
+ putShortMSB(s, (uInt)(strm->adler & 0xffff));
+ }
+ strm->adler = adler32(0L, Z_NULL, 0);
+ s->status = BUSY_STATE;
+
+ /* Compression must start with an empty pending buffer */
+ flush_pending(strm);
+ if (s->pending != 0) {
+ s->last_flush = -1;
+ return Z_OK;
+ }
+ }
+#ifdef GZIP
+ if (s->status == GZIP_STATE) {
+ /* gzip header */
+ strm->adler = crc32(0L, Z_NULL, 0);
+ put_byte(s, 31);
+ put_byte(s, 139);
+ put_byte(s, 8);
+ if (s->gzhead == Z_NULL) {
+ put_byte(s, 0);
+ put_byte(s, 0);
+ put_byte(s, 0);
+ put_byte(s, 0);
+ put_byte(s, 0);
+ put_byte(s, s->level == 9 ? 2 :
+ (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ?
+ 4 : 0));
+ put_byte(s, OS_CODE);
s->status = BUSY_STATE;
- putShortMSB(s, header);
- /* Save the adler32 of the preset dictionary: */
- if (s->strstart != 0) {
- putShortMSB(s, (uInt)(strm->adler >> 16));
- putShortMSB(s, (uInt)(strm->adler & 0xffff));
+ /* Compression must start with an empty pending buffer */
+ flush_pending(strm);
+ if (s->pending != 0) {
+ s->last_flush = -1;
+ return Z_OK;
+ }
+ }
+ else {
+ put_byte(s, (s->gzhead->text ? 1 : 0) +
+ (s->gzhead->hcrc ? 2 : 0) +
+ (s->gzhead->extra == Z_NULL ? 0 : 4) +
+ (s->gzhead->name == Z_NULL ? 0 : 8) +
+ (s->gzhead->comment == Z_NULL ? 0 : 16)
+ );
+ put_byte(s, (Byte)(s->gzhead->time & 0xff));
+ put_byte(s, (Byte)((s->gzhead->time >> 8) & 0xff));
+ put_byte(s, (Byte)((s->gzhead->time >> 16) & 0xff));
+ put_byte(s, (Byte)((s->gzhead->time >> 24) & 0xff));
+ put_byte(s, s->level == 9 ? 2 :
+ (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ?
+ 4 : 0));
+ put_byte(s, s->gzhead->os & 0xff);
+ if (s->gzhead->extra != Z_NULL) {
+ put_byte(s, s->gzhead->extra_len & 0xff);
+ put_byte(s, (s->gzhead->extra_len >> 8) & 0xff);
}
- strm->adler = adler32(0L, Z_NULL, 0);
+ if (s->gzhead->hcrc)
+ strm->adler = crc32(strm->adler, s->pending_buf,
+ s->pending);
+ s->gzindex = 0;
+ s->status = EXTRA_STATE;
}
}
-#ifdef GZIP
if (s->status == EXTRA_STATE) {
if (s->gzhead->extra != Z_NULL) {
- uInt beg = s->pending; /* start of bytes to update crc */
-
- while (s->gzindex < (s->gzhead->extra_len & 0xffff)) {
- if (s->pending == s->pending_buf_size) {
- if (s->gzhead->hcrc && s->pending > beg)
- strm->adler = crc32(strm->adler, s->pending_buf + beg,
- s->pending - beg);
- flush_pending(strm);
- beg = s->pending;
- if (s->pending == s->pending_buf_size)
- break;
+ ulg beg = s->pending; /* start of bytes to update crc */
+ uInt left = (s->gzhead->extra_len & 0xffff) - s->gzindex;
+ while (s->pending + left > s->pending_buf_size) {
+ uInt copy = s->pending_buf_size - s->pending;
+ zmemcpy(s->pending_buf + s->pending,
+ s->gzhead->extra + s->gzindex, copy);
+ s->pending = s->pending_buf_size;
+ HCRC_UPDATE(beg);
+ s->gzindex += copy;
+ flush_pending(strm);
+ if (s->pending != 0) {
+ s->last_flush = -1;
+ return Z_OK;
}
- put_byte(s, s->gzhead->extra[s->gzindex]);
- s->gzindex++;
- }
- if (s->gzhead->hcrc && s->pending > beg)
- strm->adler = crc32(strm->adler, s->pending_buf + beg,
- s->pending - beg);
- if (s->gzindex == s->gzhead->extra_len) {
- s->gzindex = 0;
- s->status = NAME_STATE;
+ beg = 0;
+ left -= copy;
}
+ zmemcpy(s->pending_buf + s->pending,
+ s->gzhead->extra + s->gzindex, left);
+ s->pending += left;
+ HCRC_UPDATE(beg);
+ s->gzindex = 0;
}
- else
- s->status = NAME_STATE;
+ s->status = NAME_STATE;
}
if (s->status == NAME_STATE) {
if (s->gzhead->name != Z_NULL) {
- uInt beg = s->pending; /* start of bytes to update crc */
+ ulg beg = s->pending; /* start of bytes to update crc */
int val;
-
do {
if (s->pending == s->pending_buf_size) {
- if (s->gzhead->hcrc && s->pending > beg)
- strm->adler = crc32(strm->adler, s->pending_buf + beg,
- s->pending - beg);
+ HCRC_UPDATE(beg);
flush_pending(strm);
- beg = s->pending;
- if (s->pending == s->pending_buf_size) {
- val = 1;
- break;
+ if (s->pending != 0) {
+ s->last_flush = -1;
+ return Z_OK;
}
+ beg = 0;
}
val = s->gzhead->name[s->gzindex++];
put_byte(s, val);
} while (val != 0);
- if (s->gzhead->hcrc && s->pending > beg)
- strm->adler = crc32(strm->adler, s->pending_buf + beg,
- s->pending - beg);
- if (val == 0) {
- s->gzindex = 0;
- s->status = COMMENT_STATE;
- }
+ HCRC_UPDATE(beg);
+ s->gzindex = 0;
}
- else
- s->status = COMMENT_STATE;
+ s->status = COMMENT_STATE;
}
if (s->status == COMMENT_STATE) {
if (s->gzhead->comment != Z_NULL) {
- uInt beg = s->pending; /* start of bytes to update crc */
+ ulg beg = s->pending; /* start of bytes to update crc */
int val;
-
do {
if (s->pending == s->pending_buf_size) {
- if (s->gzhead->hcrc && s->pending > beg)
- strm->adler = crc32(strm->adler, s->pending_buf + beg,
- s->pending - beg);
+ HCRC_UPDATE(beg);
flush_pending(strm);
- beg = s->pending;
- if (s->pending == s->pending_buf_size) {
- val = 1;
- break;
+ if (s->pending != 0) {
+ s->last_flush = -1;
+ return Z_OK;
}
+ beg = 0;
}
val = s->gzhead->comment[s->gzindex++];
put_byte(s, val);
} while (val != 0);
- if (s->gzhead->hcrc && s->pending > beg)
- strm->adler = crc32(strm->adler, s->pending_buf + beg,
- s->pending - beg);
- if (val == 0)
- s->status = HCRC_STATE;
+ HCRC_UPDATE(beg);
}
- else
- s->status = HCRC_STATE;
+ s->status = HCRC_STATE;
}
if (s->status == HCRC_STATE) {
if (s->gzhead->hcrc) {
- if (s->pending + 2 > s->pending_buf_size)
+ if (s->pending + 2 > s->pending_buf_size) {
flush_pending(strm);
- if (s->pending + 2 <= s->pending_buf_size) {
- put_byte(s, (Byte)(strm->adler & 0xff));
- put_byte(s, (Byte)((strm->adler >> 8) & 0xff));
- strm->adler = crc32(0L, Z_NULL, 0);
- s->status = BUSY_STATE;
+ if (s->pending != 0) {
+ s->last_flush = -1;
+ return Z_OK;
+ }
}
+ put_byte(s, (Byte)(strm->adler & 0xff));
+ put_byte(s, (Byte)((strm->adler >> 8) & 0xff));
+ strm->adler = crc32(0L, Z_NULL, 0);
}
- else
- s->status = BUSY_STATE;
- }
-#endif
+ s->status = BUSY_STATE;
- /* Flush as much pending output as possible */
- if (s->pending != 0) {
+ /* Compression must start with an empty pending buffer */
flush_pending(strm);
- if (strm->avail_out == 0) {
- /* Since avail_out is 0, deflate will be called again with
- * more output space, but possibly with both pending and
- * avail_in equal to zero. There won't be anything to do,
- * but this is not an error situation so make sure we
- * return OK instead of BUF_ERROR at next call of deflate:
- */
+ if (s->pending != 0) {
s->last_flush = -1;
return Z_OK;
}
-
- /* Make sure there is something to do and avoid duplicate consecutive
- * flushes. For repeated and useless calls with Z_FINISH, we keep
- * returning Z_STREAM_END instead of Z_BUF_ERROR.
- */
- } else if (strm->avail_in == 0 && RANK(flush) <= RANK(old_flush) &&
- flush != Z_FINISH) {
- ERR_RETURN(strm, Z_BUF_ERROR);
- }
-
- /* User must not provide more input after the first FINISH: */
- if (s->status == FINISH_STATE && strm->avail_in != 0) {
- ERR_RETURN(strm, Z_BUF_ERROR);
}
+#endif
/* Start a new block or continue the current one.
*/
@@ -900,9 +1000,10 @@ int ZEXPORT deflate (strm, flush)
(flush != Z_NO_FLUSH && s->status != FINISH_STATE)) {
block_state bstate;
- bstate = s->strategy == Z_HUFFMAN_ONLY ? deflate_huff(s, flush) :
- (s->strategy == Z_RLE ? deflate_rle(s, flush) :
- (*(configuration_table[s->level].func))(s, flush));
+ bstate = s->level == 0 ? deflate_stored(s, flush) :
+ s->strategy == Z_HUFFMAN_ONLY ? deflate_huff(s, flush) :
+ s->strategy == Z_RLE ? deflate_rle(s, flush) :
+ (*(configuration_table[s->level].func))(s, flush);
if (bstate == finish_started || bstate == finish_done) {
s->status = FINISH_STATE;
@@ -944,7 +1045,6 @@ int ZEXPORT deflate (strm, flush)
}
}
}
- Assert(strm->avail_out > 0, "bug2");
if (flush != Z_FINISH) return Z_OK;
if (s->wrap <= 0) return Z_STREAM_END;
@@ -981,18 +1081,9 @@ int ZEXPORT deflateEnd (strm)
{
int status;
- if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ if (deflateStateCheck(strm)) return Z_STREAM_ERROR;
status = strm->state->status;
- if (status != INIT_STATE &&
- status != EXTRA_STATE &&
- status != NAME_STATE &&
- status != COMMENT_STATE &&
- status != HCRC_STATE &&
- status != BUSY_STATE &&
- status != FINISH_STATE) {
- return Z_STREAM_ERROR;
- }
/* Deallocate in reverse order of allocations: */
TRY_FREE(strm, strm->state->pending_buf);
@@ -1023,7 +1114,7 @@ int ZEXPORT deflateCopy (dest, source)
ushf *overlay;
- if (source == Z_NULL || dest == Z_NULL || source->state == Z_NULL) {
+ if (deflateStateCheck(source) || dest == Z_NULL) {
return Z_STREAM_ERROR;
}
@@ -1073,7 +1164,7 @@ int ZEXPORT deflateCopy (dest, source)
* allocating a large strm->next_in buffer and copying from it.
* (See also flush_pending()).
*/
-local int read_buf(strm, buf, size)
+local unsigned read_buf(strm, buf, size)
z_streamp strm;
Bytef *buf;
unsigned size;
@@ -1097,7 +1188,7 @@ local int read_buf(strm, buf, size)
strm->next_in += len;
strm->total_in += len;
- return (int)len;
+ return len;
}
/* ===========================================================================
@@ -1151,9 +1242,9 @@ local uInt longest_match(s, cur_match)
{
unsigned chain_length = s->max_chain_length;/* max hash chain length */
register Bytef *scan = s->window + s->strstart; /* current string */
- register Bytef *match; /* matched string */
+ register Bytef *match; /* matched string */
register int len; /* length of current match */
- int best_len = s->prev_length; /* best match length so far */
+ int best_len = (int)s->prev_length; /* best match length so far */
int nice_match = s->nice_match; /* stop if match long enough */
IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
s->strstart - (IPos)MAX_DIST(s) : NIL;
@@ -1188,7 +1279,7 @@ local uInt longest_match(s, cur_match)
/* Do not look for matches beyond the end of the input. This is necessary
* to make deflate deterministic.
*/
- if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
+ if ((uInt)nice_match > s->lookahead) nice_match = (int)s->lookahead;
Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
@@ -1349,7 +1440,11 @@ local uInt longest_match(s, cur_match)
#endif /* FASTEST */
-#ifdef DEBUG
+#ifdef ZLIB_DEBUG
+
+#define EQUAL 0
+/* result of memcmp for equal strings */
+
/* ===========================================================================
* Check that the match at match_start is indeed a match.
*/
@@ -1375,7 +1470,7 @@ local void check_match(s, start, match, length)
}
#else
# define check_match(s, start, match, length)
-#endif /* DEBUG */
+#endif /* ZLIB_DEBUG */
/* ===========================================================================
* Fill the window when the lookahead becomes insufficient.
@@ -1390,8 +1485,7 @@ local void check_match(s, start, match, length)
local void fill_window(s)
deflate_state *s;
{
- register unsigned n, m;
- register Posf *p;
+ unsigned n;
unsigned more; /* Amount of free space at the end of the window. */
uInt wsize = s->w_size;
@@ -1418,35 +1512,13 @@ local void fill_window(s)
*/
if (s->strstart >= wsize+MAX_DIST(s)) {
- zmemcpy(s->window, s->window+wsize, (unsigned)wsize);
+ zmemcpy(s->window, s->window+wsize, (unsigned)wsize - more);
s->match_start -= wsize;
s->strstart -= wsize; /* we now have strstart >= MAX_DIST */
s->block_start -= (long) wsize;
-
- /* Slide the hash table (could be avoided with 32 bit values
- at the expense of memory usage). We slide even when level == 0
- to keep the hash table consistent if we switch back to level > 0
- later. (Using level 0 permanently is not an optimal usage of
- zlib, so we don't care about this pathological case.)
- */
- n = s->hash_size;
- p = &s->head[n];
- do {
- m = *--p;
- *p = (Pos)(m >= wsize ? m-wsize : NIL);
- } while (--n);
-
- n = wsize;
-#ifndef FASTEST
- p = &s->prev[n];
- do {
- m = *--p;
- *p = (Pos)(m >= wsize ? m-wsize : NIL);
- /* If n is not on any hash chain, prev[n] is garbage but
- * its value will never be used.
- */
- } while (--n);
-#endif
+ if (s->insert > s->strstart)
+ s->insert = s->strstart;
+ slide_hash(s);
more += wsize;
}
if (s->strm->avail_in == 0) break;
@@ -1552,70 +1624,205 @@ local void fill_window(s)
if (s->strm->avail_out == 0) return (last) ? finish_started : need_more; \
}
+/* Maximum stored block length in deflate format (not including header). */
+#define MAX_STORED 65535
+
+/* Minimum of a and b. */
+#define MIN(a, b) ((a) > (b) ? (b) : (a))
+
/* ===========================================================================
* Copy without compression as much as possible from the input stream, return
* the current block state.
- * This function does not insert new strings in the dictionary since
- * uncompressible data is probably not useful. This function is used
- * only for the level=0 compression option.
- * NOTE: this function should be optimized to avoid extra copying from
- * window to pending_buf.
+ *
+ * In case deflateParams() is used to later switch to a non-zero compression
+ * level, s->matches (otherwise unused when storing) keeps track of the number
+ * of hash table slides to perform. If s->matches is 1, then one hash table
+ * slide will be done when switching. If s->matches is 2, the maximum value
+ * allowed here, then the hash table will be cleared, since two or more slides
+ * is the same as a clear.
+ *
+ * deflate_stored() is written to minimize the number of times an input byte is
+ * copied. It is most efficient with large input and output buffers, which
+ * maximizes the opportunites to have a single copy from next_in to next_out.
*/
local block_state deflate_stored(s, flush)
deflate_state *s;
int flush;
{
- /* Stored blocks are limited to 0xffff bytes, pending_buf is limited
- * to pending_buf_size, and each stored block has a 5 byte header:
+ /* Smallest worthy block size when not flushing or finishing. By default
+ * this is 32K. This can be as small as 507 bytes for memLevel == 1. For
+ * large input and output buffers, the stored block size will be larger.
*/
- ulg max_block_size = 0xffff;
- ulg max_start;
-
- if (max_block_size > s->pending_buf_size - 5) {
- max_block_size = s->pending_buf_size - 5;
- }
+ unsigned min_block = MIN(s->pending_buf_size - 5, s->w_size);
- /* Copy as much as possible from input to output: */
- for (;;) {
- /* Fill the window as much as possible: */
- if (s->lookahead <= 1) {
-
- Assert(s->strstart < s->w_size+MAX_DIST(s) ||
- s->block_start >= (long)s->w_size, "slide too late");
+ /* Copy as many min_block or larger stored blocks directly to next_out as
+ * possible. If flushing, copy the remaining available input to next_out as
+ * stored blocks, if there is enough space.
+ */
+ unsigned len, left, have, last = 0;
+ unsigned used = s->strm->avail_in;
+ do {
+ /* Set len to the maximum size block that we can copy directly with the
+ * available input data and output space. Set left to how much of that
+ * would be copied from what's left in the window.
+ */
+ len = MAX_STORED; /* maximum deflate stored block length */
+ have = (s->bi_valid + 42) >> 3; /* number of header bytes */
+ if (s->strm->avail_out < have) /* need room for header */
+ break;
+ /* maximum stored block length that will fit in avail_out: */
+ have = s->strm->avail_out - have;
+ left = s->strstart - s->block_start; /* bytes left in window */
+ if (len > (ulg)left + s->strm->avail_in)
+ len = left + s->strm->avail_in; /* limit len to the input */
+ if (len > have)
+ len = have; /* limit len to the output */
+
+ /* If the stored block would be less than min_block in length, or if
+ * unable to copy all of the available input when flushing, then try
+ * copying to the window and the pending buffer instead. Also don't
+ * write an empty block when flushing -- deflate() does that.
+ */
+ if (len < min_block && ((len == 0 && flush != Z_FINISH) ||
+ flush == Z_NO_FLUSH ||
+ len != left + s->strm->avail_in))
+ break;
- fill_window(s);
- if (s->lookahead == 0 && flush == Z_NO_FLUSH) return need_more;
+ /* Make a dummy stored block in pending to get the header bytes,
+ * including any pending bits. This also updates the debugging counts.
+ */
+ last = flush == Z_FINISH && len == left + s->strm->avail_in ? 1 : 0;
+ _tr_stored_block(s, (char *)0, 0L, last);
+
+ /* Replace the lengths in the dummy stored block with len. */
+ s->pending_buf[s->pending - 4] = len;
+ s->pending_buf[s->pending - 3] = len >> 8;
+ s->pending_buf[s->pending - 2] = ~len;
+ s->pending_buf[s->pending - 1] = ~len >> 8;
+
+ /* Write the stored block header bytes. */
+ flush_pending(s->strm);
+
+#ifdef ZLIB_DEBUG
+ /* Update debugging counts for the data about to be copied. */
+ s->compressed_len += len << 3;
+ s->bits_sent += len << 3;
+#endif
- if (s->lookahead == 0) break; /* flush the current block */
+ /* Copy uncompressed bytes from the window to next_out. */
+ if (left) {
+ if (left > len)
+ left = len;
+ zmemcpy(s->strm->next_out, s->window + s->block_start, left);
+ s->strm->next_out += left;
+ s->strm->avail_out -= left;
+ s->strm->total_out += left;
+ s->block_start += left;
+ len -= left;
}
- Assert(s->block_start >= 0L, "block gone");
-
- s->strstart += s->lookahead;
- s->lookahead = 0;
-
- /* Emit a stored block if pending_buf will be full: */
- max_start = s->block_start + max_block_size;
- if (s->strstart == 0 || (ulg)s->strstart >= max_start) {
- /* strstart == 0 is possible when wraparound on 16-bit machine */
- s->lookahead = (uInt)(s->strstart - max_start);
- s->strstart = (uInt)max_start;
- FLUSH_BLOCK(s, 0);
+
+ /* Copy uncompressed bytes directly from next_in to next_out, updating
+ * the check value.
+ */
+ if (len) {
+ read_buf(s->strm, s->strm->next_out, len);
+ s->strm->next_out += len;
+ s->strm->avail_out -= len;
+ s->strm->total_out += len;
}
- /* Flush if we may have to slide, otherwise block_start may become
- * negative and the data will be gone:
+ } while (last == 0);
+
+ /* Update the sliding window with the last s->w_size bytes of the copied
+ * data, or append all of the copied data to the existing window if less
+ * than s->w_size bytes were copied. Also update the number of bytes to
+ * insert in the hash tables, in the event that deflateParams() switches to
+ * a non-zero compression level.
+ */
+ used -= s->strm->avail_in; /* number of input bytes directly copied */
+ if (used) {
+ /* If any input was used, then no unused input remains in the window,
+ * therefore s->block_start == s->strstart.
*/
- if (s->strstart - (uInt)s->block_start >= MAX_DIST(s)) {
- FLUSH_BLOCK(s, 0);
+ if (used >= s->w_size) { /* supplant the previous history */
+ s->matches = 2; /* clear hash */
+ zmemcpy(s->window, s->strm->next_in - s->w_size, s->w_size);
+ s->strstart = s->w_size;
+ s->insert = s->strstart;
}
+ else {
+ if (s->window_size - s->strstart <= used) {
+ /* Slide the window down. */
+ s->strstart -= s->w_size;
+ zmemcpy(s->window, s->window + s->w_size, s->strstart);
+ if (s->matches < 2)
+ s->matches++; /* add a pending slide_hash() */
+ if (s->insert > s->strstart)
+ s->insert = s->strstart;
+ }
+ zmemcpy(s->window + s->strstart, s->strm->next_in - used, used);
+ s->strstart += used;
+ s->insert += MIN(used, s->w_size - s->insert);
+ }
+ s->block_start = s->strstart;
}
- s->insert = 0;
- if (flush == Z_FINISH) {
- FLUSH_BLOCK(s, 1);
+ if (s->high_water < s->strstart)
+ s->high_water = s->strstart;
+
+ /* If the last block was written to next_out, then done. */
+ if (last)
return finish_done;
+
+ /* If flushing and all input has been consumed, then done. */
+ if (flush != Z_NO_FLUSH && flush != Z_FINISH &&
+ s->strm->avail_in == 0 && (long)s->strstart == s->block_start)
+ return block_done;
+
+ /* Fill the window with any remaining input. */
+ have = s->window_size - s->strstart;
+ if (s->strm->avail_in > have && s->block_start >= (long)s->w_size) {
+ /* Slide the window down. */
+ s->block_start -= s->w_size;
+ s->strstart -= s->w_size;
+ zmemcpy(s->window, s->window + s->w_size, s->strstart);
+ if (s->matches < 2)
+ s->matches++; /* add a pending slide_hash() */
+ have += s->w_size; /* more space now */
+ if (s->insert > s->strstart)
+ s->insert = s->strstart;
}
- if ((long)s->strstart > s->block_start)
- FLUSH_BLOCK(s, 0);
- return block_done;
+ if (have > s->strm->avail_in)
+ have = s->strm->avail_in;
+ if (have) {
+ read_buf(s->strm, s->window + s->strstart, have);
+ s->strstart += have;
+ s->insert += MIN(have, s->w_size - s->insert);
+ }
+ if (s->high_water < s->strstart)
+ s->high_water = s->strstart;
+
+ /* There was not enough avail_out to write a complete worthy or flushed
+ * stored block to next_out. Write a stored block to pending instead, if we
+ * have enough input for a worthy block, or if flushing and there is enough
+ * room for the remaining input as a stored block in the pending buffer.
+ */
+ have = (s->bi_valid + 42) >> 3; /* number of header bytes */
+ /* maximum stored block length that will fit in pending: */
+ have = MIN(s->pending_buf_size - have, MAX_STORED);
+ min_block = MIN(have, s->w_size);
+ left = s->strstart - s->block_start;
+ if (left >= min_block ||
+ ((left || flush == Z_FINISH) && flush != Z_NO_FLUSH &&
+ s->strm->avail_in == 0 && left <= have)) {
+ len = MIN(left, have);
+ last = flush == Z_FINISH && s->strm->avail_in == 0 &&
+ len == left ? 1 : 0;
+ _tr_stored_block(s, (charf *)s->window + s->block_start, len, last);
+ s->block_start += len;
+ flush_pending(s->strm);
+ }
+
+ /* We've done all we can with the available input and output. */
+ return last ? finish_started : need_more;
}
/* ===========================================================================
@@ -1892,7 +2099,7 @@ local block_state deflate_rle(s, flush)
prev == *++scan && prev == *++scan &&
prev == *++scan && prev == *++scan &&
scan < strend);
- s->match_length = MAX_MATCH - (int)(strend - scan);
+ s->match_length = MAX_MATCH - (uInt)(strend - scan);
if (s->match_length > s->lookahead)
s->match_length = s->lookahead;
}
diff --git a/contrib/zlib/deflate.h b/contrib/zlib/deflate.h
index ce0299edd..23ecdd312 100644
--- a/contrib/zlib/deflate.h
+++ b/contrib/zlib/deflate.h
@@ -1,5 +1,5 @@
/* deflate.h -- internal compression state
- * Copyright (C) 1995-2012 Jean-loup Gailly
+ * Copyright (C) 1995-2016 Jean-loup Gailly
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -51,13 +51,16 @@
#define Buf_size 16
/* size of bit buffer in bi_buf */
-#define INIT_STATE 42
-#define EXTRA_STATE 69
-#define NAME_STATE 73
-#define COMMENT_STATE 91
-#define HCRC_STATE 103
-#define BUSY_STATE 113
-#define FINISH_STATE 666
+#define INIT_STATE 42 /* zlib header -> BUSY_STATE */
+#ifdef GZIP
+# define GZIP_STATE 57 /* gzip header -> BUSY_STATE | EXTRA_STATE */
+#endif
+#define EXTRA_STATE 69 /* gzip extra block -> NAME_STATE */
+#define NAME_STATE 73 /* gzip file name -> COMMENT_STATE */
+#define COMMENT_STATE 91 /* gzip comment -> HCRC_STATE */
+#define HCRC_STATE 103 /* gzip header CRC -> BUSY_STATE */
+#define BUSY_STATE 113 /* deflate -> FINISH_STATE */
+#define FINISH_STATE 666 /* stream complete */
/* Stream status */
@@ -83,7 +86,7 @@ typedef struct static_tree_desc_s static_tree_desc;
typedef struct tree_desc_s {
ct_data *dyn_tree; /* the dynamic tree */
int max_code; /* largest code with non zero frequency */
- static_tree_desc *stat_desc; /* the corresponding static tree */
+ const static_tree_desc *stat_desc; /* the corresponding static tree */
} FAR tree_desc;
typedef ush Pos;
@@ -100,10 +103,10 @@ typedef struct internal_state {
Bytef *pending_buf; /* output still pending */
ulg pending_buf_size; /* size of pending_buf */
Bytef *pending_out; /* next pending byte to output to the stream */
- uInt pending; /* nb of bytes in the pending buffer */
+ ulg pending; /* nb of bytes in the pending buffer */
int wrap; /* bit 0 true for zlib, bit 1 true for gzip */
gz_headerp gzhead; /* gzip header information to write */
- uInt gzindex; /* where in extra, name, or comment */
+ ulg gzindex; /* where in extra, name, or comment */
Byte method; /* can only be DEFLATED */
int last_flush; /* value of flush param for previous deflate call */
@@ -249,7 +252,7 @@ typedef struct internal_state {
uInt matches; /* number of string matches in current block */
uInt insert; /* bytes at end of window left to insert */
-#ifdef DEBUG
+#ifdef ZLIB_DEBUG
ulg compressed_len; /* total bit length of compressed file mod 2^32 */
ulg bits_sent; /* bit length of compressed data sent mod 2^32 */
#endif
@@ -275,7 +278,7 @@ typedef struct internal_state {
/* Output a byte on the stream.
* IN assertion: there is enough room in pending_buf.
*/
-#define put_byte(s, c) {s->pending_buf[s->pending++] = (c);}
+#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
@@ -309,7 +312,7 @@ void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf,
* used.
*/
-#ifndef DEBUG
+#ifndef ZLIB_DEBUG
/* Inline versions of _tr_tally for speed: */
#if defined(GEN_TREES_H) || !defined(STDC)
@@ -328,8 +331,8 @@ void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf,
flush = (s->last_lit == s->lit_bufsize-1); \
}
# define _tr_tally_dist(s, distance, length, flush) \
- { uch len = (length); \
- ush dist = (distance); \
+ { uch len = (uch)(length); \
+ ush dist = (ush)(distance); \
s->d_buf[s->last_lit] = dist; \
s->l_buf[s->last_lit++] = len; \
dist--; \
diff --git a/contrib/zlib/gzguts.h b/contrib/zlib/gzguts.h
index d87659d03..6378d468a 100644
--- a/contrib/zlib/gzguts.h
+++ b/contrib/zlib/gzguts.h
@@ -1,5 +1,5 @@
/* gzguts.h -- zlib internal header definitions for gz* operations
- * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013 Mark Adler
+ * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013, 2016 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -25,6 +25,10 @@
# include <stdlib.h>
# include <limits.h>
#endif
+
+#ifndef _POSIX_SOURCE
+# define _POSIX_SOURCE
+#endif
#include <fcntl.h>
#ifdef _WIN32
@@ -35,6 +39,10 @@
# include <io.h>
#endif
+#if defined(_WIN32)
+# define WIDECHAR
+#endif
+
#ifdef WINAPI_FAMILY
# define open _open
# define read _read
@@ -95,18 +103,19 @@
# endif
#endif
-/* unlike snprintf (which is required in C99, yet still not supported by
- Microsoft more than a decade later!), _snprintf does not guarantee null
- termination of the result -- however this is only used in gzlib.c where
+/* unlike snprintf (which is required in C99), _snprintf does not guarantee
+ null termination of the result -- however this is only used in gzlib.c where
the result is assured to fit in the space provided */
-#ifdef _MSC_VER
+#if defined(_MSC_VER) && _MSC_VER < 1900
# define snprintf _snprintf
#endif
#ifndef local
# define local static
#endif
-/* compile with -Dlocal if your debugger can't find static symbols */
+/* since "static" is used to mean two completely different things in C, we
+ define "local" for the non-static meaning of "static", for readability
+ (compile with -Dlocal if your debugger can't find static symbols) */
/* gz* functions always use library allocation functions */
#ifndef STDC
@@ -170,7 +179,7 @@ typedef struct {
char *path; /* path or fd for error messages */
unsigned size; /* buffer size, zero if not allocated yet */
unsigned want; /* requested buffer size, default is GZBUFSIZE */
- unsigned char *in; /* input buffer */
+ unsigned char *in; /* input buffer (double-sized when writing) */
unsigned char *out; /* output buffer (double-sized when reading) */
int direct; /* 0 if processing gzip, 1 if transparent */
/* just for reading */
diff --git a/contrib/zlib/gzlib.c b/contrib/zlib/gzlib.c
index fae202ef8..4838bf047 100644
--- a/contrib/zlib/gzlib.c
+++ b/contrib/zlib/gzlib.c
@@ -1,5 +1,5 @@
/* gzlib.c -- zlib functions common to reading and writing gzip files
- * Copyright (C) 2004, 2010, 2011, 2012, 2013 Mark Adler
+ * Copyright (C) 2004-2017 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -94,7 +94,7 @@ local gzFile gz_open(path, fd, mode)
const char *mode;
{
gz_statep state;
- size_t len;
+ z_size_t len;
int oflag;
#ifdef O_CLOEXEC
int cloexec = 0;
@@ -188,10 +188,10 @@ local gzFile gz_open(path, fd, mode)
}
/* save the path name for error messages */
-#ifdef _WIN32
+#ifdef WIDECHAR
if (fd == -2) {
len = wcstombs(NULL, path, 0);
- if (len == (size_t)-1)
+ if (len == (z_size_t)-1)
len = 0;
}
else
@@ -202,7 +202,7 @@ local gzFile gz_open(path, fd, mode)
free(state);
return NULL;
}
-#ifdef _WIN32
+#ifdef WIDECHAR
if (fd == -2)
if (len)
wcstombs(state->path, path, len + 1);
@@ -211,7 +211,7 @@ local gzFile gz_open(path, fd, mode)
else
#endif
#if !defined(NO_snprintf) && !defined(NO_vsnprintf)
- snprintf(state->path, len + 1, "%s", (const char *)path);
+ (void)snprintf(state->path, len + 1, "%s", (const char *)path);
#else
strcpy(state->path, path);
#endif
@@ -239,7 +239,7 @@ local gzFile gz_open(path, fd, mode)
/* open the file with the appropriate flags (or just use fd) */
state->fd = fd > -1 ? fd : (
-#ifdef _WIN32
+#ifdef WIDECHAR
fd == -2 ? _wopen(path, oflag, 0666) :
#endif
open((const char *)path, oflag, 0666));
@@ -248,8 +248,10 @@ local gzFile gz_open(path, fd, mode)
free(state);
return NULL;
}
- if (state->mode == GZ_APPEND)
+ if (state->mode == GZ_APPEND) {
+ LSEEK(state->fd, 0, SEEK_END); /* so gzoffset() is correct */
state->mode = GZ_WRITE; /* simplify later checks */
+ }
/* save the current position for rewinding (only if reading) */
if (state->mode == GZ_READ) {
@@ -291,7 +293,7 @@ gzFile ZEXPORT gzdopen(fd, mode)
if (fd == -1 || (path = (char *)malloc(7 + 3 * sizeof(int))) == NULL)
return NULL;
#if !defined(NO_snprintf) && !defined(NO_vsnprintf)
- snprintf(path, 7 + 3 * sizeof(int), "<fd:%d>", fd); /* for debugging */
+ (void)snprintf(path, 7 + 3 * sizeof(int), "<fd:%d>", fd);
#else
sprintf(path, "<fd:%d>", fd); /* for debugging */
#endif
@@ -301,7 +303,7 @@ gzFile ZEXPORT gzdopen(fd, mode)
}
/* -- see zlib.h -- */
-#ifdef _WIN32
+#ifdef WIDECHAR
gzFile ZEXPORT gzopen_w(path, mode)
const wchar_t *path;
const char *mode;
@@ -329,6 +331,8 @@ int ZEXPORT gzbuffer(file, size)
return -1;
/* check and set requested size */
+ if ((size << 1) < size)
+ return -1; /* need to be able to double it */
if (size < 2)
size = 2; /* need two bytes to check magic header */
state->want = size;
@@ -393,7 +397,7 @@ z_off64_t ZEXPORT gzseek64(file, offset, whence)
/* if within raw area while reading, just go there */
if (state->mode == GZ_READ && state->how == COPY &&
state->x.pos + offset >= 0) {
- ret = LSEEK(state->fd, offset - state->x.have, SEEK_CUR);
+ ret = LSEEK(state->fd, offset - (z_off64_t)state->x.have, SEEK_CUR);
if (ret == -1)
return -1;
state->x.have = 0;
@@ -604,14 +608,13 @@ void ZLIB_INTERNAL gz_error(state, err, msg)
return;
}
#if !defined(NO_snprintf) && !defined(NO_vsnprintf)
- snprintf(state->msg, strlen(state->path) + strlen(msg) + 3,
- "%s%s%s", state->path, ": ", msg);
+ (void)snprintf(state->msg, strlen(state->path) + strlen(msg) + 3,
+ "%s%s%s", state->path, ": ", msg);
#else
strcpy(state->msg, state->path);
strcat(state->msg, ": ");
strcat(state->msg, msg);
#endif
- return;
}
#ifndef INT_MAX
diff --git a/contrib/zlib/gzread.c b/contrib/zlib/gzread.c
index bf4538eb2..f94abfed3 100644
--- a/contrib/zlib/gzread.c
+++ b/contrib/zlib/gzread.c
@@ -1,5 +1,5 @@
/* gzread.c -- zlib functions for reading gzip files
- * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013 Mark Adler
+ * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013, 2016 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -12,6 +12,7 @@ local int gz_look OF((gz_statep));
local int gz_decomp OF((gz_statep));
local int gz_fetch OF((gz_statep));
local int gz_skip OF((gz_statep, z_off64_t));
+local z_size_t gz_read OF((gz_statep, voidp, z_size_t));
/* Use read() to load a buffer -- return -1 on error, otherwise 0. Read from
state->fd, and update state->eof, state->err, and state->msg as appropriate.
@@ -24,13 +25,17 @@ local int gz_load(state, buf, len, have)
unsigned *have;
{
int ret;
+ unsigned get, max = ((unsigned)-1 >> 2) + 1;
*have = 0;
do {
- ret = read(state->fd, buf + *have, len - *have);
+ get = len - *have;
+ if (get > max)
+ get = max;
+ ret = read(state->fd, buf + *have, get);
if (ret <= 0)
break;
- *have += ret;
+ *have += (unsigned)ret;
} while (*have < len);
if (ret < 0) {
gz_error(state, Z_ERRNO, zstrerror());
@@ -94,10 +99,8 @@ local int gz_look(state)
state->in = (unsigned char *)malloc(state->want);
state->out = (unsigned char *)malloc(state->want << 1);
if (state->in == NULL || state->out == NULL) {
- if (state->out != NULL)
- free(state->out);
- if (state->in != NULL)
- free(state->in);
+ free(state->out);
+ free(state->in);
gz_error(state, Z_MEM_ERROR, "out of memory");
return -1;
}
@@ -284,33 +287,17 @@ local int gz_skip(state, len)
return 0;
}
-/* -- see zlib.h -- */
-int ZEXPORT gzread(file, buf, len)
- gzFile file;
+/* Read len bytes into buf from file, or less than len up to the end of the
+ input. Return the number of bytes read. If zero is returned, either the
+ end of file was reached, or there was an error. state->err must be
+ consulted in that case to determine which. */
+local z_size_t gz_read(state, buf, len)
+ gz_statep state;
voidp buf;
- unsigned len;
+ z_size_t len;
{
- unsigned got, n;
- gz_statep state;
- z_streamp strm;
-
- /* get internal structure */
- if (file == NULL)
- return -1;
- state = (gz_statep)file;
- strm = &(state->strm);
-
- /* check that we're reading and that there's no (serious) error */
- if (state->mode != GZ_READ ||
- (state->err != Z_OK && state->err != Z_BUF_ERROR))
- return -1;
-
- /* since an int is returned, make sure len fits in one, otherwise return
- with an error (this avoids the flaw in the interface) */
- if ((int)len < 0) {
- gz_error(state, Z_DATA_ERROR, "requested length does not fit in int");
- return -1;
- }
+ z_size_t got;
+ unsigned n;
/* if len is zero, avoid unnecessary operations */
if (len == 0)
@@ -320,32 +307,38 @@ int ZEXPORT gzread(file, buf, len)
if (state->seek) {
state->seek = 0;
if (gz_skip(state, state->skip) == -1)
- return -1;
+ return 0;
}
/* get len bytes to buf, or less than len if at the end */
got = 0;
do {
+ /* set n to the maximum amount of len that fits in an unsigned int */
+ n = (unsigned)-1;
+ if (n > len)
+ n = (unsigned)len;
+
/* first just try copying data from the output buffer */
if (state->x.have) {
- n = state->x.have > len ? len : state->x.have;
+ if (state->x.have < n)
+ n = state->x.have;
memcpy(buf, state->x.next, n);
state->x.next += n;
state->x.have -= n;
}
/* output buffer empty -- return if we're at the end of the input */
- else if (state->eof && strm->avail_in == 0) {
+ else if (state->eof && state->strm.avail_in == 0) {
state->past = 1; /* tried to read past end */
break;
}
/* need output data -- for small len or new stream load up our output
buffer */
- else if (state->how == LOOK || len < (state->size << 1)) {
+ else if (state->how == LOOK || n < (state->size << 1)) {
/* get more output, looking for header if required */
if (gz_fetch(state) == -1)
- return -1;
+ return 0;
continue; /* no progress yet -- go back to copy above */
/* the copy above assures that we will leave with space in the
output buffer, allowing at least one gzungetc() to succeed */
@@ -353,16 +346,16 @@ int ZEXPORT gzread(file, buf, len)
/* large len -- read directly into user buffer */
else if (state->how == COPY) { /* read directly */
- if (gz_load(state, (unsigned char *)buf, len, &n) == -1)
- return -1;
+ if (gz_load(state, (unsigned char *)buf, n, &n) == -1)
+ return 0;
}
/* large len -- decompress directly into user buffer */
else { /* state->how == GZIP */
- strm->avail_out = len;
- strm->next_out = (unsigned char *)buf;
+ state->strm.avail_out = n;
+ state->strm.next_out = (unsigned char *)buf;
if (gz_decomp(state) == -1)
- return -1;
+ return 0;
n = state->x.have;
state->x.have = 0;
}
@@ -374,8 +367,75 @@ int ZEXPORT gzread(file, buf, len)
state->x.pos += n;
} while (len);
- /* return number of bytes read into user buffer (will fit in int) */
- return (int)got;
+ /* return number of bytes read into user buffer */
+ return got;
+}
+
+/* -- see zlib.h -- */
+int ZEXPORT gzread(file, buf, len)
+ gzFile file;
+ voidp buf;
+ unsigned len;
+{
+ gz_statep state;
+
+ /* get internal structure */
+ if (file == NULL)
+ return -1;
+ state = (gz_statep)file;
+
+ /* check that we're reading and that there's no (serious) error */
+ if (state->mode != GZ_READ ||
+ (state->err != Z_OK && state->err != Z_BUF_ERROR))
+ return -1;
+
+ /* since an int is returned, make sure len fits in one, otherwise return
+ with an error (this avoids a flaw in the interface) */
+ if ((int)len < 0) {
+ gz_error(state, Z_STREAM_ERROR, "request does not fit in an int");
+ return -1;
+ }
+
+ /* read len or fewer bytes to buf */
+ len = (unsigned)gz_read(state, buf, len);
+
+ /* check for an error */
+ if (len == 0 && state->err != Z_OK && state->err != Z_BUF_ERROR)
+ return -1;
+
+ /* return the number of bytes read (this is assured to fit in an int) */
+ return (int)len;
+}
+
+/* -- see zlib.h -- */
+z_size_t ZEXPORT gzfread(buf, size, nitems, file)
+ voidp buf;
+ z_size_t size;
+ z_size_t nitems;
+ gzFile file;
+{
+ z_size_t len;
+ gz_statep state;
+
+ /* get internal structure */
+ if (file == NULL)
+ return 0;
+ state = (gz_statep)file;
+
+ /* check that we're reading and that there's no (serious) error */
+ if (state->mode != GZ_READ ||
+ (state->err != Z_OK && state->err != Z_BUF_ERROR))
+ return 0;
+
+ /* compute bytes to read -- error on overflow */
+ len = nitems * size;
+ if (size && len / size != nitems) {
+ gz_error(state, Z_STREAM_ERROR, "request does not fit in a size_t");
+ return 0;
+ }
+
+ /* read len or fewer bytes to buf, return the number of full items read */
+ return len ? gz_read(state, buf, len) / size : 0;
}
/* -- see zlib.h -- */
@@ -387,7 +447,6 @@ int ZEXPORT gzread(file, buf, len)
int ZEXPORT gzgetc(file)
gzFile file;
{
- int ret;
unsigned char buf[1];
gz_statep state;
@@ -408,9 +467,8 @@ int ZEXPORT gzgetc(file)
return *(state->x.next)++;
}
- /* nothing there -- try gzread() */
- ret = gzread(file, buf, 1);
- return ret < 1 ? -1 : buf[0];
+ /* nothing there -- try gz_read() */
+ return gz_read(state, buf, 1) < 1 ? -1 : buf[0];
}
int ZEXPORT gzgetc_(file)
@@ -451,7 +509,7 @@ int ZEXPORT gzungetc(c, file)
if (state->x.have == 0) {
state->x.have = 1;
state->x.next = state->out + (state->size << 1) - 1;
- state->x.next[0] = c;
+ state->x.next[0] = (unsigned char)c;
state->x.pos--;
state->past = 0;
return c;
@@ -473,7 +531,7 @@ int ZEXPORT gzungetc(c, file)
}
state->x.have++;
state->x.next--;
- state->x.next[0] = c;
+ state->x.next[0] = (unsigned char)c;
state->x.pos--;
state->past = 0;
return c;
diff --git a/contrib/zlib/gzwrite.c b/contrib/zlib/gzwrite.c
index 3ed161f44..3560193b8 100644
--- a/contrib/zlib/gzwrite.c
+++ b/contrib/zlib/gzwrite.c
@@ -1,5 +1,5 @@
/* gzwrite.c -- zlib functions for writing gzip files
- * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013 Mark Adler
+ * Copyright (C) 2004-2017 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -9,17 +9,19 @@
local int gz_init OF((gz_statep));
local int gz_comp OF((gz_statep, int));
local int gz_zero OF((gz_statep, z_off64_t));
+local z_size_t gz_write OF((gz_statep, voidpc, z_size_t));
/* Initialize state for writing a gzip file. Mark initialization by setting
- state->size to non-zero. Return -1 on failure or 0 on success. */
+ state->size to non-zero. Return -1 on a memory allocation failure, or 0 on
+ success. */
local int gz_init(state)
gz_statep state;
{
int ret;
z_streamp strm = &(state->strm);
- /* allocate input buffer */
- state->in = (unsigned char *)malloc(state->want);
+ /* allocate input buffer (double size for gzprintf) */
+ state->in = (unsigned char *)malloc(state->want << 1);
if (state->in == NULL) {
gz_error(state, Z_MEM_ERROR, "out of memory");
return -1;
@@ -47,6 +49,7 @@ local int gz_init(state)
gz_error(state, Z_MEM_ERROR, "out of memory");
return -1;
}
+ strm->next_in = NULL;
}
/* mark state as initialized */
@@ -62,17 +65,17 @@ local int gz_init(state)
}
/* Compress whatever is at avail_in and next_in and write to the output file.
- Return -1 if there is an error writing to the output file, otherwise 0.
- flush is assumed to be a valid deflate() flush value. If flush is Z_FINISH,
- then the deflate() state is reset to start a new gzip stream. If gz->direct
- is true, then simply write to the output file without compressing, and
- ignore flush. */
+ Return -1 if there is an error writing to the output file or if gz_init()
+ fails to allocate memory, otherwise 0. flush is assumed to be a valid
+ deflate() flush value. If flush is Z_FINISH, then the deflate() state is
+ reset to start a new gzip stream. If gz->direct is true, then simply write
+ to the output file without compressing, and ignore flush. */
local int gz_comp(state, flush)
gz_statep state;
int flush;
{
- int ret, got;
- unsigned have;
+ int ret, writ;
+ unsigned have, put, max = ((unsigned)-1 >> 2) + 1;
z_streamp strm = &(state->strm);
/* allocate memory if this is the first time through */
@@ -81,12 +84,16 @@ local int gz_comp(state, flush)
/* write directly if requested */
if (state->direct) {
- got = write(state->fd, strm->next_in, strm->avail_in);
- if (got < 0 || (unsigned)got != strm->avail_in) {
- gz_error(state, Z_ERRNO, zstrerror());
- return -1;
+ while (strm->avail_in) {
+ put = strm->avail_in > max ? max : strm->avail_in;
+ writ = write(state->fd, strm->next_in, put);
+ if (writ < 0) {
+ gz_error(state, Z_ERRNO, zstrerror());
+ return -1;
+ }
+ strm->avail_in -= (unsigned)writ;
+ strm->next_in += writ;
}
- strm->avail_in = 0;
return 0;
}
@@ -97,17 +104,21 @@ local int gz_comp(state, flush)
doing Z_FINISH then don't write until we get to Z_STREAM_END */
if (strm->avail_out == 0 || (flush != Z_NO_FLUSH &&
(flush != Z_FINISH || ret == Z_STREAM_END))) {
- have = (unsigned)(strm->next_out - state->x.next);
- if (have && ((got = write(state->fd, state->x.next, have)) < 0 ||
- (unsigned)got != have)) {
- gz_error(state, Z_ERRNO, zstrerror());
- return -1;
+ while (strm->next_out > state->x.next) {
+ put = strm->next_out - state->x.next > (int)max ? max :
+ (unsigned)(strm->next_out - state->x.next);
+ writ = write(state->fd, state->x.next, put);
+ if (writ < 0) {
+ gz_error(state, Z_ERRNO, zstrerror());
+ return -1;
+ }
+ state->x.next += writ;
}
if (strm->avail_out == 0) {
strm->avail_out = state->size;
strm->next_out = state->out;
+ state->x.next = state->out;
}
- state->x.next = strm->next_out;
}
/* compress */
@@ -129,7 +140,8 @@ local int gz_comp(state, flush)
return 0;
}
-/* Compress len zeros to output. Return -1 on error, 0 on success. */
+/* Compress len zeros to output. Return -1 on a write error or memory
+ allocation failure by gz_comp(), or 0 on success. */
local int gz_zero(state, len)
gz_statep state;
z_off64_t len;
@@ -161,32 +173,14 @@ local int gz_zero(state, len)
return 0;
}
-/* -- see zlib.h -- */
-int ZEXPORT gzwrite(file, buf, len)
- gzFile file;
+/* Write len bytes from buf to file. Return the number of bytes written. If
+ the returned value is less than len, then there was an error. */
+local z_size_t gz_write(state, buf, len)
+ gz_statep state;
voidpc buf;
- unsigned len;
+ z_size_t len;
{
- unsigned put = len;
- gz_statep state;
- z_streamp strm;
-
- /* get internal structure */
- if (file == NULL)
- return 0;
- state = (gz_statep)file;
- strm = &(state->strm);
-
- /* check that we're writing and that there's no error */
- if (state->mode != GZ_WRITE || state->err != Z_OK)
- return 0;
-
- /* since an int is returned, make sure len fits in one, otherwise return
- with an error (this avoids the flaw in the interface) */
- if ((int)len < 0) {
- gz_error(state, Z_DATA_ERROR, "requested length does not fit in int");
- return 0;
- }
+ z_size_t put = len;
/* if len is zero, avoid unnecessary operations */
if (len == 0)
@@ -209,14 +203,15 @@ int ZEXPORT gzwrite(file, buf, len)
do {
unsigned have, copy;
- if (strm->avail_in == 0)
- strm->next_in = state->in;
- have = (unsigned)((strm->next_in + strm->avail_in) - state->in);
+ if (state->strm.avail_in == 0)
+ state->strm.next_in = state->in;
+ have = (unsigned)((state->strm.next_in + state->strm.avail_in) -
+ state->in);
copy = state->size - have;
if (copy > len)
- copy = len;
+ copy = (unsigned)len;
memcpy(state->in + have, buf, copy);
- strm->avail_in += copy;
+ state->strm.avail_in += copy;
state->x.pos += copy;
buf = (const char *)buf + copy;
len -= copy;
@@ -226,19 +221,83 @@ int ZEXPORT gzwrite(file, buf, len)
}
else {
/* consume whatever's left in the input buffer */
- if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1)
+ if (state->strm.avail_in && gz_comp(state, Z_NO_FLUSH) == -1)
return 0;
/* directly compress user buffer to file */
- strm->avail_in = len;
- strm->next_in = (z_const Bytef *)buf;
- state->x.pos += len;
- if (gz_comp(state, Z_NO_FLUSH) == -1)
- return 0;
+ state->strm.next_in = (z_const Bytef *)buf;
+ do {
+ unsigned n = (unsigned)-1;
+ if (n > len)
+ n = (unsigned)len;
+ state->strm.avail_in = n;
+ state->x.pos += n;
+ if (gz_comp(state, Z_NO_FLUSH) == -1)
+ return 0;
+ len -= n;
+ } while (len);
+ }
+
+ /* input was all buffered or compressed */
+ return put;
+}
+
+/* -- see zlib.h -- */
+int ZEXPORT gzwrite(file, buf, len)
+ gzFile file;
+ voidpc buf;
+ unsigned len;
+{
+ gz_statep state;
+
+ /* get internal structure */
+ if (file == NULL)
+ return 0;
+ state = (gz_statep)file;
+
+ /* check that we're writing and that there's no error */
+ if (state->mode != GZ_WRITE || state->err != Z_OK)
+ return 0;
+
+ /* since an int is returned, make sure len fits in one, otherwise return
+ with an error (this avoids a flaw in the interface) */
+ if ((int)len < 0) {
+ gz_error(state, Z_DATA_ERROR, "requested length does not fit in int");
+ return 0;
}
- /* input was all buffered or compressed (put will fit in int) */
- return (int)put;
+ /* write len bytes from buf (the return value will fit in an int) */
+ return (int)gz_write(state, buf, len);
+}
+
+/* -- see zlib.h -- */
+z_size_t ZEXPORT gzfwrite(buf, size, nitems, file)
+ voidpc buf;
+ z_size_t size;
+ z_size_t nitems;
+ gzFile file;
+{
+ z_size_t len;
+ gz_statep state;
+
+ /* get internal structure */
+ if (file == NULL)
+ return 0;
+ state = (gz_statep)file;
+
+ /* check that we're writing and that there's no error */
+ if (state->mode != GZ_WRITE || state->err != Z_OK)
+ return 0;
+
+ /* compute bytes to read -- error on overflow */
+ len = nitems * size;
+ if (size && len / size != nitems) {
+ gz_error(state, Z_STREAM_ERROR, "request does not fit in a size_t");
+ return 0;
+ }
+
+ /* write len bytes to buf, return the number of full items written */
+ return len ? gz_write(state, buf, len) / size : 0;
}
/* -- see zlib.h -- */
@@ -275,7 +334,7 @@ int ZEXPORT gzputc(file, c)
strm->next_in = state->in;
have = (unsigned)((strm->next_in + strm->avail_in) - state->in);
if (have < state->size) {
- state->in[have] = c;
+ state->in[have] = (unsigned char)c;
strm->avail_in++;
state->x.pos++;
return c & 0xff;
@@ -283,8 +342,8 @@ int ZEXPORT gzputc(file, c)
}
/* no room in buffer or not initialized, use gz_write() */
- buf[0] = c;
- if (gzwrite(file, buf, 1) != 1)
+ buf[0] = (unsigned char)c;
+ if (gz_write(state, buf, 1) != 1)
return -1;
return c & 0xff;
}
@@ -294,13 +353,26 @@ int ZEXPORT gzputs(file, str)
gzFile file;
const char *str;
{
- int ret;
- unsigned len;
+ z_size_t len, put;
+ gz_statep state;
+
+ /* get internal structure */
+ if (file == NULL)
+ return -1;
+ state = (gz_statep)file;
+
+ /* check that we're writing and that there's no error */
+ if (state->mode != GZ_WRITE || state->err != Z_OK)
+ return -1;
/* write string */
- len = (unsigned)strlen(str);
- ret = gzwrite(file, str, len);
- return ret == 0 && len != 0 ? -1 : ret;
+ len = strlen(str);
+ if ((int)len < 0 || (unsigned)len != len) {
+ gz_error(state, Z_STREAM_ERROR, "string length does not fit in int");
+ return -1;
+ }
+ put = gz_write(state, str, len);
+ return put < len ? -1 : (int)len;
}
#if defined(STDC) || defined(Z_HAVE_STDARG_H)
@@ -309,63 +381,73 @@ int ZEXPORT gzputs(file, str)
/* -- see zlib.h -- */
int ZEXPORTVA gzvprintf(gzFile file, const char *format, va_list va)
{
- int size, len;
+ int len;
+ unsigned left;
+ char *next;
gz_statep state;
z_streamp strm;
/* get internal structure */
if (file == NULL)
- return -1;
+ return Z_STREAM_ERROR;
state = (gz_statep)file;
strm = &(state->strm);
/* check that we're writing and that there's no error */
if (state->mode != GZ_WRITE || state->err != Z_OK)
- return 0;
+ return Z_STREAM_ERROR;
/* make sure we have some buffer space */
if (state->size == 0 && gz_init(state) == -1)
- return 0;
+ return state->err;
/* check for seek request */
if (state->seek) {
state->seek = 0;
if (gz_zero(state, state->skip) == -1)
- return 0;
+ return state->err;
}
- /* consume whatever's left in the input buffer */
- if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1)
- return 0;
-
- /* do the printf() into the input buffer, put length in len */
- size = (int)(state->size);
- state->in[size - 1] = 0;
+ /* do the printf() into the input buffer, put length in len -- the input
+ buffer is double-sized just for this function, so there is guaranteed to
+ be state->size bytes available after the current contents */
+ if (strm->avail_in == 0)
+ strm->next_in = state->in;
+ next = (char *)(state->in + (strm->next_in - state->in) + strm->avail_in);
+ next[state->size - 1] = 0;
#ifdef NO_vsnprintf
# ifdef HAS_vsprintf_void
- (void)vsprintf((char *)(state->in), format, va);
- for (len = 0; len < size; len++)
- if (state->in[len] == 0) break;
+ (void)vsprintf(next, format, va);
+ for (len = 0; len < state->size; len++)
+ if (next[len] == 0) break;
# else
- len = vsprintf((char *)(state->in), format, va);
+ len = vsprintf(next, format, va);
# endif
#else
# ifdef HAS_vsnprintf_void
- (void)vsnprintf((char *)(state->in), size, format, va);
- len = strlen((char *)(state->in));
+ (void)vsnprintf(next, state->size, format, va);
+ len = strlen(next);
# else
- len = vsnprintf((char *)(state->in), size, format, va);
+ len = vsnprintf(next, state->size, format, va);
# endif
#endif
/* check that printf() results fit in buffer */
- if (len <= 0 || len >= (int)size || state->in[size - 1] != 0)
+ if (len == 0 || (unsigned)len >= state->size || next[state->size - 1] != 0)
return 0;
- /* update buffer and position, defer compression until needed */
- strm->avail_in = (unsigned)len;
- strm->next_in = state->in;
+ /* update buffer and position, compress first half if past that */
+ strm->avail_in += (unsigned)len;
state->x.pos += len;
+ if (strm->avail_in >= state->size) {
+ left = strm->avail_in - state->size;
+ strm->avail_in = state->size;
+ if (gz_comp(state, Z_NO_FLUSH) == -1)
+ return state->err;
+ memcpy(state->in, state->in + state->size, left);
+ strm->next_in = state->in;
+ strm->avail_in = left;
+ }
return len;
}
@@ -390,73 +472,82 @@ int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
int a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
a11, a12, a13, a14, a15, a16, a17, a18, a19, a20;
{
- int size, len;
+ unsigned len, left;
+ char *next;
gz_statep state;
z_streamp strm;
/* get internal structure */
if (file == NULL)
- return -1;
+ return Z_STREAM_ERROR;
state = (gz_statep)file;
strm = &(state->strm);
/* check that can really pass pointer in ints */
if (sizeof(int) != sizeof(void *))
- return 0;
+ return Z_STREAM_ERROR;
/* check that we're writing and that there's no error */
if (state->mode != GZ_WRITE || state->err != Z_OK)
- return 0;
+ return Z_STREAM_ERROR;
/* make sure we have some buffer space */
if (state->size == 0 && gz_init(state) == -1)
- return 0;
+ return state->error;
/* check for seek request */
if (state->seek) {
state->seek = 0;
if (gz_zero(state, state->skip) == -1)
- return 0;
+ return state->error;
}
- /* consume whatever's left in the input buffer */
- if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1)
- return 0;
-
- /* do the printf() into the input buffer, put length in len */
- size = (int)(state->size);
- state->in[size - 1] = 0;
+ /* do the printf() into the input buffer, put length in len -- the input
+ buffer is double-sized just for this function, so there is guaranteed to
+ be state->size bytes available after the current contents */
+ if (strm->avail_in == 0)
+ strm->next_in = state->in;
+ next = (char *)(strm->next_in + strm->avail_in);
+ next[state->size - 1] = 0;
#ifdef NO_snprintf
# ifdef HAS_sprintf_void
- sprintf((char *)(state->in), format, a1, a2, a3, a4, a5, a6, a7, a8,
- a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
+ sprintf(next, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12,
+ a13, a14, a15, a16, a17, a18, a19, a20);
for (len = 0; len < size; len++)
- if (state->in[len] == 0) break;
+ if (next[len] == 0)
+ break;
# else
- len = sprintf((char *)(state->in), format, a1, a2, a3, a4, a5, a6, a7, a8,
- a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
+ len = sprintf(next, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11,
+ a12, a13, a14, a15, a16, a17, a18, a19, a20);
# endif
#else
# ifdef HAS_snprintf_void
- snprintf((char *)(state->in), size, format, a1, a2, a3, a4, a5, a6, a7, a8,
- a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
- len = strlen((char *)(state->in));
+ snprintf(next, state->size, format, a1, a2, a3, a4, a5, a6, a7, a8, a9,
+ a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
+ len = strlen(next);
# else
- len = snprintf((char *)(state->in), size, format, a1, a2, a3, a4, a5, a6,
- a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18,
- a19, a20);
+ len = snprintf(next, state->size, format, a1, a2, a3, a4, a5, a6, a7, a8,
+ a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
# endif
#endif
/* check that printf() results fit in buffer */
- if (len <= 0 || len >= (int)size || state->in[size - 1] != 0)
+ if (len == 0 || len >= state->size || next[state->size - 1] != 0)
return 0;
- /* update buffer and position, defer compression until needed */
- strm->avail_in = (unsigned)len;
- strm->next_in = state->in;
+ /* update buffer and position, compress first half if past that */
+ strm->avail_in += len;
state->x.pos += len;
- return len;
+ if (strm->avail_in >= state->size) {
+ left = strm->avail_in - state->size;
+ strm->avail_in = state->size;
+ if (gz_comp(state, Z_NO_FLUSH) == -1)
+ return state->err;
+ memcpy(state->in, state->in + state->size, left);
+ strm->next_in = state->in;
+ strm->avail_in = left;
+ }
+ return (int)len;
}
#endif
@@ -470,7 +561,7 @@ int ZEXPORT gzflush(file, flush)
/* get internal structure */
if (file == NULL)
- return -1;
+ return Z_STREAM_ERROR;
state = (gz_statep)file;
/* check that we're writing and that there's no error */
@@ -485,11 +576,11 @@ int ZEXPORT gzflush(file, flush)
if (state->seek) {
state->seek = 0;
if (gz_zero(state, state->skip) == -1)
- return -1;
+ return state->err;
}
/* compress remaining data with requested flush */
- gz_comp(state, flush);
+ (void)gz_comp(state, flush);
return state->err;
}
@@ -520,13 +611,13 @@ int ZEXPORT gzsetparams(file, level, strategy)
if (state->seek) {
state->seek = 0;
if (gz_zero(state, state->skip) == -1)
- return -1;
+ return state->err;
}
/* change compression parameters for subsequent input */
if (state->size) {
/* flush previous input with previous parameters before changing */
- if (strm->avail_in && gz_comp(state, Z_PARTIAL_FLUSH) == -1)
+ if (strm->avail_in && gz_comp(state, Z_BLOCK) == -1)
return state->err;
deflateParams(strm, level, strategy);
}
diff --git a/contrib/zlib/infback.c b/contrib/zlib/infback.c
index f3833c2e4..59679ecbf 100644
--- a/contrib/zlib/infback.c
+++ b/contrib/zlib/infback.c
@@ -1,5 +1,5 @@
/* infback.c -- inflate using a call-back interface
- * Copyright (C) 1995-2011 Mark Adler
+ * Copyright (C) 1995-2016 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -61,7 +61,7 @@ int stream_size;
Tracev((stderr, "inflate: allocated\n"));
strm->state = (struct internal_state FAR *)state;
state->dmax = 32768U;
- state->wbits = windowBits;
+ state->wbits = (uInt)windowBits;
state->wsize = 1U << windowBits;
state->window = window;
state->wnext = 0;
diff --git a/contrib/zlib/inffast.c b/contrib/zlib/inffast.c
index bda59ceb6..1fec7f363 100644
--- a/contrib/zlib/inffast.c
+++ b/contrib/zlib/inffast.c
@@ -1,5 +1,5 @@
/* inffast.c -- fast decoding
- * Copyright (C) 1995-2008, 2010, 2013 Mark Adler
+ * Copyright (C) 1995-2017 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -8,26 +8,9 @@
#include "inflate.h"
#include "inffast.h"
-#ifndef ASMINF
-
-/* Allow machine dependent optimization for post-increment or pre-increment.
- Based on testing to date,
- Pre-increment preferred for:
- - PowerPC G3 (Adler)
- - MIPS R5000 (Randers-Pehrson)
- Post-increment preferred for:
- - none
- No measurable difference:
- - Pentium III (Anderson)
- - M68060 (Nikl)
- */
-#ifdef POSTINC
-# define OFF 0
-# define PUP(a) *(a)++
+#ifdef ASMINF
+# pragma message("Assembler code may have bugs -- use at your own risk")
#else
-# define OFF 1
-# define PUP(a) *++(a)
-#endif
/*
Decode literal, length, and distance codes and write out the resulting
@@ -87,7 +70,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
code const FAR *dcode; /* local strm->distcode */
unsigned lmask; /* mask for first level of length codes */
unsigned dmask; /* mask for first level of distance codes */
- code here; /* retrieved table entry */
+ code const *here; /* retrieved table entry */
unsigned op; /* code bits, operation, extra bits, or */
/* window position, window bytes to copy */
unsigned len; /* match length, unused bytes */
@@ -96,9 +79,9 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
/* copy state to local variables */
state = (struct inflate_state FAR *)strm->state;
- in = strm->next_in - OFF;
+ in = strm->next_in;
last = in + (strm->avail_in - 5);
- out = strm->next_out - OFF;
+ out = strm->next_out;
beg = out - (start - strm->avail_out);
end = out + (strm->avail_out - 257);
#ifdef INFLATE_STRICT
@@ -119,29 +102,29 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
input data or output space */
do {
if (bits < 15) {
- hold += (unsigned long)(PUP(in)) << bits;
+ hold += (unsigned long)(*in++) << bits;
bits += 8;
- hold += (unsigned long)(PUP(in)) << bits;
+ hold += (unsigned long)(*in++) << bits;
bits += 8;
}
- here = lcode[hold & lmask];
+ here = lcode + (hold & lmask);
dolen:
- op = (unsigned)(here.bits);
+ op = (unsigned)(here->bits);
hold >>= op;
bits -= op;
- op = (unsigned)(here.op);
+ op = (unsigned)(here->op);
if (op == 0) { /* literal */
- Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
+ Tracevv((stderr, here->val >= 0x20 && here->val < 0x7f ?
"inflate: literal '%c'\n" :
- "inflate: literal 0x%02x\n", here.val));
- PUP(out) = (unsigned char)(here.val);
+ "inflate: literal 0x%02x\n", here->val));
+ *out++ = (unsigned char)(here->val);
}
else if (op & 16) { /* length base */
- len = (unsigned)(here.val);
+ len = (unsigned)(here->val);
op &= 15; /* number of extra bits */
if (op) {
if (bits < op) {
- hold += (unsigned long)(PUP(in)) << bits;
+ hold += (unsigned long)(*in++) << bits;
bits += 8;
}
len += (unsigned)hold & ((1U << op) - 1);
@@ -150,25 +133,25 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
}
Tracevv((stderr, "inflate: length %u\n", len));
if (bits < 15) {
- hold += (unsigned long)(PUP(in)) << bits;
+ hold += (unsigned long)(*in++) << bits;
bits += 8;
- hold += (unsigned long)(PUP(in)) << bits;
+ hold += (unsigned long)(*in++) << bits;
bits += 8;
}
- here = dcode[hold & dmask];
+ here = dcode + (hold & dmask);
dodist:
- op = (unsigned)(here.bits);
+ op = (unsigned)(here->bits);
hold >>= op;
bits -= op;
- op = (unsigned)(here.op);
+ op = (unsigned)(here->op);
if (op & 16) { /* distance base */
- dist = (unsigned)(here.val);
+ dist = (unsigned)(here->val);
op &= 15; /* number of extra bits */
if (bits < op) {
- hold += (unsigned long)(PUP(in)) << bits;
+ hold += (unsigned long)(*in++) << bits;
bits += 8;
if (bits < op) {
- hold += (unsigned long)(PUP(in)) << bits;
+ hold += (unsigned long)(*in++) << bits;
bits += 8;
}
}
@@ -196,30 +179,30 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
if (len <= op - whave) {
do {
- PUP(out) = 0;
+ *out++ = 0;
} while (--len);
continue;
}
len -= op - whave;
do {
- PUP(out) = 0;
+ *out++ = 0;
} while (--op > whave);
if (op == 0) {
from = out - dist;
do {
- PUP(out) = PUP(from);
+ *out++ = *from++;
} while (--len);
continue;
}
#endif
}
- from = window - OFF;
+ from = window;
if (wnext == 0) { /* very common case */
from += wsize - op;
if (op < len) { /* some from window */
len -= op;
do {
- PUP(out) = PUP(from);
+ *out++ = *from++;
} while (--op);
from = out - dist; /* rest from output */
}
@@ -230,14 +213,14 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
if (op < len) { /* some from end of window */
len -= op;
do {
- PUP(out) = PUP(from);
+ *out++ = *from++;
} while (--op);
- from = window - OFF;
+ from = window;
if (wnext < len) { /* some from start of window */
op = wnext;
len -= op;
do {
- PUP(out) = PUP(from);
+ *out++ = *from++;
} while (--op);
from = out - dist; /* rest from output */
}
@@ -248,40 +231,40 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
if (op < len) { /* some from window */
len -= op;
do {
- PUP(out) = PUP(from);
+ *out++ = *from++;
} while (--op);
from = out - dist; /* rest from output */
}
}
while (len > 2) {
- PUP(out) = PUP(from);
- PUP(out) = PUP(from);
- PUP(out) = PUP(from);
+ *out++ = *from++;
+ *out++ = *from++;
+ *out++ = *from++;
len -= 3;
}
if (len) {
- PUP(out) = PUP(from);
+ *out++ = *from++;
if (len > 1)
- PUP(out) = PUP(from);
+ *out++ = *from++;
}
}
else {
from = out - dist; /* copy direct from output */
do { /* minimum length is three */
- PUP(out) = PUP(from);
- PUP(out) = PUP(from);
- PUP(out) = PUP(from);
+ *out++ = *from++;
+ *out++ = *from++;
+ *out++ = *from++;
len -= 3;
} while (len > 2);
if (len) {
- PUP(out) = PUP(from);
+ *out++ = *from++;
if (len > 1)
- PUP(out) = PUP(from);
+ *out++ = *from++;
}
}
}
else if ((op & 64) == 0) { /* 2nd level distance code */
- here = dcode[here.val + (hold & ((1U << op) - 1))];
+ here = dcode + here->val + (hold & ((1U << op) - 1));
goto dodist;
}
else {
@@ -291,7 +274,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
}
}
else if ((op & 64) == 0) { /* 2nd level length code */
- here = lcode[here.val + (hold & ((1U << op) - 1))];
+ here = lcode + here->val + (hold & ((1U << op) - 1));
goto dolen;
}
else if (op & 32) { /* end-of-block */
@@ -313,8 +296,8 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
hold &= (1U << bits) - 1;
/* update state and return */
- strm->next_in = in + OFF;
- strm->next_out = out + OFF;
+ strm->next_in = in;
+ strm->next_out = out;
strm->avail_in = (unsigned)(in < last ? 5 + (last - in) : 5 - (in - last));
strm->avail_out = (unsigned)(out < end ?
257 + (end - out) : 257 - (out - end));
diff --git a/contrib/zlib/inflate.c b/contrib/zlib/inflate.c
index 870f89bb4..575fcdf82 100644
--- a/contrib/zlib/inflate.c
+++ b/contrib/zlib/inflate.c
@@ -1,5 +1,5 @@
/* inflate.c -- zlib decompression
- * Copyright (C) 1995-2012 Mark Adler
+ * Copyright (C) 1995-2016 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -92,6 +92,7 @@
#endif
/* function prototypes */
+local int inflateStateCheck OF((z_streamp strm));
local void fixedtables OF((struct inflate_state FAR *state));
local int updatewindow OF((z_streamp strm, const unsigned char FAR *end,
unsigned copy));
@@ -101,12 +102,26 @@ local int updatewindow OF((z_streamp strm, const unsigned char FAR *end,
local unsigned syncsearch OF((unsigned FAR *have, const unsigned char FAR *buf,
unsigned len));
+local int inflateStateCheck(strm)
+z_streamp strm;
+{
+ struct inflate_state FAR *state;
+ if (strm == Z_NULL ||
+ strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0)
+ return 1;
+ state = (struct inflate_state FAR *)strm->state;
+ if (state == Z_NULL || state->strm != strm ||
+ state->mode < HEAD || state->mode > SYNC)
+ return 1;
+ return 0;
+}
+
int ZEXPORT inflateResetKeep(strm)
z_streamp strm;
{
struct inflate_state FAR *state;
- if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
state = (struct inflate_state FAR *)strm->state;
strm->total_in = strm->total_out = state->total = 0;
strm->msg = Z_NULL;
@@ -131,7 +146,7 @@ z_streamp strm;
{
struct inflate_state FAR *state;
- if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
state = (struct inflate_state FAR *)strm->state;
state->wsize = 0;
state->whave = 0;
@@ -147,7 +162,7 @@ int windowBits;
struct inflate_state FAR *state;
/* get the state */
- if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
state = (struct inflate_state FAR *)strm->state;
/* extract wrap request from windowBits parameter */
@@ -156,7 +171,7 @@ int windowBits;
windowBits = -windowBits;
}
else {
- wrap = (windowBits >> 4) + 1;
+ wrap = (windowBits >> 4) + 5;
#ifdef GUNZIP
if (windowBits < 48)
windowBits &= 15;
@@ -210,7 +225,9 @@ int stream_size;
if (state == Z_NULL) return Z_MEM_ERROR;
Tracev((stderr, "inflate: allocated\n"));
strm->state = (struct internal_state FAR *)state;
+ state->strm = strm;
state->window = Z_NULL;
+ state->mode = HEAD; /* to pass state test in inflateReset2() */
ret = inflateReset2(strm, windowBits);
if (ret != Z_OK) {
ZFREE(strm, state);
@@ -234,17 +251,17 @@ int value;
{
struct inflate_state FAR *state;
- if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
state = (struct inflate_state FAR *)strm->state;
if (bits < 0) {
state->hold = 0;
state->bits = 0;
return Z_OK;
}
- if (bits > 16 || state->bits + bits > 32) return Z_STREAM_ERROR;
+ if (bits > 16 || state->bits + (uInt)bits > 32) return Z_STREAM_ERROR;
value &= (1L << bits) - 1;
- state->hold += value << state->bits;
- state->bits += bits;
+ state->hold += (unsigned)value << state->bits;
+ state->bits += (uInt)bits;
return Z_OK;
}
@@ -625,7 +642,7 @@ int flush;
static const unsigned short order[19] = /* permutation of code lengths */
{16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
- if (strm == Z_NULL || strm->state == Z_NULL || strm->next_out == Z_NULL ||
+ if (inflateStateCheck(strm) || strm->next_out == Z_NULL ||
(strm->next_in == Z_NULL && strm->avail_in != 0))
return Z_STREAM_ERROR;
@@ -645,6 +662,8 @@ int flush;
NEEDBITS(16);
#ifdef GUNZIP
if ((state->wrap & 2) && hold == 0x8b1f) { /* gzip header */
+ if (state->wbits == 0)
+ state->wbits = 15;
state->check = crc32(0L, Z_NULL, 0);
CRC2(state->check, hold);
INITBITS();
@@ -672,7 +691,7 @@ int flush;
len = BITS(4) + 8;
if (state->wbits == 0)
state->wbits = len;
- else if (len > state->wbits) {
+ if (len > 15 || len > state->wbits) {
strm->msg = (char *)"invalid window size";
state->mode = BAD;
break;
@@ -699,14 +718,16 @@ int flush;
}
if (state->head != Z_NULL)
state->head->text = (int)((hold >> 8) & 1);
- if (state->flags & 0x0200) CRC2(state->check, hold);
+ if ((state->flags & 0x0200) && (state->wrap & 4))
+ CRC2(state->check, hold);
INITBITS();
state->mode = TIME;
case TIME:
NEEDBITS(32);
if (state->head != Z_NULL)
state->head->time = hold;
- if (state->flags & 0x0200) CRC4(state->check, hold);
+ if ((state->flags & 0x0200) && (state->wrap & 4))
+ CRC4(state->check, hold);
INITBITS();
state->mode = OS;
case OS:
@@ -715,7 +736,8 @@ int flush;
state->head->xflags = (int)(hold & 0xff);
state->head->os = (int)(hold >> 8);
}
- if (state->flags & 0x0200) CRC2(state->check, hold);
+ if ((state->flags & 0x0200) && (state->wrap & 4))
+ CRC2(state->check, hold);
INITBITS();
state->mode = EXLEN;
case EXLEN:
@@ -724,7 +746,8 @@ int flush;
state->length = (unsigned)(hold);
if (state->head != Z_NULL)
state->head->extra_len = (unsigned)hold;
- if (state->flags & 0x0200) CRC2(state->check, hold);
+ if ((state->flags & 0x0200) && (state->wrap & 4))
+ CRC2(state->check, hold);
INITBITS();
}
else if (state->head != Z_NULL)
@@ -742,7 +765,7 @@ int flush;
len + copy > state->head->extra_max ?
state->head->extra_max - len : copy);
}
- if (state->flags & 0x0200)
+ if ((state->flags & 0x0200) && (state->wrap & 4))
state->check = crc32(state->check, next, copy);
have -= copy;
next += copy;
@@ -761,9 +784,9 @@ int flush;
if (state->head != Z_NULL &&
state->head->name != Z_NULL &&
state->length < state->head->name_max)
- state->head->name[state->length++] = len;
+ state->head->name[state->length++] = (Bytef)len;
} while (len && copy < have);
- if (state->flags & 0x0200)
+ if ((state->flags & 0x0200) && (state->wrap & 4))
state->check = crc32(state->check, next, copy);
have -= copy;
next += copy;
@@ -782,9 +805,9 @@ int flush;
if (state->head != Z_NULL &&
state->head->comment != Z_NULL &&
state->length < state->head->comm_max)
- state->head->comment[state->length++] = len;
+ state->head->comment[state->length++] = (Bytef)len;
} while (len && copy < have);
- if (state->flags & 0x0200)
+ if ((state->flags & 0x0200) && (state->wrap & 4))
state->check = crc32(state->check, next, copy);
have -= copy;
next += copy;
@@ -796,7 +819,7 @@ int flush;
case HCRC:
if (state->flags & 0x0200) {
NEEDBITS(16);
- if (hold != (state->check & 0xffff)) {
+ if ((state->wrap & 4) && hold != (state->check & 0xffff)) {
strm->msg = (char *)"header crc mismatch";
state->mode = BAD;
break;
@@ -1177,11 +1200,11 @@ int flush;
out -= left;
strm->total_out += out;
state->total += out;
- if (out)
+ if ((state->wrap & 4) && out)
strm->adler = state->check =
UPDATE(state->check, put - out, out);
out = left;
- if ((
+ if ((state->wrap & 4) && (
#ifdef GUNZIP
state->flags ? hold :
#endif
@@ -1240,10 +1263,10 @@ int flush;
strm->total_in += in;
strm->total_out += out;
state->total += out;
- if (state->wrap && out)
+ if ((state->wrap & 4) && out)
strm->adler = state->check =
UPDATE(state->check, strm->next_out - out, out);
- strm->data_type = state->bits + (state->last ? 64 : 0) +
+ strm->data_type = (int)state->bits + (state->last ? 64 : 0) +
(state->mode == TYPE ? 128 : 0) +
(state->mode == LEN_ || state->mode == COPY_ ? 256 : 0);
if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK)
@@ -1255,7 +1278,7 @@ int ZEXPORT inflateEnd(strm)
z_streamp strm;
{
struct inflate_state FAR *state;
- if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
+ if (inflateStateCheck(strm))
return Z_STREAM_ERROR;
state = (struct inflate_state FAR *)strm->state;
if (state->window != Z_NULL) ZFREE(strm, state->window);
@@ -1273,7 +1296,7 @@ uInt *dictLength;
struct inflate_state FAR *state;
/* check state */
- if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
state = (struct inflate_state FAR *)strm->state;
/* copy dictionary */
@@ -1298,7 +1321,7 @@ uInt dictLength;
int ret;
/* check state */
- if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
state = (struct inflate_state FAR *)strm->state;
if (state->wrap != 0 && state->mode != DICT)
return Z_STREAM_ERROR;
@@ -1330,7 +1353,7 @@ gz_headerp head;
struct inflate_state FAR *state;
/* check state */
- if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
state = (struct inflate_state FAR *)strm->state;
if ((state->wrap & 2) == 0) return Z_STREAM_ERROR;
@@ -1383,7 +1406,7 @@ z_streamp strm;
struct inflate_state FAR *state;
/* check parameters */
- if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
state = (struct inflate_state FAR *)strm->state;
if (strm->avail_in == 0 && state->bits < 8) return Z_BUF_ERROR;
@@ -1410,6 +1433,8 @@ z_streamp strm;
/* return no joy or set up to restart inflate() on a new block */
if (state->have != 4) return Z_DATA_ERROR;
+ if (state->mode == HEAD)
+ state->wrap = 0; /* never processed header, so assume raw */
in = strm->total_in; out = strm->total_out;
inflateReset(strm);
strm->total_in = in; strm->total_out = out;
@@ -1430,7 +1455,7 @@ z_streamp strm;
{
struct inflate_state FAR *state;
- if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
state = (struct inflate_state FAR *)strm->state;
return state->mode == STORED && state->bits == 0;
}
@@ -1445,8 +1470,7 @@ z_streamp source;
unsigned wsize;
/* check input */
- if (dest == Z_NULL || source == Z_NULL || source->state == Z_NULL ||
- source->zalloc == (alloc_func)0 || source->zfree == (free_func)0)
+ if (inflateStateCheck(source) || dest == Z_NULL)
return Z_STREAM_ERROR;
state = (struct inflate_state FAR *)source->state;
@@ -1467,6 +1491,7 @@ z_streamp source;
/* copy state */
zmemcpy((voidpf)dest, (voidpf)source, sizeof(z_stream));
zmemcpy((voidpf)copy, (voidpf)state, sizeof(struct inflate_state));
+ copy->strm = dest;
if (state->lencode >= state->codes &&
state->lencode <= state->codes + ENOUGH - 1) {
copy->lencode = copy->codes + (state->lencode - state->codes);
@@ -1488,25 +1513,51 @@ int subvert;
{
struct inflate_state FAR *state;
- if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
state = (struct inflate_state FAR *)strm->state;
- state->sane = !subvert;
#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
+ state->sane = !subvert;
return Z_OK;
#else
+ (void)subvert;
state->sane = 1;
return Z_DATA_ERROR;
#endif
}
+int ZEXPORT inflateValidate(strm, check)
+z_streamp strm;
+int check;
+{
+ struct inflate_state FAR *state;
+
+ if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
+ state = (struct inflate_state FAR *)strm->state;
+ if (check && state->wrap)
+ state->wrap |= 4;
+ else
+ state->wrap &= ~4;
+ return Z_OK;
+}
+
long ZEXPORT inflateMark(strm)
z_streamp strm;
{
struct inflate_state FAR *state;
- if (strm == Z_NULL || strm->state == Z_NULL) return -1L << 16;
+ if (inflateStateCheck(strm))
+ return -(1L << 16);
state = (struct inflate_state FAR *)strm->state;
- return ((long)(state->back) << 16) +
+ return (long)(((unsigned long)((long)state->back)) << 16) +
(state->mode == COPY ? state->length :
(state->mode == MATCH ? state->was - state->length : 0));
}
+
+unsigned long ZEXPORT inflateCodesUsed(strm)
+z_streamp strm;
+{
+ struct inflate_state FAR *state;
+ if (inflateStateCheck(strm)) return (unsigned long)-1;
+ state = (struct inflate_state FAR *)strm->state;
+ return (unsigned long)(state->next - state->codes);
+}
diff --git a/contrib/zlib/inflate.h b/contrib/zlib/inflate.h
index 95f4986d4..a46cce6b6 100644
--- a/contrib/zlib/inflate.h
+++ b/contrib/zlib/inflate.h
@@ -1,5 +1,5 @@
/* inflate.h -- internal inflate state definition
- * Copyright (C) 1995-2009 Mark Adler
+ * Copyright (C) 1995-2016 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -18,7 +18,7 @@
/* Possible inflate modes between inflate() calls */
typedef enum {
- HEAD, /* i: waiting for magic header */
+ HEAD = 16180, /* i: waiting for magic header */
FLAGS, /* i: waiting for method and flags (gzip) */
TIME, /* i: waiting for modification time (gzip) */
OS, /* i: waiting for extra flags and operating system (gzip) */
@@ -77,11 +77,14 @@ typedef enum {
CHECK -> LENGTH -> DONE
*/
-/* state maintained between inflate() calls. Approximately 10K bytes. */
+/* State maintained between inflate() calls -- approximately 7K bytes, not
+ including the allocated sliding window, which is up to 32K bytes. */
struct inflate_state {
+ z_streamp strm; /* pointer back to this zlib stream */
inflate_mode mode; /* current inflate mode */
int last; /* true if processing last block */
- int wrap; /* bit 0 true for zlib, bit 1 true for gzip */
+ int wrap; /* bit 0 true for zlib, bit 1 true for gzip,
+ bit 2 true to validate check value */
int havedict; /* true if dictionary provided */
int flags; /* gzip header method and flags (0 if zlib) */
unsigned dmax; /* zlib header max distance (INFLATE_STRICT) */
diff --git a/contrib/zlib/inftrees.c b/contrib/zlib/inftrees.c
index 44d89cf24..716c98842 100644
--- a/contrib/zlib/inftrees.c
+++ b/contrib/zlib/inftrees.c
@@ -1,5 +1,5 @@
/* inftrees.c -- generate Huffman trees for efficient decoding
- * Copyright (C) 1995-2013 Mark Adler
+ * Copyright (C) 1995-2017 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -9,7 +9,7 @@
#define MAXBITS 15
const char inflate_copyright[] =
- " inflate 1.2.8 Copyright 1995-2013 Mark Adler ";
+ " inflate 1.2.11.1 Copyright 1995-2017 Mark Adler ";
/*
If you use the zlib library in a product, an acknowledgment is welcome
in the documentation of your product. If for some reason you cannot
@@ -54,7 +54,7 @@ unsigned short FAR *work;
code FAR *next; /* next available space in table */
const unsigned short FAR *base; /* base value table to use */
const unsigned short FAR *extra; /* extra bits table to use */
- int end; /* use base and extra for symbol > end */
+ unsigned match; /* use base and extra for symbol >= match */
unsigned short count[MAXBITS+1]; /* number of codes of each length */
unsigned short offs[MAXBITS+1]; /* offsets in table for each length */
static const unsigned short lbase[31] = { /* Length codes 257..285 base */
@@ -62,7 +62,7 @@ unsigned short FAR *work;
35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
static const unsigned short lext[31] = { /* Length codes 257..285 extra */
16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
- 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78};
+ 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 198, 196};
static const unsigned short dbase[32] = { /* Distance codes 0..29 base */
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
@@ -181,19 +181,17 @@ unsigned short FAR *work;
switch (type) {
case CODES:
base = extra = work; /* dummy value--not used */
- end = 19;
+ match = 20;
break;
case LENS:
base = lbase;
- base -= 257;
extra = lext;
- extra -= 257;
- end = 256;
+ match = 257;
break;
- default: /* DISTS */
+ default: /* DISTS */
base = dbase;
extra = dext;
- end = -1;
+ match = 0;
}
/* initialize state for loop */
@@ -216,13 +214,13 @@ unsigned short FAR *work;
for (;;) {
/* create table entry */
here.bits = (unsigned char)(len - drop);
- if ((int)(work[sym]) < end) {
+ if (work[sym] + 1U < match) {
here.op = (unsigned char)0;
here.val = work[sym];
}
- else if ((int)(work[sym]) > end) {
- here.op = (unsigned char)(extra[work[sym]]);
- here.val = base[work[sym]];
+ else if (work[sym] >= match) {
+ here.op = (unsigned char)(extra[work[sym] - match]);
+ here.val = base[work[sym] - match];
}
else {
here.op = (unsigned char)(32 + 64); /* end of block */
diff --git a/contrib/zlib/trees.c b/contrib/zlib/trees.c
index 1fd7759ef..50cf4b457 100644
--- a/contrib/zlib/trees.c
+++ b/contrib/zlib/trees.c
@@ -1,5 +1,5 @@
/* trees.c -- output deflated data using Huffman coding
- * Copyright (C) 1995-2012 Jean-loup Gailly
+ * Copyright (C) 1995-2017 Jean-loup Gailly
* detect_data_type() function provided freely by Cosmin Truta, 2006
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -36,7 +36,7 @@
#include "deflate.h"
-#ifdef DEBUG
+#ifdef ZLIB_DEBUG
# include <ctype.h>
#endif
@@ -122,13 +122,13 @@ struct static_tree_desc_s {
int max_length; /* max bit length for the codes */
};
-local static_tree_desc static_l_desc =
+local const static_tree_desc static_l_desc =
{static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS};
-local static_tree_desc static_d_desc =
+local const static_tree_desc static_d_desc =
{static_dtree, extra_dbits, 0, D_CODES, MAX_BITS};
-local static_tree_desc static_bl_desc =
+local const static_tree_desc static_bl_desc =
{(const ct_data *)0, extra_blbits, 0, BL_CODES, MAX_BL_BITS};
/* ===========================================================================
@@ -152,18 +152,16 @@ local int detect_data_type OF((deflate_state *s));
local unsigned bi_reverse OF((unsigned value, int length));
local void bi_windup OF((deflate_state *s));
local void bi_flush OF((deflate_state *s));
-local void copy_block OF((deflate_state *s, charf *buf, unsigned len,
- int header));
#ifdef GEN_TREES_H
local void gen_trees_header OF((void));
#endif
-#ifndef DEBUG
+#ifndef ZLIB_DEBUG
# define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
/* Send a code of the given tree. c and tree must not have side effects */
-#else /* DEBUG */
+#else /* !ZLIB_DEBUG */
# define send_code(s, c, tree) \
{ if (z_verbose>2) fprintf(stderr,"\ncd %3d ",(c)); \
send_bits(s, tree[c].Code, tree[c].Len); }
@@ -182,7 +180,7 @@ local void gen_trees_header OF((void));
* Send a value on a given number of bits.
* IN assertion: length <= 16 and value fits in length bits.
*/
-#ifdef DEBUG
+#ifdef ZLIB_DEBUG
local void send_bits OF((deflate_state *s, int value, int length));
local void send_bits(s, value, length)
@@ -208,12 +206,12 @@ local void send_bits(s, value, length)
s->bi_valid += length;
}
}
-#else /* !DEBUG */
+#else /* !ZLIB_DEBUG */
#define send_bits(s, value, length) \
{ int len = length;\
if (s->bi_valid > (int)Buf_size - len) {\
- int val = value;\
+ int val = (int)value;\
s->bi_buf |= (ush)val << s->bi_valid;\
put_short(s, s->bi_buf);\
s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
@@ -223,7 +221,7 @@ local void send_bits(s, value, length)
s->bi_valid += len;\
}\
}
-#endif /* DEBUG */
+#endif /* ZLIB_DEBUG */
/* the arguments must not have side effects */
@@ -317,7 +315,7 @@ local void tr_static_init()
* Genererate the file trees.h describing the static trees.
*/
#ifdef GEN_TREES_H
-# ifndef DEBUG
+# ifndef ZLIB_DEBUG
# include <stdio.h>
# endif
@@ -394,7 +392,7 @@ void ZLIB_INTERNAL _tr_init(s)
s->bi_buf = 0;
s->bi_valid = 0;
-#ifdef DEBUG
+#ifdef ZLIB_DEBUG
s->compressed_len = 0L;
s->bits_sent = 0L;
#endif
@@ -522,12 +520,12 @@ local void gen_bitlen(s, desc)
xbits = 0;
if (n >= base) xbits = extra[n-base];
f = tree[n].Freq;
- s->opt_len += (ulg)f * (bits + xbits);
- if (stree) s->static_len += (ulg)f * (stree[n].Len + xbits);
+ s->opt_len += (ulg)f * (unsigned)(bits + xbits);
+ if (stree) s->static_len += (ulg)f * (unsigned)(stree[n].Len + xbits);
}
if (overflow == 0) return;
- Trace((stderr,"\nbit length overflow\n"));
+ Tracev((stderr,"\nbit length overflow\n"));
/* This happens for example on obj2 and pic of the Calgary corpus */
/* Find the first bit length which could increase: */
@@ -554,9 +552,8 @@ local void gen_bitlen(s, desc)
m = s->heap[--h];
if (m > max_code) continue;
if ((unsigned) tree[m].Len != (unsigned) bits) {
- Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));
- s->opt_len += ((long)bits - (long)tree[m].Len)
- *(long)tree[m].Freq;
+ Tracev((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));
+ s->opt_len += ((ulg)bits - tree[m].Len) * tree[m].Freq;
tree[m].Len = (ush)bits;
}
n--;
@@ -578,7 +575,7 @@ local void gen_codes (tree, max_code, bl_count)
ushf *bl_count; /* number of codes at each bit length */
{
ush next_code[MAX_BITS+1]; /* next code value for each bit length */
- ush code = 0; /* running code value */
+ unsigned code = 0; /* running code value */
int bits; /* bit index */
int n; /* code index */
@@ -586,7 +583,8 @@ local void gen_codes (tree, max_code, bl_count)
* without bit reversal.
*/
for (bits = 1; bits <= MAX_BITS; bits++) {
- next_code[bits] = code = (code + bl_count[bits-1]) << 1;
+ code = (code + bl_count[bits-1]) << 1;
+ next_code[bits] = (ush)code;
}
/* Check that the bit counts in bl_count are consistent. The last code
* must be all ones.
@@ -599,7 +597,7 @@ local void gen_codes (tree, max_code, bl_count)
int len = tree[n].Len;
if (len == 0) continue;
/* Now reverse the bits */
- tree[n].Code = bi_reverse(next_code[len]++, len);
+ tree[n].Code = (ush)bi_reverse(next_code[len]++, len);
Tracecv(tree != static_ltree, (stderr,"\nn %3d %c l %2d c %4x (%x) ",
n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));
@@ -821,7 +819,7 @@ local int build_bl_tree(s)
if (s->bl_tree[bl_order[max_blindex]].Len != 0) break;
}
/* Update opt_len to include the bit length tree and counts */
- s->opt_len += 3*(max_blindex+1) + 5+5+4;
+ s->opt_len += 3*((ulg)max_blindex+1) + 5+5+4;
Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld",
s->opt_len, s->static_len));
@@ -869,11 +867,17 @@ void ZLIB_INTERNAL _tr_stored_block(s, buf, stored_len, last)
int last; /* one if this is the last block for a file */
{
send_bits(s, (STORED_BLOCK<<1)+last, 3); /* send block type */
-#ifdef DEBUG
+ bi_windup(s); /* align on byte boundary */
+ put_short(s, (ush)stored_len);
+ put_short(s, (ush)~stored_len);
+ zmemcpy(s->pending_buf + s->pending, (Bytef *)buf, stored_len);
+ s->pending += stored_len;
+#ifdef ZLIB_DEBUG
s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L;
s->compressed_len += (stored_len + 4) << 3;
+ s->bits_sent += 2*16;
+ s->bits_sent += stored_len<<3;
#endif
- copy_block(s, buf, (unsigned)stored_len, 1); /* with header */
}
/* ===========================================================================
@@ -894,7 +898,7 @@ void ZLIB_INTERNAL _tr_align(s)
{
send_bits(s, STATIC_TREES<<1, 3);
send_code(s, END_BLOCK, static_ltree);
-#ifdef DEBUG
+#ifdef ZLIB_DEBUG
s->compressed_len += 10L; /* 3 for block type, 7 for EOB */
#endif
bi_flush(s);
@@ -902,7 +906,7 @@ void ZLIB_INTERNAL _tr_align(s)
/* ===========================================================================
* Determine the best encoding for the current block: dynamic trees, static
- * trees or store, and output the encoded block to the zip file.
+ * trees or store, and write out the encoded block.
*/
void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last)
deflate_state *s;
@@ -974,7 +978,7 @@ void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last)
send_bits(s, (STATIC_TREES<<1)+last, 3);
compress_block(s, (const ct_data *)static_ltree,
(const ct_data *)static_dtree);
-#ifdef DEBUG
+#ifdef ZLIB_DEBUG
s->compressed_len += 3 + s->static_len;
#endif
} else {
@@ -983,7 +987,7 @@ void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last)
max_blindex+1);
compress_block(s, (const ct_data *)s->dyn_ltree,
(const ct_data *)s->dyn_dtree);
-#ifdef DEBUG
+#ifdef ZLIB_DEBUG
s->compressed_len += 3 + s->opt_len;
#endif
}
@@ -995,7 +999,7 @@ void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last)
if (last) {
bi_windup(s);
-#ifdef DEBUG
+#ifdef ZLIB_DEBUG
s->compressed_len += 7; /* align on byte boundary */
#endif
}
@@ -1090,7 +1094,7 @@ local void compress_block(s, ltree, dtree)
send_code(s, code, dtree); /* send the distance code */
extra = extra_dbits[code];
if (extra != 0) {
- dist -= base_dist[code];
+ dist -= (unsigned)base_dist[code];
send_bits(s, dist, extra); /* send the extra distance bits */
}
} /* literal or match pair ? */
@@ -1193,34 +1197,7 @@ local void bi_windup(s)
}
s->bi_buf = 0;
s->bi_valid = 0;
-#ifdef DEBUG
+#ifdef ZLIB_DEBUG
s->bits_sent = (s->bits_sent+7) & ~7;
#endif
}
-
-/* ===========================================================================
- * Copy a stored block, storing first the length and its
- * one's complement if requested.
- */
-local void copy_block(s, buf, len, header)
- deflate_state *s;
- charf *buf; /* the input data */
- unsigned len; /* its length */
- int header; /* true if block header must be written */
-{
- bi_windup(s); /* align on byte boundary */
-
- if (header) {
- put_short(s, (ush)len);
- put_short(s, (ush)~len);
-#ifdef DEBUG
- s->bits_sent += 2*16;
-#endif
- }
-#ifdef DEBUG
- s->bits_sent += (ulg)len<<3;
-#endif
- while (len--) {
- put_byte(s, *buf++);
- }
-}
diff --git a/contrib/zlib/uncompr.c b/contrib/zlib/uncompr.c
index 242e9493d..f03a1a865 100644
--- a/contrib/zlib/uncompr.c
+++ b/contrib/zlib/uncompr.c
@@ -1,5 +1,5 @@
/* uncompr.c -- decompress a memory buffer
- * Copyright (C) 1995-2003, 2010 Jean-loup Gailly.
+ * Copyright (C) 1995-2003, 2010, 2014, 2016 Jean-loup Gailly, Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -9,51 +9,85 @@
#include "zlib.h"
/* ===========================================================================
- Decompresses the source buffer into the destination buffer. sourceLen is
- the byte length of the source buffer. Upon entry, destLen is the total
- size of the destination buffer, which must be large enough to hold the
- entire uncompressed data. (The size of the uncompressed data must have
- been saved previously by the compressor and transmitted to the decompressor
- by some mechanism outside the scope of this compression library.)
- Upon exit, destLen is the actual size of the compressed buffer.
-
- uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
- enough memory, Z_BUF_ERROR if there was not enough room in the output
- buffer, or Z_DATA_ERROR if the input data was corrupted.
+ Decompresses the source buffer into the destination buffer. *sourceLen is
+ the byte length of the source buffer. Upon entry, *destLen is the total size
+ of the destination buffer, which must be large enough to hold the entire
+ uncompressed data. (The size of the uncompressed data must have been saved
+ previously by the compressor and transmitted to the decompressor by some
+ mechanism outside the scope of this compression library.) Upon exit,
+ *destLen is the size of the decompressed data and *sourceLen is the number
+ of source bytes consumed. Upon return, source + *sourceLen points to the
+ first unused input byte.
+
+ uncompress returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_BUF_ERROR if there was not enough room in the output buffer, or
+ Z_DATA_ERROR if the input data was corrupted, including if the input data is
+ an incomplete zlib stream.
*/
-int ZEXPORT uncompress (dest, destLen, source, sourceLen)
+int ZEXPORT uncompress2 (dest, destLen, source, sourceLen)
Bytef *dest;
uLongf *destLen;
const Bytef *source;
- uLong sourceLen;
+ uLong *sourceLen;
{
z_stream stream;
int err;
+ const uInt max = (uInt)-1;
+ uLong len, left;
+ Byte buf[1]; /* for detection of incomplete stream when *destLen == 0 */
- stream.next_in = (z_const Bytef *)source;
- stream.avail_in = (uInt)sourceLen;
- /* Check for source > 64K on 16-bit machine: */
- if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR;
-
- stream.next_out = dest;
- stream.avail_out = (uInt)*destLen;
- if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR;
+ len = *sourceLen;
+ if (*destLen) {
+ left = *destLen;
+ *destLen = 0;
+ }
+ else {
+ left = 1;
+ dest = buf;
+ }
+ stream.next_in = (z_const Bytef *)source;
+ stream.avail_in = 0;
stream.zalloc = (alloc_func)0;
stream.zfree = (free_func)0;
+ stream.opaque = (voidpf)0;
err = inflateInit(&stream);
if (err != Z_OK) return err;
- err = inflate(&stream, Z_FINISH);
- if (err != Z_STREAM_END) {
- inflateEnd(&stream);
- if (err == Z_NEED_DICT || (err == Z_BUF_ERROR && stream.avail_in == 0))
- return Z_DATA_ERROR;
- return err;
- }
- *destLen = stream.total_out;
+ stream.next_out = dest;
+ stream.avail_out = 0;
- err = inflateEnd(&stream);
- return err;
+ do {
+ if (stream.avail_out == 0) {
+ stream.avail_out = left > (uLong)max ? max : (uInt)left;
+ left -= stream.avail_out;
+ }
+ if (stream.avail_in == 0) {
+ stream.avail_in = len > (uLong)max ? max : (uInt)len;
+ len -= stream.avail_in;
+ }
+ err = inflate(&stream, Z_NO_FLUSH);
+ } while (err == Z_OK);
+
+ *sourceLen -= len + stream.avail_in;
+ if (dest != buf)
+ *destLen = stream.total_out;
+ else if (stream.total_out && err == Z_BUF_ERROR)
+ left = 1;
+
+ inflateEnd(&stream);
+ return err == Z_STREAM_END ? Z_OK :
+ err == Z_NEED_DICT ? Z_DATA_ERROR :
+ err == Z_BUF_ERROR && left + stream.avail_out ? Z_DATA_ERROR :
+ err;
+}
+
+int ZEXPORT uncompress (dest, destLen, source, sourceLen)
+ Bytef *dest;
+ uLongf *destLen;
+ const Bytef *source;
+ uLong sourceLen;
+{
+ return uncompress2(dest, destLen, source, &sourceLen);
}
diff --git a/contrib/zlib/win32/Makefile.gcc b/contrib/zlib/win32/Makefile.gcc
index 6d1ded622..305be50af 100644
--- a/contrib/zlib/win32/Makefile.gcc
+++ b/contrib/zlib/win32/Makefile.gcc
@@ -39,7 +39,7 @@ IMPLIB = libz.dll.a
SHARED_MODE=0
#LOC = -DASMV
-#LOC = -DDEBUG -g
+#LOC = -DZLIB_DEBUG -g
PREFIX =
CC = $(PREFIX)gcc
diff --git a/contrib/zlib/win32/Makefile.msc b/contrib/zlib/win32/Makefile.msc
index 67b773171..6831882de 100644
--- a/contrib/zlib/win32/Makefile.msc
+++ b/contrib/zlib/win32/Makefile.msc
@@ -1,5 +1,5 @@
# Makefile for zlib using Microsoft (Visual) C
-# zlib is copyright (C) 1995-2006 Jean-loup Gailly and Mark Adler
+# zlib is copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler
#
# Usage:
# nmake -f win32/Makefile.msc (standard build)
diff --git a/contrib/zlib/win32/README-WIN32.txt b/contrib/zlib/win32/README-WIN32.txt
index 3d77d521e..a1de359a3 100644
--- a/contrib/zlib/win32/README-WIN32.txt
+++ b/contrib/zlib/win32/README-WIN32.txt
@@ -1,6 +1,6 @@
ZLIB DATA COMPRESSION LIBRARY
-zlib 1.2.8 is a general purpose data compression library. All the code is
+zlib 1.2.11.1 is a general purpose data compression library. All the code is
thread safe. The data format used by the zlib library is described by RFCs
(Request for Comments) 1950 to 1952 in the files
http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format)
@@ -22,7 +22,7 @@ before asking for help.
Manifest:
-The package zlib-1.2.8-win32-x86.zip will contain the following files:
+The package zlib-1.2.11.1-win32-x86.zip will contain the following files:
README-WIN32.txt This document
ChangeLog Changes since previous zlib packages
@@ -72,7 +72,7 @@ are too numerous to cite here.
Copyright notice:
- (C) 1995-2012 Jean-loup Gailly and Mark Adler
+ (C) 1995-2017 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/contrib/zlib/win32/VisualC.txt b/contrib/zlib/win32/VisualC.txt
index 579a5fc9e..1005b2194 100644
--- a/contrib/zlib/win32/VisualC.txt
+++ b/contrib/zlib/win32/VisualC.txt
@@ -1,3 +1,3 @@
To build zlib using the Microsoft Visual C++ environment,
-use the appropriate project from the projects/ directory.
+use the appropriate project from the contrib/vstudio/ directory.
diff --git a/contrib/zlib/win32/zlib.def b/contrib/zlib/win32/zlib.def
index face65518..a2188b000 100644
--- a/contrib/zlib/win32/zlib.def
+++ b/contrib/zlib/win32/zlib.def
@@ -8,6 +8,7 @@ EXPORTS
inflateEnd
; advanced functions
deflateSetDictionary
+ deflateGetDictionary
deflateCopy
deflateReset
deflateParams
@@ -33,12 +34,15 @@ EXPORTS
compress2
compressBound
uncompress
+ uncompress2
gzopen
gzdopen
gzbuffer
gzsetparams
gzread
+ gzfread
gzwrite
+ gzfwrite
gzprintf
gzvprintf
gzputs
@@ -67,7 +71,9 @@ EXPORTS
crc32_combine64
; checksum functions
adler32
+ adler32_z
crc32
+ crc32_z
adler32_combine
crc32_combine
; various hacks, don't look :)
@@ -81,6 +87,8 @@ EXPORTS
inflateSyncPoint
get_crc_table
inflateUndermine
+ inflateValidate
+ inflateCodesUsed
inflateResetKeep
deflateResetKeep
gzopen_w
diff --git a/contrib/zlib/win32/zlib1.rc b/contrib/zlib/win32/zlib1.rc
index 5c0feed1b..234e641c3 100644
--- a/contrib/zlib/win32/zlib1.rc
+++ b/contrib/zlib/win32/zlib1.rc
@@ -26,7 +26,7 @@ BEGIN
VALUE "FileDescription", "zlib data compression library\0"
VALUE "FileVersion", ZLIB_VERSION "\0"
VALUE "InternalName", "zlib1.dll\0"
- VALUE "LegalCopyright", "(C) 1995-2013 Jean-loup Gailly & Mark Adler\0"
+ VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0"
VALUE "OriginalFilename", "zlib1.dll\0"
VALUE "ProductName", "zlib\0"
VALUE "ProductVersion", ZLIB_VERSION "\0"
diff --git a/contrib/zlib/zconf.h.cmakein b/contrib/zlib/zconf.h.cmakein
index 043019cda..a7f24cce6 100644
--- a/contrib/zlib/zconf.h.cmakein
+++ b/contrib/zlib/zconf.h.cmakein
@@ -1,5 +1,5 @@
/* zconf.h -- configuration of the zlib compression library
- * Copyright (C) 1995-2013 Jean-loup Gailly.
+ * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -19,7 +19,7 @@
#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
# define Z_PREFIX_SET
-/* all linked symbols */
+/* all linked symbols and init macros */
# define _dist_code z__dist_code
# define _length_code z__length_code
# define _tr_align z__tr_align
@@ -31,6 +31,7 @@
# define adler32 z_adler32
# define adler32_combine z_adler32_combine
# define adler32_combine64 z_adler32_combine64
+# define adler32_z z_adler32_z
# ifndef Z_SOLO
# define compress z_compress
# define compress2 z_compress2
@@ -39,10 +40,14 @@
# define crc32 z_crc32
# define crc32_combine z_crc32_combine
# define crc32_combine64 z_crc32_combine64
+# define crc32_z z_crc32_z
# define deflate z_deflate
# define deflateBound z_deflateBound
# define deflateCopy z_deflateCopy
# define deflateEnd z_deflateEnd
+# define deflateGetDictionary z_deflateGetDictionary
+# define deflateInit z_deflateInit
+# define deflateInit2 z_deflateInit2
# define deflateInit2_ z_deflateInit2_
# define deflateInit_ z_deflateInit_
# define deflateParams z_deflateParams
@@ -69,6 +74,8 @@
# define gzeof z_gzeof
# define gzerror z_gzerror
# define gzflush z_gzflush
+# define gzfread z_gzfread
+# define gzfwrite z_gzfwrite
# define gzgetc z_gzgetc
# define gzgetc_ z_gzgetc_
# define gzgets z_gzgets
@@ -80,7 +87,6 @@
# define gzopen_w z_gzopen_w
# endif
# define gzprintf z_gzprintf
-# define gzvprintf z_gzvprintf
# define gzputc z_gzputc
# define gzputs z_gzputs
# define gzread z_gzread
@@ -91,32 +97,39 @@
# define gztell z_gztell
# define gztell64 z_gztell64
# define gzungetc z_gzungetc
+# define gzvprintf z_gzvprintf
# define gzwrite z_gzwrite
# endif
# define inflate z_inflate
# define inflateBack z_inflateBack
# define inflateBackEnd z_inflateBackEnd
+# define inflateBackInit z_inflateBackInit
# define inflateBackInit_ z_inflateBackInit_
+# define inflateCodesUsed z_inflateCodesUsed
# define inflateCopy z_inflateCopy
# define inflateEnd z_inflateEnd
+# define inflateGetDictionary z_inflateGetDictionary
# define inflateGetHeader z_inflateGetHeader
+# define inflateInit z_inflateInit
+# define inflateInit2 z_inflateInit2
# define inflateInit2_ z_inflateInit2_
# define inflateInit_ z_inflateInit_
# define inflateMark z_inflateMark
# define inflatePrime z_inflatePrime
# define inflateReset z_inflateReset
# define inflateReset2 z_inflateReset2
+# define inflateResetKeep z_inflateResetKeep
# define inflateSetDictionary z_inflateSetDictionary
-# define inflateGetDictionary z_inflateGetDictionary
# define inflateSync z_inflateSync
# define inflateSyncPoint z_inflateSyncPoint
# define inflateUndermine z_inflateUndermine
-# define inflateResetKeep z_inflateResetKeep
+# define inflateValidate z_inflateValidate
# define inflate_copyright z_inflate_copyright
# define inflate_fast z_inflate_fast
# define inflate_table z_inflate_table
# ifndef Z_SOLO
# define uncompress z_uncompress
+# define uncompress2 z_uncompress2
# endif
# define zError z_zError
# ifndef Z_SOLO
@@ -226,9 +239,19 @@
# define z_const
#endif
-/* Some Mac compilers merge all .h files incorrectly: */
-#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
-# define NO_DUMMY_DECL
+#ifdef Z_SOLO
+ typedef unsigned long z_size_t;
+#else
+# define z_longlong long long
+# if defined(NO_SIZE_T)
+ typedef unsigned NO_SIZE_T z_size_t;
+# elif defined(STDC)
+# include <stddef.h>
+ typedef size_t z_size_t;
+# else
+ typedef unsigned long z_size_t;
+# endif
+# undef z_longlong
#endif
/* Maximum value for memLevel in deflateInit2 */
@@ -258,7 +281,7 @@
Of course this will generally degrade compression (there's no free lunch).
The memory requirements for inflate are (in bytes) 1 << windowBits
- that is, 32K for windowBits=15 (default value) plus a few kilobytes
+ that is, 32K for windowBits=15 (default value) plus about 7 kilobytes
for small objects.
*/
diff --git a/contrib/zlib/zconf.in.h b/contrib/zlib/zconf.h.in
index 03a9431c8..5e1d68a00 100644
--- a/contrib/zlib/zconf.in.h
+++ b/contrib/zlib/zconf.h.in
@@ -1,5 +1,5 @@
/* zconf.h -- configuration of the zlib compression library
- * Copyright (C) 1995-2005 Jean-loup Gailly.
+ * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -11,52 +11,158 @@
/*
* If you *really* need a unique prefix for all types and library functions,
* compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
+ * Even better than compiling with -DZ_PREFIX would be to use configure to set
+ * this permanently in zconf.h using "./configure --zprefix".
*/
-#ifdef Z_PREFIX
-# define deflateInit_ z_deflateInit_
+#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
+# define Z_PREFIX_SET
+
+/* all linked symbols and init macros */
+# define _dist_code z__dist_code
+# define _length_code z__length_code
+# define _tr_align z__tr_align
+# define _tr_flush_bits z__tr_flush_bits
+# define _tr_flush_block z__tr_flush_block
+# define _tr_init z__tr_init
+# define _tr_stored_block z__tr_stored_block
+# define _tr_tally z__tr_tally
+# define adler32 z_adler32
+# define adler32_combine z_adler32_combine
+# define adler32_combine64 z_adler32_combine64
+# define adler32_z z_adler32_z
+# ifndef Z_SOLO
+# define compress z_compress
+# define compress2 z_compress2
+# define compressBound z_compressBound
+# endif
+# define crc32 z_crc32
+# define crc32_combine z_crc32_combine
+# define crc32_combine64 z_crc32_combine64
+# define crc32_z z_crc32_z
# define deflate z_deflate
+# define deflateBound z_deflateBound
+# define deflateCopy z_deflateCopy
# define deflateEnd z_deflateEnd
-# define inflateInit_ z_inflateInit_
-# define inflate z_inflate
-# define inflateEnd z_inflateEnd
+# define deflateGetDictionary z_deflateGetDictionary
+# define deflateInit z_deflateInit
+# define deflateInit2 z_deflateInit2
# define deflateInit2_ z_deflateInit2_
-# define deflateSetDictionary z_deflateSetDictionary
-# define deflateCopy z_deflateCopy
-# define deflateReset z_deflateReset
+# define deflateInit_ z_deflateInit_
# define deflateParams z_deflateParams
-# define deflateBound z_deflateBound
+# define deflatePending z_deflatePending
# define deflatePrime z_deflatePrime
+# define deflateReset z_deflateReset
+# define deflateResetKeep z_deflateResetKeep
+# define deflateSetDictionary z_deflateSetDictionary
+# define deflateSetHeader z_deflateSetHeader
+# define deflateTune z_deflateTune
+# define deflate_copyright z_deflate_copyright
+# define get_crc_table z_get_crc_table
+# ifndef Z_SOLO
+# define gz_error z_gz_error
+# define gz_intmax z_gz_intmax
+# define gz_strwinerror z_gz_strwinerror
+# define gzbuffer z_gzbuffer
+# define gzclearerr z_gzclearerr
+# define gzclose z_gzclose
+# define gzclose_r z_gzclose_r
+# define gzclose_w z_gzclose_w
+# define gzdirect z_gzdirect
+# define gzdopen z_gzdopen
+# define gzeof z_gzeof
+# define gzerror z_gzerror
+# define gzflush z_gzflush
+# define gzfread z_gzfread
+# define gzfwrite z_gzfwrite
+# define gzgetc z_gzgetc
+# define gzgetc_ z_gzgetc_
+# define gzgets z_gzgets
+# define gzoffset z_gzoffset
+# define gzoffset64 z_gzoffset64
+# define gzopen z_gzopen
+# define gzopen64 z_gzopen64
+# ifdef _WIN32
+# define gzopen_w z_gzopen_w
+# endif
+# define gzprintf z_gzprintf
+# define gzputc z_gzputc
+# define gzputs z_gzputs
+# define gzread z_gzread
+# define gzrewind z_gzrewind
+# define gzseek z_gzseek
+# define gzseek64 z_gzseek64
+# define gzsetparams z_gzsetparams
+# define gztell z_gztell
+# define gztell64 z_gztell64
+# define gzungetc z_gzungetc
+# define gzvprintf z_gzvprintf
+# define gzwrite z_gzwrite
+# endif
+# define inflate z_inflate
+# define inflateBack z_inflateBack
+# define inflateBackEnd z_inflateBackEnd
+# define inflateBackInit z_inflateBackInit
+# define inflateBackInit_ z_inflateBackInit_
+# define inflateCodesUsed z_inflateCodesUsed
+# define inflateCopy z_inflateCopy
+# define inflateEnd z_inflateEnd
+# define inflateGetDictionary z_inflateGetDictionary
+# define inflateGetHeader z_inflateGetHeader
+# define inflateInit z_inflateInit
+# define inflateInit2 z_inflateInit2
# define inflateInit2_ z_inflateInit2_
+# define inflateInit_ z_inflateInit_
+# define inflateMark z_inflateMark
+# define inflatePrime z_inflatePrime
+# define inflateReset z_inflateReset
+# define inflateReset2 z_inflateReset2
+# define inflateResetKeep z_inflateResetKeep
# define inflateSetDictionary z_inflateSetDictionary
# define inflateSync z_inflateSync
# define inflateSyncPoint z_inflateSyncPoint
-# define inflateCopy z_inflateCopy
-# define inflateReset z_inflateReset
-# define inflateBack z_inflateBack
-# define inflateBackEnd z_inflateBackEnd
-# define compress z_compress
-# define compress2 z_compress2
-# define compressBound z_compressBound
-# define uncompress z_uncompress
-# define adler32 z_adler32
-# define crc32 z_crc32
-# define get_crc_table z_get_crc_table
+# define inflateUndermine z_inflateUndermine
+# define inflateValidate z_inflateValidate
+# define inflate_copyright z_inflate_copyright
+# define inflate_fast z_inflate_fast
+# define inflate_table z_inflate_table
+# ifndef Z_SOLO
+# define uncompress z_uncompress
+# define uncompress2 z_uncompress2
+# endif
# define zError z_zError
+# ifndef Z_SOLO
+# define zcalloc z_zcalloc
+# define zcfree z_zcfree
+# endif
+# define zlibCompileFlags z_zlibCompileFlags
+# define zlibVersion z_zlibVersion
+/* all zlib typedefs in zlib.h and zconf.h */
+# define Byte z_Byte
+# define Bytef z_Bytef
# define alloc_func z_alloc_func
+# define charf z_charf
# define free_func z_free_func
+# ifndef Z_SOLO
+# define gzFile z_gzFile
+# endif
+# define gz_header z_gz_header
+# define gz_headerp z_gz_headerp
# define in_func z_in_func
+# define intf z_intf
# define out_func z_out_func
-# define Byte z_Byte
# define uInt z_uInt
-# define uLong z_uLong
-# define Bytef z_Bytef
-# define charf z_charf
-# define intf z_intf
# define uIntf z_uIntf
+# define uLong z_uLong
# define uLongf z_uLongf
-# define voidpf z_voidpf
# define voidp z_voidp
+# define voidpc z_voidpc
+# define voidpf z_voidpf
+
+/* all zlib structs in zlib.h and zconf.h */
+# define gz_header_s z_gz_header_s
+# define internal_state z_internal_state
+
#endif
#if defined(__MSDOS__) && !defined(MSDOS)
@@ -125,9 +231,25 @@
# endif
#endif
-/* Some Mac compilers merge all .h files incorrectly: */
-#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
-# define NO_DUMMY_DECL
+#if defined(ZLIB_CONST) && !defined(z_const)
+# define z_const const
+#else
+# define z_const
+#endif
+
+#ifdef Z_SOLO
+ typedef unsigned long z_size_t;
+#else
+# define z_longlong long long
+# if defined(NO_SIZE_T)
+ typedef unsigned NO_SIZE_T z_size_t;
+# elif defined(STDC)
+# include <stddef.h>
+ typedef size_t z_size_t;
+# else
+ typedef unsigned long z_size_t;
+# endif
+# undef z_longlong
#endif
/* Maximum value for memLevel in deflateInit2 */
@@ -157,7 +279,7 @@
Of course this will generally degrade compression (there's no free lunch).
The memory requirements for inflate are (in bytes) 1 << windowBits
- that is, 32K for windowBits=15 (default value) plus a few kilobytes
+ that is, 32K for windowBits=15 (default value) plus about 7 kilobytes
for small objects.
*/
@@ -171,6 +293,14 @@
# endif
#endif
+#ifndef Z_ARG /* function prototypes for stdarg */
+# if defined(STDC) || defined(Z_HAVE_STDARG_H)
+# define Z_ARG(args) args
+# else
+# define Z_ARG(args) ()
+# endif
+#endif
+
/* The following definitions for FAR are needed only for MSDOS mixed
* model programming (small or medium model with some far allocations).
* This was tested only with MSC; for other MSDOS compilers you may have
@@ -284,49 +414,121 @@ typedef uLong FAR uLongf;
typedef Byte *voidp;
#endif
-#if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */
-# include <sys/types.h> /* for off_t */
-# include <unistd.h> /* for SEEK_* and off_t */
-# ifdef VMS
-# include <unixio.h> /* for off_t */
+#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
+# include <limits.h>
+# if (UINT_MAX == 0xffffffffUL)
+# define Z_U4 unsigned
+# elif (ULONG_MAX == 0xffffffffUL)
+# define Z_U4 unsigned long
+# elif (USHRT_MAX == 0xffffffffUL)
+# define Z_U4 unsigned short
+# endif
+#endif
+
+#ifdef Z_U4
+ typedef Z_U4 z_crc_t;
+#else
+ typedef unsigned long z_crc_t;
+#endif
+
+#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
+# define Z_HAVE_UNISTD_H
+#endif
+
+#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */
+# define Z_HAVE_STDARG_H
+#endif
+
+#ifdef STDC
+# ifndef Z_SOLO
+# include <sys/types.h> /* for off_t */
+# endif
+#endif
+
+#if defined(STDC) || defined(Z_HAVE_STDARG_H)
+# ifndef Z_SOLO
+# include <stdarg.h> /* for va_list */
# endif
-# define z_off_t off_t
#endif
-#ifndef SEEK_SET
+
+#ifdef _WIN32
+# ifndef Z_SOLO
+# include <stddef.h> /* for wchar_t */
+# endif
+#endif
+
+/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
+ * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
+ * though the former does not conform to the LFS document), but considering
+ * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
+ * equivalently requesting no 64-bit operations
+ */
+#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
+# undef _LARGEFILE64_SOURCE
+#endif
+
+#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H)
+# define Z_HAVE_UNISTD_H
+#endif
+#ifndef Z_SOLO
+# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
+# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
+# ifdef VMS
+# include <unixio.h> /* for off_t */
+# endif
+# ifndef z_off_t
+# define z_off_t off_t
+# endif
+# endif
+#endif
+
+#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
+# define Z_LFS64
+#endif
+
+#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
+# define Z_LARGE64
+#endif
+
+#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
+# define Z_WANT64
+#endif
+
+#if !defined(SEEK_SET) && !defined(Z_SOLO)
# define SEEK_SET 0 /* Seek from beginning of file. */
# define SEEK_CUR 1 /* Seek from current position. */
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
#endif
+
#ifndef z_off_t
# define z_off_t long
#endif
-#if defined(__OS400__)
-# define NO_vsnprintf
-#endif
-
-#if defined(__MVS__)
-# define NO_vsnprintf
-# ifdef FAR
-# undef FAR
+#if !defined(_WIN32) && defined(Z_LARGE64)
+# define z_off64_t off64_t
+#else
+# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
+# define z_off64_t __int64
+# else
+# define z_off64_t z_off_t
# endif
#endif
/* MVS linker does not support external names larger than 8 bytes */
#if defined(__MVS__)
-# pragma map(deflateInit_,"DEIN")
-# pragma map(deflateInit2_,"DEIN2")
-# pragma map(deflateEnd,"DEEND")
-# pragma map(deflateBound,"DEBND")
-# pragma map(inflateInit_,"ININ")
-# pragma map(inflateInit2_,"ININ2")
-# pragma map(inflateEnd,"INEND")
-# pragma map(inflateSync,"INSY")
-# pragma map(inflateSetDictionary,"INSEDI")
-# pragma map(compressBound,"CMBND")
-# pragma map(inflate_table,"INTABL")
-# pragma map(inflate_fast,"INFA")
-# pragma map(inflate_copyright,"INCOPY")
+ #pragma map(deflateInit_,"DEIN")
+ #pragma map(deflateInit2_,"DEIN2")
+ #pragma map(deflateEnd,"DEEND")
+ #pragma map(deflateBound,"DEBND")
+ #pragma map(inflateInit_,"ININ")
+ #pragma map(inflateInit2_,"ININ2")
+ #pragma map(inflateEnd,"INEND")
+ #pragma map(inflateSync,"INSY")
+ #pragma map(inflateSetDictionary,"INSEDI")
+ #pragma map(compressBound,"CMBND")
+ #pragma map(inflate_table,"INTABL")
+ #pragma map(inflate_fast,"INFA")
+ #pragma map(inflate_copyright,"INCOPY")
#endif
#endif /* ZCONF_H */
diff --git a/contrib/zlib/zconf.h.included b/contrib/zlib/zconf.h.included
index 9ccbb0a6f..352f552b8 100644
--- a/contrib/zlib/zconf.h.included
+++ b/contrib/zlib/zconf.h.included
@@ -1,5 +1,5 @@
/* zconf.h -- configuration of the zlib compression library
- * Copyright (C) 1995-2013 Jean-loup Gailly.
+ * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -19,7 +19,7 @@
#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
# define Z_PREFIX_SET
-/* all linked symbols */
+/* all linked symbols and init macros */
# define _dist_code z__dist_code
# define _length_code z__length_code
# define _tr_align z__tr_align
@@ -31,6 +31,7 @@
# define adler32 z_adler32
# define adler32_combine z_adler32_combine
# define adler32_combine64 z_adler32_combine64
+# define adler32_z z_adler32_z
# ifndef Z_SOLO
# define compress z_compress
# define compress2 z_compress2
@@ -39,10 +40,14 @@
# define crc32 z_crc32
# define crc32_combine z_crc32_combine
# define crc32_combine64 z_crc32_combine64
+# define crc32_z z_crc32_z
# define deflate z_deflate
# define deflateBound z_deflateBound
# define deflateCopy z_deflateCopy
# define deflateEnd z_deflateEnd
+# define deflateGetDictionary z_deflateGetDictionary
+# define deflateInit z_deflateInit
+# define deflateInit2 z_deflateInit2
# define deflateInit2_ z_deflateInit2_
# define deflateInit_ z_deflateInit_
# define deflateParams z_deflateParams
@@ -69,6 +74,8 @@
# define gzeof z_gzeof
# define gzerror z_gzerror
# define gzflush z_gzflush
+# define gzfread z_gzfread
+# define gzfwrite z_gzfwrite
# define gzgetc z_gzgetc
# define gzgetc_ z_gzgetc_
# define gzgets z_gzgets
@@ -80,7 +87,6 @@
# define gzopen_w z_gzopen_w
# endif
# define gzprintf z_gzprintf
-# define gzvprintf z_gzvprintf
# define gzputc z_gzputc
# define gzputs z_gzputs
# define gzread z_gzread
@@ -91,32 +97,39 @@
# define gztell z_gztell
# define gztell64 z_gztell64
# define gzungetc z_gzungetc
+# define gzvprintf z_gzvprintf
# define gzwrite z_gzwrite
# endif
# define inflate z_inflate
# define inflateBack z_inflateBack
# define inflateBackEnd z_inflateBackEnd
+# define inflateBackInit z_inflateBackInit
# define inflateBackInit_ z_inflateBackInit_
+# define inflateCodesUsed z_inflateCodesUsed
# define inflateCopy z_inflateCopy
# define inflateEnd z_inflateEnd
+# define inflateGetDictionary z_inflateGetDictionary
# define inflateGetHeader z_inflateGetHeader
+# define inflateInit z_inflateInit
+# define inflateInit2 z_inflateInit2
# define inflateInit2_ z_inflateInit2_
# define inflateInit_ z_inflateInit_
# define inflateMark z_inflateMark
# define inflatePrime z_inflatePrime
# define inflateReset z_inflateReset
# define inflateReset2 z_inflateReset2
+# define inflateResetKeep z_inflateResetKeep
# define inflateSetDictionary z_inflateSetDictionary
-# define inflateGetDictionary z_inflateGetDictionary
# define inflateSync z_inflateSync
# define inflateSyncPoint z_inflateSyncPoint
# define inflateUndermine z_inflateUndermine
-# define inflateResetKeep z_inflateResetKeep
+# define inflateValidate z_inflateValidate
# define inflate_copyright z_inflate_copyright
# define inflate_fast z_inflate_fast
# define inflate_table z_inflate_table
# ifndef Z_SOLO
# define uncompress z_uncompress
+# define uncompress2 z_uncompress2
# endif
# define zError z_zError
# ifndef Z_SOLO
@@ -226,9 +239,19 @@
# define z_const
#endif
-/* Some Mac compilers merge all .h files incorrectly: */
-#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
-# define NO_DUMMY_DECL
+#ifdef Z_SOLO
+ typedef unsigned long z_size_t;
+#else
+# define z_longlong long long
+# if defined(NO_SIZE_T)
+ typedef unsigned NO_SIZE_T z_size_t;
+# elif defined(STDC)
+# include <stddef.h>
+ typedef size_t z_size_t;
+# else
+ typedef unsigned long z_size_t;
+# endif
+# undef z_longlong
#endif
/* Maximum value for memLevel in deflateInit2 */
@@ -258,7 +281,7 @@
Of course this will generally degrade compression (there's no free lunch).
The memory requirements for inflate are (in bytes) 1 << windowBits
- that is, 32K for windowBits=15 (default value) plus a few kilobytes
+ that is, 32K for windowBits=15 (default value) plus about 7 kilobytes
for small objects.
*/
diff --git a/contrib/zlib/zlib.h b/contrib/zlib/zlib.h
index 3e0c7672a..dcb7b5063 100644
--- a/contrib/zlib/zlib.h
+++ b/contrib/zlib/zlib.h
@@ -1,7 +1,7 @@
/* zlib.h -- interface of the 'zlib' general purpose compression library
- version 1.2.8, April 28th, 2013
+ version 1.2.11.1, January xxth, 2017
- Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
+ Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -37,12 +37,12 @@
extern "C" {
#endif
-#define ZLIB_VERSION "1.2.8"
-#define ZLIB_VERNUM 0x1280
+#define ZLIB_VERSION "1.2.11.1-motley"
+#define ZLIB_VERNUM 0x12b1
#define ZLIB_VER_MAJOR 1
#define ZLIB_VER_MINOR 2
-#define ZLIB_VER_REVISION 8
-#define ZLIB_VER_SUBREVISION 0
+#define ZLIB_VER_REVISION 11
+#define ZLIB_VER_SUBREVISION 1
/*
The 'zlib' compression library provides in-memory compression and
@@ -65,7 +65,8 @@ extern "C" {
with "gz". The gzip format is different from the zlib format. gzip is a
gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.
- This library can optionally read and write gzip streams in memory as well.
+ This library can optionally read and write gzip and raw deflate streams in
+ memory as well.
The zlib format was designed to be compact and fast for use in memory
and on communications channels. The gzip format was designed for single-
@@ -74,9 +75,13 @@ extern "C" {
The library does not install any signal handler. The decoder checks
the consistency of the compressed data, so the library should never crash
- even in case of corrupted input.
+ even in the case of corrupted input.
*/
+#ifdef __ANDROID__
+typedef unsigned long zcrc_t;
+#endif
+
typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
typedef void (*free_func) OF((voidpf opaque, voidpf address));
@@ -87,7 +92,7 @@ typedef struct z_stream_s {
uInt avail_in; /* number of bytes available at next_in */
uLong total_in; /* total number of input bytes read so far */
- Bytef *next_out; /* next output byte should be put there */
+ Bytef *next_out; /* next output byte will go here */
uInt avail_out; /* remaining free space at next_out */
uLong total_out; /* total number of bytes output so far */
@@ -98,8 +103,9 @@ typedef struct z_stream_s {
free_func zfree; /* used to free the internal state */
voidpf opaque; /* private data object passed to zalloc and zfree */
- int data_type; /* best guess about the data type: binary or text */
- uLong adler; /* adler32 value of the uncompressed data */
+ int data_type; /* best guess about the data type: binary or text
+ for deflate, or the decoding state for inflate */
+ uLong adler; /* Adler-32 or CRC-32 value of the uncompressed data */
uLong reserved; /* reserved for future use */
} z_stream;
@@ -142,7 +148,9 @@ typedef gz_header FAR *gz_headerp;
zalloc must return Z_NULL if there is not enough memory for the object.
If zlib is used in a multi-threaded application, zalloc and zfree must be
- thread safe.
+ thread safe. In that case, zlib is thread-safe. When zalloc and zfree are
+ Z_NULL on entry to the initialization function, they are set to internal
+ routines that use the standard library functions malloc() and free().
On 16-bit systems, the functions zalloc and zfree must be able to allocate
exactly 65536 bytes, but will not be required to allocate more than this if
@@ -155,7 +163,7 @@ typedef gz_header FAR *gz_headerp;
The fields total_in and total_out can be used for statistics or progress
reports. After compression, total_in holds the total size of the
- uncompressed data and may be saved for use in the decompressor (particularly
+ uncompressed data and may be saved for use by the decompressor (particularly
if the decompressor wants to decompress everything in a single step).
*/
@@ -200,7 +208,7 @@ typedef gz_header FAR *gz_headerp;
#define Z_TEXT 1
#define Z_ASCII Z_TEXT /* for compatibility with 1.2.2 and earlier */
#define Z_UNKNOWN 2
-/* Possible values of the data_type field (though see inflate()) */
+/* Possible values of the data_type field for deflate() */
#define Z_DEFLATED 8
/* The deflate compression method (the only one supported in this version) */
@@ -258,11 +266,11 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
enough room in the output buffer), next_in and avail_in are updated and
processing will resume at this point for the next call of deflate().
- - Provide more output starting at next_out and update next_out and avail_out
+ - Generate more output starting at next_out and update next_out and avail_out
accordingly. This action is forced if the parameter flush is non zero.
Forcing flush frequently degrades the compression ratio, so this parameter
- should be set only when necessary (in interactive applications). Some
- output may be provided even if flush is not set.
+ should be set only when necessary. Some output may be provided even if
+ flush is zero.
Before the call of deflate(), the application should ensure that at least
one of the actions is possible, by providing more input and/or consuming more
@@ -271,7 +279,9 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
output when it wants, for example when the output buffer is full (avail_out
== 0), or after each call of deflate(). If deflate returns Z_OK and with
zero avail_out, it must be called again after making room in the output
- buffer because there might be more output pending.
+ buffer because there might be more output pending. See deflatePending(),
+ which can be used if desired to determine whether or not there is more ouput
+ in that case.
Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to
decide how much data to accumulate before producing output, in order to
@@ -292,8 +302,8 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
input data so far will be available to the decompressor, as for Z_SYNC_FLUSH.
This completes the current deflate block and follows it with an empty fixed
codes block that is 10 bits long. This assures that enough bytes are output
- in order for the decompressor to finish the block before the empty fixed code
- block.
+ in order for the decompressor to finish the block before the empty fixed
+ codes block.
If flush is set to Z_BLOCK, a deflate block is completed and emitted, as
for Z_SYNC_FLUSH, but the output is not aligned on a byte boundary, and up to
@@ -319,34 +329,38 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
If the parameter flush is set to Z_FINISH, pending input is processed,
pending output is flushed and deflate returns with Z_STREAM_END if there was
- enough output space; if deflate returns with Z_OK, this function must be
- called again with Z_FINISH and more output space (updated avail_out) but no
- more input data, until it returns with Z_STREAM_END or an error. After
- deflate has returned Z_STREAM_END, the only possible operations on the stream
- are deflateReset or deflateEnd.
-
- Z_FINISH can be used immediately after deflateInit if all the compression
- is to be done in a single step. In this case, avail_out must be at least the
- value returned by deflateBound (see below). Then deflate is guaranteed to
- return Z_STREAM_END. If not enough output space is provided, deflate will
- not return Z_STREAM_END, and it must be called again as described above.
-
- deflate() sets strm->adler to the adler32 checksum of all input read
- so far (that is, total_in bytes).
+ enough output space. If deflate returns with Z_OK or Z_BUF_ERROR, this
+ function must be called again with Z_FINISH and more output space (updated
+ avail_out) but no more input data, until it returns with Z_STREAM_END or an
+ error. After deflate has returned Z_STREAM_END, the only possible operations
+ on the stream are deflateReset or deflateEnd.
+
+ Z_FINISH can be used in the first deflate call after deflateInit if all the
+ compression is to be done in a single step. In order to complete in one
+ call, avail_out must be at least the value returned by deflateBound (see
+ below). Then deflate is guaranteed to return Z_STREAM_END. If not enough
+ output space is provided, deflate will not return Z_STREAM_END, and it must
+ be called again as described above.
+
+ deflate() sets strm->adler to the Adler-32 checksum of all input read
+ so far (that is, total_in bytes). If a gzip stream is being generated, then
+ strm->adler will be the CRC-32 checksum of the input read so far. (See
+ deflateInit2 below.)
deflate() may update strm->data_type if it can make a good guess about
- the input data type (Z_BINARY or Z_TEXT). In doubt, the data is considered
- binary. This field is only for information purposes and does not affect the
- compression algorithm in any manner.
+ the input data type (Z_BINARY or Z_TEXT). If in doubt, the data is
+ considered binary. This field is only for information purposes and does not
+ affect the compression algorithm in any manner.
deflate() returns Z_OK if some progress has been made (more input
processed or more output produced), Z_STREAM_END if all input has been
consumed and all output has been produced (only when flush is set to
Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example
- if next_in or next_out was Z_NULL), Z_BUF_ERROR if no progress is possible
- (for example avail_in or avail_out was zero). Note that Z_BUF_ERROR is not
- fatal, and deflate() can be called again with more input and more output
- space to continue compressing.
+ if next_in or next_out was Z_NULL or the state was inadvertently written over
+ by the application), or Z_BUF_ERROR if no progress is possible (for example
+ avail_in or avail_out was zero). Note that Z_BUF_ERROR is not fatal, and
+ deflate() can be called again with more input and more output space to
+ continue compressing.
*/
@@ -369,23 +383,21 @@ ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
Initializes the internal stream state for decompression. The fields
next_in, avail_in, zalloc, zfree and opaque must be initialized before by
- the caller. If next_in is not Z_NULL and avail_in is large enough (the
- exact value depends on the compression method), inflateInit determines the
- compression method from the zlib header and allocates all data structures
- accordingly; otherwise the allocation will be deferred to the first call of
- inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to
- use default allocation functions.
+ the caller. In the current version of inflate, the provided input is not
+ read or consumed. The allocation of a sliding window will be deferred to
+ the first call of inflate (if the decompression does not complete on the
+ first call). If zalloc and zfree are set to Z_NULL, inflateInit updates
+ them to use default allocation functions.
inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
version assumed by the caller, or Z_STREAM_ERROR if the parameters are
invalid, such as a null pointer to the structure. msg is set to null if
- there is no error message. inflateInit does not perform any decompression
- apart from possibly reading the zlib header if present: actual decompression
- will be done by inflate(). (So next_in and avail_in may be modified, but
- next_out and avail_out are unused and unchanged.) The current implementation
- of inflateInit() does not process any header information -- that is deferred
- until inflate() is called.
+ there is no error message. inflateInit does not perform any decompression.
+ Actual decompression will be done by inflate(). So next_in, and avail_in,
+ next_out, and avail_out are unused and unchanged. The current
+ implementation of inflateInit() does not process any header information --
+ that is deferred until inflate() is called.
*/
@@ -401,17 +413,20 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
- Decompress more input starting at next_in and update next_in and avail_in
accordingly. If not all input can be processed (because there is not
- enough room in the output buffer), next_in is updated and processing will
- resume at this point for the next call of inflate().
+ enough room in the output buffer), then next_in and avail_in are updated
+ accordingly, and processing will resume at this point for the next call of
+ inflate().
- - Provide more output starting at next_out and update next_out and avail_out
+ - Generate more output starting at next_out and update next_out and avail_out
accordingly. inflate() provides as much output as possible, until there is
no more input data or no more space in the output buffer (see below about
the flush parameter).
Before the call of inflate(), the application should ensure that at least
one of the actions is possible, by providing more input and/or consuming more
- output, and updating the next_* and avail_* values accordingly. The
+ output, and updating the next_* and avail_* values accordingly. If the
+ caller of inflate() does not provide both available input and available
+ output space, it is possible that there will be no progress made. The
application can consume the uncompressed output when it wants, for example
when the output buffer is full (avail_out == 0), or after each call of
inflate(). If inflate returns Z_OK and with zero avail_out, it must be
@@ -428,7 +443,7 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
gets to the end of that block, or when it runs out of data.
The Z_BLOCK option assists in appending to or combining deflate streams.
- Also to assist in this, on return inflate() will set strm->data_type to the
+ To assist in this, on return inflate() always sets strm->data_type to the
number of unused bits in the last byte taken from strm->next_in, plus 64 if
inflate() is currently decoding the last block in the deflate stream, plus
128 if inflate() returned immediately after decoding an end-of-block code or
@@ -454,7 +469,7 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
this case all pending input is processed and all pending output is flushed;
avail_out must be large enough to hold all of the uncompressed data for the
operation to complete. (The size of the uncompressed data may have been
- saved by the compressor for this purpose.) The use of Z_FINISH is not
+ saved by the compressor for this purpose.) The use of Z_FINISH is not
required to perform an inflation in one step. However it may be used to
inform inflate that a faster approach can be used for the single inflate()
call. Z_FINISH also informs inflate to not maintain a sliding window if the
@@ -476,32 +491,33 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
chosen by the compressor and returns Z_NEED_DICT; otherwise it sets
strm->adler to the Adler-32 checksum of all output produced so far (that is,
total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described
- below. At the end of the stream, inflate() checks that its computed adler32
+ below. At the end of the stream, inflate() checks that its computed Adler-32
checksum is equal to that saved by the compressor and returns Z_STREAM_END
only if the checksum is correct.
inflate() can decompress and check either zlib-wrapped or gzip-wrapped
deflate data. The header type is detected automatically, if requested when
initializing with inflateInit2(). Any information contained in the gzip
- header is not retained, so applications that need that information should
- instead use raw inflate, see inflateInit2() below, or inflateBack() and
- perform their own processing of the gzip header and trailer. When processing
+ header is not retained unless inflateGetHeader() is used. When processing
gzip-wrapped deflate data, strm->adler32 is set to the CRC-32 of the output
- producted so far. The CRC-32 is checked against the gzip trailer.
+ produced so far. The CRC-32 is checked against the gzip trailer, as is the
+ uncompressed length, modulo 2^32.
inflate() returns Z_OK if some progress has been made (more input processed
or more output produced), Z_STREAM_END if the end of the compressed data has
been reached and all uncompressed output has been produced, Z_NEED_DICT if a
preset dictionary is needed at this point, Z_DATA_ERROR if the input data was
corrupted (input stream not conforming to the zlib format or incorrect check
- value), Z_STREAM_ERROR if the stream structure was inconsistent (for example
- next_in or next_out was Z_NULL), Z_MEM_ERROR if there was not enough memory,
- Z_BUF_ERROR if no progress is possible or if there was not enough room in the
- output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and
+ value, in which case strm->msg points to a string with a more specific
+ error), Z_STREAM_ERROR if the stream structure was inconsistent (for example
+ next_in or next_out was Z_NULL, or the state was inadvertently written over
+ by the application), Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR
+ if no progress was possible or if there was not enough room in the output
+ buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and
inflate() can be called again with more input and more output space to
continue decompressing. If Z_DATA_ERROR is returned, the application may
then call inflateSync() to look for a good compression block if a partial
- recovery of the data is desired.
+ recovery of the data is to be attempted.
*/
@@ -511,9 +527,8 @@ ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
This function discards any unprocessed input and does not flush any pending
output.
- inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state
- was inconsistent. In the error case, msg may be set but then points to a
- static string (which must not be deallocated).
+ inflateEnd returns Z_OK if success, or Z_STREAM_ERROR if the stream state
+ was inconsistent.
*/
@@ -544,16 +559,29 @@ ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
compression at the expense of memory usage. The default value is 15 if
deflateInit is used instead.
+ For the current implementation of deflate(), a windowBits value of 8 (a
+ window size of 256 bytes) is not supported. As a result, a request for 8
+ will result in 9 (a 512-byte window). In that case, providing 8 to
+ inflateInit2() will result in an error when the zlib header with 9 is
+ checked against the initialization of inflate(). The remedy is to not use 8
+ with deflateInit2() with this initialization, or at least in that case use 9
+ with inflateInit2().
+
windowBits can also be -8..-15 for raw deflate. In this case, -windowBits
determines the window size. deflate() will then generate raw deflate data
- with no zlib header or trailer, and will not compute an adler32 check value.
+ with no zlib header or trailer, and will not compute a check value.
windowBits can also be greater than 15 for optional gzip encoding. Add
16 to windowBits to write a simple gzip header and trailer around the
compressed data instead of a zlib wrapper. The gzip header will have no
file name, no extra data, no comment, no modification time (set to zero), no
- header crc, and the operating system will be set to 255 (unknown). If a
- gzip stream is being written, strm->adler is a crc32 instead of an adler32.
+ header crc, and the operating system will be set to the appropriate value,
+ if the operating system was determined at compile time. If a gzip stream is
+ being written, strm->adler is a CRC-32 instead of an Adler-32.
+
+ For raw deflate or gzip encoding, a request for a 256-byte window is
+ rejected as invalid, since only the zlib header provides a means of
+ transmitting the window size to the decompressor.
The memLevel parameter specifies how much memory should be allocated
for the internal compression state. memLevel=1 uses minimum memory but is
@@ -614,12 +642,12 @@ ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
addition, the current implementation of deflate will use at most the window
size minus 262 bytes of the provided dictionary.
- Upon return of this function, strm->adler is set to the adler32 value
+ Upon return of this function, strm->adler is set to the Adler-32 value
of the dictionary; the decompressor may later use this value to determine
- which dictionary has been used by the compressor. (The adler32 value
+ which dictionary has been used by the compressor. (The Adler-32 value
applies to the whole dictionary even if only a subset of the dictionary is
actually used by the compressor.) If a raw deflate was requested, then the
- adler32 value is not computed and strm->adler is not set.
+ Adler-32 value is not computed and strm->adler is not set.
deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is
@@ -628,6 +656,28 @@ ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
not perform any compression: this will be done by deflate().
*/
+ZEXTERN int ZEXPORT deflateGetDictionary OF((z_streamp strm,
+ Bytef *dictionary,
+ uInt *dictLength));
+/*
+ Returns the sliding dictionary being maintained by deflate. dictLength is
+ set to the number of bytes in the dictionary, and that many bytes are copied
+ to dictionary. dictionary must have enough space, where 32768 bytes is
+ always enough. If deflateGetDictionary() is called with dictionary equal to
+ Z_NULL, then only the dictionary length is returned, and nothing is copied.
+ Similary, if dictLength is Z_NULL, then it is not set.
+
+ deflateGetDictionary() may return a length less than the window size, even
+ when more than the window size in input has been provided. It may return up
+ to 258 bytes less in that case, due to how zlib's implementation of deflate
+ manages the sliding window and lookahead for matches, where matches can be
+ up to 258 bytes long. If the application needs the last window-size bytes of
+ input, then that would need to be saved by the application outside of zlib.
+
+ deflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the
+ stream state is inconsistent.
+*/
+
ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
z_streamp source));
/*
@@ -648,10 +698,10 @@ ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
/*
- This function is equivalent to deflateEnd followed by deflateInit,
- but does not free and reallocate all the internal compression state. The
- stream will keep the same compression level and any other attributes that
- may have been set by deflateInit2.
+ This function is equivalent to deflateEnd followed by deflateInit, but
+ does not free and reallocate the internal compression state. The stream
+ will leave the compression level and any other attributes that may have been
+ set unchanged.
deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
stream state was inconsistent (such as zalloc or state being Z_NULL).
@@ -662,20 +712,37 @@ ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
int strategy));
/*
Dynamically update the compression level and compression strategy. The
- interpretation of level and strategy is as in deflateInit2. This can be
+ interpretation of level and strategy is as in deflateInit2(). This can be
used to switch between compression and straight copy of the input data, or
to switch to a different kind of input data requiring a different strategy.
- If the compression level is changed, the input available so far is
- compressed with the old level (and may be flushed); the new level will take
- effect only at the next call of deflate().
-
- Before the call of deflateParams, the stream state must be set as for
- a call of deflate(), since the currently available input may have to be
- compressed and flushed. In particular, strm->avail_out must be non-zero.
-
- deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source
- stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR if
- strm->avail_out was zero.
+ If the compression approach (which is a function of the level) or the
+ strategy is changed, and if there have been any deflate() calls since the
+ state was initialized or reset, then the input available so far is
+ compressed with the old level and strategy using deflate(strm, Z_BLOCK).
+ There are three approaches for the compression levels 0, 1..3, and 4..9
+ respectively. The new level and strategy will take effect at the next call
+ of deflate().
+
+ If a deflate(strm, Z_BLOCK) is performed by deflateParams(), and it does
+ not have enough output space to complete, then the parameter change will not
+ take effect. In this case, deflateParams() can be called again with the
+ same parameters and more output space to try again.
+
+ In order to assure a change in the parameters on the first try, the
+ deflate stream should be flushed using deflate() with Z_BLOCK or other flush
+ request until strm.avail_out is not zero, before calling deflateParams().
+ Then no more input data should be provided before the deflateParams() call.
+ If this is done, the old level and strategy will be applied to the data
+ compressed before deflateParams(), and the new level and strategy will be
+ applied to the the data compressed after deflateParams().
+
+ deflateParams returns Z_OK on success, Z_STREAM_ERROR if the source stream
+ state was inconsistent or if a parameter was invalid, or Z_BUF_ERROR if
+ there was not enough output space to complete the compression of the
+ available input data before a change in the strategy or approach. Note that
+ in the case of a Z_BUF_ERROR, the parameters are not changed. A return
+ value of Z_BUF_ERROR is not fatal, in which case deflateParams() can be
+ retried with more output space.
*/
ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm,
@@ -793,7 +860,7 @@ ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
is for use with other formats that use the deflate compressed data format
such as zip. Those formats provide their own check values. If a custom
format is developed using the raw deflate format for compressed data, it is
- recommended that a check value such as an adler32 or a crc32 be applied to
+ recommended that a check value such as an Adler-32 or a CRC-32 be applied to
the uncompressed data as is done in the zlib, gzip, and zip formats. For
most applications, the zlib format should be used as is. Note that comments
above on the use in deflateInit2() applies to the magnitude of windowBits.
@@ -802,7 +869,10 @@ ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
32 to windowBits to enable zlib and gzip decoding with automatic header
detection, or add 16 to decode only the gzip format (the zlib format will
return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is a
- crc32 instead of an adler32.
+ CRC-32 instead of an Adler-32. Unlike the gunzip utility and gzread() (see
+ below), inflate() will not automatically decode concatenated gzip streams.
+ inflate() will return Z_STREAM_END at the end of the gzip stream. The state
+ would need to be reset to continue decoding a subsequent gzip stream.
inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
@@ -823,7 +893,7 @@ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
Initializes the decompression dictionary from the given uncompressed byte
sequence. This function must be called immediately after a call of inflate,
if that call returned Z_NEED_DICT. The dictionary chosen by the compressor
- can be determined from the adler32 value returned by that call of inflate.
+ can be determined from the Adler-32 value returned by that call of inflate.
The compressor and decompressor must use exactly the same dictionary (see
deflateSetDictionary). For raw inflate, this function can be called at any
time to set the dictionary. If the provided dictionary is smaller than the
@@ -834,7 +904,7 @@ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is
inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the
- expected one (incorrect adler32 value). inflateSetDictionary does not
+ expected one (incorrect Adler-32 value). inflateSetDictionary does not
perform any decompression: this will be done by subsequent calls of
inflate().
*/
@@ -892,7 +962,7 @@ ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
/*
This function is equivalent to inflateEnd followed by inflateInit,
- but does not free and reallocate all the internal decompression state. The
+ but does not free and reallocate the internal decompression state. The
stream will keep attributes that may have been set by inflateInit2.
inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
@@ -904,7 +974,9 @@ ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm,
/*
This function is the same as inflateReset, but it also permits changing
the wrap and window size requests. The windowBits parameter is interpreted
- the same as it is for inflateInit2.
+ the same as it is for inflateInit2. If the window size is changed, then the
+ memory allocated for the window is freed, and the window will be reallocated
+ by inflate() if needed.
inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source
stream state was inconsistent (such as zalloc or state being Z_NULL), or if
@@ -956,7 +1028,7 @@ ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm));
location in the input stream can be determined from avail_in and data_type
as noted in the description for the Z_BLOCK flush parameter for inflate.
- inflateMark returns the value noted above or -1 << 16 if the provided
+ inflateMark returns the value noted above, or -65536 if the provided
source stream state was inconsistent.
*/
@@ -1048,9 +1120,9 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
This routine would normally be used in a utility that reads zip or gzip
files and writes out uncompressed files. The utility would decode the
header and process the trailer on its own, hence this routine expects only
- the raw deflate stream to decompress. This is different from the normal
- behavior of inflate(), which expects either a zlib or gzip header and
- trailer around the deflate stream.
+ the raw deflate stream to decompress. This is different from the default
+ behavior of inflate(), which expects a zlib header and trailer around the
+ deflate stream.
inflateBack() uses two subroutines supplied by the caller that are then
called by inflateBack() for input and output. inflateBack() calls those
@@ -1059,12 +1131,12 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
parameters and return types are defined above in the in_func and out_func
typedefs. inflateBack() will call in(in_desc, &buf) which should return the
number of bytes of provided input, and a pointer to that input in buf. If
- there is no input available, in() must return zero--buf is ignored in that
- case--and inflateBack() will return a buffer error. inflateBack() will call
- out(out_desc, buf, len) to write the uncompressed data buf[0..len-1]. out()
- should return zero on success, or non-zero on failure. If out() returns
- non-zero, inflateBack() will return with an error. Neither in() nor out()
- are permitted to change the contents of the window provided to
+ there is no input available, in() must return zero -- buf is ignored in that
+ case -- and inflateBack() will return a buffer error. inflateBack() will
+ call out(out_desc, buf, len) to write the uncompressed data buf[0..len-1].
+ out() should return zero on success, or non-zero on failure. If out()
+ returns non-zero, inflateBack() will return with an error. Neither in() nor
+ out() are permitted to change the contents of the window provided to
inflateBackInit(), which is also the buffer that out() uses to write from.
The length written by out() will be at most the window size. Any non-zero
amount of input may be provided by in().
@@ -1092,7 +1164,7 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
using strm->next_in which will be Z_NULL only if in() returned an error. If
strm->next_in is not Z_NULL, then the Z_BUF_ERROR was due to out() returning
non-zero. (in() will always be called before out(), so strm->next_in is
- assured to be defined if out() returns non-zero.) Note that inflateBack()
+ assured to be defined if out() returns non-zero.) Note that inflateBack()
cannot return Z_OK.
*/
@@ -1114,7 +1186,7 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
7.6: size of z_off_t
Compiler, assembler, and debug options:
- 8: DEBUG
+ 8: ZLIB_DEBUG
9: ASMV or ASMINF -- use ASM code
10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention
11: 0 (reserved)
@@ -1164,7 +1236,8 @@ ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen,
the byte length of the source buffer. Upon entry, destLen is the total size
of the destination buffer, which must be at least the value returned by
compressBound(sourceLen). Upon exit, destLen is the actual size of the
- compressed buffer.
+ compressed data. compress() is equivalent to compress2() with a level
+ parameter of Z_DEFAULT_COMPRESSION.
compress returns Z_OK if success, Z_MEM_ERROR if there was not
enough memory, Z_BUF_ERROR if there was not enough room in the output
@@ -1180,7 +1253,7 @@ ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen,
length of the source buffer. Upon entry, destLen is the total size of the
destination buffer, which must be at least the value returned by
compressBound(sourceLen). Upon exit, destLen is the actual size of the
- compressed buffer.
+ compressed data.
compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
memory, Z_BUF_ERROR if there was not enough room in the output buffer,
@@ -1203,7 +1276,7 @@ ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
uncompressed data. (The size of the uncompressed data must have been saved
previously by the compressor and transmitted to the decompressor by some
mechanism outside the scope of this compression library.) Upon exit, destLen
- is the actual size of the uncompressed buffer.
+ is the actual size of the uncompressed data.
uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
enough memory, Z_BUF_ERROR if there was not enough room in the output
@@ -1212,6 +1285,14 @@ ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
buffer with the uncompressed data up to that point.
*/
+ZEXTERN int ZEXPORT uncompress2 OF((Bytef *dest, uLongf *destLen,
+ const Bytef *source, uLong *sourceLen));
+/*
+ Same as uncompress, except that sourceLen is a pointer, where the
+ length of the source is *sourceLen. On return, *sourceLen is the number of
+ source bytes consumed.
+*/
+
/* gzip file access functions */
/*
@@ -1290,10 +1371,9 @@ ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size));
default buffer size is 8192 bytes. This function must be called after
gzopen() or gzdopen(), and before any other calls that read or write the
file. The buffer memory allocation is always deferred to the first read or
- write. Two buffers are allocated, either both of the specified size when
- writing, or one of the specified size and the other twice that size when
- reading. A larger buffer size of, for example, 64K or 128K bytes will
- noticeably increase the speed of decompression (reading).
+ write. Three times that size in buffer space is allocated. A larger buffer
+ size of, for example, 64K or 128K bytes will noticeably increase the speed
+ of decompression (reading).
The new buffer size also affects the maximum length for gzprintf().
@@ -1304,10 +1384,12 @@ ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size));
ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
/*
Dynamically update the compression level or strategy. See the description
- of deflateInit2 for the meaning of these parameters.
+ of deflateInit2 for the meaning of these parameters. Previously provided
+ data is flushed before the parameter change.
- gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not
- opened for writing.
+ gzsetparams returns Z_OK if success, Z_STREAM_ERROR if the file was not
+ opened for writing, Z_ERRNO if there is an error writing the flushed data,
+ or Z_MEM_ERROR if there is a memory allocation error.
*/
ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
@@ -1335,7 +1417,35 @@ ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
case.
gzread returns the number of uncompressed bytes actually read, less than
- len for end of file, or -1 for error.
+ len for end of file, or -1 for error. If len is too large to fit in an int,
+ then nothing is read, -1 is returned, and the error state is set to
+ Z_STREAM_ERROR.
+*/
+
+ZEXTERN z_size_t ZEXPORT gzfread OF((voidp buf, z_size_t size, z_size_t nitems,
+ gzFile file));
+/*
+ Read up to nitems items of size size from file to buf, otherwise operating
+ as gzread() does. This duplicates the interface of stdio's fread(), with
+ size_t request and return types. If the library defines size_t, then
+ z_size_t is identical to size_t. If not, then z_size_t is an unsigned
+ integer type that can contain a pointer.
+
+ gzfread() returns the number of full items read of size size, or zero if
+ the end of the file was reached and a full item could not be read, or if
+ there was an error. gzerror() must be consulted if zero is returned in
+ order to determine if there was an error. If the multiplication of size and
+ nitems overflows, i.e. the product does not fit in a z_size_t, then nothing
+ is read, zero is returned, and the error state is set to Z_STREAM_ERROR.
+
+ In the event that the end of file is reached and only a partial item is
+ available at the end, i.e. the remaining uncompressed data length is not a
+ multiple of size, then the final partial item is nevetheless read into buf
+ and the end-of-file flag is set. The length of the partial item read is not
+ provided, but could be inferred from the result of gztell(). This behavior
+ is the same as the behavior of fread() implementations in common libraries,
+ but it prevents the direct use of gzfread() to read a concurrently written
+ file, reseting and retrying on end-of-file, when size is not 1.
*/
ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
@@ -1346,19 +1456,33 @@ ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
error.
*/
+ZEXTERN z_size_t ZEXPORT gzfwrite OF((voidpc buf, z_size_t size,
+ z_size_t nitems, gzFile file));
+/*
+ gzfwrite() writes nitems items of size size from buf to file, duplicating
+ the interface of stdio's fwrite(), with size_t request and return types. If
+ the library defines size_t, then z_size_t is identical to size_t. If not,
+ then z_size_t is an unsigned integer type that can contain a pointer.
+
+ gzfwrite() returns the number of full items written of size size, or zero
+ if there was an error. If the multiplication of size and nitems overflows,
+ i.e. the product does not fit in a z_size_t, then nothing is written, zero
+ is returned, and the error state is set to Z_STREAM_ERROR.
+*/
+
ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...));
/*
Converts, formats, and writes the arguments to the compressed file under
control of the format string, as in fprintf. gzprintf returns the number of
- uncompressed bytes actually written, or 0 in case of error. The number of
- uncompressed bytes written is limited to 8191, or one less than the buffer
- size given to gzbuffer(). The caller should assure that this limit is not
- exceeded. If it is exceeded, then gzprintf() will return an error (0) with
- nothing written. In this case, there may also be a buffer overflow with
- unpredictable consequences, which is possible only if zlib was compiled with
- the insecure functions sprintf() or vsprintf() because the secure snprintf()
- or vsnprintf() functions were not available. This can be determined using
- zlibCompileFlags().
+ uncompressed bytes actually written, or a negative zlib error code in case
+ of error. The number of uncompressed bytes written is limited to 8191, or
+ one less than the buffer size given to gzbuffer(). The caller should assure
+ that this limit is not exceeded. If it is exceeded, then gzprintf() will
+ return an error (0) with nothing written. In this case, there may also be a
+ buffer overflow with unpredictable consequences, which is possible only if
+ zlib was compiled with the insecure functions sprintf() or vsprintf()
+ because the secure snprintf() or vsnprintf() functions were not available.
+ This can be determined using zlibCompileFlags().
*/
ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
@@ -1418,7 +1542,7 @@ ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));
If the flush parameter is Z_FINISH, the remaining data is written and the
gzip stream is completed in the output. If gzwrite() is called again, a new
gzip stream will be started in the output. gzread() is able to read such
- concatented gzip streams.
+ concatenated gzip streams.
gzflush should be called only when strictly necessary because it will
degrade compression if called too often.
@@ -1572,7 +1696,7 @@ ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
return the updated checksum. If buf is Z_NULL, this function returns the
required initial value for the checksum.
- An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
+ An Adler-32 checksum is almost as reliable as a CRC-32 but can be computed
much faster.
Usage example:
@@ -1585,6 +1709,12 @@ ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
if (adler != original_adler) error();
*/
+ZEXTERN uLong ZEXPORT adler32_z OF((uLong adler, const Bytef *buf,
+ z_size_t len));
+/*
+ Same as adler32(), but with a size_t length.
+*/
+
/*
ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2,
z_off_t len2));
@@ -1614,6 +1744,12 @@ ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
if (crc != original_crc) error();
*/
+ZEXTERN uLong ZEXPORT crc32_z OF((uLong adler, const Bytef *buf,
+ z_size_t len));
+/*
+ Same as crc32(), but with a size_t length.
+*/
+
/*
ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2));
@@ -1644,19 +1780,35 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
unsigned char FAR *window,
const char *version,
int stream_size));
-#define deflateInit(strm, level) \
- deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream))
-#define inflateInit(strm) \
- inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream))
-#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
- deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
- (strategy), ZLIB_VERSION, (int)sizeof(z_stream))
-#define inflateInit2(strm, windowBits) \
- inflateInit2_((strm), (windowBits), ZLIB_VERSION, \
- (int)sizeof(z_stream))
-#define inflateBackInit(strm, windowBits, window) \
- inflateBackInit_((strm), (windowBits), (window), \
- ZLIB_VERSION, (int)sizeof(z_stream))
+#ifdef Z_PREFIX_SET
+# define z_deflateInit(strm, level) \
+ deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream))
+# define z_inflateInit(strm) \
+ inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream))
+# define z_deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
+ deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
+ (strategy), ZLIB_VERSION, (int)sizeof(z_stream))
+# define z_inflateInit2(strm, windowBits) \
+ inflateInit2_((strm), (windowBits), ZLIB_VERSION, \
+ (int)sizeof(z_stream))
+# define z_inflateBackInit(strm, windowBits, window) \
+ inflateBackInit_((strm), (windowBits), (window), \
+ ZLIB_VERSION, (int)sizeof(z_stream))
+#else
+# define deflateInit(strm, level) \
+ deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream))
+# define inflateInit(strm) \
+ inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream))
+# define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
+ deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
+ (strategy), ZLIB_VERSION, (int)sizeof(z_stream))
+# define inflateInit2(strm, windowBits) \
+ inflateInit2_((strm), (windowBits), ZLIB_VERSION, \
+ (int)sizeof(z_stream))
+# define inflateBackInit(strm, windowBits, window) \
+ inflateBackInit_((strm), (windowBits), (window), \
+ ZLIB_VERSION, (int)sizeof(z_stream))
+#endif
#ifndef Z_SOLO
@@ -1676,10 +1828,10 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */
#ifdef Z_PREFIX_SET
# undef z_gzgetc
# define z_gzgetc(g) \
- ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g))
+ ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g))
#else
# define gzgetc(g) \
- ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g))
+ ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g))
#endif
/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or
@@ -1737,16 +1889,13 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */
#endif /* !Z_SOLO */
-/* hack for buggy compilers */
-#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)
- struct internal_state {int dummy;};
-#endif
-
/* undocumented functions */
ZEXTERN const char * ZEXPORT zError OF((int));
ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp));
ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table OF((void));
ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int));
+ZEXTERN int ZEXPORT inflateValidate OF((z_streamp, int));
+ZEXTERN unsigned long ZEXPORT inflateCodesUsed OF ((z_streamp));
ZEXTERN int ZEXPORT inflateResetKeep OF((z_streamp));
ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp));
#if defined(_WIN32) && !defined(Z_SOLO)
diff --git a/contrib/zlib/zutil.c b/contrib/zlib/zutil.c
index 23d2ebef0..dcab28a0d 100644
--- a/contrib/zlib/zutil.c
+++ b/contrib/zlib/zutil.c
@@ -1,5 +1,5 @@
/* zutil.c -- target dependent utility functions for the compression library
- * Copyright (C) 1995-2005, 2010, 2011, 2012 Jean-loup Gailly.
+ * Copyright (C) 1995-2017 Jean-loup Gailly
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -10,21 +10,18 @@
# include "gzguts.h"
#endif
-#ifndef NO_DUMMY_DECL
-struct internal_state {int dummy;}; /* for buggy compilers */
-#endif
-
z_const char * const z_errmsg[10] = {
-"need dictionary", /* Z_NEED_DICT 2 */
-"stream end", /* Z_STREAM_END 1 */
-"", /* Z_OK 0 */
-"file error", /* Z_ERRNO (-1) */
-"stream error", /* Z_STREAM_ERROR (-2) */
-"data error", /* Z_DATA_ERROR (-3) */
-"insufficient memory", /* Z_MEM_ERROR (-4) */
-"buffer error", /* Z_BUF_ERROR (-5) */
-"incompatible version",/* Z_VERSION_ERROR (-6) */
-""};
+ (z_const char *)"need dictionary", /* Z_NEED_DICT 2 */
+ (z_const char *)"stream end", /* Z_STREAM_END 1 */
+ (z_const char *)"", /* Z_OK 0 */
+ (z_const char *)"file error", /* Z_ERRNO (-1) */
+ (z_const char *)"stream error", /* Z_STREAM_ERROR (-2) */
+ (z_const char *)"data error", /* Z_DATA_ERROR (-3) */
+ (z_const char *)"insufficient memory", /* Z_MEM_ERROR (-4) */
+ (z_const char *)"buffer error", /* Z_BUF_ERROR (-5) */
+ (z_const char *)"incompatible version",/* Z_VERSION_ERROR (-6) */
+ (z_const char *)""
+};
const char * ZEXPORT zlibVersion()
@@ -61,7 +58,7 @@ uLong ZEXPORT zlibCompileFlags()
case 8: flags += 2 << 6; break;
default: flags += 3 << 6;
}
-#ifdef DEBUG
+#ifdef ZLIB_DEBUG
flags += 1 << 8;
#endif
#if defined(ASMV) || defined(ASMINF)
@@ -115,8 +112,8 @@ uLong ZEXPORT zlibCompileFlags()
return flags;
}
-#ifdef DEBUG
-
+#ifdef ZLIB_DEBUG
+#include <stdlib.h>
# ifndef verbose
# define verbose 0
# endif
@@ -139,8 +136,8 @@ const char * ZEXPORT zError(err)
return ERR_MSG(err);
}
-#if defined(_WIN32_WCE)
- /* The Microsoft C Run-Time Library for Windows CE doesn't have
+#if defined(_WIN32_WCE) && _WIN32_WCE < 0x800
+ /* The older Microsoft C Run-Time Library for Windows CE doesn't have
* errno. We define it as a global variable to simplify porting.
* Its value is always 0 and should not be used.
*/
@@ -219,9 +216,11 @@ local ptr_table table[MAX_PTR];
voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, unsigned items, unsigned size)
{
- voidpf buf = opaque; /* just to make some compilers happy */
+ voidpf buf;
ulg bsize = (ulg)items*size;
+ (void)opaque;
+
/* If we allocate less than 65520 bytes, we assume that farmalloc
* will return a usable pointer which doesn't have to be normalized.
*/
@@ -244,6 +243,9 @@ voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, unsigned items, unsigned size)
void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr)
{
int n;
+
+ (void)opaque;
+
if (*(ush*)&ptr != 0) { /* object < 64K */
farfree(ptr);
return;
@@ -259,7 +261,6 @@ void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr)
next_ptr--;
return;
}
- ptr = opaque; /* just to make some compilers happy */
Assert(0, "zcfree: ptr not found");
}
@@ -278,13 +279,13 @@ void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr)
voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, uInt items, uInt size)
{
- if (opaque) opaque = 0; /* to make compiler happy */
+ (void)opaque;
return _halloc((long)items, size);
}
void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr)
{
- if (opaque) opaque = 0; /* to make compiler happy */
+ (void)opaque;
_hfree(ptr);
}
@@ -306,7 +307,7 @@ voidpf ZLIB_INTERNAL zcalloc (opaque, items, size)
unsigned items;
unsigned size;
{
- if (opaque) items += size - size; /* make compiler happy */
+ (void)opaque;
return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) :
(voidpf)calloc(items, size);
}
@@ -315,8 +316,8 @@ void ZLIB_INTERNAL zcfree (opaque, ptr)
voidpf opaque;
voidpf ptr;
{
+ (void)opaque;
free(ptr);
- if (opaque) return; /* make compiler happy */
}
#endif /* MY_ZCALLOC */
diff --git a/contrib/zlib/zutil.h b/contrib/zlib/zutil.h
index 24ab06b1c..60a0bca79 100644
--- a/contrib/zlib/zutil.h
+++ b/contrib/zlib/zutil.h
@@ -1,5 +1,5 @@
/* zutil.h -- internal interface and configuration of the compression library
- * Copyright (C) 1995-2013 Jean-loup Gailly.
+ * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -29,14 +29,12 @@
# include <stdlib.h>
#endif
-#ifdef Z_SOLO
- typedef long ptrdiff_t; /* guess -- will be caught if guess is wrong */
-#endif
-
#ifndef local
# define local static
#endif
-/* compile with -Dlocal if your debugger can't find static symbols */
+/* since "static" is used to mean two completely different things in C, we
+ define "local" for the non-static meaning of "static", for readability
+ (compile with -Dlocal if your debugger can't find static symbols) */
typedef unsigned char uch;
typedef uch FAR uchf;
@@ -98,28 +96,38 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
#endif
#ifdef AMIGA
-# define OS_CODE 0x01
+# define OS_CODE 1
#endif
#if defined(VAXC) || defined(VMS)
-# define OS_CODE 0x02
+# define OS_CODE 2
# define F_OPEN(name, mode) \
fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512")
#endif
+#ifdef __370__
+# if __TARGET_LIB__ < 0x20000000
+# define OS_CODE 4
+# elif __TARGET_LIB__ < 0x40000000
+# define OS_CODE 11
+# else
+# define OS_CODE 8
+# endif
+#endif
+
#if defined(ATARI) || defined(atarist)
-# define OS_CODE 0x05
+# define OS_CODE 5
#endif
#ifdef OS2
-# define OS_CODE 0x06
+# define OS_CODE 6
# if defined(M_I86) && !defined(Z_SOLO)
# include <malloc.h>
# endif
#endif
#if defined(MACOS) || defined(TARGET_OS_MAC)
-# define OS_CODE 0x07
+# define OS_CODE 7
# ifndef Z_SOLO
# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
# include <unix.h> /* for fdopen */
@@ -131,18 +139,24 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
# endif
#endif
-#ifdef TOPS20
-# define OS_CODE 0x0a
+#ifdef __acorn
+# define OS_CODE 13
#endif
-#ifdef WIN32
-# ifndef __CYGWIN__ /* Cygwin is Unix, not Win32 */
-# define OS_CODE 0x0b
-# endif
+#if defined(WIN32) && !defined(__CYGWIN__)
+# define OS_CODE 10
+#endif
+
+#ifdef _BEOS_
+# define OS_CODE 16
#endif
-#ifdef __50SERIES /* Prime/PRIMOS */
-# define OS_CODE 0x0f
+#ifdef __TOS_OS400__
+# define OS_CODE 18
+#endif
+
+#ifdef __APPLE__
+# define OS_CODE 19
#endif
#if defined(_BEOS_) || defined(RISCOS)
@@ -152,10 +166,6 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
#if (defined(_MSC_VER) && (_MSC_VER > 600)) && !defined __INTERIX
# if defined(_WIN32_WCE)
# define fdopen(fd,mode) NULL /* No fdopen() */
-# ifndef _PTRDIFF_T_DEFINED
- typedef int ptrdiff_t;
-# define _PTRDIFF_T_DEFINED
-# endif
# else
# define fdopen(fd,type) _fdopen(fd,type)
# endif
@@ -177,7 +187,7 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
/* common defaults */
#ifndef OS_CODE
-# define OS_CODE 0x03 /* assume Unix */
+# define OS_CODE 3 /* assume Unix */
#endif
#ifndef F_OPEN
@@ -216,7 +226,7 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
#endif
/* Diagnostic functions */
-#ifdef DEBUG
+#ifdef ZLIB_DEBUG
# include <stdio.h>
extern int ZLIB_INTERNAL z_verbose;
extern void ZLIB_INTERNAL z_error OF((char *m));
diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in
index ebb6b72b8..ffe39f9f7 100644
--- a/doc/Doxyfile.in
+++ b/doc/Doxyfile.in
@@ -32,7 +32,7 @@ PROJECT_NAME = Assimp
# This could be handy for archiving the generated documentation or
# if some version control system is used.
-PROJECT_NUMBER = "v3.1.1 (June 2014)"
+PROJECT_NUMBER = "v4.1. (December 2018)"
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer
@@ -725,7 +725,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE = irrXML.h
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded
@@ -1742,7 +1742,7 @@ UML_LOOK = NO
# the class node. If there are many fields or methods and many nodes the
# graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS
# threshold limits the number of items for each type to make the size more
-# managable. Set this to 0 for no limit. Note that the threshold may be
+# manageable. Set this to 0 for no limit. Note that the threshold may be
# exceeded by 50% before the limit is enforced.
UML_LIMIT_NUM_FIELDS = 10
diff --git a/doc/dox.h b/doc/dox.h
index 46ca23251..d63c8a806 100644
--- a/doc/dox.h
+++ b/doc/dox.h
@@ -60,9 +60,9 @@ that it has not been implemented yet and some (most ...) formats lack proper spe
<b>Stanford Ply</b> ( <i>*.ply</i> )<br>
<b>TrueSpace</b> ( <i>*.cob, *.scn</i> )<sup>2</sup><br><br>
</tt>
-See the @link importer_notes Importer Notes Page @endlink for informations, what a specific importer can do and what not.
+See the @link importer_notes Importer Notes Page @endlink for information, what a specific importer can do and what not.
Note that although this paper claims to be the official documentation,
-http://assimp.sourceforge.net/main_features_formats.html
+https://github.com/assimp/assimp/blob/master/Readme.md
<br>is usually the most up-to-date list of file formats supported by the library. <br>
<sup>1</sup>: Experimental loaders<br>
@@ -81,7 +81,7 @@ formats handle the required endian conversion correctly, so large parts of the l
The assimp linker library and viewer application are provided under the BSD 3-clause license. This basically means
that you are free to use it in open- or closed-source projects, for commercial or non-commercial purposes as you like
-as long as you retain the license informations and take own responsibility for what you do with it. For details see
+as long as you retain the license information and take own responsibility for what you do with it. For details see
the LICENSE file.
You can find test models for almost all formats in the <assimp_root>/test/models directory. Beware, they're *free*,
@@ -90,9 +90,16 @@ but not all of them are *open-source*. If there's an accompagning '<file>\source
@section main_install Installation
assimp can be used in two ways: linking against the pre-built libraries or building the library on your own. The former
-option is the easiest, but the assimp distribution contains pre-built libraries only for Visual C++ 2005 and 2008. For other
-compilers you'll have to build assimp for yourself. Which is hopefully as hassle-free as the other way, but needs a bit
-more work. Both ways are described at the @link install Installation page. @endlink
+option is the easiest, but the assimp distribution contains pre-built libraries only for Visual C++ 2013, 2015 and 2017.
+For other compilers you'll have to build assimp for yourself. Which is hopefully as hassle-free as the other way, but
+needs a bit more work. Both ways are described at the @link install Installation page. @endlink
+If you want to use assimp on Ubuntu you can install it via the following command:
+
+@code
+sudo apt-get install assimp
+@endcode
+
+If you want to use the python-assimp-port just follow these instructions: https://github.com/assimp/assimp/tree/master/port/PyAssimp
@section main_usage Usage
@@ -115,7 +122,6 @@ assimp is considerably easy, as the whole postprocessing infrastructure is avail
See the @link extend Extending the library @endlink page for more information.
-
@section main_support Support & Feedback
If you have any questions/comments/suggestions/bug reports you're welcome to post them in our
@@ -133,129 +139,49 @@ assimp-discussions</a>.
@section install_prebuilt Using the pre-built libraries with Visual C++ 8/9
-If you develop at Visual Studio 2005 or 2008, you can simply use the pre-built linker libraries provided in the distribution.
+If you develop at Visual Studio 2015 or 2017, you can simply use the pre-built linker libraries provided in the distribution.
Extract all files to a place of your choice. A directory called "assimp" will be created there. Add the assimp/include path
to your include paths (Menu-&gt;Extras-&gt;Options-&gt;Projects and Solutions-&gt;VC++ Directories-&gt;Include files)
and the assimp/lib/&lt;Compiler&gt; path to your linker paths (Menu-&gt;Extras-&gt;Options-&gt;Projects and Solutions-&gt;VC++ Directories-&gt;Library files).
This is necessary only once to setup all paths inside you IDE.
-To use the library in your C++ project you have to include either &lt;assimp/Importer.hpp&gt; or &lt;assimp/cimport.h&gt; plus some others starting with &lt;types.h&gt;.
-If you set up your IDE correctly the compiler should be able to find the files. Then you have to add the linker library to your
-project dependencies. Link to <assimp_root>/lib/<config-name>/assimp.lib. config-name is one of the predefined
-project configs. For static linking, use release/debug. See the sections below on this page for more information on the
-other build configs.
-If done correctly you should now be able to compile, link,
-run and use the application. If the linker complains about some integral functions being defined twice you probably have
-mixed the runtimes. Recheck the project configuration (project properties -&gt; C++ -&gt; Code generation -&gt; Runtime) if you use
-static runtimes (Multithreaded / Multithreaded Debug) or dynamic runtimes (Multithreaded DLL / Multithreaded Debug DLL).
-Choose the assimp linker lib accordingly.
-<br><br>
-Please don't forget to also read the @ref assimp_stl section on MSVC and the STL.
-
-@section assimp_stl Microsoft Compilers and the C++ Standard Library
-
-In VC8 and VC9 Microsoft introduced some Standard Library debugging features. A good example are improved iterator checks and
-various useful debug checks. The problem is the performance penalty that incurs with those extra checks.
-
-Most of these security enhancements are active in release builds by default, rendering assimp several times
-slower. However, it is possible to disable them by setting
+To use the library in your C++ project you can simply generate a project file via cmake. One way is to add the assimp-folder
+as a subdirectory via the cmake-command
@code
-_HAS_ITERATOR_DEBUGGING=0
-_SECURE_SCL=0
+addsubdiectory(assimp)
@endcode
-in the preprocessor options (or alternatively in the source code, just before the STL is included for the first time).
-<b>assimp's vc8 and vc9 configs enable these flags by default</b>.
+Now just add the assimp-dependency to your application:
-<i>If you're linking statically against assimp:</i> Make sure your applications uses the same STl settings!
-If you do not, there are two binary incompatible STL versions mangled together and you'll crash.
-Alternatively you can disable the fast STL settings for assimp by removing the 'FastSTL' property sheet from
-the vc project file.
+@code
+TARGET_LINK_LIBRARIES(my_game assimp)
+@endcode
-<i>If you're using assimp in a DLL/SO:</i> It's ok. There's no STL used in the binary DLL/SO interface, so it doesn't care whether
-your application uses the same STL settings or not.
-<br><br>
-Another option is to build against a different STL implementation, for example STlport. There's a special
-@ref assimp_stlport section that has a description how to achieve this.
+If done correctly you should now be able to compile, link, run and use the application.
@section install_own Building the library from scratch
-To build the library on your own you first have to get hold of the dependencies. Fortunately, special attention was paid to
-keep the list of dependencies short. Unfortunately, the only dependency is <a href="http://www.boost.org">boost</a> which
-can be a bit painful to set up for certain development environments. Boost is a widely used collection of classes and
-functions for various purposes. Chances are that it was already installed along with your compiler. If not, you have to install
-it for yourself. Read the "Getting Started" section of the Boost documentation for how to setup boost. VisualStudio users
-can use a comfortable installer from <a href="http://www.boost-consulting.com/products/free">
-http://www.boost-consulting.com/products/free</a>. Choose the appropriate version of boost for your runtime of choice.
-
-<b>If you don't want to use boost</b>, you can build against our <i>"Boost-Workaround"</i>. It consists of very small
-implementations of the various boost utility classes used. However, you'll lose functionality (e.g. threading) by doing this.
-So, if you can use boost, you should use boost. Otherwise, See the @link use_noboost NoBoost-Section @endlink
-later on this page for the details of the workaround.
-
-Once boost is working, you have to set up a project for the assimp library in your favorite IDE. If you use VC2005 or
-VC2008, you can simply load the solution or project files in the workspaces/ folder, otherwise you have to create a new
-package and add all the headers and source files from the include/ and code/ directories. Set the temporary output folder
-to obj/, for example, and redirect the output folder to bin/. Then build the library - it should compile and link fine.
-
-The last step is to integrate the library into your project. This is basically the same task as described in the
-"Using the pre-built libraries" section above: add the include/ and bin/ directories to your IDE's paths so that the compiler can find
-the library files. Alternatively you can simply add the assimp project to your project's overall solution and build it inside
-your solution.
-
-
-@section use_noboost Building without boost.
-
-The Boost-Workaround consists of dummy replacements for some boost utility templates. Currently there are replacements for
-
- - boost.scoped_ptr
- - boost.scoped_array
- - boost.format
- - boost.random
- - boost.common_factor
- - boost.foreach
- - boost.tuple
- - boost.make_shared
-
-These implementations are very limited and are not intended for use outside assimp. A compiler
-with full support for partial template specializations is required. To enable the workaround, put the following in
-your compiler's list of predefined macros:
+First you need to install cmake. Now just get the code from github or download the latest version from the webside.
+to build the library just open a command-prompt / bash, navigate into the repo-folder and run cmake via:
+
@code
-#define ASSIMP_BUILD_BOOST_WORKAROUND
+cmake CMakeLists.txt
@endcode
-<br>
-If you're working with the provided solutions for Visual Studio use the <i>-noboost</i> build configs. <br>
-
-<b>assimp_BUILD_BOOST_WORKAROUND</b> implies <b>assimp_BUILD_SINGLETHREADED</b>. <br>
-See the @ref assimp_st section
-for more details.
-
-
+A project-file of your default make-system ( like gnu-make on linux or Visual-Studio on Windows ) will be generated.
+Run the build and you are done. You can find the libs at assimp/lib and the dll's / so's at bin.
@section assimp_dll Windows DLL Build
-assimp can be built as DLL. You just need to select a -dll config from the list of project
-configs and you're fine.
+The Assimp-package can be built as DLL. You just need to run the default cmake run.
-<b>NOTE:</b> Theoretically, assimp-dll can be used with multithreaded (non-dll) runtime libraries,
-as long as you don't utilize any non-public stuff from the code folder. However, if you happen
-to encounter *very* strange problems, try changing the runtime to <i>Multithreaded (Debug) DLL</i>.
-@section assimp_stlport Building against STLport
+@section assimp static lib
-STLport is a free, fast and secure STL replacement that works with
-all major compilers and platforms. To get it, download the latest release from
-<a href="http://www.stlport.org"/><stlport.org></a>.
-Usually you'll just need to run 'configure' + a makefile (see their README for more details).
-Don't miss to add <stlport_root>/stlport to your compiler's default include paths - <b>prior</b>
-to the directory where your compiler vendor's headers lie. Do the same for <stlport_root>/lib and
-recompile assimp. To ensure you're really building against STLport see aiGetCompileFlags().
-<br>
-In our testing, STLport builds tend to be a bit faster than builds against Microsoft's
-C++ Standard Library.
+The Assimp-package can be build as a static library as well. Do do so just set the configuration variable <b>BUILD_SHARED_LIBS</b>
+to off during the cmake run.
*/
@@ -533,8 +459,9 @@ assimp::Importer::ReadFile(), aiImportFile() or aiImportFileEx() - see the @link
for further information on how to use the library.
By default, all 3D data is provided in a right-handed coordinate system such as OpenGL uses. In
-this coordinate system, +X points to the right, -Z points away from the viewer into the screen and
-+Y points upwards. Several modeling packages such as 3D Studio Max use this coordinate system as well (or a rotated variant of it).
+this coordinate system, +X points to the right, +Y points upwards and +Z points out of the screen
+towards the viewer. Several modeling packages such as 3D Studio Max use this coordinate system as well
+(or a rotated variant of it).
By contrast, some other environments use left-handed coordinate systems, a prominent example being
DirectX. If you need the imported data to be in a left-handed coordinate system, supply the
#aiProcess_MakeLeftHanded flag to the ReadFile() function call.
@@ -552,7 +479,7 @@ although our built-in triangulation (#aiProcess_Triangulate postprocessing step)
The output UV coordinate system has its origin in the lower-left corner:
@code
-0y|1y ---------- 1x|1y
+0x|1y ---------- 1x|1y
| |
| |
| |
@@ -560,18 +487,27 @@ The output UV coordinate system has its origin in the lower-left corner:
@endcode
Use the #aiProcess_FlipUVs flag to get UV coordinates with the upper-left corner als origin.
-All matrices in the library are row-major. That means that the matrices are stored row by row in memory,
-which is similar to the OpenGL matrix layout. A typical 4x4 matrix including a translational part looks like this:
+A typical 4x4 matrix including a translational part looks like this:
@code
X1 Y1 Z1 T1
X2 Y2 Z2 T2
X3 Y3 Z3 T3
-0 0 0 1
+ 0 0 0 1
@endcode
-
-... with (X1, X2, X3) being the X base vector, (Y1, Y2, Y3) being the Y base vector, (Z1, Z2, Z3)
-being the Z base vector and (T1, T2, T3) being the translation part. If you want to use these matrices
-in DirectX functions, you have to transpose them.
+with <tt>(X1, X2, X3)</tt> being the local X base vector, <tt>(Y1, Y2, Y3)</tt> being the local
+Y base vector, <tt>(Z1, Z2, Z3)</tt> being the local Z base vector and <tt>(T1, T2, T3)</tt> being the
+offset of the local origin (the translational part).
+All matrices in the library use row-major storage order. That means that the matrix elements are
+stored row-by-row, i.e. they end up like this in memory:
+<tt>[X1, Y1, Z1, T1, X2, Y2, Z2, T2, X3, Y3, Z3, T3, 0, 0, 0, 1]</tt>.
+
+Note that this is neither the OpenGL format nor the DirectX format, because both of them specify the
+matrix layout such that the translational part occupies three consecutive addresses in memory (so those
+matrices end with <tt>[..., T1, T2, T3, 1]</tt>), whereas the translation in an Assimp matrix is found at
+the offsets 3, 7 and 11 (spread across the matrix). You can transpose an Assimp matrix to end up with
+the format that OpenGL and DirectX mandate. To be very precise: The transposition has nothing
+to do with a left-handed or right-handed coordinate system but 'converts' between row-major and
+column-major storage format.
<hr>
@@ -664,7 +600,7 @@ See the @link materials Material System Page. @endlink
@section bones Bones
-A mesh may have a set of bones in the form of aiBone structures.. Bones are a means to deform a mesh
+A mesh may have a set of bones in the form of aiBone objects. Bones are a means to deform a mesh
according to the movement of a skeleton. Each bone has a name and a set of vertices on which it has influence.
Its offset matrix declares the transformation needed to transform from mesh space to the local space of this bone.
@@ -717,7 +653,7 @@ To apply such an animation you need to identify the animation tracks that refer
in your mesh. Then for every track: <br>
a) Find the keys that lay right before the current anim time. <br>
b) Optional: interpolate between these and the following keys. <br>
-c) Combine the calculated position, rotation and scaling to a tranformation matrix <br>
+c) Combine the calculated position, rotation and scaling to a transformation matrix <br>
d) Set the affected node's transformation to the calculated matrix. <br>
If you need hints on how to convert to or from quaternions, have a look at the
@@ -730,27 +666,31 @@ need them at all.
Normally textures used by assets are stored in separate files, however,
there are file formats embedding their textures directly into the model file.
Such textures are loaded into an aiTexture structure.
-For embedded textures, the value of `AI_MATKEY_TEXTURE(textureType, index)` will be `*<index>` where
-`<index>` is the index of the texture in aiScene::mTextures.
-<br>
+
+In previous versions, the path from the query for `AI_MATKEY_TEXTURE(textureType, index)` would be
+`*<index>` where `<index>` is the index of the texture in aiScene::mTextures. Now this call will
+return a file path for embedded textures in FBX files. To test if it is an embedded texture use
+aiScene::GetEmbeddedTexture. If the returned pointer is not null, it is embedded und can be loaded
+from the data structure. If it is null, search for a separate file. Other file types still use the
+old behaviour.<br>
+If your rely on the old behaviour, you can use Assimp::Importer::SetPropertyBool with the key
+#AI_CONFIG_IMPORT_FBX_EMBEDDED_TEXTURES_LEGACY_NAMING to force the old behaviour.
+
There are two cases:
-<br>
-<b>1)</b> The texture is NOT compressed. Its color data is directly stored
-in the aiTexture structure as an array of aiTexture::mWidth * aiTexture::mHeight aiTexel structures. Each aiTexel represents a pixel (or "texel") of the texture
-image. The color data is stored in an unsigned RGBA8888 format, which can be easily used for
-both Direct3D and OpenGL (swizzling the order of the color components might be necessary).
-RGBA8888 has been chosen because it is well-known, easy to use and natively
-supported by nearly all graphics APIs.
-<br>
-<b>2)</b> This applies if aiTexture::mHeight == 0 is fulfilled. Then, texture is stored in a
-"compressed" format such as DDS or PNG. The term "compressed" does not mean that the
-texture data must actually be compressed, however the texture was found in the
-model file as if it was stored in a separate file on the harddisk. Appropriate
-decoders (such as libjpeg, libpng, D3DX, DevIL) are required to load theses textures.
-aiTexture::mWidth specifies the size of the texture data in bytes, aiTexture::pcData is
-a pointer to the raw image data and aiTexture::achFormatHint is either zeroed or
-contains the most common file extension of the embedded texture's format. This value is only
-set if assimp is able to determine the file format.
+1. The texture is NOT compressed. Its color data is directly stored in the aiTexture structure as an
+ array of aiTexture::mWidth * aiTexture::mHeight aiTexel structures. Each aiTexel represents a
+ pixel (or "texel") of the texture image. The color data is stored in an unsigned RGBA8888 format,
+ which can be easily used for both Direct3D and OpenGL (swizzling the order of the color
+ components might be necessary). RGBA8888 has been chosen because it is well-known, easy to use
+ and natively supported by nearly all graphics APIs.
+2. This applies if aiTexture::mHeight == 0 is fulfilled. Then, texture is stored in a "compressed"
+ format such as DDS or PNG. The term "compressed" does not mean that the texture data must
+ actually be compressed, however the texture was found in the model file as if it was stored in a
+ separate file on the harddisk. Appropriate decoders (such as libjpeg, libpng, D3DX, DevIL) are
+ required to load theses textures. aiTexture::mWidth specifies the size of the texture data in
+ bytes, aiTexture::pcData is a pointer to the raw image data and aiTexture::achFormatHint is
+ either zeroed or contains the most common file extension of the embedded texture's format. This
+ value is only set if assimp is able to determine the file format.
*/
@@ -803,188 +743,206 @@ All material key constants start with 'AI_MATKEY' (it's an ugly macro for histor
<th>Name</th>
<th>Data Type</th>
<th>Default Value</th>
- <th>Meaning</th>
- <th>Notes</th>
+ <th>Meaning</th>
+ <th>Notes</th>
</tr>
<tr>
<td><tt>NAME</tt></td>
<td>aiString</td>
<td>n/a</td>
- <td>The name of the material, if available. </td>
- <td>Ignored by <tt>aiProcess_RemoveRedundantMaterials</tt>. Materials are considered equal even if their names are different.</td>
+ <td>The name of the material, if available. </td>
+ <td>Ignored by <tt>aiProcess_RemoveRedundantMaterials</tt>. Materials are considered equal even if their names are different.</td>
</tr>
<tr>
<td><tt>COLOR_DIFFUSE</tt></td>
<td>aiColor3D</td>
<td>black (0,0,0)</td>
- <td>Diffuse color of the material. This is typically scaled by the amount of incoming diffuse light (e.g. using gouraud shading) </td>
- <td>---</td>
+ <td>Diffuse color of the material. This is typically scaled by the amount of incoming diffuse light (e.g. using gouraud shading) </td>
+ <td>---</td>
</tr>
<tr>
<td><tt>COLOR_SPECULAR</tt></td>
<td>aiColor3D</td>
<td>black (0,0,0)</td>
- <td>Specular color of the material. This is typically scaled by the amount of incoming specular light (e.g. using phong shading) </td>
- <td>---</td>
+ <td>Specular color of the material. This is typically scaled by the amount of incoming specular light (e.g. using phong shading) </td>
+ <td>---</td>
</tr>
<tr>
<td><tt>COLOR_AMBIENT</tt></td>
<td>aiColor3D</td>
<td>black (0,0,0)</td>
- <td>Ambient color of the material. This is typically scaled by the amount of ambient light </td>
- <td>---</td>
+ <td>Ambient color of the material. This is typically scaled by the amount of ambient light </td>
+ <td>---</td>
</tr>
<tr>
<td><tt>COLOR_EMISSIVE</tt></td>
<td>aiColor3D</td>
<td>black (0,0,0)</td>
- <td>Emissive color of the material. This is the amount of light emitted by the object. In real time applications it will usually not affect surrounding objects, but raytracing applications may wish to treat emissive objects as light sources. </td>
- <td>---</tt></td>
+ <td>Emissive color of the material. This is the amount of light emitted by the object. In real time applications it will usually not affect surrounding objects, but raytracing applications may wish to treat emissive objects as light sources. </td>
+ <td>---</td>
</tr>
<tr>
<td><tt>COLOR_TRANSPARENT</tt></td>
<td>aiColor3D</td>
<td>black (0,0,0)</td>
- <td>Defines the transparent color of the material, this is the color to be multiplied with the color of
- translucent light to construct the final 'destination color' for a particular position in the screen buffer. T </td>
- <td>---</tt></td>
+ <td>Defines the transparent color of the material, this is the color to be multiplied with the color of translucent light to construct the final 'destination color' for a particular position in the screen buffer.</td>
+ <td>---</td>
+ </tr>
+
+ <tr>
+ <td><tt>COLOR_REFLECTIVE</tt></td>
+ <td>aiColor3D</td>
+ <td>black (0,0,0)</td>
+ <td>Defines the reflective color of the material. This is typically scaled by the amount of incoming light from the direction of mirror reflection. Usually combined with an environment lightmap of some kind for real-time applications.</td>
+ <td>---</td>
+ </tr>
+
+ <tr>
+ <td><tt>REFLECTIVITY</tt></td>
+ <td>float</td>
+ <td>0.0</td>
+ <td>Scales the reflective color of the material.</td>
+ <td>---</td>
</tr>
<tr>
<td><tt>WIREFRAME</tt></td>
<td>int</td>
<td>false</td>
- <td>Specifies whether wireframe rendering must be turned on for the material. 0 for false, !0 for true. </td>
- <td>---</tt></td>
+ <td>Specifies whether wireframe rendering must be turned on for the material. 0 for false, !0 for true. </td>
+ <td>---</td>
</tr>
<tr>
<td><tt>TWOSIDED</tt></td>
<td>int</td>
<td>false</td>
- <td>Specifies whether meshes using this material must be rendered without backface culling. 0 for false, !0 for true. </td>
- <td>Some importers set this property if they don't know whether the output face oder is right. As long as it is not set, you may safely enable backface culling.</tt></td>
+ <td>Specifies whether meshes using this material must be rendered without backface culling. 0 for false, !0 for true. </td>
+ <td>Some importers set this property if they don't know whether the output face order is right. As long as it is not set, you may safely enable backface culling.</tt></td>
</tr>
<tr>
<td><tt>SHADING_MODEL</tt></td>
<td>int</td>
<td>gouraud</td>
- <td>One of the #aiShadingMode enumerated values. Defines the library shading model to use for (real time) rendering to approximate the original look of the material as closely as possible. </td>
- <td>The presence of this key might indicate a more complex material. If absent, assume phong shading only if a specular exponent is given.</tt></td>
+ <td>One of the #aiShadingMode enumerated values. Defines the library shading model to use for (real time) rendering to approximate the original look of the material as closely as possible. </td>
+ <td>The presence of this key might indicate a more complex material. If absent, assume phong shading only if a specular exponent is given.</tt></td>
</tr>
<tr>
<td><tt>BLEND_FUNC</tt></td>
<td>int</td>
<td>false</td>
- <td>One of the #aiBlendMode enumerated values. Defines how the final color value in the screen buffer is computed from the given color at that position and the newly computed color from the material. Simply said, alpha blending settings.</td>
- <td>-</td>
+ <td>One of the #aiBlendMode enumerated values. Defines how the final color value in the screen buffer is computed from the given color at that position and the newly computed color from the material. Simply said, alpha blending settings.</td>
+ <td>-</td>
</tr>
<tr>
<td><tt>OPACITY</tt></td>
<td>float</td>
<td>1.0</td>
- <td>Defines the opacity of the material in a range between 0..1.</td>
- <td>Use this value to decide whether you have to activate alpha blending for rendering. <tt>OPACITY</tt> != 1 usually also implies TWOSIDED=1 to avoid cull artifacts.</td>
+ <td>Defines the opacity of the material in a range between 0..1.</td>
+ <td>Use this value to decide whether you have to activate alpha blending for rendering. <tt>OPACITY</tt> != 1 usually also implies TWOSIDED=1 to avoid cull artifacts.</td>
</tr>
<tr>
<td><tt>SHININESS</tt></td>
<td>float</td>
<td>0.f</td>
- <td>Defines the shininess of a phong-shaded material. This is actually the exponent of the phong specular equation</td>
- <td><tt>SHININESS</tt>=0 is equivalent to <tt>SHADING_MODEL</tt>=<tt>aiShadingMode_Gouraud</tt>.</td>
+ <td>Defines the shininess of a phong-shaded material. This is actually the exponent of the phong specular equation</td>
+ <td><tt>SHININESS</tt>=0 is equivalent to <tt>SHADING_MODEL</tt>=<tt>aiShadingMode_Gouraud</tt>.</td>
</tr>
<tr>
<td><tt>SHININESS_STRENGTH</tt></td>
<td>float</td>
<td>1.0</td>
- <td>Scales the specular color of the material.</td>
- <td>This value is kept separate from the specular color by most modelers, and so do we.</td>
+ <td>Scales the specular color of the material.</td>
+ <td>This value is kept separate from the specular color by most modelers, and so do we.</td>
</tr>
<tr>
<td><tt>REFRACTI</tt></td>
<td>float</td>
<td>1.0</td>
- <td>Defines the Index Of Refraction for the material. That's not supported by most file formats.</td>
- <td>Might be of interest for raytracing.</td>
+ <td>Defines the Index Of Refraction for the material. That's not supported by most file formats.</td>
+ <td>Might be of interest for raytracing.</td>
</tr>
<tr>
<td><tt>TEXTURE(t,n)</tt></td>
<td>aiString</td>
<td>n/a</td>
- <td>Defines the path of the n'th texture on the stack 't', where 'n' is any value >= 0 and 't' is one of the #aiTextureType enumerated values. Either a filepath or `*<index>`, where `<index>` is the index of an embedded texture in aiScene::mTextures.</td>
- <td>See the 'Textures' section above.</td>
+ <td>Defines the path of the n'th texture on the stack 't', where 'n' is any value >= 0 and 't'
+ is one of the #aiTextureType enumerated values. A file path to an external file or an embedded
+ texture. Use aiScene::GetEmbeddedTexture to test if it is embedded for FBX files, in other cases
+ embedded textures start with '*' followed by an index into aiScene::mTextures.</td>
+ <td>See the @ref mat_tex section above. Also see @ref textures for a more information about texture retrieval.</td>
</tr>
<tr>
<td><tt>TEXBLEND(t,n)</tt></td>
<td>float</td>
<td>n/a</td>
- <td>Defines the strength the n'th texture on the stack 't'. All color components (rgb) are multiplied with this factor *before* any further processing is done.</td>
- <td>-</td>
+ <td>Defines the strength the n'th texture on the stack 't'. All color components (rgb) are multiplied with this factor *before* any further processing is done.</td>
+ <td>-</td>
</tr>
<tr>
<td><tt>TEXOP(t,n)</tt></td>
<td>int</td>
<td>n/a</td>
- <td>One of the #aiTextureOp enumerated values. Defines the arithmetic operation to be used to combine the n'th texture on the stack 't' with the n-1'th. <tt>TEXOP(t,0)</tt> refers to the blend operation between the base color for this stack (e.g. <tt>COLOR_DIFFUSE</tt> for the diffuse stack) and the first texture.</td>
- <td>-</td>
+ <td>One of the #aiTextureOp enumerated values. Defines the arithmetic operation to be used to combine the n'th texture on the stack 't' with the n-1'th. <tt>TEXOP(t,0)</tt> refers to the blend operation between the base color for this stack (e.g. <tt>COLOR_DIFFUSE</tt> for the diffuse stack) and the first texture.</td>
+ <td>-</td>
</tr>
<tr>
<td><tt>MAPPING(t,n)</tt></td>
<td>int</td>
<td>n/a</td>
- <td>Defines how the input mapping coordinates for sampling the n'th texture on the stack 't' are computed. Usually explicit UV coordinates are provided, but some model file formats might also be using basic shapes, such as spheres or cylinders, to project textures onto meshes.</td>
- <td>See the 'Textures' section below. #aiProcess_GenUVCoords can be used to let Assimp compute proper UV coordinates from projective mappings.</td>
+ <td>Defines how the input mapping coordinates for sampling the n'th texture on the stack 't' are computed. Usually explicit UV coordinates are provided, but some model file formats might also be using basic shapes, such as spheres or cylinders, to project textures onto meshes.</td>
+ <td>See the 'Textures' section below. #aiProcess_GenUVCoords can be used to let Assimp compute proper UV coordinates from projective mappings.</td>
</tr>
<tr>
<td><tt>UVWSRC(t,n)</tt></td>
<td>int</td>
<td>n/a</td>
- <td>Defines the UV channel to be used as input mapping coordinates for sampling the n'th texture on the stack 't'. All meshes assigned to this material share the same UV channel setup</td>
- <td>Presence of this key implies <tt>MAPPING(t,n)</tt> to be #aiTextureMapping_UV. See @ref uvwsrc for more details. </td>
+ <td>Defines the UV channel to be used as input mapping coordinates for sampling the n'th texture on the stack 't'. All meshes assigned to this material share the same UV channel setup</td>
+ <td>Presence of this key implies <tt>MAPPING(t,n)</tt> to be #aiTextureMapping_UV. See @ref uvwsrc for more details. </td>
</tr>
<tr>
<td><tt>MAPPINGMODE_U(t,n)</tt></td>
<td>int</td>
<td>n/a</td>
- <td>Any of the #aiTextureMapMode enumerated values. Defines the texture wrapping mode on the x axis for sampling the n'th texture on the stack 't'. 'Wrapping' occurs whenever UVs lie outside the 0..1 range. </td>
- <td>-</td>
+ <td>Any of the #aiTextureMapMode enumerated values. Defines the texture wrapping mode on the x axis for sampling the n'th texture on the stack 't'. 'Wrapping' occurs whenever UVs lie outside the 0..1 range. </td>
+ <td>-</td>
</tr>
<tr>
<td><tt>MAPPINGMODE_V(t,n)</tt></td>
<td>int</td>
<td>n/a</td>
- <td>Wrap mode on the v axis. See <tt>MAPPINGMODE_U</tt>. </td>
- <td>-</td>
+ <td>Wrap mode on the v axis. See <tt>MAPPINGMODE_U</tt>. </td>
+ <td>-</td>
</tr>
<tr>
<td><tt>TEXMAP_AXIS(t,n)</tt></td>
<td>aiVector3D</td>
<td>n/a</td>
- <td></tt> Defines the base axis to to compute the mapping coordinates for the n'th texture on the stack 't' from. This is not required for UV-mapped textures. For instance, if <tt>MAPPING(t,n)</tt> is #aiTextureMapping_SPHERE, U and V would map to longitude and latitude of a sphere around the given axis. The axis is given in local mesh space.</td>
- <td>-</td>
+ <td></tt> Defines the base axis to to compute the mapping coordinates for the n'th texture on the stack 't' from. This is not required for UV-mapped textures. For instance, if <tt>MAPPING(t,n)</tt> is #aiTextureMapping_SPHERE, U and V would map to longitude and latitude of a sphere around the given axis. The axis is given in local mesh space.</td>
+ <td>-</td>
</tr>
<tr>
<td><tt>TEXFLAGS(t,n)</tt></td>
<td>int</td>
<td>n/a</td>
- <td></tt> Defines miscellaneous flag for the n'th texture on the stack 't'. This is a bitwise combination of the #aiTextureFlags enumerated values.</td>
- <td>-</td>
+ <td></tt> Defines miscellaneous flag for the n'th texture on the stack 't'. This is a bitwise combination of the #aiTextureFlags enumerated values.</td>
+ <td>-</td>
</tr>
</table>
@@ -1075,7 +1033,7 @@ for all textures
assign channel specified in uvwsrc
else
assign channels in ascending order for all texture stacks,
- i.e. diffuse1 gets channel 1, opacity0 gets channel 0.
+ i.e. diffuse1 gets channel 1, opacity0 gets channel 0.
@endverbatim
@@ -1420,7 +1378,7 @@ IFC file properties (IfcPropertySet) are kept as per-node metadata, see aiNode::
This section contains implementations notes for the OgreXML importer.
@subsection overview Overview
-Ogre importer is currently optimized for the Blender Ogre exporter, because thats the only one that I use. You can find the Blender Ogre exporter at: http://www.ogre3d.org/forums/viewtopic.php?f=8&t=45922
+Ogre importer is currently optimized for the Blender Ogre exporter, because that's the only one that I use. You can find the Blender Ogre exporter at: http://www.ogre3d.org/forums/viewtopic.php?f=8&t=45922
@subsection what What will be loaded?
@@ -1434,7 +1392,7 @@ Skeleton: Skeleton with Bone hierarchy (Position and Rotation, but no Scaling in
animations with rotation, translation and scaling keys.
@subsection export_Blender How to export Files from Blender
-You can find informations about how to use the Ogreexporter by your own, so here are just some options that you need, so the assimp
+You can find information about how to use the Ogreexporter by your own, so here are just some options that you need, so the assimp
importer will load everything correctly:
- Use either "Rendering Material" or "Custom Material" see @ref material
- do not use "Flip Up Axies to Y"
@@ -1528,9 +1486,8 @@ Just copy'n'paste the template from Appendix A and adapt it for your needs.
with DefaultLogger::get()->[error, warn, debug, info].
</li>
<li>
-Make sure that your loader compiles against all build configurations on all supported platforms. This includes <i>-noboost</i>! To avoid problems,
-see the boost section on this page for a list of all 'allowed' boost classes (again, this grew historically when we had to accept that boost
-is not THAT widely spread that one could rely on it being available everywhere).
+Make sure that your loader compiles against all build configurations on all supported platforms. You can use our CI-build to check several platforms
+like Windows and Linux ( 32 bit and 64 bit ).
</li>
<li>
Provide some _free_ test models in <tt>&lt;root&gt;/test/models/&lt;FormatName&gt;/</tt> and credit their authors.
@@ -1543,7 +1500,7 @@ Done! Please, share your loader that everyone can profit from it!
@section properties Properties
-You can use properties to chance the behavior of you importer. In order to do so, you have to overide BaseImporter::SetupProperties, and specify
+You can use properties to chance the behavior of you importer. In order to do so, you have to override BaseImporter::SetupProperties, and specify
you custom properties in config.h. Just have a look to the other AI_CONFIG_IMPORT_* defines and you will understand, how it works.
The properties can be set with Importer::SetProperty***() and can be accessed in your SetupProperties function with Importer::GetProperty***(). You can
@@ -1609,22 +1566,6 @@ NewMaterial->AddProperty(&aiString(MaterialName.c_str()), AI_MATKEY_NAME);//Mate
NewMaterial->AddProperty(&aiString(Texturename.c_str()), AI_MATKEY_TEXTURE(aiTextureType_DIFFUSE, 0));//again, Texturename is a std::string
@endcode
-@section boost Boost
-
-The boost whitelist:
-<ul>
-<li><i>boost.scoped_ptr</i></li>
-<li><i>boost.scoped_array</i></li>
-<li><i>boost.format</i> </li>
-<li><i>boost.random</i> </li>
-<li><i>boost.common_factor</i> </li>
-<li><i>boost.foreach</i> </li>
-<li><i>boost.tuple</i></li>
-</ul>
-
-(if you happen to need something else, i.e. boost::thread, make this an optional feature.
-<tt>assimp_BUILD_BOOST_WORKAROUND</tt> is defined for <i>-noboost</i> builds)
-
@section appa Appendix A - Template for BaseImporter's abstract methods
@code
diff --git a/code/BaseImporter.h b/include/assimp/BaseImporter.h
index cee54c1ad..b218d06ff 100644
--- a/code/BaseImporter.h
+++ b/include/assimp/BaseImporter.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -65,42 +66,6 @@ class IOStream;
#define AI_MAKE_MAGIC(string) ((uint32_t)((string[0] << 24) + \
(string[1] << 16) + (string[2] << 8) + string[3]))
-// ---------------------------------------------------------------------------
-template <typename T>
-struct ScopeGuard
-{
- explicit ScopeGuard(T* obj) : obj(obj), mdismiss() {}
- ~ScopeGuard () throw() {
- if (!mdismiss) {
- delete obj;
- }
- obj = NULL;
- }
-
- T* dismiss() {
- mdismiss=true;
- return obj;
- }
-
- operator T*() {
- return obj;
- }
-
- T* operator -> () {
- return obj;
- }
-
-private:
- // no copying allowed.
- ScopeGuard();
- ScopeGuard( const ScopeGuard & );
- ScopeGuard &operator = ( const ScopeGuard & );
-
- T* obj;
- bool mdismiss;
-};
-
-
// ---------------------------------------------------------------------------
/** FOR IMPORTER PLUGINS ONLY: The BaseImporter defines a common interface
@@ -112,19 +77,17 @@ private:
* imports the given file. ReadFile is not overridable, it just calls
* InternReadFile() and catches any ImportErrorException that might occur.
*/
-class ASSIMP_API BaseImporter
-{
+class ASSIMP_API BaseImporter {
friend class Importer;
public:
/** Constructor to be privately used by #Importer */
- BaseImporter();
+ BaseImporter() AI_NO_EXCEPT;
/** Destructor, private as well */
virtual ~BaseImporter();
-public:
// -------------------------------------------------------------------
/** Returns whether the class can handle the format of the given file.
*
@@ -279,7 +242,8 @@ public: // static utilities
const char** tokens,
unsigned int numTokens,
unsigned int searchBytes = 200,
- bool tokensSol = false);
+ bool tokensSol = false,
+ bool noAlphaBeforeTokens = false);
// -------------------------------------------------------------------
/** @brief Check whether a file has a specific file extension
diff --git a/code/Bitmap.h b/include/assimp/Bitmap.h
index 96c994dbe..209116863 100644
--- a/code/Bitmap.h
+++ b/include/assimp/Bitmap.h
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -49,6 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_BITMAP_H_INC
#define AI_BITMAP_H_INC
+#include "defs.h"
#include <stdint.h>
#include <cstddef>
@@ -58,7 +60,7 @@ namespace Assimp {
class IOStream;
-class Bitmap {
+class ASSIMP_API Bitmap {
protected:
struct Header {
diff --git a/code/BlobIOSystem.h b/include/assimp/BlobIOSystem.h
index f406ea0fe..a0ed7209f 100644
--- a/code/BlobIOSystem.h
+++ b/include/assimp/BlobIOSystem.h
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -250,7 +251,7 @@ public:
}
}
if (!master) {
- DefaultLogger::get()->error("BlobIOSystem: no data written or master file was not closed properly.");
+ ASSIMP_LOG_ERROR("BlobIOSystem: no data written or master file was not closed properly.");
return NULL;
}
diff --git a/code/ByteSwapper.h b/include/assimp/ByteSwapper.h
index e5c7569f1..322a242de 100644
--- a/code/ByteSwapper.h
+++ b/include/assimp/ByteSwapper.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -59,9 +60,8 @@ namespace Assimp {
* This is required to read big-endian model formats on little-endian machines,
* and vice versa. Direct use of this class is DEPRECATED. Use #StreamReader instead. */
// --------------------------------------------------------------------------------------
-class ByteSwap
-{
- ByteSwap() {}
+class ByteSwap {
+ ByteSwap() AI_NO_EXCEPT {}
public:
diff --git a/include/assimp/Compiler/pushpack1.h b/include/assimp/Compiler/pushpack1.h
index 94ee1e474..4c9fbb857 100644
--- a/include/assimp/Compiler/pushpack1.h
+++ b/include/assimp/Compiler/pushpack1.h
@@ -25,7 +25,7 @@
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
# pragma pack(push,1)
# define PACK_STRUCT
-#elif defined( __GNUC__ )
+#elif defined( __GNUC__ ) || defined(__clang__)
# if !defined(HOST_MINGW)
# define PACK_STRUCT __attribute__((__packed__))
# else
diff --git a/code/CreateAnimMesh.h b/include/assimp/CreateAnimMesh.h
index 84cab8932..ad625cb9f 100644
--- a/code/CreateAnimMesh.h
+++ b/include/assimp/CreateAnimMesh.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -50,7 +51,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace Assimp {
/** Create aiAnimMesh from aiMesh. */
-aiAnimMesh *aiCreateAnimMesh(const aiMesh *mesh);
+ASSIMP_API aiAnimMesh *aiCreateAnimMesh(const aiMesh *mesh);
} // end of namespace Assimp
#endif // INCLUDED_AI_CREATE_ANIM_MESH_H
diff --git a/include/assimp/DefaultIOStream.h b/include/assimp/DefaultIOStream.h
index 3668b27ec..e0e010ecb 100644
--- a/include/assimp/DefaultIOStream.h
+++ b/include/assimp/DefaultIOStream.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -68,7 +69,7 @@ class ASSIMP_API DefaultIOStream : public IOStream
#endif // __ANDROID__
protected:
- DefaultIOStream();
+ DefaultIOStream() AI_NO_EXCEPT;
DefaultIOStream(FILE* pFile, const std::string &strFilename);
public:
@@ -110,27 +111,25 @@ private:
FILE* mFile;
// Filename
std::string mFilename;
-
// Cached file size
mutable size_t mCachedSize;
};
// ----------------------------------------------------------------------------------
-inline DefaultIOStream::DefaultIOStream () :
- mFile (NULL),
- mFilename (""),
- mCachedSize(SIZE_MAX)
-{
+inline
+DefaultIOStream::DefaultIOStream() AI_NO_EXCEPT
+: mFile(nullptr)
+, mFilename("")
+, mCachedSize(SIZE_MAX) {
// empty
}
// ----------------------------------------------------------------------------------
-inline DefaultIOStream::DefaultIOStream (FILE* pFile,
- const std::string &strFilename) :
- mFile(pFile),
- mFilename(strFilename),
- mCachedSize(SIZE_MAX)
-{
+inline
+DefaultIOStream::DefaultIOStream (FILE* pFile, const std::string &strFilename)
+: mFile(pFile)
+, mFilename(strFilename)
+, mCachedSize(SIZE_MAX) {
// empty
}
// ----------------------------------------------------------------------------------
diff --git a/include/assimp/DefaultIOSystem.h b/include/assimp/DefaultIOSystem.h
index d7cf031cf..a5d45c692 100644
--- a/include/assimp/DefaultIOSystem.h
+++ b/include/assimp/DefaultIOSystem.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -49,15 +50,8 @@ namespace Assimp {
// ---------------------------------------------------------------------------
/** Default implementation of IOSystem using the standard C file functions */
-class ASSIMP_API DefaultIOSystem : public IOSystem
-{
+class ASSIMP_API DefaultIOSystem : public IOSystem {
public:
- /** Constructor. */
- DefaultIOSystem();
-
- /** Destructor. */
- ~DefaultIOSystem();
-
// -------------------------------------------------------------------
/** Tests for the existence of a file at the given path. */
bool Exists( const char* pFile) const;
diff --git a/include/assimp/DefaultLogger.hpp b/include/assimp/DefaultLogger.hpp
index 4f1a7e1f4..1f0c899be 100644
--- a/include/assimp/DefaultLogger.hpp
+++ b/include/assimp/DefaultLogger.hpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -130,9 +131,7 @@ public:
bool detatchStream(LogStream *pStream,
unsigned int severity);
-
private:
-
// ----------------------------------------------------------------------
/** @briefPrivate construction for internal use by create().
* @param severity Logging granularity */
@@ -142,8 +141,6 @@ private:
/** @briefDestructor */
~DefaultLogger();
-private:
-
/** @brief Logs debug infos, only been written when severity level VERBOSE is set */
void OnDebug(const char* message);
diff --git a/code/Exceptional.h b/include/assimp/Exceptional.h
index 5109b8f07..5109b8f07 100644
--- a/code/Exceptional.h
+++ b/include/assimp/Exceptional.h
diff --git a/include/assimp/Exporter.hpp b/include/assimp/Exporter.hpp
index 2c141ded2..4e0843b60 100644
--- a/include/assimp/Exporter.hpp
+++ b/include/assimp/Exporter.hpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -56,6 +57,7 @@ namespace Assimp {
class ExporterPimpl;
class IOSystem;
+class ProgressHandler;
// ----------------------------------------------------------------------------------
/** CPP-API: The Exporter class forms an C++ interface to the export functionality
@@ -83,8 +85,7 @@ public:
typedef void (*fpExportFunc)(const char*, IOSystem*, const aiScene*, const ExportProperties*);
/** Internal description of an Assimp export format option */
- struct ExportFormatEntry
- {
+ struct ExportFormatEntry {
/// Public description structure to be returned by aiGetExportFormatDescription()
aiExportFormatDesc mDescription;
@@ -114,12 +115,16 @@ public:
}
};
-
-public:
+ /**
+ * @brief The class constructor.
+ */
Exporter();
+
+ /**
+ * @brief The class destructor.
+ */
~Exporter();
-public:
// -------------------------------------------------------------------
/** Supplies a custom IO handler to the exporter to use to open and
* access files.
@@ -154,6 +159,19 @@ public:
bool IsDefaultIOHandler() const;
// -------------------------------------------------------------------
+ /** Supplies a custom progress handler to the exporter. This
+ * interface exposes an #Update() callback, which is called
+ * more or less periodically (please don't sue us if it
+ * isn't as periodically as you'd like it to have ...).
+ * This can be used to implement progress bars and loading
+ * timeouts.
+ * @param pHandler Progress callback interface. Pass nullptr to
+ * disable progress reporting.
+ * @note Progress handlers can be used to abort the loading
+ * at almost any time.*/
+ void SetProgressHandler(ProgressHandler* pHandler);
+
+ // -------------------------------------------------------------------
/** Exports the given scene to a chosen file format. Returns the exported
* data as a binary blob which you can write into a file or something.
* When you're done with the data, simply let the #Exporter instance go
@@ -171,8 +189,10 @@ public:
* Any IO handlers set via #SetIOHandler are ignored here.
* @note Use aiCopyScene() to get a modifiable copy of a previously
* imported scene. */
- const aiExportDataBlob* ExportToBlob( const aiScene* pScene, const char* pFormatId, unsigned int pPreprocessing = 0u, const ExportProperties* pProperties = NULL);
- const aiExportDataBlob* ExportToBlob( const aiScene* pScene, const std::string& pFormatId, unsigned int pPreprocessing = 0u, const ExportProperties* pProperties = NULL);
+ const aiExportDataBlob* ExportToBlob(const aiScene* pScene, const char* pFormatId,
+ unsigned int pPreprocessing = 0u, const ExportProperties* = nullptr);
+ const aiExportDataBlob* ExportToBlob( const aiScene* pScene, const std::string& pFormatId,
+ unsigned int pPreprocessing = 0u, const ExportProperties* pProperties = nullptr);
// -------------------------------------------------------------------
/** Convenience function to export directly to a file. Use
@@ -207,8 +227,10 @@ public:
* @return AI_SUCCESS if everything was fine.
* @note Use aiCopyScene() to get a modifiable copy of a previously
* imported scene.*/
- aiReturn Export( const aiScene* pScene, const char* pFormatId, const char* pPath, unsigned int pPreprocessing = 0u, const ExportProperties* pProperties = NULL);
- aiReturn Export( const aiScene* pScene, const std::string& pFormatId, const std::string& pPath, unsigned int pPreprocessing = 0u, const ExportProperties* pProperties = NULL);
+ aiReturn Export( const aiScene* pScene, const char* pFormatId, const char* pPath,
+ unsigned int pPreprocessing = 0u, const ExportProperties* pProperties = nullptr);
+ aiReturn Export( const aiScene* pScene, const std::string& pFormatId, const std::string& pPath,
+ unsigned int pPreprocessing = 0u, const ExportProperties* pProperties = nullptr);
// -------------------------------------------------------------------
/** Returns an error description of an error that occurred in #Export
diff --git a/code/GenericProperty.h b/include/assimp/GenericProperty.h
index 8632e7577..7b75cb1c8 100644
--- a/code/GenericProperty.h
+++ b/include/assimp/GenericProperty.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -45,15 +46,15 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/Importer.hpp>
#include <assimp/ai_assert.h>
#include "Hash.h"
-#include <map>
+#include <map>
// ------------------------------------------------------------------------------------------------
template <class T>
-inline bool SetGenericProperty(std::map< unsigned int, T >& list,
- const char* szName, const T& value)
-{
- ai_assert(NULL != szName);
+inline
+bool SetGenericProperty(std::map< unsigned int, T >& list,
+ const char* szName, const T& value) {
+ ai_assert(nullptr != szName);
const uint32_t hash = SuperFastHash(szName);
typename std::map<unsigned int, T>::iterator it = list.find(hash);
@@ -62,20 +63,22 @@ inline bool SetGenericProperty(std::map< unsigned int, T >& list,
return false;
}
(*it).second = value;
+
return true;
}
// ------------------------------------------------------------------------------------------------
template <class T>
-inline const T& GetGenericProperty(const std::map< unsigned int, T >& list,
- const char* szName, const T& errorReturn)
-{
- ai_assert(NULL != szName);
+inline
+const T& GetGenericProperty(const std::map< unsigned int, T >& list,
+ const char* szName, const T& errorReturn) {
+ ai_assert(nullptr != szName);
const uint32_t hash = SuperFastHash(szName);
typename std::map<unsigned int, T>::const_iterator it = list.find(hash);
- if (it == list.end())
+ if (it == list.end()) {
return errorReturn;
+ }
return (*it).second;
}
@@ -84,16 +87,17 @@ inline const T& GetGenericProperty(const std::map< unsigned int, T >& list,
// Special version for pointer types - they will be deleted when replaced with another value
// passing NULL removes the whole property
template <class T>
-inline void SetGenericPropertyPtr(std::map< unsigned int, T* >& list,
- const char* szName, T* value, bool* bWasExisting = NULL)
-{
- ai_assert(NULL != szName);
+inline
+void SetGenericPropertyPtr(std::map< unsigned int, T* >& list,
+ const char* szName, T* value, bool* bWasExisting = nullptr ) {
+ ai_assert(nullptr != szName);
const uint32_t hash = SuperFastHash(szName);
typename std::map<unsigned int, T*>::iterator it = list.find(hash);
if (it == list.end()) {
- if (bWasExisting)
+ if (bWasExisting) {
*bWasExisting = false;
+ }
list.insert(std::pair<unsigned int,T*>( hash, value ));
return;
@@ -105,20 +109,23 @@ inline void SetGenericPropertyPtr(std::map< unsigned int, T* >& list,
if (!value) {
list.erase(it);
}
- if (bWasExisting)
+ if (bWasExisting) {
*bWasExisting = true;
+ }
}
// ------------------------------------------------------------------------------------------------
template <class T>
-inline const bool HasGenericProperty(const std::map< unsigned int, T >& list,
- const char* szName)
-{
- ai_assert(NULL != szName);
+inline
+bool HasGenericProperty(const std::map< unsigned int, T >& list,
+ const char* szName) {
+ ai_assert(nullptr != szName);
const uint32_t hash = SuperFastHash(szName);
typename std::map<unsigned int, T>::const_iterator it = list.find(hash);
- if (it == list.end()) return false;
+ if (it == list.end()) {
+ return false;
+ }
return true;
}
diff --git a/code/Hash.h b/include/assimp/Hash.h
index a567adbc3..eb5df757d 100644
--- a/code/Hash.h
+++ b/include/assimp/Hash.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/include/assimp/IOStream.hpp b/include/assimp/IOStream.hpp
index ce5907a47..52b80cc15 100644
--- a/include/assimp/IOStream.hpp
+++ b/include/assimp/IOStream.hpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -70,7 +71,7 @@ class ASSIMP_API IOStream
{
protected:
/** Constructor protected, use IOSystem::Open() to create an instance. */
- IOStream(void);
+ IOStream() AI_NO_EXCEPT;
public:
// -------------------------------------------------------------------
@@ -124,17 +125,18 @@ public:
}; //! class IOStream
// ----------------------------------------------------------------------------------
-inline IOStream::IOStream()
-{
+inline
+IOStream::IOStream() AI_NO_EXCEPT {
// empty
}
// ----------------------------------------------------------------------------------
-inline IOStream::~IOStream()
-{
+inline
+IOStream::~IOStream() {
// empty
}
// ----------------------------------------------------------------------------------
+
} //!namespace Assimp
#endif //!!AI_IOSTREAM_H_INC
diff --git a/code/IOStreamBuffer.h b/include/assimp/IOStreamBuffer.h
index 6ca37b6eb..c93a191df 100644
--- a/code/IOStreamBuffer.h
+++ b/include/assimp/IOStreamBuffer.h
@@ -4,7 +4,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -43,6 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/types.h>
#include <assimp/IOStream.hpp>
+
#include "ParsingUtils.h"
#include <vector>
@@ -247,9 +249,9 @@ bool IOStreamBuffer<T>::getNextDataLine( std::vector<T> &buffer, T continuationT
}
}
- bool continuationFound( false ), endOfDataLine( false );
+ bool continuationFound( false );
size_t i = 0;
- while ( !endOfDataLine ) {
+ for( ;; ) {
if ( continuationToken == m_cache[ m_cachePos ] ) {
continuationFound = true;
++m_cachePos;
@@ -269,8 +271,8 @@ bool IOStreamBuffer<T>::getNextDataLine( std::vector<T> &buffer, T continuationT
}
buffer[ i ] = m_cache[ m_cachePos ];
- m_cachePos++;
- i++;
+ ++m_cachePos;
+ ++i;
if ( m_cachePos >= m_cacheSize ) {
if ( !readNextBlock() ) {
return false;
@@ -279,16 +281,21 @@ bool IOStreamBuffer<T>::getNextDataLine( std::vector<T> &buffer, T continuationT
}
buffer[ i ] = '\n';
- m_cachePos++;
+ ++m_cachePos;
return true;
}
+static inline
+bool isEndOfCache( size_t pos, size_t cacheSize ) {
+ return ( pos == cacheSize );
+}
+
template<class T>
inline
bool IOStreamBuffer<T>::getNextLine(std::vector<T> &buffer) {
buffer.resize(m_cacheSize);
- if (m_cachePos == m_cacheSize || 0 == m_filePos) {
+ if ( isEndOfCache( m_cachePos, m_cacheSize ) || 0 == m_filePos) {
if (!readNextBlock()) {
return false;
}
@@ -300,13 +307,18 @@ bool IOStreamBuffer<T>::getNextLine(std::vector<T> &buffer) {
++m_cachePos;
}
++m_cachePos;
+ if ( isEndOfCache( m_cachePos, m_cacheSize ) ) {
+ if ( !readNextBlock() ) {
+ return false;
+ }
+ }
}
- size_t i = 0;
- while (!IsLineEnd(m_cache[m_cachePos])) {
- buffer[i] = m_cache[m_cachePos];
- m_cachePos++;
- i++;
+ size_t i( 0 );
+ while (!IsLineEnd(m_cache[ m_cachePos ])) {
+ buffer[i] = m_cache[ m_cachePos ];
+ ++m_cachePos;
+ ++i;
if (m_cachePos >= m_cacheSize) {
if (!readNextBlock()) {
return false;
@@ -314,7 +326,7 @@ bool IOStreamBuffer<T>::getNextLine(std::vector<T> &buffer) {
}
}
buffer[i] = '\n';
- m_cachePos++;
+ ++m_cachePos;
return true;
}
@@ -322,18 +334,19 @@ bool IOStreamBuffer<T>::getNextLine(std::vector<T> &buffer) {
template<class T>
inline
bool IOStreamBuffer<T>::getNextBlock( std::vector<T> &buffer) {
- //just return the last blockvalue if getNextLine was used before
- if ( m_cachePos != 0) {
- buffer = std::vector<T>(m_cache.begin() + m_cachePos, m_cache.end());
- m_cachePos = 0;
- }
- else {
- if ( !readNextBlock() )
- return false;
+ // Return the last block-value if getNextLine was used before
+ if ( 0 != m_cachePos ) {
+ buffer = std::vector<T>( m_cache.begin() + m_cachePos, m_cache.end() );
+ m_cachePos = 0;
+ } else {
+ if ( !readNextBlock() ) {
+ return false;
+ }
+
+ buffer = std::vector<T>(m_cache.begin(), m_cache.end());
+ }
- buffer = std::vector<T>(m_cache.begin(), m_cache.end());
- }
- return true;
+ return true;
}
} // !ns Assimp
diff --git a/include/assimp/IOSystem.hpp b/include/assimp/IOSystem.hpp
index e7a216e4e..a36e22508 100644
--- a/include/assimp/IOSystem.hpp
+++ b/include/assimp/IOSystem.hpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -56,10 +57,21 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "types.h"
+#ifdef _WIN32
+# include <direct.h>
+# include <stdlib.h>
+# include <stdio.h>
+#else
+# include <sys/stat.h>
+# include <sys/types.h>
+# include <unistd.h>
+#endif // _WIN32
+
#include <vector>
namespace Assimp {
-class IOStream;
+
+ class IOStream;
// ---------------------------------------------------------------------------
/** @brief CPP-API: Interface to the file system.
@@ -83,7 +95,7 @@ public:
* Create an instance of your derived class and assign it to an
* #Assimp::Importer instance by calling Importer::SetIOHandler().
*/
- IOSystem();
+ IOSystem() AI_NO_EXCEPT;
// -------------------------------------------------------------------
/** @brief Virtual destructor.
@@ -93,9 +105,6 @@ public:
*/
virtual ~IOSystem();
-
-public:
-
// -------------------------------------------------------------------
/** @brief For backward compatibility
* @see Exists(const char*)
@@ -198,20 +207,37 @@ public:
*/
virtual bool PopDirectory();
+ // -------------------------------------------------------------------
+ /** @brief CReates an new directory at the given path.
+ * @param path [in] The path to create.
+ * @return True, when a directory was created. False if the directory
+ * cannot be created.
+ */
+ virtual bool CreateDirectory( const std::string &path );
+
+ // -------------------------------------------------------------------
+ /** @brief Will change the current directory to the given path.
+ * @param path [in] The path to change to.
+ * @return True, when the directory has changed successfully.
+ */
+ virtual bool ChangeDirectory( const std::string &path );
+
+ virtual bool DeleteFile( const std::string &file );
+
private:
std::vector<std::string> m_pathStack;
};
// ----------------------------------------------------------------------------
-AI_FORCE_INLINE IOSystem::IOSystem() :
- m_pathStack()
-{
+AI_FORCE_INLINE
+IOSystem::IOSystem() AI_NO_EXCEPT
+: m_pathStack() {
// empty
}
// ----------------------------------------------------------------------------
-AI_FORCE_INLINE IOSystem::~IOSystem()
-{
+AI_FORCE_INLINE
+IOSystem::~IOSystem() {
// empty
}
@@ -222,9 +248,8 @@ AI_FORCE_INLINE IOSystem::~IOSystem()
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
-AI_FORCE_INLINE IOStream* IOSystem::Open(const std::string& pFile,
- const std::string& pMode)
-{
+AI_FORCE_INLINE
+IOStream* IOSystem::Open(const std::string& pFile, const std::string& pMode) {
// NOTE:
// For compatibility, interface was changed to const char* to
// avoid crashes between binary incompatible STL versions
@@ -232,8 +257,8 @@ AI_FORCE_INLINE IOStream* IOSystem::Open(const std::string& pFile,
}
// ----------------------------------------------------------------------------
-AI_FORCE_INLINE bool IOSystem::Exists( const std::string& pFile) const
-{
+AI_FORCE_INLINE
+bool IOSystem::Exists( const std::string& pFile) const {
// NOTE:
// For compatibility, interface was changed to const char* to
// avoid crashes between binary incompatible STL versions
@@ -241,9 +266,8 @@ AI_FORCE_INLINE bool IOSystem::Exists( const std::string& pFile) const
}
// ----------------------------------------------------------------------------
-inline bool IOSystem::ComparePaths (const std::string& one,
- const std::string& second) const
-{
+AI_FORCE_INLINE
+bool IOSystem::ComparePaths (const std::string& one, const std::string& second) const {
// NOTE:
// For compatibility, interface was changed to const char* to
// avoid crashes between binary incompatible STL versions
@@ -251,7 +275,8 @@ inline bool IOSystem::ComparePaths (const std::string& one,
}
// ----------------------------------------------------------------------------
-inline bool IOSystem::PushDirectory( const std::string &path ) {
+AI_FORCE_INLINE
+bool IOSystem::PushDirectory( const std::string &path ) {
if ( path.empty() ) {
return false;
}
@@ -262,7 +287,8 @@ inline bool IOSystem::PushDirectory( const std::string &path ) {
}
// ----------------------------------------------------------------------------
-inline const std::string &IOSystem::CurrentDirectory() const {
+AI_FORCE_INLINE
+const std::string &IOSystem::CurrentDirectory() const {
if ( m_pathStack.empty() ) {
static const std::string Dummy("");
return Dummy;
@@ -271,12 +297,14 @@ inline const std::string &IOSystem::CurrentDirectory() const {
}
// ----------------------------------------------------------------------------
-inline size_t IOSystem::StackSize() const {
+AI_FORCE_INLINE
+size_t IOSystem::StackSize() const {
return m_pathStack.size();
}
// ----------------------------------------------------------------------------
-inline bool IOSystem::PopDirectory() {
+AI_FORCE_INLINE
+bool IOSystem::PopDirectory() {
if ( m_pathStack.empty() ) {
return false;
}
@@ -287,7 +315,43 @@ inline bool IOSystem::PopDirectory() {
}
// ----------------------------------------------------------------------------
+AI_FORCE_INLINE
+bool IOSystem::CreateDirectory( const std::string &path ) {
+ if ( path.empty() ) {
+ return false;
+ }
+
+#ifdef _WIN32
+ return 0 != ::_mkdir( path.c_str() );
+#else
+ return 0 != ::mkdir( path.c_str(), 0777 );
+#endif // _WIN32
+}
+// ----------------------------------------------------------------------------
+AI_FORCE_INLINE
+bool IOSystem::ChangeDirectory( const std::string &path ) {
+ if ( path.empty() ) {
+ return false;
+ }
+
+#ifdef _WIN32
+ return 0 != ::_chdir( path.c_str() );
+#else
+ return 0 != ::chdir( path.c_str() );
+#endif // _WIN32
+}
+
+
+// ----------------------------------------------------------------------------
+AI_FORCE_INLINE
+bool IOSystem::DeleteFile( const std::string &file ) {
+ if ( file.empty() ) {
+ return false;
+ }
+ const int retCode( ::remove( file.c_str() ) );
+ return ( 0 == retCode );
+}
} //!ns Assimp
#endif //AI_IOSYSTEM_H_INC
diff --git a/include/assimp/Importer.hpp b/include/assimp/Importer.hpp
index f42a2deaf..1d1dac19f 100644
--- a/include/assimp/Importer.hpp
+++ b/include/assimp/Importer.hpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -136,7 +137,12 @@ public:
* If this Importer owns a scene it won't be copied.
* Call ReadFile() to start the import process.
*/
- Importer(const Importer& other);
+ Importer(const Importer& other)=delete;
+
+ // -------------------------------------------------------------------
+ /** Assignment operator has been deleted
+ */
+ Importer &operator=(const Importer &) = delete;
// -------------------------------------------------------------------
/** Destructor. The object kept ownership of the imported data,
@@ -324,7 +330,7 @@ public:
// -------------------------------------------------------------------
/** Supplies a custom progress handler to the importer. This
- * interface exposes a #Update() callback, which is called
+ * interface exposes an #Update() callback, which is called
* more or less periodically (please don't sue us if it
* isn't as periodically as you'd like it to have ...).
* This can be used to implement progress bars and loading
diff --git a/code/LineSplitter.h b/include/assimp/LineSplitter.h
index 10ca1d35a..eb6b6e46c 100644
--- a/code/LineSplitter.h
+++ b/include/assimp/LineSplitter.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -43,11 +44,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* @brief LineSplitter, a helper class to iterate through all lines
* of a file easily. Works with StreamReader.
*/
+#pragma once
#ifndef INCLUDED_LINE_SPLITTER_H
#define INCLUDED_LINE_SPLITTER_H
#include <stdexcept>
-
#include "StreamReader.h"
#include "ParsingUtils.h"
@@ -69,179 +70,216 @@ for(LineSplitter splitter(stream);splitter;++splitter) {
std::cout << "Current line is: " << splitter.get_index() << std::endl;
}
-@endcode */
+@endcode
+*/
// ------------------------------------------------------------------------------------------------
-class LineSplitter
-{
+class LineSplitter {
public:
-
typedef size_t line_idx;
-public:
-
// -----------------------------------------
/** construct from existing stream reader
note: trim is *always* assumed true if skyp_empty_lines==true
*/
- LineSplitter(StreamReaderLE& stream, bool skip_empty_lines = true, bool trim = true)
- : idx( 0 )
- , stream(stream)
- , swallow()
- , skip_empty_lines(skip_empty_lines)
- , trim(trim)
- {
- cur.reserve(1024);
- operator++();
-
- idx = 0;
- }
+ LineSplitter(StreamReaderLE& stream, bool skip_empty_lines = true, bool trim = true);
- ~LineSplitter() {
- // empty
- }
-
-public:
+ ~LineSplitter();
// -----------------------------------------
/** pseudo-iterator increment */
- LineSplitter& operator++() {
- if(swallow) {
- swallow = false;
- return *this;
- }
- if (!*this) {
- throw std::logic_error("End of file, no more lines to be retrieved.");
- }
- char s;
- cur.clear();
- while(stream.GetRemainingSize() && (s = stream.GetI1(),1)) {
- if (s == '\n' || s == '\r') {
- if (skip_empty_lines) {
- while (stream.GetRemainingSize() && ((s = stream.GetI1()) == ' ' || s == '\r' || s == '\n'));
- if (stream.GetRemainingSize()) {
- stream.IncPtr(-1);
- }
- }
- else {
- // skip both potential line terminators but don't read past this line.
- if (stream.GetRemainingSize() && (s == '\r' && stream.GetI1() != '\n')) {
- stream.IncPtr(-1);
- }
- if (trim) {
- while (stream.GetRemainingSize() && ((s = stream.GetI1()) == ' ' || s == '\t'));
- if (stream.GetRemainingSize()) {
- stream.IncPtr(-1);
- }
- }
- }
- break;
- }
- cur += s;
- }
- ++idx;
- return *this;
- }
+ LineSplitter& operator++();
// -----------------------------------------
- LineSplitter& operator++(int) {
- return ++(*this);
- }
+ LineSplitter& operator++(int);
// -----------------------------------------
/** get a pointer to the beginning of a particular token */
- const char* operator[] (size_t idx) const {
- const char* s = operator->()->c_str();
-
- SkipSpaces(&s);
- for(size_t i = 0; i < idx; ++i) {
-
- for(;!IsSpace(*s); ++s) {
- if(IsLineEnd(*s)) {
- throw std::range_error("Token index out of range, EOL reached");
- }
- }
- SkipSpaces(&s);
- }
- return s;
- }
+ const char* operator[] (size_t idx) const;
// -----------------------------------------
/** extract the start positions of N tokens from the current line*/
template <size_t N>
- void get_tokens(const char* (&tokens)[N]) const {
- const char* s = operator->()->c_str();
-
- SkipSpaces(&s);
- for(size_t i = 0; i < N; ++i) {
- if(IsLineEnd(*s)) {
-
- throw std::range_error("Token count out of range, EOL reached");
-
- }
- tokens[i] = s;
-
- for(;*s && !IsSpace(*s); ++s);
- SkipSpaces(&s);
- }
- }
+ void get_tokens(const char* (&tokens)[N]) const;
// -----------------------------------------
/** member access */
- const std::string* operator -> () const {
- return &cur;
- }
+ const std::string* operator -> () const;
- std::string operator* () const {
- return cur;
- }
+ std::string operator* () const;
// -----------------------------------------
/** boolean context */
- operator bool() const {
- return stream.GetRemainingSize()>0;
- }
+ operator bool() const;
// -----------------------------------------
/** line indices are zero-based, empty lines are included */
- operator line_idx() const {
- return idx;
- }
+ operator line_idx() const;
- line_idx get_index() const {
- return idx;
- }
+ line_idx get_index() const;
// -----------------------------------------
/** access the underlying stream object */
- StreamReaderLE& get_stream() {
- return stream;
- }
+ StreamReaderLE& get_stream();
// -----------------------------------------
/** !strcmp((*this)->substr(0,strlen(check)),check) */
- bool match_start(const char* check) {
- const size_t len = strlen(check);
-
- return len <= cur.length() && std::equal(check,check+len,cur.begin());
- }
-
+ bool match_start(const char* check);
// -----------------------------------------
/** swallow the next call to ++, return the previous value. */
- void swallow_next_increment() {
- swallow = true;
- }
+ void swallow_next_increment();
-private:
- LineSplitter( const LineSplitter & );
- LineSplitter &operator = ( const LineSplitter & );
+ LineSplitter( const LineSplitter & ) = delete;
+ LineSplitter(LineSplitter &&) = delete;
+ LineSplitter &operator = ( const LineSplitter & ) = delete;
private:
- line_idx idx;
- std::string cur;
- StreamReaderLE& stream;
- bool swallow, skip_empty_lines, trim;
+ line_idx mIdx;
+ std::string mCur;
+ StreamReaderLE& mStream;
+ bool mSwallow, mSkip_empty_lines, mTrim;
};
+inline
+LineSplitter::LineSplitter(StreamReaderLE& stream, bool skip_empty_lines, bool trim )
+: mIdx(0)
+, mCur()
+, mStream(stream)
+, mSwallow()
+, mSkip_empty_lines(skip_empty_lines)
+, mTrim(trim) {
+ mCur.reserve(1024);
+ operator++();
+ mIdx = 0;
}
+
+inline
+LineSplitter::~LineSplitter() {
+ // empty
+}
+
+inline
+LineSplitter& LineSplitter::operator++() {
+ if (mSwallow) {
+ mSwallow = false;
+ return *this;
+ }
+
+ if (!*this) {
+ throw std::logic_error("End of file, no more lines to be retrieved.");
+ }
+
+ char s;
+ mCur.clear();
+ while (mStream.GetRemainingSize() && (s = mStream.GetI1(), 1)) {
+ if (s == '\n' || s == '\r') {
+ if (mSkip_empty_lines) {
+ while (mStream.GetRemainingSize() && ((s = mStream.GetI1()) == ' ' || s == '\r' || s == '\n'));
+ if (mStream.GetRemainingSize()) {
+ mStream.IncPtr(-1);
+ }
+ } else {
+ // skip both potential line terminators but don't read past this line.
+ if (mStream.GetRemainingSize() && (s == '\r' && mStream.GetI1() != '\n')) {
+ mStream.IncPtr(-1);
+ }
+ if (mTrim) {
+ while (mStream.GetRemainingSize() && ((s = mStream.GetI1()) == ' ' || s == '\t'));
+ if (mStream.GetRemainingSize()) {
+ mStream.IncPtr(-1);
+ }
+ }
+ }
+ break;
+ }
+ mCur += s;
+ }
+ ++mIdx;
+
+ return *this;
+}
+
+inline
+LineSplitter &LineSplitter::operator++(int) {
+ return ++(*this);
+}
+
+inline
+const char *LineSplitter::operator[] (size_t idx) const {
+ const char* s = operator->()->c_str();
+
+ SkipSpaces(&s);
+ for (size_t i = 0; i < idx; ++i) {
+
+ for (; !IsSpace(*s); ++s) {
+ if (IsLineEnd(*s)) {
+ throw std::range_error("Token index out of range, EOL reached");
+ }
+ }
+ SkipSpaces(&s);
+ }
+ return s;
+}
+
+template <size_t N>
+inline
+void LineSplitter::get_tokens(const char* (&tokens)[N]) const {
+ const char* s = operator->()->c_str();
+
+ SkipSpaces(&s);
+ for (size_t i = 0; i < N; ++i) {
+ if (IsLineEnd(*s)) {
+ throw std::range_error("Token count out of range, EOL reached");
+ }
+ tokens[i] = s;
+
+ for (; *s && !IsSpace(*s); ++s);
+ SkipSpaces(&s);
+ }
+}
+
+inline
+const std::string* LineSplitter::operator -> () const {
+ return &mCur;
+}
+
+inline
+std::string LineSplitter::operator* () const {
+ return mCur;
+}
+
+inline
+LineSplitter::operator bool() const {
+ return mStream.GetRemainingSize() > 0;
+}
+
+inline
+LineSplitter::operator line_idx() const {
+ return mIdx;
+}
+
+inline
+LineSplitter::line_idx LineSplitter::get_index() const {
+ return mIdx;
+}
+
+inline
+StreamReaderLE &LineSplitter::get_stream() {
+ return mStream;
+}
+
+inline
+bool LineSplitter::match_start(const char* check) {
+ const size_t len = ::strlen(check);
+
+ return len <= mCur.length() && std::equal(check, check + len, mCur.begin());
+}
+
+inline
+void LineSplitter::swallow_next_increment() {
+ mSwallow = true;
+}
+
+} // Namespace Assimp
+
#endif // INCLUDED_LINE_SPLITTER_H
diff --git a/code/LogAux.h b/include/assimp/LogAux.h
index 432da5cd5..cf6d50014 100644
--- a/code/LogAux.h
+++ b/include/assimp/LogAux.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -45,49 +46,46 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef INCLUDED_AI_LOGAUX_H
#define INCLUDED_AI_LOGAUX_H
-#include "TinyFormatter.h"
-#include "Exceptional.h"
+#include <assimp/TinyFormatter.h>
+#include <assimp/Exceptional.h>
#include <assimp/DefaultLogger.hpp>
namespace Assimp {
-template <class TDeriving>
-class LogFunctions
-{
-
+template<class TDeriving>
+class LogFunctions {
public:
-
// ------------------------------------------------------------------------------------------------
static void ThrowException(const std::string& msg)
{
- throw DeadlyImportError(log_prefix+msg);
+ throw DeadlyImportError(Prefix()+msg);
}
// ------------------------------------------------------------------------------------------------
static void LogWarn(const Formatter::format& message) {
if (!DefaultLogger::isNullLogger()) {
- DefaultLogger::get()->warn(log_prefix+(std::string)message);
+ ASSIMP_LOG_WARN(Prefix()+(std::string)message);
}
}
// ------------------------------------------------------------------------------------------------
static void LogError(const Formatter::format& message) {
if (!DefaultLogger::isNullLogger()) {
- DefaultLogger::get()->error(log_prefix+(std::string)message);
+ ASSIMP_LOG_ERROR(Prefix()+(std::string)message);
}
}
// ------------------------------------------------------------------------------------------------
static void LogInfo(const Formatter::format& message) {
if (!DefaultLogger::isNullLogger()) {
- DefaultLogger::get()->info(log_prefix+(std::string)message);
+ ASSIMP_LOG_INFO(Prefix()+(std::string)message);
}
}
// ------------------------------------------------------------------------------------------------
static void LogDebug(const Formatter::format& message) {
if (!DefaultLogger::isNullLogger()) {
- DefaultLogger::get()->debug(log_prefix+(std::string)message);
+ ASSIMP_LOG_DEBUG(Prefix()+(std::string)message);
}
}
@@ -125,10 +123,9 @@ public:
#endif
private:
-
- static const std::string log_prefix;
+ static const char* Prefix();
};
-
} // ! Assimp
+
#endif
diff --git a/include/assimp/LogStream.hpp b/include/assimp/LogStream.hpp
index 049640ec0..e0eb8d505 100644
--- a/include/assimp/LogStream.hpp
+++ b/include/assimp/LogStream.hpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -64,12 +65,11 @@ class ASSIMP_API LogStream
{
protected:
/** @brief Default constructor */
- LogStream() {
- }
+ LogStream() AI_NO_EXCEPT;
+
public:
/** @brief Virtual destructor */
- virtual ~LogStream() {
- }
+ virtual ~LogStream();
// -------------------------------------------------------------------
/** @brief Overwrite this for your own output methods
@@ -91,9 +91,20 @@ public:
* @return New LogStream instance. */
static LogStream* createDefaultStream(aiDefaultLogStream stream,
const char* name = "AssimpLog.txt",
- IOSystem* io = NULL);
+ IOSystem* io = nullptr );
}; // !class LogStream
+
+inline
+LogStream::LogStream() AI_NO_EXCEPT {
+ // empty
+}
+
+inline
+LogStream::~LogStream() {
+ // empty
+}
+
// ------------------------------------------------------------------------------------
} // Namespace Assimp
diff --git a/include/assimp/Logger.hpp b/include/assimp/Logger.hpp
index 0875b6d7d..6a9928735 100644
--- a/include/assimp/Logger.hpp
+++ b/include/assimp/Logger.hpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -45,7 +46,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef INCLUDED_AI_LOGGER_H
#define INCLUDED_AI_LOGGER_H
-#include "types.h"
+#include <assimp/types.h>
+#include <assimp/TinyFormatter.h>
namespace Assimp {
@@ -58,7 +60,7 @@ class LogStream;
/** @brief CPP-API: Abstract interface for logger implementations.
* Assimp provides a default implementation and uses it for almost all
* logging stuff ('DefaultLogger'). This class defines just basic logging
- * behaviour and is not of interest for you. Instead, take a look at #DefaultLogger. */
+ * behavior and is not of interest for you. Instead, take a look at #DefaultLogger. */
class ASSIMP_API Logger
#ifndef SWIG
: public Intern::AllocateFromAssimpHeap
@@ -70,8 +72,7 @@ public:
/** @enum LogSeverity
* @brief Log severity to describe the granularity of logging.
*/
- enum LogSeverity
- {
+ enum LogSeverity {
NORMAL, //!< Normal granularity of logging
VERBOSE //!< Debug infos will be logged, too
};
@@ -84,8 +85,7 @@ public:
* A LogStream doesn't receive any messages of a specific type
* if it doesn't specify the corresponding ErrorSeverity flag.
*/
- enum ErrorSeverity
- {
+ enum ErrorSeverity {
Debugging = 1, //!< Debug log message
Info = 2, //!< Info log message
Warn = 4, //!< Warn log message
@@ -101,25 +101,25 @@ public:
/** @brief Writes a debug message
* @param message Debug message*/
void debug(const char* message);
- inline void debug(const std::string &message);
+ void debug(const std::string &message);
// ----------------------------------------------------------------------
/** @brief Writes a info message
* @param message Info message*/
void info(const char* message);
- inline void info(const std::string &message);
+ void info(const std::string &message);
// ----------------------------------------------------------------------
/** @brief Writes a warning message
* @param message Warn message*/
void warn(const char* message);
- inline void warn(const std::string &message);
+ void warn(const std::string &message);
// ----------------------------------------------------------------------
/** @brief Writes an error message
* @param message Error message*/
void error(const char* message);
- inline void error(const std::string &message);
+ void error(const std::string &message);
// ----------------------------------------------------------------------
/** @brief Set a new log severity.
@@ -158,15 +158,19 @@ public:
unsigned int severity = Debugging | Err | Warn | Info) = 0;
protected:
+ /**
+ * Default constructor
+ */
+ Logger() AI_NO_EXCEPT;
- /** Default constructor */
- Logger();
-
- /** Construction with a given log severity */
+ /**
+ * Construction with a given log severity
+ */
explicit Logger(LogSeverity severity);
// ----------------------------------------------------------------------
- /** @brief Called as a request to write a specific debug message
+ /**
+ * @brief Called as a request to write a specific debug message
* @param message Debug message. Never longer than
* MAX_LOG_MESSAGE_LENGTH characters (excluding the '0').
* @note The message string is only valid until the scope of
@@ -175,7 +179,8 @@ protected:
virtual void OnDebug(const char* message)= 0;
// ----------------------------------------------------------------------
- /** @brief Called as a request to write a specific info message
+ /**
+ * @brief Called as a request to write a specific info message
* @param message Info message. Never longer than
* MAX_LOG_MESSAGE_LENGTH characters (ecxluding the '0').
* @note The message string is only valid until the scope of
@@ -184,7 +189,8 @@ protected:
virtual void OnInfo(const char* message) = 0;
// ----------------------------------------------------------------------
- /** @brief Called as a request to write a specific warn message
+ /**
+ * @brief Called as a request to write a specific warn message
* @param message Warn message. Never longer than
* MAX_LOG_MESSAGE_LENGTH characters (exluding the '0').
* @note The message string is only valid until the scope of
@@ -193,7 +199,8 @@ protected:
virtual void OnWarn(const char* essage) = 0;
// ----------------------------------------------------------------------
- /** @brief Called as a request to write a specific error message
+ /**
+ * @brief Called as a request to write a specific error message
* @param message Error message. Never longer than
* MAX_LOG_MESSAGE_LENGTH characters (exluding the '0').
* @note The message string is only valid until the scope of
@@ -202,66 +209,96 @@ protected:
virtual void OnError(const char* message) = 0;
protected:
-
- //! Logger severity
LogSeverity m_Severity;
};
// ----------------------------------------------------------------------------------
// Default constructor
-inline Logger::Logger() {
- setLogSeverity(NORMAL);
+inline
+Logger::Logger() AI_NO_EXCEPT
+: m_Severity(NORMAL) {
+ // empty
}
// ----------------------------------------------------------------------------------
// Virtual destructor
-inline Logger::~Logger()
-{
+inline
+Logger::~Logger() {
+ // empty
}
// ----------------------------------------------------------------------------------
// Construction with given logging severity
-inline Logger::Logger(LogSeverity severity) {
- setLogSeverity(severity);
+inline
+Logger::Logger(LogSeverity severity)
+: m_Severity(severity) {
+ // empty
}
// ----------------------------------------------------------------------------------
// Log severity setter
-inline void Logger::setLogSeverity(LogSeverity log_severity){
+inline
+void Logger::setLogSeverity(LogSeverity log_severity){
m_Severity = log_severity;
}
// ----------------------------------------------------------------------------------
// Log severity getter
-inline Logger::LogSeverity Logger::getLogSeverity() const {
+inline
+Logger::LogSeverity Logger::getLogSeverity() const {
return m_Severity;
}
// ----------------------------------------------------------------------------------
-inline void Logger::debug(const std::string &message)
-{
+inline
+void Logger::debug(const std::string &message) {
return debug(message.c_str());
}
// ----------------------------------------------------------------------------------
-inline void Logger::error(const std::string &message)
-{
+inline
+void Logger::error(const std::string &message) {
return error(message.c_str());
}
// ----------------------------------------------------------------------------------
-inline void Logger::warn(const std::string &message)
-{
+inline
+void Logger::warn(const std::string &message) {
return warn(message.c_str());
}
// ----------------------------------------------------------------------------------
-inline void Logger::info(const std::string &message)
-{
+inline
+void Logger::info(const std::string &message) {
return info(message.c_str());
}
-// ----------------------------------------------------------------------------------
+// ------------------------------------------------------------------------------------------------
+#define ASSIMP_LOG_WARN_F(string,...)\
+ DefaultLogger::get()->warn((Formatter::format(string),__VA_ARGS__))
+
+#define ASSIMP_LOG_ERROR_F(string,...)\
+ DefaultLogger::get()->error((Formatter::format(string),__VA_ARGS__))
+
+#define ASSIMP_LOG_DEBUG_F(string,...)\
+ DefaultLogger::get()->debug((Formatter::format(string),__VA_ARGS__))
+
+#define ASSIMP_LOG_INFO_F(string,...)\
+ DefaultLogger::get()->info((Formatter::format(string),__VA_ARGS__))
+
+
+#define ASSIMP_LOG_WARN(string)\
+ DefaultLogger::get()->warn(string)
+
+#define ASSIMP_LOG_ERROR(string)\
+ DefaultLogger::get()->error(string)
+
+#define ASSIMP_LOG_DEBUG(string)\
+ DefaultLogger::get()->debug(string)
+
+#define ASSIMP_LOG_INFO(string)\
+ DefaultLogger::get()->info(string)
+
} // Namespace Assimp
diff --git a/code/Macros.h b/include/assimp/Macros.h
index 4a2d07569..3aaed4e97 100644
--- a/code/Macros.h
+++ b/include/assimp/Macros.h
@@ -3,7 +3,7 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2012, assimp team
+Copyright (c) 2006-2018, assimp team
All rights reserved.
diff --git a/code/MathFunctions.h b/include/assimp/MathFunctions.h
index cb3b69607..cb3b69607 100644
--- a/code/MathFunctions.h
+++ b/include/assimp/MathFunctions.h
diff --git a/code/MemoryIOWrapper.h b/include/assimp/MemoryIOWrapper.h
index 9bd245337..5260cb2b2 100644
--- a/code/MemoryIOWrapper.h
+++ b/include/assimp/MemoryIOWrapper.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -79,7 +80,9 @@ public:
// -------------------------------------------------------------------
// Read from stream
size_t Read(void* pvBuffer, size_t pSize, size_t pCount) {
- const size_t cnt = std::min(pCount,(length-pos)/pSize),ofs = pSize*cnt;
+ ai_assert(pvBuffer);
+ ai_assert(pSize);
+ const size_t cnt = std::min(pCount,(length-pos)/pSize), ofs = pSize*cnt;
memcpy(pvBuffer,buffer+pos,ofs);
pos += ofs;
@@ -98,19 +101,19 @@ public:
// Seek specific position
aiReturn Seek(size_t pOffset, aiOrigin pOrigin) {
if (aiOrigin_SET == pOrigin) {
- if (pOffset >= length) {
+ if (pOffset > length) {
return AI_FAILURE;
}
pos = pOffset;
}
else if (aiOrigin_END == pOrigin) {
- if (pOffset >= length) {
+ if (pOffset > length) {
return AI_FAILURE;
}
pos = length-pOffset;
}
else {
- if (pOffset+pos >= length) {
+ if (pOffset+pos > length) {
return AI_FAILURE;
}
pos += pOffset;
diff --git a/include/assimp/NullLogger.hpp b/include/assimp/NullLogger.hpp
index 191db1aaa..776f301ab 100644
--- a/include/assimp/NullLogger.hpp
+++ b/include/assimp/NullLogger.hpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/ParsingUtils.h b/include/assimp/ParsingUtils.h
index 7da664374..4553072db 100644
--- a/code/ParsingUtils.h
+++ b/include/assimp/ParsingUtils.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -65,56 +66,57 @@ static const unsigned int BufferSize = 4096;
// ---------------------------------------------------------------------------------
template <class char_t>
-AI_FORCE_INLINE char_t ToLower( char_t in)
-{
+AI_FORCE_INLINE
+char_t ToLower( char_t in ) {
return (in >= (char_t)'A' && in <= (char_t)'Z') ? (char_t)(in+0x20) : in;
}
// ---------------------------------------------------------------------------------
template <class char_t>
-AI_FORCE_INLINE char_t ToUpper( char_t in) {
+AI_FORCE_INLINE
+char_t ToUpper( char_t in) {
return (in >= (char_t)'a' && in <= (char_t)'z') ? (char_t)(in-0x20) : in;
}
// ---------------------------------------------------------------------------------
template <class char_t>
-AI_FORCE_INLINE bool IsUpper( char_t in)
-{
+AI_FORCE_INLINE
+bool IsUpper( char_t in) {
return (in >= (char_t)'A' && in <= (char_t)'Z');
}
// ---------------------------------------------------------------------------------
template <class char_t>
-AI_FORCE_INLINE bool IsLower( char_t in)
-{
+AI_FORCE_INLINE
+bool IsLower( char_t in) {
return (in >= (char_t)'a' && in <= (char_t)'z');
}
// ---------------------------------------------------------------------------------
template <class char_t>
-AI_FORCE_INLINE bool IsSpace( char_t in)
-{
+AI_FORCE_INLINE
+bool IsSpace( char_t in) {
return (in == (char_t)' ' || in == (char_t)'\t');
}
// ---------------------------------------------------------------------------------
template <class char_t>
-AI_FORCE_INLINE bool IsLineEnd( char_t in)
-{
+AI_FORCE_INLINE
+bool IsLineEnd( char_t in) {
return (in==(char_t)'\r'||in==(char_t)'\n'||in==(char_t)'\0'||in==(char_t)'\f');
}
// ---------------------------------------------------------------------------------
template <class char_t>
-AI_FORCE_INLINE bool IsSpaceOrNewLine( char_t in)
-{
+AI_FORCE_INLINE
+bool IsSpaceOrNewLine( char_t in) {
return IsSpace<char_t>(in) || IsLineEnd<char_t>(in);
}
// ---------------------------------------------------------------------------------
template <class char_t>
-AI_FORCE_INLINE bool SkipSpaces( const char_t* in, const char_t** out)
-{
+AI_FORCE_INLINE
+bool SkipSpaces( const char_t* in, const char_t** out) {
while( *in == ( char_t )' ' || *in == ( char_t )'\t' ) {
++in;
}
@@ -124,15 +126,15 @@ AI_FORCE_INLINE bool SkipSpaces( const char_t* in, const char_t** out)
// ---------------------------------------------------------------------------------
template <class char_t>
-AI_FORCE_INLINE bool SkipSpaces( const char_t** inout)
-{
+AI_FORCE_INLINE
+bool SkipSpaces( const char_t** inout) {
return SkipSpaces<char_t>(*inout,inout);
}
// ---------------------------------------------------------------------------------
template <class char_t>
-AI_FORCE_INLINE bool SkipLine( const char_t* in, const char_t** out)
-{
+AI_FORCE_INLINE
+bool SkipLine( const char_t* in, const char_t** out) {
while( *in != ( char_t )'\r' && *in != ( char_t )'\n' && *in != ( char_t )'\0' ) {
++in;
}
@@ -147,15 +149,15 @@ AI_FORCE_INLINE bool SkipLine( const char_t* in, const char_t** out)
// ---------------------------------------------------------------------------------
template <class char_t>
-AI_FORCE_INLINE bool SkipLine( const char_t** inout)
-{
+AI_FORCE_INLINE
+bool SkipLine( const char_t** inout) {
return SkipLine<char_t>(*inout,inout);
}
// ---------------------------------------------------------------------------------
template <class char_t>
-AI_FORCE_INLINE bool SkipSpacesAndLineEnd( const char_t* in, const char_t** out)
-{
+AI_FORCE_INLINE
+bool SkipSpacesAndLineEnd( const char_t* in, const char_t** out) {
while( *in == ( char_t )' ' || *in == ( char_t )'\t' || *in == ( char_t )'\r' || *in == ( char_t )'\n' ) {
++in;
}
@@ -165,15 +167,15 @@ AI_FORCE_INLINE bool SkipSpacesAndLineEnd( const char_t* in, const char_t** out)
// ---------------------------------------------------------------------------------
template <class char_t>
-AI_FORCE_INLINE bool SkipSpacesAndLineEnd( const char_t** inout)
-{
+AI_FORCE_INLINE
+bool SkipSpacesAndLineEnd( const char_t** inout) {
return SkipSpacesAndLineEnd<char_t>(*inout,inout);
}
// ---------------------------------------------------------------------------------
template <class char_t>
-AI_FORCE_INLINE bool GetNextLine( const char_t*& buffer, char_t out[ BufferSize ] )
-{
+AI_FORCE_INLINE
+bool GetNextLine( const char_t*& buffer, char_t out[ BufferSize ] ) {
if( ( char_t )'\0' == *buffer ) {
return false;
}
@@ -201,7 +203,8 @@ AI_FORCE_INLINE bool IsNumeric( char_t in)
// ---------------------------------------------------------------------------------
template <class char_t>
-AI_FORCE_INLINE bool TokenMatch(char_t*& in, const char* token, unsigned int len)
+AI_FORCE_INLINE
+bool TokenMatch(char_t*& in, const char* token, unsigned int len)
{
if (!::strncmp(token,in,len) && IsSpaceOrNewLine(in[len])) {
if (in[len] != '\0') {
@@ -221,26 +224,32 @@ AI_FORCE_INLINE bool TokenMatch(char_t*& in, const char* token, unsigned int len
* @param token Token to check for
* @param len Number of characters to check
*/
-AI_FORCE_INLINE bool TokenMatchI(const char*& in, const char* token, unsigned int len)
-{
+AI_FORCE_INLINE
+bool TokenMatchI(const char*& in, const char* token, unsigned int len) {
if (!ASSIMP_strincmp(token,in,len) && IsSpaceOrNewLine(in[len])) {
in += len+1;
return true;
}
return false;
}
+
// ---------------------------------------------------------------------------------
-AI_FORCE_INLINE void SkipToken(const char*& in)
-{
+AI_FORCE_INLINE
+void SkipToken(const char*& in) {
SkipSpaces(&in);
- while (!IsSpaceOrNewLine(*in))++in;
+ while ( !IsSpaceOrNewLine( *in ) ) {
+ ++in;
+ }
}
+
// ---------------------------------------------------------------------------------
-AI_FORCE_INLINE std::string GetNextToken(const char*& in)
-{
+AI_FORCE_INLINE
+std::string GetNextToken(const char*& in) {
SkipSpacesAndLineEnd(&in);
const char* cur = in;
- while (!IsSpaceOrNewLine(*in))++in;
+ while ( !IsSpaceOrNewLine( *in ) ) {
+ ++in;
+ }
return std::string(cur,(size_t)(in-cur));
}
diff --git a/code/Profiler.h b/include/assimp/Profiler.h
index 40d436b52..da5af2726 100644
--- a/code/Profiler.h
+++ b/include/assimp/Profiler.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -52,28 +53,26 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <map>
namespace Assimp {
- namespace Profiling {
-
- using namespace Formatter;
+namespace Profiling {
+using namespace Formatter;
// ------------------------------------------------------------------------------------------------
/** Simple wrapper around boost::timer to simplify reporting. Timings are automatically
* dumped to the log file.
*/
-class Profiler
-{
-
+class Profiler {
public:
-
- Profiler() {}
+ Profiler() {
+ // empty
+ }
public:
/** Start a named timer */
void BeginRegion(const std::string& region) {
regions[region] = std::chrono::system_clock::now();
- DefaultLogger::get()->debug((format("START `"),region,"`"));
+ ASSIMP_LOG_DEBUG((format("START `"),region,"`"));
}
@@ -84,17 +83,17 @@ public:
return;
}
- auto elapsedSeconds = std::chrono::system_clock::now() - regions[region];
- DefaultLogger::get()->debug((format("END `"),region,"`, dt= ", elapsedSeconds.count()," s"));
+ std::chrono::duration<double> elapsedSeconds = std::chrono::system_clock::now() - regions[region];
+ ASSIMP_LOG_DEBUG((format("END `"),region,"`, dt= ", elapsedSeconds.count()," s"));
}
private:
-
typedef std::map<std::string,std::chrono::time_point<std::chrono::system_clock>> RegionMap;
RegionMap regions;
};
- }
+}
}
#endif
+
diff --git a/include/assimp/ProgressHandler.hpp b/include/assimp/ProgressHandler.hpp
index 2c5b2f4c5..f295eac39 100644
--- a/include/assimp/ProgressHandler.hpp
+++ b/include/assimp/ProgressHandler.hpp
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -61,11 +62,13 @@ class ASSIMP_API ProgressHandler
#endif
{
protected:
- /** @brief Default constructor */
- ProgressHandler () {
+ /// @brief Default constructor
+ ProgressHandler () AI_NO_EXCEPT {
+ // empty
}
+
public:
- /** @brief Virtual destructor */
+ /// @brief Virtual destructor.
virtual ~ProgressHandler () {
}
@@ -119,8 +122,24 @@ public:
Update( f * 0.5f + 0.5f );
}
+
+ // -------------------------------------------------------------------
+ /** @brief Progress callback for export steps.
+ * @param numberOfSteps The number of total processing
+ * steps
+ * @param currentStep The index of the current post-processing
+ * step that will run, or equal to numberOfSteps if all of
+ * them has finished. This number is always strictly monotone
+ * increasing, although not necessarily linearly.
+ * */
+ virtual void UpdateFileWrite(int currentStep /*= 0*/, int numberOfSteps /*= 0*/) {
+ float f = numberOfSteps ? currentStep / (float)numberOfSteps : 1.0f;
+ Update(f * 0.5f);
+ }
}; // !class ProgressHandler
+
// ------------------------------------------------------------------------------------
+
} // Namespace Assimp
#endif // AI_PROGRESSHANDLER_H_INC
diff --git a/code/RemoveComments.h b/include/assimp/RemoveComments.h
index 0a00a8f0f..08299f22b 100644
--- a/code/RemoveComments.h
+++ b/include/assimp/RemoveComments.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/SGSpatialSort.h b/include/assimp/SGSpatialSort.h
index e7cd38724..3c95d0b51 100644
--- a/code/SGSpatialSort.h
+++ b/include/assimp/SGSpatialSort.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -57,7 +58,7 @@ namespace Assimp {
* implementation to handle all details of its file format correctly.
*/
// ----------------------------------------------------------------------------------
-class SGSpatialSort
+class ASSIMP_API SGSpatialSort
{
public:
@@ -110,26 +111,34 @@ protected:
// -------------------------------------------------------------------
/** An entry in a spatially sorted position array. Consists of a
- * vertex index, its position and its precalculated distance from
+ * vertex index, its position and its pre-calculated distance from
* the reference plane */
// -------------------------------------------------------------------
- struct Entry
- {
+ struct Entry {
unsigned int mIndex; ///< The vertex referred by this entry
aiVector3D mPosition; ///< Position
uint32_t mSmoothGroups;
float mDistance; ///< Distance of this vertex to the sorting plane
- Entry() { /** intentionally not initialized.*/ }
+ Entry() AI_NO_EXCEPT
+ : mIndex(0)
+ , mPosition()
+ , mSmoothGroups(0)
+ , mDistance(0.0f) {
+ // empty
+ }
+
Entry( unsigned int pIndex, const aiVector3D& pPosition, float pDistance,uint32_t pSG)
- :
- mIndex( pIndex),
- mPosition( pPosition),
- mSmoothGroups (pSG),
- mDistance( pDistance)
- { }
-
- bool operator < (const Entry& e) const { return mDistance < e.mDistance; }
+ : mIndex( pIndex)
+ , mPosition( pPosition)
+ , mSmoothGroups(pSG)
+ , mDistance( pDistance) {
+ // empty
+ }
+
+ bool operator < (const Entry& e) const {
+ return mDistance < e.mDistance;
+ }
};
// all positions, sorted by distance to the sorting plane
diff --git a/include/assimp/SceneCombiner.h b/include/assimp/SceneCombiner.h
index ca4e68c7f..ec2788245 100644
--- a/include/assimp/SceneCombiner.h
+++ b/include/assimp/SceneCombiner.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -197,13 +198,17 @@ struct SceneHelper
* The class is currently being used by various postprocessing steps
* and loaders (ie. LWS).
*/
-class ASSIMP_API SceneCombiner
-{
+class ASSIMP_API SceneCombiner {
// class cannot be instanced
- SceneCombiner() {}
+ SceneCombiner() {
+ // empty
+ }
-public:
+ ~SceneCombiner() {
+ // empty
+ }
+public:
// -------------------------------------------------------------------
/** Merges two or more scenes.
*
@@ -217,10 +222,9 @@ public:
static void MergeScenes(aiScene** dest,std::vector<aiScene*>& src,
unsigned int flags = 0);
-
// -------------------------------------------------------------------
- /** Merges two or more scenes and attaches all sceenes to a specific
- * position in the node graph of the masteer scene.
+ /** Merges two or more scenes and attaches all scenes to a specific
+ * position in the node graph of the master scene.
*
* @param dest Receives a pointer to the destination scene. If the
* pointer doesn't point to NULL when the function is called, the
@@ -236,7 +240,6 @@ public:
std::vector<AttachmentInfo>& src,
unsigned int flags = 0);
-
// -------------------------------------------------------------------
/** Merges two or more meshes
*
@@ -255,7 +258,6 @@ public:
std::vector<aiMesh*>::const_iterator begin,
std::vector<aiMesh*>::const_iterator end);
-
// -------------------------------------------------------------------
/** Merges two or more bones
*
diff --git a/code/SkeletonMeshBuilder.h b/include/assimp/SkeletonMeshBuilder.h
index 7a7e7b8ff..993d9c84d 100644
--- a/code/SkeletonMeshBuilder.h
+++ b/include/assimp/SkeletonMeshBuilder.h
@@ -4,7 +4,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -64,7 +65,7 @@ namespace Assimp {
* the resembles the node hierarchy. This is useful for file formats
* that don't carry any mesh data but only animation data.
*/
-class SkeletonMeshBuilder
+class ASSIMP_API SkeletonMeshBuilder
{
public:
diff --git a/code/SmoothingGroups.h b/include/assimp/SmoothingGroups.h
index 7a7e2e429..88345c66a 100644
--- a/code/SmoothingGroups.h
+++ b/include/assimp/SmoothingGroups.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -51,12 +52,10 @@ http://www.jalix.org/ressources/graphics/3DS/_unofficials/3ds-unofficial.txt */
// ---------------------------------------------------------------------------
/** Helper structure representing a face with smoothing groups assigned */
-struct FaceWithSmoothingGroup
-{
- FaceWithSmoothingGroup()
- : mIndices(),
- iSmoothGroup(0)
- {
+struct FaceWithSmoothingGroup {
+ FaceWithSmoothingGroup() AI_NO_EXCEPT
+ : mIndices()
+ , iSmoothGroup(0) {
// in debug builds set all indices to a common magic value
#ifdef ASSIMP_BUILD_DEBUG
this->mIndices[0] = 0xffffffff;
diff --git a/code/SmoothingGroups.inl b/include/assimp/SmoothingGroups.inl
index 42c500070..84ea4a1b0 100644
--- a/code/SmoothingGroups.inl
+++ b/include/assimp/SmoothingGroups.inl
@@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define AI_SMOOTHINGGROUPS_INL_INCLUDED
// internal headers
-#include "SGSpatialSort.h"
+#include <assimp/SGSpatialSort.h>
// CRT header
#include <algorithm>
diff --git a/code/SpatialSort.h b/include/assimp/SpatialSort.h
index 36b7a2767..8fb450841 100644
--- a/code/SpatialSort.h
+++ b/include/assimp/SpatialSort.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -46,8 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <vector>
#include <assimp/types.h>
-namespace Assimp
-{
+namespace Assimp {
// ------------------------------------------------------------------------------------------------
/** A little helper class to quickly find all vertices in the epsilon environment of a given
@@ -57,7 +57,7 @@ namespace Assimp
* time, with O(n) worst case complexity when all vertices lay on the plane. The plane is chosen
* so that it avoids common planes in usual data sets. */
// ------------------------------------------------------------------------------------------------
-class SpatialSort
+class ASSIMP_API SpatialSort
{
public:
@@ -147,17 +147,20 @@ protected:
aiVector3D mPlaneNormal;
/** An entry in a spatially sorted position array. Consists of a vertex index,
- * its position and its precalculated distance from the reference plane */
- struct Entry
- {
+ * its position and its pre-calculated distance from the reference plane */
+ struct Entry {
unsigned int mIndex; ///< The vertex referred by this entry
aiVector3D mPosition; ///< Position
ai_real mDistance; ///< Distance of this vertex to the sorting plane
- Entry() { /** intentionally not initialized.*/ }
+ Entry() AI_NO_EXCEPT
+ : mIndex( 999999999 ), mPosition(), mDistance( 99999. ) {
+ // empty
+ }
Entry( unsigned int pIndex, const aiVector3D& pPosition, ai_real pDistance)
- : mIndex( pIndex), mPosition( pPosition), mDistance( pDistance)
- { }
+ : mIndex( pIndex), mPosition( pPosition), mDistance( pDistance) {
+ // empty
+ }
bool operator < (const Entry& e) const { return mDistance < e.mDistance; }
};
diff --git a/code/StandardShapes.h b/include/assimp/StandardShapes.h
index a31de566c..fdf1b034d 100644
--- a/code/StandardShapes.h
+++ b/include/assimp/StandardShapes.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -56,7 +57,7 @@ namespace Assimp {
/** \brief Helper class to generate vertex buffers for standard geometric
* shapes, such as cylinders, cones, boxes, spheres, elipsoids ... .
*/
-class StandardShapes
+class ASSIMP_API StandardShapes
{
// class cannot be instanced
StandardShapes() {}
diff --git a/code/StreamReader.h b/include/assimp/StreamReader.h
index 494aed146..b01ee4b66 100644
--- a/code/StreamReader.h
+++ b/include/assimp/StreamReader.h
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -66,16 +67,13 @@ namespace Assimp {
* XXX switch from unsigned int for size types to size_t? or ptrdiff_t?*/
// --------------------------------------------------------------------------------------------
template <bool SwapEndianess = false, bool RuntimeSwitch = false>
-class StreamReader
-{
+class StreamReader {
public:
// FIXME: use these data types throughout the whole library,
// then change them to 64 bit values :-)
+ using diff = int;
+ using pos = unsigned int;
- typedef int diff;
- typedef unsigned int pos;
-
-public:
// ---------------------------------------------------------------------
/** Construction from a given stream with a well-defined endianness.
*
@@ -110,8 +108,6 @@ public:
delete[] buffer;
}
-public:
-
// deprecated, use overloaded operator>> instead
// ---------------------------------------------------------------------
@@ -175,7 +171,6 @@ public:
return Get<uint64_t>();
}
-public:
// ---------------------------------------------------------------------
/** Get the remaining stream size (to the end of the stream) */
unsigned int GetRemainingSize() const {
@@ -192,7 +187,7 @@ public:
// ---------------------------------------------------------------------
/** Increase the file pointer (relative seeking) */
- void IncPtr(size_t plus) {
+ void IncPtr(intptr_t plus) {
current += plus;
if (current > limit) {
throw DeadlyImportError("End of file or read limit was reached");
@@ -282,7 +277,6 @@ public:
return *this;
}
-private:
// ---------------------------------------------------------------------
/** Generic read method. ByteSwap::Swap(T*) *must* be defined */
template <typename T>
@@ -291,18 +285,15 @@ private:
throw DeadlyImportError("End of file or stream limit was reached");
}
-///*#ifdef __arm__
T f;
::memcpy (&f, current, sizeof(T));
-//#else*/
-// T f = *((const T*)current);
-//#endif
- Intern :: Getter<SwapEndianess,T,RuntimeSwitch>() (&f,le);
-
+ Intern::Getter<SwapEndianess,T,RuntimeSwitch>() (&f,le);
current += sizeof(T);
+
return f;
}
+private:
// ---------------------------------------------------------------------
void InternBegin() {
if (!stream) {
diff --git a/code/StreamWriter.h b/include/assimp/StreamWriter.h
index 26873fb5b..deb35fb4d 100644
--- a/code/StreamWriter.h
+++ b/include/assimp/StreamWriter.h
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -57,7 +58,7 @@ namespace Assimp {
// --------------------------------------------------------------------------------------------
/** Wrapper class around IOStream to allow for consistent writing of binary data in both
* little and big endian format. Don't attempt to instance the template directly. Use
- * StreamWriterLE to read from a little-endian stream and StreamWriterBE to read from a
+ * StreamWriterLE to write to a little-endian stream and StreamWriterBE to write to a
* BE stream. Alternatively, there is StreamWriterAny if the endianness of the output
* stream is to be determined at runtime.
*/
@@ -103,13 +104,45 @@ public:
// ---------------------------------------------------------------------
~StreamWriter() {
- stream->Write(&buffer[0], 1, buffer.size());
+ stream->Write(buffer.data(), 1, buffer.size());
stream->Flush();
}
public:
// ---------------------------------------------------------------------
+ /** Flush the contents of the internal buffer, and the output IOStream */
+ void Flush()
+ {
+ stream->Write(buffer.data(), 1, buffer.size());
+ stream->Flush();
+ buffer.clear();
+ cursor = 0;
+ }
+
+ // ---------------------------------------------------------------------
+ /** Seek to the given offset / origin in the output IOStream.
+ *
+ * Flushes the internal buffer and the output IOStream prior to seeking. */
+ aiReturn Seek(size_t pOffset, aiOrigin pOrigin=aiOrigin_SET)
+ {
+ Flush();
+ return stream->Seek(pOffset, pOrigin);
+ }
+
+ // ---------------------------------------------------------------------
+ /** Tell the current position in the output IOStream.
+ *
+ * First flushes the internal buffer and the output IOStream. */
+ size_t Tell()
+ {
+ Flush();
+ return stream->Tell();
+ }
+
+public:
+
+ // ---------------------------------------------------------------------
/** Write a float to the stream */
void PutF4(float f)
{
@@ -170,6 +203,38 @@ public:
Put(n);
}
+ // ---------------------------------------------------------------------
+ /** Write a single character to the stream */
+ void PutChar(char c) {
+ Put(c);
+ }
+
+ // ---------------------------------------------------------------------
+ /** Write an aiString to the stream */
+ void PutString(const aiString& s)
+ {
+ // as Put(T f) below
+ if (cursor + s.length >= buffer.size()) {
+ buffer.resize(cursor + s.length);
+ }
+ void* dest = &buffer[cursor];
+ ::memcpy(dest, s.C_Str(), s.length);
+ cursor += s.length;
+ }
+
+ // ---------------------------------------------------------------------
+ /** Write a std::string to the stream */
+ void PutString(const std::string& s)
+ {
+ // as Put(T f) below
+ if (cursor + s.size() >= buffer.size()) {
+ buffer.resize(cursor + s.size());
+ }
+ void* dest = &buffer[cursor];
+ ::memcpy(dest, s.c_str(), s.size());
+ cursor += s.size();
+ }
+
public:
// ---------------------------------------------------------------------
@@ -190,8 +255,6 @@ public:
cursor = new_cursor;
}
-private:
-
// ---------------------------------------------------------------------
/** Generic write method. ByteSwap::Swap(T*) *must* be defined */
template <typename T>
diff --git a/code/StringComparison.h b/include/assimp/StringComparison.h
index ed5f4bd6a..aea7f001a 100644
--- a/code/StringComparison.h
+++ b/include/assimp/StringComparison.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -52,6 +53,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define INCLUDED_AI_STRING_WORKERS_H
#include <assimp/ai_assert.h>
+#include <assimp/defs.h>
#include "StringComparison.h"
#include <string.h>
@@ -71,8 +73,8 @@ namespace Assimp {
* @param number Number to be written
* @return Length of the output string, excluding the '\0'
*/
-inline unsigned int ASSIMP_itoa10( char* out, unsigned int max, int32_t number)
-{
+AI_FORCE_INLINE
+unsigned int ASSIMP_itoa10( char* out, unsigned int max, int32_t number) {
ai_assert(NULL != out);
// write the unary minus to indicate we have a negative number
@@ -90,7 +92,7 @@ inline unsigned int ASSIMP_itoa10( char* out, unsigned int max, int32_t number)
const unsigned int digit = number / cur;
if (mustPrint || digit > 0 || 1 == cur) {
- // print all future zeroes from now
+ // print all future zeroe's from now
mustPrint = true;
*out++ = '0'+static_cast<char>(digit);
@@ -115,8 +117,8 @@ inline unsigned int ASSIMP_itoa10( char* out, unsigned int max, int32_t number)
* size of the array automatically.
*/
template <size_t length>
-inline unsigned int ASSIMP_itoa10( char(& out)[length], int32_t number)
-{
+AI_FORCE_INLINE
+unsigned int ASSIMP_itoa10( char(& out)[length], int32_t number) {
return ASSIMP_itoa10(out,length,number);
}
@@ -131,9 +133,10 @@ inline unsigned int ASSIMP_itoa10( char(& out)[length], int32_t number)
* @param s2 Second input string
* @return 0 if the given strings are identical
*/
-inline int ASSIMP_stricmp(const char *s1, const char *s2)
-{
- ai_assert(NULL != s1 && NULL != s2);
+AI_FORCE_INLINE
+int ASSIMP_stricmp(const char *s1, const char *s2) {
+ ai_assert( NULL != s1 );
+ ai_assert( NULL != s2 );
#if (defined _MSC_VER)
@@ -160,8 +163,8 @@ inline int ASSIMP_stricmp(const char *s1, const char *s2)
* @param b Second string
* @return 0 if a == b
*/
-inline int ASSIMP_stricmp(const std::string& a, const std::string& b)
-{
+AI_FORCE_INLINE
+int ASSIMP_stricmp(const std::string& a, const std::string& b) {
int i = (int)b.length()-(int)a.length();
return (i ? i : ASSIMP_stricmp(a.c_str(),b.c_str()));
}
@@ -178,10 +181,13 @@ inline int ASSIMP_stricmp(const std::string& a, const std::string& b)
* @param n Macimum number of characters to compare
* @return 0 if the given strings are identical
*/
-inline int ASSIMP_strincmp(const char *s1, const char *s2, unsigned int n)
-{
- ai_assert(NULL != s1 && NULL != s2);
- if (!n)return 0;
+AI_FORCE_INLINE
+int ASSIMP_strincmp(const char *s1, const char *s2, unsigned int n) {
+ ai_assert( NULL != s1 );
+ ai_assert( NULL != s2 );
+ if ( !n ) {
+ return 0;
+ }
#if (defined _MSC_VER)
@@ -212,14 +218,16 @@ inline int ASSIMP_strincmp(const char *s1, const char *s2, unsigned int n)
*
* todo: move somewhere where it fits better in than here
*/
-inline unsigned int integer_pow (unsigned int base, unsigned int power)
-{
+AI_FORCE_INLINE
+unsigned int integer_pow( unsigned int base, unsigned int power ) {
unsigned int res = 1;
- for (unsigned int i = 0; i < power;++i)
+ for ( unsigned int i = 0; i < power; ++i ) {
res *= base;
+ }
return res;
}
+
} // end of namespace
#endif // ! AI_STRINGCOMPARISON_H_INC
diff --git a/code/StringUtils.h b/include/assimp/StringUtils.h
index 64f66e6b9..906898b53 100644
--- a/code/StringUtils.h
+++ b/include/assimp/StringUtils.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -41,6 +42,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef INCLUDED_AI_STRINGUTILS_H
#define INCLUDED_AI_STRINGUTILS_H
+#include <assimp/defs.h>
+
#include <sstream>
#include <stdarg.h>
#include <cstdlib>
@@ -54,7 +57,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/// @return The number of written characters if the buffer size was big enough. If an encoding error occurs, a negative number is returned.
#if defined(_MSC_VER) && _MSC_VER < 1900
- inline int c99_ai_vsnprintf(char *outBuf, size_t size, const char *format, va_list ap) {
+ AI_FORCE_INLINE
+ int c99_ai_vsnprintf(char *outBuf, size_t size, const char *format, va_list ap) {
int count(-1);
if (0 != size) {
count = _vsnprintf_s(outBuf, size, _TRUNCATE, format, ap);
@@ -66,7 +70,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
return count;
}
- inline int ai_snprintf(char *outBuf, size_t size, const char *format, ...) {
+ AI_FORCE_INLINE
+ int ai_snprintf(char *outBuf, size_t size, const char *format, ...) {
int count;
va_list ap;
@@ -81,15 +86,25 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# define ai_snprintf snprintf
#endif
+/// @fn to_string
+/// @brief The portable version of to_string ( some gcc-versions on embedded devices are not supporting this).
+/// @param value The value to write into the std::string.
+/// @return The value as a std::string
template <typename T>
-inline
+AI_FORCE_INLINE
std::string to_string( T value ) {
std::ostringstream os;
os << value;
+
return os.str();
}
-inline
+/// @fn ai_strtof
+/// @brief The portable version of strtof.
+/// @param begin The first character of the string.
+/// @param end The last character
+/// @return The float value, 0.0f in cas of an error.
+AI_FORCE_INLINE
float ai_strtof( const char *begin, const char *end ) {
if ( nullptr == begin ) {
return 0.0f;
@@ -106,5 +121,23 @@ float ai_strtof( const char *begin, const char *end ) {
return val;
}
-#endif // INCLUDED_AI_STRINGUTILS_H
+/// @fn DecimalToHexa
+/// @brief The portable to convert a decimal value into a hexadecimal string.
+/// @param toConvert Value to convert
+/// @return The hexadecimal string, is empty in case of an error.
+template<class T>
+AI_FORCE_INLINE
+std::string DecimalToHexa( T toConvert ) {
+ std::string result;
+ std::stringstream ss;
+ ss << std::hex << toConvert;
+ ss >> result;
+
+ for ( size_t i = 0; i < result.size(); ++i ) {
+ result[ i ] = toupper( result[ i ] );
+ }
+
+ return result;
+}
+#endif // INCLUDED_AI_STRINGUTILS_H
diff --git a/code/Subdivision.h b/include/assimp/Subdivision.h
index b8ce228d2..84aff68f1 100644
--- a/code/Subdivision.h
+++ b/include/assimp/Subdivision.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -40,10 +41,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/** @file Defines a helper class to evaluate subdivision surfaces.*/
+#pragma once
#ifndef AI_SUBDISIVION_H_INC
#define AI_SUBDISIVION_H_INC
#include <cstddef>
+#include <assimp/types.h>
+
struct aiMesh;
namespace Assimp {
@@ -52,8 +56,7 @@ namespace Assimp {
/** Helper class to evaluate subdivision surfaces. Different algorithms
* are provided for choice. */
// ------------------------------------------------------------------------------
-class Subdivider
-{
+class ASSIMP_API Subdivider {
public:
/** Enumerates all supported subvidision algorithms */
@@ -61,12 +64,7 @@ public:
CATMULL_CLARKE = 0x1
};
-public:
-
- virtual ~Subdivider() {
- }
-
-public:
+ virtual ~Subdivider();
// ---------------------------------------------------------------
/** Create a subdivider of a specific type
@@ -119,9 +117,13 @@ public:
unsigned int num,
bool discard_input = false) = 0;
-private:
};
+inline
+Subdivider::~Subdivider() {
+ // empty
+}
+
} // end namespace Assimp
diff --git a/code/TinyFormatter.h b/include/assimp/TinyFormatter.h
index 1612282fb..2ddc227e9 100644
--- a/code/TinyFormatter.h
+++ b/include/assimp/TinyFormatter.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/Vertex.h b/include/assimp/Vertex.h
index 1f1685ae9..f1c02ee07 100644
--- a/code/Vertex.h
+++ b/include/assimp/Vertex.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -133,6 +134,30 @@ public:
}
}
+ // ----------------------------------------------------------------------------
+ /** Extract a particular vertex from a anim mesh and interleave all components */
+ explicit Vertex(const aiAnimMesh* msh, unsigned int idx) {
+ ai_assert(idx < msh->mNumVertices);
+ position = msh->mVertices[idx];
+
+ if (msh->HasNormals()) {
+ normal = msh->mNormals[idx];
+ }
+
+ if (msh->HasTangentsAndBitangents()) {
+ tangent = msh->mTangents[idx];
+ bitangent = msh->mBitangents[idx];
+ }
+
+ for (unsigned int i = 0; msh->HasTextureCoords(i); ++i) {
+ texcoords[i] = msh->mTextureCoords[i][idx];
+ }
+
+ for (unsigned int i = 0; msh->HasVertexColors(i); ++i) {
+ colors[i] = msh->mColors[i][idx];
+ }
+ }
+
public:
Vertex& operator += (const Vertex& v) {
diff --git a/code/XMLTools.h b/include/assimp/XMLTools.h
index 5d31f885e..4b76c4483 100644
--- a/code/XMLTools.h
+++ b/include/assimp/XMLTools.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/include/assimp/ai_assert.h b/include/assimp/ai_assert.h
index d8dbac8d2..7752763db 100644
--- a/include/assimp/ai_assert.h
+++ b/include/assimp/ai_assert.h
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/include/assimp/anim.h b/include/assimp/anim.h
index f8774b8fd..8a0984192 100644
--- a/include/assimp/anim.h
+++ b/include/assimp/anim.h
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -69,7 +70,7 @@ struct aiVectorKey
#ifdef __cplusplus
/// @brief The default constructor.
- aiVectorKey()
+ aiVectorKey() AI_NO_EXCEPT
: mTime( 0.0 )
, mValue() {
// empty
@@ -78,26 +79,27 @@ struct aiVectorKey
/// @brief Construction from a given time and key value.
aiVectorKey(double time, const aiVector3D& value)
- : mTime (time)
- , mValue (value)
- {}
+ : mTime( time )
+ , mValue( value ) {
+ // empty
+ }
typedef aiVector3D elem_type;
// Comparison operators. For use with std::find();
- bool operator == (const aiVectorKey& o) const {
- return o.mValue == this->mValue;
+ bool operator == (const aiVectorKey& rhs) const {
+ return rhs.mValue == this->mValue;
}
- bool operator != (const aiVectorKey& o) const {
- return o.mValue != this->mValue;
+ bool operator != (const aiVectorKey& rhs ) const {
+ return rhs.mValue != this->mValue;
}
// Relational operators. For use with std::sort();
- bool operator < (const aiVectorKey& o) const {
- return mTime < o.mTime;
+ bool operator < (const aiVectorKey& rhs ) const {
+ return mTime < rhs.mTime;
}
- bool operator > (const aiVectorKey& o) const {
- return mTime > o.mTime;
+ bool operator > (const aiVectorKey& rhs ) const {
+ return mTime > rhs.mTime;
}
#endif // __cplusplus
};
@@ -114,7 +116,7 @@ struct aiQuatKey
C_STRUCT aiQuaternion mValue;
#ifdef __cplusplus
- aiQuatKey()
+ aiQuatKey() AI_NO_EXCEPT
: mTime( 0.0 )
, mValue() {
// empty
@@ -129,25 +131,25 @@ struct aiQuatKey
typedef aiQuaternion elem_type;
// Comparison operators. For use with std::find();
- bool operator == (const aiQuatKey& o) const {
- return o.mValue == this->mValue;
+ bool operator == (const aiQuatKey& rhs ) const {
+ return rhs.mValue == this->mValue;
}
- bool operator != (const aiQuatKey& o) const {
- return o.mValue != this->mValue;
+ bool operator != (const aiQuatKey& rhs ) const {
+ return rhs.mValue != this->mValue;
}
// Relational operators. For use with std::sort();
- bool operator < (const aiQuatKey& o) const {
- return mTime < o.mTime;
+ bool operator < (const aiQuatKey& rhs ) const {
+ return mTime < rhs.mTime;
}
- bool operator > (const aiQuatKey& o) const {
- return mTime > o.mTime;
+ bool operator > (const aiQuatKey& rhs ) const {
+ return mTime > rhs.mTime;
}
#endif
};
// ---------------------------------------------------------------------------
-/** Binds a anim mesh to a specific point in time. */
+/** Binds a anim-mesh to a specific point in time. */
struct aiMeshKey
{
/** The time of this key */
@@ -161,7 +163,10 @@ struct aiMeshKey
#ifdef __cplusplus
- aiMeshKey() {
+ aiMeshKey() AI_NO_EXCEPT
+ : mTime(0.0)
+ , mValue(0)
+ {
}
/** Construction from a given time and key value */
@@ -205,10 +210,10 @@ struct aiMeshMorphKey
/** The number of values and weights */
unsigned int mNumValuesAndWeights;
#ifdef __cplusplus
- aiMeshMorphKey()
+ aiMeshMorphKey() AI_NO_EXCEPT
: mTime(0.0)
- , mValues(NULL)
- , mWeights(NULL)
+ , mValues(nullptr)
+ , mWeights(nullptr)
, mNumValuesAndWeights(0)
{
@@ -319,13 +324,13 @@ struct aiNodeAnim {
C_ENUM aiAnimBehaviour mPostState;
#ifdef __cplusplus
- aiNodeAnim()
+ aiNodeAnim() AI_NO_EXCEPT
: mNumPositionKeys( 0 )
- , mPositionKeys( NULL )
+ , mPositionKeys( nullptr )
, mNumRotationKeys( 0 )
- , mRotationKeys( NULL )
+ , mRotationKeys( nullptr )
, mNumScalingKeys( 0 )
- , mScalingKeys( NULL )
+ , mScalingKeys( nullptr )
, mPreState( aiAnimBehaviour_DEFAULT )
, mPostState( aiAnimBehaviour_DEFAULT ) {
// empty
@@ -361,7 +366,7 @@ struct aiMeshAnim
#ifdef __cplusplus
- aiMeshAnim()
+ aiMeshAnim() AI_NO_EXCEPT
: mNumKeys()
, mKeys()
{}
@@ -392,7 +397,7 @@ struct aiMeshMorphAnim
#ifdef __cplusplus
- aiMeshMorphAnim()
+ aiMeshMorphAnim() AI_NO_EXCEPT
: mNumKeys()
, mKeys()
{}
@@ -446,15 +451,15 @@ struct aiAnimation {
C_STRUCT aiMeshMorphAnim **mMorphMeshChannels;
#ifdef __cplusplus
- aiAnimation()
+ aiAnimation() AI_NO_EXCEPT
: mDuration(-1.)
, mTicksPerSecond(0.)
, mNumChannels(0)
- , mChannels(NULL)
+ , mChannels(nullptr)
, mNumMeshChannels(0)
- , mMeshChannels(NULL)
+ , mMeshChannels(nullptr)
, mNumMorphMeshChannels(0)
- , mMorphMeshChannels(NULL) {
+ , mMorphMeshChannels(nullptr) {
// empty
}
diff --git a/include/assimp/camera.h b/include/assimp/camera.h
index 7b7bd0922..6fea5a7d7 100644
--- a/include/assimp/camera.h
+++ b/include/assimp/camera.h
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -173,7 +174,7 @@ struct aiCamera
#ifdef __cplusplus
- aiCamera()
+ aiCamera() AI_NO_EXCEPT
: mUp (0.f,1.f,0.f)
, mLookAt (0.f,0.f,1.f)
, mHorizontalFOV (0.25f * (float)AI_MATH_PI)
diff --git a/include/assimp/cexport.h b/include/assimp/cexport.h
index 44b06fb3c..1d62dc26b 100644
--- a/include/assimp/cexport.h
+++ b/include/assimp/cexport.h
@@ -85,7 +85,6 @@ struct aiExportFormatDesc
*/
ASSIMP_API size_t aiGetExportFormatCount(void);
-
// --------------------------------------------------------------------------------
/** Returns a description of the nth export file format. Use #aiGetExportFormatCount()
* to learn how many export formats are supported. The description must be released by
@@ -186,7 +185,6 @@ ASSIMP_API aiReturn aiExportSceneEx( const C_STRUCT aiScene* pScene,
C_STRUCT aiFileIO* pIO,
unsigned int pPreprocessing );
-
// --------------------------------------------------------------------------------
/** Describes a blob of exported scene data. Use #aiExportSceneToBlob() to create a blob containing an
* exported scene. The memory referred by this structure is owned by Assimp.
@@ -245,8 +243,8 @@ private:
* @param pPreprocessing Please see the documentation for #aiExportScene
* @return the exported data or NULL in case of error
*/
-ASSIMP_API const C_STRUCT aiExportDataBlob* aiExportSceneToBlob( const C_STRUCT aiScene* pScene, const char* pFormatId, unsigned int pPreprocessing );
-
+ASSIMP_API const C_STRUCT aiExportDataBlob* aiExportSceneToBlob( const C_STRUCT aiScene* pScene, const char* pFormatId,
+ unsigned int pPreprocessing );
// --------------------------------------------------------------------------------
/** Releases the memory associated with the given exported data. Use this function to free a data blob
diff --git a/include/assimp/cfileio.h b/include/assimp/cfileio.h
index 63eeb59b0..a7a56f81c 100644
--- a/include/assimp/cfileio.h
+++ b/include/assimp/cfileio.h
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/include/assimp/cimport.h b/include/assimp/cimport.h
index 98be269d3..eb1e6e0d4 100644
--- a/include/assimp/cimport.h
+++ b/include/assimp/cimport.h
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -417,7 +418,7 @@ ASSIMP_API void aiSetImportPropertyInteger(
ASSIMP_API void aiSetImportPropertyFloat(
C_STRUCT aiPropertyStore* store,
const char* szName,
- float value);
+ ai_real value);
// --------------------------------------------------------------------------------
/** Set a string property.
diff --git a/include/assimp/color4.h b/include/assimp/color4.h
index 48e7aad30..fddd1b638 100644
--- a/include/assimp/color4.h
+++ b/include/assimp/color4.h
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -58,12 +59,11 @@ template <typename TReal>
class aiColor4t
{
public:
- aiColor4t () : r(), g(), b(), a() {}
+ aiColor4t() AI_NO_EXCEPT : r(), g(), b(), a() {}
aiColor4t (TReal _r, TReal _g, TReal _b, TReal _a)
: r(_r), g(_g), b(_b), a(_a) {}
explicit aiColor4t (TReal _r) : r(_r), g(_r), b(_r), a(_r) {}
- aiColor4t (const aiColor4t& o)
- : r(o.r), g(o.g), b(o.b), a(o.a) {}
+ aiColor4t (const aiColor4t& o) = default;
public:
// combined operators
diff --git a/include/assimp/color4.inl b/include/assimp/color4.inl
index b242c4e77..6e27292b9 100644
--- a/include/assimp/color4.inl
+++ b/include/assimp/color4.inl
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/include/assimp/config.h.in b/include/assimp/config.h.in
index db197822e..fd828bc6e 100644
--- a/include/assimp/config.h.in
+++ b/include/assimp/config.h.in
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2016, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -267,6 +268,15 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"PP_FD_REMOVE"
// ---------------------------------------------------------------------------
+/**
+ * @brief Configures the #aiProcess_FindDegenerates to check the area of a
+ * trinagle to be greates than e-6. If this is not the case the triangle will
+ * be removed if #AI_CONFIG_PP_FD_REMOVE is set to true.
+ */
+#define AI_CONFIG_PP_FD_CHECKAREA \
+ "PP_FD_CHECKAREA"
+
+// ---------------------------------------------------------------------------
/** @brief Configures the #aiProcess_OptimizeGraph step to preserve nodes
* matching a name in a given list.
*
@@ -632,8 +642,15 @@ enum aiComponent
#define AI_CONFIG_IMPORT_FBX_OPTIMIZE_EMPTY_ANIMATION_CURVES \
"IMPORT_FBX_OPTIMIZE_EMPTY_ANIMATION_CURVES"
-
-
+// ---------------------------------------------------------------------------
+/** @brief Set whether the fbx importer will use the legacy embedded texture naming.
+*
+* The default value is false (0)
+* Property type: bool
+*/
+#define AI_CONFIG_IMPORT_FBX_EMBEDDED_TEXTURES_LEGACY_NAMING \
+ "AI_CONFIG_IMPORT_FBX_EMBEDDED_TEXTURES_LEGACY_NAMING"
+
// ---------------------------------------------------------------------------
/** @brief Set the vertex animation keyframe to be imported
*
@@ -656,6 +673,12 @@ enum aiComponent
#define AI_CONFIG_IMPORT_SMD_KEYFRAME "IMPORT_SMD_KEYFRAME"
#define AI_CONFIG_IMPORT_UNREAL_KEYFRAME "IMPORT_UNREAL_KEYFRAME"
+// ---------------------------------------------------------------------------
+/** Smd load multiple animations
+ *
+ * Property type: bool. Default value: true.
+ */
+#define AI_CONFIG_IMPORT_SMD_LOAD_ANIMATION_LIST "IMPORT_SMD_LOAD_ANIMATION_LIST"
// ---------------------------------------------------------------------------
/** @brief Configures the AC loader to collect all surfaces which have the
@@ -896,7 +919,7 @@ enum aiComponent
/** @brief Set the tessellation for IFC cylindrical shapes.
*
* This is used by the IFC importer to determine the tessellation parameter
- * for cylindrical shapes, i.e. the number of segments used to aproximate a circle.
+ * for cylindrical shapes, i.e. the number of segments used to approximate a circle.
* @note The default value is AI_IMPORT_IFC_DEFAULT_CYLINDRICAL_TESSELLATION and the
* accepted values are in range [3, 180].
* Property type: Integer.
@@ -917,6 +940,16 @@ enum aiComponent
*/
#define AI_CONFIG_IMPORT_COLLADA_IGNORE_UP_DIRECTION "IMPORT_COLLADA_IGNORE_UP_DIRECTION"
+// ---------------------------------------------------------------------------
+/** @brief Specifies whether the Collada loader should use Collada names as node names.
+ *
+ * If this property is set to true, the Collada names will be used as the
+ * node name. The default is to use the id tag (resp. sid tag, if no id tag is present)
+ * instead.
+ * Property type: Bool. Default value: false.
+ */
+#define AI_CONFIG_IMPORT_COLLADA_USE_COLLADA_NAMES "IMPORT_COLLADA_USE_COLLADA_NAMES"
+
// ---------- All the Export defines ------------
/** @brief Specifies the xfile use double for real values of float
@@ -926,6 +959,19 @@ enum aiComponent
#define AI_CONFIG_EXPORT_XFILE_64BIT "EXPORT_XFILE_64BIT"
+/**
+ *
+ */
+#define AI_CONFIG_EXPORT_POINT_CLOUDS "EXPORT_POINT_CLOUDS"
+
+/**
+ * @brief Specifies a gobal key factor for scale, float value
+ */
+#define AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY "GLOBAL_SCALE_FACTOR"
+
+#if (!defined AI_CONFIG_GLOBAL_SCALE_FACTOR_DEFAULT)
+# define AI_CONFIG_GLOBAL_SCALE_FACTOR_DEFAULT 1.0f
+#endif // !! AI_DEBONE_THRESHOLD
// ---------- All the Build/Compile-time defines ------------
diff --git a/include/assimp/defs.h b/include/assimp/defs.h
index 20b234f90..e651a1f7b 100644
--- a/include/assimp/defs.h
+++ b/include/assimp/defs.h
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -51,26 +52,26 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/config.h>
- //////////////////////////////////////////////////////////////////////////
- /* Define ASSIMP_BUILD_NO_XX_IMPORTER to disable a specific
- * file format loader. The loader is be excluded from the
- * build in this case. 'XX' stands for the most common file
- * extension of the file format. E.g.:
- * ASSIMP_BUILD_NO_X_IMPORTER disables the X loader.
- *
- * If you're unsure about that, take a look at the implementation of the
- * import plugin you wish to disable. You'll find the right define in the
- * first lines of the corresponding unit.
- *
- * Other (mixed) configuration switches are listed here:
- * ASSIMP_BUILD_NO_COMPRESSED_X
- * - Disable support for compressed X files (zip)
- * ASSIMP_BUILD_NO_COMPRESSED_BLEND
- * - Disable support for compressed Blender files (zip)
- * ASSIMP_BUILD_NO_COMPRESSED_IFC
- * - Disable support for IFCZIP files (unzip)
- */
- //////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+/* Define ASSIMP_BUILD_NO_XX_IMPORTER to disable a specific
+ * file format loader. The loader is be excluded from the
+ * build in this case. 'XX' stands for the most common file
+ * extension of the file format. E.g.:
+ * ASSIMP_BUILD_NO_X_IMPORTER disables the X loader.
+ *
+ * If you're unsure about that, take a look at the implementation of the
+ * import plugin you wish to disable. You'll find the right define in the
+ * first lines of the corresponding unit.
+ *
+ * Other (mixed) configuration switches are listed here:
+ * ASSIMP_BUILD_NO_COMPRESSED_X
+ * - Disable support for compressed X files (zip)
+ * ASSIMP_BUILD_NO_COMPRESSED_BLEND
+ * - Disable support for compressed Blender files (zip)
+ * ASSIMP_BUILD_NO_COMPRESSED_IFC
+ * - Disable support for IFCZIP files (unzip)
+ */
+//////////////////////////////////////////////////////////////////////////
#ifndef ASSIMP_BUILD_NO_COMPRESSED_X
# define ASSIMP_BUILD_NEED_Z_INFLATE
@@ -90,37 +91,39 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# define ASSIMP_BUILD_NEED_UNZIP
#endif
- //////////////////////////////////////////////////////////////////////////
- /* Define ASSIMP_BUILD_NO_XX_PROCESS to disable a specific
- * post processing step. This is the current list of process names ('XX'):
- * CALCTANGENTS
- * JOINVERTICES
- * TRIANGULATE
- * GENFACENORMALS
- * GENVERTEXNORMALS
- * REMOVEVC
- * SPLITLARGEMESHES
- * PRETRANSFORMVERTICES
- * LIMITBONEWEIGHTS
- * VALIDATEDS
- * IMPROVECACHELOCALITY
- * FIXINFACINGNORMALS
- * REMOVE_REDUNDANTMATERIALS
- * OPTIMIZEGRAPH
- * SORTBYPTYPE
- * FINDINVALIDDATA
- * TRANSFORMTEXCOORDS
- * GENUVCOORDS
- * ENTITYMESHBUILDER
- * MAKELEFTHANDED
- * FLIPUVS
- * FLIPWINDINGORDER
- * OPTIMIZEMESHES
- * OPTIMIZEANIMS
- * OPTIMIZEGRAPH
- * GENENTITYMESHES
- * FIXTEXTUREPATHS */
- //////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+/* Define ASSIMP_BUILD_NO_XX_PROCESS to disable a specific
+ * post processing step. This is the current list of process names ('XX'):
+ * CALCTANGENTS
+ * JOINVERTICES
+ * TRIANGULATE
+ * DROPFACENORMALS
+ * GENFACENORMALS
+ * GENVERTEXNORMALS
+ * REMOVEVC
+ * SPLITLARGEMESHES
+ * PRETRANSFORMVERTICES
+ * LIMITBONEWEIGHTS
+ * VALIDATEDS
+ * IMPROVECACHELOCALITY
+ * FIXINFACINGNORMALS
+ * REMOVE_REDUNDANTMATERIALS
+ * OPTIMIZEGRAPH
+ * SORTBYPTYPE
+ * FINDINVALIDDATA
+ * TRANSFORMTEXCOORDS
+ * GENUVCOORDS
+ * ENTITYMESHBUILDER
+ * EMBEDTEXTURES
+ * MAKELEFTHANDED
+ * FLIPUVS
+ * FLIPWINDINGORDER
+ * OPTIMIZEMESHES
+ * OPTIMIZEANIMS
+ * OPTIMIZEGRAPH
+ * GENENTITYMESHES
+ * FIXTEXTUREPATHS */
+//////////////////////////////////////////////////////////////////////////
#ifdef _MSC_VER
# undef ASSIMP_API
@@ -287,4 +290,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#define AI_MAX_ALLOC(type) ((256U * 1024 * 1024) / sizeof(type))
+#ifndef _MSC_VER
+# define AI_NO_EXCEPT noexcept
+#else
+# if (_MSC_VER == 1915 )
+# define AI_NO_EXCEPT noexcept
+# else
+# define AI_NO_EXCEPT
+# endif
+#endif
+
#endif // !! AI_DEFINES_H_INC
diff --git a/code/fast_atof.h b/include/assimp/fast_atof.h
index be1e59221..62ea969e9 100644
--- a/code/fast_atof.h
+++ b/include/assimp/fast_atof.h
@@ -14,8 +14,8 @@
// ------------------------------------------------------------------------------------
-#ifndef __FAST_A_TO_F_H_INCLUDED__
-#define __FAST_A_TO_F_H_INCLUDED__
+#ifndef FAST_A_TO_F_H_INCLUDED
+#define FAST_A_TO_F_H_INCLUDED
#include <cmath>
#include <limits>
@@ -26,15 +26,13 @@
#include "StringComparison.h"
#include <assimp/DefaultLogger.hpp>
-
#ifdef _MSC_VER
# include <stdint.h>
#else
# include <assimp/Compiler/pstdint.h>
#endif
-namespace Assimp
-{
+namespace Assimp {
const double fast_atof_table[16] = { // we write [16] here instead of [] to work around a swig bug
0.0,
@@ -59,69 +57,65 @@ const double fast_atof_table[16] = { // we write [16] here instead of [] to wo
// ------------------------------------------------------------------------------------
// Convert a string in decimal format to a number
// ------------------------------------------------------------------------------------
-inline unsigned int strtoul10( const char* in, const char** out=0)
-{
+inline
+unsigned int strtoul10( const char* in, const char** out=0) {
unsigned int value = 0;
- bool running = true;
- while ( running )
- {
- if ( *in < '0' || *in > '9' )
+ for ( ;; ) {
+ if ( *in < '0' || *in > '9' ) {
break;
+ }
value = ( value * 10 ) + ( *in - '0' );
++in;
}
- if (out)*out = in;
+ if ( out ) {
+ *out = in;
+ }
return value;
}
// ------------------------------------------------------------------------------------
// Convert a string in octal format to a number
// ------------------------------------------------------------------------------------
-inline unsigned int strtoul8( const char* in, const char** out=0)
-{
- unsigned int value = 0;
-
- bool running = true;
- while ( running )
- {
- if ( *in < '0' || *in > '7' )
+inline
+unsigned int strtoul8( const char* in, const char** out=0) {
+ unsigned int value( 0 );
+ for ( ;; ) {
+ if ( *in < '0' || *in > '7' ) {
break;
+ }
value = ( value << 3 ) + ( *in - '0' );
++in;
}
- if (out)*out = in;
+ if ( out ) {
+ *out = in;
+ }
return value;
}
// ------------------------------------------------------------------------------------
// Convert a string in hex format to a number
// ------------------------------------------------------------------------------------
-inline unsigned int strtoul16( const char* in, const char** out=0)
-{
- unsigned int value = 0;
-
- bool running = true;
- while ( running )
- {
- if ( *in >= '0' && *in <= '9' )
- {
+inline
+unsigned int strtoul16( const char* in, const char** out=0) {
+ unsigned int value( 0 );
+ for ( ;; ) {
+ if ( *in >= '0' && *in <= '9' ) {
value = ( value << 4u ) + ( *in - '0' );
- }
- else if (*in >= 'A' && *in <= 'F')
- {
+ } else if (*in >= 'A' && *in <= 'F') {
value = ( value << 4u ) + ( *in - 'A' ) + 10;
- }
- else if (*in >= 'a' && *in <= 'f')
- {
+ } else if (*in >= 'a' && *in <= 'f') {
value = ( value << 4u ) + ( *in - 'a' ) + 10;
+ } else {
+ break;
}
- else break;
++in;
}
- if (out)*out = in;
+ if ( out ) {
+ *out = in;
+ }
return value;
}
@@ -129,17 +123,16 @@ inline unsigned int strtoul16( const char* in, const char** out=0)
// Convert just one hex digit
// Return value is UINT_MAX if the input character is not a hex digit.
// ------------------------------------------------------------------------------------
-inline unsigned int HexDigitToDecimal(char in)
-{
- unsigned int out = UINT_MAX;
- if (in >= '0' && in <= '9')
+inline
+unsigned int HexDigitToDecimal(char in) {
+ unsigned int out( UINT_MAX );
+ if ( in >= '0' && in <= '9' ) {
out = in - '0';
-
- else if (in >= 'a' && in <= 'f')
+ } else if ( in >= 'a' && in <= 'f' ) {
out = 10u + in - 'a';
-
- else if (in >= 'A' && in <= 'F')
+ } else if ( in >= 'A' && in <= 'F' ) {
out = 10u + in - 'A';
+ }
// return value is UINT_MAX if the input is not a hex digit
return out;
@@ -148,20 +141,20 @@ inline unsigned int HexDigitToDecimal(char in)
// ------------------------------------------------------------------------------------
// Convert a hex-encoded octet (2 characters, i.e. df or 1a).
// ------------------------------------------------------------------------------------
-inline uint8_t HexOctetToDecimal(const char* in)
-{
+inline
+uint8_t HexOctetToDecimal(const char* in) {
return ((uint8_t)HexDigitToDecimal(in[0])<<4)+(uint8_t)HexDigitToDecimal(in[1]);
}
-
// ------------------------------------------------------------------------------------
// signed variant of strtoul10
// ------------------------------------------------------------------------------------
-inline int strtol10( const char* in, const char** out=0)
-{
+inline
+int strtol10( const char* in, const char** out=0) {
bool inv = (*in=='-');
- if (inv || *in=='+')
+ if ( inv || *in == '+' ) {
++in;
+ }
int value = strtoul10(in,out);
if (inv) {
@@ -176,10 +169,9 @@ inline int strtol10( const char* in, const char** out=0)
// 0NNN - oct
// NNN - dec
// ------------------------------------------------------------------------------------
-inline unsigned int strtoul_cppstyle( const char* in, const char** out=0)
-{
- if ('0' == in[0])
- {
+inline
+unsigned int strtoul_cppstyle( const char* in, const char** out=0) {
+ if ('0' == in[0]) {
return 'x' == in[1] ? strtoul16(in+2,out) : strtoul8(in+1,out);
}
return strtoul10(in, out);
@@ -189,28 +181,27 @@ inline unsigned int strtoul_cppstyle( const char* in, const char** out=0)
// Special version of the function, providing higher accuracy and safety
// It is mainly used by fast_atof to prevent ugly and unwanted integer overflows.
// ------------------------------------------------------------------------------------
-inline uint64_t strtoul10_64( const char* in, const char** out=0, unsigned int* max_inout=0)
-{
+inline
+uint64_t strtoul10_64( const char* in, const char** out=0, unsigned int* max_inout=0) {
unsigned int cur = 0;
uint64_t value = 0;
- if ( *in < '0' || *in > '9' )
- throw std::invalid_argument(std::string("The string \"") + in + "\" cannot be converted into a value.");
+ if ( *in < '0' || *in > '9' ) {
+ throw std::invalid_argument( std::string( "The string \"" ) + in + "\" cannot be converted into a value." );
+ }
- bool running = true;
- while ( running )
- {
- if ( *in < '0' || *in > '9' )
+ for ( ;; ) {
+ if ( *in < '0' || *in > '9' ) {
break;
+ }
- const uint64_t new_value = ( value * 10 ) + ( *in - '0' );
+ const uint64_t new_value = ( value * (uint64_t) 10 ) + ( (uint64_t) ( *in - '0' ) );
// numeric overflow, we rely on you
if ( new_value < value ) {
- DefaultLogger::get()->warn( std::string( "Converting the string \"" ) + in + "\" into a value resulted in overflow." );
+ ASSIMP_LOG_WARN_F( "Converting the string \"", in, "\" into a value resulted in overflow." );
return 0;
}
- //throw std::overflow_error();
value = new_value;
@@ -218,21 +209,23 @@ inline uint64_t strtoul10_64( const char* in, const char** out=0, unsigned int*
++cur;
if (max_inout && *max_inout == cur) {
-
if (out) { /* skip to end */
- while (*in >= '0' && *in <= '9')
+ while ( *in >= '0' && *in <= '9' ) {
++in;
+ }
*out = in;
}
return value;
}
}
- if (out)
+ if ( out ) {
*out = in;
+ }
- if (max_inout)
+ if ( max_inout ) {
*max_inout = cur;
+ }
return value;
}
@@ -240,11 +233,12 @@ inline uint64_t strtoul10_64( const char* in, const char** out=0, unsigned int*
// ------------------------------------------------------------------------------------
// signed variant of strtoul10_64
// ------------------------------------------------------------------------------------
-inline int64_t strtol10_64(const char* in, const char** out = 0, unsigned int* max_inout = 0)
-{
+inline
+int64_t strtol10_64(const char* in, const char** out = 0, unsigned int* max_inout = 0) {
bool inv = (*in == '-');
- if (inv || *in == '+')
+ if ( inv || *in == '+' ) {
++in;
+ }
int64_t value = strtoul10_64(in, out, max_inout);
if (inv) {
@@ -253,7 +247,6 @@ inline int64_t strtol10_64(const char* in, const char** out = 0, unsigned int* m
return value;
}
-
// Number of relevant decimals for floating-point parsing.
#define AI_FAST_ATOF_RELAVANT_DECIMALS 15
@@ -262,9 +255,9 @@ inline int64_t strtol10_64(const char* in, const char** out = 0, unsigned int* m
//! about 6 times faster than atof in win32.
// If you find any bugs, please send them to me, niko (at) irrlicht3d.org.
// ------------------------------------------------------------------------------------
-template <typename Real>
-inline const char* fast_atoreal_move(const char* c, Real& out, bool check_comma = true)
-{
+template<typename Real>
+inline
+const char* fast_atoreal_move(const char* c, Real& out, bool check_comma = true) {
Real f = 0;
bool inv = (*c == '-');
@@ -272,42 +265,36 @@ inline const char* fast_atoreal_move(const char* c, Real& out, bool check_comma
++c;
}
- if ((c[0] == 'N' || c[0] == 'n') && ASSIMP_strincmp(c, "nan", 3) == 0)
- {
+ if ((c[0] == 'N' || c[0] == 'n') && ASSIMP_strincmp(c, "nan", 3) == 0) {
out = std::numeric_limits<Real>::quiet_NaN();
c += 3;
return c;
}
- if ((c[0] == 'I' || c[0] == 'i') && ASSIMP_strincmp(c, "inf", 3) == 0)
- {
+ if ((c[0] == 'I' || c[0] == 'i') && ASSIMP_strincmp(c, "inf", 3) == 0) {
out = std::numeric_limits<Real>::infinity();
if (inv) {
out = -out;
}
c += 3;
- if ((c[0] == 'I' || c[0] == 'i') && ASSIMP_strincmp(c, "inity", 5) == 0)
- {
+ if ((c[0] == 'I' || c[0] == 'i') && ASSIMP_strincmp(c, "inity", 5) == 0) {
c += 5;
}
return c;
- }
+ }
if (!(c[0] >= '0' && c[0] <= '9') &&
- !((c[0] == '.' || (check_comma && c[0] == ',')) && c[1] >= '0' && c[1] <= '9'))
- {
+ !((c[0] == '.' || (check_comma && c[0] == ',')) && c[1] >= '0' && c[1] <= '9')) {
throw std::invalid_argument("Cannot parse string "
"as real number: does not start with digit "
"or decimal point followed by digit.");
}
- if (*c != '.' && (! check_comma || c[0] != ','))
- {
+ if (*c != '.' && (! check_comma || c[0] != ',')) {
f = static_cast<Real>( strtoul10_64 ( c, &c) );
}
- if ((*c == '.' || (check_comma && c[0] == ',')) && c[1] >= '0' && c[1] <= '9')
- {
+ if ((*c == '.' || (check_comma && c[0] == ',')) && c[1] >= '0' && c[1] <= '9') {
++c;
// NOTE: The original implementation is highly inaccurate here. The precision of a single
@@ -332,7 +319,6 @@ inline const char* fast_atoreal_move(const char* c, Real& out, bool check_comma
// A major 'E' must be allowed. Necessary for proper reading of some DXF files.
// Thanks to Zhao Lei to point out that this if() must be outside the if (*c == '.' ..)
if (*c == 'e' || *c == 'E') {
-
++c;
const bool einv = (*c=='-');
if (einv || *c=='+') {
@@ -358,30 +344,30 @@ inline const char* fast_atoreal_move(const char* c, Real& out, bool check_comma
// ------------------------------------------------------------------------------------
// The same but more human.
-inline ai_real fast_atof(const char* c)
-{
- ai_real ret;
+inline
+ai_real fast_atof(const char* c) {
+ ai_real ret(0.0);
fast_atoreal_move<ai_real>(c, ret);
+
return ret;
}
-
-inline ai_real fast_atof( const char* c, const char** cout)
-{
- ai_real ret;
+inline
+ai_real fast_atof( const char* c, const char** cout) {
+ ai_real ret(0.0);
*cout = fast_atoreal_move<ai_real>(c, ret);
return ret;
}
-inline ai_real fast_atof( const char** inout)
-{
- ai_real ret;
+inline
+ai_real fast_atof( const char** inout) {
+ ai_real ret(0.0);
*inout = fast_atoreal_move<ai_real>(*inout, ret);
return ret;
}
-} // end of namespace Assimp
+} //! namespace Assimp
-#endif
+#endif // FAST_A_TO_F_H_INCLUDED
diff --git a/include/assimp/importerdesc.h b/include/assimp/importerdesc.h
index 6b83b8aa2..36b773e45 100644
--- a/include/assimp/importerdesc.h
+++ b/include/assimp/importerdesc.h
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/code/irrXMLWrapper.h b/include/assimp/irrXMLWrapper.h
index d7c76bf87..296f26a32 100644
--- a/code/irrXMLWrapper.h
+++ b/include/assimp/irrXMLWrapper.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -44,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// some long includes ....
#include <irrXML.h>
-#include "./../include/assimp/IOStream.hpp"
+#include "IOStream.hpp"
#include "BaseImporter.h"
#include <vector>
@@ -70,9 +71,7 @@ namespace Assimp {
* }
* @endcode
**/
-class CIrrXML_IOStreamReader
- : public irr::io::IFileReadCallBack
-{
+class CIrrXML_IOStreamReader : public irr::io::IFileReadCallBack {
public:
// ----------------------------------------------------------------------------------
diff --git a/include/assimp/light.h b/include/assimp/light.h
index 324339a97..dc0b8a4b6 100644
--- a/include/assimp/light.h
+++ b/include/assimp/light.h
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -236,7 +237,7 @@ struct aiLight
#ifdef __cplusplus
- aiLight()
+ aiLight() AI_NO_EXCEPT
: mType (aiLightSource_UNDEFINED)
, mAttenuationConstant (0.f)
, mAttenuationLinear (1.f)
diff --git a/include/assimp/material.h b/include/assimp/material.h
index a12e7d076..45b4844a3 100644
--- a/include/assimp/material.h
+++ b/include/assimp/material.h
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -482,7 +483,7 @@ struct aiUVTransform
#ifdef __cplusplus
- aiUVTransform()
+ aiUVTransform() AI_NO_EXCEPT
: mTranslation (0.0,0.0)
, mScaling (1.0,1.0)
, mRotation (0.0)
@@ -491,7 +492,7 @@ struct aiUVTransform
}
#endif
-} PACK_STRUCT;
+};
#include "./Compiler/poppack1.h"
@@ -606,17 +607,18 @@ struct aiMaterialProperty
#ifdef __cplusplus
- aiMaterialProperty()
- : mSemantic( 0 )
- , mIndex( 0 )
- , mDataLength( 0 )
- , mType( aiPTI_Float )
- , mData( NULL )
- {
+ aiMaterialProperty() AI_NO_EXCEPT
+ : mSemantic( 0 )
+ , mIndex( 0 )
+ , mDataLength( 0 )
+ , mType( aiPTI_Float )
+ , mData(nullptr) {
+ // empty
}
~aiMaterialProperty() {
delete[] mData;
+ mData = nullptr;
}
#endif
@@ -651,6 +653,14 @@ public:
~aiMaterial();
// -------------------------------------------------------------------
+ /**
+ * @brief Returns the name of the material.
+ * @return The name of the material.
+ */
+ // -------------------------------------------------------------------
+ aiString GetName();
+
+ // -------------------------------------------------------------------
/** @brief Retrieve an array of Type values with a specific key
* from the material
*
@@ -1555,10 +1565,12 @@ C_ENUM aiReturn aiGetMaterialTexture(const C_STRUCT aiMaterial* mat,
unsigned int* flags /*= NULL*/);
#endif // !#ifdef __cplusplus
+
#ifdef __cplusplus
}
#include "material.inl"
#endif //!__cplusplus
+
#endif //!!AI_MATERIAL_H_INC
diff --git a/include/assimp/material.inl b/include/assimp/material.inl
index 2c31fd571..3d4b07c06 100644
--- a/include/assimp/material.inl
+++ b/include/assimp/material.inl
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -119,7 +120,7 @@ inline aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
const aiMaterialProperty* prop;
const aiReturn ret = ::aiGetMaterialProperty(this,pKey,type,idx,
(const aiMaterialProperty**)&prop);
- if ( AI_SUCCESS == ret ) {
+ if ( AI_SUCCESS == ret ) {
if (prop->mDataLength < sizeof(Type)) {
return AI_FAILURE;
@@ -129,7 +130,7 @@ inline aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
return AI_FAILURE;
}
- ::memcpy(&pOut,prop->mData,sizeof(Type));
+ ::memcpy( &pOut, prop->mData, sizeof( Type ) );
}
return ret;
}
diff --git a/include/assimp/matrix3x3.h b/include/assimp/matrix3x3.h
index 3cf575e38..4bb55ad21 100644
--- a/include/assimp/matrix3x3.h
+++ b/include/assimp/matrix3x3.h
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -68,7 +69,7 @@ class aiMatrix3x3t
{
public:
- aiMatrix3x3t () :
+ aiMatrix3x3t() AI_NO_EXCEPT :
a1(static_cast<TReal>(1.0f)), a2(), a3(),
b1(), b2(static_cast<TReal>(1.0f)), b3(),
c1(), c2(), c3(static_cast<TReal>(1.0f)) {}
diff --git a/include/assimp/matrix3x3.inl b/include/assimp/matrix3x3.inl
index 14f2cd2fc..ab2cc410b 100644
--- a/include/assimp/matrix3x3.inl
+++ b/include/assimp/matrix3x3.inl
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -312,16 +313,16 @@ inline aiMatrix3x3t<TReal>& aiMatrix3x3t<TReal>::FromToMatrix(const aiVector3t<T
u.x = x.x - from.x; u.y = x.y - from.y; u.z = x.z - from.z;
v.x = x.x - to.x; v.y = x.y - to.y; v.z = x.z - to.z;
- const TReal c1 = static_cast<TReal>(2.0) / (u * u);
- const TReal c2 = static_cast<TReal>(2.0) / (v * v);
- const TReal c3 = c1 * c2 * (u * v);
+ const TReal c1_ = static_cast<TReal>(2.0) / (u * u);
+ const TReal c2_ = static_cast<TReal>(2.0) / (v * v);
+ const TReal c3_ = c1_ * c2_ * (u * v);
for (unsigned int i = 0; i < 3; i++)
{
for (unsigned int j = 0; j < 3; j++)
{
- mtx[i][j] = - c1 * u[i] * u[j] - c2 * v[i] * v[j]
- + c3 * v[i] * u[j];
+ mtx[i][j] = - c1_ * u[i] * u[j] - c2_ * v[i] * v[j]
+ + c3_ * v[i] * u[j];
}
mtx[i][i] += static_cast<TReal>(1.0);
}
diff --git a/include/assimp/matrix4x4.h b/include/assimp/matrix4x4.h
index 4311fa118..bfa9d3865 100644
--- a/include/assimp/matrix4x4.h
+++ b/include/assimp/matrix4x4.h
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -70,7 +71,7 @@ class aiMatrix4x4t
public:
/** set to identity */
- aiMatrix4x4t ();
+ aiMatrix4x4t() AI_NO_EXCEPT;
/** construction from single values */
aiMatrix4x4t ( TReal _a1, TReal _a2, TReal _a3, TReal _a4,
diff --git a/include/assimp/matrix4x4.inl b/include/assimp/matrix4x4.inl
index b15d50a09..680d7666d 100644
--- a/include/assimp/matrix4x4.inl
+++ b/include/assimp/matrix4x4.inl
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -59,7 +60,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// ----------------------------------------------------------------------------------------
template <typename TReal>
-aiMatrix4x4t<TReal> ::aiMatrix4x4t () :
+aiMatrix4x4t<TReal>::aiMatrix4x4t() AI_NO_EXCEPT :
a1(1.0f), a2(), a3(), a4(),
b1(), b2(1.0f), b3(), b4(),
c1(), c2(), c3(1.0f), c4(),
@@ -70,7 +71,7 @@ aiMatrix4x4t<TReal> ::aiMatrix4x4t () :
// ----------------------------------------------------------------------------------------
template <typename TReal>
-aiMatrix4x4t<TReal> ::aiMatrix4x4t (TReal _a1, TReal _a2, TReal _a3, TReal _a4,
+aiMatrix4x4t<TReal>::aiMatrix4x4t (TReal _a1, TReal _a2, TReal _a3, TReal _a4,
TReal _b1, TReal _b2, TReal _b3, TReal _b4,
TReal _c1, TReal _c2, TReal _c3, TReal _c4,
TReal _d1, TReal _d2, TReal _d3, TReal _d4) :
@@ -423,12 +424,18 @@ inline void aiMatrix4x4t<TReal>::Decompose(aiVector3t<TReal>& pScaling, aiVector
{
ASSIMP_MATRIX4_4_DECOMPOSE_PART;
- /*
- | CE -CF D 0 |
- M = | BDE+AF -BDF+AE -BC 0 |
- | -ADE+BF -ADF+BE AC 0 |
- | 0 0 0 1 |
-
+ /*
+ assuming a right-handed coordinate system
+ and post-multiplication of column vectors,
+ the rotation matrix for an euler XYZ rotation is M = Rz * Ry * Rx.
+ combining gives:
+
+ | CE BDE-AF ADE+BF 0 |
+ M = | CF BDF+AE ADF-BE 0 |
+ | -D CB AC 0 |
+ | 0 0 0 1 |
+
+ where
A = cos(angle_x), B = sin(angle_x);
C = cos(angle_y), D = sin(angle_y);
E = cos(angle_z), F = sin(angle_z);
@@ -437,20 +444,20 @@ inline void aiMatrix4x4t<TReal>::Decompose(aiVector3t<TReal>& pScaling, aiVector
// Use a small epsilon to solve floating-point inaccuracies
const TReal epsilon = 10e-3f;
- pRotation.y = std::asin(vCols[2].x);// D. Angle around oY.
+ pRotation.y = std::asin(-vCols[0].z);// D. Angle around oY.
TReal C = std::cos(pRotation.y);
if(std::fabs(C) > epsilon)
{
// Finding angle around oX.
- TReal tan_x = vCols[2].z / C;// A
- TReal tan_y = -vCols[2].y / C;// B
+ TReal tan_x = vCols[2].z / C;// A
+ TReal tan_y = vCols[1].z / C;// B
pRotation.x = std::atan2(tan_y, tan_x);
// Finding angle around oZ.
- tan_x = vCols[0].x / C;// E
- tan_y = -vCols[1].x / C;// F
+ tan_x = vCols[0].x / C;// E
+ tan_y = vCols[0].y / C;// F
pRotation.z = std::atan2(tan_y, tan_x);
}
else
@@ -458,8 +465,8 @@ inline void aiMatrix4x4t<TReal>::Decompose(aiVector3t<TReal>& pScaling, aiVector
pRotation.x = 0;// Set angle around oX to 0. => A == 1, B == 0, C == 0, D == 1.
// And finding angle around oZ.
- TReal tan_x = vCols[1].y;// -BDF+AE => E
- TReal tan_y = vCols[0].y;// BDE+AF => F
+ TReal tan_x = vCols[1].y;// BDF+AE => E
+ TReal tan_y = -vCols[1].x;// BDE-AF => F
pRotation.z = std::atan2(tan_y, tan_x);
}
@@ -520,27 +527,25 @@ inline aiMatrix4x4t<TReal>& aiMatrix4x4t<TReal>::FromEulerAnglesXYZ(TReal x, TRe
{
aiMatrix4x4t<TReal>& _this = *this;
- TReal cr = std::cos( x );
- TReal sr = std::sin( x );
- TReal cp = std::cos( y );
- TReal sp = std::sin( y );
- TReal cy = std::cos( z );
- TReal sy = std::sin( z );
-
- _this.a1 = cp*cy ;
- _this.a2 = cp*sy;
- _this.a3 = -sp ;
-
- TReal srsp = sr*sp;
- TReal crsp = cr*sp;
-
- _this.b1 = srsp*cy-cr*sy ;
- _this.b2 = srsp*sy+cr*cy ;
- _this.b3 = sr*cp ;
-
- _this.c1 = crsp*cy+sr*sy ;
- _this.c2 = crsp*sy-sr*cy ;
- _this.c3 = cr*cp ;
+ TReal cx = std::cos(x);
+ TReal sx = std::sin(x);
+ TReal cy = std::cos(y);
+ TReal sy = std::sin(y);
+ TReal cz = std::cos(z);
+ TReal sz = std::sin(z);
+
+ // mz*my*mx
+ _this.a1 = cz * cy;
+ _this.a2 = cz * sy * sx - sz * cx;
+ _this.a3 = sz * sx + cz * sy * cx;
+
+ _this.b1 = sz * cy;
+ _this.b2 = cz * cx + sz * sy * sx;
+ _this.b3 = sz * sy * cx - cz * sx;
+
+ _this.c1 = -sy;
+ _this.c2 = cy * sx;
+ _this.c3 = cy * cx;
return *this;
}
diff --git a/include/assimp/mesh.h b/include/assimp/mesh.h
index c8648c778..f47d5fd00 100644
--- a/include/assimp/mesh.h
+++ b/include/assimp/mesh.h
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -135,10 +136,10 @@ struct aiFace
#ifdef __cplusplus
//! Default constructor
- aiFace()
- : mNumIndices( 0 )
- , mIndices( NULL )
- {
+ aiFace() AI_NO_EXCEPT
+ : mNumIndices( 0 )
+ , mIndices( nullptr ) {
+ // empty
}
//! Default destructor. Delete the index array
@@ -149,47 +150,56 @@ struct aiFace
//! Copy constructor. Copy the index array
aiFace( const aiFace& o)
- : mIndices( NULL )
- {
+ : mNumIndices(0)
+ , mIndices( nullptr ) {
*this = o;
}
//! Assignment operator. Copy the index array
- aiFace& operator = ( const aiFace& o)
- {
- if (&o == this)
+ aiFace& operator = ( const aiFace& o) {
+ if (&o == this) {
return *this;
+ }
delete[] mIndices;
mNumIndices = o.mNumIndices;
if (mNumIndices) {
mIndices = new unsigned int[mNumIndices];
::memcpy( mIndices, o.mIndices, mNumIndices * sizeof( unsigned int));
+ } else {
+ mIndices = nullptr;
}
- else {
- mIndices = NULL;
- }
+
return *this;
}
//! Comparison operator. Checks whether the index array
//! of two faces is identical
- bool operator== (const aiFace& o) const
- {
- if (mIndices == o.mIndices)return true;
- else if (mIndices && mNumIndices == o.mNumIndices)
- {
- for (unsigned int i = 0;i < this->mNumIndices;++i)
- if (mIndices[i] != o.mIndices[i])return false;
+ bool operator== (const aiFace& o) const {
+ if (mIndices == o.mIndices) {
return true;
}
- return false;
+
+ if (nullptr != mIndices && mNumIndices != o.mNumIndices) {
+ return false;
+ }
+
+ if (nullptr == mIndices) {
+ return false;
+ }
+
+ for (unsigned int i = 0; i < this->mNumIndices; ++i) {
+ if (mIndices[i] != o.mIndices[i]) {
+ return false;
+ }
+ }
+
+ return true;
}
//! Inverse comparison operator. Checks whether the index
//! array of two faces is NOT identical
- bool operator != (const aiFace& o) const
- {
+ bool operator != (const aiFace& o) const {
return !(*this == o);
}
#endif // __cplusplus
@@ -199,8 +209,7 @@ struct aiFace
// ---------------------------------------------------------------------------
/** @brief A single influence of a bone on a vertex.
*/
-struct aiVertexWeight
-{
+struct aiVertexWeight {
//! Index of the vertex which is influenced by the bone.
unsigned int mVertexId;
@@ -211,14 +220,28 @@ struct aiVertexWeight
#ifdef __cplusplus
//! Default constructor
- aiVertexWeight() { }
+ aiVertexWeight() AI_NO_EXCEPT
+ : mVertexId(0)
+ , mWeight(0.0f) {
+ // empty
+ }
- //! Initialisation from a given index and vertex weight factor
+ //! Initialization from a given index and vertex weight factor
//! \param pID ID
//! \param pWeight Vertex weight factor
- aiVertexWeight( unsigned int pID, float pWeight)
- : mVertexId( pID), mWeight( pWeight)
- { /* nothing to do here */ }
+ aiVertexWeight( unsigned int pID, float pWeight )
+ : mVertexId( pID )
+ , mWeight( pWeight ) {
+ // empty
+ }
+
+ bool operator == ( const aiVertexWeight &rhs ) const {
+ return ( mVertexId == rhs.mVertexId && mWeight == rhs.mWeight );
+ }
+
+ bool operator != ( const aiVertexWeight &rhs ) const {
+ return ( *this == rhs );
+ }
#endif // __cplusplus
};
@@ -229,49 +252,95 @@ struct aiVertexWeight
*
* A bone has a name by which it can be found in the frame hierarchy and by
* which it can be addressed by animations. In addition it has a number of
- * influences on vertices.
+ * influences on vertices, and a matrix relating the mesh position to the
+ * position of the bone at the time of binding.
*/
-struct aiBone
-{
+struct aiBone {
//! The name of the bone.
C_STRUCT aiString mName;
- //! The number of vertices affected by this bone
+ //! The number of vertices affected by this bone.
//! The maximum value for this member is #AI_MAX_BONE_WEIGHTS.
unsigned int mNumWeights;
- //! The vertices affected by this bone
+ //! The influence weights of this bone, by vertex index.
C_STRUCT aiVertexWeight* mWeights;
- //! Matrix that transforms from mesh space to bone space in bind pose
+ /** Matrix that transforms from bone space to mesh space in bind pose.
+ *
+ * This matrix describes the position of the mesh
+ * in the local space of this bone when the skeleton was bound.
+ * Thus it can be used directly to determine a desired vertex position,
+ * given the world-space transform of the bone when animated,
+ * and the position of the vertex in mesh space.
+ *
+ * It is sometimes called an inverse-bind matrix,
+ * or inverse bind pose matrix.
+ */
C_STRUCT aiMatrix4x4 mOffsetMatrix;
#ifdef __cplusplus
//! Default constructor
- aiBone()
- : mName()
- , mNumWeights( 0 )
- , mWeights( NULL )
- {
+ aiBone() AI_NO_EXCEPT
+ : mName()
+ , mNumWeights( 0 )
+ , mWeights( nullptr )
+ , mOffsetMatrix() {
+ // empty
}
//! Copy constructor
aiBone(const aiBone& other)
- : mName( other.mName )
- , mNumWeights( other.mNumWeights )
- , mOffsetMatrix( other.mOffsetMatrix )
- {
+ : mName( other.mName )
+ , mNumWeights( other.mNumWeights )
+ , mWeights(nullptr)
+ , mOffsetMatrix( other.mOffsetMatrix ) {
+ if (other.mWeights && other.mNumWeights) {
+ mWeights = new aiVertexWeight[mNumWeights];
+ ::memcpy(mWeights,other.mWeights,mNumWeights * sizeof(aiVertexWeight));
+ }
+ }
+
+
+ //! Assignment operator
+ aiBone &operator=(const aiBone& other) {
+ if (this == &other) {
+ return *this;
+ }
+
+ mName = other.mName;
+ mNumWeights = other.mNumWeights;
+ mOffsetMatrix = other.mOffsetMatrix;
+
if (other.mWeights && other.mNumWeights)
{
+ if (mWeights) {
+ delete[] mWeights;
+ }
+
mWeights = new aiVertexWeight[mNumWeights];
::memcpy(mWeights,other.mWeights,mNumWeights * sizeof(aiVertexWeight));
}
+
+ return *this;
}
+ bool operator == ( const aiBone &rhs ) const {
+ if ( mName != rhs.mName || mNumWeights != rhs.mNumWeights ) {
+ return false;
+ }
+
+ for ( size_t i = 0; i < mNumWeights; ++i ) {
+ if ( mWeights[ i ] != rhs.mWeights[ i ] ) {
+ return false;
+ }
+ }
+
+ return true;
+ }
//! Destructor - deletes the array of vertex weights
- ~aiBone()
- {
+ ~aiBone() {
delete [] mWeights;
}
#endif // __cplusplus
@@ -385,11 +454,13 @@ struct aiAnimMesh
#ifdef __cplusplus
- aiAnimMesh()
- : mVertices( NULL )
- , mNormals( NULL )
- , mTangents( NULL )
- , mBitangents( NULL )
+ aiAnimMesh() AI_NO_EXCEPT
+ : mVertices( nullptr )
+ , mNormals(nullptr)
+ , mTangents(nullptr)
+ , mBitangents(nullptr)
+ , mColors()
+ , mTextureCoords()
, mNumVertices( 0 )
, mWeight( 0.0f )
{
@@ -644,35 +715,36 @@ struct aiMesh
#ifdef __cplusplus
//! Default constructor. Initializes all members to 0
- aiMesh()
- : mPrimitiveTypes( 0 )
- , mNumVertices( 0 )
- , mNumFaces( 0 )
- , mVertices( NULL )
- , mNormals( NULL )
- , mTangents( NULL )
- , mBitangents( NULL )
- , mFaces( NULL )
- , mNumBones( 0 )
- , mBones( NULL )
- , mMaterialIndex( 0 )
- , mNumAnimMeshes( 0 )
- , mAnimMeshes( NULL )
- , mMethod( 0 )
- {
- for( unsigned int a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; a++)
- {
+ aiMesh() AI_NO_EXCEPT
+ : mPrimitiveTypes( 0 )
+ , mNumVertices( 0 )
+ , mNumFaces( 0 )
+ , mVertices( nullptr )
+ , mNormals(nullptr)
+ , mTangents(nullptr)
+ , mBitangents(nullptr)
+ , mColors()
+ , mTextureCoords()
+ , mNumUVComponents()
+ , mFaces(nullptr)
+ , mNumBones( 0 )
+ , mBones(nullptr)
+ , mMaterialIndex( 0 )
+ , mNumAnimMeshes( 0 )
+ , mAnimMeshes(nullptr)
+ , mMethod( 0 ) {
+ for( unsigned int a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++a ) {
mNumUVComponents[a] = 0;
- mTextureCoords[a] = NULL;
+ mTextureCoords[a] = nullptr;
}
- for( unsigned int a = 0; a < AI_MAX_NUMBER_OF_COLOR_SETS; a++)
- mColors[a] = NULL;
+ for (unsigned int a = 0; a < AI_MAX_NUMBER_OF_COLOR_SETS; ++a) {
+ mColors[a] = nullptr;
+ }
}
//! Deletes all storage allocated for the mesh
- ~aiMesh()
- {
+ ~aiMesh() {
delete [] mVertices;
delete [] mNormals;
delete [] mTangents;
@@ -705,63 +777,67 @@ struct aiMesh
//! Check whether the mesh contains positions. Provided no special
//! scene flags are set, this will always be true
bool HasPositions() const
- { return mVertices != NULL && mNumVertices > 0; }
+ { return mVertices != nullptr && mNumVertices > 0; }
//! Check whether the mesh contains faces. If no special scene flags
//! are set this should always return true
bool HasFaces() const
- { return mFaces != NULL && mNumFaces > 0; }
+ { return mFaces != nullptr && mNumFaces > 0; }
//! Check whether the mesh contains normal vectors
bool HasNormals() const
- { return mNormals != NULL && mNumVertices > 0; }
+ { return mNormals != nullptr && mNumVertices > 0; }
//! Check whether the mesh contains tangent and bitangent vectors
//! It is not possible that it contains tangents and no bitangents
//! (or the other way round). The existence of one of them
//! implies that the second is there, too.
bool HasTangentsAndBitangents() const
- { return mTangents != NULL && mBitangents != NULL && mNumVertices > 0; }
+ { return mTangents != nullptr && mBitangents != nullptr && mNumVertices > 0; }
//! Check whether the mesh contains a vertex color set
//! \param pIndex Index of the vertex color set
- bool HasVertexColors( unsigned int pIndex) const
- {
- if( pIndex >= AI_MAX_NUMBER_OF_COLOR_SETS)
+ bool HasVertexColors( unsigned int pIndex) const {
+ if (pIndex >= AI_MAX_NUMBER_OF_COLOR_SETS) {
return false;
- else
- return mColors[pIndex] != NULL && mNumVertices > 0;
+ } else {
+ return mColors[pIndex] != nullptr && mNumVertices > 0;
+ }
}
//! Check whether the mesh contains a texture coordinate set
//! \param pIndex Index of the texture coordinates set
- bool HasTextureCoords( unsigned int pIndex) const
- {
- if( pIndex >= AI_MAX_NUMBER_OF_TEXTURECOORDS)
+ bool HasTextureCoords( unsigned int pIndex) const {
+ if (pIndex >= AI_MAX_NUMBER_OF_TEXTURECOORDS) {
return false;
- else
- return mTextureCoords[pIndex] != NULL && mNumVertices > 0;
+ } else {
+ return mTextureCoords[pIndex] != nullptr && mNumVertices > 0;
+ }
}
//! Get the number of UV channels the mesh contains
- unsigned int GetNumUVChannels() const
- {
- unsigned int n = 0;
- while (n < AI_MAX_NUMBER_OF_TEXTURECOORDS && mTextureCoords[n])++n;
+ unsigned int GetNumUVChannels() const {
+ unsigned int n( 0 );
+ while (n < AI_MAX_NUMBER_OF_TEXTURECOORDS && mTextureCoords[n]) {
+ ++n;
+ }
+
return n;
}
//! Get the number of vertex color channels the mesh contains
- unsigned int GetNumColorChannels() const
- {
- unsigned int n = 0;
- while (n < AI_MAX_NUMBER_OF_COLOR_SETS && mColors[n])++n;
+ unsigned int GetNumColorChannels() const {
+ unsigned int n(0);
+ while (n < AI_MAX_NUMBER_OF_COLOR_SETS && mColors[n]) {
+ ++n;
+ }
return n;
}
//! Check whether the mesh contains bones
- inline bool HasBones() const
- { return mBones != NULL && mNumBones > 0; }
+ bool HasBones() const {
+ return mBones != nullptr && mNumBones > 0;
+ }
#endif // __cplusplus
};
diff --git a/include/assimp/metadata.h b/include/assimp/metadata.h
index ded08d14b..498e2f6d1 100644
--- a/include/assimp/metadata.h
+++ b/include/assimp/metadata.h
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -66,6 +67,7 @@ typedef enum aiMetadataType {
AI_DOUBLE = 4,
AI_AISTRING = 5,
AI_AIVECTOR3D = 6,
+ AI_META_MAX = 7,
#ifndef SWIG
FORCE_32BIT = INT_MAX
@@ -127,44 +129,106 @@ struct aiMetadata {
/**
* @brief The default constructor, set all members to zero by default.
*/
- aiMetadata()
+ aiMetadata() AI_NO_EXCEPT
: mNumProperties(0)
- , mKeys(NULL)
- , mValues(NULL) {
+ , mKeys(nullptr)
+ , mValues(nullptr) {
// empty
}
+ aiMetadata( const aiMetadata &rhs )
+ : mNumProperties( rhs.mNumProperties )
+ , mKeys( nullptr )
+ , mValues( nullptr ) {
+ mKeys = new aiString[ mNumProperties ];
+ for ( size_t i = 0; i < static_cast<size_t>( mNumProperties ); ++i ) {
+ mKeys[ i ] = rhs.mKeys[ i ];
+ }
+ mValues = new aiMetadataEntry[ mNumProperties ];
+ for ( size_t i = 0; i < static_cast<size_t>(mNumProperties); ++i ) {
+ mValues[ i ].mType = rhs.mValues[ i ].mType;
+ switch ( rhs.mValues[ i ].mType ) {
+ case AI_BOOL:
+ mValues[ i ].mData = new bool;
+ ::memcpy( mValues[ i ].mData, rhs.mValues[ i ].mData, sizeof(bool) );
+ break;
+ case AI_INT32: {
+ int32_t v;
+ ::memcpy( &v, rhs.mValues[ i ].mData, sizeof( int32_t ) );
+ mValues[ i ].mData = new int32_t( v );
+ }
+ break;
+ case AI_UINT64: {
+ uint64_t v;
+ ::memcpy( &v, rhs.mValues[ i ].mData, sizeof( uint64_t ) );
+ mValues[ i ].mData = new uint64_t( v );
+ }
+ break;
+ case AI_FLOAT: {
+ float v;
+ ::memcpy( &v, rhs.mValues[ i ].mData, sizeof( float ) );
+ mValues[ i ].mData = new float( v );
+ }
+ break;
+ case AI_DOUBLE: {
+ double v;
+ ::memcpy( &v, rhs.mValues[ i ].mData, sizeof( double ) );
+ mValues[ i ].mData = new double( v );
+ }
+ break;
+ case AI_AISTRING: {
+ aiString v;
+ rhs.Get<aiString>( mKeys[ i ], v );
+ mValues[ i ].mData = new aiString( v );
+ }
+ break;
+ case AI_AIVECTOR3D: {
+ aiVector3D v;
+ rhs.Get<aiVector3D>( mKeys[ i ], v );
+ mValues[ i ].mData = new aiVector3D( v );
+ }
+ break;
+#ifndef SWIG
+ case FORCE_32BIT:
+#endif
+ default:
+ break;
+ }
+
+ }
+ }
+
/**
* @brief The destructor.
*/
~aiMetadata() {
delete [] mKeys;
- mKeys = NULL;
+ mKeys = nullptr;
if (mValues) {
// Delete each metadata entry
for (unsigned i=0; i<mNumProperties; ++i) {
void* data = mValues[i].mData;
switch (mValues[i].mType) {
case AI_BOOL:
- delete static_cast<bool*>(data);
+ delete static_cast< bool* >( data );
break;
case AI_INT32:
- delete static_cast<int32_t*>(data);
+ delete static_cast< int32_t* >( data );
break;
case AI_UINT64:
- delete static_cast<uint64_t*>(data);
+ delete static_cast< uint64_t* >( data );
break;
case AI_FLOAT:
- delete static_cast<float*>(data);
+ delete static_cast< float* >( data );
break;
case AI_DOUBLE:
- delete static_cast<double*>(data);
+ delete static_cast< double* >( data );
break;
case AI_AISTRING:
- delete static_cast<aiString*>(data);
+ delete static_cast< aiString* >( data );
break;
case AI_AIVECTOR3D:
- delete static_cast<aiVector3D*>(data);
+ delete static_cast< aiVector3D* >( data );
break;
#ifndef SWIG
case FORCE_32BIT:
@@ -176,7 +240,7 @@ struct aiMetadata {
// Delete the metadata array
delete [] mValues;
- mValues = NULL;
+ mValues = nullptr;
}
}
@@ -187,7 +251,7 @@ struct aiMetadata {
static inline
aiMetadata *Alloc( unsigned int numProperties ) {
if ( 0 == numProperties ) {
- return NULL;
+ return nullptr;
}
aiMetadata *data = new aiMetadata;
@@ -207,8 +271,8 @@ struct aiMetadata {
}
template<typename T>
- inline void Add(const std::string& key, const T& value)
- {
+ inline
+ void Add(const std::string& key, const T& value) {
aiString* new_keys = new aiString[mNumProperties + 1];
aiMetadataEntry* new_values = new aiMetadataEntry[mNumProperties + 1];
@@ -255,7 +319,7 @@ struct aiMetadata {
template<typename T>
inline
- bool Get( unsigned index, T& value ) {
+ bool Get( unsigned index, T& value ) const {
// In range assertion
if ( index >= mNumProperties ) {
return false;
@@ -276,7 +340,7 @@ struct aiMetadata {
template<typename T>
inline
- bool Get( const aiString& key, T& value ) {
+ bool Get( const aiString& key, T& value ) const {
// Search for the given key
for ( unsigned int i = 0; i < mNumProperties; ++i ) {
if ( mKeys[ i ] == key ) {
@@ -287,7 +351,8 @@ struct aiMetadata {
}
template<typename T>
- inline bool Get( const std::string& key, T& value ) {
+ inline
+ bool Get( const std::string& key, T& value ) const {
return Get(aiString(key), value);
}
@@ -296,7 +361,8 @@ struct aiMetadata {
/// \param [out] pKey - pointer to the key value.
/// \param [out] pEntry - pointer to the entry: type and value.
/// \return false - if pIndex is out of range, else - true.
- inline bool Get(size_t index, const aiString*& key, const aiMetadataEntry*& entry) {
+ inline
+ bool Get(size_t index, const aiString*& key, const aiMetadataEntry*& entry) const {
if ( index >= mNumProperties ) {
return false;
}
diff --git a/include/assimp/pbrmaterial.h b/include/assimp/pbrmaterial.h
new file mode 100644
index 000000000..723957300
--- /dev/null
+++ b/include/assimp/pbrmaterial.h
@@ -0,0 +1,77 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2018, assimp 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 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 pbrmaterial.h
+ * @brief Defines the material system of the library
+ */
+#ifndef AI_PBRMATERIAL_H_INC
+#define AI_PBRMATERIAL_H_INC
+
+#define AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_BASE_COLOR_FACTOR "$mat.gltf.pbrMetallicRoughness.baseColorFactor", 0, 0
+#define AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_METALLIC_FACTOR "$mat.gltf.pbrMetallicRoughness.metallicFactor", 0, 0
+#define AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_ROUGHNESS_FACTOR "$mat.gltf.pbrMetallicRoughness.roughnessFactor", 0, 0
+#define AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_BASE_COLOR_TEXTURE aiTextureType_DIFFUSE, 1
+#define AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_METALLICROUGHNESS_TEXTURE aiTextureType_UNKNOWN, 0
+#define AI_MATKEY_GLTF_ALPHAMODE "$mat.gltf.alphaMode", 0, 0
+#define AI_MATKEY_GLTF_ALPHACUTOFF "$mat.gltf.alphaCutoff", 0, 0
+#define AI_MATKEY_GLTF_PBRSPECULARGLOSSINESS "$mat.gltf.pbrSpecularGlossiness", 0, 0
+#define AI_MATKEY_GLTF_PBRSPECULARGLOSSINESS_GLOSSINESS_FACTOR "$mat.gltf.pbrMetallicRoughness.glossinessFactor", 0, 0
+#define AI_MATKEY_GLTF_UNLIT "$mat.gltf.unlit", 0, 0
+
+#define _AI_MATKEY_GLTF_TEXTURE_TEXCOORD_BASE "$tex.file.texCoord"
+#define _AI_MATKEY_GLTF_MAPPINGNAME_BASE "$tex.mappingname"
+#define _AI_MATKEY_GLTF_MAPPINGID_BASE "$tex.mappingid"
+#define _AI_MATKEY_GLTF_MAPPINGFILTER_MAG_BASE "$tex.mappingfiltermag"
+#define _AI_MATKEY_GLTF_MAPPINGFILTER_MIN_BASE "$tex.mappingfiltermin"
+#define _AI_MATKEY_GLTF_SCALE_BASE "$tex.scale"
+#define _AI_MATKEY_GLTF_STRENGTH_BASE "$tex.strength"
+
+#define AI_MATKEY_GLTF_TEXTURE_TEXCOORD(type, N) _AI_MATKEY_GLTF_TEXTURE_TEXCOORD_BASE, type, N
+#define AI_MATKEY_GLTF_MAPPINGNAME(type, N) _AI_MATKEY_GLTF_MAPPINGNAME_BASE, type, N
+#define AI_MATKEY_GLTF_MAPPINGID(type, N) _AI_MATKEY_GLTF_MAPPINGID_BASE, type, N
+#define AI_MATKEY_GLTF_MAPPINGFILTER_MAG(type, N) _AI_MATKEY_GLTF_MAPPINGFILTER_MAG_BASE, type, N
+#define AI_MATKEY_GLTF_MAPPINGFILTER_MIN(type, N) _AI_MATKEY_GLTF_MAPPINGFILTER_MIN_BASE, type, N
+#define AI_MATKEY_GLTF_TEXTURE_SCALE(type, N) _AI_MATKEY_GLTF_SCALE_BASE, type, N
+#define AI_MATKEY_GLTF_TEXTURE_STRENGTH(type, N) _AI_MATKEY_GLTF_STRENGTH_BASE, type, N
+
+#endif //!!AI_PBRMATERIAL_H_INC
diff --git a/include/assimp/postprocess.h b/include/assimp/postprocess.h
index b35bc34f5..a0ae0a1bc 100644
--- a/include/assimp/postprocess.h
+++ b/include/assimp/postprocess.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -360,6 +361,11 @@ enum aiPostProcessSteps
* and line meshes from the scene.
* </li>
* </ul>
+ *
+ * This step also removes very small triangles with a surface area smaller
+ * than 10^-6. If you rely on having these small triangles, or notice holes
+ * in your model, set the property <tt>#AI_CONFIG_PP_FD_CHECKAREA</tt> to
+ * false.
* @note Degenerate polygons are not necessarily evil and that's why
* they're not removed by default. There are several file formats which
* don't support lines or points, and some exporters bypass the
@@ -525,11 +531,49 @@ enum aiPostProcessSteps
* Use <tt>#AI_CONFIG_PP_DB_ALL_OR_NONE</tt> if you want bones removed if and
* only if all bones within the scene qualify for removal.
*/
- aiProcess_Debone = 0x4000000
+ aiProcess_Debone = 0x4000000,
+ // -------------------------------------------------------------------------
+ /** <hr>This step will perform a global scale of the model.
+ *
+ * Some importers are providing a mechanism to define a scaling unit for the
+ * model. This post processing step can be used to do so. You need to get the
+ * global scaling from your importer settings like in FBX. Use the flag
+ * AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY from the global property table to configure this.
+ *
+ * Use <tt>#AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY</tt> to setup the global scaing factor.
+ */
+ aiProcess_GlobalScale = 0x8000000,
+
+ // -------------------------------------------------------------------------
+ /** <hr>A postprocessing step to embed of textures.
+ *
+ * This will remove external data dependencies for textures.
+ * If a texture's file does not exist at the specified path
+ * (due, for instance, to an absolute path generated on another system),
+ * it will check if a file with the same name exists at the root folder
+ * of the imported model. And if so, it uses that.
+ */
+ aiProcess_EmbedTextures = 0x10000000,
+
// aiProcess_GenEntityMeshes = 0x100000,
// aiProcess_OptimizeAnimations = 0x200000
// aiProcess_FixTexturePaths = 0x200000
+
+
+ aiProcess_ForceGenNormals = 0x20000000,
+
+ // -------------------------------------------------------------------------
+ /** <hr>Drops normals for all faces of all meshes.
+ *
+ * This is ignored if no normals are present.
+ * Face normals are shared between all points of a single face,
+ * so a single point can have multiple normals, which
+ * forces the library to duplicate vertices in some cases.
+ * #aiProcess_JoinIdenticalVertices is *senseless* then.
+ * This process gives sense back to aiProcess_JoinIdenticalVertices
+ */
+ aiProcess_DropNormals = 0x40000000,
};
diff --git a/code/qnan.h b/include/assimp/qnan.h
index fcff16b74..251688989 100644
--- a/code/qnan.h
+++ b/include/assimp/qnan.h
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -97,8 +98,10 @@ AI_FORCE_INLINE bool is_qnan(float in)
// compare <register-with-different-width> against <in>
// FIXME: Use <float> stuff instead? I think fpclassify needs C99
- return (reinterpret_cast<_IEEESingle*>(&in)->IEEE.Exp == (1u << 8)-1 &&
- reinterpret_cast<_IEEESingle*>(&in)->IEEE.Frac);
+ _IEEESingle temp;
+ memcpy(&temp, &in, sizeof(float));
+ return (temp.IEEE.Exp == (1u << 8)-1 &&
+ temp.IEEE.Frac);
}
// ---------------------------------------------------------------------------
@@ -113,8 +116,10 @@ AI_FORCE_INLINE bool is_qnan(double in)
// compare <register-with-different-width> against <in>
// FIXME: Use <float> stuff instead? I think fpclassify needs C99
- return (reinterpret_cast<_IEEEDouble*>(&in)->IEEE.Exp == (1u << 11)-1 &&
- reinterpret_cast<_IEEEDouble*>(&in)->IEEE.Frac);
+ _IEEEDouble temp;
+ memcpy(&temp, &in, sizeof(in));
+ return (temp.IEEE.Exp == (1u << 11)-1 &&
+ temp.IEEE.Frac);
}
// ---------------------------------------------------------------------------
@@ -124,7 +129,9 @@ AI_FORCE_INLINE bool is_qnan(double in)
* @param in Input value */
AI_FORCE_INLINE bool is_special_float(float in)
{
- return (reinterpret_cast<_IEEESingle*>(&in)->IEEE.Exp == (1u << 8)-1);
+ _IEEESingle temp;
+ memcpy(&temp, &in, sizeof(float));
+ return (temp.IEEE.Exp == (1u << 8)-1);
}
// ---------------------------------------------------------------------------
@@ -134,7 +141,9 @@ AI_FORCE_INLINE bool is_special_float(float in)
* @param in Input value */
AI_FORCE_INLINE bool is_special_float(double in)
{
- return (reinterpret_cast<_IEEEDouble*>(&in)->IEEE.Exp == (1u << 11)-1);
+ _IEEESingle temp;
+ memcpy(&temp, &in, sizeof(float));
+ return (temp.IEEE.Exp == (1u << 11)-1);
}
// ---------------------------------------------------------------------------
diff --git a/include/assimp/quaternion.h b/include/assimp/quaternion.h
index a5cb67a9a..e2479f2ed 100644
--- a/include/assimp/quaternion.h
+++ b/include/assimp/quaternion.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -59,7 +60,7 @@ template <typename TReal>
class aiQuaterniont
{
public:
- aiQuaterniont() : w(1.0), x(), y(), z() {}
+ aiQuaterniont() AI_NO_EXCEPT : w(1.0), x(), y(), z() {}
aiQuaterniont(TReal pw, TReal px, TReal py, TReal pz)
: w(pw), x(px), y(py), z(pz) {}
diff --git a/include/assimp/quaternion.inl b/include/assimp/quaternion.inl
index d0bf5831c..0a2c92937 100644
--- a/include/assimp/quaternion.inl
+++ b/include/assimp/quaternion.inl
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
diff --git a/include/assimp/scene.h b/include/assimp/scene.h
index 4d027456c..867e87de0 100644
--- a/include/assimp/scene.h
+++ b/include/assimp/scene.h
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -60,6 +61,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
extern "C" {
#endif
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wattributes"
+#endif
+
// -------------------------------------------------------------------------------
/**
* A node in the imported hierarchy.
@@ -163,6 +169,9 @@ struct ASSIMP_API aiNode
#endif // __cplusplus
};
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
// -------------------------------------------------------------------------------
/**
@@ -318,6 +327,16 @@ struct aiScene
*/
C_STRUCT aiCamera** mCameras;
+ /**
+ * @brief The global metadata assigned to the scene itself.
+ *
+ * This data contains global metadata which belongs to the scene like
+ * unit-conversions, versions, vendors or other model-specific data. This
+ * can be used to store format-specific metadata as well.
+ */
+ C_STRUCT aiMetadata* mMetaData;
+
+
#ifdef __cplusplus
//! Default constructor - set everything to 0/NULL
@@ -358,6 +377,27 @@ struct aiScene
return mAnimations != NULL && mNumAnimations > 0;
}
+ //! Returns a short filename from a full path
+ static const char* GetShortFilename(const char* filename) {
+ const char* lastSlash = strrchr(filename, '/');
+ if (lastSlash == nullptr) {
+ lastSlash = strrchr(filename, '\\');
+ }
+ const char* shortFilename = lastSlash != nullptr ? lastSlash + 1 : filename;
+ return shortFilename;
+ }
+
+ //! Returns an embedded texture
+ const aiTexture* GetEmbeddedTexture(const char* filename) const {
+ const char* shortFilename = GetShortFilename(filename);
+ for (unsigned int i = 0; i < mNumTextures; i++) {
+ const char* shortTextureFilename = GetShortFilename(mTextures[i]->mFilename.C_Str());
+ if (strcmp(shortTextureFilename, shortFilename) == 0) {
+ return mTextures[i];
+ }
+ }
+ return nullptr;
+ }
#endif // __cplusplus
/** Internal data, do not touch */
diff --git a/include/assimp/texture.h b/include/assimp/texture.h
index c09ef2cbe..5be7229ec 100644
--- a/include/assimp/texture.h
+++ b/include/assimp/texture.h
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -130,8 +131,7 @@ struct aiTexel
* as the texture paths (a single asterisk character followed by the
* zero-based index of the texture in the aiScene::mTextures array).
*/
-struct aiTexture
-{
+struct aiTexture {
/** Width of the texture, in pixels
*
* If mHeight is zero the texture is compressed in a format
@@ -179,6 +179,12 @@ struct aiTexture
*/
C_STRUCT aiTexel* pcData;
+ /** Texture original filename
+ *
+ * Used to get the texture reference
+ */
+ C_STRUCT aiString mFilename;
+
#ifdef __cplusplus
//! For compressed textures (mHeight == 0): compare the
@@ -186,24 +192,26 @@ struct aiTexture
//! @param s Input string. 3 characters are maximally processed.
//! Example values: "jpg", "png"
//! @return true if the given string matches the format hint
- bool CheckFormat(const char* s) const
- {
+ bool CheckFormat(const char* s) const {
+ if (nullptr == s) {
+ return false;
+ }
+
return (0 == ::strncmp(achFormatHint, s, sizeof(achFormatHint)));
}
// Construction
- aiTexture ()
- : mWidth (0)
- , mHeight (0)
- , pcData (NULL)
- {
+ aiTexture() AI_NO_EXCEPT
+ : mWidth(0)
+ , mHeight(0)
+ , pcData(nullptr)
+ , mFilename() {
achFormatHint[0] = achFormatHint[1] = 0;
achFormatHint[2] = achFormatHint[3] = 0;
}
// Destruction
- ~aiTexture ()
- {
+ ~aiTexture () {
delete[] pcData;
}
#endif
diff --git a/include/assimp/types.h b/include/assimp/types.h
index 0012a0bba..660479f8a 100644
--- a/include/assimp/types.h
+++ b/include/assimp/types.h
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -110,8 +111,7 @@ extern "C" {
/** Maximum dimension for strings, ASSIMP strings are zero terminated. */
#ifdef __cplusplus
-static
-const size_t MAXLEN = 1024;
+ static const size_t MAXLEN = 1024;
#else
# define MAXLEN 1024
#endif
@@ -119,10 +119,9 @@ const size_t MAXLEN = 1024;
// ----------------------------------------------------------------------------------
/** Represents a plane in a three-dimensional, euclidean space
*/
-struct aiPlane
-{
+struct aiPlane {
#ifdef __cplusplus
- aiPlane () : a(0.f), b(0.f), c(0.f), d(0.f) {}
+ aiPlane () AI_NO_EXCEPT : a(0.f), b(0.f), c(0.f), d(0.f) {}
aiPlane (ai_real _a, ai_real _b, ai_real _c, ai_real _d)
: a(_a), b(_b), c(_c), d(_d) {}
@@ -137,10 +136,9 @@ struct aiPlane
// ----------------------------------------------------------------------------------
/** Represents a ray
*/
-struct aiRay
-{
+struct aiRay {
#ifdef __cplusplus
- aiRay () {}
+ aiRay () AI_NO_EXCEPT {}
aiRay (const aiVector3D& _pos, const aiVector3D& _dir)
: pos(_pos), dir(_dir) {}
@@ -158,7 +156,7 @@ struct aiRay
struct aiColor3D
{
#ifdef __cplusplus
- aiColor3D () : r(0.0f), g(0.0f), b(0.0f) {}
+ aiColor3D () AI_NO_EXCEPT : r(0.0f), g(0.0f), b(0.0f) {}
aiColor3D (ai_real _r, ai_real _g, ai_real _b) : r(_r), g(_g), b(_b) {}
explicit aiColor3D (ai_real _r) : r(_r), g(_r), b(_r) {}
aiColor3D (const aiColor3D& o) : r(o.r), g(o.g), b(o.b) {}
@@ -253,9 +251,8 @@ struct aiString
{
#ifdef __cplusplus
/** Default constructor, the string is set to have zero length */
- aiString() :
- length(0)
- {
+ aiString() AI_NO_EXCEPT
+ : length( 0 ) {
data[0] = '\0';
#ifdef ASSIMP_BUILD_DEBUG
@@ -304,6 +301,20 @@ struct aiString
data[len] = 0;
}
+
+ /** Assignment operator */
+ aiString& operator = (const aiString &rOther) {
+ if (this == &rOther) {
+ return *this;
+ }
+
+ length = rOther.length;;
+ memcpy( data, rOther.data, length);
+ data[length] = '\0';
+ return *this;
+ }
+
+
/** Assign a const char* to the string */
aiString& operator = (const char* sz) {
Set(sz);
@@ -359,7 +370,7 @@ struct aiString
#endif // !__cplusplus
/** Binary length of the string excluding the terminal 0. This is NOT the
- * logical length of strings containing UTF-8 multibyte sequences! It's
+ * logical length of strings containing UTF-8 multi-byte sequences! It's
* the number of bytes from the beginning of the string to its end.*/
size_t length;
@@ -465,7 +476,7 @@ struct aiMemoryInfo
#ifdef __cplusplus
/** Default constructor */
- aiMemoryInfo()
+ aiMemoryInfo() AI_NO_EXCEPT
: textures (0)
, materials (0)
, meshes (0)
diff --git a/include/assimp/vector2.h b/include/assimp/vector2.h
index 564d1f8b5..85ca6d0a4 100644
--- a/include/assimp/vector2.h
+++ b/include/assimp/vector2.h
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -52,7 +53,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# include <math.h>
#endif
-#include "./Compiler/pushpack1.h"
#include "defs.h"
// ----------------------------------------------------------------------------------
@@ -61,31 +61,24 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifdef __cplusplus
template <typename TReal>
-class aiVector2t
-{
+class aiVector2t {
public:
-
aiVector2t () : x(), y() {}
aiVector2t (TReal _x, TReal _y) : x(_x), y(_y) {}
explicit aiVector2t (TReal _xyz) : x(_xyz), y(_xyz) {}
- aiVector2t (const aiVector2t& o) : x(o.x), y(o.y) {}
-
-public:
+ aiVector2t (const aiVector2t& o) = default;
void Set( TReal pX, TReal pY);
TReal SquareLength() const ;
TReal Length() const ;
aiVector2t& Normalize();
-public:
-
const aiVector2t& operator += (const aiVector2t& o);
const aiVector2t& operator -= (const aiVector2t& o);
const aiVector2t& operator *= (TReal f);
const aiVector2t& operator /= (TReal f);
TReal operator[](unsigned int i) const;
- TReal& operator[](unsigned int i);
bool operator== (const aiVector2t& other) const;
bool operator!= (const aiVector2t& other) const;
@@ -99,7 +92,7 @@ public:
operator aiVector2t<TOther> () const;
TReal x, y;
-} PACK_STRUCT;
+};
typedef aiVector2t<ai_real> aiVector2D;
@@ -111,6 +104,4 @@ struct aiVector2D {
#endif // __cplusplus
-#include "./Compiler/poppack1.h"
-
#endif // AI_VECTOR2D_H_INC
diff --git a/include/assimp/vector2.inl b/include/assimp/vector2.inl
index 5ce13eece..46c6c9d27 100644
--- a/include/assimp/vector2.inl
+++ b/include/assimp/vector2.inl
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -60,24 +61,28 @@ aiVector2t<TReal>::operator aiVector2t<TOther> () const {
}
// ------------------------------------------------------------------------------------------------
template <typename TReal>
+inline
void aiVector2t<TReal>::Set( TReal pX, TReal pY) {
x = pX; y = pY;
}
// ------------------------------------------------------------------------------------------------
template <typename TReal>
+inline
TReal aiVector2t<TReal>::SquareLength() const {
return x*x + y*y;
}
// ------------------------------------------------------------------------------------------------
template <typename TReal>
+inline
TReal aiVector2t<TReal>::Length() const {
return std::sqrt( SquareLength());
}
// ------------------------------------------------------------------------------------------------
template <typename TReal>
+inline
aiVector2t<TReal>& aiVector2t<TReal>::Normalize() {
*this /= Length();
return *this;
@@ -85,6 +90,7 @@ aiVector2t<TReal>& aiVector2t<TReal>::Normalize() {
// ------------------------------------------------------------------------------------------------
template <typename TReal>
+inline
const aiVector2t<TReal>& aiVector2t<TReal>::operator += (const aiVector2t& o) {
x += o.x; y += o.y;
return *this;
@@ -92,6 +98,7 @@ const aiVector2t<TReal>& aiVector2t<TReal>::operator += (const aiVector2t& o) {
// ------------------------------------------------------------------------------------------------
template <typename TReal>
+inline
const aiVector2t<TReal>& aiVector2t<TReal>::operator -= (const aiVector2t& o) {
x -= o.x; y -= o.y;
return *this;
@@ -99,6 +106,7 @@ const aiVector2t<TReal>& aiVector2t<TReal>::operator -= (const aiVector2t& o) {
// ------------------------------------------------------------------------------------------------
template <typename TReal>
+inline
const aiVector2t<TReal>& aiVector2t<TReal>::operator *= (TReal f) {
x *= f; y *= f;
return *this;
@@ -106,6 +114,7 @@ const aiVector2t<TReal>& aiVector2t<TReal>::operator *= (TReal f) {
// ------------------------------------------------------------------------------------------------
template <typename TReal>
+inline
const aiVector2t<TReal>& aiVector2t<TReal>::operator /= (TReal f) {
x /= f; y /= f;
return *this;
@@ -113,30 +122,37 @@ const aiVector2t<TReal>& aiVector2t<TReal>::operator /= (TReal f) {
// ------------------------------------------------------------------------------------------------
template <typename TReal>
+inline
TReal aiVector2t<TReal>::operator[](unsigned int i) const {
- return *(&x + i);
-}
+ switch (i) {
+ case 0:
+ return x;
+ case 1:
+ return y;
+ default:
+ break;
-// ------------------------------------------------------------------------------------------------
-template <typename TReal>
-TReal& aiVector2t<TReal>::operator[](unsigned int i) {
- return *(&x + i);
+ }
+ return x;
}
// ------------------------------------------------------------------------------------------------
template <typename TReal>
+inline
bool aiVector2t<TReal>::operator== (const aiVector2t& other) const {
return x == other.x && y == other.y;
}
// ------------------------------------------------------------------------------------------------
template <typename TReal>
+inline
bool aiVector2t<TReal>::operator!= (const aiVector2t& other) const {
return x != other.x || y != other.y;
}
// ---------------------------------------------------------------------------
template<typename TReal>
+inline
bool aiVector2t<TReal>::Equal(const aiVector2t& other, TReal epsilon) const {
return
std::abs(x - other.x) <= epsilon &&
@@ -145,6 +161,7 @@ bool aiVector2t<TReal>::Equal(const aiVector2t& other, TReal epsilon) const {
// ------------------------------------------------------------------------------------------------
template <typename TReal>
+inline
aiVector2t<TReal>& aiVector2t<TReal>::operator= (TReal f) {
x = y = f;
return *this;
@@ -152,6 +169,7 @@ aiVector2t<TReal>& aiVector2t<TReal>::operator= (TReal f) {
// ------------------------------------------------------------------------------------------------
template <typename TReal>
+inline
const aiVector2t<TReal> aiVector2t<TReal>::SymMul(const aiVector2t& o) {
return aiVector2t(x*o.x,y*o.y);
}
@@ -160,65 +178,64 @@ const aiVector2t<TReal> aiVector2t<TReal>::SymMul(const aiVector2t& o) {
// ------------------------------------------------------------------------------------------------
// symmetric addition
template <typename TReal>
-inline aiVector2t<TReal> operator + (const aiVector2t<TReal>& v1, const aiVector2t<TReal>& v2)
-{
+inline
+aiVector2t<TReal> operator + (const aiVector2t<TReal>& v1, const aiVector2t<TReal>& v2) {
return aiVector2t<TReal>( v1.x + v2.x, v1.y + v2.y);
}
// ------------------------------------------------------------------------------------------------
// symmetric subtraction
template <typename TReal>
-inline aiVector2t<TReal> operator - (const aiVector2t<TReal>& v1, const aiVector2t<TReal>& v2)
-{
+inline
+aiVector2t<TReal> operator - (const aiVector2t<TReal>& v1, const aiVector2t<TReal>& v2) {
return aiVector2t<TReal>( v1.x - v2.x, v1.y - v2.y);
}
// ------------------------------------------------------------------------------------------------
// scalar product
template <typename TReal>
-inline TReal operator * (const aiVector2t<TReal>& v1, const aiVector2t<TReal>& v2)
-{
+inline
+TReal operator * (const aiVector2t<TReal>& v1, const aiVector2t<TReal>& v2) {
return v1.x*v2.x + v1.y*v2.y;
}
// ------------------------------------------------------------------------------------------------
// scalar multiplication
template <typename TReal>
-inline aiVector2t<TReal> operator * ( TReal f, const aiVector2t<TReal>& v)
-{
+inline
+aiVector2t<TReal> operator * ( TReal f, const aiVector2t<TReal>& v) {
return aiVector2t<TReal>( f*v.x, f*v.y);
}
// ------------------------------------------------------------------------------------------------
// and the other way around
template <typename TReal>
-inline aiVector2t<TReal> operator * ( const aiVector2t<TReal>& v, TReal f)
-{
+inline
+aiVector2t<TReal> operator * ( const aiVector2t<TReal>& v, TReal f) {
return aiVector2t<TReal>( f*v.x, f*v.y);
}
// ------------------------------------------------------------------------------------------------
// scalar division
template <typename TReal>
-inline aiVector2t<TReal> operator / ( const aiVector2t<TReal>& v, TReal f)
-{
-
+inline
+aiVector2t<TReal> operator / ( const aiVector2t<TReal>& v, TReal f) {
return v * (1/f);
}
// ------------------------------------------------------------------------------------------------
// vector division
template <typename TReal>
-inline aiVector2t<TReal> operator / ( const aiVector2t<TReal>& v, const aiVector2t<TReal>& v2)
-{
+inline
+aiVector2t<TReal> operator / ( const aiVector2t<TReal>& v, const aiVector2t<TReal>& v2) {
return aiVector2t<TReal>(v.x / v2.x,v.y / v2.y);
}
// ------------------------------------------------------------------------------------------------
// vector negation
template <typename TReal>
-inline aiVector2t<TReal> operator - ( const aiVector2t<TReal>& v)
-{
+inline
+aiVector2t<TReal> operator - ( const aiVector2t<TReal>& v) {
return aiVector2t<TReal>( -v.x, -v.y);
}
diff --git a/include/assimp/vector3.h b/include/assimp/vector3.h
index 946e36cc5..33ae7d22f 100644
--- a/include/assimp/vector3.h
+++ b/include/assimp/vector3.h
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -65,11 +66,10 @@ template <typename TReal>
class aiVector3t
{
public:
-
- aiVector3t () : x(), y(), z() {}
- aiVector3t (TReal _x, TReal _y, TReal _z) : x(_x), y(_y), z(_z) {}
- explicit aiVector3t (TReal _xyz) : x(_xyz), y(_xyz), z(_xyz) {}
- aiVector3t (const aiVector3t& o) : x(o.x), y(o.y), z(o.z) {}
+ aiVector3t() AI_NO_EXCEPT : x(), y(), z() {}
+ aiVector3t(TReal _x, TReal _y, TReal _z) : x(_x), y(_y), z(_z) {}
+ explicit aiVector3t (TReal _xyz ) : x(_xyz), y(_xyz), z(_xyz) {}
+ aiVector3t( const aiVector3t& o ) = default;
public:
diff --git a/include/assimp/vector3.inl b/include/assimp/vector3.inl
index a074bb23a..ebe2f82e9 100644
--- a/include/assimp/vector3.inl
+++ b/include/assimp/vector3.inl
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -55,8 +56,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// ------------------------------------------------------------------------------------------------
/** Transformation of a vector by a 3x3 matrix */
template <typename TReal>
-inline aiVector3t<TReal> operator * (const aiMatrix3x3t<TReal>& pMatrix, const aiVector3t<TReal>& pVector)
-{
+AI_FORCE_INLINE
+aiVector3t<TReal> operator * (const aiMatrix3x3t<TReal>& pMatrix, const aiVector3t<TReal>& pVector) {
aiVector3t<TReal> res;
res.x = pMatrix.a1 * pVector.x + pMatrix.a2 * pVector.y + pMatrix.a3 * pVector.z;
res.y = pMatrix.b1 * pVector.x + pMatrix.b2 * pVector.y + pMatrix.b3 * pVector.z;
@@ -67,8 +68,8 @@ inline aiVector3t<TReal> operator * (const aiMatrix3x3t<TReal>& pMatrix, const a
// ------------------------------------------------------------------------------------------------
/** Transformation of a vector by a 4x4 matrix */
template <typename TReal>
-inline aiVector3t<TReal> operator * (const aiMatrix4x4t<TReal>& pMatrix, const aiVector3t<TReal>& pVector)
-{
+AI_FORCE_INLINE
+aiVector3t<TReal> operator * (const aiMatrix4x4t<TReal>& pMatrix, const aiVector3t<TReal>& pVector) {
aiVector3t<TReal> res;
res.x = pMatrix.a1 * pVector.x + pMatrix.a2 * pVector.y + pMatrix.a3 * pVector.z + pMatrix.a4;
res.y = pMatrix.b1 * pVector.x + pMatrix.b2 * pVector.y + pMatrix.b3 * pVector.z + pMatrix.b4;
@@ -83,66 +84,99 @@ aiVector3t<TReal>::operator aiVector3t<TOther> () const {
}
// ------------------------------------------------------------------------------------------------
template <typename TReal>
-AI_FORCE_INLINE void aiVector3t<TReal>::Set( TReal pX, TReal pY, TReal pZ) {
- x = pX; y = pY; z = pZ;
+AI_FORCE_INLINE
+void aiVector3t<TReal>::Set( TReal pX, TReal pY, TReal pZ) {
+ x = pX;
+ y = pY;
+ z = pZ;
}
// ------------------------------------------------------------------------------------------------
template <typename TReal>
-AI_FORCE_INLINE TReal aiVector3t<TReal>::SquareLength() const {
+AI_FORCE_INLINE
+TReal aiVector3t<TReal>::SquareLength() const {
return x*x + y*y + z*z;
}
// ------------------------------------------------------------------------------------------------
template <typename TReal>
-AI_FORCE_INLINE TReal aiVector3t<TReal>::Length() const {
+AI_FORCE_INLINE
+TReal aiVector3t<TReal>::Length() const {
return std::sqrt( SquareLength());
}
// ------------------------------------------------------------------------------------------------
template <typename TReal>
-AI_FORCE_INLINE aiVector3t<TReal>& aiVector3t<TReal>::Normalize() {
- *this /= Length(); return *this;
+AI_FORCE_INLINE
+aiVector3t<TReal>& aiVector3t<TReal>::Normalize() {
+ *this /= Length();
+
+ return *this;
}
// ------------------------------------------------------------------------------------------------
template <typename TReal>
-AI_FORCE_INLINE aiVector3t<TReal>& aiVector3t<TReal>::NormalizeSafe() {
+AI_FORCE_INLINE
+aiVector3t<TReal>& aiVector3t<TReal>::NormalizeSafe() {
TReal len = Length();
- if (len > static_cast<TReal>(0))
+ if ( len > static_cast< TReal >( 0 ) ) {
*this /= len;
+ }
return *this;
}
// ------------------------------------------------------------------------------------------------
template <typename TReal>
-AI_FORCE_INLINE const aiVector3t<TReal>& aiVector3t<TReal>::operator += (const aiVector3t<TReal>& o) {
- x += o.x; y += o.y; z += o.z; return *this;
+AI_FORCE_INLINE
+const aiVector3t<TReal>& aiVector3t<TReal>::operator += (const aiVector3t<TReal>& o) {
+ x += o.x;
+ y += o.y;
+ z += o.z;
+
+ return *this;
}
// ------------------------------------------------------------------------------------------------
template <typename TReal>
-AI_FORCE_INLINE const aiVector3t<TReal>& aiVector3t<TReal>::operator -= (const aiVector3t<TReal>& o) {
- x -= o.x; y -= o.y; z -= o.z; return *this;
+AI_FORCE_INLINE
+const aiVector3t<TReal>& aiVector3t<TReal>::operator -= (const aiVector3t<TReal>& o) {
+ x -= o.x;
+ y -= o.y;
+ z -= o.z;
+
+ return *this;
}
// ------------------------------------------------------------------------------------------------
template <typename TReal>
-AI_FORCE_INLINE const aiVector3t<TReal>& aiVector3t<TReal>::operator *= (TReal f) {
- x *= f; y *= f; z *= f; return *this;
+AI_FORCE_INLINE
+const aiVector3t<TReal>& aiVector3t<TReal>::operator *= (TReal f) {
+ x *= f;
+ y *= f;
+ z *= f;
+
+ return *this;
}
// ------------------------------------------------------------------------------------------------
template <typename TReal>
-AI_FORCE_INLINE const aiVector3t<TReal>& aiVector3t<TReal>::operator /= (TReal f) {
- x /= f; y /= f; z /= f; return *this;
+AI_FORCE_INLINE
+const aiVector3t<TReal>& aiVector3t<TReal>::operator /= (TReal f) {
+ const TReal invF = (TReal) 1.0 / f;
+ x *= invF;
+ y *= invF;
+ z *= invF;
+
+ return *this;
}
// ------------------------------------------------------------------------------------------------
template <typename TReal>
-AI_FORCE_INLINE aiVector3t<TReal>& aiVector3t<TReal>::operator *= (const aiMatrix3x3t<TReal>& mat){
- return(*this = mat * (*this));
+AI_FORCE_INLINE
+aiVector3t<TReal>& aiVector3t<TReal>::operator *= (const aiMatrix3x3t<TReal>& mat){
+ return (*this = mat * (*this));
}
// ------------------------------------------------------------------------------------------------
template <typename TReal>
-AI_FORCE_INLINE aiVector3t<TReal>& aiVector3t<TReal>::operator *= (const aiMatrix4x4t<TReal>& mat){
- return(*this = mat * (*this));
+AI_FORCE_INLINE
+aiVector3t<TReal>& aiVector3t<TReal>::operator *= (const aiMatrix4x4t<TReal>& mat){
+ return (*this = mat * (*this));
}
// ------------------------------------------------------------------------------------------------
template <typename TReal>
-AI_FORCE_INLINE TReal aiVector3t<TReal>::operator[](unsigned int i) const {
-// return *(&x + i);
+AI_FORCE_INLINE
+TReal aiVector3t<TReal>::operator[](unsigned int i) const {
switch (i) {
case 0:
return x;
@@ -157,7 +191,8 @@ AI_FORCE_INLINE TReal aiVector3t<TReal>::operator[](unsigned int i) const {
}
// ------------------------------------------------------------------------------------------------
template <typename TReal>
-AI_FORCE_INLINE TReal& aiVector3t<TReal>::operator[](unsigned int i) {
+AI_FORCE_INLINE
+TReal& aiVector3t<TReal>::operator[](unsigned int i) {
// return *(&x + i);
switch (i) {
case 0:
@@ -173,17 +208,20 @@ AI_FORCE_INLINE TReal& aiVector3t<TReal>::operator[](unsigned int i) {
}
// ------------------------------------------------------------------------------------------------
template <typename TReal>
-AI_FORCE_INLINE bool aiVector3t<TReal>::operator== (const aiVector3t<TReal>& other) const {
+AI_FORCE_INLINE
+bool aiVector3t<TReal>::operator== (const aiVector3t<TReal>& other) const {
return x == other.x && y == other.y && z == other.z;
}
// ------------------------------------------------------------------------------------------------
template <typename TReal>
-AI_FORCE_INLINE bool aiVector3t<TReal>::operator!= (const aiVector3t<TReal>& other) const {
+AI_FORCE_INLINE
+bool aiVector3t<TReal>::operator!= (const aiVector3t<TReal>& other) const {
return x != other.x || y != other.y || z != other.z;
}
// ---------------------------------------------------------------------------
template<typename TReal>
-AI_FORCE_INLINE bool aiVector3t<TReal>::Equal(const aiVector3t<TReal>& other, TReal epsilon) const {
+AI_FORCE_INLINE
+bool aiVector3t<TReal>::Equal(const aiVector3t<TReal>& other, TReal epsilon) const {
return
std::abs(x - other.x) <= epsilon &&
std::abs(y - other.y) <= epsilon &&
@@ -191,66 +229,77 @@ AI_FORCE_INLINE bool aiVector3t<TReal>::Equal(const aiVector3t<TReal>& other, TR
}
// ------------------------------------------------------------------------------------------------
template <typename TReal>
-AI_FORCE_INLINE bool aiVector3t<TReal>::operator < (const aiVector3t<TReal>& other) const {
+AI_FORCE_INLINE
+bool aiVector3t<TReal>::operator < (const aiVector3t<TReal>& other) const {
return x != other.x ? x < other.x : y != other.y ? y < other.y : z < other.z;
}
// ------------------------------------------------------------------------------------------------
template <typename TReal>
-AI_FORCE_INLINE const aiVector3t<TReal> aiVector3t<TReal>::SymMul(const aiVector3t<TReal>& o) {
+AI_FORCE_INLINE
+const aiVector3t<TReal> aiVector3t<TReal>::SymMul(const aiVector3t<TReal>& o) {
return aiVector3t<TReal>(x*o.x,y*o.y,z*o.z);
}
// ------------------------------------------------------------------------------------------------
// symmetric addition
template <typename TReal>
-AI_FORCE_INLINE aiVector3t<TReal> operator + (const aiVector3t<TReal>& v1, const aiVector3t<TReal>& v2) {
+AI_FORCE_INLINE
+aiVector3t<TReal> operator + (const aiVector3t<TReal>& v1, const aiVector3t<TReal>& v2) {
return aiVector3t<TReal>( v1.x + v2.x, v1.y + v2.y, v1.z + v2.z);
}
// ------------------------------------------------------------------------------------------------
// symmetric subtraction
template <typename TReal>
-AI_FORCE_INLINE aiVector3t<TReal> operator - (const aiVector3t<TReal>& v1, const aiVector3t<TReal>& v2) {
+AI_FORCE_INLINE
+aiVector3t<TReal> operator - (const aiVector3t<TReal>& v1, const aiVector3t<TReal>& v2) {
return aiVector3t<TReal>( v1.x - v2.x, v1.y - v2.y, v1.z - v2.z);
}
// ------------------------------------------------------------------------------------------------
// scalar product
template <typename TReal>
-AI_FORCE_INLINE TReal operator * (const aiVector3t<TReal>& v1, const aiVector3t<TReal>& v2) {
+AI_FORCE_INLINE
+TReal operator * (const aiVector3t<TReal>& v1, const aiVector3t<TReal>& v2) {
return v1.x*v2.x + v1.y*v2.y + v1.z*v2.z;
}
// ------------------------------------------------------------------------------------------------
// scalar multiplication
template <typename TReal>
-AI_FORCE_INLINE aiVector3t<TReal> operator * ( TReal f, const aiVector3t<TReal>& v) {
+AI_FORCE_INLINE
+aiVector3t<TReal> operator * ( TReal f, const aiVector3t<TReal>& v) {
return aiVector3t<TReal>( f*v.x, f*v.y, f*v.z);
}
// ------------------------------------------------------------------------------------------------
// and the other way around
template <typename TReal>
-AI_FORCE_INLINE aiVector3t<TReal> operator * ( const aiVector3t<TReal>& v, TReal f) {
+AI_FORCE_INLINE
+aiVector3t<TReal> operator * ( const aiVector3t<TReal>& v, TReal f) {
return aiVector3t<TReal>( f*v.x, f*v.y, f*v.z);
}
// ------------------------------------------------------------------------------------------------
// scalar division
template <typename TReal>
-AI_FORCE_INLINE aiVector3t<TReal> operator / ( const aiVector3t<TReal>& v, TReal f) {
+AI_FORCE_INLINE
+aiVector3t<TReal> operator / ( const aiVector3t<TReal>& v, TReal f) {
return v * (1/f);
}
// ------------------------------------------------------------------------------------------------
// vector division
template <typename TReal>
-AI_FORCE_INLINE aiVector3t<TReal> operator / ( const aiVector3t<TReal>& v, const aiVector3t<TReal>& v2) {
+AI_FORCE_INLINE
+aiVector3t<TReal> operator / ( const aiVector3t<TReal>& v, const aiVector3t<TReal>& v2) {
return aiVector3t<TReal>(v.x / v2.x,v.y / v2.y,v.z / v2.z);
}
// ------------------------------------------------------------------------------------------------
// cross product
-template <typename TReal>
-AI_FORCE_INLINE aiVector3t<TReal> operator ^ ( const aiVector3t<TReal>& v1, const aiVector3t<TReal>& v2) {
+template<typename TReal>
+AI_FORCE_INLINE
+aiVector3t<TReal> operator ^ ( const aiVector3t<TReal>& v1, const aiVector3t<TReal>& v2) {
return aiVector3t<TReal>( v1.y*v2.z - v1.z*v2.y, v1.z*v2.x - v1.x*v2.z, v1.x*v2.y - v1.y*v2.x);
}
// ------------------------------------------------------------------------------------------------
// vector negation
-template <typename TReal>
-AI_FORCE_INLINE aiVector3t<TReal> operator - ( const aiVector3t<TReal>& v) {
+template<typename TReal>
+AI_FORCE_INLINE
+aiVector3t<TReal> operator - ( const aiVector3t<TReal>& v) {
return aiVector3t<TReal>( -v.x, -v.y, -v.z);
}
diff --git a/include/assimp/version.h b/include/assimp/version.h
index b85e6ccc8..470166edf 100644
--- a/include/assimp/version.h
+++ b/include/assimp/version.h
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2017, assimp team
+Copyright (c) 2006-2018, assimp team
+
All rights reserved.
@@ -82,6 +83,12 @@ ASSIMP_API unsigned int aiGetVersionMajor (void);
*/
ASSIMP_API unsigned int aiGetVersionRevision (void);
+// ---------------------------------------------------------------------------
+/** @brief Returns the branchname of the Assimp runtime.
+ * @return The current branch name.
+ */
+ASSIMP_API const char *aiGetBranchName();
+
//! Assimp was compiled as a shared object (Windows: DLL)
#define ASSIMP_CFLAGS_SHARED 0x1
//! Assimp was compiled against STLport
@@ -105,3 +112,4 @@ ASSIMP_API unsigned int aiGetCompileFlags (void);
#endif
#endif // !! #ifndef AI_VERSION_H_INC
+
diff --git a/packaging/windows-innosetup/script.iss b/packaging/windows-innosetup/script.iss
index f301bc4eb..695740679 100644
--- a/packaging/windows-innosetup/script.iss
+++ b/packaging/windows-innosetup/script.iss
@@ -2,7 +2,7 @@
[Setup]
AppName=Open Asset Import Library - SDK
-AppVerName=Open Asset Import Library - SDK (v3.3.1)
+AppVerName=Open Asset Import Library - SDK (v4.1.0)
DefaultDirName={pf}\Assimp
DefaultGroupName=Assimp
UninstallDisplayIcon={app}\bin\x86\assimp.exe
@@ -12,9 +12,9 @@ SetupIconFile=..\..\tools\shared\assimp_tools_icon.ico
WizardImageFile=compiler:WizModernImage-IS.BMP
WizardSmallImageFile=compiler:WizModernSmallImage-IS.BMP
LicenseFile=License.rtf
-OutputBaseFileName=assimp-sdk-3.3.1-setup
-VersionInfoVersion=3.3.1.0
-VersionInfoTextVersion=3.3.1
+OutputBaseFileName=assimp-sdk-4.1.0-setup
+VersionInfoVersion=4.1.0.0
+VersionInfoTextVersion=4.1.0
VersionInfoCompany=Assimp Development Team
ArchitecturesInstallIn64BitMode=x64
@@ -30,20 +30,19 @@ Name: "help"; Description: "Help Files"; Types: full compact
Name: "samples"; Description: "Samples"; Types: full
Name: "test"; Description: "Test Models (BSD-licensed)"; Types: full
Name: "test_nonbsd"; Description: "Test Models (other (free) licenses)"; Types: full
-Name: "pyassimp"; Description: "Python Bindings"; Types: full
-Name: "dassimp"; Description: "D Bindings"; Types: full
-Name: "assimp_net"; Description: "C#/.NET Bindings"; Types: full
+;Name: "pyassimp"; Description: "Python Bindings"; Types: full
+;Name: "dassimp"; Description: "D Bindings"; Types: full
+;Name: "assimp_net"; Description: "C#/.NET Bindings"; Types: full
[Run]
-Filename: "{app}\stub\vc_redist.x86.exe"; Parameters: "/qb"; StatusMsg: "Installing VS2015 redistributable package (32 Bit)"; Check: not IsWin64
-Filename: "{app}\stub\vc_redist.x64.exe"; Parameters: "/qb"; StatusMsg: "Installing VS2015 redistributable package (64 Bit)"; Check: IsWin64
+;Filename: "{app}\stub\vc_redist.x86.exe"; Parameters: "/qb"; StatusMsg: "Installing VS2017 redistributable package (32 Bit)"; Check: not IsWin64
+Filename: "{app}\stub\vc_redist.x64.exe"; Parameters: "/qb"; StatusMsg: "Installing VS2017 redistributable package (64 Bit)"; Check: IsWin64
[Files]
-
Source: "readme_installer.txt"; DestDir: "{app}"; Flags: isreadme
; Installer stub
-Source: "vc_redist.x86.exe"; DestDir: "{app}\stub\"; Check: not IsWin64
+;Source: "vc_redist.x86.exe"; DestDir: "{app}\stub\"; Check: not IsWin64
Source: "vc_redist.x64.exe"; DestDir: "{app}\stub\"; Check: IsWin64
; Common stuff
@@ -55,27 +54,27 @@ Source: "WEB"; DestDir: "{app}"
Source: "..\..\scripts\*"; DestDir: "{app}\scripts"; Flags: recursesubdirs
; x86 binaries
-Source: "..\..\bin\release\x86\assimp-vc140-mt.dll"; DestDir: "{app}\bin\x86"
-Source: "..\..\bin\release\x86\assimp_viewer.exe"; DestDir: "{app}\bin\x86"; Components: tools
-Source: "D3DCompiler_42.dll"; DestDir: "{app}\bin\x86"; Components: tools
-Source: "D3DX9_42.dll"; DestDir: "{app}\bin\x86"; Components: tools
-Source: "..\..\bin\release\x86\assimp.exe"; DestDir: "{app}\bin\x86"; Components: tools
+;Source: "..\..\bin\release\x86\assimp-vc140-mt.dll"; DestDir: "{app}\bin\x86"
+;Source: "..\..\bin\release\x86\assimp_viewer.exe"; DestDir: "{app}\bin\x86"; Components: tools
+;Source: "C:\Windows\SysWOW64\D3DCompiler_42.dll"; DestDir: "{app}\bin\x86"; Components: tools
+;Source: "C:\Windows\SysWOW64\D3DX9_42.dll"; DestDir: "{app}\bin\x86"; Components: tools
+;Source: "..\..\bin\release\x86\assimp.exe"; DestDir: "{app}\bin\x86"; Components: tools
; x64 binaries
-Source: "..\..\bin\release\x64\assimp-vc140-mt.dll"; DestDir: "{app}\bin\x64"
-Source: "..\..\bin\release\x64\assimp_viewer.exe"; DestDir: "{app}\bin\x64"; Components: tools
-Source: "D3DCompiler_42_x64.dll"; DestDir: "{app}\bin\x64"; DestName: "D3DCompiler_42.dll"; Components: tools
-Source: "D3DX9_42_x64.dll"; DestDir: "{app}\bin\x64"; DestName: "D3DX9_42.dll"; Components: tools
-Source: "..\..\bin\release\x64\assimp.exe"; DestDir: "{app}\bin\x64"; Components: tools
+Source: "..\..\bin\release\assimp-vc140-mt.dll"; DestDir: "{app}\bin\x64"
+Source: "..\..\bin\release\assimp_viewer.exe"; DestDir: "{app}\bin\x64"; Components: tools
+Source: "C:\Windows\SysWOW64\D3DCompiler_42.dll"; DestDir: "{app}\bin\x64"; DestName: "D3DCompiler_42.dll"; Components: tools
+Source: "C:\Windows\SysWOW64\D3DX9_42.dll"; DestDir: "{app}\bin\x64"; DestName: "D3DX9_42.dll"; Components: tools
+Source: "..\..\bin\release\assimp.exe"; DestDir: "{app}\bin\x64"; Components: tools
; Documentation
-Source: "..\..\doc\AssimpDoc_Html\AssimpDoc.chm"; DestDir: "{app}\doc"; Components: help
-Source: "..\..\doc\AssimpCmdDoc_Html\AssimpCmdDoc.chm"; DestDir: "{app}\doc"; Components: help
-Source: "..\..\doc\datastructure.xml"; DestDir: "{app}\doc"; Components: help
+;Source: "..\..\doc\AssimpDoc_Html\AssimpDoc.chm"; DestDir: "{app}\doc"; Components: help
+;Source: "..\..\doc\AssimpCmdDoc_Html\AssimpCmdDoc.chm"; DestDir: "{app}\doc"; Components: help
+;Source: "..\..\doc\datastructure.xml"; DestDir: "{app}\doc"; Components: help
; Import libraries
-Source: "..\..\lib\release\x86\assimp.lib"; DestDir: "{app}\lib\x86"
-Source: "..\..\lib\release\x64\assimp.lib"; DestDir: "{app}\lib\x64"
+;Source: "..\..\lib\release\x86\assimp.lib"; DestDir: "{app}\lib\x86"
+Source: "..\..\lib\release\assimp-vc140-mt.lib"; DestDir: "{app}\lib\x64"
; Samples
Source: "..\..\samples\*"; DestDir: "{app}\samples"; Flags: recursesubdirs; Components: samples
@@ -84,7 +83,7 @@ Source: "..\..\samples\*"; DestDir: "{app}\samples"; Flags: recursesubdirs; Comp
Source: "..\..\include\*"; DestDir: "{app}\include"; Flags: recursesubdirs
; dAssimp
-Source: "..\..\port\dAssimp\*"; DestDir: "{app}\port\D"; Flags: recursesubdirs; Components: dassimp
+;Source: "..\..\port\dAssimp\*"; DestDir: "{app}\port\D"; Flags: recursesubdirs; Components: dassimp
; Assimp.NET
;Source: "..\..\port\Assimp.NET\*"; DestDir: "{app}\port\C#"; Flags: recursesubdirs; Components: assimp_net
@@ -97,15 +96,6 @@ Source: "..\..\port\dAssimp\*"; DestDir: "{app}\port\D"; Flags: recursesubdirs;
;Source: "..\..\test\regression\*"; DestDir: "{app}\test\regression"; Flags: recursesubdirs; Components: test
;Source: "..\..\test\models-nonbsd\*"; DestDir: "{app}\test\models-nonbsd"; Flags: recursesubdirs; Components: test_nonbsd
-; Source Code & Workspaces
-;Source: "..\..\code\*"; Excludes: "*.o"; DestDir: "{app}\code"; Flags: recursesubdirs; Components: wsource
-;Source: "..\..\workspaces\vc8\*.sln"; DestDir: "{app}\workspaces\vc8"; Components: wsource and vc8
-;Source: "..\..\workspaces\vc8\*.vcproj"; DestDir: "{app}\workspaces\vc8"; Components: wsource and vc8
-;Source: "..\..\workspaces\vc9\*.sln"; DestDir: "{app}\workspaces\vc9"; Components: wsource and vc9
-;Source: "..\..\workspaces\vc9\*.vcproj"; DestDir: "{app}\workspaces\vc9"; Components: wsource and vc9
-
-; Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme
-
[Icons]
Name: "{group}\Assimp Manual"; Filename: "{app}\doc\AssimpDoc.chm" ; Components: help
Name: "{group}\Assimp Command Line Manual"; Filename: "{app}\doc\AssimpCmdDoc.chm"; Components: help
diff --git a/port/AssimpNET/Readme.md b/port/AssimpNET/Readme.md
index d251cecc3..bcbfebab1 100644
--- a/port/AssimpNET/Readme.md
+++ b/port/AssimpNET/Readme.md
@@ -1 +1 @@
-See https://code.google.com/p/assimp-net/ and https://github.com/assimp/assimp-net for a Github mirror. \ No newline at end of file
+Please check the following git-repo for the source: https://bitbucket.org/Starnick/assimpnet
diff --git a/port/PyAssimp/README.rst b/port/PyAssimp/README.rst
new file mode 100644
index 000000000..f909e2cd0
--- /dev/null
+++ b/port/PyAssimp/README.rst
@@ -0,0 +1,96 @@
+PyAssimp: Python bindings for libassimp
+=======================================
+
+A simple Python wrapper for Assimp using ``ctypes`` to access the
+library. Requires Python >= 2.6.
+
+Python 3 support is mostly here, but not well tested.
+
+Note that pyassimp is not complete. Many ASSIMP features are missing.
+
+USAGE
+-----
+
+Complete example: 3D viewer
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+``pyassimp`` comes with a simple 3D viewer that shows how to load and
+display a 3D model using a shader-based OpenGL pipeline.
+
+.. figure:: 3d_viewer_screenshot.png
+ :alt: Screenshot
+
+ Screenshot
+
+To use it, from within ``/port/PyAssimp``:
+
+::
+
+ $ cd scripts
+ $ python ./3D-viewer <path to your model>
+
+You can use this code as starting point in your applications.
+
+Writing your own code
+~~~~~~~~~~~~~~~~~~~~~
+
+To get started with ``pyassimp``, examine the simpler ``sample.py``
+script in ``scripts/``, which illustrates the basic usage. All Assimp
+data structures are wrapped using ``ctypes``. All the data+length fields
+in Assimp's data structures (such as ``aiMesh::mNumVertices``,
+``aiMesh::mVertices``) are replaced by simple python lists, so you can
+call ``len()`` on them to get their respective size and access members
+using ``[]``.
+
+For example, to load a file named ``hello.3ds`` and print the first
+vertex of the first mesh, you would do (proper error handling
+substituted by assertions ...):
+
+.. code:: python
+
+
+ from pyassimp import *
+ scene = load('hello.3ds')
+
+ assert len(scene.meshes)
+ mesh = scene.meshes[0]
+
+ assert len(mesh.vertices)
+ print(mesh.vertices[0])
+
+ # don't forget this one, or you will leak!
+ release(scene)
+
+Another example to list the 'top nodes' in a scene:
+
+.. code:: python
+
+
+ from pyassimp import *
+ scene = load('hello.3ds')
+
+ for c in scene.rootnode.children:
+ print(str(c))
+
+ release(scene)
+
+INSTALL
+-------
+
+Install ``pyassimp`` by running:
+
+::
+
+ $ python setup.py install
+
+PyAssimp requires a assimp dynamic library (``DLL`` on windows, ``.so``
+on linux, ``.dynlib`` on macOS) in order to work. The default search
+directories are:
+
+- the current directory
+- on linux additionally: ``/usr/lib``, ``/usr/local/lib``,
+ ``/usr/lib/x86_64-linux-gnu``
+
+To build that library, refer to the Assimp master ``INSTALL``
+instructions. To look in more places, edit ``./pyassimp/helper.py``.
+There's an ``additional_dirs`` list waiting for your entries.
diff --git a/port/PyAssimp/gen/materialgen.py b/port/PyAssimp/gen/materialgen.py
new file mode 100644
index 000000000..d60bf4bc2
--- /dev/null
+++ b/port/PyAssimp/gen/materialgen.py
@@ -0,0 +1,96 @@
+#!/usr/bin/env python
+# -*- Coding: UTF-8 -*-
+
+# ---------------------------------------------------------------------------
+# 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.
+# ---------------------------------------------------------------------------
+
+"""Update PyAssimp's texture type constants C/C++ headers.
+
+This script is meant to be executed in the source tree, directly from
+port/PyAssimp/gen
+"""
+
+import os
+import re
+
+REenumTextureType = re.compile(r''
+ r'enum\saiTextureType' # enum aiTextureType
+ r'[^{]*?\{' # {
+ r'(?P<code>.*?)' # code
+ r'\};' # };
+ , re.IGNORECASE + re.DOTALL + re.MULTILINE)
+
+# Replace comments
+RErpcom = re.compile(r''
+ r'\s*(/\*+\s|\*+/|\B\*\s?|///?!?)' # /**
+ r'(?P<line>.*?)' # * line
+ , re.IGNORECASE + re.DOTALL)
+
+# Remove trailing commas
+RErmtrailcom = re.compile(r',$', re.IGNORECASE + re.DOTALL)
+
+# Remove #ifdef __cplusplus
+RErmifdef = re.compile(r''
+ r'#ifndef SWIG' # #ifndef SWIG
+ r'(?P<code>.*)' # code
+ r'#endif(\s*//\s*!?\s*SWIG)*' # #endif
+ , re.IGNORECASE + re.DOTALL)
+
+path = '../../../include/assimp'
+
+files = os.listdir (path)
+enumText = ''
+for fileName in files:
+ if fileName.endswith('.h'):
+ text = open(os.path.join(path, fileName)).read()
+ for enum in REenumTextureType.findall(text):
+ enumText = enum
+
+text = ''
+for line in enumText.split('\n'):
+ line = line.lstrip().rstrip()
+ line = RErmtrailcom.sub('', line)
+ text += RErpcom.sub('# \g<line>', line) + '\n'
+text = RErmifdef.sub('', text)
+
+file = open('material.py', 'w')
+file.write(text)
+file.close()
+
+print("Generation done. You can now review the file 'material.py' and merge it.")
diff --git a/port/PyAssimp/pyassimp/core.py b/port/PyAssimp/pyassimp/core.py
index ac3df9290..25821ff9b 100644
--- a/port/PyAssimp/pyassimp/core.py
+++ b/port/PyAssimp/pyassimp/core.py
@@ -29,13 +29,12 @@ from . import structs
from . import helper
from . import postprocess
from .errors import AssimpError
-from .formats import available_formats
class AssimpLib(object):
"""
Assimp-Singleton
"""
- load, load_mem, export, release, dll = helper.search_library()
+ load, load_mem, export, export_blob, release, dll = helper.search_library()
_assimp_lib = AssimpLib()
def make_tuple(ai_obj, type = None):
@@ -66,6 +65,13 @@ def make_tuple(ai_obj, type = None):
return res
+# Returns unicode object for Python 2, and str object for Python 3.
+def _convert_assimp_string(assimp_string):
+ try:
+ return unicode(assimp_string.data, errors='ignore')
+ except:
+ return str(assimp_string.data, errors='ignore')
+
# It is faster and more correct to have an init function for each assimp class
def _init_face(aiFace):
aiFace.indices = [aiFace.mIndices[i] for i in range(aiFace.mNumIndices)]
@@ -118,11 +124,9 @@ def _init(self, target = None, parent = None):
continue
if m == 'mName':
- obj = self.mName
- uni = unicode(obj.data, errors='ignore')
- target.name = str( uni )
- target.__class__.__repr__ = lambda x: str(x.__class__) + "(" + x.name + ")"
- target.__class__.__str__ = lambda x: x.name
+ target.name = str(_convert_assimp_string(self.mName))
+ target.__class__.__repr__ = lambda x: str(x.__class__) + "(" + getattr(x, 'name','') + ")"
+ target.__class__.__str__ = lambda x: getattr(x, 'name', '')
continue
name = m[1:].lower()
@@ -217,6 +221,9 @@ def _init(self, target = None, parent = None):
if isinstance(self, structs.Texture):
_finalize_texture(self, target)
+ if isinstance(self, structs.Metadata):
+ _finalize_metadata(self, target)
+
return self
@@ -292,14 +299,12 @@ def load(filename,
'''
if hasattr(filename, 'read'):
- '''
- This is the case where a file object has been passed to load.
- It is calling the following function:
- const aiScene* aiImportFileFromMemory(const char* pBuffer,
- unsigned int pLength,
- unsigned int pFlags,
- const char* pHint)
- '''
+ # This is the case where a file object has been passed to load.
+ # It is calling the following function:
+ # const aiScene* aiImportFileFromMemory(const char* pBuffer,
+ # unsigned int pLength,
+ # unsigned int pFlags,
+ # const char* pHint)
if file_type == None:
raise AssimpError('File type must be specified when passing file objects!')
data = filename.read()
@@ -309,7 +314,7 @@ def load(filename,
file_type)
else:
# a filename string has been passed
- model = _assimp_lib.load(filename.encode("ascii"), processing)
+ model = _assimp_lib.load(filename.encode(sys.getfilesystemencoding()), processing)
if not model:
raise AssimpError('Could not import file!')
@@ -339,11 +344,38 @@ def export(scene,
'''
from ctypes import pointer
- exportStatus = _assimp_lib.export(pointer(scene), file_type.encode("ascii"), filename.encode("ascii"), processing)
+ exportStatus = _assimp_lib.export(pointer(scene), file_type.encode("ascii"), filename.encode(sys.getfilesystemencoding()), processing)
if exportStatus != 0:
raise AssimpError('Could not export scene!')
+def export_blob(scene,
+ file_type = None,
+ processing = postprocess.aiProcess_Triangulate):
+ '''
+ Export a scene and return a blob in the correct format. On failure throws AssimpError.
+
+ Arguments
+ ---------
+ scene: scene to export.
+ file_type: string of file exporter to use. For example "collada".
+ processing: assimp postprocessing parameters. Verbose keywords are imported
+ from postprocessing, and the parameters can be combined bitwise to
+ generate the final processing value. Note that the default value will
+ triangulate quad faces. Example of generating other possible values:
+ processing = (pyassimp.postprocess.aiProcess_Triangulate |
+ pyassimp.postprocess.aiProcess_OptimizeMeshes)
+ Returns
+ ---------
+ Pointer to structs.ExportDataBlob
+ '''
+ from ctypes import pointer
+ exportBlobPtr = _assimp_lib.export_blob(pointer(scene), file_type.encode("ascii"), processing)
+
+ if exportBlobPtr == 0:
+ raise AssimpError('Could not export scene to blob!')
+ return exportBlobPtr
+
def release(scene):
from ctypes import pointer
_assimp_lib.release(pointer(scene))
@@ -409,6 +441,43 @@ def _finalize_mesh(mesh, target):
faces = [f.indices for f in target.faces]
setattr(target, 'faces', faces)
+def _init_metadata_entry(entry):
+ from ctypes import POINTER, c_bool, c_int32, c_uint64, c_float, c_double, cast
+
+ entry.type = entry.mType
+ if entry.type == structs.MetadataEntry.AI_BOOL:
+ entry.data = cast(entry.mData, POINTER(c_bool)).contents.value
+ elif entry.type == structs.MetadataEntry.AI_INT32:
+ entry.data = cast(entry.mData, POINTER(c_int32)).contents.value
+ elif entry.type == structs.MetadataEntry.AI_UINT64:
+ entry.data = cast(entry.mData, POINTER(c_uint64)).contents.value
+ elif entry.type == structs.MetadataEntry.AI_FLOAT:
+ entry.data = cast(entry.mData, POINTER(c_float)).contents.value
+ elif entry.type == structs.MetadataEntry.AI_DOUBLE:
+ entry.data = cast(entry.mData, POINTER(c_double)).contents.value
+ elif entry.type == structs.MetadataEntry.AI_AISTRING:
+ assimp_string = cast(entry.mData, POINTER(structs.String)).contents
+ entry.data = _convert_assimp_string(assimp_string)
+ elif entry.type == structs.MetadataEntry.AI_AIVECTOR3D:
+ assimp_vector = cast(entry.mData, POINTER(structs.Vector3D)).contents
+ entry.data = make_tuple(assimp_vector)
+
+ return entry
+
+def _finalize_metadata(metadata, target):
+ """ Building the metadata object is a bit specific.
+
+ Firstly, there are two separate arrays: one with metadata keys and one
+ with metadata values, and there are no corresponding mNum* attributes,
+ so the C arrays are not converted to Python arrays using the generic
+ code in the _init function.
+
+ Secondly, a metadata entry value has to be cast according to declared
+ metadata entry type.
+ """
+ length = metadata.mNumProperties
+ setattr(target, 'keys', [str(_convert_assimp_string(metadata.mKeys[i])) for i in range(length)])
+ setattr(target, 'values', [_init_metadata_entry(metadata.mValues[i]) for i in range(length)])
class PropertyGetter(dict):
def __getitem__(self, key):
@@ -440,8 +509,8 @@ def _get_properties(properties, length):
for p in [properties[i] for i in range(length)]:
#the name
p = p.contents
- uni = unicode(p.mKey.data, errors='ignore')
- key = (str(uni).split('.')[1], p.mSemantic)
+ key = str(_convert_assimp_string(p.mKey))
+ key = (key.split('.')[1], p.mSemantic)
#the data
from ctypes import POINTER, cast, c_int, c_float, sizeof
@@ -449,8 +518,7 @@ def _get_properties(properties, length):
arr = cast(p.mData, POINTER(c_float * int(p.mDataLength/sizeof(c_float)) )).contents
value = [x for x in arr]
elif p.mType == 3: #string can't be an array
- uni = unicode(cast(p.mData, POINTER(structs.MaterialPropertyString)).contents.data, errors='ignore')
- value = uni
+ value = _convert_assimp_string(cast(p.mData, POINTER(structs.MaterialPropertyString)).contents)
elif p.mType == 4:
arr = cast(p.mData, POINTER(c_int * int(p.mDataLength/sizeof(c_int)) )).contents
@@ -476,3 +544,4 @@ def decompose_matrix(matrix):
from ctypes import byref, pointer
_assimp_lib.dll.aiDecomposeMatrix(pointer(matrix), byref(scaling), byref(rotation), byref(position))
return scaling._init(), rotation._init(), position._init()
+
diff --git a/port/PyAssimp/pyassimp/helper.py b/port/PyAssimp/pyassimp/helper.py
index b281e94cf..4e9f10e94 100644
--- a/port/PyAssimp/pyassimp/helper.py
+++ b/port/PyAssimp/pyassimp/helper.py
@@ -9,6 +9,10 @@ import ctypes
from ctypes import POINTER
import operator
+from distutils.sysconfig import get_python_lib
+import re
+import sys
+
try: import numpy
except: numpy = None
@@ -23,10 +27,21 @@ additional_dirs, ext_whitelist = [],[]
if os.name=='posix':
additional_dirs.append('./')
additional_dirs.append('/usr/lib/')
- additional_dirs.append('/usr/lib/x86_64-linux-gnu')
+ additional_dirs.append('/usr/lib/x86_64-linux-gnu/')
additional_dirs.append('/usr/local/lib/')
- # note - this won't catch libassimp.so.N.n, but
+ if 'LD_LIBRARY_PATH' in os.environ:
+ additional_dirs.extend([item for item in os.environ['LD_LIBRARY_PATH'].split(':') if item])
+
+ # check if running from anaconda.
+ if "conda" or "continuum" in sys.version.lower():
+ cur_path = get_python_lib()
+ pattern = re.compile('.*\/lib\/')
+ conda_lib = pattern.match(cur_path).group()
+ logger.info("Adding Anaconda lib path:"+ conda_lib)
+ additional_dirs.append(conda_lib)
+
+ # note - this won't catch libassimp.so.N.n, but
# currently there's always a symlink called
# libassimp.so in /usr/local/lib.
ext_whitelist.append('.so')
@@ -36,11 +51,8 @@ if os.name=='posix':
elif os.name=='nt':
ext_whitelist.append('.dll')
path_dirs = os.environ['PATH'].split(';')
- for dir_candidate in path_dirs:
- if 'assimp' in dir_candidate.lower():
- additional_dirs.append(dir_candidate)
-
-#print(additional_dirs)
+ additional_dirs.extend(path_dirs)
+
def vec2tuple(x):
""" Converts a VECTOR3D to a Tuple """
return (x.x, x.y, x.z)
@@ -61,10 +73,10 @@ def transform(vector3, matrix4x4):
m2[0]*x + m2[1]*y + m2[2]*z + m2[3],
m3[0]*x + m3[1]*y + m3[2]*z + m3[3]
]
-
+
def _inv(matrix4x4):
m0,m1,m2,m3 = matrix4x4
-
+
det = m0[3]*m1[2]*m2[1]*m3[0] - m0[2]*m1[3]*m2[1]*m3[0] - \
m0[3]*m1[1]*m2[2]*m3[0] + m0[1]*m1[3]*m2[2]*m3[0] + \
m0[2]*m1[1]*m2[3]*m3[0] - m0[1]*m1[2]*m2[3]*m3[0] - \
@@ -77,7 +89,7 @@ def _inv(matrix4x4):
m0[2]*m1[1]*m2[0]*m3[3] + m0[1]*m1[2]*m2[0]*m3[3] + \
m0[2]*m1[0]*m2[1]*m3[3] - m0[0]*m1[2]*m2[1]*m3[3] - \
m0[1]*m1[0]*m2[2]*m3[3] + m0[0]*m1[1]*m2[2]*m3[3]
-
+
return[[( m1[2]*m2[3]*m3[1] - m1[3]*m2[2]*m3[1] + m1[3]*m2[1]*m3[2] - m1[1]*m2[3]*m3[2] - m1[2]*m2[1]*m3[3] + m1[1]*m2[2]*m3[3]) /det,
( m0[3]*m2[2]*m3[1] - m0[2]*m2[3]*m3[1] - m0[3]*m2[1]*m3[2] + m0[1]*m2[3]*m3[2] + m0[2]*m2[1]*m3[3] - m0[1]*m2[2]*m3[3]) /det,
( m0[2]*m1[3]*m3[1] - m0[3]*m1[2]*m3[1] + m0[3]*m1[1]*m3[2] - m0[1]*m1[3]*m3[2] - m0[2]*m1[1]*m3[3] + m0[1]*m1[2]*m3[3]) /det,
@@ -94,7 +106,7 @@ def _inv(matrix4x4):
( m0[1]*m2[2]*m3[0] - m0[2]*m2[1]*m3[0] + m0[2]*m2[0]*m3[1] - m0[0]*m2[2]*m3[1] - m0[1]*m2[0]*m3[2] + m0[0]*m2[1]*m3[2]) /det,
( m0[2]*m1[1]*m3[0] - m0[1]*m1[2]*m3[0] - m0[2]*m1[0]*m3[1] + m0[0]*m1[2]*m3[1] + m0[1]*m1[0]*m3[2] - m0[0]*m1[1]*m3[2]) /det,
( m0[1]*m1[2]*m2[0] - m0[2]*m1[1]*m2[0] + m0[2]*m1[0]*m2[1] - m0[0]*m1[2]*m2[1] - m0[1]*m1[0]*m2[2] + m0[0]*m1[1]*m2[2]) /det]]
-
+
def get_bounding_box(scene):
bb_min = [1e10, 1e10, 1e10] # x,y,z
bb_max = [-1e10, -1e10, -1e10] # x,y,z
@@ -129,7 +141,7 @@ def get_bounding_box_for_node(node, bb_min, bb_max, transformation):
t3[0]*T0[2] + t3[1]*T1[2] + t3[2]*T2[2] + t3[3]*T3[2],
t3[0]*T0[3] + t3[1]*T1[3] + t3[2]*T2[3] + t3[3]*T3[3]
] ]
-
+
for mesh in node.meshes:
for v in mesh.vertices:
v = transform(v, transformation)
@@ -149,49 +161,53 @@ def get_bounding_box_for_node(node, bb_min, bb_max, transformation):
def try_load_functions(library_path, dll):
'''
Try to bind to aiImportFile and aiReleaseImport
-
+
Arguments
---------
library_path: path to current lib
dll: ctypes handle to library
-
+
Returns
---------
If unsuccessful:
None
If successful:
- Tuple containing (library_path,
+ Tuple containing (library_path,
load from filename function,
load from memory function,
export to filename function,
- release function,
+ export to blob function,
+ release function,
ctypes handle to assimp library)
'''
-
+
try:
load = dll.aiImportFile
release = dll.aiReleaseImport
load_mem = dll.aiImportFileFromMemory
export = dll.aiExportScene
+ export2blob = dll.aiExportSceneToBlob
except AttributeError:
#OK, this is a library, but it doesn't have the functions we need
return None
-
+
# library found!
- from .structs import Scene
+ from .structs import Scene, ExportDataBlob
load.restype = POINTER(Scene)
load_mem.restype = POINTER(Scene)
- return (library_path, load, load_mem, export, release, dll)
+ export2blob.restype = POINTER(ExportDataBlob)
+ return (library_path, load, load_mem, export, export2blob, release, dll)
def search_library():
'''
- Loads the assimp library.
+ Loads the assimp library.
Throws exception AssimpError if no library_path is found
-
- Returns: tuple, (load from filename function,
+
+ Returns: tuple, (load from filename function,
load from memory function,
export to filename function,
- release function,
+ export to blob function,
+ release function,
dll)
'''
#this path
@@ -201,7 +217,7 @@ def search_library():
try:
ctypes.windll.kernel32.SetErrorMode(0x8007)
except AttributeError:
- pass
+ pass
candidates = []
# test every file
@@ -209,12 +225,18 @@ def search_library():
if os.path.isdir(curfolder):
for filename in os.listdir(curfolder):
# our minimum requirement for candidates is that
- # they should contain 'assimp' somewhere in
- # their name
- if filename.lower().find('assimp')==-1 or\
- os.path.splitext(filename)[-1].lower() not in ext_whitelist:
+ # they should contain 'assimp' somewhere in
+ # their name
+ if filename.lower().find('assimp')==-1 :
continue
-
+ is_out=1
+ for et in ext_whitelist:
+ if et in filename.lower():
+ is_out=0
+ break
+ if is_out:
+ continue
+
library_path = os.path.join(curfolder, filename)
logger.debug('Try ' + library_path)
try:
@@ -248,10 +270,10 @@ def hasattr_silent(object, name):
"""
Calls hasttr() with the given parameters and preserves the legacy (pre-Python 3.2)
functionality of silently catching exceptions.
-
+
Returns the result of hasatter() or False if an exception was raised.
"""
-
+
try:
return hasattr(object, name)
except:
diff --git a/port/PyAssimp/pyassimp/material.py b/port/PyAssimp/pyassimp/material.py
index 97b143a62..a36e50a17 100644
--- a/port/PyAssimp/pyassimp/material.py
+++ b/port/PyAssimp/pyassimp/material.py
@@ -1,89 +1,89 @@
-## <hr>Dummy value.
+# Dummy value.
#
-# No texture, but the value to be used as 'texture semantic'
-# (#aiMaterialProperty::mSemantic) for all material properties
-# *not* related to textures.
+# No texture, but the value to be used as 'texture semantic'
+# (#aiMaterialProperty::mSemantic) for all material properties
+# # not* related to textures.
#
aiTextureType_NONE = 0x0
-## <hr>The texture is combined with the result of the diffuse
-# lighting equation.
+# The texture is combined with the result of the diffuse
+# lighting equation.
#
aiTextureType_DIFFUSE = 0x1
-## <hr>The texture is combined with the result of the specular
-# lighting equation.
+# The texture is combined with the result of the specular
+# lighting equation.
#
aiTextureType_SPECULAR = 0x2
-## <hr>The texture is combined with the result of the ambient
-# lighting equation.
+# The texture is combined with the result of the ambient
+# lighting equation.
#
aiTextureType_AMBIENT = 0x3
-## <hr>The texture is added to the result of the lighting
-# calculation. It isn't influenced by incoming light.
+# The texture is added to the result of the lighting
+# calculation. It isn't influenced by incoming light.
#
aiTextureType_EMISSIVE = 0x4
-## <hr>The texture is a height map.
+# The texture is a height map.
#
-# By convention, higher gray-scale values stand for
-# higher elevations from the base height.
+# By convention, higher gray-scale values stand for
+# higher elevations from the base height.
#
aiTextureType_HEIGHT = 0x5
-## <hr>The texture is a (tangent space) normal-map.
+# The texture is a (tangent space) normal-map.
#
-# Again, there are several conventions for tangent-space
-# normal maps. Assimp does (intentionally) not
-# distinguish here.
+# Again, there are several conventions for tangent-space
+# normal maps. Assimp does (intentionally) not
+# distinguish here.
#
aiTextureType_NORMALS = 0x6
-## <hr>The texture defines the glossiness of the material.
+# The texture defines the glossiness of the material.
#
-# The glossiness is in fact the exponent of the specular
-# (phong) lighting equation. Usually there is a conversion
-# function defined to map the linear color values in the
-# texture to a suitable exponent. Have fun.
+# The glossiness is in fact the exponent of the specular
+# (phong) lighting equation. Usually there is a conversion
+# function defined to map the linear color values in the
+# texture to a suitable exponent. Have fun.
#
aiTextureType_SHININESS = 0x7
-## <hr>The texture defines per-pixel opacity.
+# The texture defines per-pixel opacity.
#
-# Usually 'white' means opaque and 'black' means
-# 'transparency'. Or quite the opposite. Have fun.
+# Usually 'white' means opaque and 'black' means
+# 'transparency'. Or quite the opposite. Have fun.
#
aiTextureType_OPACITY = 0x8
-## <hr>Displacement texture
+# Displacement texture
#
-# The exact purpose and format is application-dependent.
-# Higher color values stand for higher vertex displacements.
+# The exact purpose and format is application-dependent.
+# Higher color values stand for higher vertex displacements.
#
aiTextureType_DISPLACEMENT = 0x9
-## <hr>Lightmap texture (aka Ambient Occlusion)
+# Lightmap texture (aka Ambient Occlusion)
#
-# Both 'Lightmaps' and dedicated 'ambient occlusion maps' are
-# covered by this material property. The texture contains a
-# scaling value for the final color value of a pixel. Its
-# intensity is not affected by incoming light.
+# Both 'Lightmaps' and dedicated 'ambient occlusion maps' are
+# covered by this material property. The texture contains a
+# scaling value for the final color value of a pixel. Its
+# intensity is not affected by incoming light.
#
aiTextureType_LIGHTMAP = 0xA
-## <hr>Reflection texture
+# Reflection texture
#
-#Contains the color of a perfect mirror reflection.
-#Rarely used, almost never for real-time applications.
+# Contains the color of a perfect mirror reflection.
+# Rarely used, almost never for real-time applications.
#
aiTextureType_REFLECTION = 0xB
-## <hr>Unknown texture
+# Unknown texture
#
-# A texture reference that does not match any of the definitions
-# above is considered to be 'unknown'. It is still imported
-# but is excluded from any further postprocessing.
+# A texture reference that does not match any of the definitions
+# above is considered to be 'unknown'. It is still imported
+# but is excluded from any further postprocessing.
#
aiTextureType_UNKNOWN = 0xC
diff --git a/port/PyAssimp/pyassimp/structs.py b/port/PyAssimp/pyassimp/structs.py
index 84fcfb7a0..ddfd87f8a 100644
--- a/port/PyAssimp/pyassimp/structs.py
+++ b/port/PyAssimp/pyassimp/structs.py
@@ -5,7 +5,7 @@ from ctypes import POINTER, c_void_p, c_int, c_uint, c_char, c_float, Structure,
class Vector2D(Structure):
"""
- See 'aiVector2D.h' for details.
+ See 'vector2.h' for details.
"""
@@ -15,7 +15,7 @@ class Vector2D(Structure):
class Matrix3x3(Structure):
"""
- See 'aiMatrix3x3.h' for details.
+ See 'matrix3x3.h' for details.
"""
@@ -27,7 +27,7 @@ class Matrix3x3(Structure):
class Texel(Structure):
"""
- See 'aiTexture.h' for details.
+ See 'texture.h' for details.
"""
_fields_ = [
@@ -36,7 +36,7 @@ class Texel(Structure):
class Color4D(Structure):
"""
- See 'aiColor4D.h' for details.
+ See 'color4.h' for details.
"""
@@ -47,7 +47,7 @@ class Color4D(Structure):
class Plane(Structure):
"""
- See 'aiTypes.h' for details.
+ See 'types.h' for details.
"""
_fields_ = [
@@ -57,7 +57,7 @@ class Plane(Structure):
class Color3D(Structure):
"""
- See 'aiTypes.h' for details.
+ See 'types.h' for details.
"""
_fields_ = [
@@ -67,7 +67,7 @@ class Color3D(Structure):
class String(Structure):
"""
- See 'aiTypes.h' for details.
+ See 'types.h' for details.
"""
MAXLEN = 1024
@@ -84,7 +84,7 @@ class String(Structure):
class MaterialPropertyString(Structure):
"""
- See 'aiTypes.h' for details.
+ See 'MaterialSystem.cpp' for details.
The size of length is truncated to 4 bytes on 64-bit platforms when used as a
material property (see MaterialSystem.cpp aiMaterial::AddProperty() for details).
@@ -104,7 +104,7 @@ class MaterialPropertyString(Structure):
class MemoryInfo(Structure):
"""
- See 'aiTypes.h' for details.
+ See 'types.h' for details.
"""
_fields_ = [
@@ -135,7 +135,7 @@ class MemoryInfo(Structure):
class Quaternion(Structure):
"""
- See 'aiQuaternion.h' for details.
+ See 'quaternion.h' for details.
"""
@@ -146,7 +146,7 @@ class Quaternion(Structure):
class Face(Structure):
"""
- See 'aiMesh.h' for details.
+ See 'mesh.h' for details.
"""
_fields_ = [
@@ -161,7 +161,7 @@ class Face(Structure):
class VertexWeight(Structure):
"""
- See 'aiMesh.h' for details.
+ See 'mesh.h' for details.
"""
_fields_ = [
@@ -175,7 +175,7 @@ class VertexWeight(Structure):
class Matrix4x4(Structure):
"""
- See 'aiMatrix4x4.h' for details.
+ See 'matrix4x4.h' for details.
"""
@@ -188,7 +188,7 @@ class Matrix4x4(Structure):
class Vector3D(Structure):
"""
- See 'aiVector3D.h' for details.
+ See 'vector3.h' for details.
"""
@@ -198,7 +198,7 @@ class Vector3D(Structure):
class MeshKey(Structure):
"""
- See 'aiAnim.h' for details.
+ See 'anim.h' for details.
"""
_fields_ = [
@@ -206,7 +206,7 @@ class MeshKey(Structure):
("mTime", c_double),
# Index into the aiMesh::mAnimMeshes array of the
- # mesh coresponding to the
+ # mesh corresponding to the
#aiMeshAnim hosting this
# key frame. The referenced anim mesh is evaluated
# according to the rules defined in the docs for
@@ -214,9 +214,44 @@ class MeshKey(Structure):
("mValue", c_uint),
]
+class MetadataEntry(Structure):
+ """
+ See 'metadata.h' for details
+ """
+ AI_BOOL = 0
+ AI_INT32 = 1
+ AI_UINT64 = 2
+ AI_FLOAT = 3
+ AI_DOUBLE = 4
+ AI_AISTRING = 5
+ AI_AIVECTOR3D = 6
+ AI_META_MAX = 7
+ _fields_ = [
+ # The type field uniquely identifies the underlying type of the data field
+ ("mType", c_uint),
+ ("mData", c_void_p),
+ ]
+
+class Metadata(Structure):
+ """
+ See 'metadata.h' for details
+ """
+ _fields_ = [
+ # Length of the mKeys and mValues arrays, respectively
+ ("mNumProperties", c_uint),
+
+ # Arrays of keys, may not be NULL. Entries in this array may not be NULL
+ # as well.
+ ("mKeys", POINTER(String)),
+
+ # Arrays of values, may not be NULL. Entries in this array may be NULL
+ # if the corresponding property key has no assigned value.
+ ("mValues", POINTER(MetadataEntry)),
+ ]
+
class Node(Structure):
"""
- See 'aiScene.h' for details.
+ See 'scene.h' for details.
"""
@@ -253,11 +288,15 @@ Node._fields_ = [
# The meshes of this node. Each entry is an index into the mesh
("mMeshes", POINTER(c_uint)),
+
+ # Metadata associated with this node or NULL if there is no metadata.
+ # Whether any metadata is generated depends on the source file format.
+ ("mMetadata", POINTER(Metadata)),
]
class Light(Structure):
"""
- See 'aiLight.h' for details.
+ See 'light.h' for details.
"""
@@ -283,6 +322,13 @@ class Light(Structure):
# may be normalized, but it needn't.
("mDirection", Vector3D),
+ # Up direction of the light source in space. Relative to the
+ # transformation of the node corresponding to the light.
+ #
+ # The direction is undefined for point lights. The vector
+ # may be normalized, but it needn't.
+ ("mUp", Vector3D),
+
# Constant light attenuation factor.
# The intensity of the light source at a given distance 'd' from
# the light's position is
@@ -354,11 +400,14 @@ class Light(Structure):
# interpolation between the inner and the outer cone of the
# spot light.
("mAngleOuterCone", c_float),
+
+ # Size of area light source.
+ ("mSize", Vector2D),
]
class Texture(Structure):
"""
- See 'aiTexture.h' for details.
+ See 'texture.h' for details.
"""
@@ -375,16 +424,25 @@ class Texture(Structure):
("mHeight", c_uint),
# A hint from the loader to make it easier for applications
- # to determine the type of embedded compressed textures.
- # If mHeight != 0 this member is undefined. Otherwise it
- # is set set to '\\0\\0\\0\\0' if the loader has no additional
+ # to determine the type of embedded textures.
+ #
+ # If mHeight != 0 this member is show how data is packed. Hint will consist of
+ # two parts: channel order and channel bitness (count of the bits for every
+ # color channel). For simple parsing by the viewer it's better to not omit
+ # absent color channel and just use 0 for bitness. For example:
+ # 1. Image contain RGBA and 8 bit per channel, achFormatHint == "rgba8888";
+ # 2. Image contain ARGB and 8 bit per channel, achFormatHint == "argb8888";
+ # 3. Image contain RGB and 5 bit for R and B channels and 6 bit for G channel,
+ # achFormatHint == "rgba5650";
+ # 4. One color image with B channel and 1 bit for it, achFormatHint == "rgba0010";
+ # If mHeight == 0 then achFormatHint is set set to '\\0\\0\\0\\0' if the loader has no additional
# information about the texture file format used OR the
# file extension of the format without a trailing dot. If there
# are multiple file extensions for a format, the shortest
# extension is chosen (JPEG maps to 'jpg', not to 'jpeg').
# E.g. 'dds\\0', 'pcx\\0', 'jpg\\0'. All characters are lower-case.
# The fourth character will always be '\\0'.
- ("achFormatHint", c_char*4),
+ ("achFormatHint", c_char*9),
# Data of the texture.
# Points to an array of mWidth
@@ -395,11 +453,15 @@ class Texture(Structure):
# buffer of size mWidth containing the compressed texture
# data. Good luck, have fun!
("pcData", POINTER(Texel)),
+
+ # Texture original filename
+ # Used to get the texture reference
+ ("mFilename", String),
]
class Ray(Structure):
"""
- See 'aiTypes.h' for details.
+ See 'types.h' for details.
"""
_fields_ = [
@@ -409,7 +471,7 @@ class Ray(Structure):
class UVTransform(Structure):
"""
- See 'aiMaterial.h' for details.
+ See 'material.h' for details.
"""
_fields_ = [
@@ -430,7 +492,7 @@ class UVTransform(Structure):
class MaterialProperty(Structure):
"""
- See 'aiMaterial.h' for details.
+ See 'material.h' for details.
"""
_fields_ = [
@@ -466,7 +528,7 @@ class MaterialProperty(Structure):
class Material(Structure):
"""
- See 'aiMaterial.h' for details.
+ See 'material.h' for details.
"""
_fields_ = [
@@ -482,7 +544,7 @@ class Material(Structure):
class Bone(Structure):
"""
- See 'aiMesh.h' for details.
+ See 'mesh.h' for details.
"""
_fields_ = [
@@ -501,20 +563,66 @@ class Bone(Structure):
("mOffsetMatrix", Matrix4x4),
]
-class Mesh(Structure):
+
+class AnimMesh(Structure):
"""
- See 'aiMesh.h' for details.
+ See 'mesh.h' for details.
"""
- AI_MAX_FACE_INDICES = 0x7fff
- AI_MAX_BONE_WEIGHTS = 0x7fffffff
- AI_MAX_VERTICES = 0x7fffffff
- AI_MAX_FACES = 0x7fffffff
- AI_MAX_NUMBER_OF_COLOR_SETS = 0x8
- AI_MAX_NUMBER_OF_TEXTURECOORDS = 0x8
+ AI_MAX_NUMBER_OF_TEXTURECOORDS = 0x8
+ AI_MAX_NUMBER_OF_COLOR_SETS = 0x8
_fields_ = [
- # Bitwise combination of the members of the
+ # Replacement for aiMesh::mVertices. If this array is non-NULL,
+ # it *must* contain mNumVertices entries. The corresponding
+ # array in the host mesh must be non-NULL as well - animation
+ # meshes may neither add or nor remove vertex components (if
+ # a replacement array is NULL and the corresponding source
+ # array is not, the source data is taken instead)
+ ("mVertices", POINTER(Vector3D)),
+
+ # Replacement for aiMesh::mNormals.
+ ("mNormals", POINTER(Vector3D)),
+
+ # Replacement for aiMesh::mTangents.
+ ("mTangents", POINTER(Vector3D)),
+
+ # Replacement for aiMesh::mBitangents.
+ ("mBitangents", POINTER(Vector3D)),
+
+ # Replacement for aiMesh::mColors
+ ("mColors", POINTER(Color4D) * AI_MAX_NUMBER_OF_COLOR_SETS),
+
+ # Replacement for aiMesh::mTextureCoords
+ ("mTextureCoords", POINTER(Vector3D) * AI_MAX_NUMBER_OF_TEXTURECOORDS),
+
+ # The number of vertices in the aiAnimMesh, and thus the length of all
+ # the member arrays.
+ #
+ # This has always the same value as the mNumVertices property in the
+ # corresponding aiMesh. It is duplicated here merely to make the length
+ # of the member arrays accessible even if the aiMesh is not known, e.g.
+ # from language bindings.
+ ("mNumVertices", c_uint),
+
+ # Weight of the AnimMesh.
+ ("mWeight", c_float),
+ ]
+
+
+class Mesh(Structure):
+ """
+ See 'mesh.h' for details.
+ """
+
+ AI_MAX_FACE_INDICES = 0x7fff
+ AI_MAX_BONE_WEIGHTS = 0x7fffffff
+ AI_MAX_VERTICES = 0x7fffffff
+ AI_MAX_FACES = 0x7fffffff
+ AI_MAX_NUMBER_OF_COLOR_SETS = 0x8
+ AI_MAX_NUMBER_OF_TEXTURECOORDS = 0x8
+
+ _fields_ = [ # Bitwise combination of the members of the
#aiPrimitiveType enum.
# This specifies which types of primitives are present in the mesh.
# The "SortByPrimitiveType"-Step can be used to make sure the
@@ -637,17 +745,23 @@ class Mesh(Structure):
# - Vertex animations refer to meshes by their names.
("mName", String),
- # NOT CURRENTLY IN USE. The number of attachment meshes
+ # The number of attachment meshes. Note! Currently only works with Collada loader.
("mNumAnimMeshes", c_uint),
- # NOT CURRENTLY IN USE. Attachment meshes for this mesh, for vertex-based animation.
- # Attachment meshes carry replacement data for some of the
- # mesh'es vertex components (usually positions, normals).
+ # Attachment meshes for this mesh, for vertex-based animation.
+ # Attachment meshes carry replacement data for some of the
+ # mesh'es vertex components (usually positions, normals).
+ # Note! Currently only works with Collada loader.
+ ("mAnimMesh", POINTER(POINTER(AnimMesh))),
+
+ # Method of morphing when animeshes are specified.
+ ("mMethod", c_uint),
+
]
class Camera(Structure):
"""
- See 'aiCamera.h' for details.
+ See 'camera.h' for details.
"""
@@ -707,7 +821,7 @@ class Camera(Structure):
class VectorKey(Structure):
"""
- See 'aiAnim.h' for details.
+ See 'anim.h' for details.
"""
_fields_ = [
@@ -720,7 +834,7 @@ class VectorKey(Structure):
class QuatKey(Structure):
"""
- See 'aiAnim.h' for details.
+ See 'anim.h' for details.
"""
_fields_ = [
@@ -731,9 +845,27 @@ class QuatKey(Structure):
("mValue", Quaternion),
]
+class MeshMorphKey(Structure):
+ """
+ See 'anim.h' for details.
+ """
+
+ _fields_ = [
+ # The time of this key
+ ("mTime", c_double),
+
+ # The values and weights at the time of this key
+ ("mValues", POINTER(c_uint)),
+ ("mWeights", POINTER(c_double)),
+
+ # The number of values and weights
+ ("mNumValuesAndWeights", c_uint),
+
+ ]
+
class NodeAnim(Structure):
"""
- See 'aiAnim.h' for details.
+ See 'anim.h' for details.
"""
_fields_ = [
@@ -782,9 +914,48 @@ class NodeAnim(Structure):
("mPostState", c_uint),
]
+class MeshAnim(Structure):
+ """
+ See 'anim.h' for details.
+ """
+
+ _fields_ = [
+ # Name of the mesh to be animated. An empty string is not allowed,
+ # animated meshes need to be named (not necessarily uniquely,
+ # the name can basically serve as wild-card to select a group
+ # of meshes with similar animation setup)
+ ("mName", String),
+
+ # Size of the #mKeys array. Must be 1, at least.
+ ("mNumKeys", c_uint),
+
+ # Key frames of the animation. May not be NULL.
+ ("mKeys", POINTER(MeshKey)),
+ ]
+
+class MeshMorphAnim(Structure):
+ """
+ See 'anim.h' for details.
+ """
+
+ _fields_ = [
+ # Name of the mesh to be animated. An empty string is not allowed,
+ # animated meshes need to be named (not necessarily uniquely,
+ # the name can basically serve as wildcard to select a group
+ # of meshes with similar animation setup)
+ ("mName", String),
+
+ # Size of the #mKeys array. Must be 1, at least.
+ ("mNumKeys", c_uint),
+
+ # Key frames of the animation. May not be NULL.
+ ("mKeys", POINTER(MeshMorphKey)),
+ ]
+
+
class Animation(Structure):
"""
- See 'aiAnim.h' for details.
+ See 'anim.h' for details.
"""
_fields_ = [
@@ -813,18 +984,62 @@ class Animation(Structure):
# The mesh animation channels. Each channel affects a single mesh.
# The array is mNumMeshChannels in size.
+ ("mMeshChannels", POINTER(POINTER(MeshAnim))),
+
+ # The number of mesh animation channels. Each channel affects
+ # a single mesh and defines morphing animation.
+ ("mNumMorphMeshChannels", c_uint),
+
+ # The morph mesh animation channels. Each channel affects a single mesh.
+ # The array is mNumMorphMeshChannels in size.
+ ("mMorphMeshChannels", POINTER(POINTER(MeshMorphAnim))),
+
+ ]
+
+class ExportDataBlob(Structure):
+ """
+ See 'cexport.h' for details.
+
+ Note that the '_fields_' definition is outside the class to allow the 'next' field to be recursive
+ """
+ pass
+
+ExportDataBlob._fields_ = [
+ # Size of the data in bytes
+ ("size", c_size_t),
+
+ # The data.
+ ("data", c_void_p),
+
+ # Name of the blob. An empty string always
+ # indicates the first (and primary) blob,
+ # which contains the actual file data.
+ # Any other blobs are auxiliary files produced
+ # by exporters (i.e. material files). Existence
+ # of such files depends on the file format. Most
+ # formats don't split assets across multiple files.
+ #
+ # If used, blob names usually contain the file
+ # extension that should be used when writing
+ # the data to disc.
+ ("name", String),
+
+ # Pointer to the next blob in the chain or NULL if there is none.
+ ("next", POINTER(ExportDataBlob)),
]
+
class Scene(Structure):
"""
See 'aiScene.h' for details.
"""
- AI_SCENE_FLAGS_INCOMPLETE = 0x1
- AI_SCENE_FLAGS_VALIDATED = 0x2
- AI_SCENE_FLAGS_VALIDATION_WARNING = 0x4
- AI_SCENE_FLAGS_NON_VERBOSE_FORMAT = 0x8
- AI_SCENE_FLAGS_TERRAIN = 0x10
+ AI_SCENE_FLAGS_INCOMPLETE = 0x1
+ AI_SCENE_FLAGS_VALIDATED = 0x2
+ AI_SCENE_FLAGS_VALIDATION_WARNING = 0x4
+ AI_SCENE_FLAGS_NON_VERBOSE_FORMAT = 0x8
+ AI_SCENE_FLAGS_TERRAIN = 0x10
+ AI_SCENE_FLAGS_ALLOW_SHARED = 0x20
_fields_ = [
# Any combination of the AI_SCENE_FLAGS_XXX flags. By default
@@ -896,6 +1111,14 @@ class Scene(Structure):
# array (if existing) is the default camera view into
# the scene.
("mCameras", POINTER(POINTER(Camera))),
+
+ # This data contains global metadata which belongs to the scene like
+ # unit-conversions, versions, vendors or other model-specific data. This
+ # can be used to store format-specific metadata as well.
+ ("mMetadata", POINTER(Metadata)),
+
+ # Internal data, do not touch
+ ("mPrivate", c_char_p),
]
assimp_structs_as_tuple = (Matrix4x4,
diff --git a/port/PyAssimp/scripts/3d_viewer.py b/port/PyAssimp/scripts/3d_viewer.py
index 9aae25efe..08a62660b 100755
--- a/port/PyAssimp/scripts/3d_viewer.py
+++ b/port/PyAssimp/scripts/3d_viewer.py
@@ -895,7 +895,7 @@ class PyAssimp3DViewer:
aspect = camera.aspect
u = 0.1 # unit size (in m)
- l = 3 * u # lenght of the camera cone
+ l = 3 * u # length of the camera cone
f = 3 * u # aperture of the camera cone
glPushMatrix()
diff --git a/port/PyAssimp/scripts/3d_viewer_py3.py b/port/PyAssimp/scripts/3d_viewer_py3.py
new file mode 100755
index 000000000..477b1a103
--- /dev/null
+++ b/port/PyAssimp/scripts/3d_viewer_py3.py
@@ -0,0 +1,1316 @@
+#!/usr/bin/env python
+# -*- coding: UTF-8 -*-
+
+""" This program loads a model with PyASSIMP, and display it.
+
+Based on:
+- pygame code from http://3dengine.org/Spectator_%28PyOpenGL%29
+- http://www.lighthouse3d.com/tutorials
+- http://www.songho.ca/opengl/gl_transform.html
+- http://code.activestate.com/recipes/325391/
+- ASSIMP's C++ SimpleOpenGL viewer
+
+Authors: Séverin Lemaignan, 2012-2016
+"""
+import sys
+import logging
+
+from functools import reduce
+
+logger = logging.getLogger("pyassimp")
+gllogger = logging.getLogger("OpenGL")
+gllogger.setLevel(logging.WARNING)
+logging.basicConfig(level=logging.INFO)
+
+import OpenGL
+
+OpenGL.ERROR_CHECKING = False
+OpenGL.ERROR_LOGGING = False
+# OpenGL.ERROR_ON_COPY = True
+# OpenGL.FULL_LOGGING = True
+from OpenGL.GL import *
+from OpenGL.arrays import vbo
+from OpenGL.GL import shaders
+
+import pygame
+import pygame.font
+import pygame.image
+
+import math, random
+from numpy import linalg
+
+import pyassimp
+from pyassimp.postprocess import *
+from pyassimp.helper import *
+import transformations
+
+ROTATION_180_X = numpy.array([[1, 0, 0, 0], [0, -1, 0, 0], [0, 0, -1, 0], [0, 0, 0, 1]], dtype=numpy.float32)
+
+# rendering mode
+BASE = "BASE"
+COLORS = "COLORS"
+SILHOUETTE = "SILHOUETTE"
+HELPERS = "HELPERS"
+
+# Entities type
+ENTITY = "entity"
+CAMERA = "camera"
+MESH = "mesh"
+
+FLAT_VERTEX_SHADER_120 = """
+#version 120
+
+uniform mat4 u_viewProjectionMatrix;
+uniform mat4 u_modelMatrix;
+
+uniform vec4 u_materialDiffuse;
+
+attribute vec3 a_vertex;
+
+varying vec4 v_color;
+
+void main(void)
+{
+ v_color = u_materialDiffuse;
+ gl_Position = u_viewProjectionMatrix * u_modelMatrix * vec4(a_vertex, 1.0);
+}
+"""
+
+FLAT_VERTEX_SHADER_130 = """
+#version 130
+
+uniform mat4 u_viewProjectionMatrix;
+uniform mat4 u_modelMatrix;
+
+uniform vec4 u_materialDiffuse;
+
+in vec3 a_vertex;
+
+out vec4 v_color;
+
+void main(void)
+{
+ v_color = u_materialDiffuse;
+ gl_Position = u_viewProjectionMatrix * u_modelMatrix * vec4(a_vertex, 1.0);
+}
+"""
+
+BASIC_VERTEX_SHADER_120 = """
+#version 120
+
+uniform mat4 u_viewProjectionMatrix;
+uniform mat4 u_modelMatrix;
+uniform mat3 u_normalMatrix;
+uniform vec3 u_lightPos;
+
+uniform vec4 u_materialDiffuse;
+
+attribute vec3 a_vertex;
+attribute vec3 a_normal;
+
+varying vec4 v_color;
+
+void main(void)
+{
+ // Now the normal is in world space, as we pass the light in world space.
+ vec3 normal = u_normalMatrix * a_normal;
+
+ float dist = distance(a_vertex, u_lightPos);
+
+ // go to https://www.desmos.com/calculator/nmnaud1hrw to play with the parameters
+ // att is not used for now
+ float att=1.0/(1.0+0.8*dist*dist);
+
+ vec3 surf2light = normalize(u_lightPos - a_vertex);
+ vec3 norm = normalize(normal);
+ float dcont=max(0.0,dot(norm,surf2light));
+
+ float ambient = 0.3;
+ float intensity = dcont + 0.3 + ambient;
+
+ v_color = u_materialDiffuse * intensity;
+
+ gl_Position = u_viewProjectionMatrix * u_modelMatrix * vec4(a_vertex, 1.0);
+}
+"""
+
+BASIC_VERTEX_SHADER_130 = """
+#version 130
+
+uniform mat4 u_viewProjectionMatrix;
+uniform mat4 u_modelMatrix;
+uniform mat3 u_normalMatrix;
+uniform vec3 u_lightPos;
+
+uniform vec4 u_materialDiffuse;
+
+in vec3 a_vertex;
+in vec3 a_normal;
+
+out vec4 v_color;
+
+void main(void)
+{
+ // Now the normal is in world space, as we pass the light in world space.
+ vec3 normal = u_normalMatrix * a_normal;
+
+ float dist = distance(a_vertex, u_lightPos);
+
+ // go to https://www.desmos.com/calculator/nmnaud1hrw to play with the parameters
+ // att is not used for now
+ float att=1.0/(1.0+0.8*dist*dist);
+
+ vec3 surf2light = normalize(u_lightPos - a_vertex);
+ vec3 norm = normalize(normal);
+ float dcont=max(0.0,dot(norm,surf2light));
+
+ float ambient = 0.3;
+ float intensity = dcont + 0.3 + ambient;
+
+ v_color = u_materialDiffuse * intensity;
+
+ gl_Position = u_viewProjectionMatrix * u_modelMatrix * vec4(a_vertex, 1.0);
+}
+"""
+
+BASIC_FRAGMENT_SHADER_120 = """
+#version 120
+
+varying vec4 v_color;
+
+void main() {
+ gl_FragColor = v_color;
+}
+"""
+
+BASIC_FRAGMENT_SHADER_130 = """
+#version 130
+
+in vec4 v_color;
+
+void main() {
+ gl_FragColor = v_color;
+}
+"""
+
+GOOCH_VERTEX_SHADER_120 = """
+#version 120
+
+// attributes
+attribute vec3 a_vertex; // xyz - position
+attribute vec3 a_normal; // xyz - normal
+
+// uniforms
+uniform mat4 u_modelMatrix;
+uniform mat4 u_viewProjectionMatrix;
+uniform mat3 u_normalMatrix;
+uniform vec3 u_lightPos;
+uniform vec3 u_camPos;
+
+// output data from vertex to fragment shader
+varying vec3 o_normal;
+varying vec3 o_lightVector;
+
+///////////////////////////////////////////////////////////////////
+
+void main(void)
+{
+ // transform position and normal to world space
+ vec4 positionWorld = u_modelMatrix * vec4(a_vertex, 1.0);
+ vec3 normalWorld = u_normalMatrix * a_normal;
+
+ // calculate and pass vectors required for lighting
+ o_lightVector = u_lightPos - positionWorld.xyz;
+ o_normal = normalWorld;
+
+ // project world space position to the screen and output it
+ gl_Position = u_viewProjectionMatrix * positionWorld;
+}
+"""
+
+GOOCH_VERTEX_SHADER_130 = """
+#version 130
+
+// attributes
+in vec3 a_vertex; // xyz - position
+in vec3 a_normal; // xyz - normal
+
+// uniforms
+uniform mat4 u_modelMatrix;
+uniform mat4 u_viewProjectionMatrix;
+uniform mat3 u_normalMatrix;
+uniform vec3 u_lightPos;
+uniform vec3 u_camPos;
+
+// output data from vertex to fragment shader
+out vec3 o_normal;
+out vec3 o_lightVector;
+
+///////////////////////////////////////////////////////////////////
+
+void main(void)
+{
+ // transform position and normal to world space
+ vec4 positionWorld = u_modelMatrix * vec4(a_vertex, 1.0);
+ vec3 normalWorld = u_normalMatrix * a_normal;
+
+ // calculate and pass vectors required for lighting
+ o_lightVector = u_lightPos - positionWorld.xyz;
+ o_normal = normalWorld;
+
+ // project world space position to the screen and output it
+ gl_Position = u_viewProjectionMatrix * positionWorld;
+}
+"""
+
+GOOCH_FRAGMENT_SHADER_120 = """
+#version 120
+
+// data from vertex shader
+varying vec3 o_normal;
+varying vec3 o_lightVector;
+
+// diffuse color of the object
+uniform vec4 u_materialDiffuse;
+// cool color of gooch shading
+uniform vec3 u_coolColor;
+// warm color of gooch shading
+uniform vec3 u_warmColor;
+// how much to take from object color in final cool color
+uniform float u_alpha;
+// how much to take from object color in final warm color
+uniform float u_beta;
+
+///////////////////////////////////////////////////////////
+
+void main(void)
+{
+ // normlize vectors for lighting
+ vec3 normalVector = normalize(o_normal);
+ vec3 lightVector = normalize(o_lightVector);
+ // intensity of diffuse lighting [-1, 1]
+ float diffuseLighting = dot(lightVector, normalVector);
+ // map intensity of lighting from range [-1; 1] to [0, 1]
+ float interpolationValue = (1.0 + diffuseLighting)/2;
+
+ //////////////////////////////////////////////////////////////////
+
+ // cool color mixed with color of the object
+ vec3 coolColorMod = u_coolColor + vec3(u_materialDiffuse) * u_alpha;
+ // warm color mixed with color of the object
+ vec3 warmColorMod = u_warmColor + vec3(u_materialDiffuse) * u_beta;
+ // interpolation of cool and warm colors according
+ // to lighting intensity. The lower the light intensity,
+ // the larger part of the cool color is used
+ vec3 colorOut = mix(coolColorMod, warmColorMod, interpolationValue);
+
+ //////////////////////////////////////////////////////////////////
+
+ // save color
+ gl_FragColor.rgb = colorOut;
+ gl_FragColor.a = 1;
+}
+"""
+
+GOOCH_FRAGMENT_SHADER_130 = """
+#version 130
+
+// data from vertex shader
+in vec3 o_normal;
+in vec3 o_lightVector;
+
+// diffuse color of the object
+uniform vec4 u_materialDiffuse;
+// cool color of gooch shading
+uniform vec3 u_coolColor;
+// warm color of gooch shading
+uniform vec3 u_warmColor;
+// how much to take from object color in final cool color
+uniform float u_alpha;
+// how much to take from object color in final warm color
+uniform float u_beta;
+
+// output to framebuffer
+out vec4 resultingColor;
+
+///////////////////////////////////////////////////////////
+
+void main(void)
+{
+ // normlize vectors for lighting
+ vec3 normalVector = normalize(o_normal);
+ vec3 lightVector = normalize(o_lightVector);
+ // intensity of diffuse lighting [-1, 1]
+ float diffuseLighting = dot(lightVector, normalVector);
+ // map intensity of lighting from range [-1; 1] to [0, 1]
+ float interpolationValue = (1.0 + diffuseLighting)/2;
+
+ //////////////////////////////////////////////////////////////////
+
+ // cool color mixed with color of the object
+ vec3 coolColorMod = u_coolColor + vec3(u_materialDiffuse) * u_alpha;
+ // warm color mixed with color of the object
+ vec3 warmColorMod = u_warmColor + vec3(u_materialDiffuse) * u_beta;
+ // interpolation of cool and warm colors according
+ // to lighting intensity. The lower the light intensity,
+ // the larger part of the cool color is used
+ vec3 colorOut = mix(coolColorMod, warmColorMod, interpolationValue);
+
+ //////////////////////////////////////////////////////////////////
+
+ // save color
+ resultingColor.rgb = colorOut;
+ resultingColor.a = 1;
+}
+"""
+
+SILHOUETTE_VERTEX_SHADER_120 = """
+#version 120
+
+attribute vec3 a_vertex; // xyz - position
+attribute vec3 a_normal; // xyz - normal
+
+uniform mat4 u_modelMatrix;
+uniform mat4 u_viewProjectionMatrix;
+uniform mat4 u_modelViewMatrix;
+uniform vec4 u_materialDiffuse;
+uniform float u_bordersize; // width of the border
+
+varying vec4 v_color;
+
+void main(void){
+ v_color = u_materialDiffuse;
+ float distToCamera = -(u_modelViewMatrix * vec4(a_vertex, 1.0)).z;
+ vec4 tPos = vec4(a_vertex + a_normal * u_bordersize * distToCamera, 1.0);
+ gl_Position = u_viewProjectionMatrix * u_modelMatrix * tPos;
+}
+"""
+
+SILHOUETTE_VERTEX_SHADER_130 = """
+#version 130
+
+in vec3 a_vertex; // xyz - position
+in vec3 a_normal; // xyz - normal
+
+uniform mat4 u_modelMatrix;
+uniform mat4 u_viewProjectionMatrix;
+uniform mat4 u_modelViewMatrix;
+uniform vec4 u_materialDiffuse;
+uniform float u_bordersize; // width of the border
+
+out vec4 v_color;
+
+void main(void){
+ v_color = u_materialDiffuse;
+ float distToCamera = -(u_modelViewMatrix * vec4(a_vertex, 1.0)).z;
+ vec4 tPos = vec4(a_vertex + a_normal * u_bordersize * distToCamera, 1.0);
+ gl_Position = u_viewProjectionMatrix * u_modelMatrix * tPos;
+}
+"""
+DEFAULT_CLIP_PLANE_NEAR = 0.001
+DEFAULT_CLIP_PLANE_FAR = 1000.0
+
+
+def get_world_transform(scene, node):
+ if node == scene.rootnode:
+ return numpy.identity(4, dtype=numpy.float32)
+
+ parents = reversed(_get_parent_chain(scene, node, []))
+ parent_transform = reduce(numpy.dot, [p.transformation for p in parents])
+ return numpy.dot(parent_transform, node.transformation)
+
+
+def _get_parent_chain(scene, node, parents):
+ parent = node.parent
+
+ parents.append(parent)
+
+ if parent == scene.rootnode:
+ return parents
+
+ return _get_parent_chain(scene, parent, parents)
+
+
+class DefaultCamera:
+ def __init__(self, w, h, fov):
+ self.name = "default camera"
+ self.type = CAMERA
+ self.clipplanenear = DEFAULT_CLIP_PLANE_NEAR
+ self.clipplanefar = DEFAULT_CLIP_PLANE_FAR
+ self.aspect = w / h
+ self.horizontalfov = fov * math.pi / 180
+ self.transformation = numpy.array([[0.68, -0.32, 0.65, 7.48],
+ [0.73, 0.31, -0.61, -6.51],
+ [-0.01, 0.89, 0.44, 5.34],
+ [0., 0., 0., 1.]], dtype=numpy.float32)
+
+ self.transformation = numpy.dot(self.transformation, ROTATION_180_X)
+
+ def __str__(self):
+ return self.name
+
+
+class PyAssimp3DViewer:
+ base_name = "PyASSIMP 3D viewer"
+
+ def __init__(self, model, w=1024, h=768):
+
+ self.w = w
+ self.h = h
+
+ pygame.init()
+ pygame.display.set_caption(self.base_name)
+ pygame.display.set_mode((w, h), pygame.OPENGL | pygame.DOUBLEBUF)
+
+ glClearColor(0.18, 0.18, 0.18, 1.0)
+
+ shader_compilation_succeeded = False
+ try:
+ self.set_shaders_v130()
+ self.prepare_shaders()
+ except RuntimeError, message:
+ sys.stderr.write("%s\n" % message)
+ sys.stdout.write("Could not compile shaders in version 1.30, trying version 1.20\n")
+
+ if not shader_compilation_succeeded:
+ self.set_shaders_v120()
+ self.prepare_shaders()
+
+ self.scene = None
+ self.meshes = {} # stores the OpenGL vertex/faces/normals buffers pointers
+
+ self.node2colorid = {} # stores a color ID for each node. Useful for mouse picking and visibility checking
+ self.colorid2node = {} # reverse dict of node2colorid
+
+ self.currently_selected = None
+ self.moving = False
+ self.moving_situation = None
+
+ self.default_camera = DefaultCamera(self.w, self.h, fov=70)
+ self.cameras = [self.default_camera]
+
+ self.current_cam_index = 0
+ self.current_cam = self.default_camera
+ self.set_camera_projection()
+
+ self.load_model(model)
+
+ # user interactions
+ self.focal_point = [0, 0, 0]
+ self.is_rotating = False
+ self.is_panning = False
+ self.is_zooming = False
+
+ def set_shaders_v120(self):
+ self.BASIC_VERTEX_SHADER = BASIC_VERTEX_SHADER_120
+ self.FLAT_VERTEX_SHADER = FLAT_VERTEX_SHADER_120
+ self.SILHOUETTE_VERTEX_SHADER = SILHOUETTE_VERTEX_SHADER_120
+ self.GOOCH_VERTEX_SHADER = GOOCH_VERTEX_SHADER_120
+
+ self.BASIC_FRAGMENT_SHADER = BASIC_FRAGMENT_SHADER_120
+ self.GOOCH_FRAGMENT_SHADER = GOOCH_FRAGMENT_SHADER_120
+
+ def set_shaders_v130(self):
+ self.BASIC_VERTEX_SHADER = BASIC_VERTEX_SHADER_130
+ self.FLAT_VERTEX_SHADER = FLAT_VERTEX_SHADER_130
+ self.SILHOUETTE_VERTEX_SHADER = SILHOUETTE_VERTEX_SHADER_130
+ self.GOOCH_VERTEX_SHADER = GOOCH_VERTEX_SHADER_130
+
+ self.BASIC_FRAGMENT_SHADER = BASIC_FRAGMENT_SHADER_130
+ self.GOOCH_FRAGMENT_SHADER = GOOCH_FRAGMENT_SHADER_130
+
+ def prepare_shaders(self):
+
+ ### Base shader
+ vertex = shaders.compileShader(self.BASIC_VERTEX_SHADER, GL_VERTEX_SHADER)
+ fragment = shaders.compileShader(self.BASIC_FRAGMENT_SHADER, GL_FRAGMENT_SHADER)
+
+ self.shader = shaders.compileProgram(vertex, fragment)
+
+ self.set_shader_accessors(('u_modelMatrix',
+ 'u_viewProjectionMatrix',
+ 'u_normalMatrix',
+ 'u_lightPos',
+ 'u_materialDiffuse'),
+ ('a_vertex',
+ 'a_normal'), self.shader)
+
+ ### Flat shader
+ flatvertex = shaders.compileShader(self.FLAT_VERTEX_SHADER, GL_VERTEX_SHADER)
+ self.flatshader = shaders.compileProgram(flatvertex, fragment)
+
+ self.set_shader_accessors(('u_modelMatrix',
+ 'u_viewProjectionMatrix',
+ 'u_materialDiffuse',),
+ ('a_vertex',), self.flatshader)
+
+ ### Silhouette shader
+ silh_vertex = shaders.compileShader(self.SILHOUETTE_VERTEX_SHADER, GL_VERTEX_SHADER)
+ self.silhouette_shader = shaders.compileProgram(silh_vertex, fragment)
+
+ self.set_shader_accessors(('u_modelMatrix',
+ 'u_viewProjectionMatrix',
+ 'u_modelViewMatrix',
+ 'u_materialDiffuse',
+ 'u_bordersize' # width of the silhouette
+ ),
+ ('a_vertex',
+ 'a_normal'), self.silhouette_shader)
+
+ ### Gooch shader
+ gooch_vertex = shaders.compileShader(self.GOOCH_VERTEX_SHADER, GL_VERTEX_SHADER)
+ gooch_fragment = shaders.compileShader(self.GOOCH_FRAGMENT_SHADER, GL_FRAGMENT_SHADER)
+ self.gooch_shader = shaders.compileProgram(gooch_vertex, gooch_fragment)
+
+ self.set_shader_accessors(('u_modelMatrix',
+ 'u_viewProjectionMatrix',
+ 'u_normalMatrix',
+ 'u_lightPos',
+ 'u_materialDiffuse',
+ 'u_coolColor',
+ 'u_warmColor',
+ 'u_alpha',
+ 'u_beta'
+ ),
+ ('a_vertex',
+ 'a_normal'), self.gooch_shader)
+
+ @staticmethod
+ def set_shader_accessors(uniforms, attributes, shader):
+ # add accessors to the shaders uniforms and attributes
+ for uniform in uniforms:
+ location = glGetUniformLocation(shader, uniform)
+ if location in (None, -1):
+ raise RuntimeError('No uniform: %s (maybe it is not used '
+ 'anymore and has been optimized out by'
+ ' the shader compiler)' % uniform)
+ setattr(shader, uniform, location)
+
+ for attribute in attributes:
+ location = glGetAttribLocation(shader, attribute)
+ if location in (None, -1):
+ raise RuntimeError('No attribute: %s' % attribute)
+ setattr(shader, attribute, location)
+
+ @staticmethod
+ def prepare_gl_buffers(mesh):
+
+ mesh.gl = {}
+
+ # Fill the buffer for vertex and normals positions
+ v = numpy.array(mesh.vertices, 'f')
+ n = numpy.array(mesh.normals, 'f')
+
+ mesh.gl["vbo"] = vbo.VBO(numpy.hstack((v, n)))
+
+ # Fill the buffer for vertex positions
+ mesh.gl["faces"] = glGenBuffers(1)
+ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, mesh.gl["faces"])
+ glBufferData(GL_ELEMENT_ARRAY_BUFFER,
+ numpy.array(mesh.faces, dtype=numpy.int32),
+ GL_STATIC_DRAW)
+
+ mesh.gl["nbfaces"] = len(mesh.faces)
+
+ # Unbind buffers
+ glBindBuffer(GL_ARRAY_BUFFER, 0)
+ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0)
+
+ @staticmethod
+ def get_rgb_from_colorid(colorid):
+ r = (colorid >> 0) & 0xff
+ g = (colorid >> 8) & 0xff
+ b = (colorid >> 16) & 0xff
+
+ return r, g, b
+
+ def get_color_id(self):
+ id = random.randint(0, 256 * 256 * 256)
+ if id not in self.colorid2node:
+ return id
+ else:
+ return self.get_color_id()
+
+ def glize(self, scene, node):
+
+ logger.info("Loading node <%s>" % node)
+ node.selected = True if self.currently_selected and self.currently_selected == node else False
+
+ node.transformation = node.transformation.astype(numpy.float32)
+
+ if node.meshes:
+ node.type = MESH
+ colorid = self.get_color_id()
+ self.colorid2node[colorid] = node
+ self.node2colorid[node.name] = colorid
+
+ elif node.name in [c.name for c in scene.cameras]:
+
+ # retrieve the ASSIMP camera object
+ [cam] = [c for c in scene.cameras if c.name == node.name]
+ node.type = CAMERA
+ logger.info("Added camera <%s>" % node.name)
+ logger.info("Camera position: %.3f, %.3f, %.3f" % tuple(node.transformation[:, 3][:3].tolist()))
+ self.cameras.append(node)
+ node.clipplanenear = cam.clipplanenear
+ node.clipplanefar = cam.clipplanefar
+
+ if numpy.allclose(cam.lookat, [0, 0, -1]) and numpy.allclose(cam.up, [0, 1, 0]): # Cameras in .blend files
+
+ # Rotate by 180deg around X to have Z pointing forward
+ node.transformation = numpy.dot(node.transformation, ROTATION_180_X)
+ else:
+ raise RuntimeError(
+ "I do not know how to normalize this camera orientation: lookat=%s, up=%s" % (cam.lookat, cam.up))
+
+ if cam.aspect == 0.0:
+ logger.warning("Camera aspect not set. Setting to default 4:3")
+ node.aspect = 1.333
+ else:
+ node.aspect = cam.aspect
+
+ node.horizontalfov = cam.horizontalfov
+
+ else:
+ node.type = ENTITY
+
+ for child in node.children:
+ self.glize(scene, child)
+
+ def load_model(self, path, postprocess=aiProcessPreset_TargetRealtime_MaxQuality):
+ logger.info("Loading model:" + path + "...")
+
+ if postprocess:
+ self.scene = pyassimp.load(path, processing=postprocess)
+ else:
+ self.scene = pyassimp.load(path)
+ logger.info("Done.")
+
+ scene = self.scene
+ # log some statistics
+ logger.info(" meshes: %d" % len(scene.meshes))
+ logger.info(" total faces: %d" % sum([len(mesh.faces) for mesh in scene.meshes]))
+ logger.info(" materials: %d" % len(scene.materials))
+ self.bb_min, self.bb_max = get_bounding_box(self.scene)
+ logger.info(" bounding box:" + str(self.bb_min) + " - " + str(self.bb_max))
+
+ self.scene_center = [(a + b) / 2. for a, b in zip(self.bb_min, self.bb_max)]
+
+ for index, mesh in enumerate(scene.meshes):
+ self.prepare_gl_buffers(mesh)
+
+ self.glize(scene, scene.rootnode)
+
+ # Finally release the model
+ pyassimp.release(scene)
+ logger.info("Ready for 3D rendering!")
+
+ def cycle_cameras(self):
+
+ self.current_cam_index = (self.current_cam_index + 1) % len(self.cameras)
+ self.current_cam = self.cameras[self.current_cam_index]
+ self.set_camera_projection(self.current_cam)
+ logger.info("Switched to camera <%s>" % self.current_cam)
+
+ def set_overlay_projection(self):
+ glViewport(0, 0, self.w, self.h)
+ glMatrixMode(GL_PROJECTION)
+ glLoadIdentity()
+ glOrtho(0.0, self.w - 1.0, 0.0, self.h - 1.0, -1.0, 1.0)
+ glMatrixMode(GL_MODELVIEW)
+ glLoadIdentity()
+
+ def set_camera_projection(self, camera=None):
+
+ if not camera:
+ camera = self.current_cam
+
+ znear = camera.clipplanenear or DEFAULT_CLIP_PLANE_NEAR
+ zfar = camera.clipplanefar or DEFAULT_CLIP_PLANE_FAR
+ aspect = camera.aspect
+ fov = camera.horizontalfov
+
+ glMatrixMode(GL_PROJECTION)
+ glLoadIdentity()
+
+ # Compute gl frustrum
+ tangent = math.tan(fov / 2.)
+ h = znear * tangent
+ w = h * aspect
+
+ # params: left, right, bottom, top, near, far
+ glFrustum(-w, w, -h, h, znear, zfar)
+ # equivalent to:
+ # gluPerspective(fov * 180/math.pi, aspect, znear, zfar)
+
+ self.projection_matrix = glGetFloatv(GL_PROJECTION_MATRIX).transpose()
+
+ glMatrixMode(GL_MODELVIEW)
+ glLoadIdentity()
+
+ def render_colors(self):
+
+ glEnable(GL_DEPTH_TEST)
+ glDepthFunc(GL_LEQUAL)
+
+ glPolygonMode(GL_FRONT_AND_BACK, GL_FILL)
+ glEnable(GL_CULL_FACE)
+
+ glUseProgram(self.flatshader)
+
+ glUniformMatrix4fv(self.flatshader.u_viewProjectionMatrix, 1, GL_TRUE,
+ numpy.dot(self.projection_matrix, self.view_matrix))
+
+ self.recursive_render(self.scene.rootnode, self.flatshader, mode=COLORS)
+
+ glUseProgram(0)
+
+ def get_hovered_node(self, mousex, mousey):
+ """
+ Attention: The performances of this method relies heavily on the size of the display!
+ """
+
+ # mouse out of the window?
+ if mousex < 0 or mousex >= self.w or mousey < 0 or mousey >= self.h:
+ return None
+
+ self.render_colors()
+ # Capture image from the OpenGL buffer
+ buf = (GLubyte * (3 * self.w * self.h))(0)
+ glReadPixels(0, 0, self.w, self.h, GL_RGB, GL_UNSIGNED_BYTE, buf)
+
+ # Reinterpret the RGB pixel buffer as a 1-D array of 24bits colors
+ a = numpy.ndarray(len(buf), numpy.dtype('>u1'), buf)
+ colors = numpy.zeros(len(buf) // 3, numpy.dtype('<u4'))
+ for i in range(3):
+ colors.view(dtype='>u1')[i::4] = a.view(dtype='>u1')[i::3]
+
+ colorid = colors[mousex + mousey * self.w]
+
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)
+
+ if colorid in self.colorid2node:
+ return self.colorid2node[colorid]
+
+ def render(self, wireframe=False, twosided=False):
+
+ glEnable(GL_DEPTH_TEST)
+ glDepthFunc(GL_LEQUAL)
+
+ glPolygonMode(GL_FRONT_AND_BACK, GL_LINE if wireframe else GL_FILL)
+ glDisable(GL_CULL_FACE) if twosided else glEnable(GL_CULL_FACE)
+
+ self.render_grid()
+
+ self.recursive_render(self.scene.rootnode, None, mode=HELPERS)
+
+ ### First, the silhouette
+
+ if False:
+ shader = self.silhouette_shader
+
+ # glDepthMask(GL_FALSE)
+ glCullFace(GL_FRONT) # cull front faces
+
+ glUseProgram(shader)
+ glUniform1f(shader.u_bordersize, 0.01)
+
+ glUniformMatrix4fv(shader.u_viewProjectionMatrix, 1, GL_TRUE,
+ numpy.dot(self.projection_matrix, self.view_matrix))
+
+ self.recursive_render(self.scene.rootnode, shader, mode=SILHOUETTE)
+
+ glUseProgram(0)
+
+ ### Then, inner shading
+ # glDepthMask(GL_TRUE)
+ glCullFace(GL_BACK)
+
+ use_gooch = False
+ if use_gooch:
+ shader = self.gooch_shader
+
+ glUseProgram(shader)
+ glUniform3f(shader.u_lightPos, -.5, -.5, .5)
+
+ ##### GOOCH specific
+ glUniform3f(shader.u_coolColor, 159.0 / 255, 148.0 / 255, 255.0 / 255)
+ glUniform3f(shader.u_warmColor, 255.0 / 255, 75.0 / 255, 75.0 / 255)
+ glUniform1f(shader.u_alpha, .25)
+ glUniform1f(shader.u_beta, .25)
+ #########
+ else:
+ shader = self.shader
+ glUseProgram(shader)
+ glUniform3f(shader.u_lightPos, -.5, -.5, .5)
+
+ glUniformMatrix4fv(shader.u_viewProjectionMatrix, 1, GL_TRUE,
+ numpy.dot(self.projection_matrix, self.view_matrix))
+
+ self.recursive_render(self.scene.rootnode, shader)
+
+ glUseProgram(0)
+
+ def render_axis(self,
+ transformation=numpy.identity(4, dtype=numpy.float32),
+ label=None,
+ size=0.2,
+ selected=False):
+ m = transformation.transpose() # OpenGL row major
+
+ glPushMatrix()
+ glMultMatrixf(m)
+
+ glLineWidth(3 if selected else 1)
+
+ size = 2 * size if selected else size
+
+ glBegin(GL_LINES)
+
+ # draw line for x axis
+ glColor3f(1.0, 0.0, 0.0)
+ glVertex3f(0.0, 0.0, 0.0)
+ glVertex3f(size, 0.0, 0.0)
+
+ # draw line for y axis
+ glColor3f(0.0, 1.0, 0.0)
+ glVertex3f(0.0, 0.0, 0.0)
+ glVertex3f(0.0, size, 0.0)
+
+ # draw line for Z axis
+ glColor3f(0.0, 0.0, 1.0)
+ glVertex3f(0.0, 0.0, 0.0)
+ glVertex3f(0.0, 0.0, size)
+
+ glEnd()
+
+ if label:
+ self.showtext(label)
+
+ glPopMatrix()
+
+ @staticmethod
+ def render_camera(camera, transformation):
+
+ m = transformation.transpose() # OpenGL row major
+
+ aspect = camera.aspect
+
+ u = 0.1 # unit size (in m)
+ l = 3 * u # length of the camera cone
+ f = 3 * u # aperture of the camera cone
+
+ glPushMatrix()
+ glMultMatrixf(m)
+
+ glLineWidth(2)
+ glBegin(GL_LINE_STRIP)
+
+ glColor3f(.2, .2, .2)
+
+ glVertex3f(u, u, -u)
+ glVertex3f(u, -u, -u)
+ glVertex3f(-u, -u, -u)
+ glVertex3f(-u, u, -u)
+ glVertex3f(u, u, -u)
+
+ glVertex3f(u, u, 0.0)
+ glVertex3f(u, -u, 0.0)
+ glVertex3f(-u, -u, 0.0)
+ glVertex3f(-u, u, 0.0)
+ glVertex3f(u, u, 0.0)
+
+ glVertex3f(f * aspect, f, l)
+ glVertex3f(f * aspect, -f, l)
+ glVertex3f(-f * aspect, -f, l)
+ glVertex3f(-f * aspect, f, l)
+ glVertex3f(f * aspect, f, l)
+
+ glEnd()
+
+ glBegin(GL_LINE_STRIP)
+ glVertex3f(u, -u, -u)
+ glVertex3f(u, -u, 0.0)
+ glVertex3f(f * aspect, -f, l)
+ glEnd()
+
+ glBegin(GL_LINE_STRIP)
+ glVertex3f(-u, -u, -u)
+ glVertex3f(-u, -u, 0.0)
+ glVertex3f(-f * aspect, -f, l)
+ glEnd()
+
+ glBegin(GL_LINE_STRIP)
+ glVertex3f(-u, u, -u)
+ glVertex3f(-u, u, 0.0)
+ glVertex3f(-f * aspect, f, l)
+ glEnd()
+
+ glPopMatrix()
+
+ @staticmethod
+ def render_grid():
+
+ glLineWidth(1)
+ glColor3f(0.5, 0.5, 0.5)
+ glBegin(GL_LINES)
+ for i in range(-10, 11):
+ glVertex3f(i, -10.0, 0.0)
+ glVertex3f(i, 10.0, 0.0)
+
+ for i in range(-10, 11):
+ glVertex3f(-10.0, i, 0.0)
+ glVertex3f(10.0, i, 0.0)
+ glEnd()
+
+ def recursive_render(self, node, shader, mode=BASE, with_normals=True):
+ """ Main recursive rendering method.
+ """
+
+ normals = with_normals
+
+ if mode == COLORS:
+ normals = False
+
+
+ if not hasattr(node, "selected"):
+ node.selected = False
+
+ m = get_world_transform(self.scene, node)
+
+ # HELPERS mode
+ ###
+ if mode == HELPERS:
+ # if node.type == ENTITY:
+ self.render_axis(m,
+ label=node.name if node != self.scene.rootnode else None,
+ selected=node.selected if hasattr(node, "selected") else False)
+
+ if node.type == CAMERA:
+ self.render_camera(node, m)
+
+ for child in node.children:
+ self.recursive_render(child, shader, mode)
+
+ return
+
+ # Mesh rendering modes
+ ###
+ if node.type == MESH:
+
+ for mesh in node.meshes:
+
+ stride = 24 # 6 * 4 bytes
+
+ if node.selected and mode == SILHOUETTE:
+ glUniform4f(shader.u_materialDiffuse, 1.0, 0.0, 0.0, 1.0)
+ glUniformMatrix4fv(shader.u_modelViewMatrix, 1, GL_TRUE,
+ numpy.dot(self.view_matrix, m))
+
+ else:
+ if mode == COLORS:
+ colorid = self.node2colorid[node.name]
+ r, g, b = self.get_rgb_from_colorid(colorid)
+ glUniform4f(shader.u_materialDiffuse, r / 255.0, g / 255.0, b / 255.0, 1.0)
+ elif mode == SILHOUETTE:
+ glUniform4f(shader.u_materialDiffuse, .0, .0, .0, 1.0)
+ else:
+ if node.selected:
+ diffuse = (1.0, 0.0, 0.0, 1.0) # selected nodes in red
+ else:
+ diffuse = mesh.material.properties["diffuse"]
+ if len(diffuse) == 3: # RGB instead of expected RGBA
+ diffuse.append(1.0)
+ glUniform4f(shader.u_materialDiffuse, *diffuse)
+ # if ambient:
+ # glUniform4f( shader.Material_ambient, *mat["ambient"] )
+
+ if mode == BASE: # not in COLORS or SILHOUETTE
+ normal_matrix = linalg.inv(numpy.dot(self.view_matrix, m)[0:3, 0:3]).transpose()
+ glUniformMatrix3fv(shader.u_normalMatrix, 1, GL_TRUE, normal_matrix)
+
+ glUniformMatrix4fv(shader.u_modelMatrix, 1, GL_TRUE, m)
+
+ vbo = mesh.gl["vbo"]
+ vbo.bind()
+
+ glEnableVertexAttribArray(shader.a_vertex)
+ if normals:
+ glEnableVertexAttribArray(shader.a_normal)
+
+ glVertexAttribPointer(
+ shader.a_vertex,
+ 3, GL_FLOAT, False, stride, vbo
+ )
+
+ if normals:
+ glVertexAttribPointer(
+ shader.a_normal,
+ 3, GL_FLOAT, False, stride, vbo + 12
+ )
+
+ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, mesh.gl["faces"])
+ glDrawElements(GL_TRIANGLES, mesh.gl["nbfaces"] * 3, GL_UNSIGNED_INT, None)
+
+ vbo.unbind()
+ glDisableVertexAttribArray(shader.a_vertex)
+
+ if normals:
+ glDisableVertexAttribArray(shader.a_normal)
+
+ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0)
+
+ for child in node.children:
+ self.recursive_render(child, shader, mode)
+
+
+ def switch_to_overlay(self):
+ glPushMatrix()
+ self.set_overlay_projection()
+
+ def switch_from_overlay(self):
+ self.set_camera_projection()
+ glPopMatrix()
+
+ def select_node(self, node):
+ self.currently_selected = node
+ self.update_node_select(self.scene.rootnode)
+
+ def update_node_select(self, node):
+ if node is self.currently_selected:
+ node.selected = True
+ else:
+ node.selected = False
+
+ for child in node.children:
+ self.update_node_select(child)
+
+ def loop(self):
+
+ pygame.display.flip()
+
+ if not self.process_events():
+ return False # ESC has been pressed
+
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)
+
+ return True
+
+ def process_events(self):
+
+ LEFT_BUTTON = 1
+ MIDDLE_BUTTON = 2
+ RIGHT_BUTTON = 3
+ WHEEL_UP = 4
+ WHEEL_DOWN = 5
+
+ dx, dy = pygame.mouse.get_rel()
+ mousex, mousey = pygame.mouse.get_pos()
+
+ zooming_one_shot = False
+
+ ok = True
+
+ for evt in pygame.event.get():
+ if evt.type == pygame.MOUSEBUTTONDOWN and evt.button == LEFT_BUTTON:
+ hovered = self.get_hovered_node(mousex, self.h - mousey)
+ if hovered:
+ if self.currently_selected and self.currently_selected == hovered:
+ self.select_node(None)
+ else:
+ logger.info("Node %s selected" % hovered)
+ self.select_node(hovered)
+ else:
+ self.is_rotating = True
+ if evt.type == pygame.MOUSEBUTTONUP and evt.button == LEFT_BUTTON:
+ self.is_rotating = False
+
+ if evt.type == pygame.MOUSEBUTTONDOWN and evt.button == MIDDLE_BUTTON:
+ self.is_panning = True
+ if evt.type == pygame.MOUSEBUTTONUP and evt.button == MIDDLE_BUTTON:
+ self.is_panning = False
+
+ if evt.type == pygame.MOUSEBUTTONDOWN and evt.button == RIGHT_BUTTON:
+ self.is_zooming = True
+ if evt.type == pygame.MOUSEBUTTONUP and evt.button == RIGHT_BUTTON:
+ self.is_zooming = False
+
+ if evt.type == pygame.MOUSEBUTTONDOWN and evt.button in [WHEEL_UP, WHEEL_DOWN]:
+ zooming_one_shot = True
+ self.is_zooming = True
+ dy = -10 if evt.button == WHEEL_UP else 10
+
+ if evt.type == pygame.KEYDOWN:
+ ok = (ok and self.process_keystroke(evt.key, evt.mod))
+
+ self.controls_3d(dx, dy, zooming_one_shot)
+
+ return ok
+
+ def process_keystroke(self, key, mod):
+
+ # process arrow keys if an object is selected
+ if self.currently_selected:
+ up = 0
+ strafe = 0
+
+ if key == pygame.K_UP:
+ up = 1
+ if key == pygame.K_DOWN:
+ up = -1
+ if key == pygame.K_LEFT:
+ strafe = -1
+ if key == pygame.K_RIGHT:
+ strafe = 1
+
+ self.move_selected_node(up, strafe)
+
+ if key == pygame.K_f:
+ pygame.display.toggle_fullscreen()
+
+ if key == pygame.K_TAB:
+ self.cycle_cameras()
+
+ if key in [pygame.K_ESCAPE, pygame.K_q]:
+ return False
+
+ return True
+
+ def controls_3d(self, dx, dy, zooming_one_shot=False):
+ """ Orbiting the camera is implemented the following way:
+
+ - the rotation is split into a rotation around the *world* Z axis
+ (controlled by the horizontal mouse motion along X) and a
+ rotation around the *X* axis of the camera (pitch) *shifted to
+ the focal origin* (the world origin for now). This is controlled
+ by the vertical motion of the mouse (Y axis).
+ - as a result, the resulting transformation of the camera in the
+ world frame C' is:
+ C' = (T · Rx · Tâ»Â¹ · (Rz · C)â»Â¹)â»Â¹
+ where:
+ - C is the original camera transformation in the world frame,
+ - Rz is the rotation along the Z axis (in the world frame)
+ - T is the translation camera -> world (ie, the inverse of the
+ translation part of C
+ - Rx is the rotation around X in the (translated) camera frame """
+
+ CAMERA_TRANSLATION_FACTOR = 0.01
+ CAMERA_ROTATION_FACTOR = 0.01
+
+ if not (self.is_rotating or self.is_panning or self.is_zooming):
+ return
+
+ current_pos = self.current_cam.transformation[:3, 3].copy()
+ distance = numpy.linalg.norm(self.focal_point - current_pos)
+
+ if self.is_rotating:
+ rotation_camera_x = dy * CAMERA_ROTATION_FACTOR
+ rotation_world_z = dx * CAMERA_ROTATION_FACTOR
+ world_z_rotation = transformations.euler_matrix(0, 0, rotation_world_z)
+ cam_x_rotation = transformations.euler_matrix(rotation_camera_x, 0, 0)
+
+ after_world_z_rotation = numpy.dot(world_z_rotation, self.current_cam.transformation)
+
+ inverse_transformation = transformations.inverse_matrix(after_world_z_rotation)
+
+ translation = transformations.translation_matrix(
+ transformations.decompose_matrix(inverse_transformation)[3])
+ inverse_translation = transformations.inverse_matrix(translation)
+
+ new_inverse = numpy.dot(inverse_translation, inverse_transformation)
+ new_inverse = numpy.dot(cam_x_rotation, new_inverse)
+ new_inverse = numpy.dot(translation, new_inverse)
+
+ self.current_cam.transformation = transformations.inverse_matrix(new_inverse).astype(numpy.float32)
+
+ if self.is_panning:
+ tx = -dx * CAMERA_TRANSLATION_FACTOR * distance
+ ty = dy * CAMERA_TRANSLATION_FACTOR * distance
+ cam_transform = transformations.translation_matrix((tx, ty, 0)).astype(numpy.float32)
+ self.current_cam.transformation = numpy.dot(self.current_cam.transformation, cam_transform)
+
+ if self.is_zooming:
+ tz = dy * CAMERA_TRANSLATION_FACTOR * distance
+ cam_transform = transformations.translation_matrix((0, 0, tz)).astype(numpy.float32)
+ self.current_cam.transformation = numpy.dot(self.current_cam.transformation, cam_transform)
+
+ if zooming_one_shot:
+ self.is_zooming = False
+
+ self.update_view_camera()
+
+ def update_view_camera(self):
+
+ self.view_matrix = linalg.inv(self.current_cam.transformation)
+
+ # Rotate by 180deg around X to have Z pointing backward (OpenGL convention)
+ self.view_matrix = numpy.dot(ROTATION_180_X, self.view_matrix)
+
+ glMatrixMode(GL_MODELVIEW)
+ glLoadIdentity()
+ glMultMatrixf(self.view_matrix.transpose())
+
+ def move_selected_node(self, up, strafe):
+ self.currently_selected.transformation[0][3] += strafe
+ self.currently_selected.transformation[2][3] += up
+
+ @staticmethod
+ def showtext(text, x=0, y=0, z=0, size=20):
+
+ # TODO: alpha blending does not work...
+ # glEnable(GL_BLEND)
+ # glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
+
+ font = pygame.font.Font(None, size)
+ text_surface = font.render(text, True, (10, 10, 10, 255),
+ (255 * 0.18, 255 * 0.18, 255 * 0.18, 0))
+ text_data = pygame.image.tostring(text_surface, "RGBA", True)
+ glRasterPos3d(x, y, z)
+ glDrawPixels(text_surface.get_width(),
+ text_surface.get_height(),
+ GL_RGBA, GL_UNSIGNED_BYTE,
+ text_data)
+
+ # glDisable(GL_BLEND)
+
+
+def main(model, width, height):
+ app = PyAssimp3DViewer(model, w=width, h=height)
+
+ clock = pygame.time.Clock()
+
+ while app.loop():
+
+ app.update_view_camera()
+
+ ## Main rendering
+ app.render()
+
+ ## GUI text display
+ app.switch_to_overlay()
+ app.showtext("Active camera: %s" % str(app.current_cam), 10, app.h - 30)
+ if app.currently_selected:
+ app.showtext("Selected node: %s" % app.currently_selected, 10, app.h - 50)
+ pos = app.h - 70
+
+ app.showtext("(%sm, %sm, %sm)" % (app.currently_selected.transformation[0, 3],
+ app.currently_selected.transformation[1, 3],
+ app.currently_selected.transformation[2, 3]), 30, pos)
+
+ app.switch_from_overlay()
+
+ # Make sure we do not go over 30fps
+ clock.tick(30)
+
+ logger.info("Quitting! Bye bye!")
+
+
+#########################################################################
+#########################################################################
+
+if __name__ == '__main__':
+ if not len(sys.argv) > 1:
+ print("Usage: " + __file__ + " <model>")
+ sys.exit(2)
+
+ main(model=sys.argv[1], width=1024, height=768)
diff --git a/port/PyAssimp/scripts/transformations.py b/port/PyAssimp/scripts/transformations.py
index 6d6f19e5b..bf0cac9e3 100644
--- a/port/PyAssimp/scripts/transformations.py
+++ b/port/PyAssimp/scripts/transformations.py
@@ -583,7 +583,7 @@ def clip_matrix(left, right, bottom, top, near, far, perspective=False):
orthographic canonical view volume (a box).
Homogeneous coordinates transformed by the perspective clip matrix
- need to be dehomogenized (devided by w coordinate).
+ need to be dehomogenized (divided by w coordinate).
>>> frustrum = numpy.random.rand(6)
>>> frustrum[1] += frustrum[0]
diff --git a/port/PyAssimp/setup.py b/port/PyAssimp/setup.py
index e683f7a81..e19e497f0 100644
--- a/port/PyAssimp/setup.py
+++ b/port/PyAssimp/setup.py
@@ -1,13 +1,26 @@
+ #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from distutils.core import setup
+def readme():
+ with open('README.rst') as f:
+ return f.read()
+
setup(name='pyassimp',
- version='3.3',
+ version='4.1.3',
license='ISC',
description='Python bindings for the Open Asset Import Library (ASSIMP)',
+ long_description=readme(),
url='https://github.com/assimp/assimp',
+ author='ASSIMP developers',
+ author_email='assimp-discussions@lists.sourceforge.net',
+ maintainer='Séverin Lemaignan',
+ maintainer_email='severin@guakamole.org',
packages=['pyassimp'],
- data_files=[('share/pyassimp', ['README.md']),
- ('share/examples/pyassimp', ['scripts/' + f for f in os.listdir('scripts/')])], requires=['numpy']
+ data_files=[
+ ('share/pyassimp', ['README.rst']),
+ ('share/examples/pyassimp', ['scripts/' + f for f in os.listdir('scripts/')])
+ ],
+ requires=['numpy']
)
diff --git a/port/dAssimp/assimp/mesh.d b/port/dAssimp/assimp/mesh.d
index 9f20c9a66..da6193631 100644
--- a/port/dAssimp/assimp/mesh.d
+++ b/port/dAssimp/assimp/mesh.d
@@ -51,7 +51,7 @@ import assimp.types;
extern ( C ) {
/*
* These limits are required to match the settings Assimp was compiled
- * against. Therfore, do not redefine them unless you build the library
+ * against. Therefore, do not redefine them unless you build the library
* from source using the same definitions.
*/
diff --git a/port/iOS/IPHONEOS_ARM64E_TOOLCHAIN.cmake b/port/iOS/IPHONEOS_ARM64E_TOOLCHAIN.cmake
new file mode 100644
index 000000000..0cf2b6b66
--- /dev/null
+++ b/port/iOS/IPHONEOS_ARM64E_TOOLCHAIN.cmake
@@ -0,0 +1,17 @@
+INCLUDE(CMakeForceCompiler)
+
+SET (CMAKE_CROSSCOMPILING TRUE)
+SET (CMAKE_SYSTEM_NAME "Darwin")
+SET (CMAKE_SYSTEM_PROCESSOR "arm64e")
+SET (IOS TRUE)
+
+SET (IOS_SDK_DEVICE iPhoneOS)
+
+SET (SDKVER "${IOS_SDK_VERSION}")
+SET (DEVROOT "${XCODE_ROOT_DIR}/Platforms/${IOS_SDK_DEVICE}.platform/Developer")
+
+
+SET (CMAKE_FIND_ROOT_PATH "${SDKROOT}" "${DEVROOT}")
+SET (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+SET (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+SET (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) \ No newline at end of file
diff --git a/port/iOS/IPHONEOS_ARM64_TOOLCHAIN.cmake b/port/iOS/IPHONEOS_ARM64_TOOLCHAIN.cmake
index bd7199cc5..0f476f11f 100644
--- a/port/iOS/IPHONEOS_ARM64_TOOLCHAIN.cmake
+++ b/port/iOS/IPHONEOS_ARM64_TOOLCHAIN.cmake
@@ -3,17 +3,15 @@ INCLUDE(CMakeForceCompiler)
SET (CMAKE_CROSSCOMPILING TRUE)
SET (CMAKE_SYSTEM_NAME "Darwin")
SET (CMAKE_SYSTEM_PROCESSOR "arm64")
+SET (IOS TRUE)
-SET (SDKVER "7.1")
-SET (DEVROOT "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain")
-SET (SDKROOT "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS${SDKVER}.sdk")
-SET (CC "${DEVROOT}/usr/bin/llvm-gcc")
-SET (CXX "${DEVROOT}/usr/bin/llvm-g++")
+SET (IOS_SDK_DEVICE iPhoneOS)
-CMAKE_FORCE_C_COMPILER (${CC} LLVM)
-CMAKE_FORCE_CXX_COMPILER (${CXX} LLVM)
+SET (SDKVER "${IOS_SDK_VERSION}")
+SET (DEVROOT "${XCODE_ROOT_DIR}/Platforms/${IOS_SDK_DEVICE}.platform/Developer")
-SET (CMAKE_FIND_ROOT_PATH "${SDKROOT}" "${DEVROOT}")
+
+SET (CMAKE_FIND_ROOT_PATH "${SDKROOT}" "${DEVROOT}")
SET (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) \ No newline at end of file
diff --git a/port/iOS/IPHONEOS_ARMV6_TOOLCHAIN.cmake b/port/iOS/IPHONEOS_ARMV6_TOOLCHAIN.cmake
index 5ec416322..2f5d96929 100644
--- a/port/iOS/IPHONEOS_ARMV6_TOOLCHAIN.cmake
+++ b/port/iOS/IPHONEOS_ARMV6_TOOLCHAIN.cmake
@@ -3,17 +3,15 @@ INCLUDE(CMakeForceCompiler)
SET (CMAKE_CROSSCOMPILING TRUE)
SET (CMAKE_SYSTEM_NAME "Darwin")
SET (CMAKE_SYSTEM_PROCESSOR "armv6")
+SET (IOS TRUE)
-SET (SDKVER "7.1")
-SET (DEVROOT "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain")
-SET (SDKROOT "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS${SDKVER}.sdk")
-SET (CC "${DEVROOT}/usr/bin/clang")
-SET (CXX "${DEVROOT}/usr/bin/clang++")
+SET (IOS_SDK_DEVICE iPhoneOS)
-CMAKE_FORCE_C_COMPILER (${CC} LLVM)
-CMAKE_FORCE_CXX_COMPILER (${CXX} LLVM)
+SET (SDKVER "${IOS_SDK_VERSION}")
+SET (DEVROOT "${XCODE_ROOT_DIR}/Platforms/${IOS_SDK_DEVICE}.platform/Developer")
-SET (CMAKE_FIND_ROOT_PATH "${SDKROOT}" "${DEVROOT}")
+
+SET (CMAKE_FIND_ROOT_PATH "${SDKROOT}" "${DEVROOT}")
SET (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) \ No newline at end of file
diff --git a/port/iOS/IPHONEOS_ARMV7S_TOOLCHAIN.cmake b/port/iOS/IPHONEOS_ARMV7S_TOOLCHAIN.cmake
index f11519aa4..325d48315 100644
--- a/port/iOS/IPHONEOS_ARMV7S_TOOLCHAIN.cmake
+++ b/port/iOS/IPHONEOS_ARMV7S_TOOLCHAIN.cmake
@@ -3,17 +3,15 @@ INCLUDE(CMakeForceCompiler)
SET (CMAKE_CROSSCOMPILING TRUE)
SET (CMAKE_SYSTEM_NAME "Darwin")
SET (CMAKE_SYSTEM_PROCESSOR "armv7s")
+SET (IOS TRUE)
-SET (SDKVER "7.1")
-SET (DEVROOT "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain")
-SET (SDKROOT "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS${SDKVER}.sdk")
-SET (CC "${DEVROOT}/usr/bin/clang")
-SET (CXX "${DEVROOT}/usr/bin/clang++")
+SET (IOS_SDK_DEVICE iPhoneOS)
-CMAKE_FORCE_C_COMPILER (${CC} LLVM)
-CMAKE_FORCE_CXX_COMPILER (${CXX} LLVM)
+SET (SDKVER "${IOS_SDK_VERSION}")
+SET (DEVROOT "${XCODE_ROOT_DIR}/Platforms/${IOS_SDK_DEVICE}.platform/Developer")
-SET (CMAKE_FIND_ROOT_PATH "${SDKROOT}" "${DEVROOT}")
+
+SET (CMAKE_FIND_ROOT_PATH "${SDKROOT}" "${DEVROOT}")
SET (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) \ No newline at end of file
diff --git a/port/iOS/IPHONEOS_ARMV7_TOOLCHAIN.cmake b/port/iOS/IPHONEOS_ARMV7_TOOLCHAIN.cmake
index b7f196c0f..73087e06c 100644
--- a/port/iOS/IPHONEOS_ARMV7_TOOLCHAIN.cmake
+++ b/port/iOS/IPHONEOS_ARMV7_TOOLCHAIN.cmake
@@ -3,17 +3,15 @@ INCLUDE(CMakeForceCompiler)
SET (CMAKE_CROSSCOMPILING TRUE)
SET (CMAKE_SYSTEM_NAME "Darwin")
SET (CMAKE_SYSTEM_PROCESSOR "armv7")
+SET (IOS TRUE)
-SET (SDKVER "7.1")
-SET (DEVROOT "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain")
-SET (SDKROOT "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS${SDKVER}.sdk")
-SET (CC "${DEVROOT}/usr/bin/clang")
-SET (CXX "${DEVROOT}/usr/bin/clang++")
+SET (IOS_SDK_DEVICE iPhoneOS)
-CMAKE_FORCE_C_COMPILER (${CC} LLVM)
-CMAKE_FORCE_CXX_COMPILER (${CXX} LLVM)
+SET (SDKVER "${IOS_SDK_VERSION}")
+SET (DEVROOT "${XCODE_ROOT_DIR}/Platforms/${IOS_SDK_DEVICE}.platform/Developer")
-SET (CMAKE_FIND_ROOT_PATH "${SDKROOT}" "${DEVROOT}")
+
+SET (CMAKE_FIND_ROOT_PATH "${SDKROOT}" "${DEVROOT}")
SET (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) \ No newline at end of file
diff --git a/port/iOS/IPHONEOS_I386_TOOLCHAIN.cmake b/port/iOS/IPHONEOS_I386_TOOLCHAIN.cmake
index 22178bb87..dc35d3760 100644
--- a/port/iOS/IPHONEOS_I386_TOOLCHAIN.cmake
+++ b/port/iOS/IPHONEOS_I386_TOOLCHAIN.cmake
@@ -3,18 +3,15 @@ INCLUDE(CMakeForceCompiler)
SET (CMAKE_CROSSCOMPILING TRUE)
SET (CMAKE_SYSTEM_NAME "Darwin")
SET (CMAKE_SYSTEM_PROCESSOR "i386")
+SET (IOS TRUE)
-SET (SDKVER "7.1")
+SET (IOS_SDK_DEVICE iPhoneSimulator)
-SET (DEVROOT "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain")
-SET (SDKROOT "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator${SDKVER}.sdk")
-SET (CC "${DEVROOT}/usr/bin/clang")
-SET (CXX "${DEVROOT}/usr/bin/clang++")
+SET (SDKVER "${IOS_SDK_VERSION}")
+SET (DEVROOT "${XCODE_ROOT_DIR}/Platforms/${IOS_SDK_DEVICE}.platform/Developer")
-CMAKE_FORCE_C_COMPILER (${CC} LLVM)
-CMAKE_FORCE_CXX_COMPILER (${CXX} LLVM)
-SET (CMAKE_FIND_ROOT_PATH "${SDKROOT}" "${DEVROOT}")
+SET (CMAKE_FIND_ROOT_PATH "${SDKROOT}" "${DEVROOT}")
SET (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) \ No newline at end of file
diff --git a/port/iOS/IPHONEOS_X86_64_TOOLCHAIN.cmake b/port/iOS/IPHONEOS_X86_64_TOOLCHAIN.cmake
index 3c69ecdb3..a9ed2b898 100644
--- a/port/iOS/IPHONEOS_X86_64_TOOLCHAIN.cmake
+++ b/port/iOS/IPHONEOS_X86_64_TOOLCHAIN.cmake
@@ -3,18 +3,15 @@ INCLUDE(CMakeForceCompiler)
SET (CMAKE_CROSSCOMPILING TRUE)
SET (CMAKE_SYSTEM_NAME "Darwin")
SET (CMAKE_SYSTEM_PROCESSOR "x86_64")
+SET (IOS TRUE)
-SET (SDKVER "7.1")
+SET (IOS_SDK_DEVICE iPhoneSimulator)
-SET (DEVROOT "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain")
-SET (SDKROOT "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator${SDKVER}.sdk")
-SET (CC "${DEVROOT}/usr/bin/clang")
-SET (CXX "${DEVROOT}/usr/bin/clang++")
+SET (SDKVER "${IOS_SDK_VERSION}")
+SET (DEVROOT "${XCODE_ROOT_DIR}/Platforms/${IOS_SDK_DEVICE}.platform/Developer")
-CMAKE_FORCE_C_COMPILER (${CC} LLVM)
-CMAKE_FORCE_CXX_COMPILER (${CXX} LLVM)
-SET (CMAKE_FIND_ROOT_PATH "${SDKROOT}" "${DEVROOT}")
+SET (CMAKE_FIND_ROOT_PATH "${SDKROOT}" "${DEVROOT}")
SET (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) \ No newline at end of file
diff --git a/port/iOS/build.sh b/port/iOS/build.sh
index 44683f0c7..f118c45c1 100755
--- a/port/iOS/build.sh
+++ b/port/iOS/build.sh
@@ -6,24 +6,41 @@
BUILD_DIR="./lib/iOS"
-IOS_SDK_VERSION=
-IOS_SDK_TARGET=6.0
-#(iPhoneOS iPhoneSimulator) -- determined from arch
-IOS_SDK_DEVICE=
+###################################
+# SDK Version
+###################################
+IOS_SDK_VERSION=$(xcodebuild -version -sdk iphoneos | grep SDKVersion | cut -f2 -d ':' | tr -d '[[:space:]]')
+###################################
-XCODE_ROOT_DIR=/Applications/Xcode.app/Contents
-TOOLCHAIN=$XCODE_ROOT_DIR//Developer/Toolchains/XcodeDefault.xctoolchain
+###################################
+# BUILD Configuration
+###################################
-BUILD_ARCHS_DEVICE="armv7 armv7s arm64"
-BUILD_ARCHS_SIMULATOR="i386 x86_64"
-BUILD_ARCHS_ALL=(armv7 armv7s arm64 i386 x86_64)
+BUILD_SHARED_LIBS=OFF
+BUILD_TYPE=Release
+
+################################################
+# Minimum iOS deployment target version
+################################################
+MIN_IOS_VERSION="6.0"
+
+IOS_SDK_TARGET=$MIN_IOS_VERSION
+XCODE_ROOT_DIR=$(xcode-select --print-path)
+TOOLCHAIN=$XCODE_ROOT_DIR/Toolchains/XcodeDefault.xctoolchain
+
+CMAKE_C_COMPILER=$(xcrun -find cc)
+CMAKE_CXX_COMPILER=$(xcrun -find c++)
+
+BUILD_ARCHS_DEVICE="arm64e arm64 armv7s armv7"
+BUILD_ARCHS_SIMULATOR="x86_64 i386"
+BUILD_ARCHS_ALL=($BUILD_ARCHS_DEVICE $BUILD_ARCHS_SIMULATOR)
CPP_DEV_TARGET_LIST=(miphoneos-version-min mios-simulator-version-min)
CPP_DEV_TARGET=
CPP_STD_LIB_LIST=(libc++ libstdc++)
CPP_STD_LIB=
CPP_STD_LIST=(c++11 c++14)
-CPP_STD=
+CPP_STD=c++11
function join { local IFS="$1"; shift; echo "$*"; }
@@ -41,27 +58,42 @@ build_arch()
echo '[!] Target SDK set to DEVICE.'
fi
- unset DEVROOT SDKROOT CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
-
- export DEVROOT=$XCODE_ROOT_DIR/Developer/Platforms/$IOS_SDK_DEVICE.platform/Developer
+ unset DEVROOT SDKROOT CFLAGS LDFLAGS CPPFLAGS CXXFLAGS CMAKE_CLI_INPUT
+
+ #export CC="$(xcrun -sdk iphoneos -find clang)"
+ #export CPP="$CC -E"
+ export DEVROOT=$XCODE_ROOT_DIR/Platforms/$IOS_SDK_DEVICE.platform/Developer
export SDKROOT=$DEVROOT/SDKs/$IOS_SDK_DEVICE$IOS_SDK_VERSION.sdk
- export CFLAGS="-arch $1 -pipe -no-cpp-precomp -stdlib=$CPP_STD_LIB -isysroot $SDKROOT -$CPP_DEV_TARGET=$IOS_SDK_TARGET -I$SDKROOT/usr/include/"
- export LDFLAGS="-L$SDKROOT/usr/lib/"
- export CPPFLAGS=$CFLAGS
+ export CFLAGS="-arch $1 -pipe -no-cpp-precomp -stdlib=$CPP_STD_LIB -isysroot $SDKROOT -I$SDKROOT/usr/include/ -miphoneos-version-min=$IOS_SDK_TARGET"
+ if [[ "$BUILD_TYPE" =~ "Debug" ]]; then
+ export CFLAGS="$CFLAGS -Og"
+ else
+ export CFLAGS="$CFLAGS -O3"
+ fi
+ export LDFLAGS="-arch $1 -isysroot $SDKROOT -L$SDKROOT/usr/lib/"
+ export CPPFLAGS="$CFLAGS"
export CXXFLAGS="$CFLAGS -std=$CPP_STD"
rm CMakeCache.txt
-
- cmake -G 'Unix Makefiles' -DCMAKE_TOOLCHAIN_FILE=./port/iOS/IPHONEOS_$(echo $1 | tr '[:lower:]' '[:upper:]')_TOOLCHAIN.cmake -DENABLE_BOOST_WORKAROUND=ON -DBUILD_SHARED_LIBS=OFF
+
+ CMAKE_CLI_INPUT="-DCMAKE_C_COMPILER=$CMAKE_C_COMPILER -DCMAKE_CXX_COMPILER=$CMAKE_CXX_COMPILER -DCMAKE_TOOLCHAIN_FILE=./port/iOS/IPHONEOS_$(echo $1 | tr '[:lower:]' '[:upper:]')_TOOLCHAIN.cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DENABLE_BOOST_WORKAROUND=ON -DBUILD_SHARED_LIBS=$BUILD_SHARED_LIBS"
+
+ echo "[!] Running CMake with -G 'Unix Makefiles' $CMAKE_CLI_INPUT"
+
+ cmake -G 'Unix Makefiles' ${CMAKE_CLI_INPUT}
echo "[!] Building $1 library"
- $XCODE_ROOT_DIR/Developer/usr/bin/make clean
- $XCODE_ROOT_DIR/Developer/usr/bin/make assimp -j 8 -l
-
- echo "[!] Moving built library into: $BUILD_DIR/$1/"
-
- mv ./lib/libassimp.a $BUILD_DIR/$1/
+ xcrun -run make clean
+ xcrun -run make assimp -j 8 -l
+
+ if [[ "$BUILD_SHARED_LIBS" =~ "ON" ]]; then
+ echo "[!] Moving built dynamic libraries into: $BUILD_DIR/$1/"
+ mv ./lib/*.dylib $BUILD_DIR/$1/
+ fi
+
+ echo "[!] Moving built static libraries into: $BUILD_DIR/$1/"
+ mv ./lib/*.a $BUILD_DIR/$1/
}
echo "[!] $0 - assimp iOS build script"
@@ -85,12 +117,22 @@ for i in "$@"; do
DEPLOY_ARCHS=`echo $i | sed 's/[-a-zA-Z0-9]*=//'`
echo "[!] Selecting architectures: $DEPLOY_ARCHS"
;;
+ --debug)
+ BUILD_TYPE=Debug
+ echo "[!] Selecting build type: Debug"
+ ;;
+ --shared-lib)
+ BUILD_SHARED_LIBS=ON
+ echo "[!] Will generate dynamic libraries"
+ ;;
-n|--no-fat)
DEPLOY_FAT=0
echo "[!] Fat binary will not be created."
;;
-h|--help)
echo " - don't build fat library (--no-fat)."
+ echo " - Include debug information and symbols, no compiler optimizations (--debug)."
+ echo " - generate dynamic libraries rather than static ones (--shared-lib)."
echo " - supported architectures (--archs): $(echo $(join , ${BUILD_ARCHS_ALL[*]}) | sed 's/,/, /g')"
echo " - supported C++ STD libs (--stdlib): $(echo $(join , ${CPP_STD_LIB_LIST[*]}) | sed 's/,/, /g')"
echo " - supported C++ standards (--std): $(echo $(join , ${CPP_STD_LIST[*]}) | sed 's/,/, /g')"
@@ -105,19 +147,59 @@ cd ../../
rm -rf $BUILD_DIR
for ARCH_TARGET in $DEPLOY_ARCHS; do
+ echo "Creating folder: $BUILD_DIR/$ARCH_TARGET"
mkdir -p $BUILD_DIR/$ARCH_TARGET
+ echo "Building for arc: $ARCH_TARGET"
build_arch $ARCH_TARGET
#rm ./lib/libassimp.a
done
-if [[ "$DEPLOY_FAT" -eq 1 ]]; then
- echo '[+] Creating fat binary ...'
+
+make_fat_static_or_shared_binary()
+{
+ LIB_NAME=$1
+ LIPO_ARGS=''
for ARCH_TARGET in $DEPLOY_ARCHS; do
- LIPO_ARGS="$LIPO_ARGS-arch $ARCH_TARGET $BUILD_DIR/$ARCH_TARGET/libassimp.a "
+ if [[ "$BUILD_SHARED_LIBS" =~ "ON" ]]; then
+ LIPO_ARGS="$LIPO_ARGS-arch $ARCH_TARGET $BUILD_DIR/$ARCH_TARGET/$LIB_NAME.dylib "
+ else
+ LIPO_ARGS="$LIPO_ARGS-arch $ARCH_TARGET $BUILD_DIR/$ARCH_TARGET/$LIB_NAME.a "
+ fi
done
- LIPO_ARGS="$LIPO_ARGS-create -output $BUILD_DIR/libassimp-fat.a"
+ if [[ "$BUILD_SHARED_LIBS" =~ "ON" ]]; then
+ LIPO_ARGS="$LIPO_ARGS -create -output $BUILD_DIR/$LIB_NAME-fat.dylib"
+ else
+ LIPO_ARGS="$LIPO_ARGS -create -output $BUILD_DIR/$LIB_NAME-fat.a"
+ fi
lipo $LIPO_ARGS
- echo "[!] Done! The fat binary can be found at $BUILD_DIR"
+}
+
+make_fat_static_binary()
+{
+ LIB_NAME=$1
+ LIPO_ARGS=''
+ for ARCH_TARGET in $DEPLOY_ARCHS; do
+ LIPO_ARGS="$LIPO_ARGS-arch $ARCH_TARGET $BUILD_DIR/$ARCH_TARGET/$LIB_NAME.a "
+ done
+ LIPO_ARGS="$LIPO_ARGS -create -output $BUILD_DIR/$LIB_NAME-fat.a"
+ lipo $LIPO_ARGS
+}
+
+if [[ "$DEPLOY_FAT" -eq 1 ]]; then
+ echo '[+] Creating fat binaries ...'
+
+ if [[ "$BUILD_TYPE" =~ "Debug" ]]; then
+ make_fat_static_or_shared_binary 'libassimpd'
+ make_fat_static_binary 'libIrrXMLd'
+ make_fat_static_binary 'libzlibstaticd'
+ else
+ make_fat_static_or_shared_binary 'libassimp'
+ make_fat_static_binary 'libIrrXML'
+ make_fat_static_binary 'libzlibstatic'
+ fi
+
+ echo "[!] Done! The fat binaries can be found at $BUILD_DIR"
fi
+
diff --git a/port/jassimp/README b/port/jassimp/README
index 1ce9acc2b..a642f750a 100644
--- a/port/jassimp/README
+++ b/port/jassimp/README
@@ -44,7 +44,6 @@ jassimp supports most of assimps features. Current limitations are
* no support for mesh animations
* no support for embedded textures
* no support for importer configurations
-* no support for the custom I/O API of assimp
* some texture related material properties are not exposed via the API but only
accessible by traversing the list of properties. However this limitation is
also present in the c-API ...
diff --git a/port/jassimp/jassimp-native/src/jassimp.cpp b/port/jassimp/jassimp-native/src/jassimp.cpp
index 226e416aa..070dbc95d 100644
--- a/port/jassimp/jassimp-native/src/jassimp.cpp
+++ b/port/jassimp/jassimp-native/src/jassimp.cpp
@@ -1,7 +1,9 @@
#include "jassimp.h"
-#include <assimp/cimport.h>
+#include <assimp/Importer.hpp>
#include <assimp/scene.h>
+#include <assimp/IOStream.hpp>
+#include <assimp/IOSystem.hpp>
#ifdef JNI_LOG
@@ -12,9 +14,11 @@
#define lprintf(...) printf (__VA_ARGS__)
#endif /* ANDROID */
#else
-#define lprintf
+#define lprintf
#endif
+static std::string gLastErrorString;
+
// Automatically deletes a local ref when it goes out of scope
class SmartLocalRef {
private:
@@ -210,7 +214,7 @@ static bool getStaticField(JNIEnv *env, const char* className, const char* field
return false;
}
- jfieldID fieldId = env->GetFieldID(clazz, fieldName, signature);
+ jfieldID fieldId = env->GetStaticFieldID(clazz, fieldName, signature);
if (NULL == fieldId)
{
@@ -270,6 +274,81 @@ static bool callv(JNIEnv *env, jobject object, const char* typeName,
return true;
}
+static jobject callo(JNIEnv *env, jobject object, const char* typeName, const char* methodName,
+ const char* signature,/* const*/ jvalue* params)
+{
+ jclass clazz = env->FindClass(typeName);
+ SmartLocalRef clazzRef(env, clazz);
+
+ if (NULL == clazz)
+ {
+ lprintf("could not find class %s\n", typeName);
+ return NULL;
+ }
+
+ jmethodID mid = env->GetMethodID(clazz, methodName, signature);
+
+ if (NULL == mid)
+ {
+ lprintf("could not find method %s with signature %s in type %s\n", methodName, signature, typeName);
+ return NULL;
+ }
+
+ jobject jReturnValue = env->CallObjectMethodA(object, mid, params);
+
+ return jReturnValue;
+}
+
+static int calli(JNIEnv *env, jobject object, const char* typeName, const char* methodName,
+ const char* signature)
+{
+ jclass clazz = env->FindClass(typeName);
+ SmartLocalRef clazzRef(env, clazz);
+
+ if (NULL == clazz)
+ {
+ lprintf("could not find class %s\n", typeName);
+ return false;
+ }
+
+ jmethodID mid = env->GetMethodID(clazz, methodName, signature);
+
+ if (NULL == mid)
+ {
+ lprintf("could not find method %s with signature %s in type %s\n", methodName, signature, typeName);
+ return false;
+ }
+
+ jint jReturnValue = env->CallIntMethod(object, mid);
+
+ return (int) jReturnValue;
+}
+
+static int callc(JNIEnv *env, jobject object, const char* typeName, const char* methodName,
+ const char* signature)
+{
+ jclass clazz = env->FindClass(typeName);
+ SmartLocalRef clazzRef(env, clazz);
+
+ if (NULL == clazz)
+ {
+ lprintf("could not find class %s\n", typeName);
+ return false;
+ }
+
+ jmethodID mid = env->GetMethodID(clazz, methodName, signature);
+
+ if (NULL == mid)
+ {
+ lprintf("could not find method %s with signature %s in type %s\n", methodName, signature, typeName);
+ return false;
+ }
+
+ jint jReturnValue = env->CallCharMethod(object, mid);
+
+ return (int) jReturnValue;
+}
+
static bool callStaticObject(JNIEnv *env, const char* typeName, const char* methodName,
const char* signature,/* const*/ jvalue* params, jobject& returnValue)
@@ -359,6 +438,158 @@ static bool copyBufferArray(JNIEnv *env, jobject jMesh, const char* jBufferName,
return true;
}
+class JavaIOStream : public Assimp::IOStream
+{
+private:
+ size_t pos;
+ size_t size;
+ char* buffer;
+ jobject jIOStream;
+
+
+public:
+ JavaIOStream(size_t size, char* buffer, jobject jIOStream) :
+ pos(0),
+ size(size),
+ buffer(buffer),
+ jIOStream(jIOStream)
+ {};
+
+
+ ~JavaIOStream(void)
+ {
+ free(buffer);
+ };
+
+ size_t Read(void* pvBuffer, size_t pSize, size_t pCount)
+ {
+ const size_t cnt = std::min(pCount,(size - pos)/pSize);
+ const size_t ofs = pSize*cnt;
+
+ memcpy(pvBuffer, buffer + pos, ofs);
+ pos += ofs;
+
+ return cnt;
+ };
+ size_t Write(const void* pvBuffer, size_t pSize, size_t pCount)
+ {
+ return 0;
+ };
+
+ aiReturn Seek(size_t pOffset, aiOrigin pOrigin)
+ {
+ if (aiOrigin_SET == pOrigin) {
+ if (pOffset >= size) {
+ return AI_FAILURE;
+ }
+ pos = pOffset;
+ }
+ else if (aiOrigin_END == pOrigin) {
+ if (pOffset >= size) {
+ return AI_FAILURE;
+ }
+ pos = size-pOffset;
+ }
+ else {
+ if (pOffset + pos >= size) {
+ return AI_FAILURE;
+ }
+ pos += pOffset;
+ }
+ return AI_SUCCESS;
+ };
+
+ size_t Tell(void) const
+ {
+ return pos;
+ };
+
+ size_t FileSize() const
+ {
+ return size;
+ };
+
+ void Flush() {};
+
+
+ jobject javaObject()
+ {
+ return jIOStream;
+ };
+
+
+};
+
+
+class JavaIOSystem : public Assimp::IOSystem {
+ private:
+ JNIEnv* mJniEnv;
+ jobject& mJavaIOSystem;
+
+ public:
+ JavaIOSystem(JNIEnv* env, jobject& javaIOSystem) :
+ mJniEnv(env),
+ mJavaIOSystem(javaIOSystem)
+ {};
+
+ bool Exists( const char* pFile) const
+ {
+ jvalue params[1];
+ params[0].l = mJniEnv->NewStringUTF(pFile);
+ return call(mJniEnv, mJavaIOSystem, "jassimp/AiIOSystem", "exists", "(Ljava/lang/String;)Z", params);
+
+ };
+ char getOsSeparator() const
+ {
+ return (char) callc(mJniEnv, mJavaIOSystem, "jassimp/AiIOSystem", "getOsSeparator", "()C");
+ };
+
+ Assimp::IOStream* Open(const char* pFile,const char* pMode = "rb")
+ {
+ jvalue params[2];
+ params[0].l = mJniEnv->NewStringUTF(pFile);
+ params[1].l = mJniEnv->NewStringUTF(pMode);
+
+
+ jobject jStream = callo(mJniEnv, mJavaIOSystem, "jassimp/AiIOSystem", "open", "(Ljava/lang/String;Ljava/lang/String;)Ljassimp/AiIOStream;", params);
+ if(NULL == jStream)
+ {
+ lprintf("NULL object from AiIOSystem.open\n");
+ return NULL;
+ }
+
+ size_t size = calli(mJniEnv, jStream, "jassimp/AiIOStream", "getFileSize", "()I");
+ lprintf("Model file size is %d\n", size);
+
+ char* buffer = (char*)malloc(size);
+ jobject javaBuffer = mJniEnv->NewDirectByteBuffer(buffer, size);
+
+ jvalue readParams[1];
+ readParams[0].l = javaBuffer;
+ if(call(mJniEnv, jStream, "jassimp/AiIOStream", "read", "(Ljava/nio/ByteBuffer;)Z", readParams))
+ {
+ return new JavaIOStream(size, buffer, jStream);
+ }
+ else
+ {
+ lprintf("Read failure on AiIOStream.read");
+ free(buffer);
+ return NULL;
+ }
+
+ };
+ void Close( Assimp::IOStream* pFile)
+ {
+
+ jvalue params[1];
+ params[0].l = ((JavaIOStream*) pFile)->javaObject();
+ callv(mJniEnv, mJavaIOSystem, "jassimp/AiIOSystem", "close", "(Ljassimp/AiIOStream;)V", params);
+ delete pFile;
+ };
+
+
+
+};
static bool loadMeshes(JNIEnv *env, const aiScene* cScene, jobject& jScene)
@@ -774,8 +1005,164 @@ static bool loadMeshes(JNIEnv *env, const aiScene* cScene, jobject& jScene)
return true;
}
+static bool loadMetadata(JNIEnv *env, const aiNode* cNode, jobject& jNode)
+{
+ aiMetadata *cMetadata = cNode->mMetaData;
+
+ for(unsigned i = 0; i<cMetadata->mNumProperties; i++) {
+
+ aiString& metaDataKey = cMetadata->mKeys[i];
+ void* cData = cMetadata->mValues[i].mData;
+ aiMetadataType cMetadataType = cMetadata->mValues[i].mType;
-static bool loadSceneNode(JNIEnv *env, const aiNode *cNode, jobject parent, jobject* loadedNode = NULL)
+ jobject jAiMetadataEntry = NULL;
+ SmartLocalRef refMetadataEntry(env, jAiMetadataEntry);
+
+ if(!createInstance(env, "jassimp/AiMetadataEntry", jAiMetadataEntry)) {
+ return false;
+ }
+
+ jobject jAiMetadataTypeEnumValue = NULL;
+ SmartLocalRef refMetadataTypeEnumValue(env, jAiMetadataTypeEnumValue);
+
+ jobject jMetadataData = NULL;
+ SmartLocalRef refMetadataData(env, jMetadataData);
+
+ bool getMetadataTypeSuccess = false;
+ bool getMetadataDataSuccess = false;
+
+ jvalue boxingMethodArgument[1];
+
+ jboolean exceptionThrown;
+
+ switch (cMetadataType) {
+
+ case AI_BOOL: {
+ getMetadataTypeSuccess = getStaticField(env, "jassimp/AiMetadataEntry$AiMetadataType", "AI_BOOL", "Ljassimp/AiMetadataEntry$AiMetadataType;", jAiMetadataTypeEnumValue);
+ boxingMethodArgument[0].z = (jboolean) *static_cast<bool*>(cData);
+ getMetadataDataSuccess = callStaticObject(env, "java/lang/Boolean", "valueOf", "(Z)Ljava/lang/Boolean;", boxingMethodArgument, jMetadataData);
+ break;
+ }
+ case AI_INT32: {
+ getMetadataTypeSuccess = getStaticField(env, "jassimp/AiMetadataEntry$AiMetadataType", "AI_INT32", "Ljassimp/AiMetadataEntry$AiMetadataType;", jAiMetadataTypeEnumValue);
+ boxingMethodArgument[0].i = (jint) *static_cast<int32_t*>(cData);
+ getMetadataDataSuccess = callStaticObject(env, "java/lang/Integer", "valueOf", "(I)Ljava/lang/Integer;", boxingMethodArgument, jMetadataData);
+ break;
+ }
+ case AI_UINT64: {
+ getMetadataTypeSuccess = getStaticField(env, "jassimp/AiMetadataEntry$AiMetadataType", "AI_UINT64", "Ljassimp/AiMetadataEntry$AiMetadataType;", jAiMetadataTypeEnumValue);
+ boxingMethodArgument[0].j = (jlong) *static_cast<uint64_t*>(cData);
+ getMetadataDataSuccess = callStaticObject(env, "java/lang/Long", "valueOf", "(J)Ljava/lang/Long;", boxingMethodArgument, jMetadataData);
+ break;
+ }
+ case AI_FLOAT: {
+ getMetadataTypeSuccess = getStaticField(env, "jassimp/AiMetadataEntry$AiMetadataType", "AI_FLOAT", "Ljassimp/AiMetadataEntry$AiMetadataType;", jAiMetadataTypeEnumValue);
+ boxingMethodArgument[0].f = (jfloat) *static_cast<float*>(cData);
+ getMetadataDataSuccess = callStaticObject(env, "java/lang/Float", "valueOf", "(F)Ljava/lang/Float;", boxingMethodArgument, jMetadataData);
+ break;
+ }
+ case AI_DOUBLE: {
+ getMetadataTypeSuccess = getStaticField(env, "jassimp/AiMetadataEntry$AiMetadataType", "AI_DOUBLE", "Ljassimp/AiMetadataEntry$AiMetadataType;", jAiMetadataTypeEnumValue);
+ boxingMethodArgument[0].d = (jdouble) *static_cast<double*>(cData);
+ getMetadataDataSuccess = callStaticObject(env, "java/lang/Double", "valueOf", "(D)Ljava/lang/Double;", boxingMethodArgument, jMetadataData);
+ break;
+ }
+ case AI_AISTRING: {
+ getMetadataTypeSuccess = getStaticField(env, "jassimp/AiMetadataEntry$AiMetadataType", "AI_AISTRING", "Ljassimp/AiMetadataEntry$AiMetadataType;", jAiMetadataTypeEnumValue);
+ jMetadataData = env->NewStringUTF(static_cast<aiString*>(cData)->C_Str());
+ getMetadataDataSuccess = (jMetadataData != NULL);
+ break;
+ }
+ case AI_AIVECTOR3D: {
+ getMetadataTypeSuccess = getStaticField(env, "jassimp/AiMetadataEntry$AiMetadataType", "AI_AIVECTOR3D",
+ "Ljassimp/AiMetadataEntry$AiMetadataType;",
+ jAiMetadataTypeEnumValue);
+ jvalue wrapVec3Args[3];
+ aiVector3D *vector3D = static_cast<aiVector3D *>(cData);
+ wrapVec3Args[0].f = vector3D->x;
+ wrapVec3Args[1].f = vector3D->y;
+ wrapVec3Args[2].f = vector3D->z;
+ getMetadataDataSuccess = callStaticObject(env, "jassimp/Jassimp", "wrapVec3", "(FFF)Ljava/lang/Object;",
+ wrapVec3Args, jMetadataData);
+ break;
+ }
+ default: {
+ getMetadataTypeSuccess = false;
+ getMetadataDataSuccess = false;
+ break;
+ }
+ }
+
+ exceptionThrown = env->ExceptionCheck();
+
+ if(!getMetadataTypeSuccess || !getMetadataDataSuccess) {
+ if(exceptionThrown)
+ {
+ env->ExceptionDescribe();
+ }
+
+ return false;
+ }
+
+ if(!setObjectField(env, jAiMetadataEntry, "mType", "Ljassimp/AiMetadataEntry$AiMetadataType;", jAiMetadataTypeEnumValue)) {
+ exceptionThrown = env->ExceptionCheck();
+
+ if(exceptionThrown)
+ {
+ env->ExceptionDescribe();
+ }
+
+ return false;
+ }
+
+ if(!setObjectField(env, jAiMetadataEntry, "mData", "Ljava/lang/Object;", jMetadataData)) {
+ exceptionThrown = env->ExceptionCheck();
+
+ if(exceptionThrown)
+ {
+ env->ExceptionDescribe();
+ }
+
+ return false;
+ }
+
+ jobject jNodeMetadata = NULL;
+ SmartLocalRef refMetadata(env, jNodeMetadata);
+
+ if(!getField(env, jNode, "m_metaData", "Ljava/util/Map;", jNodeMetadata)) {
+ exceptionThrown = env->ExceptionCheck();
+
+ if(exceptionThrown)
+ {
+ env->ExceptionDescribe();
+ }
+
+ return false;
+ }
+
+ jclass hashMapClass = env->FindClass("java/util/HashMap");
+ jmethodID jHashMapPutMethod = env->GetMethodID(hashMapClass, "put", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;");
+
+ jstring jKey = env->NewStringUTF(metaDataKey.C_Str());
+ SmartLocalRef keyRef(env, jKey);
+
+ // Only check exception instead of result here because maps will return
+ // null on success if they did not overwrite an existing mapping for the given key.
+ env->CallObjectMethod(jNodeMetadata, jHashMapPutMethod, jKey, jAiMetadataEntry);
+
+ exceptionThrown = env->ExceptionCheck();
+
+ if(exceptionThrown) {
+ env->ExceptionDescribe();
+ return false;
+ }
+
+ }
+
+ return true;
+}
+
+static bool loadSceneNode(JNIEnv *env, const aiNode *cNode, jobject parent, jobject* loadedNode = NULL)
{
lprintf(" converting node %s ...\n", cNode->mName.C_Str());
@@ -788,7 +1175,7 @@ static bool loadSceneNode(JNIEnv *env, const aiNode *cNode, jobject parent, jobj
wrapMatParams[0].l = jMatrixArr;
jobject jMatrix;
SmartLocalRef refMatrix(env, jMatrix);
-
+
if (!callStaticObject(env, "jassimp/Jassimp", "wrapMatrix", "([F)Ljava/lang/Object;", wrapMatParams, jMatrix))
{
return false;
@@ -837,12 +1224,19 @@ static bool loadSceneNode(JNIEnv *env, const aiNode *cNode, jobject parent, jobj
}
}
- if (NULL != loadedNode)
- {
- *loadedNode = jNode;
- } else {
- env->DeleteLocalRef(jNode);
- }
+ if (NULL != loadedNode)
+ {
+ if(cNode->mMetaData) {
+ if(!loadMetadata(env, cNode, jNode))
+ {
+ return false;
+ }
+ }
+
+ *loadedNode = jNode;
+ } else {
+ env->DeleteLocalRef(jNode);
+ }
return true;
}
@@ -1474,7 +1868,7 @@ JNIEXPORT jint JNICALL Java_jassimp_Jassimp_getlongsize
JNIEXPORT jstring JNICALL Java_jassimp_Jassimp_getErrorString
(JNIEnv *env, jclass jClazz)
{
- const char *err = aiGetErrorString();
+ const char *err = gLastErrorString.c_str();
if (NULL == err)
{
@@ -1486,18 +1880,26 @@ JNIEXPORT jstring JNICALL Java_jassimp_Jassimp_getErrorString
JNIEXPORT jobject JNICALL Java_jassimp_Jassimp_aiImportFile
- (JNIEnv *env, jclass jClazz, jstring jFilename, jlong postProcess)
+ (JNIEnv *env, jclass jClazz, jstring jFilename, jlong postProcess, jobject ioSystem)
{
jobject jScene = NULL;
/* convert params */
const char* cFilename = env->GetStringUTFChars(jFilename, NULL);
+
+ Assimp::Importer imp;
-
+
+ if(ioSystem != NULL)
+ {
+ imp.SetIOHandler(new JavaIOSystem(env, ioSystem));
+ lprintf("Created aiFileIO\n");
+ }
+
lprintf("opening file: %s\n", cFilename);
/* do import */
- const aiScene *cScene = aiImportFile(cFilename, (unsigned int) postProcess);
+ const aiScene *cScene = imp.ReadFile(cFilename, (unsigned int) postProcess);
if (!cScene)
{
@@ -1549,22 +1951,16 @@ error:
if (NULL == exception)
{
- /* thats really a problem because we cannot throw in this case */
+ /* that's really a problem because we cannot throw in this case */
env->FatalError("could not throw java.io.IOException");
}
-
- env->ThrowNew(exception, aiGetErrorString());
+ gLastErrorString = imp.GetErrorString();
+ env->ThrowNew(exception, gLastErrorString.c_str());
lprintf("problem detected\n");
}
end:
- /*
- * NOTE: this releases all memory used in the native domain.
- * Ensure all data has been passed to java before!
- */
- aiReleaseImport(cScene);
-
/* free params */
env->ReleaseStringUTFChars(jFilename, cFilename);
diff --git a/port/jassimp/jassimp-native/src/jassimp.h b/port/jassimp/jassimp-native/src/jassimp.h
index 188a4e904..7d4b66e29 100644
--- a/port/jassimp/jassimp-native/src/jassimp.h
+++ b/port/jassimp/jassimp-native/src/jassimp.h
@@ -1,5 +1,6 @@
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
+#include <stdlib.h>
/* Header for class jassimp_Jassimp */
#ifndef _Included_jassimp_Jassimp
@@ -38,7 +39,7 @@ JNIEXPORT jstring JNICALL Java_jassimp_Jassimp_getErrorString
* Signature: (Ljava/lang/String;J)Ljassimp/AiScene;
*/
JNIEXPORT jobject JNICALL Java_jassimp_Jassimp_aiImportFile
- (JNIEnv *, jclass, jstring, jlong);
+ (JNIEnv *, jclass, jstring, jlong, jobject);
#ifdef __cplusplus
}
diff --git a/port/jassimp/jassimp/src/jassimp/AiAnimation.java b/port/jassimp/jassimp/src/jassimp/AiAnimation.java
index fca3bc53d..777d2a9fe 100644
--- a/port/jassimp/jassimp/src/jassimp/AiAnimation.java
+++ b/port/jassimp/jassimp/src/jassimp/AiAnimation.java
@@ -55,6 +55,26 @@ import java.util.List;
*/
public final class AiAnimation {
/**
+ * Name.
+ */
+ private final String m_name;
+
+ /**
+ * Duration.
+ */
+ private final double m_duration;
+
+ /**
+ * Ticks per second.
+ */
+ private final double m_ticksPerSecond;
+
+ /**
+ * Bone animation channels.
+ */
+ private final List<AiNodeAnim> m_nodeAnims = new ArrayList<AiNodeAnim>();
+
+ /**
* Constructor.
*
* @param name name
@@ -151,29 +171,5 @@ public final class AiAnimation {
*/
public List<AiMeshAnim> getMeshChannels() {
throw new UnsupportedOperationException("not implemented yet");
- }
-
-
- /**
- * Name.
- */
- private final String m_name;
-
-
- /**
- * Duration.
- */
- private final double m_duration;
-
-
- /**
- * Ticks per second.
- */
- private final double m_ticksPerSecond;
-
-
- /**
- * Bone animation channels.
- */
- private final List<AiNodeAnim> m_nodeAnims = new ArrayList<AiNodeAnim>();
+ }
} \ No newline at end of file
diff --git a/port/jassimp/jassimp/src/jassimp/AiBone.java b/port/jassimp/jassimp/src/jassimp/AiBone.java
index 87c4b8199..1e6d49beb 100644
--- a/port/jassimp/jassimp/src/jassimp/AiBone.java
+++ b/port/jassimp/jassimp/src/jassimp/AiBone.java
@@ -56,6 +56,24 @@ import java.util.List;
*/
public final class AiBone {
/**
+ * Name of the bone.
+ */
+ private String m_name;
+
+
+ /**
+ * Bone weights.
+ */
+ private final List<AiBoneWeight> m_boneWeights =
+ new ArrayList<AiBoneWeight>();
+
+
+ /**
+ * Offset matrix.
+ */
+ private Object m_offsetMatrix;
+
+ /**
* Constructor.
*/
AiBone() {
@@ -114,24 +132,5 @@ public final class AiBone {
AiWrapperProvider<V3, M4, C, N, Q> wrapperProvider) {
return (M4) m_offsetMatrix;
- }
-
-
- /**
- * Name of the bone.
- */
- private String m_name;
-
-
- /**
- * Bone weights.
- */
- private final List<AiBoneWeight> m_boneWeights =
- new ArrayList<AiBoneWeight>();
-
-
- /**
- * Offset matrix.
- */
- private Object m_offsetMatrix;
+ }
}
diff --git a/port/jassimp/jassimp/src/jassimp/AiClassLoaderIOSystem.java b/port/jassimp/jassimp/src/jassimp/AiClassLoaderIOSystem.java
new file mode 100644
index 000000000..95afc2e02
--- /dev/null
+++ b/port/jassimp/jassimp/src/jassimp/AiClassLoaderIOSystem.java
@@ -0,0 +1,153 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library - Java Binding (jassimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2017, assimp 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 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.
+---------------------------------------------------------------------------
+*/
+package jassimp;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+
+/**
+ * IOSystem based on the Java classloader.<p>
+ *
+ * This IOSystem allows loading models directly from the
+ * classpath. No extraction to the file system is
+ * necessary.
+ *
+ * @author Jesper Smith
+ *
+ */
+public class AiClassLoaderIOSystem implements AiIOSystem<AiInputStreamIOStream>
+{
+ private final Class<?> clazz;
+ private final ClassLoader classLoader;
+
+ /**
+ * Construct a new AiClassLoaderIOSystem.<p>
+ *
+ * This constructor uses a ClassLoader to resolve
+ * resources.
+ *
+ * @param classLoader classLoader to resolve resources.
+ */
+ public AiClassLoaderIOSystem(ClassLoader classLoader) {
+ this.clazz = null;
+ this.classLoader = classLoader;
+ }
+
+ /**
+ * Construct a new AiClassLoaderIOSystem.<p>
+ *
+ * This constructor uses a Class to resolve
+ * resources.
+ *
+ * @param class<?> class to resolve resources.
+ */
+ public AiClassLoaderIOSystem(Class<?> clazz) {
+ this.clazz = clazz;
+ this.classLoader = null;
+ }
+
+
+ @Override
+ public AiInputStreamIOStream open(String filename, String ioMode) {
+ try {
+
+ InputStream is;
+
+ if(clazz != null) {
+ is = clazz.getResourceAsStream(filename);
+ }
+ else if (classLoader != null) {
+ is = classLoader.getResourceAsStream(filename);
+ }
+ else {
+ System.err.println("[" + getClass().getSimpleName() +
+ "] No class or classLoader provided to resolve " + filename);
+ return null;
+ }
+
+ if(is != null) {
+ return new AiInputStreamIOStream(is);
+ }
+ else {
+ System.err.println("[" + getClass().getSimpleName() +
+ "] Cannot find " + filename);
+ return null;
+ }
+ }
+ catch (IOException e) {
+ e.printStackTrace();
+ return null;
+ }
+ }
+
+ @Override
+ public void close(AiInputStreamIOStream file) {
+ }
+
+ @Override
+ public boolean exists(String path)
+ {
+ URL url = null;
+ if(clazz != null) {
+ url = clazz.getResource(path);
+ }
+ else if (classLoader != null) {
+ url = classLoader.getResource(path);
+ }
+
+
+ if(url == null)
+ {
+ return false;
+ }
+
+ return true;
+
+ }
+
+ @Override
+ public char getOsSeparator()
+ {
+ return '/';
+ }
+
+}
diff --git a/port/jassimp/jassimp/src/jassimp/AiColor.java b/port/jassimp/jassimp/src/jassimp/AiColor.java
index 25eb251d6..6befeecbd 100644
--- a/port/jassimp/jassimp/src/jassimp/AiColor.java
+++ b/port/jassimp/jassimp/src/jassimp/AiColor.java
@@ -51,6 +51,16 @@ import java.nio.ByteBuffer;
*/
public final class AiColor {
/**
+ * Wrapped buffer.
+ */
+ private final ByteBuffer m_buffer;
+
+ /**
+ * Offset into m_buffer.
+ */
+ private final int m_offset;
+
+ /**
* Constructor.
*
* @param buffer the buffer to wrap
@@ -147,16 +157,4 @@ public final class AiColor {
return "[" + getRed() + ", " + getGreen() + ", " + getBlue() + ", " +
getAlpha() + "]";
}
-
-
- /**
- * Wrapped buffer.
- */
- private final ByteBuffer m_buffer;
-
-
- /**
- * Offset into m_buffer.
- */
- private final int m_offset;
}
diff --git a/port/jassimp/jassimp/src/jassimp/AiIOStream.java b/port/jassimp/jassimp/src/jassimp/AiIOStream.java
new file mode 100644
index 000000000..6625b3740
--- /dev/null
+++ b/port/jassimp/jassimp/src/jassimp/AiIOStream.java
@@ -0,0 +1,80 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library - Java Binding (jassimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2017, assimp 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 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.
+---------------------------------------------------------------------------
+*/
+package jassimp;
+
+import java.nio.ByteBuffer;
+
+
+/**
+ * Interface to allow custom resource loaders for jassimp.<p>
+ *
+ * The design is based on passing the file wholly in memory,
+ * because Java inputstreams do not have to support seek. <p>
+ *
+ * Writing files from Java is unsupported.
+ *
+ *
+ * @author Jesper Smith
+ *
+ */
+public interface AiIOStream
+{
+
+ /**
+ * Read all data into buffer. <p>
+ *
+ * The whole stream should be read into the buffer.
+ * No support is provided for partial reads.
+ *
+ * @param buffer Target buffer for the model data
+ *
+ * @return true if successful, false if an error occurred.
+ */
+ boolean read(ByteBuffer buffer);
+
+ /**
+ * The total size of this stream. <p>
+ *
+ * @return total size of this stream
+ */
+ int getFileSize();
+
+}
diff --git a/port/jassimp/jassimp/src/jassimp/AiIOSystem.java b/port/jassimp/jassimp/src/jassimp/AiIOSystem.java
new file mode 100644
index 000000000..213f95a12
--- /dev/null
+++ b/port/jassimp/jassimp/src/jassimp/AiIOSystem.java
@@ -0,0 +1,79 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library - Java Binding (jassimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2017, assimp 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 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.
+---------------------------------------------------------------------------
+*/
+package jassimp;
+
+public interface AiIOSystem <T extends AiIOStream>
+{
+ /**
+ *
+ * Open a new file with a given path.
+ * When the access to the file is finished, call close() to release all associated resources
+ *
+ * @param path Path to the file
+ * @param ioMode file I/O mode. Required are: "wb", "w", "wt", "rb", "r", "rt".
+ *
+ * @return AiIOStream or null if an error occurred
+ */
+ public T open(String path, String ioMode);
+
+
+ /**
+ * Tests for the existence of a file at the given path.
+ *
+ * @param path path to the file
+ * @return true if there is a file with this path, else false.
+ */
+ public boolean exists(String path);
+
+ /**
+ * Returns the system specific directory separator.<p>
+ *
+ * @return System specific directory separator
+ */
+ public char getOsSeparator();
+
+ /**
+ * Closes the given file and releases all resources associated with it.
+ *
+ * @param file The file instance previously created by Open().
+ */
+ public void close(T file);
+}
diff --git a/port/jassimp/jassimp/src/jassimp/AiInputStreamIOStream.java b/port/jassimp/jassimp/src/jassimp/AiInputStreamIOStream.java
new file mode 100644
index 000000000..0db1ea211
--- /dev/null
+++ b/port/jassimp/jassimp/src/jassimp/AiInputStreamIOStream.java
@@ -0,0 +1,127 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library - Java Binding (jassimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2017, assimp 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 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.
+---------------------------------------------------------------------------
+*/
+package jassimp;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URI;
+import java.net.URL;
+import java.nio.ByteBuffer;
+
+
+/**
+ * Implementation of AiIOStream reading from a InputStream
+ *
+ * @author Jesper Smith
+ *
+ */
+public class AiInputStreamIOStream implements AiIOStream
+{
+ private final ByteArrayOutputStream os = new ByteArrayOutputStream();
+
+
+ public AiInputStreamIOStream(URI uri) throws IOException {
+ this(uri.toURL());
+ }
+
+ public AiInputStreamIOStream(URL url) throws IOException {
+ this(url.openStream());
+ }
+
+ public AiInputStreamIOStream(InputStream is) throws IOException {
+ int read;
+ byte[] data = new byte[1024];
+ while((read = is.read(data, 0, data.length)) != -1) {
+ os.write(data, 0, read);
+ }
+ os.flush();
+
+ is.close();
+ }
+
+ @Override
+ public int getFileSize() {
+ return os.size();
+ }
+
+ @Override
+ public boolean read(ByteBuffer buffer) {
+ ByteBufferOutputStream bos = new ByteBufferOutputStream(buffer);
+ try
+ {
+ os.writeTo(bos);
+ }
+ catch (IOException e)
+ {
+ e.printStackTrace();
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Internal helper class to copy the contents of an OutputStream
+ * into a ByteBuffer. This avoids a copy.
+ *
+ */
+ private static class ByteBufferOutputStream extends OutputStream {
+
+ private final ByteBuffer buffer;
+
+ public ByteBufferOutputStream(ByteBuffer buffer) {
+ this.buffer = buffer;
+ }
+
+ @Override
+ public void write(int b) throws IOException
+ {
+ buffer.put((byte) b);
+ }
+
+ @Override
+ public void write(byte b[], int off, int len) throws IOException {
+ buffer.put(b, off, len);
+ }
+ }
+}
+
diff --git a/port/jassimp/jassimp/src/jassimp/AiMaterial.java b/port/jassimp/jassimp/src/jassimp/AiMaterial.java
index 7a9abc0d3..bf077dff3 100644
--- a/port/jassimp/jassimp/src/jassimp/AiMaterial.java
+++ b/port/jassimp/jassimp/src/jassimp/AiMaterial.java
@@ -71,6 +71,17 @@ import java.util.Set;
*/
public final class AiMaterial {
/**
+ * List of properties.
+ */
+ private final List<Property> m_properties = new ArrayList<Property>();
+
+ /**
+ * Number of textures for each type.
+ */
+ private final Map<AiTextureType, Integer> m_numTextures =
+ new EnumMap<AiTextureType, Integer>(AiTextureType.class);
+
+ /**
* Enumerates all supported material properties.
*/
public static enum PropertyKey {
@@ -317,7 +328,36 @@ public final class AiMaterial {
* properties easily.
*/
public static final class Property {
+ /**
+ * Key.
+ */
+ private final String m_key;
+
+
+ /**
+ * Semantic.
+ */
+ private final int m_semantic;
+
+
/**
+ * Index.
+ */
+ private final int m_index;
+
+
+ /**
+ * Type.
+ */
+ private final PropertyType m_type;
+
+
+ /**
+ * Data.
+ */
+ private final Object m_data;
+
+ /**
* Constructor.
*
* @param key
@@ -417,39 +457,9 @@ public final class AiMaterial {
*
* @return the data
*/
- Object getData() {
+ private Object getData() {
return m_data;
}
-
-
- /**
- * Key.
- */
- private final String m_key;
-
-
- /**
- * Semantic.
- */
- private final int m_semantic;
-
-
- /**
- * Index.
- */
- private final int m_index;
-
-
- /**
- * Type.
- */
- private final PropertyType m_type;
-
-
- /**
- * Data.
- */
- private final Object m_data;
}
@@ -1185,18 +1195,5 @@ public final class AiMaterial {
@SuppressWarnings("unused")
private void setTextureNumber(int type, int number) {
m_numTextures.put(AiTextureType.fromRawValue(type), number);
- }
-
-
- /**
- * List of properties.
- */
- private final List<Property> m_properties = new ArrayList<Property>();
-
-
- /**
- * Number of textures for each type.
- */
- private final Map<AiTextureType, Integer> m_numTextures =
- new EnumMap<AiTextureType, Integer>(AiTextureType.class);
+ }
}
diff --git a/port/jassimp/jassimp/src/jassimp/AiMesh.java b/port/jassimp/jassimp/src/jassimp/AiMesh.java
index c2ebcd307..3f4a29760 100644
--- a/port/jassimp/jassimp/src/jassimp/AiMesh.java
+++ b/port/jassimp/jassimp/src/jassimp/AiMesh.java
@@ -140,19 +140,102 @@ public final class AiMesh {
/**
* Number of bytes per float value.
*/
- private static final int SIZEOF_FLOAT = Jassimp.NATIVE_FLOAT_SIZE;
+ private final int SIZEOF_FLOAT = Jassimp.NATIVE_FLOAT_SIZE;
/**
* Number of bytes per int value.
*/
- private static final int SIZEOF_INT = Jassimp.NATIVE_INT_SIZE;
+ private final int SIZEOF_INT = Jassimp.NATIVE_INT_SIZE;
/**
* Size of an AiVector3D in the native world.
*/
- private static final int SIZEOF_V3D = Jassimp.NATIVE_AIVEKTOR3D_SIZE;
+ private final int SIZEOF_V3D = Jassimp.NATIVE_AIVEKTOR3D_SIZE;
+ /**
+ * The primitive types used by this mesh.
+ */
+ private final Set<AiPrimitiveType> m_primitiveTypes =
+ EnumSet.noneOf(AiPrimitiveType.class);
+
+
+ /**
+ * Number of vertices in this mesh.
+ */
+ private int m_numVertices = 0;
+
+
+ /**
+ * Number of faces in this mesh.
+ */
+ private int m_numFaces = 0;
+
+ /**
+ * Material used by this mesh.
+ */
+ private int m_materialIndex = -1;
+
+ /**
+ * The name of the mesh.
+ */
+ private String m_name = "";
+
+ /**
+ * Buffer for vertex position data.
+ */
+ private ByteBuffer m_vertices = null;
+
+ /**
+ * Buffer for faces/ indices.
+ */
+ private ByteBuffer m_faces = null;
+
+
+ /**
+ * Index structure for m_faces.<p>
+ *
+ * Only used by meshes that are not pure triangular
+ */
+ private ByteBuffer m_faceOffsets = null;
+
+ /**
+ * Buffer for normals.
+ */
+ private ByteBuffer m_normals = null;
+
+ /**
+ * Buffer for tangents.
+ */
+ private ByteBuffer m_tangents = null;
+
+ /**
+ * Buffer for bitangents.
+ */
+ private ByteBuffer m_bitangents = null;
+
+ /**
+ * Vertex colors.
+ */
+ private ByteBuffer[] m_colorsets =
+ new ByteBuffer[JassimpConfig.MAX_NUMBER_COLORSETS];
+
+ /**
+ * Number of UV components for each texture coordinate set.
+ */
+ private int[] m_numUVComponents = new int[JassimpConfig.MAX_NUMBER_TEXCOORDS];
+
+ /**
+ * Texture coordinates.
+ */
+ private ByteBuffer[] m_texcoords =
+ new ByteBuffer[JassimpConfig.MAX_NUMBER_TEXCOORDS];
+
+ /**
+ * Bones.
+ */
+ private final List<AiBone> m_bones = new ArrayList<AiBone>();
+
/**
* This class is instantiated via JNI, no accessible constructor.
*/
@@ -1335,99 +1418,4 @@ public final class AiMesh {
}
}
// }}
-
-
- /**
- * The primitive types used by this mesh.
- */
- private final Set<AiPrimitiveType> m_primitiveTypes =
- EnumSet.noneOf(AiPrimitiveType.class);
-
-
- /**
- * Number of vertices in this mesh.
- */
- private int m_numVertices = 0;
-
-
- /**
- * Number of faces in this mesh.
- */
- private int m_numFaces = 0;
-
-
- /**
- * Material used by this mesh.
- */
- private int m_materialIndex = -1;
-
-
- /**
- * The name of the mesh.
- */
- private String m_name = "";
-
-
- /**
- * Buffer for vertex position data.
- */
- private ByteBuffer m_vertices = null;
-
-
- /**
- * Buffer for faces/ indices.
- */
- private ByteBuffer m_faces = null;
-
-
- /**
- * Index structure for m_faces.<p>
- *
- * Only used by meshes that are not pure triangular
- */
- private ByteBuffer m_faceOffsets = null;
-
-
- /**
- * Buffer for normals.
- */
- private ByteBuffer m_normals = null;
-
-
- /**
- * Buffer for tangents.
- */
- private ByteBuffer m_tangents = null;
-
-
- /**
- * Buffer for bitangents.
- */
- private ByteBuffer m_bitangents = null;
-
-
- /**
- * Vertex colors.
- */
- private ByteBuffer[] m_colorsets =
- new ByteBuffer[JassimpConfig.MAX_NUMBER_COLORSETS];
-
-
- /**
- * Number of UV components for each texture coordinate set.
- */
- private int[] m_numUVComponents = new int[JassimpConfig.MAX_NUMBER_TEXCOORDS];
-
-
- /**
- * Texture coordinates.
- */
- private ByteBuffer[] m_texcoords =
- new ByteBuffer[JassimpConfig.MAX_NUMBER_TEXCOORDS];
-
-
- /**
- * Bones.
- */
- private final List<AiBone> m_bones = new ArrayList<AiBone>();
}
diff --git a/port/jassimp/jassimp/src/jassimp/AiMetadataEntry.java b/port/jassimp/jassimp/src/jassimp/AiMetadataEntry.java
new file mode 100644
index 000000000..dbdf1aae8
--- /dev/null
+++ b/port/jassimp/jassimp/src/jassimp/AiMetadataEntry.java
@@ -0,0 +1,118 @@
+package jassimp;
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library - Java Binding (jassimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp 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 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.
+---------------------------------------------------------------------------
+*/
+public class AiMetadataEntry
+{
+ public enum AiMetadataType
+ {
+ AI_BOOL, AI_INT32, AI_UINT64, AI_FLOAT, AI_DOUBLE, AI_AISTRING, AI_AIVECTOR3D
+ }
+
+ private AiMetadataType mType;
+ private Object mData;
+
+ public AiMetadataType getMetaDataType()
+ {
+ return mType;
+ }
+
+ public Object getData()
+ {
+ return mData;
+ }
+
+ public static boolean getAiBoolAsBoolean(AiMetadataEntry metadataEntry)
+ {
+ checkTypeBeforeCasting(metadataEntry, AiMetadataType.AI_BOOL);
+
+ return (boolean) metadataEntry.mData;
+ }
+
+ public static int getAiInt32AsInteger(AiMetadataEntry metadataEntry)
+ {
+ checkTypeBeforeCasting(metadataEntry, AiMetadataType.AI_INT32);
+
+ return (int) metadataEntry.mData;
+ }
+
+ public static long getAiUint64AsLong(AiMetadataEntry metadataEntry)
+ {
+ checkTypeBeforeCasting(metadataEntry, AiMetadataType.AI_UINT64);
+
+ return (long) metadataEntry.mData;
+ }
+
+ public static float getAiFloatAsFloat(AiMetadataEntry metadataEntry)
+ {
+ checkTypeBeforeCasting(metadataEntry, AiMetadataType.AI_FLOAT);
+
+ return (float) metadataEntry.mData;
+ }
+
+ public static double getAiDoubleAsDouble(AiMetadataEntry metadataEntry)
+ {
+ checkTypeBeforeCasting(metadataEntry, AiMetadataType.AI_DOUBLE);
+
+ return (double) metadataEntry.mData;
+ }
+
+ public static String getAiStringAsString(AiMetadataEntry metadataEntry)
+ {
+ checkTypeBeforeCasting(metadataEntry, AiMetadataType.AI_AISTRING);
+
+ return (String) metadataEntry.mData;
+ }
+
+ public static AiVector getAiAiVector3DAsAiVector(AiMetadataEntry metadataEntry)
+ {
+ checkTypeBeforeCasting(metadataEntry, AiMetadataType.AI_AIVECTOR3D);
+
+ return (AiVector) metadataEntry.mData;
+ }
+
+ private static void checkTypeBeforeCasting(AiMetadataEntry entry, AiMetadataType expectedType)
+ {
+ if(entry.mType != expectedType)
+ {
+ throw new RuntimeException("Cannot cast entry of type " + entry.mType.name() + " to " + expectedType.name());
+ }
+ }
+}
diff --git a/port/jassimp/jassimp/src/jassimp/AiNode.java b/port/jassimp/jassimp/src/jassimp/AiNode.java
index 5cd26b668..e585e0449 100644
--- a/port/jassimp/jassimp/src/jassimp/AiNode.java
+++ b/port/jassimp/jassimp/src/jassimp/AiNode.java
@@ -41,7 +41,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package jassimp;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
@@ -54,6 +56,34 @@ import java.util.List;
*/
public final class AiNode {
/**
+ * Parent node.
+ */
+ private final AiNode m_parent;
+
+
+ /**
+ * Mesh references.
+ */
+ private final int[] m_meshReferences;
+
+
+ /**
+ * List of children.
+ */
+ private final List<AiNode> m_children = new ArrayList<AiNode>();
+
+ /**
+ * List of metadata entries.
+ */
+ private final Map<String, AiMetadataEntry> m_metaData = new HashMap<String, AiMetadataEntry>();
+
+
+ /**
+ * Buffer for transformation matrix.
+ */
+ private final Object m_transformationMatrix;
+
+ /**
* Constructor.
*
* @param parent the parent node, may be null
@@ -185,6 +215,18 @@ public final class AiNode {
public int[] getMeshes() {
return m_meshReferences;
}
+
+ /**
+ * Returns the metadata entries for this node.<p>
+ *
+ * Consult the original Doxygen for importer_notes to
+ * see which formats have metadata and what to expect.
+ *
+ * @return A map of metadata names to entries.
+ */
+ public Map<String, AiMetadataEntry> getMetadata() {
+ return m_metaData;
+ }
/**
@@ -200,29 +242,5 @@ public final class AiNode {
/**
* Name.
*/
- private final String m_name;
-
-
- /**
- * Parent node.
- */
- private final AiNode m_parent;
-
-
- /**
- * Mesh references.
- */
- private final int[] m_meshReferences;
-
-
- /**
- * List of children.
- */
- private final List<AiNode> m_children = new ArrayList<AiNode>();
-
-
- /**
- * Buffer for transformation matrix.
- */
- private final Object m_transformationMatrix;
+ private final String m_name;
}
diff --git a/port/jassimp/jassimp/src/jassimp/AiNodeAnim.java b/port/jassimp/jassimp/src/jassimp/AiNodeAnim.java
index cb1c6987c..fb317a5b1 100644
--- a/port/jassimp/jassimp/src/jassimp/AiNodeAnim.java
+++ b/port/jassimp/jassimp/src/jassimp/AiNodeAnim.java
@@ -70,17 +70,17 @@ public final class AiNodeAnim {
/**
* Size of one position key entry.
*/
- private static final int POS_KEY_SIZE = Jassimp.NATIVE_AIVEKTORKEY_SIZE;
+ private final int POS_KEY_SIZE = Jassimp.NATIVE_AIVEKTORKEY_SIZE;
/**
* Size of one rotation key entry.
*/
- private static final int ROT_KEY_SIZE = Jassimp.NATIVE_AIQUATKEY_SIZE;
+ private final int ROT_KEY_SIZE = Jassimp.NATIVE_AIQUATKEY_SIZE;
/**
* Size of one scaling key entry.
*/
- private static final int SCALE_KEY_SIZE = Jassimp.NATIVE_AIVEKTORKEY_SIZE;
+ private final int SCALE_KEY_SIZE = Jassimp.NATIVE_AIVEKTORKEY_SIZE;
/**
diff --git a/port/jassimp/jassimp/src/jassimp/AiQuaternion.java b/port/jassimp/jassimp/src/jassimp/AiQuaternion.java
index de162631b..00630e644 100644
--- a/port/jassimp/jassimp/src/jassimp/AiQuaternion.java
+++ b/port/jassimp/jassimp/src/jassimp/AiQuaternion.java
@@ -51,6 +51,17 @@ import java.nio.ByteBuffer;
*/
public final class AiQuaternion {
/**
+ * Wrapped buffer.
+ */
+ private final ByteBuffer m_buffer;
+
+
+ /**
+ * Offset into m_buffer.
+ */
+ private final int m_offset;
+
+ /**
* Constructor.
*
* @param buffer the buffer to wrap
@@ -150,17 +161,5 @@ public final class AiQuaternion {
public String toString() {
return "[" + getX() + ", " + getY() + ", " + getZ() + ", " +
getW() + "]";
- }
-
-
- /**
- * Wrapped buffer.
- */
- private final ByteBuffer m_buffer;
-
-
- /**
- * Offset into m_buffer.
- */
- private final int m_offset;
+ }
} \ No newline at end of file
diff --git a/port/jassimp/jassimp/src/jassimp/AiSceneFlag.java b/port/jassimp/jassimp/src/jassimp/AiSceneFlag.java
index 7f7e01ea9..4c7dd6072 100644
--- a/port/jassimp/jassimp/src/jassimp/AiSceneFlag.java
+++ b/port/jassimp/jassimp/src/jassimp/AiSceneFlag.java
@@ -48,6 +48,11 @@ import java.util.Set;
*/
public enum AiSceneFlag {
/**
+ * The mapped c/c++ integer enum value.
+ */
+ private final int m_rawValue;
+
+ /**
* Specifies that the scene data structure that was imported is not
* complete.<p>
*
@@ -143,11 +148,5 @@ public enum AiSceneFlag {
*/
private AiSceneFlag(int rawValue) {
m_rawValue = rawValue;
- }
-
-
- /**
- * The mapped c/c++ integer enum value.
- */
- private final int m_rawValue;
+ }
}
diff --git a/port/jassimp/jassimp/src/jassimp/Jassimp.java b/port/jassimp/jassimp/src/jassimp/Jassimp.java
index eb4665f17..727570a5b 100644
--- a/port/jassimp/jassimp/src/jassimp/Jassimp.java
+++ b/port/jassimp/jassimp/src/jassimp/Jassimp.java
@@ -59,8 +59,46 @@ import java.util.Set;
* Pointer comparison will fail.
*/
public final class Jassimp {
+
+ /**
+ * The native interface.
+ *
+ * @param filename the file to load
+ * @param postProcessing post processing flags
+ * @return the loaded scene, or null if an error occurred
+ * @throws IOException if an error occurs
+ */
+ private static native AiScene aiImportFile(String filename,
+ long postProcessing, AiIOSystem<?> ioSystem) throws IOException;
+
+
+ /**
+ * The active wrapper provider.
+ */
+ private static AiWrapperProvider<?, ?, ?, ?, ?> s_wrapperProvider =
+ new AiBuiltInWrapperProvider();
+
/**
+ * The library loader to load the native library.
+ */
+ private static JassimpLibraryLoader s_libraryLoader =
+ new JassimpLibraryLoader();
+
+ /**
+ * Status flag if the library is loaded.
+ *
+ * Volatile to avoid problems with double checked locking.
+ *
+ */
+ private static volatile boolean s_libraryLoaded = false;
+
+ /**
+ * Lock for library loading.
+ */
+ private static final Object s_libraryLoadingLock = new Object();
+
+ /**
* The default wrapper provider using built in types.
*/
public static final AiWrapperProvider<?, ?, ?, ?, ?> BUILTIN =
@@ -79,20 +117,52 @@ public final class Jassimp {
return importFile(filename, EnumSet.noneOf(AiPostProcessSteps.class));
}
+ /**
+ * Imports a file via assimp without post processing.
+ *
+ * @param filename the file to import
+ * @param ioSystem ioSystem to load files, or null for default
+ * @return the loaded scene
+ * @throws IOException if an error occurs
+ */
+ public static AiScene importFile(String filename, AiIOSystem<?> ioSystem)
+ throws IOException {
+
+ return importFile(filename, EnumSet.noneOf(AiPostProcessSteps.class), ioSystem);
+ }
+
+
+ /**
+ * Imports a file via assimp.
+ *
+ * @param filename the file to import
+ * @param postProcessing post processing flags
+ * @return the loaded scene, or null if an error occurred
+ * @throws IOException if an error occurs
+ */
+ public static AiScene importFile(String filename,
+ Set<AiPostProcessSteps> postProcessing)
+ throws IOException {
+ return importFile(filename, postProcessing, null);
+ }
/**
* Imports a file via assimp.
*
* @param filename the file to import
* @param postProcessing post processing flags
+ * @param ioSystem ioSystem to load files, or null for default
* @return the loaded scene, or null if an error occurred
* @throws IOException if an error occurs
*/
public static AiScene importFile(String filename,
- Set<AiPostProcessSteps> postProcessing) throws IOException {
+ Set<AiPostProcessSteps> postProcessing, AiIOSystem<?> ioSystem)
+ throws IOException {
+ loadLibrary();
+
return aiImportFile(filename, AiPostProcessSteps.toRawValue(
- postProcessing));
+ postProcessing), ioSystem);
}
@@ -177,6 +247,11 @@ public final class Jassimp {
}
+ public static void setLibraryLoader(JassimpLibraryLoader libraryLoader) {
+ s_libraryLoader = libraryLoader;
+ }
+
+
/**
* Helper method for wrapping a matrix.<p>
*
@@ -264,26 +339,35 @@ public final class Jassimp {
return s_wrapperProvider.wrapSceneNode(parent, matrix, meshRefs, name);
}
-
/**
- * The native interface.
+ * Helper method to load the library using the provided JassimpLibraryLoader.<p>
*
- * @param filename the file to load
- * @param postProcessing post processing flags
- * @return the loaded scene, or null if an error occurred
- * @throws IOException if an error occurs
- */
- private static native AiScene aiImportFile(String filename,
- long postProcessing) throws IOException;
-
-
- /**
- * The active wrapper provider.
+ * Synchronized to avoid race conditions.
*/
- private static AiWrapperProvider<?, ?, ?, ?, ?> s_wrapperProvider =
- new AiBuiltInWrapperProvider();
-
-
+ private static void loadLibrary()
+ {
+ if(!s_libraryLoaded)
+ {
+ synchronized(s_libraryLoadingLock)
+ {
+ if(!s_libraryLoaded)
+ {
+ s_libraryLoader.loadLibrary();
+ NATIVE_AIVEKTORKEY_SIZE = getVKeysize();
+ NATIVE_AIQUATKEY_SIZE = getQKeysize();
+ NATIVE_AIVEKTOR3D_SIZE = getV3Dsize();
+ NATIVE_FLOAT_SIZE = getfloatsize();
+ NATIVE_INT_SIZE = getintsize();
+ NATIVE_UINT_SIZE = getuintsize();
+ NATIVE_DOUBLE_SIZE = getdoublesize();
+ NATIVE_LONG_SIZE = getlongsize();
+
+ s_libraryLoaded = true;
+ }
+ }
+ }
+ }
+
/**
* Pure static class, no accessible constructor.
*/
@@ -291,24 +375,12 @@ public final class Jassimp {
/* nothing to do */
}
- public static final int NATIVE_AIVEKTORKEY_SIZE;
- public static final int NATIVE_AIQUATKEY_SIZE;
- public static final int NATIVE_AIVEKTOR3D_SIZE;
- public static final int NATIVE_FLOAT_SIZE;
- public static final int NATIVE_INT_SIZE;
- public static final int NATIVE_UINT_SIZE;
- public static final int NATIVE_DOUBLE_SIZE;
- public static final int NATIVE_LONG_SIZE;
-
- static {
- System.loadLibrary("jassimp");
- NATIVE_AIVEKTORKEY_SIZE = getVKeysize();
- NATIVE_AIQUATKEY_SIZE = getQKeysize();
- NATIVE_AIVEKTOR3D_SIZE = getV3Dsize();
- NATIVE_FLOAT_SIZE = getfloatsize();
- NATIVE_INT_SIZE = getintsize();
- NATIVE_UINT_SIZE = getuintsize();
- NATIVE_DOUBLE_SIZE = getdoublesize();
- NATIVE_LONG_SIZE = getlongsize();
- }
+ public static int NATIVE_AIVEKTORKEY_SIZE;
+ public static int NATIVE_AIQUATKEY_SIZE;
+ public static int NATIVE_AIVEKTOR3D_SIZE;
+ public static int NATIVE_FLOAT_SIZE;
+ public static int NATIVE_INT_SIZE;
+ public static int NATIVE_UINT_SIZE;
+ public static int NATIVE_DOUBLE_SIZE;
+ public static int NATIVE_LONG_SIZE;
}
diff --git a/port/jassimp/jassimp/src/jassimp/JassimpLibraryLoader.java b/port/jassimp/jassimp/src/jassimp/JassimpLibraryLoader.java
new file mode 100644
index 000000000..c299706b7
--- /dev/null
+++ b/port/jassimp/jassimp/src/jassimp/JassimpLibraryLoader.java
@@ -0,0 +1,65 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library - Java Binding (jassimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp 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 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.
+---------------------------------------------------------------------------
+*/
+package jassimp;
+
+/**
+ * Library loader for the jassimp library.<p>
+ *
+ * The default implementation uses "System.loadLibrary" to
+ * load the jassimp native library. <p>
+ *
+ * Custom implementations should override the loadLibrary()
+ * function.
+ *
+ */
+public class JassimpLibraryLoader
+{
+ /**
+ * Function to load the native jassimp library.
+ *
+ * Called the first time Jassimp.importFile() is
+ * called.
+ */
+ public void loadLibrary()
+ {
+ System.loadLibrary("jassimp");
+ }
+}
diff --git a/port/swig/assimp.i b/port/swig/assimp.i
index d1a078d49..58e1546e7 100644
--- a/port/swig/assimp.i
+++ b/port/swig/assimp.i
@@ -114,7 +114,7 @@
%include "interface/IOSystem.i"
-// We have to "instanciate" the templates used by the ASSSIMP_*_ARRAY macros
+// We have to "instantiate" the templates used by the ASSSIMP_*_ARRAY macros
// here at the end to avoid running into forward reference issues (SWIG would
// spit out the helper functions before the header includes for the element
// types otherwise).
diff --git a/samples/README b/samples/README
index d86138c1d..995a84f0c 100644
--- a/samples/README
+++ b/samples/README
@@ -1,59 +1,59 @@
-
-
-ASSIMP SAMPLES README
-=====================
-
-
-1. General
-----------
-
-This directory contains various samples to illustrate Assimp's
-use in various real-world environments. Workspaces to build the
-samples can be found in the respective directories. The VC workspaces
-copy the created executables to the ./bin directory.
-
-All GL-based samples depend on GLUT, some on DevIL. For convenience,
-these libraries are included in the repository in their respective
- Windows/x86 prebuilt versions. To build on linux, install the
- required packages using the package manager of your choice.
-
-Also note that the VS workspaces link against the DLL version of the
-Assimp library, thus you need to build it in the first place (
-assimp-release-dll build configuration). The Assimp DLL needs to be
-copied to ./bin as well (the VS workspaces will try to do this
-automatically).
-
-
-2. List of samples
-------------------
-
-
-SimpleOpenGL
-
- A very simple and straightforward OpenGL sample. It loads a
- model (gets the path to it on the command line, default is dwarf.x)
- and displays the model as wireframe. Animations and materials are
- not evaluated at all. This samples uses the C interface to Assimp.
- Basic materials are displayed, but no textures.
-
- This sample should work virtually everywhere, provided glut
- is available.
-
-
-SimpleTexturedOpenGL
-
- An extended OpenGL sample, featuring texturing using the DevIL
- library. Based on SimpleOpenGL and the NeHe GL tutorial style.
-
- This is a Windows-only sample.
-
- This sample was kindly provided by SamHayne (http://sf.net/users/samhayne/)
- See http://sourceforge.net/projects/assimp/forums/forum/817654/topic/3736373
-
-
-SimpleAssimpViewX
-
- A Mac OSX-based viewer app. This sample was kindly provided by drparallax.
- See http://sourceforge.net/projects/assimp/forums/forum/817654/topic/3917829
-
-
+
+
+ASSIMP SAMPLES README
+=====================
+
+
+1. General
+----------
+
+This directory contains various samples to illustrate Assimp's
+use in various real-world environments. Workspaces to build the
+samples can be found in the respective directories. The VC workspaces
+copy the created executables to the ./bin directory.
+
+All GL-based samples depend on GLUT, some on DevIL. For convenience,
+these libraries are included in the repository in their respective
+ Windows/x86 prebuilt versions. To build on linux, install the
+ required packages using the package manager of your choice.
+
+Also note that the VS workspaces link against the DLL version of the
+Assimp library, thus you need to build it in the first place (
+assimp-release-dll build configuration). The Assimp DLL needs to be
+copied to ./bin as well (the VS workspaces will try to do this
+automatically).
+
+
+2. List of samples
+------------------
+
+
+SimpleOpenGL
+
+ A very simple and straightforward OpenGL sample. It loads a
+ model (gets the path to it on the command line, default is dwarf.x)
+ and displays the model as wireframe. Animations and materials are
+ not evaluated at all. This samples uses the C interface to Assimp.
+ Basic materials are displayed, but no textures.
+
+ This sample should work virtually everywhere, provided glut
+ is available.
+
+
+SimpleTexturedOpenGL
+
+ An extended OpenGL sample, featuring texturing using the DevIL
+ library. Based on SimpleOpenGL and the NeHe GL tutorial style.
+
+ This is a Windows-only sample.
+
+ This sample was kindly provided by SamHayne (http://sf.net/users/samhayne/)
+ See http://sourceforge.net/projects/assimp/forums/forum/817654/topic/3736373
+
+
+SimpleAssimpViewX
+
+ A Mac OSX-based viewer app. This sample was kindly provided by drparallax.
+ See http://sourceforge.net/projects/assimp/forums/forum/817654/topic/3917829
+
+
diff --git a/samples/SimpleAssimpViewX/MyDocument.mm b/samples/SimpleAssimpViewX/MyDocument.mm
index be688a6be..cbe034842 100644
--- a/samples/SimpleAssimpViewX/MyDocument.mm
+++ b/samples/SimpleAssimpViewX/MyDocument.mm
@@ -641,7 +641,7 @@ static CVReturn MyDisplayLinkCallback(CVDisplayLinkRef displayLink,const CVTimeS
{
for(MeshHelper* helper in modelMeshes)
{
- // Set up meterial state.
+ // Set up material state.
glCallList(helper.displayList);
}
}
diff --git a/samples/SimpleAssimpViewX/README b/samples/SimpleAssimpViewX/README
index b0dd8a9ab..701a7cdce 100644
--- a/samples/SimpleAssimpViewX/README
+++ b/samples/SimpleAssimpViewX/README
@@ -1,22 +1,22 @@
-Mac OSX Assimp Sample, using OpenGL with VBOs
-=============================================
-
-Written & donated by drparallax.
-See http://sourceforge.net/projects/assimp/forums/forum/817654/topic/3917829
-
-
-How to build:
--------------
-
- - compile Assimp as static library, copy the generated libassimp.a right here.
- - copy the Assimp headers from ./../../include to ./include
- - open the XCode project file and build it
-
-
-Troubleshooting:
-----------------
-
- - OSX workspaces are not updated too frequently, so same files may be missing.
-
-If you have any problems which you can't solve on your own,
+Mac OSX Assimp Sample, using OpenGL with VBOs
+=============================================
+
+Written & donated by drparallax.
+See http://sourceforge.net/projects/assimp/forums/forum/817654/topic/3917829
+
+
+How to build:
+-------------
+
+ - compile Assimp as static library, copy the generated libassimp.a right here.
+ - copy the Assimp headers from ./../../include to ./include
+ - open the XCode project file and build it
+
+
+Troubleshooting:
+----------------
+
+ - OSX workspaces are not updated too frequently, so same files may be missing.
+
+If you have any problems which you can't solve on your own,
please report them on the thread above. \ No newline at end of file
diff --git a/samples/SimpleOpenGL/CMakeLists.txt b/samples/SimpleOpenGL/CMakeLists.txt
index 52c994b63..455cbd8ca 100644
--- a/samples/SimpleOpenGL/CMakeLists.txt
+++ b/samples/SimpleOpenGL/CMakeLists.txt
@@ -16,6 +16,11 @@ IF ( NOT GLUT_FOUND )
ENDIF ( MSVC )
ENDIF ( NOT GLUT_FOUND )
+if ( MSVC )
+ ADD_DEFINITIONS( -D_SCL_SECURE_NO_WARNINGS )
+ ADD_DEFINITIONS( -D_CRT_SECURE_NO_WARNINGS )
+endif ( MSVC )
+
INCLUDE_DIRECTORIES(
${Assimp_SOURCE_DIR}/include
${Assimp_SOURCE_DIR}/code
diff --git a/samples/SimpleOpenGL/SimpleOpenGL.sln b/samples/SimpleOpenGL/SimpleOpenGL.sln
index 2c1cdcb44..5ccbafe92 100644
--- a/samples/SimpleOpenGL/SimpleOpenGL.sln
+++ b/samples/SimpleOpenGL/SimpleOpenGL.sln
@@ -1,20 +1,20 @@
-
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SimpleOpenGL", "SimpleOpenGL.vcproj", "{A53D047C-2C35-44FB-B7DB-2066FE520950}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {A53D047C-2C35-44FB-B7DB-2066FE520950}.Debug|Win32.ActiveCfg = Debug|Win32
- {A53D047C-2C35-44FB-B7DB-2066FE520950}.Debug|Win32.Build.0 = Debug|Win32
- {A53D047C-2C35-44FB-B7DB-2066FE520950}.Release|Win32.ActiveCfg = Release|Win32
- {A53D047C-2C35-44FB-B7DB-2066FE520950}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SimpleOpenGL", "SimpleOpenGL.vcproj", "{A53D047C-2C35-44FB-B7DB-2066FE520950}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {A53D047C-2C35-44FB-B7DB-2066FE520950}.Debug|Win32.ActiveCfg = Debug|Win32
+ {A53D047C-2C35-44FB-B7DB-2066FE520950}.Debug|Win32.Build.0 = Debug|Win32
+ {A53D047C-2C35-44FB-B7DB-2066FE520950}.Release|Win32.ActiveCfg = Release|Win32
+ {A53D047C-2C35-44FB-B7DB-2066FE520950}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/samples/SimpleOpenGL/SimpleOpenGL.vcproj b/samples/SimpleOpenGL/SimpleOpenGL.vcproj
index 6ee257a8d..cbc56c1cc 100644
--- a/samples/SimpleOpenGL/SimpleOpenGL.vcproj
+++ b/samples/SimpleOpenGL/SimpleOpenGL.vcproj
@@ -1,199 +1,199 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9,00"
- Name="SimpleOpenGL"
- ProjectGUID="{A53D047C-2C35-44FB-B7DB-2066FE520950}"
- RootNamespace="SimpleOpenGL"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\glut;..\..\include"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="glut32.lib assimp.lib"
- OutputFile="$(OutDir)\$(ProjectName)_Debug.exe"
- LinkIncremental="2"
- AdditionalLibraryDirectories="..\glut;&quot;..\..\lib\assimp_debug-dll_win32&quot;;..\..\bin\debug\"
- GenerateDebugInformation="true"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- CommandLine="copy &quot;$(ConfigurationName)\$(TargetFileName)&quot; ..\bin&#x0D;&#x0A;copy ..\..\bin\assimp_debug-dll_Win32\Assimp32d.dll ..\bin&#x0D;&#x0A;"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="..\glut;..\..\include"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="glut32.lib assimp.lib"
- LinkIncremental="1"
- AdditionalLibraryDirectories="..\glut;&quot;..\..\lib\assimp_release-dll_win32&quot;"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- CommandLine="copy &quot;$(ConfigurationName)\$(TargetFileName)&quot; ..\bin&#x0D;&#x0A;copy ..\..\bin\assimp_release-dll_Win32\Assimp32.dll ..\bin&#x0D;&#x0A;"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="res"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- </Filter>
- <Filter
- Name="source"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath="Sample_SimpleOpenGL.c"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="SimpleOpenGL"
+ ProjectGUID="{A53D047C-2C35-44FB-B7DB-2066FE520950}"
+ RootNamespace="SimpleOpenGL"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\glut;..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="glut32.lib assimp.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_Debug.exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="..\glut;&quot;..\..\lib\assimp_debug-dll_win32&quot;;..\..\bin\debug\"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="copy &quot;$(ConfigurationName)\$(TargetFileName)&quot; ..\bin&#x0D;&#x0A;copy ..\..\bin\assimp_debug-dll_Win32\Assimp32d.dll ..\bin&#x0D;&#x0A;"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\glut;..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="glut32.lib assimp.lib"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\glut;&quot;..\..\lib\assimp_release-dll_win32&quot;"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="copy &quot;$(ConfigurationName)\$(TargetFileName)&quot; ..\bin&#x0D;&#x0A;copy ..\..\bin\assimp_release-dll_Win32\Assimp32.dll ..\bin&#x0D;&#x0A;"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="res"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ </Filter>
+ <Filter
+ Name="source"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="Sample_SimpleOpenGL.c"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/samples/SimpleTexturedDirectx11/SimpleTexturedDirectx11.sln b/samples/SimpleTexturedDirectx11/SimpleTexturedDirectx11.sln
index 46b37e5ee..381ac8f94 100644
--- a/samples/SimpleTexturedDirectx11/SimpleTexturedDirectx11.sln
+++ b/samples/SimpleTexturedDirectx11/SimpleTexturedDirectx11.sln
@@ -1,28 +1,28 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26228.9
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SimpleTexturedDirectx11", "SimpleTexturedDirectx11\SimpleTexturedDirectx11.vcxproj", "{E3B160B5-E71F-4F3F-9310-B8F156F736D8}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {E3B160B5-E71F-4F3F-9310-B8F156F736D8}.Debug|x64.ActiveCfg = Debug|x64
- {E3B160B5-E71F-4F3F-9310-B8F156F736D8}.Debug|x64.Build.0 = Debug|x64
- {E3B160B5-E71F-4F3F-9310-B8F156F736D8}.Debug|x86.ActiveCfg = Debug|Win32
- {E3B160B5-E71F-4F3F-9310-B8F156F736D8}.Debug|x86.Build.0 = Debug|Win32
- {E3B160B5-E71F-4F3F-9310-B8F156F736D8}.Release|x64.ActiveCfg = Release|x64
- {E3B160B5-E71F-4F3F-9310-B8F156F736D8}.Release|x64.Build.0 = Release|x64
- {E3B160B5-E71F-4F3F-9310-B8F156F736D8}.Release|x86.ActiveCfg = Release|Win32
- {E3B160B5-E71F-4F3F-9310-B8F156F736D8}.Release|x86.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.26228.9
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SimpleTexturedDirectx11", "SimpleTexturedDirectx11\SimpleTexturedDirectx11.vcxproj", "{E3B160B5-E71F-4F3F-9310-B8F156F736D8}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {E3B160B5-E71F-4F3F-9310-B8F156F736D8}.Debug|x64.ActiveCfg = Debug|x64
+ {E3B160B5-E71F-4F3F-9310-B8F156F736D8}.Debug|x64.Build.0 = Debug|x64
+ {E3B160B5-E71F-4F3F-9310-B8F156F736D8}.Debug|x86.ActiveCfg = Debug|Win32
+ {E3B160B5-E71F-4F3F-9310-B8F156F736D8}.Debug|x86.Build.0 = Debug|Win32
+ {E3B160B5-E71F-4F3F-9310-B8F156F736D8}.Release|x64.ActiveCfg = Release|x64
+ {E3B160B5-E71F-4F3F-9310-B8F156F736D8}.Release|x64.Build.0 = Release|x64
+ {E3B160B5-E71F-4F3F-9310-B8F156F736D8}.Release|x86.ActiveCfg = Release|Win32
+ {E3B160B5-E71F-4F3F-9310-B8F156F736D8}.Release|x86.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/samples/SimpleTexturedDirectx11/SimpleTexturedDirectx11/PixelShader.hlsl b/samples/SimpleTexturedDirectx11/SimpleTexturedDirectx11/PixelShader.hlsl
index 2e8b4eeda..cae4fa7a5 100644
--- a/samples/SimpleTexturedDirectx11/SimpleTexturedDirectx11/PixelShader.hlsl
+++ b/samples/SimpleTexturedDirectx11/SimpleTexturedDirectx11/PixelShader.hlsl
@@ -1,9 +1,9 @@
-Texture2D diffTexture;
-SamplerState SampleType;
-
-float4 main(float4 pos : SV_POSITION, float2 texcoord : TEXCOORD) : SV_TARGET
-{
- float4 textureColor = diffTexture.Sample(SampleType, texcoord);
-
- return textureColor;
+Texture2D diffTexture;
+SamplerState SampleType;
+
+float4 main(float4 pos : SV_POSITION, float2 texcoord : TEXCOORD) : SV_TARGET
+{
+ float4 textureColor = diffTexture.Sample(SampleType, texcoord);
+
+ return textureColor;
} \ No newline at end of file
diff --git a/samples/SimpleTexturedDirectx11/SimpleTexturedDirectx11/SimpleTexturedDirectx11.vcxproj b/samples/SimpleTexturedDirectx11/SimpleTexturedDirectx11/SimpleTexturedDirectx11.vcxproj
index fc82bc18e..6584b7d7c 100644
--- a/samples/SimpleTexturedDirectx11/SimpleTexturedDirectx11/SimpleTexturedDirectx11.vcxproj
+++ b/samples/SimpleTexturedDirectx11/SimpleTexturedDirectx11/SimpleTexturedDirectx11.vcxproj
@@ -1,146 +1,146 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <VCProjectVersion>15.0</VCProjectVersion>
- <ProjectGuid>{E3B160B5-E71F-4F3F-9310-B8F156F736D8}</ProjectGuid>
- <RootNamespace>SimpleTexturedDirectx11</RootNamespace>
- <WindowsTargetPlatformVersion>10.0.14393.0</WindowsTargetPlatformVersion>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v141</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v141</PlatformToolset>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v141</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v141</PlatformToolset>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="Shared">
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <IncludePath>$(IncludePath);E:\OpenGL VS Files\include</IncludePath>
- <LibraryPath>$(LibraryPath);E:\OpenGL VS Files\lib</LibraryPath>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>assimp-vc140-mt.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="main.cpp" />
- <ClCompile Include="ModelLoader.cpp" />
- <ClCompile Include="TextureLoader.cpp" />
- </ItemGroup>
- <ItemGroup>
- <FxCompile Include="PixelShader.hlsl">
- <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Pixel</ShaderType>
- <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Pixel</ShaderType>
- <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Pixel</ShaderType>
- <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Pixel</ShaderType>
- </FxCompile>
- <FxCompile Include="VertexShader.hlsl">
- <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Vertex</ShaderType>
- <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Vertex</ShaderType>
- <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Vertex</ShaderType>
- <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Vertex</ShaderType>
- </FxCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="Mesh.h" />
- <ClInclude Include="ModelLoader.h" />
- <ClInclude Include="TextureLoader.h" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <VCProjectVersion>15.0</VCProjectVersion>
+ <ProjectGuid>{E3B160B5-E71F-4F3F-9310-B8F156F736D8}</ProjectGuid>
+ <RootNamespace>SimpleTexturedDirectx11</RootNamespace>
+ <WindowsTargetPlatformVersion>10.0.14393.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="Shared">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <IncludePath>$(IncludePath);E:\OpenGL VS Files\include</IncludePath>
+ <LibraryPath>$(LibraryPath);E:\OpenGL VS Files\lib</LibraryPath>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <SDLCheck>true</SDLCheck>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>assimp-vc140-mt.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <SDLCheck>true</SDLCheck>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <SDLCheck>true</SDLCheck>
+ </ClCompile>
+ <Link>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <SDLCheck>true</SDLCheck>
+ </ClCompile>
+ <Link>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp" />
+ <ClCompile Include="ModelLoader.cpp" />
+ <ClCompile Include="TextureLoader.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <FxCompile Include="PixelShader.hlsl">
+ <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Pixel</ShaderType>
+ <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Pixel</ShaderType>
+ <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Pixel</ShaderType>
+ <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Pixel</ShaderType>
+ </FxCompile>
+ <FxCompile Include="VertexShader.hlsl">
+ <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Vertex</ShaderType>
+ <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Vertex</ShaderType>
+ <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Vertex</ShaderType>
+ <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Vertex</ShaderType>
+ </FxCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="Mesh.h" />
+ <ClInclude Include="ModelLoader.h" />
+ <ClInclude Include="TextureLoader.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
</Project> \ No newline at end of file
diff --git a/samples/SimpleTexturedDirectx11/SimpleTexturedDirectx11/SimpleTexturedDirectx11.vcxproj.filters b/samples/SimpleTexturedDirectx11/SimpleTexturedDirectx11/SimpleTexturedDirectx11.vcxproj.filters
index 271300ad8..3568b73c5 100644
--- a/samples/SimpleTexturedDirectx11/SimpleTexturedDirectx11/SimpleTexturedDirectx11.vcxproj.filters
+++ b/samples/SimpleTexturedDirectx11/SimpleTexturedDirectx11/SimpleTexturedDirectx11.vcxproj.filters
@@ -1,50 +1,50 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
- <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
- </Filter>
- <Filter Include="Shaders">
- <UniqueIdentifier>{b6a86d3e-70a5-4d1e-ba05-c20902300206}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="main.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="ModelLoader.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="TextureLoader.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <FxCompile Include="VertexShader.hlsl">
- <Filter>Shaders</Filter>
- </FxCompile>
- <FxCompile Include="PixelShader.hlsl">
- <Filter>Shaders</Filter>
- </FxCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="ModelLoader.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="Mesh.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="TextureLoader.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
+ </Filter>
+ <Filter Include="Shaders">
+ <UniqueIdentifier>{b6a86d3e-70a5-4d1e-ba05-c20902300206}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="ModelLoader.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="TextureLoader.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <FxCompile Include="VertexShader.hlsl">
+ <Filter>Shaders</Filter>
+ </FxCompile>
+ <FxCompile Include="PixelShader.hlsl">
+ <Filter>Shaders</Filter>
+ </FxCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="ModelLoader.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="Mesh.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="TextureLoader.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
</Project> \ No newline at end of file
diff --git a/samples/SimpleTexturedDirectx11/SimpleTexturedDirectx11/VertexShader.hlsl b/samples/SimpleTexturedDirectx11/SimpleTexturedDirectx11/VertexShader.hlsl
index cf7ee16ac..33300777f 100644
--- a/samples/SimpleTexturedDirectx11/SimpleTexturedDirectx11/VertexShader.hlsl
+++ b/samples/SimpleTexturedDirectx11/SimpleTexturedDirectx11/VertexShader.hlsl
@@ -1,23 +1,23 @@
-cbuffer ConstantBuffer : register(b0)
-{
- matrix World;
- matrix View;
- matrix Projection;
-}
-
-struct VOut {
- float4 pos : SV_POSITION;
- float2 texcoord : TEXCOORD;
-};
-
-VOut main(float4 pos : POSITION, float2 texcoord : TEXCOORD)
-{
- VOut output;
-
- output.pos = mul(pos, World);
- output.pos = mul(output.pos, View);
- output.pos = mul(output.pos, Projection);
- output.texcoord = texcoord;
-
- return output;
+cbuffer ConstantBuffer : register(b0)
+{
+ matrix World;
+ matrix View;
+ matrix Projection;
+}
+
+struct VOut {
+ float4 pos : SV_POSITION;
+ float2 texcoord : TEXCOORD;
+};
+
+VOut main(float4 pos : POSITION, float2 texcoord : TEXCOORD)
+{
+ VOut output;
+
+ output.pos = mul(pos, World);
+ output.pos = mul(output.pos, View);
+ output.pos = mul(output.pos, Projection);
+ output.texcoord = texcoord;
+
+ return output;
} \ No newline at end of file
diff --git a/samples/SimpleTexturedOpenGL/CMakeLists.txt b/samples/SimpleTexturedOpenGL/CMakeLists.txt
index 6c34acda5..1b206af50 100644
--- a/samples/SimpleTexturedOpenGL/CMakeLists.txt
+++ b/samples/SimpleTexturedOpenGL/CMakeLists.txt
@@ -11,6 +11,11 @@ IF ( NOT GLUT_FOUND )
ENDIF ( MSVC )
ENDIF ( NOT GLUT_FOUND )
+if ( MSVC )
+ ADD_DEFINITIONS( -D_SCL_SECURE_NO_WARNINGS )
+ ADD_DEFINITIONS( -D_CRT_SECURE_NO_WARNINGS )
+endif ( MSVC )
+
INCLUDE_DIRECTORIES(
${Assimp_SOURCE_DIR}/include
${Assimp_SOURCE_DIR}/code
diff --git a/samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL.sln b/samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL.sln
index 9d59a0e46..2e2bae61f 100644
--- a/samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL.sln
+++ b/samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL.sln
@@ -1,20 +1,20 @@
-
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SimpleTexturedOpenGL", "SimpleTexturedOpenGL\SimpleTexturedOpenGL.vcproj", "{A03DCB69-BBC5-4F55-A7D1-B9100E821BBE}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {A03DCB69-BBC5-4F55-A7D1-B9100E821BBE}.Debug|Win32.ActiveCfg = Debug|Win32
- {A03DCB69-BBC5-4F55-A7D1-B9100E821BBE}.Debug|Win32.Build.0 = Debug|Win32
- {A03DCB69-BBC5-4F55-A7D1-B9100E821BBE}.Release|Win32.ActiveCfg = Release|Win32
- {A03DCB69-BBC5-4F55-A7D1-B9100E821BBE}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SimpleTexturedOpenGL", "SimpleTexturedOpenGL\SimpleTexturedOpenGL.vcproj", "{A03DCB69-BBC5-4F55-A7D1-B9100E821BBE}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {A03DCB69-BBC5-4F55-A7D1-B9100E821BBE}.Debug|Win32.ActiveCfg = Debug|Win32
+ {A03DCB69-BBC5-4F55-A7D1-B9100E821BBE}.Debug|Win32.Build.0 = Debug|Win32
+ {A03DCB69-BBC5-4F55-A7D1-B9100E821BBE}.Release|Win32.ActiveCfg = Release|Win32
+ {A03DCB69-BBC5-4F55-A7D1-B9100E821BBE}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/SimpleTexturedOpenGL.vcproj b/samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/SimpleTexturedOpenGL.vcproj
index aaf1b05fc..885042d20 100644
--- a/samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/SimpleTexturedOpenGL.vcproj
+++ b/samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/SimpleTexturedOpenGL.vcproj
@@ -1,206 +1,206 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9,00"
- Name="SimpleTexturedOpenGL"
- ProjectGUID="{A03DCB69-BBC5-4F55-A7D1-B9100E821BBE}"
- RootNamespace="SimpleTexturedOpenGL"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=".\include;..\..\DevIL\include;..\..\..\include"
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="OpenGL32.lib GLu32.lib DevIL.lib assimp.lib"
- OutputFile="$(OutDir)\$(ProjectName)_Debug.exe"
- LinkIncremental="2"
- AdditionalLibraryDirectories="..\..\DevIL\lib; ..\..\..\lib\assimp_debug-dll_win32"
- GenerateDebugInformation="true"
- SubSystem="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- CommandLine="copy &quot;$(TargetDir)\$(TargetFileName)&quot; ..\..\bin&#x0D;&#x0A;copy ..\..\..\bin\assimp_debug-dll_Win32\Assimp32d.dll ..\..\bin&#x0D;&#x0A;"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="2"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- AdditionalIncludeDirectories=".\include;..\..\DevIL\include;..\..\..\include"
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="OpenGL32.lib GLu32.lib DevIL.lib assimp.lib"
- LinkIncremental="1"
- AdditionalLibraryDirectories="..\..\DevIL\lib; ..\..\..\lib\assimp_release-dll_win32"
- GenerateDebugInformation="true"
- SubSystem="2"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- CommandLine="copy &quot;$(TargetDir)\$(TargetFileName)&quot; ..\..\bin&#x0D;&#x0A;copy ..\..\..\bin\assimp_release-dll_Win32\Assimp32.dll ..\..\bin&#x0D;&#x0A;"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath=".\src\model_loading.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath=".\include\boost_includes.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="SimpleTexturedOpenGL"
+ ProjectGUID="{A03DCB69-BBC5-4F55-A7D1-B9100E821BBE}"
+ RootNamespace="SimpleTexturedOpenGL"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".\include;..\..\DevIL\include;..\..\..\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="OpenGL32.lib GLu32.lib DevIL.lib assimp.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_Debug.exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="..\..\DevIL\lib; ..\..\..\lib\assimp_debug-dll_win32"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="copy &quot;$(TargetDir)\$(TargetFileName)&quot; ..\..\bin&#x0D;&#x0A;copy ..\..\..\bin\assimp_debug-dll_Win32\Assimp32d.dll ..\..\bin&#x0D;&#x0A;"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ AdditionalIncludeDirectories=".\include;..\..\DevIL\include;..\..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="OpenGL32.lib GLu32.lib DevIL.lib assimp.lib"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\DevIL\lib; ..\..\..\lib\assimp_release-dll_win32"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="copy &quot;$(TargetDir)\$(TargetFileName)&quot; ..\..\bin&#x0D;&#x0A;copy ..\..\..\bin\assimp_release-dll_Win32\Assimp32.dll ..\..\bin&#x0D;&#x0A;"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\src\model_loading.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\include\boost_includes.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/src/model_loading.cpp b/samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/src/model_loading.cpp
index 083650f96..df05b56c4 100644
--- a/samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/src/model_loading.cpp
+++ b/samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/src/model_loading.cpp
@@ -13,6 +13,7 @@
// http://nehe.gamedev.net/
// ----------------------------------------------------------------------------
#include <windows.h>
+#include <shellapi.h>
#include <stdio.h>
#include <GL/gl.h>
#include <GL/glu.h>
@@ -666,7 +667,7 @@ BOOL CreateGLWindow(const char* title, int width, int height, int bits, bool ful
PFD_SUPPORT_OPENGL | // Format Must Support OpenGL
PFD_DOUBLEBUFFER, // Must Support Double Buffering
PFD_TYPE_RGBA, // Request An RGBA Format
- bits, // Select Our Color Depth
+ BYTE(bits), // Select Our Color Depth
0, 0, 0, 0, 0, 0, // Color Bits Ignored
0, // No Alpha Buffer
0, // Shift Bit Ignored
diff --git a/samples/bin/DevIL.dll b/samples/bin/DevIL.dll
index b7a4c0906..689b3d4de 100644
--- a/samples/bin/DevIL.dll
+++ b/samples/bin/DevIL.dll
Binary files differ
diff --git a/samples/bin/ILU.dll b/samples/bin/ILU.dll
index b5f6561c3..ed44744e6 100644
--- a/samples/bin/ILU.dll
+++ b/samples/bin/ILU.dll
Binary files differ
diff --git a/samples/bin/ILUT.dll b/samples/bin/ILUT.dll
index 33178896c..8b274b351 100644
--- a/samples/bin/ILUT.dll
+++ b/samples/bin/ILUT.dll
Binary files differ
diff --git a/samples/bin/glut32.dll b/samples/bin/glut32.dll
index 106646ff7..196ba78a9 100644
--- a/samples/bin/glut32.dll
+++ b/samples/bin/glut32.dll
Binary files differ
diff --git a/samples/glut/GL/glut.h b/samples/glut/GL/glut.h
index 0e6ddfbfe..86aa5c423 100644
--- a/samples/glut/GL/glut.h
+++ b/samples/glut/GL/glut.h
@@ -179,7 +179,7 @@ extern void exit(int);
glutSpecialUpFunc, glutIgnoreKeyRepeat, glutSetKeyRepeat,
glutJoystickFunc, glutForceJoystickFunc (NOT FINALIZED!).
**/
-#ifndef GLUT_API_VERSION /* allow this to be overriden */
+#ifndef GLUT_API_VERSION /* allow this to be overridden */
#define GLUT_API_VERSION 3
#endif
@@ -219,7 +219,7 @@ extern void exit(int);
GLUT_XLIB_IMPLEMENTATION=15 mjk's GLUT 3.7 beta sync'ed with Mesa <GL/glut.h>
**/
-#ifndef GLUT_XLIB_IMPLEMENTATION /* Allow this to be overriden. */
+#ifndef GLUT_XLIB_IMPLEMENTATION /* Allow this to be overridden. */
#define GLUT_XLIB_IMPLEMENTATION 15
#endif
diff --git a/samples/glut/glut.def b/samples/glut/glut.def
index 94da6ab85..d7d0240fc 100644
--- a/samples/glut/glut.def
+++ b/samples/glut/glut.def
@@ -1,9 +1,9 @@
DESCRIPTION 'OpenGL Utility Toolkit for Win32'
-
-VERSION 3.7
-
+
+VERSION 3.7
+
EXPORTS
-
+
glutAddMenuEntry
glutAddSubMenu
glutAttachMenu
@@ -123,4 +123,4 @@ EXPORTS
glutWireTorus
; __glutSetFCB
; __glutGetFCB
-
+
diff --git a/scripts/AppVeyor/cacheglobs.txt b/scripts/AppVeyor/cacheglobs.txt
new file mode 100644
index 000000000..0f5f04a4a
--- /dev/null
+++ b/scripts/AppVeyor/cacheglobs.txt
@@ -0,0 +1,4 @@
+code/*.{%{cpp}}
+contrib/**/*.{%{cpp}}
+include/**/*.{%{cpp}}
+test/**/*.{%{cpp}}
diff --git a/scripts/AppVeyor/mtime_cache b/scripts/AppVeyor/mtime_cache
new file mode 100644
index 000000000..e296e3658
--- /dev/null
+++ b/scripts/AppVeyor/mtime_cache
@@ -0,0 +1,177 @@
+#!/usr/bin/env ruby
+
+#
+# mtime_cache
+# Copyright (c) 2016 Borislav Stanimirov
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+# IN THE SOFTWARE.
+#
+
+require 'digest/md5'
+require 'json'
+require 'fileutils'
+
+VERSION = "1.0.2"
+
+VERSION_TEXT = "mtime_cache v#{VERSION}"
+
+USAGE = <<ENDUSAGE
+
+Usage:
+ mtime_cache [<globs>] [-g globfile] [-d] [-q|V] [-c cache]
+ENDUSAGE
+
+HELP = <<ENDHELP
+
+ Traverse through globbed files, making a json cache based on their mtime.
+ If a cache exists, changes the mtime of existing unchanged (based on MD5
+ hash) files to the one in the cache.
+
+ Options:
+
+ globs Ruby-compatible glob strings (ex some/path/**/*.java)
+ A extension pattern is allowd in the form %{pattern}
+ (ex some/path/*.{%{pattern1},%{pattern2}})
+ The globs support the following patterns:
+ %{cpp} - common C++ extensions
+
+ -g, --globfile A file with list of globs to perform (one per line)
+
+ -?, -h, --help Show this help message.
+ -v, --version Show the version number (#{VERSION})
+ -q, --quiet Don't log anything to stdout
+ -V, --verbose Show extra logging
+ -d, --dryrun Don't change any files on the filesystem
+ -c, --cache Specify the cache file for input and output.
+ [Default is .mtime_cache.json]
+
+ENDHELP
+
+param_arg = nil
+ARGS = { :cache => '.mtime_cache.json', :globs => [] }
+
+ARGV.each do |arg|
+ case arg
+ when '-g', '--globfile' then param_arg = :globfile
+ when '-h', '-?', '--help' then ARGS[:help] = true
+ when '-v', '--version' then ARGS[:ver] = true
+ when '-q', '--quiet' then ARGS[:quiet] = true
+ when '-V', '--verbose' then ARGS[:verbose] = true
+ when '-d', '--dryrun' then ARGS[:dry] = true
+ when '-c', '--cache' then param_arg = :cache
+ else
+ if param_arg
+ ARGS[param_arg] = arg
+ param_arg = nil
+ else
+ ARGS[:globs] << arg
+ end
+ end
+end
+
+def log(text, level = 0)
+ return if ARGS[:quiet]
+ return if level > 0 && !ARGS[:verbose]
+ puts text
+end
+
+if ARGS[:ver] || ARGS[:help]
+ log VERSION_TEXT
+ exit if ARGS[:ver]
+ log USAGE
+ log HELP
+ exit
+end
+
+if ARGS[:globs].empty? && !ARGS[:globfile]
+ log 'Error: Missing globs'
+ log USAGE
+ exit 1
+end
+
+EXTENSION_PATTERNS = {
+ :cpp => "c,cc,cpp,cxx,h,hpp,hxx,inl,ipp,inc,ixx"
+}
+
+cache_file = ARGS[:cache]
+
+cache = {}
+
+if File.file?(cache_file)
+ log "Found #{cache_file}"
+ cache = JSON.parse(File.read(cache_file))
+ log "Read #{cache.length} entries"
+else
+ log "#{cache_file} not found. A new one will be created"
+end
+
+globs = ARGS[:globs].map { |g| g % EXTENSION_PATTERNS }
+
+globfile = ARGS[:globfile]
+if globfile
+ File.open(globfile, 'r').each_line do |line|
+ line.strip!
+ next if line.empty?
+ globs << line % EXTENSION_PATTERNS
+ end
+end
+
+if globs.empty?
+ log 'Error: No globs in globfile'
+ log USAGE
+ exit 1
+end
+
+files = {}
+num_changed = 0
+
+globs.each do |glob|
+ Dir[glob].each do |file|
+ next if !File.file?(file)
+
+ mtime = File.mtime(file).to_i
+ hash = Digest::MD5.hexdigest(File.read(file))
+
+ cached = cache[file]
+
+ if cached && cached['hash'] == hash && cached['mtime'] < mtime
+ mtime = cached['mtime']
+
+ log "mtime_cache: changing mtime of #{file} to #{mtime}", 1
+
+ File.utime(File.atime(file), Time.at(mtime), file) if !ARGS[:dry]
+ num_changed += 1
+ else
+ log "mtime_cache: NOT changing mtime of #{file}", 1
+ end
+
+ files[file] = { 'mtime' => mtime, 'hash' => hash }
+ end
+end
+
+log "Changed mtime of #{num_changed} of #{files.length} files"
+log "Writing #{cache_file}"
+
+if !ARGS[:dry]
+ dirname = File.dirname(cache_file)
+ unless File.directory?(dirname)
+ FileUtils.mkdir_p(dirname)
+ end
+ File.open(cache_file, 'w').write(JSON.pretty_generate(files))
+end
diff --git a/scripts/IFCImporter/CppGenerator.py b/scripts/StepImporter/CppGenerator.py
index a05716619..156f19523 100644
--- a/scripts/IFCImporter/CppGenerator.py
+++ b/scripts/StepImporter/CppGenerator.py
@@ -5,7 +5,7 @@
# Open Asset Import Library (ASSIMP)
# ---------------------------------------------------------------------------
#
-# Copyright (c) 2006-2010, ASSIMP Development Team
+# Copyright (c) 2006-2018, ASSIMP Development Team
#
# All rights reserved.
#
@@ -48,11 +48,27 @@ if sys.version_info < (3, 0):
print("must use python 3.0 or greater")
sys.exit(-2)
-input_template_h = 'IFCReaderGen.h.template'
-input_template_cpp = 'IFCReaderGen.cpp.template'
-
-output_file_h = os.path.join('..','..','code','IFCReaderGen.h')
-output_file_cpp = os.path.join('..','..','code','IFCReaderGen.cpp')
+use_ifc_template = False
+
+input_step_template_h = 'StepReaderGen.h.template'
+input_step_template_cpp = 'StepReaderGen.cpp.template'
+input_ifc_template_h = 'IFCReaderGen.h.template'
+input_ifc_template_cpp = 'IFCReaderGen.cpp.template'
+
+cpp_keywords = "class"
+
+output_file_h = ""
+output_file_cpp = ""
+if (use_ifc_template ):
+ input_template_h = input_ifc_template_h
+ input_template_cpp = input_ifc_template_cpp
+ output_file_h = os.path.join('..','..','code','IFCReaderGen.h')
+ output_file_cpp = os.path.join('..','..','code','IFCReaderGen.cpp')
+else:
+ input_template_h = input_step_template_h
+ input_template_cpp = input_step_template_cpp
+ output_file_h = os.path.join('..','..','code/Importer/StepFile','StepReaderGen.h')
+ output_file_cpp = os.path.join('..','..','code/Importer/StepFile','StepReaderGen.cpp')
template_entity_predef = '\tstruct {entity};\n'
template_entity_predef_ni = '\ttypedef NotImplemented {entity}; // (not currently used by Assimp)\n'
@@ -99,7 +115,6 @@ template_converter_epilogue = '\treturn base;'
import ExpressReader
-
def get_list_bounds(collection_spec):
start,end = [(int(n) if n!='?' else 0) for n in re.findall(r'(\d+|\?)',collection_spec)]
return start,end
@@ -221,9 +236,11 @@ def work(filename):
schema = ExpressReader.read(filename,silent=True)
entities, stub_decls, schema_table, converters, typedefs, predefs = '','',[],'','',''
-
+ entitylist = 'ifc_entitylist.txt'
+ if not use_ifc_template:
+ entitylist = 'step_entitylist.txt'
whitelist = []
- with open('entitylist.txt', 'rt') as inp:
+ with open(entitylist, 'rt') as inp:
whitelist = [n.strip() for n in inp.read().split('\n') if n[:1]!='#' and n.strip()]
schema.whitelist = set()
@@ -242,12 +259,14 @@ def work(filename):
schema.blacklist_partial -= schema.whitelist
schema.whitelist |= schema.blacklist_partial
+ # Generate list with reserved keywords from c++
+ cpp_types = cpp_keywords.split(',')
+
# uncomment this to disable automatic code reduction based on whitelisting all used entities
# (blacklisted entities are those who are in the whitelist and may be instanced, but will
# only be accessed through a pointer to a base-class.
#schema.whitelist = set(schema.entities.keys())
#schema.blacklist_partial = set()
-
for ntype in schema.types.values():
typedefs += gen_type_struct(ntype,schema)
schema_table.append(template_schema_type.format(normalized_name=ntype.name.lower()))
@@ -256,6 +275,9 @@ def work(filename):
for entity in sorted_entities:
parent = entity.parent+',' if entity.parent else ''
+ if ( entity.name in cpp_types ):
+ entity.name = entity.name + "_t"
+ print( "renaming " + entity.name)
if entity.name in schema.whitelist:
converters += template_converter.format(type=entity.name,contents=gen_converter(entity,schema))
schema_table.append(template_schema.format(type=entity.name,normalized_name=entity.name.lower(),argcnt=len(entity.members)))
@@ -280,8 +302,3 @@ def work(filename):
if __name__ == "__main__":
sys.exit(work(sys.argv[1] if len(sys.argv)>1 else 'schema.exp'))
-
-
-
-
-
diff --git a/scripts/IFCImporter/ExpressReader.py b/scripts/StepImporter/ExpressReader.py
index d3dd980c7..84aaadbdc 100644
--- a/scripts/IFCImporter/ExpressReader.py
+++ b/scripts/StepImporter/ExpressReader.py
@@ -94,8 +94,9 @@ class Type:
self.enums = enums
-def read(filename,silent=False):
+def read(filename, silent=False):
schema = Schema()
+ print( "Try to read EXPRESS schema file" + filename)
with open(filename,'rt') as inp:
contents = inp.read()
types = re.findall(re_match_type,contents)
diff --git a/scripts/IFCImporter/IFCReaderGen.cpp.template b/scripts/StepImporter/IFCReaderGen.cpp.template
index 8cd6658ba..562b69807 100644
--- a/scripts/IFCImporter/IFCReaderGen.cpp.template
+++ b/scripts/StepImporter/IFCReaderGen.cpp.template
@@ -2,7 +2,7 @@
Open Asset Import Library (ASSIMP)
----------------------------------------------------------------------
-Copyright (c) 2006-2010, ASSIMP Development Team
+Copyright (c) 2006-2018, ASSIMP Development Team
All rights reserved.
Redistribution and use of this software in source and binary forms,
@@ -40,7 +40,6 @@ 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"
diff --git a/scripts/IFCImporter/IFCReaderGen.h.template b/scripts/StepImporter/IFCReaderGen.h.template
index abef2a1ab..abef2a1ab 100644
--- a/scripts/IFCImporter/IFCReaderGen.h.template
+++ b/scripts/StepImporter/IFCReaderGen.h.template
diff --git a/scripts/StepImporter/StepReaderGen.cpp.template b/scripts/StepImporter/StepReaderGen.cpp.template
new file mode 100644
index 000000000..91705f7a4
--- /dev/null
+++ b/scripts/StepImporter/StepReaderGen.cpp.template
@@ -0,0 +1,78 @@
+/*
+Open Asset Import Library (ASSIMP)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2018, 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 ASSIMP_BUILD_NO_STEP_IMPORTER
+
+#include "code/Importer/StepFile/StepReaderGen.h"
+
+namespace Assimp {
+using namespace StepFile;
+
+namespace {
+
+ typedef EXPRESS::ConversionSchema::SchemaEntry SchemaEntry;
+ const SchemaEntry schema_raw[] = {
+{schema-static-table}
+ };
+}
+
+// -----------------------------------------------------------------------------------------------------------
+void StepFile::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;
+}
+
+
+{converter-impl}
+
+} // ! STEP
+} // ! Assimp
+
+#endif
diff --git a/scripts/StepImporter/StepReaderGen.h.template b/scripts/StepImporter/StepReaderGen.h.template
new file mode 100644
index 000000000..5f9a2fd5d
--- /dev/null
+++ b/scripts/StepImporter/StepReaderGen.h.template
@@ -0,0 +1,91 @@
+/*
+Open Asset Import Library (ASSIMP)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2018, 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_STEPFILE_READER_GEN_H
+#define INCLUDED_STEPFILE_READER_GEN_H
+
+#include "code/STEPFile.h"
+
+namespace Assimp {
+namespace StepFile {
+ using namespace STEP;
+ using namespace STEP::EXPRESS;
+
+
+ struct NotImplemented : public ObjectHelper<NotImplemented,0> {
+
+ };
+
+
+ // ******************************************************************************
+ // StepFile Custom data types
+ // ******************************************************************************
+
+{types}
+
+
+ // ******************************************************************************
+ // StepFile Entities
+ // ******************************************************************************
+
+{predefs}
+{entities}
+
+ void GetSchema(EXPRESS::ConversionSchema& out);
+
+} //! StepFile
+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)
+
+{converter-decl}
+
+#undef DECL_CONV_STUB
+
+} //! STEP
+} //! Assimp
+
+#endif // INCLUDED_STEPFILE_READER_GEN_H
diff --git a/scripts/StepImporter/extract_step_token.py b/scripts/StepImporter/extract_step_token.py
new file mode 100644
index 000000000..c7f89537a
--- /dev/null
+++ b/scripts/StepImporter/extract_step_token.py
@@ -0,0 +1,64 @@
+#!/usr/bin/env python3
+# -*- Coding: UTF-8 -*-
+
+# ---------------------------------------------------------------------------
+# Open Asset Import Library (ASSIMP)
+# ---------------------------------------------------------------------------
+#
+# Copyright (c) 2006-2018, 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.
+# ---------------------------------------------------------------------------
+
+import sys
+
+Entity_token = "ENTITY"
+Type_token = "TYPE"
+token = []
+file = open(sys.argv[1])
+output = open("step_entitylist.txt", "a")
+lines = file.readlines()
+for line in lines:
+ pos = line.find(Entity_token)
+ if pos != -1:
+ token = line.split(" ")
+ if len(token) > 1:
+ name = token[1]
+ print( "Writing entity " + name)
+ output.write(name)
+
+output.close()
+file.close()
+
+
+
diff --git a/scripts/IFCImporter/genentitylist.sh b/scripts/StepImporter/genentitylist.sh
index e51959d22..e51959d22 100644
--- a/scripts/IFCImporter/genentitylist.sh
+++ b/scripts/StepImporter/genentitylist.sh
diff --git a/scripts/IFCImporter/entitylist.txt b/scripts/StepImporter/ifc_entitylist.txt
index 14b05ca3e..14b05ca3e 100644
--- a/scripts/IFCImporter/entitylist.txt
+++ b/scripts/StepImporter/ifc_entitylist.txt
diff --git a/scripts/StepImporter/part403ts_wg3n2635mim_lf.exp b/scripts/StepImporter/part403ts_wg3n2635mim_lf.exp
new file mode 100644
index 000000000..79353049a
--- /dev/null
+++ b/scripts/StepImporter/part403ts_wg3n2635mim_lf.exp
@@ -0,0 +1,16378 @@
+(*
+ $Id: mim_lf.exp,v 1.43 2009/09/10 20:08:09 darla Exp $
+ ISO TC184/SC4/WG3 N2635 - ISO/TS 10303-403 AP203 configuration controlled 3d design of mechanical parts and assemblies - EXPRESS MIM Long form
+ Supersedes ISO TC184/SC4/WG3 N2464
+*)
+
+SCHEMA Ap203_configuration_controlled_3d_design_of_mechanical_parts_and_assemblies_mim_lf;
+
+
+CONSTANT
+ deprecated_constructed_data_types : SET [0:?] OF STRING := ['approved_item',
+ 'certified_item',
+ 'change_request_item',
+ 'contracted_item',
+ 'cc_classified_item',
+ 'date_time_item',
+ 'cc_person_organization_item',
+ 'cc_specified_item',
+ 'start_request_item',
+ 'work_item'];
+
+
+ deprecated_entity_data_types : SET [0:?] OF STRING := ['cc_design_approval',
+ 'cc_design_certification',
+ 'cc_design_contract',
+ 'cc_design_date_and_time_assignment',
+ 'cc_design_person_and_organization_assignment',
+ 'cc_design_security_classification',
+ 'cc_design_specification_reference',
+ 'change',
+ 'change_request',
+ 'design_context',
+ 'design_make_from_relationship',
+ 'mechanical_context',
+ 'start_request',
+ 'start_work',
+ 'supplied_part_relationship'];
+
+
+ deprecated_interfaced_data_types : SET [0:?] OF STRING := ['document_with_class',
+ 'ordinal_date',
+ 'product_definition_formation_with_specified_source',
+ 'week_of_year_and_day_date'];
+
+
+ dummy_gri : geometric_representation_item := representation_item('')||
+ geometric_representation_item();
+
+
+ dummy_tri : topological_representation_item := representation_item('')||
+ topological_representation_item();
+
+
+ pre_defined_picture_representation_types : SET [0:?] OF STRING := [ 'JPEG', 'PNG', 'TIFF', 'BMP', 'GIF'];
+
+
+
+END_CONSTANT;
+
+TYPE absorbed_dose_measure = REAL;
+END_TYPE;
+
+TYPE acceleration_measure = REAL;
+END_TYPE;
+
+TYPE action_items = SELECT (
+ action_directive,
+ certification_item,
+ characterized_object,
+ classification_item,
+ configuration_effectivity,
+ document_reference_item,
+ identification_item,
+ organization,
+ person_and_organization,
+ product_definition,
+ product_definition_formation,
+ product_definition_formation_relationship,
+ product_definition_relationship,
+ requirement_assigned_item);
+END_TYPE;
+
+TYPE action_method_items = SELECT (
+ product,
+ product_definition_formation);
+END_TYPE;
+
+TYPE action_request_item = SELECT (
+ product_definition,
+ product_definition_formation,
+ product_definition_formation_relationship,
+ product_definition_relationship,
+ property_definition,
+ versioned_action_request);
+END_TYPE;
+
+TYPE ahead_or_behind = ENUMERATION OF (
+ ahead,
+ exact,
+ behind );
+END_TYPE;
+
+TYPE amount_of_substance_measure = REAL;
+END_TYPE;
+
+TYPE angle_direction_reference_select = SELECT (
+ direction,
+ curve,
+ point_path);
+END_TYPE;
+
+TYPE angle_direction_reference_with_a2p3d_select = SELECT (
+ angle_direction_reference_select,
+ axis2_placement_3d);
+END_TYPE;
+
+TYPE angle_relator = ENUMERATION OF (
+ equal,
+ large,
+ small );
+END_TYPE;
+
+TYPE annotation_plane_element = SELECT (
+ draughting_callout,
+ styled_item);
+END_TYPE;
+
+TYPE annotation_representation_select = SELECT (
+ presentation_area,
+ presentation_view,
+ symbol_representation);
+END_TYPE;
+
+TYPE annotation_symbol_occurrence_item = SELECT (
+ annotation_symbol,
+ defined_symbol);
+END_TYPE;
+
+TYPE annotation_text_occurrence_item = SELECT (
+ text_literal,
+ annotation_text,
+ annotation_text_character,
+ composite_text);
+END_TYPE;
+
+TYPE approval_item = SELECT (
+ action,
+ action_directive,
+ alternate_product_relationship,
+ applied_action_assignment,
+ applied_usage_right,
+ assembly_component_usage_substitute,
+ certification,
+ configuration_effectivity,
+ configuration_item,
+ contract,
+ date,
+ directed_action,
+ document,
+ document_file,
+ effectivity,
+ executed_action,
+ general_property_relationship,
+ group,
+ group_relationship,
+ information_usage_right,
+ product,
+ product_definition,
+ product_definition_formation,
+ product_definition_formation_relationship,
+ product_definition_relationship,
+ representation,
+ requirement_assignment,
+ security_classification,
+ shape_aspect_relationship,
+ versioned_action_request);
+END_TYPE;
+
+TYPE approved_item = SELECT (
+ certification,
+ change,
+ change_request,
+ configuration_effectivity,
+ configuration_item,
+ contract,
+ product,
+ security_classification,
+ start_request,
+ start_work);
+END_TYPE;
+
+TYPE area_measure = REAL;
+END_TYPE;
+
+TYPE area_or_view = SELECT (
+ presentation_area,
+ presentation_view);
+END_TYPE;
+
+TYPE attribute_classification_item = SELECT (
+ action_directive,
+ action_method,
+ action_property,
+ action_property_representation,
+ action_relationship,
+ action_request_solution,
+ action_request_status,
+ alternate_product_relationship,
+ applied_action_assignment,
+ applied_action_request_assignment,
+ applied_approval_assignment,
+ applied_certification_assignment,
+ applied_document_reference,
+ applied_document_usage_constraint_assignment,
+ applied_effectivity_assignment,
+ applied_event_occurrence_assignment,
+ applied_external_identification_assignment,
+ applied_identification_assignment,
+ applied_organization_assignment,
+ applied_organizational_project_assignment,
+ applied_person_and_organization_assignment,
+ approval,
+ approval_person_organization,
+ approval_relationship,
+ approval_status,
+ certification,
+ context_dependent_unit,
+ contract,
+ date_and_time_assignment,
+ date_assignment,
+ derived_unit,
+ descriptive_representation_item,
+ document_file,
+ document_relationship,
+ effectivity,
+ event_occurrence_relationship,
+ executed_action,
+ general_property,
+ general_property_relationship,
+ group,
+ group_relationship,
+ information_right,
+ information_usage_right,
+ language,
+ measure_representation_item,
+ measure_with_unit,
+ named_unit,
+ organization_relationship,
+ organizational_address,
+ organizational_project_relationship,
+ person_and_organization,
+ person_and_organization_address,
+ product,
+ product_category,
+ product_concept,
+ product_concept_context,
+ product_definition,
+ product_definition_context,
+ product_definition_formation,
+ product_definition_formation_relationship,
+ product_definition_relationship,
+ property_definition,
+ property_definition_relationship,
+ property_definition_representation,
+ representation,
+ representation_context,
+ representation_item,
+ security_classification,
+ time_interval_relationship,
+ uncertainty_measure_with_unit,
+ usage_association,
+ versioned_action_request);
+END_TYPE;
+
+TYPE attribute_language_item = SELECT (
+ alternate_product_relationship,
+ application_context,
+ applied_certification_assignment,
+ applied_document_reference,
+ applied_document_usage_constraint_assignment,
+ applied_external_identification_assignment,
+ applied_identification_assignment,
+ applied_organizational_project_assignment,
+ applied_security_classification_assignment,
+ approval,
+ approval_relationship,
+ approval_status,
+ assembly_component_usage_substitute,
+ attribute_value_assignment,
+ certification,
+ certification_type,
+ configuration_design,
+ configuration_item,
+ contract,
+ date_role,
+ date_time_role,
+ descriptive_representation_item,
+ document_relationship,
+ document_usage_role,
+ effectivity,
+ effectivity_relationship,
+ event_occurrence,
+ external_source,
+ general_property,
+ general_property_relationship,
+ geometric_representation_item,
+ geometric_tolerance,
+ identification_role,
+ information_right,
+ information_usage_right,
+ make_from_usage_option,
+ mapped_item,
+ multi_language_attribute_assignment,
+ object_role,
+ organization_relationship,
+ organization_role,
+ organizational_project,
+ organizational_project_relationship,
+ organizational_project_role,
+ person_and_organization,
+ person_and_organization_role,
+ product,
+ product_concept,
+ product_concept_relationship,
+ product_definition,
+ product_definition_context,
+ product_definition_formation,
+ product_definition_formation_relationship,
+ product_definition_relationship,
+ product_definition_shape,
+ product_related_product_category,
+ property_definition,
+ representation,
+ security_classification,
+ security_classification_assignment,
+ shape_aspect,
+ shape_aspect_relationship,
+ shape_representation,
+ time_interval_role,
+ topological_representation_item,
+ uncertainty_measure_with_unit,
+ uncertainty_qualifier,
+ usage_association);
+END_TYPE;
+
+TYPE attribute_type = SELECT (
+ label,
+ text);
+END_TYPE;
+
+TYPE axis2_placement = SELECT (
+ axis2_placement_2d,
+ axis2_placement_3d);
+END_TYPE;
+
+TYPE b_spline_curve_form = ENUMERATION OF (
+ polyline_form,
+ circular_arc,
+ elliptic_arc,
+ parabolic_arc,
+ hyperbolic_arc,
+ unspecified );
+END_TYPE;
+
+TYPE b_spline_surface_form = ENUMERATION OF (
+ plane_surf,
+ cylindrical_surf,
+ conical_surf,
+ spherical_surf,
+ toroidal_surf,
+ surf_of_revolution,
+ ruled_surf,
+ generalised_cone,
+ quadric_surf,
+ surf_of_linear_extrusion,
+ unspecified );
+END_TYPE;
+
+TYPE base_solid_select = SELECT (
+ solid_model,
+ csg_primitive,
+ boolean_result);
+WHERE
+ WR1 : NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRIMITIVE_2D' IN TYPEOF(SELF));
+END_TYPE;
+
+TYPE blend_end_condition_select = SELECT (
+ point_on_curve,
+ edge_curve,
+ vertex);
+END_TYPE;
+
+TYPE blend_radius_variation_type = ENUMERATION OF (
+ linear_blend,
+ cubic_blend,
+ unspecified_blend );
+END_TYPE;
+
+TYPE boolean_operand = SELECT (
+ solid_model,
+ half_space_solid,
+ csg_primitive,
+ boolean_result);
+END_TYPE;
+
+TYPE boolean_operator = ENUMERATION OF (
+ union,
+ intersection,
+ difference );
+END_TYPE;
+
+TYPE box_characteristic_select = SELECT (
+ box_height,
+ box_width,
+ box_slant_angle,
+ box_rotate_angle);
+END_TYPE;
+
+TYPE box_height = positive_ratio_measure;
+END_TYPE;
+
+TYPE box_rotate_angle = plane_angle_measure;
+END_TYPE;
+
+TYPE box_slant_angle = plane_angle_measure;
+END_TYPE;
+
+TYPE box_width = positive_ratio_measure;
+END_TYPE;
+
+TYPE camera_model_d3_multi_clipping_interection_select = SELECT (
+ camera_model_d3_multi_clipping_union,
+ plane);
+END_TYPE;
+
+TYPE camera_model_d3_multi_clipping_union_select = SELECT (
+ camera_model_d3_multi_clipping_intersection,
+ plane);
+END_TYPE;
+
+TYPE capacitance_measure = REAL;
+END_TYPE;
+
+TYPE category_usage_item = SELECT (
+ product_class);
+END_TYPE;
+
+TYPE cc_classified_item = SELECT (
+ assembly_component_usage,
+ product_definition_formation);
+END_TYPE;
+
+TYPE cc_person_organization_item = SELECT (
+ change,
+ change_request,
+ configuration_item,
+ contract,
+ product,
+ product_definition,
+ product_definition_formation,
+ security_classification,
+ start_request,
+ start_work);
+END_TYPE;
+
+TYPE cc_specified_item = SELECT (
+ product_definition,
+ shape_aspect);
+END_TYPE;
+
+TYPE celsius_temperature_measure = REAL;
+END_TYPE;
+
+TYPE central_or_parallel = ENUMERATION OF (
+ central,
+ parallel );
+END_TYPE;
+
+TYPE certification_item = SELECT (
+ alternate_product_relationship,
+ make_from_usage_option,
+ product_definition_formation,
+ product_definition_formation_relationship);
+END_TYPE;
+
+TYPE certified_item = SELECT (
+ supplied_part_relationship);
+END_TYPE;
+
+TYPE change_request_item = SELECT (
+ product_definition_formation);
+END_TYPE;
+
+TYPE character_spacing_select = SELECT (
+ length_measure,
+ ratio_measure,
+ measure_with_unit,
+ descriptive_measure);
+END_TYPE;
+
+TYPE character_style_select = SELECT (
+ character_glyph_style_stroke,
+ character_glyph_style_outline,
+ text_style_for_defined_font);
+END_TYPE;
+
+TYPE characterized_action_definition = SELECT (
+ action,
+ action_method,
+ action_method_relationship,
+ action_relationship);
+END_TYPE;
+
+TYPE characterized_definition = SELECT (
+ characterized_object,
+ characterized_product_definition,
+ shape_definition);
+END_TYPE;
+
+TYPE characterized_material_property = SELECT (
+ material_property_representation,
+ product_material_composition_relationship);
+END_TYPE;
+
+TYPE characterized_product_composition_value = SELECT (
+ measure_with_unit);
+END_TYPE;
+
+TYPE characterized_product_definition = SELECT (
+ product_definition,
+ product_definition_relationship);
+END_TYPE;
+
+TYPE class_usage_effectivity_context_item = SELECT (
+ product_definition);
+END_TYPE;
+
+TYPE classification_item = SELECT (
+ action,
+ action_directive,
+ action_method,
+ action_property,
+ action_relationship,
+ action_request_solution,
+ action_request_status,
+ address,
+ alternate_product_relationship,
+ applied_action_assignment,
+ applied_action_request_assignment,
+ applied_approval_assignment,
+ applied_certification_assignment,
+ applied_contract_assignment,
+ applied_date_and_time_assignment,
+ applied_date_assignment,
+ applied_document_reference,
+ applied_document_usage_constraint_assignment,
+ applied_effectivity_assignment,
+ applied_event_occurrence_assignment,
+ applied_external_identification_assignment,
+ applied_identification_assignment,
+ applied_organization_assignment,
+ applied_organizational_project_assignment,
+ applied_person_and_organization_assignment,
+ applied_security_classification_assignment,
+ approval,
+ approval_person_organization,
+ approval_relationship,
+ approval_status,
+ assembly_component_usage_substitute,
+ calendar_date,
+ certification,
+ characterized_class,
+ characterized_object,
+ class,
+ classified_item,
+ configuration_item,
+ context_dependent_unit,
+ contract,
+ conversion_based_unit,
+ date_and_time,
+ date_and_time_assignment,
+ date_assignment,
+ derived_unit,
+ descriptive_representation_item,
+ directed_action,
+ document_file,
+ document_relationship,
+ effectivity,
+ event_occurrence,
+ executed_action,
+ general_property,
+ general_property_relationship,
+ group,
+ identification_assignment,
+ information_right,
+ information_usage_right,
+ language,
+ measure_representation_item,
+ measure_with_unit,
+ multi_language_attribute_assignment,
+ named_unit,
+ organization,
+ organization_relationship,
+ organizational_address,
+ organizational_project,
+ organizational_project_relationship,
+ person,
+ person_and_organization_address,
+ product,
+ product_concept,
+ product_definition,
+ product_definition_context,
+ product_definition_formation,
+ product_definition_formation_relationship,
+ product_definition_relationship,
+ property_definition,
+ property_definition_representation,
+ representation,
+ representation_context,
+ representation_item,
+ security_classification,
+ uncertainty_measure_with_unit,
+ usage_association,
+ versioned_action_request);
+END_TYPE;
+
+TYPE classified_item = SELECT (
+ product,
+ product_definition,
+ product_definition_formation);
+END_TYPE;
+
+TYPE compound_item_definition = SELECT (
+ list_representation_item,
+ set_representation_item);
+END_TYPE;
+
+TYPE conductance_measure = REAL;
+END_TYPE;
+
+TYPE configuration_design_item = SELECT (
+ product_definition,
+ product_definition_formation);
+END_TYPE;
+
+TYPE configured_effectivity_context_item = SELECT (
+ product_concept_feature_association);
+END_TYPE;
+
+TYPE configured_effectivity_item = SELECT (
+ product_definition);
+END_TYPE;
+
+TYPE constructive_geometry_representation_or_shape_represenation = SELECT (
+ constructive_geometry_representation,
+ shape_representation);
+END_TYPE;
+
+TYPE context_dependent_measure = REAL;
+END_TYPE;
+
+TYPE contract_item = SELECT (
+ action_directive,
+ alternate_product_relationship,
+ directed_action,
+ executed_action,
+ information_usage_right,
+ organization,
+ person_and_organization,
+ product,
+ product_definition_formation);
+END_TYPE;
+
+TYPE contracted_item = SELECT (
+ product_definition_formation);
+END_TYPE;
+
+TYPE count_measure = NUMBER;
+END_TYPE;
+
+TYPE csg_primitive = SELECT (
+ sphere,
+ block,
+ right_angular_wedge,
+ torus,
+ right_circular_cone,
+ right_circular_cylinder);
+END_TYPE;
+
+TYPE csg_select = SELECT (
+ boolean_result,
+ csg_primitive);
+END_TYPE;
+
+TYPE curve_font_or_scaled_curve_font_select = SELECT (
+ curve_style_font_select,
+ curve_style_font_and_scaling);
+END_TYPE;
+
+TYPE curve_on_surface = SELECT (
+ pcurve,
+ surface_curve,
+ composite_curve_on_surface);
+END_TYPE;
+
+TYPE curve_or_annotation_curve_occurrence = SELECT (
+ curve,
+ annotation_curve_occurrence);
+END_TYPE;
+
+TYPE curve_or_render = SELECT (
+ curve_style,
+ curve_style_rendering);
+END_TYPE;
+
+TYPE curve_style_font_select = SELECT (
+ curve_style_font,
+ pre_defined_curve_font,
+ externally_defined_curve_font);
+END_TYPE;
+
+TYPE date_and_time_item = SELECT (
+ action,
+ action_directive,
+ applied_action_assignment,
+ applied_organization_assignment,
+ applied_person_and_organization_assignment,
+ applied_security_classification_assignment,
+ approval_person_organization,
+ certification,
+ contract,
+ directed_action,
+ document,
+ document_file,
+ event_occurrence,
+ executed_action,
+ information_usage_right,
+ organizational_project,
+ product_definition,
+ product_definition_formation,
+ product_definition_relationship,
+ rule_action,
+ security_classification,
+ versioned_action_request);
+END_TYPE;
+
+TYPE date_item = SELECT (
+ action,
+ action_directive,
+ applied_action_assignment,
+ applied_organization_assignment,
+ applied_person_and_organization_assignment,
+ applied_security_classification_assignment,
+ approval_person_organization,
+ certification,
+ contract,
+ directed_action,
+ document,
+ document_file,
+ event_occurrence,
+ executed_action,
+ information_usage_right,
+ organizational_project,
+ product_definition,
+ product_definition_formation,
+ product_definition_relationship,
+ security_classification,
+ versioned_action_request);
+END_TYPE;
+
+TYPE date_time_item = SELECT (
+ approval_person_organization,
+ certification,
+ change,
+ change_request,
+ contract,
+ product_definition,
+ security_classification,
+ start_request,
+ start_work);
+END_TYPE;
+
+TYPE date_time_or_event_occurrence = SELECT (
+ date_time_select,
+ event_occurrence);
+END_TYPE;
+
+TYPE date_time_select = SELECT (
+ date,
+ date_and_time,
+ local_time);
+END_TYPE;
+
+TYPE day_in_month_number = INTEGER;
+WHERE
+ WR1 : {1 <= SELF <= 31};
+END_TYPE;
+
+TYPE day_in_week_number = INTEGER;
+WHERE
+ WR1 : { 1 <= SELF <= 7 };
+END_TYPE;
+
+TYPE day_in_year_number = INTEGER;
+WHERE
+ WR1 : {1 <= SELF <= 366};
+END_TYPE;
+
+TYPE defined_symbol_select = SELECT (
+ pre_defined_symbol,
+ externally_defined_symbol);
+END_TYPE;
+
+TYPE derived_property_select = SELECT (
+ property_definition,
+ action_property);
+END_TYPE;
+
+TYPE description_attribute_select = SELECT (
+ action_request_solution,
+ application_context,
+ approval_role,
+ configuration_design,
+ date_role,
+ date_time_role,
+ context_dependent_shape_representation,
+ effectivity,
+ external_source,
+ organization_role,
+ person_and_organization_role,
+ person_and_organization,
+ property_definition_representation,
+ representation);
+END_TYPE;
+
+TYPE descriptive_measure = STRING;
+END_TYPE;
+
+TYPE dimension_count = INTEGER;
+WHERE
+ WR1 : SELF > 0;
+END_TYPE;
+
+TYPE dimension_extent_usage = ENUMERATION OF (
+ origin,
+ target );
+END_TYPE;
+
+TYPE dimensional_characteristic = SELECT (
+ dimensional_location,
+ dimensional_size);
+END_TYPE;
+
+TYPE direction_count_select = SELECT (
+ u_direction_count,
+ v_direction_count);
+END_TYPE;
+
+TYPE document_identifier_assigned_item = SELECT (
+ document);
+END_TYPE;
+
+TYPE document_reference_item = SELECT (
+ action_method,
+ applied_external_identification_assignment,
+ assembly_component_usage,
+ characterized_class,
+ characterized_object,
+ configuration_item,
+ descriptive_representation_item,
+ dimensional_size,
+ executed_action,
+ externally_defined_dimension_definition,
+ externally_defined_item,
+ group,
+ group_relationship,
+ information_right,
+ information_usage_right,
+ material_designation,
+ measure_representation_item,
+ product,
+ product_category,
+ product_definition,
+ product_definition_formation,
+ product_definition_formation_relationship,
+ product_definition_relationship,
+ property_definition,
+ representation,
+ representation_item,
+ rule_set,
+ shape_aspect,
+ shape_aspect_relationship,
+ usage_association,
+ versioned_action_request);
+END_TYPE;
+
+TYPE dose_equivalent_measure = REAL;
+END_TYPE;
+
+TYPE draughting_callout_element = SELECT (
+ annotation_text_occurrence,
+ annotation_symbol_occurrence,
+ annotation_curve_occurrence);
+END_TYPE;
+
+TYPE draughting_model_item_association_select = SELECT (
+ annotation_occurrence,
+ draughting_callout);
+END_TYPE;
+
+TYPE draughting_model_item_select = SELECT (
+ mapped_item,
+ styled_item,
+ axis2_placement,
+ camera_model,
+ draughting_callout);
+END_TYPE;
+
+TYPE draughting_titled_item = SELECT (
+ drawing_revision,
+ drawing_sheet_revision);
+END_TYPE;
+
+TYPE effectivity_item = SELECT (
+ assembly_component_usage_substitute,
+ product,
+ product_definition,
+ product_definition_formation,
+ product_definition_relationship,
+ product_definition_substitute);
+END_TYPE;
+
+TYPE electric_charge_measure = REAL;
+END_TYPE;
+
+TYPE electric_current_measure = REAL;
+END_TYPE;
+
+TYPE electric_potential_measure = REAL;
+END_TYPE;
+
+TYPE energy_measure = REAL;
+END_TYPE;
+
+TYPE event_occurrence_item = SELECT (
+ organizational_project);
+END_TYPE;
+
+TYPE external_identification_item = SELECT (
+ action_relationship,
+ action_request_status,
+ applied_organization_assignment,
+ applied_person_and_organization_assignment,
+ approval,
+ approval_status,
+ date_and_time_assignment,
+ date_assignment,
+ document_file,
+ external_source,
+ externally_defined_class,
+ externally_defined_context_dependent_unit,
+ externally_defined_conversion_based_unit,
+ externally_defined_general_property,
+ externally_defined_picture_representation_item,
+ externally_defined_representation_item,
+ organizational_address,
+ product_definition,
+ security_classification,
+ trimmed_curve,
+ versioned_action_request);
+END_TYPE;
+
+TYPE fill_area_style_tile_shape_select = SELECT (
+ fill_area_style_tile_curve_with_style,
+ fill_area_style_tile_coloured_region,
+ fill_area_style_tile_symbol_with_style,
+ pre_defined_tile,
+ externally_defined_tile);
+END_TYPE;
+
+TYPE fill_style_select = SELECT (
+ fill_area_style_colour,
+ externally_defined_tile_style,
+ fill_area_style_tiles,
+ externally_defined_hatch_style,
+ fill_area_style_hatching);
+END_TYPE;
+
+TYPE font_select = SELECT (
+ pre_defined_text_font,
+ externally_defined_text_font,
+ text_font);
+END_TYPE;
+
+TYPE force_measure = REAL;
+END_TYPE;
+
+TYPE founded_item_select = SELECT (
+ founded_item,
+ representation_item);
+END_TYPE;
+
+TYPE frequency_measure = REAL;
+END_TYPE;
+
+TYPE generalized_surface_select = SELECT (
+ surface,
+ face_surface,
+ surfaced_open_shell);
+END_TYPE;
+
+TYPE geometric_item_specific_usage_select = SELECT (
+ shape_aspect,
+ shape_aspect_relationship);
+END_TYPE;
+
+TYPE geometric_set_select = SELECT (
+ point,
+ curve,
+ surface);
+END_TYPE;
+
+TYPE groupable_item = SELECT (
+ geometric_representation_item,
+ group_relationship,
+ mapped_item,
+ package_product_concept_feature,
+ product_concept_feature,
+ product_definition,
+ product_definition_formation,
+ property_definition_representation,
+ representation,
+ representation_item,
+ representation_relationship_with_transformation,
+ shape_aspect,
+ shape_aspect_relationship,
+ shape_representation_relationship,
+ styled_item,
+ topological_representation_item);
+WHERE
+ WR1 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GROUP' IN TYPEOF(SELF));
+END_TYPE;
+
+TYPE hour_in_day = INTEGER;
+WHERE
+ WR1 : { 0 <= SELF < 24 };
+END_TYPE;
+
+TYPE id_attribute_select = SELECT (
+ action,
+ address,
+ product_category,
+ property_definition,
+ shape_aspect,
+ shape_aspect_relationship,
+ application_context,
+ group,
+ organizational_project,
+ representation);
+END_TYPE;
+
+TYPE identification_item = SELECT (
+ approval_status,
+ characterized_class,
+ class,
+ configuration_item,
+ contract,
+ dimensional_size,
+ document_file,
+ general_property,
+ group,
+ group_relationship,
+ information_right,
+ information_usage_right,
+ material_designation,
+ organization,
+ person_and_organization,
+ product,
+ product_category,
+ product_class,
+ product_concept,
+ product_concept_feature,
+ product_definition,
+ product_definition_formation,
+ product_identification,
+ representation,
+ rule_set,
+ security_classification,
+ security_classification_level,
+ shape_aspect_relationship,
+ shape_representation,
+ usage_association);
+END_TYPE;
+
+TYPE identifier = STRING;
+END_TYPE;
+
+TYPE illuminance_measure = REAL;
+END_TYPE;
+
+TYPE inductance_measure = REAL;
+END_TYPE;
+
+TYPE instance_usage_context_select = SELECT (
+ product_definition_relationship,
+ product_definition_usage);
+END_TYPE;
+
+TYPE invisibility_context = SELECT (
+ draughting_model,
+ presentation_representation,
+ presentation_set);
+END_TYPE;
+
+TYPE invisible_item = SELECT (
+ draughting_callout,
+ presentation_layer_assignment,
+ representation,
+ styled_item);
+END_TYPE;
+
+TYPE ir_usage_item = action_items;
+WHERE
+ wr1 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONFIGURATION_EFFECTIVITY' IN TYPEOF(SELF));
+END_TYPE;
+
+TYPE knot_type = ENUMERATION OF (
+ uniform_knots,
+ quasi_uniform_knots,
+ piecewise_bezier_knots,
+ unspecified );
+END_TYPE;
+
+TYPE label = STRING;
+END_TYPE;
+
+TYPE layered_item = SELECT (
+ presentation_representation,
+ representation_item);
+END_TYPE;
+
+TYPE length_measure = REAL;
+END_TYPE;
+
+TYPE limit_condition = ENUMERATION OF (
+ maximum_material_condition,
+ least_material_condition,
+ regardless_of_feature_size );
+END_TYPE;
+
+TYPE list_of_reversible_topology_item = LIST [0:?] OF reversible_topology_item;
+END_TYPE;
+
+TYPE list_representation_item = LIST [1:?] OF representation_item;
+END_TYPE;
+
+TYPE luminous_flux_measure = REAL;
+END_TYPE;
+
+TYPE luminous_intensity_measure = REAL;
+END_TYPE;
+
+TYPE magnetic_flux_density_measure = REAL;
+END_TYPE;
+
+TYPE magnetic_flux_measure = REAL;
+END_TYPE;
+
+TYPE marker_select = SELECT (
+ marker_type,
+ pre_defined_marker);
+END_TYPE;
+
+TYPE marker_type = ENUMERATION OF (
+ dot,
+ x,
+ plus,
+ asterisk,
+ ring,
+ square,
+ triangle );
+END_TYPE;
+
+TYPE mass_measure = REAL;
+END_TYPE;
+
+TYPE measure_value = SELECT (
+ absorbed_dose_measure,
+ dose_equivalent_measure,
+ radioactivity_measure,
+ acceleration_measure,
+ amount_of_substance_measure,
+ area_measure,
+ celsius_temperature_measure,
+ context_dependent_measure,
+ count_measure,
+ descriptive_measure,
+ capacitance_measure,
+ electric_charge_measure,
+ conductance_measure,
+ electric_current_measure,
+ electric_potential_measure,
+ energy_measure,
+ magnetic_flux_density_measure,
+ force_measure,
+ frequency_measure,
+ illuminance_measure,
+ inductance_measure,
+ length_measure,
+ luminous_flux_measure,
+ luminous_intensity_measure,
+ magnetic_flux_measure,
+ mass_measure,
+ numeric_measure,
+ non_negative_length_measure,
+ parameter_value,
+ plane_angle_measure,
+ positive_length_measure,
+ positive_plane_angle_measure,
+ positive_ratio_measure,
+ power_measure,
+ pressure_measure,
+ ratio_measure,
+ resistance_measure,
+ solid_angle_measure,
+ thermodynamic_temperature_measure,
+ time_measure,
+ velocity_measure,
+ volume_measure);
+END_TYPE;
+
+TYPE mechanical_design_and_draughting_relationship_select = SELECT (
+ draughting_model,
+ mechanical_design_geometric_presentation_representation,
+ mechanical_design_presentation_representation_with_draughting,
+ mechanical_design_shaded_presentation_representation,
+ shape_representation);
+END_TYPE;
+
+TYPE mechanical_design_geometric_presentation_area_items = SELECT (
+ axis2_placement,
+ mapped_item);
+END_TYPE;
+
+TYPE mechanical_design_geometric_presentation_representation_items = SELECT (
+ axis2_placement,
+ camera_model_d3,
+ mapped_item,
+ styled_item);
+END_TYPE;
+
+TYPE message = STRING;
+END_TYPE;
+
+TYPE minute_in_hour = INTEGER;
+WHERE
+ WR1 : { 0 <= SELF <= 59 };
+END_TYPE;
+
+TYPE month_in_year_number = INTEGER;
+WHERE
+ WR1 : { 1 <= SELF <= 12 };
+END_TYPE;
+
+TYPE multi_language_attribute_item = SELECT (
+ alternate_product_relationship,
+ application_context,
+ applied_certification_assignment,
+ applied_document_reference,
+ applied_document_usage_constraint_assignment,
+ applied_external_identification_assignment,
+ applied_identification_assignment,
+ applied_organizational_project_assignment,
+ approval,
+ approval_relationship,
+ approval_status,
+ assembly_component_usage_substitute,
+ attribute_value_assignment,
+ certification,
+ certification_type,
+ colour,
+ configuration_design,
+ configuration_item,
+ contract,
+ date_role,
+ date_time_role,
+ descriptive_representation_item,
+ document_relationship,
+ document_usage_role,
+ effectivity,
+ effectivity_relationship,
+ event_occurrence,
+ external_source,
+ general_property,
+ general_property_relationship,
+ geometric_representation_item,
+ geometric_tolerance,
+ identification_role,
+ information_right,
+ information_usage_right,
+ make_from_usage_option,
+ mapped_item,
+ object_role,
+ organization_relationship,
+ organization_role,
+ organizational_project,
+ organizational_project_relationship,
+ organizational_project_role,
+ person_and_organization,
+ person_and_organization_role,
+ product,
+ product_concept,
+ product_concept_relationship,
+ product_definition,
+ product_definition_context,
+ product_definition_formation,
+ product_definition_formation_relationship,
+ product_definition_relationship,
+ product_definition_shape,
+ product_related_product_category,
+ property_definition,
+ representation,
+ representation_relationship,
+ security_classification,
+ security_classification_assignment,
+ shape_aspect,
+ shape_aspect_relationship,
+ shape_representation,
+ time_interval_role,
+ topological_representation_item,
+ uncertainty_measure_with_unit,
+ usage_association);
+END_TYPE;
+
+TYPE name_attribute_select = SELECT (
+ action_request_solution,
+ address,
+ configuration_design,
+ context_dependent_shape_representation,
+ derived_unit,
+ effectivity,
+ person_and_organization,
+ product_definition,
+ product_definition_substitute,
+ property_definition_representation);
+END_TYPE;
+
+TYPE name_item = SELECT (
+ assembly_component_usage,
+ external_class_library,
+ group,
+ group_relationship,
+ product,
+ product_definition);
+END_TYPE;
+
+TYPE non_negative_length_measure = length_measure;
+WHERE
+ WR1 : SELF >= 0.0;
+END_TYPE;
+
+TYPE nonnegative_integer = INTEGER;
+WHERE
+ nonnegativity : SELF >= 0;
+END_TYPE;
+
+TYPE null_style = ENUMERATION OF (
+ null );
+END_TYPE;
+
+TYPE numeric_measure = NUMBER;
+END_TYPE;
+
+TYPE organization_item = SELECT (
+ action,
+ action_directive,
+ alternate_product_relationship,
+ applied_action_assignment,
+ applied_classification_assignment,
+ applied_identification_assignment,
+ applied_security_classification_assignment,
+ approval,
+ assembly_component_usage_substitute,
+ certification,
+ class,
+ configuration_item,
+ contract,
+ document_file,
+ executed_action,
+ general_property,
+ information_usage_right,
+ organizational_project,
+ product,
+ product_definition,
+ product_definition_formation,
+ product_definition_formation_relationship,
+ property_definition,
+ rule_action,
+ security_classification,
+ shape_representation,
+ versioned_action_request);
+END_TYPE;
+
+TYPE orientation_basis_select = SELECT (
+ axis2_placement_3d,
+ min_and_major_ply_orientation_basis);
+END_TYPE;
+
+TYPE parameter_value = REAL;
+END_TYPE;
+
+TYPE pcurve_or_surface = SELECT (
+ pcurve,
+ surface);
+END_TYPE;
+
+TYPE person_and_organization_item = SELECT (
+ action,
+ action_directive,
+ alternate_product_relationship,
+ applied_action_assignment,
+ applied_classification_assignment,
+ applied_identification_assignment,
+ applied_security_classification_assignment,
+ approval,
+ assembly_component_usage_substitute,
+ certification,
+ configuration_item,
+ contract,
+ document_file,
+ executed_action,
+ general_property,
+ information_usage_right,
+ organizational_project,
+ person_and_organization,
+ product,
+ product_definition,
+ product_definition_formation,
+ product_definition_formation_relationship,
+ property_definition,
+ rule_action,
+ security_classification,
+ shape_representation,
+ versioned_action_request);
+END_TYPE;
+
+TYPE person_organization_select = SELECT (
+ person,
+ organization,
+ person_and_organization);
+END_TYPE;
+
+TYPE picture_representation_item_select = SELECT (
+ styled_item,
+ planar_box,
+ axis2_placement_2d);
+END_TYPE;
+
+TYPE plane_angle_measure = REAL;
+END_TYPE;
+
+TYPE plane_or_planar_box = SELECT (
+ plane,
+ planar_box);
+END_TYPE;
+
+TYPE point_and_vector_member = SELECT (
+ point,
+ direction);
+END_TYPE;
+
+TYPE point_and_vector_members = LIST [2:3] OF point_and_vector_member;
+END_TYPE;
+
+TYPE point_path_members = LIST [1:?] OF point_and_vector;
+END_TYPE;
+
+TYPE positive_integer = nonnegative_integer;
+WHERE
+ positivity : SELF > 0;
+END_TYPE;
+
+TYPE positive_length_measure = non_negative_length_measure;
+WHERE
+ WR1 : SELF > 0.0;
+END_TYPE;
+
+TYPE positive_plane_angle_measure = plane_angle_measure;
+WHERE
+ WR1 : SELF > 0.0;
+END_TYPE;
+
+TYPE positive_ratio_measure = ratio_measure;
+WHERE
+ WR1 : SELF > 0.0;
+END_TYPE;
+
+TYPE power_measure = REAL;
+END_TYPE;
+
+TYPE preferred_surface_curve_representation = ENUMERATION OF (
+ curve_3d,
+ pcurve_s1,
+ pcurve_s2 );
+END_TYPE;
+
+TYPE presentable_text = STRING;
+WHERE
+ WR1 : control_characters_free(SELF);
+END_TYPE;
+
+TYPE presentation_representation_select = SELECT (
+ presentation_representation,
+ presentation_set);
+END_TYPE;
+
+TYPE presentation_size_assignment_select = SELECT (
+ presentation_view,
+ presentation_area,
+ area_in_set);
+END_TYPE;
+
+TYPE presentation_style_select = SELECT (
+ point_style,
+ curve_style,
+ surface_style_usage,
+ symbol_style,
+ fill_area_style,
+ text_style,
+ null_style);
+END_TYPE;
+
+TYPE presented_item_select = SELECT (
+ action,
+ action_method,
+ action_relationship,
+ product_concept,
+ product_concept_feature,
+ product_concept_feature_category,
+ product_definition,
+ product_definition_formation,
+ product_definition_relationship);
+END_TYPE;
+
+TYPE pressure_measure = REAL;
+END_TYPE;
+
+TYPE product_definition_or_assembly_relationship = SELECT (
+ assembly_component_usage,
+ product_definition);
+END_TYPE;
+
+TYPE product_definition_or_breakdown_element_usage = SELECT (
+ product_definition,
+ product_definition_usage);
+END_TYPE;
+
+TYPE product_definition_or_product_definition_relationship = SELECT (
+ product_definition,
+ product_definition_usage);
+END_TYPE;
+
+TYPE product_or_formation_or_definition = SELECT (
+ product,
+ product_definition_formation,
+ product_definition);
+END_TYPE;
+
+TYPE project_item = SELECT (
+ executed_action,
+ product_concept);
+END_TYPE;
+
+TYPE radioactivity_measure = REAL;
+END_TYPE;
+
+TYPE ratio_measure = REAL;
+END_TYPE;
+
+TYPE rendering_properties_select = SELECT (
+ surface_style_reflectance_ambient,
+ surface_style_transparent);
+END_TYPE;
+
+TYPE represented_definition = SELECT (
+ general_property,
+ property_definition,
+ property_definition_relationship,
+ shape_aspect,
+ shape_aspect_relationship);
+END_TYPE;
+
+TYPE requirement_assigned_item = SELECT (
+ configuration_item,
+ descriptive_representation_item,
+ product,
+ product_class,
+ product_definition,
+ product_definition_formation,
+ product_definition_relationship,
+ representation,
+ shape_aspect);
+END_TYPE;
+
+TYPE requirement_satisfaction_item = SELECT (
+ requirement_assigned_item);
+END_TYPE;
+
+TYPE requirement_source_item = SELECT (
+ characterized_object,
+ group,
+ group_relationship,
+ product,
+ product_definition,
+ product_definition_formation,
+ product_definition_relationship,
+ shape_aspect);
+END_TYPE;
+
+TYPE resistance_measure = REAL;
+END_TYPE;
+
+TYPE reversible_topology = SELECT (
+ reversible_topology_item,
+ list_of_reversible_topology_item,
+ set_of_reversible_topology_item);
+END_TYPE;
+
+TYPE reversible_topology_item = SELECT (
+ edge,
+ path,
+ face,
+ face_bound,
+ closed_shell,
+ open_shell);
+END_TYPE;
+
+TYPE role_select = SELECT (
+ action_assignment,
+ action_request_assignment,
+ approval_assignment,
+ approval_date_time,
+ certification_assignment,
+ contract_assignment,
+ document_reference,
+ effectivity_assignment,
+ group_assignment,
+ name_assignment,
+ security_classification_assignment);
+END_TYPE;
+
+TYPE rule_superseded_item = SELECT (
+ product_definition_formation);
+END_TYPE;
+
+TYPE second_in_minute = REAL;
+WHERE
+ WR1 : { 0 <= SELF <= 60.0 };
+END_TYPE;
+
+TYPE security_classification_item = SELECT (
+ assembly_component_usage,
+ document,
+ document_file,
+ make_from_usage_option,
+ product,
+ product_definition,
+ product_definition_formation,
+ product_definition_usage);
+END_TYPE;
+
+TYPE set_of_reversible_topology_item = SET [0:?] OF reversible_topology_item;
+END_TYPE;
+
+TYPE set_representation_item = SET [1:?] OF representation_item;
+END_TYPE;
+
+TYPE shading_curve_method = ENUMERATION OF (
+ constant_colour,
+ linear_colour );
+END_TYPE;
+
+TYPE shading_surface_method = ENUMERATION OF (
+ constant_shading,
+ colour_shading,
+ dot_shading,
+ normal_shading );
+END_TYPE;
+
+TYPE shape_definition = SELECT (
+ product_definition_shape,
+ shape_aspect,
+ shape_aspect_relationship);
+END_TYPE;
+
+TYPE shell = SELECT (
+ vertex_shell,
+ wire_shell,
+ open_shell,
+ closed_shell);
+END_TYPE;
+
+TYPE si_prefix = ENUMERATION OF (
+ exa,
+ peta,
+ tera,
+ giga,
+ mega,
+ kilo,
+ hecto,
+ deca,
+ deci,
+ centi,
+ milli,
+ micro,
+ nano,
+ pico,
+ femto,
+ atto );
+END_TYPE;
+
+TYPE si_unit_name = ENUMERATION OF (
+ metre,
+ gram,
+ second,
+ ampere,
+ kelvin,
+ mole,
+ candela,
+ radian,
+ steradian,
+ hertz,
+ newton,
+ pascal,
+ joule,
+ watt,
+ coulomb,
+ volt,
+ farad,
+ ohm,
+ siemens,
+ weber,
+ tesla,
+ henry,
+ degree_Celsius,
+ lumen,
+ lux,
+ becquerel,
+ gray,
+ sievert );
+END_TYPE;
+
+TYPE size_select = SELECT (
+ positive_length_measure,
+ measure_with_unit,
+ descriptive_measure);
+END_TYPE;
+
+TYPE sketch_basis_select = SELECT (
+ curve_bounded_surface,
+ face_surface);
+END_TYPE;
+
+TYPE solid_angle_measure = REAL;
+END_TYPE;
+
+TYPE source = ENUMERATION OF (
+ made,
+ bought,
+ not_known );
+END_TYPE;
+
+TYPE source_item = SELECT (
+ identifier,
+ message);
+END_TYPE;
+
+TYPE start_request_item = SELECT (
+ product_definition_formation);
+END_TYPE;
+
+TYPE string_representation_item_select = SELECT (
+ descriptive_representation_item,
+ included_text_block,
+ structured_text_composition);
+END_TYPE;
+
+TYPE style_context_select = SELECT (
+ group,
+ presentation_layer_assignment,
+ presentation_set,
+ representation,
+ representation_item,
+ representation_relationship);
+END_TYPE;
+
+TYPE surface_side = ENUMERATION OF (
+ positive,
+ negative,
+ both );
+END_TYPE;
+
+TYPE surface_side_style_select = SELECT (
+ surface_side_style,
+ pre_defined_surface_side_style);
+END_TYPE;
+
+TYPE surface_style_element_select = SELECT (
+ surface_style_fill_area,
+ surface_style_boundary,
+ surface_style_silhouette,
+ surface_style_segmentation_curve,
+ surface_style_control_grid,
+ surface_style_parameter_line,
+ surface_style_rendering);
+END_TYPE;
+
+TYPE symbol_style_select = SELECT (
+ symbol_colour);
+END_TYPE;
+
+TYPE text = STRING;
+END_TYPE;
+
+TYPE text_alignment = label;
+END_TYPE;
+
+TYPE text_delineation = label;
+END_TYPE;
+
+TYPE text_or_character = SELECT (
+ annotation_text,
+ annotation_text_character,
+ composite_text,
+ text_literal);
+END_TYPE;
+
+TYPE text_path = ENUMERATION OF (
+ left,
+ right,
+ up,
+ down );
+END_TYPE;
+
+TYPE text_string_representation_item = SELECT (
+ text_literal,
+ annotation_text,
+ annotation_text_character,
+ composite_text,
+ axis2_placement);
+END_TYPE;
+
+TYPE thermodynamic_temperature_measure = REAL;
+END_TYPE;
+
+TYPE time_interval_item = SELECT (
+ action,
+ time_interval_based_effectivity);
+END_TYPE;
+
+TYPE time_measure = REAL;
+END_TYPE;
+
+TYPE tolerance_method_definition = SELECT (
+ tolerance_value,
+ limits_and_fits);
+END_TYPE;
+
+TYPE transformation = SELECT (
+ item_defined_transformation,
+ functionally_defined_transformation);
+END_TYPE;
+
+TYPE transition_code = ENUMERATION OF (
+ discontinuous,
+ continuous,
+ cont_same_gradient,
+ cont_same_gradient_same_curvature );
+END_TYPE;
+
+TYPE trim_condition_select = SELECT (
+ length_measure,
+ plane_angle_measure,
+ generalized_surface_select,
+ solid_model);
+END_TYPE;
+
+TYPE trim_intent = ENUMERATION OF (
+ blind,
+ offset,
+ through_all,
+ unspecified,
+ up_to_next );
+END_TYPE;
+
+TYPE trimming_preference = ENUMERATION OF (
+ cartesian,
+ parameter,
+ unspecified );
+END_TYPE;
+
+TYPE trimming_select = SELECT (
+ cartesian_point,
+ parameter_value);
+END_TYPE;
+
+TYPE u_direction_count = INTEGER;
+WHERE
+ WR1 : SELF > 1;
+END_TYPE;
+
+TYPE unit = SELECT (
+ derived_unit,
+ named_unit);
+END_TYPE;
+
+TYPE v_direction_count = INTEGER;
+WHERE
+ WR1 : SELF > 1;
+END_TYPE;
+
+TYPE value_qualifier = SELECT (
+ precision_qualifier,
+ type_qualifier,
+ uncertainty_qualifier);
+END_TYPE;
+
+TYPE vector_or_direction = SELECT (
+ vector,
+ direction);
+END_TYPE;
+
+TYPE velocity_measure = REAL;
+END_TYPE;
+
+TYPE volume_measure = REAL;
+END_TYPE;
+
+TYPE week_in_year_number = INTEGER;
+WHERE
+ WR1 : { 1 <= SELF <= 53 };
+END_TYPE;
+
+TYPE work_item = SELECT (
+ product_definition_formation);
+END_TYPE;
+
+TYPE year_number = INTEGER;
+END_TYPE;
+
+ENTITY absorbed_dose_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ABSORBED_DOSE_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY absorbed_dose_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) = dimensions_for_si_unit (si_unit_name.gray);
+END_ENTITY;
+
+
+ENTITY abstract_variable
+ SUBTYPE OF (property_definition, property_definition_representation, representation, representation_item);
+END_ENTITY;
+
+
+ENTITY acceleration_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ACCELERATION_UNIT' IN TYPEOF (SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY acceleration_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) =
+ dimensional_exponents ( 1.0, 0.0, -2.0, 0.0, 0.0, 0.0, 0.0 );
+END_ENTITY;
+
+
+ENTITY action;
+ name : label;
+ description : OPTIONAL text;
+ chosen_method : action_method;
+DERIVE
+ id : identifier := get_id_value(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY action_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_action : action;
+DERIVE
+ role : object_role := get_role(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ROLE_ASSOCIATION.ITEM_WITH_ROLE')) <= 1;
+END_ENTITY;
+
+
+ENTITY action_directive;
+ name : label;
+ description : OPTIONAL text;
+ analysis : text;
+ comment : text;
+ requests : SET [1:?] OF versioned_action_request;
+END_ENTITY;
+
+
+ENTITY action_method;
+ name : label;
+ description : OPTIONAL text;
+ consequence : text;
+ purpose : text;
+END_ENTITY;
+
+
+ENTITY action_method_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_action_method : action_method;
+ role : action_method_role;
+END_ENTITY;
+
+
+ENTITY action_method_relationship;
+ name : label;
+ description : OPTIONAL text;
+ relating_method : action_method;
+ related_method : action_method;
+END_ENTITY;
+
+
+ENTITY action_method_role;
+ name : label;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY action_property;
+ name : label;
+ description : text;
+ definition : characterized_action_definition;
+END_ENTITY;
+
+
+ENTITY action_property_representation;
+ name : label;
+ description : text;
+ property : action_property;
+ representation : representation;
+END_ENTITY;
+
+
+ENTITY action_relationship;
+ name : label;
+ description : OPTIONAL text;
+ relating_action : action;
+ related_action : action;
+END_ENTITY;
+
+
+ENTITY action_request_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_action_request : versioned_action_request;
+DERIVE
+ role : object_role := get_role(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ROLE_ASSOCIATION.ITEM_WITH_ROLE')) <= 1;
+END_ENTITY;
+
+
+ENTITY action_request_solution;
+ method : action_method;
+ request : versioned_action_request;
+DERIVE
+ description : text := get_description_value(SELF);
+ name : label := get_name_value(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
+ WR2 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'NAME_ATTRIBUTE.NAMED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY action_request_status;
+ status : label;
+ assigned_request : versioned_action_request;
+END_ENTITY;
+
+
+ENTITY action_status;
+ status : label;
+ assigned_action : executed_action;
+END_ENTITY;
+
+
+ENTITY address;
+ internal_location : OPTIONAL label;
+ street_number : OPTIONAL label;
+ street : OPTIONAL label;
+ postal_box : OPTIONAL label;
+ town : OPTIONAL label;
+ region : OPTIONAL label;
+ postal_code : OPTIONAL label;
+ country : OPTIONAL label;
+ facsimile_number : OPTIONAL label;
+ telephone_number : OPTIONAL label;
+ electronic_mail_address : OPTIONAL label;
+ telex_number : OPTIONAL label;
+DERIVE
+ name : label := get_name_value(SELF);
+ url : identifier := get_id_value(SELF);
+WHERE
+ WR1 : EXISTS(internal_location) OR EXISTS(street_number) OR EXISTS(street) OR EXISTS(postal_box) OR EXISTS(town) OR EXISTS(region) OR EXISTS(postal_code) OR EXISTS(country) OR EXISTS(facsimile_number) OR EXISTS(telephone_number) OR EXISTS(electronic_mail_address) OR EXISTS(telex_number);
+END_ENTITY;
+
+
+ENTITY advanced_brep_shape_representation
+ SUBTYPE OF (shape_representation);
+WHERE
+ WR1 : SIZEOF (
+QUERY ( it <* SELF.items| NOT ( SIZEOF ([ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MANIFOLD_SOLID_BREP', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACETED_BREP', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT_3D' ] * TYPEOF (it)) = 1) )) = 0;
+ WR2 : SIZEOF (
+QUERY ( it <* SELF.items| ( SIZEOF ([ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MANIFOLD_SOLID_BREP', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' ] * TYPEOF (it)) = 1) )) > 0;
+ WR3 : SIZEOF (
+QUERY ( msb <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MANIFOLD_SOLID_BREP' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( csh <* msb_shells(msb)| NOT ( SIZEOF (
+QUERY ( fcs <* csh\connected_face_set.cfs_faces| NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF (fcs)) )) = 0) )) = 0) )) = 0;
+ WR4 : SIZEOF (
+QUERY ( msb <*
+QUERY ( it <* items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MANIFOLD_SOLID_BREP' IN TYPEOF (it)) )| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORIENTED_CLOSED_SHELL' IN TYPEOF (msb\manifold_solid_brep.outer)) )) = 0;
+ WR5 : SIZEOF (
+QUERY ( brv <*
+QUERY ( it <* items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.BREP_WITH_VOIDS' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( csh <* brv\brep_with_voids.voids| csh\oriented_closed_shell.orientation )) = 0) )) = 0;
+ WR6 : SIZEOF (
+QUERY ( mi <*
+QUERY ( it <* items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' IN TYPEOF (it)) )| NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_BREP_SHAPE_REPRESENTATION' IN TYPEOF (mi\mapped_item.mapping_source.mapped_representation)) )) = 0;
+END_ENTITY;
+
+
+ENTITY advanced_face
+ SUBTYPE OF (face_surface);
+WHERE
+ WR1 : SIZEOF ([ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ELEMENTARY_SURFACE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_SURFACE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SWEPT_SURFACE' ] * TYPEOF (face_geometry)) = 1;
+ WR2 : SIZEOF (
+QUERY ( elp_fbnds <*
+QUERY ( bnds <* bounds| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (bnds.bound)) )| NOT ( SIZEOF (
+QUERY ( oe <* elp_fbnds.bound\path.edge_list| NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_CURVE' IN TYPEOF (oe\oriented_edge.edge_element)) )) = 0) )) = 0;
+ WR3 : SIZEOF (
+QUERY ( elp_fbnds <*
+QUERY ( bnds <* bounds| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (bnds.bound)) )| NOT ( SIZEOF (
+QUERY ( oe <* elp_fbnds.bound\path.edge_list| NOT ( SIZEOF ([ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LINE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONIC', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_CURVE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_CURVE' ] * TYPEOF (oe.edge_element\edge_curve.edge_geometry)) = 1) )) = 0) )) = 0;
+ WR4 : SIZEOF (
+QUERY ( elp_fbnds <*
+QUERY ( bnds <* bounds| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (bnds.bound)) )| NOT ( SIZEOF (
+QUERY ( oe <* elp_fbnds.bound\path.edge_list| NOT ((('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN TYPEOF (oe\edge.edge_start)) AND ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CARTESIAN_POINT' IN TYPEOF (oe\edge.edge_start\vertex_point.vertex_geometry))) AND (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN TYPEOF (oe\edge.edge_end)) AND ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CARTESIAN_POINT' IN TYPEOF (oe\edge.edge_end\vertex_point.vertex_geometry)))) )) = 0) )) = 0;
+ WR5 : SIZEOF (
+QUERY ( elp_fbnds <*
+QUERY ( bnds <* bounds| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (bnds.bound)) )| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORIENTED_PATH' IN TYPEOF (elp_fbnds.bound)) )) = 0;
+ WR6 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SWEPT_SURFACE' IN TYPEOF (face_geometry)) OR ( SIZEOF ([ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LINE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONIC', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_CURVE' ] * TYPEOF (face_geometry\swept_surface.swept_curve)) = 1);
+ WR7 : SIZEOF (
+QUERY ( vlp_fbnds <*
+QUERY ( bnds <* bounds| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_LOOP' IN TYPEOF (bnds.bound)) )| NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN TYPEOF (vlp_fbnds\face_bound.bound\vertex_loop.loop_vertex)) AND ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CARTESIAN_POINT' IN TYPEOF (vlp_fbnds\face_bound.bound\vertex_loop.loop_vertex\vertex_point.vertex_geometry))) )) = 0;
+ WR8 : SIZEOF (
+QUERY ( bnd <* bounds| NOT ( SIZEOF ([ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_LOOP' ] * TYPEOF (bnd.bound)) = 1) )) = 0;
+ WR9 : SIZEOF (
+QUERY ( elp_fbnds <*
+QUERY ( bnds <* bounds| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (bnds.bound)) )| NOT ( SIZEOF (
+QUERY ( oe <* elp_fbnds.bound\path.edge_list| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_CURVE' IN TYPEOF (oe\oriented_edge.edge_element\edge_curve.edge_geometry)) AND NOT ( SIZEOF (
+QUERY ( sc_ag <* oe.edge_element\edge_curve.edge_geometry\surface_curve.associated_geometry| NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE' IN TYPEOF (sc_ag)) )) = 0) )) = 0) )) = 0;
+ WR10 : (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SWEPT_SURFACE' IN TYPEOF (face_geometry)) OR (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE' IN TYPEOF (face_geometry\swept_surface.swept_curve)) OR ( SIZEOF (face_geometry\swept_surface.swept_curve\polyline.points) >= 3))) AND ( SIZEOF (
+QUERY ( elp_fbnds <*
+QUERY ( bnds <* bounds| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (bnds.bound)) )| NOT ( SIZEOF (
+QUERY ( oe <* elp_fbnds.bound\path.edge_list| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE' IN TYPEOF (oe\oriented_edge.edge_element\edge_curve.edge_geometry)) AND NOT ( SIZEOF (oe\oriented_edge.edge_element\edge_curve.edge_geometry\polyline.points) >= 3) )) = 0) )) = 0);
+END_ENTITY;
+
+
+ENTITY alternate_product_relationship;
+ name : label;
+ definition : OPTIONAL text;
+ alternate : product;
+ base : product;
+ basis : text;
+UNIQUE
+ UR1 : alternate, base;
+WHERE
+ WR1 : alternate :<>: base;
+END_ENTITY;
+
+
+ENTITY amount_of_substance_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AMOUNT_OF_SUBSTANCE_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY amount_of_substance_unit
+ SUBTYPE OF (named_unit);
+WHERE
+ WR1 : (SELF\named_unit.dimensions.length_exponent = 0.0) AND (SELF\named_unit.dimensions.mass_exponent = 0.0) AND (SELF\named_unit.dimensions.time_exponent = 0.0) AND (SELF\named_unit.dimensions.electric_current_exponent = 0.0) AND (SELF\named_unit.dimensions.thermodynamic_temperature_exponent = 0.0) AND (SELF\named_unit.dimensions.amount_of_substance_exponent = 1.0) AND (SELF\named_unit.dimensions.luminous_intensity_exponent = 0.0);
+END_ENTITY;
+
+
+ENTITY angle_direction_reference
+ SUBTYPE OF (representation_item_relationship, geometric_representation_item);
+ SELF\representation_item_relationship.related_representation_item : angle_direction_reference_select;
+ SELF\representation_item_relationship.relating_representation_item : orientation_basis_select;
+WHERE
+ WR1 : ((('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_PATH' IN TYPEOF(related_representation_item)) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MIN_AND_MAJOR_PLY_ORIENTATION_BASIS' IN TYPEOF(relating_representation_item)))
+ OR
+ (NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_PATH' IN TYPEOF(related_representation_item)) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT_3D' IN TYPEOF(relating_representation_item))));
+END_ENTITY;
+
+
+ENTITY angular_dimension
+ SUBTYPE OF (dimension_curve_directed_callout);
+END_ENTITY;
+
+
+ENTITY angular_location
+ SUBTYPE OF (dimensional_location);
+ angle_selection : angle_relator;
+END_ENTITY;
+
+
+ENTITY angular_size
+ SUBTYPE OF (dimensional_size);
+ angle_selection : angle_relator;
+END_ENTITY;
+
+
+ENTITY angularity_tolerance
+ SUBTYPE OF (geometric_tolerance_with_datum_reference);
+WHERE
+ WR1 : SIZEOF (SELF\geometric_tolerance_with_datum_reference.datum_system) < 3;
+END_ENTITY;
+
+
+ENTITY annotation_curve_occurrence
+ SUBTYPE OF (annotation_occurrence);
+ SELF\styled_item.item : curve;
+END_ENTITY;
+
+
+ENTITY annotation_fill_area
+ SUBTYPE OF (geometric_representation_item);
+ boundaries : SET [1:?] OF curve;
+WHERE
+ WR1 : (SELF\geometric_representation_item.dim = 3) OR (SIZEOF (QUERY (curve <* SELF.boundaries |
+ NOT (
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CIRCLE' IN TYPEOF (curve)) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ELLIPSE' IN TYPEOF (curve)) OR
+ ( ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_CURVE' IN TYPEOF (curve))
+ AND (curve\b_spline_curve.closed_curve = TRUE) ) OR
+ ( ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPOSITE_CURVE' IN TYPEOF (curve))
+ AND (curve\composite_curve.closed_curve = TRUE) ) OR
+ ( ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE' IN TYPEOF (curve))
+ AND (curve\polyline.points[LOINDEX(curve\polyline.points)] =
+ curve\polyline.points[HIINDEX(curve\polyline.points)]) )
+ ) )) = 0);
+END_ENTITY;
+
+
+ENTITY annotation_fill_area_occurrence
+ SUBTYPE OF (annotation_occurrence);
+ fill_style_target : point;
+ SELF\styled_item.item : annotation_fill_area;
+END_ENTITY;
+
+
+ENTITY annotation_occurrence
+ SUPERTYPE OF (ONEOF (annotation_curve_occurrence, annotation_fill_area_occurrence, annotation_text_occurrence, annotation_symbol_occurrence))
+ SUBTYPE OF (styled_item);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_REPRESENTATION_ITEM' IN
+ TYPEOF (SELF);
+ WR2 : SIZEOF (QUERY (reps <* using_representations(SELF) |
+ NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_REPRESENTATION_SELECT' IN TYPEOF(reps)))) = 0;
+END_ENTITY;
+
+
+ENTITY annotation_occurrence_associativity
+ SUBTYPE OF (annotation_occurrence_relationship);
+WHERE
+ WR1 : SIZEOF (TYPEOF (SELF.related_annotation_occurrence) *
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_FILL_AREA_OCCURRENCE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PROJECTION_CURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LEADER_CURVE']) = 1;
+END_ENTITY;
+
+
+ENTITY annotation_occurrence_relationship;
+ name : label;
+ description : text;
+ relating_annotation_occurrence : annotation_occurrence;
+ related_annotation_occurrence : annotation_occurrence;
+END_ENTITY;
+
+
+ENTITY annotation_plane
+ SUBTYPE OF (annotation_occurrence, geometric_representation_item);
+ elements : OPTIONAL SET [1:?] OF annotation_plane_element;
+ SELF\styled_item.item : plane_or_planar_box;
+WHERE
+ WR1 : SELF\geometric_representation_item.dim = 3;
+ WR2 : NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'PLANAR_BOX' IN TYPEOF(SELF\styled_item.item)) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'AXIS2_PLACEMENT_3D' IN TYPEOF(SELF\styled_item.item\planar_box.placement));
+ WR3 : (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'PLANAR_BOX' IN TYPEOF(SELF\styled_item.item)) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'CURVE_STYLE' IN TYPEOF(SELF\styled_item.styles[1]\presentation_style_assignment.styles[1]))) OR
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'PLANE' IN TYPEOF(SELF\styled_item.item)) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'FILL_AREA_STYLE' IN TYPEOF(SELF\styled_item.styles[1]\presentation_style_assignment.styles[1])));
+ WR4 : (SIZEOF(SELF\styled_item.styles) = 1) AND
+ (SIZEOF(SELF\styled_item.styles[1]\presentation_style_assignment.styles) = 1);
+END_ENTITY;
+
+
+ENTITY annotation_subfigure_occurrence
+ SUBTYPE OF (annotation_symbol_occurrence);
+WHERE
+ WR1 : SIZEOF (QUERY (sty <* SELF.styles |
+ NOT (SIZEOF (sty.styles) = 1)
+ )) = 0;
+ WR2 : SIZEOF (QUERY (sty <* SELF.styles |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.NULL_STYLE'
+ IN TYPEOF (sty.styles[1])) ))=0;
+ WR3 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_SYMBOL'
+ IN TYPEOF (SELF.item));
+ WR4 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DRAUGHTING_SUBFIGURE_REPRESENTATION'
+ IN TYPEOF
+ (SELF.item\mapped_item.mapping_source.mapped_representation));
+END_ENTITY;
+
+
+ENTITY annotation_symbol
+ SUBTYPE OF (mapped_item);
+ SELF\mapped_item.mapping_source : symbol_representation_map;
+ SELF\mapped_item.mapping_target : symbol_target;
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_REPRESENTATION_ITEM' IN
+ TYPEOF (SELF);
+END_ENTITY;
+
+
+ENTITY annotation_symbol_occurrence
+ SUBTYPE OF (annotation_occurrence);
+ SELF\styled_item.item : annotation_symbol_occurrence_item;
+END_ENTITY;
+
+
+ENTITY annotation_text
+ SUBTYPE OF (mapped_item);
+ SELF\mapped_item.mapping_target : axis2_placement;
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TEXT_STRING_REPRESENTATION' IN
+ TYPEOF( SELF\mapped_item.mapping_source.mapped_representation);
+ WR2 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_REPRESENTATION_ITEM' IN
+ TYPEOF( SELF);
+END_ENTITY;
+
+
+ENTITY annotation_text_character
+ SUBTYPE OF (mapped_item);
+ alignment : text_alignment;
+ SELF\mapped_item.mapping_target : axis2_placement;
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CHARACTER_GLYPH_SYMBOL' IN
+ TYPEOF (SELF\mapped_item.mapping_source.mapped_representation);
+ WR2 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_REPRESENTATION_ITEM' IN
+ TYPEOF (SELF);
+END_ENTITY;
+
+
+ENTITY annotation_text_occurrence
+ SUBTYPE OF (annotation_occurrence);
+ SELF\styled_item.item : annotation_text_occurrence_item;
+END_ENTITY;
+
+
+ENTITY apex
+ SUBTYPE OF (derived_shape_aspect);
+END_ENTITY;
+
+
+ENTITY application_context;
+ application : label;
+DERIVE
+ description : text := get_description_value(SELF);
+ id : identifier := get_id_value(SELF);
+INVERSE
+ context_elements: SET [1:?] OF application_context_element FOR frame_of_reference;
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
+ WR2 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY application_context_element
+ SUPERTYPE OF (ONEOF (product_concept_context, product_context, product_definition_context));
+ name : label;
+ frame_of_reference : application_context;
+END_ENTITY;
+
+
+ENTITY application_protocol_definition;
+ status : label;
+ application_interpreted_model_schema_name : label;
+ application_protocol_year : year_number;
+ application : application_context;
+END_ENTITY;
+
+
+ENTITY applied_action_assignment
+ SUBTYPE OF (action_assignment);
+ items : SET [1:?] OF action_items;
+END_ENTITY;
+
+
+ENTITY applied_action_method_assignment
+ SUBTYPE OF (action_method_assignment);
+ items : SET [1:?] OF action_method_items;
+END_ENTITY;
+
+
+ENTITY applied_action_request_assignment
+ SUBTYPE OF (action_request_assignment);
+ items : SET [1:?] OF action_request_item;
+END_ENTITY;
+
+
+ENTITY applied_approval_assignment
+ SUBTYPE OF (approval_assignment);
+ items : SET [1:?] OF approval_item;
+END_ENTITY;
+
+
+ENTITY applied_attribute_classification_assignment
+ SUBTYPE OF (attribute_classification_assignment);
+ items : SET [1:?] OF attribute_classification_item;
+ SELF\attribute_classification_assignment.assigned_class : class;
+END_ENTITY;
+
+
+ENTITY applied_certification_assignment
+ SUBTYPE OF (certification_assignment);
+ items : SET [1:?] OF certification_item;
+END_ENTITY;
+
+
+ENTITY applied_classification_assignment
+ SUBTYPE OF (classification_assignment);
+ items : SET [1:?] OF classification_item;
+END_ENTITY;
+
+
+ENTITY applied_contract_assignment
+ SUBTYPE OF (contract_assignment);
+ items : SET [1:?] OF contract_item;
+END_ENTITY;
+
+
+ENTITY applied_date_and_time_assignment
+ SUBTYPE OF (date_and_time_assignment);
+ items : SET [1:?] OF date_and_time_item;
+END_ENTITY;
+
+
+ENTITY applied_date_assignment
+ SUBTYPE OF (date_assignment);
+ items : SET [1:?] OF date_item;
+END_ENTITY;
+
+
+ENTITY applied_document_reference
+ SUBTYPE OF (document_reference);
+ items : SET [1:?] OF document_reference_item;
+END_ENTITY;
+
+
+ENTITY applied_document_usage_constraint_assignment
+ SUBTYPE OF (document_usage_constraint_assignment);
+ items : SET [1:?] OF document_reference_item;
+END_ENTITY;
+
+
+ENTITY applied_effectivity_assignment
+ SUBTYPE OF (effectivity_assignment);
+ items : SET [1:?] OF effectivity_item;
+END_ENTITY;
+
+
+ENTITY applied_event_occurrence_assignment
+ SUBTYPE OF (event_occurrence_assignment);
+ items : SET [1:?] OF event_occurrence_item;
+END_ENTITY;
+
+
+ENTITY applied_external_identification_assignment
+ SUBTYPE OF (external_identification_assignment);
+ items : SET [1:?] OF external_identification_item;
+END_ENTITY;
+
+
+ENTITY applied_group_assignment
+ SUBTYPE OF (group_assignment);
+ items : SET [1:?] OF groupable_item;
+END_ENTITY;
+
+
+ENTITY applied_identification_assignment
+ SUBTYPE OF (identification_assignment);
+ items : SET [1:?] OF identification_item;
+END_ENTITY;
+
+
+ENTITY applied_name_assignment
+ SUBTYPE OF (name_assignment);
+ item : name_item;
+END_ENTITY;
+
+
+ENTITY applied_organization_assignment
+ SUBTYPE OF (organization_assignment);
+ items : SET [1:?] OF organization_item;
+END_ENTITY;
+
+
+ENTITY applied_organizational_project_assignment
+ SUBTYPE OF (organizational_project_assignment);
+ items : SET [1:?] OF project_item;
+END_ENTITY;
+
+
+ENTITY applied_person_and_organization_assignment
+ SUBTYPE OF (person_and_organization_assignment);
+ items : SET [1:?] OF person_and_organization_item;
+END_ENTITY;
+
+
+ENTITY applied_presented_item
+ SUBTYPE OF (presented_item);
+ items : SET [1:?] OF presented_item_select;
+END_ENTITY;
+
+
+ENTITY applied_security_classification_assignment
+ SUBTYPE OF (security_classification_assignment);
+ items : SET [1:?] OF security_classification_item;
+END_ENTITY;
+
+
+ENTITY applied_time_interval_assignment
+ SUBTYPE OF (time_interval_assignment);
+ items : SET [0:?] OF time_interval_item;
+END_ENTITY;
+
+
+ENTITY applied_usage_right
+ SUBTYPE OF (applied_action_assignment);
+ SELF\applied_action_assignment.items : SET [1:?] OF ir_usage_item;
+END_ENTITY;
+
+
+ENTITY approval;
+ status : approval_status;
+ level : label;
+END_ENTITY;
+
+
+ENTITY approval_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_approval : approval;
+DERIVE
+ role : object_role := get_role(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ROLE_ASSOCIATION.ITEM_WITH_ROLE')) <= 1;
+END_ENTITY;
+
+
+ENTITY approval_date_time;
+ date_time : date_time_select;
+ dated_approval : approval;
+DERIVE
+ role : object_role := get_role(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ROLE_ASSOCIATION.ITEM_WITH_ROLE')) <= 1;
+END_ENTITY;
+
+
+ENTITY approval_person_organization;
+ person_organization : person_organization_select;
+ authorized_approval : approval;
+ role : approval_role;
+END_ENTITY;
+
+
+ENTITY approval_relationship;
+ name : label;
+ description : OPTIONAL text;
+ relating_approval : approval;
+ related_approval : approval;
+END_ENTITY;
+
+
+ENTITY approval_role;
+ role : label;
+DERIVE
+ description : text := get_description_value(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY approval_status;
+ name : label;
+END_ENTITY;
+
+
+ENTITY area_in_set;
+ area : presentation_area;
+ in_set : presentation_set;
+END_ENTITY;
+
+
+ENTITY area_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AREA_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY area_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) =
+ dimensional_exponents ( 2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 );
+END_ENTITY;
+
+
+ENTITY assembly_component_usage
+ SUPERTYPE OF (ONEOF (next_assembly_usage_occurrence, specified_higher_usage_occurrence, promissory_usage_occurrence))
+ SUBTYPE OF (product_definition_usage);
+ reference_designator : OPTIONAL identifier;
+END_ENTITY;
+
+
+ENTITY assembly_component_usage_substitute;
+ name : label;
+ definition : OPTIONAL text;
+ base : assembly_component_usage;
+ substitute : assembly_component_usage;
+UNIQUE
+ UR1 : base, substitute;
+WHERE
+ WR1 : base.relating_product_definition :=:
+ substitute.relating_product_definition;
+ WR2 : base :<>: substitute;
+END_ENTITY;
+
+
+ENTITY assigned_requirement
+ SUBTYPE OF (group_assignment);
+ items : SET [1:1] OF product_definition;
+ SELF\group_assignment.assigned_group : requirement_assignment;
+END_ENTITY;
+
+
+ENTITY atomic_formula
+ SUBTYPE OF (compound_representation_item);
+END_ENTITY;
+
+
+ENTITY attribute_assertion
+ SUBTYPE OF (fact_type, property_definition_representation, representation);
+END_ENTITY;
+
+
+ENTITY attribute_classification_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_class : group;
+ attribute_name : label;
+ role : classification_role;
+END_ENTITY;
+
+
+ENTITY attribute_language_assignment
+ SUBTYPE OF (attribute_classification_assignment);
+ items : SET [1:?] OF attribute_language_item;
+ SELF\attribute_classification_assignment.assigned_class : language;
+WHERE
+ WR1 : SELF\attribute_classification_assignment.role.name IN ['primary', 'translated'];
+ WR2 : SELF\attribute_classification_assignment.attribute_name<> '';
+END_ENTITY;
+
+
+ENTITY attribute_value_assignment
+ ABSTRACT SUPERTYPE;
+ attribute_name : label;
+ attribute_value : attribute_type;
+ role : attribute_value_role;
+END_ENTITY;
+
+
+ENTITY attribute_value_role;
+ name : label;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY auxiliary_geometric_representation_item
+ SUBTYPE OF (geometric_representation_item, variational_representation_item);
+END_ENTITY;
+
+
+ENTITY axis1_placement
+ SUBTYPE OF (placement);
+ axis : OPTIONAL direction;
+DERIVE
+ z : direction := NVL(normalise(axis), dummy_gri ||
+ direction([0.0,0.0,1.0]));
+WHERE
+ WR1 : SELF\geometric_representation_item.dim = 3;
+END_ENTITY;
+
+
+ENTITY axis2_placement_2d
+ SUBTYPE OF (placement);
+ ref_direction : OPTIONAL direction;
+DERIVE
+ p : LIST [2:2] OF direction := build_2axes(ref_direction);
+WHERE
+ WR1 : SELF\geometric_representation_item.dim = 2;
+END_ENTITY;
+
+
+ENTITY axis2_placement_3d
+ SUBTYPE OF (placement);
+ axis : OPTIONAL direction;
+ ref_direction : OPTIONAL direction;
+DERIVE
+ p : LIST [3:3] OF direction := build_axes(axis,ref_direction);
+WHERE
+ WR1 : SELF\placement.location.dim = 3;
+ WR2 : (NOT (EXISTS (axis))) OR (axis.dim = 3);
+ WR3 : (NOT (EXISTS (ref_direction))) OR (ref_direction.dim = 3);
+ WR4 : (NOT (EXISTS (axis))) OR (NOT (EXISTS (ref_direction))) OR
+ (cross_product(axis,ref_direction).magnitude > 0.0);
+END_ENTITY;
+
+
+ENTITY b_spline_curve
+ SUPERTYPE OF ((ONEOF (uniform_curve, b_spline_curve_with_knots, quasi_uniform_curve, bezier_curve) ANDOR rational_b_spline_curve))
+ SUBTYPE OF (bounded_curve);
+ degree : INTEGER;
+ control_points_list : LIST [2:?] OF cartesian_point;
+ curve_form : b_spline_curve_form;
+ closed_curve : LOGICAL;
+ self_intersect : LOGICAL;
+DERIVE
+ control_points : ARRAY [0:upper_index_on_control_points] OF cartesian_point := list_to_array(control_points_list,0,
+ upper_index_on_control_points);
+ upper_index_on_control_points : INTEGER := (SIZEOF(control_points_list) - 1);
+WHERE
+ WR1 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.UNIFORM_CURVE' IN TYPEOF(self)) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.QUASI_UNIFORM_CURVE' IN TYPEOF(self)) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.BEZIER_CURVE' IN TYPEOF(self)) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_CURVE_WITH_KNOTS' IN TYPEOF(self));
+END_ENTITY;
+
+
+ENTITY b_spline_curve_with_knots
+ SUBTYPE OF (b_spline_curve);
+ knot_multiplicities : LIST [2:?] OF INTEGER;
+ knots : LIST [2:?] OF parameter_value;
+ knot_spec : knot_type;
+DERIVE
+ upper_index_on_knots : INTEGER := SIZEOF(knots);
+WHERE
+ WR1 : constraints_param_b_spline(degree, upper_index_on_knots,
+ upper_index_on_control_points,
+ knot_multiplicities, knots);
+ WR2 : SIZEOF(knot_multiplicities) = upper_index_on_knots;
+END_ENTITY;
+
+
+ENTITY b_spline_surface
+ SUPERTYPE OF ((ONEOF (b_spline_surface_with_knots, uniform_surface, quasi_uniform_surface, bezier_surface) ANDOR rational_b_spline_surface))
+ SUBTYPE OF (bounded_surface);
+ u_degree : INTEGER;
+ v_degree : INTEGER;
+ control_points_list : LIST [2:?] OF LIST [2:?] OF cartesian_point;
+ surface_form : b_spline_surface_form;
+ u_closed : LOGICAL;
+ v_closed : LOGICAL;
+ self_intersect : LOGICAL;
+DERIVE
+ control_points : ARRAY [0:u_upper] OF ARRAY [0:v_upper] OF cartesian_point := make_array_of_array(control_points_list,
+ 0,u_upper,0,v_upper);
+ u_upper : INTEGER := SIZEOF(control_points_list) - 1;
+ v_upper : INTEGER := SIZEOF(control_points_list[1]) - 1;
+WHERE
+ WR1 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.UNIFORM_SURFACE' IN TYPEOF(SELF)) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.QUASI_UNIFORM_SURFACE' IN TYPEOF(SELF)) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.BEZIER_SURFACE' IN TYPEOF(SELF)) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_SURFACE_WITH_KNOTS' IN TYPEOF(SELF));
+END_ENTITY;
+
+
+ENTITY b_spline_surface_with_knots
+ SUBTYPE OF (b_spline_surface);
+ u_multiplicities : LIST [2:?] OF INTEGER;
+ v_multiplicities : LIST [2:?] OF INTEGER;
+ u_knots : LIST [2:?] OF parameter_value;
+ v_knots : LIST [2:?] OF parameter_value;
+ knot_spec : knot_type;
+DERIVE
+ knot_u_upper : INTEGER := SIZEOF(u_knots);
+ knot_v_upper : INTEGER := SIZEOF(v_knots);
+WHERE
+ WR1 : constraints_param_b_spline(SELF\b_spline_surface.u_degree,
+ knot_u_upper, SELF\b_spline_surface.u_upper,
+ u_multiplicities, u_knots);
+ WR2 : constraints_param_b_spline(SELF\b_spline_surface.v_degree,
+ knot_v_upper, SELF\b_spline_surface.v_upper,
+ v_multiplicities, v_knots);
+ WR3 : SIZEOF(u_multiplicities) = knot_u_upper;
+ WR4 : SIZEOF(v_multiplicities) = knot_v_upper;
+END_ENTITY;
+
+
+ENTITY back_chaining_rule
+ SUBTYPE OF (rule_definition);
+END_ENTITY;
+
+
+ENTITY back_chaining_rule_body
+ SUBTYPE OF (property_definition, property_definition_representation, representation);
+END_ENTITY;
+
+
+ENTITY background_colour
+ SUBTYPE OF (colour);
+ presentation : area_or_view;
+UNIQUE
+ UR1 : presentation;
+END_ENTITY;
+
+
+ENTITY beveled_sheet_representation
+ SUBTYPE OF (shape_representation);
+END_ENTITY;
+
+
+ENTITY bezier_curve
+ SUBTYPE OF (b_spline_curve);
+END_ENTITY;
+
+
+ENTITY bezier_surface
+ SUBTYPE OF (b_spline_surface);
+END_ENTITY;
+
+
+ENTITY binary_generic_expression
+ ABSTRACT SUPERTYPE
+ SUBTYPE OF (generic_expression);
+ operands : LIST [2:2] OF generic_expression;
+END_ENTITY;
+
+
+ENTITY binary_numeric_expression
+ ABSTRACT SUPERTYPE
+ SUBTYPE OF (numeric_expression, binary_generic_expression);
+ SELF\binary_generic_expression.operands : LIST [2:2] OF numeric_expression;
+END_ENTITY;
+
+
+ENTITY binary_representation_item
+ SUBTYPE OF (representation_item);
+ binary_value : BINARY;
+END_ENTITY;
+
+
+ENTITY block
+ SUBTYPE OF (geometric_representation_item);
+ position : axis2_placement_3d;
+ x : positive_length_measure;
+ y : positive_length_measure;
+ z : positive_length_measure;
+END_ENTITY;
+
+
+ENTITY boolean_expression
+ ABSTRACT SUPERTYPE OF (ONEOF (simple_boolean_expression, multiple_arity_boolean_expression, comparison_expression, interval_expression))
+ SUBTYPE OF (expression);
+END_ENTITY;
+
+
+ENTITY boolean_literal
+ SUBTYPE OF (simple_boolean_expression, generic_literal);
+ the_value : BOOLEAN;
+END_ENTITY;
+
+
+ENTITY boolean_representation_item
+ SUBTYPE OF (representation_item, boolean_literal);
+END_ENTITY;
+
+
+ENTITY boolean_result
+ SUBTYPE OF (geometric_representation_item);
+ operator : boolean_operator;
+ first_operand : boolean_operand;
+ second_operand : boolean_operand;
+END_ENTITY;
+
+
+ENTITY boundary_curve
+ SUBTYPE OF (composite_curve_on_surface);
+WHERE
+ WR1 : SELF\composite_curve.closed_curve;
+END_ENTITY;
+
+
+ENTITY bounded_curve
+ SUPERTYPE OF (ONEOF (polyline, b_spline_curve, trimmed_curve, bounded_pcurve, bounded_surface_curve, composite_curve))
+ SUBTYPE OF (curve);
+END_ENTITY;
+
+
+ENTITY bounded_pcurve
+ SUBTYPE OF (pcurve, bounded_curve);
+WHERE
+ WR1 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.BOUNDED_CURVE' IN
+ TYPEOF(SELF\pcurve.reference_to_curve.items[1]));
+END_ENTITY;
+
+
+ENTITY bounded_surface
+ SUPERTYPE OF (ONEOF (b_spline_surface, rectangular_trimmed_surface, curve_bounded_surface, rectangular_composite_surface))
+ SUBTYPE OF (surface);
+END_ENTITY;
+
+
+ENTITY bounded_surface_curve
+ SUBTYPE OF (surface_curve, bounded_curve);
+WHERE
+ WR1 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.BOUNDED_CURVE' IN
+ TYPEOF(SELF\surface_curve.curve_3d));
+END_ENTITY;
+
+
+ENTITY box_domain
+ SUBTYPE OF (founded_item);
+ corner : cartesian_point;
+ xlength : positive_length_measure;
+ ylength : positive_length_measure;
+ zlength : positive_length_measure;
+WHERE
+ WR1 : SIZEOF(QUERY(item <* USEDIN(SELF,'')|
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.BOXED_HALF_SPACE'
+ IN TYPEOF(item)))) = 0;
+END_ENTITY;
+
+
+ENTITY boxed_half_space
+ SUBTYPE OF (half_space_solid);
+ enclosure : box_domain;
+END_ENTITY;
+
+
+ENTITY breakdown_context
+ SUBTYPE OF (product_definition_relationship);
+END_ENTITY;
+
+
+ENTITY breakdown_element_group_assignment
+ SUBTYPE OF (group_assignment);
+ items : SET [1:1] OF product_definition_or_breakdown_element_usage;
+ SELF\group_assignment.assigned_group : product_definition_element_relationship;
+END_ENTITY;
+
+
+ENTITY breakdown_element_realization
+ SUBTYPE OF (characterized_object, product_definition_element_relationship);
+END_ENTITY;
+
+
+ENTITY breakdown_element_usage
+ SUBTYPE OF (product_definition_relationship);
+END_ENTITY;
+
+
+ENTITY breakdown_of
+ SUBTYPE OF (product_definition_relationship);
+END_ENTITY;
+
+
+ENTITY brep_with_voids
+ SUBTYPE OF (manifold_solid_brep);
+ voids : SET [1:?] OF oriented_closed_shell;
+END_ENTITY;
+
+
+ENTITY bytes_representation_item
+ SUBTYPE OF (binary_representation_item);
+DERIVE
+ no_of_bytes : INTEGER := BLENGTH(SELF\binary_representation_item.binary_value) DIV 8;
+WHERE
+ WR1 : BLENGTH(SELF\binary_representation_item.binary_value) MOD 8 = 0;
+END_ENTITY;
+
+
+ENTITY calendar_date
+ SUBTYPE OF (date);
+ day_component : day_in_month_number;
+ month_component : month_in_year_number;
+WHERE
+ WR1 : valid_calendar_date (SELF);
+END_ENTITY;
+
+
+ENTITY camera_image
+ SUBTYPE OF (mapped_item);
+ SELF\mapped_item.mapping_source : camera_usage;
+ SELF\mapped_item.mapping_target : planar_box;
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_REPRESENTATION_ITEM'
+ IN TYPEOF (SELF);
+END_ENTITY;
+
+
+ENTITY camera_image_3d_with_scale
+ SUBTYPE OF (camera_image);
+DERIVE
+ scale : positive_ratio_measure := ((SELF\mapped_item.mapping_target\
+ planar_extent.size_in_x) / (SELF\mapped_item.mapping_source.
+ mapping_origin\camera_model_d3.perspective_of_volume.view_window.
+ size_in_x));
+WHERE
+ WR1 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CAMERA_MODEL_D3'
+ IN TYPEOF (SELF\mapped_item.mapping_source.mapping_origin));
+ WR2 : aspect_ratio(SELF\mapped_item.mapping_target) =
+ aspect_ratio(SELF\mapped_item.mapping_source.mapping_origin\
+ camera_model_d3.perspective_of_volume.view_window);
+ WR3 : SELF\mapped_item.mapping_source.mapping_origin\camera_model_d3.
+ perspective_of_volume.front_plane_clipping
+ AND
+ SELF\mapped_item.mapping_source.mapping_origin\camera_model_d3.
+ perspective_of_volume.view_volume_sides_clipping;
+ WR4 : (SELF\mapped_item.mapping_target\planar_extent.size_in_x > 0)
+ AND
+ (SELF\mapped_item.mapping_target\planar_extent.size_in_y > 0);
+ WR5 : (SELF\mapped_item.mapping_source.mapping_origin\camera_model_d3.
+ perspective_of_volume.view_window.size_in_x > 0)
+ AND
+ (SELF\mapped_item.mapping_source.mapping_origin\camera_model_d3.
+ perspective_of_volume.view_window.size_in_y > 0);
+ WR6 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'AXIS2_PLACEMENT_2D' IN TYPEOF (SELF\mapped_item.
+ mapping_target\planar_box.placement))
+ AND NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'AXIS2_PLACEMENT_3D' IN TYPEOF (SELF\mapped_item.
+ mapping_target\planar_box.placement));
+END_ENTITY;
+
+
+ENTITY camera_model
+ ABSTRACT SUPERTYPE
+ SUBTYPE OF (geometric_representation_item);
+WHERE
+ WR1 : (SIZEOF (USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'ITEM_DEFINED_TRANSFORMATION.' +
+ 'TRANSFORM_ITEM_1')) +
+ SIZEOF (USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'REPRESENTATION_MAP.MAPPING_ORIGIN'))
+ ) > 0;
+ WR2 : SIZEOF(USEDIN(SELF,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'STYLED_ITEM.ITEM')) = 0;
+END_ENTITY;
+
+
+ENTITY camera_model_d3
+ SUBTYPE OF (camera_model);
+ view_reference_system : axis2_placement_3d;
+ perspective_of_volume : view_volume;
+WHERE
+ WR1 : (dot_product (SELF.view_reference_system.p[3],
+ SELF.perspective_of_volume.view_window.placement.p[3]) = 1.0)
+ AND
+ (SELF.view_reference_system.location.coordinates[3] =
+ SELF.perspective_of_volume.view_window.
+ placement.location.coordinates[3]);
+ WR2 : SELF\geometric_representation_item.dim = 3;
+END_ENTITY;
+
+
+ENTITY camera_model_d3_multi_clipping
+ SUBTYPE OF (camera_model_d3);
+ shape_clipping : SET [1:?] OF camera_model_d3_multi_clipping_interection_select;
+END_ENTITY;
+
+
+ENTITY camera_model_d3_multi_clipping_intersection
+ SUBTYPE OF (geometric_representation_item);
+ shape_clipping : SET [2:?] OF camera_model_d3_multi_clipping_interection_select;
+END_ENTITY;
+
+
+ENTITY camera_model_d3_multi_clipping_union
+ SUBTYPE OF (geometric_representation_item);
+ shape_clipping : SET [2:?] OF camera_model_d3_multi_clipping_union_select;
+END_ENTITY;
+
+
+ENTITY camera_model_d3_with_hlhsr
+ SUBTYPE OF (camera_model_d3);
+ hidden_line_surface_removal : BOOLEAN;
+END_ENTITY;
+
+
+ENTITY camera_model_with_light_sources
+ SUBTYPE OF (camera_model_d3);
+ sources : SET [1:?] OF light_source;
+END_ENTITY;
+
+
+ENTITY camera_usage
+ SUBTYPE OF (representation_map);
+ SELF\representation_map.mapping_origin : camera_model;
+WHERE
+ WR1 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRESENTATION_REPRESENTATION'
+ IN TYPEOF(SELF\representation_map.mapped_representation));
+END_ENTITY;
+
+
+ENTITY capacitance_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CAPACITANCE_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY capacitance_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) = dimensions_for_si_unit (si_unit_name.farad);
+END_ENTITY;
+
+
+ENTITY cartesian_point
+ SUBTYPE OF (point);
+ coordinates : LIST [1:3] OF length_measure;
+END_ENTITY;
+
+
+ENTITY cartesian_transformation_operator
+ SUPERTYPE OF (ONEOF (cartesian_transformation_operator_2d, cartesian_transformation_operator_3d))
+ SUBTYPE OF (geometric_representation_item, functionally_defined_transformation);
+ axis1 : OPTIONAL direction;
+ axis2 : OPTIONAL direction;
+ local_origin : cartesian_point;
+ scale : OPTIONAL REAL;
+DERIVE
+ scl : REAL := NVL(scale, 1.0);
+WHERE
+ WR1 : scl > 0.0;
+END_ENTITY;
+
+
+ENTITY cartesian_transformation_operator_2d
+ SUBTYPE OF (cartesian_transformation_operator);
+DERIVE
+ u : LIST [2:2] OF direction := base_axis(2,SELF\cartesian_transformation_operator.axis1,
+ SELF\cartesian_transformation_operator.axis2,?);
+WHERE
+ WR1 : SELF\geometric_representation_item.dim = 2;
+END_ENTITY;
+
+
+ENTITY cartesian_transformation_operator_3d
+ SUBTYPE OF (cartesian_transformation_operator);
+ axis3 : OPTIONAL direction;
+DERIVE
+ u : LIST [3:3] OF direction := base_axis(3,SELF\cartesian_transformation_operator.axis1,
+ SELF\cartesian_transformation_operator.axis2,axis3);
+WHERE
+ WR1 : SELF\geometric_representation_item.dim = 3;
+END_ENTITY;
+
+
+ENTITY cc_design_approval
+ SUBTYPE OF (approval_assignment);
+ items : SET [1:?] OF approved_item;
+END_ENTITY;
+
+
+ENTITY cc_design_certification
+ SUBTYPE OF (certification_assignment);
+ items : SET [1:?] OF certified_item;
+END_ENTITY;
+
+
+ENTITY cc_design_contract
+ SUBTYPE OF (contract_assignment);
+ items : SET [1:?] OF contracted_item;
+END_ENTITY;
+
+
+ENTITY cc_design_date_and_time_assignment
+ SUBTYPE OF (date_and_time_assignment);
+ items : SET [1:?] OF date_time_item;
+END_ENTITY;
+
+
+ENTITY cc_design_person_and_organization_assignment
+ SUBTYPE OF (person_and_organization_assignment);
+ items : SET [1:?] OF cc_person_organization_item;
+WHERE
+ WR1 : cc_design_person_and_organization_correlation(SELF);
+END_ENTITY;
+
+
+ENTITY cc_design_security_classification
+ SUBTYPE OF (security_classification_assignment);
+ items : SET [1:?] OF cc_classified_item;
+END_ENTITY;
+
+
+ENTITY cc_design_specification_reference
+ SUBTYPE OF (document_reference);
+ items : SET [1:?] OF cc_specified_item;
+END_ENTITY;
+
+
+ENTITY celsius_temperature_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.THERMODYNAMIC_TEMPERATURE_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY centre_of_symmetry
+ SUBTYPE OF (derived_shape_aspect);
+WHERE
+ WR1 : SIZEOF
+ (QUERY(sadr<*SELF\derived_shape_aspect.deriving_relationships|
+ NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SYMMETRIC_SHAPE_ASPECT'
+ IN TYPEOF
+ (sadr\shape_aspect_relationship.related_shape_aspect))))=0;
+END_ENTITY;
+
+
+ENTITY certification;
+ name : label;
+ purpose : text;
+ kind : certification_type;
+END_ENTITY;
+
+
+ENTITY certification_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_certification : certification;
+DERIVE
+ role : object_role := get_role(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ROLE_ASSOCIATION.ITEM_WITH_ROLE')) <= 1;
+END_ENTITY;
+
+
+ENTITY certification_type;
+ description : label;
+END_ENTITY;
+
+
+ENTITY change
+ SUBTYPE OF (action_assignment);
+ items : SET [1:?] OF work_item;
+END_ENTITY;
+
+
+ENTITY change_request
+ SUBTYPE OF (action_request_assignment);
+ items : SET [1:?] OF change_request_item;
+END_ENTITY;
+
+
+ENTITY character_glyph_font_usage;
+ character : generic_character_glyph_symbol;
+ font : text_font;
+END_ENTITY;
+
+
+ENTITY character_glyph_style_outline
+ SUBTYPE OF (founded_item);
+ outline_style : curve_style;
+END_ENTITY;
+
+
+ENTITY character_glyph_style_stroke
+ SUBTYPE OF (founded_item);
+ stroke_style : curve_style;
+END_ENTITY;
+
+
+ENTITY character_glyph_symbol
+ SUBTYPE OF (generic_character_glyph_symbol);
+ character_box : planar_extent;
+ baseline_ratio : ratio_measure;
+DERIVE
+ box_height : length_measure := character_box.size_in_y;
+WHERE
+ WR1 : {0.0 <= baseline_ratio <= 1.0};
+ WR2 : item_in_context(SELF.character_box,
+ SELF\representation.context_of_items);
+ WR3 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POSITIVE_LENGTH_MEASURE'
+ IN TYPEOF (SELF.box_height);
+END_ENTITY;
+
+
+ENTITY character_glyph_symbol_outline
+ SUBTYPE OF (character_glyph_symbol);
+ outlines : SET [1:?] OF annotation_fill_area;
+WHERE
+ WR1 : SELF.outlines <= SELF\representation.items;
+END_ENTITY;
+
+
+ENTITY character_glyph_symbol_stroke
+ SUBTYPE OF (character_glyph_symbol);
+ strokes : SET [1:?] OF curve;
+WHERE
+ WR1 : SELF.strokes <= SELF\representation.items;
+END_ENTITY;
+
+
+ENTITY characteristic_data_column_header
+ SUBTYPE OF (general_property);
+END_ENTITY;
+
+
+ENTITY characteristic_data_column_header_link
+ SUBTYPE OF (general_property_relationship);
+END_ENTITY;
+
+
+ENTITY characteristic_data_table_header
+ SUBTYPE OF (general_property);
+END_ENTITY;
+
+
+ENTITY characteristic_data_table_header_decomposition
+ SUBTYPE OF (general_property_relationship);
+END_ENTITY;
+
+
+ENTITY characteristic_type
+ SUBTYPE OF (group);
+END_ENTITY;
+
+
+ENTITY characterized_class
+ SUBTYPE OF (characterized_object, class);
+END_ENTITY;
+
+
+ENTITY characterized_object;
+ name : label;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY circle
+ SUBTYPE OF (conic);
+ radius : positive_length_measure;
+END_ENTITY;
+
+
+ENTITY circular_runout_tolerance
+ SUBTYPE OF (geometric_tolerance_with_datum_reference);
+WHERE
+ WR1 : SIZEOF (SELF\geometric_tolerance_with_datum_reference.datum_system) <= 2;
+END_ENTITY;
+
+
+ENTITY class
+ SUBTYPE OF (group);
+END_ENTITY;
+
+
+ENTITY class_by_extension
+ SUBTYPE OF (class);
+END_ENTITY;
+
+
+ENTITY class_by_intension
+ SUBTYPE OF (class);
+END_ENTITY;
+
+
+ENTITY class_system
+ SUBTYPE OF (group);
+END_ENTITY;
+
+
+ENTITY class_usage_effectivity_context_assignment
+ SUBTYPE OF (effectivity_context_assignment);
+ items : SET [1:?] OF class_usage_effectivity_context_item;
+WHERE
+ WR1 : SELF.role.name = 'class usage influence';
+ WR2 : SIZEOF( QUERY( i <* SELF.items | NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION' IN TYPEOF(i)) )) = 0;
+ WR3 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.APPLIED_EFFECTIVITY_ASSIGNMENT' IN TYPEOF(SELF.assigned_effectivity_assignment)) AND
+ (SIZEOF(TYPEOF(SELF.assigned_effectivity_assignment.assigned_effectivity) ) = 1) AND
+ (SELF.assigned_effectivity_assignment.assigned_effectivity.id = 'class usage') AND
+ (SIZEOF( QUERY( i <* SELF.assigned_effectivity_assignment\applied_effectivity_assignment.items |
+ NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_CONCEPT_FEATURE_CATEGORY_USAGE' IN TYPEOF(i)) )) = 0);
+END_ENTITY;
+
+
+ENTITY classification_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_class : group;
+ role : classification_role;
+END_ENTITY;
+
+
+ENTITY classification_role;
+ name : label;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY closed_shell
+ SUBTYPE OF (connected_face_set);
+END_ENTITY;
+
+
+ENTITY coaxiality_tolerance
+ SUBTYPE OF (geometric_tolerance_with_datum_reference);
+WHERE
+ WR1 : SIZEOF (SELF\geometric_tolerance_with_datum_reference.datum_system) <= 2;
+END_ENTITY;
+
+
+ENTITY colour;
+END_ENTITY;
+
+
+ENTITY colour_rgb
+ SUBTYPE OF (colour_specification);
+ red : REAL;
+ green : REAL;
+ blue : REAL;
+WHERE
+ WR1 : {0.0 <= red <= 1.0};
+ WR2 : {0.0 <= green <= 1.0};
+ WR3 : {0.0 <= blue <= 1.0};
+END_ENTITY;
+
+
+ENTITY colour_specification
+ SUBTYPE OF (colour);
+ name : label;
+END_ENTITY;
+
+
+ENTITY common_datum
+ SUBTYPE OF (composite_shape_aspect, datum);
+WHERE
+ WR1 : SIZEOF (SELF\composite_shape_aspect.component_relationships) = 2;
+ WR2 : SIZEOF (QUERY ( sar <* SELF\composite_shape_aspect.component_relationships|
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DATUM' IN TYPEOF (sar.related_shape_aspect)) AND
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMMON_DATUM' IN TYPEOF (sar.related_shape_aspect))) )) = 0;
+END_ENTITY;
+
+
+ENTITY comparison_expression
+ ABSTRACT SUPERTYPE
+ SUBTYPE OF (boolean_expression, binary_generic_expression);
+ SELF\binary_generic_expression.operands : LIST [2:2] OF expression;
+WHERE
+ WR1 : (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.NUMERIC_EXPRESSION'
+IN TYPEOF(SELF\binary_generic_expression.operands[1]))
+ AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.NUMERIC_EXPRESSION'
+IN TYPEOF(SELF\binary_generic_expression.operands[2])))
+OR
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.BOOLEAN_EXPRESSION'
+IN TYPEOF(SELF\binary_generic_expression.operands[1]))
+ AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.BOOLEAN_EXPRESSION'
+ IN TYPEOF(SELF\binary_generic_expression.operands[2])))
+OR
+(('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STRING_EXPRESSION'
+IN TYPEOF(SELF\binary_generic_expression.operands[1]))
+ AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STRING_EXPRESSION'
+IN TYPEOF(SELF\binary_generic_expression.operands[2])));
+END_ENTITY;
+
+
+ENTITY complex_clause
+ SUBTYPE OF (compound_representation_item);
+END_ENTITY;
+
+
+ENTITY complex_conjunctive_clause
+ SUBTYPE OF (complex_clause);
+END_ENTITY;
+
+
+ENTITY complex_disjunctive_clause
+ SUBTYPE OF (complex_clause);
+END_ENTITY;
+
+
+ENTITY complex_shelled_solid
+ SUBTYPE OF (shelled_solid);
+ thickened_face_list : LIST [1:?] OF SET [1:?] OF face_surface;
+ thickness_list : LIST [1:?] OF length_measure;
+WHERE
+ WR1 : SIZEOF(thickened_face_list) = SIZEOF(thickness_list);
+ WR2 : SIZEOF(QUERY(q <* thickness_list | (q = 0))) = 0;
+END_ENTITY;
+
+
+ENTITY composite_assembly_definition
+ SUBTYPE OF (product_definition);
+WHERE
+ WR1 : SIZEOF (QUERY (pdr <* USEDIN (SELF,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRODUCT_DEFINITION_RELATIONSHIP.' +
+ 'RELATING_PRODUCT_DEFINITION') |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'NEXT_ASSEMBLY_USAGE_OCCURRENCE' IN
+ TYPEOF (pdr))) = 1;
+END_ENTITY;
+
+
+ENTITY composite_assembly_sequence_definition
+ SUBTYPE OF (product_definition);
+WHERE
+ WR1 : SIZEOF (QUERY (pdr <* USEDIN (SELF,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRODUCT_DEFINITION_RELATIONSHIP.' +
+ 'RELATING_PRODUCT_DEFINITION') |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'NEXT_ASSEMBLY_USAGE_OCCURRENCE' IN
+ TYPEOF (pdr))) > 0;
+END_ENTITY;
+
+
+ENTITY composite_assembly_table
+ SUBTYPE OF (part_laminate_table);
+END_ENTITY;
+
+
+ENTITY composite_curve
+ SUBTYPE OF (bounded_curve);
+ segments : LIST [1:?] OF composite_curve_segment;
+ self_intersect : LOGICAL;
+DERIVE
+ closed_curve : LOGICAL := segments[n_segments].transition <> discontinuous;
+ n_segments : INTEGER := SIZEOF(segments);
+WHERE
+ WR1 : ((NOT closed_curve) AND (SIZEOF(QUERY(temp <* segments |
+ temp.transition = discontinuous)) = 1)) OR
+ ((closed_curve) AND (SIZEOF(QUERY(temp <* segments |
+ temp.transition = discontinuous)) = 0));
+END_ENTITY;
+
+
+ENTITY composite_curve_on_surface
+ SUPERTYPE OF (boundary_curve)
+ SUBTYPE OF (composite_curve);
+DERIVE
+ basis_surface : SET [0:2] OF surface := get_basis_surface(SELF);
+WHERE
+ WR1 : SIZEOF(basis_surface) > 0;
+ WR2 : constraints_composite_curve_on_surface(SELF);
+END_ENTITY;
+
+
+ENTITY composite_curve_segment
+ SUBTYPE OF (founded_item);
+ transition : transition_code;
+ same_sense : BOOLEAN;
+ parent_curve : curve;
+INVERSE
+ using_curves: BAG [1:?] OF composite_curve FOR segments;
+WHERE
+ WR1 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.BOUNDED_CURVE' IN TYPEOF(parent_curve));
+END_ENTITY;
+
+
+ENTITY composite_material_designation
+ SUBTYPE OF (material_designation);
+END_ENTITY;
+
+
+ENTITY composite_shape_aspect
+ SUBTYPE OF (shape_aspect);
+INVERSE
+ component_relationships: SET [2:?] OF shape_aspect_relationship FOR relating_shape_aspect;
+END_ENTITY;
+
+
+ENTITY composite_sheet_representation
+ SUBTYPE OF (shape_representation);
+WHERE
+ WR1 : SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'GEOMETRICALLY_BOUNDED_SURFACE_SHAPE_REPRESENTATION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'MANIFOLD_SURFACE_SHAPE_REPRESENTATION'] * TYPEOF (SELF)) = 1;
+END_ENTITY;
+
+
+ENTITY composite_text
+ SUBTYPE OF (geometric_representation_item);
+ collected_text : SET [2:?] OF text_or_character;
+WHERE
+ WR1 : acyclic_composite_text( SELF, SELF.collected_text);
+END_ENTITY;
+
+
+ENTITY composite_text_with_associated_curves
+ SUBTYPE OF (composite_text);
+ associated_curves : SET [1:?] OF curve;
+END_ENTITY;
+
+
+ENTITY composite_text_with_blanking_box
+ SUBTYPE OF (composite_text);
+ blanking : planar_box;
+END_ENTITY;
+
+
+ENTITY composite_text_with_delineation
+ SUBTYPE OF (composite_text);
+ delineation : text_delineation;
+END_ENTITY;
+
+
+ENTITY composite_text_with_extent
+ SUBTYPE OF (composite_text);
+ extent : planar_extent;
+END_ENTITY;
+
+
+ENTITY compound_representation_item
+ SUPERTYPE OF (ONEOF (point_and_vector, point_path, row_representation_item, table_representation_item))
+ SUBTYPE OF (representation_item);
+ item_element : compound_item_definition;
+END_ENTITY;
+
+
+ENTITY compound_shape_representation
+ SUBTYPE OF (shape_representation);
+WHERE
+ WR1 : ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'GEOMETRIC_REPRESENTATION_CONTEXT'
+ IN TYPEOF ( SELF.context_of_items ) ) AND (
+ SELF.context_of_items\
+ geometric_representation_context.coordinate_space_dimension =3 );
+ WR2 : SIZEOF ( QUERY ( cbsr_i <* SELF.items | SIZEOF (
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'EDGE_BASED_WIREFRAME_MODEL' ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'FACE_BASED_SURFACE_MODEL' ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'MAPPED_ITEM' , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'AXIS2_PLACEMENT_3D']* TYPEOF ( cbsr_i ) ) <>1 ) ) =0;
+ WR3 : SIZEOF ( QUERY ( cbsr_i <* SELF.items | SIZEOF (
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'EDGE_BASED_WIREFRAME_MODEL' ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'FACE_BASED_SURFACE_MODEL' ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'MAPPED_ITEM']* TYPEOF ( cbsr_i ) ) =1 ) ) >0;
+ WR4 : SIZEOF ( QUERY ( cbsr_i <* SELF.items | (
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'MAPPED_ITEM' IN TYPEOF ( cbsr_i ) )
+ AND ( SIZEOF ( ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'COMPOUND_SHAPE_REPRESENTATION' , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'EDGE_BASED_WIREFRAME_SHAPE_REPRESENTATION' ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'NON_MANIFOLD_SURFACE_SHAPE_REPRESENTATION']* TYPEOF (
+ cbsr_i\ mapped_item.mapping_source ) ) <>1 ) ) ) =0;
+END_ENTITY;
+
+
+ENTITY concentricity_tolerance
+ SUBTYPE OF (geometric_tolerance_with_datum_reference);
+WHERE
+ WR1 : SIZEOF (SELF\geometric_tolerance_with_datum_reference.datum_system) = 1;
+END_ENTITY;
+
+
+ENTITY concept_feature_operator;
+ name : label;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY concept_feature_relationship;
+ name : label;
+ description : OPTIONAL text;
+ relating_product_concept_feature : product_concept_feature;
+ related_product_concept_feature : product_concept_feature;
+END_ENTITY;
+
+
+ENTITY concept_feature_relationship_with_condition
+ SUBTYPE OF (concept_feature_relationship);
+ conditional_operator : concept_feature_operator;
+END_ENTITY;
+
+
+ENTITY conditional_concept_feature
+ SUBTYPE OF (product_concept_feature);
+ condition : concept_feature_relationship_with_condition;
+END_ENTITY;
+
+
+ENTITY conductance_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONDUCTANCE_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY conductance_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) = dimensions_for_si_unit (si_unit_name.siemens);
+END_ENTITY;
+
+
+ENTITY configurable_item
+ SUBTYPE OF (configuration_item);
+ item_concept_feature : SET [1:?] OF product_concept_feature_association;
+END_ENTITY;
+
+
+ENTITY configuration_design;
+ configuration : configuration_item;
+ design : configuration_design_item;
+DERIVE
+ description : text := get_description_value (SELF);
+ name : label := get_name_value (SELF);
+UNIQUE
+ UR1 : configuration, design;
+WHERE
+ WR1 : SIZEOF (USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'NAME_ATTRIBUTE.NAMED_ITEM')) <= 1;
+ WR2 : SIZEOF (USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY configuration_effectivity
+ SUBTYPE OF (product_definition_effectivity);
+ configuration : configuration_design;
+UNIQUE
+ UR1: configuration, SELF\product_definition_effectivity.usage, SELF\effectivity.id;
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION_USAGE' IN
+ TYPEOF (SELF\product_definition_effectivity.usage);
+END_ENTITY;
+
+
+ENTITY configuration_item;
+ id : identifier;
+ name : label;
+ description : OPTIONAL text;
+ item_concept : product_concept;
+ purpose : OPTIONAL label;
+END_ENTITY;
+
+
+ENTITY configuration_item_hierarchical_relationship
+ SUBTYPE OF (configuration_item_relationship);
+END_ENTITY;
+
+
+ENTITY configuration_item_relationship;
+ name : label;
+ description : OPTIONAL text;
+ relating_configuration_item : configuration_item;
+ related_configuration_item : configuration_item;
+END_ENTITY;
+
+
+ENTITY configuration_item_revision_sequence
+ SUBTYPE OF (configuration_item_relationship);
+END_ENTITY;
+
+
+ENTITY configured_effectivity_assignment
+ SUBTYPE OF (effectivity_assignment);
+ items : SET [1:?] OF configured_effectivity_item;
+WHERE
+ WR1 : (SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EFFECTIVITY'] * TYPEOF(SELF.assigned_effectivity) ) = 1)
+ AND (SELF.assigned_effectivity.id = 'configuration validity');
+ WR2 : SIZEOF(SELF.items) = 1;
+ WR3 : SIZEOF( QUERY( i <* SELF.items | NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION' IN TYPEOF(i))
+ OR NOT (i\product_definition.frame_of_reference.name IN ['conceptual definition','part occurrence', 'functional definition','alternative definition']) )) = 0;
+ WR4 : SELF.role.name IN ['design', 'usage'];
+ WR5 : (SELF.role.name <> 'design')
+ OR (SIZEOF( QUERY( i <* SELF.items | ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION' IN TYPEOF(i)) AND (i\product_definition.frame_of_reference.name = 'part occurrence') )) = 0);
+ WR6 : (SELF.role.name <> 'usage') OR (SIZEOF( QUERY( i <* SELF.items | ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION' IN TYPEOF(i)) AND (i\product_definition.frame_of_reference.name = 'conceptual definition') )) = 0);
+ WR7 : SELF.role.description IN ['exception', 'inherited', 'local'];
+ WR8 : SIZEOF( QUERY( x <* USEDIN(SELF,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'EFFECTIVITY_CONTEXT_ASSIGNMENT.ASSIGNED_EFFECTIVITY_ASSIGNMENT') | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONFIGURED_EFFECTIVITY_CONTEXT_ASSIGNMENT' IN TYPEOF(x) )) = 1;
+END_ENTITY;
+
+
+ENTITY configured_effectivity_context_assignment
+ SUBTYPE OF (effectivity_context_assignment);
+ items : SET [1:?] OF configured_effectivity_context_item;
+ SELF\effectivity_context_assignment.assigned_effectivity_assignment : configured_effectivity_assignment;
+WHERE
+ WR1 : SIZEOF(SELF.items) = 1;
+END_ENTITY;
+
+
+ENTITY conic
+ SUPERTYPE OF (ONEOF (circle, ellipse, hyperbola, parabola))
+ SUBTYPE OF (curve);
+ position : axis2_placement;
+END_ENTITY;
+
+
+ENTITY conical_stepped_hole_transition
+ SUBTYPE OF (geometric_representation_item);
+ transition_number : positive_integer;
+ cone_apex_angle : plane_angle_measure;
+ cone_base_radius : positive_length_measure;
+END_ENTITY;
+
+
+ENTITY conical_surface
+ SUBTYPE OF (elementary_surface);
+ radius : length_measure;
+ semi_angle : plane_angle_measure;
+WHERE
+ WR1 : radius >= 0.0;
+END_ENTITY;
+
+
+ENTITY connected_edge_set
+ SUBTYPE OF (topological_representation_item);
+ ces_edges : SET [1:?] OF edge;
+END_ENTITY;
+
+
+ENTITY connected_face_set
+ SUPERTYPE OF (ONEOF (closed_shell, open_shell))
+ SUBTYPE OF (topological_representation_item);
+ cfs_faces : SET [1:?] OF face;
+END_ENTITY;
+
+
+ENTITY connected_face_sub_set
+ SUBTYPE OF (connected_face_set);
+ parent_face_set : connected_face_set;
+END_ENTITY;
+
+
+ENTITY constructive_geometry_representation
+ SUBTYPE OF (representation);
+WHERE
+ WR1 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_REPRESENTATION_CONTEXT' IN TYPEOF(SELF.context_of_items)) AND ({2 <= SELF.context_of_items\geometric_representation_context. coordinate_space_dimension <= 3});
+ WR2 : SIZEOF( QUERY( cgr_i <* SELF.items | SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PLACEMENT', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_SURFACE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT'] * TYPEOF(cgr_i)) <> 1 )) = 0;
+ WR3 : SIZEOF( USEDIN( SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'REPRESENTATION_RELATIONSHIP.REP_2') ) > 0;
+ WR4 : SIZEOF( USEDIN( SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'REPRESENTATION_MAP.MAPPED_REPRESENTATION') ) = 0;
+END_ENTITY;
+
+
+ENTITY constructive_geometry_representation_relationship
+ SUBTYPE OF (representation_relationship);
+ SELF\representation_relationship.rep_1 : constructive_geometry_representation_or_shape_represenation;
+ SELF\representation_relationship.rep_2 : constructive_geometry_representation;
+WHERE
+ WR1 : (SELF.rep_1.context_of_items :=: SELF.rep_2.context_of_items) AND ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_REPRESENTATION_CONTEXT' IN TYPEOF(SELF.rep_1.context_of_items));
+ WR2 : NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'REPRESENTATION_RELATIONSHIP_WITH_TRANSFORMATION' IN TYPEOF(SELF));
+END_ENTITY;
+
+
+ENTITY contact_ratio_representation
+ SUBTYPE OF (representation);
+WHERE
+ WR1 : ( SIZEOF ( SELF.items ) =1 ) AND ( SIZEOF ( QUERY ( i <*
+ SELF.items | ( SIZEOF ( ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'MEASURE_REPRESENTATION_ITEM' , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'VALUE_RANGE']* TYPEOF ( i ) ) =1 ) AND ( i.name =
+ 'ratio value' ) ) ) =1 );
+ WR2 : ( SIZEOF ( QUERY ( pdr <* USEDIN ( SELF ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
+ 'USED_REPRESENTATION' ) | pdr. name =
+ 'contact ratio reference' ) ) =1 ) AND ( SIZEOF ( QUERY (
+ pdr <* USEDIN ( SELF ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
+ 'USED_REPRESENTATION' ) | ( pdr. name =
+ 'contact ratio reference' ) AND ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'PRODUCT_DEFINITION' IN TYPEOF ( pdr.
+ definition.definition ) ) ) ) =1 );
+ WR3 : ( SIZEOF ( USEDIN ( SELF ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
+ 'USED_REPRESENTATION' ) ) =1 ) AND ( SIZEOF ( QUERY ( pdr
+ <* USEDIN ( SELF ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
+ 'USED_REPRESENTATION' ) | SIZEOF ( QUERY ( gpa <* USEDIN (
+ pdr. definition ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'GENERAL_PROPERTY_ASSOCIATION.'+
+ 'DERIVED_DEFINITION' ) | ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'GENERAL_PROPERTY' IN TYPEOF ( gpa. base_definition ) ) AND
+ ( gpa. base_definition.name ='surface_condition' ) ) ) =1 )
+ ) =1 );
+END_ENTITY;
+
+
+ENTITY context_dependent_invisibility
+ SUBTYPE OF (invisibility);
+ presentation_context : invisibility_context;
+END_ENTITY;
+
+
+ENTITY context_dependent_over_riding_styled_item
+ SUBTYPE OF (over_riding_styled_item);
+ style_context : LIST [1:?] OF style_context_select;
+WHERE
+ WR1 : (SIZEOF(QUERY(sc <* SELF.style_context | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.REPRESENTATION_ITEM' IN TYPEOF(sc)))= 1) OR
+(SIZEOF(QUERY(sc <* SELF.style_context |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' IN TYPEOF(sc))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.REPRESENTATION_RELATIONSHIP' IN TYPEOF(sc)) ))
+ = SIZEOF(style_context));
+END_ENTITY;
+
+
+ENTITY context_dependent_shape_representation;
+ representation_relation : shape_representation_relationship;
+ represented_product_relation : product_definition_shape;
+DERIVE
+ description : text := get_description_value(SELF);
+ name : label := get_name_value(SELF);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION_RELATIONSHIP' IN TYPEOF(SELF.represented_product_relation.definition);
+ WR2 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
+ WR3 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'NAME_ATTRIBUTE.NAMED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY context_dependent_unit
+ SUBTYPE OF (named_unit);
+ name : label;
+END_ENTITY;
+
+
+ENTITY contract;
+ name : label;
+ purpose : text;
+ kind : contract_type;
+END_ENTITY;
+
+
+ENTITY contract_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_contract : contract;
+DERIVE
+ role : object_role := get_role(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ROLE_ASSOCIATION.ITEM_WITH_ROLE')) <= 1;
+END_ENTITY;
+
+
+ENTITY contract_relationship;
+ id : identifier;
+ name : label;
+ description : OPTIONAL text;
+ relating_contract : contract;
+ related_contract : contract;
+END_ENTITY;
+
+
+ENTITY contract_type;
+ description : label;
+END_ENTITY;
+
+
+ENTITY conversion_based_unit
+ SUBTYPE OF (named_unit);
+ name : label;
+ conversion_factor : measure_with_unit;
+WHERE
+ WR1 : SELF\named_unit.dimensions = derive_dimensional_exponents(conversion_factor\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY coordinated_universal_time_offset;
+ hour_offset : INTEGER;
+ minute_offset : OPTIONAL INTEGER;
+ sense : ahead_or_behind;
+DERIVE
+ actual_minute_offset : INTEGER := NVL(minute_offset,0);
+WHERE
+ WR1 : { 0 <= hour_offset < 24 };
+ WR2 : { 0 <= actual_minute_offset <= 59 };
+ WR3 : NOT (((hour_offset <> 0) OR (actual_minute_offset <>0)) AND (sense = exact));
+END_ENTITY;
+
+
+ENTITY csg_shape_representation
+ SUBTYPE OF (shape_representation);
+WHERE
+ WR1 : SELF.context_of_items\geometric_representation_context.coordinate_space_dimension = 3;
+ WR2 : SIZEOF (
+QUERY ( it <* SELF.items| ( SIZEOF ([ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CSG_SOLID', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT_3D', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SOLID_REPLICA', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.REVOLVED_FACE_SOLID', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EXTRUDED_FACE_SOLID' ] * TYPEOF (it)) <> 1) )) = 0;
+ WR3 : SIZEOF (
+QUERY ( mi <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' IN TYPEOF (it)) )| NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CSG_SHAPE_REPRESENTATION' IN TYPEOF (mi\mapped_item.mapping_source.mapped_representation)) )) = 0;
+ WR4 : SIZEOF (
+QUERY ( sr <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SOLID_REPLICA' IN TYPEOF (it)) )| ( SIZEOF ([ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CSG_SOLID', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.REVOLVED_FACE_SOLID', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EXTRUDED_FACE_SOLID' ] * TYPEOF (sr\solid_replica.parent_solid)) = 0) )) = 0;
+ WR5 : SIZEOF (
+QUERY ( it <* SELF.items| NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT_3D' IN TYPEOF (it)) )) > 0;
+END_ENTITY;
+
+
+ENTITY csg_solid
+ SUBTYPE OF (solid_model);
+ tree_root_expression : csg_select;
+END_ENTITY;
+
+
+ENTITY currency
+ ABSTRACT SUPERTYPE OF (ONEOF (externally_defined_currency, iso4217_currency))
+ SUBTYPE OF (context_dependent_unit);
+WHERE
+ WR1 : ((SELF\named_unit.dimensions.length_exponent = 0.0) AND
+ (SELF\named_unit.dimensions.mass_exponent = 0.0) AND
+ (SELF\named_unit.dimensions.time_exponent = 0.0) AND
+ (SELF\named_unit.dimensions.electric_current_exponent = 0.0) AND
+ (SELF\named_unit.dimensions.thermodynamic_temperature_exponent = 0.0) AND
+ (SELF\named_unit.dimensions.amount_of_substance_exponent = 0.0) AND
+ (SELF\named_unit.dimensions.luminous_intensity_exponent = 0.0));
+END_ENTITY;
+
+
+ENTITY currency_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+ SELF\measure_with_unit.unit_component : currency;
+END_ENTITY;
+
+
+ENTITY curve
+ SUPERTYPE OF (ONEOF (line, conic, pcurve, surface_curve, offset_curve_2d, offset_curve_3d, curve_replica))
+ SUBTYPE OF (geometric_representation_item);
+END_ENTITY;
+
+
+ENTITY curve_bounded_surface
+ SUBTYPE OF (bounded_surface);
+ basis_surface : surface;
+ boundaries : SET [1:?] OF boundary_curve;
+ implicit_outer : BOOLEAN;
+WHERE
+ WR1 : (NOT implicit_outer) OR
+ (SIZEOF (QUERY (temp <* boundaries |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OUTER_BOUNDARY_CURVE' IN TYPEOF(temp))) = 0);
+ WR2 : (NOT(implicit_outer)) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.BOUNDED_SURFACE' IN TYPEOF(basis_surface));
+ WR3 : SIZEOF(QUERY(temp <* boundaries |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OUTER_BOUNDARY_CURVE' IN
+ TYPEOF(temp))) <= 1;
+ WR4 : SIZEOF(QUERY(temp <* boundaries |
+ (temp\composite_curve_on_surface.basis_surface [1] <>
+ SELF.basis_surface))) = 0;
+END_ENTITY;
+
+
+ENTITY curve_dimension
+ SUBTYPE OF (dimension_curve_directed_callout);
+END_ENTITY;
+
+
+ENTITY curve_replica
+ SUBTYPE OF (curve);
+ parent_curve : curve;
+ transformation : cartesian_transformation_operator;
+WHERE
+ WR1 : transformation.dim = parent_curve.dim;
+ WR2 : acyclic_curve_replica (SELF, parent_curve);
+END_ENTITY;
+
+
+ENTITY curve_style
+ SUBTYPE OF (founded_item);
+ name : label;
+ curve_font : curve_font_or_scaled_curve_font_select;
+ curve_width : size_select;
+ curve_colour : colour;
+END_ENTITY;
+
+
+ENTITY curve_style_font
+ SUBTYPE OF (founded_item);
+ name : label;
+ pattern_list : LIST [1:?] OF curve_style_font_pattern;
+END_ENTITY;
+
+
+ENTITY curve_style_font_and_scaling
+ SUBTYPE OF (founded_item);
+ name : label;
+ curve_font : curve_style_font_select;
+ curve_font_scaling : REAL;
+END_ENTITY;
+
+
+ENTITY curve_style_font_pattern
+ SUBTYPE OF (founded_item);
+ visible_segment_length : positive_length_measure;
+ invisible_segment_length : positive_length_measure;
+END_ENTITY;
+
+
+ENTITY curve_style_rendering;
+ rendering_method : shading_curve_method;
+ rendering_properties : surface_rendering_properties;
+END_ENTITY;
+
+
+ENTITY curve_swept_solid_shape_representation
+ SUBTYPE OF (shape_representation);
+WHERE
+ WR1 : SIZEOF (QUERY (it <* SELF.items |
+ NOT (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SWEPT_AREA_SOLID',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SWEPT_DISK_SOLID',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT_3D'] *
+ TYPEOF(it)) = 1))) = 0;
+ WR2 : SIZEOF (QUERY (it <* SELF.items |
+ SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SWEPT_AREA_SOLID',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SWEPT_DISK_SOLID',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM'] * TYPEOF(it)) =1 )) > 0;
+ WR3 : SIZEOF (QUERY (mi <* QUERY (it <* items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' IN TYPEOF(it)) |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_SWEPT_SOLID_SHAPE_REPRESENTATION' IN
+ TYPEOF(mi\mapped_item.mapping_source.
+ mapped_representation)))) = 0;
+ WR4 : SIZEOF (QUERY (scsas <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_CURVE_SWEPT_AREA_SOLID' IN
+ TYPEOF(it)) |
+ NOT(('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_CURVE' IN
+ TYPEOF(scsas\surface_curve_swept_area_solid.directrix)) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE' IN
+ TYPEOF(scsas\surface_curve_swept_area_solid.directrix))))) = 0;
+END_ENTITY;
+
+
+ENTITY cylindrical_surface
+ SUBTYPE OF (elementary_surface);
+ radius : positive_length_measure;
+END_ENTITY;
+
+
+ENTITY cylindricity_tolerance
+ SUBTYPE OF (geometric_tolerance);
+WHERE
+ WR1 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'GEOMETRIC_TOLERANCE_WITH_DATUM_REFERENCE' IN TYPEOF (SELF));
+END_ENTITY;
+
+
+ENTITY data_environment;
+ name : label;
+ description : text;
+ elements : SET [1:?] OF property_definition_representation;
+END_ENTITY;
+
+
+ENTITY date
+ SUPERTYPE OF (ONEOF (calendar_date, ordinal_date, week_of_year_and_day_date, year_month));
+ year_component : year_number;
+END_ENTITY;
+
+
+ENTITY date_and_time;
+ date_component : date;
+ time_component : local_time;
+END_ENTITY;
+
+
+ENTITY date_and_time_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_date_and_time : date_and_time;
+ role : date_time_role;
+END_ENTITY;
+
+
+ENTITY date_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_date : date;
+ role : date_role;
+END_ENTITY;
+
+
+ENTITY date_representation_item
+ SUBTYPE OF (representation_item, date);
+END_ENTITY;
+
+
+ENTITY date_role;
+ name : label;
+DERIVE
+ description : text := get_description_value (SELF);
+WHERE
+ WR1 : SIZEOF (USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY date_time_representation_item
+ SUBTYPE OF (representation_item, date_and_time);
+END_ENTITY;
+
+
+ENTITY date_time_role;
+ name : label;
+DERIVE
+ description : text := get_description_value (SELF);
+WHERE
+ WR1 : SIZEOF (USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY dated_effectivity
+ SUBTYPE OF (effectivity);
+ effectivity_end_date : OPTIONAL date_time_or_event_occurrence;
+ effectivity_start_date : date_time_or_event_occurrence;
+END_ENTITY;
+
+
+ENTITY datum
+ SUBTYPE OF (shape_aspect);
+ identification : identifier;
+INVERSE
+ established_by_relationships: SET [1:?] OF shape_aspect_relationship FOR related_shape_aspect;
+WHERE
+ WR1 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMMON_DATUM' IN TYPEOF(SELF)) XOR
+ ((SIZEOF(QUERY(x <* SELF\datum.established_by_relationships |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DATUM_FEATURE' IN TYPEOF(x\shape_aspect_relationship.relating_shape_aspect)))) = 1) XOR
+ (SIZEOF(QUERY(x <* SELF\datum.established_by_relationships |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DATUM_TARGET' IN TYPEOF(x\shape_aspect_relationship.relating_shape_aspect)))) >= 1));
+END_ENTITY;
+
+
+ENTITY datum_feature
+ SUBTYPE OF (shape_aspect);
+INVERSE
+ feature_basis_relationship: SET [1:?] OF shape_aspect_relationship FOR relating_shape_aspect;
+WHERE
+ WR1 : SIZEOF(QUERY(sar <* SELF\datum_feature.feature_basis_relationship
+ | ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DATUM' IN TYPEOF
+ (sar\shape_aspect_relationship.related_shape_aspect)))) = 1;
+ WR2 : SELF\shape_aspect.product_definitional = TRUE;
+END_ENTITY;
+
+
+ENTITY datum_feature_callout
+ SUBTYPE OF (draughting_callout);
+END_ENTITY;
+
+
+ENTITY datum_reference;
+ precedence : INTEGER;
+ referenced_datum : datum;
+WHERE
+ WR1 : precedence > 0;
+END_ENTITY;
+
+
+ENTITY datum_target
+ SUBTYPE OF (shape_aspect);
+ target_id : identifier;
+INVERSE
+ target_basis_relationship: SET [1:?] OF shape_aspect_relationship FOR relating_shape_aspect;
+WHERE
+ WR1 : SIZEOF(QUERY(sar <* SELF\datum_target.target_basis_relationship
+ | ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DATUM' IN TYPEOF
+ (sar\shape_aspect_relationship.related_shape_aspect)))) = 1;
+ WR2 : SELF\shape_aspect.product_definitional = TRUE;
+END_ENTITY;
+
+
+ENTITY datum_target_callout
+ SUBTYPE OF (draughting_callout);
+END_ENTITY;
+
+
+ENTITY default_tolerance_table
+ SUBTYPE OF (representation);
+WHERE
+ WR1 : SIZEOF( QUERY( i <* SELF.items | NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DEFAULT_TOLERANCE_TABLE_CELL' IN TYPEOF(i)) )) = 0;
+ WR2 : (SIZEOF( QUERY( rr <* USEDIN(SELF,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'REPRESENTATION_RELATIONSHIP.REP_1') | rr.name < 'general tolerance definition' )) = 0) AND (SIZEOF( QUERY( rr <* USEDIN(SELF,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'REPRESENTATION_RELATIONSHIP.REP_1') | (rr.name = 'general tolerance definition') AND (rr.rep_2.name < 'default tolerance') )) = 0) AND (SIZEOF( USEDIN(SELF,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'REPRESENTATION_RELATIONSHIP.REP_2') ) = 0);
+END_ENTITY;
+
+
+ENTITY default_tolerance_table_cell
+ SUBTYPE OF (compound_representation_item);
+WHERE
+ WR1 : SIZEOF(QUERY( x <* USEDIN(SELF,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'REPRESENTATION.ITEMS') | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'DEFAULT_TOLERANCE_TABLE' IN TYPEOF(x)))=1;
+ WR2 : default_tolerance_table_cell_wr2(SELF\compound_representation_item.item_element);
+ WR3 : default_tolerance_table_cell_wr3(SELF\compound_representation_item.item_element);
+ WR4 : default_tolerance_table_cell_wr4(SELF\compound_representation_item.item_element);
+ WR5 : default_tolerance_table_cell_wr5(SELF\compound_representation_item.item_element);
+END_ENTITY;
+
+
+ENTITY defined_symbol
+ SUBTYPE OF (geometric_representation_item);
+ definition : defined_symbol_select;
+ target : symbol_target;
+END_ENTITY;
+
+
+ENTITY definitional_representation
+ SUBTYPE OF (representation);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PARAMETRIC_REPRESENTATION_CONTEXT' IN
+ TYPEOF (SELF\representation.context_of_items );
+END_ENTITY;
+
+
+ENTITY definitional_representation_relationship
+ SUBTYPE OF (representation_relationship);
+WHERE
+ WR1 : acyclic_representation_relationship(SELF,
+ [SELF\representation_relationship.rep_2],
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'REPRESENTATION');
+END_ENTITY;
+
+
+ENTITY definitional_representation_relationship_with_same_context
+ SUBTYPE OF (definitional_representation_relationship);
+WHERE
+ WR1 : SELF\representation_relationship.rep_1.context_of_items :=:
+ SELF\representation_relationship.rep_2.context_of_items;
+END_ENTITY;
+
+
+ENTITY degenerate_pcurve
+ SUBTYPE OF (point);
+ basis_surface : surface;
+ reference_to_curve : definitional_representation;
+WHERE
+ WR1 : SIZEOF(reference_to_curve\representation.items) = 1;
+ WR2 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE' IN TYPEOF
+ (reference_to_curve\representation.items[1]);
+ WR3 : reference_to_curve\representation.
+ items[1]\geometric_representation_item.dim =2;
+END_ENTITY;
+
+
+ENTITY degenerate_toroidal_surface
+ SUBTYPE OF (toroidal_surface);
+ select_outer : BOOLEAN;
+WHERE
+ WR1 : major_radius < minor_radius;
+END_ENTITY;
+
+
+ENTITY derived_shape_aspect
+ SUPERTYPE OF (ONEOF (apex, centre_of_symmetry, geometric_alignment, geometric_intersection, parallel_offset, perpendicular_to, extension, tangent))
+ SUBTYPE OF (shape_aspect);
+INVERSE
+ deriving_relationships: SET [1:?] OF shape_aspect_relationship FOR relating_shape_aspect;
+WHERE
+ WR1 : SIZEOF (QUERY (dr <*
+ SELF\derived_shape_aspect.deriving_relationships |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'SHAPE_ASPECT_DERIVING_RELATIONSHIP'
+ IN TYPEOF (dr)))) = 0;
+END_ENTITY;
+
+
+ENTITY derived_unit
+ SUPERTYPE OF (ONEOF (absorbed_dose_unit, acceleration_unit, radioactivity_unit, area_unit, capacitance_unit, dose_equivalent_unit, electric_charge_unit, conductance_unit, electric_potential_unit, energy_unit, magnetic_flux_density_unit, force_unit, frequency_unit, illuminance_unit, inductance_unit, magnetic_flux_unit, power_unit, pressure_unit, resistance_unit, velocity_unit, volume_unit));
+ elements : SET [1:?] OF derived_unit_element;
+DERIVE
+ name : label := get_name_value(SELF);
+WHERE
+ WR1 : (SIZEOF(elements) > 1) OR ((SIZEOF(elements) = 1) AND (elements[1].exponent <> 1.0));
+ WR2 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'NAME_ATTRIBUTE.NAMED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY derived_unit_element;
+ unit : named_unit;
+ exponent : REAL;
+END_ENTITY;
+
+
+ENTITY description_attribute;
+ attribute_value : text;
+ described_item : description_attribute_select;
+END_ENTITY;
+
+
+ENTITY descriptive_representation_item
+ SUPERTYPE OF (ONEOF (tagged_text_item, uniform_resource_identifier))
+ SUBTYPE OF (representation_item);
+ description : text;
+END_ENTITY;
+
+
+ENTITY design_context
+ SUBTYPE OF (product_definition_context);
+WHERE
+ WR1 : SELF.life_cycle_stage = 'design';
+END_ENTITY;
+
+
+ENTITY design_make_from_relationship
+ SUBTYPE OF (product_definition_relationship);
+END_ENTITY;
+
+
+ENTITY diameter_dimension
+ SUBTYPE OF (dimension_curve_directed_callout);
+END_ENTITY;
+
+
+ENTITY dielectric_constant_measure_with_unit
+ SUBTYPE OF (ratio_measure_with_unit);
+END_ENTITY;
+
+
+ENTITY dimension_callout
+ SUBTYPE OF (draughting_callout);
+WHERE
+ WR1 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LEADER_DIRECTED_CALLOUT'
+ IN (TYPEOF (SELF))) XOR
+ (SIZEOF (QUERY(dce_1 <* SELF\draughting_callout.contents |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LEADER_CURVE'
+ IN (TYPEOF(dce_1))))) = 0);
+ WR2 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PROJECTION_DIRECTED_CALLOUT'
+ IN (TYPEOF (SELF))) XOR
+ (SIZEOF (QUERY(dce_1 <* SELF\draughting_callout.contents |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PROJECTION_CURVE'
+ IN (TYPEOF(dce_1))))) = 0);
+ WR3 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DIMENSION_CURVE_DIRECTED_CALLOUT'
+ IN (TYPEOF (SELF))) XOR
+ (SIZEOF (QUERY(dce_1 <* SELF\draughting_callout.contents |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DIMENSION_CURVE'
+ IN (TYPEOF(dce_1))))) = 0);
+END_ENTITY;
+
+
+ENTITY dimension_callout_component_relationship
+ SUBTYPE OF (draughting_callout_relationship);
+WHERE
+ WR1 : SELF.name IN ['prefix', 'suffix'];
+ WR2 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STRUCTURED_DIMENSION_CALLOUT'
+ IN TYPEOF (SELF.relating_draughting_callout);
+ WR3 : SIZEOF (TYPEOF (SELF.related_draughting_callout) *
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LEADER_DIRECTED_CALLOUT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PROJECTION_DIRECTED_CALLOUT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DIMENSION_CURVE_DIRECTED_CALLOUT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STRUCTURED_DIMENSION_CALLOUT']) = 0;
+ WR4 : SELF.related_draughting_callout.contents *
+ SELF.relating_draughting_callout.contents =
+ SELF.related_draughting_callout.contents;
+ WR5 : ((SELF.name = 'prefix') AND
+ (SIZEOF (QUERY (ato <* QUERY (con <*
+ SELF.related_draughting_callout.contents |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_OCCURRENCE'
+ IN TYPEOF(con))) |
+ NOT (ato.name = 'prefix text')
+ )) = 0));
+ WR6 : ((SELF.name = 'suffix') AND
+ (SIZEOF (QUERY (ato <* QUERY (con <*
+ SELF.related_draughting_callout.contents |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_OCCURRENCE'
+ IN TYPEOF(con))) |
+ NOT (ato.name = 'suffix text')
+ )) = 0));
+END_ENTITY;
+
+
+ENTITY dimension_callout_relationship
+ SUBTYPE OF (draughting_callout_relationship);
+WHERE
+ WR1 : SELF.name IN ['primary', 'secondary'];
+ WR2 : SIZEOF (TYPEOF (SELF.relating_draughting_callout) *
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANGULAR_DIMENSION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_DIMENSION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DIAMETER_DIMENSION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LEADER_DIRECTED_DIMENSION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LINEAR_DIMENSION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORDINATE_DIMENSION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.RADIUS_DIMENSION'])>=1;
+ WR3 : SIZEOF (TYPEOF (SELF.related_draughting_callout) *
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DIMENSION_CURVE_DIRECTED_CALLOUT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PROJECTION_DIRECTED_CALLOUT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LEADER_DIRECTED_CALLOUT']) = 0;
+ WR4 : SELF.related_draughting_callout.contents *
+ SELF.relating_draughting_callout.contents =
+ SELF.related_draughting_callout.contents;
+END_ENTITY;
+
+
+ENTITY dimension_curve
+ SUBTYPE OF (annotation_curve_occurrence);
+WHERE
+ WR1 : (SIZEOF(
+ QUERY(dct <* USEDIN(SELF,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'TERMINATOR_SYMBOL.ANNOTATED_CURVE')
+ | (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DIMENSION_CURVE_TERMINATOR' IN TYPEOF(dct))
+ ))
+ ) <= 2);
+ WR2 : SIZEOF(
+ QUERY( dcdc <* USEDIN(SELF,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_CALLOUT.CONTENTS') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DIMENSION_CURVE_DIRECTED_CALLOUT' IN TYPEOF(dcdc)))
+ )>= 1;
+ WR3 : (SIZEOF(
+ QUERY(dct1 <* USEDIN(SELF,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'TERMINATOR_SYMBOL.ANNOTATED_CURVE')
+ | (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DIMENSION_CURVE_TERMINATOR' IN TYPEOF(dct1))
+ AND (dct1\dimension_curve_terminator.role = dimension_extent_usage.origin)))
+ ) <= 1)
+ AND
+ (SIZEOF(
+ QUERY (dct2 <* USEDIN(SELF,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'TERMINATOR_SYMBOL.ANNOTATED_CURVE')
+ | (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DIMENSION_CURVE_TERMINATOR' IN TYPEOF(dct2))
+ AND (dct2\dimension_curve_terminator.role = dimension_extent_usage.target)))
+ ) <= 1);
+END_ENTITY;
+
+
+ENTITY dimension_curve_directed_callout
+ SUBTYPE OF (draughting_callout);
+WHERE
+ WR1 : SIZEOF(QUERY(d_c<*SELF\draughting_callout.contents |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DIMENSION_CURVE' IN (TYPEOF(d_c))))=1;
+ WR2 : SIZEOF(SELF\draughting_callout.contents) >= 2;
+END_ENTITY;
+
+
+ENTITY dimension_curve_terminator
+ SUBTYPE OF (terminator_symbol);
+ role : dimension_extent_usage;
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DIMENSION_CURVE' IN TYPEOF
+ (SELF\terminator_symbol.annotated_curve);
+END_ENTITY;
+
+
+ENTITY dimension_curve_terminator_to_projection_curve_associativity
+ SUBTYPE OF (annotation_occurrence_associativity);
+ SELF\annotation_occurrence_relationship.related_annotation_occurrence : projection_curve;
+ SELF\annotation_occurrence_relationship.relating_annotation_occurrence : dimension_curve_terminator;
+END_ENTITY;
+
+
+ENTITY dimension_pair
+ SUBTYPE OF (draughting_callout_relationship);
+WHERE
+ WR1 : SELF.name IN ['chained', 'parallel'];
+ WR2 : SIZEOF (TYPEOF (SELF.relating_draughting_callout) *
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANGULAR_DIMENSION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_DIMENSION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DIAMETER_DIMENSION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LINEAR_DIMENSION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORDINATE_DIMENSION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.RADIUS_DIMENSION'])=1;
+ WR3 : SIZEOF (TYPEOF (SELF.related_draughting_callout) *
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANGULAR_DIMENSION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_DIMENSION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DIAMETER_DIMENSION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LINEAR_DIMENSION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORDINATE_DIMENSION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.RADIUS_DIMENSION'])=1;
+END_ENTITY;
+
+
+ENTITY dimension_related_tolerance_zone_element;
+ related_dimension : dimensional_location;
+ related_element : tolerance_zone_definition;
+END_ENTITY;
+
+
+ENTITY dimension_text_associativity
+ SUBTYPE OF (text_literal, mapped_item);
+WHERE
+ WR1 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHAPE_DIMENSION_REPRESENTATION'
+ IN TYPEOF (SELF\mapped_item.
+ mapping_source.mapped_representation));
+ WR2 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DRAUGHTING_CALLOUT'
+ IN TYPEOF (SELF\mapped_item.mapping_target));
+ WR3 : SIZEOF (QUERY (ato <* QUERY (si <*
+ USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM.ITEM') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_OCCURRENCE'
+ IN TYPEOF(si))) |
+ NOT (SIZEOF( QUERY (dc <*
+ USEDIN (ato, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_CALLOUT.CONTENTS') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DRAUGHTING_CALLOUT'
+ IN TYPEOF (dc)))
+ * [SELF\mapped_item.mapping_target]) = 1)
+ )) = 0;
+END_ENTITY;
+
+
+ENTITY dimensional_characteristic_representation;
+ dimension : dimensional_characteristic;
+ representation : shape_dimension_representation;
+END_ENTITY;
+
+
+ENTITY dimensional_exponents;
+ length_exponent : REAL;
+ mass_exponent : REAL;
+ time_exponent : REAL;
+ electric_current_exponent : REAL;
+ thermodynamic_temperature_exponent : REAL;
+ amount_of_substance_exponent : REAL;
+ luminous_intensity_exponent : REAL;
+END_ENTITY;
+
+
+ENTITY dimensional_location
+ SUPERTYPE OF (ONEOF (angular_location, dimensional_location_with_path))
+ SUBTYPE OF (shape_aspect_relationship);
+END_ENTITY;
+
+
+ENTITY dimensional_location_with_path
+ SUBTYPE OF (dimensional_location);
+ path : shape_aspect;
+END_ENTITY;
+
+
+ENTITY dimensional_size
+ SUPERTYPE OF (ONEOF (angular_size, dimensional_size_with_path));
+ applies_to : shape_aspect;
+ name : label;
+WHERE
+ WR1 : applies_to.product_definitional = TRUE;
+END_ENTITY;
+
+
+ENTITY dimensional_size_with_path
+ SUBTYPE OF (dimensional_size);
+ path : shape_aspect;
+END_ENTITY;
+
+
+ENTITY directed_action
+ SUBTYPE OF (executed_action);
+ directive : action_directive;
+END_ENTITY;
+
+
+ENTITY directed_dimensional_location
+ SUBTYPE OF (dimensional_location);
+END_ENTITY;
+
+
+ENTITY direction
+ SUBTYPE OF (geometric_representation_item);
+ direction_ratios : LIST [2:3] OF REAL;
+WHERE
+ WR1 : SIZEOF(QUERY(tmp <* direction_ratios | tmp <> 0.0)) > 0;
+END_ENTITY;
+
+
+ENTITY document;
+ id : identifier;
+ name : label;
+ description : OPTIONAL text;
+ kind : document_type;
+INVERSE
+ representation_types: SET [0:?] OF document_representation_type FOR represented_document;
+END_ENTITY;
+
+
+ENTITY document_file
+ SUBTYPE OF (document, characterized_object);
+WHERE
+ WR1 : SELF\characterized_object.name = '';
+ WR2 : NOT EXISTS(SELF\characterized_object.description);
+ WR3 : SIZEOF( QUERY( drt <* SELF\document.representation_types |
+ drt.name IN ['digital','physical'])) = 1;
+END_ENTITY;
+
+
+ENTITY document_identifier
+ SUBTYPE OF (group);
+UNIQUE
+ UR1: SELF\group.name, SELF\group.description;
+END_ENTITY;
+
+
+ENTITY document_identifier_assignment
+ SUBTYPE OF (group_assignment);
+ items : SET [1:?] OF document_identifier_assigned_item;
+ SELF\group_assignment.assigned_group : document_identifier;
+END_ENTITY;
+
+
+ENTITY document_product_association;
+ name : label;
+ description : OPTIONAL text;
+ relating_document : document;
+ related_product : product_or_formation_or_definition;
+END_ENTITY;
+
+
+ENTITY document_product_equivalence
+ SUBTYPE OF (document_product_association);
+WHERE
+ WR1 : SELF\document_product_association.name = 'equivalence';
+ WR2 : NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT' IN TYPEOF(SELF\document_product_association.related_product)) OR ((SELF\document_product_association.relating_document.kind. product_data_type = 'configuration controlled document') AND (SIZEOF( QUERY( prpc <* USEDIN(SELF\document_product_association.related_product,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS') | prpc.name = 'document' )) = 1));
+ WR3 : NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION_FORMATION' IN TYPEOF(SELF.related_product)) OR ((SELF\document_product_association.relating_document.kind.product_data_type = 'configuration controlled document version') AND (SIZEOF( QUERY( prpc <* USEDIN(SELF.related_product\product_definition_formation.of_product, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS') | prpc.name = 'document')) = 1));
+ WR4 : NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION' IN TYPEOF(SELF.related_product)) OR ((SELF\document_product_association.relating_document.kind.product_data_type = 'configuration controlled document definition') AND (SIZEOF( QUERY( prpc <* USEDIN(SELF\document_product_association.related_product\product_definition.formation.of_product, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS') | prpc.name = 'document' )) = 1));
+END_ENTITY;
+
+
+ENTITY document_reference
+ ABSTRACT SUPERTYPE;
+ assigned_document : document;
+ source : label;
+DERIVE
+ role : object_role := get_role(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ROLE_ASSOCIATION.ITEM_WITH_ROLE')) <= 1;
+END_ENTITY;
+
+
+ENTITY document_relationship;
+ name : label;
+ description : OPTIONAL text;
+ relating_document : document;
+ related_document : document;
+END_ENTITY;
+
+
+ENTITY document_representation_type;
+ name : label;
+ represented_document : document;
+END_ENTITY;
+
+
+ENTITY document_type;
+ product_data_type : label;
+END_ENTITY;
+
+
+ENTITY document_usage_constraint;
+ source : document;
+ subject_element : label;
+ subject_element_value : text;
+END_ENTITY;
+
+
+ENTITY document_usage_constraint_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_document_usage : document_usage_constraint;
+ role : document_usage_role;
+END_ENTITY;
+
+
+ENTITY document_usage_role;
+ name : label;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY dose_equivalent_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DOSE_EQUIVALENT_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY dose_equivalent_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) = dimensions_for_si_unit (si_unit_name.sievert);
+END_ENTITY;
+
+
+ENTITY double_offset_shelled_solid
+ SUBTYPE OF (shelled_solid);
+ thickness2 : length_measure;
+WHERE
+ WR1 : thickness2 <> 0;
+ WR2 : SELF\shelled_solid.thickness <> thickness2;
+END_ENTITY;
+
+
+ENTITY draped_defined_transformation
+ SUBTYPE OF (transformation_with_derived_angle);
+END_ENTITY;
+
+
+ENTITY draughting_annotation_occurrence
+ SUBTYPE OF (annotation_occurrence);
+WHERE
+ WR1 : (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_CURVE_OCCURRENCE'
+ IN TYPEOF (SELF))) OR
+ (SIZEOF (QUERY (sty <* SELF.styles |
+ NOT ((SIZEOF (sty.styles) = 1)
+ AND ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE'
+ IN TYPEOF (sty.styles[1]))) )) = 0);
+ WR2 : (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_FILL_AREA_OCCURRENCE'
+ IN TYPEOF (SELF))) OR (SIZEOF (QUERY (sty <* SELF.styles |
+ NOT ((SIZEOF (sty.styles) = 1)
+ AND ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FILL_AREA_STYLE'
+ IN TYPEOF (sty.styles[1]))) )) = 0);
+ WR3 : (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_FILL_AREA_OCCURRENCE'
+ IN TYPEOF (SELF))) OR (SIZEOF (QUERY (bound <*
+ SELF.item\annotation_fill_area.boundaries |
+ NOT (SIZEOF (QUERY (si <*
+ USEDIN (bound, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'STYLED_ITEM.ITEM') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'ANNOTATION_CURVE_OCCURRENCE' IN TYPEOF (si)))) > 0))) = 0);
+ WR4 : (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_SYMBOL_OCCURRENCE'
+ IN TYPEOF (SELF))) OR (SIZEOF (QUERY (sty <* SELF.styles |
+ NOT ((SIZEOF (sty.styles) = 1) AND
+ (SIZEOF (TYPEOF (sty.styles[1]) *
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SYMBOL_STYLE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.NULL_STYLE']) = 1)) )) = 0);
+ WR5 : (NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_SYMBOL_OCCURRENCE'
+ IN TYPEOF (SELF)) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_SYMBOL'
+ IN TYPEOF(SELF.item)))) OR
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_SYMBOL_REPRESENTATION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_SUBFIGURE_REPRESENTATION'] *
+ TYPEOF (SELF.item\mapped_item.mapping_source.
+ mapped_representation)) = 1);
+ WR6 : (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_OCCURRENCE'
+ IN TYPEOF (SELF))) OR
+ (SIZEOF (QUERY (sty <* SELF.styles |
+ NOT ((SIZEOF (sty.styles) = 1)
+ AND ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TEXT_STYLE'
+ IN TYPEOF (sty.styles[1]))) )) = 0);
+ WR7 : (NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_OCCURRENCE'
+ IN TYPEOF (SELF))) OR
+ (SIZEOF (TYPEOF(SELF.item) *
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPOSITE_TEXT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TEXT_LITERAL']) = 1);
+ WR8 : (NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_OCCURRENCE'
+ IN TYPEOF (SELF)) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPOSITE_TEXT'
+ IN TYPEOF (SELF.item)))) OR (SIZEOF (QUERY (tl <*
+ SELF.item\composite_text.collected_text |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TEXT_LITERAL'
+ IN TYPEOF (tl)) )) = 0);
+ WR9 : (NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_OCCURRENCE'
+ IN TYPEOF (SELF)) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TEXT_LITERAL'
+ IN TYPEOF (SELF.item)))) OR (SELF.item\text_literal.alignment
+ IN ['baseline left', 'baseline centre', 'baseline right']);
+ WR10 : (NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_OCCURRENCE'
+ IN TYPEOF (SELF)) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPOSITE_TEXT'
+ IN TYPEOF (SELF.item)))) OR
+ (SIZEOF (QUERY (tl <* QUERY (text <* SELF.
+ item\composite_text.collected_text
+ |('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TEXT_LITERAL' IN TYPEOF(text))) |
+ NOT (tl\text_literal.alignment IN
+ ['baseline left', 'baseline centre', 'baseline right']) )) = 0);
+ WR11 : NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_OCCURRENCE'
+ IN TYPEOF(SELF)) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPOSITE_TEXT'
+ IN TYPEOF (SELF.item))) OR check_text_alignment(SELF.item);
+ WR12 : NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_OCCURRENCE'
+ IN TYPEOF(SELF)) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPOSITE_TEXT'
+ IN TYPEOF (SELF.item))) OR check_text_font(SELF.item);
+ WR13 : (NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_OCCURRENCE'
+ IN TYPEOF(SELF)) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPOSITE_TEXT'
+ IN TYPEOF (SELF.item)))) OR
+ (SIZEOF (QUERY (tl <* QUERY (text <*
+ SELF.item\composite_text.collected_text |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TEXT_LITERAL' IN TYPEOF (text))) |
+ NOT (SIZEOF (TYPEOF(tl) *
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'TEXT_LITERAL_WITH_BLANKING_BOX',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'TEXT_LITERAL_WITH_ASSOCIATED_CURVES']) = 0) )) = 0);
+ WR14 : (NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_OCCURRENCE'
+ IN TYPEOF (SELF)) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TEXT_LITERAL_WITH_ASSOCIATED_CURVES'
+ IN TYPEOF (SELF.item)))) OR
+ (SIZEOF (QUERY (crv <*
+ SELF.item\text_literal_with_associated_curves.
+ associated_curves |
+ NOT (SIZEOF (QUERY (si <* USEDIN (crv,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM.ITEM') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_CURVE_OCCURRENCE'
+ IN TYPEOF (si)) )) > 0) )) = 0);
+ WR15 : (NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_OCCURRENCE'
+ IN TYPEOF (SELF)) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPOSITE_TEXT_WITH_ASSOCIATED_CURVES'
+ IN TYPEOF (SELF.item)))) OR
+ (SIZEOF (QUERY (crv <*
+ SELF.item\composite_text_with_associated_curves.
+ associated_curves |
+ NOT (SIZEOF (QUERY (si <* USEDIN (crv,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM.ITEM') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_CURVE_OCCURRENCE'
+ IN TYPEOF (si)) )) > 0) )) = 0);
+ WR16 : SIZEOF (QUERY (cs <* QUERY (sty <* SELF.styles |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE' IN TYPEOF (sty.styles[1])))
+ | NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LENGTH_MEASURE_WITH_UNIT'
+ IN TYPEOF (cs.styles[1]\curve_style.curve_width)) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POSITIVE_LENGTH_MEASURE'
+ IN TYPEOF (cs.styles[1]\curve_style.
+ curve_width\measure_with_unit.value_component))))) = 0;
+ WR17 : SIZEOF (QUERY (fas <* QUERY (sty <* SELF.styles |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FILL_AREA_STYLE'
+ IN TYPEOF (sty.styles[1]))) |
+ NOT ((SIZEOF (QUERY (fs <* fas.styles[1]\fill_area_style.fill_styles
+ | ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FILL_AREA_STYLE_TILES'
+ IN TYPEOF (fs)))) <= 1)
+ AND (SIZEOF (QUERY (fst <* QUERY (fs <*
+ fas.styles[1]\fill_area_style.fill_styles |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FILL_AREA_STYLE_TILES'
+ IN TYPEOF (fs))) |
+ NOT (SIZEOF (fst\fill_area_style_tiles.tiles) = 1)
+ )) = 0))
+ )) = 0;
+ WR18 : SIZEOF (QUERY (fas <* QUERY (sty <* SELF.styles |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FILL_AREA_STYLE'
+ IN TYPEOF (sty.styles[1]))) |
+ NOT (SIZEOF (QUERY (fsh <* QUERY (fs <*
+ fas.styles[1]\fill_area_style.fill_styles |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FILL_AREA_STYLE_HATCHING'
+ IN TYPEOF (fs))) |
+ NOT (fsh\fill_area_style_hatching.point_of_reference_hatch_line :=:
+ fsh\fill_area_style_hatching.pattern_start) )) = 0) )) = 0;
+ WR19 : SIZEOF (QUERY (ts <* QUERY (sty <* SELF.styles |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TEXT_STYLE'
+ IN TYPEOF(sty.styles[1]))) |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'TEXT_STYLE_WITH_BOX_CHARACTERISTICS'
+ IN TYPEOF (ts.styles[1])))) = 0;
+ WR20 : SIZEOF (QUERY (ts <* QUERY (sty <* SELF.styles |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TEXT_STYLE_WITH_BOX_CHARACTERISTICS'
+ IN TYPEOF (sty.styles[1]))) |
+ NOT (SIZEOF (ts.styles[1]\text_style_with_box_characteristics.
+ characteristics) = 4) )) = 0;
+END_ENTITY;
+
+
+ENTITY draughting_callout
+ SUPERTYPE OF ((ONEOF (datum_feature_callout, datum_target_callout, dimension_curve_directed_callout, draughting_elements, geometrical_tolerance_callout, leader_directed_callout, projection_directed_callout, structured_dimension_callout) ANDOR surface_condition_callout))
+ SUBTYPE OF (geometric_representation_item);
+ contents : SET [1:?] OF draughting_callout_element;
+WHERE
+ WR1 : (SIZEOF (QUERY (l_1 <* SELF\draughting_callout.contents |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LEADER_CURVE' IN (TYPEOF(l_1)))) = 0) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LEADER_DIRECTED_CALLOUT' IN (TYPEOF(SELF))) AND
+ (SIZEOF (QUERY (l_1 <* SELF\draughting_callout.contents |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PROJECTION_CURVE' IN (TYPEOF(l_1)))) = 0) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PROJECTION_DIRECTED_CALLOUT' IN (TYPEOF(SELF))) AND
+ (SIZEOF (QUERY (l_1 <* SELF\draughting_callout.contents |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DIMENSION_CURVE' IN (TYPEOF(l_1)))) = 0) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DIMENSION_CURVE_DIRECTED_CALLOUT' IN (TYPEOF(SELF)));
+END_ENTITY;
+
+
+ENTITY draughting_callout_relationship;
+ name : label;
+ description : text;
+ relating_draughting_callout : draughting_callout;
+ related_draughting_callout : draughting_callout;
+END_ENTITY;
+
+
+ENTITY draughting_elements
+ SUBTYPE OF (draughting_callout);
+WHERE
+ WR1 : SIZEOF (QUERY (l_c <* QUERY (con <* SELF.contents |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LEADER_CURVE' IN TYPEOF(con))) |
+ NOT (SIZEOF (QUERY (ldc <* USEDIN (l_c,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'DRAUGHTING_CALLOUT.CONTENTS') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LEADER_DIRECTED_CALLOUT'
+ IN TYPEOF (ldc)))) <= 1)))=0;
+ WR2 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DIMENSION_CURVE_DIRECTED_CALLOUT'
+ IN TYPEOF(SELF)) OR
+ (SIZEOF (QUERY (con <* SELF.contents |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PROJECTION_CURVE' IN
+ TYPEOF (con)))) <= 2);
+ WR3 : SIZEOF (QUERY (rc <* USEDIN (SELF,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DRAUGHTING_CALLOUT_' +
+ 'RELATIONSHIP.RELATING_DRAUGHTING_CALLOUT') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DIMENSION_CALLOUT_RELATIONSHIP' IN TYPEOF (rc)) AND
+ (rc.name = 'primary') )) <= 1;
+ WR4 : SIZEOF (QUERY (rc <* USEDIN (SELF,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DRAUGHTING_CALLOUT_' +
+ 'RELATIONSHIP.RELATING_DRAUGHTING_CALLOUT') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DIMENSION_CALLOUT_RELATIONSHIP' IN TYPEOF (rc)) AND
+ (rc.name = 'secondary') )) <= 1;
+ WR5 : SIZEOF (QUERY (sec <* QUERY (rc <* USEDIN (SELF,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DRAUGHTING_CALLOUT_' +
+ 'RELATIONSHIP.RELATING_DRAUGHTING_CALLOUT') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DIMENSION_CALLOUT_RELATIONSHIP' IN TYPEOF (rc)) AND
+ (rc.name = 'secondary') ) |
+ NOT (SIZEOF (QUERY (prim <* USEDIN (SELF,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DRAUGHTING_CALLOUT_' +
+ 'RELATIONSHIP.RELATING_DRAUGHTING_CALLOUT') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DIMENSION_CALLOUT_RELATIONSHIP' IN TYPEOF (prim)) AND
+ (prim.name = 'primary') )) = 1))) = 0;
+END_ENTITY;
+
+
+ENTITY draughting_model
+ SUBTYPE OF (representation);
+ SELF\representation.items : SET [1:?] OF draughting_model_item_select;
+UNIQUE
+ UR1: SELF\representation.name;
+WHERE
+ WR1 : SIZEOF (QUERY (mi <* QUERY (it <* SELF.items |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' IN TYPEOF(it))) |
+ NOT (
+ SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHAPE_REPRESENTATION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DRAUGHTING_MODEL'] *
+ TYPEOF (mi\mapped_item.mapping_source.
+ mapped_representation)) = 1
+ ))) = 0;
+ WR2 : SIZEOF (QUERY (smi <* QUERY (si <* QUERY (it <* SELF.items |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM' IN TYPEOF(it))) |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' IN
+ TYPEOF(si\styled_item.item))) |
+ (NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHAPE_REPRESENTATION' IN
+ TYPEOF(smi\styled_item.item\mapped_item.
+ mapping_source.mapped_representation))
+ AND
+ (SIZEOF (QUERY (sty <* smi\styled_item.styles |
+ (NOT (SIZEOF (QUERY (psa <* sty.styles |
+ (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE' IN TYPEOF(psa))))) = 1
+ )))) = 1)))
+ )) = 0;
+END_ENTITY;
+
+
+ENTITY draughting_model_item_association
+ SUBTYPE OF (item_identified_representation_usage);
+ SELF\item_identified_representation_usage.definition : shape_definition;
+ SELF\item_identified_representation_usage.identified_item : draughting_model_item_association_select;
+ SELF\item_identified_representation_usage.used_representation : draughting_model;
+END_ENTITY;
+
+
+ENTITY draughting_pre_defined_colour
+ SUBTYPE OF (pre_defined_colour);
+WHERE
+ WR1 : SELF.name IN
+ ['red',
+ 'green',
+ 'blue',
+ 'yellow',
+ 'magenta',
+ 'cyan',
+ 'black',
+ 'white'];
+END_ENTITY;
+
+
+ENTITY draughting_pre_defined_curve_font
+ SUBTYPE OF (pre_defined_curve_font);
+WHERE
+ WR1 : SELF.name IN
+ ['continuous',
+ 'chain',
+ 'chain double dash',
+ 'dashed',
+ 'dotted'];
+END_ENTITY;
+
+
+ENTITY draughting_pre_defined_text_font
+ SUBTYPE OF (pre_defined_text_font);
+WHERE
+ WR1 : SELF.name[1:8] = 'ISO 3098';
+END_ENTITY;
+
+
+ENTITY draughting_subfigure_representation
+ SUBTYPE OF (symbol_representation);
+WHERE
+ WR1 : SIZEOF (QUERY (item <* SELF\representation.items |
+ NOT (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_OCCURRENCE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DRAUGHTING_CALLOUT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT']
+ * TYPEOF (item)) = 1))) = 0;
+ WR2 : SIZEOF (QUERY (item <* SELF\representation.items |
+ SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_OCCURRENCE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DRAUGHTING_CALLOUT'] *
+ TYPEOF (item)) = 1)) >= 1;
+ WR3 : SIZEOF (QUERY (srm <* QUERY (rm <*
+ USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'REPRESENTATION_MAP.MAPPED_REPRESENTATION') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SYMBOL_REPRESENTATION_MAP'
+ IN TYPEOF(rm))) |
+ NOT (SIZEOF (QUERY (a_s <* QUERY (mi <* srm.map_usage |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_SYMBOL' IN TYPEOF(mi)))
+ | NOT (SIZEOF (QUERY (aso <*
+ USEDIN (a_s, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'STYLED_ITEM.ITEM') |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_SUBFIGURE_OCCURRENCE'
+ IN TYPEOF(aso)))) = 0))) = 0))) > 0;
+ WR4 : NOT (acyclic_mapped_item_usage (SELF));
+ WR5 : SIZEOF (SELF.context_of_items.representations_in_context) = 1;
+END_ENTITY;
+
+
+ENTITY draughting_symbol_representation
+ SUBTYPE OF (symbol_representation);
+UNIQUE
+ UR1: SELF\representation.name;
+WHERE
+ WR1 : SIZEOF (QUERY (item <* SELF\representation.items |
+ NOT (SIZEOF (TYPEOF (item) *
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_CURVE_OCCURRENCE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_SYMBOL_OCCURRENCE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_FILL_AREA_OCCURRENCE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_OCCURRENCE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT']) = 1)
+ )) = 0;
+ WR2 : SIZEOF (QUERY (item <* SELF\representation.items |
+ (SIZEOF (TYPEOF (item) *
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_CURVE_OCCURRENCE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_SYMBOL_OCCURRENCE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_FILL_AREA_OCCURRENCE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_OCCURRENCE']) = 1)
+ )) >= 1;
+ WR3 : SIZEOF (QUERY (item <* SELF\representation.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_SUBFIGURE_OCCURRENCE'
+ IN TYPEOF (item))) = 0;
+ WR4 : SIZEOF (QUERY (srm <* QUERY (rm <*
+ USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'REPRESENTATION_MAP.MAPPED_REPRESENTATION') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SYMBOL_REPRESENTATION_MAP'
+ IN TYPEOF(rm))) |
+ (SIZEOF (QUERY (a_s <* QUERY (mi <* srm.map_usage |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_SYMBOL' IN TYPEOF(mi))) |
+ NOT (SIZEOF (QUERY(aso <*
+ USEDIN(a_s, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'STYLED_ITEM.ITEM') |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_SYMBOL_OCCURRENCE'
+ IN TYPEOF(aso))
+ )) = 0) )) = 0) )) > 0;
+ WR5 : NOT (acyclic_mapped_item_usage (SELF));
+ WR6 : SIZEOF (SELF.context_of_items.representations_in_context) = 1;
+END_ENTITY;
+
+
+ENTITY draughting_text_literal_with_delineation
+ SUBTYPE OF (text_literal_with_delineation);
+WHERE
+ WR1 : SELF.delineation IN ['underline', 'overline'];
+END_ENTITY;
+
+
+ENTITY draughting_title;
+ items : SET [1:?] OF draughting_titled_item;
+ language : label;
+ contents : text;
+END_ENTITY;
+
+
+ENTITY drawing_definition;
+ drawing_number : identifier;
+ drawing_type : OPTIONAL label;
+END_ENTITY;
+
+
+ENTITY drawing_revision
+ SUBTYPE OF (presentation_set);
+ revision_identifier : identifier;
+ drawing_identifier : drawing_definition;
+ intended_scale : OPTIONAL text;
+UNIQUE
+ UR1 : revision_identifier, drawing_identifier;
+END_ENTITY;
+
+
+ENTITY drawing_revision_sequence;
+ predecessor : drawing_revision;
+ successor : drawing_revision;
+WHERE
+ WR1 : predecessor :<>: successor;
+END_ENTITY;
+
+
+ENTITY drawing_sheet_revision
+ SUBTYPE OF (presentation_area);
+ revision_identifier : identifier;
+WHERE
+ WR1 : SIZEOF( QUERY(item <* SELF\representation.items |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' IN (TYPEOF(item)))
+ AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DRAWING_SHEET_REVISION' IN
+ (TYPEOF(item\mapped_item.mapping_source.mapped_representation)))))=0;
+END_ENTITY;
+
+
+ENTITY drawing_sheet_revision_sequence
+ SUBTYPE OF (representation_relationship);
+WHERE
+ WR1 : SELF\representation_relationship.rep_1 :<>:
+ SELF\representation_relationship.rep_2;
+ WR2 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DRAWING_SHEET_REVISION'
+ IN TYPEOF (SELF\representation_relationship.rep_1);
+ WR3 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DRAWING_SHEET_REVISION'
+ IN TYPEOF (SELF\representation_relationship.rep_2);
+END_ENTITY;
+
+
+ENTITY drawing_sheet_revision_usage
+ SUBTYPE OF (area_in_set);
+ sheet_number : identifier;
+UNIQUE
+ UR1: sheet_number, SELF\area_in_set.in_set;
+WHERE
+ WR1 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DRAWING_SHEET_REVISION' IN
+ TYPEOF(SELF\area_in_set.area))
+ AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DRAWING_REVISION'
+ IN TYPEOF (SELF\area_in_set.in_set));
+END_ENTITY;
+
+
+ENTITY edge
+ SUPERTYPE OF (ONEOF (edge_curve, oriented_edge, subedge))
+ SUBTYPE OF (topological_representation_item);
+ edge_start : vertex;
+ edge_end : vertex;
+END_ENTITY;
+
+
+ENTITY edge_based_wireframe_model
+ SUBTYPE OF (geometric_representation_item);
+ ebwm_boundary : SET [1:?] OF connected_edge_set;
+END_ENTITY;
+
+
+ENTITY edge_based_wireframe_shape_representation
+ SUBTYPE OF (shape_representation);
+WHERE
+ WR1 : SIZEOF (
+QUERY ( it <* SELF.items| NOT ( SIZEOF ([ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_BASED_WIREFRAME_MODEL', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT_3D' ] * TYPEOF (it)) = 1) )) = 0;
+ WR2 : SIZEOF (
+QUERY ( it <* SELF.items| ( SIZEOF ([ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_BASED_WIREFRAME_MODEL', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' ] * TYPEOF (it)) = 1) )) >= 1;
+ WR3 : SIZEOF (
+QUERY ( ebwm <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_BASED_WIREFRAME_MODEL' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( eb <* ebwm\edge_based_wireframe_model.ebwm_boundary| NOT ( SIZEOF (
+QUERY ( edges <* eb.ces_edges| NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_CURVE' IN TYPEOF (edges)) )) = 0) )) = 0) )) = 0;
+ WR4 : SIZEOF (
+QUERY ( ebwm <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_BASED_WIREFRAME_MODEL' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( eb <* ebwm\edge_based_wireframe_model.ebwm_boundary| NOT ( SIZEOF (
+QUERY ( pline_edges <*
+QUERY ( edges <* eb.ces_edges| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE' IN TYPEOF (edges\edge_curve.edge_geometry)) )| NOT ( SIZEOF (pline_edges\edge_curve.edge_geometry\polyline.points) > 2) )) = 0) )) = 0) )) = 0;
+ WR5 : SIZEOF (
+QUERY ( ebwm <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_BASED_WIREFRAME_MODEL' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( eb <* ebwm\edge_based_wireframe_model.ebwm_boundary| NOT ( SIZEOF (
+QUERY ( edges <* eb.ces_edges| NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN TYPEOF (edges.edge_start)) AND ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN TYPEOF (edges.edge_end))) )) = 0) )) = 0) )) = 0;
+ WR6 : SIZEOF (
+QUERY ( ebwm <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_BASED_WIREFRAME_MODEL' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( eb <* ebwm\edge_based_wireframe_model.ebwm_boundary| NOT ( SIZEOF (
+QUERY ( edges <* eb.ces_edges| NOT valid_wireframe_edge_curve(edges\edge_curve.edge_geometry) )) = 0) )) = 0) )) = 0;
+ WR7 : SIZEOF (
+QUERY ( ebwm <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_BASED_WIREFRAME_MODEL' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( eb <* ebwm\edge_based_wireframe_model.ebwm_boundary| NOT ( SIZEOF (
+QUERY ( edges <* eb.ces_edges| NOT (valid_wireframe_vertex_point(edges.edge_start\vertex_point.vertex_geometry) AND valid_wireframe_vertex_point(edges.edge_end\vertex_point.vertex_geometry)) )) = 0) )) = 0) )) = 0;
+ WR8 : SIZEOF (
+QUERY ( mi <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' IN TYPEOF (it)) )| NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'EDGE_BASED_WIREFRAME_SHAPE_REPRESENTATION' IN TYPEOF (mi\mapped_item.mapping_source.mapped_representation)) )) = 0;
+ WR9 : SELF.context_of_items\geometric_representation_context.coordinate_space_dimension = 3;
+END_ENTITY;
+
+
+ENTITY edge_blended_solid
+ ABSTRACT SUPERTYPE OF ((track_blended_solid ANDOR ONEOF (solid_with_constant_radius_edge_blend, solid_with_variable_radius_edge_blend, solid_with_chamfered_edges)))
+ SUBTYPE OF (modified_solid);
+ blended_edges : LIST [1:?] OF UNIQUE edge_curve;
+END_ENTITY;
+
+
+ENTITY edge_curve
+ SUBTYPE OF (edge, geometric_representation_item);
+ edge_geometry : curve;
+ same_sense : BOOLEAN;
+END_ENTITY;
+
+
+ENTITY edge_loop
+ SUBTYPE OF (loop, path);
+DERIVE
+ ne : INTEGER := SIZEOF(SELF\path.edge_list);
+WHERE
+ WR1 : (SELF\path.edge_list[1].edge_start) :=:
+ (SELF\path.edge_list[ne].edge_end);
+END_ENTITY;
+
+
+ENTITY effectivity
+ SUPERTYPE OF (ONEOF (serial_numbered_effectivity, dated_effectivity, lot_effectivity, time_interval_based_effectivity));
+ id : identifier;
+DERIVE
+ description : text := get_description_value(SELF);
+ name : label := get_name_value(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'NAME_ATTRIBUTE.NAMED_ITEM')) <= 1;
+ WR2 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY effectivity_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_effectivity : effectivity;
+DERIVE
+ role : object_role := get_role(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ROLE_ASSOCIATION.ITEM_WITH_ROLE')) <= 1;
+END_ENTITY;
+
+
+ENTITY effectivity_context_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_effectivity_assignment : effectivity_assignment;
+ role : effectivity_context_role;
+END_ENTITY;
+
+
+ENTITY effectivity_context_role;
+ name : label;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY effectivity_relationship;
+ name : label;
+ description : OPTIONAL text;
+ related_effectivity : effectivity;
+ relating_effectivity : effectivity;
+END_ENTITY;
+
+
+ENTITY electric_charge_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ELECTRIC_CHARGE_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY electric_charge_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) = dimensions_for_si_unit (si_unit_name.coulomb);
+END_ENTITY;
+
+
+ENTITY electric_current_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ELECTRIC_CURRENT_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY electric_current_unit
+ SUBTYPE OF (named_unit);
+WHERE
+ WR1 : (SELF\named_unit.dimensions.length_exponent = 0.0) AND (SELF\named_unit.dimensions.mass_exponent = 0.0) AND (SELF\named_unit.dimensions.time_exponent = 0.0) AND (SELF\named_unit.dimensions.electric_current_exponent = 1.0) AND (SELF\named_unit.dimensions.thermodynamic_temperature_exponent = 0.0) AND (SELF\named_unit.dimensions.amount_of_substance_exponent = 0.0) AND (SELF\named_unit.dimensions.luminous_intensity_exponent = 0.0);
+END_ENTITY;
+
+
+ENTITY electric_potential_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ELECTRIC_POTENTIAL_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY electric_potential_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) = dimensions_for_si_unit (si_unit_name.volt);
+END_ENTITY;
+
+
+ENTITY elementary_brep_shape_representation
+ SUBTYPE OF (shape_representation);
+WHERE
+ WR1 : SIZEOF (QUERY (it <* SELF.items |
+ NOT (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MANIFOLD_SOLID_BREP',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACETED_BREP',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT_3D'] *
+ TYPEOF(it)) = 1))) = 0;
+ WR2 : SIZEOF (QUERY (it <* SELF.items |
+ SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MANIFOLD_SOLID_BREP',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM'] * TYPEOF(it)) =1 )) > 0;
+ WR3 : SIZEOF (QUERY (msb <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MANIFOLD_SOLID_BREP' IN TYPEOF(it)) |
+ NOT (SIZEOF (QUERY (csh <* msb_shells(msb) |
+ NOT (SIZEOF (QUERY(fcs <* csh.cfs_faces |
+ NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_SURFACE' IN TYPEOF(fcs)))) = 0
+ ))) = 0
+ ))) = 0;
+ WR4 : SIZEOF (QUERY (msb <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MANIFOLD_SOLID_BREP' IN TYPEOF(it)) |
+ NOT (SIZEOF (QUERY (csh <* msb_shells(msb) |
+ NOT (SIZEOF (QUERY(fcs <* csh\connected_face_set.cfs_faces |
+ NOT(('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ELEMENTARY_SURFACE' IN
+ TYPEOF(fcs\face_surface.face_geometry))
+ ))) = 0
+ ))) = 0
+ ))) = 0;
+ WR5 : SIZEOF (QUERY (msb <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MANIFOLD_SOLID_BREP' IN TYPEOF(it)) |
+ NOT (SIZEOF (QUERY (csh <* msb_shells(msb) |
+ NOT (SIZEOF (QUERY(fcs <* csh\connected_face_set.cfs_faces |
+ NOT (SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* fcs.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF(bnds.bound)) |
+ NOT (SIZEOF (QUERY (oe <* elp_fbnds.bound\path.edge_list |
+ NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_CURVE' IN
+ TYPEOF(oe.edge_element)))) = 0
+ ))) = 0
+ ))) = 0
+ ))) = 0
+ ))) = 0;
+ WR6 : SIZEOF (QUERY (msb <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MANIFOLD_SOLID_BREP' IN TYPEOF(it)) |
+ NOT (SIZEOF (QUERY (csh <* msb_shells(msb) |
+ NOT (SIZEOF (QUERY(fcs <* csh\connected_face_set.cfs_faces |
+ NOT (SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* fcs.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF(bnds.bound)) |
+ NOT (SIZEOF (QUERY (oe <* elp_fbnds.bound\path.edge_list |
+ NOT (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LINE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONIC',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE'] *
+ TYPEOF(oe.edge_element\edge_curve.edge_geometry)) = 1 )
+ )) = 0
+ ))) = 0
+ ))) = 0
+ ))) = 0
+ ))) = 0;
+ WR7 : SIZEOF (QUERY (msb <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MANIFOLD_SOLID_BREP' IN TYPEOF(it)) |
+ NOT (SIZEOF (QUERY (csh <* msb_shells(msb) |
+ NOT (SIZEOF (QUERY(fcs <* csh\connected_face_set.cfs_faces |
+ NOT (SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* fcs.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF(bnds.bound)) |
+ NOT (SIZEOF (QUERY (oe <* elp_fbnds.bound\path.edge_list |
+ NOT(('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN TYPEOF(oe.edge_start))
+ AND ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN
+ TYPEOF(oe.edge_end))
+ ))) = 0
+ ))) = 0
+ ))) = 0
+ ))) = 0
+ ))) = 0;
+ WR8 : SIZEOF (QUERY (msb <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MANIFOLD_SOLID_BREP' IN TYPEOF(it)) |
+ NOT (SIZEOF (QUERY (csh <* msb_shells(msb) |
+ NOT (SIZEOF (QUERY(fcs <* csh\connected_face_set.cfs_faces |
+ NOT (SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* fcs.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF(bnds.bound)) |
+ NOT (SIZEOF (QUERY (oe <* elp_fbnds.bound\path.edge_list |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE' IN
+ TYPEOF(oe.edge_element\edge_curve.edge_geometry)) AND
+ (NOT (SIZEOF (oe\oriented_edge.edge_element\
+ edge_curve.edge_geometry\polyline.points) >= 3))
+ )) = 0
+ ))) = 0
+ ))) = 0
+ ))) = 0
+ ))) = 0;
+ WR9 : SIZEOF (QUERY (msb <* QUERY (it <* items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MANIFOLD_SOLID_BREP' IN TYPEOF(it)) |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORIENTED_CLOSED_SHELL' IN TYPEOF
+ (msb\manifold_solid_brep.outer)))
+ = 0;
+ WR10 : SIZEOF (QUERY (brv <* QUERY (it <* items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.BREP_WITH_VOIDS' IN TYPEOF(it)) |
+ NOT (SIZEOF (QUERY (csh <* brv\brep_with_voids.voids |
+ csh\oriented_closed_shell.orientation)) = 0))) = 0;
+ WR11 : SIZEOF (QUERY (mi <* QUERY (it <* items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' IN TYPEOF(it)) |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ELEMENTARY_BREP_SHAPE_REPRESENTATION' IN
+ TYPEOF(mi\mapped_item.mapping_source.
+ mapped_representation)))) = 0;
+ WR12 : SIZEOF (QUERY (msb <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MANIFOLD_SOLID_BREP' IN TYPEOF(it)) |
+ NOT (SIZEOF (QUERY (csh <* msb_shells(msb) |
+ NOT (SIZEOF (QUERY(fcs <* csh\connected_face_set.cfs_faces |
+ NOT (SIZEOF(QUERY (vlp_fbnds <* QUERY (bnds <* fcs.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_LOOP' IN TYPEOF(bnds.bound)) |
+ NOT(('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN
+ TYPEOF(vlp_fbnds\face_bound.bound\vertex_loop.loop_vertex)) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CARTESIAN_POINT' IN
+ TYPEOF(vlp_fbnds\face_bound.bound\vertex_loop.
+ loop_vertex\vertex_point.vertex_geometry))
+ ))) = 0))) = 0))) = 0))) =0;
+END_ENTITY;
+
+
+ENTITY elementary_surface
+ SUPERTYPE OF (ONEOF (plane, cylindrical_surface, conical_surface, spherical_surface, toroidal_surface))
+ SUBTYPE OF (surface);
+ position : axis2_placement_3d;
+END_ENTITY;
+
+
+ENTITY ellipse
+ SUBTYPE OF (conic);
+ semi_axis_1 : positive_length_measure;
+ semi_axis_2 : positive_length_measure;
+END_ENTITY;
+
+
+ENTITY energy_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ENERGY_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY energy_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) = dimensions_for_si_unit (si_unit_name.joule);
+END_ENTITY;
+
+
+ENTITY entity_assertion
+ SUBTYPE OF (fact_type);
+END_ENTITY;
+
+
+ENTITY enum_reference_prefix
+ SUBTYPE OF (descriptive_representation_item);
+END_ENTITY;
+
+
+ENTITY environment;
+ syntactic_representation : generic_variable;
+ semantics : variable_semantics;
+END_ENTITY;
+
+
+ENTITY evaluated_characteristic
+ SUBTYPE OF (representation, representation_relationship);
+UNIQUE
+ UR1: SELF\representation_relationship.rep_1, SELF\representation_relationship.rep_2;
+WHERE
+ WR1 : SELF\representation_relationship.rep_1 <>
+ SELF\representation_relationship.rep_2;
+END_ENTITY;
+
+
+ENTITY evaluated_degenerate_pcurve
+ SUBTYPE OF (degenerate_pcurve);
+ equivalent_point : cartesian_point;
+END_ENTITY;
+
+
+ENTITY evaluation_product_definition
+ SUBTYPE OF (product_definition);
+END_ENTITY;
+
+
+ENTITY event_occurrence;
+ id : identifier;
+ name : label;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY event_occurrence_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_event_occurrence : event_occurrence;
+ role : event_occurrence_role;
+END_ENTITY;
+
+
+ENTITY event_occurrence_relationship;
+ name : label;
+ description : OPTIONAL text;
+ relating_event : event_occurrence;
+ related_event : event_occurrence;
+END_ENTITY;
+
+
+ENTITY event_occurrence_role;
+ name : label;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY exclusive_product_concept_feature_category
+ SUBTYPE OF (product_concept_feature_category);
+END_ENTITY;
+
+
+ENTITY executed_action
+ SUBTYPE OF (action);
+END_ENTITY;
+
+
+ENTITY expanded_uncertainty
+ SUBTYPE OF (standard_uncertainty);
+ coverage_factor : REAL;
+END_ENTITY;
+
+
+ENTITY explicit_procedural_geometric_representation_item_relationship
+ SUBTYPE OF (explicit_procedural_representation_item_relationship);
+ SELF\representation_item_relationship.related_representation_item : geometric_representation_item;
+ SELF\representation_item_relationship.relating_representation_item : procedural_shape_representation_sequence;
+WHERE
+ WR1 : NOT (
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PROCEDURAL_SHAPE_REPRESENTATION_SEQUENCE'
+ IN TYPEOF(
+ SELF\representation_item_relationship.related_representation_item));
+END_ENTITY;
+
+
+ENTITY explicit_procedural_representation_item_relationship
+ SUBTYPE OF (representation_item_relationship);
+ SELF\representation_item_relationship.relating_representation_item : procedural_representation_sequence;
+WHERE
+ WR1 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PROCEDURAL_REPRESENTATION_SEQUENCE'
+ IN TYPEOF(
+ SELF\representation_item_relationship.related_representation_item));
+ WR2 : SIZEOF(QUERY(q <* using_representations(
+ SELF\representation_item_relationship.related_representation_item) |
+ item_in_context(
+ SELF\representation_item_relationship.relating_representation_item,
+ q.context_of_items))) > 0;
+END_ENTITY;
+
+
+ENTITY explicit_procedural_representation_relationship
+ SUBTYPE OF (representation_relationship);
+ SELF\representation_relationship.rep_1 : procedural_representation;
+WHERE
+ WR1 : (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PROCEDURAL_REPRESENTATION'
+ IN TYPEOF(SELF\representation_relationship.rep_2))) AND
+ (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VARIATIONAL_REPRESENTATION'
+ IN TYPEOF(SELF\representation_relationship.rep_2)));
+ WR2 : SELF\representation_relationship.rep_1.context_of_items :=:
+ SELF\representation_relationship.rep_2.context_of_items;
+END_ENTITY;
+
+
+ENTITY explicit_procedural_shape_representation_relationship
+ SUBTYPE OF (explicit_procedural_representation_relationship);
+ SELF\representation_relationship.rep_1 : procedural_shape_representation;
+ SELF\representation_relationship.rep_2 : shape_representation;
+END_ENTITY;
+
+
+ENTITY expression
+ ABSTRACT SUPERTYPE OF (ONEOF (numeric_expression, boolean_expression))
+ SUBTYPE OF (generic_expression);
+END_ENTITY;
+
+
+ENTITY expression_conversion_based_unit
+ SUBTYPE OF (context_dependent_unit, variable_semantics);
+INVERSE
+ associated_variable_environment: environment FOR semantics;
+END_ENTITY;
+
+
+ENTITY extension
+ SUBTYPE OF (derived_shape_aspect);
+WHERE
+ WR1 : SIZEOF (SELF\derived_shape_aspect.deriving_relationships)= 1;
+END_ENTITY;
+
+
+ENTITY extent
+ SUBTYPE OF (characterized_object);
+END_ENTITY;
+
+
+ENTITY external_class_library
+ SUBTYPE OF (external_source);
+END_ENTITY;
+
+
+ENTITY external_identification_assignment
+ ABSTRACT SUPERTYPE
+ SUBTYPE OF (identification_assignment);
+ source : external_source;
+END_ENTITY;
+
+
+ENTITY external_source;
+ source_id : source_item;
+DERIVE
+ description : text := get_description_value(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY external_source_relationship;
+ name : label;
+ description : OPTIONAL text;
+ relating_source : external_source;
+ related_source : external_source;
+END_ENTITY;
+
+
+ENTITY externally_defined_class
+ SUBTYPE OF (class, externally_defined_item);
+END_ENTITY;
+
+
+ENTITY externally_defined_colour
+ SUBTYPE OF (colour_specification, externally_defined_item);
+END_ENTITY;
+
+
+ENTITY externally_defined_context_dependent_unit
+ SUBTYPE OF (context_dependent_unit, externally_defined_item);
+END_ENTITY;
+
+
+ENTITY externally_defined_conversion_based_unit
+ SUBTYPE OF (conversion_based_unit, externally_defined_item);
+END_ENTITY;
+
+
+ENTITY externally_defined_currency
+ SUBTYPE OF (currency, externally_defined_context_dependent_unit);
+END_ENTITY;
+
+
+ENTITY externally_defined_curve_font
+ SUBTYPE OF (externally_defined_item);
+END_ENTITY;
+
+
+ENTITY externally_defined_dimension_definition
+ SUBTYPE OF (dimensional_size, externally_defined_item);
+WHERE
+ WR1 : (SELF\externally_defined_item.item_id = 'external size dimension') AND (SELF\externally_defined_item.source.source_id = 'external size dimension specification');
+ WR2 : 1 >= SIZEOF(QUERY ( adr <* USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.APPLIED_DOCUMENT_REFERENCE.ITEMS')| (adr.assigned_document.description = 'external size dimension specification') ));
+END_ENTITY;
+
+
+ENTITY externally_defined_general_property
+ SUBTYPE OF (general_property, externally_defined_item);
+END_ENTITY;
+
+
+ENTITY externally_defined_hatch_style
+ SUBTYPE OF (externally_defined_item, geometric_representation_item);
+END_ENTITY;
+
+
+ENTITY externally_defined_item;
+ item_id : source_item;
+ source : external_source;
+END_ENTITY;
+
+
+ENTITY externally_defined_item_relationship;
+ name : label;
+ description : OPTIONAL text;
+ relating_item : externally_defined_item;
+ related_item : externally_defined_item;
+END_ENTITY;
+
+
+ENTITY externally_defined_marker
+ SUBTYPE OF (externally_defined_symbol, pre_defined_marker);
+END_ENTITY;
+
+
+ENTITY externally_defined_picture_representation_item
+ SUBTYPE OF (picture_representation_item);
+INVERSE
+ source: applied_external_identification_assignment FOR items;
+WHERE
+ WR1 : NOT (SELF\representation_item.name IN pre_defined_picture_representation_types);
+END_ENTITY;
+
+
+ENTITY externally_defined_representation_item
+ SUBTYPE OF (representation_item, externally_defined_item);
+END_ENTITY;
+
+
+ENTITY externally_defined_string
+ SUBTYPE OF (externally_defined_representation_item);
+END_ENTITY;
+
+
+ENTITY externally_defined_symbol
+ SUBTYPE OF (externally_defined_item);
+END_ENTITY;
+
+
+ENTITY externally_defined_terminator_symbol
+ SUBTYPE OF (externally_defined_symbol);
+END_ENTITY;
+
+
+ENTITY externally_defined_text_font
+ SUBTYPE OF (externally_defined_item);
+END_ENTITY;
+
+
+ENTITY externally_defined_tile
+ SUBTYPE OF (externally_defined_item);
+END_ENTITY;
+
+
+ENTITY externally_defined_tile_style
+ SUBTYPE OF (externally_defined_item, geometric_representation_item);
+END_ENTITY;
+
+
+ENTITY extruded_area_solid
+ SUBTYPE OF (swept_area_solid);
+ extruded_direction : direction;
+ depth : positive_length_measure;
+WHERE
+ WR1 : dot_product(
+ (SELF\swept_area_solid.swept_area.basis_surface\
+ elementary_surface.position.p[3]), extruded_direction) <> 0.0;
+END_ENTITY;
+
+
+ENTITY extruded_face_solid
+ SUBTYPE OF (swept_face_solid);
+ extruded_direction : direction;
+ depth : positive_length_measure;
+WHERE
+ WR1 : dot_product(
+ (SELF\swept_face_solid.swept_face.face_geometry\
+ elementary_surface.position.p[3]), extruded_direction) <> 0.0;
+END_ENTITY;
+
+
+ENTITY extruded_face_solid_with_draft_angle
+ SUBTYPE OF (extruded_face_solid_with_trim_conditions);
+ draft_angle : plane_angle_measure;
+WHERE
+ WR1 : draft_angle <> 0;
+END_ENTITY;
+
+
+ENTITY extruded_face_solid_with_multiple_draft_angles
+ SUBTYPE OF (extruded_face_solid_with_trim_conditions);
+ drafted_edges : LIST [2:?] OF SET [1:?] OF edge_curve;
+ draft_angles : LIST [2:?] OF plane_angle_measure;
+WHERE
+ WR1 : SIZEOF(drafted_edges) = SIZEOF(draft_angles);
+ WR2 : SIZEOF(QUERY(q <* draft_angles | q = 0)) = 0;
+ WR3 : SIZEOF(QUERY(q <* drafted_edges | (SIZEOF(QUERY(r <* q | NOT
+ (SELF\swept_face_solid.swept_face IN
+ using_items(r,[])))) > 0))) = 0;
+END_ENTITY;
+
+
+ENTITY extruded_face_solid_with_trim_conditions
+ SUPERTYPE OF (ONEOF (extruded_face_solid_with_draft_angle, extruded_face_solid_with_multiple_draft_angles))
+ SUBTYPE OF (extruded_face_solid);
+ first_trim_condition : trim_condition_select;
+ second_trim_condition : trim_condition_select;
+ first_trim_intent : trim_intent;
+ second_trim_intent : trim_intent;
+ first_offset : non_negative_length_measure;
+ second_offset : non_negative_length_measure;
+WHERE
+ WR1 : NOT(('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PLANE_ANGLE_MEASURE'
+ IN TYPEOF(first_trim_condition)) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PLANE_ANGLE_MEASURE'
+ IN TYPEOF(second_trim_condition)));
+ WR2 : NOT ((('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LENGTH_MEASURE'
+ IN TYPEOF(first_trim_condition)) AND
+ ((first_trim_intent = trim_intent.offset)
+ OR (first_trim_intent = trim_intent.up_to_next))) OR
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LENGTH_MEASURE'
+ IN TYPEOF(second_trim_condition)) AND
+ ((second_trim_intent = trim_intent.offset)
+ OR (second_trim_intent = trim_intent.up_to_next))));
+ WR3 : NOT (((NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LENGTH_MEASURE'
+ IN TYPEOF(first_trim_condition))) AND
+ ((first_trim_intent = trim_intent.blind)
+ OR (first_trim_intent = trim_intent.through_all))) OR
+ ((NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LENGTH_MEASURE'
+ IN TYPEOF(second_trim_condition))) AND
+ ((second_trim_intent = trim_intent.blind)
+ OR (second_trim_intent = trim_intent.through_all))));
+ WR4 : (((first_trim_intent = trim_intent.offset)
+ AND (first_offset > 0)) XOR
+ ((first_trim_intent <> trim_intent.offset)
+ AND (first_offset = 0))) AND
+ (((second_trim_intent = trim_intent.offset)
+ AND (second_offset > 0)) XOR
+ ((second_trim_intent <> trim_intent.offset)
+ AND (second_offset = 0)));
+ WR5 : NOT((('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LENGTH_MEASURE'
+ IN TYPEOF(first_trim_condition)) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LENGTH_MEASURE'
+ IN TYPEOF(second_trim_condition))) AND
+ (first_trim_condition = second_trim_condition));
+END_ENTITY;
+
+
+ENTITY face
+ SUPERTYPE OF (ONEOF (face_surface, subface, oriented_face))
+ SUBTYPE OF (topological_representation_item);
+ bounds : SET [1:?] OF face_bound;
+WHERE
+ WR1 : NOT (mixed_loop_type_set(list_to_set(list_face_loops(SELF))));
+ WR2 : SIZEOF(QUERY(temp <* bounds | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_OUTER_BOUND' IN
+ TYPEOF(temp))) <= 1;
+END_ENTITY;
+
+
+ENTITY face_based_surface_model
+ SUBTYPE OF (geometric_representation_item);
+ fbsm_faces : SET [1:?] OF connected_face_set;
+END_ENTITY;
+
+
+ENTITY face_bound
+ SUBTYPE OF (topological_representation_item);
+ bound : loop;
+ orientation : BOOLEAN;
+END_ENTITY;
+
+
+ENTITY face_outer_bound
+ SUBTYPE OF (face_bound);
+END_ENTITY;
+
+
+ENTITY face_surface
+ SUBTYPE OF (face, geometric_representation_item);
+ face_geometry : surface;
+ same_sense : BOOLEAN;
+WHERE
+ WR1 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORIENTED_SURFACE' IN TYPEOF(face_geometry));
+END_ENTITY;
+
+
+ENTITY faceted_brep
+ SUBTYPE OF (manifold_solid_brep);
+END_ENTITY;
+
+
+ENTITY faceted_brep_shape_representation
+ SUBTYPE OF (shape_representation);
+WHERE
+ WR1 : SIZEOF (
+QUERY ( it <* items| NOT ( SIZEOF ([ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACETED_BREP', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT_3D' ] * TYPEOF (it)) = 1) )) = 0;
+ WR2 : SIZEOF (
+QUERY ( it <* items| ( SIZEOF ([ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACETED_BREP', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' ] * TYPEOF (it)) = 1) )) > 0;
+ WR3 : SIZEOF (
+QUERY ( fbrep <*
+QUERY ( it <* items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACETED_BREP' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( csh <* msb_shells(fbrep)| NOT ( SIZEOF (
+QUERY ( fcs <* csh\connected_face_set.cfs_faces| NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_SURFACE' IN TYPEOF (fcs)) AND (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PLANE' IN TYPEOF (fcs\face_surface.face_geometry)) AND ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CARTESIAN_POINT' IN TYPEOF (fcs\face_surface.face_geometry\elementary_surface.position.location)))) )) = 0) )) = 0) )) = 0;
+ WR4 : SIZEOF (
+QUERY ( fbrep <*
+QUERY ( it <* items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACETED_BREP' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( csh <* msb_shells(fbrep)| NOT ( SIZEOF (
+QUERY ( fcs <* csh\connected_face_set.cfs_faces| NOT ( SIZEOF (
+QUERY ( bnds <* fcs.bounds| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_OUTER_BOUND' IN TYPEOF (bnds)) )) = 1) )) = 0) )) = 0) )) = 0;
+ WR5 : SIZEOF (
+QUERY ( msb <*
+QUERY ( it <* items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MANIFOLD_SOLID_BREP' IN TYPEOF (it)) )| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORIENTED_CLOSED_SHELL' IN TYPEOF (msb\manifold_solid_brep.outer)) )) = 0;
+ WR6 : SIZEOF (
+QUERY ( brv <*
+QUERY ( it <* items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.BREP_WITH_VOIDS' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( csh <* brv\brep_with_voids.voids| csh\oriented_closed_shell.orientation )) = 0) )) = 0;
+ WR7 : SIZEOF (
+QUERY ( mi <*
+QUERY ( it <* items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' IN TYPEOF (it)) )| NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACETED_BREP_SHAPE_REPRESENTATION' IN TYPEOF (mi\mapped_item.mapping_source.mapped_representation)) )) = 0;
+END_ENTITY;
+
+
+ENTITY fact_type
+ SUBTYPE OF (property_definition);
+END_ENTITY;
+
+
+ENTITY fill_area_style
+ SUBTYPE OF (founded_item);
+ name : label;
+ fill_styles : SET [1:?] OF fill_style_select;
+WHERE
+ WR1 : SIZEOF(QUERY(fill_style <* SELF.fill_styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'FILL_AREA_STYLE_COLOUR' IN
+ TYPEOF(fill_style)
+ )) <= 1;
+END_ENTITY;
+
+
+ENTITY fill_area_style_colour;
+ name : label;
+ fill_colour : colour;
+END_ENTITY;
+
+
+ENTITY fill_area_style_hatching
+ SUBTYPE OF (geometric_representation_item);
+ hatch_line_appearance : curve_style;
+ start_of_next_hatch_line : one_direction_repeat_factor;
+ point_of_reference_hatch_line : cartesian_point;
+ pattern_start : cartesian_point;
+ hatch_line_angle : plane_angle_measure;
+END_ENTITY;
+
+
+ENTITY fill_area_style_tile_coloured_region
+ SUBTYPE OF (geometric_representation_item);
+ closed_curve : curve_or_annotation_curve_occurrence;
+ region_colour : colour;
+WHERE
+ WR1 : (NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE' IN TYPEOF (closed_curve))) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CIRCLE' IN TYPEOF (closed_curve)) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ELLIPSE' IN TYPEOF (closed_curve)) OR
+ ( ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_CURVE' IN TYPEOF (closed_curve))
+ AND (closed_curve\b_spline_curve.closed_curve = TRUE) ) OR
+ ( ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPOSITE_CURVE' IN TYPEOF (closed_curve))
+ AND (closed_curve\composite_curve.closed_curve = TRUE) ) OR
+ ( ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE' IN TYPEOF (closed_curve))
+ AND (closed_curve\polyline.points[LOINDEX(closed_curve\polyline.points)] =
+ closed_curve\polyline.points[HIINDEX(closed_curve\polyline.points)]) );
+END_ENTITY;
+
+
+ENTITY fill_area_style_tile_curve_with_style
+ SUBTYPE OF (geometric_representation_item);
+ styled_curve : annotation_curve_occurrence;
+END_ENTITY;
+
+
+ENTITY fill_area_style_tile_symbol_with_style
+ SUBTYPE OF (geometric_representation_item);
+ symbol : annotation_symbol_occurrence;
+END_ENTITY;
+
+
+ENTITY fill_area_style_tiles
+ SUBTYPE OF (geometric_representation_item);
+ tiling_pattern : two_direction_repeat_factor;
+ tiles : SET [1:?] OF fill_area_style_tile_shape_select;
+ tiling_scale : positive_ratio_measure;
+END_ENTITY;
+
+
+ENTITY flat_pattern_ply_representation_relationship
+ SUBTYPE OF (shape_representation_relationship);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHAPE_REPRESENTATION' IN
+ (TYPEOF (SELF\representation_relationship.rep_1) *
+ TYPEOF (SELF\representation_relationship.rep_2));
+ WR2 : SELF\representation_relationship.rep_1.
+ context_of_items\geometric_representation_context.
+ coordinate_space_dimension = 3;
+END_ENTITY;
+
+
+ENTITY flatness_tolerance
+ SUBTYPE OF (geometric_tolerance);
+WHERE
+ WR1 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'GEOMETRIC_TOLERANCE_WITH_DATUM_REFERENCE' IN TYPEOF (SELF));
+END_ENTITY;
+
+
+ENTITY force_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FORCE_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY force_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) = dimensions_for_si_unit (si_unit_name.newton);
+END_ENTITY;
+
+
+ENTITY forward_chaining_rule
+ SUBTYPE OF (rule_definition);
+END_ENTITY;
+
+
+ENTITY forward_chaining_rule_premise
+ SUBTYPE OF (property_definition, property_definition_representation, representation);
+END_ENTITY;
+
+
+ENTITY founded_item
+ SUPERTYPE OF (ONEOF (character_glyph_style_outline, character_glyph_style_stroke, curve_style, curve_style_font, curve_style_font_and_scaling, curve_style_font_pattern, fill_area_style, point_style, presentation_style_assignment, surface_side_style, surface_style_boundary, surface_style_control_grid, surface_style_fill_area, surface_style_parameter_line, surface_style_segmentation_curve, surface_style_silhouette, surface_style_usage, symbol_style, text_style));
+DERIVE
+ users : SET [0:?] OF founded_item_select := using_items(SELF,[]);
+WHERE
+ WR1 : SIZEOF(users) > 0;
+ WR2 : NOT(SELF IN users);
+END_ENTITY;
+
+
+ENTITY frequency_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FREQUENCY_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY frequency_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) = dimensions_for_si_unit (si_unit_name.hertz);
+END_ENTITY;
+
+
+ENTITY func
+ SUBTYPE OF (compound_representation_item);
+END_ENTITY;
+
+
+ENTITY functional_breakdown_context
+ SUBTYPE OF (breakdown_context);
+END_ENTITY;
+
+
+ENTITY functional_element_usage
+ SUBTYPE OF (breakdown_element_usage);
+END_ENTITY;
+
+
+ENTITY functionally_defined_transformation;
+ name : label;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY general_material_property
+ SUBTYPE OF (general_property);
+WHERE
+ WR1 : SIZEOF( QUERY( gpa <* USEDIN(SELF,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GENERAL_PROPERTY_ASSOCIATION.BASE_DEFINITION') |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MATERIAL_PROPERTY' IN TYPEOF(gpa.derived_definition)) )) = 0;
+END_ENTITY;
+
+
+ENTITY general_property;
+ id : identifier;
+ name : label;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY general_property_association;
+ name : label;
+ description : OPTIONAL text;
+ base_definition : general_property;
+ derived_definition : derived_property_select;
+WHERE
+ WR1 : SIZEOF(USEDIN(derived_definition, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'GENERAL_PROPERTY_ASSOCIATION.' + 'DERIVED_DEFINITION')) = 1;
+ WR2 : derived_definition.name = base_definition.name;
+END_ENTITY;
+
+
+ENTITY general_property_relationship;
+ name : label;
+ description : OPTIONAL text;
+ relating_property : general_property;
+ related_property : general_property;
+END_ENTITY;
+
+
+ENTITY generic_character_glyph_symbol
+ ABSTRACT SUPERTYPE
+ SUBTYPE OF (symbol_representation);
+END_ENTITY;
+
+
+ENTITY generic_expression
+ ABSTRACT SUPERTYPE OF (ONEOF (simple_generic_expression, unary_generic_expression, binary_generic_expression, multiple_arity_generic_expression));
+WHERE
+ WR1 : is_acyclic(SELF);
+END_ENTITY;
+
+
+ENTITY generic_literal
+ ABSTRACT SUPERTYPE
+ SUBTYPE OF (simple_generic_expression);
+END_ENTITY;
+
+
+ENTITY generic_variable
+ ABSTRACT SUPERTYPE
+ SUBTYPE OF (simple_generic_expression);
+INVERSE
+ interpretation: environment FOR syntactic_representation;
+END_ENTITY;
+
+
+ENTITY geometric_alignment
+ SUBTYPE OF (derived_shape_aspect);
+WHERE
+ WR1 : SIZEOF (SELF\derived_shape_aspect.deriving_relationships)> 1;
+END_ENTITY;
+
+
+ENTITY geometric_curve_set
+ SUBTYPE OF (geometric_set);
+WHERE
+ WR1 : SIZEOF(QUERY(temp <* SELF\geometric_set.elements |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE' IN TYPEOF(temp))) = 0;
+END_ENTITY;
+
+
+ENTITY geometric_intersection
+ SUBTYPE OF (derived_shape_aspect);
+WHERE
+ WR1 : SIZEOF (SELF\derived_shape_aspect.deriving_relationships)> 1;
+END_ENTITY;
+
+
+ENTITY geometric_item_specific_usage
+ SUBTYPE OF (item_identified_representation_usage);
+ SELF\item_identified_representation_usage.definition : geometric_item_specific_usage_select;
+ SELF\item_identified_representation_usage.identified_item : geometric_representation_item;
+ SELF\item_identified_representation_usage.used_representation : shape_representation;
+END_ENTITY;
+
+
+ENTITY geometric_model_element_relationship
+ SUBTYPE OF (geometric_representation_item, representation_item_relationship);
+ SELF\representation_item_relationship.related_representation_item : geometric_representation_item;
+ SELF\representation_item_relationship.relating_representation_item : geometric_representation_item;
+UNIQUE
+ UR1 : relating_representation_item, related_representation_item;
+WHERE
+ WR1 : SELF\representation_item_relationship.relating_representation_item :<>:
+ SELF\representation_item_relationship.related_representation_item;
+END_ENTITY;
+
+
+ENTITY geometric_representation_context
+ SUBTYPE OF (representation_context);
+ coordinate_space_dimension : dimension_count;
+END_ENTITY;
+
+
+ENTITY geometric_representation_item
+ SUPERTYPE OF (ONEOF (point, direction, vector, placement, cartesian_transformation_operator, curve, surface, edge_curve, face_surface, poly_loop, vertex_point, solid_model, boolean_result, sphere, right_circular_cone, right_circular_cylinder, torus, block, right_angular_wedge, half_space_solid, shell_based_surface_model, face_based_surface_model, shell_based_wireframe_model, edge_based_wireframe_model, geometric_set, camera_model, camera_model_d3_multi_clipping_intersection, camera_model_d3_multi_clipping_union, light_source))
+ SUBTYPE OF (representation_item);
+DERIVE
+ dim : dimension_count := dimension_of(SELF);
+WHERE
+ WR1 : SIZEOF (QUERY (using_rep <* using_representations (SELF) |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_REPRESENTATION_CONTEXT' IN
+ TYPEOF (using_rep.context_of_items)))) = 0;
+END_ENTITY;
+
+
+ENTITY geometric_set
+ SUBTYPE OF (geometric_representation_item);
+ elements : SET [1:?] OF geometric_set_select;
+END_ENTITY;
+
+
+ENTITY geometric_tolerance;
+ name : label;
+ description : text;
+ magnitude : measure_with_unit;
+ toleranced_shape_aspect : shape_aspect;
+WHERE
+ WR1 : ('NUMBER' IN TYPEOF
+ (magnitude\measure_with_unit.value_component)) AND
+ (magnitude\measure_with_unit.value_component >= 0.0);
+END_ENTITY;
+
+
+ENTITY geometric_tolerance_relationship;
+ name : label;
+ description : text;
+ relating_geometric_tolerance : geometric_tolerance;
+ related_geometric_tolerance : geometric_tolerance;
+END_ENTITY;
+
+
+ENTITY geometric_tolerance_with_datum_reference
+ SUBTYPE OF (geometric_tolerance);
+ datum_system : SET [1:?] OF datum_reference;
+END_ENTITY;
+
+
+ENTITY geometric_tolerance_with_defined_unit
+ SUBTYPE OF (geometric_tolerance);
+ unit_size : measure_with_unit;
+WHERE
+ WR1 : ('NUMBER' IN TYPEOF
+ (unit_size\measure_with_unit.value_component)) AND
+ (unit_size\measure_with_unit.value_component > 0.0);
+END_ENTITY;
+
+
+ENTITY geometrical_tolerance_callout
+ SUBTYPE OF (draughting_callout);
+END_ENTITY;
+
+
+ENTITY geometrically_bounded_2d_wireframe_representation
+ SUBTYPE OF (shape_representation);
+WHERE
+ WR1 : SELF.context_of_items\geometric_representation_context.
+ coordinate_space_dimension = 2;
+ WR2 : SIZEOF (QUERY (item <* SELF.items |
+ NOT (SIZEOF (TYPEOF (item) *
+['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_CURVE_SET',
+'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT_2D',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM']) = 1)
+ )) = 0;
+ WR3 : SIZEOF (QUERY (item <* SELF.items |
+ SIZEOF (TYPEOF (item) *
+['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_CURVE_SET',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM']) = 1
+ )) >= 1;
+ WR4 : SIZEOF (QUERY (mi <* QUERY (item <* SELF.items |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM'
+ IN TYPEOF (item))) |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'GEOMETRICALLY_BOUNDED_2D_WIREFRAME_REPRESENTATION'
+ IN TYPEOF
+ (mi\mapped_item.mapping_source.mapped_representation))
+ )) = 0;
+ WR5 : SIZEOF (QUERY (gcs <* QUERY (item <* SELF.items |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_CURVE_SET'
+ IN TYPEOF (item))) |
+ NOT (SIZEOF (QUERY (elem <* gcs\geometric_set.elements |
+ NOT (SIZEOF (TYPEOF (elem) *
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_CURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CIRCLE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPOSITE_CURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ELLIPSE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OFFSET_CURVE_2D',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TRIMMED_CURVE']) =
+ 1)
+ )) = 0)
+ )) = 0;
+ WR6 : SIZEOF (QUERY (gcs <* QUERY (item <* SELF.items |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_CURVE_SET'
+ IN TYPEOF (item))) |
+ NOT (SIZEOF (QUERY (crv <*
+ QUERY (elem <* gcs\geometric_set.elements |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE'
+ IN TYPEOF (elem))) |
+ NOT (valid_basis_curve_in_2d_wireframe
+ (crv))
+ )) = 0)
+ )) = 0;
+ WR7 : SIZEOF (QUERY (gcs <* QUERY (item <* SELF.items |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_CURVE_SET'
+ IN TYPEOF (item))) |
+ NOT (SIZEOF (QUERY (pnt <*
+ QUERY (elem <* gcs\geometric_set.elements |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT'
+ IN TYPEOF(elem))) |
+ NOT (SIZEOF (TYPEOF (pnt) *
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CARTESIAN_POINT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_ON_CURVE'])
+ = 1)
+ )) = 0)
+ )) = 0;
+END_ENTITY;
+
+
+ENTITY geometrically_bounded_surface_shape_representation
+ SUBTYPE OF (shape_representation);
+WHERE
+ WR1 : SIZEOF(QUERY(it <* SELF.items | NOT (SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_SET', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT_3D'] * TYPEOF(it)) = 1))) = 0;
+ WR2 : SIZEOF(QUERY(it <* SELF.items | SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_SET', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM'] * TYPEOF(it)) = 1)) > 0;
+ WR3 : SIZEOF(QUERY(mi <* QUERY(it <* SELF.items | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' IN TYPEOF(it)) | NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'GEOMETRICALLY_BOUNDED_SURFACE_SHAPE_REPRESENTATION' IN TYPEOF(mi\mapped_item.mapping_source.mapped_representation)) AND (SIZEOF(QUERY(mr_it <* mi\mapped_item.mapping_source.mapped_representation.items | ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_SET' IN TYPEOF(mr_it)))) > 0)))) = 0;
+ WR4 : SIZEOF(QUERY(gs <* QUERY(it <* SELF.items | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_SET' IN TYPEOF(it)) | NOT (SIZEOF(QUERY(pnt <* QUERY(gsel <* gs\geometric_set.elements | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT' IN TYPEOF(gsel)) | NOT (gbsf_check_point(pnt)))) = 0))) = 0;
+ WR5 : SIZEOF(QUERY(gs <* QUERY(it <* SELF.items | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_SET' IN TYPEOF(it)) | NOT (SIZEOF(QUERY(cv <* QUERY(gsel <* gs\geometric_set.elements | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE' IN TYPEOF(gsel)) | NOT (gbsf_check_curve(cv)))) = 0))) = 0;
+ WR6 : SIZEOF(QUERY(gs <* QUERY(it <* SELF.items | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_SET' IN TYPEOF(it)) | NOT (SIZEOF(QUERY(sf <* QUERY(gsel <* gs\geometric_set.elements | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE' IN TYPEOF(gsel)) | NOT (gbsf_check_surface(sf)))) = 0))) = 0;
+ WR7 : SIZEOF(QUERY(gs <* QUERY(it <* SELF.items | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_SET' IN TYPEOF(it)) | SIZEOF(QUERY(gsel <* gs\geometric_set.elements | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE' IN TYPEOF(gsel))) > 0)) > 0;
+END_ENTITY;
+
+
+ENTITY geometrically_bounded_wireframe_shape_representation
+ SUBTYPE OF (shape_representation);
+WHERE
+ WR1 : SIZEOF (
+QUERY ( it <* SELF.items| NOT ( SIZEOF ( TYPEOF (it) * [ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_CURVE_SET', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT_3D', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' ]) = 1) )) = 0;
+ WR2 : SIZEOF (
+QUERY ( it <* SELF.items| ( SIZEOF ( TYPEOF (it) * [ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_CURVE_SET', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' ]) = 1) )) >= 1;
+ WR3 : SIZEOF (
+QUERY ( gcs <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_CURVE_SET' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( crv <*
+QUERY ( elem <* gcs\geometric_set.elements| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE' IN TYPEOF (elem)) )| NOT valid_geometrically_bounded_wf_curve(crv) )) = 0) )) = 0;
+ WR4 : SIZEOF (
+QUERY ( gcs <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_CURVE_SET' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( pnts <*
+QUERY ( elem <* gcs\geometric_set.elements| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT' IN TYPEOF (elem)) )| NOT valid_geometrically_bounded_wf_point(pnts) )) = 0) )) = 0;
+ WR5 : SIZEOF (
+QUERY ( gcs <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_CURVE_SET' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( cnc <*
+QUERY ( elem <* gcs\geometric_set.elements| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONIC' IN TYPEOF (elem)) )| NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT_3D' IN TYPEOF (cnc\conic.position)) )) = 0) )) = 0;
+ WR6 : SIZEOF (
+QUERY ( gcs <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_CURVE_SET' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( pline <*
+QUERY ( elem <* gcs\geometric_set.elements| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE' IN TYPEOF (elem)) )| NOT ( SIZEOF (pline\polyline.points) > 2) )) = 0) )) = 0;
+ WR7 : SIZEOF (
+QUERY ( mi <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' IN TYPEOF (it)) )| NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'GEOMETRICALLY_BOUNDED_WIREFRAME_SHAPE_REPRESENTATION' IN TYPEOF (mi\mapped_item.mapping_source.mapped_representation)) )) = 0;
+END_ENTITY;
+
+
+ENTITY global_assignment
+ SUBTYPE OF (representation_item_relationship);
+END_ENTITY;
+
+
+ENTITY global_uncertainty_assigned_context
+ SUBTYPE OF (representation_context);
+ uncertainty : SET [1:?] OF uncertainty_measure_with_unit;
+END_ENTITY;
+
+
+ENTITY global_unit_assigned_context
+ SUBTYPE OF (representation_context);
+ units : SET [1:?] OF unit;
+END_ENTITY;
+
+
+ENTITY ground_fact
+ SUBTYPE OF (atomic_formula);
+END_ENTITY;
+
+
+ENTITY group;
+ name : label;
+ description : OPTIONAL text;
+DERIVE
+ id : identifier := get_id_value(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY group_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_group : group;
+DERIVE
+ role : object_role := get_role(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ROLE_ASSOCIATION.ITEM_WITH_ROLE')) <= 1;
+END_ENTITY;
+
+
+ENTITY group_relationship;
+ name : label;
+ description : OPTIONAL text;
+ relating_group : group;
+ related_group : group;
+END_ENTITY;
+
+
+ENTITY half_space_solid
+ SUBTYPE OF (geometric_representation_item);
+ base_surface : surface;
+ agreement_flag : BOOLEAN;
+END_ENTITY;
+
+
+ENTITY hardness_representation
+ SUBTYPE OF (representation);
+WHERE
+ WR1 : ( {2<= SIZEOF ( SELF.items ) <=4} ) AND ( SIZEOF ( QUERY (
+ i <* items | ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) AND (
+ i.name IN [ 'measuring method' , 'measuring position' ] ) )
+ ) + SIZEOF ( QUERY ( i <* items | ( SIZEOF (
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'MEASURE_REPRESENTATION_ITEM' ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'VALUE_RANGE']* TYPEOF ( i ) ) =1 )
+ AND ( i.name IN ['depth' , 'hardness'] ) ) ) = SIZEOF (
+ SELF.items ) );
+ WR2 : SIZEOF ( QUERY ( i <* SELF.items | i.name =
+ 'measuring method' ) ) =1;
+ WR3 : SIZEOF ( QUERY ( i <* SELF.items | i.name ='hardness' ) )
+ =1;
+ WR4 : SIZEOF ( QUERY ( i <* SELF.items | i.name =
+ 'measuring position' ) ) <=1;
+ WR5 : SIZEOF ( QUERY ( i <* SELF.items | i.name ='depth' ) )
+ <=1;
+ WR6 : ( SIZEOF ( USEDIN ( SELF ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
+ 'USED_REPRESENTATION' ) ) =1 ) AND ( SIZEOF ( QUERY ( pdr
+ <* USEDIN ( SELF ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
+ 'USED_REPRESENTATION' ) | SIZEOF ( QUERY ( gpa <* USEDIN (
+ pdr. definition ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'GENERAL_PROPERTY_ASSOCIATION.'+
+ 'DERIVED_DEFINITION' ) | ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'GENERAL_PROPERTY' IN TYPEOF ( gpa. base_definition ) ) AND
+ ( gpa. base_definition.name ='surface_condition' ) ) ) =1 )
+ ) =1 );
+END_ENTITY;
+
+
+ENTITY hidden_element_over_riding_styled_item
+ SUBTYPE OF (context_dependent_over_riding_styled_item);
+ SELF\styled_item.item : camera_image;
+ SELF\context_dependent_over_riding_styled_item.style_context : LIST [1:1] OF presentation_view;
+INVERSE
+ container: SET [1:?] OF presentation_view FOR items;
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CAMERA_MODEL_D3_WITH_HLHSR' IN TYPEOF
+ (SELF.item\mapped_item.mapping_source.mapping_origin);
+END_ENTITY;
+
+
+ENTITY hyperbola
+ SUBTYPE OF (conic);
+ semi_axis : positive_length_measure;
+ semi_imag_axis : positive_length_measure;
+END_ENTITY;
+
+
+ENTITY id_attribute;
+ attribute_value : identifier;
+ identified_item : id_attribute_select;
+END_ENTITY;
+
+
+ENTITY identification_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_id : identifier;
+ role : identification_role;
+END_ENTITY;
+
+
+ENTITY identification_role;
+ name : label;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY illuminance_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ILLUMINANCE_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY illuminance_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) = dimensions_for_si_unit (si_unit_name.lux);
+END_ENTITY;
+
+
+ENTITY included_text_block
+ SUBTYPE OF (mapped_item);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STRUCTURED_TEXT_REPRESENTATION' IN TYPEOF(SELF\mapped_item.mapping_source.mapped_representation);
+END_ENTITY;
+
+
+ENTITY inclusion_product_concept_feature
+ SUBTYPE OF (conditional_concept_feature);
+WHERE
+ WR1 : NOT ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'PACKAGE_PRODUCT_CONCEPT_FEATURE' IN TYPEOF ( SELF ) );
+ WR2 : SIZEOF (QUERY
+ ( cfr <* USEDIN
+ ( SELF ,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'CONCEPT_FEATURE_RELATIONSHIP.RELATING_PRODUCT_CONCEPT_FEATURE' )
+ |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'CONCEPT_FEATURE_RELATIONSHIP_WITH_CONDITION' IN TYPEOF( cfr )
+ )
+ ) +
+ SIZEOF(QUERY
+ ( cfr <* USEDIN
+ (SELF , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'CONCEPT_FEATURE_RELATIONSHIP.RELATED_PRODUCT_CONCEPT_FEATURE' )
+ |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'CONCEPT_FEATURE_RELATIONSHIP_WITH_CONDITION' IN TYPEOF(cfr)
+ )
+ )= 0;
+ WR3 : SELF.condition.conditional_operator.name = 'implication';
+END_ENTITY;
+
+
+ENTITY indirectly_selected_elements
+ SUBTYPE OF (user_selected_elements);
+ indirectly_picked_items : SET [1:?] OF representation_item;
+END_ENTITY;
+
+
+ENTITY indirectly_selected_shape_elements
+ SUBTYPE OF (indirectly_selected_elements, user_selected_shape_elements);
+WHERE
+ WR1 : SIZEOF(QUERY(q <*
+ SELF\indirectly_selected_elements.indirectly_picked_items
+ | NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHAPE_REPRESENTATION_ITEM'
+ IN TYPEOF(q)))) = 0;
+END_ENTITY;
+
+
+ENTITY inductance_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.INDUCTANCE_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY inductance_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) = dimensions_for_si_unit (si_unit_name.henry);
+END_ENTITY;
+
+
+ENTITY information_right
+ SUBTYPE OF (action_method);
+END_ENTITY;
+
+
+ENTITY information_usage_right
+ SUBTYPE OF (action_method);
+END_ENTITY;
+
+
+ENTITY instance_usage_context_assignment
+ SUBTYPE OF (product_definition_context);
+ items : SET [1:?] OF instance_usage_context_select;
+END_ENTITY;
+
+
+ENTITY instanced_feature
+ SUBTYPE OF (shape_aspect, shape_feature_definition);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION' IN
+ TYPEOF(SELF\shape_aspect.of_shape.definition);
+ WR2 : SELF\shape_aspect.product_definitional;
+END_ENTITY;
+
+
+ENTITY int_literal
+ SUBTYPE OF (literal_number);
+ SELF\literal_number.the_value : INTEGER;
+END_ENTITY;
+
+
+ENTITY integer_representation_item
+ SUBTYPE OF (representation_item, int_literal);
+END_ENTITY;
+
+
+ENTITY intersection_curve
+ SUBTYPE OF (surface_curve);
+WHERE
+ WR1 : SIZEOF(SELF\surface_curve.associated_geometry) = 2;
+ WR2 : associated_surface(SELF\surface_curve.associated_geometry[1]) <>
+ associated_surface(SELF\surface_curve.associated_geometry[2]);
+END_ENTITY;
+
+
+ENTITY interval_expression
+ SUBTYPE OF (boolean_expression, multiple_arity_generic_expression);
+DERIVE
+ interval_high : generic_expression := SELF\multiple_arity_generic_expression.operands[3];
+ interval_item : generic_expression := SELF\multiple_arity_generic_expression.operands[2];
+ interval_low : generic_expression := SELF\multiple_arity_generic_expression.operands[1];
+WHERE
+ WR1 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EXPRESSION'
+ IN TYPEOF(interval_low))
+ AND ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EXPRESSION'
+ IN TYPEOF(interval_item) )
+ AND ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EXPRESSION'
+ IN TYPEOF(interval_high));
+ WR2 : (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STRING_EXPRESSION'
+ IN TYPEOF (SELF.interval_low))
+ AND ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STRING_EXPRESSION'
+ IN TYPEOF (SELF.interval_high))
+ AND ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STRING_EXPRESSION'
+ IN TYPEOF (SELF.interval_item)))
+ OR
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STRING_EXPRESSION'
+ IN TYPEOF(SELF.interval_low))
+ AND ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.NUMERIC_EXPRESSION'
+ IN TYPEOF(SELF.interval_item))
+ AND ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.NUMERIC_EXPRESSION'
+ IN TYPEOF(SELF.interval_high)));
+END_ENTITY;
+
+
+ENTITY invisibility;
+ invisible_items : SET [1:?] OF invisible_item;
+END_ENTITY;
+
+
+ENTITY iso4217_currency
+ SUBTYPE OF (currency);
+END_ENTITY;
+
+
+ENTITY item_defined_transformation;
+ name : label;
+ description : OPTIONAL text;
+ transform_item_1 : representation_item;
+ transform_item_2 : representation_item;
+END_ENTITY;
+
+
+ENTITY item_identified_representation_usage;
+ name : label;
+ description : OPTIONAL text;
+ definition : represented_definition;
+ used_representation : representation;
+ identified_item : representation_item;
+WHERE
+ WR1 : SELF.used_representation IN using_representations(SELF.identified_item);
+END_ENTITY;
+
+
+ENTITY known_source
+ SUBTYPE OF (external_source, pre_defined_item);
+END_ENTITY;
+
+
+ENTITY laid_defined_transformation
+ SUBTYPE OF (transformation_with_derived_angle);
+END_ENTITY;
+
+
+ENTITY laminate_table
+ SUPERTYPE OF (ONEOF (part_laminate_table, zone_structural_makeup))
+ SUBTYPE OF (product_definition);
+END_ENTITY;
+
+
+ENTITY language
+ SUBTYPE OF (group);
+WHERE
+ WR1 : SELF\group.name <> '';
+END_ENTITY;
+
+
+ENTITY leader_curve
+ SUBTYPE OF (annotation_curve_occurrence);
+WHERE
+ WR1 : SIZEOF(
+ QUERY(ldc <* USEDIN( SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_CALLOUT.CONTENTS')
+ | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'LEADER_DIRECTED_CALLOUT' IN TYPEOF(ldc))) >= 1;
+END_ENTITY;
+
+
+ENTITY leader_directed_callout
+ SUBTYPE OF (draughting_callout);
+WHERE
+ WR1 : SIZEOF (QUERY (l_1 <* SELF\draughting_callout.contents |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LEADER_CURVE' IN (TYPEOF(l_1)))) >= 1;
+ WR2 : SIZEOF(SELF\draughting_callout.contents) >=2;
+END_ENTITY;
+
+
+ENTITY leader_directed_dimension
+ SUBTYPE OF (leader_directed_callout);
+WHERE
+ WR1 : SIZEOF (QUERY (con <* SELF.contents |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LEADER_CURVE' IN TYPEOF (con)))=1;
+END_ENTITY;
+
+
+ENTITY leader_terminator
+ SUBTYPE OF (terminator_symbol);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LEADER_CURVE' IN TYPEOF
+ (SELF\terminator_symbol.annotated_curve);
+END_ENTITY;
+
+
+ENTITY length_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LENGTH_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY length_unit
+ SUBTYPE OF (named_unit);
+WHERE
+ WR1 : (SELF\named_unit.dimensions.length_exponent = 1.0) AND
+ (SELF\named_unit.dimensions.mass_exponent = 0.0) AND
+ (SELF\named_unit.dimensions.time_exponent = 0.0) AND
+ (SELF\named_unit.dimensions.electric_current_exponent = 0.0) AND
+ (SELF\named_unit.dimensions.thermodynamic_temperature_exponent = 0.0) AND
+ (SELF\named_unit.dimensions.amount_of_substance_exponent = 0.0) AND
+ (SELF\named_unit.dimensions.luminous_intensity_exponent = 0.0);
+END_ENTITY;
+
+
+ENTITY light_source
+ SUPERTYPE OF (ONEOF (light_source_ambient, light_source_directional, light_source_positional, light_source_spot))
+ SUBTYPE OF (geometric_representation_item);
+ light_colour : colour;
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'STYLED_ITEM.ITEM')) = 0;
+END_ENTITY;
+
+
+ENTITY light_source_ambient
+ SUBTYPE OF (light_source);
+END_ENTITY;
+
+
+ENTITY light_source_directional
+ SUBTYPE OF (light_source);
+ orientation : direction;
+END_ENTITY;
+
+
+ENTITY light_source_positional
+ SUBTYPE OF (light_source);
+ position : cartesian_point;
+ constant_attenuation : REAL;
+ distance_attenuation : REAL;
+END_ENTITY;
+
+
+ENTITY light_source_spot
+ SUBTYPE OF (light_source);
+ position : cartesian_point;
+ orientation : direction;
+ concentration_exponent : REAL;
+ constant_attenuation : REAL;
+ distance_attenuation : REAL;
+ spread_angle : positive_plane_angle_measure;
+END_ENTITY;
+
+
+ENTITY limits_and_fits;
+ form_variance : label;
+ zone_variance : label;
+ grade : label;
+ source : text;
+END_ENTITY;
+
+
+ENTITY line
+ SUBTYPE OF (curve);
+ pnt : cartesian_point;
+ dir : vector;
+WHERE
+ WR1 : dir.dim = pnt.dim;
+END_ENTITY;
+
+
+ENTITY line_profile_tolerance
+ SUBTYPE OF (geometric_tolerance);
+WHERE
+ WR1 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'GEOMETRIC_TOLERANCE_WITH_DATUM_REFERENCE' IN TYPEOF (SELF)) OR ( SIZEOF (SELF\geometric_tolerance_with_datum_reference.datum_system) <= 3);
+ WR2 : SIZEOF (
+QUERY ( sar <* USEDIN (SELF\geometric_tolerance.toleranced_shape_aspect, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT')| (sar.name IN [ 'affected plane association', 'resulting intersection curve association' ]) )) = 1;
+END_ENTITY;
+
+
+ENTITY linear_dimension
+ SUBTYPE OF (dimension_curve_directed_callout);
+END_ENTITY;
+
+
+ENTITY literal_conjunction
+ SUBTYPE OF (simple_clause);
+END_ENTITY;
+
+
+ENTITY literal_disjunction
+ SUBTYPE OF (simple_clause);
+END_ENTITY;
+
+
+ENTITY literal_number
+ ABSTRACT SUPERTYPE OF (ONEOF (int_literal, real_literal))
+ SUBTYPE OF (simple_numeric_expression, generic_literal);
+ the_value : NUMBER;
+END_ENTITY;
+
+
+ENTITY local_time;
+ hour_component : hour_in_day;
+ minute_component : OPTIONAL minute_in_hour;
+ second_component : OPTIONAL second_in_minute;
+ zone : coordinated_universal_time_offset;
+WHERE
+ WR1 : valid_time (SELF);
+END_ENTITY;
+
+
+ENTITY logical_literal
+ SUBTYPE OF (generic_literal);
+ lit_value : LOGICAL;
+END_ENTITY;
+
+
+ENTITY logical_representation_item
+ SUBTYPE OF (representation_item, logical_literal);
+END_ENTITY;
+
+
+ENTITY loop
+ SUPERTYPE OF (ONEOF (vertex_loop, edge_loop, poly_loop))
+ SUBTYPE OF (topological_representation_item);
+END_ENTITY;
+
+
+ENTITY loss_tangent_measure_with_unit
+ SUBTYPE OF (ratio_measure_with_unit);
+END_ENTITY;
+
+
+ENTITY lot_effectivity
+ SUBTYPE OF (effectivity);
+ effectivity_lot_id : identifier;
+ effectivity_lot_size : measure_with_unit;
+END_ENTITY;
+
+
+ENTITY luminous_flux_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LUMINOUS_FLUX_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY luminous_flux_unit
+ SUBTYPE OF (named_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) = dimensions_for_si_unit (si_unit_name.lumen);
+END_ENTITY;
+
+
+ENTITY luminous_intensity_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LUMINOUS_INTENSITY_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY luminous_intensity_unit
+ SUBTYPE OF (named_unit);
+WHERE
+ WR1 : (SELF\named_unit.dimensions.length_exponent = 0.0) AND (SELF\named_unit.dimensions.mass_exponent = 0.0) AND (SELF\named_unit.dimensions.time_exponent = 0.0) AND (SELF\named_unit.dimensions.electric_current_exponent = 0.0) AND (SELF\named_unit.dimensions.thermodynamic_temperature_exponent = 0.0) AND (SELF\named_unit.dimensions.amount_of_substance_exponent = 0.0) AND (SELF\named_unit.dimensions.luminous_intensity_exponent = 1.0);
+END_ENTITY;
+
+
+ENTITY magnetic_flux_density_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAGNETIC_FLUX_DENSITY_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY magnetic_flux_density_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) = dimensions_for_si_unit (si_unit_name.tesla);
+END_ENTITY;
+
+
+ENTITY magnetic_flux_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAGNETIC_FLUX_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY magnetic_flux_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) = dimensions_for_si_unit (si_unit_name.weber);
+END_ENTITY;
+
+
+ENTITY make_from_usage_option
+ SUBTYPE OF (product_definition_usage);
+ ranking : INTEGER;
+ ranking_rationale : text;
+ quantity : measure_with_unit;
+WHERE
+ WR1 : (NOT ('NUMBER' IN TYPEOF(quantity.value_component)))
+ OR (quantity.value_component > 0);
+END_ENTITY;
+
+
+ENTITY manifold_solid_brep
+ SUBTYPE OF (solid_model);
+ outer : closed_shell;
+END_ENTITY;
+
+
+ENTITY manifold_subsurface_shape_representation
+ SUBTYPE OF (shape_representation);
+WHERE
+ WR1 : SIZEOF (QUERY (it <* SELF.items |
+ NOT (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONNECTED_FACE_SUB_SET',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT_3D'] *
+ TYPEOF(it)) = 1))) = 0;
+ WR2 : SIZEOF (QUERY (it <* SELF.items |
+ SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONNECTED_FACE_SUB_SET',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM'] * TYPEOF(it)) =1 )) > 0;
+ WR3 : SIZEOF (QUERY (mi <* QUERY (it <* items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' IN TYPEOF(it)) |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MANIFOLD_SUBSURFACE_SHAPE_REPRESENTATION' IN
+ TYPEOF(mi\mapped_item.mapping_source.
+ mapped_representation)))) = 0;
+ WR4 : SIZEOF (QUERY (cfss <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONNECTED_FACE_SUB_SET' IN TYPEOF(it)) |
+ NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OPEN_SHELL' IN TYPEOF(cfss)))) = 0;
+ WR5 : SIZEOF (QUERY (cfss <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONNECTED_FACE_SUB_SET' IN TYPEOF(it)) |
+ NOT( (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONNECTED_FACE_SUB_SET' IN
+ TYPEOF(cfss\connected_face_sub_set.parent_face_set))AND
+ (SIZEOF(QUERY(fac <* cfss\connected_face_sub_set.parent_face_set\connected_face_set.cfs_faces | NOT
+ advanced_face_properties(fac))) = 0)) OR
+ (SIZEOF(QUERY(fac <* cfss\connected_face_sub_set.parent_face_set\connected_face_set.cfs_faces | NOT
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF(fac)))) = 0)
+ ))) = 0;
+ WR6 : SIZEOF (QUERY (cfss <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONNECTED_FACE_SUB_SET' IN TYPEOF(it)) |
+ ( SIZEOF (QUERY (fac <* cfss\connected_face_set.cfs_faces | NOT
+ advanced_face_properties(fac))) = 0))) = 0;
+ WR7 : SIZEOF (QUERY (cfss <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONNECTED_FACE_SUB_SET' IN TYPEOF(it)) |
+ NOT (SIZEOF (QUERY(fcs <* cfss\connected_face_set.cfs_faces |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SUBFACE' IN TYPEOF(fcs)) AND
+ NOT (SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* fcs.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF(bnds.bound)) |
+ NOT (SIZEOF (QUERY (oe <* elp_fbnds.bound\path.edge_list |
+ NOT(('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_CURVE' IN
+ TYPEOF(oe.edge_element)) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SUBEDGE' IN
+ TYPEOF(oe.edge_element)) ))) = 0
+ ))) = 0
+ ))) = 0
+ ))) = 0;
+ WR8 : SIZEOF (QUERY (cfss <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONNECTED_FACE_SUB_SET' IN TYPEOF(it)) |
+ NOT (SIZEOF (QUERY(fcs <* cfss\connected_face_set.cfs_faces |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SUBFACE' IN TYPEOF(fcs)) AND
+ NOT (SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* fcs.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF(bnds.bound)) |
+ NOT (SIZEOF (QUERY (oe <* elp_fbnds.bound\path.edge_list |
+ NOT(('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN TYPEOF(oe.edge_start))
+ AND ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN
+ TYPEOF(oe.edge_end))
+ ))) = 0
+ ))) = 0
+ ))) = 0
+ ))) = 0;
+ WR9 : SIZEOF (QUERY (cfss <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONNECTED_FACE_SUB_SET' IN TYPEOF(it)) |
+ NOT (SIZEOF (QUERY(fcs <* cfss\connected_face_set.cfs_faces |
+ ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SUBFACE' IN TYPEOF(fcs)) AND
+ ( NOT (SIZEOF(QUERY (bnds <* fcs.bounds |
+ NOT (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_LOOP'] *
+ TYPEOF(bnds.bound)) = 1 )
+ )) = 0)
+ ))) = 0
+ ))) = 0;
+ WR10 : SIZEOF (QUERY (cfss <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONNECTED_FACE_SUB_SET' IN TYPEOF(it)) |
+ NOT (SIZEOF (QUERY(fcs <* cfss\connected_face_set.cfs_faces |
+ ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SUBFACE' IN TYPEOF(fcs)) AND
+ ( NOT (SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* fcs.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF(bnds.bound)) |
+ NOT (SIZEOF (QUERY (oe <* elp_fbnds.bound\path.edge_list |
+ NOT (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LINE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONIC',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_CURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_CURVE' ] *
+ TYPEOF(oe.edge_element\edge_curve.edge_geometry)) = 1 )
+ )) = 0
+ ))) = 0
+ )))) = 0
+ ))) = 0;
+ WR11 : SIZEOF (QUERY (cfss <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONNECTED_FACE_SUB_SET' IN TYPEOF(it)) |
+ NOT (SIZEOF (QUERY(fcs <* cfss\connected_face_set.cfs_faces |
+ ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SUBFACE' IN TYPEOF(fcs)) AND
+ (NOT (SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* fcs.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF(bnds.bound)) |
+ NOT (SIZEOF (QUERY (oe <* elp_fbnds.bound\path.edge_list |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_CURVE' IN
+ TYPEOF(oe.edge_element\edge_curve.edge_geometry)) AND
+ (NOT ((SIZEOF (QUERY (sc_ag <*
+ oe.edge_element\edge_curve.edge_geometry\
+ surface_curve.associated_geometry |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE' IN
+ TYPEOF(sc_ag)))) = 0)))
+ )) = 0
+ ))) = 0
+ )))) = 0
+ ))) = 0;
+ WR12 : SIZEOF (QUERY (cfss <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONNECTED_FACE_SUB_SET' IN TYPEOF(it)) |
+ NOT (SIZEOF (QUERY(fcs <* cfss\connected_face_set.cfs_faces |
+ ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SUBFACE' IN TYPEOF(fcs)) AND
+ (NOT (SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* fcs.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF(bnds.bound)) |
+ NOT (SIZEOF (QUERY (oe <* elp_fbnds.bound\path.edge_list |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE' IN
+ TYPEOF(oe.edge_element\edge_curve.edge_geometry)) AND
+ (NOT (SIZEOF (oe\oriented_edge.edge_element\
+ edge_curve.edge_geometry\polyline.points) >= 3))
+ )) = 0
+ ))) = 0
+ )))) = 0
+ ))) = 0;
+END_ENTITY;
+
+
+ENTITY manifold_surface_shape_representation
+ SUBTYPE OF (shape_representation);
+WHERE
+ WR1 : SIZEOF (QUERY (it <* SELF.items |
+ NOT (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_SURFACE_MODEL',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT_3D'] * TYPEOF (it)) = 1))) = 0;
+ WR2 : SIZEOF (QUERY (it <* SELF.items |
+ SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_SURFACE_MODEL',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM'] * TYPEOF (it)) = 1)) > 0;
+ WR3 : SIZEOF (QUERY (mi <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' IN TYPEOF (it)) |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MANIFOLD_SURFACE_SHAPE_REPRESENTATION'
+ IN TYPEOF (mi\mapped_item.mapping_source.mapped_representation))
+ AND
+ (SIZEOF(QUERY (mr_it <*
+ mi\mapped_item.mapping_source.mapped_representation.items |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_SURFACE_MODEL'
+ IN TYPEOF (mr_it)))) > 0 )))) = 0;
+ WR4 : SIZEOF (QUERY (sbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (sh <*
+ sbsm\shell_based_surface_model.sbsm_boundary |
+ NOT (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OPEN_SHELL',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORIENTED_CLOSED_SHELL',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CLOSED_SHELL']
+ * TYPEOF (sh)) = 1))) = 0))) = 0;
+ WR5 : SIZEOF (QUERY (sbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ sbsm\shell_based_surface_model.sbsm_boundary |
+ NOT (SIZEOF (QUERY (fa <* cfs\connected_face_set.cfs_faces |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_SURFACE' IN TYPEOF (fa)) )) = 0)))
+ = 0))) = 0;
+ WR6 : SIZEOF (QUERY (sbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ sbsm\shell_based_surface_model.sbsm_boundary |
+ NOT (SIZEOF (QUERY (fa <* cfs\connected_face_set.cfs_faces |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF (fa))
+ OR
+ (msf_surface_check(fa\face_surface.face_geometry))))) = 0)))
+ = 0))) = 0;
+ WR7 : SIZEOF (QUERY (sbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ sbsm\shell_based_surface_model.sbsm_boundary |
+ NOT (SIZEOF (QUERY (fa <* cfs\connected_face_set.cfs_faces |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF (fa))
+ OR
+ (SIZEOF (QUERY (bnds <* fa.bounds |
+ NOT (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_LOOP']
+ * TYPEOF (bnds.bound)) = 1))) = 0)))) = 0))) = 0))) = 0;
+ WR8 : SIZEOF (QUERY (sbsm <* QUERY (it <* SELF.items|
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ sbsm\shell_based_surface_model.sbsm_boundary |
+ NOT (SIZEOF (QUERY (fa <* cfs\connected_face_set.cfs_faces |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF (fa))
+ OR
+ (SIZEOF (QUERY (elp_fbnds <* QUERY (bnds <* fa.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (bnds.bound)) |
+ NOT (SIZEOF (QUERY (oe <* elp_fbnds\path.edge_list |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_CURVE' IN TYPEOF
+ (oe.edge_element)))) = 0))) = 0)))) = 0))) = 0))) = 0;
+ WR9 : SIZEOF (QUERY (sbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ sbsm\shell_based_surface_model.sbsm_boundary |
+ NOT (SIZEOF (QUERY (fa <* cfs\connected_face_set.cfs_faces |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF (fa))
+ OR
+ (SIZEOF (QUERY (elp_fbnds <* QUERY (bnds <* fa.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (bnds.bound)) |
+ NOT (SIZEOF (QUERY (oe_cv <* QUERY (oe <*
+ elp_fbnds\path.edge_list |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_CURVE' IN TYPEOF (oe.edge_element)) |
+ NOT (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_CURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONIC',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_REPLICA',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LINE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OFFSET_CURVE_3D',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_CURVE'] *
+ TYPEOF (oe_cv.edge_element\edge_curve.edge_geometry))
+ = 1))) = 0))) = 0)))) = 0))) = 0))) = 0;
+ WR10 : SIZEOF (QUERY (sbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ sbsm\shell_based_surface_model.sbsm_boundary |
+ NOT (SIZEOF (QUERY (fa <* cfs\connected_face_set.cfs_faces |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF (fa))
+ OR
+ (SIZEOF (QUERY (elp_fbnds <* QUERY (bnds <* fa.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (bnds.bound)) |
+ NOT (SIZEOF (QUERY (oe <* elp_fbnds\path.edge_list |
+ NOT (msf_curve_check (oe.edge_element\edge_curve.edge_geometry))))
+ = 0))) = 0)))) = 0))) = 0))) = 0;
+ WR11 : SIZEOF (QUERY(sbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ sbsm\shell_based_surface_model.sbsm_boundary |
+ NOT (SIZEOF (QUERY (fa <* cfs\connected_face_set.cfs_faces |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF (fa))
+ OR
+ (SIZEOF (QUERY (elp_fbnds <* QUERY (bnds <* fa.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (bnds.bound)) |
+ NOT (SIZEOF (QUERY (oe <* elp_fbnds\path.edge_list|
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN TYPEOF
+ (oe.edge_element.edge_start))
+ AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN
+ TYPEOF (oe.edge_element.edge_end)))))
+ = 0))) = 0)))) = 0))) = 0))) = 0;
+ WR12 : SIZEOF (QUERY (sbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ sbsm\shell_based_surface_model.sbsm_boundary |
+ NOT (SIZEOF (QUERY (fa <* cfs\connected_face_set.cfs_faces |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF (fa))
+ OR
+ (SIZEOF (QUERY (elp_fbnds <* QUERY (bnds <* fa.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (bnds.bound)) |
+ NOT (SIZEOF (QUERY (oe <* elp_fbnds\path.edge_list |
+ NOT ((SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CARTESIAN_POINT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DEGENERATE_PCURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_ON_CURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_ON_SURFACE'] * TYPEOF
+ (oe.edge_element.edge_start\vertex_point.vertex_geometry)) = 1)
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CARTESIAN_POINT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DEGENERATE_PCURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_ON_CURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_ON_SURFACE'] * TYPEOF
+ (oe.edge_element.edge_end\vertex_point.vertex_geometry)) = 1
+ )))) = 0))) = 0)))) = 0))) = 0))) = 0;
+ WR13 : SIZEOF (QUERY (sbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ sbsm\shell_based_surface_model.sbsm_boundary |
+ NOT (SIZEOF (QUERY (fa <* cfs\connected_face_set.cfs_faces |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF (fa))
+ OR
+ (SIZEOF (QUERY (vlp_fbnds <* QUERY (bnds <* fa.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_LOOP' IN TYPEOF (bnds.bound)) |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN TYPEOF
+ (vlp_fbnds\vertex_loop.loop_vertex)))) = 0)))) = 0)))
+ = 0))) = 0;
+ WR14 : SIZEOF (QUERY (sbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ sbsm\shell_based_surface_model.sbsm_boundary |
+ NOT (SIZEOF (QUERY (fa <* cfs\connected_face_set.cfs_faces |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF (fa))
+ OR
+ (SIZEOF (QUERY (vlp_fbnds <* QUERY (bnds <* fa.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_LOOP' IN TYPEOF (bnds.bound)) |
+ NOT (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CARTESIAN_POINT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DEGENERATE_PCURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_ON_CURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_ON_SURFACE'] * TYPEOF
+ (vlp_fbnds\vertex_loop.loop_vertex\vertex_point.vertex_geometry))
+ = 1))) = 0)))) = 0))) = 0))) = 0;
+END_ENTITY;
+
+
+ENTITY mapped_item
+ SUBTYPE OF (representation_item);
+ mapping_source : representation_map;
+ mapping_target : representation_item;
+WHERE
+ WR1 : acyclic_mapped_representation(SELF);
+END_ENTITY;
+
+
+ENTITY mass_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MASS_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY mass_unit
+ SUBTYPE OF (named_unit);
+WHERE
+ WR1 : (SELF\named_unit.dimensions.length_exponent = 0.0) AND (SELF\named_unit.dimensions.mass_exponent = 1.0) AND (SELF\named_unit.dimensions.time_exponent = 0.0) AND (SELF\named_unit.dimensions.electric_current_exponent = 0.0) AND (SELF\named_unit.dimensions.thermodynamic_temperature_exponent = 0.0) AND (SELF\named_unit.dimensions.amount_of_substance_exponent = 0.0) AND (SELF\named_unit.dimensions.luminous_intensity_exponent = 0.0);
+END_ENTITY;
+
+
+ENTITY material_designation;
+ name : label;
+ definitions : SET [1:?] OF characterized_definition;
+END_ENTITY;
+
+
+ENTITY material_designation_characterization;
+ name : label;
+ description : text;
+ designation : material_designation;
+ property : characterized_material_property;
+END_ENTITY;
+
+
+ENTITY material_property
+ SUBTYPE OF (property_definition);
+UNIQUE
+ UR1: SELF\property_definition.name, SELF\property_definition.definition;
+WHERE
+ WR1 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CHARACTERIZED_OBJECT' IN
+ TYPEOF(SELF\property_definition.definition)) OR
+ (SIZEOF(bag_to_set(USEDIN(SELF ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')) -
+ QUERY(temp <* bag_to_set(USEDIN(SELF ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')) |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'MATERIAL_PROPERTY_REPRESENTATION' IN
+ TYPEOF(temp)))) = 0);
+END_ENTITY;
+
+
+ENTITY material_property_representation
+ SUBTYPE OF (property_definition_representation);
+ dependent_environment : data_environment;
+END_ENTITY;
+
+
+ENTITY measure_qualification;
+ name : label;
+ description : text;
+ qualified_measure : measure_with_unit;
+ qualifiers : SET [1:?] OF value_qualifier;
+WHERE
+ WR1 : SIZEOF(QUERY(temp <* qualifiers |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRECISION_QUALIFIER'
+ IN TYPEOF(temp))) < 2;
+ WR2 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.REPRESENTATION_ITEM'
+ IN TYPEOF(SELF\measure_qualification.qualified_measure));
+END_ENTITY;
+
+
+ENTITY measure_representation_item
+ SUBTYPE OF (representation_item, measure_with_unit);
+END_ENTITY;
+
+
+ENTITY measure_with_unit
+ SUPERTYPE OF (ONEOF (length_measure_with_unit, mass_measure_with_unit, time_measure_with_unit, electric_current_measure_with_unit, thermodynamic_temperature_measure_with_unit, celsius_temperature_measure_with_unit, amount_of_substance_measure_with_unit, luminous_intensity_measure_with_unit, plane_angle_measure_with_unit, solid_angle_measure_with_unit, area_measure_with_unit, volume_measure_with_unit, ratio_measure_with_unit, acceleration_measure_with_unit, capacitance_measure_with_unit, electric_charge_measure_with_unit, conductance_measure_with_unit, electric_potential_measure_with_unit, energy_measure_with_unit, magnetic_flux_density_measure_with_unit, force_measure_with_unit, frequency_measure_with_unit, illuminance_measure_with_unit, inductance_measure_with_unit, luminous_flux_measure_with_unit, magnetic_flux_measure_with_unit, power_measure_with_unit, pressure_measure_with_unit, resistance_measure_with_unit, velocity_measure_with_unit, absorbed_dose_measure_with_unit, radioactivity_measure_with_unit, dose_equivalent_measure_with_unit));
+ value_component : measure_value;
+ unit_component : unit;
+WHERE
+ WR1 : valid_units(SELF);
+END_ENTITY;
+
+
+ENTITY mechanical_context
+ SUBTYPE OF (product_context);
+WHERE
+ WR1 : SELF.discipline_type = 'mechanical';
+END_ENTITY;
+
+
+ENTITY mechanical_design_and_draughting_relationship
+ SUBTYPE OF (definitional_representation_relationship_with_same_context);
+ SELF\representation_relationship.rep_1 : mechanical_design_and_draughting_relationship_select;
+ SELF\representation_relationship.rep_2 : mechanical_design_and_draughting_relationship_select;
+WHERE
+ WR1 : NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'DRAUGHTING_MODEL' IN TYPEOF(rep_2)) OR
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'DRAUGHTING_MODEL' IN TYPEOF(rep_1)) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'SHAPE_REPRESENTATION' IN TYPEOF(rep_1)));
+ WR2 : NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'MECHANICAL_DESIGN_GEOMETRIC_PRESENTATION_REPRESENTATION' IN TYPEOF(rep_2)) OR
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'MECHANICAL_DESIGN_GEOMETRIC_PRESENTATION_REPRESENTATION' IN TYPEOF(rep_1)) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'SHAPE_REPRESENTATION' IN TYPEOF(rep_1)));
+ WR3 : NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'MECHANICAL_DESIGN_SHADED_PRESENTATION_REPRESENTATION' IN TYPEOF(rep_2)) OR
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'MECHANICAL_DESIGN_SHADED_PRESENTATION_REPRESENTATION' IN TYPEOF(rep_1)) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'SHAPE_REPRESENTATION' IN TYPEOF(rep_1)));
+END_ENTITY;
+
+
+ENTITY mechanical_design_geometric_presentation_area
+ SUBTYPE OF (presentation_area);
+ SELF\representation.items : SET [1:?] OF mechanical_design_geometric_presentation_area_items;
+WHERE
+ WR1 : SIZEOF(QUERY(it1 <* SELF.items |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM'
+ IN TYPEOF(it1))
+ OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRESENTATION_VIEW'
+ IN TYPEOF
+ (it1\mapped_item.mapping_source.mapped_representation)))) = 0;
+ WR2 : SIZEOF(QUERY(pv <* QUERY(mi1 <* QUERY(it1 <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM'
+ IN TYPEOF(it1)) |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRESENTATION_VIEW'
+ IN TYPEOF
+ (mi1\mapped_item.mapping_source.mapped_representation)) |
+ -- search in all presentation_views for axis2_placements and
+ -- mapped_items and for the subtype of mapped_item
+ -- camera_image_3d_with_scale; the latter shall reference
+ -- a mechanical_design_geometric_presentation_representation;
+ -- the supertype mapped_item shall reference presentation_view.
+ NOT (SIZEOF(QUERY(it2 <* pv\mapped_item.mapping_source.
+ mapped_representation\representation.items |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT'
+ IN TYPEOF(it2))
+ OR
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM'
+ IN TYPEOF(it2)) AND NOT
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'CAMERA_IMAGE_3D_WITH_SCALE' IN TYPEOF(it2))) AND NOT (
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRESENTATION_VIEW'
+ IN TYPEOF
+ (it2\mapped_item.mapping_source.mapped_representation)))
+ OR
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'CAMERA_IMAGE_3D_WITH_SCALE' IN TYPEOF(it2))
+ AND NOT (
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'MECHANICAL_DESIGN_GEOMETRIC_PRESENTATION_REPRESENTATION'
+ IN TYPEOF (it2\mapped_item.mapping_source.mapped_representation) ))
+ ))) = 0))) = 0;
+ WR3 : (SIZEOF(QUERY(ps <* USEDIN (SELF,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRESENTATION_SIZE.UNIT') | ((ps.size\planar_extent.size_in_x <= 0)
+ OR
+ (ps.size\planar_extent.size_in_y <= 0)))) = 0)
+ AND
+ (SIZEOF(QUERY(ais <* USEDIN (SELF,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'AREA_IN_SET.AREA') |
+ (SIZEOF(QUERY(ps <* USEDIN (ais,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRESENTATION_SIZE.UNIT') |
+ ((ps.size\planar_extent.size_in_x <= 0)
+ OR
+ (ps.size\planar_extent.size_in_y <= 0)))) > 0))) = 0);
+ WR4 : (SIZEOF(QUERY(ps <* USEDIN (SELF,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRESENTATION_SIZE.UNIT') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'AXIS2_PLACEMENT_2D' IN TYPEOF (ps.size.placement)))) = 1)
+ AND
+ (SIZEOF(QUERY(ps <* USEDIN (SELF,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRESENTATION_SIZE.UNIT') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'AXIS2_PLACEMENT_3D' IN TYPEOF (ps.size.placement)))) = 0)
+ OR
+ ((SIZEOF(QUERY(ais <* USEDIN (SELF,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'AREA_IN_SET.AREA') |
+ (SIZEOF(QUERY(ps <* USEDIN (ais,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRESENTATION_SIZE.UNIT') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'AXIS2_PLACEMENT_2D' IN TYPEOF (ps.size.placement)))) = 1))) = 1)
+ AND
+ (SIZEOF(QUERY(ais <* USEDIN (SELF,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'AREA_IN_SET.AREA') |
+ (SIZEOF(QUERY(ps <* USEDIN (ais,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRESENTATION_SIZE.UNIT') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'AXIS2_PLACEMENT_3D' IN TYPEOF (ps.size.placement)))) = 0))) = 1));
+END_ENTITY;
+
+
+ENTITY mechanical_design_geometric_presentation_representation
+ SUBTYPE OF (representation);
+ SELF\representation.items : SET [1:?] OF mechanical_design_geometric_presentation_representation_items;
+WHERE
+ WR1 : SIZEOF(QUERY(mi <* QUERY(it <* SELF.items |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM'
+ IN TYPEOF(it))) | NOT (SIZEOF(
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'SHAPE_REPRESENTATION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'MECHANICAL_DESIGN_GEOMETRIC_PRESENTATION_REPRESENTATION']
+ * TYPEOF(mi\mapped_item.mapping_source.mapped_representation))
+ = 1))) = 0;
+ WR2 : SIZEOF(QUERY(smi <* QUERY(si <* QUERY(it <* SELF.items |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF(it))) |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM'
+ IN TYPEOF(si\styled_item.item))) | NOT (
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'SHAPE_REPRESENTATION' IN TYPEOF (smi\styled_item.
+ item\mapped_item.mapping_source.mapped_representation))) )) = 0;
+ WR3 : SIZEOF(QUERY(si <* QUERY(it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF(it)) | NOT (SIZEOF(QUERY(psa <* si\styled_item.styles |
+ NOT (SIZEOF(QUERY(pss <* psa.styles | NOT (SIZEOF(
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_STYLE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE']
+ * TYPEOF(pss)) = 1))) = 0))) = 0))) = 0;
+ WR4 : SIZEOF(QUERY(si <* QUERY(it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF(it)) |
+ NOT (SIZEOF(QUERY(psbc <* QUERY(psa <* si\styled_item.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRESENTATION_STYLE_BY_CONTEXT' IN TYPEOF(psa)) | NOT (SIZEOF(
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'REPRESENTATION_ITEM',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.REPRESENTATION']
+ * TYPEOF(psbc\presentation_style_by_context.style_context))
+ = 1))) = 0))) = 0;
+ WR5 : SIZEOF(QUERY(si <* QUERY(it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF(it)) | NOT (SIZEOF(QUERY(psa <* si\styled_item.styles |
+ NOT (SIZEOF(QUERY(ps <* QUERY(pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_STYLE'
+ IN TYPEOF(pss)) | NOT
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'POSITIVE_LENGTH_MEASURE' IN TYPEOF (ps\point_style.marker_size))
+ AND (SIZEOF(
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_PRE_DEFINED_COLOUR']
+ * TYPEOF(ps\point_style.marker_colour))
+ = 1)))) = 0))) = 0))) = 0;
+ WR6 : SIZEOF(QUERY(si <* QUERY(it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF(it)) | NOT (SIZEOF(QUERY(psa <* si\styled_item.styles |
+ NOT (SIZEOF(QUERY(cs <* QUERY(pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE'
+ IN TYPEOF(pss)) | NOT((SIZEOF(
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_PRE_DEFINED_COLOUR']
+ * TYPEOF(cs\curve_style.curve_colour)) = 1)
+ AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'POSITIVE_LENGTH_MEASURE' IN TYPEOF (cs\curve_style.curve_width))
+ AND (SIZEOF(
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE_FONT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_PRE_DEFINED_CURVE_FONT']
+ * TYPEOF(cs\curve_style.curve_font)) = 1)))) = 0))) = 0))) = 0;
+ WR7 : SIZEOF(QUERY(si <* QUERY(it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF(it)) | NOT (SIZEOF(QUERY(psa <* si\styled_item.styles |
+ NOT (SIZEOF(QUERY(ssu <* QUERY(pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE'
+ IN TYPEOF(pss)) |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'SURFACE_SIDE_STYLE' IN TYPEOF
+ (ssu\surface_style_usage.style)))) = 0))) = 0))) = 0;
+ WR8 : SIZEOF(QUERY(si <* QUERY(it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF(it)) | NOT (SIZEOF(QUERY(psa <* si\styled_item.styles |
+ NOT (SIZEOF(QUERY(ssu <* QUERY(pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE'
+ IN TYPEOF(pss)) | NOT (SIZEOF(QUERY(sses <*
+ ssu\surface_style_usage.style\surface_side_style.styles |
+ NOT (SIZEOF(
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'SURFACE_STYLE_PARAMETER_LINE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'SURFACE_STYLE_CONTROL_GRID',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'SURFACE_STYLE_SILHOUETTE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'SURFACE_STYLE_SEGMENTATION_CURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'SURFACE_STYLE_FILL_AREA',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'SURFACE_STYLE_BOUNDARY']
+ * TYPEOF(sses)) = 1))) = 0))) = 0))) = 0))) = 0;
+ WR9 : SIZEOF(QUERY(si <* QUERY(it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF(it)) | NOT (SIZEOF(QUERY(psa <* si\styled_item.styles |
+ NOT (SIZEOF(QUERY(ssu <* QUERY(pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE'
+ IN TYPEOF(pss)) | NOT (SIZEOF(QUERY(sspl <* QUERY(sses <*
+ ssu\surface_style_usage.style\surface_side_style.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'SURFACE_STYLE_PARAMETER_LINE' IN TYPEOF(sses)) |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE'
+ IN TYPEOF
+ (sspl\surface_style_parameter_line.style_of_parameter_lines))
+ AND (SIZEOF(
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_PRE_DEFINED_COLOUR']
+ * TYPEOF(sspl\surface_style_parameter_line.
+ style_of_parameter_lines\curve_style.curve_colour)) = 1)
+ AND (
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'POSITIVE_LENGTH_MEASURE' IN TYPEOF
+ (sspl\surface_style_parameter_line.
+ style_of_parameter_lines\curve_style.curve_width))
+ AND (SIZEOF(
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE_FONT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_CURVE_FONT']
+ * TYPEOF(sspl\surface_style_parameter_line.
+ style_of_parameter_lines\curve_style.curve_font)) = 1))))
+ = 0))) = 0))) = 0))) = 0;
+ WR10 : SIZEOF(QUERY(si <* QUERY(it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF(it)) | NOT (SIZEOF(QUERY(psa <* si\styled_item.styles |
+ NOT (SIZEOF(QUERY(ssu <* QUERY(pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE'
+ IN TYPEOF(pss)) | NOT (SIZEOF(QUERY(sscg <* QUERY(sses <*
+ ssu\surface_style_usage.style\surface_side_style.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'SURFACE_STYLE_CONTROL_GRID' IN TYPEOF(sses)) |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE'
+ IN TYPEOF (sscg\surface_style_control_grid.style_of_control_grid))
+ AND (SIZEOF(
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_PRE_DEFINED_COLOUR']
+ * TYPEOF(sscg\surface_style_control_grid.
+ style_of_control_grid\curve_style.curve_colour)) = 1)
+ AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'POSITIVE_LENGTH_MEASURE' IN TYPEOF
+ (sscg\surface_style_control_grid.
+ style_of_control_grid\curve_style.curve_width))
+ AND (SIZEOF(
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE_FONT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_PRE_DEFINED_CURVE_FONT']
+ * TYPEOF(sscg\surface_style_control_grid.
+ style_of_control_grid\curve_style.curve_font)) = 1))))
+ = 0))) = 0))) = 0))) = 0;
+ WR11 : SIZEOF(QUERY(si <* QUERY(it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF(it)) |
+ NOT (SIZEOF(QUERY(psa <* si\styled_item.styles |
+ NOT (SIZEOF(QUERY(ssu <* QUERY(pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE'
+ IN TYPEOF(pss)) | NOT (SIZEOF(QUERY(sssh <* QUERY(sses <*
+ ssu\surface_style_usage.style\surface_side_style.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'SURFACE_STYLE_SILHOUETTE' IN TYPEOF(sses)) |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE'
+ IN TYPEOF (sssh\surface_style_silhouette.style_of_silhouette))
+ AND (SIZEOF(
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_PRE_DEFINED_COLOUR']
+ * TYPEOF(sssh\surface_style_silhouette.
+ style_of_silhouette\curve_style.curve_colour)) = 1)
+ AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'POSITIVE_LENGTH_MEASURE' IN TYPEOF
+ (sssh\surface_style_silhouette.style_of_silhouette\curve_style.
+ curve_width))
+ AND (SIZEOF(
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE_FONT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_PRE_DEFINED_CURVE_FONT']
+ * TYPEOF(sssh\surface_style_silhouette.
+ style_of_silhouette\curve_style.curve_font)) = 1))))
+ = 0))) = 0))) = 0))) = 0;
+ WR12 : SIZEOF(QUERY(si <* QUERY(it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF(it)) | NOT (SIZEOF(QUERY(psa <* si\styled_item.styles |
+ NOT (SIZEOF(QUERY(ssu <* QUERY(pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE'
+ IN TYPEOF(pss)) | NOT (SIZEOF(QUERY(sssc <* QUERY(sses <*
+ ssu\surface_style_usage.style\surface_side_style.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'SURFACE_STYLE_SEGMENTATION_CURVE' IN TYPEOF(sses)) |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE'
+ IN TYPEOF
+ (sssc\surface_style_segmentation_curve.style_of_segmentation_curve))
+ AND (SIZEOF(
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_PRE_DEFINED_COLOUR']
+ * TYPEOF(sssc\surface_style_segmentation_curve.
+ style_of_segmentation_curve\curve_style.curve_colour)) = 1)
+ AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'POSITIVE_LENGTH_MEASURE' IN TYPEOF
+ (sssc\surface_style_segmentation_curve.
+ style_of_segmentation_curve\curve_style.curve_width))
+ AND (SIZEOF(
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE_FONT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_PRE_DEFINED_CURVE_FONT']
+ * TYPEOF(sssc\surface_style_segmentation_curve.
+ style_of_segmentation_curve\curve_style.curve_font)) = 1))))
+ = 0))) = 0))) = 0))) = 0;
+ WR13 : SIZEOF(QUERY(si <* QUERY(it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF(it)) | NOT (SIZEOF(QUERY(psa <* si\styled_item.styles |
+ NOT (SIZEOF(QUERY(ssu <* QUERY(pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE'
+ IN TYPEOF(pss)) | NOT (SIZEOF(QUERY(ssbd <* QUERY(sses <*
+ ssu\surface_style_usage.style\surface_side_style.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'SURFACE_STYLE_BOUNDARY' IN TYPEOF(sses)) |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE'
+ IN TYPEOF (ssbd\surface_style_boundary.style_of_boundary))
+ AND (SIZEOF(
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_PRE_DEFINED_COLOUR']
+ * TYPEOF(ssbd\surface_style_boundary.
+ style_of_boundary\curve_style.curve_colour)) = 1)
+ AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'POSITIVE_LENGTH_MEASURE' IN TYPEOF (ssbd\surface_style_boundary.
+ style_of_boundary\curve_style.curve_width))
+ AND (SIZEOF(
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE_FONT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_PRE_DEFINED_CURVE_FONT']
+ * TYPEOF(ssbd\surface_style_boundary.
+ style_of_boundary\curve_style.curve_font)) = 1)))) = 0)))
+ = 0))) = 0))) = 0;
+END_ENTITY;
+
+
+ENTITY mechanical_design_presentation_representation_with_draughting
+ SUBTYPE OF (representation);
+ SELF\representation.items : SET [1:?] OF camera_model_d3;
+END_ENTITY;
+
+
+ENTITY mechanical_design_shaded_presentation_area
+ SUBTYPE OF (presentation_area);
+WHERE
+ WR1 : SIZEOF (QUERY (it1 <* SELF.items |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT'
+ IN TYPEOF (it1))
+ OR
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM'
+ IN TYPEOF (it1)) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRESENTATION_VIEW'
+ IN TYPEOF
+ (it1\mapped_item.mapping_source.mapped_representation)))))) = 0;
+ WR2 : SIZEOF (QUERY (pv <* QUERY (mi1 <* QUERY (it1 <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM'
+ IN TYPEOF (it1)) |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRESENTATION_VIEW'
+ IN TYPEOF
+ (mi1\mapped_item.mapping_source.mapped_representation)) |
+ (* search in all presentation_views for axis2_placements and
+ mapped_items and for the subtype of mapped_item,
+ camera_image_3d_with_scale; the latter shall reference
+ a mechanical_design_geometric_presentation_representation;
+ the supertype mapped_item shall reference presentation_view. *)
+ NOT (SIZEOF(QUERY(it2 <* pv\mapped_item.mapping_source.
+ mapped_representation\representation.items |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT'
+ IN TYPEOF(it2))
+ OR
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM'
+ IN TYPEOF(it2)) AND NOT
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'CAMERA_IMAGE_3D_WITH_SCALE' IN TYPEOF(it2))) AND NOT (
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRESENTATION_VIEW'
+ IN TYPEOF
+ (it2\mapped_item.mapping_source.mapped_representation)))
+ OR
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'CAMERA_IMAGE_3D_WITH_SCALE' IN TYPEOF(it2))
+ AND NOT (
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'MECHANICAL_DESIGN_SHADED_PRESENTATION_REPRESENTATION'
+ IN TYPEOF (it2\mapped_item.mapping_source.mapped_representation) ))
+ ))) = 0))) = 0;
+ WR3 : (SIZEOF (QUERY(ps <* USEDIN (SELF,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRESENTATION_SIZE.UNIT') |
+ NOT ((ps.size\planar_extent.size_in_x > 0)
+ AND (ps.size\planar_extent.size_in_y > 0)) )) = 0)
+ AND
+ (* check secondly for presentation_set, via area_in_set *)
+ (SIZEOF (QUERY(pset <* QUERY(ais <*
+ USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'AREA_IN_SET.AREA')
+ | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRESENTATION_SET' IN TYPEOF (ais.in_set)) |
+ (* after having collected all presentation_set, check their sizes *)
+ SIZEOF (QUERY(psize <* USEDIN(pset,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRESENTATION_SIZE.UNIT')
+ | NOT ((psize.size\planar_extent.size_in_x > 0)
+ AND (psize.size\planar_extent.size_in_y > 0)) )) = 0)) = 0);
+ WR4 : (SIZEOF(QUERY( psize <* USEDIN (SELF,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRESENTATION_SIZE.UNIT')
+ | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'AXIS2_PLACEMENT_2D'
+ IN TYPEOF (psize.size.placement))) = 1)
+ AND
+ (* check secondly for presentation_set, via area_in_set *)
+ (SIZEOF (QUERY(pset <* QUERY(ais <*
+ USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'AREA_IN_SET.AREA')
+ | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRESENTATION_SET' IN TYPEOF (ais.in_set)) |
+ (* after having collected all presentation_set, check their
+ dimension *)
+ SIZEOF (QUERY(psize <* USEDIN(pset,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRESENTATION_SIZE.UNIT')
+ | NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'AXIS2_PLACEMENT_2D'
+ IN TYPEOF (psize.size.placement)) )) = 0)) = 0);
+ WR5 : SIZEOF (QUERY (pv <* QUERY (mi1 <* QUERY (it1 <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM'
+ IN TYPEOF (it1)) |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRESENTATION_VIEW'
+ IN TYPEOF
+ (mi1\mapped_item.mapping_source.mapped_representation)) |
+ (* search in all presentation_views for
+ mapped_items and for the subtype of mapped_item,
+ camera_image_3d_with_scale; the latter shall reference
+ a camera_usage that shall have as its mapping_origin either
+ camera_model_d3, camera_model_d3_with_hlhsr, or
+ camera_model_with_light_sources. *)
+ NOT (SIZEOF(QUERY(ci <* pv\mapped_item.mapping_source.
+ mapped_representation\representation.items |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'CAMERA_IMAGE_3D_WITH_SCALE' IN TYPEOF(ci))
+ AND
+ (SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'CAMERA_MODEL_D3',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'CAMERA_MODEL_D3_WITH_HLHSR',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'CAMERA_MODEL_WITH_LIGHT_SOURCES'] * TYPEOF
+ (ci\mapped_item.mapping_source.mapping_origin))
+ = 1))) = 0))) = 0;
+END_ENTITY;
+
+
+ENTITY mechanical_design_shaded_presentation_representation
+ SUBTYPE OF (representation);
+WHERE
+ WR1 : SIZEOF(QUERY(it <* SELF.items |
+ NOT (SIZEOF(
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CAMERA_MODEL_D3']
+ * TYPEOF(it)) = 1))) = 0;
+ WR2 : SIZEOF(QUERY(mi <* QUERY(it <* SELF.items |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM'
+ IN TYPEOF(it))) | NOT (SIZEOF(
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'SHAPE_REPRESENTATION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'MECHANICAL_DESIGN_SHADED_PRESENTATION_REPRESENTATION']
+ * TYPEOF(mi\mapped_item.mapping_source.mapped_representation))
+ = 1))) = 0;
+ WR3 : SIZEOF(QUERY(smi <* QUERY(si <* QUERY(it <* SELF.items |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF(it))) |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM'
+ IN TYPEOF(si\styled_item.item))) | NOT (
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'SHAPE_REPRESENTATION' IN TYPEOF (smi\styled_item.
+ item\mapped_item.mapping_source.mapped_representation))) )) = 0;
+ WR4 : SIZEOF (QUERY (si <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (psa <* si\styled_item.styles |
+ NOT (SIZEOF (QUERY (pss <* psa.styles |
+ NOT (SIZEOF (
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_STYLE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE']
+ * TYPEOF (pss)) = 1))) = 0))) = 0))) = 0;
+ WR5 : SIZEOF (QUERY (si <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (psbc <* QUERY (psa <* si\styled_item.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'PRESENTATION_STYLE_BY_CONTEXT' IN TYPEOF (psa)) |
+ NOT (SIZEOF (
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.REPRESENTATION_ITEM',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.REPRESENTATION']
+ * TYPEOF (psbc\presentation_style_by_context.style_context)) = 1)))
+ = 0))) = 0;
+ WR6 : SIZEOF (QUERY (si <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (psa <* si\styled_item.styles |
+ NOT (SIZEOF (QUERY (ps <* QUERY (pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_STYLE'
+ IN TYPEOF (pss)) |
+ NOT (
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MARKER_TYPE'
+ IN TYPEOF (ps\point_style.marker))
+ AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POSITIVE_LENGTH_MEASURE' IN TYPEOF
+ (ps\point_style.marker_size))
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_COLOUR'] * TYPEOF
+ (ps\point_style.marker_colour)) = 1)))) = 0))) = 0))) = 0;
+ WR7 : SIZEOF (QUERY (si <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (psa <* si\styled_item.styles |
+ NOT (SIZEOF (QUERY (cs <* QUERY (pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE'
+ IN TYPEOF (pss)) |
+ NOT (
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_COLOUR'] * TYPEOF
+ (cs\curve_style.curve_colour)) = 1)
+ AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POSITIVE_LENGTH_MEASURE' IN TYPEOF
+ (cs\curve_style.curve_width))
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'CURVE_STYLE_FONT', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_CURVE_FONT'] * TYPEOF
+ (cs\curve_style.curve_font)) = 1)))) = 0))) = 0))) = 0;
+ WR8 : SIZEOF (QUERY (si <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (psa <* si\styled_item.styles |
+ NOT (SIZEOF (QUERY (ssu <* QUERY (pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE'
+ IN TYPEOF (pss)) |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_SIDE_STYLE'
+ IN TYPEOF (ssu\surface_style_usage.style)) )) = 0))) = 0 ))) = 0;
+ WR9 : SIZEOF (QUERY (si <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (psa <* si\styled_item.styles |
+ NOT (SIZEOF (QUERY (ssu <* QUERY (pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE'
+ IN TYPEOF (pss)) |
+ NOT (SIZEOF (QUERY (sses <*
+ ssu\surface_style_usage.style\surface_side_style.styles |
+ NOT (SIZEOF (
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'SURFACE_STYLE_PARAMETER_LINE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'SURFACE_STYLE_CONTROL_GRID',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'SURFACE_STYLE_SILHOUETTE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'SURFACE_STYLE_SEGMENTATION_CURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'SURFACE_STYLE_BOUNDARY',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'SURFACE_STYLE_FILL_AREA',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'SURFACE_STYLE_RENDERING'] * TYPEOF (sses)) = 1))) = 0))) = 0)))
+ = 0))) = 0;
+ WR10 : SIZEOF (QUERY (si <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (psa <* si\styled_item.styles |
+ NOT (SIZEOF (QUERY (ssu <* QUERY (pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE'
+ IN TYPEOF (pss)) |
+ NOT (SIZEOF (QUERY (ssfa <* QUERY (sses <*
+ ssu\surface_style_usage.style\surface_side_style.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_FILL_AREA'
+ IN TYPEOF (sses)) |
+ NOT (SIZEOF (QUERY (fss <*
+ ssfa\surface_style_fill_area.fill_area.fill_styles |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'FILL_AREA_STYLE_COLOUR' IN TYPEOF (fss))
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_COLOUR'] * TYPEOF
+ (fss\fill_area_style_colour.fill_colour)) = 1)))) = 0))) = 0)))
+ = 0))) = 0))) = 0;
+ WR11 : SIZEOF (QUERY (si <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (psa <* si\styled_item.styles |
+ NOT (SIZEOF (QUERY (ssu <* QUERY (pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE'
+ IN TYPEOF (pss)) |
+ NOT (SIZEOF (QUERY (sspl <* QUERY (sses <*
+ ssu\surface_style_usage.style\surface_side_style.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'SURFACE_STYLE_PARAMETER_LINE' IN TYPEOF (sses)) |
+ NOT ((
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE' IN TYPEOF
+ (sspl\surface_style_parameter_line.style_of_parameter_lines))
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_COLOUR'] * TYPEOF
+ (sspl\surface_style_parameter_line.
+ style_of_parameter_lines\curve_style.curve_colour)) = 1)
+ AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POSITIVE_LENGTH_MEASURE' IN TYPEOF
+ (sspl\surface_style_parameter_line.
+ style_of_parameter_lines\curve_style.curve_width))
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'CURVE_STYLE_FONT', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_CURVE_FONT'] * TYPEOF
+ (sspl\surface_style_parameter_line.
+ style_of_parameter_lines\curve_style.curve_font)) = 1))
+ OR
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE_RENDERING'
+ IN TYPEOF
+ (sspl\surface_style_parameter_line.style_of_parameter_lines))
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_COLOUR'] * TYPEOF
+ (sspl\surface_style_parameter_line.style_of_parameter_lines\
+ curve_style_rendering.rendering_properties.rendered_colour))
+ = 1))) )) = 0))) = 0))) = 0))) = 0;
+ WR12 : SIZEOF (QUERY (si <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (psa <* si\styled_item.styles |
+ NOT (SIZEOF (QUERY (ssu <* QUERY (pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE'
+ IN TYPEOF (pss)) |
+ NOT (SIZEOF (QUERY (sscg <* QUERY (sses <*
+ ssu\surface_style_usage.style\surface_side_style.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'SURFACE_STYLE_CONTROL_GRID' IN TYPEOF (sses)) |
+ NOT ((
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE'
+ IN TYPEOF (sscg\surface_style_control_grid.style_of_control_grid))
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_COLOUR'] * TYPEOF
+ (sscg\surface_style_control_grid.
+ style_of_control_grid\curve_style.curve_colour)) = 1)
+ AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POSITIVE_LENGTH_MEASURE' IN TYPEOF
+ (sscg\surface_style_control_grid.
+ style_of_control_grid\curve_style.curve_width))
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'CURVE_STYLE_FONT', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_CURVE_FONT'] * TYPEOF
+ (sscg\surface_style_control_grid.
+ style_of_control_grid\curve_style.curve_font)) = 1))
+ OR
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE_RENDERING'
+ IN TYPEOF (sscg\surface_style_control_grid.style_of_control_grid))
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_COLOUR'] * TYPEOF
+ (sscg\surface_style_control_grid.style_of_control_grid\
+ curve_style_rendering.rendering_properties.rendered_colour))
+ = 1))) )) = 0))) = 0))) = 0))) = 0;
+ WR13 : SIZEOF (QUERY (si <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (psa <* si\styled_item.styles |
+ NOT (SIZEOF (QUERY (ssu <* QUERY (pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE'
+ IN TYPEOF (pss)) |
+ NOT (SIZEOF (QUERY (sssh <* QUERY (sses <*
+ ssu\surface_style_usage.style\surface_side_style.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'SURFACE_STYLE_SILHOUETTE' IN TYPEOF (sses)) |
+ NOT ((
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE'
+ IN TYPEOF (sssh\surface_style_silhouette.style_of_silhouette))
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_COLOUR'] * TYPEOF
+ (sssh\surface_style_silhouette.
+ style_of_silhouette\curve_style.curve_colour)) = 1)
+ AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POSITIVE_LENGTH_MEASURE' IN TYPEOF
+ (sssh\surface_style_silhouette.
+ style_of_silhouette\curve_style.curve_width))
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'CURVE_STYLE_FONT', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_CURVE_FONT'] * TYPEOF
+ (sssh\surface_style_silhouette.
+ style_of_silhouette\curve_style.curve_font)) = 1))
+ OR
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE_RENDERING'
+ IN TYPEOF (sssh\surface_style_silhouette.style_of_silhouette))
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_COLOUR'] * TYPEOF
+ (sssh\surface_style_silhouette.style_of_silhouette\
+ curve_style_rendering.rendering_properties.rendered_colour))
+ = 1))) )) = 0))) = 0))) = 0))) = 0;
+ WR14 : SIZEOF (QUERY (si <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (psa <* si\styled_item.styles |
+ NOT (SIZEOF (QUERY (ssu <* QUERY (pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE'
+ IN TYPEOF (pss)) |
+ NOT (SIZEOF (QUERY (sssc <* QUERY (sses <*
+ ssu\surface_style_usage.style\surface_side_style.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'SURFACE_STYLE_SEGMENTATION_CURVE' IN TYPEOF (sses)) |
+ NOT ((
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE'
+ IN TYPEOF
+ (sssc\surface_style_segmentation_curve.style_of_segmentation_curve))
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_COLOUR'] * TYPEOF
+ (sssc\surface_style_segmentation_curve.
+ style_of_segmentation_curve\curve_style.curve_colour)) = 1)
+ AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POSITIVE_LENGTH_MEASURE' IN TYPEOF
+ (sssc\surface_style_segmentation_curve.
+ style_of_segmentation_curve\curve_style.curve_width))
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'CURVE_STYLE_FONT', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_CURVE_FONT'] * TYPEOF
+ (sssc\surface_style_segmentation_curve.
+ style_of_segmentation_curve\curve_style.curve_font)) = 1))
+ OR
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE_RENDERING'
+ IN TYPEOF (sssc\surface_style_segmentation_curve.
+ style_of_segmentation_curve))
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_COLOUR'] * TYPEOF
+ (sssc\surface_style_segmentation_curve.style_of_segmentation_curve\
+ curve_style_rendering.rendering_properties.rendered_colour))
+ = 1))) )) = 0))) = 0))) = 0))) = 0;
+ WR15 : SIZEOF (QUERY (si <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (psa <* si\styled_item.styles |
+ NOT (SIZEOF (QUERY (ssu <* QUERY (pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE'
+ IN TYPEOF (pss)) |
+ NOT (SIZEOF (QUERY (ssbd <* QUERY (sses <*
+ ssu\surface_style_usage.style\surface_side_style.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'SURFACE_STYLE_BOUNDARY' IN TYPEOF (sses)) |
+ NOT ((
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE'
+ IN TYPEOF (ssbd\surface_style_boundary.style_of_boundary))
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_COLOUR'] * TYPEOF
+ (ssbd\surface_style_boundary.
+ style_of_boundary\curve_style.curve_colour)) = 1)
+ AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POSITIVE_LENGTH_MEASURE' IN TYPEOF
+ (ssbd\surface_style_boundary.
+ style_of_boundary\curve_style.curve_width))
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'CURVE_STYLE_FONT', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_CURVE_FONT'] * TYPEOF
+ (ssbd\surface_style_boundary.
+ style_of_boundary\curve_style.curve_font)) = 1))
+ OR
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE_RENDERING'
+ IN TYPEOF (ssbd\surface_style_boundary.style_of_boundary))
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_COLOUR'] * TYPEOF
+ (ssbd\surface_style_boundary.style_of_boundary\
+ curve_style_rendering.rendering_properties.rendered_colour))
+ = 1))) )) = 0))) = 0))) = 0))) = 0;
+ WR16 : SIZEOF (QUERY (si <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (psa <* si\styled_item.styles |
+ NOT (SIZEOF (QUERY (ssu <* QUERY (pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE'
+ IN TYPEOF (pss)) |
+ NOT (SIZEOF (QUERY (ssre <* QUERY (sses <*
+ ssu\surface_style_usage.style\surface_side_style.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'SURFACE_STYLE_RENDERING' IN TYPEOF (sses)) |
+ NOT
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_COLOUR'] * TYPEOF
+ (ssre\surface_style_rendering.surface_colour)) = 1)))
+ = 0))) = 0))) = 0))) = 0;
+END_ENTITY;
+
+
+ENTITY min_and_major_ply_orientation_basis
+ SUBTYPE OF (representation_item_relationship, geometric_representation_item);
+ SELF\representation_item_relationship.related_representation_item : axis2_placement_3d;
+ SELF\representation_item_relationship.relating_representation_item : axis2_placement_3d;
+DERIVE
+ major_orientation_basis : axis2_placement_3d := SELF\representation_item_relationship.related_representation_item;
+ minor_orientation_basis : axis2_placement_3d := SELF\representation_item_relationship.relating_representation_item;
+END_ENTITY;
+
+
+ENTITY modified_geometric_tolerance
+ SUBTYPE OF (geometric_tolerance);
+ modifier : limit_condition;
+END_ENTITY;
+
+
+ENTITY modified_solid
+ ABSTRACT SUPERTYPE OF (ONEOF (edge_blended_solid, sculptured_solid, shelled_solid, modified_solid_with_placed_configuration))
+ SUBTYPE OF (solid_model);
+ rationale : text;
+ base_solid : base_solid_select;
+END_ENTITY;
+
+
+ENTITY modified_solid_with_placed_configuration
+ ABSTRACT SUPERTYPE OF (ONEOF (solid_with_depression, solid_with_protrusion, solid_with_shape_element_pattern))
+ SUBTYPE OF (modified_solid);
+ placing : axis2_placement_3d;
+END_ENTITY;
+
+
+ENTITY moments_of_inertia_representation
+ SUBTYPE OF (representation);
+WHERE
+ WR1 : (SIZEOF(SELF.items) = 1) AND
+ (SIZEOF( QUERY( i <* SELF.items | ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'COMPOUND_REPRESENTATION_ITEM' IN TYPEOF(i)) AND
+ (i.name = 'moments of inertia matrix') )) = 1);
+ WR2 : SIZEOF( QUERY( i <* SELF.items | ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'COMPOUND_REPRESENTATION_ITEM' IN TYPEOF(i)) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'LIST_REPRESENTATION_ITEM' IN TYPEOF(i\compound_representation_item.item_element)) AND
+ value_range_aggregate_rep_item (i\compound_representation_item.item_element) )) = 1;
+END_ENTITY;
+
+
+ENTITY multi_language_attribute_assignment
+ SUBTYPE OF (attribute_value_assignment);
+ items : SET [1:?] OF multi_language_attribute_item;
+DERIVE
+ translation_language : language := language_indication[1]\attribute_classification_assignment.assigned_class;
+INVERSE
+ language_indication: SET [1:1] OF attribute_language_assignment FOR items;
+WHERE
+ WR1 : (SELF\attribute_value_assignment.role.name = 'alternate language');
+ WR2 : SIZEOF( QUERY( ala <* language_indication |
+ (ala\attribute_classification_assignment.attribute_name = 'attribute_value') AND
+ (ala\attribute_classification_assignment.role.name='translated') )) = 1;
+ WR3 : SELF\attribute_value_assignment.attribute_name <> '';
+ WR4 : SIZEOF(QUERY(ci <* items |
+SIZEOF(QUERY(ata <* USEDIN(ci, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.ITEMS') |
+(ata\attribute_value_assignment.attribute_name = SELF\attribute_value_assignment.attribute_name) AND
+(ata.translation_language :=: translation_language) ))>1 )) =0;
+ WR5 : SIZEOF(QUERY(ci <* items |
+SIZEOF(QUERY(ata <* USEDIN(ci, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ATTRIBUTE_LANGUAGE_ASSIGNMENT.ITEMS') |
+ (ata\attribute_classification_assignment.role.name='primary') AND
+ (ata\attribute_classification_assignment.attribute_name= SELF\attribute_value_assignment.attribute_name) AND
+ (ata\attribute_classification_assignment.assigned_class :=: translation_language) ))>0 )) =0;
+END_ENTITY;
+
+
+ENTITY multiple_arity_boolean_expression
+ ABSTRACT SUPERTYPE
+ SUBTYPE OF (boolean_expression, multiple_arity_generic_expression);
+ SELF\multiple_arity_generic_expression.operands : LIST [2:?] OF boolean_expression;
+END_ENTITY;
+
+
+ENTITY multiple_arity_generic_expression
+ ABSTRACT SUPERTYPE
+ SUBTYPE OF (generic_expression);
+ operands : LIST [2:?] OF generic_expression;
+END_ENTITY;
+
+
+ENTITY multiple_arity_numeric_expression
+ ABSTRACT SUPERTYPE
+ SUBTYPE OF (numeric_expression, multiple_arity_generic_expression);
+ SELF\multiple_arity_generic_expression.operands : LIST [2:?] OF numeric_expression;
+END_ENTITY;
+
+
+ENTITY name_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_name : label;
+DERIVE
+ role : object_role := get_role(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ROLE_ASSOCIATION.ITEM_WITH_ROLE')) <= 1;
+END_ENTITY;
+
+
+ENTITY name_attribute;
+ attribute_value : label;
+ named_item : name_attribute_select;
+END_ENTITY;
+
+
+ENTITY named_unit
+ SUPERTYPE OF ((ONEOF (si_unit, conversion_based_unit, context_dependent_unit) ANDOR ONEOF (length_unit, mass_unit, time_unit, electric_current_unit, thermodynamic_temperature_unit, amount_of_substance_unit, luminous_flux_unit, luminous_intensity_unit, plane_angle_unit, solid_angle_unit, ratio_unit)));
+ dimensions : dimensional_exponents;
+END_ENTITY;
+
+
+ENTITY next_assembly_usage_occurrence
+ SUBTYPE OF (assembly_component_usage);
+END_ENTITY;
+
+
+ENTITY non_manifold_surface_shape_representation
+ SUBTYPE OF (shape_representation);
+WHERE
+ WR1 : SIZEOF (QUERY (it <* SELF.items |
+ NOT (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_BASED_SURFACE_MODEL',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT_3D'] * TYPEOF (it)) = 1)))
+ = 0;
+ WR2 : SIZEOF (QUERY (it <* SELF.items |
+ SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_BASED_SURFACE_MODEL',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM'] * TYPEOF (it)) = 1)) > 0;
+ WR3 : SIZEOF (QUERY (mi <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' IN TYPEOF (it)) |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'NON_MANIFOLD_SURFACE_SHAPE_REPRESENTATION'
+ IN TYPEOF (mi\mapped_item.mapping_source.mapped_representation))
+ AND
+ (SIZEOF(QUERY (mr_it <*
+ mi\mapped_item.mapping_source.mapped_representation.items |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_BASED_SURFACE_MODEL'
+ IN TYPEOF (mr_it)))) > 0 )))) = 0;
+ WR4 : SIZEOF (QUERY (fbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ fbsm\face_based_surface_model.fbsm_faces |
+ NOT (SIZEOF (QUERY (fa <* cfs.cfs_faces |
+ NOT (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_SURFACE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORIENTED_FACE'] * TYPEOF (fa)) = 1)))
+ = 0))) = 0))) = 0;
+ WR5 : SIZEOF (QUERY (fbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ fbsm\face_based_surface_model.fbsm_faces |
+ NOT (SIZEOF (QUERY (f_sf <* QUERY (fa <* cfs.cfs_faces |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_SURFACE' IN TYPEOF (fa))) |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF (f_sf))
+ OR
+ (nmsf_surface_check(f_sf\face_surface.face_geometry))))) = 0)))
+ = 0))) = 0;
+ WR6 : SIZEOF (QUERY (fbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ fbsm\face_based_surface_model.fbsm_faces |
+ NOT (SIZEOF (QUERY (o_fa <* QUERY (fa <* cfs.cfs_faces |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORIENTED_FACE' IN TYPEOF (fa))) |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF
+ (o_fa\oriented_face.face_element))
+ OR
+ (nmsf_surface_check
+ (o_fa\oriented_face.face_element\face_surface.face_geometry)))))
+ = 0))) = 0))) = 0;
+ WR7 : SIZEOF (QUERY (fbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ fbsm\face_based_surface_model.fbsm_faces |
+ NOT (SIZEOF (QUERY (fa <* cfs.cfs_faces |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF (fa))
+ OR
+ (SIZEOF (QUERY (bnds <* fa.bounds |
+ NOT (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_LOOP']
+ * TYPEOF (bnds.bound)) = 1))) = 0)))) = 0))) = 0))) = 0;
+ WR8 : SIZEOF (QUERY (fbsm <* QUERY (it <* SELF.items|
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ fbsm\face_based_surface_model.fbsm_faces |
+ NOT (SIZEOF (QUERY (fa <* cfs.cfs_faces |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF (fa))
+ OR
+ (SIZEOF (QUERY (elp_fbnds <* QUERY (bnds <* fa.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (bnds.bound)) |
+ NOT (SIZEOF (QUERY (oe <* elp_fbnds\path.edge_list |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_CURVE' IN TYPEOF
+ (oe.edge_element)))) = 0))) = 0)))) = 0))) = 0))) = 0;
+ WR9 : SIZEOF (QUERY (fbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ fbsm\face_based_surface_model.fbsm_faces |
+ NOT (SIZEOF (QUERY (fa <* cfs.cfs_faces |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF (fa))
+ OR
+ (SIZEOF (QUERY (elp_fbnds <* QUERY (bnds <* fa.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (bnds.bound)) |
+ NOT (SIZEOF (QUERY (oe_cv <* QUERY (oe <*
+ elp_fbnds\path.edge_list |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_CURVE' IN TYPEOF (oe.edge_element)) |
+ NOT (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_CURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONIC',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_REPLICA',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LINE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OFFSET_CURVE_3D',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_CURVE'] *
+ TYPEOF (oe_cv.edge_element\edge_curve.edge_geometry))
+ = 1))) = 0))) = 0)))) = 0))) = 0))) = 0;
+ WR10 : SIZEOF (QUERY (fbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ fbsm\face_based_surface_model.fbsm_faces |
+ NOT (SIZEOF (QUERY (fa <* cfs.cfs_faces |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF (fa))
+ OR
+ (SIZEOF (QUERY (elp_fbnds <* QUERY (bnds <* fa.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (bnds.bound)) |
+ NOT (SIZEOF (QUERY (oe <* elp_fbnds\path.edge_list |
+ NOT (nmsf_curve_check (oe.edge_element\edge_curve.edge_geometry))))
+ = 0))) = 0)))) = 0))) = 0))) = 0;
+ WR11 : SIZEOF (QUERY(fbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ fbsm\face_based_surface_model.fbsm_faces |
+ NOT (SIZEOF (QUERY (fa <* cfs.cfs_faces |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF (fa))
+ OR
+ (SIZEOF (QUERY (elp_fbnds <* QUERY (bnds <* fa.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (bnds.bound)) |
+ NOT (SIZEOF (QUERY (oe <* elp_fbnds\path.edge_list|
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN TYPEOF
+ (oe.edge_element.edge_start))
+ AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN
+ TYPEOF (oe.edge_element.edge_end)))))
+ = 0))) = 0)))) = 0))) = 0))) = 0;
+ WR12 : SIZEOF (QUERY (fbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ fbsm\face_based_surface_model.fbsm_faces |
+ NOT (SIZEOF (QUERY (fa <* cfs.cfs_faces |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF (fa))
+ OR
+ (SIZEOF (QUERY (elp_fbnds <* QUERY (bnds <* fa.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (bnds.bound)) |
+ NOT (SIZEOF (QUERY (oe <* elp_fbnds\path.edge_list |
+ NOT ((SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CARTESIAN_POINT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DEGENERATE_PCURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_ON_CURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_ON_SURFACE'] * TYPEOF
+ (oe.edge_element.edge_start\vertex_point.vertex_geometry)) = 1)
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CARTESIAN_POINT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DEGENERATE_PCURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_ON_CURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_ON_SURFACE'] * TYPEOF
+ (oe.edge_element.edge_end\vertex_point.vertex_geometry)) = 1
+ )))) = 0))) = 0)))) = 0))) = 0))) = 0;
+ WR13 : SIZEOF (QUERY (fbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ fbsm\face_based_surface_model.fbsm_faces |
+ NOT (SIZEOF (QUERY (fa <* cfs.cfs_faces |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF (fa))
+ OR
+ (SIZEOF (QUERY (vlp_fbnds <* QUERY (bnds <* fa.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_LOOP' IN TYPEOF (bnds.bound)) |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN TYPEOF
+ (vlp_fbnds\vertex_loop.loop_vertex)))) = 0)))) = 0)))
+ = 0))) = 0;
+ WR14 : SIZEOF (QUERY (fbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ fbsm\face_based_surface_model.fbsm_faces |
+ NOT (SIZEOF (QUERY (fa <* cfs.cfs_faces |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF (fa))
+ OR
+ (SIZEOF (QUERY (vlp_fbnds <* QUERY (bnds <* fa.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_LOOP' IN TYPEOF (bnds.bound)) |
+ NOT (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CARTESIAN_POINT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DEGENERATE_PCURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_ON_CURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_ON_SURFACE'] * TYPEOF
+ (vlp_fbnds\vertex_loop.loop_vertex\vertex_point.vertex_geometry))
+ = 1))) = 0)))) = 0))) = 0))) = 0;
+END_ENTITY;
+
+
+ENTITY null_representation_item
+ SUBTYPE OF (representation_item);
+END_ENTITY;
+
+
+ENTITY numeric_expression
+ ABSTRACT SUPERTYPE OF (ONEOF (simple_numeric_expression, unary_numeric_expression, binary_numeric_expression, multiple_arity_numeric_expression))
+ SUBTYPE OF (expression);
+DERIVE
+ is_int : LOGICAL := is_int_expr (SELF);
+ sql_mappable : LOGICAL := is_SQL_mappable (SELF);
+END_ENTITY;
+
+
+ENTITY object_role;
+ name : label;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY offset_curve_2d
+ SUBTYPE OF (curve);
+ basis_curve : curve;
+ distance : length_measure;
+ self_intersect : LOGICAL;
+WHERE
+ WR1 : basis_curve.dim = 2;
+END_ENTITY;
+
+
+ENTITY offset_curve_3d
+ SUBTYPE OF (curve);
+ basis_curve : curve;
+ distance : length_measure;
+ self_intersect : LOGICAL;
+ ref_direction : direction;
+WHERE
+ WR1 : (basis_curve.dim = 3) AND (ref_direction.dim = 3);
+END_ENTITY;
+
+
+ENTITY offset_surface
+ SUBTYPE OF (surface);
+ basis_surface : surface;
+ distance : length_measure;
+ self_intersect : LOGICAL;
+END_ENTITY;
+
+
+ENTITY one_direction_repeat_factor
+ SUBTYPE OF (geometric_representation_item);
+ repeat_factor : vector;
+END_ENTITY;
+
+
+ENTITY open_shell
+ SUBTYPE OF (connected_face_set);
+END_ENTITY;
+
+
+ENTITY ordinal_date
+ SUBTYPE OF (date);
+ day_component : day_in_year_number;
+WHERE
+ WR1 : (NOT leap_year(SELF.year_component) AND { 1 <= day_component <= 365 }) OR (leap_year(SELF.year_component) AND { 1 <= day_component <= 366 });
+END_ENTITY;
+
+
+ENTITY ordinate_dimension
+ SUBTYPE OF (projection_directed_callout);
+END_ENTITY;
+
+
+ENTITY organization;
+ id : OPTIONAL identifier;
+ name : label;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY organization_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_organization : organization;
+ role : organization_role;
+END_ENTITY;
+
+
+ENTITY organization_relationship;
+ name : label;
+ description : OPTIONAL text;
+ relating_organization : organization;
+ related_organization : organization;
+END_ENTITY;
+
+
+ENTITY organization_role;
+ name : label;
+DERIVE
+ description : text := get_description_value(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY organizational_address
+ SUBTYPE OF (address);
+ organizations : SET [1:?] OF organization;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY organizational_project;
+ name : label;
+ description : OPTIONAL text;
+ responsible_organizations : SET [1:?] OF organization;
+DERIVE
+ id : identifier := get_id_value(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY organizational_project_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_organizational_project : organizational_project;
+ role : organizational_project_role;
+END_ENTITY;
+
+
+ENTITY organizational_project_relationship;
+ name : label;
+ description : OPTIONAL text;
+ relating_organizational_project : organizational_project;
+ related_organizational_project : organizational_project;
+END_ENTITY;
+
+
+ENTITY organizational_project_role;
+ name : label;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY oriented_closed_shell
+ SUBTYPE OF (closed_shell);
+ closed_shell_element : closed_shell;
+ orientation : BOOLEAN;
+DERIVE
+ SELF\connected_face_set.cfs_faces : SET [1:?] OF face := conditional_reverse(SELF.orientation,
+ SELF.closed_shell_element.cfs_faces);
+WHERE
+ WR1 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORIENTED_CLOSED_SHELL'
+ IN TYPEOF (SELF.closed_shell_element));
+END_ENTITY;
+
+
+ENTITY oriented_edge
+ SUBTYPE OF (edge);
+ edge_element : edge;
+ orientation : BOOLEAN;
+DERIVE
+ SELF\edge.edge_end : vertex := boolean_choose (SELF.orientation,
+ SELF.edge_element.edge_end,
+ SELF.edge_element.edge_start);
+ SELF\edge.edge_start : vertex := boolean_choose (SELF.orientation,
+ SELF.edge_element.edge_start,
+ SELF.edge_element.edge_end);
+WHERE
+ WR1 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORIENTED_EDGE' IN TYPEOF (SELF.edge_element));
+END_ENTITY;
+
+
+ENTITY oriented_face
+ SUBTYPE OF (face);
+ face_element : face;
+ orientation : BOOLEAN;
+DERIVE
+ SELF\face.bounds : SET [1:?] OF face_bound := conditional_reverse(SELF.orientation,SELF.face_element.bounds);
+WHERE
+ WR1 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORIENTED_FACE' IN TYPEOF (SELF.face_element));
+END_ENTITY;
+
+
+ENTITY oriented_open_shell
+ SUBTYPE OF (open_shell);
+ open_shell_element : open_shell;
+ orientation : BOOLEAN;
+DERIVE
+ SELF\connected_face_set.cfs_faces : SET [1:?] OF face := conditional_reverse(SELF.orientation,
+ SELF.open_shell_element.cfs_faces);
+WHERE
+ WR1 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORIENTED_OPEN_SHELL'
+ IN TYPEOF (SELF.open_shell_element));
+END_ENTITY;
+
+
+ENTITY oriented_path
+ SUBTYPE OF (path);
+ path_element : path;
+ orientation : BOOLEAN;
+DERIVE
+ SELF\path.edge_list : LIST [1:?] OF UNIQUE oriented_edge := conditional_reverse(SELF.orientation,
+ SELF.path_element.edge_list);
+WHERE
+ WR1 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORIENTED_PATH' IN TYPEOF (SELF.path_element));
+END_ENTITY;
+
+
+ENTITY oriented_surface
+ SUBTYPE OF (surface);
+ orientation : BOOLEAN;
+END_ENTITY;
+
+
+ENTITY outer_boundary_curve
+ SUBTYPE OF (boundary_curve);
+END_ENTITY;
+
+
+ENTITY over_riding_styled_item
+ SUBTYPE OF (styled_item);
+ over_ridden_style : styled_item;
+END_ENTITY;
+
+
+ENTITY package_product_concept_feature
+ SUBTYPE OF (product_concept_feature);
+WHERE
+ WR1 : NOT ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'CONDITIONAL_CONCEPT_FEATURE' IN TYPEOF ( SELF ) );
+ WR2 : SIZEOF ( QUERY
+ (
+ cfr <* USEDIN ( SELF , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'CONCEPT_FEATURE_RELATIONSHIP.' +'RELATING_PRODUCT_CONCEPT_FEATURE' )
+ |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'CONCEPT_FEATURE_RELATIONSHIP_WITH_CONDITION' IN TYPEOF (cfr ) )
+ AND
+ ( SIZEOF ( QUERY
+ (
+ ipcf <* USEDIN ( cfr , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'CONDITIONAL_CONCEPT_FEATURE.' + 'CONDITION' )
+ |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'INCLUSION_PRODUCT_CONCEPT_FEATURE' IN TYPEOF ( ipcf )
+ )
+ )= 1
+ )
+ )
+ )>0;
+END_ENTITY;
+
+
+ENTITY parabola
+ SUBTYPE OF (conic);
+ focal_dist : length_measure;
+WHERE
+ WR1 : focal_dist <> 0.0;
+END_ENTITY;
+
+
+ENTITY parallel_offset
+ SUBTYPE OF (derived_shape_aspect);
+ offset : measure_with_unit;
+WHERE
+ WR1 : SIZEOF (SELF\derived_shape_aspect.deriving_relationships)= 1;
+END_ENTITY;
+
+
+ENTITY parallelism_tolerance
+ SUBTYPE OF (geometric_tolerance_with_datum_reference);
+WHERE
+ WR1 : SIZEOF (SELF\geometric_tolerance_with_datum_reference.datum_system) < 3;
+END_ENTITY;
+
+
+ENTITY parametric_representation_context
+ SUBTYPE OF (representation_context);
+END_ENTITY;
+
+
+ENTITY part_laminate_table
+ SUPERTYPE OF (ONEOF (composite_assembly_table, ply_laminate_table))
+ SUBTYPE OF (laminate_table);
+END_ENTITY;
+
+
+ENTITY partial_document_with_structured_text_representation_assignment
+ SUBTYPE OF (applied_document_usage_constraint_assignment, characterized_object);
+END_ENTITY;
+
+
+ENTITY path
+ SUPERTYPE OF (ONEOF (edge_loop, oriented_path))
+ SUBTYPE OF (topological_representation_item);
+ edge_list : LIST [1:?] OF UNIQUE oriented_edge;
+WHERE
+ WR1 : path_head_to_tail(SELF);
+END_ENTITY;
+
+
+ENTITY pcurve
+ SUBTYPE OF (curve);
+ basis_surface : surface;
+ reference_to_curve : definitional_representation;
+WHERE
+ WR1 : SIZEOF(reference_to_curve\representation.items) = 1;
+ WR2 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE' IN TYPEOF
+ (reference_to_curve\representation.items[1]);
+ WR3 : reference_to_curve\representation.items[1]\
+ geometric_representation_item.dim =2;
+END_ENTITY;
+
+
+ENTITY percentage_laminate_definition
+ SUBTYPE OF (product_definition);
+WHERE
+ WR1 : SIZEOF (QUERY (pdr <* USEDIN (SELF,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRODUCT_DEFINITION_RELATIONSHIP.' +
+ 'RELATING_PRODUCT_DEFINITION') |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'NEXT_ASSEMBLY_USAGE_OCCURRENCE' IN
+ TYPEOF (pdr))) > 0;
+END_ENTITY;
+
+
+ENTITY percentage_laminate_table
+ SUBTYPE OF (zone_structural_makeup);
+END_ENTITY;
+
+
+ENTITY percentage_ply_definition
+ SUBTYPE OF (product_definition);
+WHERE
+ WR1 : SIZEOF (QUERY (pdr <* USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRODUCT_DEFINITION_RELATIONSHIP.RELATING_PRODUCT_DEFINITION') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PERCENTAGE_LAMINATE_DEFINITION'
+ IN TYPEOF (pdr.related_product_definition)) AND
+ (pdr.name = 'makeup and properties'))) = 0;
+END_ENTITY;
+
+
+ENTITY perpendicular_to
+ SUBTYPE OF (derived_shape_aspect);
+WHERE
+ WR1 : SIZEOF (SELF\derived_shape_aspect.deriving_relationships)= 1;
+END_ENTITY;
+
+
+ENTITY perpendicularity_tolerance
+ SUBTYPE OF (geometric_tolerance_with_datum_reference);
+WHERE
+ WR1 : SIZEOF (SELF\geometric_tolerance_with_datum_reference.datum_system) <= 3;
+END_ENTITY;
+
+
+ENTITY person;
+ id : identifier;
+ last_name : OPTIONAL label;
+ first_name : OPTIONAL label;
+ middle_names : OPTIONAL LIST [1:?] OF label;
+ prefix_titles : OPTIONAL LIST [1:?] OF label;
+ suffix_titles : OPTIONAL LIST [1:?] OF label;
+WHERE
+ WR1 : EXISTS(last_name) OR EXISTS(first_name);
+END_ENTITY;
+
+
+ENTITY person_and_organization;
+ the_person : person;
+ the_organization : organization;
+DERIVE
+ description : text := get_description_value(SELF);
+ name : label := get_name_value(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'NAME_ATTRIBUTE.NAMED_ITEM')) <= 1;
+ WR2 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY person_and_organization_address
+ SUBTYPE OF (organizational_address, personal_address);
+ SELF\organizational_address.organizations : SET [1:1] OF organization;
+ SELF\personal_address.people : SET [1:1] OF person;
+WHERE
+ WR1 : SIZEOF(QUERY(pao <* USEDIN (SELF\personal_address.people[1], 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PERSON_AND_ORGANIZATION.THE_PERSON') | pao.the_organization :=: SELF\organizational_address.organizations[1])) = 1;
+END_ENTITY;
+
+
+ENTITY person_and_organization_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_person_and_organization : person_and_organization;
+ role : person_and_organization_role;
+END_ENTITY;
+
+
+ENTITY person_and_organization_role;
+ name : label;
+DERIVE
+ description : text := get_description_value(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY personal_address
+ SUBTYPE OF (address);
+ people : SET [1:?] OF person;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY physical_breakdown_context
+ SUBTYPE OF (breakdown_context);
+END_ENTITY;
+
+
+ENTITY physical_element_usage
+ SUBTYPE OF (breakdown_element_usage);
+END_ENTITY;
+
+
+ENTITY picture_representation
+ SUBTYPE OF (presentation_view);
+ SELF\representation.items : SET [2:?] OF picture_representation_item_select;
+INVERSE
+ size: presentation_size FOR unit;
+WHERE
+ WR1: SIZEOF(QUERY(item <* items | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM' IN TYPEOF(item))) = 1;
+ WR2: SIZEOF (QUERY (se <* QUERY (item <* SELF.items | ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM' IN TYPEOF (item)))
+ | NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PICTURE_REPRESENTATION_ITEM'
+ IN TYPEOF (se\styled_item.item)) )) = 0;
+END_ENTITY;
+
+
+ENTITY picture_representation_item
+ ABSTRACT SUPERTYPE OF (ONEOF (externally_defined_picture_representation_item, predefined_picture_representation_item))
+ SUBTYPE OF (bytes_representation_item);
+END_ENTITY;
+
+
+ENTITY placed_datum_target_feature
+ SUBTYPE OF (datum_target);
+DERIVE
+ representation_associations : SET [0:?] OF property_definition_representation := get_shape_aspect_property_definition_representations(SELF);
+WHERE
+ WR1 : SELF.description IN ['point','line','rectangle','circle', 'circular line'];
+ WR2 : SIZEOF (QUERY (pdr <* representation_associations | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF (pdr.used_representation) )) = 1;
+ WR3 : valid_datum_target_parameters(SELF);
+END_ENTITY;
+
+
+ENTITY placed_feature
+ SUBTYPE OF (shape_aspect);
+END_ENTITY;
+
+
+ENTITY placement
+ SUPERTYPE OF (ONEOF (axis1_placement, axis2_placement_2d, axis2_placement_3d))
+ SUBTYPE OF (geometric_representation_item);
+ location : cartesian_point;
+END_ENTITY;
+
+
+ENTITY planar_box
+ SUBTYPE OF (planar_extent);
+ placement : axis2_placement;
+END_ENTITY;
+
+
+ENTITY planar_extent
+ SUBTYPE OF (geometric_representation_item);
+ size_in_x : length_measure;
+ size_in_y : length_measure;
+END_ENTITY;
+
+
+ENTITY plane
+ SUBTYPE OF (elementary_surface);
+END_ENTITY;
+
+
+ENTITY plane_angle_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PLANE_ANGLE_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY plane_angle_unit
+ SUBTYPE OF (named_unit);
+WHERE
+ WR1 : (SELF\named_unit.dimensions.length_exponent = 0.0) AND (SELF\named_unit.dimensions.mass_exponent = 0.0) AND (SELF\named_unit.dimensions.time_exponent = 0.0) AND (SELF\named_unit.dimensions.electric_current_exponent = 0.0) AND (SELF\named_unit.dimensions.thermodynamic_temperature_exponent = 0.0) AND (SELF\named_unit.dimensions.amount_of_substance_exponent = 0.0) AND (SELF\named_unit.dimensions.luminous_intensity_exponent = 0.0);
+END_ENTITY;
+
+
+ENTITY plus_minus_tolerance;
+ range : tolerance_method_definition;
+ toleranced_dimension : dimensional_characteristic;
+UNIQUE
+ UR1 : toleranced_dimension;
+END_ENTITY;
+
+
+ENTITY ply_laminate_definition
+ SUBTYPE OF (product_definition);
+WHERE
+ WR1 : SIZEOF (QUERY (pdr <* USEDIN (SELF,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRODUCT_DEFINITION_RELATIONSHIP.' +
+ 'RELATING_PRODUCT_DEFINITION') |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'NEXT_ASSEMBLY_USAGE_OCCURRENCE' IN
+ TYPEOF (pdr))) = 1;
+END_ENTITY;
+
+
+ENTITY ply_laminate_sequence_definition
+ SUBTYPE OF (product_definition);
+WHERE
+ WR1 : SIZEOF (QUERY (pdr <* USEDIN (SELF,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRODUCT_DEFINITION_RELATIONSHIP.' +
+ 'RELATING_PRODUCT_DEFINITION') |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'NEXT_ASSEMBLY_USAGE_OCCURRENCE' IN
+ TYPEOF (pdr))) > 0;
+END_ENTITY;
+
+
+ENTITY ply_laminate_table
+ SUBTYPE OF (part_laminate_table);
+END_ENTITY;
+
+
+ENTITY point
+ SUPERTYPE OF (ONEOF (cartesian_point, point_on_curve, point_on_surface, point_replica, degenerate_pcurve))
+ SUBTYPE OF (geometric_representation_item);
+END_ENTITY;
+
+
+ENTITY point_and_vector
+ SUBTYPE OF (compound_representation_item, geometric_representation_item);
+ SELF\compound_representation_item.item_element : point_and_vector_members;
+END_ENTITY;
+
+
+ENTITY point_on_curve
+ SUBTYPE OF (point);
+ basis_curve : curve;
+ point_parameter : parameter_value;
+END_ENTITY;
+
+
+ENTITY point_on_surface
+ SUBTYPE OF (point);
+ basis_surface : surface;
+ point_parameter_u : parameter_value;
+ point_parameter_v : parameter_value;
+END_ENTITY;
+
+
+ENTITY point_path
+ SUBTYPE OF (compound_representation_item, geometric_representation_item);
+ SELF\compound_representation_item.item_element : point_path_members;
+END_ENTITY;
+
+
+ENTITY point_replica
+ SUBTYPE OF (point);
+ parent_pt : point;
+ transformation : cartesian_transformation_operator;
+WHERE
+ WR1 : transformation.dim = parent_pt.dim;
+ WR2 : acyclic_point_replica (SELF,parent_pt);
+END_ENTITY;
+
+
+ENTITY point_style
+ SUBTYPE OF (founded_item);
+ name : label;
+ marker : marker_select;
+ marker_size : size_select;
+ marker_colour : colour;
+END_ENTITY;
+
+
+ENTITY polar_complex_number_literal
+ SUBTYPE OF (generic_literal);
+ radius : REAL;
+ angle : REAL;
+WHERE
+ WR1 : radius >= 0;
+ WR2 : { 0 <= angle < 2*PI };
+END_ENTITY;
+
+
+ENTITY poly_loop
+ SUBTYPE OF (loop, geometric_representation_item);
+ polygon : LIST [3:?] OF UNIQUE cartesian_point;
+END_ENTITY;
+
+
+ENTITY polyline
+ SUBTYPE OF (bounded_curve);
+ points : LIST [2:?] OF cartesian_point;
+END_ENTITY;
+
+
+ENTITY position_tolerance
+ SUBTYPE OF (geometric_tolerance);
+WHERE
+ WR1 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'GEOMETRIC_TOLERANCE_WITH_DATUM_REFERENCE' IN TYPEOF (SELF)) OR ( SIZEOF (SELF\geometric_tolerance_with_datum_reference.datum_system) <= 3);
+END_ENTITY;
+
+
+ENTITY positioned_sketch
+ SUBTYPE OF (geometric_representation_item);
+ sketch_basis : sketch_basis_select;
+ auxiliary_elements : SET [0:?] OF auxiliary_geometric_representation_item;
+WHERE
+ WR1 : NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_BOUNDED_SURFACE' IN
+ TYPEOF(sketch_basis)) AND NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PLANE' IN
+ TYPEOF(sketch_basis\curve_bounded_surface.basis_surface)));
+ WR2 : NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_SURFACE' IN TYPEOF(sketch_basis)) AND
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PLANE' IN TYPEOF(sketch_basis\face_surface.face_geometry)));
+ WR3 : SIZEOF(QUERY(q <* auxiliary_elements | (SIZEOF(TYPEOF(q) *
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT','AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE']) = 0))) = 0;
+ WR4 : SIZEOF(QUERY(q <* auxiliary_elements |
+ q\geometric_representation_item.dim <> 3)) = 0;
+END_ENTITY;
+
+
+ENTITY power_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POWER_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY power_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) = dimensions_for_si_unit (si_unit_name.watt);
+END_ENTITY;
+
+
+ENTITY pre_defined_colour
+ SUBTYPE OF (pre_defined_item, colour);
+END_ENTITY;
+
+
+ENTITY pre_defined_curve_font
+ SUBTYPE OF (pre_defined_item);
+END_ENTITY;
+
+
+ENTITY pre_defined_dimension_symbol
+ SUBTYPE OF (pre_defined_symbol);
+WHERE
+ WR1 : SELF.name IN [ 'arc length' , 'conical taper' , 'counterbore' , 'countersink' , 'depth' , 'diameter' , 'plus minus' , 'radius' , 'slope' , 'spherical diameter' , 'spherical radius' , 'square'];
+END_ENTITY;
+
+
+ENTITY pre_defined_geometrical_tolerance_symbol
+ SUBTYPE OF (pre_defined_symbol);
+WHERE
+ WR1 : SELF.name IN ['angularity' , 'basic dimension' , 'blanked datum reference' , 'circular runout' , 'circularity' , 'concentricity' , 'cylindricity' , 'datum target identification' , 'diameter' , 'filled datum reference' , 'flatness' , 'least material condition' , 'maximum material condition' , 'parallelism' , 'perpendicularity' , 'position' , 'profile of a line' , 'profile of a surface' , 'projected tolerance zone' , 'regardless of feature size' , 'straightness' , 'symmetry' , 'total runout' ];
+END_ENTITY;
+
+
+ENTITY pre_defined_item;
+ name : label;
+END_ENTITY;
+
+
+ENTITY pre_defined_marker
+ SUBTYPE OF (pre_defined_item);
+END_ENTITY;
+
+
+ENTITY pre_defined_point_marker_symbol
+ SUBTYPE OF (pre_defined_marker, pre_defined_symbol);
+WHERE
+ WR1 : SELF.name IN ['asterisk','circle','dot','plus','square','triangle','x'];
+END_ENTITY;
+
+
+ENTITY pre_defined_surface_condition_symbol
+ SUBTYPE OF (pre_defined_symbol);
+WHERE
+ WR1 : SELF.name IN ['000' , '010' , '020' , '030' , '040' , '050' , '060' , '070' , '001' , '011' , '021' , '031' , '041' , '051' , '061' , '071' , '100' , '110' , '120' , '130' , '140' , '150' , '160' , '170' , '101' , '111' , '121' , '131' , '141' , '151' , '161' , '171' , '200' , '210' , '220' , '230' , '240' , '250' , '260' , '270' , '201' , '211' , '221' , '231' , '241' , '251' , '261' , '271'];
+END_ENTITY;
+
+
+ENTITY pre_defined_surface_side_style
+ SUBTYPE OF (pre_defined_item);
+END_ENTITY;
+
+
+ENTITY pre_defined_symbol
+ SUBTYPE OF (pre_defined_item);
+END_ENTITY;
+
+
+ENTITY pre_defined_terminator_symbol
+ SUBTYPE OF (pre_defined_symbol);
+WHERE
+ WR1 : SELF.name IN ['blanked arrow', 'blanked box', 'blanked dot', 'blanked triangle', 'dimension origin', 'filled arrow', 'filled box', 'filled dot', 'integral symbol', 'open arrow', 'slash', 'unfilled arrow', 'unfilled triangle', 'filled triangle'];
+END_ENTITY;
+
+
+ENTITY pre_defined_text_font
+ SUBTYPE OF (pre_defined_item);
+END_ENTITY;
+
+
+ENTITY pre_defined_tile
+ SUBTYPE OF (pre_defined_item);
+END_ENTITY;
+
+
+ENTITY precision_qualifier;
+ precision_value : INTEGER;
+END_ENTITY;
+
+
+ENTITY predefined_picture_representation_item
+ SUBTYPE OF (picture_representation_item);
+WHERE
+ WR1 : SELF\representation_item.name IN pre_defined_picture_representation_types;
+END_ENTITY;
+
+
+ENTITY presentation_area
+ SUBTYPE OF (presentation_representation);
+WHERE
+ WR1 : ((SIZEOF (QUERY (ais <* USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'AREA_IN_SET.AREA') |
+ SIZEOF (USEDIN (ais, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRESENTATION_SIZE.UNIT')) =1)) > 0) OR
+ (SIZEOF (USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRESENTATION_SIZE.UNIT')) =1));
+END_ENTITY;
+
+
+ENTITY presentation_layer_assignment;
+ name : label;
+ description : text;
+ assigned_items : SET [1:?] OF layered_item;
+END_ENTITY;
+
+
+ENTITY presentation_representation
+ SUPERTYPE OF (ONEOF (presentation_area, presentation_view))
+ SUBTYPE OF (representation);
+ SELF\representation.context_of_items : geometric_representation_context;
+WHERE
+ WR1 : SELF\representation.
+ context_of_items\geometric_representation_context.
+ coordinate_space_dimension = 2;
+ WR2 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRESENTATION_AREA' IN TYPEOF (SELF))
+ OR
+ (SIZEOF (QUERY (prr <* USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'REPRESENTATION_RELATIONSHIP.REP_2') |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRESENTATION_REPRESENTATION' IN
+ TYPEOF (prr\representation_relationship.rep_1))) > 0)
+ OR
+ (SIZEOF(QUERY( rm <* USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'REPRESENTATION_MAP.'+
+ 'MAPPED_REPRESENTATION') |
+ SIZEOF(QUERY( mi <* USEDIN(rm, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'MAPPED_ITEM.'+
+ 'MAPPING_SOURCE') |
+ SIZEOF(QUERY( rep <* using_representations (mi) |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'PRESENTATION_REPRESENTATION' IN
+ TYPEOF (rep))) > 0
+ )) > 0))
+ > 0);
+END_ENTITY;
+
+
+ENTITY presentation_set;
+INVERSE
+ areas: SET [1:?] OF area_in_set FOR in_set;
+END_ENTITY;
+
+
+ENTITY presentation_size;
+ unit : presentation_size_assignment_select;
+ size : planar_box;
+UNIQUE
+ UR1 : unit;
+WHERE
+ WR1 : (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRESENTATION_REPRESENTATION'
+ IN TYPEOF (SELF.unit)) AND
+ item_in_context (SELF.size,
+ SELF.unit\representation.context_of_items)
+ )
+ OR
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AREA_IN_SET'
+ IN TYPEOF (SELF.unit)) AND
+ (SIZEOF (QUERY ( ais <* SELF.unit\area_in_set.in_set.areas |
+ NOT item_in_context (SELF.size, ais.area\representation.
+ context_of_items) )) = 0));
+END_ENTITY;
+
+
+ENTITY presentation_style_assignment
+ SUBTYPE OF (founded_item);
+ styles : SET [1:?] OF presentation_style_select;
+WHERE
+ WR1 : SIZEOF (QUERY (style1 <* SELF.styles |
+ NOT (SIZEOF (QUERY (style2 <* (SELF.styles - style1) |
+ NOT ((TYPEOF (style1) <> TYPEOF (style2)) OR
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'SURFACE_STYLE_USAGE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'EXTERNALLY_DEFINED_STYLE'] *
+ TYPEOF (style1)) = 1)
+ ))) = 0
+ ))) = 0;
+ WR2 : SIZEOF (QUERY (style1 <* SELF.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE' IN
+ TYPEOF(style1)
+ )) <= 2;
+ WR3 : SIZEOF (QUERY (style1 <* SELF.styles |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE' IN TYPEOF (style1)) AND
+ (SIZEOF (QUERY (style2 <* (SELF.styles - style1) |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE' IN TYPEOF (style2)) AND
+ ((style1\surface_style_usage.side = both) OR
+ (style2\surface_style_usage.side = both) OR
+ (style1\surface_style_usage.side = style2\surface_style_usage.side)) )) > 0))) = 0;
+END_ENTITY;
+
+
+ENTITY presentation_style_by_context
+ SUBTYPE OF (presentation_style_assignment);
+ style_context : style_context_select;
+END_ENTITY;
+
+
+ENTITY presentation_view
+ SUBTYPE OF (presentation_representation);
+END_ENTITY;
+
+
+ENTITY presented_item
+ ABSTRACT SUPERTYPE;
+END_ENTITY;
+
+
+ENTITY presented_item_representation;
+ presentation : presentation_representation_select;
+ item : presented_item;
+END_ENTITY;
+
+
+ENTITY pressure_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRESSURE_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY pressure_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) = dimensions_for_si_unit (si_unit_name.pascal);
+END_ENTITY;
+
+
+ENTITY procedural_representation
+ SUBTYPE OF (representation);
+ SELF\representation.items : SET [1:?] OF procedural_representation_sequence;
+END_ENTITY;
+
+
+ENTITY procedural_representation_sequence
+ SUBTYPE OF (representation_item);
+ elements : LIST [1:?] OF representation_item;
+ suppressed_items : SET [0:?] OF representation_item;
+ rationale : text;
+WHERE
+ WR1 : SIZEOF(QUERY(q <* suppressed_items | NOT (q IN elements))) = 0;
+END_ENTITY;
+
+
+ENTITY procedural_shape_representation
+ SUBTYPE OF (procedural_representation, shape_representation);
+ SELF\representation.items : SET [1:?] OF procedural_shape_representation_sequence;
+END_ENTITY;
+
+
+ENTITY procedural_shape_representation_sequence
+ SUBTYPE OF (geometric_representation_item, procedural_representation_sequence);
+WHERE
+ WR1 : SIZEOF(QUERY(q <* SELF\procedural_representation_sequence.elements
+ | NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHAPE_REPRESENTATION_ITEM'
+ IN TYPEOF(q)))) = 0;
+END_ENTITY;
+
+
+ENTITY product;
+ id : identifier;
+ name : label;
+ description : OPTIONAL text;
+ frame_of_reference : SET [1:?] OF product_context;
+END_ENTITY;
+
+
+ENTITY product_category;
+ name : label;
+ description : OPTIONAL text;
+DERIVE
+ id : identifier := get_id_value(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY product_class
+ SUBTYPE OF (product_concept, characterized_object);
+END_ENTITY;
+
+
+ENTITY product_concept;
+ id : identifier;
+ name : label;
+ description : OPTIONAL text;
+ market_context : product_concept_context;
+UNIQUE
+ UR1 : id;
+END_ENTITY;
+
+
+ENTITY product_concept_context
+ SUBTYPE OF (application_context_element);
+ market_segment_type : label;
+END_ENTITY;
+
+
+ENTITY product_concept_feature;
+ id : identifier;
+ name : label;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY product_concept_feature_association;
+ name : label;
+ description : OPTIONAL text;
+ concept : product_concept;
+ feature : product_concept_feature;
+END_ENTITY;
+
+
+ENTITY product_concept_feature_category
+ SUBTYPE OF (group);
+WHERE
+ WR1 : SIZEOF(QUERY
+ (
+ aga <* USEDIN( SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'GROUP_ASSIGNMENT.ASSIGNED_GROUP' )
+ |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'APPLIED_GROUP_ASSIGNMENT' IN TYPEOF(aga))
+ AND
+ (
+ ( aga.role.name <> 'specification category member' )
+ OR
+ ( SIZEOF(QUERY
+ (
+ i <* aga.items
+ |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'PRODUCT_CONCEPT_FEATURE' IN TYPEOF ( i ) )
+ AND
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'CONDITIONAL_CONCEPT_FEATURE' IN TYPEOF (i))
+ )
+ ) <> SIZEOF (aga.items)
+ )
+ )
+ )
+ ) =0;
+END_ENTITY;
+
+
+ENTITY product_concept_feature_category_usage
+ SUBTYPE OF (group_assignment);
+ items : SET [1:?] OF category_usage_item;
+ SELF\group_assignment.assigned_group : product_concept_feature_category;
+WHERE
+ WR1 : SELF.role.name IN [ 'mandatory category usage', 'optional category usage' ];
+END_ENTITY;
+
+
+ENTITY product_concept_relationship;
+ name : label;
+ description : OPTIONAL text;
+ relating_product_concept : product_concept;
+ related_product_concept : product_concept;
+END_ENTITY;
+
+
+ENTITY product_context
+ SUBTYPE OF (application_context_element);
+ discipline_type : label;
+END_ENTITY;
+
+
+ENTITY product_definition
+ SUPERTYPE OF (ONEOF (composite_assembly_definition, composite_assembly_sequence_definition, laminate_table, percentage_laminate_definition, percentage_ply_definition, ply_laminate_definition, ply_laminate_sequence_definition, thickness_laminate_definition));
+ id : identifier;
+ description : OPTIONAL text;
+ formation : product_definition_formation;
+ frame_of_reference : product_definition_context;
+DERIVE
+ name : label := get_name_value(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'NAME_ATTRIBUTE.NAMED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY product_definition_context
+ SUBTYPE OF (application_context_element);
+ life_cycle_stage : label;
+END_ENTITY;
+
+
+ENTITY product_definition_context_association;
+ definition : product_definition;
+ frame_of_reference : product_definition_context;
+ role : product_definition_context_role;
+END_ENTITY;
+
+
+ENTITY product_definition_context_role;
+ name : label;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY product_definition_effectivity
+ SUBTYPE OF (effectivity);
+ usage : product_definition_relationship;
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'EFFECTIVITY_ASSIGNMENT.ASSIGNED_EFFECTIVITY')) = 0;
+END_ENTITY;
+
+
+ENTITY product_definition_element_relationship
+ SUBTYPE OF (group);
+END_ENTITY;
+
+
+ENTITY product_definition_formation;
+ id : identifier;
+ description : OPTIONAL text;
+ of_product : product;
+UNIQUE
+ UR1 : id, of_product;
+END_ENTITY;
+
+
+ENTITY product_definition_formation_relationship;
+ id : identifier;
+ name : label;
+ description : OPTIONAL text;
+ relating_product_definition_formation : product_definition_formation;
+ related_product_definition_formation : product_definition_formation;
+END_ENTITY;
+
+
+ENTITY product_definition_formation_with_specified_source
+ SUBTYPE OF (product_definition_formation);
+ make_or_buy : source;
+END_ENTITY;
+
+
+ENTITY product_definition_group_assignment
+ SUBTYPE OF (group_assignment);
+ items : SET [1:1] OF product_definition_or_product_definition_relationship;
+ SELF\group_assignment.assigned_group : product_definition_element_relationship;
+END_ENTITY;
+
+
+ENTITY product_definition_occurrence_relationship;
+ name : label;
+ description : OPTIONAL text;
+ occurrence : product_definition;
+ occurrence_usage : assembly_component_usage;
+WHERE
+ WR1 : occurrence_usage.relating_product_definition :<>:
+ occurrence;
+ WR2 : occurrence_usage.related_product_definition :<>:
+ occurrence;
+ WR3 : occurrence.formation :=:
+ occurrence_usage.related_product_definition.formation;
+END_ENTITY;
+
+
+ENTITY product_definition_relationship;
+ id : identifier;
+ name : label;
+ description : OPTIONAL text;
+ relating_product_definition : product_definition;
+ related_product_definition : product_definition;
+END_ENTITY;
+
+
+ENTITY product_definition_shape
+ SUBTYPE OF (property_definition);
+UNIQUE
+ UR1: SELF\property_definition.definition;
+WHERE
+ WR1 : SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CHARACTERIZED_PRODUCT_DEFINITION', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CHARACTERIZED_OBJECT'] * TYPEOF(SELF\property_definition.definition)) > 0;
+END_ENTITY;
+
+
+ENTITY product_definition_substitute;
+ description : OPTIONAL text;
+ context_relationship : product_definition_relationship;
+ substitute_definition : product_definition;
+DERIVE
+ name : label := get_name_value(SELF);
+WHERE
+ WR1 : context_relationship.related_product_definition :<>: substitute_definition;
+ WR2 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'NAME_ATTRIBUTE.NAMED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY product_definition_usage
+ SUPERTYPE OF (ONEOF (make_from_usage_option, assembly_component_usage))
+ SUBTYPE OF (product_definition_relationship);
+UNIQUE
+ UR1: SELF\product_definition_relationship.id,
+ SELF\product_definition_relationship.relating_product_definition,
+ SELF\product_definition_relationship.related_product_definition;
+ WHERE
+ WR1 : acyclic_product_definition_relationship
+ (SELF,
+ [SELF\product_definition_relationship.related_product_definition],
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION_USAGE');
+END_ENTITY;
+
+
+ENTITY product_definition_with_associated_documents
+ SUBTYPE OF (product_definition);
+ documentation_ids : SET [1:?] OF document;
+END_ENTITY;
+
+
+ENTITY product_identification
+ SUBTYPE OF (configuration_item, characterized_object);
+ SELF\configuration_item.item_concept : product_class;
+WHERE
+ WR1 : SIZEOF(QUERY
+ ( cd <* USEDIN ( SELF ,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONFIGURATION_DESIGN.CONFIGURATION' )
+ |
+ ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'PRODUCT_DEFINITION_FORMATION' IN TYPEOF ( cd. design ) )
+ AND
+ ( SIZEOF ( QUERY
+ (
+ prpc <* USEDIN ( cd. design\product_definition_formation.of_product , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS')
+ |
+ prpc. name IN ['part' , 'raw material' , 'tool'] ) ) >0
+ )
+ )
+ ) <=1;
+ WR2 : NOT ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'CONFIGURABLE_ITEM' IN TYPEOF( SELF ) )
+ XOR ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'PRODUCT_SPECIFICATION' IN TYPEOF ( SELF ) );
+END_ENTITY;
+
+
+ENTITY product_material_composition_relationship
+ SUBTYPE OF (product_definition_relationship);
+ class : label;
+ constituent_amount : SET [1:?] OF characterized_product_composition_value;
+ composition_basis : label;
+ determination_method : text;
+END_ENTITY;
+
+
+ENTITY product_related_product_category
+ SUBTYPE OF (product_category);
+ products : SET [1:?] OF product;
+END_ENTITY;
+
+
+ENTITY product_specification
+ SUBTYPE OF (product_identification, configurable_item);
+END_ENTITY;
+
+
+ENTITY projected_zone_definition
+ SUBTYPE OF (tolerance_zone_definition);
+ projection_end : shape_aspect;
+ projected_length : measure_with_unit;
+WHERE
+ WR1 : ('NUMBER' IN TYPEOF
+ (projected_length\measure_with_unit.value_component)) AND
+ (projected_length\measure_with_unit.value_component > 0.0);
+ WR2 : (derive_dimensional_exponents
+ (projected_length\measure_with_unit.unit_component)=
+ dimensional_exponents(1,0,0,0,0,0,0));
+END_ENTITY;
+
+
+ENTITY projection_curve
+ SUBTYPE OF (annotation_curve_occurrence);
+END_ENTITY;
+
+
+ENTITY projection_directed_callout
+ SUBTYPE OF (draughting_callout);
+WHERE
+ WR1 : SIZEOF(QUERY(p_1<*SELF\draughting_callout.contents |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PROJECTION_CURVE' IN (TYPEOF(p_1))))=1;
+ WR2 : SIZEOF(SELF\draughting_callout.contents) >=2;
+END_ENTITY;
+
+
+ENTITY promissory_usage_occurrence
+ SUBTYPE OF (assembly_component_usage);
+END_ENTITY;
+
+
+ENTITY property_definition;
+ name : label;
+ description : OPTIONAL text;
+ definition : characterized_definition;
+DERIVE
+ id : identifier := get_id_value(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY property_definition_relationship;
+ name : label;
+ description : text;
+ relating_property_definition : property_definition;
+ related_property_definition : property_definition;
+END_ENTITY;
+
+
+ENTITY property_definition_representation;
+ definition : represented_definition;
+ used_representation : representation;
+DERIVE
+ description : text := get_description_value(SELF);
+ name : label := get_name_value(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
+ WR2 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'NAME_ATTRIBUTE.NAMED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY qualified_representation_item
+ SUBTYPE OF (representation_item);
+ qualifiers : SET [1:?] OF value_qualifier;
+WHERE
+ WR1 : SIZEOF(QUERY(temp <* qualifiers |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRECISION_QUALIFIER'
+ IN TYPEOF(temp))) < 2;
+END_ENTITY;
+
+
+ENTITY qualitative_uncertainty
+ SUBTYPE OF (uncertainty_qualifier);
+ uncertainty_value : text;
+END_ENTITY;
+
+
+ENTITY quantified_assembly_component_usage
+ SUBTYPE OF (assembly_component_usage);
+ quantity : measure_with_unit;
+WHERE
+ WR1 : (NOT ('NUMBER' IN TYPEOF(quantity.value_component)))
+ OR (quantity.value_component > 0);
+END_ENTITY;
+
+
+ENTITY quasi_uniform_curve
+ SUBTYPE OF (b_spline_curve);
+END_ENTITY;
+
+
+ENTITY quasi_uniform_surface
+ SUBTYPE OF (b_spline_surface);
+END_ENTITY;
+
+
+ENTITY radioactivity_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.RADIOACTIVITY_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY radioactivity_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) = dimensions_for_si_unit (si_unit_name.becquerel);
+END_ENTITY;
+
+
+ENTITY radius_dimension
+ SUBTYPE OF (dimension_curve_directed_callout);
+WHERE
+ WR1 : SIZEOF (QUERY (con <* SELF.contents |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PROJECTION_CURVE' IN TYPEOF (con)))<=1;
+END_ENTITY;
+
+
+ENTITY range_characteristic
+ SUBTYPE OF (representation, descriptive_representation_item);
+WHERE
+ WR1 : NOT(SELF\representation.name IN ['tolerance', 'minimum tolerance', 'maximum tolerance',
+ 'nominal tolerance', 'plus minus tolerance', 'symmetrical tolerance', 'statistical tolerance']);
+END_ENTITY;
+
+
+ENTITY ratio_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.RATIO_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY ratio_unit
+ SUBTYPE OF (named_unit);
+WHERE
+ WR1 : (SELF\named_unit.dimensions.length_exponent = 0.0) AND (SELF\named_unit.dimensions.mass_exponent = 0.0) AND (SELF\named_unit.dimensions.time_exponent = 0.0) AND (SELF\named_unit.dimensions.electric_current_exponent = 0.0) AND (SELF\named_unit.dimensions.thermodynamic_temperature_exponent = 0.0) AND (SELF\named_unit.dimensions.amount_of_substance_exponent = 0.0) AND (SELF\named_unit.dimensions.luminous_intensity_exponent = 0.0);
+END_ENTITY;
+
+
+ENTITY rational_b_spline_curve
+ SUBTYPE OF (b_spline_curve);
+ weights_data : LIST [2:?] OF REAL;
+DERIVE
+ weights : ARRAY [0:upper_index_on_control_points] OF REAL := list_to_array(weights_data,0,
+ upper_index_on_control_points);
+WHERE
+ WR1 : SIZEOF(weights_data) = SIZEOF(SELF\b_spline_curve.
+ control_points_list);
+ WR2 : curve_weights_positive(SELF);
+END_ENTITY;
+
+
+ENTITY rational_b_spline_surface
+ SUBTYPE OF (b_spline_surface);
+ weights_data : LIST [2:?] OF LIST [2:?] OF REAL;
+DERIVE
+ weights : ARRAY [0:u_upper] OF ARRAY [0:v_upper] OF REAL := make_array_of_array(weights_data,0,u_upper,0,v_upper);
+WHERE
+ WR1 : (SIZEOF(weights_data) =
+ SIZEOF(SELF\b_spline_surface.control_points_list))
+ AND (SIZEOF(weights_data[1]) =
+ SIZEOF(SELF\b_spline_surface.control_points_list[1]));
+ WR2 : surface_weights_positive(SELF);
+END_ENTITY;
+
+
+ENTITY rational_representation_item
+ SUBTYPE OF (representation_item, slash_expression);
+WHERE
+ WR1 : SIZEOF( QUERY( operand <* SELF\binary_generic_expression.operands |
+ NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.INT_LITERAL' IN TYPEOF(operand)))) = 0;
+END_ENTITY;
+
+
+ENTITY real_literal
+ SUBTYPE OF (literal_number);
+ SELF\literal_number.the_value : REAL;
+END_ENTITY;
+
+
+ENTITY real_representation_item
+ SUBTYPE OF (representation_item, real_literal);
+END_ENTITY;
+
+
+ENTITY rectangular_composite_surface
+ SUBTYPE OF (bounded_surface);
+ segments : LIST [1:?] OF LIST [1:?] OF surface_patch;
+DERIVE
+ n_u : INTEGER := SIZEOF(segments);
+ n_v : INTEGER := SIZEOF(segments[1]);
+WHERE
+ WR1 : SIZEOF(QUERY (s <* segments | n_v <> SIZEOF (s))) = 0;
+ WR2 : constraints_rectangular_composite_surface(SELF);
+END_ENTITY;
+
+
+ENTITY rectangular_trimmed_surface
+ SUBTYPE OF (bounded_surface);
+ basis_surface : surface;
+ u1 : parameter_value;
+ u2 : parameter_value;
+ v1 : parameter_value;
+ v2 : parameter_value;
+ usense : BOOLEAN;
+ vsense : BOOLEAN;
+WHERE
+ WR1 : u1 <> u2;
+ WR2 : v1 <> v2;
+ WR3 : (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ELEMENTARY_SURFACE' IN TYPEOF(basis_surface))
+ AND (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PLANE' IN TYPEOF(basis_surface)))) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_OF_REVOLUTION' IN TYPEOF(basis_surface))
+ OR (usense = (u2 > u1));
+ WR4 : (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SPHERICAL_SURFACE' IN TYPEOF(basis_surface))
+ OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TOROIDAL_SURFACE' IN TYPEOF(basis_surface)))
+ OR (vsense = (v2 > v1));
+END_ENTITY;
+
+
+ENTITY referenced_modified_datum
+ SUBTYPE OF (datum_reference);
+ modifier : limit_condition;
+END_ENTITY;
+
+
+ENTITY relative_event_occurrence
+ SUBTYPE OF (event_occurrence);
+ base_event : event_occurrence;
+ offset : time_measure_with_unit;
+END_ENTITY;
+
+
+ENTITY rep_item_group
+ SUBTYPE OF (group, representation_item);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'PRESENTATION_LAYER_ASSIGNMENT.' + 'ASSIGNED_ITEMS')) > 0;
+ WR2 : SIZEOF(QUERY(r <* USEDIN(SELF,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'REPRESENTATION.' + 'ITEMS') | r.name = 'group representation')) > 0;
+ WR3 : SIZEOF(QUERY(ga <* USEDIN(SELF,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'GROUP_ASSIGNMENT.' + 'ASSIGNED_GROUP') | ga.role.name <> 'group membership')) = 0;
+ WR4 : SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'GEOMETRIC_REPRESENTATION_ITEM', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'TOPOLOGICAL_REPRESENTATION_ITEM', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'MAPPED_ITEM','AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'STYLED_ITEM'] * TYPEOF(SELF)) = 1;
+END_ENTITY;
+
+
+ENTITY reparametrised_composite_curve_segment
+ SUBTYPE OF (composite_curve_segment);
+ param_length : parameter_value;
+WHERE
+ WR1 : param_length > 0.0;
+END_ENTITY;
+
+
+ENTITY representation;
+ name : label;
+ items : SET [1:?] OF representation_item;
+ context_of_items : representation_context;
+DERIVE
+ description : text := get_description_value (SELF);
+ id : identifier := get_id_value (SELF);
+WHERE
+ WR1 : SIZEOF (USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'ID_ATTRIBUTE.IDENTIFIED_ITEM'))
+ <= 1;
+ WR2 : SIZEOF (USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM'))
+ <= 1;
+END_ENTITY;
+
+
+ENTITY representation_context;
+ context_identifier : identifier;
+ context_type : text;
+INVERSE
+ representations_in_context: SET [1:?] OF representation FOR context_of_items;
+END_ENTITY;
+
+
+ENTITY representation_item
+ SUPERTYPE OF (ONEOF (binary_representation_item, compound_representation_item, mapped_item, value_representation_item, mapped_item, styled_item, boolean_representation_item, date_representation_item, date_time_representation_item, integer_representation_item, logical_representation_item, rational_representation_item, real_representation_item));
+ name : label;
+WHERE
+ WR1 : SIZEOF(using_representations(SELF)) > 0;
+END_ENTITY;
+
+
+ENTITY representation_item_relationship;
+ name : label;
+ description : OPTIONAL text;
+ relating_representation_item : representation_item;
+ related_representation_item : representation_item;
+END_ENTITY;
+
+
+ENTITY representation_map;
+ mapping_origin : representation_item;
+ mapped_representation : representation;
+INVERSE
+ map_usage: SET [1:?] OF mapped_item FOR mapping_source;
+WHERE
+ WR1 : item_in_context(SELF.mapping_origin,
+ SELF.mapped_representation.context_of_items);
+END_ENTITY;
+
+
+ENTITY representation_relationship;
+ name : label;
+ description : OPTIONAL text;
+ rep_1 : representation;
+ rep_2 : representation;
+END_ENTITY;
+
+
+ENTITY representation_relationship_with_transformation
+ SUBTYPE OF (representation_relationship);
+ transformation_operator : transformation;
+WHERE
+ WR1 : SELF\representation_relationship.rep_1.context_of_items
+ :<>: SELF\representation_relationship.rep_2.context_of_items;
+END_ENTITY;
+
+
+ENTITY requirement_assigned_object
+ SUBTYPE OF (group_assignment);
+ items : SET [1:1] OF requirement_assigned_item;
+ SELF\group_assignment.assigned_group : requirement_assignment;
+END_ENTITY;
+
+
+ENTITY requirement_assignment
+ SUBTYPE OF (characterized_object, group);
+END_ENTITY;
+
+
+ENTITY requirement_source
+ SUBTYPE OF (group);
+END_ENTITY;
+
+
+ENTITY requirement_view_definition_relationship
+ SUBTYPE OF (product_definition_relationship);
+END_ENTITY;
+
+
+ENTITY resistance_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.RESISTANCE_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY resistance_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) = dimensions_for_si_unit (si_unit_name.ohm);
+END_ENTITY;
+
+
+ENTITY revolved_area_solid
+ SUBTYPE OF (swept_area_solid);
+ axis : axis1_placement;
+ angle : plane_angle_measure;
+DERIVE
+ axis_line : line := representation_item('')||
+ geometric_representation_item()|| curve()||
+ line(axis.location, representation_item('')||
+ geometric_representation_item()||
+ vector(axis.z, 1.0));
+END_ENTITY;
+
+
+ENTITY revolved_face_solid
+ SUBTYPE OF (swept_face_solid);
+ axis : axis1_placement;
+ angle : plane_angle_measure;
+DERIVE
+ axis_line : line := representation_item('')||
+ geometric_representation_item()|| curve()||
+ line(axis.location, representation_item('')||
+ geometric_representation_item()||
+ vector(axis.z, 1.0));
+END_ENTITY;
+
+
+ENTITY revolved_face_solid_with_trim_conditions
+ SUBTYPE OF (revolved_face_solid);
+ first_trim_condition : trim_condition_select;
+ second_trim_condition : trim_condition_select;
+WHERE
+ WR1 : NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LENGTH_MEASURE'
+ IN TYPEOF(first_trim_condition))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LENGTH_MEASURE'
+ IN TYPEOF(second_trim_condition)));
+ WR2 : NOT((('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PLANE_ANGLE_MEASURE'
+ IN TYPEOF(first_trim_condition)) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PLANE_ANGLE_MEASURE'
+ IN TYPEOF(second_trim_condition))) AND
+ (first_trim_condition = second_trim_condition));
+END_ENTITY;
+
+
+ENTITY right_angular_wedge
+ SUBTYPE OF (geometric_representation_item);
+ position : axis2_placement_3d;
+ x : positive_length_measure;
+ y : positive_length_measure;
+ z : positive_length_measure;
+ ltx : length_measure;
+WHERE
+ WR1 : ((0.0 <= ltx) AND (ltx < x));
+END_ENTITY;
+
+
+ENTITY right_circular_cone
+ SUBTYPE OF (geometric_representation_item);
+ position : axis1_placement;
+ height : positive_length_measure;
+ radius : length_measure;
+ semi_angle : plane_angle_measure;
+WHERE
+ WR1 : radius >= 0.0;
+END_ENTITY;
+
+
+ENTITY right_circular_cylinder
+ SUBTYPE OF (geometric_representation_item);
+ position : axis1_placement;
+ height : positive_length_measure;
+ radius : positive_length_measure;
+END_ENTITY;
+
+
+ENTITY right_to_usage_association
+ SUBTYPE OF (action_method_relationship);
+ SELF\action_method_relationship.related_method : information_right;
+ SELF\action_method_relationship.relating_method : information_usage_right;
+DERIVE
+ right_applied : information_right := SELF\action_method_relationship.related_method;
+ right_usage : information_usage_right := SELF\action_method_relationship.relating_method;
+END_ENTITY;
+
+
+ENTITY role_association;
+ role : object_role;
+ item_with_role : role_select;
+END_ENTITY;
+
+
+ENTITY roundness_tolerance
+ SUBTYPE OF (geometric_tolerance);
+WHERE
+ WR1 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'GEOMETRIC_TOLERANCE_WITH_DATUM_REFERENCE' IN TYPEOF (SELF));
+END_ENTITY;
+
+
+ENTITY row_representation_item
+ SUBTYPE OF (compound_representation_item);
+ SELF\compound_representation_item.item_element : list_representation_item;
+END_ENTITY;
+
+
+ENTITY row_value
+ SUBTYPE OF (compound_representation_item);
+END_ENTITY;
+
+
+ENTITY row_variable
+ SUBTYPE OF (abstract_variable);
+END_ENTITY;
+
+
+ENTITY rule_action
+ SUBTYPE OF (action);
+END_ENTITY;
+
+
+ENTITY rule_condition
+ SUBTYPE OF (atomic_formula);
+END_ENTITY;
+
+
+ENTITY rule_definition
+ SUBTYPE OF (rule_software_definition);
+END_ENTITY;
+
+
+ENTITY rule_set
+ SUBTYPE OF (rule_software_definition);
+END_ENTITY;
+
+
+ENTITY rule_set_group
+ SUBTYPE OF (rule_software_definition);
+END_ENTITY;
+
+
+ENTITY rule_software_definition
+ SUBTYPE OF (product_definition);
+END_ENTITY;
+
+
+ENTITY rule_superseded_assignment
+ SUBTYPE OF (action_assignment);
+ items : SET [1:?] OF rule_superseded_item;
+END_ENTITY;
+
+
+ENTITY rule_supersedence
+ SUBTYPE OF (rule_action);
+END_ENTITY;
+
+
+ENTITY ruled_surface_swept_area_solid
+ SUBTYPE OF (surface_curve_swept_area_solid);
+WHERE
+ WR1 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_SURFACE' IN TYPEOF(SELF.reference_surface)) AND
+ (SELF.reference_surface\b_spline_surface.u_degree = 1);
+ WR2 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE' IN TYPEOF(SELF.directrix)) OR
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_CURVE' IN TYPEOF(SELF.directrix\surface_curve.curve_3d))
+ AND
+ (SELF.directrix\surface_curve.curve_3d\b_spline_curve.degree =
+ SELF.reference_surface\b_spline_surface.v_degree));
+END_ENTITY;
+
+
+ENTITY runout_zone_definition
+ SUBTYPE OF (tolerance_zone_definition);
+ orientation : runout_zone_orientation;
+END_ENTITY;
+
+
+ENTITY runout_zone_orientation;
+ angle : measure_with_unit;
+END_ENTITY;
+
+
+ENTITY runout_zone_orientation_reference_direction
+ SUBTYPE OF (runout_zone_orientation);
+ orientation_defining_relationship : shape_aspect_relationship;
+END_ENTITY;
+
+
+ENTITY satisfied_requirement
+ SUBTYPE OF (group_assignment);
+ items : SET [1:1] OF product_definition;
+ SELF\group_assignment.assigned_group : satisfies_requirement;
+END_ENTITY;
+
+
+ENTITY satisfies_requirement
+ SUBTYPE OF (group);
+END_ENTITY;
+
+
+ENTITY satisfying_item
+ SUBTYPE OF (group_assignment);
+ items : SET [1:1] OF requirement_satisfaction_item;
+ SELF\group_assignment.assigned_group : satisfies_requirement;
+END_ENTITY;
+
+
+ENTITY scalar_variable
+ SUBTYPE OF (abstract_variable);
+END_ENTITY;
+
+
+ENTITY scattering_parameter
+ SUBTYPE OF (polar_complex_number_literal);
+WHERE
+ WR1 : SIZEOF(TYPEOF(SELF) - (TYPEOF(SELF\polar_complex_number_literal ||
+ SELF\scattering_parameter))) = 0;
+END_ENTITY;
+
+
+ENTITY sculptured_solid
+ SUBTYPE OF (modified_solid);
+ sculpturing_element : generalized_surface_select;
+ positive_side : BOOLEAN;
+END_ENTITY;
+
+
+ENTITY seam_curve
+ SUBTYPE OF (surface_curve);
+WHERE
+ WR1 : SIZEOF(SELF\surface_curve.associated_geometry) = 2;
+ WR2 : associated_surface(SELF\surface_curve.associated_geometry[1]) =
+ associated_surface(SELF\surface_curve.associated_geometry[2]);
+ WR3 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE' IN
+ TYPEOF(SELF\surface_curve.associated_geometry[1]);
+ WR4 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE' IN
+ TYPEOF(SELF\surface_curve.associated_geometry[2]);
+END_ENTITY;
+
+
+ENTITY security_classification;
+ name : label;
+ purpose : text;
+ security_level : security_classification_level;
+END_ENTITY;
+
+
+ENTITY security_classification_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_security_classification : security_classification;
+DERIVE
+ role : object_role := get_role(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ROLE_ASSOCIATION.ITEM_WITH_ROLE')) <= 1;
+END_ENTITY;
+
+
+ENTITY security_classification_level;
+ name : label;
+END_ENTITY;
+
+
+ENTITY serial_numbered_effectivity
+ SUBTYPE OF (effectivity);
+ effectivity_start_id : identifier;
+ effectivity_end_id : OPTIONAL identifier;
+END_ENTITY;
+
+
+ENTITY shape_aspect;
+ name : label;
+ description : OPTIONAL text;
+ of_shape : product_definition_shape;
+ product_definitional : LOGICAL;
+DERIVE
+ id : identifier := get_id_value(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY shape_aspect_associativity
+ SUBTYPE OF (shape_aspect_relationship);
+WHERE
+ WR1 : SELF.relating_shape_aspect.product_definitional;
+ WR2 : NOT (SELF.related_shape_aspect.product_definitional);
+END_ENTITY;
+
+
+ENTITY shape_aspect_deriving_relationship
+ SUBTYPE OF (shape_aspect_relationship);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DERIVED_SHAPE_ASPECT' IN
+TYPEOF
+ (SELF\SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT);
+END_ENTITY;
+
+
+ENTITY shape_aspect_relationship;
+ name : label;
+ description : OPTIONAL text;
+ relating_shape_aspect : shape_aspect;
+ related_shape_aspect : shape_aspect;
+DERIVE
+ id : identifier := get_id_value(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY shape_definition_representation
+ SUBTYPE OF (property_definition_representation);
+WHERE
+ WR1 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(SELF.definition)) OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHAPE_DEFINITION' IN TYPEOF(SELF.definition.definition));
+ WR2 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHAPE_REPRESENTATION' IN TYPEOF(SELF.used_representation);
+END_ENTITY;
+
+
+ENTITY shape_dimension_representation
+ SUBTYPE OF (shape_representation);
+WHERE
+ WR1 : SIZEOF (QUERY (temp <* SELF\representation.items |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MEASURE_REPRESENTATION_ITEM'
+ IN TYPEOF (temp)))) = 0;
+ WR2 : SIZEOF (SELF\representation.items) <= 3;
+ WR3 : SIZEOF (QUERY (pos_mri <* QUERY (real_mri <*
+ SELF\representation.items | 'REAL' IN TYPEOF
+ (real_mri\measure_with_unit.value_component) ) |
+ NOT (pos_mri\measure_with_unit.value_component > 0.0 ))) = 0;
+END_ENTITY;
+
+
+ENTITY shape_feature_definition
+ SUBTYPE OF (characterized_object);
+END_ENTITY;
+
+
+ENTITY shape_representation
+ SUBTYPE OF (representation);
+END_ENTITY;
+
+
+ENTITY shape_representation_relationship
+ SUBTYPE OF (representation_relationship);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHAPE_REPRESENTATION' IN (TYPEOF(SELF\representation_relationship.rep_1) + TYPEOF(SELF\representation_relationship.rep_2));
+END_ENTITY;
+
+
+ENTITY shape_representation_with_parameters
+ SUBTYPE OF (shape_representation);
+WHERE
+ WR1 : SIZEOF( QUERY( i <* SELF.items | SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PLACEMENT', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MEASURE_REPRESENTATION_ITEM', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DESCRIPTIVE_REPRESENTATION_ITEM'] * TYPEOF(i)) = 1 )) = SIZEOF(SELF.items);
+END_ENTITY;
+
+
+ENTITY shell_based_surface_model
+ SUBTYPE OF (geometric_representation_item);
+ sbsm_boundary : SET [1:?] OF shell;
+WHERE
+ WR1 : constraints_geometry_shell_based_surface_model(SELF);
+END_ENTITY;
+
+
+ENTITY shell_based_wireframe_model
+ SUBTYPE OF (geometric_representation_item);
+ sbwm_boundary : SET [1:?] OF shell;
+WHERE
+ WR1 : constraints_geometry_shell_based_wireframe_model(SELF);
+END_ENTITY;
+
+
+ENTITY shell_based_wireframe_shape_representation
+ SUBTYPE OF (shape_representation);
+WHERE
+ WR1 : SIZEOF (
+QUERY ( it <* SELF.items| NOT ( SIZEOF ([ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_WIREFRAME_MODEL', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT_3D' ] * TYPEOF (it)) = 1) )) = 0;
+ WR2 : SIZEOF (
+QUERY ( it <* SELF.items| ( SIZEOF ([ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_WIREFRAME_MODEL', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' ] * TYPEOF (it)) = 1) )) >= 1;
+ WR3 : SIZEOF (
+QUERY ( sbwm <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_WIREFRAME_MODEL' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( ws <*
+QUERY ( sb <* sbwm\shell_based_wireframe_model.sbwm_boundary| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.WIRE_SHELL' IN TYPEOF (sb)) )| NOT ( SIZEOF (
+QUERY ( eloop <*
+QUERY ( wsb <* ws\wire_shell.wire_shell_extent| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (wsb)) )| NOT ( SIZEOF (
+QUERY ( el <* eloop\path.edge_list| NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_CURVE' IN TYPEOF (el.edge_element)) )) = 0) )) = 0) )) = 0) )) = 0;
+ WR4 : SIZEOF (
+QUERY ( sbwm <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_WIREFRAME_MODEL' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( ws <*
+QUERY ( sb <* sbwm\shell_based_wireframe_model.sbwm_boundary| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.WIRE_SHELL' IN TYPEOF (sb)) )| NOT ( SIZEOF (
+QUERY ( eloop <*
+QUERY ( wsb <* ws\wire_shell.wire_shell_extent| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (wsb)) )| NOT ( SIZEOF (
+QUERY ( pline_el <*
+QUERY ( el <* eloop\path.edge_list| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE' IN TYPEOF (el.edge_element\edge_curve.edge_geometry)) )| NOT ( SIZEOF (pline_el.edge_element\edge_curve.edge_geometry\polyline.points) > 2) )) = 0) )) = 0) )) = 0) )) = 0;
+ WR5 : SIZEOF (
+QUERY ( sbwm <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_WIREFRAME_MODEL' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( ws <*
+QUERY ( sb <* sbwm\shell_based_wireframe_model.sbwm_boundary| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.WIRE_SHELL' IN TYPEOF (sb)) )| NOT ( SIZEOF (
+QUERY ( eloop <*
+QUERY ( wsb <* ws\wire_shell.wire_shell_extent| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (wsb)) )| NOT ( SIZEOF (
+QUERY ( el <* eloop\path.edge_list| NOT valid_wireframe_edge_curve(el.edge_element\edge_curve.edge_geometry) )) = 0) )) = 0) )) = 0) )) = 0;
+ WR6 : SIZEOF (
+QUERY ( sbwm <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_WIREFRAME_MODEL' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( ws <*
+QUERY ( sb <* sbwm\shell_based_wireframe_model.sbwm_boundary| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.WIRE_SHELL' IN TYPEOF (sb)) )| NOT ( SIZEOF (
+QUERY ( eloop <*
+QUERY ( wsb <* ws\wire_shell.wire_shell_extent| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (wsb)) )| NOT ( SIZEOF (
+QUERY ( el <* eloop\path.edge_list| NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN TYPEOF (el.edge_element.edge_start)) AND ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN TYPEOF (el.edge_element.edge_end))) )) = 0) )) = 0) )) = 0) )) = 0;
+ WR7 : SIZEOF (
+QUERY ( sbwm <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_WIREFRAME_MODEL' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( ws <*
+QUERY ( sb <* sbwm\shell_based_wireframe_model.sbwm_boundary| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.WIRE_SHELL' IN TYPEOF (sb)) )| NOT ( SIZEOF (
+QUERY ( eloop <*
+QUERY ( wsb <* ws\wire_shell.wire_shell_extent| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (wsb)) )| NOT ( SIZEOF (
+QUERY ( el <* eloop\path.edge_list| NOT (valid_wireframe_vertex_point(el.edge_element.edge_start\vertex_point.vertex_geometry) AND valid_wireframe_vertex_point(el.edge_element.edge_end\vertex_point.vertex_geometry)) )) = 0) )) = 0) )) = 0) )) = 0;
+ WR8 : SIZEOF (
+QUERY ( sbwm <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_WIREFRAME_MODEL' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( ws <*
+QUERY ( sb <* sbwm\shell_based_wireframe_model.sbwm_boundary| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.WIRE_SHELL' IN TYPEOF (sb)) )| NOT ( SIZEOF (
+QUERY ( vloop <*
+QUERY ( wsb <* ws\wire_shell.wire_shell_extent| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_LOOP' IN TYPEOF (wsb)) )| NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN TYPEOF (vloop\vertex_loop.loop_vertex)) )) = 0) )) = 0) )) = 0;
+ WR9 : SIZEOF (
+QUERY ( sbwm <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_WIREFRAME_MODEL' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( ws <*
+QUERY ( sb <* sbwm\shell_based_wireframe_model.sbwm_boundary| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.WIRE_SHELL' IN TYPEOF (sb)) )| NOT ( SIZEOF (
+QUERY ( vloop <*
+QUERY ( wsb <* ws\wire_shell.wire_shell_extent| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_LOOP' IN TYPEOF (wsb)) )| NOT valid_wireframe_vertex_point(vloop\vertex_loop.loop_vertex\vertex_point.vertex_geometry) )) = 0) )) = 0) )) = 0;
+ WR10 : SIZEOF (
+QUERY ( sbwm <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_WIREFRAME_MODEL' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( vs <*
+QUERY ( sb <* sbwm\shell_based_wireframe_model.sbwm_boundary| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_SHELL' IN TYPEOF (sb)) )| NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN TYPEOF (vs\vertex_shell.vertex_shell_extent.loop_vertex)) )) = 0) )) = 0;
+ WR11 : SIZEOF (
+QUERY ( sbwm <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_WIREFRAME_MODEL' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( vs <*
+QUERY ( sb <* sbwm\shell_based_wireframe_model.sbwm_boundary| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_SHELL' IN TYPEOF (sb)) )| NOT valid_wireframe_vertex_point(vs\vertex_shell.vertex_shell_extent.loop_vertex\vertex_point.vertex_geometry) )) = 0) )) = 0;
+ WR12 : SIZEOF (
+QUERY ( mi <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' IN TYPEOF (it)) )| NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'SHELL_BASED_WIREFRAME_SHAPE_REPRESENTATION' IN TYPEOF (mi\mapped_item.mapping_source.mapped_representation)) )) = 0;
+ WR13 : SELF.context_of_items\geometric_representation_context.coordinate_space_dimension = 3;
+END_ENTITY;
+
+
+ENTITY shelled_solid
+ SUPERTYPE OF (ONEOF (double_offset_shelled_solid, complex_shelled_solid))
+ SUBTYPE OF (modified_solid);
+ deleted_face_set : SET [1:?] OF face_surface;
+ thickness : length_measure;
+WHERE
+ WR1 : thickness <> 0;
+END_ENTITY;
+
+
+ENTITY si_absorbed_dose_unit
+ SUBTYPE OF (absorbed_dose_unit, si_unit);
+WHERE
+ WR1 : SELF\si_unit.name = si_unit_name.gray;
+ WR2 : NOT EXISTS(SELF\derived_unit.name);
+END_ENTITY;
+
+
+ENTITY si_capacitance_unit
+ SUBTYPE OF (capacitance_unit, si_unit);
+WHERE
+ WR1 : SELF\si_unit.name = si_unit_name.farad;
+ WR2 : NOT EXISTS(SELF\derived_unit.name);
+END_ENTITY;
+
+
+ENTITY si_conductance_unit
+ SUBTYPE OF (conductance_unit, si_unit);
+WHERE
+ WR1 : SELF\si_unit.name = si_unit_name.siemens;
+ WR2 : NOT EXISTS(SELF\derived_unit.name);
+END_ENTITY;
+
+
+ENTITY si_dose_equivalent_unit
+ SUBTYPE OF (dose_equivalent_unit, si_unit);
+WHERE
+ WR1 : SELF\si_unit.name = si_unit_name.sievert;
+ WR2 : NOT EXISTS(SELF\derived_unit.name);
+END_ENTITY;
+
+
+ENTITY si_electric_charge_unit
+ SUBTYPE OF (electric_charge_unit, si_unit);
+WHERE
+ WR1 : SELF\si_unit.name = si_unit_name.coulomb;
+ WR2 : NOT EXISTS(SELF\derived_unit.name);
+END_ENTITY;
+
+
+ENTITY si_electric_potential_unit
+ SUBTYPE OF (electric_potential_unit, si_unit);
+WHERE
+ WR1 : SELF\si_unit.name = si_unit_name.volt;
+ WR2 : NOT EXISTS(SELF\derived_unit.name);
+END_ENTITY;
+
+
+ENTITY si_energy_unit
+ SUBTYPE OF (energy_unit, si_unit);
+WHERE
+ WR1 : SELF\si_unit.name = si_unit_name.joule;
+ WR2 : NOT EXISTS(SELF\derived_unit.name);
+END_ENTITY;
+
+
+ENTITY si_force_unit
+ SUBTYPE OF (force_unit, si_unit);
+WHERE
+ WR1 : SELF\si_unit.name = si_unit_name.newton;
+ WR2 : NOT EXISTS(SELF\derived_unit.name);
+END_ENTITY;
+
+
+ENTITY si_frequency_unit
+ SUBTYPE OF (frequency_unit, si_unit);
+WHERE
+ WR1 : SELF\si_unit.name = si_unit_name.hertz;
+ WR2 : NOT EXISTS(SELF\derived_unit.name);
+END_ENTITY;
+
+
+ENTITY si_illuminance_unit
+ SUBTYPE OF (illuminance_unit, si_unit);
+WHERE
+ WR1 : SELF\si_unit.name = si_unit_name.lux;
+ WR2 : NOT EXISTS(SELF\derived_unit.name);
+END_ENTITY;
+
+
+ENTITY si_inductance_unit
+ SUBTYPE OF (inductance_unit, si_unit);
+WHERE
+ WR1 : SELF\si_unit.name = si_unit_name.henry;
+ WR2 : NOT EXISTS(SELF\derived_unit.name);
+END_ENTITY;
+
+
+ENTITY si_magnetic_flux_density_unit
+ SUBTYPE OF (magnetic_flux_density_unit, si_unit);
+WHERE
+ WR1 : SELF\si_unit.name = si_unit_name.tesla;
+ WR2 : NOT EXISTS(SELF\derived_unit.name);
+END_ENTITY;
+
+
+ENTITY si_magnetic_flux_unit
+ SUBTYPE OF (magnetic_flux_unit, si_unit);
+WHERE
+ WR1 : SELF\si_unit.name = si_unit_name.weber;
+ WR2 : NOT EXISTS(SELF\derived_unit.name);
+END_ENTITY;
+
+
+ENTITY si_power_unit
+ SUBTYPE OF (power_unit, si_unit);
+WHERE
+ WR1 : SELF\si_unit.name = si_unit_name.watt;
+ WR2 : NOT EXISTS(SELF\derived_unit.name);
+END_ENTITY;
+
+
+ENTITY si_pressure_unit
+ SUBTYPE OF (pressure_unit, si_unit);
+WHERE
+ WR1 : SELF\si_unit.name = si_unit_name.pascal;
+ WR2 : NOT EXISTS(SELF\derived_unit.name);
+END_ENTITY;
+
+
+ENTITY si_radioactivity_unit
+ SUBTYPE OF (radioactivity_unit, si_unit);
+WHERE
+ WR1 : SELF\si_unit.name = si_unit_name.becquerel;
+ WR2 : NOT EXISTS(SELF\derived_unit.name);
+END_ENTITY;
+
+
+ENTITY si_resistance_unit
+ SUBTYPE OF (resistance_unit, si_unit);
+WHERE
+ WR1 : SELF\si_unit.name = si_unit_name.ohm;
+ WR2 : NOT EXISTS(SELF\derived_unit.name);
+END_ENTITY;
+
+
+ENTITY si_unit
+ SUBTYPE OF (named_unit);
+ prefix : OPTIONAL si_prefix;
+ name : si_unit_name;
+DERIVE
+ SELF\named_unit.dimensions : dimensional_exponents := dimensions_for_si_unit(name);
+WHERE
+ WR1 : NOT(('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MASS_UNIT' IN TYPEOF(SELF)) AND
+ (SIZEOF(USEDIN(SELF,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DERIVED_UNIT_ELEMENT.UNIT')) > 0)) OR
+ (prefix = si_prefix.kilo);
+END_ENTITY;
+
+
+ENTITY simple_boolean_expression
+ ABSTRACT SUPERTYPE
+ SUBTYPE OF (boolean_expression, simple_generic_expression);
+END_ENTITY;
+
+
+ENTITY simple_clause
+ SUBTYPE OF (compound_representation_item);
+END_ENTITY;
+
+
+ENTITY simple_generic_expression
+ ABSTRACT SUPERTYPE OF (ONEOF (generic_literal, generic_variable))
+ SUBTYPE OF (generic_expression);
+END_ENTITY;
+
+
+ENTITY simple_numeric_expression
+ ABSTRACT SUPERTYPE
+ SUBTYPE OF (numeric_expression, simple_generic_expression);
+END_ENTITY;
+
+
+ENTITY slash_expression
+ SUBTYPE OF (binary_numeric_expression);
+END_ENTITY;
+
+
+ENTITY smeared_material_definition
+ SUBTYPE OF (zone_structural_makeup);
+END_ENTITY;
+
+
+ENTITY solid_angle_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SOLID_ANGLE_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY solid_angle_unit
+ SUBTYPE OF (named_unit);
+WHERE
+ WR1 : (SELF\named_unit.dimensions.length_exponent = 0.0) AND (SELF\named_unit.dimensions.mass_exponent = 0.0) AND (SELF\named_unit.dimensions.time_exponent = 0.0) AND (SELF\named_unit.dimensions.electric_current_exponent = 0.0) AND (SELF\named_unit.dimensions.thermodynamic_temperature_exponent = 0.0) AND (SELF\named_unit.dimensions.amount_of_substance_exponent = 0.0) AND (SELF\named_unit.dimensions.luminous_intensity_exponent = 0.0);
+END_ENTITY;
+
+
+ENTITY solid_curve_font
+ SUBTYPE OF (pre_defined_curve_font);
+END_ENTITY;
+
+
+ENTITY solid_model
+ SUPERTYPE OF (ONEOF (csg_solid, manifold_solid_brep, swept_face_solid, swept_area_solid, swept_disk_solid, solid_replica))
+ SUBTYPE OF (geometric_representation_item);
+END_ENTITY;
+
+
+ENTITY solid_replica
+ SUBTYPE OF (solid_model);
+ parent_solid : solid_model;
+ transformation : cartesian_transformation_operator_3d;
+WHERE
+ WR1 : acyclic_solid_replica(SELF, parent_solid);
+ WR2 : parent_solid\geometric_representation_item.dim = 3;
+END_ENTITY;
+
+
+ENTITY solid_with_angle_based_chamfer
+ SUBTYPE OF (solid_with_chamfered_edges);
+ offset_distance : positive_length_measure;
+ left_offset : BOOLEAN;
+ offset_angle : positive_plane_angle_measure;
+END_ENTITY;
+
+
+ENTITY solid_with_chamfered_edges
+ ABSTRACT SUPERTYPE OF (ONEOF (solid_with_single_offset_chamfer, solid_with_double_offset_chamfer, solid_with_angle_based_chamfer))
+ SUBTYPE OF (edge_blended_solid);
+END_ENTITY;
+
+
+ENTITY solid_with_circular_pattern
+ SUPERTYPE OF (solid_with_incomplete_circular_pattern)
+ SUBTYPE OF (solid_with_shape_element_pattern);
+ replicate_count : positive_integer;
+ angular_spacing : plane_angle_measure;
+ radial_alignment : BOOLEAN;
+ reference_point : point;
+END_ENTITY;
+
+
+ENTITY solid_with_circular_pocket
+ SUBTYPE OF (solid_with_pocket);
+ pocket_radius : positive_length_measure;
+WHERE
+ WR1 : SELF\solid_with_pocket.floor_blend_radius <= pocket_radius;
+END_ENTITY;
+
+
+ENTITY solid_with_circular_protrusion
+ SUBTYPE OF (solid_with_protrusion);
+ protrusion_radius : positive_length_measure;
+END_ENTITY;
+
+
+ENTITY solid_with_conical_bottom_round_hole
+ SUBTYPE OF (solid_with_stepped_round_hole);
+ semi_apex_angle : positive_plane_angle_measure;
+ tip_radius : non_negative_length_measure;
+WHERE
+ WR1 : tip_radius <
+ SELF\solid_with_stepped_round_hole.segment_radii[segments];
+END_ENTITY;
+
+
+ENTITY solid_with_constant_radius_edge_blend
+ SUBTYPE OF (edge_blended_solid);
+ radius : positive_length_measure;
+END_ENTITY;
+
+
+ENTITY solid_with_curved_slot
+ SUBTYPE OF (solid_with_slot);
+ slot_centreline : bounded_curve;
+END_ENTITY;
+
+
+ENTITY solid_with_depression
+ ABSTRACT SUPERTYPE OF ((solid_with_through_depression ANDOR ONEOF (solid_with_hole, solid_with_pocket, solid_with_slot, solid_with_groove)))
+ SUBTYPE OF (modified_solid_with_placed_configuration);
+ depth : positive_length_measure;
+END_ENTITY;
+
+
+ENTITY solid_with_double_offset_chamfer
+ SUBTYPE OF (solid_with_chamfered_edges);
+ left_offset_distance : positive_length_measure;
+ right_offset_distance : positive_length_measure;
+END_ENTITY;
+
+
+ENTITY solid_with_flat_bottom_round_hole
+ SUBTYPE OF (solid_with_stepped_round_hole);
+ fillet_radius : non_negative_length_measure;
+WHERE
+ WR1 : fillet_radius <
+ SELF\solid_with_stepped_round_hole.segment_radii[segments];
+END_ENTITY;
+
+
+ENTITY solid_with_general_pocket
+ SUBTYPE OF (solid_with_pocket);
+ profile : positioned_sketch;
+ reference_point : point;
+WHERE
+ WR1 : SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_BOUNDED_SURFACE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_SURFACE'] * TYPEOF(profile.sketch_basis)) = 1;
+ WR2 : profile IN using_items(reference_point,[]);
+END_ENTITY;
+
+
+ENTITY solid_with_general_protrusion
+ SUBTYPE OF (solid_with_protrusion);
+ profile : positioned_sketch;
+ reference_point : point;
+WHERE
+ WR1 : SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_BOUNDED_SURFACE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_SURFACE'] * TYPEOF(profile.sketch_basis)) = 1;
+ WR2 : profile IN using_items(reference_point,[]);
+END_ENTITY;
+
+
+ENTITY solid_with_groove
+ SUBTYPE OF (solid_with_depression);
+ groove_radius : positive_length_measure;
+ groove_width : positive_length_measure;
+ draft_angle : plane_angle_measure;
+ floor_fillet_radius : non_negative_length_measure;
+ external_groove : BOOLEAN;
+WHERE
+ WR1 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SOLID_WITH_THROUGH_DEPRESSION'
+ IN TYPEOF(SELF));
+END_ENTITY;
+
+
+ENTITY solid_with_hole
+ ABSTRACT SUPERTYPE OF (solid_with_stepped_round_hole)
+ SUBTYPE OF (solid_with_depression);
+END_ENTITY;
+
+
+ENTITY solid_with_incomplete_circular_pattern
+ SUBTYPE OF (solid_with_circular_pattern);
+ omitted_instances : SET [1:?] OF positive_integer;
+WHERE
+ WR1 : SIZEOF(omitted_instances) <
+ SELF\solid_with_circular_pattern.replicate_count;
+ WR2 : SIZEOF(QUERY(q <* omitted_instances | q >
+ SELF\solid_with_circular_pattern.replicate_count)) = 0;
+END_ENTITY;
+
+
+ENTITY solid_with_incomplete_rectangular_pattern
+ SUBTYPE OF (solid_with_rectangular_pattern);
+ omitted_instances : SET [1:?] OF LIST [2:2] OF positive_integer;
+WHERE
+ WR1 : NOT([1,1] IN omitted_instances);
+ WR2 : SIZEOF(omitted_instances) <
+ ((SELF\solid_with_rectangular_pattern.row_count *
+ SELF\solid_with_rectangular_pattern.column_count) - 1);
+ WR3 : SIZEOF(QUERY(q <* omitted_instances |
+ ((q[1] > SELF\solid_with_rectangular_pattern.row_count) OR
+ (q[2] > SELF\solid_with_rectangular_pattern.column_count)))) = 0;
+END_ENTITY;
+
+
+ENTITY solid_with_pocket
+ ABSTRACT SUPERTYPE OF (ONEOF (solid_with_rectangular_pocket, solid_with_circular_pocket, solid_with_general_pocket))
+ SUBTYPE OF (solid_with_depression);
+ floor_blend_radius : non_negative_length_measure;
+ draft_angle : plane_angle_measure;
+END_ENTITY;
+
+
+ENTITY solid_with_protrusion
+ ABSTRACT SUPERTYPE OF (ONEOF (solid_with_circular_protrusion, solid_with_rectangular_protrusion, solid_with_general_protrusion))
+ SUBTYPE OF (modified_solid_with_placed_configuration);
+ protrusion_height : positive_length_measure;
+ protrusion_draft_angle : plane_angle_measure;
+END_ENTITY;
+
+
+ENTITY solid_with_rectangular_pattern
+ SUPERTYPE OF (solid_with_incomplete_rectangular_pattern)
+ SUBTYPE OF (solid_with_shape_element_pattern);
+ row_count : positive_integer;
+ column_count : positive_integer;
+ row_spacing : length_measure;
+ column_spacing : length_measure;
+WHERE
+ WR1 : (row_count * column_count) > 1;
+END_ENTITY;
+
+
+ENTITY solid_with_rectangular_pocket
+ SUBTYPE OF (solid_with_pocket);
+ pocket_length : positive_length_measure;
+ pocket_width : positive_length_measure;
+ corner_radius : non_negative_length_measure;
+WHERE
+ WR1 : (corner_radius < pocket_width/2)
+ AND (corner_radius < pocket_length/2);
+END_ENTITY;
+
+
+ENTITY solid_with_rectangular_protrusion
+ SUBTYPE OF (solid_with_protrusion);
+ protrusion_length : positive_length_measure;
+ protrusion_width : positive_length_measure;
+ protrusion_corner_radius : non_negative_length_measure;
+WHERE
+ WR1 : (protrusion_corner_radius <= protrusion_width/2)
+ AND (protrusion_corner_radius <= protrusion_length/2);
+END_ENTITY;
+
+
+ENTITY solid_with_shape_element_pattern
+ ABSTRACT SUPERTYPE OF (ONEOF (solid_with_circular_pattern, solid_with_rectangular_pattern))
+ SUBTYPE OF (modified_solid_with_placed_configuration);
+ replicated_element : modified_solid_with_placed_configuration;
+END_ENTITY;
+
+
+ENTITY solid_with_single_offset_chamfer
+ SUBTYPE OF (solid_with_chamfered_edges);
+ offset_distance : positive_length_measure;
+END_ENTITY;
+
+
+ENTITY solid_with_slot
+ ABSTRACT SUPERTYPE OF ((ONEOF (solid_with_trapezoidal_section_slot, solid_with_tee_section_slot) AND ONEOF (solid_with_straight_slot, solid_with_curved_slot)))
+ SUBTYPE OF (solid_with_depression);
+ slot_width : positive_length_measure;
+ closed_ends : LIST [2:2] OF LOGICAL;
+ end_exit_faces : LIST [2:2] OF SET [0:?] OF face_surface;
+WHERE
+ WR1 : NOT(('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SOLID_WITH_THROUGH_DEPRESSION' IN
+ TYPEOF(SELF)) AND (closed_ends = [FALSE,FALSE]));
+ WR2 : NOT(((closed_ends[1] = TRUE) AND (SIZEOF(end_exit_faces[1]) <> 0))
+ OR ((closed_ends[2] = TRUE) AND (SIZEOF(end_exit_faces[2]) <> 0)));
+END_ENTITY;
+
+
+ENTITY solid_with_spherical_bottom_round_hole
+ SUBTYPE OF (solid_with_stepped_round_hole);
+ sphere_radius : positive_length_measure;
+WHERE
+ WR1 : sphere_radius >=
+ SELF\solid_with_stepped_round_hole.segment_radii[segments];
+END_ENTITY;
+
+
+ENTITY solid_with_stepped_round_hole
+ SUPERTYPE OF ((solid_with_stepped_round_hole_and_conical_transitions ANDOR ONEOF (solid_with_flat_bottom_round_hole, solid_with_conical_bottom_round_hole, solid_with_spherical_bottom_round_hole)))
+ SUBTYPE OF (solid_with_hole);
+ segments : positive_integer;
+ segment_radii : LIST [1:segments] OF positive_length_measure;
+ segment_depths : LIST [1:segments] OF positive_length_measure;
+DERIVE
+ SELF\solid_with_depression.depth : positive_length_measure := compute_total_depth(SELF);
+WHERE
+ WR1 : NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SOLID_WITH_THROUGH_DEPRESSION'
+ IN TYPEOF(SELF)) AND (SIZEOF(TYPEOF(SELF) *
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SOLID_WITH_FLAT_BOTTOM_ROUND_HOLE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SOLID_WITH_SPHERICAL_BOTTOM_ROUND_HOLE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SOLID_WITH_FLAT_BOTTOM_ROUND_HOLE'])
+ <> 0));
+END_ENTITY;
+
+
+ENTITY solid_with_stepped_round_hole_and_conical_transitions
+ SUBTYPE OF (solid_with_stepped_round_hole);
+ conical_transitions : SET [1:?] OF conical_stepped_hole_transition;
+WHERE
+ WR1 : SIZEOF (conical_transitions) <=
+ (SELF\solid_with_stepped_round_hole.segments + 1);
+ WR2 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SOLID_WITH_THROUGH_DEPRESSION'
+ IN TYPEOF(SELF)) XOR (SIZEOF(conical_transitions) <=
+ SELF\solid_with_stepped_round_hole.segments);
+ WR3 : validate_countersink_radii(SELF);
+END_ENTITY;
+
+
+ENTITY solid_with_straight_slot
+ SUBTYPE OF (solid_with_slot);
+ slot_length : positive_length_measure;
+END_ENTITY;
+
+
+ENTITY solid_with_tee_section_slot
+ SUBTYPE OF (solid_with_slot);
+ tee_section_width : positive_length_measure;
+ collar_depth : positive_length_measure;
+WHERE
+ WR1 : collar_depth < SELF\solid_with_depression.depth;
+ WR2 : tee_section_width > SELF\solid_with_slot.slot_width;
+END_ENTITY;
+
+
+ENTITY solid_with_through_depression
+ SUBTYPE OF (solid_with_depression);
+ exit_faces : SET [1:?] OF face_surface;
+WHERE
+ WR1 : SIZEOF(TYPEOF(SELF) *
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SOLID_WITH_HOLE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SOLID_WITH_POCKET',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SOLID_WITH_SLOT']) = 1;
+END_ENTITY;
+
+
+ENTITY solid_with_trapezoidal_section_slot
+ SUBTYPE OF (solid_with_slot);
+ draft_angle : plane_angle_measure;
+ floor_fillet_radius : non_negative_length_measure;
+END_ENTITY;
+
+
+ENTITY solid_with_variable_radius_edge_blend
+ SUBTYPE OF (edge_blended_solid, track_blended_solid);
+ point_list : LIST [2:?] OF point;
+ radius_list : LIST [2:?] OF positive_length_measure;
+ edge_function_list : LIST [1:?] OF blend_radius_variation_type;
+WHERE
+ WR1 : SIZEOF(point_list) = SIZEOF(radius_list);
+ WR2 : SIZEOF(edge_function_list) = SIZEOF(radius_list) - 1;
+ WR3 : NOT((point_list[1] = point_list[HIINDEX(point_list)]) AND NOT
+ (radius_list[1] = radius_list[HIINDEX(radius_list)]));
+END_ENTITY;
+
+
+ENTITY source_for_requirement
+ SUBTYPE OF (group_assignment);
+ items : SET [1:1] OF requirement_source_item;
+ SELF\group_assignment.assigned_group : requirement_source;
+END_ENTITY;
+
+
+ENTITY sourced_requirement
+ SUBTYPE OF (group_assignment);
+ items : SET [1:1] OF product_definition;
+ SELF\group_assignment.assigned_group : requirement_source;
+END_ENTITY;
+
+
+ENTITY specification_definition
+ SUBTYPE OF (product_definition);
+END_ENTITY;
+
+
+ENTITY specified_higher_usage_occurrence
+ SUBTYPE OF (assembly_component_usage);
+ upper_usage : assembly_component_usage;
+ next_usage : next_assembly_usage_occurrence;
+UNIQUE
+ UR1 : upper_usage, next_usage;
+WHERE
+ WR1 : SELF :<>: upper_usage;
+ WR2 : SELF\product_definition_relationship.relating_product_definition
+ :=: upper_usage.relating_product_definition;
+ WR3 : SELF\product_definition_relationship.related_product_definition
+ :=: next_usage.related_product_definition;
+ WR4 : (upper_usage.related_product_definition :=:
+ next_usage.relating_product_definition) OR
+ (SIZEOF (QUERY (pdr <* USEDIN (upper_usage.related_product_definition,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION_RELATIONSHIP.' +
+ 'RELATED_PRODUCT_DEFINITION') |
+ pdr.relating_product_definition :=:
+ next_usage.relating_product_definition)) = 1);
+ WR5 : SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.NEXT_ASSEMBLY_USAGE_OCCURRENCE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SPECIFIED_HIGHER_USAGE_OCCURRENCE']
+ * TYPEOF(upper_usage)) = 1;
+END_ENTITY;
+
+
+ENTITY sphere
+ SUBTYPE OF (geometric_representation_item);
+ radius : positive_length_measure;
+ centre : point;
+END_ENTITY;
+
+
+ENTITY spherical_surface
+ SUBTYPE OF (elementary_surface);
+ radius : positive_length_measure;
+END_ENTITY;
+
+
+ENTITY standard_uncertainty
+ SUPERTYPE OF (expanded_uncertainty)
+ SUBTYPE OF (uncertainty_qualifier);
+ uncertainty_value : REAL;
+END_ENTITY;
+
+
+ENTITY start_request
+ SUBTYPE OF (action_request_assignment);
+ items : SET [1:?] OF start_request_item;
+END_ENTITY;
+
+
+ENTITY start_work
+ SUBTYPE OF (action_assignment);
+ items : SET [1:?] OF work_item;
+END_ENTITY;
+
+
+ENTITY straightness_tolerance
+ SUBTYPE OF (geometric_tolerance);
+WHERE
+ WR1 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'GEOMETRIC_TOLERANCE_WITH_DATUM_REFERENCE' IN TYPEOF (SELF));
+END_ENTITY;
+
+
+ENTITY structured_dimension_callout
+ SUBTYPE OF (draughting_callout);
+WHERE
+ WR1 : SIZEOF (TYPEOF (SELF) *
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DATUM_FEATURE_CALLOUT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DATUM_TARGET_CALLOUT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRICAL_TOLERANCE_CALLOUT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LEADER_DIRECTED_CALLOUT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PROJECTION_DIRECTED_CALLOUT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DIMENSION_CURVE_DIRECTED_CALLOUT']) = 0;
+ WR2 : SIZEOF (QUERY (ato <* QUERY (con <* SELF.contents |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_OCCURRENCE'
+ IN TYPEOF (con))) |
+ NOT (ato.name IN
+ ['dimension value', 'tolerance value', 'unit text',
+ 'prefix text', 'suffix text']))) = 0;
+ WR3 : SIZEOF (QUERY (ato <* QUERY (con <* SELF.contents |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_OCCURRENCE'
+ IN TYPEOF (con))) |
+ (ato.name = 'dimension value')
+ )) >= 1;
+ WR4 : SIZEOF (QUERY (dcr <* USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_CALLOUT_RELATIONSHIP.' +
+ 'RELATING_DRAUGHTING_CALLOUT') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DIMENSION_CALLOUT_COMPONENT_RELATIONSHIP' IN TYPEOF (dcr)) AND
+ (dcr.name = 'prefix') )) <= 1;
+ WR5 : SIZEOF (QUERY (dcr <* USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_CALLOUT_RELATIONSHIP.' +
+ 'RELATING_DRAUGHTING_CALLOUT') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DIMENSION_CALLOUT_COMPONENT_RELATIONSHIP' IN TYPEOF (dcr)) AND
+ (dcr.name = 'suffix') )) <= 1;
+ WR6 : NOT((SIZEOF (QUERY (ato <* QUERY (con <* SELF.contents |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_OCCURRENCE'
+ IN TYPEOF(con)) ) |
+ (ato.name = 'prefix text')
+ )) > 0)) OR
+ (SIZEOF (QUERY (dcr <* USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_CALLOUT_RELATIONSHIP.' +
+ 'RELATING_DRAUGHTING_CALLOUT') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DIMENSION_CALLOUT_COMPONENT_RELATIONSHIP' IN TYPEOF (dcr)) AND
+ (dcr.name = 'prefix') )) = 1);
+ WR7 : NOT(SIZEOF (QUERY (ato <* QUERY (con <* SELF.contents |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_OCCURRENCE'
+ IN TYPEOF(con))) |
+ (ato.name = 'suffix text')
+ )) > 0) OR
+ (SIZEOF (QUERY (dcr <* USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_CALLOUT_RELATIONSHIP.' +
+ 'RELATING_DRAUGHTING_CALLOUT') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DIMENSION_CALLOUT_COMPONENT_RELATIONSHIP' IN TYPEOF (dcr)) AND
+ (dcr.name = 'suffix') )) = 1);
+END_ENTITY;
+
+
+ENTITY structured_text_composition
+ SUBTYPE OF (compound_representation_item);
+END_ENTITY;
+
+
+ENTITY structured_text_representation
+ SUBTYPE OF (representation);
+ SELF\representation.items : SET [1:?] OF string_representation_item_select;
+END_ENTITY;
+
+
+ENTITY styled_item
+ SUBTYPE OF (representation_item);
+ styles : SET [1:?] OF presentation_style_assignment;
+ item : representation_item;
+WHERE
+ WR1 : (SIZEOF(SELF.styles) = 1)
+ XOR
+ (SIZEOF(QUERY(pres_style <* SELF.styles |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRESENTATION_STYLE_BY_CONTEXT' IN
+ TYPEOF(pres_style))
+ )) = 0);
+END_ENTITY;
+
+
+ENTITY subedge
+ SUBTYPE OF (edge);
+ parent_edge : edge;
+END_ENTITY;
+
+
+ENTITY subface
+ SUBTYPE OF (face);
+ parent_face : face;
+WHERE
+ WR1 : NOT (mixed_loop_type_set(list_to_set(list_face_loops(SELF)) +
+ list_to_set(list_face_loops(parent_face))));
+END_ENTITY;
+
+
+ENTITY supplied_part_relationship
+ SUBTYPE OF (product_definition_relationship);
+END_ENTITY;
+
+
+ENTITY surface
+ SUPERTYPE OF (ONEOF (elementary_surface, swept_surface, bounded_surface, offset_surface, surface_replica))
+ SUBTYPE OF (geometric_representation_item);
+END_ENTITY;
+
+
+ENTITY surface_condition_callout
+ SUBTYPE OF (draughting_callout);
+WHERE
+ WR1 : SIZEOF ( QUERY ( c <* SELF.contents | SIZEOF (
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'ANNOTATION_CURVE_OCCURRENCE' ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'ANNOTATION_SYMBOL_OCCURRENCE' ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'ANNOTATION_TEXT_OCCURRENCE']* TYPEOF
+ ( c ) ) <>1 ) ) =0;
+END_ENTITY;
+
+
+ENTITY surface_curve
+ SUPERTYPE OF ((ONEOF (intersection_curve, seam_curve) ANDOR bounded_surface_curve))
+ SUBTYPE OF (curve);
+ curve_3d : curve;
+ associated_geometry : LIST [1:2] OF pcurve_or_surface;
+ master_representation : preferred_surface_curve_representation;
+DERIVE
+ basis_surface : SET [1:2] OF surface := get_basis_surface(SELF);
+WHERE
+ WR1 : curve_3d.dim = 3;
+ WR2 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE' IN TYPEOF(associated_geometry[1])) OR
+ (master_representation <> pcurve_s1);
+ WR3 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE' IN TYPEOF(associated_geometry[2])) OR
+ (master_representation <> pcurve_s2);
+ WR4 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE' IN TYPEOF(curve_3d));
+END_ENTITY;
+
+
+ENTITY surface_curve_swept_area_solid
+ SUBTYPE OF (swept_area_solid);
+ directrix : curve;
+ start_param : REAL;
+ end_param : REAL;
+ reference_surface : surface;
+WHERE
+ WR1 : (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_CURVE' IN TYPEOF(directrix))) OR
+ (reference_surface IN (directrix\surface_curve.basis_surface));
+END_ENTITY;
+
+
+ENTITY surface_of_linear_extrusion
+ SUBTYPE OF (swept_surface);
+ extrusion_axis : vector;
+END_ENTITY;
+
+
+ENTITY surface_of_revolution
+ SUBTYPE OF (swept_surface);
+ axis_position : axis1_placement;
+DERIVE
+ axis_line : line := representation_item('')||
+ geometric_representation_item()|| curve()||
+ line(axis_position.location, representation_item('')||
+ geometric_representation_item()||
+ vector(axis_position.z, 1.0));
+END_ENTITY;
+
+
+ENTITY surface_patch
+ SUBTYPE OF (founded_item);
+ parent_surface : bounded_surface;
+ u_transition : transition_code;
+ v_transition : transition_code;
+ u_sense : BOOLEAN;
+ v_sense : BOOLEAN;
+INVERSE
+ using_surfaces: BAG [1:?] OF rectangular_composite_surface FOR segments;
+WHERE
+ WR1 : (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_BOUNDED_SURFACE'
+ IN TYPEOF(parent_surface)));
+END_ENTITY;
+
+
+ENTITY surface_profile_tolerance
+ SUBTYPE OF (geometric_tolerance);
+WHERE
+ WR1 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'GEOMETRIC_TOLERANCE_WITH_DATUM_REFERENCE' IN TYPEOF (SELF)) OR ( SIZEOF (SELF\geometric_tolerance_with_datum_reference.datum_system) <= 3);
+END_ENTITY;
+
+
+ENTITY surface_rendering_properties;
+ rendered_colour : colour;
+END_ENTITY;
+
+
+ENTITY surface_replica
+ SUBTYPE OF (surface);
+ parent_surface : surface;
+ transformation : cartesian_transformation_operator_3d;
+WHERE
+ WR1 : acyclic_surface_replica(SELF, parent_surface);
+END_ENTITY;
+
+
+ENTITY surface_side_style
+ SUBTYPE OF (founded_item);
+ name : label;
+ styles : SET [1:7] OF surface_style_element_select;
+WHERE
+ WR1 : SIZEOF(QUERY( style1 <* SELF.styles |
+ SIZEOF(QUERY( style2 <* SELF.styles - style1 |
+ TYPEOF(style1) = TYPEOF(style2)
+ )) > 0
+ )) = 0;
+END_ENTITY;
+
+
+ENTITY surface_style_boundary
+ SUBTYPE OF (founded_item);
+ style_of_boundary : curve_or_render;
+END_ENTITY;
+
+
+ENTITY surface_style_control_grid
+ SUBTYPE OF (founded_item);
+ style_of_control_grid : curve_or_render;
+END_ENTITY;
+
+
+ENTITY surface_style_fill_area
+ SUBTYPE OF (founded_item);
+ fill_area : fill_area_style;
+END_ENTITY;
+
+
+ENTITY surface_style_parameter_line
+ SUBTYPE OF (founded_item);
+ style_of_parameter_lines : curve_or_render;
+ direction_counts : SET [1:2] OF direction_count_select;
+WHERE
+ WR1 : (HIINDEX(SELF.direction_counts) = 1)
+ XOR
+ (TYPEOF(SELF.direction_counts[1]) <>
+ TYPEOF(SELF.direction_counts[2]));
+END_ENTITY;
+
+
+ENTITY surface_style_reflectance_ambient;
+ ambient_reflectance : REAL;
+END_ENTITY;
+
+
+ENTITY surface_style_reflectance_ambient_diffuse
+ SUBTYPE OF (surface_style_reflectance_ambient);
+ diffuse_reflectance : REAL;
+END_ENTITY;
+
+
+ENTITY surface_style_reflectance_ambient_diffuse_specular
+ SUBTYPE OF (surface_style_reflectance_ambient_diffuse);
+ specular_reflectance : REAL;
+ specular_exponent : REAL;
+ specular_colour : colour;
+END_ENTITY;
+
+
+ENTITY surface_style_rendering;
+ rendering_method : shading_surface_method;
+ surface_colour : colour;
+END_ENTITY;
+
+
+ENTITY surface_style_rendering_with_properties
+ SUBTYPE OF (surface_style_rendering);
+ properties : SET [1:2] OF rendering_properties_select;
+WHERE
+ WR1 : (HIINDEX(SELF.properties) = 1)
+ XOR
+ (TYPEOF(SELF.properties[1]) <> TYPEOF(SELF.properties[2]));
+END_ENTITY;
+
+
+ENTITY surface_style_segmentation_curve
+ SUBTYPE OF (founded_item);
+ style_of_segmentation_curve : curve_or_render;
+END_ENTITY;
+
+
+ENTITY surface_style_silhouette
+ SUBTYPE OF (founded_item);
+ style_of_silhouette : curve_or_render;
+END_ENTITY;
+
+
+ENTITY surface_style_transparent;
+ transparency : REAL;
+WHERE
+ WR1 : {0.0 <= transparency <= 1.0};
+END_ENTITY;
+
+
+ENTITY surface_style_usage
+ SUBTYPE OF (founded_item);
+ side : surface_side;
+ style : surface_side_style_select;
+END_ENTITY;
+
+
+ENTITY surface_texture_representation
+ SUBTYPE OF (representation);
+WHERE
+ WR1 : SIZEOF ( QUERY ( i <* SELF.items | SIZEOF (
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'MEASURE_REPRESENTATION_ITEM' ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'VALUE_RANGE' , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DESCRIPTIVE_REPRESENTATION_ITEM']* TYPEOF ( i ) ) <>1 ) )
+ =0;
+ WR2 : ( SIZEOF ( QUERY ( i <* SELF.items | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) ) =1 )
+ AND ( SIZEOF ( QUERY ( i <* SELF.items | (
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'DESCRIPTIVE_REPRESENTATION_ITEM' IN
+ TYPEOF ( i ) ) AND ( i.name = 'measuring method' ) ) ) =1 );
+ WR3 : SIZEOF ( QUERY ( i <* SELF.items | SIZEOF (
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'MEASURE_REPRESENTATION_ITEM' ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'VALUE_RANGE']* TYPEOF ( i ) ) =1 ) )
+ >0;
+ WR4 : ( SIZEOF ( USEDIN ( SELF ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'REPRESENTATION_RELATIONSHIP.'+
+ 'REP_1' ) ) <=1 ) AND ( SIZEOF ( USEDIN ( SELF ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'REPRESENTATION_RELATIONSHIP.'+
+ 'REP_2' ) ) =0 ) AND ( SIZEOF ( QUERY ( rr <* USEDIN ( SELF
+ , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'REPRESENTATION_RELATIONSHIP.'+
+ 'REP_1' ) | rr. rep_2.name = 'measuring direction' ) ) =
+ SIZEOF ( USEDIN ( SELF ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'REPRESENTATION_RELATIONSHIP.'+
+ 'REP_1' ) ) );
+ WR5 : ( SIZEOF ( USEDIN ( SELF ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
+ 'USED_REPRESENTATION' ) ) =1 ) AND ( SIZEOF ( QUERY ( pdr
+ <* USEDIN ( SELF ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
+ 'USED_REPRESENTATION' ) | SIZEOF ( QUERY ( gpa <* USEDIN (
+ pdr. definition ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'GENERAL_PROPERTY_ASSOCIATION.'+
+ 'DERIVED_DEFINITION' ) | ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'GENERAL_PROPERTY' IN TYPEOF ( gpa. base_definition ) ) AND
+ ( gpa. base_definition.name ='surface_condition' ) ) ) =1 )
+ ) =1 );
+END_ENTITY;
+
+
+ENTITY surfaced_open_shell
+ SUBTYPE OF (open_shell);
+WHERE
+ WR1 : SIZEOF(QUERY(q <* SELF\connected_face_set.cfs_faces |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_SURFACE' IN TYPEOF(q)))) = 0;
+END_ENTITY;
+
+
+ENTITY swept_area_solid
+ SUPERTYPE OF (ONEOF (revolved_area_solid, extruded_area_solid, surface_curve_swept_area_solid))
+ SUBTYPE OF (solid_model);
+ swept_area : curve_bounded_surface;
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PLANE' IN TYPEOF(swept_area.basis_surface);
+END_ENTITY;
+
+
+ENTITY swept_disk_solid
+ SUBTYPE OF (solid_model);
+ directrix : curve;
+ radius : positive_length_measure;
+ inner_radius : OPTIONAL positive_length_measure;
+ start_param : REAL;
+ end_param : REAL;
+WHERE
+ WR1 : directrix.dim = 3;
+ WR2 : (NOT EXISTS(inner_radius)) OR (radius > inner_radius);
+END_ENTITY;
+
+
+ENTITY swept_face_solid
+ SUPERTYPE OF (ONEOF (extruded_face_solid, revolved_face_solid))
+ SUBTYPE OF (solid_model);
+ swept_face : face_surface;
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PLANE' IN TYPEOF(swept_face.face_geometry);
+END_ENTITY;
+
+
+ENTITY swept_surface
+ SUPERTYPE OF (ONEOF (surface_of_linear_extrusion, surface_of_revolution))
+ SUBTYPE OF (surface);
+ swept_curve : curve;
+END_ENTITY;
+
+
+ENTITY symbol
+ SUBTYPE OF (representation_item);
+END_ENTITY;
+
+
+ENTITY symbol_colour;
+ colour_of_symbol : colour;
+END_ENTITY;
+
+
+ENTITY symbol_representation
+ SUBTYPE OF (representation);
+END_ENTITY;
+
+
+ENTITY symbol_representation_map
+ SUBTYPE OF (representation_map);
+ SELF\representation_map.mapped_representation : symbol_representation;
+ SELF\representation_map.mapping_origin : axis2_placement;
+END_ENTITY;
+
+
+ENTITY symbol_style
+ SUBTYPE OF (founded_item);
+ name : label;
+ style_of_symbol : symbol_style_select;
+END_ENTITY;
+
+
+ENTITY symbol_target
+ SUBTYPE OF (geometric_representation_item);
+ placement : axis2_placement;
+ x_scale : positive_ratio_measure;
+ y_scale : positive_ratio_measure;
+END_ENTITY;
+
+
+ENTITY symmetric_shape_aspect
+ SUBTYPE OF (shape_aspect);
+INVERSE
+ basis_relationships: SET [1:?] OF shape_aspect_relationship FOR relating_shape_aspect;
+WHERE
+ WR1 : SIZEOF (QUERY (x<*SELF\symmetric_shape_aspect.basis_relationships |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CENTRE_OF_SYMMETRY' IN TYPEOF
+ (x\shape_aspect_relationship.related_shape_aspect)))>=1;
+END_ENTITY;
+
+
+ENTITY symmetry_tolerance
+ SUBTYPE OF (geometric_tolerance_with_datum_reference);
+WHERE
+ WR1 : SIZEOF (SELF\geometric_tolerance_with_datum_reference.datum_system) <= 3;
+END_ENTITY;
+
+
+ENTITY table_representation_item
+ SUBTYPE OF (compound_representation_item);
+WHERE
+ WR1 : SIZEOF(QUERY(itet <* SELF\compound_representation_item.item_element |
+ NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ROW_REPRESENTATION_ITEM' IN TYPEOF(itet))
+ )) = 0;
+END_ENTITY;
+
+
+ENTITY tactile_appearance_representation
+ SUBTYPE OF (representation);
+WHERE
+ WR1 : SIZEOF ( QUERY ( i <* SELF.items | SIZEOF (
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'MEASURE_REPRESENTATION_ITEM' ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'VALUE_RANGE']* TYPEOF ( i ) ) <>1 )) =0;
+ WR2 : SIZEOF ( QUERY ( i <* SELF.items | name ='depth' ) ) <=1;
+ WR3 : ( SIZEOF ( USEDIN ( SELF ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
+ 'USED_REPRESENTATION' ) ) =1 ) AND ( SIZEOF ( QUERY ( pdr
+ <* USEDIN ( SELF ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
+ 'USED_REPRESENTATION' ) | SIZEOF ( QUERY ( gpa <* USEDIN (
+ pdr. definition ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'GENERAL_PROPERTY_ASSOCIATION.'+
+ 'DERIVED_DEFINITION' ) | ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'GENERAL_PROPERTY' IN TYPEOF ( gpa. base_definition ) ) AND
+ ( gpa. base_definition.name ='surface_condition' ) ) ) =1 )) =1 );
+END_ENTITY;
+
+
+ENTITY tagged_text_format
+ SUBTYPE OF (representation_context);
+END_ENTITY;
+
+
+ENTITY tagged_text_item
+ SUBTYPE OF (descriptive_representation_item);
+END_ENTITY;
+
+
+ENTITY tangent
+ SUBTYPE OF (derived_shape_aspect);
+WHERE
+ WR1 : SIZEOF (SELF\derived_shape_aspect.deriving_relationships)= 1;
+END_ENTITY;
+
+
+ENTITY terminator_symbol
+ SUBTYPE OF (annotation_symbol_occurrence);
+ annotated_curve : annotation_curve_occurrence;
+END_ENTITY;
+
+
+ENTITY text_font;
+ id : identifier;
+ name : label;
+ description : text;
+INVERSE
+ glyphs: SET [1:?] OF character_glyph_font_usage FOR font;
+END_ENTITY;
+
+
+ENTITY text_font_family;
+ id : identifier;
+ name : label;
+ description : text;
+INVERSE
+ fonts: SET [1:?] OF text_font_in_family FOR family;
+END_ENTITY;
+
+
+ENTITY text_font_in_family;
+ font : text_font;
+ family : text_font_family;
+END_ENTITY;
+
+
+ENTITY text_literal
+ SUBTYPE OF (geometric_representation_item);
+ literal : presentable_text;
+ placement : axis2_placement;
+ alignment : text_alignment;
+ path : text_path;
+ font : font_select;
+END_ENTITY;
+
+
+ENTITY text_literal_with_associated_curves
+ SUBTYPE OF (text_literal);
+ associated_curves : SET [1:?] OF curve;
+END_ENTITY;
+
+
+ENTITY text_literal_with_blanking_box
+ SUBTYPE OF (text_literal);
+ blanking : planar_box;
+END_ENTITY;
+
+
+ENTITY text_literal_with_delineation
+ SUBTYPE OF (text_literal);
+ delineation : text_delineation;
+END_ENTITY;
+
+
+ENTITY text_literal_with_extent
+ SUBTYPE OF (text_literal);
+ extent : planar_extent;
+END_ENTITY;
+
+
+ENTITY text_string_representation
+ SUBTYPE OF (representation);
+ SELF\representation.items : SET [1:?] OF text_string_representation_item;
+WHERE
+ WR1 : SIZEOF (
+ QUERY (item <* SELF\representation.items |
+ NOT (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TEXT_LITERAL',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_CHARACTER',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DEFINED_CHARACTER_GLYPH',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPOSITE_TEXT'] *
+ TYPEOF (item)) = 0)
+ )) >= 1;
+ WR2 : SIZEOF (
+ QUERY (a2p <*
+ QUERY (item <* SELF\representation.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT' IN TYPEOF (item)) |
+ NOT ((SIZEOF (
+ QUERY (at <*
+ QUERY (item <* SELF\representation.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'ANNOTATION_TEXT' IN TYPEOF (item)) |
+ (at\mapped_item.mapping_target :=: a2p))) >= 1) OR
+ (SIZEOF (
+ QUERY (atc <*
+ QUERY (item <* SELF\representation.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'ANNOTATION_TEXT_CHARACTER' IN TYPEOF (item)) |
+ (atc\mapped_item.mapping_target :=: a2p))) >= 1)
+ ))) = 0;
+END_ENTITY;
+
+
+ENTITY text_style
+ SUBTYPE OF (founded_item);
+ name : label;
+ character_appearance : character_style_select;
+END_ENTITY;
+
+
+ENTITY text_style_for_defined_font;
+ text_colour : colour;
+END_ENTITY;
+
+
+ENTITY text_style_with_box_characteristics
+ SUBTYPE OF (text_style);
+ characteristics : SET [1:4] OF box_characteristic_select;
+WHERE
+ WR1 : SIZEOF( QUERY( c1 <* SELF.characteristics |
+ SIZEOF( QUERY( c2 <* SELF.characteristics - c1 |
+ TYPEOF (c1) = TYPEOF (c2)
+ )) > 0
+ )) = 0;
+END_ENTITY;
+
+
+ENTITY text_style_with_mirror
+ SUBTYPE OF (text_style);
+ mirror_placement : axis2_placement;
+END_ENTITY;
+
+
+ENTITY text_style_with_spacing
+ SUBTYPE OF (text_style);
+ character_spacing : character_spacing_select;
+END_ENTITY;
+
+
+ENTITY thermal_resistance_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.THERMAL_RESISTANCE_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY thermal_resistance_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) =
+ dimensional_exponents ( -1.0, -1.0, -3.0, 0.0, 1.0, 0.0, 0.0 );
+END_ENTITY;
+
+
+ENTITY thermodynamic_temperature_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.THERMODYNAMIC_TEMPERATURE_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY thermodynamic_temperature_unit
+ SUBTYPE OF (named_unit);
+WHERE
+ WR1 : (SELF\named_unit.dimensions.length_exponent = 0.0) AND (SELF\named_unit.dimensions.mass_exponent = 0.0) AND (SELF\named_unit.dimensions.time_exponent = 0.0) AND (SELF\named_unit.dimensions.electric_current_exponent = 0.0) AND (SELF\named_unit.dimensions.thermodynamic_temperature_exponent = 1.0) AND (SELF\named_unit.dimensions.amount_of_substance_exponent = 0.0) AND (SELF\named_unit.dimensions.luminous_intensity_exponent = 0.0);
+END_ENTITY;
+
+
+ENTITY thickened_face_solid
+ SUBTYPE OF (solid_model);
+ base_element : generalized_surface_select;
+ offset1 : length_measure;
+ offset2 : length_measure;
+WHERE
+ WR1 : NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE' IN TYPEOF(base_element)) AND
+ (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.BOUNDED_SURFACE' IN TYPEOF(base_element))));
+ WR2 : offset1 <> offset2;
+END_ENTITY;
+
+
+ENTITY thickness_laminate_definition
+ SUBTYPE OF (product_definition);
+WHERE
+ WR1 : SIZEOF (QUERY (pdr <* USEDIN (SELF,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRODUCT_DEFINITION_RELATIONSHIP.' +
+ 'RELATING_PRODUCT_DEFINITION') |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'NEXT_ASSEMBLY_USAGE_OCCURRENCE' IN
+ TYPEOF (pdr))) = 1;
+END_ENTITY;
+
+
+ENTITY thickness_laminate_table
+ SUBTYPE OF (zone_structural_makeup);
+END_ENTITY;
+
+
+ENTITY time_interval;
+ id : identifier;
+ name : label;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY time_interval_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_time_interval : time_interval;
+ role : time_interval_role;
+END_ENTITY;
+
+
+ENTITY time_interval_based_effectivity
+ SUBTYPE OF (effectivity);
+ effectivity_period : time_interval;
+END_ENTITY;
+
+
+ENTITY time_interval_relationship;
+ name : label;
+ description : OPTIONAL text;
+ relating_time_interval : time_interval;
+ related_time_interval : time_interval;
+END_ENTITY;
+
+
+ENTITY time_interval_role;
+ name : label;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY time_interval_with_bounds
+ SUBTYPE OF (time_interval);
+ primary_bound : OPTIONAL date_time_or_event_occurrence;
+ secondary_bound : OPTIONAL date_time_or_event_occurrence;
+ duration : OPTIONAL time_measure_with_unit;
+WHERE
+ WR1 : NOT (EXISTS(secondary_bound) AND EXISTS(duration));
+ WR2 : EXISTS(primary_bound) OR EXISTS(secondary_bound);
+END_ENTITY;
+
+
+ENTITY time_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TIME_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY time_unit
+ SUBTYPE OF (named_unit);
+WHERE
+ WR1 : (SELF\named_unit.dimensions.length_exponent = 0.0) AND (SELF\named_unit.dimensions.mass_exponent = 0.0) AND (SELF\named_unit.dimensions.time_exponent = 1.0) AND (SELF\named_unit.dimensions.electric_current_exponent = 0.0) AND (SELF\named_unit.dimensions.thermodynamic_temperature_exponent = 0.0) AND (SELF\named_unit.dimensions.amount_of_substance_exponent = 0.0) AND (SELF\named_unit.dimensions.luminous_intensity_exponent = 0.0);
+END_ENTITY;
+
+
+ENTITY tolerance_value;
+ lower_bound : measure_with_unit;
+ upper_bound : measure_with_unit;
+DERIVE
+ lbvc : REAL := lower_bound\measure_with_unit.value_component;
+ ubvc : REAL := upper_bound\measure_with_unit.value_component;
+WHERE
+ WR1 : ubvc > lbvc;
+ WR2 : upper_bound\measure_with_unit.unit_component =
+ lower_bound\measure_with_unit.unit_component;
+END_ENTITY;
+
+
+ENTITY tolerance_zone
+ SUBTYPE OF (shape_aspect);
+ defining_tolerance : SET [1:?] OF geometric_tolerance;
+ form : tolerance_zone_form;
+END_ENTITY;
+
+
+ENTITY tolerance_zone_definition
+ SUPERTYPE OF (ONEOF (projected_zone_definition, runout_zone_definition));
+ zone : tolerance_zone;
+ boundaries : SET [1:?] OF shape_aspect;
+END_ENTITY;
+
+
+ENTITY tolerance_zone_form;
+ name : label;
+END_ENTITY;
+
+
+ENTITY topological_representation_item
+ SUPERTYPE OF (ONEOF (vertex, edge, face_bound, face, vertex_shell, wire_shell, connected_edge_set, connected_face_set, (loop ANDOR path)))
+ SUBTYPE OF (representation_item);
+END_ENTITY;
+
+
+ENTITY toroidal_surface
+ SUBTYPE OF (elementary_surface);
+ major_radius : positive_length_measure;
+ minor_radius : positive_length_measure;
+END_ENTITY;
+
+
+ENTITY torus
+ SUBTYPE OF (geometric_representation_item);
+ position : axis1_placement;
+ major_radius : positive_length_measure;
+ minor_radius : positive_length_measure;
+WHERE
+ WR1 : major_radius > minor_radius;
+END_ENTITY;
+
+
+ENTITY total_runout_tolerance
+ SUBTYPE OF (geometric_tolerance_with_datum_reference);
+WHERE
+ WR1 : SIZEOF (SELF\geometric_tolerance_with_datum_reference.datum_system) <= 2;
+END_ENTITY;
+
+
+ENTITY track_blended_solid
+ ABSTRACT SUPERTYPE OF (track_blended_solid_with_end_conditions)
+ SUBTYPE OF (edge_blended_solid);
+WHERE
+ WR1 : check_continuous_edges(SELF\edge_blended_solid.blended_edges);
+END_ENTITY;
+
+
+ENTITY track_blended_solid_with_end_conditions
+ SUBTYPE OF (track_blended_solid);
+ end_conditions : LIST [2:2] OF blend_end_condition_select;
+WHERE
+ WR1 : SIZEOF(TYPEOF(SELF) *
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SOLID_WITH_CONSTANT_RADIUS_EDGE_BLEND',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SOLID_WITH_VARIABLE_RADIUS_EDGE_BLEND',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SOLID_WITH_CHAMFERED_EDGES']) = 1;
+ WR2 : NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX' IN TYPEOF(end_conditions[1]))
+ AND ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX' IN TYPEOF(end_conditions[2])));
+ WR3 : NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX' IN TYPEOF(end_conditions[1]))
+ AND (NOT ((end_conditions[1]
+ :=: SELF\edge_blended_solid.blended_edges[1].edge_start)
+ XOR (end_conditions[1]
+ :=: SELF\edge_blended_solid.blended_edges[1].edge_end))));
+ WR4 : NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX' IN TYPEOF(end_conditions[2]))
+ AND (NOT ((end_conditions[2]
+ :=: SELF\edge_blended_solid.blended_edges[HIINDEX(
+ SELF\edge_blended_solid.blended_edges)].edge_start)
+ XOR (end_conditions[2]
+ :=: SELF\edge_blended_solid.blended_edges[HIINDEX(
+ SELF\edge_blended_solid.blended_edges)].edge_end))));
+END_ENTITY;
+
+
+ENTITY transformation_with_derived_angle
+ SUPERTYPE OF (ONEOF (draped_defined_transformation, laid_defined_transformation))
+ SUBTYPE OF (item_defined_transformation);
+ SELF\item_defined_transformation.transform_item_1 : angle_direction_reference_with_a2p3d_select;
+ SELF\item_defined_transformation.transform_item_2 : axis2_placement_3d;
+DERIVE
+ orientation_angle : plane_angle_measure := derive_angle (
+ SELF\item_defined_transformation.transform_item_1,
+ SELF\item_defined_transformation.transform_item_2);
+WHERE
+ WR1 : (SELF\item_defined_transformation.transform_item_1\
+ axis2_placement_3d.p[3].direction_ratios[1] =
+ SELF\item_defined_transformation.transform_item_2\
+ axis2_placement_3d.p[3].direction_ratios[1])
+ AND
+ (SELF\item_defined_transformation.transform_item_1\
+ axis2_placement_3d.p[3].direction_ratios[2] =
+ SELF\item_defined_transformation.transform_item_2\
+ axis2_placement_3d.p[3].direction_ratios[2])
+ AND
+ (SELF\item_defined_transformation.transform_item_1\
+ axis2_placement_3d.p[3].direction_ratios[3] =
+ SELF\item_defined_transformation.transform_item_2\
+ axis2_placement_3d.p[3].direction_ratios[3]);
+END_ENTITY;
+
+
+ENTITY trimmed_curve
+ SUBTYPE OF (bounded_curve);
+ basis_curve : curve;
+ trim_1 : SET [1:2] OF trimming_select;
+ trim_2 : SET [1:2] OF trimming_select;
+ sense_agreement : BOOLEAN;
+ master_representation : trimming_preference;
+WHERE
+ WR1 : (HIINDEX(trim_1) = 1) OR (TYPEOF(trim_1[1]) <> TYPEOF(trim_1[2]));
+ WR2 : (HIINDEX(trim_2) = 1) OR (TYPEOF(trim_2[1]) <> TYPEOF(trim_2[2]));
+END_ENTITY;
+
+
+ENTITY two_direction_repeat_factor
+ SUBTYPE OF (one_direction_repeat_factor);
+ second_repeat_factor : vector;
+END_ENTITY;
+
+
+ENTITY type_qualifier;
+ name : label;
+END_ENTITY;
+
+
+ENTITY unary_generic_expression
+ ABSTRACT SUPERTYPE
+ SUBTYPE OF (generic_expression);
+ operand : generic_expression;
+END_ENTITY;
+
+
+ENTITY unary_numeric_expression
+ ABSTRACT SUPERTYPE
+ SUBTYPE OF (numeric_expression, unary_generic_expression);
+ SELF\unary_generic_expression.operand : numeric_expression;
+END_ENTITY;
+
+
+ENTITY uncertainty_assigned_representation
+ SUBTYPE OF (representation);
+ uncertainty : SET [1:?] OF uncertainty_measure_with_unit;
+END_ENTITY;
+
+
+ENTITY uncertainty_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+ name : label;
+ description : OPTIONAL text;
+WHERE
+ WR1 : valid_measure_value (SELF\measure_with_unit.value_component);
+END_ENTITY;
+
+
+ENTITY uncertainty_qualifier
+ SUPERTYPE OF (ONEOF (standard_uncertainty, qualitative_uncertainty));
+ measure_name : label;
+ description : text;
+END_ENTITY;
+
+
+ENTITY uniform_curve
+ SUBTYPE OF (b_spline_curve);
+END_ENTITY;
+
+
+ENTITY uniform_resource_identifier
+ SUBTYPE OF (descriptive_representation_item);
+END_ENTITY;
+
+
+ENTITY uniform_surface
+ SUBTYPE OF (b_spline_surface);
+END_ENTITY;
+
+
+ENTITY usage_association
+ SUBTYPE OF (action_method_relationship);
+ SELF\action_method_relationship.related_method : information_usage_right;
+ SELF\action_method_relationship.relating_method : information_usage_right;
+DERIVE
+ related : information_usage_right := SELF\action_method_relationship.related_method;
+ relating : information_usage_right := SELF\action_method_relationship.relating_method;
+END_ENTITY;
+
+
+ENTITY user_defined_curve_font
+ SUBTYPE OF (curve_style_font, mapped_item);
+END_ENTITY;
+
+
+ENTITY user_defined_marker
+ SUBTYPE OF (mapped_item, pre_defined_marker);
+END_ENTITY;
+
+
+ENTITY user_defined_terminator_symbol
+ SUBTYPE OF (mapped_item, pre_defined_symbol);
+END_ENTITY;
+
+
+ENTITY user_selected_elements
+ SUBTYPE OF (representation_item);
+ picked_items : SET [1:?] OF representation_item;
+END_ENTITY;
+
+
+ENTITY user_selected_shape_elements
+ SUBTYPE OF (user_selected_elements);
+WHERE
+ WR1 : SIZEOF(QUERY(q <*
+ SELF\user_selected_elements.picked_items | NOT
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHAPE_REPRESENTATION_ITEM'
+ IN TYPEOF(q)))) = 0;
+END_ENTITY;
+
+
+ENTITY value_range
+ SUBTYPE OF (compound_representation_item);
+WHERE
+ WR1 : ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'SET_REPRESENTATION_ITEM' IN TYPEOF ( item_element ) ) AND value_range_wr1 ( item_element );
+ WR2 : value_range_wr2 ( item_element );
+ WR3 : value_range_wr3 ( item_element );
+END_ENTITY;
+
+
+ENTITY value_representation_item
+ SUBTYPE OF (representation_item);
+ value_component : measure_value;
+WHERE
+ WR1 : SIZEOF (QUERY (rep <* using_representations (SELF) |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GLOBAL_UNIT_ASSIGNED_CONTEXT'
+ IN TYPEOF (rep.context_of_items)
+ ))) = 0;
+END_ENTITY;
+
+
+ENTITY variable_semantics
+ ABSTRACT SUPERTYPE;
+END_ENTITY;
+
+
+ENTITY variational_representation_item
+ ABSTRACT SUPERTYPE OF (auxiliary_geometric_representation_item)
+ SUBTYPE OF (representation_item);
+WHERE
+ WR1 : SIZEOF(QUERY(q <* using_representations(SELF) |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VARIATIONAL_REPRESENTATION'
+ IN TYPEOF(q)))) = 0;
+ WR2 : SIZEOF(QUERY(q <* using_representations(SELF) |
+ NOT (SELF IN q.items))) = 0;
+END_ENTITY;
+
+
+ENTITY vector
+ SUBTYPE OF (geometric_representation_item);
+ orientation : direction;
+ magnitude : length_measure;
+WHERE
+ WR1 : magnitude >= 0.0;
+END_ENTITY;
+
+
+ENTITY vector_style
+ SUBTYPE OF (curve_style, pre_defined_terminator_symbol);
+END_ENTITY;
+
+
+ENTITY velocity_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VELOCITY_UNIT' IN TYPEOF (SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY velocity_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) =
+ dimensional_exponents ( 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0 );
+END_ENTITY;
+
+
+ENTITY versioned_action_request;
+ id : identifier;
+ version : label;
+ purpose : text;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY vertex
+ SUBTYPE OF (topological_representation_item);
+END_ENTITY;
+
+
+ENTITY vertex_loop
+ SUBTYPE OF (loop);
+ loop_vertex : vertex;
+END_ENTITY;
+
+
+ENTITY vertex_point
+ SUBTYPE OF (vertex, geometric_representation_item);
+ vertex_geometry : point;
+END_ENTITY;
+
+
+ENTITY vertex_shell
+ SUBTYPE OF (topological_representation_item);
+ vertex_shell_extent : vertex_loop;
+END_ENTITY;
+
+
+ENTITY view_volume
+ SUBTYPE OF (founded_item);
+ projection_type : central_or_parallel;
+ projection_point : cartesian_point;
+ view_plane_distance : length_measure;
+ front_plane_distance : length_measure;
+ front_plane_clipping : BOOLEAN;
+ back_plane_distance : length_measure;
+ back_plane_clipping : BOOLEAN;
+ view_volume_sides_clipping : BOOLEAN;
+ view_window : planar_box;
+END_ENTITY;
+
+
+ENTITY visual_appearance_representation
+ SUBTYPE OF (representation);
+WHERE
+ WR1 : ( {3<= SIZEOF ( SELF.items ) <=9} ) AND ( SIZEOF ( QUERY (
+ i <* items | ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) AND (
+ i.name IN [ 'colour id' , 'colour name' , 'lustre' , 'pattern' , 'transparency', 'orientation'] ) )
+ ) + SIZEOF ( QUERY ( i <* items | ( SIZEOF (
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'MEASURE_REPRESENTATION_ITEM' ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'VALUE_RANGE']* TYPEOF ( i ) ) =1 )
+ AND ( i.name IN ['refraction index' , 'opacity'] ) )
+ ) + SIZEOF ( QUERY ( i <* items | (
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'DOCUMENT_FILE' IN TYPEOF ( i ) )
+ AND ( i.name IN [ 'texture map' ] ) ) )
+ = SIZEOF ( SELF.items ) );
+ WR2 : SIZEOF ( QUERY ( i <* SELF.items | i.name = 'colour id' )) =1;
+ WR3 : SIZEOF ( QUERY ( i <* SELF.items | i.name ='lustre' ) )=1;
+ WR4 : SIZEOF ( QUERY ( i <* SELF.items | i.name = 'colour name') ) <=1;
+ WR5 : SIZEOF ( QUERY ( i <* SELF.items | i.name ='pattern' ) )<=1;
+ WR6 : SIZEOF ( QUERY ( i <* SELF.items | i.name ='transparency') ) <=1;
+ WR7 : SIZEOF ( QUERY ( i <* SELF.items | i.name = 'texture map') ) <=1;
+ WR8 : SIZEOF ( QUERY ( i <* SELF.items | i.name ='refraction index' ) )<=1;
+ WR9 : SIZEOF ( QUERY ( i <* SELF.items | i.name ='opacity') ) <=1;
+ WR10 : SIZEOF ( QUERY ( i <* SELF.items | i.name ='orientation') ) <=1;
+ WR11 : ( SIZEOF ( USEDIN ( SELF ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
+ 'USED_REPRESENTATION' ) ) =1 ) AND ( SIZEOF ( QUERY ( pdr
+ <* USEDIN ( SELF ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
+ 'USED_REPRESENTATION' ) | SIZEOF ( QUERY ( gpa <* USEDIN (
+ pdr. definition ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'GENERAL_PROPERTY_ASSOCIATION.'+
+ 'DERIVED_DEFINITION' ) | ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'GENERAL_PROPERTY' IN TYPEOF ( gpa. base_definition ) ) AND
+ ( gpa. base_definition.name ='surface_condition' ) ) ) =1 )) =1 );
+END_ENTITY;
+
+
+ENTITY volume_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VOLUME_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY volume_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) =
+ dimensional_exponents ( 3.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 );
+END_ENTITY;
+
+
+ENTITY week_of_year_and_day_date
+ SUBTYPE OF (date);
+ week_component : week_in_year_number;
+ day_component : OPTIONAL day_in_week_number;
+END_ENTITY;
+
+
+ENTITY wire_shell
+ SUBTYPE OF (topological_representation_item);
+ wire_shell_extent : SET [1:?] OF loop;
+WHERE
+ WR1 : NOT mixed_loop_type_set(wire_shell_extent);
+END_ENTITY;
+
+
+ENTITY year_month
+ SUBTYPE OF (date);
+ month_component : month_in_year_number;
+END_ENTITY;
+
+
+ENTITY zone_structural_makeup
+ SUPERTYPE OF (ONEOF ((smeared_material_definition AND thickness_laminate_table), (smeared_material_definition AND percentage_laminate_table), thickness_laminate_table, percentage_laminate_table, smeared_material_definition))
+ SUBTYPE OF (laminate_table);
+END_ENTITY;
+
+
+RULE alternative_solution_requires_solution_definition FOR (product_definition_formation);
+ LOCAL
+ solution_versions: SET OF product_definition_formation := [];
+ END_LOCAL;
+ solution_versions := QUERY( pdf <* product_definition_formation |
+ SIZEOF( QUERY( prpc <* USEDIN(pdf.of_product, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF' + '.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS') |
+ prpc.name = 'alternative solution')) = 1);
+WHERE
+ WR1 : SIZEOF( QUERY( pdf <* solution_versions |
+ SIZEOF( QUERY( pd <* USEDIN(pdf, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF' + '.PRODUCT_DEFINITION.FORMATION') |
+ pd.frame_of_reference.name = 'alternative definition')) <> 1))= 0;
+END_RULE;
+
+RULE application_protocol_definition_required FOR (application_context);
+
+WHERE
+ WR1 : SIZEOF( QUERY( ac <* application_context |
+ (SIZEOF (QUERY (apd <* USEDIN(ac,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.APPLICATION_PROTOCOL_DEFINITION.APPLICATION') |
+ apd.application_interpreted_model_schema_name = 'ap203_configuration_controlled_3d_design_of_mechanical_parts_and_assemblies'
+ )) > 0)
+ )) > 0;
+END_RULE;
+
+RULE breakdown_element_requires_product_definition FOR (product_definition_formation);
+
+WHERE
+ WR1 : SIZEOF ( QUERY ( pdf <* product_definition_formation |
+ ( SIZEOF ( QUERY ( prpc <* USEDIN ( pdf.of_product ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS' ) |
+ prpc.name = 'functionality' ) ) = 1 ) AND
+ ( SIZEOF ( QUERY ( pd <* USEDIN ( pdf ,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION.FORMATION') |
+ pd.frame_of_reference.name = 'functional definition' ) ) <1 ) ) ) = 0;
+ WR2 : SIZEOF ( QUERY ( pdf <* product_definition_formation |
+ ( SIZEOF ( QUERY ( prpc <* USEDIN ( pdf.of_product ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS' ) |
+ prpc.name = 'conceptual design' ) ) = 1 ) AND
+ ( SIZEOF (QUERY ( pd <* USEDIN ( pdf , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION.FORMATION' ) |
+ pd.frame_of_reference.name = 'conceptual definition' ) ) <1) ) ) = 0;
+END_RULE;
+
+RULE compatible_dimension FOR (cartesian_point, direction, representation_context, geometric_representation_context);
+
+WHERE
+ WR1 : SIZEOF(QUERY(x <* cartesian_point| SIZEOF(QUERY
+ (y <* geometric_representation_context | item_in_context(x,y) AND
+ (HIINDEX(x.coordinates) <> y.coordinate_space_dimension))) > 0 )) =0;
+ WR2 : SIZEOF(QUERY(x <* direction | SIZEOF( QUERY
+ (y <* geometric_representation_context | item_in_context(x,y) AND
+ (HIINDEX(x.direction_ratios) <> y.coordinate_space_dimension)))
+ > 0 )) = 0;
+END_RULE;
+
+RULE component_class_for_assembly_select FOR (composite_assembly_sequence_definition, next_assembly_usage_occurrence, product_related_product_category);
+ LOCAL
+ i,j,k : INTEGER :=0;
+ dkuhr : LOGICAL :=TRUE;
+ nnauo : INTEGER :=0;
+ nprpc : INTEGER :=0;
+ rp : product;
+ END_LOCAL;
+ REPEAT i:= LOINDEX (composite_assembly_sequence_definition) TO
+ HIINDEX (composite_assembly_sequence_definition);
+ nnauo := 0;
+ REPEAT j:= LOINDEX (next_assembly_usage_occurrence) TO
+ HIINDEX (next_assembly_usage_occurrence);
+ IF (composite_assembly_sequence_definition[i] =
+ next_assembly_usage_occurrence[j].relating_product_definition) THEN
+ rp := next_assembly_usage_occurrence[j].related_product_definition.
+ formation.of_product;
+ nprpc := 0;
+ REPEAT k:= LOINDEX (product_related_product_category) TO
+ HIINDEX (product_related_product_category);
+ IF ((rp IN product_related_product_category[k].products) AND
+ (product_related_product_category[k].name IN ['ply',
+ 'ply laminate', 'filament laminate', 'processed core',
+ 'composite assembly'])) THEN
+ nprpc := nprpc + 1;
+ END_IF;
+ END_REPEAT;
+ IF (nprpc = 1) THEN
+ nnauo := nnauo + 1;
+ ELSE
+ dkuhr := FALSE;
+ ESCAPE;
+ END_IF;
+ END_IF;
+ END_REPEAT;
+ IF (dkuhr = FALSE) THEN
+ ESCAPE;
+ END_IF;
+ IF(nnauo = 0) THEN
+ dkuhr := FALSE;
+ ESCAPE;
+ END_IF;
+ END_REPEAT;
+WHERE
+ WR1 : dkuhr;
+END_RULE;
+
+RULE consistent_uncertainty FOR (global_uncertainty_assigned_context, qualified_representation_item, uncertainty_assigned_representation);
+
+WHERE
+ WR1 : SIZEOF ( QUERY ( guac <* global_uncertainty_assigned_context |
+ SIZEOF ( QUERY ( u1 <* guac.uncertainty |
+ SIZEOF ( QUERY ( u2 <* guac.uncertainty | u2.name = u1.name ) ) >1 ) ) >0 ) ) = 0;
+ WR2 : SIZEOF ( QUERY ( uar <* uncertainty_assigned_representation |
+ SIZEOF ( QUERY ( u1<* uar.uncertainty |
+ SIZEOF ( QUERY ( u2 <* uar.uncertainty | u2.name = u1.name ) ) >1 ) ) >0 ) ) = 0;
+ WR3 : SIZEOF ( QUERY ( qri <* qualified_representation_item |
+ SIZEOF ( QUERY ( u1 <* qri.qualifiers |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF' + '.UNCERTAINTY_QUALIFIER' IN TYPEOF ( u1 ) ) AND
+ ( SIZEOF ( QUERY ( u2 <* qri.qualifiers |
+ ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF' + '.UNCERTAINTY_QUALIFIER' IN TYPEOF ( u2 ) ) AND
+ ( u2\uncertainty_qualifier.measure_name = u1\uncertainty_qualifier.measure_name ) )
+ ) >1 ) ) ) >0 ) ) = 0;
+END_RULE;
+
+RULE constraint_definition_requires_constraint_category FOR (product_definition);
+ LOCAL
+ constraint_definitions: SET OF product_definition := [];
+ END_LOCAL;
+ constraint_definitions := QUERY( pd <* product_definition |
+ (pd.frame_of_reference.name = 'design constraint definition'));
+WHERE
+ WR1 : SIZEOF ( QUERY ( pd <* constraint_definitions |
+ ( SIZEOF ( QUERY ( prpc <* USEDIN ( pd.formation.of_product ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS' ) |
+ prpc. name ='requirement' ) ) =0 ) ) ) =0;
+END_RULE;
+
+RULE design_constraint_requires_product_definition FOR (product_definition_formation);
+
+WHERE
+ WR1 : SIZEOF ( QUERY ( pdf <* product_definition_formation | (
+ SIZEOF ( QUERY ( prpc <* USEDIN ( pdf.of_product ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS' ) |
+ prpc.name = 'requirement' ) ) >0 ) AND
+ ( SIZEOF ( QUERY ( pd <* USEDIN ( pdf , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION.FORMATION') |
+ pd.frame_of_reference.name = 'design constraint definition' ) ) <1 ) ) ) = 0;
+END_RULE;
+
+RULE draughting_model_items_constraint FOR (draughting_model);
+
+WHERE
+ WR1 : SIZEOF(QUERY(dm <* draughting_model |
+ NOT(SIZEOF(QUERY(it1 <* dm\representation.items |
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_OCCURRENCE' IN TYPEOF(it1))
+ AND
+ NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'DRAUGHTING_ANNOTATION_OCCURRENCE' IN TYPEOF(it1)))
+ )) = 0)
+ )) = 0;
+ WR2 : SIZEOF(QUERY(dm <* draughting_model |
+ NOT(SIZEOF(QUERY(it1 <* dm\representation.items |
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DRAUGHTING_CALLOUT' IN TYPEOF(it1))
+ AND
+ NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DRAUGHTING_ELEMENTS' IN TYPEOF(it1)))
+ )) = 0)
+ )) = 0;
+END_RULE;
+
+RULE external_version_assignments_are_valid FOR (applied_external_identification_assignment);
+
+WHERE
+ WR1 : SIZEOF(QUERY(aia <* applied_external_identification_assignment |
+ NOT external_version_assignment_is_valid(aia)))=0;
+END_RULE;
+
+RULE material_for_coating_layer FOR (shape_aspect);
+ LOCAL
+ coating_layers: SET OF shape_aspect := [];
+ END_LOCAL;
+ coating_layers:= QUERY( r <* shape_aspect |
+ (r.name = 'coating layer') );
+WHERE
+ WR1 : SIZEOF( QUERY( r <* coating_layers |
+ SIZEOF(USEDIN(r , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MATERIAL_DESIGNATION.DEFINITIONS'))<>1
+ )) = 0;
+END_RULE;
+
+RULE plib_property_reference_requires_name_scope FOR (externally_defined_general_property);
+ LOCAL
+ known_sourced_properties : SET OF externally_defined_general_property;
+ END_LOCAL;
+ known_sourced_properties := QUERY( edc <* externally_defined_general_property |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'KNOWN_SOURCE' IN TYPEOF(edc.source) );
+WHERE
+ WR1 : SIZEOF ( QUERY ( edgp <* known_sourced_properties |
+ ( SIZEOF ( QUERY ( edir <* USEDIN ( edgp, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'EXTERNALLY_DEFINED_ITEM_RELATIONSHIP.RELATING_ITEM' )|
+ ( edir.name = 'name scope' ) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'EXTERNALLY_DEFINED_CLASS' IN TYPEOF ( edir.related_item ) ) AND
+ ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'KNOWN_SOURCE' IN TYPEOF ( edir.related_item.source ) ) ) ) <>1 ) ) ) = 0;
+END_RULE;
+
+RULE plib_property_reference_requires_version FOR (externally_defined_general_property);
+ LOCAL
+ plib_properties : SET OF externally_defined_general_property := [];
+ END_LOCAL;
+ plib_properties := QUERY ( edgp <* externally_defined_general_property |
+ ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'KNOWN_SOURCE' IN TYPEOF ( edgp.source ) ) AND
+ ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'KNOWN_SOURCE' + '.NAME' = 'ISO 13584 library' ) );
+WHERE
+ WR1 : SIZEOF( QUERY( edgp <* plib_properties |
+ (SIZEOF( QUERY( edir <* USEDIN(edgp, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'APPLIED_EXTERNAL_IDENTIFICATION_ASSIGNMENT.ITEMS') |
+ (edir.role.name = 'version') )) <> 1) )) = 0;
+END_RULE;
+
+RULE ply_reference FOR (ply_laminate_sequence_definition, next_assembly_usage_occurrence, product_related_product_category);
+ LOCAL
+ i,j,k : INTEGER;
+ dkuhr : LOGICAL := TRUE;
+ nnauo : INTEGER;
+ nprpc : INTEGER := 0;
+ rp : product;
+ END_LOCAL;
+ REPEAT i:= LOINDEX (ply_laminate_sequence_definition) TO
+ HIINDEX (ply_laminate_sequence_definition);
+ nnauo := 0;
+ REPEAT j:= LOINDEX (next_assembly_usage_occurrence) TO
+ HIINDEX (next_assembly_usage_occurrence);
+ IF (ply_laminate_sequence_definition[i] =
+ next_assembly_usage_occurrence[j].relating_product_definition) THEN
+ rp := next_assembly_usage_occurrence[j].related_product_definition.
+ formation.of_product;
+ nprpc := 0;
+ REPEAT k:= LOINDEX (product_related_product_category) TO
+ HIINDEX (product_related_product_category);
+ IF ((product_related_product_category[k].name = 'ply') AND
+ (rp IN product_related_product_category[k].products)) THEN
+ nprpc := nprpc + 1;
+ END_IF;
+ END_REPEAT;
+ IF (nprpc = 1) THEN
+ nnauo := nnauo + 1;
+ ELSE
+ dkuhr := FALSE;
+ ESCAPE;
+ END_IF;
+ END_IF;
+ END_REPEAT;
+ IF (dkuhr = FALSE) THEN
+ ESCAPE;
+ END_IF;
+ IF(nnauo = 0) THEN
+ dkuhr := FALSE;
+ ESCAPE;
+ END_IF;
+ END_REPEAT;
+WHERE
+ WR1 : dkuhr;
+END_RULE;
+
+RULE ply_stock_material_select FOR (product_related_product_category, make_from_usage_option);
+ LOCAL
+ i,j,k,kp : INTEGER;
+ dkuhr : LOGICAL;
+ nmfuo : INTEGER;
+ nprpc : INTEGER := 0;
+ rp : product;
+ END_LOCAL;
+
+ dkuhr := TRUE;
+ REPEAT kp:= LOINDEX (product_related_product_category) TO
+ HIINDEX (product_related_product_category);
+
+ IF (product_related_product_category[kp].name = 'ply') THEN
+ REPEAT i:= LOINDEX (product_related_product_category[kp].products) TO
+ HIINDEX (product_related_product_category[kp].products);
+
+ nmfuo := 0;
+ REPEAT j:= LOINDEX (make_from_usage_option) TO
+ HIINDEX (make_from_usage_option);
+
+ rp := make_from_usage_option[j].related_product_definition.
+ formation.of_product;
+
+ IF (product_related_product_category[kp].products[i] = rp) THEN
+
+ REPEAT k:= LOINDEX (product_related_product_category) TO
+ HIINDEX (product_related_product_category);
+
+ IF ((rp IN product_related_product_category[k].products) AND
+ (product_related_product_category[k].name IN
+ ['isotropic material', 'filament assembly',
+ 'discontinuous fiber assembly'])) THEN
+ nprpc := nprpc + 1;
+ END_IF;
+
+ END_REPEAT;
+
+ IF (nprpc = 1) THEN
+ nmfuo := nmfuo + 1;
+ ELSE
+ dkuhr := FALSE;
+ ESCAPE;
+ END_IF;
+
+ END_IF;
+
+ END_REPEAT;
+
+ IF (dkuhr = FALSE) THEN
+ ESCAPE;
+ END_IF;
+ IF(nmfuo <> 1) THEN
+ dkuhr := FALSE;
+ ESCAPE;
+ END_IF;
+
+ END_REPEAT;
+ END_IF;
+
+ END_REPEAT;
+WHERE
+ WR1 : dkuhr;
+END_RULE;
+
+RULE product_concept_feature_requires_category FOR (product_concept_feature);
+
+WHERE
+ WR1 : SIZEOF ( QUERY ( pcf <* product_concept_feature |
+(SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'INCLUSION_PRODUCT_CONCEPT_FEATURE',
+'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'CONDITIONAL_CONCEPT_FEATURE'] * TYPEOF(pcf)) = 0) AND
+(SIZEOF ( QUERY ( aga <* USEDIN ( pcf , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'APPLIED_GROUP_ASSIGNMENT.' + 'ITEMS' ) |
+( aga.role.name = 'specification category member' ) AND
+('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'PRODUCT_CONCEPT_FEATURE_CATEGORY' IN TYPEOF ( aga.assigned_group )))) <>1 ) ) ) = 0;
+END_RULE;
+
+RULE product_definition_replacement_requires_effectivity_assignment FOR (product_definition_relationship);
+
+WHERE
+ WR1 : SIZEOF( QUERY( pdr <* product_definition_relationship |
+ (pdr.name = 'definition replacement') AND
+ (SIZEOF( USEDIN(pdr,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.APPLIED_EFFECTIVITY_ASSIGNMENT.ITEMS') ) = 0) ))
+ = 0;
+END_RULE;
+
+RULE restrict_alternative_definition FOR (product_definition);
+ LOCAL
+ solution_definitions: SET OF product_definition := [];
+ END_LOCAL;
+ solution_definitions := QUERY( pd <* product_definition |
+ (pd.frame_of_reference.name = 'alternative definition'));
+WHERE
+ WR1 : SIZEOF ( QUERY ( pd <* solution_definitions |
+ ( SIZEOF ( QUERY ( pdr <* USEDIN ( pd ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF' + '.PRODUCT_DEFINITION_RELATIONSHIP.RELATED_PRODUCT_DEFINITION' ) |
+ pdr.name = 'solution alternative definition' ) ) <>1 ) ) ) = 0;
+ WR2 : SIZEOF ( QUERY ( pd <* solution_definitions |
+ NOT ( pd.name IN ['technical' , 'supplier' , 'technical supplier' , ''] ) ) ) = 0;
+ WR3 : SIZEOF ( QUERY ( pd <* solution_definitions |
+ ( pd.name IN ['supplier' , 'technical supplier'] ) AND (
+ SIZEOF ( QUERY ( aoa <* USEDIN ( pd.formation ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF' + '.APPLIED_ORGANIZATION_ASSIGNMENT.ITEMS' ) |
+ aoa.role.name = 'supplier' )) <>1 ) )) = 0;
+END_RULE;
+
+RULE restrict_assembly_category FOR (product_definition);
+ LOCAL
+ assembly_definitions: SET OF product_definition := [];
+ END_LOCAL;
+ assembly_definitions := QUERY( pd <* product_definition |
+ SIZEOF( QUERY( pdca <* USEDIN( pd, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION_CONTEXT_ASSOCIATION.DEFINITION') |
+ pdca.frame_of_reference.name= 'assembly definition')) > 0 );
+WHERE
+ WR1 : SIZEOF( QUERY( pd <* assembly_definitions |
+ NOT ('assembly' IN categories_of_product(pd.formation.of_product)) ))= 0;
+END_RULE;
+
+RULE restrict_centre_of_mass_representation FOR (representation);
+
+WHERE
+ WR1 : SIZEOF ( QUERY ( r <* representation |
+ ( r.name ='centre of mass' ) AND
+ ( ( SIZEOF ( r.items ) <>1 ) OR
+ (SIZEOF ( QUERY ( i <* r.items |
+ ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'POINT' IN TYPEOF ( i ) ) AND
+ ( i.name = 'centre point' ) )) <>1 ) ) ) )
+ =0;
+END_RULE;
+
+RULE restrict_classification_assignments FOR (applied_classification_assignment);
+
+WHERE
+ WR1 : SIZEOF(QUERY(aia <* applied_classification_assignment |
+ NOT class_assignment_is_valid(aia)))=0;
+END_RULE;
+
+RULE restrict_collection_category FOR (product_definition);
+ LOCAL
+ collection_definitions: SET OF product_definition := [];
+ END_LOCAL;
+ collection_definitions := QUERY( pd <* product_definition |
+ SIZEOF( QUERY( pdca <* USEDIN( pd, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF' + '.PRODUCT_DEFINITION_CONTEXT_ASSOCIATION.DEFINITION') |
+ pdca.frame_of_reference.name= 'collection definition')) > 0 );
+WHERE
+ WR1 : SIZEOF( QUERY( pd <* collection_definitions |
+ NOT ('collection' IN categories_of_product(pd.formation.of_product)) ))= 0;
+END_RULE;
+
+RULE restrict_concept_feature_operator FOR (concept_feature_operator);
+
+WHERE
+ WR1 : SIZEOF ( QUERY ( cfo <* concept_feature_operator | NOT
+ ( cfo.name IN ['and' , 'or' , 'oneof' , 'not' , 'implication'] ) ) ) = 0;
+ WR2 : SIZEOF ( QUERY ( cfo <* concept_feature_operator | (cfo.name = 'implication' ) AND
+ ( SIZEOF ( QUERY (cfrwc <* USEDIN ( cfo , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'CONCEPT_FEATURE_RELATIONSHIP_WITH_CONDITION.' +
+ 'CONDITIONAL_OPERATOR' ) |
+ SIZEOF ( QUERY ( ccf <* USEDIN( cfrwc , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'CONDITIONAL_CONCEPT_FEATURE.CONDITION' ) |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'INCLUSION_PRODUCT_CONCEPT_FEATURE' IN TYPEOF ( ccf )))) >0 )) >0 ))) = 0;
+ WR3 : SIZEOF( QUERY (cfo <* concept_feature_operator | (cfo.name = 'not')
+ AND (SIZEOF(QUERY(cfrwc <* USEDIN(cfo, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'CONCEPT_FEATURE_RELATIONSHIP_WITH_CONDITION.CONDITIONAL_OPERATOR') |
+ cfrwc.related_product_concept_feature :<>: cfrwc.relating_product_concept_feature)) >0 ))) = 0;
+END_RULE;
+
+RULE restrict_configuration_design_for_class_breakdown_association FOR (configuration_design);
+
+WHERE
+ WR1 : SIZEOF ( QUERY ( cd <* configuration_design |
+ ( cd.name ='functionality' ) AND
+ ( NOT ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION' IN TYPEOF ( cd. design ) ) OR
+ ( cd.design\product_definition.frame_of_reference.name<> 'functional definition' ) )
+ ) ) =0;
+ WR2 : SIZEOF ( QUERY ( cd <* configuration_design |
+ ( cd.name='realization' ) AND
+ ( NOT ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION' IN TYPEOF ( cd.design ) ) OR
+ ( cd.design\product_definition.frame_of_reference.name<> 'conceptual definition' ) )
+ ) ) =0;
+ WR3 : SIZEOF ( QUERY ( cd <* configuration_design |
+ ( cd.name IN ['functionality' , 'realization'] ) AND
+ ( NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_CLASS' IN TYPEOF ( cd.configuration.item_concept ) ) )
+ ) ) =0;
+END_RULE;
+
+RULE restrict_configuration_design_for_design_constraint FOR (configuration_design);
+
+WHERE
+ WR1 : SIZEOF ( QUERY (cd <* configuration_design |
+ (cd.name = 'design constraint usage') AND
+ (NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION' IN TYPEOF ( cd.design ) ) OR
+ (cd.design\product_definition.frame_of_reference.name <> 'design constraint definition')))) = 0;
+END_RULE;
+
+RULE restrict_group_relationship_for_classification_hierarchy FOR (group_relationship);
+
+WHERE
+ WR1 : SIZEOF( QUERY( gr <* group_relationship |
+ (gr\group_relationship.name = 'class hierarchy') AND
+ (NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CLASS' IN TYPEOF(gr\group_relationship.related_group)) OR
+ NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CLASS' IN TYPEOF(gr\group_relationship.relating_group))) )) = 0;
+END_RULE;
+
+RULE restrict_group_relationship_for_specification_category FOR (group_relationship);
+
+WHERE
+ WR1 : SIZEOF( QUERY( gr <* group_relationship |
+ (gr.name = 'specification category hierarchy') AND
+ (NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_CONCEPT_FEATURE_CATEGORY' IN TYPEOF(gr.related_group))
+ OR NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_CONCEPT_FEATURE_CATEGORY' IN TYPEOF(gr.relating_group))) )) = 0;
+END_RULE;
+
+RULE restrict_language_assignment_per_attribute FOR (attribute_language_assignment);
+
+WHERE
+ WR1 : SIZEOF ( QUERY ( ala1 <* attribute_language_assignment |
+ SIZEOF(QUERY( it <* ala1.items |
+ SIZEOF ( QUERY ( ala2 <* USEDIN ( it ,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ATTRIBUTE_LANGUAGE_ASSIGNMENT.ITEMS' ) |
+ ( ala1\attribute_classification_assignment.attribute_name = ala2\attribute_classification_assignment.attribute_name ) AND
+ ( ala1\attribute_classification_assignment.assigned_class :=: ala2\attribute_classification_assignment.assigned_class )
+ )) >1
+ )) >0
+ )) =0;
+END_RULE;
+
+RULE restrict_part_occurrence FOR (product_definition);
+ LOCAL
+ part_occurrences: SET OF product_definition := QUERY(pd <* product_definition |
+ ( pd.frame_of_reference.name = 'part occurrence' ));
+ END_LOCAL;
+WHERE
+ WR1 : SIZEOF ( QUERY ( pd <* part_occurrences |
+ ( NOT( pd.name IN
+ ['single instance' , 'selected instance' ,'quantified instance' , 'specified instance' ] ) ) ) ) = 0;
+ WR2 : SIZEOF ( QUERY ( pd <* part_occurrences |
+ (SIZEOF ( QUERY ( pdr <* USEDIN ( pd ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'PRODUCT_DEFINITION_RELATIONSHIP.RELATED_PRODUCT_DEFINITION' ) |
+ pdr.name = 'definition usage' ) ) <>1 ) AND
+ ( SIZEOF ( QUERY ( cd <* USEDIN ( pd , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'CONFIGURATION_DESIGN.DESIGN' ) |
+ ( cd.name = 'occurrence usage definition' ) AND
+ ( NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'PRODUCT_IDENTIFICATION' IN TYPEOF( cd.configuration ) ) ) ) ) <>1 ) ) ) = 0;
+ WR3 : SIZEOF ( QUERY ( pd <* part_occurrences |
+ (SIZEOF ( QUERY ( cd <* USEDIN ( pd , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'PRODUCT_DEFINITION_RELATIONSHIP.RELATED_PRODUCT_DEFINITION' ) |
+ ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +'PRODUCT_DEFINITION_USAGE' IN TYPEOF ( cd ) ) ) ) = 0 )AND
+ ( SIZEOF ( USEDIN ( pd , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'PRODUCT_DEFINITION_OCCURRENCE_RELATIONSHIP.OCCURRENCE' ) ) = 0 ) ) ) = 0;
+ WR4 : SIZEOF ( QUERY ( pd <* part_occurrences |
+ ( pd.name = 'selected instance' ) AND
+ NOT valid_selected_instance_representation(pd) ))=0;
+ WR5 : SIZEOF ( QUERY ( pd <* part_occurrences |
+ ( pd.name = 'quantified instance' ) AND
+ ( SIZEOF ( QUERY (ppd <* USEDIN ( pd , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +'PROPERTY_DEFINITION.DEFINITION' ) |
+ ( ppd.name ='occurrence quantity' ) AND
+ ( SIZEOF ( QUERY ( pdr <*USEDIN ( ppd , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION' ) | (
+ pdr.used_representation.name = 'quantity' ) AND
+ (SIZEOF ( pdr.used_representation.items ) = 1 ) AND
+ (SIZEOF ( QUERY ( i <* pdr.used_representation.items |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'MEASURE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) AND
+ ( i.name = 'quantity measure' ) ) ) = 1)))= 1 )))= 0 )))= 0;
+ WR6 : SIZEOF ( QUERY ( pd <* part_occurrences |
+ ( pd.name = 'specified instance' ) AND
+ ( SIZEOF ( QUERY (
+ pdor <* USEDIN ( pd , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +'PRODUCT_DEFINITION_OCCURRENCE_RELATIONSHIP.OCCURRENCE' ) |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +'SPECIFIED_HIGHER_USAGE_OCCURRENCE' IN TYPEOF ( pdor.occurrence_usage ) ) ) = 0 ) ) ) = 0;
+END_RULE;
+
+RULE restrict_part_occurrence_category FOR (product_definition);
+ LOCAL
+ part_occurrences: SET OF product_definition := QUERY( pd <* product_definition |(
+ pd.frame_of_reference.name = 'part occurrence'));
+ END_LOCAL;
+WHERE
+ WR1 : SIZEOF( QUERY( pd <* part_occurrences |
+ (SIZEOF( QUERY( prpc <* USEDIN(pd.formation.of_product, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS') |
+ prpc.name IN ['part','raw material','tool'] )) = 0 ) )) = 0;
+END_RULE;
+
+RULE restrict_product_definitions_for_base_element FOR (product_definition_relationship);
+
+WHERE
+ WR1 : SIZEOF ( QUERY ( pdr <* product_definition_relationship |
+ ( pdr. name = 'solution alternative definition' ) AND
+ ( NOT( pdr. relating_product_definition.frame_of_reference.name
+ IN [ 'alternative definition' , 'functional definition' , 'conceptual definition' ] ) OR
+ ( pdr.related_product_definition.frame_of_reference.name<>'alternative definition' ) ) ) ) =0;
+END_RULE;
+
+RULE restrict_product_definitions_for_collection FOR (product_definition_relationship);
+
+WHERE
+ WR1 : SIZEOF ( QUERY ( pdr <* product_definition_relationship |
+ ( pdr. name = 'collection membership' ) AND
+ ( ( pdr.relating_product_definition.frame_of_reference.name<>'part definition' ) OR
+ ( pdr.related_product_definition.frame_of_reference.name<>'part occurrence' ) OR
+ ( SIZEOF ( QUERY ( pdca <* USEDIN (pdr.relating_product_definition ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF' + '.PRODUCT_DEFINITION_CONTEXT_ASSOCIATION.DEFINITION') |
+ ( pdca.role.name = 'part definition type' ) AND
+ ( pdca.frame_of_reference.name = 'collection definition' ) )) =0 ) ) ) ) =0;
+END_RULE;
+
+RULE restrict_product_definitions_for_definition_usage FOR (product_definition_relationship);
+
+WHERE
+ WR1 : SIZEOF ( QUERY ( pdr <* product_definition_relationship |
+ ( pdr.name = 'definition usage' ) AND
+ ( ( pdr.relating_product_definition.frame_of_reference.name<> 'part definition' ) OR
+ ( pdr.related_product_definition.frame_of_reference.name<>'part occurrence' )))) =0;
+END_RULE;
+
+RULE restrict_product_definitions_for_design_constraint_association FOR (product_definition_relationship);
+
+WHERE
+ WR1 : SIZEOF ( QUERY ( pdr <* product_definition_relationship |
+ ( pdr. name = 'design constraint association' ) AND
+ ( (pdr. relating_product_definition.frame_of_reference.name<>'design constraint definition' ) OR
+ NOT ( pdr.related_product_definition.frame_of_reference.name IN
+ ['alternative definition' , 'functional definition' ,'conceptual definition' ] ) ) ) ) =0;
+END_RULE;
+
+RULE restrict_product_definitions_for_part_definition_relationship FOR (product_definition_relationship);
+
+WHERE
+ WR1 : SIZEOF ( QUERY ( pdr <* product_definition_relationship |
+ ( pdr.name IN [ 'geometrical relationship' , 'definition replacement' ] ) AND
+ ( ( pdr.relating_product_definition.frame_of_reference.name <>'part definition' ) OR
+ ( pdr.related_product_definition.frame_of_reference.name <>'part definition' ) ) ) ) =0;
+END_RULE;
+
+RULE restrict_representation_for_surface_condition FOR (property_definition_representation);
+
+WHERE
+ WR1 : SIZEOF(QUERY(pdr <* property_definition_representation |
+ NOT surface_condition_correlation(pdr.definition, pdr.used_representation) ))=0;
+END_RULE;
+
+RULE restrict_treatment_result FOR (representation);
+ LOCAL
+ treatment_results: SET OF representation := [];
+ END_LOCAL;
+ treatment_results:= QUERY( r <* representation |
+ (r.name = 'treatment result') );
+WHERE
+ WR1 : (SIZEOF( QUERY( r <* treatment_results | (SIZEOF(r.items) > 2) )) = 0) AND
+ (SIZEOF( QUERY( r <* treatment_results |
+ (SIZEOF( QUERY( i <* r.items |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF(i)) )) > 0) )) = 0);
+ WR2 : SIZEOF( QUERY( r <* treatment_results |
+ (SIZEOF( QUERY( i <* r.items | i.name = 'result' )) = 0) )) = 0;
+ WR3 : SIZEOF( QUERY( r <* treatment_results |
+ (SIZEOF( QUERY( i <* r.items | i.name = 'purpose' )) > 1) )) = 0;
+END_RULE;
+
+RULE selected_instance_usage_requires_representation FOR (assembly_component_usage);
+ LOCAL
+ selected_instance_usages: SET OF assembly_component_usage := QUERY( acr <* assembly_component_usage|
+ (acr.name = 'selected instance usage'));
+ END_LOCAL;
+WHERE
+ WR1 : SIZEOF ( QUERY ( acr <* selected_instance_usages |
+ NOT valid_selected_instance_representation(acr) ))=0;
+END_RULE;
+
+RULE solution_definition_requires_solution_category FOR (product_definition);
+ LOCAL
+ solution_definitions: SET OF product_definition := [];
+ END_LOCAL;
+ solution_definitions := QUERY( pd <* product_definition |
+ (pd.frame_of_reference.name = 'alternative definition'));
+WHERE
+ WR1 : SIZEOF( QUERY( pd <* solution_definitions |
+ (SIZEOF( QUERY( prpc <* USEDIN(pd.formation.of_product, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF' + '.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS') |
+ prpc.name = 'alternative solution')) = 0 ) )) = 0;
+END_RULE;
+
+RULE stock_material_reference FOR (percentage_ply_definition, make_from_usage_option, product_related_product_category);
+ LOCAL
+ i,j,k : INTEGER;
+ dkuhr : LOGICAL;
+ nmfuo : INTEGER;
+ nprpc : INTEGER;
+ rp : product;
+ END_LOCAL;
+ dkuhr := TRUE;
+ REPEAT i:= LOINDEX (percentage_ply_definition) TO
+ HIINDEX (percentage_ply_definition);
+ nmfuo := 0;
+ REPEAT j:= LOINDEX (make_from_usage_option) TO
+ HIINDEX (make_from_usage_option);
+ IF (percentage_ply_definition[i] =
+ make_from_usage_option[j].relating_product_definition) THEN
+ rp := make_from_usage_option[j].related_product_definition.
+ formation.of_product;
+ nprpc := 0;
+ REPEAT k:= LOINDEX (product_related_product_category) TO
+ HIINDEX (product_related_product_category);
+ IF ((rp IN product_related_product_category[k].products) AND
+ (product_related_product_category[k].name IN
+ ['anisotropic material', 'isotropic material', 'stock core',
+ 'filament assembly', 'discontinuous fiber assembly'])) THEN
+ nprpc := nprpc + 1;
+ END_IF;
+ END_REPEAT;
+ IF (nprpc = 1) THEN
+ nmfuo := nmfuo + 1;
+ ELSE
+ dkuhr := FALSE;
+ ESCAPE;
+ END_IF;
+ END_IF;
+ END_REPEAT;
+ IF (dkuhr = FALSE) THEN
+ ESCAPE;
+ END_IF;
+ IF(nmfuo = 0) THEN
+ dkuhr := FALSE;
+ ESCAPE;
+ END_IF;
+ END_REPEAT;
+WHERE
+ WR1 : dkuhr;
+END_RULE;
+
+RULE styled_curve FOR (styled_item);
+
+WHERE
+ WR1 : SIZEOF( QUERY( si <* styled_item | ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE' IN TYPEOF (si.item)) AND (SIZEOF (QUERY (psa <* si.styles | (SIZEOF (QUERY (cs <* psa.styles | ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE' IN TYPEOF (cs)) )) > 0) )) <> 1) )) = 0;
+END_RULE;
+
+RULE subtype_exclusiveness_geometric_tolerance FOR (geometric_tolerance);
+
+WHERE
+ WR1 : SIZEOF(QUERY (gt <* geometric_tolerance | NOT (type_check_function(gt, ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANGULARITY_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CIRCULAR_RUNOUT_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COAXIALITY_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONCENTRICITY_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CYLINDRICITY_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FLATNESS_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LINE_PROFILE_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PARALLELISM_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PERPENDICULARITY_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POSITION_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ROUNDNESS_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STRAIGHTNESS_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_PROFILE_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SYMMETRY_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TOTAL_RUNOUT_TOLERANCE'] , 3)))) = 0;
+END_RULE;
+
+RULE subtype_exclusiveness_representation_item FOR (representation_item);
+
+WHERE
+ WR1 : SIZEOF(QUERY (cri <* representation_item |
+ NOT (type_check_function(cri,['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MEASURE_REPRESENTATION_ITEM',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VALUE_REPRESENTATION_ITEM',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPOUND_REPRESENTATION_ITEM'] , 3)))) = 0;
+END_RULE;
+
+RULE subtype_mandatory_geometric_tolerance FOR (geometric_tolerance);
+
+WHERE
+ WR1 : SIZEOF(QUERY (gt <* geometric_tolerance | NOT (type_check_function(gt, ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANGULARITY_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CIRCULAR_RUNOUT_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COAXIALITY_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONCENTRICITY_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CYLINDRICITY_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FLATNESS_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LINE_PROFILE_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PARALLELISM_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PERPENDICULARITY_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POSITION_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ROUNDNESS_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STRAIGHTNESS_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_PROFILE_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SYMMETRY_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TOTAL_RUNOUT_TOLERANCE'] , 0)))) = 0;
+END_RULE;
+
+RULE text_font_usage FOR (externally_defined_text_font, pre_defined_text_font);
+
+WHERE
+ WR1 : SIZEOF (QUERY (pdtf <* pre_defined_text_font | SIZEOF (USEDIN (pdtf, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TEXT_LITERAL.FONT')) = 0 )) = 0;
+ WR2 : SIZEOF (QUERY (edtf <* externally_defined_text_font | SIZEOF (USEDIN (edtf, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TEXT_LITERAL.FONT')) = 0 )) = 0;
+END_RULE;
+
+RULE thickness_laminate_table_component_select FOR (thickness_laminate_definition, next_assembly_usage_occurrence, product_related_product_category);
+ LOCAL
+ i,j,k : INTEGER;
+ dkuhr : LOGICAL;
+ nnauo : INTEGER;
+ nprpc : INTEGER;
+ rp : product;
+ END_LOCAL;
+ dkuhr := TRUE;
+ REPEAT i:= LOINDEX (thickness_laminate_definition) TO
+ HIINDEX (thickness_laminate_definition);
+ nnauo := 0;
+ REPEAT j:= LOINDEX (next_assembly_usage_occurrence) TO
+ HIINDEX (next_assembly_usage_occurrence);
+ IF (thickness_laminate_definition[i] =
+ next_assembly_usage_occurrence[j].relating_product_definition) THEN
+ rp := next_assembly_usage_occurrence[j].related_product_definition.
+ formation.of_product;
+ nprpc := 0;
+ REPEAT k:= LOINDEX (product_related_product_category) TO
+ HIINDEX (product_related_product_category);
+ IF ((rp IN product_related_product_category[k].products) AND
+ (product_related_product_category[k].name IN
+ ['ply', 'filament laminate', 'processed core'])) THEN
+ nprpc := nprpc + 1;
+ END_IF;
+ END_REPEAT;
+ IF (nprpc = 1) THEN
+ nnauo := nnauo + 1;
+ ELSE
+ dkuhr := FALSE;
+ ESCAPE;
+ END_IF;
+ END_IF;
+ END_REPEAT;
+ IF (dkuhr = FALSE) THEN
+ ESCAPE;
+ END_IF;
+ IF (nnauo <> 1) THEN
+ dkuhr := FALSE;
+ ESCAPE;
+ END_IF;
+ END_REPEAT;
+WHERE
+ WR1 : dkuhr;
+END_RULE;
+
+RULE validate_dependently_instantiable_entity_data_types FOR (action_method_role, annotation_text, attribute_value_role, auxiliary_geometric_representation_item, binary_numeric_expression, boolean_expression, bounded_curve, bounded_surface, cartesian_transformation_operator, comparison_expression, concept_feature_relationship, concept_feature_relationship_with_condition, connected_edge_set, document_usage_constraint, edge_blended_solid, effectivity_context_role, event_occurrence_role, explicit_procedural_representation_item_relationship, expression, founded_item, generic_expression, generic_variable, indirectly_selected_elements, interval_expression, literal_number, local_time, loop, modified_solid_with_placed_configuration, multiple_arity_boolean_expression, multiple_arity_generic_expression, multiple_arity_numeric_expression, numeric_expression, one_direction_repeat_factor, oriented_open_shell, oriented_path, positioned_sketch, procedural_representation, procedural_representation_sequence, product_definition_context_role, product_definition_effectivity, runout_zone_orientation, simple_boolean_expression, simple_generic_expression, simple_numeric_expression, solid_with_depression, solid_with_hole, solid_with_pocket, solid_with_protrusion, solid_with_shape_element_pattern, solid_with_slot, swept_area_solid, symbol_target, tolerance_zone_form, two_direction_repeat_factor, unary_generic_expression, unary_numeric_expression, user_selected_elements, variational_representation_item, view_volume);
+LOCAL
+ number_of_input_instances : INTEGER;
+ previous_in_chain : LIST OF GENERIC := [];
+ set_of_input_types : SET OF STRING := [];
+ all_instances : SET OF GENERIC := [];
+END_LOCAL;
+
+ all_instances := all_instances + action_method_role + annotation_text + attribute_value_role + auxiliary_geometric_representation_item + binary_numeric_expression + boolean_expression + bounded_curve + bounded_surface + cartesian_transformation_operator + comparison_expression + concept_feature_relationship + concept_feature_relationship_with_condition + connected_edge_set + document_usage_constraint + edge_blended_solid + effectivity_context_role + event_occurrence_role + explicit_procedural_representation_item_relationship + expression + founded_item + generic_expression + generic_variable + indirectly_selected_elements + interval_expression + literal_number + local_time + loop + modified_solid_with_placed_configuration + multiple_arity_boolean_expression + multiple_arity_generic_expression + multiple_arity_numeric_expression + numeric_expression + one_direction_repeat_factor + oriented_open_shell + oriented_path + positioned_sketch + procedural_representation + procedural_representation_sequence + product_definition_context_role + product_definition_effectivity + runout_zone_orientation + simple_boolean_expression + simple_generic_expression + simple_numeric_expression + solid_with_depression + solid_with_hole + solid_with_pocket + solid_with_protrusion + solid_with_shape_element_pattern + solid_with_slot + swept_area_solid + symbol_target + tolerance_zone_form + two_direction_repeat_factor + unary_generic_expression + unary_numeric_expression + user_selected_elements + variational_representation_item + view_volume;--<make a union of all implicit populations of the FOR-clause>
+number_of_input_instances := SIZEOF(all_instances);
+(* Collect all type strings of all FOR instances into one set. *)
+REPEAT i:=1 TO number_of_input_instances;
+ set_of_input_types := set_of_input_types + TYPEOF(all_instances[i]);
+END_REPEAT;
+WHERE
+ WR1 : dependently_instantiated(all_instances, set_of_input_types,
+ previous_in_chain);
+END_RULE;
+
+FUNCTION acyclic
+ (arg1: generic_expression; arg2: SET [0:?] OF generic_expression) : BOOLEAN;
+LOCAL
+ result: BOOLEAN := TRUE;
+END_LOCAL;
+
+IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SIMPLE_GENERIC_EXPRESSION'
+ IN TYPEOF (arg1))
+THEN
+ RETURN (TRUE);
+END_IF;
+
+IF arg1 IN arg2
+THEN
+ RETURN (FALSE);
+END_IF;
+
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.UNARY_GENERIC_EXPRESSION'
+ IN TYPEOF (arg1)
+THEN
+ RETURN
+ (acyclic(arg1\unary_generic_expression.operand,arg2+[arg1]));
+END_IF;
+
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.BINARY_GENERIC_EXPRESSION'
+ IN TYPEOF (arg1)
+THEN
+ RETURN
+ (acyclic(arg1\binary_generic_expression.operands[1],arg2+[arg1])
+ AND
+ acyclic(arg1\binary_generic_expression.operands[2],arg2+[arg1]));
+END_IF;
+
+IF
+'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MULTIPLE_ARITY_GENERIC_EXPRESSION'
+ IN TYPEOF (arg1)
+THEN
+ result := TRUE;
+ REPEAT i := 1 TO
+ SIZEOF (arg1\multiple_arity_generic_expression.operands);
+ result := result AND
+ acyclic(arg1\multiple_arity_generic_expression.operands[i], arg2+[arg1]);
+ END_REPEAT;
+
+ RETURN (result);
+END_IF;
+ RETURN (result);
+END_FUNCTION;
+
+FUNCTION acyclic_composite_text
+ (start_composite: composite_text; child_text: SET [1:?] OF text_or_character) : LOGICAL;
+ LOCAL
+ i : INTEGER;
+ local_composite_text : SET [0:?] OF composite_text;
+ local_annotation_text : SET [0:?] OF annotation_text;
+ local_children : SET [0:?] OF text_or_character;
+ END_LOCAL;
+
+ local_composite_text := QUERY (child <* child_text |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPOSITE_TEXT'
+ IN TYPEOF (child)));
+
+ IF (SIZEOF (local_composite_text) > 0)
+ THEN
+ REPEAT i := 1 TO HIINDEX (local_composite_text);
+ IF (start_composite :=: local_composite_text[i])
+ THEN
+ RETURN (FALSE);
+ END_IF;
+ END_REPEAT;
+ END_IF;
+
+ local_children := child_text;
+
+ IF (SIZEOF (local_composite_text)) > 0 THEN
+ REPEAT i := 1 TO HIINDEX (local_composite_text);
+ local_children := local_children +
+ local_composite_text[i].collected_text;
+ END_REPEAT;
+ END_IF;
+
+ local_annotation_text := QUERY (child <* child_text |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT'
+ IN TYPEOF (child)));
+
+ IF (SIZEOF (local_annotation_text) > 0) THEN
+ REPEAT i := 1 TO HIINDEX (local_annotation_text);
+ local_children := local_children +
+ QUERY (item <* local_annotation_text[i]\mapped_item.
+ mapping_source.mapped_representation.items |
+ SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPOSITE_TEXT'] *
+ TYPEOF(item)) > 0);
+ END_REPEAT;
+ END_IF;
+
+ IF (local_children :<>: child_text) THEN
+ RETURN (acyclic_composite_text (start_composite, local_children));
+ ELSE
+ RETURN (TRUE);
+ END_IF;
+END_FUNCTION;
+
+FUNCTION acyclic_curve_replica
+ (rep: curve_replica; parent: curve) : BOOLEAN;
+IF NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_REPLICA') IN TYPEOF(parent)) THEN
+ RETURN (TRUE);
+ END_IF;
+ (* Return TRUE if the parent is not of type curve_replica *)
+ IF (parent :=: rep) THEN
+ RETURN (FALSE);
+ (* Return FALSE if the parent is the same curve_replica, otherwise,
+ call function again with the parents own parent_curve. *)
+ ELSE
+ RETURN(acyclic_curve_replica(rep,
+ parent\curve_replica.parent_curve));
+ END_IF;
+END_FUNCTION;
+
+FUNCTION acyclic_mapped_item_usage
+ (rep: representation) : BOOLEAN;
+ LOCAL
+ items : SET OF representation_item;
+ END_LOCAL;
+
+ items := QUERY (item <* rep.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' IN TYPEOF (item));
+ IF SIZEOF (items) = 0
+ THEN
+ RETURN (FALSE);
+ ELSE
+ REPEAT i := 1 TO HIINDEX (items);
+ IF items[i]\mapped_item.mapping_source.mapped_representation :=: rep
+ THEN
+ RETURN (TRUE);
+ ELSE
+ RETURN (acyclic_mapped_item_usage(items[i]\
+ mapped_item.mapping_source.mapped_representation));
+ END_IF;
+ END_REPEAT;
+ RETURN (FALSE);
+ END_IF;
+END_FUNCTION;
+
+FUNCTION acyclic_mapped_representation
+ (mi: mapped_item) : BOOLEAN;
+ LOCAL
+ rms : SET OF representation_map;
+ mis : SET OF mapped_item;
+ rs1, rs2 : SET OF representation;
+ END_LOCAL;
+
+ rs1 := using_representations(mi);
+ rs2 := [];
+ -- loop as long as there are elements in rs1
+ REPEAT WHILE SIZEOF(rs1) > 0;
+ REPEAT i := 1 TO HIINDEX(rs1);
+ -- Determine the set of representation_map that reference the parent_set
+ rms := bag_to_set(USEDIN(rs1[i], 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.REPRESENTATION_MAP.MAPPED_REPRESENTATION'));
+ IF SIZEOF(rms) > 0 THEN
+ REPEAT j := 1 TO HIINDEX(rms);
+ mis := bag_to_set(USEDIN(rms[i], 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM.MAPPING_SOURCE'));
+ IF SIZEOF(mis) > 0 THEN
+ REPEAT j := 1 TO HIINDEX(mis);
+ -- check mis members for instance equal with mi. If so then there is a cycle
+ IF mis[i] :=: mi THEN
+ RETURN (FALSE);
+ END_IF;
+ rs2 := rs2 + using_representations(mis[i]);
+ END_REPEAT;
+ END_IF;
+ END_REPEAT;
+ END_IF;
+ END_REPEAT;
+ rs1 := rs2;
+ rs2 := [];
+ END_REPEAT;
+ RETURN (TRUE);
+END_FUNCTION;
+
+FUNCTION acyclic_point_replica
+ (rep: point_replica; parent: point) : BOOLEAN;
+IF NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_REPLICA') IN TYPEOF(parent)) THEN
+ RETURN (TRUE);
+ END_IF;
+ (* Return TRUE if the parent is not of type point_replica *)
+ IF (parent :=: rep) THEN
+ RETURN (FALSE);
+ (* Return FALSE if the parent is the same point_replica, otherwise,
+ call function again with the parents own parent_pt. *)
+ ELSE RETURN(acyclic_point_replica(rep, parent\point_replica.parent_pt));
+ END_IF;
+END_FUNCTION;
+
+FUNCTION acyclic_product_definition_relationship
+ (relation: product_definition_relationship; relatives: SET [1:?] OF product_definition; specific_relation: STRING) : BOOLEAN;
+ LOCAL
+ x : SET OF product_definition_relationship;
+ END_LOCAL;
+
+ IF relation.relating_product_definition IN relatives THEN
+ RETURN (FALSE);
+ END_IF;
+ x := QUERY(pd <* bag_to_set(USEDIN(relation.relating_product_definition, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'PRODUCT_DEFINITION_RELATIONSHIP.' + 'RELATED_PRODUCT_DEFINITION')) | specific_relation IN TYPEOF(pd));
+ REPEAT i := 1 TO HIINDEX(x);
+ IF NOT acyclic_product_definition_relationship(x[i], relatives + relation.relating_product_definition, specific_relation) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_REPEAT;
+ RETURN (TRUE);
+END_FUNCTION;
+
+FUNCTION acyclic_representation_relationship
+ (relation: representation_relationship; relatives: SET [1:?] OF representation; specific_relation: STRING) : BOOLEAN;
+ LOCAL
+ x : SET OF representation_relationship;
+ END_LOCAL;
+
+ IF relation.rep_1 IN relatives THEN
+ RETURN (FALSE);
+ END_IF;
+ x := QUERY(r <* bag_to_set(USEDIN(relation.rep_1, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'REPRESENTATION_RELATIONSHIP.' + 'REP_2')) | specific_relation IN TYPEOF(r));
+ REPEAT i := 1 TO HIINDEX(x);
+ IF NOT acyclic_representation_relationship(x[i], relatives + relation.rep_1, specific_relation) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_REPEAT;
+ RETURN (TRUE);
+END_FUNCTION;
+
+FUNCTION acyclic_solid_replica
+ (rep: solid_replica; parent: solid_model) : BOOLEAN;
+IF NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SOLID_REPLICA') IN TYPEOF(parent)) THEN
+ RETURN (TRUE);
+ END_IF;
+ (* Return TRUE if the parent is not of type solid_replica. *)
+ IF (parent :=: rep) THEN
+ RETURN (FALSE);
+ (* Return FALSE if the parent is the same solid_replica, otherwise,
+ call function again with the parents own parent_solid. *)
+ ELSE RETURN(acyclic_solid_replica(rep,
+ parent\solid_replica.parent_solid));
+ END_IF;
+END_FUNCTION;
+
+FUNCTION acyclic_surface_replica
+ (rep: surface_replica; parent: surface) : BOOLEAN;
+IF NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_REPLICA') IN TYPEOF(parent)) THEN
+ RETURN (TRUE);
+ END_IF;
+ (* Return TRUE if the parent is not of type surface_replica *)
+ IF (parent :=: rep) THEN
+ RETURN (FALSE);
+ (* Return FALSE if the parent is the same surface_replica, otherwise,
+ call function again with the parents own parent_surface. *)
+ ELSE RETURN(acyclic_surface_replica(rep,
+ parent\surface_replica.parent_surface));
+ END_IF;
+END_FUNCTION;
+
+FUNCTION advanced_face_properties
+ (testface: face) : BOOLEAN;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF(testface) THEN
+ RETURN (TRUE);
+END_IF;
+(* if testface is a subface recursively test the parent_face,
+return FALSE for all other types of face *)
+IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SUBFACE' IN TYPEOF(testface)) THEN
+ RETURN(advanced_face_properties(testface\subface.parent_face));
+ ELSE RETURN (FALSE);
+END_IF;
+END_FUNCTION;
+
+FUNCTION aspect_ratio
+ (p: planar_box) : positive_ratio_measure;
+IF (p.size_in_x > 0.) AND (p.size_in_y > 0.) THEN
+ RETURN (p.size_in_x / p.size_in_y);
+ ELSE
+ RETURN (?);
+ END_IF;
+END_FUNCTION;
+
+FUNCTION associated_surface
+ (arg: pcurve_or_surface) : surface;
+ LOCAL
+ surf : surface;
+ END_LOCAL;
+
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE' IN TYPEOF(arg) THEN
+ surf := arg\pcurve.basis_surface;
+ ELSE
+ surf := arg;
+ END_IF;
+ RETURN(surf);
+END_FUNCTION;
+
+FUNCTION bag_to_set
+ (the_bag: BAG [0:?] OF GENERIC: intype) : SET [0:?] OF GENERIC: intype;
+ LOCAL
+ the_set : SET OF GENERIC:intype := [];
+ END_LOCAL;
+
+ IF SIZEOF(the_bag) > 0 THEN
+ REPEAT i := 1 TO HIINDEX(the_bag);
+ the_set := the_set + the_bag[i];
+ END_REPEAT;
+ END_IF;
+ RETURN (the_set);
+END_FUNCTION;
+
+FUNCTION base_axis
+ (dim: INTEGER; axis1: direction; axis2: direction; axis3: direction) : LIST [2:3] OF direction;
+ LOCAL
+ u : LIST [2:3] OF direction;
+ factor : REAL;
+ d1, d2 : direction;
+ END_LOCAL;
+
+ IF (dim = 3) THEN
+ d1 := NVL(normalise(axis3), dummy_gri || direction([0.0,0.0,1.0]));
+ d2 := first_proj_axis(d1,axis1);
+ u := [d2, second_proj_axis(d1,d2,axis2), d1];
+ ELSE
+ IF EXISTS(axis1) THEN
+ d1 := normalise(axis1);
+ u := [d1, orthogonal_complement(d1)];
+ IF EXISTS(axis2) THEN
+ factor := dot_product(axis2,u[2]);
+ IF (factor < 0.0) THEN
+ u[2].direction_ratios[1] := -u[2].direction_ratios[1];
+ u[2].direction_ratios[2] := -u[2].direction_ratios[2];
+ END_IF;
+ END_IF;
+ ELSE
+ IF EXISTS(axis2) THEN
+ d1 := normalise(axis2);
+ u := [orthogonal_complement(d1), d1];
+ u[1].direction_ratios[1] := -u[1].direction_ratios[1];
+ u[1].direction_ratios[2] := -u[1].direction_ratios[2];
+ ELSE
+ u := [dummy_gri || direction([1.0, 0.0]), dummy_gri ||
+ direction([0.0, 1.0])];
+ END_IF;
+ END_IF;
+ END_IF;
+ RETURN(u);
+END_FUNCTION;
+
+FUNCTION boolean_choose
+ (b: BOOLEAN; choice1: GENERIC: item; choice2: GENERIC: item) : GENERIC: item;
+IF b THEN
+ RETURN (choice1);
+ ELSE
+ RETURN (choice2);
+ END_IF;
+END_FUNCTION;
+
+FUNCTION build_2axes
+ (ref_direction: direction) : LIST [2:2] OF direction;
+ LOCAL
+ d : direction := NVL(normalise(ref_direction),
+ dummy_gri || direction([1.0,0.0]));
+ END_LOCAL;
+
+ RETURN([d, orthogonal_complement(d)]);
+END_FUNCTION;
+
+FUNCTION build_axes
+ (axis: direction; ref_direction: direction) : LIST [3:3] OF direction;
+ LOCAL
+ d1, d2 : direction;
+ END_LOCAL;
+ d1 := NVL(normalise(axis), dummy_gri || direction([0.0,0.0,1.0]));
+ d2 := first_proj_axis(d1, ref_direction);
+ RETURN([d2, normalise(cross_product(d1,d2))\vector.orientation, d1]);
+END_FUNCTION;
+
+FUNCTION categories_of_product
+ (obj: product) : SET [0:?] OF STRING;
+LOCAL
+ category_assignments: BAG OF product_category;
+ categories: SET OF STRING:=[];
+END_LOCAL;
+category_assignments := USEDIN(obj, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS');
+REPEAT i := LOINDEX(category_assignments) TO HIINDEX(category_assignments) BY 1;
+ categories := categories + category_assignments[i].name;
+END_REPEAT;
+RETURN(categories);
+END_FUNCTION;
+
+FUNCTION cc_design_person_and_organization_correlation
+ (e: cc_design_person_and_organization_assignment) : BOOLEAN;
+ LOCAL
+ po_role : STRING;
+ END_LOCAL;
+ po_role := e\person_and_organization_assignment.role.name;
+ CASE po_role OF
+ 'request_recipient' : IF SIZEOF (e.items) <>
+ SIZEOF (QUERY (x <* e.items |
+ SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'CHANGE_REQUEST',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'START_REQUEST'] *
+ TYPEOF (x)) = 1))
+ THEN RETURN(FALSE);
+ END_IF;
+ 'initiator' : IF SIZEOF (e.items) <>
+ SIZEOF (QUERY (x <* e.items |
+ SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'CHANGE_REQUEST',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'START_REQUEST',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'START_WORK',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'CHANGE'] *
+ TYPEOF (x)) = 1))
+ THEN RETURN(FALSE);
+ END_IF;
+ 'creator' : IF SIZEOF (e.items) <>
+ SIZEOF (QUERY (x <* e.items |
+ SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRODUCT_DEFINITION_FORMATION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRODUCT_DEFINITION'] *
+ TYPEOF (x)) = 1))
+ THEN RETURN (FALSE);
+ END_IF;
+ 'part_supplier' : IF SIZEOF (e.items) <>
+ SIZEOF (QUERY (x <* e.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRODUCT_DEFINITION_FORMATION'
+ IN TYPEOF (x)))
+ THEN RETURN(FALSE);
+ END_IF;
+ 'design_supplier' : IF SIZEOF (e.items) <>
+ SIZEOF (QUERY (x <* e.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRODUCT_DEFINITION_FORMATION'
+ IN TYPEOF (x)))
+ THEN RETURN(FALSE);
+ END_IF;
+ 'design_owner' : IF SIZEOF (e.items) <>
+ SIZEOF (QUERY (x <* e.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT'
+ IN TYPEOF (x)))
+ THEN RETURN(FALSE);
+ END_IF;
+ 'configuration_manager' : IF SIZEOF (e.items) <>
+ SIZEOF (QUERY (x <* e.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'CONFIGURATION_ITEM'
+ IN TYPEOF (x)))
+ THEN RETURN(FALSE);
+ END_IF;
+ 'contractor' : IF SIZEOF (e.items) <>
+ SIZEOF (QUERY (x <* e.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONTRACT'
+ IN TYPEOF (x)))
+ THEN RETURN(FALSE);
+ END_IF;
+ 'classification_officer' : IF SIZEOF (e.items) <>
+ SIZEOF (QUERY (x <* e.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'SECURITY_CLASSIFICATION'
+ IN TYPEOF (x))) THEN
+ RETURN(FALSE);
+ END_IF;
+ OTHERWISE : RETURN(TRUE);
+ END_CASE;
+ RETURN (TRUE);
+END_FUNCTION;
+
+FUNCTION check_continuous_edges
+ (edges: LIST [0:?] OF UNIQUE edge_curve) : BOOLEAN;
+ LOCAL
+ i : INTEGER;
+ next_vertex : vertex;
+ END_LOCAL;
+
+ -- first check whether there is only one edge in the list: in this
+ -- case there is no connectivity to be checked.
+
+ IF (SIZEOF(edges) = 1)
+ THEN RETURN(TRUE);
+ END_IF;
+
+ -- otherwise, establish the matching vertices of edges 1 and 2 in
+ -- the list, and determine the vertex of edge 2 to which edge 3,
+ -- must be connected, if there are more than two edges in the list.
+
+ IF ((edges[2].edge_start :=: edges[1].edge_end)
+ XOR (edges[2].edge_start :=: edges[1].edge_start))
+ THEN next_vertex := edges[2].edge_end;
+ ELSE
+ IF ((edges[2].edge_end :=: edges[1].edge_end)
+ XOR (edges[2].edge_end :=: edges[1].edge_start))
+ THEN next_vertex := edges[2].edge_start;
+ ELSE RETURN(FALSE); -- no match between any vertices of edges 1 and 2
+ END_IF;
+ END_IF;
+
+ -- exit if there are only two edges and they are connected
+
+ IF (SIZEOF(edges) = 2)
+ THEN RETURN(TRUE);
+ END_IF;
+
+ -- otherwise, check that any remaining edges are connected in list order.
+
+ REPEAT i := 3 TO HIINDEX(edges);
+ IF (edges[i].edge_start :=: next_vertex)
+ THEN next_vertex := edges[i].edge_end;
+ ELSE
+ IF (edges[i].edge_end :=: next_vertex)
+ THEN next_vertex := edges[i].edge_start;
+ ELSE RETURN(FALSE); -- no match is found.
+ END_IF;
+ END_IF;
+ END_REPEAT;
+ RETURN(TRUE);
+END_FUNCTION;
+
+FUNCTION check_text_alignment
+ (ct: composite_text) : BOOLEAN;
+ LOCAL
+ a : SET OF text_alignment := [];
+ END_LOCAL;
+
+ -- create a set of all the alignments
+ REPEAT i := 1 TO HIINDEX (ct.collected_text);
+ a := a + [ct.collected_text[i]\text_literal.alignment];
+ END_REPEAT;
+
+ -- if there is more than one element in the set
+ -- then not all alignments were the same
+ RETURN (SIZEOF(a) = 1);
+END_FUNCTION;
+
+FUNCTION check_text_font
+ (ct: composite_text) : BOOLEAN;
+ LOCAL
+ f : SET OF font_select := [];
+ END_LOCAL;
+
+ -- build a set of all the fonts
+ REPEAT i := 1 TO HIINDEX (ct.collected_text);
+ f := f + [ct.collected_text[i]\text_literal.font];
+ END_REPEAT;
+
+ -- if there is more than one element in the set
+ -- then not all fonts were the same
+ RETURN (SIZEOF(f) <= 1);
+END_FUNCTION;
+
+FUNCTION class_assignment_is_valid
+ (aia: applied_classification_assignment) : BOOLEAN;
+LOCAL
+ item: classification_item;
+ role: classification_role;
+END_LOCAL;
+
+role:= aia\classification_assignment.role;
+IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +'CLASS_SYSTEM' IN TYPEOF(aia\classification_assignment.assigned_class)) THEN
+ IF(role\classification_role.name <> 'class system membership') THEN
+ RETURN(FALSE);
+ END_IF;
+ REPEAT i:=LOINDEX(aia\applied_classification_assignment.items) TO HIINDEX(aia\applied_classification_assignment.items);
+ item:= aia\applied_classification_assignment.items[i];
+
+ IF (SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'CLASS_SYSTEM_ITEM'] * TYPEOF(item))=0) THEN
+-- item invalid if item does not belong to the types that may have a class_system
+ RETURN(FALSE);
+ END_IF;
+ END_REPEAT;
+END_IF;
+
+IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +'CHARACTERIZED_CLASS' IN TYPEOF(aia\classification_assignment.assigned_class)) THEN
+ IF NOT(role\classification_role.name IN ['definitional','non-definitional','']) THEN
+ RETURN(FALSE);
+ END_IF;
+
+
+ REPEAT i:=LOINDEX(aia\applied_classification_assignment.items) TO HIINDEX(aia\applied_classification_assignment.items);
+ item:= aia\applied_classification_assignment.items[i];
+
+ IF (SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'CLASSIFIED_ITEM'] * TYPEOF(item))=0) THEN
+-- item invalid if item does not belong to the types that may have a characterized_class
+ RETURN(FALSE);
+ END_IF;
+ END_REPEAT;
+END_IF;
+
+ IF
+ (role\classification_role.name = 'definitional')
+ THEN
+ IF NOT
+ (SIZEOF(QUERY(it <* aia\applied_classification_assignment.items | NOT
+ (SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION_FORMATION', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION'] * TYPEOF(it)) = 1)
+ )) = 0 )
+ THEN
+ RETURN(FALSE);
+ END_IF;
+ END_IF;
+
+RETURN(TRUE);
+END_FUNCTION;
+
+FUNCTION closed_shell_reversed
+ (a_shell: closed_shell) : oriented_closed_shell;
+ LOCAL
+ the_reverse : oriented_closed_shell;
+ END_LOCAL;
+ IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORIENTED_CLOSED_SHELL' IN TYPEOF (a_shell) ) THEN
+ the_reverse := dummy_tri ||
+ connected_face_set (
+ a_shell\connected_face_set.cfs_faces) ||
+ closed_shell () || oriented_closed_shell(
+ a_shell\oriented_closed_shell.closed_shell_element,
+ NOT(a_shell\oriented_closed_shell.orientation));
+ ELSE
+ the_reverse := dummy_tri ||
+ connected_face_set (
+ a_shell\connected_face_set.cfs_faces) ||
+ closed_shell () || oriented_closed_shell (a_shell, FALSE);
+ END_IF;
+ RETURN (the_reverse);
+END_FUNCTION;
+
+FUNCTION compute_total_depth
+ (swsrh: solid_with_stepped_round_hole) : positive_length_measure;
+LOCAL
+i : positive_integer;
+n : positive_integer := swsrh.segments;
+td : positive_length_measure := swsrh.segment_depths[1];
+END_LOCAL;
+
+IF n = 1
+THEN RETURN(td);
+ELSE
+ REPEAT i := 2 TO n;
+ td := td + swsrh.segment_depths[i];
+ END_REPEAT;
+END_IF;
+RETURN(td);
+END_FUNCTION;
+
+FUNCTION conditional_reverse
+ (p: BOOLEAN; an_item: reversible_topology) : reversible_topology;
+IF p THEN
+ RETURN (an_item);
+ ELSE
+ RETURN (topology_reversed (an_item));
+ END_IF;
+END_FUNCTION;
+
+FUNCTION constraints_composite_curve_on_surface
+ (c: composite_curve_on_surface) : BOOLEAN;
+ LOCAL
+ n_segments : INTEGER := SIZEOF(c.segments);
+ END_LOCAL;
+
+ REPEAT k := 1 TO n_segments;
+ IF (NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE' IN
+ TYPEOF(c\composite_curve.segments[k].parent_curve))) AND
+ (NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_CURVE' IN
+ TYPEOF(c\composite_curve.segments[k].parent_curve))) AND
+ (NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPOSITE_CURVE_ON_SURFACE' IN
+ TYPEOF(c\composite_curve.segments[k].parent_curve))) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_REPEAT;
+ RETURN(TRUE);
+END_FUNCTION;
+
+FUNCTION constraints_geometry_shell_based_surface_model
+ (m: shell_based_surface_model) : BOOLEAN;
+ LOCAL
+ result : BOOLEAN := TRUE;
+ END_LOCAL;
+
+ REPEAT j := 1 TO SIZEOF(m.sbsm_boundary);
+ IF (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OPEN_SHELL' IN
+ TYPEOF(m.sbsm_boundary[j])) AND
+ (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CLOSED_SHELL' IN
+ TYPEOF(m.sbsm_boundary[j]))))
+ THEN
+ result := FALSE;
+ RETURN(result);
+ (* A surface model is composed of OPEN_ and CLOSED_SHELLs. *)
+ END_IF;
+ END_REPEAT;
+ RETURN(result);
+END_FUNCTION;
+
+FUNCTION constraints_geometry_shell_based_wireframe_model
+ (m: shell_based_wireframe_model) : BOOLEAN;
+ LOCAL
+ result : BOOLEAN := TRUE;
+ END_LOCAL;
+
+ REPEAT j := 1 TO SIZEOF(m.sbwm_boundary);
+ IF (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.WIRE_SHELL' IN
+ TYPEOF(m.sbwm_boundary[j])) AND
+ (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_SHELL' IN
+ TYPEOF(m.sbwm_boundary[j]))))
+ THEN
+ result := FALSE;
+ RETURN(result);
+ (* A wireframe model is composed of WIRE_ and VERTEX_SHELLs *)
+ END_IF;
+ END_REPEAT;
+ RETURN(result);
+END_FUNCTION;
+
+FUNCTION constraints_param_b_spline
+ (degree: INTEGER; up_knots: INTEGER; up_cp: INTEGER; knot_mult: LIST [0:?] OF INTEGER; knots: LIST [0:?] OF parameter_value) : BOOLEAN;
+ LOCAL
+ result : BOOLEAN := TRUE;
+ k, sum : INTEGER;
+ END_LOCAL;
+
+ (* Find sum of knot multiplicities. *)
+ sum := knot_mult[1];
+
+ REPEAT i := 2 TO up_knots;
+ sum := sum + knot_mult[i];
+ END_REPEAT;
+
+ (* Check limits holding for all B-spline parametrisations *)
+ IF (degree < 1) OR (up_knots < 2) OR (up_cp < degree) OR
+ (sum <> (degree + up_cp + 2)) THEN
+ result := FALSE;
+ RETURN(result);
+ END_IF;
+
+ k := knot_mult[1];
+
+ IF (k < 1) OR (k > degree + 1) THEN
+ result := FALSE;
+ RETURN(result);
+ END_IF;
+
+ REPEAT i := 2 TO up_knots;
+ IF (knot_mult[i] < 1) OR (knots[i] <= knots[i-1]) THEN
+ result := FALSE;
+ RETURN(result);
+ END_IF;
+
+ k := knot_mult[i];
+
+ IF (i < up_knots) AND (k > degree) THEN
+ result := FALSE;
+ RETURN(result);
+ END_IF;
+
+ IF (i = up_knots) AND (k > degree + 1) THEN
+ result := FALSE;
+ RETURN(result);
+ END_IF;
+ END_REPEAT;
+ RETURN(result);
+END_FUNCTION;
+
+FUNCTION constraints_rectangular_composite_surface
+ (s: rectangular_composite_surface) : BOOLEAN;
+REPEAT i := 1 TO s.n_u;
+ REPEAT j := 1 TO s.n_v;
+ IF NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_SURFACE' IN TYPEOF
+ (s.segments[i][j].parent_surface)) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.RECTANGULAR_TRIMMED_SURFACE' IN TYPEOF
+ (s.segments[i][j].parent_surface))) THEN
+ RETURN(FALSE);
+ END_IF;
+ END_REPEAT;
+ END_REPEAT;
+
+ (* Check the transition codes, omitting the last row or column *)
+ REPEAT i := 1 TO s.n_u-1;
+ REPEAT j := 1 TO s.n_v;
+ IF s.segments[i][j].u_transition = discontinuous THEN
+ RETURN(FALSE);
+ END_IF;
+ END_REPEAT;
+ END_REPEAT;
+
+ REPEAT i := 1 TO s.n_u;
+ REPEAT j := 1 TO s.n_v-1;
+ IF s.segments[i][j].v_transition = discontinuous THEN
+ RETURN(FALSE);
+ END_IF;
+ END_REPEAT;
+ END_REPEAT;
+ RETURN(TRUE);
+END_FUNCTION;
+
+FUNCTION control_characters_free
+ (s: STRING) : BOOLEAN;
+ LOCAL
+ ch : STRING;
+ END_LOCAL;
+
+ REPEAT i:=1 TO LENGTH(s);
+ ch := s[i];
+ IF (ch = '\x9') OR (ch = '\xA') OR (ch = '\xD') THEN
+ RETURN(FALSE);
+ END_IF;
+ END_REPEAT;
+ RETURN (TRUE);
+END_FUNCTION;
+
+FUNCTION cross_product
+ (arg1: direction; arg2: direction) : vector;
+ LOCAL
+ mag : REAL;
+ res : direction;
+ v1,v2 : LIST[3:3] OF REAL;
+ result : vector;
+ END_LOCAL;
+
+ IF ( NOT EXISTS (arg1) OR (arg1.dim = 2)) OR
+ ( NOT EXISTS (arg2) OR (arg2.dim = 2)) THEN
+ RETURN(?);
+ ELSE
+ BEGIN
+ v1 := normalise(arg1).direction_ratios;
+ v2 := normalise(arg2).direction_ratios;
+ res := dummy_gri || direction([(v1[2]*v2[3] - v1[3]*v2[2]),
+ (v1[3]*v2[1] - v1[1]*v2[3]), (v1[1]*v2[2] - v1[2]*v2[1])]);
+ mag := 0.0;
+ REPEAT i := 1 TO 3;
+ mag := mag + res.direction_ratios[i]*res.direction_ratios[i];
+ END_REPEAT;
+ IF (mag > 0.0) THEN
+ result := dummy_gri || vector(res, SQRT(mag));
+ ELSE
+ result := dummy_gri || vector(arg1, 0.0);
+ END_IF;
+ RETURN(result);
+ END;
+ END_IF;
+END_FUNCTION;
+
+FUNCTION curve_weights_positive
+ (b: rational_b_spline_curve) : BOOLEAN;
+ LOCAL
+ result : BOOLEAN := TRUE;
+ END_LOCAL;
+
+ REPEAT i := 0 TO b.upper_index_on_control_points;
+ IF b.weights[i] <= 0.0 THEN
+ result := FALSE;
+ RETURN(result);
+ END_IF;
+ END_REPEAT;
+ RETURN(result);
+END_FUNCTION;
+
+FUNCTION default_tolerance_table_cell_wr2
+ (agg: compound_item_definition) : BOOLEAN;
+BEGIN
+IF SIZEOF(agg) <= 5 THEN
+ RETURN(TRUE);
+ELSE
+ RETURN(FALSE);
+END_IF;
+END;
+END_FUNCTION;
+
+FUNCTION default_tolerance_table_cell_wr3
+ (agg: compound_item_definition) : BOOLEAN;
+BEGIN
+IF (SIZEOF(QUERY ( i <* agg | (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MEASURE_REPRESENTATION_ITEM' IN TYPEOF(i))
+ AND (i\representation_item.name = 'significant number of digits')) )) = 1) OR
+((SIZEOF(QUERY ( i <* agg | (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MEASURE_REPRESENTATION_ITEM' IN TYPEOF(i)) AND
+ (i\representation_item.name = 'lower limit')) )) = 1) AND
+(SIZEOF( QUERY ( i <* agg | (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MEASURE_REPRESENTATION_ITEM' IN TYPEOF(i)) AND
+ (i\representation_item.name = 'upper limit')) )) = 1)) THEN
+ RETURN(TRUE);
+ELSE
+ RETURN(FALSE);
+END_IF;
+END;
+END_FUNCTION;
+
+FUNCTION default_tolerance_table_cell_wr4
+ (agg: compound_item_definition) : BOOLEAN;
+BEGIN
+IF (SIZEOF(QUERY ( i <* agg | (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MEASURE_REPRESENTATION_ITEM' IN TYPEOF(i)) AND
+ (i\representation_item.name = 'plus minus tolerance value')) )) = 1) OR
+((SIZEOF(QUERY ( i <* agg | (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MEASURE_REPRESENTATION_ITEM' IN TYPEOF(i)) AND (
+ i\representation_item.name = 'lower tolerance value')) )) = 1) AND
+(SIZEOF( QUERY ( i <* agg | (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MEASURE_REPRESENTATION_ITEM' IN TYPEOF(i)) AND (
+ i\representation_item.name = 'upper tolerance value')) )) = 1)) THEN
+ RETURN(TRUE);
+ELSE
+ RETURN(FALSE);
+END_IF;
+END;
+END_FUNCTION;
+
+FUNCTION default_tolerance_table_cell_wr5
+ (agg: compound_item_definition) : BOOLEAN;
+BEGIN
+IF (SIZEOF(QUERY ( i <* agg | ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF(i)) )) <= 1) AND
+(SIZEOF(QUERY ( i <* agg | ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF(i)) )) =
+ SIZEOF(QUERY ( i <* agg | (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF(i)) AND
+ (i\representation_item.name = 'cell description'))) ))
+THEN
+ RETURN(TRUE);
+ELSE
+ RETURN(FALSE);
+END_IF;
+END;
+END_FUNCTION;
+
+FUNCTION dependently_instantiated
+ (set_of_input_instances: SET [0:?] OF GENERIC: igen; set_of_input_types: SET [0:?] OF STRING; previous_in_chain: LIST [0:?] OF GENERIC: cgen) : BOOLEAN;
+LOCAL
+ number_of_input_instances : INTEGER;
+ number_of_referring_instances : INTEGER;
+ bag_of_referring_instances : BAG OF GENERIC:igen := [];
+ dependently_instantiated_flag : BOOLEAN;
+ previous_in_chain_plus : LIST OF GENERIC:cgen := [];
+ result : BOOLEAN := true;
+ set_of_types : SET OF STRING := [];
+END_LOCAL;
+
+IF EXISTS(set_of_input_instances) THEN
+ number_of_input_instances := SIZEOF(set_of_input_instances);
+ (* Add the declared type of bag_of_referring_instances to the set of
+ types of the REFERENCEd instances for the subset comparison later.
+ *)
+ set_of_input_types := set_of_input_types + 'GENERIC';
+ REPEAT i:=1 TO number_of_input_instances;
+ (* Determine all references to the current input instance. *)
+ bag_of_referring_instances := USEDIN (set_of_input_instances[i] , '');
+ IF EXISTS(bag_of_referring_instances) THEN
+ number_of_referring_instances := SIZEOF(bag_of_referring_instances);
+ dependently_instantiated_flag := false;
+ REPEAT j:=1 TO number_of_referring_instances;
+ (* Determine the type strings of the current referencing instance.
+ *)
+ set_of_types := TYPEOF(bag_of_referring_instances[j]);
+ (* If the referencing instance is of one of the types of the
+ only dependently instantiable select items, the current input
+ instance may still be invalidly instantiated.
+ Otherwise it is OK, and the next input instance is tested.
+ *)
+ IF set_of_types <= set_of_input_types THEN -- subset operator
+ (* The referring instance is of one of the restricted types.
+ However, it may itself be referred to by a valid instance;
+ then also the current instance would be valid.
+ Thus, call this function recursively with the referring
+ instance as input.
+ To avoid an infinite loop in case a set of instances
+ reference each other in a closed loop, test first whether
+ the current referencing instance is in the list of
+ previously processed chain members.
+ *)
+ IF NOT (bag_of_referring_instances[j] IN previous_in_chain) THEN
+ previous_in_chain_plus := previous_in_chain +
+ set_of_input_instances[i];
+ IF dependently_instantiated([bag_of_referring_instances[j]],
+ set_of_input_types,
+ previous_in_chain_plus) THEN
+ dependently_instantiated_flag := true;
+ ESCAPE; -- dependently instantiated; next input instance
+ ELSE
+ (* Not dependently instantiated: go to next referring
+ instance. *)
+ SKIP;
+ END_IF;
+ END_IF;
+ ELSE
+ dependently_instantiated_flag := true;
+ ESCAPE; -- dependently instantiated; take next input instance
+ END_IF;
+ END_REPEAT;
+ IF NOT dependently_instantiated_flag THEN
+ RETURN(false);
+ END_IF;
+ ELSE
+ RETURN(false); -- not referenced at all => invalidly instantiated
+ END_IF;
+ END_REPEAT;
+ELSE
+ RETURN(false); -- no input
+END_IF;
+
+RETURN(true);
+END_FUNCTION;
+
+FUNCTION derive_angle
+ (placement_1: axis2_placement_3d; placement_2: axis2_placement_3d) : plane_angle_measure;
+ LOCAL
+ v1 : direction;
+ v2 : direction;
+ mag_v1 : REAL;
+ mag_v2 : REAL;
+ theta : plane_angle_measure;
+ END_LOCAL;
+ v1 := placement_1.p[1];
+ v2 := placement_2.p[1];
+ mag_v1 := SQRT (v1.direction_ratios[1]*v1.direction_ratios[1] +
+ v1.direction_ratios[2]*v1.direction_ratios[2]);
+ mag_v2 := SQRT (v2.direction_ratios[1]*v2.direction_ratios[1] +
+ v2.direction_ratios[2]*v2.direction_ratios[2]);
+ IF ((mag_v1 = 0.0) OR (mag_v2 = 0.0)) THEN
+ theta := 0.0;
+ RETURN (theta);
+ END_IF;
+ theta := ACOS ((v1.direction_ratios[1]*v2.direction_ratios[1] +
+ v1.direction_ratios[2]*v2.direction_ratios[2]) /
+ (mag_v1*mag_v2));
+ RETURN (theta);
+END_FUNCTION;
+
+FUNCTION derive_dimensional_exponents
+ (x: unit) : dimensional_exponents;
+ LOCAL
+ result : dimensional_exponents := dimensional_exponents(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
+ END_LOCAL;
+
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DERIVED_UNIT' IN TYPEOF(x) THEN
+ REPEAT i := LOINDEX(x\derived_unit.elements) TO HIINDEX(x\derived_unit.elements);
+ result.length_exponent := result.length_exponent +
+ (x\derived_unit.elements[i]\derived_unit_element.exponent *
+ x\derived_unit.elements[i]\derived_unit_element.unit\named_unit.dimensions.length_exponent);
+ result.mass_exponent := result.mass_exponent +
+ (x\derived_unit.elements[i]\derived_unit_element.exponent *
+ x\derived_unit.elements[i]\derived_unit_element.unit\named_unit.dimensions.mass_exponent);
+ result.time_exponent := result.time_exponent +
+ (x\derived_unit.elements[i]\derived_unit_element.exponent *
+ x\derived_unit.elements[i]\derived_unit_element.unit\named_unit.dimensions.time_exponent);
+ result.electric_current_exponent := result.electric_current_exponent +
+ (x\derived_unit.elements[i]\derived_unit_element.exponent *
+ x\derived_unit.elements[i]\derived_unit_element.unit\named_unit.dimensions.electric_current_exponent);
+ result.thermodynamic_temperature_exponent := result.thermodynamic_temperature_exponent +
+ (x\derived_unit.elements[i]\derived_unit_element.exponent *
+ x\derived_unit.elements[i]\derived_unit_element.unit\named_unit.dimensions.thermodynamic_temperature_exponent);
+ result.amount_of_substance_exponent := result.amount_of_substance_exponent +
+ (x\derived_unit.elements[i]\derived_unit_element.exponent *
+ x\derived_unit.elements[i]\derived_unit_element.unit\named_unit.dimensions.amount_of_substance_exponent);
+ result.luminous_intensity_exponent := result.luminous_intensity_exponent +
+ (x\derived_unit.elements[i]\derived_unit_element.exponent *
+ x\derived_unit.elements[i]\derived_unit_element.unit\named_unit.dimensions.luminous_intensity_exponent);
+ END_REPEAT;
+ ELSE
+ result := x\named_unit.dimensions;
+ END_IF;
+ RETURN (result);
+END_FUNCTION;
+
+FUNCTION dimension_of
+ (item: geometric_representation_item) : dimension_count;
+ LOCAL
+ x : SET OF representation;
+ y : representation_context;
+ dim : dimension_count;
+ END_LOCAL;
+ -- For cartesian_point, direction, or vector dimension is determined by
+ -- counting components.
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CARTESIAN_POINT' IN TYPEOF(item) THEN
+ dim := SIZEOF(item\cartesian_point.coordinates);
+ RETURN(dim);
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DIRECTION' IN TYPEOF(item) THEN
+ dim := SIZEOF(item\direction.direction_ratios);
+ RETURN(dim);
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VECTOR' IN TYPEOF(item) THEN
+ dim := SIZEOF(item\vector.orientation\direction.direction_ratios);
+ RETURN(dim);
+ END_IF;
+ -- For all other types of geometric_representation_item dim is obtained
+ -- via context.
+ -- Find the set of representation in which the item is used.
+
+ x := using_representations(item);
+
+ -- Determines the dimension_count of the
+ -- geometric_representation_context. Note that the
+ -- RULE compatible_dimension ensures that the context_of_items
+ -- is of type geometric_representation_context and has
+ -- the same dimension_count for all values of x.
+ -- The SET x is non-empty since this is required by WR1 of
+ -- representation_item.
+ y := x[1].context_of_items;
+ dim := y\geometric_representation_context.coordinate_space_dimension;
+ RETURN (dim);
+END_FUNCTION;
+
+FUNCTION dimensions_for_si_unit
+ (n: si_unit_name) : dimensional_exponents;
+CASE n OF
+ metre:
+ RETURN (dimensional_exponents(1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0));
+ gram:
+ RETURN (dimensional_exponents(0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0));
+ second:
+ RETURN (dimensional_exponents(0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0));
+ ampere:
+ RETURN (dimensional_exponents(0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0));
+ kelvin:
+ RETURN (dimensional_exponents(0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0));
+ mole:
+ RETURN (dimensional_exponents(0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0));
+ candela:
+ RETURN (dimensional_exponents(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0));
+ radian:
+ RETURN (dimensional_exponents(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0));
+ steradian:
+ RETURN (dimensional_exponents(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0));
+ hertz:
+ RETURN (dimensional_exponents(0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0));
+ newton:
+ RETURN (dimensional_exponents(1.0, 1.0, -2.0, 0.0, 0.0, 0.0, 0.0));
+ pascal:
+ RETURN (dimensional_exponents(-1.0, 1.0, -2.0, 0.0, 0.0, 0.0, 0.0));
+ joule:
+ RETURN (dimensional_exponents(2.0, 1.0, -2.0, 0.0, 0.0, 0.0, 0.0));
+ watt:
+ RETURN (dimensional_exponents(2.0, 1.0, -3.0, 0.0, 0.0, 0.0, 0.0));
+ coulomb:
+ RETURN (dimensional_exponents(0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 0.0));
+ volt:
+ RETURN (dimensional_exponents(2.0, 1.0, -3.0, -1.0, 0.0, 0.0, 0.0));
+ farad:
+ RETURN (dimensional_exponents(-2.0, -1.0, 4.0, 1.0, 0.0, 0.0, 0.0));
+ ohm:
+ RETURN (dimensional_exponents(2.0, 1.0, -3.0, -2.0, 0.0, 0.0, 0.0));
+ siemens:
+ RETURN (dimensional_exponents(-2.0, -1.0, 3.0, 2.0, 0.0, 0.0, 0.0));
+ weber:
+ RETURN (dimensional_exponents(2.0, 1.0, -2.0, -1.0, 0.0, 0.0, 0.0));
+ tesla:
+ RETURN (dimensional_exponents(0.0, 1.0, -2.0, -1.0, 0.0, 0.0, 0.0));
+ henry:
+ RETURN (dimensional_exponents(2.0, 1.0, -2.0, -2.0, 0.0, 0.0, 0.0));
+ degree_Celsius:
+ RETURN (dimensional_exponents(0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0));
+ lumen:
+ RETURN (dimensional_exponents(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0));
+ lux:
+ RETURN (dimensional_exponents(-2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0));
+ becquerel:
+ RETURN (dimensional_exponents(0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0));
+ gray:
+ RETURN (dimensional_exponents(2.0, 0.0, -2.0, 0.0, 0.0, 0.0, 0.0));
+ sievert:
+ RETURN (dimensional_exponents(2.0, 0.0, -2.0, 0.0, 0.0, 0.0, 0.0));
+ OTHERWISE:
+ RETURN (?);
+ END_CASE;
+END_FUNCTION;
+
+FUNCTION dot_product
+ (arg1: direction; arg2: direction) : REAL;
+ LOCAL
+ scalar : REAL;
+ vec1, vec2: direction;
+ ndim : INTEGER;
+ END_LOCAL;
+
+ IF NOT EXISTS (arg1) OR NOT EXISTS (arg2) THEN
+ scalar := ?;
+ (* When function is called with invalid data an indeterminate result
+ is returned *)
+ ELSE
+ IF (arg1.dim <> arg2.dim) THEN
+ scalar := ?;
+ (* When function is called with invalid data an indeterminate result
+ is returned *)
+ ELSE
+ BEGIN
+ vec1 := normalise(arg1);
+ vec2 := normalise(arg2);
+ ndim := arg1.dim;
+ scalar := 0.0;
+ REPEAT i := 1 TO ndim;
+ scalar := scalar +
+ vec1.direction_ratios[i]*vec2.direction_ratios[i];
+ END_REPEAT;
+ END;
+ END_IF;
+ END_IF;
+ RETURN (scalar);
+END_FUNCTION;
+
+FUNCTION edge_reversed
+ (an_edge: edge) : oriented_edge;
+ LOCAL
+ the_reverse : oriented_edge;
+ END_LOCAL;
+
+ IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORIENTED_EDGE' IN TYPEOF (an_edge) ) THEN
+ the_reverse := dummy_tri ||
+ edge(an_edge.edge_end, an_edge.edge_start) ||
+ oriented_edge(an_edge\oriented_edge.edge_element,
+ NOT (an_edge\oriented_edge.orientation)) ;
+ ELSE
+ the_reverse := dummy_tri ||
+ edge(an_edge.edge_end, an_edge.edge_start) ||
+ oriented_edge(an_edge, FALSE);
+ END_IF;
+ RETURN (the_reverse);
+END_FUNCTION;
+
+FUNCTION external_version_assignment_is_valid
+ (aia: applied_external_identification_assignment) : BOOLEAN;
+ LOCAL
+ item: identification_item;
+ role: identification_role;
+ END_LOCAL;
+ role:= aia.role;
+ IF role.name='version' THEN
+ REPEAT i:=LOINDEX(aia.items) TO HIINDEX(aia.items);
+ item:= aia.items[i];
+ IF (SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'EXTERNALLY_VERSIONED_ITEM']*TYPEOF(item))=0) THEN
+ -- item invalid if item does not belong to versionable types
+ RETURN(FALSE);
+ END_IF;
+ END_REPEAT;
+ RETURN(TRUE);
+ ELSE -- case where aia does not convey a version id
+ RETURN(TRUE);
+ END_IF;
+END_FUNCTION;
+
+FUNCTION face_bound_reversed
+ (a_face_bound: face_bound) : face_bound;
+ LOCAL
+ the_reverse : face_bound ;
+ END_LOCAL;
+ IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_OUTER_BOUND' IN TYPEOF (a_face_bound) ) THEN
+ the_reverse := dummy_tri ||
+ face_bound(a_face_bound\face_bound.bound,
+ NOT (a_face_bound\face_bound.orientation))
+ || face_outer_bound() ;
+ ELSE
+ the_reverse := dummy_tri ||
+ face_bound(a_face_bound.bound, NOT(a_face_bound.orientation));
+ END_IF;
+ RETURN (the_reverse);
+END_FUNCTION;
+
+FUNCTION face_reversed
+ (a_face: face) : oriented_face;
+ LOCAL
+ the_reverse : oriented_face ;
+ END_LOCAL;
+ IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORIENTED_FACE' IN TYPEOF (a_face) ) THEN
+ the_reverse := dummy_tri ||
+ face(set_of_topology_reversed(a_face.bounds)) ||
+ oriented_face(a_face\oriented_face.face_element,
+ NOT (a_face\oriented_face.orientation)) ;
+ ELSE
+ the_reverse := dummy_tri ||
+ face(set_of_topology_reversed(a_face.bounds)) ||
+ oriented_face(a_face, FALSE) ;
+ END_IF;
+ RETURN (the_reverse);
+END_FUNCTION;
+
+FUNCTION first_proj_axis
+ (z_axis: direction; arg: direction) : direction;
+ LOCAL
+ x_axis : direction;
+ v : direction;
+ z : direction;
+ x_vec : vector;
+ END_LOCAL;
+
+ IF (NOT EXISTS(z_axis)) THEN
+ RETURN (?) ;
+ ELSE
+ z := normalise(z_axis);
+ IF NOT EXISTS(arg) THEN
+ IF ((z.direction_ratios <> [1.0,0.0,0.0]) AND
+ (z.direction_ratios <> [-1.0,0.0,0.0])) THEN
+ v := dummy_gri || direction([1.0,0.0,0.0]);
+ ELSE
+ v := dummy_gri || direction([0.0,1.0,0.0]);
+ END_IF;
+ ELSE
+ IF (arg.dim <> 3) THEN
+ RETURN (?) ;
+ END_IF;
+ IF ((cross_product(arg,z).magnitude) = 0.0) THEN
+ RETURN (?);
+ ELSE
+ v := normalise(arg);
+ END_IF;
+ END_IF;
+ x_vec := scalar_times_vector(dot_product(v, z), z);
+ x_axis := vector_difference(v, x_vec).orientation;
+ x_axis := normalise(x_axis);
+ END_IF;
+ RETURN(x_axis);
+END_FUNCTION;
+
+FUNCTION gbsf_check_curve
+ (cv: representation_item) : BOOLEAN;
+IF SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.BOUNDED_CURVE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONIC', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_REPLICA', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LINE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OFFSET_CURVE_3D'] * TYPEOF(cv)) > 1 THEN
+ RETURN (FALSE);
+ END_IF;
+ IF SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CIRCLE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ELLIPSE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TRIMMED_CURVE'] * TYPEOF(cv)) = 1 THEN
+ RETURN (TRUE);
+ ELSE
+ IF (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_CURVE' IN TYPEOF(cv)) AND (cv\b_spline_curve.self_intersect = FALSE) OR (cv\b_spline_curve.self_intersect = UNKNOWN)) THEN
+ RETURN (TRUE);
+ ELSE
+ IF (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPOSITE_CURVE' IN TYPEOF(cv)) AND (cv\composite_curve.self_intersect = FALSE) OR (cv\composite_curve.self_intersect = UNKNOWN)) THEN
+ RETURN (SIZEOF(QUERY(seg <* cv\composite_curve.segments | NOT (gbsf_check_curve(seg.parent_curve)))) = 0);
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_REPLICA' IN TYPEOF(cv) THEN
+ RETURN (gbsf_check_curve(cv\curve_replica.parent_curve));
+ ELSE
+ IF (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OFFSET_CURVE_3D' IN TYPEOF(cv)) AND ((cv\offset_curve_3d.self_intersect = FALSE) OR (cv\offset_curve_3d.self_intersect = UNKNOWN)) AND (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE' IN TYPEOF(cv\offset_curve_3d.basis_curve)))) THEN
+ RETURN (gbsf_check_curve(cv\offset_curve_3d.basis_curve));
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE' IN TYPEOF(cv) THEN
+ RETURN ((gbsf_check_curve(cv\pcurve.reference_to_curve\representation.items[1])) AND (gbsf_check_surface(cv\pcurve.basis_surface)));
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE' IN TYPEOF(cv) THEN
+ IF (SIZEOF(cv\polyline.points) >= 3) THEN
+ RETURN (TRUE);
+ END_IF;
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_CURVE' IN TYPEOF(cv) THEN
+ IF gbsf_check_curve(cv\surface_curve.curve_3d) THEN
+ REPEAT i := 1 TO SIZEOF(cv\surface_curve.associated_geometry);
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE' IN TYPEOF(cv\surface_curve.associated_geometry[i]) THEN
+ IF NOT gbsf_check_surface(cv\surface_curve.associated_geometry[i]) THEN
+ RETURN (FALSE);
+ END_IF;
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE' IN TYPEOF(cv\surface_curve.associated_geometry[i]) THEN
+ IF NOT gbsf_check_curve(cv\surface_curve.associated_geometry[i]) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ END_IF;
+ END_REPEAT;
+ RETURN (TRUE);
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ RETURN (FALSE);
+END_FUNCTION;
+
+FUNCTION gbsf_check_point
+ (pnt: point) : BOOLEAN;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CARTESIAN_POINT' IN TYPEOF(pnt) THEN
+ RETURN (TRUE);
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_ON_CURVE' IN TYPEOF(pnt) THEN
+ RETURN (gbsf_check_curve(pnt\point_on_curve.basis_curve));
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_ON_SURFACE' IN TYPEOF(pnt) THEN
+ RETURN (gbsf_check_surface(pnt\point_on_surface.basis_surface));
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DEGENERATE_PCURVE' IN TYPEOF(pnt) THEN
+ RETURN ((gbsf_check_curve(pnt\degenerate_pcurve.reference_to_curve\representation.items[1])) AND (gbsf_check_surface(pnt\degenerate_pcurve.basis_surface)));
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ RETURN (FALSE);
+END_FUNCTION;
+
+FUNCTION gbsf_check_surface
+ (sf: surface) : BOOLEAN;
+IF (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_SURFACE' IN TYPEOF(sf)) AND (sf\b_spline_surface.self_intersect = FALSE) OR (sf\b_spline_surface.self_intersect = UNKNOWN)) THEN
+ RETURN (TRUE);
+ ELSE
+ IF SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SPHERICAL_SURFACE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TOROIDAL_SURFACE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_BOUNDED_SURFACE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.RECTANGULAR_TRIMMED_SURFACE'] * TYPEOF(sf)) = 1 THEN
+ RETURN (TRUE);
+ ELSE
+ IF (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OFFSET_SURFACE' IN TYPEOF(sf)) AND (sf\offset_surface.self_intersect = FALSE) OR (sf\offset_surface.self_intersect = UNKNOWN)) THEN
+ RETURN (gbsf_check_surface(sf\offset_surface.basis_surface));
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.RECTANGULAR_COMPOSITE_SURFACE' IN TYPEOF(sf) THEN
+ REPEAT i := 1 TO SIZEOF(sf\rectangular_composite_surface.segments);
+ REPEAT j := 1 TO SIZEOF(sf\rectangular_composite_surface.segments[i]);
+ IF NOT (gbsf_check_surface(sf\rectangular_composite_surface.segments[i][j].parent_surface)) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_REPEAT;
+ END_REPEAT;
+ RETURN (TRUE);
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_REPLICA' IN TYPEOF(sf) THEN
+ RETURN (gbsf_check_surface(sf\surface_replica.parent_surface));
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_OF_REVOLUTION' IN TYPEOF(sf) THEN
+ RETURN (gbsf_check_curve(sf\swept_surface.swept_curve));
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ RETURN (FALSE);
+END_FUNCTION;
+
+FUNCTION get_basis_surface
+ (c: curve_on_surface) : SET [0:2] OF surface;
+ LOCAL
+ surfs : SET[0:2] OF surface;
+ n : INTEGER;
+ END_LOCAL;
+ surfs := [];
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE' IN TYPEOF (c) THEN
+ surfs := [c\pcurve.basis_surface];
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_CURVE' IN TYPEOF (c) THEN
+ n := SIZEOF(c\surface_curve.associated_geometry);
+ REPEAT i := 1 TO n;
+ surfs := surfs +
+ associated_surface(c\surface_curve.associated_geometry[i]);
+ END_REPEAT;
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPOSITE_CURVE_ON_SURFACE' IN TYPEOF (c) THEN
+ (* For a composite_curve_on_surface the basis_surface is the intersection
+ of the basis_surfaces of all the segments. *)
+ n := SIZEOF(c\composite_curve.segments);
+ surfs := get_basis_surface(
+ c\composite_curve.segments[1].parent_curve);
+ IF n > 1 THEN
+ REPEAT i := 2 TO n;
+ surfs := surfs * get_basis_surface(
+ c\composite_curve.segments[i].parent_curve);
+ END_REPEAT;
+ END_IF;
+
+ END_IF;
+ RETURN(surfs);
+END_FUNCTION;
+
+FUNCTION get_description_value
+ (obj: description_attribute_select) : text;
+ LOCAL
+ description_bag : BAG OF description_attribute := (USEDIN(obj, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'DESCRIPTION_ATTRIBUTE.' + 'DESCRIBED_ITEM'));
+ END_LOCAL;
+
+ IF SIZEOF(description_bag) = 1 THEN
+ RETURN (description_bag[1].attribute_value);
+ ELSE
+ RETURN (?);
+ END_IF;
+END_FUNCTION;
+
+FUNCTION get_id_value
+ (obj: id_attribute_select) : identifier;
+ LOCAL
+ id_bag : BAG OF id_attribute := (USEDIN(obj, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ID_ATTRIBUTE.' + 'IDENTIFIED_ITEM'));
+ END_LOCAL;
+
+ IF SIZEOF(id_bag) = 1 THEN
+ RETURN (id_bag[1].attribute_value);
+ ELSE
+ RETURN (?);
+ END_IF;
+END_FUNCTION;
+
+FUNCTION get_name_value
+ (obj: name_attribute_select) : label;
+ LOCAL
+ name_bag : BAG OF name_attribute := (USEDIN(obj, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'NAME_ATTRIBUTE.' + 'NAMED_ITEM'));
+ END_LOCAL;
+
+ IF SIZEOF(name_bag) = 1 THEN
+ RETURN (name_bag[1].attribute_value);
+ ELSE
+ RETURN (?);
+ END_IF;
+END_FUNCTION;
+
+FUNCTION get_role
+ (obj: role_select) : object_role;
+ LOCAL
+ role_bag : BAG OF role_association := (USEDIN(obj, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ROLE_ASSOCIATION.' + 'ITEM_WITH_ROLE'));
+ END_LOCAL;
+
+ IF SIZEOF(role_bag) = 1 THEN
+ RETURN (role_bag[1].role);
+ ELSE
+ RETURN (?);
+ END_IF;
+END_FUNCTION;
+
+FUNCTION get_shape_aspect_property_definition_representations
+ (s_a_instance: shape_aspect) : SET [0:?] OF property_definition_representation;
+LOCAL
+pd_set : SET OF property_definition := [];
+pdr_set : SET OF property_definition_representation := [] ;
+END_LOCAL;
+pd_set := bag_to_set(USEDIN(s_a_instance, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PROPERTY_DEFINITION.DEFINITION'));
+IF (SIZEOF(pd_set) < 1) THEN
+RETURN (pdr_set);
+END_IF;
+REPEAT i := 1 TO HIINDEX(pd_set);
+pdr_set := pdr_set + (QUERY(pdr <* USEDIN(pd_set[i], 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'PROPERTY_DEFINITION_REPRESENTATION.' + 'DEFINITION') |
+'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHAPE_DEFINITION_REPRESENTATION' IN TYPEOF(pdr)));
+END_REPEAT;
+RETURN (pdr_set);
+END_FUNCTION;
+
+FUNCTION is_acyclic
+ (arg: generic_expression) : BOOLEAN;
+RETURN (acyclic (arg, []));
+END_FUNCTION;
+
+FUNCTION is_int_expr
+ (arg: numeric_expression) : LOGICAL;
+LOCAL
+ i: INTEGER := 0;
+END_LOCAL;
+
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.INT_LITERAL' IN TYPEOF(arg)
+THEN
+ RETURN (TRUE);
+END_IF;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.REAL_LITERAL' IN TYPEOF(arg)
+THEN
+ RETURN (FALSE);
+END_IF;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.INT_NUMERIC_VARIABLE' IN TYPEOF(arg)
+THEN
+ RETURN (TRUE);
+END_IF;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.REAL_NUMERIC_VARIABLE' IN TYPEOF(arg)
+THEN
+ RETURN (FALSE);
+END_IF;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ABS_FUNCTION' IN TYPEOF(arg)
+THEN
+ RETURN (is_int_expr(arg\unary_numeric_expression.operand));
+END_IF;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MINUS_FUNCTION' IN TYPEOF(arg)
+THEN
+ RETURN (is_int_expr(arg\unary_numeric_expression.operand));
+END_IF;
+IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SIN_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COS_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TAN_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ASIN_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ACOS_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ATAN_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EXP_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LOG_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LOG2_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LOG10_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SQUARE_ROOT_FUNCTION'
+ IN TYPEOF(arg))
+THEN
+ RETURN (FALSE);
+END_IF;
+IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PLUS_EXPRESSION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MULT_EXPRESSION'
+ IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAXIMUM_FUNCTION'
+ IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MINIMUM_FUNCTION'
+ IN TYPEOF(arg))
+THEN
+ REPEAT i :=1 TO SIZEOF (
+ arg\multiple_arity_numeric_expression.operands);
+ IF NOT
+ is_int_expr(arg\multiple_arity_numeric_expression.operands[i])
+ THEN
+ RETURN (FALSE);
+ END_IF;
+ END_REPEAT;
+ RETURN (TRUE);
+END_IF;
+IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MINUS_EXPRESSION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POWER_EXPRESSION'
+ IN TYPEOF(arg))
+THEN
+ RETURN (is_int_expr(arg\binary_numeric_expression.operands[1])
+ AND is_int_expr(arg\binary_numeric_expression.operands[2]));
+END_IF;
+IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DIV_EXPRESSION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MOD_EXPRESSION' IN TYPEOF(arg))
+THEN
+ RETURN(TRUE);
+END_IF;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SLASH_EXPRESSION' IN TYPEOF(arg)
+THEN
+ RETURN (FALSE);
+END_IF;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LENGTH_FUNCTION' IN TYPEOF(arg)
+THEN
+ RETURN (TRUE);
+END_IF;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VALUE_FUNCTION' IN TYPEOF(arg)
+THEN
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.INT_VALUE_FUNCTION'
+ IN TYPEOF(arg)
+ THEN
+ RETURN (TRUE);
+ ELSE
+ RETURN (FALSE);
+ END_IF;
+END_IF;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.INTEGER_DEFINED_FUNCTION'
+ IN TYPEOF(arg)
+THEN
+ RETURN(TRUE) ;
+END_IF;
+IF'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.REAL_DEFINED_FUNCTION' IN TYPEOF(arg)
+THEN
+ RETURN(FALSE) ;
+END_IF ;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.BOOLEAN_DEFINED_FUNCTION'
+ IN TYPEOF(arg)
+THEN
+ RETURN(FALSE) ;
+END_IF ;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STRING_DEFINED_FUNCTION'
+ IN TYPEOF(arg)
+THEN
+ RETURN (FALSE) ;
+END_IF ;
+
+RETURN (FALSE);
+END_FUNCTION;
+
+FUNCTION is_SQL_mappable
+ (arg: expression) : LOGICAL;
+LOCAL
+ i: INTEGER;
+END_LOCAL;
+
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SIMPLE_NUMERIC_EXPRESSION'
+ IN TYPEOF (arg)
+THEN
+ RETURN (TRUE);
+END_IF;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SQL_MAPPABLE_DEFINED_FUNCTION'
+ IN TYPEOF (arg)
+THEN
+ RETURN (TRUE);
+END_IF;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MINUS_FUNCTION' IN TYPEOF(arg)
+THEN
+ RETURN (is_SQL_mappable(arg\unary_numeric_expression.operand));
+END_IF;
+IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ABS_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SIN_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COS_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TAN_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ASIN_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ACOS_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ATAN_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EXP_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LOG_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LOG2_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LOG10_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SQUARE_ROOT_FUNCTION'
+ IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VALUE_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LENGTH_FUNCTION'
+ IN TYPEOF(arg))
+THEN
+ RETURN (FALSE);
+END_IF;
+IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PLUS_EXPRESSION' IN TYPEOF(arg))
+ OR('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MULT_EXPRESSION' IN TYPEOF(arg))
+ OR('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAXIMUM_FUNCTION'
+ IN TYPEOF(arg))
+ OR('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MINIMUM_FUNCTION'
+ IN TYPEOF(arg))
+THEN
+ REPEAT i :=1 TO SIZEOF (
+ arg\multiple_arity_numeric_expression.operands);
+ IF NOT is_SQL_mappable(
+ arg\multiple_arity_numeric_expression.operands[i])
+ THEN
+ RETURN (FALSE);
+ END_IF;
+ END_REPEAT;
+RETURN (TRUE);
+END_IF;
+IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MINUS_EXPRESSION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SLASH_EXPRESSION' IN
+ TYPEOF(arg))
+THEN
+ RETURN (is_SQL_mappable(
+ arg\binary_numeric_expression.operands[1])
+ AND is_SQL_mappable(arg\binary_numeric_expression.operands[2]));
+END_IF;
+IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DIV_EXPRESSION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MOD_EXPRESSION' IN TYPEOF(arg))
+ OR('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POWER_EXPRESSION'
+ IN TYPEOF(arg))
+THEN
+ RETURN (FALSE);
+END_IF;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SIMPLE_BOOLEAN_EXPRESSION'
+ IN TYPEOF (arg)
+THEN
+ RETURN (TRUE);
+END_IF;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.NOT_EXPRESSION' IN TYPEOF (arg)
+THEN
+ RETURN (is_SQL_mappable (arg\UNARY_GENERIC_EXPRESSION.OPERAND));
+END_IF;
+IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ODD_FUNCTION'IN TYPEOF (arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.XOR_EXPRESSION'
+ IN TYPEOF (arg))
+THEN
+ RETURN (FALSE);
+END_IF;
+IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AND_EXPRESSION' IN TYPEOF (arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OR_EXPRESSION' IN TYPEOF (arg))
+THEN
+ REPEAT i:=1 TO SIZEOF (
+ arg\MULTIPLE_ARITY_BOOLEAN_EXPRESSION.OPERANDS);
+ IF NOT is_SQL_mappable (
+ arg\MULTIPLE_ARITY_BOOLEAN_EXPRESSION.OPERANDS[i])
+ THEN
+ RETURN (FALSE);
+ END_IF;
+ END_REPEAT;
+ RETURN (TRUE);
+END_IF;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EQUALS_EXPRESSION' IN TYPEOF (arg)
+THEN
+ RETURN(is_SQL_mappable (
+ arg\BINARY_GENERIC_EXPRESSION.OPERANDS [1])
+ AND is_SQL_mappable(
+ arg\BINARY_GENERIC_EXPRESSION.OPERANDS [2]));
+END_IF;
+IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPARISON_EQUAL' IN TYPEOF (arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPARISON_GREATER'
+ IN TYPEOF (arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPARISON_GREATER_EQUAL'
+ IN TYPEOF (arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPARISON_LESS'
+ IN TYPEOF (arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPARISON_LESS_EQUAL'
+ IN TYPEOF (arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPARISON_NOT_EQUAL'
+ IN TYPEOF (arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LIKE_EXPRESSION'
+ IN TYPEOF (arg))
+THEN
+ RETURN (is_SQL_mappable (arg\COMPARISON_EXPRESSION.OPERANDS[1])
+ AND is_SQL_mappable (arg\COMPARISON_EXPRESSION.OPERANDS[2]));
+END_IF;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.INTERVAL_EXPRESSION' IN TYPEOF(arg)
+THEN
+ RETURN (is_SQL_mappable(arg\interval_expression.interval_low)
+ AND is_SQL_mappable(arg\interval_expression.interval_high)
+ AND is_SQL_mappable(arg\interval_expression.interval_item));
+END_IF;
+IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.NUMERIC_DEFINED_FUNCTION'
+ IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.BOOLEAN_DEFINED_FUNCTION'
+ IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STRING_DEFINED_FUNCTION'
+ IN TYPEOF(arg))
+THEN
+ RETURN (FALSE) ;
+END_IF;
+
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SIMPLE_STRING_EXPRESSION'
+ IN TYPEOF(ARG)
+THEN
+ RETURN (TRUE);
+END_IF;
+IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.INDEX_EXPRESSION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SUBSTRING_EXPRESSION'
+ IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONCAT_EXPRESSION'
+ IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FORMAT_FUNCTION'
+ IN TYPEOF(arg))
+THEN
+ RETURN (FALSE);
+END_IF;
+
+ RETURN (FALSE);
+END_FUNCTION;
+
+FUNCTION item_in_context
+ (item: representation_item; cntxt: representation_context) : BOOLEAN;
+ LOCAL
+ y : BAG OF representation_item;
+ END_LOCAL;
+ -- If there is one or more representation using both the item
+ -- and cntxt return true.
+ IF SIZEOF(USEDIN(item,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.REPRESENTATION.ITEMS')
+ * cntxt.representations_in_context) > 0 THEN
+ RETURN (TRUE);
+ -- Determine the bag of representation_items that reference
+ -- item
+ ELSE y := QUERY(z <* USEDIN (item , '') |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.REPRESENTATION_ITEM' IN TYPEOF(z));
+ -- Ensure that the bag is not empty
+ IF SIZEOF(y) > 0 THEN
+ -- For each element in the bag
+ REPEAT i := 1 TO HIINDEX(y);
+ -- Check to see it is an item in the input cntxt.
+ IF item_in_context(y[i], cntxt) THEN
+ RETURN (TRUE);
+ END_IF;
+ END_REPEAT;
+ END_IF;
+ END_IF;
+ -- Return false when all possible branches have been checked
+ -- with no success.
+ RETURN (FALSE);
+END_FUNCTION;
+
+FUNCTION leap_year
+ (year: year_number) : BOOLEAN;
+IF ((((year MOD 4) = 0) AND ((year MOD 100) <> 0)) OR ((year MOD 400) = 0)) THEN
+ RETURN (TRUE);
+ ELSE
+ RETURN (FALSE);
+ END_IF;
+END_FUNCTION;
+
+FUNCTION list_face_loops
+ (f: face) : LIST [0:?] OF loop;
+ LOCAL
+ loops : LIST[0:?] OF loop := [];
+ END_LOCAL;
+
+ REPEAT i := 1 TO SIZEOF(f.bounds);
+ loops := loops +(f.bounds[i].bound);
+ END_REPEAT;
+
+ RETURN(loops);
+END_FUNCTION;
+
+FUNCTION list_of_topology_reversed
+ (a_list: list_of_reversible_topology_item) : list_of_reversible_topology_item;
+ LOCAL
+ the_reverse : list_of_reversible_topology_item;
+ END_LOCAL;
+
+ the_reverse := [];
+ REPEAT i := 1 TO SIZEOF (a_list);
+ the_reverse := topology_reversed (a_list [i]) + the_reverse;
+ END_REPEAT;
+
+ RETURN (the_reverse);
+END_FUNCTION;
+
+FUNCTION list_to_array
+ (lis: LIST [0:?] OF GENERIC: T; low: INTEGER; u: INTEGER) : ARRAY [low:u] OF GENERIC: T;
+ LOCAL
+ n : INTEGER;
+ res : ARRAY [low:u] OF GENERIC : T;
+ END_LOCAL;
+
+ n := SIZEOF(lis);
+ IF (n <> (u-low +1)) THEN
+ RETURN(?);
+ ELSE
+ res := [lis[1] : n];
+ REPEAT i := 2 TO n;
+ res[low+i-1] := lis[i];
+ END_REPEAT;
+ RETURN(res);
+ END_IF;
+END_FUNCTION;
+
+FUNCTION list_to_set
+ (l: LIST [0:?] OF GENERIC: T) : SET [0:?] OF GENERIC: T;
+ LOCAL
+ s : SET OF GENERIC:T := [];
+ END_LOCAL;
+
+ REPEAT i := 1 TO SIZEOF(l);
+ s := s + l[i];
+ END_REPEAT;
+
+ RETURN(s);
+END_FUNCTION;
+
+FUNCTION make_array_of_array
+ (lis: LIST [1:?] OF LIST [1:?] OF GENERIC: T; low1: INTEGER; u1: INTEGER; low2: INTEGER; u2: INTEGER) : ARRAY [low1:u1] OF ARRAY [low2:u2] OF GENERIC: T;
+ LOCAL
+ res : ARRAY[low1:u1] OF ARRAY [low2:u2] OF GENERIC : T;
+ END_LOCAL;
+
+(* Check input dimensions for consistency *)
+ IF (u1-low1+1) <> SIZEOF(lis) THEN
+ RETURN (?);
+ END_IF;
+ IF (u2 - low2 + 1 ) <> SIZEOF(lis[1]) THEN
+ RETURN (?) ;
+ END_IF;
+(* Initialise res with values from lis[1] *)
+ res := [list_to_array(lis[1], low2, u2) : (u1-low1 + 1)];
+ REPEAT i := 2 TO HIINDEX(lis);
+ IF (u2-low2+1) <> SIZEOF(lis[i]) THEN
+ RETURN (?);
+ END_IF;
+ res[low1+i-1] := list_to_array(lis[i], low2, u2);
+ END_REPEAT;
+
+ RETURN (res);
+END_FUNCTION;
+
+FUNCTION mixed_loop_type_set
+ (l: SET [0:?] OF loop) : LOGICAL;
+ LOCAL
+ poly_loop_type: LOGICAL;
+ END_LOCAL;
+ IF(SIZEOF(l) <= 1) THEN
+ RETURN(FALSE);
+ END_IF;
+ poly_loop_type := ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLY_LOOP' IN TYPEOF(l[1]));
+ REPEAT i := 2 TO SIZEOF(l);
+ IF(('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLY_LOOP' IN TYPEOF(l[i])) <> poly_loop_type)
+ THEN
+ RETURN(TRUE);
+ END_IF;
+ END_REPEAT;
+ RETURN(FALSE);
+END_FUNCTION;
+
+FUNCTION msb_shells
+ (brep: manifold_solid_brep) : SET [1:?] OF closed_shell;
+ LOCAL
+ return_set: SET[1:?] OF closed_shell := [brep.outer];
+ END_LOCAL;
+
+ IF SIZEOF(QUERY(msbtype <* TYPEOF(brep) |
+ msbtype LIKE '*BREP_WITH_VOIDS')) >= 1
+ THEN
+ return_set := return_set + brep\brep_with_voids.voids;
+ END_IF;
+ RETURN(return_set);
+END_FUNCTION;
+
+FUNCTION msf_curve_check
+ (cv: representation_item) : BOOLEAN;
+IF SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.BOUNDED_CURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONIC',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_REPLICA', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LINE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OFFSET_CURVE_3D'] * TYPEOF(cv)) > 1 THEN
+ RETURN(FALSE);
+END_IF;
+
+(* b_spline_curves shall not self-intersect
+ *)
+IF (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_CURVE' IN TYPEOF (cv)) AND
+ (cv\b_spline_curve.self_intersect = FALSE)OR
+ (cv\b_spline_curve.self_intersect = UNKNOWN)) THEN
+ RETURN(TRUE);
+ELSE
+
+ (* conics and lines are valid curve types
+ *)
+ IF SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONIC', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LINE']
+ * TYPEOF (cv)) = 1 THEN
+ RETURN(TRUE);
+ ELSE
+
+ (* a curve_replica shall reference a valid curve
+ *)
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_REPLICA' IN TYPEOF(cv) THEN
+ RETURN (msf_curve_check(cv\curve_replica.parent_curve));
+ ELSE
+
+ (* an offset_curve_3d shall not self-intersect and
+ shall reference a valid curve; a polyline is not a
+ valid basis_curve
+ *)
+ IF (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OFFSET_CURVE_3D' IN TYPEOF (cv))
+ AND
+ ((cv\offset_curve_3d.self_intersect = FALSE) OR
+ (cv\offset_curve_3d.self_intersect = UNKNOWN))
+ AND
+ (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE' IN TYPEOF
+ (cv\offset_curve_3d.basis_curve)))) THEN
+ RETURN (msf_curve_check(cv\offset_curve_3d.basis_curve));
+ ELSE
+
+ (* a pcurve shall reference a valid curve and a valid
+ basis_surface
+ *)
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE' IN TYPEOF(cv) THEN
+ RETURN ((msf_curve_check
+ (cv\pcurve.reference_to_curve\representation.items[1])) AND
+ (msf_surface_check(cv\pcurve.basis_surface)));
+ ELSE
+
+ (* a surface_curve references a curve_3d and one or
+ two pcurves or one or two surfaces or one of
+ each; all of these references shall be valid
+ *)
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_CURVE' IN TYPEOF(cv) THEN
+
+ (* if the curve reference is correct, check also the rest
+ *)
+ IF msf_curve_check(cv\surface_curve.curve_3d) THEN
+ REPEAT i := 1 TO SIZEOF
+ (cv\surface_curve.associated_geometry);
+
+ (* do for one or two associated_geometrys:
+ *)
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE' IN
+ TYPEOF (cv\surface_curve.associated_geometry[i]) THEN
+ IF NOT msf_surface_check
+ (cv\surface_curve.associated_geometry[i]) THEN
+ RETURN(FALSE);
+ END_IF;
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE' IN TYPEOF
+ (cv\surface_curve.associated_geometry[i]) THEN
+ IF NOT msf_curve_check
+ (cv\surface_curve.associated_geometry[i]) THEN
+ RETURN(FALSE);
+ END_IF;
+ END_IF;
+ END_IF;
+ END_REPEAT;
+ RETURN(TRUE);
+ END_IF;
+ ELSE
+
+ (* a polyline shall have at least 3 points
+ *)
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE' IN TYPEOF(cv) THEN
+ IF (SIZEOF (cv\polyline.points) >= 3) THEN RETURN (TRUE);
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+END_IF;
+(* FALSE is returned if the input parameter cv is not a valid curve.
+ *)
+RETURN (FALSE);
+END_FUNCTION;
+
+FUNCTION msf_surface_check
+ (surf: surface) : BOOLEAN;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ELEMENTARY_SURFACE' IN TYPEOF(surf) THEN
+ RETURN(TRUE);
+ ELSE
+
+ (* a swept_surface shall have a valid sweeping curve
+ *)
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SWEPT_SURFACE' IN TYPEOF (surf) THEN
+ RETURN (msf_curve_check(surf\swept_surface.swept_curve));
+ ELSE
+
+ (* an offset_surface shall not self-intersect and shall
+ reference a valid surface
+ *)
+ IF (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OFFSET_SURFACE' IN TYPEOF (surf)) AND
+ (surf\offset_surface.self_intersect = FALSE) OR
+ (surf\offset_surface.self_intersect = UNKNOWN)) THEN
+ RETURN (msf_surface_check(surf\offset_surface.basis_surface));
+ ELSE
+
+ (* a surface_replica shall have a valid parent surface
+ *)
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_REPLICA' IN TYPEOF(surf) THEN
+ RETURN(msf_surface_check(surf\surface_replica.parent_surface));
+ ELSE
+
+ (* a b_spline_surface shall not self-intersect
+ *)
+ IF (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_SURFACE' IN TYPEOF(surf)) AND
+ (surf\b_spline_surface.self_intersect = FALSE) OR
+ (surf\b_spline_surface.self_intersect = UNKNOWN)) THEN
+ RETURN(TRUE);
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ RETURN(FALSE);
+END_FUNCTION;
+
+FUNCTION nmsf_curve_check
+ (cv: representation_item) : BOOLEAN;
+IF SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.BOUNDED_CURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONIC',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_REPLICA',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LINE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OFFSET_CURVE_3D'] * TYPEOF(cv)) > 1
+ THEN RETURN(FALSE);
+ ELSE
+
+ (* b_spline_curves shall not self-intersect
+ *)
+ IF (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_CURVE' IN TYPEOF (cv)) AND
+ (cv\b_spline_curve.self_intersect = FALSE) OR
+ (cv\b_spline_curve.self_intersect = UNKNOWN))
+ THEN RETURN(TRUE);
+ ELSE
+
+ (* conics and lines are valid curve types
+ *)
+ IF SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONIC',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LINE'] * TYPEOF (cv)) = 1 THEN
+ RETURN(TRUE);
+ ELSE
+
+ (* a curve_replica shall reference a valid curve
+ *)
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_REPLICA' IN TYPEOF(cv) THEN
+ RETURN (nmsf_curve_check(cv\curve_replica.parent_curve));
+ ELSE
+
+ (* an offset_curve_3d shall not self-intersect and
+ shall reference a valid curve; a polyline is not a
+ valid basis_curve
+ *)
+ IF (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OFFSET_CURVE_3D' IN TYPEOF (cv))
+ AND
+ ((cv\offset_curve_3d.self_intersect = FALSE) OR
+ (cv\offset_curve_3d.self_intersect = UNKNOWN))
+ AND
+ (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE' IN TYPEOF
+ (cv\offset_curve_3d.basis_curve)))) THEN
+ RETURN (nmsf_curve_check(cv\offset_curve_3d.basis_curve));
+ ELSE
+
+ (* a pcurve shall reference a valid curve and a valid
+ basis_surface
+ *)
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE' IN TYPEOF(cv) THEN
+ RETURN ((nmsf_curve_check
+ (cv\pcurve.reference_to_curve\representation.items[1]))
+ AND
+ (nmsf_surface_check(cv\pcurve.basis_surface)));
+ ELSE
+
+ (* a surface_curve references a curve_3d and one or
+ two pcurves or one or two surfaces or one of
+ each; all of these references shall be valid
+ *)
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_CURVE' IN TYPEOF(cv) THEN
+
+ (* if the curve reference is correct, check also the rest
+ *)
+ IF nmsf_curve_check(cv\surface_curve.curve_3d) THEN
+ REPEAT i := 1 TO SIZEOF
+ (cv\surface_curve.associated_geometry);
+
+ (* do for one or two associated_geometrys:
+ *)
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE' IN
+ TYPEOF (cv\surface_curve.associated_geometry[i]) THEN
+ IF NOT nmsf_surface_check
+ (cv\surface_curve.associated_geometry[i]) THEN
+ RETURN(FALSE);
+ END_IF;
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE' IN TYPEOF
+ (cv\surface_curve.associated_geometry[i]) THEN
+ IF NOT nmsf_curve_check
+ (cv\surface_curve.associated_geometry[i]) THEN
+ RETURN(FALSE);
+ END_IF;
+ END_IF;
+ END_IF;
+ END_REPEAT;
+ RETURN(TRUE);
+ END_IF;
+ ELSE
+
+ (* a polyline shall have at least 3 points
+ *)
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE' IN TYPEOF(cv) THEN
+ IF (SIZEOF (cv\polyline.points) >= 3) THEN RETURN (TRUE);
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ (* FALSE is returned if the input parameter cv is not a valid curve.
+ *)
+ RETURN (FALSE);
+END_FUNCTION;
+
+FUNCTION nmsf_surface_check
+ (surf: surface) : BOOLEAN;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ELEMENTARY_SURFACE' IN TYPEOF(surf) THEN
+ RETURN(TRUE);
+ ELSE
+
+ (* a swept_surface shall have a valid sweeping curve
+ *)
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SWEPT_SURFACE' IN TYPEOF (surf) THEN
+ RETURN (nmsf_curve_check(surf\swept_surface.swept_curve));
+ ELSE
+
+ (* an offset_surface shall not self-intersect and shall
+ reference a valid surface
+ *)
+ IF (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OFFSET_SURFACE' IN TYPEOF (surf)) AND
+ (surf\offset_surface.self_intersect = FALSE) OR
+ (surf\offset_surface.self_intersect = UNKNOWN)) THEN
+ RETURN (nmsf_surface_check(surf\offset_surface.basis_surface));
+ ELSE
+
+ (* a surface_replica shall have a valid parent surface
+ *)
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_REPLICA' IN TYPEOF(surf) THEN
+ RETURN(nmsf_surface_check(surf\surface_replica.parent_surface));
+ ELSE
+
+ (* a b_spline_surface shall not self-intersect
+ *)
+ IF (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_SURFACE' IN TYPEOF(surf))
+ AND
+ (surf\b_spline_surface.self_intersect = FALSE) OR
+ (surf\b_spline_surface.self_intersect = UNKNOWN)) THEN
+ RETURN(TRUE);
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ RETURN(FALSE);
+END_FUNCTION;
+
+FUNCTION normalise
+ (arg: vector_or_direction) : vector_or_direction;
+ LOCAL
+ ndim : INTEGER;
+ v : direction;
+ result : vector_or_direction;
+ vec : vector;
+ mag : REAL;
+ END_LOCAL;
+
+ IF NOT EXISTS (arg) THEN
+ result := ?;
+ (* When function is called with invalid data a NULL result is returned *)
+ ELSE
+ ndim := arg.dim;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VECTOR' IN TYPEOF(arg) THEN
+ BEGIN
+ v := dummy_gri || direction(arg\vector.orientation.direction_ratios);
+ IF arg.magnitude = 0.0 THEN
+ RETURN(?);
+ ELSE
+ vec := dummy_gri || vector (v, 1.0);
+ END_IF;
+ END;
+ ELSE
+ v := dummy_gri || direction (arg.direction_ratios);
+ END_IF;
+ mag := 0.0;
+ REPEAT i := 1 TO ndim;
+ mag := mag + v.direction_ratios[i]*v.direction_ratios[i];
+ END_REPEAT;
+ IF mag > 0.0 THEN
+ mag := SQRT(mag);
+ REPEAT i := 1 TO ndim;
+ v.direction_ratios[i] := v.direction_ratios[i]/mag;
+ END_REPEAT;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VECTOR' IN TYPEOF(arg) THEN
+ vec.orientation := v;
+ result := vec;
+ ELSE
+ result := v;
+ END_IF;
+ ELSE
+ RETURN(?);
+ END_IF;
+ END_IF;
+ RETURN (result);
+END_FUNCTION;
+
+FUNCTION open_shell_reversed
+ (a_shell: open_shell) : oriented_open_shell;
+ LOCAL
+ the_reverse : oriented_open_shell;
+ END_LOCAL;
+ IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORIENTED_OPEN_SHELL' IN TYPEOF (a_shell) ) THEN
+ the_reverse := dummy_tri ||
+ connected_face_set (
+ a_shell\connected_face_set.cfs_faces) ||
+ open_shell () || oriented_open_shell(
+ a_shell\oriented_open_shell.open_shell_element,
+ (NOT (a_shell\oriented_open_shell.orientation)));
+ ELSE
+ the_reverse := dummy_tri ||
+ connected_face_set (
+ a_shell\connected_face_set.cfs_faces) ||
+ open_shell () || oriented_open_shell (a_shell, FALSE);
+ END_IF;
+ RETURN (the_reverse);
+END_FUNCTION;
+
+FUNCTION orthogonal_complement
+ (vec: direction) : direction;
+ LOCAL
+ result : direction ;
+ END_LOCAL;
+
+ IF (vec.dim <> 2) OR NOT EXISTS (vec) THEN
+ RETURN(?);
+ ELSE
+ result := dummy_gri || direction([-vec.direction_ratios[2],
+ vec.direction_ratios[1]]);
+ RETURN(result);
+ END_IF;
+END_FUNCTION;
+
+FUNCTION path_head_to_tail
+ (a_path: path) : LOGICAL;
+ LOCAL
+ n : INTEGER;
+ p : LOGICAL := TRUE;
+ END_LOCAL;
+
+ n := SIZEOF (a_path.edge_list);
+ REPEAT i := 2 TO n;
+ p := p AND (a_path.edge_list[i-1].edge_end :=:
+ a_path.edge_list[i].edge_start);
+ END_REPEAT;
+
+ RETURN (p);
+END_FUNCTION;
+
+FUNCTION path_reversed
+ (a_path: path) : oriented_path;
+ LOCAL
+ the_reverse : oriented_path ;
+ END_LOCAL;
+ IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORIENTED_PATH' IN TYPEOF (a_path) ) THEN
+ the_reverse := dummy_tri ||
+ path(list_of_topology_reversed (a_path.edge_list)) ||
+ oriented_path(a_path\oriented_path.path_element,
+ NOT(a_path\oriented_path.orientation)) ;
+ ELSE
+ the_reverse := dummy_tri ||
+ path(list_of_topology_reversed (a_path.edge_list)) ||
+ oriented_path(a_path, FALSE);
+ END_IF;
+
+ RETURN (the_reverse);
+END_FUNCTION;
+
+FUNCTION scalar_times_vector
+ (scalar: REAL; vec: vector_or_direction) : vector;
+ LOCAL
+ v : direction;
+ mag : REAL;
+ result : vector;
+ END_LOCAL;
+
+ IF NOT EXISTS (scalar) OR NOT EXISTS (vec) THEN
+ RETURN (?) ;
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VECTOR' IN TYPEOF (vec) THEN
+ v := dummy_gri || direction(vec\vector.orientation.direction_ratios);
+ mag := scalar * vec.magnitude;
+ ELSE
+ v := dummy_gri || direction(vec.direction_ratios);
+ mag := scalar;
+ END_IF;
+ IF (mag < 0.0 ) THEN
+ REPEAT i := 1 TO SIZEOF(v.direction_ratios);
+ v.direction_ratios[i] := -v.direction_ratios[i];
+ END_REPEAT;
+ mag := -mag;
+ END_IF;
+ result := dummy_gri || vector(normalise(v), mag);
+ END_IF;
+ RETURN (result);
+END_FUNCTION;
+
+FUNCTION second_proj_axis
+ (z_axis: direction; x_axis: direction; arg: direction) : direction;
+ LOCAL
+ y_axis : vector;
+ v : direction;
+ temp : vector;
+ END_LOCAL;
+
+ IF NOT EXISTS(arg) THEN
+ v := dummy_gri || direction([0.0,1.0,0.0]);
+ ELSE
+ v := arg;
+ END_IF;
+
+ temp := scalar_times_vector(dot_product(v, z_axis), z_axis);
+ y_axis := vector_difference(v, temp);
+ temp := scalar_times_vector(dot_product(v, x_axis), x_axis);
+ y_axis := vector_difference(y_axis, temp);
+ y_axis := normalise(y_axis);
+ RETURN(y_axis.orientation);
+END_FUNCTION;
+
+FUNCTION set_of_topology_reversed
+ (a_set: set_of_reversible_topology_item) : set_of_reversible_topology_item;
+ LOCAL
+ the_reverse : set_of_reversible_topology_item;
+ END_LOCAL;
+
+ the_reverse := [];
+ REPEAT i := 1 TO SIZEOF (a_set);
+ the_reverse := the_reverse + topology_reversed (a_set [i]);
+ END_REPEAT;
+
+ RETURN (the_reverse);
+END_FUNCTION;
+
+FUNCTION shell_reversed
+ (a_shell: shell) : shell;
+IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OPEN_SHELL' IN TYPEOF (a_shell) ) THEN
+ RETURN (open_shell_reversed (a_shell));
+ ELSE
+ IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CLOSED_SHELL' IN TYPEOF (a_shell) ) THEN
+ RETURN (closed_shell_reversed (a_shell));
+ ELSE
+ RETURN (?);
+ END_IF;
+ END_IF;
+END_FUNCTION;
+
+FUNCTION surface_condition_correlation
+ (pd: property_definition; rep: representation) : LOGICAL;
+CASE pd.name OF
+ 'visual appearance', 'tactile appearance', 'contact ratio', 'hardness', 'treatment result', 'surface texture' :
+ RETURN(pd.name = rep.name);
+ OTHERWISE : RETURN(UNKNOWN);
+ END_CASE;
+END_FUNCTION;
+
+FUNCTION surface_weights_positive
+ (b: rational_b_spline_surface) : BOOLEAN;
+ LOCAL
+ result : BOOLEAN := TRUE;
+ END_LOCAL;
+
+ REPEAT i := 0 TO b.u_upper;
+ REPEAT j := 0 TO b.v_upper;
+ IF (b.weights[i][j] <= 0.0) THEN
+ result := FALSE;
+ RETURN(result);
+ END_IF;
+ END_REPEAT;
+ END_REPEAT;
+ RETURN(result);
+END_FUNCTION;
+
+FUNCTION topology_reversed
+ (an_item: reversible_topology) : reversible_topology;
+IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE' IN TYPEOF (an_item)) THEN
+ RETURN (edge_reversed (an_item));
+ END_IF;
+
+ IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PATH' IN TYPEOF (an_item)) THEN
+ RETURN (path_reversed (an_item));
+ END_IF;
+
+ IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_BOUND' IN TYPEOF (an_item)) THEN
+ RETURN (face_bound_reversed (an_item));
+ END_IF;
+
+ IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE' IN TYPEOF (an_item)) THEN
+ RETURN (face_reversed (an_item));
+ END_IF;
+
+ IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL' IN TYPEOF (an_item)) THEN
+ RETURN (shell_reversed (an_item));
+ END_IF;
+
+ IF ('SET' IN TYPEOF (an_item)) THEN
+ RETURN (set_of_topology_reversed (an_item));
+ END_IF;
+
+ IF ('LIST' IN TYPEOF (an_item)) THEN
+ RETURN (list_of_topology_reversed (an_item));
+ END_IF;
+
+ RETURN (?);
+END_FUNCTION;
+
+FUNCTION type_check_function
+ (the_type: GENERIC; sub_names: SET [0:?] OF STRING; criterion: INTEGER) : LOGICAL;
+IF ((NOT EXISTS(the_type)) OR (NOT ({0 <= criterion <= 3})) OR (SIZEOF(sub_names) = 0)) THEN
+ RETURN (UNKNOWN);
+ ELSE
+ CASE criterion OF
+ 0:
+ RETURN (SIZEOF(sub_names * TYPEOF(the_type)) > 0);
+ 1:
+ RETURN (SIZEOF(sub_names * TYPEOF(the_type)) = 0);
+ 2:
+ RETURN (SIZEOF(sub_names * TYPEOF(the_type)) = 1);
+ 3:
+ RETURN (SIZEOF(sub_names * TYPEOF(the_type)) <= 1);
+ END_CASE;
+ END_IF;
+END_FUNCTION;
+
+FUNCTION using_items
+ (item: founded_item_select; checked_items: SET [0:?] OF founded_item_select) : SET [0:?] OF founded_item_select;
+ LOCAL
+ new_check_items : SET OF founded_item_select;
+ result_items : SET OF founded_item_select;
+ next_items : SET OF founded_item_select;
+ END_LOCAL;
+ result_items := [];
+ new_check_items := checked_items + item;
+ -- Find the set of representation_items or founded_items
+ -- in which item is used directly.
+ next_items := QUERY(z <* bag_to_set( USEDIN(item , '')) |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.REPRESENTATION_ITEM' IN TYPEOF(z)) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FOUNDED_ITEM' IN TYPEOF(z)));
+ -- If the set of next_items is not empty;
+ IF SIZEOF(next_items) > 0 THEN
+ -- For each element in the set, find the using_items recursively
+ REPEAT i := 1 TO HIINDEX(next_items);
+ -- Check for loop in data model, i.e. one of the next_items
+ -- occurred earlier in the set of check_items;
+ IF NOT(next_items[i] IN new_check_items) THEN
+ result_items := result_items + next_items[i] +
+ using_items(next_items[i],new_check_items);
+ END_IF;
+ END_REPEAT;
+ END_IF;
+ -- return the set of representation_items or founded_items
+ -- in which the input item is used directly and indirectly.
+ RETURN (result_items);
+END_FUNCTION;
+
+FUNCTION using_representations
+ (item: founded_item_select) : SET [0:?] OF representation;
+ LOCAL
+ results : SET OF representation;
+ result_bag : BAG OF representation;
+ intermediate_items : SET OF founded_item_select;
+ END_LOCAL;
+ -- Find the representations in which the item is used and add to the
+ -- results set.
+ results := [];
+ result_bag := USEDIN(item,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.REPRESENTATION.ITEMS');
+ IF SIZEOF(result_bag) > 0 THEN
+ REPEAT i := 1 TO HIINDEX(result_bag);
+ results := results + result_bag[i];
+ END_REPEAT;
+ END_IF;
+ -- Find all representation_items or founded_items
+ -- by which item is referenced directly or indirectly.
+ intermediate_items := using_items(item,[]);
+ -- If the set of intermediate items is not empty;
+ IF SIZEOF(intermediate_items) > 0 THEN
+ -- For each element in the set, add the
+ -- representations of that element.
+ REPEAT i := 1 TO HIINDEX(intermediate_items);
+ result_bag := USEDIN(intermediate_items[i],
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.REPRESENTATION.ITEMS');
+ IF SIZEOF(result_bag) > 0 THEN
+ REPEAT j := 1 TO HIINDEX(result_bag);
+ results := results + result_bag[j];
+ END_REPEAT;
+ END_IF;
+ END_REPEAT;
+ END_IF;
+ -- Return the set of representation in which the input item is
+ -- used directly and indirectly (through intervening
+ -- representation_items or founded items).
+ RETURN (results);
+END_FUNCTION;
+
+FUNCTION valid_basis_curve_in_2d_wireframe
+ (crv: curve) : BOOLEAN;
+IF SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_CURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ELLIPSE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CIRCLE'] *
+ TYPEOF (crv)) = 1
+ THEN RETURN (TRUE);
+ ELSE
+ -- if the curve is a trimmed_curve
+ IF (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TRIMMED_CURVE')
+ IN TYPEOF (crv)) THEN
+ -- if a line, parabola, or hyperbola is being trimmed, then valid
+ IF SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LINE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PARABOLA',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.HYPERBOLA'] *
+ TYPEOF(crv\trimmed_curve.basis_curve)) = 1
+ THEN RETURN (TRUE);
+ -- otherwise, recursively check basis_curve
+ ELSE RETURN (valid_basis_curve_in_2d_wireframe
+ (crv\trimmed_curve.basis_curve));
+ END_IF;
+ ELSE
+ -- recursively check the offset_curve basis curve
+ IF (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OFFSET_CURVE_2D')
+ IN TYPEOF (crv))
+ THEN RETURN (valid_basis_curve_in_2d_wireframe
+ (crv\offset_curve_2d.basis_curve));
+ ELSE
+ -- recursively check the curve_replica parent curve
+ IF (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_REPLICA')
+ IN TYPEOF (crv))
+ THEN RETURN (valid_basis_curve_in_2d_wireframe
+ (crv\curve_replica.parent_curve));
+ ELSE
+ -- recursively check the composite_curve segments
+ IF (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPOSITE_CURVE')
+ IN TYPEOF (crv)) THEN
+ RETURN (SIZEOF (QUERY (ccs <* crv\composite_curve.segments |
+ NOT (valid_basis_curve_in_2d_wireframe
+ (ccs.parent_curve)))) = 0);
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ RETURN (FALSE);
+END_FUNCTION;
+
+FUNCTION valid_calendar_date
+ (date: calendar_date) : LOGICAL;
+CASE date.month_component OF
+ 1 : RETURN({ 1 <= date.day_component <= 31 });
+ 2 : BEGIN
+ IF (leap_year(date.year_component)) THEN
+ RETURN({ 1 <= date.day_component <= 29 });
+ ELSE
+ RETURN({ 1 <= date.day_component <= 28 });
+ END_IF;
+ END;
+ 3 : RETURN({ 1 <= date.day_component <= 31 });
+ 4 : RETURN({ 1 <= date.day_component <= 30 });
+ 5 : RETURN({ 1 <= date.day_component <= 31 });
+ 6 : RETURN({ 1 <= date.day_component <= 30 });
+ 7 : RETURN({ 1 <= date.day_component <= 31 });
+ 8 : RETURN({ 1 <= date.day_component <= 31 });
+ 9 : RETURN({ 1 <= date.day_component <= 30 });
+ 10 : RETURN({ 1 <= date.day_component <= 31 });
+ 11 : RETURN({ 1 <= date.day_component <= 30 });
+ 12 : RETURN({ 1 <= date.day_component <= 31 });
+ END_CASE;
+ RETURN (FALSE);
+END_FUNCTION;
+
+FUNCTION valid_datum_target_parameters
+ (pdf: placed_datum_target_feature) : BOOLEAN;
+LOCAL
+
+rep_set : SET OF representation := [] ;
+
+parameter_representations: SET OF representation;
+END_LOCAL;
+
+
+REPEAT i := 1 TO HIINDEX(pdf.representation_associations);
+rep_set := rep_set + pdf.representation_associations[i].used_representation;
+END_REPEAT;
+
+parameter_representations := QUERY(rep <* rep_set |
+('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHAPE_REPRESENTATION_WITH_PARAMETERS' IN
+TYPEOF(rep)));
+
+
+IF (SIZEOF( QUERY( srwp <* parameter_representations |
+ (SIZEOF( QUERY( i <* srwp.items |
+ (i.name='orientation') AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PLACEMENT' IN TYPEOF(i)))) = 1))) <> 1) THEN
+ RETURN(FALSE);
+END_IF;
+
+CASE pdf\shape_aspect.description OF
+'point': RETURN(SIZEOF(QUERY( srwp <* parameter_representations |
+ (SIZEOF(srwp.items) = 1))) = 1);
+
+'circle': RETURN((SIZEOF( QUERY( srwp <* parameter_representations |
+ (SIZEOF(srwp.items) = 2))) = 1) AND
+ (SIZEOF( QUERY( srwp <* parameter_representations |
+ (SIZEOF( QUERY( i <* srwp.items |
+ (i.name='target diameter') AND
+ (SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MEASURE_REPRESENTATION_ITEM',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LENGTH_MEASURE_WITH_UNIT']*TYPEOF(i)
+ ) = 2) )) = 1))) = 1));
+
+'line': RETURN(SIZEOF( QUERY( srwp <* parameter_representations |
+ (SIZEOF( QUERY( i <* srwp.items |
+ (i.name='target length') AND
+ (SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MEASURE_REPRESENTATION_ITEM',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LENGTH_MEASURE_WITH_UNIT']*TYPEOF(i)
+ ) = 2) )) = 1))) = 1);
+
+'rectangle': RETURN((SIZEOF( QUERY( srwp <* parameter_representations |
+ (SIZEOF(srwp.items)= 3))) = 1) AND
+ (SIZEOF( QUERY( srwp <* parameter_representations |
+ (SIZEOF( QUERY( i <* srwp.items |
+ (i.name='target length') AND
+ (SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MEASURE_REPRESENTATION_ITEM',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LENGTH_MEASURE_WITH_UNIT']*TYPEOF(i)
+ ) = 2))) = 1))) = 1) AND
+ (SIZEOF( QUERY( srwp <* parameter_representations |
+ (SIZEOF( QUERY( i <* srwp.items |
+ (i.name='target width') AND
+ (SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MEASURE_REPRESENTATION_ITEM',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LENGTH_MEASURE_WITH_UNIT']*TYPEOF(i)
+ ) = 2))) = 1) )) = 1));
+OTHERWISE : RETURN(FALSE);
+END_CASE;
+END_FUNCTION;
+
+FUNCTION valid_geometrically_bounded_wf_curve
+ (crv: curve) : BOOLEAN;
+IF SIZEOF ([ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_CURVE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ELLIPSE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CIRCLE' ] * TYPEOF (crv)) = 1 THEN
+ RETURN (TRUE);
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TRIMMED_CURVE' IN TYPEOF (crv) THEN
+ IF SIZEOF ([ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LINE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PARABOLA', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.HYPERBOLA' ] * TYPEOF (crv\trimmed_curve.basis_curve)) = 1 THEN
+ RETURN (TRUE);
+ ELSE
+ RETURN (valid_geometrically_bounded_wf_curve(crv\trimmed_curve.basis_curve));
+ END_IF ;
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OFFSET_CURVE_3D' IN TYPEOF (crv) THEN
+ RETURN (valid_geometrically_bounded_wf_curve(crv\offset_curve_3d.basis_curve));
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_REPLICA' IN TYPEOF (crv) THEN
+ RETURN (valid_geometrically_bounded_wf_curve(crv\curve_replica.parent_curve));
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPOSITE_CURVE' IN TYPEOF (crv) THEN
+ RETURN ( SIZEOF (
+QUERY ( ccs <* crv\composite_curve.segments| NOT valid_geometrically_bounded_wf_curve(ccs.parent_curve) )) = 0);
+ END_IF ;
+ END_IF ;
+ END_IF ;
+ END_IF ;
+ END_IF ;
+ RETURN (FALSE);
+END_FUNCTION;
+
+FUNCTION valid_geometrically_bounded_wf_point
+ (pnt: point) : BOOLEAN;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CARTESIAN_POINT' IN TYPEOF (pnt) THEN
+ RETURN (TRUE);
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_ON_CURVE' IN TYPEOF (pnt) THEN
+ RETURN (valid_geometrically_bounded_wf_curve(pnt\point_on_curve.basis_curve));
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_REPLICA' IN TYPEOF (pnt) THEN
+ RETURN (valid_geometrically_bounded_wf_point(pnt\point_replica.parent_pt));
+ END_IF ;
+ END_IF ;
+ END_IF ;
+ RETURN (FALSE);
+END_FUNCTION;
+
+FUNCTION valid_measure_value
+ (m: measure_value) : BOOLEAN;
+IF ('REAL' IN TYPEOF (m)) THEN
+ RETURN (m > 0.0);
+ ELSE
+ IF ('INTEGER' IN TYPEOF (m)) THEN
+ RETURN (m > 0);
+ ELSE
+ RETURN (TRUE);
+ END_IF;
+ END_IF;
+END_FUNCTION;
+
+FUNCTION valid_selected_instance_representation
+ (pd: product_definition_or_assembly_relationship) : LOGICAL;
+ LOCAL
+ properties: SET OF property_definition := bag_to_set(QUERY( prd<* USEDIN ( pd ,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PROPERTY_DEFINITION.DEFINITION' ) |
+ (prd.name = 'occurrence selection' )));
+ property_definition_representations: SET OF property_definition_representation := bag_to_set(QUERY ( pdr <* USEDIN ( properties[1] , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') |
+ ( pdr.used_representation.name = 'selection criteria' )));
+ selected_representation: representation;
+ END_LOCAL;
+ IF (SIZEOF( properties)<>1) THEN
+ RETURN(FALSE);
+ END_IF;
+ IF (SIZEOF(property_definition_representations)<>1) THEN
+ RETURN(FALSE);
+ END_IF;
+ selected_representation := property_definition_representations[1]\property_definition_representation.used_representation;
+ IF (SIZEOF(selected_representation\representation.items) <1) OR (SIZEOF(selected_representation\representation.items) >2) THEN
+ RETURN(FALSE);
+ END_IF;
+ IF (SIZEOF ( QUERY ( i <* selected_representation\representation.items |
+ ( SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MEASURE_REPRESENTATION_ITEM' ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VALUE_RANGE']* TYPEOF ( i ) ) = 1) AND
+ ( i.name = 'selection quantity' ))) <> 1 ) THEN
+ RETURN(FALSE);
+ END_IF;
+ IF (SIZEOF ( QUERY ( i <* selected_representation\representation.items |
+ ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) AND
+ ( i.name = 'selection control' )))> 1) THEN
+ RETURN(FALSE);
+ END_IF; --the selection control is not specified then the quantity shall be a qualified_representation_item or a value_range
+ IF (SIZEOF ( QUERY ( i <* selected_representation\representation.items |
+ ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF( i ) ) AND
+ ( i.name = 'selection control' ) ))= 0) AND
+ (SIZEOF ( QUERY ( i <* selected_representation\representation.items |
+ ( i.name = 'selection quantity' ) AND
+ ( SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.QUALIFIED_REPRESENTATION_ITEM' ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VALUE_RANGE']* TYPEOF ( i ) ) =0 ))) > 0 ) THEN
+ RETURN(FALSE);
+ END_IF;
+ RETURN(TRUE);
+END_FUNCTION;
+
+FUNCTION valid_time
+ (time: local_time) : BOOLEAN;
+IF EXISTS(time.second_component) THEN
+ RETURN (EXISTS(time.minute_component));
+ ELSE
+ RETURN (TRUE);
+ END_IF;
+END_FUNCTION;
+
+FUNCTION valid_units
+ (m: measure_with_unit) : BOOLEAN;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LENGTH_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents(1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MASS_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents(0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TIME_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents(0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ELECTRIC_CURRENT_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents(0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.THERMODYNAMIC_TEMPERATURE_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents(0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CELSIUS_TEMPERATURE_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents(0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AMOUNT_OF_SUBSTANCE_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents(0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LUMINOUS_INTENSITY_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PLANE_ANGLE_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SOLID_ANGLE_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AREA_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents(2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VOLUME_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents(3.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.RATIO_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POSITIVE_LENGTH_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents(1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POSITIVE_PLANE_ANGLE_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ACCELERATION_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents( 1.0, 0.0, -2.0, 0.0, 0.0, 0.0, 0.0 ) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CAPACITANCE_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents( -2.0, -1.0, 4.0, 1.0, 0.0, 0.0, 0.0 ) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ELECTRIC_CHARGE_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents( 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 0.0 ) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONDUCTANCE_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents( -2.0, -1.0, 3.0, 2.0, 0.0, 0.0, 0.0 ) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ELECTRIC_POTENTIAL_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents( 2.0, 1.0, -3.0, -1.0, 0.0, 0.0, 0.0 ) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ENERGY_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents( 2.0, 1.0, -2.0, 0.0, 0.0, 0.0, 0.0 ) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FORCE_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents( 1.0, 1.0, -2.0, 0.0, 0.0, 0.0, 0.0 ) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FREQUENCY_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents( 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0 ) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ILLUMINANCE_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents( -2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0 ) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.INDUCTANCE_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents( 2.0, 1.0, -2.0, -2.0, 0.0, 0.0, 0.0 ) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LUMINOUS_FLUX_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents( 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0 ) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAGNETIC_FLUX_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents( 2.0, 1.0, -2.0, -1.0, 0.0, 0.0, 0.0 ) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAGNETIC_FLUX_DENSITY_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents( 0.0, 1.0, -2.0, -1.0, 0.0, 0.0, 0.0 ) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POWER_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents( 2.0, 1.0, -3.0, 0.0, 0.0, 0.0, 0.0 ) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRESSURE_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents( -1.0, 1.0, -2.0, 0.0, 0.0, 0.0, 0.0 ) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.RESISTANCE_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents( 2.0, 1.0, -3.0, -2.0, 0.0, 0.0, 0.0 ) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VELOCITY_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents( 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0 ) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.RADIOACTIVITY_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents(0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ABSORBED_DOSE_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents(2.0, 0.0, -2.0, 0.0, 0.0, 0.0, 0.0) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DOSE_EQUIVALENT_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents(2.0, 0.0, -2.0, 0.0, 0.0, 0.0, 0.0) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ RETURN (TRUE);
+END_FUNCTION;
+
+FUNCTION valid_wireframe_edge_curve
+ (crv: curve) : BOOLEAN;
+IF SIZEOF ([ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LINE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONIC', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_CURVE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE' ] * TYPEOF (crv)) = 1 THEN
+ RETURN (TRUE);
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_REPLICA' IN TYPEOF (crv) THEN
+ RETURN (valid_wireframe_edge_curve(crv\curve_replica.parent_curve));
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OFFSET_CURVE_3D' IN TYPEOF (crv) THEN
+ RETURN (valid_wireframe_edge_curve(crv\offset_curve_3d.basis_curve));
+ END_IF ;
+ END_IF ;
+ END_IF ;
+ RETURN (FALSE);
+END_FUNCTION;
+
+FUNCTION valid_wireframe_vertex_point
+ (pnt: point) : BOOLEAN;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CARTESIAN_POINT' IN TYPEOF (pnt) THEN
+ RETURN (TRUE);
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_REPLICA' IN TYPEOF (pnt) THEN
+ RETURN (valid_wireframe_vertex_point(pnt\point_replica.parent_pt));
+ END_IF ;
+ END_IF ;
+ RETURN (FALSE);
+END_FUNCTION;
+
+FUNCTION validate_countersink_radii
+ (cskhole: solid_with_stepped_round_hole_and_conical_transitions) : BOOLEAN;
+ LOCAL
+ i,j : INTEGER;
+ n : INTEGER := 1 +
+ cskhole\solid_with_stepped_round_hole.segments;
+ smaller, larger : positive_length_measure;
+ END_LOCAL;
+
+ REPEAT i := 1 TO SIZEOF(cskhole.conical_transitions);
+
+ -- First check whether transition i applies to the entry of the hole or
+ -- the exit of a through hole - those cases only need to be checked for
+ -- the sign of the cone apex angle.
+
+ IF (((cskhole.conical_transitions[i].transition_number = 1)
+ AND (cskhole.conical_transitions[i].cone_apex_angle < 0))
+ XOR ((cskhole.conical_transitions[i].transition_number = n)
+ AND (cskhole.conical_transitions[i].cone_apex_angle > 0)))
+ THEN RETURN(FALSE);
+ ELSE
+ IF ((cskhole.conical_transitions[i].transition_number <> 1)
+ AND (cskhole.conical_transitions[i].transition_number <> n))
+ THEN
+
+ -- For all remaining transitions, check that the cone base radius
+ -- lies in the range of validity.
+
+
+ BEGIN
+ j := cskhole.conical_transitions[i].transition_number;
+ IF cskhole\solid_with_stepped_round_hole.segment_radii[j]
+ > cskhole\solid_with_stepped_round_hole.segment_radii[j-1]
+ THEN
+ BEGIN
+ IF (cskhole.conical_transitions[i].cone_apex_angle > 0)
+ THEN RETURN(FALSE);
+ END_IF;
+ larger
+ := cskhole\solid_with_stepped_round_hole.segment_radii[j];
+ smaller
+ := cskhole\solid_with_stepped_round_hole.segment_radii[j-1];
+ END;
+ ELSE
+ BEGIN
+ IF (cskhole.conical_transitions[i].cone_apex_angle < 0)
+ THEN RETURN(FALSE);
+ END_IF;
+ larger
+ := cskhole\solid_with_stepped_round_hole.segment_radii[j-1];
+ smaller
+ := cskhole\solid_with_stepped_round_hole.segment_radii[j];
+ END;
+ END_IF;
+ IF ((cskhole.conical_transitions[i].cone_base_radius > larger)
+ OR (cskhole.conical_transitions[i].cone_base_radius < smaller))
+ THEN RETURN(FALSE);
+ END_IF;
+ END;
+ END_IF;
+ END_IF;
+ END_REPEAT;
+ RETURN(TRUE);
+END_FUNCTION;
+
+FUNCTION value_range_aggregate_rep_item
+ (agg: AGGREGATE OF representation_item) : BOOLEAN;
+BEGIN
+ IF (SIZEOF(QUERY(i1 <* agg | ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'MEASURE_REPRESENTATION_ITEM' IN TYPEOF(i1)) )) = 6) THEN
+ RETURN (TRUE);
+ ELSE
+ RETURN (FALSE);
+ END_IF;
+ END;
+END_FUNCTION;
+
+FUNCTION value_range_wr1
+ (agg: compound_item_definition) : BOOLEAN;
+BEGIN
+ IF (SIZEOF(agg) = 2) AND ((SIZEOF(QUERY (i1 <* agg | (
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MEASURE_REPRESENTATION_ITEM' IN TYPEOF
+ (i1)))) = 2) OR
+ (SIZEOF(QUERY (i2 <* agg | (
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VALUE_REPRESENTATION_ITEM' IN TYPEOF
+ (i2)))) = 2))
+ THEN
+ RETURN(TRUE);
+ ELSE
+ RETURN(FALSE);
+ END_IF;
+ END;
+END_FUNCTION;
+
+FUNCTION value_range_wr2
+ (agg: compound_item_definition) : BOOLEAN;
+BEGIN
+ IF ((SIZEOF(QUERY (i <* agg | (i\representation_item.name = 'upper limit'))) = 1)
+ AND (SIZEOF(QUERY (i <* agg | (i\representation_item.name = 'lower limit'))) = 1))
+ THEN
+ RETURN(TRUE);
+ ELSE
+ RETURN(FALSE);
+ END_IF;
+ END;
+END_FUNCTION;
+
+FUNCTION value_range_wr3
+ (agg: compound_item_definition) : BOOLEAN;
+BEGIN
+ IF (SIZEOF(QUERY(i1 <* agg |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MEASURE_REPRESENTATION_ITEM' IN TYPEOF (i1)) AND
+ (SIZEOF (QUERY (i2 <* agg |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MEASURE_REPRESENTATION_ITEM' IN TYPEOF (i2)) AND
+ (i1 :<>: i2) AND (i1\measure_with_unit.unit_component :=: i2\measure_with_unit.unit_component))) = 1))) = 2)
+ THEN
+ RETURN (TRUE);
+ ELSE
+ RETURN (FALSE);
+ END_IF;
+ END;
+END_FUNCTION;
+
+FUNCTION vector_difference
+ (arg1: vector_or_direction; arg2: vector_or_direction) : vector;
+ LOCAL
+ result : vector;
+ res, vec1, vec2 : direction;
+ mag, mag1, mag2 : REAL;
+ ndim : INTEGER;
+ END_LOCAL;
+
+ IF ((NOT EXISTS (arg1)) OR (NOT EXISTS (arg2))) OR (arg1.dim <> arg2.dim)
+ THEN
+ RETURN (?) ;
+ ELSE
+ BEGIN
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VECTOR' IN TYPEOF(arg1) THEN
+ mag1 := arg1.magnitude;
+ vec1 := arg1\vector.orientation;
+ ELSE
+ mag1 := 1.0;
+ vec1 := arg1;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VECTOR' IN TYPEOF(arg2) THEN
+ mag2 := arg2.magnitude;
+ vec2 := arg2\vector.orientation;
+ ELSE
+ mag2 := 1.0;
+ vec2 := arg2;
+ END_IF;
+ vec1 := normalise (vec1);
+ vec2 := normalise (vec2);
+ ndim := SIZEOF(vec1.direction_ratios);
+ mag := 0.0;
+ res := dummy_gri || direction(vec1.direction_ratios);
+ REPEAT i := 1 TO ndim;
+ res.direction_ratios[i] := mag1*vec1.direction_ratios[i] -
+ mag2*vec2.direction_ratios[i];
+ mag := mag + (res.direction_ratios[i]*res.direction_ratios[i]);
+ END_REPEAT;
+ IF (mag > 0.0 ) THEN
+ result := dummy_gri || vector( res, SQRT(mag));
+ ELSE
+ result := dummy_gri || vector( vec1, 0.0);
+ END_IF;
+ END;
+ END_IF;
+ RETURN (result);
+END_FUNCTION;
+
+END_SCHEMA;
+
diff --git a/scripts/StepImporter/schema_ap203e2_mim_lf.exp b/scripts/StepImporter/schema_ap203e2_mim_lf.exp
new file mode 100644
index 000000000..79353049a
--- /dev/null
+++ b/scripts/StepImporter/schema_ap203e2_mim_lf.exp
@@ -0,0 +1,16378 @@
+(*
+ $Id: mim_lf.exp,v 1.43 2009/09/10 20:08:09 darla Exp $
+ ISO TC184/SC4/WG3 N2635 - ISO/TS 10303-403 AP203 configuration controlled 3d design of mechanical parts and assemblies - EXPRESS MIM Long form
+ Supersedes ISO TC184/SC4/WG3 N2464
+*)
+
+SCHEMA Ap203_configuration_controlled_3d_design_of_mechanical_parts_and_assemblies_mim_lf;
+
+
+CONSTANT
+ deprecated_constructed_data_types : SET [0:?] OF STRING := ['approved_item',
+ 'certified_item',
+ 'change_request_item',
+ 'contracted_item',
+ 'cc_classified_item',
+ 'date_time_item',
+ 'cc_person_organization_item',
+ 'cc_specified_item',
+ 'start_request_item',
+ 'work_item'];
+
+
+ deprecated_entity_data_types : SET [0:?] OF STRING := ['cc_design_approval',
+ 'cc_design_certification',
+ 'cc_design_contract',
+ 'cc_design_date_and_time_assignment',
+ 'cc_design_person_and_organization_assignment',
+ 'cc_design_security_classification',
+ 'cc_design_specification_reference',
+ 'change',
+ 'change_request',
+ 'design_context',
+ 'design_make_from_relationship',
+ 'mechanical_context',
+ 'start_request',
+ 'start_work',
+ 'supplied_part_relationship'];
+
+
+ deprecated_interfaced_data_types : SET [0:?] OF STRING := ['document_with_class',
+ 'ordinal_date',
+ 'product_definition_formation_with_specified_source',
+ 'week_of_year_and_day_date'];
+
+
+ dummy_gri : geometric_representation_item := representation_item('')||
+ geometric_representation_item();
+
+
+ dummy_tri : topological_representation_item := representation_item('')||
+ topological_representation_item();
+
+
+ pre_defined_picture_representation_types : SET [0:?] OF STRING := [ 'JPEG', 'PNG', 'TIFF', 'BMP', 'GIF'];
+
+
+
+END_CONSTANT;
+
+TYPE absorbed_dose_measure = REAL;
+END_TYPE;
+
+TYPE acceleration_measure = REAL;
+END_TYPE;
+
+TYPE action_items = SELECT (
+ action_directive,
+ certification_item,
+ characterized_object,
+ classification_item,
+ configuration_effectivity,
+ document_reference_item,
+ identification_item,
+ organization,
+ person_and_organization,
+ product_definition,
+ product_definition_formation,
+ product_definition_formation_relationship,
+ product_definition_relationship,
+ requirement_assigned_item);
+END_TYPE;
+
+TYPE action_method_items = SELECT (
+ product,
+ product_definition_formation);
+END_TYPE;
+
+TYPE action_request_item = SELECT (
+ product_definition,
+ product_definition_formation,
+ product_definition_formation_relationship,
+ product_definition_relationship,
+ property_definition,
+ versioned_action_request);
+END_TYPE;
+
+TYPE ahead_or_behind = ENUMERATION OF (
+ ahead,
+ exact,
+ behind );
+END_TYPE;
+
+TYPE amount_of_substance_measure = REAL;
+END_TYPE;
+
+TYPE angle_direction_reference_select = SELECT (
+ direction,
+ curve,
+ point_path);
+END_TYPE;
+
+TYPE angle_direction_reference_with_a2p3d_select = SELECT (
+ angle_direction_reference_select,
+ axis2_placement_3d);
+END_TYPE;
+
+TYPE angle_relator = ENUMERATION OF (
+ equal,
+ large,
+ small );
+END_TYPE;
+
+TYPE annotation_plane_element = SELECT (
+ draughting_callout,
+ styled_item);
+END_TYPE;
+
+TYPE annotation_representation_select = SELECT (
+ presentation_area,
+ presentation_view,
+ symbol_representation);
+END_TYPE;
+
+TYPE annotation_symbol_occurrence_item = SELECT (
+ annotation_symbol,
+ defined_symbol);
+END_TYPE;
+
+TYPE annotation_text_occurrence_item = SELECT (
+ text_literal,
+ annotation_text,
+ annotation_text_character,
+ composite_text);
+END_TYPE;
+
+TYPE approval_item = SELECT (
+ action,
+ action_directive,
+ alternate_product_relationship,
+ applied_action_assignment,
+ applied_usage_right,
+ assembly_component_usage_substitute,
+ certification,
+ configuration_effectivity,
+ configuration_item,
+ contract,
+ date,
+ directed_action,
+ document,
+ document_file,
+ effectivity,
+ executed_action,
+ general_property_relationship,
+ group,
+ group_relationship,
+ information_usage_right,
+ product,
+ product_definition,
+ product_definition_formation,
+ product_definition_formation_relationship,
+ product_definition_relationship,
+ representation,
+ requirement_assignment,
+ security_classification,
+ shape_aspect_relationship,
+ versioned_action_request);
+END_TYPE;
+
+TYPE approved_item = SELECT (
+ certification,
+ change,
+ change_request,
+ configuration_effectivity,
+ configuration_item,
+ contract,
+ product,
+ security_classification,
+ start_request,
+ start_work);
+END_TYPE;
+
+TYPE area_measure = REAL;
+END_TYPE;
+
+TYPE area_or_view = SELECT (
+ presentation_area,
+ presentation_view);
+END_TYPE;
+
+TYPE attribute_classification_item = SELECT (
+ action_directive,
+ action_method,
+ action_property,
+ action_property_representation,
+ action_relationship,
+ action_request_solution,
+ action_request_status,
+ alternate_product_relationship,
+ applied_action_assignment,
+ applied_action_request_assignment,
+ applied_approval_assignment,
+ applied_certification_assignment,
+ applied_document_reference,
+ applied_document_usage_constraint_assignment,
+ applied_effectivity_assignment,
+ applied_event_occurrence_assignment,
+ applied_external_identification_assignment,
+ applied_identification_assignment,
+ applied_organization_assignment,
+ applied_organizational_project_assignment,
+ applied_person_and_organization_assignment,
+ approval,
+ approval_person_organization,
+ approval_relationship,
+ approval_status,
+ certification,
+ context_dependent_unit,
+ contract,
+ date_and_time_assignment,
+ date_assignment,
+ derived_unit,
+ descriptive_representation_item,
+ document_file,
+ document_relationship,
+ effectivity,
+ event_occurrence_relationship,
+ executed_action,
+ general_property,
+ general_property_relationship,
+ group,
+ group_relationship,
+ information_right,
+ information_usage_right,
+ language,
+ measure_representation_item,
+ measure_with_unit,
+ named_unit,
+ organization_relationship,
+ organizational_address,
+ organizational_project_relationship,
+ person_and_organization,
+ person_and_organization_address,
+ product,
+ product_category,
+ product_concept,
+ product_concept_context,
+ product_definition,
+ product_definition_context,
+ product_definition_formation,
+ product_definition_formation_relationship,
+ product_definition_relationship,
+ property_definition,
+ property_definition_relationship,
+ property_definition_representation,
+ representation,
+ representation_context,
+ representation_item,
+ security_classification,
+ time_interval_relationship,
+ uncertainty_measure_with_unit,
+ usage_association,
+ versioned_action_request);
+END_TYPE;
+
+TYPE attribute_language_item = SELECT (
+ alternate_product_relationship,
+ application_context,
+ applied_certification_assignment,
+ applied_document_reference,
+ applied_document_usage_constraint_assignment,
+ applied_external_identification_assignment,
+ applied_identification_assignment,
+ applied_organizational_project_assignment,
+ applied_security_classification_assignment,
+ approval,
+ approval_relationship,
+ approval_status,
+ assembly_component_usage_substitute,
+ attribute_value_assignment,
+ certification,
+ certification_type,
+ configuration_design,
+ configuration_item,
+ contract,
+ date_role,
+ date_time_role,
+ descriptive_representation_item,
+ document_relationship,
+ document_usage_role,
+ effectivity,
+ effectivity_relationship,
+ event_occurrence,
+ external_source,
+ general_property,
+ general_property_relationship,
+ geometric_representation_item,
+ geometric_tolerance,
+ identification_role,
+ information_right,
+ information_usage_right,
+ make_from_usage_option,
+ mapped_item,
+ multi_language_attribute_assignment,
+ object_role,
+ organization_relationship,
+ organization_role,
+ organizational_project,
+ organizational_project_relationship,
+ organizational_project_role,
+ person_and_organization,
+ person_and_organization_role,
+ product,
+ product_concept,
+ product_concept_relationship,
+ product_definition,
+ product_definition_context,
+ product_definition_formation,
+ product_definition_formation_relationship,
+ product_definition_relationship,
+ product_definition_shape,
+ product_related_product_category,
+ property_definition,
+ representation,
+ security_classification,
+ security_classification_assignment,
+ shape_aspect,
+ shape_aspect_relationship,
+ shape_representation,
+ time_interval_role,
+ topological_representation_item,
+ uncertainty_measure_with_unit,
+ uncertainty_qualifier,
+ usage_association);
+END_TYPE;
+
+TYPE attribute_type = SELECT (
+ label,
+ text);
+END_TYPE;
+
+TYPE axis2_placement = SELECT (
+ axis2_placement_2d,
+ axis2_placement_3d);
+END_TYPE;
+
+TYPE b_spline_curve_form = ENUMERATION OF (
+ polyline_form,
+ circular_arc,
+ elliptic_arc,
+ parabolic_arc,
+ hyperbolic_arc,
+ unspecified );
+END_TYPE;
+
+TYPE b_spline_surface_form = ENUMERATION OF (
+ plane_surf,
+ cylindrical_surf,
+ conical_surf,
+ spherical_surf,
+ toroidal_surf,
+ surf_of_revolution,
+ ruled_surf,
+ generalised_cone,
+ quadric_surf,
+ surf_of_linear_extrusion,
+ unspecified );
+END_TYPE;
+
+TYPE base_solid_select = SELECT (
+ solid_model,
+ csg_primitive,
+ boolean_result);
+WHERE
+ WR1 : NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRIMITIVE_2D' IN TYPEOF(SELF));
+END_TYPE;
+
+TYPE blend_end_condition_select = SELECT (
+ point_on_curve,
+ edge_curve,
+ vertex);
+END_TYPE;
+
+TYPE blend_radius_variation_type = ENUMERATION OF (
+ linear_blend,
+ cubic_blend,
+ unspecified_blend );
+END_TYPE;
+
+TYPE boolean_operand = SELECT (
+ solid_model,
+ half_space_solid,
+ csg_primitive,
+ boolean_result);
+END_TYPE;
+
+TYPE boolean_operator = ENUMERATION OF (
+ union,
+ intersection,
+ difference );
+END_TYPE;
+
+TYPE box_characteristic_select = SELECT (
+ box_height,
+ box_width,
+ box_slant_angle,
+ box_rotate_angle);
+END_TYPE;
+
+TYPE box_height = positive_ratio_measure;
+END_TYPE;
+
+TYPE box_rotate_angle = plane_angle_measure;
+END_TYPE;
+
+TYPE box_slant_angle = plane_angle_measure;
+END_TYPE;
+
+TYPE box_width = positive_ratio_measure;
+END_TYPE;
+
+TYPE camera_model_d3_multi_clipping_interection_select = SELECT (
+ camera_model_d3_multi_clipping_union,
+ plane);
+END_TYPE;
+
+TYPE camera_model_d3_multi_clipping_union_select = SELECT (
+ camera_model_d3_multi_clipping_intersection,
+ plane);
+END_TYPE;
+
+TYPE capacitance_measure = REAL;
+END_TYPE;
+
+TYPE category_usage_item = SELECT (
+ product_class);
+END_TYPE;
+
+TYPE cc_classified_item = SELECT (
+ assembly_component_usage,
+ product_definition_formation);
+END_TYPE;
+
+TYPE cc_person_organization_item = SELECT (
+ change,
+ change_request,
+ configuration_item,
+ contract,
+ product,
+ product_definition,
+ product_definition_formation,
+ security_classification,
+ start_request,
+ start_work);
+END_TYPE;
+
+TYPE cc_specified_item = SELECT (
+ product_definition,
+ shape_aspect);
+END_TYPE;
+
+TYPE celsius_temperature_measure = REAL;
+END_TYPE;
+
+TYPE central_or_parallel = ENUMERATION OF (
+ central,
+ parallel );
+END_TYPE;
+
+TYPE certification_item = SELECT (
+ alternate_product_relationship,
+ make_from_usage_option,
+ product_definition_formation,
+ product_definition_formation_relationship);
+END_TYPE;
+
+TYPE certified_item = SELECT (
+ supplied_part_relationship);
+END_TYPE;
+
+TYPE change_request_item = SELECT (
+ product_definition_formation);
+END_TYPE;
+
+TYPE character_spacing_select = SELECT (
+ length_measure,
+ ratio_measure,
+ measure_with_unit,
+ descriptive_measure);
+END_TYPE;
+
+TYPE character_style_select = SELECT (
+ character_glyph_style_stroke,
+ character_glyph_style_outline,
+ text_style_for_defined_font);
+END_TYPE;
+
+TYPE characterized_action_definition = SELECT (
+ action,
+ action_method,
+ action_method_relationship,
+ action_relationship);
+END_TYPE;
+
+TYPE characterized_definition = SELECT (
+ characterized_object,
+ characterized_product_definition,
+ shape_definition);
+END_TYPE;
+
+TYPE characterized_material_property = SELECT (
+ material_property_representation,
+ product_material_composition_relationship);
+END_TYPE;
+
+TYPE characterized_product_composition_value = SELECT (
+ measure_with_unit);
+END_TYPE;
+
+TYPE characterized_product_definition = SELECT (
+ product_definition,
+ product_definition_relationship);
+END_TYPE;
+
+TYPE class_usage_effectivity_context_item = SELECT (
+ product_definition);
+END_TYPE;
+
+TYPE classification_item = SELECT (
+ action,
+ action_directive,
+ action_method,
+ action_property,
+ action_relationship,
+ action_request_solution,
+ action_request_status,
+ address,
+ alternate_product_relationship,
+ applied_action_assignment,
+ applied_action_request_assignment,
+ applied_approval_assignment,
+ applied_certification_assignment,
+ applied_contract_assignment,
+ applied_date_and_time_assignment,
+ applied_date_assignment,
+ applied_document_reference,
+ applied_document_usage_constraint_assignment,
+ applied_effectivity_assignment,
+ applied_event_occurrence_assignment,
+ applied_external_identification_assignment,
+ applied_identification_assignment,
+ applied_organization_assignment,
+ applied_organizational_project_assignment,
+ applied_person_and_organization_assignment,
+ applied_security_classification_assignment,
+ approval,
+ approval_person_organization,
+ approval_relationship,
+ approval_status,
+ assembly_component_usage_substitute,
+ calendar_date,
+ certification,
+ characterized_class,
+ characterized_object,
+ class,
+ classified_item,
+ configuration_item,
+ context_dependent_unit,
+ contract,
+ conversion_based_unit,
+ date_and_time,
+ date_and_time_assignment,
+ date_assignment,
+ derived_unit,
+ descriptive_representation_item,
+ directed_action,
+ document_file,
+ document_relationship,
+ effectivity,
+ event_occurrence,
+ executed_action,
+ general_property,
+ general_property_relationship,
+ group,
+ identification_assignment,
+ information_right,
+ information_usage_right,
+ language,
+ measure_representation_item,
+ measure_with_unit,
+ multi_language_attribute_assignment,
+ named_unit,
+ organization,
+ organization_relationship,
+ organizational_address,
+ organizational_project,
+ organizational_project_relationship,
+ person,
+ person_and_organization_address,
+ product,
+ product_concept,
+ product_definition,
+ product_definition_context,
+ product_definition_formation,
+ product_definition_formation_relationship,
+ product_definition_relationship,
+ property_definition,
+ property_definition_representation,
+ representation,
+ representation_context,
+ representation_item,
+ security_classification,
+ uncertainty_measure_with_unit,
+ usage_association,
+ versioned_action_request);
+END_TYPE;
+
+TYPE classified_item = SELECT (
+ product,
+ product_definition,
+ product_definition_formation);
+END_TYPE;
+
+TYPE compound_item_definition = SELECT (
+ list_representation_item,
+ set_representation_item);
+END_TYPE;
+
+TYPE conductance_measure = REAL;
+END_TYPE;
+
+TYPE configuration_design_item = SELECT (
+ product_definition,
+ product_definition_formation);
+END_TYPE;
+
+TYPE configured_effectivity_context_item = SELECT (
+ product_concept_feature_association);
+END_TYPE;
+
+TYPE configured_effectivity_item = SELECT (
+ product_definition);
+END_TYPE;
+
+TYPE constructive_geometry_representation_or_shape_represenation = SELECT (
+ constructive_geometry_representation,
+ shape_representation);
+END_TYPE;
+
+TYPE context_dependent_measure = REAL;
+END_TYPE;
+
+TYPE contract_item = SELECT (
+ action_directive,
+ alternate_product_relationship,
+ directed_action,
+ executed_action,
+ information_usage_right,
+ organization,
+ person_and_organization,
+ product,
+ product_definition_formation);
+END_TYPE;
+
+TYPE contracted_item = SELECT (
+ product_definition_formation);
+END_TYPE;
+
+TYPE count_measure = NUMBER;
+END_TYPE;
+
+TYPE csg_primitive = SELECT (
+ sphere,
+ block,
+ right_angular_wedge,
+ torus,
+ right_circular_cone,
+ right_circular_cylinder);
+END_TYPE;
+
+TYPE csg_select = SELECT (
+ boolean_result,
+ csg_primitive);
+END_TYPE;
+
+TYPE curve_font_or_scaled_curve_font_select = SELECT (
+ curve_style_font_select,
+ curve_style_font_and_scaling);
+END_TYPE;
+
+TYPE curve_on_surface = SELECT (
+ pcurve,
+ surface_curve,
+ composite_curve_on_surface);
+END_TYPE;
+
+TYPE curve_or_annotation_curve_occurrence = SELECT (
+ curve,
+ annotation_curve_occurrence);
+END_TYPE;
+
+TYPE curve_or_render = SELECT (
+ curve_style,
+ curve_style_rendering);
+END_TYPE;
+
+TYPE curve_style_font_select = SELECT (
+ curve_style_font,
+ pre_defined_curve_font,
+ externally_defined_curve_font);
+END_TYPE;
+
+TYPE date_and_time_item = SELECT (
+ action,
+ action_directive,
+ applied_action_assignment,
+ applied_organization_assignment,
+ applied_person_and_organization_assignment,
+ applied_security_classification_assignment,
+ approval_person_organization,
+ certification,
+ contract,
+ directed_action,
+ document,
+ document_file,
+ event_occurrence,
+ executed_action,
+ information_usage_right,
+ organizational_project,
+ product_definition,
+ product_definition_formation,
+ product_definition_relationship,
+ rule_action,
+ security_classification,
+ versioned_action_request);
+END_TYPE;
+
+TYPE date_item = SELECT (
+ action,
+ action_directive,
+ applied_action_assignment,
+ applied_organization_assignment,
+ applied_person_and_organization_assignment,
+ applied_security_classification_assignment,
+ approval_person_organization,
+ certification,
+ contract,
+ directed_action,
+ document,
+ document_file,
+ event_occurrence,
+ executed_action,
+ information_usage_right,
+ organizational_project,
+ product_definition,
+ product_definition_formation,
+ product_definition_relationship,
+ security_classification,
+ versioned_action_request);
+END_TYPE;
+
+TYPE date_time_item = SELECT (
+ approval_person_organization,
+ certification,
+ change,
+ change_request,
+ contract,
+ product_definition,
+ security_classification,
+ start_request,
+ start_work);
+END_TYPE;
+
+TYPE date_time_or_event_occurrence = SELECT (
+ date_time_select,
+ event_occurrence);
+END_TYPE;
+
+TYPE date_time_select = SELECT (
+ date,
+ date_and_time,
+ local_time);
+END_TYPE;
+
+TYPE day_in_month_number = INTEGER;
+WHERE
+ WR1 : {1 <= SELF <= 31};
+END_TYPE;
+
+TYPE day_in_week_number = INTEGER;
+WHERE
+ WR1 : { 1 <= SELF <= 7 };
+END_TYPE;
+
+TYPE day_in_year_number = INTEGER;
+WHERE
+ WR1 : {1 <= SELF <= 366};
+END_TYPE;
+
+TYPE defined_symbol_select = SELECT (
+ pre_defined_symbol,
+ externally_defined_symbol);
+END_TYPE;
+
+TYPE derived_property_select = SELECT (
+ property_definition,
+ action_property);
+END_TYPE;
+
+TYPE description_attribute_select = SELECT (
+ action_request_solution,
+ application_context,
+ approval_role,
+ configuration_design,
+ date_role,
+ date_time_role,
+ context_dependent_shape_representation,
+ effectivity,
+ external_source,
+ organization_role,
+ person_and_organization_role,
+ person_and_organization,
+ property_definition_representation,
+ representation);
+END_TYPE;
+
+TYPE descriptive_measure = STRING;
+END_TYPE;
+
+TYPE dimension_count = INTEGER;
+WHERE
+ WR1 : SELF > 0;
+END_TYPE;
+
+TYPE dimension_extent_usage = ENUMERATION OF (
+ origin,
+ target );
+END_TYPE;
+
+TYPE dimensional_characteristic = SELECT (
+ dimensional_location,
+ dimensional_size);
+END_TYPE;
+
+TYPE direction_count_select = SELECT (
+ u_direction_count,
+ v_direction_count);
+END_TYPE;
+
+TYPE document_identifier_assigned_item = SELECT (
+ document);
+END_TYPE;
+
+TYPE document_reference_item = SELECT (
+ action_method,
+ applied_external_identification_assignment,
+ assembly_component_usage,
+ characterized_class,
+ characterized_object,
+ configuration_item,
+ descriptive_representation_item,
+ dimensional_size,
+ executed_action,
+ externally_defined_dimension_definition,
+ externally_defined_item,
+ group,
+ group_relationship,
+ information_right,
+ information_usage_right,
+ material_designation,
+ measure_representation_item,
+ product,
+ product_category,
+ product_definition,
+ product_definition_formation,
+ product_definition_formation_relationship,
+ product_definition_relationship,
+ property_definition,
+ representation,
+ representation_item,
+ rule_set,
+ shape_aspect,
+ shape_aspect_relationship,
+ usage_association,
+ versioned_action_request);
+END_TYPE;
+
+TYPE dose_equivalent_measure = REAL;
+END_TYPE;
+
+TYPE draughting_callout_element = SELECT (
+ annotation_text_occurrence,
+ annotation_symbol_occurrence,
+ annotation_curve_occurrence);
+END_TYPE;
+
+TYPE draughting_model_item_association_select = SELECT (
+ annotation_occurrence,
+ draughting_callout);
+END_TYPE;
+
+TYPE draughting_model_item_select = SELECT (
+ mapped_item,
+ styled_item,
+ axis2_placement,
+ camera_model,
+ draughting_callout);
+END_TYPE;
+
+TYPE draughting_titled_item = SELECT (
+ drawing_revision,
+ drawing_sheet_revision);
+END_TYPE;
+
+TYPE effectivity_item = SELECT (
+ assembly_component_usage_substitute,
+ product,
+ product_definition,
+ product_definition_formation,
+ product_definition_relationship,
+ product_definition_substitute);
+END_TYPE;
+
+TYPE electric_charge_measure = REAL;
+END_TYPE;
+
+TYPE electric_current_measure = REAL;
+END_TYPE;
+
+TYPE electric_potential_measure = REAL;
+END_TYPE;
+
+TYPE energy_measure = REAL;
+END_TYPE;
+
+TYPE event_occurrence_item = SELECT (
+ organizational_project);
+END_TYPE;
+
+TYPE external_identification_item = SELECT (
+ action_relationship,
+ action_request_status,
+ applied_organization_assignment,
+ applied_person_and_organization_assignment,
+ approval,
+ approval_status,
+ date_and_time_assignment,
+ date_assignment,
+ document_file,
+ external_source,
+ externally_defined_class,
+ externally_defined_context_dependent_unit,
+ externally_defined_conversion_based_unit,
+ externally_defined_general_property,
+ externally_defined_picture_representation_item,
+ externally_defined_representation_item,
+ organizational_address,
+ product_definition,
+ security_classification,
+ trimmed_curve,
+ versioned_action_request);
+END_TYPE;
+
+TYPE fill_area_style_tile_shape_select = SELECT (
+ fill_area_style_tile_curve_with_style,
+ fill_area_style_tile_coloured_region,
+ fill_area_style_tile_symbol_with_style,
+ pre_defined_tile,
+ externally_defined_tile);
+END_TYPE;
+
+TYPE fill_style_select = SELECT (
+ fill_area_style_colour,
+ externally_defined_tile_style,
+ fill_area_style_tiles,
+ externally_defined_hatch_style,
+ fill_area_style_hatching);
+END_TYPE;
+
+TYPE font_select = SELECT (
+ pre_defined_text_font,
+ externally_defined_text_font,
+ text_font);
+END_TYPE;
+
+TYPE force_measure = REAL;
+END_TYPE;
+
+TYPE founded_item_select = SELECT (
+ founded_item,
+ representation_item);
+END_TYPE;
+
+TYPE frequency_measure = REAL;
+END_TYPE;
+
+TYPE generalized_surface_select = SELECT (
+ surface,
+ face_surface,
+ surfaced_open_shell);
+END_TYPE;
+
+TYPE geometric_item_specific_usage_select = SELECT (
+ shape_aspect,
+ shape_aspect_relationship);
+END_TYPE;
+
+TYPE geometric_set_select = SELECT (
+ point,
+ curve,
+ surface);
+END_TYPE;
+
+TYPE groupable_item = SELECT (
+ geometric_representation_item,
+ group_relationship,
+ mapped_item,
+ package_product_concept_feature,
+ product_concept_feature,
+ product_definition,
+ product_definition_formation,
+ property_definition_representation,
+ representation,
+ representation_item,
+ representation_relationship_with_transformation,
+ shape_aspect,
+ shape_aspect_relationship,
+ shape_representation_relationship,
+ styled_item,
+ topological_representation_item);
+WHERE
+ WR1 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GROUP' IN TYPEOF(SELF));
+END_TYPE;
+
+TYPE hour_in_day = INTEGER;
+WHERE
+ WR1 : { 0 <= SELF < 24 };
+END_TYPE;
+
+TYPE id_attribute_select = SELECT (
+ action,
+ address,
+ product_category,
+ property_definition,
+ shape_aspect,
+ shape_aspect_relationship,
+ application_context,
+ group,
+ organizational_project,
+ representation);
+END_TYPE;
+
+TYPE identification_item = SELECT (
+ approval_status,
+ characterized_class,
+ class,
+ configuration_item,
+ contract,
+ dimensional_size,
+ document_file,
+ general_property,
+ group,
+ group_relationship,
+ information_right,
+ information_usage_right,
+ material_designation,
+ organization,
+ person_and_organization,
+ product,
+ product_category,
+ product_class,
+ product_concept,
+ product_concept_feature,
+ product_definition,
+ product_definition_formation,
+ product_identification,
+ representation,
+ rule_set,
+ security_classification,
+ security_classification_level,
+ shape_aspect_relationship,
+ shape_representation,
+ usage_association);
+END_TYPE;
+
+TYPE identifier = STRING;
+END_TYPE;
+
+TYPE illuminance_measure = REAL;
+END_TYPE;
+
+TYPE inductance_measure = REAL;
+END_TYPE;
+
+TYPE instance_usage_context_select = SELECT (
+ product_definition_relationship,
+ product_definition_usage);
+END_TYPE;
+
+TYPE invisibility_context = SELECT (
+ draughting_model,
+ presentation_representation,
+ presentation_set);
+END_TYPE;
+
+TYPE invisible_item = SELECT (
+ draughting_callout,
+ presentation_layer_assignment,
+ representation,
+ styled_item);
+END_TYPE;
+
+TYPE ir_usage_item = action_items;
+WHERE
+ wr1 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONFIGURATION_EFFECTIVITY' IN TYPEOF(SELF));
+END_TYPE;
+
+TYPE knot_type = ENUMERATION OF (
+ uniform_knots,
+ quasi_uniform_knots,
+ piecewise_bezier_knots,
+ unspecified );
+END_TYPE;
+
+TYPE label = STRING;
+END_TYPE;
+
+TYPE layered_item = SELECT (
+ presentation_representation,
+ representation_item);
+END_TYPE;
+
+TYPE length_measure = REAL;
+END_TYPE;
+
+TYPE limit_condition = ENUMERATION OF (
+ maximum_material_condition,
+ least_material_condition,
+ regardless_of_feature_size );
+END_TYPE;
+
+TYPE list_of_reversible_topology_item = LIST [0:?] OF reversible_topology_item;
+END_TYPE;
+
+TYPE list_representation_item = LIST [1:?] OF representation_item;
+END_TYPE;
+
+TYPE luminous_flux_measure = REAL;
+END_TYPE;
+
+TYPE luminous_intensity_measure = REAL;
+END_TYPE;
+
+TYPE magnetic_flux_density_measure = REAL;
+END_TYPE;
+
+TYPE magnetic_flux_measure = REAL;
+END_TYPE;
+
+TYPE marker_select = SELECT (
+ marker_type,
+ pre_defined_marker);
+END_TYPE;
+
+TYPE marker_type = ENUMERATION OF (
+ dot,
+ x,
+ plus,
+ asterisk,
+ ring,
+ square,
+ triangle );
+END_TYPE;
+
+TYPE mass_measure = REAL;
+END_TYPE;
+
+TYPE measure_value = SELECT (
+ absorbed_dose_measure,
+ dose_equivalent_measure,
+ radioactivity_measure,
+ acceleration_measure,
+ amount_of_substance_measure,
+ area_measure,
+ celsius_temperature_measure,
+ context_dependent_measure,
+ count_measure,
+ descriptive_measure,
+ capacitance_measure,
+ electric_charge_measure,
+ conductance_measure,
+ electric_current_measure,
+ electric_potential_measure,
+ energy_measure,
+ magnetic_flux_density_measure,
+ force_measure,
+ frequency_measure,
+ illuminance_measure,
+ inductance_measure,
+ length_measure,
+ luminous_flux_measure,
+ luminous_intensity_measure,
+ magnetic_flux_measure,
+ mass_measure,
+ numeric_measure,
+ non_negative_length_measure,
+ parameter_value,
+ plane_angle_measure,
+ positive_length_measure,
+ positive_plane_angle_measure,
+ positive_ratio_measure,
+ power_measure,
+ pressure_measure,
+ ratio_measure,
+ resistance_measure,
+ solid_angle_measure,
+ thermodynamic_temperature_measure,
+ time_measure,
+ velocity_measure,
+ volume_measure);
+END_TYPE;
+
+TYPE mechanical_design_and_draughting_relationship_select = SELECT (
+ draughting_model,
+ mechanical_design_geometric_presentation_representation,
+ mechanical_design_presentation_representation_with_draughting,
+ mechanical_design_shaded_presentation_representation,
+ shape_representation);
+END_TYPE;
+
+TYPE mechanical_design_geometric_presentation_area_items = SELECT (
+ axis2_placement,
+ mapped_item);
+END_TYPE;
+
+TYPE mechanical_design_geometric_presentation_representation_items = SELECT (
+ axis2_placement,
+ camera_model_d3,
+ mapped_item,
+ styled_item);
+END_TYPE;
+
+TYPE message = STRING;
+END_TYPE;
+
+TYPE minute_in_hour = INTEGER;
+WHERE
+ WR1 : { 0 <= SELF <= 59 };
+END_TYPE;
+
+TYPE month_in_year_number = INTEGER;
+WHERE
+ WR1 : { 1 <= SELF <= 12 };
+END_TYPE;
+
+TYPE multi_language_attribute_item = SELECT (
+ alternate_product_relationship,
+ application_context,
+ applied_certification_assignment,
+ applied_document_reference,
+ applied_document_usage_constraint_assignment,
+ applied_external_identification_assignment,
+ applied_identification_assignment,
+ applied_organizational_project_assignment,
+ approval,
+ approval_relationship,
+ approval_status,
+ assembly_component_usage_substitute,
+ attribute_value_assignment,
+ certification,
+ certification_type,
+ colour,
+ configuration_design,
+ configuration_item,
+ contract,
+ date_role,
+ date_time_role,
+ descriptive_representation_item,
+ document_relationship,
+ document_usage_role,
+ effectivity,
+ effectivity_relationship,
+ event_occurrence,
+ external_source,
+ general_property,
+ general_property_relationship,
+ geometric_representation_item,
+ geometric_tolerance,
+ identification_role,
+ information_right,
+ information_usage_right,
+ make_from_usage_option,
+ mapped_item,
+ object_role,
+ organization_relationship,
+ organization_role,
+ organizational_project,
+ organizational_project_relationship,
+ organizational_project_role,
+ person_and_organization,
+ person_and_organization_role,
+ product,
+ product_concept,
+ product_concept_relationship,
+ product_definition,
+ product_definition_context,
+ product_definition_formation,
+ product_definition_formation_relationship,
+ product_definition_relationship,
+ product_definition_shape,
+ product_related_product_category,
+ property_definition,
+ representation,
+ representation_relationship,
+ security_classification,
+ security_classification_assignment,
+ shape_aspect,
+ shape_aspect_relationship,
+ shape_representation,
+ time_interval_role,
+ topological_representation_item,
+ uncertainty_measure_with_unit,
+ usage_association);
+END_TYPE;
+
+TYPE name_attribute_select = SELECT (
+ action_request_solution,
+ address,
+ configuration_design,
+ context_dependent_shape_representation,
+ derived_unit,
+ effectivity,
+ person_and_organization,
+ product_definition,
+ product_definition_substitute,
+ property_definition_representation);
+END_TYPE;
+
+TYPE name_item = SELECT (
+ assembly_component_usage,
+ external_class_library,
+ group,
+ group_relationship,
+ product,
+ product_definition);
+END_TYPE;
+
+TYPE non_negative_length_measure = length_measure;
+WHERE
+ WR1 : SELF >= 0.0;
+END_TYPE;
+
+TYPE nonnegative_integer = INTEGER;
+WHERE
+ nonnegativity : SELF >= 0;
+END_TYPE;
+
+TYPE null_style = ENUMERATION OF (
+ null );
+END_TYPE;
+
+TYPE numeric_measure = NUMBER;
+END_TYPE;
+
+TYPE organization_item = SELECT (
+ action,
+ action_directive,
+ alternate_product_relationship,
+ applied_action_assignment,
+ applied_classification_assignment,
+ applied_identification_assignment,
+ applied_security_classification_assignment,
+ approval,
+ assembly_component_usage_substitute,
+ certification,
+ class,
+ configuration_item,
+ contract,
+ document_file,
+ executed_action,
+ general_property,
+ information_usage_right,
+ organizational_project,
+ product,
+ product_definition,
+ product_definition_formation,
+ product_definition_formation_relationship,
+ property_definition,
+ rule_action,
+ security_classification,
+ shape_representation,
+ versioned_action_request);
+END_TYPE;
+
+TYPE orientation_basis_select = SELECT (
+ axis2_placement_3d,
+ min_and_major_ply_orientation_basis);
+END_TYPE;
+
+TYPE parameter_value = REAL;
+END_TYPE;
+
+TYPE pcurve_or_surface = SELECT (
+ pcurve,
+ surface);
+END_TYPE;
+
+TYPE person_and_organization_item = SELECT (
+ action,
+ action_directive,
+ alternate_product_relationship,
+ applied_action_assignment,
+ applied_classification_assignment,
+ applied_identification_assignment,
+ applied_security_classification_assignment,
+ approval,
+ assembly_component_usage_substitute,
+ certification,
+ configuration_item,
+ contract,
+ document_file,
+ executed_action,
+ general_property,
+ information_usage_right,
+ organizational_project,
+ person_and_organization,
+ product,
+ product_definition,
+ product_definition_formation,
+ product_definition_formation_relationship,
+ property_definition,
+ rule_action,
+ security_classification,
+ shape_representation,
+ versioned_action_request);
+END_TYPE;
+
+TYPE person_organization_select = SELECT (
+ person,
+ organization,
+ person_and_organization);
+END_TYPE;
+
+TYPE picture_representation_item_select = SELECT (
+ styled_item,
+ planar_box,
+ axis2_placement_2d);
+END_TYPE;
+
+TYPE plane_angle_measure = REAL;
+END_TYPE;
+
+TYPE plane_or_planar_box = SELECT (
+ plane,
+ planar_box);
+END_TYPE;
+
+TYPE point_and_vector_member = SELECT (
+ point,
+ direction);
+END_TYPE;
+
+TYPE point_and_vector_members = LIST [2:3] OF point_and_vector_member;
+END_TYPE;
+
+TYPE point_path_members = LIST [1:?] OF point_and_vector;
+END_TYPE;
+
+TYPE positive_integer = nonnegative_integer;
+WHERE
+ positivity : SELF > 0;
+END_TYPE;
+
+TYPE positive_length_measure = non_negative_length_measure;
+WHERE
+ WR1 : SELF > 0.0;
+END_TYPE;
+
+TYPE positive_plane_angle_measure = plane_angle_measure;
+WHERE
+ WR1 : SELF > 0.0;
+END_TYPE;
+
+TYPE positive_ratio_measure = ratio_measure;
+WHERE
+ WR1 : SELF > 0.0;
+END_TYPE;
+
+TYPE power_measure = REAL;
+END_TYPE;
+
+TYPE preferred_surface_curve_representation = ENUMERATION OF (
+ curve_3d,
+ pcurve_s1,
+ pcurve_s2 );
+END_TYPE;
+
+TYPE presentable_text = STRING;
+WHERE
+ WR1 : control_characters_free(SELF);
+END_TYPE;
+
+TYPE presentation_representation_select = SELECT (
+ presentation_representation,
+ presentation_set);
+END_TYPE;
+
+TYPE presentation_size_assignment_select = SELECT (
+ presentation_view,
+ presentation_area,
+ area_in_set);
+END_TYPE;
+
+TYPE presentation_style_select = SELECT (
+ point_style,
+ curve_style,
+ surface_style_usage,
+ symbol_style,
+ fill_area_style,
+ text_style,
+ null_style);
+END_TYPE;
+
+TYPE presented_item_select = SELECT (
+ action,
+ action_method,
+ action_relationship,
+ product_concept,
+ product_concept_feature,
+ product_concept_feature_category,
+ product_definition,
+ product_definition_formation,
+ product_definition_relationship);
+END_TYPE;
+
+TYPE pressure_measure = REAL;
+END_TYPE;
+
+TYPE product_definition_or_assembly_relationship = SELECT (
+ assembly_component_usage,
+ product_definition);
+END_TYPE;
+
+TYPE product_definition_or_breakdown_element_usage = SELECT (
+ product_definition,
+ product_definition_usage);
+END_TYPE;
+
+TYPE product_definition_or_product_definition_relationship = SELECT (
+ product_definition,
+ product_definition_usage);
+END_TYPE;
+
+TYPE product_or_formation_or_definition = SELECT (
+ product,
+ product_definition_formation,
+ product_definition);
+END_TYPE;
+
+TYPE project_item = SELECT (
+ executed_action,
+ product_concept);
+END_TYPE;
+
+TYPE radioactivity_measure = REAL;
+END_TYPE;
+
+TYPE ratio_measure = REAL;
+END_TYPE;
+
+TYPE rendering_properties_select = SELECT (
+ surface_style_reflectance_ambient,
+ surface_style_transparent);
+END_TYPE;
+
+TYPE represented_definition = SELECT (
+ general_property,
+ property_definition,
+ property_definition_relationship,
+ shape_aspect,
+ shape_aspect_relationship);
+END_TYPE;
+
+TYPE requirement_assigned_item = SELECT (
+ configuration_item,
+ descriptive_representation_item,
+ product,
+ product_class,
+ product_definition,
+ product_definition_formation,
+ product_definition_relationship,
+ representation,
+ shape_aspect);
+END_TYPE;
+
+TYPE requirement_satisfaction_item = SELECT (
+ requirement_assigned_item);
+END_TYPE;
+
+TYPE requirement_source_item = SELECT (
+ characterized_object,
+ group,
+ group_relationship,
+ product,
+ product_definition,
+ product_definition_formation,
+ product_definition_relationship,
+ shape_aspect);
+END_TYPE;
+
+TYPE resistance_measure = REAL;
+END_TYPE;
+
+TYPE reversible_topology = SELECT (
+ reversible_topology_item,
+ list_of_reversible_topology_item,
+ set_of_reversible_topology_item);
+END_TYPE;
+
+TYPE reversible_topology_item = SELECT (
+ edge,
+ path,
+ face,
+ face_bound,
+ closed_shell,
+ open_shell);
+END_TYPE;
+
+TYPE role_select = SELECT (
+ action_assignment,
+ action_request_assignment,
+ approval_assignment,
+ approval_date_time,
+ certification_assignment,
+ contract_assignment,
+ document_reference,
+ effectivity_assignment,
+ group_assignment,
+ name_assignment,
+ security_classification_assignment);
+END_TYPE;
+
+TYPE rule_superseded_item = SELECT (
+ product_definition_formation);
+END_TYPE;
+
+TYPE second_in_minute = REAL;
+WHERE
+ WR1 : { 0 <= SELF <= 60.0 };
+END_TYPE;
+
+TYPE security_classification_item = SELECT (
+ assembly_component_usage,
+ document,
+ document_file,
+ make_from_usage_option,
+ product,
+ product_definition,
+ product_definition_formation,
+ product_definition_usage);
+END_TYPE;
+
+TYPE set_of_reversible_topology_item = SET [0:?] OF reversible_topology_item;
+END_TYPE;
+
+TYPE set_representation_item = SET [1:?] OF representation_item;
+END_TYPE;
+
+TYPE shading_curve_method = ENUMERATION OF (
+ constant_colour,
+ linear_colour );
+END_TYPE;
+
+TYPE shading_surface_method = ENUMERATION OF (
+ constant_shading,
+ colour_shading,
+ dot_shading,
+ normal_shading );
+END_TYPE;
+
+TYPE shape_definition = SELECT (
+ product_definition_shape,
+ shape_aspect,
+ shape_aspect_relationship);
+END_TYPE;
+
+TYPE shell = SELECT (
+ vertex_shell,
+ wire_shell,
+ open_shell,
+ closed_shell);
+END_TYPE;
+
+TYPE si_prefix = ENUMERATION OF (
+ exa,
+ peta,
+ tera,
+ giga,
+ mega,
+ kilo,
+ hecto,
+ deca,
+ deci,
+ centi,
+ milli,
+ micro,
+ nano,
+ pico,
+ femto,
+ atto );
+END_TYPE;
+
+TYPE si_unit_name = ENUMERATION OF (
+ metre,
+ gram,
+ second,
+ ampere,
+ kelvin,
+ mole,
+ candela,
+ radian,
+ steradian,
+ hertz,
+ newton,
+ pascal,
+ joule,
+ watt,
+ coulomb,
+ volt,
+ farad,
+ ohm,
+ siemens,
+ weber,
+ tesla,
+ henry,
+ degree_Celsius,
+ lumen,
+ lux,
+ becquerel,
+ gray,
+ sievert );
+END_TYPE;
+
+TYPE size_select = SELECT (
+ positive_length_measure,
+ measure_with_unit,
+ descriptive_measure);
+END_TYPE;
+
+TYPE sketch_basis_select = SELECT (
+ curve_bounded_surface,
+ face_surface);
+END_TYPE;
+
+TYPE solid_angle_measure = REAL;
+END_TYPE;
+
+TYPE source = ENUMERATION OF (
+ made,
+ bought,
+ not_known );
+END_TYPE;
+
+TYPE source_item = SELECT (
+ identifier,
+ message);
+END_TYPE;
+
+TYPE start_request_item = SELECT (
+ product_definition_formation);
+END_TYPE;
+
+TYPE string_representation_item_select = SELECT (
+ descriptive_representation_item,
+ included_text_block,
+ structured_text_composition);
+END_TYPE;
+
+TYPE style_context_select = SELECT (
+ group,
+ presentation_layer_assignment,
+ presentation_set,
+ representation,
+ representation_item,
+ representation_relationship);
+END_TYPE;
+
+TYPE surface_side = ENUMERATION OF (
+ positive,
+ negative,
+ both );
+END_TYPE;
+
+TYPE surface_side_style_select = SELECT (
+ surface_side_style,
+ pre_defined_surface_side_style);
+END_TYPE;
+
+TYPE surface_style_element_select = SELECT (
+ surface_style_fill_area,
+ surface_style_boundary,
+ surface_style_silhouette,
+ surface_style_segmentation_curve,
+ surface_style_control_grid,
+ surface_style_parameter_line,
+ surface_style_rendering);
+END_TYPE;
+
+TYPE symbol_style_select = SELECT (
+ symbol_colour);
+END_TYPE;
+
+TYPE text = STRING;
+END_TYPE;
+
+TYPE text_alignment = label;
+END_TYPE;
+
+TYPE text_delineation = label;
+END_TYPE;
+
+TYPE text_or_character = SELECT (
+ annotation_text,
+ annotation_text_character,
+ composite_text,
+ text_literal);
+END_TYPE;
+
+TYPE text_path = ENUMERATION OF (
+ left,
+ right,
+ up,
+ down );
+END_TYPE;
+
+TYPE text_string_representation_item = SELECT (
+ text_literal,
+ annotation_text,
+ annotation_text_character,
+ composite_text,
+ axis2_placement);
+END_TYPE;
+
+TYPE thermodynamic_temperature_measure = REAL;
+END_TYPE;
+
+TYPE time_interval_item = SELECT (
+ action,
+ time_interval_based_effectivity);
+END_TYPE;
+
+TYPE time_measure = REAL;
+END_TYPE;
+
+TYPE tolerance_method_definition = SELECT (
+ tolerance_value,
+ limits_and_fits);
+END_TYPE;
+
+TYPE transformation = SELECT (
+ item_defined_transformation,
+ functionally_defined_transformation);
+END_TYPE;
+
+TYPE transition_code = ENUMERATION OF (
+ discontinuous,
+ continuous,
+ cont_same_gradient,
+ cont_same_gradient_same_curvature );
+END_TYPE;
+
+TYPE trim_condition_select = SELECT (
+ length_measure,
+ plane_angle_measure,
+ generalized_surface_select,
+ solid_model);
+END_TYPE;
+
+TYPE trim_intent = ENUMERATION OF (
+ blind,
+ offset,
+ through_all,
+ unspecified,
+ up_to_next );
+END_TYPE;
+
+TYPE trimming_preference = ENUMERATION OF (
+ cartesian,
+ parameter,
+ unspecified );
+END_TYPE;
+
+TYPE trimming_select = SELECT (
+ cartesian_point,
+ parameter_value);
+END_TYPE;
+
+TYPE u_direction_count = INTEGER;
+WHERE
+ WR1 : SELF > 1;
+END_TYPE;
+
+TYPE unit = SELECT (
+ derived_unit,
+ named_unit);
+END_TYPE;
+
+TYPE v_direction_count = INTEGER;
+WHERE
+ WR1 : SELF > 1;
+END_TYPE;
+
+TYPE value_qualifier = SELECT (
+ precision_qualifier,
+ type_qualifier,
+ uncertainty_qualifier);
+END_TYPE;
+
+TYPE vector_or_direction = SELECT (
+ vector,
+ direction);
+END_TYPE;
+
+TYPE velocity_measure = REAL;
+END_TYPE;
+
+TYPE volume_measure = REAL;
+END_TYPE;
+
+TYPE week_in_year_number = INTEGER;
+WHERE
+ WR1 : { 1 <= SELF <= 53 };
+END_TYPE;
+
+TYPE work_item = SELECT (
+ product_definition_formation);
+END_TYPE;
+
+TYPE year_number = INTEGER;
+END_TYPE;
+
+ENTITY absorbed_dose_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ABSORBED_DOSE_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY absorbed_dose_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) = dimensions_for_si_unit (si_unit_name.gray);
+END_ENTITY;
+
+
+ENTITY abstract_variable
+ SUBTYPE OF (property_definition, property_definition_representation, representation, representation_item);
+END_ENTITY;
+
+
+ENTITY acceleration_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ACCELERATION_UNIT' IN TYPEOF (SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY acceleration_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) =
+ dimensional_exponents ( 1.0, 0.0, -2.0, 0.0, 0.0, 0.0, 0.0 );
+END_ENTITY;
+
+
+ENTITY action;
+ name : label;
+ description : OPTIONAL text;
+ chosen_method : action_method;
+DERIVE
+ id : identifier := get_id_value(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY action_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_action : action;
+DERIVE
+ role : object_role := get_role(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ROLE_ASSOCIATION.ITEM_WITH_ROLE')) <= 1;
+END_ENTITY;
+
+
+ENTITY action_directive;
+ name : label;
+ description : OPTIONAL text;
+ analysis : text;
+ comment : text;
+ requests : SET [1:?] OF versioned_action_request;
+END_ENTITY;
+
+
+ENTITY action_method;
+ name : label;
+ description : OPTIONAL text;
+ consequence : text;
+ purpose : text;
+END_ENTITY;
+
+
+ENTITY action_method_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_action_method : action_method;
+ role : action_method_role;
+END_ENTITY;
+
+
+ENTITY action_method_relationship;
+ name : label;
+ description : OPTIONAL text;
+ relating_method : action_method;
+ related_method : action_method;
+END_ENTITY;
+
+
+ENTITY action_method_role;
+ name : label;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY action_property;
+ name : label;
+ description : text;
+ definition : characterized_action_definition;
+END_ENTITY;
+
+
+ENTITY action_property_representation;
+ name : label;
+ description : text;
+ property : action_property;
+ representation : representation;
+END_ENTITY;
+
+
+ENTITY action_relationship;
+ name : label;
+ description : OPTIONAL text;
+ relating_action : action;
+ related_action : action;
+END_ENTITY;
+
+
+ENTITY action_request_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_action_request : versioned_action_request;
+DERIVE
+ role : object_role := get_role(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ROLE_ASSOCIATION.ITEM_WITH_ROLE')) <= 1;
+END_ENTITY;
+
+
+ENTITY action_request_solution;
+ method : action_method;
+ request : versioned_action_request;
+DERIVE
+ description : text := get_description_value(SELF);
+ name : label := get_name_value(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
+ WR2 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'NAME_ATTRIBUTE.NAMED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY action_request_status;
+ status : label;
+ assigned_request : versioned_action_request;
+END_ENTITY;
+
+
+ENTITY action_status;
+ status : label;
+ assigned_action : executed_action;
+END_ENTITY;
+
+
+ENTITY address;
+ internal_location : OPTIONAL label;
+ street_number : OPTIONAL label;
+ street : OPTIONAL label;
+ postal_box : OPTIONAL label;
+ town : OPTIONAL label;
+ region : OPTIONAL label;
+ postal_code : OPTIONAL label;
+ country : OPTIONAL label;
+ facsimile_number : OPTIONAL label;
+ telephone_number : OPTIONAL label;
+ electronic_mail_address : OPTIONAL label;
+ telex_number : OPTIONAL label;
+DERIVE
+ name : label := get_name_value(SELF);
+ url : identifier := get_id_value(SELF);
+WHERE
+ WR1 : EXISTS(internal_location) OR EXISTS(street_number) OR EXISTS(street) OR EXISTS(postal_box) OR EXISTS(town) OR EXISTS(region) OR EXISTS(postal_code) OR EXISTS(country) OR EXISTS(facsimile_number) OR EXISTS(telephone_number) OR EXISTS(electronic_mail_address) OR EXISTS(telex_number);
+END_ENTITY;
+
+
+ENTITY advanced_brep_shape_representation
+ SUBTYPE OF (shape_representation);
+WHERE
+ WR1 : SIZEOF (
+QUERY ( it <* SELF.items| NOT ( SIZEOF ([ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MANIFOLD_SOLID_BREP', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACETED_BREP', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT_3D' ] * TYPEOF (it)) = 1) )) = 0;
+ WR2 : SIZEOF (
+QUERY ( it <* SELF.items| ( SIZEOF ([ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MANIFOLD_SOLID_BREP', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' ] * TYPEOF (it)) = 1) )) > 0;
+ WR3 : SIZEOF (
+QUERY ( msb <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MANIFOLD_SOLID_BREP' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( csh <* msb_shells(msb)| NOT ( SIZEOF (
+QUERY ( fcs <* csh\connected_face_set.cfs_faces| NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF (fcs)) )) = 0) )) = 0) )) = 0;
+ WR4 : SIZEOF (
+QUERY ( msb <*
+QUERY ( it <* items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MANIFOLD_SOLID_BREP' IN TYPEOF (it)) )| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORIENTED_CLOSED_SHELL' IN TYPEOF (msb\manifold_solid_brep.outer)) )) = 0;
+ WR5 : SIZEOF (
+QUERY ( brv <*
+QUERY ( it <* items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.BREP_WITH_VOIDS' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( csh <* brv\brep_with_voids.voids| csh\oriented_closed_shell.orientation )) = 0) )) = 0;
+ WR6 : SIZEOF (
+QUERY ( mi <*
+QUERY ( it <* items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' IN TYPEOF (it)) )| NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_BREP_SHAPE_REPRESENTATION' IN TYPEOF (mi\mapped_item.mapping_source.mapped_representation)) )) = 0;
+END_ENTITY;
+
+
+ENTITY advanced_face
+ SUBTYPE OF (face_surface);
+WHERE
+ WR1 : SIZEOF ([ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ELEMENTARY_SURFACE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_SURFACE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SWEPT_SURFACE' ] * TYPEOF (face_geometry)) = 1;
+ WR2 : SIZEOF (
+QUERY ( elp_fbnds <*
+QUERY ( bnds <* bounds| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (bnds.bound)) )| NOT ( SIZEOF (
+QUERY ( oe <* elp_fbnds.bound\path.edge_list| NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_CURVE' IN TYPEOF (oe\oriented_edge.edge_element)) )) = 0) )) = 0;
+ WR3 : SIZEOF (
+QUERY ( elp_fbnds <*
+QUERY ( bnds <* bounds| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (bnds.bound)) )| NOT ( SIZEOF (
+QUERY ( oe <* elp_fbnds.bound\path.edge_list| NOT ( SIZEOF ([ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LINE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONIC', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_CURVE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_CURVE' ] * TYPEOF (oe.edge_element\edge_curve.edge_geometry)) = 1) )) = 0) )) = 0;
+ WR4 : SIZEOF (
+QUERY ( elp_fbnds <*
+QUERY ( bnds <* bounds| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (bnds.bound)) )| NOT ( SIZEOF (
+QUERY ( oe <* elp_fbnds.bound\path.edge_list| NOT ((('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN TYPEOF (oe\edge.edge_start)) AND ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CARTESIAN_POINT' IN TYPEOF (oe\edge.edge_start\vertex_point.vertex_geometry))) AND (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN TYPEOF (oe\edge.edge_end)) AND ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CARTESIAN_POINT' IN TYPEOF (oe\edge.edge_end\vertex_point.vertex_geometry)))) )) = 0) )) = 0;
+ WR5 : SIZEOF (
+QUERY ( elp_fbnds <*
+QUERY ( bnds <* bounds| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (bnds.bound)) )| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORIENTED_PATH' IN TYPEOF (elp_fbnds.bound)) )) = 0;
+ WR6 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SWEPT_SURFACE' IN TYPEOF (face_geometry)) OR ( SIZEOF ([ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LINE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONIC', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_CURVE' ] * TYPEOF (face_geometry\swept_surface.swept_curve)) = 1);
+ WR7 : SIZEOF (
+QUERY ( vlp_fbnds <*
+QUERY ( bnds <* bounds| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_LOOP' IN TYPEOF (bnds.bound)) )| NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN TYPEOF (vlp_fbnds\face_bound.bound\vertex_loop.loop_vertex)) AND ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CARTESIAN_POINT' IN TYPEOF (vlp_fbnds\face_bound.bound\vertex_loop.loop_vertex\vertex_point.vertex_geometry))) )) = 0;
+ WR8 : SIZEOF (
+QUERY ( bnd <* bounds| NOT ( SIZEOF ([ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_LOOP' ] * TYPEOF (bnd.bound)) = 1) )) = 0;
+ WR9 : SIZEOF (
+QUERY ( elp_fbnds <*
+QUERY ( bnds <* bounds| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (bnds.bound)) )| NOT ( SIZEOF (
+QUERY ( oe <* elp_fbnds.bound\path.edge_list| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_CURVE' IN TYPEOF (oe\oriented_edge.edge_element\edge_curve.edge_geometry)) AND NOT ( SIZEOF (
+QUERY ( sc_ag <* oe.edge_element\edge_curve.edge_geometry\surface_curve.associated_geometry| NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE' IN TYPEOF (sc_ag)) )) = 0) )) = 0) )) = 0;
+ WR10 : (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SWEPT_SURFACE' IN TYPEOF (face_geometry)) OR (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE' IN TYPEOF (face_geometry\swept_surface.swept_curve)) OR ( SIZEOF (face_geometry\swept_surface.swept_curve\polyline.points) >= 3))) AND ( SIZEOF (
+QUERY ( elp_fbnds <*
+QUERY ( bnds <* bounds| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (bnds.bound)) )| NOT ( SIZEOF (
+QUERY ( oe <* elp_fbnds.bound\path.edge_list| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE' IN TYPEOF (oe\oriented_edge.edge_element\edge_curve.edge_geometry)) AND NOT ( SIZEOF (oe\oriented_edge.edge_element\edge_curve.edge_geometry\polyline.points) >= 3) )) = 0) )) = 0);
+END_ENTITY;
+
+
+ENTITY alternate_product_relationship;
+ name : label;
+ definition : OPTIONAL text;
+ alternate : product;
+ base : product;
+ basis : text;
+UNIQUE
+ UR1 : alternate, base;
+WHERE
+ WR1 : alternate :<>: base;
+END_ENTITY;
+
+
+ENTITY amount_of_substance_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AMOUNT_OF_SUBSTANCE_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY amount_of_substance_unit
+ SUBTYPE OF (named_unit);
+WHERE
+ WR1 : (SELF\named_unit.dimensions.length_exponent = 0.0) AND (SELF\named_unit.dimensions.mass_exponent = 0.0) AND (SELF\named_unit.dimensions.time_exponent = 0.0) AND (SELF\named_unit.dimensions.electric_current_exponent = 0.0) AND (SELF\named_unit.dimensions.thermodynamic_temperature_exponent = 0.0) AND (SELF\named_unit.dimensions.amount_of_substance_exponent = 1.0) AND (SELF\named_unit.dimensions.luminous_intensity_exponent = 0.0);
+END_ENTITY;
+
+
+ENTITY angle_direction_reference
+ SUBTYPE OF (representation_item_relationship, geometric_representation_item);
+ SELF\representation_item_relationship.related_representation_item : angle_direction_reference_select;
+ SELF\representation_item_relationship.relating_representation_item : orientation_basis_select;
+WHERE
+ WR1 : ((('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_PATH' IN TYPEOF(related_representation_item)) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MIN_AND_MAJOR_PLY_ORIENTATION_BASIS' IN TYPEOF(relating_representation_item)))
+ OR
+ (NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_PATH' IN TYPEOF(related_representation_item)) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT_3D' IN TYPEOF(relating_representation_item))));
+END_ENTITY;
+
+
+ENTITY angular_dimension
+ SUBTYPE OF (dimension_curve_directed_callout);
+END_ENTITY;
+
+
+ENTITY angular_location
+ SUBTYPE OF (dimensional_location);
+ angle_selection : angle_relator;
+END_ENTITY;
+
+
+ENTITY angular_size
+ SUBTYPE OF (dimensional_size);
+ angle_selection : angle_relator;
+END_ENTITY;
+
+
+ENTITY angularity_tolerance
+ SUBTYPE OF (geometric_tolerance_with_datum_reference);
+WHERE
+ WR1 : SIZEOF (SELF\geometric_tolerance_with_datum_reference.datum_system) < 3;
+END_ENTITY;
+
+
+ENTITY annotation_curve_occurrence
+ SUBTYPE OF (annotation_occurrence);
+ SELF\styled_item.item : curve;
+END_ENTITY;
+
+
+ENTITY annotation_fill_area
+ SUBTYPE OF (geometric_representation_item);
+ boundaries : SET [1:?] OF curve;
+WHERE
+ WR1 : (SELF\geometric_representation_item.dim = 3) OR (SIZEOF (QUERY (curve <* SELF.boundaries |
+ NOT (
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CIRCLE' IN TYPEOF (curve)) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ELLIPSE' IN TYPEOF (curve)) OR
+ ( ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_CURVE' IN TYPEOF (curve))
+ AND (curve\b_spline_curve.closed_curve = TRUE) ) OR
+ ( ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPOSITE_CURVE' IN TYPEOF (curve))
+ AND (curve\composite_curve.closed_curve = TRUE) ) OR
+ ( ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE' IN TYPEOF (curve))
+ AND (curve\polyline.points[LOINDEX(curve\polyline.points)] =
+ curve\polyline.points[HIINDEX(curve\polyline.points)]) )
+ ) )) = 0);
+END_ENTITY;
+
+
+ENTITY annotation_fill_area_occurrence
+ SUBTYPE OF (annotation_occurrence);
+ fill_style_target : point;
+ SELF\styled_item.item : annotation_fill_area;
+END_ENTITY;
+
+
+ENTITY annotation_occurrence
+ SUPERTYPE OF (ONEOF (annotation_curve_occurrence, annotation_fill_area_occurrence, annotation_text_occurrence, annotation_symbol_occurrence))
+ SUBTYPE OF (styled_item);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_REPRESENTATION_ITEM' IN
+ TYPEOF (SELF);
+ WR2 : SIZEOF (QUERY (reps <* using_representations(SELF) |
+ NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_REPRESENTATION_SELECT' IN TYPEOF(reps)))) = 0;
+END_ENTITY;
+
+
+ENTITY annotation_occurrence_associativity
+ SUBTYPE OF (annotation_occurrence_relationship);
+WHERE
+ WR1 : SIZEOF (TYPEOF (SELF.related_annotation_occurrence) *
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_FILL_AREA_OCCURRENCE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PROJECTION_CURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LEADER_CURVE']) = 1;
+END_ENTITY;
+
+
+ENTITY annotation_occurrence_relationship;
+ name : label;
+ description : text;
+ relating_annotation_occurrence : annotation_occurrence;
+ related_annotation_occurrence : annotation_occurrence;
+END_ENTITY;
+
+
+ENTITY annotation_plane
+ SUBTYPE OF (annotation_occurrence, geometric_representation_item);
+ elements : OPTIONAL SET [1:?] OF annotation_plane_element;
+ SELF\styled_item.item : plane_or_planar_box;
+WHERE
+ WR1 : SELF\geometric_representation_item.dim = 3;
+ WR2 : NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'PLANAR_BOX' IN TYPEOF(SELF\styled_item.item)) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'AXIS2_PLACEMENT_3D' IN TYPEOF(SELF\styled_item.item\planar_box.placement));
+ WR3 : (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'PLANAR_BOX' IN TYPEOF(SELF\styled_item.item)) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'CURVE_STYLE' IN TYPEOF(SELF\styled_item.styles[1]\presentation_style_assignment.styles[1]))) OR
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'PLANE' IN TYPEOF(SELF\styled_item.item)) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'FILL_AREA_STYLE' IN TYPEOF(SELF\styled_item.styles[1]\presentation_style_assignment.styles[1])));
+ WR4 : (SIZEOF(SELF\styled_item.styles) = 1) AND
+ (SIZEOF(SELF\styled_item.styles[1]\presentation_style_assignment.styles) = 1);
+END_ENTITY;
+
+
+ENTITY annotation_subfigure_occurrence
+ SUBTYPE OF (annotation_symbol_occurrence);
+WHERE
+ WR1 : SIZEOF (QUERY (sty <* SELF.styles |
+ NOT (SIZEOF (sty.styles) = 1)
+ )) = 0;
+ WR2 : SIZEOF (QUERY (sty <* SELF.styles |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.NULL_STYLE'
+ IN TYPEOF (sty.styles[1])) ))=0;
+ WR3 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_SYMBOL'
+ IN TYPEOF (SELF.item));
+ WR4 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DRAUGHTING_SUBFIGURE_REPRESENTATION'
+ IN TYPEOF
+ (SELF.item\mapped_item.mapping_source.mapped_representation));
+END_ENTITY;
+
+
+ENTITY annotation_symbol
+ SUBTYPE OF (mapped_item);
+ SELF\mapped_item.mapping_source : symbol_representation_map;
+ SELF\mapped_item.mapping_target : symbol_target;
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_REPRESENTATION_ITEM' IN
+ TYPEOF (SELF);
+END_ENTITY;
+
+
+ENTITY annotation_symbol_occurrence
+ SUBTYPE OF (annotation_occurrence);
+ SELF\styled_item.item : annotation_symbol_occurrence_item;
+END_ENTITY;
+
+
+ENTITY annotation_text
+ SUBTYPE OF (mapped_item);
+ SELF\mapped_item.mapping_target : axis2_placement;
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TEXT_STRING_REPRESENTATION' IN
+ TYPEOF( SELF\mapped_item.mapping_source.mapped_representation);
+ WR2 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_REPRESENTATION_ITEM' IN
+ TYPEOF( SELF);
+END_ENTITY;
+
+
+ENTITY annotation_text_character
+ SUBTYPE OF (mapped_item);
+ alignment : text_alignment;
+ SELF\mapped_item.mapping_target : axis2_placement;
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CHARACTER_GLYPH_SYMBOL' IN
+ TYPEOF (SELF\mapped_item.mapping_source.mapped_representation);
+ WR2 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_REPRESENTATION_ITEM' IN
+ TYPEOF (SELF);
+END_ENTITY;
+
+
+ENTITY annotation_text_occurrence
+ SUBTYPE OF (annotation_occurrence);
+ SELF\styled_item.item : annotation_text_occurrence_item;
+END_ENTITY;
+
+
+ENTITY apex
+ SUBTYPE OF (derived_shape_aspect);
+END_ENTITY;
+
+
+ENTITY application_context;
+ application : label;
+DERIVE
+ description : text := get_description_value(SELF);
+ id : identifier := get_id_value(SELF);
+INVERSE
+ context_elements: SET [1:?] OF application_context_element FOR frame_of_reference;
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
+ WR2 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY application_context_element
+ SUPERTYPE OF (ONEOF (product_concept_context, product_context, product_definition_context));
+ name : label;
+ frame_of_reference : application_context;
+END_ENTITY;
+
+
+ENTITY application_protocol_definition;
+ status : label;
+ application_interpreted_model_schema_name : label;
+ application_protocol_year : year_number;
+ application : application_context;
+END_ENTITY;
+
+
+ENTITY applied_action_assignment
+ SUBTYPE OF (action_assignment);
+ items : SET [1:?] OF action_items;
+END_ENTITY;
+
+
+ENTITY applied_action_method_assignment
+ SUBTYPE OF (action_method_assignment);
+ items : SET [1:?] OF action_method_items;
+END_ENTITY;
+
+
+ENTITY applied_action_request_assignment
+ SUBTYPE OF (action_request_assignment);
+ items : SET [1:?] OF action_request_item;
+END_ENTITY;
+
+
+ENTITY applied_approval_assignment
+ SUBTYPE OF (approval_assignment);
+ items : SET [1:?] OF approval_item;
+END_ENTITY;
+
+
+ENTITY applied_attribute_classification_assignment
+ SUBTYPE OF (attribute_classification_assignment);
+ items : SET [1:?] OF attribute_classification_item;
+ SELF\attribute_classification_assignment.assigned_class : class;
+END_ENTITY;
+
+
+ENTITY applied_certification_assignment
+ SUBTYPE OF (certification_assignment);
+ items : SET [1:?] OF certification_item;
+END_ENTITY;
+
+
+ENTITY applied_classification_assignment
+ SUBTYPE OF (classification_assignment);
+ items : SET [1:?] OF classification_item;
+END_ENTITY;
+
+
+ENTITY applied_contract_assignment
+ SUBTYPE OF (contract_assignment);
+ items : SET [1:?] OF contract_item;
+END_ENTITY;
+
+
+ENTITY applied_date_and_time_assignment
+ SUBTYPE OF (date_and_time_assignment);
+ items : SET [1:?] OF date_and_time_item;
+END_ENTITY;
+
+
+ENTITY applied_date_assignment
+ SUBTYPE OF (date_assignment);
+ items : SET [1:?] OF date_item;
+END_ENTITY;
+
+
+ENTITY applied_document_reference
+ SUBTYPE OF (document_reference);
+ items : SET [1:?] OF document_reference_item;
+END_ENTITY;
+
+
+ENTITY applied_document_usage_constraint_assignment
+ SUBTYPE OF (document_usage_constraint_assignment);
+ items : SET [1:?] OF document_reference_item;
+END_ENTITY;
+
+
+ENTITY applied_effectivity_assignment
+ SUBTYPE OF (effectivity_assignment);
+ items : SET [1:?] OF effectivity_item;
+END_ENTITY;
+
+
+ENTITY applied_event_occurrence_assignment
+ SUBTYPE OF (event_occurrence_assignment);
+ items : SET [1:?] OF event_occurrence_item;
+END_ENTITY;
+
+
+ENTITY applied_external_identification_assignment
+ SUBTYPE OF (external_identification_assignment);
+ items : SET [1:?] OF external_identification_item;
+END_ENTITY;
+
+
+ENTITY applied_group_assignment
+ SUBTYPE OF (group_assignment);
+ items : SET [1:?] OF groupable_item;
+END_ENTITY;
+
+
+ENTITY applied_identification_assignment
+ SUBTYPE OF (identification_assignment);
+ items : SET [1:?] OF identification_item;
+END_ENTITY;
+
+
+ENTITY applied_name_assignment
+ SUBTYPE OF (name_assignment);
+ item : name_item;
+END_ENTITY;
+
+
+ENTITY applied_organization_assignment
+ SUBTYPE OF (organization_assignment);
+ items : SET [1:?] OF organization_item;
+END_ENTITY;
+
+
+ENTITY applied_organizational_project_assignment
+ SUBTYPE OF (organizational_project_assignment);
+ items : SET [1:?] OF project_item;
+END_ENTITY;
+
+
+ENTITY applied_person_and_organization_assignment
+ SUBTYPE OF (person_and_organization_assignment);
+ items : SET [1:?] OF person_and_organization_item;
+END_ENTITY;
+
+
+ENTITY applied_presented_item
+ SUBTYPE OF (presented_item);
+ items : SET [1:?] OF presented_item_select;
+END_ENTITY;
+
+
+ENTITY applied_security_classification_assignment
+ SUBTYPE OF (security_classification_assignment);
+ items : SET [1:?] OF security_classification_item;
+END_ENTITY;
+
+
+ENTITY applied_time_interval_assignment
+ SUBTYPE OF (time_interval_assignment);
+ items : SET [0:?] OF time_interval_item;
+END_ENTITY;
+
+
+ENTITY applied_usage_right
+ SUBTYPE OF (applied_action_assignment);
+ SELF\applied_action_assignment.items : SET [1:?] OF ir_usage_item;
+END_ENTITY;
+
+
+ENTITY approval;
+ status : approval_status;
+ level : label;
+END_ENTITY;
+
+
+ENTITY approval_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_approval : approval;
+DERIVE
+ role : object_role := get_role(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ROLE_ASSOCIATION.ITEM_WITH_ROLE')) <= 1;
+END_ENTITY;
+
+
+ENTITY approval_date_time;
+ date_time : date_time_select;
+ dated_approval : approval;
+DERIVE
+ role : object_role := get_role(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ROLE_ASSOCIATION.ITEM_WITH_ROLE')) <= 1;
+END_ENTITY;
+
+
+ENTITY approval_person_organization;
+ person_organization : person_organization_select;
+ authorized_approval : approval;
+ role : approval_role;
+END_ENTITY;
+
+
+ENTITY approval_relationship;
+ name : label;
+ description : OPTIONAL text;
+ relating_approval : approval;
+ related_approval : approval;
+END_ENTITY;
+
+
+ENTITY approval_role;
+ role : label;
+DERIVE
+ description : text := get_description_value(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY approval_status;
+ name : label;
+END_ENTITY;
+
+
+ENTITY area_in_set;
+ area : presentation_area;
+ in_set : presentation_set;
+END_ENTITY;
+
+
+ENTITY area_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AREA_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY area_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) =
+ dimensional_exponents ( 2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 );
+END_ENTITY;
+
+
+ENTITY assembly_component_usage
+ SUPERTYPE OF (ONEOF (next_assembly_usage_occurrence, specified_higher_usage_occurrence, promissory_usage_occurrence))
+ SUBTYPE OF (product_definition_usage);
+ reference_designator : OPTIONAL identifier;
+END_ENTITY;
+
+
+ENTITY assembly_component_usage_substitute;
+ name : label;
+ definition : OPTIONAL text;
+ base : assembly_component_usage;
+ substitute : assembly_component_usage;
+UNIQUE
+ UR1 : base, substitute;
+WHERE
+ WR1 : base.relating_product_definition :=:
+ substitute.relating_product_definition;
+ WR2 : base :<>: substitute;
+END_ENTITY;
+
+
+ENTITY assigned_requirement
+ SUBTYPE OF (group_assignment);
+ items : SET [1:1] OF product_definition;
+ SELF\group_assignment.assigned_group : requirement_assignment;
+END_ENTITY;
+
+
+ENTITY atomic_formula
+ SUBTYPE OF (compound_representation_item);
+END_ENTITY;
+
+
+ENTITY attribute_assertion
+ SUBTYPE OF (fact_type, property_definition_representation, representation);
+END_ENTITY;
+
+
+ENTITY attribute_classification_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_class : group;
+ attribute_name : label;
+ role : classification_role;
+END_ENTITY;
+
+
+ENTITY attribute_language_assignment
+ SUBTYPE OF (attribute_classification_assignment);
+ items : SET [1:?] OF attribute_language_item;
+ SELF\attribute_classification_assignment.assigned_class : language;
+WHERE
+ WR1 : SELF\attribute_classification_assignment.role.name IN ['primary', 'translated'];
+ WR2 : SELF\attribute_classification_assignment.attribute_name<> '';
+END_ENTITY;
+
+
+ENTITY attribute_value_assignment
+ ABSTRACT SUPERTYPE;
+ attribute_name : label;
+ attribute_value : attribute_type;
+ role : attribute_value_role;
+END_ENTITY;
+
+
+ENTITY attribute_value_role;
+ name : label;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY auxiliary_geometric_representation_item
+ SUBTYPE OF (geometric_representation_item, variational_representation_item);
+END_ENTITY;
+
+
+ENTITY axis1_placement
+ SUBTYPE OF (placement);
+ axis : OPTIONAL direction;
+DERIVE
+ z : direction := NVL(normalise(axis), dummy_gri ||
+ direction([0.0,0.0,1.0]));
+WHERE
+ WR1 : SELF\geometric_representation_item.dim = 3;
+END_ENTITY;
+
+
+ENTITY axis2_placement_2d
+ SUBTYPE OF (placement);
+ ref_direction : OPTIONAL direction;
+DERIVE
+ p : LIST [2:2] OF direction := build_2axes(ref_direction);
+WHERE
+ WR1 : SELF\geometric_representation_item.dim = 2;
+END_ENTITY;
+
+
+ENTITY axis2_placement_3d
+ SUBTYPE OF (placement);
+ axis : OPTIONAL direction;
+ ref_direction : OPTIONAL direction;
+DERIVE
+ p : LIST [3:3] OF direction := build_axes(axis,ref_direction);
+WHERE
+ WR1 : SELF\placement.location.dim = 3;
+ WR2 : (NOT (EXISTS (axis))) OR (axis.dim = 3);
+ WR3 : (NOT (EXISTS (ref_direction))) OR (ref_direction.dim = 3);
+ WR4 : (NOT (EXISTS (axis))) OR (NOT (EXISTS (ref_direction))) OR
+ (cross_product(axis,ref_direction).magnitude > 0.0);
+END_ENTITY;
+
+
+ENTITY b_spline_curve
+ SUPERTYPE OF ((ONEOF (uniform_curve, b_spline_curve_with_knots, quasi_uniform_curve, bezier_curve) ANDOR rational_b_spline_curve))
+ SUBTYPE OF (bounded_curve);
+ degree : INTEGER;
+ control_points_list : LIST [2:?] OF cartesian_point;
+ curve_form : b_spline_curve_form;
+ closed_curve : LOGICAL;
+ self_intersect : LOGICAL;
+DERIVE
+ control_points : ARRAY [0:upper_index_on_control_points] OF cartesian_point := list_to_array(control_points_list,0,
+ upper_index_on_control_points);
+ upper_index_on_control_points : INTEGER := (SIZEOF(control_points_list) - 1);
+WHERE
+ WR1 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.UNIFORM_CURVE' IN TYPEOF(self)) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.QUASI_UNIFORM_CURVE' IN TYPEOF(self)) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.BEZIER_CURVE' IN TYPEOF(self)) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_CURVE_WITH_KNOTS' IN TYPEOF(self));
+END_ENTITY;
+
+
+ENTITY b_spline_curve_with_knots
+ SUBTYPE OF (b_spline_curve);
+ knot_multiplicities : LIST [2:?] OF INTEGER;
+ knots : LIST [2:?] OF parameter_value;
+ knot_spec : knot_type;
+DERIVE
+ upper_index_on_knots : INTEGER := SIZEOF(knots);
+WHERE
+ WR1 : constraints_param_b_spline(degree, upper_index_on_knots,
+ upper_index_on_control_points,
+ knot_multiplicities, knots);
+ WR2 : SIZEOF(knot_multiplicities) = upper_index_on_knots;
+END_ENTITY;
+
+
+ENTITY b_spline_surface
+ SUPERTYPE OF ((ONEOF (b_spline_surface_with_knots, uniform_surface, quasi_uniform_surface, bezier_surface) ANDOR rational_b_spline_surface))
+ SUBTYPE OF (bounded_surface);
+ u_degree : INTEGER;
+ v_degree : INTEGER;
+ control_points_list : LIST [2:?] OF LIST [2:?] OF cartesian_point;
+ surface_form : b_spline_surface_form;
+ u_closed : LOGICAL;
+ v_closed : LOGICAL;
+ self_intersect : LOGICAL;
+DERIVE
+ control_points : ARRAY [0:u_upper] OF ARRAY [0:v_upper] OF cartesian_point := make_array_of_array(control_points_list,
+ 0,u_upper,0,v_upper);
+ u_upper : INTEGER := SIZEOF(control_points_list) - 1;
+ v_upper : INTEGER := SIZEOF(control_points_list[1]) - 1;
+WHERE
+ WR1 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.UNIFORM_SURFACE' IN TYPEOF(SELF)) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.QUASI_UNIFORM_SURFACE' IN TYPEOF(SELF)) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.BEZIER_SURFACE' IN TYPEOF(SELF)) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_SURFACE_WITH_KNOTS' IN TYPEOF(SELF));
+END_ENTITY;
+
+
+ENTITY b_spline_surface_with_knots
+ SUBTYPE OF (b_spline_surface);
+ u_multiplicities : LIST [2:?] OF INTEGER;
+ v_multiplicities : LIST [2:?] OF INTEGER;
+ u_knots : LIST [2:?] OF parameter_value;
+ v_knots : LIST [2:?] OF parameter_value;
+ knot_spec : knot_type;
+DERIVE
+ knot_u_upper : INTEGER := SIZEOF(u_knots);
+ knot_v_upper : INTEGER := SIZEOF(v_knots);
+WHERE
+ WR1 : constraints_param_b_spline(SELF\b_spline_surface.u_degree,
+ knot_u_upper, SELF\b_spline_surface.u_upper,
+ u_multiplicities, u_knots);
+ WR2 : constraints_param_b_spline(SELF\b_spline_surface.v_degree,
+ knot_v_upper, SELF\b_spline_surface.v_upper,
+ v_multiplicities, v_knots);
+ WR3 : SIZEOF(u_multiplicities) = knot_u_upper;
+ WR4 : SIZEOF(v_multiplicities) = knot_v_upper;
+END_ENTITY;
+
+
+ENTITY back_chaining_rule
+ SUBTYPE OF (rule_definition);
+END_ENTITY;
+
+
+ENTITY back_chaining_rule_body
+ SUBTYPE OF (property_definition, property_definition_representation, representation);
+END_ENTITY;
+
+
+ENTITY background_colour
+ SUBTYPE OF (colour);
+ presentation : area_or_view;
+UNIQUE
+ UR1 : presentation;
+END_ENTITY;
+
+
+ENTITY beveled_sheet_representation
+ SUBTYPE OF (shape_representation);
+END_ENTITY;
+
+
+ENTITY bezier_curve
+ SUBTYPE OF (b_spline_curve);
+END_ENTITY;
+
+
+ENTITY bezier_surface
+ SUBTYPE OF (b_spline_surface);
+END_ENTITY;
+
+
+ENTITY binary_generic_expression
+ ABSTRACT SUPERTYPE
+ SUBTYPE OF (generic_expression);
+ operands : LIST [2:2] OF generic_expression;
+END_ENTITY;
+
+
+ENTITY binary_numeric_expression
+ ABSTRACT SUPERTYPE
+ SUBTYPE OF (numeric_expression, binary_generic_expression);
+ SELF\binary_generic_expression.operands : LIST [2:2] OF numeric_expression;
+END_ENTITY;
+
+
+ENTITY binary_representation_item
+ SUBTYPE OF (representation_item);
+ binary_value : BINARY;
+END_ENTITY;
+
+
+ENTITY block
+ SUBTYPE OF (geometric_representation_item);
+ position : axis2_placement_3d;
+ x : positive_length_measure;
+ y : positive_length_measure;
+ z : positive_length_measure;
+END_ENTITY;
+
+
+ENTITY boolean_expression
+ ABSTRACT SUPERTYPE OF (ONEOF (simple_boolean_expression, multiple_arity_boolean_expression, comparison_expression, interval_expression))
+ SUBTYPE OF (expression);
+END_ENTITY;
+
+
+ENTITY boolean_literal
+ SUBTYPE OF (simple_boolean_expression, generic_literal);
+ the_value : BOOLEAN;
+END_ENTITY;
+
+
+ENTITY boolean_representation_item
+ SUBTYPE OF (representation_item, boolean_literal);
+END_ENTITY;
+
+
+ENTITY boolean_result
+ SUBTYPE OF (geometric_representation_item);
+ operator : boolean_operator;
+ first_operand : boolean_operand;
+ second_operand : boolean_operand;
+END_ENTITY;
+
+
+ENTITY boundary_curve
+ SUBTYPE OF (composite_curve_on_surface);
+WHERE
+ WR1 : SELF\composite_curve.closed_curve;
+END_ENTITY;
+
+
+ENTITY bounded_curve
+ SUPERTYPE OF (ONEOF (polyline, b_spline_curve, trimmed_curve, bounded_pcurve, bounded_surface_curve, composite_curve))
+ SUBTYPE OF (curve);
+END_ENTITY;
+
+
+ENTITY bounded_pcurve
+ SUBTYPE OF (pcurve, bounded_curve);
+WHERE
+ WR1 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.BOUNDED_CURVE' IN
+ TYPEOF(SELF\pcurve.reference_to_curve.items[1]));
+END_ENTITY;
+
+
+ENTITY bounded_surface
+ SUPERTYPE OF (ONEOF (b_spline_surface, rectangular_trimmed_surface, curve_bounded_surface, rectangular_composite_surface))
+ SUBTYPE OF (surface);
+END_ENTITY;
+
+
+ENTITY bounded_surface_curve
+ SUBTYPE OF (surface_curve, bounded_curve);
+WHERE
+ WR1 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.BOUNDED_CURVE' IN
+ TYPEOF(SELF\surface_curve.curve_3d));
+END_ENTITY;
+
+
+ENTITY box_domain
+ SUBTYPE OF (founded_item);
+ corner : cartesian_point;
+ xlength : positive_length_measure;
+ ylength : positive_length_measure;
+ zlength : positive_length_measure;
+WHERE
+ WR1 : SIZEOF(QUERY(item <* USEDIN(SELF,'')|
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.BOXED_HALF_SPACE'
+ IN TYPEOF(item)))) = 0;
+END_ENTITY;
+
+
+ENTITY boxed_half_space
+ SUBTYPE OF (half_space_solid);
+ enclosure : box_domain;
+END_ENTITY;
+
+
+ENTITY breakdown_context
+ SUBTYPE OF (product_definition_relationship);
+END_ENTITY;
+
+
+ENTITY breakdown_element_group_assignment
+ SUBTYPE OF (group_assignment);
+ items : SET [1:1] OF product_definition_or_breakdown_element_usage;
+ SELF\group_assignment.assigned_group : product_definition_element_relationship;
+END_ENTITY;
+
+
+ENTITY breakdown_element_realization
+ SUBTYPE OF (characterized_object, product_definition_element_relationship);
+END_ENTITY;
+
+
+ENTITY breakdown_element_usage
+ SUBTYPE OF (product_definition_relationship);
+END_ENTITY;
+
+
+ENTITY breakdown_of
+ SUBTYPE OF (product_definition_relationship);
+END_ENTITY;
+
+
+ENTITY brep_with_voids
+ SUBTYPE OF (manifold_solid_brep);
+ voids : SET [1:?] OF oriented_closed_shell;
+END_ENTITY;
+
+
+ENTITY bytes_representation_item
+ SUBTYPE OF (binary_representation_item);
+DERIVE
+ no_of_bytes : INTEGER := BLENGTH(SELF\binary_representation_item.binary_value) DIV 8;
+WHERE
+ WR1 : BLENGTH(SELF\binary_representation_item.binary_value) MOD 8 = 0;
+END_ENTITY;
+
+
+ENTITY calendar_date
+ SUBTYPE OF (date);
+ day_component : day_in_month_number;
+ month_component : month_in_year_number;
+WHERE
+ WR1 : valid_calendar_date (SELF);
+END_ENTITY;
+
+
+ENTITY camera_image
+ SUBTYPE OF (mapped_item);
+ SELF\mapped_item.mapping_source : camera_usage;
+ SELF\mapped_item.mapping_target : planar_box;
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_REPRESENTATION_ITEM'
+ IN TYPEOF (SELF);
+END_ENTITY;
+
+
+ENTITY camera_image_3d_with_scale
+ SUBTYPE OF (camera_image);
+DERIVE
+ scale : positive_ratio_measure := ((SELF\mapped_item.mapping_target\
+ planar_extent.size_in_x) / (SELF\mapped_item.mapping_source.
+ mapping_origin\camera_model_d3.perspective_of_volume.view_window.
+ size_in_x));
+WHERE
+ WR1 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CAMERA_MODEL_D3'
+ IN TYPEOF (SELF\mapped_item.mapping_source.mapping_origin));
+ WR2 : aspect_ratio(SELF\mapped_item.mapping_target) =
+ aspect_ratio(SELF\mapped_item.mapping_source.mapping_origin\
+ camera_model_d3.perspective_of_volume.view_window);
+ WR3 : SELF\mapped_item.mapping_source.mapping_origin\camera_model_d3.
+ perspective_of_volume.front_plane_clipping
+ AND
+ SELF\mapped_item.mapping_source.mapping_origin\camera_model_d3.
+ perspective_of_volume.view_volume_sides_clipping;
+ WR4 : (SELF\mapped_item.mapping_target\planar_extent.size_in_x > 0)
+ AND
+ (SELF\mapped_item.mapping_target\planar_extent.size_in_y > 0);
+ WR5 : (SELF\mapped_item.mapping_source.mapping_origin\camera_model_d3.
+ perspective_of_volume.view_window.size_in_x > 0)
+ AND
+ (SELF\mapped_item.mapping_source.mapping_origin\camera_model_d3.
+ perspective_of_volume.view_window.size_in_y > 0);
+ WR6 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'AXIS2_PLACEMENT_2D' IN TYPEOF (SELF\mapped_item.
+ mapping_target\planar_box.placement))
+ AND NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'AXIS2_PLACEMENT_3D' IN TYPEOF (SELF\mapped_item.
+ mapping_target\planar_box.placement));
+END_ENTITY;
+
+
+ENTITY camera_model
+ ABSTRACT SUPERTYPE
+ SUBTYPE OF (geometric_representation_item);
+WHERE
+ WR1 : (SIZEOF (USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'ITEM_DEFINED_TRANSFORMATION.' +
+ 'TRANSFORM_ITEM_1')) +
+ SIZEOF (USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'REPRESENTATION_MAP.MAPPING_ORIGIN'))
+ ) > 0;
+ WR2 : SIZEOF(USEDIN(SELF,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'STYLED_ITEM.ITEM')) = 0;
+END_ENTITY;
+
+
+ENTITY camera_model_d3
+ SUBTYPE OF (camera_model);
+ view_reference_system : axis2_placement_3d;
+ perspective_of_volume : view_volume;
+WHERE
+ WR1 : (dot_product (SELF.view_reference_system.p[3],
+ SELF.perspective_of_volume.view_window.placement.p[3]) = 1.0)
+ AND
+ (SELF.view_reference_system.location.coordinates[3] =
+ SELF.perspective_of_volume.view_window.
+ placement.location.coordinates[3]);
+ WR2 : SELF\geometric_representation_item.dim = 3;
+END_ENTITY;
+
+
+ENTITY camera_model_d3_multi_clipping
+ SUBTYPE OF (camera_model_d3);
+ shape_clipping : SET [1:?] OF camera_model_d3_multi_clipping_interection_select;
+END_ENTITY;
+
+
+ENTITY camera_model_d3_multi_clipping_intersection
+ SUBTYPE OF (geometric_representation_item);
+ shape_clipping : SET [2:?] OF camera_model_d3_multi_clipping_interection_select;
+END_ENTITY;
+
+
+ENTITY camera_model_d3_multi_clipping_union
+ SUBTYPE OF (geometric_representation_item);
+ shape_clipping : SET [2:?] OF camera_model_d3_multi_clipping_union_select;
+END_ENTITY;
+
+
+ENTITY camera_model_d3_with_hlhsr
+ SUBTYPE OF (camera_model_d3);
+ hidden_line_surface_removal : BOOLEAN;
+END_ENTITY;
+
+
+ENTITY camera_model_with_light_sources
+ SUBTYPE OF (camera_model_d3);
+ sources : SET [1:?] OF light_source;
+END_ENTITY;
+
+
+ENTITY camera_usage
+ SUBTYPE OF (representation_map);
+ SELF\representation_map.mapping_origin : camera_model;
+WHERE
+ WR1 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRESENTATION_REPRESENTATION'
+ IN TYPEOF(SELF\representation_map.mapped_representation));
+END_ENTITY;
+
+
+ENTITY capacitance_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CAPACITANCE_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY capacitance_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) = dimensions_for_si_unit (si_unit_name.farad);
+END_ENTITY;
+
+
+ENTITY cartesian_point
+ SUBTYPE OF (point);
+ coordinates : LIST [1:3] OF length_measure;
+END_ENTITY;
+
+
+ENTITY cartesian_transformation_operator
+ SUPERTYPE OF (ONEOF (cartesian_transformation_operator_2d, cartesian_transformation_operator_3d))
+ SUBTYPE OF (geometric_representation_item, functionally_defined_transformation);
+ axis1 : OPTIONAL direction;
+ axis2 : OPTIONAL direction;
+ local_origin : cartesian_point;
+ scale : OPTIONAL REAL;
+DERIVE
+ scl : REAL := NVL(scale, 1.0);
+WHERE
+ WR1 : scl > 0.0;
+END_ENTITY;
+
+
+ENTITY cartesian_transformation_operator_2d
+ SUBTYPE OF (cartesian_transformation_operator);
+DERIVE
+ u : LIST [2:2] OF direction := base_axis(2,SELF\cartesian_transformation_operator.axis1,
+ SELF\cartesian_transformation_operator.axis2,?);
+WHERE
+ WR1 : SELF\geometric_representation_item.dim = 2;
+END_ENTITY;
+
+
+ENTITY cartesian_transformation_operator_3d
+ SUBTYPE OF (cartesian_transformation_operator);
+ axis3 : OPTIONAL direction;
+DERIVE
+ u : LIST [3:3] OF direction := base_axis(3,SELF\cartesian_transformation_operator.axis1,
+ SELF\cartesian_transformation_operator.axis2,axis3);
+WHERE
+ WR1 : SELF\geometric_representation_item.dim = 3;
+END_ENTITY;
+
+
+ENTITY cc_design_approval
+ SUBTYPE OF (approval_assignment);
+ items : SET [1:?] OF approved_item;
+END_ENTITY;
+
+
+ENTITY cc_design_certification
+ SUBTYPE OF (certification_assignment);
+ items : SET [1:?] OF certified_item;
+END_ENTITY;
+
+
+ENTITY cc_design_contract
+ SUBTYPE OF (contract_assignment);
+ items : SET [1:?] OF contracted_item;
+END_ENTITY;
+
+
+ENTITY cc_design_date_and_time_assignment
+ SUBTYPE OF (date_and_time_assignment);
+ items : SET [1:?] OF date_time_item;
+END_ENTITY;
+
+
+ENTITY cc_design_person_and_organization_assignment
+ SUBTYPE OF (person_and_organization_assignment);
+ items : SET [1:?] OF cc_person_organization_item;
+WHERE
+ WR1 : cc_design_person_and_organization_correlation(SELF);
+END_ENTITY;
+
+
+ENTITY cc_design_security_classification
+ SUBTYPE OF (security_classification_assignment);
+ items : SET [1:?] OF cc_classified_item;
+END_ENTITY;
+
+
+ENTITY cc_design_specification_reference
+ SUBTYPE OF (document_reference);
+ items : SET [1:?] OF cc_specified_item;
+END_ENTITY;
+
+
+ENTITY celsius_temperature_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.THERMODYNAMIC_TEMPERATURE_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY centre_of_symmetry
+ SUBTYPE OF (derived_shape_aspect);
+WHERE
+ WR1 : SIZEOF
+ (QUERY(sadr<*SELF\derived_shape_aspect.deriving_relationships|
+ NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SYMMETRIC_SHAPE_ASPECT'
+ IN TYPEOF
+ (sadr\shape_aspect_relationship.related_shape_aspect))))=0;
+END_ENTITY;
+
+
+ENTITY certification;
+ name : label;
+ purpose : text;
+ kind : certification_type;
+END_ENTITY;
+
+
+ENTITY certification_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_certification : certification;
+DERIVE
+ role : object_role := get_role(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ROLE_ASSOCIATION.ITEM_WITH_ROLE')) <= 1;
+END_ENTITY;
+
+
+ENTITY certification_type;
+ description : label;
+END_ENTITY;
+
+
+ENTITY change
+ SUBTYPE OF (action_assignment);
+ items : SET [1:?] OF work_item;
+END_ENTITY;
+
+
+ENTITY change_request
+ SUBTYPE OF (action_request_assignment);
+ items : SET [1:?] OF change_request_item;
+END_ENTITY;
+
+
+ENTITY character_glyph_font_usage;
+ character : generic_character_glyph_symbol;
+ font : text_font;
+END_ENTITY;
+
+
+ENTITY character_glyph_style_outline
+ SUBTYPE OF (founded_item);
+ outline_style : curve_style;
+END_ENTITY;
+
+
+ENTITY character_glyph_style_stroke
+ SUBTYPE OF (founded_item);
+ stroke_style : curve_style;
+END_ENTITY;
+
+
+ENTITY character_glyph_symbol
+ SUBTYPE OF (generic_character_glyph_symbol);
+ character_box : planar_extent;
+ baseline_ratio : ratio_measure;
+DERIVE
+ box_height : length_measure := character_box.size_in_y;
+WHERE
+ WR1 : {0.0 <= baseline_ratio <= 1.0};
+ WR2 : item_in_context(SELF.character_box,
+ SELF\representation.context_of_items);
+ WR3 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POSITIVE_LENGTH_MEASURE'
+ IN TYPEOF (SELF.box_height);
+END_ENTITY;
+
+
+ENTITY character_glyph_symbol_outline
+ SUBTYPE OF (character_glyph_symbol);
+ outlines : SET [1:?] OF annotation_fill_area;
+WHERE
+ WR1 : SELF.outlines <= SELF\representation.items;
+END_ENTITY;
+
+
+ENTITY character_glyph_symbol_stroke
+ SUBTYPE OF (character_glyph_symbol);
+ strokes : SET [1:?] OF curve;
+WHERE
+ WR1 : SELF.strokes <= SELF\representation.items;
+END_ENTITY;
+
+
+ENTITY characteristic_data_column_header
+ SUBTYPE OF (general_property);
+END_ENTITY;
+
+
+ENTITY characteristic_data_column_header_link
+ SUBTYPE OF (general_property_relationship);
+END_ENTITY;
+
+
+ENTITY characteristic_data_table_header
+ SUBTYPE OF (general_property);
+END_ENTITY;
+
+
+ENTITY characteristic_data_table_header_decomposition
+ SUBTYPE OF (general_property_relationship);
+END_ENTITY;
+
+
+ENTITY characteristic_type
+ SUBTYPE OF (group);
+END_ENTITY;
+
+
+ENTITY characterized_class
+ SUBTYPE OF (characterized_object, class);
+END_ENTITY;
+
+
+ENTITY characterized_object;
+ name : label;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY circle
+ SUBTYPE OF (conic);
+ radius : positive_length_measure;
+END_ENTITY;
+
+
+ENTITY circular_runout_tolerance
+ SUBTYPE OF (geometric_tolerance_with_datum_reference);
+WHERE
+ WR1 : SIZEOF (SELF\geometric_tolerance_with_datum_reference.datum_system) <= 2;
+END_ENTITY;
+
+
+ENTITY class
+ SUBTYPE OF (group);
+END_ENTITY;
+
+
+ENTITY class_by_extension
+ SUBTYPE OF (class);
+END_ENTITY;
+
+
+ENTITY class_by_intension
+ SUBTYPE OF (class);
+END_ENTITY;
+
+
+ENTITY class_system
+ SUBTYPE OF (group);
+END_ENTITY;
+
+
+ENTITY class_usage_effectivity_context_assignment
+ SUBTYPE OF (effectivity_context_assignment);
+ items : SET [1:?] OF class_usage_effectivity_context_item;
+WHERE
+ WR1 : SELF.role.name = 'class usage influence';
+ WR2 : SIZEOF( QUERY( i <* SELF.items | NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION' IN TYPEOF(i)) )) = 0;
+ WR3 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.APPLIED_EFFECTIVITY_ASSIGNMENT' IN TYPEOF(SELF.assigned_effectivity_assignment)) AND
+ (SIZEOF(TYPEOF(SELF.assigned_effectivity_assignment.assigned_effectivity) ) = 1) AND
+ (SELF.assigned_effectivity_assignment.assigned_effectivity.id = 'class usage') AND
+ (SIZEOF( QUERY( i <* SELF.assigned_effectivity_assignment\applied_effectivity_assignment.items |
+ NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_CONCEPT_FEATURE_CATEGORY_USAGE' IN TYPEOF(i)) )) = 0);
+END_ENTITY;
+
+
+ENTITY classification_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_class : group;
+ role : classification_role;
+END_ENTITY;
+
+
+ENTITY classification_role;
+ name : label;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY closed_shell
+ SUBTYPE OF (connected_face_set);
+END_ENTITY;
+
+
+ENTITY coaxiality_tolerance
+ SUBTYPE OF (geometric_tolerance_with_datum_reference);
+WHERE
+ WR1 : SIZEOF (SELF\geometric_tolerance_with_datum_reference.datum_system) <= 2;
+END_ENTITY;
+
+
+ENTITY colour;
+END_ENTITY;
+
+
+ENTITY colour_rgb
+ SUBTYPE OF (colour_specification);
+ red : REAL;
+ green : REAL;
+ blue : REAL;
+WHERE
+ WR1 : {0.0 <= red <= 1.0};
+ WR2 : {0.0 <= green <= 1.0};
+ WR3 : {0.0 <= blue <= 1.0};
+END_ENTITY;
+
+
+ENTITY colour_specification
+ SUBTYPE OF (colour);
+ name : label;
+END_ENTITY;
+
+
+ENTITY common_datum
+ SUBTYPE OF (composite_shape_aspect, datum);
+WHERE
+ WR1 : SIZEOF (SELF\composite_shape_aspect.component_relationships) = 2;
+ WR2 : SIZEOF (QUERY ( sar <* SELF\composite_shape_aspect.component_relationships|
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DATUM' IN TYPEOF (sar.related_shape_aspect)) AND
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMMON_DATUM' IN TYPEOF (sar.related_shape_aspect))) )) = 0;
+END_ENTITY;
+
+
+ENTITY comparison_expression
+ ABSTRACT SUPERTYPE
+ SUBTYPE OF (boolean_expression, binary_generic_expression);
+ SELF\binary_generic_expression.operands : LIST [2:2] OF expression;
+WHERE
+ WR1 : (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.NUMERIC_EXPRESSION'
+IN TYPEOF(SELF\binary_generic_expression.operands[1]))
+ AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.NUMERIC_EXPRESSION'
+IN TYPEOF(SELF\binary_generic_expression.operands[2])))
+OR
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.BOOLEAN_EXPRESSION'
+IN TYPEOF(SELF\binary_generic_expression.operands[1]))
+ AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.BOOLEAN_EXPRESSION'
+ IN TYPEOF(SELF\binary_generic_expression.operands[2])))
+OR
+(('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STRING_EXPRESSION'
+IN TYPEOF(SELF\binary_generic_expression.operands[1]))
+ AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STRING_EXPRESSION'
+IN TYPEOF(SELF\binary_generic_expression.operands[2])));
+END_ENTITY;
+
+
+ENTITY complex_clause
+ SUBTYPE OF (compound_representation_item);
+END_ENTITY;
+
+
+ENTITY complex_conjunctive_clause
+ SUBTYPE OF (complex_clause);
+END_ENTITY;
+
+
+ENTITY complex_disjunctive_clause
+ SUBTYPE OF (complex_clause);
+END_ENTITY;
+
+
+ENTITY complex_shelled_solid
+ SUBTYPE OF (shelled_solid);
+ thickened_face_list : LIST [1:?] OF SET [1:?] OF face_surface;
+ thickness_list : LIST [1:?] OF length_measure;
+WHERE
+ WR1 : SIZEOF(thickened_face_list) = SIZEOF(thickness_list);
+ WR2 : SIZEOF(QUERY(q <* thickness_list | (q = 0))) = 0;
+END_ENTITY;
+
+
+ENTITY composite_assembly_definition
+ SUBTYPE OF (product_definition);
+WHERE
+ WR1 : SIZEOF (QUERY (pdr <* USEDIN (SELF,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRODUCT_DEFINITION_RELATIONSHIP.' +
+ 'RELATING_PRODUCT_DEFINITION') |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'NEXT_ASSEMBLY_USAGE_OCCURRENCE' IN
+ TYPEOF (pdr))) = 1;
+END_ENTITY;
+
+
+ENTITY composite_assembly_sequence_definition
+ SUBTYPE OF (product_definition);
+WHERE
+ WR1 : SIZEOF (QUERY (pdr <* USEDIN (SELF,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRODUCT_DEFINITION_RELATIONSHIP.' +
+ 'RELATING_PRODUCT_DEFINITION') |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'NEXT_ASSEMBLY_USAGE_OCCURRENCE' IN
+ TYPEOF (pdr))) > 0;
+END_ENTITY;
+
+
+ENTITY composite_assembly_table
+ SUBTYPE OF (part_laminate_table);
+END_ENTITY;
+
+
+ENTITY composite_curve
+ SUBTYPE OF (bounded_curve);
+ segments : LIST [1:?] OF composite_curve_segment;
+ self_intersect : LOGICAL;
+DERIVE
+ closed_curve : LOGICAL := segments[n_segments].transition <> discontinuous;
+ n_segments : INTEGER := SIZEOF(segments);
+WHERE
+ WR1 : ((NOT closed_curve) AND (SIZEOF(QUERY(temp <* segments |
+ temp.transition = discontinuous)) = 1)) OR
+ ((closed_curve) AND (SIZEOF(QUERY(temp <* segments |
+ temp.transition = discontinuous)) = 0));
+END_ENTITY;
+
+
+ENTITY composite_curve_on_surface
+ SUPERTYPE OF (boundary_curve)
+ SUBTYPE OF (composite_curve);
+DERIVE
+ basis_surface : SET [0:2] OF surface := get_basis_surface(SELF);
+WHERE
+ WR1 : SIZEOF(basis_surface) > 0;
+ WR2 : constraints_composite_curve_on_surface(SELF);
+END_ENTITY;
+
+
+ENTITY composite_curve_segment
+ SUBTYPE OF (founded_item);
+ transition : transition_code;
+ same_sense : BOOLEAN;
+ parent_curve : curve;
+INVERSE
+ using_curves: BAG [1:?] OF composite_curve FOR segments;
+WHERE
+ WR1 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.BOUNDED_CURVE' IN TYPEOF(parent_curve));
+END_ENTITY;
+
+
+ENTITY composite_material_designation
+ SUBTYPE OF (material_designation);
+END_ENTITY;
+
+
+ENTITY composite_shape_aspect
+ SUBTYPE OF (shape_aspect);
+INVERSE
+ component_relationships: SET [2:?] OF shape_aspect_relationship FOR relating_shape_aspect;
+END_ENTITY;
+
+
+ENTITY composite_sheet_representation
+ SUBTYPE OF (shape_representation);
+WHERE
+ WR1 : SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'GEOMETRICALLY_BOUNDED_SURFACE_SHAPE_REPRESENTATION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'MANIFOLD_SURFACE_SHAPE_REPRESENTATION'] * TYPEOF (SELF)) = 1;
+END_ENTITY;
+
+
+ENTITY composite_text
+ SUBTYPE OF (geometric_representation_item);
+ collected_text : SET [2:?] OF text_or_character;
+WHERE
+ WR1 : acyclic_composite_text( SELF, SELF.collected_text);
+END_ENTITY;
+
+
+ENTITY composite_text_with_associated_curves
+ SUBTYPE OF (composite_text);
+ associated_curves : SET [1:?] OF curve;
+END_ENTITY;
+
+
+ENTITY composite_text_with_blanking_box
+ SUBTYPE OF (composite_text);
+ blanking : planar_box;
+END_ENTITY;
+
+
+ENTITY composite_text_with_delineation
+ SUBTYPE OF (composite_text);
+ delineation : text_delineation;
+END_ENTITY;
+
+
+ENTITY composite_text_with_extent
+ SUBTYPE OF (composite_text);
+ extent : planar_extent;
+END_ENTITY;
+
+
+ENTITY compound_representation_item
+ SUPERTYPE OF (ONEOF (point_and_vector, point_path, row_representation_item, table_representation_item))
+ SUBTYPE OF (representation_item);
+ item_element : compound_item_definition;
+END_ENTITY;
+
+
+ENTITY compound_shape_representation
+ SUBTYPE OF (shape_representation);
+WHERE
+ WR1 : ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'GEOMETRIC_REPRESENTATION_CONTEXT'
+ IN TYPEOF ( SELF.context_of_items ) ) AND (
+ SELF.context_of_items\
+ geometric_representation_context.coordinate_space_dimension =3 );
+ WR2 : SIZEOF ( QUERY ( cbsr_i <* SELF.items | SIZEOF (
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'EDGE_BASED_WIREFRAME_MODEL' ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'FACE_BASED_SURFACE_MODEL' ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'MAPPED_ITEM' , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'AXIS2_PLACEMENT_3D']* TYPEOF ( cbsr_i ) ) <>1 ) ) =0;
+ WR3 : SIZEOF ( QUERY ( cbsr_i <* SELF.items | SIZEOF (
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'EDGE_BASED_WIREFRAME_MODEL' ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'FACE_BASED_SURFACE_MODEL' ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'MAPPED_ITEM']* TYPEOF ( cbsr_i ) ) =1 ) ) >0;
+ WR4 : SIZEOF ( QUERY ( cbsr_i <* SELF.items | (
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'MAPPED_ITEM' IN TYPEOF ( cbsr_i ) )
+ AND ( SIZEOF ( ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'COMPOUND_SHAPE_REPRESENTATION' , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'EDGE_BASED_WIREFRAME_SHAPE_REPRESENTATION' ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'NON_MANIFOLD_SURFACE_SHAPE_REPRESENTATION']* TYPEOF (
+ cbsr_i\ mapped_item.mapping_source ) ) <>1 ) ) ) =0;
+END_ENTITY;
+
+
+ENTITY concentricity_tolerance
+ SUBTYPE OF (geometric_tolerance_with_datum_reference);
+WHERE
+ WR1 : SIZEOF (SELF\geometric_tolerance_with_datum_reference.datum_system) = 1;
+END_ENTITY;
+
+
+ENTITY concept_feature_operator;
+ name : label;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY concept_feature_relationship;
+ name : label;
+ description : OPTIONAL text;
+ relating_product_concept_feature : product_concept_feature;
+ related_product_concept_feature : product_concept_feature;
+END_ENTITY;
+
+
+ENTITY concept_feature_relationship_with_condition
+ SUBTYPE OF (concept_feature_relationship);
+ conditional_operator : concept_feature_operator;
+END_ENTITY;
+
+
+ENTITY conditional_concept_feature
+ SUBTYPE OF (product_concept_feature);
+ condition : concept_feature_relationship_with_condition;
+END_ENTITY;
+
+
+ENTITY conductance_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONDUCTANCE_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY conductance_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) = dimensions_for_si_unit (si_unit_name.siemens);
+END_ENTITY;
+
+
+ENTITY configurable_item
+ SUBTYPE OF (configuration_item);
+ item_concept_feature : SET [1:?] OF product_concept_feature_association;
+END_ENTITY;
+
+
+ENTITY configuration_design;
+ configuration : configuration_item;
+ design : configuration_design_item;
+DERIVE
+ description : text := get_description_value (SELF);
+ name : label := get_name_value (SELF);
+UNIQUE
+ UR1 : configuration, design;
+WHERE
+ WR1 : SIZEOF (USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'NAME_ATTRIBUTE.NAMED_ITEM')) <= 1;
+ WR2 : SIZEOF (USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY configuration_effectivity
+ SUBTYPE OF (product_definition_effectivity);
+ configuration : configuration_design;
+UNIQUE
+ UR1: configuration, SELF\product_definition_effectivity.usage, SELF\effectivity.id;
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION_USAGE' IN
+ TYPEOF (SELF\product_definition_effectivity.usage);
+END_ENTITY;
+
+
+ENTITY configuration_item;
+ id : identifier;
+ name : label;
+ description : OPTIONAL text;
+ item_concept : product_concept;
+ purpose : OPTIONAL label;
+END_ENTITY;
+
+
+ENTITY configuration_item_hierarchical_relationship
+ SUBTYPE OF (configuration_item_relationship);
+END_ENTITY;
+
+
+ENTITY configuration_item_relationship;
+ name : label;
+ description : OPTIONAL text;
+ relating_configuration_item : configuration_item;
+ related_configuration_item : configuration_item;
+END_ENTITY;
+
+
+ENTITY configuration_item_revision_sequence
+ SUBTYPE OF (configuration_item_relationship);
+END_ENTITY;
+
+
+ENTITY configured_effectivity_assignment
+ SUBTYPE OF (effectivity_assignment);
+ items : SET [1:?] OF configured_effectivity_item;
+WHERE
+ WR1 : (SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EFFECTIVITY'] * TYPEOF(SELF.assigned_effectivity) ) = 1)
+ AND (SELF.assigned_effectivity.id = 'configuration validity');
+ WR2 : SIZEOF(SELF.items) = 1;
+ WR3 : SIZEOF( QUERY( i <* SELF.items | NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION' IN TYPEOF(i))
+ OR NOT (i\product_definition.frame_of_reference.name IN ['conceptual definition','part occurrence', 'functional definition','alternative definition']) )) = 0;
+ WR4 : SELF.role.name IN ['design', 'usage'];
+ WR5 : (SELF.role.name <> 'design')
+ OR (SIZEOF( QUERY( i <* SELF.items | ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION' IN TYPEOF(i)) AND (i\product_definition.frame_of_reference.name = 'part occurrence') )) = 0);
+ WR6 : (SELF.role.name <> 'usage') OR (SIZEOF( QUERY( i <* SELF.items | ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION' IN TYPEOF(i)) AND (i\product_definition.frame_of_reference.name = 'conceptual definition') )) = 0);
+ WR7 : SELF.role.description IN ['exception', 'inherited', 'local'];
+ WR8 : SIZEOF( QUERY( x <* USEDIN(SELF,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'EFFECTIVITY_CONTEXT_ASSIGNMENT.ASSIGNED_EFFECTIVITY_ASSIGNMENT') | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONFIGURED_EFFECTIVITY_CONTEXT_ASSIGNMENT' IN TYPEOF(x) )) = 1;
+END_ENTITY;
+
+
+ENTITY configured_effectivity_context_assignment
+ SUBTYPE OF (effectivity_context_assignment);
+ items : SET [1:?] OF configured_effectivity_context_item;
+ SELF\effectivity_context_assignment.assigned_effectivity_assignment : configured_effectivity_assignment;
+WHERE
+ WR1 : SIZEOF(SELF.items) = 1;
+END_ENTITY;
+
+
+ENTITY conic
+ SUPERTYPE OF (ONEOF (circle, ellipse, hyperbola, parabola))
+ SUBTYPE OF (curve);
+ position : axis2_placement;
+END_ENTITY;
+
+
+ENTITY conical_stepped_hole_transition
+ SUBTYPE OF (geometric_representation_item);
+ transition_number : positive_integer;
+ cone_apex_angle : plane_angle_measure;
+ cone_base_radius : positive_length_measure;
+END_ENTITY;
+
+
+ENTITY conical_surface
+ SUBTYPE OF (elementary_surface);
+ radius : length_measure;
+ semi_angle : plane_angle_measure;
+WHERE
+ WR1 : radius >= 0.0;
+END_ENTITY;
+
+
+ENTITY connected_edge_set
+ SUBTYPE OF (topological_representation_item);
+ ces_edges : SET [1:?] OF edge;
+END_ENTITY;
+
+
+ENTITY connected_face_set
+ SUPERTYPE OF (ONEOF (closed_shell, open_shell))
+ SUBTYPE OF (topological_representation_item);
+ cfs_faces : SET [1:?] OF face;
+END_ENTITY;
+
+
+ENTITY connected_face_sub_set
+ SUBTYPE OF (connected_face_set);
+ parent_face_set : connected_face_set;
+END_ENTITY;
+
+
+ENTITY constructive_geometry_representation
+ SUBTYPE OF (representation);
+WHERE
+ WR1 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_REPRESENTATION_CONTEXT' IN TYPEOF(SELF.context_of_items)) AND ({2 <= SELF.context_of_items\geometric_representation_context. coordinate_space_dimension <= 3});
+ WR2 : SIZEOF( QUERY( cgr_i <* SELF.items | SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PLACEMENT', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_SURFACE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT'] * TYPEOF(cgr_i)) <> 1 )) = 0;
+ WR3 : SIZEOF( USEDIN( SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'REPRESENTATION_RELATIONSHIP.REP_2') ) > 0;
+ WR4 : SIZEOF( USEDIN( SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'REPRESENTATION_MAP.MAPPED_REPRESENTATION') ) = 0;
+END_ENTITY;
+
+
+ENTITY constructive_geometry_representation_relationship
+ SUBTYPE OF (representation_relationship);
+ SELF\representation_relationship.rep_1 : constructive_geometry_representation_or_shape_represenation;
+ SELF\representation_relationship.rep_2 : constructive_geometry_representation;
+WHERE
+ WR1 : (SELF.rep_1.context_of_items :=: SELF.rep_2.context_of_items) AND ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_REPRESENTATION_CONTEXT' IN TYPEOF(SELF.rep_1.context_of_items));
+ WR2 : NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'REPRESENTATION_RELATIONSHIP_WITH_TRANSFORMATION' IN TYPEOF(SELF));
+END_ENTITY;
+
+
+ENTITY contact_ratio_representation
+ SUBTYPE OF (representation);
+WHERE
+ WR1 : ( SIZEOF ( SELF.items ) =1 ) AND ( SIZEOF ( QUERY ( i <*
+ SELF.items | ( SIZEOF ( ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'MEASURE_REPRESENTATION_ITEM' , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'VALUE_RANGE']* TYPEOF ( i ) ) =1 ) AND ( i.name =
+ 'ratio value' ) ) ) =1 );
+ WR2 : ( SIZEOF ( QUERY ( pdr <* USEDIN ( SELF ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
+ 'USED_REPRESENTATION' ) | pdr. name =
+ 'contact ratio reference' ) ) =1 ) AND ( SIZEOF ( QUERY (
+ pdr <* USEDIN ( SELF ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
+ 'USED_REPRESENTATION' ) | ( pdr. name =
+ 'contact ratio reference' ) AND ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'PRODUCT_DEFINITION' IN TYPEOF ( pdr.
+ definition.definition ) ) ) ) =1 );
+ WR3 : ( SIZEOF ( USEDIN ( SELF ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
+ 'USED_REPRESENTATION' ) ) =1 ) AND ( SIZEOF ( QUERY ( pdr
+ <* USEDIN ( SELF ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
+ 'USED_REPRESENTATION' ) | SIZEOF ( QUERY ( gpa <* USEDIN (
+ pdr. definition ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'GENERAL_PROPERTY_ASSOCIATION.'+
+ 'DERIVED_DEFINITION' ) | ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'GENERAL_PROPERTY' IN TYPEOF ( gpa. base_definition ) ) AND
+ ( gpa. base_definition.name ='surface_condition' ) ) ) =1 )
+ ) =1 );
+END_ENTITY;
+
+
+ENTITY context_dependent_invisibility
+ SUBTYPE OF (invisibility);
+ presentation_context : invisibility_context;
+END_ENTITY;
+
+
+ENTITY context_dependent_over_riding_styled_item
+ SUBTYPE OF (over_riding_styled_item);
+ style_context : LIST [1:?] OF style_context_select;
+WHERE
+ WR1 : (SIZEOF(QUERY(sc <* SELF.style_context | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.REPRESENTATION_ITEM' IN TYPEOF(sc)))= 1) OR
+(SIZEOF(QUERY(sc <* SELF.style_context |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' IN TYPEOF(sc))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.REPRESENTATION_RELATIONSHIP' IN TYPEOF(sc)) ))
+ = SIZEOF(style_context));
+END_ENTITY;
+
+
+ENTITY context_dependent_shape_representation;
+ representation_relation : shape_representation_relationship;
+ represented_product_relation : product_definition_shape;
+DERIVE
+ description : text := get_description_value(SELF);
+ name : label := get_name_value(SELF);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION_RELATIONSHIP' IN TYPEOF(SELF.represented_product_relation.definition);
+ WR2 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
+ WR3 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'NAME_ATTRIBUTE.NAMED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY context_dependent_unit
+ SUBTYPE OF (named_unit);
+ name : label;
+END_ENTITY;
+
+
+ENTITY contract;
+ name : label;
+ purpose : text;
+ kind : contract_type;
+END_ENTITY;
+
+
+ENTITY contract_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_contract : contract;
+DERIVE
+ role : object_role := get_role(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ROLE_ASSOCIATION.ITEM_WITH_ROLE')) <= 1;
+END_ENTITY;
+
+
+ENTITY contract_relationship;
+ id : identifier;
+ name : label;
+ description : OPTIONAL text;
+ relating_contract : contract;
+ related_contract : contract;
+END_ENTITY;
+
+
+ENTITY contract_type;
+ description : label;
+END_ENTITY;
+
+
+ENTITY conversion_based_unit
+ SUBTYPE OF (named_unit);
+ name : label;
+ conversion_factor : measure_with_unit;
+WHERE
+ WR1 : SELF\named_unit.dimensions = derive_dimensional_exponents(conversion_factor\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY coordinated_universal_time_offset;
+ hour_offset : INTEGER;
+ minute_offset : OPTIONAL INTEGER;
+ sense : ahead_or_behind;
+DERIVE
+ actual_minute_offset : INTEGER := NVL(minute_offset,0);
+WHERE
+ WR1 : { 0 <= hour_offset < 24 };
+ WR2 : { 0 <= actual_minute_offset <= 59 };
+ WR3 : NOT (((hour_offset <> 0) OR (actual_minute_offset <>0)) AND (sense = exact));
+END_ENTITY;
+
+
+ENTITY csg_shape_representation
+ SUBTYPE OF (shape_representation);
+WHERE
+ WR1 : SELF.context_of_items\geometric_representation_context.coordinate_space_dimension = 3;
+ WR2 : SIZEOF (
+QUERY ( it <* SELF.items| ( SIZEOF ([ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CSG_SOLID', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT_3D', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SOLID_REPLICA', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.REVOLVED_FACE_SOLID', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EXTRUDED_FACE_SOLID' ] * TYPEOF (it)) <> 1) )) = 0;
+ WR3 : SIZEOF (
+QUERY ( mi <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' IN TYPEOF (it)) )| NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CSG_SHAPE_REPRESENTATION' IN TYPEOF (mi\mapped_item.mapping_source.mapped_representation)) )) = 0;
+ WR4 : SIZEOF (
+QUERY ( sr <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SOLID_REPLICA' IN TYPEOF (it)) )| ( SIZEOF ([ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CSG_SOLID', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.REVOLVED_FACE_SOLID', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EXTRUDED_FACE_SOLID' ] * TYPEOF (sr\solid_replica.parent_solid)) = 0) )) = 0;
+ WR5 : SIZEOF (
+QUERY ( it <* SELF.items| NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT_3D' IN TYPEOF (it)) )) > 0;
+END_ENTITY;
+
+
+ENTITY csg_solid
+ SUBTYPE OF (solid_model);
+ tree_root_expression : csg_select;
+END_ENTITY;
+
+
+ENTITY currency
+ ABSTRACT SUPERTYPE OF (ONEOF (externally_defined_currency, iso4217_currency))
+ SUBTYPE OF (context_dependent_unit);
+WHERE
+ WR1 : ((SELF\named_unit.dimensions.length_exponent = 0.0) AND
+ (SELF\named_unit.dimensions.mass_exponent = 0.0) AND
+ (SELF\named_unit.dimensions.time_exponent = 0.0) AND
+ (SELF\named_unit.dimensions.electric_current_exponent = 0.0) AND
+ (SELF\named_unit.dimensions.thermodynamic_temperature_exponent = 0.0) AND
+ (SELF\named_unit.dimensions.amount_of_substance_exponent = 0.0) AND
+ (SELF\named_unit.dimensions.luminous_intensity_exponent = 0.0));
+END_ENTITY;
+
+
+ENTITY currency_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+ SELF\measure_with_unit.unit_component : currency;
+END_ENTITY;
+
+
+ENTITY curve
+ SUPERTYPE OF (ONEOF (line, conic, pcurve, surface_curve, offset_curve_2d, offset_curve_3d, curve_replica))
+ SUBTYPE OF (geometric_representation_item);
+END_ENTITY;
+
+
+ENTITY curve_bounded_surface
+ SUBTYPE OF (bounded_surface);
+ basis_surface : surface;
+ boundaries : SET [1:?] OF boundary_curve;
+ implicit_outer : BOOLEAN;
+WHERE
+ WR1 : (NOT implicit_outer) OR
+ (SIZEOF (QUERY (temp <* boundaries |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OUTER_BOUNDARY_CURVE' IN TYPEOF(temp))) = 0);
+ WR2 : (NOT(implicit_outer)) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.BOUNDED_SURFACE' IN TYPEOF(basis_surface));
+ WR3 : SIZEOF(QUERY(temp <* boundaries |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OUTER_BOUNDARY_CURVE' IN
+ TYPEOF(temp))) <= 1;
+ WR4 : SIZEOF(QUERY(temp <* boundaries |
+ (temp\composite_curve_on_surface.basis_surface [1] <>
+ SELF.basis_surface))) = 0;
+END_ENTITY;
+
+
+ENTITY curve_dimension
+ SUBTYPE OF (dimension_curve_directed_callout);
+END_ENTITY;
+
+
+ENTITY curve_replica
+ SUBTYPE OF (curve);
+ parent_curve : curve;
+ transformation : cartesian_transformation_operator;
+WHERE
+ WR1 : transformation.dim = parent_curve.dim;
+ WR2 : acyclic_curve_replica (SELF, parent_curve);
+END_ENTITY;
+
+
+ENTITY curve_style
+ SUBTYPE OF (founded_item);
+ name : label;
+ curve_font : curve_font_or_scaled_curve_font_select;
+ curve_width : size_select;
+ curve_colour : colour;
+END_ENTITY;
+
+
+ENTITY curve_style_font
+ SUBTYPE OF (founded_item);
+ name : label;
+ pattern_list : LIST [1:?] OF curve_style_font_pattern;
+END_ENTITY;
+
+
+ENTITY curve_style_font_and_scaling
+ SUBTYPE OF (founded_item);
+ name : label;
+ curve_font : curve_style_font_select;
+ curve_font_scaling : REAL;
+END_ENTITY;
+
+
+ENTITY curve_style_font_pattern
+ SUBTYPE OF (founded_item);
+ visible_segment_length : positive_length_measure;
+ invisible_segment_length : positive_length_measure;
+END_ENTITY;
+
+
+ENTITY curve_style_rendering;
+ rendering_method : shading_curve_method;
+ rendering_properties : surface_rendering_properties;
+END_ENTITY;
+
+
+ENTITY curve_swept_solid_shape_representation
+ SUBTYPE OF (shape_representation);
+WHERE
+ WR1 : SIZEOF (QUERY (it <* SELF.items |
+ NOT (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SWEPT_AREA_SOLID',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SWEPT_DISK_SOLID',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT_3D'] *
+ TYPEOF(it)) = 1))) = 0;
+ WR2 : SIZEOF (QUERY (it <* SELF.items |
+ SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SWEPT_AREA_SOLID',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SWEPT_DISK_SOLID',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM'] * TYPEOF(it)) =1 )) > 0;
+ WR3 : SIZEOF (QUERY (mi <* QUERY (it <* items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' IN TYPEOF(it)) |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_SWEPT_SOLID_SHAPE_REPRESENTATION' IN
+ TYPEOF(mi\mapped_item.mapping_source.
+ mapped_representation)))) = 0;
+ WR4 : SIZEOF (QUERY (scsas <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_CURVE_SWEPT_AREA_SOLID' IN
+ TYPEOF(it)) |
+ NOT(('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_CURVE' IN
+ TYPEOF(scsas\surface_curve_swept_area_solid.directrix)) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE' IN
+ TYPEOF(scsas\surface_curve_swept_area_solid.directrix))))) = 0;
+END_ENTITY;
+
+
+ENTITY cylindrical_surface
+ SUBTYPE OF (elementary_surface);
+ radius : positive_length_measure;
+END_ENTITY;
+
+
+ENTITY cylindricity_tolerance
+ SUBTYPE OF (geometric_tolerance);
+WHERE
+ WR1 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'GEOMETRIC_TOLERANCE_WITH_DATUM_REFERENCE' IN TYPEOF (SELF));
+END_ENTITY;
+
+
+ENTITY data_environment;
+ name : label;
+ description : text;
+ elements : SET [1:?] OF property_definition_representation;
+END_ENTITY;
+
+
+ENTITY date
+ SUPERTYPE OF (ONEOF (calendar_date, ordinal_date, week_of_year_and_day_date, year_month));
+ year_component : year_number;
+END_ENTITY;
+
+
+ENTITY date_and_time;
+ date_component : date;
+ time_component : local_time;
+END_ENTITY;
+
+
+ENTITY date_and_time_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_date_and_time : date_and_time;
+ role : date_time_role;
+END_ENTITY;
+
+
+ENTITY date_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_date : date;
+ role : date_role;
+END_ENTITY;
+
+
+ENTITY date_representation_item
+ SUBTYPE OF (representation_item, date);
+END_ENTITY;
+
+
+ENTITY date_role;
+ name : label;
+DERIVE
+ description : text := get_description_value (SELF);
+WHERE
+ WR1 : SIZEOF (USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY date_time_representation_item
+ SUBTYPE OF (representation_item, date_and_time);
+END_ENTITY;
+
+
+ENTITY date_time_role;
+ name : label;
+DERIVE
+ description : text := get_description_value (SELF);
+WHERE
+ WR1 : SIZEOF (USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY dated_effectivity
+ SUBTYPE OF (effectivity);
+ effectivity_end_date : OPTIONAL date_time_or_event_occurrence;
+ effectivity_start_date : date_time_or_event_occurrence;
+END_ENTITY;
+
+
+ENTITY datum
+ SUBTYPE OF (shape_aspect);
+ identification : identifier;
+INVERSE
+ established_by_relationships: SET [1:?] OF shape_aspect_relationship FOR related_shape_aspect;
+WHERE
+ WR1 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMMON_DATUM' IN TYPEOF(SELF)) XOR
+ ((SIZEOF(QUERY(x <* SELF\datum.established_by_relationships |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DATUM_FEATURE' IN TYPEOF(x\shape_aspect_relationship.relating_shape_aspect)))) = 1) XOR
+ (SIZEOF(QUERY(x <* SELF\datum.established_by_relationships |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DATUM_TARGET' IN TYPEOF(x\shape_aspect_relationship.relating_shape_aspect)))) >= 1));
+END_ENTITY;
+
+
+ENTITY datum_feature
+ SUBTYPE OF (shape_aspect);
+INVERSE
+ feature_basis_relationship: SET [1:?] OF shape_aspect_relationship FOR relating_shape_aspect;
+WHERE
+ WR1 : SIZEOF(QUERY(sar <* SELF\datum_feature.feature_basis_relationship
+ | ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DATUM' IN TYPEOF
+ (sar\shape_aspect_relationship.related_shape_aspect)))) = 1;
+ WR2 : SELF\shape_aspect.product_definitional = TRUE;
+END_ENTITY;
+
+
+ENTITY datum_feature_callout
+ SUBTYPE OF (draughting_callout);
+END_ENTITY;
+
+
+ENTITY datum_reference;
+ precedence : INTEGER;
+ referenced_datum : datum;
+WHERE
+ WR1 : precedence > 0;
+END_ENTITY;
+
+
+ENTITY datum_target
+ SUBTYPE OF (shape_aspect);
+ target_id : identifier;
+INVERSE
+ target_basis_relationship: SET [1:?] OF shape_aspect_relationship FOR relating_shape_aspect;
+WHERE
+ WR1 : SIZEOF(QUERY(sar <* SELF\datum_target.target_basis_relationship
+ | ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DATUM' IN TYPEOF
+ (sar\shape_aspect_relationship.related_shape_aspect)))) = 1;
+ WR2 : SELF\shape_aspect.product_definitional = TRUE;
+END_ENTITY;
+
+
+ENTITY datum_target_callout
+ SUBTYPE OF (draughting_callout);
+END_ENTITY;
+
+
+ENTITY default_tolerance_table
+ SUBTYPE OF (representation);
+WHERE
+ WR1 : SIZEOF( QUERY( i <* SELF.items | NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DEFAULT_TOLERANCE_TABLE_CELL' IN TYPEOF(i)) )) = 0;
+ WR2 : (SIZEOF( QUERY( rr <* USEDIN(SELF,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'REPRESENTATION_RELATIONSHIP.REP_1') | rr.name < 'general tolerance definition' )) = 0) AND (SIZEOF( QUERY( rr <* USEDIN(SELF,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'REPRESENTATION_RELATIONSHIP.REP_1') | (rr.name = 'general tolerance definition') AND (rr.rep_2.name < 'default tolerance') )) = 0) AND (SIZEOF( USEDIN(SELF,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'REPRESENTATION_RELATIONSHIP.REP_2') ) = 0);
+END_ENTITY;
+
+
+ENTITY default_tolerance_table_cell
+ SUBTYPE OF (compound_representation_item);
+WHERE
+ WR1 : SIZEOF(QUERY( x <* USEDIN(SELF,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'REPRESENTATION.ITEMS') | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'DEFAULT_TOLERANCE_TABLE' IN TYPEOF(x)))=1;
+ WR2 : default_tolerance_table_cell_wr2(SELF\compound_representation_item.item_element);
+ WR3 : default_tolerance_table_cell_wr3(SELF\compound_representation_item.item_element);
+ WR4 : default_tolerance_table_cell_wr4(SELF\compound_representation_item.item_element);
+ WR5 : default_tolerance_table_cell_wr5(SELF\compound_representation_item.item_element);
+END_ENTITY;
+
+
+ENTITY defined_symbol
+ SUBTYPE OF (geometric_representation_item);
+ definition : defined_symbol_select;
+ target : symbol_target;
+END_ENTITY;
+
+
+ENTITY definitional_representation
+ SUBTYPE OF (representation);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PARAMETRIC_REPRESENTATION_CONTEXT' IN
+ TYPEOF (SELF\representation.context_of_items );
+END_ENTITY;
+
+
+ENTITY definitional_representation_relationship
+ SUBTYPE OF (representation_relationship);
+WHERE
+ WR1 : acyclic_representation_relationship(SELF,
+ [SELF\representation_relationship.rep_2],
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'REPRESENTATION');
+END_ENTITY;
+
+
+ENTITY definitional_representation_relationship_with_same_context
+ SUBTYPE OF (definitional_representation_relationship);
+WHERE
+ WR1 : SELF\representation_relationship.rep_1.context_of_items :=:
+ SELF\representation_relationship.rep_2.context_of_items;
+END_ENTITY;
+
+
+ENTITY degenerate_pcurve
+ SUBTYPE OF (point);
+ basis_surface : surface;
+ reference_to_curve : definitional_representation;
+WHERE
+ WR1 : SIZEOF(reference_to_curve\representation.items) = 1;
+ WR2 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE' IN TYPEOF
+ (reference_to_curve\representation.items[1]);
+ WR3 : reference_to_curve\representation.
+ items[1]\geometric_representation_item.dim =2;
+END_ENTITY;
+
+
+ENTITY degenerate_toroidal_surface
+ SUBTYPE OF (toroidal_surface);
+ select_outer : BOOLEAN;
+WHERE
+ WR1 : major_radius < minor_radius;
+END_ENTITY;
+
+
+ENTITY derived_shape_aspect
+ SUPERTYPE OF (ONEOF (apex, centre_of_symmetry, geometric_alignment, geometric_intersection, parallel_offset, perpendicular_to, extension, tangent))
+ SUBTYPE OF (shape_aspect);
+INVERSE
+ deriving_relationships: SET [1:?] OF shape_aspect_relationship FOR relating_shape_aspect;
+WHERE
+ WR1 : SIZEOF (QUERY (dr <*
+ SELF\derived_shape_aspect.deriving_relationships |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'SHAPE_ASPECT_DERIVING_RELATIONSHIP'
+ IN TYPEOF (dr)))) = 0;
+END_ENTITY;
+
+
+ENTITY derived_unit
+ SUPERTYPE OF (ONEOF (absorbed_dose_unit, acceleration_unit, radioactivity_unit, area_unit, capacitance_unit, dose_equivalent_unit, electric_charge_unit, conductance_unit, electric_potential_unit, energy_unit, magnetic_flux_density_unit, force_unit, frequency_unit, illuminance_unit, inductance_unit, magnetic_flux_unit, power_unit, pressure_unit, resistance_unit, velocity_unit, volume_unit));
+ elements : SET [1:?] OF derived_unit_element;
+DERIVE
+ name : label := get_name_value(SELF);
+WHERE
+ WR1 : (SIZEOF(elements) > 1) OR ((SIZEOF(elements) = 1) AND (elements[1].exponent <> 1.0));
+ WR2 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'NAME_ATTRIBUTE.NAMED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY derived_unit_element;
+ unit : named_unit;
+ exponent : REAL;
+END_ENTITY;
+
+
+ENTITY description_attribute;
+ attribute_value : text;
+ described_item : description_attribute_select;
+END_ENTITY;
+
+
+ENTITY descriptive_representation_item
+ SUPERTYPE OF (ONEOF (tagged_text_item, uniform_resource_identifier))
+ SUBTYPE OF (representation_item);
+ description : text;
+END_ENTITY;
+
+
+ENTITY design_context
+ SUBTYPE OF (product_definition_context);
+WHERE
+ WR1 : SELF.life_cycle_stage = 'design';
+END_ENTITY;
+
+
+ENTITY design_make_from_relationship
+ SUBTYPE OF (product_definition_relationship);
+END_ENTITY;
+
+
+ENTITY diameter_dimension
+ SUBTYPE OF (dimension_curve_directed_callout);
+END_ENTITY;
+
+
+ENTITY dielectric_constant_measure_with_unit
+ SUBTYPE OF (ratio_measure_with_unit);
+END_ENTITY;
+
+
+ENTITY dimension_callout
+ SUBTYPE OF (draughting_callout);
+WHERE
+ WR1 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LEADER_DIRECTED_CALLOUT'
+ IN (TYPEOF (SELF))) XOR
+ (SIZEOF (QUERY(dce_1 <* SELF\draughting_callout.contents |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LEADER_CURVE'
+ IN (TYPEOF(dce_1))))) = 0);
+ WR2 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PROJECTION_DIRECTED_CALLOUT'
+ IN (TYPEOF (SELF))) XOR
+ (SIZEOF (QUERY(dce_1 <* SELF\draughting_callout.contents |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PROJECTION_CURVE'
+ IN (TYPEOF(dce_1))))) = 0);
+ WR3 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DIMENSION_CURVE_DIRECTED_CALLOUT'
+ IN (TYPEOF (SELF))) XOR
+ (SIZEOF (QUERY(dce_1 <* SELF\draughting_callout.contents |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DIMENSION_CURVE'
+ IN (TYPEOF(dce_1))))) = 0);
+END_ENTITY;
+
+
+ENTITY dimension_callout_component_relationship
+ SUBTYPE OF (draughting_callout_relationship);
+WHERE
+ WR1 : SELF.name IN ['prefix', 'suffix'];
+ WR2 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STRUCTURED_DIMENSION_CALLOUT'
+ IN TYPEOF (SELF.relating_draughting_callout);
+ WR3 : SIZEOF (TYPEOF (SELF.related_draughting_callout) *
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LEADER_DIRECTED_CALLOUT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PROJECTION_DIRECTED_CALLOUT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DIMENSION_CURVE_DIRECTED_CALLOUT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STRUCTURED_DIMENSION_CALLOUT']) = 0;
+ WR4 : SELF.related_draughting_callout.contents *
+ SELF.relating_draughting_callout.contents =
+ SELF.related_draughting_callout.contents;
+ WR5 : ((SELF.name = 'prefix') AND
+ (SIZEOF (QUERY (ato <* QUERY (con <*
+ SELF.related_draughting_callout.contents |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_OCCURRENCE'
+ IN TYPEOF(con))) |
+ NOT (ato.name = 'prefix text')
+ )) = 0));
+ WR6 : ((SELF.name = 'suffix') AND
+ (SIZEOF (QUERY (ato <* QUERY (con <*
+ SELF.related_draughting_callout.contents |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_OCCURRENCE'
+ IN TYPEOF(con))) |
+ NOT (ato.name = 'suffix text')
+ )) = 0));
+END_ENTITY;
+
+
+ENTITY dimension_callout_relationship
+ SUBTYPE OF (draughting_callout_relationship);
+WHERE
+ WR1 : SELF.name IN ['primary', 'secondary'];
+ WR2 : SIZEOF (TYPEOF (SELF.relating_draughting_callout) *
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANGULAR_DIMENSION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_DIMENSION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DIAMETER_DIMENSION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LEADER_DIRECTED_DIMENSION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LINEAR_DIMENSION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORDINATE_DIMENSION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.RADIUS_DIMENSION'])>=1;
+ WR3 : SIZEOF (TYPEOF (SELF.related_draughting_callout) *
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DIMENSION_CURVE_DIRECTED_CALLOUT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PROJECTION_DIRECTED_CALLOUT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LEADER_DIRECTED_CALLOUT']) = 0;
+ WR4 : SELF.related_draughting_callout.contents *
+ SELF.relating_draughting_callout.contents =
+ SELF.related_draughting_callout.contents;
+END_ENTITY;
+
+
+ENTITY dimension_curve
+ SUBTYPE OF (annotation_curve_occurrence);
+WHERE
+ WR1 : (SIZEOF(
+ QUERY(dct <* USEDIN(SELF,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'TERMINATOR_SYMBOL.ANNOTATED_CURVE')
+ | (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DIMENSION_CURVE_TERMINATOR' IN TYPEOF(dct))
+ ))
+ ) <= 2);
+ WR2 : SIZEOF(
+ QUERY( dcdc <* USEDIN(SELF,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_CALLOUT.CONTENTS') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DIMENSION_CURVE_DIRECTED_CALLOUT' IN TYPEOF(dcdc)))
+ )>= 1;
+ WR3 : (SIZEOF(
+ QUERY(dct1 <* USEDIN(SELF,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'TERMINATOR_SYMBOL.ANNOTATED_CURVE')
+ | (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DIMENSION_CURVE_TERMINATOR' IN TYPEOF(dct1))
+ AND (dct1\dimension_curve_terminator.role = dimension_extent_usage.origin)))
+ ) <= 1)
+ AND
+ (SIZEOF(
+ QUERY (dct2 <* USEDIN(SELF,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'TERMINATOR_SYMBOL.ANNOTATED_CURVE')
+ | (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DIMENSION_CURVE_TERMINATOR' IN TYPEOF(dct2))
+ AND (dct2\dimension_curve_terminator.role = dimension_extent_usage.target)))
+ ) <= 1);
+END_ENTITY;
+
+
+ENTITY dimension_curve_directed_callout
+ SUBTYPE OF (draughting_callout);
+WHERE
+ WR1 : SIZEOF(QUERY(d_c<*SELF\draughting_callout.contents |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DIMENSION_CURVE' IN (TYPEOF(d_c))))=1;
+ WR2 : SIZEOF(SELF\draughting_callout.contents) >= 2;
+END_ENTITY;
+
+
+ENTITY dimension_curve_terminator
+ SUBTYPE OF (terminator_symbol);
+ role : dimension_extent_usage;
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DIMENSION_CURVE' IN TYPEOF
+ (SELF\terminator_symbol.annotated_curve);
+END_ENTITY;
+
+
+ENTITY dimension_curve_terminator_to_projection_curve_associativity
+ SUBTYPE OF (annotation_occurrence_associativity);
+ SELF\annotation_occurrence_relationship.related_annotation_occurrence : projection_curve;
+ SELF\annotation_occurrence_relationship.relating_annotation_occurrence : dimension_curve_terminator;
+END_ENTITY;
+
+
+ENTITY dimension_pair
+ SUBTYPE OF (draughting_callout_relationship);
+WHERE
+ WR1 : SELF.name IN ['chained', 'parallel'];
+ WR2 : SIZEOF (TYPEOF (SELF.relating_draughting_callout) *
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANGULAR_DIMENSION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_DIMENSION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DIAMETER_DIMENSION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LINEAR_DIMENSION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORDINATE_DIMENSION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.RADIUS_DIMENSION'])=1;
+ WR3 : SIZEOF (TYPEOF (SELF.related_draughting_callout) *
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANGULAR_DIMENSION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_DIMENSION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DIAMETER_DIMENSION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LINEAR_DIMENSION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORDINATE_DIMENSION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.RADIUS_DIMENSION'])=1;
+END_ENTITY;
+
+
+ENTITY dimension_related_tolerance_zone_element;
+ related_dimension : dimensional_location;
+ related_element : tolerance_zone_definition;
+END_ENTITY;
+
+
+ENTITY dimension_text_associativity
+ SUBTYPE OF (text_literal, mapped_item);
+WHERE
+ WR1 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHAPE_DIMENSION_REPRESENTATION'
+ IN TYPEOF (SELF\mapped_item.
+ mapping_source.mapped_representation));
+ WR2 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DRAUGHTING_CALLOUT'
+ IN TYPEOF (SELF\mapped_item.mapping_target));
+ WR3 : SIZEOF (QUERY (ato <* QUERY (si <*
+ USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM.ITEM') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_OCCURRENCE'
+ IN TYPEOF(si))) |
+ NOT (SIZEOF( QUERY (dc <*
+ USEDIN (ato, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_CALLOUT.CONTENTS') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DRAUGHTING_CALLOUT'
+ IN TYPEOF (dc)))
+ * [SELF\mapped_item.mapping_target]) = 1)
+ )) = 0;
+END_ENTITY;
+
+
+ENTITY dimensional_characteristic_representation;
+ dimension : dimensional_characteristic;
+ representation : shape_dimension_representation;
+END_ENTITY;
+
+
+ENTITY dimensional_exponents;
+ length_exponent : REAL;
+ mass_exponent : REAL;
+ time_exponent : REAL;
+ electric_current_exponent : REAL;
+ thermodynamic_temperature_exponent : REAL;
+ amount_of_substance_exponent : REAL;
+ luminous_intensity_exponent : REAL;
+END_ENTITY;
+
+
+ENTITY dimensional_location
+ SUPERTYPE OF (ONEOF (angular_location, dimensional_location_with_path))
+ SUBTYPE OF (shape_aspect_relationship);
+END_ENTITY;
+
+
+ENTITY dimensional_location_with_path
+ SUBTYPE OF (dimensional_location);
+ path : shape_aspect;
+END_ENTITY;
+
+
+ENTITY dimensional_size
+ SUPERTYPE OF (ONEOF (angular_size, dimensional_size_with_path));
+ applies_to : shape_aspect;
+ name : label;
+WHERE
+ WR1 : applies_to.product_definitional = TRUE;
+END_ENTITY;
+
+
+ENTITY dimensional_size_with_path
+ SUBTYPE OF (dimensional_size);
+ path : shape_aspect;
+END_ENTITY;
+
+
+ENTITY directed_action
+ SUBTYPE OF (executed_action);
+ directive : action_directive;
+END_ENTITY;
+
+
+ENTITY directed_dimensional_location
+ SUBTYPE OF (dimensional_location);
+END_ENTITY;
+
+
+ENTITY direction
+ SUBTYPE OF (geometric_representation_item);
+ direction_ratios : LIST [2:3] OF REAL;
+WHERE
+ WR1 : SIZEOF(QUERY(tmp <* direction_ratios | tmp <> 0.0)) > 0;
+END_ENTITY;
+
+
+ENTITY document;
+ id : identifier;
+ name : label;
+ description : OPTIONAL text;
+ kind : document_type;
+INVERSE
+ representation_types: SET [0:?] OF document_representation_type FOR represented_document;
+END_ENTITY;
+
+
+ENTITY document_file
+ SUBTYPE OF (document, characterized_object);
+WHERE
+ WR1 : SELF\characterized_object.name = '';
+ WR2 : NOT EXISTS(SELF\characterized_object.description);
+ WR3 : SIZEOF( QUERY( drt <* SELF\document.representation_types |
+ drt.name IN ['digital','physical'])) = 1;
+END_ENTITY;
+
+
+ENTITY document_identifier
+ SUBTYPE OF (group);
+UNIQUE
+ UR1: SELF\group.name, SELF\group.description;
+END_ENTITY;
+
+
+ENTITY document_identifier_assignment
+ SUBTYPE OF (group_assignment);
+ items : SET [1:?] OF document_identifier_assigned_item;
+ SELF\group_assignment.assigned_group : document_identifier;
+END_ENTITY;
+
+
+ENTITY document_product_association;
+ name : label;
+ description : OPTIONAL text;
+ relating_document : document;
+ related_product : product_or_formation_or_definition;
+END_ENTITY;
+
+
+ENTITY document_product_equivalence
+ SUBTYPE OF (document_product_association);
+WHERE
+ WR1 : SELF\document_product_association.name = 'equivalence';
+ WR2 : NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT' IN TYPEOF(SELF\document_product_association.related_product)) OR ((SELF\document_product_association.relating_document.kind. product_data_type = 'configuration controlled document') AND (SIZEOF( QUERY( prpc <* USEDIN(SELF\document_product_association.related_product,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS') | prpc.name = 'document' )) = 1));
+ WR3 : NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION_FORMATION' IN TYPEOF(SELF.related_product)) OR ((SELF\document_product_association.relating_document.kind.product_data_type = 'configuration controlled document version') AND (SIZEOF( QUERY( prpc <* USEDIN(SELF.related_product\product_definition_formation.of_product, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS') | prpc.name = 'document')) = 1));
+ WR4 : NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION' IN TYPEOF(SELF.related_product)) OR ((SELF\document_product_association.relating_document.kind.product_data_type = 'configuration controlled document definition') AND (SIZEOF( QUERY( prpc <* USEDIN(SELF\document_product_association.related_product\product_definition.formation.of_product, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS') | prpc.name = 'document' )) = 1));
+END_ENTITY;
+
+
+ENTITY document_reference
+ ABSTRACT SUPERTYPE;
+ assigned_document : document;
+ source : label;
+DERIVE
+ role : object_role := get_role(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ROLE_ASSOCIATION.ITEM_WITH_ROLE')) <= 1;
+END_ENTITY;
+
+
+ENTITY document_relationship;
+ name : label;
+ description : OPTIONAL text;
+ relating_document : document;
+ related_document : document;
+END_ENTITY;
+
+
+ENTITY document_representation_type;
+ name : label;
+ represented_document : document;
+END_ENTITY;
+
+
+ENTITY document_type;
+ product_data_type : label;
+END_ENTITY;
+
+
+ENTITY document_usage_constraint;
+ source : document;
+ subject_element : label;
+ subject_element_value : text;
+END_ENTITY;
+
+
+ENTITY document_usage_constraint_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_document_usage : document_usage_constraint;
+ role : document_usage_role;
+END_ENTITY;
+
+
+ENTITY document_usage_role;
+ name : label;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY dose_equivalent_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DOSE_EQUIVALENT_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY dose_equivalent_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) = dimensions_for_si_unit (si_unit_name.sievert);
+END_ENTITY;
+
+
+ENTITY double_offset_shelled_solid
+ SUBTYPE OF (shelled_solid);
+ thickness2 : length_measure;
+WHERE
+ WR1 : thickness2 <> 0;
+ WR2 : SELF\shelled_solid.thickness <> thickness2;
+END_ENTITY;
+
+
+ENTITY draped_defined_transformation
+ SUBTYPE OF (transformation_with_derived_angle);
+END_ENTITY;
+
+
+ENTITY draughting_annotation_occurrence
+ SUBTYPE OF (annotation_occurrence);
+WHERE
+ WR1 : (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_CURVE_OCCURRENCE'
+ IN TYPEOF (SELF))) OR
+ (SIZEOF (QUERY (sty <* SELF.styles |
+ NOT ((SIZEOF (sty.styles) = 1)
+ AND ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE'
+ IN TYPEOF (sty.styles[1]))) )) = 0);
+ WR2 : (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_FILL_AREA_OCCURRENCE'
+ IN TYPEOF (SELF))) OR (SIZEOF (QUERY (sty <* SELF.styles |
+ NOT ((SIZEOF (sty.styles) = 1)
+ AND ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FILL_AREA_STYLE'
+ IN TYPEOF (sty.styles[1]))) )) = 0);
+ WR3 : (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_FILL_AREA_OCCURRENCE'
+ IN TYPEOF (SELF))) OR (SIZEOF (QUERY (bound <*
+ SELF.item\annotation_fill_area.boundaries |
+ NOT (SIZEOF (QUERY (si <*
+ USEDIN (bound, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'STYLED_ITEM.ITEM') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'ANNOTATION_CURVE_OCCURRENCE' IN TYPEOF (si)))) > 0))) = 0);
+ WR4 : (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_SYMBOL_OCCURRENCE'
+ IN TYPEOF (SELF))) OR (SIZEOF (QUERY (sty <* SELF.styles |
+ NOT ((SIZEOF (sty.styles) = 1) AND
+ (SIZEOF (TYPEOF (sty.styles[1]) *
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SYMBOL_STYLE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.NULL_STYLE']) = 1)) )) = 0);
+ WR5 : (NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_SYMBOL_OCCURRENCE'
+ IN TYPEOF (SELF)) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_SYMBOL'
+ IN TYPEOF(SELF.item)))) OR
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_SYMBOL_REPRESENTATION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_SUBFIGURE_REPRESENTATION'] *
+ TYPEOF (SELF.item\mapped_item.mapping_source.
+ mapped_representation)) = 1);
+ WR6 : (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_OCCURRENCE'
+ IN TYPEOF (SELF))) OR
+ (SIZEOF (QUERY (sty <* SELF.styles |
+ NOT ((SIZEOF (sty.styles) = 1)
+ AND ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TEXT_STYLE'
+ IN TYPEOF (sty.styles[1]))) )) = 0);
+ WR7 : (NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_OCCURRENCE'
+ IN TYPEOF (SELF))) OR
+ (SIZEOF (TYPEOF(SELF.item) *
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPOSITE_TEXT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TEXT_LITERAL']) = 1);
+ WR8 : (NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_OCCURRENCE'
+ IN TYPEOF (SELF)) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPOSITE_TEXT'
+ IN TYPEOF (SELF.item)))) OR (SIZEOF (QUERY (tl <*
+ SELF.item\composite_text.collected_text |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TEXT_LITERAL'
+ IN TYPEOF (tl)) )) = 0);
+ WR9 : (NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_OCCURRENCE'
+ IN TYPEOF (SELF)) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TEXT_LITERAL'
+ IN TYPEOF (SELF.item)))) OR (SELF.item\text_literal.alignment
+ IN ['baseline left', 'baseline centre', 'baseline right']);
+ WR10 : (NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_OCCURRENCE'
+ IN TYPEOF (SELF)) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPOSITE_TEXT'
+ IN TYPEOF (SELF.item)))) OR
+ (SIZEOF (QUERY (tl <* QUERY (text <* SELF.
+ item\composite_text.collected_text
+ |('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TEXT_LITERAL' IN TYPEOF(text))) |
+ NOT (tl\text_literal.alignment IN
+ ['baseline left', 'baseline centre', 'baseline right']) )) = 0);
+ WR11 : NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_OCCURRENCE'
+ IN TYPEOF(SELF)) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPOSITE_TEXT'
+ IN TYPEOF (SELF.item))) OR check_text_alignment(SELF.item);
+ WR12 : NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_OCCURRENCE'
+ IN TYPEOF(SELF)) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPOSITE_TEXT'
+ IN TYPEOF (SELF.item))) OR check_text_font(SELF.item);
+ WR13 : (NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_OCCURRENCE'
+ IN TYPEOF(SELF)) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPOSITE_TEXT'
+ IN TYPEOF (SELF.item)))) OR
+ (SIZEOF (QUERY (tl <* QUERY (text <*
+ SELF.item\composite_text.collected_text |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TEXT_LITERAL' IN TYPEOF (text))) |
+ NOT (SIZEOF (TYPEOF(tl) *
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'TEXT_LITERAL_WITH_BLANKING_BOX',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'TEXT_LITERAL_WITH_ASSOCIATED_CURVES']) = 0) )) = 0);
+ WR14 : (NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_OCCURRENCE'
+ IN TYPEOF (SELF)) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TEXT_LITERAL_WITH_ASSOCIATED_CURVES'
+ IN TYPEOF (SELF.item)))) OR
+ (SIZEOF (QUERY (crv <*
+ SELF.item\text_literal_with_associated_curves.
+ associated_curves |
+ NOT (SIZEOF (QUERY (si <* USEDIN (crv,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM.ITEM') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_CURVE_OCCURRENCE'
+ IN TYPEOF (si)) )) > 0) )) = 0);
+ WR15 : (NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_OCCURRENCE'
+ IN TYPEOF (SELF)) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPOSITE_TEXT_WITH_ASSOCIATED_CURVES'
+ IN TYPEOF (SELF.item)))) OR
+ (SIZEOF (QUERY (crv <*
+ SELF.item\composite_text_with_associated_curves.
+ associated_curves |
+ NOT (SIZEOF (QUERY (si <* USEDIN (crv,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM.ITEM') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_CURVE_OCCURRENCE'
+ IN TYPEOF (si)) )) > 0) )) = 0);
+ WR16 : SIZEOF (QUERY (cs <* QUERY (sty <* SELF.styles |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE' IN TYPEOF (sty.styles[1])))
+ | NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LENGTH_MEASURE_WITH_UNIT'
+ IN TYPEOF (cs.styles[1]\curve_style.curve_width)) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POSITIVE_LENGTH_MEASURE'
+ IN TYPEOF (cs.styles[1]\curve_style.
+ curve_width\measure_with_unit.value_component))))) = 0;
+ WR17 : SIZEOF (QUERY (fas <* QUERY (sty <* SELF.styles |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FILL_AREA_STYLE'
+ IN TYPEOF (sty.styles[1]))) |
+ NOT ((SIZEOF (QUERY (fs <* fas.styles[1]\fill_area_style.fill_styles
+ | ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FILL_AREA_STYLE_TILES'
+ IN TYPEOF (fs)))) <= 1)
+ AND (SIZEOF (QUERY (fst <* QUERY (fs <*
+ fas.styles[1]\fill_area_style.fill_styles |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FILL_AREA_STYLE_TILES'
+ IN TYPEOF (fs))) |
+ NOT (SIZEOF (fst\fill_area_style_tiles.tiles) = 1)
+ )) = 0))
+ )) = 0;
+ WR18 : SIZEOF (QUERY (fas <* QUERY (sty <* SELF.styles |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FILL_AREA_STYLE'
+ IN TYPEOF (sty.styles[1]))) |
+ NOT (SIZEOF (QUERY (fsh <* QUERY (fs <*
+ fas.styles[1]\fill_area_style.fill_styles |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FILL_AREA_STYLE_HATCHING'
+ IN TYPEOF (fs))) |
+ NOT (fsh\fill_area_style_hatching.point_of_reference_hatch_line :=:
+ fsh\fill_area_style_hatching.pattern_start) )) = 0) )) = 0;
+ WR19 : SIZEOF (QUERY (ts <* QUERY (sty <* SELF.styles |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TEXT_STYLE'
+ IN TYPEOF(sty.styles[1]))) |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'TEXT_STYLE_WITH_BOX_CHARACTERISTICS'
+ IN TYPEOF (ts.styles[1])))) = 0;
+ WR20 : SIZEOF (QUERY (ts <* QUERY (sty <* SELF.styles |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TEXT_STYLE_WITH_BOX_CHARACTERISTICS'
+ IN TYPEOF (sty.styles[1]))) |
+ NOT (SIZEOF (ts.styles[1]\text_style_with_box_characteristics.
+ characteristics) = 4) )) = 0;
+END_ENTITY;
+
+
+ENTITY draughting_callout
+ SUPERTYPE OF ((ONEOF (datum_feature_callout, datum_target_callout, dimension_curve_directed_callout, draughting_elements, geometrical_tolerance_callout, leader_directed_callout, projection_directed_callout, structured_dimension_callout) ANDOR surface_condition_callout))
+ SUBTYPE OF (geometric_representation_item);
+ contents : SET [1:?] OF draughting_callout_element;
+WHERE
+ WR1 : (SIZEOF (QUERY (l_1 <* SELF\draughting_callout.contents |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LEADER_CURVE' IN (TYPEOF(l_1)))) = 0) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LEADER_DIRECTED_CALLOUT' IN (TYPEOF(SELF))) AND
+ (SIZEOF (QUERY (l_1 <* SELF\draughting_callout.contents |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PROJECTION_CURVE' IN (TYPEOF(l_1)))) = 0) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PROJECTION_DIRECTED_CALLOUT' IN (TYPEOF(SELF))) AND
+ (SIZEOF (QUERY (l_1 <* SELF\draughting_callout.contents |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DIMENSION_CURVE' IN (TYPEOF(l_1)))) = 0) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DIMENSION_CURVE_DIRECTED_CALLOUT' IN (TYPEOF(SELF)));
+END_ENTITY;
+
+
+ENTITY draughting_callout_relationship;
+ name : label;
+ description : text;
+ relating_draughting_callout : draughting_callout;
+ related_draughting_callout : draughting_callout;
+END_ENTITY;
+
+
+ENTITY draughting_elements
+ SUBTYPE OF (draughting_callout);
+WHERE
+ WR1 : SIZEOF (QUERY (l_c <* QUERY (con <* SELF.contents |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LEADER_CURVE' IN TYPEOF(con))) |
+ NOT (SIZEOF (QUERY (ldc <* USEDIN (l_c,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'DRAUGHTING_CALLOUT.CONTENTS') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LEADER_DIRECTED_CALLOUT'
+ IN TYPEOF (ldc)))) <= 1)))=0;
+ WR2 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DIMENSION_CURVE_DIRECTED_CALLOUT'
+ IN TYPEOF(SELF)) OR
+ (SIZEOF (QUERY (con <* SELF.contents |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PROJECTION_CURVE' IN
+ TYPEOF (con)))) <= 2);
+ WR3 : SIZEOF (QUERY (rc <* USEDIN (SELF,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DRAUGHTING_CALLOUT_' +
+ 'RELATIONSHIP.RELATING_DRAUGHTING_CALLOUT') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DIMENSION_CALLOUT_RELATIONSHIP' IN TYPEOF (rc)) AND
+ (rc.name = 'primary') )) <= 1;
+ WR4 : SIZEOF (QUERY (rc <* USEDIN (SELF,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DRAUGHTING_CALLOUT_' +
+ 'RELATIONSHIP.RELATING_DRAUGHTING_CALLOUT') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DIMENSION_CALLOUT_RELATIONSHIP' IN TYPEOF (rc)) AND
+ (rc.name = 'secondary') )) <= 1;
+ WR5 : SIZEOF (QUERY (sec <* QUERY (rc <* USEDIN (SELF,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DRAUGHTING_CALLOUT_' +
+ 'RELATIONSHIP.RELATING_DRAUGHTING_CALLOUT') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DIMENSION_CALLOUT_RELATIONSHIP' IN TYPEOF (rc)) AND
+ (rc.name = 'secondary') ) |
+ NOT (SIZEOF (QUERY (prim <* USEDIN (SELF,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DRAUGHTING_CALLOUT_' +
+ 'RELATIONSHIP.RELATING_DRAUGHTING_CALLOUT') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DIMENSION_CALLOUT_RELATIONSHIP' IN TYPEOF (prim)) AND
+ (prim.name = 'primary') )) = 1))) = 0;
+END_ENTITY;
+
+
+ENTITY draughting_model
+ SUBTYPE OF (representation);
+ SELF\representation.items : SET [1:?] OF draughting_model_item_select;
+UNIQUE
+ UR1: SELF\representation.name;
+WHERE
+ WR1 : SIZEOF (QUERY (mi <* QUERY (it <* SELF.items |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' IN TYPEOF(it))) |
+ NOT (
+ SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHAPE_REPRESENTATION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DRAUGHTING_MODEL'] *
+ TYPEOF (mi\mapped_item.mapping_source.
+ mapped_representation)) = 1
+ ))) = 0;
+ WR2 : SIZEOF (QUERY (smi <* QUERY (si <* QUERY (it <* SELF.items |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM' IN TYPEOF(it))) |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' IN
+ TYPEOF(si\styled_item.item))) |
+ (NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHAPE_REPRESENTATION' IN
+ TYPEOF(smi\styled_item.item\mapped_item.
+ mapping_source.mapped_representation))
+ AND
+ (SIZEOF (QUERY (sty <* smi\styled_item.styles |
+ (NOT (SIZEOF (QUERY (psa <* sty.styles |
+ (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE' IN TYPEOF(psa))))) = 1
+ )))) = 1)))
+ )) = 0;
+END_ENTITY;
+
+
+ENTITY draughting_model_item_association
+ SUBTYPE OF (item_identified_representation_usage);
+ SELF\item_identified_representation_usage.definition : shape_definition;
+ SELF\item_identified_representation_usage.identified_item : draughting_model_item_association_select;
+ SELF\item_identified_representation_usage.used_representation : draughting_model;
+END_ENTITY;
+
+
+ENTITY draughting_pre_defined_colour
+ SUBTYPE OF (pre_defined_colour);
+WHERE
+ WR1 : SELF.name IN
+ ['red',
+ 'green',
+ 'blue',
+ 'yellow',
+ 'magenta',
+ 'cyan',
+ 'black',
+ 'white'];
+END_ENTITY;
+
+
+ENTITY draughting_pre_defined_curve_font
+ SUBTYPE OF (pre_defined_curve_font);
+WHERE
+ WR1 : SELF.name IN
+ ['continuous',
+ 'chain',
+ 'chain double dash',
+ 'dashed',
+ 'dotted'];
+END_ENTITY;
+
+
+ENTITY draughting_pre_defined_text_font
+ SUBTYPE OF (pre_defined_text_font);
+WHERE
+ WR1 : SELF.name[1:8] = 'ISO 3098';
+END_ENTITY;
+
+
+ENTITY draughting_subfigure_representation
+ SUBTYPE OF (symbol_representation);
+WHERE
+ WR1 : SIZEOF (QUERY (item <* SELF\representation.items |
+ NOT (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_OCCURRENCE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DRAUGHTING_CALLOUT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT']
+ * TYPEOF (item)) = 1))) = 0;
+ WR2 : SIZEOF (QUERY (item <* SELF\representation.items |
+ SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_OCCURRENCE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DRAUGHTING_CALLOUT'] *
+ TYPEOF (item)) = 1)) >= 1;
+ WR3 : SIZEOF (QUERY (srm <* QUERY (rm <*
+ USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'REPRESENTATION_MAP.MAPPED_REPRESENTATION') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SYMBOL_REPRESENTATION_MAP'
+ IN TYPEOF(rm))) |
+ NOT (SIZEOF (QUERY (a_s <* QUERY (mi <* srm.map_usage |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_SYMBOL' IN TYPEOF(mi)))
+ | NOT (SIZEOF (QUERY (aso <*
+ USEDIN (a_s, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'STYLED_ITEM.ITEM') |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_SUBFIGURE_OCCURRENCE'
+ IN TYPEOF(aso)))) = 0))) = 0))) > 0;
+ WR4 : NOT (acyclic_mapped_item_usage (SELF));
+ WR5 : SIZEOF (SELF.context_of_items.representations_in_context) = 1;
+END_ENTITY;
+
+
+ENTITY draughting_symbol_representation
+ SUBTYPE OF (symbol_representation);
+UNIQUE
+ UR1: SELF\representation.name;
+WHERE
+ WR1 : SIZEOF (QUERY (item <* SELF\representation.items |
+ NOT (SIZEOF (TYPEOF (item) *
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_CURVE_OCCURRENCE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_SYMBOL_OCCURRENCE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_FILL_AREA_OCCURRENCE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_OCCURRENCE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT']) = 1)
+ )) = 0;
+ WR2 : SIZEOF (QUERY (item <* SELF\representation.items |
+ (SIZEOF (TYPEOF (item) *
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_CURVE_OCCURRENCE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_SYMBOL_OCCURRENCE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_FILL_AREA_OCCURRENCE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_OCCURRENCE']) = 1)
+ )) >= 1;
+ WR3 : SIZEOF (QUERY (item <* SELF\representation.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_SUBFIGURE_OCCURRENCE'
+ IN TYPEOF (item))) = 0;
+ WR4 : SIZEOF (QUERY (srm <* QUERY (rm <*
+ USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'REPRESENTATION_MAP.MAPPED_REPRESENTATION') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SYMBOL_REPRESENTATION_MAP'
+ IN TYPEOF(rm))) |
+ (SIZEOF (QUERY (a_s <* QUERY (mi <* srm.map_usage |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_SYMBOL' IN TYPEOF(mi))) |
+ NOT (SIZEOF (QUERY(aso <*
+ USEDIN(a_s, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'STYLED_ITEM.ITEM') |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_SYMBOL_OCCURRENCE'
+ IN TYPEOF(aso))
+ )) = 0) )) = 0) )) > 0;
+ WR5 : NOT (acyclic_mapped_item_usage (SELF));
+ WR6 : SIZEOF (SELF.context_of_items.representations_in_context) = 1;
+END_ENTITY;
+
+
+ENTITY draughting_text_literal_with_delineation
+ SUBTYPE OF (text_literal_with_delineation);
+WHERE
+ WR1 : SELF.delineation IN ['underline', 'overline'];
+END_ENTITY;
+
+
+ENTITY draughting_title;
+ items : SET [1:?] OF draughting_titled_item;
+ language : label;
+ contents : text;
+END_ENTITY;
+
+
+ENTITY drawing_definition;
+ drawing_number : identifier;
+ drawing_type : OPTIONAL label;
+END_ENTITY;
+
+
+ENTITY drawing_revision
+ SUBTYPE OF (presentation_set);
+ revision_identifier : identifier;
+ drawing_identifier : drawing_definition;
+ intended_scale : OPTIONAL text;
+UNIQUE
+ UR1 : revision_identifier, drawing_identifier;
+END_ENTITY;
+
+
+ENTITY drawing_revision_sequence;
+ predecessor : drawing_revision;
+ successor : drawing_revision;
+WHERE
+ WR1 : predecessor :<>: successor;
+END_ENTITY;
+
+
+ENTITY drawing_sheet_revision
+ SUBTYPE OF (presentation_area);
+ revision_identifier : identifier;
+WHERE
+ WR1 : SIZEOF( QUERY(item <* SELF\representation.items |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' IN (TYPEOF(item)))
+ AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DRAWING_SHEET_REVISION' IN
+ (TYPEOF(item\mapped_item.mapping_source.mapped_representation)))))=0;
+END_ENTITY;
+
+
+ENTITY drawing_sheet_revision_sequence
+ SUBTYPE OF (representation_relationship);
+WHERE
+ WR1 : SELF\representation_relationship.rep_1 :<>:
+ SELF\representation_relationship.rep_2;
+ WR2 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DRAWING_SHEET_REVISION'
+ IN TYPEOF (SELF\representation_relationship.rep_1);
+ WR3 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DRAWING_SHEET_REVISION'
+ IN TYPEOF (SELF\representation_relationship.rep_2);
+END_ENTITY;
+
+
+ENTITY drawing_sheet_revision_usage
+ SUBTYPE OF (area_in_set);
+ sheet_number : identifier;
+UNIQUE
+ UR1: sheet_number, SELF\area_in_set.in_set;
+WHERE
+ WR1 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DRAWING_SHEET_REVISION' IN
+ TYPEOF(SELF\area_in_set.area))
+ AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DRAWING_REVISION'
+ IN TYPEOF (SELF\area_in_set.in_set));
+END_ENTITY;
+
+
+ENTITY edge
+ SUPERTYPE OF (ONEOF (edge_curve, oriented_edge, subedge))
+ SUBTYPE OF (topological_representation_item);
+ edge_start : vertex;
+ edge_end : vertex;
+END_ENTITY;
+
+
+ENTITY edge_based_wireframe_model
+ SUBTYPE OF (geometric_representation_item);
+ ebwm_boundary : SET [1:?] OF connected_edge_set;
+END_ENTITY;
+
+
+ENTITY edge_based_wireframe_shape_representation
+ SUBTYPE OF (shape_representation);
+WHERE
+ WR1 : SIZEOF (
+QUERY ( it <* SELF.items| NOT ( SIZEOF ([ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_BASED_WIREFRAME_MODEL', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT_3D' ] * TYPEOF (it)) = 1) )) = 0;
+ WR2 : SIZEOF (
+QUERY ( it <* SELF.items| ( SIZEOF ([ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_BASED_WIREFRAME_MODEL', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' ] * TYPEOF (it)) = 1) )) >= 1;
+ WR3 : SIZEOF (
+QUERY ( ebwm <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_BASED_WIREFRAME_MODEL' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( eb <* ebwm\edge_based_wireframe_model.ebwm_boundary| NOT ( SIZEOF (
+QUERY ( edges <* eb.ces_edges| NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_CURVE' IN TYPEOF (edges)) )) = 0) )) = 0) )) = 0;
+ WR4 : SIZEOF (
+QUERY ( ebwm <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_BASED_WIREFRAME_MODEL' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( eb <* ebwm\edge_based_wireframe_model.ebwm_boundary| NOT ( SIZEOF (
+QUERY ( pline_edges <*
+QUERY ( edges <* eb.ces_edges| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE' IN TYPEOF (edges\edge_curve.edge_geometry)) )| NOT ( SIZEOF (pline_edges\edge_curve.edge_geometry\polyline.points) > 2) )) = 0) )) = 0) )) = 0;
+ WR5 : SIZEOF (
+QUERY ( ebwm <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_BASED_WIREFRAME_MODEL' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( eb <* ebwm\edge_based_wireframe_model.ebwm_boundary| NOT ( SIZEOF (
+QUERY ( edges <* eb.ces_edges| NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN TYPEOF (edges.edge_start)) AND ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN TYPEOF (edges.edge_end))) )) = 0) )) = 0) )) = 0;
+ WR6 : SIZEOF (
+QUERY ( ebwm <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_BASED_WIREFRAME_MODEL' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( eb <* ebwm\edge_based_wireframe_model.ebwm_boundary| NOT ( SIZEOF (
+QUERY ( edges <* eb.ces_edges| NOT valid_wireframe_edge_curve(edges\edge_curve.edge_geometry) )) = 0) )) = 0) )) = 0;
+ WR7 : SIZEOF (
+QUERY ( ebwm <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_BASED_WIREFRAME_MODEL' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( eb <* ebwm\edge_based_wireframe_model.ebwm_boundary| NOT ( SIZEOF (
+QUERY ( edges <* eb.ces_edges| NOT (valid_wireframe_vertex_point(edges.edge_start\vertex_point.vertex_geometry) AND valid_wireframe_vertex_point(edges.edge_end\vertex_point.vertex_geometry)) )) = 0) )) = 0) )) = 0;
+ WR8 : SIZEOF (
+QUERY ( mi <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' IN TYPEOF (it)) )| NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'EDGE_BASED_WIREFRAME_SHAPE_REPRESENTATION' IN TYPEOF (mi\mapped_item.mapping_source.mapped_representation)) )) = 0;
+ WR9 : SELF.context_of_items\geometric_representation_context.coordinate_space_dimension = 3;
+END_ENTITY;
+
+
+ENTITY edge_blended_solid
+ ABSTRACT SUPERTYPE OF ((track_blended_solid ANDOR ONEOF (solid_with_constant_radius_edge_blend, solid_with_variable_radius_edge_blend, solid_with_chamfered_edges)))
+ SUBTYPE OF (modified_solid);
+ blended_edges : LIST [1:?] OF UNIQUE edge_curve;
+END_ENTITY;
+
+
+ENTITY edge_curve
+ SUBTYPE OF (edge, geometric_representation_item);
+ edge_geometry : curve;
+ same_sense : BOOLEAN;
+END_ENTITY;
+
+
+ENTITY edge_loop
+ SUBTYPE OF (loop, path);
+DERIVE
+ ne : INTEGER := SIZEOF(SELF\path.edge_list);
+WHERE
+ WR1 : (SELF\path.edge_list[1].edge_start) :=:
+ (SELF\path.edge_list[ne].edge_end);
+END_ENTITY;
+
+
+ENTITY effectivity
+ SUPERTYPE OF (ONEOF (serial_numbered_effectivity, dated_effectivity, lot_effectivity, time_interval_based_effectivity));
+ id : identifier;
+DERIVE
+ description : text := get_description_value(SELF);
+ name : label := get_name_value(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'NAME_ATTRIBUTE.NAMED_ITEM')) <= 1;
+ WR2 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY effectivity_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_effectivity : effectivity;
+DERIVE
+ role : object_role := get_role(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ROLE_ASSOCIATION.ITEM_WITH_ROLE')) <= 1;
+END_ENTITY;
+
+
+ENTITY effectivity_context_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_effectivity_assignment : effectivity_assignment;
+ role : effectivity_context_role;
+END_ENTITY;
+
+
+ENTITY effectivity_context_role;
+ name : label;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY effectivity_relationship;
+ name : label;
+ description : OPTIONAL text;
+ related_effectivity : effectivity;
+ relating_effectivity : effectivity;
+END_ENTITY;
+
+
+ENTITY electric_charge_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ELECTRIC_CHARGE_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY electric_charge_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) = dimensions_for_si_unit (si_unit_name.coulomb);
+END_ENTITY;
+
+
+ENTITY electric_current_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ELECTRIC_CURRENT_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY electric_current_unit
+ SUBTYPE OF (named_unit);
+WHERE
+ WR1 : (SELF\named_unit.dimensions.length_exponent = 0.0) AND (SELF\named_unit.dimensions.mass_exponent = 0.0) AND (SELF\named_unit.dimensions.time_exponent = 0.0) AND (SELF\named_unit.dimensions.electric_current_exponent = 1.0) AND (SELF\named_unit.dimensions.thermodynamic_temperature_exponent = 0.0) AND (SELF\named_unit.dimensions.amount_of_substance_exponent = 0.0) AND (SELF\named_unit.dimensions.luminous_intensity_exponent = 0.0);
+END_ENTITY;
+
+
+ENTITY electric_potential_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ELECTRIC_POTENTIAL_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY electric_potential_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) = dimensions_for_si_unit (si_unit_name.volt);
+END_ENTITY;
+
+
+ENTITY elementary_brep_shape_representation
+ SUBTYPE OF (shape_representation);
+WHERE
+ WR1 : SIZEOF (QUERY (it <* SELF.items |
+ NOT (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MANIFOLD_SOLID_BREP',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACETED_BREP',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT_3D'] *
+ TYPEOF(it)) = 1))) = 0;
+ WR2 : SIZEOF (QUERY (it <* SELF.items |
+ SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MANIFOLD_SOLID_BREP',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM'] * TYPEOF(it)) =1 )) > 0;
+ WR3 : SIZEOF (QUERY (msb <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MANIFOLD_SOLID_BREP' IN TYPEOF(it)) |
+ NOT (SIZEOF (QUERY (csh <* msb_shells(msb) |
+ NOT (SIZEOF (QUERY(fcs <* csh.cfs_faces |
+ NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_SURFACE' IN TYPEOF(fcs)))) = 0
+ ))) = 0
+ ))) = 0;
+ WR4 : SIZEOF (QUERY (msb <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MANIFOLD_SOLID_BREP' IN TYPEOF(it)) |
+ NOT (SIZEOF (QUERY (csh <* msb_shells(msb) |
+ NOT (SIZEOF (QUERY(fcs <* csh\connected_face_set.cfs_faces |
+ NOT(('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ELEMENTARY_SURFACE' IN
+ TYPEOF(fcs\face_surface.face_geometry))
+ ))) = 0
+ ))) = 0
+ ))) = 0;
+ WR5 : SIZEOF (QUERY (msb <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MANIFOLD_SOLID_BREP' IN TYPEOF(it)) |
+ NOT (SIZEOF (QUERY (csh <* msb_shells(msb) |
+ NOT (SIZEOF (QUERY(fcs <* csh\connected_face_set.cfs_faces |
+ NOT (SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* fcs.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF(bnds.bound)) |
+ NOT (SIZEOF (QUERY (oe <* elp_fbnds.bound\path.edge_list |
+ NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_CURVE' IN
+ TYPEOF(oe.edge_element)))) = 0
+ ))) = 0
+ ))) = 0
+ ))) = 0
+ ))) = 0;
+ WR6 : SIZEOF (QUERY (msb <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MANIFOLD_SOLID_BREP' IN TYPEOF(it)) |
+ NOT (SIZEOF (QUERY (csh <* msb_shells(msb) |
+ NOT (SIZEOF (QUERY(fcs <* csh\connected_face_set.cfs_faces |
+ NOT (SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* fcs.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF(bnds.bound)) |
+ NOT (SIZEOF (QUERY (oe <* elp_fbnds.bound\path.edge_list |
+ NOT (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LINE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONIC',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE'] *
+ TYPEOF(oe.edge_element\edge_curve.edge_geometry)) = 1 )
+ )) = 0
+ ))) = 0
+ ))) = 0
+ ))) = 0
+ ))) = 0;
+ WR7 : SIZEOF (QUERY (msb <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MANIFOLD_SOLID_BREP' IN TYPEOF(it)) |
+ NOT (SIZEOF (QUERY (csh <* msb_shells(msb) |
+ NOT (SIZEOF (QUERY(fcs <* csh\connected_face_set.cfs_faces |
+ NOT (SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* fcs.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF(bnds.bound)) |
+ NOT (SIZEOF (QUERY (oe <* elp_fbnds.bound\path.edge_list |
+ NOT(('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN TYPEOF(oe.edge_start))
+ AND ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN
+ TYPEOF(oe.edge_end))
+ ))) = 0
+ ))) = 0
+ ))) = 0
+ ))) = 0
+ ))) = 0;
+ WR8 : SIZEOF (QUERY (msb <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MANIFOLD_SOLID_BREP' IN TYPEOF(it)) |
+ NOT (SIZEOF (QUERY (csh <* msb_shells(msb) |
+ NOT (SIZEOF (QUERY(fcs <* csh\connected_face_set.cfs_faces |
+ NOT (SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* fcs.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF(bnds.bound)) |
+ NOT (SIZEOF (QUERY (oe <* elp_fbnds.bound\path.edge_list |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE' IN
+ TYPEOF(oe.edge_element\edge_curve.edge_geometry)) AND
+ (NOT (SIZEOF (oe\oriented_edge.edge_element\
+ edge_curve.edge_geometry\polyline.points) >= 3))
+ )) = 0
+ ))) = 0
+ ))) = 0
+ ))) = 0
+ ))) = 0;
+ WR9 : SIZEOF (QUERY (msb <* QUERY (it <* items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MANIFOLD_SOLID_BREP' IN TYPEOF(it)) |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORIENTED_CLOSED_SHELL' IN TYPEOF
+ (msb\manifold_solid_brep.outer)))
+ = 0;
+ WR10 : SIZEOF (QUERY (brv <* QUERY (it <* items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.BREP_WITH_VOIDS' IN TYPEOF(it)) |
+ NOT (SIZEOF (QUERY (csh <* brv\brep_with_voids.voids |
+ csh\oriented_closed_shell.orientation)) = 0))) = 0;
+ WR11 : SIZEOF (QUERY (mi <* QUERY (it <* items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' IN TYPEOF(it)) |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ELEMENTARY_BREP_SHAPE_REPRESENTATION' IN
+ TYPEOF(mi\mapped_item.mapping_source.
+ mapped_representation)))) = 0;
+ WR12 : SIZEOF (QUERY (msb <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MANIFOLD_SOLID_BREP' IN TYPEOF(it)) |
+ NOT (SIZEOF (QUERY (csh <* msb_shells(msb) |
+ NOT (SIZEOF (QUERY(fcs <* csh\connected_face_set.cfs_faces |
+ NOT (SIZEOF(QUERY (vlp_fbnds <* QUERY (bnds <* fcs.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_LOOP' IN TYPEOF(bnds.bound)) |
+ NOT(('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN
+ TYPEOF(vlp_fbnds\face_bound.bound\vertex_loop.loop_vertex)) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CARTESIAN_POINT' IN
+ TYPEOF(vlp_fbnds\face_bound.bound\vertex_loop.
+ loop_vertex\vertex_point.vertex_geometry))
+ ))) = 0))) = 0))) = 0))) =0;
+END_ENTITY;
+
+
+ENTITY elementary_surface
+ SUPERTYPE OF (ONEOF (plane, cylindrical_surface, conical_surface, spherical_surface, toroidal_surface))
+ SUBTYPE OF (surface);
+ position : axis2_placement_3d;
+END_ENTITY;
+
+
+ENTITY ellipse
+ SUBTYPE OF (conic);
+ semi_axis_1 : positive_length_measure;
+ semi_axis_2 : positive_length_measure;
+END_ENTITY;
+
+
+ENTITY energy_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ENERGY_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY energy_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) = dimensions_for_si_unit (si_unit_name.joule);
+END_ENTITY;
+
+
+ENTITY entity_assertion
+ SUBTYPE OF (fact_type);
+END_ENTITY;
+
+
+ENTITY enum_reference_prefix
+ SUBTYPE OF (descriptive_representation_item);
+END_ENTITY;
+
+
+ENTITY environment;
+ syntactic_representation : generic_variable;
+ semantics : variable_semantics;
+END_ENTITY;
+
+
+ENTITY evaluated_characteristic
+ SUBTYPE OF (representation, representation_relationship);
+UNIQUE
+ UR1: SELF\representation_relationship.rep_1, SELF\representation_relationship.rep_2;
+WHERE
+ WR1 : SELF\representation_relationship.rep_1 <>
+ SELF\representation_relationship.rep_2;
+END_ENTITY;
+
+
+ENTITY evaluated_degenerate_pcurve
+ SUBTYPE OF (degenerate_pcurve);
+ equivalent_point : cartesian_point;
+END_ENTITY;
+
+
+ENTITY evaluation_product_definition
+ SUBTYPE OF (product_definition);
+END_ENTITY;
+
+
+ENTITY event_occurrence;
+ id : identifier;
+ name : label;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY event_occurrence_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_event_occurrence : event_occurrence;
+ role : event_occurrence_role;
+END_ENTITY;
+
+
+ENTITY event_occurrence_relationship;
+ name : label;
+ description : OPTIONAL text;
+ relating_event : event_occurrence;
+ related_event : event_occurrence;
+END_ENTITY;
+
+
+ENTITY event_occurrence_role;
+ name : label;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY exclusive_product_concept_feature_category
+ SUBTYPE OF (product_concept_feature_category);
+END_ENTITY;
+
+
+ENTITY executed_action
+ SUBTYPE OF (action);
+END_ENTITY;
+
+
+ENTITY expanded_uncertainty
+ SUBTYPE OF (standard_uncertainty);
+ coverage_factor : REAL;
+END_ENTITY;
+
+
+ENTITY explicit_procedural_geometric_representation_item_relationship
+ SUBTYPE OF (explicit_procedural_representation_item_relationship);
+ SELF\representation_item_relationship.related_representation_item : geometric_representation_item;
+ SELF\representation_item_relationship.relating_representation_item : procedural_shape_representation_sequence;
+WHERE
+ WR1 : NOT (
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PROCEDURAL_SHAPE_REPRESENTATION_SEQUENCE'
+ IN TYPEOF(
+ SELF\representation_item_relationship.related_representation_item));
+END_ENTITY;
+
+
+ENTITY explicit_procedural_representation_item_relationship
+ SUBTYPE OF (representation_item_relationship);
+ SELF\representation_item_relationship.relating_representation_item : procedural_representation_sequence;
+WHERE
+ WR1 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PROCEDURAL_REPRESENTATION_SEQUENCE'
+ IN TYPEOF(
+ SELF\representation_item_relationship.related_representation_item));
+ WR2 : SIZEOF(QUERY(q <* using_representations(
+ SELF\representation_item_relationship.related_representation_item) |
+ item_in_context(
+ SELF\representation_item_relationship.relating_representation_item,
+ q.context_of_items))) > 0;
+END_ENTITY;
+
+
+ENTITY explicit_procedural_representation_relationship
+ SUBTYPE OF (representation_relationship);
+ SELF\representation_relationship.rep_1 : procedural_representation;
+WHERE
+ WR1 : (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PROCEDURAL_REPRESENTATION'
+ IN TYPEOF(SELF\representation_relationship.rep_2))) AND
+ (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VARIATIONAL_REPRESENTATION'
+ IN TYPEOF(SELF\representation_relationship.rep_2)));
+ WR2 : SELF\representation_relationship.rep_1.context_of_items :=:
+ SELF\representation_relationship.rep_2.context_of_items;
+END_ENTITY;
+
+
+ENTITY explicit_procedural_shape_representation_relationship
+ SUBTYPE OF (explicit_procedural_representation_relationship);
+ SELF\representation_relationship.rep_1 : procedural_shape_representation;
+ SELF\representation_relationship.rep_2 : shape_representation;
+END_ENTITY;
+
+
+ENTITY expression
+ ABSTRACT SUPERTYPE OF (ONEOF (numeric_expression, boolean_expression))
+ SUBTYPE OF (generic_expression);
+END_ENTITY;
+
+
+ENTITY expression_conversion_based_unit
+ SUBTYPE OF (context_dependent_unit, variable_semantics);
+INVERSE
+ associated_variable_environment: environment FOR semantics;
+END_ENTITY;
+
+
+ENTITY extension
+ SUBTYPE OF (derived_shape_aspect);
+WHERE
+ WR1 : SIZEOF (SELF\derived_shape_aspect.deriving_relationships)= 1;
+END_ENTITY;
+
+
+ENTITY extent
+ SUBTYPE OF (characterized_object);
+END_ENTITY;
+
+
+ENTITY external_class_library
+ SUBTYPE OF (external_source);
+END_ENTITY;
+
+
+ENTITY external_identification_assignment
+ ABSTRACT SUPERTYPE
+ SUBTYPE OF (identification_assignment);
+ source : external_source;
+END_ENTITY;
+
+
+ENTITY external_source;
+ source_id : source_item;
+DERIVE
+ description : text := get_description_value(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY external_source_relationship;
+ name : label;
+ description : OPTIONAL text;
+ relating_source : external_source;
+ related_source : external_source;
+END_ENTITY;
+
+
+ENTITY externally_defined_class
+ SUBTYPE OF (class, externally_defined_item);
+END_ENTITY;
+
+
+ENTITY externally_defined_colour
+ SUBTYPE OF (colour_specification, externally_defined_item);
+END_ENTITY;
+
+
+ENTITY externally_defined_context_dependent_unit
+ SUBTYPE OF (context_dependent_unit, externally_defined_item);
+END_ENTITY;
+
+
+ENTITY externally_defined_conversion_based_unit
+ SUBTYPE OF (conversion_based_unit, externally_defined_item);
+END_ENTITY;
+
+
+ENTITY externally_defined_currency
+ SUBTYPE OF (currency, externally_defined_context_dependent_unit);
+END_ENTITY;
+
+
+ENTITY externally_defined_curve_font
+ SUBTYPE OF (externally_defined_item);
+END_ENTITY;
+
+
+ENTITY externally_defined_dimension_definition
+ SUBTYPE OF (dimensional_size, externally_defined_item);
+WHERE
+ WR1 : (SELF\externally_defined_item.item_id = 'external size dimension') AND (SELF\externally_defined_item.source.source_id = 'external size dimension specification');
+ WR2 : 1 >= SIZEOF(QUERY ( adr <* USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.APPLIED_DOCUMENT_REFERENCE.ITEMS')| (adr.assigned_document.description = 'external size dimension specification') ));
+END_ENTITY;
+
+
+ENTITY externally_defined_general_property
+ SUBTYPE OF (general_property, externally_defined_item);
+END_ENTITY;
+
+
+ENTITY externally_defined_hatch_style
+ SUBTYPE OF (externally_defined_item, geometric_representation_item);
+END_ENTITY;
+
+
+ENTITY externally_defined_item;
+ item_id : source_item;
+ source : external_source;
+END_ENTITY;
+
+
+ENTITY externally_defined_item_relationship;
+ name : label;
+ description : OPTIONAL text;
+ relating_item : externally_defined_item;
+ related_item : externally_defined_item;
+END_ENTITY;
+
+
+ENTITY externally_defined_marker
+ SUBTYPE OF (externally_defined_symbol, pre_defined_marker);
+END_ENTITY;
+
+
+ENTITY externally_defined_picture_representation_item
+ SUBTYPE OF (picture_representation_item);
+INVERSE
+ source: applied_external_identification_assignment FOR items;
+WHERE
+ WR1 : NOT (SELF\representation_item.name IN pre_defined_picture_representation_types);
+END_ENTITY;
+
+
+ENTITY externally_defined_representation_item
+ SUBTYPE OF (representation_item, externally_defined_item);
+END_ENTITY;
+
+
+ENTITY externally_defined_string
+ SUBTYPE OF (externally_defined_representation_item);
+END_ENTITY;
+
+
+ENTITY externally_defined_symbol
+ SUBTYPE OF (externally_defined_item);
+END_ENTITY;
+
+
+ENTITY externally_defined_terminator_symbol
+ SUBTYPE OF (externally_defined_symbol);
+END_ENTITY;
+
+
+ENTITY externally_defined_text_font
+ SUBTYPE OF (externally_defined_item);
+END_ENTITY;
+
+
+ENTITY externally_defined_tile
+ SUBTYPE OF (externally_defined_item);
+END_ENTITY;
+
+
+ENTITY externally_defined_tile_style
+ SUBTYPE OF (externally_defined_item, geometric_representation_item);
+END_ENTITY;
+
+
+ENTITY extruded_area_solid
+ SUBTYPE OF (swept_area_solid);
+ extruded_direction : direction;
+ depth : positive_length_measure;
+WHERE
+ WR1 : dot_product(
+ (SELF\swept_area_solid.swept_area.basis_surface\
+ elementary_surface.position.p[3]), extruded_direction) <> 0.0;
+END_ENTITY;
+
+
+ENTITY extruded_face_solid
+ SUBTYPE OF (swept_face_solid);
+ extruded_direction : direction;
+ depth : positive_length_measure;
+WHERE
+ WR1 : dot_product(
+ (SELF\swept_face_solid.swept_face.face_geometry\
+ elementary_surface.position.p[3]), extruded_direction) <> 0.0;
+END_ENTITY;
+
+
+ENTITY extruded_face_solid_with_draft_angle
+ SUBTYPE OF (extruded_face_solid_with_trim_conditions);
+ draft_angle : plane_angle_measure;
+WHERE
+ WR1 : draft_angle <> 0;
+END_ENTITY;
+
+
+ENTITY extruded_face_solid_with_multiple_draft_angles
+ SUBTYPE OF (extruded_face_solid_with_trim_conditions);
+ drafted_edges : LIST [2:?] OF SET [1:?] OF edge_curve;
+ draft_angles : LIST [2:?] OF plane_angle_measure;
+WHERE
+ WR1 : SIZEOF(drafted_edges) = SIZEOF(draft_angles);
+ WR2 : SIZEOF(QUERY(q <* draft_angles | q = 0)) = 0;
+ WR3 : SIZEOF(QUERY(q <* drafted_edges | (SIZEOF(QUERY(r <* q | NOT
+ (SELF\swept_face_solid.swept_face IN
+ using_items(r,[])))) > 0))) = 0;
+END_ENTITY;
+
+
+ENTITY extruded_face_solid_with_trim_conditions
+ SUPERTYPE OF (ONEOF (extruded_face_solid_with_draft_angle, extruded_face_solid_with_multiple_draft_angles))
+ SUBTYPE OF (extruded_face_solid);
+ first_trim_condition : trim_condition_select;
+ second_trim_condition : trim_condition_select;
+ first_trim_intent : trim_intent;
+ second_trim_intent : trim_intent;
+ first_offset : non_negative_length_measure;
+ second_offset : non_negative_length_measure;
+WHERE
+ WR1 : NOT(('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PLANE_ANGLE_MEASURE'
+ IN TYPEOF(first_trim_condition)) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PLANE_ANGLE_MEASURE'
+ IN TYPEOF(second_trim_condition)));
+ WR2 : NOT ((('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LENGTH_MEASURE'
+ IN TYPEOF(first_trim_condition)) AND
+ ((first_trim_intent = trim_intent.offset)
+ OR (first_trim_intent = trim_intent.up_to_next))) OR
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LENGTH_MEASURE'
+ IN TYPEOF(second_trim_condition)) AND
+ ((second_trim_intent = trim_intent.offset)
+ OR (second_trim_intent = trim_intent.up_to_next))));
+ WR3 : NOT (((NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LENGTH_MEASURE'
+ IN TYPEOF(first_trim_condition))) AND
+ ((first_trim_intent = trim_intent.blind)
+ OR (first_trim_intent = trim_intent.through_all))) OR
+ ((NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LENGTH_MEASURE'
+ IN TYPEOF(second_trim_condition))) AND
+ ((second_trim_intent = trim_intent.blind)
+ OR (second_trim_intent = trim_intent.through_all))));
+ WR4 : (((first_trim_intent = trim_intent.offset)
+ AND (first_offset > 0)) XOR
+ ((first_trim_intent <> trim_intent.offset)
+ AND (first_offset = 0))) AND
+ (((second_trim_intent = trim_intent.offset)
+ AND (second_offset > 0)) XOR
+ ((second_trim_intent <> trim_intent.offset)
+ AND (second_offset = 0)));
+ WR5 : NOT((('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LENGTH_MEASURE'
+ IN TYPEOF(first_trim_condition)) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LENGTH_MEASURE'
+ IN TYPEOF(second_trim_condition))) AND
+ (first_trim_condition = second_trim_condition));
+END_ENTITY;
+
+
+ENTITY face
+ SUPERTYPE OF (ONEOF (face_surface, subface, oriented_face))
+ SUBTYPE OF (topological_representation_item);
+ bounds : SET [1:?] OF face_bound;
+WHERE
+ WR1 : NOT (mixed_loop_type_set(list_to_set(list_face_loops(SELF))));
+ WR2 : SIZEOF(QUERY(temp <* bounds | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_OUTER_BOUND' IN
+ TYPEOF(temp))) <= 1;
+END_ENTITY;
+
+
+ENTITY face_based_surface_model
+ SUBTYPE OF (geometric_representation_item);
+ fbsm_faces : SET [1:?] OF connected_face_set;
+END_ENTITY;
+
+
+ENTITY face_bound
+ SUBTYPE OF (topological_representation_item);
+ bound : loop;
+ orientation : BOOLEAN;
+END_ENTITY;
+
+
+ENTITY face_outer_bound
+ SUBTYPE OF (face_bound);
+END_ENTITY;
+
+
+ENTITY face_surface
+ SUBTYPE OF (face, geometric_representation_item);
+ face_geometry : surface;
+ same_sense : BOOLEAN;
+WHERE
+ WR1 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORIENTED_SURFACE' IN TYPEOF(face_geometry));
+END_ENTITY;
+
+
+ENTITY faceted_brep
+ SUBTYPE OF (manifold_solid_brep);
+END_ENTITY;
+
+
+ENTITY faceted_brep_shape_representation
+ SUBTYPE OF (shape_representation);
+WHERE
+ WR1 : SIZEOF (
+QUERY ( it <* items| NOT ( SIZEOF ([ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACETED_BREP', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT_3D' ] * TYPEOF (it)) = 1) )) = 0;
+ WR2 : SIZEOF (
+QUERY ( it <* items| ( SIZEOF ([ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACETED_BREP', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' ] * TYPEOF (it)) = 1) )) > 0;
+ WR3 : SIZEOF (
+QUERY ( fbrep <*
+QUERY ( it <* items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACETED_BREP' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( csh <* msb_shells(fbrep)| NOT ( SIZEOF (
+QUERY ( fcs <* csh\connected_face_set.cfs_faces| NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_SURFACE' IN TYPEOF (fcs)) AND (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PLANE' IN TYPEOF (fcs\face_surface.face_geometry)) AND ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CARTESIAN_POINT' IN TYPEOF (fcs\face_surface.face_geometry\elementary_surface.position.location)))) )) = 0) )) = 0) )) = 0;
+ WR4 : SIZEOF (
+QUERY ( fbrep <*
+QUERY ( it <* items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACETED_BREP' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( csh <* msb_shells(fbrep)| NOT ( SIZEOF (
+QUERY ( fcs <* csh\connected_face_set.cfs_faces| NOT ( SIZEOF (
+QUERY ( bnds <* fcs.bounds| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_OUTER_BOUND' IN TYPEOF (bnds)) )) = 1) )) = 0) )) = 0) )) = 0;
+ WR5 : SIZEOF (
+QUERY ( msb <*
+QUERY ( it <* items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MANIFOLD_SOLID_BREP' IN TYPEOF (it)) )| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORIENTED_CLOSED_SHELL' IN TYPEOF (msb\manifold_solid_brep.outer)) )) = 0;
+ WR6 : SIZEOF (
+QUERY ( brv <*
+QUERY ( it <* items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.BREP_WITH_VOIDS' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( csh <* brv\brep_with_voids.voids| csh\oriented_closed_shell.orientation )) = 0) )) = 0;
+ WR7 : SIZEOF (
+QUERY ( mi <*
+QUERY ( it <* items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' IN TYPEOF (it)) )| NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACETED_BREP_SHAPE_REPRESENTATION' IN TYPEOF (mi\mapped_item.mapping_source.mapped_representation)) )) = 0;
+END_ENTITY;
+
+
+ENTITY fact_type
+ SUBTYPE OF (property_definition);
+END_ENTITY;
+
+
+ENTITY fill_area_style
+ SUBTYPE OF (founded_item);
+ name : label;
+ fill_styles : SET [1:?] OF fill_style_select;
+WHERE
+ WR1 : SIZEOF(QUERY(fill_style <* SELF.fill_styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'FILL_AREA_STYLE_COLOUR' IN
+ TYPEOF(fill_style)
+ )) <= 1;
+END_ENTITY;
+
+
+ENTITY fill_area_style_colour;
+ name : label;
+ fill_colour : colour;
+END_ENTITY;
+
+
+ENTITY fill_area_style_hatching
+ SUBTYPE OF (geometric_representation_item);
+ hatch_line_appearance : curve_style;
+ start_of_next_hatch_line : one_direction_repeat_factor;
+ point_of_reference_hatch_line : cartesian_point;
+ pattern_start : cartesian_point;
+ hatch_line_angle : plane_angle_measure;
+END_ENTITY;
+
+
+ENTITY fill_area_style_tile_coloured_region
+ SUBTYPE OF (geometric_representation_item);
+ closed_curve : curve_or_annotation_curve_occurrence;
+ region_colour : colour;
+WHERE
+ WR1 : (NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE' IN TYPEOF (closed_curve))) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CIRCLE' IN TYPEOF (closed_curve)) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ELLIPSE' IN TYPEOF (closed_curve)) OR
+ ( ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_CURVE' IN TYPEOF (closed_curve))
+ AND (closed_curve\b_spline_curve.closed_curve = TRUE) ) OR
+ ( ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPOSITE_CURVE' IN TYPEOF (closed_curve))
+ AND (closed_curve\composite_curve.closed_curve = TRUE) ) OR
+ ( ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE' IN TYPEOF (closed_curve))
+ AND (closed_curve\polyline.points[LOINDEX(closed_curve\polyline.points)] =
+ closed_curve\polyline.points[HIINDEX(closed_curve\polyline.points)]) );
+END_ENTITY;
+
+
+ENTITY fill_area_style_tile_curve_with_style
+ SUBTYPE OF (geometric_representation_item);
+ styled_curve : annotation_curve_occurrence;
+END_ENTITY;
+
+
+ENTITY fill_area_style_tile_symbol_with_style
+ SUBTYPE OF (geometric_representation_item);
+ symbol : annotation_symbol_occurrence;
+END_ENTITY;
+
+
+ENTITY fill_area_style_tiles
+ SUBTYPE OF (geometric_representation_item);
+ tiling_pattern : two_direction_repeat_factor;
+ tiles : SET [1:?] OF fill_area_style_tile_shape_select;
+ tiling_scale : positive_ratio_measure;
+END_ENTITY;
+
+
+ENTITY flat_pattern_ply_representation_relationship
+ SUBTYPE OF (shape_representation_relationship);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHAPE_REPRESENTATION' IN
+ (TYPEOF (SELF\representation_relationship.rep_1) *
+ TYPEOF (SELF\representation_relationship.rep_2));
+ WR2 : SELF\representation_relationship.rep_1.
+ context_of_items\geometric_representation_context.
+ coordinate_space_dimension = 3;
+END_ENTITY;
+
+
+ENTITY flatness_tolerance
+ SUBTYPE OF (geometric_tolerance);
+WHERE
+ WR1 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'GEOMETRIC_TOLERANCE_WITH_DATUM_REFERENCE' IN TYPEOF (SELF));
+END_ENTITY;
+
+
+ENTITY force_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FORCE_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY force_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) = dimensions_for_si_unit (si_unit_name.newton);
+END_ENTITY;
+
+
+ENTITY forward_chaining_rule
+ SUBTYPE OF (rule_definition);
+END_ENTITY;
+
+
+ENTITY forward_chaining_rule_premise
+ SUBTYPE OF (property_definition, property_definition_representation, representation);
+END_ENTITY;
+
+
+ENTITY founded_item
+ SUPERTYPE OF (ONEOF (character_glyph_style_outline, character_glyph_style_stroke, curve_style, curve_style_font, curve_style_font_and_scaling, curve_style_font_pattern, fill_area_style, point_style, presentation_style_assignment, surface_side_style, surface_style_boundary, surface_style_control_grid, surface_style_fill_area, surface_style_parameter_line, surface_style_segmentation_curve, surface_style_silhouette, surface_style_usage, symbol_style, text_style));
+DERIVE
+ users : SET [0:?] OF founded_item_select := using_items(SELF,[]);
+WHERE
+ WR1 : SIZEOF(users) > 0;
+ WR2 : NOT(SELF IN users);
+END_ENTITY;
+
+
+ENTITY frequency_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FREQUENCY_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY frequency_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) = dimensions_for_si_unit (si_unit_name.hertz);
+END_ENTITY;
+
+
+ENTITY func
+ SUBTYPE OF (compound_representation_item);
+END_ENTITY;
+
+
+ENTITY functional_breakdown_context
+ SUBTYPE OF (breakdown_context);
+END_ENTITY;
+
+
+ENTITY functional_element_usage
+ SUBTYPE OF (breakdown_element_usage);
+END_ENTITY;
+
+
+ENTITY functionally_defined_transformation;
+ name : label;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY general_material_property
+ SUBTYPE OF (general_property);
+WHERE
+ WR1 : SIZEOF( QUERY( gpa <* USEDIN(SELF,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GENERAL_PROPERTY_ASSOCIATION.BASE_DEFINITION') |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MATERIAL_PROPERTY' IN TYPEOF(gpa.derived_definition)) )) = 0;
+END_ENTITY;
+
+
+ENTITY general_property;
+ id : identifier;
+ name : label;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY general_property_association;
+ name : label;
+ description : OPTIONAL text;
+ base_definition : general_property;
+ derived_definition : derived_property_select;
+WHERE
+ WR1 : SIZEOF(USEDIN(derived_definition, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'GENERAL_PROPERTY_ASSOCIATION.' + 'DERIVED_DEFINITION')) = 1;
+ WR2 : derived_definition.name = base_definition.name;
+END_ENTITY;
+
+
+ENTITY general_property_relationship;
+ name : label;
+ description : OPTIONAL text;
+ relating_property : general_property;
+ related_property : general_property;
+END_ENTITY;
+
+
+ENTITY generic_character_glyph_symbol
+ ABSTRACT SUPERTYPE
+ SUBTYPE OF (symbol_representation);
+END_ENTITY;
+
+
+ENTITY generic_expression
+ ABSTRACT SUPERTYPE OF (ONEOF (simple_generic_expression, unary_generic_expression, binary_generic_expression, multiple_arity_generic_expression));
+WHERE
+ WR1 : is_acyclic(SELF);
+END_ENTITY;
+
+
+ENTITY generic_literal
+ ABSTRACT SUPERTYPE
+ SUBTYPE OF (simple_generic_expression);
+END_ENTITY;
+
+
+ENTITY generic_variable
+ ABSTRACT SUPERTYPE
+ SUBTYPE OF (simple_generic_expression);
+INVERSE
+ interpretation: environment FOR syntactic_representation;
+END_ENTITY;
+
+
+ENTITY geometric_alignment
+ SUBTYPE OF (derived_shape_aspect);
+WHERE
+ WR1 : SIZEOF (SELF\derived_shape_aspect.deriving_relationships)> 1;
+END_ENTITY;
+
+
+ENTITY geometric_curve_set
+ SUBTYPE OF (geometric_set);
+WHERE
+ WR1 : SIZEOF(QUERY(temp <* SELF\geometric_set.elements |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE' IN TYPEOF(temp))) = 0;
+END_ENTITY;
+
+
+ENTITY geometric_intersection
+ SUBTYPE OF (derived_shape_aspect);
+WHERE
+ WR1 : SIZEOF (SELF\derived_shape_aspect.deriving_relationships)> 1;
+END_ENTITY;
+
+
+ENTITY geometric_item_specific_usage
+ SUBTYPE OF (item_identified_representation_usage);
+ SELF\item_identified_representation_usage.definition : geometric_item_specific_usage_select;
+ SELF\item_identified_representation_usage.identified_item : geometric_representation_item;
+ SELF\item_identified_representation_usage.used_representation : shape_representation;
+END_ENTITY;
+
+
+ENTITY geometric_model_element_relationship
+ SUBTYPE OF (geometric_representation_item, representation_item_relationship);
+ SELF\representation_item_relationship.related_representation_item : geometric_representation_item;
+ SELF\representation_item_relationship.relating_representation_item : geometric_representation_item;
+UNIQUE
+ UR1 : relating_representation_item, related_representation_item;
+WHERE
+ WR1 : SELF\representation_item_relationship.relating_representation_item :<>:
+ SELF\representation_item_relationship.related_representation_item;
+END_ENTITY;
+
+
+ENTITY geometric_representation_context
+ SUBTYPE OF (representation_context);
+ coordinate_space_dimension : dimension_count;
+END_ENTITY;
+
+
+ENTITY geometric_representation_item
+ SUPERTYPE OF (ONEOF (point, direction, vector, placement, cartesian_transformation_operator, curve, surface, edge_curve, face_surface, poly_loop, vertex_point, solid_model, boolean_result, sphere, right_circular_cone, right_circular_cylinder, torus, block, right_angular_wedge, half_space_solid, shell_based_surface_model, face_based_surface_model, shell_based_wireframe_model, edge_based_wireframe_model, geometric_set, camera_model, camera_model_d3_multi_clipping_intersection, camera_model_d3_multi_clipping_union, light_source))
+ SUBTYPE OF (representation_item);
+DERIVE
+ dim : dimension_count := dimension_of(SELF);
+WHERE
+ WR1 : SIZEOF (QUERY (using_rep <* using_representations (SELF) |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_REPRESENTATION_CONTEXT' IN
+ TYPEOF (using_rep.context_of_items)))) = 0;
+END_ENTITY;
+
+
+ENTITY geometric_set
+ SUBTYPE OF (geometric_representation_item);
+ elements : SET [1:?] OF geometric_set_select;
+END_ENTITY;
+
+
+ENTITY geometric_tolerance;
+ name : label;
+ description : text;
+ magnitude : measure_with_unit;
+ toleranced_shape_aspect : shape_aspect;
+WHERE
+ WR1 : ('NUMBER' IN TYPEOF
+ (magnitude\measure_with_unit.value_component)) AND
+ (magnitude\measure_with_unit.value_component >= 0.0);
+END_ENTITY;
+
+
+ENTITY geometric_tolerance_relationship;
+ name : label;
+ description : text;
+ relating_geometric_tolerance : geometric_tolerance;
+ related_geometric_tolerance : geometric_tolerance;
+END_ENTITY;
+
+
+ENTITY geometric_tolerance_with_datum_reference
+ SUBTYPE OF (geometric_tolerance);
+ datum_system : SET [1:?] OF datum_reference;
+END_ENTITY;
+
+
+ENTITY geometric_tolerance_with_defined_unit
+ SUBTYPE OF (geometric_tolerance);
+ unit_size : measure_with_unit;
+WHERE
+ WR1 : ('NUMBER' IN TYPEOF
+ (unit_size\measure_with_unit.value_component)) AND
+ (unit_size\measure_with_unit.value_component > 0.0);
+END_ENTITY;
+
+
+ENTITY geometrical_tolerance_callout
+ SUBTYPE OF (draughting_callout);
+END_ENTITY;
+
+
+ENTITY geometrically_bounded_2d_wireframe_representation
+ SUBTYPE OF (shape_representation);
+WHERE
+ WR1 : SELF.context_of_items\geometric_representation_context.
+ coordinate_space_dimension = 2;
+ WR2 : SIZEOF (QUERY (item <* SELF.items |
+ NOT (SIZEOF (TYPEOF (item) *
+['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_CURVE_SET',
+'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT_2D',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM']) = 1)
+ )) = 0;
+ WR3 : SIZEOF (QUERY (item <* SELF.items |
+ SIZEOF (TYPEOF (item) *
+['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_CURVE_SET',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM']) = 1
+ )) >= 1;
+ WR4 : SIZEOF (QUERY (mi <* QUERY (item <* SELF.items |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM'
+ IN TYPEOF (item))) |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'GEOMETRICALLY_BOUNDED_2D_WIREFRAME_REPRESENTATION'
+ IN TYPEOF
+ (mi\mapped_item.mapping_source.mapped_representation))
+ )) = 0;
+ WR5 : SIZEOF (QUERY (gcs <* QUERY (item <* SELF.items |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_CURVE_SET'
+ IN TYPEOF (item))) |
+ NOT (SIZEOF (QUERY (elem <* gcs\geometric_set.elements |
+ NOT (SIZEOF (TYPEOF (elem) *
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_CURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CIRCLE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPOSITE_CURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ELLIPSE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OFFSET_CURVE_2D',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TRIMMED_CURVE']) =
+ 1)
+ )) = 0)
+ )) = 0;
+ WR6 : SIZEOF (QUERY (gcs <* QUERY (item <* SELF.items |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_CURVE_SET'
+ IN TYPEOF (item))) |
+ NOT (SIZEOF (QUERY (crv <*
+ QUERY (elem <* gcs\geometric_set.elements |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE'
+ IN TYPEOF (elem))) |
+ NOT (valid_basis_curve_in_2d_wireframe
+ (crv))
+ )) = 0)
+ )) = 0;
+ WR7 : SIZEOF (QUERY (gcs <* QUERY (item <* SELF.items |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_CURVE_SET'
+ IN TYPEOF (item))) |
+ NOT (SIZEOF (QUERY (pnt <*
+ QUERY (elem <* gcs\geometric_set.elements |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT'
+ IN TYPEOF(elem))) |
+ NOT (SIZEOF (TYPEOF (pnt) *
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CARTESIAN_POINT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_ON_CURVE'])
+ = 1)
+ )) = 0)
+ )) = 0;
+END_ENTITY;
+
+
+ENTITY geometrically_bounded_surface_shape_representation
+ SUBTYPE OF (shape_representation);
+WHERE
+ WR1 : SIZEOF(QUERY(it <* SELF.items | NOT (SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_SET', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT_3D'] * TYPEOF(it)) = 1))) = 0;
+ WR2 : SIZEOF(QUERY(it <* SELF.items | SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_SET', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM'] * TYPEOF(it)) = 1)) > 0;
+ WR3 : SIZEOF(QUERY(mi <* QUERY(it <* SELF.items | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' IN TYPEOF(it)) | NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'GEOMETRICALLY_BOUNDED_SURFACE_SHAPE_REPRESENTATION' IN TYPEOF(mi\mapped_item.mapping_source.mapped_representation)) AND (SIZEOF(QUERY(mr_it <* mi\mapped_item.mapping_source.mapped_representation.items | ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_SET' IN TYPEOF(mr_it)))) > 0)))) = 0;
+ WR4 : SIZEOF(QUERY(gs <* QUERY(it <* SELF.items | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_SET' IN TYPEOF(it)) | NOT (SIZEOF(QUERY(pnt <* QUERY(gsel <* gs\geometric_set.elements | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT' IN TYPEOF(gsel)) | NOT (gbsf_check_point(pnt)))) = 0))) = 0;
+ WR5 : SIZEOF(QUERY(gs <* QUERY(it <* SELF.items | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_SET' IN TYPEOF(it)) | NOT (SIZEOF(QUERY(cv <* QUERY(gsel <* gs\geometric_set.elements | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE' IN TYPEOF(gsel)) | NOT (gbsf_check_curve(cv)))) = 0))) = 0;
+ WR6 : SIZEOF(QUERY(gs <* QUERY(it <* SELF.items | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_SET' IN TYPEOF(it)) | NOT (SIZEOF(QUERY(sf <* QUERY(gsel <* gs\geometric_set.elements | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE' IN TYPEOF(gsel)) | NOT (gbsf_check_surface(sf)))) = 0))) = 0;
+ WR7 : SIZEOF(QUERY(gs <* QUERY(it <* SELF.items | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_SET' IN TYPEOF(it)) | SIZEOF(QUERY(gsel <* gs\geometric_set.elements | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE' IN TYPEOF(gsel))) > 0)) > 0;
+END_ENTITY;
+
+
+ENTITY geometrically_bounded_wireframe_shape_representation
+ SUBTYPE OF (shape_representation);
+WHERE
+ WR1 : SIZEOF (
+QUERY ( it <* SELF.items| NOT ( SIZEOF ( TYPEOF (it) * [ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_CURVE_SET', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT_3D', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' ]) = 1) )) = 0;
+ WR2 : SIZEOF (
+QUERY ( it <* SELF.items| ( SIZEOF ( TYPEOF (it) * [ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_CURVE_SET', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' ]) = 1) )) >= 1;
+ WR3 : SIZEOF (
+QUERY ( gcs <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_CURVE_SET' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( crv <*
+QUERY ( elem <* gcs\geometric_set.elements| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE' IN TYPEOF (elem)) )| NOT valid_geometrically_bounded_wf_curve(crv) )) = 0) )) = 0;
+ WR4 : SIZEOF (
+QUERY ( gcs <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_CURVE_SET' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( pnts <*
+QUERY ( elem <* gcs\geometric_set.elements| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT' IN TYPEOF (elem)) )| NOT valid_geometrically_bounded_wf_point(pnts) )) = 0) )) = 0;
+ WR5 : SIZEOF (
+QUERY ( gcs <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_CURVE_SET' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( cnc <*
+QUERY ( elem <* gcs\geometric_set.elements| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONIC' IN TYPEOF (elem)) )| NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT_3D' IN TYPEOF (cnc\conic.position)) )) = 0) )) = 0;
+ WR6 : SIZEOF (
+QUERY ( gcs <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRIC_CURVE_SET' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( pline <*
+QUERY ( elem <* gcs\geometric_set.elements| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE' IN TYPEOF (elem)) )| NOT ( SIZEOF (pline\polyline.points) > 2) )) = 0) )) = 0;
+ WR7 : SIZEOF (
+QUERY ( mi <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' IN TYPEOF (it)) )| NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'GEOMETRICALLY_BOUNDED_WIREFRAME_SHAPE_REPRESENTATION' IN TYPEOF (mi\mapped_item.mapping_source.mapped_representation)) )) = 0;
+END_ENTITY;
+
+
+ENTITY global_assignment
+ SUBTYPE OF (representation_item_relationship);
+END_ENTITY;
+
+
+ENTITY global_uncertainty_assigned_context
+ SUBTYPE OF (representation_context);
+ uncertainty : SET [1:?] OF uncertainty_measure_with_unit;
+END_ENTITY;
+
+
+ENTITY global_unit_assigned_context
+ SUBTYPE OF (representation_context);
+ units : SET [1:?] OF unit;
+END_ENTITY;
+
+
+ENTITY ground_fact
+ SUBTYPE OF (atomic_formula);
+END_ENTITY;
+
+
+ENTITY group;
+ name : label;
+ description : OPTIONAL text;
+DERIVE
+ id : identifier := get_id_value(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY group_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_group : group;
+DERIVE
+ role : object_role := get_role(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ROLE_ASSOCIATION.ITEM_WITH_ROLE')) <= 1;
+END_ENTITY;
+
+
+ENTITY group_relationship;
+ name : label;
+ description : OPTIONAL text;
+ relating_group : group;
+ related_group : group;
+END_ENTITY;
+
+
+ENTITY half_space_solid
+ SUBTYPE OF (geometric_representation_item);
+ base_surface : surface;
+ agreement_flag : BOOLEAN;
+END_ENTITY;
+
+
+ENTITY hardness_representation
+ SUBTYPE OF (representation);
+WHERE
+ WR1 : ( {2<= SIZEOF ( SELF.items ) <=4} ) AND ( SIZEOF ( QUERY (
+ i <* items | ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) AND (
+ i.name IN [ 'measuring method' , 'measuring position' ] ) )
+ ) + SIZEOF ( QUERY ( i <* items | ( SIZEOF (
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'MEASURE_REPRESENTATION_ITEM' ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'VALUE_RANGE']* TYPEOF ( i ) ) =1 )
+ AND ( i.name IN ['depth' , 'hardness'] ) ) ) = SIZEOF (
+ SELF.items ) );
+ WR2 : SIZEOF ( QUERY ( i <* SELF.items | i.name =
+ 'measuring method' ) ) =1;
+ WR3 : SIZEOF ( QUERY ( i <* SELF.items | i.name ='hardness' ) )
+ =1;
+ WR4 : SIZEOF ( QUERY ( i <* SELF.items | i.name =
+ 'measuring position' ) ) <=1;
+ WR5 : SIZEOF ( QUERY ( i <* SELF.items | i.name ='depth' ) )
+ <=1;
+ WR6 : ( SIZEOF ( USEDIN ( SELF ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
+ 'USED_REPRESENTATION' ) ) =1 ) AND ( SIZEOF ( QUERY ( pdr
+ <* USEDIN ( SELF ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
+ 'USED_REPRESENTATION' ) | SIZEOF ( QUERY ( gpa <* USEDIN (
+ pdr. definition ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'GENERAL_PROPERTY_ASSOCIATION.'+
+ 'DERIVED_DEFINITION' ) | ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'GENERAL_PROPERTY' IN TYPEOF ( gpa. base_definition ) ) AND
+ ( gpa. base_definition.name ='surface_condition' ) ) ) =1 )
+ ) =1 );
+END_ENTITY;
+
+
+ENTITY hidden_element_over_riding_styled_item
+ SUBTYPE OF (context_dependent_over_riding_styled_item);
+ SELF\styled_item.item : camera_image;
+ SELF\context_dependent_over_riding_styled_item.style_context : LIST [1:1] OF presentation_view;
+INVERSE
+ container: SET [1:?] OF presentation_view FOR items;
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CAMERA_MODEL_D3_WITH_HLHSR' IN TYPEOF
+ (SELF.item\mapped_item.mapping_source.mapping_origin);
+END_ENTITY;
+
+
+ENTITY hyperbola
+ SUBTYPE OF (conic);
+ semi_axis : positive_length_measure;
+ semi_imag_axis : positive_length_measure;
+END_ENTITY;
+
+
+ENTITY id_attribute;
+ attribute_value : identifier;
+ identified_item : id_attribute_select;
+END_ENTITY;
+
+
+ENTITY identification_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_id : identifier;
+ role : identification_role;
+END_ENTITY;
+
+
+ENTITY identification_role;
+ name : label;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY illuminance_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ILLUMINANCE_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY illuminance_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) = dimensions_for_si_unit (si_unit_name.lux);
+END_ENTITY;
+
+
+ENTITY included_text_block
+ SUBTYPE OF (mapped_item);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STRUCTURED_TEXT_REPRESENTATION' IN TYPEOF(SELF\mapped_item.mapping_source.mapped_representation);
+END_ENTITY;
+
+
+ENTITY inclusion_product_concept_feature
+ SUBTYPE OF (conditional_concept_feature);
+WHERE
+ WR1 : NOT ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'PACKAGE_PRODUCT_CONCEPT_FEATURE' IN TYPEOF ( SELF ) );
+ WR2 : SIZEOF (QUERY
+ ( cfr <* USEDIN
+ ( SELF ,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'CONCEPT_FEATURE_RELATIONSHIP.RELATING_PRODUCT_CONCEPT_FEATURE' )
+ |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'CONCEPT_FEATURE_RELATIONSHIP_WITH_CONDITION' IN TYPEOF( cfr )
+ )
+ ) +
+ SIZEOF(QUERY
+ ( cfr <* USEDIN
+ (SELF , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'CONCEPT_FEATURE_RELATIONSHIP.RELATED_PRODUCT_CONCEPT_FEATURE' )
+ |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'CONCEPT_FEATURE_RELATIONSHIP_WITH_CONDITION' IN TYPEOF(cfr)
+ )
+ )= 0;
+ WR3 : SELF.condition.conditional_operator.name = 'implication';
+END_ENTITY;
+
+
+ENTITY indirectly_selected_elements
+ SUBTYPE OF (user_selected_elements);
+ indirectly_picked_items : SET [1:?] OF representation_item;
+END_ENTITY;
+
+
+ENTITY indirectly_selected_shape_elements
+ SUBTYPE OF (indirectly_selected_elements, user_selected_shape_elements);
+WHERE
+ WR1 : SIZEOF(QUERY(q <*
+ SELF\indirectly_selected_elements.indirectly_picked_items
+ | NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHAPE_REPRESENTATION_ITEM'
+ IN TYPEOF(q)))) = 0;
+END_ENTITY;
+
+
+ENTITY inductance_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.INDUCTANCE_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY inductance_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) = dimensions_for_si_unit (si_unit_name.henry);
+END_ENTITY;
+
+
+ENTITY information_right
+ SUBTYPE OF (action_method);
+END_ENTITY;
+
+
+ENTITY information_usage_right
+ SUBTYPE OF (action_method);
+END_ENTITY;
+
+
+ENTITY instance_usage_context_assignment
+ SUBTYPE OF (product_definition_context);
+ items : SET [1:?] OF instance_usage_context_select;
+END_ENTITY;
+
+
+ENTITY instanced_feature
+ SUBTYPE OF (shape_aspect, shape_feature_definition);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION' IN
+ TYPEOF(SELF\shape_aspect.of_shape.definition);
+ WR2 : SELF\shape_aspect.product_definitional;
+END_ENTITY;
+
+
+ENTITY int_literal
+ SUBTYPE OF (literal_number);
+ SELF\literal_number.the_value : INTEGER;
+END_ENTITY;
+
+
+ENTITY integer_representation_item
+ SUBTYPE OF (representation_item, int_literal);
+END_ENTITY;
+
+
+ENTITY intersection_curve
+ SUBTYPE OF (surface_curve);
+WHERE
+ WR1 : SIZEOF(SELF\surface_curve.associated_geometry) = 2;
+ WR2 : associated_surface(SELF\surface_curve.associated_geometry[1]) <>
+ associated_surface(SELF\surface_curve.associated_geometry[2]);
+END_ENTITY;
+
+
+ENTITY interval_expression
+ SUBTYPE OF (boolean_expression, multiple_arity_generic_expression);
+DERIVE
+ interval_high : generic_expression := SELF\multiple_arity_generic_expression.operands[3];
+ interval_item : generic_expression := SELF\multiple_arity_generic_expression.operands[2];
+ interval_low : generic_expression := SELF\multiple_arity_generic_expression.operands[1];
+WHERE
+ WR1 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EXPRESSION'
+ IN TYPEOF(interval_low))
+ AND ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EXPRESSION'
+ IN TYPEOF(interval_item) )
+ AND ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EXPRESSION'
+ IN TYPEOF(interval_high));
+ WR2 : (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STRING_EXPRESSION'
+ IN TYPEOF (SELF.interval_low))
+ AND ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STRING_EXPRESSION'
+ IN TYPEOF (SELF.interval_high))
+ AND ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STRING_EXPRESSION'
+ IN TYPEOF (SELF.interval_item)))
+ OR
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STRING_EXPRESSION'
+ IN TYPEOF(SELF.interval_low))
+ AND ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.NUMERIC_EXPRESSION'
+ IN TYPEOF(SELF.interval_item))
+ AND ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.NUMERIC_EXPRESSION'
+ IN TYPEOF(SELF.interval_high)));
+END_ENTITY;
+
+
+ENTITY invisibility;
+ invisible_items : SET [1:?] OF invisible_item;
+END_ENTITY;
+
+
+ENTITY iso4217_currency
+ SUBTYPE OF (currency);
+END_ENTITY;
+
+
+ENTITY item_defined_transformation;
+ name : label;
+ description : OPTIONAL text;
+ transform_item_1 : representation_item;
+ transform_item_2 : representation_item;
+END_ENTITY;
+
+
+ENTITY item_identified_representation_usage;
+ name : label;
+ description : OPTIONAL text;
+ definition : represented_definition;
+ used_representation : representation;
+ identified_item : representation_item;
+WHERE
+ WR1 : SELF.used_representation IN using_representations(SELF.identified_item);
+END_ENTITY;
+
+
+ENTITY known_source
+ SUBTYPE OF (external_source, pre_defined_item);
+END_ENTITY;
+
+
+ENTITY laid_defined_transformation
+ SUBTYPE OF (transformation_with_derived_angle);
+END_ENTITY;
+
+
+ENTITY laminate_table
+ SUPERTYPE OF (ONEOF (part_laminate_table, zone_structural_makeup))
+ SUBTYPE OF (product_definition);
+END_ENTITY;
+
+
+ENTITY language
+ SUBTYPE OF (group);
+WHERE
+ WR1 : SELF\group.name <> '';
+END_ENTITY;
+
+
+ENTITY leader_curve
+ SUBTYPE OF (annotation_curve_occurrence);
+WHERE
+ WR1 : SIZEOF(
+ QUERY(ldc <* USEDIN( SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_CALLOUT.CONTENTS')
+ | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'LEADER_DIRECTED_CALLOUT' IN TYPEOF(ldc))) >= 1;
+END_ENTITY;
+
+
+ENTITY leader_directed_callout
+ SUBTYPE OF (draughting_callout);
+WHERE
+ WR1 : SIZEOF (QUERY (l_1 <* SELF\draughting_callout.contents |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LEADER_CURVE' IN (TYPEOF(l_1)))) >= 1;
+ WR2 : SIZEOF(SELF\draughting_callout.contents) >=2;
+END_ENTITY;
+
+
+ENTITY leader_directed_dimension
+ SUBTYPE OF (leader_directed_callout);
+WHERE
+ WR1 : SIZEOF (QUERY (con <* SELF.contents |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LEADER_CURVE' IN TYPEOF (con)))=1;
+END_ENTITY;
+
+
+ENTITY leader_terminator
+ SUBTYPE OF (terminator_symbol);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LEADER_CURVE' IN TYPEOF
+ (SELF\terminator_symbol.annotated_curve);
+END_ENTITY;
+
+
+ENTITY length_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LENGTH_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY length_unit
+ SUBTYPE OF (named_unit);
+WHERE
+ WR1 : (SELF\named_unit.dimensions.length_exponent = 1.0) AND
+ (SELF\named_unit.dimensions.mass_exponent = 0.0) AND
+ (SELF\named_unit.dimensions.time_exponent = 0.0) AND
+ (SELF\named_unit.dimensions.electric_current_exponent = 0.0) AND
+ (SELF\named_unit.dimensions.thermodynamic_temperature_exponent = 0.0) AND
+ (SELF\named_unit.dimensions.amount_of_substance_exponent = 0.0) AND
+ (SELF\named_unit.dimensions.luminous_intensity_exponent = 0.0);
+END_ENTITY;
+
+
+ENTITY light_source
+ SUPERTYPE OF (ONEOF (light_source_ambient, light_source_directional, light_source_positional, light_source_spot))
+ SUBTYPE OF (geometric_representation_item);
+ light_colour : colour;
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'STYLED_ITEM.ITEM')) = 0;
+END_ENTITY;
+
+
+ENTITY light_source_ambient
+ SUBTYPE OF (light_source);
+END_ENTITY;
+
+
+ENTITY light_source_directional
+ SUBTYPE OF (light_source);
+ orientation : direction;
+END_ENTITY;
+
+
+ENTITY light_source_positional
+ SUBTYPE OF (light_source);
+ position : cartesian_point;
+ constant_attenuation : REAL;
+ distance_attenuation : REAL;
+END_ENTITY;
+
+
+ENTITY light_source_spot
+ SUBTYPE OF (light_source);
+ position : cartesian_point;
+ orientation : direction;
+ concentration_exponent : REAL;
+ constant_attenuation : REAL;
+ distance_attenuation : REAL;
+ spread_angle : positive_plane_angle_measure;
+END_ENTITY;
+
+
+ENTITY limits_and_fits;
+ form_variance : label;
+ zone_variance : label;
+ grade : label;
+ source : text;
+END_ENTITY;
+
+
+ENTITY line
+ SUBTYPE OF (curve);
+ pnt : cartesian_point;
+ dir : vector;
+WHERE
+ WR1 : dir.dim = pnt.dim;
+END_ENTITY;
+
+
+ENTITY line_profile_tolerance
+ SUBTYPE OF (geometric_tolerance);
+WHERE
+ WR1 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'GEOMETRIC_TOLERANCE_WITH_DATUM_REFERENCE' IN TYPEOF (SELF)) OR ( SIZEOF (SELF\geometric_tolerance_with_datum_reference.datum_system) <= 3);
+ WR2 : SIZEOF (
+QUERY ( sar <* USEDIN (SELF\geometric_tolerance.toleranced_shape_aspect, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT')| (sar.name IN [ 'affected plane association', 'resulting intersection curve association' ]) )) = 1;
+END_ENTITY;
+
+
+ENTITY linear_dimension
+ SUBTYPE OF (dimension_curve_directed_callout);
+END_ENTITY;
+
+
+ENTITY literal_conjunction
+ SUBTYPE OF (simple_clause);
+END_ENTITY;
+
+
+ENTITY literal_disjunction
+ SUBTYPE OF (simple_clause);
+END_ENTITY;
+
+
+ENTITY literal_number
+ ABSTRACT SUPERTYPE OF (ONEOF (int_literal, real_literal))
+ SUBTYPE OF (simple_numeric_expression, generic_literal);
+ the_value : NUMBER;
+END_ENTITY;
+
+
+ENTITY local_time;
+ hour_component : hour_in_day;
+ minute_component : OPTIONAL minute_in_hour;
+ second_component : OPTIONAL second_in_minute;
+ zone : coordinated_universal_time_offset;
+WHERE
+ WR1 : valid_time (SELF);
+END_ENTITY;
+
+
+ENTITY logical_literal
+ SUBTYPE OF (generic_literal);
+ lit_value : LOGICAL;
+END_ENTITY;
+
+
+ENTITY logical_representation_item
+ SUBTYPE OF (representation_item, logical_literal);
+END_ENTITY;
+
+
+ENTITY loop
+ SUPERTYPE OF (ONEOF (vertex_loop, edge_loop, poly_loop))
+ SUBTYPE OF (topological_representation_item);
+END_ENTITY;
+
+
+ENTITY loss_tangent_measure_with_unit
+ SUBTYPE OF (ratio_measure_with_unit);
+END_ENTITY;
+
+
+ENTITY lot_effectivity
+ SUBTYPE OF (effectivity);
+ effectivity_lot_id : identifier;
+ effectivity_lot_size : measure_with_unit;
+END_ENTITY;
+
+
+ENTITY luminous_flux_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LUMINOUS_FLUX_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY luminous_flux_unit
+ SUBTYPE OF (named_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) = dimensions_for_si_unit (si_unit_name.lumen);
+END_ENTITY;
+
+
+ENTITY luminous_intensity_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LUMINOUS_INTENSITY_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY luminous_intensity_unit
+ SUBTYPE OF (named_unit);
+WHERE
+ WR1 : (SELF\named_unit.dimensions.length_exponent = 0.0) AND (SELF\named_unit.dimensions.mass_exponent = 0.0) AND (SELF\named_unit.dimensions.time_exponent = 0.0) AND (SELF\named_unit.dimensions.electric_current_exponent = 0.0) AND (SELF\named_unit.dimensions.thermodynamic_temperature_exponent = 0.0) AND (SELF\named_unit.dimensions.amount_of_substance_exponent = 0.0) AND (SELF\named_unit.dimensions.luminous_intensity_exponent = 1.0);
+END_ENTITY;
+
+
+ENTITY magnetic_flux_density_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAGNETIC_FLUX_DENSITY_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY magnetic_flux_density_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) = dimensions_for_si_unit (si_unit_name.tesla);
+END_ENTITY;
+
+
+ENTITY magnetic_flux_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAGNETIC_FLUX_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY magnetic_flux_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) = dimensions_for_si_unit (si_unit_name.weber);
+END_ENTITY;
+
+
+ENTITY make_from_usage_option
+ SUBTYPE OF (product_definition_usage);
+ ranking : INTEGER;
+ ranking_rationale : text;
+ quantity : measure_with_unit;
+WHERE
+ WR1 : (NOT ('NUMBER' IN TYPEOF(quantity.value_component)))
+ OR (quantity.value_component > 0);
+END_ENTITY;
+
+
+ENTITY manifold_solid_brep
+ SUBTYPE OF (solid_model);
+ outer : closed_shell;
+END_ENTITY;
+
+
+ENTITY manifold_subsurface_shape_representation
+ SUBTYPE OF (shape_representation);
+WHERE
+ WR1 : SIZEOF (QUERY (it <* SELF.items |
+ NOT (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONNECTED_FACE_SUB_SET',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT_3D'] *
+ TYPEOF(it)) = 1))) = 0;
+ WR2 : SIZEOF (QUERY (it <* SELF.items |
+ SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONNECTED_FACE_SUB_SET',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM'] * TYPEOF(it)) =1 )) > 0;
+ WR3 : SIZEOF (QUERY (mi <* QUERY (it <* items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' IN TYPEOF(it)) |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MANIFOLD_SUBSURFACE_SHAPE_REPRESENTATION' IN
+ TYPEOF(mi\mapped_item.mapping_source.
+ mapped_representation)))) = 0;
+ WR4 : SIZEOF (QUERY (cfss <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONNECTED_FACE_SUB_SET' IN TYPEOF(it)) |
+ NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OPEN_SHELL' IN TYPEOF(cfss)))) = 0;
+ WR5 : SIZEOF (QUERY (cfss <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONNECTED_FACE_SUB_SET' IN TYPEOF(it)) |
+ NOT( (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONNECTED_FACE_SUB_SET' IN
+ TYPEOF(cfss\connected_face_sub_set.parent_face_set))AND
+ (SIZEOF(QUERY(fac <* cfss\connected_face_sub_set.parent_face_set\connected_face_set.cfs_faces | NOT
+ advanced_face_properties(fac))) = 0)) OR
+ (SIZEOF(QUERY(fac <* cfss\connected_face_sub_set.parent_face_set\connected_face_set.cfs_faces | NOT
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF(fac)))) = 0)
+ ))) = 0;
+ WR6 : SIZEOF (QUERY (cfss <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONNECTED_FACE_SUB_SET' IN TYPEOF(it)) |
+ ( SIZEOF (QUERY (fac <* cfss\connected_face_set.cfs_faces | NOT
+ advanced_face_properties(fac))) = 0))) = 0;
+ WR7 : SIZEOF (QUERY (cfss <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONNECTED_FACE_SUB_SET' IN TYPEOF(it)) |
+ NOT (SIZEOF (QUERY(fcs <* cfss\connected_face_set.cfs_faces |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SUBFACE' IN TYPEOF(fcs)) AND
+ NOT (SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* fcs.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF(bnds.bound)) |
+ NOT (SIZEOF (QUERY (oe <* elp_fbnds.bound\path.edge_list |
+ NOT(('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_CURVE' IN
+ TYPEOF(oe.edge_element)) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SUBEDGE' IN
+ TYPEOF(oe.edge_element)) ))) = 0
+ ))) = 0
+ ))) = 0
+ ))) = 0;
+ WR8 : SIZEOF (QUERY (cfss <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONNECTED_FACE_SUB_SET' IN TYPEOF(it)) |
+ NOT (SIZEOF (QUERY(fcs <* cfss\connected_face_set.cfs_faces |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SUBFACE' IN TYPEOF(fcs)) AND
+ NOT (SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* fcs.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF(bnds.bound)) |
+ NOT (SIZEOF (QUERY (oe <* elp_fbnds.bound\path.edge_list |
+ NOT(('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN TYPEOF(oe.edge_start))
+ AND ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN
+ TYPEOF(oe.edge_end))
+ ))) = 0
+ ))) = 0
+ ))) = 0
+ ))) = 0;
+ WR9 : SIZEOF (QUERY (cfss <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONNECTED_FACE_SUB_SET' IN TYPEOF(it)) |
+ NOT (SIZEOF (QUERY(fcs <* cfss\connected_face_set.cfs_faces |
+ ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SUBFACE' IN TYPEOF(fcs)) AND
+ ( NOT (SIZEOF(QUERY (bnds <* fcs.bounds |
+ NOT (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_LOOP'] *
+ TYPEOF(bnds.bound)) = 1 )
+ )) = 0)
+ ))) = 0
+ ))) = 0;
+ WR10 : SIZEOF (QUERY (cfss <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONNECTED_FACE_SUB_SET' IN TYPEOF(it)) |
+ NOT (SIZEOF (QUERY(fcs <* cfss\connected_face_set.cfs_faces |
+ ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SUBFACE' IN TYPEOF(fcs)) AND
+ ( NOT (SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* fcs.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF(bnds.bound)) |
+ NOT (SIZEOF (QUERY (oe <* elp_fbnds.bound\path.edge_list |
+ NOT (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LINE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONIC',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_CURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_CURVE' ] *
+ TYPEOF(oe.edge_element\edge_curve.edge_geometry)) = 1 )
+ )) = 0
+ ))) = 0
+ )))) = 0
+ ))) = 0;
+ WR11 : SIZEOF (QUERY (cfss <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONNECTED_FACE_SUB_SET' IN TYPEOF(it)) |
+ NOT (SIZEOF (QUERY(fcs <* cfss\connected_face_set.cfs_faces |
+ ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SUBFACE' IN TYPEOF(fcs)) AND
+ (NOT (SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* fcs.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF(bnds.bound)) |
+ NOT (SIZEOF (QUERY (oe <* elp_fbnds.bound\path.edge_list |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_CURVE' IN
+ TYPEOF(oe.edge_element\edge_curve.edge_geometry)) AND
+ (NOT ((SIZEOF (QUERY (sc_ag <*
+ oe.edge_element\edge_curve.edge_geometry\
+ surface_curve.associated_geometry |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE' IN
+ TYPEOF(sc_ag)))) = 0)))
+ )) = 0
+ ))) = 0
+ )))) = 0
+ ))) = 0;
+ WR12 : SIZEOF (QUERY (cfss <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONNECTED_FACE_SUB_SET' IN TYPEOF(it)) |
+ NOT (SIZEOF (QUERY(fcs <* cfss\connected_face_set.cfs_faces |
+ ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SUBFACE' IN TYPEOF(fcs)) AND
+ (NOT (SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* fcs.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF(bnds.bound)) |
+ NOT (SIZEOF (QUERY (oe <* elp_fbnds.bound\path.edge_list |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE' IN
+ TYPEOF(oe.edge_element\edge_curve.edge_geometry)) AND
+ (NOT (SIZEOF (oe\oriented_edge.edge_element\
+ edge_curve.edge_geometry\polyline.points) >= 3))
+ )) = 0
+ ))) = 0
+ )))) = 0
+ ))) = 0;
+END_ENTITY;
+
+
+ENTITY manifold_surface_shape_representation
+ SUBTYPE OF (shape_representation);
+WHERE
+ WR1 : SIZEOF (QUERY (it <* SELF.items |
+ NOT (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_SURFACE_MODEL',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT_3D'] * TYPEOF (it)) = 1))) = 0;
+ WR2 : SIZEOF (QUERY (it <* SELF.items |
+ SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_SURFACE_MODEL',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM'] * TYPEOF (it)) = 1)) > 0;
+ WR3 : SIZEOF (QUERY (mi <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' IN TYPEOF (it)) |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MANIFOLD_SURFACE_SHAPE_REPRESENTATION'
+ IN TYPEOF (mi\mapped_item.mapping_source.mapped_representation))
+ AND
+ (SIZEOF(QUERY (mr_it <*
+ mi\mapped_item.mapping_source.mapped_representation.items |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_SURFACE_MODEL'
+ IN TYPEOF (mr_it)))) > 0 )))) = 0;
+ WR4 : SIZEOF (QUERY (sbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (sh <*
+ sbsm\shell_based_surface_model.sbsm_boundary |
+ NOT (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OPEN_SHELL',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORIENTED_CLOSED_SHELL',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CLOSED_SHELL']
+ * TYPEOF (sh)) = 1))) = 0))) = 0;
+ WR5 : SIZEOF (QUERY (sbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ sbsm\shell_based_surface_model.sbsm_boundary |
+ NOT (SIZEOF (QUERY (fa <* cfs\connected_face_set.cfs_faces |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_SURFACE' IN TYPEOF (fa)) )) = 0)))
+ = 0))) = 0;
+ WR6 : SIZEOF (QUERY (sbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ sbsm\shell_based_surface_model.sbsm_boundary |
+ NOT (SIZEOF (QUERY (fa <* cfs\connected_face_set.cfs_faces |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF (fa))
+ OR
+ (msf_surface_check(fa\face_surface.face_geometry))))) = 0)))
+ = 0))) = 0;
+ WR7 : SIZEOF (QUERY (sbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ sbsm\shell_based_surface_model.sbsm_boundary |
+ NOT (SIZEOF (QUERY (fa <* cfs\connected_face_set.cfs_faces |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF (fa))
+ OR
+ (SIZEOF (QUERY (bnds <* fa.bounds |
+ NOT (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_LOOP']
+ * TYPEOF (bnds.bound)) = 1))) = 0)))) = 0))) = 0))) = 0;
+ WR8 : SIZEOF (QUERY (sbsm <* QUERY (it <* SELF.items|
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ sbsm\shell_based_surface_model.sbsm_boundary |
+ NOT (SIZEOF (QUERY (fa <* cfs\connected_face_set.cfs_faces |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF (fa))
+ OR
+ (SIZEOF (QUERY (elp_fbnds <* QUERY (bnds <* fa.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (bnds.bound)) |
+ NOT (SIZEOF (QUERY (oe <* elp_fbnds\path.edge_list |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_CURVE' IN TYPEOF
+ (oe.edge_element)))) = 0))) = 0)))) = 0))) = 0))) = 0;
+ WR9 : SIZEOF (QUERY (sbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ sbsm\shell_based_surface_model.sbsm_boundary |
+ NOT (SIZEOF (QUERY (fa <* cfs\connected_face_set.cfs_faces |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF (fa))
+ OR
+ (SIZEOF (QUERY (elp_fbnds <* QUERY (bnds <* fa.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (bnds.bound)) |
+ NOT (SIZEOF (QUERY (oe_cv <* QUERY (oe <*
+ elp_fbnds\path.edge_list |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_CURVE' IN TYPEOF (oe.edge_element)) |
+ NOT (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_CURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONIC',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_REPLICA',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LINE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OFFSET_CURVE_3D',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_CURVE'] *
+ TYPEOF (oe_cv.edge_element\edge_curve.edge_geometry))
+ = 1))) = 0))) = 0)))) = 0))) = 0))) = 0;
+ WR10 : SIZEOF (QUERY (sbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ sbsm\shell_based_surface_model.sbsm_boundary |
+ NOT (SIZEOF (QUERY (fa <* cfs\connected_face_set.cfs_faces |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF (fa))
+ OR
+ (SIZEOF (QUERY (elp_fbnds <* QUERY (bnds <* fa.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (bnds.bound)) |
+ NOT (SIZEOF (QUERY (oe <* elp_fbnds\path.edge_list |
+ NOT (msf_curve_check (oe.edge_element\edge_curve.edge_geometry))))
+ = 0))) = 0)))) = 0))) = 0))) = 0;
+ WR11 : SIZEOF (QUERY(sbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ sbsm\shell_based_surface_model.sbsm_boundary |
+ NOT (SIZEOF (QUERY (fa <* cfs\connected_face_set.cfs_faces |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF (fa))
+ OR
+ (SIZEOF (QUERY (elp_fbnds <* QUERY (bnds <* fa.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (bnds.bound)) |
+ NOT (SIZEOF (QUERY (oe <* elp_fbnds\path.edge_list|
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN TYPEOF
+ (oe.edge_element.edge_start))
+ AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN
+ TYPEOF (oe.edge_element.edge_end)))))
+ = 0))) = 0)))) = 0))) = 0))) = 0;
+ WR12 : SIZEOF (QUERY (sbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ sbsm\shell_based_surface_model.sbsm_boundary |
+ NOT (SIZEOF (QUERY (fa <* cfs\connected_face_set.cfs_faces |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF (fa))
+ OR
+ (SIZEOF (QUERY (elp_fbnds <* QUERY (bnds <* fa.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (bnds.bound)) |
+ NOT (SIZEOF (QUERY (oe <* elp_fbnds\path.edge_list |
+ NOT ((SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CARTESIAN_POINT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DEGENERATE_PCURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_ON_CURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_ON_SURFACE'] * TYPEOF
+ (oe.edge_element.edge_start\vertex_point.vertex_geometry)) = 1)
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CARTESIAN_POINT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DEGENERATE_PCURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_ON_CURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_ON_SURFACE'] * TYPEOF
+ (oe.edge_element.edge_end\vertex_point.vertex_geometry)) = 1
+ )))) = 0))) = 0)))) = 0))) = 0))) = 0;
+ WR13 : SIZEOF (QUERY (sbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ sbsm\shell_based_surface_model.sbsm_boundary |
+ NOT (SIZEOF (QUERY (fa <* cfs\connected_face_set.cfs_faces |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF (fa))
+ OR
+ (SIZEOF (QUERY (vlp_fbnds <* QUERY (bnds <* fa.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_LOOP' IN TYPEOF (bnds.bound)) |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN TYPEOF
+ (vlp_fbnds\vertex_loop.loop_vertex)))) = 0)))) = 0)))
+ = 0))) = 0;
+ WR14 : SIZEOF (QUERY (sbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ sbsm\shell_based_surface_model.sbsm_boundary |
+ NOT (SIZEOF (QUERY (fa <* cfs\connected_face_set.cfs_faces |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF (fa))
+ OR
+ (SIZEOF (QUERY (vlp_fbnds <* QUERY (bnds <* fa.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_LOOP' IN TYPEOF (bnds.bound)) |
+ NOT (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CARTESIAN_POINT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DEGENERATE_PCURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_ON_CURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_ON_SURFACE'] * TYPEOF
+ (vlp_fbnds\vertex_loop.loop_vertex\vertex_point.vertex_geometry))
+ = 1))) = 0)))) = 0))) = 0))) = 0;
+END_ENTITY;
+
+
+ENTITY mapped_item
+ SUBTYPE OF (representation_item);
+ mapping_source : representation_map;
+ mapping_target : representation_item;
+WHERE
+ WR1 : acyclic_mapped_representation(SELF);
+END_ENTITY;
+
+
+ENTITY mass_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MASS_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY mass_unit
+ SUBTYPE OF (named_unit);
+WHERE
+ WR1 : (SELF\named_unit.dimensions.length_exponent = 0.0) AND (SELF\named_unit.dimensions.mass_exponent = 1.0) AND (SELF\named_unit.dimensions.time_exponent = 0.0) AND (SELF\named_unit.dimensions.electric_current_exponent = 0.0) AND (SELF\named_unit.dimensions.thermodynamic_temperature_exponent = 0.0) AND (SELF\named_unit.dimensions.amount_of_substance_exponent = 0.0) AND (SELF\named_unit.dimensions.luminous_intensity_exponent = 0.0);
+END_ENTITY;
+
+
+ENTITY material_designation;
+ name : label;
+ definitions : SET [1:?] OF characterized_definition;
+END_ENTITY;
+
+
+ENTITY material_designation_characterization;
+ name : label;
+ description : text;
+ designation : material_designation;
+ property : characterized_material_property;
+END_ENTITY;
+
+
+ENTITY material_property
+ SUBTYPE OF (property_definition);
+UNIQUE
+ UR1: SELF\property_definition.name, SELF\property_definition.definition;
+WHERE
+ WR1 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CHARACTERIZED_OBJECT' IN
+ TYPEOF(SELF\property_definition.definition)) OR
+ (SIZEOF(bag_to_set(USEDIN(SELF ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')) -
+ QUERY(temp <* bag_to_set(USEDIN(SELF ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')) |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'MATERIAL_PROPERTY_REPRESENTATION' IN
+ TYPEOF(temp)))) = 0);
+END_ENTITY;
+
+
+ENTITY material_property_representation
+ SUBTYPE OF (property_definition_representation);
+ dependent_environment : data_environment;
+END_ENTITY;
+
+
+ENTITY measure_qualification;
+ name : label;
+ description : text;
+ qualified_measure : measure_with_unit;
+ qualifiers : SET [1:?] OF value_qualifier;
+WHERE
+ WR1 : SIZEOF(QUERY(temp <* qualifiers |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRECISION_QUALIFIER'
+ IN TYPEOF(temp))) < 2;
+ WR2 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.REPRESENTATION_ITEM'
+ IN TYPEOF(SELF\measure_qualification.qualified_measure));
+END_ENTITY;
+
+
+ENTITY measure_representation_item
+ SUBTYPE OF (representation_item, measure_with_unit);
+END_ENTITY;
+
+
+ENTITY measure_with_unit
+ SUPERTYPE OF (ONEOF (length_measure_with_unit, mass_measure_with_unit, time_measure_with_unit, electric_current_measure_with_unit, thermodynamic_temperature_measure_with_unit, celsius_temperature_measure_with_unit, amount_of_substance_measure_with_unit, luminous_intensity_measure_with_unit, plane_angle_measure_with_unit, solid_angle_measure_with_unit, area_measure_with_unit, volume_measure_with_unit, ratio_measure_with_unit, acceleration_measure_with_unit, capacitance_measure_with_unit, electric_charge_measure_with_unit, conductance_measure_with_unit, electric_potential_measure_with_unit, energy_measure_with_unit, magnetic_flux_density_measure_with_unit, force_measure_with_unit, frequency_measure_with_unit, illuminance_measure_with_unit, inductance_measure_with_unit, luminous_flux_measure_with_unit, magnetic_flux_measure_with_unit, power_measure_with_unit, pressure_measure_with_unit, resistance_measure_with_unit, velocity_measure_with_unit, absorbed_dose_measure_with_unit, radioactivity_measure_with_unit, dose_equivalent_measure_with_unit));
+ value_component : measure_value;
+ unit_component : unit;
+WHERE
+ WR1 : valid_units(SELF);
+END_ENTITY;
+
+
+ENTITY mechanical_context
+ SUBTYPE OF (product_context);
+WHERE
+ WR1 : SELF.discipline_type = 'mechanical';
+END_ENTITY;
+
+
+ENTITY mechanical_design_and_draughting_relationship
+ SUBTYPE OF (definitional_representation_relationship_with_same_context);
+ SELF\representation_relationship.rep_1 : mechanical_design_and_draughting_relationship_select;
+ SELF\representation_relationship.rep_2 : mechanical_design_and_draughting_relationship_select;
+WHERE
+ WR1 : NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'DRAUGHTING_MODEL' IN TYPEOF(rep_2)) OR
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'DRAUGHTING_MODEL' IN TYPEOF(rep_1)) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'SHAPE_REPRESENTATION' IN TYPEOF(rep_1)));
+ WR2 : NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'MECHANICAL_DESIGN_GEOMETRIC_PRESENTATION_REPRESENTATION' IN TYPEOF(rep_2)) OR
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'MECHANICAL_DESIGN_GEOMETRIC_PRESENTATION_REPRESENTATION' IN TYPEOF(rep_1)) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'SHAPE_REPRESENTATION' IN TYPEOF(rep_1)));
+ WR3 : NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'MECHANICAL_DESIGN_SHADED_PRESENTATION_REPRESENTATION' IN TYPEOF(rep_2)) OR
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'MECHANICAL_DESIGN_SHADED_PRESENTATION_REPRESENTATION' IN TYPEOF(rep_1)) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'SHAPE_REPRESENTATION' IN TYPEOF(rep_1)));
+END_ENTITY;
+
+
+ENTITY mechanical_design_geometric_presentation_area
+ SUBTYPE OF (presentation_area);
+ SELF\representation.items : SET [1:?] OF mechanical_design_geometric_presentation_area_items;
+WHERE
+ WR1 : SIZEOF(QUERY(it1 <* SELF.items |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM'
+ IN TYPEOF(it1))
+ OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRESENTATION_VIEW'
+ IN TYPEOF
+ (it1\mapped_item.mapping_source.mapped_representation)))) = 0;
+ WR2 : SIZEOF(QUERY(pv <* QUERY(mi1 <* QUERY(it1 <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM'
+ IN TYPEOF(it1)) |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRESENTATION_VIEW'
+ IN TYPEOF
+ (mi1\mapped_item.mapping_source.mapped_representation)) |
+ -- search in all presentation_views for axis2_placements and
+ -- mapped_items and for the subtype of mapped_item
+ -- camera_image_3d_with_scale; the latter shall reference
+ -- a mechanical_design_geometric_presentation_representation;
+ -- the supertype mapped_item shall reference presentation_view.
+ NOT (SIZEOF(QUERY(it2 <* pv\mapped_item.mapping_source.
+ mapped_representation\representation.items |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT'
+ IN TYPEOF(it2))
+ OR
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM'
+ IN TYPEOF(it2)) AND NOT
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'CAMERA_IMAGE_3D_WITH_SCALE' IN TYPEOF(it2))) AND NOT (
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRESENTATION_VIEW'
+ IN TYPEOF
+ (it2\mapped_item.mapping_source.mapped_representation)))
+ OR
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'CAMERA_IMAGE_3D_WITH_SCALE' IN TYPEOF(it2))
+ AND NOT (
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'MECHANICAL_DESIGN_GEOMETRIC_PRESENTATION_REPRESENTATION'
+ IN TYPEOF (it2\mapped_item.mapping_source.mapped_representation) ))
+ ))) = 0))) = 0;
+ WR3 : (SIZEOF(QUERY(ps <* USEDIN (SELF,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRESENTATION_SIZE.UNIT') | ((ps.size\planar_extent.size_in_x <= 0)
+ OR
+ (ps.size\planar_extent.size_in_y <= 0)))) = 0)
+ AND
+ (SIZEOF(QUERY(ais <* USEDIN (SELF,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'AREA_IN_SET.AREA') |
+ (SIZEOF(QUERY(ps <* USEDIN (ais,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRESENTATION_SIZE.UNIT') |
+ ((ps.size\planar_extent.size_in_x <= 0)
+ OR
+ (ps.size\planar_extent.size_in_y <= 0)))) > 0))) = 0);
+ WR4 : (SIZEOF(QUERY(ps <* USEDIN (SELF,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRESENTATION_SIZE.UNIT') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'AXIS2_PLACEMENT_2D' IN TYPEOF (ps.size.placement)))) = 1)
+ AND
+ (SIZEOF(QUERY(ps <* USEDIN (SELF,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRESENTATION_SIZE.UNIT') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'AXIS2_PLACEMENT_3D' IN TYPEOF (ps.size.placement)))) = 0)
+ OR
+ ((SIZEOF(QUERY(ais <* USEDIN (SELF,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'AREA_IN_SET.AREA') |
+ (SIZEOF(QUERY(ps <* USEDIN (ais,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRESENTATION_SIZE.UNIT') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'AXIS2_PLACEMENT_2D' IN TYPEOF (ps.size.placement)))) = 1))) = 1)
+ AND
+ (SIZEOF(QUERY(ais <* USEDIN (SELF,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'AREA_IN_SET.AREA') |
+ (SIZEOF(QUERY(ps <* USEDIN (ais,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRESENTATION_SIZE.UNIT') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'AXIS2_PLACEMENT_3D' IN TYPEOF (ps.size.placement)))) = 0))) = 1));
+END_ENTITY;
+
+
+ENTITY mechanical_design_geometric_presentation_representation
+ SUBTYPE OF (representation);
+ SELF\representation.items : SET [1:?] OF mechanical_design_geometric_presentation_representation_items;
+WHERE
+ WR1 : SIZEOF(QUERY(mi <* QUERY(it <* SELF.items |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM'
+ IN TYPEOF(it))) | NOT (SIZEOF(
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'SHAPE_REPRESENTATION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'MECHANICAL_DESIGN_GEOMETRIC_PRESENTATION_REPRESENTATION']
+ * TYPEOF(mi\mapped_item.mapping_source.mapped_representation))
+ = 1))) = 0;
+ WR2 : SIZEOF(QUERY(smi <* QUERY(si <* QUERY(it <* SELF.items |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF(it))) |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM'
+ IN TYPEOF(si\styled_item.item))) | NOT (
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'SHAPE_REPRESENTATION' IN TYPEOF (smi\styled_item.
+ item\mapped_item.mapping_source.mapped_representation))) )) = 0;
+ WR3 : SIZEOF(QUERY(si <* QUERY(it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF(it)) | NOT (SIZEOF(QUERY(psa <* si\styled_item.styles |
+ NOT (SIZEOF(QUERY(pss <* psa.styles | NOT (SIZEOF(
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_STYLE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE']
+ * TYPEOF(pss)) = 1))) = 0))) = 0))) = 0;
+ WR4 : SIZEOF(QUERY(si <* QUERY(it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF(it)) |
+ NOT (SIZEOF(QUERY(psbc <* QUERY(psa <* si\styled_item.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRESENTATION_STYLE_BY_CONTEXT' IN TYPEOF(psa)) | NOT (SIZEOF(
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'REPRESENTATION_ITEM',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.REPRESENTATION']
+ * TYPEOF(psbc\presentation_style_by_context.style_context))
+ = 1))) = 0))) = 0;
+ WR5 : SIZEOF(QUERY(si <* QUERY(it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF(it)) | NOT (SIZEOF(QUERY(psa <* si\styled_item.styles |
+ NOT (SIZEOF(QUERY(ps <* QUERY(pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_STYLE'
+ IN TYPEOF(pss)) | NOT
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'POSITIVE_LENGTH_MEASURE' IN TYPEOF (ps\point_style.marker_size))
+ AND (SIZEOF(
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_PRE_DEFINED_COLOUR']
+ * TYPEOF(ps\point_style.marker_colour))
+ = 1)))) = 0))) = 0))) = 0;
+ WR6 : SIZEOF(QUERY(si <* QUERY(it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF(it)) | NOT (SIZEOF(QUERY(psa <* si\styled_item.styles |
+ NOT (SIZEOF(QUERY(cs <* QUERY(pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE'
+ IN TYPEOF(pss)) | NOT((SIZEOF(
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_PRE_DEFINED_COLOUR']
+ * TYPEOF(cs\curve_style.curve_colour)) = 1)
+ AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'POSITIVE_LENGTH_MEASURE' IN TYPEOF (cs\curve_style.curve_width))
+ AND (SIZEOF(
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE_FONT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_PRE_DEFINED_CURVE_FONT']
+ * TYPEOF(cs\curve_style.curve_font)) = 1)))) = 0))) = 0))) = 0;
+ WR7 : SIZEOF(QUERY(si <* QUERY(it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF(it)) | NOT (SIZEOF(QUERY(psa <* si\styled_item.styles |
+ NOT (SIZEOF(QUERY(ssu <* QUERY(pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE'
+ IN TYPEOF(pss)) |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'SURFACE_SIDE_STYLE' IN TYPEOF
+ (ssu\surface_style_usage.style)))) = 0))) = 0))) = 0;
+ WR8 : SIZEOF(QUERY(si <* QUERY(it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF(it)) | NOT (SIZEOF(QUERY(psa <* si\styled_item.styles |
+ NOT (SIZEOF(QUERY(ssu <* QUERY(pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE'
+ IN TYPEOF(pss)) | NOT (SIZEOF(QUERY(sses <*
+ ssu\surface_style_usage.style\surface_side_style.styles |
+ NOT (SIZEOF(
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'SURFACE_STYLE_PARAMETER_LINE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'SURFACE_STYLE_CONTROL_GRID',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'SURFACE_STYLE_SILHOUETTE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'SURFACE_STYLE_SEGMENTATION_CURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'SURFACE_STYLE_FILL_AREA',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'SURFACE_STYLE_BOUNDARY']
+ * TYPEOF(sses)) = 1))) = 0))) = 0))) = 0))) = 0;
+ WR9 : SIZEOF(QUERY(si <* QUERY(it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF(it)) | NOT (SIZEOF(QUERY(psa <* si\styled_item.styles |
+ NOT (SIZEOF(QUERY(ssu <* QUERY(pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE'
+ IN TYPEOF(pss)) | NOT (SIZEOF(QUERY(sspl <* QUERY(sses <*
+ ssu\surface_style_usage.style\surface_side_style.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'SURFACE_STYLE_PARAMETER_LINE' IN TYPEOF(sses)) |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE'
+ IN TYPEOF
+ (sspl\surface_style_parameter_line.style_of_parameter_lines))
+ AND (SIZEOF(
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_PRE_DEFINED_COLOUR']
+ * TYPEOF(sspl\surface_style_parameter_line.
+ style_of_parameter_lines\curve_style.curve_colour)) = 1)
+ AND (
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'POSITIVE_LENGTH_MEASURE' IN TYPEOF
+ (sspl\surface_style_parameter_line.
+ style_of_parameter_lines\curve_style.curve_width))
+ AND (SIZEOF(
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE_FONT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_CURVE_FONT']
+ * TYPEOF(sspl\surface_style_parameter_line.
+ style_of_parameter_lines\curve_style.curve_font)) = 1))))
+ = 0))) = 0))) = 0))) = 0;
+ WR10 : SIZEOF(QUERY(si <* QUERY(it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF(it)) | NOT (SIZEOF(QUERY(psa <* si\styled_item.styles |
+ NOT (SIZEOF(QUERY(ssu <* QUERY(pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE'
+ IN TYPEOF(pss)) | NOT (SIZEOF(QUERY(sscg <* QUERY(sses <*
+ ssu\surface_style_usage.style\surface_side_style.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'SURFACE_STYLE_CONTROL_GRID' IN TYPEOF(sses)) |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE'
+ IN TYPEOF (sscg\surface_style_control_grid.style_of_control_grid))
+ AND (SIZEOF(
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_PRE_DEFINED_COLOUR']
+ * TYPEOF(sscg\surface_style_control_grid.
+ style_of_control_grid\curve_style.curve_colour)) = 1)
+ AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'POSITIVE_LENGTH_MEASURE' IN TYPEOF
+ (sscg\surface_style_control_grid.
+ style_of_control_grid\curve_style.curve_width))
+ AND (SIZEOF(
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE_FONT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_PRE_DEFINED_CURVE_FONT']
+ * TYPEOF(sscg\surface_style_control_grid.
+ style_of_control_grid\curve_style.curve_font)) = 1))))
+ = 0))) = 0))) = 0))) = 0;
+ WR11 : SIZEOF(QUERY(si <* QUERY(it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF(it)) |
+ NOT (SIZEOF(QUERY(psa <* si\styled_item.styles |
+ NOT (SIZEOF(QUERY(ssu <* QUERY(pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE'
+ IN TYPEOF(pss)) | NOT (SIZEOF(QUERY(sssh <* QUERY(sses <*
+ ssu\surface_style_usage.style\surface_side_style.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'SURFACE_STYLE_SILHOUETTE' IN TYPEOF(sses)) |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE'
+ IN TYPEOF (sssh\surface_style_silhouette.style_of_silhouette))
+ AND (SIZEOF(
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_PRE_DEFINED_COLOUR']
+ * TYPEOF(sssh\surface_style_silhouette.
+ style_of_silhouette\curve_style.curve_colour)) = 1)
+ AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'POSITIVE_LENGTH_MEASURE' IN TYPEOF
+ (sssh\surface_style_silhouette.style_of_silhouette\curve_style.
+ curve_width))
+ AND (SIZEOF(
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE_FONT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_PRE_DEFINED_CURVE_FONT']
+ * TYPEOF(sssh\surface_style_silhouette.
+ style_of_silhouette\curve_style.curve_font)) = 1))))
+ = 0))) = 0))) = 0))) = 0;
+ WR12 : SIZEOF(QUERY(si <* QUERY(it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF(it)) | NOT (SIZEOF(QUERY(psa <* si\styled_item.styles |
+ NOT (SIZEOF(QUERY(ssu <* QUERY(pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE'
+ IN TYPEOF(pss)) | NOT (SIZEOF(QUERY(sssc <* QUERY(sses <*
+ ssu\surface_style_usage.style\surface_side_style.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'SURFACE_STYLE_SEGMENTATION_CURVE' IN TYPEOF(sses)) |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE'
+ IN TYPEOF
+ (sssc\surface_style_segmentation_curve.style_of_segmentation_curve))
+ AND (SIZEOF(
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_PRE_DEFINED_COLOUR']
+ * TYPEOF(sssc\surface_style_segmentation_curve.
+ style_of_segmentation_curve\curve_style.curve_colour)) = 1)
+ AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'POSITIVE_LENGTH_MEASURE' IN TYPEOF
+ (sssc\surface_style_segmentation_curve.
+ style_of_segmentation_curve\curve_style.curve_width))
+ AND (SIZEOF(
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE_FONT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_PRE_DEFINED_CURVE_FONT']
+ * TYPEOF(sssc\surface_style_segmentation_curve.
+ style_of_segmentation_curve\curve_style.curve_font)) = 1))))
+ = 0))) = 0))) = 0))) = 0;
+ WR13 : SIZEOF(QUERY(si <* QUERY(it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF(it)) | NOT (SIZEOF(QUERY(psa <* si\styled_item.styles |
+ NOT (SIZEOF(QUERY(ssu <* QUERY(pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE'
+ IN TYPEOF(pss)) | NOT (SIZEOF(QUERY(ssbd <* QUERY(sses <*
+ ssu\surface_style_usage.style\surface_side_style.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'SURFACE_STYLE_BOUNDARY' IN TYPEOF(sses)) |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE'
+ IN TYPEOF (ssbd\surface_style_boundary.style_of_boundary))
+ AND (SIZEOF(
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_PRE_DEFINED_COLOUR']
+ * TYPEOF(ssbd\surface_style_boundary.
+ style_of_boundary\curve_style.curve_colour)) = 1)
+ AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'POSITIVE_LENGTH_MEASURE' IN TYPEOF (ssbd\surface_style_boundary.
+ style_of_boundary\curve_style.curve_width))
+ AND (SIZEOF(
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE_FONT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_PRE_DEFINED_CURVE_FONT']
+ * TYPEOF(ssbd\surface_style_boundary.
+ style_of_boundary\curve_style.curve_font)) = 1)))) = 0)))
+ = 0))) = 0))) = 0;
+END_ENTITY;
+
+
+ENTITY mechanical_design_presentation_representation_with_draughting
+ SUBTYPE OF (representation);
+ SELF\representation.items : SET [1:?] OF camera_model_d3;
+END_ENTITY;
+
+
+ENTITY mechanical_design_shaded_presentation_area
+ SUBTYPE OF (presentation_area);
+WHERE
+ WR1 : SIZEOF (QUERY (it1 <* SELF.items |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT'
+ IN TYPEOF (it1))
+ OR
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM'
+ IN TYPEOF (it1)) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRESENTATION_VIEW'
+ IN TYPEOF
+ (it1\mapped_item.mapping_source.mapped_representation)))))) = 0;
+ WR2 : SIZEOF (QUERY (pv <* QUERY (mi1 <* QUERY (it1 <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM'
+ IN TYPEOF (it1)) |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRESENTATION_VIEW'
+ IN TYPEOF
+ (mi1\mapped_item.mapping_source.mapped_representation)) |
+ (* search in all presentation_views for axis2_placements and
+ mapped_items and for the subtype of mapped_item,
+ camera_image_3d_with_scale; the latter shall reference
+ a mechanical_design_geometric_presentation_representation;
+ the supertype mapped_item shall reference presentation_view. *)
+ NOT (SIZEOF(QUERY(it2 <* pv\mapped_item.mapping_source.
+ mapped_representation\representation.items |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT'
+ IN TYPEOF(it2))
+ OR
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM'
+ IN TYPEOF(it2)) AND NOT
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'CAMERA_IMAGE_3D_WITH_SCALE' IN TYPEOF(it2))) AND NOT (
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRESENTATION_VIEW'
+ IN TYPEOF
+ (it2\mapped_item.mapping_source.mapped_representation)))
+ OR
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'CAMERA_IMAGE_3D_WITH_SCALE' IN TYPEOF(it2))
+ AND NOT (
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'MECHANICAL_DESIGN_SHADED_PRESENTATION_REPRESENTATION'
+ IN TYPEOF (it2\mapped_item.mapping_source.mapped_representation) ))
+ ))) = 0))) = 0;
+ WR3 : (SIZEOF (QUERY(ps <* USEDIN (SELF,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRESENTATION_SIZE.UNIT') |
+ NOT ((ps.size\planar_extent.size_in_x > 0)
+ AND (ps.size\planar_extent.size_in_y > 0)) )) = 0)
+ AND
+ (* check secondly for presentation_set, via area_in_set *)
+ (SIZEOF (QUERY(pset <* QUERY(ais <*
+ USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'AREA_IN_SET.AREA')
+ | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRESENTATION_SET' IN TYPEOF (ais.in_set)) |
+ (* after having collected all presentation_set, check their sizes *)
+ SIZEOF (QUERY(psize <* USEDIN(pset,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRESENTATION_SIZE.UNIT')
+ | NOT ((psize.size\planar_extent.size_in_x > 0)
+ AND (psize.size\planar_extent.size_in_y > 0)) )) = 0)) = 0);
+ WR4 : (SIZEOF(QUERY( psize <* USEDIN (SELF,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRESENTATION_SIZE.UNIT')
+ | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'AXIS2_PLACEMENT_2D'
+ IN TYPEOF (psize.size.placement))) = 1)
+ AND
+ (* check secondly for presentation_set, via area_in_set *)
+ (SIZEOF (QUERY(pset <* QUERY(ais <*
+ USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'AREA_IN_SET.AREA')
+ | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRESENTATION_SET' IN TYPEOF (ais.in_set)) |
+ (* after having collected all presentation_set, check their
+ dimension *)
+ SIZEOF (QUERY(psize <* USEDIN(pset,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRESENTATION_SIZE.UNIT')
+ | NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'AXIS2_PLACEMENT_2D'
+ IN TYPEOF (psize.size.placement)) )) = 0)) = 0);
+ WR5 : SIZEOF (QUERY (pv <* QUERY (mi1 <* QUERY (it1 <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM'
+ IN TYPEOF (it1)) |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRESENTATION_VIEW'
+ IN TYPEOF
+ (mi1\mapped_item.mapping_source.mapped_representation)) |
+ (* search in all presentation_views for
+ mapped_items and for the subtype of mapped_item,
+ camera_image_3d_with_scale; the latter shall reference
+ a camera_usage that shall have as its mapping_origin either
+ camera_model_d3, camera_model_d3_with_hlhsr, or
+ camera_model_with_light_sources. *)
+ NOT (SIZEOF(QUERY(ci <* pv\mapped_item.mapping_source.
+ mapped_representation\representation.items |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'CAMERA_IMAGE_3D_WITH_SCALE' IN TYPEOF(ci))
+ AND
+ (SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'CAMERA_MODEL_D3',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'CAMERA_MODEL_D3_WITH_HLHSR',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'CAMERA_MODEL_WITH_LIGHT_SOURCES'] * TYPEOF
+ (ci\mapped_item.mapping_source.mapping_origin))
+ = 1))) = 0))) = 0;
+END_ENTITY;
+
+
+ENTITY mechanical_design_shaded_presentation_representation
+ SUBTYPE OF (representation);
+WHERE
+ WR1 : SIZEOF(QUERY(it <* SELF.items |
+ NOT (SIZEOF(
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CAMERA_MODEL_D3']
+ * TYPEOF(it)) = 1))) = 0;
+ WR2 : SIZEOF(QUERY(mi <* QUERY(it <* SELF.items |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM'
+ IN TYPEOF(it))) | NOT (SIZEOF(
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'SHAPE_REPRESENTATION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'MECHANICAL_DESIGN_SHADED_PRESENTATION_REPRESENTATION']
+ * TYPEOF(mi\mapped_item.mapping_source.mapped_representation))
+ = 1))) = 0;
+ WR3 : SIZEOF(QUERY(smi <* QUERY(si <* QUERY(it <* SELF.items |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF(it))) |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM'
+ IN TYPEOF(si\styled_item.item))) | NOT (
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'SHAPE_REPRESENTATION' IN TYPEOF (smi\styled_item.
+ item\mapped_item.mapping_source.mapped_representation))) )) = 0;
+ WR4 : SIZEOF (QUERY (si <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (psa <* si\styled_item.styles |
+ NOT (SIZEOF (QUERY (pss <* psa.styles |
+ NOT (SIZEOF (
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_STYLE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE']
+ * TYPEOF (pss)) = 1))) = 0))) = 0))) = 0;
+ WR5 : SIZEOF (QUERY (si <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (psbc <* QUERY (psa <* si\styled_item.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'PRESENTATION_STYLE_BY_CONTEXT' IN TYPEOF (psa)) |
+ NOT (SIZEOF (
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.REPRESENTATION_ITEM',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.REPRESENTATION']
+ * TYPEOF (psbc\presentation_style_by_context.style_context)) = 1)))
+ = 0))) = 0;
+ WR6 : SIZEOF (QUERY (si <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (psa <* si\styled_item.styles |
+ NOT (SIZEOF (QUERY (ps <* QUERY (pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_STYLE'
+ IN TYPEOF (pss)) |
+ NOT (
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MARKER_TYPE'
+ IN TYPEOF (ps\point_style.marker))
+ AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POSITIVE_LENGTH_MEASURE' IN TYPEOF
+ (ps\point_style.marker_size))
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_COLOUR'] * TYPEOF
+ (ps\point_style.marker_colour)) = 1)))) = 0))) = 0))) = 0;
+ WR7 : SIZEOF (QUERY (si <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (psa <* si\styled_item.styles |
+ NOT (SIZEOF (QUERY (cs <* QUERY (pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE'
+ IN TYPEOF (pss)) |
+ NOT (
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_COLOUR'] * TYPEOF
+ (cs\curve_style.curve_colour)) = 1)
+ AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POSITIVE_LENGTH_MEASURE' IN TYPEOF
+ (cs\curve_style.curve_width))
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'CURVE_STYLE_FONT', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_CURVE_FONT'] * TYPEOF
+ (cs\curve_style.curve_font)) = 1)))) = 0))) = 0))) = 0;
+ WR8 : SIZEOF (QUERY (si <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (psa <* si\styled_item.styles |
+ NOT (SIZEOF (QUERY (ssu <* QUERY (pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE'
+ IN TYPEOF (pss)) |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_SIDE_STYLE'
+ IN TYPEOF (ssu\surface_style_usage.style)) )) = 0))) = 0 ))) = 0;
+ WR9 : SIZEOF (QUERY (si <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (psa <* si\styled_item.styles |
+ NOT (SIZEOF (QUERY (ssu <* QUERY (pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE'
+ IN TYPEOF (pss)) |
+ NOT (SIZEOF (QUERY (sses <*
+ ssu\surface_style_usage.style\surface_side_style.styles |
+ NOT (SIZEOF (
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'SURFACE_STYLE_PARAMETER_LINE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'SURFACE_STYLE_CONTROL_GRID',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'SURFACE_STYLE_SILHOUETTE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'SURFACE_STYLE_SEGMENTATION_CURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'SURFACE_STYLE_BOUNDARY',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'SURFACE_STYLE_FILL_AREA',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'SURFACE_STYLE_RENDERING'] * TYPEOF (sses)) = 1))) = 0))) = 0)))
+ = 0))) = 0;
+ WR10 : SIZEOF (QUERY (si <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (psa <* si\styled_item.styles |
+ NOT (SIZEOF (QUERY (ssu <* QUERY (pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE'
+ IN TYPEOF (pss)) |
+ NOT (SIZEOF (QUERY (ssfa <* QUERY (sses <*
+ ssu\surface_style_usage.style\surface_side_style.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_FILL_AREA'
+ IN TYPEOF (sses)) |
+ NOT (SIZEOF (QUERY (fss <*
+ ssfa\surface_style_fill_area.fill_area.fill_styles |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'FILL_AREA_STYLE_COLOUR' IN TYPEOF (fss))
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_COLOUR'] * TYPEOF
+ (fss\fill_area_style_colour.fill_colour)) = 1)))) = 0))) = 0)))
+ = 0))) = 0))) = 0;
+ WR11 : SIZEOF (QUERY (si <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (psa <* si\styled_item.styles |
+ NOT (SIZEOF (QUERY (ssu <* QUERY (pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE'
+ IN TYPEOF (pss)) |
+ NOT (SIZEOF (QUERY (sspl <* QUERY (sses <*
+ ssu\surface_style_usage.style\surface_side_style.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'SURFACE_STYLE_PARAMETER_LINE' IN TYPEOF (sses)) |
+ NOT ((
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE' IN TYPEOF
+ (sspl\surface_style_parameter_line.style_of_parameter_lines))
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_COLOUR'] * TYPEOF
+ (sspl\surface_style_parameter_line.
+ style_of_parameter_lines\curve_style.curve_colour)) = 1)
+ AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POSITIVE_LENGTH_MEASURE' IN TYPEOF
+ (sspl\surface_style_parameter_line.
+ style_of_parameter_lines\curve_style.curve_width))
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'CURVE_STYLE_FONT', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_CURVE_FONT'] * TYPEOF
+ (sspl\surface_style_parameter_line.
+ style_of_parameter_lines\curve_style.curve_font)) = 1))
+ OR
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE_RENDERING'
+ IN TYPEOF
+ (sspl\surface_style_parameter_line.style_of_parameter_lines))
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_COLOUR'] * TYPEOF
+ (sspl\surface_style_parameter_line.style_of_parameter_lines\
+ curve_style_rendering.rendering_properties.rendered_colour))
+ = 1))) )) = 0))) = 0))) = 0))) = 0;
+ WR12 : SIZEOF (QUERY (si <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (psa <* si\styled_item.styles |
+ NOT (SIZEOF (QUERY (ssu <* QUERY (pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE'
+ IN TYPEOF (pss)) |
+ NOT (SIZEOF (QUERY (sscg <* QUERY (sses <*
+ ssu\surface_style_usage.style\surface_side_style.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'SURFACE_STYLE_CONTROL_GRID' IN TYPEOF (sses)) |
+ NOT ((
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE'
+ IN TYPEOF (sscg\surface_style_control_grid.style_of_control_grid))
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_COLOUR'] * TYPEOF
+ (sscg\surface_style_control_grid.
+ style_of_control_grid\curve_style.curve_colour)) = 1)
+ AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POSITIVE_LENGTH_MEASURE' IN TYPEOF
+ (sscg\surface_style_control_grid.
+ style_of_control_grid\curve_style.curve_width))
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'CURVE_STYLE_FONT', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_CURVE_FONT'] * TYPEOF
+ (sscg\surface_style_control_grid.
+ style_of_control_grid\curve_style.curve_font)) = 1))
+ OR
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE_RENDERING'
+ IN TYPEOF (sscg\surface_style_control_grid.style_of_control_grid))
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_COLOUR'] * TYPEOF
+ (sscg\surface_style_control_grid.style_of_control_grid\
+ curve_style_rendering.rendering_properties.rendered_colour))
+ = 1))) )) = 0))) = 0))) = 0))) = 0;
+ WR13 : SIZEOF (QUERY (si <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (psa <* si\styled_item.styles |
+ NOT (SIZEOF (QUERY (ssu <* QUERY (pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE'
+ IN TYPEOF (pss)) |
+ NOT (SIZEOF (QUERY (sssh <* QUERY (sses <*
+ ssu\surface_style_usage.style\surface_side_style.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'SURFACE_STYLE_SILHOUETTE' IN TYPEOF (sses)) |
+ NOT ((
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE'
+ IN TYPEOF (sssh\surface_style_silhouette.style_of_silhouette))
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_COLOUR'] * TYPEOF
+ (sssh\surface_style_silhouette.
+ style_of_silhouette\curve_style.curve_colour)) = 1)
+ AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POSITIVE_LENGTH_MEASURE' IN TYPEOF
+ (sssh\surface_style_silhouette.
+ style_of_silhouette\curve_style.curve_width))
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'CURVE_STYLE_FONT', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_CURVE_FONT'] * TYPEOF
+ (sssh\surface_style_silhouette.
+ style_of_silhouette\curve_style.curve_font)) = 1))
+ OR
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE_RENDERING'
+ IN TYPEOF (sssh\surface_style_silhouette.style_of_silhouette))
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_COLOUR'] * TYPEOF
+ (sssh\surface_style_silhouette.style_of_silhouette\
+ curve_style_rendering.rendering_properties.rendered_colour))
+ = 1))) )) = 0))) = 0))) = 0))) = 0;
+ WR14 : SIZEOF (QUERY (si <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (psa <* si\styled_item.styles |
+ NOT (SIZEOF (QUERY (ssu <* QUERY (pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE'
+ IN TYPEOF (pss)) |
+ NOT (SIZEOF (QUERY (sssc <* QUERY (sses <*
+ ssu\surface_style_usage.style\surface_side_style.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'SURFACE_STYLE_SEGMENTATION_CURVE' IN TYPEOF (sses)) |
+ NOT ((
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE'
+ IN TYPEOF
+ (sssc\surface_style_segmentation_curve.style_of_segmentation_curve))
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_COLOUR'] * TYPEOF
+ (sssc\surface_style_segmentation_curve.
+ style_of_segmentation_curve\curve_style.curve_colour)) = 1)
+ AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POSITIVE_LENGTH_MEASURE' IN TYPEOF
+ (sssc\surface_style_segmentation_curve.
+ style_of_segmentation_curve\curve_style.curve_width))
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'CURVE_STYLE_FONT', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_CURVE_FONT'] * TYPEOF
+ (sssc\surface_style_segmentation_curve.
+ style_of_segmentation_curve\curve_style.curve_font)) = 1))
+ OR
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE_RENDERING'
+ IN TYPEOF (sssc\surface_style_segmentation_curve.
+ style_of_segmentation_curve))
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_COLOUR'] * TYPEOF
+ (sssc\surface_style_segmentation_curve.style_of_segmentation_curve\
+ curve_style_rendering.rendering_properties.rendered_colour))
+ = 1))) )) = 0))) = 0))) = 0))) = 0;
+ WR15 : SIZEOF (QUERY (si <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (psa <* si\styled_item.styles |
+ NOT (SIZEOF (QUERY (ssu <* QUERY (pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE'
+ IN TYPEOF (pss)) |
+ NOT (SIZEOF (QUERY (ssbd <* QUERY (sses <*
+ ssu\surface_style_usage.style\surface_side_style.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'SURFACE_STYLE_BOUNDARY' IN TYPEOF (sses)) |
+ NOT ((
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE'
+ IN TYPEOF (ssbd\surface_style_boundary.style_of_boundary))
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_COLOUR'] * TYPEOF
+ (ssbd\surface_style_boundary.
+ style_of_boundary\curve_style.curve_colour)) = 1)
+ AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POSITIVE_LENGTH_MEASURE' IN TYPEOF
+ (ssbd\surface_style_boundary.
+ style_of_boundary\curve_style.curve_width))
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'CURVE_STYLE_FONT', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_CURVE_FONT'] * TYPEOF
+ (ssbd\surface_style_boundary.
+ style_of_boundary\curve_style.curve_font)) = 1))
+ OR
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE_RENDERING'
+ IN TYPEOF (ssbd\surface_style_boundary.style_of_boundary))
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_COLOUR'] * TYPEOF
+ (ssbd\surface_style_boundary.style_of_boundary\
+ curve_style_rendering.rendering_properties.rendered_colour))
+ = 1))) )) = 0))) = 0))) = 0))) = 0;
+ WR16 : SIZEOF (QUERY (si <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM'
+ IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (psa <* si\styled_item.styles |
+ NOT (SIZEOF (QUERY (ssu <* QUERY (pss <* psa.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE'
+ IN TYPEOF (pss)) |
+ NOT (SIZEOF (QUERY (ssre <* QUERY (sses <*
+ ssu\surface_style_usage.style\surface_side_style.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'SURFACE_STYLE_RENDERING' IN TYPEOF (sses)) |
+ NOT
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COLOUR_RGB',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DRAUGHTING_PRE_DEFINED_COLOUR'] * TYPEOF
+ (ssre\surface_style_rendering.surface_colour)) = 1)))
+ = 0))) = 0))) = 0))) = 0;
+END_ENTITY;
+
+
+ENTITY min_and_major_ply_orientation_basis
+ SUBTYPE OF (representation_item_relationship, geometric_representation_item);
+ SELF\representation_item_relationship.related_representation_item : axis2_placement_3d;
+ SELF\representation_item_relationship.relating_representation_item : axis2_placement_3d;
+DERIVE
+ major_orientation_basis : axis2_placement_3d := SELF\representation_item_relationship.related_representation_item;
+ minor_orientation_basis : axis2_placement_3d := SELF\representation_item_relationship.relating_representation_item;
+END_ENTITY;
+
+
+ENTITY modified_geometric_tolerance
+ SUBTYPE OF (geometric_tolerance);
+ modifier : limit_condition;
+END_ENTITY;
+
+
+ENTITY modified_solid
+ ABSTRACT SUPERTYPE OF (ONEOF (edge_blended_solid, sculptured_solid, shelled_solid, modified_solid_with_placed_configuration))
+ SUBTYPE OF (solid_model);
+ rationale : text;
+ base_solid : base_solid_select;
+END_ENTITY;
+
+
+ENTITY modified_solid_with_placed_configuration
+ ABSTRACT SUPERTYPE OF (ONEOF (solid_with_depression, solid_with_protrusion, solid_with_shape_element_pattern))
+ SUBTYPE OF (modified_solid);
+ placing : axis2_placement_3d;
+END_ENTITY;
+
+
+ENTITY moments_of_inertia_representation
+ SUBTYPE OF (representation);
+WHERE
+ WR1 : (SIZEOF(SELF.items) = 1) AND
+ (SIZEOF( QUERY( i <* SELF.items | ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'COMPOUND_REPRESENTATION_ITEM' IN TYPEOF(i)) AND
+ (i.name = 'moments of inertia matrix') )) = 1);
+ WR2 : SIZEOF( QUERY( i <* SELF.items | ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'COMPOUND_REPRESENTATION_ITEM' IN TYPEOF(i)) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'LIST_REPRESENTATION_ITEM' IN TYPEOF(i\compound_representation_item.item_element)) AND
+ value_range_aggregate_rep_item (i\compound_representation_item.item_element) )) = 1;
+END_ENTITY;
+
+
+ENTITY multi_language_attribute_assignment
+ SUBTYPE OF (attribute_value_assignment);
+ items : SET [1:?] OF multi_language_attribute_item;
+DERIVE
+ translation_language : language := language_indication[1]\attribute_classification_assignment.assigned_class;
+INVERSE
+ language_indication: SET [1:1] OF attribute_language_assignment FOR items;
+WHERE
+ WR1 : (SELF\attribute_value_assignment.role.name = 'alternate language');
+ WR2 : SIZEOF( QUERY( ala <* language_indication |
+ (ala\attribute_classification_assignment.attribute_name = 'attribute_value') AND
+ (ala\attribute_classification_assignment.role.name='translated') )) = 1;
+ WR3 : SELF\attribute_value_assignment.attribute_name <> '';
+ WR4 : SIZEOF(QUERY(ci <* items |
+SIZEOF(QUERY(ata <* USEDIN(ci, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.ITEMS') |
+(ata\attribute_value_assignment.attribute_name = SELF\attribute_value_assignment.attribute_name) AND
+(ata.translation_language :=: translation_language) ))>1 )) =0;
+ WR5 : SIZEOF(QUERY(ci <* items |
+SIZEOF(QUERY(ata <* USEDIN(ci, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ATTRIBUTE_LANGUAGE_ASSIGNMENT.ITEMS') |
+ (ata\attribute_classification_assignment.role.name='primary') AND
+ (ata\attribute_classification_assignment.attribute_name= SELF\attribute_value_assignment.attribute_name) AND
+ (ata\attribute_classification_assignment.assigned_class :=: translation_language) ))>0 )) =0;
+END_ENTITY;
+
+
+ENTITY multiple_arity_boolean_expression
+ ABSTRACT SUPERTYPE
+ SUBTYPE OF (boolean_expression, multiple_arity_generic_expression);
+ SELF\multiple_arity_generic_expression.operands : LIST [2:?] OF boolean_expression;
+END_ENTITY;
+
+
+ENTITY multiple_arity_generic_expression
+ ABSTRACT SUPERTYPE
+ SUBTYPE OF (generic_expression);
+ operands : LIST [2:?] OF generic_expression;
+END_ENTITY;
+
+
+ENTITY multiple_arity_numeric_expression
+ ABSTRACT SUPERTYPE
+ SUBTYPE OF (numeric_expression, multiple_arity_generic_expression);
+ SELF\multiple_arity_generic_expression.operands : LIST [2:?] OF numeric_expression;
+END_ENTITY;
+
+
+ENTITY name_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_name : label;
+DERIVE
+ role : object_role := get_role(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ROLE_ASSOCIATION.ITEM_WITH_ROLE')) <= 1;
+END_ENTITY;
+
+
+ENTITY name_attribute;
+ attribute_value : label;
+ named_item : name_attribute_select;
+END_ENTITY;
+
+
+ENTITY named_unit
+ SUPERTYPE OF ((ONEOF (si_unit, conversion_based_unit, context_dependent_unit) ANDOR ONEOF (length_unit, mass_unit, time_unit, electric_current_unit, thermodynamic_temperature_unit, amount_of_substance_unit, luminous_flux_unit, luminous_intensity_unit, plane_angle_unit, solid_angle_unit, ratio_unit)));
+ dimensions : dimensional_exponents;
+END_ENTITY;
+
+
+ENTITY next_assembly_usage_occurrence
+ SUBTYPE OF (assembly_component_usage);
+END_ENTITY;
+
+
+ENTITY non_manifold_surface_shape_representation
+ SUBTYPE OF (shape_representation);
+WHERE
+ WR1 : SIZEOF (QUERY (it <* SELF.items |
+ NOT (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_BASED_SURFACE_MODEL',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT_3D'] * TYPEOF (it)) = 1)))
+ = 0;
+ WR2 : SIZEOF (QUERY (it <* SELF.items |
+ SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_BASED_SURFACE_MODEL',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM'] * TYPEOF (it)) = 1)) > 0;
+ WR3 : SIZEOF (QUERY (mi <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' IN TYPEOF (it)) |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'NON_MANIFOLD_SURFACE_SHAPE_REPRESENTATION'
+ IN TYPEOF (mi\mapped_item.mapping_source.mapped_representation))
+ AND
+ (SIZEOF(QUERY (mr_it <*
+ mi\mapped_item.mapping_source.mapped_representation.items |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_BASED_SURFACE_MODEL'
+ IN TYPEOF (mr_it)))) > 0 )))) = 0;
+ WR4 : SIZEOF (QUERY (fbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ fbsm\face_based_surface_model.fbsm_faces |
+ NOT (SIZEOF (QUERY (fa <* cfs.cfs_faces |
+ NOT (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_SURFACE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORIENTED_FACE'] * TYPEOF (fa)) = 1)))
+ = 0))) = 0))) = 0;
+ WR5 : SIZEOF (QUERY (fbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ fbsm\face_based_surface_model.fbsm_faces |
+ NOT (SIZEOF (QUERY (f_sf <* QUERY (fa <* cfs.cfs_faces |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_SURFACE' IN TYPEOF (fa))) |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF (f_sf))
+ OR
+ (nmsf_surface_check(f_sf\face_surface.face_geometry))))) = 0)))
+ = 0))) = 0;
+ WR6 : SIZEOF (QUERY (fbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ fbsm\face_based_surface_model.fbsm_faces |
+ NOT (SIZEOF (QUERY (o_fa <* QUERY (fa <* cfs.cfs_faces |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORIENTED_FACE' IN TYPEOF (fa))) |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF
+ (o_fa\oriented_face.face_element))
+ OR
+ (nmsf_surface_check
+ (o_fa\oriented_face.face_element\face_surface.face_geometry)))))
+ = 0))) = 0))) = 0;
+ WR7 : SIZEOF (QUERY (fbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ fbsm\face_based_surface_model.fbsm_faces |
+ NOT (SIZEOF (QUERY (fa <* cfs.cfs_faces |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF (fa))
+ OR
+ (SIZEOF (QUERY (bnds <* fa.bounds |
+ NOT (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_LOOP']
+ * TYPEOF (bnds.bound)) = 1))) = 0)))) = 0))) = 0))) = 0;
+ WR8 : SIZEOF (QUERY (fbsm <* QUERY (it <* SELF.items|
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ fbsm\face_based_surface_model.fbsm_faces |
+ NOT (SIZEOF (QUERY (fa <* cfs.cfs_faces |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF (fa))
+ OR
+ (SIZEOF (QUERY (elp_fbnds <* QUERY (bnds <* fa.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (bnds.bound)) |
+ NOT (SIZEOF (QUERY (oe <* elp_fbnds\path.edge_list |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_CURVE' IN TYPEOF
+ (oe.edge_element)))) = 0))) = 0)))) = 0))) = 0))) = 0;
+ WR9 : SIZEOF (QUERY (fbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ fbsm\face_based_surface_model.fbsm_faces |
+ NOT (SIZEOF (QUERY (fa <* cfs.cfs_faces |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF (fa))
+ OR
+ (SIZEOF (QUERY (elp_fbnds <* QUERY (bnds <* fa.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (bnds.bound)) |
+ NOT (SIZEOF (QUERY (oe_cv <* QUERY (oe <*
+ elp_fbnds\path.edge_list |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_CURVE' IN TYPEOF (oe.edge_element)) |
+ NOT (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_CURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONIC',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_REPLICA',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LINE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OFFSET_CURVE_3D',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_CURVE'] *
+ TYPEOF (oe_cv.edge_element\edge_curve.edge_geometry))
+ = 1))) = 0))) = 0)))) = 0))) = 0))) = 0;
+ WR10 : SIZEOF (QUERY (fbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ fbsm\face_based_surface_model.fbsm_faces |
+ NOT (SIZEOF (QUERY (fa <* cfs.cfs_faces |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF (fa))
+ OR
+ (SIZEOF (QUERY (elp_fbnds <* QUERY (bnds <* fa.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (bnds.bound)) |
+ NOT (SIZEOF (QUERY (oe <* elp_fbnds\path.edge_list |
+ NOT (nmsf_curve_check (oe.edge_element\edge_curve.edge_geometry))))
+ = 0))) = 0)))) = 0))) = 0))) = 0;
+ WR11 : SIZEOF (QUERY(fbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ fbsm\face_based_surface_model.fbsm_faces |
+ NOT (SIZEOF (QUERY (fa <* cfs.cfs_faces |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF (fa))
+ OR
+ (SIZEOF (QUERY (elp_fbnds <* QUERY (bnds <* fa.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (bnds.bound)) |
+ NOT (SIZEOF (QUERY (oe <* elp_fbnds\path.edge_list|
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN TYPEOF
+ (oe.edge_element.edge_start))
+ AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN
+ TYPEOF (oe.edge_element.edge_end)))))
+ = 0))) = 0)))) = 0))) = 0))) = 0;
+ WR12 : SIZEOF (QUERY (fbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ fbsm\face_based_surface_model.fbsm_faces |
+ NOT (SIZEOF (QUERY (fa <* cfs.cfs_faces |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF (fa))
+ OR
+ (SIZEOF (QUERY (elp_fbnds <* QUERY (bnds <* fa.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (bnds.bound)) |
+ NOT (SIZEOF (QUERY (oe <* elp_fbnds\path.edge_list |
+ NOT ((SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CARTESIAN_POINT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DEGENERATE_PCURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_ON_CURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_ON_SURFACE'] * TYPEOF
+ (oe.edge_element.edge_start\vertex_point.vertex_geometry)) = 1)
+ AND
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CARTESIAN_POINT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DEGENERATE_PCURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_ON_CURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_ON_SURFACE'] * TYPEOF
+ (oe.edge_element.edge_end\vertex_point.vertex_geometry)) = 1
+ )))) = 0))) = 0)))) = 0))) = 0))) = 0;
+ WR13 : SIZEOF (QUERY (fbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ fbsm\face_based_surface_model.fbsm_faces |
+ NOT (SIZEOF (QUERY (fa <* cfs.cfs_faces |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF (fa))
+ OR
+ (SIZEOF (QUERY (vlp_fbnds <* QUERY (bnds <* fa.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_LOOP' IN TYPEOF (bnds.bound)) |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN TYPEOF
+ (vlp_fbnds\vertex_loop.loop_vertex)))) = 0)))) = 0)))
+ = 0))) = 0;
+ WR14 : SIZEOF (QUERY (fbsm <* QUERY (it <* SELF.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_BASED_SURFACE_MODEL' IN TYPEOF (it)) |
+ NOT (SIZEOF (QUERY (cfs <*
+ fbsm\face_based_surface_model.fbsm_faces |
+ NOT (SIZEOF (QUERY (fa <* cfs.cfs_faces |
+ NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF (fa))
+ OR
+ (SIZEOF (QUERY (vlp_fbnds <* QUERY (bnds <* fa.bounds |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_LOOP' IN TYPEOF (bnds.bound)) |
+ NOT (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CARTESIAN_POINT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DEGENERATE_PCURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_ON_CURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_ON_SURFACE'] * TYPEOF
+ (vlp_fbnds\vertex_loop.loop_vertex\vertex_point.vertex_geometry))
+ = 1))) = 0)))) = 0))) = 0))) = 0;
+END_ENTITY;
+
+
+ENTITY null_representation_item
+ SUBTYPE OF (representation_item);
+END_ENTITY;
+
+
+ENTITY numeric_expression
+ ABSTRACT SUPERTYPE OF (ONEOF (simple_numeric_expression, unary_numeric_expression, binary_numeric_expression, multiple_arity_numeric_expression))
+ SUBTYPE OF (expression);
+DERIVE
+ is_int : LOGICAL := is_int_expr (SELF);
+ sql_mappable : LOGICAL := is_SQL_mappable (SELF);
+END_ENTITY;
+
+
+ENTITY object_role;
+ name : label;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY offset_curve_2d
+ SUBTYPE OF (curve);
+ basis_curve : curve;
+ distance : length_measure;
+ self_intersect : LOGICAL;
+WHERE
+ WR1 : basis_curve.dim = 2;
+END_ENTITY;
+
+
+ENTITY offset_curve_3d
+ SUBTYPE OF (curve);
+ basis_curve : curve;
+ distance : length_measure;
+ self_intersect : LOGICAL;
+ ref_direction : direction;
+WHERE
+ WR1 : (basis_curve.dim = 3) AND (ref_direction.dim = 3);
+END_ENTITY;
+
+
+ENTITY offset_surface
+ SUBTYPE OF (surface);
+ basis_surface : surface;
+ distance : length_measure;
+ self_intersect : LOGICAL;
+END_ENTITY;
+
+
+ENTITY one_direction_repeat_factor
+ SUBTYPE OF (geometric_representation_item);
+ repeat_factor : vector;
+END_ENTITY;
+
+
+ENTITY open_shell
+ SUBTYPE OF (connected_face_set);
+END_ENTITY;
+
+
+ENTITY ordinal_date
+ SUBTYPE OF (date);
+ day_component : day_in_year_number;
+WHERE
+ WR1 : (NOT leap_year(SELF.year_component) AND { 1 <= day_component <= 365 }) OR (leap_year(SELF.year_component) AND { 1 <= day_component <= 366 });
+END_ENTITY;
+
+
+ENTITY ordinate_dimension
+ SUBTYPE OF (projection_directed_callout);
+END_ENTITY;
+
+
+ENTITY organization;
+ id : OPTIONAL identifier;
+ name : label;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY organization_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_organization : organization;
+ role : organization_role;
+END_ENTITY;
+
+
+ENTITY organization_relationship;
+ name : label;
+ description : OPTIONAL text;
+ relating_organization : organization;
+ related_organization : organization;
+END_ENTITY;
+
+
+ENTITY organization_role;
+ name : label;
+DERIVE
+ description : text := get_description_value(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY organizational_address
+ SUBTYPE OF (address);
+ organizations : SET [1:?] OF organization;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY organizational_project;
+ name : label;
+ description : OPTIONAL text;
+ responsible_organizations : SET [1:?] OF organization;
+DERIVE
+ id : identifier := get_id_value(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY organizational_project_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_organizational_project : organizational_project;
+ role : organizational_project_role;
+END_ENTITY;
+
+
+ENTITY organizational_project_relationship;
+ name : label;
+ description : OPTIONAL text;
+ relating_organizational_project : organizational_project;
+ related_organizational_project : organizational_project;
+END_ENTITY;
+
+
+ENTITY organizational_project_role;
+ name : label;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY oriented_closed_shell
+ SUBTYPE OF (closed_shell);
+ closed_shell_element : closed_shell;
+ orientation : BOOLEAN;
+DERIVE
+ SELF\connected_face_set.cfs_faces : SET [1:?] OF face := conditional_reverse(SELF.orientation,
+ SELF.closed_shell_element.cfs_faces);
+WHERE
+ WR1 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORIENTED_CLOSED_SHELL'
+ IN TYPEOF (SELF.closed_shell_element));
+END_ENTITY;
+
+
+ENTITY oriented_edge
+ SUBTYPE OF (edge);
+ edge_element : edge;
+ orientation : BOOLEAN;
+DERIVE
+ SELF\edge.edge_end : vertex := boolean_choose (SELF.orientation,
+ SELF.edge_element.edge_end,
+ SELF.edge_element.edge_start);
+ SELF\edge.edge_start : vertex := boolean_choose (SELF.orientation,
+ SELF.edge_element.edge_start,
+ SELF.edge_element.edge_end);
+WHERE
+ WR1 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORIENTED_EDGE' IN TYPEOF (SELF.edge_element));
+END_ENTITY;
+
+
+ENTITY oriented_face
+ SUBTYPE OF (face);
+ face_element : face;
+ orientation : BOOLEAN;
+DERIVE
+ SELF\face.bounds : SET [1:?] OF face_bound := conditional_reverse(SELF.orientation,SELF.face_element.bounds);
+WHERE
+ WR1 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORIENTED_FACE' IN TYPEOF (SELF.face_element));
+END_ENTITY;
+
+
+ENTITY oriented_open_shell
+ SUBTYPE OF (open_shell);
+ open_shell_element : open_shell;
+ orientation : BOOLEAN;
+DERIVE
+ SELF\connected_face_set.cfs_faces : SET [1:?] OF face := conditional_reverse(SELF.orientation,
+ SELF.open_shell_element.cfs_faces);
+WHERE
+ WR1 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORIENTED_OPEN_SHELL'
+ IN TYPEOF (SELF.open_shell_element));
+END_ENTITY;
+
+
+ENTITY oriented_path
+ SUBTYPE OF (path);
+ path_element : path;
+ orientation : BOOLEAN;
+DERIVE
+ SELF\path.edge_list : LIST [1:?] OF UNIQUE oriented_edge := conditional_reverse(SELF.orientation,
+ SELF.path_element.edge_list);
+WHERE
+ WR1 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORIENTED_PATH' IN TYPEOF (SELF.path_element));
+END_ENTITY;
+
+
+ENTITY oriented_surface
+ SUBTYPE OF (surface);
+ orientation : BOOLEAN;
+END_ENTITY;
+
+
+ENTITY outer_boundary_curve
+ SUBTYPE OF (boundary_curve);
+END_ENTITY;
+
+
+ENTITY over_riding_styled_item
+ SUBTYPE OF (styled_item);
+ over_ridden_style : styled_item;
+END_ENTITY;
+
+
+ENTITY package_product_concept_feature
+ SUBTYPE OF (product_concept_feature);
+WHERE
+ WR1 : NOT ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'CONDITIONAL_CONCEPT_FEATURE' IN TYPEOF ( SELF ) );
+ WR2 : SIZEOF ( QUERY
+ (
+ cfr <* USEDIN ( SELF , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'CONCEPT_FEATURE_RELATIONSHIP.' +'RELATING_PRODUCT_CONCEPT_FEATURE' )
+ |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'CONCEPT_FEATURE_RELATIONSHIP_WITH_CONDITION' IN TYPEOF (cfr ) )
+ AND
+ ( SIZEOF ( QUERY
+ (
+ ipcf <* USEDIN ( cfr , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'CONDITIONAL_CONCEPT_FEATURE.' + 'CONDITION' )
+ |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'INCLUSION_PRODUCT_CONCEPT_FEATURE' IN TYPEOF ( ipcf )
+ )
+ )= 1
+ )
+ )
+ )>0;
+END_ENTITY;
+
+
+ENTITY parabola
+ SUBTYPE OF (conic);
+ focal_dist : length_measure;
+WHERE
+ WR1 : focal_dist <> 0.0;
+END_ENTITY;
+
+
+ENTITY parallel_offset
+ SUBTYPE OF (derived_shape_aspect);
+ offset : measure_with_unit;
+WHERE
+ WR1 : SIZEOF (SELF\derived_shape_aspect.deriving_relationships)= 1;
+END_ENTITY;
+
+
+ENTITY parallelism_tolerance
+ SUBTYPE OF (geometric_tolerance_with_datum_reference);
+WHERE
+ WR1 : SIZEOF (SELF\geometric_tolerance_with_datum_reference.datum_system) < 3;
+END_ENTITY;
+
+
+ENTITY parametric_representation_context
+ SUBTYPE OF (representation_context);
+END_ENTITY;
+
+
+ENTITY part_laminate_table
+ SUPERTYPE OF (ONEOF (composite_assembly_table, ply_laminate_table))
+ SUBTYPE OF (laminate_table);
+END_ENTITY;
+
+
+ENTITY partial_document_with_structured_text_representation_assignment
+ SUBTYPE OF (applied_document_usage_constraint_assignment, characterized_object);
+END_ENTITY;
+
+
+ENTITY path
+ SUPERTYPE OF (ONEOF (edge_loop, oriented_path))
+ SUBTYPE OF (topological_representation_item);
+ edge_list : LIST [1:?] OF UNIQUE oriented_edge;
+WHERE
+ WR1 : path_head_to_tail(SELF);
+END_ENTITY;
+
+
+ENTITY pcurve
+ SUBTYPE OF (curve);
+ basis_surface : surface;
+ reference_to_curve : definitional_representation;
+WHERE
+ WR1 : SIZEOF(reference_to_curve\representation.items) = 1;
+ WR2 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE' IN TYPEOF
+ (reference_to_curve\representation.items[1]);
+ WR3 : reference_to_curve\representation.items[1]\
+ geometric_representation_item.dim =2;
+END_ENTITY;
+
+
+ENTITY percentage_laminate_definition
+ SUBTYPE OF (product_definition);
+WHERE
+ WR1 : SIZEOF (QUERY (pdr <* USEDIN (SELF,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRODUCT_DEFINITION_RELATIONSHIP.' +
+ 'RELATING_PRODUCT_DEFINITION') |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'NEXT_ASSEMBLY_USAGE_OCCURRENCE' IN
+ TYPEOF (pdr))) > 0;
+END_ENTITY;
+
+
+ENTITY percentage_laminate_table
+ SUBTYPE OF (zone_structural_makeup);
+END_ENTITY;
+
+
+ENTITY percentage_ply_definition
+ SUBTYPE OF (product_definition);
+WHERE
+ WR1 : SIZEOF (QUERY (pdr <* USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRODUCT_DEFINITION_RELATIONSHIP.RELATING_PRODUCT_DEFINITION') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PERCENTAGE_LAMINATE_DEFINITION'
+ IN TYPEOF (pdr.related_product_definition)) AND
+ (pdr.name = 'makeup and properties'))) = 0;
+END_ENTITY;
+
+
+ENTITY perpendicular_to
+ SUBTYPE OF (derived_shape_aspect);
+WHERE
+ WR1 : SIZEOF (SELF\derived_shape_aspect.deriving_relationships)= 1;
+END_ENTITY;
+
+
+ENTITY perpendicularity_tolerance
+ SUBTYPE OF (geometric_tolerance_with_datum_reference);
+WHERE
+ WR1 : SIZEOF (SELF\geometric_tolerance_with_datum_reference.datum_system) <= 3;
+END_ENTITY;
+
+
+ENTITY person;
+ id : identifier;
+ last_name : OPTIONAL label;
+ first_name : OPTIONAL label;
+ middle_names : OPTIONAL LIST [1:?] OF label;
+ prefix_titles : OPTIONAL LIST [1:?] OF label;
+ suffix_titles : OPTIONAL LIST [1:?] OF label;
+WHERE
+ WR1 : EXISTS(last_name) OR EXISTS(first_name);
+END_ENTITY;
+
+
+ENTITY person_and_organization;
+ the_person : person;
+ the_organization : organization;
+DERIVE
+ description : text := get_description_value(SELF);
+ name : label := get_name_value(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'NAME_ATTRIBUTE.NAMED_ITEM')) <= 1;
+ WR2 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY person_and_organization_address
+ SUBTYPE OF (organizational_address, personal_address);
+ SELF\organizational_address.organizations : SET [1:1] OF organization;
+ SELF\personal_address.people : SET [1:1] OF person;
+WHERE
+ WR1 : SIZEOF(QUERY(pao <* USEDIN (SELF\personal_address.people[1], 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PERSON_AND_ORGANIZATION.THE_PERSON') | pao.the_organization :=: SELF\organizational_address.organizations[1])) = 1;
+END_ENTITY;
+
+
+ENTITY person_and_organization_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_person_and_organization : person_and_organization;
+ role : person_and_organization_role;
+END_ENTITY;
+
+
+ENTITY person_and_organization_role;
+ name : label;
+DERIVE
+ description : text := get_description_value(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY personal_address
+ SUBTYPE OF (address);
+ people : SET [1:?] OF person;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY physical_breakdown_context
+ SUBTYPE OF (breakdown_context);
+END_ENTITY;
+
+
+ENTITY physical_element_usage
+ SUBTYPE OF (breakdown_element_usage);
+END_ENTITY;
+
+
+ENTITY picture_representation
+ SUBTYPE OF (presentation_view);
+ SELF\representation.items : SET [2:?] OF picture_representation_item_select;
+INVERSE
+ size: presentation_size FOR unit;
+WHERE
+ WR1: SIZEOF(QUERY(item <* items | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM' IN TYPEOF(item))) = 1;
+ WR2: SIZEOF (QUERY (se <* QUERY (item <* SELF.items | ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STYLED_ITEM' IN TYPEOF (item)))
+ | NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PICTURE_REPRESENTATION_ITEM'
+ IN TYPEOF (se\styled_item.item)) )) = 0;
+END_ENTITY;
+
+
+ENTITY picture_representation_item
+ ABSTRACT SUPERTYPE OF (ONEOF (externally_defined_picture_representation_item, predefined_picture_representation_item))
+ SUBTYPE OF (bytes_representation_item);
+END_ENTITY;
+
+
+ENTITY placed_datum_target_feature
+ SUBTYPE OF (datum_target);
+DERIVE
+ representation_associations : SET [0:?] OF property_definition_representation := get_shape_aspect_property_definition_representations(SELF);
+WHERE
+ WR1 : SELF.description IN ['point','line','rectangle','circle', 'circular line'];
+ WR2 : SIZEOF (QUERY (pdr <* representation_associations | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF (pdr.used_representation) )) = 1;
+ WR3 : valid_datum_target_parameters(SELF);
+END_ENTITY;
+
+
+ENTITY placed_feature
+ SUBTYPE OF (shape_aspect);
+END_ENTITY;
+
+
+ENTITY placement
+ SUPERTYPE OF (ONEOF (axis1_placement, axis2_placement_2d, axis2_placement_3d))
+ SUBTYPE OF (geometric_representation_item);
+ location : cartesian_point;
+END_ENTITY;
+
+
+ENTITY planar_box
+ SUBTYPE OF (planar_extent);
+ placement : axis2_placement;
+END_ENTITY;
+
+
+ENTITY planar_extent
+ SUBTYPE OF (geometric_representation_item);
+ size_in_x : length_measure;
+ size_in_y : length_measure;
+END_ENTITY;
+
+
+ENTITY plane
+ SUBTYPE OF (elementary_surface);
+END_ENTITY;
+
+
+ENTITY plane_angle_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PLANE_ANGLE_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY plane_angle_unit
+ SUBTYPE OF (named_unit);
+WHERE
+ WR1 : (SELF\named_unit.dimensions.length_exponent = 0.0) AND (SELF\named_unit.dimensions.mass_exponent = 0.0) AND (SELF\named_unit.dimensions.time_exponent = 0.0) AND (SELF\named_unit.dimensions.electric_current_exponent = 0.0) AND (SELF\named_unit.dimensions.thermodynamic_temperature_exponent = 0.0) AND (SELF\named_unit.dimensions.amount_of_substance_exponent = 0.0) AND (SELF\named_unit.dimensions.luminous_intensity_exponent = 0.0);
+END_ENTITY;
+
+
+ENTITY plus_minus_tolerance;
+ range : tolerance_method_definition;
+ toleranced_dimension : dimensional_characteristic;
+UNIQUE
+ UR1 : toleranced_dimension;
+END_ENTITY;
+
+
+ENTITY ply_laminate_definition
+ SUBTYPE OF (product_definition);
+WHERE
+ WR1 : SIZEOF (QUERY (pdr <* USEDIN (SELF,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRODUCT_DEFINITION_RELATIONSHIP.' +
+ 'RELATING_PRODUCT_DEFINITION') |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'NEXT_ASSEMBLY_USAGE_OCCURRENCE' IN
+ TYPEOF (pdr))) = 1;
+END_ENTITY;
+
+
+ENTITY ply_laminate_sequence_definition
+ SUBTYPE OF (product_definition);
+WHERE
+ WR1 : SIZEOF (QUERY (pdr <* USEDIN (SELF,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRODUCT_DEFINITION_RELATIONSHIP.' +
+ 'RELATING_PRODUCT_DEFINITION') |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'NEXT_ASSEMBLY_USAGE_OCCURRENCE' IN
+ TYPEOF (pdr))) > 0;
+END_ENTITY;
+
+
+ENTITY ply_laminate_table
+ SUBTYPE OF (part_laminate_table);
+END_ENTITY;
+
+
+ENTITY point
+ SUPERTYPE OF (ONEOF (cartesian_point, point_on_curve, point_on_surface, point_replica, degenerate_pcurve))
+ SUBTYPE OF (geometric_representation_item);
+END_ENTITY;
+
+
+ENTITY point_and_vector
+ SUBTYPE OF (compound_representation_item, geometric_representation_item);
+ SELF\compound_representation_item.item_element : point_and_vector_members;
+END_ENTITY;
+
+
+ENTITY point_on_curve
+ SUBTYPE OF (point);
+ basis_curve : curve;
+ point_parameter : parameter_value;
+END_ENTITY;
+
+
+ENTITY point_on_surface
+ SUBTYPE OF (point);
+ basis_surface : surface;
+ point_parameter_u : parameter_value;
+ point_parameter_v : parameter_value;
+END_ENTITY;
+
+
+ENTITY point_path
+ SUBTYPE OF (compound_representation_item, geometric_representation_item);
+ SELF\compound_representation_item.item_element : point_path_members;
+END_ENTITY;
+
+
+ENTITY point_replica
+ SUBTYPE OF (point);
+ parent_pt : point;
+ transformation : cartesian_transformation_operator;
+WHERE
+ WR1 : transformation.dim = parent_pt.dim;
+ WR2 : acyclic_point_replica (SELF,parent_pt);
+END_ENTITY;
+
+
+ENTITY point_style
+ SUBTYPE OF (founded_item);
+ name : label;
+ marker : marker_select;
+ marker_size : size_select;
+ marker_colour : colour;
+END_ENTITY;
+
+
+ENTITY polar_complex_number_literal
+ SUBTYPE OF (generic_literal);
+ radius : REAL;
+ angle : REAL;
+WHERE
+ WR1 : radius >= 0;
+ WR2 : { 0 <= angle < 2*PI };
+END_ENTITY;
+
+
+ENTITY poly_loop
+ SUBTYPE OF (loop, geometric_representation_item);
+ polygon : LIST [3:?] OF UNIQUE cartesian_point;
+END_ENTITY;
+
+
+ENTITY polyline
+ SUBTYPE OF (bounded_curve);
+ points : LIST [2:?] OF cartesian_point;
+END_ENTITY;
+
+
+ENTITY position_tolerance
+ SUBTYPE OF (geometric_tolerance);
+WHERE
+ WR1 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'GEOMETRIC_TOLERANCE_WITH_DATUM_REFERENCE' IN TYPEOF (SELF)) OR ( SIZEOF (SELF\geometric_tolerance_with_datum_reference.datum_system) <= 3);
+END_ENTITY;
+
+
+ENTITY positioned_sketch
+ SUBTYPE OF (geometric_representation_item);
+ sketch_basis : sketch_basis_select;
+ auxiliary_elements : SET [0:?] OF auxiliary_geometric_representation_item;
+WHERE
+ WR1 : NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_BOUNDED_SURFACE' IN
+ TYPEOF(sketch_basis)) AND NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PLANE' IN
+ TYPEOF(sketch_basis\curve_bounded_surface.basis_surface)));
+ WR2 : NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_SURFACE' IN TYPEOF(sketch_basis)) AND
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PLANE' IN TYPEOF(sketch_basis\face_surface.face_geometry)));
+ WR3 : SIZEOF(QUERY(q <* auxiliary_elements | (SIZEOF(TYPEOF(q) *
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT','AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE']) = 0))) = 0;
+ WR4 : SIZEOF(QUERY(q <* auxiliary_elements |
+ q\geometric_representation_item.dim <> 3)) = 0;
+END_ENTITY;
+
+
+ENTITY power_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POWER_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY power_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) = dimensions_for_si_unit (si_unit_name.watt);
+END_ENTITY;
+
+
+ENTITY pre_defined_colour
+ SUBTYPE OF (pre_defined_item, colour);
+END_ENTITY;
+
+
+ENTITY pre_defined_curve_font
+ SUBTYPE OF (pre_defined_item);
+END_ENTITY;
+
+
+ENTITY pre_defined_dimension_symbol
+ SUBTYPE OF (pre_defined_symbol);
+WHERE
+ WR1 : SELF.name IN [ 'arc length' , 'conical taper' , 'counterbore' , 'countersink' , 'depth' , 'diameter' , 'plus minus' , 'radius' , 'slope' , 'spherical diameter' , 'spherical radius' , 'square'];
+END_ENTITY;
+
+
+ENTITY pre_defined_geometrical_tolerance_symbol
+ SUBTYPE OF (pre_defined_symbol);
+WHERE
+ WR1 : SELF.name IN ['angularity' , 'basic dimension' , 'blanked datum reference' , 'circular runout' , 'circularity' , 'concentricity' , 'cylindricity' , 'datum target identification' , 'diameter' , 'filled datum reference' , 'flatness' , 'least material condition' , 'maximum material condition' , 'parallelism' , 'perpendicularity' , 'position' , 'profile of a line' , 'profile of a surface' , 'projected tolerance zone' , 'regardless of feature size' , 'straightness' , 'symmetry' , 'total runout' ];
+END_ENTITY;
+
+
+ENTITY pre_defined_item;
+ name : label;
+END_ENTITY;
+
+
+ENTITY pre_defined_marker
+ SUBTYPE OF (pre_defined_item);
+END_ENTITY;
+
+
+ENTITY pre_defined_point_marker_symbol
+ SUBTYPE OF (pre_defined_marker, pre_defined_symbol);
+WHERE
+ WR1 : SELF.name IN ['asterisk','circle','dot','plus','square','triangle','x'];
+END_ENTITY;
+
+
+ENTITY pre_defined_surface_condition_symbol
+ SUBTYPE OF (pre_defined_symbol);
+WHERE
+ WR1 : SELF.name IN ['000' , '010' , '020' , '030' , '040' , '050' , '060' , '070' , '001' , '011' , '021' , '031' , '041' , '051' , '061' , '071' , '100' , '110' , '120' , '130' , '140' , '150' , '160' , '170' , '101' , '111' , '121' , '131' , '141' , '151' , '161' , '171' , '200' , '210' , '220' , '230' , '240' , '250' , '260' , '270' , '201' , '211' , '221' , '231' , '241' , '251' , '261' , '271'];
+END_ENTITY;
+
+
+ENTITY pre_defined_surface_side_style
+ SUBTYPE OF (pre_defined_item);
+END_ENTITY;
+
+
+ENTITY pre_defined_symbol
+ SUBTYPE OF (pre_defined_item);
+END_ENTITY;
+
+
+ENTITY pre_defined_terminator_symbol
+ SUBTYPE OF (pre_defined_symbol);
+WHERE
+ WR1 : SELF.name IN ['blanked arrow', 'blanked box', 'blanked dot', 'blanked triangle', 'dimension origin', 'filled arrow', 'filled box', 'filled dot', 'integral symbol', 'open arrow', 'slash', 'unfilled arrow', 'unfilled triangle', 'filled triangle'];
+END_ENTITY;
+
+
+ENTITY pre_defined_text_font
+ SUBTYPE OF (pre_defined_item);
+END_ENTITY;
+
+
+ENTITY pre_defined_tile
+ SUBTYPE OF (pre_defined_item);
+END_ENTITY;
+
+
+ENTITY precision_qualifier;
+ precision_value : INTEGER;
+END_ENTITY;
+
+
+ENTITY predefined_picture_representation_item
+ SUBTYPE OF (picture_representation_item);
+WHERE
+ WR1 : SELF\representation_item.name IN pre_defined_picture_representation_types;
+END_ENTITY;
+
+
+ENTITY presentation_area
+ SUBTYPE OF (presentation_representation);
+WHERE
+ WR1 : ((SIZEOF (QUERY (ais <* USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'AREA_IN_SET.AREA') |
+ SIZEOF (USEDIN (ais, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRESENTATION_SIZE.UNIT')) =1)) > 0) OR
+ (SIZEOF (USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRESENTATION_SIZE.UNIT')) =1));
+END_ENTITY;
+
+
+ENTITY presentation_layer_assignment;
+ name : label;
+ description : text;
+ assigned_items : SET [1:?] OF layered_item;
+END_ENTITY;
+
+
+ENTITY presentation_representation
+ SUPERTYPE OF (ONEOF (presentation_area, presentation_view))
+ SUBTYPE OF (representation);
+ SELF\representation.context_of_items : geometric_representation_context;
+WHERE
+ WR1 : SELF\representation.
+ context_of_items\geometric_representation_context.
+ coordinate_space_dimension = 2;
+ WR2 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRESENTATION_AREA' IN TYPEOF (SELF))
+ OR
+ (SIZEOF (QUERY (prr <* USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'REPRESENTATION_RELATIONSHIP.REP_2') |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRESENTATION_REPRESENTATION' IN
+ TYPEOF (prr\representation_relationship.rep_1))) > 0)
+ OR
+ (SIZEOF(QUERY( rm <* USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'REPRESENTATION_MAP.'+
+ 'MAPPED_REPRESENTATION') |
+ SIZEOF(QUERY( mi <* USEDIN(rm, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'MAPPED_ITEM.'+
+ 'MAPPING_SOURCE') |
+ SIZEOF(QUERY( rep <* using_representations (mi) |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'PRESENTATION_REPRESENTATION' IN
+ TYPEOF (rep))) > 0
+ )) > 0))
+ > 0);
+END_ENTITY;
+
+
+ENTITY presentation_set;
+INVERSE
+ areas: SET [1:?] OF area_in_set FOR in_set;
+END_ENTITY;
+
+
+ENTITY presentation_size;
+ unit : presentation_size_assignment_select;
+ size : planar_box;
+UNIQUE
+ UR1 : unit;
+WHERE
+ WR1 : (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRESENTATION_REPRESENTATION'
+ IN TYPEOF (SELF.unit)) AND
+ item_in_context (SELF.size,
+ SELF.unit\representation.context_of_items)
+ )
+ OR
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AREA_IN_SET'
+ IN TYPEOF (SELF.unit)) AND
+ (SIZEOF (QUERY ( ais <* SELF.unit\area_in_set.in_set.areas |
+ NOT item_in_context (SELF.size, ais.area\representation.
+ context_of_items) )) = 0));
+END_ENTITY;
+
+
+ENTITY presentation_style_assignment
+ SUBTYPE OF (founded_item);
+ styles : SET [1:?] OF presentation_style_select;
+WHERE
+ WR1 : SIZEOF (QUERY (style1 <* SELF.styles |
+ NOT (SIZEOF (QUERY (style2 <* (SELF.styles - style1) |
+ NOT ((TYPEOF (style1) <> TYPEOF (style2)) OR
+ (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'SURFACE_STYLE_USAGE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'EXTERNALLY_DEFINED_STYLE'] *
+ TYPEOF (style1)) = 1)
+ ))) = 0
+ ))) = 0;
+ WR2 : SIZEOF (QUERY (style1 <* SELF.styles |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE' IN
+ TYPEOF(style1)
+ )) <= 2;
+ WR3 : SIZEOF (QUERY (style1 <* SELF.styles |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE' IN TYPEOF (style1)) AND
+ (SIZEOF (QUERY (style2 <* (SELF.styles - style1) |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_STYLE_USAGE' IN TYPEOF (style2)) AND
+ ((style1\surface_style_usage.side = both) OR
+ (style2\surface_style_usage.side = both) OR
+ (style1\surface_style_usage.side = style2\surface_style_usage.side)) )) > 0))) = 0;
+END_ENTITY;
+
+
+ENTITY presentation_style_by_context
+ SUBTYPE OF (presentation_style_assignment);
+ style_context : style_context_select;
+END_ENTITY;
+
+
+ENTITY presentation_view
+ SUBTYPE OF (presentation_representation);
+END_ENTITY;
+
+
+ENTITY presented_item
+ ABSTRACT SUPERTYPE;
+END_ENTITY;
+
+
+ENTITY presented_item_representation;
+ presentation : presentation_representation_select;
+ item : presented_item;
+END_ENTITY;
+
+
+ENTITY pressure_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRESSURE_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY pressure_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) = dimensions_for_si_unit (si_unit_name.pascal);
+END_ENTITY;
+
+
+ENTITY procedural_representation
+ SUBTYPE OF (representation);
+ SELF\representation.items : SET [1:?] OF procedural_representation_sequence;
+END_ENTITY;
+
+
+ENTITY procedural_representation_sequence
+ SUBTYPE OF (representation_item);
+ elements : LIST [1:?] OF representation_item;
+ suppressed_items : SET [0:?] OF representation_item;
+ rationale : text;
+WHERE
+ WR1 : SIZEOF(QUERY(q <* suppressed_items | NOT (q IN elements))) = 0;
+END_ENTITY;
+
+
+ENTITY procedural_shape_representation
+ SUBTYPE OF (procedural_representation, shape_representation);
+ SELF\representation.items : SET [1:?] OF procedural_shape_representation_sequence;
+END_ENTITY;
+
+
+ENTITY procedural_shape_representation_sequence
+ SUBTYPE OF (geometric_representation_item, procedural_representation_sequence);
+WHERE
+ WR1 : SIZEOF(QUERY(q <* SELF\procedural_representation_sequence.elements
+ | NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHAPE_REPRESENTATION_ITEM'
+ IN TYPEOF(q)))) = 0;
+END_ENTITY;
+
+
+ENTITY product;
+ id : identifier;
+ name : label;
+ description : OPTIONAL text;
+ frame_of_reference : SET [1:?] OF product_context;
+END_ENTITY;
+
+
+ENTITY product_category;
+ name : label;
+ description : OPTIONAL text;
+DERIVE
+ id : identifier := get_id_value(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY product_class
+ SUBTYPE OF (product_concept, characterized_object);
+END_ENTITY;
+
+
+ENTITY product_concept;
+ id : identifier;
+ name : label;
+ description : OPTIONAL text;
+ market_context : product_concept_context;
+UNIQUE
+ UR1 : id;
+END_ENTITY;
+
+
+ENTITY product_concept_context
+ SUBTYPE OF (application_context_element);
+ market_segment_type : label;
+END_ENTITY;
+
+
+ENTITY product_concept_feature;
+ id : identifier;
+ name : label;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY product_concept_feature_association;
+ name : label;
+ description : OPTIONAL text;
+ concept : product_concept;
+ feature : product_concept_feature;
+END_ENTITY;
+
+
+ENTITY product_concept_feature_category
+ SUBTYPE OF (group);
+WHERE
+ WR1 : SIZEOF(QUERY
+ (
+ aga <* USEDIN( SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'GROUP_ASSIGNMENT.ASSIGNED_GROUP' )
+ |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'APPLIED_GROUP_ASSIGNMENT' IN TYPEOF(aga))
+ AND
+ (
+ ( aga.role.name <> 'specification category member' )
+ OR
+ ( SIZEOF(QUERY
+ (
+ i <* aga.items
+ |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'PRODUCT_CONCEPT_FEATURE' IN TYPEOF ( i ) )
+ AND
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'CONDITIONAL_CONCEPT_FEATURE' IN TYPEOF (i))
+ )
+ ) <> SIZEOF (aga.items)
+ )
+ )
+ )
+ ) =0;
+END_ENTITY;
+
+
+ENTITY product_concept_feature_category_usage
+ SUBTYPE OF (group_assignment);
+ items : SET [1:?] OF category_usage_item;
+ SELF\group_assignment.assigned_group : product_concept_feature_category;
+WHERE
+ WR1 : SELF.role.name IN [ 'mandatory category usage', 'optional category usage' ];
+END_ENTITY;
+
+
+ENTITY product_concept_relationship;
+ name : label;
+ description : OPTIONAL text;
+ relating_product_concept : product_concept;
+ related_product_concept : product_concept;
+END_ENTITY;
+
+
+ENTITY product_context
+ SUBTYPE OF (application_context_element);
+ discipline_type : label;
+END_ENTITY;
+
+
+ENTITY product_definition
+ SUPERTYPE OF (ONEOF (composite_assembly_definition, composite_assembly_sequence_definition, laminate_table, percentage_laminate_definition, percentage_ply_definition, ply_laminate_definition, ply_laminate_sequence_definition, thickness_laminate_definition));
+ id : identifier;
+ description : OPTIONAL text;
+ formation : product_definition_formation;
+ frame_of_reference : product_definition_context;
+DERIVE
+ name : label := get_name_value(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'NAME_ATTRIBUTE.NAMED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY product_definition_context
+ SUBTYPE OF (application_context_element);
+ life_cycle_stage : label;
+END_ENTITY;
+
+
+ENTITY product_definition_context_association;
+ definition : product_definition;
+ frame_of_reference : product_definition_context;
+ role : product_definition_context_role;
+END_ENTITY;
+
+
+ENTITY product_definition_context_role;
+ name : label;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY product_definition_effectivity
+ SUBTYPE OF (effectivity);
+ usage : product_definition_relationship;
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'EFFECTIVITY_ASSIGNMENT.ASSIGNED_EFFECTIVITY')) = 0;
+END_ENTITY;
+
+
+ENTITY product_definition_element_relationship
+ SUBTYPE OF (group);
+END_ENTITY;
+
+
+ENTITY product_definition_formation;
+ id : identifier;
+ description : OPTIONAL text;
+ of_product : product;
+UNIQUE
+ UR1 : id, of_product;
+END_ENTITY;
+
+
+ENTITY product_definition_formation_relationship;
+ id : identifier;
+ name : label;
+ description : OPTIONAL text;
+ relating_product_definition_formation : product_definition_formation;
+ related_product_definition_formation : product_definition_formation;
+END_ENTITY;
+
+
+ENTITY product_definition_formation_with_specified_source
+ SUBTYPE OF (product_definition_formation);
+ make_or_buy : source;
+END_ENTITY;
+
+
+ENTITY product_definition_group_assignment
+ SUBTYPE OF (group_assignment);
+ items : SET [1:1] OF product_definition_or_product_definition_relationship;
+ SELF\group_assignment.assigned_group : product_definition_element_relationship;
+END_ENTITY;
+
+
+ENTITY product_definition_occurrence_relationship;
+ name : label;
+ description : OPTIONAL text;
+ occurrence : product_definition;
+ occurrence_usage : assembly_component_usage;
+WHERE
+ WR1 : occurrence_usage.relating_product_definition :<>:
+ occurrence;
+ WR2 : occurrence_usage.related_product_definition :<>:
+ occurrence;
+ WR3 : occurrence.formation :=:
+ occurrence_usage.related_product_definition.formation;
+END_ENTITY;
+
+
+ENTITY product_definition_relationship;
+ id : identifier;
+ name : label;
+ description : OPTIONAL text;
+ relating_product_definition : product_definition;
+ related_product_definition : product_definition;
+END_ENTITY;
+
+
+ENTITY product_definition_shape
+ SUBTYPE OF (property_definition);
+UNIQUE
+ UR1: SELF\property_definition.definition;
+WHERE
+ WR1 : SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CHARACTERIZED_PRODUCT_DEFINITION', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CHARACTERIZED_OBJECT'] * TYPEOF(SELF\property_definition.definition)) > 0;
+END_ENTITY;
+
+
+ENTITY product_definition_substitute;
+ description : OPTIONAL text;
+ context_relationship : product_definition_relationship;
+ substitute_definition : product_definition;
+DERIVE
+ name : label := get_name_value(SELF);
+WHERE
+ WR1 : context_relationship.related_product_definition :<>: substitute_definition;
+ WR2 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'NAME_ATTRIBUTE.NAMED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY product_definition_usage
+ SUPERTYPE OF (ONEOF (make_from_usage_option, assembly_component_usage))
+ SUBTYPE OF (product_definition_relationship);
+UNIQUE
+ UR1: SELF\product_definition_relationship.id,
+ SELF\product_definition_relationship.relating_product_definition,
+ SELF\product_definition_relationship.related_product_definition;
+ WHERE
+ WR1 : acyclic_product_definition_relationship
+ (SELF,
+ [SELF\product_definition_relationship.related_product_definition],
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION_USAGE');
+END_ENTITY;
+
+
+ENTITY product_definition_with_associated_documents
+ SUBTYPE OF (product_definition);
+ documentation_ids : SET [1:?] OF document;
+END_ENTITY;
+
+
+ENTITY product_identification
+ SUBTYPE OF (configuration_item, characterized_object);
+ SELF\configuration_item.item_concept : product_class;
+WHERE
+ WR1 : SIZEOF(QUERY
+ ( cd <* USEDIN ( SELF ,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONFIGURATION_DESIGN.CONFIGURATION' )
+ |
+ ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'PRODUCT_DEFINITION_FORMATION' IN TYPEOF ( cd. design ) )
+ AND
+ ( SIZEOF ( QUERY
+ (
+ prpc <* USEDIN ( cd. design\product_definition_formation.of_product , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS')
+ |
+ prpc. name IN ['part' , 'raw material' , 'tool'] ) ) >0
+ )
+ )
+ ) <=1;
+ WR2 : NOT ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'CONFIGURABLE_ITEM' IN TYPEOF( SELF ) )
+ XOR ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'PRODUCT_SPECIFICATION' IN TYPEOF ( SELF ) );
+END_ENTITY;
+
+
+ENTITY product_material_composition_relationship
+ SUBTYPE OF (product_definition_relationship);
+ class : label;
+ constituent_amount : SET [1:?] OF characterized_product_composition_value;
+ composition_basis : label;
+ determination_method : text;
+END_ENTITY;
+
+
+ENTITY product_related_product_category
+ SUBTYPE OF (product_category);
+ products : SET [1:?] OF product;
+END_ENTITY;
+
+
+ENTITY product_specification
+ SUBTYPE OF (product_identification, configurable_item);
+END_ENTITY;
+
+
+ENTITY projected_zone_definition
+ SUBTYPE OF (tolerance_zone_definition);
+ projection_end : shape_aspect;
+ projected_length : measure_with_unit;
+WHERE
+ WR1 : ('NUMBER' IN TYPEOF
+ (projected_length\measure_with_unit.value_component)) AND
+ (projected_length\measure_with_unit.value_component > 0.0);
+ WR2 : (derive_dimensional_exponents
+ (projected_length\measure_with_unit.unit_component)=
+ dimensional_exponents(1,0,0,0,0,0,0));
+END_ENTITY;
+
+
+ENTITY projection_curve
+ SUBTYPE OF (annotation_curve_occurrence);
+END_ENTITY;
+
+
+ENTITY projection_directed_callout
+ SUBTYPE OF (draughting_callout);
+WHERE
+ WR1 : SIZEOF(QUERY(p_1<*SELF\draughting_callout.contents |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PROJECTION_CURVE' IN (TYPEOF(p_1))))=1;
+ WR2 : SIZEOF(SELF\draughting_callout.contents) >=2;
+END_ENTITY;
+
+
+ENTITY promissory_usage_occurrence
+ SUBTYPE OF (assembly_component_usage);
+END_ENTITY;
+
+
+ENTITY property_definition;
+ name : label;
+ description : OPTIONAL text;
+ definition : characterized_definition;
+DERIVE
+ id : identifier := get_id_value(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY property_definition_relationship;
+ name : label;
+ description : text;
+ relating_property_definition : property_definition;
+ related_property_definition : property_definition;
+END_ENTITY;
+
+
+ENTITY property_definition_representation;
+ definition : represented_definition;
+ used_representation : representation;
+DERIVE
+ description : text := get_description_value(SELF);
+ name : label := get_name_value(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
+ WR2 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'NAME_ATTRIBUTE.NAMED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY qualified_representation_item
+ SUBTYPE OF (representation_item);
+ qualifiers : SET [1:?] OF value_qualifier;
+WHERE
+ WR1 : SIZEOF(QUERY(temp <* qualifiers |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRECISION_QUALIFIER'
+ IN TYPEOF(temp))) < 2;
+END_ENTITY;
+
+
+ENTITY qualitative_uncertainty
+ SUBTYPE OF (uncertainty_qualifier);
+ uncertainty_value : text;
+END_ENTITY;
+
+
+ENTITY quantified_assembly_component_usage
+ SUBTYPE OF (assembly_component_usage);
+ quantity : measure_with_unit;
+WHERE
+ WR1 : (NOT ('NUMBER' IN TYPEOF(quantity.value_component)))
+ OR (quantity.value_component > 0);
+END_ENTITY;
+
+
+ENTITY quasi_uniform_curve
+ SUBTYPE OF (b_spline_curve);
+END_ENTITY;
+
+
+ENTITY quasi_uniform_surface
+ SUBTYPE OF (b_spline_surface);
+END_ENTITY;
+
+
+ENTITY radioactivity_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.RADIOACTIVITY_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY radioactivity_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) = dimensions_for_si_unit (si_unit_name.becquerel);
+END_ENTITY;
+
+
+ENTITY radius_dimension
+ SUBTYPE OF (dimension_curve_directed_callout);
+WHERE
+ WR1 : SIZEOF (QUERY (con <* SELF.contents |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PROJECTION_CURVE' IN TYPEOF (con)))<=1;
+END_ENTITY;
+
+
+ENTITY range_characteristic
+ SUBTYPE OF (representation, descriptive_representation_item);
+WHERE
+ WR1 : NOT(SELF\representation.name IN ['tolerance', 'minimum tolerance', 'maximum tolerance',
+ 'nominal tolerance', 'plus minus tolerance', 'symmetrical tolerance', 'statistical tolerance']);
+END_ENTITY;
+
+
+ENTITY ratio_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.RATIO_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY ratio_unit
+ SUBTYPE OF (named_unit);
+WHERE
+ WR1 : (SELF\named_unit.dimensions.length_exponent = 0.0) AND (SELF\named_unit.dimensions.mass_exponent = 0.0) AND (SELF\named_unit.dimensions.time_exponent = 0.0) AND (SELF\named_unit.dimensions.electric_current_exponent = 0.0) AND (SELF\named_unit.dimensions.thermodynamic_temperature_exponent = 0.0) AND (SELF\named_unit.dimensions.amount_of_substance_exponent = 0.0) AND (SELF\named_unit.dimensions.luminous_intensity_exponent = 0.0);
+END_ENTITY;
+
+
+ENTITY rational_b_spline_curve
+ SUBTYPE OF (b_spline_curve);
+ weights_data : LIST [2:?] OF REAL;
+DERIVE
+ weights : ARRAY [0:upper_index_on_control_points] OF REAL := list_to_array(weights_data,0,
+ upper_index_on_control_points);
+WHERE
+ WR1 : SIZEOF(weights_data) = SIZEOF(SELF\b_spline_curve.
+ control_points_list);
+ WR2 : curve_weights_positive(SELF);
+END_ENTITY;
+
+
+ENTITY rational_b_spline_surface
+ SUBTYPE OF (b_spline_surface);
+ weights_data : LIST [2:?] OF LIST [2:?] OF REAL;
+DERIVE
+ weights : ARRAY [0:u_upper] OF ARRAY [0:v_upper] OF REAL := make_array_of_array(weights_data,0,u_upper,0,v_upper);
+WHERE
+ WR1 : (SIZEOF(weights_data) =
+ SIZEOF(SELF\b_spline_surface.control_points_list))
+ AND (SIZEOF(weights_data[1]) =
+ SIZEOF(SELF\b_spline_surface.control_points_list[1]));
+ WR2 : surface_weights_positive(SELF);
+END_ENTITY;
+
+
+ENTITY rational_representation_item
+ SUBTYPE OF (representation_item, slash_expression);
+WHERE
+ WR1 : SIZEOF( QUERY( operand <* SELF\binary_generic_expression.operands |
+ NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.INT_LITERAL' IN TYPEOF(operand)))) = 0;
+END_ENTITY;
+
+
+ENTITY real_literal
+ SUBTYPE OF (literal_number);
+ SELF\literal_number.the_value : REAL;
+END_ENTITY;
+
+
+ENTITY real_representation_item
+ SUBTYPE OF (representation_item, real_literal);
+END_ENTITY;
+
+
+ENTITY rectangular_composite_surface
+ SUBTYPE OF (bounded_surface);
+ segments : LIST [1:?] OF LIST [1:?] OF surface_patch;
+DERIVE
+ n_u : INTEGER := SIZEOF(segments);
+ n_v : INTEGER := SIZEOF(segments[1]);
+WHERE
+ WR1 : SIZEOF(QUERY (s <* segments | n_v <> SIZEOF (s))) = 0;
+ WR2 : constraints_rectangular_composite_surface(SELF);
+END_ENTITY;
+
+
+ENTITY rectangular_trimmed_surface
+ SUBTYPE OF (bounded_surface);
+ basis_surface : surface;
+ u1 : parameter_value;
+ u2 : parameter_value;
+ v1 : parameter_value;
+ v2 : parameter_value;
+ usense : BOOLEAN;
+ vsense : BOOLEAN;
+WHERE
+ WR1 : u1 <> u2;
+ WR2 : v1 <> v2;
+ WR3 : (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ELEMENTARY_SURFACE' IN TYPEOF(basis_surface))
+ AND (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PLANE' IN TYPEOF(basis_surface)))) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_OF_REVOLUTION' IN TYPEOF(basis_surface))
+ OR (usense = (u2 > u1));
+ WR4 : (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SPHERICAL_SURFACE' IN TYPEOF(basis_surface))
+ OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TOROIDAL_SURFACE' IN TYPEOF(basis_surface)))
+ OR (vsense = (v2 > v1));
+END_ENTITY;
+
+
+ENTITY referenced_modified_datum
+ SUBTYPE OF (datum_reference);
+ modifier : limit_condition;
+END_ENTITY;
+
+
+ENTITY relative_event_occurrence
+ SUBTYPE OF (event_occurrence);
+ base_event : event_occurrence;
+ offset : time_measure_with_unit;
+END_ENTITY;
+
+
+ENTITY rep_item_group
+ SUBTYPE OF (group, representation_item);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'PRESENTATION_LAYER_ASSIGNMENT.' + 'ASSIGNED_ITEMS')) > 0;
+ WR2 : SIZEOF(QUERY(r <* USEDIN(SELF,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'REPRESENTATION.' + 'ITEMS') | r.name = 'group representation')) > 0;
+ WR3 : SIZEOF(QUERY(ga <* USEDIN(SELF,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'GROUP_ASSIGNMENT.' + 'ASSIGNED_GROUP') | ga.role.name <> 'group membership')) = 0;
+ WR4 : SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'GEOMETRIC_REPRESENTATION_ITEM', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'TOPOLOGICAL_REPRESENTATION_ITEM', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'MAPPED_ITEM','AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'STYLED_ITEM'] * TYPEOF(SELF)) = 1;
+END_ENTITY;
+
+
+ENTITY reparametrised_composite_curve_segment
+ SUBTYPE OF (composite_curve_segment);
+ param_length : parameter_value;
+WHERE
+ WR1 : param_length > 0.0;
+END_ENTITY;
+
+
+ENTITY representation;
+ name : label;
+ items : SET [1:?] OF representation_item;
+ context_of_items : representation_context;
+DERIVE
+ description : text := get_description_value (SELF);
+ id : identifier := get_id_value (SELF);
+WHERE
+ WR1 : SIZEOF (USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'ID_ATTRIBUTE.IDENTIFIED_ITEM'))
+ <= 1;
+ WR2 : SIZEOF (USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM'))
+ <= 1;
+END_ENTITY;
+
+
+ENTITY representation_context;
+ context_identifier : identifier;
+ context_type : text;
+INVERSE
+ representations_in_context: SET [1:?] OF representation FOR context_of_items;
+END_ENTITY;
+
+
+ENTITY representation_item
+ SUPERTYPE OF (ONEOF (binary_representation_item, compound_representation_item, mapped_item, value_representation_item, mapped_item, styled_item, boolean_representation_item, date_representation_item, date_time_representation_item, integer_representation_item, logical_representation_item, rational_representation_item, real_representation_item));
+ name : label;
+WHERE
+ WR1 : SIZEOF(using_representations(SELF)) > 0;
+END_ENTITY;
+
+
+ENTITY representation_item_relationship;
+ name : label;
+ description : OPTIONAL text;
+ relating_representation_item : representation_item;
+ related_representation_item : representation_item;
+END_ENTITY;
+
+
+ENTITY representation_map;
+ mapping_origin : representation_item;
+ mapped_representation : representation;
+INVERSE
+ map_usage: SET [1:?] OF mapped_item FOR mapping_source;
+WHERE
+ WR1 : item_in_context(SELF.mapping_origin,
+ SELF.mapped_representation.context_of_items);
+END_ENTITY;
+
+
+ENTITY representation_relationship;
+ name : label;
+ description : OPTIONAL text;
+ rep_1 : representation;
+ rep_2 : representation;
+END_ENTITY;
+
+
+ENTITY representation_relationship_with_transformation
+ SUBTYPE OF (representation_relationship);
+ transformation_operator : transformation;
+WHERE
+ WR1 : SELF\representation_relationship.rep_1.context_of_items
+ :<>: SELF\representation_relationship.rep_2.context_of_items;
+END_ENTITY;
+
+
+ENTITY requirement_assigned_object
+ SUBTYPE OF (group_assignment);
+ items : SET [1:1] OF requirement_assigned_item;
+ SELF\group_assignment.assigned_group : requirement_assignment;
+END_ENTITY;
+
+
+ENTITY requirement_assignment
+ SUBTYPE OF (characterized_object, group);
+END_ENTITY;
+
+
+ENTITY requirement_source
+ SUBTYPE OF (group);
+END_ENTITY;
+
+
+ENTITY requirement_view_definition_relationship
+ SUBTYPE OF (product_definition_relationship);
+END_ENTITY;
+
+
+ENTITY resistance_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.RESISTANCE_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY resistance_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) = dimensions_for_si_unit (si_unit_name.ohm);
+END_ENTITY;
+
+
+ENTITY revolved_area_solid
+ SUBTYPE OF (swept_area_solid);
+ axis : axis1_placement;
+ angle : plane_angle_measure;
+DERIVE
+ axis_line : line := representation_item('')||
+ geometric_representation_item()|| curve()||
+ line(axis.location, representation_item('')||
+ geometric_representation_item()||
+ vector(axis.z, 1.0));
+END_ENTITY;
+
+
+ENTITY revolved_face_solid
+ SUBTYPE OF (swept_face_solid);
+ axis : axis1_placement;
+ angle : plane_angle_measure;
+DERIVE
+ axis_line : line := representation_item('')||
+ geometric_representation_item()|| curve()||
+ line(axis.location, representation_item('')||
+ geometric_representation_item()||
+ vector(axis.z, 1.0));
+END_ENTITY;
+
+
+ENTITY revolved_face_solid_with_trim_conditions
+ SUBTYPE OF (revolved_face_solid);
+ first_trim_condition : trim_condition_select;
+ second_trim_condition : trim_condition_select;
+WHERE
+ WR1 : NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LENGTH_MEASURE'
+ IN TYPEOF(first_trim_condition))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LENGTH_MEASURE'
+ IN TYPEOF(second_trim_condition)));
+ WR2 : NOT((('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PLANE_ANGLE_MEASURE'
+ IN TYPEOF(first_trim_condition)) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PLANE_ANGLE_MEASURE'
+ IN TYPEOF(second_trim_condition))) AND
+ (first_trim_condition = second_trim_condition));
+END_ENTITY;
+
+
+ENTITY right_angular_wedge
+ SUBTYPE OF (geometric_representation_item);
+ position : axis2_placement_3d;
+ x : positive_length_measure;
+ y : positive_length_measure;
+ z : positive_length_measure;
+ ltx : length_measure;
+WHERE
+ WR1 : ((0.0 <= ltx) AND (ltx < x));
+END_ENTITY;
+
+
+ENTITY right_circular_cone
+ SUBTYPE OF (geometric_representation_item);
+ position : axis1_placement;
+ height : positive_length_measure;
+ radius : length_measure;
+ semi_angle : plane_angle_measure;
+WHERE
+ WR1 : radius >= 0.0;
+END_ENTITY;
+
+
+ENTITY right_circular_cylinder
+ SUBTYPE OF (geometric_representation_item);
+ position : axis1_placement;
+ height : positive_length_measure;
+ radius : positive_length_measure;
+END_ENTITY;
+
+
+ENTITY right_to_usage_association
+ SUBTYPE OF (action_method_relationship);
+ SELF\action_method_relationship.related_method : information_right;
+ SELF\action_method_relationship.relating_method : information_usage_right;
+DERIVE
+ right_applied : information_right := SELF\action_method_relationship.related_method;
+ right_usage : information_usage_right := SELF\action_method_relationship.relating_method;
+END_ENTITY;
+
+
+ENTITY role_association;
+ role : object_role;
+ item_with_role : role_select;
+END_ENTITY;
+
+
+ENTITY roundness_tolerance
+ SUBTYPE OF (geometric_tolerance);
+WHERE
+ WR1 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'GEOMETRIC_TOLERANCE_WITH_DATUM_REFERENCE' IN TYPEOF (SELF));
+END_ENTITY;
+
+
+ENTITY row_representation_item
+ SUBTYPE OF (compound_representation_item);
+ SELF\compound_representation_item.item_element : list_representation_item;
+END_ENTITY;
+
+
+ENTITY row_value
+ SUBTYPE OF (compound_representation_item);
+END_ENTITY;
+
+
+ENTITY row_variable
+ SUBTYPE OF (abstract_variable);
+END_ENTITY;
+
+
+ENTITY rule_action
+ SUBTYPE OF (action);
+END_ENTITY;
+
+
+ENTITY rule_condition
+ SUBTYPE OF (atomic_formula);
+END_ENTITY;
+
+
+ENTITY rule_definition
+ SUBTYPE OF (rule_software_definition);
+END_ENTITY;
+
+
+ENTITY rule_set
+ SUBTYPE OF (rule_software_definition);
+END_ENTITY;
+
+
+ENTITY rule_set_group
+ SUBTYPE OF (rule_software_definition);
+END_ENTITY;
+
+
+ENTITY rule_software_definition
+ SUBTYPE OF (product_definition);
+END_ENTITY;
+
+
+ENTITY rule_superseded_assignment
+ SUBTYPE OF (action_assignment);
+ items : SET [1:?] OF rule_superseded_item;
+END_ENTITY;
+
+
+ENTITY rule_supersedence
+ SUBTYPE OF (rule_action);
+END_ENTITY;
+
+
+ENTITY ruled_surface_swept_area_solid
+ SUBTYPE OF (surface_curve_swept_area_solid);
+WHERE
+ WR1 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_SURFACE' IN TYPEOF(SELF.reference_surface)) AND
+ (SELF.reference_surface\b_spline_surface.u_degree = 1);
+ WR2 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE' IN TYPEOF(SELF.directrix)) OR
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_CURVE' IN TYPEOF(SELF.directrix\surface_curve.curve_3d))
+ AND
+ (SELF.directrix\surface_curve.curve_3d\b_spline_curve.degree =
+ SELF.reference_surface\b_spline_surface.v_degree));
+END_ENTITY;
+
+
+ENTITY runout_zone_definition
+ SUBTYPE OF (tolerance_zone_definition);
+ orientation : runout_zone_orientation;
+END_ENTITY;
+
+
+ENTITY runout_zone_orientation;
+ angle : measure_with_unit;
+END_ENTITY;
+
+
+ENTITY runout_zone_orientation_reference_direction
+ SUBTYPE OF (runout_zone_orientation);
+ orientation_defining_relationship : shape_aspect_relationship;
+END_ENTITY;
+
+
+ENTITY satisfied_requirement
+ SUBTYPE OF (group_assignment);
+ items : SET [1:1] OF product_definition;
+ SELF\group_assignment.assigned_group : satisfies_requirement;
+END_ENTITY;
+
+
+ENTITY satisfies_requirement
+ SUBTYPE OF (group);
+END_ENTITY;
+
+
+ENTITY satisfying_item
+ SUBTYPE OF (group_assignment);
+ items : SET [1:1] OF requirement_satisfaction_item;
+ SELF\group_assignment.assigned_group : satisfies_requirement;
+END_ENTITY;
+
+
+ENTITY scalar_variable
+ SUBTYPE OF (abstract_variable);
+END_ENTITY;
+
+
+ENTITY scattering_parameter
+ SUBTYPE OF (polar_complex_number_literal);
+WHERE
+ WR1 : SIZEOF(TYPEOF(SELF) - (TYPEOF(SELF\polar_complex_number_literal ||
+ SELF\scattering_parameter))) = 0;
+END_ENTITY;
+
+
+ENTITY sculptured_solid
+ SUBTYPE OF (modified_solid);
+ sculpturing_element : generalized_surface_select;
+ positive_side : BOOLEAN;
+END_ENTITY;
+
+
+ENTITY seam_curve
+ SUBTYPE OF (surface_curve);
+WHERE
+ WR1 : SIZEOF(SELF\surface_curve.associated_geometry) = 2;
+ WR2 : associated_surface(SELF\surface_curve.associated_geometry[1]) =
+ associated_surface(SELF\surface_curve.associated_geometry[2]);
+ WR3 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE' IN
+ TYPEOF(SELF\surface_curve.associated_geometry[1]);
+ WR4 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE' IN
+ TYPEOF(SELF\surface_curve.associated_geometry[2]);
+END_ENTITY;
+
+
+ENTITY security_classification;
+ name : label;
+ purpose : text;
+ security_level : security_classification_level;
+END_ENTITY;
+
+
+ENTITY security_classification_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_security_classification : security_classification;
+DERIVE
+ role : object_role := get_role(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ROLE_ASSOCIATION.ITEM_WITH_ROLE')) <= 1;
+END_ENTITY;
+
+
+ENTITY security_classification_level;
+ name : label;
+END_ENTITY;
+
+
+ENTITY serial_numbered_effectivity
+ SUBTYPE OF (effectivity);
+ effectivity_start_id : identifier;
+ effectivity_end_id : OPTIONAL identifier;
+END_ENTITY;
+
+
+ENTITY shape_aspect;
+ name : label;
+ description : OPTIONAL text;
+ of_shape : product_definition_shape;
+ product_definitional : LOGICAL;
+DERIVE
+ id : identifier := get_id_value(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY shape_aspect_associativity
+ SUBTYPE OF (shape_aspect_relationship);
+WHERE
+ WR1 : SELF.relating_shape_aspect.product_definitional;
+ WR2 : NOT (SELF.related_shape_aspect.product_definitional);
+END_ENTITY;
+
+
+ENTITY shape_aspect_deriving_relationship
+ SUBTYPE OF (shape_aspect_relationship);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DERIVED_SHAPE_ASPECT' IN
+TYPEOF
+ (SELF\SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT);
+END_ENTITY;
+
+
+ENTITY shape_aspect_relationship;
+ name : label;
+ description : OPTIONAL text;
+ relating_shape_aspect : shape_aspect;
+ related_shape_aspect : shape_aspect;
+DERIVE
+ id : identifier := get_id_value(SELF);
+WHERE
+ WR1 : SIZEOF(USEDIN(SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1;
+END_ENTITY;
+
+
+ENTITY shape_definition_representation
+ SUBTYPE OF (property_definition_representation);
+WHERE
+ WR1 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(SELF.definition)) OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHAPE_DEFINITION' IN TYPEOF(SELF.definition.definition));
+ WR2 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHAPE_REPRESENTATION' IN TYPEOF(SELF.used_representation);
+END_ENTITY;
+
+
+ENTITY shape_dimension_representation
+ SUBTYPE OF (shape_representation);
+WHERE
+ WR1 : SIZEOF (QUERY (temp <* SELF\representation.items |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MEASURE_REPRESENTATION_ITEM'
+ IN TYPEOF (temp)))) = 0;
+ WR2 : SIZEOF (SELF\representation.items) <= 3;
+ WR3 : SIZEOF (QUERY (pos_mri <* QUERY (real_mri <*
+ SELF\representation.items | 'REAL' IN TYPEOF
+ (real_mri\measure_with_unit.value_component) ) |
+ NOT (pos_mri\measure_with_unit.value_component > 0.0 ))) = 0;
+END_ENTITY;
+
+
+ENTITY shape_feature_definition
+ SUBTYPE OF (characterized_object);
+END_ENTITY;
+
+
+ENTITY shape_representation
+ SUBTYPE OF (representation);
+END_ENTITY;
+
+
+ENTITY shape_representation_relationship
+ SUBTYPE OF (representation_relationship);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHAPE_REPRESENTATION' IN (TYPEOF(SELF\representation_relationship.rep_1) + TYPEOF(SELF\representation_relationship.rep_2));
+END_ENTITY;
+
+
+ENTITY shape_representation_with_parameters
+ SUBTYPE OF (shape_representation);
+WHERE
+ WR1 : SIZEOF( QUERY( i <* SELF.items | SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PLACEMENT', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MEASURE_REPRESENTATION_ITEM', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DESCRIPTIVE_REPRESENTATION_ITEM'] * TYPEOF(i)) = 1 )) = SIZEOF(SELF.items);
+END_ENTITY;
+
+
+ENTITY shell_based_surface_model
+ SUBTYPE OF (geometric_representation_item);
+ sbsm_boundary : SET [1:?] OF shell;
+WHERE
+ WR1 : constraints_geometry_shell_based_surface_model(SELF);
+END_ENTITY;
+
+
+ENTITY shell_based_wireframe_model
+ SUBTYPE OF (geometric_representation_item);
+ sbwm_boundary : SET [1:?] OF shell;
+WHERE
+ WR1 : constraints_geometry_shell_based_wireframe_model(SELF);
+END_ENTITY;
+
+
+ENTITY shell_based_wireframe_shape_representation
+ SUBTYPE OF (shape_representation);
+WHERE
+ WR1 : SIZEOF (
+QUERY ( it <* SELF.items| NOT ( SIZEOF ([ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_WIREFRAME_MODEL', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT_3D' ] * TYPEOF (it)) = 1) )) = 0;
+ WR2 : SIZEOF (
+QUERY ( it <* SELF.items| ( SIZEOF ([ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_WIREFRAME_MODEL', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' ] * TYPEOF (it)) = 1) )) >= 1;
+ WR3 : SIZEOF (
+QUERY ( sbwm <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_WIREFRAME_MODEL' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( ws <*
+QUERY ( sb <* sbwm\shell_based_wireframe_model.sbwm_boundary| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.WIRE_SHELL' IN TYPEOF (sb)) )| NOT ( SIZEOF (
+QUERY ( eloop <*
+QUERY ( wsb <* ws\wire_shell.wire_shell_extent| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (wsb)) )| NOT ( SIZEOF (
+QUERY ( el <* eloop\path.edge_list| NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_CURVE' IN TYPEOF (el.edge_element)) )) = 0) )) = 0) )) = 0) )) = 0;
+ WR4 : SIZEOF (
+QUERY ( sbwm <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_WIREFRAME_MODEL' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( ws <*
+QUERY ( sb <* sbwm\shell_based_wireframe_model.sbwm_boundary| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.WIRE_SHELL' IN TYPEOF (sb)) )| NOT ( SIZEOF (
+QUERY ( eloop <*
+QUERY ( wsb <* ws\wire_shell.wire_shell_extent| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (wsb)) )| NOT ( SIZEOF (
+QUERY ( pline_el <*
+QUERY ( el <* eloop\path.edge_list| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE' IN TYPEOF (el.edge_element\edge_curve.edge_geometry)) )| NOT ( SIZEOF (pline_el.edge_element\edge_curve.edge_geometry\polyline.points) > 2) )) = 0) )) = 0) )) = 0) )) = 0;
+ WR5 : SIZEOF (
+QUERY ( sbwm <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_WIREFRAME_MODEL' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( ws <*
+QUERY ( sb <* sbwm\shell_based_wireframe_model.sbwm_boundary| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.WIRE_SHELL' IN TYPEOF (sb)) )| NOT ( SIZEOF (
+QUERY ( eloop <*
+QUERY ( wsb <* ws\wire_shell.wire_shell_extent| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (wsb)) )| NOT ( SIZEOF (
+QUERY ( el <* eloop\path.edge_list| NOT valid_wireframe_edge_curve(el.edge_element\edge_curve.edge_geometry) )) = 0) )) = 0) )) = 0) )) = 0;
+ WR6 : SIZEOF (
+QUERY ( sbwm <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_WIREFRAME_MODEL' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( ws <*
+QUERY ( sb <* sbwm\shell_based_wireframe_model.sbwm_boundary| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.WIRE_SHELL' IN TYPEOF (sb)) )| NOT ( SIZEOF (
+QUERY ( eloop <*
+QUERY ( wsb <* ws\wire_shell.wire_shell_extent| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (wsb)) )| NOT ( SIZEOF (
+QUERY ( el <* eloop\path.edge_list| NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN TYPEOF (el.edge_element.edge_start)) AND ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN TYPEOF (el.edge_element.edge_end))) )) = 0) )) = 0) )) = 0) )) = 0;
+ WR7 : SIZEOF (
+QUERY ( sbwm <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_WIREFRAME_MODEL' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( ws <*
+QUERY ( sb <* sbwm\shell_based_wireframe_model.sbwm_boundary| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.WIRE_SHELL' IN TYPEOF (sb)) )| NOT ( SIZEOF (
+QUERY ( eloop <*
+QUERY ( wsb <* ws\wire_shell.wire_shell_extent| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE_LOOP' IN TYPEOF (wsb)) )| NOT ( SIZEOF (
+QUERY ( el <* eloop\path.edge_list| NOT (valid_wireframe_vertex_point(el.edge_element.edge_start\vertex_point.vertex_geometry) AND valid_wireframe_vertex_point(el.edge_element.edge_end\vertex_point.vertex_geometry)) )) = 0) )) = 0) )) = 0) )) = 0;
+ WR8 : SIZEOF (
+QUERY ( sbwm <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_WIREFRAME_MODEL' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( ws <*
+QUERY ( sb <* sbwm\shell_based_wireframe_model.sbwm_boundary| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.WIRE_SHELL' IN TYPEOF (sb)) )| NOT ( SIZEOF (
+QUERY ( vloop <*
+QUERY ( wsb <* ws\wire_shell.wire_shell_extent| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_LOOP' IN TYPEOF (wsb)) )| NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN TYPEOF (vloop\vertex_loop.loop_vertex)) )) = 0) )) = 0) )) = 0;
+ WR9 : SIZEOF (
+QUERY ( sbwm <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_WIREFRAME_MODEL' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( ws <*
+QUERY ( sb <* sbwm\shell_based_wireframe_model.sbwm_boundary| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.WIRE_SHELL' IN TYPEOF (sb)) )| NOT ( SIZEOF (
+QUERY ( vloop <*
+QUERY ( wsb <* ws\wire_shell.wire_shell_extent| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_LOOP' IN TYPEOF (wsb)) )| NOT valid_wireframe_vertex_point(vloop\vertex_loop.loop_vertex\vertex_point.vertex_geometry) )) = 0) )) = 0) )) = 0;
+ WR10 : SIZEOF (
+QUERY ( sbwm <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_WIREFRAME_MODEL' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( vs <*
+QUERY ( sb <* sbwm\shell_based_wireframe_model.sbwm_boundary| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_SHELL' IN TYPEOF (sb)) )| NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_POINT' IN TYPEOF (vs\vertex_shell.vertex_shell_extent.loop_vertex)) )) = 0) )) = 0;
+ WR11 : SIZEOF (
+QUERY ( sbwm <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL_BASED_WIREFRAME_MODEL' IN TYPEOF (it)) )| NOT ( SIZEOF (
+QUERY ( vs <*
+QUERY ( sb <* sbwm\shell_based_wireframe_model.sbwm_boundary| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_SHELL' IN TYPEOF (sb)) )| NOT valid_wireframe_vertex_point(vs\vertex_shell.vertex_shell_extent.loop_vertex\vertex_point.vertex_geometry) )) = 0) )) = 0;
+ WR12 : SIZEOF (
+QUERY ( mi <*
+QUERY ( it <* SELF.items| ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' IN TYPEOF (it)) )| NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'SHELL_BASED_WIREFRAME_SHAPE_REPRESENTATION' IN TYPEOF (mi\mapped_item.mapping_source.mapped_representation)) )) = 0;
+ WR13 : SELF.context_of_items\geometric_representation_context.coordinate_space_dimension = 3;
+END_ENTITY;
+
+
+ENTITY shelled_solid
+ SUPERTYPE OF (ONEOF (double_offset_shelled_solid, complex_shelled_solid))
+ SUBTYPE OF (modified_solid);
+ deleted_face_set : SET [1:?] OF face_surface;
+ thickness : length_measure;
+WHERE
+ WR1 : thickness <> 0;
+END_ENTITY;
+
+
+ENTITY si_absorbed_dose_unit
+ SUBTYPE OF (absorbed_dose_unit, si_unit);
+WHERE
+ WR1 : SELF\si_unit.name = si_unit_name.gray;
+ WR2 : NOT EXISTS(SELF\derived_unit.name);
+END_ENTITY;
+
+
+ENTITY si_capacitance_unit
+ SUBTYPE OF (capacitance_unit, si_unit);
+WHERE
+ WR1 : SELF\si_unit.name = si_unit_name.farad;
+ WR2 : NOT EXISTS(SELF\derived_unit.name);
+END_ENTITY;
+
+
+ENTITY si_conductance_unit
+ SUBTYPE OF (conductance_unit, si_unit);
+WHERE
+ WR1 : SELF\si_unit.name = si_unit_name.siemens;
+ WR2 : NOT EXISTS(SELF\derived_unit.name);
+END_ENTITY;
+
+
+ENTITY si_dose_equivalent_unit
+ SUBTYPE OF (dose_equivalent_unit, si_unit);
+WHERE
+ WR1 : SELF\si_unit.name = si_unit_name.sievert;
+ WR2 : NOT EXISTS(SELF\derived_unit.name);
+END_ENTITY;
+
+
+ENTITY si_electric_charge_unit
+ SUBTYPE OF (electric_charge_unit, si_unit);
+WHERE
+ WR1 : SELF\si_unit.name = si_unit_name.coulomb;
+ WR2 : NOT EXISTS(SELF\derived_unit.name);
+END_ENTITY;
+
+
+ENTITY si_electric_potential_unit
+ SUBTYPE OF (electric_potential_unit, si_unit);
+WHERE
+ WR1 : SELF\si_unit.name = si_unit_name.volt;
+ WR2 : NOT EXISTS(SELF\derived_unit.name);
+END_ENTITY;
+
+
+ENTITY si_energy_unit
+ SUBTYPE OF (energy_unit, si_unit);
+WHERE
+ WR1 : SELF\si_unit.name = si_unit_name.joule;
+ WR2 : NOT EXISTS(SELF\derived_unit.name);
+END_ENTITY;
+
+
+ENTITY si_force_unit
+ SUBTYPE OF (force_unit, si_unit);
+WHERE
+ WR1 : SELF\si_unit.name = si_unit_name.newton;
+ WR2 : NOT EXISTS(SELF\derived_unit.name);
+END_ENTITY;
+
+
+ENTITY si_frequency_unit
+ SUBTYPE OF (frequency_unit, si_unit);
+WHERE
+ WR1 : SELF\si_unit.name = si_unit_name.hertz;
+ WR2 : NOT EXISTS(SELF\derived_unit.name);
+END_ENTITY;
+
+
+ENTITY si_illuminance_unit
+ SUBTYPE OF (illuminance_unit, si_unit);
+WHERE
+ WR1 : SELF\si_unit.name = si_unit_name.lux;
+ WR2 : NOT EXISTS(SELF\derived_unit.name);
+END_ENTITY;
+
+
+ENTITY si_inductance_unit
+ SUBTYPE OF (inductance_unit, si_unit);
+WHERE
+ WR1 : SELF\si_unit.name = si_unit_name.henry;
+ WR2 : NOT EXISTS(SELF\derived_unit.name);
+END_ENTITY;
+
+
+ENTITY si_magnetic_flux_density_unit
+ SUBTYPE OF (magnetic_flux_density_unit, si_unit);
+WHERE
+ WR1 : SELF\si_unit.name = si_unit_name.tesla;
+ WR2 : NOT EXISTS(SELF\derived_unit.name);
+END_ENTITY;
+
+
+ENTITY si_magnetic_flux_unit
+ SUBTYPE OF (magnetic_flux_unit, si_unit);
+WHERE
+ WR1 : SELF\si_unit.name = si_unit_name.weber;
+ WR2 : NOT EXISTS(SELF\derived_unit.name);
+END_ENTITY;
+
+
+ENTITY si_power_unit
+ SUBTYPE OF (power_unit, si_unit);
+WHERE
+ WR1 : SELF\si_unit.name = si_unit_name.watt;
+ WR2 : NOT EXISTS(SELF\derived_unit.name);
+END_ENTITY;
+
+
+ENTITY si_pressure_unit
+ SUBTYPE OF (pressure_unit, si_unit);
+WHERE
+ WR1 : SELF\si_unit.name = si_unit_name.pascal;
+ WR2 : NOT EXISTS(SELF\derived_unit.name);
+END_ENTITY;
+
+
+ENTITY si_radioactivity_unit
+ SUBTYPE OF (radioactivity_unit, si_unit);
+WHERE
+ WR1 : SELF\si_unit.name = si_unit_name.becquerel;
+ WR2 : NOT EXISTS(SELF\derived_unit.name);
+END_ENTITY;
+
+
+ENTITY si_resistance_unit
+ SUBTYPE OF (resistance_unit, si_unit);
+WHERE
+ WR1 : SELF\si_unit.name = si_unit_name.ohm;
+ WR2 : NOT EXISTS(SELF\derived_unit.name);
+END_ENTITY;
+
+
+ENTITY si_unit
+ SUBTYPE OF (named_unit);
+ prefix : OPTIONAL si_prefix;
+ name : si_unit_name;
+DERIVE
+ SELF\named_unit.dimensions : dimensional_exponents := dimensions_for_si_unit(name);
+WHERE
+ WR1 : NOT(('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MASS_UNIT' IN TYPEOF(SELF)) AND
+ (SIZEOF(USEDIN(SELF,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DERIVED_UNIT_ELEMENT.UNIT')) > 0)) OR
+ (prefix = si_prefix.kilo);
+END_ENTITY;
+
+
+ENTITY simple_boolean_expression
+ ABSTRACT SUPERTYPE
+ SUBTYPE OF (boolean_expression, simple_generic_expression);
+END_ENTITY;
+
+
+ENTITY simple_clause
+ SUBTYPE OF (compound_representation_item);
+END_ENTITY;
+
+
+ENTITY simple_generic_expression
+ ABSTRACT SUPERTYPE OF (ONEOF (generic_literal, generic_variable))
+ SUBTYPE OF (generic_expression);
+END_ENTITY;
+
+
+ENTITY simple_numeric_expression
+ ABSTRACT SUPERTYPE
+ SUBTYPE OF (numeric_expression, simple_generic_expression);
+END_ENTITY;
+
+
+ENTITY slash_expression
+ SUBTYPE OF (binary_numeric_expression);
+END_ENTITY;
+
+
+ENTITY smeared_material_definition
+ SUBTYPE OF (zone_structural_makeup);
+END_ENTITY;
+
+
+ENTITY solid_angle_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SOLID_ANGLE_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY solid_angle_unit
+ SUBTYPE OF (named_unit);
+WHERE
+ WR1 : (SELF\named_unit.dimensions.length_exponent = 0.0) AND (SELF\named_unit.dimensions.mass_exponent = 0.0) AND (SELF\named_unit.dimensions.time_exponent = 0.0) AND (SELF\named_unit.dimensions.electric_current_exponent = 0.0) AND (SELF\named_unit.dimensions.thermodynamic_temperature_exponent = 0.0) AND (SELF\named_unit.dimensions.amount_of_substance_exponent = 0.0) AND (SELF\named_unit.dimensions.luminous_intensity_exponent = 0.0);
+END_ENTITY;
+
+
+ENTITY solid_curve_font
+ SUBTYPE OF (pre_defined_curve_font);
+END_ENTITY;
+
+
+ENTITY solid_model
+ SUPERTYPE OF (ONEOF (csg_solid, manifold_solid_brep, swept_face_solid, swept_area_solid, swept_disk_solid, solid_replica))
+ SUBTYPE OF (geometric_representation_item);
+END_ENTITY;
+
+
+ENTITY solid_replica
+ SUBTYPE OF (solid_model);
+ parent_solid : solid_model;
+ transformation : cartesian_transformation_operator_3d;
+WHERE
+ WR1 : acyclic_solid_replica(SELF, parent_solid);
+ WR2 : parent_solid\geometric_representation_item.dim = 3;
+END_ENTITY;
+
+
+ENTITY solid_with_angle_based_chamfer
+ SUBTYPE OF (solid_with_chamfered_edges);
+ offset_distance : positive_length_measure;
+ left_offset : BOOLEAN;
+ offset_angle : positive_plane_angle_measure;
+END_ENTITY;
+
+
+ENTITY solid_with_chamfered_edges
+ ABSTRACT SUPERTYPE OF (ONEOF (solid_with_single_offset_chamfer, solid_with_double_offset_chamfer, solid_with_angle_based_chamfer))
+ SUBTYPE OF (edge_blended_solid);
+END_ENTITY;
+
+
+ENTITY solid_with_circular_pattern
+ SUPERTYPE OF (solid_with_incomplete_circular_pattern)
+ SUBTYPE OF (solid_with_shape_element_pattern);
+ replicate_count : positive_integer;
+ angular_spacing : plane_angle_measure;
+ radial_alignment : BOOLEAN;
+ reference_point : point;
+END_ENTITY;
+
+
+ENTITY solid_with_circular_pocket
+ SUBTYPE OF (solid_with_pocket);
+ pocket_radius : positive_length_measure;
+WHERE
+ WR1 : SELF\solid_with_pocket.floor_blend_radius <= pocket_radius;
+END_ENTITY;
+
+
+ENTITY solid_with_circular_protrusion
+ SUBTYPE OF (solid_with_protrusion);
+ protrusion_radius : positive_length_measure;
+END_ENTITY;
+
+
+ENTITY solid_with_conical_bottom_round_hole
+ SUBTYPE OF (solid_with_stepped_round_hole);
+ semi_apex_angle : positive_plane_angle_measure;
+ tip_radius : non_negative_length_measure;
+WHERE
+ WR1 : tip_radius <
+ SELF\solid_with_stepped_round_hole.segment_radii[segments];
+END_ENTITY;
+
+
+ENTITY solid_with_constant_radius_edge_blend
+ SUBTYPE OF (edge_blended_solid);
+ radius : positive_length_measure;
+END_ENTITY;
+
+
+ENTITY solid_with_curved_slot
+ SUBTYPE OF (solid_with_slot);
+ slot_centreline : bounded_curve;
+END_ENTITY;
+
+
+ENTITY solid_with_depression
+ ABSTRACT SUPERTYPE OF ((solid_with_through_depression ANDOR ONEOF (solid_with_hole, solid_with_pocket, solid_with_slot, solid_with_groove)))
+ SUBTYPE OF (modified_solid_with_placed_configuration);
+ depth : positive_length_measure;
+END_ENTITY;
+
+
+ENTITY solid_with_double_offset_chamfer
+ SUBTYPE OF (solid_with_chamfered_edges);
+ left_offset_distance : positive_length_measure;
+ right_offset_distance : positive_length_measure;
+END_ENTITY;
+
+
+ENTITY solid_with_flat_bottom_round_hole
+ SUBTYPE OF (solid_with_stepped_round_hole);
+ fillet_radius : non_negative_length_measure;
+WHERE
+ WR1 : fillet_radius <
+ SELF\solid_with_stepped_round_hole.segment_radii[segments];
+END_ENTITY;
+
+
+ENTITY solid_with_general_pocket
+ SUBTYPE OF (solid_with_pocket);
+ profile : positioned_sketch;
+ reference_point : point;
+WHERE
+ WR1 : SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_BOUNDED_SURFACE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_SURFACE'] * TYPEOF(profile.sketch_basis)) = 1;
+ WR2 : profile IN using_items(reference_point,[]);
+END_ENTITY;
+
+
+ENTITY solid_with_general_protrusion
+ SUBTYPE OF (solid_with_protrusion);
+ profile : positioned_sketch;
+ reference_point : point;
+WHERE
+ WR1 : SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_BOUNDED_SURFACE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_SURFACE'] * TYPEOF(profile.sketch_basis)) = 1;
+ WR2 : profile IN using_items(reference_point,[]);
+END_ENTITY;
+
+
+ENTITY solid_with_groove
+ SUBTYPE OF (solid_with_depression);
+ groove_radius : positive_length_measure;
+ groove_width : positive_length_measure;
+ draft_angle : plane_angle_measure;
+ floor_fillet_radius : non_negative_length_measure;
+ external_groove : BOOLEAN;
+WHERE
+ WR1 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SOLID_WITH_THROUGH_DEPRESSION'
+ IN TYPEOF(SELF));
+END_ENTITY;
+
+
+ENTITY solid_with_hole
+ ABSTRACT SUPERTYPE OF (solid_with_stepped_round_hole)
+ SUBTYPE OF (solid_with_depression);
+END_ENTITY;
+
+
+ENTITY solid_with_incomplete_circular_pattern
+ SUBTYPE OF (solid_with_circular_pattern);
+ omitted_instances : SET [1:?] OF positive_integer;
+WHERE
+ WR1 : SIZEOF(omitted_instances) <
+ SELF\solid_with_circular_pattern.replicate_count;
+ WR2 : SIZEOF(QUERY(q <* omitted_instances | q >
+ SELF\solid_with_circular_pattern.replicate_count)) = 0;
+END_ENTITY;
+
+
+ENTITY solid_with_incomplete_rectangular_pattern
+ SUBTYPE OF (solid_with_rectangular_pattern);
+ omitted_instances : SET [1:?] OF LIST [2:2] OF positive_integer;
+WHERE
+ WR1 : NOT([1,1] IN omitted_instances);
+ WR2 : SIZEOF(omitted_instances) <
+ ((SELF\solid_with_rectangular_pattern.row_count *
+ SELF\solid_with_rectangular_pattern.column_count) - 1);
+ WR3 : SIZEOF(QUERY(q <* omitted_instances |
+ ((q[1] > SELF\solid_with_rectangular_pattern.row_count) OR
+ (q[2] > SELF\solid_with_rectangular_pattern.column_count)))) = 0;
+END_ENTITY;
+
+
+ENTITY solid_with_pocket
+ ABSTRACT SUPERTYPE OF (ONEOF (solid_with_rectangular_pocket, solid_with_circular_pocket, solid_with_general_pocket))
+ SUBTYPE OF (solid_with_depression);
+ floor_blend_radius : non_negative_length_measure;
+ draft_angle : plane_angle_measure;
+END_ENTITY;
+
+
+ENTITY solid_with_protrusion
+ ABSTRACT SUPERTYPE OF (ONEOF (solid_with_circular_protrusion, solid_with_rectangular_protrusion, solid_with_general_protrusion))
+ SUBTYPE OF (modified_solid_with_placed_configuration);
+ protrusion_height : positive_length_measure;
+ protrusion_draft_angle : plane_angle_measure;
+END_ENTITY;
+
+
+ENTITY solid_with_rectangular_pattern
+ SUPERTYPE OF (solid_with_incomplete_rectangular_pattern)
+ SUBTYPE OF (solid_with_shape_element_pattern);
+ row_count : positive_integer;
+ column_count : positive_integer;
+ row_spacing : length_measure;
+ column_spacing : length_measure;
+WHERE
+ WR1 : (row_count * column_count) > 1;
+END_ENTITY;
+
+
+ENTITY solid_with_rectangular_pocket
+ SUBTYPE OF (solid_with_pocket);
+ pocket_length : positive_length_measure;
+ pocket_width : positive_length_measure;
+ corner_radius : non_negative_length_measure;
+WHERE
+ WR1 : (corner_radius < pocket_width/2)
+ AND (corner_radius < pocket_length/2);
+END_ENTITY;
+
+
+ENTITY solid_with_rectangular_protrusion
+ SUBTYPE OF (solid_with_protrusion);
+ protrusion_length : positive_length_measure;
+ protrusion_width : positive_length_measure;
+ protrusion_corner_radius : non_negative_length_measure;
+WHERE
+ WR1 : (protrusion_corner_radius <= protrusion_width/2)
+ AND (protrusion_corner_radius <= protrusion_length/2);
+END_ENTITY;
+
+
+ENTITY solid_with_shape_element_pattern
+ ABSTRACT SUPERTYPE OF (ONEOF (solid_with_circular_pattern, solid_with_rectangular_pattern))
+ SUBTYPE OF (modified_solid_with_placed_configuration);
+ replicated_element : modified_solid_with_placed_configuration;
+END_ENTITY;
+
+
+ENTITY solid_with_single_offset_chamfer
+ SUBTYPE OF (solid_with_chamfered_edges);
+ offset_distance : positive_length_measure;
+END_ENTITY;
+
+
+ENTITY solid_with_slot
+ ABSTRACT SUPERTYPE OF ((ONEOF (solid_with_trapezoidal_section_slot, solid_with_tee_section_slot) AND ONEOF (solid_with_straight_slot, solid_with_curved_slot)))
+ SUBTYPE OF (solid_with_depression);
+ slot_width : positive_length_measure;
+ closed_ends : LIST [2:2] OF LOGICAL;
+ end_exit_faces : LIST [2:2] OF SET [0:?] OF face_surface;
+WHERE
+ WR1 : NOT(('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SOLID_WITH_THROUGH_DEPRESSION' IN
+ TYPEOF(SELF)) AND (closed_ends = [FALSE,FALSE]));
+ WR2 : NOT(((closed_ends[1] = TRUE) AND (SIZEOF(end_exit_faces[1]) <> 0))
+ OR ((closed_ends[2] = TRUE) AND (SIZEOF(end_exit_faces[2]) <> 0)));
+END_ENTITY;
+
+
+ENTITY solid_with_spherical_bottom_round_hole
+ SUBTYPE OF (solid_with_stepped_round_hole);
+ sphere_radius : positive_length_measure;
+WHERE
+ WR1 : sphere_radius >=
+ SELF\solid_with_stepped_round_hole.segment_radii[segments];
+END_ENTITY;
+
+
+ENTITY solid_with_stepped_round_hole
+ SUPERTYPE OF ((solid_with_stepped_round_hole_and_conical_transitions ANDOR ONEOF (solid_with_flat_bottom_round_hole, solid_with_conical_bottom_round_hole, solid_with_spherical_bottom_round_hole)))
+ SUBTYPE OF (solid_with_hole);
+ segments : positive_integer;
+ segment_radii : LIST [1:segments] OF positive_length_measure;
+ segment_depths : LIST [1:segments] OF positive_length_measure;
+DERIVE
+ SELF\solid_with_depression.depth : positive_length_measure := compute_total_depth(SELF);
+WHERE
+ WR1 : NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SOLID_WITH_THROUGH_DEPRESSION'
+ IN TYPEOF(SELF)) AND (SIZEOF(TYPEOF(SELF) *
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SOLID_WITH_FLAT_BOTTOM_ROUND_HOLE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SOLID_WITH_SPHERICAL_BOTTOM_ROUND_HOLE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SOLID_WITH_FLAT_BOTTOM_ROUND_HOLE'])
+ <> 0));
+END_ENTITY;
+
+
+ENTITY solid_with_stepped_round_hole_and_conical_transitions
+ SUBTYPE OF (solid_with_stepped_round_hole);
+ conical_transitions : SET [1:?] OF conical_stepped_hole_transition;
+WHERE
+ WR1 : SIZEOF (conical_transitions) <=
+ (SELF\solid_with_stepped_round_hole.segments + 1);
+ WR2 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SOLID_WITH_THROUGH_DEPRESSION'
+ IN TYPEOF(SELF)) XOR (SIZEOF(conical_transitions) <=
+ SELF\solid_with_stepped_round_hole.segments);
+ WR3 : validate_countersink_radii(SELF);
+END_ENTITY;
+
+
+ENTITY solid_with_straight_slot
+ SUBTYPE OF (solid_with_slot);
+ slot_length : positive_length_measure;
+END_ENTITY;
+
+
+ENTITY solid_with_tee_section_slot
+ SUBTYPE OF (solid_with_slot);
+ tee_section_width : positive_length_measure;
+ collar_depth : positive_length_measure;
+WHERE
+ WR1 : collar_depth < SELF\solid_with_depression.depth;
+ WR2 : tee_section_width > SELF\solid_with_slot.slot_width;
+END_ENTITY;
+
+
+ENTITY solid_with_through_depression
+ SUBTYPE OF (solid_with_depression);
+ exit_faces : SET [1:?] OF face_surface;
+WHERE
+ WR1 : SIZEOF(TYPEOF(SELF) *
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SOLID_WITH_HOLE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SOLID_WITH_POCKET',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SOLID_WITH_SLOT']) = 1;
+END_ENTITY;
+
+
+ENTITY solid_with_trapezoidal_section_slot
+ SUBTYPE OF (solid_with_slot);
+ draft_angle : plane_angle_measure;
+ floor_fillet_radius : non_negative_length_measure;
+END_ENTITY;
+
+
+ENTITY solid_with_variable_radius_edge_blend
+ SUBTYPE OF (edge_blended_solid, track_blended_solid);
+ point_list : LIST [2:?] OF point;
+ radius_list : LIST [2:?] OF positive_length_measure;
+ edge_function_list : LIST [1:?] OF blend_radius_variation_type;
+WHERE
+ WR1 : SIZEOF(point_list) = SIZEOF(radius_list);
+ WR2 : SIZEOF(edge_function_list) = SIZEOF(radius_list) - 1;
+ WR3 : NOT((point_list[1] = point_list[HIINDEX(point_list)]) AND NOT
+ (radius_list[1] = radius_list[HIINDEX(radius_list)]));
+END_ENTITY;
+
+
+ENTITY source_for_requirement
+ SUBTYPE OF (group_assignment);
+ items : SET [1:1] OF requirement_source_item;
+ SELF\group_assignment.assigned_group : requirement_source;
+END_ENTITY;
+
+
+ENTITY sourced_requirement
+ SUBTYPE OF (group_assignment);
+ items : SET [1:1] OF product_definition;
+ SELF\group_assignment.assigned_group : requirement_source;
+END_ENTITY;
+
+
+ENTITY specification_definition
+ SUBTYPE OF (product_definition);
+END_ENTITY;
+
+
+ENTITY specified_higher_usage_occurrence
+ SUBTYPE OF (assembly_component_usage);
+ upper_usage : assembly_component_usage;
+ next_usage : next_assembly_usage_occurrence;
+UNIQUE
+ UR1 : upper_usage, next_usage;
+WHERE
+ WR1 : SELF :<>: upper_usage;
+ WR2 : SELF\product_definition_relationship.relating_product_definition
+ :=: upper_usage.relating_product_definition;
+ WR3 : SELF\product_definition_relationship.related_product_definition
+ :=: next_usage.related_product_definition;
+ WR4 : (upper_usage.related_product_definition :=:
+ next_usage.relating_product_definition) OR
+ (SIZEOF (QUERY (pdr <* USEDIN (upper_usage.related_product_definition,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION_RELATIONSHIP.' +
+ 'RELATED_PRODUCT_DEFINITION') |
+ pdr.relating_product_definition :=:
+ next_usage.relating_product_definition)) = 1);
+ WR5 : SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.NEXT_ASSEMBLY_USAGE_OCCURRENCE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SPECIFIED_HIGHER_USAGE_OCCURRENCE']
+ * TYPEOF(upper_usage)) = 1;
+END_ENTITY;
+
+
+ENTITY sphere
+ SUBTYPE OF (geometric_representation_item);
+ radius : positive_length_measure;
+ centre : point;
+END_ENTITY;
+
+
+ENTITY spherical_surface
+ SUBTYPE OF (elementary_surface);
+ radius : positive_length_measure;
+END_ENTITY;
+
+
+ENTITY standard_uncertainty
+ SUPERTYPE OF (expanded_uncertainty)
+ SUBTYPE OF (uncertainty_qualifier);
+ uncertainty_value : REAL;
+END_ENTITY;
+
+
+ENTITY start_request
+ SUBTYPE OF (action_request_assignment);
+ items : SET [1:?] OF start_request_item;
+END_ENTITY;
+
+
+ENTITY start_work
+ SUBTYPE OF (action_assignment);
+ items : SET [1:?] OF work_item;
+END_ENTITY;
+
+
+ENTITY straightness_tolerance
+ SUBTYPE OF (geometric_tolerance);
+WHERE
+ WR1 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'GEOMETRIC_TOLERANCE_WITH_DATUM_REFERENCE' IN TYPEOF (SELF));
+END_ENTITY;
+
+
+ENTITY structured_dimension_callout
+ SUBTYPE OF (draughting_callout);
+WHERE
+ WR1 : SIZEOF (TYPEOF (SELF) *
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DATUM_FEATURE_CALLOUT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DATUM_TARGET_CALLOUT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GEOMETRICAL_TOLERANCE_CALLOUT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LEADER_DIRECTED_CALLOUT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PROJECTION_DIRECTED_CALLOUT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DIMENSION_CURVE_DIRECTED_CALLOUT']) = 0;
+ WR2 : SIZEOF (QUERY (ato <* QUERY (con <* SELF.contents |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_OCCURRENCE'
+ IN TYPEOF (con))) |
+ NOT (ato.name IN
+ ['dimension value', 'tolerance value', 'unit text',
+ 'prefix text', 'suffix text']))) = 0;
+ WR3 : SIZEOF (QUERY (ato <* QUERY (con <* SELF.contents |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_OCCURRENCE'
+ IN TYPEOF (con))) |
+ (ato.name = 'dimension value')
+ )) >= 1;
+ WR4 : SIZEOF (QUERY (dcr <* USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_CALLOUT_RELATIONSHIP.' +
+ 'RELATING_DRAUGHTING_CALLOUT') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DIMENSION_CALLOUT_COMPONENT_RELATIONSHIP' IN TYPEOF (dcr)) AND
+ (dcr.name = 'prefix') )) <= 1;
+ WR5 : SIZEOF (QUERY (dcr <* USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_CALLOUT_RELATIONSHIP.' +
+ 'RELATING_DRAUGHTING_CALLOUT') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DIMENSION_CALLOUT_COMPONENT_RELATIONSHIP' IN TYPEOF (dcr)) AND
+ (dcr.name = 'suffix') )) <= 1;
+ WR6 : NOT((SIZEOF (QUERY (ato <* QUERY (con <* SELF.contents |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_OCCURRENCE'
+ IN TYPEOF(con)) ) |
+ (ato.name = 'prefix text')
+ )) > 0)) OR
+ (SIZEOF (QUERY (dcr <* USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_CALLOUT_RELATIONSHIP.' +
+ 'RELATING_DRAUGHTING_CALLOUT') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DIMENSION_CALLOUT_COMPONENT_RELATIONSHIP' IN TYPEOF (dcr)) AND
+ (dcr.name = 'prefix') )) = 1);
+ WR7 : NOT(SIZEOF (QUERY (ato <* QUERY (con <* SELF.contents |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_OCCURRENCE'
+ IN TYPEOF(con))) |
+ (ato.name = 'suffix text')
+ )) > 0) OR
+ (SIZEOF (QUERY (dcr <* USEDIN (SELF, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DRAUGHTING_CALLOUT_RELATIONSHIP.' +
+ 'RELATING_DRAUGHTING_CALLOUT') |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'DIMENSION_CALLOUT_COMPONENT_RELATIONSHIP' IN TYPEOF (dcr)) AND
+ (dcr.name = 'suffix') )) = 1);
+END_ENTITY;
+
+
+ENTITY structured_text_composition
+ SUBTYPE OF (compound_representation_item);
+END_ENTITY;
+
+
+ENTITY structured_text_representation
+ SUBTYPE OF (representation);
+ SELF\representation.items : SET [1:?] OF string_representation_item_select;
+END_ENTITY;
+
+
+ENTITY styled_item
+ SUBTYPE OF (representation_item);
+ styles : SET [1:?] OF presentation_style_assignment;
+ item : representation_item;
+WHERE
+ WR1 : (SIZEOF(SELF.styles) = 1)
+ XOR
+ (SIZEOF(QUERY(pres_style <* SELF.styles |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRESENTATION_STYLE_BY_CONTEXT' IN
+ TYPEOF(pres_style))
+ )) = 0);
+END_ENTITY;
+
+
+ENTITY subedge
+ SUBTYPE OF (edge);
+ parent_edge : edge;
+END_ENTITY;
+
+
+ENTITY subface
+ SUBTYPE OF (face);
+ parent_face : face;
+WHERE
+ WR1 : NOT (mixed_loop_type_set(list_to_set(list_face_loops(SELF)) +
+ list_to_set(list_face_loops(parent_face))));
+END_ENTITY;
+
+
+ENTITY supplied_part_relationship
+ SUBTYPE OF (product_definition_relationship);
+END_ENTITY;
+
+
+ENTITY surface
+ SUPERTYPE OF (ONEOF (elementary_surface, swept_surface, bounded_surface, offset_surface, surface_replica))
+ SUBTYPE OF (geometric_representation_item);
+END_ENTITY;
+
+
+ENTITY surface_condition_callout
+ SUBTYPE OF (draughting_callout);
+WHERE
+ WR1 : SIZEOF ( QUERY ( c <* SELF.contents | SIZEOF (
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'ANNOTATION_CURVE_OCCURRENCE' ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'ANNOTATION_SYMBOL_OCCURRENCE' ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'ANNOTATION_TEXT_OCCURRENCE']* TYPEOF
+ ( c ) ) <>1 ) ) =0;
+END_ENTITY;
+
+
+ENTITY surface_curve
+ SUPERTYPE OF ((ONEOF (intersection_curve, seam_curve) ANDOR bounded_surface_curve))
+ SUBTYPE OF (curve);
+ curve_3d : curve;
+ associated_geometry : LIST [1:2] OF pcurve_or_surface;
+ master_representation : preferred_surface_curve_representation;
+DERIVE
+ basis_surface : SET [1:2] OF surface := get_basis_surface(SELF);
+WHERE
+ WR1 : curve_3d.dim = 3;
+ WR2 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE' IN TYPEOF(associated_geometry[1])) OR
+ (master_representation <> pcurve_s1);
+ WR3 : ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE' IN TYPEOF(associated_geometry[2])) OR
+ (master_representation <> pcurve_s2);
+ WR4 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE' IN TYPEOF(curve_3d));
+END_ENTITY;
+
+
+ENTITY surface_curve_swept_area_solid
+ SUBTYPE OF (swept_area_solid);
+ directrix : curve;
+ start_param : REAL;
+ end_param : REAL;
+ reference_surface : surface;
+WHERE
+ WR1 : (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_CURVE' IN TYPEOF(directrix))) OR
+ (reference_surface IN (directrix\surface_curve.basis_surface));
+END_ENTITY;
+
+
+ENTITY surface_of_linear_extrusion
+ SUBTYPE OF (swept_surface);
+ extrusion_axis : vector;
+END_ENTITY;
+
+
+ENTITY surface_of_revolution
+ SUBTYPE OF (swept_surface);
+ axis_position : axis1_placement;
+DERIVE
+ axis_line : line := representation_item('')||
+ geometric_representation_item()|| curve()||
+ line(axis_position.location, representation_item('')||
+ geometric_representation_item()||
+ vector(axis_position.z, 1.0));
+END_ENTITY;
+
+
+ENTITY surface_patch
+ SUBTYPE OF (founded_item);
+ parent_surface : bounded_surface;
+ u_transition : transition_code;
+ v_transition : transition_code;
+ u_sense : BOOLEAN;
+ v_sense : BOOLEAN;
+INVERSE
+ using_surfaces: BAG [1:?] OF rectangular_composite_surface FOR segments;
+WHERE
+ WR1 : (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_BOUNDED_SURFACE'
+ IN TYPEOF(parent_surface)));
+END_ENTITY;
+
+
+ENTITY surface_profile_tolerance
+ SUBTYPE OF (geometric_tolerance);
+WHERE
+ WR1 : NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'GEOMETRIC_TOLERANCE_WITH_DATUM_REFERENCE' IN TYPEOF (SELF)) OR ( SIZEOF (SELF\geometric_tolerance_with_datum_reference.datum_system) <= 3);
+END_ENTITY;
+
+
+ENTITY surface_rendering_properties;
+ rendered_colour : colour;
+END_ENTITY;
+
+
+ENTITY surface_replica
+ SUBTYPE OF (surface);
+ parent_surface : surface;
+ transformation : cartesian_transformation_operator_3d;
+WHERE
+ WR1 : acyclic_surface_replica(SELF, parent_surface);
+END_ENTITY;
+
+
+ENTITY surface_side_style
+ SUBTYPE OF (founded_item);
+ name : label;
+ styles : SET [1:7] OF surface_style_element_select;
+WHERE
+ WR1 : SIZEOF(QUERY( style1 <* SELF.styles |
+ SIZEOF(QUERY( style2 <* SELF.styles - style1 |
+ TYPEOF(style1) = TYPEOF(style2)
+ )) > 0
+ )) = 0;
+END_ENTITY;
+
+
+ENTITY surface_style_boundary
+ SUBTYPE OF (founded_item);
+ style_of_boundary : curve_or_render;
+END_ENTITY;
+
+
+ENTITY surface_style_control_grid
+ SUBTYPE OF (founded_item);
+ style_of_control_grid : curve_or_render;
+END_ENTITY;
+
+
+ENTITY surface_style_fill_area
+ SUBTYPE OF (founded_item);
+ fill_area : fill_area_style;
+END_ENTITY;
+
+
+ENTITY surface_style_parameter_line
+ SUBTYPE OF (founded_item);
+ style_of_parameter_lines : curve_or_render;
+ direction_counts : SET [1:2] OF direction_count_select;
+WHERE
+ WR1 : (HIINDEX(SELF.direction_counts) = 1)
+ XOR
+ (TYPEOF(SELF.direction_counts[1]) <>
+ TYPEOF(SELF.direction_counts[2]));
+END_ENTITY;
+
+
+ENTITY surface_style_reflectance_ambient;
+ ambient_reflectance : REAL;
+END_ENTITY;
+
+
+ENTITY surface_style_reflectance_ambient_diffuse
+ SUBTYPE OF (surface_style_reflectance_ambient);
+ diffuse_reflectance : REAL;
+END_ENTITY;
+
+
+ENTITY surface_style_reflectance_ambient_diffuse_specular
+ SUBTYPE OF (surface_style_reflectance_ambient_diffuse);
+ specular_reflectance : REAL;
+ specular_exponent : REAL;
+ specular_colour : colour;
+END_ENTITY;
+
+
+ENTITY surface_style_rendering;
+ rendering_method : shading_surface_method;
+ surface_colour : colour;
+END_ENTITY;
+
+
+ENTITY surface_style_rendering_with_properties
+ SUBTYPE OF (surface_style_rendering);
+ properties : SET [1:2] OF rendering_properties_select;
+WHERE
+ WR1 : (HIINDEX(SELF.properties) = 1)
+ XOR
+ (TYPEOF(SELF.properties[1]) <> TYPEOF(SELF.properties[2]));
+END_ENTITY;
+
+
+ENTITY surface_style_segmentation_curve
+ SUBTYPE OF (founded_item);
+ style_of_segmentation_curve : curve_or_render;
+END_ENTITY;
+
+
+ENTITY surface_style_silhouette
+ SUBTYPE OF (founded_item);
+ style_of_silhouette : curve_or_render;
+END_ENTITY;
+
+
+ENTITY surface_style_transparent;
+ transparency : REAL;
+WHERE
+ WR1 : {0.0 <= transparency <= 1.0};
+END_ENTITY;
+
+
+ENTITY surface_style_usage
+ SUBTYPE OF (founded_item);
+ side : surface_side;
+ style : surface_side_style_select;
+END_ENTITY;
+
+
+ENTITY surface_texture_representation
+ SUBTYPE OF (representation);
+WHERE
+ WR1 : SIZEOF ( QUERY ( i <* SELF.items | SIZEOF (
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'MEASURE_REPRESENTATION_ITEM' ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'VALUE_RANGE' , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DESCRIPTIVE_REPRESENTATION_ITEM']* TYPEOF ( i ) ) <>1 ) )
+ =0;
+ WR2 : ( SIZEOF ( QUERY ( i <* SELF.items | 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) ) =1 )
+ AND ( SIZEOF ( QUERY ( i <* SELF.items | (
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'DESCRIPTIVE_REPRESENTATION_ITEM' IN
+ TYPEOF ( i ) ) AND ( i.name = 'measuring method' ) ) ) =1 );
+ WR3 : SIZEOF ( QUERY ( i <* SELF.items | SIZEOF (
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'MEASURE_REPRESENTATION_ITEM' ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'VALUE_RANGE']* TYPEOF ( i ) ) =1 ) )
+ >0;
+ WR4 : ( SIZEOF ( USEDIN ( SELF ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'REPRESENTATION_RELATIONSHIP.'+
+ 'REP_1' ) ) <=1 ) AND ( SIZEOF ( USEDIN ( SELF ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'REPRESENTATION_RELATIONSHIP.'+
+ 'REP_2' ) ) =0 ) AND ( SIZEOF ( QUERY ( rr <* USEDIN ( SELF
+ , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'REPRESENTATION_RELATIONSHIP.'+
+ 'REP_1' ) | rr. rep_2.name = 'measuring direction' ) ) =
+ SIZEOF ( USEDIN ( SELF ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'REPRESENTATION_RELATIONSHIP.'+
+ 'REP_1' ) ) );
+ WR5 : ( SIZEOF ( USEDIN ( SELF ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
+ 'USED_REPRESENTATION' ) ) =1 ) AND ( SIZEOF ( QUERY ( pdr
+ <* USEDIN ( SELF ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
+ 'USED_REPRESENTATION' ) | SIZEOF ( QUERY ( gpa <* USEDIN (
+ pdr. definition ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'GENERAL_PROPERTY_ASSOCIATION.'+
+ 'DERIVED_DEFINITION' ) | ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'GENERAL_PROPERTY' IN TYPEOF ( gpa. base_definition ) ) AND
+ ( gpa. base_definition.name ='surface_condition' ) ) ) =1 )
+ ) =1 );
+END_ENTITY;
+
+
+ENTITY surfaced_open_shell
+ SUBTYPE OF (open_shell);
+WHERE
+ WR1 : SIZEOF(QUERY(q <* SELF\connected_face_set.cfs_faces |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_SURFACE' IN TYPEOF(q)))) = 0;
+END_ENTITY;
+
+
+ENTITY swept_area_solid
+ SUPERTYPE OF (ONEOF (revolved_area_solid, extruded_area_solid, surface_curve_swept_area_solid))
+ SUBTYPE OF (solid_model);
+ swept_area : curve_bounded_surface;
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PLANE' IN TYPEOF(swept_area.basis_surface);
+END_ENTITY;
+
+
+ENTITY swept_disk_solid
+ SUBTYPE OF (solid_model);
+ directrix : curve;
+ radius : positive_length_measure;
+ inner_radius : OPTIONAL positive_length_measure;
+ start_param : REAL;
+ end_param : REAL;
+WHERE
+ WR1 : directrix.dim = 3;
+ WR2 : (NOT EXISTS(inner_radius)) OR (radius > inner_radius);
+END_ENTITY;
+
+
+ENTITY swept_face_solid
+ SUPERTYPE OF (ONEOF (extruded_face_solid, revolved_face_solid))
+ SUBTYPE OF (solid_model);
+ swept_face : face_surface;
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PLANE' IN TYPEOF(swept_face.face_geometry);
+END_ENTITY;
+
+
+ENTITY swept_surface
+ SUPERTYPE OF (ONEOF (surface_of_linear_extrusion, surface_of_revolution))
+ SUBTYPE OF (surface);
+ swept_curve : curve;
+END_ENTITY;
+
+
+ENTITY symbol
+ SUBTYPE OF (representation_item);
+END_ENTITY;
+
+
+ENTITY symbol_colour;
+ colour_of_symbol : colour;
+END_ENTITY;
+
+
+ENTITY symbol_representation
+ SUBTYPE OF (representation);
+END_ENTITY;
+
+
+ENTITY symbol_representation_map
+ SUBTYPE OF (representation_map);
+ SELF\representation_map.mapped_representation : symbol_representation;
+ SELF\representation_map.mapping_origin : axis2_placement;
+END_ENTITY;
+
+
+ENTITY symbol_style
+ SUBTYPE OF (founded_item);
+ name : label;
+ style_of_symbol : symbol_style_select;
+END_ENTITY;
+
+
+ENTITY symbol_target
+ SUBTYPE OF (geometric_representation_item);
+ placement : axis2_placement;
+ x_scale : positive_ratio_measure;
+ y_scale : positive_ratio_measure;
+END_ENTITY;
+
+
+ENTITY symmetric_shape_aspect
+ SUBTYPE OF (shape_aspect);
+INVERSE
+ basis_relationships: SET [1:?] OF shape_aspect_relationship FOR relating_shape_aspect;
+WHERE
+ WR1 : SIZEOF (QUERY (x<*SELF\symmetric_shape_aspect.basis_relationships |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CENTRE_OF_SYMMETRY' IN TYPEOF
+ (x\shape_aspect_relationship.related_shape_aspect)))>=1;
+END_ENTITY;
+
+
+ENTITY symmetry_tolerance
+ SUBTYPE OF (geometric_tolerance_with_datum_reference);
+WHERE
+ WR1 : SIZEOF (SELF\geometric_tolerance_with_datum_reference.datum_system) <= 3;
+END_ENTITY;
+
+
+ENTITY table_representation_item
+ SUBTYPE OF (compound_representation_item);
+WHERE
+ WR1 : SIZEOF(QUERY(itet <* SELF\compound_representation_item.item_element |
+ NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ROW_REPRESENTATION_ITEM' IN TYPEOF(itet))
+ )) = 0;
+END_ENTITY;
+
+
+ENTITY tactile_appearance_representation
+ SUBTYPE OF (representation);
+WHERE
+ WR1 : SIZEOF ( QUERY ( i <* SELF.items | SIZEOF (
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'MEASURE_REPRESENTATION_ITEM' ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'VALUE_RANGE']* TYPEOF ( i ) ) <>1 )) =0;
+ WR2 : SIZEOF ( QUERY ( i <* SELF.items | name ='depth' ) ) <=1;
+ WR3 : ( SIZEOF ( USEDIN ( SELF ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
+ 'USED_REPRESENTATION' ) ) =1 ) AND ( SIZEOF ( QUERY ( pdr
+ <* USEDIN ( SELF ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
+ 'USED_REPRESENTATION' ) | SIZEOF ( QUERY ( gpa <* USEDIN (
+ pdr. definition ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'GENERAL_PROPERTY_ASSOCIATION.'+
+ 'DERIVED_DEFINITION' ) | ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'GENERAL_PROPERTY' IN TYPEOF ( gpa. base_definition ) ) AND
+ ( gpa. base_definition.name ='surface_condition' ) ) ) =1 )) =1 );
+END_ENTITY;
+
+
+ENTITY tagged_text_format
+ SUBTYPE OF (representation_context);
+END_ENTITY;
+
+
+ENTITY tagged_text_item
+ SUBTYPE OF (descriptive_representation_item);
+END_ENTITY;
+
+
+ENTITY tangent
+ SUBTYPE OF (derived_shape_aspect);
+WHERE
+ WR1 : SIZEOF (SELF\derived_shape_aspect.deriving_relationships)= 1;
+END_ENTITY;
+
+
+ENTITY terminator_symbol
+ SUBTYPE OF (annotation_symbol_occurrence);
+ annotated_curve : annotation_curve_occurrence;
+END_ENTITY;
+
+
+ENTITY text_font;
+ id : identifier;
+ name : label;
+ description : text;
+INVERSE
+ glyphs: SET [1:?] OF character_glyph_font_usage FOR font;
+END_ENTITY;
+
+
+ENTITY text_font_family;
+ id : identifier;
+ name : label;
+ description : text;
+INVERSE
+ fonts: SET [1:?] OF text_font_in_family FOR family;
+END_ENTITY;
+
+
+ENTITY text_font_in_family;
+ font : text_font;
+ family : text_font_family;
+END_ENTITY;
+
+
+ENTITY text_literal
+ SUBTYPE OF (geometric_representation_item);
+ literal : presentable_text;
+ placement : axis2_placement;
+ alignment : text_alignment;
+ path : text_path;
+ font : font_select;
+END_ENTITY;
+
+
+ENTITY text_literal_with_associated_curves
+ SUBTYPE OF (text_literal);
+ associated_curves : SET [1:?] OF curve;
+END_ENTITY;
+
+
+ENTITY text_literal_with_blanking_box
+ SUBTYPE OF (text_literal);
+ blanking : planar_box;
+END_ENTITY;
+
+
+ENTITY text_literal_with_delineation
+ SUBTYPE OF (text_literal);
+ delineation : text_delineation;
+END_ENTITY;
+
+
+ENTITY text_literal_with_extent
+ SUBTYPE OF (text_literal);
+ extent : planar_extent;
+END_ENTITY;
+
+
+ENTITY text_string_representation
+ SUBTYPE OF (representation);
+ SELF\representation.items : SET [1:?] OF text_string_representation_item;
+WHERE
+ WR1 : SIZEOF (
+ QUERY (item <* SELF\representation.items |
+ NOT (SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TEXT_LITERAL',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT_CHARACTER',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DEFINED_CHARACTER_GLYPH',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPOSITE_TEXT'] *
+ TYPEOF (item)) = 0)
+ )) >= 1;
+ WR2 : SIZEOF (
+ QUERY (a2p <*
+ QUERY (item <* SELF\representation.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AXIS2_PLACEMENT' IN TYPEOF (item)) |
+ NOT ((SIZEOF (
+ QUERY (at <*
+ QUERY (item <* SELF\representation.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'ANNOTATION_TEXT' IN TYPEOF (item)) |
+ (at\mapped_item.mapping_target :=: a2p))) >= 1) OR
+ (SIZEOF (
+ QUERY (atc <*
+ QUERY (item <* SELF\representation.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'ANNOTATION_TEXT_CHARACTER' IN TYPEOF (item)) |
+ (atc\mapped_item.mapping_target :=: a2p))) >= 1)
+ ))) = 0;
+END_ENTITY;
+
+
+ENTITY text_style
+ SUBTYPE OF (founded_item);
+ name : label;
+ character_appearance : character_style_select;
+END_ENTITY;
+
+
+ENTITY text_style_for_defined_font;
+ text_colour : colour;
+END_ENTITY;
+
+
+ENTITY text_style_with_box_characteristics
+ SUBTYPE OF (text_style);
+ characteristics : SET [1:4] OF box_characteristic_select;
+WHERE
+ WR1 : SIZEOF( QUERY( c1 <* SELF.characteristics |
+ SIZEOF( QUERY( c2 <* SELF.characteristics - c1 |
+ TYPEOF (c1) = TYPEOF (c2)
+ )) > 0
+ )) = 0;
+END_ENTITY;
+
+
+ENTITY text_style_with_mirror
+ SUBTYPE OF (text_style);
+ mirror_placement : axis2_placement;
+END_ENTITY;
+
+
+ENTITY text_style_with_spacing
+ SUBTYPE OF (text_style);
+ character_spacing : character_spacing_select;
+END_ENTITY;
+
+
+ENTITY thermal_resistance_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.THERMAL_RESISTANCE_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY thermal_resistance_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) =
+ dimensional_exponents ( -1.0, -1.0, -3.0, 0.0, 1.0, 0.0, 0.0 );
+END_ENTITY;
+
+
+ENTITY thermodynamic_temperature_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.THERMODYNAMIC_TEMPERATURE_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY thermodynamic_temperature_unit
+ SUBTYPE OF (named_unit);
+WHERE
+ WR1 : (SELF\named_unit.dimensions.length_exponent = 0.0) AND (SELF\named_unit.dimensions.mass_exponent = 0.0) AND (SELF\named_unit.dimensions.time_exponent = 0.0) AND (SELF\named_unit.dimensions.electric_current_exponent = 0.0) AND (SELF\named_unit.dimensions.thermodynamic_temperature_exponent = 1.0) AND (SELF\named_unit.dimensions.amount_of_substance_exponent = 0.0) AND (SELF\named_unit.dimensions.luminous_intensity_exponent = 0.0);
+END_ENTITY;
+
+
+ENTITY thickened_face_solid
+ SUBTYPE OF (solid_model);
+ base_element : generalized_surface_select;
+ offset1 : length_measure;
+ offset2 : length_measure;
+WHERE
+ WR1 : NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE' IN TYPEOF(base_element)) AND
+ (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.BOUNDED_SURFACE' IN TYPEOF(base_element))));
+ WR2 : offset1 <> offset2;
+END_ENTITY;
+
+
+ENTITY thickness_laminate_definition
+ SUBTYPE OF (product_definition);
+WHERE
+ WR1 : SIZEOF (QUERY (pdr <* USEDIN (SELF,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRODUCT_DEFINITION_RELATIONSHIP.' +
+ 'RELATING_PRODUCT_DEFINITION') |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'NEXT_ASSEMBLY_USAGE_OCCURRENCE' IN
+ TYPEOF (pdr))) = 1;
+END_ENTITY;
+
+
+ENTITY thickness_laminate_table
+ SUBTYPE OF (zone_structural_makeup);
+END_ENTITY;
+
+
+ENTITY time_interval;
+ id : identifier;
+ name : label;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY time_interval_assignment
+ ABSTRACT SUPERTYPE;
+ assigned_time_interval : time_interval;
+ role : time_interval_role;
+END_ENTITY;
+
+
+ENTITY time_interval_based_effectivity
+ SUBTYPE OF (effectivity);
+ effectivity_period : time_interval;
+END_ENTITY;
+
+
+ENTITY time_interval_relationship;
+ name : label;
+ description : OPTIONAL text;
+ relating_time_interval : time_interval;
+ related_time_interval : time_interval;
+END_ENTITY;
+
+
+ENTITY time_interval_role;
+ name : label;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY time_interval_with_bounds
+ SUBTYPE OF (time_interval);
+ primary_bound : OPTIONAL date_time_or_event_occurrence;
+ secondary_bound : OPTIONAL date_time_or_event_occurrence;
+ duration : OPTIONAL time_measure_with_unit;
+WHERE
+ WR1 : NOT (EXISTS(secondary_bound) AND EXISTS(duration));
+ WR2 : EXISTS(primary_bound) OR EXISTS(secondary_bound);
+END_ENTITY;
+
+
+ENTITY time_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TIME_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY time_unit
+ SUBTYPE OF (named_unit);
+WHERE
+ WR1 : (SELF\named_unit.dimensions.length_exponent = 0.0) AND (SELF\named_unit.dimensions.mass_exponent = 0.0) AND (SELF\named_unit.dimensions.time_exponent = 1.0) AND (SELF\named_unit.dimensions.electric_current_exponent = 0.0) AND (SELF\named_unit.dimensions.thermodynamic_temperature_exponent = 0.0) AND (SELF\named_unit.dimensions.amount_of_substance_exponent = 0.0) AND (SELF\named_unit.dimensions.luminous_intensity_exponent = 0.0);
+END_ENTITY;
+
+
+ENTITY tolerance_value;
+ lower_bound : measure_with_unit;
+ upper_bound : measure_with_unit;
+DERIVE
+ lbvc : REAL := lower_bound\measure_with_unit.value_component;
+ ubvc : REAL := upper_bound\measure_with_unit.value_component;
+WHERE
+ WR1 : ubvc > lbvc;
+ WR2 : upper_bound\measure_with_unit.unit_component =
+ lower_bound\measure_with_unit.unit_component;
+END_ENTITY;
+
+
+ENTITY tolerance_zone
+ SUBTYPE OF (shape_aspect);
+ defining_tolerance : SET [1:?] OF geometric_tolerance;
+ form : tolerance_zone_form;
+END_ENTITY;
+
+
+ENTITY tolerance_zone_definition
+ SUPERTYPE OF (ONEOF (projected_zone_definition, runout_zone_definition));
+ zone : tolerance_zone;
+ boundaries : SET [1:?] OF shape_aspect;
+END_ENTITY;
+
+
+ENTITY tolerance_zone_form;
+ name : label;
+END_ENTITY;
+
+
+ENTITY topological_representation_item
+ SUPERTYPE OF (ONEOF (vertex, edge, face_bound, face, vertex_shell, wire_shell, connected_edge_set, connected_face_set, (loop ANDOR path)))
+ SUBTYPE OF (representation_item);
+END_ENTITY;
+
+
+ENTITY toroidal_surface
+ SUBTYPE OF (elementary_surface);
+ major_radius : positive_length_measure;
+ minor_radius : positive_length_measure;
+END_ENTITY;
+
+
+ENTITY torus
+ SUBTYPE OF (geometric_representation_item);
+ position : axis1_placement;
+ major_radius : positive_length_measure;
+ minor_radius : positive_length_measure;
+WHERE
+ WR1 : major_radius > minor_radius;
+END_ENTITY;
+
+
+ENTITY total_runout_tolerance
+ SUBTYPE OF (geometric_tolerance_with_datum_reference);
+WHERE
+ WR1 : SIZEOF (SELF\geometric_tolerance_with_datum_reference.datum_system) <= 2;
+END_ENTITY;
+
+
+ENTITY track_blended_solid
+ ABSTRACT SUPERTYPE OF (track_blended_solid_with_end_conditions)
+ SUBTYPE OF (edge_blended_solid);
+WHERE
+ WR1 : check_continuous_edges(SELF\edge_blended_solid.blended_edges);
+END_ENTITY;
+
+
+ENTITY track_blended_solid_with_end_conditions
+ SUBTYPE OF (track_blended_solid);
+ end_conditions : LIST [2:2] OF blend_end_condition_select;
+WHERE
+ WR1 : SIZEOF(TYPEOF(SELF) *
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SOLID_WITH_CONSTANT_RADIUS_EDGE_BLEND',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SOLID_WITH_VARIABLE_RADIUS_EDGE_BLEND',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SOLID_WITH_CHAMFERED_EDGES']) = 1;
+ WR2 : NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX' IN TYPEOF(end_conditions[1]))
+ AND ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX' IN TYPEOF(end_conditions[2])));
+ WR3 : NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX' IN TYPEOF(end_conditions[1]))
+ AND (NOT ((end_conditions[1]
+ :=: SELF\edge_blended_solid.blended_edges[1].edge_start)
+ XOR (end_conditions[1]
+ :=: SELF\edge_blended_solid.blended_edges[1].edge_end))));
+ WR4 : NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX' IN TYPEOF(end_conditions[2]))
+ AND (NOT ((end_conditions[2]
+ :=: SELF\edge_blended_solid.blended_edges[HIINDEX(
+ SELF\edge_blended_solid.blended_edges)].edge_start)
+ XOR (end_conditions[2]
+ :=: SELF\edge_blended_solid.blended_edges[HIINDEX(
+ SELF\edge_blended_solid.blended_edges)].edge_end))));
+END_ENTITY;
+
+
+ENTITY transformation_with_derived_angle
+ SUPERTYPE OF (ONEOF (draped_defined_transformation, laid_defined_transformation))
+ SUBTYPE OF (item_defined_transformation);
+ SELF\item_defined_transformation.transform_item_1 : angle_direction_reference_with_a2p3d_select;
+ SELF\item_defined_transformation.transform_item_2 : axis2_placement_3d;
+DERIVE
+ orientation_angle : plane_angle_measure := derive_angle (
+ SELF\item_defined_transformation.transform_item_1,
+ SELF\item_defined_transformation.transform_item_2);
+WHERE
+ WR1 : (SELF\item_defined_transformation.transform_item_1\
+ axis2_placement_3d.p[3].direction_ratios[1] =
+ SELF\item_defined_transformation.transform_item_2\
+ axis2_placement_3d.p[3].direction_ratios[1])
+ AND
+ (SELF\item_defined_transformation.transform_item_1\
+ axis2_placement_3d.p[3].direction_ratios[2] =
+ SELF\item_defined_transformation.transform_item_2\
+ axis2_placement_3d.p[3].direction_ratios[2])
+ AND
+ (SELF\item_defined_transformation.transform_item_1\
+ axis2_placement_3d.p[3].direction_ratios[3] =
+ SELF\item_defined_transformation.transform_item_2\
+ axis2_placement_3d.p[3].direction_ratios[3]);
+END_ENTITY;
+
+
+ENTITY trimmed_curve
+ SUBTYPE OF (bounded_curve);
+ basis_curve : curve;
+ trim_1 : SET [1:2] OF trimming_select;
+ trim_2 : SET [1:2] OF trimming_select;
+ sense_agreement : BOOLEAN;
+ master_representation : trimming_preference;
+WHERE
+ WR1 : (HIINDEX(trim_1) = 1) OR (TYPEOF(trim_1[1]) <> TYPEOF(trim_1[2]));
+ WR2 : (HIINDEX(trim_2) = 1) OR (TYPEOF(trim_2[1]) <> TYPEOF(trim_2[2]));
+END_ENTITY;
+
+
+ENTITY two_direction_repeat_factor
+ SUBTYPE OF (one_direction_repeat_factor);
+ second_repeat_factor : vector;
+END_ENTITY;
+
+
+ENTITY type_qualifier;
+ name : label;
+END_ENTITY;
+
+
+ENTITY unary_generic_expression
+ ABSTRACT SUPERTYPE
+ SUBTYPE OF (generic_expression);
+ operand : generic_expression;
+END_ENTITY;
+
+
+ENTITY unary_numeric_expression
+ ABSTRACT SUPERTYPE
+ SUBTYPE OF (numeric_expression, unary_generic_expression);
+ SELF\unary_generic_expression.operand : numeric_expression;
+END_ENTITY;
+
+
+ENTITY uncertainty_assigned_representation
+ SUBTYPE OF (representation);
+ uncertainty : SET [1:?] OF uncertainty_measure_with_unit;
+END_ENTITY;
+
+
+ENTITY uncertainty_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+ name : label;
+ description : OPTIONAL text;
+WHERE
+ WR1 : valid_measure_value (SELF\measure_with_unit.value_component);
+END_ENTITY;
+
+
+ENTITY uncertainty_qualifier
+ SUPERTYPE OF (ONEOF (standard_uncertainty, qualitative_uncertainty));
+ measure_name : label;
+ description : text;
+END_ENTITY;
+
+
+ENTITY uniform_curve
+ SUBTYPE OF (b_spline_curve);
+END_ENTITY;
+
+
+ENTITY uniform_resource_identifier
+ SUBTYPE OF (descriptive_representation_item);
+END_ENTITY;
+
+
+ENTITY uniform_surface
+ SUBTYPE OF (b_spline_surface);
+END_ENTITY;
+
+
+ENTITY usage_association
+ SUBTYPE OF (action_method_relationship);
+ SELF\action_method_relationship.related_method : information_usage_right;
+ SELF\action_method_relationship.relating_method : information_usage_right;
+DERIVE
+ related : information_usage_right := SELF\action_method_relationship.related_method;
+ relating : information_usage_right := SELF\action_method_relationship.relating_method;
+END_ENTITY;
+
+
+ENTITY user_defined_curve_font
+ SUBTYPE OF (curve_style_font, mapped_item);
+END_ENTITY;
+
+
+ENTITY user_defined_marker
+ SUBTYPE OF (mapped_item, pre_defined_marker);
+END_ENTITY;
+
+
+ENTITY user_defined_terminator_symbol
+ SUBTYPE OF (mapped_item, pre_defined_symbol);
+END_ENTITY;
+
+
+ENTITY user_selected_elements
+ SUBTYPE OF (representation_item);
+ picked_items : SET [1:?] OF representation_item;
+END_ENTITY;
+
+
+ENTITY user_selected_shape_elements
+ SUBTYPE OF (user_selected_elements);
+WHERE
+ WR1 : SIZEOF(QUERY(q <*
+ SELF\user_selected_elements.picked_items | NOT
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHAPE_REPRESENTATION_ITEM'
+ IN TYPEOF(q)))) = 0;
+END_ENTITY;
+
+
+ENTITY value_range
+ SUBTYPE OF (compound_representation_item);
+WHERE
+ WR1 : ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'SET_REPRESENTATION_ITEM' IN TYPEOF ( item_element ) ) AND value_range_wr1 ( item_element );
+ WR2 : value_range_wr2 ( item_element );
+ WR3 : value_range_wr3 ( item_element );
+END_ENTITY;
+
+
+ENTITY value_representation_item
+ SUBTYPE OF (representation_item);
+ value_component : measure_value;
+WHERE
+ WR1 : SIZEOF (QUERY (rep <* using_representations (SELF) |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.GLOBAL_UNIT_ASSIGNED_CONTEXT'
+ IN TYPEOF (rep.context_of_items)
+ ))) = 0;
+END_ENTITY;
+
+
+ENTITY variable_semantics
+ ABSTRACT SUPERTYPE;
+END_ENTITY;
+
+
+ENTITY variational_representation_item
+ ABSTRACT SUPERTYPE OF (auxiliary_geometric_representation_item)
+ SUBTYPE OF (representation_item);
+WHERE
+ WR1 : SIZEOF(QUERY(q <* using_representations(SELF) |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VARIATIONAL_REPRESENTATION'
+ IN TYPEOF(q)))) = 0;
+ WR2 : SIZEOF(QUERY(q <* using_representations(SELF) |
+ NOT (SELF IN q.items))) = 0;
+END_ENTITY;
+
+
+ENTITY vector
+ SUBTYPE OF (geometric_representation_item);
+ orientation : direction;
+ magnitude : length_measure;
+WHERE
+ WR1 : magnitude >= 0.0;
+END_ENTITY;
+
+
+ENTITY vector_style
+ SUBTYPE OF (curve_style, pre_defined_terminator_symbol);
+END_ENTITY;
+
+
+ENTITY velocity_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VELOCITY_UNIT' IN TYPEOF (SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY velocity_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) =
+ dimensional_exponents ( 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0 );
+END_ENTITY;
+
+
+ENTITY versioned_action_request;
+ id : identifier;
+ version : label;
+ purpose : text;
+ description : OPTIONAL text;
+END_ENTITY;
+
+
+ENTITY vertex
+ SUBTYPE OF (topological_representation_item);
+END_ENTITY;
+
+
+ENTITY vertex_loop
+ SUBTYPE OF (loop);
+ loop_vertex : vertex;
+END_ENTITY;
+
+
+ENTITY vertex_point
+ SUBTYPE OF (vertex, geometric_representation_item);
+ vertex_geometry : point;
+END_ENTITY;
+
+
+ENTITY vertex_shell
+ SUBTYPE OF (topological_representation_item);
+ vertex_shell_extent : vertex_loop;
+END_ENTITY;
+
+
+ENTITY view_volume
+ SUBTYPE OF (founded_item);
+ projection_type : central_or_parallel;
+ projection_point : cartesian_point;
+ view_plane_distance : length_measure;
+ front_plane_distance : length_measure;
+ front_plane_clipping : BOOLEAN;
+ back_plane_distance : length_measure;
+ back_plane_clipping : BOOLEAN;
+ view_volume_sides_clipping : BOOLEAN;
+ view_window : planar_box;
+END_ENTITY;
+
+
+ENTITY visual_appearance_representation
+ SUBTYPE OF (representation);
+WHERE
+ WR1 : ( {3<= SIZEOF ( SELF.items ) <=9} ) AND ( SIZEOF ( QUERY (
+ i <* items | ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) AND (
+ i.name IN [ 'colour id' , 'colour name' , 'lustre' , 'pattern' , 'transparency', 'orientation'] ) )
+ ) + SIZEOF ( QUERY ( i <* items | ( SIZEOF (
+ ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'MEASURE_REPRESENTATION_ITEM' ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'VALUE_RANGE']* TYPEOF ( i ) ) =1 )
+ AND ( i.name IN ['refraction index' , 'opacity'] ) )
+ ) + SIZEOF ( QUERY ( i <* items | (
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'DOCUMENT_FILE' IN TYPEOF ( i ) )
+ AND ( i.name IN [ 'texture map' ] ) ) )
+ = SIZEOF ( SELF.items ) );
+ WR2 : SIZEOF ( QUERY ( i <* SELF.items | i.name = 'colour id' )) =1;
+ WR3 : SIZEOF ( QUERY ( i <* SELF.items | i.name ='lustre' ) )=1;
+ WR4 : SIZEOF ( QUERY ( i <* SELF.items | i.name = 'colour name') ) <=1;
+ WR5 : SIZEOF ( QUERY ( i <* SELF.items | i.name ='pattern' ) )<=1;
+ WR6 : SIZEOF ( QUERY ( i <* SELF.items | i.name ='transparency') ) <=1;
+ WR7 : SIZEOF ( QUERY ( i <* SELF.items | i.name = 'texture map') ) <=1;
+ WR8 : SIZEOF ( QUERY ( i <* SELF.items | i.name ='refraction index' ) )<=1;
+ WR9 : SIZEOF ( QUERY ( i <* SELF.items | i.name ='opacity') ) <=1;
+ WR10 : SIZEOF ( QUERY ( i <* SELF.items | i.name ='orientation') ) <=1;
+ WR11 : ( SIZEOF ( USEDIN ( SELF ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
+ 'USED_REPRESENTATION' ) ) =1 ) AND ( SIZEOF ( QUERY ( pdr
+ <* USEDIN ( SELF ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
+ 'USED_REPRESENTATION' ) | SIZEOF ( QUERY ( gpa <* USEDIN (
+ pdr. definition ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+'GENERAL_PROPERTY_ASSOCIATION.'+
+ 'DERIVED_DEFINITION' ) | ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+
+ 'GENERAL_PROPERTY' IN TYPEOF ( gpa. base_definition ) ) AND
+ ( gpa. base_definition.name ='surface_condition' ) ) ) =1 )) =1 );
+END_ENTITY;
+
+
+ENTITY volume_measure_with_unit
+ SUBTYPE OF (measure_with_unit);
+WHERE
+ WR1 : 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VOLUME_UNIT' IN TYPEOF(SELF\measure_with_unit.unit_component);
+END_ENTITY;
+
+
+ENTITY volume_unit
+ SUBTYPE OF (derived_unit);
+WHERE
+ WR1 : derive_dimensional_exponents(SELF) =
+ dimensional_exponents ( 3.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 );
+END_ENTITY;
+
+
+ENTITY week_of_year_and_day_date
+ SUBTYPE OF (date);
+ week_component : week_in_year_number;
+ day_component : OPTIONAL day_in_week_number;
+END_ENTITY;
+
+
+ENTITY wire_shell
+ SUBTYPE OF (topological_representation_item);
+ wire_shell_extent : SET [1:?] OF loop;
+WHERE
+ WR1 : NOT mixed_loop_type_set(wire_shell_extent);
+END_ENTITY;
+
+
+ENTITY year_month
+ SUBTYPE OF (date);
+ month_component : month_in_year_number;
+END_ENTITY;
+
+
+ENTITY zone_structural_makeup
+ SUPERTYPE OF (ONEOF ((smeared_material_definition AND thickness_laminate_table), (smeared_material_definition AND percentage_laminate_table), thickness_laminate_table, percentage_laminate_table, smeared_material_definition))
+ SUBTYPE OF (laminate_table);
+END_ENTITY;
+
+
+RULE alternative_solution_requires_solution_definition FOR (product_definition_formation);
+ LOCAL
+ solution_versions: SET OF product_definition_formation := [];
+ END_LOCAL;
+ solution_versions := QUERY( pdf <* product_definition_formation |
+ SIZEOF( QUERY( prpc <* USEDIN(pdf.of_product, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF' + '.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS') |
+ prpc.name = 'alternative solution')) = 1);
+WHERE
+ WR1 : SIZEOF( QUERY( pdf <* solution_versions |
+ SIZEOF( QUERY( pd <* USEDIN(pdf, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF' + '.PRODUCT_DEFINITION.FORMATION') |
+ pd.frame_of_reference.name = 'alternative definition')) <> 1))= 0;
+END_RULE;
+
+RULE application_protocol_definition_required FOR (application_context);
+
+WHERE
+ WR1 : SIZEOF( QUERY( ac <* application_context |
+ (SIZEOF (QUERY (apd <* USEDIN(ac,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.APPLICATION_PROTOCOL_DEFINITION.APPLICATION') |
+ apd.application_interpreted_model_schema_name = 'ap203_configuration_controlled_3d_design_of_mechanical_parts_and_assemblies'
+ )) > 0)
+ )) > 0;
+END_RULE;
+
+RULE breakdown_element_requires_product_definition FOR (product_definition_formation);
+
+WHERE
+ WR1 : SIZEOF ( QUERY ( pdf <* product_definition_formation |
+ ( SIZEOF ( QUERY ( prpc <* USEDIN ( pdf.of_product ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS' ) |
+ prpc.name = 'functionality' ) ) = 1 ) AND
+ ( SIZEOF ( QUERY ( pd <* USEDIN ( pdf ,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION.FORMATION') |
+ pd.frame_of_reference.name = 'functional definition' ) ) <1 ) ) ) = 0;
+ WR2 : SIZEOF ( QUERY ( pdf <* product_definition_formation |
+ ( SIZEOF ( QUERY ( prpc <* USEDIN ( pdf.of_product ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS' ) |
+ prpc.name = 'conceptual design' ) ) = 1 ) AND
+ ( SIZEOF (QUERY ( pd <* USEDIN ( pdf , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION.FORMATION' ) |
+ pd.frame_of_reference.name = 'conceptual definition' ) ) <1) ) ) = 0;
+END_RULE;
+
+RULE compatible_dimension FOR (cartesian_point, direction, representation_context, geometric_representation_context);
+
+WHERE
+ WR1 : SIZEOF(QUERY(x <* cartesian_point| SIZEOF(QUERY
+ (y <* geometric_representation_context | item_in_context(x,y) AND
+ (HIINDEX(x.coordinates) <> y.coordinate_space_dimension))) > 0 )) =0;
+ WR2 : SIZEOF(QUERY(x <* direction | SIZEOF( QUERY
+ (y <* geometric_representation_context | item_in_context(x,y) AND
+ (HIINDEX(x.direction_ratios) <> y.coordinate_space_dimension)))
+ > 0 )) = 0;
+END_RULE;
+
+RULE component_class_for_assembly_select FOR (composite_assembly_sequence_definition, next_assembly_usage_occurrence, product_related_product_category);
+ LOCAL
+ i,j,k : INTEGER :=0;
+ dkuhr : LOGICAL :=TRUE;
+ nnauo : INTEGER :=0;
+ nprpc : INTEGER :=0;
+ rp : product;
+ END_LOCAL;
+ REPEAT i:= LOINDEX (composite_assembly_sequence_definition) TO
+ HIINDEX (composite_assembly_sequence_definition);
+ nnauo := 0;
+ REPEAT j:= LOINDEX (next_assembly_usage_occurrence) TO
+ HIINDEX (next_assembly_usage_occurrence);
+ IF (composite_assembly_sequence_definition[i] =
+ next_assembly_usage_occurrence[j].relating_product_definition) THEN
+ rp := next_assembly_usage_occurrence[j].related_product_definition.
+ formation.of_product;
+ nprpc := 0;
+ REPEAT k:= LOINDEX (product_related_product_category) TO
+ HIINDEX (product_related_product_category);
+ IF ((rp IN product_related_product_category[k].products) AND
+ (product_related_product_category[k].name IN ['ply',
+ 'ply laminate', 'filament laminate', 'processed core',
+ 'composite assembly'])) THEN
+ nprpc := nprpc + 1;
+ END_IF;
+ END_REPEAT;
+ IF (nprpc = 1) THEN
+ nnauo := nnauo + 1;
+ ELSE
+ dkuhr := FALSE;
+ ESCAPE;
+ END_IF;
+ END_IF;
+ END_REPEAT;
+ IF (dkuhr = FALSE) THEN
+ ESCAPE;
+ END_IF;
+ IF(nnauo = 0) THEN
+ dkuhr := FALSE;
+ ESCAPE;
+ END_IF;
+ END_REPEAT;
+WHERE
+ WR1 : dkuhr;
+END_RULE;
+
+RULE consistent_uncertainty FOR (global_uncertainty_assigned_context, qualified_representation_item, uncertainty_assigned_representation);
+
+WHERE
+ WR1 : SIZEOF ( QUERY ( guac <* global_uncertainty_assigned_context |
+ SIZEOF ( QUERY ( u1 <* guac.uncertainty |
+ SIZEOF ( QUERY ( u2 <* guac.uncertainty | u2.name = u1.name ) ) >1 ) ) >0 ) ) = 0;
+ WR2 : SIZEOF ( QUERY ( uar <* uncertainty_assigned_representation |
+ SIZEOF ( QUERY ( u1<* uar.uncertainty |
+ SIZEOF ( QUERY ( u2 <* uar.uncertainty | u2.name = u1.name ) ) >1 ) ) >0 ) ) = 0;
+ WR3 : SIZEOF ( QUERY ( qri <* qualified_representation_item |
+ SIZEOF ( QUERY ( u1 <* qri.qualifiers |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF' + '.UNCERTAINTY_QUALIFIER' IN TYPEOF ( u1 ) ) AND
+ ( SIZEOF ( QUERY ( u2 <* qri.qualifiers |
+ ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF' + '.UNCERTAINTY_QUALIFIER' IN TYPEOF ( u2 ) ) AND
+ ( u2\uncertainty_qualifier.measure_name = u1\uncertainty_qualifier.measure_name ) )
+ ) >1 ) ) ) >0 ) ) = 0;
+END_RULE;
+
+RULE constraint_definition_requires_constraint_category FOR (product_definition);
+ LOCAL
+ constraint_definitions: SET OF product_definition := [];
+ END_LOCAL;
+ constraint_definitions := QUERY( pd <* product_definition |
+ (pd.frame_of_reference.name = 'design constraint definition'));
+WHERE
+ WR1 : SIZEOF ( QUERY ( pd <* constraint_definitions |
+ ( SIZEOF ( QUERY ( prpc <* USEDIN ( pd.formation.of_product ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS' ) |
+ prpc. name ='requirement' ) ) =0 ) ) ) =0;
+END_RULE;
+
+RULE design_constraint_requires_product_definition FOR (product_definition_formation);
+
+WHERE
+ WR1 : SIZEOF ( QUERY ( pdf <* product_definition_formation | (
+ SIZEOF ( QUERY ( prpc <* USEDIN ( pdf.of_product ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS' ) |
+ prpc.name = 'requirement' ) ) >0 ) AND
+ ( SIZEOF ( QUERY ( pd <* USEDIN ( pdf , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION.FORMATION') |
+ pd.frame_of_reference.name = 'design constraint definition' ) ) <1 ) ) ) = 0;
+END_RULE;
+
+RULE draughting_model_items_constraint FOR (draughting_model);
+
+WHERE
+ WR1 : SIZEOF(QUERY(dm <* draughting_model |
+ NOT(SIZEOF(QUERY(it1 <* dm\representation.items |
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_OCCURRENCE' IN TYPEOF(it1))
+ AND
+ NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'DRAUGHTING_ANNOTATION_OCCURRENCE' IN TYPEOF(it1)))
+ )) = 0)
+ )) = 0;
+ WR2 : SIZEOF(QUERY(dm <* draughting_model |
+ NOT(SIZEOF(QUERY(it1 <* dm\representation.items |
+ (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DRAUGHTING_CALLOUT' IN TYPEOF(it1))
+ AND
+ NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DRAUGHTING_ELEMENTS' IN TYPEOF(it1)))
+ )) = 0)
+ )) = 0;
+END_RULE;
+
+RULE external_version_assignments_are_valid FOR (applied_external_identification_assignment);
+
+WHERE
+ WR1 : SIZEOF(QUERY(aia <* applied_external_identification_assignment |
+ NOT external_version_assignment_is_valid(aia)))=0;
+END_RULE;
+
+RULE material_for_coating_layer FOR (shape_aspect);
+ LOCAL
+ coating_layers: SET OF shape_aspect := [];
+ END_LOCAL;
+ coating_layers:= QUERY( r <* shape_aspect |
+ (r.name = 'coating layer') );
+WHERE
+ WR1 : SIZEOF( QUERY( r <* coating_layers |
+ SIZEOF(USEDIN(r , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MATERIAL_DESIGNATION.DEFINITIONS'))<>1
+ )) = 0;
+END_RULE;
+
+RULE plib_property_reference_requires_name_scope FOR (externally_defined_general_property);
+ LOCAL
+ known_sourced_properties : SET OF externally_defined_general_property;
+ END_LOCAL;
+ known_sourced_properties := QUERY( edc <* externally_defined_general_property |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'KNOWN_SOURCE' IN TYPEOF(edc.source) );
+WHERE
+ WR1 : SIZEOF ( QUERY ( edgp <* known_sourced_properties |
+ ( SIZEOF ( QUERY ( edir <* USEDIN ( edgp, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'EXTERNALLY_DEFINED_ITEM_RELATIONSHIP.RELATING_ITEM' )|
+ ( edir.name = 'name scope' ) AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'EXTERNALLY_DEFINED_CLASS' IN TYPEOF ( edir.related_item ) ) AND
+ ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'KNOWN_SOURCE' IN TYPEOF ( edir.related_item.source ) ) ) ) <>1 ) ) ) = 0;
+END_RULE;
+
+RULE plib_property_reference_requires_version FOR (externally_defined_general_property);
+ LOCAL
+ plib_properties : SET OF externally_defined_general_property := [];
+ END_LOCAL;
+ plib_properties := QUERY ( edgp <* externally_defined_general_property |
+ ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'KNOWN_SOURCE' IN TYPEOF ( edgp.source ) ) AND
+ ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'KNOWN_SOURCE' + '.NAME' = 'ISO 13584 library' ) );
+WHERE
+ WR1 : SIZEOF( QUERY( edgp <* plib_properties |
+ (SIZEOF( QUERY( edir <* USEDIN(edgp, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'APPLIED_EXTERNAL_IDENTIFICATION_ASSIGNMENT.ITEMS') |
+ (edir.role.name = 'version') )) <> 1) )) = 0;
+END_RULE;
+
+RULE ply_reference FOR (ply_laminate_sequence_definition, next_assembly_usage_occurrence, product_related_product_category);
+ LOCAL
+ i,j,k : INTEGER;
+ dkuhr : LOGICAL := TRUE;
+ nnauo : INTEGER;
+ nprpc : INTEGER := 0;
+ rp : product;
+ END_LOCAL;
+ REPEAT i:= LOINDEX (ply_laminate_sequence_definition) TO
+ HIINDEX (ply_laminate_sequence_definition);
+ nnauo := 0;
+ REPEAT j:= LOINDEX (next_assembly_usage_occurrence) TO
+ HIINDEX (next_assembly_usage_occurrence);
+ IF (ply_laminate_sequence_definition[i] =
+ next_assembly_usage_occurrence[j].relating_product_definition) THEN
+ rp := next_assembly_usage_occurrence[j].related_product_definition.
+ formation.of_product;
+ nprpc := 0;
+ REPEAT k:= LOINDEX (product_related_product_category) TO
+ HIINDEX (product_related_product_category);
+ IF ((product_related_product_category[k].name = 'ply') AND
+ (rp IN product_related_product_category[k].products)) THEN
+ nprpc := nprpc + 1;
+ END_IF;
+ END_REPEAT;
+ IF (nprpc = 1) THEN
+ nnauo := nnauo + 1;
+ ELSE
+ dkuhr := FALSE;
+ ESCAPE;
+ END_IF;
+ END_IF;
+ END_REPEAT;
+ IF (dkuhr = FALSE) THEN
+ ESCAPE;
+ END_IF;
+ IF(nnauo = 0) THEN
+ dkuhr := FALSE;
+ ESCAPE;
+ END_IF;
+ END_REPEAT;
+WHERE
+ WR1 : dkuhr;
+END_RULE;
+
+RULE ply_stock_material_select FOR (product_related_product_category, make_from_usage_option);
+ LOCAL
+ i,j,k,kp : INTEGER;
+ dkuhr : LOGICAL;
+ nmfuo : INTEGER;
+ nprpc : INTEGER := 0;
+ rp : product;
+ END_LOCAL;
+
+ dkuhr := TRUE;
+ REPEAT kp:= LOINDEX (product_related_product_category) TO
+ HIINDEX (product_related_product_category);
+
+ IF (product_related_product_category[kp].name = 'ply') THEN
+ REPEAT i:= LOINDEX (product_related_product_category[kp].products) TO
+ HIINDEX (product_related_product_category[kp].products);
+
+ nmfuo := 0;
+ REPEAT j:= LOINDEX (make_from_usage_option) TO
+ HIINDEX (make_from_usage_option);
+
+ rp := make_from_usage_option[j].related_product_definition.
+ formation.of_product;
+
+ IF (product_related_product_category[kp].products[i] = rp) THEN
+
+ REPEAT k:= LOINDEX (product_related_product_category) TO
+ HIINDEX (product_related_product_category);
+
+ IF ((rp IN product_related_product_category[k].products) AND
+ (product_related_product_category[k].name IN
+ ['isotropic material', 'filament assembly',
+ 'discontinuous fiber assembly'])) THEN
+ nprpc := nprpc + 1;
+ END_IF;
+
+ END_REPEAT;
+
+ IF (nprpc = 1) THEN
+ nmfuo := nmfuo + 1;
+ ELSE
+ dkuhr := FALSE;
+ ESCAPE;
+ END_IF;
+
+ END_IF;
+
+ END_REPEAT;
+
+ IF (dkuhr = FALSE) THEN
+ ESCAPE;
+ END_IF;
+ IF(nmfuo <> 1) THEN
+ dkuhr := FALSE;
+ ESCAPE;
+ END_IF;
+
+ END_REPEAT;
+ END_IF;
+
+ END_REPEAT;
+WHERE
+ WR1 : dkuhr;
+END_RULE;
+
+RULE product_concept_feature_requires_category FOR (product_concept_feature);
+
+WHERE
+ WR1 : SIZEOF ( QUERY ( pcf <* product_concept_feature |
+(SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'INCLUSION_PRODUCT_CONCEPT_FEATURE',
+'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'CONDITIONAL_CONCEPT_FEATURE'] * TYPEOF(pcf)) = 0) AND
+(SIZEOF ( QUERY ( aga <* USEDIN ( pcf , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'APPLIED_GROUP_ASSIGNMENT.' + 'ITEMS' ) |
+( aga.role.name = 'specification category member' ) AND
+('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'PRODUCT_CONCEPT_FEATURE_CATEGORY' IN TYPEOF ( aga.assigned_group )))) <>1 ) ) ) = 0;
+END_RULE;
+
+RULE product_definition_replacement_requires_effectivity_assignment FOR (product_definition_relationship);
+
+WHERE
+ WR1 : SIZEOF( QUERY( pdr <* product_definition_relationship |
+ (pdr.name = 'definition replacement') AND
+ (SIZEOF( USEDIN(pdr,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.APPLIED_EFFECTIVITY_ASSIGNMENT.ITEMS') ) = 0) ))
+ = 0;
+END_RULE;
+
+RULE restrict_alternative_definition FOR (product_definition);
+ LOCAL
+ solution_definitions: SET OF product_definition := [];
+ END_LOCAL;
+ solution_definitions := QUERY( pd <* product_definition |
+ (pd.frame_of_reference.name = 'alternative definition'));
+WHERE
+ WR1 : SIZEOF ( QUERY ( pd <* solution_definitions |
+ ( SIZEOF ( QUERY ( pdr <* USEDIN ( pd ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF' + '.PRODUCT_DEFINITION_RELATIONSHIP.RELATED_PRODUCT_DEFINITION' ) |
+ pdr.name = 'solution alternative definition' ) ) <>1 ) ) ) = 0;
+ WR2 : SIZEOF ( QUERY ( pd <* solution_definitions |
+ NOT ( pd.name IN ['technical' , 'supplier' , 'technical supplier' , ''] ) ) ) = 0;
+ WR3 : SIZEOF ( QUERY ( pd <* solution_definitions |
+ ( pd.name IN ['supplier' , 'technical supplier'] ) AND (
+ SIZEOF ( QUERY ( aoa <* USEDIN ( pd.formation ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF' + '.APPLIED_ORGANIZATION_ASSIGNMENT.ITEMS' ) |
+ aoa.role.name = 'supplier' )) <>1 ) )) = 0;
+END_RULE;
+
+RULE restrict_assembly_category FOR (product_definition);
+ LOCAL
+ assembly_definitions: SET OF product_definition := [];
+ END_LOCAL;
+ assembly_definitions := QUERY( pd <* product_definition |
+ SIZEOF( QUERY( pdca <* USEDIN( pd, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION_CONTEXT_ASSOCIATION.DEFINITION') |
+ pdca.frame_of_reference.name= 'assembly definition')) > 0 );
+WHERE
+ WR1 : SIZEOF( QUERY( pd <* assembly_definitions |
+ NOT ('assembly' IN categories_of_product(pd.formation.of_product)) ))= 0;
+END_RULE;
+
+RULE restrict_centre_of_mass_representation FOR (representation);
+
+WHERE
+ WR1 : SIZEOF ( QUERY ( r <* representation |
+ ( r.name ='centre of mass' ) AND
+ ( ( SIZEOF ( r.items ) <>1 ) OR
+ (SIZEOF ( QUERY ( i <* r.items |
+ ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'POINT' IN TYPEOF ( i ) ) AND
+ ( i.name = 'centre point' ) )) <>1 ) ) ) )
+ =0;
+END_RULE;
+
+RULE restrict_classification_assignments FOR (applied_classification_assignment);
+
+WHERE
+ WR1 : SIZEOF(QUERY(aia <* applied_classification_assignment |
+ NOT class_assignment_is_valid(aia)))=0;
+END_RULE;
+
+RULE restrict_collection_category FOR (product_definition);
+ LOCAL
+ collection_definitions: SET OF product_definition := [];
+ END_LOCAL;
+ collection_definitions := QUERY( pd <* product_definition |
+ SIZEOF( QUERY( pdca <* USEDIN( pd, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF' + '.PRODUCT_DEFINITION_CONTEXT_ASSOCIATION.DEFINITION') |
+ pdca.frame_of_reference.name= 'collection definition')) > 0 );
+WHERE
+ WR1 : SIZEOF( QUERY( pd <* collection_definitions |
+ NOT ('collection' IN categories_of_product(pd.formation.of_product)) ))= 0;
+END_RULE;
+
+RULE restrict_concept_feature_operator FOR (concept_feature_operator);
+
+WHERE
+ WR1 : SIZEOF ( QUERY ( cfo <* concept_feature_operator | NOT
+ ( cfo.name IN ['and' , 'or' , 'oneof' , 'not' , 'implication'] ) ) ) = 0;
+ WR2 : SIZEOF ( QUERY ( cfo <* concept_feature_operator | (cfo.name = 'implication' ) AND
+ ( SIZEOF ( QUERY (cfrwc <* USEDIN ( cfo , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'CONCEPT_FEATURE_RELATIONSHIP_WITH_CONDITION.' +
+ 'CONDITIONAL_OPERATOR' ) |
+ SIZEOF ( QUERY ( ccf <* USEDIN( cfrwc , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'CONDITIONAL_CONCEPT_FEATURE.CONDITION' ) |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'INCLUSION_PRODUCT_CONCEPT_FEATURE' IN TYPEOF ( ccf )))) >0 )) >0 ))) = 0;
+ WR3 : SIZEOF( QUERY (cfo <* concept_feature_operator | (cfo.name = 'not')
+ AND (SIZEOF(QUERY(cfrwc <* USEDIN(cfo, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'CONCEPT_FEATURE_RELATIONSHIP_WITH_CONDITION.CONDITIONAL_OPERATOR') |
+ cfrwc.related_product_concept_feature :<>: cfrwc.relating_product_concept_feature)) >0 ))) = 0;
+END_RULE;
+
+RULE restrict_configuration_design_for_class_breakdown_association FOR (configuration_design);
+
+WHERE
+ WR1 : SIZEOF ( QUERY ( cd <* configuration_design |
+ ( cd.name ='functionality' ) AND
+ ( NOT ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION' IN TYPEOF ( cd. design ) ) OR
+ ( cd.design\product_definition.frame_of_reference.name<> 'functional definition' ) )
+ ) ) =0;
+ WR2 : SIZEOF ( QUERY ( cd <* configuration_design |
+ ( cd.name='realization' ) AND
+ ( NOT ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION' IN TYPEOF ( cd.design ) ) OR
+ ( cd.design\product_definition.frame_of_reference.name<> 'conceptual definition' ) )
+ ) ) =0;
+ WR3 : SIZEOF ( QUERY ( cd <* configuration_design |
+ ( cd.name IN ['functionality' , 'realization'] ) AND
+ ( NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_CLASS' IN TYPEOF ( cd.configuration.item_concept ) ) )
+ ) ) =0;
+END_RULE;
+
+RULE restrict_configuration_design_for_design_constraint FOR (configuration_design);
+
+WHERE
+ WR1 : SIZEOF ( QUERY (cd <* configuration_design |
+ (cd.name = 'design constraint usage') AND
+ (NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION' IN TYPEOF ( cd.design ) ) OR
+ (cd.design\product_definition.frame_of_reference.name <> 'design constraint definition')))) = 0;
+END_RULE;
+
+RULE restrict_group_relationship_for_classification_hierarchy FOR (group_relationship);
+
+WHERE
+ WR1 : SIZEOF( QUERY( gr <* group_relationship |
+ (gr\group_relationship.name = 'class hierarchy') AND
+ (NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CLASS' IN TYPEOF(gr\group_relationship.related_group)) OR
+ NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CLASS' IN TYPEOF(gr\group_relationship.relating_group))) )) = 0;
+END_RULE;
+
+RULE restrict_group_relationship_for_specification_category FOR (group_relationship);
+
+WHERE
+ WR1 : SIZEOF( QUERY( gr <* group_relationship |
+ (gr.name = 'specification category hierarchy') AND
+ (NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_CONCEPT_FEATURE_CATEGORY' IN TYPEOF(gr.related_group))
+ OR NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_CONCEPT_FEATURE_CATEGORY' IN TYPEOF(gr.relating_group))) )) = 0;
+END_RULE;
+
+RULE restrict_language_assignment_per_attribute FOR (attribute_language_assignment);
+
+WHERE
+ WR1 : SIZEOF ( QUERY ( ala1 <* attribute_language_assignment |
+ SIZEOF(QUERY( it <* ala1.items |
+ SIZEOF ( QUERY ( ala2 <* USEDIN ( it ,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ATTRIBUTE_LANGUAGE_ASSIGNMENT.ITEMS' ) |
+ ( ala1\attribute_classification_assignment.attribute_name = ala2\attribute_classification_assignment.attribute_name ) AND
+ ( ala1\attribute_classification_assignment.assigned_class :=: ala2\attribute_classification_assignment.assigned_class )
+ )) >1
+ )) >0
+ )) =0;
+END_RULE;
+
+RULE restrict_part_occurrence FOR (product_definition);
+ LOCAL
+ part_occurrences: SET OF product_definition := QUERY(pd <* product_definition |
+ ( pd.frame_of_reference.name = 'part occurrence' ));
+ END_LOCAL;
+WHERE
+ WR1 : SIZEOF ( QUERY ( pd <* part_occurrences |
+ ( NOT( pd.name IN
+ ['single instance' , 'selected instance' ,'quantified instance' , 'specified instance' ] ) ) ) ) = 0;
+ WR2 : SIZEOF ( QUERY ( pd <* part_occurrences |
+ (SIZEOF ( QUERY ( pdr <* USEDIN ( pd ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'PRODUCT_DEFINITION_RELATIONSHIP.RELATED_PRODUCT_DEFINITION' ) |
+ pdr.name = 'definition usage' ) ) <>1 ) AND
+ ( SIZEOF ( QUERY ( cd <* USEDIN ( pd , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'CONFIGURATION_DESIGN.DESIGN' ) |
+ ( cd.name = 'occurrence usage definition' ) AND
+ ( NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'PRODUCT_IDENTIFICATION' IN TYPEOF( cd.configuration ) ) ) ) ) <>1 ) ) ) = 0;
+ WR3 : SIZEOF ( QUERY ( pd <* part_occurrences |
+ (SIZEOF ( QUERY ( cd <* USEDIN ( pd , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.'+ 'PRODUCT_DEFINITION_RELATIONSHIP.RELATED_PRODUCT_DEFINITION' ) |
+ ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +'PRODUCT_DEFINITION_USAGE' IN TYPEOF ( cd ) ) ) ) = 0 )AND
+ ( SIZEOF ( USEDIN ( pd , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'PRODUCT_DEFINITION_OCCURRENCE_RELATIONSHIP.OCCURRENCE' ) ) = 0 ) ) ) = 0;
+ WR4 : SIZEOF ( QUERY ( pd <* part_occurrences |
+ ( pd.name = 'selected instance' ) AND
+ NOT valid_selected_instance_representation(pd) ))=0;
+ WR5 : SIZEOF ( QUERY ( pd <* part_occurrences |
+ ( pd.name = 'quantified instance' ) AND
+ ( SIZEOF ( QUERY (ppd <* USEDIN ( pd , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +'PROPERTY_DEFINITION.DEFINITION' ) |
+ ( ppd.name ='occurrence quantity' ) AND
+ ( SIZEOF ( QUERY ( pdr <*USEDIN ( ppd , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION' ) | (
+ pdr.used_representation.name = 'quantity' ) AND
+ (SIZEOF ( pdr.used_representation.items ) = 1 ) AND
+ (SIZEOF ( QUERY ( i <* pdr.used_representation.items |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'MEASURE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) AND
+ ( i.name = 'quantity measure' ) ) ) = 1)))= 1 )))= 0 )))= 0;
+ WR6 : SIZEOF ( QUERY ( pd <* part_occurrences |
+ ( pd.name = 'specified instance' ) AND
+ ( SIZEOF ( QUERY (
+ pdor <* USEDIN ( pd , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +'PRODUCT_DEFINITION_OCCURRENCE_RELATIONSHIP.OCCURRENCE' ) |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +'SPECIFIED_HIGHER_USAGE_OCCURRENCE' IN TYPEOF ( pdor.occurrence_usage ) ) ) = 0 ) ) ) = 0;
+END_RULE;
+
+RULE restrict_part_occurrence_category FOR (product_definition);
+ LOCAL
+ part_occurrences: SET OF product_definition := QUERY( pd <* product_definition |(
+ pd.frame_of_reference.name = 'part occurrence'));
+ END_LOCAL;
+WHERE
+ WR1 : SIZEOF( QUERY( pd <* part_occurrences |
+ (SIZEOF( QUERY( prpc <* USEDIN(pd.formation.of_product, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS') |
+ prpc.name IN ['part','raw material','tool'] )) = 0 ) )) = 0;
+END_RULE;
+
+RULE restrict_product_definitions_for_base_element FOR (product_definition_relationship);
+
+WHERE
+ WR1 : SIZEOF ( QUERY ( pdr <* product_definition_relationship |
+ ( pdr. name = 'solution alternative definition' ) AND
+ ( NOT( pdr. relating_product_definition.frame_of_reference.name
+ IN [ 'alternative definition' , 'functional definition' , 'conceptual definition' ] ) OR
+ ( pdr.related_product_definition.frame_of_reference.name<>'alternative definition' ) ) ) ) =0;
+END_RULE;
+
+RULE restrict_product_definitions_for_collection FOR (product_definition_relationship);
+
+WHERE
+ WR1 : SIZEOF ( QUERY ( pdr <* product_definition_relationship |
+ ( pdr. name = 'collection membership' ) AND
+ ( ( pdr.relating_product_definition.frame_of_reference.name<>'part definition' ) OR
+ ( pdr.related_product_definition.frame_of_reference.name<>'part occurrence' ) OR
+ ( SIZEOF ( QUERY ( pdca <* USEDIN (pdr.relating_product_definition ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF' + '.PRODUCT_DEFINITION_CONTEXT_ASSOCIATION.DEFINITION') |
+ ( pdca.role.name = 'part definition type' ) AND
+ ( pdca.frame_of_reference.name = 'collection definition' ) )) =0 ) ) ) ) =0;
+END_RULE;
+
+RULE restrict_product_definitions_for_definition_usage FOR (product_definition_relationship);
+
+WHERE
+ WR1 : SIZEOF ( QUERY ( pdr <* product_definition_relationship |
+ ( pdr.name = 'definition usage' ) AND
+ ( ( pdr.relating_product_definition.frame_of_reference.name<> 'part definition' ) OR
+ ( pdr.related_product_definition.frame_of_reference.name<>'part occurrence' )))) =0;
+END_RULE;
+
+RULE restrict_product_definitions_for_design_constraint_association FOR (product_definition_relationship);
+
+WHERE
+ WR1 : SIZEOF ( QUERY ( pdr <* product_definition_relationship |
+ ( pdr. name = 'design constraint association' ) AND
+ ( (pdr. relating_product_definition.frame_of_reference.name<>'design constraint definition' ) OR
+ NOT ( pdr.related_product_definition.frame_of_reference.name IN
+ ['alternative definition' , 'functional definition' ,'conceptual definition' ] ) ) ) ) =0;
+END_RULE;
+
+RULE restrict_product_definitions_for_part_definition_relationship FOR (product_definition_relationship);
+
+WHERE
+ WR1 : SIZEOF ( QUERY ( pdr <* product_definition_relationship |
+ ( pdr.name IN [ 'geometrical relationship' , 'definition replacement' ] ) AND
+ ( ( pdr.relating_product_definition.frame_of_reference.name <>'part definition' ) OR
+ ( pdr.related_product_definition.frame_of_reference.name <>'part definition' ) ) ) ) =0;
+END_RULE;
+
+RULE restrict_representation_for_surface_condition FOR (property_definition_representation);
+
+WHERE
+ WR1 : SIZEOF(QUERY(pdr <* property_definition_representation |
+ NOT surface_condition_correlation(pdr.definition, pdr.used_representation) ))=0;
+END_RULE;
+
+RULE restrict_treatment_result FOR (representation);
+ LOCAL
+ treatment_results: SET OF representation := [];
+ END_LOCAL;
+ treatment_results:= QUERY( r <* representation |
+ (r.name = 'treatment result') );
+WHERE
+ WR1 : (SIZEOF( QUERY( r <* treatment_results | (SIZEOF(r.items) > 2) )) = 0) AND
+ (SIZEOF( QUERY( r <* treatment_results |
+ (SIZEOF( QUERY( i <* r.items |
+ NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF(i)) )) > 0) )) = 0);
+ WR2 : SIZEOF( QUERY( r <* treatment_results |
+ (SIZEOF( QUERY( i <* r.items | i.name = 'result' )) = 0) )) = 0;
+ WR3 : SIZEOF( QUERY( r <* treatment_results |
+ (SIZEOF( QUERY( i <* r.items | i.name = 'purpose' )) > 1) )) = 0;
+END_RULE;
+
+RULE selected_instance_usage_requires_representation FOR (assembly_component_usage);
+ LOCAL
+ selected_instance_usages: SET OF assembly_component_usage := QUERY( acr <* assembly_component_usage|
+ (acr.name = 'selected instance usage'));
+ END_LOCAL;
+WHERE
+ WR1 : SIZEOF ( QUERY ( acr <* selected_instance_usages |
+ NOT valid_selected_instance_representation(acr) ))=0;
+END_RULE;
+
+RULE solution_definition_requires_solution_category FOR (product_definition);
+ LOCAL
+ solution_definitions: SET OF product_definition := [];
+ END_LOCAL;
+ solution_definitions := QUERY( pd <* product_definition |
+ (pd.frame_of_reference.name = 'alternative definition'));
+WHERE
+ WR1 : SIZEOF( QUERY( pd <* solution_definitions |
+ (SIZEOF( QUERY( prpc <* USEDIN(pd.formation.of_product, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF' + '.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS') |
+ prpc.name = 'alternative solution')) = 0 ) )) = 0;
+END_RULE;
+
+RULE stock_material_reference FOR (percentage_ply_definition, make_from_usage_option, product_related_product_category);
+ LOCAL
+ i,j,k : INTEGER;
+ dkuhr : LOGICAL;
+ nmfuo : INTEGER;
+ nprpc : INTEGER;
+ rp : product;
+ END_LOCAL;
+ dkuhr := TRUE;
+ REPEAT i:= LOINDEX (percentage_ply_definition) TO
+ HIINDEX (percentage_ply_definition);
+ nmfuo := 0;
+ REPEAT j:= LOINDEX (make_from_usage_option) TO
+ HIINDEX (make_from_usage_option);
+ IF (percentage_ply_definition[i] =
+ make_from_usage_option[j].relating_product_definition) THEN
+ rp := make_from_usage_option[j].related_product_definition.
+ formation.of_product;
+ nprpc := 0;
+ REPEAT k:= LOINDEX (product_related_product_category) TO
+ HIINDEX (product_related_product_category);
+ IF ((rp IN product_related_product_category[k].products) AND
+ (product_related_product_category[k].name IN
+ ['anisotropic material', 'isotropic material', 'stock core',
+ 'filament assembly', 'discontinuous fiber assembly'])) THEN
+ nprpc := nprpc + 1;
+ END_IF;
+ END_REPEAT;
+ IF (nprpc = 1) THEN
+ nmfuo := nmfuo + 1;
+ ELSE
+ dkuhr := FALSE;
+ ESCAPE;
+ END_IF;
+ END_IF;
+ END_REPEAT;
+ IF (dkuhr = FALSE) THEN
+ ESCAPE;
+ END_IF;
+ IF(nmfuo = 0) THEN
+ dkuhr := FALSE;
+ ESCAPE;
+ END_IF;
+ END_REPEAT;
+WHERE
+ WR1 : dkuhr;
+END_RULE;
+
+RULE styled_curve FOR (styled_item);
+
+WHERE
+ WR1 : SIZEOF( QUERY( si <* styled_item | ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE' IN TYPEOF (si.item)) AND (SIZEOF (QUERY (psa <* si.styles | (SIZEOF (QUERY (cs <* psa.styles | ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_STYLE' IN TYPEOF (cs)) )) > 0) )) <> 1) )) = 0;
+END_RULE;
+
+RULE subtype_exclusiveness_geometric_tolerance FOR (geometric_tolerance);
+
+WHERE
+ WR1 : SIZEOF(QUERY (gt <* geometric_tolerance | NOT (type_check_function(gt, ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANGULARITY_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CIRCULAR_RUNOUT_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COAXIALITY_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONCENTRICITY_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CYLINDRICITY_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FLATNESS_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LINE_PROFILE_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PARALLELISM_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PERPENDICULARITY_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POSITION_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ROUNDNESS_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STRAIGHTNESS_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_PROFILE_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SYMMETRY_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TOTAL_RUNOUT_TOLERANCE'] , 3)))) = 0;
+END_RULE;
+
+RULE subtype_exclusiveness_representation_item FOR (representation_item);
+
+WHERE
+ WR1 : SIZEOF(QUERY (cri <* representation_item |
+ NOT (type_check_function(cri,['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MEASURE_REPRESENTATION_ITEM',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VALUE_REPRESENTATION_ITEM',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPOUND_REPRESENTATION_ITEM'] , 3)))) = 0;
+END_RULE;
+
+RULE subtype_mandatory_geometric_tolerance FOR (geometric_tolerance);
+
+WHERE
+ WR1 : SIZEOF(QUERY (gt <* geometric_tolerance | NOT (type_check_function(gt, ['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANGULARITY_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CIRCULAR_RUNOUT_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COAXIALITY_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONCENTRICITY_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CYLINDRICITY_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FLATNESS_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LINE_PROFILE_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PARALLELISM_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PERPENDICULARITY_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POSITION_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ROUNDNESS_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STRAIGHTNESS_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_PROFILE_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SYMMETRY_TOLERANCE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TOTAL_RUNOUT_TOLERANCE'] , 0)))) = 0;
+END_RULE;
+
+RULE text_font_usage FOR (externally_defined_text_font, pre_defined_text_font);
+
+WHERE
+ WR1 : SIZEOF (QUERY (pdtf <* pre_defined_text_font | SIZEOF (USEDIN (pdtf, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TEXT_LITERAL.FONT')) = 0 )) = 0;
+ WR2 : SIZEOF (QUERY (edtf <* externally_defined_text_font | SIZEOF (USEDIN (edtf, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TEXT_LITERAL.FONT')) = 0 )) = 0;
+END_RULE;
+
+RULE thickness_laminate_table_component_select FOR (thickness_laminate_definition, next_assembly_usage_occurrence, product_related_product_category);
+ LOCAL
+ i,j,k : INTEGER;
+ dkuhr : LOGICAL;
+ nnauo : INTEGER;
+ nprpc : INTEGER;
+ rp : product;
+ END_LOCAL;
+ dkuhr := TRUE;
+ REPEAT i:= LOINDEX (thickness_laminate_definition) TO
+ HIINDEX (thickness_laminate_definition);
+ nnauo := 0;
+ REPEAT j:= LOINDEX (next_assembly_usage_occurrence) TO
+ HIINDEX (next_assembly_usage_occurrence);
+ IF (thickness_laminate_definition[i] =
+ next_assembly_usage_occurrence[j].relating_product_definition) THEN
+ rp := next_assembly_usage_occurrence[j].related_product_definition.
+ formation.of_product;
+ nprpc := 0;
+ REPEAT k:= LOINDEX (product_related_product_category) TO
+ HIINDEX (product_related_product_category);
+ IF ((rp IN product_related_product_category[k].products) AND
+ (product_related_product_category[k].name IN
+ ['ply', 'filament laminate', 'processed core'])) THEN
+ nprpc := nprpc + 1;
+ END_IF;
+ END_REPEAT;
+ IF (nprpc = 1) THEN
+ nnauo := nnauo + 1;
+ ELSE
+ dkuhr := FALSE;
+ ESCAPE;
+ END_IF;
+ END_IF;
+ END_REPEAT;
+ IF (dkuhr = FALSE) THEN
+ ESCAPE;
+ END_IF;
+ IF (nnauo <> 1) THEN
+ dkuhr := FALSE;
+ ESCAPE;
+ END_IF;
+ END_REPEAT;
+WHERE
+ WR1 : dkuhr;
+END_RULE;
+
+RULE validate_dependently_instantiable_entity_data_types FOR (action_method_role, annotation_text, attribute_value_role, auxiliary_geometric_representation_item, binary_numeric_expression, boolean_expression, bounded_curve, bounded_surface, cartesian_transformation_operator, comparison_expression, concept_feature_relationship, concept_feature_relationship_with_condition, connected_edge_set, document_usage_constraint, edge_blended_solid, effectivity_context_role, event_occurrence_role, explicit_procedural_representation_item_relationship, expression, founded_item, generic_expression, generic_variable, indirectly_selected_elements, interval_expression, literal_number, local_time, loop, modified_solid_with_placed_configuration, multiple_arity_boolean_expression, multiple_arity_generic_expression, multiple_arity_numeric_expression, numeric_expression, one_direction_repeat_factor, oriented_open_shell, oriented_path, positioned_sketch, procedural_representation, procedural_representation_sequence, product_definition_context_role, product_definition_effectivity, runout_zone_orientation, simple_boolean_expression, simple_generic_expression, simple_numeric_expression, solid_with_depression, solid_with_hole, solid_with_pocket, solid_with_protrusion, solid_with_shape_element_pattern, solid_with_slot, swept_area_solid, symbol_target, tolerance_zone_form, two_direction_repeat_factor, unary_generic_expression, unary_numeric_expression, user_selected_elements, variational_representation_item, view_volume);
+LOCAL
+ number_of_input_instances : INTEGER;
+ previous_in_chain : LIST OF GENERIC := [];
+ set_of_input_types : SET OF STRING := [];
+ all_instances : SET OF GENERIC := [];
+END_LOCAL;
+
+ all_instances := all_instances + action_method_role + annotation_text + attribute_value_role + auxiliary_geometric_representation_item + binary_numeric_expression + boolean_expression + bounded_curve + bounded_surface + cartesian_transformation_operator + comparison_expression + concept_feature_relationship + concept_feature_relationship_with_condition + connected_edge_set + document_usage_constraint + edge_blended_solid + effectivity_context_role + event_occurrence_role + explicit_procedural_representation_item_relationship + expression + founded_item + generic_expression + generic_variable + indirectly_selected_elements + interval_expression + literal_number + local_time + loop + modified_solid_with_placed_configuration + multiple_arity_boolean_expression + multiple_arity_generic_expression + multiple_arity_numeric_expression + numeric_expression + one_direction_repeat_factor + oriented_open_shell + oriented_path + positioned_sketch + procedural_representation + procedural_representation_sequence + product_definition_context_role + product_definition_effectivity + runout_zone_orientation + simple_boolean_expression + simple_generic_expression + simple_numeric_expression + solid_with_depression + solid_with_hole + solid_with_pocket + solid_with_protrusion + solid_with_shape_element_pattern + solid_with_slot + swept_area_solid + symbol_target + tolerance_zone_form + two_direction_repeat_factor + unary_generic_expression + unary_numeric_expression + user_selected_elements + variational_representation_item + view_volume;--<make a union of all implicit populations of the FOR-clause>
+number_of_input_instances := SIZEOF(all_instances);
+(* Collect all type strings of all FOR instances into one set. *)
+REPEAT i:=1 TO number_of_input_instances;
+ set_of_input_types := set_of_input_types + TYPEOF(all_instances[i]);
+END_REPEAT;
+WHERE
+ WR1 : dependently_instantiated(all_instances, set_of_input_types,
+ previous_in_chain);
+END_RULE;
+
+FUNCTION acyclic
+ (arg1: generic_expression; arg2: SET [0:?] OF generic_expression) : BOOLEAN;
+LOCAL
+ result: BOOLEAN := TRUE;
+END_LOCAL;
+
+IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SIMPLE_GENERIC_EXPRESSION'
+ IN TYPEOF (arg1))
+THEN
+ RETURN (TRUE);
+END_IF;
+
+IF arg1 IN arg2
+THEN
+ RETURN (FALSE);
+END_IF;
+
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.UNARY_GENERIC_EXPRESSION'
+ IN TYPEOF (arg1)
+THEN
+ RETURN
+ (acyclic(arg1\unary_generic_expression.operand,arg2+[arg1]));
+END_IF;
+
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.BINARY_GENERIC_EXPRESSION'
+ IN TYPEOF (arg1)
+THEN
+ RETURN
+ (acyclic(arg1\binary_generic_expression.operands[1],arg2+[arg1])
+ AND
+ acyclic(arg1\binary_generic_expression.operands[2],arg2+[arg1]));
+END_IF;
+
+IF
+'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MULTIPLE_ARITY_GENERIC_EXPRESSION'
+ IN TYPEOF (arg1)
+THEN
+ result := TRUE;
+ REPEAT i := 1 TO
+ SIZEOF (arg1\multiple_arity_generic_expression.operands);
+ result := result AND
+ acyclic(arg1\multiple_arity_generic_expression.operands[i], arg2+[arg1]);
+ END_REPEAT;
+
+ RETURN (result);
+END_IF;
+ RETURN (result);
+END_FUNCTION;
+
+FUNCTION acyclic_composite_text
+ (start_composite: composite_text; child_text: SET [1:?] OF text_or_character) : LOGICAL;
+ LOCAL
+ i : INTEGER;
+ local_composite_text : SET [0:?] OF composite_text;
+ local_annotation_text : SET [0:?] OF annotation_text;
+ local_children : SET [0:?] OF text_or_character;
+ END_LOCAL;
+
+ local_composite_text := QUERY (child <* child_text |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPOSITE_TEXT'
+ IN TYPEOF (child)));
+
+ IF (SIZEOF (local_composite_text) > 0)
+ THEN
+ REPEAT i := 1 TO HIINDEX (local_composite_text);
+ IF (start_composite :=: local_composite_text[i])
+ THEN
+ RETURN (FALSE);
+ END_IF;
+ END_REPEAT;
+ END_IF;
+
+ local_children := child_text;
+
+ IF (SIZEOF (local_composite_text)) > 0 THEN
+ REPEAT i := 1 TO HIINDEX (local_composite_text);
+ local_children := local_children +
+ local_composite_text[i].collected_text;
+ END_REPEAT;
+ END_IF;
+
+ local_annotation_text := QUERY (child <* child_text |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT'
+ IN TYPEOF (child)));
+
+ IF (SIZEOF (local_annotation_text) > 0) THEN
+ REPEAT i := 1 TO HIINDEX (local_annotation_text);
+ local_children := local_children +
+ QUERY (item <* local_annotation_text[i]\mapped_item.
+ mapping_source.mapped_representation.items |
+ SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ANNOTATION_TEXT',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPOSITE_TEXT'] *
+ TYPEOF(item)) > 0);
+ END_REPEAT;
+ END_IF;
+
+ IF (local_children :<>: child_text) THEN
+ RETURN (acyclic_composite_text (start_composite, local_children));
+ ELSE
+ RETURN (TRUE);
+ END_IF;
+END_FUNCTION;
+
+FUNCTION acyclic_curve_replica
+ (rep: curve_replica; parent: curve) : BOOLEAN;
+IF NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_REPLICA') IN TYPEOF(parent)) THEN
+ RETURN (TRUE);
+ END_IF;
+ (* Return TRUE if the parent is not of type curve_replica *)
+ IF (parent :=: rep) THEN
+ RETURN (FALSE);
+ (* Return FALSE if the parent is the same curve_replica, otherwise,
+ call function again with the parents own parent_curve. *)
+ ELSE
+ RETURN(acyclic_curve_replica(rep,
+ parent\curve_replica.parent_curve));
+ END_IF;
+END_FUNCTION;
+
+FUNCTION acyclic_mapped_item_usage
+ (rep: representation) : BOOLEAN;
+ LOCAL
+ items : SET OF representation_item;
+ END_LOCAL;
+
+ items := QUERY (item <* rep.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM' IN TYPEOF (item));
+ IF SIZEOF (items) = 0
+ THEN
+ RETURN (FALSE);
+ ELSE
+ REPEAT i := 1 TO HIINDEX (items);
+ IF items[i]\mapped_item.mapping_source.mapped_representation :=: rep
+ THEN
+ RETURN (TRUE);
+ ELSE
+ RETURN (acyclic_mapped_item_usage(items[i]\
+ mapped_item.mapping_source.mapped_representation));
+ END_IF;
+ END_REPEAT;
+ RETURN (FALSE);
+ END_IF;
+END_FUNCTION;
+
+FUNCTION acyclic_mapped_representation
+ (mi: mapped_item) : BOOLEAN;
+ LOCAL
+ rms : SET OF representation_map;
+ mis : SET OF mapped_item;
+ rs1, rs2 : SET OF representation;
+ END_LOCAL;
+
+ rs1 := using_representations(mi);
+ rs2 := [];
+ -- loop as long as there are elements in rs1
+ REPEAT WHILE SIZEOF(rs1) > 0;
+ REPEAT i := 1 TO HIINDEX(rs1);
+ -- Determine the set of representation_map that reference the parent_set
+ rms := bag_to_set(USEDIN(rs1[i], 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.REPRESENTATION_MAP.MAPPED_REPRESENTATION'));
+ IF SIZEOF(rms) > 0 THEN
+ REPEAT j := 1 TO HIINDEX(rms);
+ mis := bag_to_set(USEDIN(rms[i], 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAPPED_ITEM.MAPPING_SOURCE'));
+ IF SIZEOF(mis) > 0 THEN
+ REPEAT j := 1 TO HIINDEX(mis);
+ -- check mis members for instance equal with mi. If so then there is a cycle
+ IF mis[i] :=: mi THEN
+ RETURN (FALSE);
+ END_IF;
+ rs2 := rs2 + using_representations(mis[i]);
+ END_REPEAT;
+ END_IF;
+ END_REPEAT;
+ END_IF;
+ END_REPEAT;
+ rs1 := rs2;
+ rs2 := [];
+ END_REPEAT;
+ RETURN (TRUE);
+END_FUNCTION;
+
+FUNCTION acyclic_point_replica
+ (rep: point_replica; parent: point) : BOOLEAN;
+IF NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_REPLICA') IN TYPEOF(parent)) THEN
+ RETURN (TRUE);
+ END_IF;
+ (* Return TRUE if the parent is not of type point_replica *)
+ IF (parent :=: rep) THEN
+ RETURN (FALSE);
+ (* Return FALSE if the parent is the same point_replica, otherwise,
+ call function again with the parents own parent_pt. *)
+ ELSE RETURN(acyclic_point_replica(rep, parent\point_replica.parent_pt));
+ END_IF;
+END_FUNCTION;
+
+FUNCTION acyclic_product_definition_relationship
+ (relation: product_definition_relationship; relatives: SET [1:?] OF product_definition; specific_relation: STRING) : BOOLEAN;
+ LOCAL
+ x : SET OF product_definition_relationship;
+ END_LOCAL;
+
+ IF relation.relating_product_definition IN relatives THEN
+ RETURN (FALSE);
+ END_IF;
+ x := QUERY(pd <* bag_to_set(USEDIN(relation.relating_product_definition, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'PRODUCT_DEFINITION_RELATIONSHIP.' + 'RELATED_PRODUCT_DEFINITION')) | specific_relation IN TYPEOF(pd));
+ REPEAT i := 1 TO HIINDEX(x);
+ IF NOT acyclic_product_definition_relationship(x[i], relatives + relation.relating_product_definition, specific_relation) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_REPEAT;
+ RETURN (TRUE);
+END_FUNCTION;
+
+FUNCTION acyclic_representation_relationship
+ (relation: representation_relationship; relatives: SET [1:?] OF representation; specific_relation: STRING) : BOOLEAN;
+ LOCAL
+ x : SET OF representation_relationship;
+ END_LOCAL;
+
+ IF relation.rep_1 IN relatives THEN
+ RETURN (FALSE);
+ END_IF;
+ x := QUERY(r <* bag_to_set(USEDIN(relation.rep_1, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'REPRESENTATION_RELATIONSHIP.' + 'REP_2')) | specific_relation IN TYPEOF(r));
+ REPEAT i := 1 TO HIINDEX(x);
+ IF NOT acyclic_representation_relationship(x[i], relatives + relation.rep_1, specific_relation) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_REPEAT;
+ RETURN (TRUE);
+END_FUNCTION;
+
+FUNCTION acyclic_solid_replica
+ (rep: solid_replica; parent: solid_model) : BOOLEAN;
+IF NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SOLID_REPLICA') IN TYPEOF(parent)) THEN
+ RETURN (TRUE);
+ END_IF;
+ (* Return TRUE if the parent is not of type solid_replica. *)
+ IF (parent :=: rep) THEN
+ RETURN (FALSE);
+ (* Return FALSE if the parent is the same solid_replica, otherwise,
+ call function again with the parents own parent_solid. *)
+ ELSE RETURN(acyclic_solid_replica(rep,
+ parent\solid_replica.parent_solid));
+ END_IF;
+END_FUNCTION;
+
+FUNCTION acyclic_surface_replica
+ (rep: surface_replica; parent: surface) : BOOLEAN;
+IF NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_REPLICA') IN TYPEOF(parent)) THEN
+ RETURN (TRUE);
+ END_IF;
+ (* Return TRUE if the parent is not of type surface_replica *)
+ IF (parent :=: rep) THEN
+ RETURN (FALSE);
+ (* Return FALSE if the parent is the same surface_replica, otherwise,
+ call function again with the parents own parent_surface. *)
+ ELSE RETURN(acyclic_surface_replica(rep,
+ parent\surface_replica.parent_surface));
+ END_IF;
+END_FUNCTION;
+
+FUNCTION advanced_face_properties
+ (testface: face) : BOOLEAN;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ADVANCED_FACE' IN TYPEOF(testface) THEN
+ RETURN (TRUE);
+END_IF;
+(* if testface is a subface recursively test the parent_face,
+return FALSE for all other types of face *)
+IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SUBFACE' IN TYPEOF(testface)) THEN
+ RETURN(advanced_face_properties(testface\subface.parent_face));
+ ELSE RETURN (FALSE);
+END_IF;
+END_FUNCTION;
+
+FUNCTION aspect_ratio
+ (p: planar_box) : positive_ratio_measure;
+IF (p.size_in_x > 0.) AND (p.size_in_y > 0.) THEN
+ RETURN (p.size_in_x / p.size_in_y);
+ ELSE
+ RETURN (?);
+ END_IF;
+END_FUNCTION;
+
+FUNCTION associated_surface
+ (arg: pcurve_or_surface) : surface;
+ LOCAL
+ surf : surface;
+ END_LOCAL;
+
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE' IN TYPEOF(arg) THEN
+ surf := arg\pcurve.basis_surface;
+ ELSE
+ surf := arg;
+ END_IF;
+ RETURN(surf);
+END_FUNCTION;
+
+FUNCTION bag_to_set
+ (the_bag: BAG [0:?] OF GENERIC: intype) : SET [0:?] OF GENERIC: intype;
+ LOCAL
+ the_set : SET OF GENERIC:intype := [];
+ END_LOCAL;
+
+ IF SIZEOF(the_bag) > 0 THEN
+ REPEAT i := 1 TO HIINDEX(the_bag);
+ the_set := the_set + the_bag[i];
+ END_REPEAT;
+ END_IF;
+ RETURN (the_set);
+END_FUNCTION;
+
+FUNCTION base_axis
+ (dim: INTEGER; axis1: direction; axis2: direction; axis3: direction) : LIST [2:3] OF direction;
+ LOCAL
+ u : LIST [2:3] OF direction;
+ factor : REAL;
+ d1, d2 : direction;
+ END_LOCAL;
+
+ IF (dim = 3) THEN
+ d1 := NVL(normalise(axis3), dummy_gri || direction([0.0,0.0,1.0]));
+ d2 := first_proj_axis(d1,axis1);
+ u := [d2, second_proj_axis(d1,d2,axis2), d1];
+ ELSE
+ IF EXISTS(axis1) THEN
+ d1 := normalise(axis1);
+ u := [d1, orthogonal_complement(d1)];
+ IF EXISTS(axis2) THEN
+ factor := dot_product(axis2,u[2]);
+ IF (factor < 0.0) THEN
+ u[2].direction_ratios[1] := -u[2].direction_ratios[1];
+ u[2].direction_ratios[2] := -u[2].direction_ratios[2];
+ END_IF;
+ END_IF;
+ ELSE
+ IF EXISTS(axis2) THEN
+ d1 := normalise(axis2);
+ u := [orthogonal_complement(d1), d1];
+ u[1].direction_ratios[1] := -u[1].direction_ratios[1];
+ u[1].direction_ratios[2] := -u[1].direction_ratios[2];
+ ELSE
+ u := [dummy_gri || direction([1.0, 0.0]), dummy_gri ||
+ direction([0.0, 1.0])];
+ END_IF;
+ END_IF;
+ END_IF;
+ RETURN(u);
+END_FUNCTION;
+
+FUNCTION boolean_choose
+ (b: BOOLEAN; choice1: GENERIC: item; choice2: GENERIC: item) : GENERIC: item;
+IF b THEN
+ RETURN (choice1);
+ ELSE
+ RETURN (choice2);
+ END_IF;
+END_FUNCTION;
+
+FUNCTION build_2axes
+ (ref_direction: direction) : LIST [2:2] OF direction;
+ LOCAL
+ d : direction := NVL(normalise(ref_direction),
+ dummy_gri || direction([1.0,0.0]));
+ END_LOCAL;
+
+ RETURN([d, orthogonal_complement(d)]);
+END_FUNCTION;
+
+FUNCTION build_axes
+ (axis: direction; ref_direction: direction) : LIST [3:3] OF direction;
+ LOCAL
+ d1, d2 : direction;
+ END_LOCAL;
+ d1 := NVL(normalise(axis), dummy_gri || direction([0.0,0.0,1.0]));
+ d2 := first_proj_axis(d1, ref_direction);
+ RETURN([d2, normalise(cross_product(d1,d2))\vector.orientation, d1]);
+END_FUNCTION;
+
+FUNCTION categories_of_product
+ (obj: product) : SET [0:?] OF STRING;
+LOCAL
+ category_assignments: BAG OF product_category;
+ categories: SET OF STRING:=[];
+END_LOCAL;
+category_assignments := USEDIN(obj, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS');
+REPEAT i := LOINDEX(category_assignments) TO HIINDEX(category_assignments) BY 1;
+ categories := categories + category_assignments[i].name;
+END_REPEAT;
+RETURN(categories);
+END_FUNCTION;
+
+FUNCTION cc_design_person_and_organization_correlation
+ (e: cc_design_person_and_organization_assignment) : BOOLEAN;
+ LOCAL
+ po_role : STRING;
+ END_LOCAL;
+ po_role := e\person_and_organization_assignment.role.name;
+ CASE po_role OF
+ 'request_recipient' : IF SIZEOF (e.items) <>
+ SIZEOF (QUERY (x <* e.items |
+ SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'CHANGE_REQUEST',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'START_REQUEST'] *
+ TYPEOF (x)) = 1))
+ THEN RETURN(FALSE);
+ END_IF;
+ 'initiator' : IF SIZEOF (e.items) <>
+ SIZEOF (QUERY (x <* e.items |
+ SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'CHANGE_REQUEST',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'START_REQUEST',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'START_WORK',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'CHANGE'] *
+ TYPEOF (x)) = 1))
+ THEN RETURN(FALSE);
+ END_IF;
+ 'creator' : IF SIZEOF (e.items) <>
+ SIZEOF (QUERY (x <* e.items |
+ SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRODUCT_DEFINITION_FORMATION',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRODUCT_DEFINITION'] *
+ TYPEOF (x)) = 1))
+ THEN RETURN (FALSE);
+ END_IF;
+ 'part_supplier' : IF SIZEOF (e.items) <>
+ SIZEOF (QUERY (x <* e.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRODUCT_DEFINITION_FORMATION'
+ IN TYPEOF (x)))
+ THEN RETURN(FALSE);
+ END_IF;
+ 'design_supplier' : IF SIZEOF (e.items) <>
+ SIZEOF (QUERY (x <* e.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'PRODUCT_DEFINITION_FORMATION'
+ IN TYPEOF (x)))
+ THEN RETURN(FALSE);
+ END_IF;
+ 'design_owner' : IF SIZEOF (e.items) <>
+ SIZEOF (QUERY (x <* e.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT'
+ IN TYPEOF (x)))
+ THEN RETURN(FALSE);
+ END_IF;
+ 'configuration_manager' : IF SIZEOF (e.items) <>
+ SIZEOF (QUERY (x <* e.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'CONFIGURATION_ITEM'
+ IN TYPEOF (x)))
+ THEN RETURN(FALSE);
+ END_IF;
+ 'contractor' : IF SIZEOF (e.items) <>
+ SIZEOF (QUERY (x <* e.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONTRACT'
+ IN TYPEOF (x)))
+ THEN RETURN(FALSE);
+ END_IF;
+ 'classification_officer' : IF SIZEOF (e.items) <>
+ SIZEOF (QUERY (x <* e.items |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +
+ 'SECURITY_CLASSIFICATION'
+ IN TYPEOF (x))) THEN
+ RETURN(FALSE);
+ END_IF;
+ OTHERWISE : RETURN(TRUE);
+ END_CASE;
+ RETURN (TRUE);
+END_FUNCTION;
+
+FUNCTION check_continuous_edges
+ (edges: LIST [0:?] OF UNIQUE edge_curve) : BOOLEAN;
+ LOCAL
+ i : INTEGER;
+ next_vertex : vertex;
+ END_LOCAL;
+
+ -- first check whether there is only one edge in the list: in this
+ -- case there is no connectivity to be checked.
+
+ IF (SIZEOF(edges) = 1)
+ THEN RETURN(TRUE);
+ END_IF;
+
+ -- otherwise, establish the matching vertices of edges 1 and 2 in
+ -- the list, and determine the vertex of edge 2 to which edge 3,
+ -- must be connected, if there are more than two edges in the list.
+
+ IF ((edges[2].edge_start :=: edges[1].edge_end)
+ XOR (edges[2].edge_start :=: edges[1].edge_start))
+ THEN next_vertex := edges[2].edge_end;
+ ELSE
+ IF ((edges[2].edge_end :=: edges[1].edge_end)
+ XOR (edges[2].edge_end :=: edges[1].edge_start))
+ THEN next_vertex := edges[2].edge_start;
+ ELSE RETURN(FALSE); -- no match between any vertices of edges 1 and 2
+ END_IF;
+ END_IF;
+
+ -- exit if there are only two edges and they are connected
+
+ IF (SIZEOF(edges) = 2)
+ THEN RETURN(TRUE);
+ END_IF;
+
+ -- otherwise, check that any remaining edges are connected in list order.
+
+ REPEAT i := 3 TO HIINDEX(edges);
+ IF (edges[i].edge_start :=: next_vertex)
+ THEN next_vertex := edges[i].edge_end;
+ ELSE
+ IF (edges[i].edge_end :=: next_vertex)
+ THEN next_vertex := edges[i].edge_start;
+ ELSE RETURN(FALSE); -- no match is found.
+ END_IF;
+ END_IF;
+ END_REPEAT;
+ RETURN(TRUE);
+END_FUNCTION;
+
+FUNCTION check_text_alignment
+ (ct: composite_text) : BOOLEAN;
+ LOCAL
+ a : SET OF text_alignment := [];
+ END_LOCAL;
+
+ -- create a set of all the alignments
+ REPEAT i := 1 TO HIINDEX (ct.collected_text);
+ a := a + [ct.collected_text[i]\text_literal.alignment];
+ END_REPEAT;
+
+ -- if there is more than one element in the set
+ -- then not all alignments were the same
+ RETURN (SIZEOF(a) = 1);
+END_FUNCTION;
+
+FUNCTION check_text_font
+ (ct: composite_text) : BOOLEAN;
+ LOCAL
+ f : SET OF font_select := [];
+ END_LOCAL;
+
+ -- build a set of all the fonts
+ REPEAT i := 1 TO HIINDEX (ct.collected_text);
+ f := f + [ct.collected_text[i]\text_literal.font];
+ END_REPEAT;
+
+ -- if there is more than one element in the set
+ -- then not all fonts were the same
+ RETURN (SIZEOF(f) <= 1);
+END_FUNCTION;
+
+FUNCTION class_assignment_is_valid
+ (aia: applied_classification_assignment) : BOOLEAN;
+LOCAL
+ item: classification_item;
+ role: classification_role;
+END_LOCAL;
+
+role:= aia\classification_assignment.role;
+IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +'CLASS_SYSTEM' IN TYPEOF(aia\classification_assignment.assigned_class)) THEN
+ IF(role\classification_role.name <> 'class system membership') THEN
+ RETURN(FALSE);
+ END_IF;
+ REPEAT i:=LOINDEX(aia\applied_classification_assignment.items) TO HIINDEX(aia\applied_classification_assignment.items);
+ item:= aia\applied_classification_assignment.items[i];
+
+ IF (SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'CLASS_SYSTEM_ITEM'] * TYPEOF(item))=0) THEN
+-- item invalid if item does not belong to the types that may have a class_system
+ RETURN(FALSE);
+ END_IF;
+ END_REPEAT;
+END_IF;
+
+IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' +'CHARACTERIZED_CLASS' IN TYPEOF(aia\classification_assignment.assigned_class)) THEN
+ IF NOT(role\classification_role.name IN ['definitional','non-definitional','']) THEN
+ RETURN(FALSE);
+ END_IF;
+
+
+ REPEAT i:=LOINDEX(aia\applied_classification_assignment.items) TO HIINDEX(aia\applied_classification_assignment.items);
+ item:= aia\applied_classification_assignment.items[i];
+
+ IF (SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'CLASSIFIED_ITEM'] * TYPEOF(item))=0) THEN
+-- item invalid if item does not belong to the types that may have a characterized_class
+ RETURN(FALSE);
+ END_IF;
+ END_REPEAT;
+END_IF;
+
+ IF
+ (role\classification_role.name = 'definitional')
+ THEN
+ IF NOT
+ (SIZEOF(QUERY(it <* aia\applied_classification_assignment.items | NOT
+ (SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION_FORMATION', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRODUCT_DEFINITION'] * TYPEOF(it)) = 1)
+ )) = 0 )
+ THEN
+ RETURN(FALSE);
+ END_IF;
+ END_IF;
+
+RETURN(TRUE);
+END_FUNCTION;
+
+FUNCTION closed_shell_reversed
+ (a_shell: closed_shell) : oriented_closed_shell;
+ LOCAL
+ the_reverse : oriented_closed_shell;
+ END_LOCAL;
+ IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORIENTED_CLOSED_SHELL' IN TYPEOF (a_shell) ) THEN
+ the_reverse := dummy_tri ||
+ connected_face_set (
+ a_shell\connected_face_set.cfs_faces) ||
+ closed_shell () || oriented_closed_shell(
+ a_shell\oriented_closed_shell.closed_shell_element,
+ NOT(a_shell\oriented_closed_shell.orientation));
+ ELSE
+ the_reverse := dummy_tri ||
+ connected_face_set (
+ a_shell\connected_face_set.cfs_faces) ||
+ closed_shell () || oriented_closed_shell (a_shell, FALSE);
+ END_IF;
+ RETURN (the_reverse);
+END_FUNCTION;
+
+FUNCTION compute_total_depth
+ (swsrh: solid_with_stepped_round_hole) : positive_length_measure;
+LOCAL
+i : positive_integer;
+n : positive_integer := swsrh.segments;
+td : positive_length_measure := swsrh.segment_depths[1];
+END_LOCAL;
+
+IF n = 1
+THEN RETURN(td);
+ELSE
+ REPEAT i := 2 TO n;
+ td := td + swsrh.segment_depths[i];
+ END_REPEAT;
+END_IF;
+RETURN(td);
+END_FUNCTION;
+
+FUNCTION conditional_reverse
+ (p: BOOLEAN; an_item: reversible_topology) : reversible_topology;
+IF p THEN
+ RETURN (an_item);
+ ELSE
+ RETURN (topology_reversed (an_item));
+ END_IF;
+END_FUNCTION;
+
+FUNCTION constraints_composite_curve_on_surface
+ (c: composite_curve_on_surface) : BOOLEAN;
+ LOCAL
+ n_segments : INTEGER := SIZEOF(c.segments);
+ END_LOCAL;
+
+ REPEAT k := 1 TO n_segments;
+ IF (NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE' IN
+ TYPEOF(c\composite_curve.segments[k].parent_curve))) AND
+ (NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_CURVE' IN
+ TYPEOF(c\composite_curve.segments[k].parent_curve))) AND
+ (NOT('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPOSITE_CURVE_ON_SURFACE' IN
+ TYPEOF(c\composite_curve.segments[k].parent_curve))) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_REPEAT;
+ RETURN(TRUE);
+END_FUNCTION;
+
+FUNCTION constraints_geometry_shell_based_surface_model
+ (m: shell_based_surface_model) : BOOLEAN;
+ LOCAL
+ result : BOOLEAN := TRUE;
+ END_LOCAL;
+
+ REPEAT j := 1 TO SIZEOF(m.sbsm_boundary);
+ IF (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OPEN_SHELL' IN
+ TYPEOF(m.sbsm_boundary[j])) AND
+ (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CLOSED_SHELL' IN
+ TYPEOF(m.sbsm_boundary[j]))))
+ THEN
+ result := FALSE;
+ RETURN(result);
+ (* A surface model is composed of OPEN_ and CLOSED_SHELLs. *)
+ END_IF;
+ END_REPEAT;
+ RETURN(result);
+END_FUNCTION;
+
+FUNCTION constraints_geometry_shell_based_wireframe_model
+ (m: shell_based_wireframe_model) : BOOLEAN;
+ LOCAL
+ result : BOOLEAN := TRUE;
+ END_LOCAL;
+
+ REPEAT j := 1 TO SIZEOF(m.sbwm_boundary);
+ IF (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.WIRE_SHELL' IN
+ TYPEOF(m.sbwm_boundary[j])) AND
+ (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VERTEX_SHELL' IN
+ TYPEOF(m.sbwm_boundary[j]))))
+ THEN
+ result := FALSE;
+ RETURN(result);
+ (* A wireframe model is composed of WIRE_ and VERTEX_SHELLs *)
+ END_IF;
+ END_REPEAT;
+ RETURN(result);
+END_FUNCTION;
+
+FUNCTION constraints_param_b_spline
+ (degree: INTEGER; up_knots: INTEGER; up_cp: INTEGER; knot_mult: LIST [0:?] OF INTEGER; knots: LIST [0:?] OF parameter_value) : BOOLEAN;
+ LOCAL
+ result : BOOLEAN := TRUE;
+ k, sum : INTEGER;
+ END_LOCAL;
+
+ (* Find sum of knot multiplicities. *)
+ sum := knot_mult[1];
+
+ REPEAT i := 2 TO up_knots;
+ sum := sum + knot_mult[i];
+ END_REPEAT;
+
+ (* Check limits holding for all B-spline parametrisations *)
+ IF (degree < 1) OR (up_knots < 2) OR (up_cp < degree) OR
+ (sum <> (degree + up_cp + 2)) THEN
+ result := FALSE;
+ RETURN(result);
+ END_IF;
+
+ k := knot_mult[1];
+
+ IF (k < 1) OR (k > degree + 1) THEN
+ result := FALSE;
+ RETURN(result);
+ END_IF;
+
+ REPEAT i := 2 TO up_knots;
+ IF (knot_mult[i] < 1) OR (knots[i] <= knots[i-1]) THEN
+ result := FALSE;
+ RETURN(result);
+ END_IF;
+
+ k := knot_mult[i];
+
+ IF (i < up_knots) AND (k > degree) THEN
+ result := FALSE;
+ RETURN(result);
+ END_IF;
+
+ IF (i = up_knots) AND (k > degree + 1) THEN
+ result := FALSE;
+ RETURN(result);
+ END_IF;
+ END_REPEAT;
+ RETURN(result);
+END_FUNCTION;
+
+FUNCTION constraints_rectangular_composite_surface
+ (s: rectangular_composite_surface) : BOOLEAN;
+REPEAT i := 1 TO s.n_u;
+ REPEAT j := 1 TO s.n_v;
+ IF NOT (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_SURFACE' IN TYPEOF
+ (s.segments[i][j].parent_surface)) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.RECTANGULAR_TRIMMED_SURFACE' IN TYPEOF
+ (s.segments[i][j].parent_surface))) THEN
+ RETURN(FALSE);
+ END_IF;
+ END_REPEAT;
+ END_REPEAT;
+
+ (* Check the transition codes, omitting the last row or column *)
+ REPEAT i := 1 TO s.n_u-1;
+ REPEAT j := 1 TO s.n_v;
+ IF s.segments[i][j].u_transition = discontinuous THEN
+ RETURN(FALSE);
+ END_IF;
+ END_REPEAT;
+ END_REPEAT;
+
+ REPEAT i := 1 TO s.n_u;
+ REPEAT j := 1 TO s.n_v-1;
+ IF s.segments[i][j].v_transition = discontinuous THEN
+ RETURN(FALSE);
+ END_IF;
+ END_REPEAT;
+ END_REPEAT;
+ RETURN(TRUE);
+END_FUNCTION;
+
+FUNCTION control_characters_free
+ (s: STRING) : BOOLEAN;
+ LOCAL
+ ch : STRING;
+ END_LOCAL;
+
+ REPEAT i:=1 TO LENGTH(s);
+ ch := s[i];
+ IF (ch = '\x9') OR (ch = '\xA') OR (ch = '\xD') THEN
+ RETURN(FALSE);
+ END_IF;
+ END_REPEAT;
+ RETURN (TRUE);
+END_FUNCTION;
+
+FUNCTION cross_product
+ (arg1: direction; arg2: direction) : vector;
+ LOCAL
+ mag : REAL;
+ res : direction;
+ v1,v2 : LIST[3:3] OF REAL;
+ result : vector;
+ END_LOCAL;
+
+ IF ( NOT EXISTS (arg1) OR (arg1.dim = 2)) OR
+ ( NOT EXISTS (arg2) OR (arg2.dim = 2)) THEN
+ RETURN(?);
+ ELSE
+ BEGIN
+ v1 := normalise(arg1).direction_ratios;
+ v2 := normalise(arg2).direction_ratios;
+ res := dummy_gri || direction([(v1[2]*v2[3] - v1[3]*v2[2]),
+ (v1[3]*v2[1] - v1[1]*v2[3]), (v1[1]*v2[2] - v1[2]*v2[1])]);
+ mag := 0.0;
+ REPEAT i := 1 TO 3;
+ mag := mag + res.direction_ratios[i]*res.direction_ratios[i];
+ END_REPEAT;
+ IF (mag > 0.0) THEN
+ result := dummy_gri || vector(res, SQRT(mag));
+ ELSE
+ result := dummy_gri || vector(arg1, 0.0);
+ END_IF;
+ RETURN(result);
+ END;
+ END_IF;
+END_FUNCTION;
+
+FUNCTION curve_weights_positive
+ (b: rational_b_spline_curve) : BOOLEAN;
+ LOCAL
+ result : BOOLEAN := TRUE;
+ END_LOCAL;
+
+ REPEAT i := 0 TO b.upper_index_on_control_points;
+ IF b.weights[i] <= 0.0 THEN
+ result := FALSE;
+ RETURN(result);
+ END_IF;
+ END_REPEAT;
+ RETURN(result);
+END_FUNCTION;
+
+FUNCTION default_tolerance_table_cell_wr2
+ (agg: compound_item_definition) : BOOLEAN;
+BEGIN
+IF SIZEOF(agg) <= 5 THEN
+ RETURN(TRUE);
+ELSE
+ RETURN(FALSE);
+END_IF;
+END;
+END_FUNCTION;
+
+FUNCTION default_tolerance_table_cell_wr3
+ (agg: compound_item_definition) : BOOLEAN;
+BEGIN
+IF (SIZEOF(QUERY ( i <* agg | (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MEASURE_REPRESENTATION_ITEM' IN TYPEOF(i))
+ AND (i\representation_item.name = 'significant number of digits')) )) = 1) OR
+((SIZEOF(QUERY ( i <* agg | (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MEASURE_REPRESENTATION_ITEM' IN TYPEOF(i)) AND
+ (i\representation_item.name = 'lower limit')) )) = 1) AND
+(SIZEOF( QUERY ( i <* agg | (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MEASURE_REPRESENTATION_ITEM' IN TYPEOF(i)) AND
+ (i\representation_item.name = 'upper limit')) )) = 1)) THEN
+ RETURN(TRUE);
+ELSE
+ RETURN(FALSE);
+END_IF;
+END;
+END_FUNCTION;
+
+FUNCTION default_tolerance_table_cell_wr4
+ (agg: compound_item_definition) : BOOLEAN;
+BEGIN
+IF (SIZEOF(QUERY ( i <* agg | (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MEASURE_REPRESENTATION_ITEM' IN TYPEOF(i)) AND
+ (i\representation_item.name = 'plus minus tolerance value')) )) = 1) OR
+((SIZEOF(QUERY ( i <* agg | (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MEASURE_REPRESENTATION_ITEM' IN TYPEOF(i)) AND (
+ i\representation_item.name = 'lower tolerance value')) )) = 1) AND
+(SIZEOF( QUERY ( i <* agg | (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MEASURE_REPRESENTATION_ITEM' IN TYPEOF(i)) AND (
+ i\representation_item.name = 'upper tolerance value')) )) = 1)) THEN
+ RETURN(TRUE);
+ELSE
+ RETURN(FALSE);
+END_IF;
+END;
+END_FUNCTION;
+
+FUNCTION default_tolerance_table_cell_wr5
+ (agg: compound_item_definition) : BOOLEAN;
+BEGIN
+IF (SIZEOF(QUERY ( i <* agg | ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF(i)) )) <= 1) AND
+(SIZEOF(QUERY ( i <* agg | ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF(i)) )) =
+ SIZEOF(QUERY ( i <* agg | (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF(i)) AND
+ (i\representation_item.name = 'cell description'))) ))
+THEN
+ RETURN(TRUE);
+ELSE
+ RETURN(FALSE);
+END_IF;
+END;
+END_FUNCTION;
+
+FUNCTION dependently_instantiated
+ (set_of_input_instances: SET [0:?] OF GENERIC: igen; set_of_input_types: SET [0:?] OF STRING; previous_in_chain: LIST [0:?] OF GENERIC: cgen) : BOOLEAN;
+LOCAL
+ number_of_input_instances : INTEGER;
+ number_of_referring_instances : INTEGER;
+ bag_of_referring_instances : BAG OF GENERIC:igen := [];
+ dependently_instantiated_flag : BOOLEAN;
+ previous_in_chain_plus : LIST OF GENERIC:cgen := [];
+ result : BOOLEAN := true;
+ set_of_types : SET OF STRING := [];
+END_LOCAL;
+
+IF EXISTS(set_of_input_instances) THEN
+ number_of_input_instances := SIZEOF(set_of_input_instances);
+ (* Add the declared type of bag_of_referring_instances to the set of
+ types of the REFERENCEd instances for the subset comparison later.
+ *)
+ set_of_input_types := set_of_input_types + 'GENERIC';
+ REPEAT i:=1 TO number_of_input_instances;
+ (* Determine all references to the current input instance. *)
+ bag_of_referring_instances := USEDIN (set_of_input_instances[i] , '');
+ IF EXISTS(bag_of_referring_instances) THEN
+ number_of_referring_instances := SIZEOF(bag_of_referring_instances);
+ dependently_instantiated_flag := false;
+ REPEAT j:=1 TO number_of_referring_instances;
+ (* Determine the type strings of the current referencing instance.
+ *)
+ set_of_types := TYPEOF(bag_of_referring_instances[j]);
+ (* If the referencing instance is of one of the types of the
+ only dependently instantiable select items, the current input
+ instance may still be invalidly instantiated.
+ Otherwise it is OK, and the next input instance is tested.
+ *)
+ IF set_of_types <= set_of_input_types THEN -- subset operator
+ (* The referring instance is of one of the restricted types.
+ However, it may itself be referred to by a valid instance;
+ then also the current instance would be valid.
+ Thus, call this function recursively with the referring
+ instance as input.
+ To avoid an infinite loop in case a set of instances
+ reference each other in a closed loop, test first whether
+ the current referencing instance is in the list of
+ previously processed chain members.
+ *)
+ IF NOT (bag_of_referring_instances[j] IN previous_in_chain) THEN
+ previous_in_chain_plus := previous_in_chain +
+ set_of_input_instances[i];
+ IF dependently_instantiated([bag_of_referring_instances[j]],
+ set_of_input_types,
+ previous_in_chain_plus) THEN
+ dependently_instantiated_flag := true;
+ ESCAPE; -- dependently instantiated; next input instance
+ ELSE
+ (* Not dependently instantiated: go to next referring
+ instance. *)
+ SKIP;
+ END_IF;
+ END_IF;
+ ELSE
+ dependently_instantiated_flag := true;
+ ESCAPE; -- dependently instantiated; take next input instance
+ END_IF;
+ END_REPEAT;
+ IF NOT dependently_instantiated_flag THEN
+ RETURN(false);
+ END_IF;
+ ELSE
+ RETURN(false); -- not referenced at all => invalidly instantiated
+ END_IF;
+ END_REPEAT;
+ELSE
+ RETURN(false); -- no input
+END_IF;
+
+RETURN(true);
+END_FUNCTION;
+
+FUNCTION derive_angle
+ (placement_1: axis2_placement_3d; placement_2: axis2_placement_3d) : plane_angle_measure;
+ LOCAL
+ v1 : direction;
+ v2 : direction;
+ mag_v1 : REAL;
+ mag_v2 : REAL;
+ theta : plane_angle_measure;
+ END_LOCAL;
+ v1 := placement_1.p[1];
+ v2 := placement_2.p[1];
+ mag_v1 := SQRT (v1.direction_ratios[1]*v1.direction_ratios[1] +
+ v1.direction_ratios[2]*v1.direction_ratios[2]);
+ mag_v2 := SQRT (v2.direction_ratios[1]*v2.direction_ratios[1] +
+ v2.direction_ratios[2]*v2.direction_ratios[2]);
+ IF ((mag_v1 = 0.0) OR (mag_v2 = 0.0)) THEN
+ theta := 0.0;
+ RETURN (theta);
+ END_IF;
+ theta := ACOS ((v1.direction_ratios[1]*v2.direction_ratios[1] +
+ v1.direction_ratios[2]*v2.direction_ratios[2]) /
+ (mag_v1*mag_v2));
+ RETURN (theta);
+END_FUNCTION;
+
+FUNCTION derive_dimensional_exponents
+ (x: unit) : dimensional_exponents;
+ LOCAL
+ result : dimensional_exponents := dimensional_exponents(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
+ END_LOCAL;
+
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DERIVED_UNIT' IN TYPEOF(x) THEN
+ REPEAT i := LOINDEX(x\derived_unit.elements) TO HIINDEX(x\derived_unit.elements);
+ result.length_exponent := result.length_exponent +
+ (x\derived_unit.elements[i]\derived_unit_element.exponent *
+ x\derived_unit.elements[i]\derived_unit_element.unit\named_unit.dimensions.length_exponent);
+ result.mass_exponent := result.mass_exponent +
+ (x\derived_unit.elements[i]\derived_unit_element.exponent *
+ x\derived_unit.elements[i]\derived_unit_element.unit\named_unit.dimensions.mass_exponent);
+ result.time_exponent := result.time_exponent +
+ (x\derived_unit.elements[i]\derived_unit_element.exponent *
+ x\derived_unit.elements[i]\derived_unit_element.unit\named_unit.dimensions.time_exponent);
+ result.electric_current_exponent := result.electric_current_exponent +
+ (x\derived_unit.elements[i]\derived_unit_element.exponent *
+ x\derived_unit.elements[i]\derived_unit_element.unit\named_unit.dimensions.electric_current_exponent);
+ result.thermodynamic_temperature_exponent := result.thermodynamic_temperature_exponent +
+ (x\derived_unit.elements[i]\derived_unit_element.exponent *
+ x\derived_unit.elements[i]\derived_unit_element.unit\named_unit.dimensions.thermodynamic_temperature_exponent);
+ result.amount_of_substance_exponent := result.amount_of_substance_exponent +
+ (x\derived_unit.elements[i]\derived_unit_element.exponent *
+ x\derived_unit.elements[i]\derived_unit_element.unit\named_unit.dimensions.amount_of_substance_exponent);
+ result.luminous_intensity_exponent := result.luminous_intensity_exponent +
+ (x\derived_unit.elements[i]\derived_unit_element.exponent *
+ x\derived_unit.elements[i]\derived_unit_element.unit\named_unit.dimensions.luminous_intensity_exponent);
+ END_REPEAT;
+ ELSE
+ result := x\named_unit.dimensions;
+ END_IF;
+ RETURN (result);
+END_FUNCTION;
+
+FUNCTION dimension_of
+ (item: geometric_representation_item) : dimension_count;
+ LOCAL
+ x : SET OF representation;
+ y : representation_context;
+ dim : dimension_count;
+ END_LOCAL;
+ -- For cartesian_point, direction, or vector dimension is determined by
+ -- counting components.
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CARTESIAN_POINT' IN TYPEOF(item) THEN
+ dim := SIZEOF(item\cartesian_point.coordinates);
+ RETURN(dim);
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DIRECTION' IN TYPEOF(item) THEN
+ dim := SIZEOF(item\direction.direction_ratios);
+ RETURN(dim);
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VECTOR' IN TYPEOF(item) THEN
+ dim := SIZEOF(item\vector.orientation\direction.direction_ratios);
+ RETURN(dim);
+ END_IF;
+ -- For all other types of geometric_representation_item dim is obtained
+ -- via context.
+ -- Find the set of representation in which the item is used.
+
+ x := using_representations(item);
+
+ -- Determines the dimension_count of the
+ -- geometric_representation_context. Note that the
+ -- RULE compatible_dimension ensures that the context_of_items
+ -- is of type geometric_representation_context and has
+ -- the same dimension_count for all values of x.
+ -- The SET x is non-empty since this is required by WR1 of
+ -- representation_item.
+ y := x[1].context_of_items;
+ dim := y\geometric_representation_context.coordinate_space_dimension;
+ RETURN (dim);
+END_FUNCTION;
+
+FUNCTION dimensions_for_si_unit
+ (n: si_unit_name) : dimensional_exponents;
+CASE n OF
+ metre:
+ RETURN (dimensional_exponents(1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0));
+ gram:
+ RETURN (dimensional_exponents(0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0));
+ second:
+ RETURN (dimensional_exponents(0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0));
+ ampere:
+ RETURN (dimensional_exponents(0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0));
+ kelvin:
+ RETURN (dimensional_exponents(0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0));
+ mole:
+ RETURN (dimensional_exponents(0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0));
+ candela:
+ RETURN (dimensional_exponents(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0));
+ radian:
+ RETURN (dimensional_exponents(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0));
+ steradian:
+ RETURN (dimensional_exponents(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0));
+ hertz:
+ RETURN (dimensional_exponents(0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0));
+ newton:
+ RETURN (dimensional_exponents(1.0, 1.0, -2.0, 0.0, 0.0, 0.0, 0.0));
+ pascal:
+ RETURN (dimensional_exponents(-1.0, 1.0, -2.0, 0.0, 0.0, 0.0, 0.0));
+ joule:
+ RETURN (dimensional_exponents(2.0, 1.0, -2.0, 0.0, 0.0, 0.0, 0.0));
+ watt:
+ RETURN (dimensional_exponents(2.0, 1.0, -3.0, 0.0, 0.0, 0.0, 0.0));
+ coulomb:
+ RETURN (dimensional_exponents(0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 0.0));
+ volt:
+ RETURN (dimensional_exponents(2.0, 1.0, -3.0, -1.0, 0.0, 0.0, 0.0));
+ farad:
+ RETURN (dimensional_exponents(-2.0, -1.0, 4.0, 1.0, 0.0, 0.0, 0.0));
+ ohm:
+ RETURN (dimensional_exponents(2.0, 1.0, -3.0, -2.0, 0.0, 0.0, 0.0));
+ siemens:
+ RETURN (dimensional_exponents(-2.0, -1.0, 3.0, 2.0, 0.0, 0.0, 0.0));
+ weber:
+ RETURN (dimensional_exponents(2.0, 1.0, -2.0, -1.0, 0.0, 0.0, 0.0));
+ tesla:
+ RETURN (dimensional_exponents(0.0, 1.0, -2.0, -1.0, 0.0, 0.0, 0.0));
+ henry:
+ RETURN (dimensional_exponents(2.0, 1.0, -2.0, -2.0, 0.0, 0.0, 0.0));
+ degree_Celsius:
+ RETURN (dimensional_exponents(0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0));
+ lumen:
+ RETURN (dimensional_exponents(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0));
+ lux:
+ RETURN (dimensional_exponents(-2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0));
+ becquerel:
+ RETURN (dimensional_exponents(0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0));
+ gray:
+ RETURN (dimensional_exponents(2.0, 0.0, -2.0, 0.0, 0.0, 0.0, 0.0));
+ sievert:
+ RETURN (dimensional_exponents(2.0, 0.0, -2.0, 0.0, 0.0, 0.0, 0.0));
+ OTHERWISE:
+ RETURN (?);
+ END_CASE;
+END_FUNCTION;
+
+FUNCTION dot_product
+ (arg1: direction; arg2: direction) : REAL;
+ LOCAL
+ scalar : REAL;
+ vec1, vec2: direction;
+ ndim : INTEGER;
+ END_LOCAL;
+
+ IF NOT EXISTS (arg1) OR NOT EXISTS (arg2) THEN
+ scalar := ?;
+ (* When function is called with invalid data an indeterminate result
+ is returned *)
+ ELSE
+ IF (arg1.dim <> arg2.dim) THEN
+ scalar := ?;
+ (* When function is called with invalid data an indeterminate result
+ is returned *)
+ ELSE
+ BEGIN
+ vec1 := normalise(arg1);
+ vec2 := normalise(arg2);
+ ndim := arg1.dim;
+ scalar := 0.0;
+ REPEAT i := 1 TO ndim;
+ scalar := scalar +
+ vec1.direction_ratios[i]*vec2.direction_ratios[i];
+ END_REPEAT;
+ END;
+ END_IF;
+ END_IF;
+ RETURN (scalar);
+END_FUNCTION;
+
+FUNCTION edge_reversed
+ (an_edge: edge) : oriented_edge;
+ LOCAL
+ the_reverse : oriented_edge;
+ END_LOCAL;
+
+ IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORIENTED_EDGE' IN TYPEOF (an_edge) ) THEN
+ the_reverse := dummy_tri ||
+ edge(an_edge.edge_end, an_edge.edge_start) ||
+ oriented_edge(an_edge\oriented_edge.edge_element,
+ NOT (an_edge\oriented_edge.orientation)) ;
+ ELSE
+ the_reverse := dummy_tri ||
+ edge(an_edge.edge_end, an_edge.edge_start) ||
+ oriented_edge(an_edge, FALSE);
+ END_IF;
+ RETURN (the_reverse);
+END_FUNCTION;
+
+FUNCTION external_version_assignment_is_valid
+ (aia: applied_external_identification_assignment) : BOOLEAN;
+ LOCAL
+ item: identification_item;
+ role: identification_role;
+ END_LOCAL;
+ role:= aia.role;
+ IF role.name='version' THEN
+ REPEAT i:=LOINDEX(aia.items) TO HIINDEX(aia.items);
+ item:= aia.items[i];
+ IF (SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'EXTERNALLY_VERSIONED_ITEM']*TYPEOF(item))=0) THEN
+ -- item invalid if item does not belong to versionable types
+ RETURN(FALSE);
+ END_IF;
+ END_REPEAT;
+ RETURN(TRUE);
+ ELSE -- case where aia does not convey a version id
+ RETURN(TRUE);
+ END_IF;
+END_FUNCTION;
+
+FUNCTION face_bound_reversed
+ (a_face_bound: face_bound) : face_bound;
+ LOCAL
+ the_reverse : face_bound ;
+ END_LOCAL;
+ IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_OUTER_BOUND' IN TYPEOF (a_face_bound) ) THEN
+ the_reverse := dummy_tri ||
+ face_bound(a_face_bound\face_bound.bound,
+ NOT (a_face_bound\face_bound.orientation))
+ || face_outer_bound() ;
+ ELSE
+ the_reverse := dummy_tri ||
+ face_bound(a_face_bound.bound, NOT(a_face_bound.orientation));
+ END_IF;
+ RETURN (the_reverse);
+END_FUNCTION;
+
+FUNCTION face_reversed
+ (a_face: face) : oriented_face;
+ LOCAL
+ the_reverse : oriented_face ;
+ END_LOCAL;
+ IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORIENTED_FACE' IN TYPEOF (a_face) ) THEN
+ the_reverse := dummy_tri ||
+ face(set_of_topology_reversed(a_face.bounds)) ||
+ oriented_face(a_face\oriented_face.face_element,
+ NOT (a_face\oriented_face.orientation)) ;
+ ELSE
+ the_reverse := dummy_tri ||
+ face(set_of_topology_reversed(a_face.bounds)) ||
+ oriented_face(a_face, FALSE) ;
+ END_IF;
+ RETURN (the_reverse);
+END_FUNCTION;
+
+FUNCTION first_proj_axis
+ (z_axis: direction; arg: direction) : direction;
+ LOCAL
+ x_axis : direction;
+ v : direction;
+ z : direction;
+ x_vec : vector;
+ END_LOCAL;
+
+ IF (NOT EXISTS(z_axis)) THEN
+ RETURN (?) ;
+ ELSE
+ z := normalise(z_axis);
+ IF NOT EXISTS(arg) THEN
+ IF ((z.direction_ratios <> [1.0,0.0,0.0]) AND
+ (z.direction_ratios <> [-1.0,0.0,0.0])) THEN
+ v := dummy_gri || direction([1.0,0.0,0.0]);
+ ELSE
+ v := dummy_gri || direction([0.0,1.0,0.0]);
+ END_IF;
+ ELSE
+ IF (arg.dim <> 3) THEN
+ RETURN (?) ;
+ END_IF;
+ IF ((cross_product(arg,z).magnitude) = 0.0) THEN
+ RETURN (?);
+ ELSE
+ v := normalise(arg);
+ END_IF;
+ END_IF;
+ x_vec := scalar_times_vector(dot_product(v, z), z);
+ x_axis := vector_difference(v, x_vec).orientation;
+ x_axis := normalise(x_axis);
+ END_IF;
+ RETURN(x_axis);
+END_FUNCTION;
+
+FUNCTION gbsf_check_curve
+ (cv: representation_item) : BOOLEAN;
+IF SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.BOUNDED_CURVE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONIC', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_REPLICA', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LINE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OFFSET_CURVE_3D'] * TYPEOF(cv)) > 1 THEN
+ RETURN (FALSE);
+ END_IF;
+ IF SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CIRCLE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ELLIPSE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TRIMMED_CURVE'] * TYPEOF(cv)) = 1 THEN
+ RETURN (TRUE);
+ ELSE
+ IF (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_CURVE' IN TYPEOF(cv)) AND (cv\b_spline_curve.self_intersect = FALSE) OR (cv\b_spline_curve.self_intersect = UNKNOWN)) THEN
+ RETURN (TRUE);
+ ELSE
+ IF (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPOSITE_CURVE' IN TYPEOF(cv)) AND (cv\composite_curve.self_intersect = FALSE) OR (cv\composite_curve.self_intersect = UNKNOWN)) THEN
+ RETURN (SIZEOF(QUERY(seg <* cv\composite_curve.segments | NOT (gbsf_check_curve(seg.parent_curve)))) = 0);
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_REPLICA' IN TYPEOF(cv) THEN
+ RETURN (gbsf_check_curve(cv\curve_replica.parent_curve));
+ ELSE
+ IF (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OFFSET_CURVE_3D' IN TYPEOF(cv)) AND ((cv\offset_curve_3d.self_intersect = FALSE) OR (cv\offset_curve_3d.self_intersect = UNKNOWN)) AND (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE' IN TYPEOF(cv\offset_curve_3d.basis_curve)))) THEN
+ RETURN (gbsf_check_curve(cv\offset_curve_3d.basis_curve));
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE' IN TYPEOF(cv) THEN
+ RETURN ((gbsf_check_curve(cv\pcurve.reference_to_curve\representation.items[1])) AND (gbsf_check_surface(cv\pcurve.basis_surface)));
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE' IN TYPEOF(cv) THEN
+ IF (SIZEOF(cv\polyline.points) >= 3) THEN
+ RETURN (TRUE);
+ END_IF;
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_CURVE' IN TYPEOF(cv) THEN
+ IF gbsf_check_curve(cv\surface_curve.curve_3d) THEN
+ REPEAT i := 1 TO SIZEOF(cv\surface_curve.associated_geometry);
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE' IN TYPEOF(cv\surface_curve.associated_geometry[i]) THEN
+ IF NOT gbsf_check_surface(cv\surface_curve.associated_geometry[i]) THEN
+ RETURN (FALSE);
+ END_IF;
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE' IN TYPEOF(cv\surface_curve.associated_geometry[i]) THEN
+ IF NOT gbsf_check_curve(cv\surface_curve.associated_geometry[i]) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ END_IF;
+ END_REPEAT;
+ RETURN (TRUE);
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ RETURN (FALSE);
+END_FUNCTION;
+
+FUNCTION gbsf_check_point
+ (pnt: point) : BOOLEAN;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CARTESIAN_POINT' IN TYPEOF(pnt) THEN
+ RETURN (TRUE);
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_ON_CURVE' IN TYPEOF(pnt) THEN
+ RETURN (gbsf_check_curve(pnt\point_on_curve.basis_curve));
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_ON_SURFACE' IN TYPEOF(pnt) THEN
+ RETURN (gbsf_check_surface(pnt\point_on_surface.basis_surface));
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DEGENERATE_PCURVE' IN TYPEOF(pnt) THEN
+ RETURN ((gbsf_check_curve(pnt\degenerate_pcurve.reference_to_curve\representation.items[1])) AND (gbsf_check_surface(pnt\degenerate_pcurve.basis_surface)));
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ RETURN (FALSE);
+END_FUNCTION;
+
+FUNCTION gbsf_check_surface
+ (sf: surface) : BOOLEAN;
+IF (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_SURFACE' IN TYPEOF(sf)) AND (sf\b_spline_surface.self_intersect = FALSE) OR (sf\b_spline_surface.self_intersect = UNKNOWN)) THEN
+ RETURN (TRUE);
+ ELSE
+ IF SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SPHERICAL_SURFACE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TOROIDAL_SURFACE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_BOUNDED_SURFACE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.RECTANGULAR_TRIMMED_SURFACE'] * TYPEOF(sf)) = 1 THEN
+ RETURN (TRUE);
+ ELSE
+ IF (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OFFSET_SURFACE' IN TYPEOF(sf)) AND (sf\offset_surface.self_intersect = FALSE) OR (sf\offset_surface.self_intersect = UNKNOWN)) THEN
+ RETURN (gbsf_check_surface(sf\offset_surface.basis_surface));
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.RECTANGULAR_COMPOSITE_SURFACE' IN TYPEOF(sf) THEN
+ REPEAT i := 1 TO SIZEOF(sf\rectangular_composite_surface.segments);
+ REPEAT j := 1 TO SIZEOF(sf\rectangular_composite_surface.segments[i]);
+ IF NOT (gbsf_check_surface(sf\rectangular_composite_surface.segments[i][j].parent_surface)) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_REPEAT;
+ END_REPEAT;
+ RETURN (TRUE);
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_REPLICA' IN TYPEOF(sf) THEN
+ RETURN (gbsf_check_surface(sf\surface_replica.parent_surface));
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_OF_REVOLUTION' IN TYPEOF(sf) THEN
+ RETURN (gbsf_check_curve(sf\swept_surface.swept_curve));
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ RETURN (FALSE);
+END_FUNCTION;
+
+FUNCTION get_basis_surface
+ (c: curve_on_surface) : SET [0:2] OF surface;
+ LOCAL
+ surfs : SET[0:2] OF surface;
+ n : INTEGER;
+ END_LOCAL;
+ surfs := [];
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE' IN TYPEOF (c) THEN
+ surfs := [c\pcurve.basis_surface];
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_CURVE' IN TYPEOF (c) THEN
+ n := SIZEOF(c\surface_curve.associated_geometry);
+ REPEAT i := 1 TO n;
+ surfs := surfs +
+ associated_surface(c\surface_curve.associated_geometry[i]);
+ END_REPEAT;
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPOSITE_CURVE_ON_SURFACE' IN TYPEOF (c) THEN
+ (* For a composite_curve_on_surface the basis_surface is the intersection
+ of the basis_surfaces of all the segments. *)
+ n := SIZEOF(c\composite_curve.segments);
+ surfs := get_basis_surface(
+ c\composite_curve.segments[1].parent_curve);
+ IF n > 1 THEN
+ REPEAT i := 2 TO n;
+ surfs := surfs * get_basis_surface(
+ c\composite_curve.segments[i].parent_curve);
+ END_REPEAT;
+ END_IF;
+
+ END_IF;
+ RETURN(surfs);
+END_FUNCTION;
+
+FUNCTION get_description_value
+ (obj: description_attribute_select) : text;
+ LOCAL
+ description_bag : BAG OF description_attribute := (USEDIN(obj, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'DESCRIPTION_ATTRIBUTE.' + 'DESCRIBED_ITEM'));
+ END_LOCAL;
+
+ IF SIZEOF(description_bag) = 1 THEN
+ RETURN (description_bag[1].attribute_value);
+ ELSE
+ RETURN (?);
+ END_IF;
+END_FUNCTION;
+
+FUNCTION get_id_value
+ (obj: id_attribute_select) : identifier;
+ LOCAL
+ id_bag : BAG OF id_attribute := (USEDIN(obj, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ID_ATTRIBUTE.' + 'IDENTIFIED_ITEM'));
+ END_LOCAL;
+
+ IF SIZEOF(id_bag) = 1 THEN
+ RETURN (id_bag[1].attribute_value);
+ ELSE
+ RETURN (?);
+ END_IF;
+END_FUNCTION;
+
+FUNCTION get_name_value
+ (obj: name_attribute_select) : label;
+ LOCAL
+ name_bag : BAG OF name_attribute := (USEDIN(obj, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'NAME_ATTRIBUTE.' + 'NAMED_ITEM'));
+ END_LOCAL;
+
+ IF SIZEOF(name_bag) = 1 THEN
+ RETURN (name_bag[1].attribute_value);
+ ELSE
+ RETURN (?);
+ END_IF;
+END_FUNCTION;
+
+FUNCTION get_role
+ (obj: role_select) : object_role;
+ LOCAL
+ role_bag : BAG OF role_association := (USEDIN(obj, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'ROLE_ASSOCIATION.' + 'ITEM_WITH_ROLE'));
+ END_LOCAL;
+
+ IF SIZEOF(role_bag) = 1 THEN
+ RETURN (role_bag[1].role);
+ ELSE
+ RETURN (?);
+ END_IF;
+END_FUNCTION;
+
+FUNCTION get_shape_aspect_property_definition_representations
+ (s_a_instance: shape_aspect) : SET [0:?] OF property_definition_representation;
+LOCAL
+pd_set : SET OF property_definition := [];
+pdr_set : SET OF property_definition_representation := [] ;
+END_LOCAL;
+pd_set := bag_to_set(USEDIN(s_a_instance, 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PROPERTY_DEFINITION.DEFINITION'));
+IF (SIZEOF(pd_set) < 1) THEN
+RETURN (pdr_set);
+END_IF;
+REPEAT i := 1 TO HIINDEX(pd_set);
+pdr_set := pdr_set + (QUERY(pdr <* USEDIN(pd_set[i], 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'PROPERTY_DEFINITION_REPRESENTATION.' + 'DEFINITION') |
+'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHAPE_DEFINITION_REPRESENTATION' IN TYPEOF(pdr)));
+END_REPEAT;
+RETURN (pdr_set);
+END_FUNCTION;
+
+FUNCTION is_acyclic
+ (arg: generic_expression) : BOOLEAN;
+RETURN (acyclic (arg, []));
+END_FUNCTION;
+
+FUNCTION is_int_expr
+ (arg: numeric_expression) : LOGICAL;
+LOCAL
+ i: INTEGER := 0;
+END_LOCAL;
+
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.INT_LITERAL' IN TYPEOF(arg)
+THEN
+ RETURN (TRUE);
+END_IF;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.REAL_LITERAL' IN TYPEOF(arg)
+THEN
+ RETURN (FALSE);
+END_IF;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.INT_NUMERIC_VARIABLE' IN TYPEOF(arg)
+THEN
+ RETURN (TRUE);
+END_IF;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.REAL_NUMERIC_VARIABLE' IN TYPEOF(arg)
+THEN
+ RETURN (FALSE);
+END_IF;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ABS_FUNCTION' IN TYPEOF(arg)
+THEN
+ RETURN (is_int_expr(arg\unary_numeric_expression.operand));
+END_IF;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MINUS_FUNCTION' IN TYPEOF(arg)
+THEN
+ RETURN (is_int_expr(arg\unary_numeric_expression.operand));
+END_IF;
+IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SIN_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COS_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TAN_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ASIN_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ACOS_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ATAN_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EXP_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LOG_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LOG2_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LOG10_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SQUARE_ROOT_FUNCTION'
+ IN TYPEOF(arg))
+THEN
+ RETURN (FALSE);
+END_IF;
+IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PLUS_EXPRESSION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MULT_EXPRESSION'
+ IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAXIMUM_FUNCTION'
+ IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MINIMUM_FUNCTION'
+ IN TYPEOF(arg))
+THEN
+ REPEAT i :=1 TO SIZEOF (
+ arg\multiple_arity_numeric_expression.operands);
+ IF NOT
+ is_int_expr(arg\multiple_arity_numeric_expression.operands[i])
+ THEN
+ RETURN (FALSE);
+ END_IF;
+ END_REPEAT;
+ RETURN (TRUE);
+END_IF;
+IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MINUS_EXPRESSION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POWER_EXPRESSION'
+ IN TYPEOF(arg))
+THEN
+ RETURN (is_int_expr(arg\binary_numeric_expression.operands[1])
+ AND is_int_expr(arg\binary_numeric_expression.operands[2]));
+END_IF;
+IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DIV_EXPRESSION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MOD_EXPRESSION' IN TYPEOF(arg))
+THEN
+ RETURN(TRUE);
+END_IF;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SLASH_EXPRESSION' IN TYPEOF(arg)
+THEN
+ RETURN (FALSE);
+END_IF;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LENGTH_FUNCTION' IN TYPEOF(arg)
+THEN
+ RETURN (TRUE);
+END_IF;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VALUE_FUNCTION' IN TYPEOF(arg)
+THEN
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.INT_VALUE_FUNCTION'
+ IN TYPEOF(arg)
+ THEN
+ RETURN (TRUE);
+ ELSE
+ RETURN (FALSE);
+ END_IF;
+END_IF;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.INTEGER_DEFINED_FUNCTION'
+ IN TYPEOF(arg)
+THEN
+ RETURN(TRUE) ;
+END_IF;
+IF'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.REAL_DEFINED_FUNCTION' IN TYPEOF(arg)
+THEN
+ RETURN(FALSE) ;
+END_IF ;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.BOOLEAN_DEFINED_FUNCTION'
+ IN TYPEOF(arg)
+THEN
+ RETURN(FALSE) ;
+END_IF ;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STRING_DEFINED_FUNCTION'
+ IN TYPEOF(arg)
+THEN
+ RETURN (FALSE) ;
+END_IF ;
+
+RETURN (FALSE);
+END_FUNCTION;
+
+FUNCTION is_SQL_mappable
+ (arg: expression) : LOGICAL;
+LOCAL
+ i: INTEGER;
+END_LOCAL;
+
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SIMPLE_NUMERIC_EXPRESSION'
+ IN TYPEOF (arg)
+THEN
+ RETURN (TRUE);
+END_IF;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SQL_MAPPABLE_DEFINED_FUNCTION'
+ IN TYPEOF (arg)
+THEN
+ RETURN (TRUE);
+END_IF;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MINUS_FUNCTION' IN TYPEOF(arg)
+THEN
+ RETURN (is_SQL_mappable(arg\unary_numeric_expression.operand));
+END_IF;
+IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ABS_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SIN_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COS_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TAN_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ASIN_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ACOS_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ATAN_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EXP_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LOG_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LOG2_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LOG10_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SQUARE_ROOT_FUNCTION'
+ IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VALUE_FUNCTION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LENGTH_FUNCTION'
+ IN TYPEOF(arg))
+THEN
+ RETURN (FALSE);
+END_IF;
+IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PLUS_EXPRESSION' IN TYPEOF(arg))
+ OR('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MULT_EXPRESSION' IN TYPEOF(arg))
+ OR('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAXIMUM_FUNCTION'
+ IN TYPEOF(arg))
+ OR('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MINIMUM_FUNCTION'
+ IN TYPEOF(arg))
+THEN
+ REPEAT i :=1 TO SIZEOF (
+ arg\multiple_arity_numeric_expression.operands);
+ IF NOT is_SQL_mappable(
+ arg\multiple_arity_numeric_expression.operands[i])
+ THEN
+ RETURN (FALSE);
+ END_IF;
+ END_REPEAT;
+RETURN (TRUE);
+END_IF;
+IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MINUS_EXPRESSION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SLASH_EXPRESSION' IN
+ TYPEOF(arg))
+THEN
+ RETURN (is_SQL_mappable(
+ arg\binary_numeric_expression.operands[1])
+ AND is_SQL_mappable(arg\binary_numeric_expression.operands[2]));
+END_IF;
+IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DIV_EXPRESSION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MOD_EXPRESSION' IN TYPEOF(arg))
+ OR('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POWER_EXPRESSION'
+ IN TYPEOF(arg))
+THEN
+ RETURN (FALSE);
+END_IF;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SIMPLE_BOOLEAN_EXPRESSION'
+ IN TYPEOF (arg)
+THEN
+ RETURN (TRUE);
+END_IF;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.NOT_EXPRESSION' IN TYPEOF (arg)
+THEN
+ RETURN (is_SQL_mappable (arg\UNARY_GENERIC_EXPRESSION.OPERAND));
+END_IF;
+IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ODD_FUNCTION'IN TYPEOF (arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.XOR_EXPRESSION'
+ IN TYPEOF (arg))
+THEN
+ RETURN (FALSE);
+END_IF;
+IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AND_EXPRESSION' IN TYPEOF (arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OR_EXPRESSION' IN TYPEOF (arg))
+THEN
+ REPEAT i:=1 TO SIZEOF (
+ arg\MULTIPLE_ARITY_BOOLEAN_EXPRESSION.OPERANDS);
+ IF NOT is_SQL_mappable (
+ arg\MULTIPLE_ARITY_BOOLEAN_EXPRESSION.OPERANDS[i])
+ THEN
+ RETURN (FALSE);
+ END_IF;
+ END_REPEAT;
+ RETURN (TRUE);
+END_IF;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EQUALS_EXPRESSION' IN TYPEOF (arg)
+THEN
+ RETURN(is_SQL_mappable (
+ arg\BINARY_GENERIC_EXPRESSION.OPERANDS [1])
+ AND is_SQL_mappable(
+ arg\BINARY_GENERIC_EXPRESSION.OPERANDS [2]));
+END_IF;
+IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPARISON_EQUAL' IN TYPEOF (arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPARISON_GREATER'
+ IN TYPEOF (arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPARISON_GREATER_EQUAL'
+ IN TYPEOF (arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPARISON_LESS'
+ IN TYPEOF (arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPARISON_LESS_EQUAL'
+ IN TYPEOF (arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPARISON_NOT_EQUAL'
+ IN TYPEOF (arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LIKE_EXPRESSION'
+ IN TYPEOF (arg))
+THEN
+ RETURN (is_SQL_mappable (arg\COMPARISON_EXPRESSION.OPERANDS[1])
+ AND is_SQL_mappable (arg\COMPARISON_EXPRESSION.OPERANDS[2]));
+END_IF;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.INTERVAL_EXPRESSION' IN TYPEOF(arg)
+THEN
+ RETURN (is_SQL_mappable(arg\interval_expression.interval_low)
+ AND is_SQL_mappable(arg\interval_expression.interval_high)
+ AND is_SQL_mappable(arg\interval_expression.interval_item));
+END_IF;
+IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.NUMERIC_DEFINED_FUNCTION'
+ IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.BOOLEAN_DEFINED_FUNCTION'
+ IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.STRING_DEFINED_FUNCTION'
+ IN TYPEOF(arg))
+THEN
+ RETURN (FALSE) ;
+END_IF;
+
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SIMPLE_STRING_EXPRESSION'
+ IN TYPEOF(ARG)
+THEN
+ RETURN (TRUE);
+END_IF;
+IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.INDEX_EXPRESSION' IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SUBSTRING_EXPRESSION'
+ IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONCAT_EXPRESSION'
+ IN TYPEOF(arg))
+ OR ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FORMAT_FUNCTION'
+ IN TYPEOF(arg))
+THEN
+ RETURN (FALSE);
+END_IF;
+
+ RETURN (FALSE);
+END_FUNCTION;
+
+FUNCTION item_in_context
+ (item: representation_item; cntxt: representation_context) : BOOLEAN;
+ LOCAL
+ y : BAG OF representation_item;
+ END_LOCAL;
+ -- If there is one or more representation using both the item
+ -- and cntxt return true.
+ IF SIZEOF(USEDIN(item,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.REPRESENTATION.ITEMS')
+ * cntxt.representations_in_context) > 0 THEN
+ RETURN (TRUE);
+ -- Determine the bag of representation_items that reference
+ -- item
+ ELSE y := QUERY(z <* USEDIN (item , '') |
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.REPRESENTATION_ITEM' IN TYPEOF(z));
+ -- Ensure that the bag is not empty
+ IF SIZEOF(y) > 0 THEN
+ -- For each element in the bag
+ REPEAT i := 1 TO HIINDEX(y);
+ -- Check to see it is an item in the input cntxt.
+ IF item_in_context(y[i], cntxt) THEN
+ RETURN (TRUE);
+ END_IF;
+ END_REPEAT;
+ END_IF;
+ END_IF;
+ -- Return false when all possible branches have been checked
+ -- with no success.
+ RETURN (FALSE);
+END_FUNCTION;
+
+FUNCTION leap_year
+ (year: year_number) : BOOLEAN;
+IF ((((year MOD 4) = 0) AND ((year MOD 100) <> 0)) OR ((year MOD 400) = 0)) THEN
+ RETURN (TRUE);
+ ELSE
+ RETURN (FALSE);
+ END_IF;
+END_FUNCTION;
+
+FUNCTION list_face_loops
+ (f: face) : LIST [0:?] OF loop;
+ LOCAL
+ loops : LIST[0:?] OF loop := [];
+ END_LOCAL;
+
+ REPEAT i := 1 TO SIZEOF(f.bounds);
+ loops := loops +(f.bounds[i].bound);
+ END_REPEAT;
+
+ RETURN(loops);
+END_FUNCTION;
+
+FUNCTION list_of_topology_reversed
+ (a_list: list_of_reversible_topology_item) : list_of_reversible_topology_item;
+ LOCAL
+ the_reverse : list_of_reversible_topology_item;
+ END_LOCAL;
+
+ the_reverse := [];
+ REPEAT i := 1 TO SIZEOF (a_list);
+ the_reverse := topology_reversed (a_list [i]) + the_reverse;
+ END_REPEAT;
+
+ RETURN (the_reverse);
+END_FUNCTION;
+
+FUNCTION list_to_array
+ (lis: LIST [0:?] OF GENERIC: T; low: INTEGER; u: INTEGER) : ARRAY [low:u] OF GENERIC: T;
+ LOCAL
+ n : INTEGER;
+ res : ARRAY [low:u] OF GENERIC : T;
+ END_LOCAL;
+
+ n := SIZEOF(lis);
+ IF (n <> (u-low +1)) THEN
+ RETURN(?);
+ ELSE
+ res := [lis[1] : n];
+ REPEAT i := 2 TO n;
+ res[low+i-1] := lis[i];
+ END_REPEAT;
+ RETURN(res);
+ END_IF;
+END_FUNCTION;
+
+FUNCTION list_to_set
+ (l: LIST [0:?] OF GENERIC: T) : SET [0:?] OF GENERIC: T;
+ LOCAL
+ s : SET OF GENERIC:T := [];
+ END_LOCAL;
+
+ REPEAT i := 1 TO SIZEOF(l);
+ s := s + l[i];
+ END_REPEAT;
+
+ RETURN(s);
+END_FUNCTION;
+
+FUNCTION make_array_of_array
+ (lis: LIST [1:?] OF LIST [1:?] OF GENERIC: T; low1: INTEGER; u1: INTEGER; low2: INTEGER; u2: INTEGER) : ARRAY [low1:u1] OF ARRAY [low2:u2] OF GENERIC: T;
+ LOCAL
+ res : ARRAY[low1:u1] OF ARRAY [low2:u2] OF GENERIC : T;
+ END_LOCAL;
+
+(* Check input dimensions for consistency *)
+ IF (u1-low1+1) <> SIZEOF(lis) THEN
+ RETURN (?);
+ END_IF;
+ IF (u2 - low2 + 1 ) <> SIZEOF(lis[1]) THEN
+ RETURN (?) ;
+ END_IF;
+(* Initialise res with values from lis[1] *)
+ res := [list_to_array(lis[1], low2, u2) : (u1-low1 + 1)];
+ REPEAT i := 2 TO HIINDEX(lis);
+ IF (u2-low2+1) <> SIZEOF(lis[i]) THEN
+ RETURN (?);
+ END_IF;
+ res[low1+i-1] := list_to_array(lis[i], low2, u2);
+ END_REPEAT;
+
+ RETURN (res);
+END_FUNCTION;
+
+FUNCTION mixed_loop_type_set
+ (l: SET [0:?] OF loop) : LOGICAL;
+ LOCAL
+ poly_loop_type: LOGICAL;
+ END_LOCAL;
+ IF(SIZEOF(l) <= 1) THEN
+ RETURN(FALSE);
+ END_IF;
+ poly_loop_type := ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLY_LOOP' IN TYPEOF(l[1]));
+ REPEAT i := 2 TO SIZEOF(l);
+ IF(('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLY_LOOP' IN TYPEOF(l[i])) <> poly_loop_type)
+ THEN
+ RETURN(TRUE);
+ END_IF;
+ END_REPEAT;
+ RETURN(FALSE);
+END_FUNCTION;
+
+FUNCTION msb_shells
+ (brep: manifold_solid_brep) : SET [1:?] OF closed_shell;
+ LOCAL
+ return_set: SET[1:?] OF closed_shell := [brep.outer];
+ END_LOCAL;
+
+ IF SIZEOF(QUERY(msbtype <* TYPEOF(brep) |
+ msbtype LIKE '*BREP_WITH_VOIDS')) >= 1
+ THEN
+ return_set := return_set + brep\brep_with_voids.voids;
+ END_IF;
+ RETURN(return_set);
+END_FUNCTION;
+
+FUNCTION msf_curve_check
+ (cv: representation_item) : BOOLEAN;
+IF SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.BOUNDED_CURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONIC',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_REPLICA', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LINE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OFFSET_CURVE_3D'] * TYPEOF(cv)) > 1 THEN
+ RETURN(FALSE);
+END_IF;
+
+(* b_spline_curves shall not self-intersect
+ *)
+IF (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_CURVE' IN TYPEOF (cv)) AND
+ (cv\b_spline_curve.self_intersect = FALSE)OR
+ (cv\b_spline_curve.self_intersect = UNKNOWN)) THEN
+ RETURN(TRUE);
+ELSE
+
+ (* conics and lines are valid curve types
+ *)
+ IF SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONIC', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LINE']
+ * TYPEOF (cv)) = 1 THEN
+ RETURN(TRUE);
+ ELSE
+
+ (* a curve_replica shall reference a valid curve
+ *)
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_REPLICA' IN TYPEOF(cv) THEN
+ RETURN (msf_curve_check(cv\curve_replica.parent_curve));
+ ELSE
+
+ (* an offset_curve_3d shall not self-intersect and
+ shall reference a valid curve; a polyline is not a
+ valid basis_curve
+ *)
+ IF (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OFFSET_CURVE_3D' IN TYPEOF (cv))
+ AND
+ ((cv\offset_curve_3d.self_intersect = FALSE) OR
+ (cv\offset_curve_3d.self_intersect = UNKNOWN))
+ AND
+ (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE' IN TYPEOF
+ (cv\offset_curve_3d.basis_curve)))) THEN
+ RETURN (msf_curve_check(cv\offset_curve_3d.basis_curve));
+ ELSE
+
+ (* a pcurve shall reference a valid curve and a valid
+ basis_surface
+ *)
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE' IN TYPEOF(cv) THEN
+ RETURN ((msf_curve_check
+ (cv\pcurve.reference_to_curve\representation.items[1])) AND
+ (msf_surface_check(cv\pcurve.basis_surface)));
+ ELSE
+
+ (* a surface_curve references a curve_3d and one or
+ two pcurves or one or two surfaces or one of
+ each; all of these references shall be valid
+ *)
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_CURVE' IN TYPEOF(cv) THEN
+
+ (* if the curve reference is correct, check also the rest
+ *)
+ IF msf_curve_check(cv\surface_curve.curve_3d) THEN
+ REPEAT i := 1 TO SIZEOF
+ (cv\surface_curve.associated_geometry);
+
+ (* do for one or two associated_geometrys:
+ *)
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE' IN
+ TYPEOF (cv\surface_curve.associated_geometry[i]) THEN
+ IF NOT msf_surface_check
+ (cv\surface_curve.associated_geometry[i]) THEN
+ RETURN(FALSE);
+ END_IF;
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE' IN TYPEOF
+ (cv\surface_curve.associated_geometry[i]) THEN
+ IF NOT msf_curve_check
+ (cv\surface_curve.associated_geometry[i]) THEN
+ RETURN(FALSE);
+ END_IF;
+ END_IF;
+ END_IF;
+ END_REPEAT;
+ RETURN(TRUE);
+ END_IF;
+ ELSE
+
+ (* a polyline shall have at least 3 points
+ *)
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE' IN TYPEOF(cv) THEN
+ IF (SIZEOF (cv\polyline.points) >= 3) THEN RETURN (TRUE);
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+END_IF;
+(* FALSE is returned if the input parameter cv is not a valid curve.
+ *)
+RETURN (FALSE);
+END_FUNCTION;
+
+FUNCTION msf_surface_check
+ (surf: surface) : BOOLEAN;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ELEMENTARY_SURFACE' IN TYPEOF(surf) THEN
+ RETURN(TRUE);
+ ELSE
+
+ (* a swept_surface shall have a valid sweeping curve
+ *)
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SWEPT_SURFACE' IN TYPEOF (surf) THEN
+ RETURN (msf_curve_check(surf\swept_surface.swept_curve));
+ ELSE
+
+ (* an offset_surface shall not self-intersect and shall
+ reference a valid surface
+ *)
+ IF (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OFFSET_SURFACE' IN TYPEOF (surf)) AND
+ (surf\offset_surface.self_intersect = FALSE) OR
+ (surf\offset_surface.self_intersect = UNKNOWN)) THEN
+ RETURN (msf_surface_check(surf\offset_surface.basis_surface));
+ ELSE
+
+ (* a surface_replica shall have a valid parent surface
+ *)
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_REPLICA' IN TYPEOF(surf) THEN
+ RETURN(msf_surface_check(surf\surface_replica.parent_surface));
+ ELSE
+
+ (* a b_spline_surface shall not self-intersect
+ *)
+ IF (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_SURFACE' IN TYPEOF(surf)) AND
+ (surf\b_spline_surface.self_intersect = FALSE) OR
+ (surf\b_spline_surface.self_intersect = UNKNOWN)) THEN
+ RETURN(TRUE);
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ RETURN(FALSE);
+END_FUNCTION;
+
+FUNCTION nmsf_curve_check
+ (cv: representation_item) : BOOLEAN;
+IF SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.BOUNDED_CURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONIC',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_REPLICA',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LINE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OFFSET_CURVE_3D'] * TYPEOF(cv)) > 1
+ THEN RETURN(FALSE);
+ ELSE
+
+ (* b_spline_curves shall not self-intersect
+ *)
+ IF (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_CURVE' IN TYPEOF (cv)) AND
+ (cv\b_spline_curve.self_intersect = FALSE) OR
+ (cv\b_spline_curve.self_intersect = UNKNOWN))
+ THEN RETURN(TRUE);
+ ELSE
+
+ (* conics and lines are valid curve types
+ *)
+ IF SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONIC',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LINE'] * TYPEOF (cv)) = 1 THEN
+ RETURN(TRUE);
+ ELSE
+
+ (* a curve_replica shall reference a valid curve
+ *)
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_REPLICA' IN TYPEOF(cv) THEN
+ RETURN (nmsf_curve_check(cv\curve_replica.parent_curve));
+ ELSE
+
+ (* an offset_curve_3d shall not self-intersect and
+ shall reference a valid curve; a polyline is not a
+ valid basis_curve
+ *)
+ IF (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OFFSET_CURVE_3D' IN TYPEOF (cv))
+ AND
+ ((cv\offset_curve_3d.self_intersect = FALSE) OR
+ (cv\offset_curve_3d.self_intersect = UNKNOWN))
+ AND
+ (NOT ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE' IN TYPEOF
+ (cv\offset_curve_3d.basis_curve)))) THEN
+ RETURN (nmsf_curve_check(cv\offset_curve_3d.basis_curve));
+ ELSE
+
+ (* a pcurve shall reference a valid curve and a valid
+ basis_surface
+ *)
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE' IN TYPEOF(cv) THEN
+ RETURN ((nmsf_curve_check
+ (cv\pcurve.reference_to_curve\representation.items[1]))
+ AND
+ (nmsf_surface_check(cv\pcurve.basis_surface)));
+ ELSE
+
+ (* a surface_curve references a curve_3d and one or
+ two pcurves or one or two surfaces or one of
+ each; all of these references shall be valid
+ *)
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_CURVE' IN TYPEOF(cv) THEN
+
+ (* if the curve reference is correct, check also the rest
+ *)
+ IF nmsf_curve_check(cv\surface_curve.curve_3d) THEN
+ REPEAT i := 1 TO SIZEOF
+ (cv\surface_curve.associated_geometry);
+
+ (* do for one or two associated_geometrys:
+ *)
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE' IN
+ TYPEOF (cv\surface_curve.associated_geometry[i]) THEN
+ IF NOT nmsf_surface_check
+ (cv\surface_curve.associated_geometry[i]) THEN
+ RETURN(FALSE);
+ END_IF;
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PCURVE' IN TYPEOF
+ (cv\surface_curve.associated_geometry[i]) THEN
+ IF NOT nmsf_curve_check
+ (cv\surface_curve.associated_geometry[i]) THEN
+ RETURN(FALSE);
+ END_IF;
+ END_IF;
+ END_IF;
+ END_REPEAT;
+ RETURN(TRUE);
+ END_IF;
+ ELSE
+
+ (* a polyline shall have at least 3 points
+ *)
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE' IN TYPEOF(cv) THEN
+ IF (SIZEOF (cv\polyline.points) >= 3) THEN RETURN (TRUE);
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ (* FALSE is returned if the input parameter cv is not a valid curve.
+ *)
+ RETURN (FALSE);
+END_FUNCTION;
+
+FUNCTION nmsf_surface_check
+ (surf: surface) : BOOLEAN;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ELEMENTARY_SURFACE' IN TYPEOF(surf) THEN
+ RETURN(TRUE);
+ ELSE
+
+ (* a swept_surface shall have a valid sweeping curve
+ *)
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SWEPT_SURFACE' IN TYPEOF (surf) THEN
+ RETURN (nmsf_curve_check(surf\swept_surface.swept_curve));
+ ELSE
+
+ (* an offset_surface shall not self-intersect and shall
+ reference a valid surface
+ *)
+ IF (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OFFSET_SURFACE' IN TYPEOF (surf)) AND
+ (surf\offset_surface.self_intersect = FALSE) OR
+ (surf\offset_surface.self_intersect = UNKNOWN)) THEN
+ RETURN (nmsf_surface_check(surf\offset_surface.basis_surface));
+ ELSE
+
+ (* a surface_replica shall have a valid parent surface
+ *)
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SURFACE_REPLICA' IN TYPEOF(surf) THEN
+ RETURN(nmsf_surface_check(surf\surface_replica.parent_surface));
+ ELSE
+
+ (* a b_spline_surface shall not self-intersect
+ *)
+ IF (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_SURFACE' IN TYPEOF(surf))
+ AND
+ (surf\b_spline_surface.self_intersect = FALSE) OR
+ (surf\b_spline_surface.self_intersect = UNKNOWN)) THEN
+ RETURN(TRUE);
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ RETURN(FALSE);
+END_FUNCTION;
+
+FUNCTION normalise
+ (arg: vector_or_direction) : vector_or_direction;
+ LOCAL
+ ndim : INTEGER;
+ v : direction;
+ result : vector_or_direction;
+ vec : vector;
+ mag : REAL;
+ END_LOCAL;
+
+ IF NOT EXISTS (arg) THEN
+ result := ?;
+ (* When function is called with invalid data a NULL result is returned *)
+ ELSE
+ ndim := arg.dim;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VECTOR' IN TYPEOF(arg) THEN
+ BEGIN
+ v := dummy_gri || direction(arg\vector.orientation.direction_ratios);
+ IF arg.magnitude = 0.0 THEN
+ RETURN(?);
+ ELSE
+ vec := dummy_gri || vector (v, 1.0);
+ END_IF;
+ END;
+ ELSE
+ v := dummy_gri || direction (arg.direction_ratios);
+ END_IF;
+ mag := 0.0;
+ REPEAT i := 1 TO ndim;
+ mag := mag + v.direction_ratios[i]*v.direction_ratios[i];
+ END_REPEAT;
+ IF mag > 0.0 THEN
+ mag := SQRT(mag);
+ REPEAT i := 1 TO ndim;
+ v.direction_ratios[i] := v.direction_ratios[i]/mag;
+ END_REPEAT;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VECTOR' IN TYPEOF(arg) THEN
+ vec.orientation := v;
+ result := vec;
+ ELSE
+ result := v;
+ END_IF;
+ ELSE
+ RETURN(?);
+ END_IF;
+ END_IF;
+ RETURN (result);
+END_FUNCTION;
+
+FUNCTION open_shell_reversed
+ (a_shell: open_shell) : oriented_open_shell;
+ LOCAL
+ the_reverse : oriented_open_shell;
+ END_LOCAL;
+ IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORIENTED_OPEN_SHELL' IN TYPEOF (a_shell) ) THEN
+ the_reverse := dummy_tri ||
+ connected_face_set (
+ a_shell\connected_face_set.cfs_faces) ||
+ open_shell () || oriented_open_shell(
+ a_shell\oriented_open_shell.open_shell_element,
+ (NOT (a_shell\oriented_open_shell.orientation)));
+ ELSE
+ the_reverse := dummy_tri ||
+ connected_face_set (
+ a_shell\connected_face_set.cfs_faces) ||
+ open_shell () || oriented_open_shell (a_shell, FALSE);
+ END_IF;
+ RETURN (the_reverse);
+END_FUNCTION;
+
+FUNCTION orthogonal_complement
+ (vec: direction) : direction;
+ LOCAL
+ result : direction ;
+ END_LOCAL;
+
+ IF (vec.dim <> 2) OR NOT EXISTS (vec) THEN
+ RETURN(?);
+ ELSE
+ result := dummy_gri || direction([-vec.direction_ratios[2],
+ vec.direction_ratios[1]]);
+ RETURN(result);
+ END_IF;
+END_FUNCTION;
+
+FUNCTION path_head_to_tail
+ (a_path: path) : LOGICAL;
+ LOCAL
+ n : INTEGER;
+ p : LOGICAL := TRUE;
+ END_LOCAL;
+
+ n := SIZEOF (a_path.edge_list);
+ REPEAT i := 2 TO n;
+ p := p AND (a_path.edge_list[i-1].edge_end :=:
+ a_path.edge_list[i].edge_start);
+ END_REPEAT;
+
+ RETURN (p);
+END_FUNCTION;
+
+FUNCTION path_reversed
+ (a_path: path) : oriented_path;
+ LOCAL
+ the_reverse : oriented_path ;
+ END_LOCAL;
+ IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ORIENTED_PATH' IN TYPEOF (a_path) ) THEN
+ the_reverse := dummy_tri ||
+ path(list_of_topology_reversed (a_path.edge_list)) ||
+ oriented_path(a_path\oriented_path.path_element,
+ NOT(a_path\oriented_path.orientation)) ;
+ ELSE
+ the_reverse := dummy_tri ||
+ path(list_of_topology_reversed (a_path.edge_list)) ||
+ oriented_path(a_path, FALSE);
+ END_IF;
+
+ RETURN (the_reverse);
+END_FUNCTION;
+
+FUNCTION scalar_times_vector
+ (scalar: REAL; vec: vector_or_direction) : vector;
+ LOCAL
+ v : direction;
+ mag : REAL;
+ result : vector;
+ END_LOCAL;
+
+ IF NOT EXISTS (scalar) OR NOT EXISTS (vec) THEN
+ RETURN (?) ;
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VECTOR' IN TYPEOF (vec) THEN
+ v := dummy_gri || direction(vec\vector.orientation.direction_ratios);
+ mag := scalar * vec.magnitude;
+ ELSE
+ v := dummy_gri || direction(vec.direction_ratios);
+ mag := scalar;
+ END_IF;
+ IF (mag < 0.0 ) THEN
+ REPEAT i := 1 TO SIZEOF(v.direction_ratios);
+ v.direction_ratios[i] := -v.direction_ratios[i];
+ END_REPEAT;
+ mag := -mag;
+ END_IF;
+ result := dummy_gri || vector(normalise(v), mag);
+ END_IF;
+ RETURN (result);
+END_FUNCTION;
+
+FUNCTION second_proj_axis
+ (z_axis: direction; x_axis: direction; arg: direction) : direction;
+ LOCAL
+ y_axis : vector;
+ v : direction;
+ temp : vector;
+ END_LOCAL;
+
+ IF NOT EXISTS(arg) THEN
+ v := dummy_gri || direction([0.0,1.0,0.0]);
+ ELSE
+ v := arg;
+ END_IF;
+
+ temp := scalar_times_vector(dot_product(v, z_axis), z_axis);
+ y_axis := vector_difference(v, temp);
+ temp := scalar_times_vector(dot_product(v, x_axis), x_axis);
+ y_axis := vector_difference(y_axis, temp);
+ y_axis := normalise(y_axis);
+ RETURN(y_axis.orientation);
+END_FUNCTION;
+
+FUNCTION set_of_topology_reversed
+ (a_set: set_of_reversible_topology_item) : set_of_reversible_topology_item;
+ LOCAL
+ the_reverse : set_of_reversible_topology_item;
+ END_LOCAL;
+
+ the_reverse := [];
+ REPEAT i := 1 TO SIZEOF (a_set);
+ the_reverse := the_reverse + topology_reversed (a_set [i]);
+ END_REPEAT;
+
+ RETURN (the_reverse);
+END_FUNCTION;
+
+FUNCTION shell_reversed
+ (a_shell: shell) : shell;
+IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OPEN_SHELL' IN TYPEOF (a_shell) ) THEN
+ RETURN (open_shell_reversed (a_shell));
+ ELSE
+ IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CLOSED_SHELL' IN TYPEOF (a_shell) ) THEN
+ RETURN (closed_shell_reversed (a_shell));
+ ELSE
+ RETURN (?);
+ END_IF;
+ END_IF;
+END_FUNCTION;
+
+FUNCTION surface_condition_correlation
+ (pd: property_definition; rep: representation) : LOGICAL;
+CASE pd.name OF
+ 'visual appearance', 'tactile appearance', 'contact ratio', 'hardness', 'treatment result', 'surface texture' :
+ RETURN(pd.name = rep.name);
+ OTHERWISE : RETURN(UNKNOWN);
+ END_CASE;
+END_FUNCTION;
+
+FUNCTION surface_weights_positive
+ (b: rational_b_spline_surface) : BOOLEAN;
+ LOCAL
+ result : BOOLEAN := TRUE;
+ END_LOCAL;
+
+ REPEAT i := 0 TO b.u_upper;
+ REPEAT j := 0 TO b.v_upper;
+ IF (b.weights[i][j] <= 0.0) THEN
+ result := FALSE;
+ RETURN(result);
+ END_IF;
+ END_REPEAT;
+ END_REPEAT;
+ RETURN(result);
+END_FUNCTION;
+
+FUNCTION topology_reversed
+ (an_item: reversible_topology) : reversible_topology;
+IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.EDGE' IN TYPEOF (an_item)) THEN
+ RETURN (edge_reversed (an_item));
+ END_IF;
+
+ IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PATH' IN TYPEOF (an_item)) THEN
+ RETURN (path_reversed (an_item));
+ END_IF;
+
+ IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE_BOUND' IN TYPEOF (an_item)) THEN
+ RETURN (face_bound_reversed (an_item));
+ END_IF;
+
+ IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FACE' IN TYPEOF (an_item)) THEN
+ RETURN (face_reversed (an_item));
+ END_IF;
+
+ IF ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHELL' IN TYPEOF (an_item)) THEN
+ RETURN (shell_reversed (an_item));
+ END_IF;
+
+ IF ('SET' IN TYPEOF (an_item)) THEN
+ RETURN (set_of_topology_reversed (an_item));
+ END_IF;
+
+ IF ('LIST' IN TYPEOF (an_item)) THEN
+ RETURN (list_of_topology_reversed (an_item));
+ END_IF;
+
+ RETURN (?);
+END_FUNCTION;
+
+FUNCTION type_check_function
+ (the_type: GENERIC; sub_names: SET [0:?] OF STRING; criterion: INTEGER) : LOGICAL;
+IF ((NOT EXISTS(the_type)) OR (NOT ({0 <= criterion <= 3})) OR (SIZEOF(sub_names) = 0)) THEN
+ RETURN (UNKNOWN);
+ ELSE
+ CASE criterion OF
+ 0:
+ RETURN (SIZEOF(sub_names * TYPEOF(the_type)) > 0);
+ 1:
+ RETURN (SIZEOF(sub_names * TYPEOF(the_type)) = 0);
+ 2:
+ RETURN (SIZEOF(sub_names * TYPEOF(the_type)) = 1);
+ 3:
+ RETURN (SIZEOF(sub_names * TYPEOF(the_type)) <= 1);
+ END_CASE;
+ END_IF;
+END_FUNCTION;
+
+FUNCTION using_items
+ (item: founded_item_select; checked_items: SET [0:?] OF founded_item_select) : SET [0:?] OF founded_item_select;
+ LOCAL
+ new_check_items : SET OF founded_item_select;
+ result_items : SET OF founded_item_select;
+ next_items : SET OF founded_item_select;
+ END_LOCAL;
+ result_items := [];
+ new_check_items := checked_items + item;
+ -- Find the set of representation_items or founded_items
+ -- in which item is used directly.
+ next_items := QUERY(z <* bag_to_set( USEDIN(item , '')) |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.REPRESENTATION_ITEM' IN TYPEOF(z)) OR
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FOUNDED_ITEM' IN TYPEOF(z)));
+ -- If the set of next_items is not empty;
+ IF SIZEOF(next_items) > 0 THEN
+ -- For each element in the set, find the using_items recursively
+ REPEAT i := 1 TO HIINDEX(next_items);
+ -- Check for loop in data model, i.e. one of the next_items
+ -- occurred earlier in the set of check_items;
+ IF NOT(next_items[i] IN new_check_items) THEN
+ result_items := result_items + next_items[i] +
+ using_items(next_items[i],new_check_items);
+ END_IF;
+ END_REPEAT;
+ END_IF;
+ -- return the set of representation_items or founded_items
+ -- in which the input item is used directly and indirectly.
+ RETURN (result_items);
+END_FUNCTION;
+
+FUNCTION using_representations
+ (item: founded_item_select) : SET [0:?] OF representation;
+ LOCAL
+ results : SET OF representation;
+ result_bag : BAG OF representation;
+ intermediate_items : SET OF founded_item_select;
+ END_LOCAL;
+ -- Find the representations in which the item is used and add to the
+ -- results set.
+ results := [];
+ result_bag := USEDIN(item,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.REPRESENTATION.ITEMS');
+ IF SIZEOF(result_bag) > 0 THEN
+ REPEAT i := 1 TO HIINDEX(result_bag);
+ results := results + result_bag[i];
+ END_REPEAT;
+ END_IF;
+ -- Find all representation_items or founded_items
+ -- by which item is referenced directly or indirectly.
+ intermediate_items := using_items(item,[]);
+ -- If the set of intermediate items is not empty;
+ IF SIZEOF(intermediate_items) > 0 THEN
+ -- For each element in the set, add the
+ -- representations of that element.
+ REPEAT i := 1 TO HIINDEX(intermediate_items);
+ result_bag := USEDIN(intermediate_items[i],
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.REPRESENTATION.ITEMS');
+ IF SIZEOF(result_bag) > 0 THEN
+ REPEAT j := 1 TO HIINDEX(result_bag);
+ results := results + result_bag[j];
+ END_REPEAT;
+ END_IF;
+ END_REPEAT;
+ END_IF;
+ -- Return the set of representation in which the input item is
+ -- used directly and indirectly (through intervening
+ -- representation_items or founded items).
+ RETURN (results);
+END_FUNCTION;
+
+FUNCTION valid_basis_curve_in_2d_wireframe
+ (crv: curve) : BOOLEAN;
+IF SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_CURVE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ELLIPSE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CIRCLE'] *
+ TYPEOF (crv)) = 1
+ THEN RETURN (TRUE);
+ ELSE
+ -- if the curve is a trimmed_curve
+ IF (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TRIMMED_CURVE')
+ IN TYPEOF (crv)) THEN
+ -- if a line, parabola, or hyperbola is being trimmed, then valid
+ IF SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LINE',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PARABOLA',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.HYPERBOLA'] *
+ TYPEOF(crv\trimmed_curve.basis_curve)) = 1
+ THEN RETURN (TRUE);
+ -- otherwise, recursively check basis_curve
+ ELSE RETURN (valid_basis_curve_in_2d_wireframe
+ (crv\trimmed_curve.basis_curve));
+ END_IF;
+ ELSE
+ -- recursively check the offset_curve basis curve
+ IF (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OFFSET_CURVE_2D')
+ IN TYPEOF (crv))
+ THEN RETURN (valid_basis_curve_in_2d_wireframe
+ (crv\offset_curve_2d.basis_curve));
+ ELSE
+ -- recursively check the curve_replica parent curve
+ IF (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_REPLICA')
+ IN TYPEOF (crv))
+ THEN RETURN (valid_basis_curve_in_2d_wireframe
+ (crv\curve_replica.parent_curve));
+ ELSE
+ -- recursively check the composite_curve segments
+ IF (('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPOSITE_CURVE')
+ IN TYPEOF (crv)) THEN
+ RETURN (SIZEOF (QUERY (ccs <* crv\composite_curve.segments |
+ NOT (valid_basis_curve_in_2d_wireframe
+ (ccs.parent_curve)))) = 0);
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ END_IF;
+ RETURN (FALSE);
+END_FUNCTION;
+
+FUNCTION valid_calendar_date
+ (date: calendar_date) : LOGICAL;
+CASE date.month_component OF
+ 1 : RETURN({ 1 <= date.day_component <= 31 });
+ 2 : BEGIN
+ IF (leap_year(date.year_component)) THEN
+ RETURN({ 1 <= date.day_component <= 29 });
+ ELSE
+ RETURN({ 1 <= date.day_component <= 28 });
+ END_IF;
+ END;
+ 3 : RETURN({ 1 <= date.day_component <= 31 });
+ 4 : RETURN({ 1 <= date.day_component <= 30 });
+ 5 : RETURN({ 1 <= date.day_component <= 31 });
+ 6 : RETURN({ 1 <= date.day_component <= 30 });
+ 7 : RETURN({ 1 <= date.day_component <= 31 });
+ 8 : RETURN({ 1 <= date.day_component <= 31 });
+ 9 : RETURN({ 1 <= date.day_component <= 30 });
+ 10 : RETURN({ 1 <= date.day_component <= 31 });
+ 11 : RETURN({ 1 <= date.day_component <= 30 });
+ 12 : RETURN({ 1 <= date.day_component <= 31 });
+ END_CASE;
+ RETURN (FALSE);
+END_FUNCTION;
+
+FUNCTION valid_datum_target_parameters
+ (pdf: placed_datum_target_feature) : BOOLEAN;
+LOCAL
+
+rep_set : SET OF representation := [] ;
+
+parameter_representations: SET OF representation;
+END_LOCAL;
+
+
+REPEAT i := 1 TO HIINDEX(pdf.representation_associations);
+rep_set := rep_set + pdf.representation_associations[i].used_representation;
+END_REPEAT;
+
+parameter_representations := QUERY(rep <* rep_set |
+('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SHAPE_REPRESENTATION_WITH_PARAMETERS' IN
+TYPEOF(rep)));
+
+
+IF (SIZEOF( QUERY( srwp <* parameter_representations |
+ (SIZEOF( QUERY( i <* srwp.items |
+ (i.name='orientation') AND
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PLACEMENT' IN TYPEOF(i)))) = 1))) <> 1) THEN
+ RETURN(FALSE);
+END_IF;
+
+CASE pdf\shape_aspect.description OF
+'point': RETURN(SIZEOF(QUERY( srwp <* parameter_representations |
+ (SIZEOF(srwp.items) = 1))) = 1);
+
+'circle': RETURN((SIZEOF( QUERY( srwp <* parameter_representations |
+ (SIZEOF(srwp.items) = 2))) = 1) AND
+ (SIZEOF( QUERY( srwp <* parameter_representations |
+ (SIZEOF( QUERY( i <* srwp.items |
+ (i.name='target diameter') AND
+ (SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MEASURE_REPRESENTATION_ITEM',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LENGTH_MEASURE_WITH_UNIT']*TYPEOF(i)
+ ) = 2) )) = 1))) = 1));
+
+'line': RETURN(SIZEOF( QUERY( srwp <* parameter_representations |
+ (SIZEOF( QUERY( i <* srwp.items |
+ (i.name='target length') AND
+ (SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MEASURE_REPRESENTATION_ITEM',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LENGTH_MEASURE_WITH_UNIT']*TYPEOF(i)
+ ) = 2) )) = 1))) = 1);
+
+'rectangle': RETURN((SIZEOF( QUERY( srwp <* parameter_representations |
+ (SIZEOF(srwp.items)= 3))) = 1) AND
+ (SIZEOF( QUERY( srwp <* parameter_representations |
+ (SIZEOF( QUERY( i <* srwp.items |
+ (i.name='target length') AND
+ (SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MEASURE_REPRESENTATION_ITEM',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LENGTH_MEASURE_WITH_UNIT']*TYPEOF(i)
+ ) = 2))) = 1))) = 1) AND
+ (SIZEOF( QUERY( srwp <* parameter_representations |
+ (SIZEOF( QUERY( i <* srwp.items |
+ (i.name='target width') AND
+ (SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MEASURE_REPRESENTATION_ITEM',
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LENGTH_MEASURE_WITH_UNIT']*TYPEOF(i)
+ ) = 2))) = 1) )) = 1));
+OTHERWISE : RETURN(FALSE);
+END_CASE;
+END_FUNCTION;
+
+FUNCTION valid_geometrically_bounded_wf_curve
+ (crv: curve) : BOOLEAN;
+IF SIZEOF ([ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_CURVE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ELLIPSE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CIRCLE' ] * TYPEOF (crv)) = 1 THEN
+ RETURN (TRUE);
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TRIMMED_CURVE' IN TYPEOF (crv) THEN
+ IF SIZEOF ([ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LINE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PARABOLA', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.HYPERBOLA' ] * TYPEOF (crv\trimmed_curve.basis_curve)) = 1 THEN
+ RETURN (TRUE);
+ ELSE
+ RETURN (valid_geometrically_bounded_wf_curve(crv\trimmed_curve.basis_curve));
+ END_IF ;
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OFFSET_CURVE_3D' IN TYPEOF (crv) THEN
+ RETURN (valid_geometrically_bounded_wf_curve(crv\offset_curve_3d.basis_curve));
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_REPLICA' IN TYPEOF (crv) THEN
+ RETURN (valid_geometrically_bounded_wf_curve(crv\curve_replica.parent_curve));
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.COMPOSITE_CURVE' IN TYPEOF (crv) THEN
+ RETURN ( SIZEOF (
+QUERY ( ccs <* crv\composite_curve.segments| NOT valid_geometrically_bounded_wf_curve(ccs.parent_curve) )) = 0);
+ END_IF ;
+ END_IF ;
+ END_IF ;
+ END_IF ;
+ END_IF ;
+ RETURN (FALSE);
+END_FUNCTION;
+
+FUNCTION valid_geometrically_bounded_wf_point
+ (pnt: point) : BOOLEAN;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CARTESIAN_POINT' IN TYPEOF (pnt) THEN
+ RETURN (TRUE);
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_ON_CURVE' IN TYPEOF (pnt) THEN
+ RETURN (valid_geometrically_bounded_wf_curve(pnt\point_on_curve.basis_curve));
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_REPLICA' IN TYPEOF (pnt) THEN
+ RETURN (valid_geometrically_bounded_wf_point(pnt\point_replica.parent_pt));
+ END_IF ;
+ END_IF ;
+ END_IF ;
+ RETURN (FALSE);
+END_FUNCTION;
+
+FUNCTION valid_measure_value
+ (m: measure_value) : BOOLEAN;
+IF ('REAL' IN TYPEOF (m)) THEN
+ RETURN (m > 0.0);
+ ELSE
+ IF ('INTEGER' IN TYPEOF (m)) THEN
+ RETURN (m > 0);
+ ELSE
+ RETURN (TRUE);
+ END_IF;
+ END_IF;
+END_FUNCTION;
+
+FUNCTION valid_selected_instance_representation
+ (pd: product_definition_or_assembly_relationship) : LOGICAL;
+ LOCAL
+ properties: SET OF property_definition := bag_to_set(QUERY( prd<* USEDIN ( pd ,'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PROPERTY_DEFINITION.DEFINITION' ) |
+ (prd.name = 'occurrence selection' )));
+ property_definition_representations: SET OF property_definition_representation := bag_to_set(QUERY ( pdr <* USEDIN ( properties[1] , 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') |
+ ( pdr.used_representation.name = 'selection criteria' )));
+ selected_representation: representation;
+ END_LOCAL;
+ IF (SIZEOF( properties)<>1) THEN
+ RETURN(FALSE);
+ END_IF;
+ IF (SIZEOF(property_definition_representations)<>1) THEN
+ RETURN(FALSE);
+ END_IF;
+ selected_representation := property_definition_representations[1]\property_definition_representation.used_representation;
+ IF (SIZEOF(selected_representation\representation.items) <1) OR (SIZEOF(selected_representation\representation.items) >2) THEN
+ RETURN(FALSE);
+ END_IF;
+ IF (SIZEOF ( QUERY ( i <* selected_representation\representation.items |
+ ( SIZEOF (['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MEASURE_REPRESENTATION_ITEM' ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VALUE_RANGE']* TYPEOF ( i ) ) = 1) AND
+ ( i.name = 'selection quantity' ))) <> 1 ) THEN
+ RETURN(FALSE);
+ END_IF;
+ IF (SIZEOF ( QUERY ( i <* selected_representation\representation.items |
+ ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) AND
+ ( i.name = 'selection control' )))> 1) THEN
+ RETURN(FALSE);
+ END_IF; --the selection control is not specified then the quantity shall be a qualified_representation_item or a value_range
+ IF (SIZEOF ( QUERY ( i <* selected_representation\representation.items |
+ ( 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF( i ) ) AND
+ ( i.name = 'selection control' ) ))= 0) AND
+ (SIZEOF ( QUERY ( i <* selected_representation\representation.items |
+ ( i.name = 'selection quantity' ) AND
+ ( SIZEOF(['AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.QUALIFIED_REPRESENTATION_ITEM' ,
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VALUE_RANGE']* TYPEOF ( i ) ) =0 ))) > 0 ) THEN
+ RETURN(FALSE);
+ END_IF;
+ RETURN(TRUE);
+END_FUNCTION;
+
+FUNCTION valid_time
+ (time: local_time) : BOOLEAN;
+IF EXISTS(time.second_component) THEN
+ RETURN (EXISTS(time.minute_component));
+ ELSE
+ RETURN (TRUE);
+ END_IF;
+END_FUNCTION;
+
+FUNCTION valid_units
+ (m: measure_with_unit) : BOOLEAN;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LENGTH_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents(1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MASS_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents(0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.TIME_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents(0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ELECTRIC_CURRENT_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents(0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.THERMODYNAMIC_TEMPERATURE_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents(0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CELSIUS_TEMPERATURE_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents(0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AMOUNT_OF_SUBSTANCE_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents(0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LUMINOUS_INTENSITY_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PLANE_ANGLE_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.SOLID_ANGLE_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.AREA_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents(2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VOLUME_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents(3.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.RATIO_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POSITIVE_LENGTH_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents(1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POSITIVE_PLANE_ANGLE_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ACCELERATION_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents( 1.0, 0.0, -2.0, 0.0, 0.0, 0.0, 0.0 ) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CAPACITANCE_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents( -2.0, -1.0, 4.0, 1.0, 0.0, 0.0, 0.0 ) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ELECTRIC_CHARGE_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents( 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 0.0 ) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONDUCTANCE_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents( -2.0, -1.0, 3.0, 2.0, 0.0, 0.0, 0.0 ) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ELECTRIC_POTENTIAL_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents( 2.0, 1.0, -3.0, -1.0, 0.0, 0.0, 0.0 ) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ENERGY_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents( 2.0, 1.0, -2.0, 0.0, 0.0, 0.0, 0.0 ) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FORCE_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents( 1.0, 1.0, -2.0, 0.0, 0.0, 0.0, 0.0 ) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.FREQUENCY_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents( 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0 ) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ILLUMINANCE_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents( -2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0 ) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.INDUCTANCE_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents( 2.0, 1.0, -2.0, -2.0, 0.0, 0.0, 0.0 ) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LUMINOUS_FLUX_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents( 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0 ) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAGNETIC_FLUX_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents( 2.0, 1.0, -2.0, -1.0, 0.0, 0.0, 0.0 ) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MAGNETIC_FLUX_DENSITY_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents( 0.0, 1.0, -2.0, -1.0, 0.0, 0.0, 0.0 ) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POWER_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents( 2.0, 1.0, -3.0, 0.0, 0.0, 0.0, 0.0 ) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.PRESSURE_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents( -1.0, 1.0, -2.0, 0.0, 0.0, 0.0, 0.0 ) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.RESISTANCE_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents( 2.0, 1.0, -3.0, -2.0, 0.0, 0.0, 0.0 ) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VELOCITY_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents( 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0 ) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.RADIOACTIVITY_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents(0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.ABSORBED_DOSE_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents(2.0, 0.0, -2.0, 0.0, 0.0, 0.0, 0.0) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.DOSE_EQUIVALENT_MEASURE' IN TYPEOF(m.value_component) THEN
+ IF derive_dimensional_exponents(m.unit_component) <>
+ dimensional_exponents(2.0, 0.0, -2.0, 0.0, 0.0, 0.0, 0.0) THEN
+ RETURN (FALSE);
+ END_IF;
+ END_IF;
+ RETURN (TRUE);
+END_FUNCTION;
+
+FUNCTION valid_wireframe_edge_curve
+ (crv: curve) : BOOLEAN;
+IF SIZEOF ([ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.LINE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CONIC', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.B_SPLINE_CURVE', 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POLYLINE' ] * TYPEOF (crv)) = 1 THEN
+ RETURN (TRUE);
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CURVE_REPLICA' IN TYPEOF (crv) THEN
+ RETURN (valid_wireframe_edge_curve(crv\curve_replica.parent_curve));
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.OFFSET_CURVE_3D' IN TYPEOF (crv) THEN
+ RETURN (valid_wireframe_edge_curve(crv\offset_curve_3d.basis_curve));
+ END_IF ;
+ END_IF ;
+ END_IF ;
+ RETURN (FALSE);
+END_FUNCTION;
+
+FUNCTION valid_wireframe_vertex_point
+ (pnt: point) : BOOLEAN;
+IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.CARTESIAN_POINT' IN TYPEOF (pnt) THEN
+ RETURN (TRUE);
+ ELSE
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.POINT_REPLICA' IN TYPEOF (pnt) THEN
+ RETURN (valid_wireframe_vertex_point(pnt\point_replica.parent_pt));
+ END_IF ;
+ END_IF ;
+ RETURN (FALSE);
+END_FUNCTION;
+
+FUNCTION validate_countersink_radii
+ (cskhole: solid_with_stepped_round_hole_and_conical_transitions) : BOOLEAN;
+ LOCAL
+ i,j : INTEGER;
+ n : INTEGER := 1 +
+ cskhole\solid_with_stepped_round_hole.segments;
+ smaller, larger : positive_length_measure;
+ END_LOCAL;
+
+ REPEAT i := 1 TO SIZEOF(cskhole.conical_transitions);
+
+ -- First check whether transition i applies to the entry of the hole or
+ -- the exit of a through hole - those cases only need to be checked for
+ -- the sign of the cone apex angle.
+
+ IF (((cskhole.conical_transitions[i].transition_number = 1)
+ AND (cskhole.conical_transitions[i].cone_apex_angle < 0))
+ XOR ((cskhole.conical_transitions[i].transition_number = n)
+ AND (cskhole.conical_transitions[i].cone_apex_angle > 0)))
+ THEN RETURN(FALSE);
+ ELSE
+ IF ((cskhole.conical_transitions[i].transition_number <> 1)
+ AND (cskhole.conical_transitions[i].transition_number <> n))
+ THEN
+
+ -- For all remaining transitions, check that the cone base radius
+ -- lies in the range of validity.
+
+
+ BEGIN
+ j := cskhole.conical_transitions[i].transition_number;
+ IF cskhole\solid_with_stepped_round_hole.segment_radii[j]
+ > cskhole\solid_with_stepped_round_hole.segment_radii[j-1]
+ THEN
+ BEGIN
+ IF (cskhole.conical_transitions[i].cone_apex_angle > 0)
+ THEN RETURN(FALSE);
+ END_IF;
+ larger
+ := cskhole\solid_with_stepped_round_hole.segment_radii[j];
+ smaller
+ := cskhole\solid_with_stepped_round_hole.segment_radii[j-1];
+ END;
+ ELSE
+ BEGIN
+ IF (cskhole.conical_transitions[i].cone_apex_angle < 0)
+ THEN RETURN(FALSE);
+ END_IF;
+ larger
+ := cskhole\solid_with_stepped_round_hole.segment_radii[j-1];
+ smaller
+ := cskhole\solid_with_stepped_round_hole.segment_radii[j];
+ END;
+ END_IF;
+ IF ((cskhole.conical_transitions[i].cone_base_radius > larger)
+ OR (cskhole.conical_transitions[i].cone_base_radius < smaller))
+ THEN RETURN(FALSE);
+ END_IF;
+ END;
+ END_IF;
+ END_IF;
+ END_REPEAT;
+ RETURN(TRUE);
+END_FUNCTION;
+
+FUNCTION value_range_aggregate_rep_item
+ (agg: AGGREGATE OF representation_item) : BOOLEAN;
+BEGIN
+ IF (SIZEOF(QUERY(i1 <* agg | ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.' + 'MEASURE_REPRESENTATION_ITEM' IN TYPEOF(i1)) )) = 6) THEN
+ RETURN (TRUE);
+ ELSE
+ RETURN (FALSE);
+ END_IF;
+ END;
+END_FUNCTION;
+
+FUNCTION value_range_wr1
+ (agg: compound_item_definition) : BOOLEAN;
+BEGIN
+ IF (SIZEOF(agg) = 2) AND ((SIZEOF(QUERY (i1 <* agg | (
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MEASURE_REPRESENTATION_ITEM' IN TYPEOF
+ (i1)))) = 2) OR
+ (SIZEOF(QUERY (i2 <* agg | (
+ 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VALUE_REPRESENTATION_ITEM' IN TYPEOF
+ (i2)))) = 2))
+ THEN
+ RETURN(TRUE);
+ ELSE
+ RETURN(FALSE);
+ END_IF;
+ END;
+END_FUNCTION;
+
+FUNCTION value_range_wr2
+ (agg: compound_item_definition) : BOOLEAN;
+BEGIN
+ IF ((SIZEOF(QUERY (i <* agg | (i\representation_item.name = 'upper limit'))) = 1)
+ AND (SIZEOF(QUERY (i <* agg | (i\representation_item.name = 'lower limit'))) = 1))
+ THEN
+ RETURN(TRUE);
+ ELSE
+ RETURN(FALSE);
+ END_IF;
+ END;
+END_FUNCTION;
+
+FUNCTION value_range_wr3
+ (agg: compound_item_definition) : BOOLEAN;
+BEGIN
+ IF (SIZEOF(QUERY(i1 <* agg |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MEASURE_REPRESENTATION_ITEM' IN TYPEOF (i1)) AND
+ (SIZEOF (QUERY (i2 <* agg |
+ ('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.MEASURE_REPRESENTATION_ITEM' IN TYPEOF (i2)) AND
+ (i1 :<>: i2) AND (i1\measure_with_unit.unit_component :=: i2\measure_with_unit.unit_component))) = 1))) = 2)
+ THEN
+ RETURN (TRUE);
+ ELSE
+ RETURN (FALSE);
+ END_IF;
+ END;
+END_FUNCTION;
+
+FUNCTION vector_difference
+ (arg1: vector_or_direction; arg2: vector_or_direction) : vector;
+ LOCAL
+ result : vector;
+ res, vec1, vec2 : direction;
+ mag, mag1, mag2 : REAL;
+ ndim : INTEGER;
+ END_LOCAL;
+
+ IF ((NOT EXISTS (arg1)) OR (NOT EXISTS (arg2))) OR (arg1.dim <> arg2.dim)
+ THEN
+ RETURN (?) ;
+ ELSE
+ BEGIN
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VECTOR' IN TYPEOF(arg1) THEN
+ mag1 := arg1.magnitude;
+ vec1 := arg1\vector.orientation;
+ ELSE
+ mag1 := 1.0;
+ vec1 := arg1;
+ END_IF;
+ IF 'AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF.VECTOR' IN TYPEOF(arg2) THEN
+ mag2 := arg2.magnitude;
+ vec2 := arg2\vector.orientation;
+ ELSE
+ mag2 := 1.0;
+ vec2 := arg2;
+ END_IF;
+ vec1 := normalise (vec1);
+ vec2 := normalise (vec2);
+ ndim := SIZEOF(vec1.direction_ratios);
+ mag := 0.0;
+ res := dummy_gri || direction(vec1.direction_ratios);
+ REPEAT i := 1 TO ndim;
+ res.direction_ratios[i] := mag1*vec1.direction_ratios[i] -
+ mag2*vec2.direction_ratios[i];
+ mag := mag + (res.direction_ratios[i]*res.direction_ratios[i]);
+ END_REPEAT;
+ IF (mag > 0.0 ) THEN
+ result := dummy_gri || vector( res, SQRT(mag));
+ ELSE
+ result := dummy_gri || vector( vec1, 0.0);
+ END_IF;
+ END;
+ END_IF;
+ RETURN (result);
+END_FUNCTION;
+
+END_SCHEMA;
+
diff --git a/scripts/IFCImporter/schema.exp b/scripts/StepImporter/schema_ifc2x3.exp
index ae978a6e6..ae978a6e6 100644
--- a/scripts/IFCImporter/schema.exp
+++ b/scripts/StepImporter/schema_ifc2x3.exp
diff --git a/scripts/StepImporter/step_entitylist.txt b/scripts/StepImporter/step_entitylist.txt
new file mode 100644
index 000000000..223f57a61
--- /dev/null
+++ b/scripts/StepImporter/step_entitylist.txt
@@ -0,0 +1,1015 @@
+# ==============================================================================
+# List of IFC structures needed by Assimp
+# ==============================================================================
+# use genentitylist.sh to update this list
+
+# This machine-generated list is not complete, it lacks many intermediate
+# classes in the inheritance hierarchy. Those are magically augmented by the
+# code generator. Also, the names of all used entities need to be present
+# in the source code for this to work.
+absorbed_dose_measure_with_unit
+absorbed_dose_unit
+abstract_variable
+acceleration_measure_with_unit
+acceleration_unit
+action;
+action_assignment
+action_directive;
+action_method;
+action_method_assignment
+action_method_relationship;
+action_method_role;
+action_property;
+action_property_representation;
+action_relationship;
+action_request_assignment
+action_request_solution;
+action_request_status;
+action_status;
+address;
+advanced_brep_shape_representation
+advanced_face
+alternate_product_relationship;
+amount_of_substance_measure_with_unit
+amount_of_substance_unit
+angle_direction_reference
+angular_dimension
+angular_location
+angular_size
+angularity_tolerance
+annotation_curve_occurrence
+annotation_fill_area
+annotation_fill_area_occurrence
+annotation_occurrence
+annotation_occurrence_associativity
+annotation_occurrence_relationship;
+annotation_plane
+annotation_subfigure_occurrence
+annotation_symbol
+annotation_symbol_occurrence
+annotation_text
+annotation_text_character
+annotation_text_occurrence
+apex
+application_context;
+application_context_element
+application_protocol_definition;
+applied_action_assignment
+applied_action_method_assignment
+applied_action_request_assignment
+applied_approval_assignment
+applied_attribute_classification_assignment
+applied_certification_assignment
+applied_classification_assignment
+applied_contract_assignment
+applied_date_and_time_assignment
+applied_date_assignment
+applied_document_reference
+applied_document_usage_constraint_assignment
+applied_effectivity_assignment
+applied_event_occurrence_assignment
+applied_external_identification_assignment
+applied_group_assignment
+applied_identification_assignment
+applied_name_assignment
+applied_organization_assignment
+applied_organizational_project_assignment
+applied_person_and_organization_assignment
+applied_presented_item
+applied_security_classification_assignment
+applied_time_interval_assignment
+applied_usage_right
+approval;
+approval_assignment
+approval_date_time;
+approval_person_organization;
+approval_relationship;
+approval_role;
+approval_status;
+area_in_set;
+area_measure_with_unit
+area_unit
+assembly_component_usage
+assembly_component_usage_substitute;
+assigned_requirement
+atomic_formula
+attribute_assertion
+attribute_classification_assignment
+attribute_language_assignment
+attribute_value_assignment
+attribute_value_role;
+auxiliary_geometric_representation_item
+axis1_placement
+axis2_placement_2d
+axis2_placement_3d
+b_spline_curve
+b_spline_curve_with_knots
+b_spline_surface
+b_spline_surface_with_knots
+back_chaining_rule
+back_chaining_rule_body
+background_colour
+beveled_sheet_representation
+bezier_curve
+bezier_surface
+binary_generic_expression
+binary_numeric_expression
+binary_representation_item
+block
+boolean_expression
+boolean_literal
+boolean_representation_item
+boolean_result
+boundary_curve
+bounded_curve
+bounded_pcurve
+bounded_surface
+bounded_surface_curve
+box_domain
+boxed_half_space
+breakdown_context
+breakdown_element_group_assignment
+breakdown_element_realization
+breakdown_element_usage
+breakdown_of
+brep_with_voids
+bytes_representation_item
+calendar_date
+camera_image
+camera_image_3d_with_scale
+camera_model
+camera_model_d3
+camera_model_d3_multi_clipping
+camera_model_d3_multi_clipping_intersection
+camera_model_d3_multi_clipping_union
+camera_model_d3_with_hlhsr
+camera_model_with_light_sources
+camera_usage
+capacitance_measure_with_unit
+capacitance_unit
+cartesian_point
+cartesian_transformation_operator
+cartesian_transformation_operator_2d
+cartesian_transformation_operator_3d
+cc_design_approval
+cc_design_certification
+cc_design_contract
+cc_design_date_and_time_assignment
+cc_design_person_and_organization_assignment
+cc_design_security_classification
+cc_design_specification_reference
+celsius_temperature_measure_with_unit
+centre_of_symmetry
+certification;
+certification_assignment
+certification_type;
+change
+change_request
+character_glyph_font_usage;
+character_glyph_style_outline
+character_glyph_style_stroke
+character_glyph_symbol
+character_glyph_symbol_outline
+character_glyph_symbol_stroke
+characteristic_data_column_header
+characteristic_data_column_header_link
+characteristic_data_table_header
+characteristic_data_table_header_decomposition
+characteristic_type
+characterized_class
+characterized_object;
+circle
+circular_runout_tolerance
+class
+class_by_extension
+class_by_intension
+class_system
+class_usage_effectivity_context_assignment
+classification_assignment
+classification_role;
+closed_shell
+coaxiality_tolerance
+colour;
+colour_rgb
+colour_specification
+common_datum
+comparison_expression
+complex_clause
+complex_conjunctive_clause
+complex_disjunctive_clause
+complex_shelled_solid
+composite_assembly_definition
+composite_assembly_sequence_definition
+composite_assembly_table
+composite_curve
+composite_curve_on_surface
+composite_curve_segment
+composite_material_designation
+composite_shape_aspect
+composite_sheet_representation
+composite_text
+composite_text_with_associated_curves
+composite_text_with_blanking_box
+composite_text_with_delineation
+composite_text_with_extent
+compound_representation_item
+compound_shape_representation
+concentricity_tolerance
+concept_feature_operator;
+concept_feature_relationship;
+concept_feature_relationship_with_condition
+conditional_concept_feature
+conductance_measure_with_unit
+conductance_unit
+configurable_item
+configuration_design;
+configuration_effectivity
+configuration_item;
+configuration_item_hierarchical_relationship
+configuration_item_relationship;
+configuration_item_revision_sequence
+configured_effectivity_assignment
+configured_effectivity_context_assignment
+conic
+conical_stepped_hole_transition
+conical_surface
+connected_edge_set
+connected_face_set
+connected_face_sub_set
+constructive_geometry_representation
+constructive_geometry_representation_relationship
+contact_ratio_representation
+context_dependent_invisibility
+context_dependent_over_riding_styled_item
+context_dependent_shape_representation;
+context_dependent_unit
+contract;
+contract_assignment
+contract_relationship;
+contract_type;
+conversion_based_unit
+coordinated_universal_time_offset;
+csg_shape_representation
+csg_solid
+currency
+currency_measure_with_unit
+curve
+curve_bounded_surface
+curve_dimension
+curve_replica
+curve_style
+curve_style_font
+curve_style_font_and_scaling
+curve_style_font_pattern
+curve_style_rendering;
+curve_swept_solid_shape_representation
+cylindrical_surface
+cylindricity_tolerance
+data_environment;
+date
+date_and_time;
+date_and_time_assignment
+date_assignment
+date_representation_item
+date_role;
+date_time_representation_item
+date_time_role;
+dated_effectivity
+datum
+datum_feature
+datum_feature_callout
+datum_reference;
+datum_target
+datum_target_callout
+default_tolerance_table
+default_tolerance_table_cell
+defined_symbol
+definitional_representation
+definitional_representation_relationship
+definitional_representation_relationship_with_same_context
+degenerate_pcurve
+degenerate_toroidal_surface
+derived_shape_aspect
+derived_unit
+derived_unit_element;
+description_attribute;
+descriptive_representation_item
+design_context
+design_make_from_relationship
+diameter_dimension
+dielectric_constant_measure_with_unit
+dimension_callout
+dimension_callout_component_relationship
+dimension_callout_relationship
+dimension_curve
+dimension_curve_directed_callout
+dimension_curve_terminator
+dimension_curve_terminator_to_projection_curve_associativity
+dimension_pair
+dimension_related_tolerance_zone_element;
+dimension_text_associativity
+dimensional_characteristic_representation;
+dimensional_exponents;
+dimensional_location
+dimensional_location_with_path
+dimensional_size
+dimensional_size_with_path
+directed_action
+directed_dimensional_location
+direction
+document;
+document_file
+document_identifier
+document_identifier_assignment
+document_product_association;
+document_product_equivalence
+document_reference
+document_relationship;
+document_representation_type;
+document_type;
+document_usage_constraint;
+document_usage_constraint_assignment
+document_usage_role;
+dose_equivalent_measure_with_unit
+dose_equivalent_unit
+double_offset_shelled_solid
+draped_defined_transformation
+draughting_annotation_occurrence
+draughting_callout
+draughting_callout_relationship;
+draughting_elements
+draughting_model
+draughting_model_item_association
+draughting_pre_defined_colour
+draughting_pre_defined_curve_font
+draughting_pre_defined_text_font
+draughting_subfigure_representation
+draughting_symbol_representation
+draughting_text_literal_with_delineation
+draughting_title;
+drawing_definition;
+drawing_revision
+drawing_revision_sequence;
+drawing_sheet_revision
+drawing_sheet_revision_sequence
+drawing_sheet_revision_usage
+edge
+edge_based_wireframe_model
+edge_based_wireframe_shape_representation
+edge_blended_solid
+edge_curve
+edge_loop
+effectivity
+effectivity_assignment
+effectivity_context_assignment
+effectivity_context_role;
+effectivity_relationship;
+electric_charge_measure_with_unit
+electric_charge_unit
+electric_current_measure_with_unit
+electric_current_unit
+electric_potential_measure_with_unit
+electric_potential_unit
+elementary_brep_shape_representation
+elementary_surface
+ellipse
+energy_measure_with_unit
+energy_unit
+entity_assertion
+enum_reference_prefix
+environment;
+evaluated_characteristic
+evaluated_degenerate_pcurve
+evaluation_product_definition
+event_occurrence;
+event_occurrence_assignment
+event_occurrence_relationship;
+event_occurrence_role;
+exclusive_product_concept_feature_category
+executed_action
+expanded_uncertainty
+explicit_procedural_geometric_representation_item_relationship
+explicit_procedural_representation_item_relationship
+explicit_procedural_representation_relationship
+explicit_procedural_shape_representation_relationship
+expression
+expression_conversion_based_unit
+extension
+extent
+external_class_library
+external_identification_assignment
+external_source;
+external_source_relationship;
+externally_defined_class
+externally_defined_colour
+externally_defined_context_dependent_unit
+externally_defined_conversion_based_unit
+externally_defined_currency
+externally_defined_curve_font
+externally_defined_dimension_definition
+externally_defined_general_property
+externally_defined_hatch_style
+externally_defined_item;
+externally_defined_item_relationship;
+externally_defined_marker
+externally_defined_picture_representation_item
+externally_defined_representation_item
+externally_defined_string
+externally_defined_symbol
+externally_defined_terminator_symbol
+externally_defined_text_font
+externally_defined_tile
+externally_defined_tile_style
+extruded_area_solid
+extruded_face_solid
+extruded_face_solid_with_draft_angle
+extruded_face_solid_with_multiple_draft_angles
+extruded_face_solid_with_trim_conditions
+face
+face_based_surface_model
+face_bound
+face_outer_bound
+face_surface
+faceted_brep
+faceted_brep_shape_representation
+fact_type
+fill_area_style
+fill_area_style_colour;
+fill_area_style_hatching
+fill_area_style_tile_coloured_region
+fill_area_style_tile_curve_with_style
+fill_area_style_tile_symbol_with_style
+fill_area_style_tiles
+flat_pattern_ply_representation_relationship
+flatness_tolerance
+force_measure_with_unit
+force_unit
+forward_chaining_rule
+forward_chaining_rule_premise
+founded_item
+frequency_measure_with_unit
+frequency_unit
+func
+functional_breakdown_context
+functional_element_usage
+functionally_defined_transformation;
+general_material_property
+general_property;
+general_property_association;
+general_property_relationship;
+generic_character_glyph_symbol
+generic_expression
+generic_literal
+generic_variable
+geometric_alignment
+geometric_curve_set
+geometric_intersection
+geometric_item_specific_usage
+geometric_model_element_relationship
+geometric_representation_context
+geometric_representation_item
+geometric_set
+geometric_tolerance;
+geometric_tolerance_relationship;
+geometric_tolerance_with_datum_reference
+geometric_tolerance_with_defined_unit
+geometrical_tolerance_callout
+geometrically_bounded_2d_wireframe_representation
+geometrically_bounded_surface_shape_representation
+geometrically_bounded_wireframe_shape_representation
+global_assignment
+global_uncertainty_assigned_context
+global_unit_assigned_context
+ground_fact
+group;
+group_assignment
+group_relationship;
+half_space_solid
+hardness_representation
+hidden_element_over_riding_styled_item
+hyperbola
+id_attribute;
+identification_assignment
+identification_role;
+illuminance_measure_with_unit
+illuminance_unit
+included_text_block
+inclusion_product_concept_feature
+indirectly_selected_elements
+indirectly_selected_shape_elements
+inductance_measure_with_unit
+inductance_unit
+information_right
+information_usage_right
+instance_usage_context_assignment
+instanced_feature
+int_literal
+integer_representation_item
+intersection_curve
+interval_expression
+invisibility;
+iso4217_currency
+item_defined_transformation;
+item_identified_representation_usage;
+known_source
+laid_defined_transformation
+laminate_table
+language
+leader_curve
+leader_directed_callout
+leader_directed_dimension
+leader_terminator
+length_measure_with_unit
+length_unit
+light_source
+light_source_ambient
+light_source_directional
+light_source_positional
+light_source_spot
+limits_and_fits;
+line
+line_profile_tolerance
+linear_dimension
+literal_conjunction
+literal_disjunction
+literal_number
+local_time;
+logical_literal
+logical_representation_item
+loop
+loss_tangent_measure_with_unit
+lot_effectivity
+luminous_flux_measure_with_unit
+luminous_flux_unit
+luminous_intensity_measure_with_unit
+luminous_intensity_unit
+magnetic_flux_density_measure_with_unit
+magnetic_flux_density_unit
+magnetic_flux_measure_with_unit
+magnetic_flux_unit
+make_from_usage_option
+manifold_solid_brep
+manifold_subsurface_shape_representation
+manifold_surface_shape_representation
+mapped_item
+mass_measure_with_unit
+mass_unit
+material_designation;
+material_designation_characterization;
+material_property
+material_property_representation
+measure_qualification;
+measure_representation_item
+measure_with_unit
+mechanical_context
+mechanical_design_and_draughting_relationship
+mechanical_design_geometric_presentation_area
+mechanical_design_geometric_presentation_representation
+mechanical_design_presentation_representation_with_draughting
+mechanical_design_shaded_presentation_area
+mechanical_design_shaded_presentation_representation
+min_and_major_ply_orientation_basis
+modified_geometric_tolerance
+modified_solid
+modified_solid_with_placed_configuration
+moments_of_inertia_representation
+multi_language_attribute_assignment
+multiple_arity_boolean_expression
+multiple_arity_generic_expression
+multiple_arity_numeric_expression
+name_assignment
+name_attribute;
+named_unit
+next_assembly_usage_occurrence
+non_manifold_surface_shape_representation
+null_representation_item
+numeric_expression
+object_role;
+offset_curve_2d
+offset_curve_3d
+offset_surface
+one_direction_repeat_factor
+open_shell
+ordinal_date
+ordinate_dimension
+organization;
+organization_assignment
+organization_relationship;
+organization_role;
+organizational_address
+organizational_project;
+organizational_project_assignment
+organizational_project_relationship;
+organizational_project_role;
+oriented_closed_shell
+oriented_edge
+oriented_face
+oriented_open_shell
+oriented_path
+oriented_surface
+outer_boundary_curve
+over_riding_styled_item
+package_product_concept_feature
+parabola
+parallel_offset
+parallelism_tolerance
+parametric_representation_context
+part_laminate_table
+partial_document_with_structured_text_representation_assignment
+path
+pcurve
+percentage_laminate_definition
+percentage_laminate_table
+percentage_ply_definition
+perpendicular_to
+perpendicularity_tolerance
+person;
+person_and_organization;
+person_and_organization_address
+person_and_organization_assignment
+person_and_organization_role;
+personal_address
+physical_breakdown_context
+physical_element_usage
+picture_representation
+picture_representation_item
+placed_datum_target_feature
+placed_feature
+placement
+planar_box
+planar_extent
+plane
+plane_angle_measure_with_unit
+plane_angle_unit
+plus_minus_tolerance;
+ply_laminate_definition
+ply_laminate_sequence_definition
+ply_laminate_table
+point
+point_and_vector
+point_on_curve
+point_on_surface
+point_path
+point_replica
+point_style
+polar_complex_number_literal
+poly_loop
+polyline
+position_tolerance
+positioned_sketch
+power_measure_with_unit
+power_unit
+pre_defined_colour
+pre_defined_curve_font
+pre_defined_dimension_symbol
+pre_defined_geometrical_tolerance_symbol
+pre_defined_item;
+pre_defined_marker
+pre_defined_point_marker_symbol
+pre_defined_surface_condition_symbol
+pre_defined_surface_side_style
+pre_defined_symbol
+pre_defined_terminator_symbol
+pre_defined_text_font
+pre_defined_tile
+precision_qualifier;
+predefined_picture_representation_item
+presentation_area
+presentation_layer_assignment;
+presentation_representation
+presentation_set;
+presentation_size;
+presentation_style_assignment
+presentation_style_by_context
+presentation_view
+presented_item
+presented_item_representation;
+pressure_measure_with_unit
+pressure_unit
+procedural_representation
+procedural_representation_sequence
+procedural_shape_representation
+procedural_shape_representation_sequence
+product;
+product_category;
+product_class
+product_concept;
+product_concept_context
+product_concept_feature;
+product_concept_feature_association;
+product_concept_feature_category
+product_concept_feature_category_usage
+product_concept_relationship;
+product_context
+product_definition
+product_definition_context
+product_definition_context_association;
+product_definition_context_role;
+product_definition_effectivity
+product_definition_element_relationship
+product_definition_formation;
+product_definition_formation_relationship;
+product_definition_formation_with_specified_source
+product_definition_group_assignment
+product_definition_occurrence_relationship;
+product_definition_relationship;
+product_definition_shape
+product_definition_substitute;
+product_definition_usage
+product_definition_with_associated_documents
+product_identification
+product_material_composition_relationship
+product_related_product_category
+product_specification
+projected_zone_definition
+projection_curve
+projection_directed_callout
+promissory_usage_occurrence
+property_definition;
+property_definition_relationship;
+property_definition_representation;
+qualified_representation_item
+qualitative_uncertainty
+quantified_assembly_component_usage
+quasi_uniform_curve
+quasi_uniform_surface
+radioactivity_measure_with_unit
+radioactivity_unit
+radius_dimension
+range_characteristic
+ratio_measure_with_unit
+ratio_unit
+rational_b_spline_curve
+rational_b_spline_surface
+rational_representation_item
+real_literal
+real_representation_item
+rectangular_composite_surface
+rectangular_trimmed_surface
+referenced_modified_datum
+relative_event_occurrence
+rep_item_group
+reparametrised_composite_curve_segment
+representation;
+representation_context;
+representation_item
+representation_item_relationship;
+representation_map;
+representation_relationship;
+representation_relationship_with_transformation
+requirement_assigned_object
+requirement_assignment
+requirement_source
+requirement_view_definition_relationship
+resistance_measure_with_unit
+resistance_unit
+revolved_area_solid
+revolved_face_solid
+revolved_face_solid_with_trim_conditions
+right_angular_wedge
+right_circular_cone
+right_circular_cylinder
+right_to_usage_association
+role_association;
+roundness_tolerance
+row_representation_item
+row_value
+row_variable
+rule_action
+rule_condition
+rule_definition
+rule_set
+rule_set_group
+rule_software_definition
+rule_superseded_assignment
+rule_supersedence
+ruled_surface_swept_area_solid
+runout_zone_definition
+runout_zone_orientation;
+runout_zone_orientation_reference_direction
+satisfied_requirement
+satisfies_requirement
+satisfying_item
+scalar_variable
+scattering_parameter
+sculptured_solid
+seam_curve
+security_classification;
+security_classification_assignment
+security_classification_level;
+serial_numbered_effectivity
+shape_aspect;
+shape_aspect_associativity
+shape_aspect_deriving_relationship
+shape_aspect_relationship;
+shape_definition_representation
+shape_dimension_representation
+shape_feature_definition
+shape_representation
+shape_representation_relationship
+shape_representation_with_parameters
+shell_based_surface_model
+shell_based_wireframe_model
+shell_based_wireframe_shape_representation
+shelled_solid
+si_absorbed_dose_unit
+si_capacitance_unit
+si_conductance_unit
+si_dose_equivalent_unit
+si_electric_charge_unit
+si_electric_potential_unit
+si_energy_unit
+si_force_unit
+si_frequency_unit
+si_illuminance_unit
+si_inductance_unit
+si_magnetic_flux_density_unit
+si_magnetic_flux_unit
+si_power_unit
+si_pressure_unit
+si_radioactivity_unit
+si_resistance_unit
+si_unit
+simple_boolean_expression
+simple_clause
+simple_generic_expression
+simple_numeric_expression
+slash_expression
+smeared_material_definition
+solid_angle_measure_with_unit
+solid_angle_unit
+solid_curve_font
+solid_model
+solid_replica
+solid_with_angle_based_chamfer
+solid_with_chamfered_edges
+solid_with_circular_pattern
+solid_with_circular_pocket
+solid_with_circular_protrusion
+solid_with_conical_bottom_round_hole
+solid_with_constant_radius_edge_blend
+solid_with_curved_slot
+solid_with_depression
+solid_with_double_offset_chamfer
+solid_with_flat_bottom_round_hole
+solid_with_general_pocket
+solid_with_general_protrusion
+solid_with_groove
+solid_with_hole
+solid_with_incomplete_circular_pattern
+solid_with_incomplete_rectangular_pattern
+solid_with_pocket
+solid_with_protrusion
+solid_with_rectangular_pattern
+solid_with_rectangular_pocket
+solid_with_rectangular_protrusion
+solid_with_shape_element_pattern
+solid_with_single_offset_chamfer
+solid_with_slot
+solid_with_spherical_bottom_round_hole
+solid_with_stepped_round_hole
+solid_with_stepped_round_hole_and_conical_transitions
+solid_with_straight_slot
+solid_with_tee_section_slot
+solid_with_through_depression
+solid_with_trapezoidal_section_slot
+solid_with_variable_radius_edge_blend
+source_for_requirement
+sourced_requirement
+specification_definition
+specified_higher_usage_occurrence
+sphere
+spherical_surface
+standard_uncertainty
+start_request
+start_work
+straightness_tolerance
+structured_dimension_callout
+structured_text_composition
+structured_text_representation
+styled_item
+subedge
+subface
+supplied_part_relationship
+surface
+surface_condition_callout
+surface_curve
+surface_curve_swept_area_solid
+surface_of_linear_extrusion
+surface_of_revolution
+surface_patch
+surface_profile_tolerance
+surface_rendering_properties;
+surface_replica
+surface_side_style
+surface_style_boundary
+surface_style_control_grid
+surface_style_fill_area
+surface_style_parameter_line
+surface_style_reflectance_ambient;
+surface_style_reflectance_ambient_diffuse
+surface_style_reflectance_ambient_diffuse_specular
+surface_style_rendering;
+surface_style_rendering_with_properties
+surface_style_segmentation_curve
+surface_style_silhouette
+surface_style_transparent;
+surface_style_usage
+surface_texture_representation
+surfaced_open_shell
+swept_area_solid
+swept_disk_solid
+swept_face_solid
+swept_surface
+symbol
+symbol_colour;
+symbol_representation
+symbol_representation_map
+symbol_style
+symbol_target
+symmetric_shape_aspect
+symmetry_tolerance
+table_representation_item
+tactile_appearance_representation
+tagged_text_format
+tagged_text_item
+tangent
+terminator_symbol
+text_font;
+text_font_family;
+text_font_in_family;
+text_literal
+text_literal_with_associated_curves
+text_literal_with_blanking_box
+text_literal_with_delineation
+text_literal_with_extent
+text_string_representation
+text_style
+text_style_for_defined_font;
+text_style_with_box_characteristics
+text_style_with_mirror
+text_style_with_spacing
+thermal_resistance_measure_with_unit
+thermal_resistance_unit
+thermodynamic_temperature_measure_with_unit
+thermodynamic_temperature_unit
+thickened_face_solid
+thickness_laminate_definition
+thickness_laminate_table
+time_interval;
+time_interval_assignment
+time_interval_based_effectivity
+time_interval_relationship;
+time_interval_role;
+time_interval_with_bounds
+time_measure_with_unit
+time_unit
+tolerance_value;
+tolerance_zone
+tolerance_zone_definition
+tolerance_zone_form;
+topological_representation_item
+toroidal_surface
+torus
+total_runout_tolerance
+track_blended_solid
+track_blended_solid_with_end_conditions
+transformation_with_derived_angle
+trimmed_curve
+two_direction_repeat_factor
+type_qualifier;
+unary_generic_expression
+unary_numeric_expression
+uncertainty_assigned_representation
+uncertainty_measure_with_unit
+uncertainty_qualifier
+uniform_curve
+uniform_resource_identifier
+uniform_surface
+usage_association
+user_defined_curve_font
+user_defined_marker
+user_defined_terminator_symbol
+user_selected_elements
+user_selected_shape_elements
+value_range
+value_representation_item
+variable_semantics
+variational_representation_item
+vector
+vector_style
+velocity_measure_with_unit
+velocity_unit
+versioned_action_request;
+vertex
+vertex_loop
+vertex_point
+vertex_shell
+view_volume
+visual_appearance_representation
+volume_measure_with_unit
+volume_unit
+week_of_year_and_day_date
+wire_shell
+year_month
+zone_structural_makeup
diff --git a/scripts/adjust_header_paths.sh b/scripts/adjust_header_paths.sh
new file mode 100644
index 000000000..7c3bb376a
--- /dev/null
+++ b/scripts/adjust_header_paths.sh
@@ -0,0 +1,38 @@
+declare -a headers=("fast_atof.h"
+ "qnan.h"
+ "BaseImporter.h"
+ "Hash.h"
+ "MemoryIOWrapper.h"
+ "ParsingUtils.h"
+ "StreamReader.h"
+ "StreamWriter.h"
+ "StringComparison.h"
+ "StringUtils.h"
+ "SGSpatialSort.h"
+ "GenericProperty.h"
+ "SpatialSort.h"
+ "SkeletonMeshBuilder.h"
+ "SmoothingGroups.h"
+ "StandardShapes.h"
+ "RemoveComments.h"
+ "Subdivision.h"
+ "Vertex.h"
+ "LineSplitter.h"
+ "TinyFormatter.h"
+ "Profiler.h"
+ "LogAux.h"
+ "Bitmap.h"
+ "XMLTools.h"
+ "IOStreamBuffer.h"
+ "CreateAnimMesh.h"
+ "irrXMLWrapper.h"
+ "BlobIOSystem.h"
+ "MathFunctions.h"
+ "Macros.h"
+ "Exceptional.h"
+ "ByteSwapper.h")
+
+for i in "${headers[@]}"
+do
+ find . -type f -exec sed -i "s,<../code/$i>,<assimp/$i>,g" {} \;
+done
diff --git a/scripts/android_crosscompile/make_android.bat b/scripts/android_crosscompile/make_android.bat
new file mode 100644
index 000000000..a50695e16
--- /dev/null
+++ b/scripts/android_crosscompile/make_android.bat
@@ -0,0 +1,28 @@
+@echo off
+
+set ASSIMP_PATH=D:\projects\asset-importer-lib\assimp
+set CMAKE_PATH="C:\Program Files\CMake\bin\cmake.exe"
+set ANDROID_NDK_PATH=C:\Users\kimkulling\AppData\Local\Android\Sdk\ndk-bundle
+set ANDROID_CMAKE_PATH=contrib\android-cmake
+
+pushd %ASSIMP_PATH%
+
+rmdir /s /q build
+mkdir build
+cd build
+
+%CMAKE_PATH% .. ^
+ -G"MinGW Makefiles" ^
+ -DCMAKE_BUILD_TYPE=Release ^
+ -DCMAKE_TOOLCHAIN_FILE=%ANDROID_CMAKE_PATH%\android.toolchain.cmake ^
+ -DCMAKE_MAKE_PROGRAM=%ANDROID_NDK_PATH%\prebuilt\windows-x86_64\bin\make.exe ^
+ -DANDROID_NDK=%ANDROID_NDK_PATH% ^
+ -DANDROID_NATIVE_API_LEVEL=android-9 ^
+ -DASSIMP_ANDROID_JNIIOSYSTEM=ON ^
+ -DANDROID_ABI=arm64-v8a ^
+ -DASSIMP_BUILD_ZLIB=ON ^
+ -DASSIMP_BUILD_TESTS=OFF
+
+%CMAKE_PATH% --build .
+
+popd \ No newline at end of file
diff --git a/scripts/appveyor/compiler_setup.bat b/scripts/appveyor/compiler_setup.bat
deleted file mode 100644
index 7d4851493..000000000
--- a/scripts/appveyor/compiler_setup.bat
+++ /dev/null
@@ -1,36 +0,0 @@
-rem @echo off
-
-:: Now we declare a scope
-Setlocal EnableDelayedExpansion EnableExtensions
-
-if not defined Configuration set Configuration=14 2015
-
-if "%Configuration%"=="MinGW" ( goto :mingw )
-
-set arch=x86
-
-if "%platform%" EQU "x64" ( set arch=x86_amd64 )
-
-if "%Configuration%"=="14 2015" (
- set SET_VS_ENV="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
-)
-
-if "%Configuration%"=="12 2013" (
- set SET_VS_ENV="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"
-)
-
-if "%Configuration%"=="11 2012" (
- set SET_VS_ENV="C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat"
-)
-
-if "%Configuration%"=="10 2010" (
- set SET_VS_ENV="C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
-)
-
-:: Visual Studio detected
-endlocal & call %SET_VS_ENV% %arch%
-goto :eof
-
-:: MinGW detected
-:mingw
-endlocal & set PATH=c:\mingw\bin;%PATH%
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index b0be474d8..210d95550 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -1,7 +1,8 @@
# Open Asset Import Library (assimp)
# ----------------------------------------------------------------------
#
-# Copyright (c) 2006-2017, assimp team
+# Copyright (c) 2006-2018, assimp team
+
# All rights reserved.
#
@@ -38,111 +39,152 @@
#----------------------------------------------------------------------
cmake_minimum_required( VERSION 2.6 )
-include( CTest )
-enable_testing()
-
INCLUDE_DIRECTORIES(
- ../contrib/gtest/include
- ../contrib/gtest/
+ ${Assimp_SOURCE_DIR}/contrib/gtest/include
+ ${Assimp_SOURCE_DIR}/contrib/gtest/
+ ${Assimp_SOURCE_DIR}/test/unit
${Assimp_SOURCE_DIR}/include
${Assimp_SOURCE_DIR}/code
)
+if (MSVC)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING")
+endif()
# Add the temporary output directories to the library path to make sure the
# Assimp library can be found, even if it is not installed system-wide yet.
LINK_DIRECTORIES( ${Assimp_BINARY_DIR} ${AssetImporter_BINARY_DIR}/lib )
-SOURCE_GROUP( unit FILES
- unit/CCompilerTest.c
-)
-
-SET( TEST_SRCS
+SET( COMMON
+ unit/utSimd.cpp
+ unit/utIOSystem.cpp
+ unit/utIOStreamBuffer.cpp
+ unit/utIssues.cpp
+ unit/utAnim.cpp
+ unit/AssimpAPITest.cpp
+ unit/utBatchLoader.cpp
+ unit/utDefaultIOStream.cpp
+ unit/utFastAtof.cpp
+ unit/utMetadata.cpp
+ unit/SceneDiffer.h
+ unit/SceneDiffer.cpp
+ unit/UTLogStream.h
unit/AbstractImportExportBase.cpp
unit/TestIOSystem.h
unit/TestModelFactory.h
+ unit/utTypes.cpp
+ unit/utVersion.cpp
+ unit/utProfiler.cpp
+ unit/utSharedPPData.cpp
+ unit/utStringUtils.cpp
+ unit/Common/utLineSplitter.cpp
+)
+
+SET( IMPORTERS
+ unit/utLWSImportExport.cpp
+ unit/utLWOImportExport.cpp
+ unit/utSMDImportExport.cpp
+ unit/utglTFImportExport.cpp
+ unit/utglTF2ImportExport.cpp
+ unit/utHMPImportExport.cpp
+ unit/utIFCImportExport.cpp
+ unit/utFBXImporterExporter.cpp
+ unit/utImporter.cpp
+ unit/ImportExport/utExporter.cpp
unit/ut3DImportExport.cpp
unit/ut3DSImportExport.cpp
unit/utACImportExport.cpp
unit/utAMFImportExport.cpp
- unit/utASEImportExport.cpp
- unit/utAnim.cpp
- unit/AssimpAPITest.cpp
- unit/utB3DImportExport.cpp
- unit/utBatchLoader.cpp
+ unit/utASEImportExport.cpp
+ unit/utD3MFImportExport.cpp
+ unit/utQ3DImportExport.cpp
+ unit/utSTLImportExport.cpp
+ unit/utXImporterExporter.cpp
+ unit/utX3DImportExport.cpp
+ unit/utDXFImporterExporter.cpp
+ unit/utPMXImporter.cpp
+ unit/utPLYImportExport.cpp
+ unit/utObjImportExport.cpp
+ unit/utObjTools.cpp
+ unit/utOpenGEXImportExport.cpp
+ unit/utSIBImporter.cpp
unit/utBlenderIntermediate.cpp
unit/utBlendImportAreaLight.cpp
unit/utBlenderImportExport.cpp
unit/utBlendImportMaterials.cpp
+ unit/utBlenderWork.cpp
unit/utBVHImportExport.cpp
unit/utColladaExportCamera.cpp
unit/utColladaExportLight.cpp
unit/utColladaImportExport.cpp
unit/utCSMImportExport.cpp
- unit/utDefaultIOStream.cpp
- unit/utDXFImporterExporter.cpp
- unit/utFastAtof.cpp
- unit/utFBXImporterExporter.cpp
- unit/utFindDegenerates.cpp
- unit/utFindInvalidData.cpp
- unit/utFixInfacingNormals.cpp
- unit/utGenNormals.cpp
- unit/utglTFImportExport.cpp
- unit/utHMPImportExport.cpp
- unit/utIFCImportExport.cpp
- unit/utImporter.cpp
- unit/utImproveCacheLocality.cpp
- unit/utIOSystem.cpp
- unit/utIOStreamBuffer.cpp
- unit/utIssues.cpp
- unit/utJoinVertices.cpp
- unit/utLimitBoneWeights.cpp
- unit/utLWSImportExport.cpp
+ unit/utB3DImportExport.cpp
+ unit/utMDCImportExport.cpp
+ unit/utAssbinImportExport.cpp
+ unit/ImportExport/utCOBImportExport.cpp
+ unit/ImportExport/utOgreImportExport.cpp
+ unit/ImportExport/utQ3BSPFileImportExport.cpp
+ unit/ImportExport/utOFFImportExport.cpp
+ unit/ImportExport/utNFFImportExport.cpp
+ unit/ImportExport/utXGLImportExport.cpp
+)
+
+SET( MATERIAL
unit/utMaterialSystem.cpp
+)
+
+SET( MATH
unit/utMatrix3x3.cpp
unit/utMatrix4x4.cpp
- unit/utMetadata.cpp
- unit/SceneDiffer.h
- unit/SceneDiffer.cpp
- unit/utSIBImporter.cpp
- unit/utObjImportExport.cpp
- unit/utObjTools.cpp
- unit/utOpenGEXImportExport.cpp
- unit/utPretransformVertices.cpp
- unit/utPLYImportExport.cpp
- unit/utPMXImporter.cpp
- unit/utRemoveComments.cpp
- unit/utRemoveComponent.cpp
+ unit/utVector3.cpp
+)
+
+SET( POST_PROCESSES
+ unit/utImproveCacheLocality.cpp
+ unit/utFixInfacingNormals.cpp
+ unit/utGenNormals.cpp
+ unit/utTriangulate.cpp
+ unit/utTextureTransform.cpp
unit/utRemoveRedundantMaterials.cpp
unit/utRemoveVCProcess.cpp
- unit/utScenePreprocessor.cpp
- unit/utSharedPPData.cpp
- unit/utStringUtils.cpp
- unit/utSMDImportExport.cpp
- unit/utSortByPType.cpp
+ unit/utScaleProcess.cpp
+ unit/utJoinVertices.cpp
+ unit/utRemoveComments.cpp
+ unit/utRemoveComponent.cpp
+ unit/utVertexTriangleAdjacency.cpp
+ unit/utJoinVertices.cpp
unit/utSplitLargeMeshes.cpp
+ unit/utFindDegenerates.cpp
+ unit/utFindInvalidData.cpp
+ unit/utLimitBoneWeights.cpp
+ unit/utPretransformVertices.cpp
+ unit/utScenePreprocessor.cpp
unit/utTargetAnimation.cpp
- unit/utTextureTransform.cpp
- unit/utTriangulate.cpp
- unit/utTypes.cpp
- unit/utVertexTriangleAdjacency.cpp
- unit/utVersion.cpp
- unit/utVector3.cpp
- unit/utXImporterExporter.cpp
- unit/utD3MFImportExport.cpp
+ unit/utSortByPType.cpp
+ unit/utSceneCombiner.cpp
)
-SOURCE_GROUP( tests FILES ${TEST_SRCS} )
+SOURCE_GROUP( UnitTests\\Compiler FILES unit/CCompilerTest.c )
+SOURCE_GROUP( UnitTests\\Common FILES ${COMMON} )
+SOURCE_GROUP( UnitTests\\Importers FILES ${IMPORTERS} )
+SOURCE_GROUP( UnitTests\\Material FILES ${MATERIAL} )
+SOURCE_GROUP( UnitTests\\Math FILES ${MATH} )
+SOURCE_GROUP( UnitTests\\PostProcess FILES ${POST_PROCESSES})
add_executable( unit
../contrib/gtest/src/gtest-all.cc
unit/CCompilerTest.c
unit/Main.cpp
../code/Version.cpp
- ${TEST_SRCS}
+ ${COMMON}
+ ${IMPORTERS}
+ ${MATERIAL}
+ ${MATH}
+ ${POST_PROCESSES}
)
add_definitions(-DASSIMP_TEST_MODELS_DIR="${CMAKE_CURRENT_LIST_DIR}/models")
-
+add_definitions(-DASSIMP_TEST_MODELS_NONBSD_DIR="${CMAKE_CURRENT_LIST_DIR}/models-nonbsd")
+
SET_PROPERTY( TARGET assimp PROPERTY DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX} )
IF( WIN32 )
@@ -151,6 +193,13 @@ ELSE( WIN32 )
SET( platform_libs pthread )
ENDIF( WIN32 )
+IF( WIN32 )
+ ADD_CUSTOM_COMMAND(TARGET unit
+ PRE_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:assimp> $<TARGET_FILE_DIR:unit>
+ MAIN_DEPENDENCY assimp)
+ENDIF( WIN32 )
+
IF(MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
ENDIF(MSVC)
diff --git a/test/models-nonbsd/3D/mar_rifle.uc b/test/models-nonbsd/3D/mar_rifle.uc
index be01ca657..daf2607a8 100644
--- a/test/models-nonbsd/3D/mar_rifle.uc
+++ b/test/models-nonbsd/3D/mar_rifle.uc
@@ -1,20 +1,20 @@
-class mar expands Actor;
-
-#exec MESH IMPORT MESH=mar ANIVFILE=MODELS\mar_a.3d DATAFILE=MODELS\mar_d.3d X=0 Y=0 Z=0
-#exec MESH ORIGIN MESH=mar X=0 Y=0 Z=0
-
-#exec MESH SEQUENCE MESH=mar SEQ=All STARTFRAME=0 NUMFRAMES=30
-//#exec MESH SEQUENCE MESH=mar SEQ=??? STARTFRAME=0 NUMFRAMES=30
-
-#exec MESHMAP NEW MESHMAP=mar MESH=mar
-#exec MESHMAP SCALE MESHMAP=mar X=0.1 Y=0.1 Z=0.2
-
-#exec TEXTURE IMPORT NAME=Jtex1 FILE=..\3DS\m_rifl.bmp GROUP=Skins FLAGS=2
-#exec TEXTURE IMPORT NAME=Jtex1 FILE=texture1.pcx GROUP=Skins PALETTE=Jtex1
-#exec MESHMAP SETTEXTURE MESHMAP=mar NUM=1 TEXTURE=Jtex1
-
-defaultproperties
-{
- DrawType=DT_Mesh
- Mesh=mar
-}
+class mar expands Actor;
+
+#exec MESH IMPORT MESH=mar ANIVFILE=MODELS\mar_a.3d DATAFILE=MODELS\mar_d.3d X=0 Y=0 Z=0
+#exec MESH ORIGIN MESH=mar X=0 Y=0 Z=0
+
+#exec MESH SEQUENCE MESH=mar SEQ=All STARTFRAME=0 NUMFRAMES=30
+//#exec MESH SEQUENCE MESH=mar SEQ=??? STARTFRAME=0 NUMFRAMES=30
+
+#exec MESHMAP NEW MESHMAP=mar MESH=mar
+#exec MESHMAP SCALE MESHMAP=mar X=0.1 Y=0.1 Z=0.2
+
+#exec TEXTURE IMPORT NAME=Jtex1 FILE=..\3DS\m_rifl.bmp GROUP=Skins FLAGS=2
+#exec TEXTURE IMPORT NAME=Jtex1 FILE=texture1.pcx GROUP=Skins PALETTE=Jtex1
+#exec MESHMAP SETTEXTURE MESHMAP=mar NUM=1 TEXTURE=Jtex1
+
+defaultproperties
+{
+ DrawType=DT_Mesh
+ Mesh=mar
+}
diff --git a/test/models-nonbsd/3D/mar_rifle_a.3d b/test/models-nonbsd/3D/mar_rifle_a.3d
index a01d9fe8b..272dbdf1c 100644
--- a/test/models-nonbsd/3D/mar_rifle_a.3d
+++ b/test/models-nonbsd/3D/mar_rifle_a.3d
Binary files differ
diff --git a/test/models-nonbsd/3DS/jeep1.jpg b/test/models-nonbsd/3DS/jeep1.jpg
index e28e3aad5..6d7eb4b31 100644
--- a/test/models-nonbsd/3DS/jeep1.jpg
+++ b/test/models-nonbsd/3DS/jeep1.jpg
Binary files differ
diff --git a/test/models-nonbsd/3DS/m_rifl.bmp b/test/models-nonbsd/3DS/m_rifl.bmp
index fc1d8c281..bb27dadb2 100644
--- a/test/models-nonbsd/3DS/m_rifl.bmp
+++ b/test/models-nonbsd/3DS/m_rifl.bmp
Binary files differ
diff --git a/test/models-nonbsd/3DS/pyramob.3DS b/test/models-nonbsd/3DS/pyramob.3DS
index c880bdf43..f4f5af4f3 100644
--- a/test/models-nonbsd/3DS/pyramob.3DS
+++ b/test/models-nonbsd/3DS/pyramob.3DS
Binary files differ
diff --git a/test/models-nonbsd/AMF/3_bananas.amf.7z b/test/models-nonbsd/AMF/3_bananas.amf.7z
index c2b6785a3..9d035c592 100644
--- a/test/models-nonbsd/AMF/3_bananas.amf.7z
+++ b/test/models-nonbsd/AMF/3_bananas.amf.7z
Binary files differ
diff --git a/test/models-nonbsd/AMF/screenshot_3_bananas.jpeg b/test/models-nonbsd/AMF/screenshot_3_bananas.jpeg
index 976fcb03b..faa2cac85 100644
--- a/test/models-nonbsd/AMF/screenshot_3_bananas.jpeg
+++ b/test/models-nonbsd/AMF/screenshot_3_bananas.jpeg
Binary files differ
diff --git a/test/models-nonbsd/ASE/Rifle.ase b/test/models-nonbsd/ASE/Rifle.ase
index 17de77105..b896b5bd8 100644
--- a/test/models-nonbsd/ASE/Rifle.ase
+++ b/test/models-nonbsd/ASE/Rifle.ase
@@ -1,5432 +1,5432 @@
-*3DSMAX_ASCIIEXPORT 200
-*COMMENT "created by AC3D."
-*SCENE {
- *SCENE_FILENAME ""
- *SCENE_FIRSTFRAME 0
- *SCENE_LASTFRAME 100
- *SCENE_FRAMESPEED 30
- *SCENE_TICKSPERFRAME 160
- *SCENE_BACKGROUND_STATIC 0.0000 0.0000 0.0000
- *SCENE_AMBIENT_STATIC 0.0431 0.0431 0.0431
-}
-*MATERIAL_LIST {
- *MATERIAL_COUNT 21
- *MATERIAL 0 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.878431 0.878431 0.878431
- *MATERIAL_DIFFUSE 0.878431 0.878431 0.878431
- *MATERIAL_SPECULAR 1.000000 1.000000 1.000000
- *MATERIAL_SHINE 19.200001
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- *MAP_DIFFUSE {
- *MAP_NAME "Map #1"
- *MAP_CLASS "Bitmap"
- *MAP_SUBNO 1
- *MAP_AMOUNT 1.0000
- *BITMAP "../3DS/MP5SIL.BMP"
- *MAP_TYPE Screen
- *UVW_U_OFFSET 0.000000
- *UVW_V_OFFSET 0.000000
- *UVW_U_TILING 1.000000
- *UVW_V_TILING 1.000000
- *UVW_ANGLE 0.0000
- *UVW_BLUR 1.0000
- *UVW_BLUR_OFFSET 0.0000
- *UVW_NOUSE_AMT 1.0000
- *UVW_NOISE_SIZE 1.0000
- *UVW_NOISE_LEVEL 1
- *UVW_NOISE_PHASE 0.0000
- *BITMAP_FILTER Pyramidal
- }
- }
- *MATERIAL 1 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
- *MATERIAL_DIFFUSE 0.000000 0.000000 0.000000
- *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
- *MATERIAL_SHINE 128.000000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 2 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
- *MATERIAL_DIFFUSE 1.000000 1.000000 1.000000
- *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
- *MATERIAL_SHINE 128.000000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 3 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
- *MATERIAL_DIFFUSE 0.627451 0.250980 0.250980
- *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
- *MATERIAL_SHINE 128.000000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 4 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
- *MATERIAL_DIFFUSE 1.000000 0.000000 0.000000
- *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
- *MATERIAL_SHINE 128.000000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 5 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
- *MATERIAL_DIFFUSE 1.000000 0.466667 0.000000
- *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
- *MATERIAL_SHINE 128.000000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 6 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
- *MATERIAL_DIFFUSE 1.000000 1.000000 0.000000
- *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
- *MATERIAL_SHINE 128.000000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 7 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
- *MATERIAL_DIFFUSE 0.000000 1.000000 0.000000
- *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
- *MATERIAL_SHINE 128.000000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 8 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
- *MATERIAL_DIFFUSE 0.270588 0.525490 0.454902
- *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
- *MATERIAL_SHINE 128.000000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 9 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
- *MATERIAL_DIFFUSE 0.627451 0.752941 0.878431
- *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
- *MATERIAL_SHINE 128.000000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 10 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
- *MATERIAL_DIFFUSE 0.000000 0.000000 1.000000
- *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
- *MATERIAL_SHINE 128.000000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 11 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
- *MATERIAL_DIFFUSE 0.509804 0.000000 0.294118
- *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
- *MATERIAL_SHINE 128.000000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 12 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
- *MATERIAL_DIFFUSE 0.933333 0.501961 0.933333
- *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
- *MATERIAL_SHINE 128.000000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 13 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
- *MATERIAL_DIFFUSE 0.266667 0.266667 0.266667
- *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
- *MATERIAL_SHINE 128.000000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 14 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
- *MATERIAL_DIFFUSE 0.533333 0.533333 0.533333
- *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
- *MATERIAL_SHINE 128.000000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 15 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
- *MATERIAL_DIFFUSE 0.800000 0.800000 0.800000
- *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
- *MATERIAL_SHINE 128.000000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 16 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
- *MATERIAL_DIFFUSE 1.000000 0.501961 0.752941
- *MATERIAL_SPECULAR 0.000000 0.000000 0.000000
- *MATERIAL_SHINE 0.000000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 17 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.588235 0.588235 0.588235
- *MATERIAL_DIFFUSE 0.588235 0.588235 0.588235
- *MATERIAL_SPECULAR 0.898039 0.898039 0.898039
- *MATERIAL_SHINE 12.800000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 18 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.588235 0.588235 0.588235
- *MATERIAL_DIFFUSE 0.588235 0.588235 0.588235
- *MATERIAL_SPECULAR 0.898039 0.898039 0.898039
- *MATERIAL_SHINE 12.800000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 19 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.588235 0.588235 0.588235
- *MATERIAL_DIFFUSE 0.588235 0.588235 0.588235
- *MATERIAL_SPECULAR 0.898039 0.898039 0.898039
- *MATERIAL_SHINE 12.800000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 20 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.878431 0.878431 0.878431
- *MATERIAL_DIFFUSE 0.878431 0.878431 0.878431
- *MATERIAL_SPECULAR 1.000000 1.000000 1.000000
- *MATERIAL_SHINE 19.200001
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
-}
-
-*GEOMOBJECT {
- *NODE_NAME "Line06"
- *NODE_TM {
- *NODE_NAME "Object01"
- *INHERIT_POS 0 0 0
- *INHERIT_ROT 0 0 0
- *INHERIT_SCL 0 0 0
- *TM_ROW0 1.0000 0.0000 0.0000
- *TM_ROW1 0.0000 1.0000 0.0000
- *TM_ROW2 0.0000 0.0000 1.0000
- *TM_ROW3 0.0000 0.0000 0.0000
- *TM_POS 0.0000 0.0000 0.0000
- *TM_ROTAXIS 0.0000 0.0000 0.0000
- *TM_ROTANGLE 0.0000
- *TM_SCALE 1.0000 1.0000 1.0000
- *TM_SCALEAXIS 0.0000 0.0000 0.0000
- *TM_SCALEAXISANG 0.0000
- }
- *MESH {
- *TIMEVALUE 0
- *MESH_NUMVERTEX 236
- *MESH_NUMFACES 366
- *MESH_VERTEX_LIST {
- *MESH_VERTEX 0 -0.559998 6.284005 11.255371
- *MESH_VERTEX 1 -0.419998 5.907723 9.666631
- *MESH_VERTEX 2 -0.699998 5.865915 11.840698
- *MESH_VERTEX 3 -0.419998 3.190138 9.666631
- *MESH_VERTEX 4 -0.559998 1.935868 10.461003
- *MESH_VERTEX 5 -0.699998 1.935868 11.882508
- *MESH_VERTEX 6 -0.699998 -1.241616 12.718689
- *MESH_VERTEX 7 -0.559998 -2.161415 12.049746
- *MESH_VERTEX 8 0.560002 6.284005 11.255371
- *MESH_VERTEX 9 0.700002 5.865915 11.840698
- *MESH_VERTEX 10 0.420002 5.907723 9.666631
- *MESH_VERTEX 11 0.420002 3.190138 9.666631
- *MESH_VERTEX 12 0.560002 1.935868 10.461003
- *MESH_VERTEX 13 0.700002 1.935868 11.882508
- *MESH_VERTEX 14 0.700002 -1.241616 12.718689
- *MESH_VERTEX 15 0.560002 -2.161415 12.049746
- *MESH_VERTEX 16 -0.315522 4.261902 9.786250
- *MESH_VERTEX 17 -0.315522 5.205911 9.786250
- *MESH_VERTEX 18 -0.315522 5.205911 8.804341
- *MESH_VERTEX 19 -0.315522 4.261901 8.804341
- *MESH_VERTEX 20 0.291341 5.205911 9.786250
- *MESH_VERTEX 21 0.291341 5.205911 8.804341
- *MESH_VERTEX 22 0.291341 4.261902 9.786250
- *MESH_VERTEX 23 0.291341 4.261901 8.804341
- *MESH_VERTEX 24 0.000002 4.851194 -31.482225
- *MESH_VERTEX 25 1.120500 5.498114 -31.482225
- *MESH_VERTEX 26 1.293841 4.851194 -31.482225
- *MESH_VERTEX 27 0.646922 5.971691 -31.482225
- *MESH_VERTEX 28 0.000002 6.145033 -31.482225
- *MESH_VERTEX 29 -0.646917 5.971691 -31.482225
- *MESH_VERTEX 30 -1.120495 5.498114 -31.482225
- *MESH_VERTEX 31 -1.293837 4.851194 -31.482225
- *MESH_VERTEX 32 -1.120495 4.204275 -31.482225
- *MESH_VERTEX 33 -0.646917 3.730697 -31.482225
- *MESH_VERTEX 34 0.000002 3.557356 -31.482225
- *MESH_VERTEX 35 0.646922 3.730697 -31.482225
- *MESH_VERTEX 36 1.120500 4.204275 -31.482225
- *MESH_VERTEX 37 -0.674884 9.154098 -20.192945
- *MESH_VERTEX 38 -0.468345 8.948195 -20.209150
- *MESH_VERTEX 39 0.000002 9.141592 -20.193930
- *MESH_VERTEX 40 0.000002 9.432783 -20.171013
- *MESH_VERTEX 41 -0.674884 9.221854 -20.915016
- *MESH_VERTEX 42 0.000002 9.500540 -20.893084
- *MESH_VERTEX 43 -0.468345 9.015951 -20.931223
- *MESH_VERTEX 44 0.000002 9.209350 -20.916002
- *MESH_VERTEX 45 -0.954431 8.481292 -20.245895
- *MESH_VERTEX 46 -0.662341 8.481292 -20.245895
- *MESH_VERTEX 47 -0.954432 8.549048 -20.967968
- *MESH_VERTEX 48 -0.662341 8.549048 -20.967968
- *MESH_VERTEX 49 -0.216998 7.048779 -20.359722
- *MESH_VERTEX 50 -0.216998 8.014388 -20.282642
- *MESH_VERTEX 51 -0.216998 7.000406 -20.956289
- *MESH_VERTEX 52 -0.216998 8.017383 -21.004715
- *MESH_VERTEX 53 0.000002 7.079682 -20.350504
- *MESH_VERTEX 54 0.000002 8.490013 -20.358704
- *MESH_VERTEX 55 0.000002 8.491855 -20.955271
- *MESH_VERTEX 56 0.000002 7.085633 -20.962612
- *MESH_VERTEX 57 0.216959 7.048779 -20.359722
- *MESH_VERTEX 58 0.217002 8.014388 -20.282642
- *MESH_VERTEX 59 0.217002 8.017383 -21.004715
- *MESH_VERTEX 60 0.216958 7.000407 -20.956291
- *MESH_VERTEX 61 0.954436 8.481292 -20.245895
- *MESH_VERTEX 62 0.662345 8.481292 -20.245895
- *MESH_VERTEX 63 0.954436 8.549048 -20.967968
- *MESH_VERTEX 64 0.662345 8.549048 -20.967968
- *MESH_VERTEX 65 0.674889 9.154098 -20.192945
- *MESH_VERTEX 66 0.468349 8.948195 -20.209150
- *MESH_VERTEX 67 0.674889 9.221854 -20.915016
- *MESH_VERTEX 68 0.468349 9.015951 -20.931223
- *MESH_VERTEX 69 0.000002 8.265148 2.927335
- *MESH_VERTEX 70 0.085300 8.350446 2.651849
- *MESH_VERTEX 71 0.000002 8.265148 2.623042
- *MESH_VERTEX 72 0.171527 8.436673 2.985264
- *MESH_VERTEX 73 -0.085295 8.350446 2.651849
- *MESH_VERTEX 74 -0.171522 8.436673 2.985263
- *MESH_VERTEX 75 0.000002 8.265148 4.524281
- *MESH_VERTEX 76 -0.401965 8.667115 3.876321
- *MESH_VERTEX 77 -0.466411 8.731563 4.125515
- *MESH_VERTEX 78 0.000002 8.265148 4.219988
- *MESH_VERTEX 79 0.401970 8.667115 3.876321
- *MESH_VERTEX 80 0.466416 8.731563 4.125515
- *MESH_VERTEX 81 -0.797036 8.453333 3.049684
- *MESH_VERTEX 82 -0.541904 8.490214 3.192292
- *MESH_VERTEX 83 -0.541904 6.845878 3.617546
- *MESH_VERTEX 84 0.000002 6.767541 3.314642
- *MESH_VERTEX 85 -0.797036 6.808997 3.474938
- *MESH_VERTEX 86 0.000002 6.693779 3.029425
- *MESH_VERTEX 87 -0.541904 8.646887 3.798100
- *MESH_VERTEX 88 -0.541904 7.002550 4.223354
- *MESH_VERTEX 89 -0.797036 8.683767 3.940709
- *MESH_VERTEX 90 -0.797036 7.039432 4.365963
- *MESH_VERTEX 91 0.000002 7.080887 4.526258
- *MESH_VERTEX 92 0.000002 7.154649 4.811476
- *MESH_VERTEX 93 0.541908 7.002550 4.223354
- *MESH_VERTEX 94 0.541908 8.646887 3.798100
- *MESH_VERTEX 95 0.797040 8.683767 3.940709
- *MESH_VERTEX 96 0.797040 7.039432 4.365963
- *MESH_VERTEX 97 0.541908 8.490214 3.192292
- *MESH_VERTEX 98 0.541908 6.845878 3.617547
- *MESH_VERTEX 99 0.797040 8.453333 3.049684
- *MESH_VERTEX 100 0.797040 6.808997 3.474938
- *MESH_VERTEX 101 -0.209998 -2.196519 0.577376
- *MESH_VERTEX 102 -0.209998 -2.158235 -1.719703
- *MESH_VERTEX 103 -0.209998 -2.655936 0.692230
- *MESH_VERTEX 104 -0.209998 -2.617651 -2.064265
- *MESH_VERTEX 105 -0.209998 0.215414 -2.868243
- *MESH_VERTEX 106 -0.209998 0.177129 -3.480797
- *MESH_VERTEX 107 -0.209998 -1.966812 1.840769
- *MESH_VERTEX 108 -0.209998 -1.201119 1.879055
- *MESH_VERTEX 109 -0.209998 -1.966812 2.568178
- *MESH_VERTEX 110 0.210002 -2.196519 0.577376
- *MESH_VERTEX 111 0.210002 -2.655936 0.692230
- *MESH_VERTEX 112 0.210002 -2.158235 -1.719703
- *MESH_VERTEX 113 0.210002 -2.617651 -2.064265
- *MESH_VERTEX 114 0.210002 0.215414 -2.868243
- *MESH_VERTEX 115 0.210002 0.177129 -3.480797
- *MESH_VERTEX 116 0.210002 -1.966812 1.840769
- *MESH_VERTEX 117 0.210002 -1.201119 1.879055
- *MESH_VERTEX 118 0.210002 -1.966812 2.568178
- *MESH_VERTEX 119 -0.209998 -1.009695 0.385953
- *MESH_VERTEX 120 -0.209998 0.215414 0.539091
- *MESH_VERTEX 121 -0.209998 -0.971411 -0.073463
- *MESH_VERTEX 122 -0.209998 0.177129 -0.494594
- *MESH_VERTEX 123 -0.209998 -1.966812 -0.418024
- *MESH_VERTEX 124 0.210002 -1.009695 0.385953
- *MESH_VERTEX 125 0.210002 -0.971411 -0.073463
- *MESH_VERTEX 126 0.210002 0.215414 0.539091
- *MESH_VERTEX 127 0.210002 0.177129 -0.494594
- *MESH_VERTEX 128 0.210002 -1.966812 -0.418024
- *MESH_VERTEX 129 1.120500 5.498115 -21.311342
- *MESH_VERTEX 130 1.293841 4.851195 -21.311342
- *MESH_VERTEX 131 1.293841 4.851195 -31.482225
- *MESH_VERTEX 132 1.120500 5.498114 -31.482225
- *MESH_VERTEX 133 0.646922 5.971693 -21.311342
- *MESH_VERTEX 134 0.646922 5.971692 -31.482225
- *MESH_VERTEX 135 0.000002 6.145034 -21.311342
- *MESH_VERTEX 136 0.000002 6.145033 -31.482225
- *MESH_VERTEX 137 -0.646917 5.971693 -21.311342
- *MESH_VERTEX 138 -0.646917 5.971693 -31.482225
- *MESH_VERTEX 139 -1.120495 5.498115 -21.311342
- *MESH_VERTEX 140 -1.120495 5.498114 -31.482225
- *MESH_VERTEX 141 -1.293837 4.851195 -21.311342
- *MESH_VERTEX 142 -1.293837 4.851195 -31.482225
- *MESH_VERTEX 143 -1.120496 4.204276 -21.311342
- *MESH_VERTEX 144 -1.120495 4.204276 -31.482225
- *MESH_VERTEX 145 -0.646917 3.730698 -21.311342
- *MESH_VERTEX 146 -0.646917 3.730698 -31.482225
- *MESH_VERTEX 147 0.000002 3.557356 -21.311342
- *MESH_VERTEX 148 0.000002 3.557356 -31.482225
- *MESH_VERTEX 149 0.646922 3.730698 -21.311342
- *MESH_VERTEX 150 0.646922 3.730698 -31.482225
- *MESH_VERTEX 151 1.120500 4.204276 -21.311342
- *MESH_VERTEX 152 1.120500 4.204276 -31.482225
- *MESH_VERTEX 153 0.000002 5.139493 -21.347084
- *MESH_VERTEX 154 0.947158 6.106346 -21.347084
- *MESH_VERTEX 155 1.391157 5.139493 -21.347084
- *MESH_VERTEX 156 0.546843 6.943166 -21.347086
- *MESH_VERTEX 157 0.000002 7.150661 -21.347086
- *MESH_VERTEX 158 -0.546839 6.943166 -21.347086
- *MESH_VERTEX 159 -0.947154 6.106347 -21.347086
- *MESH_VERTEX 160 -1.391152 5.139493 -21.347084
- *MESH_VERTEX 161 -1.326017 4.055358 -21.347071
- *MESH_VERTEX 162 -0.765575 3.261717 -21.347071
- *MESH_VERTEX 163 0.000002 3.032733 -21.347071
- *MESH_VERTEX 164 0.765579 3.261717 -21.347071
- *MESH_VERTEX 165 1.326021 4.055358 -21.347071
- *MESH_VERTEX 166 0.947159 6.106347 -8.166925
- *MESH_VERTEX 167 0.980002 5.139494 -8.166924
- *MESH_VERTEX 168 0.546843 6.943166 -8.166925
- *MESH_VERTEX 169 0.000002 7.150661 -8.166925
- *MESH_VERTEX 170 -0.546839 6.943166 -8.166925
- *MESH_VERTEX 171 -0.947154 6.106348 -8.166925
- *MESH_VERTEX 172 -0.979998 5.139494 -8.166924
- *MESH_VERTEX 173 -0.979998 4.055360 -8.166988
- *MESH_VERTEX 174 -0.765575 3.273818 -8.166988
- *MESH_VERTEX 175 0.000002 3.273818 -8.166988
- *MESH_VERTEX 176 0.765580 3.273818 -8.166988
- *MESH_VERTEX 177 0.980002 4.055360 -8.166988
- *MESH_VERTEX 178 -0.559998 -9.863222 -9.139494
- *MESH_VERTEX 179 -0.559998 -6.295757 -7.355761
- *MESH_VERTEX 180 -0.559998 -8.499191 -11.133077
- *MESH_VERTEX 181 -0.559998 -4.616950 -9.087029
- *MESH_VERTEX 182 -0.559998 -2.833217 -6.044193
- *MESH_VERTEX 183 -0.559998 -1.469186 -7.880388
- *MESH_VERTEX 184 -0.559998 0.629323 -5.047400
- *MESH_VERTEX 185 -0.559998 1.678578 -7.198372
- *MESH_VERTEX 186 0.560002 -9.863222 -9.139494
- *MESH_VERTEX 187 0.560002 -8.499191 -11.133077
- *MESH_VERTEX 188 0.560002 -6.295757 -7.355761
- *MESH_VERTEX 189 0.560002 -4.616950 -9.087029
- *MESH_VERTEX 190 0.560002 -2.833217 -6.044193
- *MESH_VERTEX 191 0.560002 -1.469186 -7.880388
- *MESH_VERTEX 192 0.560002 0.629323 -5.047400
- *MESH_VERTEX 193 0.560002 1.678578 -7.198372
- *MESH_VERTEX 194 0.980002 3.273756 -8.227636
- *MESH_VERTEX 195 -0.979998 3.231947 -7.233493
- *MESH_VERTEX 196 -0.979998 3.273818 -8.227624
- *MESH_VERTEX 197 0.980002 3.231947 -7.233505
- *MESH_VERTEX 198 -0.979998 3.733655 -7.182400
- *MESH_VERTEX 199 -0.979998 7.195459 -8.227624
- *MESH_VERTEX 200 -0.979998 7.203029 8.203317
- *MESH_VERTEX 201 -0.979998 5.865914 8.914067
- *MESH_VERTEX 202 -0.979998 3.566419 8.914356
- *MESH_VERTEX 203 0.980002 3.733655 -7.182400
- *MESH_VERTEX 204 0.980002 7.195459 -8.227624
- *MESH_VERTEX 205 0.980002 7.203029 8.203317
- *MESH_VERTEX 206 0.980002 5.865914 8.914067
- *MESH_VERTEX 207 0.980002 3.566419 8.914356
- *MESH_VERTEX 208 -0.699998 -0.007852 5.032930
- *MESH_VERTEX 209 -0.699998 -2.119606 2.684526
- *MESH_VERTEX 210 -0.699998 -0.778996 5.422669
- *MESH_VERTEX 211 -0.699998 -1.325235 1.848345
- *MESH_VERTEX 212 -0.699998 0.179889 1.304829
- *MESH_VERTEX 213 -0.979998 1.160583 5.192857
- *MESH_VERTEX 214 -0.699998 0.096271 -3.377781
- *MESH_VERTEX 215 -0.979998 0.305317 -5.050141
- *MESH_VERTEX 216 -0.979998 1.392351 -7.391445
- *MESH_VERTEX 217 -0.699998 -5.411245 4.271282
- *MESH_VERTEX 218 -0.979998 -4.544528 7.952461
- *MESH_VERTEX 219 -0.979998 -6.489938 4.396504
- *MESH_VERTEX 220 -0.979998 1.970891 6.006893
- *MESH_VERTEX 221 -0.979998 1.977677 8.119698
- *MESH_VERTEX 222 0.700002 -0.007852 5.032930
- *MESH_VERTEX 223 0.700002 -0.778996 5.422669
- *MESH_VERTEX 224 0.700002 -2.119606 2.684526
- *MESH_VERTEX 225 0.700002 -1.325235 1.848345
- *MESH_VERTEX 226 0.700002 0.179890 1.304829
- *MESH_VERTEX 227 0.980002 1.160583 5.192857
- *MESH_VERTEX 228 0.700002 0.096271 -3.377781
- *MESH_VERTEX 229 0.980002 0.305317 -5.050141
- *MESH_VERTEX 230 0.980002 1.392351 -7.391445
- *MESH_VERTEX 231 0.700002 -5.411245 4.271282
- *MESH_VERTEX 232 0.980002 -4.544528 7.952461
- *MESH_VERTEX 233 0.980002 -6.489938 4.396504
- *MESH_VERTEX 234 0.980002 1.970891 6.006893
- *MESH_VERTEX 235 0.980002 1.977677 8.119698
- }
- *MESH_FACE_LIST {
- *MESH_FACE 0: A: 0 B: 1 C: 2 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 1: A: 1 B: 3 C: 2 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 2: A: 3 B: 4 C: 2 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 3: A: 4 B: 5 C: 2 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 4: A: 4 B: 6 C: 5 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 5: A: 4 B: 7 C: 6 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 6: A: 8 B: 9 C: 10 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 7: A: 10 B: 9 C: 11 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 8: A: 11 B: 9 C: 12 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 9: A: 12 B: 9 C: 13 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 10: A: 12 B: 13 C: 14 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 11: A: 12 B: 14 C: 15 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 12: A: 11 B: 4 C: 3 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 13: A: 11 B: 12 C: 4 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 14: A: 10 B: 3 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 15: A: 10 B: 11 C: 3 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 16: A: 8 B: 1 C: 0 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 17: A: 8 B: 10 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 18: A: 9 B: 0 C: 2 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 19: A: 9 B: 8 C: 0 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 20: A: 13 B: 2 C: 5 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 21: A: 13 B: 9 C: 2 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 22: A: 14 B: 5 C: 6 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 23: A: 14 B: 13 C: 5 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 24: A: 15 B: 6 C: 7 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 25: A: 15 B: 14 C: 6 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 26: A: 12 B: 7 C: 4 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 27: A: 12 B: 15 C: 7 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 28: A: 16 B: 17 C: 18 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 29: A: 18 B: 19 C: 16 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 30: A: 17 B: 20 C: 21 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 31: A: 21 B: 18 C: 17 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 32: A: 20 B: 22 C: 23 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 33: A: 23 B: 21 C: 20 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 34: A: 22 B: 16 C: 19 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 35: A: 19 B: 23 C: 22 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 36: A: 24 B: 25 C: 26 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 37: A: 24 B: 27 C: 25 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 38: A: 24 B: 28 C: 27 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 39: A: 24 B: 29 C: 28 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 40: A: 24 B: 30 C: 29 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 41: A: 24 B: 31 C: 30 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 42: A: 24 B: 32 C: 31 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 43: A: 24 B: 33 C: 32 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 44: A: 24 B: 34 C: 33 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 45: A: 24 B: 35 C: 34 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 46: A: 24 B: 36 C: 35 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 47: A: 24 B: 26 C: 36 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 48: A: 37 B: 38 C: 39 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 49: A: 37 B: 39 C: 40 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 50: A: 41 B: 37 C: 40 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 51: A: 41 B: 40 C: 42 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 52: A: 43 B: 41 C: 42 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 53: A: 43 B: 42 C: 44 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 54: A: 38 B: 43 C: 44 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 55: A: 38 B: 44 C: 39 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 56: A: 45 B: 46 C: 38 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 57: A: 45 B: 38 C: 37 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 58: A: 47 B: 45 C: 37 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 59: A: 47 B: 37 C: 41 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 60: A: 48 B: 47 C: 41 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 61: A: 48 B: 41 C: 43 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 62: A: 46 B: 48 C: 43 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 63: A: 46 B: 43 C: 38 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 64: A: 49 B: 50 C: 46 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 65: A: 49 B: 46 C: 45 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 66: A: 51 B: 49 C: 45 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 67: A: 51 B: 45 C: 47 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 68: A: 52 B: 51 C: 47 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 69: A: 52 B: 47 C: 48 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 70: A: 50 B: 52 C: 48 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 71: A: 50 B: 48 C: 46 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 72: A: 53 B: 54 C: 50 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 73: A: 53 B: 50 C: 49 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 74: A: 55 B: 56 C: 51 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 75: A: 55 B: 51 C: 52 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 76: A: 54 B: 55 C: 52 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 77: A: 54 B: 52 C: 50 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 78: A: 57 B: 58 C: 54 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 79: A: 57 B: 54 C: 53 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 80: A: 59 B: 60 C: 56 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 81: A: 59 B: 56 C: 55 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 82: A: 58 B: 59 C: 55 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 83: A: 58 B: 55 C: 54 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 84: A: 61 B: 62 C: 58 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 85: A: 61 B: 58 C: 57 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 86: A: 63 B: 61 C: 57 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 87: A: 63 B: 57 C: 60 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 88: A: 64 B: 63 C: 60 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 89: A: 64 B: 60 C: 59 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 90: A: 62 B: 64 C: 59 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 91: A: 62 B: 59 C: 58 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 92: A: 65 B: 66 C: 62 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 93: A: 65 B: 62 C: 61 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 94: A: 67 B: 65 C: 61 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 95: A: 67 B: 61 C: 63 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 96: A: 68 B: 67 C: 63 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 97: A: 68 B: 63 C: 64 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 98: A: 66 B: 68 C: 64 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 99: A: 66 B: 64 C: 62 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 100: A: 40 B: 39 C: 66 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 101: A: 40 B: 66 C: 65 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 102: A: 42 B: 40 C: 65 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 103: A: 42 B: 65 C: 67 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 104: A: 44 B: 42 C: 67 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 105: A: 44 B: 67 C: 68 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 106: A: 39 B: 44 C: 68 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 107: A: 39 B: 68 C: 66 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 108: A: 69 B: 70 C: 71 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 109: A: 69 B: 72 C: 70 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 110: A: 73 B: 69 C: 71 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 111: A: 73 B: 74 C: 69 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 112: A: 75 B: 76 C: 77 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 113: A: 75 B: 78 C: 76 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 114: A: 79 B: 75 C: 80 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 115: A: 79 B: 78 C: 75 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 116: A: 74 B: 73 C: 81 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 117: A: 81 B: 82 C: 74 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 118: A: 82 B: 69 C: 74 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 119: A: 82 B: 83 C: 69 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 120: A: 83 B: 84 C: 69 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 121: A: 81 B: 71 C: 85 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 122: A: 71 B: 86 C: 85 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 123: A: 81 B: 73 C: 71 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 124: A: 83 B: 82 C: 87 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 125: A: 87 B: 88 C: 83 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 126: A: 82 B: 81 C: 89 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 127: A: 89 B: 87 C: 82 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 128: A: 81 B: 85 C: 90 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 129: A: 90 B: 89 C: 81 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 130: A: 78 B: 87 C: 76 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 131: A: 78 B: 88 C: 87 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 132: A: 78 B: 91 C: 88 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 133: A: 77 B: 76 C: 87 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 134: A: 87 B: 89 C: 77 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 135: A: 92 B: 89 C: 90 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 136: A: 92 B: 75 C: 89 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 137: A: 75 B: 77 C: 89 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 138: A: 93 B: 79 C: 94 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 139: A: 93 B: 78 C: 79 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 140: A: 93 B: 91 C: 78 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 141: A: 94 B: 79 C: 80 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 142: A: 80 B: 95 C: 94 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 143: A: 96 B: 95 C: 92 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 144: A: 95 B: 75 C: 92 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 145: A: 95 B: 80 C: 75 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 146: A: 93 B: 94 C: 97 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 147: A: 97 B: 98 C: 93 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 148: A: 94 B: 95 C: 99 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 149: A: 99 B: 97 C: 94 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 150: A: 95 B: 96 C: 100 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 151: A: 100 B: 99 C: 95 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 152: A: 84 B: 72 C: 69 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 153: A: 84 B: 98 C: 72 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 154: A: 98 B: 97 C: 72 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 155: A: 99 B: 70 C: 72 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 156: A: 72 B: 97 C: 99 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 157: A: 86 B: 71 C: 100 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 158: A: 71 B: 99 C: 100 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 159: A: 71 B: 70 C: 99 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 160: A: 101 B: 102 C: 103 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 161: A: 102 B: 104 C: 103 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 162: A: 102 B: 105 C: 104 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 163: A: 105 B: 106 C: 104 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 164: A: 103 B: 107 C: 101 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 165: A: 107 B: 108 C: 101 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 166: A: 107 B: 109 C: 108 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 167: A: 110 B: 111 C: 112 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 168: A: 112 B: 111 C: 113 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 169: A: 112 B: 113 C: 114 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 170: A: 114 B: 113 C: 115 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 171: A: 111 B: 110 C: 116 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 172: A: 116 B: 110 C: 117 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 173: A: 116 B: 117 C: 118 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 174: A: 112 B: 105 C: 102 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 175: A: 112 B: 114 C: 105 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 176: A: 110 B: 102 C: 101 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 177: A: 110 B: 112 C: 102 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 178: A: 117 B: 101 C: 108 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 179: A: 117 B: 110 C: 101 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 180: A: 116 B: 109 C: 107 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 181: A: 116 B: 118 C: 109 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 182: A: 111 B: 107 C: 103 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 183: A: 111 B: 116 C: 107 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 184: A: 113 B: 103 C: 104 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 185: A: 113 B: 111 C: 103 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 186: A: 115 B: 104 C: 106 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 187: A: 115 B: 113 C: 104 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 188: A: 119 B: 120 C: 121 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 189: A: 120 B: 122 C: 121 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 190: A: 121 B: 123 C: 119 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 191: A: 124 B: 125 C: 126 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 192: A: 126 B: 125 C: 127 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 193: A: 125 B: 124 C: 128 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 194: A: 124 B: 120 C: 119 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 195: A: 124 B: 126 C: 120 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 196: A: 128 B: 119 C: 123 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 197: A: 128 B: 124 C: 119 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 198: A: 125 B: 123 C: 121 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 199: A: 125 B: 128 C: 123 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 200: A: 127 B: 121 C: 122 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 201: A: 127 B: 125 C: 121 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 202: A: 129 B: 130 C: 131 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 203: A: 129 B: 131 C: 132 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 204: A: 133 B: 129 C: 132 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 205: A: 133 B: 132 C: 134 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 206: A: 135 B: 133 C: 134 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 207: A: 135 B: 134 C: 136 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 208: A: 137 B: 135 C: 136 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 209: A: 137 B: 136 C: 138 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 210: A: 139 B: 137 C: 138 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 211: A: 139 B: 138 C: 140 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 212: A: 141 B: 139 C: 140 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 213: A: 141 B: 140 C: 142 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 214: A: 143 B: 141 C: 142 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 215: A: 143 B: 142 C: 144 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 216: A: 145 B: 143 C: 144 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 217: A: 145 B: 144 C: 146 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 218: A: 147 B: 145 C: 146 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 219: A: 147 B: 146 C: 148 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 220: A: 149 B: 147 C: 148 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 221: A: 149 B: 148 C: 150 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 222: A: 151 B: 149 C: 150 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 223: A: 151 B: 150 C: 152 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 224: A: 130 B: 151 C: 152 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 225: A: 130 B: 152 C: 131 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 226: A: 153 B: 154 C: 155 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 227: A: 153 B: 156 C: 154 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 228: A: 153 B: 157 C: 156 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 229: A: 153 B: 158 C: 157 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 230: A: 153 B: 159 C: 158 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 231: A: 153 B: 160 C: 159 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 232: A: 153 B: 161 C: 160 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 233: A: 153 B: 162 C: 161 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 234: A: 153 B: 163 C: 162 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 235: A: 153 B: 164 C: 163 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 236: A: 153 B: 165 C: 164 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 237: A: 153 B: 155 C: 165 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 238: A: 166 B: 167 C: 155 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 239: A: 166 B: 155 C: 154 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 240: A: 168 B: 166 C: 154 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 241: A: 168 B: 154 C: 156 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 242: A: 169 B: 168 C: 156 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 243: A: 169 B: 156 C: 157 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 244: A: 170 B: 169 C: 157 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 245: A: 170 B: 157 C: 158 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 246: A: 171 B: 170 C: 158 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 247: A: 171 B: 158 C: 159 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 248: A: 172 B: 171 C: 159 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 249: A: 172 B: 159 C: 160 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 250: A: 173 B: 172 C: 160 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 251: A: 173 B: 160 C: 161 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 252: A: 174 B: 173 C: 161 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 253: A: 174 B: 161 C: 162 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 254: A: 175 B: 174 C: 162 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 255: A: 175 B: 162 C: 163 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 256: A: 176 B: 175 C: 163 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 257: A: 176 B: 163 C: 164 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 258: A: 177 B: 176 C: 164 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 259: A: 177 B: 164 C: 165 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 260: A: 167 B: 177 C: 165 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 261: A: 167 B: 165 C: 155 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 262: A: 178 B: 179 C: 180 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 263: A: 179 B: 181 C: 180 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 264: A: 179 B: 182 C: 181 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 265: A: 182 B: 183 C: 181 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 266: A: 182 B: 184 C: 183 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 267: A: 184 B: 185 C: 183 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 268: A: 186 B: 187 C: 188 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 269: A: 188 B: 187 C: 189 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 270: A: 188 B: 189 C: 190 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 271: A: 190 B: 189 C: 191 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 272: A: 190 B: 191 C: 192 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 273: A: 192 B: 191 C: 193 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 274: A: 190 B: 184 C: 182 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 275: A: 190 B: 192 C: 184 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 276: A: 188 B: 182 C: 179 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 277: A: 188 B: 190 C: 182 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 278: A: 186 B: 179 C: 178 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 279: A: 186 B: 188 C: 179 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 280: A: 187 B: 178 C: 180 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 281: A: 187 B: 186 C: 178 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 282: A: 189 B: 180 C: 181 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 283: A: 189 B: 187 C: 180 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 284: A: 191 B: 181 C: 183 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 285: A: 191 B: 189 C: 181 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 286: A: 193 B: 183 C: 185 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 287: A: 193 B: 191 C: 183 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 288: A: 194 B: 195 C: 196 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 289: A: 194 B: 197 C: 195 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 290: A: 198 B: 196 C: 195 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 291: A: 198 B: 199 C: 196 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 292: A: 198 B: 200 C: 199 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 293: A: 198 B: 201 C: 200 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 294: A: 198 B: 202 C: 201 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 295: A: 203 B: 197 C: 194 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 296: A: 203 B: 194 C: 204 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 297: A: 203 B: 204 C: 205 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 298: A: 203 B: 205 C: 206 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 299: A: 203 B: 206 C: 207 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 300: A: 204 B: 196 C: 199 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 301: A: 204 B: 194 C: 196 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 302: A: 205 B: 199 C: 200 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 303: A: 205 B: 204 C: 199 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 304: A: 206 B: 200 C: 201 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 305: A: 206 B: 205 C: 200 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 306: A: 207 B: 201 C: 202 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 307: A: 207 B: 206 C: 201 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 308: A: 208 B: 209 C: 210 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 309: A: 208 B: 211 C: 209 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 310: A: 208 B: 212 C: 211 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 311: A: 208 B: 213 C: 212 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 312: A: 213 B: 214 C: 212 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 313: A: 213 B: 215 C: 214 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 314: A: 213 B: 216 C: 215 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 315: A: 213 B: 198 C: 216 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 316: A: 209 B: 217 C: 210 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 317: A: 217 B: 218 C: 210 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 318: A: 217 B: 219 C: 218 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 319: A: 213 B: 220 C: 198 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 320: A: 220 B: 221 C: 198 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 321: A: 221 B: 202 C: 198 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 322: A: 222 B: 223 C: 224 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 323: A: 222 B: 224 C: 225 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 324: A: 222 B: 225 C: 226 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 325: A: 222 B: 226 C: 227 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 326: A: 227 B: 226 C: 228 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 327: A: 227 B: 228 C: 229 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 328: A: 227 B: 229 C: 230 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 329: A: 227 B: 230 C: 203 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 330: A: 224 B: 223 C: 231 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 331: A: 231 B: 223 C: 232 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 332: A: 231 B: 232 C: 233 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 333: A: 227 B: 203 C: 234 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 334: A: 234 B: 203 C: 235 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 335: A: 235 B: 203 C: 207 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 336: A: 235 B: 202 C: 221 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 337: A: 235 B: 207 C: 202 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 338: A: 234 B: 221 C: 220 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 339: A: 234 B: 235 C: 221 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 340: A: 227 B: 220 C: 213 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 341: A: 227 B: 234 C: 220 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 342: A: 222 B: 213 C: 208 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 343: A: 222 B: 227 C: 213 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 344: A: 223 B: 208 C: 210 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 345: A: 223 B: 222 C: 208 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 346: A: 232 B: 210 C: 218 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 347: A: 232 B: 223 C: 210 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 348: A: 233 B: 218 C: 219 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 349: A: 233 B: 232 C: 218 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 350: A: 231 B: 219 C: 217 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 351: A: 231 B: 233 C: 219 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 352: A: 224 B: 217 C: 209 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 353: A: 224 B: 231 C: 217 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 354: A: 225 B: 209 C: 211 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 355: A: 225 B: 224 C: 209 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 356: A: 226 B: 211 C: 212 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 357: A: 226 B: 225 C: 211 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 358: A: 228 B: 212 C: 214 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 359: A: 228 B: 226 C: 212 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 360: A: 229 B: 214 C: 215 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 361: A: 229 B: 228 C: 214 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 362: A: 230 B: 215 C: 216 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 363: A: 230 B: 229 C: 215 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 364: A: 203 B: 216 C: 198 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- *MESH_FACE 365: A: 203 B: 230 C: 216 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
- }
- *MESH_NORMALS {
- *MESH_FACENORMAL 0 -0.980093 0.155663 -0.123234
- *MESH_VERTEXNORMAL 0 -0.980093 0.155663 -0.123234
- *MESH_VERTEXNORMAL 1 -0.988970 0.078070 -0.125869
- *MESH_VERTEXNORMAL 2 -0.991289 0.042930 -0.124512
- *MESH_FACENORMAL 1 -0.991808 -0.000000 -0.127736
- *MESH_VERTEXNORMAL 1 -0.988970 0.078070 -0.125869
- *MESH_VERTEXNORMAL 3 -0.990420 0.008350 -0.137834
- *MESH_VERTEXNORMAL 2 -0.991289 0.042930 -0.124512
- *MESH_FACENORMAL 2 -0.988860 0.016699 -0.147909
- *MESH_VERTEXNORMAL 3 -0.990420 0.008350 -0.137834
- *MESH_VERTEXNORMAL 4 -0.992673 -0.015634 -0.119813
- *MESH_VERTEXNORMAL 2 -0.991289 0.042930 -0.124512
- *MESH_FACENORMAL 3 -0.995185 -0.001043 -0.098013
- *MESH_VERTEXNORMAL 4 -0.992673 -0.015634 -0.119813
- *MESH_VERTEXNORMAL 5 -0.995096 -0.013415 -0.098004
- *MESH_VERTEXNORMAL 2 -0.991289 0.042930 -0.124512
- *MESH_FACENORMAL 4 -0.994854 -0.025784 -0.097980
- *MESH_VERTEXNORMAL 4 -0.992673 -0.015634 -0.119813
- *MESH_VERTEXNORMAL 6 -0.992415 -0.039089 -0.116554
- *MESH_VERTEXNORMAL 5 -0.995096 -0.013415 -0.098004
- *MESH_FACENORMAL 5 -0.989452 -0.052372 -0.135066
- *MESH_VERTEXNORMAL 4 -0.992673 -0.015634 -0.119813
- *MESH_VERTEXNORMAL 7 -0.989452 -0.052372 -0.135066
- *MESH_VERTEXNORMAL 6 -0.992415 -0.039089 -0.116554
- *MESH_FACENORMAL 6 0.980093 0.155663 -0.123234
- *MESH_VERTEXNORMAL 8 0.980093 0.155663 -0.123234
- *MESH_VERTEXNORMAL 9 0.991289 0.042930 -0.124512
- *MESH_VERTEXNORMAL 10 0.988970 0.078070 -0.125869
- *MESH_FACENORMAL 7 0.991808 0.000000 -0.127736
- *MESH_VERTEXNORMAL 10 0.988970 0.078070 -0.125869
- *MESH_VERTEXNORMAL 9 0.991289 0.042930 -0.124512
- *MESH_VERTEXNORMAL 11 0.990420 0.008350 -0.137834
- *MESH_FACENORMAL 8 0.988860 0.016699 -0.147909
- *MESH_VERTEXNORMAL 11 0.990420 0.008350 -0.137834
- *MESH_VERTEXNORMAL 9 0.991289 0.042930 -0.124512
- *MESH_VERTEXNORMAL 12 0.992673 -0.015634 -0.119813
- *MESH_FACENORMAL 9 0.995185 -0.001043 -0.098013
- *MESH_VERTEXNORMAL 12 0.992673 -0.015634 -0.119813
- *MESH_VERTEXNORMAL 9 0.991289 0.042930 -0.124512
- *MESH_VERTEXNORMAL 13 0.995096 -0.013415 -0.098004
- *MESH_FACENORMAL 10 0.994854 -0.025784 -0.097980
- *MESH_VERTEXNORMAL 12 0.992673 -0.015634 -0.119813
- *MESH_VERTEXNORMAL 13 0.995096 -0.013415 -0.098004
- *MESH_VERTEXNORMAL 14 0.992415 -0.039089 -0.116554
- *MESH_FACENORMAL 11 0.989452 -0.052372 -0.135065
- *MESH_VERTEXNORMAL 12 0.992673 -0.015634 -0.119813
- *MESH_VERTEXNORMAL 14 0.992415 -0.039089 -0.116554
- *MESH_VERTEXNORMAL 15 0.989452 -0.052372 -0.135065
- *MESH_FACENORMAL 12 0.000000 -0.535053 -0.844819
- *MESH_VERTEXNORMAL 11 0.000000 -0.369678 -0.929160
- *MESH_VERTEXNORMAL 4 0.000000 -0.479227 -0.877691
- *MESH_VERTEXNORMAL 3 0.000000 -0.184839 -0.982769
- *MESH_FACENORMAL 13 0.000000 -0.535053 -0.844819
- *MESH_VERTEXNORMAL 11 0.000000 -0.369678 -0.929160
- *MESH_VERTEXNORMAL 12 0.000000 -0.421141 -0.906995
- *MESH_VERTEXNORMAL 4 0.000000 -0.479227 -0.877691
- *MESH_FACENORMAL 14 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 10 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 3 0.000000 -0.184839 -0.982769
- *MESH_VERTEXNORMAL 1 0.000000 0.000000 -1.000000
- *MESH_FACENORMAL 15 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 10 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 11 0.000000 -0.369678 -0.929160
- *MESH_VERTEXNORMAL 3 0.000000 -0.184839 -0.982769
- *MESH_FACENORMAL 16 0.000000 0.973080 -0.230467
- *MESH_VERTEXNORMAL 8 0.000000 0.973080 -0.230467
- *MESH_VERTEXNORMAL 1 0.000000 0.973080 -0.230467
- *MESH_VERTEXNORMAL 0 0.000000 0.973080 -0.230467
- *MESH_FACENORMAL 17 0.000000 0.973080 -0.230467
- *MESH_VERTEXNORMAL 8 0.000000 0.973080 -0.230467
- *MESH_VERTEXNORMAL 10 0.000000 0.973080 -0.230467
- *MESH_VERTEXNORMAL 1 0.000000 0.973080 -0.230467
- *MESH_FACENORMAL 18 0.000000 0.813734 0.581237
- *MESH_VERTEXNORMAL 9 0.000000 0.813734 0.581237
- *MESH_VERTEXNORMAL 0 0.000000 0.813734 0.581237
- *MESH_VERTEXNORMAL 2 0.000000 0.813734 0.581237
- *MESH_FACENORMAL 19 0.000000 0.813734 0.581237
- *MESH_VERTEXNORMAL 9 0.000000 0.813734 0.581237
- *MESH_VERTEXNORMAL 8 0.000000 0.813734 0.581237
- *MESH_VERTEXNORMAL 0 0.000000 0.813734 0.581237
- *MESH_FACENORMAL 20 0.000000 0.010638 0.999943
- *MESH_VERTEXNORMAL 13 0.000000 0.092548 0.995708
- *MESH_VERTEXNORMAL 2 0.000000 0.010638 0.999943
- *MESH_VERTEXNORMAL 5 0.000000 0.174385 0.984677
- *MESH_FACENORMAL 21 0.000000 0.010638 0.999943
- *MESH_VERTEXNORMAL 13 0.000000 0.092548 0.995708
- *MESH_VERTEXNORMAL 9 0.000000 0.010638 0.999943
- *MESH_VERTEXNORMAL 2 0.000000 0.010638 0.999943
- *MESH_FACENORMAL 22 0.000000 0.254494 0.967074
- *MESH_VERTEXNORMAL 14 0.000000 0.254493 0.967075
- *MESH_VERTEXNORMAL 5 0.000000 0.174385 0.984677
- *MESH_VERTEXNORMAL 6 0.000000 0.254494 0.967074
- *MESH_FACENORMAL 23 0.000000 0.254493 0.967074
- *MESH_VERTEXNORMAL 14 0.000000 0.254493 0.967075
- *MESH_VERTEXNORMAL 13 0.000000 0.092548 0.995708
- *MESH_VERTEXNORMAL 5 0.000000 0.174385 0.984677
- *MESH_FACENORMAL 24 0.000000 -0.588171 0.808737
- *MESH_VERTEXNORMAL 15 0.000000 -0.588171 0.808737
- *MESH_VERTEXNORMAL 6 0.000000 -0.588171 0.808737
- *MESH_VERTEXNORMAL 7 0.000000 -0.588171 0.808737
- *MESH_FACENORMAL 25 0.000000 -0.588171 0.808737
- *MESH_VERTEXNORMAL 15 0.000000 -0.588171 0.808737
- *MESH_VERTEXNORMAL 14 0.000000 -0.588171 0.808737
- *MESH_VERTEXNORMAL 6 0.000000 -0.588171 0.808737
- *MESH_FACENORMAL 26 0.000000 -0.361528 -0.932361
- *MESH_VERTEXNORMAL 12 0.000000 -0.421141 -0.906995
- *MESH_VERTEXNORMAL 7 0.000000 -0.361528 -0.932361
- *MESH_VERTEXNORMAL 4 0.000000 -0.479227 -0.877691
- *MESH_FACENORMAL 27 0.000000 -0.361528 -0.932361
- *MESH_VERTEXNORMAL 12 0.000000 -0.421141 -0.906995
- *MESH_VERTEXNORMAL 15 0.000000 -0.361528 -0.932361
- *MESH_VERTEXNORMAL 7 0.000000 -0.361528 -0.932361
- *MESH_FACENORMAL 28 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 16 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 17 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 18 -1.000000 0.000000 0.000000
- *MESH_FACENORMAL 29 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 18 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 19 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 16 -1.000000 0.000000 0.000000
- *MESH_FACENORMAL 30 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 17 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 20 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 21 0.000000 1.000000 0.000000
- *MESH_FACENORMAL 31 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 21 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 18 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 17 0.000000 1.000000 0.000000
- *MESH_FACENORMAL 32 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 20 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 22 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 23 1.000000 0.000000 -0.000000
- *MESH_FACENORMAL 33 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 23 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 21 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 20 1.000000 0.000000 -0.000000
- *MESH_FACENORMAL 34 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 22 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 16 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 19 0.000000 -1.000000 0.000000
- *MESH_FACENORMAL 35 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 19 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 23 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 22 0.000000 -1.000000 0.000000
- *MESH_FACENORMAL 36 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 24 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 25 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 26 0.000000 0.000000 -1.000000
- *MESH_FACENORMAL 37 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 24 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 27 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 25 0.000000 0.000000 -1.000000
- *MESH_FACENORMAL 38 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 24 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 28 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 27 0.000000 0.000000 -1.000000
- *MESH_FACENORMAL 39 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 24 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 29 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 28 0.000000 0.000000 -1.000000
- *MESH_FACENORMAL 40 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 24 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 30 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 29 0.000000 0.000000 -1.000000
- *MESH_FACENORMAL 41 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 24 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 31 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 30 0.000000 0.000000 -1.000000
- *MESH_FACENORMAL 42 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 24 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 32 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 31 0.000000 0.000000 -1.000000
- *MESH_FACENORMAL 43 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 24 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 33 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 32 0.000000 0.000000 -1.000000
- *MESH_FACENORMAL 44 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 24 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 34 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 33 0.000000 0.000000 -1.000000
- *MESH_FACENORMAL 45 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 24 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 35 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 34 0.000000 0.000000 -1.000000
- *MESH_FACENORMAL 46 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 24 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 36 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 35 0.000000 0.000000 -1.000000
- *MESH_FACENORMAL 47 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 24 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 26 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 36 0.000000 0.000000 -1.000000
- *MESH_FACENORMAL 48 -0.000000 -0.078459 0.996917
- *MESH_VERTEXNORMAL 37 0.000000 -0.078458 0.996917
- *MESH_VERTEXNORMAL 38 0.000000 -0.078458 0.996917
- *MESH_VERTEXNORMAL 39 0.000000 -0.078458 0.996917
- *MESH_FACENORMAL 49 0.000000 -0.078458 0.996917
- *MESH_VERTEXNORMAL 37 0.000000 -0.078458 0.996917
- *MESH_VERTEXNORMAL 39 0.000000 -0.078458 0.996917
- *MESH_VERTEXNORMAL 40 0.000000 -0.078458 0.996917
- *MESH_FACENORMAL 50 -0.382647 0.919854 0.086316
- *MESH_VERTEXNORMAL 41 -0.603716 0.793712 0.074479
- *MESH_VERTEXNORMAL 37 -0.797151 0.601139 0.056409
- *MESH_VERTEXNORMAL 40 -0.136759 0.986272 0.092548
- *MESH_FACENORMAL 51 -0.382647 0.919854 0.086316
- *MESH_VERTEXNORMAL 41 -0.603716 0.793712 0.074479
- *MESH_VERTEXNORMAL 40 -0.136759 0.986272 0.092548
- *MESH_VERTEXNORMAL 42 0.136759 0.986272 0.092548
- *MESH_FACENORMAL 52 -0.000003 0.078465 -0.996917
- *MESH_VERTEXNORMAL 43 -0.000004 0.078463 -0.996917
- *MESH_VERTEXNORMAL 41 -0.000004 0.078462 -0.996917
- *MESH_VERTEXNORMAL 42 -0.000001 0.078465 -0.996917
- *MESH_FACENORMAL 53 -0.000002 0.078464 -0.996917
- *MESH_VERTEXNORMAL 43 -0.000004 0.078463 -0.996917
- *MESH_VERTEXNORMAL 42 -0.000001 0.078465 -0.996917
- *MESH_VERTEXNORMAL 44 0.000001 0.078465 -0.996917
- *MESH_FACENORMAL 54 0.382648 -0.919854 -0.086314
- *MESH_VERTEXNORMAL 38 0.603716 -0.793713 -0.074479
- *MESH_VERTEXNORMAL 43 0.797151 -0.601139 -0.056408
- *MESH_VERTEXNORMAL 44 0.136758 -0.986272 -0.092549
- *MESH_FACENORMAL 55 0.382645 -0.919855 -0.086317
- *MESH_VERTEXNORMAL 38 0.382646 -0.919854 -0.086316
- *MESH_VERTEXNORMAL 44 0.136758 -0.986272 -0.092549
- *MESH_VERTEXNORMAL 39 -0.136759 -0.986272 -0.092549
- *MESH_FACENORMAL 56 0.000000 -0.078457 0.996917
- *MESH_VERTEXNORMAL 45 0.000000 -0.078708 0.996898
- *MESH_VERTEXNORMAL 46 -0.000391 -0.079080 0.996868
- *MESH_VERTEXNORMAL 38 0.000000 -0.078458 0.996917
- *MESH_FACENORMAL 57 0.000001 -0.078458 0.996917
- *MESH_VERTEXNORMAL 45 0.000000 -0.078708 0.996898
- *MESH_VERTEXNORMAL 38 0.000000 -0.078458 0.996917
- *MESH_VERTEXNORMAL 37 0.000000 -0.078458 0.996917
- *MESH_FACENORMAL 58 -0.923864 0.381046 0.035756
- *MESH_VERTEXNORMAL 47 -0.923864 0.381047 0.035756
- *MESH_VERTEXNORMAL 45 -0.923864 0.381046 0.035756
- *MESH_VERTEXNORMAL 37 -0.797151 0.601139 0.056409
- *MESH_FACENORMAL 59 -0.923864 0.381047 0.035756
- *MESH_VERTEXNORMAL 47 -0.923864 0.381047 0.035756
- *MESH_VERTEXNORMAL 37 -0.797151 0.601139 0.056409
- *MESH_VERTEXNORMAL 41 -0.603716 0.793712 0.074479
- *MESH_FACENORMAL 60 0.000000 0.078460 -0.996917
- *MESH_VERTEXNORMAL 48 -0.000003 0.075292 -0.997162
- *MESH_VERTEXNORMAL 47 -0.027991 0.033420 -0.999049
- *MESH_VERTEXNORMAL 41 -0.000004 0.078462 -0.996917
- *MESH_FACENORMAL 61 -0.000008 0.078460 -0.996917
- *MESH_VERTEXNORMAL 48 -0.000003 0.075292 -0.997162
- *MESH_VERTEXNORMAL 41 -0.000004 0.078462 -0.996917
- *MESH_VERTEXNORMAL 43 -0.000004 0.078463 -0.996917
- *MESH_FACENORMAL 62 0.923864 -0.381047 -0.035756
- *MESH_VERTEXNORMAL 46 0.923864 -0.381047 -0.035756
- *MESH_VERTEXNORMAL 48 0.923864 -0.381047 -0.035756
- *MESH_VERTEXNORMAL 43 0.797151 -0.601139 -0.056408
- *MESH_FACENORMAL 63 0.923864 -0.381046 -0.035755
- *MESH_VERTEXNORMAL 46 0.923864 -0.381047 -0.035756
- *MESH_VERTEXNORMAL 43 0.797151 -0.601139 -0.056408
- *MESH_VERTEXNORMAL 38 0.707079 -0.704042 -0.066064
- *MESH_FACENORMAL 64 -0.001172 -0.079572 0.996828
- *MESH_VERTEXNORMAL 49 -0.010725 -0.079447 0.996781
- *MESH_VERTEXNORMAL 50 0.097286 -0.051915 0.993902
- *MESH_VERTEXNORMAL 46 -0.000391 -0.079080 0.996868
- *MESH_FACENORMAL 65 0.000000 -0.079210 0.996858
- *MESH_VERTEXNORMAL 49 -0.010725 -0.079447 0.996781
- *MESH_VERTEXNORMAL 46 -0.000391 -0.079080 0.996868
- *MESH_VERTEXNORMAL 45 0.000000 -0.078708 0.996898
- *MESH_FACENORMAL 66 -0.887281 -0.459720 0.037277
- *MESH_VERTEXNORMAL 51 -0.895445 -0.445169 -0.001529
- *MESH_VERTEXNORMAL 49 -0.887281 -0.459720 0.037277
- *MESH_VERTEXNORMAL 45 -0.895445 -0.445169 -0.001529
- *MESH_FACENORMAL 67 -0.902011 -0.429825 -0.040333
- *MESH_VERTEXNORMAL 51 -0.895445 -0.445169 -0.001529
- *MESH_VERTEXNORMAL 45 -0.895445 -0.445169 -0.001529
- *MESH_VERTEXNORMAL 47 -0.902011 -0.429825 -0.040333
- *MESH_FACENORMAL 68 -0.083771 -0.047396 -0.995357
- *MESH_VERTEXNORMAL 52 0.078289 -0.007996 -0.996899
- *MESH_VERTEXNORMAL 51 0.067704 -0.029591 -0.997266
- *MESH_VERTEXNORMAL 47 -0.027991 0.033420 -0.999049
- *MESH_FACENORMAL 69 0.000000 0.068952 -0.997620
- *MESH_VERTEXNORMAL 52 0.078289 -0.007996 -0.996899
- *MESH_VERTEXNORMAL 47 -0.027991 0.033420 -0.999049
- *MESH_VERTEXNORMAL 48 -0.000003 0.075292 -0.997162
- *MESH_FACENORMAL 70 0.766684 0.642019 0.002663
- *MESH_VERTEXNORMAL 50 0.746365 0.664691 0.033554
- *MESH_VERTEXNORMAL 52 0.766684 0.642019 0.002663
- *MESH_VERTEXNORMAL 48 0.746365 0.664691 0.033554
- *MESH_FACENORMAL 71 0.724642 0.686112 0.064382
- *MESH_VERTEXNORMAL 50 0.746365 0.664691 0.033554
- *MESH_VERTEXNORMAL 48 0.746365 0.664691 0.033554
- *MESH_VERTEXNORMAL 46 0.724642 0.686112 0.064382
- *MESH_FACENORMAL 72 0.320003 0.005508 0.947401
- *MESH_VERTEXNORMAL 53 0.112170 -0.023029 0.993422
- *MESH_VERTEXNORMAL 54 0.183466 0.005715 0.983010
- *MESH_VERTEXNORMAL 50 0.097286 -0.051915 0.993902
- *MESH_FACENORMAL 73 -0.030999 -0.079534 0.996350
- *MESH_VERTEXNORMAL 53 0.112170 -0.023029 0.993422
- *MESH_VERTEXNORMAL 50 0.097286 -0.051915 0.993902
- *MESH_VERTEXNORMAL 49 -0.010725 -0.079447 0.996781
- *MESH_FACENORMAL 74 -0.031172 0.005218 -0.999500
- *MESH_VERTEXNORMAL 55 0.024617 -0.011902 -0.999626
- *MESH_VERTEXNORMAL 56 -0.077821 -0.012476 -0.996889
- *MESH_VERTEXNORMAL 51 0.067704 -0.029591 -0.997266
- *MESH_FACENORMAL 75 0.314741 -0.045146 -0.948103
- *MESH_VERTEXNORMAL 55 0.024617 -0.011902 -0.999626
- *MESH_VERTEXNORMAL 51 0.067704 -0.029591 -0.997266
- *MESH_VERTEXNORMAL 52 0.078289 -0.007996 -0.996899
- *MESH_FACENORMAL 76 -0.909453 0.415805 0.001284
- *MESH_VERTEXNORMAL 54 -0.909566 0.415557 0.001503
- *MESH_VERTEXNORMAL 55 -0.909453 0.415805 0.001284
- *MESH_VERTEXNORMAL 52 -0.909566 0.415557 0.001503
- *MESH_FACENORMAL 77 -0.909679 0.415309 0.001722
- *MESH_VERTEXNORMAL 54 -0.909566 0.415557 0.001503
- *MESH_VERTEXNORMAL 52 -0.909566 0.415557 0.001503
- *MESH_VERTEXNORMAL 50 -0.909679 0.415309 0.001722
- *MESH_FACENORMAL 78 -0.463971 -0.070468 0.883043
- *MESH_VERTEXNORMAL 57 -0.144179 -0.049514 0.988312
- *MESH_VERTEXNORMAL 58 -0.158500 -0.078179 0.984259
- *MESH_VERTEXNORMAL 54 -0.218020 -0.033509 0.975369
- *MESH_FACENORMAL 79 0.043276 0.005808 0.999046
- *MESH_VERTEXNORMAL 57 -0.144179 -0.049514 0.988312
- *MESH_VERTEXNORMAL 54 -0.035557 -0.020888 0.999149
- *MESH_VERTEXNORMAL 53 0.112170 -0.023029 0.993422
- *MESH_FACENORMAL 80 0.010418 -0.047559 -0.998814
- *MESH_VERTEXNORMAL 59 -0.021311 -0.030183 -0.999317
- *MESH_VERTEXNORMAL 60 0.049539 -0.034144 -0.998188
- *MESH_VERTEXNORMAL 56 -0.077821 -0.012476 -0.996889
- *MESH_FACENORMAL 81 -0.211538 0.005102 -0.977357
- *MESH_VERTEXNORMAL 59 -0.021311 -0.030183 -0.999317
- *MESH_VERTEXNORMAL 56 -0.077821 -0.012476 -0.996889
- *MESH_VERTEXNORMAL 55 0.024617 -0.011902 -0.999626
- *MESH_FACENORMAL 82 0.909470 0.415767 0.001724
- *MESH_VERTEXNORMAL 58 0.909588 0.415509 0.001503
- *MESH_VERTEXNORMAL 59 0.909470 0.415767 0.001724
- *MESH_VERTEXNORMAL 55 0.909588 0.415509 0.001503
- *MESH_FACENORMAL 83 0.909706 0.415251 0.001282
- *MESH_VERTEXNORMAL 58 0.909588 0.415509 0.001503
- *MESH_VERTEXNORMAL 55 0.909588 0.415509 0.001503
- *MESH_VERTEXNORMAL 54 0.909706 0.415251 0.001282
- *MESH_FACENORMAL 84 0.000000 -0.078461 0.996917
- *MESH_VERTEXNORMAL 61 0.000236 -0.078830 0.996888
- *MESH_VERTEXNORMAL 62 -0.000001 -0.078459 0.996917
- *MESH_VERTEXNORMAL 58 -0.158500 -0.078179 0.984259
- *MESH_FACENORMAL 85 0.000708 -0.079572 0.996829
- *MESH_VERTEXNORMAL 61 0.000236 -0.078830 0.996888
- *MESH_VERTEXNORMAL 58 -0.158500 -0.078179 0.984259
- *MESH_VERTEXNORMAL 57 -0.144179 -0.049514 0.988312
- *MESH_FACENORMAL 86 0.889663 -0.454621 -0.042660
- *MESH_VERTEXNORMAL 63 0.896798 -0.442423 -0.003922
- *MESH_VERTEXNORMAL 61 0.889663 -0.454621 -0.042660
- *MESH_VERTEXNORMAL 57 0.896798 -0.442423 -0.003922
- *MESH_FACENORMAL 87 0.902408 -0.429473 0.034823
- *MESH_VERTEXNORMAL 63 0.896798 -0.442423 -0.003922
- *MESH_VERTEXNORMAL 57 0.896798 -0.442423 -0.003922
- *MESH_VERTEXNORMAL 60 0.902408 -0.429473 0.034823
- *MESH_FACENORMAL 88 0.000000 -0.007540 -0.999972
- *MESH_VERTEXNORMAL 64 0.046121 0.007963 -0.998904
- *MESH_VERTEXNORMAL 63 0.000002 0.049834 -0.998757
- *MESH_VERTEXNORMAL 60 0.049539 -0.034144 -0.998188
- *MESH_FACENORMAL 89 0.137879 -0.047113 -0.989328
- *MESH_VERTEXNORMAL 64 0.046121 0.007963 -0.998904
- *MESH_VERTEXNORMAL 60 0.049539 -0.034144 -0.998188
- *MESH_VERTEXNORMAL 59 -0.021311 -0.030183 -0.999317
- *MESH_FACENORMAL 90 -0.767254 0.638539 0.059918
- *MESH_VERTEXNORMAL 62 -0.746219 0.664959 0.031421
- *MESH_VERTEXNORMAL 64 -0.767254 0.638539 0.059918
- *MESH_VERTEXNORMAL 59 -0.746219 0.664959 0.031421
- *MESH_FACENORMAL 91 -0.723727 0.690081 0.002862
- *MESH_VERTEXNORMAL 62 -0.746219 0.664959 0.031421
- *MESH_VERTEXNORMAL 59 -0.746219 0.664959 0.031421
- *MESH_VERTEXNORMAL 58 -0.723727 0.690081 0.002862
- *MESH_FACENORMAL 92 -0.000002 -0.078458 0.996917
- *MESH_VERTEXNORMAL 65 -0.000001 -0.078458 0.996917
- *MESH_VERTEXNORMAL 66 -0.000000 -0.078458 0.996917
- *MESH_VERTEXNORMAL 62 -0.000001 -0.078459 0.996917
- *MESH_FACENORMAL 93 0.000000 -0.078458 0.996917
- *MESH_VERTEXNORMAL 65 -0.000001 -0.078458 0.996917
- *MESH_VERTEXNORMAL 62 -0.000001 -0.078459 0.996917
- *MESH_VERTEXNORMAL 61 0.000236 -0.078830 0.996888
- *MESH_FACENORMAL 94 0.923864 0.381047 0.035756
- *MESH_VERTEXNORMAL 67 0.797151 0.601139 0.056409
- *MESH_VERTEXNORMAL 65 0.603716 0.793712 0.074479
- *MESH_VERTEXNORMAL 61 0.923864 0.381047 0.035756
- *MESH_FACENORMAL 95 0.923864 0.381046 0.035756
- *MESH_VERTEXNORMAL 67 0.797151 0.601139 0.056409
- *MESH_VERTEXNORMAL 61 0.923864 0.381047 0.035756
- *MESH_VERTEXNORMAL 63 0.923864 0.381046 0.035756
- *MESH_FACENORMAL 96 0.000005 0.078463 -0.996917
- *MESH_VERTEXNORMAL 68 0.000003 0.078462 -0.996917
- *MESH_VERTEXNORMAL 67 0.000004 0.078464 -0.996917
- *MESH_VERTEXNORMAL 63 0.000002 0.049834 -0.998757
- *MESH_FACENORMAL 97 0.000000 0.078457 -0.996917
- *MESH_VERTEXNORMAL 68 0.000003 0.078462 -0.996917
- *MESH_VERTEXNORMAL 63 0.000002 0.049834 -0.998757
- *MESH_VERTEXNORMAL 64 0.046121 0.007963 -0.998904
- *MESH_FACENORMAL 98 -0.923864 -0.381047 -0.035756
- *MESH_VERTEXNORMAL 66 -0.923864 -0.381047 -0.035756
- *MESH_VERTEXNORMAL 68 -0.707079 -0.704042 -0.066065
- *MESH_VERTEXNORMAL 64 -0.923864 -0.381047 -0.035756
- *MESH_FACENORMAL 99 -0.923864 -0.381046 -0.035756
- *MESH_VERTEXNORMAL 66 -0.923864 -0.381047 -0.035756
- *MESH_VERTEXNORMAL 64 -0.923864 -0.381047 -0.035756
- *MESH_VERTEXNORMAL 62 -0.923864 -0.381046 -0.035756
- *MESH_FACENORMAL 100 0.000001 -0.078458 0.996917
- *MESH_VERTEXNORMAL 40 0.000000 -0.078458 0.996917
- *MESH_VERTEXNORMAL 39 0.000000 -0.078458 0.996917
- *MESH_VERTEXNORMAL 66 -0.000000 -0.078458 0.996917
- *MESH_FACENORMAL 101 -0.000000 -0.078459 0.996917
- *MESH_VERTEXNORMAL 40 0.000000 -0.078458 0.996917
- *MESH_VERTEXNORMAL 66 -0.000000 -0.078458 0.996917
- *MESH_VERTEXNORMAL 65 -0.000001 -0.078458 0.996917
- *MESH_FACENORMAL 102 0.382647 0.919854 0.086316
- *MESH_VERTEXNORMAL 42 0.136759 0.986272 0.092548
- *MESH_VERTEXNORMAL 40 -0.136759 0.986272 0.092548
- *MESH_VERTEXNORMAL 65 0.603716 0.793712 0.074479
- *MESH_FACENORMAL 103 0.382647 0.919854 0.086316
- *MESH_VERTEXNORMAL 42 0.136759 0.986272 0.092548
- *MESH_VERTEXNORMAL 65 0.603716 0.793712 0.074479
- *MESH_VERTEXNORMAL 67 0.797151 0.601139 0.056409
- *MESH_FACENORMAL 104 0.000003 0.078464 -0.996917
- *MESH_VERTEXNORMAL 44 0.000001 0.078465 -0.996917
- *MESH_VERTEXNORMAL 42 -0.000001 0.078465 -0.996917
- *MESH_VERTEXNORMAL 67 0.000004 0.078464 -0.996917
- *MESH_FACENORMAL 105 0.000003 0.078465 -0.996917
- *MESH_VERTEXNORMAL 44 0.000001 0.078465 -0.996917
- *MESH_VERTEXNORMAL 67 0.000004 0.078464 -0.996917
- *MESH_VERTEXNORMAL 68 0.000003 0.078462 -0.996917
- *MESH_FACENORMAL 106 -0.382648 -0.919853 -0.086317
- *MESH_VERTEXNORMAL 39 -0.136759 -0.986272 -0.092549
- *MESH_VERTEXNORMAL 44 0.136758 -0.986272 -0.092549
- *MESH_VERTEXNORMAL 68 -0.603716 -0.793713 -0.074479
- *MESH_FACENORMAL 107 -0.382645 -0.919855 -0.086315
- *MESH_VERTEXNORMAL 39 -0.136759 -0.986272 -0.092549
- *MESH_VERTEXNORMAL 68 -0.382646 -0.919854 -0.086316
- *MESH_VERTEXNORMAL 66 -0.382645 -0.919855 -0.086315
- *MESH_FACENORMAL 108 -0.707106 0.707107 0.000000
- *MESH_VERTEXNORMAL 69 -0.707107 0.707106 -0.000000
- *MESH_VERTEXNORMAL 70 -0.707107 0.707106 -0.000000
- *MESH_VERTEXNORMAL 71 -0.707106 0.707107 0.000000
- *MESH_FACENORMAL 109 -0.707108 0.707106 -0.000001
- *MESH_VERTEXNORMAL 69 -0.707107 0.707106 -0.000000
- *MESH_VERTEXNORMAL 72 -0.707108 0.707106 -0.000001
- *MESH_VERTEXNORMAL 70 -0.707107 0.707106 -0.000000
- *MESH_FACENORMAL 110 0.707110 0.707104 -0.000000
- *MESH_VERTEXNORMAL 73 0.707109 0.707104 -0.000000
- *MESH_VERTEXNORMAL 69 0.707109 0.707104 -0.000000
- *MESH_VERTEXNORMAL 71 0.707110 0.707104 -0.000000
- *MESH_FACENORMAL 111 0.707109 0.707104 0.000000
- *MESH_VERTEXNORMAL 73 0.707109 0.707104 -0.000000
- *MESH_VERTEXNORMAL 74 0.707109 0.707104 0.000000
- *MESH_VERTEXNORMAL 69 0.707109 0.707104 -0.000000
- *MESH_FACENORMAL 112 0.707109 0.707105 -0.000003
- *MESH_VERTEXNORMAL 75 0.707108 0.707106 -0.000001
- *MESH_VERTEXNORMAL 76 0.707108 0.707106 -0.000001
- *MESH_VERTEXNORMAL 77 0.707109 0.707105 -0.000003
- *MESH_FACENORMAL 113 0.707107 0.707107 0.000000
- *MESH_VERTEXNORMAL 75 0.707108 0.707106 -0.000001
- *MESH_VERTEXNORMAL 78 0.707107 0.707107 0.000000
- *MESH_VERTEXNORMAL 76 0.707108 0.707106 -0.000001
- *MESH_FACENORMAL 114 -0.707109 0.707105 -0.000003
- *MESH_VERTEXNORMAL 79 -0.707108 0.707106 -0.000001
- *MESH_VERTEXNORMAL 75 -0.707108 0.707106 -0.000001
- *MESH_VERTEXNORMAL 80 -0.707109 0.707105 -0.000003
- *MESH_FACENORMAL 115 -0.707106 0.707107 -0.000000
- *MESH_VERTEXNORMAL 79 -0.707108 0.707106 -0.000001
- *MESH_VERTEXNORMAL 78 -0.707106 0.707107 -0.000000
- *MESH_VERTEXNORMAL 75 -0.707108 0.707106 -0.000001
- *MESH_FACENORMAL 116 -0.000001 0.968147 -0.250382
- *MESH_VERTEXNORMAL 74 -0.000001 0.968147 -0.250382
- *MESH_VERTEXNORMAL 73 -0.000001 0.968147 -0.250382
- *MESH_VERTEXNORMAL 81 -0.000001 0.968147 -0.250381
- *MESH_FACENORMAL 117 -0.000001 0.968147 -0.250381
- *MESH_VERTEXNORMAL 81 -0.000001 0.968147 -0.250381
- *MESH_VERTEXNORMAL 82 -0.000002 0.968148 -0.250380
- *MESH_VERTEXNORMAL 74 -0.000001 0.968147 -0.250382
- *MESH_FACENORMAL 118 0.499999 0.216832 0.838442
- *MESH_VERTEXNORMAL 82 0.500000 0.216834 0.838441
- *MESH_VERTEXNORMAL 69 0.500000 0.216834 0.838441
- *MESH_VERTEXNORMAL 74 0.499999 0.216832 0.838442
- *MESH_FACENORMAL 119 0.500000 0.216835 0.838440
- *MESH_VERTEXNORMAL 82 0.500000 0.216834 0.838441
- *MESH_VERTEXNORMAL 83 0.500000 0.216835 0.838440
- *MESH_VERTEXNORMAL 69 0.500000 0.216834 0.838441
- *MESH_FACENORMAL 120 0.500000 0.216836 0.838440
- *MESH_VERTEXNORMAL 83 0.500000 0.216835 0.838440
- *MESH_VERTEXNORMAL 84 0.500000 0.216836 0.838440
- *MESH_VERTEXNORMAL 69 0.500000 0.216834 0.838441
- *MESH_FACENORMAL 121 -0.500000 -0.216835 -0.838440
- *MESH_VERTEXNORMAL 81 -0.500000 -0.216834 -0.838441
- *MESH_VERTEXNORMAL 71 -0.500000 -0.216835 -0.838441
- *MESH_VERTEXNORMAL 85 -0.500000 -0.216835 -0.838440
- *MESH_FACENORMAL 122 -0.500000 -0.216836 -0.838441
- *MESH_VERTEXNORMAL 71 -0.500000 -0.216835 -0.838441
- *MESH_VERTEXNORMAL 86 -0.500000 -0.216836 -0.838441
- *MESH_VERTEXNORMAL 85 -0.500000 -0.216835 -0.838440
- *MESH_FACENORMAL 123 -0.500000 -0.216833 -0.838441
- *MESH_VERTEXNORMAL 81 -0.500000 -0.216834 -0.838441
- *MESH_VERTEXNORMAL 73 -0.500000 -0.216833 -0.838441
- *MESH_VERTEXNORMAL 71 -0.500000 -0.216835 -0.838441
- *MESH_FACENORMAL 124 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 83 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 82 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 87 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 125 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 87 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 88 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 83 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 126 -0.000002 0.968148 -0.250380
- *MESH_VERTEXNORMAL 82 -0.000002 0.968148 -0.250380
- *MESH_VERTEXNORMAL 81 -0.000001 0.968147 -0.250381
- *MESH_VERTEXNORMAL 89 -0.000002 0.968148 -0.250380
- *MESH_FACENORMAL 127 -0.000002 0.968148 -0.250380
- *MESH_VERTEXNORMAL 89 -0.000002 0.968148 -0.250380
- *MESH_VERTEXNORMAL 87 0.000001 0.968147 -0.250381
- *MESH_VERTEXNORMAL 82 -0.000002 0.968148 -0.250380
- *MESH_FACENORMAL 128 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 81 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 85 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 90 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 129 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 90 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 89 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 81 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 130 0.499999 -0.216837 -0.838440
- *MESH_VERTEXNORMAL 78 0.500000 -0.216836 -0.838440
- *MESH_VERTEXNORMAL 87 0.500000 -0.216836 -0.838440
- *MESH_VERTEXNORMAL 76 0.499999 -0.216837 -0.838440
- *MESH_FACENORMAL 131 0.500000 -0.216835 -0.838440
- *MESH_VERTEXNORMAL 78 0.500000 -0.216836 -0.838440
- *MESH_VERTEXNORMAL 88 0.500000 -0.216835 -0.838440
- *MESH_VERTEXNORMAL 87 0.500000 -0.216836 -0.838440
- *MESH_FACENORMAL 132 0.500000 -0.216835 -0.838440
- *MESH_VERTEXNORMAL 78 0.500000 -0.216836 -0.838440
- *MESH_VERTEXNORMAL 91 0.500000 -0.216835 -0.838440
- *MESH_VERTEXNORMAL 88 0.500000 -0.216835 -0.838440
- *MESH_FACENORMAL 133 0.000007 0.968147 -0.250383
- *MESH_VERTEXNORMAL 77 0.000002 0.968147 -0.250382
- *MESH_VERTEXNORMAL 76 0.000007 0.968147 -0.250383
- *MESH_VERTEXNORMAL 87 0.000001 0.968147 -0.250381
- *MESH_FACENORMAL 134 -0.000003 0.968147 -0.250381
- *MESH_VERTEXNORMAL 87 0.000001 0.968147 -0.250381
- *MESH_VERTEXNORMAL 89 -0.000002 0.968148 -0.250380
- *MESH_VERTEXNORMAL 77 0.000002 0.968147 -0.250382
- *MESH_FACENORMAL 135 -0.500000 0.216836 0.838440
- *MESH_VERTEXNORMAL 92 -0.500000 0.216836 0.838440
- *MESH_VERTEXNORMAL 89 -0.500000 0.216835 0.838440
- *MESH_VERTEXNORMAL 90 -0.500000 0.216836 0.838440
- *MESH_FACENORMAL 136 -0.500000 0.216835 0.838440
- *MESH_VERTEXNORMAL 92 -0.500000 0.216836 0.838440
- *MESH_VERTEXNORMAL 75 -0.500001 0.216835 0.838440
- *MESH_VERTEXNORMAL 89 -0.500000 0.216835 0.838440
- *MESH_FACENORMAL 137 -0.500001 0.216834 0.838440
- *MESH_VERTEXNORMAL 75 -0.500001 0.216835 0.838440
- *MESH_VERTEXNORMAL 77 -0.500001 0.216834 0.838440
- *MESH_VERTEXNORMAL 89 -0.500000 0.216835 0.838440
- *MESH_FACENORMAL 138 -0.500000 -0.216835 -0.838440
- *MESH_VERTEXNORMAL 93 -0.500000 -0.216835 -0.838440
- *MESH_VERTEXNORMAL 79 -0.500000 -0.216835 -0.838440
- *MESH_VERTEXNORMAL 94 -0.500000 -0.216835 -0.838440
- *MESH_FACENORMAL 139 -0.500000 -0.216835 -0.838440
- *MESH_VERTEXNORMAL 93 -0.500000 -0.216835 -0.838440
- *MESH_VERTEXNORMAL 78 -0.500000 -0.216835 -0.838440
- *MESH_VERTEXNORMAL 79 -0.500000 -0.216835 -0.838440
- *MESH_FACENORMAL 140 -0.500000 -0.216835 -0.838440
- *MESH_VERTEXNORMAL 93 -0.500000 -0.216835 -0.838440
- *MESH_VERTEXNORMAL 91 -0.500000 -0.216835 -0.838440
- *MESH_VERTEXNORMAL 78 -0.500000 -0.216835 -0.838440
- *MESH_FACENORMAL 141 -0.000007 0.968147 -0.250384
- *MESH_VERTEXNORMAL 94 -0.000000 0.968147 -0.250381
- *MESH_VERTEXNORMAL 79 -0.000007 0.968147 -0.250384
- *MESH_VERTEXNORMAL 80 -0.000002 0.968147 -0.250382
- *MESH_FACENORMAL 142 0.000003 0.968147 -0.250381
- *MESH_VERTEXNORMAL 80 -0.000002 0.968147 -0.250382
- *MESH_VERTEXNORMAL 95 0.000002 0.968148 -0.250381
- *MESH_VERTEXNORMAL 94 -0.000000 0.968147 -0.250381
- *MESH_FACENORMAL 143 0.500000 0.216836 0.838441
- *MESH_VERTEXNORMAL 96 0.500000 0.216836 0.838441
- *MESH_VERTEXNORMAL 95 0.500000 0.216835 0.838440
- *MESH_VERTEXNORMAL 92 0.500000 0.216836 0.838440
- *MESH_FACENORMAL 144 0.500000 0.216835 0.838440
- *MESH_VERTEXNORMAL 95 0.500000 0.216835 0.838440
- *MESH_VERTEXNORMAL 75 0.500000 0.216835 0.838440
- *MESH_VERTEXNORMAL 92 0.500000 0.216836 0.838440
- *MESH_FACENORMAL 145 0.500000 0.216835 0.838440
- *MESH_VERTEXNORMAL 95 0.500000 0.216835 0.838440
- *MESH_VERTEXNORMAL 80 0.500000 0.216835 0.838440
- *MESH_VERTEXNORMAL 75 0.500000 0.216835 0.838440
- *MESH_FACENORMAL 146 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 93 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 94 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 97 -1.000000 0.000000 0.000000
- *MESH_FACENORMAL 147 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 97 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 98 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 93 -1.000000 0.000000 0.000000
- *MESH_FACENORMAL 148 0.000002 0.968148 -0.250380
- *MESH_VERTEXNORMAL 94 -0.000000 0.968147 -0.250381
- *MESH_VERTEXNORMAL 95 0.000002 0.968148 -0.250381
- *MESH_VERTEXNORMAL 99 0.000001 0.968147 -0.250381
- *MESH_FACENORMAL 149 0.000002 0.968148 -0.250380
- *MESH_VERTEXNORMAL 99 0.000001 0.968147 -0.250381
- *MESH_VERTEXNORMAL 97 0.000001 0.968148 -0.250381
- *MESH_VERTEXNORMAL 94 -0.000000 0.968147 -0.250381
- *MESH_FACENORMAL 150 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 95 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 96 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 100 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 151 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 100 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 99 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 95 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 152 -0.500001 0.216835 0.838440
- *MESH_VERTEXNORMAL 84 -0.500001 0.216835 0.838440
- *MESH_VERTEXNORMAL 72 -0.500000 0.216835 0.838440
- *MESH_VERTEXNORMAL 69 -0.500001 0.216835 0.838440
- *MESH_FACENORMAL 153 -0.500000 0.216835 0.838440
- *MESH_VERTEXNORMAL 84 -0.500001 0.216835 0.838440
- *MESH_VERTEXNORMAL 98 -0.500000 0.216836 0.838441
- *MESH_VERTEXNORMAL 72 -0.500000 0.216835 0.838440
- *MESH_FACENORMAL 154 -0.499999 0.216836 0.838441
- *MESH_VERTEXNORMAL 98 -0.500000 0.216836 0.838441
- *MESH_VERTEXNORMAL 97 -0.499999 0.216836 0.838441
- *MESH_VERTEXNORMAL 72 -0.500000 0.216835 0.838440
- *MESH_FACENORMAL 155 0.000001 0.968147 -0.250382
- *MESH_VERTEXNORMAL 99 0.000001 0.968147 -0.250381
- *MESH_VERTEXNORMAL 70 0.000001 0.968147 -0.250382
- *MESH_VERTEXNORMAL 72 0.000001 0.968147 -0.250382
- *MESH_FACENORMAL 156 0.000001 0.968147 -0.250381
- *MESH_VERTEXNORMAL 72 0.000001 0.968147 -0.250382
- *MESH_VERTEXNORMAL 97 0.000001 0.968148 -0.250381
- *MESH_VERTEXNORMAL 99 0.000001 0.968147 -0.250381
- *MESH_FACENORMAL 157 0.500000 -0.216836 -0.838441
- *MESH_VERTEXNORMAL 86 0.500000 -0.216836 -0.838441
- *MESH_VERTEXNORMAL 71 0.500000 -0.216835 -0.838441
- *MESH_VERTEXNORMAL 100 0.500000 -0.216835 -0.838441
- *MESH_FACENORMAL 158 0.500000 -0.216835 -0.838440
- *MESH_VERTEXNORMAL 71 0.500000 -0.216835 -0.838441
- *MESH_VERTEXNORMAL 99 0.500000 -0.216834 -0.838441
- *MESH_VERTEXNORMAL 100 0.500000 -0.216835 -0.838441
- *MESH_FACENORMAL 159 0.500000 -0.216833 -0.838441
- *MESH_VERTEXNORMAL 71 0.500000 -0.216835 -0.838441
- *MESH_VERTEXNORMAL 70 0.500000 -0.216833 -0.838441
- *MESH_VERTEXNORMAL 99 0.500000 -0.216834 -0.838441
- *MESH_FACENORMAL 160 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 101 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 102 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 103 -1.000000 0.000000 0.000000
- *MESH_FACENORMAL 161 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 102 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 104 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 103 -1.000000 0.000000 0.000000
- *MESH_FACENORMAL 162 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 102 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 105 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 104 -1.000000 0.000000 0.000000
- *MESH_FACENORMAL 163 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 105 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 106 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 104 -1.000000 0.000000 0.000000
- *MESH_FACENORMAL 164 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 103 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 107 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 101 -1.000000 0.000000 0.000000
- *MESH_FACENORMAL 165 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 107 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 108 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 101 -1.000000 0.000000 0.000000
- *MESH_FACENORMAL 166 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 107 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 109 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 108 -1.000000 0.000000 0.000000
- *MESH_FACENORMAL 167 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 110 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 111 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 112 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 168 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 112 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 111 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 113 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 169 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 112 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 113 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 114 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 170 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 114 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 113 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 115 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 171 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 111 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 110 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 116 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 172 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 116 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 110 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 117 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 173 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 116 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 117 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 118 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 174 0.000000 0.435561 0.900159
- *MESH_VERTEXNORMAL 112 0.000000 0.435561 0.900159
- *MESH_VERTEXNORMAL 105 0.000000 0.435561 0.900159
- *MESH_VERTEXNORMAL 102 0.000000 0.435561 0.900159
- *MESH_FACENORMAL 175 0.000000 0.435561 0.900159
- *MESH_VERTEXNORMAL 112 0.000000 0.435561 0.900159
- *MESH_VERTEXNORMAL 114 0.000000 0.435561 0.900159
- *MESH_VERTEXNORMAL 105 0.000000 0.435561 0.900159
- *MESH_FACENORMAL 176 0.000000 0.999861 0.016664
- *MESH_VERTEXNORMAL 110 0.000000 0.979535 -0.201273
- *MESH_VERTEXNORMAL 102 0.000000 0.999861 0.016664
- *MESH_VERTEXNORMAL 101 0.000000 0.907491 -0.420072
- *MESH_FACENORMAL 177 0.000000 0.999861 0.016664
- *MESH_VERTEXNORMAL 110 0.000000 0.979535 -0.201273
- *MESH_VERTEXNORMAL 112 0.000000 0.999861 0.016664
- *MESH_VERTEXNORMAL 102 0.000000 0.999861 0.016664
- *MESH_FACENORMAL 178 0.000000 0.794358 -0.607450
- *MESH_VERTEXNORMAL 117 0.000000 0.794358 -0.607450
- *MESH_VERTEXNORMAL 101 0.000000 0.907491 -0.420072
- *MESH_VERTEXNORMAL 108 0.000000 0.794358 -0.607450
- *MESH_FACENORMAL 179 0.000000 0.794358 -0.607450
- *MESH_VERTEXNORMAL 117 0.000000 0.794358 -0.607450
- *MESH_VERTEXNORMAL 110 0.000000 0.979535 -0.201273
- *MESH_VERTEXNORMAL 101 0.000000 0.907491 -0.420072
- *MESH_FACENORMAL 180 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 116 0.000000 -0.984174 0.177202
- *MESH_VERTEXNORMAL 109 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 107 0.000000 -0.935092 0.354404
- *MESH_FACENORMAL 181 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 116 0.000000 -0.984174 0.177202
- *MESH_VERTEXNORMAL 118 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 109 0.000000 -1.000000 0.000000
- *MESH_FACENORMAL 182 0.000000 -0.857493 0.514496
- *MESH_VERTEXNORMAL 111 0.000000 -0.936667 0.350222
- *MESH_VERTEXNORMAL 107 0.000000 -0.935092 0.354404
- *MESH_VERTEXNORMAL 103 0.000000 -0.985800 0.167924
- *MESH_FACENORMAL 183 0.000000 -0.857493 0.514496
- *MESH_VERTEXNORMAL 111 0.000000 -0.936667 0.350222
- *MESH_VERTEXNORMAL 116 0.000000 -0.984174 0.177202
- *MESH_VERTEXNORMAL 107 0.000000 -0.935092 0.354404
- *MESH_FACENORMAL 184 0.000000 -0.999904 -0.013888
- *MESH_VERTEXNORMAL 113 0.000000 -0.999904 -0.013888
- *MESH_VERTEXNORMAL 103 0.000000 -0.985800 0.167924
- *MESH_VERTEXNORMAL 104 0.000000 -0.999904 -0.013888
- *MESH_FACENORMAL 185 0.000000 -0.999904 -0.013888
- *MESH_VERTEXNORMAL 113 0.000000 -0.999904 -0.013888
- *MESH_VERTEXNORMAL 111 0.000000 -0.936667 0.350222
- *MESH_VERTEXNORMAL 103 0.000000 -0.985800 0.167924
- *MESH_FACENORMAL 186 0.000000 -0.452095 -0.891970
- *MESH_VERTEXNORMAL 115 0.000000 -0.452095 -0.891970
- *MESH_VERTEXNORMAL 104 0.000000 -0.452095 -0.891970
- *MESH_VERTEXNORMAL 106 0.000000 -0.452095 -0.891970
- *MESH_FACENORMAL 187 0.000000 -0.452095 -0.891970
- *MESH_VERTEXNORMAL 115 0.000000 -0.452095 -0.891970
- *MESH_VERTEXNORMAL 113 0.000000 -0.452095 -0.891970
- *MESH_VERTEXNORMAL 104 0.000000 -0.452095 -0.891970
- *MESH_FACENORMAL 188 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 119 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 120 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 121 -1.000000 0.000000 0.000000
- *MESH_FACENORMAL 189 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 120 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 122 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 121 -1.000000 0.000000 0.000000
- *MESH_FACENORMAL 190 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 121 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 123 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 119 -1.000000 0.000000 0.000000
- *MESH_FACENORMAL 191 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 124 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 125 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 126 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 192 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 126 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 125 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 127 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 193 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 125 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 124 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 128 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 194 0.000000 -0.124035 0.992278
- *MESH_VERTEXNORMAL 124 0.000000 -0.308281 0.951295
- *MESH_VERTEXNORMAL 120 0.000000 -0.124035 0.992278
- *MESH_VERTEXNORMAL 119 0.000000 -0.487853 0.872926
- *MESH_FACENORMAL 195 0.000000 -0.124035 0.992278
- *MESH_VERTEXNORMAL 124 0.000000 -0.308281 0.951295
- *MESH_VERTEXNORMAL 126 0.000000 -0.124035 0.992278
- *MESH_VERTEXNORMAL 120 0.000000 -0.124035 0.992278
- *MESH_FACENORMAL 196 0.000000 -0.643192 0.765705
- *MESH_VERTEXNORMAL 128 0.000000 -0.643192 0.765705
- *MESH_VERTEXNORMAL 119 0.000000 -0.487853 0.872926
- *MESH_VERTEXNORMAL 123 0.000000 -0.643192 0.765705
- *MESH_FACENORMAL 197 0.000000 -0.643192 0.765705
- *MESH_VERTEXNORMAL 128 0.000000 -0.643192 0.765705
- *MESH_VERTEXNORMAL 124 0.000000 -0.308281 0.951295
- *MESH_VERTEXNORMAL 119 0.000000 -0.487853 0.872926
- *MESH_FACENORMAL 198 0.000000 0.327110 -0.944986
- *MESH_VERTEXNORMAL 125 0.000000 0.108921 -0.994050
- *MESH_VERTEXNORMAL 123 0.000000 0.327110 -0.944986
- *MESH_VERTEXNORMAL 121 0.000000 -0.126995 -0.991903
- *MESH_FACENORMAL 199 0.000000 0.327110 -0.944986
- *MESH_VERTEXNORMAL 125 0.000000 0.108921 -0.994050
- *MESH_VERTEXNORMAL 128 0.000000 0.327110 -0.944986
- *MESH_VERTEXNORMAL 123 0.000000 0.327110 -0.944986
- *MESH_FACENORMAL 200 0.000000 -0.344255 -0.938876
- *MESH_VERTEXNORMAL 127 0.000000 -0.344255 -0.938876
- *MESH_VERTEXNORMAL 121 0.000000 -0.126995 -0.991903
- *MESH_VERTEXNORMAL 122 0.000000 -0.344255 -0.938876
- *MESH_FACENORMAL 201 0.000000 -0.344255 -0.938876
- *MESH_VERTEXNORMAL 127 0.000000 -0.344255 -0.938876
- *MESH_VERTEXNORMAL 125 0.000000 0.108921 -0.994050
- *MESH_VERTEXNORMAL 121 0.000000 -0.126995 -0.991903
- *MESH_FACENORMAL 202 0.965926 0.258819 -0.000000
- *MESH_VERTEXNORMAL 129 0.907073 0.420974 -0.000000
- *MESH_VERTEXNORMAL 130 0.996035 -0.088962 0.000000
- *MESH_VERTEXNORMAL 131 0.996035 0.088962 0.000000
- *MESH_FACENORMAL 203 0.965926 0.258819 -0.000000
- *MESH_VERTEXNORMAL 129 0.907073 0.420974 -0.000000
- *MESH_VERTEXNORMAL 131 0.996035 0.088962 0.000000
- *MESH_VERTEXNORMAL 132 0.818110 0.575061 -0.000000
- *MESH_FACENORMAL 204 0.707107 0.707107 -0.000000
- *MESH_VERTEXNORMAL 133 0.575061 0.818111 -0.000000
- *MESH_VERTEXNORMAL 129 0.907073 0.420974 -0.000000
- *MESH_VERTEXNORMAL 132 0.818110 0.575061 -0.000000
- *MESH_FACENORMAL 205 0.707106 0.707107 -0.000000
- *MESH_VERTEXNORMAL 133 0.575061 0.818111 -0.000000
- *MESH_VERTEXNORMAL 132 0.818110 0.575061 -0.000000
- *MESH_VERTEXNORMAL 134 0.420974 0.907073 -0.000000
- *MESH_FACENORMAL 206 0.258819 0.965926 -0.000000
- *MESH_VERTEXNORMAL 135 0.088963 0.996035 -0.000000
- *MESH_VERTEXNORMAL 133 0.575061 0.818111 -0.000000
- *MESH_VERTEXNORMAL 134 0.420974 0.907073 -0.000000
- *MESH_FACENORMAL 207 0.258819 0.965926 -0.000000
- *MESH_VERTEXNORMAL 135 0.088963 0.996035 -0.000000
- *MESH_VERTEXNORMAL 134 0.420974 0.907073 -0.000000
- *MESH_VERTEXNORMAL 136 -0.088962 0.996035 -0.000000
- *MESH_FACENORMAL 208 -0.258819 0.965926 -0.000000
- *MESH_VERTEXNORMAL 137 -0.420974 0.907073 -0.000000
- *MESH_VERTEXNORMAL 135 0.088963 0.996035 -0.000000
- *MESH_VERTEXNORMAL 136 -0.088962 0.996035 -0.000000
- *MESH_FACENORMAL 209 -0.258818 0.965926 -0.000000
- *MESH_VERTEXNORMAL 137 -0.420974 0.907073 -0.000000
- *MESH_VERTEXNORMAL 136 -0.088962 0.996035 -0.000000
- *MESH_VERTEXNORMAL 138 -0.575061 0.818110 -0.000000
- *MESH_FACENORMAL 210 -0.707107 0.707106 -0.000000
- *MESH_VERTEXNORMAL 139 -0.818111 0.575061 -0.000000
- *MESH_VERTEXNORMAL 137 -0.420974 0.907073 -0.000000
- *MESH_VERTEXNORMAL 138 -0.575061 0.818110 -0.000000
- *MESH_FACENORMAL 211 -0.707107 0.707106 -0.000000
- *MESH_VERTEXNORMAL 139 -0.818111 0.575061 -0.000000
- *MESH_VERTEXNORMAL 138 -0.575061 0.818110 -0.000000
- *MESH_VERTEXNORMAL 140 -0.907073 0.420974 -0.000000
- *MESH_FACENORMAL 212 -0.965926 0.258819 -0.000000
- *MESH_VERTEXNORMAL 141 -0.996035 0.088963 -0.000000
- *MESH_VERTEXNORMAL 139 -0.818111 0.575061 -0.000000
- *MESH_VERTEXNORMAL 140 -0.907073 0.420974 -0.000000
- *MESH_FACENORMAL 213 -0.965926 0.258819 -0.000000
- *MESH_VERTEXNORMAL 141 -0.996035 0.088963 -0.000000
- *MESH_VERTEXNORMAL 140 -0.907073 0.420974 -0.000000
- *MESH_VERTEXNORMAL 142 -0.996035 -0.088962 -0.000000
- *MESH_FACENORMAL 214 -0.965926 -0.258819 0.000000
- *MESH_VERTEXNORMAL 143 -0.907073 -0.420974 -0.000000
- *MESH_VERTEXNORMAL 141 -0.996035 0.088963 -0.000000
- *MESH_VERTEXNORMAL 142 -0.996035 -0.088962 -0.000000
- *MESH_FACENORMAL 215 -0.965926 -0.258819 -0.000000
- *MESH_VERTEXNORMAL 143 -0.907073 -0.420974 -0.000000
- *MESH_VERTEXNORMAL 142 -0.996035 -0.088962 -0.000000
- *MESH_VERTEXNORMAL 144 -0.818111 -0.575061 -0.000000
- *MESH_FACENORMAL 216 -0.707107 -0.707107 0.000000
- *MESH_VERTEXNORMAL 145 -0.575061 -0.818110 0.000000
- *MESH_VERTEXNORMAL 143 -0.907073 -0.420974 -0.000000
- *MESH_VERTEXNORMAL 144 -0.818110 -0.575061 -0.000000
- *MESH_FACENORMAL 217 -0.707107 -0.707107 0.000000
- *MESH_VERTEXNORMAL 145 -0.575061 -0.818110 0.000000
- *MESH_VERTEXNORMAL 144 -0.818110 -0.575061 -0.000000
- *MESH_VERTEXNORMAL 146 -0.420974 -0.907073 0.000000
- *MESH_FACENORMAL 218 -0.258819 -0.965926 0.000000
- *MESH_VERTEXNORMAL 147 -0.088962 -0.996035 0.000000
- *MESH_VERTEXNORMAL 145 -0.575061 -0.818110 0.000000
- *MESH_VERTEXNORMAL 146 -0.420974 -0.907073 0.000000
- *MESH_FACENORMAL 219 -0.258819 -0.965926 0.000000
- *MESH_VERTEXNORMAL 147 -0.088962 -0.996035 0.000000
- *MESH_VERTEXNORMAL 146 -0.420974 -0.907073 0.000000
- *MESH_VERTEXNORMAL 148 0.088962 -0.996035 0.000000
- *MESH_FACENORMAL 220 0.258819 -0.965926 0.000000
- *MESH_VERTEXNORMAL 149 0.420974 -0.907073 0.000000
- *MESH_VERTEXNORMAL 147 -0.088962 -0.996035 0.000000
- *MESH_VERTEXNORMAL 148 0.088962 -0.996035 0.000000
- *MESH_FACENORMAL 221 0.258819 -0.965926 0.000000
- *MESH_VERTEXNORMAL 149 0.420974 -0.907073 0.000000
- *MESH_VERTEXNORMAL 148 0.088962 -0.996035 0.000000
- *MESH_VERTEXNORMAL 150 0.575061 -0.818110 0.000000
- *MESH_FACENORMAL 222 0.707107 -0.707107 0.000000
- *MESH_VERTEXNORMAL 151 0.818111 -0.575061 0.000000
- *MESH_VERTEXNORMAL 149 0.420974 -0.907073 0.000000
- *MESH_VERTEXNORMAL 150 0.575061 -0.818110 0.000000
- *MESH_FACENORMAL 223 0.707107 -0.707107 0.000000
- *MESH_VERTEXNORMAL 151 0.818110 -0.575061 0.000000
- *MESH_VERTEXNORMAL 150 0.575061 -0.818110 0.000000
- *MESH_VERTEXNORMAL 152 0.907073 -0.420974 0.000000
- *MESH_FACENORMAL 224 0.965926 -0.258819 0.000000
- *MESH_VERTEXNORMAL 130 0.996035 -0.088962 0.000000
- *MESH_VERTEXNORMAL 151 0.818110 -0.575061 0.000000
- *MESH_VERTEXNORMAL 152 0.907073 -0.420974 0.000000
- *MESH_FACENORMAL 225 0.965926 -0.258819 0.000000
- *MESH_VERTEXNORMAL 130 0.996035 -0.088962 0.000000
- *MESH_VERTEXNORMAL 152 0.907073 -0.420974 0.000000
- *MESH_VERTEXNORMAL 131 0.996035 0.088962 0.000000
- *MESH_FACENORMAL 226 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 153 0.000000 -0.000004 -1.000000
- *MESH_VERTEXNORMAL 154 0.000001 -0.000001 -1.000000
- *MESH_VERTEXNORMAL 155 0.000000 -0.000006 -1.000000
- *MESH_FACENORMAL 227 0.000002 -0.000002 -1.000000
- *MESH_VERTEXNORMAL 153 0.000000 -0.000004 -1.000000
- *MESH_VERTEXNORMAL 156 0.000001 -0.000001 -1.000000
- *MESH_VERTEXNORMAL 154 0.000001 -0.000001 -1.000000
- *MESH_FACENORMAL 228 -0.000000 -0.000001 -1.000000
- *MESH_VERTEXNORMAL 153 0.000000 -0.000004 -1.000000
- *MESH_VERTEXNORMAL 157 -0.000000 -0.000001 -1.000000
- *MESH_VERTEXNORMAL 156 0.000001 -0.000001 -1.000000
- *MESH_FACENORMAL 229 0.000000 -0.000001 -1.000000
- *MESH_VERTEXNORMAL 153 0.000000 -0.000004 -1.000000
- *MESH_VERTEXNORMAL 158 0.000001 -0.000001 -1.000000
- *MESH_VERTEXNORMAL 157 -0.000000 -0.000001 -1.000000
- *MESH_FACENORMAL 230 0.000001 -0.000001 -1.000000
- *MESH_VERTEXNORMAL 153 0.000000 -0.000004 -1.000000
- *MESH_VERTEXNORMAL 159 0.000001 -0.000001 -1.000000
- *MESH_VERTEXNORMAL 158 0.000001 -0.000001 -1.000000
- *MESH_FACENORMAL 231 -0.000000 -0.000002 -1.000000
- *MESH_VERTEXNORMAL 153 0.000000 -0.000004 -1.000000
- *MESH_VERTEXNORMAL 160 -0.000000 -0.000007 -1.000000
- *MESH_VERTEXNORMAL 159 0.000001 -0.000001 -1.000000
- *MESH_FACENORMAL 232 -0.000000 -0.000012 -1.000000
- *MESH_VERTEXNORMAL 153 0.000000 -0.000004 -1.000000
- *MESH_VERTEXNORMAL 161 -0.000003 -0.000008 -1.000000
- *MESH_VERTEXNORMAL 160 -0.000000 -0.000007 -1.000000
- *MESH_FACENORMAL 233 -0.000006 -0.000005 -1.000000
- *MESH_VERTEXNORMAL 153 0.000000 -0.000004 -1.000000
- *MESH_VERTEXNORMAL 162 -0.000004 -0.000005 -1.000000
- *MESH_VERTEXNORMAL 161 -0.000003 -0.000008 -1.000000
- *MESH_FACENORMAL 234 -0.000002 -0.000006 -1.000000
- *MESH_VERTEXNORMAL 153 0.000000 -0.000004 -1.000000
- *MESH_VERTEXNORMAL 163 0.000000 -0.000006 -1.000000
- *MESH_VERTEXNORMAL 162 -0.000004 -0.000005 -1.000000
- *MESH_FACENORMAL 235 0.000002 -0.000006 -1.000000
- *MESH_VERTEXNORMAL 153 0.000000 -0.000004 -1.000000
- *MESH_VERTEXNORMAL 164 0.000004 -0.000005 -1.000000
- *MESH_VERTEXNORMAL 163 0.000000 -0.000006 -1.000000
- *MESH_FACENORMAL 236 0.000006 -0.000005 -1.000000
- *MESH_VERTEXNORMAL 153 0.000000 -0.000004 -1.000000
- *MESH_VERTEXNORMAL 165 0.000003 -0.000008 -1.000000
- *MESH_VERTEXNORMAL 164 0.000004 -0.000005 -1.000000
- *MESH_FACENORMAL 237 0.000000 -0.000012 -1.000000
- *MESH_VERTEXNORMAL 153 0.000000 -0.000004 -1.000000
- *MESH_VERTEXNORMAL 155 0.000000 -0.000006 -1.000000
- *MESH_VERTEXNORMAL 165 0.000003 -0.000008 -1.000000
- *MESH_FACENORMAL 238 0.998938 0.033933 0.031162
- *MESH_VERTEXNORMAL 166 0.953968 0.299723 0.010580
- *MESH_VERTEXNORMAL 167 0.999526 -0.008677 0.029532
- *MESH_VERTEXNORMAL 155 0.990828 0.133448 0.021241
- *MESH_FACENORMAL 239 0.908759 0.417321 -0.000000
- *MESH_VERTEXNORMAL 166 0.953968 0.299723 0.010580
- *MESH_VERTEXNORMAL 155 0.990828 0.133448 0.021241
- *MESH_VERTEXNORMAL 154 0.904340 0.426813 -0.000000
- *MESH_FACENORMAL 240 0.902093 0.431541 -0.000000
- *MESH_VERTEXNORMAL 168 0.768411 0.639956 -0.000000
- *MESH_VERTEXNORMAL 166 0.953968 0.299723 0.010580
- *MESH_VERTEXNORMAL 154 0.904340 0.426813 -0.000000
- *MESH_FACENORMAL 241 0.902093 0.431541 -0.000000
- *MESH_VERTEXNORMAL 168 0.768411 0.639956 -0.000000
- *MESH_VERTEXNORMAL 154 0.904340 0.426813 -0.000000
- *MESH_VERTEXNORMAL 156 0.573606 0.819131 -0.000000
- *MESH_FACENORMAL 242 0.354762 0.934957 -0.000000
- *MESH_VERTEXNORMAL 169 0.125481 0.992096 -0.000000
- *MESH_VERTEXNORMAL 168 0.768411 0.639956 -0.000000
- *MESH_VERTEXNORMAL 156 0.573606 0.819131 -0.000000
- *MESH_FACENORMAL 243 0.354763 0.934956 -0.000000
- *MESH_VERTEXNORMAL 169 0.125481 0.992096 -0.000000
- *MESH_VERTEXNORMAL 156 0.573606 0.819131 -0.000000
- *MESH_VERTEXNORMAL 157 -0.125481 0.992096 -0.000000
- *MESH_FACENORMAL 244 -0.354762 0.934957 0.000000
- *MESH_VERTEXNORMAL 170 -0.573606 0.819132 0.000000
- *MESH_VERTEXNORMAL 169 0.125481 0.992096 -0.000000
- *MESH_VERTEXNORMAL 157 -0.125481 0.992096 -0.000000
- *MESH_FACENORMAL 245 -0.354762 0.934956 0.000000
- *MESH_VERTEXNORMAL 170 -0.573606 0.819132 0.000000
- *MESH_VERTEXNORMAL 157 -0.125481 0.992096 -0.000000
- *MESH_VERTEXNORMAL 158 -0.768411 0.639956 -0.000000
- *MESH_FACENORMAL 246 -0.902093 0.431541 0.000000
- *MESH_VERTEXNORMAL 171 -0.952436 0.304738 -0.000000
- *MESH_VERTEXNORMAL 170 -0.573606 0.819132 0.000000
- *MESH_VERTEXNORMAL 158 -0.768411 0.639956 -0.000000
- *MESH_FACENORMAL 247 -0.902093 0.431541 -0.000000
- *MESH_VERTEXNORMAL 171 -0.952436 0.304738 -0.000000
- *MESH_VERTEXNORMAL 158 -0.768411 0.639956 -0.000000
- *MESH_VERTEXNORMAL 159 -0.953995 0.299667 0.009621
- *MESH_FACENORMAL 248 -0.999424 0.033950 -0.000000
- *MESH_VERTEXNORMAL 172 -0.987974 0.153294 0.020225
- *MESH_VERTEXNORMAL 171 -0.952436 0.304738 -0.000000
- *MESH_VERTEXNORMAL 159 -0.953995 0.299667 0.009621
- *MESH_FACENORMAL 249 -0.908395 0.417153 0.028337
- *MESH_VERTEXNORMAL 172 -0.987974 0.153294 0.020225
- *MESH_VERTEXNORMAL 159 -0.953995 0.299667 0.009621
- *MESH_VERTEXNORMAL 160 -0.992104 0.121957 0.029265
- *MESH_FACENORMAL 250 -0.999514 -0.000002 0.031180
- *MESH_VERTEXNORMAL 173 -0.993669 -0.108865 0.027744
- *MESH_VERTEXNORMAL 172 -0.987974 0.153294 0.020225
- *MESH_VERTEXNORMAL 160 -0.992104 0.121957 0.029265
- *MESH_FACENORMAL 251 -0.997858 -0.059951 0.026197
- *MESH_VERTEXNORMAL 173 -0.993669 -0.108865 0.027744
- *MESH_VERTEXNORMAL 160 -0.992104 0.121957 0.029265
- *MESH_VERTEXNORMAL 161 -0.951066 -0.308475 0.017810
- *MESH_FACENORMAL 252 -0.964054 -0.264496 0.025310
- *MESH_VERTEXNORMAL 174 -0.904103 -0.427113 0.013118
- *MESH_VERTEXNORMAL 173 -0.993669 -0.108865 0.027744
- *MESH_VERTEXNORMAL 161 -0.951066 -0.308475 0.017810
- *MESH_FACENORMAL 253 -0.816859 -0.576837 0.000530
- *MESH_VERTEXNORMAL 174 -0.904103 -0.427113 0.013118
- *MESH_VERTEXNORMAL 161 -0.951066 -0.308475 0.017810
- *MESH_VERTEXNORMAL 162 -0.583703 -0.811911 0.009550
- *MESH_FACENORMAL 254 0.000000 -1.000000 0.000918
- *MESH_VERTEXNORMAL 175 -0.096410 -0.995265 0.012359
- *MESH_VERTEXNORMAL 174 0.000000 -1.000000 0.000918
- *MESH_VERTEXNORMAL 162 -0.144787 -0.989419 0.009318
- *MESH_FACENORMAL 255 -0.286512 -0.957916 0.017522
- *MESH_VERTEXNORMAL 175 -0.096410 -0.995265 0.012359
- *MESH_VERTEXNORMAL 162 -0.399114 -0.916876 0.006862
- *MESH_VERTEXNORMAL 163 0.000015 -0.999921 0.012582
- *MESH_FACENORMAL 256 0.000000 -0.999833 0.018289
- *MESH_VERTEXNORMAL 176 0.144810 -0.989412 0.009687
- *MESH_VERTEXNORMAL 175 -0.096410 -0.995265 0.012359
- *MESH_VERTEXNORMAL 163 0.000015 -0.999921 0.012582
- *MESH_FACENORMAL 257 0.286556 -0.958063 0.000880
- *MESH_VERTEXNORMAL 176 0.144810 -0.989412 0.009687
- *MESH_VERTEXNORMAL 163 0.000015 -0.999921 0.012582
- *MESH_VERTEXNORMAL 164 0.583635 -0.811930 0.011808
- *MESH_FACENORMAL 258 0.964363 -0.264581 0.000243
- *MESH_VERTEXNORMAL 177 0.957023 -0.289544 0.016495
- *MESH_VERTEXNORMAL 176 0.964363 -0.264581 0.000243
- *MESH_VERTEXNORMAL 164 0.904147 -0.427081 0.011008
- *MESH_FACENORMAL 259 0.816671 -0.576704 0.021440
- *MESH_VERTEXNORMAL 177 0.957023 -0.289544 0.016495
- *MESH_VERTEXNORMAL 164 0.754319 -0.656456 0.008232
- *MESH_VERTEXNORMAL 165 0.974986 -0.220581 0.027305
- *MESH_FACENORMAL 260 0.999656 -0.000002 0.026244
- *MESH_VERTEXNORMAL 167 0.999526 -0.008677 0.029532
- *MESH_VERTEXNORMAL 177 0.957023 -0.289544 0.016495
- *MESH_VERTEXNORMAL 165 0.974986 -0.220581 0.027305
- *MESH_FACENORMAL 261 0.997716 -0.059944 0.031124
- *MESH_VERTEXNORMAL 167 0.999526 -0.008677 0.029532
- *MESH_VERTEXNORMAL 165 0.974986 -0.220581 0.027305
- *MESH_VERTEXNORMAL 155 0.990828 0.133448 0.021241
- *MESH_FACENORMAL 262 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 178 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 179 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 180 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 263 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 179 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 181 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 180 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 264 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 179 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 182 -1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 181 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 265 -1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 182 -1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 183 -1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 181 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 266 -1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 182 -1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 184 -1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 183 -1.000000 -0.000000 0.000000
- *MESH_FACENORMAL 267 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 184 -1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 185 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 183 -1.000000 -0.000000 0.000000
- *MESH_FACENORMAL 268 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 186 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 187 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 188 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 269 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 188 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 187 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 189 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 270 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 188 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 189 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 190 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 271 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 190 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 189 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 191 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 272 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 190 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 191 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 192 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 273 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 192 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 191 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 193 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 274 0.000000 -0.276644 0.960973
- *MESH_VERTEXNORMAL 190 0.000000 -0.302730 0.953076
- *MESH_VERTEXNORMAL 184 0.000000 -0.276644 0.960973
- *MESH_VERTEXNORMAL 182 0.000000 -0.328610 0.944466
- *MESH_FACENORMAL 275 0.000000 -0.276644 0.960973
- *MESH_VERTEXNORMAL 190 0.000000 -0.302730 0.953076
- *MESH_VERTEXNORMAL 192 0.000000 -0.276644 0.960973
- *MESH_VERTEXNORMAL 184 0.000000 -0.276644 0.960973
- *MESH_FACENORMAL 276 0.000000 -0.354227 0.935159
- *MESH_VERTEXNORMAL 188 0.000000 -0.385664 0.922639
- *MESH_VERTEXNORMAL 182 0.000000 -0.328610 0.944466
- *MESH_VERTEXNORMAL 179 0.000000 -0.416696 0.909046
- *MESH_FACENORMAL 277 0.000000 -0.354227 0.935160
- *MESH_VERTEXNORMAL 188 0.000000 -0.385664 0.922639
- *MESH_VERTEXNORMAL 190 0.000000 -0.302730 0.953076
- *MESH_VERTEXNORMAL 182 0.000000 -0.328610 0.944466
- *MESH_FACENORMAL 278 0.000000 -0.447214 0.894427
- *MESH_VERTEXNORMAL 186 0.000000 -0.447214 0.894427
- *MESH_VERTEXNORMAL 179 0.000000 -0.416696 0.909046
- *MESH_VERTEXNORMAL 178 0.000000 -0.447214 0.894427
- *MESH_FACENORMAL 279 0.000000 -0.447214 0.894427
- *MESH_VERTEXNORMAL 186 0.000000 -0.447214 0.894427
- *MESH_VERTEXNORMAL 188 0.000000 -0.385664 0.922639
- *MESH_VERTEXNORMAL 179 0.000000 -0.416696 0.909046
- *MESH_FACENORMAL 280 0.000000 -0.825307 -0.564684
- *MESH_VERTEXNORMAL 187 0.000000 -0.825307 -0.564684
- *MESH_VERTEXNORMAL 178 0.000000 -0.825307 -0.564684
- *MESH_VERTEXNORMAL 180 0.000000 -0.825307 -0.564684
- *MESH_FACENORMAL 281 0.000000 -0.825307 -0.564684
- *MESH_VERTEXNORMAL 187 0.000000 -0.825307 -0.564684
- *MESH_VERTEXNORMAL 186 0.000000 -0.825307 -0.564684
- *MESH_VERTEXNORMAL 178 0.000000 -0.825307 -0.564684
- *MESH_FACENORMAL 282 0.000000 0.466239 -0.884659
- *MESH_VERTEXNORMAL 189 0.000000 0.430815 -0.902440
- *MESH_VERTEXNORMAL 180 0.000000 0.466239 -0.884659
- *MESH_VERTEXNORMAL 181 0.000000 0.394657 -0.918828
- *MESH_FACENORMAL 283 0.000000 0.466239 -0.884659
- *MESH_VERTEXNORMAL 189 0.000000 0.430815 -0.902440
- *MESH_VERTEXNORMAL 187 0.000000 0.466239 -0.884659
- *MESH_VERTEXNORMAL 180 0.000000 0.466239 -0.884659
- *MESH_FACENORMAL 284 0.000000 0.357936 -0.933746
- *MESH_VERTEXNORMAL 191 0.000000 0.310011 -0.950733
- *MESH_VERTEXNORMAL 181 0.000000 0.394657 -0.918828
- *MESH_VERTEXNORMAL 183 0.000000 0.261157 -0.965296
- *MESH_FACENORMAL 285 0.000000 0.357936 -0.933746
- *MESH_VERTEXNORMAL 191 0.000000 0.310011 -0.950733
- *MESH_VERTEXNORMAL 189 0.000000 0.430815 -0.902440
- *MESH_VERTEXNORMAL 181 0.000000 0.394657 -0.918828
- *MESH_FACENORMAL 286 0.000000 0.211753 -0.977323
- *MESH_VERTEXNORMAL 193 0.000000 0.211753 -0.977323
- *MESH_VERTEXNORMAL 183 0.000000 0.261157 -0.965296
- *MESH_VERTEXNORMAL 185 0.000000 0.211753 -0.977323
- *MESH_FACENORMAL 287 0.000000 0.211753 -0.977323
- *MESH_VERTEXNORMAL 193 0.000000 0.211753 -0.977323
- *MESH_VERTEXNORMAL 191 0.000000 0.310011 -0.950733
- *MESH_VERTEXNORMAL 183 0.000000 0.261157 -0.965296
- *MESH_FACENORMAL 288 -0.000032 -0.999114 -0.042080
- *MESH_VERTEXNORMAL 194 -0.000016 -0.999116 -0.042049
- *MESH_VERTEXNORMAL 195 -0.000016 -0.999116 -0.042049
- *MESH_VERTEXNORMAL 196 -0.000032 -0.999114 -0.042080
- *MESH_FACENORMAL 289 -0.000000 -0.999117 -0.042019
- *MESH_VERTEXNORMAL 194 -0.000016 -0.999116 -0.042049
- *MESH_VERTEXNORMAL 197 -0.000000 -0.999117 -0.042019
- *MESH_VERTEXNORMAL 195 -0.000016 -0.999116 -0.042049
- *MESH_FACENORMAL 290 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 198 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 196 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 195 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 291 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 198 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 199 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 196 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 292 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 198 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 200 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 199 -1.000000 0.000000 -0.000000
- *MESH_FACENORMAL 293 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 198 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 201 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 200 -1.000000 0.000000 0.000000
- *MESH_FACENORMAL 294 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 198 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 202 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 201 -1.000000 0.000000 0.000000
- *MESH_FACENORMAL 295 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 203 1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 197 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 194 1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 296 1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 203 1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 194 1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 204 1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 297 1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 203 1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 204 1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 205 1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 298 1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 203 1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 205 1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 206 1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 299 1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 203 1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 206 1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 207 1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 300 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 204 -0.000003 0.000002 -1.000000
- *MESH_VERTEXNORMAL 196 -0.000003 0.000002 -1.000000
- *MESH_VERTEXNORMAL 199 0.000000 0.000000 -1.000000
- *MESH_FACENORMAL 301 -0.000006 0.000003 -1.000000
- *MESH_VERTEXNORMAL 204 -0.000003 0.000002 -1.000000
- *MESH_VERTEXNORMAL 194 -0.000006 0.000003 -1.000000
- *MESH_VERTEXNORMAL 196 -0.000003 0.000002 -1.000000
- *MESH_FACENORMAL 302 0.000000 1.000000 -0.000461
- *MESH_VERTEXNORMAL 205 0.000000 1.000000 -0.000461
- *MESH_VERTEXNORMAL 199 0.000000 1.000000 -0.000461
- *MESH_VERTEXNORMAL 200 0.000000 1.000000 -0.000461
- *MESH_FACENORMAL 303 0.000000 1.000000 -0.000461
- *MESH_VERTEXNORMAL 205 0.000000 1.000000 -0.000461
- *MESH_VERTEXNORMAL 204 0.000000 1.000000 -0.000461
- *MESH_VERTEXNORMAL 199 0.000000 1.000000 -0.000461
- *MESH_FACENORMAL 304 0.000000 0.469366 0.883004
- *MESH_VERTEXNORMAL 206 0.000000 0.321416 0.946938
- *MESH_VERTEXNORMAL 200 0.000000 0.469366 0.883004
- *MESH_VERTEXNORMAL 201 0.000000 0.160773 0.986991
- *MESH_FACENORMAL 305 0.000000 0.469366 0.883004
- *MESH_VERTEXNORMAL 206 0.000000 0.321416 0.946938
- *MESH_VERTEXNORMAL 205 0.000000 0.469366 0.883004
- *MESH_VERTEXNORMAL 200 0.000000 0.469366 0.883004
- *MESH_FACENORMAL 306 0.000000 0.000126 1.000000
- *MESH_VERTEXNORMAL 207 0.000000 -0.152659 0.988279
- *MESH_VERTEXNORMAL 201 0.000000 0.160773 0.986991
- *MESH_VERTEXNORMAL 202 0.000000 -0.305447 0.952209
- *MESH_FACENORMAL 307 0.000000 0.000126 1.000000
- *MESH_VERTEXNORMAL 207 0.000000 -0.152659 0.988279
- *MESH_VERTEXNORMAL 206 0.000000 0.321416 0.946938
- *MESH_VERTEXNORMAL 201 0.000000 0.160773 0.986991
- *MESH_FACENORMAL 308 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 208 -0.998302 -0.058176 -0.002930
- *MESH_VERTEXNORMAL 209 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 210 -0.999617 0.006676 -0.026858
- *MESH_FACENORMAL 309 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 208 -0.998302 -0.058176 -0.002930
- *MESH_VERTEXNORMAL 211 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 209 -1.000000 0.000000 0.000000
- *MESH_FACENORMAL 310 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 208 -0.998302 -0.058176 -0.002930
- *MESH_VERTEXNORMAL 212 -0.984294 -0.176523 -0.002156
- *MESH_VERTEXNORMAL 211 -1.000000 0.000000 0.000000
- *MESH_FACENORMAL 311 -0.972762 -0.231514 -0.011659
- *MESH_VERTEXNORMAL 208 -0.998302 -0.058176 -0.002930
- *MESH_VERTEXNORMAL 213 -0.980251 -0.197603 0.007866
- *MESH_VERTEXNORMAL 212 -0.984294 -0.176523 -0.002156
- *MESH_FACENORMAL 312 -0.955880 -0.293709 0.005245
- *MESH_VERTEXNORMAL 213 -0.980251 -0.197603 0.007866
- *MESH_VERTEXNORMAL 214 -0.883262 -0.467967 0.029257
- *MESH_VERTEXNORMAL 212 -0.984294 -0.176523 -0.002156
- *MESH_FACENORMAL 313 -0.778655 -0.625276 0.052209
- *MESH_VERTEXNORMAL 213 -0.980251 -0.197603 0.007866
- *MESH_VERTEXNORMAL 215 -0.943042 -0.331521 0.027681
- *MESH_VERTEXNORMAL 214 -0.883262 -0.467967 0.029257
- *MESH_FACENORMAL 314 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 213 -0.980251 -0.197603 0.007866
- *MESH_VERTEXNORMAL 216 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 215 -0.943042 -0.331521 0.027681
- *MESH_FACENORMAL 315 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 213 -0.980251 -0.197603 0.007866
- *MESH_VERTEXNORMAL 198 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 216 -1.000000 0.000000 0.000000
- *MESH_FACENORMAL 316 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 209 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 217 -0.993845 0.085671 -0.070226
- *MESH_VERTEXNORMAL 210 -0.999617 0.006676 -0.026858
- *MESH_FACENORMAL 317 -0.996553 0.020012 -0.080512
- *MESH_VERTEXNORMAL 217 -0.993845 0.085671 -0.070226
- *MESH_VERTEXNORMAL 218 -0.986126 0.128377 -0.105233
- *MESH_VERTEXNORMAL 210 -0.999617 0.006676 -0.026858
- *MESH_FACENORMAL 318 -0.963410 0.235142 -0.128643
- *MESH_VERTEXNORMAL 217 -0.993845 0.085671 -0.070226
- *MESH_VERTEXNORMAL 219 -0.963410 0.235142 -0.128643
- *MESH_VERTEXNORMAL 218 -0.986126 0.128377 -0.105233
- *MESH_FACENORMAL 319 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 213 -0.980251 -0.197603 0.007866
- *MESH_VERTEXNORMAL 220 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 198 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 320 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 220 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 221 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 198 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 321 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 221 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 202 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 198 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 322 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 222 0.998302 -0.058176 -0.002930
- *MESH_VERTEXNORMAL 223 0.999617 0.006676 -0.026858
- *MESH_VERTEXNORMAL 224 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 323 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 222 0.998302 -0.058176 -0.002930
- *MESH_VERTEXNORMAL 224 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 225 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 324 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 222 0.998302 -0.058176 -0.002930
- *MESH_VERTEXNORMAL 225 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 226 0.984294 -0.176523 -0.002156
- *MESH_FACENORMAL 325 0.972762 -0.231514 -0.011659
- *MESH_VERTEXNORMAL 222 0.998302 -0.058176 -0.002930
- *MESH_VERTEXNORMAL 226 0.984294 -0.176523 -0.002156
- *MESH_VERTEXNORMAL 227 0.980251 -0.197603 0.007866
- *MESH_FACENORMAL 326 0.955880 -0.293709 0.005245
- *MESH_VERTEXNORMAL 227 0.980251 -0.197603 0.007866
- *MESH_VERTEXNORMAL 226 0.984294 -0.176523 -0.002156
- *MESH_VERTEXNORMAL 228 0.883262 -0.467967 0.029257
- *MESH_FACENORMAL 327 0.778655 -0.625276 0.052209
- *MESH_VERTEXNORMAL 227 0.980251 -0.197603 0.007866
- *MESH_VERTEXNORMAL 228 0.883262 -0.467967 0.029257
- *MESH_VERTEXNORMAL 229 0.943042 -0.331521 0.027681
- *MESH_FACENORMAL 328 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 227 0.980251 -0.197603 0.007866
- *MESH_VERTEXNORMAL 229 0.943042 -0.331521 0.027681
- *MESH_VERTEXNORMAL 230 1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 329 1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 227 0.980251 -0.197603 0.007866
- *MESH_VERTEXNORMAL 230 1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 203 1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 330 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 224 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 223 0.999617 0.006676 -0.026858
- *MESH_VERTEXNORMAL 231 0.993845 0.085671 -0.070226
- *MESH_FACENORMAL 331 0.996553 0.020012 -0.080512
- *MESH_VERTEXNORMAL 231 0.993845 0.085671 -0.070226
- *MESH_VERTEXNORMAL 223 0.999617 0.006676 -0.026858
- *MESH_VERTEXNORMAL 232 0.986126 0.128377 -0.105233
- *MESH_FACENORMAL 332 0.963410 0.235142 -0.128643
- *MESH_VERTEXNORMAL 231 0.993845 0.085671 -0.070226
- *MESH_VERTEXNORMAL 232 0.986126 0.128377 -0.105233
- *MESH_VERTEXNORMAL 233 0.963410 0.235142 -0.128643
- *MESH_FACENORMAL 333 1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 227 0.980251 -0.197603 0.007866
- *MESH_VERTEXNORMAL 203 1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 234 1.000000 -0.000000 0.000000
- *MESH_FACENORMAL 334 1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 234 1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 203 1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 235 1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 335 1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 235 1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 203 1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 207 1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 336 0.000000 -0.447343 0.894363
- *MESH_VERTEXNORMAL 235 0.000000 -0.447343 0.894362
- *MESH_VERTEXNORMAL 202 0.000000 -0.305447 0.952209
- *MESH_VERTEXNORMAL 221 0.000000 -0.447343 0.894362
- *MESH_FACENORMAL 337 0.000000 -0.447343 0.894362
- *MESH_VERTEXNORMAL 235 0.000000 -0.447343 0.894362
- *MESH_VERTEXNORMAL 207 0.000000 -0.152659 0.988279
- *MESH_VERTEXNORMAL 202 0.000000 -0.305447 0.952209
- *MESH_FACENORMAL 338 0.000000 -0.999995 0.003212
- *MESH_VERTEXNORMAL 234 0.000000 -0.967155 0.254188
- *MESH_VERTEXNORMAL 221 0.000000 -0.999995 0.003212
- *MESH_VERTEXNORMAL 220 0.000000 -0.863157 0.504935
- *MESH_FACENORMAL 339 0.000000 -0.999995 0.003212
- *MESH_VERTEXNORMAL 234 0.000000 -0.967155 0.254188
- *MESH_VERTEXNORMAL 235 0.000000 -0.999995 0.003212
- *MESH_VERTEXNORMAL 221 0.000000 -0.999995 0.003212
- *MESH_FACENORMAL 340 0.000000 -0.708728 0.705482
- *MESH_VERTEXNORMAL 227 0.000000 -0.543006 0.839729
- *MESH_VERTEXNORMAL 220 0.000000 -0.863157 0.504935
- *MESH_VERTEXNORMAL 213 0.000000 -0.342623 0.939473
- *MESH_FACENORMAL 341 0.000000 -0.708728 0.705482
- *MESH_VERTEXNORMAL 227 0.000000 -0.543006 0.839729
- *MESH_VERTEXNORMAL 234 0.000000 -0.967155 0.254188
- *MESH_VERTEXNORMAL 220 0.000000 -0.863157 0.504935
- *MESH_FACENORMAL 342 0.000000 -0.135608 0.990763
- *MESH_VERTEXNORMAL 222 -0.000000 0.062456 0.998048
- *MESH_VERTEXNORMAL 213 0.000000 -0.342623 0.939473
- *MESH_VERTEXNORMAL 208 -0.000000 0.266189 0.963921
- *MESH_FACENORMAL 343 0.000000 -0.135608 0.990763
- *MESH_VERTEXNORMAL 222 -0.000000 0.062456 0.998048
- *MESH_VERTEXNORMAL 227 0.000000 -0.543006 0.839729
- *MESH_VERTEXNORMAL 213 0.000000 -0.342623 0.939473
- *MESH_FACENORMAL 344 0.000000 0.451068 0.892490
- *MESH_VERTEXNORMAL 223 -0.000000 0.487426 0.873164
- *MESH_VERTEXNORMAL 208 -0.000000 0.266189 0.963921
- *MESH_VERTEXNORMAL 210 0.000000 0.523019 0.852321
- *MESH_FACENORMAL 345 -0.000000 0.451068 0.892490
- *MESH_VERTEXNORMAL 223 -0.000000 0.487426 0.873164
- *MESH_VERTEXNORMAL 222 -0.000000 0.062456 0.998048
- *MESH_VERTEXNORMAL 208 -0.000000 0.266189 0.963921
- *MESH_FACENORMAL 346 0.000000 0.557663 0.830068
- *MESH_VERTEXNORMAL 232 0.000000 0.557663 0.830068
- *MESH_VERTEXNORMAL 210 0.000000 0.523019 0.852321
- *MESH_VERTEXNORMAL 218 0.000000 0.557663 0.830068
- *MESH_FACENORMAL 347 0.000000 0.557663 0.830068
- *MESH_VERTEXNORMAL 232 0.000000 0.557663 0.830068
- *MESH_VERTEXNORMAL 223 -0.000000 0.487426 0.873164
- *MESH_VERTEXNORMAL 210 0.000000 0.523019 0.852321
- *MESH_FACENORMAL 348 0.000000 -0.877294 0.479954
- *MESH_VERTEXNORMAL 233 0.000000 -0.877294 0.479954
- *MESH_VERTEXNORMAL 218 0.000000 -0.877294 0.479954
- *MESH_VERTEXNORMAL 219 0.000000 -0.877294 0.479954
- *MESH_FACENORMAL 349 0.000000 -0.877294 0.479954
- *MESH_VERTEXNORMAL 233 0.000000 -0.877294 0.479954
- *MESH_VERTEXNORMAL 232 0.000000 -0.877294 0.479954
- *MESH_VERTEXNORMAL 218 0.000000 -0.877294 0.479954
- *MESH_FACENORMAL 350 0.000000 -0.115313 -0.993329
- *MESH_VERTEXNORMAL 231 0.000000 -0.224387 -0.974500
- *MESH_VERTEXNORMAL 219 0.000000 -0.115313 -0.993329
- *MESH_VERTEXNORMAL 217 0.000000 -0.332022 -0.943272
- *MESH_FACENORMAL 351 0.000000 -0.115313 -0.993329
- *MESH_VERTEXNORMAL 231 0.000000 -0.224387 -0.974500
- *MESH_VERTEXNORMAL 233 0.000000 -0.115313 -0.993329
- *MESH_VERTEXNORMAL 219 0.000000 -0.115313 -0.993329
- *MESH_FACENORMAL 352 0.000000 -0.434236 -0.900799
- *MESH_VERTEXNORMAL 224 0.000000 -0.538970 -0.842325
- *MESH_VERTEXNORMAL 217 0.000000 -0.332022 -0.943272
- *MESH_VERTEXNORMAL 209 0.000000 -0.637316 -0.770602
- *MESH_FACENORMAL 353 0.000000 -0.434236 -0.900799
- *MESH_VERTEXNORMAL 224 0.000000 -0.538970 -0.842325
- *MESH_VERTEXNORMAL 231 0.000000 -0.224387 -0.974500
- *MESH_VERTEXNORMAL 217 0.000000 -0.332022 -0.943272
- *MESH_FACENORMAL 354 0.000000 -0.725000 -0.688749
- *MESH_VERTEXNORMAL 225 0.000000 -0.611110 -0.791546
- *MESH_VERTEXNORMAL 209 0.000000 -0.637316 -0.770602
- *MESH_VERTEXNORMAL 211 0.000000 -0.479523 -0.877530
- *MESH_FACENORMAL 355 0.000000 -0.725000 -0.688749
- *MESH_VERTEXNORMAL 225 0.000000 -0.611110 -0.791546
- *MESH_VERTEXNORMAL 224 0.000000 -0.538970 -0.842325
- *MESH_VERTEXNORMAL 209 0.000000 -0.637316 -0.770602
- *MESH_FACENORMAL 356 0.000000 -0.339644 -0.940554
- *MESH_VERTEXNORMAL 226 0.000000 -0.339644 -0.940554
- *MESH_VERTEXNORMAL 211 0.000000 -0.479523 -0.877530
- *MESH_VERTEXNORMAL 212 0.000000 -0.339644 -0.940554
- *MESH_FACENORMAL 357 0.000000 -0.339644 -0.940554
- *MESH_VERTEXNORMAL 226 0.000000 -0.339644 -0.940554
- *MESH_VERTEXNORMAL 225 0.000000 -0.611110 -0.791546
- *MESH_VERTEXNORMAL 211 0.000000 -0.479523 -0.877530
- *MESH_FACENORMAL 358 -0.000000 -0.999841 0.017854
- *MESH_VERTEXNORMAL 228 -0.000000 -0.999565 -0.029508
- *MESH_VERTEXNORMAL 212 0.000000 -0.999841 0.017854
- *MESH_VERTEXNORMAL 214 -0.000000 -0.997038 -0.076911
- *MESH_FACENORMAL 359 0.000000 -0.999841 0.017854
- *MESH_VERTEXNORMAL 228 -0.000000 -0.999565 -0.029508
- *MESH_VERTEXNORMAL 226 0.000000 -0.999841 0.017854
- *MESH_VERTEXNORMAL 212 0.000000 -0.999841 0.017854
- *MESH_FACENORMAL 360 0.000000 -0.992278 -0.124035
- *MESH_VERTEXNORMAL 229 -0.000000 -0.974251 -0.225466
- *MESH_VERTEXNORMAL 214 -0.000000 -0.997038 -0.076911
- *MESH_VERTEXNORMAL 215 0.000000 -0.945521 -0.325560
- *MESH_FACENORMAL 361 -0.000000 -0.992278 -0.124035
- *MESH_VERTEXNORMAL 229 -0.000000 -0.974251 -0.225466
- *MESH_VERTEXNORMAL 228 -0.000000 -0.999565 -0.029508
- *MESH_VERTEXNORMAL 214 -0.000000 -0.997038 -0.076911
- *MESH_FACENORMAL 362 0.000000 -0.907009 -0.421111
- *MESH_VERTEXNORMAL 230 0.000000 -0.907009 -0.421111
- *MESH_VERTEXNORMAL 215 0.000000 -0.945521 -0.325560
- *MESH_VERTEXNORMAL 216 0.000000 -0.907009 -0.421111
- *MESH_FACENORMAL 363 0.000000 -0.907009 -0.421111
- *MESH_VERTEXNORMAL 230 0.000000 -0.907009 -0.421111
- *MESH_VERTEXNORMAL 229 -0.000000 -0.974251 -0.225466
- *MESH_VERTEXNORMAL 215 0.000000 -0.945521 -0.325560
- *MESH_FACENORMAL 364 0.000000 0.088932 -0.996038
- *MESH_VERTEXNORMAL 203 0.000000 0.088932 -0.996038
- *MESH_VERTEXNORMAL 216 0.000000 0.088932 -0.996038
- *MESH_VERTEXNORMAL 198 0.000000 0.088932 -0.996038
- *MESH_FACENORMAL 365 0.000000 0.088932 -0.996038
- *MESH_VERTEXNORMAL 203 0.000000 0.088932 -0.996038
- *MESH_VERTEXNORMAL 230 0.000000 0.088932 -0.996038
- *MESH_VERTEXNORMAL 216 0.000000 0.088932 -0.996038
- }
- *MESH_NUMTVERTEX 1098
- *MESH_TVERTLIST {
- *MESH_TVERT 0 0.905328 0.485217 0.000000
- *MESH_TVERT 1 0.851626 0.471364 0.000000
- *MESH_TVERT 2 0.925112 0.469824 0.000000
- *MESH_TVERT 3 0.851626 0.471364 0.000000
- *MESH_TVERT 4 0.851626 0.371312 0.000000
- *MESH_TVERT 5 0.925112 0.469824 0.000000
- *MESH_TVERT 6 0.851626 0.371312 0.000000
- *MESH_TVERT 7 0.878477 0.325135 0.000000
- *MESH_TVERT 8 0.925112 0.469824 0.000000
- *MESH_TVERT 9 0.878477 0.325135 0.000000
- *MESH_TVERT 10 0.926526 0.325135 0.000000
- *MESH_TVERT 11 0.925112 0.469824 0.000000
- *MESH_TVERT 12 0.878477 0.325135 0.000000
- *MESH_TVERT 13 0.954790 0.208152 0.000000
- *MESH_TVERT 14 0.926526 0.325135 0.000000
- *MESH_TVERT 15 0.878477 0.325135 0.000000
- *MESH_TVERT 16 0.932178 0.174289 0.000000
- *MESH_TVERT 17 0.954790 0.208152 0.000000
- *MESH_TVERT 18 0.905328 0.485217 0.000000
- *MESH_TVERT 19 0.925112 0.469824 0.000000
- *MESH_TVERT 20 0.851626 0.471364 0.000000
- *MESH_TVERT 21 0.851626 0.471364 0.000000
- *MESH_TVERT 22 0.925112 0.469824 0.000000
- *MESH_TVERT 23 0.851626 0.371312 0.000000
- *MESH_TVERT 24 0.851626 0.371312 0.000000
- *MESH_TVERT 25 0.925112 0.469824 0.000000
- *MESH_TVERT 26 0.878477 0.325135 0.000000
- *MESH_TVERT 27 0.878477 0.325135 0.000000
- *MESH_TVERT 28 0.925112 0.469824 0.000000
- *MESH_TVERT 29 0.926526 0.325135 0.000000
- *MESH_TVERT 30 0.878477 0.325135 0.000000
- *MESH_TVERT 31 0.926526 0.325135 0.000000
- *MESH_TVERT 32 0.954790 0.208152 0.000000
- *MESH_TVERT 33 0.878477 0.325135 0.000000
- *MESH_TVERT 34 0.954790 0.208152 0.000000
- *MESH_TVERT 35 0.932178 0.174289 0.000000
- *MESH_TVERT 36 0.851626 0.371312 0.000000
- *MESH_TVERT 37 0.878477 0.325135 0.000000
- *MESH_TVERT 38 0.851626 0.371312 0.000000
- *MESH_TVERT 39 0.851626 0.371312 0.000000
- *MESH_TVERT 40 0.878477 0.325135 0.000000
- *MESH_TVERT 41 0.878477 0.325135 0.000000
- *MESH_TVERT 42 0.851626 0.471364 0.000000
- *MESH_TVERT 43 0.851626 0.371312 0.000000
- *MESH_TVERT 44 0.851626 0.471364 0.000000
- *MESH_TVERT 45 0.851626 0.471364 0.000000
- *MESH_TVERT 46 0.851626 0.371312 0.000000
- *MESH_TVERT 47 0.851626 0.371312 0.000000
- *MESH_TVERT 48 0.905328 0.485217 0.000000
- *MESH_TVERT 49 0.851626 0.471364 0.000000
- *MESH_TVERT 50 0.905328 0.485217 0.000000
- *MESH_TVERT 51 0.905328 0.485217 0.000000
- *MESH_TVERT 52 0.851626 0.471364 0.000000
- *MESH_TVERT 53 0.851626 0.471364 0.000000
- *MESH_TVERT 54 0.925112 0.469824 0.000000
- *MESH_TVERT 55 0.905328 0.485217 0.000000
- *MESH_TVERT 56 0.925112 0.469824 0.000000
- *MESH_TVERT 57 0.925112 0.469824 0.000000
- *MESH_TVERT 58 0.905328 0.485217 0.000000
- *MESH_TVERT 59 0.905328 0.485217 0.000000
- *MESH_TVERT 60 0.926526 0.325135 0.000000
- *MESH_TVERT 61 0.925112 0.469824 0.000000
- *MESH_TVERT 62 0.926526 0.325135 0.000000
- *MESH_TVERT 63 0.926526 0.325135 0.000000
- *MESH_TVERT 64 0.925112 0.469824 0.000000
- *MESH_TVERT 65 0.925112 0.469824 0.000000
- *MESH_TVERT 66 0.954790 0.208152 0.000000
- *MESH_TVERT 67 0.926526 0.325135 0.000000
- *MESH_TVERT 68 0.954790 0.208152 0.000000
- *MESH_TVERT 69 0.954790 0.208152 0.000000
- *MESH_TVERT 70 0.926526 0.325135 0.000000
- *MESH_TVERT 71 0.926526 0.325135 0.000000
- *MESH_TVERT 72 0.932178 0.174289 0.000000
- *MESH_TVERT 73 0.954790 0.208152 0.000000
- *MESH_TVERT 74 0.932178 0.174289 0.000000
- *MESH_TVERT 75 0.932178 0.174289 0.000000
- *MESH_TVERT 76 0.954790 0.208152 0.000000
- *MESH_TVERT 77 0.954790 0.208152 0.000000
- *MESH_TVERT 78 0.878477 0.325135 0.000000
- *MESH_TVERT 79 0.932178 0.174289 0.000000
- *MESH_TVERT 80 0.878477 0.325135 0.000000
- *MESH_TVERT 81 0.878477 0.325135 0.000000
- *MESH_TVERT 82 0.932178 0.174289 0.000000
- *MESH_TVERT 83 0.932178 0.174289 0.000000
- *MESH_TVERT 84 0.855669 0.410771 0.000000
- *MESH_TVERT 85 0.855669 0.445526 0.000000
- *MESH_TVERT 86 0.822480 0.445526 0.000000
- *MESH_TVERT 87 0.822480 0.445526 0.000000
- *MESH_TVERT 88 0.822480 0.410771 0.000000
- *MESH_TVERT 89 0.855669 0.410771 0.000000
- *MESH_TVERT 90 0.855669 0.445526 0.000000
- *MESH_TVERT 91 0.855669 0.445526 0.000000
- *MESH_TVERT 92 0.822480 0.445526 0.000000
- *MESH_TVERT 93 0.822480 0.445526 0.000000
- *MESH_TVERT 94 0.822480 0.445526 0.000000
- *MESH_TVERT 95 0.855669 0.445526 0.000000
- *MESH_TVERT 96 0.855669 0.445526 0.000000
- *MESH_TVERT 97 0.855669 0.410771 0.000000
- *MESH_TVERT 98 0.822480 0.410771 0.000000
- *MESH_TVERT 99 0.822480 0.410771 0.000000
- *MESH_TVERT 100 0.822480 0.445526 0.000000
- *MESH_TVERT 101 0.855669 0.445526 0.000000
- *MESH_TVERT 102 0.855669 0.410771 0.000000
- *MESH_TVERT 103 0.855669 0.410771 0.000000
- *MESH_TVERT 104 0.822480 0.410771 0.000000
- *MESH_TVERT 105 0.822480 0.410771 0.000000
- *MESH_TVERT 106 0.822480 0.410771 0.000000
- *MESH_TVERT 107 0.855669 0.410771 0.000000
- *MESH_TVERT 108 0.113527 0.118357 0.000000
- *MESH_TVERT 109 0.203079 0.170060 0.000000
- *MESH_TVERT 110 0.216932 0.118357 0.000000
- *MESH_TVERT 111 0.113527 0.118357 0.000000
- *MESH_TVERT 112 0.165229 0.207910 0.000000
- *MESH_TVERT 113 0.203079 0.170060 0.000000
- *MESH_TVERT 114 0.113527 0.118357 0.000000
- *MESH_TVERT 115 0.113527 0.221763 0.000000
- *MESH_TVERT 116 0.165229 0.207910 0.000000
- *MESH_TVERT 117 0.113527 0.118357 0.000000
- *MESH_TVERT 118 0.061824 0.207910 0.000000
- *MESH_TVERT 119 0.113527 0.221763 0.000000
- *MESH_TVERT 120 0.113527 0.118357 0.000000
- *MESH_TVERT 121 0.023975 0.170060 0.000000
- *MESH_TVERT 122 0.061824 0.207910 0.000000
- *MESH_TVERT 123 0.113527 0.118357 0.000000
- *MESH_TVERT 124 0.010121 0.118358 0.000000
- *MESH_TVERT 125 0.023975 0.170060 0.000000
- *MESH_TVERT 126 0.113527 0.118357 0.000000
- *MESH_TVERT 127 0.023974 0.066655 0.000000
- *MESH_TVERT 128 0.010121 0.118358 0.000000
- *MESH_TVERT 129 0.113527 0.118357 0.000000
- *MESH_TVERT 130 0.061824 0.028805 0.000000
- *MESH_TVERT 131 0.023974 0.066655 0.000000
- *MESH_TVERT 132 0.113527 0.118357 0.000000
- *MESH_TVERT 133 0.113526 0.014952 0.000000
- *MESH_TVERT 134 0.061824 0.028805 0.000000
- *MESH_TVERT 135 0.113527 0.118357 0.000000
- *MESH_TVERT 136 0.165229 0.028805 0.000000
- *MESH_TVERT 137 0.113526 0.014952 0.000000
- *MESH_TVERT 138 0.113527 0.118357 0.000000
- *MESH_TVERT 139 0.203079 0.066655 0.000000
- *MESH_TVERT 140 0.165229 0.028805 0.000000
- *MESH_TVERT 141 0.113527 0.118357 0.000000
- *MESH_TVERT 142 0.216932 0.118357 0.000000
- *MESH_TVERT 143 0.203079 0.066655 0.000000
- *MESH_TVERT 144 0.416687 0.944794 0.000000
- *MESH_TVERT 145 0.434791 0.930956 0.000000
- *MESH_TVERT 146 0.475844 0.943953 0.000000
- *MESH_TVERT 147 0.416687 0.944794 0.000000
- *MESH_TVERT 148 0.475844 0.943953 0.000000
- *MESH_TVERT 149 0.475844 0.963523 0.000000
- *MESH_TVERT 150 0.416687 0.945524 0.000000
- *MESH_TVERT 151 0.416687 0.944794 0.000000
- *MESH_TVERT 152 0.475844 0.963523 0.000000
- *MESH_TVERT 153 0.416687 0.945524 0.000000
- *MESH_TVERT 154 0.475844 0.963523 0.000000
- *MESH_TVERT 155 0.475844 0.964253 0.000000
- *MESH_TVERT 156 0.434791 0.931686 0.000000
- *MESH_TVERT 157 0.416687 0.945524 0.000000
- *MESH_TVERT 158 0.475844 0.964253 0.000000
- *MESH_TVERT 159 0.434791 0.931686 0.000000
- *MESH_TVERT 160 0.475844 0.964253 0.000000
- *MESH_TVERT 161 0.475844 0.944683 0.000000
- *MESH_TVERT 162 0.434791 0.930956 0.000000
- *MESH_TVERT 163 0.434791 0.931686 0.000000
- *MESH_TVERT 164 0.475844 0.944683 0.000000
- *MESH_TVERT 165 0.434791 0.930956 0.000000
- *MESH_TVERT 166 0.475844 0.944683 0.000000
- *MESH_TVERT 167 0.475844 0.943953 0.000000
- *MESH_TVERT 168 0.392183 0.899577 0.000000
- *MESH_TVERT 169 0.417787 0.899577 0.000000
- *MESH_TVERT 170 0.434791 0.930956 0.000000
- *MESH_TVERT 171 0.392183 0.899577 0.000000
- *MESH_TVERT 172 0.434791 0.930956 0.000000
- *MESH_TVERT 173 0.416687 0.944794 0.000000
- *MESH_TVERT 174 0.392183 0.900307 0.000000
- *MESH_TVERT 175 0.392183 0.899577 0.000000
- *MESH_TVERT 176 0.416687 0.944794 0.000000
- *MESH_TVERT 177 0.392183 0.900307 0.000000
- *MESH_TVERT 178 0.416687 0.944794 0.000000
- *MESH_TVERT 179 0.416687 0.945524 0.000000
- *MESH_TVERT 180 0.417787 0.900307 0.000000
- *MESH_TVERT 181 0.392183 0.900307 0.000000
- *MESH_TVERT 182 0.416687 0.945524 0.000000
- *MESH_TVERT 183 0.417787 0.900307 0.000000
- *MESH_TVERT 184 0.416687 0.945524 0.000000
- *MESH_TVERT 185 0.434791 0.931686 0.000000
- *MESH_TVERT 186 0.417787 0.899577 0.000000
- *MESH_TVERT 187 0.417787 0.900307 0.000000
- *MESH_TVERT 188 0.434791 0.931686 0.000000
- *MESH_TVERT 189 0.417787 0.899577 0.000000
- *MESH_TVERT 190 0.434791 0.931686 0.000000
- *MESH_TVERT 191 0.434791 0.930956 0.000000
- *MESH_TVERT 192 0.456823 0.803298 0.000000
- *MESH_TVERT 193 0.456823 0.868199 0.000000
- *MESH_TVERT 194 0.417787 0.899577 0.000000
- *MESH_TVERT 195 0.456823 0.803298 0.000000
- *MESH_TVERT 196 0.417787 0.899577 0.000000
- *MESH_TVERT 197 0.392183 0.899577 0.000000
- *MESH_TVERT 198 0.456823 0.796932 0.000000
- *MESH_TVERT 199 0.456823 0.803298 0.000000
- *MESH_TVERT 200 0.392183 0.899577 0.000000
- *MESH_TVERT 201 0.456823 0.796932 0.000000
- *MESH_TVERT 202 0.392183 0.899577 0.000000
- *MESH_TVERT 203 0.392183 0.900307 0.000000
- *MESH_TVERT 204 0.456823 0.864603 0.000000
- *MESH_TVERT 205 0.456823 0.796932 0.000000
- *MESH_TVERT 206 0.392183 0.900307 0.000000
- *MESH_TVERT 207 0.456823 0.864603 0.000000
- *MESH_TVERT 208 0.392183 0.900307 0.000000
- *MESH_TVERT 209 0.417787 0.900307 0.000000
- *MESH_TVERT 210 0.456823 0.868199 0.000000
- *MESH_TVERT 211 0.456823 0.864603 0.000000
- *MESH_TVERT 212 0.417787 0.900307 0.000000
- *MESH_TVERT 213 0.456823 0.868199 0.000000
- *MESH_TVERT 214 0.417787 0.900307 0.000000
- *MESH_TVERT 215 0.417787 0.899577 0.000000
- *MESH_TVERT 216 0.475844 0.805411 0.000000
- *MESH_TVERT 217 0.475844 0.899567 0.000000
- *MESH_TVERT 218 0.456823 0.868199 0.000000
- *MESH_TVERT 219 0.475844 0.805411 0.000000
- *MESH_TVERT 220 0.456823 0.868199 0.000000
- *MESH_TVERT 221 0.456823 0.803298 0.000000
- *MESH_TVERT 222 0.475844 0.896554 0.000000
- *MESH_TVERT 223 0.475844 0.802591 0.000000
- *MESH_TVERT 224 0.456823 0.796932 0.000000
- *MESH_TVERT 225 0.475844 0.896554 0.000000
- *MESH_TVERT 226 0.456823 0.796932 0.000000
- *MESH_TVERT 227 0.456823 0.864603 0.000000
- *MESH_TVERT 228 0.475844 0.899567 0.000000
- *MESH_TVERT 229 0.475844 0.896554 0.000000
- *MESH_TVERT 230 0.456823 0.864603 0.000000
- *MESH_TVERT 231 0.475844 0.899567 0.000000
- *MESH_TVERT 232 0.456823 0.864603 0.000000
- *MESH_TVERT 233 0.456823 0.868199 0.000000
- *MESH_TVERT 234 0.494862 0.803298 0.000000
- *MESH_TVERT 235 0.494865 0.868199 0.000000
- *MESH_TVERT 236 0.475844 0.899567 0.000000
- *MESH_TVERT 237 0.494862 0.803298 0.000000
- *MESH_TVERT 238 0.475844 0.899567 0.000000
- *MESH_TVERT 239 0.475844 0.805411 0.000000
- *MESH_TVERT 240 0.494865 0.864603 0.000000
- *MESH_TVERT 241 0.494862 0.796932 0.000000
- *MESH_TVERT 242 0.475844 0.802591 0.000000
- *MESH_TVERT 243 0.494865 0.864603 0.000000
- *MESH_TVERT 244 0.475844 0.802591 0.000000
- *MESH_TVERT 245 0.475844 0.896554 0.000000
- *MESH_TVERT 246 0.494865 0.868199 0.000000
- *MESH_TVERT 247 0.494865 0.864603 0.000000
- *MESH_TVERT 248 0.475844 0.896554 0.000000
- *MESH_TVERT 249 0.494865 0.868199 0.000000
- *MESH_TVERT 250 0.475844 0.896554 0.000000
- *MESH_TVERT 251 0.475844 0.899567 0.000000
- *MESH_TVERT 252 0.559505 0.899577 0.000000
- *MESH_TVERT 253 0.533902 0.899577 0.000000
- *MESH_TVERT 254 0.494865 0.868199 0.000000
- *MESH_TVERT 255 0.559505 0.899577 0.000000
- *MESH_TVERT 256 0.494865 0.868199 0.000000
- *MESH_TVERT 257 0.494862 0.803298 0.000000
- *MESH_TVERT 258 0.559505 0.900307 0.000000
- *MESH_TVERT 259 0.559505 0.899577 0.000000
- *MESH_TVERT 260 0.494862 0.803298 0.000000
- *MESH_TVERT 261 0.559505 0.900307 0.000000
- *MESH_TVERT 262 0.494862 0.803298 0.000000
- *MESH_TVERT 263 0.494862 0.796932 0.000000
- *MESH_TVERT 264 0.533902 0.900307 0.000000
- *MESH_TVERT 265 0.559505 0.900307 0.000000
- *MESH_TVERT 266 0.494862 0.796932 0.000000
- *MESH_TVERT 267 0.533902 0.900307 0.000000
- *MESH_TVERT 268 0.494862 0.796932 0.000000
- *MESH_TVERT 269 0.494865 0.864603 0.000000
- *MESH_TVERT 270 0.533902 0.899577 0.000000
- *MESH_TVERT 271 0.533902 0.900307 0.000000
- *MESH_TVERT 272 0.494865 0.864603 0.000000
- *MESH_TVERT 273 0.533902 0.899577 0.000000
- *MESH_TVERT 274 0.494865 0.864603 0.000000
- *MESH_TVERT 275 0.494865 0.868199 0.000000
- *MESH_TVERT 276 0.535001 0.944794 0.000000
- *MESH_TVERT 277 0.516897 0.930956 0.000000
- *MESH_TVERT 278 0.533902 0.899577 0.000000
- *MESH_TVERT 279 0.535001 0.944794 0.000000
- *MESH_TVERT 280 0.533902 0.899577 0.000000
- *MESH_TVERT 281 0.559505 0.899577 0.000000
- *MESH_TVERT 282 0.535001 0.945524 0.000000
- *MESH_TVERT 283 0.535001 0.944794 0.000000
- *MESH_TVERT 284 0.559505 0.899577 0.000000
- *MESH_TVERT 285 0.535001 0.945524 0.000000
- *MESH_TVERT 286 0.559505 0.899577 0.000000
- *MESH_TVERT 287 0.559505 0.900307 0.000000
- *MESH_TVERT 288 0.516897 0.931686 0.000000
- *MESH_TVERT 289 0.535001 0.945524 0.000000
- *MESH_TVERT 290 0.559505 0.900307 0.000000
- *MESH_TVERT 291 0.516897 0.931686 0.000000
- *MESH_TVERT 292 0.559505 0.900307 0.000000
- *MESH_TVERT 293 0.533902 0.900307 0.000000
- *MESH_TVERT 294 0.516897 0.930956 0.000000
- *MESH_TVERT 295 0.516897 0.931686 0.000000
- *MESH_TVERT 296 0.533902 0.900307 0.000000
- *MESH_TVERT 297 0.516897 0.930956 0.000000
- *MESH_TVERT 298 0.533902 0.900307 0.000000
- *MESH_TVERT 299 0.533902 0.899577 0.000000
- *MESH_TVERT 300 0.475844 0.963523 0.000000
- *MESH_TVERT 301 0.475844 0.943953 0.000000
- *MESH_TVERT 302 0.516897 0.930956 0.000000
- *MESH_TVERT 303 0.475844 0.963523 0.000000
- *MESH_TVERT 304 0.516897 0.930956 0.000000
- *MESH_TVERT 305 0.535001 0.944794 0.000000
- *MESH_TVERT 306 0.475844 0.964253 0.000000
- *MESH_TVERT 307 0.475844 0.963523 0.000000
- *MESH_TVERT 308 0.535001 0.944794 0.000000
- *MESH_TVERT 309 0.475844 0.964253 0.000000
- *MESH_TVERT 310 0.535001 0.944794 0.000000
- *MESH_TVERT 311 0.535001 0.945524 0.000000
- *MESH_TVERT 312 0.475844 0.944683 0.000000
- *MESH_TVERT 313 0.475844 0.964253 0.000000
- *MESH_TVERT 314 0.535001 0.945524 0.000000
- *MESH_TVERT 315 0.475844 0.944683 0.000000
- *MESH_TVERT 316 0.535001 0.945524 0.000000
- *MESH_TVERT 317 0.516897 0.931686 0.000000
- *MESH_TVERT 318 0.475844 0.943953 0.000000
- *MESH_TVERT 319 0.475844 0.944683 0.000000
- *MESH_TVERT 320 0.516897 0.931686 0.000000
- *MESH_TVERT 321 0.475844 0.943953 0.000000
- *MESH_TVERT 322 0.516897 0.931686 0.000000
- *MESH_TVERT 323 0.516897 0.930956 0.000000
- *MESH_TVERT 324 0.971284 0.738728 0.000000
- *MESH_TVERT 325 0.969001 0.753842 0.000000
- *MESH_TVERT 326 0.971284 0.746326 0.000000
- *MESH_TVERT 327 0.971284 0.738728 0.000000
- *MESH_TVERT 328 0.963866 0.753842 0.000000
- *MESH_TVERT 329 0.969001 0.753842 0.000000
- *MESH_TVERT 330 0.804021 0.753842 0.000000
- *MESH_TVERT 331 0.801738 0.738728 0.000000
- *MESH_TVERT 332 0.801738 0.746326 0.000000
- *MESH_TVERT 333 0.804021 0.753842 0.000000
- *MESH_TVERT 334 0.809156 0.753842 0.000000
- *MESH_TVERT 335 0.801738 0.738728 0.000000
- *MESH_TVERT 336 0.886511 0.698854 0.000000
- *MESH_TVERT 337 0.866973 0.753842 0.000000
- *MESH_TVERT 338 0.871527 0.753842 0.000000
- *MESH_TVERT 339 0.886511 0.698854 0.000000
- *MESH_TVERT 340 0.886511 0.706452 0.000000
- *MESH_TVERT 341 0.866973 0.753842 0.000000
- *MESH_TVERT 342 0.906049 0.753842 0.000000
- *MESH_TVERT 343 0.886511 0.698854 0.000000
- *MESH_TVERT 344 0.901495 0.753842 0.000000
- *MESH_TVERT 345 0.906049 0.753842 0.000000
- *MESH_TVERT 346 0.886511 0.706452 0.000000
- *MESH_TVERT 347 0.886511 0.698854 0.000000
- *MESH_TVERT 348 0.809156 0.753842 0.000000
- *MESH_TVERT 349 0.804021 0.753842 0.000000
- *MESH_TVERT 350 0.828258 0.753842 0.000000
- *MESH_TVERT 351 0.828258 0.753842 0.000000
- *MESH_TVERT 352 0.828258 0.753842 0.000000
- *MESH_TVERT 353 0.809156 0.753842 0.000000
- *MESH_TVERT 354 0.828258 0.753842 0.000000
- *MESH_TVERT 355 0.801738 0.738728 0.000000
- *MESH_TVERT 356 0.809156 0.753842 0.000000
- *MESH_TVERT 357 0.828258 0.753842 0.000000
- *MESH_TVERT 358 0.828258 0.584466 0.000000
- *MESH_TVERT 359 0.801738 0.738728 0.000000
- *MESH_TVERT 360 0.828258 0.584466 0.000000
- *MESH_TVERT 361 0.801738 0.584466 0.000000
- *MESH_TVERT 362 0.801738 0.738728 0.000000
- *MESH_TVERT 363 0.828258 0.753842 0.000000
- *MESH_TVERT 364 0.801738 0.746326 0.000000
- *MESH_TVERT 365 0.828258 0.584466 0.000000
- *MESH_TVERT 366 0.801738 0.746326 0.000000
- *MESH_TVERT 367 0.801738 0.584466 0.000000
- *MESH_TVERT 368 0.828258 0.584466 0.000000
- *MESH_TVERT 369 0.828258 0.753842 0.000000
- *MESH_TVERT 370 0.804021 0.753842 0.000000
- *MESH_TVERT 371 0.801738 0.746326 0.000000
- *MESH_TVERT 372 0.828258 0.584466 0.000000
- *MESH_TVERT 373 0.828258 0.753842 0.000000
- *MESH_TVERT 374 0.859991 0.753842 0.000000
- *MESH_TVERT 375 0.859991 0.753842 0.000000
- *MESH_TVERT 376 0.859991 0.584466 0.000000
- *MESH_TVERT 377 0.828258 0.584466 0.000000
- *MESH_TVERT 378 0.828258 0.753842 0.000000
- *MESH_TVERT 379 0.828258 0.753842 0.000000
- *MESH_TVERT 380 0.859991 0.753842 0.000000
- *MESH_TVERT 381 0.859991 0.753842 0.000000
- *MESH_TVERT 382 0.859991 0.753842 0.000000
- *MESH_TVERT 383 0.828258 0.753842 0.000000
- *MESH_TVERT 384 0.828258 0.753842 0.000000
- *MESH_TVERT 385 0.828258 0.584466 0.000000
- *MESH_TVERT 386 0.859991 0.584466 0.000000
- *MESH_TVERT 387 0.859991 0.584466 0.000000
- *MESH_TVERT 388 0.859991 0.753842 0.000000
- *MESH_TVERT 389 0.828258 0.753842 0.000000
- *MESH_TVERT 390 0.886511 0.706452 0.000000
- *MESH_TVERT 391 0.859991 0.753842 0.000000
- *MESH_TVERT 392 0.866973 0.753842 0.000000
- *MESH_TVERT 393 0.886511 0.706452 0.000000
- *MESH_TVERT 394 0.859991 0.584466 0.000000
- *MESH_TVERT 395 0.859991 0.753842 0.000000
- *MESH_TVERT 396 0.886511 0.706452 0.000000
- *MESH_TVERT 397 0.886511 0.584466 0.000000
- *MESH_TVERT 398 0.859991 0.584466 0.000000
- *MESH_TVERT 399 0.871527 0.753842 0.000000
- *MESH_TVERT 400 0.866973 0.753842 0.000000
- *MESH_TVERT 401 0.859991 0.753842 0.000000
- *MESH_TVERT 402 0.859991 0.753842 0.000000
- *MESH_TVERT 403 0.859991 0.753842 0.000000
- *MESH_TVERT 404 0.871527 0.753842 0.000000
- *MESH_TVERT 405 0.886511 0.584466 0.000000
- *MESH_TVERT 406 0.859991 0.753842 0.000000
- *MESH_TVERT 407 0.859991 0.584466 0.000000
- *MESH_TVERT 408 0.886511 0.584466 0.000000
- *MESH_TVERT 409 0.886511 0.698854 0.000000
- *MESH_TVERT 410 0.859991 0.753842 0.000000
- *MESH_TVERT 411 0.886511 0.698854 0.000000
- *MESH_TVERT 412 0.871527 0.753842 0.000000
- *MESH_TVERT 413 0.859991 0.753842 0.000000
- *MESH_TVERT 414 0.913031 0.584466 0.000000
- *MESH_TVERT 415 0.906049 0.753842 0.000000
- *MESH_TVERT 416 0.913031 0.753842 0.000000
- *MESH_TVERT 417 0.913031 0.584466 0.000000
- *MESH_TVERT 418 0.886511 0.706452 0.000000
- *MESH_TVERT 419 0.906049 0.753842 0.000000
- *MESH_TVERT 420 0.913031 0.584466 0.000000
- *MESH_TVERT 421 0.886511 0.584466 0.000000
- *MESH_TVERT 422 0.886511 0.706452 0.000000
- *MESH_TVERT 423 0.913031 0.753842 0.000000
- *MESH_TVERT 424 0.906049 0.753842 0.000000
- *MESH_TVERT 425 0.901495 0.753842 0.000000
- *MESH_TVERT 426 0.901495 0.753842 0.000000
- *MESH_TVERT 427 0.913031 0.753842 0.000000
- *MESH_TVERT 428 0.913031 0.753842 0.000000
- *MESH_TVERT 429 0.913031 0.584466 0.000000
- *MESH_TVERT 430 0.913031 0.753842 0.000000
- *MESH_TVERT 431 0.886511 0.584466 0.000000
- *MESH_TVERT 432 0.913031 0.753842 0.000000
- *MESH_TVERT 433 0.886511 0.698854 0.000000
- *MESH_TVERT 434 0.886511 0.584466 0.000000
- *MESH_TVERT 435 0.913031 0.753842 0.000000
- *MESH_TVERT 436 0.901495 0.753842 0.000000
- *MESH_TVERT 437 0.886511 0.698854 0.000000
- *MESH_TVERT 438 0.913031 0.584466 0.000000
- *MESH_TVERT 439 0.913031 0.753842 0.000000
- *MESH_TVERT 440 0.944764 0.753842 0.000000
- *MESH_TVERT 441 0.944764 0.753842 0.000000
- *MESH_TVERT 442 0.944764 0.584466 0.000000
- *MESH_TVERT 443 0.913031 0.584466 0.000000
- *MESH_TVERT 444 0.913031 0.753842 0.000000
- *MESH_TVERT 445 0.913031 0.753842 0.000000
- *MESH_TVERT 446 0.944764 0.753842 0.000000
- *MESH_TVERT 447 0.944764 0.753842 0.000000
- *MESH_TVERT 448 0.944764 0.753842 0.000000
- *MESH_TVERT 449 0.913031 0.753842 0.000000
- *MESH_TVERT 450 0.913031 0.753842 0.000000
- *MESH_TVERT 451 0.913031 0.584466 0.000000
- *MESH_TVERT 452 0.944764 0.584466 0.000000
- *MESH_TVERT 453 0.944764 0.584466 0.000000
- *MESH_TVERT 454 0.944764 0.753842 0.000000
- *MESH_TVERT 455 0.913031 0.753842 0.000000
- *MESH_TVERT 456 0.971284 0.584466 0.000000
- *MESH_TVERT 457 0.963866 0.753842 0.000000
- *MESH_TVERT 458 0.971284 0.738728 0.000000
- *MESH_TVERT 459 0.971284 0.584466 0.000000
- *MESH_TVERT 460 0.944764 0.584466 0.000000
- *MESH_TVERT 461 0.963866 0.753842 0.000000
- *MESH_TVERT 462 0.944764 0.584466 0.000000
- *MESH_TVERT 463 0.944764 0.753842 0.000000
- *MESH_TVERT 464 0.963866 0.753842 0.000000
- *MESH_TVERT 465 0.944764 0.753842 0.000000
- *MESH_TVERT 466 0.969001 0.753842 0.000000
- *MESH_TVERT 467 0.963866 0.753842 0.000000
- *MESH_TVERT 468 0.963866 0.753842 0.000000
- *MESH_TVERT 469 0.944764 0.753842 0.000000
- *MESH_TVERT 470 0.944764 0.753842 0.000000
- *MESH_TVERT 471 0.971284 0.584466 0.000000
- *MESH_TVERT 472 0.971284 0.746326 0.000000
- *MESH_TVERT 473 0.944764 0.584466 0.000000
- *MESH_TVERT 474 0.971284 0.746326 0.000000
- *MESH_TVERT 475 0.944764 0.753842 0.000000
- *MESH_TVERT 476 0.944764 0.584466 0.000000
- *MESH_TVERT 477 0.971284 0.746326 0.000000
- *MESH_TVERT 478 0.969001 0.753842 0.000000
- *MESH_TVERT 479 0.944764 0.753842 0.000000
- *MESH_TVERT 480 0.511946 0.046195 0.000000
- *MESH_TVERT 481 0.441406 0.051152 0.000000
- *MESH_TVERT 482 0.512876 0.028982 0.000000
- *MESH_TVERT 483 0.441406 0.051152 0.000000
- *MESH_TVERT 484 0.428184 0.034647 0.000000
- *MESH_TVERT 485 0.512876 0.028982 0.000000
- *MESH_TVERT 486 0.441406 0.051152 0.000000
- *MESH_TVERT 487 0.419503 0.140939 0.000000
- *MESH_TVERT 488 0.428184 0.034647 0.000000
- *MESH_TVERT 489 0.419503 0.140939 0.000000
- *MESH_TVERT 490 0.400417 0.140463 0.000000
- *MESH_TVERT 491 0.428184 0.034647 0.000000
- *MESH_TVERT 492 0.512876 0.028982 0.000000
- *MESH_TVERT 493 0.552167 0.052767 0.000000
- *MESH_TVERT 494 0.511946 0.046195 0.000000
- *MESH_TVERT 495 0.552167 0.052767 0.000000
- *MESH_TVERT 496 0.557694 0.081101 0.000000
- *MESH_TVERT 497 0.511946 0.046195 0.000000
- *MESH_TVERT 498 0.552167 0.052767 0.000000
- *MESH_TVERT 499 0.574574 0.051647 0.000000
- *MESH_TVERT 500 0.557694 0.081101 0.000000
- *MESH_TVERT 501 0.511946 0.046195 0.000000
- *MESH_TVERT 502 0.512876 0.028982 0.000000
- *MESH_TVERT 503 0.441406 0.051152 0.000000
- *MESH_TVERT 504 0.441406 0.051152 0.000000
- *MESH_TVERT 505 0.512876 0.028982 0.000000
- *MESH_TVERT 506 0.428184 0.034647 0.000000
- *MESH_TVERT 507 0.441406 0.051152 0.000000
- *MESH_TVERT 508 0.428184 0.034647 0.000000
- *MESH_TVERT 509 0.419503 0.140939 0.000000
- *MESH_TVERT 510 0.419503 0.140939 0.000000
- *MESH_TVERT 511 0.428184 0.034647 0.000000
- *MESH_TVERT 512 0.400417 0.140463 0.000000
- *MESH_TVERT 513 0.512876 0.028982 0.000000
- *MESH_TVERT 514 0.511946 0.046195 0.000000
- *MESH_TVERT 515 0.552167 0.052767 0.000000
- *MESH_TVERT 516 0.552167 0.052767 0.000000
- *MESH_TVERT 517 0.511946 0.046195 0.000000
- *MESH_TVERT 518 0.557694 0.081101 0.000000
- *MESH_TVERT 519 0.552167 0.052767 0.000000
- *MESH_TVERT 520 0.557694 0.081101 0.000000
- *MESH_TVERT 521 0.574574 0.051647 0.000000
- *MESH_TVERT 522 0.441406 0.051152 0.000000
- *MESH_TVERT 523 0.419503 0.140939 0.000000
- *MESH_TVERT 524 0.441406 0.051152 0.000000
- *MESH_TVERT 525 0.441406 0.051152 0.000000
- *MESH_TVERT 526 0.419503 0.140939 0.000000
- *MESH_TVERT 527 0.419503 0.140939 0.000000
- *MESH_TVERT 528 0.511946 0.046195 0.000000
- *MESH_TVERT 529 0.441406 0.051152 0.000000
- *MESH_TVERT 530 0.511946 0.046195 0.000000
- *MESH_TVERT 531 0.511946 0.046195 0.000000
- *MESH_TVERT 532 0.441406 0.051152 0.000000
- *MESH_TVERT 533 0.441406 0.051152 0.000000
- *MESH_TVERT 534 0.557694 0.081101 0.000000
- *MESH_TVERT 535 0.511946 0.046195 0.000000
- *MESH_TVERT 536 0.557694 0.081101 0.000000
- *MESH_TVERT 537 0.557694 0.081101 0.000000
- *MESH_TVERT 538 0.511946 0.046195 0.000000
- *MESH_TVERT 539 0.511946 0.046195 0.000000
- *MESH_TVERT 540 0.552167 0.052767 0.000000
- *MESH_TVERT 541 0.574574 0.051647 0.000000
- *MESH_TVERT 542 0.552167 0.052767 0.000000
- *MESH_TVERT 543 0.552167 0.052767 0.000000
- *MESH_TVERT 544 0.574574 0.051647 0.000000
- *MESH_TVERT 545 0.574574 0.051647 0.000000
- *MESH_TVERT 546 0.512876 0.028982 0.000000
- *MESH_TVERT 547 0.552167 0.052767 0.000000
- *MESH_TVERT 548 0.512876 0.028982 0.000000
- *MESH_TVERT 549 0.512876 0.028982 0.000000
- *MESH_TVERT 550 0.552167 0.052767 0.000000
- *MESH_TVERT 551 0.552167 0.052767 0.000000
- *MESH_TVERT 552 0.428184 0.034647 0.000000
- *MESH_TVERT 553 0.512876 0.028982 0.000000
- *MESH_TVERT 554 0.428184 0.034647 0.000000
- *MESH_TVERT 555 0.428184 0.034647 0.000000
- *MESH_TVERT 556 0.512876 0.028982 0.000000
- *MESH_TVERT 557 0.512876 0.028982 0.000000
- *MESH_TVERT 558 0.400417 0.140463 0.000000
- *MESH_TVERT 559 0.428184 0.034647 0.000000
- *MESH_TVERT 560 0.400417 0.140463 0.000000
- *MESH_TVERT 561 0.400417 0.140463 0.000000
- *MESH_TVERT 562 0.428184 0.034647 0.000000
- *MESH_TVERT 563 0.428184 0.034647 0.000000
- *MESH_TVERT 564 0.512788 0.090499 0.000000
- *MESH_TVERT 565 0.524460 0.135692 0.000000
- *MESH_TVERT 566 0.498853 0.092626 0.000000
- *MESH_TVERT 567 0.524460 0.135692 0.000000
- *MESH_TVERT 568 0.492402 0.135864 0.000000
- *MESH_TVERT 569 0.498853 0.092626 0.000000
- *MESH_TVERT 570 0.498853 0.092626 0.000000
- *MESH_TVERT 571 0.482589 0.056246 0.000000
- *MESH_TVERT 572 0.512788 0.090499 0.000000
- *MESH_TVERT 573 0.512788 0.090499 0.000000
- *MESH_TVERT 574 0.498853 0.092626 0.000000
- *MESH_TVERT 575 0.524460 0.135692 0.000000
- *MESH_TVERT 576 0.524460 0.135692 0.000000
- *MESH_TVERT 577 0.498853 0.092626 0.000000
- *MESH_TVERT 578 0.492402 0.135864 0.000000
- *MESH_TVERT 579 0.498853 0.092626 0.000000
- *MESH_TVERT 580 0.512788 0.090499 0.000000
- *MESH_TVERT 581 0.482589 0.056246 0.000000
- *MESH_TVERT 582 0.512788 0.090499 0.000000
- *MESH_TVERT 583 0.524460 0.135692 0.000000
- *MESH_TVERT 584 0.512788 0.090499 0.000000
- *MESH_TVERT 585 0.512788 0.090499 0.000000
- *MESH_TVERT 586 0.524460 0.135692 0.000000
- *MESH_TVERT 587 0.524460 0.135692 0.000000
- *MESH_TVERT 588 0.482589 0.056246 0.000000
- *MESH_TVERT 589 0.512788 0.090499 0.000000
- *MESH_TVERT 590 0.482589 0.056246 0.000000
- *MESH_TVERT 591 0.482589 0.056246 0.000000
- *MESH_TVERT 592 0.512788 0.090499 0.000000
- *MESH_TVERT 593 0.512788 0.090499 0.000000
- *MESH_TVERT 594 0.498853 0.092626 0.000000
- *MESH_TVERT 595 0.482589 0.056246 0.000000
- *MESH_TVERT 596 0.498853 0.092626 0.000000
- *MESH_TVERT 597 0.498853 0.092626 0.000000
- *MESH_TVERT 598 0.482589 0.056246 0.000000
- *MESH_TVERT 599 0.482589 0.056246 0.000000
- *MESH_TVERT 600 0.492402 0.135864 0.000000
- *MESH_TVERT 601 0.498853 0.092626 0.000000
- *MESH_TVERT 602 0.492402 0.135864 0.000000
- *MESH_TVERT 603 0.492402 0.135864 0.000000
- *MESH_TVERT 604 0.498853 0.092626 0.000000
- *MESH_TVERT 605 0.498853 0.092626 0.000000
- *MESH_TVERT 606 0.319897 0.980928 0.000000
- *MESH_TVERT 607 0.311257 0.980928 0.000000
- *MESH_TVERT 608 0.311257 0.534827 0.000000
- *MESH_TVERT 609 0.319897 0.980928 0.000000
- *MESH_TVERT 610 0.311257 0.534827 0.000000
- *MESH_TVERT 611 0.319897 0.534827 0.000000
- *MESH_TVERT 612 0.328538 0.980928 0.000000
- *MESH_TVERT 613 0.319897 0.980928 0.000000
- *MESH_TVERT 614 0.319897 0.534827 0.000000
- *MESH_TVERT 615 0.328538 0.980928 0.000000
- *MESH_TVERT 616 0.319897 0.534827 0.000000
- *MESH_TVERT 617 0.328538 0.534827 0.000000
- *MESH_TVERT 618 0.337179 0.980928 0.000000
- *MESH_TVERT 619 0.328538 0.980928 0.000000
- *MESH_TVERT 620 0.328538 0.534827 0.000000
- *MESH_TVERT 621 0.337179 0.980928 0.000000
- *MESH_TVERT 622 0.328538 0.534827 0.000000
- *MESH_TVERT 623 0.337179 0.534827 0.000000
- *MESH_TVERT 624 0.242130 0.980928 0.000000
- *MESH_TVERT 625 0.233489 0.980928 0.000000
- *MESH_TVERT 626 0.233489 0.534827 0.000000
- *MESH_TVERT 627 0.242130 0.980928 0.000000
- *MESH_TVERT 628 0.233489 0.534827 0.000000
- *MESH_TVERT 629 0.242130 0.534827 0.000000
- *MESH_TVERT 630 0.250771 0.980928 0.000000
- *MESH_TVERT 631 0.242130 0.980928 0.000000
- *MESH_TVERT 632 0.242130 0.534827 0.000000
- *MESH_TVERT 633 0.250771 0.980928 0.000000
- *MESH_TVERT 634 0.242130 0.534827 0.000000
- *MESH_TVERT 635 0.250771 0.534827 0.000000
- *MESH_TVERT 636 0.259411 0.980928 0.000000
- *MESH_TVERT 637 0.250771 0.980928 0.000000
- *MESH_TVERT 638 0.250771 0.534827 0.000000
- *MESH_TVERT 639 0.259411 0.980928 0.000000
- *MESH_TVERT 640 0.250771 0.534827 0.000000
- *MESH_TVERT 641 0.259411 0.534827 0.000000
- *MESH_TVERT 642 0.268052 0.980928 0.000000
- *MESH_TVERT 643 0.259411 0.980928 0.000000
- *MESH_TVERT 644 0.259411 0.534827 0.000000
- *MESH_TVERT 645 0.268052 0.980928 0.000000
- *MESH_TVERT 646 0.259411 0.534827 0.000000
- *MESH_TVERT 647 0.268052 0.534827 0.000000
- *MESH_TVERT 648 0.276693 0.980928 0.000000
- *MESH_TVERT 649 0.268052 0.980928 0.000000
- *MESH_TVERT 650 0.268052 0.534827 0.000000
- *MESH_TVERT 651 0.276693 0.980928 0.000000
- *MESH_TVERT 652 0.268052 0.534827 0.000000
- *MESH_TVERT 653 0.276693 0.534827 0.000000
- *MESH_TVERT 654 0.285334 0.980928 0.000000
- *MESH_TVERT 655 0.276693 0.980928 0.000000
- *MESH_TVERT 656 0.276693 0.534827 0.000000
- *MESH_TVERT 657 0.285334 0.980928 0.000000
- *MESH_TVERT 658 0.276693 0.534827 0.000000
- *MESH_TVERT 659 0.285334 0.534827 0.000000
- *MESH_TVERT 660 0.293975 0.980928 0.000000
- *MESH_TVERT 661 0.285334 0.980928 0.000000
- *MESH_TVERT 662 0.285334 0.534827 0.000000
- *MESH_TVERT 663 0.293975 0.980928 0.000000
- *MESH_TVERT 664 0.285334 0.534827 0.000000
- *MESH_TVERT 665 0.293975 0.534827 0.000000
- *MESH_TVERT 666 0.302616 0.980928 0.000000
- *MESH_TVERT 667 0.293975 0.980928 0.000000
- *MESH_TVERT 668 0.293975 0.534827 0.000000
- *MESH_TVERT 669 0.302616 0.980928 0.000000
- *MESH_TVERT 670 0.293975 0.534827 0.000000
- *MESH_TVERT 671 0.302616 0.534827 0.000000
- *MESH_TVERT 672 0.311257 0.980928 0.000000
- *MESH_TVERT 673 0.302616 0.980928 0.000000
- *MESH_TVERT 674 0.302616 0.534827 0.000000
- *MESH_TVERT 675 0.311257 0.980928 0.000000
- *MESH_TVERT 676 0.302616 0.534827 0.000000
- *MESH_TVERT 677 0.311257 0.534827 0.000000
- *MESH_TVERT 678 0.311594 0.105702 0.000000
- *MESH_TVERT 679 0.355029 0.147343 0.000000
- *MESH_TVERT 680 0.375390 0.105702 0.000000
- *MESH_TVERT 681 0.311594 0.105702 0.000000
- *MESH_TVERT 682 0.336671 0.183383 0.000000
- *MESH_TVERT 683 0.355029 0.147343 0.000000
- *MESH_TVERT 684 0.311594 0.105702 0.000000
- *MESH_TVERT 685 0.311594 0.192320 0.000000
- *MESH_TVERT 686 0.336671 0.183383 0.000000
- *MESH_TVERT 687 0.311594 0.105702 0.000000
- *MESH_TVERT 688 0.286517 0.183383 0.000000
- *MESH_TVERT 689 0.311594 0.192320 0.000000
- *MESH_TVERT 690 0.311594 0.105702 0.000000
- *MESH_TVERT 691 0.268159 0.147343 0.000000
- *MESH_TVERT 692 0.286517 0.183383 0.000000
- *MESH_TVERT 693 0.311594 0.105702 0.000000
- *MESH_TVERT 694 0.247798 0.105702 0.000000
- *MESH_TVERT 695 0.268159 0.147343 0.000000
- *MESH_TVERT 696 0.311594 0.105702 0.000000
- *MESH_TVERT 697 0.250785 0.059011 0.000000
- *MESH_TVERT 698 0.247798 0.105702 0.000000
- *MESH_TVERT 699 0.311594 0.105702 0.000000
- *MESH_TVERT 700 0.276486 0.024830 0.000000
- *MESH_TVERT 701 0.250785 0.059011 0.000000
- *MESH_TVERT 702 0.311594 0.105702 0.000000
- *MESH_TVERT 703 0.311594 0.014968 0.000000
- *MESH_TVERT 704 0.276486 0.024830 0.000000
- *MESH_TVERT 705 0.311594 0.105702 0.000000
- *MESH_TVERT 706 0.346702 0.024830 0.000000
- *MESH_TVERT 707 0.311594 0.014968 0.000000
- *MESH_TVERT 708 0.311594 0.105702 0.000000
- *MESH_TVERT 709 0.372403 0.059011 0.000000
- *MESH_TVERT 710 0.346702 0.024830 0.000000
- *MESH_TVERT 711 0.311594 0.105702 0.000000
- *MESH_TVERT 712 0.375390 0.105702 0.000000
- *MESH_TVERT 713 0.372403 0.059011 0.000000
- *MESH_TVERT 714 0.176111 0.989045 0.000000
- *MESH_TVERT 715 0.156917 0.989045 0.000000
- *MESH_TVERT 716 0.156595 0.294370 0.000000
- *MESH_TVERT 717 0.176111 0.989045 0.000000
- *MESH_TVERT 718 0.156595 0.294370 0.000000
- *MESH_TVERT 719 0.176111 0.294370 0.000000
- *MESH_TVERT 720 0.191912 0.989045 0.000000
- *MESH_TVERT 721 0.176111 0.989045 0.000000
- *MESH_TVERT 722 0.176111 0.294370 0.000000
- *MESH_TVERT 723 0.191912 0.989045 0.000000
- *MESH_TVERT 724 0.176111 0.294370 0.000000
- *MESH_TVERT 725 0.191912 0.294370 0.000000
- *MESH_TVERT 726 0.203454 0.989045 0.000000
- *MESH_TVERT 727 0.191912 0.989045 0.000000
- *MESH_TVERT 728 0.191912 0.294370 0.000000
- *MESH_TVERT 729 0.203454 0.989045 0.000000
- *MESH_TVERT 730 0.191912 0.294370 0.000000
- *MESH_TVERT 731 0.203454 0.294370 0.000000
- *MESH_TVERT 732 0.024484 0.989045 0.000000
- *MESH_TVERT 733 0.012942 0.989045 0.000000
- *MESH_TVERT 734 0.012942 0.294370 0.000000
- *MESH_TVERT 735 0.024484 0.989045 0.000000
- *MESH_TVERT 736 0.012942 0.294370 0.000000
- *MESH_TVERT 737 0.024484 0.294370 0.000000
- *MESH_TVERT 738 0.040285 0.989045 0.000000
- *MESH_TVERT 739 0.024484 0.989045 0.000000
- *MESH_TVERT 740 0.024484 0.294370 0.000000
- *MESH_TVERT 741 0.040285 0.989045 0.000000
- *MESH_TVERT 742 0.024484 0.294370 0.000000
- *MESH_TVERT 743 0.040285 0.294370 0.000000
- *MESH_TVERT 744 0.059479 0.989045 0.000000
- *MESH_TVERT 745 0.040285 0.989045 0.000000
- *MESH_TVERT 746 0.040285 0.294370 0.000000
- *MESH_TVERT 747 0.059479 0.989045 0.000000
- *MESH_TVERT 748 0.040285 0.294370 0.000000
- *MESH_TVERT 749 0.059801 0.294370 0.000000
- *MESH_TVERT 750 0.080664 0.989041 0.000000
- *MESH_TVERT 751 0.059479 0.989045 0.000000
- *MESH_TVERT 752 0.059801 0.294370 0.000000
- *MESH_TVERT 753 0.080664 0.989041 0.000000
- *MESH_TVERT 754 0.059801 0.294370 0.000000
- *MESH_TVERT 755 0.076434 0.294370 0.000000
- *MESH_TVERT 756 0.092476 0.989041 0.000000
- *MESH_TVERT 757 0.080664 0.989041 0.000000
- *MESH_TVERT 758 0.076434 0.294370 0.000000
- *MESH_TVERT 759 0.092476 0.989041 0.000000
- *MESH_TVERT 760 0.076434 0.294370 0.000000
- *MESH_TVERT 761 0.092562 0.294370 0.000000
- *MESH_TVERT 762 0.108198 0.989041 0.000000
- *MESH_TVERT 763 0.092476 0.989041 0.000000
- *MESH_TVERT 764 0.092562 0.294370 0.000000
- *MESH_TVERT 765 0.108198 0.989041 0.000000
- *MESH_TVERT 766 0.092562 0.294370 0.000000
- *MESH_TVERT 767 0.108198 0.294370 0.000000
- *MESH_TVERT 768 0.123920 0.989041 0.000000
- *MESH_TVERT 769 0.108198 0.989041 0.000000
- *MESH_TVERT 770 0.108198 0.294370 0.000000
- *MESH_TVERT 771 0.123920 0.989041 0.000000
- *MESH_TVERT 772 0.108198 0.294370 0.000000
- *MESH_TVERT 773 0.123834 0.294370 0.000000
- *MESH_TVERT 774 0.135731 0.989041 0.000000
- *MESH_TVERT 775 0.123920 0.989041 0.000000
- *MESH_TVERT 776 0.123834 0.294370 0.000000
- *MESH_TVERT 777 0.135731 0.989041 0.000000
- *MESH_TVERT 778 0.123834 0.294370 0.000000
- *MESH_TVERT 779 0.139962 0.294370 0.000000
- *MESH_TVERT 780 0.156917 0.989045 0.000000
- *MESH_TVERT 781 0.135731 0.989041 0.000000
- *MESH_TVERT 782 0.139962 0.294370 0.000000
- *MESH_TVERT 783 0.156917 0.989045 0.000000
- *MESH_TVERT 784 0.139962 0.294370 0.000000
- *MESH_TVERT 785 0.156595 0.294370 0.000000
- *MESH_TVERT 786 0.548371 0.537029 0.000000
- *MESH_TVERT 787 0.674964 0.670528 0.000000
- *MESH_TVERT 788 0.406884 0.588073 0.000000
- *MESH_TVERT 789 0.674964 0.670528 0.000000
- *MESH_TVERT 790 0.552094 0.733351 0.000000
- *MESH_TVERT 791 0.406884 0.588073 0.000000
- *MESH_TVERT 792 0.674964 0.670528 0.000000
- *MESH_TVERT 793 0.768048 0.800100 0.000000
- *MESH_TVERT 794 0.552094 0.733351 0.000000
- *MESH_TVERT 795 0.768048 0.800100 0.000000
- *MESH_TVERT 796 0.637731 0.851144 0.000000
- *MESH_TVERT 797 0.552094 0.733351 0.000000
- *MESH_TVERT 798 0.768048 0.800100 0.000000
- *MESH_TVERT 799 0.838791 0.929673 0.000000
- *MESH_TVERT 800 0.637731 0.851144 0.000000
- *MESH_TVERT 801 0.838791 0.929673 0.000000
- *MESH_TVERT 802 0.686134 0.968937 0.000000
- *MESH_TVERT 803 0.637731 0.851144 0.000000
- *MESH_TVERT 804 0.548371 0.537029 0.000000
- *MESH_TVERT 805 0.406884 0.588073 0.000000
- *MESH_TVERT 806 0.674964 0.670528 0.000000
- *MESH_TVERT 807 0.674964 0.670528 0.000000
- *MESH_TVERT 808 0.406884 0.588073 0.000000
- *MESH_TVERT 809 0.552094 0.733351 0.000000
- *MESH_TVERT 810 0.674964 0.670528 0.000000
- *MESH_TVERT 811 0.552094 0.733351 0.000000
- *MESH_TVERT 812 0.768048 0.800100 0.000000
- *MESH_TVERT 813 0.768048 0.800100 0.000000
- *MESH_TVERT 814 0.552094 0.733351 0.000000
- *MESH_TVERT 815 0.637731 0.851144 0.000000
- *MESH_TVERT 816 0.768048 0.800100 0.000000
- *MESH_TVERT 817 0.637731 0.851144 0.000000
- *MESH_TVERT 818 0.838791 0.929673 0.000000
- *MESH_TVERT 819 0.838791 0.929673 0.000000
- *MESH_TVERT 820 0.637731 0.851144 0.000000
- *MESH_TVERT 821 0.686134 0.968937 0.000000
- *MESH_TVERT 822 0.768048 0.800100 0.000000
- *MESH_TVERT 823 0.838791 0.929673 0.000000
- *MESH_TVERT 824 0.768048 0.800100 0.000000
- *MESH_TVERT 825 0.768048 0.800100 0.000000
- *MESH_TVERT 826 0.838791 0.929673 0.000000
- *MESH_TVERT 827 0.838791 0.929673 0.000000
- *MESH_TVERT 828 0.674964 0.670528 0.000000
- *MESH_TVERT 829 0.768048 0.800100 0.000000
- *MESH_TVERT 830 0.674964 0.670528 0.000000
- *MESH_TVERT 831 0.674964 0.670528 0.000000
- *MESH_TVERT 832 0.768048 0.800100 0.000000
- *MESH_TVERT 833 0.768048 0.800100 0.000000
- *MESH_TVERT 834 0.548371 0.537029 0.000000
- *MESH_TVERT 835 0.674964 0.670528 0.000000
- *MESH_TVERT 836 0.548371 0.537029 0.000000
- *MESH_TVERT 837 0.548371 0.537029 0.000000
- *MESH_TVERT 838 0.674964 0.670528 0.000000
- *MESH_TVERT 839 0.674964 0.670528 0.000000
- *MESH_TVERT 840 0.406884 0.588073 0.000000
- *MESH_TVERT 841 0.548371 0.537029 0.000000
- *MESH_TVERT 842 0.406884 0.588073 0.000000
- *MESH_TVERT 843 0.406884 0.588073 0.000000
- *MESH_TVERT 844 0.548371 0.537029 0.000000
- *MESH_TVERT 845 0.548371 0.537029 0.000000
- *MESH_TVERT 846 0.552094 0.733351 0.000000
- *MESH_TVERT 847 0.406884 0.588073 0.000000
- *MESH_TVERT 848 0.552094 0.733351 0.000000
- *MESH_TVERT 849 0.552094 0.733351 0.000000
- *MESH_TVERT 850 0.406884 0.588073 0.000000
- *MESH_TVERT 851 0.406884 0.588073 0.000000
- *MESH_TVERT 852 0.637731 0.851144 0.000000
- *MESH_TVERT 853 0.552094 0.733351 0.000000
- *MESH_TVERT 854 0.637731 0.851144 0.000000
- *MESH_TVERT 855 0.637731 0.851144 0.000000
- *MESH_TVERT 856 0.552094 0.733351 0.000000
- *MESH_TVERT 857 0.552094 0.733351 0.000000
- *MESH_TVERT 858 0.686134 0.968937 0.000000
- *MESH_TVERT 859 0.637731 0.851144 0.000000
- *MESH_TVERT 860 0.686134 0.968937 0.000000
- *MESH_TVERT 861 0.686134 0.968937 0.000000
- *MESH_TVERT 862 0.637731 0.851144 0.000000
- *MESH_TVERT 863 0.637731 0.851144 0.000000
- *MESH_TVERT 864 0.326306 0.370661 0.000000
- *MESH_TVERT 865 0.355063 0.369147 0.000000
- *MESH_TVERT 866 0.326306 0.370663 0.000000
- *MESH_TVERT 867 0.326306 0.370661 0.000000
- *MESH_TVERT 868 0.355062 0.369147 0.000000
- *MESH_TVERT 869 0.355063 0.369147 0.000000
- *MESH_TVERT 870 0.356541 0.387315 0.000000
- *MESH_TVERT 871 0.326306 0.370663 0.000000
- *MESH_TVERT 872 0.355063 0.369147 0.000000
- *MESH_TVERT 873 0.356541 0.387315 0.000000
- *MESH_TVERT 874 0.326306 0.512674 0.000000
- *MESH_TVERT 875 0.326306 0.370663 0.000000
- *MESH_TVERT 876 0.356541 0.387315 0.000000
- *MESH_TVERT 877 0.801588 0.512948 0.000000
- *MESH_TVERT 878 0.326306 0.512674 0.000000
- *MESH_TVERT 879 0.356541 0.387315 0.000000
- *MESH_TVERT 880 0.822147 0.464528 0.000000
- *MESH_TVERT 881 0.801588 0.512948 0.000000
- *MESH_TVERT 882 0.356541 0.387315 0.000000
- *MESH_TVERT 883 0.822156 0.381259 0.000000
- *MESH_TVERT 884 0.822147 0.464528 0.000000
- *MESH_TVERT 885 0.356541 0.387315 0.000000
- *MESH_TVERT 886 0.355062 0.369147 0.000000
- *MESH_TVERT 887 0.326306 0.370661 0.000000
- *MESH_TVERT 888 0.356541 0.387315 0.000000
- *MESH_TVERT 889 0.326306 0.370661 0.000000
- *MESH_TVERT 890 0.326307 0.512674 0.000000
- *MESH_TVERT 891 0.356541 0.387315 0.000000
- *MESH_TVERT 892 0.326307 0.512674 0.000000
- *MESH_TVERT 893 0.801588 0.512948 0.000000
- *MESH_TVERT 894 0.356541 0.387315 0.000000
- *MESH_TVERT 895 0.801588 0.512948 0.000000
- *MESH_TVERT 896 0.822147 0.464528 0.000000
- *MESH_TVERT 897 0.356541 0.387315 0.000000
- *MESH_TVERT 898 0.822147 0.464528 0.000000
- *MESH_TVERT 899 0.822156 0.381259 0.000000
- *MESH_TVERT 900 0.326307 0.512674 0.000000
- *MESH_TVERT 901 0.326306 0.370663 0.000000
- *MESH_TVERT 902 0.326306 0.512674 0.000000
- *MESH_TVERT 903 0.326307 0.512674 0.000000
- *MESH_TVERT 904 0.326306 0.370661 0.000000
- *MESH_TVERT 905 0.326306 0.370663 0.000000
- *MESH_TVERT 906 0.801588 0.512948 0.000000
- *MESH_TVERT 907 0.326306 0.512674 0.000000
- *MESH_TVERT 908 0.801588 0.512948 0.000000
- *MESH_TVERT 909 0.801588 0.512948 0.000000
- *MESH_TVERT 910 0.326307 0.512674 0.000000
- *MESH_TVERT 911 0.326306 0.512674 0.000000
- *MESH_TVERT 912 0.822147 0.464528 0.000000
- *MESH_TVERT 913 0.801588 0.512948 0.000000
- *MESH_TVERT 914 0.822147 0.464528 0.000000
- *MESH_TVERT 915 0.822147 0.464528 0.000000
- *MESH_TVERT 916 0.801588 0.512948 0.000000
- *MESH_TVERT 917 0.801588 0.512948 0.000000
- *MESH_TVERT 918 0.822156 0.381259 0.000000
- *MESH_TVERT 919 0.822147 0.464528 0.000000
- *MESH_TVERT 920 0.822156 0.381259 0.000000
- *MESH_TVERT 921 0.822156 0.381259 0.000000
- *MESH_TVERT 922 0.822147 0.464528 0.000000
- *MESH_TVERT 923 0.822147 0.464528 0.000000
- *MESH_TVERT 924 0.709882 0.251827 0.000000
- *MESH_TVERT 925 0.641952 0.175357 0.000000
- *MESH_TVERT 926 0.721155 0.223903 0.000000
- *MESH_TVERT 927 0.709882 0.251827 0.000000
- *MESH_TVERT 928 0.617764 0.204122 0.000000
- *MESH_TVERT 929 0.641952 0.175357 0.000000
- *MESH_TVERT 930 0.709882 0.251827 0.000000
- *MESH_TVERT 931 0.602042 0.258626 0.000000
- *MESH_TVERT 932 0.617764 0.204122 0.000000
- *MESH_TVERT 933 0.709882 0.251827 0.000000
- *MESH_TVERT 934 0.714508 0.294139 0.000000
- *MESH_TVERT 935 0.602042 0.258626 0.000000
- *MESH_TVERT 936 0.714508 0.294139 0.000000
- *MESH_TVERT 937 0.466593 0.255598 0.000000
- *MESH_TVERT 938 0.602042 0.258626 0.000000
- *MESH_TVERT 939 0.714508 0.294139 0.000000
- *MESH_TVERT 940 0.418219 0.263168 0.000000
- *MESH_TVERT 941 0.466593 0.255598 0.000000
- *MESH_TVERT 942 0.714508 0.294139 0.000000
- *MESH_TVERT 943 0.350494 0.302531 0.000000
- *MESH_TVERT 944 0.418219 0.263168 0.000000
- *MESH_TVERT 945 0.714508 0.294139 0.000000
- *MESH_TVERT 946 0.356541 0.387315 0.000000
- *MESH_TVERT 947 0.350494 0.302531 0.000000
- *MESH_TVERT 948 0.641952 0.175357 0.000000
- *MESH_TVERT 949 0.687850 0.056160 0.000000
- *MESH_TVERT 950 0.721155 0.223903 0.000000
- *MESH_TVERT 951 0.687850 0.056160 0.000000
- *MESH_TVERT 952 0.794332 0.087545 0.000000
- *MESH_TVERT 953 0.721155 0.223903 0.000000
- *MESH_TVERT 954 0.687850 0.056160 0.000000
- *MESH_TVERT 955 0.691472 0.017098 0.000000
- *MESH_TVERT 956 0.794332 0.087545 0.000000
- *MESH_TVERT 957 0.714508 0.294139 0.000000
- *MESH_TVERT 958 0.738054 0.323482 0.000000
- *MESH_TVERT 959 0.356541 0.387315 0.000000
- *MESH_TVERT 960 0.738054 0.323482 0.000000
- *MESH_TVERT 961 0.799169 0.323727 0.000000
- *MESH_TVERT 962 0.356541 0.387315 0.000000
- *MESH_TVERT 963 0.799169 0.323727 0.000000
- *MESH_TVERT 964 0.822156 0.381259 0.000000
- *MESH_TVERT 965 0.356541 0.387315 0.000000
- *MESH_TVERT 966 0.709882 0.251827 0.000000
- *MESH_TVERT 967 0.721155 0.223903 0.000000
- *MESH_TVERT 968 0.641952 0.175357 0.000000
- *MESH_TVERT 969 0.709882 0.251827 0.000000
- *MESH_TVERT 970 0.641952 0.175357 0.000000
- *MESH_TVERT 971 0.617764 0.204122 0.000000
- *MESH_TVERT 972 0.709882 0.251827 0.000000
- *MESH_TVERT 973 0.617764 0.204122 0.000000
- *MESH_TVERT 974 0.602042 0.258626 0.000000
- *MESH_TVERT 975 0.709882 0.251827 0.000000
- *MESH_TVERT 976 0.602042 0.258626 0.000000
- *MESH_TVERT 977 0.714508 0.294139 0.000000
- *MESH_TVERT 978 0.714508 0.294139 0.000000
- *MESH_TVERT 979 0.602042 0.258626 0.000000
- *MESH_TVERT 980 0.466593 0.255598 0.000000
- *MESH_TVERT 981 0.714508 0.294139 0.000000
- *MESH_TVERT 982 0.466593 0.255598 0.000000
- *MESH_TVERT 983 0.418219 0.263168 0.000000
- *MESH_TVERT 984 0.714508 0.294139 0.000000
- *MESH_TVERT 985 0.418219 0.263168 0.000000
- *MESH_TVERT 986 0.350494 0.302531 0.000000
- *MESH_TVERT 987 0.714508 0.294139 0.000000
- *MESH_TVERT 988 0.350494 0.302531 0.000000
- *MESH_TVERT 989 0.356541 0.387315 0.000000
- *MESH_TVERT 990 0.641952 0.175357 0.000000
- *MESH_TVERT 991 0.721155 0.223903 0.000000
- *MESH_TVERT 992 0.687850 0.056160 0.000000
- *MESH_TVERT 993 0.687850 0.056160 0.000000
- *MESH_TVERT 994 0.721155 0.223903 0.000000
- *MESH_TVERT 995 0.794332 0.087545 0.000000
- *MESH_TVERT 996 0.687850 0.056160 0.000000
- *MESH_TVERT 997 0.794332 0.087545 0.000000
- *MESH_TVERT 998 0.691472 0.017098 0.000000
- *MESH_TVERT 999 0.714508 0.294139 0.000000
- *MESH_TVERT 1000 0.356541 0.387315 0.000000
- *MESH_TVERT 1001 0.738054 0.323482 0.000000
- *MESH_TVERT 1002 0.738054 0.323482 0.000000
- *MESH_TVERT 1003 0.356541 0.387315 0.000000
- *MESH_TVERT 1004 0.799169 0.323727 0.000000
- *MESH_TVERT 1005 0.799169 0.323727 0.000000
- *MESH_TVERT 1006 0.356541 0.387315 0.000000
- *MESH_TVERT 1007 0.822156 0.381259 0.000000
- *MESH_TVERT 1008 0.799169 0.323727 0.000000
- *MESH_TVERT 1009 0.822156 0.381259 0.000000
- *MESH_TVERT 1010 0.799169 0.323727 0.000000
- *MESH_TVERT 1011 0.799169 0.323727 0.000000
- *MESH_TVERT 1012 0.822156 0.381259 0.000000
- *MESH_TVERT 1013 0.822156 0.381259 0.000000
- *MESH_TVERT 1014 0.738054 0.323482 0.000000
- *MESH_TVERT 1015 0.799169 0.323727 0.000000
- *MESH_TVERT 1016 0.738054 0.323482 0.000000
- *MESH_TVERT 1017 0.738054 0.323482 0.000000
- *MESH_TVERT 1018 0.799169 0.323727 0.000000
- *MESH_TVERT 1019 0.799169 0.323727 0.000000
- *MESH_TVERT 1020 0.714508 0.294139 0.000000
- *MESH_TVERT 1021 0.738054 0.323482 0.000000
- *MESH_TVERT 1022 0.714508 0.294139 0.000000
- *MESH_TVERT 1023 0.714508 0.294139 0.000000
- *MESH_TVERT 1024 0.738054 0.323482 0.000000
- *MESH_TVERT 1025 0.738054 0.323482 0.000000
- *MESH_TVERT 1026 0.709882 0.251827 0.000000
- *MESH_TVERT 1027 0.714508 0.294139 0.000000
- *MESH_TVERT 1028 0.709882 0.251827 0.000000
- *MESH_TVERT 1029 0.709882 0.251827 0.000000
- *MESH_TVERT 1030 0.714508 0.294139 0.000000
- *MESH_TVERT 1031 0.714508 0.294139 0.000000
- *MESH_TVERT 1032 0.721155 0.223903 0.000000
- *MESH_TVERT 1033 0.709882 0.251827 0.000000
- *MESH_TVERT 1034 0.721155 0.223903 0.000000
- *MESH_TVERT 1035 0.721155 0.223903 0.000000
- *MESH_TVERT 1036 0.709882 0.251827 0.000000
- *MESH_TVERT 1037 0.709882 0.251827 0.000000
- *MESH_TVERT 1038 0.794332 0.087545 0.000000
- *MESH_TVERT 1039 0.721155 0.223903 0.000000
- *MESH_TVERT 1040 0.794332 0.087545 0.000000
- *MESH_TVERT 1041 0.794332 0.087545 0.000000
- *MESH_TVERT 1042 0.721155 0.223903 0.000000
- *MESH_TVERT 1043 0.721155 0.223903 0.000000
- *MESH_TVERT 1044 0.691472 0.017098 0.000000
- *MESH_TVERT 1045 0.794332 0.087545 0.000000
- *MESH_TVERT 1046 0.691472 0.017098 0.000000
- *MESH_TVERT 1047 0.691472 0.017098 0.000000
- *MESH_TVERT 1048 0.794332 0.087545 0.000000
- *MESH_TVERT 1049 0.794332 0.087545 0.000000
- *MESH_TVERT 1050 0.687850 0.056160 0.000000
- *MESH_TVERT 1051 0.691472 0.017098 0.000000
- *MESH_TVERT 1052 0.687850 0.056160 0.000000
- *MESH_TVERT 1053 0.687850 0.056160 0.000000
- *MESH_TVERT 1054 0.691472 0.017098 0.000000
- *MESH_TVERT 1055 0.691472 0.017098 0.000000
- *MESH_TVERT 1056 0.641952 0.175357 0.000000
- *MESH_TVERT 1057 0.687850 0.056160 0.000000
- *MESH_TVERT 1058 0.641952 0.175357 0.000000
- *MESH_TVERT 1059 0.641952 0.175357 0.000000
- *MESH_TVERT 1060 0.687850 0.056160 0.000000
- *MESH_TVERT 1061 0.687850 0.056160 0.000000
- *MESH_TVERT 1062 0.617764 0.204122 0.000000
- *MESH_TVERT 1063 0.641952 0.175357 0.000000
- *MESH_TVERT 1064 0.617764 0.204122 0.000000
- *MESH_TVERT 1065 0.617764 0.204122 0.000000
- *MESH_TVERT 1066 0.641952 0.175357 0.000000
- *MESH_TVERT 1067 0.641952 0.175357 0.000000
- *MESH_TVERT 1068 0.602042 0.258626 0.000000
- *MESH_TVERT 1069 0.617764 0.204122 0.000000
- *MESH_TVERT 1070 0.602042 0.258626 0.000000
- *MESH_TVERT 1071 0.602042 0.258626 0.000000
- *MESH_TVERT 1072 0.617764 0.204122 0.000000
- *MESH_TVERT 1073 0.617764 0.204122 0.000000
- *MESH_TVERT 1074 0.466593 0.255598 0.000000
- *MESH_TVERT 1075 0.602042 0.258626 0.000000
- *MESH_TVERT 1076 0.466593 0.255598 0.000000
- *MESH_TVERT 1077 0.466593 0.255598 0.000000
- *MESH_TVERT 1078 0.602042 0.258626 0.000000
- *MESH_TVERT 1079 0.602042 0.258626 0.000000
- *MESH_TVERT 1080 0.418219 0.263168 0.000000
- *MESH_TVERT 1081 0.466593 0.255598 0.000000
- *MESH_TVERT 1082 0.418219 0.263168 0.000000
- *MESH_TVERT 1083 0.418219 0.263168 0.000000
- *MESH_TVERT 1084 0.466593 0.255598 0.000000
- *MESH_TVERT 1085 0.466593 0.255598 0.000000
- *MESH_TVERT 1086 0.350494 0.302531 0.000000
- *MESH_TVERT 1087 0.418219 0.263168 0.000000
- *MESH_TVERT 1088 0.350494 0.302531 0.000000
- *MESH_TVERT 1089 0.350494 0.302531 0.000000
- *MESH_TVERT 1090 0.418219 0.263168 0.000000
- *MESH_TVERT 1091 0.418219 0.263168 0.000000
- *MESH_TVERT 1092 0.356541 0.387315 0.000000
- *MESH_TVERT 1093 0.350494 0.302531 0.000000
- *MESH_TVERT 1094 0.356541 0.387315 0.000000
- *MESH_TVERT 1095 0.356541 0.387315 0.000000
- *MESH_TVERT 1096 0.350494 0.302531 0.000000
- *MESH_TVERT 1097 0.350494 0.302531 0.000000
- }
- *MESH_NUMTVFACES 366
- *MESH_TFACELIST {
- *MESH_TFACE 0 0 1 2
- *MESH_TFACE 1 3 4 5
- *MESH_TFACE 2 6 7 8
- *MESH_TFACE 3 9 10 11
- *MESH_TFACE 4 12 13 14
- *MESH_TFACE 5 15 16 17
- *MESH_TFACE 6 18 19 20
- *MESH_TFACE 7 21 22 23
- *MESH_TFACE 8 24 25 26
- *MESH_TFACE 9 27 28 29
- *MESH_TFACE 10 30 31 32
- *MESH_TFACE 11 33 34 35
- *MESH_TFACE 12 36 37 38
- *MESH_TFACE 13 39 40 41
- *MESH_TFACE 14 42 43 44
- *MESH_TFACE 15 45 46 47
- *MESH_TFACE 16 48 49 50
- *MESH_TFACE 17 51 52 53
- *MESH_TFACE 18 54 55 56
- *MESH_TFACE 19 57 58 59
- *MESH_TFACE 20 60 61 62
- *MESH_TFACE 21 63 64 65
- *MESH_TFACE 22 66 67 68
- *MESH_TFACE 23 69 70 71
- *MESH_TFACE 24 72 73 74
- *MESH_TFACE 25 75 76 77
- *MESH_TFACE 26 78 79 80
- *MESH_TFACE 27 81 82 83
- *MESH_TFACE 28 84 85 86
- *MESH_TFACE 29 87 88 89
- *MESH_TFACE 30 90 91 92
- *MESH_TFACE 31 93 94 95
- *MESH_TFACE 32 96 97 98
- *MESH_TFACE 33 99 100 101
- *MESH_TFACE 34 102 103 104
- *MESH_TFACE 35 105 106 107
- *MESH_TFACE 36 108 109 110
- *MESH_TFACE 37 111 112 113
- *MESH_TFACE 38 114 115 116
- *MESH_TFACE 39 117 118 119
- *MESH_TFACE 40 120 121 122
- *MESH_TFACE 41 123 124 125
- *MESH_TFACE 42 126 127 128
- *MESH_TFACE 43 129 130 131
- *MESH_TFACE 44 132 133 134
- *MESH_TFACE 45 135 136 137
- *MESH_TFACE 46 138 139 140
- *MESH_TFACE 47 141 142 143
- *MESH_TFACE 48 144 145 146
- *MESH_TFACE 49 147 148 149
- *MESH_TFACE 50 150 151 152
- *MESH_TFACE 51 153 154 155
- *MESH_TFACE 52 156 157 158
- *MESH_TFACE 53 159 160 161
- *MESH_TFACE 54 162 163 164
- *MESH_TFACE 55 165 166 167
- *MESH_TFACE 56 168 169 170
- *MESH_TFACE 57 171 172 173
- *MESH_TFACE 58 174 175 176
- *MESH_TFACE 59 177 178 179
- *MESH_TFACE 60 180 181 182
- *MESH_TFACE 61 183 184 185
- *MESH_TFACE 62 186 187 188
- *MESH_TFACE 63 189 190 191
- *MESH_TFACE 64 192 193 194
- *MESH_TFACE 65 195 196 197
- *MESH_TFACE 66 198 199 200
- *MESH_TFACE 67 201 202 203
- *MESH_TFACE 68 204 205 206
- *MESH_TFACE 69 207 208 209
- *MESH_TFACE 70 210 211 212
- *MESH_TFACE 71 213 214 215
- *MESH_TFACE 72 216 217 218
- *MESH_TFACE 73 219 220 221
- *MESH_TFACE 74 222 223 224
- *MESH_TFACE 75 225 226 227
- *MESH_TFACE 76 228 229 230
- *MESH_TFACE 77 231 232 233
- *MESH_TFACE 78 234 235 236
- *MESH_TFACE 79 237 238 239
- *MESH_TFACE 80 240 241 242
- *MESH_TFACE 81 243 244 245
- *MESH_TFACE 82 246 247 248
- *MESH_TFACE 83 249 250 251
- *MESH_TFACE 84 252 253 254
- *MESH_TFACE 85 255 256 257
- *MESH_TFACE 86 258 259 260
- *MESH_TFACE 87 261 262 263
- *MESH_TFACE 88 264 265 266
- *MESH_TFACE 89 267 268 269
- *MESH_TFACE 90 270 271 272
- *MESH_TFACE 91 273 274 275
- *MESH_TFACE 92 276 277 278
- *MESH_TFACE 93 279 280 281
- *MESH_TFACE 94 282 283 284
- *MESH_TFACE 95 285 286 287
- *MESH_TFACE 96 288 289 290
- *MESH_TFACE 97 291 292 293
- *MESH_TFACE 98 294 295 296
- *MESH_TFACE 99 297 298 299
- *MESH_TFACE 100 300 301 302
- *MESH_TFACE 101 303 304 305
- *MESH_TFACE 102 306 307 308
- *MESH_TFACE 103 309 310 311
- *MESH_TFACE 104 312 313 314
- *MESH_TFACE 105 315 316 317
- *MESH_TFACE 106 318 319 320
- *MESH_TFACE 107 321 322 323
- *MESH_TFACE 108 324 325 326
- *MESH_TFACE 109 327 328 329
- *MESH_TFACE 110 330 331 332
- *MESH_TFACE 111 333 334 335
- *MESH_TFACE 112 336 337 338
- *MESH_TFACE 113 339 340 341
- *MESH_TFACE 114 342 343 344
- *MESH_TFACE 115 345 346 347
- *MESH_TFACE 116 348 349 350
- *MESH_TFACE 117 351 352 353
- *MESH_TFACE 118 354 355 356
- *MESH_TFACE 119 357 358 359
- *MESH_TFACE 120 360 361 362
- *MESH_TFACE 121 363 364 365
- *MESH_TFACE 122 366 367 368
- *MESH_TFACE 123 369 370 371
- *MESH_TFACE 124 372 373 374
- *MESH_TFACE 125 375 376 377
- *MESH_TFACE 126 378 379 380
- *MESH_TFACE 127 381 382 383
- *MESH_TFACE 128 384 385 386
- *MESH_TFACE 129 387 388 389
- *MESH_TFACE 130 390 391 392
- *MESH_TFACE 131 393 394 395
- *MESH_TFACE 132 396 397 398
- *MESH_TFACE 133 399 400 401
- *MESH_TFACE 134 402 403 404
- *MESH_TFACE 135 405 406 407
- *MESH_TFACE 136 408 409 410
- *MESH_TFACE 137 411 412 413
- *MESH_TFACE 138 414 415 416
- *MESH_TFACE 139 417 418 419
- *MESH_TFACE 140 420 421 422
- *MESH_TFACE 141 423 424 425
- *MESH_TFACE 142 426 427 428
- *MESH_TFACE 143 429 430 431
- *MESH_TFACE 144 432 433 434
- *MESH_TFACE 145 435 436 437
- *MESH_TFACE 146 438 439 440
- *MESH_TFACE 147 441 442 443
- *MESH_TFACE 148 444 445 446
- *MESH_TFACE 149 447 448 449
- *MESH_TFACE 150 450 451 452
- *MESH_TFACE 151 453 454 455
- *MESH_TFACE 152 456 457 458
- *MESH_TFACE 153 459 460 461
- *MESH_TFACE 154 462 463 464
- *MESH_TFACE 155 465 466 467
- *MESH_TFACE 156 468 469 470
- *MESH_TFACE 157 471 472 473
- *MESH_TFACE 158 474 475 476
- *MESH_TFACE 159 477 478 479
- *MESH_TFACE 160 480 481 482
- *MESH_TFACE 161 483 484 485
- *MESH_TFACE 162 486 487 488
- *MESH_TFACE 163 489 490 491
- *MESH_TFACE 164 492 493 494
- *MESH_TFACE 165 495 496 497
- *MESH_TFACE 166 498 499 500
- *MESH_TFACE 167 501 502 503
- *MESH_TFACE 168 504 505 506
- *MESH_TFACE 169 507 508 509
- *MESH_TFACE 170 510 511 512
- *MESH_TFACE 171 513 514 515
- *MESH_TFACE 172 516 517 518
- *MESH_TFACE 173 519 520 521
- *MESH_TFACE 174 522 523 524
- *MESH_TFACE 175 525 526 527
- *MESH_TFACE 176 528 529 530
- *MESH_TFACE 177 531 532 533
- *MESH_TFACE 178 534 535 536
- *MESH_TFACE 179 537 538 539
- *MESH_TFACE 180 540 541 542
- *MESH_TFACE 181 543 544 545
- *MESH_TFACE 182 546 547 548
- *MESH_TFACE 183 549 550 551
- *MESH_TFACE 184 552 553 554
- *MESH_TFACE 185 555 556 557
- *MESH_TFACE 186 558 559 560
- *MESH_TFACE 187 561 562 563
- *MESH_TFACE 188 564 565 566
- *MESH_TFACE 189 567 568 569
- *MESH_TFACE 190 570 571 572
- *MESH_TFACE 191 573 574 575
- *MESH_TFACE 192 576 577 578
- *MESH_TFACE 193 579 580 581
- *MESH_TFACE 194 582 583 584
- *MESH_TFACE 195 585 586 587
- *MESH_TFACE 196 588 589 590
- *MESH_TFACE 197 591 592 593
- *MESH_TFACE 198 594 595 596
- *MESH_TFACE 199 597 598 599
- *MESH_TFACE 200 600 601 602
- *MESH_TFACE 201 603 604 605
- *MESH_TFACE 202 606 607 608
- *MESH_TFACE 203 609 610 611
- *MESH_TFACE 204 612 613 614
- *MESH_TFACE 205 615 616 617
- *MESH_TFACE 206 618 619 620
- *MESH_TFACE 207 621 622 623
- *MESH_TFACE 208 624 625 626
- *MESH_TFACE 209 627 628 629
- *MESH_TFACE 210 630 631 632
- *MESH_TFACE 211 633 634 635
- *MESH_TFACE 212 636 637 638
- *MESH_TFACE 213 639 640 641
- *MESH_TFACE 214 642 643 644
- *MESH_TFACE 215 645 646 647
- *MESH_TFACE 216 648 649 650
- *MESH_TFACE 217 651 652 653
- *MESH_TFACE 218 654 655 656
- *MESH_TFACE 219 657 658 659
- *MESH_TFACE 220 660 661 662
- *MESH_TFACE 221 663 664 665
- *MESH_TFACE 222 666 667 668
- *MESH_TFACE 223 669 670 671
- *MESH_TFACE 224 672 673 674
- *MESH_TFACE 225 675 676 677
- *MESH_TFACE 226 678 679 680
- *MESH_TFACE 227 681 682 683
- *MESH_TFACE 228 684 685 686
- *MESH_TFACE 229 687 688 689
- *MESH_TFACE 230 690 691 692
- *MESH_TFACE 231 693 694 695
- *MESH_TFACE 232 696 697 698
- *MESH_TFACE 233 699 700 701
- *MESH_TFACE 234 702 703 704
- *MESH_TFACE 235 705 706 707
- *MESH_TFACE 236 708 709 710
- *MESH_TFACE 237 711 712 713
- *MESH_TFACE 238 714 715 716
- *MESH_TFACE 239 717 718 719
- *MESH_TFACE 240 720 721 722
- *MESH_TFACE 241 723 724 725
- *MESH_TFACE 242 726 727 728
- *MESH_TFACE 243 729 730 731
- *MESH_TFACE 244 732 733 734
- *MESH_TFACE 245 735 736 737
- *MESH_TFACE 246 738 739 740
- *MESH_TFACE 247 741 742 743
- *MESH_TFACE 248 744 745 746
- *MESH_TFACE 249 747 748 749
- *MESH_TFACE 250 750 751 752
- *MESH_TFACE 251 753 754 755
- *MESH_TFACE 252 756 757 758
- *MESH_TFACE 253 759 760 761
- *MESH_TFACE 254 762 763 764
- *MESH_TFACE 255 765 766 767
- *MESH_TFACE 256 768 769 770
- *MESH_TFACE 257 771 772 773
- *MESH_TFACE 258 774 775 776
- *MESH_TFACE 259 777 778 779
- *MESH_TFACE 260 780 781 782
- *MESH_TFACE 261 783 784 785
- *MESH_TFACE 262 786 787 788
- *MESH_TFACE 263 789 790 791
- *MESH_TFACE 264 792 793 794
- *MESH_TFACE 265 795 796 797
- *MESH_TFACE 266 798 799 800
- *MESH_TFACE 267 801 802 803
- *MESH_TFACE 268 804 805 806
- *MESH_TFACE 269 807 808 809
- *MESH_TFACE 270 810 811 812
- *MESH_TFACE 271 813 814 815
- *MESH_TFACE 272 816 817 818
- *MESH_TFACE 273 819 820 821
- *MESH_TFACE 274 822 823 824
- *MESH_TFACE 275 825 826 827
- *MESH_TFACE 276 828 829 830
- *MESH_TFACE 277 831 832 833
- *MESH_TFACE 278 834 835 836
- *MESH_TFACE 279 837 838 839
- *MESH_TFACE 280 840 841 842
- *MESH_TFACE 281 843 844 845
- *MESH_TFACE 282 846 847 848
- *MESH_TFACE 283 849 850 851
- *MESH_TFACE 284 852 853 854
- *MESH_TFACE 285 855 856 857
- *MESH_TFACE 286 858 859 860
- *MESH_TFACE 287 861 862 863
- *MESH_TFACE 288 864 865 866
- *MESH_TFACE 289 867 868 869
- *MESH_TFACE 290 870 871 872
- *MESH_TFACE 291 873 874 875
- *MESH_TFACE 292 876 877 878
- *MESH_TFACE 293 879 880 881
- *MESH_TFACE 294 882 883 884
- *MESH_TFACE 295 885 886 887
- *MESH_TFACE 296 888 889 890
- *MESH_TFACE 297 891 892 893
- *MESH_TFACE 298 894 895 896
- *MESH_TFACE 299 897 898 899
- *MESH_TFACE 300 900 901 902
- *MESH_TFACE 301 903 904 905
- *MESH_TFACE 302 906 907 908
- *MESH_TFACE 303 909 910 911
- *MESH_TFACE 304 912 913 914
- *MESH_TFACE 305 915 916 917
- *MESH_TFACE 306 918 919 920
- *MESH_TFACE 307 921 922 923
- *MESH_TFACE 308 924 925 926
- *MESH_TFACE 309 927 928 929
- *MESH_TFACE 310 930 931 932
- *MESH_TFACE 311 933 934 935
- *MESH_TFACE 312 936 937 938
- *MESH_TFACE 313 939 940 941
- *MESH_TFACE 314 942 943 944
- *MESH_TFACE 315 945 946 947
- *MESH_TFACE 316 948 949 950
- *MESH_TFACE 317 951 952 953
- *MESH_TFACE 318 954 955 956
- *MESH_TFACE 319 957 958 959
- *MESH_TFACE 320 960 961 962
- *MESH_TFACE 321 963 964 965
- *MESH_TFACE 322 966 967 968
- *MESH_TFACE 323 969 970 971
- *MESH_TFACE 324 972 973 974
- *MESH_TFACE 325 975 976 977
- *MESH_TFACE 326 978 979 980
- *MESH_TFACE 327 981 982 983
- *MESH_TFACE 328 984 985 986
- *MESH_TFACE 329 987 988 989
- *MESH_TFACE 330 990 991 992
- *MESH_TFACE 331 993 994 995
- *MESH_TFACE 332 996 997 998
- *MESH_TFACE 333 999 1000 1001
- *MESH_TFACE 334 1002 1003 1004
- *MESH_TFACE 335 1005 1006 1007
- *MESH_TFACE 336 1008 1009 1010
- *MESH_TFACE 337 1011 1012 1013
- *MESH_TFACE 338 1014 1015 1016
- *MESH_TFACE 339 1017 1018 1019
- *MESH_TFACE 340 1020 1021 1022
- *MESH_TFACE 341 1023 1024 1025
- *MESH_TFACE 342 1026 1027 1028
- *MESH_TFACE 343 1029 1030 1031
- *MESH_TFACE 344 1032 1033 1034
- *MESH_TFACE 345 1035 1036 1037
- *MESH_TFACE 346 1038 1039 1040
- *MESH_TFACE 347 1041 1042 1043
- *MESH_TFACE 348 1044 1045 1046
- *MESH_TFACE 349 1047 1048 1049
- *MESH_TFACE 350 1050 1051 1052
- *MESH_TFACE 351 1053 1054 1055
- *MESH_TFACE 352 1056 1057 1058
- *MESH_TFACE 353 1059 1060 1061
- *MESH_TFACE 354 1062 1063 1064
- *MESH_TFACE 355 1065 1066 1067
- *MESH_TFACE 356 1068 1069 1070
- *MESH_TFACE 357 1071 1072 1073
- *MESH_TFACE 358 1074 1075 1076
- *MESH_TFACE 359 1077 1078 1079
- *MESH_TFACE 360 1080 1081 1082
- *MESH_TFACE 361 1083 1084 1085
- *MESH_TFACE 362 1086 1087 1088
- *MESH_TFACE 363 1089 1090 1091
- *MESH_TFACE 364 1092 1093 1094
- *MESH_TFACE 365 1095 1096 1097
- }
- *MESH_NUMCVERTEX 1098
- *MESH_CVERTLIST {
- *MESH_VERTCOL 0 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1 0.878431 0.878431 0.878431
- *MESH_VERTCOL 2 0.878431 0.878431 0.878431
- *MESH_VERTCOL 3 0.878431 0.878431 0.878431
- *MESH_VERTCOL 4 0.878431 0.878431 0.878431
- *MESH_VERTCOL 5 0.878431 0.878431 0.878431
- *MESH_VERTCOL 6 0.878431 0.878431 0.878431
- *MESH_VERTCOL 7 0.878431 0.878431 0.878431
- *MESH_VERTCOL 8 0.878431 0.878431 0.878431
- *MESH_VERTCOL 9 0.878431 0.878431 0.878431
- *MESH_VERTCOL 10 0.878431 0.878431 0.878431
- *MESH_VERTCOL 11 0.878431 0.878431 0.878431
- *MESH_VERTCOL 12 0.878431 0.878431 0.878431
- *MESH_VERTCOL 13 0.878431 0.878431 0.878431
- *MESH_VERTCOL 14 0.878431 0.878431 0.878431
- *MESH_VERTCOL 15 0.878431 0.878431 0.878431
- *MESH_VERTCOL 16 0.878431 0.878431 0.878431
- *MESH_VERTCOL 17 0.878431 0.878431 0.878431
- *MESH_VERTCOL 18 0.878431 0.878431 0.878431
- *MESH_VERTCOL 19 0.878431 0.878431 0.878431
- *MESH_VERTCOL 20 0.878431 0.878431 0.878431
- *MESH_VERTCOL 21 0.878431 0.878431 0.878431
- *MESH_VERTCOL 22 0.878431 0.878431 0.878431
- *MESH_VERTCOL 23 0.878431 0.878431 0.878431
- *MESH_VERTCOL 24 0.878431 0.878431 0.878431
- *MESH_VERTCOL 25 0.878431 0.878431 0.878431
- *MESH_VERTCOL 26 0.878431 0.878431 0.878431
- *MESH_VERTCOL 27 0.878431 0.878431 0.878431
- *MESH_VERTCOL 28 0.878431 0.878431 0.878431
- *MESH_VERTCOL 29 0.878431 0.878431 0.878431
- *MESH_VERTCOL 30 0.878431 0.878431 0.878431
- *MESH_VERTCOL 31 0.878431 0.878431 0.878431
- *MESH_VERTCOL 32 0.878431 0.878431 0.878431
- *MESH_VERTCOL 33 0.878431 0.878431 0.878431
- *MESH_VERTCOL 34 0.878431 0.878431 0.878431
- *MESH_VERTCOL 35 0.878431 0.878431 0.878431
- *MESH_VERTCOL 36 0.878431 0.878431 0.878431
- *MESH_VERTCOL 37 0.878431 0.878431 0.878431
- *MESH_VERTCOL 38 0.878431 0.878431 0.878431
- *MESH_VERTCOL 39 0.878431 0.878431 0.878431
- *MESH_VERTCOL 40 0.878431 0.878431 0.878431
- *MESH_VERTCOL 41 0.878431 0.878431 0.878431
- *MESH_VERTCOL 42 0.878431 0.878431 0.878431
- *MESH_VERTCOL 43 0.878431 0.878431 0.878431
- *MESH_VERTCOL 44 0.878431 0.878431 0.878431
- *MESH_VERTCOL 45 0.878431 0.878431 0.878431
- *MESH_VERTCOL 46 0.878431 0.878431 0.878431
- *MESH_VERTCOL 47 0.878431 0.878431 0.878431
- *MESH_VERTCOL 48 0.878431 0.878431 0.878431
- *MESH_VERTCOL 49 0.878431 0.878431 0.878431
- *MESH_VERTCOL 50 0.878431 0.878431 0.878431
- *MESH_VERTCOL 51 0.878431 0.878431 0.878431
- *MESH_VERTCOL 52 0.878431 0.878431 0.878431
- *MESH_VERTCOL 53 0.878431 0.878431 0.878431
- *MESH_VERTCOL 54 0.878431 0.878431 0.878431
- *MESH_VERTCOL 55 0.878431 0.878431 0.878431
- *MESH_VERTCOL 56 0.878431 0.878431 0.878431
- *MESH_VERTCOL 57 0.878431 0.878431 0.878431
- *MESH_VERTCOL 58 0.878431 0.878431 0.878431
- *MESH_VERTCOL 59 0.878431 0.878431 0.878431
- *MESH_VERTCOL 60 0.878431 0.878431 0.878431
- *MESH_VERTCOL 61 0.878431 0.878431 0.878431
- *MESH_VERTCOL 62 0.878431 0.878431 0.878431
- *MESH_VERTCOL 63 0.878431 0.878431 0.878431
- *MESH_VERTCOL 64 0.878431 0.878431 0.878431
- *MESH_VERTCOL 65 0.878431 0.878431 0.878431
- *MESH_VERTCOL 66 0.878431 0.878431 0.878431
- *MESH_VERTCOL 67 0.878431 0.878431 0.878431
- *MESH_VERTCOL 68 0.878431 0.878431 0.878431
- *MESH_VERTCOL 69 0.878431 0.878431 0.878431
- *MESH_VERTCOL 70 0.878431 0.878431 0.878431
- *MESH_VERTCOL 71 0.878431 0.878431 0.878431
- *MESH_VERTCOL 72 0.878431 0.878431 0.878431
- *MESH_VERTCOL 73 0.878431 0.878431 0.878431
- *MESH_VERTCOL 74 0.878431 0.878431 0.878431
- *MESH_VERTCOL 75 0.878431 0.878431 0.878431
- *MESH_VERTCOL 76 0.878431 0.878431 0.878431
- *MESH_VERTCOL 77 0.878431 0.878431 0.878431
- *MESH_VERTCOL 78 0.878431 0.878431 0.878431
- *MESH_VERTCOL 79 0.878431 0.878431 0.878431
- *MESH_VERTCOL 80 0.878431 0.878431 0.878431
- *MESH_VERTCOL 81 0.878431 0.878431 0.878431
- *MESH_VERTCOL 82 0.878431 0.878431 0.878431
- *MESH_VERTCOL 83 0.878431 0.878431 0.878431
- *MESH_VERTCOL 84 0.878431 0.878431 0.878431
- *MESH_VERTCOL 85 0.878431 0.878431 0.878431
- *MESH_VERTCOL 86 0.878431 0.878431 0.878431
- *MESH_VERTCOL 87 0.878431 0.878431 0.878431
- *MESH_VERTCOL 88 0.878431 0.878431 0.878431
- *MESH_VERTCOL 89 0.878431 0.878431 0.878431
- *MESH_VERTCOL 90 0.878431 0.878431 0.878431
- *MESH_VERTCOL 91 0.878431 0.878431 0.878431
- *MESH_VERTCOL 92 0.878431 0.878431 0.878431
- *MESH_VERTCOL 93 0.878431 0.878431 0.878431
- *MESH_VERTCOL 94 0.878431 0.878431 0.878431
- *MESH_VERTCOL 95 0.878431 0.878431 0.878431
- *MESH_VERTCOL 96 0.878431 0.878431 0.878431
- *MESH_VERTCOL 97 0.878431 0.878431 0.878431
- *MESH_VERTCOL 98 0.878431 0.878431 0.878431
- *MESH_VERTCOL 99 0.878431 0.878431 0.878431
- *MESH_VERTCOL 100 0.878431 0.878431 0.878431
- *MESH_VERTCOL 101 0.878431 0.878431 0.878431
- *MESH_VERTCOL 102 0.878431 0.878431 0.878431
- *MESH_VERTCOL 103 0.878431 0.878431 0.878431
- *MESH_VERTCOL 104 0.878431 0.878431 0.878431
- *MESH_VERTCOL 105 0.878431 0.878431 0.878431
- *MESH_VERTCOL 106 0.878431 0.878431 0.878431
- *MESH_VERTCOL 107 0.878431 0.878431 0.878431
- *MESH_VERTCOL 108 0.878431 0.878431 0.878431
- *MESH_VERTCOL 109 0.878431 0.878431 0.878431
- *MESH_VERTCOL 110 0.878431 0.878431 0.878431
- *MESH_VERTCOL 111 0.878431 0.878431 0.878431
- *MESH_VERTCOL 112 0.878431 0.878431 0.878431
- *MESH_VERTCOL 113 0.878431 0.878431 0.878431
- *MESH_VERTCOL 114 0.878431 0.878431 0.878431
- *MESH_VERTCOL 115 0.878431 0.878431 0.878431
- *MESH_VERTCOL 116 0.878431 0.878431 0.878431
- *MESH_VERTCOL 117 0.878431 0.878431 0.878431
- *MESH_VERTCOL 118 0.878431 0.878431 0.878431
- *MESH_VERTCOL 119 0.878431 0.878431 0.878431
- *MESH_VERTCOL 120 0.878431 0.878431 0.878431
- *MESH_VERTCOL 121 0.878431 0.878431 0.878431
- *MESH_VERTCOL 122 0.878431 0.878431 0.878431
- *MESH_VERTCOL 123 0.878431 0.878431 0.878431
- *MESH_VERTCOL 124 0.878431 0.878431 0.878431
- *MESH_VERTCOL 125 0.878431 0.878431 0.878431
- *MESH_VERTCOL 126 0.878431 0.878431 0.878431
- *MESH_VERTCOL 127 0.878431 0.878431 0.878431
- *MESH_VERTCOL 128 0.878431 0.878431 0.878431
- *MESH_VERTCOL 129 0.878431 0.878431 0.878431
- *MESH_VERTCOL 130 0.878431 0.878431 0.878431
- *MESH_VERTCOL 131 0.878431 0.878431 0.878431
- *MESH_VERTCOL 132 0.878431 0.878431 0.878431
- *MESH_VERTCOL 133 0.878431 0.878431 0.878431
- *MESH_VERTCOL 134 0.878431 0.878431 0.878431
- *MESH_VERTCOL 135 0.878431 0.878431 0.878431
- *MESH_VERTCOL 136 0.878431 0.878431 0.878431
- *MESH_VERTCOL 137 0.878431 0.878431 0.878431
- *MESH_VERTCOL 138 0.878431 0.878431 0.878431
- *MESH_VERTCOL 139 0.878431 0.878431 0.878431
- *MESH_VERTCOL 140 0.878431 0.878431 0.878431
- *MESH_VERTCOL 141 0.878431 0.878431 0.878431
- *MESH_VERTCOL 142 0.878431 0.878431 0.878431
- *MESH_VERTCOL 143 0.878431 0.878431 0.878431
- *MESH_VERTCOL 144 0.878431 0.878431 0.878431
- *MESH_VERTCOL 145 0.878431 0.878431 0.878431
- *MESH_VERTCOL 146 0.878431 0.878431 0.878431
- *MESH_VERTCOL 147 0.878431 0.878431 0.878431
- *MESH_VERTCOL 148 0.878431 0.878431 0.878431
- *MESH_VERTCOL 149 0.878431 0.878431 0.878431
- *MESH_VERTCOL 150 0.878431 0.878431 0.878431
- *MESH_VERTCOL 151 0.878431 0.878431 0.878431
- *MESH_VERTCOL 152 0.878431 0.878431 0.878431
- *MESH_VERTCOL 153 0.878431 0.878431 0.878431
- *MESH_VERTCOL 154 0.878431 0.878431 0.878431
- *MESH_VERTCOL 155 0.878431 0.878431 0.878431
- *MESH_VERTCOL 156 0.878431 0.878431 0.878431
- *MESH_VERTCOL 157 0.878431 0.878431 0.878431
- *MESH_VERTCOL 158 0.878431 0.878431 0.878431
- *MESH_VERTCOL 159 0.878431 0.878431 0.878431
- *MESH_VERTCOL 160 0.878431 0.878431 0.878431
- *MESH_VERTCOL 161 0.878431 0.878431 0.878431
- *MESH_VERTCOL 162 0.878431 0.878431 0.878431
- *MESH_VERTCOL 163 0.878431 0.878431 0.878431
- *MESH_VERTCOL 164 0.878431 0.878431 0.878431
- *MESH_VERTCOL 165 0.878431 0.878431 0.878431
- *MESH_VERTCOL 166 0.878431 0.878431 0.878431
- *MESH_VERTCOL 167 0.878431 0.878431 0.878431
- *MESH_VERTCOL 168 0.878431 0.878431 0.878431
- *MESH_VERTCOL 169 0.878431 0.878431 0.878431
- *MESH_VERTCOL 170 0.878431 0.878431 0.878431
- *MESH_VERTCOL 171 0.878431 0.878431 0.878431
- *MESH_VERTCOL 172 0.878431 0.878431 0.878431
- *MESH_VERTCOL 173 0.878431 0.878431 0.878431
- *MESH_VERTCOL 174 0.878431 0.878431 0.878431
- *MESH_VERTCOL 175 0.878431 0.878431 0.878431
- *MESH_VERTCOL 176 0.878431 0.878431 0.878431
- *MESH_VERTCOL 177 0.878431 0.878431 0.878431
- *MESH_VERTCOL 178 0.878431 0.878431 0.878431
- *MESH_VERTCOL 179 0.878431 0.878431 0.878431
- *MESH_VERTCOL 180 0.878431 0.878431 0.878431
- *MESH_VERTCOL 181 0.878431 0.878431 0.878431
- *MESH_VERTCOL 182 0.878431 0.878431 0.878431
- *MESH_VERTCOL 183 0.878431 0.878431 0.878431
- *MESH_VERTCOL 184 0.878431 0.878431 0.878431
- *MESH_VERTCOL 185 0.878431 0.878431 0.878431
- *MESH_VERTCOL 186 0.878431 0.878431 0.878431
- *MESH_VERTCOL 187 0.878431 0.878431 0.878431
- *MESH_VERTCOL 188 0.878431 0.878431 0.878431
- *MESH_VERTCOL 189 0.878431 0.878431 0.878431
- *MESH_VERTCOL 190 0.878431 0.878431 0.878431
- *MESH_VERTCOL 191 0.878431 0.878431 0.878431
- *MESH_VERTCOL 192 0.878431 0.878431 0.878431
- *MESH_VERTCOL 193 0.878431 0.878431 0.878431
- *MESH_VERTCOL 194 0.878431 0.878431 0.878431
- *MESH_VERTCOL 195 0.878431 0.878431 0.878431
- *MESH_VERTCOL 196 0.878431 0.878431 0.878431
- *MESH_VERTCOL 197 0.878431 0.878431 0.878431
- *MESH_VERTCOL 198 0.878431 0.878431 0.878431
- *MESH_VERTCOL 199 0.878431 0.878431 0.878431
- *MESH_VERTCOL 200 0.878431 0.878431 0.878431
- *MESH_VERTCOL 201 0.878431 0.878431 0.878431
- *MESH_VERTCOL 202 0.878431 0.878431 0.878431
- *MESH_VERTCOL 203 0.878431 0.878431 0.878431
- *MESH_VERTCOL 204 0.878431 0.878431 0.878431
- *MESH_VERTCOL 205 0.878431 0.878431 0.878431
- *MESH_VERTCOL 206 0.878431 0.878431 0.878431
- *MESH_VERTCOL 207 0.878431 0.878431 0.878431
- *MESH_VERTCOL 208 0.878431 0.878431 0.878431
- *MESH_VERTCOL 209 0.878431 0.878431 0.878431
- *MESH_VERTCOL 210 0.878431 0.878431 0.878431
- *MESH_VERTCOL 211 0.878431 0.878431 0.878431
- *MESH_VERTCOL 212 0.878431 0.878431 0.878431
- *MESH_VERTCOL 213 0.878431 0.878431 0.878431
- *MESH_VERTCOL 214 0.878431 0.878431 0.878431
- *MESH_VERTCOL 215 0.878431 0.878431 0.878431
- *MESH_VERTCOL 216 0.878431 0.878431 0.878431
- *MESH_VERTCOL 217 0.878431 0.878431 0.878431
- *MESH_VERTCOL 218 0.878431 0.878431 0.878431
- *MESH_VERTCOL 219 0.878431 0.878431 0.878431
- *MESH_VERTCOL 220 0.878431 0.878431 0.878431
- *MESH_VERTCOL 221 0.878431 0.878431 0.878431
- *MESH_VERTCOL 222 0.878431 0.878431 0.878431
- *MESH_VERTCOL 223 0.878431 0.878431 0.878431
- *MESH_VERTCOL 224 0.878431 0.878431 0.878431
- *MESH_VERTCOL 225 0.878431 0.878431 0.878431
- *MESH_VERTCOL 226 0.878431 0.878431 0.878431
- *MESH_VERTCOL 227 0.878431 0.878431 0.878431
- *MESH_VERTCOL 228 0.878431 0.878431 0.878431
- *MESH_VERTCOL 229 0.878431 0.878431 0.878431
- *MESH_VERTCOL 230 0.878431 0.878431 0.878431
- *MESH_VERTCOL 231 0.878431 0.878431 0.878431
- *MESH_VERTCOL 232 0.878431 0.878431 0.878431
- *MESH_VERTCOL 233 0.878431 0.878431 0.878431
- *MESH_VERTCOL 234 0.878431 0.878431 0.878431
- *MESH_VERTCOL 235 0.878431 0.878431 0.878431
- *MESH_VERTCOL 236 0.878431 0.878431 0.878431
- *MESH_VERTCOL 237 0.878431 0.878431 0.878431
- *MESH_VERTCOL 238 0.878431 0.878431 0.878431
- *MESH_VERTCOL 239 0.878431 0.878431 0.878431
- *MESH_VERTCOL 240 0.878431 0.878431 0.878431
- *MESH_VERTCOL 241 0.878431 0.878431 0.878431
- *MESH_VERTCOL 242 0.878431 0.878431 0.878431
- *MESH_VERTCOL 243 0.878431 0.878431 0.878431
- *MESH_VERTCOL 244 0.878431 0.878431 0.878431
- *MESH_VERTCOL 245 0.878431 0.878431 0.878431
- *MESH_VERTCOL 246 0.878431 0.878431 0.878431
- *MESH_VERTCOL 247 0.878431 0.878431 0.878431
- *MESH_VERTCOL 248 0.878431 0.878431 0.878431
- *MESH_VERTCOL 249 0.878431 0.878431 0.878431
- *MESH_VERTCOL 250 0.878431 0.878431 0.878431
- *MESH_VERTCOL 251 0.878431 0.878431 0.878431
- *MESH_VERTCOL 252 0.878431 0.878431 0.878431
- *MESH_VERTCOL 253 0.878431 0.878431 0.878431
- *MESH_VERTCOL 254 0.878431 0.878431 0.878431
- *MESH_VERTCOL 255 0.878431 0.878431 0.878431
- *MESH_VERTCOL 256 0.878431 0.878431 0.878431
- *MESH_VERTCOL 257 0.878431 0.878431 0.878431
- *MESH_VERTCOL 258 0.878431 0.878431 0.878431
- *MESH_VERTCOL 259 0.878431 0.878431 0.878431
- *MESH_VERTCOL 260 0.878431 0.878431 0.878431
- *MESH_VERTCOL 261 0.878431 0.878431 0.878431
- *MESH_VERTCOL 262 0.878431 0.878431 0.878431
- *MESH_VERTCOL 263 0.878431 0.878431 0.878431
- *MESH_VERTCOL 264 0.878431 0.878431 0.878431
- *MESH_VERTCOL 265 0.878431 0.878431 0.878431
- *MESH_VERTCOL 266 0.878431 0.878431 0.878431
- *MESH_VERTCOL 267 0.878431 0.878431 0.878431
- *MESH_VERTCOL 268 0.878431 0.878431 0.878431
- *MESH_VERTCOL 269 0.878431 0.878431 0.878431
- *MESH_VERTCOL 270 0.878431 0.878431 0.878431
- *MESH_VERTCOL 271 0.878431 0.878431 0.878431
- *MESH_VERTCOL 272 0.878431 0.878431 0.878431
- *MESH_VERTCOL 273 0.878431 0.878431 0.878431
- *MESH_VERTCOL 274 0.878431 0.878431 0.878431
- *MESH_VERTCOL 275 0.878431 0.878431 0.878431
- *MESH_VERTCOL 276 0.878431 0.878431 0.878431
- *MESH_VERTCOL 277 0.878431 0.878431 0.878431
- *MESH_VERTCOL 278 0.878431 0.878431 0.878431
- *MESH_VERTCOL 279 0.878431 0.878431 0.878431
- *MESH_VERTCOL 280 0.878431 0.878431 0.878431
- *MESH_VERTCOL 281 0.878431 0.878431 0.878431
- *MESH_VERTCOL 282 0.878431 0.878431 0.878431
- *MESH_VERTCOL 283 0.878431 0.878431 0.878431
- *MESH_VERTCOL 284 0.878431 0.878431 0.878431
- *MESH_VERTCOL 285 0.878431 0.878431 0.878431
- *MESH_VERTCOL 286 0.878431 0.878431 0.878431
- *MESH_VERTCOL 287 0.878431 0.878431 0.878431
- *MESH_VERTCOL 288 0.878431 0.878431 0.878431
- *MESH_VERTCOL 289 0.878431 0.878431 0.878431
- *MESH_VERTCOL 290 0.878431 0.878431 0.878431
- *MESH_VERTCOL 291 0.878431 0.878431 0.878431
- *MESH_VERTCOL 292 0.878431 0.878431 0.878431
- *MESH_VERTCOL 293 0.878431 0.878431 0.878431
- *MESH_VERTCOL 294 0.878431 0.878431 0.878431
- *MESH_VERTCOL 295 0.878431 0.878431 0.878431
- *MESH_VERTCOL 296 0.878431 0.878431 0.878431
- *MESH_VERTCOL 297 0.878431 0.878431 0.878431
- *MESH_VERTCOL 298 0.878431 0.878431 0.878431
- *MESH_VERTCOL 299 0.878431 0.878431 0.878431
- *MESH_VERTCOL 300 0.878431 0.878431 0.878431
- *MESH_VERTCOL 301 0.878431 0.878431 0.878431
- *MESH_VERTCOL 302 0.878431 0.878431 0.878431
- *MESH_VERTCOL 303 0.878431 0.878431 0.878431
- *MESH_VERTCOL 304 0.878431 0.878431 0.878431
- *MESH_VERTCOL 305 0.878431 0.878431 0.878431
- *MESH_VERTCOL 306 0.878431 0.878431 0.878431
- *MESH_VERTCOL 307 0.878431 0.878431 0.878431
- *MESH_VERTCOL 308 0.878431 0.878431 0.878431
- *MESH_VERTCOL 309 0.878431 0.878431 0.878431
- *MESH_VERTCOL 310 0.878431 0.878431 0.878431
- *MESH_VERTCOL 311 0.878431 0.878431 0.878431
- *MESH_VERTCOL 312 0.878431 0.878431 0.878431
- *MESH_VERTCOL 313 0.878431 0.878431 0.878431
- *MESH_VERTCOL 314 0.878431 0.878431 0.878431
- *MESH_VERTCOL 315 0.878431 0.878431 0.878431
- *MESH_VERTCOL 316 0.878431 0.878431 0.878431
- *MESH_VERTCOL 317 0.878431 0.878431 0.878431
- *MESH_VERTCOL 318 0.878431 0.878431 0.878431
- *MESH_VERTCOL 319 0.878431 0.878431 0.878431
- *MESH_VERTCOL 320 0.878431 0.878431 0.878431
- *MESH_VERTCOL 321 0.878431 0.878431 0.878431
- *MESH_VERTCOL 322 0.878431 0.878431 0.878431
- *MESH_VERTCOL 323 0.878431 0.878431 0.878431
- *MESH_VERTCOL 324 0.878431 0.878431 0.878431
- *MESH_VERTCOL 325 0.878431 0.878431 0.878431
- *MESH_VERTCOL 326 0.878431 0.878431 0.878431
- *MESH_VERTCOL 327 0.878431 0.878431 0.878431
- *MESH_VERTCOL 328 0.878431 0.878431 0.878431
- *MESH_VERTCOL 329 0.878431 0.878431 0.878431
- *MESH_VERTCOL 330 0.878431 0.878431 0.878431
- *MESH_VERTCOL 331 0.878431 0.878431 0.878431
- *MESH_VERTCOL 332 0.878431 0.878431 0.878431
- *MESH_VERTCOL 333 0.878431 0.878431 0.878431
- *MESH_VERTCOL 334 0.878431 0.878431 0.878431
- *MESH_VERTCOL 335 0.878431 0.878431 0.878431
- *MESH_VERTCOL 336 0.878431 0.878431 0.878431
- *MESH_VERTCOL 337 0.878431 0.878431 0.878431
- *MESH_VERTCOL 338 0.878431 0.878431 0.878431
- *MESH_VERTCOL 339 0.878431 0.878431 0.878431
- *MESH_VERTCOL 340 0.878431 0.878431 0.878431
- *MESH_VERTCOL 341 0.878431 0.878431 0.878431
- *MESH_VERTCOL 342 0.878431 0.878431 0.878431
- *MESH_VERTCOL 343 0.878431 0.878431 0.878431
- *MESH_VERTCOL 344 0.878431 0.878431 0.878431
- *MESH_VERTCOL 345 0.878431 0.878431 0.878431
- *MESH_VERTCOL 346 0.878431 0.878431 0.878431
- *MESH_VERTCOL 347 0.878431 0.878431 0.878431
- *MESH_VERTCOL 348 0.878431 0.878431 0.878431
- *MESH_VERTCOL 349 0.878431 0.878431 0.878431
- *MESH_VERTCOL 350 0.878431 0.878431 0.878431
- *MESH_VERTCOL 351 0.878431 0.878431 0.878431
- *MESH_VERTCOL 352 0.878431 0.878431 0.878431
- *MESH_VERTCOL 353 0.878431 0.878431 0.878431
- *MESH_VERTCOL 354 0.878431 0.878431 0.878431
- *MESH_VERTCOL 355 0.878431 0.878431 0.878431
- *MESH_VERTCOL 356 0.878431 0.878431 0.878431
- *MESH_VERTCOL 357 0.878431 0.878431 0.878431
- *MESH_VERTCOL 358 0.878431 0.878431 0.878431
- *MESH_VERTCOL 359 0.878431 0.878431 0.878431
- *MESH_VERTCOL 360 0.878431 0.878431 0.878431
- *MESH_VERTCOL 361 0.878431 0.878431 0.878431
- *MESH_VERTCOL 362 0.878431 0.878431 0.878431
- *MESH_VERTCOL 363 0.878431 0.878431 0.878431
- *MESH_VERTCOL 364 0.878431 0.878431 0.878431
- *MESH_VERTCOL 365 0.878431 0.878431 0.878431
- *MESH_VERTCOL 366 0.878431 0.878431 0.878431
- *MESH_VERTCOL 367 0.878431 0.878431 0.878431
- *MESH_VERTCOL 368 0.878431 0.878431 0.878431
- *MESH_VERTCOL 369 0.878431 0.878431 0.878431
- *MESH_VERTCOL 370 0.878431 0.878431 0.878431
- *MESH_VERTCOL 371 0.878431 0.878431 0.878431
- *MESH_VERTCOL 372 0.878431 0.878431 0.878431
- *MESH_VERTCOL 373 0.878431 0.878431 0.878431
- *MESH_VERTCOL 374 0.878431 0.878431 0.878431
- *MESH_VERTCOL 375 0.878431 0.878431 0.878431
- *MESH_VERTCOL 376 0.878431 0.878431 0.878431
- *MESH_VERTCOL 377 0.878431 0.878431 0.878431
- *MESH_VERTCOL 378 0.878431 0.878431 0.878431
- *MESH_VERTCOL 379 0.878431 0.878431 0.878431
- *MESH_VERTCOL 380 0.878431 0.878431 0.878431
- *MESH_VERTCOL 381 0.878431 0.878431 0.878431
- *MESH_VERTCOL 382 0.878431 0.878431 0.878431
- *MESH_VERTCOL 383 0.878431 0.878431 0.878431
- *MESH_VERTCOL 384 0.878431 0.878431 0.878431
- *MESH_VERTCOL 385 0.878431 0.878431 0.878431
- *MESH_VERTCOL 386 0.878431 0.878431 0.878431
- *MESH_VERTCOL 387 0.878431 0.878431 0.878431
- *MESH_VERTCOL 388 0.878431 0.878431 0.878431
- *MESH_VERTCOL 389 0.878431 0.878431 0.878431
- *MESH_VERTCOL 390 0.878431 0.878431 0.878431
- *MESH_VERTCOL 391 0.878431 0.878431 0.878431
- *MESH_VERTCOL 392 0.878431 0.878431 0.878431
- *MESH_VERTCOL 393 0.878431 0.878431 0.878431
- *MESH_VERTCOL 394 0.878431 0.878431 0.878431
- *MESH_VERTCOL 395 0.878431 0.878431 0.878431
- *MESH_VERTCOL 396 0.878431 0.878431 0.878431
- *MESH_VERTCOL 397 0.878431 0.878431 0.878431
- *MESH_VERTCOL 398 0.878431 0.878431 0.878431
- *MESH_VERTCOL 399 0.878431 0.878431 0.878431
- *MESH_VERTCOL 400 0.878431 0.878431 0.878431
- *MESH_VERTCOL 401 0.878431 0.878431 0.878431
- *MESH_VERTCOL 402 0.878431 0.878431 0.878431
- *MESH_VERTCOL 403 0.878431 0.878431 0.878431
- *MESH_VERTCOL 404 0.878431 0.878431 0.878431
- *MESH_VERTCOL 405 0.878431 0.878431 0.878431
- *MESH_VERTCOL 406 0.878431 0.878431 0.878431
- *MESH_VERTCOL 407 0.878431 0.878431 0.878431
- *MESH_VERTCOL 408 0.878431 0.878431 0.878431
- *MESH_VERTCOL 409 0.878431 0.878431 0.878431
- *MESH_VERTCOL 410 0.878431 0.878431 0.878431
- *MESH_VERTCOL 411 0.878431 0.878431 0.878431
- *MESH_VERTCOL 412 0.878431 0.878431 0.878431
- *MESH_VERTCOL 413 0.878431 0.878431 0.878431
- *MESH_VERTCOL 414 0.878431 0.878431 0.878431
- *MESH_VERTCOL 415 0.878431 0.878431 0.878431
- *MESH_VERTCOL 416 0.878431 0.878431 0.878431
- *MESH_VERTCOL 417 0.878431 0.878431 0.878431
- *MESH_VERTCOL 418 0.878431 0.878431 0.878431
- *MESH_VERTCOL 419 0.878431 0.878431 0.878431
- *MESH_VERTCOL 420 0.878431 0.878431 0.878431
- *MESH_VERTCOL 421 0.878431 0.878431 0.878431
- *MESH_VERTCOL 422 0.878431 0.878431 0.878431
- *MESH_VERTCOL 423 0.878431 0.878431 0.878431
- *MESH_VERTCOL 424 0.878431 0.878431 0.878431
- *MESH_VERTCOL 425 0.878431 0.878431 0.878431
- *MESH_VERTCOL 426 0.878431 0.878431 0.878431
- *MESH_VERTCOL 427 0.878431 0.878431 0.878431
- *MESH_VERTCOL 428 0.878431 0.878431 0.878431
- *MESH_VERTCOL 429 0.878431 0.878431 0.878431
- *MESH_VERTCOL 430 0.878431 0.878431 0.878431
- *MESH_VERTCOL 431 0.878431 0.878431 0.878431
- *MESH_VERTCOL 432 0.878431 0.878431 0.878431
- *MESH_VERTCOL 433 0.878431 0.878431 0.878431
- *MESH_VERTCOL 434 0.878431 0.878431 0.878431
- *MESH_VERTCOL 435 0.878431 0.878431 0.878431
- *MESH_VERTCOL 436 0.878431 0.878431 0.878431
- *MESH_VERTCOL 437 0.878431 0.878431 0.878431
- *MESH_VERTCOL 438 0.878431 0.878431 0.878431
- *MESH_VERTCOL 439 0.878431 0.878431 0.878431
- *MESH_VERTCOL 440 0.878431 0.878431 0.878431
- *MESH_VERTCOL 441 0.878431 0.878431 0.878431
- *MESH_VERTCOL 442 0.878431 0.878431 0.878431
- *MESH_VERTCOL 443 0.878431 0.878431 0.878431
- *MESH_VERTCOL 444 0.878431 0.878431 0.878431
- *MESH_VERTCOL 445 0.878431 0.878431 0.878431
- *MESH_VERTCOL 446 0.878431 0.878431 0.878431
- *MESH_VERTCOL 447 0.878431 0.878431 0.878431
- *MESH_VERTCOL 448 0.878431 0.878431 0.878431
- *MESH_VERTCOL 449 0.878431 0.878431 0.878431
- *MESH_VERTCOL 450 0.878431 0.878431 0.878431
- *MESH_VERTCOL 451 0.878431 0.878431 0.878431
- *MESH_VERTCOL 452 0.878431 0.878431 0.878431
- *MESH_VERTCOL 453 0.878431 0.878431 0.878431
- *MESH_VERTCOL 454 0.878431 0.878431 0.878431
- *MESH_VERTCOL 455 0.878431 0.878431 0.878431
- *MESH_VERTCOL 456 0.878431 0.878431 0.878431
- *MESH_VERTCOL 457 0.878431 0.878431 0.878431
- *MESH_VERTCOL 458 0.878431 0.878431 0.878431
- *MESH_VERTCOL 459 0.878431 0.878431 0.878431
- *MESH_VERTCOL 460 0.878431 0.878431 0.878431
- *MESH_VERTCOL 461 0.878431 0.878431 0.878431
- *MESH_VERTCOL 462 0.878431 0.878431 0.878431
- *MESH_VERTCOL 463 0.878431 0.878431 0.878431
- *MESH_VERTCOL 464 0.878431 0.878431 0.878431
- *MESH_VERTCOL 465 0.878431 0.878431 0.878431
- *MESH_VERTCOL 466 0.878431 0.878431 0.878431
- *MESH_VERTCOL 467 0.878431 0.878431 0.878431
- *MESH_VERTCOL 468 0.878431 0.878431 0.878431
- *MESH_VERTCOL 469 0.878431 0.878431 0.878431
- *MESH_VERTCOL 470 0.878431 0.878431 0.878431
- *MESH_VERTCOL 471 0.878431 0.878431 0.878431
- *MESH_VERTCOL 472 0.878431 0.878431 0.878431
- *MESH_VERTCOL 473 0.878431 0.878431 0.878431
- *MESH_VERTCOL 474 0.878431 0.878431 0.878431
- *MESH_VERTCOL 475 0.878431 0.878431 0.878431
- *MESH_VERTCOL 476 0.878431 0.878431 0.878431
- *MESH_VERTCOL 477 0.878431 0.878431 0.878431
- *MESH_VERTCOL 478 0.878431 0.878431 0.878431
- *MESH_VERTCOL 479 0.878431 0.878431 0.878431
- *MESH_VERTCOL 480 0.878431 0.878431 0.878431
- *MESH_VERTCOL 481 0.878431 0.878431 0.878431
- *MESH_VERTCOL 482 0.878431 0.878431 0.878431
- *MESH_VERTCOL 483 0.878431 0.878431 0.878431
- *MESH_VERTCOL 484 0.878431 0.878431 0.878431
- *MESH_VERTCOL 485 0.878431 0.878431 0.878431
- *MESH_VERTCOL 486 0.878431 0.878431 0.878431
- *MESH_VERTCOL 487 0.878431 0.878431 0.878431
- *MESH_VERTCOL 488 0.878431 0.878431 0.878431
- *MESH_VERTCOL 489 0.878431 0.878431 0.878431
- *MESH_VERTCOL 490 0.878431 0.878431 0.878431
- *MESH_VERTCOL 491 0.878431 0.878431 0.878431
- *MESH_VERTCOL 492 0.878431 0.878431 0.878431
- *MESH_VERTCOL 493 0.878431 0.878431 0.878431
- *MESH_VERTCOL 494 0.878431 0.878431 0.878431
- *MESH_VERTCOL 495 0.878431 0.878431 0.878431
- *MESH_VERTCOL 496 0.878431 0.878431 0.878431
- *MESH_VERTCOL 497 0.878431 0.878431 0.878431
- *MESH_VERTCOL 498 0.878431 0.878431 0.878431
- *MESH_VERTCOL 499 0.878431 0.878431 0.878431
- *MESH_VERTCOL 500 0.878431 0.878431 0.878431
- *MESH_VERTCOL 501 0.878431 0.878431 0.878431
- *MESH_VERTCOL 502 0.878431 0.878431 0.878431
- *MESH_VERTCOL 503 0.878431 0.878431 0.878431
- *MESH_VERTCOL 504 0.878431 0.878431 0.878431
- *MESH_VERTCOL 505 0.878431 0.878431 0.878431
- *MESH_VERTCOL 506 0.878431 0.878431 0.878431
- *MESH_VERTCOL 507 0.878431 0.878431 0.878431
- *MESH_VERTCOL 508 0.878431 0.878431 0.878431
- *MESH_VERTCOL 509 0.878431 0.878431 0.878431
- *MESH_VERTCOL 510 0.878431 0.878431 0.878431
- *MESH_VERTCOL 511 0.878431 0.878431 0.878431
- *MESH_VERTCOL 512 0.878431 0.878431 0.878431
- *MESH_VERTCOL 513 0.878431 0.878431 0.878431
- *MESH_VERTCOL 514 0.878431 0.878431 0.878431
- *MESH_VERTCOL 515 0.878431 0.878431 0.878431
- *MESH_VERTCOL 516 0.878431 0.878431 0.878431
- *MESH_VERTCOL 517 0.878431 0.878431 0.878431
- *MESH_VERTCOL 518 0.878431 0.878431 0.878431
- *MESH_VERTCOL 519 0.878431 0.878431 0.878431
- *MESH_VERTCOL 520 0.878431 0.878431 0.878431
- *MESH_VERTCOL 521 0.878431 0.878431 0.878431
- *MESH_VERTCOL 522 0.878431 0.878431 0.878431
- *MESH_VERTCOL 523 0.878431 0.878431 0.878431
- *MESH_VERTCOL 524 0.878431 0.878431 0.878431
- *MESH_VERTCOL 525 0.878431 0.878431 0.878431
- *MESH_VERTCOL 526 0.878431 0.878431 0.878431
- *MESH_VERTCOL 527 0.878431 0.878431 0.878431
- *MESH_VERTCOL 528 0.878431 0.878431 0.878431
- *MESH_VERTCOL 529 0.878431 0.878431 0.878431
- *MESH_VERTCOL 530 0.878431 0.878431 0.878431
- *MESH_VERTCOL 531 0.878431 0.878431 0.878431
- *MESH_VERTCOL 532 0.878431 0.878431 0.878431
- *MESH_VERTCOL 533 0.878431 0.878431 0.878431
- *MESH_VERTCOL 534 0.878431 0.878431 0.878431
- *MESH_VERTCOL 535 0.878431 0.878431 0.878431
- *MESH_VERTCOL 536 0.878431 0.878431 0.878431
- *MESH_VERTCOL 537 0.878431 0.878431 0.878431
- *MESH_VERTCOL 538 0.878431 0.878431 0.878431
- *MESH_VERTCOL 539 0.878431 0.878431 0.878431
- *MESH_VERTCOL 540 0.878431 0.878431 0.878431
- *MESH_VERTCOL 541 0.878431 0.878431 0.878431
- *MESH_VERTCOL 542 0.878431 0.878431 0.878431
- *MESH_VERTCOL 543 0.878431 0.878431 0.878431
- *MESH_VERTCOL 544 0.878431 0.878431 0.878431
- *MESH_VERTCOL 545 0.878431 0.878431 0.878431
- *MESH_VERTCOL 546 0.878431 0.878431 0.878431
- *MESH_VERTCOL 547 0.878431 0.878431 0.878431
- *MESH_VERTCOL 548 0.878431 0.878431 0.878431
- *MESH_VERTCOL 549 0.878431 0.878431 0.878431
- *MESH_VERTCOL 550 0.878431 0.878431 0.878431
- *MESH_VERTCOL 551 0.878431 0.878431 0.878431
- *MESH_VERTCOL 552 0.878431 0.878431 0.878431
- *MESH_VERTCOL 553 0.878431 0.878431 0.878431
- *MESH_VERTCOL 554 0.878431 0.878431 0.878431
- *MESH_VERTCOL 555 0.878431 0.878431 0.878431
- *MESH_VERTCOL 556 0.878431 0.878431 0.878431
- *MESH_VERTCOL 557 0.878431 0.878431 0.878431
- *MESH_VERTCOL 558 0.878431 0.878431 0.878431
- *MESH_VERTCOL 559 0.878431 0.878431 0.878431
- *MESH_VERTCOL 560 0.878431 0.878431 0.878431
- *MESH_VERTCOL 561 0.878431 0.878431 0.878431
- *MESH_VERTCOL 562 0.878431 0.878431 0.878431
- *MESH_VERTCOL 563 0.878431 0.878431 0.878431
- *MESH_VERTCOL 564 0.878431 0.878431 0.878431
- *MESH_VERTCOL 565 0.878431 0.878431 0.878431
- *MESH_VERTCOL 566 0.878431 0.878431 0.878431
- *MESH_VERTCOL 567 0.878431 0.878431 0.878431
- *MESH_VERTCOL 568 0.878431 0.878431 0.878431
- *MESH_VERTCOL 569 0.878431 0.878431 0.878431
- *MESH_VERTCOL 570 0.878431 0.878431 0.878431
- *MESH_VERTCOL 571 0.878431 0.878431 0.878431
- *MESH_VERTCOL 572 0.878431 0.878431 0.878431
- *MESH_VERTCOL 573 0.878431 0.878431 0.878431
- *MESH_VERTCOL 574 0.878431 0.878431 0.878431
- *MESH_VERTCOL 575 0.878431 0.878431 0.878431
- *MESH_VERTCOL 576 0.878431 0.878431 0.878431
- *MESH_VERTCOL 577 0.878431 0.878431 0.878431
- *MESH_VERTCOL 578 0.878431 0.878431 0.878431
- *MESH_VERTCOL 579 0.878431 0.878431 0.878431
- *MESH_VERTCOL 580 0.878431 0.878431 0.878431
- *MESH_VERTCOL 581 0.878431 0.878431 0.878431
- *MESH_VERTCOL 582 0.878431 0.878431 0.878431
- *MESH_VERTCOL 583 0.878431 0.878431 0.878431
- *MESH_VERTCOL 584 0.878431 0.878431 0.878431
- *MESH_VERTCOL 585 0.878431 0.878431 0.878431
- *MESH_VERTCOL 586 0.878431 0.878431 0.878431
- *MESH_VERTCOL 587 0.878431 0.878431 0.878431
- *MESH_VERTCOL 588 0.878431 0.878431 0.878431
- *MESH_VERTCOL 589 0.878431 0.878431 0.878431
- *MESH_VERTCOL 590 0.878431 0.878431 0.878431
- *MESH_VERTCOL 591 0.878431 0.878431 0.878431
- *MESH_VERTCOL 592 0.878431 0.878431 0.878431
- *MESH_VERTCOL 593 0.878431 0.878431 0.878431
- *MESH_VERTCOL 594 0.878431 0.878431 0.878431
- *MESH_VERTCOL 595 0.878431 0.878431 0.878431
- *MESH_VERTCOL 596 0.878431 0.878431 0.878431
- *MESH_VERTCOL 597 0.878431 0.878431 0.878431
- *MESH_VERTCOL 598 0.878431 0.878431 0.878431
- *MESH_VERTCOL 599 0.878431 0.878431 0.878431
- *MESH_VERTCOL 600 0.878431 0.878431 0.878431
- *MESH_VERTCOL 601 0.878431 0.878431 0.878431
- *MESH_VERTCOL 602 0.878431 0.878431 0.878431
- *MESH_VERTCOL 603 0.878431 0.878431 0.878431
- *MESH_VERTCOL 604 0.878431 0.878431 0.878431
- *MESH_VERTCOL 605 0.878431 0.878431 0.878431
- *MESH_VERTCOL 606 0.878431 0.878431 0.878431
- *MESH_VERTCOL 607 0.878431 0.878431 0.878431
- *MESH_VERTCOL 608 0.878431 0.878431 0.878431
- *MESH_VERTCOL 609 0.878431 0.878431 0.878431
- *MESH_VERTCOL 610 0.878431 0.878431 0.878431
- *MESH_VERTCOL 611 0.878431 0.878431 0.878431
- *MESH_VERTCOL 612 0.878431 0.878431 0.878431
- *MESH_VERTCOL 613 0.878431 0.878431 0.878431
- *MESH_VERTCOL 614 0.878431 0.878431 0.878431
- *MESH_VERTCOL 615 0.878431 0.878431 0.878431
- *MESH_VERTCOL 616 0.878431 0.878431 0.878431
- *MESH_VERTCOL 617 0.878431 0.878431 0.878431
- *MESH_VERTCOL 618 0.878431 0.878431 0.878431
- *MESH_VERTCOL 619 0.878431 0.878431 0.878431
- *MESH_VERTCOL 620 0.878431 0.878431 0.878431
- *MESH_VERTCOL 621 0.878431 0.878431 0.878431
- *MESH_VERTCOL 622 0.878431 0.878431 0.878431
- *MESH_VERTCOL 623 0.878431 0.878431 0.878431
- *MESH_VERTCOL 624 0.878431 0.878431 0.878431
- *MESH_VERTCOL 625 0.878431 0.878431 0.878431
- *MESH_VERTCOL 626 0.878431 0.878431 0.878431
- *MESH_VERTCOL 627 0.878431 0.878431 0.878431
- *MESH_VERTCOL 628 0.878431 0.878431 0.878431
- *MESH_VERTCOL 629 0.878431 0.878431 0.878431
- *MESH_VERTCOL 630 0.878431 0.878431 0.878431
- *MESH_VERTCOL 631 0.878431 0.878431 0.878431
- *MESH_VERTCOL 632 0.878431 0.878431 0.878431
- *MESH_VERTCOL 633 0.878431 0.878431 0.878431
- *MESH_VERTCOL 634 0.878431 0.878431 0.878431
- *MESH_VERTCOL 635 0.878431 0.878431 0.878431
- *MESH_VERTCOL 636 0.878431 0.878431 0.878431
- *MESH_VERTCOL 637 0.878431 0.878431 0.878431
- *MESH_VERTCOL 638 0.878431 0.878431 0.878431
- *MESH_VERTCOL 639 0.878431 0.878431 0.878431
- *MESH_VERTCOL 640 0.878431 0.878431 0.878431
- *MESH_VERTCOL 641 0.878431 0.878431 0.878431
- *MESH_VERTCOL 642 0.878431 0.878431 0.878431
- *MESH_VERTCOL 643 0.878431 0.878431 0.878431
- *MESH_VERTCOL 644 0.878431 0.878431 0.878431
- *MESH_VERTCOL 645 0.878431 0.878431 0.878431
- *MESH_VERTCOL 646 0.878431 0.878431 0.878431
- *MESH_VERTCOL 647 0.878431 0.878431 0.878431
- *MESH_VERTCOL 648 0.878431 0.878431 0.878431
- *MESH_VERTCOL 649 0.878431 0.878431 0.878431
- *MESH_VERTCOL 650 0.878431 0.878431 0.878431
- *MESH_VERTCOL 651 0.878431 0.878431 0.878431
- *MESH_VERTCOL 652 0.878431 0.878431 0.878431
- *MESH_VERTCOL 653 0.878431 0.878431 0.878431
- *MESH_VERTCOL 654 0.878431 0.878431 0.878431
- *MESH_VERTCOL 655 0.878431 0.878431 0.878431
- *MESH_VERTCOL 656 0.878431 0.878431 0.878431
- *MESH_VERTCOL 657 0.878431 0.878431 0.878431
- *MESH_VERTCOL 658 0.878431 0.878431 0.878431
- *MESH_VERTCOL 659 0.878431 0.878431 0.878431
- *MESH_VERTCOL 660 0.878431 0.878431 0.878431
- *MESH_VERTCOL 661 0.878431 0.878431 0.878431
- *MESH_VERTCOL 662 0.878431 0.878431 0.878431
- *MESH_VERTCOL 663 0.878431 0.878431 0.878431
- *MESH_VERTCOL 664 0.878431 0.878431 0.878431
- *MESH_VERTCOL 665 0.878431 0.878431 0.878431
- *MESH_VERTCOL 666 0.878431 0.878431 0.878431
- *MESH_VERTCOL 667 0.878431 0.878431 0.878431
- *MESH_VERTCOL 668 0.878431 0.878431 0.878431
- *MESH_VERTCOL 669 0.878431 0.878431 0.878431
- *MESH_VERTCOL 670 0.878431 0.878431 0.878431
- *MESH_VERTCOL 671 0.878431 0.878431 0.878431
- *MESH_VERTCOL 672 0.878431 0.878431 0.878431
- *MESH_VERTCOL 673 0.878431 0.878431 0.878431
- *MESH_VERTCOL 674 0.878431 0.878431 0.878431
- *MESH_VERTCOL 675 0.878431 0.878431 0.878431
- *MESH_VERTCOL 676 0.878431 0.878431 0.878431
- *MESH_VERTCOL 677 0.878431 0.878431 0.878431
- *MESH_VERTCOL 678 0.878431 0.878431 0.878431
- *MESH_VERTCOL 679 0.878431 0.878431 0.878431
- *MESH_VERTCOL 680 0.878431 0.878431 0.878431
- *MESH_VERTCOL 681 0.878431 0.878431 0.878431
- *MESH_VERTCOL 682 0.878431 0.878431 0.878431
- *MESH_VERTCOL 683 0.878431 0.878431 0.878431
- *MESH_VERTCOL 684 0.878431 0.878431 0.878431
- *MESH_VERTCOL 685 0.878431 0.878431 0.878431
- *MESH_VERTCOL 686 0.878431 0.878431 0.878431
- *MESH_VERTCOL 687 0.878431 0.878431 0.878431
- *MESH_VERTCOL 688 0.878431 0.878431 0.878431
- *MESH_VERTCOL 689 0.878431 0.878431 0.878431
- *MESH_VERTCOL 690 0.878431 0.878431 0.878431
- *MESH_VERTCOL 691 0.878431 0.878431 0.878431
- *MESH_VERTCOL 692 0.878431 0.878431 0.878431
- *MESH_VERTCOL 693 0.878431 0.878431 0.878431
- *MESH_VERTCOL 694 0.878431 0.878431 0.878431
- *MESH_VERTCOL 695 0.878431 0.878431 0.878431
- *MESH_VERTCOL 696 0.878431 0.878431 0.878431
- *MESH_VERTCOL 697 0.878431 0.878431 0.878431
- *MESH_VERTCOL 698 0.878431 0.878431 0.878431
- *MESH_VERTCOL 699 0.878431 0.878431 0.878431
- *MESH_VERTCOL 700 0.878431 0.878431 0.878431
- *MESH_VERTCOL 701 0.878431 0.878431 0.878431
- *MESH_VERTCOL 702 0.878431 0.878431 0.878431
- *MESH_VERTCOL 703 0.878431 0.878431 0.878431
- *MESH_VERTCOL 704 0.878431 0.878431 0.878431
- *MESH_VERTCOL 705 0.878431 0.878431 0.878431
- *MESH_VERTCOL 706 0.878431 0.878431 0.878431
- *MESH_VERTCOL 707 0.878431 0.878431 0.878431
- *MESH_VERTCOL 708 0.878431 0.878431 0.878431
- *MESH_VERTCOL 709 0.878431 0.878431 0.878431
- *MESH_VERTCOL 710 0.878431 0.878431 0.878431
- *MESH_VERTCOL 711 0.878431 0.878431 0.878431
- *MESH_VERTCOL 712 0.878431 0.878431 0.878431
- *MESH_VERTCOL 713 0.878431 0.878431 0.878431
- *MESH_VERTCOL 714 0.878431 0.878431 0.878431
- *MESH_VERTCOL 715 0.878431 0.878431 0.878431
- *MESH_VERTCOL 716 0.878431 0.878431 0.878431
- *MESH_VERTCOL 717 0.878431 0.878431 0.878431
- *MESH_VERTCOL 718 0.878431 0.878431 0.878431
- *MESH_VERTCOL 719 0.878431 0.878431 0.878431
- *MESH_VERTCOL 720 0.878431 0.878431 0.878431
- *MESH_VERTCOL 721 0.878431 0.878431 0.878431
- *MESH_VERTCOL 722 0.878431 0.878431 0.878431
- *MESH_VERTCOL 723 0.878431 0.878431 0.878431
- *MESH_VERTCOL 724 0.878431 0.878431 0.878431
- *MESH_VERTCOL 725 0.878431 0.878431 0.878431
- *MESH_VERTCOL 726 0.878431 0.878431 0.878431
- *MESH_VERTCOL 727 0.878431 0.878431 0.878431
- *MESH_VERTCOL 728 0.878431 0.878431 0.878431
- *MESH_VERTCOL 729 0.878431 0.878431 0.878431
- *MESH_VERTCOL 730 0.878431 0.878431 0.878431
- *MESH_VERTCOL 731 0.878431 0.878431 0.878431
- *MESH_VERTCOL 732 0.878431 0.878431 0.878431
- *MESH_VERTCOL 733 0.878431 0.878431 0.878431
- *MESH_VERTCOL 734 0.878431 0.878431 0.878431
- *MESH_VERTCOL 735 0.878431 0.878431 0.878431
- *MESH_VERTCOL 736 0.878431 0.878431 0.878431
- *MESH_VERTCOL 737 0.878431 0.878431 0.878431
- *MESH_VERTCOL 738 0.878431 0.878431 0.878431
- *MESH_VERTCOL 739 0.878431 0.878431 0.878431
- *MESH_VERTCOL 740 0.878431 0.878431 0.878431
- *MESH_VERTCOL 741 0.878431 0.878431 0.878431
- *MESH_VERTCOL 742 0.878431 0.878431 0.878431
- *MESH_VERTCOL 743 0.878431 0.878431 0.878431
- *MESH_VERTCOL 744 0.878431 0.878431 0.878431
- *MESH_VERTCOL 745 0.878431 0.878431 0.878431
- *MESH_VERTCOL 746 0.878431 0.878431 0.878431
- *MESH_VERTCOL 747 0.878431 0.878431 0.878431
- *MESH_VERTCOL 748 0.878431 0.878431 0.878431
- *MESH_VERTCOL 749 0.878431 0.878431 0.878431
- *MESH_VERTCOL 750 0.878431 0.878431 0.878431
- *MESH_VERTCOL 751 0.878431 0.878431 0.878431
- *MESH_VERTCOL 752 0.878431 0.878431 0.878431
- *MESH_VERTCOL 753 0.878431 0.878431 0.878431
- *MESH_VERTCOL 754 0.878431 0.878431 0.878431
- *MESH_VERTCOL 755 0.878431 0.878431 0.878431
- *MESH_VERTCOL 756 0.878431 0.878431 0.878431
- *MESH_VERTCOL 757 0.878431 0.878431 0.878431
- *MESH_VERTCOL 758 0.878431 0.878431 0.878431
- *MESH_VERTCOL 759 0.878431 0.878431 0.878431
- *MESH_VERTCOL 760 0.878431 0.878431 0.878431
- *MESH_VERTCOL 761 0.878431 0.878431 0.878431
- *MESH_VERTCOL 762 0.878431 0.878431 0.878431
- *MESH_VERTCOL 763 0.878431 0.878431 0.878431
- *MESH_VERTCOL 764 0.878431 0.878431 0.878431
- *MESH_VERTCOL 765 0.878431 0.878431 0.878431
- *MESH_VERTCOL 766 0.878431 0.878431 0.878431
- *MESH_VERTCOL 767 0.878431 0.878431 0.878431
- *MESH_VERTCOL 768 0.878431 0.878431 0.878431
- *MESH_VERTCOL 769 0.878431 0.878431 0.878431
- *MESH_VERTCOL 770 0.878431 0.878431 0.878431
- *MESH_VERTCOL 771 0.878431 0.878431 0.878431
- *MESH_VERTCOL 772 0.878431 0.878431 0.878431
- *MESH_VERTCOL 773 0.878431 0.878431 0.878431
- *MESH_VERTCOL 774 0.878431 0.878431 0.878431
- *MESH_VERTCOL 775 0.878431 0.878431 0.878431
- *MESH_VERTCOL 776 0.878431 0.878431 0.878431
- *MESH_VERTCOL 777 0.878431 0.878431 0.878431
- *MESH_VERTCOL 778 0.878431 0.878431 0.878431
- *MESH_VERTCOL 779 0.878431 0.878431 0.878431
- *MESH_VERTCOL 780 0.878431 0.878431 0.878431
- *MESH_VERTCOL 781 0.878431 0.878431 0.878431
- *MESH_VERTCOL 782 0.878431 0.878431 0.878431
- *MESH_VERTCOL 783 0.878431 0.878431 0.878431
- *MESH_VERTCOL 784 0.878431 0.878431 0.878431
- *MESH_VERTCOL 785 0.878431 0.878431 0.878431
- *MESH_VERTCOL 786 0.878431 0.878431 0.878431
- *MESH_VERTCOL 787 0.878431 0.878431 0.878431
- *MESH_VERTCOL 788 0.878431 0.878431 0.878431
- *MESH_VERTCOL 789 0.878431 0.878431 0.878431
- *MESH_VERTCOL 790 0.878431 0.878431 0.878431
- *MESH_VERTCOL 791 0.878431 0.878431 0.878431
- *MESH_VERTCOL 792 0.878431 0.878431 0.878431
- *MESH_VERTCOL 793 0.878431 0.878431 0.878431
- *MESH_VERTCOL 794 0.878431 0.878431 0.878431
- *MESH_VERTCOL 795 0.878431 0.878431 0.878431
- *MESH_VERTCOL 796 0.878431 0.878431 0.878431
- *MESH_VERTCOL 797 0.878431 0.878431 0.878431
- *MESH_VERTCOL 798 0.878431 0.878431 0.878431
- *MESH_VERTCOL 799 0.878431 0.878431 0.878431
- *MESH_VERTCOL 800 0.878431 0.878431 0.878431
- *MESH_VERTCOL 801 0.878431 0.878431 0.878431
- *MESH_VERTCOL 802 0.878431 0.878431 0.878431
- *MESH_VERTCOL 803 0.878431 0.878431 0.878431
- *MESH_VERTCOL 804 0.878431 0.878431 0.878431
- *MESH_VERTCOL 805 0.878431 0.878431 0.878431
- *MESH_VERTCOL 806 0.878431 0.878431 0.878431
- *MESH_VERTCOL 807 0.878431 0.878431 0.878431
- *MESH_VERTCOL 808 0.878431 0.878431 0.878431
- *MESH_VERTCOL 809 0.878431 0.878431 0.878431
- *MESH_VERTCOL 810 0.878431 0.878431 0.878431
- *MESH_VERTCOL 811 0.878431 0.878431 0.878431
- *MESH_VERTCOL 812 0.878431 0.878431 0.878431
- *MESH_VERTCOL 813 0.878431 0.878431 0.878431
- *MESH_VERTCOL 814 0.878431 0.878431 0.878431
- *MESH_VERTCOL 815 0.878431 0.878431 0.878431
- *MESH_VERTCOL 816 0.878431 0.878431 0.878431
- *MESH_VERTCOL 817 0.878431 0.878431 0.878431
- *MESH_VERTCOL 818 0.878431 0.878431 0.878431
- *MESH_VERTCOL 819 0.878431 0.878431 0.878431
- *MESH_VERTCOL 820 0.878431 0.878431 0.878431
- *MESH_VERTCOL 821 0.878431 0.878431 0.878431
- *MESH_VERTCOL 822 0.878431 0.878431 0.878431
- *MESH_VERTCOL 823 0.878431 0.878431 0.878431
- *MESH_VERTCOL 824 0.878431 0.878431 0.878431
- *MESH_VERTCOL 825 0.878431 0.878431 0.878431
- *MESH_VERTCOL 826 0.878431 0.878431 0.878431
- *MESH_VERTCOL 827 0.878431 0.878431 0.878431
- *MESH_VERTCOL 828 0.878431 0.878431 0.878431
- *MESH_VERTCOL 829 0.878431 0.878431 0.878431
- *MESH_VERTCOL 830 0.878431 0.878431 0.878431
- *MESH_VERTCOL 831 0.878431 0.878431 0.878431
- *MESH_VERTCOL 832 0.878431 0.878431 0.878431
- *MESH_VERTCOL 833 0.878431 0.878431 0.878431
- *MESH_VERTCOL 834 0.878431 0.878431 0.878431
- *MESH_VERTCOL 835 0.878431 0.878431 0.878431
- *MESH_VERTCOL 836 0.878431 0.878431 0.878431
- *MESH_VERTCOL 837 0.878431 0.878431 0.878431
- *MESH_VERTCOL 838 0.878431 0.878431 0.878431
- *MESH_VERTCOL 839 0.878431 0.878431 0.878431
- *MESH_VERTCOL 840 0.878431 0.878431 0.878431
- *MESH_VERTCOL 841 0.878431 0.878431 0.878431
- *MESH_VERTCOL 842 0.878431 0.878431 0.878431
- *MESH_VERTCOL 843 0.878431 0.878431 0.878431
- *MESH_VERTCOL 844 0.878431 0.878431 0.878431
- *MESH_VERTCOL 845 0.878431 0.878431 0.878431
- *MESH_VERTCOL 846 0.878431 0.878431 0.878431
- *MESH_VERTCOL 847 0.878431 0.878431 0.878431
- *MESH_VERTCOL 848 0.878431 0.878431 0.878431
- *MESH_VERTCOL 849 0.878431 0.878431 0.878431
- *MESH_VERTCOL 850 0.878431 0.878431 0.878431
- *MESH_VERTCOL 851 0.878431 0.878431 0.878431
- *MESH_VERTCOL 852 0.878431 0.878431 0.878431
- *MESH_VERTCOL 853 0.878431 0.878431 0.878431
- *MESH_VERTCOL 854 0.878431 0.878431 0.878431
- *MESH_VERTCOL 855 0.878431 0.878431 0.878431
- *MESH_VERTCOL 856 0.878431 0.878431 0.878431
- *MESH_VERTCOL 857 0.878431 0.878431 0.878431
- *MESH_VERTCOL 858 0.878431 0.878431 0.878431
- *MESH_VERTCOL 859 0.878431 0.878431 0.878431
- *MESH_VERTCOL 860 0.878431 0.878431 0.878431
- *MESH_VERTCOL 861 0.878431 0.878431 0.878431
- *MESH_VERTCOL 862 0.878431 0.878431 0.878431
- *MESH_VERTCOL 863 0.878431 0.878431 0.878431
- *MESH_VERTCOL 864 0.878431 0.878431 0.878431
- *MESH_VERTCOL 865 0.878431 0.878431 0.878431
- *MESH_VERTCOL 866 0.878431 0.878431 0.878431
- *MESH_VERTCOL 867 0.878431 0.878431 0.878431
- *MESH_VERTCOL 868 0.878431 0.878431 0.878431
- *MESH_VERTCOL 869 0.878431 0.878431 0.878431
- *MESH_VERTCOL 870 0.878431 0.878431 0.878431
- *MESH_VERTCOL 871 0.878431 0.878431 0.878431
- *MESH_VERTCOL 872 0.878431 0.878431 0.878431
- *MESH_VERTCOL 873 0.878431 0.878431 0.878431
- *MESH_VERTCOL 874 0.878431 0.878431 0.878431
- *MESH_VERTCOL 875 0.878431 0.878431 0.878431
- *MESH_VERTCOL 876 0.878431 0.878431 0.878431
- *MESH_VERTCOL 877 0.878431 0.878431 0.878431
- *MESH_VERTCOL 878 0.878431 0.878431 0.878431
- *MESH_VERTCOL 879 0.878431 0.878431 0.878431
- *MESH_VERTCOL 880 0.878431 0.878431 0.878431
- *MESH_VERTCOL 881 0.878431 0.878431 0.878431
- *MESH_VERTCOL 882 0.878431 0.878431 0.878431
- *MESH_VERTCOL 883 0.878431 0.878431 0.878431
- *MESH_VERTCOL 884 0.878431 0.878431 0.878431
- *MESH_VERTCOL 885 0.878431 0.878431 0.878431
- *MESH_VERTCOL 886 0.878431 0.878431 0.878431
- *MESH_VERTCOL 887 0.878431 0.878431 0.878431
- *MESH_VERTCOL 888 0.878431 0.878431 0.878431
- *MESH_VERTCOL 889 0.878431 0.878431 0.878431
- *MESH_VERTCOL 890 0.878431 0.878431 0.878431
- *MESH_VERTCOL 891 0.878431 0.878431 0.878431
- *MESH_VERTCOL 892 0.878431 0.878431 0.878431
- *MESH_VERTCOL 893 0.878431 0.878431 0.878431
- *MESH_VERTCOL 894 0.878431 0.878431 0.878431
- *MESH_VERTCOL 895 0.878431 0.878431 0.878431
- *MESH_VERTCOL 896 0.878431 0.878431 0.878431
- *MESH_VERTCOL 897 0.878431 0.878431 0.878431
- *MESH_VERTCOL 898 0.878431 0.878431 0.878431
- *MESH_VERTCOL 899 0.878431 0.878431 0.878431
- *MESH_VERTCOL 900 0.878431 0.878431 0.878431
- *MESH_VERTCOL 901 0.878431 0.878431 0.878431
- *MESH_VERTCOL 902 0.878431 0.878431 0.878431
- *MESH_VERTCOL 903 0.878431 0.878431 0.878431
- *MESH_VERTCOL 904 0.878431 0.878431 0.878431
- *MESH_VERTCOL 905 0.878431 0.878431 0.878431
- *MESH_VERTCOL 906 0.878431 0.878431 0.878431
- *MESH_VERTCOL 907 0.878431 0.878431 0.878431
- *MESH_VERTCOL 908 0.878431 0.878431 0.878431
- *MESH_VERTCOL 909 0.878431 0.878431 0.878431
- *MESH_VERTCOL 910 0.878431 0.878431 0.878431
- *MESH_VERTCOL 911 0.878431 0.878431 0.878431
- *MESH_VERTCOL 912 0.878431 0.878431 0.878431
- *MESH_VERTCOL 913 0.878431 0.878431 0.878431
- *MESH_VERTCOL 914 0.878431 0.878431 0.878431
- *MESH_VERTCOL 915 0.878431 0.878431 0.878431
- *MESH_VERTCOL 916 0.878431 0.878431 0.878431
- *MESH_VERTCOL 917 0.878431 0.878431 0.878431
- *MESH_VERTCOL 918 0.878431 0.878431 0.878431
- *MESH_VERTCOL 919 0.878431 0.878431 0.878431
- *MESH_VERTCOL 920 0.878431 0.878431 0.878431
- *MESH_VERTCOL 921 0.878431 0.878431 0.878431
- *MESH_VERTCOL 922 0.878431 0.878431 0.878431
- *MESH_VERTCOL 923 0.878431 0.878431 0.878431
- *MESH_VERTCOL 924 0.878431 0.878431 0.878431
- *MESH_VERTCOL 925 0.878431 0.878431 0.878431
- *MESH_VERTCOL 926 0.878431 0.878431 0.878431
- *MESH_VERTCOL 927 0.878431 0.878431 0.878431
- *MESH_VERTCOL 928 0.878431 0.878431 0.878431
- *MESH_VERTCOL 929 0.878431 0.878431 0.878431
- *MESH_VERTCOL 930 0.878431 0.878431 0.878431
- *MESH_VERTCOL 931 0.878431 0.878431 0.878431
- *MESH_VERTCOL 932 0.878431 0.878431 0.878431
- *MESH_VERTCOL 933 0.878431 0.878431 0.878431
- *MESH_VERTCOL 934 0.878431 0.878431 0.878431
- *MESH_VERTCOL 935 0.878431 0.878431 0.878431
- *MESH_VERTCOL 936 0.878431 0.878431 0.878431
- *MESH_VERTCOL 937 0.878431 0.878431 0.878431
- *MESH_VERTCOL 938 0.878431 0.878431 0.878431
- *MESH_VERTCOL 939 0.878431 0.878431 0.878431
- *MESH_VERTCOL 940 0.878431 0.878431 0.878431
- *MESH_VERTCOL 941 0.878431 0.878431 0.878431
- *MESH_VERTCOL 942 0.878431 0.878431 0.878431
- *MESH_VERTCOL 943 0.878431 0.878431 0.878431
- *MESH_VERTCOL 944 0.878431 0.878431 0.878431
- *MESH_VERTCOL 945 0.878431 0.878431 0.878431
- *MESH_VERTCOL 946 0.878431 0.878431 0.878431
- *MESH_VERTCOL 947 0.878431 0.878431 0.878431
- *MESH_VERTCOL 948 0.878431 0.878431 0.878431
- *MESH_VERTCOL 949 0.878431 0.878431 0.878431
- *MESH_VERTCOL 950 0.878431 0.878431 0.878431
- *MESH_VERTCOL 951 0.878431 0.878431 0.878431
- *MESH_VERTCOL 952 0.878431 0.878431 0.878431
- *MESH_VERTCOL 953 0.878431 0.878431 0.878431
- *MESH_VERTCOL 954 0.878431 0.878431 0.878431
- *MESH_VERTCOL 955 0.878431 0.878431 0.878431
- *MESH_VERTCOL 956 0.878431 0.878431 0.878431
- *MESH_VERTCOL 957 0.878431 0.878431 0.878431
- *MESH_VERTCOL 958 0.878431 0.878431 0.878431
- *MESH_VERTCOL 959 0.878431 0.878431 0.878431
- *MESH_VERTCOL 960 0.878431 0.878431 0.878431
- *MESH_VERTCOL 961 0.878431 0.878431 0.878431
- *MESH_VERTCOL 962 0.878431 0.878431 0.878431
- *MESH_VERTCOL 963 0.878431 0.878431 0.878431
- *MESH_VERTCOL 964 0.878431 0.878431 0.878431
- *MESH_VERTCOL 965 0.878431 0.878431 0.878431
- *MESH_VERTCOL 966 0.878431 0.878431 0.878431
- *MESH_VERTCOL 967 0.878431 0.878431 0.878431
- *MESH_VERTCOL 968 0.878431 0.878431 0.878431
- *MESH_VERTCOL 969 0.878431 0.878431 0.878431
- *MESH_VERTCOL 970 0.878431 0.878431 0.878431
- *MESH_VERTCOL 971 0.878431 0.878431 0.878431
- *MESH_VERTCOL 972 0.878431 0.878431 0.878431
- *MESH_VERTCOL 973 0.878431 0.878431 0.878431
- *MESH_VERTCOL 974 0.878431 0.878431 0.878431
- *MESH_VERTCOL 975 0.878431 0.878431 0.878431
- *MESH_VERTCOL 976 0.878431 0.878431 0.878431
- *MESH_VERTCOL 977 0.878431 0.878431 0.878431
- *MESH_VERTCOL 978 0.878431 0.878431 0.878431
- *MESH_VERTCOL 979 0.878431 0.878431 0.878431
- *MESH_VERTCOL 980 0.878431 0.878431 0.878431
- *MESH_VERTCOL 981 0.878431 0.878431 0.878431
- *MESH_VERTCOL 982 0.878431 0.878431 0.878431
- *MESH_VERTCOL 983 0.878431 0.878431 0.878431
- *MESH_VERTCOL 984 0.878431 0.878431 0.878431
- *MESH_VERTCOL 985 0.878431 0.878431 0.878431
- *MESH_VERTCOL 986 0.878431 0.878431 0.878431
- *MESH_VERTCOL 987 0.878431 0.878431 0.878431
- *MESH_VERTCOL 988 0.878431 0.878431 0.878431
- *MESH_VERTCOL 989 0.878431 0.878431 0.878431
- *MESH_VERTCOL 990 0.878431 0.878431 0.878431
- *MESH_VERTCOL 991 0.878431 0.878431 0.878431
- *MESH_VERTCOL 992 0.878431 0.878431 0.878431
- *MESH_VERTCOL 993 0.878431 0.878431 0.878431
- *MESH_VERTCOL 994 0.878431 0.878431 0.878431
- *MESH_VERTCOL 995 0.878431 0.878431 0.878431
- *MESH_VERTCOL 996 0.878431 0.878431 0.878431
- *MESH_VERTCOL 997 0.878431 0.878431 0.878431
- *MESH_VERTCOL 998 0.878431 0.878431 0.878431
- *MESH_VERTCOL 999 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1000 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1001 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1002 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1003 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1004 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1005 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1006 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1007 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1008 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1009 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1010 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1011 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1012 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1013 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1014 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1015 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1016 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1017 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1018 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1019 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1020 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1021 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1022 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1023 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1024 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1025 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1026 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1027 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1028 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1029 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1030 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1031 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1032 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1033 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1034 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1035 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1036 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1037 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1038 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1039 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1040 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1041 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1042 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1043 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1044 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1045 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1046 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1047 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1048 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1049 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1050 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1051 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1052 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1053 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1054 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1055 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1056 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1057 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1058 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1059 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1060 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1061 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1062 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1063 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1064 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1065 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1066 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1067 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1068 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1069 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1070 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1071 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1072 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1073 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1074 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1075 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1076 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1077 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1078 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1079 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1080 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1081 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1082 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1083 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1084 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1085 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1086 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1087 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1088 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1089 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1090 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1091 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1092 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1093 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1094 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1095 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1096 0.878431 0.878431 0.878431
- *MESH_VERTCOL 1097 0.878431 0.878431 0.878431
- }
- *MESH_NUMCVFACES 366
- *MESH_CFACELIST {
- *MESH_CFACE 0 0 1 2
- *MESH_CFACE 1 3 4 5
- *MESH_CFACE 2 6 7 8
- *MESH_CFACE 3 9 10 11
- *MESH_CFACE 4 12 13 14
- *MESH_CFACE 5 15 16 17
- *MESH_CFACE 6 18 19 20
- *MESH_CFACE 7 21 22 23
- *MESH_CFACE 8 24 25 26
- *MESH_CFACE 9 27 28 29
- *MESH_CFACE 10 30 31 32
- *MESH_CFACE 11 33 34 35
- *MESH_CFACE 12 36 37 38
- *MESH_CFACE 13 39 40 41
- *MESH_CFACE 14 42 43 44
- *MESH_CFACE 15 45 46 47
- *MESH_CFACE 16 48 49 50
- *MESH_CFACE 17 51 52 53
- *MESH_CFACE 18 54 55 56
- *MESH_CFACE 19 57 58 59
- *MESH_CFACE 20 60 61 62
- *MESH_CFACE 21 63 64 65
- *MESH_CFACE 22 66 67 68
- *MESH_CFACE 23 69 70 71
- *MESH_CFACE 24 72 73 74
- *MESH_CFACE 25 75 76 77
- *MESH_CFACE 26 78 79 80
- *MESH_CFACE 27 81 82 83
- *MESH_CFACE 28 84 85 86
- *MESH_CFACE 29 87 88 89
- *MESH_CFACE 30 90 91 92
- *MESH_CFACE 31 93 94 95
- *MESH_CFACE 32 96 97 98
- *MESH_CFACE 33 99 100 101
- *MESH_CFACE 34 102 103 104
- *MESH_CFACE 35 105 106 107
- *MESH_CFACE 36 108 109 110
- *MESH_CFACE 37 111 112 113
- *MESH_CFACE 38 114 115 116
- *MESH_CFACE 39 117 118 119
- *MESH_CFACE 40 120 121 122
- *MESH_CFACE 41 123 124 125
- *MESH_CFACE 42 126 127 128
- *MESH_CFACE 43 129 130 131
- *MESH_CFACE 44 132 133 134
- *MESH_CFACE 45 135 136 137
- *MESH_CFACE 46 138 139 140
- *MESH_CFACE 47 141 142 143
- *MESH_CFACE 48 144 145 146
- *MESH_CFACE 49 147 148 149
- *MESH_CFACE 50 150 151 152
- *MESH_CFACE 51 153 154 155
- *MESH_CFACE 52 156 157 158
- *MESH_CFACE 53 159 160 161
- *MESH_CFACE 54 162 163 164
- *MESH_CFACE 55 165 166 167
- *MESH_CFACE 56 168 169 170
- *MESH_CFACE 57 171 172 173
- *MESH_CFACE 58 174 175 176
- *MESH_CFACE 59 177 178 179
- *MESH_CFACE 60 180 181 182
- *MESH_CFACE 61 183 184 185
- *MESH_CFACE 62 186 187 188
- *MESH_CFACE 63 189 190 191
- *MESH_CFACE 64 192 193 194
- *MESH_CFACE 65 195 196 197
- *MESH_CFACE 66 198 199 200
- *MESH_CFACE 67 201 202 203
- *MESH_CFACE 68 204 205 206
- *MESH_CFACE 69 207 208 209
- *MESH_CFACE 70 210 211 212
- *MESH_CFACE 71 213 214 215
- *MESH_CFACE 72 216 217 218
- *MESH_CFACE 73 219 220 221
- *MESH_CFACE 74 222 223 224
- *MESH_CFACE 75 225 226 227
- *MESH_CFACE 76 228 229 230
- *MESH_CFACE 77 231 232 233
- *MESH_CFACE 78 234 235 236
- *MESH_CFACE 79 237 238 239
- *MESH_CFACE 80 240 241 242
- *MESH_CFACE 81 243 244 245
- *MESH_CFACE 82 246 247 248
- *MESH_CFACE 83 249 250 251
- *MESH_CFACE 84 252 253 254
- *MESH_CFACE 85 255 256 257
- *MESH_CFACE 86 258 259 260
- *MESH_CFACE 87 261 262 263
- *MESH_CFACE 88 264 265 266
- *MESH_CFACE 89 267 268 269
- *MESH_CFACE 90 270 271 272
- *MESH_CFACE 91 273 274 275
- *MESH_CFACE 92 276 277 278
- *MESH_CFACE 93 279 280 281
- *MESH_CFACE 94 282 283 284
- *MESH_CFACE 95 285 286 287
- *MESH_CFACE 96 288 289 290
- *MESH_CFACE 97 291 292 293
- *MESH_CFACE 98 294 295 296
- *MESH_CFACE 99 297 298 299
- *MESH_CFACE 100 300 301 302
- *MESH_CFACE 101 303 304 305
- *MESH_CFACE 102 306 307 308
- *MESH_CFACE 103 309 310 311
- *MESH_CFACE 104 312 313 314
- *MESH_CFACE 105 315 316 317
- *MESH_CFACE 106 318 319 320
- *MESH_CFACE 107 321 322 323
- *MESH_CFACE 108 324 325 326
- *MESH_CFACE 109 327 328 329
- *MESH_CFACE 110 330 331 332
- *MESH_CFACE 111 333 334 335
- *MESH_CFACE 112 336 337 338
- *MESH_CFACE 113 339 340 341
- *MESH_CFACE 114 342 343 344
- *MESH_CFACE 115 345 346 347
- *MESH_CFACE 116 348 349 350
- *MESH_CFACE 117 351 352 353
- *MESH_CFACE 118 354 355 356
- *MESH_CFACE 119 357 358 359
- *MESH_CFACE 120 360 361 362
- *MESH_CFACE 121 363 364 365
- *MESH_CFACE 122 366 367 368
- *MESH_CFACE 123 369 370 371
- *MESH_CFACE 124 372 373 374
- *MESH_CFACE 125 375 376 377
- *MESH_CFACE 126 378 379 380
- *MESH_CFACE 127 381 382 383
- *MESH_CFACE 128 384 385 386
- *MESH_CFACE 129 387 388 389
- *MESH_CFACE 130 390 391 392
- *MESH_CFACE 131 393 394 395
- *MESH_CFACE 132 396 397 398
- *MESH_CFACE 133 399 400 401
- *MESH_CFACE 134 402 403 404
- *MESH_CFACE 135 405 406 407
- *MESH_CFACE 136 408 409 410
- *MESH_CFACE 137 411 412 413
- *MESH_CFACE 138 414 415 416
- *MESH_CFACE 139 417 418 419
- *MESH_CFACE 140 420 421 422
- *MESH_CFACE 141 423 424 425
- *MESH_CFACE 142 426 427 428
- *MESH_CFACE 143 429 430 431
- *MESH_CFACE 144 432 433 434
- *MESH_CFACE 145 435 436 437
- *MESH_CFACE 146 438 439 440
- *MESH_CFACE 147 441 442 443
- *MESH_CFACE 148 444 445 446
- *MESH_CFACE 149 447 448 449
- *MESH_CFACE 150 450 451 452
- *MESH_CFACE 151 453 454 455
- *MESH_CFACE 152 456 457 458
- *MESH_CFACE 153 459 460 461
- *MESH_CFACE 154 462 463 464
- *MESH_CFACE 155 465 466 467
- *MESH_CFACE 156 468 469 470
- *MESH_CFACE 157 471 472 473
- *MESH_CFACE 158 474 475 476
- *MESH_CFACE 159 477 478 479
- *MESH_CFACE 160 480 481 482
- *MESH_CFACE 161 483 484 485
- *MESH_CFACE 162 486 487 488
- *MESH_CFACE 163 489 490 491
- *MESH_CFACE 164 492 493 494
- *MESH_CFACE 165 495 496 497
- *MESH_CFACE 166 498 499 500
- *MESH_CFACE 167 501 502 503
- *MESH_CFACE 168 504 505 506
- *MESH_CFACE 169 507 508 509
- *MESH_CFACE 170 510 511 512
- *MESH_CFACE 171 513 514 515
- *MESH_CFACE 172 516 517 518
- *MESH_CFACE 173 519 520 521
- *MESH_CFACE 174 522 523 524
- *MESH_CFACE 175 525 526 527
- *MESH_CFACE 176 528 529 530
- *MESH_CFACE 177 531 532 533
- *MESH_CFACE 178 534 535 536
- *MESH_CFACE 179 537 538 539
- *MESH_CFACE 180 540 541 542
- *MESH_CFACE 181 543 544 545
- *MESH_CFACE 182 546 547 548
- *MESH_CFACE 183 549 550 551
- *MESH_CFACE 184 552 553 554
- *MESH_CFACE 185 555 556 557
- *MESH_CFACE 186 558 559 560
- *MESH_CFACE 187 561 562 563
- *MESH_CFACE 188 564 565 566
- *MESH_CFACE 189 567 568 569
- *MESH_CFACE 190 570 571 572
- *MESH_CFACE 191 573 574 575
- *MESH_CFACE 192 576 577 578
- *MESH_CFACE 193 579 580 581
- *MESH_CFACE 194 582 583 584
- *MESH_CFACE 195 585 586 587
- *MESH_CFACE 196 588 589 590
- *MESH_CFACE 197 591 592 593
- *MESH_CFACE 198 594 595 596
- *MESH_CFACE 199 597 598 599
- *MESH_CFACE 200 600 601 602
- *MESH_CFACE 201 603 604 605
- *MESH_CFACE 202 606 607 608
- *MESH_CFACE 203 609 610 611
- *MESH_CFACE 204 612 613 614
- *MESH_CFACE 205 615 616 617
- *MESH_CFACE 206 618 619 620
- *MESH_CFACE 207 621 622 623
- *MESH_CFACE 208 624 625 626
- *MESH_CFACE 209 627 628 629
- *MESH_CFACE 210 630 631 632
- *MESH_CFACE 211 633 634 635
- *MESH_CFACE 212 636 637 638
- *MESH_CFACE 213 639 640 641
- *MESH_CFACE 214 642 643 644
- *MESH_CFACE 215 645 646 647
- *MESH_CFACE 216 648 649 650
- *MESH_CFACE 217 651 652 653
- *MESH_CFACE 218 654 655 656
- *MESH_CFACE 219 657 658 659
- *MESH_CFACE 220 660 661 662
- *MESH_CFACE 221 663 664 665
- *MESH_CFACE 222 666 667 668
- *MESH_CFACE 223 669 670 671
- *MESH_CFACE 224 672 673 674
- *MESH_CFACE 225 675 676 677
- *MESH_CFACE 226 678 679 680
- *MESH_CFACE 227 681 682 683
- *MESH_CFACE 228 684 685 686
- *MESH_CFACE 229 687 688 689
- *MESH_CFACE 230 690 691 692
- *MESH_CFACE 231 693 694 695
- *MESH_CFACE 232 696 697 698
- *MESH_CFACE 233 699 700 701
- *MESH_CFACE 234 702 703 704
- *MESH_CFACE 235 705 706 707
- *MESH_CFACE 236 708 709 710
- *MESH_CFACE 237 711 712 713
- *MESH_CFACE 238 714 715 716
- *MESH_CFACE 239 717 718 719
- *MESH_CFACE 240 720 721 722
- *MESH_CFACE 241 723 724 725
- *MESH_CFACE 242 726 727 728
- *MESH_CFACE 243 729 730 731
- *MESH_CFACE 244 732 733 734
- *MESH_CFACE 245 735 736 737
- *MESH_CFACE 246 738 739 740
- *MESH_CFACE 247 741 742 743
- *MESH_CFACE 248 744 745 746
- *MESH_CFACE 249 747 748 749
- *MESH_CFACE 250 750 751 752
- *MESH_CFACE 251 753 754 755
- *MESH_CFACE 252 756 757 758
- *MESH_CFACE 253 759 760 761
- *MESH_CFACE 254 762 763 764
- *MESH_CFACE 255 765 766 767
- *MESH_CFACE 256 768 769 770
- *MESH_CFACE 257 771 772 773
- *MESH_CFACE 258 774 775 776
- *MESH_CFACE 259 777 778 779
- *MESH_CFACE 260 780 781 782
- *MESH_CFACE 261 783 784 785
- *MESH_CFACE 262 786 787 788
- *MESH_CFACE 263 789 790 791
- *MESH_CFACE 264 792 793 794
- *MESH_CFACE 265 795 796 797
- *MESH_CFACE 266 798 799 800
- *MESH_CFACE 267 801 802 803
- *MESH_CFACE 268 804 805 806
- *MESH_CFACE 269 807 808 809
- *MESH_CFACE 270 810 811 812
- *MESH_CFACE 271 813 814 815
- *MESH_CFACE 272 816 817 818
- *MESH_CFACE 273 819 820 821
- *MESH_CFACE 274 822 823 824
- *MESH_CFACE 275 825 826 827
- *MESH_CFACE 276 828 829 830
- *MESH_CFACE 277 831 832 833
- *MESH_CFACE 278 834 835 836
- *MESH_CFACE 279 837 838 839
- *MESH_CFACE 280 840 841 842
- *MESH_CFACE 281 843 844 845
- *MESH_CFACE 282 846 847 848
- *MESH_CFACE 283 849 850 851
- *MESH_CFACE 284 852 853 854
- *MESH_CFACE 285 855 856 857
- *MESH_CFACE 286 858 859 860
- *MESH_CFACE 287 861 862 863
- *MESH_CFACE 288 864 865 866
- *MESH_CFACE 289 867 868 869
- *MESH_CFACE 290 870 871 872
- *MESH_CFACE 291 873 874 875
- *MESH_CFACE 292 876 877 878
- *MESH_CFACE 293 879 880 881
- *MESH_CFACE 294 882 883 884
- *MESH_CFACE 295 885 886 887
- *MESH_CFACE 296 888 889 890
- *MESH_CFACE 297 891 892 893
- *MESH_CFACE 298 894 895 896
- *MESH_CFACE 299 897 898 899
- *MESH_CFACE 300 900 901 902
- *MESH_CFACE 301 903 904 905
- *MESH_CFACE 302 906 907 908
- *MESH_CFACE 303 909 910 911
- *MESH_CFACE 304 912 913 914
- *MESH_CFACE 305 915 916 917
- *MESH_CFACE 306 918 919 920
- *MESH_CFACE 307 921 922 923
- *MESH_CFACE 308 924 925 926
- *MESH_CFACE 309 927 928 929
- *MESH_CFACE 310 930 931 932
- *MESH_CFACE 311 933 934 935
- *MESH_CFACE 312 936 937 938
- *MESH_CFACE 313 939 940 941
- *MESH_CFACE 314 942 943 944
- *MESH_CFACE 315 945 946 947
- *MESH_CFACE 316 948 949 950
- *MESH_CFACE 317 951 952 953
- *MESH_CFACE 318 954 955 956
- *MESH_CFACE 319 957 958 959
- *MESH_CFACE 320 960 961 962
- *MESH_CFACE 321 963 964 965
- *MESH_CFACE 322 966 967 968
- *MESH_CFACE 323 969 970 971
- *MESH_CFACE 324 972 973 974
- *MESH_CFACE 325 975 976 977
- *MESH_CFACE 326 978 979 980
- *MESH_CFACE 327 981 982 983
- *MESH_CFACE 328 984 985 986
- *MESH_CFACE 329 987 988 989
- *MESH_CFACE 330 990 991 992
- *MESH_CFACE 331 993 994 995
- *MESH_CFACE 332 996 997 998
- *MESH_CFACE 333 999 1000 1001
- *MESH_CFACE 334 1002 1003 1004
- *MESH_CFACE 335 1005 1006 1007
- *MESH_CFACE 336 1008 1009 1010
- *MESH_CFACE 337 1011 1012 1013
- *MESH_CFACE 338 1014 1015 1016
- *MESH_CFACE 339 1017 1018 1019
- *MESH_CFACE 340 1020 1021 1022
- *MESH_CFACE 341 1023 1024 1025
- *MESH_CFACE 342 1026 1027 1028
- *MESH_CFACE 343 1029 1030 1031
- *MESH_CFACE 344 1032 1033 1034
- *MESH_CFACE 345 1035 1036 1037
- *MESH_CFACE 346 1038 1039 1040
- *MESH_CFACE 347 1041 1042 1043
- *MESH_CFACE 348 1044 1045 1046
- *MESH_CFACE 349 1047 1048 1049
- *MESH_CFACE 350 1050 1051 1052
- *MESH_CFACE 351 1053 1054 1055
- *MESH_CFACE 352 1056 1057 1058
- *MESH_CFACE 353 1059 1060 1061
- *MESH_CFACE 354 1062 1063 1064
- *MESH_CFACE 355 1065 1066 1067
- *MESH_CFACE 356 1068 1069 1070
- *MESH_CFACE 357 1071 1072 1073
- *MESH_CFACE 358 1074 1075 1076
- *MESH_CFACE 359 1077 1078 1079
- *MESH_CFACE 360 1080 1081 1082
- *MESH_CFACE 361 1083 1084 1085
- *MESH_CFACE 362 1086 1087 1088
- *MESH_CFACE 363 1089 1090 1091
- *MESH_CFACE 364 1092 1093 1094
- *MESH_CFACE 365 1095 1096 1097
- }
- }
- *PROP_MOTIONBLUR 0
- *PROP_CASTSHADOW 1
- *PROP_RECVSHADOW 1
- *MATERIAL_REF 0
-}
+*3DSMAX_ASCIIEXPORT 200
+*COMMENT "created by AC3D."
+*SCENE {
+ *SCENE_FILENAME ""
+ *SCENE_FIRSTFRAME 0
+ *SCENE_LASTFRAME 100
+ *SCENE_FRAMESPEED 30
+ *SCENE_TICKSPERFRAME 160
+ *SCENE_BACKGROUND_STATIC 0.0000 0.0000 0.0000
+ *SCENE_AMBIENT_STATIC 0.0431 0.0431 0.0431
+}
+*MATERIAL_LIST {
+ *MATERIAL_COUNT 21
+ *MATERIAL 0 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.878431 0.878431 0.878431
+ *MATERIAL_DIFFUSE 0.878431 0.878431 0.878431
+ *MATERIAL_SPECULAR 1.000000 1.000000 1.000000
+ *MATERIAL_SHINE 19.200001
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ *MAP_DIFFUSE {
+ *MAP_NAME "Map #1"
+ *MAP_CLASS "Bitmap"
+ *MAP_SUBNO 1
+ *MAP_AMOUNT 1.0000
+ *BITMAP "../3DS/MP5SIL.BMP"
+ *MAP_TYPE Screen
+ *UVW_U_OFFSET 0.000000
+ *UVW_V_OFFSET 0.000000
+ *UVW_U_TILING 1.000000
+ *UVW_V_TILING 1.000000
+ *UVW_ANGLE 0.0000
+ *UVW_BLUR 1.0000
+ *UVW_BLUR_OFFSET 0.0000
+ *UVW_NOUSE_AMT 1.0000
+ *UVW_NOISE_SIZE 1.0000
+ *UVW_NOISE_LEVEL 1
+ *UVW_NOISE_PHASE 0.0000
+ *BITMAP_FILTER Pyramidal
+ }
+ }
+ *MATERIAL 1 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
+ *MATERIAL_DIFFUSE 0.000000 0.000000 0.000000
+ *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
+ *MATERIAL_SHINE 128.000000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 2 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
+ *MATERIAL_DIFFUSE 1.000000 1.000000 1.000000
+ *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
+ *MATERIAL_SHINE 128.000000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 3 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
+ *MATERIAL_DIFFUSE 0.627451 0.250980 0.250980
+ *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
+ *MATERIAL_SHINE 128.000000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 4 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
+ *MATERIAL_DIFFUSE 1.000000 0.000000 0.000000
+ *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
+ *MATERIAL_SHINE 128.000000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 5 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
+ *MATERIAL_DIFFUSE 1.000000 0.466667 0.000000
+ *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
+ *MATERIAL_SHINE 128.000000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 6 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
+ *MATERIAL_DIFFUSE 1.000000 1.000000 0.000000
+ *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
+ *MATERIAL_SHINE 128.000000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 7 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
+ *MATERIAL_DIFFUSE 0.000000 1.000000 0.000000
+ *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
+ *MATERIAL_SHINE 128.000000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 8 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
+ *MATERIAL_DIFFUSE 0.270588 0.525490 0.454902
+ *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
+ *MATERIAL_SHINE 128.000000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 9 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
+ *MATERIAL_DIFFUSE 0.627451 0.752941 0.878431
+ *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
+ *MATERIAL_SHINE 128.000000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 10 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
+ *MATERIAL_DIFFUSE 0.000000 0.000000 1.000000
+ *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
+ *MATERIAL_SHINE 128.000000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 11 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
+ *MATERIAL_DIFFUSE 0.509804 0.000000 0.294118
+ *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
+ *MATERIAL_SHINE 128.000000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 12 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
+ *MATERIAL_DIFFUSE 0.933333 0.501961 0.933333
+ *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
+ *MATERIAL_SHINE 128.000000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 13 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
+ *MATERIAL_DIFFUSE 0.266667 0.266667 0.266667
+ *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
+ *MATERIAL_SHINE 128.000000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 14 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
+ *MATERIAL_DIFFUSE 0.533333 0.533333 0.533333
+ *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
+ *MATERIAL_SHINE 128.000000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 15 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
+ *MATERIAL_DIFFUSE 0.800000 0.800000 0.800000
+ *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
+ *MATERIAL_SHINE 128.000000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 16 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
+ *MATERIAL_DIFFUSE 1.000000 0.501961 0.752941
+ *MATERIAL_SPECULAR 0.000000 0.000000 0.000000
+ *MATERIAL_SHINE 0.000000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 17 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.588235 0.588235 0.588235
+ *MATERIAL_DIFFUSE 0.588235 0.588235 0.588235
+ *MATERIAL_SPECULAR 0.898039 0.898039 0.898039
+ *MATERIAL_SHINE 12.800000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 18 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.588235 0.588235 0.588235
+ *MATERIAL_DIFFUSE 0.588235 0.588235 0.588235
+ *MATERIAL_SPECULAR 0.898039 0.898039 0.898039
+ *MATERIAL_SHINE 12.800000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 19 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.588235 0.588235 0.588235
+ *MATERIAL_DIFFUSE 0.588235 0.588235 0.588235
+ *MATERIAL_SPECULAR 0.898039 0.898039 0.898039
+ *MATERIAL_SHINE 12.800000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 20 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.878431 0.878431 0.878431
+ *MATERIAL_DIFFUSE 0.878431 0.878431 0.878431
+ *MATERIAL_SPECULAR 1.000000 1.000000 1.000000
+ *MATERIAL_SHINE 19.200001
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+}
+
+*GEOMOBJECT {
+ *NODE_NAME "Line06"
+ *NODE_TM {
+ *NODE_NAME "Object01"
+ *INHERIT_POS 0 0 0
+ *INHERIT_ROT 0 0 0
+ *INHERIT_SCL 0 0 0
+ *TM_ROW0 1.0000 0.0000 0.0000
+ *TM_ROW1 0.0000 1.0000 0.0000
+ *TM_ROW2 0.0000 0.0000 1.0000
+ *TM_ROW3 0.0000 0.0000 0.0000
+ *TM_POS 0.0000 0.0000 0.0000
+ *TM_ROTAXIS 0.0000 0.0000 0.0000
+ *TM_ROTANGLE 0.0000
+ *TM_SCALE 1.0000 1.0000 1.0000
+ *TM_SCALEAXIS 0.0000 0.0000 0.0000
+ *TM_SCALEAXISANG 0.0000
+ }
+ *MESH {
+ *TIMEVALUE 0
+ *MESH_NUMVERTEX 236
+ *MESH_NUMFACES 366
+ *MESH_VERTEX_LIST {
+ *MESH_VERTEX 0 -0.559998 6.284005 11.255371
+ *MESH_VERTEX 1 -0.419998 5.907723 9.666631
+ *MESH_VERTEX 2 -0.699998 5.865915 11.840698
+ *MESH_VERTEX 3 -0.419998 3.190138 9.666631
+ *MESH_VERTEX 4 -0.559998 1.935868 10.461003
+ *MESH_VERTEX 5 -0.699998 1.935868 11.882508
+ *MESH_VERTEX 6 -0.699998 -1.241616 12.718689
+ *MESH_VERTEX 7 -0.559998 -2.161415 12.049746
+ *MESH_VERTEX 8 0.560002 6.284005 11.255371
+ *MESH_VERTEX 9 0.700002 5.865915 11.840698
+ *MESH_VERTEX 10 0.420002 5.907723 9.666631
+ *MESH_VERTEX 11 0.420002 3.190138 9.666631
+ *MESH_VERTEX 12 0.560002 1.935868 10.461003
+ *MESH_VERTEX 13 0.700002 1.935868 11.882508
+ *MESH_VERTEX 14 0.700002 -1.241616 12.718689
+ *MESH_VERTEX 15 0.560002 -2.161415 12.049746
+ *MESH_VERTEX 16 -0.315522 4.261902 9.786250
+ *MESH_VERTEX 17 -0.315522 5.205911 9.786250
+ *MESH_VERTEX 18 -0.315522 5.205911 8.804341
+ *MESH_VERTEX 19 -0.315522 4.261901 8.804341
+ *MESH_VERTEX 20 0.291341 5.205911 9.786250
+ *MESH_VERTEX 21 0.291341 5.205911 8.804341
+ *MESH_VERTEX 22 0.291341 4.261902 9.786250
+ *MESH_VERTEX 23 0.291341 4.261901 8.804341
+ *MESH_VERTEX 24 0.000002 4.851194 -31.482225
+ *MESH_VERTEX 25 1.120500 5.498114 -31.482225
+ *MESH_VERTEX 26 1.293841 4.851194 -31.482225
+ *MESH_VERTEX 27 0.646922 5.971691 -31.482225
+ *MESH_VERTEX 28 0.000002 6.145033 -31.482225
+ *MESH_VERTEX 29 -0.646917 5.971691 -31.482225
+ *MESH_VERTEX 30 -1.120495 5.498114 -31.482225
+ *MESH_VERTEX 31 -1.293837 4.851194 -31.482225
+ *MESH_VERTEX 32 -1.120495 4.204275 -31.482225
+ *MESH_VERTEX 33 -0.646917 3.730697 -31.482225
+ *MESH_VERTEX 34 0.000002 3.557356 -31.482225
+ *MESH_VERTEX 35 0.646922 3.730697 -31.482225
+ *MESH_VERTEX 36 1.120500 4.204275 -31.482225
+ *MESH_VERTEX 37 -0.674884 9.154098 -20.192945
+ *MESH_VERTEX 38 -0.468345 8.948195 -20.209150
+ *MESH_VERTEX 39 0.000002 9.141592 -20.193930
+ *MESH_VERTEX 40 0.000002 9.432783 -20.171013
+ *MESH_VERTEX 41 -0.674884 9.221854 -20.915016
+ *MESH_VERTEX 42 0.000002 9.500540 -20.893084
+ *MESH_VERTEX 43 -0.468345 9.015951 -20.931223
+ *MESH_VERTEX 44 0.000002 9.209350 -20.916002
+ *MESH_VERTEX 45 -0.954431 8.481292 -20.245895
+ *MESH_VERTEX 46 -0.662341 8.481292 -20.245895
+ *MESH_VERTEX 47 -0.954432 8.549048 -20.967968
+ *MESH_VERTEX 48 -0.662341 8.549048 -20.967968
+ *MESH_VERTEX 49 -0.216998 7.048779 -20.359722
+ *MESH_VERTEX 50 -0.216998 8.014388 -20.282642
+ *MESH_VERTEX 51 -0.216998 7.000406 -20.956289
+ *MESH_VERTEX 52 -0.216998 8.017383 -21.004715
+ *MESH_VERTEX 53 0.000002 7.079682 -20.350504
+ *MESH_VERTEX 54 0.000002 8.490013 -20.358704
+ *MESH_VERTEX 55 0.000002 8.491855 -20.955271
+ *MESH_VERTEX 56 0.000002 7.085633 -20.962612
+ *MESH_VERTEX 57 0.216959 7.048779 -20.359722
+ *MESH_VERTEX 58 0.217002 8.014388 -20.282642
+ *MESH_VERTEX 59 0.217002 8.017383 -21.004715
+ *MESH_VERTEX 60 0.216958 7.000407 -20.956291
+ *MESH_VERTEX 61 0.954436 8.481292 -20.245895
+ *MESH_VERTEX 62 0.662345 8.481292 -20.245895
+ *MESH_VERTEX 63 0.954436 8.549048 -20.967968
+ *MESH_VERTEX 64 0.662345 8.549048 -20.967968
+ *MESH_VERTEX 65 0.674889 9.154098 -20.192945
+ *MESH_VERTEX 66 0.468349 8.948195 -20.209150
+ *MESH_VERTEX 67 0.674889 9.221854 -20.915016
+ *MESH_VERTEX 68 0.468349 9.015951 -20.931223
+ *MESH_VERTEX 69 0.000002 8.265148 2.927335
+ *MESH_VERTEX 70 0.085300 8.350446 2.651849
+ *MESH_VERTEX 71 0.000002 8.265148 2.623042
+ *MESH_VERTEX 72 0.171527 8.436673 2.985264
+ *MESH_VERTEX 73 -0.085295 8.350446 2.651849
+ *MESH_VERTEX 74 -0.171522 8.436673 2.985263
+ *MESH_VERTEX 75 0.000002 8.265148 4.524281
+ *MESH_VERTEX 76 -0.401965 8.667115 3.876321
+ *MESH_VERTEX 77 -0.466411 8.731563 4.125515
+ *MESH_VERTEX 78 0.000002 8.265148 4.219988
+ *MESH_VERTEX 79 0.401970 8.667115 3.876321
+ *MESH_VERTEX 80 0.466416 8.731563 4.125515
+ *MESH_VERTEX 81 -0.797036 8.453333 3.049684
+ *MESH_VERTEX 82 -0.541904 8.490214 3.192292
+ *MESH_VERTEX 83 -0.541904 6.845878 3.617546
+ *MESH_VERTEX 84 0.000002 6.767541 3.314642
+ *MESH_VERTEX 85 -0.797036 6.808997 3.474938
+ *MESH_VERTEX 86 0.000002 6.693779 3.029425
+ *MESH_VERTEX 87 -0.541904 8.646887 3.798100
+ *MESH_VERTEX 88 -0.541904 7.002550 4.223354
+ *MESH_VERTEX 89 -0.797036 8.683767 3.940709
+ *MESH_VERTEX 90 -0.797036 7.039432 4.365963
+ *MESH_VERTEX 91 0.000002 7.080887 4.526258
+ *MESH_VERTEX 92 0.000002 7.154649 4.811476
+ *MESH_VERTEX 93 0.541908 7.002550 4.223354
+ *MESH_VERTEX 94 0.541908 8.646887 3.798100
+ *MESH_VERTEX 95 0.797040 8.683767 3.940709
+ *MESH_VERTEX 96 0.797040 7.039432 4.365963
+ *MESH_VERTEX 97 0.541908 8.490214 3.192292
+ *MESH_VERTEX 98 0.541908 6.845878 3.617547
+ *MESH_VERTEX 99 0.797040 8.453333 3.049684
+ *MESH_VERTEX 100 0.797040 6.808997 3.474938
+ *MESH_VERTEX 101 -0.209998 -2.196519 0.577376
+ *MESH_VERTEX 102 -0.209998 -2.158235 -1.719703
+ *MESH_VERTEX 103 -0.209998 -2.655936 0.692230
+ *MESH_VERTEX 104 -0.209998 -2.617651 -2.064265
+ *MESH_VERTEX 105 -0.209998 0.215414 -2.868243
+ *MESH_VERTEX 106 -0.209998 0.177129 -3.480797
+ *MESH_VERTEX 107 -0.209998 -1.966812 1.840769
+ *MESH_VERTEX 108 -0.209998 -1.201119 1.879055
+ *MESH_VERTEX 109 -0.209998 -1.966812 2.568178
+ *MESH_VERTEX 110 0.210002 -2.196519 0.577376
+ *MESH_VERTEX 111 0.210002 -2.655936 0.692230
+ *MESH_VERTEX 112 0.210002 -2.158235 -1.719703
+ *MESH_VERTEX 113 0.210002 -2.617651 -2.064265
+ *MESH_VERTEX 114 0.210002 0.215414 -2.868243
+ *MESH_VERTEX 115 0.210002 0.177129 -3.480797
+ *MESH_VERTEX 116 0.210002 -1.966812 1.840769
+ *MESH_VERTEX 117 0.210002 -1.201119 1.879055
+ *MESH_VERTEX 118 0.210002 -1.966812 2.568178
+ *MESH_VERTEX 119 -0.209998 -1.009695 0.385953
+ *MESH_VERTEX 120 -0.209998 0.215414 0.539091
+ *MESH_VERTEX 121 -0.209998 -0.971411 -0.073463
+ *MESH_VERTEX 122 -0.209998 0.177129 -0.494594
+ *MESH_VERTEX 123 -0.209998 -1.966812 -0.418024
+ *MESH_VERTEX 124 0.210002 -1.009695 0.385953
+ *MESH_VERTEX 125 0.210002 -0.971411 -0.073463
+ *MESH_VERTEX 126 0.210002 0.215414 0.539091
+ *MESH_VERTEX 127 0.210002 0.177129 -0.494594
+ *MESH_VERTEX 128 0.210002 -1.966812 -0.418024
+ *MESH_VERTEX 129 1.120500 5.498115 -21.311342
+ *MESH_VERTEX 130 1.293841 4.851195 -21.311342
+ *MESH_VERTEX 131 1.293841 4.851195 -31.482225
+ *MESH_VERTEX 132 1.120500 5.498114 -31.482225
+ *MESH_VERTEX 133 0.646922 5.971693 -21.311342
+ *MESH_VERTEX 134 0.646922 5.971692 -31.482225
+ *MESH_VERTEX 135 0.000002 6.145034 -21.311342
+ *MESH_VERTEX 136 0.000002 6.145033 -31.482225
+ *MESH_VERTEX 137 -0.646917 5.971693 -21.311342
+ *MESH_VERTEX 138 -0.646917 5.971693 -31.482225
+ *MESH_VERTEX 139 -1.120495 5.498115 -21.311342
+ *MESH_VERTEX 140 -1.120495 5.498114 -31.482225
+ *MESH_VERTEX 141 -1.293837 4.851195 -21.311342
+ *MESH_VERTEX 142 -1.293837 4.851195 -31.482225
+ *MESH_VERTEX 143 -1.120496 4.204276 -21.311342
+ *MESH_VERTEX 144 -1.120495 4.204276 -31.482225
+ *MESH_VERTEX 145 -0.646917 3.730698 -21.311342
+ *MESH_VERTEX 146 -0.646917 3.730698 -31.482225
+ *MESH_VERTEX 147 0.000002 3.557356 -21.311342
+ *MESH_VERTEX 148 0.000002 3.557356 -31.482225
+ *MESH_VERTEX 149 0.646922 3.730698 -21.311342
+ *MESH_VERTEX 150 0.646922 3.730698 -31.482225
+ *MESH_VERTEX 151 1.120500 4.204276 -21.311342
+ *MESH_VERTEX 152 1.120500 4.204276 -31.482225
+ *MESH_VERTEX 153 0.000002 5.139493 -21.347084
+ *MESH_VERTEX 154 0.947158 6.106346 -21.347084
+ *MESH_VERTEX 155 1.391157 5.139493 -21.347084
+ *MESH_VERTEX 156 0.546843 6.943166 -21.347086
+ *MESH_VERTEX 157 0.000002 7.150661 -21.347086
+ *MESH_VERTEX 158 -0.546839 6.943166 -21.347086
+ *MESH_VERTEX 159 -0.947154 6.106347 -21.347086
+ *MESH_VERTEX 160 -1.391152 5.139493 -21.347084
+ *MESH_VERTEX 161 -1.326017 4.055358 -21.347071
+ *MESH_VERTEX 162 -0.765575 3.261717 -21.347071
+ *MESH_VERTEX 163 0.000002 3.032733 -21.347071
+ *MESH_VERTEX 164 0.765579 3.261717 -21.347071
+ *MESH_VERTEX 165 1.326021 4.055358 -21.347071
+ *MESH_VERTEX 166 0.947159 6.106347 -8.166925
+ *MESH_VERTEX 167 0.980002 5.139494 -8.166924
+ *MESH_VERTEX 168 0.546843 6.943166 -8.166925
+ *MESH_VERTEX 169 0.000002 7.150661 -8.166925
+ *MESH_VERTEX 170 -0.546839 6.943166 -8.166925
+ *MESH_VERTEX 171 -0.947154 6.106348 -8.166925
+ *MESH_VERTEX 172 -0.979998 5.139494 -8.166924
+ *MESH_VERTEX 173 -0.979998 4.055360 -8.166988
+ *MESH_VERTEX 174 -0.765575 3.273818 -8.166988
+ *MESH_VERTEX 175 0.000002 3.273818 -8.166988
+ *MESH_VERTEX 176 0.765580 3.273818 -8.166988
+ *MESH_VERTEX 177 0.980002 4.055360 -8.166988
+ *MESH_VERTEX 178 -0.559998 -9.863222 -9.139494
+ *MESH_VERTEX 179 -0.559998 -6.295757 -7.355761
+ *MESH_VERTEX 180 -0.559998 -8.499191 -11.133077
+ *MESH_VERTEX 181 -0.559998 -4.616950 -9.087029
+ *MESH_VERTEX 182 -0.559998 -2.833217 -6.044193
+ *MESH_VERTEX 183 -0.559998 -1.469186 -7.880388
+ *MESH_VERTEX 184 -0.559998 0.629323 -5.047400
+ *MESH_VERTEX 185 -0.559998 1.678578 -7.198372
+ *MESH_VERTEX 186 0.560002 -9.863222 -9.139494
+ *MESH_VERTEX 187 0.560002 -8.499191 -11.133077
+ *MESH_VERTEX 188 0.560002 -6.295757 -7.355761
+ *MESH_VERTEX 189 0.560002 -4.616950 -9.087029
+ *MESH_VERTEX 190 0.560002 -2.833217 -6.044193
+ *MESH_VERTEX 191 0.560002 -1.469186 -7.880388
+ *MESH_VERTEX 192 0.560002 0.629323 -5.047400
+ *MESH_VERTEX 193 0.560002 1.678578 -7.198372
+ *MESH_VERTEX 194 0.980002 3.273756 -8.227636
+ *MESH_VERTEX 195 -0.979998 3.231947 -7.233493
+ *MESH_VERTEX 196 -0.979998 3.273818 -8.227624
+ *MESH_VERTEX 197 0.980002 3.231947 -7.233505
+ *MESH_VERTEX 198 -0.979998 3.733655 -7.182400
+ *MESH_VERTEX 199 -0.979998 7.195459 -8.227624
+ *MESH_VERTEX 200 -0.979998 7.203029 8.203317
+ *MESH_VERTEX 201 -0.979998 5.865914 8.914067
+ *MESH_VERTEX 202 -0.979998 3.566419 8.914356
+ *MESH_VERTEX 203 0.980002 3.733655 -7.182400
+ *MESH_VERTEX 204 0.980002 7.195459 -8.227624
+ *MESH_VERTEX 205 0.980002 7.203029 8.203317
+ *MESH_VERTEX 206 0.980002 5.865914 8.914067
+ *MESH_VERTEX 207 0.980002 3.566419 8.914356
+ *MESH_VERTEX 208 -0.699998 -0.007852 5.032930
+ *MESH_VERTEX 209 -0.699998 -2.119606 2.684526
+ *MESH_VERTEX 210 -0.699998 -0.778996 5.422669
+ *MESH_VERTEX 211 -0.699998 -1.325235 1.848345
+ *MESH_VERTEX 212 -0.699998 0.179889 1.304829
+ *MESH_VERTEX 213 -0.979998 1.160583 5.192857
+ *MESH_VERTEX 214 -0.699998 0.096271 -3.377781
+ *MESH_VERTEX 215 -0.979998 0.305317 -5.050141
+ *MESH_VERTEX 216 -0.979998 1.392351 -7.391445
+ *MESH_VERTEX 217 -0.699998 -5.411245 4.271282
+ *MESH_VERTEX 218 -0.979998 -4.544528 7.952461
+ *MESH_VERTEX 219 -0.979998 -6.489938 4.396504
+ *MESH_VERTEX 220 -0.979998 1.970891 6.006893
+ *MESH_VERTEX 221 -0.979998 1.977677 8.119698
+ *MESH_VERTEX 222 0.700002 -0.007852 5.032930
+ *MESH_VERTEX 223 0.700002 -0.778996 5.422669
+ *MESH_VERTEX 224 0.700002 -2.119606 2.684526
+ *MESH_VERTEX 225 0.700002 -1.325235 1.848345
+ *MESH_VERTEX 226 0.700002 0.179890 1.304829
+ *MESH_VERTEX 227 0.980002 1.160583 5.192857
+ *MESH_VERTEX 228 0.700002 0.096271 -3.377781
+ *MESH_VERTEX 229 0.980002 0.305317 -5.050141
+ *MESH_VERTEX 230 0.980002 1.392351 -7.391445
+ *MESH_VERTEX 231 0.700002 -5.411245 4.271282
+ *MESH_VERTEX 232 0.980002 -4.544528 7.952461
+ *MESH_VERTEX 233 0.980002 -6.489938 4.396504
+ *MESH_VERTEX 234 0.980002 1.970891 6.006893
+ *MESH_VERTEX 235 0.980002 1.977677 8.119698
+ }
+ *MESH_FACE_LIST {
+ *MESH_FACE 0: A: 0 B: 1 C: 2 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 1: A: 1 B: 3 C: 2 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 2: A: 3 B: 4 C: 2 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 3: A: 4 B: 5 C: 2 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 4: A: 4 B: 6 C: 5 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 5: A: 4 B: 7 C: 6 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 6: A: 8 B: 9 C: 10 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 7: A: 10 B: 9 C: 11 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 8: A: 11 B: 9 C: 12 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 9: A: 12 B: 9 C: 13 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 10: A: 12 B: 13 C: 14 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 11: A: 12 B: 14 C: 15 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 12: A: 11 B: 4 C: 3 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 13: A: 11 B: 12 C: 4 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 14: A: 10 B: 3 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 15: A: 10 B: 11 C: 3 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 16: A: 8 B: 1 C: 0 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 17: A: 8 B: 10 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 18: A: 9 B: 0 C: 2 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 19: A: 9 B: 8 C: 0 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 20: A: 13 B: 2 C: 5 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 21: A: 13 B: 9 C: 2 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 22: A: 14 B: 5 C: 6 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 23: A: 14 B: 13 C: 5 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 24: A: 15 B: 6 C: 7 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 25: A: 15 B: 14 C: 6 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 26: A: 12 B: 7 C: 4 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 27: A: 12 B: 15 C: 7 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 28: A: 16 B: 17 C: 18 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 29: A: 18 B: 19 C: 16 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 30: A: 17 B: 20 C: 21 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 31: A: 21 B: 18 C: 17 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 32: A: 20 B: 22 C: 23 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 33: A: 23 B: 21 C: 20 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 34: A: 22 B: 16 C: 19 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 35: A: 19 B: 23 C: 22 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 36: A: 24 B: 25 C: 26 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 37: A: 24 B: 27 C: 25 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 38: A: 24 B: 28 C: 27 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 39: A: 24 B: 29 C: 28 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 40: A: 24 B: 30 C: 29 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 41: A: 24 B: 31 C: 30 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 42: A: 24 B: 32 C: 31 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 43: A: 24 B: 33 C: 32 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 44: A: 24 B: 34 C: 33 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 45: A: 24 B: 35 C: 34 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 46: A: 24 B: 36 C: 35 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 47: A: 24 B: 26 C: 36 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 48: A: 37 B: 38 C: 39 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 49: A: 37 B: 39 C: 40 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 50: A: 41 B: 37 C: 40 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 51: A: 41 B: 40 C: 42 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 52: A: 43 B: 41 C: 42 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 53: A: 43 B: 42 C: 44 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 54: A: 38 B: 43 C: 44 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 55: A: 38 B: 44 C: 39 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 56: A: 45 B: 46 C: 38 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 57: A: 45 B: 38 C: 37 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 58: A: 47 B: 45 C: 37 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 59: A: 47 B: 37 C: 41 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 60: A: 48 B: 47 C: 41 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 61: A: 48 B: 41 C: 43 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 62: A: 46 B: 48 C: 43 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 63: A: 46 B: 43 C: 38 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 64: A: 49 B: 50 C: 46 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 65: A: 49 B: 46 C: 45 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 66: A: 51 B: 49 C: 45 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 67: A: 51 B: 45 C: 47 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 68: A: 52 B: 51 C: 47 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 69: A: 52 B: 47 C: 48 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 70: A: 50 B: 52 C: 48 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 71: A: 50 B: 48 C: 46 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 72: A: 53 B: 54 C: 50 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 73: A: 53 B: 50 C: 49 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 74: A: 55 B: 56 C: 51 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 75: A: 55 B: 51 C: 52 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 76: A: 54 B: 55 C: 52 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 77: A: 54 B: 52 C: 50 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 78: A: 57 B: 58 C: 54 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 79: A: 57 B: 54 C: 53 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 80: A: 59 B: 60 C: 56 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 81: A: 59 B: 56 C: 55 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 82: A: 58 B: 59 C: 55 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 83: A: 58 B: 55 C: 54 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 84: A: 61 B: 62 C: 58 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 85: A: 61 B: 58 C: 57 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 86: A: 63 B: 61 C: 57 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 87: A: 63 B: 57 C: 60 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 88: A: 64 B: 63 C: 60 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 89: A: 64 B: 60 C: 59 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 90: A: 62 B: 64 C: 59 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 91: A: 62 B: 59 C: 58 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 92: A: 65 B: 66 C: 62 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 93: A: 65 B: 62 C: 61 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 94: A: 67 B: 65 C: 61 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 95: A: 67 B: 61 C: 63 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 96: A: 68 B: 67 C: 63 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 97: A: 68 B: 63 C: 64 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 98: A: 66 B: 68 C: 64 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 99: A: 66 B: 64 C: 62 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 100: A: 40 B: 39 C: 66 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 101: A: 40 B: 66 C: 65 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 102: A: 42 B: 40 C: 65 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 103: A: 42 B: 65 C: 67 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 104: A: 44 B: 42 C: 67 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 105: A: 44 B: 67 C: 68 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 106: A: 39 B: 44 C: 68 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 107: A: 39 B: 68 C: 66 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 108: A: 69 B: 70 C: 71 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 109: A: 69 B: 72 C: 70 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 110: A: 73 B: 69 C: 71 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 111: A: 73 B: 74 C: 69 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 112: A: 75 B: 76 C: 77 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 113: A: 75 B: 78 C: 76 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 114: A: 79 B: 75 C: 80 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 115: A: 79 B: 78 C: 75 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 116: A: 74 B: 73 C: 81 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 117: A: 81 B: 82 C: 74 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 118: A: 82 B: 69 C: 74 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 119: A: 82 B: 83 C: 69 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 120: A: 83 B: 84 C: 69 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 121: A: 81 B: 71 C: 85 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 122: A: 71 B: 86 C: 85 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 123: A: 81 B: 73 C: 71 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 124: A: 83 B: 82 C: 87 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 125: A: 87 B: 88 C: 83 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 126: A: 82 B: 81 C: 89 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 127: A: 89 B: 87 C: 82 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 128: A: 81 B: 85 C: 90 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 129: A: 90 B: 89 C: 81 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 130: A: 78 B: 87 C: 76 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 131: A: 78 B: 88 C: 87 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 132: A: 78 B: 91 C: 88 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 133: A: 77 B: 76 C: 87 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 134: A: 87 B: 89 C: 77 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 135: A: 92 B: 89 C: 90 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 136: A: 92 B: 75 C: 89 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 137: A: 75 B: 77 C: 89 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 138: A: 93 B: 79 C: 94 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 139: A: 93 B: 78 C: 79 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 140: A: 93 B: 91 C: 78 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 141: A: 94 B: 79 C: 80 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 142: A: 80 B: 95 C: 94 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 143: A: 96 B: 95 C: 92 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 144: A: 95 B: 75 C: 92 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 145: A: 95 B: 80 C: 75 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 146: A: 93 B: 94 C: 97 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 147: A: 97 B: 98 C: 93 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 148: A: 94 B: 95 C: 99 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 149: A: 99 B: 97 C: 94 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 150: A: 95 B: 96 C: 100 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 151: A: 100 B: 99 C: 95 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 152: A: 84 B: 72 C: 69 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 153: A: 84 B: 98 C: 72 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 154: A: 98 B: 97 C: 72 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 155: A: 99 B: 70 C: 72 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 156: A: 72 B: 97 C: 99 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 157: A: 86 B: 71 C: 100 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 158: A: 71 B: 99 C: 100 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 159: A: 71 B: 70 C: 99 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 160: A: 101 B: 102 C: 103 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 161: A: 102 B: 104 C: 103 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 162: A: 102 B: 105 C: 104 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 163: A: 105 B: 106 C: 104 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 164: A: 103 B: 107 C: 101 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 165: A: 107 B: 108 C: 101 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 166: A: 107 B: 109 C: 108 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 167: A: 110 B: 111 C: 112 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 168: A: 112 B: 111 C: 113 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 169: A: 112 B: 113 C: 114 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 170: A: 114 B: 113 C: 115 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 171: A: 111 B: 110 C: 116 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 172: A: 116 B: 110 C: 117 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 173: A: 116 B: 117 C: 118 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 174: A: 112 B: 105 C: 102 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 175: A: 112 B: 114 C: 105 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 176: A: 110 B: 102 C: 101 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 177: A: 110 B: 112 C: 102 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 178: A: 117 B: 101 C: 108 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 179: A: 117 B: 110 C: 101 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 180: A: 116 B: 109 C: 107 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 181: A: 116 B: 118 C: 109 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 182: A: 111 B: 107 C: 103 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 183: A: 111 B: 116 C: 107 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 184: A: 113 B: 103 C: 104 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 185: A: 113 B: 111 C: 103 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 186: A: 115 B: 104 C: 106 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 187: A: 115 B: 113 C: 104 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 188: A: 119 B: 120 C: 121 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 189: A: 120 B: 122 C: 121 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 190: A: 121 B: 123 C: 119 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 191: A: 124 B: 125 C: 126 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 192: A: 126 B: 125 C: 127 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 193: A: 125 B: 124 C: 128 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 194: A: 124 B: 120 C: 119 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 195: A: 124 B: 126 C: 120 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 196: A: 128 B: 119 C: 123 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 197: A: 128 B: 124 C: 119 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 198: A: 125 B: 123 C: 121 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 199: A: 125 B: 128 C: 123 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 200: A: 127 B: 121 C: 122 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 201: A: 127 B: 125 C: 121 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 202: A: 129 B: 130 C: 131 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 203: A: 129 B: 131 C: 132 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 204: A: 133 B: 129 C: 132 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 205: A: 133 B: 132 C: 134 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 206: A: 135 B: 133 C: 134 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 207: A: 135 B: 134 C: 136 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 208: A: 137 B: 135 C: 136 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 209: A: 137 B: 136 C: 138 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 210: A: 139 B: 137 C: 138 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 211: A: 139 B: 138 C: 140 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 212: A: 141 B: 139 C: 140 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 213: A: 141 B: 140 C: 142 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 214: A: 143 B: 141 C: 142 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 215: A: 143 B: 142 C: 144 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 216: A: 145 B: 143 C: 144 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 217: A: 145 B: 144 C: 146 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 218: A: 147 B: 145 C: 146 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 219: A: 147 B: 146 C: 148 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 220: A: 149 B: 147 C: 148 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 221: A: 149 B: 148 C: 150 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 222: A: 151 B: 149 C: 150 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 223: A: 151 B: 150 C: 152 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 224: A: 130 B: 151 C: 152 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 225: A: 130 B: 152 C: 131 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 226: A: 153 B: 154 C: 155 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 227: A: 153 B: 156 C: 154 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 228: A: 153 B: 157 C: 156 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 229: A: 153 B: 158 C: 157 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 230: A: 153 B: 159 C: 158 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 231: A: 153 B: 160 C: 159 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 232: A: 153 B: 161 C: 160 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 233: A: 153 B: 162 C: 161 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 234: A: 153 B: 163 C: 162 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 235: A: 153 B: 164 C: 163 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 236: A: 153 B: 165 C: 164 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 237: A: 153 B: 155 C: 165 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 238: A: 166 B: 167 C: 155 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 239: A: 166 B: 155 C: 154 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 240: A: 168 B: 166 C: 154 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 241: A: 168 B: 154 C: 156 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 242: A: 169 B: 168 C: 156 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 243: A: 169 B: 156 C: 157 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 244: A: 170 B: 169 C: 157 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 245: A: 170 B: 157 C: 158 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 246: A: 171 B: 170 C: 158 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 247: A: 171 B: 158 C: 159 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 248: A: 172 B: 171 C: 159 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 249: A: 172 B: 159 C: 160 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 250: A: 173 B: 172 C: 160 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 251: A: 173 B: 160 C: 161 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 252: A: 174 B: 173 C: 161 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 253: A: 174 B: 161 C: 162 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 254: A: 175 B: 174 C: 162 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 255: A: 175 B: 162 C: 163 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 256: A: 176 B: 175 C: 163 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 257: A: 176 B: 163 C: 164 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 258: A: 177 B: 176 C: 164 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 259: A: 177 B: 164 C: 165 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 260: A: 167 B: 177 C: 165 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 261: A: 167 B: 165 C: 155 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 262: A: 178 B: 179 C: 180 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 263: A: 179 B: 181 C: 180 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 264: A: 179 B: 182 C: 181 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 265: A: 182 B: 183 C: 181 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 266: A: 182 B: 184 C: 183 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 267: A: 184 B: 185 C: 183 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 268: A: 186 B: 187 C: 188 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 269: A: 188 B: 187 C: 189 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 270: A: 188 B: 189 C: 190 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 271: A: 190 B: 189 C: 191 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 272: A: 190 B: 191 C: 192 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 273: A: 192 B: 191 C: 193 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 274: A: 190 B: 184 C: 182 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 275: A: 190 B: 192 C: 184 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 276: A: 188 B: 182 C: 179 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 277: A: 188 B: 190 C: 182 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 278: A: 186 B: 179 C: 178 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 279: A: 186 B: 188 C: 179 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 280: A: 187 B: 178 C: 180 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 281: A: 187 B: 186 C: 178 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 282: A: 189 B: 180 C: 181 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 283: A: 189 B: 187 C: 180 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 284: A: 191 B: 181 C: 183 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 285: A: 191 B: 189 C: 181 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 286: A: 193 B: 183 C: 185 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 287: A: 193 B: 191 C: 183 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 288: A: 194 B: 195 C: 196 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 289: A: 194 B: 197 C: 195 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 290: A: 198 B: 196 C: 195 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 291: A: 198 B: 199 C: 196 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 292: A: 198 B: 200 C: 199 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 293: A: 198 B: 201 C: 200 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 294: A: 198 B: 202 C: 201 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 295: A: 203 B: 197 C: 194 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 296: A: 203 B: 194 C: 204 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 297: A: 203 B: 204 C: 205 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 298: A: 203 B: 205 C: 206 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 299: A: 203 B: 206 C: 207 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 300: A: 204 B: 196 C: 199 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 301: A: 204 B: 194 C: 196 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 302: A: 205 B: 199 C: 200 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 303: A: 205 B: 204 C: 199 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 304: A: 206 B: 200 C: 201 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 305: A: 206 B: 205 C: 200 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 306: A: 207 B: 201 C: 202 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 307: A: 207 B: 206 C: 201 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 308: A: 208 B: 209 C: 210 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 309: A: 208 B: 211 C: 209 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 310: A: 208 B: 212 C: 211 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 311: A: 208 B: 213 C: 212 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 312: A: 213 B: 214 C: 212 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 313: A: 213 B: 215 C: 214 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 314: A: 213 B: 216 C: 215 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 315: A: 213 B: 198 C: 216 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 316: A: 209 B: 217 C: 210 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 317: A: 217 B: 218 C: 210 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 318: A: 217 B: 219 C: 218 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 319: A: 213 B: 220 C: 198 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 320: A: 220 B: 221 C: 198 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 321: A: 221 B: 202 C: 198 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 322: A: 222 B: 223 C: 224 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 323: A: 222 B: 224 C: 225 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 324: A: 222 B: 225 C: 226 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 325: A: 222 B: 226 C: 227 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 326: A: 227 B: 226 C: 228 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 327: A: 227 B: 228 C: 229 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 328: A: 227 B: 229 C: 230 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 329: A: 227 B: 230 C: 203 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 330: A: 224 B: 223 C: 231 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 331: A: 231 B: 223 C: 232 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 332: A: 231 B: 232 C: 233 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 333: A: 227 B: 203 C: 234 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 334: A: 234 B: 203 C: 235 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 335: A: 235 B: 203 C: 207 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 336: A: 235 B: 202 C: 221 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 337: A: 235 B: 207 C: 202 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 338: A: 234 B: 221 C: 220 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 339: A: 234 B: 235 C: 221 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 340: A: 227 B: 220 C: 213 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 341: A: 227 B: 234 C: 220 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 342: A: 222 B: 213 C: 208 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 343: A: 222 B: 227 C: 213 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 344: A: 223 B: 208 C: 210 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 345: A: 223 B: 222 C: 208 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 346: A: 232 B: 210 C: 218 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 347: A: 232 B: 223 C: 210 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 348: A: 233 B: 218 C: 219 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 349: A: 233 B: 232 C: 218 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 350: A: 231 B: 219 C: 217 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 351: A: 231 B: 233 C: 219 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 352: A: 224 B: 217 C: 209 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 353: A: 224 B: 231 C: 217 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 354: A: 225 B: 209 C: 211 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 355: A: 225 B: 224 C: 209 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 356: A: 226 B: 211 C: 212 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 357: A: 226 B: 225 C: 211 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 358: A: 228 B: 212 C: 214 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 359: A: 228 B: 226 C: 212 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 360: A: 229 B: 214 C: 215 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 361: A: 229 B: 228 C: 214 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 362: A: 230 B: 215 C: 216 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 363: A: 230 B: 229 C: 215 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 364: A: 203 B: 216 C: 198 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ *MESH_FACE 365: A: 203 B: 230 C: 216 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 19
+ }
+ *MESH_NORMALS {
+ *MESH_FACENORMAL 0 -0.980093 0.155663 -0.123234
+ *MESH_VERTEXNORMAL 0 -0.980093 0.155663 -0.123234
+ *MESH_VERTEXNORMAL 1 -0.988970 0.078070 -0.125869
+ *MESH_VERTEXNORMAL 2 -0.991289 0.042930 -0.124512
+ *MESH_FACENORMAL 1 -0.991808 -0.000000 -0.127736
+ *MESH_VERTEXNORMAL 1 -0.988970 0.078070 -0.125869
+ *MESH_VERTEXNORMAL 3 -0.990420 0.008350 -0.137834
+ *MESH_VERTEXNORMAL 2 -0.991289 0.042930 -0.124512
+ *MESH_FACENORMAL 2 -0.988860 0.016699 -0.147909
+ *MESH_VERTEXNORMAL 3 -0.990420 0.008350 -0.137834
+ *MESH_VERTEXNORMAL 4 -0.992673 -0.015634 -0.119813
+ *MESH_VERTEXNORMAL 2 -0.991289 0.042930 -0.124512
+ *MESH_FACENORMAL 3 -0.995185 -0.001043 -0.098013
+ *MESH_VERTEXNORMAL 4 -0.992673 -0.015634 -0.119813
+ *MESH_VERTEXNORMAL 5 -0.995096 -0.013415 -0.098004
+ *MESH_VERTEXNORMAL 2 -0.991289 0.042930 -0.124512
+ *MESH_FACENORMAL 4 -0.994854 -0.025784 -0.097980
+ *MESH_VERTEXNORMAL 4 -0.992673 -0.015634 -0.119813
+ *MESH_VERTEXNORMAL 6 -0.992415 -0.039089 -0.116554
+ *MESH_VERTEXNORMAL 5 -0.995096 -0.013415 -0.098004
+ *MESH_FACENORMAL 5 -0.989452 -0.052372 -0.135066
+ *MESH_VERTEXNORMAL 4 -0.992673 -0.015634 -0.119813
+ *MESH_VERTEXNORMAL 7 -0.989452 -0.052372 -0.135066
+ *MESH_VERTEXNORMAL 6 -0.992415 -0.039089 -0.116554
+ *MESH_FACENORMAL 6 0.980093 0.155663 -0.123234
+ *MESH_VERTEXNORMAL 8 0.980093 0.155663 -0.123234
+ *MESH_VERTEXNORMAL 9 0.991289 0.042930 -0.124512
+ *MESH_VERTEXNORMAL 10 0.988970 0.078070 -0.125869
+ *MESH_FACENORMAL 7 0.991808 0.000000 -0.127736
+ *MESH_VERTEXNORMAL 10 0.988970 0.078070 -0.125869
+ *MESH_VERTEXNORMAL 9 0.991289 0.042930 -0.124512
+ *MESH_VERTEXNORMAL 11 0.990420 0.008350 -0.137834
+ *MESH_FACENORMAL 8 0.988860 0.016699 -0.147909
+ *MESH_VERTEXNORMAL 11 0.990420 0.008350 -0.137834
+ *MESH_VERTEXNORMAL 9 0.991289 0.042930 -0.124512
+ *MESH_VERTEXNORMAL 12 0.992673 -0.015634 -0.119813
+ *MESH_FACENORMAL 9 0.995185 -0.001043 -0.098013
+ *MESH_VERTEXNORMAL 12 0.992673 -0.015634 -0.119813
+ *MESH_VERTEXNORMAL 9 0.991289 0.042930 -0.124512
+ *MESH_VERTEXNORMAL 13 0.995096 -0.013415 -0.098004
+ *MESH_FACENORMAL 10 0.994854 -0.025784 -0.097980
+ *MESH_VERTEXNORMAL 12 0.992673 -0.015634 -0.119813
+ *MESH_VERTEXNORMAL 13 0.995096 -0.013415 -0.098004
+ *MESH_VERTEXNORMAL 14 0.992415 -0.039089 -0.116554
+ *MESH_FACENORMAL 11 0.989452 -0.052372 -0.135065
+ *MESH_VERTEXNORMAL 12 0.992673 -0.015634 -0.119813
+ *MESH_VERTEXNORMAL 14 0.992415 -0.039089 -0.116554
+ *MESH_VERTEXNORMAL 15 0.989452 -0.052372 -0.135065
+ *MESH_FACENORMAL 12 0.000000 -0.535053 -0.844819
+ *MESH_VERTEXNORMAL 11 0.000000 -0.369678 -0.929160
+ *MESH_VERTEXNORMAL 4 0.000000 -0.479227 -0.877691
+ *MESH_VERTEXNORMAL 3 0.000000 -0.184839 -0.982769
+ *MESH_FACENORMAL 13 0.000000 -0.535053 -0.844819
+ *MESH_VERTEXNORMAL 11 0.000000 -0.369678 -0.929160
+ *MESH_VERTEXNORMAL 12 0.000000 -0.421141 -0.906995
+ *MESH_VERTEXNORMAL 4 0.000000 -0.479227 -0.877691
+ *MESH_FACENORMAL 14 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 10 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 3 0.000000 -0.184839 -0.982769
+ *MESH_VERTEXNORMAL 1 0.000000 0.000000 -1.000000
+ *MESH_FACENORMAL 15 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 10 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 11 0.000000 -0.369678 -0.929160
+ *MESH_VERTEXNORMAL 3 0.000000 -0.184839 -0.982769
+ *MESH_FACENORMAL 16 0.000000 0.973080 -0.230467
+ *MESH_VERTEXNORMAL 8 0.000000 0.973080 -0.230467
+ *MESH_VERTEXNORMAL 1 0.000000 0.973080 -0.230467
+ *MESH_VERTEXNORMAL 0 0.000000 0.973080 -0.230467
+ *MESH_FACENORMAL 17 0.000000 0.973080 -0.230467
+ *MESH_VERTEXNORMAL 8 0.000000 0.973080 -0.230467
+ *MESH_VERTEXNORMAL 10 0.000000 0.973080 -0.230467
+ *MESH_VERTEXNORMAL 1 0.000000 0.973080 -0.230467
+ *MESH_FACENORMAL 18 0.000000 0.813734 0.581237
+ *MESH_VERTEXNORMAL 9 0.000000 0.813734 0.581237
+ *MESH_VERTEXNORMAL 0 0.000000 0.813734 0.581237
+ *MESH_VERTEXNORMAL 2 0.000000 0.813734 0.581237
+ *MESH_FACENORMAL 19 0.000000 0.813734 0.581237
+ *MESH_VERTEXNORMAL 9 0.000000 0.813734 0.581237
+ *MESH_VERTEXNORMAL 8 0.000000 0.813734 0.581237
+ *MESH_VERTEXNORMAL 0 0.000000 0.813734 0.581237
+ *MESH_FACENORMAL 20 0.000000 0.010638 0.999943
+ *MESH_VERTEXNORMAL 13 0.000000 0.092548 0.995708
+ *MESH_VERTEXNORMAL 2 0.000000 0.010638 0.999943
+ *MESH_VERTEXNORMAL 5 0.000000 0.174385 0.984677
+ *MESH_FACENORMAL 21 0.000000 0.010638 0.999943
+ *MESH_VERTEXNORMAL 13 0.000000 0.092548 0.995708
+ *MESH_VERTEXNORMAL 9 0.000000 0.010638 0.999943
+ *MESH_VERTEXNORMAL 2 0.000000 0.010638 0.999943
+ *MESH_FACENORMAL 22 0.000000 0.254494 0.967074
+ *MESH_VERTEXNORMAL 14 0.000000 0.254493 0.967075
+ *MESH_VERTEXNORMAL 5 0.000000 0.174385 0.984677
+ *MESH_VERTEXNORMAL 6 0.000000 0.254494 0.967074
+ *MESH_FACENORMAL 23 0.000000 0.254493 0.967074
+ *MESH_VERTEXNORMAL 14 0.000000 0.254493 0.967075
+ *MESH_VERTEXNORMAL 13 0.000000 0.092548 0.995708
+ *MESH_VERTEXNORMAL 5 0.000000 0.174385 0.984677
+ *MESH_FACENORMAL 24 0.000000 -0.588171 0.808737
+ *MESH_VERTEXNORMAL 15 0.000000 -0.588171 0.808737
+ *MESH_VERTEXNORMAL 6 0.000000 -0.588171 0.808737
+ *MESH_VERTEXNORMAL 7 0.000000 -0.588171 0.808737
+ *MESH_FACENORMAL 25 0.000000 -0.588171 0.808737
+ *MESH_VERTEXNORMAL 15 0.000000 -0.588171 0.808737
+ *MESH_VERTEXNORMAL 14 0.000000 -0.588171 0.808737
+ *MESH_VERTEXNORMAL 6 0.000000 -0.588171 0.808737
+ *MESH_FACENORMAL 26 0.000000 -0.361528 -0.932361
+ *MESH_VERTEXNORMAL 12 0.000000 -0.421141 -0.906995
+ *MESH_VERTEXNORMAL 7 0.000000 -0.361528 -0.932361
+ *MESH_VERTEXNORMAL 4 0.000000 -0.479227 -0.877691
+ *MESH_FACENORMAL 27 0.000000 -0.361528 -0.932361
+ *MESH_VERTEXNORMAL 12 0.000000 -0.421141 -0.906995
+ *MESH_VERTEXNORMAL 15 0.000000 -0.361528 -0.932361
+ *MESH_VERTEXNORMAL 7 0.000000 -0.361528 -0.932361
+ *MESH_FACENORMAL 28 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 16 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 17 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 18 -1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 29 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 18 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 19 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 16 -1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 30 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 17 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 20 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 21 0.000000 1.000000 0.000000
+ *MESH_FACENORMAL 31 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 21 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 18 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 17 0.000000 1.000000 0.000000
+ *MESH_FACENORMAL 32 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 20 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 22 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 23 1.000000 0.000000 -0.000000
+ *MESH_FACENORMAL 33 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 23 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 21 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 20 1.000000 0.000000 -0.000000
+ *MESH_FACENORMAL 34 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 22 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 16 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 19 0.000000 -1.000000 0.000000
+ *MESH_FACENORMAL 35 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 19 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 23 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 22 0.000000 -1.000000 0.000000
+ *MESH_FACENORMAL 36 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 24 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 25 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 26 0.000000 0.000000 -1.000000
+ *MESH_FACENORMAL 37 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 24 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 27 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 25 0.000000 0.000000 -1.000000
+ *MESH_FACENORMAL 38 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 24 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 28 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 27 0.000000 0.000000 -1.000000
+ *MESH_FACENORMAL 39 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 24 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 29 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 28 0.000000 0.000000 -1.000000
+ *MESH_FACENORMAL 40 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 24 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 30 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 29 0.000000 0.000000 -1.000000
+ *MESH_FACENORMAL 41 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 24 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 31 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 30 0.000000 0.000000 -1.000000
+ *MESH_FACENORMAL 42 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 24 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 32 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 31 0.000000 0.000000 -1.000000
+ *MESH_FACENORMAL 43 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 24 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 33 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 32 0.000000 0.000000 -1.000000
+ *MESH_FACENORMAL 44 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 24 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 34 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 33 0.000000 0.000000 -1.000000
+ *MESH_FACENORMAL 45 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 24 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 35 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 34 0.000000 0.000000 -1.000000
+ *MESH_FACENORMAL 46 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 24 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 36 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 35 0.000000 0.000000 -1.000000
+ *MESH_FACENORMAL 47 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 24 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 26 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 36 0.000000 0.000000 -1.000000
+ *MESH_FACENORMAL 48 -0.000000 -0.078459 0.996917
+ *MESH_VERTEXNORMAL 37 0.000000 -0.078458 0.996917
+ *MESH_VERTEXNORMAL 38 0.000000 -0.078458 0.996917
+ *MESH_VERTEXNORMAL 39 0.000000 -0.078458 0.996917
+ *MESH_FACENORMAL 49 0.000000 -0.078458 0.996917
+ *MESH_VERTEXNORMAL 37 0.000000 -0.078458 0.996917
+ *MESH_VERTEXNORMAL 39 0.000000 -0.078458 0.996917
+ *MESH_VERTEXNORMAL 40 0.000000 -0.078458 0.996917
+ *MESH_FACENORMAL 50 -0.382647 0.919854 0.086316
+ *MESH_VERTEXNORMAL 41 -0.603716 0.793712 0.074479
+ *MESH_VERTEXNORMAL 37 -0.797151 0.601139 0.056409
+ *MESH_VERTEXNORMAL 40 -0.136759 0.986272 0.092548
+ *MESH_FACENORMAL 51 -0.382647 0.919854 0.086316
+ *MESH_VERTEXNORMAL 41 -0.603716 0.793712 0.074479
+ *MESH_VERTEXNORMAL 40 -0.136759 0.986272 0.092548
+ *MESH_VERTEXNORMAL 42 0.136759 0.986272 0.092548
+ *MESH_FACENORMAL 52 -0.000003 0.078465 -0.996917
+ *MESH_VERTEXNORMAL 43 -0.000004 0.078463 -0.996917
+ *MESH_VERTEXNORMAL 41 -0.000004 0.078462 -0.996917
+ *MESH_VERTEXNORMAL 42 -0.000001 0.078465 -0.996917
+ *MESH_FACENORMAL 53 -0.000002 0.078464 -0.996917
+ *MESH_VERTEXNORMAL 43 -0.000004 0.078463 -0.996917
+ *MESH_VERTEXNORMAL 42 -0.000001 0.078465 -0.996917
+ *MESH_VERTEXNORMAL 44 0.000001 0.078465 -0.996917
+ *MESH_FACENORMAL 54 0.382648 -0.919854 -0.086314
+ *MESH_VERTEXNORMAL 38 0.603716 -0.793713 -0.074479
+ *MESH_VERTEXNORMAL 43 0.797151 -0.601139 -0.056408
+ *MESH_VERTEXNORMAL 44 0.136758 -0.986272 -0.092549
+ *MESH_FACENORMAL 55 0.382645 -0.919855 -0.086317
+ *MESH_VERTEXNORMAL 38 0.382646 -0.919854 -0.086316
+ *MESH_VERTEXNORMAL 44 0.136758 -0.986272 -0.092549
+ *MESH_VERTEXNORMAL 39 -0.136759 -0.986272 -0.092549
+ *MESH_FACENORMAL 56 0.000000 -0.078457 0.996917
+ *MESH_VERTEXNORMAL 45 0.000000 -0.078708 0.996898
+ *MESH_VERTEXNORMAL 46 -0.000391 -0.079080 0.996868
+ *MESH_VERTEXNORMAL 38 0.000000 -0.078458 0.996917
+ *MESH_FACENORMAL 57 0.000001 -0.078458 0.996917
+ *MESH_VERTEXNORMAL 45 0.000000 -0.078708 0.996898
+ *MESH_VERTEXNORMAL 38 0.000000 -0.078458 0.996917
+ *MESH_VERTEXNORMAL 37 0.000000 -0.078458 0.996917
+ *MESH_FACENORMAL 58 -0.923864 0.381046 0.035756
+ *MESH_VERTEXNORMAL 47 -0.923864 0.381047 0.035756
+ *MESH_VERTEXNORMAL 45 -0.923864 0.381046 0.035756
+ *MESH_VERTEXNORMAL 37 -0.797151 0.601139 0.056409
+ *MESH_FACENORMAL 59 -0.923864 0.381047 0.035756
+ *MESH_VERTEXNORMAL 47 -0.923864 0.381047 0.035756
+ *MESH_VERTEXNORMAL 37 -0.797151 0.601139 0.056409
+ *MESH_VERTEXNORMAL 41 -0.603716 0.793712 0.074479
+ *MESH_FACENORMAL 60 0.000000 0.078460 -0.996917
+ *MESH_VERTEXNORMAL 48 -0.000003 0.075292 -0.997162
+ *MESH_VERTEXNORMAL 47 -0.027991 0.033420 -0.999049
+ *MESH_VERTEXNORMAL 41 -0.000004 0.078462 -0.996917
+ *MESH_FACENORMAL 61 -0.000008 0.078460 -0.996917
+ *MESH_VERTEXNORMAL 48 -0.000003 0.075292 -0.997162
+ *MESH_VERTEXNORMAL 41 -0.000004 0.078462 -0.996917
+ *MESH_VERTEXNORMAL 43 -0.000004 0.078463 -0.996917
+ *MESH_FACENORMAL 62 0.923864 -0.381047 -0.035756
+ *MESH_VERTEXNORMAL 46 0.923864 -0.381047 -0.035756
+ *MESH_VERTEXNORMAL 48 0.923864 -0.381047 -0.035756
+ *MESH_VERTEXNORMAL 43 0.797151 -0.601139 -0.056408
+ *MESH_FACENORMAL 63 0.923864 -0.381046 -0.035755
+ *MESH_VERTEXNORMAL 46 0.923864 -0.381047 -0.035756
+ *MESH_VERTEXNORMAL 43 0.797151 -0.601139 -0.056408
+ *MESH_VERTEXNORMAL 38 0.707079 -0.704042 -0.066064
+ *MESH_FACENORMAL 64 -0.001172 -0.079572 0.996828
+ *MESH_VERTEXNORMAL 49 -0.010725 -0.079447 0.996781
+ *MESH_VERTEXNORMAL 50 0.097286 -0.051915 0.993902
+ *MESH_VERTEXNORMAL 46 -0.000391 -0.079080 0.996868
+ *MESH_FACENORMAL 65 0.000000 -0.079210 0.996858
+ *MESH_VERTEXNORMAL 49 -0.010725 -0.079447 0.996781
+ *MESH_VERTEXNORMAL 46 -0.000391 -0.079080 0.996868
+ *MESH_VERTEXNORMAL 45 0.000000 -0.078708 0.996898
+ *MESH_FACENORMAL 66 -0.887281 -0.459720 0.037277
+ *MESH_VERTEXNORMAL 51 -0.895445 -0.445169 -0.001529
+ *MESH_VERTEXNORMAL 49 -0.887281 -0.459720 0.037277
+ *MESH_VERTEXNORMAL 45 -0.895445 -0.445169 -0.001529
+ *MESH_FACENORMAL 67 -0.902011 -0.429825 -0.040333
+ *MESH_VERTEXNORMAL 51 -0.895445 -0.445169 -0.001529
+ *MESH_VERTEXNORMAL 45 -0.895445 -0.445169 -0.001529
+ *MESH_VERTEXNORMAL 47 -0.902011 -0.429825 -0.040333
+ *MESH_FACENORMAL 68 -0.083771 -0.047396 -0.995357
+ *MESH_VERTEXNORMAL 52 0.078289 -0.007996 -0.996899
+ *MESH_VERTEXNORMAL 51 0.067704 -0.029591 -0.997266
+ *MESH_VERTEXNORMAL 47 -0.027991 0.033420 -0.999049
+ *MESH_FACENORMAL 69 0.000000 0.068952 -0.997620
+ *MESH_VERTEXNORMAL 52 0.078289 -0.007996 -0.996899
+ *MESH_VERTEXNORMAL 47 -0.027991 0.033420 -0.999049
+ *MESH_VERTEXNORMAL 48 -0.000003 0.075292 -0.997162
+ *MESH_FACENORMAL 70 0.766684 0.642019 0.002663
+ *MESH_VERTEXNORMAL 50 0.746365 0.664691 0.033554
+ *MESH_VERTEXNORMAL 52 0.766684 0.642019 0.002663
+ *MESH_VERTEXNORMAL 48 0.746365 0.664691 0.033554
+ *MESH_FACENORMAL 71 0.724642 0.686112 0.064382
+ *MESH_VERTEXNORMAL 50 0.746365 0.664691 0.033554
+ *MESH_VERTEXNORMAL 48 0.746365 0.664691 0.033554
+ *MESH_VERTEXNORMAL 46 0.724642 0.686112 0.064382
+ *MESH_FACENORMAL 72 0.320003 0.005508 0.947401
+ *MESH_VERTEXNORMAL 53 0.112170 -0.023029 0.993422
+ *MESH_VERTEXNORMAL 54 0.183466 0.005715 0.983010
+ *MESH_VERTEXNORMAL 50 0.097286 -0.051915 0.993902
+ *MESH_FACENORMAL 73 -0.030999 -0.079534 0.996350
+ *MESH_VERTEXNORMAL 53 0.112170 -0.023029 0.993422
+ *MESH_VERTEXNORMAL 50 0.097286 -0.051915 0.993902
+ *MESH_VERTEXNORMAL 49 -0.010725 -0.079447 0.996781
+ *MESH_FACENORMAL 74 -0.031172 0.005218 -0.999500
+ *MESH_VERTEXNORMAL 55 0.024617 -0.011902 -0.999626
+ *MESH_VERTEXNORMAL 56 -0.077821 -0.012476 -0.996889
+ *MESH_VERTEXNORMAL 51 0.067704 -0.029591 -0.997266
+ *MESH_FACENORMAL 75 0.314741 -0.045146 -0.948103
+ *MESH_VERTEXNORMAL 55 0.024617 -0.011902 -0.999626
+ *MESH_VERTEXNORMAL 51 0.067704 -0.029591 -0.997266
+ *MESH_VERTEXNORMAL 52 0.078289 -0.007996 -0.996899
+ *MESH_FACENORMAL 76 -0.909453 0.415805 0.001284
+ *MESH_VERTEXNORMAL 54 -0.909566 0.415557 0.001503
+ *MESH_VERTEXNORMAL 55 -0.909453 0.415805 0.001284
+ *MESH_VERTEXNORMAL 52 -0.909566 0.415557 0.001503
+ *MESH_FACENORMAL 77 -0.909679 0.415309 0.001722
+ *MESH_VERTEXNORMAL 54 -0.909566 0.415557 0.001503
+ *MESH_VERTEXNORMAL 52 -0.909566 0.415557 0.001503
+ *MESH_VERTEXNORMAL 50 -0.909679 0.415309 0.001722
+ *MESH_FACENORMAL 78 -0.463971 -0.070468 0.883043
+ *MESH_VERTEXNORMAL 57 -0.144179 -0.049514 0.988312
+ *MESH_VERTEXNORMAL 58 -0.158500 -0.078179 0.984259
+ *MESH_VERTEXNORMAL 54 -0.218020 -0.033509 0.975369
+ *MESH_FACENORMAL 79 0.043276 0.005808 0.999046
+ *MESH_VERTEXNORMAL 57 -0.144179 -0.049514 0.988312
+ *MESH_VERTEXNORMAL 54 -0.035557 -0.020888 0.999149
+ *MESH_VERTEXNORMAL 53 0.112170 -0.023029 0.993422
+ *MESH_FACENORMAL 80 0.010418 -0.047559 -0.998814
+ *MESH_VERTEXNORMAL 59 -0.021311 -0.030183 -0.999317
+ *MESH_VERTEXNORMAL 60 0.049539 -0.034144 -0.998188
+ *MESH_VERTEXNORMAL 56 -0.077821 -0.012476 -0.996889
+ *MESH_FACENORMAL 81 -0.211538 0.005102 -0.977357
+ *MESH_VERTEXNORMAL 59 -0.021311 -0.030183 -0.999317
+ *MESH_VERTEXNORMAL 56 -0.077821 -0.012476 -0.996889
+ *MESH_VERTEXNORMAL 55 0.024617 -0.011902 -0.999626
+ *MESH_FACENORMAL 82 0.909470 0.415767 0.001724
+ *MESH_VERTEXNORMAL 58 0.909588 0.415509 0.001503
+ *MESH_VERTEXNORMAL 59 0.909470 0.415767 0.001724
+ *MESH_VERTEXNORMAL 55 0.909588 0.415509 0.001503
+ *MESH_FACENORMAL 83 0.909706 0.415251 0.001282
+ *MESH_VERTEXNORMAL 58 0.909588 0.415509 0.001503
+ *MESH_VERTEXNORMAL 55 0.909588 0.415509 0.001503
+ *MESH_VERTEXNORMAL 54 0.909706 0.415251 0.001282
+ *MESH_FACENORMAL 84 0.000000 -0.078461 0.996917
+ *MESH_VERTEXNORMAL 61 0.000236 -0.078830 0.996888
+ *MESH_VERTEXNORMAL 62 -0.000001 -0.078459 0.996917
+ *MESH_VERTEXNORMAL 58 -0.158500 -0.078179 0.984259
+ *MESH_FACENORMAL 85 0.000708 -0.079572 0.996829
+ *MESH_VERTEXNORMAL 61 0.000236 -0.078830 0.996888
+ *MESH_VERTEXNORMAL 58 -0.158500 -0.078179 0.984259
+ *MESH_VERTEXNORMAL 57 -0.144179 -0.049514 0.988312
+ *MESH_FACENORMAL 86 0.889663 -0.454621 -0.042660
+ *MESH_VERTEXNORMAL 63 0.896798 -0.442423 -0.003922
+ *MESH_VERTEXNORMAL 61 0.889663 -0.454621 -0.042660
+ *MESH_VERTEXNORMAL 57 0.896798 -0.442423 -0.003922
+ *MESH_FACENORMAL 87 0.902408 -0.429473 0.034823
+ *MESH_VERTEXNORMAL 63 0.896798 -0.442423 -0.003922
+ *MESH_VERTEXNORMAL 57 0.896798 -0.442423 -0.003922
+ *MESH_VERTEXNORMAL 60 0.902408 -0.429473 0.034823
+ *MESH_FACENORMAL 88 0.000000 -0.007540 -0.999972
+ *MESH_VERTEXNORMAL 64 0.046121 0.007963 -0.998904
+ *MESH_VERTEXNORMAL 63 0.000002 0.049834 -0.998757
+ *MESH_VERTEXNORMAL 60 0.049539 -0.034144 -0.998188
+ *MESH_FACENORMAL 89 0.137879 -0.047113 -0.989328
+ *MESH_VERTEXNORMAL 64 0.046121 0.007963 -0.998904
+ *MESH_VERTEXNORMAL 60 0.049539 -0.034144 -0.998188
+ *MESH_VERTEXNORMAL 59 -0.021311 -0.030183 -0.999317
+ *MESH_FACENORMAL 90 -0.767254 0.638539 0.059918
+ *MESH_VERTEXNORMAL 62 -0.746219 0.664959 0.031421
+ *MESH_VERTEXNORMAL 64 -0.767254 0.638539 0.059918
+ *MESH_VERTEXNORMAL 59 -0.746219 0.664959 0.031421
+ *MESH_FACENORMAL 91 -0.723727 0.690081 0.002862
+ *MESH_VERTEXNORMAL 62 -0.746219 0.664959 0.031421
+ *MESH_VERTEXNORMAL 59 -0.746219 0.664959 0.031421
+ *MESH_VERTEXNORMAL 58 -0.723727 0.690081 0.002862
+ *MESH_FACENORMAL 92 -0.000002 -0.078458 0.996917
+ *MESH_VERTEXNORMAL 65 -0.000001 -0.078458 0.996917
+ *MESH_VERTEXNORMAL 66 -0.000000 -0.078458 0.996917
+ *MESH_VERTEXNORMAL 62 -0.000001 -0.078459 0.996917
+ *MESH_FACENORMAL 93 0.000000 -0.078458 0.996917
+ *MESH_VERTEXNORMAL 65 -0.000001 -0.078458 0.996917
+ *MESH_VERTEXNORMAL 62 -0.000001 -0.078459 0.996917
+ *MESH_VERTEXNORMAL 61 0.000236 -0.078830 0.996888
+ *MESH_FACENORMAL 94 0.923864 0.381047 0.035756
+ *MESH_VERTEXNORMAL 67 0.797151 0.601139 0.056409
+ *MESH_VERTEXNORMAL 65 0.603716 0.793712 0.074479
+ *MESH_VERTEXNORMAL 61 0.923864 0.381047 0.035756
+ *MESH_FACENORMAL 95 0.923864 0.381046 0.035756
+ *MESH_VERTEXNORMAL 67 0.797151 0.601139 0.056409
+ *MESH_VERTEXNORMAL 61 0.923864 0.381047 0.035756
+ *MESH_VERTEXNORMAL 63 0.923864 0.381046 0.035756
+ *MESH_FACENORMAL 96 0.000005 0.078463 -0.996917
+ *MESH_VERTEXNORMAL 68 0.000003 0.078462 -0.996917
+ *MESH_VERTEXNORMAL 67 0.000004 0.078464 -0.996917
+ *MESH_VERTEXNORMAL 63 0.000002 0.049834 -0.998757
+ *MESH_FACENORMAL 97 0.000000 0.078457 -0.996917
+ *MESH_VERTEXNORMAL 68 0.000003 0.078462 -0.996917
+ *MESH_VERTEXNORMAL 63 0.000002 0.049834 -0.998757
+ *MESH_VERTEXNORMAL 64 0.046121 0.007963 -0.998904
+ *MESH_FACENORMAL 98 -0.923864 -0.381047 -0.035756
+ *MESH_VERTEXNORMAL 66 -0.923864 -0.381047 -0.035756
+ *MESH_VERTEXNORMAL 68 -0.707079 -0.704042 -0.066065
+ *MESH_VERTEXNORMAL 64 -0.923864 -0.381047 -0.035756
+ *MESH_FACENORMAL 99 -0.923864 -0.381046 -0.035756
+ *MESH_VERTEXNORMAL 66 -0.923864 -0.381047 -0.035756
+ *MESH_VERTEXNORMAL 64 -0.923864 -0.381047 -0.035756
+ *MESH_VERTEXNORMAL 62 -0.923864 -0.381046 -0.035756
+ *MESH_FACENORMAL 100 0.000001 -0.078458 0.996917
+ *MESH_VERTEXNORMAL 40 0.000000 -0.078458 0.996917
+ *MESH_VERTEXNORMAL 39 0.000000 -0.078458 0.996917
+ *MESH_VERTEXNORMAL 66 -0.000000 -0.078458 0.996917
+ *MESH_FACENORMAL 101 -0.000000 -0.078459 0.996917
+ *MESH_VERTEXNORMAL 40 0.000000 -0.078458 0.996917
+ *MESH_VERTEXNORMAL 66 -0.000000 -0.078458 0.996917
+ *MESH_VERTEXNORMAL 65 -0.000001 -0.078458 0.996917
+ *MESH_FACENORMAL 102 0.382647 0.919854 0.086316
+ *MESH_VERTEXNORMAL 42 0.136759 0.986272 0.092548
+ *MESH_VERTEXNORMAL 40 -0.136759 0.986272 0.092548
+ *MESH_VERTEXNORMAL 65 0.603716 0.793712 0.074479
+ *MESH_FACENORMAL 103 0.382647 0.919854 0.086316
+ *MESH_VERTEXNORMAL 42 0.136759 0.986272 0.092548
+ *MESH_VERTEXNORMAL 65 0.603716 0.793712 0.074479
+ *MESH_VERTEXNORMAL 67 0.797151 0.601139 0.056409
+ *MESH_FACENORMAL 104 0.000003 0.078464 -0.996917
+ *MESH_VERTEXNORMAL 44 0.000001 0.078465 -0.996917
+ *MESH_VERTEXNORMAL 42 -0.000001 0.078465 -0.996917
+ *MESH_VERTEXNORMAL 67 0.000004 0.078464 -0.996917
+ *MESH_FACENORMAL 105 0.000003 0.078465 -0.996917
+ *MESH_VERTEXNORMAL 44 0.000001 0.078465 -0.996917
+ *MESH_VERTEXNORMAL 67 0.000004 0.078464 -0.996917
+ *MESH_VERTEXNORMAL 68 0.000003 0.078462 -0.996917
+ *MESH_FACENORMAL 106 -0.382648 -0.919853 -0.086317
+ *MESH_VERTEXNORMAL 39 -0.136759 -0.986272 -0.092549
+ *MESH_VERTEXNORMAL 44 0.136758 -0.986272 -0.092549
+ *MESH_VERTEXNORMAL 68 -0.603716 -0.793713 -0.074479
+ *MESH_FACENORMAL 107 -0.382645 -0.919855 -0.086315
+ *MESH_VERTEXNORMAL 39 -0.136759 -0.986272 -0.092549
+ *MESH_VERTEXNORMAL 68 -0.382646 -0.919854 -0.086316
+ *MESH_VERTEXNORMAL 66 -0.382645 -0.919855 -0.086315
+ *MESH_FACENORMAL 108 -0.707106 0.707107 0.000000
+ *MESH_VERTEXNORMAL 69 -0.707107 0.707106 -0.000000
+ *MESH_VERTEXNORMAL 70 -0.707107 0.707106 -0.000000
+ *MESH_VERTEXNORMAL 71 -0.707106 0.707107 0.000000
+ *MESH_FACENORMAL 109 -0.707108 0.707106 -0.000001
+ *MESH_VERTEXNORMAL 69 -0.707107 0.707106 -0.000000
+ *MESH_VERTEXNORMAL 72 -0.707108 0.707106 -0.000001
+ *MESH_VERTEXNORMAL 70 -0.707107 0.707106 -0.000000
+ *MESH_FACENORMAL 110 0.707110 0.707104 -0.000000
+ *MESH_VERTEXNORMAL 73 0.707109 0.707104 -0.000000
+ *MESH_VERTEXNORMAL 69 0.707109 0.707104 -0.000000
+ *MESH_VERTEXNORMAL 71 0.707110 0.707104 -0.000000
+ *MESH_FACENORMAL 111 0.707109 0.707104 0.000000
+ *MESH_VERTEXNORMAL 73 0.707109 0.707104 -0.000000
+ *MESH_VERTEXNORMAL 74 0.707109 0.707104 0.000000
+ *MESH_VERTEXNORMAL 69 0.707109 0.707104 -0.000000
+ *MESH_FACENORMAL 112 0.707109 0.707105 -0.000003
+ *MESH_VERTEXNORMAL 75 0.707108 0.707106 -0.000001
+ *MESH_VERTEXNORMAL 76 0.707108 0.707106 -0.000001
+ *MESH_VERTEXNORMAL 77 0.707109 0.707105 -0.000003
+ *MESH_FACENORMAL 113 0.707107 0.707107 0.000000
+ *MESH_VERTEXNORMAL 75 0.707108 0.707106 -0.000001
+ *MESH_VERTEXNORMAL 78 0.707107 0.707107 0.000000
+ *MESH_VERTEXNORMAL 76 0.707108 0.707106 -0.000001
+ *MESH_FACENORMAL 114 -0.707109 0.707105 -0.000003
+ *MESH_VERTEXNORMAL 79 -0.707108 0.707106 -0.000001
+ *MESH_VERTEXNORMAL 75 -0.707108 0.707106 -0.000001
+ *MESH_VERTEXNORMAL 80 -0.707109 0.707105 -0.000003
+ *MESH_FACENORMAL 115 -0.707106 0.707107 -0.000000
+ *MESH_VERTEXNORMAL 79 -0.707108 0.707106 -0.000001
+ *MESH_VERTEXNORMAL 78 -0.707106 0.707107 -0.000000
+ *MESH_VERTEXNORMAL 75 -0.707108 0.707106 -0.000001
+ *MESH_FACENORMAL 116 -0.000001 0.968147 -0.250382
+ *MESH_VERTEXNORMAL 74 -0.000001 0.968147 -0.250382
+ *MESH_VERTEXNORMAL 73 -0.000001 0.968147 -0.250382
+ *MESH_VERTEXNORMAL 81 -0.000001 0.968147 -0.250381
+ *MESH_FACENORMAL 117 -0.000001 0.968147 -0.250381
+ *MESH_VERTEXNORMAL 81 -0.000001 0.968147 -0.250381
+ *MESH_VERTEXNORMAL 82 -0.000002 0.968148 -0.250380
+ *MESH_VERTEXNORMAL 74 -0.000001 0.968147 -0.250382
+ *MESH_FACENORMAL 118 0.499999 0.216832 0.838442
+ *MESH_VERTEXNORMAL 82 0.500000 0.216834 0.838441
+ *MESH_VERTEXNORMAL 69 0.500000 0.216834 0.838441
+ *MESH_VERTEXNORMAL 74 0.499999 0.216832 0.838442
+ *MESH_FACENORMAL 119 0.500000 0.216835 0.838440
+ *MESH_VERTEXNORMAL 82 0.500000 0.216834 0.838441
+ *MESH_VERTEXNORMAL 83 0.500000 0.216835 0.838440
+ *MESH_VERTEXNORMAL 69 0.500000 0.216834 0.838441
+ *MESH_FACENORMAL 120 0.500000 0.216836 0.838440
+ *MESH_VERTEXNORMAL 83 0.500000 0.216835 0.838440
+ *MESH_VERTEXNORMAL 84 0.500000 0.216836 0.838440
+ *MESH_VERTEXNORMAL 69 0.500000 0.216834 0.838441
+ *MESH_FACENORMAL 121 -0.500000 -0.216835 -0.838440
+ *MESH_VERTEXNORMAL 81 -0.500000 -0.216834 -0.838441
+ *MESH_VERTEXNORMAL 71 -0.500000 -0.216835 -0.838441
+ *MESH_VERTEXNORMAL 85 -0.500000 -0.216835 -0.838440
+ *MESH_FACENORMAL 122 -0.500000 -0.216836 -0.838441
+ *MESH_VERTEXNORMAL 71 -0.500000 -0.216835 -0.838441
+ *MESH_VERTEXNORMAL 86 -0.500000 -0.216836 -0.838441
+ *MESH_VERTEXNORMAL 85 -0.500000 -0.216835 -0.838440
+ *MESH_FACENORMAL 123 -0.500000 -0.216833 -0.838441
+ *MESH_VERTEXNORMAL 81 -0.500000 -0.216834 -0.838441
+ *MESH_VERTEXNORMAL 73 -0.500000 -0.216833 -0.838441
+ *MESH_VERTEXNORMAL 71 -0.500000 -0.216835 -0.838441
+ *MESH_FACENORMAL 124 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 83 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 82 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 87 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 125 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 87 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 88 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 83 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 126 -0.000002 0.968148 -0.250380
+ *MESH_VERTEXNORMAL 82 -0.000002 0.968148 -0.250380
+ *MESH_VERTEXNORMAL 81 -0.000001 0.968147 -0.250381
+ *MESH_VERTEXNORMAL 89 -0.000002 0.968148 -0.250380
+ *MESH_FACENORMAL 127 -0.000002 0.968148 -0.250380
+ *MESH_VERTEXNORMAL 89 -0.000002 0.968148 -0.250380
+ *MESH_VERTEXNORMAL 87 0.000001 0.968147 -0.250381
+ *MESH_VERTEXNORMAL 82 -0.000002 0.968148 -0.250380
+ *MESH_FACENORMAL 128 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 81 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 85 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 90 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 129 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 90 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 89 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 81 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 130 0.499999 -0.216837 -0.838440
+ *MESH_VERTEXNORMAL 78 0.500000 -0.216836 -0.838440
+ *MESH_VERTEXNORMAL 87 0.500000 -0.216836 -0.838440
+ *MESH_VERTEXNORMAL 76 0.499999 -0.216837 -0.838440
+ *MESH_FACENORMAL 131 0.500000 -0.216835 -0.838440
+ *MESH_VERTEXNORMAL 78 0.500000 -0.216836 -0.838440
+ *MESH_VERTEXNORMAL 88 0.500000 -0.216835 -0.838440
+ *MESH_VERTEXNORMAL 87 0.500000 -0.216836 -0.838440
+ *MESH_FACENORMAL 132 0.500000 -0.216835 -0.838440
+ *MESH_VERTEXNORMAL 78 0.500000 -0.216836 -0.838440
+ *MESH_VERTEXNORMAL 91 0.500000 -0.216835 -0.838440
+ *MESH_VERTEXNORMAL 88 0.500000 -0.216835 -0.838440
+ *MESH_FACENORMAL 133 0.000007 0.968147 -0.250383
+ *MESH_VERTEXNORMAL 77 0.000002 0.968147 -0.250382
+ *MESH_VERTEXNORMAL 76 0.000007 0.968147 -0.250383
+ *MESH_VERTEXNORMAL 87 0.000001 0.968147 -0.250381
+ *MESH_FACENORMAL 134 -0.000003 0.968147 -0.250381
+ *MESH_VERTEXNORMAL 87 0.000001 0.968147 -0.250381
+ *MESH_VERTEXNORMAL 89 -0.000002 0.968148 -0.250380
+ *MESH_VERTEXNORMAL 77 0.000002 0.968147 -0.250382
+ *MESH_FACENORMAL 135 -0.500000 0.216836 0.838440
+ *MESH_VERTEXNORMAL 92 -0.500000 0.216836 0.838440
+ *MESH_VERTEXNORMAL 89 -0.500000 0.216835 0.838440
+ *MESH_VERTEXNORMAL 90 -0.500000 0.216836 0.838440
+ *MESH_FACENORMAL 136 -0.500000 0.216835 0.838440
+ *MESH_VERTEXNORMAL 92 -0.500000 0.216836 0.838440
+ *MESH_VERTEXNORMAL 75 -0.500001 0.216835 0.838440
+ *MESH_VERTEXNORMAL 89 -0.500000 0.216835 0.838440
+ *MESH_FACENORMAL 137 -0.500001 0.216834 0.838440
+ *MESH_VERTEXNORMAL 75 -0.500001 0.216835 0.838440
+ *MESH_VERTEXNORMAL 77 -0.500001 0.216834 0.838440
+ *MESH_VERTEXNORMAL 89 -0.500000 0.216835 0.838440
+ *MESH_FACENORMAL 138 -0.500000 -0.216835 -0.838440
+ *MESH_VERTEXNORMAL 93 -0.500000 -0.216835 -0.838440
+ *MESH_VERTEXNORMAL 79 -0.500000 -0.216835 -0.838440
+ *MESH_VERTEXNORMAL 94 -0.500000 -0.216835 -0.838440
+ *MESH_FACENORMAL 139 -0.500000 -0.216835 -0.838440
+ *MESH_VERTEXNORMAL 93 -0.500000 -0.216835 -0.838440
+ *MESH_VERTEXNORMAL 78 -0.500000 -0.216835 -0.838440
+ *MESH_VERTEXNORMAL 79 -0.500000 -0.216835 -0.838440
+ *MESH_FACENORMAL 140 -0.500000 -0.216835 -0.838440
+ *MESH_VERTEXNORMAL 93 -0.500000 -0.216835 -0.838440
+ *MESH_VERTEXNORMAL 91 -0.500000 -0.216835 -0.838440
+ *MESH_VERTEXNORMAL 78 -0.500000 -0.216835 -0.838440
+ *MESH_FACENORMAL 141 -0.000007 0.968147 -0.250384
+ *MESH_VERTEXNORMAL 94 -0.000000 0.968147 -0.250381
+ *MESH_VERTEXNORMAL 79 -0.000007 0.968147 -0.250384
+ *MESH_VERTEXNORMAL 80 -0.000002 0.968147 -0.250382
+ *MESH_FACENORMAL 142 0.000003 0.968147 -0.250381
+ *MESH_VERTEXNORMAL 80 -0.000002 0.968147 -0.250382
+ *MESH_VERTEXNORMAL 95 0.000002 0.968148 -0.250381
+ *MESH_VERTEXNORMAL 94 -0.000000 0.968147 -0.250381
+ *MESH_FACENORMAL 143 0.500000 0.216836 0.838441
+ *MESH_VERTEXNORMAL 96 0.500000 0.216836 0.838441
+ *MESH_VERTEXNORMAL 95 0.500000 0.216835 0.838440
+ *MESH_VERTEXNORMAL 92 0.500000 0.216836 0.838440
+ *MESH_FACENORMAL 144 0.500000 0.216835 0.838440
+ *MESH_VERTEXNORMAL 95 0.500000 0.216835 0.838440
+ *MESH_VERTEXNORMAL 75 0.500000 0.216835 0.838440
+ *MESH_VERTEXNORMAL 92 0.500000 0.216836 0.838440
+ *MESH_FACENORMAL 145 0.500000 0.216835 0.838440
+ *MESH_VERTEXNORMAL 95 0.500000 0.216835 0.838440
+ *MESH_VERTEXNORMAL 80 0.500000 0.216835 0.838440
+ *MESH_VERTEXNORMAL 75 0.500000 0.216835 0.838440
+ *MESH_FACENORMAL 146 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 93 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 94 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 97 -1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 147 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 97 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 98 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 93 -1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 148 0.000002 0.968148 -0.250380
+ *MESH_VERTEXNORMAL 94 -0.000000 0.968147 -0.250381
+ *MESH_VERTEXNORMAL 95 0.000002 0.968148 -0.250381
+ *MESH_VERTEXNORMAL 99 0.000001 0.968147 -0.250381
+ *MESH_FACENORMAL 149 0.000002 0.968148 -0.250380
+ *MESH_VERTEXNORMAL 99 0.000001 0.968147 -0.250381
+ *MESH_VERTEXNORMAL 97 0.000001 0.968148 -0.250381
+ *MESH_VERTEXNORMAL 94 -0.000000 0.968147 -0.250381
+ *MESH_FACENORMAL 150 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 95 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 96 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 100 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 151 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 100 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 99 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 95 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 152 -0.500001 0.216835 0.838440
+ *MESH_VERTEXNORMAL 84 -0.500001 0.216835 0.838440
+ *MESH_VERTEXNORMAL 72 -0.500000 0.216835 0.838440
+ *MESH_VERTEXNORMAL 69 -0.500001 0.216835 0.838440
+ *MESH_FACENORMAL 153 -0.500000 0.216835 0.838440
+ *MESH_VERTEXNORMAL 84 -0.500001 0.216835 0.838440
+ *MESH_VERTEXNORMAL 98 -0.500000 0.216836 0.838441
+ *MESH_VERTEXNORMAL 72 -0.500000 0.216835 0.838440
+ *MESH_FACENORMAL 154 -0.499999 0.216836 0.838441
+ *MESH_VERTEXNORMAL 98 -0.500000 0.216836 0.838441
+ *MESH_VERTEXNORMAL 97 -0.499999 0.216836 0.838441
+ *MESH_VERTEXNORMAL 72 -0.500000 0.216835 0.838440
+ *MESH_FACENORMAL 155 0.000001 0.968147 -0.250382
+ *MESH_VERTEXNORMAL 99 0.000001 0.968147 -0.250381
+ *MESH_VERTEXNORMAL 70 0.000001 0.968147 -0.250382
+ *MESH_VERTEXNORMAL 72 0.000001 0.968147 -0.250382
+ *MESH_FACENORMAL 156 0.000001 0.968147 -0.250381
+ *MESH_VERTEXNORMAL 72 0.000001 0.968147 -0.250382
+ *MESH_VERTEXNORMAL 97 0.000001 0.968148 -0.250381
+ *MESH_VERTEXNORMAL 99 0.000001 0.968147 -0.250381
+ *MESH_FACENORMAL 157 0.500000 -0.216836 -0.838441
+ *MESH_VERTEXNORMAL 86 0.500000 -0.216836 -0.838441
+ *MESH_VERTEXNORMAL 71 0.500000 -0.216835 -0.838441
+ *MESH_VERTEXNORMAL 100 0.500000 -0.216835 -0.838441
+ *MESH_FACENORMAL 158 0.500000 -0.216835 -0.838440
+ *MESH_VERTEXNORMAL 71 0.500000 -0.216835 -0.838441
+ *MESH_VERTEXNORMAL 99 0.500000 -0.216834 -0.838441
+ *MESH_VERTEXNORMAL 100 0.500000 -0.216835 -0.838441
+ *MESH_FACENORMAL 159 0.500000 -0.216833 -0.838441
+ *MESH_VERTEXNORMAL 71 0.500000 -0.216835 -0.838441
+ *MESH_VERTEXNORMAL 70 0.500000 -0.216833 -0.838441
+ *MESH_VERTEXNORMAL 99 0.500000 -0.216834 -0.838441
+ *MESH_FACENORMAL 160 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 101 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 102 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 103 -1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 161 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 102 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 104 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 103 -1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 162 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 102 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 105 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 104 -1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 163 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 105 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 106 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 104 -1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 164 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 103 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 107 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 101 -1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 165 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 107 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 108 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 101 -1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 166 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 107 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 109 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 108 -1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 167 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 110 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 111 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 112 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 168 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 112 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 111 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 113 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 169 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 112 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 113 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 114 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 170 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 114 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 113 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 115 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 171 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 111 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 110 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 116 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 172 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 116 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 110 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 117 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 173 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 116 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 117 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 118 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 174 0.000000 0.435561 0.900159
+ *MESH_VERTEXNORMAL 112 0.000000 0.435561 0.900159
+ *MESH_VERTEXNORMAL 105 0.000000 0.435561 0.900159
+ *MESH_VERTEXNORMAL 102 0.000000 0.435561 0.900159
+ *MESH_FACENORMAL 175 0.000000 0.435561 0.900159
+ *MESH_VERTEXNORMAL 112 0.000000 0.435561 0.900159
+ *MESH_VERTEXNORMAL 114 0.000000 0.435561 0.900159
+ *MESH_VERTEXNORMAL 105 0.000000 0.435561 0.900159
+ *MESH_FACENORMAL 176 0.000000 0.999861 0.016664
+ *MESH_VERTEXNORMAL 110 0.000000 0.979535 -0.201273
+ *MESH_VERTEXNORMAL 102 0.000000 0.999861 0.016664
+ *MESH_VERTEXNORMAL 101 0.000000 0.907491 -0.420072
+ *MESH_FACENORMAL 177 0.000000 0.999861 0.016664
+ *MESH_VERTEXNORMAL 110 0.000000 0.979535 -0.201273
+ *MESH_VERTEXNORMAL 112 0.000000 0.999861 0.016664
+ *MESH_VERTEXNORMAL 102 0.000000 0.999861 0.016664
+ *MESH_FACENORMAL 178 0.000000 0.794358 -0.607450
+ *MESH_VERTEXNORMAL 117 0.000000 0.794358 -0.607450
+ *MESH_VERTEXNORMAL 101 0.000000 0.907491 -0.420072
+ *MESH_VERTEXNORMAL 108 0.000000 0.794358 -0.607450
+ *MESH_FACENORMAL 179 0.000000 0.794358 -0.607450
+ *MESH_VERTEXNORMAL 117 0.000000 0.794358 -0.607450
+ *MESH_VERTEXNORMAL 110 0.000000 0.979535 -0.201273
+ *MESH_VERTEXNORMAL 101 0.000000 0.907491 -0.420072
+ *MESH_FACENORMAL 180 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 116 0.000000 -0.984174 0.177202
+ *MESH_VERTEXNORMAL 109 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 107 0.000000 -0.935092 0.354404
+ *MESH_FACENORMAL 181 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 116 0.000000 -0.984174 0.177202
+ *MESH_VERTEXNORMAL 118 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 109 0.000000 -1.000000 0.000000
+ *MESH_FACENORMAL 182 0.000000 -0.857493 0.514496
+ *MESH_VERTEXNORMAL 111 0.000000 -0.936667 0.350222
+ *MESH_VERTEXNORMAL 107 0.000000 -0.935092 0.354404
+ *MESH_VERTEXNORMAL 103 0.000000 -0.985800 0.167924
+ *MESH_FACENORMAL 183 0.000000 -0.857493 0.514496
+ *MESH_VERTEXNORMAL 111 0.000000 -0.936667 0.350222
+ *MESH_VERTEXNORMAL 116 0.000000 -0.984174 0.177202
+ *MESH_VERTEXNORMAL 107 0.000000 -0.935092 0.354404
+ *MESH_FACENORMAL 184 0.000000 -0.999904 -0.013888
+ *MESH_VERTEXNORMAL 113 0.000000 -0.999904 -0.013888
+ *MESH_VERTEXNORMAL 103 0.000000 -0.985800 0.167924
+ *MESH_VERTEXNORMAL 104 0.000000 -0.999904 -0.013888
+ *MESH_FACENORMAL 185 0.000000 -0.999904 -0.013888
+ *MESH_VERTEXNORMAL 113 0.000000 -0.999904 -0.013888
+ *MESH_VERTEXNORMAL 111 0.000000 -0.936667 0.350222
+ *MESH_VERTEXNORMAL 103 0.000000 -0.985800 0.167924
+ *MESH_FACENORMAL 186 0.000000 -0.452095 -0.891970
+ *MESH_VERTEXNORMAL 115 0.000000 -0.452095 -0.891970
+ *MESH_VERTEXNORMAL 104 0.000000 -0.452095 -0.891970
+ *MESH_VERTEXNORMAL 106 0.000000 -0.452095 -0.891970
+ *MESH_FACENORMAL 187 0.000000 -0.452095 -0.891970
+ *MESH_VERTEXNORMAL 115 0.000000 -0.452095 -0.891970
+ *MESH_VERTEXNORMAL 113 0.000000 -0.452095 -0.891970
+ *MESH_VERTEXNORMAL 104 0.000000 -0.452095 -0.891970
+ *MESH_FACENORMAL 188 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 119 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 120 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 121 -1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 189 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 120 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 122 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 121 -1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 190 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 121 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 123 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 119 -1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 191 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 124 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 125 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 126 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 192 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 126 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 125 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 127 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 193 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 125 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 124 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 128 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 194 0.000000 -0.124035 0.992278
+ *MESH_VERTEXNORMAL 124 0.000000 -0.308281 0.951295
+ *MESH_VERTEXNORMAL 120 0.000000 -0.124035 0.992278
+ *MESH_VERTEXNORMAL 119 0.000000 -0.487853 0.872926
+ *MESH_FACENORMAL 195 0.000000 -0.124035 0.992278
+ *MESH_VERTEXNORMAL 124 0.000000 -0.308281 0.951295
+ *MESH_VERTEXNORMAL 126 0.000000 -0.124035 0.992278
+ *MESH_VERTEXNORMAL 120 0.000000 -0.124035 0.992278
+ *MESH_FACENORMAL 196 0.000000 -0.643192 0.765705
+ *MESH_VERTEXNORMAL 128 0.000000 -0.643192 0.765705
+ *MESH_VERTEXNORMAL 119 0.000000 -0.487853 0.872926
+ *MESH_VERTEXNORMAL 123 0.000000 -0.643192 0.765705
+ *MESH_FACENORMAL 197 0.000000 -0.643192 0.765705
+ *MESH_VERTEXNORMAL 128 0.000000 -0.643192 0.765705
+ *MESH_VERTEXNORMAL 124 0.000000 -0.308281 0.951295
+ *MESH_VERTEXNORMAL 119 0.000000 -0.487853 0.872926
+ *MESH_FACENORMAL 198 0.000000 0.327110 -0.944986
+ *MESH_VERTEXNORMAL 125 0.000000 0.108921 -0.994050
+ *MESH_VERTEXNORMAL 123 0.000000 0.327110 -0.944986
+ *MESH_VERTEXNORMAL 121 0.000000 -0.126995 -0.991903
+ *MESH_FACENORMAL 199 0.000000 0.327110 -0.944986
+ *MESH_VERTEXNORMAL 125 0.000000 0.108921 -0.994050
+ *MESH_VERTEXNORMAL 128 0.000000 0.327110 -0.944986
+ *MESH_VERTEXNORMAL 123 0.000000 0.327110 -0.944986
+ *MESH_FACENORMAL 200 0.000000 -0.344255 -0.938876
+ *MESH_VERTEXNORMAL 127 0.000000 -0.344255 -0.938876
+ *MESH_VERTEXNORMAL 121 0.000000 -0.126995 -0.991903
+ *MESH_VERTEXNORMAL 122 0.000000 -0.344255 -0.938876
+ *MESH_FACENORMAL 201 0.000000 -0.344255 -0.938876
+ *MESH_VERTEXNORMAL 127 0.000000 -0.344255 -0.938876
+ *MESH_VERTEXNORMAL 125 0.000000 0.108921 -0.994050
+ *MESH_VERTEXNORMAL 121 0.000000 -0.126995 -0.991903
+ *MESH_FACENORMAL 202 0.965926 0.258819 -0.000000
+ *MESH_VERTEXNORMAL 129 0.907073 0.420974 -0.000000
+ *MESH_VERTEXNORMAL 130 0.996035 -0.088962 0.000000
+ *MESH_VERTEXNORMAL 131 0.996035 0.088962 0.000000
+ *MESH_FACENORMAL 203 0.965926 0.258819 -0.000000
+ *MESH_VERTEXNORMAL 129 0.907073 0.420974 -0.000000
+ *MESH_VERTEXNORMAL 131 0.996035 0.088962 0.000000
+ *MESH_VERTEXNORMAL 132 0.818110 0.575061 -0.000000
+ *MESH_FACENORMAL 204 0.707107 0.707107 -0.000000
+ *MESH_VERTEXNORMAL 133 0.575061 0.818111 -0.000000
+ *MESH_VERTEXNORMAL 129 0.907073 0.420974 -0.000000
+ *MESH_VERTEXNORMAL 132 0.818110 0.575061 -0.000000
+ *MESH_FACENORMAL 205 0.707106 0.707107 -0.000000
+ *MESH_VERTEXNORMAL 133 0.575061 0.818111 -0.000000
+ *MESH_VERTEXNORMAL 132 0.818110 0.575061 -0.000000
+ *MESH_VERTEXNORMAL 134 0.420974 0.907073 -0.000000
+ *MESH_FACENORMAL 206 0.258819 0.965926 -0.000000
+ *MESH_VERTEXNORMAL 135 0.088963 0.996035 -0.000000
+ *MESH_VERTEXNORMAL 133 0.575061 0.818111 -0.000000
+ *MESH_VERTEXNORMAL 134 0.420974 0.907073 -0.000000
+ *MESH_FACENORMAL 207 0.258819 0.965926 -0.000000
+ *MESH_VERTEXNORMAL 135 0.088963 0.996035 -0.000000
+ *MESH_VERTEXNORMAL 134 0.420974 0.907073 -0.000000
+ *MESH_VERTEXNORMAL 136 -0.088962 0.996035 -0.000000
+ *MESH_FACENORMAL 208 -0.258819 0.965926 -0.000000
+ *MESH_VERTEXNORMAL 137 -0.420974 0.907073 -0.000000
+ *MESH_VERTEXNORMAL 135 0.088963 0.996035 -0.000000
+ *MESH_VERTEXNORMAL 136 -0.088962 0.996035 -0.000000
+ *MESH_FACENORMAL 209 -0.258818 0.965926 -0.000000
+ *MESH_VERTEXNORMAL 137 -0.420974 0.907073 -0.000000
+ *MESH_VERTEXNORMAL 136 -0.088962 0.996035 -0.000000
+ *MESH_VERTEXNORMAL 138 -0.575061 0.818110 -0.000000
+ *MESH_FACENORMAL 210 -0.707107 0.707106 -0.000000
+ *MESH_VERTEXNORMAL 139 -0.818111 0.575061 -0.000000
+ *MESH_VERTEXNORMAL 137 -0.420974 0.907073 -0.000000
+ *MESH_VERTEXNORMAL 138 -0.575061 0.818110 -0.000000
+ *MESH_FACENORMAL 211 -0.707107 0.707106 -0.000000
+ *MESH_VERTEXNORMAL 139 -0.818111 0.575061 -0.000000
+ *MESH_VERTEXNORMAL 138 -0.575061 0.818110 -0.000000
+ *MESH_VERTEXNORMAL 140 -0.907073 0.420974 -0.000000
+ *MESH_FACENORMAL 212 -0.965926 0.258819 -0.000000
+ *MESH_VERTEXNORMAL 141 -0.996035 0.088963 -0.000000
+ *MESH_VERTEXNORMAL 139 -0.818111 0.575061 -0.000000
+ *MESH_VERTEXNORMAL 140 -0.907073 0.420974 -0.000000
+ *MESH_FACENORMAL 213 -0.965926 0.258819 -0.000000
+ *MESH_VERTEXNORMAL 141 -0.996035 0.088963 -0.000000
+ *MESH_VERTEXNORMAL 140 -0.907073 0.420974 -0.000000
+ *MESH_VERTEXNORMAL 142 -0.996035 -0.088962 -0.000000
+ *MESH_FACENORMAL 214 -0.965926 -0.258819 0.000000
+ *MESH_VERTEXNORMAL 143 -0.907073 -0.420974 -0.000000
+ *MESH_VERTEXNORMAL 141 -0.996035 0.088963 -0.000000
+ *MESH_VERTEXNORMAL 142 -0.996035 -0.088962 -0.000000
+ *MESH_FACENORMAL 215 -0.965926 -0.258819 -0.000000
+ *MESH_VERTEXNORMAL 143 -0.907073 -0.420974 -0.000000
+ *MESH_VERTEXNORMAL 142 -0.996035 -0.088962 -0.000000
+ *MESH_VERTEXNORMAL 144 -0.818111 -0.575061 -0.000000
+ *MESH_FACENORMAL 216 -0.707107 -0.707107 0.000000
+ *MESH_VERTEXNORMAL 145 -0.575061 -0.818110 0.000000
+ *MESH_VERTEXNORMAL 143 -0.907073 -0.420974 -0.000000
+ *MESH_VERTEXNORMAL 144 -0.818110 -0.575061 -0.000000
+ *MESH_FACENORMAL 217 -0.707107 -0.707107 0.000000
+ *MESH_VERTEXNORMAL 145 -0.575061 -0.818110 0.000000
+ *MESH_VERTEXNORMAL 144 -0.818110 -0.575061 -0.000000
+ *MESH_VERTEXNORMAL 146 -0.420974 -0.907073 0.000000
+ *MESH_FACENORMAL 218 -0.258819 -0.965926 0.000000
+ *MESH_VERTEXNORMAL 147 -0.088962 -0.996035 0.000000
+ *MESH_VERTEXNORMAL 145 -0.575061 -0.818110 0.000000
+ *MESH_VERTEXNORMAL 146 -0.420974 -0.907073 0.000000
+ *MESH_FACENORMAL 219 -0.258819 -0.965926 0.000000
+ *MESH_VERTEXNORMAL 147 -0.088962 -0.996035 0.000000
+ *MESH_VERTEXNORMAL 146 -0.420974 -0.907073 0.000000
+ *MESH_VERTEXNORMAL 148 0.088962 -0.996035 0.000000
+ *MESH_FACENORMAL 220 0.258819 -0.965926 0.000000
+ *MESH_VERTEXNORMAL 149 0.420974 -0.907073 0.000000
+ *MESH_VERTEXNORMAL 147 -0.088962 -0.996035 0.000000
+ *MESH_VERTEXNORMAL 148 0.088962 -0.996035 0.000000
+ *MESH_FACENORMAL 221 0.258819 -0.965926 0.000000
+ *MESH_VERTEXNORMAL 149 0.420974 -0.907073 0.000000
+ *MESH_VERTEXNORMAL 148 0.088962 -0.996035 0.000000
+ *MESH_VERTEXNORMAL 150 0.575061 -0.818110 0.000000
+ *MESH_FACENORMAL 222 0.707107 -0.707107 0.000000
+ *MESH_VERTEXNORMAL 151 0.818111 -0.575061 0.000000
+ *MESH_VERTEXNORMAL 149 0.420974 -0.907073 0.000000
+ *MESH_VERTEXNORMAL 150 0.575061 -0.818110 0.000000
+ *MESH_FACENORMAL 223 0.707107 -0.707107 0.000000
+ *MESH_VERTEXNORMAL 151 0.818110 -0.575061 0.000000
+ *MESH_VERTEXNORMAL 150 0.575061 -0.818110 0.000000
+ *MESH_VERTEXNORMAL 152 0.907073 -0.420974 0.000000
+ *MESH_FACENORMAL 224 0.965926 -0.258819 0.000000
+ *MESH_VERTEXNORMAL 130 0.996035 -0.088962 0.000000
+ *MESH_VERTEXNORMAL 151 0.818110 -0.575061 0.000000
+ *MESH_VERTEXNORMAL 152 0.907073 -0.420974 0.000000
+ *MESH_FACENORMAL 225 0.965926 -0.258819 0.000000
+ *MESH_VERTEXNORMAL 130 0.996035 -0.088962 0.000000
+ *MESH_VERTEXNORMAL 152 0.907073 -0.420974 0.000000
+ *MESH_VERTEXNORMAL 131 0.996035 0.088962 0.000000
+ *MESH_FACENORMAL 226 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 153 0.000000 -0.000004 -1.000000
+ *MESH_VERTEXNORMAL 154 0.000001 -0.000001 -1.000000
+ *MESH_VERTEXNORMAL 155 0.000000 -0.000006 -1.000000
+ *MESH_FACENORMAL 227 0.000002 -0.000002 -1.000000
+ *MESH_VERTEXNORMAL 153 0.000000 -0.000004 -1.000000
+ *MESH_VERTEXNORMAL 156 0.000001 -0.000001 -1.000000
+ *MESH_VERTEXNORMAL 154 0.000001 -0.000001 -1.000000
+ *MESH_FACENORMAL 228 -0.000000 -0.000001 -1.000000
+ *MESH_VERTEXNORMAL 153 0.000000 -0.000004 -1.000000
+ *MESH_VERTEXNORMAL 157 -0.000000 -0.000001 -1.000000
+ *MESH_VERTEXNORMAL 156 0.000001 -0.000001 -1.000000
+ *MESH_FACENORMAL 229 0.000000 -0.000001 -1.000000
+ *MESH_VERTEXNORMAL 153 0.000000 -0.000004 -1.000000
+ *MESH_VERTEXNORMAL 158 0.000001 -0.000001 -1.000000
+ *MESH_VERTEXNORMAL 157 -0.000000 -0.000001 -1.000000
+ *MESH_FACENORMAL 230 0.000001 -0.000001 -1.000000
+ *MESH_VERTEXNORMAL 153 0.000000 -0.000004 -1.000000
+ *MESH_VERTEXNORMAL 159 0.000001 -0.000001 -1.000000
+ *MESH_VERTEXNORMAL 158 0.000001 -0.000001 -1.000000
+ *MESH_FACENORMAL 231 -0.000000 -0.000002 -1.000000
+ *MESH_VERTEXNORMAL 153 0.000000 -0.000004 -1.000000
+ *MESH_VERTEXNORMAL 160 -0.000000 -0.000007 -1.000000
+ *MESH_VERTEXNORMAL 159 0.000001 -0.000001 -1.000000
+ *MESH_FACENORMAL 232 -0.000000 -0.000012 -1.000000
+ *MESH_VERTEXNORMAL 153 0.000000 -0.000004 -1.000000
+ *MESH_VERTEXNORMAL 161 -0.000003 -0.000008 -1.000000
+ *MESH_VERTEXNORMAL 160 -0.000000 -0.000007 -1.000000
+ *MESH_FACENORMAL 233 -0.000006 -0.000005 -1.000000
+ *MESH_VERTEXNORMAL 153 0.000000 -0.000004 -1.000000
+ *MESH_VERTEXNORMAL 162 -0.000004 -0.000005 -1.000000
+ *MESH_VERTEXNORMAL 161 -0.000003 -0.000008 -1.000000
+ *MESH_FACENORMAL 234 -0.000002 -0.000006 -1.000000
+ *MESH_VERTEXNORMAL 153 0.000000 -0.000004 -1.000000
+ *MESH_VERTEXNORMAL 163 0.000000 -0.000006 -1.000000
+ *MESH_VERTEXNORMAL 162 -0.000004 -0.000005 -1.000000
+ *MESH_FACENORMAL 235 0.000002 -0.000006 -1.000000
+ *MESH_VERTEXNORMAL 153 0.000000 -0.000004 -1.000000
+ *MESH_VERTEXNORMAL 164 0.000004 -0.000005 -1.000000
+ *MESH_VERTEXNORMAL 163 0.000000 -0.000006 -1.000000
+ *MESH_FACENORMAL 236 0.000006 -0.000005 -1.000000
+ *MESH_VERTEXNORMAL 153 0.000000 -0.000004 -1.000000
+ *MESH_VERTEXNORMAL 165 0.000003 -0.000008 -1.000000
+ *MESH_VERTEXNORMAL 164 0.000004 -0.000005 -1.000000
+ *MESH_FACENORMAL 237 0.000000 -0.000012 -1.000000
+ *MESH_VERTEXNORMAL 153 0.000000 -0.000004 -1.000000
+ *MESH_VERTEXNORMAL 155 0.000000 -0.000006 -1.000000
+ *MESH_VERTEXNORMAL 165 0.000003 -0.000008 -1.000000
+ *MESH_FACENORMAL 238 0.998938 0.033933 0.031162
+ *MESH_VERTEXNORMAL 166 0.953968 0.299723 0.010580
+ *MESH_VERTEXNORMAL 167 0.999526 -0.008677 0.029532
+ *MESH_VERTEXNORMAL 155 0.990828 0.133448 0.021241
+ *MESH_FACENORMAL 239 0.908759 0.417321 -0.000000
+ *MESH_VERTEXNORMAL 166 0.953968 0.299723 0.010580
+ *MESH_VERTEXNORMAL 155 0.990828 0.133448 0.021241
+ *MESH_VERTEXNORMAL 154 0.904340 0.426813 -0.000000
+ *MESH_FACENORMAL 240 0.902093 0.431541 -0.000000
+ *MESH_VERTEXNORMAL 168 0.768411 0.639956 -0.000000
+ *MESH_VERTEXNORMAL 166 0.953968 0.299723 0.010580
+ *MESH_VERTEXNORMAL 154 0.904340 0.426813 -0.000000
+ *MESH_FACENORMAL 241 0.902093 0.431541 -0.000000
+ *MESH_VERTEXNORMAL 168 0.768411 0.639956 -0.000000
+ *MESH_VERTEXNORMAL 154 0.904340 0.426813 -0.000000
+ *MESH_VERTEXNORMAL 156 0.573606 0.819131 -0.000000
+ *MESH_FACENORMAL 242 0.354762 0.934957 -0.000000
+ *MESH_VERTEXNORMAL 169 0.125481 0.992096 -0.000000
+ *MESH_VERTEXNORMAL 168 0.768411 0.639956 -0.000000
+ *MESH_VERTEXNORMAL 156 0.573606 0.819131 -0.000000
+ *MESH_FACENORMAL 243 0.354763 0.934956 -0.000000
+ *MESH_VERTEXNORMAL 169 0.125481 0.992096 -0.000000
+ *MESH_VERTEXNORMAL 156 0.573606 0.819131 -0.000000
+ *MESH_VERTEXNORMAL 157 -0.125481 0.992096 -0.000000
+ *MESH_FACENORMAL 244 -0.354762 0.934957 0.000000
+ *MESH_VERTEXNORMAL 170 -0.573606 0.819132 0.000000
+ *MESH_VERTEXNORMAL 169 0.125481 0.992096 -0.000000
+ *MESH_VERTEXNORMAL 157 -0.125481 0.992096 -0.000000
+ *MESH_FACENORMAL 245 -0.354762 0.934956 0.000000
+ *MESH_VERTEXNORMAL 170 -0.573606 0.819132 0.000000
+ *MESH_VERTEXNORMAL 157 -0.125481 0.992096 -0.000000
+ *MESH_VERTEXNORMAL 158 -0.768411 0.639956 -0.000000
+ *MESH_FACENORMAL 246 -0.902093 0.431541 0.000000
+ *MESH_VERTEXNORMAL 171 -0.952436 0.304738 -0.000000
+ *MESH_VERTEXNORMAL 170 -0.573606 0.819132 0.000000
+ *MESH_VERTEXNORMAL 158 -0.768411 0.639956 -0.000000
+ *MESH_FACENORMAL 247 -0.902093 0.431541 -0.000000
+ *MESH_VERTEXNORMAL 171 -0.952436 0.304738 -0.000000
+ *MESH_VERTEXNORMAL 158 -0.768411 0.639956 -0.000000
+ *MESH_VERTEXNORMAL 159 -0.953995 0.299667 0.009621
+ *MESH_FACENORMAL 248 -0.999424 0.033950 -0.000000
+ *MESH_VERTEXNORMAL 172 -0.987974 0.153294 0.020225
+ *MESH_VERTEXNORMAL 171 -0.952436 0.304738 -0.000000
+ *MESH_VERTEXNORMAL 159 -0.953995 0.299667 0.009621
+ *MESH_FACENORMAL 249 -0.908395 0.417153 0.028337
+ *MESH_VERTEXNORMAL 172 -0.987974 0.153294 0.020225
+ *MESH_VERTEXNORMAL 159 -0.953995 0.299667 0.009621
+ *MESH_VERTEXNORMAL 160 -0.992104 0.121957 0.029265
+ *MESH_FACENORMAL 250 -0.999514 -0.000002 0.031180
+ *MESH_VERTEXNORMAL 173 -0.993669 -0.108865 0.027744
+ *MESH_VERTEXNORMAL 172 -0.987974 0.153294 0.020225
+ *MESH_VERTEXNORMAL 160 -0.992104 0.121957 0.029265
+ *MESH_FACENORMAL 251 -0.997858 -0.059951 0.026197
+ *MESH_VERTEXNORMAL 173 -0.993669 -0.108865 0.027744
+ *MESH_VERTEXNORMAL 160 -0.992104 0.121957 0.029265
+ *MESH_VERTEXNORMAL 161 -0.951066 -0.308475 0.017810
+ *MESH_FACENORMAL 252 -0.964054 -0.264496 0.025310
+ *MESH_VERTEXNORMAL 174 -0.904103 -0.427113 0.013118
+ *MESH_VERTEXNORMAL 173 -0.993669 -0.108865 0.027744
+ *MESH_VERTEXNORMAL 161 -0.951066 -0.308475 0.017810
+ *MESH_FACENORMAL 253 -0.816859 -0.576837 0.000530
+ *MESH_VERTEXNORMAL 174 -0.904103 -0.427113 0.013118
+ *MESH_VERTEXNORMAL 161 -0.951066 -0.308475 0.017810
+ *MESH_VERTEXNORMAL 162 -0.583703 -0.811911 0.009550
+ *MESH_FACENORMAL 254 0.000000 -1.000000 0.000918
+ *MESH_VERTEXNORMAL 175 -0.096410 -0.995265 0.012359
+ *MESH_VERTEXNORMAL 174 0.000000 -1.000000 0.000918
+ *MESH_VERTEXNORMAL 162 -0.144787 -0.989419 0.009318
+ *MESH_FACENORMAL 255 -0.286512 -0.957916 0.017522
+ *MESH_VERTEXNORMAL 175 -0.096410 -0.995265 0.012359
+ *MESH_VERTEXNORMAL 162 -0.399114 -0.916876 0.006862
+ *MESH_VERTEXNORMAL 163 0.000015 -0.999921 0.012582
+ *MESH_FACENORMAL 256 0.000000 -0.999833 0.018289
+ *MESH_VERTEXNORMAL 176 0.144810 -0.989412 0.009687
+ *MESH_VERTEXNORMAL 175 -0.096410 -0.995265 0.012359
+ *MESH_VERTEXNORMAL 163 0.000015 -0.999921 0.012582
+ *MESH_FACENORMAL 257 0.286556 -0.958063 0.000880
+ *MESH_VERTEXNORMAL 176 0.144810 -0.989412 0.009687
+ *MESH_VERTEXNORMAL 163 0.000015 -0.999921 0.012582
+ *MESH_VERTEXNORMAL 164 0.583635 -0.811930 0.011808
+ *MESH_FACENORMAL 258 0.964363 -0.264581 0.000243
+ *MESH_VERTEXNORMAL 177 0.957023 -0.289544 0.016495
+ *MESH_VERTEXNORMAL 176 0.964363 -0.264581 0.000243
+ *MESH_VERTEXNORMAL 164 0.904147 -0.427081 0.011008
+ *MESH_FACENORMAL 259 0.816671 -0.576704 0.021440
+ *MESH_VERTEXNORMAL 177 0.957023 -0.289544 0.016495
+ *MESH_VERTEXNORMAL 164 0.754319 -0.656456 0.008232
+ *MESH_VERTEXNORMAL 165 0.974986 -0.220581 0.027305
+ *MESH_FACENORMAL 260 0.999656 -0.000002 0.026244
+ *MESH_VERTEXNORMAL 167 0.999526 -0.008677 0.029532
+ *MESH_VERTEXNORMAL 177 0.957023 -0.289544 0.016495
+ *MESH_VERTEXNORMAL 165 0.974986 -0.220581 0.027305
+ *MESH_FACENORMAL 261 0.997716 -0.059944 0.031124
+ *MESH_VERTEXNORMAL 167 0.999526 -0.008677 0.029532
+ *MESH_VERTEXNORMAL 165 0.974986 -0.220581 0.027305
+ *MESH_VERTEXNORMAL 155 0.990828 0.133448 0.021241
+ *MESH_FACENORMAL 262 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 178 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 179 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 180 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 263 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 179 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 181 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 180 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 264 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 179 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 182 -1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 181 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 265 -1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 182 -1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 183 -1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 181 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 266 -1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 182 -1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 184 -1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 183 -1.000000 -0.000000 0.000000
+ *MESH_FACENORMAL 267 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 184 -1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 185 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 183 -1.000000 -0.000000 0.000000
+ *MESH_FACENORMAL 268 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 186 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 187 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 188 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 269 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 188 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 187 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 189 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 270 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 188 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 189 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 190 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 271 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 190 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 189 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 191 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 272 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 190 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 191 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 192 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 273 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 192 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 191 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 193 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 274 0.000000 -0.276644 0.960973
+ *MESH_VERTEXNORMAL 190 0.000000 -0.302730 0.953076
+ *MESH_VERTEXNORMAL 184 0.000000 -0.276644 0.960973
+ *MESH_VERTEXNORMAL 182 0.000000 -0.328610 0.944466
+ *MESH_FACENORMAL 275 0.000000 -0.276644 0.960973
+ *MESH_VERTEXNORMAL 190 0.000000 -0.302730 0.953076
+ *MESH_VERTEXNORMAL 192 0.000000 -0.276644 0.960973
+ *MESH_VERTEXNORMAL 184 0.000000 -0.276644 0.960973
+ *MESH_FACENORMAL 276 0.000000 -0.354227 0.935159
+ *MESH_VERTEXNORMAL 188 0.000000 -0.385664 0.922639
+ *MESH_VERTEXNORMAL 182 0.000000 -0.328610 0.944466
+ *MESH_VERTEXNORMAL 179 0.000000 -0.416696 0.909046
+ *MESH_FACENORMAL 277 0.000000 -0.354227 0.935160
+ *MESH_VERTEXNORMAL 188 0.000000 -0.385664 0.922639
+ *MESH_VERTEXNORMAL 190 0.000000 -0.302730 0.953076
+ *MESH_VERTEXNORMAL 182 0.000000 -0.328610 0.944466
+ *MESH_FACENORMAL 278 0.000000 -0.447214 0.894427
+ *MESH_VERTEXNORMAL 186 0.000000 -0.447214 0.894427
+ *MESH_VERTEXNORMAL 179 0.000000 -0.416696 0.909046
+ *MESH_VERTEXNORMAL 178 0.000000 -0.447214 0.894427
+ *MESH_FACENORMAL 279 0.000000 -0.447214 0.894427
+ *MESH_VERTEXNORMAL 186 0.000000 -0.447214 0.894427
+ *MESH_VERTEXNORMAL 188 0.000000 -0.385664 0.922639
+ *MESH_VERTEXNORMAL 179 0.000000 -0.416696 0.909046
+ *MESH_FACENORMAL 280 0.000000 -0.825307 -0.564684
+ *MESH_VERTEXNORMAL 187 0.000000 -0.825307 -0.564684
+ *MESH_VERTEXNORMAL 178 0.000000 -0.825307 -0.564684
+ *MESH_VERTEXNORMAL 180 0.000000 -0.825307 -0.564684
+ *MESH_FACENORMAL 281 0.000000 -0.825307 -0.564684
+ *MESH_VERTEXNORMAL 187 0.000000 -0.825307 -0.564684
+ *MESH_VERTEXNORMAL 186 0.000000 -0.825307 -0.564684
+ *MESH_VERTEXNORMAL 178 0.000000 -0.825307 -0.564684
+ *MESH_FACENORMAL 282 0.000000 0.466239 -0.884659
+ *MESH_VERTEXNORMAL 189 0.000000 0.430815 -0.902440
+ *MESH_VERTEXNORMAL 180 0.000000 0.466239 -0.884659
+ *MESH_VERTEXNORMAL 181 0.000000 0.394657 -0.918828
+ *MESH_FACENORMAL 283 0.000000 0.466239 -0.884659
+ *MESH_VERTEXNORMAL 189 0.000000 0.430815 -0.902440
+ *MESH_VERTEXNORMAL 187 0.000000 0.466239 -0.884659
+ *MESH_VERTEXNORMAL 180 0.000000 0.466239 -0.884659
+ *MESH_FACENORMAL 284 0.000000 0.357936 -0.933746
+ *MESH_VERTEXNORMAL 191 0.000000 0.310011 -0.950733
+ *MESH_VERTEXNORMAL 181 0.000000 0.394657 -0.918828
+ *MESH_VERTEXNORMAL 183 0.000000 0.261157 -0.965296
+ *MESH_FACENORMAL 285 0.000000 0.357936 -0.933746
+ *MESH_VERTEXNORMAL 191 0.000000 0.310011 -0.950733
+ *MESH_VERTEXNORMAL 189 0.000000 0.430815 -0.902440
+ *MESH_VERTEXNORMAL 181 0.000000 0.394657 -0.918828
+ *MESH_FACENORMAL 286 0.000000 0.211753 -0.977323
+ *MESH_VERTEXNORMAL 193 0.000000 0.211753 -0.977323
+ *MESH_VERTEXNORMAL 183 0.000000 0.261157 -0.965296
+ *MESH_VERTEXNORMAL 185 0.000000 0.211753 -0.977323
+ *MESH_FACENORMAL 287 0.000000 0.211753 -0.977323
+ *MESH_VERTEXNORMAL 193 0.000000 0.211753 -0.977323
+ *MESH_VERTEXNORMAL 191 0.000000 0.310011 -0.950733
+ *MESH_VERTEXNORMAL 183 0.000000 0.261157 -0.965296
+ *MESH_FACENORMAL 288 -0.000032 -0.999114 -0.042080
+ *MESH_VERTEXNORMAL 194 -0.000016 -0.999116 -0.042049
+ *MESH_VERTEXNORMAL 195 -0.000016 -0.999116 -0.042049
+ *MESH_VERTEXNORMAL 196 -0.000032 -0.999114 -0.042080
+ *MESH_FACENORMAL 289 -0.000000 -0.999117 -0.042019
+ *MESH_VERTEXNORMAL 194 -0.000016 -0.999116 -0.042049
+ *MESH_VERTEXNORMAL 197 -0.000000 -0.999117 -0.042019
+ *MESH_VERTEXNORMAL 195 -0.000016 -0.999116 -0.042049
+ *MESH_FACENORMAL 290 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 198 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 196 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 195 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 291 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 198 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 199 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 196 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 292 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 198 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 200 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 199 -1.000000 0.000000 -0.000000
+ *MESH_FACENORMAL 293 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 198 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 201 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 200 -1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 294 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 198 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 202 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 201 -1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 295 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 203 1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 197 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 194 1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 296 1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 203 1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 194 1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 204 1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 297 1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 203 1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 204 1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 205 1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 298 1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 203 1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 205 1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 206 1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 299 1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 203 1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 206 1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 207 1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 300 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 204 -0.000003 0.000002 -1.000000
+ *MESH_VERTEXNORMAL 196 -0.000003 0.000002 -1.000000
+ *MESH_VERTEXNORMAL 199 0.000000 0.000000 -1.000000
+ *MESH_FACENORMAL 301 -0.000006 0.000003 -1.000000
+ *MESH_VERTEXNORMAL 204 -0.000003 0.000002 -1.000000
+ *MESH_VERTEXNORMAL 194 -0.000006 0.000003 -1.000000
+ *MESH_VERTEXNORMAL 196 -0.000003 0.000002 -1.000000
+ *MESH_FACENORMAL 302 0.000000 1.000000 -0.000461
+ *MESH_VERTEXNORMAL 205 0.000000 1.000000 -0.000461
+ *MESH_VERTEXNORMAL 199 0.000000 1.000000 -0.000461
+ *MESH_VERTEXNORMAL 200 0.000000 1.000000 -0.000461
+ *MESH_FACENORMAL 303 0.000000 1.000000 -0.000461
+ *MESH_VERTEXNORMAL 205 0.000000 1.000000 -0.000461
+ *MESH_VERTEXNORMAL 204 0.000000 1.000000 -0.000461
+ *MESH_VERTEXNORMAL 199 0.000000 1.000000 -0.000461
+ *MESH_FACENORMAL 304 0.000000 0.469366 0.883004
+ *MESH_VERTEXNORMAL 206 0.000000 0.321416 0.946938
+ *MESH_VERTEXNORMAL 200 0.000000 0.469366 0.883004
+ *MESH_VERTEXNORMAL 201 0.000000 0.160773 0.986991
+ *MESH_FACENORMAL 305 0.000000 0.469366 0.883004
+ *MESH_VERTEXNORMAL 206 0.000000 0.321416 0.946938
+ *MESH_VERTEXNORMAL 205 0.000000 0.469366 0.883004
+ *MESH_VERTEXNORMAL 200 0.000000 0.469366 0.883004
+ *MESH_FACENORMAL 306 0.000000 0.000126 1.000000
+ *MESH_VERTEXNORMAL 207 0.000000 -0.152659 0.988279
+ *MESH_VERTEXNORMAL 201 0.000000 0.160773 0.986991
+ *MESH_VERTEXNORMAL 202 0.000000 -0.305447 0.952209
+ *MESH_FACENORMAL 307 0.000000 0.000126 1.000000
+ *MESH_VERTEXNORMAL 207 0.000000 -0.152659 0.988279
+ *MESH_VERTEXNORMAL 206 0.000000 0.321416 0.946938
+ *MESH_VERTEXNORMAL 201 0.000000 0.160773 0.986991
+ *MESH_FACENORMAL 308 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 208 -0.998302 -0.058176 -0.002930
+ *MESH_VERTEXNORMAL 209 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 210 -0.999617 0.006676 -0.026858
+ *MESH_FACENORMAL 309 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 208 -0.998302 -0.058176 -0.002930
+ *MESH_VERTEXNORMAL 211 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 209 -1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 310 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 208 -0.998302 -0.058176 -0.002930
+ *MESH_VERTEXNORMAL 212 -0.984294 -0.176523 -0.002156
+ *MESH_VERTEXNORMAL 211 -1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 311 -0.972762 -0.231514 -0.011659
+ *MESH_VERTEXNORMAL 208 -0.998302 -0.058176 -0.002930
+ *MESH_VERTEXNORMAL 213 -0.980251 -0.197603 0.007866
+ *MESH_VERTEXNORMAL 212 -0.984294 -0.176523 -0.002156
+ *MESH_FACENORMAL 312 -0.955880 -0.293709 0.005245
+ *MESH_VERTEXNORMAL 213 -0.980251 -0.197603 0.007866
+ *MESH_VERTEXNORMAL 214 -0.883262 -0.467967 0.029257
+ *MESH_VERTEXNORMAL 212 -0.984294 -0.176523 -0.002156
+ *MESH_FACENORMAL 313 -0.778655 -0.625276 0.052209
+ *MESH_VERTEXNORMAL 213 -0.980251 -0.197603 0.007866
+ *MESH_VERTEXNORMAL 215 -0.943042 -0.331521 0.027681
+ *MESH_VERTEXNORMAL 214 -0.883262 -0.467967 0.029257
+ *MESH_FACENORMAL 314 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 213 -0.980251 -0.197603 0.007866
+ *MESH_VERTEXNORMAL 216 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 215 -0.943042 -0.331521 0.027681
+ *MESH_FACENORMAL 315 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 213 -0.980251 -0.197603 0.007866
+ *MESH_VERTEXNORMAL 198 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 216 -1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 316 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 209 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 217 -0.993845 0.085671 -0.070226
+ *MESH_VERTEXNORMAL 210 -0.999617 0.006676 -0.026858
+ *MESH_FACENORMAL 317 -0.996553 0.020012 -0.080512
+ *MESH_VERTEXNORMAL 217 -0.993845 0.085671 -0.070226
+ *MESH_VERTEXNORMAL 218 -0.986126 0.128377 -0.105233
+ *MESH_VERTEXNORMAL 210 -0.999617 0.006676 -0.026858
+ *MESH_FACENORMAL 318 -0.963410 0.235142 -0.128643
+ *MESH_VERTEXNORMAL 217 -0.993845 0.085671 -0.070226
+ *MESH_VERTEXNORMAL 219 -0.963410 0.235142 -0.128643
+ *MESH_VERTEXNORMAL 218 -0.986126 0.128377 -0.105233
+ *MESH_FACENORMAL 319 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 213 -0.980251 -0.197603 0.007866
+ *MESH_VERTEXNORMAL 220 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 198 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 320 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 220 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 221 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 198 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 321 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 221 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 202 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 198 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 322 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 222 0.998302 -0.058176 -0.002930
+ *MESH_VERTEXNORMAL 223 0.999617 0.006676 -0.026858
+ *MESH_VERTEXNORMAL 224 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 323 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 222 0.998302 -0.058176 -0.002930
+ *MESH_VERTEXNORMAL 224 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 225 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 324 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 222 0.998302 -0.058176 -0.002930
+ *MESH_VERTEXNORMAL 225 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 226 0.984294 -0.176523 -0.002156
+ *MESH_FACENORMAL 325 0.972762 -0.231514 -0.011659
+ *MESH_VERTEXNORMAL 222 0.998302 -0.058176 -0.002930
+ *MESH_VERTEXNORMAL 226 0.984294 -0.176523 -0.002156
+ *MESH_VERTEXNORMAL 227 0.980251 -0.197603 0.007866
+ *MESH_FACENORMAL 326 0.955880 -0.293709 0.005245
+ *MESH_VERTEXNORMAL 227 0.980251 -0.197603 0.007866
+ *MESH_VERTEXNORMAL 226 0.984294 -0.176523 -0.002156
+ *MESH_VERTEXNORMAL 228 0.883262 -0.467967 0.029257
+ *MESH_FACENORMAL 327 0.778655 -0.625276 0.052209
+ *MESH_VERTEXNORMAL 227 0.980251 -0.197603 0.007866
+ *MESH_VERTEXNORMAL 228 0.883262 -0.467967 0.029257
+ *MESH_VERTEXNORMAL 229 0.943042 -0.331521 0.027681
+ *MESH_FACENORMAL 328 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 227 0.980251 -0.197603 0.007866
+ *MESH_VERTEXNORMAL 229 0.943042 -0.331521 0.027681
+ *MESH_VERTEXNORMAL 230 1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 329 1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 227 0.980251 -0.197603 0.007866
+ *MESH_VERTEXNORMAL 230 1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 203 1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 330 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 224 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 223 0.999617 0.006676 -0.026858
+ *MESH_VERTEXNORMAL 231 0.993845 0.085671 -0.070226
+ *MESH_FACENORMAL 331 0.996553 0.020012 -0.080512
+ *MESH_VERTEXNORMAL 231 0.993845 0.085671 -0.070226
+ *MESH_VERTEXNORMAL 223 0.999617 0.006676 -0.026858
+ *MESH_VERTEXNORMAL 232 0.986126 0.128377 -0.105233
+ *MESH_FACENORMAL 332 0.963410 0.235142 -0.128643
+ *MESH_VERTEXNORMAL 231 0.993845 0.085671 -0.070226
+ *MESH_VERTEXNORMAL 232 0.986126 0.128377 -0.105233
+ *MESH_VERTEXNORMAL 233 0.963410 0.235142 -0.128643
+ *MESH_FACENORMAL 333 1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 227 0.980251 -0.197603 0.007866
+ *MESH_VERTEXNORMAL 203 1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 234 1.000000 -0.000000 0.000000
+ *MESH_FACENORMAL 334 1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 234 1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 203 1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 235 1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 335 1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 235 1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 203 1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 207 1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 336 0.000000 -0.447343 0.894363
+ *MESH_VERTEXNORMAL 235 0.000000 -0.447343 0.894362
+ *MESH_VERTEXNORMAL 202 0.000000 -0.305447 0.952209
+ *MESH_VERTEXNORMAL 221 0.000000 -0.447343 0.894362
+ *MESH_FACENORMAL 337 0.000000 -0.447343 0.894362
+ *MESH_VERTEXNORMAL 235 0.000000 -0.447343 0.894362
+ *MESH_VERTEXNORMAL 207 0.000000 -0.152659 0.988279
+ *MESH_VERTEXNORMAL 202 0.000000 -0.305447 0.952209
+ *MESH_FACENORMAL 338 0.000000 -0.999995 0.003212
+ *MESH_VERTEXNORMAL 234 0.000000 -0.967155 0.254188
+ *MESH_VERTEXNORMAL 221 0.000000 -0.999995 0.003212
+ *MESH_VERTEXNORMAL 220 0.000000 -0.863157 0.504935
+ *MESH_FACENORMAL 339 0.000000 -0.999995 0.003212
+ *MESH_VERTEXNORMAL 234 0.000000 -0.967155 0.254188
+ *MESH_VERTEXNORMAL 235 0.000000 -0.999995 0.003212
+ *MESH_VERTEXNORMAL 221 0.000000 -0.999995 0.003212
+ *MESH_FACENORMAL 340 0.000000 -0.708728 0.705482
+ *MESH_VERTEXNORMAL 227 0.000000 -0.543006 0.839729
+ *MESH_VERTEXNORMAL 220 0.000000 -0.863157 0.504935
+ *MESH_VERTEXNORMAL 213 0.000000 -0.342623 0.939473
+ *MESH_FACENORMAL 341 0.000000 -0.708728 0.705482
+ *MESH_VERTEXNORMAL 227 0.000000 -0.543006 0.839729
+ *MESH_VERTEXNORMAL 234 0.000000 -0.967155 0.254188
+ *MESH_VERTEXNORMAL 220 0.000000 -0.863157 0.504935
+ *MESH_FACENORMAL 342 0.000000 -0.135608 0.990763
+ *MESH_VERTEXNORMAL 222 -0.000000 0.062456 0.998048
+ *MESH_VERTEXNORMAL 213 0.000000 -0.342623 0.939473
+ *MESH_VERTEXNORMAL 208 -0.000000 0.266189 0.963921
+ *MESH_FACENORMAL 343 0.000000 -0.135608 0.990763
+ *MESH_VERTEXNORMAL 222 -0.000000 0.062456 0.998048
+ *MESH_VERTEXNORMAL 227 0.000000 -0.543006 0.839729
+ *MESH_VERTEXNORMAL 213 0.000000 -0.342623 0.939473
+ *MESH_FACENORMAL 344 0.000000 0.451068 0.892490
+ *MESH_VERTEXNORMAL 223 -0.000000 0.487426 0.873164
+ *MESH_VERTEXNORMAL 208 -0.000000 0.266189 0.963921
+ *MESH_VERTEXNORMAL 210 0.000000 0.523019 0.852321
+ *MESH_FACENORMAL 345 -0.000000 0.451068 0.892490
+ *MESH_VERTEXNORMAL 223 -0.000000 0.487426 0.873164
+ *MESH_VERTEXNORMAL 222 -0.000000 0.062456 0.998048
+ *MESH_VERTEXNORMAL 208 -0.000000 0.266189 0.963921
+ *MESH_FACENORMAL 346 0.000000 0.557663 0.830068
+ *MESH_VERTEXNORMAL 232 0.000000 0.557663 0.830068
+ *MESH_VERTEXNORMAL 210 0.000000 0.523019 0.852321
+ *MESH_VERTEXNORMAL 218 0.000000 0.557663 0.830068
+ *MESH_FACENORMAL 347 0.000000 0.557663 0.830068
+ *MESH_VERTEXNORMAL 232 0.000000 0.557663 0.830068
+ *MESH_VERTEXNORMAL 223 -0.000000 0.487426 0.873164
+ *MESH_VERTEXNORMAL 210 0.000000 0.523019 0.852321
+ *MESH_FACENORMAL 348 0.000000 -0.877294 0.479954
+ *MESH_VERTEXNORMAL 233 0.000000 -0.877294 0.479954
+ *MESH_VERTEXNORMAL 218 0.000000 -0.877294 0.479954
+ *MESH_VERTEXNORMAL 219 0.000000 -0.877294 0.479954
+ *MESH_FACENORMAL 349 0.000000 -0.877294 0.479954
+ *MESH_VERTEXNORMAL 233 0.000000 -0.877294 0.479954
+ *MESH_VERTEXNORMAL 232 0.000000 -0.877294 0.479954
+ *MESH_VERTEXNORMAL 218 0.000000 -0.877294 0.479954
+ *MESH_FACENORMAL 350 0.000000 -0.115313 -0.993329
+ *MESH_VERTEXNORMAL 231 0.000000 -0.224387 -0.974500
+ *MESH_VERTEXNORMAL 219 0.000000 -0.115313 -0.993329
+ *MESH_VERTEXNORMAL 217 0.000000 -0.332022 -0.943272
+ *MESH_FACENORMAL 351 0.000000 -0.115313 -0.993329
+ *MESH_VERTEXNORMAL 231 0.000000 -0.224387 -0.974500
+ *MESH_VERTEXNORMAL 233 0.000000 -0.115313 -0.993329
+ *MESH_VERTEXNORMAL 219 0.000000 -0.115313 -0.993329
+ *MESH_FACENORMAL 352 0.000000 -0.434236 -0.900799
+ *MESH_VERTEXNORMAL 224 0.000000 -0.538970 -0.842325
+ *MESH_VERTEXNORMAL 217 0.000000 -0.332022 -0.943272
+ *MESH_VERTEXNORMAL 209 0.000000 -0.637316 -0.770602
+ *MESH_FACENORMAL 353 0.000000 -0.434236 -0.900799
+ *MESH_VERTEXNORMAL 224 0.000000 -0.538970 -0.842325
+ *MESH_VERTEXNORMAL 231 0.000000 -0.224387 -0.974500
+ *MESH_VERTEXNORMAL 217 0.000000 -0.332022 -0.943272
+ *MESH_FACENORMAL 354 0.000000 -0.725000 -0.688749
+ *MESH_VERTEXNORMAL 225 0.000000 -0.611110 -0.791546
+ *MESH_VERTEXNORMAL 209 0.000000 -0.637316 -0.770602
+ *MESH_VERTEXNORMAL 211 0.000000 -0.479523 -0.877530
+ *MESH_FACENORMAL 355 0.000000 -0.725000 -0.688749
+ *MESH_VERTEXNORMAL 225 0.000000 -0.611110 -0.791546
+ *MESH_VERTEXNORMAL 224 0.000000 -0.538970 -0.842325
+ *MESH_VERTEXNORMAL 209 0.000000 -0.637316 -0.770602
+ *MESH_FACENORMAL 356 0.000000 -0.339644 -0.940554
+ *MESH_VERTEXNORMAL 226 0.000000 -0.339644 -0.940554
+ *MESH_VERTEXNORMAL 211 0.000000 -0.479523 -0.877530
+ *MESH_VERTEXNORMAL 212 0.000000 -0.339644 -0.940554
+ *MESH_FACENORMAL 357 0.000000 -0.339644 -0.940554
+ *MESH_VERTEXNORMAL 226 0.000000 -0.339644 -0.940554
+ *MESH_VERTEXNORMAL 225 0.000000 -0.611110 -0.791546
+ *MESH_VERTEXNORMAL 211 0.000000 -0.479523 -0.877530
+ *MESH_FACENORMAL 358 -0.000000 -0.999841 0.017854
+ *MESH_VERTEXNORMAL 228 -0.000000 -0.999565 -0.029508
+ *MESH_VERTEXNORMAL 212 0.000000 -0.999841 0.017854
+ *MESH_VERTEXNORMAL 214 -0.000000 -0.997038 -0.076911
+ *MESH_FACENORMAL 359 0.000000 -0.999841 0.017854
+ *MESH_VERTEXNORMAL 228 -0.000000 -0.999565 -0.029508
+ *MESH_VERTEXNORMAL 226 0.000000 -0.999841 0.017854
+ *MESH_VERTEXNORMAL 212 0.000000 -0.999841 0.017854
+ *MESH_FACENORMAL 360 0.000000 -0.992278 -0.124035
+ *MESH_VERTEXNORMAL 229 -0.000000 -0.974251 -0.225466
+ *MESH_VERTEXNORMAL 214 -0.000000 -0.997038 -0.076911
+ *MESH_VERTEXNORMAL 215 0.000000 -0.945521 -0.325560
+ *MESH_FACENORMAL 361 -0.000000 -0.992278 -0.124035
+ *MESH_VERTEXNORMAL 229 -0.000000 -0.974251 -0.225466
+ *MESH_VERTEXNORMAL 228 -0.000000 -0.999565 -0.029508
+ *MESH_VERTEXNORMAL 214 -0.000000 -0.997038 -0.076911
+ *MESH_FACENORMAL 362 0.000000 -0.907009 -0.421111
+ *MESH_VERTEXNORMAL 230 0.000000 -0.907009 -0.421111
+ *MESH_VERTEXNORMAL 215 0.000000 -0.945521 -0.325560
+ *MESH_VERTEXNORMAL 216 0.000000 -0.907009 -0.421111
+ *MESH_FACENORMAL 363 0.000000 -0.907009 -0.421111
+ *MESH_VERTEXNORMAL 230 0.000000 -0.907009 -0.421111
+ *MESH_VERTEXNORMAL 229 -0.000000 -0.974251 -0.225466
+ *MESH_VERTEXNORMAL 215 0.000000 -0.945521 -0.325560
+ *MESH_FACENORMAL 364 0.000000 0.088932 -0.996038
+ *MESH_VERTEXNORMAL 203 0.000000 0.088932 -0.996038
+ *MESH_VERTEXNORMAL 216 0.000000 0.088932 -0.996038
+ *MESH_VERTEXNORMAL 198 0.000000 0.088932 -0.996038
+ *MESH_FACENORMAL 365 0.000000 0.088932 -0.996038
+ *MESH_VERTEXNORMAL 203 0.000000 0.088932 -0.996038
+ *MESH_VERTEXNORMAL 230 0.000000 0.088932 -0.996038
+ *MESH_VERTEXNORMAL 216 0.000000 0.088932 -0.996038
+ }
+ *MESH_NUMTVERTEX 1098
+ *MESH_TVERTLIST {
+ *MESH_TVERT 0 0.905328 0.485217 0.000000
+ *MESH_TVERT 1 0.851626 0.471364 0.000000
+ *MESH_TVERT 2 0.925112 0.469824 0.000000
+ *MESH_TVERT 3 0.851626 0.471364 0.000000
+ *MESH_TVERT 4 0.851626 0.371312 0.000000
+ *MESH_TVERT 5 0.925112 0.469824 0.000000
+ *MESH_TVERT 6 0.851626 0.371312 0.000000
+ *MESH_TVERT 7 0.878477 0.325135 0.000000
+ *MESH_TVERT 8 0.925112 0.469824 0.000000
+ *MESH_TVERT 9 0.878477 0.325135 0.000000
+ *MESH_TVERT 10 0.926526 0.325135 0.000000
+ *MESH_TVERT 11 0.925112 0.469824 0.000000
+ *MESH_TVERT 12 0.878477 0.325135 0.000000
+ *MESH_TVERT 13 0.954790 0.208152 0.000000
+ *MESH_TVERT 14 0.926526 0.325135 0.000000
+ *MESH_TVERT 15 0.878477 0.325135 0.000000
+ *MESH_TVERT 16 0.932178 0.174289 0.000000
+ *MESH_TVERT 17 0.954790 0.208152 0.000000
+ *MESH_TVERT 18 0.905328 0.485217 0.000000
+ *MESH_TVERT 19 0.925112 0.469824 0.000000
+ *MESH_TVERT 20 0.851626 0.471364 0.000000
+ *MESH_TVERT 21 0.851626 0.471364 0.000000
+ *MESH_TVERT 22 0.925112 0.469824 0.000000
+ *MESH_TVERT 23 0.851626 0.371312 0.000000
+ *MESH_TVERT 24 0.851626 0.371312 0.000000
+ *MESH_TVERT 25 0.925112 0.469824 0.000000
+ *MESH_TVERT 26 0.878477 0.325135 0.000000
+ *MESH_TVERT 27 0.878477 0.325135 0.000000
+ *MESH_TVERT 28 0.925112 0.469824 0.000000
+ *MESH_TVERT 29 0.926526 0.325135 0.000000
+ *MESH_TVERT 30 0.878477 0.325135 0.000000
+ *MESH_TVERT 31 0.926526 0.325135 0.000000
+ *MESH_TVERT 32 0.954790 0.208152 0.000000
+ *MESH_TVERT 33 0.878477 0.325135 0.000000
+ *MESH_TVERT 34 0.954790 0.208152 0.000000
+ *MESH_TVERT 35 0.932178 0.174289 0.000000
+ *MESH_TVERT 36 0.851626 0.371312 0.000000
+ *MESH_TVERT 37 0.878477 0.325135 0.000000
+ *MESH_TVERT 38 0.851626 0.371312 0.000000
+ *MESH_TVERT 39 0.851626 0.371312 0.000000
+ *MESH_TVERT 40 0.878477 0.325135 0.000000
+ *MESH_TVERT 41 0.878477 0.325135 0.000000
+ *MESH_TVERT 42 0.851626 0.471364 0.000000
+ *MESH_TVERT 43 0.851626 0.371312 0.000000
+ *MESH_TVERT 44 0.851626 0.471364 0.000000
+ *MESH_TVERT 45 0.851626 0.471364 0.000000
+ *MESH_TVERT 46 0.851626 0.371312 0.000000
+ *MESH_TVERT 47 0.851626 0.371312 0.000000
+ *MESH_TVERT 48 0.905328 0.485217 0.000000
+ *MESH_TVERT 49 0.851626 0.471364 0.000000
+ *MESH_TVERT 50 0.905328 0.485217 0.000000
+ *MESH_TVERT 51 0.905328 0.485217 0.000000
+ *MESH_TVERT 52 0.851626 0.471364 0.000000
+ *MESH_TVERT 53 0.851626 0.471364 0.000000
+ *MESH_TVERT 54 0.925112 0.469824 0.000000
+ *MESH_TVERT 55 0.905328 0.485217 0.000000
+ *MESH_TVERT 56 0.925112 0.469824 0.000000
+ *MESH_TVERT 57 0.925112 0.469824 0.000000
+ *MESH_TVERT 58 0.905328 0.485217 0.000000
+ *MESH_TVERT 59 0.905328 0.485217 0.000000
+ *MESH_TVERT 60 0.926526 0.325135 0.000000
+ *MESH_TVERT 61 0.925112 0.469824 0.000000
+ *MESH_TVERT 62 0.926526 0.325135 0.000000
+ *MESH_TVERT 63 0.926526 0.325135 0.000000
+ *MESH_TVERT 64 0.925112 0.469824 0.000000
+ *MESH_TVERT 65 0.925112 0.469824 0.000000
+ *MESH_TVERT 66 0.954790 0.208152 0.000000
+ *MESH_TVERT 67 0.926526 0.325135 0.000000
+ *MESH_TVERT 68 0.954790 0.208152 0.000000
+ *MESH_TVERT 69 0.954790 0.208152 0.000000
+ *MESH_TVERT 70 0.926526 0.325135 0.000000
+ *MESH_TVERT 71 0.926526 0.325135 0.000000
+ *MESH_TVERT 72 0.932178 0.174289 0.000000
+ *MESH_TVERT 73 0.954790 0.208152 0.000000
+ *MESH_TVERT 74 0.932178 0.174289 0.000000
+ *MESH_TVERT 75 0.932178 0.174289 0.000000
+ *MESH_TVERT 76 0.954790 0.208152 0.000000
+ *MESH_TVERT 77 0.954790 0.208152 0.000000
+ *MESH_TVERT 78 0.878477 0.325135 0.000000
+ *MESH_TVERT 79 0.932178 0.174289 0.000000
+ *MESH_TVERT 80 0.878477 0.325135 0.000000
+ *MESH_TVERT 81 0.878477 0.325135 0.000000
+ *MESH_TVERT 82 0.932178 0.174289 0.000000
+ *MESH_TVERT 83 0.932178 0.174289 0.000000
+ *MESH_TVERT 84 0.855669 0.410771 0.000000
+ *MESH_TVERT 85 0.855669 0.445526 0.000000
+ *MESH_TVERT 86 0.822480 0.445526 0.000000
+ *MESH_TVERT 87 0.822480 0.445526 0.000000
+ *MESH_TVERT 88 0.822480 0.410771 0.000000
+ *MESH_TVERT 89 0.855669 0.410771 0.000000
+ *MESH_TVERT 90 0.855669 0.445526 0.000000
+ *MESH_TVERT 91 0.855669 0.445526 0.000000
+ *MESH_TVERT 92 0.822480 0.445526 0.000000
+ *MESH_TVERT 93 0.822480 0.445526 0.000000
+ *MESH_TVERT 94 0.822480 0.445526 0.000000
+ *MESH_TVERT 95 0.855669 0.445526 0.000000
+ *MESH_TVERT 96 0.855669 0.445526 0.000000
+ *MESH_TVERT 97 0.855669 0.410771 0.000000
+ *MESH_TVERT 98 0.822480 0.410771 0.000000
+ *MESH_TVERT 99 0.822480 0.410771 0.000000
+ *MESH_TVERT 100 0.822480 0.445526 0.000000
+ *MESH_TVERT 101 0.855669 0.445526 0.000000
+ *MESH_TVERT 102 0.855669 0.410771 0.000000
+ *MESH_TVERT 103 0.855669 0.410771 0.000000
+ *MESH_TVERT 104 0.822480 0.410771 0.000000
+ *MESH_TVERT 105 0.822480 0.410771 0.000000
+ *MESH_TVERT 106 0.822480 0.410771 0.000000
+ *MESH_TVERT 107 0.855669 0.410771 0.000000
+ *MESH_TVERT 108 0.113527 0.118357 0.000000
+ *MESH_TVERT 109 0.203079 0.170060 0.000000
+ *MESH_TVERT 110 0.216932 0.118357 0.000000
+ *MESH_TVERT 111 0.113527 0.118357 0.000000
+ *MESH_TVERT 112 0.165229 0.207910 0.000000
+ *MESH_TVERT 113 0.203079 0.170060 0.000000
+ *MESH_TVERT 114 0.113527 0.118357 0.000000
+ *MESH_TVERT 115 0.113527 0.221763 0.000000
+ *MESH_TVERT 116 0.165229 0.207910 0.000000
+ *MESH_TVERT 117 0.113527 0.118357 0.000000
+ *MESH_TVERT 118 0.061824 0.207910 0.000000
+ *MESH_TVERT 119 0.113527 0.221763 0.000000
+ *MESH_TVERT 120 0.113527 0.118357 0.000000
+ *MESH_TVERT 121 0.023975 0.170060 0.000000
+ *MESH_TVERT 122 0.061824 0.207910 0.000000
+ *MESH_TVERT 123 0.113527 0.118357 0.000000
+ *MESH_TVERT 124 0.010121 0.118358 0.000000
+ *MESH_TVERT 125 0.023975 0.170060 0.000000
+ *MESH_TVERT 126 0.113527 0.118357 0.000000
+ *MESH_TVERT 127 0.023974 0.066655 0.000000
+ *MESH_TVERT 128 0.010121 0.118358 0.000000
+ *MESH_TVERT 129 0.113527 0.118357 0.000000
+ *MESH_TVERT 130 0.061824 0.028805 0.000000
+ *MESH_TVERT 131 0.023974 0.066655 0.000000
+ *MESH_TVERT 132 0.113527 0.118357 0.000000
+ *MESH_TVERT 133 0.113526 0.014952 0.000000
+ *MESH_TVERT 134 0.061824 0.028805 0.000000
+ *MESH_TVERT 135 0.113527 0.118357 0.000000
+ *MESH_TVERT 136 0.165229 0.028805 0.000000
+ *MESH_TVERT 137 0.113526 0.014952 0.000000
+ *MESH_TVERT 138 0.113527 0.118357 0.000000
+ *MESH_TVERT 139 0.203079 0.066655 0.000000
+ *MESH_TVERT 140 0.165229 0.028805 0.000000
+ *MESH_TVERT 141 0.113527 0.118357 0.000000
+ *MESH_TVERT 142 0.216932 0.118357 0.000000
+ *MESH_TVERT 143 0.203079 0.066655 0.000000
+ *MESH_TVERT 144 0.416687 0.944794 0.000000
+ *MESH_TVERT 145 0.434791 0.930956 0.000000
+ *MESH_TVERT 146 0.475844 0.943953 0.000000
+ *MESH_TVERT 147 0.416687 0.944794 0.000000
+ *MESH_TVERT 148 0.475844 0.943953 0.000000
+ *MESH_TVERT 149 0.475844 0.963523 0.000000
+ *MESH_TVERT 150 0.416687 0.945524 0.000000
+ *MESH_TVERT 151 0.416687 0.944794 0.000000
+ *MESH_TVERT 152 0.475844 0.963523 0.000000
+ *MESH_TVERT 153 0.416687 0.945524 0.000000
+ *MESH_TVERT 154 0.475844 0.963523 0.000000
+ *MESH_TVERT 155 0.475844 0.964253 0.000000
+ *MESH_TVERT 156 0.434791 0.931686 0.000000
+ *MESH_TVERT 157 0.416687 0.945524 0.000000
+ *MESH_TVERT 158 0.475844 0.964253 0.000000
+ *MESH_TVERT 159 0.434791 0.931686 0.000000
+ *MESH_TVERT 160 0.475844 0.964253 0.000000
+ *MESH_TVERT 161 0.475844 0.944683 0.000000
+ *MESH_TVERT 162 0.434791 0.930956 0.000000
+ *MESH_TVERT 163 0.434791 0.931686 0.000000
+ *MESH_TVERT 164 0.475844 0.944683 0.000000
+ *MESH_TVERT 165 0.434791 0.930956 0.000000
+ *MESH_TVERT 166 0.475844 0.944683 0.000000
+ *MESH_TVERT 167 0.475844 0.943953 0.000000
+ *MESH_TVERT 168 0.392183 0.899577 0.000000
+ *MESH_TVERT 169 0.417787 0.899577 0.000000
+ *MESH_TVERT 170 0.434791 0.930956 0.000000
+ *MESH_TVERT 171 0.392183 0.899577 0.000000
+ *MESH_TVERT 172 0.434791 0.930956 0.000000
+ *MESH_TVERT 173 0.416687 0.944794 0.000000
+ *MESH_TVERT 174 0.392183 0.900307 0.000000
+ *MESH_TVERT 175 0.392183 0.899577 0.000000
+ *MESH_TVERT 176 0.416687 0.944794 0.000000
+ *MESH_TVERT 177 0.392183 0.900307 0.000000
+ *MESH_TVERT 178 0.416687 0.944794 0.000000
+ *MESH_TVERT 179 0.416687 0.945524 0.000000
+ *MESH_TVERT 180 0.417787 0.900307 0.000000
+ *MESH_TVERT 181 0.392183 0.900307 0.000000
+ *MESH_TVERT 182 0.416687 0.945524 0.000000
+ *MESH_TVERT 183 0.417787 0.900307 0.000000
+ *MESH_TVERT 184 0.416687 0.945524 0.000000
+ *MESH_TVERT 185 0.434791 0.931686 0.000000
+ *MESH_TVERT 186 0.417787 0.899577 0.000000
+ *MESH_TVERT 187 0.417787 0.900307 0.000000
+ *MESH_TVERT 188 0.434791 0.931686 0.000000
+ *MESH_TVERT 189 0.417787 0.899577 0.000000
+ *MESH_TVERT 190 0.434791 0.931686 0.000000
+ *MESH_TVERT 191 0.434791 0.930956 0.000000
+ *MESH_TVERT 192 0.456823 0.803298 0.000000
+ *MESH_TVERT 193 0.456823 0.868199 0.000000
+ *MESH_TVERT 194 0.417787 0.899577 0.000000
+ *MESH_TVERT 195 0.456823 0.803298 0.000000
+ *MESH_TVERT 196 0.417787 0.899577 0.000000
+ *MESH_TVERT 197 0.392183 0.899577 0.000000
+ *MESH_TVERT 198 0.456823 0.796932 0.000000
+ *MESH_TVERT 199 0.456823 0.803298 0.000000
+ *MESH_TVERT 200 0.392183 0.899577 0.000000
+ *MESH_TVERT 201 0.456823 0.796932 0.000000
+ *MESH_TVERT 202 0.392183 0.899577 0.000000
+ *MESH_TVERT 203 0.392183 0.900307 0.000000
+ *MESH_TVERT 204 0.456823 0.864603 0.000000
+ *MESH_TVERT 205 0.456823 0.796932 0.000000
+ *MESH_TVERT 206 0.392183 0.900307 0.000000
+ *MESH_TVERT 207 0.456823 0.864603 0.000000
+ *MESH_TVERT 208 0.392183 0.900307 0.000000
+ *MESH_TVERT 209 0.417787 0.900307 0.000000
+ *MESH_TVERT 210 0.456823 0.868199 0.000000
+ *MESH_TVERT 211 0.456823 0.864603 0.000000
+ *MESH_TVERT 212 0.417787 0.900307 0.000000
+ *MESH_TVERT 213 0.456823 0.868199 0.000000
+ *MESH_TVERT 214 0.417787 0.900307 0.000000
+ *MESH_TVERT 215 0.417787 0.899577 0.000000
+ *MESH_TVERT 216 0.475844 0.805411 0.000000
+ *MESH_TVERT 217 0.475844 0.899567 0.000000
+ *MESH_TVERT 218 0.456823 0.868199 0.000000
+ *MESH_TVERT 219 0.475844 0.805411 0.000000
+ *MESH_TVERT 220 0.456823 0.868199 0.000000
+ *MESH_TVERT 221 0.456823 0.803298 0.000000
+ *MESH_TVERT 222 0.475844 0.896554 0.000000
+ *MESH_TVERT 223 0.475844 0.802591 0.000000
+ *MESH_TVERT 224 0.456823 0.796932 0.000000
+ *MESH_TVERT 225 0.475844 0.896554 0.000000
+ *MESH_TVERT 226 0.456823 0.796932 0.000000
+ *MESH_TVERT 227 0.456823 0.864603 0.000000
+ *MESH_TVERT 228 0.475844 0.899567 0.000000
+ *MESH_TVERT 229 0.475844 0.896554 0.000000
+ *MESH_TVERT 230 0.456823 0.864603 0.000000
+ *MESH_TVERT 231 0.475844 0.899567 0.000000
+ *MESH_TVERT 232 0.456823 0.864603 0.000000
+ *MESH_TVERT 233 0.456823 0.868199 0.000000
+ *MESH_TVERT 234 0.494862 0.803298 0.000000
+ *MESH_TVERT 235 0.494865 0.868199 0.000000
+ *MESH_TVERT 236 0.475844 0.899567 0.000000
+ *MESH_TVERT 237 0.494862 0.803298 0.000000
+ *MESH_TVERT 238 0.475844 0.899567 0.000000
+ *MESH_TVERT 239 0.475844 0.805411 0.000000
+ *MESH_TVERT 240 0.494865 0.864603 0.000000
+ *MESH_TVERT 241 0.494862 0.796932 0.000000
+ *MESH_TVERT 242 0.475844 0.802591 0.000000
+ *MESH_TVERT 243 0.494865 0.864603 0.000000
+ *MESH_TVERT 244 0.475844 0.802591 0.000000
+ *MESH_TVERT 245 0.475844 0.896554 0.000000
+ *MESH_TVERT 246 0.494865 0.868199 0.000000
+ *MESH_TVERT 247 0.494865 0.864603 0.000000
+ *MESH_TVERT 248 0.475844 0.896554 0.000000
+ *MESH_TVERT 249 0.494865 0.868199 0.000000
+ *MESH_TVERT 250 0.475844 0.896554 0.000000
+ *MESH_TVERT 251 0.475844 0.899567 0.000000
+ *MESH_TVERT 252 0.559505 0.899577 0.000000
+ *MESH_TVERT 253 0.533902 0.899577 0.000000
+ *MESH_TVERT 254 0.494865 0.868199 0.000000
+ *MESH_TVERT 255 0.559505 0.899577 0.000000
+ *MESH_TVERT 256 0.494865 0.868199 0.000000
+ *MESH_TVERT 257 0.494862 0.803298 0.000000
+ *MESH_TVERT 258 0.559505 0.900307 0.000000
+ *MESH_TVERT 259 0.559505 0.899577 0.000000
+ *MESH_TVERT 260 0.494862 0.803298 0.000000
+ *MESH_TVERT 261 0.559505 0.900307 0.000000
+ *MESH_TVERT 262 0.494862 0.803298 0.000000
+ *MESH_TVERT 263 0.494862 0.796932 0.000000
+ *MESH_TVERT 264 0.533902 0.900307 0.000000
+ *MESH_TVERT 265 0.559505 0.900307 0.000000
+ *MESH_TVERT 266 0.494862 0.796932 0.000000
+ *MESH_TVERT 267 0.533902 0.900307 0.000000
+ *MESH_TVERT 268 0.494862 0.796932 0.000000
+ *MESH_TVERT 269 0.494865 0.864603 0.000000
+ *MESH_TVERT 270 0.533902 0.899577 0.000000
+ *MESH_TVERT 271 0.533902 0.900307 0.000000
+ *MESH_TVERT 272 0.494865 0.864603 0.000000
+ *MESH_TVERT 273 0.533902 0.899577 0.000000
+ *MESH_TVERT 274 0.494865 0.864603 0.000000
+ *MESH_TVERT 275 0.494865 0.868199 0.000000
+ *MESH_TVERT 276 0.535001 0.944794 0.000000
+ *MESH_TVERT 277 0.516897 0.930956 0.000000
+ *MESH_TVERT 278 0.533902 0.899577 0.000000
+ *MESH_TVERT 279 0.535001 0.944794 0.000000
+ *MESH_TVERT 280 0.533902 0.899577 0.000000
+ *MESH_TVERT 281 0.559505 0.899577 0.000000
+ *MESH_TVERT 282 0.535001 0.945524 0.000000
+ *MESH_TVERT 283 0.535001 0.944794 0.000000
+ *MESH_TVERT 284 0.559505 0.899577 0.000000
+ *MESH_TVERT 285 0.535001 0.945524 0.000000
+ *MESH_TVERT 286 0.559505 0.899577 0.000000
+ *MESH_TVERT 287 0.559505 0.900307 0.000000
+ *MESH_TVERT 288 0.516897 0.931686 0.000000
+ *MESH_TVERT 289 0.535001 0.945524 0.000000
+ *MESH_TVERT 290 0.559505 0.900307 0.000000
+ *MESH_TVERT 291 0.516897 0.931686 0.000000
+ *MESH_TVERT 292 0.559505 0.900307 0.000000
+ *MESH_TVERT 293 0.533902 0.900307 0.000000
+ *MESH_TVERT 294 0.516897 0.930956 0.000000
+ *MESH_TVERT 295 0.516897 0.931686 0.000000
+ *MESH_TVERT 296 0.533902 0.900307 0.000000
+ *MESH_TVERT 297 0.516897 0.930956 0.000000
+ *MESH_TVERT 298 0.533902 0.900307 0.000000
+ *MESH_TVERT 299 0.533902 0.899577 0.000000
+ *MESH_TVERT 300 0.475844 0.963523 0.000000
+ *MESH_TVERT 301 0.475844 0.943953 0.000000
+ *MESH_TVERT 302 0.516897 0.930956 0.000000
+ *MESH_TVERT 303 0.475844 0.963523 0.000000
+ *MESH_TVERT 304 0.516897 0.930956 0.000000
+ *MESH_TVERT 305 0.535001 0.944794 0.000000
+ *MESH_TVERT 306 0.475844 0.964253 0.000000
+ *MESH_TVERT 307 0.475844 0.963523 0.000000
+ *MESH_TVERT 308 0.535001 0.944794 0.000000
+ *MESH_TVERT 309 0.475844 0.964253 0.000000
+ *MESH_TVERT 310 0.535001 0.944794 0.000000
+ *MESH_TVERT 311 0.535001 0.945524 0.000000
+ *MESH_TVERT 312 0.475844 0.944683 0.000000
+ *MESH_TVERT 313 0.475844 0.964253 0.000000
+ *MESH_TVERT 314 0.535001 0.945524 0.000000
+ *MESH_TVERT 315 0.475844 0.944683 0.000000
+ *MESH_TVERT 316 0.535001 0.945524 0.000000
+ *MESH_TVERT 317 0.516897 0.931686 0.000000
+ *MESH_TVERT 318 0.475844 0.943953 0.000000
+ *MESH_TVERT 319 0.475844 0.944683 0.000000
+ *MESH_TVERT 320 0.516897 0.931686 0.000000
+ *MESH_TVERT 321 0.475844 0.943953 0.000000
+ *MESH_TVERT 322 0.516897 0.931686 0.000000
+ *MESH_TVERT 323 0.516897 0.930956 0.000000
+ *MESH_TVERT 324 0.971284 0.738728 0.000000
+ *MESH_TVERT 325 0.969001 0.753842 0.000000
+ *MESH_TVERT 326 0.971284 0.746326 0.000000
+ *MESH_TVERT 327 0.971284 0.738728 0.000000
+ *MESH_TVERT 328 0.963866 0.753842 0.000000
+ *MESH_TVERT 329 0.969001 0.753842 0.000000
+ *MESH_TVERT 330 0.804021 0.753842 0.000000
+ *MESH_TVERT 331 0.801738 0.738728 0.000000
+ *MESH_TVERT 332 0.801738 0.746326 0.000000
+ *MESH_TVERT 333 0.804021 0.753842 0.000000
+ *MESH_TVERT 334 0.809156 0.753842 0.000000
+ *MESH_TVERT 335 0.801738 0.738728 0.000000
+ *MESH_TVERT 336 0.886511 0.698854 0.000000
+ *MESH_TVERT 337 0.866973 0.753842 0.000000
+ *MESH_TVERT 338 0.871527 0.753842 0.000000
+ *MESH_TVERT 339 0.886511 0.698854 0.000000
+ *MESH_TVERT 340 0.886511 0.706452 0.000000
+ *MESH_TVERT 341 0.866973 0.753842 0.000000
+ *MESH_TVERT 342 0.906049 0.753842 0.000000
+ *MESH_TVERT 343 0.886511 0.698854 0.000000
+ *MESH_TVERT 344 0.901495 0.753842 0.000000
+ *MESH_TVERT 345 0.906049 0.753842 0.000000
+ *MESH_TVERT 346 0.886511 0.706452 0.000000
+ *MESH_TVERT 347 0.886511 0.698854 0.000000
+ *MESH_TVERT 348 0.809156 0.753842 0.000000
+ *MESH_TVERT 349 0.804021 0.753842 0.000000
+ *MESH_TVERT 350 0.828258 0.753842 0.000000
+ *MESH_TVERT 351 0.828258 0.753842 0.000000
+ *MESH_TVERT 352 0.828258 0.753842 0.000000
+ *MESH_TVERT 353 0.809156 0.753842 0.000000
+ *MESH_TVERT 354 0.828258 0.753842 0.000000
+ *MESH_TVERT 355 0.801738 0.738728 0.000000
+ *MESH_TVERT 356 0.809156 0.753842 0.000000
+ *MESH_TVERT 357 0.828258 0.753842 0.000000
+ *MESH_TVERT 358 0.828258 0.584466 0.000000
+ *MESH_TVERT 359 0.801738 0.738728 0.000000
+ *MESH_TVERT 360 0.828258 0.584466 0.000000
+ *MESH_TVERT 361 0.801738 0.584466 0.000000
+ *MESH_TVERT 362 0.801738 0.738728 0.000000
+ *MESH_TVERT 363 0.828258 0.753842 0.000000
+ *MESH_TVERT 364 0.801738 0.746326 0.000000
+ *MESH_TVERT 365 0.828258 0.584466 0.000000
+ *MESH_TVERT 366 0.801738 0.746326 0.000000
+ *MESH_TVERT 367 0.801738 0.584466 0.000000
+ *MESH_TVERT 368 0.828258 0.584466 0.000000
+ *MESH_TVERT 369 0.828258 0.753842 0.000000
+ *MESH_TVERT 370 0.804021 0.753842 0.000000
+ *MESH_TVERT 371 0.801738 0.746326 0.000000
+ *MESH_TVERT 372 0.828258 0.584466 0.000000
+ *MESH_TVERT 373 0.828258 0.753842 0.000000
+ *MESH_TVERT 374 0.859991 0.753842 0.000000
+ *MESH_TVERT 375 0.859991 0.753842 0.000000
+ *MESH_TVERT 376 0.859991 0.584466 0.000000
+ *MESH_TVERT 377 0.828258 0.584466 0.000000
+ *MESH_TVERT 378 0.828258 0.753842 0.000000
+ *MESH_TVERT 379 0.828258 0.753842 0.000000
+ *MESH_TVERT 380 0.859991 0.753842 0.000000
+ *MESH_TVERT 381 0.859991 0.753842 0.000000
+ *MESH_TVERT 382 0.859991 0.753842 0.000000
+ *MESH_TVERT 383 0.828258 0.753842 0.000000
+ *MESH_TVERT 384 0.828258 0.753842 0.000000
+ *MESH_TVERT 385 0.828258 0.584466 0.000000
+ *MESH_TVERT 386 0.859991 0.584466 0.000000
+ *MESH_TVERT 387 0.859991 0.584466 0.000000
+ *MESH_TVERT 388 0.859991 0.753842 0.000000
+ *MESH_TVERT 389 0.828258 0.753842 0.000000
+ *MESH_TVERT 390 0.886511 0.706452 0.000000
+ *MESH_TVERT 391 0.859991 0.753842 0.000000
+ *MESH_TVERT 392 0.866973 0.753842 0.000000
+ *MESH_TVERT 393 0.886511 0.706452 0.000000
+ *MESH_TVERT 394 0.859991 0.584466 0.000000
+ *MESH_TVERT 395 0.859991 0.753842 0.000000
+ *MESH_TVERT 396 0.886511 0.706452 0.000000
+ *MESH_TVERT 397 0.886511 0.584466 0.000000
+ *MESH_TVERT 398 0.859991 0.584466 0.000000
+ *MESH_TVERT 399 0.871527 0.753842 0.000000
+ *MESH_TVERT 400 0.866973 0.753842 0.000000
+ *MESH_TVERT 401 0.859991 0.753842 0.000000
+ *MESH_TVERT 402 0.859991 0.753842 0.000000
+ *MESH_TVERT 403 0.859991 0.753842 0.000000
+ *MESH_TVERT 404 0.871527 0.753842 0.000000
+ *MESH_TVERT 405 0.886511 0.584466 0.000000
+ *MESH_TVERT 406 0.859991 0.753842 0.000000
+ *MESH_TVERT 407 0.859991 0.584466 0.000000
+ *MESH_TVERT 408 0.886511 0.584466 0.000000
+ *MESH_TVERT 409 0.886511 0.698854 0.000000
+ *MESH_TVERT 410 0.859991 0.753842 0.000000
+ *MESH_TVERT 411 0.886511 0.698854 0.000000
+ *MESH_TVERT 412 0.871527 0.753842 0.000000
+ *MESH_TVERT 413 0.859991 0.753842 0.000000
+ *MESH_TVERT 414 0.913031 0.584466 0.000000
+ *MESH_TVERT 415 0.906049 0.753842 0.000000
+ *MESH_TVERT 416 0.913031 0.753842 0.000000
+ *MESH_TVERT 417 0.913031 0.584466 0.000000
+ *MESH_TVERT 418 0.886511 0.706452 0.000000
+ *MESH_TVERT 419 0.906049 0.753842 0.000000
+ *MESH_TVERT 420 0.913031 0.584466 0.000000
+ *MESH_TVERT 421 0.886511 0.584466 0.000000
+ *MESH_TVERT 422 0.886511 0.706452 0.000000
+ *MESH_TVERT 423 0.913031 0.753842 0.000000
+ *MESH_TVERT 424 0.906049 0.753842 0.000000
+ *MESH_TVERT 425 0.901495 0.753842 0.000000
+ *MESH_TVERT 426 0.901495 0.753842 0.000000
+ *MESH_TVERT 427 0.913031 0.753842 0.000000
+ *MESH_TVERT 428 0.913031 0.753842 0.000000
+ *MESH_TVERT 429 0.913031 0.584466 0.000000
+ *MESH_TVERT 430 0.913031 0.753842 0.000000
+ *MESH_TVERT 431 0.886511 0.584466 0.000000
+ *MESH_TVERT 432 0.913031 0.753842 0.000000
+ *MESH_TVERT 433 0.886511 0.698854 0.000000
+ *MESH_TVERT 434 0.886511 0.584466 0.000000
+ *MESH_TVERT 435 0.913031 0.753842 0.000000
+ *MESH_TVERT 436 0.901495 0.753842 0.000000
+ *MESH_TVERT 437 0.886511 0.698854 0.000000
+ *MESH_TVERT 438 0.913031 0.584466 0.000000
+ *MESH_TVERT 439 0.913031 0.753842 0.000000
+ *MESH_TVERT 440 0.944764 0.753842 0.000000
+ *MESH_TVERT 441 0.944764 0.753842 0.000000
+ *MESH_TVERT 442 0.944764 0.584466 0.000000
+ *MESH_TVERT 443 0.913031 0.584466 0.000000
+ *MESH_TVERT 444 0.913031 0.753842 0.000000
+ *MESH_TVERT 445 0.913031 0.753842 0.000000
+ *MESH_TVERT 446 0.944764 0.753842 0.000000
+ *MESH_TVERT 447 0.944764 0.753842 0.000000
+ *MESH_TVERT 448 0.944764 0.753842 0.000000
+ *MESH_TVERT 449 0.913031 0.753842 0.000000
+ *MESH_TVERT 450 0.913031 0.753842 0.000000
+ *MESH_TVERT 451 0.913031 0.584466 0.000000
+ *MESH_TVERT 452 0.944764 0.584466 0.000000
+ *MESH_TVERT 453 0.944764 0.584466 0.000000
+ *MESH_TVERT 454 0.944764 0.753842 0.000000
+ *MESH_TVERT 455 0.913031 0.753842 0.000000
+ *MESH_TVERT 456 0.971284 0.584466 0.000000
+ *MESH_TVERT 457 0.963866 0.753842 0.000000
+ *MESH_TVERT 458 0.971284 0.738728 0.000000
+ *MESH_TVERT 459 0.971284 0.584466 0.000000
+ *MESH_TVERT 460 0.944764 0.584466 0.000000
+ *MESH_TVERT 461 0.963866 0.753842 0.000000
+ *MESH_TVERT 462 0.944764 0.584466 0.000000
+ *MESH_TVERT 463 0.944764 0.753842 0.000000
+ *MESH_TVERT 464 0.963866 0.753842 0.000000
+ *MESH_TVERT 465 0.944764 0.753842 0.000000
+ *MESH_TVERT 466 0.969001 0.753842 0.000000
+ *MESH_TVERT 467 0.963866 0.753842 0.000000
+ *MESH_TVERT 468 0.963866 0.753842 0.000000
+ *MESH_TVERT 469 0.944764 0.753842 0.000000
+ *MESH_TVERT 470 0.944764 0.753842 0.000000
+ *MESH_TVERT 471 0.971284 0.584466 0.000000
+ *MESH_TVERT 472 0.971284 0.746326 0.000000
+ *MESH_TVERT 473 0.944764 0.584466 0.000000
+ *MESH_TVERT 474 0.971284 0.746326 0.000000
+ *MESH_TVERT 475 0.944764 0.753842 0.000000
+ *MESH_TVERT 476 0.944764 0.584466 0.000000
+ *MESH_TVERT 477 0.971284 0.746326 0.000000
+ *MESH_TVERT 478 0.969001 0.753842 0.000000
+ *MESH_TVERT 479 0.944764 0.753842 0.000000
+ *MESH_TVERT 480 0.511946 0.046195 0.000000
+ *MESH_TVERT 481 0.441406 0.051152 0.000000
+ *MESH_TVERT 482 0.512876 0.028982 0.000000
+ *MESH_TVERT 483 0.441406 0.051152 0.000000
+ *MESH_TVERT 484 0.428184 0.034647 0.000000
+ *MESH_TVERT 485 0.512876 0.028982 0.000000
+ *MESH_TVERT 486 0.441406 0.051152 0.000000
+ *MESH_TVERT 487 0.419503 0.140939 0.000000
+ *MESH_TVERT 488 0.428184 0.034647 0.000000
+ *MESH_TVERT 489 0.419503 0.140939 0.000000
+ *MESH_TVERT 490 0.400417 0.140463 0.000000
+ *MESH_TVERT 491 0.428184 0.034647 0.000000
+ *MESH_TVERT 492 0.512876 0.028982 0.000000
+ *MESH_TVERT 493 0.552167 0.052767 0.000000
+ *MESH_TVERT 494 0.511946 0.046195 0.000000
+ *MESH_TVERT 495 0.552167 0.052767 0.000000
+ *MESH_TVERT 496 0.557694 0.081101 0.000000
+ *MESH_TVERT 497 0.511946 0.046195 0.000000
+ *MESH_TVERT 498 0.552167 0.052767 0.000000
+ *MESH_TVERT 499 0.574574 0.051647 0.000000
+ *MESH_TVERT 500 0.557694 0.081101 0.000000
+ *MESH_TVERT 501 0.511946 0.046195 0.000000
+ *MESH_TVERT 502 0.512876 0.028982 0.000000
+ *MESH_TVERT 503 0.441406 0.051152 0.000000
+ *MESH_TVERT 504 0.441406 0.051152 0.000000
+ *MESH_TVERT 505 0.512876 0.028982 0.000000
+ *MESH_TVERT 506 0.428184 0.034647 0.000000
+ *MESH_TVERT 507 0.441406 0.051152 0.000000
+ *MESH_TVERT 508 0.428184 0.034647 0.000000
+ *MESH_TVERT 509 0.419503 0.140939 0.000000
+ *MESH_TVERT 510 0.419503 0.140939 0.000000
+ *MESH_TVERT 511 0.428184 0.034647 0.000000
+ *MESH_TVERT 512 0.400417 0.140463 0.000000
+ *MESH_TVERT 513 0.512876 0.028982 0.000000
+ *MESH_TVERT 514 0.511946 0.046195 0.000000
+ *MESH_TVERT 515 0.552167 0.052767 0.000000
+ *MESH_TVERT 516 0.552167 0.052767 0.000000
+ *MESH_TVERT 517 0.511946 0.046195 0.000000
+ *MESH_TVERT 518 0.557694 0.081101 0.000000
+ *MESH_TVERT 519 0.552167 0.052767 0.000000
+ *MESH_TVERT 520 0.557694 0.081101 0.000000
+ *MESH_TVERT 521 0.574574 0.051647 0.000000
+ *MESH_TVERT 522 0.441406 0.051152 0.000000
+ *MESH_TVERT 523 0.419503 0.140939 0.000000
+ *MESH_TVERT 524 0.441406 0.051152 0.000000
+ *MESH_TVERT 525 0.441406 0.051152 0.000000
+ *MESH_TVERT 526 0.419503 0.140939 0.000000
+ *MESH_TVERT 527 0.419503 0.140939 0.000000
+ *MESH_TVERT 528 0.511946 0.046195 0.000000
+ *MESH_TVERT 529 0.441406 0.051152 0.000000
+ *MESH_TVERT 530 0.511946 0.046195 0.000000
+ *MESH_TVERT 531 0.511946 0.046195 0.000000
+ *MESH_TVERT 532 0.441406 0.051152 0.000000
+ *MESH_TVERT 533 0.441406 0.051152 0.000000
+ *MESH_TVERT 534 0.557694 0.081101 0.000000
+ *MESH_TVERT 535 0.511946 0.046195 0.000000
+ *MESH_TVERT 536 0.557694 0.081101 0.000000
+ *MESH_TVERT 537 0.557694 0.081101 0.000000
+ *MESH_TVERT 538 0.511946 0.046195 0.000000
+ *MESH_TVERT 539 0.511946 0.046195 0.000000
+ *MESH_TVERT 540 0.552167 0.052767 0.000000
+ *MESH_TVERT 541 0.574574 0.051647 0.000000
+ *MESH_TVERT 542 0.552167 0.052767 0.000000
+ *MESH_TVERT 543 0.552167 0.052767 0.000000
+ *MESH_TVERT 544 0.574574 0.051647 0.000000
+ *MESH_TVERT 545 0.574574 0.051647 0.000000
+ *MESH_TVERT 546 0.512876 0.028982 0.000000
+ *MESH_TVERT 547 0.552167 0.052767 0.000000
+ *MESH_TVERT 548 0.512876 0.028982 0.000000
+ *MESH_TVERT 549 0.512876 0.028982 0.000000
+ *MESH_TVERT 550 0.552167 0.052767 0.000000
+ *MESH_TVERT 551 0.552167 0.052767 0.000000
+ *MESH_TVERT 552 0.428184 0.034647 0.000000
+ *MESH_TVERT 553 0.512876 0.028982 0.000000
+ *MESH_TVERT 554 0.428184 0.034647 0.000000
+ *MESH_TVERT 555 0.428184 0.034647 0.000000
+ *MESH_TVERT 556 0.512876 0.028982 0.000000
+ *MESH_TVERT 557 0.512876 0.028982 0.000000
+ *MESH_TVERT 558 0.400417 0.140463 0.000000
+ *MESH_TVERT 559 0.428184 0.034647 0.000000
+ *MESH_TVERT 560 0.400417 0.140463 0.000000
+ *MESH_TVERT 561 0.400417 0.140463 0.000000
+ *MESH_TVERT 562 0.428184 0.034647 0.000000
+ *MESH_TVERT 563 0.428184 0.034647 0.000000
+ *MESH_TVERT 564 0.512788 0.090499 0.000000
+ *MESH_TVERT 565 0.524460 0.135692 0.000000
+ *MESH_TVERT 566 0.498853 0.092626 0.000000
+ *MESH_TVERT 567 0.524460 0.135692 0.000000
+ *MESH_TVERT 568 0.492402 0.135864 0.000000
+ *MESH_TVERT 569 0.498853 0.092626 0.000000
+ *MESH_TVERT 570 0.498853 0.092626 0.000000
+ *MESH_TVERT 571 0.482589 0.056246 0.000000
+ *MESH_TVERT 572 0.512788 0.090499 0.000000
+ *MESH_TVERT 573 0.512788 0.090499 0.000000
+ *MESH_TVERT 574 0.498853 0.092626 0.000000
+ *MESH_TVERT 575 0.524460 0.135692 0.000000
+ *MESH_TVERT 576 0.524460 0.135692 0.000000
+ *MESH_TVERT 577 0.498853 0.092626 0.000000
+ *MESH_TVERT 578 0.492402 0.135864 0.000000
+ *MESH_TVERT 579 0.498853 0.092626 0.000000
+ *MESH_TVERT 580 0.512788 0.090499 0.000000
+ *MESH_TVERT 581 0.482589 0.056246 0.000000
+ *MESH_TVERT 582 0.512788 0.090499 0.000000
+ *MESH_TVERT 583 0.524460 0.135692 0.000000
+ *MESH_TVERT 584 0.512788 0.090499 0.000000
+ *MESH_TVERT 585 0.512788 0.090499 0.000000
+ *MESH_TVERT 586 0.524460 0.135692 0.000000
+ *MESH_TVERT 587 0.524460 0.135692 0.000000
+ *MESH_TVERT 588 0.482589 0.056246 0.000000
+ *MESH_TVERT 589 0.512788 0.090499 0.000000
+ *MESH_TVERT 590 0.482589 0.056246 0.000000
+ *MESH_TVERT 591 0.482589 0.056246 0.000000
+ *MESH_TVERT 592 0.512788 0.090499 0.000000
+ *MESH_TVERT 593 0.512788 0.090499 0.000000
+ *MESH_TVERT 594 0.498853 0.092626 0.000000
+ *MESH_TVERT 595 0.482589 0.056246 0.000000
+ *MESH_TVERT 596 0.498853 0.092626 0.000000
+ *MESH_TVERT 597 0.498853 0.092626 0.000000
+ *MESH_TVERT 598 0.482589 0.056246 0.000000
+ *MESH_TVERT 599 0.482589 0.056246 0.000000
+ *MESH_TVERT 600 0.492402 0.135864 0.000000
+ *MESH_TVERT 601 0.498853 0.092626 0.000000
+ *MESH_TVERT 602 0.492402 0.135864 0.000000
+ *MESH_TVERT 603 0.492402 0.135864 0.000000
+ *MESH_TVERT 604 0.498853 0.092626 0.000000
+ *MESH_TVERT 605 0.498853 0.092626 0.000000
+ *MESH_TVERT 606 0.319897 0.980928 0.000000
+ *MESH_TVERT 607 0.311257 0.980928 0.000000
+ *MESH_TVERT 608 0.311257 0.534827 0.000000
+ *MESH_TVERT 609 0.319897 0.980928 0.000000
+ *MESH_TVERT 610 0.311257 0.534827 0.000000
+ *MESH_TVERT 611 0.319897 0.534827 0.000000
+ *MESH_TVERT 612 0.328538 0.980928 0.000000
+ *MESH_TVERT 613 0.319897 0.980928 0.000000
+ *MESH_TVERT 614 0.319897 0.534827 0.000000
+ *MESH_TVERT 615 0.328538 0.980928 0.000000
+ *MESH_TVERT 616 0.319897 0.534827 0.000000
+ *MESH_TVERT 617 0.328538 0.534827 0.000000
+ *MESH_TVERT 618 0.337179 0.980928 0.000000
+ *MESH_TVERT 619 0.328538 0.980928 0.000000
+ *MESH_TVERT 620 0.328538 0.534827 0.000000
+ *MESH_TVERT 621 0.337179 0.980928 0.000000
+ *MESH_TVERT 622 0.328538 0.534827 0.000000
+ *MESH_TVERT 623 0.337179 0.534827 0.000000
+ *MESH_TVERT 624 0.242130 0.980928 0.000000
+ *MESH_TVERT 625 0.233489 0.980928 0.000000
+ *MESH_TVERT 626 0.233489 0.534827 0.000000
+ *MESH_TVERT 627 0.242130 0.980928 0.000000
+ *MESH_TVERT 628 0.233489 0.534827 0.000000
+ *MESH_TVERT 629 0.242130 0.534827 0.000000
+ *MESH_TVERT 630 0.250771 0.980928 0.000000
+ *MESH_TVERT 631 0.242130 0.980928 0.000000
+ *MESH_TVERT 632 0.242130 0.534827 0.000000
+ *MESH_TVERT 633 0.250771 0.980928 0.000000
+ *MESH_TVERT 634 0.242130 0.534827 0.000000
+ *MESH_TVERT 635 0.250771 0.534827 0.000000
+ *MESH_TVERT 636 0.259411 0.980928 0.000000
+ *MESH_TVERT 637 0.250771 0.980928 0.000000
+ *MESH_TVERT 638 0.250771 0.534827 0.000000
+ *MESH_TVERT 639 0.259411 0.980928 0.000000
+ *MESH_TVERT 640 0.250771 0.534827 0.000000
+ *MESH_TVERT 641 0.259411 0.534827 0.000000
+ *MESH_TVERT 642 0.268052 0.980928 0.000000
+ *MESH_TVERT 643 0.259411 0.980928 0.000000
+ *MESH_TVERT 644 0.259411 0.534827 0.000000
+ *MESH_TVERT 645 0.268052 0.980928 0.000000
+ *MESH_TVERT 646 0.259411 0.534827 0.000000
+ *MESH_TVERT 647 0.268052 0.534827 0.000000
+ *MESH_TVERT 648 0.276693 0.980928 0.000000
+ *MESH_TVERT 649 0.268052 0.980928 0.000000
+ *MESH_TVERT 650 0.268052 0.534827 0.000000
+ *MESH_TVERT 651 0.276693 0.980928 0.000000
+ *MESH_TVERT 652 0.268052 0.534827 0.000000
+ *MESH_TVERT 653 0.276693 0.534827 0.000000
+ *MESH_TVERT 654 0.285334 0.980928 0.000000
+ *MESH_TVERT 655 0.276693 0.980928 0.000000
+ *MESH_TVERT 656 0.276693 0.534827 0.000000
+ *MESH_TVERT 657 0.285334 0.980928 0.000000
+ *MESH_TVERT 658 0.276693 0.534827 0.000000
+ *MESH_TVERT 659 0.285334 0.534827 0.000000
+ *MESH_TVERT 660 0.293975 0.980928 0.000000
+ *MESH_TVERT 661 0.285334 0.980928 0.000000
+ *MESH_TVERT 662 0.285334 0.534827 0.000000
+ *MESH_TVERT 663 0.293975 0.980928 0.000000
+ *MESH_TVERT 664 0.285334 0.534827 0.000000
+ *MESH_TVERT 665 0.293975 0.534827 0.000000
+ *MESH_TVERT 666 0.302616 0.980928 0.000000
+ *MESH_TVERT 667 0.293975 0.980928 0.000000
+ *MESH_TVERT 668 0.293975 0.534827 0.000000
+ *MESH_TVERT 669 0.302616 0.980928 0.000000
+ *MESH_TVERT 670 0.293975 0.534827 0.000000
+ *MESH_TVERT 671 0.302616 0.534827 0.000000
+ *MESH_TVERT 672 0.311257 0.980928 0.000000
+ *MESH_TVERT 673 0.302616 0.980928 0.000000
+ *MESH_TVERT 674 0.302616 0.534827 0.000000
+ *MESH_TVERT 675 0.311257 0.980928 0.000000
+ *MESH_TVERT 676 0.302616 0.534827 0.000000
+ *MESH_TVERT 677 0.311257 0.534827 0.000000
+ *MESH_TVERT 678 0.311594 0.105702 0.000000
+ *MESH_TVERT 679 0.355029 0.147343 0.000000
+ *MESH_TVERT 680 0.375390 0.105702 0.000000
+ *MESH_TVERT 681 0.311594 0.105702 0.000000
+ *MESH_TVERT 682 0.336671 0.183383 0.000000
+ *MESH_TVERT 683 0.355029 0.147343 0.000000
+ *MESH_TVERT 684 0.311594 0.105702 0.000000
+ *MESH_TVERT 685 0.311594 0.192320 0.000000
+ *MESH_TVERT 686 0.336671 0.183383 0.000000
+ *MESH_TVERT 687 0.311594 0.105702 0.000000
+ *MESH_TVERT 688 0.286517 0.183383 0.000000
+ *MESH_TVERT 689 0.311594 0.192320 0.000000
+ *MESH_TVERT 690 0.311594 0.105702 0.000000
+ *MESH_TVERT 691 0.268159 0.147343 0.000000
+ *MESH_TVERT 692 0.286517 0.183383 0.000000
+ *MESH_TVERT 693 0.311594 0.105702 0.000000
+ *MESH_TVERT 694 0.247798 0.105702 0.000000
+ *MESH_TVERT 695 0.268159 0.147343 0.000000
+ *MESH_TVERT 696 0.311594 0.105702 0.000000
+ *MESH_TVERT 697 0.250785 0.059011 0.000000
+ *MESH_TVERT 698 0.247798 0.105702 0.000000
+ *MESH_TVERT 699 0.311594 0.105702 0.000000
+ *MESH_TVERT 700 0.276486 0.024830 0.000000
+ *MESH_TVERT 701 0.250785 0.059011 0.000000
+ *MESH_TVERT 702 0.311594 0.105702 0.000000
+ *MESH_TVERT 703 0.311594 0.014968 0.000000
+ *MESH_TVERT 704 0.276486 0.024830 0.000000
+ *MESH_TVERT 705 0.311594 0.105702 0.000000
+ *MESH_TVERT 706 0.346702 0.024830 0.000000
+ *MESH_TVERT 707 0.311594 0.014968 0.000000
+ *MESH_TVERT 708 0.311594 0.105702 0.000000
+ *MESH_TVERT 709 0.372403 0.059011 0.000000
+ *MESH_TVERT 710 0.346702 0.024830 0.000000
+ *MESH_TVERT 711 0.311594 0.105702 0.000000
+ *MESH_TVERT 712 0.375390 0.105702 0.000000
+ *MESH_TVERT 713 0.372403 0.059011 0.000000
+ *MESH_TVERT 714 0.176111 0.989045 0.000000
+ *MESH_TVERT 715 0.156917 0.989045 0.000000
+ *MESH_TVERT 716 0.156595 0.294370 0.000000
+ *MESH_TVERT 717 0.176111 0.989045 0.000000
+ *MESH_TVERT 718 0.156595 0.294370 0.000000
+ *MESH_TVERT 719 0.176111 0.294370 0.000000
+ *MESH_TVERT 720 0.191912 0.989045 0.000000
+ *MESH_TVERT 721 0.176111 0.989045 0.000000
+ *MESH_TVERT 722 0.176111 0.294370 0.000000
+ *MESH_TVERT 723 0.191912 0.989045 0.000000
+ *MESH_TVERT 724 0.176111 0.294370 0.000000
+ *MESH_TVERT 725 0.191912 0.294370 0.000000
+ *MESH_TVERT 726 0.203454 0.989045 0.000000
+ *MESH_TVERT 727 0.191912 0.989045 0.000000
+ *MESH_TVERT 728 0.191912 0.294370 0.000000
+ *MESH_TVERT 729 0.203454 0.989045 0.000000
+ *MESH_TVERT 730 0.191912 0.294370 0.000000
+ *MESH_TVERT 731 0.203454 0.294370 0.000000
+ *MESH_TVERT 732 0.024484 0.989045 0.000000
+ *MESH_TVERT 733 0.012942 0.989045 0.000000
+ *MESH_TVERT 734 0.012942 0.294370 0.000000
+ *MESH_TVERT 735 0.024484 0.989045 0.000000
+ *MESH_TVERT 736 0.012942 0.294370 0.000000
+ *MESH_TVERT 737 0.024484 0.294370 0.000000
+ *MESH_TVERT 738 0.040285 0.989045 0.000000
+ *MESH_TVERT 739 0.024484 0.989045 0.000000
+ *MESH_TVERT 740 0.024484 0.294370 0.000000
+ *MESH_TVERT 741 0.040285 0.989045 0.000000
+ *MESH_TVERT 742 0.024484 0.294370 0.000000
+ *MESH_TVERT 743 0.040285 0.294370 0.000000
+ *MESH_TVERT 744 0.059479 0.989045 0.000000
+ *MESH_TVERT 745 0.040285 0.989045 0.000000
+ *MESH_TVERT 746 0.040285 0.294370 0.000000
+ *MESH_TVERT 747 0.059479 0.989045 0.000000
+ *MESH_TVERT 748 0.040285 0.294370 0.000000
+ *MESH_TVERT 749 0.059801 0.294370 0.000000
+ *MESH_TVERT 750 0.080664 0.989041 0.000000
+ *MESH_TVERT 751 0.059479 0.989045 0.000000
+ *MESH_TVERT 752 0.059801 0.294370 0.000000
+ *MESH_TVERT 753 0.080664 0.989041 0.000000
+ *MESH_TVERT 754 0.059801 0.294370 0.000000
+ *MESH_TVERT 755 0.076434 0.294370 0.000000
+ *MESH_TVERT 756 0.092476 0.989041 0.000000
+ *MESH_TVERT 757 0.080664 0.989041 0.000000
+ *MESH_TVERT 758 0.076434 0.294370 0.000000
+ *MESH_TVERT 759 0.092476 0.989041 0.000000
+ *MESH_TVERT 760 0.076434 0.294370 0.000000
+ *MESH_TVERT 761 0.092562 0.294370 0.000000
+ *MESH_TVERT 762 0.108198 0.989041 0.000000
+ *MESH_TVERT 763 0.092476 0.989041 0.000000
+ *MESH_TVERT 764 0.092562 0.294370 0.000000
+ *MESH_TVERT 765 0.108198 0.989041 0.000000
+ *MESH_TVERT 766 0.092562 0.294370 0.000000
+ *MESH_TVERT 767 0.108198 0.294370 0.000000
+ *MESH_TVERT 768 0.123920 0.989041 0.000000
+ *MESH_TVERT 769 0.108198 0.989041 0.000000
+ *MESH_TVERT 770 0.108198 0.294370 0.000000
+ *MESH_TVERT 771 0.123920 0.989041 0.000000
+ *MESH_TVERT 772 0.108198 0.294370 0.000000
+ *MESH_TVERT 773 0.123834 0.294370 0.000000
+ *MESH_TVERT 774 0.135731 0.989041 0.000000
+ *MESH_TVERT 775 0.123920 0.989041 0.000000
+ *MESH_TVERT 776 0.123834 0.294370 0.000000
+ *MESH_TVERT 777 0.135731 0.989041 0.000000
+ *MESH_TVERT 778 0.123834 0.294370 0.000000
+ *MESH_TVERT 779 0.139962 0.294370 0.000000
+ *MESH_TVERT 780 0.156917 0.989045 0.000000
+ *MESH_TVERT 781 0.135731 0.989041 0.000000
+ *MESH_TVERT 782 0.139962 0.294370 0.000000
+ *MESH_TVERT 783 0.156917 0.989045 0.000000
+ *MESH_TVERT 784 0.139962 0.294370 0.000000
+ *MESH_TVERT 785 0.156595 0.294370 0.000000
+ *MESH_TVERT 786 0.548371 0.537029 0.000000
+ *MESH_TVERT 787 0.674964 0.670528 0.000000
+ *MESH_TVERT 788 0.406884 0.588073 0.000000
+ *MESH_TVERT 789 0.674964 0.670528 0.000000
+ *MESH_TVERT 790 0.552094 0.733351 0.000000
+ *MESH_TVERT 791 0.406884 0.588073 0.000000
+ *MESH_TVERT 792 0.674964 0.670528 0.000000
+ *MESH_TVERT 793 0.768048 0.800100 0.000000
+ *MESH_TVERT 794 0.552094 0.733351 0.000000
+ *MESH_TVERT 795 0.768048 0.800100 0.000000
+ *MESH_TVERT 796 0.637731 0.851144 0.000000
+ *MESH_TVERT 797 0.552094 0.733351 0.000000
+ *MESH_TVERT 798 0.768048 0.800100 0.000000
+ *MESH_TVERT 799 0.838791 0.929673 0.000000
+ *MESH_TVERT 800 0.637731 0.851144 0.000000
+ *MESH_TVERT 801 0.838791 0.929673 0.000000
+ *MESH_TVERT 802 0.686134 0.968937 0.000000
+ *MESH_TVERT 803 0.637731 0.851144 0.000000
+ *MESH_TVERT 804 0.548371 0.537029 0.000000
+ *MESH_TVERT 805 0.406884 0.588073 0.000000
+ *MESH_TVERT 806 0.674964 0.670528 0.000000
+ *MESH_TVERT 807 0.674964 0.670528 0.000000
+ *MESH_TVERT 808 0.406884 0.588073 0.000000
+ *MESH_TVERT 809 0.552094 0.733351 0.000000
+ *MESH_TVERT 810 0.674964 0.670528 0.000000
+ *MESH_TVERT 811 0.552094 0.733351 0.000000
+ *MESH_TVERT 812 0.768048 0.800100 0.000000
+ *MESH_TVERT 813 0.768048 0.800100 0.000000
+ *MESH_TVERT 814 0.552094 0.733351 0.000000
+ *MESH_TVERT 815 0.637731 0.851144 0.000000
+ *MESH_TVERT 816 0.768048 0.800100 0.000000
+ *MESH_TVERT 817 0.637731 0.851144 0.000000
+ *MESH_TVERT 818 0.838791 0.929673 0.000000
+ *MESH_TVERT 819 0.838791 0.929673 0.000000
+ *MESH_TVERT 820 0.637731 0.851144 0.000000
+ *MESH_TVERT 821 0.686134 0.968937 0.000000
+ *MESH_TVERT 822 0.768048 0.800100 0.000000
+ *MESH_TVERT 823 0.838791 0.929673 0.000000
+ *MESH_TVERT 824 0.768048 0.800100 0.000000
+ *MESH_TVERT 825 0.768048 0.800100 0.000000
+ *MESH_TVERT 826 0.838791 0.929673 0.000000
+ *MESH_TVERT 827 0.838791 0.929673 0.000000
+ *MESH_TVERT 828 0.674964 0.670528 0.000000
+ *MESH_TVERT 829 0.768048 0.800100 0.000000
+ *MESH_TVERT 830 0.674964 0.670528 0.000000
+ *MESH_TVERT 831 0.674964 0.670528 0.000000
+ *MESH_TVERT 832 0.768048 0.800100 0.000000
+ *MESH_TVERT 833 0.768048 0.800100 0.000000
+ *MESH_TVERT 834 0.548371 0.537029 0.000000
+ *MESH_TVERT 835 0.674964 0.670528 0.000000
+ *MESH_TVERT 836 0.548371 0.537029 0.000000
+ *MESH_TVERT 837 0.548371 0.537029 0.000000
+ *MESH_TVERT 838 0.674964 0.670528 0.000000
+ *MESH_TVERT 839 0.674964 0.670528 0.000000
+ *MESH_TVERT 840 0.406884 0.588073 0.000000
+ *MESH_TVERT 841 0.548371 0.537029 0.000000
+ *MESH_TVERT 842 0.406884 0.588073 0.000000
+ *MESH_TVERT 843 0.406884 0.588073 0.000000
+ *MESH_TVERT 844 0.548371 0.537029 0.000000
+ *MESH_TVERT 845 0.548371 0.537029 0.000000
+ *MESH_TVERT 846 0.552094 0.733351 0.000000
+ *MESH_TVERT 847 0.406884 0.588073 0.000000
+ *MESH_TVERT 848 0.552094 0.733351 0.000000
+ *MESH_TVERT 849 0.552094 0.733351 0.000000
+ *MESH_TVERT 850 0.406884 0.588073 0.000000
+ *MESH_TVERT 851 0.406884 0.588073 0.000000
+ *MESH_TVERT 852 0.637731 0.851144 0.000000
+ *MESH_TVERT 853 0.552094 0.733351 0.000000
+ *MESH_TVERT 854 0.637731 0.851144 0.000000
+ *MESH_TVERT 855 0.637731 0.851144 0.000000
+ *MESH_TVERT 856 0.552094 0.733351 0.000000
+ *MESH_TVERT 857 0.552094 0.733351 0.000000
+ *MESH_TVERT 858 0.686134 0.968937 0.000000
+ *MESH_TVERT 859 0.637731 0.851144 0.000000
+ *MESH_TVERT 860 0.686134 0.968937 0.000000
+ *MESH_TVERT 861 0.686134 0.968937 0.000000
+ *MESH_TVERT 862 0.637731 0.851144 0.000000
+ *MESH_TVERT 863 0.637731 0.851144 0.000000
+ *MESH_TVERT 864 0.326306 0.370661 0.000000
+ *MESH_TVERT 865 0.355063 0.369147 0.000000
+ *MESH_TVERT 866 0.326306 0.370663 0.000000
+ *MESH_TVERT 867 0.326306 0.370661 0.000000
+ *MESH_TVERT 868 0.355062 0.369147 0.000000
+ *MESH_TVERT 869 0.355063 0.369147 0.000000
+ *MESH_TVERT 870 0.356541 0.387315 0.000000
+ *MESH_TVERT 871 0.326306 0.370663 0.000000
+ *MESH_TVERT 872 0.355063 0.369147 0.000000
+ *MESH_TVERT 873 0.356541 0.387315 0.000000
+ *MESH_TVERT 874 0.326306 0.512674 0.000000
+ *MESH_TVERT 875 0.326306 0.370663 0.000000
+ *MESH_TVERT 876 0.356541 0.387315 0.000000
+ *MESH_TVERT 877 0.801588 0.512948 0.000000
+ *MESH_TVERT 878 0.326306 0.512674 0.000000
+ *MESH_TVERT 879 0.356541 0.387315 0.000000
+ *MESH_TVERT 880 0.822147 0.464528 0.000000
+ *MESH_TVERT 881 0.801588 0.512948 0.000000
+ *MESH_TVERT 882 0.356541 0.387315 0.000000
+ *MESH_TVERT 883 0.822156 0.381259 0.000000
+ *MESH_TVERT 884 0.822147 0.464528 0.000000
+ *MESH_TVERT 885 0.356541 0.387315 0.000000
+ *MESH_TVERT 886 0.355062 0.369147 0.000000
+ *MESH_TVERT 887 0.326306 0.370661 0.000000
+ *MESH_TVERT 888 0.356541 0.387315 0.000000
+ *MESH_TVERT 889 0.326306 0.370661 0.000000
+ *MESH_TVERT 890 0.326307 0.512674 0.000000
+ *MESH_TVERT 891 0.356541 0.387315 0.000000
+ *MESH_TVERT 892 0.326307 0.512674 0.000000
+ *MESH_TVERT 893 0.801588 0.512948 0.000000
+ *MESH_TVERT 894 0.356541 0.387315 0.000000
+ *MESH_TVERT 895 0.801588 0.512948 0.000000
+ *MESH_TVERT 896 0.822147 0.464528 0.000000
+ *MESH_TVERT 897 0.356541 0.387315 0.000000
+ *MESH_TVERT 898 0.822147 0.464528 0.000000
+ *MESH_TVERT 899 0.822156 0.381259 0.000000
+ *MESH_TVERT 900 0.326307 0.512674 0.000000
+ *MESH_TVERT 901 0.326306 0.370663 0.000000
+ *MESH_TVERT 902 0.326306 0.512674 0.000000
+ *MESH_TVERT 903 0.326307 0.512674 0.000000
+ *MESH_TVERT 904 0.326306 0.370661 0.000000
+ *MESH_TVERT 905 0.326306 0.370663 0.000000
+ *MESH_TVERT 906 0.801588 0.512948 0.000000
+ *MESH_TVERT 907 0.326306 0.512674 0.000000
+ *MESH_TVERT 908 0.801588 0.512948 0.000000
+ *MESH_TVERT 909 0.801588 0.512948 0.000000
+ *MESH_TVERT 910 0.326307 0.512674 0.000000
+ *MESH_TVERT 911 0.326306 0.512674 0.000000
+ *MESH_TVERT 912 0.822147 0.464528 0.000000
+ *MESH_TVERT 913 0.801588 0.512948 0.000000
+ *MESH_TVERT 914 0.822147 0.464528 0.000000
+ *MESH_TVERT 915 0.822147 0.464528 0.000000
+ *MESH_TVERT 916 0.801588 0.512948 0.000000
+ *MESH_TVERT 917 0.801588 0.512948 0.000000
+ *MESH_TVERT 918 0.822156 0.381259 0.000000
+ *MESH_TVERT 919 0.822147 0.464528 0.000000
+ *MESH_TVERT 920 0.822156 0.381259 0.000000
+ *MESH_TVERT 921 0.822156 0.381259 0.000000
+ *MESH_TVERT 922 0.822147 0.464528 0.000000
+ *MESH_TVERT 923 0.822147 0.464528 0.000000
+ *MESH_TVERT 924 0.709882 0.251827 0.000000
+ *MESH_TVERT 925 0.641952 0.175357 0.000000
+ *MESH_TVERT 926 0.721155 0.223903 0.000000
+ *MESH_TVERT 927 0.709882 0.251827 0.000000
+ *MESH_TVERT 928 0.617764 0.204122 0.000000
+ *MESH_TVERT 929 0.641952 0.175357 0.000000
+ *MESH_TVERT 930 0.709882 0.251827 0.000000
+ *MESH_TVERT 931 0.602042 0.258626 0.000000
+ *MESH_TVERT 932 0.617764 0.204122 0.000000
+ *MESH_TVERT 933 0.709882 0.251827 0.000000
+ *MESH_TVERT 934 0.714508 0.294139 0.000000
+ *MESH_TVERT 935 0.602042 0.258626 0.000000
+ *MESH_TVERT 936 0.714508 0.294139 0.000000
+ *MESH_TVERT 937 0.466593 0.255598 0.000000
+ *MESH_TVERT 938 0.602042 0.258626 0.000000
+ *MESH_TVERT 939 0.714508 0.294139 0.000000
+ *MESH_TVERT 940 0.418219 0.263168 0.000000
+ *MESH_TVERT 941 0.466593 0.255598 0.000000
+ *MESH_TVERT 942 0.714508 0.294139 0.000000
+ *MESH_TVERT 943 0.350494 0.302531 0.000000
+ *MESH_TVERT 944 0.418219 0.263168 0.000000
+ *MESH_TVERT 945 0.714508 0.294139 0.000000
+ *MESH_TVERT 946 0.356541 0.387315 0.000000
+ *MESH_TVERT 947 0.350494 0.302531 0.000000
+ *MESH_TVERT 948 0.641952 0.175357 0.000000
+ *MESH_TVERT 949 0.687850 0.056160 0.000000
+ *MESH_TVERT 950 0.721155 0.223903 0.000000
+ *MESH_TVERT 951 0.687850 0.056160 0.000000
+ *MESH_TVERT 952 0.794332 0.087545 0.000000
+ *MESH_TVERT 953 0.721155 0.223903 0.000000
+ *MESH_TVERT 954 0.687850 0.056160 0.000000
+ *MESH_TVERT 955 0.691472 0.017098 0.000000
+ *MESH_TVERT 956 0.794332 0.087545 0.000000
+ *MESH_TVERT 957 0.714508 0.294139 0.000000
+ *MESH_TVERT 958 0.738054 0.323482 0.000000
+ *MESH_TVERT 959 0.356541 0.387315 0.000000
+ *MESH_TVERT 960 0.738054 0.323482 0.000000
+ *MESH_TVERT 961 0.799169 0.323727 0.000000
+ *MESH_TVERT 962 0.356541 0.387315 0.000000
+ *MESH_TVERT 963 0.799169 0.323727 0.000000
+ *MESH_TVERT 964 0.822156 0.381259 0.000000
+ *MESH_TVERT 965 0.356541 0.387315 0.000000
+ *MESH_TVERT 966 0.709882 0.251827 0.000000
+ *MESH_TVERT 967 0.721155 0.223903 0.000000
+ *MESH_TVERT 968 0.641952 0.175357 0.000000
+ *MESH_TVERT 969 0.709882 0.251827 0.000000
+ *MESH_TVERT 970 0.641952 0.175357 0.000000
+ *MESH_TVERT 971 0.617764 0.204122 0.000000
+ *MESH_TVERT 972 0.709882 0.251827 0.000000
+ *MESH_TVERT 973 0.617764 0.204122 0.000000
+ *MESH_TVERT 974 0.602042 0.258626 0.000000
+ *MESH_TVERT 975 0.709882 0.251827 0.000000
+ *MESH_TVERT 976 0.602042 0.258626 0.000000
+ *MESH_TVERT 977 0.714508 0.294139 0.000000
+ *MESH_TVERT 978 0.714508 0.294139 0.000000
+ *MESH_TVERT 979 0.602042 0.258626 0.000000
+ *MESH_TVERT 980 0.466593 0.255598 0.000000
+ *MESH_TVERT 981 0.714508 0.294139 0.000000
+ *MESH_TVERT 982 0.466593 0.255598 0.000000
+ *MESH_TVERT 983 0.418219 0.263168 0.000000
+ *MESH_TVERT 984 0.714508 0.294139 0.000000
+ *MESH_TVERT 985 0.418219 0.263168 0.000000
+ *MESH_TVERT 986 0.350494 0.302531 0.000000
+ *MESH_TVERT 987 0.714508 0.294139 0.000000
+ *MESH_TVERT 988 0.350494 0.302531 0.000000
+ *MESH_TVERT 989 0.356541 0.387315 0.000000
+ *MESH_TVERT 990 0.641952 0.175357 0.000000
+ *MESH_TVERT 991 0.721155 0.223903 0.000000
+ *MESH_TVERT 992 0.687850 0.056160 0.000000
+ *MESH_TVERT 993 0.687850 0.056160 0.000000
+ *MESH_TVERT 994 0.721155 0.223903 0.000000
+ *MESH_TVERT 995 0.794332 0.087545 0.000000
+ *MESH_TVERT 996 0.687850 0.056160 0.000000
+ *MESH_TVERT 997 0.794332 0.087545 0.000000
+ *MESH_TVERT 998 0.691472 0.017098 0.000000
+ *MESH_TVERT 999 0.714508 0.294139 0.000000
+ *MESH_TVERT 1000 0.356541 0.387315 0.000000
+ *MESH_TVERT 1001 0.738054 0.323482 0.000000
+ *MESH_TVERT 1002 0.738054 0.323482 0.000000
+ *MESH_TVERT 1003 0.356541 0.387315 0.000000
+ *MESH_TVERT 1004 0.799169 0.323727 0.000000
+ *MESH_TVERT 1005 0.799169 0.323727 0.000000
+ *MESH_TVERT 1006 0.356541 0.387315 0.000000
+ *MESH_TVERT 1007 0.822156 0.381259 0.000000
+ *MESH_TVERT 1008 0.799169 0.323727 0.000000
+ *MESH_TVERT 1009 0.822156 0.381259 0.000000
+ *MESH_TVERT 1010 0.799169 0.323727 0.000000
+ *MESH_TVERT 1011 0.799169 0.323727 0.000000
+ *MESH_TVERT 1012 0.822156 0.381259 0.000000
+ *MESH_TVERT 1013 0.822156 0.381259 0.000000
+ *MESH_TVERT 1014 0.738054 0.323482 0.000000
+ *MESH_TVERT 1015 0.799169 0.323727 0.000000
+ *MESH_TVERT 1016 0.738054 0.323482 0.000000
+ *MESH_TVERT 1017 0.738054 0.323482 0.000000
+ *MESH_TVERT 1018 0.799169 0.323727 0.000000
+ *MESH_TVERT 1019 0.799169 0.323727 0.000000
+ *MESH_TVERT 1020 0.714508 0.294139 0.000000
+ *MESH_TVERT 1021 0.738054 0.323482 0.000000
+ *MESH_TVERT 1022 0.714508 0.294139 0.000000
+ *MESH_TVERT 1023 0.714508 0.294139 0.000000
+ *MESH_TVERT 1024 0.738054 0.323482 0.000000
+ *MESH_TVERT 1025 0.738054 0.323482 0.000000
+ *MESH_TVERT 1026 0.709882 0.251827 0.000000
+ *MESH_TVERT 1027 0.714508 0.294139 0.000000
+ *MESH_TVERT 1028 0.709882 0.251827 0.000000
+ *MESH_TVERT 1029 0.709882 0.251827 0.000000
+ *MESH_TVERT 1030 0.714508 0.294139 0.000000
+ *MESH_TVERT 1031 0.714508 0.294139 0.000000
+ *MESH_TVERT 1032 0.721155 0.223903 0.000000
+ *MESH_TVERT 1033 0.709882 0.251827 0.000000
+ *MESH_TVERT 1034 0.721155 0.223903 0.000000
+ *MESH_TVERT 1035 0.721155 0.223903 0.000000
+ *MESH_TVERT 1036 0.709882 0.251827 0.000000
+ *MESH_TVERT 1037 0.709882 0.251827 0.000000
+ *MESH_TVERT 1038 0.794332 0.087545 0.000000
+ *MESH_TVERT 1039 0.721155 0.223903 0.000000
+ *MESH_TVERT 1040 0.794332 0.087545 0.000000
+ *MESH_TVERT 1041 0.794332 0.087545 0.000000
+ *MESH_TVERT 1042 0.721155 0.223903 0.000000
+ *MESH_TVERT 1043 0.721155 0.223903 0.000000
+ *MESH_TVERT 1044 0.691472 0.017098 0.000000
+ *MESH_TVERT 1045 0.794332 0.087545 0.000000
+ *MESH_TVERT 1046 0.691472 0.017098 0.000000
+ *MESH_TVERT 1047 0.691472 0.017098 0.000000
+ *MESH_TVERT 1048 0.794332 0.087545 0.000000
+ *MESH_TVERT 1049 0.794332 0.087545 0.000000
+ *MESH_TVERT 1050 0.687850 0.056160 0.000000
+ *MESH_TVERT 1051 0.691472 0.017098 0.000000
+ *MESH_TVERT 1052 0.687850 0.056160 0.000000
+ *MESH_TVERT 1053 0.687850 0.056160 0.000000
+ *MESH_TVERT 1054 0.691472 0.017098 0.000000
+ *MESH_TVERT 1055 0.691472 0.017098 0.000000
+ *MESH_TVERT 1056 0.641952 0.175357 0.000000
+ *MESH_TVERT 1057 0.687850 0.056160 0.000000
+ *MESH_TVERT 1058 0.641952 0.175357 0.000000
+ *MESH_TVERT 1059 0.641952 0.175357 0.000000
+ *MESH_TVERT 1060 0.687850 0.056160 0.000000
+ *MESH_TVERT 1061 0.687850 0.056160 0.000000
+ *MESH_TVERT 1062 0.617764 0.204122 0.000000
+ *MESH_TVERT 1063 0.641952 0.175357 0.000000
+ *MESH_TVERT 1064 0.617764 0.204122 0.000000
+ *MESH_TVERT 1065 0.617764 0.204122 0.000000
+ *MESH_TVERT 1066 0.641952 0.175357 0.000000
+ *MESH_TVERT 1067 0.641952 0.175357 0.000000
+ *MESH_TVERT 1068 0.602042 0.258626 0.000000
+ *MESH_TVERT 1069 0.617764 0.204122 0.000000
+ *MESH_TVERT 1070 0.602042 0.258626 0.000000
+ *MESH_TVERT 1071 0.602042 0.258626 0.000000
+ *MESH_TVERT 1072 0.617764 0.204122 0.000000
+ *MESH_TVERT 1073 0.617764 0.204122 0.000000
+ *MESH_TVERT 1074 0.466593 0.255598 0.000000
+ *MESH_TVERT 1075 0.602042 0.258626 0.000000
+ *MESH_TVERT 1076 0.466593 0.255598 0.000000
+ *MESH_TVERT 1077 0.466593 0.255598 0.000000
+ *MESH_TVERT 1078 0.602042 0.258626 0.000000
+ *MESH_TVERT 1079 0.602042 0.258626 0.000000
+ *MESH_TVERT 1080 0.418219 0.263168 0.000000
+ *MESH_TVERT 1081 0.466593 0.255598 0.000000
+ *MESH_TVERT 1082 0.418219 0.263168 0.000000
+ *MESH_TVERT 1083 0.418219 0.263168 0.000000
+ *MESH_TVERT 1084 0.466593 0.255598 0.000000
+ *MESH_TVERT 1085 0.466593 0.255598 0.000000
+ *MESH_TVERT 1086 0.350494 0.302531 0.000000
+ *MESH_TVERT 1087 0.418219 0.263168 0.000000
+ *MESH_TVERT 1088 0.350494 0.302531 0.000000
+ *MESH_TVERT 1089 0.350494 0.302531 0.000000
+ *MESH_TVERT 1090 0.418219 0.263168 0.000000
+ *MESH_TVERT 1091 0.418219 0.263168 0.000000
+ *MESH_TVERT 1092 0.356541 0.387315 0.000000
+ *MESH_TVERT 1093 0.350494 0.302531 0.000000
+ *MESH_TVERT 1094 0.356541 0.387315 0.000000
+ *MESH_TVERT 1095 0.356541 0.387315 0.000000
+ *MESH_TVERT 1096 0.350494 0.302531 0.000000
+ *MESH_TVERT 1097 0.350494 0.302531 0.000000
+ }
+ *MESH_NUMTVFACES 366
+ *MESH_TFACELIST {
+ *MESH_TFACE 0 0 1 2
+ *MESH_TFACE 1 3 4 5
+ *MESH_TFACE 2 6 7 8
+ *MESH_TFACE 3 9 10 11
+ *MESH_TFACE 4 12 13 14
+ *MESH_TFACE 5 15 16 17
+ *MESH_TFACE 6 18 19 20
+ *MESH_TFACE 7 21 22 23
+ *MESH_TFACE 8 24 25 26
+ *MESH_TFACE 9 27 28 29
+ *MESH_TFACE 10 30 31 32
+ *MESH_TFACE 11 33 34 35
+ *MESH_TFACE 12 36 37 38
+ *MESH_TFACE 13 39 40 41
+ *MESH_TFACE 14 42 43 44
+ *MESH_TFACE 15 45 46 47
+ *MESH_TFACE 16 48 49 50
+ *MESH_TFACE 17 51 52 53
+ *MESH_TFACE 18 54 55 56
+ *MESH_TFACE 19 57 58 59
+ *MESH_TFACE 20 60 61 62
+ *MESH_TFACE 21 63 64 65
+ *MESH_TFACE 22 66 67 68
+ *MESH_TFACE 23 69 70 71
+ *MESH_TFACE 24 72 73 74
+ *MESH_TFACE 25 75 76 77
+ *MESH_TFACE 26 78 79 80
+ *MESH_TFACE 27 81 82 83
+ *MESH_TFACE 28 84 85 86
+ *MESH_TFACE 29 87 88 89
+ *MESH_TFACE 30 90 91 92
+ *MESH_TFACE 31 93 94 95
+ *MESH_TFACE 32 96 97 98
+ *MESH_TFACE 33 99 100 101
+ *MESH_TFACE 34 102 103 104
+ *MESH_TFACE 35 105 106 107
+ *MESH_TFACE 36 108 109 110
+ *MESH_TFACE 37 111 112 113
+ *MESH_TFACE 38 114 115 116
+ *MESH_TFACE 39 117 118 119
+ *MESH_TFACE 40 120 121 122
+ *MESH_TFACE 41 123 124 125
+ *MESH_TFACE 42 126 127 128
+ *MESH_TFACE 43 129 130 131
+ *MESH_TFACE 44 132 133 134
+ *MESH_TFACE 45 135 136 137
+ *MESH_TFACE 46 138 139 140
+ *MESH_TFACE 47 141 142 143
+ *MESH_TFACE 48 144 145 146
+ *MESH_TFACE 49 147 148 149
+ *MESH_TFACE 50 150 151 152
+ *MESH_TFACE 51 153 154 155
+ *MESH_TFACE 52 156 157 158
+ *MESH_TFACE 53 159 160 161
+ *MESH_TFACE 54 162 163 164
+ *MESH_TFACE 55 165 166 167
+ *MESH_TFACE 56 168 169 170
+ *MESH_TFACE 57 171 172 173
+ *MESH_TFACE 58 174 175 176
+ *MESH_TFACE 59 177 178 179
+ *MESH_TFACE 60 180 181 182
+ *MESH_TFACE 61 183 184 185
+ *MESH_TFACE 62 186 187 188
+ *MESH_TFACE 63 189 190 191
+ *MESH_TFACE 64 192 193 194
+ *MESH_TFACE 65 195 196 197
+ *MESH_TFACE 66 198 199 200
+ *MESH_TFACE 67 201 202 203
+ *MESH_TFACE 68 204 205 206
+ *MESH_TFACE 69 207 208 209
+ *MESH_TFACE 70 210 211 212
+ *MESH_TFACE 71 213 214 215
+ *MESH_TFACE 72 216 217 218
+ *MESH_TFACE 73 219 220 221
+ *MESH_TFACE 74 222 223 224
+ *MESH_TFACE 75 225 226 227
+ *MESH_TFACE 76 228 229 230
+ *MESH_TFACE 77 231 232 233
+ *MESH_TFACE 78 234 235 236
+ *MESH_TFACE 79 237 238 239
+ *MESH_TFACE 80 240 241 242
+ *MESH_TFACE 81 243 244 245
+ *MESH_TFACE 82 246 247 248
+ *MESH_TFACE 83 249 250 251
+ *MESH_TFACE 84 252 253 254
+ *MESH_TFACE 85 255 256 257
+ *MESH_TFACE 86 258 259 260
+ *MESH_TFACE 87 261 262 263
+ *MESH_TFACE 88 264 265 266
+ *MESH_TFACE 89 267 268 269
+ *MESH_TFACE 90 270 271 272
+ *MESH_TFACE 91 273 274 275
+ *MESH_TFACE 92 276 277 278
+ *MESH_TFACE 93 279 280 281
+ *MESH_TFACE 94 282 283 284
+ *MESH_TFACE 95 285 286 287
+ *MESH_TFACE 96 288 289 290
+ *MESH_TFACE 97 291 292 293
+ *MESH_TFACE 98 294 295 296
+ *MESH_TFACE 99 297 298 299
+ *MESH_TFACE 100 300 301 302
+ *MESH_TFACE 101 303 304 305
+ *MESH_TFACE 102 306 307 308
+ *MESH_TFACE 103 309 310 311
+ *MESH_TFACE 104 312 313 314
+ *MESH_TFACE 105 315 316 317
+ *MESH_TFACE 106 318 319 320
+ *MESH_TFACE 107 321 322 323
+ *MESH_TFACE 108 324 325 326
+ *MESH_TFACE 109 327 328 329
+ *MESH_TFACE 110 330 331 332
+ *MESH_TFACE 111 333 334 335
+ *MESH_TFACE 112 336 337 338
+ *MESH_TFACE 113 339 340 341
+ *MESH_TFACE 114 342 343 344
+ *MESH_TFACE 115 345 346 347
+ *MESH_TFACE 116 348 349 350
+ *MESH_TFACE 117 351 352 353
+ *MESH_TFACE 118 354 355 356
+ *MESH_TFACE 119 357 358 359
+ *MESH_TFACE 120 360 361 362
+ *MESH_TFACE 121 363 364 365
+ *MESH_TFACE 122 366 367 368
+ *MESH_TFACE 123 369 370 371
+ *MESH_TFACE 124 372 373 374
+ *MESH_TFACE 125 375 376 377
+ *MESH_TFACE 126 378 379 380
+ *MESH_TFACE 127 381 382 383
+ *MESH_TFACE 128 384 385 386
+ *MESH_TFACE 129 387 388 389
+ *MESH_TFACE 130 390 391 392
+ *MESH_TFACE 131 393 394 395
+ *MESH_TFACE 132 396 397 398
+ *MESH_TFACE 133 399 400 401
+ *MESH_TFACE 134 402 403 404
+ *MESH_TFACE 135 405 406 407
+ *MESH_TFACE 136 408 409 410
+ *MESH_TFACE 137 411 412 413
+ *MESH_TFACE 138 414 415 416
+ *MESH_TFACE 139 417 418 419
+ *MESH_TFACE 140 420 421 422
+ *MESH_TFACE 141 423 424 425
+ *MESH_TFACE 142 426 427 428
+ *MESH_TFACE 143 429 430 431
+ *MESH_TFACE 144 432 433 434
+ *MESH_TFACE 145 435 436 437
+ *MESH_TFACE 146 438 439 440
+ *MESH_TFACE 147 441 442 443
+ *MESH_TFACE 148 444 445 446
+ *MESH_TFACE 149 447 448 449
+ *MESH_TFACE 150 450 451 452
+ *MESH_TFACE 151 453 454 455
+ *MESH_TFACE 152 456 457 458
+ *MESH_TFACE 153 459 460 461
+ *MESH_TFACE 154 462 463 464
+ *MESH_TFACE 155 465 466 467
+ *MESH_TFACE 156 468 469 470
+ *MESH_TFACE 157 471 472 473
+ *MESH_TFACE 158 474 475 476
+ *MESH_TFACE 159 477 478 479
+ *MESH_TFACE 160 480 481 482
+ *MESH_TFACE 161 483 484 485
+ *MESH_TFACE 162 486 487 488
+ *MESH_TFACE 163 489 490 491
+ *MESH_TFACE 164 492 493 494
+ *MESH_TFACE 165 495 496 497
+ *MESH_TFACE 166 498 499 500
+ *MESH_TFACE 167 501 502 503
+ *MESH_TFACE 168 504 505 506
+ *MESH_TFACE 169 507 508 509
+ *MESH_TFACE 170 510 511 512
+ *MESH_TFACE 171 513 514 515
+ *MESH_TFACE 172 516 517 518
+ *MESH_TFACE 173 519 520 521
+ *MESH_TFACE 174 522 523 524
+ *MESH_TFACE 175 525 526 527
+ *MESH_TFACE 176 528 529 530
+ *MESH_TFACE 177 531 532 533
+ *MESH_TFACE 178 534 535 536
+ *MESH_TFACE 179 537 538 539
+ *MESH_TFACE 180 540 541 542
+ *MESH_TFACE 181 543 544 545
+ *MESH_TFACE 182 546 547 548
+ *MESH_TFACE 183 549 550 551
+ *MESH_TFACE 184 552 553 554
+ *MESH_TFACE 185 555 556 557
+ *MESH_TFACE 186 558 559 560
+ *MESH_TFACE 187 561 562 563
+ *MESH_TFACE 188 564 565 566
+ *MESH_TFACE 189 567 568 569
+ *MESH_TFACE 190 570 571 572
+ *MESH_TFACE 191 573 574 575
+ *MESH_TFACE 192 576 577 578
+ *MESH_TFACE 193 579 580 581
+ *MESH_TFACE 194 582 583 584
+ *MESH_TFACE 195 585 586 587
+ *MESH_TFACE 196 588 589 590
+ *MESH_TFACE 197 591 592 593
+ *MESH_TFACE 198 594 595 596
+ *MESH_TFACE 199 597 598 599
+ *MESH_TFACE 200 600 601 602
+ *MESH_TFACE 201 603 604 605
+ *MESH_TFACE 202 606 607 608
+ *MESH_TFACE 203 609 610 611
+ *MESH_TFACE 204 612 613 614
+ *MESH_TFACE 205 615 616 617
+ *MESH_TFACE 206 618 619 620
+ *MESH_TFACE 207 621 622 623
+ *MESH_TFACE 208 624 625 626
+ *MESH_TFACE 209 627 628 629
+ *MESH_TFACE 210 630 631 632
+ *MESH_TFACE 211 633 634 635
+ *MESH_TFACE 212 636 637 638
+ *MESH_TFACE 213 639 640 641
+ *MESH_TFACE 214 642 643 644
+ *MESH_TFACE 215 645 646 647
+ *MESH_TFACE 216 648 649 650
+ *MESH_TFACE 217 651 652 653
+ *MESH_TFACE 218 654 655 656
+ *MESH_TFACE 219 657 658 659
+ *MESH_TFACE 220 660 661 662
+ *MESH_TFACE 221 663 664 665
+ *MESH_TFACE 222 666 667 668
+ *MESH_TFACE 223 669 670 671
+ *MESH_TFACE 224 672 673 674
+ *MESH_TFACE 225 675 676 677
+ *MESH_TFACE 226 678 679 680
+ *MESH_TFACE 227 681 682 683
+ *MESH_TFACE 228 684 685 686
+ *MESH_TFACE 229 687 688 689
+ *MESH_TFACE 230 690 691 692
+ *MESH_TFACE 231 693 694 695
+ *MESH_TFACE 232 696 697 698
+ *MESH_TFACE 233 699 700 701
+ *MESH_TFACE 234 702 703 704
+ *MESH_TFACE 235 705 706 707
+ *MESH_TFACE 236 708 709 710
+ *MESH_TFACE 237 711 712 713
+ *MESH_TFACE 238 714 715 716
+ *MESH_TFACE 239 717 718 719
+ *MESH_TFACE 240 720 721 722
+ *MESH_TFACE 241 723 724 725
+ *MESH_TFACE 242 726 727 728
+ *MESH_TFACE 243 729 730 731
+ *MESH_TFACE 244 732 733 734
+ *MESH_TFACE 245 735 736 737
+ *MESH_TFACE 246 738 739 740
+ *MESH_TFACE 247 741 742 743
+ *MESH_TFACE 248 744 745 746
+ *MESH_TFACE 249 747 748 749
+ *MESH_TFACE 250 750 751 752
+ *MESH_TFACE 251 753 754 755
+ *MESH_TFACE 252 756 757 758
+ *MESH_TFACE 253 759 760 761
+ *MESH_TFACE 254 762 763 764
+ *MESH_TFACE 255 765 766 767
+ *MESH_TFACE 256 768 769 770
+ *MESH_TFACE 257 771 772 773
+ *MESH_TFACE 258 774 775 776
+ *MESH_TFACE 259 777 778 779
+ *MESH_TFACE 260 780 781 782
+ *MESH_TFACE 261 783 784 785
+ *MESH_TFACE 262 786 787 788
+ *MESH_TFACE 263 789 790 791
+ *MESH_TFACE 264 792 793 794
+ *MESH_TFACE 265 795 796 797
+ *MESH_TFACE 266 798 799 800
+ *MESH_TFACE 267 801 802 803
+ *MESH_TFACE 268 804 805 806
+ *MESH_TFACE 269 807 808 809
+ *MESH_TFACE 270 810 811 812
+ *MESH_TFACE 271 813 814 815
+ *MESH_TFACE 272 816 817 818
+ *MESH_TFACE 273 819 820 821
+ *MESH_TFACE 274 822 823 824
+ *MESH_TFACE 275 825 826 827
+ *MESH_TFACE 276 828 829 830
+ *MESH_TFACE 277 831 832 833
+ *MESH_TFACE 278 834 835 836
+ *MESH_TFACE 279 837 838 839
+ *MESH_TFACE 280 840 841 842
+ *MESH_TFACE 281 843 844 845
+ *MESH_TFACE 282 846 847 848
+ *MESH_TFACE 283 849 850 851
+ *MESH_TFACE 284 852 853 854
+ *MESH_TFACE 285 855 856 857
+ *MESH_TFACE 286 858 859 860
+ *MESH_TFACE 287 861 862 863
+ *MESH_TFACE 288 864 865 866
+ *MESH_TFACE 289 867 868 869
+ *MESH_TFACE 290 870 871 872
+ *MESH_TFACE 291 873 874 875
+ *MESH_TFACE 292 876 877 878
+ *MESH_TFACE 293 879 880 881
+ *MESH_TFACE 294 882 883 884
+ *MESH_TFACE 295 885 886 887
+ *MESH_TFACE 296 888 889 890
+ *MESH_TFACE 297 891 892 893
+ *MESH_TFACE 298 894 895 896
+ *MESH_TFACE 299 897 898 899
+ *MESH_TFACE 300 900 901 902
+ *MESH_TFACE 301 903 904 905
+ *MESH_TFACE 302 906 907 908
+ *MESH_TFACE 303 909 910 911
+ *MESH_TFACE 304 912 913 914
+ *MESH_TFACE 305 915 916 917
+ *MESH_TFACE 306 918 919 920
+ *MESH_TFACE 307 921 922 923
+ *MESH_TFACE 308 924 925 926
+ *MESH_TFACE 309 927 928 929
+ *MESH_TFACE 310 930 931 932
+ *MESH_TFACE 311 933 934 935
+ *MESH_TFACE 312 936 937 938
+ *MESH_TFACE 313 939 940 941
+ *MESH_TFACE 314 942 943 944
+ *MESH_TFACE 315 945 946 947
+ *MESH_TFACE 316 948 949 950
+ *MESH_TFACE 317 951 952 953
+ *MESH_TFACE 318 954 955 956
+ *MESH_TFACE 319 957 958 959
+ *MESH_TFACE 320 960 961 962
+ *MESH_TFACE 321 963 964 965
+ *MESH_TFACE 322 966 967 968
+ *MESH_TFACE 323 969 970 971
+ *MESH_TFACE 324 972 973 974
+ *MESH_TFACE 325 975 976 977
+ *MESH_TFACE 326 978 979 980
+ *MESH_TFACE 327 981 982 983
+ *MESH_TFACE 328 984 985 986
+ *MESH_TFACE 329 987 988 989
+ *MESH_TFACE 330 990 991 992
+ *MESH_TFACE 331 993 994 995
+ *MESH_TFACE 332 996 997 998
+ *MESH_TFACE 333 999 1000 1001
+ *MESH_TFACE 334 1002 1003 1004
+ *MESH_TFACE 335 1005 1006 1007
+ *MESH_TFACE 336 1008 1009 1010
+ *MESH_TFACE 337 1011 1012 1013
+ *MESH_TFACE 338 1014 1015 1016
+ *MESH_TFACE 339 1017 1018 1019
+ *MESH_TFACE 340 1020 1021 1022
+ *MESH_TFACE 341 1023 1024 1025
+ *MESH_TFACE 342 1026 1027 1028
+ *MESH_TFACE 343 1029 1030 1031
+ *MESH_TFACE 344 1032 1033 1034
+ *MESH_TFACE 345 1035 1036 1037
+ *MESH_TFACE 346 1038 1039 1040
+ *MESH_TFACE 347 1041 1042 1043
+ *MESH_TFACE 348 1044 1045 1046
+ *MESH_TFACE 349 1047 1048 1049
+ *MESH_TFACE 350 1050 1051 1052
+ *MESH_TFACE 351 1053 1054 1055
+ *MESH_TFACE 352 1056 1057 1058
+ *MESH_TFACE 353 1059 1060 1061
+ *MESH_TFACE 354 1062 1063 1064
+ *MESH_TFACE 355 1065 1066 1067
+ *MESH_TFACE 356 1068 1069 1070
+ *MESH_TFACE 357 1071 1072 1073
+ *MESH_TFACE 358 1074 1075 1076
+ *MESH_TFACE 359 1077 1078 1079
+ *MESH_TFACE 360 1080 1081 1082
+ *MESH_TFACE 361 1083 1084 1085
+ *MESH_TFACE 362 1086 1087 1088
+ *MESH_TFACE 363 1089 1090 1091
+ *MESH_TFACE 364 1092 1093 1094
+ *MESH_TFACE 365 1095 1096 1097
+ }
+ *MESH_NUMCVERTEX 1098
+ *MESH_CVERTLIST {
+ *MESH_VERTCOL 0 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 2 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 3 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 4 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 5 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 6 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 7 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 8 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 9 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 10 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 11 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 12 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 13 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 14 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 15 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 16 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 17 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 18 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 19 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 20 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 21 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 22 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 23 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 24 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 25 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 26 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 27 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 28 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 29 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 30 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 31 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 32 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 33 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 34 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 35 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 36 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 37 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 38 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 39 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 40 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 41 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 42 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 43 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 44 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 45 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 46 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 47 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 48 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 49 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 50 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 51 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 52 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 53 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 54 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 55 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 56 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 57 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 58 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 59 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 60 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 61 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 62 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 63 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 64 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 65 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 66 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 67 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 68 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 69 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 70 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 71 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 72 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 73 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 74 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 75 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 76 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 77 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 78 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 79 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 80 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 81 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 82 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 83 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 84 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 85 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 86 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 87 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 88 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 89 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 90 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 91 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 92 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 93 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 94 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 95 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 96 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 97 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 98 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 99 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 100 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 101 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 102 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 103 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 104 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 105 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 106 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 107 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 108 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 109 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 110 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 111 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 112 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 113 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 114 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 115 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 116 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 117 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 118 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 119 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 120 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 121 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 122 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 123 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 124 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 125 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 126 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 127 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 128 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 129 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 130 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 131 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 132 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 133 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 134 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 135 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 136 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 137 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 138 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 139 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 140 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 141 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 142 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 143 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 144 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 145 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 146 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 147 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 148 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 149 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 150 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 151 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 152 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 153 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 154 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 155 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 156 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 157 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 158 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 159 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 160 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 161 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 162 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 163 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 164 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 165 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 166 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 167 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 168 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 169 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 170 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 171 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 172 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 173 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 174 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 175 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 176 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 177 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 178 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 179 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 180 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 181 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 182 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 183 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 184 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 185 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 186 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 187 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 188 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 189 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 190 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 191 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 192 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 193 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 194 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 195 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 196 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 197 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 198 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 199 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 200 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 201 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 202 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 203 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 204 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 205 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 206 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 207 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 208 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 209 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 210 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 211 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 212 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 213 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 214 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 215 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 216 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 217 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 218 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 219 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 220 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 221 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 222 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 223 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 224 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 225 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 226 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 227 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 228 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 229 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 230 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 231 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 232 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 233 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 234 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 235 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 236 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 237 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 238 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 239 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 240 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 241 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 242 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 243 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 244 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 245 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 246 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 247 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 248 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 249 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 250 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 251 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 252 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 253 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 254 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 255 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 256 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 257 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 258 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 259 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 260 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 261 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 262 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 263 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 264 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 265 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 266 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 267 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 268 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 269 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 270 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 271 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 272 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 273 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 274 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 275 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 276 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 277 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 278 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 279 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 280 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 281 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 282 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 283 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 284 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 285 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 286 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 287 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 288 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 289 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 290 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 291 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 292 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 293 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 294 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 295 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 296 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 297 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 298 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 299 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 300 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 301 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 302 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 303 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 304 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 305 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 306 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 307 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 308 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 309 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 310 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 311 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 312 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 313 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 314 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 315 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 316 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 317 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 318 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 319 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 320 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 321 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 322 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 323 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 324 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 325 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 326 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 327 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 328 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 329 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 330 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 331 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 332 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 333 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 334 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 335 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 336 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 337 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 338 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 339 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 340 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 341 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 342 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 343 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 344 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 345 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 346 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 347 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 348 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 349 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 350 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 351 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 352 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 353 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 354 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 355 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 356 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 357 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 358 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 359 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 360 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 361 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 362 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 363 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 364 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 365 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 366 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 367 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 368 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 369 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 370 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 371 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 372 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 373 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 374 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 375 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 376 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 377 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 378 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 379 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 380 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 381 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 382 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 383 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 384 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 385 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 386 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 387 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 388 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 389 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 390 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 391 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 392 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 393 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 394 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 395 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 396 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 397 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 398 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 399 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 400 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 401 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 402 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 403 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 404 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 405 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 406 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 407 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 408 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 409 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 410 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 411 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 412 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 413 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 414 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 415 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 416 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 417 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 418 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 419 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 420 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 421 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 422 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 423 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 424 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 425 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 426 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 427 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 428 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 429 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 430 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 431 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 432 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 433 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 434 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 435 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 436 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 437 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 438 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 439 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 440 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 441 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 442 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 443 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 444 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 445 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 446 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 447 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 448 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 449 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 450 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 451 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 452 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 453 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 454 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 455 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 456 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 457 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 458 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 459 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 460 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 461 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 462 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 463 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 464 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 465 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 466 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 467 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 468 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 469 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 470 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 471 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 472 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 473 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 474 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 475 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 476 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 477 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 478 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 479 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 480 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 481 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 482 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 483 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 484 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 485 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 486 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 487 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 488 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 489 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 490 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 491 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 492 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 493 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 494 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 495 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 496 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 497 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 498 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 499 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 500 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 501 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 502 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 503 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 504 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 505 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 506 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 507 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 508 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 509 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 510 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 511 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 512 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 513 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 514 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 515 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 516 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 517 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 518 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 519 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 520 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 521 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 522 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 523 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 524 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 525 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 526 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 527 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 528 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 529 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 530 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 531 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 532 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 533 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 534 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 535 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 536 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 537 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 538 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 539 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 540 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 541 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 542 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 543 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 544 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 545 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 546 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 547 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 548 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 549 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 550 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 551 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 552 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 553 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 554 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 555 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 556 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 557 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 558 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 559 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 560 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 561 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 562 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 563 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 564 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 565 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 566 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 567 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 568 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 569 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 570 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 571 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 572 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 573 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 574 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 575 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 576 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 577 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 578 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 579 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 580 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 581 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 582 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 583 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 584 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 585 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 586 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 587 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 588 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 589 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 590 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 591 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 592 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 593 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 594 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 595 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 596 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 597 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 598 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 599 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 600 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 601 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 602 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 603 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 604 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 605 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 606 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 607 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 608 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 609 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 610 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 611 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 612 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 613 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 614 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 615 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 616 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 617 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 618 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 619 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 620 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 621 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 622 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 623 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 624 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 625 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 626 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 627 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 628 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 629 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 630 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 631 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 632 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 633 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 634 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 635 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 636 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 637 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 638 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 639 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 640 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 641 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 642 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 643 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 644 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 645 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 646 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 647 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 648 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 649 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 650 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 651 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 652 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 653 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 654 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 655 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 656 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 657 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 658 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 659 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 660 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 661 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 662 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 663 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 664 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 665 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 666 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 667 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 668 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 669 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 670 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 671 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 672 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 673 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 674 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 675 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 676 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 677 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 678 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 679 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 680 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 681 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 682 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 683 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 684 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 685 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 686 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 687 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 688 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 689 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 690 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 691 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 692 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 693 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 694 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 695 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 696 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 697 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 698 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 699 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 700 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 701 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 702 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 703 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 704 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 705 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 706 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 707 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 708 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 709 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 710 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 711 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 712 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 713 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 714 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 715 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 716 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 717 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 718 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 719 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 720 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 721 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 722 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 723 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 724 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 725 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 726 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 727 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 728 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 729 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 730 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 731 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 732 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 733 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 734 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 735 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 736 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 737 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 738 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 739 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 740 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 741 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 742 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 743 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 744 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 745 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 746 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 747 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 748 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 749 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 750 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 751 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 752 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 753 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 754 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 755 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 756 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 757 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 758 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 759 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 760 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 761 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 762 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 763 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 764 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 765 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 766 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 767 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 768 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 769 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 770 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 771 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 772 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 773 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 774 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 775 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 776 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 777 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 778 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 779 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 780 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 781 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 782 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 783 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 784 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 785 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 786 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 787 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 788 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 789 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 790 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 791 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 792 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 793 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 794 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 795 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 796 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 797 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 798 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 799 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 800 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 801 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 802 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 803 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 804 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 805 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 806 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 807 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 808 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 809 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 810 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 811 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 812 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 813 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 814 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 815 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 816 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 817 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 818 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 819 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 820 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 821 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 822 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 823 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 824 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 825 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 826 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 827 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 828 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 829 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 830 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 831 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 832 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 833 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 834 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 835 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 836 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 837 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 838 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 839 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 840 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 841 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 842 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 843 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 844 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 845 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 846 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 847 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 848 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 849 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 850 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 851 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 852 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 853 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 854 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 855 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 856 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 857 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 858 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 859 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 860 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 861 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 862 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 863 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 864 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 865 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 866 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 867 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 868 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 869 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 870 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 871 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 872 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 873 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 874 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 875 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 876 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 877 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 878 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 879 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 880 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 881 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 882 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 883 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 884 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 885 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 886 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 887 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 888 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 889 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 890 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 891 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 892 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 893 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 894 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 895 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 896 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 897 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 898 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 899 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 900 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 901 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 902 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 903 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 904 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 905 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 906 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 907 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 908 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 909 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 910 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 911 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 912 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 913 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 914 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 915 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 916 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 917 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 918 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 919 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 920 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 921 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 922 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 923 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 924 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 925 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 926 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 927 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 928 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 929 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 930 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 931 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 932 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 933 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 934 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 935 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 936 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 937 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 938 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 939 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 940 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 941 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 942 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 943 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 944 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 945 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 946 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 947 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 948 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 949 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 950 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 951 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 952 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 953 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 954 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 955 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 956 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 957 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 958 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 959 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 960 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 961 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 962 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 963 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 964 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 965 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 966 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 967 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 968 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 969 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 970 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 971 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 972 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 973 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 974 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 975 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 976 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 977 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 978 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 979 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 980 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 981 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 982 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 983 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 984 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 985 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 986 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 987 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 988 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 989 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 990 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 991 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 992 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 993 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 994 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 995 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 996 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 997 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 998 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 999 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1000 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1001 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1002 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1003 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1004 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1005 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1006 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1007 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1008 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1009 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1010 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1011 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1012 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1013 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1014 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1015 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1016 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1017 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1018 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1019 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1020 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1021 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1022 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1023 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1024 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1025 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1026 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1027 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1028 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1029 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1030 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1031 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1032 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1033 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1034 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1035 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1036 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1037 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1038 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1039 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1040 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1041 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1042 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1043 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1044 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1045 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1046 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1047 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1048 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1049 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1050 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1051 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1052 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1053 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1054 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1055 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1056 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1057 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1058 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1059 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1060 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1061 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1062 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1063 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1064 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1065 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1066 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1067 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1068 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1069 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1070 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1071 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1072 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1073 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1074 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1075 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1076 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1077 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1078 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1079 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1080 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1081 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1082 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1083 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1084 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1085 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1086 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1087 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1088 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1089 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1090 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1091 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1092 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1093 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1094 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1095 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1096 0.878431 0.878431 0.878431
+ *MESH_VERTCOL 1097 0.878431 0.878431 0.878431
+ }
+ *MESH_NUMCVFACES 366
+ *MESH_CFACELIST {
+ *MESH_CFACE 0 0 1 2
+ *MESH_CFACE 1 3 4 5
+ *MESH_CFACE 2 6 7 8
+ *MESH_CFACE 3 9 10 11
+ *MESH_CFACE 4 12 13 14
+ *MESH_CFACE 5 15 16 17
+ *MESH_CFACE 6 18 19 20
+ *MESH_CFACE 7 21 22 23
+ *MESH_CFACE 8 24 25 26
+ *MESH_CFACE 9 27 28 29
+ *MESH_CFACE 10 30 31 32
+ *MESH_CFACE 11 33 34 35
+ *MESH_CFACE 12 36 37 38
+ *MESH_CFACE 13 39 40 41
+ *MESH_CFACE 14 42 43 44
+ *MESH_CFACE 15 45 46 47
+ *MESH_CFACE 16 48 49 50
+ *MESH_CFACE 17 51 52 53
+ *MESH_CFACE 18 54 55 56
+ *MESH_CFACE 19 57 58 59
+ *MESH_CFACE 20 60 61 62
+ *MESH_CFACE 21 63 64 65
+ *MESH_CFACE 22 66 67 68
+ *MESH_CFACE 23 69 70 71
+ *MESH_CFACE 24 72 73 74
+ *MESH_CFACE 25 75 76 77
+ *MESH_CFACE 26 78 79 80
+ *MESH_CFACE 27 81 82 83
+ *MESH_CFACE 28 84 85 86
+ *MESH_CFACE 29 87 88 89
+ *MESH_CFACE 30 90 91 92
+ *MESH_CFACE 31 93 94 95
+ *MESH_CFACE 32 96 97 98
+ *MESH_CFACE 33 99 100 101
+ *MESH_CFACE 34 102 103 104
+ *MESH_CFACE 35 105 106 107
+ *MESH_CFACE 36 108 109 110
+ *MESH_CFACE 37 111 112 113
+ *MESH_CFACE 38 114 115 116
+ *MESH_CFACE 39 117 118 119
+ *MESH_CFACE 40 120 121 122
+ *MESH_CFACE 41 123 124 125
+ *MESH_CFACE 42 126 127 128
+ *MESH_CFACE 43 129 130 131
+ *MESH_CFACE 44 132 133 134
+ *MESH_CFACE 45 135 136 137
+ *MESH_CFACE 46 138 139 140
+ *MESH_CFACE 47 141 142 143
+ *MESH_CFACE 48 144 145 146
+ *MESH_CFACE 49 147 148 149
+ *MESH_CFACE 50 150 151 152
+ *MESH_CFACE 51 153 154 155
+ *MESH_CFACE 52 156 157 158
+ *MESH_CFACE 53 159 160 161
+ *MESH_CFACE 54 162 163 164
+ *MESH_CFACE 55 165 166 167
+ *MESH_CFACE 56 168 169 170
+ *MESH_CFACE 57 171 172 173
+ *MESH_CFACE 58 174 175 176
+ *MESH_CFACE 59 177 178 179
+ *MESH_CFACE 60 180 181 182
+ *MESH_CFACE 61 183 184 185
+ *MESH_CFACE 62 186 187 188
+ *MESH_CFACE 63 189 190 191
+ *MESH_CFACE 64 192 193 194
+ *MESH_CFACE 65 195 196 197
+ *MESH_CFACE 66 198 199 200
+ *MESH_CFACE 67 201 202 203
+ *MESH_CFACE 68 204 205 206
+ *MESH_CFACE 69 207 208 209
+ *MESH_CFACE 70 210 211 212
+ *MESH_CFACE 71 213 214 215
+ *MESH_CFACE 72 216 217 218
+ *MESH_CFACE 73 219 220 221
+ *MESH_CFACE 74 222 223 224
+ *MESH_CFACE 75 225 226 227
+ *MESH_CFACE 76 228 229 230
+ *MESH_CFACE 77 231 232 233
+ *MESH_CFACE 78 234 235 236
+ *MESH_CFACE 79 237 238 239
+ *MESH_CFACE 80 240 241 242
+ *MESH_CFACE 81 243 244 245
+ *MESH_CFACE 82 246 247 248
+ *MESH_CFACE 83 249 250 251
+ *MESH_CFACE 84 252 253 254
+ *MESH_CFACE 85 255 256 257
+ *MESH_CFACE 86 258 259 260
+ *MESH_CFACE 87 261 262 263
+ *MESH_CFACE 88 264 265 266
+ *MESH_CFACE 89 267 268 269
+ *MESH_CFACE 90 270 271 272
+ *MESH_CFACE 91 273 274 275
+ *MESH_CFACE 92 276 277 278
+ *MESH_CFACE 93 279 280 281
+ *MESH_CFACE 94 282 283 284
+ *MESH_CFACE 95 285 286 287
+ *MESH_CFACE 96 288 289 290
+ *MESH_CFACE 97 291 292 293
+ *MESH_CFACE 98 294 295 296
+ *MESH_CFACE 99 297 298 299
+ *MESH_CFACE 100 300 301 302
+ *MESH_CFACE 101 303 304 305
+ *MESH_CFACE 102 306 307 308
+ *MESH_CFACE 103 309 310 311
+ *MESH_CFACE 104 312 313 314
+ *MESH_CFACE 105 315 316 317
+ *MESH_CFACE 106 318 319 320
+ *MESH_CFACE 107 321 322 323
+ *MESH_CFACE 108 324 325 326
+ *MESH_CFACE 109 327 328 329
+ *MESH_CFACE 110 330 331 332
+ *MESH_CFACE 111 333 334 335
+ *MESH_CFACE 112 336 337 338
+ *MESH_CFACE 113 339 340 341
+ *MESH_CFACE 114 342 343 344
+ *MESH_CFACE 115 345 346 347
+ *MESH_CFACE 116 348 349 350
+ *MESH_CFACE 117 351 352 353
+ *MESH_CFACE 118 354 355 356
+ *MESH_CFACE 119 357 358 359
+ *MESH_CFACE 120 360 361 362
+ *MESH_CFACE 121 363 364 365
+ *MESH_CFACE 122 366 367 368
+ *MESH_CFACE 123 369 370 371
+ *MESH_CFACE 124 372 373 374
+ *MESH_CFACE 125 375 376 377
+ *MESH_CFACE 126 378 379 380
+ *MESH_CFACE 127 381 382 383
+ *MESH_CFACE 128 384 385 386
+ *MESH_CFACE 129 387 388 389
+ *MESH_CFACE 130 390 391 392
+ *MESH_CFACE 131 393 394 395
+ *MESH_CFACE 132 396 397 398
+ *MESH_CFACE 133 399 400 401
+ *MESH_CFACE 134 402 403 404
+ *MESH_CFACE 135 405 406 407
+ *MESH_CFACE 136 408 409 410
+ *MESH_CFACE 137 411 412 413
+ *MESH_CFACE 138 414 415 416
+ *MESH_CFACE 139 417 418 419
+ *MESH_CFACE 140 420 421 422
+ *MESH_CFACE 141 423 424 425
+ *MESH_CFACE 142 426 427 428
+ *MESH_CFACE 143 429 430 431
+ *MESH_CFACE 144 432 433 434
+ *MESH_CFACE 145 435 436 437
+ *MESH_CFACE 146 438 439 440
+ *MESH_CFACE 147 441 442 443
+ *MESH_CFACE 148 444 445 446
+ *MESH_CFACE 149 447 448 449
+ *MESH_CFACE 150 450 451 452
+ *MESH_CFACE 151 453 454 455
+ *MESH_CFACE 152 456 457 458
+ *MESH_CFACE 153 459 460 461
+ *MESH_CFACE 154 462 463 464
+ *MESH_CFACE 155 465 466 467
+ *MESH_CFACE 156 468 469 470
+ *MESH_CFACE 157 471 472 473
+ *MESH_CFACE 158 474 475 476
+ *MESH_CFACE 159 477 478 479
+ *MESH_CFACE 160 480 481 482
+ *MESH_CFACE 161 483 484 485
+ *MESH_CFACE 162 486 487 488
+ *MESH_CFACE 163 489 490 491
+ *MESH_CFACE 164 492 493 494
+ *MESH_CFACE 165 495 496 497
+ *MESH_CFACE 166 498 499 500
+ *MESH_CFACE 167 501 502 503
+ *MESH_CFACE 168 504 505 506
+ *MESH_CFACE 169 507 508 509
+ *MESH_CFACE 170 510 511 512
+ *MESH_CFACE 171 513 514 515
+ *MESH_CFACE 172 516 517 518
+ *MESH_CFACE 173 519 520 521
+ *MESH_CFACE 174 522 523 524
+ *MESH_CFACE 175 525 526 527
+ *MESH_CFACE 176 528 529 530
+ *MESH_CFACE 177 531 532 533
+ *MESH_CFACE 178 534 535 536
+ *MESH_CFACE 179 537 538 539
+ *MESH_CFACE 180 540 541 542
+ *MESH_CFACE 181 543 544 545
+ *MESH_CFACE 182 546 547 548
+ *MESH_CFACE 183 549 550 551
+ *MESH_CFACE 184 552 553 554
+ *MESH_CFACE 185 555 556 557
+ *MESH_CFACE 186 558 559 560
+ *MESH_CFACE 187 561 562 563
+ *MESH_CFACE 188 564 565 566
+ *MESH_CFACE 189 567 568 569
+ *MESH_CFACE 190 570 571 572
+ *MESH_CFACE 191 573 574 575
+ *MESH_CFACE 192 576 577 578
+ *MESH_CFACE 193 579 580 581
+ *MESH_CFACE 194 582 583 584
+ *MESH_CFACE 195 585 586 587
+ *MESH_CFACE 196 588 589 590
+ *MESH_CFACE 197 591 592 593
+ *MESH_CFACE 198 594 595 596
+ *MESH_CFACE 199 597 598 599
+ *MESH_CFACE 200 600 601 602
+ *MESH_CFACE 201 603 604 605
+ *MESH_CFACE 202 606 607 608
+ *MESH_CFACE 203 609 610 611
+ *MESH_CFACE 204 612 613 614
+ *MESH_CFACE 205 615 616 617
+ *MESH_CFACE 206 618 619 620
+ *MESH_CFACE 207 621 622 623
+ *MESH_CFACE 208 624 625 626
+ *MESH_CFACE 209 627 628 629
+ *MESH_CFACE 210 630 631 632
+ *MESH_CFACE 211 633 634 635
+ *MESH_CFACE 212 636 637 638
+ *MESH_CFACE 213 639 640 641
+ *MESH_CFACE 214 642 643 644
+ *MESH_CFACE 215 645 646 647
+ *MESH_CFACE 216 648 649 650
+ *MESH_CFACE 217 651 652 653
+ *MESH_CFACE 218 654 655 656
+ *MESH_CFACE 219 657 658 659
+ *MESH_CFACE 220 660 661 662
+ *MESH_CFACE 221 663 664 665
+ *MESH_CFACE 222 666 667 668
+ *MESH_CFACE 223 669 670 671
+ *MESH_CFACE 224 672 673 674
+ *MESH_CFACE 225 675 676 677
+ *MESH_CFACE 226 678 679 680
+ *MESH_CFACE 227 681 682 683
+ *MESH_CFACE 228 684 685 686
+ *MESH_CFACE 229 687 688 689
+ *MESH_CFACE 230 690 691 692
+ *MESH_CFACE 231 693 694 695
+ *MESH_CFACE 232 696 697 698
+ *MESH_CFACE 233 699 700 701
+ *MESH_CFACE 234 702 703 704
+ *MESH_CFACE 235 705 706 707
+ *MESH_CFACE 236 708 709 710
+ *MESH_CFACE 237 711 712 713
+ *MESH_CFACE 238 714 715 716
+ *MESH_CFACE 239 717 718 719
+ *MESH_CFACE 240 720 721 722
+ *MESH_CFACE 241 723 724 725
+ *MESH_CFACE 242 726 727 728
+ *MESH_CFACE 243 729 730 731
+ *MESH_CFACE 244 732 733 734
+ *MESH_CFACE 245 735 736 737
+ *MESH_CFACE 246 738 739 740
+ *MESH_CFACE 247 741 742 743
+ *MESH_CFACE 248 744 745 746
+ *MESH_CFACE 249 747 748 749
+ *MESH_CFACE 250 750 751 752
+ *MESH_CFACE 251 753 754 755
+ *MESH_CFACE 252 756 757 758
+ *MESH_CFACE 253 759 760 761
+ *MESH_CFACE 254 762 763 764
+ *MESH_CFACE 255 765 766 767
+ *MESH_CFACE 256 768 769 770
+ *MESH_CFACE 257 771 772 773
+ *MESH_CFACE 258 774 775 776
+ *MESH_CFACE 259 777 778 779
+ *MESH_CFACE 260 780 781 782
+ *MESH_CFACE 261 783 784 785
+ *MESH_CFACE 262 786 787 788
+ *MESH_CFACE 263 789 790 791
+ *MESH_CFACE 264 792 793 794
+ *MESH_CFACE 265 795 796 797
+ *MESH_CFACE 266 798 799 800
+ *MESH_CFACE 267 801 802 803
+ *MESH_CFACE 268 804 805 806
+ *MESH_CFACE 269 807 808 809
+ *MESH_CFACE 270 810 811 812
+ *MESH_CFACE 271 813 814 815
+ *MESH_CFACE 272 816 817 818
+ *MESH_CFACE 273 819 820 821
+ *MESH_CFACE 274 822 823 824
+ *MESH_CFACE 275 825 826 827
+ *MESH_CFACE 276 828 829 830
+ *MESH_CFACE 277 831 832 833
+ *MESH_CFACE 278 834 835 836
+ *MESH_CFACE 279 837 838 839
+ *MESH_CFACE 280 840 841 842
+ *MESH_CFACE 281 843 844 845
+ *MESH_CFACE 282 846 847 848
+ *MESH_CFACE 283 849 850 851
+ *MESH_CFACE 284 852 853 854
+ *MESH_CFACE 285 855 856 857
+ *MESH_CFACE 286 858 859 860
+ *MESH_CFACE 287 861 862 863
+ *MESH_CFACE 288 864 865 866
+ *MESH_CFACE 289 867 868 869
+ *MESH_CFACE 290 870 871 872
+ *MESH_CFACE 291 873 874 875
+ *MESH_CFACE 292 876 877 878
+ *MESH_CFACE 293 879 880 881
+ *MESH_CFACE 294 882 883 884
+ *MESH_CFACE 295 885 886 887
+ *MESH_CFACE 296 888 889 890
+ *MESH_CFACE 297 891 892 893
+ *MESH_CFACE 298 894 895 896
+ *MESH_CFACE 299 897 898 899
+ *MESH_CFACE 300 900 901 902
+ *MESH_CFACE 301 903 904 905
+ *MESH_CFACE 302 906 907 908
+ *MESH_CFACE 303 909 910 911
+ *MESH_CFACE 304 912 913 914
+ *MESH_CFACE 305 915 916 917
+ *MESH_CFACE 306 918 919 920
+ *MESH_CFACE 307 921 922 923
+ *MESH_CFACE 308 924 925 926
+ *MESH_CFACE 309 927 928 929
+ *MESH_CFACE 310 930 931 932
+ *MESH_CFACE 311 933 934 935
+ *MESH_CFACE 312 936 937 938
+ *MESH_CFACE 313 939 940 941
+ *MESH_CFACE 314 942 943 944
+ *MESH_CFACE 315 945 946 947
+ *MESH_CFACE 316 948 949 950
+ *MESH_CFACE 317 951 952 953
+ *MESH_CFACE 318 954 955 956
+ *MESH_CFACE 319 957 958 959
+ *MESH_CFACE 320 960 961 962
+ *MESH_CFACE 321 963 964 965
+ *MESH_CFACE 322 966 967 968
+ *MESH_CFACE 323 969 970 971
+ *MESH_CFACE 324 972 973 974
+ *MESH_CFACE 325 975 976 977
+ *MESH_CFACE 326 978 979 980
+ *MESH_CFACE 327 981 982 983
+ *MESH_CFACE 328 984 985 986
+ *MESH_CFACE 329 987 988 989
+ *MESH_CFACE 330 990 991 992
+ *MESH_CFACE 331 993 994 995
+ *MESH_CFACE 332 996 997 998
+ *MESH_CFACE 333 999 1000 1001
+ *MESH_CFACE 334 1002 1003 1004
+ *MESH_CFACE 335 1005 1006 1007
+ *MESH_CFACE 336 1008 1009 1010
+ *MESH_CFACE 337 1011 1012 1013
+ *MESH_CFACE 338 1014 1015 1016
+ *MESH_CFACE 339 1017 1018 1019
+ *MESH_CFACE 340 1020 1021 1022
+ *MESH_CFACE 341 1023 1024 1025
+ *MESH_CFACE 342 1026 1027 1028
+ *MESH_CFACE 343 1029 1030 1031
+ *MESH_CFACE 344 1032 1033 1034
+ *MESH_CFACE 345 1035 1036 1037
+ *MESH_CFACE 346 1038 1039 1040
+ *MESH_CFACE 347 1041 1042 1043
+ *MESH_CFACE 348 1044 1045 1046
+ *MESH_CFACE 349 1047 1048 1049
+ *MESH_CFACE 350 1050 1051 1052
+ *MESH_CFACE 351 1053 1054 1055
+ *MESH_CFACE 352 1056 1057 1058
+ *MESH_CFACE 353 1059 1060 1061
+ *MESH_CFACE 354 1062 1063 1064
+ *MESH_CFACE 355 1065 1066 1067
+ *MESH_CFACE 356 1068 1069 1070
+ *MESH_CFACE 357 1071 1072 1073
+ *MESH_CFACE 358 1074 1075 1076
+ *MESH_CFACE 359 1077 1078 1079
+ *MESH_CFACE 360 1080 1081 1082
+ *MESH_CFACE 361 1083 1084 1085
+ *MESH_CFACE 362 1086 1087 1088
+ *MESH_CFACE 363 1089 1090 1091
+ *MESH_CFACE 364 1092 1093 1094
+ *MESH_CFACE 365 1095 1096 1097
+ }
+ }
+ *PROP_MOTIONBLUR 0
+ *PROP_CASTSHADOW 1
+ *PROP_RECVSHADOW 1
+ *MATERIAL_REF 0
+}
diff --git a/test/models-nonbsd/ASE/Rifle2.ase b/test/models-nonbsd/ASE/Rifle2.ase
index fd2d905fb..98bbcb621 100644
--- a/test/models-nonbsd/ASE/Rifle2.ase
+++ b/test/models-nonbsd/ASE/Rifle2.ase
@@ -1,8245 +1,8245 @@
-*3DSMAX_ASCIIEXPORT 200
-*COMMENT "created by AC3D."
-*SCENE {
- *SCENE_FILENAME ""
- *SCENE_FIRSTFRAME 0
- *SCENE_LASTFRAME 100
- *SCENE_FRAMESPEED 30
- *SCENE_TICKSPERFRAME 160
- *SCENE_BACKGROUND_STATIC 0.0000 0.0000 0.0000
- *SCENE_AMBIENT_STATIC 0.0431 0.0431 0.0431
-}
-*MATERIAL_LIST {
- *MATERIAL_COUNT 23
- *MATERIAL 0 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.588235 0.588235 0.588235
- *MATERIAL_DIFFUSE 1.000000 1.000000 1.000000
- *MATERIAL_SPECULAR 0.898039 0.898039 0.898039
- *MATERIAL_SHINE 128.000000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- *MAP_DIFFUSE {
- *MAP_NAME "Map #1"
- *MAP_CLASS "Bitmap"
- *MAP_SUBNO 1
- *MAP_AMOUNT 1.0000
- *BITMAP "../3DS/m_rifl.bmp"
- *MAP_TYPE Screen
- *UVW_U_OFFSET 0.000000
- *UVW_V_OFFSET 0.000000
- *UVW_U_TILING 1.000000
- *UVW_V_TILING 1.000000
- *UVW_ANGLE 0.0000
- *UVW_BLUR 1.0000
- *UVW_BLUR_OFFSET 0.0000
- *UVW_NOUSE_AMT 1.0000
- *UVW_NOISE_SIZE 1.0000
- *UVW_NOISE_LEVEL 1
- *UVW_NOISE_PHASE 0.0000
- *BITMAP_FILTER Pyramidal
- }
- }
- *MATERIAL 1 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
- *MATERIAL_DIFFUSE 0.000000 0.000000 0.000000
- *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
- *MATERIAL_SHINE 128.000000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 2 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
- *MATERIAL_DIFFUSE 1.000000 1.000000 1.000000
- *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
- *MATERIAL_SHINE 128.000000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 3 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
- *MATERIAL_DIFFUSE 0.627451 0.250980 0.250980
- *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
- *MATERIAL_SHINE 128.000000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 4 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
- *MATERIAL_DIFFUSE 1.000000 0.000000 0.000000
- *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
- *MATERIAL_SHINE 128.000000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 5 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
- *MATERIAL_DIFFUSE 1.000000 0.466667 0.000000
- *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
- *MATERIAL_SHINE 128.000000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 6 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
- *MATERIAL_DIFFUSE 1.000000 1.000000 0.000000
- *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
- *MATERIAL_SHINE 128.000000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 7 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
- *MATERIAL_DIFFUSE 0.000000 1.000000 0.000000
- *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
- *MATERIAL_SHINE 128.000000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 8 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
- *MATERIAL_DIFFUSE 0.270588 0.525490 0.454902
- *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
- *MATERIAL_SHINE 128.000000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 9 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
- *MATERIAL_DIFFUSE 0.627451 0.752941 0.878431
- *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
- *MATERIAL_SHINE 128.000000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 10 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
- *MATERIAL_DIFFUSE 0.000000 0.000000 1.000000
- *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
- *MATERIAL_SHINE 128.000000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 11 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
- *MATERIAL_DIFFUSE 0.509804 0.000000 0.294118
- *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
- *MATERIAL_SHINE 128.000000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 12 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
- *MATERIAL_DIFFUSE 0.933333 0.501961 0.933333
- *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
- *MATERIAL_SHINE 128.000000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 13 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
- *MATERIAL_DIFFUSE 0.266667 0.266667 0.266667
- *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
- *MATERIAL_SHINE 128.000000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 14 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
- *MATERIAL_DIFFUSE 0.533333 0.533333 0.533333
- *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
- *MATERIAL_SHINE 128.000000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 15 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
- *MATERIAL_DIFFUSE 0.800000 0.800000 0.800000
- *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
- *MATERIAL_SHINE 128.000000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 16 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
- *MATERIAL_DIFFUSE 1.000000 0.501961 0.752941
- *MATERIAL_SPECULAR 0.000000 0.000000 0.000000
- *MATERIAL_SHINE 0.000000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 17 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.588235 0.588235 0.588235
- *MATERIAL_DIFFUSE 0.588235 0.588235 0.588235
- *MATERIAL_SPECULAR 0.898039 0.898039 0.898039
- *MATERIAL_SHINE 12.800000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 18 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.588235 0.588235 0.588235
- *MATERIAL_DIFFUSE 0.588235 0.588235 0.588235
- *MATERIAL_SPECULAR 0.898039 0.898039 0.898039
- *MATERIAL_SHINE 12.800000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 19 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.588235 0.588235 0.588235
- *MATERIAL_DIFFUSE 0.588235 0.588235 0.588235
- *MATERIAL_SPECULAR 0.898039 0.898039 0.898039
- *MATERIAL_SHINE 12.800000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 20 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.878431 0.878431 0.878431
- *MATERIAL_DIFFUSE 0.878431 0.878431 0.878431
- *MATERIAL_SPECULAR 1.000000 1.000000 1.000000
- *MATERIAL_SHINE 19.200001
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 21 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.878431 0.878431 0.878431
- *MATERIAL_DIFFUSE 0.878431 0.878431 0.878431
- *MATERIAL_SPECULAR 1.000000 1.000000 1.000000
- *MATERIAL_SHINE 19.200001
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
- *MATERIAL 22 {
- *MATERIAL_NAME "Material "
- *MATERIAL_CLASS "Standard"
- *MATERIAL_AMBIENT 0.588235 0.588235 0.588235
- *MATERIAL_DIFFUSE 1.000000 1.000000 1.000000
- *MATERIAL_SPECULAR 0.898039 0.898039 0.898039
- *MATERIAL_SHINE 128.000000
- *MATERIAL_TRANSPARENCY 0.000000
- *MATERIAL_WIRESIZE 1.0000
- *MATERIAL_SHADING Blinn
- *MATERIAL_XP_FALLOFF 0.0000
- *MATERIAL_SELFILLUM 0.0000
- *MATERIAL_TWOSIDED
- *MATERIAL_FALLOFF In
- *MATERIAL_SOFTEN
- *MATERIAL_XP_TYPE Filter
- }
-}
-
-*GEOMOBJECT {
- *NODE_NAME "m_rifle"
- *NODE_TM {
- *NODE_NAME "Object01"
- *INHERIT_POS 0 0 0
- *INHERIT_ROT 0 0 0
- *INHERIT_SCL 0 0 0
- *TM_ROW0 1.0000 0.0000 0.0000
- *TM_ROW1 0.0000 1.0000 0.0000
- *TM_ROW2 0.0000 0.0000 1.0000
- *TM_ROW3 0.0000 0.0000 0.0000
- *TM_POS 0.0000 0.0000 0.0000
- *TM_ROTAXIS 0.0000 0.0000 0.0000
- *TM_ROTANGLE 0.0000
- *TM_SCALE 1.0000 1.0000 1.0000
- *TM_SCALEAXIS 0.0000 0.0000 0.0000
- *TM_SCALEAXISANG 0.0000
- }
- *MESH {
- *TIMEVALUE 0
- *MESH_NUMVERTEX 337
- *MESH_NUMFACES 572
- *MESH_VERTEX_LIST {
- *MESH_VERTEX 0 -0.597006 18.421190 -22.535984
- *MESH_VERTEX 1 -0.597007 19.527948 -7.871955
- *MESH_VERTEX 2 -0.597007 18.421190 33.374268
- *MESH_VERTEX 3 -0.597007 19.527948 32.448418
- *MESH_VERTEX 4 -0.597006 20.232851 -20.983131
- *MESH_VERTEX 5 -0.597007 20.232853 -9.281762
- *MESH_VERTEX 6 0.597023 18.421190 33.374268
- *MESH_VERTEX 7 0.597023 18.421190 -22.535984
- *MESH_VERTEX 8 0.597023 19.527948 32.448418
- *MESH_VERTEX 9 0.597023 19.527948 -7.871955
- *MESH_VERTEX 10 0.597023 20.232851 -20.983131
- *MESH_VERTEX 11 0.597023 20.232855 -9.281762
- *MESH_VERTEX 12 -1.097007 20.232851 -20.983131
- *MESH_VERTEX 13 -1.097007 20.232855 -9.281762
- *MESH_VERTEX 14 -1.129967 19.527954 -7.871955
- *MESH_VERTEX 15 -1.129968 19.527952 32.448418
- *MESH_VERTEX 16 -1.466161 12.337952 -27.750191
- *MESH_VERTEX 17 1.466200 12.337950 -27.750191
- *MESH_VERTEX 18 1.097046 20.232851 -20.983131
- *MESH_VERTEX 19 1.130006 19.527948 32.448418
- *MESH_VERTEX 20 3.476478 4.865994 44.713707
- *MESH_VERTEX 21 -3.476444 4.865994 44.713707
- *MESH_VERTEX 22 1.406872 13.606778 20.888004
- *MESH_VERTEX 23 -1.406833 13.606778 20.888004
- *MESH_VERTEX 24 -1.406833 13.606778 29.346819
- *MESH_VERTEX 25 1.406872 13.606778 29.346819
- *MESH_VERTEX 26 -1.327729 15.298541 29.346819
- *MESH_VERTEX 27 1.327767 15.298541 29.346819
- *MESH_VERTEX 28 -3.345925 7.657332 15.755142
- *MESH_VERTEX 29 3.403965 6.416777 14.684864
- *MESH_VERTEX 30 -3.403931 6.416778 14.684864
- *MESH_VERTEX 31 3.345959 7.657331 15.755142
- *MESH_VERTEX 32 2.590194 6.980697 -15.484935
- *MESH_VERTEX 33 -2.590173 6.980697 -15.484935
- *MESH_VERTEX 34 -2.616541 6.416777 -12.947289
- *MESH_VERTEX 35 2.616514 6.416777 -12.947289
- *MESH_VERTEX 36 2.451761 9.941286 -16.471800
- *MESH_VERTEX 37 -2.451740 9.941287 -16.471800
- *MESH_VERTEX 38 -2.511069 8.672463 -16.471800
- *MESH_VERTEX 39 2.511090 8.672463 -16.471800
- *MESH_VERTEX 40 -1.327728 15.298539 -12.242387
- *MESH_VERTEX 41 1.327767 15.298539 0.546196
- *MESH_VERTEX 42 1.327767 15.298539 -12.242387
- *MESH_VERTEX 43 -1.327728 15.298539 0.546196
- *MESH_VERTEX 44 -1.452976 12.619911 -34.376270
- *MESH_VERTEX 45 -1.479345 12.055991 -29.723913
- *MESH_VERTEX 46 -1.426608 13.183834 -29.864895
- *MESH_VERTEX 47 -1.861682 3.879130 -30.710775
- *MESH_VERTEX 48 -1.888050 3.315209 -35.927044
- *MESH_VERTEX 49 1.452994 12.619911 -34.376270
- *MESH_VERTEX 50 1.861723 3.879130 -30.710775
- *MESH_VERTEX 51 1.888069 3.315209 -35.927044
- *MESH_VERTEX 52 1.479384 12.055990 -29.723913
- *MESH_VERTEX 53 1.426626 13.183834 -29.864895
- *MESH_VERTEX 54 1.097046 20.232855 -9.281762
- *MESH_VERTEX 55 1.130006 19.527954 -7.871955
- *MESH_VERTEX 56 -3.476444 4.865994 21.310980
- *MESH_VERTEX 57 3.476478 4.865994 21.310980
- *MESH_VERTEX 58 -3.522588 3.879133 19.901173
- *MESH_VERTEX 59 3.522622 3.879132 19.901173
- *MESH_VERTEX 60 -1.268627 1.335282 -13.692022
- *MESH_VERTEX 61 -1.268627 2.395683 -3.956190
- *MESH_VERTEX 62 -1.268627 1.519322 -31.728071
- *MESH_VERTEX 63 -1.268634 -4.378830 -3.956153
- *MESH_VERTEX 64 -1.268627 -0.505130 -10.931402
- *MESH_VERTEX 65 -1.268627 2.991655 22.011986
- *MESH_VERTEX 66 -1.268606 -2.354467 6.336944
- *MESH_VERTEX 67 -1.791036 -0.432972 22.011986
- *MESH_VERTEX 68 -1.268627 5.200150 21.091782
- *MESH_VERTEX 69 -1.268627 2.395662 6.336932
- *MESH_VERTEX 70 -1.268627 -6.762532 17.779032
- *MESH_VERTEX 71 -1.268627 -6.762532 23.673315
- *MESH_VERTEX 72 -1.791044 -6.055178 23.673315
- *MESH_VERTEX 73 -2.271622 -0.432971 46.673500
- *MESH_VERTEX 74 -1.791044 -6.055173 46.673500
- *MESH_VERTEX 75 -0.866355 -2.421297 4.930994
- *MESH_VERTEX 76 -0.866355 -3.849836 3.165480
- *MESH_VERTEX 77 -0.866355 -4.738063 6.336929
- *MESH_VERTEX 78 -0.866355 -3.948467 -0.586525
- *MESH_VERTEX 79 -0.866355 -3.012460 -2.409276
- *MESH_VERTEX 80 -0.866355 -4.379151 -3.946998
- *MESH_VERTEX 81 -0.866355 -1.633080 -3.197495
- *MESH_VERTEX 82 -0.866355 -0.155174 -3.049704
- *MESH_VERTEX 83 -0.866355 2.395641 -3.956149
- *MESH_VERTEX 84 -0.866355 0.583780 -2.064428
- *MESH_VERTEX 85 -0.866355 2.395641 6.336948
- *MESH_VERTEX 86 -0.866355 0.633044 5.669950
- *MESH_VERTEX 87 -0.866355 -0.992653 5.669950
- *MESH_VERTEX 88 -1.268627 -4.738078 13.177999
- *MESH_VERTEX 89 -1.268627 -4.738078 6.336948
- *MESH_VERTEX 90 -1.268627 4.095901 -33.936569
- *MESH_VERTEX 91 -1.268627 -4.369996 -12.771817
- *MESH_VERTEX 92 -1.268627 -7.682738 -7.250585
- *MESH_VERTEX 93 -1.268627 -12.099727 17.779032
- *MESH_VERTEX 94 -1.268627 -12.099727 13.177996
- *MESH_VERTEX 95 -1.268627 -11.547604 -15.716476
- *MESH_VERTEX 96 -1.268627 -13.203976 -8.354830
- *MESH_VERTEX 97 -1.268627 -8.234862 -16.084558
- *MESH_VERTEX 98 -1.268627 -15.228430 -10.747362
- *MESH_VERTEX 99 1.268665 1.335282 -13.692022
- *MESH_VERTEX 100 1.268665 -4.378830 -3.956153
- *MESH_VERTEX 101 1.268665 -0.505130 -10.931402
- *MESH_VERTEX 102 1.268665 2.395683 -3.956172
- *MESH_VERTEX 103 1.268665 -2.354467 6.336944
- *MESH_VERTEX 104 1.268665 2.991655 22.011986
- *MESH_VERTEX 105 1.791053 -0.432972 22.011986
- *MESH_VERTEX 106 1.268665 5.200149 21.091782
- *MESH_VERTEX 107 1.268665 2.395684 6.336914
- *MESH_VERTEX 108 1.268665 -6.762532 23.673315
- *MESH_VERTEX 109 1.268665 -6.762532 17.779032
- *MESH_VERTEX 110 1.791053 -6.055216 23.673315
- *MESH_VERTEX 111 2.271650 -0.432971 46.673500
- *MESH_VERTEX 112 1.791053 -6.055213 46.673500
- *MESH_VERTEX 113 0.866362 -3.849941 3.157503
- *MESH_VERTEX 114 0.866362 -2.421297 4.930994
- *MESH_VERTEX 115 0.866362 -4.738010 6.336914
- *MESH_VERTEX 116 0.866362 -3.012459 -2.409276
- *MESH_VERTEX 117 0.866362 -3.948467 -0.586525
- *MESH_VERTEX 118 0.866362 -4.379152 -3.946998
- *MESH_VERTEX 119 0.866362 -1.633080 -3.197491
- *MESH_VERTEX 120 0.866362 -0.155174 -3.049704
- *MESH_VERTEX 121 0.866362 2.395641 -3.956149
- *MESH_VERTEX 122 0.866362 0.583780 -2.064428
- *MESH_VERTEX 123 0.866362 2.395641 6.336948
- *MESH_VERTEX 124 0.866362 0.633045 5.669950
- *MESH_VERTEX 125 0.866362 -0.992653 5.669950
- *MESH_VERTEX 126 1.268665 -4.738078 13.177999
- *MESH_VERTEX 127 1.268665 -4.738078 6.336948
- *MESH_VERTEX 128 1.268665 1.519322 -31.728071
- *MESH_VERTEX 129 1.268665 4.095901 -33.936569
- *MESH_VERTEX 130 1.268665 -4.369996 -12.771817
- *MESH_VERTEX 131 1.268665 -7.682738 -7.250585
- *MESH_VERTEX 132 1.268665 -12.099727 17.779032
- *MESH_VERTEX 133 1.268665 -12.099727 13.177996
- *MESH_VERTEX 134 1.268665 -13.203976 -8.354830
- *MESH_VERTEX 135 1.268665 -11.547604 -15.716476
- *MESH_VERTEX 136 1.268665 -8.234862 -16.084558
- *MESH_VERTEX 137 1.268665 -15.228430 -10.747362
- *MESH_VERTEX 138 0.561346 -6.762531 46.673500
- *MESH_VERTEX 139 0.561349 -6.762532 23.673315
- *MESH_VERTEX 140 -0.561256 -6.762532 23.673326
- *MESH_VERTEX 141 -0.561252 -6.762531 46.673500
- *MESH_VERTEX 142 -1.268648 -1.522434 -3.956153
- *MESH_VERTEX 143 -1.268648 -0.028225 -3.956153
- *MESH_VERTEX 144 -1.268648 0.830573 6.336948
- *MESH_VERTEX 145 -1.268648 -0.724812 6.336944
- *MESH_VERTEX 146 -1.268648 -1.758248 6.336944
- *MESH_VERTEX 147 0.000008 9.226812 70.487350
- *MESH_VERTEX 148 0.918522 8.696509 70.487350
- *MESH_VERTEX 149 1.060616 9.226812 70.487350
- *MESH_VERTEX 150 0.530312 8.308300 70.487350
- *MESH_VERTEX 151 0.000008 8.166205 70.487350
- *MESH_VERTEX 152 -0.530296 8.308300 70.487350
- *MESH_VERTEX 153 -0.918505 8.696509 70.487350
- *MESH_VERTEX 154 -1.060600 9.226812 70.487350
- *MESH_VERTEX 155 -0.918505 9.757117 70.487350
- *MESH_VERTEX 156 -0.530296 10.145326 70.487350
- *MESH_VERTEX 157 0.000008 10.287420 70.487350
- *MESH_VERTEX 158 0.530312 10.145326 70.487350
- *MESH_VERTEX 159 0.918522 9.757117 70.487350
- *MESH_VERTEX 160 0.918520 8.696505 68.392471
- *MESH_VERTEX 161 1.060615 9.226810 68.392471
- *MESH_VERTEX 162 0.530311 8.308295 68.392471
- *MESH_VERTEX 163 0.000007 8.166201 68.392471
- *MESH_VERTEX 164 -0.530297 8.308295 68.392471
- *MESH_VERTEX 165 -0.918507 8.696505 68.392471
- *MESH_VERTEX 166 -1.060602 9.226810 68.392471
- *MESH_VERTEX 167 -0.918507 9.757113 68.392471
- *MESH_VERTEX 168 -0.530297 10.145323 68.392471
- *MESH_VERTEX 169 0.000007 10.287416 68.392471
- *MESH_VERTEX 170 0.530311 10.145323 68.392471
- *MESH_VERTEX 171 0.918520 9.757113 68.392471
- *MESH_VERTEX 172 -0.917963 6.865224 68.292030
- *MESH_VERTEX 173 -1.422246 4.829766 47.780525
- *MESH_VERTEX 174 -1.746555 2.834796 70.525200
- *MESH_VERTEX 175 -1.422246 4.829765 44.613205
- *MESH_VERTEX 176 -0.917963 6.865222 43.313309
- *MESH_VERTEX 177 -1.746555 2.834795 50.739769
- *MESH_VERTEX 178 0.917979 6.865224 68.292030
- *MESH_VERTEX 179 1.746572 2.834796 70.525200
- *MESH_VERTEX 180 1.422262 4.829766 47.780525
- *MESH_VERTEX 181 1.422262 4.829765 44.613205
- *MESH_VERTEX 182 0.917980 6.865222 43.313309
- *MESH_VERTEX 183 1.746572 2.834795 50.739769
- *MESH_VERTEX 184 -1.380244 1.707703 38.230148
- *MESH_VERTEX 185 -2.512050 5.043744 36.506058
- *MESH_VERTEX 186 2.512067 5.043744 36.506058
- *MESH_VERTEX 187 1.380260 1.707703 38.230148
- *MESH_VERTEX 188 -2.512050 5.043743 44.159363
- *MESH_VERTEX 189 -1.380244 1.707703 42.435265
- *MESH_VERTEX 190 1.380260 1.707703 42.435265
- *MESH_VERTEX 191 2.512067 5.043743 44.159363
- *MESH_VERTEX 192 0.298516 10.893362 -44.971695
- *MESH_VERTEX 193 0.298515 10.893363 -33.955528
- *MESH_VERTEX 194 0.298515 11.273522 -33.936523
- *MESH_VERTEX 195 0.298516 11.273522 -44.978996
- *MESH_VERTEX 196 -0.298499 11.273522 -44.978996
- *MESH_VERTEX 197 -0.298500 11.273522 -33.936523
- *MESH_VERTEX 198 -0.298500 10.893363 -33.955528
- *MESH_VERTEX 199 -0.298499 10.893362 -44.971695
- *MESH_VERTEX 200 -1.268649 11.273522 -44.442879
- *MESH_VERTEX 201 -1.268649 11.273522 -33.936523
- *MESH_VERTEX 202 -0.732529 11.273522 -44.978996
- *MESH_VERTEX 203 -1.100613 -7.866765 -44.610909
- *MESH_VERTEX 204 1.100565 -7.866765 -44.610909
- *MESH_VERTEX 205 0.732482 11.273522 -44.978996
- *MESH_VERTEX 206 1.268665 5.750831 -44.442818
- *MESH_VERTEX 207 1.268665 -7.845753 -44.442818
- *MESH_VERTEX 208 1.268665 10.469248 -44.442818
- *MESH_VERTEX 209 1.268665 11.029802 -44.442818
- *MESH_VERTEX 210 1.268665 11.273522 -44.442818
- *MESH_VERTEX 211 1.268665 -7.682724 -43.138588
- *MESH_VERTEX 212 -1.268649 11.029831 -44.442879
- *MESH_VERTEX 213 -1.268649 10.469343 -44.442879
- *MESH_VERTEX 214 -1.268649 5.751483 -44.442879
- *MESH_VERTEX 215 -1.268648 -7.845760 -44.442879
- *MESH_VERTEX 216 -1.268648 -7.682724 -43.138588
- *MESH_VERTEX 217 -1.268649 7.592696 -36.881180
- *MESH_VERTEX 218 -1.268649 7.592696 -34.120560
- *MESH_VERTEX 219 -1.268649 4.648035 -40.562004
- *MESH_VERTEX 220 -1.268649 4.832077 -37.249256
- *MESH_VERTEX 221 -1.268648 -7.498682 -40.562012
- *MESH_VERTEX 222 1.268665 4.648035 -40.562004
- *MESH_VERTEX 223 1.268665 -7.498682 -40.562012
- *MESH_VERTEX 224 1.268665 7.592696 -36.881180
- *MESH_VERTEX 225 1.268665 4.832077 -37.249256
- *MESH_VERTEX 226 1.268665 11.273522 -33.936523
- *MESH_VERTEX 227 1.268665 7.592696 -34.120560
- *MESH_VERTEX 228 0.000006 0.931545 21.303843
- *MESH_VERTEX 229 -2.502420 -0.513231 21.303844
- *MESH_VERTEX 230 -2.889547 0.931545 21.303843
- *MESH_VERTEX 231 -1.444771 -1.570880 21.303844
- *MESH_VERTEX 232 0.000005 -1.958007 21.303854
- *MESH_VERTEX 233 1.444781 -1.570880 21.303854
- *MESH_VERTEX 234 2.502431 -0.513232 21.303844
- *MESH_VERTEX 235 2.889558 0.931544 21.303843
- *MESH_VERTEX 236 2.502431 2.376319 21.303843
- *MESH_VERTEX 237 1.444782 3.433969 21.303843
- *MESH_VERTEX 238 0.000006 3.821096 21.303843
- *MESH_VERTEX 239 -1.444770 3.433969 21.303843
- *MESH_VERTEX 240 -2.502420 2.376319 21.303843
- *MESH_VERTEX 241 -2.502413 -0.513240 46.311317
- *MESH_VERTEX 242 -2.889539 0.931535 46.311317
- *MESH_VERTEX 243 -1.444764 -1.570890 46.311317
- *MESH_VERTEX 244 0.000012 -1.958016 46.311325
- *MESH_VERTEX 245 1.444788 -1.570890 46.311325
- *MESH_VERTEX 246 2.502438 -0.513241 46.311317
- *MESH_VERTEX 247 2.889565 0.931535 46.311317
- *MESH_VERTEX 248 2.502439 2.376311 46.311317
- *MESH_VERTEX 249 1.444789 3.433959 46.311317
- *MESH_VERTEX 250 0.000013 3.821087 46.311317
- *MESH_VERTEX 251 -1.444763 3.433960 46.311317
- *MESH_VERTEX 252 -2.502413 2.376311 46.311317
- *MESH_VERTEX 253 0.000009 8.086176 68.595421
- *MESH_VERTEX 254 2.068130 6.842045 68.595428
- *MESH_VERTEX 255 2.388069 8.086176 68.595421
- *MESH_VERTEX 256 1.194039 5.688210 68.595413
- *MESH_VERTEX 257 0.000010 5.356462 68.595406
- *MESH_VERTEX 258 -1.194020 5.688210 68.595413
- *MESH_VERTEX 259 -2.068111 6.842045 68.595428
- *MESH_VERTEX 260 -2.388051 8.086176 68.595421
- *MESH_VERTEX 261 -2.068111 9.495605 68.595421
- *MESH_VERTEX 262 -1.194021 10.549734 68.595428
- *MESH_VERTEX 263 0.000009 10.869672 68.595428
- *MESH_VERTEX 264 1.194039 10.549734 68.595428
- *MESH_VERTEX 265 2.068130 9.495605 68.595421
- *MESH_VERTEX 266 2.068130 6.842034 -17.151394
- *MESH_VERTEX 267 2.388069 8.086167 -17.151394
- *MESH_VERTEX 268 1.194040 5.688199 -17.151394
- *MESH_VERTEX 269 0.000010 5.356451 -17.151394
- *MESH_VERTEX 270 -1.194020 5.688199 -17.151394
- *MESH_VERTEX 271 -2.068111 6.842034 -17.151394
- *MESH_VERTEX 272 -2.388051 8.086165 -17.151394
- *MESH_VERTEX 273 -2.068111 9.495594 -17.151394
- *MESH_VERTEX 274 -1.194021 10.549724 -17.151394
- *MESH_VERTEX 275 0.000009 10.869661 -17.151394
- *MESH_VERTEX 276 1.194039 10.549724 -17.151394
- *MESH_VERTEX 277 2.068130 9.495594 -17.151394
- *MESH_VERTEX 278 -0.298499 -1.335941 -0.446208
- *MESH_VERTEX 279 -0.298499 0.612251 -1.585156
- *MESH_VERTEX 280 -0.298499 -1.455830 -1.105597
- *MESH_VERTEX 281 -0.298499 0.732141 -0.146484
- *MESH_VERTEX 282 -0.298499 -3.164243 -0.266377
- *MESH_VERTEX 283 0.298516 -1.335941 -0.446208
- *MESH_VERTEX 284 0.298516 -1.455830 -1.105597
- *MESH_VERTEX 285 0.298516 0.612251 -1.585156
- *MESH_VERTEX 286 0.298516 0.732141 -0.146484
- *MESH_VERTEX 287 0.298516 -3.164243 -0.266377
- *MESH_VERTEX 288 -1.791037 -3.090750 5.507843
- *MESH_VERTEX 289 -1.791037 -7.230175 13.452101
- *MESH_VERTEX 290 -1.791037 -1.659893 6.258873
- *MESH_VERTEX 291 -1.791037 -6.000690 14.681631
- *MESH_VERTEX 292 -1.791037 -1.194521 14.681631
- *MESH_VERTEX 293 -1.791037 -4.505468 3.756600
- *MESH_VERTEX 294 -1.791037 -10.918630 13.452101
- *MESH_VERTEX 295 -1.791036 -21.536903 3.504448
- *MESH_VERTEX 296 -1.791036 -21.536905 14.122730
- *MESH_VERTEX 297 -1.791037 -10.918630 17.475922
- *MESH_VERTEX 298 -1.791037 -6.447775 21.611460
- *MESH_VERTEX 299 -1.791037 -6.559546 23.623354
- *MESH_VERTEX 300 1.791053 -3.090750 5.507843
- *MESH_VERTEX 301 1.791053 -1.659893 6.258873
- *MESH_VERTEX 302 1.791053 -7.230175 13.452101
- *MESH_VERTEX 303 1.791053 -6.000690 14.681631
- *MESH_VERTEX 304 1.791053 -1.194521 14.681631
- *MESH_VERTEX 305 1.791053 -4.505468 3.756600
- *MESH_VERTEX 306 1.791053 -10.918630 13.452101
- *MESH_VERTEX 307 1.791053 -21.536903 3.504448
- *MESH_VERTEX 308 1.791053 -21.536905 14.122730
- *MESH_VERTEX 309 1.791053 -10.918630 17.475922
- *MESH_VERTEX 310 1.791053 -6.447775 21.611460
- *MESH_VERTEX 311 1.791053 -6.559546 23.623354
- *MESH_VERTEX 312 0.000006 -7.041816 46.087524
- *MESH_VERTEX 313 2.472542 -3.445583 46.087463
- *MESH_VERTEX 314 2.388065 -6.582098 46.087532
- *MESH_VERTEX 315 2.858512 -1.574434 46.087463
- *MESH_VERTEX 316 3.414333 0.842753 46.087448
- *MESH_VERTEX 317 2.642280 3.099768 46.087532
- *MESH_VERTEX 318 0.000005 4.083702 46.087532
- *MESH_VERTEX 319 -2.642268 3.099768 46.087532
- *MESH_VERTEX 320 -3.414324 0.842753 46.087532
- *MESH_VERTEX 321 -2.858503 -1.574434 46.087463
- *MESH_VERTEX 322 -2.472532 -3.445585 46.087463
- *MESH_VERTEX 323 -2.388055 -6.582099 46.087524
- *MESH_VERTEX 324 0.000013 -1.200825 71.302658
- *MESH_VERTEX 325 2.472549 -3.445565 71.302589
- *MESH_VERTEX 326 2.858519 -1.574414 71.302589
- *MESH_VERTEX 327 2.388072 -6.582078 71.302658
- *MESH_VERTEX 328 0.000014 -7.041797 71.302643
- *MESH_VERTEX 329 -2.388048 -6.582079 71.302643
- *MESH_VERTEX 330 -2.472525 -3.445565 71.302589
- *MESH_VERTEX 331 -2.858496 -1.574414 71.302589
- *MESH_VERTEX 332 -3.414317 0.842771 71.302658
- *MESH_VERTEX 333 -2.642261 3.099787 71.302658
- *MESH_VERTEX 334 0.000013 4.083721 71.302658
- *MESH_VERTEX 335 2.642287 3.099787 71.302658
- *MESH_VERTEX 336 3.414340 0.842771 71.302574
- }
- *MESH_FACE_LIST {
- *MESH_FACE 0: A: 0 B: 1 C: 2 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 1: A: 1 B: 3 C: 2 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 2: A: 0 B: 4 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 3: A: 4 B: 5 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 4: A: 0 B: 2 C: 6 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 5: A: 6 B: 7 C: 0 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 6: A: 8 B: 9 C: 6 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 7: A: 9 B: 7 C: 6 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 8: A: 9 B: 10 C: 7 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 9: A: 9 B: 11 C: 10 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 10: A: 5 B: 4 C: 12 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 11: A: 12 B: 13 C: 5 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 12: A: 1 B: 5 C: 13 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 13: A: 13 B: 14 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 14: A: 3 B: 1 C: 14 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 15: A: 14 B: 15 C: 3 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 16: A: 0 B: 12 C: 4 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 17: A: 0 B: 16 C: 12 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 18: A: 0 B: 17 C: 16 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 19: A: 0 B: 7 C: 17 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 20: A: 7 B: 18 C: 17 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 21: A: 7 B: 10 C: 18 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 22: A: 6 B: 19 C: 8 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 23: A: 6 B: 20 C: 19 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 24: A: 6 B: 21 C: 20 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 25: A: 6 B: 2 C: 21 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 26: A: 2 B: 15 C: 21 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 27: A: 2 B: 3 C: 15 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 28: A: 22 B: 23 C: 24 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 29: A: 24 B: 25 C: 22 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 30: A: 25 B: 24 C: 26 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 31: A: 26 B: 27 C: 25 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 32: A: 28 B: 29 C: 30 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 33: A: 28 B: 31 C: 29 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 34: A: 28 B: 22 C: 31 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 35: A: 28 B: 23 C: 22 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 36: A: 32 B: 33 C: 34 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 37: A: 34 B: 35 C: 32 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 38: A: 36 B: 37 C: 38 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 39: A: 38 B: 39 C: 36 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 40: A: 39 B: 38 C: 33 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 41: A: 33 B: 32 C: 39 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 42: A: 27 B: 40 C: 41 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 43: A: 40 B: 42 C: 41 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 44: A: 27 B: 43 C: 40 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 45: A: 27 B: 26 C: 43 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 46: A: 42 B: 40 C: 37 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 47: A: 37 B: 36 C: 42 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 48: A: 35 B: 34 C: 30 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 49: A: 30 B: 29 C: 35 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 50: A: 44 B: 45 C: 46 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 51: A: 44 B: 47 C: 45 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 52: A: 44 B: 48 C: 47 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 53: A: 49 B: 50 C: 51 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 54: A: 49 B: 52 C: 50 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 55: A: 49 B: 53 C: 52 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 56: A: 47 B: 48 C: 51 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 57: A: 51 B: 50 C: 47 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 58: A: 48 B: 44 C: 49 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 59: A: 49 B: 51 C: 48 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 60: A: 44 B: 46 C: 53 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 61: A: 53 B: 49 C: 44 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 62: A: 46 B: 45 C: 52 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 63: A: 52 B: 53 C: 46 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 64: A: 45 B: 16 C: 17 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 65: A: 17 B: 52 C: 45 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 66: A: 18 B: 10 C: 11 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 67: A: 11 B: 54 C: 18 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 68: A: 54 B: 11 C: 9 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 69: A: 9 B: 55 C: 54 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 70: A: 9 B: 8 C: 19 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 71: A: 19 B: 55 C: 9 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 72: A: 21 B: 56 C: 57 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 73: A: 57 B: 20 C: 21 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 74: A: 56 B: 58 C: 59 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 75: A: 59 B: 57 C: 56 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 76: A: 58 B: 47 C: 50 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 77: A: 50 B: 59 C: 58 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 78: A: 54 B: 42 C: 18 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 79: A: 55 B: 42 C: 54 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 80: A: 41 B: 42 C: 55 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 81: A: 18 B: 42 C: 17 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 82: A: 36 B: 17 C: 42 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 83: A: 17 B: 36 C: 50 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 84: A: 39 B: 50 C: 36 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 85: A: 39 B: 32 C: 50 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 86: A: 32 B: 35 C: 50 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 87: A: 50 B: 35 C: 59 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 88: A: 29 B: 59 C: 35 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 89: A: 57 B: 25 C: 20 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 90: A: 22 B: 25 C: 57 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 91: A: 31 B: 22 C: 57 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 92: A: 20 B: 25 C: 19 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 93: A: 27 B: 19 C: 25 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 94: A: 31 B: 57 C: 29 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 95: A: 59 B: 29 C: 57 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 96: A: 19 B: 27 C: 55 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 97: A: 41 B: 55 C: 27 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 98: A: 52 B: 17 C: 50 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 99: A: 40 B: 13 C: 12 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 100: A: 40 B: 14 C: 13 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 101: A: 40 B: 43 C: 14 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 102: A: 40 B: 12 C: 16 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 103: A: 16 B: 37 C: 40 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 104: A: 37 B: 16 C: 47 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 105: A: 47 B: 38 C: 37 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 106: A: 33 B: 38 C: 47 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 107: A: 34 B: 33 C: 47 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 108: A: 34 B: 47 C: 58 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 109: A: 58 B: 30 C: 34 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 110: A: 24 B: 56 C: 21 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 111: A: 24 B: 23 C: 56 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 112: A: 23 B: 28 C: 56 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 113: A: 24 B: 21 C: 15 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 114: A: 15 B: 26 C: 24 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 115: A: 56 B: 28 C: 30 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 116: A: 30 B: 58 C: 56 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 117: A: 26 B: 15 C: 14 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 118: A: 14 B: 43 C: 26 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 119: A: 16 B: 45 C: 47 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 120: A: 60 B: 61 C: 62 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 121: A: 63 B: 60 C: 64 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 122: A: 61 B: 60 C: 63 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 123: A: 65 B: 66 C: 67 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 124: A: 68 B: 66 C: 65 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 125: A: 69 B: 66 C: 68 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 126: A: 70 B: 71 C: 67 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 127: A: 72 B: 67 C: 71 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 128: A: 67 B: 72 C: 73 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 129: A: 74 B: 73 C: 72 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 130: A: 75 B: 76 C: 77 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 131: A: 78 B: 79 C: 80 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 132: A: 79 B: 81 C: 80 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 133: A: 82 B: 80 C: 81 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 134: A: 83 B: 80 C: 82 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 135: A: 82 B: 84 C: 83 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 136: A: 83 B: 84 C: 85 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 137: A: 86 B: 85 C: 84 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 138: A: 78 B: 80 C: 76 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 139: A: 77 B: 76 C: 80 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 140: A: 87 B: 75 C: 77 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 141: A: 86 B: 87 C: 85 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 142: A: 77 B: 85 C: 87 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 143: A: 67 B: 66 C: 88 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 144: A: 89 B: 88 C: 66 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 145: A: 90 B: 62 C: 68 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 146: A: 61 B: 68 C: 62 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 147: A: 91 B: 63 C: 64 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 148: A: 92 B: 63 C: 91 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 149: A: 93 B: 70 C: 94 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 150: A: 88 B: 94 C: 70 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 151: A: 69 B: 68 C: 61 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 152: A: 70 B: 67 C: 88 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 153: A: 95 B: 96 C: 92 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 154: A: 97 B: 95 C: 92 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 155: A: 91 B: 97 C: 92 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 156: A: 98 B: 96 C: 95 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 157: A: 99 B: 100 C: 101 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 158: A: 99 B: 102 C: 100 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 159: A: 103 B: 104 C: 105 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 160: A: 103 B: 106 C: 104 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 161: A: 103 B: 107 C: 106 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 162: A: 108 B: 109 C: 105 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 163: A: 105 B: 110 C: 108 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 164: A: 110 B: 105 C: 111 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 165: A: 111 B: 112 C: 110 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 166: A: 113 B: 114 C: 115 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 167: A: 116 B: 117 C: 118 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 168: A: 119 B: 116 C: 118 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 169: A: 118 B: 120 C: 119 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 170: A: 118 B: 121 C: 120 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 171: A: 122 B: 120 C: 121 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 172: A: 122 B: 121 C: 123 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 173: A: 123 B: 124 C: 122 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 174: A: 118 B: 117 C: 113 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 175: A: 113 B: 115 C: 118 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 176: A: 114 B: 125 C: 115 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 177: A: 125 B: 124 C: 123 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 178: A: 123 B: 115 C: 125 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 179: A: 103 B: 105 C: 126 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 180: A: 126 B: 127 C: 103 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 181: A: 128 B: 129 C: 106 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 182: A: 106 B: 99 C: 128 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 183: A: 100 B: 130 C: 101 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 184: A: 100 B: 131 C: 130 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 185: A: 109 B: 132 C: 133 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 186: A: 133 B: 126 C: 109 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 187: A: 106 B: 107 C: 102 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 188: A: 105 B: 109 C: 126 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 189: A: 134 B: 135 C: 131 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 190: A: 135 B: 136 C: 131 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 191: A: 136 B: 130 C: 131 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 192: A: 134 B: 137 C: 135 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 193: A: 138 B: 110 C: 112 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 194: A: 138 B: 139 C: 110 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 195: A: 108 B: 110 C: 139 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 196: A: 140 B: 72 C: 71 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 197: A: 141 B: 72 C: 140 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 198: A: 141 B: 74 C: 72 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 199: A: 140 B: 138 C: 141 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 200: A: 140 B: 139 C: 138 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 201: A: 140 B: 70 C: 139 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 202: A: 140 B: 71 C: 70 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 203: A: 126 B: 77 C: 115 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 204: A: 115 B: 127 C: 126 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 205: A: 102 B: 99 C: 106 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 206: A: 103 B: 123 C: 107 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 207: A: 103 B: 115 C: 123 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 208: A: 103 B: 127 C: 115 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 209: A: 107 B: 121 C: 102 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 210: A: 107 B: 123 C: 121 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 211: A: 118 B: 102 C: 121 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 212: A: 118 B: 100 C: 102 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 213: A: 117 B: 116 C: 79 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 214: A: 79 B: 78 C: 117 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 215: A: 119 B: 120 C: 82 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 216: A: 82 B: 81 C: 119 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 217: A: 122 B: 124 C: 86 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 218: A: 86 B: 84 C: 122 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 219: A: 125 B: 114 C: 75 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 220: A: 75 B: 87 C: 125 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 221: A: 131 B: 100 C: 118 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 222: A: 118 B: 80 C: 131 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 223: A: 80 B: 63 C: 92 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 224: A: 92 B: 131 C: 80 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 225: A: 85 B: 69 C: 61 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 226: A: 61 B: 83 C: 85 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 227: A: 83 B: 63 C: 80 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 228: A: 83 B: 142 C: 63 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 229: A: 83 B: 143 C: 142 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 230: A: 83 B: 61 C: 143 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 231: A: 77 B: 69 C: 85 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 232: A: 77 B: 144 C: 69 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 233: A: 77 B: 145 C: 144 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 234: A: 77 B: 146 C: 145 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 235: A: 77 B: 89 C: 146 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 236: A: 78 B: 76 C: 113 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 237: A: 113 B: 117 C: 78 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 238: A: 77 B: 126 C: 88 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 239: A: 88 B: 89 C: 77 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 240: A: 118 B: 115 C: 77 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 241: A: 77 B: 80 C: 118 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 242: A: 119 B: 81 C: 79 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 243: A: 79 B: 116 C: 119 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 244: A: 122 B: 84 C: 82 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 245: A: 82 B: 120 C: 122 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 246: A: 125 B: 87 C: 86 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 247: A: 86 B: 124 C: 125 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 248: A: 113 B: 76 C: 75 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 249: A: 75 B: 114 C: 113 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 250: A: 104 B: 106 C: 68 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 251: A: 68 B: 65 C: 104 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 252: A: 139 B: 70 C: 109 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 253: A: 109 B: 108 C: 139 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 254: A: 132 B: 109 C: 70 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 255: A: 70 B: 93 C: 132 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 256: A: 126 B: 133 C: 94 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 257: A: 94 B: 88 C: 126 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 258: A: 134 B: 131 C: 92 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 259: A: 92 B: 96 C: 134 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 260: A: 137 B: 134 C: 96 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 261: A: 96 B: 98 C: 137 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 262: A: 135 B: 137 C: 98 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 263: A: 98 B: 95 C: 135 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 264: A: 136 B: 135 C: 95 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 265: A: 95 B: 97 C: 136 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 266: A: 130 B: 136 C: 97 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 267: A: 97 B: 91 C: 130 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 268: A: 101 B: 130 C: 91 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 269: A: 91 B: 64 C: 101 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 270: A: 99 B: 101 C: 64 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 271: A: 64 B: 60 C: 99 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 272: A: 128 B: 99 C: 60 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 273: A: 60 B: 62 C: 128 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 274: A: 129 B: 128 C: 62 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 275: A: 62 B: 90 C: 129 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 276: A: 147 B: 148 C: 149 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 277: A: 147 B: 150 C: 148 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 278: A: 147 B: 151 C: 150 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 279: A: 147 B: 152 C: 151 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 280: A: 147 B: 153 C: 152 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 281: A: 147 B: 154 C: 153 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 282: A: 147 B: 155 C: 154 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 283: A: 147 B: 156 C: 155 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 284: A: 147 B: 157 C: 156 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 285: A: 147 B: 158 C: 157 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 286: A: 147 B: 159 C: 158 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 287: A: 147 B: 149 C: 159 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 288: A: 160 B: 161 C: 149 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 289: A: 160 B: 149 C: 148 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 290: A: 162 B: 160 C: 148 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 291: A: 162 B: 148 C: 150 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 292: A: 163 B: 162 C: 150 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 293: A: 163 B: 150 C: 151 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 294: A: 164 B: 163 C: 151 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 295: A: 164 B: 151 C: 152 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 296: A: 165 B: 164 C: 152 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 297: A: 165 B: 152 C: 153 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 298: A: 166 B: 165 C: 153 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 299: A: 166 B: 153 C: 154 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 300: A: 167 B: 166 C: 154 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 301: A: 167 B: 154 C: 155 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 302: A: 168 B: 167 C: 155 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 303: A: 168 B: 155 C: 156 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 304: A: 169 B: 168 C: 156 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 305: A: 169 B: 156 C: 157 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 306: A: 170 B: 169 C: 157 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 307: A: 170 B: 157 C: 158 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 308: A: 171 B: 170 C: 158 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 309: A: 171 B: 158 C: 159 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 310: A: 161 B: 171 C: 159 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 311: A: 161 B: 159 C: 149 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 312: A: 172 B: 173 C: 174 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 313: A: 172 B: 175 C: 173 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 314: A: 172 B: 176 C: 175 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 315: A: 173 B: 177 C: 174 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 316: A: 178 B: 179 C: 180 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 317: A: 178 B: 180 C: 181 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 318: A: 178 B: 181 C: 182 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 319: A: 180 B: 179 C: 183 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 320: A: 179 B: 172 C: 174 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 321: A: 179 B: 178 C: 172 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 322: A: 180 B: 177 C: 173 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 323: A: 180 B: 183 C: 177 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 324: A: 181 B: 173 C: 175 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 325: A: 181 B: 180 C: 173 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 326: A: 184 B: 185 C: 186 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 327: A: 186 B: 187 C: 184 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 328: A: 188 B: 189 C: 190 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 329: A: 190 B: 191 C: 188 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 330: A: 188 B: 185 C: 184 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 331: A: 184 B: 189 C: 188 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 332: A: 191 B: 190 C: 187 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 333: A: 187 B: 186 C: 191 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 334: A: 192 B: 193 C: 194 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 335: A: 194 B: 195 C: 192 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 336: A: 196 B: 197 C: 198 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 337: A: 198 B: 199 C: 196 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 338: A: 199 B: 198 C: 193 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 339: A: 193 B: 192 C: 199 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 340: A: 196 B: 200 C: 197 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 341: A: 200 B: 201 C: 197 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 342: A: 196 B: 202 C: 200 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 343: A: 199 B: 202 C: 196 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 344: A: 199 B: 203 C: 202 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 345: A: 199 B: 204 C: 203 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 346: A: 199 B: 192 C: 204 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 347: A: 192 B: 205 C: 204 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 348: A: 192 B: 195 C: 205 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 349: A: 204 B: 206 C: 207 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 350: A: 204 B: 208 C: 206 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 351: A: 204 B: 209 C: 208 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 352: A: 204 B: 210 C: 209 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 353: A: 204 B: 205 C: 210 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 354: A: 206 B: 211 C: 207 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 355: A: 202 B: 212 C: 200 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 356: A: 202 B: 213 C: 212 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 357: A: 202 B: 214 C: 213 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 358: A: 202 B: 215 C: 214 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 359: A: 202 B: 203 C: 215 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 360: A: 215 B: 216 C: 214 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 361: A: 217 B: 200 C: 212 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 362: A: 217 B: 201 C: 200 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 363: A: 217 B: 218 C: 201 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 364: A: 217 B: 219 C: 220 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 365: A: 217 B: 213 C: 219 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 366: A: 217 B: 212 C: 213 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 367: A: 214 B: 219 C: 213 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 368: A: 214 B: 221 C: 219 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 369: A: 214 B: 216 C: 221 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 370: A: 222 B: 211 C: 208 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 371: A: 211 B: 206 C: 208 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 372: A: 222 B: 223 C: 211 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 373: A: 222 B: 224 C: 225 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 374: A: 222 B: 209 C: 224 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 375: A: 222 B: 208 C: 209 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 376: A: 224 B: 226 C: 227 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 377: A: 224 B: 210 C: 226 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 378: A: 224 B: 209 C: 210 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 379: A: 194 B: 226 C: 195 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 380: A: 226 B: 210 C: 195 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 381: A: 210 B: 205 C: 195 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 382: A: 224 B: 227 C: 218 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 383: A: 218 B: 217 C: 224 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 384: A: 225 B: 224 C: 217 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 385: A: 217 B: 220 C: 225 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 386: A: 222 B: 225 C: 220 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 387: A: 220 B: 219 C: 222 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 388: A: 223 B: 222 C: 219 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 389: A: 219 B: 221 C: 223 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 390: A: 211 B: 223 C: 221 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 391: A: 221 B: 216 C: 211 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 392: A: 204 B: 215 C: 203 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 393: A: 204 B: 211 C: 215 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 394: A: 211 B: 216 C: 215 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 395: A: 204 B: 207 C: 211 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 396: A: 228 B: 229 C: 230 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 397: A: 228 B: 231 C: 229 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 398: A: 228 B: 232 C: 231 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 399: A: 228 B: 233 C: 232 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 400: A: 228 B: 234 C: 233 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 401: A: 228 B: 235 C: 234 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 402: A: 228 B: 236 C: 235 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 403: A: 228 B: 237 C: 236 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 404: A: 228 B: 238 C: 237 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 405: A: 228 B: 239 C: 238 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 406: A: 228 B: 240 C: 239 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 407: A: 228 B: 230 C: 240 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 408: A: 241 B: 242 C: 230 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 409: A: 241 B: 230 C: 229 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 410: A: 243 B: 241 C: 229 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 411: A: 243 B: 229 C: 231 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 412: A: 244 B: 243 C: 231 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 413: A: 244 B: 231 C: 232 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 414: A: 245 B: 244 C: 232 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 415: A: 245 B: 232 C: 233 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 416: A: 246 B: 245 C: 233 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 417: A: 246 B: 233 C: 234 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 418: A: 247 B: 246 C: 234 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 419: A: 247 B: 234 C: 235 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 420: A: 248 B: 247 C: 235 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 421: A: 248 B: 235 C: 236 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 422: A: 249 B: 248 C: 236 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 423: A: 249 B: 236 C: 237 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 424: A: 250 B: 249 C: 237 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 425: A: 250 B: 237 C: 238 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 426: A: 251 B: 250 C: 238 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 427: A: 251 B: 238 C: 239 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 428: A: 252 B: 251 C: 239 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 429: A: 252 B: 239 C: 240 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 430: A: 242 B: 252 C: 240 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 431: A: 242 B: 240 C: 230 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 432: A: 253 B: 254 C: 255 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 433: A: 253 B: 256 C: 254 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 434: A: 253 B: 257 C: 256 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 435: A: 253 B: 258 C: 257 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 436: A: 253 B: 259 C: 258 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 437: A: 253 B: 260 C: 259 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 438: A: 253 B: 261 C: 260 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 439: A: 253 B: 262 C: 261 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 440: A: 253 B: 263 C: 262 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 441: A: 253 B: 264 C: 263 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 442: A: 253 B: 265 C: 264 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 443: A: 253 B: 255 C: 265 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 444: A: 266 B: 267 C: 255 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 445: A: 266 B: 255 C: 254 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 446: A: 268 B: 266 C: 254 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 447: A: 268 B: 254 C: 256 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 448: A: 269 B: 268 C: 256 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 449: A: 269 B: 256 C: 257 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 450: A: 270 B: 269 C: 257 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 451: A: 270 B: 257 C: 258 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 452: A: 271 B: 270 C: 258 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 453: A: 271 B: 258 C: 259 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 454: A: 272 B: 271 C: 259 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 455: A: 272 B: 259 C: 260 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 456: A: 273 B: 272 C: 260 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 457: A: 273 B: 260 C: 261 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 458: A: 274 B: 273 C: 261 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 459: A: 274 B: 261 C: 262 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 460: A: 275 B: 274 C: 262 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 461: A: 275 B: 262 C: 263 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 462: A: 276 B: 275 C: 263 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 463: A: 276 B: 263 C: 264 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 464: A: 277 B: 276 C: 264 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 465: A: 277 B: 264 C: 265 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 466: A: 267 B: 277 C: 265 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 467: A: 267 B: 265 C: 255 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 468: A: 278 B: 279 C: 280 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 469: A: 278 B: 281 C: 279 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 470: A: 280 B: 282 C: 278 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 471: A: 283 B: 284 C: 285 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 472: A: 283 B: 285 C: 286 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 473: A: 284 B: 283 C: 287 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 474: A: 283 B: 281 C: 278 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 475: A: 283 B: 286 C: 281 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 476: A: 287 B: 278 C: 282 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 477: A: 287 B: 283 C: 278 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 478: A: 284 B: 282 C: 280 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 479: A: 284 B: 287 C: 282 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 480: A: 285 B: 280 C: 279 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 481: A: 285 B: 284 C: 280 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 482: A: 288 B: 289 C: 290 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 483: A: 289 B: 291 C: 290 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 484: A: 291 B: 292 C: 290 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 485: A: 288 B: 293 C: 289 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 486: A: 293 B: 294 C: 289 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 487: A: 293 B: 295 C: 294 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 488: A: 295 B: 296 C: 294 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 489: A: 296 B: 297 C: 294 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 490: A: 296 B: 298 C: 297 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 491: A: 296 B: 299 C: 298 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 492: A: 300 B: 301 C: 302 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 493: A: 302 B: 301 C: 303 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 494: A: 303 B: 301 C: 304 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 495: A: 300 B: 302 C: 305 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 496: A: 305 B: 302 C: 306 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 497: A: 305 B: 306 C: 307 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 498: A: 307 B: 306 C: 308 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 499: A: 308 B: 306 C: 309 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 500: A: 308 B: 309 C: 310 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 501: A: 308 B: 310 C: 311 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 502: A: 305 B: 295 C: 293 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 503: A: 305 B: 307 C: 295 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 504: A: 300 B: 293 C: 288 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 505: A: 300 B: 305 C: 293 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 506: A: 301 B: 288 C: 290 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 507: A: 301 B: 300 C: 288 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 508: A: 304 B: 290 C: 292 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 509: A: 304 B: 301 C: 290 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 510: A: 303 B: 292 C: 291 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 511: A: 303 B: 304 C: 292 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 512: A: 302 B: 291 C: 289 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 513: A: 302 B: 303 C: 291 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 514: A: 306 B: 289 C: 294 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 515: A: 306 B: 302 C: 289 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 516: A: 309 B: 294 C: 297 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 517: A: 309 B: 306 C: 294 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 518: A: 310 B: 297 C: 298 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 519: A: 310 B: 309 C: 297 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 520: A: 311 B: 298 C: 299 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 521: A: 311 B: 310 C: 298 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 522: A: 308 B: 299 C: 296 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 523: A: 308 B: 311 C: 299 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 524: A: 307 B: 296 C: 295 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 525: A: 307 B: 308 C: 296 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 526: A: 312 B: 313 C: 314 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 527: A: 312 B: 315 C: 313 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 528: A: 312 B: 316 C: 315 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 529: A: 312 B: 317 C: 316 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 530: A: 312 B: 318 C: 317 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 531: A: 312 B: 319 C: 318 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 532: A: 312 B: 320 C: 319 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 533: A: 312 B: 321 C: 320 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 534: A: 312 B: 322 C: 321 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 535: A: 312 B: 323 C: 322 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 536: A: 324 B: 325 C: 326 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 537: A: 324 B: 327 C: 325 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 538: A: 324 B: 328 C: 327 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 539: A: 324 B: 329 C: 328 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 540: A: 324 B: 330 C: 329 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 541: A: 324 B: 331 C: 330 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 542: A: 324 B: 332 C: 331 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 543: A: 324 B: 333 C: 332 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 544: A: 324 B: 334 C: 333 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 545: A: 324 B: 335 C: 334 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 546: A: 324 B: 336 C: 335 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 547: A: 324 B: 326 C: 336 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 548: A: 313 B: 315 C: 326 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 549: A: 313 B: 326 C: 325 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 550: A: 314 B: 313 C: 325 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 551: A: 314 B: 325 C: 327 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 552: A: 312 B: 314 C: 327 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 553: A: 312 B: 327 C: 328 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 554: A: 323 B: 312 C: 328 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 555: A: 323 B: 328 C: 329 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 556: A: 322 B: 323 C: 329 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 557: A: 322 B: 329 C: 330 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 558: A: 321 B: 322 C: 330 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 559: A: 321 B: 330 C: 331 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 560: A: 320 B: 321 C: 331 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 561: A: 320 B: 331 C: 332 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 562: A: 319 B: 320 C: 332 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 563: A: 319 B: 332 C: 333 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 564: A: 318 B: 319 C: 333 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 565: A: 318 B: 333 C: 334 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 566: A: 317 B: 318 C: 334 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 567: A: 317 B: 334 C: 335 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 568: A: 316 B: 317 C: 335 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 569: A: 316 B: 335 C: 336 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 570: A: 315 B: 316 C: 336 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- *MESH_FACE 571: A: 315 B: 336 C: 326 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
- }
- *MESH_NORMALS {
- *MESH_FACENORMAL 0 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 0 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 1 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 2 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 1 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 1 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 3 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 2 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 2 1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 0 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 4 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 1 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 3 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 4 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 5 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 1 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 4 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 0 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 2 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 6 0.000000 1.000000 0.000000
- *MESH_FACENORMAL 5 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 6 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 7 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 0 0.000000 1.000000 0.000000
- *MESH_FACENORMAL 6 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 8 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 9 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 6 -1.000000 0.000000 -0.000000
- *MESH_FACENORMAL 7 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 9 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 7 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 6 -1.000000 0.000000 -0.000000
- *MESH_FACENORMAL 8 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 9 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 10 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 7 -1.000000 0.000000 -0.000000
- *MESH_FACENORMAL 9 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 9 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 11 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 10 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 10 0.000000 1.000000 -0.000000
- *MESH_VERTEXNORMAL 5 0.000002 0.988273 0.152697
- *MESH_VERTEXNORMAL 4 0.000000 1.000000 -0.000000
- *MESH_VERTEXNORMAL 12 0.000002 1.000000 -0.000000
- *MESH_FACENORMAL 11 0.000004 1.000000 -0.000000
- *MESH_VERTEXNORMAL 12 0.000002 1.000000 -0.000000
- *MESH_VERTEXNORMAL 13 0.000006 0.952226 0.305393
- *MESH_VERTEXNORMAL 5 0.000002 0.988273 0.152697
- *MESH_FACENORMAL 12 0.000003 0.894427 0.447214
- *MESH_VERTEXNORMAL 1 0.000008 0.952226 0.305393
- *MESH_VERTEXNORMAL 5 0.000002 0.988273 0.152697
- *MESH_VERTEXNORMAL 13 0.000006 0.952226 0.305393
- *MESH_FACENORMAL 13 0.000010 0.894428 0.447212
- *MESH_VERTEXNORMAL 13 0.000006 0.952226 0.305393
- *MESH_VERTEXNORMAL 14 0.000009 0.988273 0.152696
- *MESH_VERTEXNORMAL 1 0.000008 0.952226 0.305393
- *MESH_FACENORMAL 14 0.000011 1.000000 0.000000
- *MESH_VERTEXNORMAL 3 0.000009 1.000000 0.000000
- *MESH_VERTEXNORMAL 1 0.000008 0.952226 0.305393
- *MESH_VERTEXNORMAL 14 0.000009 0.988273 0.152696
- *MESH_FACENORMAL 15 0.000007 1.000000 0.000000
- *MESH_VERTEXNORMAL 14 0.000009 0.988273 0.152696
- *MESH_VERTEXNORMAL 15 0.000007 1.000000 0.000000
- *MESH_VERTEXNORMAL 3 0.000009 1.000000 0.000000
- *MESH_FACENORMAL 16 0.000000 0.650792 -0.759256
- *MESH_VERTEXNORMAL 0 0.000000 0.650792 -0.759256
- *MESH_VERTEXNORMAL 12 0.000000 0.650792 -0.759256
- *MESH_VERTEXNORMAL 4 0.000000 0.650792 -0.759256
- *MESH_FACENORMAL 17 0.000000 0.650792 -0.759256
- *MESH_VERTEXNORMAL 0 0.000000 0.650792 -0.759256
- *MESH_VERTEXNORMAL 16 0.000000 0.809850 -0.586637
- *MESH_VERTEXNORMAL 12 0.000000 0.650792 -0.759256
- *MESH_FACENORMAL 18 0.000000 0.650791 -0.759256
- *MESH_VERTEXNORMAL 0 0.000000 0.650791 -0.759256
- *MESH_VERTEXNORMAL 17 0.000000 0.837992 -0.545682
- *MESH_VERTEXNORMAL 16 0.000000 0.809850 -0.586637
- *MESH_FACENORMAL 19 0.000000 0.650791 -0.759257
- *MESH_VERTEXNORMAL 0 0.000000 0.650791 -0.759256
- *MESH_VERTEXNORMAL 7 0.000000 0.650791 -0.759257
- *MESH_VERTEXNORMAL 17 0.000000 0.837992 -0.545682
- *MESH_FACENORMAL 20 0.000000 0.650791 -0.759257
- *MESH_VERTEXNORMAL 7 0.000000 0.650791 -0.759257
- *MESH_VERTEXNORMAL 18 0.000000 0.650791 -0.759257
- *MESH_VERTEXNORMAL 17 0.000000 0.837992 -0.545682
- *MESH_FACENORMAL 21 0.000000 0.650791 -0.759256
- *MESH_VERTEXNORMAL 7 0.000000 0.650791 -0.759257
- *MESH_VERTEXNORMAL 10 0.000000 0.650791 -0.759256
- *MESH_VERTEXNORMAL 18 0.000000 0.650791 -0.759257
- *MESH_FACENORMAL 22 0.000000 0.641636 0.767009
- *MESH_VERTEXNORMAL 6 0.000001 0.641635 0.767010
- *MESH_VERTEXNORMAL 19 0.000002 0.641635 0.767010
- *MESH_VERTEXNORMAL 8 0.000000 0.641636 0.767009
- *MESH_FACENORMAL 23 0.000004 0.641635 0.767011
- *MESH_VERTEXNORMAL 6 0.000001 0.641635 0.767011
- *MESH_VERTEXNORMAL 20 0.000002 0.641634 0.767011
- *MESH_VERTEXNORMAL 19 0.000002 0.641635 0.767010
- *MESH_FACENORMAL 24 0.000000 0.641634 0.767011
- *MESH_VERTEXNORMAL 6 0.000001 0.641635 0.767011
- *MESH_VERTEXNORMAL 21 -0.000000 0.641634 0.767011
- *MESH_VERTEXNORMAL 20 0.000002 0.641634 0.767011
- *MESH_FACENORMAL 25 0.000000 0.641634 0.767011
- *MESH_VERTEXNORMAL 6 0.000001 0.641635 0.767011
- *MESH_VERTEXNORMAL 2 0.000001 0.641635 0.767010
- *MESH_VERTEXNORMAL 21 -0.000000 0.641634 0.767011
- *MESH_FACENORMAL 26 -0.000001 0.641634 0.767011
- *MESH_VERTEXNORMAL 2 0.000001 0.641635 0.767010
- *MESH_VERTEXNORMAL 15 0.000002 0.641635 0.767010
- *MESH_VERTEXNORMAL 21 -0.000000 0.641634 0.767011
- *MESH_FACENORMAL 27 0.000005 0.641636 0.767009
- *MESH_VERTEXNORMAL 2 0.000001 0.641635 0.767010
- *MESH_VERTEXNORMAL 3 0.000005 0.641636 0.767009
- *MESH_VERTEXNORMAL 15 0.000002 0.641635 0.767010
- *MESH_FACENORMAL 28 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 22 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 23 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 24 0.000000 1.000000 0.000000
- *MESH_FACENORMAL 29 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 24 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 25 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 22 0.000000 1.000000 0.000000
- *MESH_FACENORMAL 30 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 25 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 24 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 26 0.000000 0.000000 -1.000000
- *MESH_FACENORMAL 31 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 26 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 27 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 25 0.000000 0.000000 -1.000000
- *MESH_FACENORMAL 32 0.000000 0.653232 -0.757158
- *MESH_VERTEXNORMAL 28 0.000000 0.653233 -0.757157
- *MESH_VERTEXNORMAL 29 0.000000 0.653232 -0.757158
- *MESH_VERTEXNORMAL 30 0.000000 0.653232 -0.757158
- *MESH_FACENORMAL 33 0.000000 0.653232 -0.757158
- *MESH_VERTEXNORMAL 28 0.000000 0.653233 -0.757157
- *MESH_VERTEXNORMAL 31 0.000000 0.653233 -0.757157
- *MESH_VERTEXNORMAL 29 0.000000 0.653232 -0.757158
- *MESH_FACENORMAL 34 0.000000 0.653234 -0.757156
- *MESH_VERTEXNORMAL 28 0.000000 0.653233 -0.757157
- *MESH_VERTEXNORMAL 22 0.000000 0.653234 -0.757156
- *MESH_VERTEXNORMAL 31 0.000000 0.653233 -0.757157
- *MESH_FACENORMAL 35 0.000000 0.653234 -0.757156
- *MESH_VERTEXNORMAL 28 0.000000 0.653233 -0.757157
- *MESH_VERTEXNORMAL 23 0.000000 0.653234 -0.757156
- *MESH_VERTEXNORMAL 22 0.000000 0.653234 -0.757156
- *MESH_FACENORMAL 36 0.000000 0.976187 0.216930
- *MESH_VERTEXNORMAL 32 0.000000 0.976187 0.216930
- *MESH_VERTEXNORMAL 33 0.000000 0.976187 0.216930
- *MESH_VERTEXNORMAL 34 0.000000 0.989374 0.145391
- *MESH_FACENORMAL 37 0.000000 0.976187 0.216930
- *MESH_VERTEXNORMAL 34 0.000000 0.989374 0.145391
- *MESH_VERTEXNORMAL 35 0.000000 0.997354 0.072696
- *MESH_VERTEXNORMAL 32 0.000000 0.976187 0.216930
- *MESH_FACENORMAL 38 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 36 -0.000000 -0.217192 0.976129
- *MESH_VERTEXNORMAL 37 -0.000000 -0.434383 0.900728
- *MESH_VERTEXNORMAL 38 0.000000 0.173285 0.984872
- *MESH_FACENORMAL 39 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 38 0.000000 0.173285 0.984872
- *MESH_VERTEXNORMAL 39 0.000000 0.346569 0.938024
- *MESH_VERTEXNORMAL 36 -0.000000 -0.217192 0.976129
- *MESH_FACENORMAL 40 0.000000 0.503871 0.863779
- *MESH_VERTEXNORMAL 39 0.000000 0.346569 0.938024
- *MESH_VERTEXNORMAL 38 0.000000 0.173285 0.984872
- *MESH_VERTEXNORMAL 33 0.000000 0.503871 0.863779
- *MESH_FACENORMAL 41 0.000000 0.503871 0.863779
- *MESH_VERTEXNORMAL 33 0.000000 0.503871 0.863779
- *MESH_VERTEXNORMAL 32 0.000000 0.503871 0.863779
- *MESH_VERTEXNORMAL 39 0.000000 0.346569 0.938024
- *MESH_FACENORMAL 42 -0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 27 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 40 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 41 -0.000000 -1.000000 0.000000
- *MESH_FACENORMAL 43 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 40 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 42 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 41 -0.000000 -1.000000 0.000000
- *MESH_FACENORMAL 44 0.000001 -1.000000 0.000000
- *MESH_VERTEXNORMAL 27 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 43 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 40 0.000000 -1.000000 0.000000
- *MESH_FACENORMAL 45 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 27 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 26 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 43 0.000000 -1.000000 0.000000
- *MESH_FACENORMAL 46 0.000000 -0.619645 0.784883
- *MESH_VERTEXNORMAL 42 -0.000000 -0.619645 0.784883
- *MESH_VERTEXNORMAL 40 0.000000 -0.619645 0.784883
- *MESH_VERTEXNORMAL 37 -0.000000 -0.434383 0.900728
- *MESH_FACENORMAL 47 -0.000000 -0.619645 0.784883
- *MESH_VERTEXNORMAL 37 -0.000000 -0.434383 0.900728
- *MESH_VERTEXNORMAL 36 -0.000000 -0.217192 0.976129
- *MESH_VERTEXNORMAL 42 -0.000000 -0.619645 0.784883
- *MESH_FACENORMAL 48 0.000000 1.000000 -0.000000
- *MESH_VERTEXNORMAL 35 0.000000 0.997354 0.072696
- *MESH_VERTEXNORMAL 34 0.000000 0.989374 0.145391
- *MESH_VERTEXNORMAL 30 0.000000 1.000000 -0.000000
- *MESH_FACENORMAL 49 0.000000 1.000000 -0.000000
- *MESH_VERTEXNORMAL 30 0.000000 1.000000 -0.000000
- *MESH_VERTEXNORMAL 29 0.000000 1.000000 -0.000000
- *MESH_VERTEXNORMAL 35 0.000000 0.997354 0.072696
- *MESH_FACENORMAL 50 -0.998909 0.046708 -0.000000
- *MESH_VERTEXNORMAL 44 -0.998909 0.046707 -0.000000
- *MESH_VERTEXNORMAL 45 -0.998909 0.046707 -0.000000
- *MESH_VERTEXNORMAL 46 -0.998909 0.046708 -0.000000
- *MESH_FACENORMAL 51 -0.998909 0.046707 -0.000000
- *MESH_VERTEXNORMAL 44 -0.998909 0.046707 -0.000000
- *MESH_VERTEXNORMAL 47 -0.999410 0.015037 -0.030886
- *MESH_VERTEXNORMAL 45 -0.998909 0.046707 -0.000000
- *MESH_FACENORMAL 52 -0.998909 0.046707 -0.000000
- *MESH_VERTEXNORMAL 44 -0.998909 0.046707 -0.000000
- *MESH_VERTEXNORMAL 48 -0.998909 0.046707 -0.000000
- *MESH_VERTEXNORMAL 47 -0.999410 0.015037 -0.030886
- *MESH_FACENORMAL 53 0.998909 0.046708 -0.000004
- *MESH_VERTEXNORMAL 49 0.998908 0.046714 -0.000004
- *MESH_VERTEXNORMAL 50 0.999410 0.015035 -0.030885
- *MESH_VERTEXNORMAL 51 0.998909 0.046708 -0.000004
- *MESH_FACENORMAL 54 0.998909 0.046708 -0.000005
- *MESH_VERTEXNORMAL 49 0.998908 0.046714 -0.000004
- *MESH_VERTEXNORMAL 52 0.998908 0.046714 -0.000002
- *MESH_VERTEXNORMAL 50 0.999410 0.015035 -0.030885
- *MESH_FACENORMAL 55 0.998908 0.046727 -0.000002
- *MESH_VERTEXNORMAL 49 0.998908 0.046714 -0.000004
- *MESH_VERTEXNORMAL 53 0.998908 0.046727 -0.000002
- *MESH_VERTEXNORMAL 52 0.998908 0.046714 -0.000002
- *MESH_FACENORMAL 56 0.000000 -0.994207 0.107482
- *MESH_VERTEXNORMAL 47 0.000000 -0.997423 0.071747
- *MESH_VERTEXNORMAL 48 0.000000 -0.994207 0.107482
- *MESH_VERTEXNORMAL 51 0.000000 -0.994207 0.107482
- *MESH_FACENORMAL 57 0.000000 -0.994207 0.107482
- *MESH_VERTEXNORMAL 51 0.000000 -0.994207 0.107482
- *MESH_VERTEXNORMAL 50 -0.000000 -0.999356 0.035874
- *MESH_VERTEXNORMAL 47 0.000000 -0.997423 0.071747
- *MESH_FACENORMAL 58 0.000000 0.164398 -0.986394
- *MESH_VERTEXNORMAL 48 0.000000 0.164398 -0.986394
- *MESH_VERTEXNORMAL 44 0.000000 0.164398 -0.986394
- *MESH_VERTEXNORMAL 49 0.000000 0.164398 -0.986394
- *MESH_FACENORMAL 59 0.000000 0.164398 -0.986394
- *MESH_VERTEXNORMAL 49 0.000000 0.164398 -0.986394
- *MESH_VERTEXNORMAL 51 0.000000 0.164398 -0.986394
- *MESH_VERTEXNORMAL 48 0.000000 0.164398 -0.986394
- *MESH_FACENORMAL 60 0.000000 0.992278 -0.124035
- *MESH_VERTEXNORMAL 44 0.000000 0.992278 -0.124035
- *MESH_VERTEXNORMAL 46 0.000000 0.992278 -0.124035
- *MESH_VERTEXNORMAL 53 0.000000 0.992278 -0.124035
- *MESH_FACENORMAL 61 0.000000 0.992278 -0.124035
- *MESH_VERTEXNORMAL 53 0.000000 0.992278 -0.124035
- *MESH_VERTEXNORMAL 49 0.000000 0.992278 -0.124035
- *MESH_VERTEXNORMAL 44 0.000000 0.992278 -0.124035
- *MESH_FACENORMAL 62 0.000000 0.124036 0.992278
- *MESH_VERTEXNORMAL 46 0.000000 0.124036 0.992278
- *MESH_VERTEXNORMAL 45 0.000000 0.124036 0.992278
- *MESH_VERTEXNORMAL 52 0.000000 0.124036 0.992278
- *MESH_FACENORMAL 63 0.000000 0.124036 0.992278
- *MESH_VERTEXNORMAL 52 0.000000 0.124036 0.992278
- *MESH_VERTEXNORMAL 53 0.000000 0.124036 0.992278
- *MESH_VERTEXNORMAL 46 0.000000 0.124036 0.992278
- *MESH_FACENORMAL 64 0.000001 0.989949 -0.141421
- *MESH_VERTEXNORMAL 45 0.000000 0.989950 -0.141421
- *MESH_VERTEXNORMAL 16 0.000000 0.809850 -0.586637
- *MESH_VERTEXNORMAL 17 0.000000 0.837992 -0.545682
- *MESH_FACENORMAL 65 0.000000 0.989950 -0.141421
- *MESH_VERTEXNORMAL 17 0.000000 0.837992 -0.545682
- *MESH_VERTEXNORMAL 52 0.000000 0.989950 -0.141421
- *MESH_VERTEXNORMAL 45 0.000000 0.989950 -0.141421
- *MESH_FACENORMAL 66 0.000000 1.000000 -0.000000
- *MESH_VERTEXNORMAL 18 0.000000 1.000000 -0.000000
- *MESH_VERTEXNORMAL 10 0.000000 1.000000 -0.000000
- *MESH_VERTEXNORMAL 11 0.000000 0.988273 0.152697
- *MESH_FACENORMAL 67 0.000000 1.000000 -0.000000
- *MESH_VERTEXNORMAL 11 0.000000 0.988273 0.152697
- *MESH_VERTEXNORMAL 54 -0.000003 0.952226 0.305393
- *MESH_VERTEXNORMAL 18 0.000000 1.000000 -0.000000
- *MESH_FACENORMAL 68 0.000000 0.894426 0.447215
- *MESH_VERTEXNORMAL 54 -0.000003 0.952226 0.305393
- *MESH_VERTEXNORMAL 11 0.000000 0.988273 0.152697
- *MESH_VERTEXNORMAL 9 -0.000005 0.973249 0.229753
- *MESH_FACENORMAL 69 -0.000010 0.894428 0.447212
- *MESH_VERTEXNORMAL 9 -0.000005 0.973249 0.229753
- *MESH_VERTEXNORMAL 55 -0.000010 0.973249 0.229752
- *MESH_VERTEXNORMAL 54 -0.000003 0.952226 0.305393
- *MESH_FACENORMAL 70 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 9 -0.000005 0.973249 0.229753
- *MESH_VERTEXNORMAL 8 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 19 -0.000005 1.000000 0.000000
- *MESH_FACENORMAL 71 -0.000011 1.000000 0.000000
- *MESH_VERTEXNORMAL 19 -0.000005 1.000000 0.000000
- *MESH_VERTEXNORMAL 55 -0.000010 0.973249 0.229752
- *MESH_VERTEXNORMAL 9 -0.000005 0.973249 0.229753
- *MESH_FACENORMAL 72 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 21 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 56 -0.000000 -0.917100 0.398657
- *MESH_VERTEXNORMAL 57 0.000000 -0.979933 0.199329
- *MESH_FACENORMAL 73 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 57 0.000000 -0.979933 0.199329
- *MESH_VERTEXNORMAL 20 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 21 0.000000 -1.000000 0.000000
- *MESH_FACENORMAL 74 -0.000000 -0.819233 0.573461
- *MESH_VERTEXNORMAL 56 -0.000000 -0.917100 0.398657
- *MESH_VERTEXNORMAL 58 -0.000000 -0.979933 0.199328
- *MESH_VERTEXNORMAL 59 -0.000000 -0.917100 0.398657
- *MESH_FACENORMAL 75 0.000000 -0.819233 0.573461
- *MESH_VERTEXNORMAL 59 -0.000000 -0.917100 0.398657
- *MESH_VERTEXNORMAL 57 0.000000 -0.979933 0.199329
- *MESH_VERTEXNORMAL 56 -0.000000 -0.917100 0.398657
- *MESH_FACENORMAL 76 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 58 -0.000000 -0.979933 0.199328
- *MESH_VERTEXNORMAL 47 0.000000 -0.997423 0.071747
- *MESH_VERTEXNORMAL 50 -0.000000 -0.999356 0.035874
- *MESH_FACENORMAL 77 -0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 50 -0.000000 -0.999356 0.035874
- *MESH_VERTEXNORMAL 59 -0.000000 -0.917100 0.398657
- *MESH_VERTEXNORMAL 58 -0.000000 -0.979933 0.199328
- *MESH_FACENORMAL 78 0.998909 0.046708 -0.000000
- *MESH_VERTEXNORMAL 54 0.998909 0.046708 -0.000000
- *MESH_VERTEXNORMAL 42 0.996438 0.084025 -0.007146
- *MESH_VERTEXNORMAL 18 0.998909 0.046708 -0.000000
- *MESH_FACENORMAL 79 0.998909 0.046708 -0.000000
- *MESH_VERTEXNORMAL 55 0.998909 0.046708 -0.000000
- *MESH_VERTEXNORMAL 42 0.996438 0.084025 -0.007146
- *MESH_VERTEXNORMAL 54 0.998909 0.046708 -0.000000
- *MESH_FACENORMAL 80 0.998909 0.046708 0.000000
- *MESH_VERTEXNORMAL 41 0.998909 0.046708 0.000000
- *MESH_VERTEXNORMAL 42 0.996438 0.084025 -0.007146
- *MESH_VERTEXNORMAL 55 0.998909 0.046708 -0.000000
- *MESH_FACENORMAL 81 0.998909 0.046708 -0.000000
- *MESH_VERTEXNORMAL 18 0.998909 0.046708 -0.000000
- *MESH_VERTEXNORMAL 42 0.996438 0.084025 -0.007146
- *MESH_VERTEXNORMAL 17 0.994661 0.099625 -0.026930
- *MESH_FACENORMAL 82 0.972046 0.232070 -0.035627
- *MESH_VERTEXNORMAL 36 0.991509 0.117187 -0.056370
- *MESH_VERTEXNORMAL 17 0.994661 0.099625 -0.026930
- *MESH_VERTEXNORMAL 42 0.996438 0.084025 -0.007146
- *MESH_FACENORMAL 83 0.994851 0.071618 -0.071716
- *MESH_VERTEXNORMAL 17 0.994661 0.099625 -0.026930
- *MESH_VERTEXNORMAL 36 0.991509 0.117187 -0.056370
- *MESH_VERTEXNORMAL 50 0.999410 0.015035 -0.030885
- *MESH_FACENORMAL 84 0.997038 0.046620 -0.061164
- *MESH_VERTEXNORMAL 39 0.997916 0.031725 -0.056190
- *MESH_VERTEXNORMAL 50 0.999410 0.015035 -0.030885
- *MESH_VERTEXNORMAL 36 0.991509 0.117187 -0.056370
- *MESH_FACENORMAL 85 0.998547 0.016823 -0.051202
- *MESH_VERTEXNORMAL 39 0.997916 0.031725 -0.056190
- *MESH_VERTEXNORMAL 32 0.998549 -0.035440 -0.040556
- *MESH_VERTEXNORMAL 50 0.999410 0.015035 -0.030885
- *MESH_FACENORMAL 86 0.995710 -0.087601 -0.029794
- *MESH_VERTEXNORMAL 32 0.998549 -0.035440 -0.040556
- *MESH_VERTEXNORMAL 35 0.997987 -0.055678 -0.030350
- *MESH_VERTEXNORMAL 50 0.999410 0.015035 -0.030885
- *MESH_FACENORMAL 87 0.997180 -0.067533 -0.032724
- *MESH_VERTEXNORMAL 50 0.999410 0.015035 -0.030885
- *MESH_VERTEXNORMAL 35 0.997987 -0.055678 -0.030350
- *MESH_VERTEXNORMAL 59 0.999732 -0.010893 -0.020427
- *MESH_FACENORMAL 88 0.999524 -0.011815 -0.028484
- *MESH_VERTEXNORMAL 29 0.999585 0.027213 -0.009499
- *MESH_VERTEXNORMAL 59 0.999732 -0.010893 -0.020427
- *MESH_VERTEXNORMAL 35 0.997987 -0.055678 -0.030350
- *MESH_FACENORMAL 89 0.973095 0.230405 0.000000
- *MESH_VERTEXNORMAL 57 0.987197 0.158366 0.019031
- *MESH_VERTEXNORMAL 25 0.988480 0.149923 -0.020748
- *MESH_VERTEXNORMAL 20 0.986149 0.160597 -0.041465
- *MESH_FACENORMAL 90 0.973095 0.230405 0.000000
- *MESH_VERTEXNORMAL 22 0.971485 0.232318 0.047396
- *MESH_VERTEXNORMAL 25 0.988480 0.149923 -0.020748
- *MESH_VERTEXNORMAL 57 0.987197 0.158366 0.019031
- *MESH_FACENORMAL 91 0.967686 0.233707 0.094685
- *MESH_VERTEXNORMAL 31 0.988864 0.141001 0.047610
- *MESH_VERTEXNORMAL 22 0.971485 0.232318 0.047396
- *MESH_VERTEXNORMAL 57 0.987197 0.158366 0.019031
- *MESH_FACENORMAL 92 0.992533 0.089703 -0.082650
- *MESH_VERTEXNORMAL 20 0.986149 0.160597 -0.041465
- *MESH_VERTEXNORMAL 25 0.988480 0.149923 -0.020748
- *MESH_VERTEXNORMAL 19 0.997751 0.061099 -0.027577
- *MESH_FACENORMAL 93 0.998909 0.046708 -0.000000
- *MESH_VERTEXNORMAL 27 0.998909 0.046708 -0.000000
- *MESH_VERTEXNORMAL 19 0.997751 0.061099 -0.027577
- *MESH_VERTEXNORMAL 25 0.988480 0.149923 -0.020748
- *MESH_FACENORMAL 94 0.998909 0.046707 -0.000000
- *MESH_VERTEXNORMAL 31 0.988864 0.141001 0.047610
- *MESH_VERTEXNORMAL 57 0.987197 0.158366 0.019031
- *MESH_VERTEXNORMAL 29 0.999585 0.027213 -0.009499
- *MESH_FACENORMAL 95 0.998909 0.046708 -0.000000
- *MESH_VERTEXNORMAL 59 0.999732 -0.010893 -0.020427
- *MESH_VERTEXNORMAL 29 0.999585 0.027213 -0.009499
- *MESH_VERTEXNORMAL 57 0.987197 0.158366 0.019031
- *MESH_FACENORMAL 96 0.998909 0.046708 0.000000
- *MESH_VERTEXNORMAL 19 0.997751 0.061099 -0.027577
- *MESH_VERTEXNORMAL 27 0.998909 0.046708 -0.000000
- *MESH_VERTEXNORMAL 55 0.998909 0.046708 -0.000000
- *MESH_FACENORMAL 97 0.998909 0.046708 0.000000
- *MESH_VERTEXNORMAL 41 0.998909 0.046708 0.000000
- *MESH_VERTEXNORMAL 55 0.998909 0.046708 -0.000000
- *MESH_VERTEXNORMAL 27 0.998909 0.046708 -0.000000
- *MESH_FACENORMAL 98 0.998909 0.046708 0.000000
- *MESH_VERTEXNORMAL 52 0.998908 0.046714 -0.000002
- *MESH_VERTEXNORMAL 17 0.994661 0.099625 -0.026930
- *MESH_VERTEXNORMAL 50 0.999410 0.015035 -0.030885
- *MESH_FACENORMAL 99 -0.998909 0.046708 0.000000
- *MESH_VERTEXNORMAL 40 -0.996438 0.084025 -0.007146
- *MESH_VERTEXNORMAL 13 -0.998909 0.046708 -0.000000
- *MESH_VERTEXNORMAL 12 -0.998909 0.046708 0.000000
- *MESH_FACENORMAL 100 -0.998909 0.046708 -0.000000
- *MESH_VERTEXNORMAL 40 -0.996438 0.084025 -0.007146
- *MESH_VERTEXNORMAL 14 -0.998909 0.046707 -0.000000
- *MESH_VERTEXNORMAL 13 -0.998909 0.046708 -0.000000
- *MESH_FACENORMAL 101 -0.998909 0.046707 0.000000
- *MESH_VERTEXNORMAL 40 -0.996438 0.084025 -0.007146
- *MESH_VERTEXNORMAL 43 -0.998909 0.046707 -0.000000
- *MESH_VERTEXNORMAL 14 -0.998909 0.046707 -0.000000
- *MESH_FACENORMAL 102 -0.998909 0.046708 -0.000000
- *MESH_VERTEXNORMAL 40 -0.996438 0.084025 -0.007146
- *MESH_VERTEXNORMAL 12 -0.998909 0.046708 0.000000
- *MESH_VERTEXNORMAL 16 -0.994660 0.099626 -0.026931
- *MESH_FACENORMAL 103 -0.972046 0.232073 -0.035628
- *MESH_VERTEXNORMAL 16 -0.994660 0.099626 -0.026931
- *MESH_VERTEXNORMAL 37 -0.991509 0.117188 -0.056371
- *MESH_VERTEXNORMAL 40 -0.996438 0.084025 -0.007146
- *MESH_FACENORMAL 104 -0.994850 0.071619 -0.071717
- *MESH_VERTEXNORMAL 37 -0.991509 0.117188 -0.056371
- *MESH_VERTEXNORMAL 16 -0.994660 0.099626 -0.026931
- *MESH_VERTEXNORMAL 47 -0.999410 0.015037 -0.030886
- *MESH_FACENORMAL 105 -0.997038 0.046620 -0.061165
- *MESH_VERTEXNORMAL 47 -0.999410 0.015037 -0.030886
- *MESH_VERTEXNORMAL 38 -0.997916 0.031725 -0.056191
- *MESH_VERTEXNORMAL 37 -0.991509 0.117188 -0.056371
- *MESH_FACENORMAL 106 -0.998547 0.016822 -0.051203
- *MESH_VERTEXNORMAL 33 -0.998549 -0.035420 -0.040561
- *MESH_VERTEXNORMAL 38 -0.997916 0.031725 -0.056191
- *MESH_VERTEXNORMAL 47 -0.999410 0.015037 -0.030886
- *MESH_FACENORMAL 107 -0.995713 -0.087561 -0.029804
- *MESH_VERTEXNORMAL 34 -0.997988 -0.055672 -0.030352
- *MESH_VERTEXNORMAL 33 -0.998549 -0.035420 -0.040561
- *MESH_VERTEXNORMAL 47 -0.999410 0.015037 -0.030886
- *MESH_FACENORMAL 108 -0.997179 -0.067558 -0.032724
- *MESH_VERTEXNORMAL 34 -0.997988 -0.055672 -0.030352
- *MESH_VERTEXNORMAL 47 -0.999410 0.015037 -0.030886
- *MESH_VERTEXNORMAL 58 -0.999732 -0.010900 -0.020426
- *MESH_FACENORMAL 109 -0.999525 -0.011810 -0.028482
- *MESH_VERTEXNORMAL 58 -0.999732 -0.010900 -0.020426
- *MESH_VERTEXNORMAL 30 -0.999584 0.027214 -0.009498
- *MESH_VERTEXNORMAL 34 -0.997988 -0.055672 -0.030352
- *MESH_FACENORMAL 110 -0.973095 0.230406 0.000000
- *MESH_VERTEXNORMAL 24 -0.988480 0.149923 -0.020748
- *MESH_VERTEXNORMAL 56 -0.987197 0.158366 0.019031
- *MESH_VERTEXNORMAL 21 -0.986149 0.160597 -0.041466
- *MESH_FACENORMAL 111 -0.973095 0.230406 -0.000000
- *MESH_VERTEXNORMAL 24 -0.988480 0.149923 -0.020748
- *MESH_VERTEXNORMAL 23 -0.971484 0.232318 0.047396
- *MESH_VERTEXNORMAL 56 -0.987197 0.158366 0.019031
- *MESH_FACENORMAL 112 -0.967686 0.233707 0.094685
- *MESH_VERTEXNORMAL 23 -0.971484 0.232318 0.047396
- *MESH_VERTEXNORMAL 28 -0.988864 0.141001 0.047610
- *MESH_VERTEXNORMAL 56 -0.987197 0.158366 0.019031
- *MESH_FACENORMAL 113 -0.992533 0.089703 -0.082651
- *MESH_VERTEXNORMAL 24 -0.988480 0.149923 -0.020748
- *MESH_VERTEXNORMAL 21 -0.986149 0.160597 -0.041466
- *MESH_VERTEXNORMAL 15 -0.997751 0.061099 -0.027577
- *MESH_FACENORMAL 114 -0.998909 0.046708 -0.000000
- *MESH_VERTEXNORMAL 15 -0.997751 0.061099 -0.027577
- *MESH_VERTEXNORMAL 26 -0.998909 0.046707 -0.000000
- *MESH_VERTEXNORMAL 24 -0.988480 0.149923 -0.020748
- *MESH_FACENORMAL 115 -0.998909 0.046707 -0.000000
- *MESH_VERTEXNORMAL 56 -0.987197 0.158366 0.019031
- *MESH_VERTEXNORMAL 28 -0.988864 0.141001 0.047610
- *MESH_VERTEXNORMAL 30 -0.999584 0.027214 -0.009498
- *MESH_FACENORMAL 116 -0.998909 0.046708 0.000000
- *MESH_VERTEXNORMAL 30 -0.999584 0.027214 -0.009498
- *MESH_VERTEXNORMAL 58 -0.999732 -0.010900 -0.020426
- *MESH_VERTEXNORMAL 56 -0.987197 0.158366 0.019031
- *MESH_FACENORMAL 117 -0.998909 0.046707 -0.000000
- *MESH_VERTEXNORMAL 26 -0.998909 0.046707 -0.000000
- *MESH_VERTEXNORMAL 15 -0.997751 0.061099 -0.027577
- *MESH_VERTEXNORMAL 14 -0.998909 0.046707 -0.000000
- *MESH_FACENORMAL 118 -0.998909 0.046707 -0.000000
- *MESH_VERTEXNORMAL 14 -0.998909 0.046707 -0.000000
- *MESH_VERTEXNORMAL 43 -0.998909 0.046707 -0.000000
- *MESH_VERTEXNORMAL 26 -0.998909 0.046707 -0.000000
- *MESH_FACENORMAL 119 -0.998909 0.046707 -0.000000
- *MESH_VERTEXNORMAL 16 -0.994660 0.099626 -0.026931
- *MESH_VERTEXNORMAL 45 -0.998909 0.046707 -0.000000
- *MESH_VERTEXNORMAL 47 -0.999410 0.015037 -0.030886
- *MESH_FACENORMAL 120 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 60 -1.000000 -0.000003 -0.000002
- *MESH_VERTEXNORMAL 61 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 62 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 121 -1.000000 -0.000009 -0.000006
- *MESH_VERTEXNORMAL 63 -1.000000 -0.000002 -0.000002
- *MESH_VERTEXNORMAL 60 -1.000000 -0.000003 -0.000002
- *MESH_VERTEXNORMAL 64 -1.000000 -0.000004 -0.000003
- *MESH_FACENORMAL 122 -1.000000 0.000001 -0.000000
- *MESH_VERTEXNORMAL 61 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 60 -1.000000 -0.000003 -0.000002
- *MESH_VERTEXNORMAL 63 -1.000000 -0.000002 -0.000002
- *MESH_FACENORMAL 123 -0.987259 0.150601 -0.051365
- *MESH_VERTEXNORMAL 65 -0.996810 0.075541 -0.025765
- *MESH_VERTEXNORMAL 66 -0.999755 0.016056 -0.015234
- *MESH_VERTEXNORMAL 67 -0.999590 -0.014372 -0.024782
- *MESH_FACENORMAL 124 -1.000000 -0.000001 -0.000001
- *MESH_VERTEXNORMAL 68 -1.000000 -0.000001 -0.000000
- *MESH_VERTEXNORMAL 66 -0.999755 0.016056 -0.015234
- *MESH_VERTEXNORMAL 65 -0.996810 0.075541 -0.025765
- *MESH_FACENORMAL 125 -1.000000 -0.000004 0.000001
- *MESH_VERTEXNORMAL 69 -1.000000 -0.000002 0.000000
- *MESH_VERTEXNORMAL 66 -0.999755 0.016056 -0.015234
- *MESH_VERTEXNORMAL 68 -1.000000 -0.000001 -0.000000
- *MESH_FACENORMAL 126 -0.996611 -0.082255 0.000000
- *MESH_VERTEXNORMAL 70 -0.999309 -0.036496 -0.007003
- *MESH_VERTEXNORMAL 71 -0.996611 -0.082255 0.000000
- *MESH_VERTEXNORMAL 67 -0.999590 -0.014372 -0.024782
- *MESH_FACENORMAL 127 -0.358233 -0.264573 -0.895360
- *MESH_VERTEXNORMAL 72 -0.358233 -0.264573 -0.895360
- *MESH_VERTEXNORMAL 67 -0.358233 -0.264573 -0.895360
- *MESH_VERTEXNORMAL 71 -0.358233 -0.264573 -0.895360
- *MESH_FACENORMAL 128 -0.999794 -0.005756 -0.019483
- *MESH_VERTEXNORMAL 67 -0.999590 -0.014372 -0.024782
- *MESH_VERTEXNORMAL 72 -0.998917 -0.045500 -0.009750
- *MESH_VERTEXNORMAL 73 -0.998917 -0.045500 -0.009750
- *MESH_FACENORMAL 129 -0.996367 -0.085168 0.000000
- *MESH_VERTEXNORMAL 74 -0.996367 -0.085168 0.000000
- *MESH_VERTEXNORMAL 73 -0.998917 -0.045500 -0.009750
- *MESH_VERTEXNORMAL 72 -0.998917 -0.045500 -0.009750
- *MESH_FACENORMAL 130 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 75 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 76 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 77 -1.000000 0.000000 -0.000000
- *MESH_FACENORMAL 131 -1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 78 -1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 79 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 80 -1.000000 0.000000 -0.000000
- *MESH_FACENORMAL 132 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 79 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 81 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 80 -1.000000 0.000000 -0.000000
- *MESH_FACENORMAL 133 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 82 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 80 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 81 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 134 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 83 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 80 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 82 -1.000000 0.000000 -0.000000
- *MESH_FACENORMAL 135 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 82 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 84 -1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 83 -1.000000 0.000000 -0.000000
- *MESH_FACENORMAL 136 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 83 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 84 -1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 85 -1.000000 0.000000 -0.000000
- *MESH_FACENORMAL 137 -1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 86 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 85 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 84 -1.000000 -0.000000 0.000000
- *MESH_FACENORMAL 138 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 78 -1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 80 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 76 -1.000000 0.000000 -0.000000
- *MESH_FACENORMAL 139 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 77 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 76 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 80 -1.000000 0.000000 -0.000000
- *MESH_FACENORMAL 140 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 87 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 75 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 77 -1.000000 0.000000 -0.000000
- *MESH_FACENORMAL 141 -1.000000 0.000000 -0.000001
- *MESH_VERTEXNORMAL 86 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 87 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 85 -1.000000 0.000000 -0.000000
- *MESH_FACENORMAL 142 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 77 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 85 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 87 -1.000000 0.000000 -0.000000
- *MESH_FACENORMAL 143 -0.997205 -0.070556 -0.024587
- *MESH_VERTEXNORMAL 67 -0.999590 -0.014372 -0.024782
- *MESH_VERTEXNORMAL 66 -0.999755 0.016056 -0.015234
- *MESH_VERTEXNORMAL 88 -0.999350 -0.033563 -0.013153
- *MESH_FACENORMAL 144 -1.000000 0.000009 0.000000
- *MESH_VERTEXNORMAL 89 -1.000000 0.000009 0.000000
- *MESH_VERTEXNORMAL 88 -0.999350 -0.033563 -0.013153
- *MESH_VERTEXNORMAL 66 -0.999755 0.016056 -0.015234
- *MESH_FACENORMAL 145 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 90 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 62 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 68 -1.000000 -0.000001 -0.000000
- *MESH_FACENORMAL 146 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 61 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 68 -1.000000 -0.000001 -0.000000
- *MESH_VERTEXNORMAL 62 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 147 -1.000000 0.000000 -0.000001
- *MESH_VERTEXNORMAL 91 -1.000000 -0.000000 -0.000001
- *MESH_VERTEXNORMAL 63 -1.000000 -0.000002 -0.000002
- *MESH_VERTEXNORMAL 64 -1.000000 -0.000004 -0.000003
- *MESH_FACENORMAL 148 -1.000000 -0.000001 -0.000001
- *MESH_VERTEXNORMAL 92 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 63 -1.000000 -0.000002 -0.000002
- *MESH_VERTEXNORMAL 91 -1.000000 -0.000000 -0.000001
- *MESH_FACENORMAL 149 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 93 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 70 -0.999309 -0.036496 -0.007003
- *MESH_VERTEXNORMAL 94 -1.000000 0.000000 -0.000000
- *MESH_FACENORMAL 150 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 88 -0.999350 -0.033563 -0.013153
- *MESH_VERTEXNORMAL 94 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 70 -0.999309 -0.036496 -0.007003
- *MESH_FACENORMAL 151 -1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 69 -1.000000 -0.000002 0.000000
- *MESH_VERTEXNORMAL 68 -1.000000 -0.000001 -0.000000
- *MESH_VERTEXNORMAL 61 -1.000000 0.000000 -0.000000
- *MESH_FACENORMAL 152 -0.997582 -0.063616 -0.027991
- *MESH_VERTEXNORMAL 70 -0.999309 -0.036496 -0.007003
- *MESH_VERTEXNORMAL 67 -0.999590 -0.014372 -0.024782
- *MESH_VERTEXNORMAL 88 -0.999350 -0.033563 -0.013153
- *MESH_FACENORMAL 153 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 95 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 96 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 92 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 154 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 97 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 95 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 92 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 155 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 91 -1.000000 -0.000000 -0.000001
- *MESH_VERTEXNORMAL 97 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 92 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 156 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 98 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 96 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 95 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 157 1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 99 1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 100 1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 101 1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 158 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 99 1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 102 1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 100 1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 159 0.987260 0.150596 -0.051362
- *MESH_VERTEXNORMAL 103 0.999755 0.016054 -0.015233
- *MESH_VERTEXNORMAL 104 0.996810 0.075539 -0.025763
- *MESH_VERTEXNORMAL 105 0.999590 -0.014373 -0.024781
- *MESH_FACENORMAL 160 1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 103 0.999755 0.016054 -0.015233
- *MESH_VERTEXNORMAL 106 1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 104 0.996810 0.075539 -0.025763
- *MESH_FACENORMAL 161 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 103 0.999755 0.016054 -0.015233
- *MESH_VERTEXNORMAL 107 1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 106 1.000000 -0.000000 0.000000
- *MESH_FACENORMAL 162 0.996612 -0.082252 0.000000
- *MESH_VERTEXNORMAL 108 0.996612 -0.082252 0.000000
- *MESH_VERTEXNORMAL 109 0.999309 -0.036494 -0.007003
- *MESH_VERTEXNORMAL 105 0.999590 -0.014373 -0.024781
- *MESH_FACENORMAL 163 0.358232 -0.264572 -0.895361
- *MESH_VERTEXNORMAL 105 0.358232 -0.264572 -0.895361
- *MESH_VERTEXNORMAL 110 0.358232 -0.264572 -0.895361
- *MESH_VERTEXNORMAL 108 0.358232 -0.264572 -0.895361
- *MESH_FACENORMAL 164 0.999794 -0.005757 -0.019484
- *MESH_VERTEXNORMAL 110 0.998917 -0.045502 -0.009750
- *MESH_VERTEXNORMAL 105 0.999590 -0.014373 -0.024781
- *MESH_VERTEXNORMAL 111 0.998917 -0.045502 -0.009750
- *MESH_FACENORMAL 165 0.996366 -0.085171 0.000000
- *MESH_VERTEXNORMAL 111 0.998917 -0.045502 -0.009750
- *MESH_VERTEXNORMAL 112 0.996366 -0.085171 0.000000
- *MESH_VERTEXNORMAL 110 0.998917 -0.045502 -0.009750
- *MESH_FACENORMAL 166 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 113 1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 114 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 115 1.000000 0.000000 -0.000000
- *MESH_FACENORMAL 167 1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 116 1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 117 1.000000 -0.000001 0.000000
- *MESH_VERTEXNORMAL 118 1.000000 -0.000000 0.000000
- *MESH_FACENORMAL 168 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 119 1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 116 1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 118 1.000000 -0.000000 0.000000
- *MESH_FACENORMAL 169 1.000000 -0.000000 0.000001
- *MESH_VERTEXNORMAL 118 1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 120 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 119 1.000000 -0.000000 0.000000
- *MESH_FACENORMAL 170 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 118 1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 121 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 120 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 171 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 122 1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 120 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 121 1.000000 0.000000 -0.000000
- *MESH_FACENORMAL 172 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 122 1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 121 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 123 1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 173 1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 123 1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 124 1.000000 -0.000000 -0.000001
- *MESH_VERTEXNORMAL 122 1.000000 -0.000000 0.000000
- *MESH_FACENORMAL 174 1.000000 -0.000001 0.000000
- *MESH_VERTEXNORMAL 118 1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 117 1.000000 -0.000001 0.000000
- *MESH_VERTEXNORMAL 113 1.000000 -0.000000 0.000000
- *MESH_FACENORMAL 175 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 113 1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 115 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 118 1.000000 -0.000000 0.000000
- *MESH_FACENORMAL 176 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 114 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 125 1.000000 0.000000 -0.000001
- *MESH_VERTEXNORMAL 115 1.000000 0.000000 -0.000000
- *MESH_FACENORMAL 177 1.000000 0.000000 -0.000001
- *MESH_VERTEXNORMAL 125 1.000000 0.000000 -0.000001
- *MESH_VERTEXNORMAL 124 1.000000 -0.000000 -0.000001
- *MESH_VERTEXNORMAL 123 1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 178 1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 123 1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 115 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 125 1.000000 0.000000 -0.000001
- *MESH_FACENORMAL 179 0.997205 -0.070557 -0.024584
- *MESH_VERTEXNORMAL 103 0.999755 0.016054 -0.015233
- *MESH_VERTEXNORMAL 105 0.999590 -0.014373 -0.024781
- *MESH_VERTEXNORMAL 126 0.999350 -0.033564 -0.013152
- *MESH_FACENORMAL 180 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 126 0.999350 -0.033564 -0.013152
- *MESH_VERTEXNORMAL 127 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 103 0.999755 0.016054 -0.015233
- *MESH_FACENORMAL 181 1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 128 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 129 1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 106 1.000000 -0.000000 0.000000
- *MESH_FACENORMAL 182 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 106 1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 99 1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 128 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 183 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 100 1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 130 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 101 1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 184 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 100 1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 131 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 130 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 185 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 109 0.999309 -0.036494 -0.007003
- *MESH_VERTEXNORMAL 132 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 133 1.000000 0.000000 -0.000000
- *MESH_FACENORMAL 186 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 133 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 126 0.999350 -0.033564 -0.013152
- *MESH_VERTEXNORMAL 109 0.999309 -0.036494 -0.007003
- *MESH_FACENORMAL 187 1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 106 1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 107 1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 102 1.000000 -0.000000 0.000000
- *MESH_FACENORMAL 188 0.997582 -0.063613 -0.027990
- *MESH_VERTEXNORMAL 105 0.999590 -0.014373 -0.024781
- *MESH_VERTEXNORMAL 109 0.999309 -0.036494 -0.007003
- *MESH_VERTEXNORMAL 126 0.999350 -0.033564 -0.013152
- *MESH_FACENORMAL 189 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 134 1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 135 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 131 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 190 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 135 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 136 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 131 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 191 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 136 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 130 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 131 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 192 1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 134 1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 137 1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 135 1.000000 0.000000 -0.000000
- *MESH_FACENORMAL 193 0.498597 -0.866834 0.000000
- *MESH_VERTEXNORMAL 138 0.258037 -0.966135 0.000000
- *MESH_VERTEXNORMAL 110 0.498596 -0.866834 0.000000
- *MESH_VERTEXNORMAL 112 0.498597 -0.866834 0.000000
- *MESH_FACENORMAL 194 0.498596 -0.866834 0.000000
- *MESH_VERTEXNORMAL 138 0.258037 -0.966135 0.000000
- *MESH_VERTEXNORMAL 139 0.101914 -0.994793 0.000000
- *MESH_VERTEXNORMAL 110 0.498596 -0.866834 0.000000
- *MESH_FACENORMAL 195 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 108 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 110 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 139 0.000000 0.000000 1.000000
- *MESH_FACENORMAL 196 -0.000016 -0.000012 1.000000
- *MESH_VERTEXNORMAL 140 -0.000016 -0.000012 1.000000
- *MESH_VERTEXNORMAL 72 -0.000016 -0.000012 1.000000
- *MESH_VERTEXNORMAL 71 -0.000016 -0.000012 1.000000
- *MESH_FACENORMAL 197 -0.498591 -0.866837 0.000000
- *MESH_VERTEXNORMAL 141 -0.342690 -0.939449 0.000000
- *MESH_VERTEXNORMAL 72 -0.498591 -0.866837 0.000000
- *MESH_VERTEXNORMAL 140 -0.101913 -0.994793 0.000000
- *MESH_FACENORMAL 198 -0.498592 -0.866837 0.000000
- *MESH_VERTEXNORMAL 141 -0.342690 -0.939449 0.000000
- *MESH_VERTEXNORMAL 74 -0.498592 -0.866837 0.000000
- *MESH_VERTEXNORMAL 72 -0.498591 -0.866837 0.000000
- *MESH_FACENORMAL 199 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 140 -0.101913 -0.994793 0.000000
- *MESH_VERTEXNORMAL 138 0.258037 -0.966135 0.000000
- *MESH_VERTEXNORMAL 141 -0.342690 -0.939449 0.000000
- *MESH_FACENORMAL 200 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 140 -0.101913 -0.994793 0.000000
- *MESH_VERTEXNORMAL 139 0.101914 -0.994793 0.000000
- *MESH_VERTEXNORMAL 138 0.258037 -0.966135 0.000000
- *MESH_FACENORMAL 201 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 140 -0.101913 -0.994793 0.000000
- *MESH_VERTEXNORMAL 70 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 139 0.101914 -0.994793 0.000000
- *MESH_FACENORMAL 202 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 140 -0.101913 -0.994793 0.000000
- *MESH_VERTEXNORMAL 71 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 70 0.000000 -1.000000 0.000000
- *MESH_FACENORMAL 203 0.000030 -1.000000 -0.000012
- *MESH_VERTEXNORMAL 126 -0.000046 -1.000000 -0.000005
- *MESH_VERTEXNORMAL 77 0.000020 -0.999903 -0.013955
- *MESH_VERTEXNORMAL 115 -0.000036 -0.999932 -0.011630
- *MESH_FACENORMAL 204 -0.000168 -1.000000 -0.000000
- *MESH_VERTEXNORMAL 115 -0.000036 -0.999932 -0.011630
- *MESH_VERTEXNORMAL 127 -0.000168 -1.000000 -0.000000
- *MESH_VERTEXNORMAL 126 -0.000046 -1.000000 -0.000005
- *MESH_FACENORMAL 205 1.000000 -0.000001 0.000000
- *MESH_VERTEXNORMAL 102 1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 99 1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 106 1.000000 -0.000000 0.000000
- *MESH_FACENORMAL 206 -0.000085 -0.000006 -1.000000
- *MESH_VERTEXNORMAL 103 0.000015 -0.000001 -1.000000
- *MESH_VERTEXNORMAL 123 -0.000020 -0.000001 -1.000000
- *MESH_VERTEXNORMAL 107 -0.000085 -0.000006 -1.000000
- *MESH_FACENORMAL 207 0.000045 0.000005 -1.000000
- *MESH_VERTEXNORMAL 103 0.000015 -0.000001 -1.000000
- *MESH_VERTEXNORMAL 115 0.000065 0.000001 -1.000000
- *MESH_VERTEXNORMAL 123 -0.000020 -0.000001 -1.000000
- *MESH_FACENORMAL 208 0.000085 -0.000002 -1.000000
- *MESH_VERTEXNORMAL 103 0.000015 -0.000001 -1.000000
- *MESH_VERTEXNORMAL 127 0.000085 -0.000002 -1.000000
- *MESH_VERTEXNORMAL 115 0.000065 0.000001 -1.000000
- *MESH_FACENORMAL 209 0.000103 -1.000000 0.000000
- *MESH_VERTEXNORMAL 107 0.000104 -1.000000 0.000000
- *MESH_VERTEXNORMAL 121 0.000104 -1.000000 0.000000
- *MESH_VERTEXNORMAL 102 0.000103 -1.000000 0.000000
- *MESH_FACENORMAL 210 0.000105 -1.000000 -0.000000
- *MESH_VERTEXNORMAL 107 0.000104 -1.000000 0.000000
- *MESH_VERTEXNORMAL 123 0.000105 -1.000000 -0.000000
- *MESH_VERTEXNORMAL 121 0.000104 -1.000000 0.000000
- *MESH_FACENORMAL 211 0.000056 0.001351 0.999999
- *MESH_VERTEXNORMAL 118 0.011404 0.000677 0.999935
- *MESH_VERTEXNORMAL 102 0.011404 0.000677 0.999935
- *MESH_VERTEXNORMAL 121 0.000056 0.001351 0.999999
- *MESH_FACENORMAL 212 0.022751 0.000003 0.999741
- *MESH_VERTEXNORMAL 118 0.014111 -0.251816 0.967672
- *MESH_VERTEXNORMAL 100 0.021332 -0.381955 0.923935
- *MESH_VERTEXNORMAL 102 0.011404 0.000677 0.999935
- *MESH_FACENORMAL 213 -0.000000 0.889567 0.456805
- *MESH_VERTEXNORMAL 117 -0.000000 0.952614 0.304182
- *MESH_VERTEXNORMAL 116 -0.000000 0.722748 0.691112
- *MESH_VERTEXNORMAL 79 -0.000001 0.722749 0.691111
- *MESH_FACENORMAL 214 -0.000000 0.889567 0.456805
- *MESH_VERTEXNORMAL 79 -0.000001 0.722749 0.691111
- *MESH_VERTEXNORMAL 78 -0.000021 0.990352 0.138573
- *MESH_VERTEXNORMAL 117 -0.000000 0.952614 0.304182
- *MESH_FACENORMAL 215 0.000000 -0.099501 0.995037
- *MESH_VERTEXNORMAL 119 -0.000001 0.208205 0.978085
- *MESH_VERTEXNORMAL 120 0.000000 -0.099501 0.995037
- *MESH_VERTEXNORMAL 82 -0.000001 -0.099503 0.995037
- *MESH_FACENORMAL 216 -0.000003 -0.099505 0.995037
- *MESH_VERTEXNORMAL 82 -0.000001 -0.099503 0.995037
- *MESH_VERTEXNORMAL 81 -0.000003 0.208204 0.978085
- *MESH_VERTEXNORMAL 119 -0.000001 0.208205 0.978085
- *MESH_FACENORMAL 217 0.000000 -0.999980 0.006369
- *MESH_VERTEXNORMAL 122 0.000000 -0.947672 0.319246
- *MESH_VERTEXNORMAL 124 0.000000 -0.999980 0.006369
- *MESH_VERTEXNORMAL 86 0.000000 -0.999980 0.006369
- *MESH_FACENORMAL 218 0.000000 -0.999980 0.006369
- *MESH_VERTEXNORMAL 86 0.000000 -0.999980 0.006369
- *MESH_VERTEXNORMAL 84 0.000000 -0.947672 0.319246
- *MESH_VERTEXNORMAL 122 0.000000 -0.947672 0.319246
- *MESH_FACENORMAL 219 0.000000 0.459424 -0.888217
- *MESH_VERTEXNORMAL 125 0.000000 0.236414 -0.971652
- *MESH_VERTEXNORMAL 114 0.000000 0.632683 -0.774411
- *MESH_VERTEXNORMAL 75 -0.000728 0.632262 -0.774754
- *MESH_FACENORMAL 220 0.000000 0.459424 -0.888217
- *MESH_VERTEXNORMAL 75 -0.000728 0.632262 -0.774754
- *MESH_VERTEXNORMAL 87 0.000000 0.236414 -0.971652
- *MESH_VERTEXNORMAL 125 0.000000 0.236414 -0.971652
- *MESH_FACENORMAL 221 0.016677 -0.705992 0.708023
- *MESH_VERTEXNORMAL 131 0.004307 -0.598209 0.801328
- *MESH_VERTEXNORMAL 100 0.021332 -0.381955 0.923935
- *MESH_VERTEXNORMAL 118 0.014091 -0.505000 0.863005
- *MESH_FACENORMAL 222 -0.000000 -0.707107 0.707107
- *MESH_VERTEXNORMAL 118 0.008339 -0.706574 0.707590
- *MESH_VERTEXNORMAL 80 -0.005559 -0.706757 0.707434
- *MESH_VERTEXNORMAL 131 0.004307 -0.598209 0.801328
- *MESH_FACENORMAL 223 -0.016678 -0.705992 0.708023
- *MESH_VERTEXNORMAL 80 -0.010450 -0.561538 0.827385
- *MESH_VERTEXNORMAL 63 -0.014095 -0.251818 0.967672
- *MESH_VERTEXNORMAL 92 -0.004356 -0.471527 0.881841
- *MESH_FACENORMAL 224 0.000000 -0.707107 0.707107
- *MESH_VERTEXNORMAL 92 -0.004356 -0.471527 0.881841
- *MESH_VERTEXNORMAL 131 0.004307 -0.598209 0.801328
- *MESH_VERTEXNORMAL 80 -0.005559 -0.706757 0.707434
- *MESH_FACENORMAL 225 -0.000051 -1.000000 -0.000002
- *MESH_VERTEXNORMAL 85 -0.000078 -1.000000 -0.000001
- *MESH_VERTEXNORMAL 69 -0.000051 -1.000000 -0.000002
- *MESH_VERTEXNORMAL 61 -0.000078 -1.000000 -0.000001
- *MESH_FACENORMAL 226 -0.000104 -1.000000 0.000000
- *MESH_VERTEXNORMAL 61 -0.000078 -1.000000 -0.000001
- *MESH_VERTEXNORMAL 83 -0.000104 -1.000000 0.000000
- *MESH_VERTEXNORMAL 85 -0.000078 -1.000000 -0.000001
- *MESH_FACENORMAL 227 -0.022752 0.001350 0.999740
- *MESH_VERTEXNORMAL 83 -0.005719 0.000341 0.999984
- *MESH_VERTEXNORMAL 63 -0.014095 -0.251818 0.967672
- *MESH_VERTEXNORMAL 80 -0.021338 -0.381332 0.924192
- *MESH_FACENORMAL 228 -0.000011 -0.000000 1.000000
- *MESH_VERTEXNORMAL 83 -0.005719 0.000341 0.999984
- *MESH_VERTEXNORMAL 142 -0.000011 -0.000000 1.000000
- *MESH_VERTEXNORMAL 63 -0.014095 -0.251818 0.967672
- *MESH_FACENORMAL 229 -0.000011 0.000000 1.000000
- *MESH_VERTEXNORMAL 83 -0.005719 0.000341 0.999984
- *MESH_VERTEXNORMAL 143 -0.000057 0.000008 1.000000
- *MESH_VERTEXNORMAL 142 -0.000011 -0.000000 1.000000
- *MESH_FACENORMAL 230 -0.000102 0.000015 1.000000
- *MESH_VERTEXNORMAL 83 -0.005719 0.000341 0.999984
- *MESH_VERTEXNORMAL 61 -0.000102 0.000015 1.000000
- *MESH_VERTEXNORMAL 143 -0.000057 0.000008 1.000000
- *MESH_FACENORMAL 231 0.000040 0.000003 -1.000000
- *MESH_VERTEXNORMAL 77 -0.000048 -0.000001 -1.000000
- *MESH_VERTEXNORMAL 69 -0.000075 -0.000004 -1.000000
- *MESH_VERTEXNORMAL 85 0.000040 0.000003 -1.000000
- *MESH_FACENORMAL 232 -0.000191 -0.000010 -1.000000
- *MESH_VERTEXNORMAL 77 -0.000048 -0.000001 -1.000000
- *MESH_VERTEXNORMAL 144 -0.000098 -0.000004 -1.000000
- *MESH_VERTEXNORMAL 69 -0.000075 -0.000004 -1.000000
- *MESH_FACENORMAL 233 -0.000005 0.000003 -1.000000
- *MESH_VERTEXNORMAL 77 -0.000048 -0.000001 -1.000000
- *MESH_VERTEXNORMAL 145 -0.000020 0.000002 -1.000000
- *MESH_VERTEXNORMAL 144 -0.000098 -0.000004 -1.000000
- *MESH_FACENORMAL 234 -0.000036 0.000000 -1.000000
- *MESH_VERTEXNORMAL 77 -0.000048 -0.000001 -1.000000
- *MESH_VERTEXNORMAL 146 -0.000041 -0.000001 -1.000000
- *MESH_VERTEXNORMAL 145 -0.000020 0.000002 -1.000000
- *MESH_FACENORMAL 235 -0.000047 -0.000002 -1.000000
- *MESH_VERTEXNORMAL 77 -0.000048 -0.000001 -1.000000
- *MESH_VERTEXNORMAL 89 -0.000047 -0.000002 -1.000000
- *MESH_VERTEXNORMAL 146 -0.000041 -0.000001 -1.000000
- *MESH_FACENORMAL 236 -0.000060 0.999655 -0.026279
- *MESH_VERTEXNORMAL 78 -0.000021 0.990352 0.138573
- *MESH_VERTEXNORMAL 76 -0.001536 0.938241 -0.345980
- *MESH_VERTEXNORMAL 113 -0.000768 0.938426 -0.345478
- *MESH_FACENORMAL 237 -0.000000 0.999654 -0.026307
- *MESH_VERTEXNORMAL 113 -0.000768 0.938426 -0.345478
- *MESH_VERTEXNORMAL 117 -0.000000 0.952614 0.304182
- *MESH_VERTEXNORMAL 78 -0.000021 0.990352 0.138573
- *MESH_FACENORMAL 238 0.000000 -1.000000 -0.000002
- *MESH_VERTEXNORMAL 77 0.000020 -0.999903 -0.013955
- *MESH_VERTEXNORMAL 126 -0.000046 -1.000000 -0.000005
- *MESH_VERTEXNORMAL 88 0.000019 -1.000000 -0.000001
- *MESH_FACENORMAL 239 0.000038 -1.000000 -0.000000
- *MESH_VERTEXNORMAL 88 0.000019 -1.000000 -0.000001
- *MESH_VERTEXNORMAL 89 0.000038 -1.000000 -0.000000
- *MESH_VERTEXNORMAL 77 0.000020 -0.999903 -0.013955
- *MESH_FACENORMAL 240 0.000030 -0.999392 -0.034874
- *MESH_VERTEXNORMAL 118 0.000015 -0.999392 -0.034876
- *MESH_VERTEXNORMAL 115 -0.000036 -0.999932 -0.011630
- *MESH_VERTEXNORMAL 77 0.000020 -0.999903 -0.013955
- *MESH_FACENORMAL 241 -0.000000 -0.999392 -0.034879
- *MESH_VERTEXNORMAL 77 0.000020 -0.999903 -0.013955
- *MESH_VERTEXNORMAL 80 -0.000000 -0.999392 -0.034879
- *MESH_VERTEXNORMAL 118 0.000015 -0.999392 -0.034876
- *MESH_FACENORMAL 242 -0.000002 0.496140 0.868243
- *MESH_VERTEXNORMAL 119 -0.000001 0.208205 0.978085
- *MESH_VERTEXNORMAL 81 -0.000003 0.208204 0.978085
- *MESH_VERTEXNORMAL 79 -0.000001 0.722749 0.691111
- *MESH_FACENORMAL 243 -0.000000 0.496138 0.868244
- *MESH_VERTEXNORMAL 79 -0.000001 0.722749 0.691111
- *MESH_VERTEXNORMAL 116 -0.000000 0.722748 0.691112
- *MESH_VERTEXNORMAL 119 -0.000001 0.208205 0.978085
- *MESH_FACENORMAL 244 0.000000 -0.800001 0.599998
- *MESH_VERTEXNORMAL 122 0.000000 -0.947672 0.319246
- *MESH_VERTEXNORMAL 84 0.000000 -0.947672 0.319246
- *MESH_VERTEXNORMAL 82 0.000000 -0.800001 0.599998
- *MESH_FACENORMAL 245 0.000000 -0.800001 0.599998
- *MESH_VERTEXNORMAL 82 0.000000 -0.800001 0.599998
- *MESH_VERTEXNORMAL 120 0.000000 -0.800001 0.599998
- *MESH_VERTEXNORMAL 122 0.000000 -0.947672 0.319246
- *MESH_FACENORMAL 246 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 125 0.000000 0.236414 -0.971652
- *MESH_VERTEXNORMAL 87 0.000000 0.236414 -0.971652
- *MESH_VERTEXNORMAL 86 0.000000 0.000000 -1.000000
- *MESH_FACENORMAL 247 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 86 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 124 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 125 0.000000 0.236414 -0.971652
- *MESH_FACENORMAL 248 -0.002849 0.777390 -0.629013
- *MESH_VERTEXNORMAL 113 -0.000768 0.938426 -0.345478
- *MESH_VERTEXNORMAL 76 -0.001536 0.938241 -0.345980
- *MESH_VERTEXNORMAL 75 -0.000728 0.632262 -0.774754
- *MESH_FACENORMAL 249 0.000000 0.778754 -0.627329
- *MESH_VERTEXNORMAL 75 -0.000728 0.632262 -0.774754
- *MESH_VERTEXNORMAL 114 0.000000 0.632683 -0.774411
- *MESH_VERTEXNORMAL 113 -0.000768 0.938426 -0.345478
- *MESH_FACENORMAL 250 0.000000 0.384615 0.923077
- *MESH_VERTEXNORMAL 104 0.000000 0.384615 0.923077
- *MESH_VERTEXNORMAL 106 0.000000 0.384615 0.923077
- *MESH_VERTEXNORMAL 68 0.000000 0.384615 0.923077
- *MESH_FACENORMAL 251 0.000000 0.384615 0.923077
- *MESH_VERTEXNORMAL 68 0.000000 0.384615 0.923077
- *MESH_VERTEXNORMAL 65 0.000000 0.384615 0.923077
- *MESH_VERTEXNORMAL 104 0.000000 0.384615 0.923077
- *MESH_FACENORMAL 252 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 139 0.101914 -0.994793 0.000000
- *MESH_VERTEXNORMAL 70 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 109 0.000000 -1.000000 0.000000
- *MESH_FACENORMAL 253 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 109 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 108 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 139 0.101914 -0.994793 0.000000
- *MESH_FACENORMAL 254 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 132 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 109 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 70 0.000000 0.000000 1.000000
- *MESH_FACENORMAL 255 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 70 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 93 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 132 0.000000 0.000000 1.000000
- *MESH_FACENORMAL 256 0.000000 0.000001 -1.000000
- *MESH_VERTEXNORMAL 126 0.000000 0.000001 -1.000000
- *MESH_VERTEXNORMAL 133 0.000000 0.000001 -1.000000
- *MESH_VERTEXNORMAL 94 0.000000 0.000001 -1.000000
- *MESH_FACENORMAL 257 0.000000 0.000001 -1.000000
- *MESH_VERTEXNORMAL 94 0.000000 0.000001 -1.000000
- *MESH_VERTEXNORMAL 88 0.000000 0.000001 -1.000000
- *MESH_VERTEXNORMAL 126 0.000000 0.000001 -1.000000
- *MESH_FACENORMAL 258 0.000000 -0.196116 0.980581
- *MESH_VERTEXNORMAL 134 0.000000 -0.405232 0.914214
- *MESH_VERTEXNORMAL 131 0.004307 -0.598209 0.801328
- *MESH_VERTEXNORMAL 92 -0.004356 -0.471527 0.881841
- *MESH_FACENORMAL 259 0.000000 -0.196116 0.980581
- *MESH_VERTEXNORMAL 92 -0.004356 -0.471527 0.881841
- *MESH_VERTEXNORMAL 96 0.000000 -0.604152 0.796869
- *MESH_VERTEXNORMAL 134 0.000000 -0.405232 0.914214
- *MESH_FACENORMAL 260 0.000000 -0.763386 0.645943
- *MESH_VERTEXNORMAL 137 0.000000 -0.763386 0.645943
- *MESH_VERTEXNORMAL 134 0.000000 -0.405232 0.914214
- *MESH_VERTEXNORMAL 96 0.000000 -0.604152 0.796869
- *MESH_FACENORMAL 261 0.000000 -0.763386 0.645943
- *MESH_VERTEXNORMAL 96 0.000000 -0.604152 0.796869
- *MESH_VERTEXNORMAL 98 0.000000 -0.763386 0.645943
- *MESH_VERTEXNORMAL 137 0.000000 -0.763386 0.645943
- *MESH_FACENORMAL 262 0.000000 -0.803557 -0.595228
- *MESH_VERTEXNORMAL 135 0.000000 -0.803557 -0.595228
- *MESH_VERTEXNORMAL 137 0.000000 -0.803557 -0.595228
- *MESH_VERTEXNORMAL 98 0.000000 -0.803557 -0.595228
- *MESH_FACENORMAL 263 0.000000 -0.803557 -0.595228
- *MESH_VERTEXNORMAL 98 0.000000 -0.803557 -0.595228
- *MESH_VERTEXNORMAL 95 0.000000 -0.803557 -0.595228
- *MESH_VERTEXNORMAL 135 0.000000 -0.803557 -0.595228
- *MESH_FACENORMAL 264 0.000000 -0.110431 -0.993884
- *MESH_VERTEXNORMAL 136 0.000000 -0.110431 -0.993884
- *MESH_VERTEXNORMAL 135 0.000000 -0.110431 -0.993884
- *MESH_VERTEXNORMAL 95 0.000000 -0.110431 -0.993884
- *MESH_FACENORMAL 265 0.000000 -0.110431 -0.993884
- *MESH_VERTEXNORMAL 95 0.000000 -0.110431 -0.993884
- *MESH_VERTEXNORMAL 97 0.000000 -0.110431 -0.993884
- *MESH_VERTEXNORMAL 136 0.000000 -0.110431 -0.993884
- *MESH_FACENORMAL 266 0.000000 0.650791 -0.759257
- *MESH_VERTEXNORMAL 130 0.000000 0.581675 -0.813421
- *MESH_VERTEXNORMAL 136 0.000000 0.650791 -0.759257
- *MESH_VERTEXNORMAL 97 0.000000 0.650791 -0.759257
- *MESH_FACENORMAL 267 0.000000 0.650791 -0.759257
- *MESH_VERTEXNORMAL 97 0.000000 0.650791 -0.759257
- *MESH_VERTEXNORMAL 91 0.000000 0.507482 -0.861663
- *MESH_VERTEXNORMAL 130 0.000000 0.581675 -0.813421
- *MESH_FACENORMAL 268 0.000000 0.429934 -0.902860
- *MESH_VERTEXNORMAL 101 0.000000 0.429934 -0.902860
- *MESH_VERTEXNORMAL 130 0.000000 0.581675 -0.813421
- *MESH_VERTEXNORMAL 91 0.000000 0.507482 -0.861663
- *MESH_FACENORMAL 269 0.000000 0.429934 -0.902860
- *MESH_VERTEXNORMAL 91 0.000000 0.507482 -0.861663
- *MESH_VERTEXNORMAL 64 0.000000 0.429934 -0.902860
- *MESH_VERTEXNORMAL 101 0.000000 0.429934 -0.902860
- *MESH_FACENORMAL 270 0.000000 -0.832051 -0.554700
- *MESH_VERTEXNORMAL 99 0.000000 -0.921895 -0.387439
- *MESH_VERTEXNORMAL 101 0.000000 -0.832050 -0.554700
- *MESH_VERTEXNORMAL 64 0.000000 -0.832050 -0.554700
- *MESH_FACENORMAL 271 0.000000 -0.832050 -0.554700
- *MESH_VERTEXNORMAL 64 0.000000 -0.832050 -0.554700
- *MESH_VERTEXNORMAL 60 0.000000 -0.979996 -0.199016
- *MESH_VERTEXNORMAL 99 0.000000 -0.921895 -0.387439
- *MESH_FACENORMAL 272 0.000000 -0.999948 -0.010203
- *MESH_VERTEXNORMAL 128 0.000000 -0.999948 -0.010203
- *MESH_VERTEXNORMAL 99 0.000000 -0.921895 -0.387439
- *MESH_VERTEXNORMAL 60 0.000000 -0.979996 -0.199016
- *MESH_FACENORMAL 273 0.000000 -0.999948 -0.010203
- *MESH_VERTEXNORMAL 60 0.000000 -0.979996 -0.199016
- *MESH_VERTEXNORMAL 62 0.000000 -0.999948 -0.010203
- *MESH_VERTEXNORMAL 128 0.000000 -0.999948 -0.010203
- *MESH_FACENORMAL 274 0.000000 -0.650792 -0.759256
- *MESH_VERTEXNORMAL 129 0.000000 -0.650792 -0.759256
- *MESH_VERTEXNORMAL 128 0.000000 -0.650792 -0.759256
- *MESH_VERTEXNORMAL 62 0.000000 -0.650792 -0.759256
- *MESH_FACENORMAL 275 0.000000 -0.650792 -0.759256
- *MESH_VERTEXNORMAL 62 0.000000 -0.650792 -0.759256
- *MESH_VERTEXNORMAL 90 0.000000 -0.650792 -0.759256
- *MESH_VERTEXNORMAL 129 0.000000 -0.650792 -0.759256
- *MESH_FACENORMAL 276 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 147 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 148 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 149 0.000000 0.000000 1.000000
- *MESH_FACENORMAL 277 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 147 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 150 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 148 0.000000 0.000000 1.000000
- *MESH_FACENORMAL 278 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 147 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 151 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 150 0.000000 0.000000 1.000000
- *MESH_FACENORMAL 279 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 147 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 152 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 151 0.000000 0.000000 1.000000
- *MESH_FACENORMAL 280 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 147 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 153 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 152 0.000000 0.000000 1.000000
- *MESH_FACENORMAL 281 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 147 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 154 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 153 0.000000 0.000000 1.000000
- *MESH_FACENORMAL 282 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 147 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 155 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 154 0.000000 0.000000 1.000000
- *MESH_FACENORMAL 283 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 147 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 156 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 155 0.000000 0.000000 1.000000
- *MESH_FACENORMAL 284 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 147 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 157 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 156 0.000000 0.000000 1.000000
- *MESH_FACENORMAL 285 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 147 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 158 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 157 0.000000 0.000000 1.000000
- *MESH_FACENORMAL 286 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 147 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 159 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 158 0.000000 0.000000 1.000000
- *MESH_FACENORMAL 287 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 147 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 149 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 159 0.000000 0.000000 1.000000
- *MESH_FACENORMAL 288 0.965926 -0.258818 -0.000000
- *MESH_VERTEXNORMAL 160 0.907073 -0.420974 0.000000
- *MESH_VERTEXNORMAL 161 0.996035 0.088962 -0.000001
- *MESH_VERTEXNORMAL 149 0.996035 -0.088962 -0.000000
- *MESH_FACENORMAL 289 0.965926 -0.258819 -0.000000
- *MESH_VERTEXNORMAL 160 0.907073 -0.420974 0.000000
- *MESH_VERTEXNORMAL 149 0.996035 -0.088962 -0.000000
- *MESH_VERTEXNORMAL 148 0.818110 -0.575061 0.000001
- *MESH_FACENORMAL 290 0.707107 -0.707107 0.000001
- *MESH_VERTEXNORMAL 162 0.575061 -0.818111 0.000001
- *MESH_VERTEXNORMAL 160 0.907073 -0.420974 0.000000
- *MESH_VERTEXNORMAL 148 0.818110 -0.575061 0.000001
- *MESH_FACENORMAL 291 0.707107 -0.707107 0.000001
- *MESH_VERTEXNORMAL 162 0.575061 -0.818111 0.000001
- *MESH_VERTEXNORMAL 148 0.818110 -0.575061 0.000001
- *MESH_VERTEXNORMAL 150 0.420974 -0.907073 0.000002
- *MESH_FACENORMAL 292 0.258819 -0.965926 0.000002
- *MESH_VERTEXNORMAL 163 0.088962 -0.996035 0.000002
- *MESH_VERTEXNORMAL 162 0.575061 -0.818111 0.000001
- *MESH_VERTEXNORMAL 150 0.420974 -0.907073 0.000002
- *MESH_FACENORMAL 293 0.258819 -0.965926 0.000002
- *MESH_VERTEXNORMAL 163 0.088962 -0.996035 0.000002
- *MESH_VERTEXNORMAL 150 0.420974 -0.907073 0.000002
- *MESH_VERTEXNORMAL 151 -0.088962 -0.996035 0.000002
- *MESH_FACENORMAL 294 -0.258819 -0.965926 0.000002
- *MESH_VERTEXNORMAL 164 -0.420974 -0.907073 0.000002
- *MESH_VERTEXNORMAL 163 0.088962 -0.996035 0.000002
- *MESH_VERTEXNORMAL 151 -0.088962 -0.996035 0.000002
- *MESH_FACENORMAL 295 -0.258819 -0.965926 0.000002
- *MESH_VERTEXNORMAL 164 -0.420974 -0.907073 0.000002
- *MESH_VERTEXNORMAL 151 -0.088962 -0.996035 0.000002
- *MESH_VERTEXNORMAL 152 -0.575061 -0.818111 0.000002
- *MESH_FACENORMAL 296 -0.707107 -0.707107 0.000002
- *MESH_VERTEXNORMAL 165 -0.818110 -0.575061 0.000002
- *MESH_VERTEXNORMAL 164 -0.420974 -0.907073 0.000002
- *MESH_VERTEXNORMAL 152 -0.575061 -0.818111 0.000002
- *MESH_FACENORMAL 297 -0.707106 -0.707107 0.000002
- *MESH_VERTEXNORMAL 165 -0.818110 -0.575061 0.000002
- *MESH_VERTEXNORMAL 152 -0.575061 -0.818111 0.000002
- *MESH_VERTEXNORMAL 153 -0.907073 -0.420974 0.000002
- *MESH_FACENORMAL 298 -0.965926 -0.258819 0.000001
- *MESH_VERTEXNORMAL 166 -0.996035 -0.088962 0.000001
- *MESH_VERTEXNORMAL 165 -0.818110 -0.575061 0.000002
- *MESH_VERTEXNORMAL 153 -0.907073 -0.420974 0.000002
- *MESH_FACENORMAL 299 -0.965926 -0.258820 0.000001
- *MESH_VERTEXNORMAL 166 -0.996035 -0.088962 0.000001
- *MESH_VERTEXNORMAL 153 -0.907073 -0.420974 0.000002
- *MESH_VERTEXNORMAL 154 -0.996035 0.088962 0.000001
- *MESH_FACENORMAL 300 -0.965926 0.258820 0.000000
- *MESH_VERTEXNORMAL 167 -0.907073 0.420974 -0.000000
- *MESH_VERTEXNORMAL 166 -0.996035 -0.088962 0.000001
- *MESH_VERTEXNORMAL 154 -0.996035 0.088962 0.000001
- *MESH_FACENORMAL 301 -0.965926 0.258819 0.000000
- *MESH_VERTEXNORMAL 167 -0.907073 0.420974 -0.000000
- *MESH_VERTEXNORMAL 154 -0.996035 0.088962 0.000001
- *MESH_VERTEXNORMAL 155 -0.818110 0.575061 -0.000001
- *MESH_FACENORMAL 302 -0.707107 0.707106 -0.000001
- *MESH_VERTEXNORMAL 168 -0.575060 0.818111 -0.000001
- *MESH_VERTEXNORMAL 167 -0.907073 0.420974 -0.000000
- *MESH_VERTEXNORMAL 155 -0.818110 0.575061 -0.000001
- *MESH_FACENORMAL 303 -0.707106 0.707108 -0.000000
- *MESH_VERTEXNORMAL 168 -0.575060 0.818111 -0.000001
- *MESH_VERTEXNORMAL 155 -0.818110 0.575061 -0.000001
- *MESH_VERTEXNORMAL 156 -0.420973 0.907073 -0.000001
- *MESH_FACENORMAL 304 -0.258816 0.965927 -0.000001
- *MESH_VERTEXNORMAL 169 -0.088962 0.996035 -0.000002
- *MESH_VERTEXNORMAL 168 -0.575060 0.818111 -0.000001
- *MESH_VERTEXNORMAL 156 -0.420973 0.907073 -0.000001
- *MESH_FACENORMAL 305 -0.258819 0.965926 -0.000002
- *MESH_VERTEXNORMAL 169 -0.088962 0.996035 -0.000002
- *MESH_VERTEXNORMAL 156 -0.420973 0.907073 -0.000001
- *MESH_VERTEXNORMAL 157 0.088961 0.996035 -0.000002
- *MESH_FACENORMAL 306 0.258816 0.965927 -0.000002
- *MESH_VERTEXNORMAL 170 0.420973 0.907073 -0.000002
- *MESH_VERTEXNORMAL 169 -0.088962 0.996035 -0.000002
- *MESH_VERTEXNORMAL 157 0.088961 0.996035 -0.000002
- *MESH_FACENORMAL 307 0.258819 0.965926 -0.000002
- *MESH_VERTEXNORMAL 170 0.420973 0.907073 -0.000002
- *MESH_VERTEXNORMAL 157 0.088961 0.996035 -0.000002
- *MESH_VERTEXNORMAL 158 0.575061 0.818110 -0.000002
- *MESH_FACENORMAL 308 0.707108 0.707106 -0.000001
- *MESH_VERTEXNORMAL 171 0.818110 0.575061 -0.000002
- *MESH_VERTEXNORMAL 170 0.420973 0.907073 -0.000002
- *MESH_VERTEXNORMAL 158 0.575061 0.818110 -0.000002
- *MESH_FACENORMAL 309 0.707106 0.707108 -0.000002
- *MESH_VERTEXNORMAL 171 0.818110 0.575061 -0.000002
- *MESH_VERTEXNORMAL 158 0.575061 0.818110 -0.000002
- *MESH_VERTEXNORMAL 159 0.907073 0.420974 -0.000002
- *MESH_FACENORMAL 310 0.965926 0.258819 -0.000001
- *MESH_VERTEXNORMAL 161 0.996035 0.088962 -0.000001
- *MESH_VERTEXNORMAL 171 0.818110 0.575061 -0.000002
- *MESH_VERTEXNORMAL 159 0.907073 0.420974 -0.000002
- *MESH_FACENORMAL 311 0.965926 0.258818 -0.000001
- *MESH_VERTEXNORMAL 161 0.996035 0.088962 -0.000001
- *MESH_VERTEXNORMAL 159 0.907073 0.420974 -0.000002
- *MESH_VERTEXNORMAL 149 0.996035 -0.088962 -0.000000
- *MESH_FACENORMAL 312 -0.979081 0.203435 0.003883
- *MESH_VERTEXNORMAL 172 -0.973621 0.228168 0.001295
- *MESH_VERTEXNORMAL 173 -0.979473 0.201570 0.001295
- *MESH_VERTEXNORMAL 174 -0.983298 0.181990 0.001942
- *MESH_FACENORMAL 313 -0.970654 0.240479 -0.000000
- *MESH_VERTEXNORMAL 172 -0.973621 0.228168 0.001295
- *MESH_VERTEXNORMAL 175 -0.970654 0.240479 -0.000000
- *MESH_VERTEXNORMAL 173 -0.979473 0.201570 0.001295
- *MESH_FACENORMAL 314 -0.970654 0.240479 -0.000000
- *MESH_VERTEXNORMAL 172 -0.973621 0.228168 0.001295
- *MESH_VERTEXNORMAL 176 -0.970654 0.240479 -0.000000
- *MESH_VERTEXNORMAL 175 -0.970654 0.240479 -0.000000
- *MESH_FACENORMAL 315 -0.987043 0.160457 -0.000000
- *MESH_VERTEXNORMAL 173 -0.979473 0.201570 0.001295
- *MESH_VERTEXNORMAL 177 -0.987043 0.160457 -0.000000
- *MESH_VERTEXNORMAL 174 -0.983298 0.181990 0.001942
- *MESH_FACENORMAL 316 0.979081 0.203435 0.003883
- *MESH_VERTEXNORMAL 178 0.973621 0.228168 0.001295
- *MESH_VERTEXNORMAL 179 0.983298 0.181990 0.001942
- *MESH_VERTEXNORMAL 180 0.979473 0.201570 0.001295
- *MESH_FACENORMAL 317 0.970654 0.240480 -0.000000
- *MESH_VERTEXNORMAL 178 0.973621 0.228168 0.001295
- *MESH_VERTEXNORMAL 180 0.979473 0.201570 0.001295
- *MESH_VERTEXNORMAL 181 0.970654 0.240480 -0.000000
- *MESH_FACENORMAL 318 0.970654 0.240479 0.000000
- *MESH_VERTEXNORMAL 178 0.973621 0.228168 0.001295
- *MESH_VERTEXNORMAL 181 0.970654 0.240480 -0.000000
- *MESH_VERTEXNORMAL 182 0.970654 0.240479 0.000000
- *MESH_FACENORMAL 319 0.987043 0.160457 0.000000
- *MESH_VERTEXNORMAL 180 0.979473 0.201570 0.001295
- *MESH_VERTEXNORMAL 179 0.983298 0.181990 0.001942
- *MESH_VERTEXNORMAL 183 0.987043 0.160457 0.000000
- *MESH_FACENORMAL 320 0.000000 0.484655 0.874706
- *MESH_VERTEXNORMAL 179 0.000000 0.484655 0.874706
- *MESH_VERTEXNORMAL 172 0.000000 0.484655 0.874706
- *MESH_VERTEXNORMAL 174 0.000000 0.484655 0.874706
- *MESH_FACENORMAL 321 0.000000 0.484655 0.874706
- *MESH_VERTEXNORMAL 179 0.000000 0.484655 0.874706
- *MESH_VERTEXNORMAL 178 0.000000 0.484655 0.874706
- *MESH_VERTEXNORMAL 172 0.000000 0.484655 0.874706
- *MESH_FACENORMAL 322 0.000000 -0.829176 -0.558988
- *MESH_VERTEXNORMAL 180 0.000000 -0.921800 -0.387665
- *MESH_VERTEXNORMAL 177 0.000000 -0.829176 -0.558988
- *MESH_VERTEXNORMAL 173 0.000000 -0.981035 -0.193832
- *MESH_FACENORMAL 323 0.000000 -0.829176 -0.558988
- *MESH_VERTEXNORMAL 180 0.000000 -0.921800 -0.387665
- *MESH_VERTEXNORMAL 183 0.000000 -0.829176 -0.558988
- *MESH_VERTEXNORMAL 177 0.000000 -0.829176 -0.558988
- *MESH_FACENORMAL 324 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 181 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 173 0.000000 -0.981035 -0.193832
- *MESH_VERTEXNORMAL 175 0.000000 -1.000000 0.000000
- *MESH_FACENORMAL 325 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 181 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 180 0.000000 -0.921800 -0.387665
- *MESH_VERTEXNORMAL 173 0.000000 -0.981035 -0.193832
- *MESH_FACENORMAL 326 0.000000 -0.459119 -0.888375
- *MESH_VERTEXNORMAL 184 0.000000 -0.459119 -0.888375
- *MESH_VERTEXNORMAL 185 0.000000 -0.459119 -0.888375
- *MESH_VERTEXNORMAL 186 0.000000 -0.459119 -0.888375
- *MESH_FACENORMAL 327 0.000000 -0.459119 -0.888375
- *MESH_VERTEXNORMAL 186 0.000000 -0.459119 -0.888375
- *MESH_VERTEXNORMAL 187 0.000000 -0.459119 -0.888375
- *MESH_VERTEXNORMAL 184 0.000000 -0.459119 -0.888375
- *MESH_FACENORMAL 328 0.000000 -0.459120 0.888374
- *MESH_VERTEXNORMAL 188 0.000000 -0.459120 0.888374
- *MESH_VERTEXNORMAL 189 0.000000 -0.459120 0.888374
- *MESH_VERTEXNORMAL 190 0.000000 -0.459120 0.888374
- *MESH_FACENORMAL 329 0.000000 -0.459120 0.888374
- *MESH_VERTEXNORMAL 190 0.000000 -0.459120 0.888374
- *MESH_VERTEXNORMAL 191 0.000000 -0.459120 0.888374
- *MESH_VERTEXNORMAL 188 0.000000 -0.459120 0.888374
- *MESH_FACENORMAL 330 -0.946984 -0.321280 -0.000000
- *MESH_VERTEXNORMAL 188 -0.946984 -0.321280 -0.000000
- *MESH_VERTEXNORMAL 185 -0.946984 -0.321280 -0.000000
- *MESH_VERTEXNORMAL 184 -0.946984 -0.321280 -0.000000
- *MESH_FACENORMAL 331 -0.946984 -0.321280 -0.000000
- *MESH_VERTEXNORMAL 184 -0.946984 -0.321280 -0.000000
- *MESH_VERTEXNORMAL 189 -0.946984 -0.321280 -0.000000
- *MESH_VERTEXNORMAL 188 -0.946984 -0.321280 -0.000000
- *MESH_FACENORMAL 332 0.946984 -0.321280 -0.000000
- *MESH_VERTEXNORMAL 191 0.946984 -0.321280 -0.000000
- *MESH_VERTEXNORMAL 190 0.946984 -0.321280 -0.000000
- *MESH_VERTEXNORMAL 187 0.946984 -0.321280 -0.000000
- *MESH_FACENORMAL 333 0.946984 -0.321280 -0.000000
- *MESH_VERTEXNORMAL 187 0.946984 -0.321280 -0.000000
- *MESH_VERTEXNORMAL 186 0.946984 -0.321280 -0.000000
- *MESH_VERTEXNORMAL 191 0.946984 -0.321280 -0.000000
- *MESH_FACENORMAL 334 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 192 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 193 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 194 -1.000000 0.000000 -0.000000
- *MESH_FACENORMAL 335 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 194 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 195 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 192 -1.000000 0.000000 -0.000000
- *MESH_FACENORMAL 336 1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 196 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 197 1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 198 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 337 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 198 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 199 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 196 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 338 0.000000 1.000000 -0.000000
- *MESH_VERTEXNORMAL 199 0.000000 1.000000 -0.000000
- *MESH_VERTEXNORMAL 198 0.000000 1.000000 -0.000000
- *MESH_VERTEXNORMAL 193 0.000000 1.000000 -0.000000
- *MESH_FACENORMAL 339 0.000000 1.000000 -0.000000
- *MESH_VERTEXNORMAL 193 0.000000 1.000000 -0.000000
- *MESH_VERTEXNORMAL 192 0.000000 1.000000 -0.000000
- *MESH_VERTEXNORMAL 199 0.000000 1.000000 -0.000000
- *MESH_FACENORMAL 340 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 196 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 200 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 197 0.000000 1.000000 0.000000
- *MESH_FACENORMAL 341 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 200 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 201 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 197 0.000000 1.000000 0.000000
- *MESH_FACENORMAL 342 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 196 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 202 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 200 0.000000 1.000000 0.000000
- *MESH_FACENORMAL 343 0.000000 -0.019202 -0.999816
- *MESH_VERTEXNORMAL 199 -0.000005 -0.019221 -0.999815
- *MESH_VERTEXNORMAL 202 -0.000011 -0.019215 -0.999815
- *MESH_VERTEXNORMAL 196 0.000000 -0.019202 -0.999816
- *MESH_FACENORMAL 344 -0.000022 -0.019227 -0.999815
- *MESH_VERTEXNORMAL 199 -0.000005 -0.019221 -0.999815
- *MESH_VERTEXNORMAL 203 -0.000011 -0.019228 -0.999815
- *MESH_VERTEXNORMAL 202 -0.000011 -0.019215 -0.999815
- *MESH_FACENORMAL 345 0.000000 -0.019228 -0.999815
- *MESH_VERTEXNORMAL 199 -0.000005 -0.019221 -0.999815
- *MESH_VERTEXNORMAL 204 0.000007 -0.019228 -0.999815
- *MESH_VERTEXNORMAL 203 -0.000011 -0.019228 -0.999815
- *MESH_FACENORMAL 346 0.000000 -0.019228 -0.999815
- *MESH_VERTEXNORMAL 199 -0.000005 -0.019221 -0.999815
- *MESH_VERTEXNORMAL 192 0.000007 -0.019219 -0.999815
- *MESH_VERTEXNORMAL 204 0.000007 -0.019228 -0.999815
- *MESH_FACENORMAL 347 0.000022 -0.019227 -0.999815
- *MESH_VERTEXNORMAL 192 0.000007 -0.019219 -0.999815
- *MESH_VERTEXNORMAL 205 0.000011 -0.019215 -0.999815
- *MESH_VERTEXNORMAL 204 0.000007 -0.019228 -0.999815
- *MESH_FACENORMAL 348 0.000000 -0.019202 -0.999816
- *MESH_VERTEXNORMAL 192 0.000007 -0.019219 -0.999815
- *MESH_VERTEXNORMAL 195 0.000000 -0.019202 -0.999816
- *MESH_VERTEXNORMAL 205 0.000011 -0.019215 -0.999815
- *MESH_FACENORMAL 349 0.707087 0.000000 -0.707127
- *MESH_VERTEXNORMAL 204 0.707090 -0.000000 -0.707123
- *MESH_VERTEXNORMAL 206 0.707086 0.000000 -0.707127
- *MESH_VERTEXNORMAL 207 0.707087 0.000000 -0.707127
- *MESH_FACENORMAL 350 0.707086 0.000000 -0.707128
- *MESH_VERTEXNORMAL 204 0.707090 -0.000000 -0.707123
- *MESH_VERTEXNORMAL 208 0.707087 0.000000 -0.707127
- *MESH_VERTEXNORMAL 206 0.707086 0.000000 -0.707127
- *MESH_FACENORMAL 351 0.707088 0.000000 -0.707126
- *MESH_VERTEXNORMAL 204 0.707090 -0.000000 -0.707123
- *MESH_VERTEXNORMAL 209 0.707088 0.000000 -0.707126
- *MESH_VERTEXNORMAL 208 0.707087 0.000000 -0.707127
- *MESH_FACENORMAL 352 0.707088 0.000000 -0.707126
- *MESH_VERTEXNORMAL 204 0.707090 -0.000000 -0.707123
- *MESH_VERTEXNORMAL 210 0.707096 -0.000000 -0.707118
- *MESH_VERTEXNORMAL 209 0.707088 0.000000 -0.707126
- *MESH_FACENORMAL 353 0.707104 -0.000000 -0.707109
- *MESH_VERTEXNORMAL 204 0.707090 -0.000000 -0.707123
- *MESH_VERTEXNORMAL 205 0.707104 -0.000000 -0.707109
- *MESH_VERTEXNORMAL 210 0.707096 -0.000000 -0.707118
- *MESH_FACENORMAL 354 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 206 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 211 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 207 1.000000 0.000000 -0.000000
- *MESH_FACENORMAL 355 -0.707105 0.000000 -0.707108
- *MESH_VERTEXNORMAL 202 -0.707103 -0.000000 -0.707110
- *MESH_VERTEXNORMAL 212 -0.707105 0.000000 -0.707108
- *MESH_VERTEXNORMAL 200 -0.707105 0.000000 -0.707108
- *MESH_FACENORMAL 356 -0.707105 0.000000 -0.707108
- *MESH_VERTEXNORMAL 202 -0.707103 -0.000000 -0.707110
- *MESH_VERTEXNORMAL 213 -0.707105 -0.000000 -0.707108
- *MESH_VERTEXNORMAL 212 -0.707105 0.000000 -0.707108
- *MESH_FACENORMAL 357 -0.707105 -0.000000 -0.707108
- *MESH_VERTEXNORMAL 202 -0.707103 -0.000000 -0.707110
- *MESH_VERTEXNORMAL 214 -0.707105 -0.000000 -0.707108
- *MESH_VERTEXNORMAL 213 -0.707105 -0.000000 -0.707108
- *MESH_FACENORMAL 358 -0.707105 -0.000000 -0.707108
- *MESH_VERTEXNORMAL 202 -0.707103 -0.000000 -0.707110
- *MESH_VERTEXNORMAL 215 -0.707100 -0.000000 -0.707113
- *MESH_VERTEXNORMAL 214 -0.707105 -0.000000 -0.707108
- *MESH_FACENORMAL 359 -0.707096 -0.000001 -0.707118
- *MESH_VERTEXNORMAL 202 -0.707103 -0.000000 -0.707110
- *MESH_VERTEXNORMAL 203 -0.707096 -0.000001 -0.707118
- *MESH_VERTEXNORMAL 215 -0.707100 -0.000000 -0.707113
- *MESH_FACENORMAL 360 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 215 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 216 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 214 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 361 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 217 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 200 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 212 -1.000000 0.000000 0.000000
- *MESH_FACENORMAL 362 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 217 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 201 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 200 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 363 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 217 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 218 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 201 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 364 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 217 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 219 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 220 -1.000000 0.000000 0.000000
- *MESH_FACENORMAL 365 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 217 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 213 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 219 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 366 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 217 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 212 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 213 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 367 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 214 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 219 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 213 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 368 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 214 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 221 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 219 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 369 -1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 214 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 216 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 221 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 370 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 222 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 211 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 208 1.000000 0.000000 -0.000000
- *MESH_FACENORMAL 371 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 211 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 206 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 208 1.000000 0.000000 -0.000000
- *MESH_FACENORMAL 372 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 222 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 223 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 211 1.000000 0.000000 -0.000000
- *MESH_FACENORMAL 373 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 222 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 224 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 225 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 374 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 222 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 209 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 224 1.000000 0.000000 -0.000000
- *MESH_FACENORMAL 375 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 222 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 208 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 209 1.000000 0.000000 -0.000000
- *MESH_FACENORMAL 376 1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 224 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 226 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 227 1.000000 -0.000000 0.000000
- *MESH_FACENORMAL 377 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 224 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 210 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 226 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 378 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 224 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 209 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 210 1.000000 0.000000 -0.000000
- *MESH_FACENORMAL 379 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 194 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 226 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 195 0.000000 1.000000 0.000000
- *MESH_FACENORMAL 380 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 226 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 210 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 195 0.000000 1.000000 0.000000
- *MESH_FACENORMAL 381 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 210 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 205 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 195 0.000000 1.000000 0.000000
- *MESH_FACENORMAL 382 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 224 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 227 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 218 0.000000 -1.000000 0.000000
- *MESH_FACENORMAL 383 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 218 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 217 0.000000 -1.000000 0.000000
- *MESH_VERTEXNORMAL 224 0.000000 -1.000000 0.000000
- *MESH_FACENORMAL 384 0.000000 -0.132162 0.991228
- *MESH_VERTEXNORMAL 225 0.000000 -0.132162 0.991228
- *MESH_VERTEXNORMAL 224 0.000000 -0.132162 0.991228
- *MESH_VERTEXNORMAL 217 0.000000 -0.132162 0.991228
- *MESH_FACENORMAL 385 0.000000 -0.132162 0.991228
- *MESH_VERTEXNORMAL 217 0.000000 -0.132162 0.991228
- *MESH_VERTEXNORMAL 220 0.000000 -0.132162 0.991228
- *MESH_VERTEXNORMAL 225 0.000000 -0.132162 0.991228
- *MESH_FACENORMAL 386 0.000000 -0.998460 0.055470
- *MESH_VERTEXNORMAL 222 0.000000 -0.998460 0.055470
- *MESH_VERTEXNORMAL 225 0.000000 -0.998460 0.055470
- *MESH_VERTEXNORMAL 220 0.000000 -0.998460 0.055470
- *MESH_FACENORMAL 387 0.000000 -0.998460 0.055470
- *MESH_VERTEXNORMAL 220 0.000000 -0.998460 0.055470
- *MESH_VERTEXNORMAL 219 0.000000 -0.998460 0.055470
- *MESH_VERTEXNORMAL 222 0.000000 -0.998460 0.055470
- *MESH_FACENORMAL 388 0.000000 -0.000001 1.000000
- *MESH_VERTEXNORMAL 223 0.000000 -0.000001 1.000000
- *MESH_VERTEXNORMAL 222 0.000000 -0.000001 1.000000
- *MESH_VERTEXNORMAL 219 0.000000 -0.000001 1.000000
- *MESH_FACENORMAL 389 0.000000 -0.000001 1.000000
- *MESH_VERTEXNORMAL 219 0.000000 -0.000001 1.000000
- *MESH_VERTEXNORMAL 221 0.000000 -0.000001 1.000000
- *MESH_VERTEXNORMAL 223 0.000000 -0.000001 1.000000
- *MESH_FACENORMAL 390 0.000000 -0.997459 0.071247
- *MESH_VERTEXNORMAL 211 0.000001 -0.994686 0.102955
- *MESH_VERTEXNORMAL 223 0.000000 -0.997459 0.071247
- *MESH_VERTEXNORMAL 221 0.000000 -0.997459 0.071247
- *MESH_FACENORMAL 391 0.000000 -0.997459 0.071247
- *MESH_VERTEXNORMAL 221 0.000000 -0.997459 0.071247
- *MESH_VERTEXNORMAL 216 0.000000 -0.995218 0.097675
- *MESH_VERTEXNORMAL 211 0.000001 -0.994686 0.102955
- *MESH_FACENORMAL 392 0.000000 -0.992277 0.124040
- *MESH_VERTEXNORMAL 204 0.000002 -0.992278 0.124037
- *MESH_VERTEXNORMAL 215 -0.000000 -0.992278 0.124037
- *MESH_VERTEXNORMAL 203 0.000000 -0.992277 0.124040
- *MESH_FACENORMAL 393 -0.000000 -0.992278 0.124035
- *MESH_VERTEXNORMAL 204 0.000002 -0.992278 0.124037
- *MESH_VERTEXNORMAL 211 0.000001 -0.994686 0.102955
- *MESH_VERTEXNORMAL 215 -0.000000 -0.992278 0.124037
- *MESH_FACENORMAL 394 0.000000 -0.992278 0.124035
- *MESH_VERTEXNORMAL 211 0.000001 -0.994686 0.102955
- *MESH_VERTEXNORMAL 216 0.000000 -0.995218 0.097675
- *MESH_VERTEXNORMAL 215 -0.000000 -0.992278 0.124037
- *MESH_FACENORMAL 395 0.000006 -0.992278 0.124035
- *MESH_VERTEXNORMAL 204 0.000002 -0.992278 0.124037
- *MESH_VERTEXNORMAL 207 0.000006 -0.992278 0.124035
- *MESH_VERTEXNORMAL 211 0.000001 -0.994686 0.102955
- *MESH_FACENORMAL 396 0.000000 -0.000001 -1.000000
- *MESH_VERTEXNORMAL 228 0.000000 -0.000001 -1.000000
- *MESH_VERTEXNORMAL 229 -0.000000 -0.000001 -1.000000
- *MESH_VERTEXNORMAL 230 0.000000 -0.000001 -1.000000
- *MESH_FACENORMAL 397 -0.000000 -0.000000 -1.000000
- *MESH_VERTEXNORMAL 228 0.000000 -0.000001 -1.000000
- *MESH_VERTEXNORMAL 231 0.000003 -0.000002 -1.000000
- *MESH_VERTEXNORMAL 229 -0.000000 -0.000001 -1.000000
- *MESH_FACENORMAL 398 0.000006 -0.000004 -1.000000
- *MESH_VERTEXNORMAL 228 0.000000 -0.000001 -1.000000
- *MESH_VERTEXNORMAL 232 0.000003 -0.000004 -1.000000
- *MESH_VERTEXNORMAL 231 0.000003 -0.000002 -1.000000
- *MESH_FACENORMAL 399 0.000001 -0.000004 -1.000000
- *MESH_VERTEXNORMAL 228 0.000000 -0.000001 -1.000000
- *MESH_VERTEXNORMAL 233 -0.000001 -0.000005 -1.000000
- *MESH_VERTEXNORMAL 232 0.000003 -0.000004 -1.000000
- *MESH_FACENORMAL 400 -0.000003 -0.000006 -1.000000
- *MESH_VERTEXNORMAL 228 0.000000 -0.000001 -1.000000
- *MESH_VERTEXNORMAL 234 -0.000001 -0.000004 -1.000000
- *MESH_VERTEXNORMAL 233 -0.000001 -0.000005 -1.000000
- *MESH_FACENORMAL 401 -0.000000 -0.000001 -1.000000
- *MESH_VERTEXNORMAL 228 0.000000 -0.000001 -1.000000
- *MESH_VERTEXNORMAL 235 -0.000000 -0.000001 -1.000000
- *MESH_VERTEXNORMAL 234 -0.000001 -0.000004 -1.000000
- *MESH_FACENORMAL 402 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 228 0.000000 -0.000001 -1.000000
- *MESH_VERTEXNORMAL 236 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 235 -0.000000 -0.000001 -1.000000
- *MESH_FACENORMAL 403 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 228 0.000000 -0.000001 -1.000000
- *MESH_VERTEXNORMAL 237 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 236 0.000000 0.000000 -1.000000
- *MESH_FACENORMAL 404 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 228 0.000000 -0.000001 -1.000000
- *MESH_VERTEXNORMAL 238 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 237 0.000000 0.000000 -1.000000
- *MESH_FACENORMAL 405 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 228 0.000000 -0.000001 -1.000000
- *MESH_VERTEXNORMAL 239 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 238 0.000000 0.000000 -1.000000
- *MESH_FACENORMAL 406 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 228 0.000000 -0.000001 -1.000000
- *MESH_VERTEXNORMAL 240 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 239 0.000000 0.000000 -1.000000
- *MESH_FACENORMAL 407 0.000000 0.000000 -1.000000
- *MESH_VERTEXNORMAL 228 0.000000 -0.000001 -1.000000
- *MESH_VERTEXNORMAL 230 0.000000 -0.000001 -1.000000
- *MESH_VERTEXNORMAL 240 0.000000 0.000000 -1.000000
- *MESH_FACENORMAL 408 -0.965926 -0.258819 0.000000
- *MESH_VERTEXNORMAL 241 -0.907073 -0.420974 0.000000
- *MESH_VERTEXNORMAL 242 -0.996035 0.088962 0.000000
- *MESH_VERTEXNORMAL 230 -0.996035 -0.088962 0.000000
- *MESH_FACENORMAL 409 -0.965926 -0.258819 0.000000
- *MESH_VERTEXNORMAL 241 -0.907073 -0.420974 0.000000
- *MESH_VERTEXNORMAL 230 -0.996035 -0.088962 0.000000
- *MESH_VERTEXNORMAL 229 -0.818110 -0.575061 0.000000
- *MESH_FACENORMAL 410 -0.707107 -0.707107 -0.000000
- *MESH_VERTEXNORMAL 243 -0.575061 -0.818110 -0.000000
- *MESH_VERTEXNORMAL 241 -0.907073 -0.420974 0.000000
- *MESH_VERTEXNORMAL 229 -0.818110 -0.575061 0.000000
- *MESH_FACENORMAL 411 -0.707107 -0.707107 -0.000000
- *MESH_VERTEXNORMAL 243 -0.575061 -0.818111 -0.000000
- *MESH_VERTEXNORMAL 229 -0.818110 -0.575061 0.000000
- *MESH_VERTEXNORMAL 231 -0.420974 -0.907073 -0.000000
- *MESH_FACENORMAL 412 -0.258819 -0.965926 -0.000000
- *MESH_VERTEXNORMAL 244 -0.088962 -0.996035 -0.000000
- *MESH_VERTEXNORMAL 243 -0.575061 -0.818111 -0.000000
- *MESH_VERTEXNORMAL 231 -0.420974 -0.907073 -0.000000
- *MESH_FACENORMAL 413 -0.258819 -0.965926 -0.000000
- *MESH_VERTEXNORMAL 244 -0.088962 -0.996035 -0.000000
- *MESH_VERTEXNORMAL 231 -0.420974 -0.907073 -0.000000
- *MESH_VERTEXNORMAL 232 0.088962 -0.996035 -0.000000
- *MESH_FACENORMAL 414 0.258819 -0.965926 -0.000000
- *MESH_VERTEXNORMAL 245 0.420974 -0.907073 -0.000000
- *MESH_VERTEXNORMAL 244 -0.088962 -0.996035 -0.000000
- *MESH_VERTEXNORMAL 232 0.088962 -0.996035 -0.000000
- *MESH_FACENORMAL 415 0.258819 -0.965926 -0.000000
- *MESH_VERTEXNORMAL 245 0.420974 -0.907073 -0.000000
- *MESH_VERTEXNORMAL 232 0.088962 -0.996035 -0.000000
- *MESH_VERTEXNORMAL 233 0.575061 -0.818111 -0.000000
- *MESH_FACENORMAL 416 0.707106 -0.707107 -0.000000
- *MESH_VERTEXNORMAL 246 0.818110 -0.575061 -0.000000
- *MESH_VERTEXNORMAL 245 0.420974 -0.907073 -0.000000
- *MESH_VERTEXNORMAL 233 0.575061 -0.818111 -0.000000
- *MESH_FACENORMAL 417 0.707106 -0.707107 -0.000000
- *MESH_VERTEXNORMAL 246 0.818110 -0.575061 -0.000000
- *MESH_VERTEXNORMAL 233 0.575061 -0.818111 -0.000000
- *MESH_VERTEXNORMAL 234 0.907073 -0.420974 -0.000000
- *MESH_FACENORMAL 418 0.965926 -0.258819 -0.000000
- *MESH_VERTEXNORMAL 247 0.996035 -0.088962 -0.000000
- *MESH_VERTEXNORMAL 246 0.818110 -0.575061 -0.000000
- *MESH_VERTEXNORMAL 234 0.907073 -0.420974 -0.000000
- *MESH_FACENORMAL 419 0.965926 -0.258819 -0.000000
- *MESH_VERTEXNORMAL 247 0.996035 -0.088962 -0.000000
- *MESH_VERTEXNORMAL 234 0.907073 -0.420974 -0.000000
- *MESH_VERTEXNORMAL 235 0.996035 0.088962 -0.000000
- *MESH_FACENORMAL 420 0.965926 0.258819 -0.000000
- *MESH_VERTEXNORMAL 248 0.907073 0.420974 -0.000000
- *MESH_VERTEXNORMAL 247 0.996035 -0.088962 -0.000000
- *MESH_VERTEXNORMAL 235 0.996035 0.088962 -0.000000
- *MESH_FACENORMAL 421 0.965926 0.258819 -0.000000
- *MESH_VERTEXNORMAL 248 0.907073 0.420974 -0.000000
- *MESH_VERTEXNORMAL 235 0.996035 0.088962 -0.000000
- *MESH_VERTEXNORMAL 236 0.818110 0.575061 -0.000000
- *MESH_FACENORMAL 422 0.707106 0.707107 0.000000
- *MESH_VERTEXNORMAL 249 0.575061 0.818110 0.000000
- *MESH_VERTEXNORMAL 248 0.907073 0.420974 -0.000000
- *MESH_VERTEXNORMAL 236 0.818110 0.575061 -0.000000
- *MESH_FACENORMAL 423 0.707107 0.707107 0.000000
- *MESH_VERTEXNORMAL 249 0.575061 0.818110 0.000000
- *MESH_VERTEXNORMAL 236 0.818110 0.575061 -0.000000
- *MESH_VERTEXNORMAL 237 0.420974 0.907073 0.000000
- *MESH_FACENORMAL 424 0.258820 0.965926 0.000000
- *MESH_VERTEXNORMAL 250 0.088962 0.996035 0.000000
- *MESH_VERTEXNORMAL 249 0.575061 0.818110 0.000000
- *MESH_VERTEXNORMAL 237 0.420974 0.907073 0.000000
- *MESH_FACENORMAL 425 0.258819 0.965926 0.000000
- *MESH_VERTEXNORMAL 250 0.088962 0.996035 0.000000
- *MESH_VERTEXNORMAL 237 0.420974 0.907073 0.000000
- *MESH_VERTEXNORMAL 238 -0.088962 0.996035 0.000000
- *MESH_FACENORMAL 426 -0.258819 0.965926 0.000000
- *MESH_VERTEXNORMAL 251 -0.420974 0.907073 0.000000
- *MESH_VERTEXNORMAL 250 0.088962 0.996035 0.000000
- *MESH_VERTEXNORMAL 238 -0.088962 0.996035 0.000000
- *MESH_FACENORMAL 427 -0.258819 0.965926 0.000000
- *MESH_VERTEXNORMAL 251 -0.420974 0.907073 0.000000
- *MESH_VERTEXNORMAL 238 -0.088962 0.996035 0.000000
- *MESH_VERTEXNORMAL 239 -0.575061 0.818110 0.000000
- *MESH_FACENORMAL 428 -0.707107 0.707107 0.000000
- *MESH_VERTEXNORMAL 252 -0.818110 0.575061 0.000000
- *MESH_VERTEXNORMAL 251 -0.420974 0.907073 0.000000
- *MESH_VERTEXNORMAL 239 -0.575061 0.818111 0.000000
- *MESH_FACENORMAL 429 -0.707107 0.707107 0.000000
- *MESH_VERTEXNORMAL 252 -0.818110 0.575061 0.000000
- *MESH_VERTEXNORMAL 239 -0.575061 0.818111 0.000000
- *MESH_VERTEXNORMAL 240 -0.907073 0.420974 0.000000
- *MESH_FACENORMAL 430 -0.965926 0.258819 0.000000
- *MESH_VERTEXNORMAL 242 -0.996035 0.088962 0.000000
- *MESH_VERTEXNORMAL 252 -0.818110 0.575061 0.000000
- *MESH_VERTEXNORMAL 240 -0.907073 0.420974 0.000000
- *MESH_FACENORMAL 431 -0.965926 0.258819 0.000000
- *MESH_VERTEXNORMAL 242 -0.996035 0.088962 0.000000
- *MESH_VERTEXNORMAL 240 -0.907073 0.420974 0.000000
- *MESH_VERTEXNORMAL 230 -0.996035 -0.088962 0.000000
- *MESH_FACENORMAL 432 0.000000 0.000006 1.000000
- *MESH_VERTEXNORMAL 253 0.000000 -0.000002 1.000000
- *MESH_VERTEXNORMAL 254 -0.000004 -0.000001 1.000000
- *MESH_VERTEXNORMAL 255 0.000000 0.000003 1.000000
- *MESH_FACENORMAL 433 -0.000008 -0.000007 1.000000
- *MESH_VERTEXNORMAL 253 0.000000 -0.000002 1.000000
- *MESH_VERTEXNORMAL 256 -0.000006 -0.000006 1.000000
- *MESH_VERTEXNORMAL 254 -0.000004 -0.000001 1.000000
- *MESH_FACENORMAL 434 -0.000005 -0.000006 1.000000
- *MESH_VERTEXNORMAL 253 0.000000 -0.000002 1.000000
- *MESH_VERTEXNORMAL 257 -0.000000 -0.000006 1.000000
- *MESH_VERTEXNORMAL 256 -0.000006 -0.000006 1.000000
- *MESH_FACENORMAL 435 0.000005 -0.000006 1.000000
- *MESH_VERTEXNORMAL 253 0.000000 -0.000002 1.000000
- *MESH_VERTEXNORMAL 258 0.000006 -0.000006 1.000000
- *MESH_VERTEXNORMAL 257 -0.000000 -0.000006 1.000000
- *MESH_FACENORMAL 436 0.000008 -0.000007 1.000000
- *MESH_VERTEXNORMAL 253 0.000000 -0.000002 1.000000
- *MESH_VERTEXNORMAL 259 0.000004 -0.000001 1.000000
- *MESH_VERTEXNORMAL 258 0.000006 -0.000006 1.000000
- *MESH_FACENORMAL 437 0.000000 0.000006 1.000000
- *MESH_VERTEXNORMAL 253 0.000000 -0.000002 1.000000
- *MESH_VERTEXNORMAL 260 0.000000 0.000003 1.000000
- *MESH_VERTEXNORMAL 259 0.000004 -0.000001 1.000000
- *MESH_FACENORMAL 438 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 253 0.000000 -0.000002 1.000000
- *MESH_VERTEXNORMAL 261 -0.000002 -0.000002 1.000000
- *MESH_VERTEXNORMAL 260 0.000000 0.000003 1.000000
- *MESH_FACENORMAL 439 -0.000003 -0.000005 1.000000
- *MESH_VERTEXNORMAL 253 0.000000 -0.000002 1.000000
- *MESH_VERTEXNORMAL 262 -0.000001 -0.000004 1.000000
- *MESH_VERTEXNORMAL 261 -0.000002 -0.000002 1.000000
- *MESH_FACENORMAL 440 0.000001 -0.000003 1.000000
- *MESH_VERTEXNORMAL 253 0.000000 -0.000002 1.000000
- *MESH_VERTEXNORMAL 263 -0.000000 -0.000003 1.000000
- *MESH_VERTEXNORMAL 262 -0.000001 -0.000004 1.000000
- *MESH_FACENORMAL 441 -0.000001 -0.000003 1.000000
- *MESH_VERTEXNORMAL 253 0.000000 -0.000002 1.000000
- *MESH_VERTEXNORMAL 264 0.000001 -0.000004 1.000000
- *MESH_VERTEXNORMAL 263 -0.000000 -0.000003 1.000000
- *MESH_FACENORMAL 442 0.000003 -0.000005 1.000000
- *MESH_VERTEXNORMAL 253 0.000000 -0.000002 1.000000
- *MESH_VERTEXNORMAL 265 0.000002 -0.000002 1.000000
- *MESH_VERTEXNORMAL 264 0.000001 -0.000004 1.000000
- *MESH_FACENORMAL 443 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 253 0.000000 -0.000002 1.000000
- *MESH_VERTEXNORMAL 255 0.000000 0.000003 1.000000
- *MESH_VERTEXNORMAL 265 0.000002 -0.000002 1.000000
- *MESH_FACENORMAL 444 0.968489 -0.249055 0.000000
- *MESH_VERTEXNORMAL 266 0.927500 -0.373824 0.000000
- *MESH_VERTEXNORMAL 267 0.997806 0.066209 -0.000000
- *MESH_VERTEXNORMAL 255 0.995515 -0.094604 0.000000
- *MESH_FACENORMAL 445 0.968489 -0.249055 0.000000
- *MESH_VERTEXNORMAL 266 0.927500 -0.373824 0.000000
- *MESH_VERTEXNORMAL 255 0.995515 -0.094604 0.000000
- *MESH_VERTEXNORMAL 254 0.869359 -0.494182 0.000000
- *MESH_FACENORMAL 446 0.797101 -0.603846 0.000000
- *MESH_VERTEXNORMAL 268 0.650968 -0.759105 0.000000
- *MESH_VERTEXNORMAL 266 0.927500 -0.373824 0.000000
- *MESH_VERTEXNORMAL 254 0.869359 -0.494182 0.000000
- *MESH_FACENORMAL 447 0.797101 -0.603846 0.000000
- *MESH_VERTEXNORMAL 268 0.650968 -0.759105 0.000000
- *MESH_VERTEXNORMAL 254 0.869359 -0.494182 0.000000
- *MESH_VERTEXNORMAL 256 0.465875 -0.884850 0.000000
- *MESH_FACENORMAL 448 0.267699 -0.963503 0.000000
- *MESH_VERTEXNORMAL 269 0.092218 -0.995739 0.000000
- *MESH_VERTEXNORMAL 268 0.650968 -0.759105 0.000000
- *MESH_VERTEXNORMAL 256 0.465875 -0.884850 0.000000
- *MESH_FACENORMAL 449 0.267699 -0.963503 0.000000
- *MESH_VERTEXNORMAL 269 0.092218 -0.995739 0.000000
- *MESH_VERTEXNORMAL 256 0.465875 -0.884850 0.000000
- *MESH_VERTEXNORMAL 257 -0.092218 -0.995739 0.000000
- *MESH_FACENORMAL 450 -0.267699 -0.963503 0.000000
- *MESH_VERTEXNORMAL 270 -0.465875 -0.884850 0.000000
- *MESH_VERTEXNORMAL 269 0.092218 -0.995739 0.000000
- *MESH_VERTEXNORMAL 257 -0.092218 -0.995739 0.000000
- *MESH_FACENORMAL 451 -0.267699 -0.963503 0.000000
- *MESH_VERTEXNORMAL 270 -0.465875 -0.884850 0.000000
- *MESH_VERTEXNORMAL 257 -0.092218 -0.995739 0.000000
- *MESH_VERTEXNORMAL 258 -0.650968 -0.759105 0.000000
- *MESH_FACENORMAL 452 -0.797101 -0.603846 0.000000
- *MESH_VERTEXNORMAL 271 -0.869359 -0.494182 0.000000
- *MESH_VERTEXNORMAL 270 -0.465875 -0.884850 0.000000
- *MESH_VERTEXNORMAL 258 -0.650968 -0.759105 0.000000
- *MESH_FACENORMAL 453 -0.797101 -0.603846 0.000000
- *MESH_VERTEXNORMAL 271 -0.869359 -0.494182 0.000000
- *MESH_VERTEXNORMAL 258 -0.650968 -0.759105 0.000000
- *MESH_VERTEXNORMAL 259 -0.927500 -0.373824 0.000000
- *MESH_FACENORMAL 454 -0.968489 -0.249056 0.000000
- *MESH_VERTEXNORMAL 272 -0.995515 -0.094604 0.000000
- *MESH_VERTEXNORMAL 271 -0.869359 -0.494182 0.000000
- *MESH_VERTEXNORMAL 259 -0.927500 -0.373824 0.000000
- *MESH_FACENORMAL 455 -0.968489 -0.249056 0.000000
- *MESH_VERTEXNORMAL 272 -0.995515 -0.094604 0.000000
- *MESH_VERTEXNORMAL 259 -0.927500 -0.373824 0.000000
- *MESH_VERTEXNORMAL 260 -0.997806 0.066209 -0.000000
- *MESH_FACENORMAL 456 -0.975190 0.221368 -0.000000
- *MESH_VERTEXNORMAL 273 -0.929302 0.369322 -0.000000
- *MESH_VERTEXNORMAL 272 -0.995515 -0.094604 0.000000
- *MESH_VERTEXNORMAL 260 -0.997806 0.066209 -0.000000
- *MESH_FACENORMAL 457 -0.975190 0.221368 -0.000000
- *MESH_VERTEXNORMAL 273 -0.929302 0.369322 -0.000000
- *MESH_VERTEXNORMAL 260 -0.997806 0.066209 -0.000000
- *MESH_VERTEXNORMAL 261 -0.859127 0.511763 -0.000000
- *MESH_FACENORMAL 458 -0.769782 0.638307 -0.000000
- *MESH_VERTEXNORMAL 274 -0.625617 0.780130 -0.000000
- *MESH_VERTEXNORMAL 273 -0.929302 0.369322 -0.000000
- *MESH_VERTEXNORMAL 261 -0.859127 0.511763 -0.000000
- *MESH_FACENORMAL 459 -0.769782 0.638307 -0.000000
- *MESH_VERTEXNORMAL 274 -0.625617 0.780130 -0.000000
- *MESH_VERTEXNORMAL 261 -0.859127 0.511763 -0.000000
- *MESH_VERTEXNORMAL 262 -0.447864 0.894102 -0.000000
- *MESH_FACENORMAL 460 -0.258818 0.965926 -0.000000
- *MESH_VERTEXNORMAL 275 -0.088962 0.996035 -0.000000
- *MESH_VERTEXNORMAL 274 -0.625617 0.780130 -0.000000
- *MESH_VERTEXNORMAL 262 -0.447864 0.894102 -0.000000
- *MESH_FACENORMAL 461 -0.258818 0.965926 -0.000000
- *MESH_VERTEXNORMAL 275 -0.088962 0.996035 -0.000000
- *MESH_VERTEXNORMAL 262 -0.447864 0.894102 -0.000000
- *MESH_VERTEXNORMAL 263 0.088962 0.996035 -0.000000
- *MESH_FACENORMAL 462 0.258818 0.965926 -0.000000
- *MESH_VERTEXNORMAL 276 0.447864 0.894102 -0.000000
- *MESH_VERTEXNORMAL 275 -0.088962 0.996035 -0.000000
- *MESH_VERTEXNORMAL 263 0.088962 0.996035 -0.000000
- *MESH_FACENORMAL 463 0.258818 0.965926 -0.000000
- *MESH_VERTEXNORMAL 276 0.447864 0.894102 -0.000000
- *MESH_VERTEXNORMAL 263 0.088962 0.996035 -0.000000
- *MESH_VERTEXNORMAL 264 0.625617 0.780131 -0.000000
- *MESH_FACENORMAL 464 0.769781 0.638308 -0.000000
- *MESH_VERTEXNORMAL 277 0.859127 0.511763 -0.000000
- *MESH_VERTEXNORMAL 276 0.447864 0.894102 -0.000000
- *MESH_VERTEXNORMAL 264 0.625617 0.780131 -0.000000
- *MESH_FACENORMAL 465 0.769781 0.638307 -0.000000
- *MESH_VERTEXNORMAL 277 0.859127 0.511763 -0.000000
- *MESH_VERTEXNORMAL 264 0.625617 0.780131 -0.000000
- *MESH_VERTEXNORMAL 265 0.929302 0.369322 -0.000000
- *MESH_FACENORMAL 466 0.975190 0.221368 -0.000000
- *MESH_VERTEXNORMAL 267 0.997806 0.066209 -0.000000
- *MESH_VERTEXNORMAL 277 0.859127 0.511763 -0.000000
- *MESH_VERTEXNORMAL 265 0.929302 0.369322 -0.000000
- *MESH_FACENORMAL 467 0.975190 0.221368 -0.000000
- *MESH_VERTEXNORMAL 267 0.997806 0.066209 -0.000000
- *MESH_VERTEXNORMAL 265 0.929302 0.369322 -0.000000
- *MESH_VERTEXNORMAL 255 0.995515 -0.094604 0.000000
- *MESH_FACENORMAL 468 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 278 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 279 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 280 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 469 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 278 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 281 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 279 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 470 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 280 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 282 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 278 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 471 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 283 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 284 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 285 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 472 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 283 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 285 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 286 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 473 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 284 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 283 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 287 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 474 0.000000 -0.143430 0.989660
- *MESH_VERTEXNORMAL 283 0.000000 -0.063403 0.997988
- *MESH_VERTEXNORMAL 281 0.000000 -0.143430 0.989661
- *MESH_VERTEXNORMAL 278 0.000000 0.017562 0.999846
- *MESH_FACENORMAL 475 0.000000 -0.143430 0.989661
- *MESH_VERTEXNORMAL 283 0.000000 -0.063403 0.997988
- *MESH_VERTEXNORMAL 286 0.000000 -0.143430 0.989661
- *MESH_VERTEXNORMAL 281 0.000000 -0.143430 0.989661
- *MESH_FACENORMAL 476 0.000000 0.097887 0.995198
- *MESH_VERTEXNORMAL 287 0.000000 0.097887 0.995198
- *MESH_VERTEXNORMAL 278 0.000000 0.017562 0.999846
- *MESH_VERTEXNORMAL 282 0.000000 0.097887 0.995198
- *MESH_FACENORMAL 477 0.000000 0.097887 0.995197
- *MESH_VERTEXNORMAL 287 0.000000 0.097887 0.995198
- *MESH_VERTEXNORMAL 283 0.000000 -0.063403 0.997988
- *MESH_VERTEXNORMAL 278 0.000000 0.017562 0.999846
- *MESH_FACENORMAL 478 0.000000 -0.440904 -0.897554
- *MESH_VERTEXNORMAL 284 0.000000 -0.371389 -0.928477
- *MESH_VERTEXNORMAL 282 0.000000 -0.440904 -0.897554
- *MESH_VERTEXNORMAL 280 0.000000 -0.299300 -0.954159
- *MESH_FACENORMAL 479 0.000000 -0.440904 -0.897554
- *MESH_VERTEXNORMAL 284 0.000000 -0.371389 -0.928477
- *MESH_VERTEXNORMAL 287 0.000000 -0.440904 -0.897554
- *MESH_VERTEXNORMAL 282 0.000000 -0.440904 -0.897554
- *MESH_FACENORMAL 480 0.000000 -0.225892 -0.974152
- *MESH_VERTEXNORMAL 285 0.000000 -0.225892 -0.974152
- *MESH_VERTEXNORMAL 280 0.000000 -0.299300 -0.954159
- *MESH_VERTEXNORMAL 279 0.000000 -0.225892 -0.974152
- *MESH_FACENORMAL 481 0.000000 -0.225892 -0.974152
- *MESH_VERTEXNORMAL 285 0.000000 -0.225892 -0.974152
- *MESH_VERTEXNORMAL 284 0.000000 -0.371389 -0.928477
- *MESH_VERTEXNORMAL 280 0.000000 -0.299300 -0.954159
- *MESH_FACENORMAL 482 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 288 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 289 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 290 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 483 -1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 289 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 291 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 290 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 484 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 291 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 292 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 290 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 485 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 288 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 293 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 289 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 486 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 293 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 294 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 289 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 487 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 293 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 295 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 294 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 488 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 295 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 296 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 294 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 489 -1.000000 -0.000000 0.000000
- *MESH_VERTEXNORMAL 296 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 297 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 294 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 490 -1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 296 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 298 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 297 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 491 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 296 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 299 -1.000000 -0.000000 -0.000000
- *MESH_VERTEXNORMAL 298 -1.000000 -0.000000 -0.000000
- *MESH_FACENORMAL 492 1.000000 0.000000 -0.000000
- *MESH_VERTEXNORMAL 300 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 301 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 302 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 493 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 302 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 301 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 303 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 494 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 303 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 301 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 304 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 495 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 300 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 302 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 305 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 496 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 305 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 302 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 306 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 497 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 305 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 306 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 307 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 498 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 307 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 306 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 308 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 499 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 308 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 306 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 309 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 500 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 308 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 309 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 310 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 501 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 308 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 310 1.000000 0.000000 0.000000
- *MESH_VERTEXNORMAL 311 1.000000 0.000000 0.000000
- *MESH_FACENORMAL 502 0.000000 0.014803 -0.999891
- *MESH_VERTEXNORMAL 305 0.000000 0.014803 -0.999890
- *MESH_VERTEXNORMAL 295 0.000000 0.014803 -0.999890
- *MESH_VERTEXNORMAL 293 0.000000 0.014803 -0.999890
- *MESH_FACENORMAL 503 0.000000 0.014803 -0.999890
- *MESH_VERTEXNORMAL 305 0.000000 0.014803 -0.999890
- *MESH_VERTEXNORMAL 307 0.000000 0.014803 -0.999890
- *MESH_VERTEXNORMAL 295 0.000000 0.014803 -0.999890
- *MESH_FACENORMAL 504 0.000000 0.777886 -0.628405
- *MESH_VERTEXNORMAL 300 0.000000 0.686136 -0.727473
- *MESH_VERTEXNORMAL 293 0.000000 0.777886 -0.628405
- *MESH_VERTEXNORMAL 288 0.000000 0.579801 -0.814758
- *MESH_FACENORMAL 505 0.000000 0.777886 -0.628405
- *MESH_VERTEXNORMAL 300 0.000000 0.686136 -0.727473
- *MESH_VERTEXNORMAL 305 0.000000 0.777886 -0.628405
- *MESH_VERTEXNORMAL 293 0.000000 0.777886 -0.628405
- *MESH_FACENORMAL 506 0.000000 0.464752 -0.885441
- *MESH_VERTEXNORMAL 301 0.000000 0.464752 -0.885441
- *MESH_VERTEXNORMAL 288 0.000000 0.579801 -0.814758
- *MESH_VERTEXNORMAL 290 0.000000 0.464752 -0.885441
- *MESH_FACENORMAL 507 0.000000 0.464752 -0.885441
- *MESH_VERTEXNORMAL 301 0.000000 0.464752 -0.885441
- *MESH_VERTEXNORMAL 300 0.000000 0.686136 -0.727473
- *MESH_VERTEXNORMAL 288 0.000000 0.579801 -0.814758
- *MESH_FACENORMAL 508 0.000000 0.998477 -0.055168
- *MESH_VERTEXNORMAL 304 0.000000 0.998477 -0.055168
- *MESH_VERTEXNORMAL 290 0.000000 0.998477 -0.055168
- *MESH_VERTEXNORMAL 292 0.000000 0.998477 -0.055168
- *MESH_FACENORMAL 509 0.000000 0.998477 -0.055168
- *MESH_VERTEXNORMAL 304 0.000000 0.998477 -0.055168
- *MESH_VERTEXNORMAL 301 0.000000 0.998477 -0.055168
- *MESH_VERTEXNORMAL 290 0.000000 0.998477 -0.055168
- *MESH_FACENORMAL 510 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 303 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 292 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 291 0.000000 0.000000 1.000000
- *MESH_FACENORMAL 511 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 303 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 304 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 292 0.000000 0.000000 1.000000
- *MESH_FACENORMAL 512 0.000000 -0.707120 0.707094
- *MESH_VERTEXNORMAL 302 0.000000 -0.707120 0.707094
- *MESH_VERTEXNORMAL 291 0.000000 -0.707120 0.707094
- *MESH_VERTEXNORMAL 289 0.000000 -0.707120 0.707094
- *MESH_FACENORMAL 513 0.000000 -0.707120 0.707094
- *MESH_VERTEXNORMAL 302 0.000000 -0.707120 0.707094
- *MESH_VERTEXNORMAL 303 0.000000 -0.707120 0.707094
- *MESH_VERTEXNORMAL 291 0.000000 -0.707120 0.707094
- *MESH_FACENORMAL 514 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 306 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 289 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 294 0.000000 0.000000 1.000000
- *MESH_FACENORMAL 515 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 306 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 302 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 289 0.000000 0.000000 1.000000
- *MESH_FACENORMAL 516 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 309 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 294 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 297 0.000000 1.000000 0.000000
- *MESH_FACENORMAL 517 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 309 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 306 0.000000 1.000000 0.000000
- *MESH_VERTEXNORMAL 294 0.000000 1.000000 0.000000
- *MESH_FACENORMAL 518 0.000000 0.679042 -0.734100
- *MESH_VERTEXNORMAL 310 0.000000 0.679042 -0.734100
- *MESH_VERTEXNORMAL 297 0.000000 0.679042 -0.734100
- *MESH_VERTEXNORMAL 298 0.000000 0.679042 -0.734100
- *MESH_FACENORMAL 519 0.000000 0.679042 -0.734100
- *MESH_VERTEXNORMAL 310 0.000000 0.679042 -0.734100
- *MESH_VERTEXNORMAL 309 0.000000 0.679042 -0.734100
- *MESH_VERTEXNORMAL 297 0.000000 0.679042 -0.734100
- *MESH_FACENORMAL 520 0.000000 0.998460 0.055469
- *MESH_VERTEXNORMAL 311 0.000000 0.998460 0.055469
- *MESH_VERTEXNORMAL 298 0.000000 0.998460 0.055469
- *MESH_VERTEXNORMAL 299 0.000000 0.998460 0.055469
- *MESH_FACENORMAL 521 0.000000 0.998460 0.055469
- *MESH_VERTEXNORMAL 311 0.000000 0.998460 0.055469
- *MESH_VERTEXNORMAL 310 0.000000 0.998460 0.055469
- *MESH_VERTEXNORMAL 298 0.000000 0.998460 0.055469
- *MESH_FACENORMAL 522 0.000000 -0.535654 0.844438
- *MESH_VERTEXNORMAL 308 0.000000 -0.535654 0.844438
- *MESH_VERTEXNORMAL 299 0.000000 -0.535654 0.844438
- *MESH_VERTEXNORMAL 296 0.000000 -0.535654 0.844438
- *MESH_FACENORMAL 523 0.000000 -0.535654 0.844438
- *MESH_VERTEXNORMAL 308 0.000000 -0.535654 0.844438
- *MESH_VERTEXNORMAL 311 0.000000 -0.535654 0.844438
- *MESH_VERTEXNORMAL 299 0.000000 -0.535654 0.844438
- *MESH_FACENORMAL 524 0.000000 -1.000000 -0.000000
- *MESH_VERTEXNORMAL 307 0.000000 -1.000000 -0.000000
- *MESH_VERTEXNORMAL 296 0.000000 -1.000000 -0.000000
- *MESH_VERTEXNORMAL 295 0.000000 -1.000000 -0.000000
- *MESH_FACENORMAL 525 0.000000 -1.000000 -0.000000
- *MESH_VERTEXNORMAL 307 0.000000 -1.000000 -0.000000
- *MESH_VERTEXNORMAL 308 0.000000 -1.000000 -0.000000
- *MESH_VERTEXNORMAL 296 0.000000 -1.000000 -0.000000
- *MESH_FACENORMAL 526 0.000007 -0.000022 -1.000000
- *MESH_VERTEXNORMAL 312 0.000006 0.000005 -1.000000
- *MESH_VERTEXNORMAL 313 -0.000014 -0.000007 -1.000000
- *MESH_VERTEXNORMAL 314 0.000007 -0.000022 -1.000000
- *MESH_FACENORMAL 527 -0.000035 0.000007 -1.000000
- *MESH_VERTEXNORMAL 312 0.000006 0.000005 -1.000000
- *MESH_VERTEXNORMAL 315 -0.000026 0.000002 -1.000000
- *MESH_VERTEXNORMAL 313 -0.000014 -0.000007 -1.000000
- *MESH_FACENORMAL 528 -0.000017 -0.000003 -1.000000
- *MESH_VERTEXNORMAL 312 0.000006 0.000005 -1.000000
- *MESH_VERTEXNORMAL 316 -0.000039 0.000007 -1.000000
- *MESH_VERTEXNORMAL 315 -0.000026 0.000002 -1.000000
- *MESH_FACENORMAL 529 -0.000060 0.000017 -1.000000
- *MESH_VERTEXNORMAL 312 0.000006 0.000005 -1.000000
- *MESH_VERTEXNORMAL 317 -0.000030 0.000009 -1.000000
- *MESH_VERTEXNORMAL 316 -0.000039 0.000007 -1.000000
- *MESH_FACENORMAL 530 0.000000 0.000001 -1.000000
- *MESH_VERTEXNORMAL 312 0.000006 0.000005 -1.000000
- *MESH_VERTEXNORMAL 318 0.000000 0.000001 -1.000000
- *MESH_VERTEXNORMAL 317 -0.000030 0.000009 -1.000000
- *MESH_FACENORMAL 531 -0.000000 0.000001 -1.000000
- *MESH_VERTEXNORMAL 312 0.000006 0.000005 -1.000000
- *MESH_VERTEXNORMAL 319 -0.000001 0.000001 -1.000000
- *MESH_VERTEXNORMAL 318 0.000000 0.000001 -1.000000
- *MESH_FACENORMAL 532 -0.000001 0.000000 -1.000000
- *MESH_VERTEXNORMAL 312 0.000006 0.000005 -1.000000
- *MESH_VERTEXNORMAL 320 0.000067 0.000030 -1.000000
- *MESH_VERTEXNORMAL 319 -0.000001 0.000001 -1.000000
- *MESH_FACENORMAL 533 0.000135 0.000059 -1.000000
- *MESH_VERTEXNORMAL 312 0.000006 0.000005 -1.000000
- *MESH_VERTEXNORMAL 321 0.000085 0.000033 -1.000000
- *MESH_VERTEXNORMAL 320 0.000067 0.000030 -1.000000
- *MESH_FACENORMAL 534 0.000035 0.000007 -1.000000
- *MESH_VERTEXNORMAL 312 0.000006 0.000005 -1.000000
- *MESH_VERTEXNORMAL 322 0.000016 -0.000006 -1.000000
- *MESH_VERTEXNORMAL 321 0.000085 0.000033 -1.000000
- *MESH_FACENORMAL 535 -0.000004 -0.000020 -1.000000
- *MESH_VERTEXNORMAL 312 0.000006 0.000005 -1.000000
- *MESH_VERTEXNORMAL 323 -0.000004 -0.000020 -1.000000
- *MESH_VERTEXNORMAL 322 0.000016 -0.000006 -1.000000
- *MESH_FACENORMAL 536 0.000023 -0.000005 1.000000
- *MESH_VERTEXNORMAL 324 0.000003 -0.000003 1.000000
- *MESH_VERTEXNORMAL 325 0.000035 0.000008 1.000000
- *MESH_VERTEXNORMAL 326 0.000024 -0.000002 1.000000
- *MESH_FACENORMAL 537 0.000047 0.000021 1.000000
- *MESH_VERTEXNORMAL 324 0.000003 -0.000003 1.000000
- *MESH_VERTEXNORMAL 327 0.000020 0.000009 1.000000
- *MESH_VERTEXNORMAL 325 0.000035 0.000008 1.000000
- *MESH_FACENORMAL 538 -0.000006 -0.000003 1.000000
- *MESH_VERTEXNORMAL 324 0.000003 -0.000003 1.000000
- *MESH_VERTEXNORMAL 328 -0.000003 -0.000003 1.000000
- *MESH_VERTEXNORMAL 327 0.000020 0.000009 1.000000
- *MESH_FACENORMAL 539 -0.000001 -0.000003 1.000000
- *MESH_VERTEXNORMAL 324 0.000003 -0.000003 1.000000
- *MESH_VERTEXNORMAL 329 -0.000021 0.000007 1.000000
- *MESH_VERTEXNORMAL 328 -0.000003 -0.000003 1.000000
- *MESH_FACENORMAL 540 -0.000042 0.000016 1.000000
- *MESH_VERTEXNORMAL 324 0.000003 -0.000003 1.000000
- *MESH_VERTEXNORMAL 330 -0.000033 0.000006 1.000000
- *MESH_VERTEXNORMAL 329 -0.000021 0.000007 1.000000
- *MESH_FACENORMAL 541 -0.000023 -0.000005 1.000000
- *MESH_VERTEXNORMAL 324 0.000003 -0.000003 1.000000
- *MESH_VERTEXNORMAL 331 -0.000022 -0.000019 1.000000
- *MESH_VERTEXNORMAL 330 -0.000033 0.000006 1.000000
- *MESH_FACENORMAL 542 -0.000020 -0.000033 1.000000
- *MESH_VERTEXNORMAL 324 0.000003 -0.000003 1.000000
- *MESH_VERTEXNORMAL 332 -0.000010 -0.000016 1.000000
- *MESH_VERTEXNORMAL 331 -0.000022 -0.000019 1.000000
- *MESH_FACENORMAL 543 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 324 0.000003 -0.000003 1.000000
- *MESH_VERTEXNORMAL 333 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 332 -0.000010 -0.000016 1.000000
- *MESH_FACENORMAL 544 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 324 0.000003 -0.000003 1.000000
- *MESH_VERTEXNORMAL 334 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 333 0.000000 0.000000 1.000000
- *MESH_FACENORMAL 545 0.000000 0.000000 1.000000
- *MESH_VERTEXNORMAL 324 0.000003 -0.000003 1.000000
- *MESH_VERTEXNORMAL 335 0.000019 -0.000012 1.000000
- *MESH_VERTEXNORMAL 334 0.000000 0.000000 1.000000
- *MESH_FACENORMAL 546 0.000039 -0.000024 1.000000
- *MESH_VERTEXNORMAL 324 0.000003 -0.000003 1.000000
- *MESH_VERTEXNORMAL 336 0.000031 -0.000012 1.000000
- *MESH_VERTEXNORMAL 335 0.000019 -0.000012 1.000000
- *MESH_FACENORMAL 547 0.000024 0.000001 1.000000
- *MESH_VERTEXNORMAL 324 0.000003 -0.000003 1.000000
- *MESH_VERTEXNORMAL 326 0.000024 -0.000002 1.000000
- *MESH_VERTEXNORMAL 336 0.000031 -0.000012 1.000000
- *MESH_FACENORMAL 548 0.979381 -0.202021 -0.000000
- *MESH_VERTEXNORMAL 313 0.989555 -0.144154 -0.000000
- *MESH_VERTEXNORMAL 315 0.976227 -0.216751 -0.000000
- *MESH_VERTEXNORMAL 326 0.977832 -0.209392 -0.000000
- *MESH_FACENORMAL 549 0.979381 -0.202021 -0.000000
- *MESH_VERTEXNORMAL 313 0.989555 -0.144154 -0.000000
- *MESH_VERTEXNORMAL 326 0.977832 -0.209392 -0.000000
- *MESH_VERTEXNORMAL 325 0.996331 -0.085585 -0.000000
- *MESH_FACENORMAL 550 0.999637 -0.026924 -0.000000
- *MESH_VERTEXNORMAL 314 0.999637 -0.026924 -0.000000
- *MESH_VERTEXNORMAL 313 0.989555 -0.144154 -0.000000
- *MESH_VERTEXNORMAL 325 0.996331 -0.085585 -0.000000
- *MESH_FACENORMAL 551 0.999637 -0.026924 -0.000000
- *MESH_VERTEXNORMAL 314 0.999637 -0.026924 -0.000000
- *MESH_VERTEXNORMAL 325 0.996331 -0.085585 -0.000000
- *MESH_VERTEXNORMAL 327 0.999637 -0.026924 -0.000000
- *MESH_FACENORMAL 552 0.189036 -0.981970 0.000001
- *MESH_VERTEXNORMAL 312 0.064038 -0.997948 0.000001
- *MESH_VERTEXNORMAL 314 0.189036 -0.981970 0.000001
- *MESH_VERTEXNORMAL 327 0.189036 -0.981970 0.000001
- *MESH_FACENORMAL 553 0.189036 -0.981970 0.000001
- *MESH_VERTEXNORMAL 312 0.064038 -0.997948 0.000001
- *MESH_VERTEXNORMAL 327 0.189036 -0.981970 0.000001
- *MESH_VERTEXNORMAL 328 -0.064037 -0.997948 0.000001
- *MESH_FACENORMAL 554 -0.189035 -0.981970 0.000001
- *MESH_VERTEXNORMAL 323 -0.189036 -0.981970 0.000001
- *MESH_VERTEXNORMAL 312 0.064038 -0.997948 0.000001
- *MESH_VERTEXNORMAL 328 -0.064037 -0.997948 0.000001
- *MESH_FACENORMAL 555 -0.189036 -0.981970 0.000001
- *MESH_VERTEXNORMAL 323 -0.189036 -0.981970 0.000001
- *MESH_VERTEXNORMAL 328 -0.064037 -0.997948 0.000001
- *MESH_VERTEXNORMAL 329 -0.189036 -0.981970 0.000001
- *MESH_FACENORMAL 556 -0.999638 -0.026924 0.000000
- *MESH_VERTEXNORMAL 322 -0.996331 -0.085586 0.000000
- *MESH_VERTEXNORMAL 323 -0.999637 -0.026924 0.000000
- *MESH_VERTEXNORMAL 329 -0.999637 -0.026924 0.000000
- *MESH_FACENORMAL 557 -0.999637 -0.026924 0.000000
- *MESH_VERTEXNORMAL 322 -0.996331 -0.085586 0.000000
- *MESH_VERTEXNORMAL 329 -0.999637 -0.026924 0.000000
- *MESH_VERTEXNORMAL 330 -0.989555 -0.144154 0.000000
- *MESH_FACENORMAL 558 -0.979381 -0.202021 0.000000
- *MESH_VERTEXNORMAL 321 -0.977832 -0.209392 0.000000
- *MESH_VERTEXNORMAL 322 -0.996331 -0.085586 0.000000
- *MESH_VERTEXNORMAL 330 -0.989555 -0.144154 0.000000
- *MESH_FACENORMAL 559 -0.979381 -0.202021 0.000000
- *MESH_VERTEXNORMAL 321 -0.977832 -0.209392 0.000000
- *MESH_VERTEXNORMAL 330 -0.989555 -0.144154 0.000000
- *MESH_VERTEXNORMAL 331 -0.976227 -0.216751 0.000000
- *MESH_FACENORMAL 560 -0.974567 -0.224097 0.000000
- *MESH_VERTEXNORMAL 320 -0.999076 -0.042974 0.000000
- *MESH_VERTEXNORMAL 321 -0.977832 -0.209392 0.000000
- *MESH_VERTEXNORMAL 331 -0.976227 -0.216751 0.000000
- *MESH_FACENORMAL 561 -0.974567 -0.224097 0.000000
- *MESH_VERTEXNORMAL 320 -0.999076 -0.042974 0.000000
- *MESH_VERTEXNORMAL 331 -0.976227 -0.216751 0.000000
- *MESH_VERTEXNORMAL 332 -0.989279 0.146038 0.000000
- *MESH_FACENORMAL 562 -0.946174 0.323657 0.000000
- *MESH_VERTEXNORMAL 319 -0.946174 0.323657 0.000000
- *MESH_VERTEXNORMAL 320 -0.999076 -0.042974 0.000000
- *MESH_VERTEXNORMAL 332 -0.989279 0.146038 0.000000
- *MESH_FACENORMAL 563 -0.946174 0.323657 0.000000
- *MESH_VERTEXNORMAL 319 -0.946174 0.323657 0.000000
- *MESH_VERTEXNORMAL 332 -0.989279 0.146038 0.000000
- *MESH_VERTEXNORMAL 333 -0.946174 0.323657 0.000000
- *MESH_FACENORMAL 564 -0.348971 0.937133 -0.000001
- *MESH_VERTEXNORMAL 318 -0.123182 0.992384 -0.000001
- *MESH_VERTEXNORMAL 319 -0.348971 0.937133 -0.000001
- *MESH_VERTEXNORMAL 333 -0.348971 0.937133 -0.000001
- *MESH_FACENORMAL 565 -0.348971 0.937133 -0.000001
- *MESH_VERTEXNORMAL 318 -0.123182 0.992384 -0.000001
- *MESH_VERTEXNORMAL 333 -0.348971 0.937133 -0.000001
- *MESH_VERTEXNORMAL 334 0.123182 0.992384 -0.000001
- *MESH_FACENORMAL 566 0.348971 0.937133 -0.000001
- *MESH_VERTEXNORMAL 317 0.348971 0.937133 -0.000001
- *MESH_VERTEXNORMAL 318 -0.123182 0.992384 -0.000001
- *MESH_VERTEXNORMAL 334 0.123182 0.992384 -0.000001
- *MESH_FACENORMAL 567 0.348971 0.937133 -0.000001
- *MESH_VERTEXNORMAL 317 0.348971 0.937133 -0.000001
- *MESH_VERTEXNORMAL 334 0.123182 0.992384 -0.000001
- *MESH_VERTEXNORMAL 335 0.348971 0.937133 -0.000001
- *MESH_FACENORMAL 568 0.946175 0.323656 -0.000001
- *MESH_VERTEXNORMAL 316 0.989279 0.146038 -0.000000
- *MESH_VERTEXNORMAL 317 0.946175 0.323656 -0.000001
- *MESH_VERTEXNORMAL 335 0.946175 0.323656 -0.000001
- *MESH_FACENORMAL 569 0.946175 0.323657 -0.000001
- *MESH_VERTEXNORMAL 316 0.989279 0.146038 -0.000000
- *MESH_VERTEXNORMAL 335 0.946175 0.323656 -0.000001
- *MESH_VERTEXNORMAL 336 0.999076 -0.042974 -0.000000
- *MESH_FACENORMAL 570 0.974567 -0.224097 -0.000000
- *MESH_VERTEXNORMAL 315 0.976227 -0.216751 -0.000000
- *MESH_VERTEXNORMAL 316 0.989279 0.146038 -0.000000
- *MESH_VERTEXNORMAL 336 0.999076 -0.042974 -0.000000
- *MESH_FACENORMAL 571 0.974567 -0.224097 -0.000000
- *MESH_VERTEXNORMAL 315 0.976227 -0.216751 -0.000000
- *MESH_VERTEXNORMAL 336 0.999076 -0.042974 -0.000000
- *MESH_VERTEXNORMAL 326 0.977832 -0.209392 -0.000000
- }
- *MESH_NUMTVERTEX 1716
- *MESH_TVERTLIST {
- *MESH_TVERT 0 0.137694 0.971341 0.000000
- *MESH_TVERT 1 0.270836 0.981468 0.000000
- *MESH_TVERT 2 0.644937 0.967165 0.000000
- *MESH_TVERT 3 0.270836 0.981468 0.000000
- *MESH_TVERT 4 0.636641 0.978456 0.000000
- *MESH_TVERT 5 0.644937 0.967165 0.000000
- *MESH_TVERT 6 0.137694 0.971341 0.000000
- *MESH_TVERT 7 0.151952 0.989594 0.000000
- *MESH_TVERT 8 0.270836 0.981468 0.000000
- *MESH_TVERT 9 0.151952 0.989594 0.000000
- *MESH_TVERT 10 0.258112 0.988720 0.000000
- *MESH_TVERT 11 0.270836 0.981468 0.000000
- *MESH_TVERT 12 0.137694 0.971341 0.000000
- *MESH_TVERT 13 0.644937 0.967165 0.000000
- *MESH_TVERT 14 0.644937 0.967165 0.000000
- *MESH_TVERT 15 0.644937 0.967165 0.000000
- *MESH_TVERT 16 0.137694 0.971341 0.000000
- *MESH_TVERT 17 0.137694 0.971341 0.000000
- *MESH_TVERT 18 0.636641 0.978456 0.000000
- *MESH_TVERT 19 0.270836 0.981468 0.000000
- *MESH_TVERT 20 0.644937 0.967165 0.000000
- *MESH_TVERT 21 0.270836 0.981468 0.000000
- *MESH_TVERT 22 0.137694 0.971341 0.000000
- *MESH_TVERT 23 0.644937 0.967165 0.000000
- *MESH_TVERT 24 0.270836 0.981468 0.000000
- *MESH_TVERT 25 0.151952 0.989594 0.000000
- *MESH_TVERT 26 0.137694 0.971341 0.000000
- *MESH_TVERT 27 0.270836 0.981468 0.000000
- *MESH_TVERT 28 0.258112 0.988720 0.000000
- *MESH_TVERT 29 0.151952 0.989594 0.000000
- *MESH_TVERT 30 0.258112 0.988720 0.000000
- *MESH_TVERT 31 0.151952 0.989594 0.000000
- *MESH_TVERT 32 0.151952 0.989594 0.000000
- *MESH_TVERT 33 0.151952 0.989594 0.000000
- *MESH_TVERT 34 0.258112 0.988720 0.000000
- *MESH_TVERT 35 0.258112 0.988720 0.000000
- *MESH_TVERT 36 0.270836 0.981468 0.000000
- *MESH_TVERT 37 0.258112 0.988720 0.000000
- *MESH_TVERT 38 0.258112 0.988720 0.000000
- *MESH_TVERT 39 0.258112 0.988720 0.000000
- *MESH_TVERT 40 0.270836 0.981468 0.000000
- *MESH_TVERT 41 0.270836 0.981468 0.000000
- *MESH_TVERT 42 0.636641 0.978456 0.000000
- *MESH_TVERT 43 0.270836 0.981468 0.000000
- *MESH_TVERT 44 0.270836 0.981468 0.000000
- *MESH_TVERT 45 0.270836 0.981468 0.000000
- *MESH_TVERT 46 0.636641 0.978456 0.000000
- *MESH_TVERT 47 0.636641 0.978456 0.000000
- *MESH_TVERT 48 0.398975 0.360584 0.000000
- *MESH_TVERT 49 0.391240 0.407633 0.000000
- *MESH_TVERT 50 0.398975 0.407633 0.000000
- *MESH_TVERT 51 0.398975 0.360584 0.000000
- *MESH_TVERT 52 0.385530 0.202603 0.000000
- *MESH_TVERT 53 0.391240 0.407633 0.000000
- *MESH_TVERT 54 0.398975 0.360584 0.000000
- *MESH_TVERT 55 0.430891 0.202603 0.000000
- *MESH_TVERT 56 0.385530 0.202603 0.000000
- *MESH_TVERT 57 0.398975 0.360584 0.000000
- *MESH_TVERT 58 0.417445 0.360584 0.000000
- *MESH_TVERT 59 0.430891 0.202603 0.000000
- *MESH_TVERT 60 0.417445 0.360584 0.000000
- *MESH_TVERT 61 0.425180 0.407633 0.000000
- *MESH_TVERT 62 0.430891 0.202603 0.000000
- *MESH_TVERT 63 0.417445 0.360584 0.000000
- *MESH_TVERT 64 0.417445 0.407633 0.000000
- *MESH_TVERT 65 0.425180 0.407633 0.000000
- *MESH_TVERT 66 0.413960 0.478748 0.000000
- *MESH_TVERT 67 0.421247 0.501951 0.000000
- *MESH_TVERT 68 0.413960 0.501951 0.000000
- *MESH_TVERT 69 0.413960 0.478748 0.000000
- *MESH_TVERT 70 0.453329 0.194566 0.000000
- *MESH_TVERT 71 0.421247 0.501951 0.000000
- *MESH_TVERT 72 0.413960 0.478748 0.000000
- *MESH_TVERT 73 0.358265 0.194566 0.000000
- *MESH_TVERT 74 0.453329 0.194566 0.000000
- *MESH_TVERT 75 0.413960 0.478748 0.000000
- *MESH_TVERT 76 0.397634 0.478748 0.000000
- *MESH_TVERT 77 0.358265 0.194566 0.000000
- *MESH_TVERT 78 0.397634 0.478748 0.000000
- *MESH_TVERT 79 0.390347 0.501951 0.000000
- *MESH_TVERT 80 0.358265 0.194566 0.000000
- *MESH_TVERT 81 0.397634 0.478748 0.000000
- *MESH_TVERT 82 0.397634 0.501951 0.000000
- *MESH_TVERT 83 0.390347 0.501951 0.000000
- *MESH_TVERT 84 0.531204 0.919284 0.000000
- *MESH_TVERT 85 0.531204 0.919284 0.000000
- *MESH_TVERT 86 0.607947 0.918652 0.000000
- *MESH_TVERT 87 0.607947 0.918652 0.000000
- *MESH_TVERT 88 0.607947 0.918652 0.000000
- *MESH_TVERT 89 0.531204 0.919284 0.000000
- *MESH_TVERT 90 0.607947 0.918652 0.000000
- *MESH_TVERT 91 0.607947 0.918652 0.000000
- *MESH_TVERT 92 0.608105 0.935805 0.000000
- *MESH_TVERT 93 0.608105 0.935805 0.000000
- *MESH_TVERT 94 0.608105 0.935805 0.000000
- *MESH_TVERT 95 0.607947 0.918652 0.000000
- *MESH_TVERT 96 0.377589 0.264828 0.000000
- *MESH_TVERT 97 0.436123 0.250194 0.000000
- *MESH_TVERT 98 0.377086 0.250194 0.000000
- *MESH_TVERT 99 0.377589 0.264828 0.000000
- *MESH_TVERT 100 0.435620 0.264828 0.000000
- *MESH_TVERT 101 0.436123 0.250194 0.000000
- *MESH_TVERT 102 0.377589 0.264828 0.000000
- *MESH_TVERT 103 0.418804 0.335013 0.000000
- *MESH_TVERT 104 0.435620 0.264828 0.000000
- *MESH_TVERT 105 0.377589 0.264828 0.000000
- *MESH_TVERT 106 0.394404 0.335013 0.000000
- *MESH_TVERT 107 0.418804 0.335013 0.000000
- *MESH_TVERT 108 0.200591 0.854818 0.000000
- *MESH_TVERT 109 0.200591 0.854818 0.000000
- *MESH_TVERT 110 0.223561 0.848911 0.000000
- *MESH_TVERT 111 0.223561 0.848911 0.000000
- *MESH_TVERT 112 0.223561 0.848911 0.000000
- *MESH_TVERT 113 0.200591 0.854818 0.000000
- *MESH_TVERT 114 0.191915 0.884910 0.000000
- *MESH_TVERT 115 0.191915 0.884910 0.000000
- *MESH_TVERT 116 0.191796 0.872045 0.000000
- *MESH_TVERT 117 0.191796 0.872045 0.000000
- *MESH_TVERT 118 0.191796 0.872045 0.000000
- *MESH_TVERT 119 0.191915 0.884910 0.000000
- *MESH_TVERT 120 0.191796 0.872045 0.000000
- *MESH_TVERT 121 0.191796 0.872045 0.000000
- *MESH_TVERT 122 0.200591 0.854818 0.000000
- *MESH_TVERT 123 0.200591 0.854818 0.000000
- *MESH_TVERT 124 0.200591 0.854818 0.000000
- *MESH_TVERT 125 0.191796 0.872045 0.000000
- *MESH_TVERT 126 0.608105 0.935805 0.000000
- *MESH_TVERT 127 0.230789 0.938911 0.000000
- *MESH_TVERT 128 0.346813 0.937956 0.000000
- *MESH_TVERT 129 0.230789 0.938911 0.000000
- *MESH_TVERT 130 0.230789 0.938911 0.000000
- *MESH_TVERT 131 0.346813 0.937956 0.000000
- *MESH_TVERT 132 0.608105 0.935805 0.000000
- *MESH_TVERT 133 0.346813 0.937956 0.000000
- *MESH_TVERT 134 0.230789 0.938911 0.000000
- *MESH_TVERT 135 0.608105 0.935805 0.000000
- *MESH_TVERT 136 0.608105 0.935805 0.000000
- *MESH_TVERT 137 0.346813 0.937956 0.000000
- *MESH_TVERT 138 0.230789 0.938911 0.000000
- *MESH_TVERT 139 0.230789 0.938911 0.000000
- *MESH_TVERT 140 0.191915 0.884910 0.000000
- *MESH_TVERT 141 0.191915 0.884910 0.000000
- *MESH_TVERT 142 0.191915 0.884910 0.000000
- *MESH_TVERT 143 0.230789 0.938911 0.000000
- *MESH_TVERT 144 0.223561 0.848911 0.000000
- *MESH_TVERT 145 0.223561 0.848911 0.000000
- *MESH_TVERT 146 0.474252 0.846847 0.000000
- *MESH_TVERT 147 0.474252 0.846847 0.000000
- *MESH_TVERT 148 0.474252 0.846847 0.000000
- *MESH_TVERT 149 0.223561 0.848911 0.000000
- *MESH_TVERT 150 0.029729 0.913406 0.000000
- *MESH_TVERT 151 0.071884 0.907341 0.000000
- *MESH_TVERT 152 0.070711 0.918786 0.000000
- *MESH_TVERT 153 0.029729 0.913406 0.000000
- *MESH_TVERT 154 0.062164 0.824508 0.000000
- *MESH_TVERT 155 0.071884 0.907341 0.000000
- *MESH_TVERT 156 0.029729 0.913406 0.000000
- *MESH_TVERT 157 0.014787 0.819180 0.000000
- *MESH_TVERT 158 0.062164 0.824508 0.000000
- *MESH_TVERT 159 0.029729 0.913406 0.000000
- *MESH_TVERT 160 0.062164 0.824508 0.000000
- *MESH_TVERT 161 0.014787 0.819180 0.000000
- *MESH_TVERT 162 0.029729 0.913406 0.000000
- *MESH_TVERT 163 0.071884 0.907341 0.000000
- *MESH_TVERT 164 0.062164 0.824508 0.000000
- *MESH_TVERT 165 0.029729 0.913406 0.000000
- *MESH_TVERT 166 0.070711 0.918786 0.000000
- *MESH_TVERT 167 0.071884 0.907341 0.000000
- *MESH_TVERT 168 0.062164 0.824508 0.000000
- *MESH_TVERT 169 0.014787 0.819180 0.000000
- *MESH_TVERT 170 0.014787 0.819180 0.000000
- *MESH_TVERT 171 0.014787 0.819180 0.000000
- *MESH_TVERT 172 0.062164 0.824508 0.000000
- *MESH_TVERT 173 0.062164 0.824508 0.000000
- *MESH_TVERT 174 0.014787 0.819180 0.000000
- *MESH_TVERT 175 0.029729 0.913406 0.000000
- *MESH_TVERT 176 0.029729 0.913406 0.000000
- *MESH_TVERT 177 0.029729 0.913406 0.000000
- *MESH_TVERT 178 0.014787 0.819180 0.000000
- *MESH_TVERT 179 0.014787 0.819180 0.000000
- *MESH_TVERT 180 0.378509 0.318863 0.000000
- *MESH_TVERT 181 0.379048 0.222198 0.000000
- *MESH_TVERT 182 0.437376 0.222198 0.000000
- *MESH_TVERT 183 0.437376 0.222198 0.000000
- *MESH_TVERT 184 0.437915 0.318863 0.000000
- *MESH_TVERT 185 0.378509 0.318863 0.000000
- *MESH_TVERT 186 0.070711 0.918786 0.000000
- *MESH_TVERT 187 0.071884 0.907341 0.000000
- *MESH_TVERT 188 0.071884 0.907341 0.000000
- *MESH_TVERT 189 0.071884 0.907341 0.000000
- *MESH_TVERT 190 0.070711 0.918786 0.000000
- *MESH_TVERT 191 0.070711 0.918786 0.000000
- *MESH_TVERT 192 0.071884 0.907341 0.000000
- *MESH_TVERT 193 0.089817 0.910052 0.000000
- *MESH_TVERT 194 0.089817 0.910052 0.000000
- *MESH_TVERT 195 0.089817 0.910052 0.000000
- *MESH_TVERT 196 0.071884 0.907341 0.000000
- *MESH_TVERT 197 0.071884 0.907341 0.000000
- *MESH_TVERT 198 0.151952 0.989594 0.000000
- *MESH_TVERT 199 0.151952 0.989594 0.000000
- *MESH_TVERT 200 0.258112 0.988720 0.000000
- *MESH_TVERT 201 0.258112 0.988720 0.000000
- *MESH_TVERT 202 0.258112 0.988720 0.000000
- *MESH_TVERT 203 0.151952 0.989594 0.000000
- *MESH_TVERT 204 0.258112 0.988720 0.000000
- *MESH_TVERT 205 0.258112 0.988720 0.000000
- *MESH_TVERT 206 0.270836 0.981468 0.000000
- *MESH_TVERT 207 0.270836 0.981468 0.000000
- *MESH_TVERT 208 0.270836 0.981468 0.000000
- *MESH_TVERT 209 0.258112 0.988720 0.000000
- *MESH_TVERT 210 0.270836 0.981468 0.000000
- *MESH_TVERT 211 0.636641 0.978456 0.000000
- *MESH_TVERT 212 0.636641 0.978456 0.000000
- *MESH_TVERT 213 0.636641 0.978456 0.000000
- *MESH_TVERT 214 0.270836 0.981468 0.000000
- *MESH_TVERT 215 0.270836 0.981468 0.000000
- *MESH_TVERT 216 0.746542 0.828880 0.000000
- *MESH_TVERT 217 0.534222 0.830628 0.000000
- *MESH_TVERT 218 0.534222 0.830628 0.000000
- *MESH_TVERT 219 0.534222 0.830628 0.000000
- *MESH_TVERT 220 0.746542 0.828880 0.000000
- *MESH_TVERT 221 0.746542 0.828880 0.000000
- *MESH_TVERT 222 0.534222 0.830628 0.000000
- *MESH_TVERT 223 0.521339 0.820728 0.000000
- *MESH_TVERT 224 0.521339 0.820728 0.000000
- *MESH_TVERT 225 0.521339 0.820728 0.000000
- *MESH_TVERT 226 0.534222 0.830628 0.000000
- *MESH_TVERT 227 0.534222 0.830628 0.000000
- *MESH_TVERT 228 0.521339 0.820728 0.000000
- *MESH_TVERT 229 0.062164 0.824508 0.000000
- *MESH_TVERT 230 0.062164 0.824508 0.000000
- *MESH_TVERT 231 0.062164 0.824508 0.000000
- *MESH_TVERT 232 0.521339 0.820728 0.000000
- *MESH_TVERT 233 0.521339 0.820728 0.000000
- *MESH_TVERT 234 0.258112 0.988720 0.000000
- *MESH_TVERT 235 0.230789 0.938911 0.000000
- *MESH_TVERT 236 0.151952 0.989594 0.000000
- *MESH_TVERT 237 0.270836 0.981468 0.000000
- *MESH_TVERT 238 0.230789 0.938911 0.000000
- *MESH_TVERT 239 0.258112 0.988720 0.000000
- *MESH_TVERT 240 0.346813 0.937956 0.000000
- *MESH_TVERT 241 0.230789 0.938911 0.000000
- *MESH_TVERT 242 0.270836 0.981468 0.000000
- *MESH_TVERT 243 0.151952 0.989594 0.000000
- *MESH_TVERT 244 0.230789 0.938911 0.000000
- *MESH_TVERT 245 0.089817 0.910052 0.000000
- *MESH_TVERT 246 0.191915 0.884910 0.000000
- *MESH_TVERT 247 0.089817 0.910052 0.000000
- *MESH_TVERT 248 0.230789 0.938911 0.000000
- *MESH_TVERT 249 0.089817 0.910052 0.000000
- *MESH_TVERT 250 0.191915 0.884910 0.000000
- *MESH_TVERT 251 0.062164 0.824508 0.000000
- *MESH_TVERT 252 0.191796 0.872045 0.000000
- *MESH_TVERT 253 0.062164 0.824508 0.000000
- *MESH_TVERT 254 0.191915 0.884910 0.000000
- *MESH_TVERT 255 0.191796 0.872045 0.000000
- *MESH_TVERT 256 0.200591 0.854818 0.000000
- *MESH_TVERT 257 0.062164 0.824508 0.000000
- *MESH_TVERT 258 0.200591 0.854818 0.000000
- *MESH_TVERT 259 0.223561 0.848911 0.000000
- *MESH_TVERT 260 0.062164 0.824508 0.000000
- *MESH_TVERT 261 0.062164 0.824508 0.000000
- *MESH_TVERT 262 0.223561 0.848911 0.000000
- *MESH_TVERT 263 0.521339 0.820728 0.000000
- *MESH_TVERT 264 0.474252 0.846847 0.000000
- *MESH_TVERT 265 0.521339 0.820728 0.000000
- *MESH_TVERT 266 0.223561 0.848911 0.000000
- *MESH_TVERT 267 0.534222 0.830628 0.000000
- *MESH_TVERT 268 0.607947 0.918652 0.000000
- *MESH_TVERT 269 0.746542 0.828880 0.000000
- *MESH_TVERT 270 0.531204 0.919284 0.000000
- *MESH_TVERT 271 0.607947 0.918652 0.000000
- *MESH_TVERT 272 0.534222 0.830628 0.000000
- *MESH_TVERT 273 0.484079 0.859345 0.000000
- *MESH_TVERT 274 0.531204 0.919284 0.000000
- *MESH_TVERT 275 0.534222 0.830628 0.000000
- *MESH_TVERT 276 0.746542 0.828880 0.000000
- *MESH_TVERT 277 0.607947 0.918652 0.000000
- *MESH_TVERT 278 0.636641 0.978456 0.000000
- *MESH_TVERT 279 0.608105 0.935805 0.000000
- *MESH_TVERT 280 0.636641 0.978456 0.000000
- *MESH_TVERT 281 0.607947 0.918652 0.000000
- *MESH_TVERT 282 0.484079 0.859345 0.000000
- *MESH_TVERT 283 0.534222 0.830628 0.000000
- *MESH_TVERT 284 0.474252 0.846847 0.000000
- *MESH_TVERT 285 0.521339 0.820728 0.000000
- *MESH_TVERT 286 0.474252 0.846847 0.000000
- *MESH_TVERT 287 0.534222 0.830628 0.000000
- *MESH_TVERT 288 0.636641 0.978456 0.000000
- *MESH_TVERT 289 0.608105 0.935805 0.000000
- *MESH_TVERT 290 0.270836 0.981468 0.000000
- *MESH_TVERT 291 0.346813 0.937956 0.000000
- *MESH_TVERT 292 0.270836 0.981468 0.000000
- *MESH_TVERT 293 0.608105 0.935805 0.000000
- *MESH_TVERT 294 0.071884 0.907341 0.000000
- *MESH_TVERT 295 0.089817 0.910052 0.000000
- *MESH_TVERT 296 0.062164 0.824508 0.000000
- *MESH_TVERT 297 0.230789 0.938911 0.000000
- *MESH_TVERT 298 0.258112 0.988720 0.000000
- *MESH_TVERT 299 0.151952 0.989594 0.000000
- *MESH_TVERT 300 0.230789 0.938911 0.000000
- *MESH_TVERT 301 0.270836 0.981468 0.000000
- *MESH_TVERT 302 0.258112 0.988720 0.000000
- *MESH_TVERT 303 0.230789 0.938911 0.000000
- *MESH_TVERT 304 0.346813 0.937956 0.000000
- *MESH_TVERT 305 0.270836 0.981468 0.000000
- *MESH_TVERT 306 0.230789 0.938911 0.000000
- *MESH_TVERT 307 0.151952 0.989594 0.000000
- *MESH_TVERT 308 0.089817 0.910052 0.000000
- *MESH_TVERT 309 0.089817 0.910052 0.000000
- *MESH_TVERT 310 0.191915 0.884910 0.000000
- *MESH_TVERT 311 0.230789 0.938911 0.000000
- *MESH_TVERT 312 0.191915 0.884910 0.000000
- *MESH_TVERT 313 0.089817 0.910052 0.000000
- *MESH_TVERT 314 0.062164 0.824508 0.000000
- *MESH_TVERT 315 0.062164 0.824508 0.000000
- *MESH_TVERT 316 0.191796 0.872045 0.000000
- *MESH_TVERT 317 0.191915 0.884910 0.000000
- *MESH_TVERT 318 0.200591 0.854818 0.000000
- *MESH_TVERT 319 0.191796 0.872045 0.000000
- *MESH_TVERT 320 0.062164 0.824508 0.000000
- *MESH_TVERT 321 0.223561 0.848911 0.000000
- *MESH_TVERT 322 0.200591 0.854818 0.000000
- *MESH_TVERT 323 0.062164 0.824508 0.000000
- *MESH_TVERT 324 0.223561 0.848911 0.000000
- *MESH_TVERT 325 0.062164 0.824508 0.000000
- *MESH_TVERT 326 0.521339 0.820728 0.000000
- *MESH_TVERT 327 0.521339 0.820728 0.000000
- *MESH_TVERT 328 0.474252 0.846847 0.000000
- *MESH_TVERT 329 0.223561 0.848911 0.000000
- *MESH_TVERT 330 0.607947 0.918652 0.000000
- *MESH_TVERT 331 0.534222 0.830628 0.000000
- *MESH_TVERT 332 0.746542 0.828880 0.000000
- *MESH_TVERT 333 0.607947 0.918652 0.000000
- *MESH_TVERT 334 0.531204 0.919284 0.000000
- *MESH_TVERT 335 0.534222 0.830628 0.000000
- *MESH_TVERT 336 0.531204 0.919284 0.000000
- *MESH_TVERT 337 0.484079 0.859345 0.000000
- *MESH_TVERT 338 0.534222 0.830628 0.000000
- *MESH_TVERT 339 0.607947 0.918652 0.000000
- *MESH_TVERT 340 0.746542 0.828880 0.000000
- *MESH_TVERT 341 0.636641 0.978456 0.000000
- *MESH_TVERT 342 0.636641 0.978456 0.000000
- *MESH_TVERT 343 0.608105 0.935805 0.000000
- *MESH_TVERT 344 0.607947 0.918652 0.000000
- *MESH_TVERT 345 0.534222 0.830628 0.000000
- *MESH_TVERT 346 0.484079 0.859345 0.000000
- *MESH_TVERT 347 0.474252 0.846847 0.000000
- *MESH_TVERT 348 0.474252 0.846847 0.000000
- *MESH_TVERT 349 0.521339 0.820728 0.000000
- *MESH_TVERT 350 0.534222 0.830628 0.000000
- *MESH_TVERT 351 0.608105 0.935805 0.000000
- *MESH_TVERT 352 0.636641 0.978456 0.000000
- *MESH_TVERT 353 0.270836 0.981468 0.000000
- *MESH_TVERT 354 0.270836 0.981468 0.000000
- *MESH_TVERT 355 0.346813 0.937956 0.000000
- *MESH_TVERT 356 0.608105 0.935805 0.000000
- *MESH_TVERT 357 0.089817 0.910052 0.000000
- *MESH_TVERT 358 0.071884 0.907341 0.000000
- *MESH_TVERT 359 0.062164 0.824508 0.000000
- *MESH_TVERT 360 0.216328 0.797444 0.000000
- *MESH_TVERT 361 0.304755 0.807469 0.000000
- *MESH_TVERT 362 0.052713 0.800658 0.000000
- *MESH_TVERT 363 0.304120 0.738781 0.000000
- *MESH_TVERT 364 0.216328 0.797444 0.000000
- *MESH_TVERT 365 0.241200 0.778578 0.000000
- *MESH_TVERT 366 0.304755 0.807469 0.000000
- *MESH_TVERT 367 0.216328 0.797444 0.000000
- *MESH_TVERT 368 0.304120 0.738781 0.000000
- *MESH_TVERT 369 0.540406 0.811572 0.000000
- *MESH_TVERT 370 0.397693 0.758538 0.000000
- *MESH_TVERT 371 0.540085 0.776849 0.000000
- *MESH_TVERT 372 0.532265 0.834033 0.000000
- *MESH_TVERT 373 0.397693 0.758538 0.000000
- *MESH_TVERT 374 0.540406 0.811572 0.000000
- *MESH_TVERT 375 0.398139 0.806700 0.000000
- *MESH_TVERT 376 0.397693 0.758538 0.000000
- *MESH_TVERT 377 0.532265 0.834033 0.000000
- *MESH_TVERT 378 0.501088 0.712989 0.000000
- *MESH_TVERT 379 0.554563 0.712549 0.000000
- *MESH_TVERT 380 0.540085 0.776849 0.000000
- *MESH_TVERT 381 0.554630 0.719721 0.000000
- *MESH_TVERT 382 0.540085 0.776849 0.000000
- *MESH_TVERT 383 0.554563 0.712549 0.000000
- *MESH_TVERT 384 0.540085 0.776849 0.000000
- *MESH_TVERT 385 0.554630 0.719721 0.000000
- *MESH_TVERT 386 0.763825 0.775007 0.000000
- *MESH_TVERT 387 0.763298 0.718003 0.000000
- *MESH_TVERT 388 0.763825 0.775007 0.000000
- *MESH_TVERT 389 0.554630 0.719721 0.000000
- *MESH_TVERT 390 0.384932 0.757965 0.000000
- *MESH_TVERT 391 0.368780 0.743613 0.000000
- *MESH_TVERT 392 0.397470 0.734370 0.000000
- *MESH_TVERT 393 0.334731 0.742893 0.000000
- *MESH_TVERT 394 0.318282 0.752519 0.000000
- *MESH_TVERT 395 0.304203 0.738777 0.000000
- *MESH_TVERT 396 0.318282 0.752519 0.000000
- *MESH_TVERT 397 0.311260 0.766564 0.000000
- *MESH_TVERT 398 0.304203 0.738777 0.000000
- *MESH_TVERT 399 0.312740 0.781538 0.000000
- *MESH_TVERT 400 0.304203 0.738777 0.000000
- *MESH_TVERT 401 0.311260 0.766564 0.000000
- *MESH_TVERT 402 0.304755 0.807468 0.000000
- *MESH_TVERT 403 0.304203 0.738777 0.000000
- *MESH_TVERT 404 0.312740 0.781538 0.000000
- *MESH_TVERT 405 0.312740 0.781538 0.000000
- *MESH_TVERT 406 0.321748 0.788956 0.000000
- *MESH_TVERT 407 0.304755 0.807468 0.000000
- *MESH_TVERT 408 0.304755 0.807468 0.000000
- *MESH_TVERT 409 0.321748 0.788956 0.000000
- *MESH_TVERT 410 0.398139 0.806700 0.000000
- *MESH_TVERT 411 0.391922 0.788878 0.000000
- *MESH_TVERT 412 0.398139 0.806700 0.000000
- *MESH_TVERT 413 0.321748 0.788956 0.000000
- *MESH_TVERT 414 0.334731 0.742893 0.000000
- *MESH_TVERT 415 0.304203 0.738777 0.000000
- *MESH_TVERT 416 0.368780 0.743613 0.000000
- *MESH_TVERT 417 0.397470 0.734370 0.000000
- *MESH_TVERT 418 0.368780 0.743613 0.000000
- *MESH_TVERT 419 0.304203 0.738777 0.000000
- *MESH_TVERT 420 0.391770 0.772395 0.000000
- *MESH_TVERT 421 0.384932 0.757965 0.000000
- *MESH_TVERT 422 0.397470 0.734370 0.000000
- *MESH_TVERT 423 0.391922 0.788878 0.000000
- *MESH_TVERT 424 0.391770 0.772395 0.000000
- *MESH_TVERT 425 0.398139 0.806700 0.000000
- *MESH_TVERT 426 0.397470 0.734370 0.000000
- *MESH_TVERT 427 0.398139 0.806700 0.000000
- *MESH_TVERT 428 0.391770 0.772395 0.000000
- *MESH_TVERT 429 0.540085 0.776849 0.000000
- *MESH_TVERT 430 0.397693 0.758538 0.000000
- *MESH_TVERT 431 0.459535 0.733859 0.000000
- *MESH_TVERT 432 0.397470 0.734370 0.000000
- *MESH_TVERT 433 0.459535 0.733859 0.000000
- *MESH_TVERT 434 0.397693 0.758538 0.000000
- *MESH_TVERT 435 0.032919 0.826947 0.000000
- *MESH_TVERT 436 0.052713 0.800658 0.000000
- *MESH_TVERT 437 0.532265 0.834033 0.000000
- *MESH_TVERT 438 0.304755 0.807469 0.000000
- *MESH_TVERT 439 0.532265 0.834033 0.000000
- *MESH_TVERT 440 0.052713 0.800658 0.000000
- *MESH_TVERT 441 0.224141 0.739529 0.000000
- *MESH_TVERT 442 0.304120 0.738781 0.000000
- *MESH_TVERT 443 0.241200 0.778578 0.000000
- *MESH_TVERT 444 0.273921 0.705528 0.000000
- *MESH_TVERT 445 0.304120 0.738781 0.000000
- *MESH_TVERT 446 0.224141 0.739529 0.000000
- *MESH_TVERT 447 0.500587 0.658875 0.000000
- *MESH_TVERT 448 0.501088 0.712989 0.000000
- *MESH_TVERT 449 0.458844 0.659218 0.000000
- *MESH_TVERT 450 0.459535 0.733859 0.000000
- *MESH_TVERT 451 0.458844 0.659218 0.000000
- *MESH_TVERT 452 0.501088 0.712989 0.000000
- *MESH_TVERT 453 0.398139 0.806700 0.000000
- *MESH_TVERT 454 0.532265 0.834033 0.000000
- *MESH_TVERT 455 0.304755 0.807469 0.000000
- *MESH_TVERT 456 0.501088 0.712989 0.000000
- *MESH_TVERT 457 0.540085 0.776849 0.000000
- *MESH_TVERT 458 0.459535 0.733859 0.000000
- *MESH_TVERT 459 0.196752 0.666974 0.000000
- *MESH_TVERT 460 0.263385 0.649630 0.000000
- *MESH_TVERT 461 0.273921 0.705528 0.000000
- *MESH_TVERT 462 0.193724 0.700590 0.000000
- *MESH_TVERT 463 0.196752 0.666974 0.000000
- *MESH_TVERT 464 0.273921 0.705528 0.000000
- *MESH_TVERT 465 0.224141 0.739529 0.000000
- *MESH_TVERT 466 0.193724 0.700590 0.000000
- *MESH_TVERT 467 0.273921 0.705528 0.000000
- *MESH_TVERT 468 0.241489 0.629283 0.000000
- *MESH_TVERT 469 0.263385 0.649630 0.000000
- *MESH_TVERT 470 0.196752 0.666974 0.000000
- *MESH_TVERT 471 0.216328 0.797444 0.000000
- *MESH_TVERT 472 0.304120 0.738781 0.000000
- *MESH_TVERT 473 0.241200 0.778578 0.000000
- *MESH_TVERT 474 0.216328 0.797444 0.000000
- *MESH_TVERT 475 0.304755 0.807469 0.000000
- *MESH_TVERT 476 0.304120 0.738781 0.000000
- *MESH_TVERT 477 0.397693 0.758538 0.000000
- *MESH_TVERT 478 0.540406 0.811572 0.000000
- *MESH_TVERT 479 0.540085 0.776849 0.000000
- *MESH_TVERT 480 0.397693 0.758538 0.000000
- *MESH_TVERT 481 0.532265 0.834033 0.000000
- *MESH_TVERT 482 0.540406 0.811572 0.000000
- *MESH_TVERT 483 0.397693 0.758538 0.000000
- *MESH_TVERT 484 0.398139 0.806700 0.000000
- *MESH_TVERT 485 0.532265 0.834033 0.000000
- *MESH_TVERT 486 0.554563 0.712549 0.000000
- *MESH_TVERT 487 0.501088 0.712989 0.000000
- *MESH_TVERT 488 0.540085 0.776849 0.000000
- *MESH_TVERT 489 0.540085 0.776849 0.000000
- *MESH_TVERT 490 0.554630 0.719720 0.000000
- *MESH_TVERT 491 0.554563 0.712549 0.000000
- *MESH_TVERT 492 0.554630 0.719720 0.000000
- *MESH_TVERT 493 0.540085 0.776849 0.000000
- *MESH_TVERT 494 0.763825 0.775007 0.000000
- *MESH_TVERT 495 0.763825 0.775007 0.000000
- *MESH_TVERT 496 0.763298 0.718002 0.000000
- *MESH_TVERT 497 0.554630 0.719720 0.000000
- *MESH_TVERT 498 0.368708 0.743612 0.000000
- *MESH_TVERT 499 0.384932 0.757965 0.000000
- *MESH_TVERT 500 0.397470 0.734371 0.000000
- *MESH_TVERT 501 0.318282 0.752519 0.000000
- *MESH_TVERT 502 0.334731 0.742893 0.000000
- *MESH_TVERT 503 0.304203 0.738777 0.000000
- *MESH_TVERT 504 0.311260 0.766564 0.000000
- *MESH_TVERT 505 0.318282 0.752519 0.000000
- *MESH_TVERT 506 0.304203 0.738777 0.000000
- *MESH_TVERT 507 0.304203 0.738777 0.000000
- *MESH_TVERT 508 0.312740 0.781538 0.000000
- *MESH_TVERT 509 0.311260 0.766564 0.000000
- *MESH_TVERT 510 0.304203 0.738777 0.000000
- *MESH_TVERT 511 0.304755 0.807468 0.000000
- *MESH_TVERT 512 0.312740 0.781538 0.000000
- *MESH_TVERT 513 0.321748 0.788956 0.000000
- *MESH_TVERT 514 0.312740 0.781538 0.000000
- *MESH_TVERT 515 0.304755 0.807468 0.000000
- *MESH_TVERT 516 0.321748 0.788956 0.000000
- *MESH_TVERT 517 0.304755 0.807468 0.000000
- *MESH_TVERT 518 0.398139 0.806700 0.000000
- *MESH_TVERT 519 0.398139 0.806700 0.000000
- *MESH_TVERT 520 0.391922 0.788878 0.000000
- *MESH_TVERT 521 0.321748 0.788956 0.000000
- *MESH_TVERT 522 0.304203 0.738777 0.000000
- *MESH_TVERT 523 0.334731 0.742893 0.000000
- *MESH_TVERT 524 0.368708 0.743612 0.000000
- *MESH_TVERT 525 0.368708 0.743612 0.000000
- *MESH_TVERT 526 0.397470 0.734371 0.000000
- *MESH_TVERT 527 0.304203 0.738777 0.000000
- *MESH_TVERT 528 0.384932 0.757965 0.000000
- *MESH_TVERT 529 0.391770 0.772395 0.000000
- *MESH_TVERT 530 0.397470 0.734371 0.000000
- *MESH_TVERT 531 0.391770 0.772395 0.000000
- *MESH_TVERT 532 0.391922 0.788878 0.000000
- *MESH_TVERT 533 0.398139 0.806700 0.000000
- *MESH_TVERT 534 0.398139 0.806700 0.000000
- *MESH_TVERT 535 0.397470 0.734371 0.000000
- *MESH_TVERT 536 0.391770 0.772395 0.000000
- *MESH_TVERT 537 0.397693 0.758538 0.000000
- *MESH_TVERT 538 0.540085 0.776849 0.000000
- *MESH_TVERT 539 0.459535 0.733859 0.000000
- *MESH_TVERT 540 0.459535 0.733859 0.000000
- *MESH_TVERT 541 0.397470 0.734370 0.000000
- *MESH_TVERT 542 0.397693 0.758538 0.000000
- *MESH_TVERT 543 0.052713 0.800658 0.000000
- *MESH_TVERT 544 0.032919 0.826947 0.000000
- *MESH_TVERT 545 0.532265 0.834033 0.000000
- *MESH_TVERT 546 0.532265 0.834033 0.000000
- *MESH_TVERT 547 0.216328 0.797444 0.000000
- *MESH_TVERT 548 0.052713 0.800658 0.000000
- *MESH_TVERT 549 0.304120 0.738781 0.000000
- *MESH_TVERT 550 0.224141 0.739529 0.000000
- *MESH_TVERT 551 0.241200 0.778578 0.000000
- *MESH_TVERT 552 0.304120 0.738781 0.000000
- *MESH_TVERT 553 0.273921 0.705528 0.000000
- *MESH_TVERT 554 0.224141 0.739529 0.000000
- *MESH_TVERT 555 0.501088 0.712989 0.000000
- *MESH_TVERT 556 0.500587 0.658875 0.000000
- *MESH_TVERT 557 0.458844 0.659218 0.000000
- *MESH_TVERT 558 0.458844 0.659218 0.000000
- *MESH_TVERT 559 0.459535 0.733859 0.000000
- *MESH_TVERT 560 0.501088 0.712989 0.000000
- *MESH_TVERT 561 0.532265 0.834033 0.000000
- *MESH_TVERT 562 0.398139 0.806700 0.000000
- *MESH_TVERT 563 0.304755 0.807469 0.000000
- *MESH_TVERT 564 0.540085 0.776849 0.000000
- *MESH_TVERT 565 0.501088 0.712989 0.000000
- *MESH_TVERT 566 0.459535 0.733859 0.000000
- *MESH_TVERT 567 0.263385 0.649630 0.000000
- *MESH_TVERT 568 0.196752 0.666974 0.000000
- *MESH_TVERT 569 0.273921 0.705528 0.000000
- *MESH_TVERT 570 0.196752 0.666974 0.000000
- *MESH_TVERT 571 0.193724 0.700590 0.000000
- *MESH_TVERT 572 0.273921 0.705528 0.000000
- *MESH_TVERT 573 0.193724 0.700590 0.000000
- *MESH_TVERT 574 0.224141 0.739529 0.000000
- *MESH_TVERT 575 0.273921 0.705528 0.000000
- *MESH_TVERT 576 0.263385 0.649630 0.000000
- *MESH_TVERT 577 0.241489 0.629283 0.000000
- *MESH_TVERT 578 0.196752 0.666974 0.000000
- *MESH_TVERT 579 0.763232 0.710831 0.000000
- *MESH_TVERT 580 0.554630 0.719720 0.000000
- *MESH_TVERT 581 0.763298 0.718002 0.000000
- *MESH_TVERT 582 0.763232 0.710831 0.000000
- *MESH_TVERT 583 0.554563 0.712549 0.000000
- *MESH_TVERT 584 0.554630 0.719720 0.000000
- *MESH_TVERT 585 0.554563 0.712549 0.000000
- *MESH_TVERT 586 0.554630 0.719720 0.000000
- *MESH_TVERT 587 0.554563 0.712549 0.000000
- *MESH_TVERT 588 0.554564 0.712549 0.000000
- *MESH_TVERT 589 0.554630 0.719721 0.000000
- *MESH_TVERT 590 0.554563 0.712549 0.000000
- *MESH_TVERT 591 0.763232 0.710831 0.000000
- *MESH_TVERT 592 0.554630 0.719721 0.000000
- *MESH_TVERT 593 0.554564 0.712549 0.000000
- *MESH_TVERT 594 0.763232 0.710831 0.000000
- *MESH_TVERT 595 0.763298 0.718003 0.000000
- *MESH_TVERT 596 0.554630 0.719721 0.000000
- *MESH_TVERT 597 0.554564 0.712549 0.000000
- *MESH_TVERT 598 0.763232 0.710831 0.000000
- *MESH_TVERT 599 0.763232 0.710831 0.000000
- *MESH_TVERT 600 0.554564 0.712549 0.000000
- *MESH_TVERT 601 0.554563 0.712549 0.000000
- *MESH_TVERT 602 0.763232 0.710831 0.000000
- *MESH_TVERT 603 0.554564 0.712549 0.000000
- *MESH_TVERT 604 0.501088 0.712989 0.000000
- *MESH_TVERT 605 0.554563 0.712549 0.000000
- *MESH_TVERT 606 0.554564 0.712549 0.000000
- *MESH_TVERT 607 0.554563 0.712549 0.000000
- *MESH_TVERT 608 0.501088 0.712989 0.000000
- *MESH_TVERT 609 0.459535 0.733859 0.000000
- *MESH_TVERT 610 0.397470 0.734370 0.000000
- *MESH_TVERT 611 0.397470 0.734371 0.000000
- *MESH_TVERT 612 0.397470 0.734371 0.000000
- *MESH_TVERT 613 0.397470 0.734370 0.000000
- *MESH_TVERT 614 0.459535 0.733859 0.000000
- *MESH_TVERT 615 0.304755 0.807469 0.000000
- *MESH_TVERT 616 0.216328 0.797444 0.000000
- *MESH_TVERT 617 0.532265 0.834033 0.000000
- *MESH_TVERT 618 0.397693 0.758538 0.000000
- *MESH_TVERT 619 0.398139 0.806700 0.000000
- *MESH_TVERT 620 0.398139 0.806700 0.000000
- *MESH_TVERT 621 0.397693 0.758538 0.000000
- *MESH_TVERT 622 0.397470 0.734371 0.000000
- *MESH_TVERT 623 0.398139 0.806700 0.000000
- *MESH_TVERT 624 0.397693 0.758538 0.000000
- *MESH_TVERT 625 0.397470 0.734370 0.000000
- *MESH_TVERT 626 0.397470 0.734371 0.000000
- *MESH_TVERT 627 0.398139 0.806700 0.000000
- *MESH_TVERT 628 0.304755 0.807468 0.000000
- *MESH_TVERT 629 0.304755 0.807469 0.000000
- *MESH_TVERT 630 0.398139 0.806700 0.000000
- *MESH_TVERT 631 0.398139 0.806700 0.000000
- *MESH_TVERT 632 0.304755 0.807468 0.000000
- *MESH_TVERT 633 0.304203 0.738777 0.000000
- *MESH_TVERT 634 0.304755 0.807469 0.000000
- *MESH_TVERT 635 0.304755 0.807468 0.000000
- *MESH_TVERT 636 0.304203 0.738777 0.000000
- *MESH_TVERT 637 0.304120 0.738781 0.000000
- *MESH_TVERT 638 0.304755 0.807469 0.000000
- *MESH_TVERT 639 0.334731 0.742893 0.000000
- *MESH_TVERT 640 0.318282 0.752519 0.000000
- *MESH_TVERT 641 0.318282 0.752519 0.000000
- *MESH_TVERT 642 0.318282 0.752519 0.000000
- *MESH_TVERT 643 0.334731 0.742893 0.000000
- *MESH_TVERT 644 0.334731 0.742893 0.000000
- *MESH_TVERT 645 0.311260 0.766564 0.000000
- *MESH_TVERT 646 0.312740 0.781538 0.000000
- *MESH_TVERT 647 0.312740 0.781538 0.000000
- *MESH_TVERT 648 0.312740 0.781538 0.000000
- *MESH_TVERT 649 0.311260 0.766564 0.000000
- *MESH_TVERT 650 0.311260 0.766564 0.000000
- *MESH_TVERT 651 0.321748 0.788956 0.000000
- *MESH_TVERT 652 0.391922 0.788878 0.000000
- *MESH_TVERT 653 0.391922 0.788878 0.000000
- *MESH_TVERT 654 0.391922 0.788878 0.000000
- *MESH_TVERT 655 0.321748 0.788956 0.000000
- *MESH_TVERT 656 0.321748 0.788956 0.000000
- *MESH_TVERT 657 0.391770 0.772395 0.000000
- *MESH_TVERT 658 0.384932 0.757965 0.000000
- *MESH_TVERT 659 0.384932 0.757965 0.000000
- *MESH_TVERT 660 0.384932 0.757965 0.000000
- *MESH_TVERT 661 0.391770 0.772395 0.000000
- *MESH_TVERT 662 0.391770 0.772395 0.000000
- *MESH_TVERT 663 0.273921 0.705528 0.000000
- *MESH_TVERT 664 0.304120 0.738781 0.000000
- *MESH_TVERT 665 0.304203 0.738777 0.000000
- *MESH_TVERT 666 0.304203 0.738777 0.000000
- *MESH_TVERT 667 0.304203 0.738777 0.000000
- *MESH_TVERT 668 0.273921 0.705528 0.000000
- *MESH_TVERT 669 0.304203 0.738777 0.000000
- *MESH_TVERT 670 0.304120 0.738781 0.000000
- *MESH_TVERT 671 0.273921 0.705528 0.000000
- *MESH_TVERT 672 0.273921 0.705528 0.000000
- *MESH_TVERT 673 0.273921 0.705528 0.000000
- *MESH_TVERT 674 0.304203 0.738777 0.000000
- *MESH_TVERT 675 0.398139 0.806700 0.000000
- *MESH_TVERT 676 0.398139 0.806700 0.000000
- *MESH_TVERT 677 0.304755 0.807469 0.000000
- *MESH_TVERT 678 0.304755 0.807469 0.000000
- *MESH_TVERT 679 0.304755 0.807468 0.000000
- *MESH_TVERT 680 0.398139 0.806700 0.000000
- *MESH_TVERT 681 0.304755 0.807468 0.000000
- *MESH_TVERT 682 0.304120 0.738781 0.000000
- *MESH_TVERT 683 0.304203 0.738777 0.000000
- *MESH_TVERT 684 0.304755 0.807468 0.000000
- *MESH_TVERT 685 0.304388 0.767743 0.000000
- *MESH_TVERT 686 0.304120 0.738781 0.000000
- *MESH_TVERT 687 0.304755 0.807468 0.000000
- *MESH_TVERT 688 0.304528 0.782893 0.000000
- *MESH_TVERT 689 0.304388 0.767743 0.000000
- *MESH_TVERT 690 0.304755 0.807468 0.000000
- *MESH_TVERT 691 0.304755 0.807469 0.000000
- *MESH_TVERT 692 0.304528 0.782893 0.000000
- *MESH_TVERT 693 0.397470 0.734370 0.000000
- *MESH_TVERT 694 0.398139 0.806700 0.000000
- *MESH_TVERT 695 0.398139 0.806700 0.000000
- *MESH_TVERT 696 0.397470 0.734370 0.000000
- *MESH_TVERT 697 0.397992 0.790831 0.000000
- *MESH_TVERT 698 0.398139 0.806700 0.000000
- *MESH_TVERT 699 0.397470 0.734370 0.000000
- *MESH_TVERT 700 0.397846 0.775061 0.000000
- *MESH_TVERT 701 0.397992 0.790831 0.000000
- *MESH_TVERT 702 0.397470 0.734370 0.000000
- *MESH_TVERT 703 0.397749 0.764583 0.000000
- *MESH_TVERT 704 0.397846 0.775061 0.000000
- *MESH_TVERT 705 0.397470 0.734370 0.000000
- *MESH_TVERT 706 0.397470 0.734370 0.000000
- *MESH_TVERT 707 0.397749 0.764583 0.000000
- *MESH_TVERT 708 0.334731 0.742893 0.000000
- *MESH_TVERT 709 0.368780 0.743613 0.000000
- *MESH_TVERT 710 0.368708 0.743612 0.000000
- *MESH_TVERT 711 0.368708 0.743612 0.000000
- *MESH_TVERT 712 0.334731 0.742893 0.000000
- *MESH_TVERT 713 0.334731 0.742893 0.000000
- *MESH_TVERT 714 0.397470 0.734370 0.000000
- *MESH_TVERT 715 0.459535 0.733859 0.000000
- *MESH_TVERT 716 0.459535 0.733859 0.000000
- *MESH_TVERT 717 0.459535 0.733859 0.000000
- *MESH_TVERT 718 0.397470 0.734370 0.000000
- *MESH_TVERT 719 0.397470 0.734370 0.000000
- *MESH_TVERT 720 0.304203 0.738777 0.000000
- *MESH_TVERT 721 0.397470 0.734371 0.000000
- *MESH_TVERT 722 0.397470 0.734370 0.000000
- *MESH_TVERT 723 0.397470 0.734370 0.000000
- *MESH_TVERT 724 0.304203 0.738777 0.000000
- *MESH_TVERT 725 0.304203 0.738777 0.000000
- *MESH_TVERT 726 0.311260 0.766564 0.000000
- *MESH_TVERT 727 0.311260 0.766564 0.000000
- *MESH_TVERT 728 0.318282 0.752519 0.000000
- *MESH_TVERT 729 0.318282 0.752519 0.000000
- *MESH_TVERT 730 0.318282 0.752519 0.000000
- *MESH_TVERT 731 0.311260 0.766564 0.000000
- *MESH_TVERT 732 0.321748 0.788956 0.000000
- *MESH_TVERT 733 0.321748 0.788956 0.000000
- *MESH_TVERT 734 0.312740 0.781538 0.000000
- *MESH_TVERT 735 0.312740 0.781538 0.000000
- *MESH_TVERT 736 0.312740 0.781538 0.000000
- *MESH_TVERT 737 0.321748 0.788956 0.000000
- *MESH_TVERT 738 0.391770 0.772395 0.000000
- *MESH_TVERT 739 0.391770 0.772395 0.000000
- *MESH_TVERT 740 0.391922 0.788878 0.000000
- *MESH_TVERT 741 0.391922 0.788878 0.000000
- *MESH_TVERT 742 0.391922 0.788878 0.000000
- *MESH_TVERT 743 0.391770 0.772395 0.000000
- *MESH_TVERT 744 0.368708 0.743612 0.000000
- *MESH_TVERT 745 0.368780 0.743613 0.000000
- *MESH_TVERT 746 0.384932 0.757965 0.000000
- *MESH_TVERT 747 0.384932 0.757965 0.000000
- *MESH_TVERT 748 0.384932 0.757965 0.000000
- *MESH_TVERT 749 0.368708 0.743612 0.000000
- *MESH_TVERT 750 0.540406 0.811572 0.000000
- *MESH_TVERT 751 0.532265 0.834033 0.000000
- *MESH_TVERT 752 0.532265 0.834033 0.000000
- *MESH_TVERT 753 0.532265 0.834033 0.000000
- *MESH_TVERT 754 0.540406 0.811572 0.000000
- *MESH_TVERT 755 0.540406 0.811572 0.000000
- *MESH_TVERT 756 0.554563 0.712549 0.000000
- *MESH_TVERT 757 0.501088 0.712989 0.000000
- *MESH_TVERT 758 0.501088 0.712989 0.000000
- *MESH_TVERT 759 0.501088 0.712989 0.000000
- *MESH_TVERT 760 0.554563 0.712549 0.000000
- *MESH_TVERT 761 0.554563 0.712549 0.000000
- *MESH_TVERT 762 0.500587 0.658875 0.000000
- *MESH_TVERT 763 0.501088 0.712989 0.000000
- *MESH_TVERT 764 0.501088 0.712989 0.000000
- *MESH_TVERT 765 0.501088 0.712989 0.000000
- *MESH_TVERT 766 0.500587 0.658875 0.000000
- *MESH_TVERT 767 0.500587 0.658875 0.000000
- *MESH_TVERT 768 0.459535 0.733859 0.000000
- *MESH_TVERT 769 0.458844 0.659218 0.000000
- *MESH_TVERT 770 0.458844 0.659218 0.000000
- *MESH_TVERT 771 0.458844 0.659218 0.000000
- *MESH_TVERT 772 0.459535 0.733859 0.000000
- *MESH_TVERT 773 0.459535 0.733859 0.000000
- *MESH_TVERT 774 0.263385 0.649630 0.000000
- *MESH_TVERT 775 0.273921 0.705528 0.000000
- *MESH_TVERT 776 0.273921 0.705528 0.000000
- *MESH_TVERT 777 0.273921 0.705528 0.000000
- *MESH_TVERT 778 0.263385 0.649630 0.000000
- *MESH_TVERT 779 0.263385 0.649630 0.000000
- *MESH_TVERT 780 0.241489 0.629283 0.000000
- *MESH_TVERT 781 0.263385 0.649630 0.000000
- *MESH_TVERT 782 0.263385 0.649630 0.000000
- *MESH_TVERT 783 0.263385 0.649630 0.000000
- *MESH_TVERT 784 0.241489 0.629283 0.000000
- *MESH_TVERT 785 0.241489 0.629283 0.000000
- *MESH_TVERT 786 0.196752 0.666974 0.000000
- *MESH_TVERT 787 0.241489 0.629283 0.000000
- *MESH_TVERT 788 0.241489 0.629283 0.000000
- *MESH_TVERT 789 0.241489 0.629283 0.000000
- *MESH_TVERT 790 0.196752 0.666974 0.000000
- *MESH_TVERT 791 0.196752 0.666974 0.000000
- *MESH_TVERT 792 0.193724 0.700590 0.000000
- *MESH_TVERT 793 0.196752 0.666974 0.000000
- *MESH_TVERT 794 0.196752 0.666974 0.000000
- *MESH_TVERT 795 0.196752 0.666974 0.000000
- *MESH_TVERT 796 0.193724 0.700590 0.000000
- *MESH_TVERT 797 0.193724 0.700590 0.000000
- *MESH_TVERT 798 0.224141 0.739529 0.000000
- *MESH_TVERT 799 0.193724 0.700590 0.000000
- *MESH_TVERT 800 0.193724 0.700590 0.000000
- *MESH_TVERT 801 0.193724 0.700590 0.000000
- *MESH_TVERT 802 0.224141 0.739529 0.000000
- *MESH_TVERT 803 0.224141 0.739529 0.000000
- *MESH_TVERT 804 0.241200 0.778578 0.000000
- *MESH_TVERT 805 0.224141 0.739529 0.000000
- *MESH_TVERT 806 0.224141 0.739529 0.000000
- *MESH_TVERT 807 0.224141 0.739529 0.000000
- *MESH_TVERT 808 0.241200 0.778578 0.000000
- *MESH_TVERT 809 0.241200 0.778578 0.000000
- *MESH_TVERT 810 0.216328 0.797444 0.000000
- *MESH_TVERT 811 0.241200 0.778578 0.000000
- *MESH_TVERT 812 0.241200 0.778578 0.000000
- *MESH_TVERT 813 0.241200 0.778578 0.000000
- *MESH_TVERT 814 0.216328 0.797444 0.000000
- *MESH_TVERT 815 0.216328 0.797444 0.000000
- *MESH_TVERT 816 0.052713 0.800658 0.000000
- *MESH_TVERT 817 0.216328 0.797444 0.000000
- *MESH_TVERT 818 0.216328 0.797444 0.000000
- *MESH_TVERT 819 0.216328 0.797444 0.000000
- *MESH_TVERT 820 0.052713 0.800658 0.000000
- *MESH_TVERT 821 0.052713 0.800658 0.000000
- *MESH_TVERT 822 0.032919 0.826947 0.000000
- *MESH_TVERT 823 0.052713 0.800658 0.000000
- *MESH_TVERT 824 0.052713 0.800658 0.000000
- *MESH_TVERT 825 0.052713 0.800658 0.000000
- *MESH_TVERT 826 0.032919 0.826947 0.000000
- *MESH_TVERT 827 0.032919 0.826947 0.000000
- *MESH_TVERT 828 0.154589 0.415011 0.000000
- *MESH_TVERT 829 0.272167 0.350212 0.000000
- *MESH_TVERT 830 0.290356 0.415011 0.000000
- *MESH_TVERT 831 0.154589 0.415011 0.000000
- *MESH_TVERT 832 0.222473 0.302776 0.000000
- *MESH_TVERT 833 0.272167 0.350212 0.000000
- *MESH_TVERT 834 0.154589 0.415011 0.000000
- *MESH_TVERT 835 0.154589 0.285413 0.000000
- *MESH_TVERT 836 0.222473 0.302776 0.000000
- *MESH_TVERT 837 0.154589 0.415011 0.000000
- *MESH_TVERT 838 0.086706 0.302776 0.000000
- *MESH_TVERT 839 0.154589 0.285413 0.000000
- *MESH_TVERT 840 0.154589 0.415011 0.000000
- *MESH_TVERT 841 0.037012 0.350212 0.000000
- *MESH_TVERT 842 0.086706 0.302776 0.000000
- *MESH_TVERT 843 0.154589 0.415011 0.000000
- *MESH_TVERT 844 0.018822 0.415011 0.000000
- *MESH_TVERT 845 0.037012 0.350212 0.000000
- *MESH_TVERT 846 0.154589 0.415011 0.000000
- *MESH_TVERT 847 0.037012 0.479810 0.000000
- *MESH_TVERT 848 0.018822 0.415011 0.000000
- *MESH_TVERT 849 0.154589 0.415011 0.000000
- *MESH_TVERT 850 0.086706 0.527245 0.000000
- *MESH_TVERT 851 0.037012 0.479810 0.000000
- *MESH_TVERT 852 0.154589 0.415011 0.000000
- *MESH_TVERT 853 0.154589 0.544609 0.000000
- *MESH_TVERT 854 0.086706 0.527245 0.000000
- *MESH_TVERT 855 0.154589 0.415011 0.000000
- *MESH_TVERT 856 0.222473 0.527245 0.000000
- *MESH_TVERT 857 0.154589 0.544609 0.000000
- *MESH_TVERT 858 0.154589 0.415011 0.000000
- *MESH_TVERT 859 0.272167 0.479810 0.000000
- *MESH_TVERT 860 0.222473 0.527245 0.000000
- *MESH_TVERT 861 0.154589 0.415011 0.000000
- *MESH_TVERT 862 0.290356 0.415011 0.000000
- *MESH_TVERT 863 0.272167 0.479810 0.000000
- *MESH_TVERT 864 0.961726 0.865950 0.000000
- *MESH_TVERT 865 0.961776 0.871327 0.000000
- *MESH_TVERT 866 0.980781 0.871170 0.000000
- *MESH_TVERT 867 0.961726 0.865950 0.000000
- *MESH_TVERT 868 0.980781 0.871170 0.000000
- *MESH_TVERT 869 0.980732 0.865793 0.000000
- *MESH_TVERT 870 0.961690 0.862014 0.000000
- *MESH_TVERT 871 0.961726 0.865950 0.000000
- *MESH_TVERT 872 0.980732 0.865793 0.000000
- *MESH_TVERT 873 0.961690 0.862014 0.000000
- *MESH_TVERT 874 0.980732 0.865793 0.000000
- *MESH_TVERT 875 0.980695 0.861857 0.000000
- *MESH_TVERT 876 0.961676 0.860573 0.000000
- *MESH_TVERT 877 0.961690 0.862014 0.000000
- *MESH_TVERT 878 0.980695 0.861857 0.000000
- *MESH_TVERT 879 0.961676 0.860573 0.000000
- *MESH_TVERT 880 0.980695 0.861857 0.000000
- *MESH_TVERT 881 0.980682 0.860417 0.000000
- *MESH_TVERT 882 0.961690 0.862014 0.000000
- *MESH_TVERT 883 0.961676 0.860573 0.000000
- *MESH_TVERT 884 0.980682 0.860417 0.000000
- *MESH_TVERT 885 0.961690 0.862014 0.000000
- *MESH_TVERT 886 0.980682 0.860417 0.000000
- *MESH_TVERT 887 0.980695 0.861857 0.000000
- *MESH_TVERT 888 0.961726 0.865950 0.000000
- *MESH_TVERT 889 0.961690 0.862014 0.000000
- *MESH_TVERT 890 0.980695 0.861857 0.000000
- *MESH_TVERT 891 0.961726 0.865950 0.000000
- *MESH_TVERT 892 0.980695 0.861857 0.000000
- *MESH_TVERT 893 0.980732 0.865793 0.000000
- *MESH_TVERT 894 0.961776 0.871327 0.000000
- *MESH_TVERT 895 0.961726 0.865950 0.000000
- *MESH_TVERT 896 0.980732 0.865793 0.000000
- *MESH_TVERT 897 0.961776 0.871327 0.000000
- *MESH_TVERT 898 0.980732 0.865793 0.000000
- *MESH_TVERT 899 0.980781 0.871170 0.000000
- *MESH_TVERT 900 0.961826 0.876703 0.000000
- *MESH_TVERT 901 0.961776 0.871327 0.000000
- *MESH_TVERT 902 0.980781 0.871170 0.000000
- *MESH_TVERT 903 0.961826 0.876703 0.000000
- *MESH_TVERT 904 0.980781 0.871170 0.000000
- *MESH_TVERT 905 0.980831 0.876547 0.000000
- *MESH_TVERT 906 0.961862 0.880640 0.000000
- *MESH_TVERT 907 0.961826 0.876703 0.000000
- *MESH_TVERT 908 0.980831 0.876547 0.000000
- *MESH_TVERT 909 0.961862 0.880640 0.000000
- *MESH_TVERT 910 0.980831 0.876547 0.000000
- *MESH_TVERT 911 0.980868 0.880483 0.000000
- *MESH_TVERT 912 0.961875 0.882080 0.000000
- *MESH_TVERT 913 0.961862 0.880640 0.000000
- *MESH_TVERT 914 0.980868 0.880483 0.000000
- *MESH_TVERT 915 0.961875 0.882080 0.000000
- *MESH_TVERT 916 0.980868 0.880483 0.000000
- *MESH_TVERT 917 0.980881 0.881924 0.000000
- *MESH_TVERT 918 0.961862 0.880639 0.000000
- *MESH_TVERT 919 0.961875 0.882080 0.000000
- *MESH_TVERT 920 0.980881 0.881924 0.000000
- *MESH_TVERT 921 0.961862 0.880639 0.000000
- *MESH_TVERT 922 0.980881 0.881924 0.000000
- *MESH_TVERT 923 0.980868 0.880483 0.000000
- *MESH_TVERT 924 0.961826 0.876703 0.000000
- *MESH_TVERT 925 0.961862 0.880639 0.000000
- *MESH_TVERT 926 0.980868 0.880483 0.000000
- *MESH_TVERT 927 0.961826 0.876703 0.000000
- *MESH_TVERT 928 0.980868 0.880483 0.000000
- *MESH_TVERT 929 0.980831 0.876547 0.000000
- *MESH_TVERT 930 0.961776 0.871327 0.000000
- *MESH_TVERT 931 0.961826 0.876703 0.000000
- *MESH_TVERT 932 0.980831 0.876547 0.000000
- *MESH_TVERT 933 0.961776 0.871327 0.000000
- *MESH_TVERT 934 0.980831 0.876547 0.000000
- *MESH_TVERT 935 0.980781 0.871170 0.000000
- *MESH_TVERT 936 0.960643 0.847390 0.000000
- *MESH_TVERT 937 0.774362 0.828284 0.000000
- *MESH_TVERT 938 0.980525 0.806358 0.000000
- *MESH_TVERT 939 0.960643 0.847390 0.000000
- *MESH_TVERT 940 0.745627 0.828521 0.000000
- *MESH_TVERT 941 0.774362 0.828284 0.000000
- *MESH_TVERT 942 0.960643 0.847390 0.000000
- *MESH_TVERT 943 0.734025 0.849255 0.000000
- *MESH_TVERT 944 0.745627 0.828521 0.000000
- *MESH_TVERT 945 0.774362 0.828284 0.000000
- *MESH_TVERT 946 0.801023 0.807836 0.000000
- *MESH_TVERT 947 0.980525 0.806358 0.000000
- *MESH_TVERT 948 0.960643 0.847390 0.000000
- *MESH_TVERT 949 0.980525 0.806358 0.000000
- *MESH_TVERT 950 0.774362 0.828284 0.000000
- *MESH_TVERT 951 0.960643 0.847390 0.000000
- *MESH_TVERT 952 0.774362 0.828284 0.000000
- *MESH_TVERT 953 0.745627 0.828521 0.000000
- *MESH_TVERT 954 0.960643 0.847390 0.000000
- *MESH_TVERT 955 0.745627 0.828521 0.000000
- *MESH_TVERT 956 0.734025 0.849255 0.000000
- *MESH_TVERT 957 0.774362 0.828284 0.000000
- *MESH_TVERT 958 0.980525 0.806358 0.000000
- *MESH_TVERT 959 0.801023 0.807836 0.000000
- *MESH_TVERT 960 0.454453 0.024995 0.000000
- *MESH_TVERT 961 0.354429 0.140359 0.000000
- *MESH_TVERT 962 0.323324 0.024995 0.000000
- *MESH_TVERT 963 0.454453 0.024995 0.000000
- *MESH_TVERT 964 0.423349 0.140359 0.000000
- *MESH_TVERT 965 0.354429 0.140359 0.000000
- *MESH_TVERT 966 0.774362 0.828284 0.000000
- *MESH_TVERT 967 0.801023 0.807836 0.000000
- *MESH_TVERT 968 0.774362 0.828284 0.000000
- *MESH_TVERT 969 0.774362 0.828284 0.000000
- *MESH_TVERT 970 0.801023 0.807836 0.000000
- *MESH_TVERT 971 0.801023 0.807836 0.000000
- *MESH_TVERT 972 0.745627 0.828521 0.000000
- *MESH_TVERT 973 0.774362 0.828284 0.000000
- *MESH_TVERT 974 0.745627 0.828521 0.000000
- *MESH_TVERT 975 0.745627 0.828521 0.000000
- *MESH_TVERT 976 0.774362 0.828284 0.000000
- *MESH_TVERT 977 0.774362 0.828284 0.000000
- *MESH_TVERT 978 0.687424 0.797342 0.000000
- *MESH_TVERT 979 0.672095 0.831296 0.000000
- *MESH_TVERT 980 0.672095 0.831296 0.000000
- *MESH_TVERT 981 0.672095 0.831296 0.000000
- *MESH_TVERT 982 0.687424 0.797342 0.000000
- *MESH_TVERT 983 0.687424 0.797342 0.000000
- *MESH_TVERT 984 0.741530 0.830724 0.000000
- *MESH_TVERT 985 0.725575 0.797028 0.000000
- *MESH_TVERT 986 0.725575 0.797028 0.000000
- *MESH_TVERT 987 0.725575 0.797028 0.000000
- *MESH_TVERT 988 0.741530 0.830724 0.000000
- *MESH_TVERT 989 0.741530 0.830724 0.000000
- *MESH_TVERT 990 0.741530 0.830724 0.000000
- *MESH_TVERT 991 0.672095 0.831296 0.000000
- *MESH_TVERT 992 0.687424 0.797342 0.000000
- *MESH_TVERT 993 0.687424 0.797342 0.000000
- *MESH_TVERT 994 0.725575 0.797028 0.000000
- *MESH_TVERT 995 0.741530 0.830724 0.000000
- *MESH_TVERT 996 0.741530 0.830724 0.000000
- *MESH_TVERT 997 0.725575 0.797028 0.000000
- *MESH_TVERT 998 0.687424 0.797342 0.000000
- *MESH_TVERT 999 0.687424 0.797342 0.000000
- *MESH_TVERT 1000 0.672095 0.831296 0.000000
- *MESH_TVERT 1001 0.741530 0.830724 0.000000
- *MESH_TVERT 1002 0.537198 0.446532 0.000000
- *MESH_TVERT 1003 0.708799 0.445034 0.000000
- *MESH_TVERT 1004 0.709157 0.452047 0.000000
- *MESH_TVERT 1005 0.709157 0.452047 0.000000
- *MESH_TVERT 1006 0.537145 0.453548 0.000000
- *MESH_TVERT 1007 0.537198 0.446532 0.000000
- *MESH_TVERT 1008 0.537145 0.453548 0.000000
- *MESH_TVERT 1009 0.709157 0.452047 0.000000
- *MESH_TVERT 1010 0.708799 0.445034 0.000000
- *MESH_TVERT 1011 0.708799 0.445034 0.000000
- *MESH_TVERT 1012 0.537198 0.446532 0.000000
- *MESH_TVERT 1013 0.537145 0.453548 0.000000
- *MESH_TVERT 1014 0.537198 0.446532 0.000000
- *MESH_TVERT 1015 0.708799 0.445034 0.000000
- *MESH_TVERT 1016 0.708799 0.445034 0.000000
- *MESH_TVERT 1017 0.708799 0.445034 0.000000
- *MESH_TVERT 1018 0.537198 0.446532 0.000000
- *MESH_TVERT 1019 0.537198 0.446532 0.000000
- *MESH_TVERT 1020 0.537145 0.453548 0.000000
- *MESH_TVERT 1021 0.545496 0.453475 0.000000
- *MESH_TVERT 1022 0.709157 0.452047 0.000000
- *MESH_TVERT 1023 0.545496 0.453475 0.000000
- *MESH_TVERT 1024 0.709157 0.452047 0.000000
- *MESH_TVERT 1025 0.709157 0.452047 0.000000
- *MESH_TVERT 1026 0.537145 0.453548 0.000000
- *MESH_TVERT 1027 0.537145 0.453548 0.000000
- *MESH_TVERT 1028 0.545496 0.453475 0.000000
- *MESH_TVERT 1029 0.537198 0.446532 0.000000
- *MESH_TVERT 1030 0.537145 0.453548 0.000000
- *MESH_TVERT 1031 0.537145 0.453548 0.000000
- *MESH_TVERT 1032 0.537198 0.446532 0.000000
- *MESH_TVERT 1033 0.539797 0.100298 0.000000
- *MESH_TVERT 1034 0.537145 0.453548 0.000000
- *MESH_TVERT 1035 0.537198 0.446532 0.000000
- *MESH_TVERT 1036 0.539797 0.100298 0.000000
- *MESH_TVERT 1037 0.539797 0.100298 0.000000
- *MESH_TVERT 1038 0.537198 0.446532 0.000000
- *MESH_TVERT 1039 0.537198 0.446532 0.000000
- *MESH_TVERT 1040 0.539797 0.100298 0.000000
- *MESH_TVERT 1041 0.537198 0.446532 0.000000
- *MESH_TVERT 1042 0.537145 0.453548 0.000000
- *MESH_TVERT 1043 0.539797 0.100298 0.000000
- *MESH_TVERT 1044 0.537198 0.446532 0.000000
- *MESH_TVERT 1045 0.537145 0.453548 0.000000
- *MESH_TVERT 1046 0.537145 0.453548 0.000000
- *MESH_TVERT 1047 0.539797 0.100298 0.000000
- *MESH_TVERT 1048 0.544608 0.351564 0.000000
- *MESH_TVERT 1049 0.542419 0.100663 0.000000
- *MESH_TVERT 1050 0.539797 0.100298 0.000000
- *MESH_TVERT 1051 0.545368 0.438633 0.000000
- *MESH_TVERT 1052 0.544608 0.351564 0.000000
- *MESH_TVERT 1053 0.539797 0.100298 0.000000
- *MESH_TVERT 1054 0.545458 0.448978 0.000000
- *MESH_TVERT 1055 0.545368 0.438633 0.000000
- *MESH_TVERT 1056 0.539797 0.100298 0.000000
- *MESH_TVERT 1057 0.545498 0.453475 0.000000
- *MESH_TVERT 1058 0.545458 0.448978 0.000000
- *MESH_TVERT 1059 0.539797 0.100298 0.000000
- *MESH_TVERT 1060 0.537145 0.453548 0.000000
- *MESH_TVERT 1061 0.545498 0.453475 0.000000
- *MESH_TVERT 1062 0.544608 0.351564 0.000000
- *MESH_TVERT 1063 0.562761 0.103494 0.000000
- *MESH_TVERT 1064 0.542419 0.100663 0.000000
- *MESH_TVERT 1065 0.537145 0.453548 0.000000
- *MESH_TVERT 1066 0.545457 0.448978 0.000000
- *MESH_TVERT 1067 0.545496 0.453475 0.000000
- *MESH_TVERT 1068 0.537145 0.453548 0.000000
- *MESH_TVERT 1069 0.545367 0.438635 0.000000
- *MESH_TVERT 1070 0.545457 0.448978 0.000000
- *MESH_TVERT 1071 0.537145 0.453548 0.000000
- *MESH_TVERT 1072 0.544607 0.351576 0.000000
- *MESH_TVERT 1073 0.545367 0.438635 0.000000
- *MESH_TVERT 1074 0.537145 0.453548 0.000000
- *MESH_TVERT 1075 0.542418 0.100663 0.000000
- *MESH_TVERT 1076 0.544607 0.351576 0.000000
- *MESH_TVERT 1077 0.537145 0.453548 0.000000
- *MESH_TVERT 1078 0.539797 0.100298 0.000000
- *MESH_TVERT 1079 0.542418 0.100663 0.000000
- *MESH_TVERT 1080 0.542418 0.100663 0.000000
- *MESH_TVERT 1081 0.562761 0.103494 0.000000
- *MESH_TVERT 1082 0.544607 0.351576 0.000000
- *MESH_TVERT 1083 0.662694 0.384524 0.000000
- *MESH_TVERT 1084 0.545496 0.453475 0.000000
- *MESH_TVERT 1085 0.545457 0.448978 0.000000
- *MESH_TVERT 1086 0.662694 0.384524 0.000000
- *MESH_TVERT 1087 0.709157 0.452047 0.000000
- *MESH_TVERT 1088 0.545496 0.453475 0.000000
- *MESH_TVERT 1089 0.662694 0.384524 0.000000
- *MESH_TVERT 1090 0.705697 0.384149 0.000000
- *MESH_TVERT 1091 0.709157 0.452047 0.000000
- *MESH_TVERT 1092 0.662694 0.384524 0.000000
- *MESH_TVERT 1093 0.604883 0.330686 0.000000
- *MESH_TVERT 1094 0.656516 0.333632 0.000000
- *MESH_TVERT 1095 0.662694 0.384524 0.000000
- *MESH_TVERT 1096 0.545367 0.438635 0.000000
- *MESH_TVERT 1097 0.604883 0.330686 0.000000
- *MESH_TVERT 1098 0.662694 0.384524 0.000000
- *MESH_TVERT 1099 0.545457 0.448978 0.000000
- *MESH_TVERT 1100 0.545367 0.438635 0.000000
- *MESH_TVERT 1101 0.544607 0.351576 0.000000
- *MESH_TVERT 1102 0.604883 0.330686 0.000000
- *MESH_TVERT 1103 0.545367 0.438635 0.000000
- *MESH_TVERT 1104 0.544607 0.351576 0.000000
- *MESH_TVERT 1105 0.602927 0.106540 0.000000
- *MESH_TVERT 1106 0.604883 0.330686 0.000000
- *MESH_TVERT 1107 0.544607 0.351576 0.000000
- *MESH_TVERT 1108 0.562761 0.103494 0.000000
- *MESH_TVERT 1109 0.602927 0.106540 0.000000
- *MESH_TVERT 1110 0.604883 0.330686 0.000000
- *MESH_TVERT 1111 0.562761 0.103494 0.000000
- *MESH_TVERT 1112 0.545368 0.438633 0.000000
- *MESH_TVERT 1113 0.562761 0.103494 0.000000
- *MESH_TVERT 1114 0.544608 0.351564 0.000000
- *MESH_TVERT 1115 0.545368 0.438633 0.000000
- *MESH_TVERT 1116 0.604883 0.330686 0.000000
- *MESH_TVERT 1117 0.602927 0.106540 0.000000
- *MESH_TVERT 1118 0.562761 0.103494 0.000000
- *MESH_TVERT 1119 0.604883 0.330686 0.000000
- *MESH_TVERT 1120 0.662694 0.384524 0.000000
- *MESH_TVERT 1121 0.656516 0.333632 0.000000
- *MESH_TVERT 1122 0.604883 0.330686 0.000000
- *MESH_TVERT 1123 0.545458 0.448978 0.000000
- *MESH_TVERT 1124 0.662694 0.384524 0.000000
- *MESH_TVERT 1125 0.604883 0.330686 0.000000
- *MESH_TVERT 1126 0.545368 0.438633 0.000000
- *MESH_TVERT 1127 0.545458 0.448978 0.000000
- *MESH_TVERT 1128 0.662694 0.384524 0.000000
- *MESH_TVERT 1129 0.709157 0.452047 0.000000
- *MESH_TVERT 1130 0.705697 0.384149 0.000000
- *MESH_TVERT 1131 0.662694 0.384524 0.000000
- *MESH_TVERT 1132 0.545498 0.453475 0.000000
- *MESH_TVERT 1133 0.709157 0.452047 0.000000
- *MESH_TVERT 1134 0.662694 0.384524 0.000000
- *MESH_TVERT 1135 0.545458 0.448978 0.000000
- *MESH_TVERT 1136 0.545498 0.453475 0.000000
- *MESH_TVERT 1137 0.709157 0.452047 0.000000
- *MESH_TVERT 1138 0.709157 0.452047 0.000000
- *MESH_TVERT 1139 0.537145 0.453548 0.000000
- *MESH_TVERT 1140 0.709157 0.452047 0.000000
- *MESH_TVERT 1141 0.545498 0.453475 0.000000
- *MESH_TVERT 1142 0.537145 0.453548 0.000000
- *MESH_TVERT 1143 0.545498 0.453475 0.000000
- *MESH_TVERT 1144 0.537145 0.453548 0.000000
- *MESH_TVERT 1145 0.537145 0.453548 0.000000
- *MESH_TVERT 1146 0.006532 0.862621 0.000000
- *MESH_TVERT 1147 0.031577 0.862415 0.000000
- *MESH_TVERT 1148 0.031577 0.862415 0.000000
- *MESH_TVERT 1149 0.031577 0.862415 0.000000
- *MESH_TVERT 1150 0.006532 0.862621 0.000000
- *MESH_TVERT 1151 0.006532 0.862621 0.000000
- *MESH_TVERT 1152 0.002933 0.834659 0.000000
- *MESH_TVERT 1153 0.006532 0.862621 0.000000
- *MESH_TVERT 1154 0.006532 0.862621 0.000000
- *MESH_TVERT 1155 0.006532 0.862621 0.000000
- *MESH_TVERT 1156 0.002933 0.834659 0.000000
- *MESH_TVERT 1157 0.002933 0.834659 0.000000
- *MESH_TVERT 1158 0.604883 0.330686 0.000000
- *MESH_TVERT 1159 0.656516 0.333632 0.000000
- *MESH_TVERT 1160 0.656516 0.333632 0.000000
- *MESH_TVERT 1161 0.656516 0.333632 0.000000
- *MESH_TVERT 1162 0.604883 0.330686 0.000000
- *MESH_TVERT 1163 0.604883 0.330686 0.000000
- *MESH_TVERT 1164 0.602927 0.106540 0.000000
- *MESH_TVERT 1165 0.604883 0.330686 0.000000
- *MESH_TVERT 1166 0.604883 0.330686 0.000000
- *MESH_TVERT 1167 0.604883 0.330686 0.000000
- *MESH_TVERT 1168 0.602927 0.106540 0.000000
- *MESH_TVERT 1169 0.602927 0.106540 0.000000
- *MESH_TVERT 1170 0.562761 0.103494 0.000000
- *MESH_TVERT 1171 0.602927 0.106540 0.000000
- *MESH_TVERT 1172 0.602927 0.106540 0.000000
- *MESH_TVERT 1173 0.602927 0.106540 0.000000
- *MESH_TVERT 1174 0.562761 0.103494 0.000000
- *MESH_TVERT 1175 0.562761 0.103494 0.000000
- *MESH_TVERT 1176 0.539797 0.100298 0.000000
- *MESH_TVERT 1177 0.542418 0.100663 0.000000
- *MESH_TVERT 1178 0.539797 0.100298 0.000000
- *MESH_TVERT 1179 0.539797 0.100298 0.000000
- *MESH_TVERT 1180 0.562761 0.103494 0.000000
- *MESH_TVERT 1181 0.542418 0.100663 0.000000
- *MESH_TVERT 1182 0.562761 0.103494 0.000000
- *MESH_TVERT 1183 0.562761 0.103494 0.000000
- *MESH_TVERT 1184 0.542418 0.100663 0.000000
- *MESH_TVERT 1185 0.539797 0.100298 0.000000
- *MESH_TVERT 1186 0.542419 0.100663 0.000000
- *MESH_TVERT 1187 0.562761 0.103494 0.000000
- *MESH_TVERT 1188 0.533788 0.790737 0.000000
- *MESH_TVERT 1189 0.533653 0.776088 0.000000
- *MESH_TVERT 1190 0.533788 0.790737 0.000000
- *MESH_TVERT 1191 0.533788 0.790737 0.000000
- *MESH_TVERT 1192 0.533553 0.765365 0.000000
- *MESH_TVERT 1193 0.533653 0.776088 0.000000
- *MESH_TVERT 1194 0.533788 0.790737 0.000000
- *MESH_TVERT 1195 0.533517 0.761440 0.000000
- *MESH_TVERT 1196 0.533553 0.765365 0.000000
- *MESH_TVERT 1197 0.533788 0.790737 0.000000
- *MESH_TVERT 1198 0.533554 0.765365 0.000000
- *MESH_TVERT 1199 0.533517 0.761440 0.000000
- *MESH_TVERT 1200 0.533788 0.790737 0.000000
- *MESH_TVERT 1201 0.533653 0.776088 0.000000
- *MESH_TVERT 1202 0.533554 0.765365 0.000000
- *MESH_TVERT 1203 0.533788 0.790737 0.000000
- *MESH_TVERT 1204 0.533788 0.790737 0.000000
- *MESH_TVERT 1205 0.533653 0.776088 0.000000
- *MESH_TVERT 1206 0.533788 0.790737 0.000000
- *MESH_TVERT 1207 0.533924 0.805386 0.000000
- *MESH_TVERT 1208 0.533788 0.790737 0.000000
- *MESH_TVERT 1209 0.533788 0.790737 0.000000
- *MESH_TVERT 1210 0.534023 0.816109 0.000000
- *MESH_TVERT 1211 0.533924 0.805386 0.000000
- *MESH_TVERT 1212 0.533788 0.790737 0.000000
- *MESH_TVERT 1213 0.534059 0.820035 0.000000
- *MESH_TVERT 1214 0.534023 0.816109 0.000000
- *MESH_TVERT 1215 0.533788 0.790737 0.000000
- *MESH_TVERT 1216 0.534023 0.816110 0.000000
- *MESH_TVERT 1217 0.534059 0.820035 0.000000
- *MESH_TVERT 1218 0.533788 0.790737 0.000000
- *MESH_TVERT 1219 0.533924 0.805386 0.000000
- *MESH_TVERT 1220 0.534023 0.816110 0.000000
- *MESH_TVERT 1221 0.533788 0.790737 0.000000
- *MESH_TVERT 1222 0.533788 0.790737 0.000000
- *MESH_TVERT 1223 0.533924 0.805386 0.000000
- *MESH_TVERT 1224 0.760532 0.774220 0.000000
- *MESH_TVERT 1225 0.760667 0.788869 0.000000
- *MESH_TVERT 1226 0.533788 0.790737 0.000000
- *MESH_TVERT 1227 0.760532 0.774220 0.000000
- *MESH_TVERT 1228 0.533788 0.790737 0.000000
- *MESH_TVERT 1229 0.533653 0.776088 0.000000
- *MESH_TVERT 1230 0.760433 0.763497 0.000000
- *MESH_TVERT 1231 0.760532 0.774220 0.000000
- *MESH_TVERT 1232 0.533653 0.776088 0.000000
- *MESH_TVERT 1233 0.760433 0.763497 0.000000
- *MESH_TVERT 1234 0.533653 0.776088 0.000000
- *MESH_TVERT 1235 0.533553 0.765365 0.000000
- *MESH_TVERT 1236 0.760397 0.759571 0.000000
- *MESH_TVERT 1237 0.760433 0.763497 0.000000
- *MESH_TVERT 1238 0.533553 0.765365 0.000000
- *MESH_TVERT 1239 0.760397 0.759571 0.000000
- *MESH_TVERT 1240 0.533553 0.765365 0.000000
- *MESH_TVERT 1241 0.533517 0.761440 0.000000
- *MESH_TVERT 1242 0.760433 0.763497 0.000000
- *MESH_TVERT 1243 0.760397 0.759571 0.000000
- *MESH_TVERT 1244 0.533517 0.761440 0.000000
- *MESH_TVERT 1245 0.760433 0.763497 0.000000
- *MESH_TVERT 1246 0.533517 0.761440 0.000000
- *MESH_TVERT 1247 0.533554 0.765365 0.000000
- *MESH_TVERT 1248 0.760532 0.774220 0.000000
- *MESH_TVERT 1249 0.760433 0.763497 0.000000
- *MESH_TVERT 1250 0.533554 0.765365 0.000000
- *MESH_TVERT 1251 0.760532 0.774220 0.000000
- *MESH_TVERT 1252 0.533554 0.765365 0.000000
- *MESH_TVERT 1253 0.533653 0.776088 0.000000
- *MESH_TVERT 1254 0.760667 0.788869 0.000000
- *MESH_TVERT 1255 0.760532 0.774220 0.000000
- *MESH_TVERT 1256 0.533653 0.776088 0.000000
- *MESH_TVERT 1257 0.760667 0.788869 0.000000
- *MESH_TVERT 1258 0.533653 0.776088 0.000000
- *MESH_TVERT 1259 0.533788 0.790737 0.000000
- *MESH_TVERT 1260 0.760803 0.803518 0.000000
- *MESH_TVERT 1261 0.760667 0.788869 0.000000
- *MESH_TVERT 1262 0.533788 0.790737 0.000000
- *MESH_TVERT 1263 0.760803 0.803518 0.000000
- *MESH_TVERT 1264 0.533788 0.790737 0.000000
- *MESH_TVERT 1265 0.533924 0.805386 0.000000
- *MESH_TVERT 1266 0.760902 0.814242 0.000000
- *MESH_TVERT 1267 0.760803 0.803518 0.000000
- *MESH_TVERT 1268 0.533924 0.805386 0.000000
- *MESH_TVERT 1269 0.760902 0.814242 0.000000
- *MESH_TVERT 1270 0.533924 0.805386 0.000000
- *MESH_TVERT 1271 0.534023 0.816109 0.000000
- *MESH_TVERT 1272 0.760938 0.818167 0.000000
- *MESH_TVERT 1273 0.760902 0.814242 0.000000
- *MESH_TVERT 1274 0.534023 0.816109 0.000000
- *MESH_TVERT 1275 0.760938 0.818167 0.000000
- *MESH_TVERT 1276 0.534023 0.816109 0.000000
- *MESH_TVERT 1277 0.534059 0.820035 0.000000
- *MESH_TVERT 1278 0.760902 0.814242 0.000000
- *MESH_TVERT 1279 0.760938 0.818167 0.000000
- *MESH_TVERT 1280 0.534059 0.820035 0.000000
- *MESH_TVERT 1281 0.760902 0.814242 0.000000
- *MESH_TVERT 1282 0.534059 0.820035 0.000000
- *MESH_TVERT 1283 0.534023 0.816110 0.000000
- *MESH_TVERT 1284 0.760803 0.803518 0.000000
- *MESH_TVERT 1285 0.760902 0.814242 0.000000
- *MESH_TVERT 1286 0.534023 0.816110 0.000000
- *MESH_TVERT 1287 0.760803 0.803518 0.000000
- *MESH_TVERT 1288 0.534023 0.816110 0.000000
- *MESH_TVERT 1289 0.533924 0.805386 0.000000
- *MESH_TVERT 1290 0.760667 0.788869 0.000000
- *MESH_TVERT 1291 0.760803 0.803518 0.000000
- *MESH_TVERT 1292 0.533924 0.805386 0.000000
- *MESH_TVERT 1293 0.760667 0.788869 0.000000
- *MESH_TVERT 1294 0.533924 0.805386 0.000000
- *MESH_TVERT 1295 0.533788 0.790737 0.000000
- *MESH_TVERT 1296 0.144927 0.132015 0.000000
- *MESH_TVERT 1297 0.244809 0.081160 0.000000
- *MESH_TVERT 1298 0.260261 0.132015 0.000000
- *MESH_TVERT 1299 0.144927 0.132015 0.000000
- *MESH_TVERT 1300 0.202594 0.033996 0.000000
- *MESH_TVERT 1301 0.244809 0.081160 0.000000
- *MESH_TVERT 1302 0.144927 0.132015 0.000000
- *MESH_TVERT 1303 0.144928 0.020436 0.000000
- *MESH_TVERT 1304 0.202594 0.033996 0.000000
- *MESH_TVERT 1305 0.144927 0.132015 0.000000
- *MESH_TVERT 1306 0.087261 0.033996 0.000000
- *MESH_TVERT 1307 0.144928 0.020436 0.000000
- *MESH_TVERT 1308 0.144927 0.132015 0.000000
- *MESH_TVERT 1309 0.045046 0.081160 0.000000
- *MESH_TVERT 1310 0.087261 0.033996 0.000000
- *MESH_TVERT 1311 0.144927 0.132015 0.000000
- *MESH_TVERT 1312 0.029594 0.132015 0.000000
- *MESH_TVERT 1313 0.045046 0.081160 0.000000
- *MESH_TVERT 1314 0.144927 0.132015 0.000000
- *MESH_TVERT 1315 0.045046 0.189627 0.000000
- *MESH_TVERT 1316 0.029594 0.132015 0.000000
- *MESH_TVERT 1317 0.144927 0.132015 0.000000
- *MESH_TVERT 1318 0.087261 0.232716 0.000000
- *MESH_TVERT 1319 0.045046 0.189627 0.000000
- *MESH_TVERT 1320 0.144927 0.132015 0.000000
- *MESH_TVERT 1321 0.144927 0.245794 0.000000
- *MESH_TVERT 1322 0.087261 0.232716 0.000000
- *MESH_TVERT 1323 0.144927 0.132015 0.000000
- *MESH_TVERT 1324 0.202594 0.232716 0.000000
- *MESH_TVERT 1325 0.144927 0.245794 0.000000
- *MESH_TVERT 1326 0.144927 0.132015 0.000000
- *MESH_TVERT 1327 0.244809 0.189627 0.000000
- *MESH_TVERT 1328 0.202594 0.232716 0.000000
- *MESH_TVERT 1329 0.144927 0.132015 0.000000
- *MESH_TVERT 1330 0.260261 0.132015 0.000000
- *MESH_TVERT 1331 0.244809 0.189627 0.000000
- *MESH_TVERT 1332 0.185459 0.853537 0.000000
- *MESH_TVERT 1333 0.185576 0.866151 0.000000
- *MESH_TVERT 1334 0.963510 0.859746 0.000000
- *MESH_TVERT 1335 0.185459 0.853537 0.000000
- *MESH_TVERT 1336 0.963510 0.859746 0.000000
- *MESH_TVERT 1337 0.963394 0.847132 0.000000
- *MESH_TVERT 1338 0.185351 0.841838 0.000000
- *MESH_TVERT 1339 0.185459 0.853537 0.000000
- *MESH_TVERT 1340 0.963394 0.847132 0.000000
- *MESH_TVERT 1341 0.185351 0.841838 0.000000
- *MESH_TVERT 1342 0.963394 0.847132 0.000000
- *MESH_TVERT 1343 0.963285 0.835433 0.000000
- *MESH_TVERT 1344 0.185320 0.838474 0.000000
- *MESH_TVERT 1345 0.185351 0.841838 0.000000
- *MESH_TVERT 1346 0.963285 0.835433 0.000000
- *MESH_TVERT 1347 0.185320 0.838474 0.000000
- *MESH_TVERT 1348 0.963285 0.835433 0.000000
- *MESH_TVERT 1349 0.963254 0.832070 0.000000
- *MESH_TVERT 1350 0.185351 0.841838 0.000000
- *MESH_TVERT 1351 0.185320 0.838474 0.000000
- *MESH_TVERT 1352 0.963254 0.832070 0.000000
- *MESH_TVERT 1353 0.185351 0.841838 0.000000
- *MESH_TVERT 1354 0.963254 0.832070 0.000000
- *MESH_TVERT 1355 0.963285 0.835433 0.000000
- *MESH_TVERT 1356 0.185459 0.853537 0.000000
- *MESH_TVERT 1357 0.185351 0.841838 0.000000
- *MESH_TVERT 1358 0.963285 0.835433 0.000000
- *MESH_TVERT 1359 0.185459 0.853537 0.000000
- *MESH_TVERT 1360 0.963285 0.835433 0.000000
- *MESH_TVERT 1361 0.963394 0.847132 0.000000
- *MESH_TVERT 1362 0.185576 0.866151 0.000000
- *MESH_TVERT 1363 0.185459 0.853537 0.000000
- *MESH_TVERT 1364 0.963394 0.847132 0.000000
- *MESH_TVERT 1365 0.185576 0.866151 0.000000
- *MESH_TVERT 1366 0.963394 0.847132 0.000000
- *MESH_TVERT 1367 0.963510 0.859746 0.000000
- *MESH_TVERT 1368 0.185708 0.880441 0.000000
- *MESH_TVERT 1369 0.185576 0.866151 0.000000
- *MESH_TVERT 1370 0.963510 0.859746 0.000000
- *MESH_TVERT 1371 0.185708 0.880441 0.000000
- *MESH_TVERT 1372 0.963510 0.859746 0.000000
- *MESH_TVERT 1373 0.963642 0.874037 0.000000
- *MESH_TVERT 1374 0.185807 0.891129 0.000000
- *MESH_TVERT 1375 0.185708 0.880441 0.000000
- *MESH_TVERT 1376 0.963642 0.874037 0.000000
- *MESH_TVERT 1377 0.185807 0.891129 0.000000
- *MESH_TVERT 1378 0.963642 0.874037 0.000000
- *MESH_TVERT 1379 0.963741 0.884725 0.000000
- *MESH_TVERT 1380 0.185837 0.894373 0.000000
- *MESH_TVERT 1381 0.185807 0.891129 0.000000
- *MESH_TVERT 1382 0.963741 0.884725 0.000000
- *MESH_TVERT 1383 0.185837 0.894373 0.000000
- *MESH_TVERT 1384 0.963741 0.884725 0.000000
- *MESH_TVERT 1385 0.963771 0.887969 0.000000
- *MESH_TVERT 1386 0.185807 0.891129 0.000000
- *MESH_TVERT 1387 0.185837 0.894373 0.000000
- *MESH_TVERT 1388 0.963771 0.887969 0.000000
- *MESH_TVERT 1389 0.185807 0.891129 0.000000
- *MESH_TVERT 1390 0.963771 0.887969 0.000000
- *MESH_TVERT 1391 0.963741 0.884725 0.000000
- *MESH_TVERT 1392 0.185708 0.880441 0.000000
- *MESH_TVERT 1393 0.185807 0.891129 0.000000
- *MESH_TVERT 1394 0.963741 0.884725 0.000000
- *MESH_TVERT 1395 0.185708 0.880441 0.000000
- *MESH_TVERT 1396 0.963741 0.884725 0.000000
- *MESH_TVERT 1397 0.963642 0.874037 0.000000
- *MESH_TVERT 1398 0.185576 0.866151 0.000000
- *MESH_TVERT 1399 0.185708 0.880441 0.000000
- *MESH_TVERT 1400 0.963642 0.874037 0.000000
- *MESH_TVERT 1401 0.185576 0.866151 0.000000
- *MESH_TVERT 1402 0.963642 0.874037 0.000000
- *MESH_TVERT 1403 0.963510 0.859746 0.000000
- *MESH_TVERT 1404 0.336249 0.769371 0.000000
- *MESH_TVERT 1405 0.326099 0.789209 0.000000
- *MESH_TVERT 1406 0.330256 0.768205 0.000000
- *MESH_TVERT 1407 0.336249 0.769371 0.000000
- *MESH_TVERT 1408 0.339162 0.790317 0.000000
- *MESH_TVERT 1409 0.326099 0.789209 0.000000
- *MESH_TVERT 1410 0.330256 0.768205 0.000000
- *MESH_TVERT 1411 0.337709 0.750820 0.000000
- *MESH_TVERT 1412 0.336249 0.769371 0.000000
- *MESH_TVERT 1413 0.336249 0.769371 0.000000
- *MESH_TVERT 1414 0.330256 0.768205 0.000000
- *MESH_TVERT 1415 0.326099 0.789209 0.000000
- *MESH_TVERT 1416 0.336249 0.769371 0.000000
- *MESH_TVERT 1417 0.326099 0.789209 0.000000
- *MESH_TVERT 1418 0.339162 0.790317 0.000000
- *MESH_TVERT 1419 0.330256 0.768205 0.000000
- *MESH_TVERT 1420 0.336249 0.769371 0.000000
- *MESH_TVERT 1421 0.337709 0.750820 0.000000
- *MESH_TVERT 1422 0.336249 0.769371 0.000000
- *MESH_TVERT 1423 0.339162 0.790317 0.000000
- *MESH_TVERT 1424 0.336249 0.769371 0.000000
- *MESH_TVERT 1425 0.336249 0.769371 0.000000
- *MESH_TVERT 1426 0.339162 0.790317 0.000000
- *MESH_TVERT 1427 0.339162 0.790317 0.000000
- *MESH_TVERT 1428 0.337709 0.750820 0.000000
- *MESH_TVERT 1429 0.336249 0.769371 0.000000
- *MESH_TVERT 1430 0.337709 0.750820 0.000000
- *MESH_TVERT 1431 0.337709 0.750820 0.000000
- *MESH_TVERT 1432 0.336249 0.769371 0.000000
- *MESH_TVERT 1433 0.336249 0.769371 0.000000
- *MESH_TVERT 1434 0.330256 0.768205 0.000000
- *MESH_TVERT 1435 0.337709 0.750820 0.000000
- *MESH_TVERT 1436 0.330256 0.768205 0.000000
- *MESH_TVERT 1437 0.330256 0.768205 0.000000
- *MESH_TVERT 1438 0.337709 0.750820 0.000000
- *MESH_TVERT 1439 0.337709 0.750820 0.000000
- *MESH_TVERT 1440 0.326099 0.789209 0.000000
- *MESH_TVERT 1441 0.330256 0.768205 0.000000
- *MESH_TVERT 1442 0.326099 0.789209 0.000000
- *MESH_TVERT 1443 0.326099 0.789209 0.000000
- *MESH_TVERT 1444 0.330256 0.768205 0.000000
- *MESH_TVERT 1445 0.330256 0.768205 0.000000
- *MESH_TVERT 1446 0.390102 0.751134 0.000000
- *MESH_TVERT 1447 0.461788 0.708571 0.000000
- *MESH_TVERT 1448 0.397050 0.765586 0.000000
- *MESH_TVERT 1449 0.461788 0.708571 0.000000
- *MESH_TVERT 1450 0.473058 0.720945 0.000000
- *MESH_TVERT 1451 0.397050 0.765586 0.000000
- *MESH_TVERT 1452 0.473058 0.720945 0.000000
- *MESH_TVERT 1453 0.473509 0.769675 0.000000
- *MESH_TVERT 1454 0.397050 0.765586 0.000000
- *MESH_TVERT 1455 0.390102 0.751134 0.000000
- *MESH_TVERT 1456 0.374082 0.736921 0.000000
- *MESH_TVERT 1457 0.461788 0.708571 0.000000
- *MESH_TVERT 1458 0.374082 0.736921 0.000000
- *MESH_TVERT 1459 0.461442 0.671173 0.000000
- *MESH_TVERT 1460 0.461788 0.708571 0.000000
- *MESH_TVERT 1461 0.374082 0.736921 0.000000
- *MESH_TVERT 1462 0.370197 0.564256 0.000000
- *MESH_TVERT 1463 0.461442 0.671173 0.000000
- *MESH_TVERT 1464 0.370197 0.564256 0.000000
- *MESH_TVERT 1465 0.466530 0.563463 0.000000
- *MESH_TVERT 1466 0.461442 0.671173 0.000000
- *MESH_TVERT 1467 0.466530 0.563463 0.000000
- *MESH_TVERT 1468 0.497948 0.670873 0.000000
- *MESH_TVERT 1469 0.461442 0.671173 0.000000
- *MESH_TVERT 1470 0.466530 0.563463 0.000000
- *MESH_TVERT 1471 0.535887 0.715894 0.000000
- *MESH_TVERT 1472 0.497948 0.670873 0.000000
- *MESH_TVERT 1473 0.466530 0.563463 0.000000
- *MESH_TVERT 1474 0.554129 0.714611 0.000000
- *MESH_TVERT 1475 0.535887 0.715894 0.000000
- *MESH_TVERT 1476 0.390102 0.751134 0.000000
- *MESH_TVERT 1477 0.397050 0.765586 0.000000
- *MESH_TVERT 1478 0.461788 0.708571 0.000000
- *MESH_TVERT 1479 0.461788 0.708571 0.000000
- *MESH_TVERT 1480 0.397050 0.765586 0.000000
- *MESH_TVERT 1481 0.473058 0.720945 0.000000
- *MESH_TVERT 1482 0.473058 0.720945 0.000000
- *MESH_TVERT 1483 0.397050 0.765586 0.000000
- *MESH_TVERT 1484 0.473509 0.769675 0.000000
- *MESH_TVERT 1485 0.390102 0.751134 0.000000
- *MESH_TVERT 1486 0.461788 0.708571 0.000000
- *MESH_TVERT 1487 0.374082 0.736921 0.000000
- *MESH_TVERT 1488 0.374082 0.736921 0.000000
- *MESH_TVERT 1489 0.461788 0.708571 0.000000
- *MESH_TVERT 1490 0.461442 0.671173 0.000000
- *MESH_TVERT 1491 0.374082 0.736921 0.000000
- *MESH_TVERT 1492 0.461442 0.671173 0.000000
- *MESH_TVERT 1493 0.370197 0.564256 0.000000
- *MESH_TVERT 1494 0.370197 0.564256 0.000000
- *MESH_TVERT 1495 0.461442 0.671173 0.000000
- *MESH_TVERT 1496 0.466530 0.563463 0.000000
- *MESH_TVERT 1497 0.466530 0.563463 0.000000
- *MESH_TVERT 1498 0.461442 0.671173 0.000000
- *MESH_TVERT 1499 0.497948 0.670873 0.000000
- *MESH_TVERT 1500 0.466530 0.563463 0.000000
- *MESH_TVERT 1501 0.497948 0.670873 0.000000
- *MESH_TVERT 1502 0.535887 0.715894 0.000000
- *MESH_TVERT 1503 0.466530 0.563463 0.000000
- *MESH_TVERT 1504 0.535887 0.715894 0.000000
- *MESH_TVERT 1505 0.554129 0.714611 0.000000
- *MESH_TVERT 1506 0.425023 0.402021 0.000000
- *MESH_TVERT 1507 0.390189 0.201104 0.000000
- *MESH_TVERT 1508 0.390189 0.402021 0.000000
- *MESH_TVERT 1509 0.425023 0.402021 0.000000
- *MESH_TVERT 1510 0.425023 0.201104 0.000000
- *MESH_TVERT 1511 0.390189 0.201104 0.000000
- *MESH_TVERT 1512 0.390102 0.751134 0.000000
- *MESH_TVERT 1513 0.374082 0.736921 0.000000
- *MESH_TVERT 1514 0.390102 0.751134 0.000000
- *MESH_TVERT 1515 0.390102 0.751134 0.000000
- *MESH_TVERT 1516 0.374082 0.736921 0.000000
- *MESH_TVERT 1517 0.374082 0.736921 0.000000
- *MESH_TVERT 1518 0.397050 0.765586 0.000000
- *MESH_TVERT 1519 0.390102 0.751134 0.000000
- *MESH_TVERT 1520 0.397050 0.765586 0.000000
- *MESH_TVERT 1521 0.397050 0.765586 0.000000
- *MESH_TVERT 1522 0.390102 0.751134 0.000000
- *MESH_TVERT 1523 0.390102 0.751134 0.000000
- *MESH_TVERT 1524 0.473509 0.769675 0.000000
- *MESH_TVERT 1525 0.397050 0.765586 0.000000
- *MESH_TVERT 1526 0.473509 0.769675 0.000000
- *MESH_TVERT 1527 0.473509 0.769675 0.000000
- *MESH_TVERT 1528 0.397050 0.765586 0.000000
- *MESH_TVERT 1529 0.397050 0.765586 0.000000
- *MESH_TVERT 1530 0.473058 0.720945 0.000000
- *MESH_TVERT 1531 0.473509 0.769675 0.000000
- *MESH_TVERT 1532 0.473058 0.720945 0.000000
- *MESH_TVERT 1533 0.473058 0.720945 0.000000
- *MESH_TVERT 1534 0.473509 0.769675 0.000000
- *MESH_TVERT 1535 0.473509 0.769675 0.000000
- *MESH_TVERT 1536 0.461788 0.708571 0.000000
- *MESH_TVERT 1537 0.473058 0.720945 0.000000
- *MESH_TVERT 1538 0.461788 0.708571 0.000000
- *MESH_TVERT 1539 0.461788 0.708571 0.000000
- *MESH_TVERT 1540 0.473058 0.720945 0.000000
- *MESH_TVERT 1541 0.473058 0.720945 0.000000
- *MESH_TVERT 1542 0.461442 0.671173 0.000000
- *MESH_TVERT 1543 0.461788 0.708571 0.000000
- *MESH_TVERT 1544 0.461442 0.671173 0.000000
- *MESH_TVERT 1545 0.461442 0.671173 0.000000
- *MESH_TVERT 1546 0.461788 0.708571 0.000000
- *MESH_TVERT 1547 0.461788 0.708571 0.000000
- *MESH_TVERT 1548 0.497948 0.670873 0.000000
- *MESH_TVERT 1549 0.461442 0.671173 0.000000
- *MESH_TVERT 1550 0.497948 0.670873 0.000000
- *MESH_TVERT 1551 0.497948 0.670873 0.000000
- *MESH_TVERT 1552 0.461442 0.671173 0.000000
- *MESH_TVERT 1553 0.461442 0.671173 0.000000
- *MESH_TVERT 1554 0.535887 0.715894 0.000000
- *MESH_TVERT 1555 0.497948 0.670873 0.000000
- *MESH_TVERT 1556 0.535887 0.715894 0.000000
- *MESH_TVERT 1557 0.535887 0.715894 0.000000
- *MESH_TVERT 1558 0.497948 0.670873 0.000000
- *MESH_TVERT 1559 0.497948 0.670873 0.000000
- *MESH_TVERT 1560 0.554129 0.714611 0.000000
- *MESH_TVERT 1561 0.535887 0.715894 0.000000
- *MESH_TVERT 1562 0.554129 0.714611 0.000000
- *MESH_TVERT 1563 0.554129 0.714611 0.000000
- *MESH_TVERT 1564 0.535887 0.715894 0.000000
- *MESH_TVERT 1565 0.535887 0.715894 0.000000
- *MESH_TVERT 1566 0.425023 0.201104 0.000000
- *MESH_TVERT 1567 0.390189 0.377789 0.000000
- *MESH_TVERT 1568 0.390189 0.201104 0.000000
- *MESH_TVERT 1569 0.425023 0.201104 0.000000
- *MESH_TVERT 1570 0.425023 0.377789 0.000000
- *MESH_TVERT 1571 0.390189 0.377789 0.000000
- *MESH_TVERT 1572 0.967623 0.626291 0.000000
- *MESH_TVERT 1573 0.529962 0.513806 0.000000
- *MESH_TVERT 1574 0.967623 0.513806 0.000000
- *MESH_TVERT 1575 0.967623 0.626291 0.000000
- *MESH_TVERT 1576 0.529962 0.626291 0.000000
- *MESH_TVERT 1577 0.529962 0.513806 0.000000
- *MESH_TVERT 1578 0.757889 0.708043 0.000000
- *MESH_TVERT 1579 0.758226 0.744506 0.000000
- *MESH_TVERT 1580 0.757932 0.712704 0.000000
- *MESH_TVERT 1581 0.757889 0.708043 0.000000
- *MESH_TVERT 1582 0.758402 0.763477 0.000000
- *MESH_TVERT 1583 0.758226 0.744506 0.000000
- *MESH_TVERT 1584 0.757889 0.708043 0.000000
- *MESH_TVERT 1585 0.758628 0.787986 0.000000
- *MESH_TVERT 1586 0.758402 0.763477 0.000000
- *MESH_TVERT 1587 0.757889 0.708043 0.000000
- *MESH_TVERT 1588 0.758841 0.810870 0.000000
- *MESH_TVERT 1589 0.758628 0.787986 0.000000
- *MESH_TVERT 1590 0.757889 0.708043 0.000000
- *MESH_TVERT 1591 0.758933 0.820846 0.000000
- *MESH_TVERT 1592 0.758841 0.810870 0.000000
- *MESH_TVERT 1593 0.757889 0.708043 0.000000
- *MESH_TVERT 1594 0.758841 0.810870 0.000000
- *MESH_TVERT 1595 0.758933 0.820846 0.000000
- *MESH_TVERT 1596 0.757889 0.708043 0.000000
- *MESH_TVERT 1597 0.758629 0.787986 0.000000
- *MESH_TVERT 1598 0.758841 0.810870 0.000000
- *MESH_TVERT 1599 0.757889 0.708043 0.000000
- *MESH_TVERT 1600 0.758402 0.763477 0.000000
- *MESH_TVERT 1601 0.758629 0.787986 0.000000
- *MESH_TVERT 1602 0.757889 0.708043 0.000000
- *MESH_TVERT 1603 0.758226 0.744506 0.000000
- *MESH_TVERT 1604 0.758402 0.763477 0.000000
- *MESH_TVERT 1605 0.757889 0.708043 0.000000
- *MESH_TVERT 1606 0.757932 0.712704 0.000000
- *MESH_TVERT 1607 0.758226 0.744506 0.000000
- *MESH_TVERT 1608 0.821256 0.218661 0.000000
- *MESH_TVERT 1609 0.914073 0.154409 0.000000
- *MESH_TVERT 1610 0.928562 0.207968 0.000000
- *MESH_TVERT 1611 0.821256 0.218661 0.000000
- *MESH_TVERT 1612 0.910902 0.064632 0.000000
- *MESH_TVERT 1613 0.914073 0.154409 0.000000
- *MESH_TVERT 1614 0.821256 0.218661 0.000000
- *MESH_TVERT 1615 0.821256 0.051474 0.000000
- *MESH_TVERT 1616 0.910902 0.064632 0.000000
- *MESH_TVERT 1617 0.821256 0.218661 0.000000
- *MESH_TVERT 1618 0.731610 0.064632 0.000000
- *MESH_TVERT 1619 0.821256 0.051474 0.000000
- *MESH_TVERT 1620 0.821256 0.218661 0.000000
- *MESH_TVERT 1621 0.728439 0.154409 0.000000
- *MESH_TVERT 1622 0.731610 0.064632 0.000000
- *MESH_TVERT 1623 0.821256 0.218661 0.000000
- *MESH_TVERT 1624 0.713950 0.207968 0.000000
- *MESH_TVERT 1625 0.728439 0.154409 0.000000
- *MESH_TVERT 1626 0.821256 0.218661 0.000000
- *MESH_TVERT 1627 0.693085 0.277155 0.000000
- *MESH_TVERT 1628 0.713950 0.207968 0.000000
- *MESH_TVERT 1629 0.821256 0.218661 0.000000
- *MESH_TVERT 1630 0.722067 0.341758 0.000000
- *MESH_TVERT 1631 0.693085 0.277155 0.000000
- *MESH_TVERT 1632 0.821256 0.218661 0.000000
- *MESH_TVERT 1633 0.821256 0.369922 0.000000
- *MESH_TVERT 1634 0.722067 0.341758 0.000000
- *MESH_TVERT 1635 0.821256 0.218661 0.000000
- *MESH_TVERT 1636 0.920445 0.341758 0.000000
- *MESH_TVERT 1637 0.821256 0.369922 0.000000
- *MESH_TVERT 1638 0.821256 0.218661 0.000000
- *MESH_TVERT 1639 0.949427 0.277155 0.000000
- *MESH_TVERT 1640 0.920445 0.341758 0.000000
- *MESH_TVERT 1641 0.821256 0.218661 0.000000
- *MESH_TVERT 1642 0.928562 0.207968 0.000000
- *MESH_TVERT 1643 0.949427 0.277155 0.000000
- *MESH_TVERT 1644 0.758226 0.744506 0.000000
- *MESH_TVERT 1645 0.758402 0.763477 0.000000
- *MESH_TVERT 1646 0.987165 0.761594 0.000000
- *MESH_TVERT 1647 0.758226 0.744506 0.000000
- *MESH_TVERT 1648 0.987165 0.761594 0.000000
- *MESH_TVERT 1649 0.986989 0.742622 0.000000
- *MESH_TVERT 1650 0.757932 0.712704 0.000000
- *MESH_TVERT 1651 0.758226 0.744506 0.000000
- *MESH_TVERT 1652 0.986989 0.742622 0.000000
- *MESH_TVERT 1653 0.757932 0.712704 0.000000
- *MESH_TVERT 1654 0.986989 0.742622 0.000000
- *MESH_TVERT 1655 0.986696 0.710821 0.000000
- *MESH_TVERT 1656 0.757889 0.708043 0.000000
- *MESH_TVERT 1657 0.757932 0.712704 0.000000
- *MESH_TVERT 1658 0.986696 0.710821 0.000000
- *MESH_TVERT 1659 0.757889 0.708043 0.000000
- *MESH_TVERT 1660 0.986696 0.710821 0.000000
- *MESH_TVERT 1661 0.986652 0.706160 0.000000
- *MESH_TVERT 1662 0.757932 0.712704 0.000000
- *MESH_TVERT 1663 0.757889 0.708043 0.000000
- *MESH_TVERT 1664 0.986652 0.706160 0.000000
- *MESH_TVERT 1665 0.757932 0.712704 0.000000
- *MESH_TVERT 1666 0.986652 0.706160 0.000000
- *MESH_TVERT 1667 0.986695 0.710821 0.000000
- *MESH_TVERT 1668 0.758226 0.744506 0.000000
- *MESH_TVERT 1669 0.757932 0.712704 0.000000
- *MESH_TVERT 1670 0.986695 0.710821 0.000000
- *MESH_TVERT 1671 0.758226 0.744506 0.000000
- *MESH_TVERT 1672 0.986695 0.710821 0.000000
- *MESH_TVERT 1673 0.986989 0.742622 0.000000
- *MESH_TVERT 1674 0.758402 0.763477 0.000000
- *MESH_TVERT 1675 0.758226 0.744506 0.000000
- *MESH_TVERT 1676 0.986989 0.742622 0.000000
- *MESH_TVERT 1677 0.758402 0.763477 0.000000
- *MESH_TVERT 1678 0.986989 0.742622 0.000000
- *MESH_TVERT 1679 0.987165 0.761594 0.000000
- *MESH_TVERT 1680 0.758629 0.787986 0.000000
- *MESH_TVERT 1681 0.758402 0.763477 0.000000
- *MESH_TVERT 1682 0.987165 0.761594 0.000000
- *MESH_TVERT 1683 0.758629 0.787986 0.000000
- *MESH_TVERT 1684 0.987165 0.761594 0.000000
- *MESH_TVERT 1685 0.987392 0.786102 0.000000
- *MESH_TVERT 1686 0.758841 0.810870 0.000000
- *MESH_TVERT 1687 0.758629 0.787986 0.000000
- *MESH_TVERT 1688 0.987392 0.786102 0.000000
- *MESH_TVERT 1689 0.758841 0.810870 0.000000
- *MESH_TVERT 1690 0.987392 0.786102 0.000000
- *MESH_TVERT 1691 0.987604 0.808986 0.000000
- *MESH_TVERT 1692 0.758933 0.820846 0.000000
- *MESH_TVERT 1693 0.758841 0.810870 0.000000
- *MESH_TVERT 1694 0.987604 0.808986 0.000000
- *MESH_TVERT 1695 0.758933 0.820846 0.000000
- *MESH_TVERT 1696 0.987604 0.808986 0.000000
- *MESH_TVERT 1697 0.987696 0.818963 0.000000
- *MESH_TVERT 1698 0.758841 0.810870 0.000000
- *MESH_TVERT 1699 0.758933 0.820846 0.000000
- *MESH_TVERT 1700 0.987696 0.818963 0.000000
- *MESH_TVERT 1701 0.758841 0.810870 0.000000
- *MESH_TVERT 1702 0.987696 0.818963 0.000000
- *MESH_TVERT 1703 0.987604 0.808986 0.000000
- *MESH_TVERT 1704 0.758628 0.787986 0.000000
- *MESH_TVERT 1705 0.758841 0.810870 0.000000
- *MESH_TVERT 1706 0.987604 0.808986 0.000000
- *MESH_TVERT 1707 0.758628 0.787986 0.000000
- *MESH_TVERT 1708 0.987604 0.808986 0.000000
- *MESH_TVERT 1709 0.987391 0.786102 0.000000
- *MESH_TVERT 1710 0.758402 0.763477 0.000000
- *MESH_TVERT 1711 0.758628 0.787986 0.000000
- *MESH_TVERT 1712 0.987391 0.786102 0.000000
- *MESH_TVERT 1713 0.758402 0.763477 0.000000
- *MESH_TVERT 1714 0.987391 0.786102 0.000000
- *MESH_TVERT 1715 0.987165 0.761594 0.000000
- }
- *MESH_NUMTVFACES 572
- *MESH_TFACELIST {
- *MESH_TFACE 0 0 1 2
- *MESH_TFACE 1 3 4 5
- *MESH_TFACE 2 6 7 8
- *MESH_TFACE 3 9 10 11
- *MESH_TFACE 4 12 13 14
- *MESH_TFACE 5 15 16 17
- *MESH_TFACE 6 18 19 20
- *MESH_TFACE 7 21 22 23
- *MESH_TFACE 8 24 25 26
- *MESH_TFACE 9 27 28 29
- *MESH_TFACE 10 30 31 32
- *MESH_TFACE 11 33 34 35
- *MESH_TFACE 12 36 37 38
- *MESH_TFACE 13 39 40 41
- *MESH_TFACE 14 42 43 44
- *MESH_TFACE 15 45 46 47
- *MESH_TFACE 16 48 49 50
- *MESH_TFACE 17 51 52 53
- *MESH_TFACE 18 54 55 56
- *MESH_TFACE 19 57 58 59
- *MESH_TFACE 20 60 61 62
- *MESH_TFACE 21 63 64 65
- *MESH_TFACE 22 66 67 68
- *MESH_TFACE 23 69 70 71
- *MESH_TFACE 24 72 73 74
- *MESH_TFACE 25 75 76 77
- *MESH_TFACE 26 78 79 80
- *MESH_TFACE 27 81 82 83
- *MESH_TFACE 28 84 85 86
- *MESH_TFACE 29 87 88 89
- *MESH_TFACE 30 90 91 92
- *MESH_TFACE 31 93 94 95
- *MESH_TFACE 32 96 97 98
- *MESH_TFACE 33 99 100 101
- *MESH_TFACE 34 102 103 104
- *MESH_TFACE 35 105 106 107
- *MESH_TFACE 36 108 109 110
- *MESH_TFACE 37 111 112 113
- *MESH_TFACE 38 114 115 116
- *MESH_TFACE 39 117 118 119
- *MESH_TFACE 40 120 121 122
- *MESH_TFACE 41 123 124 125
- *MESH_TFACE 42 126 127 128
- *MESH_TFACE 43 129 130 131
- *MESH_TFACE 44 132 133 134
- *MESH_TFACE 45 135 136 137
- *MESH_TFACE 46 138 139 140
- *MESH_TFACE 47 141 142 143
- *MESH_TFACE 48 144 145 146
- *MESH_TFACE 49 147 148 149
- *MESH_TFACE 50 150 151 152
- *MESH_TFACE 51 153 154 155
- *MESH_TFACE 52 156 157 158
- *MESH_TFACE 53 159 160 161
- *MESH_TFACE 54 162 163 164
- *MESH_TFACE 55 165 166 167
- *MESH_TFACE 56 168 169 170
- *MESH_TFACE 57 171 172 173
- *MESH_TFACE 58 174 175 176
- *MESH_TFACE 59 177 178 179
- *MESH_TFACE 60 180 181 182
- *MESH_TFACE 61 183 184 185
- *MESH_TFACE 62 186 187 188
- *MESH_TFACE 63 189 190 191
- *MESH_TFACE 64 192 193 194
- *MESH_TFACE 65 195 196 197
- *MESH_TFACE 66 198 199 200
- *MESH_TFACE 67 201 202 203
- *MESH_TFACE 68 204 205 206
- *MESH_TFACE 69 207 208 209
- *MESH_TFACE 70 210 211 212
- *MESH_TFACE 71 213 214 215
- *MESH_TFACE 72 216 217 218
- *MESH_TFACE 73 219 220 221
- *MESH_TFACE 74 222 223 224
- *MESH_TFACE 75 225 226 227
- *MESH_TFACE 76 228 229 230
- *MESH_TFACE 77 231 232 233
- *MESH_TFACE 78 234 235 236
- *MESH_TFACE 79 237 238 239
- *MESH_TFACE 80 240 241 242
- *MESH_TFACE 81 243 244 245
- *MESH_TFACE 82 246 247 248
- *MESH_TFACE 83 249 250 251
- *MESH_TFACE 84 252 253 254
- *MESH_TFACE 85 255 256 257
- *MESH_TFACE 86 258 259 260
- *MESH_TFACE 87 261 262 263
- *MESH_TFACE 88 264 265 266
- *MESH_TFACE 89 267 268 269
- *MESH_TFACE 90 270 271 272
- *MESH_TFACE 91 273 274 275
- *MESH_TFACE 92 276 277 278
- *MESH_TFACE 93 279 280 281
- *MESH_TFACE 94 282 283 284
- *MESH_TFACE 95 285 286 287
- *MESH_TFACE 96 288 289 290
- *MESH_TFACE 97 291 292 293
- *MESH_TFACE 98 294 295 296
- *MESH_TFACE 99 297 298 299
- *MESH_TFACE 100 300 301 302
- *MESH_TFACE 101 303 304 305
- *MESH_TFACE 102 306 307 308
- *MESH_TFACE 103 309 310 311
- *MESH_TFACE 104 312 313 314
- *MESH_TFACE 105 315 316 317
- *MESH_TFACE 106 318 319 320
- *MESH_TFACE 107 321 322 323
- *MESH_TFACE 108 324 325 326
- *MESH_TFACE 109 327 328 329
- *MESH_TFACE 110 330 331 332
- *MESH_TFACE 111 333 334 335
- *MESH_TFACE 112 336 337 338
- *MESH_TFACE 113 339 340 341
- *MESH_TFACE 114 342 343 344
- *MESH_TFACE 115 345 346 347
- *MESH_TFACE 116 348 349 350
- *MESH_TFACE 117 351 352 353
- *MESH_TFACE 118 354 355 356
- *MESH_TFACE 119 357 358 359
- *MESH_TFACE 120 360 361 362
- *MESH_TFACE 121 363 364 365
- *MESH_TFACE 122 366 367 368
- *MESH_TFACE 123 369 370 371
- *MESH_TFACE 124 372 373 374
- *MESH_TFACE 125 375 376 377
- *MESH_TFACE 126 378 379 380
- *MESH_TFACE 127 381 382 383
- *MESH_TFACE 128 384 385 386
- *MESH_TFACE 129 387 388 389
- *MESH_TFACE 130 390 391 392
- *MESH_TFACE 131 393 394 395
- *MESH_TFACE 132 396 397 398
- *MESH_TFACE 133 399 400 401
- *MESH_TFACE 134 402 403 404
- *MESH_TFACE 135 405 406 407
- *MESH_TFACE 136 408 409 410
- *MESH_TFACE 137 411 412 413
- *MESH_TFACE 138 414 415 416
- *MESH_TFACE 139 417 418 419
- *MESH_TFACE 140 420 421 422
- *MESH_TFACE 141 423 424 425
- *MESH_TFACE 142 426 427 428
- *MESH_TFACE 143 429 430 431
- *MESH_TFACE 144 432 433 434
- *MESH_TFACE 145 435 436 437
- *MESH_TFACE 146 438 439 440
- *MESH_TFACE 147 441 442 443
- *MESH_TFACE 148 444 445 446
- *MESH_TFACE 149 447 448 449
- *MESH_TFACE 150 450 451 452
- *MESH_TFACE 151 453 454 455
- *MESH_TFACE 152 456 457 458
- *MESH_TFACE 153 459 460 461
- *MESH_TFACE 154 462 463 464
- *MESH_TFACE 155 465 466 467
- *MESH_TFACE 156 468 469 470
- *MESH_TFACE 157 471 472 473
- *MESH_TFACE 158 474 475 476
- *MESH_TFACE 159 477 478 479
- *MESH_TFACE 160 480 481 482
- *MESH_TFACE 161 483 484 485
- *MESH_TFACE 162 486 487 488
- *MESH_TFACE 163 489 490 491
- *MESH_TFACE 164 492 493 494
- *MESH_TFACE 165 495 496 497
- *MESH_TFACE 166 498 499 500
- *MESH_TFACE 167 501 502 503
- *MESH_TFACE 168 504 505 506
- *MESH_TFACE 169 507 508 509
- *MESH_TFACE 170 510 511 512
- *MESH_TFACE 171 513 514 515
- *MESH_TFACE 172 516 517 518
- *MESH_TFACE 173 519 520 521
- *MESH_TFACE 174 522 523 524
- *MESH_TFACE 175 525 526 527
- *MESH_TFACE 176 528 529 530
- *MESH_TFACE 177 531 532 533
- *MESH_TFACE 178 534 535 536
- *MESH_TFACE 179 537 538 539
- *MESH_TFACE 180 540 541 542
- *MESH_TFACE 181 543 544 545
- *MESH_TFACE 182 546 547 548
- *MESH_TFACE 183 549 550 551
- *MESH_TFACE 184 552 553 554
- *MESH_TFACE 185 555 556 557
- *MESH_TFACE 186 558 559 560
- *MESH_TFACE 187 561 562 563
- *MESH_TFACE 188 564 565 566
- *MESH_TFACE 189 567 568 569
- *MESH_TFACE 190 570 571 572
- *MESH_TFACE 191 573 574 575
- *MESH_TFACE 192 576 577 578
- *MESH_TFACE 193 579 580 581
- *MESH_TFACE 194 582 583 584
- *MESH_TFACE 195 585 586 587
- *MESH_TFACE 196 588 589 590
- *MESH_TFACE 197 591 592 593
- *MESH_TFACE 198 594 595 596
- *MESH_TFACE 199 597 598 599
- *MESH_TFACE 200 600 601 602
- *MESH_TFACE 201 603 604 605
- *MESH_TFACE 202 606 607 608
- *MESH_TFACE 203 609 610 611
- *MESH_TFACE 204 612 613 614
- *MESH_TFACE 205 615 616 617
- *MESH_TFACE 206 618 619 620
- *MESH_TFACE 207 621 622 623
- *MESH_TFACE 208 624 625 626
- *MESH_TFACE 209 627 628 629
- *MESH_TFACE 210 630 631 632
- *MESH_TFACE 211 633 634 635
- *MESH_TFACE 212 636 637 638
- *MESH_TFACE 213 639 640 641
- *MESH_TFACE 214 642 643 644
- *MESH_TFACE 215 645 646 647
- *MESH_TFACE 216 648 649 650
- *MESH_TFACE 217 651 652 653
- *MESH_TFACE 218 654 655 656
- *MESH_TFACE 219 657 658 659
- *MESH_TFACE 220 660 661 662
- *MESH_TFACE 221 663 664 665
- *MESH_TFACE 222 666 667 668
- *MESH_TFACE 223 669 670 671
- *MESH_TFACE 224 672 673 674
- *MESH_TFACE 225 675 676 677
- *MESH_TFACE 226 678 679 680
- *MESH_TFACE 227 681 682 683
- *MESH_TFACE 228 684 685 686
- *MESH_TFACE 229 687 688 689
- *MESH_TFACE 230 690 691 692
- *MESH_TFACE 231 693 694 695
- *MESH_TFACE 232 696 697 698
- *MESH_TFACE 233 699 700 701
- *MESH_TFACE 234 702 703 704
- *MESH_TFACE 235 705 706 707
- *MESH_TFACE 236 708 709 710
- *MESH_TFACE 237 711 712 713
- *MESH_TFACE 238 714 715 716
- *MESH_TFACE 239 717 718 719
- *MESH_TFACE 240 720 721 722
- *MESH_TFACE 241 723 724 725
- *MESH_TFACE 242 726 727 728
- *MESH_TFACE 243 729 730 731
- *MESH_TFACE 244 732 733 734
- *MESH_TFACE 245 735 736 737
- *MESH_TFACE 246 738 739 740
- *MESH_TFACE 247 741 742 743
- *MESH_TFACE 248 744 745 746
- *MESH_TFACE 249 747 748 749
- *MESH_TFACE 250 750 751 752
- *MESH_TFACE 251 753 754 755
- *MESH_TFACE 252 756 757 758
- *MESH_TFACE 253 759 760 761
- *MESH_TFACE 254 762 763 764
- *MESH_TFACE 255 765 766 767
- *MESH_TFACE 256 768 769 770
- *MESH_TFACE 257 771 772 773
- *MESH_TFACE 258 774 775 776
- *MESH_TFACE 259 777 778 779
- *MESH_TFACE 260 780 781 782
- *MESH_TFACE 261 783 784 785
- *MESH_TFACE 262 786 787 788
- *MESH_TFACE 263 789 790 791
- *MESH_TFACE 264 792 793 794
- *MESH_TFACE 265 795 796 797
- *MESH_TFACE 266 798 799 800
- *MESH_TFACE 267 801 802 803
- *MESH_TFACE 268 804 805 806
- *MESH_TFACE 269 807 808 809
- *MESH_TFACE 270 810 811 812
- *MESH_TFACE 271 813 814 815
- *MESH_TFACE 272 816 817 818
- *MESH_TFACE 273 819 820 821
- *MESH_TFACE 274 822 823 824
- *MESH_TFACE 275 825 826 827
- *MESH_TFACE 276 828 829 830
- *MESH_TFACE 277 831 832 833
- *MESH_TFACE 278 834 835 836
- *MESH_TFACE 279 837 838 839
- *MESH_TFACE 280 840 841 842
- *MESH_TFACE 281 843 844 845
- *MESH_TFACE 282 846 847 848
- *MESH_TFACE 283 849 850 851
- *MESH_TFACE 284 852 853 854
- *MESH_TFACE 285 855 856 857
- *MESH_TFACE 286 858 859 860
- *MESH_TFACE 287 861 862 863
- *MESH_TFACE 288 864 865 866
- *MESH_TFACE 289 867 868 869
- *MESH_TFACE 290 870 871 872
- *MESH_TFACE 291 873 874 875
- *MESH_TFACE 292 876 877 878
- *MESH_TFACE 293 879 880 881
- *MESH_TFACE 294 882 883 884
- *MESH_TFACE 295 885 886 887
- *MESH_TFACE 296 888 889 890
- *MESH_TFACE 297 891 892 893
- *MESH_TFACE 298 894 895 896
- *MESH_TFACE 299 897 898 899
- *MESH_TFACE 300 900 901 902
- *MESH_TFACE 301 903 904 905
- *MESH_TFACE 302 906 907 908
- *MESH_TFACE 303 909 910 911
- *MESH_TFACE 304 912 913 914
- *MESH_TFACE 305 915 916 917
- *MESH_TFACE 306 918 919 920
- *MESH_TFACE 307 921 922 923
- *MESH_TFACE 308 924 925 926
- *MESH_TFACE 309 927 928 929
- *MESH_TFACE 310 930 931 932
- *MESH_TFACE 311 933 934 935
- *MESH_TFACE 312 936 937 938
- *MESH_TFACE 313 939 940 941
- *MESH_TFACE 314 942 943 944
- *MESH_TFACE 315 945 946 947
- *MESH_TFACE 316 948 949 950
- *MESH_TFACE 317 951 952 953
- *MESH_TFACE 318 954 955 956
- *MESH_TFACE 319 957 958 959
- *MESH_TFACE 320 960 961 962
- *MESH_TFACE 321 963 964 965
- *MESH_TFACE 322 966 967 968
- *MESH_TFACE 323 969 970 971
- *MESH_TFACE 324 972 973 974
- *MESH_TFACE 325 975 976 977
- *MESH_TFACE 326 978 979 980
- *MESH_TFACE 327 981 982 983
- *MESH_TFACE 328 984 985 986
- *MESH_TFACE 329 987 988 989
- *MESH_TFACE 330 990 991 992
- *MESH_TFACE 331 993 994 995
- *MESH_TFACE 332 996 997 998
- *MESH_TFACE 333 999 1000 1001
- *MESH_TFACE 334 1002 1003 1004
- *MESH_TFACE 335 1005 1006 1007
- *MESH_TFACE 336 1008 1009 1010
- *MESH_TFACE 337 1011 1012 1013
- *MESH_TFACE 338 1014 1015 1016
- *MESH_TFACE 339 1017 1018 1019
- *MESH_TFACE 340 1020 1021 1022
- *MESH_TFACE 341 1023 1024 1025
- *MESH_TFACE 342 1026 1027 1028
- *MESH_TFACE 343 1029 1030 1031
- *MESH_TFACE 344 1032 1033 1034
- *MESH_TFACE 345 1035 1036 1037
- *MESH_TFACE 346 1038 1039 1040
- *MESH_TFACE 347 1041 1042 1043
- *MESH_TFACE 348 1044 1045 1046
- *MESH_TFACE 349 1047 1048 1049
- *MESH_TFACE 350 1050 1051 1052
- *MESH_TFACE 351 1053 1054 1055
- *MESH_TFACE 352 1056 1057 1058
- *MESH_TFACE 353 1059 1060 1061
- *MESH_TFACE 354 1062 1063 1064
- *MESH_TFACE 355 1065 1066 1067
- *MESH_TFACE 356 1068 1069 1070
- *MESH_TFACE 357 1071 1072 1073
- *MESH_TFACE 358 1074 1075 1076
- *MESH_TFACE 359 1077 1078 1079
- *MESH_TFACE 360 1080 1081 1082
- *MESH_TFACE 361 1083 1084 1085
- *MESH_TFACE 362 1086 1087 1088
- *MESH_TFACE 363 1089 1090 1091
- *MESH_TFACE 364 1092 1093 1094
- *MESH_TFACE 365 1095 1096 1097
- *MESH_TFACE 366 1098 1099 1100
- *MESH_TFACE 367 1101 1102 1103
- *MESH_TFACE 368 1104 1105 1106
- *MESH_TFACE 369 1107 1108 1109
- *MESH_TFACE 370 1110 1111 1112
- *MESH_TFACE 371 1113 1114 1115
- *MESH_TFACE 372 1116 1117 1118
- *MESH_TFACE 373 1119 1120 1121
- *MESH_TFACE 374 1122 1123 1124
- *MESH_TFACE 375 1125 1126 1127
- *MESH_TFACE 376 1128 1129 1130
- *MESH_TFACE 377 1131 1132 1133
- *MESH_TFACE 378 1134 1135 1136
- *MESH_TFACE 379 1137 1138 1139
- *MESH_TFACE 380 1140 1141 1142
- *MESH_TFACE 381 1143 1144 1145
- *MESH_TFACE 382 1146 1147 1148
- *MESH_TFACE 383 1149 1150 1151
- *MESH_TFACE 384 1152 1153 1154
- *MESH_TFACE 385 1155 1156 1157
- *MESH_TFACE 386 1158 1159 1160
- *MESH_TFACE 387 1161 1162 1163
- *MESH_TFACE 388 1164 1165 1166
- *MESH_TFACE 389 1167 1168 1169
- *MESH_TFACE 390 1170 1171 1172
- *MESH_TFACE 391 1173 1174 1175
- *MESH_TFACE 392 1176 1177 1178
- *MESH_TFACE 393 1179 1180 1181
- *MESH_TFACE 394 1182 1183 1184
- *MESH_TFACE 395 1185 1186 1187
- *MESH_TFACE 396 1188 1189 1190
- *MESH_TFACE 397 1191 1192 1193
- *MESH_TFACE 398 1194 1195 1196
- *MESH_TFACE 399 1197 1198 1199
- *MESH_TFACE 400 1200 1201 1202
- *MESH_TFACE 401 1203 1204 1205
- *MESH_TFACE 402 1206 1207 1208
- *MESH_TFACE 403 1209 1210 1211
- *MESH_TFACE 404 1212 1213 1214
- *MESH_TFACE 405 1215 1216 1217
- *MESH_TFACE 406 1218 1219 1220
- *MESH_TFACE 407 1221 1222 1223
- *MESH_TFACE 408 1224 1225 1226
- *MESH_TFACE 409 1227 1228 1229
- *MESH_TFACE 410 1230 1231 1232
- *MESH_TFACE 411 1233 1234 1235
- *MESH_TFACE 412 1236 1237 1238
- *MESH_TFACE 413 1239 1240 1241
- *MESH_TFACE 414 1242 1243 1244
- *MESH_TFACE 415 1245 1246 1247
- *MESH_TFACE 416 1248 1249 1250
- *MESH_TFACE 417 1251 1252 1253
- *MESH_TFACE 418 1254 1255 1256
- *MESH_TFACE 419 1257 1258 1259
- *MESH_TFACE 420 1260 1261 1262
- *MESH_TFACE 421 1263 1264 1265
- *MESH_TFACE 422 1266 1267 1268
- *MESH_TFACE 423 1269 1270 1271
- *MESH_TFACE 424 1272 1273 1274
- *MESH_TFACE 425 1275 1276 1277
- *MESH_TFACE 426 1278 1279 1280
- *MESH_TFACE 427 1281 1282 1283
- *MESH_TFACE 428 1284 1285 1286
- *MESH_TFACE 429 1287 1288 1289
- *MESH_TFACE 430 1290 1291 1292
- *MESH_TFACE 431 1293 1294 1295
- *MESH_TFACE 432 1296 1297 1298
- *MESH_TFACE 433 1299 1300 1301
- *MESH_TFACE 434 1302 1303 1304
- *MESH_TFACE 435 1305 1306 1307
- *MESH_TFACE 436 1308 1309 1310
- *MESH_TFACE 437 1311 1312 1313
- *MESH_TFACE 438 1314 1315 1316
- *MESH_TFACE 439 1317 1318 1319
- *MESH_TFACE 440 1320 1321 1322
- *MESH_TFACE 441 1323 1324 1325
- *MESH_TFACE 442 1326 1327 1328
- *MESH_TFACE 443 1329 1330 1331
- *MESH_TFACE 444 1332 1333 1334
- *MESH_TFACE 445 1335 1336 1337
- *MESH_TFACE 446 1338 1339 1340
- *MESH_TFACE 447 1341 1342 1343
- *MESH_TFACE 448 1344 1345 1346
- *MESH_TFACE 449 1347 1348 1349
- *MESH_TFACE 450 1350 1351 1352
- *MESH_TFACE 451 1353 1354 1355
- *MESH_TFACE 452 1356 1357 1358
- *MESH_TFACE 453 1359 1360 1361
- *MESH_TFACE 454 1362 1363 1364
- *MESH_TFACE 455 1365 1366 1367
- *MESH_TFACE 456 1368 1369 1370
- *MESH_TFACE 457 1371 1372 1373
- *MESH_TFACE 458 1374 1375 1376
- *MESH_TFACE 459 1377 1378 1379
- *MESH_TFACE 460 1380 1381 1382
- *MESH_TFACE 461 1383 1384 1385
- *MESH_TFACE 462 1386 1387 1388
- *MESH_TFACE 463 1389 1390 1391
- *MESH_TFACE 464 1392 1393 1394
- *MESH_TFACE 465 1395 1396 1397
- *MESH_TFACE 466 1398 1399 1400
- *MESH_TFACE 467 1401 1402 1403
- *MESH_TFACE 468 1404 1405 1406
- *MESH_TFACE 469 1407 1408 1409
- *MESH_TFACE 470 1410 1411 1412
- *MESH_TFACE 471 1413 1414 1415
- *MESH_TFACE 472 1416 1417 1418
- *MESH_TFACE 473 1419 1420 1421
- *MESH_TFACE 474 1422 1423 1424
- *MESH_TFACE 475 1425 1426 1427
- *MESH_TFACE 476 1428 1429 1430
- *MESH_TFACE 477 1431 1432 1433
- *MESH_TFACE 478 1434 1435 1436
- *MESH_TFACE 479 1437 1438 1439
- *MESH_TFACE 480 1440 1441 1442
- *MESH_TFACE 481 1443 1444 1445
- *MESH_TFACE 482 1446 1447 1448
- *MESH_TFACE 483 1449 1450 1451
- *MESH_TFACE 484 1452 1453 1454
- *MESH_TFACE 485 1455 1456 1457
- *MESH_TFACE 486 1458 1459 1460
- *MESH_TFACE 487 1461 1462 1463
- *MESH_TFACE 488 1464 1465 1466
- *MESH_TFACE 489 1467 1468 1469
- *MESH_TFACE 490 1470 1471 1472
- *MESH_TFACE 491 1473 1474 1475
- *MESH_TFACE 492 1476 1477 1478
- *MESH_TFACE 493 1479 1480 1481
- *MESH_TFACE 494 1482 1483 1484
- *MESH_TFACE 495 1485 1486 1487
- *MESH_TFACE 496 1488 1489 1490
- *MESH_TFACE 497 1491 1492 1493
- *MESH_TFACE 498 1494 1495 1496
- *MESH_TFACE 499 1497 1498 1499
- *MESH_TFACE 500 1500 1501 1502
- *MESH_TFACE 501 1503 1504 1505
- *MESH_TFACE 502 1506 1507 1508
- *MESH_TFACE 503 1509 1510 1511
- *MESH_TFACE 504 1512 1513 1514
- *MESH_TFACE 505 1515 1516 1517
- *MESH_TFACE 506 1518 1519 1520
- *MESH_TFACE 507 1521 1522 1523
- *MESH_TFACE 508 1524 1525 1526
- *MESH_TFACE 509 1527 1528 1529
- *MESH_TFACE 510 1530 1531 1532
- *MESH_TFACE 511 1533 1534 1535
- *MESH_TFACE 512 1536 1537 1538
- *MESH_TFACE 513 1539 1540 1541
- *MESH_TFACE 514 1542 1543 1544
- *MESH_TFACE 515 1545 1546 1547
- *MESH_TFACE 516 1548 1549 1550
- *MESH_TFACE 517 1551 1552 1553
- *MESH_TFACE 518 1554 1555 1556
- *MESH_TFACE 519 1557 1558 1559
- *MESH_TFACE 520 1560 1561 1562
- *MESH_TFACE 521 1563 1564 1565
- *MESH_TFACE 522 1566 1567 1568
- *MESH_TFACE 523 1569 1570 1571
- *MESH_TFACE 524 1572 1573 1574
- *MESH_TFACE 525 1575 1576 1577
- *MESH_TFACE 526 1578 1579 1580
- *MESH_TFACE 527 1581 1582 1583
- *MESH_TFACE 528 1584 1585 1586
- *MESH_TFACE 529 1587 1588 1589
- *MESH_TFACE 530 1590 1591 1592
- *MESH_TFACE 531 1593 1594 1595
- *MESH_TFACE 532 1596 1597 1598
- *MESH_TFACE 533 1599 1600 1601
- *MESH_TFACE 534 1602 1603 1604
- *MESH_TFACE 535 1605 1606 1607
- *MESH_TFACE 536 1608 1609 1610
- *MESH_TFACE 537 1611 1612 1613
- *MESH_TFACE 538 1614 1615 1616
- *MESH_TFACE 539 1617 1618 1619
- *MESH_TFACE 540 1620 1621 1622
- *MESH_TFACE 541 1623 1624 1625
- *MESH_TFACE 542 1626 1627 1628
- *MESH_TFACE 543 1629 1630 1631
- *MESH_TFACE 544 1632 1633 1634
- *MESH_TFACE 545 1635 1636 1637
- *MESH_TFACE 546 1638 1639 1640
- *MESH_TFACE 547 1641 1642 1643
- *MESH_TFACE 548 1644 1645 1646
- *MESH_TFACE 549 1647 1648 1649
- *MESH_TFACE 550 1650 1651 1652
- *MESH_TFACE 551 1653 1654 1655
- *MESH_TFACE 552 1656 1657 1658
- *MESH_TFACE 553 1659 1660 1661
- *MESH_TFACE 554 1662 1663 1664
- *MESH_TFACE 555 1665 1666 1667
- *MESH_TFACE 556 1668 1669 1670
- *MESH_TFACE 557 1671 1672 1673
- *MESH_TFACE 558 1674 1675 1676
- *MESH_TFACE 559 1677 1678 1679
- *MESH_TFACE 560 1680 1681 1682
- *MESH_TFACE 561 1683 1684 1685
- *MESH_TFACE 562 1686 1687 1688
- *MESH_TFACE 563 1689 1690 1691
- *MESH_TFACE 564 1692 1693 1694
- *MESH_TFACE 565 1695 1696 1697
- *MESH_TFACE 566 1698 1699 1700
- *MESH_TFACE 567 1701 1702 1703
- *MESH_TFACE 568 1704 1705 1706
- *MESH_TFACE 569 1707 1708 1709
- *MESH_TFACE 570 1710 1711 1712
- *MESH_TFACE 571 1713 1714 1715
- }
- *MESH_NUMCVERTEX 1716
- *MESH_CVERTLIST {
- *MESH_VERTCOL 0 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1 1.000000 1.000000 1.000000
- *MESH_VERTCOL 2 1.000000 1.000000 1.000000
- *MESH_VERTCOL 3 1.000000 1.000000 1.000000
- *MESH_VERTCOL 4 1.000000 1.000000 1.000000
- *MESH_VERTCOL 5 1.000000 1.000000 1.000000
- *MESH_VERTCOL 6 1.000000 1.000000 1.000000
- *MESH_VERTCOL 7 1.000000 1.000000 1.000000
- *MESH_VERTCOL 8 1.000000 1.000000 1.000000
- *MESH_VERTCOL 9 1.000000 1.000000 1.000000
- *MESH_VERTCOL 10 1.000000 1.000000 1.000000
- *MESH_VERTCOL 11 1.000000 1.000000 1.000000
- *MESH_VERTCOL 12 1.000000 1.000000 1.000000
- *MESH_VERTCOL 13 1.000000 1.000000 1.000000
- *MESH_VERTCOL 14 1.000000 1.000000 1.000000
- *MESH_VERTCOL 15 1.000000 1.000000 1.000000
- *MESH_VERTCOL 16 1.000000 1.000000 1.000000
- *MESH_VERTCOL 17 1.000000 1.000000 1.000000
- *MESH_VERTCOL 18 1.000000 1.000000 1.000000
- *MESH_VERTCOL 19 1.000000 1.000000 1.000000
- *MESH_VERTCOL 20 1.000000 1.000000 1.000000
- *MESH_VERTCOL 21 1.000000 1.000000 1.000000
- *MESH_VERTCOL 22 1.000000 1.000000 1.000000
- *MESH_VERTCOL 23 1.000000 1.000000 1.000000
- *MESH_VERTCOL 24 1.000000 1.000000 1.000000
- *MESH_VERTCOL 25 1.000000 1.000000 1.000000
- *MESH_VERTCOL 26 1.000000 1.000000 1.000000
- *MESH_VERTCOL 27 1.000000 1.000000 1.000000
- *MESH_VERTCOL 28 1.000000 1.000000 1.000000
- *MESH_VERTCOL 29 1.000000 1.000000 1.000000
- *MESH_VERTCOL 30 1.000000 1.000000 1.000000
- *MESH_VERTCOL 31 1.000000 1.000000 1.000000
- *MESH_VERTCOL 32 1.000000 1.000000 1.000000
- *MESH_VERTCOL 33 1.000000 1.000000 1.000000
- *MESH_VERTCOL 34 1.000000 1.000000 1.000000
- *MESH_VERTCOL 35 1.000000 1.000000 1.000000
- *MESH_VERTCOL 36 1.000000 1.000000 1.000000
- *MESH_VERTCOL 37 1.000000 1.000000 1.000000
- *MESH_VERTCOL 38 1.000000 1.000000 1.000000
- *MESH_VERTCOL 39 1.000000 1.000000 1.000000
- *MESH_VERTCOL 40 1.000000 1.000000 1.000000
- *MESH_VERTCOL 41 1.000000 1.000000 1.000000
- *MESH_VERTCOL 42 1.000000 1.000000 1.000000
- *MESH_VERTCOL 43 1.000000 1.000000 1.000000
- *MESH_VERTCOL 44 1.000000 1.000000 1.000000
- *MESH_VERTCOL 45 1.000000 1.000000 1.000000
- *MESH_VERTCOL 46 1.000000 1.000000 1.000000
- *MESH_VERTCOL 47 1.000000 1.000000 1.000000
- *MESH_VERTCOL 48 1.000000 1.000000 1.000000
- *MESH_VERTCOL 49 1.000000 1.000000 1.000000
- *MESH_VERTCOL 50 1.000000 1.000000 1.000000
- *MESH_VERTCOL 51 1.000000 1.000000 1.000000
- *MESH_VERTCOL 52 1.000000 1.000000 1.000000
- *MESH_VERTCOL 53 1.000000 1.000000 1.000000
- *MESH_VERTCOL 54 1.000000 1.000000 1.000000
- *MESH_VERTCOL 55 1.000000 1.000000 1.000000
- *MESH_VERTCOL 56 1.000000 1.000000 1.000000
- *MESH_VERTCOL 57 1.000000 1.000000 1.000000
- *MESH_VERTCOL 58 1.000000 1.000000 1.000000
- *MESH_VERTCOL 59 1.000000 1.000000 1.000000
- *MESH_VERTCOL 60 1.000000 1.000000 1.000000
- *MESH_VERTCOL 61 1.000000 1.000000 1.000000
- *MESH_VERTCOL 62 1.000000 1.000000 1.000000
- *MESH_VERTCOL 63 1.000000 1.000000 1.000000
- *MESH_VERTCOL 64 1.000000 1.000000 1.000000
- *MESH_VERTCOL 65 1.000000 1.000000 1.000000
- *MESH_VERTCOL 66 1.000000 1.000000 1.000000
- *MESH_VERTCOL 67 1.000000 1.000000 1.000000
- *MESH_VERTCOL 68 1.000000 1.000000 1.000000
- *MESH_VERTCOL 69 1.000000 1.000000 1.000000
- *MESH_VERTCOL 70 1.000000 1.000000 1.000000
- *MESH_VERTCOL 71 1.000000 1.000000 1.000000
- *MESH_VERTCOL 72 1.000000 1.000000 1.000000
- *MESH_VERTCOL 73 1.000000 1.000000 1.000000
- *MESH_VERTCOL 74 1.000000 1.000000 1.000000
- *MESH_VERTCOL 75 1.000000 1.000000 1.000000
- *MESH_VERTCOL 76 1.000000 1.000000 1.000000
- *MESH_VERTCOL 77 1.000000 1.000000 1.000000
- *MESH_VERTCOL 78 1.000000 1.000000 1.000000
- *MESH_VERTCOL 79 1.000000 1.000000 1.000000
- *MESH_VERTCOL 80 1.000000 1.000000 1.000000
- *MESH_VERTCOL 81 1.000000 1.000000 1.000000
- *MESH_VERTCOL 82 1.000000 1.000000 1.000000
- *MESH_VERTCOL 83 1.000000 1.000000 1.000000
- *MESH_VERTCOL 84 1.000000 1.000000 1.000000
- *MESH_VERTCOL 85 1.000000 1.000000 1.000000
- *MESH_VERTCOL 86 1.000000 1.000000 1.000000
- *MESH_VERTCOL 87 1.000000 1.000000 1.000000
- *MESH_VERTCOL 88 1.000000 1.000000 1.000000
- *MESH_VERTCOL 89 1.000000 1.000000 1.000000
- *MESH_VERTCOL 90 1.000000 1.000000 1.000000
- *MESH_VERTCOL 91 1.000000 1.000000 1.000000
- *MESH_VERTCOL 92 1.000000 1.000000 1.000000
- *MESH_VERTCOL 93 1.000000 1.000000 1.000000
- *MESH_VERTCOL 94 1.000000 1.000000 1.000000
- *MESH_VERTCOL 95 1.000000 1.000000 1.000000
- *MESH_VERTCOL 96 1.000000 1.000000 1.000000
- *MESH_VERTCOL 97 1.000000 1.000000 1.000000
- *MESH_VERTCOL 98 1.000000 1.000000 1.000000
- *MESH_VERTCOL 99 1.000000 1.000000 1.000000
- *MESH_VERTCOL 100 1.000000 1.000000 1.000000
- *MESH_VERTCOL 101 1.000000 1.000000 1.000000
- *MESH_VERTCOL 102 1.000000 1.000000 1.000000
- *MESH_VERTCOL 103 1.000000 1.000000 1.000000
- *MESH_VERTCOL 104 1.000000 1.000000 1.000000
- *MESH_VERTCOL 105 1.000000 1.000000 1.000000
- *MESH_VERTCOL 106 1.000000 1.000000 1.000000
- *MESH_VERTCOL 107 1.000000 1.000000 1.000000
- *MESH_VERTCOL 108 1.000000 1.000000 1.000000
- *MESH_VERTCOL 109 1.000000 1.000000 1.000000
- *MESH_VERTCOL 110 1.000000 1.000000 1.000000
- *MESH_VERTCOL 111 1.000000 1.000000 1.000000
- *MESH_VERTCOL 112 1.000000 1.000000 1.000000
- *MESH_VERTCOL 113 1.000000 1.000000 1.000000
- *MESH_VERTCOL 114 1.000000 1.000000 1.000000
- *MESH_VERTCOL 115 1.000000 1.000000 1.000000
- *MESH_VERTCOL 116 1.000000 1.000000 1.000000
- *MESH_VERTCOL 117 1.000000 1.000000 1.000000
- *MESH_VERTCOL 118 1.000000 1.000000 1.000000
- *MESH_VERTCOL 119 1.000000 1.000000 1.000000
- *MESH_VERTCOL 120 1.000000 1.000000 1.000000
- *MESH_VERTCOL 121 1.000000 1.000000 1.000000
- *MESH_VERTCOL 122 1.000000 1.000000 1.000000
- *MESH_VERTCOL 123 1.000000 1.000000 1.000000
- *MESH_VERTCOL 124 1.000000 1.000000 1.000000
- *MESH_VERTCOL 125 1.000000 1.000000 1.000000
- *MESH_VERTCOL 126 1.000000 1.000000 1.000000
- *MESH_VERTCOL 127 1.000000 1.000000 1.000000
- *MESH_VERTCOL 128 1.000000 1.000000 1.000000
- *MESH_VERTCOL 129 1.000000 1.000000 1.000000
- *MESH_VERTCOL 130 1.000000 1.000000 1.000000
- *MESH_VERTCOL 131 1.000000 1.000000 1.000000
- *MESH_VERTCOL 132 1.000000 1.000000 1.000000
- *MESH_VERTCOL 133 1.000000 1.000000 1.000000
- *MESH_VERTCOL 134 1.000000 1.000000 1.000000
- *MESH_VERTCOL 135 1.000000 1.000000 1.000000
- *MESH_VERTCOL 136 1.000000 1.000000 1.000000
- *MESH_VERTCOL 137 1.000000 1.000000 1.000000
- *MESH_VERTCOL 138 1.000000 1.000000 1.000000
- *MESH_VERTCOL 139 1.000000 1.000000 1.000000
- *MESH_VERTCOL 140 1.000000 1.000000 1.000000
- *MESH_VERTCOL 141 1.000000 1.000000 1.000000
- *MESH_VERTCOL 142 1.000000 1.000000 1.000000
- *MESH_VERTCOL 143 1.000000 1.000000 1.000000
- *MESH_VERTCOL 144 1.000000 1.000000 1.000000
- *MESH_VERTCOL 145 1.000000 1.000000 1.000000
- *MESH_VERTCOL 146 1.000000 1.000000 1.000000
- *MESH_VERTCOL 147 1.000000 1.000000 1.000000
- *MESH_VERTCOL 148 1.000000 1.000000 1.000000
- *MESH_VERTCOL 149 1.000000 1.000000 1.000000
- *MESH_VERTCOL 150 1.000000 1.000000 1.000000
- *MESH_VERTCOL 151 1.000000 1.000000 1.000000
- *MESH_VERTCOL 152 1.000000 1.000000 1.000000
- *MESH_VERTCOL 153 1.000000 1.000000 1.000000
- *MESH_VERTCOL 154 1.000000 1.000000 1.000000
- *MESH_VERTCOL 155 1.000000 1.000000 1.000000
- *MESH_VERTCOL 156 1.000000 1.000000 1.000000
- *MESH_VERTCOL 157 1.000000 1.000000 1.000000
- *MESH_VERTCOL 158 1.000000 1.000000 1.000000
- *MESH_VERTCOL 159 1.000000 1.000000 1.000000
- *MESH_VERTCOL 160 1.000000 1.000000 1.000000
- *MESH_VERTCOL 161 1.000000 1.000000 1.000000
- *MESH_VERTCOL 162 1.000000 1.000000 1.000000
- *MESH_VERTCOL 163 1.000000 1.000000 1.000000
- *MESH_VERTCOL 164 1.000000 1.000000 1.000000
- *MESH_VERTCOL 165 1.000000 1.000000 1.000000
- *MESH_VERTCOL 166 1.000000 1.000000 1.000000
- *MESH_VERTCOL 167 1.000000 1.000000 1.000000
- *MESH_VERTCOL 168 1.000000 1.000000 1.000000
- *MESH_VERTCOL 169 1.000000 1.000000 1.000000
- *MESH_VERTCOL 170 1.000000 1.000000 1.000000
- *MESH_VERTCOL 171 1.000000 1.000000 1.000000
- *MESH_VERTCOL 172 1.000000 1.000000 1.000000
- *MESH_VERTCOL 173 1.000000 1.000000 1.000000
- *MESH_VERTCOL 174 1.000000 1.000000 1.000000
- *MESH_VERTCOL 175 1.000000 1.000000 1.000000
- *MESH_VERTCOL 176 1.000000 1.000000 1.000000
- *MESH_VERTCOL 177 1.000000 1.000000 1.000000
- *MESH_VERTCOL 178 1.000000 1.000000 1.000000
- *MESH_VERTCOL 179 1.000000 1.000000 1.000000
- *MESH_VERTCOL 180 1.000000 1.000000 1.000000
- *MESH_VERTCOL 181 1.000000 1.000000 1.000000
- *MESH_VERTCOL 182 1.000000 1.000000 1.000000
- *MESH_VERTCOL 183 1.000000 1.000000 1.000000
- *MESH_VERTCOL 184 1.000000 1.000000 1.000000
- *MESH_VERTCOL 185 1.000000 1.000000 1.000000
- *MESH_VERTCOL 186 1.000000 1.000000 1.000000
- *MESH_VERTCOL 187 1.000000 1.000000 1.000000
- *MESH_VERTCOL 188 1.000000 1.000000 1.000000
- *MESH_VERTCOL 189 1.000000 1.000000 1.000000
- *MESH_VERTCOL 190 1.000000 1.000000 1.000000
- *MESH_VERTCOL 191 1.000000 1.000000 1.000000
- *MESH_VERTCOL 192 1.000000 1.000000 1.000000
- *MESH_VERTCOL 193 1.000000 1.000000 1.000000
- *MESH_VERTCOL 194 1.000000 1.000000 1.000000
- *MESH_VERTCOL 195 1.000000 1.000000 1.000000
- *MESH_VERTCOL 196 1.000000 1.000000 1.000000
- *MESH_VERTCOL 197 1.000000 1.000000 1.000000
- *MESH_VERTCOL 198 1.000000 1.000000 1.000000
- *MESH_VERTCOL 199 1.000000 1.000000 1.000000
- *MESH_VERTCOL 200 1.000000 1.000000 1.000000
- *MESH_VERTCOL 201 1.000000 1.000000 1.000000
- *MESH_VERTCOL 202 1.000000 1.000000 1.000000
- *MESH_VERTCOL 203 1.000000 1.000000 1.000000
- *MESH_VERTCOL 204 1.000000 1.000000 1.000000
- *MESH_VERTCOL 205 1.000000 1.000000 1.000000
- *MESH_VERTCOL 206 1.000000 1.000000 1.000000
- *MESH_VERTCOL 207 1.000000 1.000000 1.000000
- *MESH_VERTCOL 208 1.000000 1.000000 1.000000
- *MESH_VERTCOL 209 1.000000 1.000000 1.000000
- *MESH_VERTCOL 210 1.000000 1.000000 1.000000
- *MESH_VERTCOL 211 1.000000 1.000000 1.000000
- *MESH_VERTCOL 212 1.000000 1.000000 1.000000
- *MESH_VERTCOL 213 1.000000 1.000000 1.000000
- *MESH_VERTCOL 214 1.000000 1.000000 1.000000
- *MESH_VERTCOL 215 1.000000 1.000000 1.000000
- *MESH_VERTCOL 216 1.000000 1.000000 1.000000
- *MESH_VERTCOL 217 1.000000 1.000000 1.000000
- *MESH_VERTCOL 218 1.000000 1.000000 1.000000
- *MESH_VERTCOL 219 1.000000 1.000000 1.000000
- *MESH_VERTCOL 220 1.000000 1.000000 1.000000
- *MESH_VERTCOL 221 1.000000 1.000000 1.000000
- *MESH_VERTCOL 222 1.000000 1.000000 1.000000
- *MESH_VERTCOL 223 1.000000 1.000000 1.000000
- *MESH_VERTCOL 224 1.000000 1.000000 1.000000
- *MESH_VERTCOL 225 1.000000 1.000000 1.000000
- *MESH_VERTCOL 226 1.000000 1.000000 1.000000
- *MESH_VERTCOL 227 1.000000 1.000000 1.000000
- *MESH_VERTCOL 228 1.000000 1.000000 1.000000
- *MESH_VERTCOL 229 1.000000 1.000000 1.000000
- *MESH_VERTCOL 230 1.000000 1.000000 1.000000
- *MESH_VERTCOL 231 1.000000 1.000000 1.000000
- *MESH_VERTCOL 232 1.000000 1.000000 1.000000
- *MESH_VERTCOL 233 1.000000 1.000000 1.000000
- *MESH_VERTCOL 234 1.000000 1.000000 1.000000
- *MESH_VERTCOL 235 1.000000 1.000000 1.000000
- *MESH_VERTCOL 236 1.000000 1.000000 1.000000
- *MESH_VERTCOL 237 1.000000 1.000000 1.000000
- *MESH_VERTCOL 238 1.000000 1.000000 1.000000
- *MESH_VERTCOL 239 1.000000 1.000000 1.000000
- *MESH_VERTCOL 240 1.000000 1.000000 1.000000
- *MESH_VERTCOL 241 1.000000 1.000000 1.000000
- *MESH_VERTCOL 242 1.000000 1.000000 1.000000
- *MESH_VERTCOL 243 1.000000 1.000000 1.000000
- *MESH_VERTCOL 244 1.000000 1.000000 1.000000
- *MESH_VERTCOL 245 1.000000 1.000000 1.000000
- *MESH_VERTCOL 246 1.000000 1.000000 1.000000
- *MESH_VERTCOL 247 1.000000 1.000000 1.000000
- *MESH_VERTCOL 248 1.000000 1.000000 1.000000
- *MESH_VERTCOL 249 1.000000 1.000000 1.000000
- *MESH_VERTCOL 250 1.000000 1.000000 1.000000
- *MESH_VERTCOL 251 1.000000 1.000000 1.000000
- *MESH_VERTCOL 252 1.000000 1.000000 1.000000
- *MESH_VERTCOL 253 1.000000 1.000000 1.000000
- *MESH_VERTCOL 254 1.000000 1.000000 1.000000
- *MESH_VERTCOL 255 1.000000 1.000000 1.000000
- *MESH_VERTCOL 256 1.000000 1.000000 1.000000
- *MESH_VERTCOL 257 1.000000 1.000000 1.000000
- *MESH_VERTCOL 258 1.000000 1.000000 1.000000
- *MESH_VERTCOL 259 1.000000 1.000000 1.000000
- *MESH_VERTCOL 260 1.000000 1.000000 1.000000
- *MESH_VERTCOL 261 1.000000 1.000000 1.000000
- *MESH_VERTCOL 262 1.000000 1.000000 1.000000
- *MESH_VERTCOL 263 1.000000 1.000000 1.000000
- *MESH_VERTCOL 264 1.000000 1.000000 1.000000
- *MESH_VERTCOL 265 1.000000 1.000000 1.000000
- *MESH_VERTCOL 266 1.000000 1.000000 1.000000
- *MESH_VERTCOL 267 1.000000 1.000000 1.000000
- *MESH_VERTCOL 268 1.000000 1.000000 1.000000
- *MESH_VERTCOL 269 1.000000 1.000000 1.000000
- *MESH_VERTCOL 270 1.000000 1.000000 1.000000
- *MESH_VERTCOL 271 1.000000 1.000000 1.000000
- *MESH_VERTCOL 272 1.000000 1.000000 1.000000
- *MESH_VERTCOL 273 1.000000 1.000000 1.000000
- *MESH_VERTCOL 274 1.000000 1.000000 1.000000
- *MESH_VERTCOL 275 1.000000 1.000000 1.000000
- *MESH_VERTCOL 276 1.000000 1.000000 1.000000
- *MESH_VERTCOL 277 1.000000 1.000000 1.000000
- *MESH_VERTCOL 278 1.000000 1.000000 1.000000
- *MESH_VERTCOL 279 1.000000 1.000000 1.000000
- *MESH_VERTCOL 280 1.000000 1.000000 1.000000
- *MESH_VERTCOL 281 1.000000 1.000000 1.000000
- *MESH_VERTCOL 282 1.000000 1.000000 1.000000
- *MESH_VERTCOL 283 1.000000 1.000000 1.000000
- *MESH_VERTCOL 284 1.000000 1.000000 1.000000
- *MESH_VERTCOL 285 1.000000 1.000000 1.000000
- *MESH_VERTCOL 286 1.000000 1.000000 1.000000
- *MESH_VERTCOL 287 1.000000 1.000000 1.000000
- *MESH_VERTCOL 288 1.000000 1.000000 1.000000
- *MESH_VERTCOL 289 1.000000 1.000000 1.000000
- *MESH_VERTCOL 290 1.000000 1.000000 1.000000
- *MESH_VERTCOL 291 1.000000 1.000000 1.000000
- *MESH_VERTCOL 292 1.000000 1.000000 1.000000
- *MESH_VERTCOL 293 1.000000 1.000000 1.000000
- *MESH_VERTCOL 294 1.000000 1.000000 1.000000
- *MESH_VERTCOL 295 1.000000 1.000000 1.000000
- *MESH_VERTCOL 296 1.000000 1.000000 1.000000
- *MESH_VERTCOL 297 1.000000 1.000000 1.000000
- *MESH_VERTCOL 298 1.000000 1.000000 1.000000
- *MESH_VERTCOL 299 1.000000 1.000000 1.000000
- *MESH_VERTCOL 300 1.000000 1.000000 1.000000
- *MESH_VERTCOL 301 1.000000 1.000000 1.000000
- *MESH_VERTCOL 302 1.000000 1.000000 1.000000
- *MESH_VERTCOL 303 1.000000 1.000000 1.000000
- *MESH_VERTCOL 304 1.000000 1.000000 1.000000
- *MESH_VERTCOL 305 1.000000 1.000000 1.000000
- *MESH_VERTCOL 306 1.000000 1.000000 1.000000
- *MESH_VERTCOL 307 1.000000 1.000000 1.000000
- *MESH_VERTCOL 308 1.000000 1.000000 1.000000
- *MESH_VERTCOL 309 1.000000 1.000000 1.000000
- *MESH_VERTCOL 310 1.000000 1.000000 1.000000
- *MESH_VERTCOL 311 1.000000 1.000000 1.000000
- *MESH_VERTCOL 312 1.000000 1.000000 1.000000
- *MESH_VERTCOL 313 1.000000 1.000000 1.000000
- *MESH_VERTCOL 314 1.000000 1.000000 1.000000
- *MESH_VERTCOL 315 1.000000 1.000000 1.000000
- *MESH_VERTCOL 316 1.000000 1.000000 1.000000
- *MESH_VERTCOL 317 1.000000 1.000000 1.000000
- *MESH_VERTCOL 318 1.000000 1.000000 1.000000
- *MESH_VERTCOL 319 1.000000 1.000000 1.000000
- *MESH_VERTCOL 320 1.000000 1.000000 1.000000
- *MESH_VERTCOL 321 1.000000 1.000000 1.000000
- *MESH_VERTCOL 322 1.000000 1.000000 1.000000
- *MESH_VERTCOL 323 1.000000 1.000000 1.000000
- *MESH_VERTCOL 324 1.000000 1.000000 1.000000
- *MESH_VERTCOL 325 1.000000 1.000000 1.000000
- *MESH_VERTCOL 326 1.000000 1.000000 1.000000
- *MESH_VERTCOL 327 1.000000 1.000000 1.000000
- *MESH_VERTCOL 328 1.000000 1.000000 1.000000
- *MESH_VERTCOL 329 1.000000 1.000000 1.000000
- *MESH_VERTCOL 330 1.000000 1.000000 1.000000
- *MESH_VERTCOL 331 1.000000 1.000000 1.000000
- *MESH_VERTCOL 332 1.000000 1.000000 1.000000
- *MESH_VERTCOL 333 1.000000 1.000000 1.000000
- *MESH_VERTCOL 334 1.000000 1.000000 1.000000
- *MESH_VERTCOL 335 1.000000 1.000000 1.000000
- *MESH_VERTCOL 336 1.000000 1.000000 1.000000
- *MESH_VERTCOL 337 1.000000 1.000000 1.000000
- *MESH_VERTCOL 338 1.000000 1.000000 1.000000
- *MESH_VERTCOL 339 1.000000 1.000000 1.000000
- *MESH_VERTCOL 340 1.000000 1.000000 1.000000
- *MESH_VERTCOL 341 1.000000 1.000000 1.000000
- *MESH_VERTCOL 342 1.000000 1.000000 1.000000
- *MESH_VERTCOL 343 1.000000 1.000000 1.000000
- *MESH_VERTCOL 344 1.000000 1.000000 1.000000
- *MESH_VERTCOL 345 1.000000 1.000000 1.000000
- *MESH_VERTCOL 346 1.000000 1.000000 1.000000
- *MESH_VERTCOL 347 1.000000 1.000000 1.000000
- *MESH_VERTCOL 348 1.000000 1.000000 1.000000
- *MESH_VERTCOL 349 1.000000 1.000000 1.000000
- *MESH_VERTCOL 350 1.000000 1.000000 1.000000
- *MESH_VERTCOL 351 1.000000 1.000000 1.000000
- *MESH_VERTCOL 352 1.000000 1.000000 1.000000
- *MESH_VERTCOL 353 1.000000 1.000000 1.000000
- *MESH_VERTCOL 354 1.000000 1.000000 1.000000
- *MESH_VERTCOL 355 1.000000 1.000000 1.000000
- *MESH_VERTCOL 356 1.000000 1.000000 1.000000
- *MESH_VERTCOL 357 1.000000 1.000000 1.000000
- *MESH_VERTCOL 358 1.000000 1.000000 1.000000
- *MESH_VERTCOL 359 1.000000 1.000000 1.000000
- *MESH_VERTCOL 360 1.000000 1.000000 1.000000
- *MESH_VERTCOL 361 1.000000 1.000000 1.000000
- *MESH_VERTCOL 362 1.000000 1.000000 1.000000
- *MESH_VERTCOL 363 1.000000 1.000000 1.000000
- *MESH_VERTCOL 364 1.000000 1.000000 1.000000
- *MESH_VERTCOL 365 1.000000 1.000000 1.000000
- *MESH_VERTCOL 366 1.000000 1.000000 1.000000
- *MESH_VERTCOL 367 1.000000 1.000000 1.000000
- *MESH_VERTCOL 368 1.000000 1.000000 1.000000
- *MESH_VERTCOL 369 1.000000 1.000000 1.000000
- *MESH_VERTCOL 370 1.000000 1.000000 1.000000
- *MESH_VERTCOL 371 1.000000 1.000000 1.000000
- *MESH_VERTCOL 372 1.000000 1.000000 1.000000
- *MESH_VERTCOL 373 1.000000 1.000000 1.000000
- *MESH_VERTCOL 374 1.000000 1.000000 1.000000
- *MESH_VERTCOL 375 1.000000 1.000000 1.000000
- *MESH_VERTCOL 376 1.000000 1.000000 1.000000
- *MESH_VERTCOL 377 1.000000 1.000000 1.000000
- *MESH_VERTCOL 378 1.000000 1.000000 1.000000
- *MESH_VERTCOL 379 1.000000 1.000000 1.000000
- *MESH_VERTCOL 380 1.000000 1.000000 1.000000
- *MESH_VERTCOL 381 1.000000 1.000000 1.000000
- *MESH_VERTCOL 382 1.000000 1.000000 1.000000
- *MESH_VERTCOL 383 1.000000 1.000000 1.000000
- *MESH_VERTCOL 384 1.000000 1.000000 1.000000
- *MESH_VERTCOL 385 1.000000 1.000000 1.000000
- *MESH_VERTCOL 386 1.000000 1.000000 1.000000
- *MESH_VERTCOL 387 1.000000 1.000000 1.000000
- *MESH_VERTCOL 388 1.000000 1.000000 1.000000
- *MESH_VERTCOL 389 1.000000 1.000000 1.000000
- *MESH_VERTCOL 390 1.000000 1.000000 1.000000
- *MESH_VERTCOL 391 1.000000 1.000000 1.000000
- *MESH_VERTCOL 392 1.000000 1.000000 1.000000
- *MESH_VERTCOL 393 1.000000 1.000000 1.000000
- *MESH_VERTCOL 394 1.000000 1.000000 1.000000
- *MESH_VERTCOL 395 1.000000 1.000000 1.000000
- *MESH_VERTCOL 396 1.000000 1.000000 1.000000
- *MESH_VERTCOL 397 1.000000 1.000000 1.000000
- *MESH_VERTCOL 398 1.000000 1.000000 1.000000
- *MESH_VERTCOL 399 1.000000 1.000000 1.000000
- *MESH_VERTCOL 400 1.000000 1.000000 1.000000
- *MESH_VERTCOL 401 1.000000 1.000000 1.000000
- *MESH_VERTCOL 402 1.000000 1.000000 1.000000
- *MESH_VERTCOL 403 1.000000 1.000000 1.000000
- *MESH_VERTCOL 404 1.000000 1.000000 1.000000
- *MESH_VERTCOL 405 1.000000 1.000000 1.000000
- *MESH_VERTCOL 406 1.000000 1.000000 1.000000
- *MESH_VERTCOL 407 1.000000 1.000000 1.000000
- *MESH_VERTCOL 408 1.000000 1.000000 1.000000
- *MESH_VERTCOL 409 1.000000 1.000000 1.000000
- *MESH_VERTCOL 410 1.000000 1.000000 1.000000
- *MESH_VERTCOL 411 1.000000 1.000000 1.000000
- *MESH_VERTCOL 412 1.000000 1.000000 1.000000
- *MESH_VERTCOL 413 1.000000 1.000000 1.000000
- *MESH_VERTCOL 414 1.000000 1.000000 1.000000
- *MESH_VERTCOL 415 1.000000 1.000000 1.000000
- *MESH_VERTCOL 416 1.000000 1.000000 1.000000
- *MESH_VERTCOL 417 1.000000 1.000000 1.000000
- *MESH_VERTCOL 418 1.000000 1.000000 1.000000
- *MESH_VERTCOL 419 1.000000 1.000000 1.000000
- *MESH_VERTCOL 420 1.000000 1.000000 1.000000
- *MESH_VERTCOL 421 1.000000 1.000000 1.000000
- *MESH_VERTCOL 422 1.000000 1.000000 1.000000
- *MESH_VERTCOL 423 1.000000 1.000000 1.000000
- *MESH_VERTCOL 424 1.000000 1.000000 1.000000
- *MESH_VERTCOL 425 1.000000 1.000000 1.000000
- *MESH_VERTCOL 426 1.000000 1.000000 1.000000
- *MESH_VERTCOL 427 1.000000 1.000000 1.000000
- *MESH_VERTCOL 428 1.000000 1.000000 1.000000
- *MESH_VERTCOL 429 1.000000 1.000000 1.000000
- *MESH_VERTCOL 430 1.000000 1.000000 1.000000
- *MESH_VERTCOL 431 1.000000 1.000000 1.000000
- *MESH_VERTCOL 432 1.000000 1.000000 1.000000
- *MESH_VERTCOL 433 1.000000 1.000000 1.000000
- *MESH_VERTCOL 434 1.000000 1.000000 1.000000
- *MESH_VERTCOL 435 1.000000 1.000000 1.000000
- *MESH_VERTCOL 436 1.000000 1.000000 1.000000
- *MESH_VERTCOL 437 1.000000 1.000000 1.000000
- *MESH_VERTCOL 438 1.000000 1.000000 1.000000
- *MESH_VERTCOL 439 1.000000 1.000000 1.000000
- *MESH_VERTCOL 440 1.000000 1.000000 1.000000
- *MESH_VERTCOL 441 1.000000 1.000000 1.000000
- *MESH_VERTCOL 442 1.000000 1.000000 1.000000
- *MESH_VERTCOL 443 1.000000 1.000000 1.000000
- *MESH_VERTCOL 444 1.000000 1.000000 1.000000
- *MESH_VERTCOL 445 1.000000 1.000000 1.000000
- *MESH_VERTCOL 446 1.000000 1.000000 1.000000
- *MESH_VERTCOL 447 1.000000 1.000000 1.000000
- *MESH_VERTCOL 448 1.000000 1.000000 1.000000
- *MESH_VERTCOL 449 1.000000 1.000000 1.000000
- *MESH_VERTCOL 450 1.000000 1.000000 1.000000
- *MESH_VERTCOL 451 1.000000 1.000000 1.000000
- *MESH_VERTCOL 452 1.000000 1.000000 1.000000
- *MESH_VERTCOL 453 1.000000 1.000000 1.000000
- *MESH_VERTCOL 454 1.000000 1.000000 1.000000
- *MESH_VERTCOL 455 1.000000 1.000000 1.000000
- *MESH_VERTCOL 456 1.000000 1.000000 1.000000
- *MESH_VERTCOL 457 1.000000 1.000000 1.000000
- *MESH_VERTCOL 458 1.000000 1.000000 1.000000
- *MESH_VERTCOL 459 1.000000 1.000000 1.000000
- *MESH_VERTCOL 460 1.000000 1.000000 1.000000
- *MESH_VERTCOL 461 1.000000 1.000000 1.000000
- *MESH_VERTCOL 462 1.000000 1.000000 1.000000
- *MESH_VERTCOL 463 1.000000 1.000000 1.000000
- *MESH_VERTCOL 464 1.000000 1.000000 1.000000
- *MESH_VERTCOL 465 1.000000 1.000000 1.000000
- *MESH_VERTCOL 466 1.000000 1.000000 1.000000
- *MESH_VERTCOL 467 1.000000 1.000000 1.000000
- *MESH_VERTCOL 468 1.000000 1.000000 1.000000
- *MESH_VERTCOL 469 1.000000 1.000000 1.000000
- *MESH_VERTCOL 470 1.000000 1.000000 1.000000
- *MESH_VERTCOL 471 1.000000 1.000000 1.000000
- *MESH_VERTCOL 472 1.000000 1.000000 1.000000
- *MESH_VERTCOL 473 1.000000 1.000000 1.000000
- *MESH_VERTCOL 474 1.000000 1.000000 1.000000
- *MESH_VERTCOL 475 1.000000 1.000000 1.000000
- *MESH_VERTCOL 476 1.000000 1.000000 1.000000
- *MESH_VERTCOL 477 1.000000 1.000000 1.000000
- *MESH_VERTCOL 478 1.000000 1.000000 1.000000
- *MESH_VERTCOL 479 1.000000 1.000000 1.000000
- *MESH_VERTCOL 480 1.000000 1.000000 1.000000
- *MESH_VERTCOL 481 1.000000 1.000000 1.000000
- *MESH_VERTCOL 482 1.000000 1.000000 1.000000
- *MESH_VERTCOL 483 1.000000 1.000000 1.000000
- *MESH_VERTCOL 484 1.000000 1.000000 1.000000
- *MESH_VERTCOL 485 1.000000 1.000000 1.000000
- *MESH_VERTCOL 486 1.000000 1.000000 1.000000
- *MESH_VERTCOL 487 1.000000 1.000000 1.000000
- *MESH_VERTCOL 488 1.000000 1.000000 1.000000
- *MESH_VERTCOL 489 1.000000 1.000000 1.000000
- *MESH_VERTCOL 490 1.000000 1.000000 1.000000
- *MESH_VERTCOL 491 1.000000 1.000000 1.000000
- *MESH_VERTCOL 492 1.000000 1.000000 1.000000
- *MESH_VERTCOL 493 1.000000 1.000000 1.000000
- *MESH_VERTCOL 494 1.000000 1.000000 1.000000
- *MESH_VERTCOL 495 1.000000 1.000000 1.000000
- *MESH_VERTCOL 496 1.000000 1.000000 1.000000
- *MESH_VERTCOL 497 1.000000 1.000000 1.000000
- *MESH_VERTCOL 498 1.000000 1.000000 1.000000
- *MESH_VERTCOL 499 1.000000 1.000000 1.000000
- *MESH_VERTCOL 500 1.000000 1.000000 1.000000
- *MESH_VERTCOL 501 1.000000 1.000000 1.000000
- *MESH_VERTCOL 502 1.000000 1.000000 1.000000
- *MESH_VERTCOL 503 1.000000 1.000000 1.000000
- *MESH_VERTCOL 504 1.000000 1.000000 1.000000
- *MESH_VERTCOL 505 1.000000 1.000000 1.000000
- *MESH_VERTCOL 506 1.000000 1.000000 1.000000
- *MESH_VERTCOL 507 1.000000 1.000000 1.000000
- *MESH_VERTCOL 508 1.000000 1.000000 1.000000
- *MESH_VERTCOL 509 1.000000 1.000000 1.000000
- *MESH_VERTCOL 510 1.000000 1.000000 1.000000
- *MESH_VERTCOL 511 1.000000 1.000000 1.000000
- *MESH_VERTCOL 512 1.000000 1.000000 1.000000
- *MESH_VERTCOL 513 1.000000 1.000000 1.000000
- *MESH_VERTCOL 514 1.000000 1.000000 1.000000
- *MESH_VERTCOL 515 1.000000 1.000000 1.000000
- *MESH_VERTCOL 516 1.000000 1.000000 1.000000
- *MESH_VERTCOL 517 1.000000 1.000000 1.000000
- *MESH_VERTCOL 518 1.000000 1.000000 1.000000
- *MESH_VERTCOL 519 1.000000 1.000000 1.000000
- *MESH_VERTCOL 520 1.000000 1.000000 1.000000
- *MESH_VERTCOL 521 1.000000 1.000000 1.000000
- *MESH_VERTCOL 522 1.000000 1.000000 1.000000
- *MESH_VERTCOL 523 1.000000 1.000000 1.000000
- *MESH_VERTCOL 524 1.000000 1.000000 1.000000
- *MESH_VERTCOL 525 1.000000 1.000000 1.000000
- *MESH_VERTCOL 526 1.000000 1.000000 1.000000
- *MESH_VERTCOL 527 1.000000 1.000000 1.000000
- *MESH_VERTCOL 528 1.000000 1.000000 1.000000
- *MESH_VERTCOL 529 1.000000 1.000000 1.000000
- *MESH_VERTCOL 530 1.000000 1.000000 1.000000
- *MESH_VERTCOL 531 1.000000 1.000000 1.000000
- *MESH_VERTCOL 532 1.000000 1.000000 1.000000
- *MESH_VERTCOL 533 1.000000 1.000000 1.000000
- *MESH_VERTCOL 534 1.000000 1.000000 1.000000
- *MESH_VERTCOL 535 1.000000 1.000000 1.000000
- *MESH_VERTCOL 536 1.000000 1.000000 1.000000
- *MESH_VERTCOL 537 1.000000 1.000000 1.000000
- *MESH_VERTCOL 538 1.000000 1.000000 1.000000
- *MESH_VERTCOL 539 1.000000 1.000000 1.000000
- *MESH_VERTCOL 540 1.000000 1.000000 1.000000
- *MESH_VERTCOL 541 1.000000 1.000000 1.000000
- *MESH_VERTCOL 542 1.000000 1.000000 1.000000
- *MESH_VERTCOL 543 1.000000 1.000000 1.000000
- *MESH_VERTCOL 544 1.000000 1.000000 1.000000
- *MESH_VERTCOL 545 1.000000 1.000000 1.000000
- *MESH_VERTCOL 546 1.000000 1.000000 1.000000
- *MESH_VERTCOL 547 1.000000 1.000000 1.000000
- *MESH_VERTCOL 548 1.000000 1.000000 1.000000
- *MESH_VERTCOL 549 1.000000 1.000000 1.000000
- *MESH_VERTCOL 550 1.000000 1.000000 1.000000
- *MESH_VERTCOL 551 1.000000 1.000000 1.000000
- *MESH_VERTCOL 552 1.000000 1.000000 1.000000
- *MESH_VERTCOL 553 1.000000 1.000000 1.000000
- *MESH_VERTCOL 554 1.000000 1.000000 1.000000
- *MESH_VERTCOL 555 1.000000 1.000000 1.000000
- *MESH_VERTCOL 556 1.000000 1.000000 1.000000
- *MESH_VERTCOL 557 1.000000 1.000000 1.000000
- *MESH_VERTCOL 558 1.000000 1.000000 1.000000
- *MESH_VERTCOL 559 1.000000 1.000000 1.000000
- *MESH_VERTCOL 560 1.000000 1.000000 1.000000
- *MESH_VERTCOL 561 1.000000 1.000000 1.000000
- *MESH_VERTCOL 562 1.000000 1.000000 1.000000
- *MESH_VERTCOL 563 1.000000 1.000000 1.000000
- *MESH_VERTCOL 564 1.000000 1.000000 1.000000
- *MESH_VERTCOL 565 1.000000 1.000000 1.000000
- *MESH_VERTCOL 566 1.000000 1.000000 1.000000
- *MESH_VERTCOL 567 1.000000 1.000000 1.000000
- *MESH_VERTCOL 568 1.000000 1.000000 1.000000
- *MESH_VERTCOL 569 1.000000 1.000000 1.000000
- *MESH_VERTCOL 570 1.000000 1.000000 1.000000
- *MESH_VERTCOL 571 1.000000 1.000000 1.000000
- *MESH_VERTCOL 572 1.000000 1.000000 1.000000
- *MESH_VERTCOL 573 1.000000 1.000000 1.000000
- *MESH_VERTCOL 574 1.000000 1.000000 1.000000
- *MESH_VERTCOL 575 1.000000 1.000000 1.000000
- *MESH_VERTCOL 576 1.000000 1.000000 1.000000
- *MESH_VERTCOL 577 1.000000 1.000000 1.000000
- *MESH_VERTCOL 578 1.000000 1.000000 1.000000
- *MESH_VERTCOL 579 1.000000 1.000000 1.000000
- *MESH_VERTCOL 580 1.000000 1.000000 1.000000
- *MESH_VERTCOL 581 1.000000 1.000000 1.000000
- *MESH_VERTCOL 582 1.000000 1.000000 1.000000
- *MESH_VERTCOL 583 1.000000 1.000000 1.000000
- *MESH_VERTCOL 584 1.000000 1.000000 1.000000
- *MESH_VERTCOL 585 1.000000 1.000000 1.000000
- *MESH_VERTCOL 586 1.000000 1.000000 1.000000
- *MESH_VERTCOL 587 1.000000 1.000000 1.000000
- *MESH_VERTCOL 588 1.000000 1.000000 1.000000
- *MESH_VERTCOL 589 1.000000 1.000000 1.000000
- *MESH_VERTCOL 590 1.000000 1.000000 1.000000
- *MESH_VERTCOL 591 1.000000 1.000000 1.000000
- *MESH_VERTCOL 592 1.000000 1.000000 1.000000
- *MESH_VERTCOL 593 1.000000 1.000000 1.000000
- *MESH_VERTCOL 594 1.000000 1.000000 1.000000
- *MESH_VERTCOL 595 1.000000 1.000000 1.000000
- *MESH_VERTCOL 596 1.000000 1.000000 1.000000
- *MESH_VERTCOL 597 1.000000 1.000000 1.000000
- *MESH_VERTCOL 598 1.000000 1.000000 1.000000
- *MESH_VERTCOL 599 1.000000 1.000000 1.000000
- *MESH_VERTCOL 600 1.000000 1.000000 1.000000
- *MESH_VERTCOL 601 1.000000 1.000000 1.000000
- *MESH_VERTCOL 602 1.000000 1.000000 1.000000
- *MESH_VERTCOL 603 1.000000 1.000000 1.000000
- *MESH_VERTCOL 604 1.000000 1.000000 1.000000
- *MESH_VERTCOL 605 1.000000 1.000000 1.000000
- *MESH_VERTCOL 606 1.000000 1.000000 1.000000
- *MESH_VERTCOL 607 1.000000 1.000000 1.000000
- *MESH_VERTCOL 608 1.000000 1.000000 1.000000
- *MESH_VERTCOL 609 1.000000 1.000000 1.000000
- *MESH_VERTCOL 610 1.000000 1.000000 1.000000
- *MESH_VERTCOL 611 1.000000 1.000000 1.000000
- *MESH_VERTCOL 612 1.000000 1.000000 1.000000
- *MESH_VERTCOL 613 1.000000 1.000000 1.000000
- *MESH_VERTCOL 614 1.000000 1.000000 1.000000
- *MESH_VERTCOL 615 1.000000 1.000000 1.000000
- *MESH_VERTCOL 616 1.000000 1.000000 1.000000
- *MESH_VERTCOL 617 1.000000 1.000000 1.000000
- *MESH_VERTCOL 618 1.000000 1.000000 1.000000
- *MESH_VERTCOL 619 1.000000 1.000000 1.000000
- *MESH_VERTCOL 620 1.000000 1.000000 1.000000
- *MESH_VERTCOL 621 1.000000 1.000000 1.000000
- *MESH_VERTCOL 622 1.000000 1.000000 1.000000
- *MESH_VERTCOL 623 1.000000 1.000000 1.000000
- *MESH_VERTCOL 624 1.000000 1.000000 1.000000
- *MESH_VERTCOL 625 1.000000 1.000000 1.000000
- *MESH_VERTCOL 626 1.000000 1.000000 1.000000
- *MESH_VERTCOL 627 1.000000 1.000000 1.000000
- *MESH_VERTCOL 628 1.000000 1.000000 1.000000
- *MESH_VERTCOL 629 1.000000 1.000000 1.000000
- *MESH_VERTCOL 630 1.000000 1.000000 1.000000
- *MESH_VERTCOL 631 1.000000 1.000000 1.000000
- *MESH_VERTCOL 632 1.000000 1.000000 1.000000
- *MESH_VERTCOL 633 1.000000 1.000000 1.000000
- *MESH_VERTCOL 634 1.000000 1.000000 1.000000
- *MESH_VERTCOL 635 1.000000 1.000000 1.000000
- *MESH_VERTCOL 636 1.000000 1.000000 1.000000
- *MESH_VERTCOL 637 1.000000 1.000000 1.000000
- *MESH_VERTCOL 638 1.000000 1.000000 1.000000
- *MESH_VERTCOL 639 1.000000 1.000000 1.000000
- *MESH_VERTCOL 640 1.000000 1.000000 1.000000
- *MESH_VERTCOL 641 1.000000 1.000000 1.000000
- *MESH_VERTCOL 642 1.000000 1.000000 1.000000
- *MESH_VERTCOL 643 1.000000 1.000000 1.000000
- *MESH_VERTCOL 644 1.000000 1.000000 1.000000
- *MESH_VERTCOL 645 1.000000 1.000000 1.000000
- *MESH_VERTCOL 646 1.000000 1.000000 1.000000
- *MESH_VERTCOL 647 1.000000 1.000000 1.000000
- *MESH_VERTCOL 648 1.000000 1.000000 1.000000
- *MESH_VERTCOL 649 1.000000 1.000000 1.000000
- *MESH_VERTCOL 650 1.000000 1.000000 1.000000
- *MESH_VERTCOL 651 1.000000 1.000000 1.000000
- *MESH_VERTCOL 652 1.000000 1.000000 1.000000
- *MESH_VERTCOL 653 1.000000 1.000000 1.000000
- *MESH_VERTCOL 654 1.000000 1.000000 1.000000
- *MESH_VERTCOL 655 1.000000 1.000000 1.000000
- *MESH_VERTCOL 656 1.000000 1.000000 1.000000
- *MESH_VERTCOL 657 1.000000 1.000000 1.000000
- *MESH_VERTCOL 658 1.000000 1.000000 1.000000
- *MESH_VERTCOL 659 1.000000 1.000000 1.000000
- *MESH_VERTCOL 660 1.000000 1.000000 1.000000
- *MESH_VERTCOL 661 1.000000 1.000000 1.000000
- *MESH_VERTCOL 662 1.000000 1.000000 1.000000
- *MESH_VERTCOL 663 1.000000 1.000000 1.000000
- *MESH_VERTCOL 664 1.000000 1.000000 1.000000
- *MESH_VERTCOL 665 1.000000 1.000000 1.000000
- *MESH_VERTCOL 666 1.000000 1.000000 1.000000
- *MESH_VERTCOL 667 1.000000 1.000000 1.000000
- *MESH_VERTCOL 668 1.000000 1.000000 1.000000
- *MESH_VERTCOL 669 1.000000 1.000000 1.000000
- *MESH_VERTCOL 670 1.000000 1.000000 1.000000
- *MESH_VERTCOL 671 1.000000 1.000000 1.000000
- *MESH_VERTCOL 672 1.000000 1.000000 1.000000
- *MESH_VERTCOL 673 1.000000 1.000000 1.000000
- *MESH_VERTCOL 674 1.000000 1.000000 1.000000
- *MESH_VERTCOL 675 1.000000 1.000000 1.000000
- *MESH_VERTCOL 676 1.000000 1.000000 1.000000
- *MESH_VERTCOL 677 1.000000 1.000000 1.000000
- *MESH_VERTCOL 678 1.000000 1.000000 1.000000
- *MESH_VERTCOL 679 1.000000 1.000000 1.000000
- *MESH_VERTCOL 680 1.000000 1.000000 1.000000
- *MESH_VERTCOL 681 1.000000 1.000000 1.000000
- *MESH_VERTCOL 682 1.000000 1.000000 1.000000
- *MESH_VERTCOL 683 1.000000 1.000000 1.000000
- *MESH_VERTCOL 684 1.000000 1.000000 1.000000
- *MESH_VERTCOL 685 1.000000 1.000000 1.000000
- *MESH_VERTCOL 686 1.000000 1.000000 1.000000
- *MESH_VERTCOL 687 1.000000 1.000000 1.000000
- *MESH_VERTCOL 688 1.000000 1.000000 1.000000
- *MESH_VERTCOL 689 1.000000 1.000000 1.000000
- *MESH_VERTCOL 690 1.000000 1.000000 1.000000
- *MESH_VERTCOL 691 1.000000 1.000000 1.000000
- *MESH_VERTCOL 692 1.000000 1.000000 1.000000
- *MESH_VERTCOL 693 1.000000 1.000000 1.000000
- *MESH_VERTCOL 694 1.000000 1.000000 1.000000
- *MESH_VERTCOL 695 1.000000 1.000000 1.000000
- *MESH_VERTCOL 696 1.000000 1.000000 1.000000
- *MESH_VERTCOL 697 1.000000 1.000000 1.000000
- *MESH_VERTCOL 698 1.000000 1.000000 1.000000
- *MESH_VERTCOL 699 1.000000 1.000000 1.000000
- *MESH_VERTCOL 700 1.000000 1.000000 1.000000
- *MESH_VERTCOL 701 1.000000 1.000000 1.000000
- *MESH_VERTCOL 702 1.000000 1.000000 1.000000
- *MESH_VERTCOL 703 1.000000 1.000000 1.000000
- *MESH_VERTCOL 704 1.000000 1.000000 1.000000
- *MESH_VERTCOL 705 1.000000 1.000000 1.000000
- *MESH_VERTCOL 706 1.000000 1.000000 1.000000
- *MESH_VERTCOL 707 1.000000 1.000000 1.000000
- *MESH_VERTCOL 708 1.000000 1.000000 1.000000
- *MESH_VERTCOL 709 1.000000 1.000000 1.000000
- *MESH_VERTCOL 710 1.000000 1.000000 1.000000
- *MESH_VERTCOL 711 1.000000 1.000000 1.000000
- *MESH_VERTCOL 712 1.000000 1.000000 1.000000
- *MESH_VERTCOL 713 1.000000 1.000000 1.000000
- *MESH_VERTCOL 714 1.000000 1.000000 1.000000
- *MESH_VERTCOL 715 1.000000 1.000000 1.000000
- *MESH_VERTCOL 716 1.000000 1.000000 1.000000
- *MESH_VERTCOL 717 1.000000 1.000000 1.000000
- *MESH_VERTCOL 718 1.000000 1.000000 1.000000
- *MESH_VERTCOL 719 1.000000 1.000000 1.000000
- *MESH_VERTCOL 720 1.000000 1.000000 1.000000
- *MESH_VERTCOL 721 1.000000 1.000000 1.000000
- *MESH_VERTCOL 722 1.000000 1.000000 1.000000
- *MESH_VERTCOL 723 1.000000 1.000000 1.000000
- *MESH_VERTCOL 724 1.000000 1.000000 1.000000
- *MESH_VERTCOL 725 1.000000 1.000000 1.000000
- *MESH_VERTCOL 726 1.000000 1.000000 1.000000
- *MESH_VERTCOL 727 1.000000 1.000000 1.000000
- *MESH_VERTCOL 728 1.000000 1.000000 1.000000
- *MESH_VERTCOL 729 1.000000 1.000000 1.000000
- *MESH_VERTCOL 730 1.000000 1.000000 1.000000
- *MESH_VERTCOL 731 1.000000 1.000000 1.000000
- *MESH_VERTCOL 732 1.000000 1.000000 1.000000
- *MESH_VERTCOL 733 1.000000 1.000000 1.000000
- *MESH_VERTCOL 734 1.000000 1.000000 1.000000
- *MESH_VERTCOL 735 1.000000 1.000000 1.000000
- *MESH_VERTCOL 736 1.000000 1.000000 1.000000
- *MESH_VERTCOL 737 1.000000 1.000000 1.000000
- *MESH_VERTCOL 738 1.000000 1.000000 1.000000
- *MESH_VERTCOL 739 1.000000 1.000000 1.000000
- *MESH_VERTCOL 740 1.000000 1.000000 1.000000
- *MESH_VERTCOL 741 1.000000 1.000000 1.000000
- *MESH_VERTCOL 742 1.000000 1.000000 1.000000
- *MESH_VERTCOL 743 1.000000 1.000000 1.000000
- *MESH_VERTCOL 744 1.000000 1.000000 1.000000
- *MESH_VERTCOL 745 1.000000 1.000000 1.000000
- *MESH_VERTCOL 746 1.000000 1.000000 1.000000
- *MESH_VERTCOL 747 1.000000 1.000000 1.000000
- *MESH_VERTCOL 748 1.000000 1.000000 1.000000
- *MESH_VERTCOL 749 1.000000 1.000000 1.000000
- *MESH_VERTCOL 750 1.000000 1.000000 1.000000
- *MESH_VERTCOL 751 1.000000 1.000000 1.000000
- *MESH_VERTCOL 752 1.000000 1.000000 1.000000
- *MESH_VERTCOL 753 1.000000 1.000000 1.000000
- *MESH_VERTCOL 754 1.000000 1.000000 1.000000
- *MESH_VERTCOL 755 1.000000 1.000000 1.000000
- *MESH_VERTCOL 756 1.000000 1.000000 1.000000
- *MESH_VERTCOL 757 1.000000 1.000000 1.000000
- *MESH_VERTCOL 758 1.000000 1.000000 1.000000
- *MESH_VERTCOL 759 1.000000 1.000000 1.000000
- *MESH_VERTCOL 760 1.000000 1.000000 1.000000
- *MESH_VERTCOL 761 1.000000 1.000000 1.000000
- *MESH_VERTCOL 762 1.000000 1.000000 1.000000
- *MESH_VERTCOL 763 1.000000 1.000000 1.000000
- *MESH_VERTCOL 764 1.000000 1.000000 1.000000
- *MESH_VERTCOL 765 1.000000 1.000000 1.000000
- *MESH_VERTCOL 766 1.000000 1.000000 1.000000
- *MESH_VERTCOL 767 1.000000 1.000000 1.000000
- *MESH_VERTCOL 768 1.000000 1.000000 1.000000
- *MESH_VERTCOL 769 1.000000 1.000000 1.000000
- *MESH_VERTCOL 770 1.000000 1.000000 1.000000
- *MESH_VERTCOL 771 1.000000 1.000000 1.000000
- *MESH_VERTCOL 772 1.000000 1.000000 1.000000
- *MESH_VERTCOL 773 1.000000 1.000000 1.000000
- *MESH_VERTCOL 774 1.000000 1.000000 1.000000
- *MESH_VERTCOL 775 1.000000 1.000000 1.000000
- *MESH_VERTCOL 776 1.000000 1.000000 1.000000
- *MESH_VERTCOL 777 1.000000 1.000000 1.000000
- *MESH_VERTCOL 778 1.000000 1.000000 1.000000
- *MESH_VERTCOL 779 1.000000 1.000000 1.000000
- *MESH_VERTCOL 780 1.000000 1.000000 1.000000
- *MESH_VERTCOL 781 1.000000 1.000000 1.000000
- *MESH_VERTCOL 782 1.000000 1.000000 1.000000
- *MESH_VERTCOL 783 1.000000 1.000000 1.000000
- *MESH_VERTCOL 784 1.000000 1.000000 1.000000
- *MESH_VERTCOL 785 1.000000 1.000000 1.000000
- *MESH_VERTCOL 786 1.000000 1.000000 1.000000
- *MESH_VERTCOL 787 1.000000 1.000000 1.000000
- *MESH_VERTCOL 788 1.000000 1.000000 1.000000
- *MESH_VERTCOL 789 1.000000 1.000000 1.000000
- *MESH_VERTCOL 790 1.000000 1.000000 1.000000
- *MESH_VERTCOL 791 1.000000 1.000000 1.000000
- *MESH_VERTCOL 792 1.000000 1.000000 1.000000
- *MESH_VERTCOL 793 1.000000 1.000000 1.000000
- *MESH_VERTCOL 794 1.000000 1.000000 1.000000
- *MESH_VERTCOL 795 1.000000 1.000000 1.000000
- *MESH_VERTCOL 796 1.000000 1.000000 1.000000
- *MESH_VERTCOL 797 1.000000 1.000000 1.000000
- *MESH_VERTCOL 798 1.000000 1.000000 1.000000
- *MESH_VERTCOL 799 1.000000 1.000000 1.000000
- *MESH_VERTCOL 800 1.000000 1.000000 1.000000
- *MESH_VERTCOL 801 1.000000 1.000000 1.000000
- *MESH_VERTCOL 802 1.000000 1.000000 1.000000
- *MESH_VERTCOL 803 1.000000 1.000000 1.000000
- *MESH_VERTCOL 804 1.000000 1.000000 1.000000
- *MESH_VERTCOL 805 1.000000 1.000000 1.000000
- *MESH_VERTCOL 806 1.000000 1.000000 1.000000
- *MESH_VERTCOL 807 1.000000 1.000000 1.000000
- *MESH_VERTCOL 808 1.000000 1.000000 1.000000
- *MESH_VERTCOL 809 1.000000 1.000000 1.000000
- *MESH_VERTCOL 810 1.000000 1.000000 1.000000
- *MESH_VERTCOL 811 1.000000 1.000000 1.000000
- *MESH_VERTCOL 812 1.000000 1.000000 1.000000
- *MESH_VERTCOL 813 1.000000 1.000000 1.000000
- *MESH_VERTCOL 814 1.000000 1.000000 1.000000
- *MESH_VERTCOL 815 1.000000 1.000000 1.000000
- *MESH_VERTCOL 816 1.000000 1.000000 1.000000
- *MESH_VERTCOL 817 1.000000 1.000000 1.000000
- *MESH_VERTCOL 818 1.000000 1.000000 1.000000
- *MESH_VERTCOL 819 1.000000 1.000000 1.000000
- *MESH_VERTCOL 820 1.000000 1.000000 1.000000
- *MESH_VERTCOL 821 1.000000 1.000000 1.000000
- *MESH_VERTCOL 822 1.000000 1.000000 1.000000
- *MESH_VERTCOL 823 1.000000 1.000000 1.000000
- *MESH_VERTCOL 824 1.000000 1.000000 1.000000
- *MESH_VERTCOL 825 1.000000 1.000000 1.000000
- *MESH_VERTCOL 826 1.000000 1.000000 1.000000
- *MESH_VERTCOL 827 1.000000 1.000000 1.000000
- *MESH_VERTCOL 828 1.000000 1.000000 1.000000
- *MESH_VERTCOL 829 1.000000 1.000000 1.000000
- *MESH_VERTCOL 830 1.000000 1.000000 1.000000
- *MESH_VERTCOL 831 1.000000 1.000000 1.000000
- *MESH_VERTCOL 832 1.000000 1.000000 1.000000
- *MESH_VERTCOL 833 1.000000 1.000000 1.000000
- *MESH_VERTCOL 834 1.000000 1.000000 1.000000
- *MESH_VERTCOL 835 1.000000 1.000000 1.000000
- *MESH_VERTCOL 836 1.000000 1.000000 1.000000
- *MESH_VERTCOL 837 1.000000 1.000000 1.000000
- *MESH_VERTCOL 838 1.000000 1.000000 1.000000
- *MESH_VERTCOL 839 1.000000 1.000000 1.000000
- *MESH_VERTCOL 840 1.000000 1.000000 1.000000
- *MESH_VERTCOL 841 1.000000 1.000000 1.000000
- *MESH_VERTCOL 842 1.000000 1.000000 1.000000
- *MESH_VERTCOL 843 1.000000 1.000000 1.000000
- *MESH_VERTCOL 844 1.000000 1.000000 1.000000
- *MESH_VERTCOL 845 1.000000 1.000000 1.000000
- *MESH_VERTCOL 846 1.000000 1.000000 1.000000
- *MESH_VERTCOL 847 1.000000 1.000000 1.000000
- *MESH_VERTCOL 848 1.000000 1.000000 1.000000
- *MESH_VERTCOL 849 1.000000 1.000000 1.000000
- *MESH_VERTCOL 850 1.000000 1.000000 1.000000
- *MESH_VERTCOL 851 1.000000 1.000000 1.000000
- *MESH_VERTCOL 852 1.000000 1.000000 1.000000
- *MESH_VERTCOL 853 1.000000 1.000000 1.000000
- *MESH_VERTCOL 854 1.000000 1.000000 1.000000
- *MESH_VERTCOL 855 1.000000 1.000000 1.000000
- *MESH_VERTCOL 856 1.000000 1.000000 1.000000
- *MESH_VERTCOL 857 1.000000 1.000000 1.000000
- *MESH_VERTCOL 858 1.000000 1.000000 1.000000
- *MESH_VERTCOL 859 1.000000 1.000000 1.000000
- *MESH_VERTCOL 860 1.000000 1.000000 1.000000
- *MESH_VERTCOL 861 1.000000 1.000000 1.000000
- *MESH_VERTCOL 862 1.000000 1.000000 1.000000
- *MESH_VERTCOL 863 1.000000 1.000000 1.000000
- *MESH_VERTCOL 864 1.000000 1.000000 1.000000
- *MESH_VERTCOL 865 1.000000 1.000000 1.000000
- *MESH_VERTCOL 866 1.000000 1.000000 1.000000
- *MESH_VERTCOL 867 1.000000 1.000000 1.000000
- *MESH_VERTCOL 868 1.000000 1.000000 1.000000
- *MESH_VERTCOL 869 1.000000 1.000000 1.000000
- *MESH_VERTCOL 870 1.000000 1.000000 1.000000
- *MESH_VERTCOL 871 1.000000 1.000000 1.000000
- *MESH_VERTCOL 872 1.000000 1.000000 1.000000
- *MESH_VERTCOL 873 1.000000 1.000000 1.000000
- *MESH_VERTCOL 874 1.000000 1.000000 1.000000
- *MESH_VERTCOL 875 1.000000 1.000000 1.000000
- *MESH_VERTCOL 876 1.000000 1.000000 1.000000
- *MESH_VERTCOL 877 1.000000 1.000000 1.000000
- *MESH_VERTCOL 878 1.000000 1.000000 1.000000
- *MESH_VERTCOL 879 1.000000 1.000000 1.000000
- *MESH_VERTCOL 880 1.000000 1.000000 1.000000
- *MESH_VERTCOL 881 1.000000 1.000000 1.000000
- *MESH_VERTCOL 882 1.000000 1.000000 1.000000
- *MESH_VERTCOL 883 1.000000 1.000000 1.000000
- *MESH_VERTCOL 884 1.000000 1.000000 1.000000
- *MESH_VERTCOL 885 1.000000 1.000000 1.000000
- *MESH_VERTCOL 886 1.000000 1.000000 1.000000
- *MESH_VERTCOL 887 1.000000 1.000000 1.000000
- *MESH_VERTCOL 888 1.000000 1.000000 1.000000
- *MESH_VERTCOL 889 1.000000 1.000000 1.000000
- *MESH_VERTCOL 890 1.000000 1.000000 1.000000
- *MESH_VERTCOL 891 1.000000 1.000000 1.000000
- *MESH_VERTCOL 892 1.000000 1.000000 1.000000
- *MESH_VERTCOL 893 1.000000 1.000000 1.000000
- *MESH_VERTCOL 894 1.000000 1.000000 1.000000
- *MESH_VERTCOL 895 1.000000 1.000000 1.000000
- *MESH_VERTCOL 896 1.000000 1.000000 1.000000
- *MESH_VERTCOL 897 1.000000 1.000000 1.000000
- *MESH_VERTCOL 898 1.000000 1.000000 1.000000
- *MESH_VERTCOL 899 1.000000 1.000000 1.000000
- *MESH_VERTCOL 900 1.000000 1.000000 1.000000
- *MESH_VERTCOL 901 1.000000 1.000000 1.000000
- *MESH_VERTCOL 902 1.000000 1.000000 1.000000
- *MESH_VERTCOL 903 1.000000 1.000000 1.000000
- *MESH_VERTCOL 904 1.000000 1.000000 1.000000
- *MESH_VERTCOL 905 1.000000 1.000000 1.000000
- *MESH_VERTCOL 906 1.000000 1.000000 1.000000
- *MESH_VERTCOL 907 1.000000 1.000000 1.000000
- *MESH_VERTCOL 908 1.000000 1.000000 1.000000
- *MESH_VERTCOL 909 1.000000 1.000000 1.000000
- *MESH_VERTCOL 910 1.000000 1.000000 1.000000
- *MESH_VERTCOL 911 1.000000 1.000000 1.000000
- *MESH_VERTCOL 912 1.000000 1.000000 1.000000
- *MESH_VERTCOL 913 1.000000 1.000000 1.000000
- *MESH_VERTCOL 914 1.000000 1.000000 1.000000
- *MESH_VERTCOL 915 1.000000 1.000000 1.000000
- *MESH_VERTCOL 916 1.000000 1.000000 1.000000
- *MESH_VERTCOL 917 1.000000 1.000000 1.000000
- *MESH_VERTCOL 918 1.000000 1.000000 1.000000
- *MESH_VERTCOL 919 1.000000 1.000000 1.000000
- *MESH_VERTCOL 920 1.000000 1.000000 1.000000
- *MESH_VERTCOL 921 1.000000 1.000000 1.000000
- *MESH_VERTCOL 922 1.000000 1.000000 1.000000
- *MESH_VERTCOL 923 1.000000 1.000000 1.000000
- *MESH_VERTCOL 924 1.000000 1.000000 1.000000
- *MESH_VERTCOL 925 1.000000 1.000000 1.000000
- *MESH_VERTCOL 926 1.000000 1.000000 1.000000
- *MESH_VERTCOL 927 1.000000 1.000000 1.000000
- *MESH_VERTCOL 928 1.000000 1.000000 1.000000
- *MESH_VERTCOL 929 1.000000 1.000000 1.000000
- *MESH_VERTCOL 930 1.000000 1.000000 1.000000
- *MESH_VERTCOL 931 1.000000 1.000000 1.000000
- *MESH_VERTCOL 932 1.000000 1.000000 1.000000
- *MESH_VERTCOL 933 1.000000 1.000000 1.000000
- *MESH_VERTCOL 934 1.000000 1.000000 1.000000
- *MESH_VERTCOL 935 1.000000 1.000000 1.000000
- *MESH_VERTCOL 936 1.000000 1.000000 1.000000
- *MESH_VERTCOL 937 1.000000 1.000000 1.000000
- *MESH_VERTCOL 938 1.000000 1.000000 1.000000
- *MESH_VERTCOL 939 1.000000 1.000000 1.000000
- *MESH_VERTCOL 940 1.000000 1.000000 1.000000
- *MESH_VERTCOL 941 1.000000 1.000000 1.000000
- *MESH_VERTCOL 942 1.000000 1.000000 1.000000
- *MESH_VERTCOL 943 1.000000 1.000000 1.000000
- *MESH_VERTCOL 944 1.000000 1.000000 1.000000
- *MESH_VERTCOL 945 1.000000 1.000000 1.000000
- *MESH_VERTCOL 946 1.000000 1.000000 1.000000
- *MESH_VERTCOL 947 1.000000 1.000000 1.000000
- *MESH_VERTCOL 948 1.000000 1.000000 1.000000
- *MESH_VERTCOL 949 1.000000 1.000000 1.000000
- *MESH_VERTCOL 950 1.000000 1.000000 1.000000
- *MESH_VERTCOL 951 1.000000 1.000000 1.000000
- *MESH_VERTCOL 952 1.000000 1.000000 1.000000
- *MESH_VERTCOL 953 1.000000 1.000000 1.000000
- *MESH_VERTCOL 954 1.000000 1.000000 1.000000
- *MESH_VERTCOL 955 1.000000 1.000000 1.000000
- *MESH_VERTCOL 956 1.000000 1.000000 1.000000
- *MESH_VERTCOL 957 1.000000 1.000000 1.000000
- *MESH_VERTCOL 958 1.000000 1.000000 1.000000
- *MESH_VERTCOL 959 1.000000 1.000000 1.000000
- *MESH_VERTCOL 960 1.000000 1.000000 1.000000
- *MESH_VERTCOL 961 1.000000 1.000000 1.000000
- *MESH_VERTCOL 962 1.000000 1.000000 1.000000
- *MESH_VERTCOL 963 1.000000 1.000000 1.000000
- *MESH_VERTCOL 964 1.000000 1.000000 1.000000
- *MESH_VERTCOL 965 1.000000 1.000000 1.000000
- *MESH_VERTCOL 966 1.000000 1.000000 1.000000
- *MESH_VERTCOL 967 1.000000 1.000000 1.000000
- *MESH_VERTCOL 968 1.000000 1.000000 1.000000
- *MESH_VERTCOL 969 1.000000 1.000000 1.000000
- *MESH_VERTCOL 970 1.000000 1.000000 1.000000
- *MESH_VERTCOL 971 1.000000 1.000000 1.000000
- *MESH_VERTCOL 972 1.000000 1.000000 1.000000
- *MESH_VERTCOL 973 1.000000 1.000000 1.000000
- *MESH_VERTCOL 974 1.000000 1.000000 1.000000
- *MESH_VERTCOL 975 1.000000 1.000000 1.000000
- *MESH_VERTCOL 976 1.000000 1.000000 1.000000
- *MESH_VERTCOL 977 1.000000 1.000000 1.000000
- *MESH_VERTCOL 978 1.000000 1.000000 1.000000
- *MESH_VERTCOL 979 1.000000 1.000000 1.000000
- *MESH_VERTCOL 980 1.000000 1.000000 1.000000
- *MESH_VERTCOL 981 1.000000 1.000000 1.000000
- *MESH_VERTCOL 982 1.000000 1.000000 1.000000
- *MESH_VERTCOL 983 1.000000 1.000000 1.000000
- *MESH_VERTCOL 984 1.000000 1.000000 1.000000
- *MESH_VERTCOL 985 1.000000 1.000000 1.000000
- *MESH_VERTCOL 986 1.000000 1.000000 1.000000
- *MESH_VERTCOL 987 1.000000 1.000000 1.000000
- *MESH_VERTCOL 988 1.000000 1.000000 1.000000
- *MESH_VERTCOL 989 1.000000 1.000000 1.000000
- *MESH_VERTCOL 990 1.000000 1.000000 1.000000
- *MESH_VERTCOL 991 1.000000 1.000000 1.000000
- *MESH_VERTCOL 992 1.000000 1.000000 1.000000
- *MESH_VERTCOL 993 1.000000 1.000000 1.000000
- *MESH_VERTCOL 994 1.000000 1.000000 1.000000
- *MESH_VERTCOL 995 1.000000 1.000000 1.000000
- *MESH_VERTCOL 996 1.000000 1.000000 1.000000
- *MESH_VERTCOL 997 1.000000 1.000000 1.000000
- *MESH_VERTCOL 998 1.000000 1.000000 1.000000
- *MESH_VERTCOL 999 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1000 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1001 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1002 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1003 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1004 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1005 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1006 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1007 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1008 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1009 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1010 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1011 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1012 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1013 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1014 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1015 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1016 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1017 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1018 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1019 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1020 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1021 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1022 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1023 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1024 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1025 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1026 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1027 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1028 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1029 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1030 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1031 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1032 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1033 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1034 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1035 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1036 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1037 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1038 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1039 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1040 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1041 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1042 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1043 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1044 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1045 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1046 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1047 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1048 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1049 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1050 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1051 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1052 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1053 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1054 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1055 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1056 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1057 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1058 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1059 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1060 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1061 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1062 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1063 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1064 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1065 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1066 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1067 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1068 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1069 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1070 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1071 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1072 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1073 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1074 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1075 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1076 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1077 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1078 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1079 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1080 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1081 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1082 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1083 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1084 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1085 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1086 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1087 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1088 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1089 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1090 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1091 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1092 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1093 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1094 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1095 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1096 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1097 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1098 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1099 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1100 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1101 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1102 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1103 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1104 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1105 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1106 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1107 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1108 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1109 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1110 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1111 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1112 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1113 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1114 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1115 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1116 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1117 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1118 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1119 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1120 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1121 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1122 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1123 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1124 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1125 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1126 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1127 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1128 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1129 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1130 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1131 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1132 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1133 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1134 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1135 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1136 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1137 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1138 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1139 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1140 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1141 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1142 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1143 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1144 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1145 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1146 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1147 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1148 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1149 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1150 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1151 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1152 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1153 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1154 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1155 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1156 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1157 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1158 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1159 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1160 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1161 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1162 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1163 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1164 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1165 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1166 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1167 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1168 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1169 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1170 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1171 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1172 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1173 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1174 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1175 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1176 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1177 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1178 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1179 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1180 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1181 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1182 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1183 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1184 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1185 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1186 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1187 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1188 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1189 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1190 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1191 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1192 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1193 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1194 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1195 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1196 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1197 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1198 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1199 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1200 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1201 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1202 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1203 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1204 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1205 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1206 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1207 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1208 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1209 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1210 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1211 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1212 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1213 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1214 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1215 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1216 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1217 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1218 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1219 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1220 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1221 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1222 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1223 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1224 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1225 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1226 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1227 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1228 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1229 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1230 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1231 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1232 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1233 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1234 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1235 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1236 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1237 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1238 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1239 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1240 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1241 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1242 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1243 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1244 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1245 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1246 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1247 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1248 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1249 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1250 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1251 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1252 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1253 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1254 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1255 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1256 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1257 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1258 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1259 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1260 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1261 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1262 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1263 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1264 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1265 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1266 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1267 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1268 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1269 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1270 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1271 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1272 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1273 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1274 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1275 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1276 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1277 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1278 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1279 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1280 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1281 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1282 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1283 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1284 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1285 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1286 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1287 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1288 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1289 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1290 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1291 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1292 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1293 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1294 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1295 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1296 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1297 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1298 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1299 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1300 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1301 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1302 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1303 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1304 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1305 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1306 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1307 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1308 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1309 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1310 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1311 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1312 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1313 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1314 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1315 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1316 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1317 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1318 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1319 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1320 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1321 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1322 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1323 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1324 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1325 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1326 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1327 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1328 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1329 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1330 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1331 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1332 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1333 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1334 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1335 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1336 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1337 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1338 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1339 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1340 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1341 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1342 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1343 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1344 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1345 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1346 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1347 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1348 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1349 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1350 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1351 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1352 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1353 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1354 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1355 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1356 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1357 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1358 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1359 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1360 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1361 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1362 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1363 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1364 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1365 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1366 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1367 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1368 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1369 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1370 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1371 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1372 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1373 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1374 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1375 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1376 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1377 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1378 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1379 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1380 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1381 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1382 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1383 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1384 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1385 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1386 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1387 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1388 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1389 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1390 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1391 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1392 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1393 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1394 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1395 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1396 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1397 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1398 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1399 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1400 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1401 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1402 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1403 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1404 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1405 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1406 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1407 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1408 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1409 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1410 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1411 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1412 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1413 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1414 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1415 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1416 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1417 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1418 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1419 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1420 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1421 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1422 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1423 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1424 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1425 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1426 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1427 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1428 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1429 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1430 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1431 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1432 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1433 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1434 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1435 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1436 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1437 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1438 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1439 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1440 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1441 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1442 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1443 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1444 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1445 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1446 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1447 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1448 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1449 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1450 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1451 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1452 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1453 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1454 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1455 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1456 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1457 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1458 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1459 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1460 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1461 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1462 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1463 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1464 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1465 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1466 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1467 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1468 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1469 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1470 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1471 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1472 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1473 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1474 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1475 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1476 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1477 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1478 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1479 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1480 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1481 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1482 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1483 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1484 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1485 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1486 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1487 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1488 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1489 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1490 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1491 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1492 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1493 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1494 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1495 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1496 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1497 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1498 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1499 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1500 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1501 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1502 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1503 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1504 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1505 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1506 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1507 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1508 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1509 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1510 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1511 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1512 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1513 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1514 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1515 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1516 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1517 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1518 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1519 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1520 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1521 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1522 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1523 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1524 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1525 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1526 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1527 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1528 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1529 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1530 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1531 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1532 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1533 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1534 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1535 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1536 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1537 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1538 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1539 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1540 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1541 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1542 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1543 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1544 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1545 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1546 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1547 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1548 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1549 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1550 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1551 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1552 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1553 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1554 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1555 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1556 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1557 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1558 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1559 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1560 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1561 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1562 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1563 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1564 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1565 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1566 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1567 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1568 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1569 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1570 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1571 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1572 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1573 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1574 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1575 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1576 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1577 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1578 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1579 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1580 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1581 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1582 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1583 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1584 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1585 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1586 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1587 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1588 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1589 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1590 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1591 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1592 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1593 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1594 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1595 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1596 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1597 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1598 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1599 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1600 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1601 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1602 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1603 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1604 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1605 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1606 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1607 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1608 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1609 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1610 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1611 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1612 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1613 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1614 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1615 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1616 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1617 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1618 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1619 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1620 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1621 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1622 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1623 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1624 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1625 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1626 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1627 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1628 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1629 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1630 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1631 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1632 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1633 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1634 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1635 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1636 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1637 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1638 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1639 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1640 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1641 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1642 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1643 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1644 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1645 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1646 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1647 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1648 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1649 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1650 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1651 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1652 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1653 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1654 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1655 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1656 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1657 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1658 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1659 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1660 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1661 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1662 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1663 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1664 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1665 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1666 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1667 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1668 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1669 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1670 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1671 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1672 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1673 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1674 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1675 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1676 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1677 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1678 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1679 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1680 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1681 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1682 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1683 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1684 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1685 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1686 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1687 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1688 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1689 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1690 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1691 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1692 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1693 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1694 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1695 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1696 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1697 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1698 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1699 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1700 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1701 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1702 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1703 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1704 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1705 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1706 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1707 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1708 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1709 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1710 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1711 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1712 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1713 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1714 1.000000 1.000000 1.000000
- *MESH_VERTCOL 1715 1.000000 1.000000 1.000000
- }
- *MESH_NUMCVFACES 572
- *MESH_CFACELIST {
- *MESH_CFACE 0 0 1 2
- *MESH_CFACE 1 3 4 5
- *MESH_CFACE 2 6 7 8
- *MESH_CFACE 3 9 10 11
- *MESH_CFACE 4 12 13 14
- *MESH_CFACE 5 15 16 17
- *MESH_CFACE 6 18 19 20
- *MESH_CFACE 7 21 22 23
- *MESH_CFACE 8 24 25 26
- *MESH_CFACE 9 27 28 29
- *MESH_CFACE 10 30 31 32
- *MESH_CFACE 11 33 34 35
- *MESH_CFACE 12 36 37 38
- *MESH_CFACE 13 39 40 41
- *MESH_CFACE 14 42 43 44
- *MESH_CFACE 15 45 46 47
- *MESH_CFACE 16 48 49 50
- *MESH_CFACE 17 51 52 53
- *MESH_CFACE 18 54 55 56
- *MESH_CFACE 19 57 58 59
- *MESH_CFACE 20 60 61 62
- *MESH_CFACE 21 63 64 65
- *MESH_CFACE 22 66 67 68
- *MESH_CFACE 23 69 70 71
- *MESH_CFACE 24 72 73 74
- *MESH_CFACE 25 75 76 77
- *MESH_CFACE 26 78 79 80
- *MESH_CFACE 27 81 82 83
- *MESH_CFACE 28 84 85 86
- *MESH_CFACE 29 87 88 89
- *MESH_CFACE 30 90 91 92
- *MESH_CFACE 31 93 94 95
- *MESH_CFACE 32 96 97 98
- *MESH_CFACE 33 99 100 101
- *MESH_CFACE 34 102 103 104
- *MESH_CFACE 35 105 106 107
- *MESH_CFACE 36 108 109 110
- *MESH_CFACE 37 111 112 113
- *MESH_CFACE 38 114 115 116
- *MESH_CFACE 39 117 118 119
- *MESH_CFACE 40 120 121 122
- *MESH_CFACE 41 123 124 125
- *MESH_CFACE 42 126 127 128
- *MESH_CFACE 43 129 130 131
- *MESH_CFACE 44 132 133 134
- *MESH_CFACE 45 135 136 137
- *MESH_CFACE 46 138 139 140
- *MESH_CFACE 47 141 142 143
- *MESH_CFACE 48 144 145 146
- *MESH_CFACE 49 147 148 149
- *MESH_CFACE 50 150 151 152
- *MESH_CFACE 51 153 154 155
- *MESH_CFACE 52 156 157 158
- *MESH_CFACE 53 159 160 161
- *MESH_CFACE 54 162 163 164
- *MESH_CFACE 55 165 166 167
- *MESH_CFACE 56 168 169 170
- *MESH_CFACE 57 171 172 173
- *MESH_CFACE 58 174 175 176
- *MESH_CFACE 59 177 178 179
- *MESH_CFACE 60 180 181 182
- *MESH_CFACE 61 183 184 185
- *MESH_CFACE 62 186 187 188
- *MESH_CFACE 63 189 190 191
- *MESH_CFACE 64 192 193 194
- *MESH_CFACE 65 195 196 197
- *MESH_CFACE 66 198 199 200
- *MESH_CFACE 67 201 202 203
- *MESH_CFACE 68 204 205 206
- *MESH_CFACE 69 207 208 209
- *MESH_CFACE 70 210 211 212
- *MESH_CFACE 71 213 214 215
- *MESH_CFACE 72 216 217 218
- *MESH_CFACE 73 219 220 221
- *MESH_CFACE 74 222 223 224
- *MESH_CFACE 75 225 226 227
- *MESH_CFACE 76 228 229 230
- *MESH_CFACE 77 231 232 233
- *MESH_CFACE 78 234 235 236
- *MESH_CFACE 79 237 238 239
- *MESH_CFACE 80 240 241 242
- *MESH_CFACE 81 243 244 245
- *MESH_CFACE 82 246 247 248
- *MESH_CFACE 83 249 250 251
- *MESH_CFACE 84 252 253 254
- *MESH_CFACE 85 255 256 257
- *MESH_CFACE 86 258 259 260
- *MESH_CFACE 87 261 262 263
- *MESH_CFACE 88 264 265 266
- *MESH_CFACE 89 267 268 269
- *MESH_CFACE 90 270 271 272
- *MESH_CFACE 91 273 274 275
- *MESH_CFACE 92 276 277 278
- *MESH_CFACE 93 279 280 281
- *MESH_CFACE 94 282 283 284
- *MESH_CFACE 95 285 286 287
- *MESH_CFACE 96 288 289 290
- *MESH_CFACE 97 291 292 293
- *MESH_CFACE 98 294 295 296
- *MESH_CFACE 99 297 298 299
- *MESH_CFACE 100 300 301 302
- *MESH_CFACE 101 303 304 305
- *MESH_CFACE 102 306 307 308
- *MESH_CFACE 103 309 310 311
- *MESH_CFACE 104 312 313 314
- *MESH_CFACE 105 315 316 317
- *MESH_CFACE 106 318 319 320
- *MESH_CFACE 107 321 322 323
- *MESH_CFACE 108 324 325 326
- *MESH_CFACE 109 327 328 329
- *MESH_CFACE 110 330 331 332
- *MESH_CFACE 111 333 334 335
- *MESH_CFACE 112 336 337 338
- *MESH_CFACE 113 339 340 341
- *MESH_CFACE 114 342 343 344
- *MESH_CFACE 115 345 346 347
- *MESH_CFACE 116 348 349 350
- *MESH_CFACE 117 351 352 353
- *MESH_CFACE 118 354 355 356
- *MESH_CFACE 119 357 358 359
- *MESH_CFACE 120 360 361 362
- *MESH_CFACE 121 363 364 365
- *MESH_CFACE 122 366 367 368
- *MESH_CFACE 123 369 370 371
- *MESH_CFACE 124 372 373 374
- *MESH_CFACE 125 375 376 377
- *MESH_CFACE 126 378 379 380
- *MESH_CFACE 127 381 382 383
- *MESH_CFACE 128 384 385 386
- *MESH_CFACE 129 387 388 389
- *MESH_CFACE 130 390 391 392
- *MESH_CFACE 131 393 394 395
- *MESH_CFACE 132 396 397 398
- *MESH_CFACE 133 399 400 401
- *MESH_CFACE 134 402 403 404
- *MESH_CFACE 135 405 406 407
- *MESH_CFACE 136 408 409 410
- *MESH_CFACE 137 411 412 413
- *MESH_CFACE 138 414 415 416
- *MESH_CFACE 139 417 418 419
- *MESH_CFACE 140 420 421 422
- *MESH_CFACE 141 423 424 425
- *MESH_CFACE 142 426 427 428
- *MESH_CFACE 143 429 430 431
- *MESH_CFACE 144 432 433 434
- *MESH_CFACE 145 435 436 437
- *MESH_CFACE 146 438 439 440
- *MESH_CFACE 147 441 442 443
- *MESH_CFACE 148 444 445 446
- *MESH_CFACE 149 447 448 449
- *MESH_CFACE 150 450 451 452
- *MESH_CFACE 151 453 454 455
- *MESH_CFACE 152 456 457 458
- *MESH_CFACE 153 459 460 461
- *MESH_CFACE 154 462 463 464
- *MESH_CFACE 155 465 466 467
- *MESH_CFACE 156 468 469 470
- *MESH_CFACE 157 471 472 473
- *MESH_CFACE 158 474 475 476
- *MESH_CFACE 159 477 478 479
- *MESH_CFACE 160 480 481 482
- *MESH_CFACE 161 483 484 485
- *MESH_CFACE 162 486 487 488
- *MESH_CFACE 163 489 490 491
- *MESH_CFACE 164 492 493 494
- *MESH_CFACE 165 495 496 497
- *MESH_CFACE 166 498 499 500
- *MESH_CFACE 167 501 502 503
- *MESH_CFACE 168 504 505 506
- *MESH_CFACE 169 507 508 509
- *MESH_CFACE 170 510 511 512
- *MESH_CFACE 171 513 514 515
- *MESH_CFACE 172 516 517 518
- *MESH_CFACE 173 519 520 521
- *MESH_CFACE 174 522 523 524
- *MESH_CFACE 175 525 526 527
- *MESH_CFACE 176 528 529 530
- *MESH_CFACE 177 531 532 533
- *MESH_CFACE 178 534 535 536
- *MESH_CFACE 179 537 538 539
- *MESH_CFACE 180 540 541 542
- *MESH_CFACE 181 543 544 545
- *MESH_CFACE 182 546 547 548
- *MESH_CFACE 183 549 550 551
- *MESH_CFACE 184 552 553 554
- *MESH_CFACE 185 555 556 557
- *MESH_CFACE 186 558 559 560
- *MESH_CFACE 187 561 562 563
- *MESH_CFACE 188 564 565 566
- *MESH_CFACE 189 567 568 569
- *MESH_CFACE 190 570 571 572
- *MESH_CFACE 191 573 574 575
- *MESH_CFACE 192 576 577 578
- *MESH_CFACE 193 579 580 581
- *MESH_CFACE 194 582 583 584
- *MESH_CFACE 195 585 586 587
- *MESH_CFACE 196 588 589 590
- *MESH_CFACE 197 591 592 593
- *MESH_CFACE 198 594 595 596
- *MESH_CFACE 199 597 598 599
- *MESH_CFACE 200 600 601 602
- *MESH_CFACE 201 603 604 605
- *MESH_CFACE 202 606 607 608
- *MESH_CFACE 203 609 610 611
- *MESH_CFACE 204 612 613 614
- *MESH_CFACE 205 615 616 617
- *MESH_CFACE 206 618 619 620
- *MESH_CFACE 207 621 622 623
- *MESH_CFACE 208 624 625 626
- *MESH_CFACE 209 627 628 629
- *MESH_CFACE 210 630 631 632
- *MESH_CFACE 211 633 634 635
- *MESH_CFACE 212 636 637 638
- *MESH_CFACE 213 639 640 641
- *MESH_CFACE 214 642 643 644
- *MESH_CFACE 215 645 646 647
- *MESH_CFACE 216 648 649 650
- *MESH_CFACE 217 651 652 653
- *MESH_CFACE 218 654 655 656
- *MESH_CFACE 219 657 658 659
- *MESH_CFACE 220 660 661 662
- *MESH_CFACE 221 663 664 665
- *MESH_CFACE 222 666 667 668
- *MESH_CFACE 223 669 670 671
- *MESH_CFACE 224 672 673 674
- *MESH_CFACE 225 675 676 677
- *MESH_CFACE 226 678 679 680
- *MESH_CFACE 227 681 682 683
- *MESH_CFACE 228 684 685 686
- *MESH_CFACE 229 687 688 689
- *MESH_CFACE 230 690 691 692
- *MESH_CFACE 231 693 694 695
- *MESH_CFACE 232 696 697 698
- *MESH_CFACE 233 699 700 701
- *MESH_CFACE 234 702 703 704
- *MESH_CFACE 235 705 706 707
- *MESH_CFACE 236 708 709 710
- *MESH_CFACE 237 711 712 713
- *MESH_CFACE 238 714 715 716
- *MESH_CFACE 239 717 718 719
- *MESH_CFACE 240 720 721 722
- *MESH_CFACE 241 723 724 725
- *MESH_CFACE 242 726 727 728
- *MESH_CFACE 243 729 730 731
- *MESH_CFACE 244 732 733 734
- *MESH_CFACE 245 735 736 737
- *MESH_CFACE 246 738 739 740
- *MESH_CFACE 247 741 742 743
- *MESH_CFACE 248 744 745 746
- *MESH_CFACE 249 747 748 749
- *MESH_CFACE 250 750 751 752
- *MESH_CFACE 251 753 754 755
- *MESH_CFACE 252 756 757 758
- *MESH_CFACE 253 759 760 761
- *MESH_CFACE 254 762 763 764
- *MESH_CFACE 255 765 766 767
- *MESH_CFACE 256 768 769 770
- *MESH_CFACE 257 771 772 773
- *MESH_CFACE 258 774 775 776
- *MESH_CFACE 259 777 778 779
- *MESH_CFACE 260 780 781 782
- *MESH_CFACE 261 783 784 785
- *MESH_CFACE 262 786 787 788
- *MESH_CFACE 263 789 790 791
- *MESH_CFACE 264 792 793 794
- *MESH_CFACE 265 795 796 797
- *MESH_CFACE 266 798 799 800
- *MESH_CFACE 267 801 802 803
- *MESH_CFACE 268 804 805 806
- *MESH_CFACE 269 807 808 809
- *MESH_CFACE 270 810 811 812
- *MESH_CFACE 271 813 814 815
- *MESH_CFACE 272 816 817 818
- *MESH_CFACE 273 819 820 821
- *MESH_CFACE 274 822 823 824
- *MESH_CFACE 275 825 826 827
- *MESH_CFACE 276 828 829 830
- *MESH_CFACE 277 831 832 833
- *MESH_CFACE 278 834 835 836
- *MESH_CFACE 279 837 838 839
- *MESH_CFACE 280 840 841 842
- *MESH_CFACE 281 843 844 845
- *MESH_CFACE 282 846 847 848
- *MESH_CFACE 283 849 850 851
- *MESH_CFACE 284 852 853 854
- *MESH_CFACE 285 855 856 857
- *MESH_CFACE 286 858 859 860
- *MESH_CFACE 287 861 862 863
- *MESH_CFACE 288 864 865 866
- *MESH_CFACE 289 867 868 869
- *MESH_CFACE 290 870 871 872
- *MESH_CFACE 291 873 874 875
- *MESH_CFACE 292 876 877 878
- *MESH_CFACE 293 879 880 881
- *MESH_CFACE 294 882 883 884
- *MESH_CFACE 295 885 886 887
- *MESH_CFACE 296 888 889 890
- *MESH_CFACE 297 891 892 893
- *MESH_CFACE 298 894 895 896
- *MESH_CFACE 299 897 898 899
- *MESH_CFACE 300 900 901 902
- *MESH_CFACE 301 903 904 905
- *MESH_CFACE 302 906 907 908
- *MESH_CFACE 303 909 910 911
- *MESH_CFACE 304 912 913 914
- *MESH_CFACE 305 915 916 917
- *MESH_CFACE 306 918 919 920
- *MESH_CFACE 307 921 922 923
- *MESH_CFACE 308 924 925 926
- *MESH_CFACE 309 927 928 929
- *MESH_CFACE 310 930 931 932
- *MESH_CFACE 311 933 934 935
- *MESH_CFACE 312 936 937 938
- *MESH_CFACE 313 939 940 941
- *MESH_CFACE 314 942 943 944
- *MESH_CFACE 315 945 946 947
- *MESH_CFACE 316 948 949 950
- *MESH_CFACE 317 951 952 953
- *MESH_CFACE 318 954 955 956
- *MESH_CFACE 319 957 958 959
- *MESH_CFACE 320 960 961 962
- *MESH_CFACE 321 963 964 965
- *MESH_CFACE 322 966 967 968
- *MESH_CFACE 323 969 970 971
- *MESH_CFACE 324 972 973 974
- *MESH_CFACE 325 975 976 977
- *MESH_CFACE 326 978 979 980
- *MESH_CFACE 327 981 982 983
- *MESH_CFACE 328 984 985 986
- *MESH_CFACE 329 987 988 989
- *MESH_CFACE 330 990 991 992
- *MESH_CFACE 331 993 994 995
- *MESH_CFACE 332 996 997 998
- *MESH_CFACE 333 999 1000 1001
- *MESH_CFACE 334 1002 1003 1004
- *MESH_CFACE 335 1005 1006 1007
- *MESH_CFACE 336 1008 1009 1010
- *MESH_CFACE 337 1011 1012 1013
- *MESH_CFACE 338 1014 1015 1016
- *MESH_CFACE 339 1017 1018 1019
- *MESH_CFACE 340 1020 1021 1022
- *MESH_CFACE 341 1023 1024 1025
- *MESH_CFACE 342 1026 1027 1028
- *MESH_CFACE 343 1029 1030 1031
- *MESH_CFACE 344 1032 1033 1034
- *MESH_CFACE 345 1035 1036 1037
- *MESH_CFACE 346 1038 1039 1040
- *MESH_CFACE 347 1041 1042 1043
- *MESH_CFACE 348 1044 1045 1046
- *MESH_CFACE 349 1047 1048 1049
- *MESH_CFACE 350 1050 1051 1052
- *MESH_CFACE 351 1053 1054 1055
- *MESH_CFACE 352 1056 1057 1058
- *MESH_CFACE 353 1059 1060 1061
- *MESH_CFACE 354 1062 1063 1064
- *MESH_CFACE 355 1065 1066 1067
- *MESH_CFACE 356 1068 1069 1070
- *MESH_CFACE 357 1071 1072 1073
- *MESH_CFACE 358 1074 1075 1076
- *MESH_CFACE 359 1077 1078 1079
- *MESH_CFACE 360 1080 1081 1082
- *MESH_CFACE 361 1083 1084 1085
- *MESH_CFACE 362 1086 1087 1088
- *MESH_CFACE 363 1089 1090 1091
- *MESH_CFACE 364 1092 1093 1094
- *MESH_CFACE 365 1095 1096 1097
- *MESH_CFACE 366 1098 1099 1100
- *MESH_CFACE 367 1101 1102 1103
- *MESH_CFACE 368 1104 1105 1106
- *MESH_CFACE 369 1107 1108 1109
- *MESH_CFACE 370 1110 1111 1112
- *MESH_CFACE 371 1113 1114 1115
- *MESH_CFACE 372 1116 1117 1118
- *MESH_CFACE 373 1119 1120 1121
- *MESH_CFACE 374 1122 1123 1124
- *MESH_CFACE 375 1125 1126 1127
- *MESH_CFACE 376 1128 1129 1130
- *MESH_CFACE 377 1131 1132 1133
- *MESH_CFACE 378 1134 1135 1136
- *MESH_CFACE 379 1137 1138 1139
- *MESH_CFACE 380 1140 1141 1142
- *MESH_CFACE 381 1143 1144 1145
- *MESH_CFACE 382 1146 1147 1148
- *MESH_CFACE 383 1149 1150 1151
- *MESH_CFACE 384 1152 1153 1154
- *MESH_CFACE 385 1155 1156 1157
- *MESH_CFACE 386 1158 1159 1160
- *MESH_CFACE 387 1161 1162 1163
- *MESH_CFACE 388 1164 1165 1166
- *MESH_CFACE 389 1167 1168 1169
- *MESH_CFACE 390 1170 1171 1172
- *MESH_CFACE 391 1173 1174 1175
- *MESH_CFACE 392 1176 1177 1178
- *MESH_CFACE 393 1179 1180 1181
- *MESH_CFACE 394 1182 1183 1184
- *MESH_CFACE 395 1185 1186 1187
- *MESH_CFACE 396 1188 1189 1190
- *MESH_CFACE 397 1191 1192 1193
- *MESH_CFACE 398 1194 1195 1196
- *MESH_CFACE 399 1197 1198 1199
- *MESH_CFACE 400 1200 1201 1202
- *MESH_CFACE 401 1203 1204 1205
- *MESH_CFACE 402 1206 1207 1208
- *MESH_CFACE 403 1209 1210 1211
- *MESH_CFACE 404 1212 1213 1214
- *MESH_CFACE 405 1215 1216 1217
- *MESH_CFACE 406 1218 1219 1220
- *MESH_CFACE 407 1221 1222 1223
- *MESH_CFACE 408 1224 1225 1226
- *MESH_CFACE 409 1227 1228 1229
- *MESH_CFACE 410 1230 1231 1232
- *MESH_CFACE 411 1233 1234 1235
- *MESH_CFACE 412 1236 1237 1238
- *MESH_CFACE 413 1239 1240 1241
- *MESH_CFACE 414 1242 1243 1244
- *MESH_CFACE 415 1245 1246 1247
- *MESH_CFACE 416 1248 1249 1250
- *MESH_CFACE 417 1251 1252 1253
- *MESH_CFACE 418 1254 1255 1256
- *MESH_CFACE 419 1257 1258 1259
- *MESH_CFACE 420 1260 1261 1262
- *MESH_CFACE 421 1263 1264 1265
- *MESH_CFACE 422 1266 1267 1268
- *MESH_CFACE 423 1269 1270 1271
- *MESH_CFACE 424 1272 1273 1274
- *MESH_CFACE 425 1275 1276 1277
- *MESH_CFACE 426 1278 1279 1280
- *MESH_CFACE 427 1281 1282 1283
- *MESH_CFACE 428 1284 1285 1286
- *MESH_CFACE 429 1287 1288 1289
- *MESH_CFACE 430 1290 1291 1292
- *MESH_CFACE 431 1293 1294 1295
- *MESH_CFACE 432 1296 1297 1298
- *MESH_CFACE 433 1299 1300 1301
- *MESH_CFACE 434 1302 1303 1304
- *MESH_CFACE 435 1305 1306 1307
- *MESH_CFACE 436 1308 1309 1310
- *MESH_CFACE 437 1311 1312 1313
- *MESH_CFACE 438 1314 1315 1316
- *MESH_CFACE 439 1317 1318 1319
- *MESH_CFACE 440 1320 1321 1322
- *MESH_CFACE 441 1323 1324 1325
- *MESH_CFACE 442 1326 1327 1328
- *MESH_CFACE 443 1329 1330 1331
- *MESH_CFACE 444 1332 1333 1334
- *MESH_CFACE 445 1335 1336 1337
- *MESH_CFACE 446 1338 1339 1340
- *MESH_CFACE 447 1341 1342 1343
- *MESH_CFACE 448 1344 1345 1346
- *MESH_CFACE 449 1347 1348 1349
- *MESH_CFACE 450 1350 1351 1352
- *MESH_CFACE 451 1353 1354 1355
- *MESH_CFACE 452 1356 1357 1358
- *MESH_CFACE 453 1359 1360 1361
- *MESH_CFACE 454 1362 1363 1364
- *MESH_CFACE 455 1365 1366 1367
- *MESH_CFACE 456 1368 1369 1370
- *MESH_CFACE 457 1371 1372 1373
- *MESH_CFACE 458 1374 1375 1376
- *MESH_CFACE 459 1377 1378 1379
- *MESH_CFACE 460 1380 1381 1382
- *MESH_CFACE 461 1383 1384 1385
- *MESH_CFACE 462 1386 1387 1388
- *MESH_CFACE 463 1389 1390 1391
- *MESH_CFACE 464 1392 1393 1394
- *MESH_CFACE 465 1395 1396 1397
- *MESH_CFACE 466 1398 1399 1400
- *MESH_CFACE 467 1401 1402 1403
- *MESH_CFACE 468 1404 1405 1406
- *MESH_CFACE 469 1407 1408 1409
- *MESH_CFACE 470 1410 1411 1412
- *MESH_CFACE 471 1413 1414 1415
- *MESH_CFACE 472 1416 1417 1418
- *MESH_CFACE 473 1419 1420 1421
- *MESH_CFACE 474 1422 1423 1424
- *MESH_CFACE 475 1425 1426 1427
- *MESH_CFACE 476 1428 1429 1430
- *MESH_CFACE 477 1431 1432 1433
- *MESH_CFACE 478 1434 1435 1436
- *MESH_CFACE 479 1437 1438 1439
- *MESH_CFACE 480 1440 1441 1442
- *MESH_CFACE 481 1443 1444 1445
- *MESH_CFACE 482 1446 1447 1448
- *MESH_CFACE 483 1449 1450 1451
- *MESH_CFACE 484 1452 1453 1454
- *MESH_CFACE 485 1455 1456 1457
- *MESH_CFACE 486 1458 1459 1460
- *MESH_CFACE 487 1461 1462 1463
- *MESH_CFACE 488 1464 1465 1466
- *MESH_CFACE 489 1467 1468 1469
- *MESH_CFACE 490 1470 1471 1472
- *MESH_CFACE 491 1473 1474 1475
- *MESH_CFACE 492 1476 1477 1478
- *MESH_CFACE 493 1479 1480 1481
- *MESH_CFACE 494 1482 1483 1484
- *MESH_CFACE 495 1485 1486 1487
- *MESH_CFACE 496 1488 1489 1490
- *MESH_CFACE 497 1491 1492 1493
- *MESH_CFACE 498 1494 1495 1496
- *MESH_CFACE 499 1497 1498 1499
- *MESH_CFACE 500 1500 1501 1502
- *MESH_CFACE 501 1503 1504 1505
- *MESH_CFACE 502 1506 1507 1508
- *MESH_CFACE 503 1509 1510 1511
- *MESH_CFACE 504 1512 1513 1514
- *MESH_CFACE 505 1515 1516 1517
- *MESH_CFACE 506 1518 1519 1520
- *MESH_CFACE 507 1521 1522 1523
- *MESH_CFACE 508 1524 1525 1526
- *MESH_CFACE 509 1527 1528 1529
- *MESH_CFACE 510 1530 1531 1532
- *MESH_CFACE 511 1533 1534 1535
- *MESH_CFACE 512 1536 1537 1538
- *MESH_CFACE 513 1539 1540 1541
- *MESH_CFACE 514 1542 1543 1544
- *MESH_CFACE 515 1545 1546 1547
- *MESH_CFACE 516 1548 1549 1550
- *MESH_CFACE 517 1551 1552 1553
- *MESH_CFACE 518 1554 1555 1556
- *MESH_CFACE 519 1557 1558 1559
- *MESH_CFACE 520 1560 1561 1562
- *MESH_CFACE 521 1563 1564 1565
- *MESH_CFACE 522 1566 1567 1568
- *MESH_CFACE 523 1569 1570 1571
- *MESH_CFACE 524 1572 1573 1574
- *MESH_CFACE 525 1575 1576 1577
- *MESH_CFACE 526 1578 1579 1580
- *MESH_CFACE 527 1581 1582 1583
- *MESH_CFACE 528 1584 1585 1586
- *MESH_CFACE 529 1587 1588 1589
- *MESH_CFACE 530 1590 1591 1592
- *MESH_CFACE 531 1593 1594 1595
- *MESH_CFACE 532 1596 1597 1598
- *MESH_CFACE 533 1599 1600 1601
- *MESH_CFACE 534 1602 1603 1604
- *MESH_CFACE 535 1605 1606 1607
- *MESH_CFACE 536 1608 1609 1610
- *MESH_CFACE 537 1611 1612 1613
- *MESH_CFACE 538 1614 1615 1616
- *MESH_CFACE 539 1617 1618 1619
- *MESH_CFACE 540 1620 1621 1622
- *MESH_CFACE 541 1623 1624 1625
- *MESH_CFACE 542 1626 1627 1628
- *MESH_CFACE 543 1629 1630 1631
- *MESH_CFACE 544 1632 1633 1634
- *MESH_CFACE 545 1635 1636 1637
- *MESH_CFACE 546 1638 1639 1640
- *MESH_CFACE 547 1641 1642 1643
- *MESH_CFACE 548 1644 1645 1646
- *MESH_CFACE 549 1647 1648 1649
- *MESH_CFACE 550 1650 1651 1652
- *MESH_CFACE 551 1653 1654 1655
- *MESH_CFACE 552 1656 1657 1658
- *MESH_CFACE 553 1659 1660 1661
- *MESH_CFACE 554 1662 1663 1664
- *MESH_CFACE 555 1665 1666 1667
- *MESH_CFACE 556 1668 1669 1670
- *MESH_CFACE 557 1671 1672 1673
- *MESH_CFACE 558 1674 1675 1676
- *MESH_CFACE 559 1677 1678 1679
- *MESH_CFACE 560 1680 1681 1682
- *MESH_CFACE 561 1683 1684 1685
- *MESH_CFACE 562 1686 1687 1688
- *MESH_CFACE 563 1689 1690 1691
- *MESH_CFACE 564 1692 1693 1694
- *MESH_CFACE 565 1695 1696 1697
- *MESH_CFACE 566 1698 1699 1700
- *MESH_CFACE 567 1701 1702 1703
- *MESH_CFACE 568 1704 1705 1706
- *MESH_CFACE 569 1707 1708 1709
- *MESH_CFACE 570 1710 1711 1712
- *MESH_CFACE 571 1713 1714 1715
- }
- }
- *PROP_MOTIONBLUR 0
- *PROP_CASTSHADOW 1
- *PROP_RECVSHADOW 1
- *MATERIAL_REF 0
-}
+*3DSMAX_ASCIIEXPORT 200
+*COMMENT "created by AC3D."
+*SCENE {
+ *SCENE_FILENAME ""
+ *SCENE_FIRSTFRAME 0
+ *SCENE_LASTFRAME 100
+ *SCENE_FRAMESPEED 30
+ *SCENE_TICKSPERFRAME 160
+ *SCENE_BACKGROUND_STATIC 0.0000 0.0000 0.0000
+ *SCENE_AMBIENT_STATIC 0.0431 0.0431 0.0431
+}
+*MATERIAL_LIST {
+ *MATERIAL_COUNT 23
+ *MATERIAL 0 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.588235 0.588235 0.588235
+ *MATERIAL_DIFFUSE 1.000000 1.000000 1.000000
+ *MATERIAL_SPECULAR 0.898039 0.898039 0.898039
+ *MATERIAL_SHINE 128.000000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ *MAP_DIFFUSE {
+ *MAP_NAME "Map #1"
+ *MAP_CLASS "Bitmap"
+ *MAP_SUBNO 1
+ *MAP_AMOUNT 1.0000
+ *BITMAP "../3DS/m_rifl.bmp"
+ *MAP_TYPE Screen
+ *UVW_U_OFFSET 0.000000
+ *UVW_V_OFFSET 0.000000
+ *UVW_U_TILING 1.000000
+ *UVW_V_TILING 1.000000
+ *UVW_ANGLE 0.0000
+ *UVW_BLUR 1.0000
+ *UVW_BLUR_OFFSET 0.0000
+ *UVW_NOUSE_AMT 1.0000
+ *UVW_NOISE_SIZE 1.0000
+ *UVW_NOISE_LEVEL 1
+ *UVW_NOISE_PHASE 0.0000
+ *BITMAP_FILTER Pyramidal
+ }
+ }
+ *MATERIAL 1 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
+ *MATERIAL_DIFFUSE 0.000000 0.000000 0.000000
+ *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
+ *MATERIAL_SHINE 128.000000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 2 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
+ *MATERIAL_DIFFUSE 1.000000 1.000000 1.000000
+ *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
+ *MATERIAL_SHINE 128.000000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 3 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
+ *MATERIAL_DIFFUSE 0.627451 0.250980 0.250980
+ *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
+ *MATERIAL_SHINE 128.000000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 4 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
+ *MATERIAL_DIFFUSE 1.000000 0.000000 0.000000
+ *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
+ *MATERIAL_SHINE 128.000000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 5 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
+ *MATERIAL_DIFFUSE 1.000000 0.466667 0.000000
+ *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
+ *MATERIAL_SHINE 128.000000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 6 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
+ *MATERIAL_DIFFUSE 1.000000 1.000000 0.000000
+ *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
+ *MATERIAL_SHINE 128.000000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 7 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
+ *MATERIAL_DIFFUSE 0.000000 1.000000 0.000000
+ *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
+ *MATERIAL_SHINE 128.000000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 8 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
+ *MATERIAL_DIFFUSE 0.270588 0.525490 0.454902
+ *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
+ *MATERIAL_SHINE 128.000000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 9 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
+ *MATERIAL_DIFFUSE 0.627451 0.752941 0.878431
+ *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
+ *MATERIAL_SHINE 128.000000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 10 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
+ *MATERIAL_DIFFUSE 0.000000 0.000000 1.000000
+ *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
+ *MATERIAL_SHINE 128.000000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 11 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
+ *MATERIAL_DIFFUSE 0.509804 0.000000 0.294118
+ *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
+ *MATERIAL_SHINE 128.000000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 12 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
+ *MATERIAL_DIFFUSE 0.933333 0.501961 0.933333
+ *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
+ *MATERIAL_SHINE 128.000000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 13 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
+ *MATERIAL_DIFFUSE 0.266667 0.266667 0.266667
+ *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
+ *MATERIAL_SHINE 128.000000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 14 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
+ *MATERIAL_DIFFUSE 0.533333 0.533333 0.533333
+ *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
+ *MATERIAL_SHINE 128.000000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 15 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
+ *MATERIAL_DIFFUSE 0.800000 0.800000 0.800000
+ *MATERIAL_SPECULAR 0.200000 0.200000 0.200000
+ *MATERIAL_SHINE 128.000000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 16 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.200000 0.200000 0.200000
+ *MATERIAL_DIFFUSE 1.000000 0.501961 0.752941
+ *MATERIAL_SPECULAR 0.000000 0.000000 0.000000
+ *MATERIAL_SHINE 0.000000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 17 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.588235 0.588235 0.588235
+ *MATERIAL_DIFFUSE 0.588235 0.588235 0.588235
+ *MATERIAL_SPECULAR 0.898039 0.898039 0.898039
+ *MATERIAL_SHINE 12.800000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 18 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.588235 0.588235 0.588235
+ *MATERIAL_DIFFUSE 0.588235 0.588235 0.588235
+ *MATERIAL_SPECULAR 0.898039 0.898039 0.898039
+ *MATERIAL_SHINE 12.800000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 19 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.588235 0.588235 0.588235
+ *MATERIAL_DIFFUSE 0.588235 0.588235 0.588235
+ *MATERIAL_SPECULAR 0.898039 0.898039 0.898039
+ *MATERIAL_SHINE 12.800000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 20 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.878431 0.878431 0.878431
+ *MATERIAL_DIFFUSE 0.878431 0.878431 0.878431
+ *MATERIAL_SPECULAR 1.000000 1.000000 1.000000
+ *MATERIAL_SHINE 19.200001
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 21 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.878431 0.878431 0.878431
+ *MATERIAL_DIFFUSE 0.878431 0.878431 0.878431
+ *MATERIAL_SPECULAR 1.000000 1.000000 1.000000
+ *MATERIAL_SHINE 19.200001
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+ *MATERIAL 22 {
+ *MATERIAL_NAME "Material "
+ *MATERIAL_CLASS "Standard"
+ *MATERIAL_AMBIENT 0.588235 0.588235 0.588235
+ *MATERIAL_DIFFUSE 1.000000 1.000000 1.000000
+ *MATERIAL_SPECULAR 0.898039 0.898039 0.898039
+ *MATERIAL_SHINE 128.000000
+ *MATERIAL_TRANSPARENCY 0.000000
+ *MATERIAL_WIRESIZE 1.0000
+ *MATERIAL_SHADING Blinn
+ *MATERIAL_XP_FALLOFF 0.0000
+ *MATERIAL_SELFILLUM 0.0000
+ *MATERIAL_TWOSIDED
+ *MATERIAL_FALLOFF In
+ *MATERIAL_SOFTEN
+ *MATERIAL_XP_TYPE Filter
+ }
+}
+
+*GEOMOBJECT {
+ *NODE_NAME "m_rifle"
+ *NODE_TM {
+ *NODE_NAME "Object01"
+ *INHERIT_POS 0 0 0
+ *INHERIT_ROT 0 0 0
+ *INHERIT_SCL 0 0 0
+ *TM_ROW0 1.0000 0.0000 0.0000
+ *TM_ROW1 0.0000 1.0000 0.0000
+ *TM_ROW2 0.0000 0.0000 1.0000
+ *TM_ROW3 0.0000 0.0000 0.0000
+ *TM_POS 0.0000 0.0000 0.0000
+ *TM_ROTAXIS 0.0000 0.0000 0.0000
+ *TM_ROTANGLE 0.0000
+ *TM_SCALE 1.0000 1.0000 1.0000
+ *TM_SCALEAXIS 0.0000 0.0000 0.0000
+ *TM_SCALEAXISANG 0.0000
+ }
+ *MESH {
+ *TIMEVALUE 0
+ *MESH_NUMVERTEX 337
+ *MESH_NUMFACES 572
+ *MESH_VERTEX_LIST {
+ *MESH_VERTEX 0 -0.597006 18.421190 -22.535984
+ *MESH_VERTEX 1 -0.597007 19.527948 -7.871955
+ *MESH_VERTEX 2 -0.597007 18.421190 33.374268
+ *MESH_VERTEX 3 -0.597007 19.527948 32.448418
+ *MESH_VERTEX 4 -0.597006 20.232851 -20.983131
+ *MESH_VERTEX 5 -0.597007 20.232853 -9.281762
+ *MESH_VERTEX 6 0.597023 18.421190 33.374268
+ *MESH_VERTEX 7 0.597023 18.421190 -22.535984
+ *MESH_VERTEX 8 0.597023 19.527948 32.448418
+ *MESH_VERTEX 9 0.597023 19.527948 -7.871955
+ *MESH_VERTEX 10 0.597023 20.232851 -20.983131
+ *MESH_VERTEX 11 0.597023 20.232855 -9.281762
+ *MESH_VERTEX 12 -1.097007 20.232851 -20.983131
+ *MESH_VERTEX 13 -1.097007 20.232855 -9.281762
+ *MESH_VERTEX 14 -1.129967 19.527954 -7.871955
+ *MESH_VERTEX 15 -1.129968 19.527952 32.448418
+ *MESH_VERTEX 16 -1.466161 12.337952 -27.750191
+ *MESH_VERTEX 17 1.466200 12.337950 -27.750191
+ *MESH_VERTEX 18 1.097046 20.232851 -20.983131
+ *MESH_VERTEX 19 1.130006 19.527948 32.448418
+ *MESH_VERTEX 20 3.476478 4.865994 44.713707
+ *MESH_VERTEX 21 -3.476444 4.865994 44.713707
+ *MESH_VERTEX 22 1.406872 13.606778 20.888004
+ *MESH_VERTEX 23 -1.406833 13.606778 20.888004
+ *MESH_VERTEX 24 -1.406833 13.606778 29.346819
+ *MESH_VERTEX 25 1.406872 13.606778 29.346819
+ *MESH_VERTEX 26 -1.327729 15.298541 29.346819
+ *MESH_VERTEX 27 1.327767 15.298541 29.346819
+ *MESH_VERTEX 28 -3.345925 7.657332 15.755142
+ *MESH_VERTEX 29 3.403965 6.416777 14.684864
+ *MESH_VERTEX 30 -3.403931 6.416778 14.684864
+ *MESH_VERTEX 31 3.345959 7.657331 15.755142
+ *MESH_VERTEX 32 2.590194 6.980697 -15.484935
+ *MESH_VERTEX 33 -2.590173 6.980697 -15.484935
+ *MESH_VERTEX 34 -2.616541 6.416777 -12.947289
+ *MESH_VERTEX 35 2.616514 6.416777 -12.947289
+ *MESH_VERTEX 36 2.451761 9.941286 -16.471800
+ *MESH_VERTEX 37 -2.451740 9.941287 -16.471800
+ *MESH_VERTEX 38 -2.511069 8.672463 -16.471800
+ *MESH_VERTEX 39 2.511090 8.672463 -16.471800
+ *MESH_VERTEX 40 -1.327728 15.298539 -12.242387
+ *MESH_VERTEX 41 1.327767 15.298539 0.546196
+ *MESH_VERTEX 42 1.327767 15.298539 -12.242387
+ *MESH_VERTEX 43 -1.327728 15.298539 0.546196
+ *MESH_VERTEX 44 -1.452976 12.619911 -34.376270
+ *MESH_VERTEX 45 -1.479345 12.055991 -29.723913
+ *MESH_VERTEX 46 -1.426608 13.183834 -29.864895
+ *MESH_VERTEX 47 -1.861682 3.879130 -30.710775
+ *MESH_VERTEX 48 -1.888050 3.315209 -35.927044
+ *MESH_VERTEX 49 1.452994 12.619911 -34.376270
+ *MESH_VERTEX 50 1.861723 3.879130 -30.710775
+ *MESH_VERTEX 51 1.888069 3.315209 -35.927044
+ *MESH_VERTEX 52 1.479384 12.055990 -29.723913
+ *MESH_VERTEX 53 1.426626 13.183834 -29.864895
+ *MESH_VERTEX 54 1.097046 20.232855 -9.281762
+ *MESH_VERTEX 55 1.130006 19.527954 -7.871955
+ *MESH_VERTEX 56 -3.476444 4.865994 21.310980
+ *MESH_VERTEX 57 3.476478 4.865994 21.310980
+ *MESH_VERTEX 58 -3.522588 3.879133 19.901173
+ *MESH_VERTEX 59 3.522622 3.879132 19.901173
+ *MESH_VERTEX 60 -1.268627 1.335282 -13.692022
+ *MESH_VERTEX 61 -1.268627 2.395683 -3.956190
+ *MESH_VERTEX 62 -1.268627 1.519322 -31.728071
+ *MESH_VERTEX 63 -1.268634 -4.378830 -3.956153
+ *MESH_VERTEX 64 -1.268627 -0.505130 -10.931402
+ *MESH_VERTEX 65 -1.268627 2.991655 22.011986
+ *MESH_VERTEX 66 -1.268606 -2.354467 6.336944
+ *MESH_VERTEX 67 -1.791036 -0.432972 22.011986
+ *MESH_VERTEX 68 -1.268627 5.200150 21.091782
+ *MESH_VERTEX 69 -1.268627 2.395662 6.336932
+ *MESH_VERTEX 70 -1.268627 -6.762532 17.779032
+ *MESH_VERTEX 71 -1.268627 -6.762532 23.673315
+ *MESH_VERTEX 72 -1.791044 -6.055178 23.673315
+ *MESH_VERTEX 73 -2.271622 -0.432971 46.673500
+ *MESH_VERTEX 74 -1.791044 -6.055173 46.673500
+ *MESH_VERTEX 75 -0.866355 -2.421297 4.930994
+ *MESH_VERTEX 76 -0.866355 -3.849836 3.165480
+ *MESH_VERTEX 77 -0.866355 -4.738063 6.336929
+ *MESH_VERTEX 78 -0.866355 -3.948467 -0.586525
+ *MESH_VERTEX 79 -0.866355 -3.012460 -2.409276
+ *MESH_VERTEX 80 -0.866355 -4.379151 -3.946998
+ *MESH_VERTEX 81 -0.866355 -1.633080 -3.197495
+ *MESH_VERTEX 82 -0.866355 -0.155174 -3.049704
+ *MESH_VERTEX 83 -0.866355 2.395641 -3.956149
+ *MESH_VERTEX 84 -0.866355 0.583780 -2.064428
+ *MESH_VERTEX 85 -0.866355 2.395641 6.336948
+ *MESH_VERTEX 86 -0.866355 0.633044 5.669950
+ *MESH_VERTEX 87 -0.866355 -0.992653 5.669950
+ *MESH_VERTEX 88 -1.268627 -4.738078 13.177999
+ *MESH_VERTEX 89 -1.268627 -4.738078 6.336948
+ *MESH_VERTEX 90 -1.268627 4.095901 -33.936569
+ *MESH_VERTEX 91 -1.268627 -4.369996 -12.771817
+ *MESH_VERTEX 92 -1.268627 -7.682738 -7.250585
+ *MESH_VERTEX 93 -1.268627 -12.099727 17.779032
+ *MESH_VERTEX 94 -1.268627 -12.099727 13.177996
+ *MESH_VERTEX 95 -1.268627 -11.547604 -15.716476
+ *MESH_VERTEX 96 -1.268627 -13.203976 -8.354830
+ *MESH_VERTEX 97 -1.268627 -8.234862 -16.084558
+ *MESH_VERTEX 98 -1.268627 -15.228430 -10.747362
+ *MESH_VERTEX 99 1.268665 1.335282 -13.692022
+ *MESH_VERTEX 100 1.268665 -4.378830 -3.956153
+ *MESH_VERTEX 101 1.268665 -0.505130 -10.931402
+ *MESH_VERTEX 102 1.268665 2.395683 -3.956172
+ *MESH_VERTEX 103 1.268665 -2.354467 6.336944
+ *MESH_VERTEX 104 1.268665 2.991655 22.011986
+ *MESH_VERTEX 105 1.791053 -0.432972 22.011986
+ *MESH_VERTEX 106 1.268665 5.200149 21.091782
+ *MESH_VERTEX 107 1.268665 2.395684 6.336914
+ *MESH_VERTEX 108 1.268665 -6.762532 23.673315
+ *MESH_VERTEX 109 1.268665 -6.762532 17.779032
+ *MESH_VERTEX 110 1.791053 -6.055216 23.673315
+ *MESH_VERTEX 111 2.271650 -0.432971 46.673500
+ *MESH_VERTEX 112 1.791053 -6.055213 46.673500
+ *MESH_VERTEX 113 0.866362 -3.849941 3.157503
+ *MESH_VERTEX 114 0.866362 -2.421297 4.930994
+ *MESH_VERTEX 115 0.866362 -4.738010 6.336914
+ *MESH_VERTEX 116 0.866362 -3.012459 -2.409276
+ *MESH_VERTEX 117 0.866362 -3.948467 -0.586525
+ *MESH_VERTEX 118 0.866362 -4.379152 -3.946998
+ *MESH_VERTEX 119 0.866362 -1.633080 -3.197491
+ *MESH_VERTEX 120 0.866362 -0.155174 -3.049704
+ *MESH_VERTEX 121 0.866362 2.395641 -3.956149
+ *MESH_VERTEX 122 0.866362 0.583780 -2.064428
+ *MESH_VERTEX 123 0.866362 2.395641 6.336948
+ *MESH_VERTEX 124 0.866362 0.633045 5.669950
+ *MESH_VERTEX 125 0.866362 -0.992653 5.669950
+ *MESH_VERTEX 126 1.268665 -4.738078 13.177999
+ *MESH_VERTEX 127 1.268665 -4.738078 6.336948
+ *MESH_VERTEX 128 1.268665 1.519322 -31.728071
+ *MESH_VERTEX 129 1.268665 4.095901 -33.936569
+ *MESH_VERTEX 130 1.268665 -4.369996 -12.771817
+ *MESH_VERTEX 131 1.268665 -7.682738 -7.250585
+ *MESH_VERTEX 132 1.268665 -12.099727 17.779032
+ *MESH_VERTEX 133 1.268665 -12.099727 13.177996
+ *MESH_VERTEX 134 1.268665 -13.203976 -8.354830
+ *MESH_VERTEX 135 1.268665 -11.547604 -15.716476
+ *MESH_VERTEX 136 1.268665 -8.234862 -16.084558
+ *MESH_VERTEX 137 1.268665 -15.228430 -10.747362
+ *MESH_VERTEX 138 0.561346 -6.762531 46.673500
+ *MESH_VERTEX 139 0.561349 -6.762532 23.673315
+ *MESH_VERTEX 140 -0.561256 -6.762532 23.673326
+ *MESH_VERTEX 141 -0.561252 -6.762531 46.673500
+ *MESH_VERTEX 142 -1.268648 -1.522434 -3.956153
+ *MESH_VERTEX 143 -1.268648 -0.028225 -3.956153
+ *MESH_VERTEX 144 -1.268648 0.830573 6.336948
+ *MESH_VERTEX 145 -1.268648 -0.724812 6.336944
+ *MESH_VERTEX 146 -1.268648 -1.758248 6.336944
+ *MESH_VERTEX 147 0.000008 9.226812 70.487350
+ *MESH_VERTEX 148 0.918522 8.696509 70.487350
+ *MESH_VERTEX 149 1.060616 9.226812 70.487350
+ *MESH_VERTEX 150 0.530312 8.308300 70.487350
+ *MESH_VERTEX 151 0.000008 8.166205 70.487350
+ *MESH_VERTEX 152 -0.530296 8.308300 70.487350
+ *MESH_VERTEX 153 -0.918505 8.696509 70.487350
+ *MESH_VERTEX 154 -1.060600 9.226812 70.487350
+ *MESH_VERTEX 155 -0.918505 9.757117 70.487350
+ *MESH_VERTEX 156 -0.530296 10.145326 70.487350
+ *MESH_VERTEX 157 0.000008 10.287420 70.487350
+ *MESH_VERTEX 158 0.530312 10.145326 70.487350
+ *MESH_VERTEX 159 0.918522 9.757117 70.487350
+ *MESH_VERTEX 160 0.918520 8.696505 68.392471
+ *MESH_VERTEX 161 1.060615 9.226810 68.392471
+ *MESH_VERTEX 162 0.530311 8.308295 68.392471
+ *MESH_VERTEX 163 0.000007 8.166201 68.392471
+ *MESH_VERTEX 164 -0.530297 8.308295 68.392471
+ *MESH_VERTEX 165 -0.918507 8.696505 68.392471
+ *MESH_VERTEX 166 -1.060602 9.226810 68.392471
+ *MESH_VERTEX 167 -0.918507 9.757113 68.392471
+ *MESH_VERTEX 168 -0.530297 10.145323 68.392471
+ *MESH_VERTEX 169 0.000007 10.287416 68.392471
+ *MESH_VERTEX 170 0.530311 10.145323 68.392471
+ *MESH_VERTEX 171 0.918520 9.757113 68.392471
+ *MESH_VERTEX 172 -0.917963 6.865224 68.292030
+ *MESH_VERTEX 173 -1.422246 4.829766 47.780525
+ *MESH_VERTEX 174 -1.746555 2.834796 70.525200
+ *MESH_VERTEX 175 -1.422246 4.829765 44.613205
+ *MESH_VERTEX 176 -0.917963 6.865222 43.313309
+ *MESH_VERTEX 177 -1.746555 2.834795 50.739769
+ *MESH_VERTEX 178 0.917979 6.865224 68.292030
+ *MESH_VERTEX 179 1.746572 2.834796 70.525200
+ *MESH_VERTEX 180 1.422262 4.829766 47.780525
+ *MESH_VERTEX 181 1.422262 4.829765 44.613205
+ *MESH_VERTEX 182 0.917980 6.865222 43.313309
+ *MESH_VERTEX 183 1.746572 2.834795 50.739769
+ *MESH_VERTEX 184 -1.380244 1.707703 38.230148
+ *MESH_VERTEX 185 -2.512050 5.043744 36.506058
+ *MESH_VERTEX 186 2.512067 5.043744 36.506058
+ *MESH_VERTEX 187 1.380260 1.707703 38.230148
+ *MESH_VERTEX 188 -2.512050 5.043743 44.159363
+ *MESH_VERTEX 189 -1.380244 1.707703 42.435265
+ *MESH_VERTEX 190 1.380260 1.707703 42.435265
+ *MESH_VERTEX 191 2.512067 5.043743 44.159363
+ *MESH_VERTEX 192 0.298516 10.893362 -44.971695
+ *MESH_VERTEX 193 0.298515 10.893363 -33.955528
+ *MESH_VERTEX 194 0.298515 11.273522 -33.936523
+ *MESH_VERTEX 195 0.298516 11.273522 -44.978996
+ *MESH_VERTEX 196 -0.298499 11.273522 -44.978996
+ *MESH_VERTEX 197 -0.298500 11.273522 -33.936523
+ *MESH_VERTEX 198 -0.298500 10.893363 -33.955528
+ *MESH_VERTEX 199 -0.298499 10.893362 -44.971695
+ *MESH_VERTEX 200 -1.268649 11.273522 -44.442879
+ *MESH_VERTEX 201 -1.268649 11.273522 -33.936523
+ *MESH_VERTEX 202 -0.732529 11.273522 -44.978996
+ *MESH_VERTEX 203 -1.100613 -7.866765 -44.610909
+ *MESH_VERTEX 204 1.100565 -7.866765 -44.610909
+ *MESH_VERTEX 205 0.732482 11.273522 -44.978996
+ *MESH_VERTEX 206 1.268665 5.750831 -44.442818
+ *MESH_VERTEX 207 1.268665 -7.845753 -44.442818
+ *MESH_VERTEX 208 1.268665 10.469248 -44.442818
+ *MESH_VERTEX 209 1.268665 11.029802 -44.442818
+ *MESH_VERTEX 210 1.268665 11.273522 -44.442818
+ *MESH_VERTEX 211 1.268665 -7.682724 -43.138588
+ *MESH_VERTEX 212 -1.268649 11.029831 -44.442879
+ *MESH_VERTEX 213 -1.268649 10.469343 -44.442879
+ *MESH_VERTEX 214 -1.268649 5.751483 -44.442879
+ *MESH_VERTEX 215 -1.268648 -7.845760 -44.442879
+ *MESH_VERTEX 216 -1.268648 -7.682724 -43.138588
+ *MESH_VERTEX 217 -1.268649 7.592696 -36.881180
+ *MESH_VERTEX 218 -1.268649 7.592696 -34.120560
+ *MESH_VERTEX 219 -1.268649 4.648035 -40.562004
+ *MESH_VERTEX 220 -1.268649 4.832077 -37.249256
+ *MESH_VERTEX 221 -1.268648 -7.498682 -40.562012
+ *MESH_VERTEX 222 1.268665 4.648035 -40.562004
+ *MESH_VERTEX 223 1.268665 -7.498682 -40.562012
+ *MESH_VERTEX 224 1.268665 7.592696 -36.881180
+ *MESH_VERTEX 225 1.268665 4.832077 -37.249256
+ *MESH_VERTEX 226 1.268665 11.273522 -33.936523
+ *MESH_VERTEX 227 1.268665 7.592696 -34.120560
+ *MESH_VERTEX 228 0.000006 0.931545 21.303843
+ *MESH_VERTEX 229 -2.502420 -0.513231 21.303844
+ *MESH_VERTEX 230 -2.889547 0.931545 21.303843
+ *MESH_VERTEX 231 -1.444771 -1.570880 21.303844
+ *MESH_VERTEX 232 0.000005 -1.958007 21.303854
+ *MESH_VERTEX 233 1.444781 -1.570880 21.303854
+ *MESH_VERTEX 234 2.502431 -0.513232 21.303844
+ *MESH_VERTEX 235 2.889558 0.931544 21.303843
+ *MESH_VERTEX 236 2.502431 2.376319 21.303843
+ *MESH_VERTEX 237 1.444782 3.433969 21.303843
+ *MESH_VERTEX 238 0.000006 3.821096 21.303843
+ *MESH_VERTEX 239 -1.444770 3.433969 21.303843
+ *MESH_VERTEX 240 -2.502420 2.376319 21.303843
+ *MESH_VERTEX 241 -2.502413 -0.513240 46.311317
+ *MESH_VERTEX 242 -2.889539 0.931535 46.311317
+ *MESH_VERTEX 243 -1.444764 -1.570890 46.311317
+ *MESH_VERTEX 244 0.000012 -1.958016 46.311325
+ *MESH_VERTEX 245 1.444788 -1.570890 46.311325
+ *MESH_VERTEX 246 2.502438 -0.513241 46.311317
+ *MESH_VERTEX 247 2.889565 0.931535 46.311317
+ *MESH_VERTEX 248 2.502439 2.376311 46.311317
+ *MESH_VERTEX 249 1.444789 3.433959 46.311317
+ *MESH_VERTEX 250 0.000013 3.821087 46.311317
+ *MESH_VERTEX 251 -1.444763 3.433960 46.311317
+ *MESH_VERTEX 252 -2.502413 2.376311 46.311317
+ *MESH_VERTEX 253 0.000009 8.086176 68.595421
+ *MESH_VERTEX 254 2.068130 6.842045 68.595428
+ *MESH_VERTEX 255 2.388069 8.086176 68.595421
+ *MESH_VERTEX 256 1.194039 5.688210 68.595413
+ *MESH_VERTEX 257 0.000010 5.356462 68.595406
+ *MESH_VERTEX 258 -1.194020 5.688210 68.595413
+ *MESH_VERTEX 259 -2.068111 6.842045 68.595428
+ *MESH_VERTEX 260 -2.388051 8.086176 68.595421
+ *MESH_VERTEX 261 -2.068111 9.495605 68.595421
+ *MESH_VERTEX 262 -1.194021 10.549734 68.595428
+ *MESH_VERTEX 263 0.000009 10.869672 68.595428
+ *MESH_VERTEX 264 1.194039 10.549734 68.595428
+ *MESH_VERTEX 265 2.068130 9.495605 68.595421
+ *MESH_VERTEX 266 2.068130 6.842034 -17.151394
+ *MESH_VERTEX 267 2.388069 8.086167 -17.151394
+ *MESH_VERTEX 268 1.194040 5.688199 -17.151394
+ *MESH_VERTEX 269 0.000010 5.356451 -17.151394
+ *MESH_VERTEX 270 -1.194020 5.688199 -17.151394
+ *MESH_VERTEX 271 -2.068111 6.842034 -17.151394
+ *MESH_VERTEX 272 -2.388051 8.086165 -17.151394
+ *MESH_VERTEX 273 -2.068111 9.495594 -17.151394
+ *MESH_VERTEX 274 -1.194021 10.549724 -17.151394
+ *MESH_VERTEX 275 0.000009 10.869661 -17.151394
+ *MESH_VERTEX 276 1.194039 10.549724 -17.151394
+ *MESH_VERTEX 277 2.068130 9.495594 -17.151394
+ *MESH_VERTEX 278 -0.298499 -1.335941 -0.446208
+ *MESH_VERTEX 279 -0.298499 0.612251 -1.585156
+ *MESH_VERTEX 280 -0.298499 -1.455830 -1.105597
+ *MESH_VERTEX 281 -0.298499 0.732141 -0.146484
+ *MESH_VERTEX 282 -0.298499 -3.164243 -0.266377
+ *MESH_VERTEX 283 0.298516 -1.335941 -0.446208
+ *MESH_VERTEX 284 0.298516 -1.455830 -1.105597
+ *MESH_VERTEX 285 0.298516 0.612251 -1.585156
+ *MESH_VERTEX 286 0.298516 0.732141 -0.146484
+ *MESH_VERTEX 287 0.298516 -3.164243 -0.266377
+ *MESH_VERTEX 288 -1.791037 -3.090750 5.507843
+ *MESH_VERTEX 289 -1.791037 -7.230175 13.452101
+ *MESH_VERTEX 290 -1.791037 -1.659893 6.258873
+ *MESH_VERTEX 291 -1.791037 -6.000690 14.681631
+ *MESH_VERTEX 292 -1.791037 -1.194521 14.681631
+ *MESH_VERTEX 293 -1.791037 -4.505468 3.756600
+ *MESH_VERTEX 294 -1.791037 -10.918630 13.452101
+ *MESH_VERTEX 295 -1.791036 -21.536903 3.504448
+ *MESH_VERTEX 296 -1.791036 -21.536905 14.122730
+ *MESH_VERTEX 297 -1.791037 -10.918630 17.475922
+ *MESH_VERTEX 298 -1.791037 -6.447775 21.611460
+ *MESH_VERTEX 299 -1.791037 -6.559546 23.623354
+ *MESH_VERTEX 300 1.791053 -3.090750 5.507843
+ *MESH_VERTEX 301 1.791053 -1.659893 6.258873
+ *MESH_VERTEX 302 1.791053 -7.230175 13.452101
+ *MESH_VERTEX 303 1.791053 -6.000690 14.681631
+ *MESH_VERTEX 304 1.791053 -1.194521 14.681631
+ *MESH_VERTEX 305 1.791053 -4.505468 3.756600
+ *MESH_VERTEX 306 1.791053 -10.918630 13.452101
+ *MESH_VERTEX 307 1.791053 -21.536903 3.504448
+ *MESH_VERTEX 308 1.791053 -21.536905 14.122730
+ *MESH_VERTEX 309 1.791053 -10.918630 17.475922
+ *MESH_VERTEX 310 1.791053 -6.447775 21.611460
+ *MESH_VERTEX 311 1.791053 -6.559546 23.623354
+ *MESH_VERTEX 312 0.000006 -7.041816 46.087524
+ *MESH_VERTEX 313 2.472542 -3.445583 46.087463
+ *MESH_VERTEX 314 2.388065 -6.582098 46.087532
+ *MESH_VERTEX 315 2.858512 -1.574434 46.087463
+ *MESH_VERTEX 316 3.414333 0.842753 46.087448
+ *MESH_VERTEX 317 2.642280 3.099768 46.087532
+ *MESH_VERTEX 318 0.000005 4.083702 46.087532
+ *MESH_VERTEX 319 -2.642268 3.099768 46.087532
+ *MESH_VERTEX 320 -3.414324 0.842753 46.087532
+ *MESH_VERTEX 321 -2.858503 -1.574434 46.087463
+ *MESH_VERTEX 322 -2.472532 -3.445585 46.087463
+ *MESH_VERTEX 323 -2.388055 -6.582099 46.087524
+ *MESH_VERTEX 324 0.000013 -1.200825 71.302658
+ *MESH_VERTEX 325 2.472549 -3.445565 71.302589
+ *MESH_VERTEX 326 2.858519 -1.574414 71.302589
+ *MESH_VERTEX 327 2.388072 -6.582078 71.302658
+ *MESH_VERTEX 328 0.000014 -7.041797 71.302643
+ *MESH_VERTEX 329 -2.388048 -6.582079 71.302643
+ *MESH_VERTEX 330 -2.472525 -3.445565 71.302589
+ *MESH_VERTEX 331 -2.858496 -1.574414 71.302589
+ *MESH_VERTEX 332 -3.414317 0.842771 71.302658
+ *MESH_VERTEX 333 -2.642261 3.099787 71.302658
+ *MESH_VERTEX 334 0.000013 4.083721 71.302658
+ *MESH_VERTEX 335 2.642287 3.099787 71.302658
+ *MESH_VERTEX 336 3.414340 0.842771 71.302574
+ }
+ *MESH_FACE_LIST {
+ *MESH_FACE 0: A: 0 B: 1 C: 2 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 1: A: 1 B: 3 C: 2 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 2: A: 0 B: 4 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 3: A: 4 B: 5 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 4: A: 0 B: 2 C: 6 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 5: A: 6 B: 7 C: 0 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 6: A: 8 B: 9 C: 6 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 7: A: 9 B: 7 C: 6 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 8: A: 9 B: 10 C: 7 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 9: A: 9 B: 11 C: 10 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 10: A: 5 B: 4 C: 12 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 11: A: 12 B: 13 C: 5 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 12: A: 1 B: 5 C: 13 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 13: A: 13 B: 14 C: 1 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 14: A: 3 B: 1 C: 14 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 15: A: 14 B: 15 C: 3 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 16: A: 0 B: 12 C: 4 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 17: A: 0 B: 16 C: 12 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 18: A: 0 B: 17 C: 16 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 19: A: 0 B: 7 C: 17 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 20: A: 7 B: 18 C: 17 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 21: A: 7 B: 10 C: 18 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 22: A: 6 B: 19 C: 8 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 23: A: 6 B: 20 C: 19 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 24: A: 6 B: 21 C: 20 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 25: A: 6 B: 2 C: 21 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 26: A: 2 B: 15 C: 21 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 27: A: 2 B: 3 C: 15 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 28: A: 22 B: 23 C: 24 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 29: A: 24 B: 25 C: 22 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 30: A: 25 B: 24 C: 26 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 31: A: 26 B: 27 C: 25 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 32: A: 28 B: 29 C: 30 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 33: A: 28 B: 31 C: 29 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 34: A: 28 B: 22 C: 31 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 35: A: 28 B: 23 C: 22 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 36: A: 32 B: 33 C: 34 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 37: A: 34 B: 35 C: 32 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 38: A: 36 B: 37 C: 38 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 39: A: 38 B: 39 C: 36 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 40: A: 39 B: 38 C: 33 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 41: A: 33 B: 32 C: 39 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 42: A: 27 B: 40 C: 41 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 43: A: 40 B: 42 C: 41 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 44: A: 27 B: 43 C: 40 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 45: A: 27 B: 26 C: 43 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 46: A: 42 B: 40 C: 37 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 47: A: 37 B: 36 C: 42 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 48: A: 35 B: 34 C: 30 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 49: A: 30 B: 29 C: 35 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 50: A: 44 B: 45 C: 46 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 51: A: 44 B: 47 C: 45 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 52: A: 44 B: 48 C: 47 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 53: A: 49 B: 50 C: 51 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 54: A: 49 B: 52 C: 50 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 55: A: 49 B: 53 C: 52 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 56: A: 47 B: 48 C: 51 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 57: A: 51 B: 50 C: 47 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 58: A: 48 B: 44 C: 49 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 59: A: 49 B: 51 C: 48 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 60: A: 44 B: 46 C: 53 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 61: A: 53 B: 49 C: 44 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 62: A: 46 B: 45 C: 52 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 63: A: 52 B: 53 C: 46 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 64: A: 45 B: 16 C: 17 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 65: A: 17 B: 52 C: 45 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 66: A: 18 B: 10 C: 11 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 67: A: 11 B: 54 C: 18 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 68: A: 54 B: 11 C: 9 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 69: A: 9 B: 55 C: 54 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 70: A: 9 B: 8 C: 19 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 71: A: 19 B: 55 C: 9 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 72: A: 21 B: 56 C: 57 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 73: A: 57 B: 20 C: 21 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 74: A: 56 B: 58 C: 59 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 75: A: 59 B: 57 C: 56 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 76: A: 58 B: 47 C: 50 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 77: A: 50 B: 59 C: 58 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 78: A: 54 B: 42 C: 18 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 79: A: 55 B: 42 C: 54 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 80: A: 41 B: 42 C: 55 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 81: A: 18 B: 42 C: 17 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 82: A: 36 B: 17 C: 42 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 83: A: 17 B: 36 C: 50 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 84: A: 39 B: 50 C: 36 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 85: A: 39 B: 32 C: 50 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 86: A: 32 B: 35 C: 50 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 87: A: 50 B: 35 C: 59 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 88: A: 29 B: 59 C: 35 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 89: A: 57 B: 25 C: 20 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 90: A: 22 B: 25 C: 57 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 91: A: 31 B: 22 C: 57 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 92: A: 20 B: 25 C: 19 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 93: A: 27 B: 19 C: 25 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 94: A: 31 B: 57 C: 29 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 95: A: 59 B: 29 C: 57 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 96: A: 19 B: 27 C: 55 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 97: A: 41 B: 55 C: 27 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 98: A: 52 B: 17 C: 50 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 99: A: 40 B: 13 C: 12 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 100: A: 40 B: 14 C: 13 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 101: A: 40 B: 43 C: 14 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 102: A: 40 B: 12 C: 16 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 103: A: 16 B: 37 C: 40 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 104: A: 37 B: 16 C: 47 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 105: A: 47 B: 38 C: 37 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 106: A: 33 B: 38 C: 47 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 107: A: 34 B: 33 C: 47 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 108: A: 34 B: 47 C: 58 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 109: A: 58 B: 30 C: 34 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 110: A: 24 B: 56 C: 21 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 111: A: 24 B: 23 C: 56 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 112: A: 23 B: 28 C: 56 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 113: A: 24 B: 21 C: 15 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 114: A: 15 B: 26 C: 24 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 115: A: 56 B: 28 C: 30 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 116: A: 30 B: 58 C: 56 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 117: A: 26 B: 15 C: 14 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 118: A: 14 B: 43 C: 26 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 119: A: 16 B: 45 C: 47 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 120: A: 60 B: 61 C: 62 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 121: A: 63 B: 60 C: 64 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 122: A: 61 B: 60 C: 63 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 123: A: 65 B: 66 C: 67 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 124: A: 68 B: 66 C: 65 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 125: A: 69 B: 66 C: 68 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 126: A: 70 B: 71 C: 67 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 127: A: 72 B: 67 C: 71 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 128: A: 67 B: 72 C: 73 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 129: A: 74 B: 73 C: 72 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 130: A: 75 B: 76 C: 77 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 131: A: 78 B: 79 C: 80 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 132: A: 79 B: 81 C: 80 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 133: A: 82 B: 80 C: 81 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 134: A: 83 B: 80 C: 82 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 135: A: 82 B: 84 C: 83 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 136: A: 83 B: 84 C: 85 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 137: A: 86 B: 85 C: 84 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 138: A: 78 B: 80 C: 76 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 139: A: 77 B: 76 C: 80 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 140: A: 87 B: 75 C: 77 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 141: A: 86 B: 87 C: 85 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 142: A: 77 B: 85 C: 87 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 143: A: 67 B: 66 C: 88 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 144: A: 89 B: 88 C: 66 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 145: A: 90 B: 62 C: 68 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 146: A: 61 B: 68 C: 62 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 147: A: 91 B: 63 C: 64 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 148: A: 92 B: 63 C: 91 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 149: A: 93 B: 70 C: 94 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 150: A: 88 B: 94 C: 70 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 151: A: 69 B: 68 C: 61 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 152: A: 70 B: 67 C: 88 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 153: A: 95 B: 96 C: 92 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 154: A: 97 B: 95 C: 92 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 155: A: 91 B: 97 C: 92 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 156: A: 98 B: 96 C: 95 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 157: A: 99 B: 100 C: 101 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 158: A: 99 B: 102 C: 100 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 159: A: 103 B: 104 C: 105 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 160: A: 103 B: 106 C: 104 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 161: A: 103 B: 107 C: 106 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 162: A: 108 B: 109 C: 105 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 163: A: 105 B: 110 C: 108 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 164: A: 110 B: 105 C: 111 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 165: A: 111 B: 112 C: 110 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 166: A: 113 B: 114 C: 115 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 167: A: 116 B: 117 C: 118 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 168: A: 119 B: 116 C: 118 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 169: A: 118 B: 120 C: 119 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 170: A: 118 B: 121 C: 120 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 171: A: 122 B: 120 C: 121 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 172: A: 122 B: 121 C: 123 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 173: A: 123 B: 124 C: 122 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 174: A: 118 B: 117 C: 113 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 175: A: 113 B: 115 C: 118 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 176: A: 114 B: 125 C: 115 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 177: A: 125 B: 124 C: 123 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 178: A: 123 B: 115 C: 125 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 179: A: 103 B: 105 C: 126 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 180: A: 126 B: 127 C: 103 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 181: A: 128 B: 129 C: 106 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 182: A: 106 B: 99 C: 128 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 183: A: 100 B: 130 C: 101 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 184: A: 100 B: 131 C: 130 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 185: A: 109 B: 132 C: 133 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 186: A: 133 B: 126 C: 109 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 187: A: 106 B: 107 C: 102 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 188: A: 105 B: 109 C: 126 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 189: A: 134 B: 135 C: 131 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 190: A: 135 B: 136 C: 131 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 191: A: 136 B: 130 C: 131 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 192: A: 134 B: 137 C: 135 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 193: A: 138 B: 110 C: 112 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 194: A: 138 B: 139 C: 110 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 195: A: 108 B: 110 C: 139 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 196: A: 140 B: 72 C: 71 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 197: A: 141 B: 72 C: 140 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 198: A: 141 B: 74 C: 72 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 199: A: 140 B: 138 C: 141 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 200: A: 140 B: 139 C: 138 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 201: A: 140 B: 70 C: 139 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 202: A: 140 B: 71 C: 70 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 203: A: 126 B: 77 C: 115 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 204: A: 115 B: 127 C: 126 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 205: A: 102 B: 99 C: 106 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 206: A: 103 B: 123 C: 107 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 207: A: 103 B: 115 C: 123 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 208: A: 103 B: 127 C: 115 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 209: A: 107 B: 121 C: 102 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 210: A: 107 B: 123 C: 121 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 211: A: 118 B: 102 C: 121 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 212: A: 118 B: 100 C: 102 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 213: A: 117 B: 116 C: 79 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 214: A: 79 B: 78 C: 117 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 215: A: 119 B: 120 C: 82 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 216: A: 82 B: 81 C: 119 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 217: A: 122 B: 124 C: 86 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 218: A: 86 B: 84 C: 122 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 219: A: 125 B: 114 C: 75 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 220: A: 75 B: 87 C: 125 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 221: A: 131 B: 100 C: 118 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 222: A: 118 B: 80 C: 131 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 223: A: 80 B: 63 C: 92 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 224: A: 92 B: 131 C: 80 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 225: A: 85 B: 69 C: 61 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 226: A: 61 B: 83 C: 85 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 227: A: 83 B: 63 C: 80 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 228: A: 83 B: 142 C: 63 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 229: A: 83 B: 143 C: 142 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 230: A: 83 B: 61 C: 143 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 231: A: 77 B: 69 C: 85 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 232: A: 77 B: 144 C: 69 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 233: A: 77 B: 145 C: 144 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 234: A: 77 B: 146 C: 145 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 235: A: 77 B: 89 C: 146 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 236: A: 78 B: 76 C: 113 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 237: A: 113 B: 117 C: 78 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 238: A: 77 B: 126 C: 88 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 239: A: 88 B: 89 C: 77 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 240: A: 118 B: 115 C: 77 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 241: A: 77 B: 80 C: 118 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 242: A: 119 B: 81 C: 79 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 243: A: 79 B: 116 C: 119 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 244: A: 122 B: 84 C: 82 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 245: A: 82 B: 120 C: 122 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 246: A: 125 B: 87 C: 86 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 247: A: 86 B: 124 C: 125 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 248: A: 113 B: 76 C: 75 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 249: A: 75 B: 114 C: 113 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 250: A: 104 B: 106 C: 68 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 251: A: 68 B: 65 C: 104 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 252: A: 139 B: 70 C: 109 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 253: A: 109 B: 108 C: 139 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 254: A: 132 B: 109 C: 70 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 255: A: 70 B: 93 C: 132 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 256: A: 126 B: 133 C: 94 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 257: A: 94 B: 88 C: 126 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 258: A: 134 B: 131 C: 92 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 259: A: 92 B: 96 C: 134 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 260: A: 137 B: 134 C: 96 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 261: A: 96 B: 98 C: 137 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 262: A: 135 B: 137 C: 98 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 263: A: 98 B: 95 C: 135 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 264: A: 136 B: 135 C: 95 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 265: A: 95 B: 97 C: 136 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 266: A: 130 B: 136 C: 97 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 267: A: 97 B: 91 C: 130 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 268: A: 101 B: 130 C: 91 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 269: A: 91 B: 64 C: 101 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 270: A: 99 B: 101 C: 64 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 271: A: 64 B: 60 C: 99 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 272: A: 128 B: 99 C: 60 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 273: A: 60 B: 62 C: 128 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 274: A: 129 B: 128 C: 62 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 275: A: 62 B: 90 C: 129 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 276: A: 147 B: 148 C: 149 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 277: A: 147 B: 150 C: 148 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 278: A: 147 B: 151 C: 150 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 279: A: 147 B: 152 C: 151 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 280: A: 147 B: 153 C: 152 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 281: A: 147 B: 154 C: 153 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 282: A: 147 B: 155 C: 154 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 283: A: 147 B: 156 C: 155 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 284: A: 147 B: 157 C: 156 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 285: A: 147 B: 158 C: 157 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 286: A: 147 B: 159 C: 158 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 287: A: 147 B: 149 C: 159 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 288: A: 160 B: 161 C: 149 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 289: A: 160 B: 149 C: 148 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 290: A: 162 B: 160 C: 148 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 291: A: 162 B: 148 C: 150 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 292: A: 163 B: 162 C: 150 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 293: A: 163 B: 150 C: 151 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 294: A: 164 B: 163 C: 151 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 295: A: 164 B: 151 C: 152 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 296: A: 165 B: 164 C: 152 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 297: A: 165 B: 152 C: 153 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 298: A: 166 B: 165 C: 153 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 299: A: 166 B: 153 C: 154 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 300: A: 167 B: 166 C: 154 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 301: A: 167 B: 154 C: 155 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 302: A: 168 B: 167 C: 155 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 303: A: 168 B: 155 C: 156 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 304: A: 169 B: 168 C: 156 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 305: A: 169 B: 156 C: 157 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 306: A: 170 B: 169 C: 157 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 307: A: 170 B: 157 C: 158 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 308: A: 171 B: 170 C: 158 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 309: A: 171 B: 158 C: 159 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 310: A: 161 B: 171 C: 159 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 311: A: 161 B: 159 C: 149 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 312: A: 172 B: 173 C: 174 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 313: A: 172 B: 175 C: 173 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 314: A: 172 B: 176 C: 175 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 315: A: 173 B: 177 C: 174 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 316: A: 178 B: 179 C: 180 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 317: A: 178 B: 180 C: 181 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 318: A: 178 B: 181 C: 182 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 319: A: 180 B: 179 C: 183 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 320: A: 179 B: 172 C: 174 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 321: A: 179 B: 178 C: 172 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 322: A: 180 B: 177 C: 173 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 323: A: 180 B: 183 C: 177 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 324: A: 181 B: 173 C: 175 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 325: A: 181 B: 180 C: 173 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 326: A: 184 B: 185 C: 186 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 327: A: 186 B: 187 C: 184 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 328: A: 188 B: 189 C: 190 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 329: A: 190 B: 191 C: 188 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 330: A: 188 B: 185 C: 184 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 331: A: 184 B: 189 C: 188 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 332: A: 191 B: 190 C: 187 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 333: A: 187 B: 186 C: 191 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 334: A: 192 B: 193 C: 194 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 335: A: 194 B: 195 C: 192 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 336: A: 196 B: 197 C: 198 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 337: A: 198 B: 199 C: 196 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 338: A: 199 B: 198 C: 193 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 339: A: 193 B: 192 C: 199 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 340: A: 196 B: 200 C: 197 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 341: A: 200 B: 201 C: 197 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 342: A: 196 B: 202 C: 200 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 343: A: 199 B: 202 C: 196 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 344: A: 199 B: 203 C: 202 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 345: A: 199 B: 204 C: 203 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 346: A: 199 B: 192 C: 204 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 347: A: 192 B: 205 C: 204 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 348: A: 192 B: 195 C: 205 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 349: A: 204 B: 206 C: 207 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 350: A: 204 B: 208 C: 206 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 351: A: 204 B: 209 C: 208 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 352: A: 204 B: 210 C: 209 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 353: A: 204 B: 205 C: 210 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 354: A: 206 B: 211 C: 207 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 355: A: 202 B: 212 C: 200 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 356: A: 202 B: 213 C: 212 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 357: A: 202 B: 214 C: 213 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 358: A: 202 B: 215 C: 214 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 359: A: 202 B: 203 C: 215 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 360: A: 215 B: 216 C: 214 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 361: A: 217 B: 200 C: 212 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 362: A: 217 B: 201 C: 200 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 363: A: 217 B: 218 C: 201 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 364: A: 217 B: 219 C: 220 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 365: A: 217 B: 213 C: 219 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 366: A: 217 B: 212 C: 213 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 367: A: 214 B: 219 C: 213 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 368: A: 214 B: 221 C: 219 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 369: A: 214 B: 216 C: 221 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 370: A: 222 B: 211 C: 208 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 371: A: 211 B: 206 C: 208 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 372: A: 222 B: 223 C: 211 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 373: A: 222 B: 224 C: 225 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 374: A: 222 B: 209 C: 224 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 375: A: 222 B: 208 C: 209 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 376: A: 224 B: 226 C: 227 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 377: A: 224 B: 210 C: 226 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 378: A: 224 B: 209 C: 210 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 379: A: 194 B: 226 C: 195 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 380: A: 226 B: 210 C: 195 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 381: A: 210 B: 205 C: 195 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 382: A: 224 B: 227 C: 218 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 383: A: 218 B: 217 C: 224 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 384: A: 225 B: 224 C: 217 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 385: A: 217 B: 220 C: 225 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 386: A: 222 B: 225 C: 220 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 387: A: 220 B: 219 C: 222 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 388: A: 223 B: 222 C: 219 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 389: A: 219 B: 221 C: 223 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 390: A: 211 B: 223 C: 221 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 391: A: 221 B: 216 C: 211 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 392: A: 204 B: 215 C: 203 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 393: A: 204 B: 211 C: 215 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 394: A: 211 B: 216 C: 215 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 395: A: 204 B: 207 C: 211 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 396: A: 228 B: 229 C: 230 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 397: A: 228 B: 231 C: 229 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 398: A: 228 B: 232 C: 231 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 399: A: 228 B: 233 C: 232 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 400: A: 228 B: 234 C: 233 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 401: A: 228 B: 235 C: 234 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 402: A: 228 B: 236 C: 235 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 403: A: 228 B: 237 C: 236 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 404: A: 228 B: 238 C: 237 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 405: A: 228 B: 239 C: 238 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 406: A: 228 B: 240 C: 239 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 407: A: 228 B: 230 C: 240 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 408: A: 241 B: 242 C: 230 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 409: A: 241 B: 230 C: 229 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 410: A: 243 B: 241 C: 229 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 411: A: 243 B: 229 C: 231 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 412: A: 244 B: 243 C: 231 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 413: A: 244 B: 231 C: 232 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 414: A: 245 B: 244 C: 232 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 415: A: 245 B: 232 C: 233 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 416: A: 246 B: 245 C: 233 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 417: A: 246 B: 233 C: 234 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 418: A: 247 B: 246 C: 234 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 419: A: 247 B: 234 C: 235 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 420: A: 248 B: 247 C: 235 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 421: A: 248 B: 235 C: 236 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 422: A: 249 B: 248 C: 236 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 423: A: 249 B: 236 C: 237 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 424: A: 250 B: 249 C: 237 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 425: A: 250 B: 237 C: 238 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 426: A: 251 B: 250 C: 238 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 427: A: 251 B: 238 C: 239 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 428: A: 252 B: 251 C: 239 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 429: A: 252 B: 239 C: 240 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 430: A: 242 B: 252 C: 240 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 431: A: 242 B: 240 C: 230 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 432: A: 253 B: 254 C: 255 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 433: A: 253 B: 256 C: 254 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 434: A: 253 B: 257 C: 256 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 435: A: 253 B: 258 C: 257 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 436: A: 253 B: 259 C: 258 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 437: A: 253 B: 260 C: 259 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 438: A: 253 B: 261 C: 260 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 439: A: 253 B: 262 C: 261 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 440: A: 253 B: 263 C: 262 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 441: A: 253 B: 264 C: 263 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 442: A: 253 B: 265 C: 264 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 443: A: 253 B: 255 C: 265 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 444: A: 266 B: 267 C: 255 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 445: A: 266 B: 255 C: 254 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 446: A: 268 B: 266 C: 254 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 447: A: 268 B: 254 C: 256 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 448: A: 269 B: 268 C: 256 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 449: A: 269 B: 256 C: 257 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 450: A: 270 B: 269 C: 257 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 451: A: 270 B: 257 C: 258 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 452: A: 271 B: 270 C: 258 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 453: A: 271 B: 258 C: 259 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 454: A: 272 B: 271 C: 259 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 455: A: 272 B: 259 C: 260 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 456: A: 273 B: 272 C: 260 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 457: A: 273 B: 260 C: 261 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 458: A: 274 B: 273 C: 261 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 459: A: 274 B: 261 C: 262 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 460: A: 275 B: 274 C: 262 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 461: A: 275 B: 262 C: 263 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 462: A: 276 B: 275 C: 263 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 463: A: 276 B: 263 C: 264 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 464: A: 277 B: 276 C: 264 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 465: A: 277 B: 264 C: 265 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 466: A: 267 B: 277 C: 265 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 467: A: 267 B: 265 C: 255 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 468: A: 278 B: 279 C: 280 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 469: A: 278 B: 281 C: 279 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 470: A: 280 B: 282 C: 278 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 471: A: 283 B: 284 C: 285 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 472: A: 283 B: 285 C: 286 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 473: A: 284 B: 283 C: 287 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 474: A: 283 B: 281 C: 278 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 475: A: 283 B: 286 C: 281 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 476: A: 287 B: 278 C: 282 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 477: A: 287 B: 283 C: 278 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 478: A: 284 B: 282 C: 280 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 479: A: 284 B: 287 C: 282 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 480: A: 285 B: 280 C: 279 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 481: A: 285 B: 284 C: 280 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 482: A: 288 B: 289 C: 290 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 483: A: 289 B: 291 C: 290 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 484: A: 291 B: 292 C: 290 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 485: A: 288 B: 293 C: 289 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 486: A: 293 B: 294 C: 289 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 487: A: 293 B: 295 C: 294 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 488: A: 295 B: 296 C: 294 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 489: A: 296 B: 297 C: 294 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 490: A: 296 B: 298 C: 297 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 491: A: 296 B: 299 C: 298 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 492: A: 300 B: 301 C: 302 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 493: A: 302 B: 301 C: 303 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 494: A: 303 B: 301 C: 304 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 495: A: 300 B: 302 C: 305 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 496: A: 305 B: 302 C: 306 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 497: A: 305 B: 306 C: 307 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 498: A: 307 B: 306 C: 308 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 499: A: 308 B: 306 C: 309 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 500: A: 308 B: 309 C: 310 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 501: A: 308 B: 310 C: 311 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 502: A: 305 B: 295 C: 293 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 503: A: 305 B: 307 C: 295 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 504: A: 300 B: 293 C: 288 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 505: A: 300 B: 305 C: 293 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 506: A: 301 B: 288 C: 290 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 507: A: 301 B: 300 C: 288 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 508: A: 304 B: 290 C: 292 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 509: A: 304 B: 301 C: 290 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 510: A: 303 B: 292 C: 291 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 511: A: 303 B: 304 C: 292 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 512: A: 302 B: 291 C: 289 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 513: A: 302 B: 303 C: 291 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 514: A: 306 B: 289 C: 294 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 515: A: 306 B: 302 C: 289 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 516: A: 309 B: 294 C: 297 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 517: A: 309 B: 306 C: 294 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 518: A: 310 B: 297 C: 298 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 519: A: 310 B: 309 C: 297 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 520: A: 311 B: 298 C: 299 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 521: A: 311 B: 310 C: 298 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 522: A: 308 B: 299 C: 296 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 523: A: 308 B: 311 C: 299 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 524: A: 307 B: 296 C: 295 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 525: A: 307 B: 308 C: 296 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 526: A: 312 B: 313 C: 314 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 527: A: 312 B: 315 C: 313 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 528: A: 312 B: 316 C: 315 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 529: A: 312 B: 317 C: 316 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 530: A: 312 B: 318 C: 317 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 531: A: 312 B: 319 C: 318 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 532: A: 312 B: 320 C: 319 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 533: A: 312 B: 321 C: 320 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 534: A: 312 B: 322 C: 321 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 535: A: 312 B: 323 C: 322 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 536: A: 324 B: 325 C: 326 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 537: A: 324 B: 327 C: 325 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 538: A: 324 B: 328 C: 327 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 539: A: 324 B: 329 C: 328 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 540: A: 324 B: 330 C: 329 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 541: A: 324 B: 331 C: 330 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 542: A: 324 B: 332 C: 331 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 543: A: 324 B: 333 C: 332 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 544: A: 324 B: 334 C: 333 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 545: A: 324 B: 335 C: 334 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 546: A: 324 B: 336 C: 335 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 547: A: 324 B: 326 C: 336 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 548: A: 313 B: 315 C: 326 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 549: A: 313 B: 326 C: 325 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 550: A: 314 B: 313 C: 325 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 551: A: 314 B: 325 C: 327 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 552: A: 312 B: 314 C: 327 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 553: A: 312 B: 327 C: 328 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 554: A: 323 B: 312 C: 328 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 555: A: 323 B: 328 C: 329 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 556: A: 322 B: 323 C: 329 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 557: A: 322 B: 329 C: 330 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 558: A: 321 B: 322 C: 330 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 559: A: 321 B: 330 C: 331 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 560: A: 320 B: 321 C: 331 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 561: A: 320 B: 331 C: 332 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 562: A: 319 B: 320 C: 332 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 563: A: 319 B: 332 C: 333 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 564: A: 318 B: 319 C: 333 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 565: A: 318 B: 333 C: 334 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 566: A: 317 B: 318 C: 334 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 567: A: 317 B: 334 C: 335 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 568: A: 316 B: 317 C: 335 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 569: A: 316 B: 335 C: 336 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 570: A: 315 B: 316 C: 336 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ *MESH_FACE 571: A: 315 B: 336 C: 326 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 1 *MESH_MTLID 21
+ }
+ *MESH_NORMALS {
+ *MESH_FACENORMAL 0 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 0 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 1 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 2 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 1 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 1 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 3 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 2 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 2 1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 0 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 4 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 1 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 3 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 4 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 5 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 1 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 4 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 0 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 2 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 6 0.000000 1.000000 0.000000
+ *MESH_FACENORMAL 5 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 6 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 7 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 0 0.000000 1.000000 0.000000
+ *MESH_FACENORMAL 6 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 8 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 9 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 6 -1.000000 0.000000 -0.000000
+ *MESH_FACENORMAL 7 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 9 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 7 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 6 -1.000000 0.000000 -0.000000
+ *MESH_FACENORMAL 8 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 9 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 10 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 7 -1.000000 0.000000 -0.000000
+ *MESH_FACENORMAL 9 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 9 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 11 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 10 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 10 0.000000 1.000000 -0.000000
+ *MESH_VERTEXNORMAL 5 0.000002 0.988273 0.152697
+ *MESH_VERTEXNORMAL 4 0.000000 1.000000 -0.000000
+ *MESH_VERTEXNORMAL 12 0.000002 1.000000 -0.000000
+ *MESH_FACENORMAL 11 0.000004 1.000000 -0.000000
+ *MESH_VERTEXNORMAL 12 0.000002 1.000000 -0.000000
+ *MESH_VERTEXNORMAL 13 0.000006 0.952226 0.305393
+ *MESH_VERTEXNORMAL 5 0.000002 0.988273 0.152697
+ *MESH_FACENORMAL 12 0.000003 0.894427 0.447214
+ *MESH_VERTEXNORMAL 1 0.000008 0.952226 0.305393
+ *MESH_VERTEXNORMAL 5 0.000002 0.988273 0.152697
+ *MESH_VERTEXNORMAL 13 0.000006 0.952226 0.305393
+ *MESH_FACENORMAL 13 0.000010 0.894428 0.447212
+ *MESH_VERTEXNORMAL 13 0.000006 0.952226 0.305393
+ *MESH_VERTEXNORMAL 14 0.000009 0.988273 0.152696
+ *MESH_VERTEXNORMAL 1 0.000008 0.952226 0.305393
+ *MESH_FACENORMAL 14 0.000011 1.000000 0.000000
+ *MESH_VERTEXNORMAL 3 0.000009 1.000000 0.000000
+ *MESH_VERTEXNORMAL 1 0.000008 0.952226 0.305393
+ *MESH_VERTEXNORMAL 14 0.000009 0.988273 0.152696
+ *MESH_FACENORMAL 15 0.000007 1.000000 0.000000
+ *MESH_VERTEXNORMAL 14 0.000009 0.988273 0.152696
+ *MESH_VERTEXNORMAL 15 0.000007 1.000000 0.000000
+ *MESH_VERTEXNORMAL 3 0.000009 1.000000 0.000000
+ *MESH_FACENORMAL 16 0.000000 0.650792 -0.759256
+ *MESH_VERTEXNORMAL 0 0.000000 0.650792 -0.759256
+ *MESH_VERTEXNORMAL 12 0.000000 0.650792 -0.759256
+ *MESH_VERTEXNORMAL 4 0.000000 0.650792 -0.759256
+ *MESH_FACENORMAL 17 0.000000 0.650792 -0.759256
+ *MESH_VERTEXNORMAL 0 0.000000 0.650792 -0.759256
+ *MESH_VERTEXNORMAL 16 0.000000 0.809850 -0.586637
+ *MESH_VERTEXNORMAL 12 0.000000 0.650792 -0.759256
+ *MESH_FACENORMAL 18 0.000000 0.650791 -0.759256
+ *MESH_VERTEXNORMAL 0 0.000000 0.650791 -0.759256
+ *MESH_VERTEXNORMAL 17 0.000000 0.837992 -0.545682
+ *MESH_VERTEXNORMAL 16 0.000000 0.809850 -0.586637
+ *MESH_FACENORMAL 19 0.000000 0.650791 -0.759257
+ *MESH_VERTEXNORMAL 0 0.000000 0.650791 -0.759256
+ *MESH_VERTEXNORMAL 7 0.000000 0.650791 -0.759257
+ *MESH_VERTEXNORMAL 17 0.000000 0.837992 -0.545682
+ *MESH_FACENORMAL 20 0.000000 0.650791 -0.759257
+ *MESH_VERTEXNORMAL 7 0.000000 0.650791 -0.759257
+ *MESH_VERTEXNORMAL 18 0.000000 0.650791 -0.759257
+ *MESH_VERTEXNORMAL 17 0.000000 0.837992 -0.545682
+ *MESH_FACENORMAL 21 0.000000 0.650791 -0.759256
+ *MESH_VERTEXNORMAL 7 0.000000 0.650791 -0.759257
+ *MESH_VERTEXNORMAL 10 0.000000 0.650791 -0.759256
+ *MESH_VERTEXNORMAL 18 0.000000 0.650791 -0.759257
+ *MESH_FACENORMAL 22 0.000000 0.641636 0.767009
+ *MESH_VERTEXNORMAL 6 0.000001 0.641635 0.767010
+ *MESH_VERTEXNORMAL 19 0.000002 0.641635 0.767010
+ *MESH_VERTEXNORMAL 8 0.000000 0.641636 0.767009
+ *MESH_FACENORMAL 23 0.000004 0.641635 0.767011
+ *MESH_VERTEXNORMAL 6 0.000001 0.641635 0.767011
+ *MESH_VERTEXNORMAL 20 0.000002 0.641634 0.767011
+ *MESH_VERTEXNORMAL 19 0.000002 0.641635 0.767010
+ *MESH_FACENORMAL 24 0.000000 0.641634 0.767011
+ *MESH_VERTEXNORMAL 6 0.000001 0.641635 0.767011
+ *MESH_VERTEXNORMAL 21 -0.000000 0.641634 0.767011
+ *MESH_VERTEXNORMAL 20 0.000002 0.641634 0.767011
+ *MESH_FACENORMAL 25 0.000000 0.641634 0.767011
+ *MESH_VERTEXNORMAL 6 0.000001 0.641635 0.767011
+ *MESH_VERTEXNORMAL 2 0.000001 0.641635 0.767010
+ *MESH_VERTEXNORMAL 21 -0.000000 0.641634 0.767011
+ *MESH_FACENORMAL 26 -0.000001 0.641634 0.767011
+ *MESH_VERTEXNORMAL 2 0.000001 0.641635 0.767010
+ *MESH_VERTEXNORMAL 15 0.000002 0.641635 0.767010
+ *MESH_VERTEXNORMAL 21 -0.000000 0.641634 0.767011
+ *MESH_FACENORMAL 27 0.000005 0.641636 0.767009
+ *MESH_VERTEXNORMAL 2 0.000001 0.641635 0.767010
+ *MESH_VERTEXNORMAL 3 0.000005 0.641636 0.767009
+ *MESH_VERTEXNORMAL 15 0.000002 0.641635 0.767010
+ *MESH_FACENORMAL 28 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 22 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 23 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 24 0.000000 1.000000 0.000000
+ *MESH_FACENORMAL 29 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 24 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 25 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 22 0.000000 1.000000 0.000000
+ *MESH_FACENORMAL 30 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 25 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 24 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 26 0.000000 0.000000 -1.000000
+ *MESH_FACENORMAL 31 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 26 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 27 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 25 0.000000 0.000000 -1.000000
+ *MESH_FACENORMAL 32 0.000000 0.653232 -0.757158
+ *MESH_VERTEXNORMAL 28 0.000000 0.653233 -0.757157
+ *MESH_VERTEXNORMAL 29 0.000000 0.653232 -0.757158
+ *MESH_VERTEXNORMAL 30 0.000000 0.653232 -0.757158
+ *MESH_FACENORMAL 33 0.000000 0.653232 -0.757158
+ *MESH_VERTEXNORMAL 28 0.000000 0.653233 -0.757157
+ *MESH_VERTEXNORMAL 31 0.000000 0.653233 -0.757157
+ *MESH_VERTEXNORMAL 29 0.000000 0.653232 -0.757158
+ *MESH_FACENORMAL 34 0.000000 0.653234 -0.757156
+ *MESH_VERTEXNORMAL 28 0.000000 0.653233 -0.757157
+ *MESH_VERTEXNORMAL 22 0.000000 0.653234 -0.757156
+ *MESH_VERTEXNORMAL 31 0.000000 0.653233 -0.757157
+ *MESH_FACENORMAL 35 0.000000 0.653234 -0.757156
+ *MESH_VERTEXNORMAL 28 0.000000 0.653233 -0.757157
+ *MESH_VERTEXNORMAL 23 0.000000 0.653234 -0.757156
+ *MESH_VERTEXNORMAL 22 0.000000 0.653234 -0.757156
+ *MESH_FACENORMAL 36 0.000000 0.976187 0.216930
+ *MESH_VERTEXNORMAL 32 0.000000 0.976187 0.216930
+ *MESH_VERTEXNORMAL 33 0.000000 0.976187 0.216930
+ *MESH_VERTEXNORMAL 34 0.000000 0.989374 0.145391
+ *MESH_FACENORMAL 37 0.000000 0.976187 0.216930
+ *MESH_VERTEXNORMAL 34 0.000000 0.989374 0.145391
+ *MESH_VERTEXNORMAL 35 0.000000 0.997354 0.072696
+ *MESH_VERTEXNORMAL 32 0.000000 0.976187 0.216930
+ *MESH_FACENORMAL 38 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 36 -0.000000 -0.217192 0.976129
+ *MESH_VERTEXNORMAL 37 -0.000000 -0.434383 0.900728
+ *MESH_VERTEXNORMAL 38 0.000000 0.173285 0.984872
+ *MESH_FACENORMAL 39 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 38 0.000000 0.173285 0.984872
+ *MESH_VERTEXNORMAL 39 0.000000 0.346569 0.938024
+ *MESH_VERTEXNORMAL 36 -0.000000 -0.217192 0.976129
+ *MESH_FACENORMAL 40 0.000000 0.503871 0.863779
+ *MESH_VERTEXNORMAL 39 0.000000 0.346569 0.938024
+ *MESH_VERTEXNORMAL 38 0.000000 0.173285 0.984872
+ *MESH_VERTEXNORMAL 33 0.000000 0.503871 0.863779
+ *MESH_FACENORMAL 41 0.000000 0.503871 0.863779
+ *MESH_VERTEXNORMAL 33 0.000000 0.503871 0.863779
+ *MESH_VERTEXNORMAL 32 0.000000 0.503871 0.863779
+ *MESH_VERTEXNORMAL 39 0.000000 0.346569 0.938024
+ *MESH_FACENORMAL 42 -0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 27 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 40 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 41 -0.000000 -1.000000 0.000000
+ *MESH_FACENORMAL 43 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 40 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 42 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 41 -0.000000 -1.000000 0.000000
+ *MESH_FACENORMAL 44 0.000001 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 27 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 43 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 40 0.000000 -1.000000 0.000000
+ *MESH_FACENORMAL 45 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 27 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 26 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 43 0.000000 -1.000000 0.000000
+ *MESH_FACENORMAL 46 0.000000 -0.619645 0.784883
+ *MESH_VERTEXNORMAL 42 -0.000000 -0.619645 0.784883
+ *MESH_VERTEXNORMAL 40 0.000000 -0.619645 0.784883
+ *MESH_VERTEXNORMAL 37 -0.000000 -0.434383 0.900728
+ *MESH_FACENORMAL 47 -0.000000 -0.619645 0.784883
+ *MESH_VERTEXNORMAL 37 -0.000000 -0.434383 0.900728
+ *MESH_VERTEXNORMAL 36 -0.000000 -0.217192 0.976129
+ *MESH_VERTEXNORMAL 42 -0.000000 -0.619645 0.784883
+ *MESH_FACENORMAL 48 0.000000 1.000000 -0.000000
+ *MESH_VERTEXNORMAL 35 0.000000 0.997354 0.072696
+ *MESH_VERTEXNORMAL 34 0.000000 0.989374 0.145391
+ *MESH_VERTEXNORMAL 30 0.000000 1.000000 -0.000000
+ *MESH_FACENORMAL 49 0.000000 1.000000 -0.000000
+ *MESH_VERTEXNORMAL 30 0.000000 1.000000 -0.000000
+ *MESH_VERTEXNORMAL 29 0.000000 1.000000 -0.000000
+ *MESH_VERTEXNORMAL 35 0.000000 0.997354 0.072696
+ *MESH_FACENORMAL 50 -0.998909 0.046708 -0.000000
+ *MESH_VERTEXNORMAL 44 -0.998909 0.046707 -0.000000
+ *MESH_VERTEXNORMAL 45 -0.998909 0.046707 -0.000000
+ *MESH_VERTEXNORMAL 46 -0.998909 0.046708 -0.000000
+ *MESH_FACENORMAL 51 -0.998909 0.046707 -0.000000
+ *MESH_VERTEXNORMAL 44 -0.998909 0.046707 -0.000000
+ *MESH_VERTEXNORMAL 47 -0.999410 0.015037 -0.030886
+ *MESH_VERTEXNORMAL 45 -0.998909 0.046707 -0.000000
+ *MESH_FACENORMAL 52 -0.998909 0.046707 -0.000000
+ *MESH_VERTEXNORMAL 44 -0.998909 0.046707 -0.000000
+ *MESH_VERTEXNORMAL 48 -0.998909 0.046707 -0.000000
+ *MESH_VERTEXNORMAL 47 -0.999410 0.015037 -0.030886
+ *MESH_FACENORMAL 53 0.998909 0.046708 -0.000004
+ *MESH_VERTEXNORMAL 49 0.998908 0.046714 -0.000004
+ *MESH_VERTEXNORMAL 50 0.999410 0.015035 -0.030885
+ *MESH_VERTEXNORMAL 51 0.998909 0.046708 -0.000004
+ *MESH_FACENORMAL 54 0.998909 0.046708 -0.000005
+ *MESH_VERTEXNORMAL 49 0.998908 0.046714 -0.000004
+ *MESH_VERTEXNORMAL 52 0.998908 0.046714 -0.000002
+ *MESH_VERTEXNORMAL 50 0.999410 0.015035 -0.030885
+ *MESH_FACENORMAL 55 0.998908 0.046727 -0.000002
+ *MESH_VERTEXNORMAL 49 0.998908 0.046714 -0.000004
+ *MESH_VERTEXNORMAL 53 0.998908 0.046727 -0.000002
+ *MESH_VERTEXNORMAL 52 0.998908 0.046714 -0.000002
+ *MESH_FACENORMAL 56 0.000000 -0.994207 0.107482
+ *MESH_VERTEXNORMAL 47 0.000000 -0.997423 0.071747
+ *MESH_VERTEXNORMAL 48 0.000000 -0.994207 0.107482
+ *MESH_VERTEXNORMAL 51 0.000000 -0.994207 0.107482
+ *MESH_FACENORMAL 57 0.000000 -0.994207 0.107482
+ *MESH_VERTEXNORMAL 51 0.000000 -0.994207 0.107482
+ *MESH_VERTEXNORMAL 50 -0.000000 -0.999356 0.035874
+ *MESH_VERTEXNORMAL 47 0.000000 -0.997423 0.071747
+ *MESH_FACENORMAL 58 0.000000 0.164398 -0.986394
+ *MESH_VERTEXNORMAL 48 0.000000 0.164398 -0.986394
+ *MESH_VERTEXNORMAL 44 0.000000 0.164398 -0.986394
+ *MESH_VERTEXNORMAL 49 0.000000 0.164398 -0.986394
+ *MESH_FACENORMAL 59 0.000000 0.164398 -0.986394
+ *MESH_VERTEXNORMAL 49 0.000000 0.164398 -0.986394
+ *MESH_VERTEXNORMAL 51 0.000000 0.164398 -0.986394
+ *MESH_VERTEXNORMAL 48 0.000000 0.164398 -0.986394
+ *MESH_FACENORMAL 60 0.000000 0.992278 -0.124035
+ *MESH_VERTEXNORMAL 44 0.000000 0.992278 -0.124035
+ *MESH_VERTEXNORMAL 46 0.000000 0.992278 -0.124035
+ *MESH_VERTEXNORMAL 53 0.000000 0.992278 -0.124035
+ *MESH_FACENORMAL 61 0.000000 0.992278 -0.124035
+ *MESH_VERTEXNORMAL 53 0.000000 0.992278 -0.124035
+ *MESH_VERTEXNORMAL 49 0.000000 0.992278 -0.124035
+ *MESH_VERTEXNORMAL 44 0.000000 0.992278 -0.124035
+ *MESH_FACENORMAL 62 0.000000 0.124036 0.992278
+ *MESH_VERTEXNORMAL 46 0.000000 0.124036 0.992278
+ *MESH_VERTEXNORMAL 45 0.000000 0.124036 0.992278
+ *MESH_VERTEXNORMAL 52 0.000000 0.124036 0.992278
+ *MESH_FACENORMAL 63 0.000000 0.124036 0.992278
+ *MESH_VERTEXNORMAL 52 0.000000 0.124036 0.992278
+ *MESH_VERTEXNORMAL 53 0.000000 0.124036 0.992278
+ *MESH_VERTEXNORMAL 46 0.000000 0.124036 0.992278
+ *MESH_FACENORMAL 64 0.000001 0.989949 -0.141421
+ *MESH_VERTEXNORMAL 45 0.000000 0.989950 -0.141421
+ *MESH_VERTEXNORMAL 16 0.000000 0.809850 -0.586637
+ *MESH_VERTEXNORMAL 17 0.000000 0.837992 -0.545682
+ *MESH_FACENORMAL 65 0.000000 0.989950 -0.141421
+ *MESH_VERTEXNORMAL 17 0.000000 0.837992 -0.545682
+ *MESH_VERTEXNORMAL 52 0.000000 0.989950 -0.141421
+ *MESH_VERTEXNORMAL 45 0.000000 0.989950 -0.141421
+ *MESH_FACENORMAL 66 0.000000 1.000000 -0.000000
+ *MESH_VERTEXNORMAL 18 0.000000 1.000000 -0.000000
+ *MESH_VERTEXNORMAL 10 0.000000 1.000000 -0.000000
+ *MESH_VERTEXNORMAL 11 0.000000 0.988273 0.152697
+ *MESH_FACENORMAL 67 0.000000 1.000000 -0.000000
+ *MESH_VERTEXNORMAL 11 0.000000 0.988273 0.152697
+ *MESH_VERTEXNORMAL 54 -0.000003 0.952226 0.305393
+ *MESH_VERTEXNORMAL 18 0.000000 1.000000 -0.000000
+ *MESH_FACENORMAL 68 0.000000 0.894426 0.447215
+ *MESH_VERTEXNORMAL 54 -0.000003 0.952226 0.305393
+ *MESH_VERTEXNORMAL 11 0.000000 0.988273 0.152697
+ *MESH_VERTEXNORMAL 9 -0.000005 0.973249 0.229753
+ *MESH_FACENORMAL 69 -0.000010 0.894428 0.447212
+ *MESH_VERTEXNORMAL 9 -0.000005 0.973249 0.229753
+ *MESH_VERTEXNORMAL 55 -0.000010 0.973249 0.229752
+ *MESH_VERTEXNORMAL 54 -0.000003 0.952226 0.305393
+ *MESH_FACENORMAL 70 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 9 -0.000005 0.973249 0.229753
+ *MESH_VERTEXNORMAL 8 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 19 -0.000005 1.000000 0.000000
+ *MESH_FACENORMAL 71 -0.000011 1.000000 0.000000
+ *MESH_VERTEXNORMAL 19 -0.000005 1.000000 0.000000
+ *MESH_VERTEXNORMAL 55 -0.000010 0.973249 0.229752
+ *MESH_VERTEXNORMAL 9 -0.000005 0.973249 0.229753
+ *MESH_FACENORMAL 72 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 21 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 56 -0.000000 -0.917100 0.398657
+ *MESH_VERTEXNORMAL 57 0.000000 -0.979933 0.199329
+ *MESH_FACENORMAL 73 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 57 0.000000 -0.979933 0.199329
+ *MESH_VERTEXNORMAL 20 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 21 0.000000 -1.000000 0.000000
+ *MESH_FACENORMAL 74 -0.000000 -0.819233 0.573461
+ *MESH_VERTEXNORMAL 56 -0.000000 -0.917100 0.398657
+ *MESH_VERTEXNORMAL 58 -0.000000 -0.979933 0.199328
+ *MESH_VERTEXNORMAL 59 -0.000000 -0.917100 0.398657
+ *MESH_FACENORMAL 75 0.000000 -0.819233 0.573461
+ *MESH_VERTEXNORMAL 59 -0.000000 -0.917100 0.398657
+ *MESH_VERTEXNORMAL 57 0.000000 -0.979933 0.199329
+ *MESH_VERTEXNORMAL 56 -0.000000 -0.917100 0.398657
+ *MESH_FACENORMAL 76 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 58 -0.000000 -0.979933 0.199328
+ *MESH_VERTEXNORMAL 47 0.000000 -0.997423 0.071747
+ *MESH_VERTEXNORMAL 50 -0.000000 -0.999356 0.035874
+ *MESH_FACENORMAL 77 -0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 50 -0.000000 -0.999356 0.035874
+ *MESH_VERTEXNORMAL 59 -0.000000 -0.917100 0.398657
+ *MESH_VERTEXNORMAL 58 -0.000000 -0.979933 0.199328
+ *MESH_FACENORMAL 78 0.998909 0.046708 -0.000000
+ *MESH_VERTEXNORMAL 54 0.998909 0.046708 -0.000000
+ *MESH_VERTEXNORMAL 42 0.996438 0.084025 -0.007146
+ *MESH_VERTEXNORMAL 18 0.998909 0.046708 -0.000000
+ *MESH_FACENORMAL 79 0.998909 0.046708 -0.000000
+ *MESH_VERTEXNORMAL 55 0.998909 0.046708 -0.000000
+ *MESH_VERTEXNORMAL 42 0.996438 0.084025 -0.007146
+ *MESH_VERTEXNORMAL 54 0.998909 0.046708 -0.000000
+ *MESH_FACENORMAL 80 0.998909 0.046708 0.000000
+ *MESH_VERTEXNORMAL 41 0.998909 0.046708 0.000000
+ *MESH_VERTEXNORMAL 42 0.996438 0.084025 -0.007146
+ *MESH_VERTEXNORMAL 55 0.998909 0.046708 -0.000000
+ *MESH_FACENORMAL 81 0.998909 0.046708 -0.000000
+ *MESH_VERTEXNORMAL 18 0.998909 0.046708 -0.000000
+ *MESH_VERTEXNORMAL 42 0.996438 0.084025 -0.007146
+ *MESH_VERTEXNORMAL 17 0.994661 0.099625 -0.026930
+ *MESH_FACENORMAL 82 0.972046 0.232070 -0.035627
+ *MESH_VERTEXNORMAL 36 0.991509 0.117187 -0.056370
+ *MESH_VERTEXNORMAL 17 0.994661 0.099625 -0.026930
+ *MESH_VERTEXNORMAL 42 0.996438 0.084025 -0.007146
+ *MESH_FACENORMAL 83 0.994851 0.071618 -0.071716
+ *MESH_VERTEXNORMAL 17 0.994661 0.099625 -0.026930
+ *MESH_VERTEXNORMAL 36 0.991509 0.117187 -0.056370
+ *MESH_VERTEXNORMAL 50 0.999410 0.015035 -0.030885
+ *MESH_FACENORMAL 84 0.997038 0.046620 -0.061164
+ *MESH_VERTEXNORMAL 39 0.997916 0.031725 -0.056190
+ *MESH_VERTEXNORMAL 50 0.999410 0.015035 -0.030885
+ *MESH_VERTEXNORMAL 36 0.991509 0.117187 -0.056370
+ *MESH_FACENORMAL 85 0.998547 0.016823 -0.051202
+ *MESH_VERTEXNORMAL 39 0.997916 0.031725 -0.056190
+ *MESH_VERTEXNORMAL 32 0.998549 -0.035440 -0.040556
+ *MESH_VERTEXNORMAL 50 0.999410 0.015035 -0.030885
+ *MESH_FACENORMAL 86 0.995710 -0.087601 -0.029794
+ *MESH_VERTEXNORMAL 32 0.998549 -0.035440 -0.040556
+ *MESH_VERTEXNORMAL 35 0.997987 -0.055678 -0.030350
+ *MESH_VERTEXNORMAL 50 0.999410 0.015035 -0.030885
+ *MESH_FACENORMAL 87 0.997180 -0.067533 -0.032724
+ *MESH_VERTEXNORMAL 50 0.999410 0.015035 -0.030885
+ *MESH_VERTEXNORMAL 35 0.997987 -0.055678 -0.030350
+ *MESH_VERTEXNORMAL 59 0.999732 -0.010893 -0.020427
+ *MESH_FACENORMAL 88 0.999524 -0.011815 -0.028484
+ *MESH_VERTEXNORMAL 29 0.999585 0.027213 -0.009499
+ *MESH_VERTEXNORMAL 59 0.999732 -0.010893 -0.020427
+ *MESH_VERTEXNORMAL 35 0.997987 -0.055678 -0.030350
+ *MESH_FACENORMAL 89 0.973095 0.230405 0.000000
+ *MESH_VERTEXNORMAL 57 0.987197 0.158366 0.019031
+ *MESH_VERTEXNORMAL 25 0.988480 0.149923 -0.020748
+ *MESH_VERTEXNORMAL 20 0.986149 0.160597 -0.041465
+ *MESH_FACENORMAL 90 0.973095 0.230405 0.000000
+ *MESH_VERTEXNORMAL 22 0.971485 0.232318 0.047396
+ *MESH_VERTEXNORMAL 25 0.988480 0.149923 -0.020748
+ *MESH_VERTEXNORMAL 57 0.987197 0.158366 0.019031
+ *MESH_FACENORMAL 91 0.967686 0.233707 0.094685
+ *MESH_VERTEXNORMAL 31 0.988864 0.141001 0.047610
+ *MESH_VERTEXNORMAL 22 0.971485 0.232318 0.047396
+ *MESH_VERTEXNORMAL 57 0.987197 0.158366 0.019031
+ *MESH_FACENORMAL 92 0.992533 0.089703 -0.082650
+ *MESH_VERTEXNORMAL 20 0.986149 0.160597 -0.041465
+ *MESH_VERTEXNORMAL 25 0.988480 0.149923 -0.020748
+ *MESH_VERTEXNORMAL 19 0.997751 0.061099 -0.027577
+ *MESH_FACENORMAL 93 0.998909 0.046708 -0.000000
+ *MESH_VERTEXNORMAL 27 0.998909 0.046708 -0.000000
+ *MESH_VERTEXNORMAL 19 0.997751 0.061099 -0.027577
+ *MESH_VERTEXNORMAL 25 0.988480 0.149923 -0.020748
+ *MESH_FACENORMAL 94 0.998909 0.046707 -0.000000
+ *MESH_VERTEXNORMAL 31 0.988864 0.141001 0.047610
+ *MESH_VERTEXNORMAL 57 0.987197 0.158366 0.019031
+ *MESH_VERTEXNORMAL 29 0.999585 0.027213 -0.009499
+ *MESH_FACENORMAL 95 0.998909 0.046708 -0.000000
+ *MESH_VERTEXNORMAL 59 0.999732 -0.010893 -0.020427
+ *MESH_VERTEXNORMAL 29 0.999585 0.027213 -0.009499
+ *MESH_VERTEXNORMAL 57 0.987197 0.158366 0.019031
+ *MESH_FACENORMAL 96 0.998909 0.046708 0.000000
+ *MESH_VERTEXNORMAL 19 0.997751 0.061099 -0.027577
+ *MESH_VERTEXNORMAL 27 0.998909 0.046708 -0.000000
+ *MESH_VERTEXNORMAL 55 0.998909 0.046708 -0.000000
+ *MESH_FACENORMAL 97 0.998909 0.046708 0.000000
+ *MESH_VERTEXNORMAL 41 0.998909 0.046708 0.000000
+ *MESH_VERTEXNORMAL 55 0.998909 0.046708 -0.000000
+ *MESH_VERTEXNORMAL 27 0.998909 0.046708 -0.000000
+ *MESH_FACENORMAL 98 0.998909 0.046708 0.000000
+ *MESH_VERTEXNORMAL 52 0.998908 0.046714 -0.000002
+ *MESH_VERTEXNORMAL 17 0.994661 0.099625 -0.026930
+ *MESH_VERTEXNORMAL 50 0.999410 0.015035 -0.030885
+ *MESH_FACENORMAL 99 -0.998909 0.046708 0.000000
+ *MESH_VERTEXNORMAL 40 -0.996438 0.084025 -0.007146
+ *MESH_VERTEXNORMAL 13 -0.998909 0.046708 -0.000000
+ *MESH_VERTEXNORMAL 12 -0.998909 0.046708 0.000000
+ *MESH_FACENORMAL 100 -0.998909 0.046708 -0.000000
+ *MESH_VERTEXNORMAL 40 -0.996438 0.084025 -0.007146
+ *MESH_VERTEXNORMAL 14 -0.998909 0.046707 -0.000000
+ *MESH_VERTEXNORMAL 13 -0.998909 0.046708 -0.000000
+ *MESH_FACENORMAL 101 -0.998909 0.046707 0.000000
+ *MESH_VERTEXNORMAL 40 -0.996438 0.084025 -0.007146
+ *MESH_VERTEXNORMAL 43 -0.998909 0.046707 -0.000000
+ *MESH_VERTEXNORMAL 14 -0.998909 0.046707 -0.000000
+ *MESH_FACENORMAL 102 -0.998909 0.046708 -0.000000
+ *MESH_VERTEXNORMAL 40 -0.996438 0.084025 -0.007146
+ *MESH_VERTEXNORMAL 12 -0.998909 0.046708 0.000000
+ *MESH_VERTEXNORMAL 16 -0.994660 0.099626 -0.026931
+ *MESH_FACENORMAL 103 -0.972046 0.232073 -0.035628
+ *MESH_VERTEXNORMAL 16 -0.994660 0.099626 -0.026931
+ *MESH_VERTEXNORMAL 37 -0.991509 0.117188 -0.056371
+ *MESH_VERTEXNORMAL 40 -0.996438 0.084025 -0.007146
+ *MESH_FACENORMAL 104 -0.994850 0.071619 -0.071717
+ *MESH_VERTEXNORMAL 37 -0.991509 0.117188 -0.056371
+ *MESH_VERTEXNORMAL 16 -0.994660 0.099626 -0.026931
+ *MESH_VERTEXNORMAL 47 -0.999410 0.015037 -0.030886
+ *MESH_FACENORMAL 105 -0.997038 0.046620 -0.061165
+ *MESH_VERTEXNORMAL 47 -0.999410 0.015037 -0.030886
+ *MESH_VERTEXNORMAL 38 -0.997916 0.031725 -0.056191
+ *MESH_VERTEXNORMAL 37 -0.991509 0.117188 -0.056371
+ *MESH_FACENORMAL 106 -0.998547 0.016822 -0.051203
+ *MESH_VERTEXNORMAL 33 -0.998549 -0.035420 -0.040561
+ *MESH_VERTEXNORMAL 38 -0.997916 0.031725 -0.056191
+ *MESH_VERTEXNORMAL 47 -0.999410 0.015037 -0.030886
+ *MESH_FACENORMAL 107 -0.995713 -0.087561 -0.029804
+ *MESH_VERTEXNORMAL 34 -0.997988 -0.055672 -0.030352
+ *MESH_VERTEXNORMAL 33 -0.998549 -0.035420 -0.040561
+ *MESH_VERTEXNORMAL 47 -0.999410 0.015037 -0.030886
+ *MESH_FACENORMAL 108 -0.997179 -0.067558 -0.032724
+ *MESH_VERTEXNORMAL 34 -0.997988 -0.055672 -0.030352
+ *MESH_VERTEXNORMAL 47 -0.999410 0.015037 -0.030886
+ *MESH_VERTEXNORMAL 58 -0.999732 -0.010900 -0.020426
+ *MESH_FACENORMAL 109 -0.999525 -0.011810 -0.028482
+ *MESH_VERTEXNORMAL 58 -0.999732 -0.010900 -0.020426
+ *MESH_VERTEXNORMAL 30 -0.999584 0.027214 -0.009498
+ *MESH_VERTEXNORMAL 34 -0.997988 -0.055672 -0.030352
+ *MESH_FACENORMAL 110 -0.973095 0.230406 0.000000
+ *MESH_VERTEXNORMAL 24 -0.988480 0.149923 -0.020748
+ *MESH_VERTEXNORMAL 56 -0.987197 0.158366 0.019031
+ *MESH_VERTEXNORMAL 21 -0.986149 0.160597 -0.041466
+ *MESH_FACENORMAL 111 -0.973095 0.230406 -0.000000
+ *MESH_VERTEXNORMAL 24 -0.988480 0.149923 -0.020748
+ *MESH_VERTEXNORMAL 23 -0.971484 0.232318 0.047396
+ *MESH_VERTEXNORMAL 56 -0.987197 0.158366 0.019031
+ *MESH_FACENORMAL 112 -0.967686 0.233707 0.094685
+ *MESH_VERTEXNORMAL 23 -0.971484 0.232318 0.047396
+ *MESH_VERTEXNORMAL 28 -0.988864 0.141001 0.047610
+ *MESH_VERTEXNORMAL 56 -0.987197 0.158366 0.019031
+ *MESH_FACENORMAL 113 -0.992533 0.089703 -0.082651
+ *MESH_VERTEXNORMAL 24 -0.988480 0.149923 -0.020748
+ *MESH_VERTEXNORMAL 21 -0.986149 0.160597 -0.041466
+ *MESH_VERTEXNORMAL 15 -0.997751 0.061099 -0.027577
+ *MESH_FACENORMAL 114 -0.998909 0.046708 -0.000000
+ *MESH_VERTEXNORMAL 15 -0.997751 0.061099 -0.027577
+ *MESH_VERTEXNORMAL 26 -0.998909 0.046707 -0.000000
+ *MESH_VERTEXNORMAL 24 -0.988480 0.149923 -0.020748
+ *MESH_FACENORMAL 115 -0.998909 0.046707 -0.000000
+ *MESH_VERTEXNORMAL 56 -0.987197 0.158366 0.019031
+ *MESH_VERTEXNORMAL 28 -0.988864 0.141001 0.047610
+ *MESH_VERTEXNORMAL 30 -0.999584 0.027214 -0.009498
+ *MESH_FACENORMAL 116 -0.998909 0.046708 0.000000
+ *MESH_VERTEXNORMAL 30 -0.999584 0.027214 -0.009498
+ *MESH_VERTEXNORMAL 58 -0.999732 -0.010900 -0.020426
+ *MESH_VERTEXNORMAL 56 -0.987197 0.158366 0.019031
+ *MESH_FACENORMAL 117 -0.998909 0.046707 -0.000000
+ *MESH_VERTEXNORMAL 26 -0.998909 0.046707 -0.000000
+ *MESH_VERTEXNORMAL 15 -0.997751 0.061099 -0.027577
+ *MESH_VERTEXNORMAL 14 -0.998909 0.046707 -0.000000
+ *MESH_FACENORMAL 118 -0.998909 0.046707 -0.000000
+ *MESH_VERTEXNORMAL 14 -0.998909 0.046707 -0.000000
+ *MESH_VERTEXNORMAL 43 -0.998909 0.046707 -0.000000
+ *MESH_VERTEXNORMAL 26 -0.998909 0.046707 -0.000000
+ *MESH_FACENORMAL 119 -0.998909 0.046707 -0.000000
+ *MESH_VERTEXNORMAL 16 -0.994660 0.099626 -0.026931
+ *MESH_VERTEXNORMAL 45 -0.998909 0.046707 -0.000000
+ *MESH_VERTEXNORMAL 47 -0.999410 0.015037 -0.030886
+ *MESH_FACENORMAL 120 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 60 -1.000000 -0.000003 -0.000002
+ *MESH_VERTEXNORMAL 61 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 62 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 121 -1.000000 -0.000009 -0.000006
+ *MESH_VERTEXNORMAL 63 -1.000000 -0.000002 -0.000002
+ *MESH_VERTEXNORMAL 60 -1.000000 -0.000003 -0.000002
+ *MESH_VERTEXNORMAL 64 -1.000000 -0.000004 -0.000003
+ *MESH_FACENORMAL 122 -1.000000 0.000001 -0.000000
+ *MESH_VERTEXNORMAL 61 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 60 -1.000000 -0.000003 -0.000002
+ *MESH_VERTEXNORMAL 63 -1.000000 -0.000002 -0.000002
+ *MESH_FACENORMAL 123 -0.987259 0.150601 -0.051365
+ *MESH_VERTEXNORMAL 65 -0.996810 0.075541 -0.025765
+ *MESH_VERTEXNORMAL 66 -0.999755 0.016056 -0.015234
+ *MESH_VERTEXNORMAL 67 -0.999590 -0.014372 -0.024782
+ *MESH_FACENORMAL 124 -1.000000 -0.000001 -0.000001
+ *MESH_VERTEXNORMAL 68 -1.000000 -0.000001 -0.000000
+ *MESH_VERTEXNORMAL 66 -0.999755 0.016056 -0.015234
+ *MESH_VERTEXNORMAL 65 -0.996810 0.075541 -0.025765
+ *MESH_FACENORMAL 125 -1.000000 -0.000004 0.000001
+ *MESH_VERTEXNORMAL 69 -1.000000 -0.000002 0.000000
+ *MESH_VERTEXNORMAL 66 -0.999755 0.016056 -0.015234
+ *MESH_VERTEXNORMAL 68 -1.000000 -0.000001 -0.000000
+ *MESH_FACENORMAL 126 -0.996611 -0.082255 0.000000
+ *MESH_VERTEXNORMAL 70 -0.999309 -0.036496 -0.007003
+ *MESH_VERTEXNORMAL 71 -0.996611 -0.082255 0.000000
+ *MESH_VERTEXNORMAL 67 -0.999590 -0.014372 -0.024782
+ *MESH_FACENORMAL 127 -0.358233 -0.264573 -0.895360
+ *MESH_VERTEXNORMAL 72 -0.358233 -0.264573 -0.895360
+ *MESH_VERTEXNORMAL 67 -0.358233 -0.264573 -0.895360
+ *MESH_VERTEXNORMAL 71 -0.358233 -0.264573 -0.895360
+ *MESH_FACENORMAL 128 -0.999794 -0.005756 -0.019483
+ *MESH_VERTEXNORMAL 67 -0.999590 -0.014372 -0.024782
+ *MESH_VERTEXNORMAL 72 -0.998917 -0.045500 -0.009750
+ *MESH_VERTEXNORMAL 73 -0.998917 -0.045500 -0.009750
+ *MESH_FACENORMAL 129 -0.996367 -0.085168 0.000000
+ *MESH_VERTEXNORMAL 74 -0.996367 -0.085168 0.000000
+ *MESH_VERTEXNORMAL 73 -0.998917 -0.045500 -0.009750
+ *MESH_VERTEXNORMAL 72 -0.998917 -0.045500 -0.009750
+ *MESH_FACENORMAL 130 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 75 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 76 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 77 -1.000000 0.000000 -0.000000
+ *MESH_FACENORMAL 131 -1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 78 -1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 79 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 80 -1.000000 0.000000 -0.000000
+ *MESH_FACENORMAL 132 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 79 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 81 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 80 -1.000000 0.000000 -0.000000
+ *MESH_FACENORMAL 133 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 82 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 80 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 81 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 134 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 83 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 80 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 82 -1.000000 0.000000 -0.000000
+ *MESH_FACENORMAL 135 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 82 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 84 -1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 83 -1.000000 0.000000 -0.000000
+ *MESH_FACENORMAL 136 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 83 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 84 -1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 85 -1.000000 0.000000 -0.000000
+ *MESH_FACENORMAL 137 -1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 86 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 85 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 84 -1.000000 -0.000000 0.000000
+ *MESH_FACENORMAL 138 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 78 -1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 80 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 76 -1.000000 0.000000 -0.000000
+ *MESH_FACENORMAL 139 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 77 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 76 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 80 -1.000000 0.000000 -0.000000
+ *MESH_FACENORMAL 140 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 87 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 75 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 77 -1.000000 0.000000 -0.000000
+ *MESH_FACENORMAL 141 -1.000000 0.000000 -0.000001
+ *MESH_VERTEXNORMAL 86 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 87 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 85 -1.000000 0.000000 -0.000000
+ *MESH_FACENORMAL 142 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 77 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 85 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 87 -1.000000 0.000000 -0.000000
+ *MESH_FACENORMAL 143 -0.997205 -0.070556 -0.024587
+ *MESH_VERTEXNORMAL 67 -0.999590 -0.014372 -0.024782
+ *MESH_VERTEXNORMAL 66 -0.999755 0.016056 -0.015234
+ *MESH_VERTEXNORMAL 88 -0.999350 -0.033563 -0.013153
+ *MESH_FACENORMAL 144 -1.000000 0.000009 0.000000
+ *MESH_VERTEXNORMAL 89 -1.000000 0.000009 0.000000
+ *MESH_VERTEXNORMAL 88 -0.999350 -0.033563 -0.013153
+ *MESH_VERTEXNORMAL 66 -0.999755 0.016056 -0.015234
+ *MESH_FACENORMAL 145 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 90 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 62 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 68 -1.000000 -0.000001 -0.000000
+ *MESH_FACENORMAL 146 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 61 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 68 -1.000000 -0.000001 -0.000000
+ *MESH_VERTEXNORMAL 62 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 147 -1.000000 0.000000 -0.000001
+ *MESH_VERTEXNORMAL 91 -1.000000 -0.000000 -0.000001
+ *MESH_VERTEXNORMAL 63 -1.000000 -0.000002 -0.000002
+ *MESH_VERTEXNORMAL 64 -1.000000 -0.000004 -0.000003
+ *MESH_FACENORMAL 148 -1.000000 -0.000001 -0.000001
+ *MESH_VERTEXNORMAL 92 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 63 -1.000000 -0.000002 -0.000002
+ *MESH_VERTEXNORMAL 91 -1.000000 -0.000000 -0.000001
+ *MESH_FACENORMAL 149 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 93 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 70 -0.999309 -0.036496 -0.007003
+ *MESH_VERTEXNORMAL 94 -1.000000 0.000000 -0.000000
+ *MESH_FACENORMAL 150 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 88 -0.999350 -0.033563 -0.013153
+ *MESH_VERTEXNORMAL 94 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 70 -0.999309 -0.036496 -0.007003
+ *MESH_FACENORMAL 151 -1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 69 -1.000000 -0.000002 0.000000
+ *MESH_VERTEXNORMAL 68 -1.000000 -0.000001 -0.000000
+ *MESH_VERTEXNORMAL 61 -1.000000 0.000000 -0.000000
+ *MESH_FACENORMAL 152 -0.997582 -0.063616 -0.027991
+ *MESH_VERTEXNORMAL 70 -0.999309 -0.036496 -0.007003
+ *MESH_VERTEXNORMAL 67 -0.999590 -0.014372 -0.024782
+ *MESH_VERTEXNORMAL 88 -0.999350 -0.033563 -0.013153
+ *MESH_FACENORMAL 153 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 95 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 96 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 92 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 154 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 97 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 95 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 92 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 155 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 91 -1.000000 -0.000000 -0.000001
+ *MESH_VERTEXNORMAL 97 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 92 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 156 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 98 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 96 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 95 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 157 1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 99 1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 100 1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 101 1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 158 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 99 1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 102 1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 100 1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 159 0.987260 0.150596 -0.051362
+ *MESH_VERTEXNORMAL 103 0.999755 0.016054 -0.015233
+ *MESH_VERTEXNORMAL 104 0.996810 0.075539 -0.025763
+ *MESH_VERTEXNORMAL 105 0.999590 -0.014373 -0.024781
+ *MESH_FACENORMAL 160 1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 103 0.999755 0.016054 -0.015233
+ *MESH_VERTEXNORMAL 106 1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 104 0.996810 0.075539 -0.025763
+ *MESH_FACENORMAL 161 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 103 0.999755 0.016054 -0.015233
+ *MESH_VERTEXNORMAL 107 1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 106 1.000000 -0.000000 0.000000
+ *MESH_FACENORMAL 162 0.996612 -0.082252 0.000000
+ *MESH_VERTEXNORMAL 108 0.996612 -0.082252 0.000000
+ *MESH_VERTEXNORMAL 109 0.999309 -0.036494 -0.007003
+ *MESH_VERTEXNORMAL 105 0.999590 -0.014373 -0.024781
+ *MESH_FACENORMAL 163 0.358232 -0.264572 -0.895361
+ *MESH_VERTEXNORMAL 105 0.358232 -0.264572 -0.895361
+ *MESH_VERTEXNORMAL 110 0.358232 -0.264572 -0.895361
+ *MESH_VERTEXNORMAL 108 0.358232 -0.264572 -0.895361
+ *MESH_FACENORMAL 164 0.999794 -0.005757 -0.019484
+ *MESH_VERTEXNORMAL 110 0.998917 -0.045502 -0.009750
+ *MESH_VERTEXNORMAL 105 0.999590 -0.014373 -0.024781
+ *MESH_VERTEXNORMAL 111 0.998917 -0.045502 -0.009750
+ *MESH_FACENORMAL 165 0.996366 -0.085171 0.000000
+ *MESH_VERTEXNORMAL 111 0.998917 -0.045502 -0.009750
+ *MESH_VERTEXNORMAL 112 0.996366 -0.085171 0.000000
+ *MESH_VERTEXNORMAL 110 0.998917 -0.045502 -0.009750
+ *MESH_FACENORMAL 166 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 113 1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 114 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 115 1.000000 0.000000 -0.000000
+ *MESH_FACENORMAL 167 1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 116 1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 117 1.000000 -0.000001 0.000000
+ *MESH_VERTEXNORMAL 118 1.000000 -0.000000 0.000000
+ *MESH_FACENORMAL 168 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 119 1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 116 1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 118 1.000000 -0.000000 0.000000
+ *MESH_FACENORMAL 169 1.000000 -0.000000 0.000001
+ *MESH_VERTEXNORMAL 118 1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 120 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 119 1.000000 -0.000000 0.000000
+ *MESH_FACENORMAL 170 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 118 1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 121 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 120 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 171 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 122 1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 120 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 121 1.000000 0.000000 -0.000000
+ *MESH_FACENORMAL 172 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 122 1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 121 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 123 1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 173 1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 123 1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 124 1.000000 -0.000000 -0.000001
+ *MESH_VERTEXNORMAL 122 1.000000 -0.000000 0.000000
+ *MESH_FACENORMAL 174 1.000000 -0.000001 0.000000
+ *MESH_VERTEXNORMAL 118 1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 117 1.000000 -0.000001 0.000000
+ *MESH_VERTEXNORMAL 113 1.000000 -0.000000 0.000000
+ *MESH_FACENORMAL 175 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 113 1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 115 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 118 1.000000 -0.000000 0.000000
+ *MESH_FACENORMAL 176 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 114 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 125 1.000000 0.000000 -0.000001
+ *MESH_VERTEXNORMAL 115 1.000000 0.000000 -0.000000
+ *MESH_FACENORMAL 177 1.000000 0.000000 -0.000001
+ *MESH_VERTEXNORMAL 125 1.000000 0.000000 -0.000001
+ *MESH_VERTEXNORMAL 124 1.000000 -0.000000 -0.000001
+ *MESH_VERTEXNORMAL 123 1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 178 1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 123 1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 115 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 125 1.000000 0.000000 -0.000001
+ *MESH_FACENORMAL 179 0.997205 -0.070557 -0.024584
+ *MESH_VERTEXNORMAL 103 0.999755 0.016054 -0.015233
+ *MESH_VERTEXNORMAL 105 0.999590 -0.014373 -0.024781
+ *MESH_VERTEXNORMAL 126 0.999350 -0.033564 -0.013152
+ *MESH_FACENORMAL 180 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 126 0.999350 -0.033564 -0.013152
+ *MESH_VERTEXNORMAL 127 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 103 0.999755 0.016054 -0.015233
+ *MESH_FACENORMAL 181 1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 128 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 129 1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 106 1.000000 -0.000000 0.000000
+ *MESH_FACENORMAL 182 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 106 1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 99 1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 128 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 183 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 100 1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 130 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 101 1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 184 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 100 1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 131 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 130 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 185 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 109 0.999309 -0.036494 -0.007003
+ *MESH_VERTEXNORMAL 132 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 133 1.000000 0.000000 -0.000000
+ *MESH_FACENORMAL 186 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 133 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 126 0.999350 -0.033564 -0.013152
+ *MESH_VERTEXNORMAL 109 0.999309 -0.036494 -0.007003
+ *MESH_FACENORMAL 187 1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 106 1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 107 1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 102 1.000000 -0.000000 0.000000
+ *MESH_FACENORMAL 188 0.997582 -0.063613 -0.027990
+ *MESH_VERTEXNORMAL 105 0.999590 -0.014373 -0.024781
+ *MESH_VERTEXNORMAL 109 0.999309 -0.036494 -0.007003
+ *MESH_VERTEXNORMAL 126 0.999350 -0.033564 -0.013152
+ *MESH_FACENORMAL 189 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 134 1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 135 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 131 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 190 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 135 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 136 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 131 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 191 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 136 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 130 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 131 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 192 1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 134 1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 137 1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 135 1.000000 0.000000 -0.000000
+ *MESH_FACENORMAL 193 0.498597 -0.866834 0.000000
+ *MESH_VERTEXNORMAL 138 0.258037 -0.966135 0.000000
+ *MESH_VERTEXNORMAL 110 0.498596 -0.866834 0.000000
+ *MESH_VERTEXNORMAL 112 0.498597 -0.866834 0.000000
+ *MESH_FACENORMAL 194 0.498596 -0.866834 0.000000
+ *MESH_VERTEXNORMAL 138 0.258037 -0.966135 0.000000
+ *MESH_VERTEXNORMAL 139 0.101914 -0.994793 0.000000
+ *MESH_VERTEXNORMAL 110 0.498596 -0.866834 0.000000
+ *MESH_FACENORMAL 195 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 108 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 110 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 139 0.000000 0.000000 1.000000
+ *MESH_FACENORMAL 196 -0.000016 -0.000012 1.000000
+ *MESH_VERTEXNORMAL 140 -0.000016 -0.000012 1.000000
+ *MESH_VERTEXNORMAL 72 -0.000016 -0.000012 1.000000
+ *MESH_VERTEXNORMAL 71 -0.000016 -0.000012 1.000000
+ *MESH_FACENORMAL 197 -0.498591 -0.866837 0.000000
+ *MESH_VERTEXNORMAL 141 -0.342690 -0.939449 0.000000
+ *MESH_VERTEXNORMAL 72 -0.498591 -0.866837 0.000000
+ *MESH_VERTEXNORMAL 140 -0.101913 -0.994793 0.000000
+ *MESH_FACENORMAL 198 -0.498592 -0.866837 0.000000
+ *MESH_VERTEXNORMAL 141 -0.342690 -0.939449 0.000000
+ *MESH_VERTEXNORMAL 74 -0.498592 -0.866837 0.000000
+ *MESH_VERTEXNORMAL 72 -0.498591 -0.866837 0.000000
+ *MESH_FACENORMAL 199 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 140 -0.101913 -0.994793 0.000000
+ *MESH_VERTEXNORMAL 138 0.258037 -0.966135 0.000000
+ *MESH_VERTEXNORMAL 141 -0.342690 -0.939449 0.000000
+ *MESH_FACENORMAL 200 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 140 -0.101913 -0.994793 0.000000
+ *MESH_VERTEXNORMAL 139 0.101914 -0.994793 0.000000
+ *MESH_VERTEXNORMAL 138 0.258037 -0.966135 0.000000
+ *MESH_FACENORMAL 201 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 140 -0.101913 -0.994793 0.000000
+ *MESH_VERTEXNORMAL 70 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 139 0.101914 -0.994793 0.000000
+ *MESH_FACENORMAL 202 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 140 -0.101913 -0.994793 0.000000
+ *MESH_VERTEXNORMAL 71 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 70 0.000000 -1.000000 0.000000
+ *MESH_FACENORMAL 203 0.000030 -1.000000 -0.000012
+ *MESH_VERTEXNORMAL 126 -0.000046 -1.000000 -0.000005
+ *MESH_VERTEXNORMAL 77 0.000020 -0.999903 -0.013955
+ *MESH_VERTEXNORMAL 115 -0.000036 -0.999932 -0.011630
+ *MESH_FACENORMAL 204 -0.000168 -1.000000 -0.000000
+ *MESH_VERTEXNORMAL 115 -0.000036 -0.999932 -0.011630
+ *MESH_VERTEXNORMAL 127 -0.000168 -1.000000 -0.000000
+ *MESH_VERTEXNORMAL 126 -0.000046 -1.000000 -0.000005
+ *MESH_FACENORMAL 205 1.000000 -0.000001 0.000000
+ *MESH_VERTEXNORMAL 102 1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 99 1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 106 1.000000 -0.000000 0.000000
+ *MESH_FACENORMAL 206 -0.000085 -0.000006 -1.000000
+ *MESH_VERTEXNORMAL 103 0.000015 -0.000001 -1.000000
+ *MESH_VERTEXNORMAL 123 -0.000020 -0.000001 -1.000000
+ *MESH_VERTEXNORMAL 107 -0.000085 -0.000006 -1.000000
+ *MESH_FACENORMAL 207 0.000045 0.000005 -1.000000
+ *MESH_VERTEXNORMAL 103 0.000015 -0.000001 -1.000000
+ *MESH_VERTEXNORMAL 115 0.000065 0.000001 -1.000000
+ *MESH_VERTEXNORMAL 123 -0.000020 -0.000001 -1.000000
+ *MESH_FACENORMAL 208 0.000085 -0.000002 -1.000000
+ *MESH_VERTEXNORMAL 103 0.000015 -0.000001 -1.000000
+ *MESH_VERTEXNORMAL 127 0.000085 -0.000002 -1.000000
+ *MESH_VERTEXNORMAL 115 0.000065 0.000001 -1.000000
+ *MESH_FACENORMAL 209 0.000103 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 107 0.000104 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 121 0.000104 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 102 0.000103 -1.000000 0.000000
+ *MESH_FACENORMAL 210 0.000105 -1.000000 -0.000000
+ *MESH_VERTEXNORMAL 107 0.000104 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 123 0.000105 -1.000000 -0.000000
+ *MESH_VERTEXNORMAL 121 0.000104 -1.000000 0.000000
+ *MESH_FACENORMAL 211 0.000056 0.001351 0.999999
+ *MESH_VERTEXNORMAL 118 0.011404 0.000677 0.999935
+ *MESH_VERTEXNORMAL 102 0.011404 0.000677 0.999935
+ *MESH_VERTEXNORMAL 121 0.000056 0.001351 0.999999
+ *MESH_FACENORMAL 212 0.022751 0.000003 0.999741
+ *MESH_VERTEXNORMAL 118 0.014111 -0.251816 0.967672
+ *MESH_VERTEXNORMAL 100 0.021332 -0.381955 0.923935
+ *MESH_VERTEXNORMAL 102 0.011404 0.000677 0.999935
+ *MESH_FACENORMAL 213 -0.000000 0.889567 0.456805
+ *MESH_VERTEXNORMAL 117 -0.000000 0.952614 0.304182
+ *MESH_VERTEXNORMAL 116 -0.000000 0.722748 0.691112
+ *MESH_VERTEXNORMAL 79 -0.000001 0.722749 0.691111
+ *MESH_FACENORMAL 214 -0.000000 0.889567 0.456805
+ *MESH_VERTEXNORMAL 79 -0.000001 0.722749 0.691111
+ *MESH_VERTEXNORMAL 78 -0.000021 0.990352 0.138573
+ *MESH_VERTEXNORMAL 117 -0.000000 0.952614 0.304182
+ *MESH_FACENORMAL 215 0.000000 -0.099501 0.995037
+ *MESH_VERTEXNORMAL 119 -0.000001 0.208205 0.978085
+ *MESH_VERTEXNORMAL 120 0.000000 -0.099501 0.995037
+ *MESH_VERTEXNORMAL 82 -0.000001 -0.099503 0.995037
+ *MESH_FACENORMAL 216 -0.000003 -0.099505 0.995037
+ *MESH_VERTEXNORMAL 82 -0.000001 -0.099503 0.995037
+ *MESH_VERTEXNORMAL 81 -0.000003 0.208204 0.978085
+ *MESH_VERTEXNORMAL 119 -0.000001 0.208205 0.978085
+ *MESH_FACENORMAL 217 0.000000 -0.999980 0.006369
+ *MESH_VERTEXNORMAL 122 0.000000 -0.947672 0.319246
+ *MESH_VERTEXNORMAL 124 0.000000 -0.999980 0.006369
+ *MESH_VERTEXNORMAL 86 0.000000 -0.999980 0.006369
+ *MESH_FACENORMAL 218 0.000000 -0.999980 0.006369
+ *MESH_VERTEXNORMAL 86 0.000000 -0.999980 0.006369
+ *MESH_VERTEXNORMAL 84 0.000000 -0.947672 0.319246
+ *MESH_VERTEXNORMAL 122 0.000000 -0.947672 0.319246
+ *MESH_FACENORMAL 219 0.000000 0.459424 -0.888217
+ *MESH_VERTEXNORMAL 125 0.000000 0.236414 -0.971652
+ *MESH_VERTEXNORMAL 114 0.000000 0.632683 -0.774411
+ *MESH_VERTEXNORMAL 75 -0.000728 0.632262 -0.774754
+ *MESH_FACENORMAL 220 0.000000 0.459424 -0.888217
+ *MESH_VERTEXNORMAL 75 -0.000728 0.632262 -0.774754
+ *MESH_VERTEXNORMAL 87 0.000000 0.236414 -0.971652
+ *MESH_VERTEXNORMAL 125 0.000000 0.236414 -0.971652
+ *MESH_FACENORMAL 221 0.016677 -0.705992 0.708023
+ *MESH_VERTEXNORMAL 131 0.004307 -0.598209 0.801328
+ *MESH_VERTEXNORMAL 100 0.021332 -0.381955 0.923935
+ *MESH_VERTEXNORMAL 118 0.014091 -0.505000 0.863005
+ *MESH_FACENORMAL 222 -0.000000 -0.707107 0.707107
+ *MESH_VERTEXNORMAL 118 0.008339 -0.706574 0.707590
+ *MESH_VERTEXNORMAL 80 -0.005559 -0.706757 0.707434
+ *MESH_VERTEXNORMAL 131 0.004307 -0.598209 0.801328
+ *MESH_FACENORMAL 223 -0.016678 -0.705992 0.708023
+ *MESH_VERTEXNORMAL 80 -0.010450 -0.561538 0.827385
+ *MESH_VERTEXNORMAL 63 -0.014095 -0.251818 0.967672
+ *MESH_VERTEXNORMAL 92 -0.004356 -0.471527 0.881841
+ *MESH_FACENORMAL 224 0.000000 -0.707107 0.707107
+ *MESH_VERTEXNORMAL 92 -0.004356 -0.471527 0.881841
+ *MESH_VERTEXNORMAL 131 0.004307 -0.598209 0.801328
+ *MESH_VERTEXNORMAL 80 -0.005559 -0.706757 0.707434
+ *MESH_FACENORMAL 225 -0.000051 -1.000000 -0.000002
+ *MESH_VERTEXNORMAL 85 -0.000078 -1.000000 -0.000001
+ *MESH_VERTEXNORMAL 69 -0.000051 -1.000000 -0.000002
+ *MESH_VERTEXNORMAL 61 -0.000078 -1.000000 -0.000001
+ *MESH_FACENORMAL 226 -0.000104 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 61 -0.000078 -1.000000 -0.000001
+ *MESH_VERTEXNORMAL 83 -0.000104 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 85 -0.000078 -1.000000 -0.000001
+ *MESH_FACENORMAL 227 -0.022752 0.001350 0.999740
+ *MESH_VERTEXNORMAL 83 -0.005719 0.000341 0.999984
+ *MESH_VERTEXNORMAL 63 -0.014095 -0.251818 0.967672
+ *MESH_VERTEXNORMAL 80 -0.021338 -0.381332 0.924192
+ *MESH_FACENORMAL 228 -0.000011 -0.000000 1.000000
+ *MESH_VERTEXNORMAL 83 -0.005719 0.000341 0.999984
+ *MESH_VERTEXNORMAL 142 -0.000011 -0.000000 1.000000
+ *MESH_VERTEXNORMAL 63 -0.014095 -0.251818 0.967672
+ *MESH_FACENORMAL 229 -0.000011 0.000000 1.000000
+ *MESH_VERTEXNORMAL 83 -0.005719 0.000341 0.999984
+ *MESH_VERTEXNORMAL 143 -0.000057 0.000008 1.000000
+ *MESH_VERTEXNORMAL 142 -0.000011 -0.000000 1.000000
+ *MESH_FACENORMAL 230 -0.000102 0.000015 1.000000
+ *MESH_VERTEXNORMAL 83 -0.005719 0.000341 0.999984
+ *MESH_VERTEXNORMAL 61 -0.000102 0.000015 1.000000
+ *MESH_VERTEXNORMAL 143 -0.000057 0.000008 1.000000
+ *MESH_FACENORMAL 231 0.000040 0.000003 -1.000000
+ *MESH_VERTEXNORMAL 77 -0.000048 -0.000001 -1.000000
+ *MESH_VERTEXNORMAL 69 -0.000075 -0.000004 -1.000000
+ *MESH_VERTEXNORMAL 85 0.000040 0.000003 -1.000000
+ *MESH_FACENORMAL 232 -0.000191 -0.000010 -1.000000
+ *MESH_VERTEXNORMAL 77 -0.000048 -0.000001 -1.000000
+ *MESH_VERTEXNORMAL 144 -0.000098 -0.000004 -1.000000
+ *MESH_VERTEXNORMAL 69 -0.000075 -0.000004 -1.000000
+ *MESH_FACENORMAL 233 -0.000005 0.000003 -1.000000
+ *MESH_VERTEXNORMAL 77 -0.000048 -0.000001 -1.000000
+ *MESH_VERTEXNORMAL 145 -0.000020 0.000002 -1.000000
+ *MESH_VERTEXNORMAL 144 -0.000098 -0.000004 -1.000000
+ *MESH_FACENORMAL 234 -0.000036 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 77 -0.000048 -0.000001 -1.000000
+ *MESH_VERTEXNORMAL 146 -0.000041 -0.000001 -1.000000
+ *MESH_VERTEXNORMAL 145 -0.000020 0.000002 -1.000000
+ *MESH_FACENORMAL 235 -0.000047 -0.000002 -1.000000
+ *MESH_VERTEXNORMAL 77 -0.000048 -0.000001 -1.000000
+ *MESH_VERTEXNORMAL 89 -0.000047 -0.000002 -1.000000
+ *MESH_VERTEXNORMAL 146 -0.000041 -0.000001 -1.000000
+ *MESH_FACENORMAL 236 -0.000060 0.999655 -0.026279
+ *MESH_VERTEXNORMAL 78 -0.000021 0.990352 0.138573
+ *MESH_VERTEXNORMAL 76 -0.001536 0.938241 -0.345980
+ *MESH_VERTEXNORMAL 113 -0.000768 0.938426 -0.345478
+ *MESH_FACENORMAL 237 -0.000000 0.999654 -0.026307
+ *MESH_VERTEXNORMAL 113 -0.000768 0.938426 -0.345478
+ *MESH_VERTEXNORMAL 117 -0.000000 0.952614 0.304182
+ *MESH_VERTEXNORMAL 78 -0.000021 0.990352 0.138573
+ *MESH_FACENORMAL 238 0.000000 -1.000000 -0.000002
+ *MESH_VERTEXNORMAL 77 0.000020 -0.999903 -0.013955
+ *MESH_VERTEXNORMAL 126 -0.000046 -1.000000 -0.000005
+ *MESH_VERTEXNORMAL 88 0.000019 -1.000000 -0.000001
+ *MESH_FACENORMAL 239 0.000038 -1.000000 -0.000000
+ *MESH_VERTEXNORMAL 88 0.000019 -1.000000 -0.000001
+ *MESH_VERTEXNORMAL 89 0.000038 -1.000000 -0.000000
+ *MESH_VERTEXNORMAL 77 0.000020 -0.999903 -0.013955
+ *MESH_FACENORMAL 240 0.000030 -0.999392 -0.034874
+ *MESH_VERTEXNORMAL 118 0.000015 -0.999392 -0.034876
+ *MESH_VERTEXNORMAL 115 -0.000036 -0.999932 -0.011630
+ *MESH_VERTEXNORMAL 77 0.000020 -0.999903 -0.013955
+ *MESH_FACENORMAL 241 -0.000000 -0.999392 -0.034879
+ *MESH_VERTEXNORMAL 77 0.000020 -0.999903 -0.013955
+ *MESH_VERTEXNORMAL 80 -0.000000 -0.999392 -0.034879
+ *MESH_VERTEXNORMAL 118 0.000015 -0.999392 -0.034876
+ *MESH_FACENORMAL 242 -0.000002 0.496140 0.868243
+ *MESH_VERTEXNORMAL 119 -0.000001 0.208205 0.978085
+ *MESH_VERTEXNORMAL 81 -0.000003 0.208204 0.978085
+ *MESH_VERTEXNORMAL 79 -0.000001 0.722749 0.691111
+ *MESH_FACENORMAL 243 -0.000000 0.496138 0.868244
+ *MESH_VERTEXNORMAL 79 -0.000001 0.722749 0.691111
+ *MESH_VERTEXNORMAL 116 -0.000000 0.722748 0.691112
+ *MESH_VERTEXNORMAL 119 -0.000001 0.208205 0.978085
+ *MESH_FACENORMAL 244 0.000000 -0.800001 0.599998
+ *MESH_VERTEXNORMAL 122 0.000000 -0.947672 0.319246
+ *MESH_VERTEXNORMAL 84 0.000000 -0.947672 0.319246
+ *MESH_VERTEXNORMAL 82 0.000000 -0.800001 0.599998
+ *MESH_FACENORMAL 245 0.000000 -0.800001 0.599998
+ *MESH_VERTEXNORMAL 82 0.000000 -0.800001 0.599998
+ *MESH_VERTEXNORMAL 120 0.000000 -0.800001 0.599998
+ *MESH_VERTEXNORMAL 122 0.000000 -0.947672 0.319246
+ *MESH_FACENORMAL 246 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 125 0.000000 0.236414 -0.971652
+ *MESH_VERTEXNORMAL 87 0.000000 0.236414 -0.971652
+ *MESH_VERTEXNORMAL 86 0.000000 0.000000 -1.000000
+ *MESH_FACENORMAL 247 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 86 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 124 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 125 0.000000 0.236414 -0.971652
+ *MESH_FACENORMAL 248 -0.002849 0.777390 -0.629013
+ *MESH_VERTEXNORMAL 113 -0.000768 0.938426 -0.345478
+ *MESH_VERTEXNORMAL 76 -0.001536 0.938241 -0.345980
+ *MESH_VERTEXNORMAL 75 -0.000728 0.632262 -0.774754
+ *MESH_FACENORMAL 249 0.000000 0.778754 -0.627329
+ *MESH_VERTEXNORMAL 75 -0.000728 0.632262 -0.774754
+ *MESH_VERTEXNORMAL 114 0.000000 0.632683 -0.774411
+ *MESH_VERTEXNORMAL 113 -0.000768 0.938426 -0.345478
+ *MESH_FACENORMAL 250 0.000000 0.384615 0.923077
+ *MESH_VERTEXNORMAL 104 0.000000 0.384615 0.923077
+ *MESH_VERTEXNORMAL 106 0.000000 0.384615 0.923077
+ *MESH_VERTEXNORMAL 68 0.000000 0.384615 0.923077
+ *MESH_FACENORMAL 251 0.000000 0.384615 0.923077
+ *MESH_VERTEXNORMAL 68 0.000000 0.384615 0.923077
+ *MESH_VERTEXNORMAL 65 0.000000 0.384615 0.923077
+ *MESH_VERTEXNORMAL 104 0.000000 0.384615 0.923077
+ *MESH_FACENORMAL 252 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 139 0.101914 -0.994793 0.000000
+ *MESH_VERTEXNORMAL 70 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 109 0.000000 -1.000000 0.000000
+ *MESH_FACENORMAL 253 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 109 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 108 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 139 0.101914 -0.994793 0.000000
+ *MESH_FACENORMAL 254 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 132 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 109 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 70 0.000000 0.000000 1.000000
+ *MESH_FACENORMAL 255 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 70 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 93 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 132 0.000000 0.000000 1.000000
+ *MESH_FACENORMAL 256 0.000000 0.000001 -1.000000
+ *MESH_VERTEXNORMAL 126 0.000000 0.000001 -1.000000
+ *MESH_VERTEXNORMAL 133 0.000000 0.000001 -1.000000
+ *MESH_VERTEXNORMAL 94 0.000000 0.000001 -1.000000
+ *MESH_FACENORMAL 257 0.000000 0.000001 -1.000000
+ *MESH_VERTEXNORMAL 94 0.000000 0.000001 -1.000000
+ *MESH_VERTEXNORMAL 88 0.000000 0.000001 -1.000000
+ *MESH_VERTEXNORMAL 126 0.000000 0.000001 -1.000000
+ *MESH_FACENORMAL 258 0.000000 -0.196116 0.980581
+ *MESH_VERTEXNORMAL 134 0.000000 -0.405232 0.914214
+ *MESH_VERTEXNORMAL 131 0.004307 -0.598209 0.801328
+ *MESH_VERTEXNORMAL 92 -0.004356 -0.471527 0.881841
+ *MESH_FACENORMAL 259 0.000000 -0.196116 0.980581
+ *MESH_VERTEXNORMAL 92 -0.004356 -0.471527 0.881841
+ *MESH_VERTEXNORMAL 96 0.000000 -0.604152 0.796869
+ *MESH_VERTEXNORMAL 134 0.000000 -0.405232 0.914214
+ *MESH_FACENORMAL 260 0.000000 -0.763386 0.645943
+ *MESH_VERTEXNORMAL 137 0.000000 -0.763386 0.645943
+ *MESH_VERTEXNORMAL 134 0.000000 -0.405232 0.914214
+ *MESH_VERTEXNORMAL 96 0.000000 -0.604152 0.796869
+ *MESH_FACENORMAL 261 0.000000 -0.763386 0.645943
+ *MESH_VERTEXNORMAL 96 0.000000 -0.604152 0.796869
+ *MESH_VERTEXNORMAL 98 0.000000 -0.763386 0.645943
+ *MESH_VERTEXNORMAL 137 0.000000 -0.763386 0.645943
+ *MESH_FACENORMAL 262 0.000000 -0.803557 -0.595228
+ *MESH_VERTEXNORMAL 135 0.000000 -0.803557 -0.595228
+ *MESH_VERTEXNORMAL 137 0.000000 -0.803557 -0.595228
+ *MESH_VERTEXNORMAL 98 0.000000 -0.803557 -0.595228
+ *MESH_FACENORMAL 263 0.000000 -0.803557 -0.595228
+ *MESH_VERTEXNORMAL 98 0.000000 -0.803557 -0.595228
+ *MESH_VERTEXNORMAL 95 0.000000 -0.803557 -0.595228
+ *MESH_VERTEXNORMAL 135 0.000000 -0.803557 -0.595228
+ *MESH_FACENORMAL 264 0.000000 -0.110431 -0.993884
+ *MESH_VERTEXNORMAL 136 0.000000 -0.110431 -0.993884
+ *MESH_VERTEXNORMAL 135 0.000000 -0.110431 -0.993884
+ *MESH_VERTEXNORMAL 95 0.000000 -0.110431 -0.993884
+ *MESH_FACENORMAL 265 0.000000 -0.110431 -0.993884
+ *MESH_VERTEXNORMAL 95 0.000000 -0.110431 -0.993884
+ *MESH_VERTEXNORMAL 97 0.000000 -0.110431 -0.993884
+ *MESH_VERTEXNORMAL 136 0.000000 -0.110431 -0.993884
+ *MESH_FACENORMAL 266 0.000000 0.650791 -0.759257
+ *MESH_VERTEXNORMAL 130 0.000000 0.581675 -0.813421
+ *MESH_VERTEXNORMAL 136 0.000000 0.650791 -0.759257
+ *MESH_VERTEXNORMAL 97 0.000000 0.650791 -0.759257
+ *MESH_FACENORMAL 267 0.000000 0.650791 -0.759257
+ *MESH_VERTEXNORMAL 97 0.000000 0.650791 -0.759257
+ *MESH_VERTEXNORMAL 91 0.000000 0.507482 -0.861663
+ *MESH_VERTEXNORMAL 130 0.000000 0.581675 -0.813421
+ *MESH_FACENORMAL 268 0.000000 0.429934 -0.902860
+ *MESH_VERTEXNORMAL 101 0.000000 0.429934 -0.902860
+ *MESH_VERTEXNORMAL 130 0.000000 0.581675 -0.813421
+ *MESH_VERTEXNORMAL 91 0.000000 0.507482 -0.861663
+ *MESH_FACENORMAL 269 0.000000 0.429934 -0.902860
+ *MESH_VERTEXNORMAL 91 0.000000 0.507482 -0.861663
+ *MESH_VERTEXNORMAL 64 0.000000 0.429934 -0.902860
+ *MESH_VERTEXNORMAL 101 0.000000 0.429934 -0.902860
+ *MESH_FACENORMAL 270 0.000000 -0.832051 -0.554700
+ *MESH_VERTEXNORMAL 99 0.000000 -0.921895 -0.387439
+ *MESH_VERTEXNORMAL 101 0.000000 -0.832050 -0.554700
+ *MESH_VERTEXNORMAL 64 0.000000 -0.832050 -0.554700
+ *MESH_FACENORMAL 271 0.000000 -0.832050 -0.554700
+ *MESH_VERTEXNORMAL 64 0.000000 -0.832050 -0.554700
+ *MESH_VERTEXNORMAL 60 0.000000 -0.979996 -0.199016
+ *MESH_VERTEXNORMAL 99 0.000000 -0.921895 -0.387439
+ *MESH_FACENORMAL 272 0.000000 -0.999948 -0.010203
+ *MESH_VERTEXNORMAL 128 0.000000 -0.999948 -0.010203
+ *MESH_VERTEXNORMAL 99 0.000000 -0.921895 -0.387439
+ *MESH_VERTEXNORMAL 60 0.000000 -0.979996 -0.199016
+ *MESH_FACENORMAL 273 0.000000 -0.999948 -0.010203
+ *MESH_VERTEXNORMAL 60 0.000000 -0.979996 -0.199016
+ *MESH_VERTEXNORMAL 62 0.000000 -0.999948 -0.010203
+ *MESH_VERTEXNORMAL 128 0.000000 -0.999948 -0.010203
+ *MESH_FACENORMAL 274 0.000000 -0.650792 -0.759256
+ *MESH_VERTEXNORMAL 129 0.000000 -0.650792 -0.759256
+ *MESH_VERTEXNORMAL 128 0.000000 -0.650792 -0.759256
+ *MESH_VERTEXNORMAL 62 0.000000 -0.650792 -0.759256
+ *MESH_FACENORMAL 275 0.000000 -0.650792 -0.759256
+ *MESH_VERTEXNORMAL 62 0.000000 -0.650792 -0.759256
+ *MESH_VERTEXNORMAL 90 0.000000 -0.650792 -0.759256
+ *MESH_VERTEXNORMAL 129 0.000000 -0.650792 -0.759256
+ *MESH_FACENORMAL 276 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 147 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 148 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 149 0.000000 0.000000 1.000000
+ *MESH_FACENORMAL 277 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 147 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 150 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 148 0.000000 0.000000 1.000000
+ *MESH_FACENORMAL 278 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 147 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 151 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 150 0.000000 0.000000 1.000000
+ *MESH_FACENORMAL 279 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 147 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 152 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 151 0.000000 0.000000 1.000000
+ *MESH_FACENORMAL 280 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 147 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 153 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 152 0.000000 0.000000 1.000000
+ *MESH_FACENORMAL 281 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 147 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 154 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 153 0.000000 0.000000 1.000000
+ *MESH_FACENORMAL 282 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 147 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 155 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 154 0.000000 0.000000 1.000000
+ *MESH_FACENORMAL 283 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 147 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 156 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 155 0.000000 0.000000 1.000000
+ *MESH_FACENORMAL 284 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 147 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 157 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 156 0.000000 0.000000 1.000000
+ *MESH_FACENORMAL 285 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 147 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 158 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 157 0.000000 0.000000 1.000000
+ *MESH_FACENORMAL 286 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 147 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 159 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 158 0.000000 0.000000 1.000000
+ *MESH_FACENORMAL 287 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 147 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 149 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 159 0.000000 0.000000 1.000000
+ *MESH_FACENORMAL 288 0.965926 -0.258818 -0.000000
+ *MESH_VERTEXNORMAL 160 0.907073 -0.420974 0.000000
+ *MESH_VERTEXNORMAL 161 0.996035 0.088962 -0.000001
+ *MESH_VERTEXNORMAL 149 0.996035 -0.088962 -0.000000
+ *MESH_FACENORMAL 289 0.965926 -0.258819 -0.000000
+ *MESH_VERTEXNORMAL 160 0.907073 -0.420974 0.000000
+ *MESH_VERTEXNORMAL 149 0.996035 -0.088962 -0.000000
+ *MESH_VERTEXNORMAL 148 0.818110 -0.575061 0.000001
+ *MESH_FACENORMAL 290 0.707107 -0.707107 0.000001
+ *MESH_VERTEXNORMAL 162 0.575061 -0.818111 0.000001
+ *MESH_VERTEXNORMAL 160 0.907073 -0.420974 0.000000
+ *MESH_VERTEXNORMAL 148 0.818110 -0.575061 0.000001
+ *MESH_FACENORMAL 291 0.707107 -0.707107 0.000001
+ *MESH_VERTEXNORMAL 162 0.575061 -0.818111 0.000001
+ *MESH_VERTEXNORMAL 148 0.818110 -0.575061 0.000001
+ *MESH_VERTEXNORMAL 150 0.420974 -0.907073 0.000002
+ *MESH_FACENORMAL 292 0.258819 -0.965926 0.000002
+ *MESH_VERTEXNORMAL 163 0.088962 -0.996035 0.000002
+ *MESH_VERTEXNORMAL 162 0.575061 -0.818111 0.000001
+ *MESH_VERTEXNORMAL 150 0.420974 -0.907073 0.000002
+ *MESH_FACENORMAL 293 0.258819 -0.965926 0.000002
+ *MESH_VERTEXNORMAL 163 0.088962 -0.996035 0.000002
+ *MESH_VERTEXNORMAL 150 0.420974 -0.907073 0.000002
+ *MESH_VERTEXNORMAL 151 -0.088962 -0.996035 0.000002
+ *MESH_FACENORMAL 294 -0.258819 -0.965926 0.000002
+ *MESH_VERTEXNORMAL 164 -0.420974 -0.907073 0.000002
+ *MESH_VERTEXNORMAL 163 0.088962 -0.996035 0.000002
+ *MESH_VERTEXNORMAL 151 -0.088962 -0.996035 0.000002
+ *MESH_FACENORMAL 295 -0.258819 -0.965926 0.000002
+ *MESH_VERTEXNORMAL 164 -0.420974 -0.907073 0.000002
+ *MESH_VERTEXNORMAL 151 -0.088962 -0.996035 0.000002
+ *MESH_VERTEXNORMAL 152 -0.575061 -0.818111 0.000002
+ *MESH_FACENORMAL 296 -0.707107 -0.707107 0.000002
+ *MESH_VERTEXNORMAL 165 -0.818110 -0.575061 0.000002
+ *MESH_VERTEXNORMAL 164 -0.420974 -0.907073 0.000002
+ *MESH_VERTEXNORMAL 152 -0.575061 -0.818111 0.000002
+ *MESH_FACENORMAL 297 -0.707106 -0.707107 0.000002
+ *MESH_VERTEXNORMAL 165 -0.818110 -0.575061 0.000002
+ *MESH_VERTEXNORMAL 152 -0.575061 -0.818111 0.000002
+ *MESH_VERTEXNORMAL 153 -0.907073 -0.420974 0.000002
+ *MESH_FACENORMAL 298 -0.965926 -0.258819 0.000001
+ *MESH_VERTEXNORMAL 166 -0.996035 -0.088962 0.000001
+ *MESH_VERTEXNORMAL 165 -0.818110 -0.575061 0.000002
+ *MESH_VERTEXNORMAL 153 -0.907073 -0.420974 0.000002
+ *MESH_FACENORMAL 299 -0.965926 -0.258820 0.000001
+ *MESH_VERTEXNORMAL 166 -0.996035 -0.088962 0.000001
+ *MESH_VERTEXNORMAL 153 -0.907073 -0.420974 0.000002
+ *MESH_VERTEXNORMAL 154 -0.996035 0.088962 0.000001
+ *MESH_FACENORMAL 300 -0.965926 0.258820 0.000000
+ *MESH_VERTEXNORMAL 167 -0.907073 0.420974 -0.000000
+ *MESH_VERTEXNORMAL 166 -0.996035 -0.088962 0.000001
+ *MESH_VERTEXNORMAL 154 -0.996035 0.088962 0.000001
+ *MESH_FACENORMAL 301 -0.965926 0.258819 0.000000
+ *MESH_VERTEXNORMAL 167 -0.907073 0.420974 -0.000000
+ *MESH_VERTEXNORMAL 154 -0.996035 0.088962 0.000001
+ *MESH_VERTEXNORMAL 155 -0.818110 0.575061 -0.000001
+ *MESH_FACENORMAL 302 -0.707107 0.707106 -0.000001
+ *MESH_VERTEXNORMAL 168 -0.575060 0.818111 -0.000001
+ *MESH_VERTEXNORMAL 167 -0.907073 0.420974 -0.000000
+ *MESH_VERTEXNORMAL 155 -0.818110 0.575061 -0.000001
+ *MESH_FACENORMAL 303 -0.707106 0.707108 -0.000000
+ *MESH_VERTEXNORMAL 168 -0.575060 0.818111 -0.000001
+ *MESH_VERTEXNORMAL 155 -0.818110 0.575061 -0.000001
+ *MESH_VERTEXNORMAL 156 -0.420973 0.907073 -0.000001
+ *MESH_FACENORMAL 304 -0.258816 0.965927 -0.000001
+ *MESH_VERTEXNORMAL 169 -0.088962 0.996035 -0.000002
+ *MESH_VERTEXNORMAL 168 -0.575060 0.818111 -0.000001
+ *MESH_VERTEXNORMAL 156 -0.420973 0.907073 -0.000001
+ *MESH_FACENORMAL 305 -0.258819 0.965926 -0.000002
+ *MESH_VERTEXNORMAL 169 -0.088962 0.996035 -0.000002
+ *MESH_VERTEXNORMAL 156 -0.420973 0.907073 -0.000001
+ *MESH_VERTEXNORMAL 157 0.088961 0.996035 -0.000002
+ *MESH_FACENORMAL 306 0.258816 0.965927 -0.000002
+ *MESH_VERTEXNORMAL 170 0.420973 0.907073 -0.000002
+ *MESH_VERTEXNORMAL 169 -0.088962 0.996035 -0.000002
+ *MESH_VERTEXNORMAL 157 0.088961 0.996035 -0.000002
+ *MESH_FACENORMAL 307 0.258819 0.965926 -0.000002
+ *MESH_VERTEXNORMAL 170 0.420973 0.907073 -0.000002
+ *MESH_VERTEXNORMAL 157 0.088961 0.996035 -0.000002
+ *MESH_VERTEXNORMAL 158 0.575061 0.818110 -0.000002
+ *MESH_FACENORMAL 308 0.707108 0.707106 -0.000001
+ *MESH_VERTEXNORMAL 171 0.818110 0.575061 -0.000002
+ *MESH_VERTEXNORMAL 170 0.420973 0.907073 -0.000002
+ *MESH_VERTEXNORMAL 158 0.575061 0.818110 -0.000002
+ *MESH_FACENORMAL 309 0.707106 0.707108 -0.000002
+ *MESH_VERTEXNORMAL 171 0.818110 0.575061 -0.000002
+ *MESH_VERTEXNORMAL 158 0.575061 0.818110 -0.000002
+ *MESH_VERTEXNORMAL 159 0.907073 0.420974 -0.000002
+ *MESH_FACENORMAL 310 0.965926 0.258819 -0.000001
+ *MESH_VERTEXNORMAL 161 0.996035 0.088962 -0.000001
+ *MESH_VERTEXNORMAL 171 0.818110 0.575061 -0.000002
+ *MESH_VERTEXNORMAL 159 0.907073 0.420974 -0.000002
+ *MESH_FACENORMAL 311 0.965926 0.258818 -0.000001
+ *MESH_VERTEXNORMAL 161 0.996035 0.088962 -0.000001
+ *MESH_VERTEXNORMAL 159 0.907073 0.420974 -0.000002
+ *MESH_VERTEXNORMAL 149 0.996035 -0.088962 -0.000000
+ *MESH_FACENORMAL 312 -0.979081 0.203435 0.003883
+ *MESH_VERTEXNORMAL 172 -0.973621 0.228168 0.001295
+ *MESH_VERTEXNORMAL 173 -0.979473 0.201570 0.001295
+ *MESH_VERTEXNORMAL 174 -0.983298 0.181990 0.001942
+ *MESH_FACENORMAL 313 -0.970654 0.240479 -0.000000
+ *MESH_VERTEXNORMAL 172 -0.973621 0.228168 0.001295
+ *MESH_VERTEXNORMAL 175 -0.970654 0.240479 -0.000000
+ *MESH_VERTEXNORMAL 173 -0.979473 0.201570 0.001295
+ *MESH_FACENORMAL 314 -0.970654 0.240479 -0.000000
+ *MESH_VERTEXNORMAL 172 -0.973621 0.228168 0.001295
+ *MESH_VERTEXNORMAL 176 -0.970654 0.240479 -0.000000
+ *MESH_VERTEXNORMAL 175 -0.970654 0.240479 -0.000000
+ *MESH_FACENORMAL 315 -0.987043 0.160457 -0.000000
+ *MESH_VERTEXNORMAL 173 -0.979473 0.201570 0.001295
+ *MESH_VERTEXNORMAL 177 -0.987043 0.160457 -0.000000
+ *MESH_VERTEXNORMAL 174 -0.983298 0.181990 0.001942
+ *MESH_FACENORMAL 316 0.979081 0.203435 0.003883
+ *MESH_VERTEXNORMAL 178 0.973621 0.228168 0.001295
+ *MESH_VERTEXNORMAL 179 0.983298 0.181990 0.001942
+ *MESH_VERTEXNORMAL 180 0.979473 0.201570 0.001295
+ *MESH_FACENORMAL 317 0.970654 0.240480 -0.000000
+ *MESH_VERTEXNORMAL 178 0.973621 0.228168 0.001295
+ *MESH_VERTEXNORMAL 180 0.979473 0.201570 0.001295
+ *MESH_VERTEXNORMAL 181 0.970654 0.240480 -0.000000
+ *MESH_FACENORMAL 318 0.970654 0.240479 0.000000
+ *MESH_VERTEXNORMAL 178 0.973621 0.228168 0.001295
+ *MESH_VERTEXNORMAL 181 0.970654 0.240480 -0.000000
+ *MESH_VERTEXNORMAL 182 0.970654 0.240479 0.000000
+ *MESH_FACENORMAL 319 0.987043 0.160457 0.000000
+ *MESH_VERTEXNORMAL 180 0.979473 0.201570 0.001295
+ *MESH_VERTEXNORMAL 179 0.983298 0.181990 0.001942
+ *MESH_VERTEXNORMAL 183 0.987043 0.160457 0.000000
+ *MESH_FACENORMAL 320 0.000000 0.484655 0.874706
+ *MESH_VERTEXNORMAL 179 0.000000 0.484655 0.874706
+ *MESH_VERTEXNORMAL 172 0.000000 0.484655 0.874706
+ *MESH_VERTEXNORMAL 174 0.000000 0.484655 0.874706
+ *MESH_FACENORMAL 321 0.000000 0.484655 0.874706
+ *MESH_VERTEXNORMAL 179 0.000000 0.484655 0.874706
+ *MESH_VERTEXNORMAL 178 0.000000 0.484655 0.874706
+ *MESH_VERTEXNORMAL 172 0.000000 0.484655 0.874706
+ *MESH_FACENORMAL 322 0.000000 -0.829176 -0.558988
+ *MESH_VERTEXNORMAL 180 0.000000 -0.921800 -0.387665
+ *MESH_VERTEXNORMAL 177 0.000000 -0.829176 -0.558988
+ *MESH_VERTEXNORMAL 173 0.000000 -0.981035 -0.193832
+ *MESH_FACENORMAL 323 0.000000 -0.829176 -0.558988
+ *MESH_VERTEXNORMAL 180 0.000000 -0.921800 -0.387665
+ *MESH_VERTEXNORMAL 183 0.000000 -0.829176 -0.558988
+ *MESH_VERTEXNORMAL 177 0.000000 -0.829176 -0.558988
+ *MESH_FACENORMAL 324 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 181 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 173 0.000000 -0.981035 -0.193832
+ *MESH_VERTEXNORMAL 175 0.000000 -1.000000 0.000000
+ *MESH_FACENORMAL 325 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 181 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 180 0.000000 -0.921800 -0.387665
+ *MESH_VERTEXNORMAL 173 0.000000 -0.981035 -0.193832
+ *MESH_FACENORMAL 326 0.000000 -0.459119 -0.888375
+ *MESH_VERTEXNORMAL 184 0.000000 -0.459119 -0.888375
+ *MESH_VERTEXNORMAL 185 0.000000 -0.459119 -0.888375
+ *MESH_VERTEXNORMAL 186 0.000000 -0.459119 -0.888375
+ *MESH_FACENORMAL 327 0.000000 -0.459119 -0.888375
+ *MESH_VERTEXNORMAL 186 0.000000 -0.459119 -0.888375
+ *MESH_VERTEXNORMAL 187 0.000000 -0.459119 -0.888375
+ *MESH_VERTEXNORMAL 184 0.000000 -0.459119 -0.888375
+ *MESH_FACENORMAL 328 0.000000 -0.459120 0.888374
+ *MESH_VERTEXNORMAL 188 0.000000 -0.459120 0.888374
+ *MESH_VERTEXNORMAL 189 0.000000 -0.459120 0.888374
+ *MESH_VERTEXNORMAL 190 0.000000 -0.459120 0.888374
+ *MESH_FACENORMAL 329 0.000000 -0.459120 0.888374
+ *MESH_VERTEXNORMAL 190 0.000000 -0.459120 0.888374
+ *MESH_VERTEXNORMAL 191 0.000000 -0.459120 0.888374
+ *MESH_VERTEXNORMAL 188 0.000000 -0.459120 0.888374
+ *MESH_FACENORMAL 330 -0.946984 -0.321280 -0.000000
+ *MESH_VERTEXNORMAL 188 -0.946984 -0.321280 -0.000000
+ *MESH_VERTEXNORMAL 185 -0.946984 -0.321280 -0.000000
+ *MESH_VERTEXNORMAL 184 -0.946984 -0.321280 -0.000000
+ *MESH_FACENORMAL 331 -0.946984 -0.321280 -0.000000
+ *MESH_VERTEXNORMAL 184 -0.946984 -0.321280 -0.000000
+ *MESH_VERTEXNORMAL 189 -0.946984 -0.321280 -0.000000
+ *MESH_VERTEXNORMAL 188 -0.946984 -0.321280 -0.000000
+ *MESH_FACENORMAL 332 0.946984 -0.321280 -0.000000
+ *MESH_VERTEXNORMAL 191 0.946984 -0.321280 -0.000000
+ *MESH_VERTEXNORMAL 190 0.946984 -0.321280 -0.000000
+ *MESH_VERTEXNORMAL 187 0.946984 -0.321280 -0.000000
+ *MESH_FACENORMAL 333 0.946984 -0.321280 -0.000000
+ *MESH_VERTEXNORMAL 187 0.946984 -0.321280 -0.000000
+ *MESH_VERTEXNORMAL 186 0.946984 -0.321280 -0.000000
+ *MESH_VERTEXNORMAL 191 0.946984 -0.321280 -0.000000
+ *MESH_FACENORMAL 334 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 192 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 193 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 194 -1.000000 0.000000 -0.000000
+ *MESH_FACENORMAL 335 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 194 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 195 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 192 -1.000000 0.000000 -0.000000
+ *MESH_FACENORMAL 336 1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 196 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 197 1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 198 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 337 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 198 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 199 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 196 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 338 0.000000 1.000000 -0.000000
+ *MESH_VERTEXNORMAL 199 0.000000 1.000000 -0.000000
+ *MESH_VERTEXNORMAL 198 0.000000 1.000000 -0.000000
+ *MESH_VERTEXNORMAL 193 0.000000 1.000000 -0.000000
+ *MESH_FACENORMAL 339 0.000000 1.000000 -0.000000
+ *MESH_VERTEXNORMAL 193 0.000000 1.000000 -0.000000
+ *MESH_VERTEXNORMAL 192 0.000000 1.000000 -0.000000
+ *MESH_VERTEXNORMAL 199 0.000000 1.000000 -0.000000
+ *MESH_FACENORMAL 340 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 196 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 200 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 197 0.000000 1.000000 0.000000
+ *MESH_FACENORMAL 341 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 200 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 201 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 197 0.000000 1.000000 0.000000
+ *MESH_FACENORMAL 342 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 196 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 202 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 200 0.000000 1.000000 0.000000
+ *MESH_FACENORMAL 343 0.000000 -0.019202 -0.999816
+ *MESH_VERTEXNORMAL 199 -0.000005 -0.019221 -0.999815
+ *MESH_VERTEXNORMAL 202 -0.000011 -0.019215 -0.999815
+ *MESH_VERTEXNORMAL 196 0.000000 -0.019202 -0.999816
+ *MESH_FACENORMAL 344 -0.000022 -0.019227 -0.999815
+ *MESH_VERTEXNORMAL 199 -0.000005 -0.019221 -0.999815
+ *MESH_VERTEXNORMAL 203 -0.000011 -0.019228 -0.999815
+ *MESH_VERTEXNORMAL 202 -0.000011 -0.019215 -0.999815
+ *MESH_FACENORMAL 345 0.000000 -0.019228 -0.999815
+ *MESH_VERTEXNORMAL 199 -0.000005 -0.019221 -0.999815
+ *MESH_VERTEXNORMAL 204 0.000007 -0.019228 -0.999815
+ *MESH_VERTEXNORMAL 203 -0.000011 -0.019228 -0.999815
+ *MESH_FACENORMAL 346 0.000000 -0.019228 -0.999815
+ *MESH_VERTEXNORMAL 199 -0.000005 -0.019221 -0.999815
+ *MESH_VERTEXNORMAL 192 0.000007 -0.019219 -0.999815
+ *MESH_VERTEXNORMAL 204 0.000007 -0.019228 -0.999815
+ *MESH_FACENORMAL 347 0.000022 -0.019227 -0.999815
+ *MESH_VERTEXNORMAL 192 0.000007 -0.019219 -0.999815
+ *MESH_VERTEXNORMAL 205 0.000011 -0.019215 -0.999815
+ *MESH_VERTEXNORMAL 204 0.000007 -0.019228 -0.999815
+ *MESH_FACENORMAL 348 0.000000 -0.019202 -0.999816
+ *MESH_VERTEXNORMAL 192 0.000007 -0.019219 -0.999815
+ *MESH_VERTEXNORMAL 195 0.000000 -0.019202 -0.999816
+ *MESH_VERTEXNORMAL 205 0.000011 -0.019215 -0.999815
+ *MESH_FACENORMAL 349 0.707087 0.000000 -0.707127
+ *MESH_VERTEXNORMAL 204 0.707090 -0.000000 -0.707123
+ *MESH_VERTEXNORMAL 206 0.707086 0.000000 -0.707127
+ *MESH_VERTEXNORMAL 207 0.707087 0.000000 -0.707127
+ *MESH_FACENORMAL 350 0.707086 0.000000 -0.707128
+ *MESH_VERTEXNORMAL 204 0.707090 -0.000000 -0.707123
+ *MESH_VERTEXNORMAL 208 0.707087 0.000000 -0.707127
+ *MESH_VERTEXNORMAL 206 0.707086 0.000000 -0.707127
+ *MESH_FACENORMAL 351 0.707088 0.000000 -0.707126
+ *MESH_VERTEXNORMAL 204 0.707090 -0.000000 -0.707123
+ *MESH_VERTEXNORMAL 209 0.707088 0.000000 -0.707126
+ *MESH_VERTEXNORMAL 208 0.707087 0.000000 -0.707127
+ *MESH_FACENORMAL 352 0.707088 0.000000 -0.707126
+ *MESH_VERTEXNORMAL 204 0.707090 -0.000000 -0.707123
+ *MESH_VERTEXNORMAL 210 0.707096 -0.000000 -0.707118
+ *MESH_VERTEXNORMAL 209 0.707088 0.000000 -0.707126
+ *MESH_FACENORMAL 353 0.707104 -0.000000 -0.707109
+ *MESH_VERTEXNORMAL 204 0.707090 -0.000000 -0.707123
+ *MESH_VERTEXNORMAL 205 0.707104 -0.000000 -0.707109
+ *MESH_VERTEXNORMAL 210 0.707096 -0.000000 -0.707118
+ *MESH_FACENORMAL 354 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 206 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 211 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 207 1.000000 0.000000 -0.000000
+ *MESH_FACENORMAL 355 -0.707105 0.000000 -0.707108
+ *MESH_VERTEXNORMAL 202 -0.707103 -0.000000 -0.707110
+ *MESH_VERTEXNORMAL 212 -0.707105 0.000000 -0.707108
+ *MESH_VERTEXNORMAL 200 -0.707105 0.000000 -0.707108
+ *MESH_FACENORMAL 356 -0.707105 0.000000 -0.707108
+ *MESH_VERTEXNORMAL 202 -0.707103 -0.000000 -0.707110
+ *MESH_VERTEXNORMAL 213 -0.707105 -0.000000 -0.707108
+ *MESH_VERTEXNORMAL 212 -0.707105 0.000000 -0.707108
+ *MESH_FACENORMAL 357 -0.707105 -0.000000 -0.707108
+ *MESH_VERTEXNORMAL 202 -0.707103 -0.000000 -0.707110
+ *MESH_VERTEXNORMAL 214 -0.707105 -0.000000 -0.707108
+ *MESH_VERTEXNORMAL 213 -0.707105 -0.000000 -0.707108
+ *MESH_FACENORMAL 358 -0.707105 -0.000000 -0.707108
+ *MESH_VERTEXNORMAL 202 -0.707103 -0.000000 -0.707110
+ *MESH_VERTEXNORMAL 215 -0.707100 -0.000000 -0.707113
+ *MESH_VERTEXNORMAL 214 -0.707105 -0.000000 -0.707108
+ *MESH_FACENORMAL 359 -0.707096 -0.000001 -0.707118
+ *MESH_VERTEXNORMAL 202 -0.707103 -0.000000 -0.707110
+ *MESH_VERTEXNORMAL 203 -0.707096 -0.000001 -0.707118
+ *MESH_VERTEXNORMAL 215 -0.707100 -0.000000 -0.707113
+ *MESH_FACENORMAL 360 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 215 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 216 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 214 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 361 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 217 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 200 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 212 -1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 362 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 217 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 201 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 200 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 363 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 217 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 218 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 201 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 364 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 217 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 219 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 220 -1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 365 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 217 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 213 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 219 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 366 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 217 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 212 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 213 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 367 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 214 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 219 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 213 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 368 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 214 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 221 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 219 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 369 -1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 214 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 216 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 221 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 370 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 222 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 211 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 208 1.000000 0.000000 -0.000000
+ *MESH_FACENORMAL 371 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 211 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 206 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 208 1.000000 0.000000 -0.000000
+ *MESH_FACENORMAL 372 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 222 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 223 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 211 1.000000 0.000000 -0.000000
+ *MESH_FACENORMAL 373 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 222 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 224 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 225 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 374 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 222 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 209 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 224 1.000000 0.000000 -0.000000
+ *MESH_FACENORMAL 375 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 222 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 208 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 209 1.000000 0.000000 -0.000000
+ *MESH_FACENORMAL 376 1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 224 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 226 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 227 1.000000 -0.000000 0.000000
+ *MESH_FACENORMAL 377 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 224 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 210 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 226 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 378 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 224 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 209 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 210 1.000000 0.000000 -0.000000
+ *MESH_FACENORMAL 379 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 194 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 226 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 195 0.000000 1.000000 0.000000
+ *MESH_FACENORMAL 380 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 226 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 210 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 195 0.000000 1.000000 0.000000
+ *MESH_FACENORMAL 381 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 210 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 205 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 195 0.000000 1.000000 0.000000
+ *MESH_FACENORMAL 382 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 224 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 227 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 218 0.000000 -1.000000 0.000000
+ *MESH_FACENORMAL 383 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 218 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 217 0.000000 -1.000000 0.000000
+ *MESH_VERTEXNORMAL 224 0.000000 -1.000000 0.000000
+ *MESH_FACENORMAL 384 0.000000 -0.132162 0.991228
+ *MESH_VERTEXNORMAL 225 0.000000 -0.132162 0.991228
+ *MESH_VERTEXNORMAL 224 0.000000 -0.132162 0.991228
+ *MESH_VERTEXNORMAL 217 0.000000 -0.132162 0.991228
+ *MESH_FACENORMAL 385 0.000000 -0.132162 0.991228
+ *MESH_VERTEXNORMAL 217 0.000000 -0.132162 0.991228
+ *MESH_VERTEXNORMAL 220 0.000000 -0.132162 0.991228
+ *MESH_VERTEXNORMAL 225 0.000000 -0.132162 0.991228
+ *MESH_FACENORMAL 386 0.000000 -0.998460 0.055470
+ *MESH_VERTEXNORMAL 222 0.000000 -0.998460 0.055470
+ *MESH_VERTEXNORMAL 225 0.000000 -0.998460 0.055470
+ *MESH_VERTEXNORMAL 220 0.000000 -0.998460 0.055470
+ *MESH_FACENORMAL 387 0.000000 -0.998460 0.055470
+ *MESH_VERTEXNORMAL 220 0.000000 -0.998460 0.055470
+ *MESH_VERTEXNORMAL 219 0.000000 -0.998460 0.055470
+ *MESH_VERTEXNORMAL 222 0.000000 -0.998460 0.055470
+ *MESH_FACENORMAL 388 0.000000 -0.000001 1.000000
+ *MESH_VERTEXNORMAL 223 0.000000 -0.000001 1.000000
+ *MESH_VERTEXNORMAL 222 0.000000 -0.000001 1.000000
+ *MESH_VERTEXNORMAL 219 0.000000 -0.000001 1.000000
+ *MESH_FACENORMAL 389 0.000000 -0.000001 1.000000
+ *MESH_VERTEXNORMAL 219 0.000000 -0.000001 1.000000
+ *MESH_VERTEXNORMAL 221 0.000000 -0.000001 1.000000
+ *MESH_VERTEXNORMAL 223 0.000000 -0.000001 1.000000
+ *MESH_FACENORMAL 390 0.000000 -0.997459 0.071247
+ *MESH_VERTEXNORMAL 211 0.000001 -0.994686 0.102955
+ *MESH_VERTEXNORMAL 223 0.000000 -0.997459 0.071247
+ *MESH_VERTEXNORMAL 221 0.000000 -0.997459 0.071247
+ *MESH_FACENORMAL 391 0.000000 -0.997459 0.071247
+ *MESH_VERTEXNORMAL 221 0.000000 -0.997459 0.071247
+ *MESH_VERTEXNORMAL 216 0.000000 -0.995218 0.097675
+ *MESH_VERTEXNORMAL 211 0.000001 -0.994686 0.102955
+ *MESH_FACENORMAL 392 0.000000 -0.992277 0.124040
+ *MESH_VERTEXNORMAL 204 0.000002 -0.992278 0.124037
+ *MESH_VERTEXNORMAL 215 -0.000000 -0.992278 0.124037
+ *MESH_VERTEXNORMAL 203 0.000000 -0.992277 0.124040
+ *MESH_FACENORMAL 393 -0.000000 -0.992278 0.124035
+ *MESH_VERTEXNORMAL 204 0.000002 -0.992278 0.124037
+ *MESH_VERTEXNORMAL 211 0.000001 -0.994686 0.102955
+ *MESH_VERTEXNORMAL 215 -0.000000 -0.992278 0.124037
+ *MESH_FACENORMAL 394 0.000000 -0.992278 0.124035
+ *MESH_VERTEXNORMAL 211 0.000001 -0.994686 0.102955
+ *MESH_VERTEXNORMAL 216 0.000000 -0.995218 0.097675
+ *MESH_VERTEXNORMAL 215 -0.000000 -0.992278 0.124037
+ *MESH_FACENORMAL 395 0.000006 -0.992278 0.124035
+ *MESH_VERTEXNORMAL 204 0.000002 -0.992278 0.124037
+ *MESH_VERTEXNORMAL 207 0.000006 -0.992278 0.124035
+ *MESH_VERTEXNORMAL 211 0.000001 -0.994686 0.102955
+ *MESH_FACENORMAL 396 0.000000 -0.000001 -1.000000
+ *MESH_VERTEXNORMAL 228 0.000000 -0.000001 -1.000000
+ *MESH_VERTEXNORMAL 229 -0.000000 -0.000001 -1.000000
+ *MESH_VERTEXNORMAL 230 0.000000 -0.000001 -1.000000
+ *MESH_FACENORMAL 397 -0.000000 -0.000000 -1.000000
+ *MESH_VERTEXNORMAL 228 0.000000 -0.000001 -1.000000
+ *MESH_VERTEXNORMAL 231 0.000003 -0.000002 -1.000000
+ *MESH_VERTEXNORMAL 229 -0.000000 -0.000001 -1.000000
+ *MESH_FACENORMAL 398 0.000006 -0.000004 -1.000000
+ *MESH_VERTEXNORMAL 228 0.000000 -0.000001 -1.000000
+ *MESH_VERTEXNORMAL 232 0.000003 -0.000004 -1.000000
+ *MESH_VERTEXNORMAL 231 0.000003 -0.000002 -1.000000
+ *MESH_FACENORMAL 399 0.000001 -0.000004 -1.000000
+ *MESH_VERTEXNORMAL 228 0.000000 -0.000001 -1.000000
+ *MESH_VERTEXNORMAL 233 -0.000001 -0.000005 -1.000000
+ *MESH_VERTEXNORMAL 232 0.000003 -0.000004 -1.000000
+ *MESH_FACENORMAL 400 -0.000003 -0.000006 -1.000000
+ *MESH_VERTEXNORMAL 228 0.000000 -0.000001 -1.000000
+ *MESH_VERTEXNORMAL 234 -0.000001 -0.000004 -1.000000
+ *MESH_VERTEXNORMAL 233 -0.000001 -0.000005 -1.000000
+ *MESH_FACENORMAL 401 -0.000000 -0.000001 -1.000000
+ *MESH_VERTEXNORMAL 228 0.000000 -0.000001 -1.000000
+ *MESH_VERTEXNORMAL 235 -0.000000 -0.000001 -1.000000
+ *MESH_VERTEXNORMAL 234 -0.000001 -0.000004 -1.000000
+ *MESH_FACENORMAL 402 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 228 0.000000 -0.000001 -1.000000
+ *MESH_VERTEXNORMAL 236 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 235 -0.000000 -0.000001 -1.000000
+ *MESH_FACENORMAL 403 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 228 0.000000 -0.000001 -1.000000
+ *MESH_VERTEXNORMAL 237 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 236 0.000000 0.000000 -1.000000
+ *MESH_FACENORMAL 404 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 228 0.000000 -0.000001 -1.000000
+ *MESH_VERTEXNORMAL 238 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 237 0.000000 0.000000 -1.000000
+ *MESH_FACENORMAL 405 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 228 0.000000 -0.000001 -1.000000
+ *MESH_VERTEXNORMAL 239 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 238 0.000000 0.000000 -1.000000
+ *MESH_FACENORMAL 406 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 228 0.000000 -0.000001 -1.000000
+ *MESH_VERTEXNORMAL 240 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 239 0.000000 0.000000 -1.000000
+ *MESH_FACENORMAL 407 0.000000 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 228 0.000000 -0.000001 -1.000000
+ *MESH_VERTEXNORMAL 230 0.000000 -0.000001 -1.000000
+ *MESH_VERTEXNORMAL 240 0.000000 0.000000 -1.000000
+ *MESH_FACENORMAL 408 -0.965926 -0.258819 0.000000
+ *MESH_VERTEXNORMAL 241 -0.907073 -0.420974 0.000000
+ *MESH_VERTEXNORMAL 242 -0.996035 0.088962 0.000000
+ *MESH_VERTEXNORMAL 230 -0.996035 -0.088962 0.000000
+ *MESH_FACENORMAL 409 -0.965926 -0.258819 0.000000
+ *MESH_VERTEXNORMAL 241 -0.907073 -0.420974 0.000000
+ *MESH_VERTEXNORMAL 230 -0.996035 -0.088962 0.000000
+ *MESH_VERTEXNORMAL 229 -0.818110 -0.575061 0.000000
+ *MESH_FACENORMAL 410 -0.707107 -0.707107 -0.000000
+ *MESH_VERTEXNORMAL 243 -0.575061 -0.818110 -0.000000
+ *MESH_VERTEXNORMAL 241 -0.907073 -0.420974 0.000000
+ *MESH_VERTEXNORMAL 229 -0.818110 -0.575061 0.000000
+ *MESH_FACENORMAL 411 -0.707107 -0.707107 -0.000000
+ *MESH_VERTEXNORMAL 243 -0.575061 -0.818111 -0.000000
+ *MESH_VERTEXNORMAL 229 -0.818110 -0.575061 0.000000
+ *MESH_VERTEXNORMAL 231 -0.420974 -0.907073 -0.000000
+ *MESH_FACENORMAL 412 -0.258819 -0.965926 -0.000000
+ *MESH_VERTEXNORMAL 244 -0.088962 -0.996035 -0.000000
+ *MESH_VERTEXNORMAL 243 -0.575061 -0.818111 -0.000000
+ *MESH_VERTEXNORMAL 231 -0.420974 -0.907073 -0.000000
+ *MESH_FACENORMAL 413 -0.258819 -0.965926 -0.000000
+ *MESH_VERTEXNORMAL 244 -0.088962 -0.996035 -0.000000
+ *MESH_VERTEXNORMAL 231 -0.420974 -0.907073 -0.000000
+ *MESH_VERTEXNORMAL 232 0.088962 -0.996035 -0.000000
+ *MESH_FACENORMAL 414 0.258819 -0.965926 -0.000000
+ *MESH_VERTEXNORMAL 245 0.420974 -0.907073 -0.000000
+ *MESH_VERTEXNORMAL 244 -0.088962 -0.996035 -0.000000
+ *MESH_VERTEXNORMAL 232 0.088962 -0.996035 -0.000000
+ *MESH_FACENORMAL 415 0.258819 -0.965926 -0.000000
+ *MESH_VERTEXNORMAL 245 0.420974 -0.907073 -0.000000
+ *MESH_VERTEXNORMAL 232 0.088962 -0.996035 -0.000000
+ *MESH_VERTEXNORMAL 233 0.575061 -0.818111 -0.000000
+ *MESH_FACENORMAL 416 0.707106 -0.707107 -0.000000
+ *MESH_VERTEXNORMAL 246 0.818110 -0.575061 -0.000000
+ *MESH_VERTEXNORMAL 245 0.420974 -0.907073 -0.000000
+ *MESH_VERTEXNORMAL 233 0.575061 -0.818111 -0.000000
+ *MESH_FACENORMAL 417 0.707106 -0.707107 -0.000000
+ *MESH_VERTEXNORMAL 246 0.818110 -0.575061 -0.000000
+ *MESH_VERTEXNORMAL 233 0.575061 -0.818111 -0.000000
+ *MESH_VERTEXNORMAL 234 0.907073 -0.420974 -0.000000
+ *MESH_FACENORMAL 418 0.965926 -0.258819 -0.000000
+ *MESH_VERTEXNORMAL 247 0.996035 -0.088962 -0.000000
+ *MESH_VERTEXNORMAL 246 0.818110 -0.575061 -0.000000
+ *MESH_VERTEXNORMAL 234 0.907073 -0.420974 -0.000000
+ *MESH_FACENORMAL 419 0.965926 -0.258819 -0.000000
+ *MESH_VERTEXNORMAL 247 0.996035 -0.088962 -0.000000
+ *MESH_VERTEXNORMAL 234 0.907073 -0.420974 -0.000000
+ *MESH_VERTEXNORMAL 235 0.996035 0.088962 -0.000000
+ *MESH_FACENORMAL 420 0.965926 0.258819 -0.000000
+ *MESH_VERTEXNORMAL 248 0.907073 0.420974 -0.000000
+ *MESH_VERTEXNORMAL 247 0.996035 -0.088962 -0.000000
+ *MESH_VERTEXNORMAL 235 0.996035 0.088962 -0.000000
+ *MESH_FACENORMAL 421 0.965926 0.258819 -0.000000
+ *MESH_VERTEXNORMAL 248 0.907073 0.420974 -0.000000
+ *MESH_VERTEXNORMAL 235 0.996035 0.088962 -0.000000
+ *MESH_VERTEXNORMAL 236 0.818110 0.575061 -0.000000
+ *MESH_FACENORMAL 422 0.707106 0.707107 0.000000
+ *MESH_VERTEXNORMAL 249 0.575061 0.818110 0.000000
+ *MESH_VERTEXNORMAL 248 0.907073 0.420974 -0.000000
+ *MESH_VERTEXNORMAL 236 0.818110 0.575061 -0.000000
+ *MESH_FACENORMAL 423 0.707107 0.707107 0.000000
+ *MESH_VERTEXNORMAL 249 0.575061 0.818110 0.000000
+ *MESH_VERTEXNORMAL 236 0.818110 0.575061 -0.000000
+ *MESH_VERTEXNORMAL 237 0.420974 0.907073 0.000000
+ *MESH_FACENORMAL 424 0.258820 0.965926 0.000000
+ *MESH_VERTEXNORMAL 250 0.088962 0.996035 0.000000
+ *MESH_VERTEXNORMAL 249 0.575061 0.818110 0.000000
+ *MESH_VERTEXNORMAL 237 0.420974 0.907073 0.000000
+ *MESH_FACENORMAL 425 0.258819 0.965926 0.000000
+ *MESH_VERTEXNORMAL 250 0.088962 0.996035 0.000000
+ *MESH_VERTEXNORMAL 237 0.420974 0.907073 0.000000
+ *MESH_VERTEXNORMAL 238 -0.088962 0.996035 0.000000
+ *MESH_FACENORMAL 426 -0.258819 0.965926 0.000000
+ *MESH_VERTEXNORMAL 251 -0.420974 0.907073 0.000000
+ *MESH_VERTEXNORMAL 250 0.088962 0.996035 0.000000
+ *MESH_VERTEXNORMAL 238 -0.088962 0.996035 0.000000
+ *MESH_FACENORMAL 427 -0.258819 0.965926 0.000000
+ *MESH_VERTEXNORMAL 251 -0.420974 0.907073 0.000000
+ *MESH_VERTEXNORMAL 238 -0.088962 0.996035 0.000000
+ *MESH_VERTEXNORMAL 239 -0.575061 0.818110 0.000000
+ *MESH_FACENORMAL 428 -0.707107 0.707107 0.000000
+ *MESH_VERTEXNORMAL 252 -0.818110 0.575061 0.000000
+ *MESH_VERTEXNORMAL 251 -0.420974 0.907073 0.000000
+ *MESH_VERTEXNORMAL 239 -0.575061 0.818111 0.000000
+ *MESH_FACENORMAL 429 -0.707107 0.707107 0.000000
+ *MESH_VERTEXNORMAL 252 -0.818110 0.575061 0.000000
+ *MESH_VERTEXNORMAL 239 -0.575061 0.818111 0.000000
+ *MESH_VERTEXNORMAL 240 -0.907073 0.420974 0.000000
+ *MESH_FACENORMAL 430 -0.965926 0.258819 0.000000
+ *MESH_VERTEXNORMAL 242 -0.996035 0.088962 0.000000
+ *MESH_VERTEXNORMAL 252 -0.818110 0.575061 0.000000
+ *MESH_VERTEXNORMAL 240 -0.907073 0.420974 0.000000
+ *MESH_FACENORMAL 431 -0.965926 0.258819 0.000000
+ *MESH_VERTEXNORMAL 242 -0.996035 0.088962 0.000000
+ *MESH_VERTEXNORMAL 240 -0.907073 0.420974 0.000000
+ *MESH_VERTEXNORMAL 230 -0.996035 -0.088962 0.000000
+ *MESH_FACENORMAL 432 0.000000 0.000006 1.000000
+ *MESH_VERTEXNORMAL 253 0.000000 -0.000002 1.000000
+ *MESH_VERTEXNORMAL 254 -0.000004 -0.000001 1.000000
+ *MESH_VERTEXNORMAL 255 0.000000 0.000003 1.000000
+ *MESH_FACENORMAL 433 -0.000008 -0.000007 1.000000
+ *MESH_VERTEXNORMAL 253 0.000000 -0.000002 1.000000
+ *MESH_VERTEXNORMAL 256 -0.000006 -0.000006 1.000000
+ *MESH_VERTEXNORMAL 254 -0.000004 -0.000001 1.000000
+ *MESH_FACENORMAL 434 -0.000005 -0.000006 1.000000
+ *MESH_VERTEXNORMAL 253 0.000000 -0.000002 1.000000
+ *MESH_VERTEXNORMAL 257 -0.000000 -0.000006 1.000000
+ *MESH_VERTEXNORMAL 256 -0.000006 -0.000006 1.000000
+ *MESH_FACENORMAL 435 0.000005 -0.000006 1.000000
+ *MESH_VERTEXNORMAL 253 0.000000 -0.000002 1.000000
+ *MESH_VERTEXNORMAL 258 0.000006 -0.000006 1.000000
+ *MESH_VERTEXNORMAL 257 -0.000000 -0.000006 1.000000
+ *MESH_FACENORMAL 436 0.000008 -0.000007 1.000000
+ *MESH_VERTEXNORMAL 253 0.000000 -0.000002 1.000000
+ *MESH_VERTEXNORMAL 259 0.000004 -0.000001 1.000000
+ *MESH_VERTEXNORMAL 258 0.000006 -0.000006 1.000000
+ *MESH_FACENORMAL 437 0.000000 0.000006 1.000000
+ *MESH_VERTEXNORMAL 253 0.000000 -0.000002 1.000000
+ *MESH_VERTEXNORMAL 260 0.000000 0.000003 1.000000
+ *MESH_VERTEXNORMAL 259 0.000004 -0.000001 1.000000
+ *MESH_FACENORMAL 438 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 253 0.000000 -0.000002 1.000000
+ *MESH_VERTEXNORMAL 261 -0.000002 -0.000002 1.000000
+ *MESH_VERTEXNORMAL 260 0.000000 0.000003 1.000000
+ *MESH_FACENORMAL 439 -0.000003 -0.000005 1.000000
+ *MESH_VERTEXNORMAL 253 0.000000 -0.000002 1.000000
+ *MESH_VERTEXNORMAL 262 -0.000001 -0.000004 1.000000
+ *MESH_VERTEXNORMAL 261 -0.000002 -0.000002 1.000000
+ *MESH_FACENORMAL 440 0.000001 -0.000003 1.000000
+ *MESH_VERTEXNORMAL 253 0.000000 -0.000002 1.000000
+ *MESH_VERTEXNORMAL 263 -0.000000 -0.000003 1.000000
+ *MESH_VERTEXNORMAL 262 -0.000001 -0.000004 1.000000
+ *MESH_FACENORMAL 441 -0.000001 -0.000003 1.000000
+ *MESH_VERTEXNORMAL 253 0.000000 -0.000002 1.000000
+ *MESH_VERTEXNORMAL 264 0.000001 -0.000004 1.000000
+ *MESH_VERTEXNORMAL 263 -0.000000 -0.000003 1.000000
+ *MESH_FACENORMAL 442 0.000003 -0.000005 1.000000
+ *MESH_VERTEXNORMAL 253 0.000000 -0.000002 1.000000
+ *MESH_VERTEXNORMAL 265 0.000002 -0.000002 1.000000
+ *MESH_VERTEXNORMAL 264 0.000001 -0.000004 1.000000
+ *MESH_FACENORMAL 443 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 253 0.000000 -0.000002 1.000000
+ *MESH_VERTEXNORMAL 255 0.000000 0.000003 1.000000
+ *MESH_VERTEXNORMAL 265 0.000002 -0.000002 1.000000
+ *MESH_FACENORMAL 444 0.968489 -0.249055 0.000000
+ *MESH_VERTEXNORMAL 266 0.927500 -0.373824 0.000000
+ *MESH_VERTEXNORMAL 267 0.997806 0.066209 -0.000000
+ *MESH_VERTEXNORMAL 255 0.995515 -0.094604 0.000000
+ *MESH_FACENORMAL 445 0.968489 -0.249055 0.000000
+ *MESH_VERTEXNORMAL 266 0.927500 -0.373824 0.000000
+ *MESH_VERTEXNORMAL 255 0.995515 -0.094604 0.000000
+ *MESH_VERTEXNORMAL 254 0.869359 -0.494182 0.000000
+ *MESH_FACENORMAL 446 0.797101 -0.603846 0.000000
+ *MESH_VERTEXNORMAL 268 0.650968 -0.759105 0.000000
+ *MESH_VERTEXNORMAL 266 0.927500 -0.373824 0.000000
+ *MESH_VERTEXNORMAL 254 0.869359 -0.494182 0.000000
+ *MESH_FACENORMAL 447 0.797101 -0.603846 0.000000
+ *MESH_VERTEXNORMAL 268 0.650968 -0.759105 0.000000
+ *MESH_VERTEXNORMAL 254 0.869359 -0.494182 0.000000
+ *MESH_VERTEXNORMAL 256 0.465875 -0.884850 0.000000
+ *MESH_FACENORMAL 448 0.267699 -0.963503 0.000000
+ *MESH_VERTEXNORMAL 269 0.092218 -0.995739 0.000000
+ *MESH_VERTEXNORMAL 268 0.650968 -0.759105 0.000000
+ *MESH_VERTEXNORMAL 256 0.465875 -0.884850 0.000000
+ *MESH_FACENORMAL 449 0.267699 -0.963503 0.000000
+ *MESH_VERTEXNORMAL 269 0.092218 -0.995739 0.000000
+ *MESH_VERTEXNORMAL 256 0.465875 -0.884850 0.000000
+ *MESH_VERTEXNORMAL 257 -0.092218 -0.995739 0.000000
+ *MESH_FACENORMAL 450 -0.267699 -0.963503 0.000000
+ *MESH_VERTEXNORMAL 270 -0.465875 -0.884850 0.000000
+ *MESH_VERTEXNORMAL 269 0.092218 -0.995739 0.000000
+ *MESH_VERTEXNORMAL 257 -0.092218 -0.995739 0.000000
+ *MESH_FACENORMAL 451 -0.267699 -0.963503 0.000000
+ *MESH_VERTEXNORMAL 270 -0.465875 -0.884850 0.000000
+ *MESH_VERTEXNORMAL 257 -0.092218 -0.995739 0.000000
+ *MESH_VERTEXNORMAL 258 -0.650968 -0.759105 0.000000
+ *MESH_FACENORMAL 452 -0.797101 -0.603846 0.000000
+ *MESH_VERTEXNORMAL 271 -0.869359 -0.494182 0.000000
+ *MESH_VERTEXNORMAL 270 -0.465875 -0.884850 0.000000
+ *MESH_VERTEXNORMAL 258 -0.650968 -0.759105 0.000000
+ *MESH_FACENORMAL 453 -0.797101 -0.603846 0.000000
+ *MESH_VERTEXNORMAL 271 -0.869359 -0.494182 0.000000
+ *MESH_VERTEXNORMAL 258 -0.650968 -0.759105 0.000000
+ *MESH_VERTEXNORMAL 259 -0.927500 -0.373824 0.000000
+ *MESH_FACENORMAL 454 -0.968489 -0.249056 0.000000
+ *MESH_VERTEXNORMAL 272 -0.995515 -0.094604 0.000000
+ *MESH_VERTEXNORMAL 271 -0.869359 -0.494182 0.000000
+ *MESH_VERTEXNORMAL 259 -0.927500 -0.373824 0.000000
+ *MESH_FACENORMAL 455 -0.968489 -0.249056 0.000000
+ *MESH_VERTEXNORMAL 272 -0.995515 -0.094604 0.000000
+ *MESH_VERTEXNORMAL 259 -0.927500 -0.373824 0.000000
+ *MESH_VERTEXNORMAL 260 -0.997806 0.066209 -0.000000
+ *MESH_FACENORMAL 456 -0.975190 0.221368 -0.000000
+ *MESH_VERTEXNORMAL 273 -0.929302 0.369322 -0.000000
+ *MESH_VERTEXNORMAL 272 -0.995515 -0.094604 0.000000
+ *MESH_VERTEXNORMAL 260 -0.997806 0.066209 -0.000000
+ *MESH_FACENORMAL 457 -0.975190 0.221368 -0.000000
+ *MESH_VERTEXNORMAL 273 -0.929302 0.369322 -0.000000
+ *MESH_VERTEXNORMAL 260 -0.997806 0.066209 -0.000000
+ *MESH_VERTEXNORMAL 261 -0.859127 0.511763 -0.000000
+ *MESH_FACENORMAL 458 -0.769782 0.638307 -0.000000
+ *MESH_VERTEXNORMAL 274 -0.625617 0.780130 -0.000000
+ *MESH_VERTEXNORMAL 273 -0.929302 0.369322 -0.000000
+ *MESH_VERTEXNORMAL 261 -0.859127 0.511763 -0.000000
+ *MESH_FACENORMAL 459 -0.769782 0.638307 -0.000000
+ *MESH_VERTEXNORMAL 274 -0.625617 0.780130 -0.000000
+ *MESH_VERTEXNORMAL 261 -0.859127 0.511763 -0.000000
+ *MESH_VERTEXNORMAL 262 -0.447864 0.894102 -0.000000
+ *MESH_FACENORMAL 460 -0.258818 0.965926 -0.000000
+ *MESH_VERTEXNORMAL 275 -0.088962 0.996035 -0.000000
+ *MESH_VERTEXNORMAL 274 -0.625617 0.780130 -0.000000
+ *MESH_VERTEXNORMAL 262 -0.447864 0.894102 -0.000000
+ *MESH_FACENORMAL 461 -0.258818 0.965926 -0.000000
+ *MESH_VERTEXNORMAL 275 -0.088962 0.996035 -0.000000
+ *MESH_VERTEXNORMAL 262 -0.447864 0.894102 -0.000000
+ *MESH_VERTEXNORMAL 263 0.088962 0.996035 -0.000000
+ *MESH_FACENORMAL 462 0.258818 0.965926 -0.000000
+ *MESH_VERTEXNORMAL 276 0.447864 0.894102 -0.000000
+ *MESH_VERTEXNORMAL 275 -0.088962 0.996035 -0.000000
+ *MESH_VERTEXNORMAL 263 0.088962 0.996035 -0.000000
+ *MESH_FACENORMAL 463 0.258818 0.965926 -0.000000
+ *MESH_VERTEXNORMAL 276 0.447864 0.894102 -0.000000
+ *MESH_VERTEXNORMAL 263 0.088962 0.996035 -0.000000
+ *MESH_VERTEXNORMAL 264 0.625617 0.780131 -0.000000
+ *MESH_FACENORMAL 464 0.769781 0.638308 -0.000000
+ *MESH_VERTEXNORMAL 277 0.859127 0.511763 -0.000000
+ *MESH_VERTEXNORMAL 276 0.447864 0.894102 -0.000000
+ *MESH_VERTEXNORMAL 264 0.625617 0.780131 -0.000000
+ *MESH_FACENORMAL 465 0.769781 0.638307 -0.000000
+ *MESH_VERTEXNORMAL 277 0.859127 0.511763 -0.000000
+ *MESH_VERTEXNORMAL 264 0.625617 0.780131 -0.000000
+ *MESH_VERTEXNORMAL 265 0.929302 0.369322 -0.000000
+ *MESH_FACENORMAL 466 0.975190 0.221368 -0.000000
+ *MESH_VERTEXNORMAL 267 0.997806 0.066209 -0.000000
+ *MESH_VERTEXNORMAL 277 0.859127 0.511763 -0.000000
+ *MESH_VERTEXNORMAL 265 0.929302 0.369322 -0.000000
+ *MESH_FACENORMAL 467 0.975190 0.221368 -0.000000
+ *MESH_VERTEXNORMAL 267 0.997806 0.066209 -0.000000
+ *MESH_VERTEXNORMAL 265 0.929302 0.369322 -0.000000
+ *MESH_VERTEXNORMAL 255 0.995515 -0.094604 0.000000
+ *MESH_FACENORMAL 468 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 278 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 279 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 280 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 469 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 278 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 281 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 279 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 470 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 280 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 282 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 278 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 471 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 283 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 284 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 285 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 472 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 283 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 285 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 286 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 473 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 284 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 283 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 287 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 474 0.000000 -0.143430 0.989660
+ *MESH_VERTEXNORMAL 283 0.000000 -0.063403 0.997988
+ *MESH_VERTEXNORMAL 281 0.000000 -0.143430 0.989661
+ *MESH_VERTEXNORMAL 278 0.000000 0.017562 0.999846
+ *MESH_FACENORMAL 475 0.000000 -0.143430 0.989661
+ *MESH_VERTEXNORMAL 283 0.000000 -0.063403 0.997988
+ *MESH_VERTEXNORMAL 286 0.000000 -0.143430 0.989661
+ *MESH_VERTEXNORMAL 281 0.000000 -0.143430 0.989661
+ *MESH_FACENORMAL 476 0.000000 0.097887 0.995198
+ *MESH_VERTEXNORMAL 287 0.000000 0.097887 0.995198
+ *MESH_VERTEXNORMAL 278 0.000000 0.017562 0.999846
+ *MESH_VERTEXNORMAL 282 0.000000 0.097887 0.995198
+ *MESH_FACENORMAL 477 0.000000 0.097887 0.995197
+ *MESH_VERTEXNORMAL 287 0.000000 0.097887 0.995198
+ *MESH_VERTEXNORMAL 283 0.000000 -0.063403 0.997988
+ *MESH_VERTEXNORMAL 278 0.000000 0.017562 0.999846
+ *MESH_FACENORMAL 478 0.000000 -0.440904 -0.897554
+ *MESH_VERTEXNORMAL 284 0.000000 -0.371389 -0.928477
+ *MESH_VERTEXNORMAL 282 0.000000 -0.440904 -0.897554
+ *MESH_VERTEXNORMAL 280 0.000000 -0.299300 -0.954159
+ *MESH_FACENORMAL 479 0.000000 -0.440904 -0.897554
+ *MESH_VERTEXNORMAL 284 0.000000 -0.371389 -0.928477
+ *MESH_VERTEXNORMAL 287 0.000000 -0.440904 -0.897554
+ *MESH_VERTEXNORMAL 282 0.000000 -0.440904 -0.897554
+ *MESH_FACENORMAL 480 0.000000 -0.225892 -0.974152
+ *MESH_VERTEXNORMAL 285 0.000000 -0.225892 -0.974152
+ *MESH_VERTEXNORMAL 280 0.000000 -0.299300 -0.954159
+ *MESH_VERTEXNORMAL 279 0.000000 -0.225892 -0.974152
+ *MESH_FACENORMAL 481 0.000000 -0.225892 -0.974152
+ *MESH_VERTEXNORMAL 285 0.000000 -0.225892 -0.974152
+ *MESH_VERTEXNORMAL 284 0.000000 -0.371389 -0.928477
+ *MESH_VERTEXNORMAL 280 0.000000 -0.299300 -0.954159
+ *MESH_FACENORMAL 482 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 288 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 289 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 290 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 483 -1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 289 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 291 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 290 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 484 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 291 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 292 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 290 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 485 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 288 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 293 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 289 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 486 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 293 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 294 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 289 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 487 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 293 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 295 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 294 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 488 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 295 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 296 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 294 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 489 -1.000000 -0.000000 0.000000
+ *MESH_VERTEXNORMAL 296 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 297 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 294 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 490 -1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 296 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 298 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 297 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 491 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 296 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 299 -1.000000 -0.000000 -0.000000
+ *MESH_VERTEXNORMAL 298 -1.000000 -0.000000 -0.000000
+ *MESH_FACENORMAL 492 1.000000 0.000000 -0.000000
+ *MESH_VERTEXNORMAL 300 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 301 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 302 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 493 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 302 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 301 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 303 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 494 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 303 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 301 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 304 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 495 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 300 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 302 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 305 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 496 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 305 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 302 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 306 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 497 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 305 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 306 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 307 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 498 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 307 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 306 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 308 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 499 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 308 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 306 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 309 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 500 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 308 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 309 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 310 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 501 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 308 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 310 1.000000 0.000000 0.000000
+ *MESH_VERTEXNORMAL 311 1.000000 0.000000 0.000000
+ *MESH_FACENORMAL 502 0.000000 0.014803 -0.999891
+ *MESH_VERTEXNORMAL 305 0.000000 0.014803 -0.999890
+ *MESH_VERTEXNORMAL 295 0.000000 0.014803 -0.999890
+ *MESH_VERTEXNORMAL 293 0.000000 0.014803 -0.999890
+ *MESH_FACENORMAL 503 0.000000 0.014803 -0.999890
+ *MESH_VERTEXNORMAL 305 0.000000 0.014803 -0.999890
+ *MESH_VERTEXNORMAL 307 0.000000 0.014803 -0.999890
+ *MESH_VERTEXNORMAL 295 0.000000 0.014803 -0.999890
+ *MESH_FACENORMAL 504 0.000000 0.777886 -0.628405
+ *MESH_VERTEXNORMAL 300 0.000000 0.686136 -0.727473
+ *MESH_VERTEXNORMAL 293 0.000000 0.777886 -0.628405
+ *MESH_VERTEXNORMAL 288 0.000000 0.579801 -0.814758
+ *MESH_FACENORMAL 505 0.000000 0.777886 -0.628405
+ *MESH_VERTEXNORMAL 300 0.000000 0.686136 -0.727473
+ *MESH_VERTEXNORMAL 305 0.000000 0.777886 -0.628405
+ *MESH_VERTEXNORMAL 293 0.000000 0.777886 -0.628405
+ *MESH_FACENORMAL 506 0.000000 0.464752 -0.885441
+ *MESH_VERTEXNORMAL 301 0.000000 0.464752 -0.885441
+ *MESH_VERTEXNORMAL 288 0.000000 0.579801 -0.814758
+ *MESH_VERTEXNORMAL 290 0.000000 0.464752 -0.885441
+ *MESH_FACENORMAL 507 0.000000 0.464752 -0.885441
+ *MESH_VERTEXNORMAL 301 0.000000 0.464752 -0.885441
+ *MESH_VERTEXNORMAL 300 0.000000 0.686136 -0.727473
+ *MESH_VERTEXNORMAL 288 0.000000 0.579801 -0.814758
+ *MESH_FACENORMAL 508 0.000000 0.998477 -0.055168
+ *MESH_VERTEXNORMAL 304 0.000000 0.998477 -0.055168
+ *MESH_VERTEXNORMAL 290 0.000000 0.998477 -0.055168
+ *MESH_VERTEXNORMAL 292 0.000000 0.998477 -0.055168
+ *MESH_FACENORMAL 509 0.000000 0.998477 -0.055168
+ *MESH_VERTEXNORMAL 304 0.000000 0.998477 -0.055168
+ *MESH_VERTEXNORMAL 301 0.000000 0.998477 -0.055168
+ *MESH_VERTEXNORMAL 290 0.000000 0.998477 -0.055168
+ *MESH_FACENORMAL 510 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 303 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 292 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 291 0.000000 0.000000 1.000000
+ *MESH_FACENORMAL 511 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 303 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 304 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 292 0.000000 0.000000 1.000000
+ *MESH_FACENORMAL 512 0.000000 -0.707120 0.707094
+ *MESH_VERTEXNORMAL 302 0.000000 -0.707120 0.707094
+ *MESH_VERTEXNORMAL 291 0.000000 -0.707120 0.707094
+ *MESH_VERTEXNORMAL 289 0.000000 -0.707120 0.707094
+ *MESH_FACENORMAL 513 0.000000 -0.707120 0.707094
+ *MESH_VERTEXNORMAL 302 0.000000 -0.707120 0.707094
+ *MESH_VERTEXNORMAL 303 0.000000 -0.707120 0.707094
+ *MESH_VERTEXNORMAL 291 0.000000 -0.707120 0.707094
+ *MESH_FACENORMAL 514 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 306 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 289 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 294 0.000000 0.000000 1.000000
+ *MESH_FACENORMAL 515 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 306 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 302 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 289 0.000000 0.000000 1.000000
+ *MESH_FACENORMAL 516 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 309 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 294 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 297 0.000000 1.000000 0.000000
+ *MESH_FACENORMAL 517 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 309 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 306 0.000000 1.000000 0.000000
+ *MESH_VERTEXNORMAL 294 0.000000 1.000000 0.000000
+ *MESH_FACENORMAL 518 0.000000 0.679042 -0.734100
+ *MESH_VERTEXNORMAL 310 0.000000 0.679042 -0.734100
+ *MESH_VERTEXNORMAL 297 0.000000 0.679042 -0.734100
+ *MESH_VERTEXNORMAL 298 0.000000 0.679042 -0.734100
+ *MESH_FACENORMAL 519 0.000000 0.679042 -0.734100
+ *MESH_VERTEXNORMAL 310 0.000000 0.679042 -0.734100
+ *MESH_VERTEXNORMAL 309 0.000000 0.679042 -0.734100
+ *MESH_VERTEXNORMAL 297 0.000000 0.679042 -0.734100
+ *MESH_FACENORMAL 520 0.000000 0.998460 0.055469
+ *MESH_VERTEXNORMAL 311 0.000000 0.998460 0.055469
+ *MESH_VERTEXNORMAL 298 0.000000 0.998460 0.055469
+ *MESH_VERTEXNORMAL 299 0.000000 0.998460 0.055469
+ *MESH_FACENORMAL 521 0.000000 0.998460 0.055469
+ *MESH_VERTEXNORMAL 311 0.000000 0.998460 0.055469
+ *MESH_VERTEXNORMAL 310 0.000000 0.998460 0.055469
+ *MESH_VERTEXNORMAL 298 0.000000 0.998460 0.055469
+ *MESH_FACENORMAL 522 0.000000 -0.535654 0.844438
+ *MESH_VERTEXNORMAL 308 0.000000 -0.535654 0.844438
+ *MESH_VERTEXNORMAL 299 0.000000 -0.535654 0.844438
+ *MESH_VERTEXNORMAL 296 0.000000 -0.535654 0.844438
+ *MESH_FACENORMAL 523 0.000000 -0.535654 0.844438
+ *MESH_VERTEXNORMAL 308 0.000000 -0.535654 0.844438
+ *MESH_VERTEXNORMAL 311 0.000000 -0.535654 0.844438
+ *MESH_VERTEXNORMAL 299 0.000000 -0.535654 0.844438
+ *MESH_FACENORMAL 524 0.000000 -1.000000 -0.000000
+ *MESH_VERTEXNORMAL 307 0.000000 -1.000000 -0.000000
+ *MESH_VERTEXNORMAL 296 0.000000 -1.000000 -0.000000
+ *MESH_VERTEXNORMAL 295 0.000000 -1.000000 -0.000000
+ *MESH_FACENORMAL 525 0.000000 -1.000000 -0.000000
+ *MESH_VERTEXNORMAL 307 0.000000 -1.000000 -0.000000
+ *MESH_VERTEXNORMAL 308 0.000000 -1.000000 -0.000000
+ *MESH_VERTEXNORMAL 296 0.000000 -1.000000 -0.000000
+ *MESH_FACENORMAL 526 0.000007 -0.000022 -1.000000
+ *MESH_VERTEXNORMAL 312 0.000006 0.000005 -1.000000
+ *MESH_VERTEXNORMAL 313 -0.000014 -0.000007 -1.000000
+ *MESH_VERTEXNORMAL 314 0.000007 -0.000022 -1.000000
+ *MESH_FACENORMAL 527 -0.000035 0.000007 -1.000000
+ *MESH_VERTEXNORMAL 312 0.000006 0.000005 -1.000000
+ *MESH_VERTEXNORMAL 315 -0.000026 0.000002 -1.000000
+ *MESH_VERTEXNORMAL 313 -0.000014 -0.000007 -1.000000
+ *MESH_FACENORMAL 528 -0.000017 -0.000003 -1.000000
+ *MESH_VERTEXNORMAL 312 0.000006 0.000005 -1.000000
+ *MESH_VERTEXNORMAL 316 -0.000039 0.000007 -1.000000
+ *MESH_VERTEXNORMAL 315 -0.000026 0.000002 -1.000000
+ *MESH_FACENORMAL 529 -0.000060 0.000017 -1.000000
+ *MESH_VERTEXNORMAL 312 0.000006 0.000005 -1.000000
+ *MESH_VERTEXNORMAL 317 -0.000030 0.000009 -1.000000
+ *MESH_VERTEXNORMAL 316 -0.000039 0.000007 -1.000000
+ *MESH_FACENORMAL 530 0.000000 0.000001 -1.000000
+ *MESH_VERTEXNORMAL 312 0.000006 0.000005 -1.000000
+ *MESH_VERTEXNORMAL 318 0.000000 0.000001 -1.000000
+ *MESH_VERTEXNORMAL 317 -0.000030 0.000009 -1.000000
+ *MESH_FACENORMAL 531 -0.000000 0.000001 -1.000000
+ *MESH_VERTEXNORMAL 312 0.000006 0.000005 -1.000000
+ *MESH_VERTEXNORMAL 319 -0.000001 0.000001 -1.000000
+ *MESH_VERTEXNORMAL 318 0.000000 0.000001 -1.000000
+ *MESH_FACENORMAL 532 -0.000001 0.000000 -1.000000
+ *MESH_VERTEXNORMAL 312 0.000006 0.000005 -1.000000
+ *MESH_VERTEXNORMAL 320 0.000067 0.000030 -1.000000
+ *MESH_VERTEXNORMAL 319 -0.000001 0.000001 -1.000000
+ *MESH_FACENORMAL 533 0.000135 0.000059 -1.000000
+ *MESH_VERTEXNORMAL 312 0.000006 0.000005 -1.000000
+ *MESH_VERTEXNORMAL 321 0.000085 0.000033 -1.000000
+ *MESH_VERTEXNORMAL 320 0.000067 0.000030 -1.000000
+ *MESH_FACENORMAL 534 0.000035 0.000007 -1.000000
+ *MESH_VERTEXNORMAL 312 0.000006 0.000005 -1.000000
+ *MESH_VERTEXNORMAL 322 0.000016 -0.000006 -1.000000
+ *MESH_VERTEXNORMAL 321 0.000085 0.000033 -1.000000
+ *MESH_FACENORMAL 535 -0.000004 -0.000020 -1.000000
+ *MESH_VERTEXNORMAL 312 0.000006 0.000005 -1.000000
+ *MESH_VERTEXNORMAL 323 -0.000004 -0.000020 -1.000000
+ *MESH_VERTEXNORMAL 322 0.000016 -0.000006 -1.000000
+ *MESH_FACENORMAL 536 0.000023 -0.000005 1.000000
+ *MESH_VERTEXNORMAL 324 0.000003 -0.000003 1.000000
+ *MESH_VERTEXNORMAL 325 0.000035 0.000008 1.000000
+ *MESH_VERTEXNORMAL 326 0.000024 -0.000002 1.000000
+ *MESH_FACENORMAL 537 0.000047 0.000021 1.000000
+ *MESH_VERTEXNORMAL 324 0.000003 -0.000003 1.000000
+ *MESH_VERTEXNORMAL 327 0.000020 0.000009 1.000000
+ *MESH_VERTEXNORMAL 325 0.000035 0.000008 1.000000
+ *MESH_FACENORMAL 538 -0.000006 -0.000003 1.000000
+ *MESH_VERTEXNORMAL 324 0.000003 -0.000003 1.000000
+ *MESH_VERTEXNORMAL 328 -0.000003 -0.000003 1.000000
+ *MESH_VERTEXNORMAL 327 0.000020 0.000009 1.000000
+ *MESH_FACENORMAL 539 -0.000001 -0.000003 1.000000
+ *MESH_VERTEXNORMAL 324 0.000003 -0.000003 1.000000
+ *MESH_VERTEXNORMAL 329 -0.000021 0.000007 1.000000
+ *MESH_VERTEXNORMAL 328 -0.000003 -0.000003 1.000000
+ *MESH_FACENORMAL 540 -0.000042 0.000016 1.000000
+ *MESH_VERTEXNORMAL 324 0.000003 -0.000003 1.000000
+ *MESH_VERTEXNORMAL 330 -0.000033 0.000006 1.000000
+ *MESH_VERTEXNORMAL 329 -0.000021 0.000007 1.000000
+ *MESH_FACENORMAL 541 -0.000023 -0.000005 1.000000
+ *MESH_VERTEXNORMAL 324 0.000003 -0.000003 1.000000
+ *MESH_VERTEXNORMAL 331 -0.000022 -0.000019 1.000000
+ *MESH_VERTEXNORMAL 330 -0.000033 0.000006 1.000000
+ *MESH_FACENORMAL 542 -0.000020 -0.000033 1.000000
+ *MESH_VERTEXNORMAL 324 0.000003 -0.000003 1.000000
+ *MESH_VERTEXNORMAL 332 -0.000010 -0.000016 1.000000
+ *MESH_VERTEXNORMAL 331 -0.000022 -0.000019 1.000000
+ *MESH_FACENORMAL 543 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 324 0.000003 -0.000003 1.000000
+ *MESH_VERTEXNORMAL 333 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 332 -0.000010 -0.000016 1.000000
+ *MESH_FACENORMAL 544 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 324 0.000003 -0.000003 1.000000
+ *MESH_VERTEXNORMAL 334 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 333 0.000000 0.000000 1.000000
+ *MESH_FACENORMAL 545 0.000000 0.000000 1.000000
+ *MESH_VERTEXNORMAL 324 0.000003 -0.000003 1.000000
+ *MESH_VERTEXNORMAL 335 0.000019 -0.000012 1.000000
+ *MESH_VERTEXNORMAL 334 0.000000 0.000000 1.000000
+ *MESH_FACENORMAL 546 0.000039 -0.000024 1.000000
+ *MESH_VERTEXNORMAL 324 0.000003 -0.000003 1.000000
+ *MESH_VERTEXNORMAL 336 0.000031 -0.000012 1.000000
+ *MESH_VERTEXNORMAL 335 0.000019 -0.000012 1.000000
+ *MESH_FACENORMAL 547 0.000024 0.000001 1.000000
+ *MESH_VERTEXNORMAL 324 0.000003 -0.000003 1.000000
+ *MESH_VERTEXNORMAL 326 0.000024 -0.000002 1.000000
+ *MESH_VERTEXNORMAL 336 0.000031 -0.000012 1.000000
+ *MESH_FACENORMAL 548 0.979381 -0.202021 -0.000000
+ *MESH_VERTEXNORMAL 313 0.989555 -0.144154 -0.000000
+ *MESH_VERTEXNORMAL 315 0.976227 -0.216751 -0.000000
+ *MESH_VERTEXNORMAL 326 0.977832 -0.209392 -0.000000
+ *MESH_FACENORMAL 549 0.979381 -0.202021 -0.000000
+ *MESH_VERTEXNORMAL 313 0.989555 -0.144154 -0.000000
+ *MESH_VERTEXNORMAL 326 0.977832 -0.209392 -0.000000
+ *MESH_VERTEXNORMAL 325 0.996331 -0.085585 -0.000000
+ *MESH_FACENORMAL 550 0.999637 -0.026924 -0.000000
+ *MESH_VERTEXNORMAL 314 0.999637 -0.026924 -0.000000
+ *MESH_VERTEXNORMAL 313 0.989555 -0.144154 -0.000000
+ *MESH_VERTEXNORMAL 325 0.996331 -0.085585 -0.000000
+ *MESH_FACENORMAL 551 0.999637 -0.026924 -0.000000
+ *MESH_VERTEXNORMAL 314 0.999637 -0.026924 -0.000000
+ *MESH_VERTEXNORMAL 325 0.996331 -0.085585 -0.000000
+ *MESH_VERTEXNORMAL 327 0.999637 -0.026924 -0.000000
+ *MESH_FACENORMAL 552 0.189036 -0.981970 0.000001
+ *MESH_VERTEXNORMAL 312 0.064038 -0.997948 0.000001
+ *MESH_VERTEXNORMAL 314 0.189036 -0.981970 0.000001
+ *MESH_VERTEXNORMAL 327 0.189036 -0.981970 0.000001
+ *MESH_FACENORMAL 553 0.189036 -0.981970 0.000001
+ *MESH_VERTEXNORMAL 312 0.064038 -0.997948 0.000001
+ *MESH_VERTEXNORMAL 327 0.189036 -0.981970 0.000001
+ *MESH_VERTEXNORMAL 328 -0.064037 -0.997948 0.000001
+ *MESH_FACENORMAL 554 -0.189035 -0.981970 0.000001
+ *MESH_VERTEXNORMAL 323 -0.189036 -0.981970 0.000001
+ *MESH_VERTEXNORMAL 312 0.064038 -0.997948 0.000001
+ *MESH_VERTEXNORMAL 328 -0.064037 -0.997948 0.000001
+ *MESH_FACENORMAL 555 -0.189036 -0.981970 0.000001
+ *MESH_VERTEXNORMAL 323 -0.189036 -0.981970 0.000001
+ *MESH_VERTEXNORMAL 328 -0.064037 -0.997948 0.000001
+ *MESH_VERTEXNORMAL 329 -0.189036 -0.981970 0.000001
+ *MESH_FACENORMAL 556 -0.999638 -0.026924 0.000000
+ *MESH_VERTEXNORMAL 322 -0.996331 -0.085586 0.000000
+ *MESH_VERTEXNORMAL 323 -0.999637 -0.026924 0.000000
+ *MESH_VERTEXNORMAL 329 -0.999637 -0.026924 0.000000
+ *MESH_FACENORMAL 557 -0.999637 -0.026924 0.000000
+ *MESH_VERTEXNORMAL 322 -0.996331 -0.085586 0.000000
+ *MESH_VERTEXNORMAL 329 -0.999637 -0.026924 0.000000
+ *MESH_VERTEXNORMAL 330 -0.989555 -0.144154 0.000000
+ *MESH_FACENORMAL 558 -0.979381 -0.202021 0.000000
+ *MESH_VERTEXNORMAL 321 -0.977832 -0.209392 0.000000
+ *MESH_VERTEXNORMAL 322 -0.996331 -0.085586 0.000000
+ *MESH_VERTEXNORMAL 330 -0.989555 -0.144154 0.000000
+ *MESH_FACENORMAL 559 -0.979381 -0.202021 0.000000
+ *MESH_VERTEXNORMAL 321 -0.977832 -0.209392 0.000000
+ *MESH_VERTEXNORMAL 330 -0.989555 -0.144154 0.000000
+ *MESH_VERTEXNORMAL 331 -0.976227 -0.216751 0.000000
+ *MESH_FACENORMAL 560 -0.974567 -0.224097 0.000000
+ *MESH_VERTEXNORMAL 320 -0.999076 -0.042974 0.000000
+ *MESH_VERTEXNORMAL 321 -0.977832 -0.209392 0.000000
+ *MESH_VERTEXNORMAL 331 -0.976227 -0.216751 0.000000
+ *MESH_FACENORMAL 561 -0.974567 -0.224097 0.000000
+ *MESH_VERTEXNORMAL 320 -0.999076 -0.042974 0.000000
+ *MESH_VERTEXNORMAL 331 -0.976227 -0.216751 0.000000
+ *MESH_VERTEXNORMAL 332 -0.989279 0.146038 0.000000
+ *MESH_FACENORMAL 562 -0.946174 0.323657 0.000000
+ *MESH_VERTEXNORMAL 319 -0.946174 0.323657 0.000000
+ *MESH_VERTEXNORMAL 320 -0.999076 -0.042974 0.000000
+ *MESH_VERTEXNORMAL 332 -0.989279 0.146038 0.000000
+ *MESH_FACENORMAL 563 -0.946174 0.323657 0.000000
+ *MESH_VERTEXNORMAL 319 -0.946174 0.323657 0.000000
+ *MESH_VERTEXNORMAL 332 -0.989279 0.146038 0.000000
+ *MESH_VERTEXNORMAL 333 -0.946174 0.323657 0.000000
+ *MESH_FACENORMAL 564 -0.348971 0.937133 -0.000001
+ *MESH_VERTEXNORMAL 318 -0.123182 0.992384 -0.000001
+ *MESH_VERTEXNORMAL 319 -0.348971 0.937133 -0.000001
+ *MESH_VERTEXNORMAL 333 -0.348971 0.937133 -0.000001
+ *MESH_FACENORMAL 565 -0.348971 0.937133 -0.000001
+ *MESH_VERTEXNORMAL 318 -0.123182 0.992384 -0.000001
+ *MESH_VERTEXNORMAL 333 -0.348971 0.937133 -0.000001
+ *MESH_VERTEXNORMAL 334 0.123182 0.992384 -0.000001
+ *MESH_FACENORMAL 566 0.348971 0.937133 -0.000001
+ *MESH_VERTEXNORMAL 317 0.348971 0.937133 -0.000001
+ *MESH_VERTEXNORMAL 318 -0.123182 0.992384 -0.000001
+ *MESH_VERTEXNORMAL 334 0.123182 0.992384 -0.000001
+ *MESH_FACENORMAL 567 0.348971 0.937133 -0.000001
+ *MESH_VERTEXNORMAL 317 0.348971 0.937133 -0.000001
+ *MESH_VERTEXNORMAL 334 0.123182 0.992384 -0.000001
+ *MESH_VERTEXNORMAL 335 0.348971 0.937133 -0.000001
+ *MESH_FACENORMAL 568 0.946175 0.323656 -0.000001
+ *MESH_VERTEXNORMAL 316 0.989279 0.146038 -0.000000
+ *MESH_VERTEXNORMAL 317 0.946175 0.323656 -0.000001
+ *MESH_VERTEXNORMAL 335 0.946175 0.323656 -0.000001
+ *MESH_FACENORMAL 569 0.946175 0.323657 -0.000001
+ *MESH_VERTEXNORMAL 316 0.989279 0.146038 -0.000000
+ *MESH_VERTEXNORMAL 335 0.946175 0.323656 -0.000001
+ *MESH_VERTEXNORMAL 336 0.999076 -0.042974 -0.000000
+ *MESH_FACENORMAL 570 0.974567 -0.224097 -0.000000
+ *MESH_VERTEXNORMAL 315 0.976227 -0.216751 -0.000000
+ *MESH_VERTEXNORMAL 316 0.989279 0.146038 -0.000000
+ *MESH_VERTEXNORMAL 336 0.999076 -0.042974 -0.000000
+ *MESH_FACENORMAL 571 0.974567 -0.224097 -0.000000
+ *MESH_VERTEXNORMAL 315 0.976227 -0.216751 -0.000000
+ *MESH_VERTEXNORMAL 336 0.999076 -0.042974 -0.000000
+ *MESH_VERTEXNORMAL 326 0.977832 -0.209392 -0.000000
+ }
+ *MESH_NUMTVERTEX 1716
+ *MESH_TVERTLIST {
+ *MESH_TVERT 0 0.137694 0.971341 0.000000
+ *MESH_TVERT 1 0.270836 0.981468 0.000000
+ *MESH_TVERT 2 0.644937 0.967165 0.000000
+ *MESH_TVERT 3 0.270836 0.981468 0.000000
+ *MESH_TVERT 4 0.636641 0.978456 0.000000
+ *MESH_TVERT 5 0.644937 0.967165 0.000000
+ *MESH_TVERT 6 0.137694 0.971341 0.000000
+ *MESH_TVERT 7 0.151952 0.989594 0.000000
+ *MESH_TVERT 8 0.270836 0.981468 0.000000
+ *MESH_TVERT 9 0.151952 0.989594 0.000000
+ *MESH_TVERT 10 0.258112 0.988720 0.000000
+ *MESH_TVERT 11 0.270836 0.981468 0.000000
+ *MESH_TVERT 12 0.137694 0.971341 0.000000
+ *MESH_TVERT 13 0.644937 0.967165 0.000000
+ *MESH_TVERT 14 0.644937 0.967165 0.000000
+ *MESH_TVERT 15 0.644937 0.967165 0.000000
+ *MESH_TVERT 16 0.137694 0.971341 0.000000
+ *MESH_TVERT 17 0.137694 0.971341 0.000000
+ *MESH_TVERT 18 0.636641 0.978456 0.000000
+ *MESH_TVERT 19 0.270836 0.981468 0.000000
+ *MESH_TVERT 20 0.644937 0.967165 0.000000
+ *MESH_TVERT 21 0.270836 0.981468 0.000000
+ *MESH_TVERT 22 0.137694 0.971341 0.000000
+ *MESH_TVERT 23 0.644937 0.967165 0.000000
+ *MESH_TVERT 24 0.270836 0.981468 0.000000
+ *MESH_TVERT 25 0.151952 0.989594 0.000000
+ *MESH_TVERT 26 0.137694 0.971341 0.000000
+ *MESH_TVERT 27 0.270836 0.981468 0.000000
+ *MESH_TVERT 28 0.258112 0.988720 0.000000
+ *MESH_TVERT 29 0.151952 0.989594 0.000000
+ *MESH_TVERT 30 0.258112 0.988720 0.000000
+ *MESH_TVERT 31 0.151952 0.989594 0.000000
+ *MESH_TVERT 32 0.151952 0.989594 0.000000
+ *MESH_TVERT 33 0.151952 0.989594 0.000000
+ *MESH_TVERT 34 0.258112 0.988720 0.000000
+ *MESH_TVERT 35 0.258112 0.988720 0.000000
+ *MESH_TVERT 36 0.270836 0.981468 0.000000
+ *MESH_TVERT 37 0.258112 0.988720 0.000000
+ *MESH_TVERT 38 0.258112 0.988720 0.000000
+ *MESH_TVERT 39 0.258112 0.988720 0.000000
+ *MESH_TVERT 40 0.270836 0.981468 0.000000
+ *MESH_TVERT 41 0.270836 0.981468 0.000000
+ *MESH_TVERT 42 0.636641 0.978456 0.000000
+ *MESH_TVERT 43 0.270836 0.981468 0.000000
+ *MESH_TVERT 44 0.270836 0.981468 0.000000
+ *MESH_TVERT 45 0.270836 0.981468 0.000000
+ *MESH_TVERT 46 0.636641 0.978456 0.000000
+ *MESH_TVERT 47 0.636641 0.978456 0.000000
+ *MESH_TVERT 48 0.398975 0.360584 0.000000
+ *MESH_TVERT 49 0.391240 0.407633 0.000000
+ *MESH_TVERT 50 0.398975 0.407633 0.000000
+ *MESH_TVERT 51 0.398975 0.360584 0.000000
+ *MESH_TVERT 52 0.385530 0.202603 0.000000
+ *MESH_TVERT 53 0.391240 0.407633 0.000000
+ *MESH_TVERT 54 0.398975 0.360584 0.000000
+ *MESH_TVERT 55 0.430891 0.202603 0.000000
+ *MESH_TVERT 56 0.385530 0.202603 0.000000
+ *MESH_TVERT 57 0.398975 0.360584 0.000000
+ *MESH_TVERT 58 0.417445 0.360584 0.000000
+ *MESH_TVERT 59 0.430891 0.202603 0.000000
+ *MESH_TVERT 60 0.417445 0.360584 0.000000
+ *MESH_TVERT 61 0.425180 0.407633 0.000000
+ *MESH_TVERT 62 0.430891 0.202603 0.000000
+ *MESH_TVERT 63 0.417445 0.360584 0.000000
+ *MESH_TVERT 64 0.417445 0.407633 0.000000
+ *MESH_TVERT 65 0.425180 0.407633 0.000000
+ *MESH_TVERT 66 0.413960 0.478748 0.000000
+ *MESH_TVERT 67 0.421247 0.501951 0.000000
+ *MESH_TVERT 68 0.413960 0.501951 0.000000
+ *MESH_TVERT 69 0.413960 0.478748 0.000000
+ *MESH_TVERT 70 0.453329 0.194566 0.000000
+ *MESH_TVERT 71 0.421247 0.501951 0.000000
+ *MESH_TVERT 72 0.413960 0.478748 0.000000
+ *MESH_TVERT 73 0.358265 0.194566 0.000000
+ *MESH_TVERT 74 0.453329 0.194566 0.000000
+ *MESH_TVERT 75 0.413960 0.478748 0.000000
+ *MESH_TVERT 76 0.397634 0.478748 0.000000
+ *MESH_TVERT 77 0.358265 0.194566 0.000000
+ *MESH_TVERT 78 0.397634 0.478748 0.000000
+ *MESH_TVERT 79 0.390347 0.501951 0.000000
+ *MESH_TVERT 80 0.358265 0.194566 0.000000
+ *MESH_TVERT 81 0.397634 0.478748 0.000000
+ *MESH_TVERT 82 0.397634 0.501951 0.000000
+ *MESH_TVERT 83 0.390347 0.501951 0.000000
+ *MESH_TVERT 84 0.531204 0.919284 0.000000
+ *MESH_TVERT 85 0.531204 0.919284 0.000000
+ *MESH_TVERT 86 0.607947 0.918652 0.000000
+ *MESH_TVERT 87 0.607947 0.918652 0.000000
+ *MESH_TVERT 88 0.607947 0.918652 0.000000
+ *MESH_TVERT 89 0.531204 0.919284 0.000000
+ *MESH_TVERT 90 0.607947 0.918652 0.000000
+ *MESH_TVERT 91 0.607947 0.918652 0.000000
+ *MESH_TVERT 92 0.608105 0.935805 0.000000
+ *MESH_TVERT 93 0.608105 0.935805 0.000000
+ *MESH_TVERT 94 0.608105 0.935805 0.000000
+ *MESH_TVERT 95 0.607947 0.918652 0.000000
+ *MESH_TVERT 96 0.377589 0.264828 0.000000
+ *MESH_TVERT 97 0.436123 0.250194 0.000000
+ *MESH_TVERT 98 0.377086 0.250194 0.000000
+ *MESH_TVERT 99 0.377589 0.264828 0.000000
+ *MESH_TVERT 100 0.435620 0.264828 0.000000
+ *MESH_TVERT 101 0.436123 0.250194 0.000000
+ *MESH_TVERT 102 0.377589 0.264828 0.000000
+ *MESH_TVERT 103 0.418804 0.335013 0.000000
+ *MESH_TVERT 104 0.435620 0.264828 0.000000
+ *MESH_TVERT 105 0.377589 0.264828 0.000000
+ *MESH_TVERT 106 0.394404 0.335013 0.000000
+ *MESH_TVERT 107 0.418804 0.335013 0.000000
+ *MESH_TVERT 108 0.200591 0.854818 0.000000
+ *MESH_TVERT 109 0.200591 0.854818 0.000000
+ *MESH_TVERT 110 0.223561 0.848911 0.000000
+ *MESH_TVERT 111 0.223561 0.848911 0.000000
+ *MESH_TVERT 112 0.223561 0.848911 0.000000
+ *MESH_TVERT 113 0.200591 0.854818 0.000000
+ *MESH_TVERT 114 0.191915 0.884910 0.000000
+ *MESH_TVERT 115 0.191915 0.884910 0.000000
+ *MESH_TVERT 116 0.191796 0.872045 0.000000
+ *MESH_TVERT 117 0.191796 0.872045 0.000000
+ *MESH_TVERT 118 0.191796 0.872045 0.000000
+ *MESH_TVERT 119 0.191915 0.884910 0.000000
+ *MESH_TVERT 120 0.191796 0.872045 0.000000
+ *MESH_TVERT 121 0.191796 0.872045 0.000000
+ *MESH_TVERT 122 0.200591 0.854818 0.000000
+ *MESH_TVERT 123 0.200591 0.854818 0.000000
+ *MESH_TVERT 124 0.200591 0.854818 0.000000
+ *MESH_TVERT 125 0.191796 0.872045 0.000000
+ *MESH_TVERT 126 0.608105 0.935805 0.000000
+ *MESH_TVERT 127 0.230789 0.938911 0.000000
+ *MESH_TVERT 128 0.346813 0.937956 0.000000
+ *MESH_TVERT 129 0.230789 0.938911 0.000000
+ *MESH_TVERT 130 0.230789 0.938911 0.000000
+ *MESH_TVERT 131 0.346813 0.937956 0.000000
+ *MESH_TVERT 132 0.608105 0.935805 0.000000
+ *MESH_TVERT 133 0.346813 0.937956 0.000000
+ *MESH_TVERT 134 0.230789 0.938911 0.000000
+ *MESH_TVERT 135 0.608105 0.935805 0.000000
+ *MESH_TVERT 136 0.608105 0.935805 0.000000
+ *MESH_TVERT 137 0.346813 0.937956 0.000000
+ *MESH_TVERT 138 0.230789 0.938911 0.000000
+ *MESH_TVERT 139 0.230789 0.938911 0.000000
+ *MESH_TVERT 140 0.191915 0.884910 0.000000
+ *MESH_TVERT 141 0.191915 0.884910 0.000000
+ *MESH_TVERT 142 0.191915 0.884910 0.000000
+ *MESH_TVERT 143 0.230789 0.938911 0.000000
+ *MESH_TVERT 144 0.223561 0.848911 0.000000
+ *MESH_TVERT 145 0.223561 0.848911 0.000000
+ *MESH_TVERT 146 0.474252 0.846847 0.000000
+ *MESH_TVERT 147 0.474252 0.846847 0.000000
+ *MESH_TVERT 148 0.474252 0.846847 0.000000
+ *MESH_TVERT 149 0.223561 0.848911 0.000000
+ *MESH_TVERT 150 0.029729 0.913406 0.000000
+ *MESH_TVERT 151 0.071884 0.907341 0.000000
+ *MESH_TVERT 152 0.070711 0.918786 0.000000
+ *MESH_TVERT 153 0.029729 0.913406 0.000000
+ *MESH_TVERT 154 0.062164 0.824508 0.000000
+ *MESH_TVERT 155 0.071884 0.907341 0.000000
+ *MESH_TVERT 156 0.029729 0.913406 0.000000
+ *MESH_TVERT 157 0.014787 0.819180 0.000000
+ *MESH_TVERT 158 0.062164 0.824508 0.000000
+ *MESH_TVERT 159 0.029729 0.913406 0.000000
+ *MESH_TVERT 160 0.062164 0.824508 0.000000
+ *MESH_TVERT 161 0.014787 0.819180 0.000000
+ *MESH_TVERT 162 0.029729 0.913406 0.000000
+ *MESH_TVERT 163 0.071884 0.907341 0.000000
+ *MESH_TVERT 164 0.062164 0.824508 0.000000
+ *MESH_TVERT 165 0.029729 0.913406 0.000000
+ *MESH_TVERT 166 0.070711 0.918786 0.000000
+ *MESH_TVERT 167 0.071884 0.907341 0.000000
+ *MESH_TVERT 168 0.062164 0.824508 0.000000
+ *MESH_TVERT 169 0.014787 0.819180 0.000000
+ *MESH_TVERT 170 0.014787 0.819180 0.000000
+ *MESH_TVERT 171 0.014787 0.819180 0.000000
+ *MESH_TVERT 172 0.062164 0.824508 0.000000
+ *MESH_TVERT 173 0.062164 0.824508 0.000000
+ *MESH_TVERT 174 0.014787 0.819180 0.000000
+ *MESH_TVERT 175 0.029729 0.913406 0.000000
+ *MESH_TVERT 176 0.029729 0.913406 0.000000
+ *MESH_TVERT 177 0.029729 0.913406 0.000000
+ *MESH_TVERT 178 0.014787 0.819180 0.000000
+ *MESH_TVERT 179 0.014787 0.819180 0.000000
+ *MESH_TVERT 180 0.378509 0.318863 0.000000
+ *MESH_TVERT 181 0.379048 0.222198 0.000000
+ *MESH_TVERT 182 0.437376 0.222198 0.000000
+ *MESH_TVERT 183 0.437376 0.222198 0.000000
+ *MESH_TVERT 184 0.437915 0.318863 0.000000
+ *MESH_TVERT 185 0.378509 0.318863 0.000000
+ *MESH_TVERT 186 0.070711 0.918786 0.000000
+ *MESH_TVERT 187 0.071884 0.907341 0.000000
+ *MESH_TVERT 188 0.071884 0.907341 0.000000
+ *MESH_TVERT 189 0.071884 0.907341 0.000000
+ *MESH_TVERT 190 0.070711 0.918786 0.000000
+ *MESH_TVERT 191 0.070711 0.918786 0.000000
+ *MESH_TVERT 192 0.071884 0.907341 0.000000
+ *MESH_TVERT 193 0.089817 0.910052 0.000000
+ *MESH_TVERT 194 0.089817 0.910052 0.000000
+ *MESH_TVERT 195 0.089817 0.910052 0.000000
+ *MESH_TVERT 196 0.071884 0.907341 0.000000
+ *MESH_TVERT 197 0.071884 0.907341 0.000000
+ *MESH_TVERT 198 0.151952 0.989594 0.000000
+ *MESH_TVERT 199 0.151952 0.989594 0.000000
+ *MESH_TVERT 200 0.258112 0.988720 0.000000
+ *MESH_TVERT 201 0.258112 0.988720 0.000000
+ *MESH_TVERT 202 0.258112 0.988720 0.000000
+ *MESH_TVERT 203 0.151952 0.989594 0.000000
+ *MESH_TVERT 204 0.258112 0.988720 0.000000
+ *MESH_TVERT 205 0.258112 0.988720 0.000000
+ *MESH_TVERT 206 0.270836 0.981468 0.000000
+ *MESH_TVERT 207 0.270836 0.981468 0.000000
+ *MESH_TVERT 208 0.270836 0.981468 0.000000
+ *MESH_TVERT 209 0.258112 0.988720 0.000000
+ *MESH_TVERT 210 0.270836 0.981468 0.000000
+ *MESH_TVERT 211 0.636641 0.978456 0.000000
+ *MESH_TVERT 212 0.636641 0.978456 0.000000
+ *MESH_TVERT 213 0.636641 0.978456 0.000000
+ *MESH_TVERT 214 0.270836 0.981468 0.000000
+ *MESH_TVERT 215 0.270836 0.981468 0.000000
+ *MESH_TVERT 216 0.746542 0.828880 0.000000
+ *MESH_TVERT 217 0.534222 0.830628 0.000000
+ *MESH_TVERT 218 0.534222 0.830628 0.000000
+ *MESH_TVERT 219 0.534222 0.830628 0.000000
+ *MESH_TVERT 220 0.746542 0.828880 0.000000
+ *MESH_TVERT 221 0.746542 0.828880 0.000000
+ *MESH_TVERT 222 0.534222 0.830628 0.000000
+ *MESH_TVERT 223 0.521339 0.820728 0.000000
+ *MESH_TVERT 224 0.521339 0.820728 0.000000
+ *MESH_TVERT 225 0.521339 0.820728 0.000000
+ *MESH_TVERT 226 0.534222 0.830628 0.000000
+ *MESH_TVERT 227 0.534222 0.830628 0.000000
+ *MESH_TVERT 228 0.521339 0.820728 0.000000
+ *MESH_TVERT 229 0.062164 0.824508 0.000000
+ *MESH_TVERT 230 0.062164 0.824508 0.000000
+ *MESH_TVERT 231 0.062164 0.824508 0.000000
+ *MESH_TVERT 232 0.521339 0.820728 0.000000
+ *MESH_TVERT 233 0.521339 0.820728 0.000000
+ *MESH_TVERT 234 0.258112 0.988720 0.000000
+ *MESH_TVERT 235 0.230789 0.938911 0.000000
+ *MESH_TVERT 236 0.151952 0.989594 0.000000
+ *MESH_TVERT 237 0.270836 0.981468 0.000000
+ *MESH_TVERT 238 0.230789 0.938911 0.000000
+ *MESH_TVERT 239 0.258112 0.988720 0.000000
+ *MESH_TVERT 240 0.346813 0.937956 0.000000
+ *MESH_TVERT 241 0.230789 0.938911 0.000000
+ *MESH_TVERT 242 0.270836 0.981468 0.000000
+ *MESH_TVERT 243 0.151952 0.989594 0.000000
+ *MESH_TVERT 244 0.230789 0.938911 0.000000
+ *MESH_TVERT 245 0.089817 0.910052 0.000000
+ *MESH_TVERT 246 0.191915 0.884910 0.000000
+ *MESH_TVERT 247 0.089817 0.910052 0.000000
+ *MESH_TVERT 248 0.230789 0.938911 0.000000
+ *MESH_TVERT 249 0.089817 0.910052 0.000000
+ *MESH_TVERT 250 0.191915 0.884910 0.000000
+ *MESH_TVERT 251 0.062164 0.824508 0.000000
+ *MESH_TVERT 252 0.191796 0.872045 0.000000
+ *MESH_TVERT 253 0.062164 0.824508 0.000000
+ *MESH_TVERT 254 0.191915 0.884910 0.000000
+ *MESH_TVERT 255 0.191796 0.872045 0.000000
+ *MESH_TVERT 256 0.200591 0.854818 0.000000
+ *MESH_TVERT 257 0.062164 0.824508 0.000000
+ *MESH_TVERT 258 0.200591 0.854818 0.000000
+ *MESH_TVERT 259 0.223561 0.848911 0.000000
+ *MESH_TVERT 260 0.062164 0.824508 0.000000
+ *MESH_TVERT 261 0.062164 0.824508 0.000000
+ *MESH_TVERT 262 0.223561 0.848911 0.000000
+ *MESH_TVERT 263 0.521339 0.820728 0.000000
+ *MESH_TVERT 264 0.474252 0.846847 0.000000
+ *MESH_TVERT 265 0.521339 0.820728 0.000000
+ *MESH_TVERT 266 0.223561 0.848911 0.000000
+ *MESH_TVERT 267 0.534222 0.830628 0.000000
+ *MESH_TVERT 268 0.607947 0.918652 0.000000
+ *MESH_TVERT 269 0.746542 0.828880 0.000000
+ *MESH_TVERT 270 0.531204 0.919284 0.000000
+ *MESH_TVERT 271 0.607947 0.918652 0.000000
+ *MESH_TVERT 272 0.534222 0.830628 0.000000
+ *MESH_TVERT 273 0.484079 0.859345 0.000000
+ *MESH_TVERT 274 0.531204 0.919284 0.000000
+ *MESH_TVERT 275 0.534222 0.830628 0.000000
+ *MESH_TVERT 276 0.746542 0.828880 0.000000
+ *MESH_TVERT 277 0.607947 0.918652 0.000000
+ *MESH_TVERT 278 0.636641 0.978456 0.000000
+ *MESH_TVERT 279 0.608105 0.935805 0.000000
+ *MESH_TVERT 280 0.636641 0.978456 0.000000
+ *MESH_TVERT 281 0.607947 0.918652 0.000000
+ *MESH_TVERT 282 0.484079 0.859345 0.000000
+ *MESH_TVERT 283 0.534222 0.830628 0.000000
+ *MESH_TVERT 284 0.474252 0.846847 0.000000
+ *MESH_TVERT 285 0.521339 0.820728 0.000000
+ *MESH_TVERT 286 0.474252 0.846847 0.000000
+ *MESH_TVERT 287 0.534222 0.830628 0.000000
+ *MESH_TVERT 288 0.636641 0.978456 0.000000
+ *MESH_TVERT 289 0.608105 0.935805 0.000000
+ *MESH_TVERT 290 0.270836 0.981468 0.000000
+ *MESH_TVERT 291 0.346813 0.937956 0.000000
+ *MESH_TVERT 292 0.270836 0.981468 0.000000
+ *MESH_TVERT 293 0.608105 0.935805 0.000000
+ *MESH_TVERT 294 0.071884 0.907341 0.000000
+ *MESH_TVERT 295 0.089817 0.910052 0.000000
+ *MESH_TVERT 296 0.062164 0.824508 0.000000
+ *MESH_TVERT 297 0.230789 0.938911 0.000000
+ *MESH_TVERT 298 0.258112 0.988720 0.000000
+ *MESH_TVERT 299 0.151952 0.989594 0.000000
+ *MESH_TVERT 300 0.230789 0.938911 0.000000
+ *MESH_TVERT 301 0.270836 0.981468 0.000000
+ *MESH_TVERT 302 0.258112 0.988720 0.000000
+ *MESH_TVERT 303 0.230789 0.938911 0.000000
+ *MESH_TVERT 304 0.346813 0.937956 0.000000
+ *MESH_TVERT 305 0.270836 0.981468 0.000000
+ *MESH_TVERT 306 0.230789 0.938911 0.000000
+ *MESH_TVERT 307 0.151952 0.989594 0.000000
+ *MESH_TVERT 308 0.089817 0.910052 0.000000
+ *MESH_TVERT 309 0.089817 0.910052 0.000000
+ *MESH_TVERT 310 0.191915 0.884910 0.000000
+ *MESH_TVERT 311 0.230789 0.938911 0.000000
+ *MESH_TVERT 312 0.191915 0.884910 0.000000
+ *MESH_TVERT 313 0.089817 0.910052 0.000000
+ *MESH_TVERT 314 0.062164 0.824508 0.000000
+ *MESH_TVERT 315 0.062164 0.824508 0.000000
+ *MESH_TVERT 316 0.191796 0.872045 0.000000
+ *MESH_TVERT 317 0.191915 0.884910 0.000000
+ *MESH_TVERT 318 0.200591 0.854818 0.000000
+ *MESH_TVERT 319 0.191796 0.872045 0.000000
+ *MESH_TVERT 320 0.062164 0.824508 0.000000
+ *MESH_TVERT 321 0.223561 0.848911 0.000000
+ *MESH_TVERT 322 0.200591 0.854818 0.000000
+ *MESH_TVERT 323 0.062164 0.824508 0.000000
+ *MESH_TVERT 324 0.223561 0.848911 0.000000
+ *MESH_TVERT 325 0.062164 0.824508 0.000000
+ *MESH_TVERT 326 0.521339 0.820728 0.000000
+ *MESH_TVERT 327 0.521339 0.820728 0.000000
+ *MESH_TVERT 328 0.474252 0.846847 0.000000
+ *MESH_TVERT 329 0.223561 0.848911 0.000000
+ *MESH_TVERT 330 0.607947 0.918652 0.000000
+ *MESH_TVERT 331 0.534222 0.830628 0.000000
+ *MESH_TVERT 332 0.746542 0.828880 0.000000
+ *MESH_TVERT 333 0.607947 0.918652 0.000000
+ *MESH_TVERT 334 0.531204 0.919284 0.000000
+ *MESH_TVERT 335 0.534222 0.830628 0.000000
+ *MESH_TVERT 336 0.531204 0.919284 0.000000
+ *MESH_TVERT 337 0.484079 0.859345 0.000000
+ *MESH_TVERT 338 0.534222 0.830628 0.000000
+ *MESH_TVERT 339 0.607947 0.918652 0.000000
+ *MESH_TVERT 340 0.746542 0.828880 0.000000
+ *MESH_TVERT 341 0.636641 0.978456 0.000000
+ *MESH_TVERT 342 0.636641 0.978456 0.000000
+ *MESH_TVERT 343 0.608105 0.935805 0.000000
+ *MESH_TVERT 344 0.607947 0.918652 0.000000
+ *MESH_TVERT 345 0.534222 0.830628 0.000000
+ *MESH_TVERT 346 0.484079 0.859345 0.000000
+ *MESH_TVERT 347 0.474252 0.846847 0.000000
+ *MESH_TVERT 348 0.474252 0.846847 0.000000
+ *MESH_TVERT 349 0.521339 0.820728 0.000000
+ *MESH_TVERT 350 0.534222 0.830628 0.000000
+ *MESH_TVERT 351 0.608105 0.935805 0.000000
+ *MESH_TVERT 352 0.636641 0.978456 0.000000
+ *MESH_TVERT 353 0.270836 0.981468 0.000000
+ *MESH_TVERT 354 0.270836 0.981468 0.000000
+ *MESH_TVERT 355 0.346813 0.937956 0.000000
+ *MESH_TVERT 356 0.608105 0.935805 0.000000
+ *MESH_TVERT 357 0.089817 0.910052 0.000000
+ *MESH_TVERT 358 0.071884 0.907341 0.000000
+ *MESH_TVERT 359 0.062164 0.824508 0.000000
+ *MESH_TVERT 360 0.216328 0.797444 0.000000
+ *MESH_TVERT 361 0.304755 0.807469 0.000000
+ *MESH_TVERT 362 0.052713 0.800658 0.000000
+ *MESH_TVERT 363 0.304120 0.738781 0.000000
+ *MESH_TVERT 364 0.216328 0.797444 0.000000
+ *MESH_TVERT 365 0.241200 0.778578 0.000000
+ *MESH_TVERT 366 0.304755 0.807469 0.000000
+ *MESH_TVERT 367 0.216328 0.797444 0.000000
+ *MESH_TVERT 368 0.304120 0.738781 0.000000
+ *MESH_TVERT 369 0.540406 0.811572 0.000000
+ *MESH_TVERT 370 0.397693 0.758538 0.000000
+ *MESH_TVERT 371 0.540085 0.776849 0.000000
+ *MESH_TVERT 372 0.532265 0.834033 0.000000
+ *MESH_TVERT 373 0.397693 0.758538 0.000000
+ *MESH_TVERT 374 0.540406 0.811572 0.000000
+ *MESH_TVERT 375 0.398139 0.806700 0.000000
+ *MESH_TVERT 376 0.397693 0.758538 0.000000
+ *MESH_TVERT 377 0.532265 0.834033 0.000000
+ *MESH_TVERT 378 0.501088 0.712989 0.000000
+ *MESH_TVERT 379 0.554563 0.712549 0.000000
+ *MESH_TVERT 380 0.540085 0.776849 0.000000
+ *MESH_TVERT 381 0.554630 0.719721 0.000000
+ *MESH_TVERT 382 0.540085 0.776849 0.000000
+ *MESH_TVERT 383 0.554563 0.712549 0.000000
+ *MESH_TVERT 384 0.540085 0.776849 0.000000
+ *MESH_TVERT 385 0.554630 0.719721 0.000000
+ *MESH_TVERT 386 0.763825 0.775007 0.000000
+ *MESH_TVERT 387 0.763298 0.718003 0.000000
+ *MESH_TVERT 388 0.763825 0.775007 0.000000
+ *MESH_TVERT 389 0.554630 0.719721 0.000000
+ *MESH_TVERT 390 0.384932 0.757965 0.000000
+ *MESH_TVERT 391 0.368780 0.743613 0.000000
+ *MESH_TVERT 392 0.397470 0.734370 0.000000
+ *MESH_TVERT 393 0.334731 0.742893 0.000000
+ *MESH_TVERT 394 0.318282 0.752519 0.000000
+ *MESH_TVERT 395 0.304203 0.738777 0.000000
+ *MESH_TVERT 396 0.318282 0.752519 0.000000
+ *MESH_TVERT 397 0.311260 0.766564 0.000000
+ *MESH_TVERT 398 0.304203 0.738777 0.000000
+ *MESH_TVERT 399 0.312740 0.781538 0.000000
+ *MESH_TVERT 400 0.304203 0.738777 0.000000
+ *MESH_TVERT 401 0.311260 0.766564 0.000000
+ *MESH_TVERT 402 0.304755 0.807468 0.000000
+ *MESH_TVERT 403 0.304203 0.738777 0.000000
+ *MESH_TVERT 404 0.312740 0.781538 0.000000
+ *MESH_TVERT 405 0.312740 0.781538 0.000000
+ *MESH_TVERT 406 0.321748 0.788956 0.000000
+ *MESH_TVERT 407 0.304755 0.807468 0.000000
+ *MESH_TVERT 408 0.304755 0.807468 0.000000
+ *MESH_TVERT 409 0.321748 0.788956 0.000000
+ *MESH_TVERT 410 0.398139 0.806700 0.000000
+ *MESH_TVERT 411 0.391922 0.788878 0.000000
+ *MESH_TVERT 412 0.398139 0.806700 0.000000
+ *MESH_TVERT 413 0.321748 0.788956 0.000000
+ *MESH_TVERT 414 0.334731 0.742893 0.000000
+ *MESH_TVERT 415 0.304203 0.738777 0.000000
+ *MESH_TVERT 416 0.368780 0.743613 0.000000
+ *MESH_TVERT 417 0.397470 0.734370 0.000000
+ *MESH_TVERT 418 0.368780 0.743613 0.000000
+ *MESH_TVERT 419 0.304203 0.738777 0.000000
+ *MESH_TVERT 420 0.391770 0.772395 0.000000
+ *MESH_TVERT 421 0.384932 0.757965 0.000000
+ *MESH_TVERT 422 0.397470 0.734370 0.000000
+ *MESH_TVERT 423 0.391922 0.788878 0.000000
+ *MESH_TVERT 424 0.391770 0.772395 0.000000
+ *MESH_TVERT 425 0.398139 0.806700 0.000000
+ *MESH_TVERT 426 0.397470 0.734370 0.000000
+ *MESH_TVERT 427 0.398139 0.806700 0.000000
+ *MESH_TVERT 428 0.391770 0.772395 0.000000
+ *MESH_TVERT 429 0.540085 0.776849 0.000000
+ *MESH_TVERT 430 0.397693 0.758538 0.000000
+ *MESH_TVERT 431 0.459535 0.733859 0.000000
+ *MESH_TVERT 432 0.397470 0.734370 0.000000
+ *MESH_TVERT 433 0.459535 0.733859 0.000000
+ *MESH_TVERT 434 0.397693 0.758538 0.000000
+ *MESH_TVERT 435 0.032919 0.826947 0.000000
+ *MESH_TVERT 436 0.052713 0.800658 0.000000
+ *MESH_TVERT 437 0.532265 0.834033 0.000000
+ *MESH_TVERT 438 0.304755 0.807469 0.000000
+ *MESH_TVERT 439 0.532265 0.834033 0.000000
+ *MESH_TVERT 440 0.052713 0.800658 0.000000
+ *MESH_TVERT 441 0.224141 0.739529 0.000000
+ *MESH_TVERT 442 0.304120 0.738781 0.000000
+ *MESH_TVERT 443 0.241200 0.778578 0.000000
+ *MESH_TVERT 444 0.273921 0.705528 0.000000
+ *MESH_TVERT 445 0.304120 0.738781 0.000000
+ *MESH_TVERT 446 0.224141 0.739529 0.000000
+ *MESH_TVERT 447 0.500587 0.658875 0.000000
+ *MESH_TVERT 448 0.501088 0.712989 0.000000
+ *MESH_TVERT 449 0.458844 0.659218 0.000000
+ *MESH_TVERT 450 0.459535 0.733859 0.000000
+ *MESH_TVERT 451 0.458844 0.659218 0.000000
+ *MESH_TVERT 452 0.501088 0.712989 0.000000
+ *MESH_TVERT 453 0.398139 0.806700 0.000000
+ *MESH_TVERT 454 0.532265 0.834033 0.000000
+ *MESH_TVERT 455 0.304755 0.807469 0.000000
+ *MESH_TVERT 456 0.501088 0.712989 0.000000
+ *MESH_TVERT 457 0.540085 0.776849 0.000000
+ *MESH_TVERT 458 0.459535 0.733859 0.000000
+ *MESH_TVERT 459 0.196752 0.666974 0.000000
+ *MESH_TVERT 460 0.263385 0.649630 0.000000
+ *MESH_TVERT 461 0.273921 0.705528 0.000000
+ *MESH_TVERT 462 0.193724 0.700590 0.000000
+ *MESH_TVERT 463 0.196752 0.666974 0.000000
+ *MESH_TVERT 464 0.273921 0.705528 0.000000
+ *MESH_TVERT 465 0.224141 0.739529 0.000000
+ *MESH_TVERT 466 0.193724 0.700590 0.000000
+ *MESH_TVERT 467 0.273921 0.705528 0.000000
+ *MESH_TVERT 468 0.241489 0.629283 0.000000
+ *MESH_TVERT 469 0.263385 0.649630 0.000000
+ *MESH_TVERT 470 0.196752 0.666974 0.000000
+ *MESH_TVERT 471 0.216328 0.797444 0.000000
+ *MESH_TVERT 472 0.304120 0.738781 0.000000
+ *MESH_TVERT 473 0.241200 0.778578 0.000000
+ *MESH_TVERT 474 0.216328 0.797444 0.000000
+ *MESH_TVERT 475 0.304755 0.807469 0.000000
+ *MESH_TVERT 476 0.304120 0.738781 0.000000
+ *MESH_TVERT 477 0.397693 0.758538 0.000000
+ *MESH_TVERT 478 0.540406 0.811572 0.000000
+ *MESH_TVERT 479 0.540085 0.776849 0.000000
+ *MESH_TVERT 480 0.397693 0.758538 0.000000
+ *MESH_TVERT 481 0.532265 0.834033 0.000000
+ *MESH_TVERT 482 0.540406 0.811572 0.000000
+ *MESH_TVERT 483 0.397693 0.758538 0.000000
+ *MESH_TVERT 484 0.398139 0.806700 0.000000
+ *MESH_TVERT 485 0.532265 0.834033 0.000000
+ *MESH_TVERT 486 0.554563 0.712549 0.000000
+ *MESH_TVERT 487 0.501088 0.712989 0.000000
+ *MESH_TVERT 488 0.540085 0.776849 0.000000
+ *MESH_TVERT 489 0.540085 0.776849 0.000000
+ *MESH_TVERT 490 0.554630 0.719720 0.000000
+ *MESH_TVERT 491 0.554563 0.712549 0.000000
+ *MESH_TVERT 492 0.554630 0.719720 0.000000
+ *MESH_TVERT 493 0.540085 0.776849 0.000000
+ *MESH_TVERT 494 0.763825 0.775007 0.000000
+ *MESH_TVERT 495 0.763825 0.775007 0.000000
+ *MESH_TVERT 496 0.763298 0.718002 0.000000
+ *MESH_TVERT 497 0.554630 0.719720 0.000000
+ *MESH_TVERT 498 0.368708 0.743612 0.000000
+ *MESH_TVERT 499 0.384932 0.757965 0.000000
+ *MESH_TVERT 500 0.397470 0.734371 0.000000
+ *MESH_TVERT 501 0.318282 0.752519 0.000000
+ *MESH_TVERT 502 0.334731 0.742893 0.000000
+ *MESH_TVERT 503 0.304203 0.738777 0.000000
+ *MESH_TVERT 504 0.311260 0.766564 0.000000
+ *MESH_TVERT 505 0.318282 0.752519 0.000000
+ *MESH_TVERT 506 0.304203 0.738777 0.000000
+ *MESH_TVERT 507 0.304203 0.738777 0.000000
+ *MESH_TVERT 508 0.312740 0.781538 0.000000
+ *MESH_TVERT 509 0.311260 0.766564 0.000000
+ *MESH_TVERT 510 0.304203 0.738777 0.000000
+ *MESH_TVERT 511 0.304755 0.807468 0.000000
+ *MESH_TVERT 512 0.312740 0.781538 0.000000
+ *MESH_TVERT 513 0.321748 0.788956 0.000000
+ *MESH_TVERT 514 0.312740 0.781538 0.000000
+ *MESH_TVERT 515 0.304755 0.807468 0.000000
+ *MESH_TVERT 516 0.321748 0.788956 0.000000
+ *MESH_TVERT 517 0.304755 0.807468 0.000000
+ *MESH_TVERT 518 0.398139 0.806700 0.000000
+ *MESH_TVERT 519 0.398139 0.806700 0.000000
+ *MESH_TVERT 520 0.391922 0.788878 0.000000
+ *MESH_TVERT 521 0.321748 0.788956 0.000000
+ *MESH_TVERT 522 0.304203 0.738777 0.000000
+ *MESH_TVERT 523 0.334731 0.742893 0.000000
+ *MESH_TVERT 524 0.368708 0.743612 0.000000
+ *MESH_TVERT 525 0.368708 0.743612 0.000000
+ *MESH_TVERT 526 0.397470 0.734371 0.000000
+ *MESH_TVERT 527 0.304203 0.738777 0.000000
+ *MESH_TVERT 528 0.384932 0.757965 0.000000
+ *MESH_TVERT 529 0.391770 0.772395 0.000000
+ *MESH_TVERT 530 0.397470 0.734371 0.000000
+ *MESH_TVERT 531 0.391770 0.772395 0.000000
+ *MESH_TVERT 532 0.391922 0.788878 0.000000
+ *MESH_TVERT 533 0.398139 0.806700 0.000000
+ *MESH_TVERT 534 0.398139 0.806700 0.000000
+ *MESH_TVERT 535 0.397470 0.734371 0.000000
+ *MESH_TVERT 536 0.391770 0.772395 0.000000
+ *MESH_TVERT 537 0.397693 0.758538 0.000000
+ *MESH_TVERT 538 0.540085 0.776849 0.000000
+ *MESH_TVERT 539 0.459535 0.733859 0.000000
+ *MESH_TVERT 540 0.459535 0.733859 0.000000
+ *MESH_TVERT 541 0.397470 0.734370 0.000000
+ *MESH_TVERT 542 0.397693 0.758538 0.000000
+ *MESH_TVERT 543 0.052713 0.800658 0.000000
+ *MESH_TVERT 544 0.032919 0.826947 0.000000
+ *MESH_TVERT 545 0.532265 0.834033 0.000000
+ *MESH_TVERT 546 0.532265 0.834033 0.000000
+ *MESH_TVERT 547 0.216328 0.797444 0.000000
+ *MESH_TVERT 548 0.052713 0.800658 0.000000
+ *MESH_TVERT 549 0.304120 0.738781 0.000000
+ *MESH_TVERT 550 0.224141 0.739529 0.000000
+ *MESH_TVERT 551 0.241200 0.778578 0.000000
+ *MESH_TVERT 552 0.304120 0.738781 0.000000
+ *MESH_TVERT 553 0.273921 0.705528 0.000000
+ *MESH_TVERT 554 0.224141 0.739529 0.000000
+ *MESH_TVERT 555 0.501088 0.712989 0.000000
+ *MESH_TVERT 556 0.500587 0.658875 0.000000
+ *MESH_TVERT 557 0.458844 0.659218 0.000000
+ *MESH_TVERT 558 0.458844 0.659218 0.000000
+ *MESH_TVERT 559 0.459535 0.733859 0.000000
+ *MESH_TVERT 560 0.501088 0.712989 0.000000
+ *MESH_TVERT 561 0.532265 0.834033 0.000000
+ *MESH_TVERT 562 0.398139 0.806700 0.000000
+ *MESH_TVERT 563 0.304755 0.807469 0.000000
+ *MESH_TVERT 564 0.540085 0.776849 0.000000
+ *MESH_TVERT 565 0.501088 0.712989 0.000000
+ *MESH_TVERT 566 0.459535 0.733859 0.000000
+ *MESH_TVERT 567 0.263385 0.649630 0.000000
+ *MESH_TVERT 568 0.196752 0.666974 0.000000
+ *MESH_TVERT 569 0.273921 0.705528 0.000000
+ *MESH_TVERT 570 0.196752 0.666974 0.000000
+ *MESH_TVERT 571 0.193724 0.700590 0.000000
+ *MESH_TVERT 572 0.273921 0.705528 0.000000
+ *MESH_TVERT 573 0.193724 0.700590 0.000000
+ *MESH_TVERT 574 0.224141 0.739529 0.000000
+ *MESH_TVERT 575 0.273921 0.705528 0.000000
+ *MESH_TVERT 576 0.263385 0.649630 0.000000
+ *MESH_TVERT 577 0.241489 0.629283 0.000000
+ *MESH_TVERT 578 0.196752 0.666974 0.000000
+ *MESH_TVERT 579 0.763232 0.710831 0.000000
+ *MESH_TVERT 580 0.554630 0.719720 0.000000
+ *MESH_TVERT 581 0.763298 0.718002 0.000000
+ *MESH_TVERT 582 0.763232 0.710831 0.000000
+ *MESH_TVERT 583 0.554563 0.712549 0.000000
+ *MESH_TVERT 584 0.554630 0.719720 0.000000
+ *MESH_TVERT 585 0.554563 0.712549 0.000000
+ *MESH_TVERT 586 0.554630 0.719720 0.000000
+ *MESH_TVERT 587 0.554563 0.712549 0.000000
+ *MESH_TVERT 588 0.554564 0.712549 0.000000
+ *MESH_TVERT 589 0.554630 0.719721 0.000000
+ *MESH_TVERT 590 0.554563 0.712549 0.000000
+ *MESH_TVERT 591 0.763232 0.710831 0.000000
+ *MESH_TVERT 592 0.554630 0.719721 0.000000
+ *MESH_TVERT 593 0.554564 0.712549 0.000000
+ *MESH_TVERT 594 0.763232 0.710831 0.000000
+ *MESH_TVERT 595 0.763298 0.718003 0.000000
+ *MESH_TVERT 596 0.554630 0.719721 0.000000
+ *MESH_TVERT 597 0.554564 0.712549 0.000000
+ *MESH_TVERT 598 0.763232 0.710831 0.000000
+ *MESH_TVERT 599 0.763232 0.710831 0.000000
+ *MESH_TVERT 600 0.554564 0.712549 0.000000
+ *MESH_TVERT 601 0.554563 0.712549 0.000000
+ *MESH_TVERT 602 0.763232 0.710831 0.000000
+ *MESH_TVERT 603 0.554564 0.712549 0.000000
+ *MESH_TVERT 604 0.501088 0.712989 0.000000
+ *MESH_TVERT 605 0.554563 0.712549 0.000000
+ *MESH_TVERT 606 0.554564 0.712549 0.000000
+ *MESH_TVERT 607 0.554563 0.712549 0.000000
+ *MESH_TVERT 608 0.501088 0.712989 0.000000
+ *MESH_TVERT 609 0.459535 0.733859 0.000000
+ *MESH_TVERT 610 0.397470 0.734370 0.000000
+ *MESH_TVERT 611 0.397470 0.734371 0.000000
+ *MESH_TVERT 612 0.397470 0.734371 0.000000
+ *MESH_TVERT 613 0.397470 0.734370 0.000000
+ *MESH_TVERT 614 0.459535 0.733859 0.000000
+ *MESH_TVERT 615 0.304755 0.807469 0.000000
+ *MESH_TVERT 616 0.216328 0.797444 0.000000
+ *MESH_TVERT 617 0.532265 0.834033 0.000000
+ *MESH_TVERT 618 0.397693 0.758538 0.000000
+ *MESH_TVERT 619 0.398139 0.806700 0.000000
+ *MESH_TVERT 620 0.398139 0.806700 0.000000
+ *MESH_TVERT 621 0.397693 0.758538 0.000000
+ *MESH_TVERT 622 0.397470 0.734371 0.000000
+ *MESH_TVERT 623 0.398139 0.806700 0.000000
+ *MESH_TVERT 624 0.397693 0.758538 0.000000
+ *MESH_TVERT 625 0.397470 0.734370 0.000000
+ *MESH_TVERT 626 0.397470 0.734371 0.000000
+ *MESH_TVERT 627 0.398139 0.806700 0.000000
+ *MESH_TVERT 628 0.304755 0.807468 0.000000
+ *MESH_TVERT 629 0.304755 0.807469 0.000000
+ *MESH_TVERT 630 0.398139 0.806700 0.000000
+ *MESH_TVERT 631 0.398139 0.806700 0.000000
+ *MESH_TVERT 632 0.304755 0.807468 0.000000
+ *MESH_TVERT 633 0.304203 0.738777 0.000000
+ *MESH_TVERT 634 0.304755 0.807469 0.000000
+ *MESH_TVERT 635 0.304755 0.807468 0.000000
+ *MESH_TVERT 636 0.304203 0.738777 0.000000
+ *MESH_TVERT 637 0.304120 0.738781 0.000000
+ *MESH_TVERT 638 0.304755 0.807469 0.000000
+ *MESH_TVERT 639 0.334731 0.742893 0.000000
+ *MESH_TVERT 640 0.318282 0.752519 0.000000
+ *MESH_TVERT 641 0.318282 0.752519 0.000000
+ *MESH_TVERT 642 0.318282 0.752519 0.000000
+ *MESH_TVERT 643 0.334731 0.742893 0.000000
+ *MESH_TVERT 644 0.334731 0.742893 0.000000
+ *MESH_TVERT 645 0.311260 0.766564 0.000000
+ *MESH_TVERT 646 0.312740 0.781538 0.000000
+ *MESH_TVERT 647 0.312740 0.781538 0.000000
+ *MESH_TVERT 648 0.312740 0.781538 0.000000
+ *MESH_TVERT 649 0.311260 0.766564 0.000000
+ *MESH_TVERT 650 0.311260 0.766564 0.000000
+ *MESH_TVERT 651 0.321748 0.788956 0.000000
+ *MESH_TVERT 652 0.391922 0.788878 0.000000
+ *MESH_TVERT 653 0.391922 0.788878 0.000000
+ *MESH_TVERT 654 0.391922 0.788878 0.000000
+ *MESH_TVERT 655 0.321748 0.788956 0.000000
+ *MESH_TVERT 656 0.321748 0.788956 0.000000
+ *MESH_TVERT 657 0.391770 0.772395 0.000000
+ *MESH_TVERT 658 0.384932 0.757965 0.000000
+ *MESH_TVERT 659 0.384932 0.757965 0.000000
+ *MESH_TVERT 660 0.384932 0.757965 0.000000
+ *MESH_TVERT 661 0.391770 0.772395 0.000000
+ *MESH_TVERT 662 0.391770 0.772395 0.000000
+ *MESH_TVERT 663 0.273921 0.705528 0.000000
+ *MESH_TVERT 664 0.304120 0.738781 0.000000
+ *MESH_TVERT 665 0.304203 0.738777 0.000000
+ *MESH_TVERT 666 0.304203 0.738777 0.000000
+ *MESH_TVERT 667 0.304203 0.738777 0.000000
+ *MESH_TVERT 668 0.273921 0.705528 0.000000
+ *MESH_TVERT 669 0.304203 0.738777 0.000000
+ *MESH_TVERT 670 0.304120 0.738781 0.000000
+ *MESH_TVERT 671 0.273921 0.705528 0.000000
+ *MESH_TVERT 672 0.273921 0.705528 0.000000
+ *MESH_TVERT 673 0.273921 0.705528 0.000000
+ *MESH_TVERT 674 0.304203 0.738777 0.000000
+ *MESH_TVERT 675 0.398139 0.806700 0.000000
+ *MESH_TVERT 676 0.398139 0.806700 0.000000
+ *MESH_TVERT 677 0.304755 0.807469 0.000000
+ *MESH_TVERT 678 0.304755 0.807469 0.000000
+ *MESH_TVERT 679 0.304755 0.807468 0.000000
+ *MESH_TVERT 680 0.398139 0.806700 0.000000
+ *MESH_TVERT 681 0.304755 0.807468 0.000000
+ *MESH_TVERT 682 0.304120 0.738781 0.000000
+ *MESH_TVERT 683 0.304203 0.738777 0.000000
+ *MESH_TVERT 684 0.304755 0.807468 0.000000
+ *MESH_TVERT 685 0.304388 0.767743 0.000000
+ *MESH_TVERT 686 0.304120 0.738781 0.000000
+ *MESH_TVERT 687 0.304755 0.807468 0.000000
+ *MESH_TVERT 688 0.304528 0.782893 0.000000
+ *MESH_TVERT 689 0.304388 0.767743 0.000000
+ *MESH_TVERT 690 0.304755 0.807468 0.000000
+ *MESH_TVERT 691 0.304755 0.807469 0.000000
+ *MESH_TVERT 692 0.304528 0.782893 0.000000
+ *MESH_TVERT 693 0.397470 0.734370 0.000000
+ *MESH_TVERT 694 0.398139 0.806700 0.000000
+ *MESH_TVERT 695 0.398139 0.806700 0.000000
+ *MESH_TVERT 696 0.397470 0.734370 0.000000
+ *MESH_TVERT 697 0.397992 0.790831 0.000000
+ *MESH_TVERT 698 0.398139 0.806700 0.000000
+ *MESH_TVERT 699 0.397470 0.734370 0.000000
+ *MESH_TVERT 700 0.397846 0.775061 0.000000
+ *MESH_TVERT 701 0.397992 0.790831 0.000000
+ *MESH_TVERT 702 0.397470 0.734370 0.000000
+ *MESH_TVERT 703 0.397749 0.764583 0.000000
+ *MESH_TVERT 704 0.397846 0.775061 0.000000
+ *MESH_TVERT 705 0.397470 0.734370 0.000000
+ *MESH_TVERT 706 0.397470 0.734370 0.000000
+ *MESH_TVERT 707 0.397749 0.764583 0.000000
+ *MESH_TVERT 708 0.334731 0.742893 0.000000
+ *MESH_TVERT 709 0.368780 0.743613 0.000000
+ *MESH_TVERT 710 0.368708 0.743612 0.000000
+ *MESH_TVERT 711 0.368708 0.743612 0.000000
+ *MESH_TVERT 712 0.334731 0.742893 0.000000
+ *MESH_TVERT 713 0.334731 0.742893 0.000000
+ *MESH_TVERT 714 0.397470 0.734370 0.000000
+ *MESH_TVERT 715 0.459535 0.733859 0.000000
+ *MESH_TVERT 716 0.459535 0.733859 0.000000
+ *MESH_TVERT 717 0.459535 0.733859 0.000000
+ *MESH_TVERT 718 0.397470 0.734370 0.000000
+ *MESH_TVERT 719 0.397470 0.734370 0.000000
+ *MESH_TVERT 720 0.304203 0.738777 0.000000
+ *MESH_TVERT 721 0.397470 0.734371 0.000000
+ *MESH_TVERT 722 0.397470 0.734370 0.000000
+ *MESH_TVERT 723 0.397470 0.734370 0.000000
+ *MESH_TVERT 724 0.304203 0.738777 0.000000
+ *MESH_TVERT 725 0.304203 0.738777 0.000000
+ *MESH_TVERT 726 0.311260 0.766564 0.000000
+ *MESH_TVERT 727 0.311260 0.766564 0.000000
+ *MESH_TVERT 728 0.318282 0.752519 0.000000
+ *MESH_TVERT 729 0.318282 0.752519 0.000000
+ *MESH_TVERT 730 0.318282 0.752519 0.000000
+ *MESH_TVERT 731 0.311260 0.766564 0.000000
+ *MESH_TVERT 732 0.321748 0.788956 0.000000
+ *MESH_TVERT 733 0.321748 0.788956 0.000000
+ *MESH_TVERT 734 0.312740 0.781538 0.000000
+ *MESH_TVERT 735 0.312740 0.781538 0.000000
+ *MESH_TVERT 736 0.312740 0.781538 0.000000
+ *MESH_TVERT 737 0.321748 0.788956 0.000000
+ *MESH_TVERT 738 0.391770 0.772395 0.000000
+ *MESH_TVERT 739 0.391770 0.772395 0.000000
+ *MESH_TVERT 740 0.391922 0.788878 0.000000
+ *MESH_TVERT 741 0.391922 0.788878 0.000000
+ *MESH_TVERT 742 0.391922 0.788878 0.000000
+ *MESH_TVERT 743 0.391770 0.772395 0.000000
+ *MESH_TVERT 744 0.368708 0.743612 0.000000
+ *MESH_TVERT 745 0.368780 0.743613 0.000000
+ *MESH_TVERT 746 0.384932 0.757965 0.000000
+ *MESH_TVERT 747 0.384932 0.757965 0.000000
+ *MESH_TVERT 748 0.384932 0.757965 0.000000
+ *MESH_TVERT 749 0.368708 0.743612 0.000000
+ *MESH_TVERT 750 0.540406 0.811572 0.000000
+ *MESH_TVERT 751 0.532265 0.834033 0.000000
+ *MESH_TVERT 752 0.532265 0.834033 0.000000
+ *MESH_TVERT 753 0.532265 0.834033 0.000000
+ *MESH_TVERT 754 0.540406 0.811572 0.000000
+ *MESH_TVERT 755 0.540406 0.811572 0.000000
+ *MESH_TVERT 756 0.554563 0.712549 0.000000
+ *MESH_TVERT 757 0.501088 0.712989 0.000000
+ *MESH_TVERT 758 0.501088 0.712989 0.000000
+ *MESH_TVERT 759 0.501088 0.712989 0.000000
+ *MESH_TVERT 760 0.554563 0.712549 0.000000
+ *MESH_TVERT 761 0.554563 0.712549 0.000000
+ *MESH_TVERT 762 0.500587 0.658875 0.000000
+ *MESH_TVERT 763 0.501088 0.712989 0.000000
+ *MESH_TVERT 764 0.501088 0.712989 0.000000
+ *MESH_TVERT 765 0.501088 0.712989 0.000000
+ *MESH_TVERT 766 0.500587 0.658875 0.000000
+ *MESH_TVERT 767 0.500587 0.658875 0.000000
+ *MESH_TVERT 768 0.459535 0.733859 0.000000
+ *MESH_TVERT 769 0.458844 0.659218 0.000000
+ *MESH_TVERT 770 0.458844 0.659218 0.000000
+ *MESH_TVERT 771 0.458844 0.659218 0.000000
+ *MESH_TVERT 772 0.459535 0.733859 0.000000
+ *MESH_TVERT 773 0.459535 0.733859 0.000000
+ *MESH_TVERT 774 0.263385 0.649630 0.000000
+ *MESH_TVERT 775 0.273921 0.705528 0.000000
+ *MESH_TVERT 776 0.273921 0.705528 0.000000
+ *MESH_TVERT 777 0.273921 0.705528 0.000000
+ *MESH_TVERT 778 0.263385 0.649630 0.000000
+ *MESH_TVERT 779 0.263385 0.649630 0.000000
+ *MESH_TVERT 780 0.241489 0.629283 0.000000
+ *MESH_TVERT 781 0.263385 0.649630 0.000000
+ *MESH_TVERT 782 0.263385 0.649630 0.000000
+ *MESH_TVERT 783 0.263385 0.649630 0.000000
+ *MESH_TVERT 784 0.241489 0.629283 0.000000
+ *MESH_TVERT 785 0.241489 0.629283 0.000000
+ *MESH_TVERT 786 0.196752 0.666974 0.000000
+ *MESH_TVERT 787 0.241489 0.629283 0.000000
+ *MESH_TVERT 788 0.241489 0.629283 0.000000
+ *MESH_TVERT 789 0.241489 0.629283 0.000000
+ *MESH_TVERT 790 0.196752 0.666974 0.000000
+ *MESH_TVERT 791 0.196752 0.666974 0.000000
+ *MESH_TVERT 792 0.193724 0.700590 0.000000
+ *MESH_TVERT 793 0.196752 0.666974 0.000000
+ *MESH_TVERT 794 0.196752 0.666974 0.000000
+ *MESH_TVERT 795 0.196752 0.666974 0.000000
+ *MESH_TVERT 796 0.193724 0.700590 0.000000
+ *MESH_TVERT 797 0.193724 0.700590 0.000000
+ *MESH_TVERT 798 0.224141 0.739529 0.000000
+ *MESH_TVERT 799 0.193724 0.700590 0.000000
+ *MESH_TVERT 800 0.193724 0.700590 0.000000
+ *MESH_TVERT 801 0.193724 0.700590 0.000000
+ *MESH_TVERT 802 0.224141 0.739529 0.000000
+ *MESH_TVERT 803 0.224141 0.739529 0.000000
+ *MESH_TVERT 804 0.241200 0.778578 0.000000
+ *MESH_TVERT 805 0.224141 0.739529 0.000000
+ *MESH_TVERT 806 0.224141 0.739529 0.000000
+ *MESH_TVERT 807 0.224141 0.739529 0.000000
+ *MESH_TVERT 808 0.241200 0.778578 0.000000
+ *MESH_TVERT 809 0.241200 0.778578 0.000000
+ *MESH_TVERT 810 0.216328 0.797444 0.000000
+ *MESH_TVERT 811 0.241200 0.778578 0.000000
+ *MESH_TVERT 812 0.241200 0.778578 0.000000
+ *MESH_TVERT 813 0.241200 0.778578 0.000000
+ *MESH_TVERT 814 0.216328 0.797444 0.000000
+ *MESH_TVERT 815 0.216328 0.797444 0.000000
+ *MESH_TVERT 816 0.052713 0.800658 0.000000
+ *MESH_TVERT 817 0.216328 0.797444 0.000000
+ *MESH_TVERT 818 0.216328 0.797444 0.000000
+ *MESH_TVERT 819 0.216328 0.797444 0.000000
+ *MESH_TVERT 820 0.052713 0.800658 0.000000
+ *MESH_TVERT 821 0.052713 0.800658 0.000000
+ *MESH_TVERT 822 0.032919 0.826947 0.000000
+ *MESH_TVERT 823 0.052713 0.800658 0.000000
+ *MESH_TVERT 824 0.052713 0.800658 0.000000
+ *MESH_TVERT 825 0.052713 0.800658 0.000000
+ *MESH_TVERT 826 0.032919 0.826947 0.000000
+ *MESH_TVERT 827 0.032919 0.826947 0.000000
+ *MESH_TVERT 828 0.154589 0.415011 0.000000
+ *MESH_TVERT 829 0.272167 0.350212 0.000000
+ *MESH_TVERT 830 0.290356 0.415011 0.000000
+ *MESH_TVERT 831 0.154589 0.415011 0.000000
+ *MESH_TVERT 832 0.222473 0.302776 0.000000
+ *MESH_TVERT 833 0.272167 0.350212 0.000000
+ *MESH_TVERT 834 0.154589 0.415011 0.000000
+ *MESH_TVERT 835 0.154589 0.285413 0.000000
+ *MESH_TVERT 836 0.222473 0.302776 0.000000
+ *MESH_TVERT 837 0.154589 0.415011 0.000000
+ *MESH_TVERT 838 0.086706 0.302776 0.000000
+ *MESH_TVERT 839 0.154589 0.285413 0.000000
+ *MESH_TVERT 840 0.154589 0.415011 0.000000
+ *MESH_TVERT 841 0.037012 0.350212 0.000000
+ *MESH_TVERT 842 0.086706 0.302776 0.000000
+ *MESH_TVERT 843 0.154589 0.415011 0.000000
+ *MESH_TVERT 844 0.018822 0.415011 0.000000
+ *MESH_TVERT 845 0.037012 0.350212 0.000000
+ *MESH_TVERT 846 0.154589 0.415011 0.000000
+ *MESH_TVERT 847 0.037012 0.479810 0.000000
+ *MESH_TVERT 848 0.018822 0.415011 0.000000
+ *MESH_TVERT 849 0.154589 0.415011 0.000000
+ *MESH_TVERT 850 0.086706 0.527245 0.000000
+ *MESH_TVERT 851 0.037012 0.479810 0.000000
+ *MESH_TVERT 852 0.154589 0.415011 0.000000
+ *MESH_TVERT 853 0.154589 0.544609 0.000000
+ *MESH_TVERT 854 0.086706 0.527245 0.000000
+ *MESH_TVERT 855 0.154589 0.415011 0.000000
+ *MESH_TVERT 856 0.222473 0.527245 0.000000
+ *MESH_TVERT 857 0.154589 0.544609 0.000000
+ *MESH_TVERT 858 0.154589 0.415011 0.000000
+ *MESH_TVERT 859 0.272167 0.479810 0.000000
+ *MESH_TVERT 860 0.222473 0.527245 0.000000
+ *MESH_TVERT 861 0.154589 0.415011 0.000000
+ *MESH_TVERT 862 0.290356 0.415011 0.000000
+ *MESH_TVERT 863 0.272167 0.479810 0.000000
+ *MESH_TVERT 864 0.961726 0.865950 0.000000
+ *MESH_TVERT 865 0.961776 0.871327 0.000000
+ *MESH_TVERT 866 0.980781 0.871170 0.000000
+ *MESH_TVERT 867 0.961726 0.865950 0.000000
+ *MESH_TVERT 868 0.980781 0.871170 0.000000
+ *MESH_TVERT 869 0.980732 0.865793 0.000000
+ *MESH_TVERT 870 0.961690 0.862014 0.000000
+ *MESH_TVERT 871 0.961726 0.865950 0.000000
+ *MESH_TVERT 872 0.980732 0.865793 0.000000
+ *MESH_TVERT 873 0.961690 0.862014 0.000000
+ *MESH_TVERT 874 0.980732 0.865793 0.000000
+ *MESH_TVERT 875 0.980695 0.861857 0.000000
+ *MESH_TVERT 876 0.961676 0.860573 0.000000
+ *MESH_TVERT 877 0.961690 0.862014 0.000000
+ *MESH_TVERT 878 0.980695 0.861857 0.000000
+ *MESH_TVERT 879 0.961676 0.860573 0.000000
+ *MESH_TVERT 880 0.980695 0.861857 0.000000
+ *MESH_TVERT 881 0.980682 0.860417 0.000000
+ *MESH_TVERT 882 0.961690 0.862014 0.000000
+ *MESH_TVERT 883 0.961676 0.860573 0.000000
+ *MESH_TVERT 884 0.980682 0.860417 0.000000
+ *MESH_TVERT 885 0.961690 0.862014 0.000000
+ *MESH_TVERT 886 0.980682 0.860417 0.000000
+ *MESH_TVERT 887 0.980695 0.861857 0.000000
+ *MESH_TVERT 888 0.961726 0.865950 0.000000
+ *MESH_TVERT 889 0.961690 0.862014 0.000000
+ *MESH_TVERT 890 0.980695 0.861857 0.000000
+ *MESH_TVERT 891 0.961726 0.865950 0.000000
+ *MESH_TVERT 892 0.980695 0.861857 0.000000
+ *MESH_TVERT 893 0.980732 0.865793 0.000000
+ *MESH_TVERT 894 0.961776 0.871327 0.000000
+ *MESH_TVERT 895 0.961726 0.865950 0.000000
+ *MESH_TVERT 896 0.980732 0.865793 0.000000
+ *MESH_TVERT 897 0.961776 0.871327 0.000000
+ *MESH_TVERT 898 0.980732 0.865793 0.000000
+ *MESH_TVERT 899 0.980781 0.871170 0.000000
+ *MESH_TVERT 900 0.961826 0.876703 0.000000
+ *MESH_TVERT 901 0.961776 0.871327 0.000000
+ *MESH_TVERT 902 0.980781 0.871170 0.000000
+ *MESH_TVERT 903 0.961826 0.876703 0.000000
+ *MESH_TVERT 904 0.980781 0.871170 0.000000
+ *MESH_TVERT 905 0.980831 0.876547 0.000000
+ *MESH_TVERT 906 0.961862 0.880640 0.000000
+ *MESH_TVERT 907 0.961826 0.876703 0.000000
+ *MESH_TVERT 908 0.980831 0.876547 0.000000
+ *MESH_TVERT 909 0.961862 0.880640 0.000000
+ *MESH_TVERT 910 0.980831 0.876547 0.000000
+ *MESH_TVERT 911 0.980868 0.880483 0.000000
+ *MESH_TVERT 912 0.961875 0.882080 0.000000
+ *MESH_TVERT 913 0.961862 0.880640 0.000000
+ *MESH_TVERT 914 0.980868 0.880483 0.000000
+ *MESH_TVERT 915 0.961875 0.882080 0.000000
+ *MESH_TVERT 916 0.980868 0.880483 0.000000
+ *MESH_TVERT 917 0.980881 0.881924 0.000000
+ *MESH_TVERT 918 0.961862 0.880639 0.000000
+ *MESH_TVERT 919 0.961875 0.882080 0.000000
+ *MESH_TVERT 920 0.980881 0.881924 0.000000
+ *MESH_TVERT 921 0.961862 0.880639 0.000000
+ *MESH_TVERT 922 0.980881 0.881924 0.000000
+ *MESH_TVERT 923 0.980868 0.880483 0.000000
+ *MESH_TVERT 924 0.961826 0.876703 0.000000
+ *MESH_TVERT 925 0.961862 0.880639 0.000000
+ *MESH_TVERT 926 0.980868 0.880483 0.000000
+ *MESH_TVERT 927 0.961826 0.876703 0.000000
+ *MESH_TVERT 928 0.980868 0.880483 0.000000
+ *MESH_TVERT 929 0.980831 0.876547 0.000000
+ *MESH_TVERT 930 0.961776 0.871327 0.000000
+ *MESH_TVERT 931 0.961826 0.876703 0.000000
+ *MESH_TVERT 932 0.980831 0.876547 0.000000
+ *MESH_TVERT 933 0.961776 0.871327 0.000000
+ *MESH_TVERT 934 0.980831 0.876547 0.000000
+ *MESH_TVERT 935 0.980781 0.871170 0.000000
+ *MESH_TVERT 936 0.960643 0.847390 0.000000
+ *MESH_TVERT 937 0.774362 0.828284 0.000000
+ *MESH_TVERT 938 0.980525 0.806358 0.000000
+ *MESH_TVERT 939 0.960643 0.847390 0.000000
+ *MESH_TVERT 940 0.745627 0.828521 0.000000
+ *MESH_TVERT 941 0.774362 0.828284 0.000000
+ *MESH_TVERT 942 0.960643 0.847390 0.000000
+ *MESH_TVERT 943 0.734025 0.849255 0.000000
+ *MESH_TVERT 944 0.745627 0.828521 0.000000
+ *MESH_TVERT 945 0.774362 0.828284 0.000000
+ *MESH_TVERT 946 0.801023 0.807836 0.000000
+ *MESH_TVERT 947 0.980525 0.806358 0.000000
+ *MESH_TVERT 948 0.960643 0.847390 0.000000
+ *MESH_TVERT 949 0.980525 0.806358 0.000000
+ *MESH_TVERT 950 0.774362 0.828284 0.000000
+ *MESH_TVERT 951 0.960643 0.847390 0.000000
+ *MESH_TVERT 952 0.774362 0.828284 0.000000
+ *MESH_TVERT 953 0.745627 0.828521 0.000000
+ *MESH_TVERT 954 0.960643 0.847390 0.000000
+ *MESH_TVERT 955 0.745627 0.828521 0.000000
+ *MESH_TVERT 956 0.734025 0.849255 0.000000
+ *MESH_TVERT 957 0.774362 0.828284 0.000000
+ *MESH_TVERT 958 0.980525 0.806358 0.000000
+ *MESH_TVERT 959 0.801023 0.807836 0.000000
+ *MESH_TVERT 960 0.454453 0.024995 0.000000
+ *MESH_TVERT 961 0.354429 0.140359 0.000000
+ *MESH_TVERT 962 0.323324 0.024995 0.000000
+ *MESH_TVERT 963 0.454453 0.024995 0.000000
+ *MESH_TVERT 964 0.423349 0.140359 0.000000
+ *MESH_TVERT 965 0.354429 0.140359 0.000000
+ *MESH_TVERT 966 0.774362 0.828284 0.000000
+ *MESH_TVERT 967 0.801023 0.807836 0.000000
+ *MESH_TVERT 968 0.774362 0.828284 0.000000
+ *MESH_TVERT 969 0.774362 0.828284 0.000000
+ *MESH_TVERT 970 0.801023 0.807836 0.000000
+ *MESH_TVERT 971 0.801023 0.807836 0.000000
+ *MESH_TVERT 972 0.745627 0.828521 0.000000
+ *MESH_TVERT 973 0.774362 0.828284 0.000000
+ *MESH_TVERT 974 0.745627 0.828521 0.000000
+ *MESH_TVERT 975 0.745627 0.828521 0.000000
+ *MESH_TVERT 976 0.774362 0.828284 0.000000
+ *MESH_TVERT 977 0.774362 0.828284 0.000000
+ *MESH_TVERT 978 0.687424 0.797342 0.000000
+ *MESH_TVERT 979 0.672095 0.831296 0.000000
+ *MESH_TVERT 980 0.672095 0.831296 0.000000
+ *MESH_TVERT 981 0.672095 0.831296 0.000000
+ *MESH_TVERT 982 0.687424 0.797342 0.000000
+ *MESH_TVERT 983 0.687424 0.797342 0.000000
+ *MESH_TVERT 984 0.741530 0.830724 0.000000
+ *MESH_TVERT 985 0.725575 0.797028 0.000000
+ *MESH_TVERT 986 0.725575 0.797028 0.000000
+ *MESH_TVERT 987 0.725575 0.797028 0.000000
+ *MESH_TVERT 988 0.741530 0.830724 0.000000
+ *MESH_TVERT 989 0.741530 0.830724 0.000000
+ *MESH_TVERT 990 0.741530 0.830724 0.000000
+ *MESH_TVERT 991 0.672095 0.831296 0.000000
+ *MESH_TVERT 992 0.687424 0.797342 0.000000
+ *MESH_TVERT 993 0.687424 0.797342 0.000000
+ *MESH_TVERT 994 0.725575 0.797028 0.000000
+ *MESH_TVERT 995 0.741530 0.830724 0.000000
+ *MESH_TVERT 996 0.741530 0.830724 0.000000
+ *MESH_TVERT 997 0.725575 0.797028 0.000000
+ *MESH_TVERT 998 0.687424 0.797342 0.000000
+ *MESH_TVERT 999 0.687424 0.797342 0.000000
+ *MESH_TVERT 1000 0.672095 0.831296 0.000000
+ *MESH_TVERT 1001 0.741530 0.830724 0.000000
+ *MESH_TVERT 1002 0.537198 0.446532 0.000000
+ *MESH_TVERT 1003 0.708799 0.445034 0.000000
+ *MESH_TVERT 1004 0.709157 0.452047 0.000000
+ *MESH_TVERT 1005 0.709157 0.452047 0.000000
+ *MESH_TVERT 1006 0.537145 0.453548 0.000000
+ *MESH_TVERT 1007 0.537198 0.446532 0.000000
+ *MESH_TVERT 1008 0.537145 0.453548 0.000000
+ *MESH_TVERT 1009 0.709157 0.452047 0.000000
+ *MESH_TVERT 1010 0.708799 0.445034 0.000000
+ *MESH_TVERT 1011 0.708799 0.445034 0.000000
+ *MESH_TVERT 1012 0.537198 0.446532 0.000000
+ *MESH_TVERT 1013 0.537145 0.453548 0.000000
+ *MESH_TVERT 1014 0.537198 0.446532 0.000000
+ *MESH_TVERT 1015 0.708799 0.445034 0.000000
+ *MESH_TVERT 1016 0.708799 0.445034 0.000000
+ *MESH_TVERT 1017 0.708799 0.445034 0.000000
+ *MESH_TVERT 1018 0.537198 0.446532 0.000000
+ *MESH_TVERT 1019 0.537198 0.446532 0.000000
+ *MESH_TVERT 1020 0.537145 0.453548 0.000000
+ *MESH_TVERT 1021 0.545496 0.453475 0.000000
+ *MESH_TVERT 1022 0.709157 0.452047 0.000000
+ *MESH_TVERT 1023 0.545496 0.453475 0.000000
+ *MESH_TVERT 1024 0.709157 0.452047 0.000000
+ *MESH_TVERT 1025 0.709157 0.452047 0.000000
+ *MESH_TVERT 1026 0.537145 0.453548 0.000000
+ *MESH_TVERT 1027 0.537145 0.453548 0.000000
+ *MESH_TVERT 1028 0.545496 0.453475 0.000000
+ *MESH_TVERT 1029 0.537198 0.446532 0.000000
+ *MESH_TVERT 1030 0.537145 0.453548 0.000000
+ *MESH_TVERT 1031 0.537145 0.453548 0.000000
+ *MESH_TVERT 1032 0.537198 0.446532 0.000000
+ *MESH_TVERT 1033 0.539797 0.100298 0.000000
+ *MESH_TVERT 1034 0.537145 0.453548 0.000000
+ *MESH_TVERT 1035 0.537198 0.446532 0.000000
+ *MESH_TVERT 1036 0.539797 0.100298 0.000000
+ *MESH_TVERT 1037 0.539797 0.100298 0.000000
+ *MESH_TVERT 1038 0.537198 0.446532 0.000000
+ *MESH_TVERT 1039 0.537198 0.446532 0.000000
+ *MESH_TVERT 1040 0.539797 0.100298 0.000000
+ *MESH_TVERT 1041 0.537198 0.446532 0.000000
+ *MESH_TVERT 1042 0.537145 0.453548 0.000000
+ *MESH_TVERT 1043 0.539797 0.100298 0.000000
+ *MESH_TVERT 1044 0.537198 0.446532 0.000000
+ *MESH_TVERT 1045 0.537145 0.453548 0.000000
+ *MESH_TVERT 1046 0.537145 0.453548 0.000000
+ *MESH_TVERT 1047 0.539797 0.100298 0.000000
+ *MESH_TVERT 1048 0.544608 0.351564 0.000000
+ *MESH_TVERT 1049 0.542419 0.100663 0.000000
+ *MESH_TVERT 1050 0.539797 0.100298 0.000000
+ *MESH_TVERT 1051 0.545368 0.438633 0.000000
+ *MESH_TVERT 1052 0.544608 0.351564 0.000000
+ *MESH_TVERT 1053 0.539797 0.100298 0.000000
+ *MESH_TVERT 1054 0.545458 0.448978 0.000000
+ *MESH_TVERT 1055 0.545368 0.438633 0.000000
+ *MESH_TVERT 1056 0.539797 0.100298 0.000000
+ *MESH_TVERT 1057 0.545498 0.453475 0.000000
+ *MESH_TVERT 1058 0.545458 0.448978 0.000000
+ *MESH_TVERT 1059 0.539797 0.100298 0.000000
+ *MESH_TVERT 1060 0.537145 0.453548 0.000000
+ *MESH_TVERT 1061 0.545498 0.453475 0.000000
+ *MESH_TVERT 1062 0.544608 0.351564 0.000000
+ *MESH_TVERT 1063 0.562761 0.103494 0.000000
+ *MESH_TVERT 1064 0.542419 0.100663 0.000000
+ *MESH_TVERT 1065 0.537145 0.453548 0.000000
+ *MESH_TVERT 1066 0.545457 0.448978 0.000000
+ *MESH_TVERT 1067 0.545496 0.453475 0.000000
+ *MESH_TVERT 1068 0.537145 0.453548 0.000000
+ *MESH_TVERT 1069 0.545367 0.438635 0.000000
+ *MESH_TVERT 1070 0.545457 0.448978 0.000000
+ *MESH_TVERT 1071 0.537145 0.453548 0.000000
+ *MESH_TVERT 1072 0.544607 0.351576 0.000000
+ *MESH_TVERT 1073 0.545367 0.438635 0.000000
+ *MESH_TVERT 1074 0.537145 0.453548 0.000000
+ *MESH_TVERT 1075 0.542418 0.100663 0.000000
+ *MESH_TVERT 1076 0.544607 0.351576 0.000000
+ *MESH_TVERT 1077 0.537145 0.453548 0.000000
+ *MESH_TVERT 1078 0.539797 0.100298 0.000000
+ *MESH_TVERT 1079 0.542418 0.100663 0.000000
+ *MESH_TVERT 1080 0.542418 0.100663 0.000000
+ *MESH_TVERT 1081 0.562761 0.103494 0.000000
+ *MESH_TVERT 1082 0.544607 0.351576 0.000000
+ *MESH_TVERT 1083 0.662694 0.384524 0.000000
+ *MESH_TVERT 1084 0.545496 0.453475 0.000000
+ *MESH_TVERT 1085 0.545457 0.448978 0.000000
+ *MESH_TVERT 1086 0.662694 0.384524 0.000000
+ *MESH_TVERT 1087 0.709157 0.452047 0.000000
+ *MESH_TVERT 1088 0.545496 0.453475 0.000000
+ *MESH_TVERT 1089 0.662694 0.384524 0.000000
+ *MESH_TVERT 1090 0.705697 0.384149 0.000000
+ *MESH_TVERT 1091 0.709157 0.452047 0.000000
+ *MESH_TVERT 1092 0.662694 0.384524 0.000000
+ *MESH_TVERT 1093 0.604883 0.330686 0.000000
+ *MESH_TVERT 1094 0.656516 0.333632 0.000000
+ *MESH_TVERT 1095 0.662694 0.384524 0.000000
+ *MESH_TVERT 1096 0.545367 0.438635 0.000000
+ *MESH_TVERT 1097 0.604883 0.330686 0.000000
+ *MESH_TVERT 1098 0.662694 0.384524 0.000000
+ *MESH_TVERT 1099 0.545457 0.448978 0.000000
+ *MESH_TVERT 1100 0.545367 0.438635 0.000000
+ *MESH_TVERT 1101 0.544607 0.351576 0.000000
+ *MESH_TVERT 1102 0.604883 0.330686 0.000000
+ *MESH_TVERT 1103 0.545367 0.438635 0.000000
+ *MESH_TVERT 1104 0.544607 0.351576 0.000000
+ *MESH_TVERT 1105 0.602927 0.106540 0.000000
+ *MESH_TVERT 1106 0.604883 0.330686 0.000000
+ *MESH_TVERT 1107 0.544607 0.351576 0.000000
+ *MESH_TVERT 1108 0.562761 0.103494 0.000000
+ *MESH_TVERT 1109 0.602927 0.106540 0.000000
+ *MESH_TVERT 1110 0.604883 0.330686 0.000000
+ *MESH_TVERT 1111 0.562761 0.103494 0.000000
+ *MESH_TVERT 1112 0.545368 0.438633 0.000000
+ *MESH_TVERT 1113 0.562761 0.103494 0.000000
+ *MESH_TVERT 1114 0.544608 0.351564 0.000000
+ *MESH_TVERT 1115 0.545368 0.438633 0.000000
+ *MESH_TVERT 1116 0.604883 0.330686 0.000000
+ *MESH_TVERT 1117 0.602927 0.106540 0.000000
+ *MESH_TVERT 1118 0.562761 0.103494 0.000000
+ *MESH_TVERT 1119 0.604883 0.330686 0.000000
+ *MESH_TVERT 1120 0.662694 0.384524 0.000000
+ *MESH_TVERT 1121 0.656516 0.333632 0.000000
+ *MESH_TVERT 1122 0.604883 0.330686 0.000000
+ *MESH_TVERT 1123 0.545458 0.448978 0.000000
+ *MESH_TVERT 1124 0.662694 0.384524 0.000000
+ *MESH_TVERT 1125 0.604883 0.330686 0.000000
+ *MESH_TVERT 1126 0.545368 0.438633 0.000000
+ *MESH_TVERT 1127 0.545458 0.448978 0.000000
+ *MESH_TVERT 1128 0.662694 0.384524 0.000000
+ *MESH_TVERT 1129 0.709157 0.452047 0.000000
+ *MESH_TVERT 1130 0.705697 0.384149 0.000000
+ *MESH_TVERT 1131 0.662694 0.384524 0.000000
+ *MESH_TVERT 1132 0.545498 0.453475 0.000000
+ *MESH_TVERT 1133 0.709157 0.452047 0.000000
+ *MESH_TVERT 1134 0.662694 0.384524 0.000000
+ *MESH_TVERT 1135 0.545458 0.448978 0.000000
+ *MESH_TVERT 1136 0.545498 0.453475 0.000000
+ *MESH_TVERT 1137 0.709157 0.452047 0.000000
+ *MESH_TVERT 1138 0.709157 0.452047 0.000000
+ *MESH_TVERT 1139 0.537145 0.453548 0.000000
+ *MESH_TVERT 1140 0.709157 0.452047 0.000000
+ *MESH_TVERT 1141 0.545498 0.453475 0.000000
+ *MESH_TVERT 1142 0.537145 0.453548 0.000000
+ *MESH_TVERT 1143 0.545498 0.453475 0.000000
+ *MESH_TVERT 1144 0.537145 0.453548 0.000000
+ *MESH_TVERT 1145 0.537145 0.453548 0.000000
+ *MESH_TVERT 1146 0.006532 0.862621 0.000000
+ *MESH_TVERT 1147 0.031577 0.862415 0.000000
+ *MESH_TVERT 1148 0.031577 0.862415 0.000000
+ *MESH_TVERT 1149 0.031577 0.862415 0.000000
+ *MESH_TVERT 1150 0.006532 0.862621 0.000000
+ *MESH_TVERT 1151 0.006532 0.862621 0.000000
+ *MESH_TVERT 1152 0.002933 0.834659 0.000000
+ *MESH_TVERT 1153 0.006532 0.862621 0.000000
+ *MESH_TVERT 1154 0.006532 0.862621 0.000000
+ *MESH_TVERT 1155 0.006532 0.862621 0.000000
+ *MESH_TVERT 1156 0.002933 0.834659 0.000000
+ *MESH_TVERT 1157 0.002933 0.834659 0.000000
+ *MESH_TVERT 1158 0.604883 0.330686 0.000000
+ *MESH_TVERT 1159 0.656516 0.333632 0.000000
+ *MESH_TVERT 1160 0.656516 0.333632 0.000000
+ *MESH_TVERT 1161 0.656516 0.333632 0.000000
+ *MESH_TVERT 1162 0.604883 0.330686 0.000000
+ *MESH_TVERT 1163 0.604883 0.330686 0.000000
+ *MESH_TVERT 1164 0.602927 0.106540 0.000000
+ *MESH_TVERT 1165 0.604883 0.330686 0.000000
+ *MESH_TVERT 1166 0.604883 0.330686 0.000000
+ *MESH_TVERT 1167 0.604883 0.330686 0.000000
+ *MESH_TVERT 1168 0.602927 0.106540 0.000000
+ *MESH_TVERT 1169 0.602927 0.106540 0.000000
+ *MESH_TVERT 1170 0.562761 0.103494 0.000000
+ *MESH_TVERT 1171 0.602927 0.106540 0.000000
+ *MESH_TVERT 1172 0.602927 0.106540 0.000000
+ *MESH_TVERT 1173 0.602927 0.106540 0.000000
+ *MESH_TVERT 1174 0.562761 0.103494 0.000000
+ *MESH_TVERT 1175 0.562761 0.103494 0.000000
+ *MESH_TVERT 1176 0.539797 0.100298 0.000000
+ *MESH_TVERT 1177 0.542418 0.100663 0.000000
+ *MESH_TVERT 1178 0.539797 0.100298 0.000000
+ *MESH_TVERT 1179 0.539797 0.100298 0.000000
+ *MESH_TVERT 1180 0.562761 0.103494 0.000000
+ *MESH_TVERT 1181 0.542418 0.100663 0.000000
+ *MESH_TVERT 1182 0.562761 0.103494 0.000000
+ *MESH_TVERT 1183 0.562761 0.103494 0.000000
+ *MESH_TVERT 1184 0.542418 0.100663 0.000000
+ *MESH_TVERT 1185 0.539797 0.100298 0.000000
+ *MESH_TVERT 1186 0.542419 0.100663 0.000000
+ *MESH_TVERT 1187 0.562761 0.103494 0.000000
+ *MESH_TVERT 1188 0.533788 0.790737 0.000000
+ *MESH_TVERT 1189 0.533653 0.776088 0.000000
+ *MESH_TVERT 1190 0.533788 0.790737 0.000000
+ *MESH_TVERT 1191 0.533788 0.790737 0.000000
+ *MESH_TVERT 1192 0.533553 0.765365 0.000000
+ *MESH_TVERT 1193 0.533653 0.776088 0.000000
+ *MESH_TVERT 1194 0.533788 0.790737 0.000000
+ *MESH_TVERT 1195 0.533517 0.761440 0.000000
+ *MESH_TVERT 1196 0.533553 0.765365 0.000000
+ *MESH_TVERT 1197 0.533788 0.790737 0.000000
+ *MESH_TVERT 1198 0.533554 0.765365 0.000000
+ *MESH_TVERT 1199 0.533517 0.761440 0.000000
+ *MESH_TVERT 1200 0.533788 0.790737 0.000000
+ *MESH_TVERT 1201 0.533653 0.776088 0.000000
+ *MESH_TVERT 1202 0.533554 0.765365 0.000000
+ *MESH_TVERT 1203 0.533788 0.790737 0.000000
+ *MESH_TVERT 1204 0.533788 0.790737 0.000000
+ *MESH_TVERT 1205 0.533653 0.776088 0.000000
+ *MESH_TVERT 1206 0.533788 0.790737 0.000000
+ *MESH_TVERT 1207 0.533924 0.805386 0.000000
+ *MESH_TVERT 1208 0.533788 0.790737 0.000000
+ *MESH_TVERT 1209 0.533788 0.790737 0.000000
+ *MESH_TVERT 1210 0.534023 0.816109 0.000000
+ *MESH_TVERT 1211 0.533924 0.805386 0.000000
+ *MESH_TVERT 1212 0.533788 0.790737 0.000000
+ *MESH_TVERT 1213 0.534059 0.820035 0.000000
+ *MESH_TVERT 1214 0.534023 0.816109 0.000000
+ *MESH_TVERT 1215 0.533788 0.790737 0.000000
+ *MESH_TVERT 1216 0.534023 0.816110 0.000000
+ *MESH_TVERT 1217 0.534059 0.820035 0.000000
+ *MESH_TVERT 1218 0.533788 0.790737 0.000000
+ *MESH_TVERT 1219 0.533924 0.805386 0.000000
+ *MESH_TVERT 1220 0.534023 0.816110 0.000000
+ *MESH_TVERT 1221 0.533788 0.790737 0.000000
+ *MESH_TVERT 1222 0.533788 0.790737 0.000000
+ *MESH_TVERT 1223 0.533924 0.805386 0.000000
+ *MESH_TVERT 1224 0.760532 0.774220 0.000000
+ *MESH_TVERT 1225 0.760667 0.788869 0.000000
+ *MESH_TVERT 1226 0.533788 0.790737 0.000000
+ *MESH_TVERT 1227 0.760532 0.774220 0.000000
+ *MESH_TVERT 1228 0.533788 0.790737 0.000000
+ *MESH_TVERT 1229 0.533653 0.776088 0.000000
+ *MESH_TVERT 1230 0.760433 0.763497 0.000000
+ *MESH_TVERT 1231 0.760532 0.774220 0.000000
+ *MESH_TVERT 1232 0.533653 0.776088 0.000000
+ *MESH_TVERT 1233 0.760433 0.763497 0.000000
+ *MESH_TVERT 1234 0.533653 0.776088 0.000000
+ *MESH_TVERT 1235 0.533553 0.765365 0.000000
+ *MESH_TVERT 1236 0.760397 0.759571 0.000000
+ *MESH_TVERT 1237 0.760433 0.763497 0.000000
+ *MESH_TVERT 1238 0.533553 0.765365 0.000000
+ *MESH_TVERT 1239 0.760397 0.759571 0.000000
+ *MESH_TVERT 1240 0.533553 0.765365 0.000000
+ *MESH_TVERT 1241 0.533517 0.761440 0.000000
+ *MESH_TVERT 1242 0.760433 0.763497 0.000000
+ *MESH_TVERT 1243 0.760397 0.759571 0.000000
+ *MESH_TVERT 1244 0.533517 0.761440 0.000000
+ *MESH_TVERT 1245 0.760433 0.763497 0.000000
+ *MESH_TVERT 1246 0.533517 0.761440 0.000000
+ *MESH_TVERT 1247 0.533554 0.765365 0.000000
+ *MESH_TVERT 1248 0.760532 0.774220 0.000000
+ *MESH_TVERT 1249 0.760433 0.763497 0.000000
+ *MESH_TVERT 1250 0.533554 0.765365 0.000000
+ *MESH_TVERT 1251 0.760532 0.774220 0.000000
+ *MESH_TVERT 1252 0.533554 0.765365 0.000000
+ *MESH_TVERT 1253 0.533653 0.776088 0.000000
+ *MESH_TVERT 1254 0.760667 0.788869 0.000000
+ *MESH_TVERT 1255 0.760532 0.774220 0.000000
+ *MESH_TVERT 1256 0.533653 0.776088 0.000000
+ *MESH_TVERT 1257 0.760667 0.788869 0.000000
+ *MESH_TVERT 1258 0.533653 0.776088 0.000000
+ *MESH_TVERT 1259 0.533788 0.790737 0.000000
+ *MESH_TVERT 1260 0.760803 0.803518 0.000000
+ *MESH_TVERT 1261 0.760667 0.788869 0.000000
+ *MESH_TVERT 1262 0.533788 0.790737 0.000000
+ *MESH_TVERT 1263 0.760803 0.803518 0.000000
+ *MESH_TVERT 1264 0.533788 0.790737 0.000000
+ *MESH_TVERT 1265 0.533924 0.805386 0.000000
+ *MESH_TVERT 1266 0.760902 0.814242 0.000000
+ *MESH_TVERT 1267 0.760803 0.803518 0.000000
+ *MESH_TVERT 1268 0.533924 0.805386 0.000000
+ *MESH_TVERT 1269 0.760902 0.814242 0.000000
+ *MESH_TVERT 1270 0.533924 0.805386 0.000000
+ *MESH_TVERT 1271 0.534023 0.816109 0.000000
+ *MESH_TVERT 1272 0.760938 0.818167 0.000000
+ *MESH_TVERT 1273 0.760902 0.814242 0.000000
+ *MESH_TVERT 1274 0.534023 0.816109 0.000000
+ *MESH_TVERT 1275 0.760938 0.818167 0.000000
+ *MESH_TVERT 1276 0.534023 0.816109 0.000000
+ *MESH_TVERT 1277 0.534059 0.820035 0.000000
+ *MESH_TVERT 1278 0.760902 0.814242 0.000000
+ *MESH_TVERT 1279 0.760938 0.818167 0.000000
+ *MESH_TVERT 1280 0.534059 0.820035 0.000000
+ *MESH_TVERT 1281 0.760902 0.814242 0.000000
+ *MESH_TVERT 1282 0.534059 0.820035 0.000000
+ *MESH_TVERT 1283 0.534023 0.816110 0.000000
+ *MESH_TVERT 1284 0.760803 0.803518 0.000000
+ *MESH_TVERT 1285 0.760902 0.814242 0.000000
+ *MESH_TVERT 1286 0.534023 0.816110 0.000000
+ *MESH_TVERT 1287 0.760803 0.803518 0.000000
+ *MESH_TVERT 1288 0.534023 0.816110 0.000000
+ *MESH_TVERT 1289 0.533924 0.805386 0.000000
+ *MESH_TVERT 1290 0.760667 0.788869 0.000000
+ *MESH_TVERT 1291 0.760803 0.803518 0.000000
+ *MESH_TVERT 1292 0.533924 0.805386 0.000000
+ *MESH_TVERT 1293 0.760667 0.788869 0.000000
+ *MESH_TVERT 1294 0.533924 0.805386 0.000000
+ *MESH_TVERT 1295 0.533788 0.790737 0.000000
+ *MESH_TVERT 1296 0.144927 0.132015 0.000000
+ *MESH_TVERT 1297 0.244809 0.081160 0.000000
+ *MESH_TVERT 1298 0.260261 0.132015 0.000000
+ *MESH_TVERT 1299 0.144927 0.132015 0.000000
+ *MESH_TVERT 1300 0.202594 0.033996 0.000000
+ *MESH_TVERT 1301 0.244809 0.081160 0.000000
+ *MESH_TVERT 1302 0.144927 0.132015 0.000000
+ *MESH_TVERT 1303 0.144928 0.020436 0.000000
+ *MESH_TVERT 1304 0.202594 0.033996 0.000000
+ *MESH_TVERT 1305 0.144927 0.132015 0.000000
+ *MESH_TVERT 1306 0.087261 0.033996 0.000000
+ *MESH_TVERT 1307 0.144928 0.020436 0.000000
+ *MESH_TVERT 1308 0.144927 0.132015 0.000000
+ *MESH_TVERT 1309 0.045046 0.081160 0.000000
+ *MESH_TVERT 1310 0.087261 0.033996 0.000000
+ *MESH_TVERT 1311 0.144927 0.132015 0.000000
+ *MESH_TVERT 1312 0.029594 0.132015 0.000000
+ *MESH_TVERT 1313 0.045046 0.081160 0.000000
+ *MESH_TVERT 1314 0.144927 0.132015 0.000000
+ *MESH_TVERT 1315 0.045046 0.189627 0.000000
+ *MESH_TVERT 1316 0.029594 0.132015 0.000000
+ *MESH_TVERT 1317 0.144927 0.132015 0.000000
+ *MESH_TVERT 1318 0.087261 0.232716 0.000000
+ *MESH_TVERT 1319 0.045046 0.189627 0.000000
+ *MESH_TVERT 1320 0.144927 0.132015 0.000000
+ *MESH_TVERT 1321 0.144927 0.245794 0.000000
+ *MESH_TVERT 1322 0.087261 0.232716 0.000000
+ *MESH_TVERT 1323 0.144927 0.132015 0.000000
+ *MESH_TVERT 1324 0.202594 0.232716 0.000000
+ *MESH_TVERT 1325 0.144927 0.245794 0.000000
+ *MESH_TVERT 1326 0.144927 0.132015 0.000000
+ *MESH_TVERT 1327 0.244809 0.189627 0.000000
+ *MESH_TVERT 1328 0.202594 0.232716 0.000000
+ *MESH_TVERT 1329 0.144927 0.132015 0.000000
+ *MESH_TVERT 1330 0.260261 0.132015 0.000000
+ *MESH_TVERT 1331 0.244809 0.189627 0.000000
+ *MESH_TVERT 1332 0.185459 0.853537 0.000000
+ *MESH_TVERT 1333 0.185576 0.866151 0.000000
+ *MESH_TVERT 1334 0.963510 0.859746 0.000000
+ *MESH_TVERT 1335 0.185459 0.853537 0.000000
+ *MESH_TVERT 1336 0.963510 0.859746 0.000000
+ *MESH_TVERT 1337 0.963394 0.847132 0.000000
+ *MESH_TVERT 1338 0.185351 0.841838 0.000000
+ *MESH_TVERT 1339 0.185459 0.853537 0.000000
+ *MESH_TVERT 1340 0.963394 0.847132 0.000000
+ *MESH_TVERT 1341 0.185351 0.841838 0.000000
+ *MESH_TVERT 1342 0.963394 0.847132 0.000000
+ *MESH_TVERT 1343 0.963285 0.835433 0.000000
+ *MESH_TVERT 1344 0.185320 0.838474 0.000000
+ *MESH_TVERT 1345 0.185351 0.841838 0.000000
+ *MESH_TVERT 1346 0.963285 0.835433 0.000000
+ *MESH_TVERT 1347 0.185320 0.838474 0.000000
+ *MESH_TVERT 1348 0.963285 0.835433 0.000000
+ *MESH_TVERT 1349 0.963254 0.832070 0.000000
+ *MESH_TVERT 1350 0.185351 0.841838 0.000000
+ *MESH_TVERT 1351 0.185320 0.838474 0.000000
+ *MESH_TVERT 1352 0.963254 0.832070 0.000000
+ *MESH_TVERT 1353 0.185351 0.841838 0.000000
+ *MESH_TVERT 1354 0.963254 0.832070 0.000000
+ *MESH_TVERT 1355 0.963285 0.835433 0.000000
+ *MESH_TVERT 1356 0.185459 0.853537 0.000000
+ *MESH_TVERT 1357 0.185351 0.841838 0.000000
+ *MESH_TVERT 1358 0.963285 0.835433 0.000000
+ *MESH_TVERT 1359 0.185459 0.853537 0.000000
+ *MESH_TVERT 1360 0.963285 0.835433 0.000000
+ *MESH_TVERT 1361 0.963394 0.847132 0.000000
+ *MESH_TVERT 1362 0.185576 0.866151 0.000000
+ *MESH_TVERT 1363 0.185459 0.853537 0.000000
+ *MESH_TVERT 1364 0.963394 0.847132 0.000000
+ *MESH_TVERT 1365 0.185576 0.866151 0.000000
+ *MESH_TVERT 1366 0.963394 0.847132 0.000000
+ *MESH_TVERT 1367 0.963510 0.859746 0.000000
+ *MESH_TVERT 1368 0.185708 0.880441 0.000000
+ *MESH_TVERT 1369 0.185576 0.866151 0.000000
+ *MESH_TVERT 1370 0.963510 0.859746 0.000000
+ *MESH_TVERT 1371 0.185708 0.880441 0.000000
+ *MESH_TVERT 1372 0.963510 0.859746 0.000000
+ *MESH_TVERT 1373 0.963642 0.874037 0.000000
+ *MESH_TVERT 1374 0.185807 0.891129 0.000000
+ *MESH_TVERT 1375 0.185708 0.880441 0.000000
+ *MESH_TVERT 1376 0.963642 0.874037 0.000000
+ *MESH_TVERT 1377 0.185807 0.891129 0.000000
+ *MESH_TVERT 1378 0.963642 0.874037 0.000000
+ *MESH_TVERT 1379 0.963741 0.884725 0.000000
+ *MESH_TVERT 1380 0.185837 0.894373 0.000000
+ *MESH_TVERT 1381 0.185807 0.891129 0.000000
+ *MESH_TVERT 1382 0.963741 0.884725 0.000000
+ *MESH_TVERT 1383 0.185837 0.894373 0.000000
+ *MESH_TVERT 1384 0.963741 0.884725 0.000000
+ *MESH_TVERT 1385 0.963771 0.887969 0.000000
+ *MESH_TVERT 1386 0.185807 0.891129 0.000000
+ *MESH_TVERT 1387 0.185837 0.894373 0.000000
+ *MESH_TVERT 1388 0.963771 0.887969 0.000000
+ *MESH_TVERT 1389 0.185807 0.891129 0.000000
+ *MESH_TVERT 1390 0.963771 0.887969 0.000000
+ *MESH_TVERT 1391 0.963741 0.884725 0.000000
+ *MESH_TVERT 1392 0.185708 0.880441 0.000000
+ *MESH_TVERT 1393 0.185807 0.891129 0.000000
+ *MESH_TVERT 1394 0.963741 0.884725 0.000000
+ *MESH_TVERT 1395 0.185708 0.880441 0.000000
+ *MESH_TVERT 1396 0.963741 0.884725 0.000000
+ *MESH_TVERT 1397 0.963642 0.874037 0.000000
+ *MESH_TVERT 1398 0.185576 0.866151 0.000000
+ *MESH_TVERT 1399 0.185708 0.880441 0.000000
+ *MESH_TVERT 1400 0.963642 0.874037 0.000000
+ *MESH_TVERT 1401 0.185576 0.866151 0.000000
+ *MESH_TVERT 1402 0.963642 0.874037 0.000000
+ *MESH_TVERT 1403 0.963510 0.859746 0.000000
+ *MESH_TVERT 1404 0.336249 0.769371 0.000000
+ *MESH_TVERT 1405 0.326099 0.789209 0.000000
+ *MESH_TVERT 1406 0.330256 0.768205 0.000000
+ *MESH_TVERT 1407 0.336249 0.769371 0.000000
+ *MESH_TVERT 1408 0.339162 0.790317 0.000000
+ *MESH_TVERT 1409 0.326099 0.789209 0.000000
+ *MESH_TVERT 1410 0.330256 0.768205 0.000000
+ *MESH_TVERT 1411 0.337709 0.750820 0.000000
+ *MESH_TVERT 1412 0.336249 0.769371 0.000000
+ *MESH_TVERT 1413 0.336249 0.769371 0.000000
+ *MESH_TVERT 1414 0.330256 0.768205 0.000000
+ *MESH_TVERT 1415 0.326099 0.789209 0.000000
+ *MESH_TVERT 1416 0.336249 0.769371 0.000000
+ *MESH_TVERT 1417 0.326099 0.789209 0.000000
+ *MESH_TVERT 1418 0.339162 0.790317 0.000000
+ *MESH_TVERT 1419 0.330256 0.768205 0.000000
+ *MESH_TVERT 1420 0.336249 0.769371 0.000000
+ *MESH_TVERT 1421 0.337709 0.750820 0.000000
+ *MESH_TVERT 1422 0.336249 0.769371 0.000000
+ *MESH_TVERT 1423 0.339162 0.790317 0.000000
+ *MESH_TVERT 1424 0.336249 0.769371 0.000000
+ *MESH_TVERT 1425 0.336249 0.769371 0.000000
+ *MESH_TVERT 1426 0.339162 0.790317 0.000000
+ *MESH_TVERT 1427 0.339162 0.790317 0.000000
+ *MESH_TVERT 1428 0.337709 0.750820 0.000000
+ *MESH_TVERT 1429 0.336249 0.769371 0.000000
+ *MESH_TVERT 1430 0.337709 0.750820 0.000000
+ *MESH_TVERT 1431 0.337709 0.750820 0.000000
+ *MESH_TVERT 1432 0.336249 0.769371 0.000000
+ *MESH_TVERT 1433 0.336249 0.769371 0.000000
+ *MESH_TVERT 1434 0.330256 0.768205 0.000000
+ *MESH_TVERT 1435 0.337709 0.750820 0.000000
+ *MESH_TVERT 1436 0.330256 0.768205 0.000000
+ *MESH_TVERT 1437 0.330256 0.768205 0.000000
+ *MESH_TVERT 1438 0.337709 0.750820 0.000000
+ *MESH_TVERT 1439 0.337709 0.750820 0.000000
+ *MESH_TVERT 1440 0.326099 0.789209 0.000000
+ *MESH_TVERT 1441 0.330256 0.768205 0.000000
+ *MESH_TVERT 1442 0.326099 0.789209 0.000000
+ *MESH_TVERT 1443 0.326099 0.789209 0.000000
+ *MESH_TVERT 1444 0.330256 0.768205 0.000000
+ *MESH_TVERT 1445 0.330256 0.768205 0.000000
+ *MESH_TVERT 1446 0.390102 0.751134 0.000000
+ *MESH_TVERT 1447 0.461788 0.708571 0.000000
+ *MESH_TVERT 1448 0.397050 0.765586 0.000000
+ *MESH_TVERT 1449 0.461788 0.708571 0.000000
+ *MESH_TVERT 1450 0.473058 0.720945 0.000000
+ *MESH_TVERT 1451 0.397050 0.765586 0.000000
+ *MESH_TVERT 1452 0.473058 0.720945 0.000000
+ *MESH_TVERT 1453 0.473509 0.769675 0.000000
+ *MESH_TVERT 1454 0.397050 0.765586 0.000000
+ *MESH_TVERT 1455 0.390102 0.751134 0.000000
+ *MESH_TVERT 1456 0.374082 0.736921 0.000000
+ *MESH_TVERT 1457 0.461788 0.708571 0.000000
+ *MESH_TVERT 1458 0.374082 0.736921 0.000000
+ *MESH_TVERT 1459 0.461442 0.671173 0.000000
+ *MESH_TVERT 1460 0.461788 0.708571 0.000000
+ *MESH_TVERT 1461 0.374082 0.736921 0.000000
+ *MESH_TVERT 1462 0.370197 0.564256 0.000000
+ *MESH_TVERT 1463 0.461442 0.671173 0.000000
+ *MESH_TVERT 1464 0.370197 0.564256 0.000000
+ *MESH_TVERT 1465 0.466530 0.563463 0.000000
+ *MESH_TVERT 1466 0.461442 0.671173 0.000000
+ *MESH_TVERT 1467 0.466530 0.563463 0.000000
+ *MESH_TVERT 1468 0.497948 0.670873 0.000000
+ *MESH_TVERT 1469 0.461442 0.671173 0.000000
+ *MESH_TVERT 1470 0.466530 0.563463 0.000000
+ *MESH_TVERT 1471 0.535887 0.715894 0.000000
+ *MESH_TVERT 1472 0.497948 0.670873 0.000000
+ *MESH_TVERT 1473 0.466530 0.563463 0.000000
+ *MESH_TVERT 1474 0.554129 0.714611 0.000000
+ *MESH_TVERT 1475 0.535887 0.715894 0.000000
+ *MESH_TVERT 1476 0.390102 0.751134 0.000000
+ *MESH_TVERT 1477 0.397050 0.765586 0.000000
+ *MESH_TVERT 1478 0.461788 0.708571 0.000000
+ *MESH_TVERT 1479 0.461788 0.708571 0.000000
+ *MESH_TVERT 1480 0.397050 0.765586 0.000000
+ *MESH_TVERT 1481 0.473058 0.720945 0.000000
+ *MESH_TVERT 1482 0.473058 0.720945 0.000000
+ *MESH_TVERT 1483 0.397050 0.765586 0.000000
+ *MESH_TVERT 1484 0.473509 0.769675 0.000000
+ *MESH_TVERT 1485 0.390102 0.751134 0.000000
+ *MESH_TVERT 1486 0.461788 0.708571 0.000000
+ *MESH_TVERT 1487 0.374082 0.736921 0.000000
+ *MESH_TVERT 1488 0.374082 0.736921 0.000000
+ *MESH_TVERT 1489 0.461788 0.708571 0.000000
+ *MESH_TVERT 1490 0.461442 0.671173 0.000000
+ *MESH_TVERT 1491 0.374082 0.736921 0.000000
+ *MESH_TVERT 1492 0.461442 0.671173 0.000000
+ *MESH_TVERT 1493 0.370197 0.564256 0.000000
+ *MESH_TVERT 1494 0.370197 0.564256 0.000000
+ *MESH_TVERT 1495 0.461442 0.671173 0.000000
+ *MESH_TVERT 1496 0.466530 0.563463 0.000000
+ *MESH_TVERT 1497 0.466530 0.563463 0.000000
+ *MESH_TVERT 1498 0.461442 0.671173 0.000000
+ *MESH_TVERT 1499 0.497948 0.670873 0.000000
+ *MESH_TVERT 1500 0.466530 0.563463 0.000000
+ *MESH_TVERT 1501 0.497948 0.670873 0.000000
+ *MESH_TVERT 1502 0.535887 0.715894 0.000000
+ *MESH_TVERT 1503 0.466530 0.563463 0.000000
+ *MESH_TVERT 1504 0.535887 0.715894 0.000000
+ *MESH_TVERT 1505 0.554129 0.714611 0.000000
+ *MESH_TVERT 1506 0.425023 0.402021 0.000000
+ *MESH_TVERT 1507 0.390189 0.201104 0.000000
+ *MESH_TVERT 1508 0.390189 0.402021 0.000000
+ *MESH_TVERT 1509 0.425023 0.402021 0.000000
+ *MESH_TVERT 1510 0.425023 0.201104 0.000000
+ *MESH_TVERT 1511 0.390189 0.201104 0.000000
+ *MESH_TVERT 1512 0.390102 0.751134 0.000000
+ *MESH_TVERT 1513 0.374082 0.736921 0.000000
+ *MESH_TVERT 1514 0.390102 0.751134 0.000000
+ *MESH_TVERT 1515 0.390102 0.751134 0.000000
+ *MESH_TVERT 1516 0.374082 0.736921 0.000000
+ *MESH_TVERT 1517 0.374082 0.736921 0.000000
+ *MESH_TVERT 1518 0.397050 0.765586 0.000000
+ *MESH_TVERT 1519 0.390102 0.751134 0.000000
+ *MESH_TVERT 1520 0.397050 0.765586 0.000000
+ *MESH_TVERT 1521 0.397050 0.765586 0.000000
+ *MESH_TVERT 1522 0.390102 0.751134 0.000000
+ *MESH_TVERT 1523 0.390102 0.751134 0.000000
+ *MESH_TVERT 1524 0.473509 0.769675 0.000000
+ *MESH_TVERT 1525 0.397050 0.765586 0.000000
+ *MESH_TVERT 1526 0.473509 0.769675 0.000000
+ *MESH_TVERT 1527 0.473509 0.769675 0.000000
+ *MESH_TVERT 1528 0.397050 0.765586 0.000000
+ *MESH_TVERT 1529 0.397050 0.765586 0.000000
+ *MESH_TVERT 1530 0.473058 0.720945 0.000000
+ *MESH_TVERT 1531 0.473509 0.769675 0.000000
+ *MESH_TVERT 1532 0.473058 0.720945 0.000000
+ *MESH_TVERT 1533 0.473058 0.720945 0.000000
+ *MESH_TVERT 1534 0.473509 0.769675 0.000000
+ *MESH_TVERT 1535 0.473509 0.769675 0.000000
+ *MESH_TVERT 1536 0.461788 0.708571 0.000000
+ *MESH_TVERT 1537 0.473058 0.720945 0.000000
+ *MESH_TVERT 1538 0.461788 0.708571 0.000000
+ *MESH_TVERT 1539 0.461788 0.708571 0.000000
+ *MESH_TVERT 1540 0.473058 0.720945 0.000000
+ *MESH_TVERT 1541 0.473058 0.720945 0.000000
+ *MESH_TVERT 1542 0.461442 0.671173 0.000000
+ *MESH_TVERT 1543 0.461788 0.708571 0.000000
+ *MESH_TVERT 1544 0.461442 0.671173 0.000000
+ *MESH_TVERT 1545 0.461442 0.671173 0.000000
+ *MESH_TVERT 1546 0.461788 0.708571 0.000000
+ *MESH_TVERT 1547 0.461788 0.708571 0.000000
+ *MESH_TVERT 1548 0.497948 0.670873 0.000000
+ *MESH_TVERT 1549 0.461442 0.671173 0.000000
+ *MESH_TVERT 1550 0.497948 0.670873 0.000000
+ *MESH_TVERT 1551 0.497948 0.670873 0.000000
+ *MESH_TVERT 1552 0.461442 0.671173 0.000000
+ *MESH_TVERT 1553 0.461442 0.671173 0.000000
+ *MESH_TVERT 1554 0.535887 0.715894 0.000000
+ *MESH_TVERT 1555 0.497948 0.670873 0.000000
+ *MESH_TVERT 1556 0.535887 0.715894 0.000000
+ *MESH_TVERT 1557 0.535887 0.715894 0.000000
+ *MESH_TVERT 1558 0.497948 0.670873 0.000000
+ *MESH_TVERT 1559 0.497948 0.670873 0.000000
+ *MESH_TVERT 1560 0.554129 0.714611 0.000000
+ *MESH_TVERT 1561 0.535887 0.715894 0.000000
+ *MESH_TVERT 1562 0.554129 0.714611 0.000000
+ *MESH_TVERT 1563 0.554129 0.714611 0.000000
+ *MESH_TVERT 1564 0.535887 0.715894 0.000000
+ *MESH_TVERT 1565 0.535887 0.715894 0.000000
+ *MESH_TVERT 1566 0.425023 0.201104 0.000000
+ *MESH_TVERT 1567 0.390189 0.377789 0.000000
+ *MESH_TVERT 1568 0.390189 0.201104 0.000000
+ *MESH_TVERT 1569 0.425023 0.201104 0.000000
+ *MESH_TVERT 1570 0.425023 0.377789 0.000000
+ *MESH_TVERT 1571 0.390189 0.377789 0.000000
+ *MESH_TVERT 1572 0.967623 0.626291 0.000000
+ *MESH_TVERT 1573 0.529962 0.513806 0.000000
+ *MESH_TVERT 1574 0.967623 0.513806 0.000000
+ *MESH_TVERT 1575 0.967623 0.626291 0.000000
+ *MESH_TVERT 1576 0.529962 0.626291 0.000000
+ *MESH_TVERT 1577 0.529962 0.513806 0.000000
+ *MESH_TVERT 1578 0.757889 0.708043 0.000000
+ *MESH_TVERT 1579 0.758226 0.744506 0.000000
+ *MESH_TVERT 1580 0.757932 0.712704 0.000000
+ *MESH_TVERT 1581 0.757889 0.708043 0.000000
+ *MESH_TVERT 1582 0.758402 0.763477 0.000000
+ *MESH_TVERT 1583 0.758226 0.744506 0.000000
+ *MESH_TVERT 1584 0.757889 0.708043 0.000000
+ *MESH_TVERT 1585 0.758628 0.787986 0.000000
+ *MESH_TVERT 1586 0.758402 0.763477 0.000000
+ *MESH_TVERT 1587 0.757889 0.708043 0.000000
+ *MESH_TVERT 1588 0.758841 0.810870 0.000000
+ *MESH_TVERT 1589 0.758628 0.787986 0.000000
+ *MESH_TVERT 1590 0.757889 0.708043 0.000000
+ *MESH_TVERT 1591 0.758933 0.820846 0.000000
+ *MESH_TVERT 1592 0.758841 0.810870 0.000000
+ *MESH_TVERT 1593 0.757889 0.708043 0.000000
+ *MESH_TVERT 1594 0.758841 0.810870 0.000000
+ *MESH_TVERT 1595 0.758933 0.820846 0.000000
+ *MESH_TVERT 1596 0.757889 0.708043 0.000000
+ *MESH_TVERT 1597 0.758629 0.787986 0.000000
+ *MESH_TVERT 1598 0.758841 0.810870 0.000000
+ *MESH_TVERT 1599 0.757889 0.708043 0.000000
+ *MESH_TVERT 1600 0.758402 0.763477 0.000000
+ *MESH_TVERT 1601 0.758629 0.787986 0.000000
+ *MESH_TVERT 1602 0.757889 0.708043 0.000000
+ *MESH_TVERT 1603 0.758226 0.744506 0.000000
+ *MESH_TVERT 1604 0.758402 0.763477 0.000000
+ *MESH_TVERT 1605 0.757889 0.708043 0.000000
+ *MESH_TVERT 1606 0.757932 0.712704 0.000000
+ *MESH_TVERT 1607 0.758226 0.744506 0.000000
+ *MESH_TVERT 1608 0.821256 0.218661 0.000000
+ *MESH_TVERT 1609 0.914073 0.154409 0.000000
+ *MESH_TVERT 1610 0.928562 0.207968 0.000000
+ *MESH_TVERT 1611 0.821256 0.218661 0.000000
+ *MESH_TVERT 1612 0.910902 0.064632 0.000000
+ *MESH_TVERT 1613 0.914073 0.154409 0.000000
+ *MESH_TVERT 1614 0.821256 0.218661 0.000000
+ *MESH_TVERT 1615 0.821256 0.051474 0.000000
+ *MESH_TVERT 1616 0.910902 0.064632 0.000000
+ *MESH_TVERT 1617 0.821256 0.218661 0.000000
+ *MESH_TVERT 1618 0.731610 0.064632 0.000000
+ *MESH_TVERT 1619 0.821256 0.051474 0.000000
+ *MESH_TVERT 1620 0.821256 0.218661 0.000000
+ *MESH_TVERT 1621 0.728439 0.154409 0.000000
+ *MESH_TVERT 1622 0.731610 0.064632 0.000000
+ *MESH_TVERT 1623 0.821256 0.218661 0.000000
+ *MESH_TVERT 1624 0.713950 0.207968 0.000000
+ *MESH_TVERT 1625 0.728439 0.154409 0.000000
+ *MESH_TVERT 1626 0.821256 0.218661 0.000000
+ *MESH_TVERT 1627 0.693085 0.277155 0.000000
+ *MESH_TVERT 1628 0.713950 0.207968 0.000000
+ *MESH_TVERT 1629 0.821256 0.218661 0.000000
+ *MESH_TVERT 1630 0.722067 0.341758 0.000000
+ *MESH_TVERT 1631 0.693085 0.277155 0.000000
+ *MESH_TVERT 1632 0.821256 0.218661 0.000000
+ *MESH_TVERT 1633 0.821256 0.369922 0.000000
+ *MESH_TVERT 1634 0.722067 0.341758 0.000000
+ *MESH_TVERT 1635 0.821256 0.218661 0.000000
+ *MESH_TVERT 1636 0.920445 0.341758 0.000000
+ *MESH_TVERT 1637 0.821256 0.369922 0.000000
+ *MESH_TVERT 1638 0.821256 0.218661 0.000000
+ *MESH_TVERT 1639 0.949427 0.277155 0.000000
+ *MESH_TVERT 1640 0.920445 0.341758 0.000000
+ *MESH_TVERT 1641 0.821256 0.218661 0.000000
+ *MESH_TVERT 1642 0.928562 0.207968 0.000000
+ *MESH_TVERT 1643 0.949427 0.277155 0.000000
+ *MESH_TVERT 1644 0.758226 0.744506 0.000000
+ *MESH_TVERT 1645 0.758402 0.763477 0.000000
+ *MESH_TVERT 1646 0.987165 0.761594 0.000000
+ *MESH_TVERT 1647 0.758226 0.744506 0.000000
+ *MESH_TVERT 1648 0.987165 0.761594 0.000000
+ *MESH_TVERT 1649 0.986989 0.742622 0.000000
+ *MESH_TVERT 1650 0.757932 0.712704 0.000000
+ *MESH_TVERT 1651 0.758226 0.744506 0.000000
+ *MESH_TVERT 1652 0.986989 0.742622 0.000000
+ *MESH_TVERT 1653 0.757932 0.712704 0.000000
+ *MESH_TVERT 1654 0.986989 0.742622 0.000000
+ *MESH_TVERT 1655 0.986696 0.710821 0.000000
+ *MESH_TVERT 1656 0.757889 0.708043 0.000000
+ *MESH_TVERT 1657 0.757932 0.712704 0.000000
+ *MESH_TVERT 1658 0.986696 0.710821 0.000000
+ *MESH_TVERT 1659 0.757889 0.708043 0.000000
+ *MESH_TVERT 1660 0.986696 0.710821 0.000000
+ *MESH_TVERT 1661 0.986652 0.706160 0.000000
+ *MESH_TVERT 1662 0.757932 0.712704 0.000000
+ *MESH_TVERT 1663 0.757889 0.708043 0.000000
+ *MESH_TVERT 1664 0.986652 0.706160 0.000000
+ *MESH_TVERT 1665 0.757932 0.712704 0.000000
+ *MESH_TVERT 1666 0.986652 0.706160 0.000000
+ *MESH_TVERT 1667 0.986695 0.710821 0.000000
+ *MESH_TVERT 1668 0.758226 0.744506 0.000000
+ *MESH_TVERT 1669 0.757932 0.712704 0.000000
+ *MESH_TVERT 1670 0.986695 0.710821 0.000000
+ *MESH_TVERT 1671 0.758226 0.744506 0.000000
+ *MESH_TVERT 1672 0.986695 0.710821 0.000000
+ *MESH_TVERT 1673 0.986989 0.742622 0.000000
+ *MESH_TVERT 1674 0.758402 0.763477 0.000000
+ *MESH_TVERT 1675 0.758226 0.744506 0.000000
+ *MESH_TVERT 1676 0.986989 0.742622 0.000000
+ *MESH_TVERT 1677 0.758402 0.763477 0.000000
+ *MESH_TVERT 1678 0.986989 0.742622 0.000000
+ *MESH_TVERT 1679 0.987165 0.761594 0.000000
+ *MESH_TVERT 1680 0.758629 0.787986 0.000000
+ *MESH_TVERT 1681 0.758402 0.763477 0.000000
+ *MESH_TVERT 1682 0.987165 0.761594 0.000000
+ *MESH_TVERT 1683 0.758629 0.787986 0.000000
+ *MESH_TVERT 1684 0.987165 0.761594 0.000000
+ *MESH_TVERT 1685 0.987392 0.786102 0.000000
+ *MESH_TVERT 1686 0.758841 0.810870 0.000000
+ *MESH_TVERT 1687 0.758629 0.787986 0.000000
+ *MESH_TVERT 1688 0.987392 0.786102 0.000000
+ *MESH_TVERT 1689 0.758841 0.810870 0.000000
+ *MESH_TVERT 1690 0.987392 0.786102 0.000000
+ *MESH_TVERT 1691 0.987604 0.808986 0.000000
+ *MESH_TVERT 1692 0.758933 0.820846 0.000000
+ *MESH_TVERT 1693 0.758841 0.810870 0.000000
+ *MESH_TVERT 1694 0.987604 0.808986 0.000000
+ *MESH_TVERT 1695 0.758933 0.820846 0.000000
+ *MESH_TVERT 1696 0.987604 0.808986 0.000000
+ *MESH_TVERT 1697 0.987696 0.818963 0.000000
+ *MESH_TVERT 1698 0.758841 0.810870 0.000000
+ *MESH_TVERT 1699 0.758933 0.820846 0.000000
+ *MESH_TVERT 1700 0.987696 0.818963 0.000000
+ *MESH_TVERT 1701 0.758841 0.810870 0.000000
+ *MESH_TVERT 1702 0.987696 0.818963 0.000000
+ *MESH_TVERT 1703 0.987604 0.808986 0.000000
+ *MESH_TVERT 1704 0.758628 0.787986 0.000000
+ *MESH_TVERT 1705 0.758841 0.810870 0.000000
+ *MESH_TVERT 1706 0.987604 0.808986 0.000000
+ *MESH_TVERT 1707 0.758628 0.787986 0.000000
+ *MESH_TVERT 1708 0.987604 0.808986 0.000000
+ *MESH_TVERT 1709 0.987391 0.786102 0.000000
+ *MESH_TVERT 1710 0.758402 0.763477 0.000000
+ *MESH_TVERT 1711 0.758628 0.787986 0.000000
+ *MESH_TVERT 1712 0.987391 0.786102 0.000000
+ *MESH_TVERT 1713 0.758402 0.763477 0.000000
+ *MESH_TVERT 1714 0.987391 0.786102 0.000000
+ *MESH_TVERT 1715 0.987165 0.761594 0.000000
+ }
+ *MESH_NUMTVFACES 572
+ *MESH_TFACELIST {
+ *MESH_TFACE 0 0 1 2
+ *MESH_TFACE 1 3 4 5
+ *MESH_TFACE 2 6 7 8
+ *MESH_TFACE 3 9 10 11
+ *MESH_TFACE 4 12 13 14
+ *MESH_TFACE 5 15 16 17
+ *MESH_TFACE 6 18 19 20
+ *MESH_TFACE 7 21 22 23
+ *MESH_TFACE 8 24 25 26
+ *MESH_TFACE 9 27 28 29
+ *MESH_TFACE 10 30 31 32
+ *MESH_TFACE 11 33 34 35
+ *MESH_TFACE 12 36 37 38
+ *MESH_TFACE 13 39 40 41
+ *MESH_TFACE 14 42 43 44
+ *MESH_TFACE 15 45 46 47
+ *MESH_TFACE 16 48 49 50
+ *MESH_TFACE 17 51 52 53
+ *MESH_TFACE 18 54 55 56
+ *MESH_TFACE 19 57 58 59
+ *MESH_TFACE 20 60 61 62
+ *MESH_TFACE 21 63 64 65
+ *MESH_TFACE 22 66 67 68
+ *MESH_TFACE 23 69 70 71
+ *MESH_TFACE 24 72 73 74
+ *MESH_TFACE 25 75 76 77
+ *MESH_TFACE 26 78 79 80
+ *MESH_TFACE 27 81 82 83
+ *MESH_TFACE 28 84 85 86
+ *MESH_TFACE 29 87 88 89
+ *MESH_TFACE 30 90 91 92
+ *MESH_TFACE 31 93 94 95
+ *MESH_TFACE 32 96 97 98
+ *MESH_TFACE 33 99 100 101
+ *MESH_TFACE 34 102 103 104
+ *MESH_TFACE 35 105 106 107
+ *MESH_TFACE 36 108 109 110
+ *MESH_TFACE 37 111 112 113
+ *MESH_TFACE 38 114 115 116
+ *MESH_TFACE 39 117 118 119
+ *MESH_TFACE 40 120 121 122
+ *MESH_TFACE 41 123 124 125
+ *MESH_TFACE 42 126 127 128
+ *MESH_TFACE 43 129 130 131
+ *MESH_TFACE 44 132 133 134
+ *MESH_TFACE 45 135 136 137
+ *MESH_TFACE 46 138 139 140
+ *MESH_TFACE 47 141 142 143
+ *MESH_TFACE 48 144 145 146
+ *MESH_TFACE 49 147 148 149
+ *MESH_TFACE 50 150 151 152
+ *MESH_TFACE 51 153 154 155
+ *MESH_TFACE 52 156 157 158
+ *MESH_TFACE 53 159 160 161
+ *MESH_TFACE 54 162 163 164
+ *MESH_TFACE 55 165 166 167
+ *MESH_TFACE 56 168 169 170
+ *MESH_TFACE 57 171 172 173
+ *MESH_TFACE 58 174 175 176
+ *MESH_TFACE 59 177 178 179
+ *MESH_TFACE 60 180 181 182
+ *MESH_TFACE 61 183 184 185
+ *MESH_TFACE 62 186 187 188
+ *MESH_TFACE 63 189 190 191
+ *MESH_TFACE 64 192 193 194
+ *MESH_TFACE 65 195 196 197
+ *MESH_TFACE 66 198 199 200
+ *MESH_TFACE 67 201 202 203
+ *MESH_TFACE 68 204 205 206
+ *MESH_TFACE 69 207 208 209
+ *MESH_TFACE 70 210 211 212
+ *MESH_TFACE 71 213 214 215
+ *MESH_TFACE 72 216 217 218
+ *MESH_TFACE 73 219 220 221
+ *MESH_TFACE 74 222 223 224
+ *MESH_TFACE 75 225 226 227
+ *MESH_TFACE 76 228 229 230
+ *MESH_TFACE 77 231 232 233
+ *MESH_TFACE 78 234 235 236
+ *MESH_TFACE 79 237 238 239
+ *MESH_TFACE 80 240 241 242
+ *MESH_TFACE 81 243 244 245
+ *MESH_TFACE 82 246 247 248
+ *MESH_TFACE 83 249 250 251
+ *MESH_TFACE 84 252 253 254
+ *MESH_TFACE 85 255 256 257
+ *MESH_TFACE 86 258 259 260
+ *MESH_TFACE 87 261 262 263
+ *MESH_TFACE 88 264 265 266
+ *MESH_TFACE 89 267 268 269
+ *MESH_TFACE 90 270 271 272
+ *MESH_TFACE 91 273 274 275
+ *MESH_TFACE 92 276 277 278
+ *MESH_TFACE 93 279 280 281
+ *MESH_TFACE 94 282 283 284
+ *MESH_TFACE 95 285 286 287
+ *MESH_TFACE 96 288 289 290
+ *MESH_TFACE 97 291 292 293
+ *MESH_TFACE 98 294 295 296
+ *MESH_TFACE 99 297 298 299
+ *MESH_TFACE 100 300 301 302
+ *MESH_TFACE 101 303 304 305
+ *MESH_TFACE 102 306 307 308
+ *MESH_TFACE 103 309 310 311
+ *MESH_TFACE 104 312 313 314
+ *MESH_TFACE 105 315 316 317
+ *MESH_TFACE 106 318 319 320
+ *MESH_TFACE 107 321 322 323
+ *MESH_TFACE 108 324 325 326
+ *MESH_TFACE 109 327 328 329
+ *MESH_TFACE 110 330 331 332
+ *MESH_TFACE 111 333 334 335
+ *MESH_TFACE 112 336 337 338
+ *MESH_TFACE 113 339 340 341
+ *MESH_TFACE 114 342 343 344
+ *MESH_TFACE 115 345 346 347
+ *MESH_TFACE 116 348 349 350
+ *MESH_TFACE 117 351 352 353
+ *MESH_TFACE 118 354 355 356
+ *MESH_TFACE 119 357 358 359
+ *MESH_TFACE 120 360 361 362
+ *MESH_TFACE 121 363 364 365
+ *MESH_TFACE 122 366 367 368
+ *MESH_TFACE 123 369 370 371
+ *MESH_TFACE 124 372 373 374
+ *MESH_TFACE 125 375 376 377
+ *MESH_TFACE 126 378 379 380
+ *MESH_TFACE 127 381 382 383
+ *MESH_TFACE 128 384 385 386
+ *MESH_TFACE 129 387 388 389
+ *MESH_TFACE 130 390 391 392
+ *MESH_TFACE 131 393 394 395
+ *MESH_TFACE 132 396 397 398
+ *MESH_TFACE 133 399 400 401
+ *MESH_TFACE 134 402 403 404
+ *MESH_TFACE 135 405 406 407
+ *MESH_TFACE 136 408 409 410
+ *MESH_TFACE 137 411 412 413
+ *MESH_TFACE 138 414 415 416
+ *MESH_TFACE 139 417 418 419
+ *MESH_TFACE 140 420 421 422
+ *MESH_TFACE 141 423 424 425
+ *MESH_TFACE 142 426 427 428
+ *MESH_TFACE 143 429 430 431
+ *MESH_TFACE 144 432 433 434
+ *MESH_TFACE 145 435 436 437
+ *MESH_TFACE 146 438 439 440
+ *MESH_TFACE 147 441 442 443
+ *MESH_TFACE 148 444 445 446
+ *MESH_TFACE 149 447 448 449
+ *MESH_TFACE 150 450 451 452
+ *MESH_TFACE 151 453 454 455
+ *MESH_TFACE 152 456 457 458
+ *MESH_TFACE 153 459 460 461
+ *MESH_TFACE 154 462 463 464
+ *MESH_TFACE 155 465 466 467
+ *MESH_TFACE 156 468 469 470
+ *MESH_TFACE 157 471 472 473
+ *MESH_TFACE 158 474 475 476
+ *MESH_TFACE 159 477 478 479
+ *MESH_TFACE 160 480 481 482
+ *MESH_TFACE 161 483 484 485
+ *MESH_TFACE 162 486 487 488
+ *MESH_TFACE 163 489 490 491
+ *MESH_TFACE 164 492 493 494
+ *MESH_TFACE 165 495 496 497
+ *MESH_TFACE 166 498 499 500
+ *MESH_TFACE 167 501 502 503
+ *MESH_TFACE 168 504 505 506
+ *MESH_TFACE 169 507 508 509
+ *MESH_TFACE 170 510 511 512
+ *MESH_TFACE 171 513 514 515
+ *MESH_TFACE 172 516 517 518
+ *MESH_TFACE 173 519 520 521
+ *MESH_TFACE 174 522 523 524
+ *MESH_TFACE 175 525 526 527
+ *MESH_TFACE 176 528 529 530
+ *MESH_TFACE 177 531 532 533
+ *MESH_TFACE 178 534 535 536
+ *MESH_TFACE 179 537 538 539
+ *MESH_TFACE 180 540 541 542
+ *MESH_TFACE 181 543 544 545
+ *MESH_TFACE 182 546 547 548
+ *MESH_TFACE 183 549 550 551
+ *MESH_TFACE 184 552 553 554
+ *MESH_TFACE 185 555 556 557
+ *MESH_TFACE 186 558 559 560
+ *MESH_TFACE 187 561 562 563
+ *MESH_TFACE 188 564 565 566
+ *MESH_TFACE 189 567 568 569
+ *MESH_TFACE 190 570 571 572
+ *MESH_TFACE 191 573 574 575
+ *MESH_TFACE 192 576 577 578
+ *MESH_TFACE 193 579 580 581
+ *MESH_TFACE 194 582 583 584
+ *MESH_TFACE 195 585 586 587
+ *MESH_TFACE 196 588 589 590
+ *MESH_TFACE 197 591 592 593
+ *MESH_TFACE 198 594 595 596
+ *MESH_TFACE 199 597 598 599
+ *MESH_TFACE 200 600 601 602
+ *MESH_TFACE 201 603 604 605
+ *MESH_TFACE 202 606 607 608
+ *MESH_TFACE 203 609 610 611
+ *MESH_TFACE 204 612 613 614
+ *MESH_TFACE 205 615 616 617
+ *MESH_TFACE 206 618 619 620
+ *MESH_TFACE 207 621 622 623
+ *MESH_TFACE 208 624 625 626
+ *MESH_TFACE 209 627 628 629
+ *MESH_TFACE 210 630 631 632
+ *MESH_TFACE 211 633 634 635
+ *MESH_TFACE 212 636 637 638
+ *MESH_TFACE 213 639 640 641
+ *MESH_TFACE 214 642 643 644
+ *MESH_TFACE 215 645 646 647
+ *MESH_TFACE 216 648 649 650
+ *MESH_TFACE 217 651 652 653
+ *MESH_TFACE 218 654 655 656
+ *MESH_TFACE 219 657 658 659
+ *MESH_TFACE 220 660 661 662
+ *MESH_TFACE 221 663 664 665
+ *MESH_TFACE 222 666 667 668
+ *MESH_TFACE 223 669 670 671
+ *MESH_TFACE 224 672 673 674
+ *MESH_TFACE 225 675 676 677
+ *MESH_TFACE 226 678 679 680
+ *MESH_TFACE 227 681 682 683
+ *MESH_TFACE 228 684 685 686
+ *MESH_TFACE 229 687 688 689
+ *MESH_TFACE 230 690 691 692
+ *MESH_TFACE 231 693 694 695
+ *MESH_TFACE 232 696 697 698
+ *MESH_TFACE 233 699 700 701
+ *MESH_TFACE 234 702 703 704
+ *MESH_TFACE 235 705 706 707
+ *MESH_TFACE 236 708 709 710
+ *MESH_TFACE 237 711 712 713
+ *MESH_TFACE 238 714 715 716
+ *MESH_TFACE 239 717 718 719
+ *MESH_TFACE 240 720 721 722
+ *MESH_TFACE 241 723 724 725
+ *MESH_TFACE 242 726 727 728
+ *MESH_TFACE 243 729 730 731
+ *MESH_TFACE 244 732 733 734
+ *MESH_TFACE 245 735 736 737
+ *MESH_TFACE 246 738 739 740
+ *MESH_TFACE 247 741 742 743
+ *MESH_TFACE 248 744 745 746
+ *MESH_TFACE 249 747 748 749
+ *MESH_TFACE 250 750 751 752
+ *MESH_TFACE 251 753 754 755
+ *MESH_TFACE 252 756 757 758
+ *MESH_TFACE 253 759 760 761
+ *MESH_TFACE 254 762 763 764
+ *MESH_TFACE 255 765 766 767
+ *MESH_TFACE 256 768 769 770
+ *MESH_TFACE 257 771 772 773
+ *MESH_TFACE 258 774 775 776
+ *MESH_TFACE 259 777 778 779
+ *MESH_TFACE 260 780 781 782
+ *MESH_TFACE 261 783 784 785
+ *MESH_TFACE 262 786 787 788
+ *MESH_TFACE 263 789 790 791
+ *MESH_TFACE 264 792 793 794
+ *MESH_TFACE 265 795 796 797
+ *MESH_TFACE 266 798 799 800
+ *MESH_TFACE 267 801 802 803
+ *MESH_TFACE 268 804 805 806
+ *MESH_TFACE 269 807 808 809
+ *MESH_TFACE 270 810 811 812
+ *MESH_TFACE 271 813 814 815
+ *MESH_TFACE 272 816 817 818
+ *MESH_TFACE 273 819 820 821
+ *MESH_TFACE 274 822 823 824
+ *MESH_TFACE 275 825 826 827
+ *MESH_TFACE 276 828 829 830
+ *MESH_TFACE 277 831 832 833
+ *MESH_TFACE 278 834 835 836
+ *MESH_TFACE 279 837 838 839
+ *MESH_TFACE 280 840 841 842
+ *MESH_TFACE 281 843 844 845
+ *MESH_TFACE 282 846 847 848
+ *MESH_TFACE 283 849 850 851
+ *MESH_TFACE 284 852 853 854
+ *MESH_TFACE 285 855 856 857
+ *MESH_TFACE 286 858 859 860
+ *MESH_TFACE 287 861 862 863
+ *MESH_TFACE 288 864 865 866
+ *MESH_TFACE 289 867 868 869
+ *MESH_TFACE 290 870 871 872
+ *MESH_TFACE 291 873 874 875
+ *MESH_TFACE 292 876 877 878
+ *MESH_TFACE 293 879 880 881
+ *MESH_TFACE 294 882 883 884
+ *MESH_TFACE 295 885 886 887
+ *MESH_TFACE 296 888 889 890
+ *MESH_TFACE 297 891 892 893
+ *MESH_TFACE 298 894 895 896
+ *MESH_TFACE 299 897 898 899
+ *MESH_TFACE 300 900 901 902
+ *MESH_TFACE 301 903 904 905
+ *MESH_TFACE 302 906 907 908
+ *MESH_TFACE 303 909 910 911
+ *MESH_TFACE 304 912 913 914
+ *MESH_TFACE 305 915 916 917
+ *MESH_TFACE 306 918 919 920
+ *MESH_TFACE 307 921 922 923
+ *MESH_TFACE 308 924 925 926
+ *MESH_TFACE 309 927 928 929
+ *MESH_TFACE 310 930 931 932
+ *MESH_TFACE 311 933 934 935
+ *MESH_TFACE 312 936 937 938
+ *MESH_TFACE 313 939 940 941
+ *MESH_TFACE 314 942 943 944
+ *MESH_TFACE 315 945 946 947
+ *MESH_TFACE 316 948 949 950
+ *MESH_TFACE 317 951 952 953
+ *MESH_TFACE 318 954 955 956
+ *MESH_TFACE 319 957 958 959
+ *MESH_TFACE 320 960 961 962
+ *MESH_TFACE 321 963 964 965
+ *MESH_TFACE 322 966 967 968
+ *MESH_TFACE 323 969 970 971
+ *MESH_TFACE 324 972 973 974
+ *MESH_TFACE 325 975 976 977
+ *MESH_TFACE 326 978 979 980
+ *MESH_TFACE 327 981 982 983
+ *MESH_TFACE 328 984 985 986
+ *MESH_TFACE 329 987 988 989
+ *MESH_TFACE 330 990 991 992
+ *MESH_TFACE 331 993 994 995
+ *MESH_TFACE 332 996 997 998
+ *MESH_TFACE 333 999 1000 1001
+ *MESH_TFACE 334 1002 1003 1004
+ *MESH_TFACE 335 1005 1006 1007
+ *MESH_TFACE 336 1008 1009 1010
+ *MESH_TFACE 337 1011 1012 1013
+ *MESH_TFACE 338 1014 1015 1016
+ *MESH_TFACE 339 1017 1018 1019
+ *MESH_TFACE 340 1020 1021 1022
+ *MESH_TFACE 341 1023 1024 1025
+ *MESH_TFACE 342 1026 1027 1028
+ *MESH_TFACE 343 1029 1030 1031
+ *MESH_TFACE 344 1032 1033 1034
+ *MESH_TFACE 345 1035 1036 1037
+ *MESH_TFACE 346 1038 1039 1040
+ *MESH_TFACE 347 1041 1042 1043
+ *MESH_TFACE 348 1044 1045 1046
+ *MESH_TFACE 349 1047 1048 1049
+ *MESH_TFACE 350 1050 1051 1052
+ *MESH_TFACE 351 1053 1054 1055
+ *MESH_TFACE 352 1056 1057 1058
+ *MESH_TFACE 353 1059 1060 1061
+ *MESH_TFACE 354 1062 1063 1064
+ *MESH_TFACE 355 1065 1066 1067
+ *MESH_TFACE 356 1068 1069 1070
+ *MESH_TFACE 357 1071 1072 1073
+ *MESH_TFACE 358 1074 1075 1076
+ *MESH_TFACE 359 1077 1078 1079
+ *MESH_TFACE 360 1080 1081 1082
+ *MESH_TFACE 361 1083 1084 1085
+ *MESH_TFACE 362 1086 1087 1088
+ *MESH_TFACE 363 1089 1090 1091
+ *MESH_TFACE 364 1092 1093 1094
+ *MESH_TFACE 365 1095 1096 1097
+ *MESH_TFACE 366 1098 1099 1100
+ *MESH_TFACE 367 1101 1102 1103
+ *MESH_TFACE 368 1104 1105 1106
+ *MESH_TFACE 369 1107 1108 1109
+ *MESH_TFACE 370 1110 1111 1112
+ *MESH_TFACE 371 1113 1114 1115
+ *MESH_TFACE 372 1116 1117 1118
+ *MESH_TFACE 373 1119 1120 1121
+ *MESH_TFACE 374 1122 1123 1124
+ *MESH_TFACE 375 1125 1126 1127
+ *MESH_TFACE 376 1128 1129 1130
+ *MESH_TFACE 377 1131 1132 1133
+ *MESH_TFACE 378 1134 1135 1136
+ *MESH_TFACE 379 1137 1138 1139
+ *MESH_TFACE 380 1140 1141 1142
+ *MESH_TFACE 381 1143 1144 1145
+ *MESH_TFACE 382 1146 1147 1148
+ *MESH_TFACE 383 1149 1150 1151
+ *MESH_TFACE 384 1152 1153 1154
+ *MESH_TFACE 385 1155 1156 1157
+ *MESH_TFACE 386 1158 1159 1160
+ *MESH_TFACE 387 1161 1162 1163
+ *MESH_TFACE 388 1164 1165 1166
+ *MESH_TFACE 389 1167 1168 1169
+ *MESH_TFACE 390 1170 1171 1172
+ *MESH_TFACE 391 1173 1174 1175
+ *MESH_TFACE 392 1176 1177 1178
+ *MESH_TFACE 393 1179 1180 1181
+ *MESH_TFACE 394 1182 1183 1184
+ *MESH_TFACE 395 1185 1186 1187
+ *MESH_TFACE 396 1188 1189 1190
+ *MESH_TFACE 397 1191 1192 1193
+ *MESH_TFACE 398 1194 1195 1196
+ *MESH_TFACE 399 1197 1198 1199
+ *MESH_TFACE 400 1200 1201 1202
+ *MESH_TFACE 401 1203 1204 1205
+ *MESH_TFACE 402 1206 1207 1208
+ *MESH_TFACE 403 1209 1210 1211
+ *MESH_TFACE 404 1212 1213 1214
+ *MESH_TFACE 405 1215 1216 1217
+ *MESH_TFACE 406 1218 1219 1220
+ *MESH_TFACE 407 1221 1222 1223
+ *MESH_TFACE 408 1224 1225 1226
+ *MESH_TFACE 409 1227 1228 1229
+ *MESH_TFACE 410 1230 1231 1232
+ *MESH_TFACE 411 1233 1234 1235
+ *MESH_TFACE 412 1236 1237 1238
+ *MESH_TFACE 413 1239 1240 1241
+ *MESH_TFACE 414 1242 1243 1244
+ *MESH_TFACE 415 1245 1246 1247
+ *MESH_TFACE 416 1248 1249 1250
+ *MESH_TFACE 417 1251 1252 1253
+ *MESH_TFACE 418 1254 1255 1256
+ *MESH_TFACE 419 1257 1258 1259
+ *MESH_TFACE 420 1260 1261 1262
+ *MESH_TFACE 421 1263 1264 1265
+ *MESH_TFACE 422 1266 1267 1268
+ *MESH_TFACE 423 1269 1270 1271
+ *MESH_TFACE 424 1272 1273 1274
+ *MESH_TFACE 425 1275 1276 1277
+ *MESH_TFACE 426 1278 1279 1280
+ *MESH_TFACE 427 1281 1282 1283
+ *MESH_TFACE 428 1284 1285 1286
+ *MESH_TFACE 429 1287 1288 1289
+ *MESH_TFACE 430 1290 1291 1292
+ *MESH_TFACE 431 1293 1294 1295
+ *MESH_TFACE 432 1296 1297 1298
+ *MESH_TFACE 433 1299 1300 1301
+ *MESH_TFACE 434 1302 1303 1304
+ *MESH_TFACE 435 1305 1306 1307
+ *MESH_TFACE 436 1308 1309 1310
+ *MESH_TFACE 437 1311 1312 1313
+ *MESH_TFACE 438 1314 1315 1316
+ *MESH_TFACE 439 1317 1318 1319
+ *MESH_TFACE 440 1320 1321 1322
+ *MESH_TFACE 441 1323 1324 1325
+ *MESH_TFACE 442 1326 1327 1328
+ *MESH_TFACE 443 1329 1330 1331
+ *MESH_TFACE 444 1332 1333 1334
+ *MESH_TFACE 445 1335 1336 1337
+ *MESH_TFACE 446 1338 1339 1340
+ *MESH_TFACE 447 1341 1342 1343
+ *MESH_TFACE 448 1344 1345 1346
+ *MESH_TFACE 449 1347 1348 1349
+ *MESH_TFACE 450 1350 1351 1352
+ *MESH_TFACE 451 1353 1354 1355
+ *MESH_TFACE 452 1356 1357 1358
+ *MESH_TFACE 453 1359 1360 1361
+ *MESH_TFACE 454 1362 1363 1364
+ *MESH_TFACE 455 1365 1366 1367
+ *MESH_TFACE 456 1368 1369 1370
+ *MESH_TFACE 457 1371 1372 1373
+ *MESH_TFACE 458 1374 1375 1376
+ *MESH_TFACE 459 1377 1378 1379
+ *MESH_TFACE 460 1380 1381 1382
+ *MESH_TFACE 461 1383 1384 1385
+ *MESH_TFACE 462 1386 1387 1388
+ *MESH_TFACE 463 1389 1390 1391
+ *MESH_TFACE 464 1392 1393 1394
+ *MESH_TFACE 465 1395 1396 1397
+ *MESH_TFACE 466 1398 1399 1400
+ *MESH_TFACE 467 1401 1402 1403
+ *MESH_TFACE 468 1404 1405 1406
+ *MESH_TFACE 469 1407 1408 1409
+ *MESH_TFACE 470 1410 1411 1412
+ *MESH_TFACE 471 1413 1414 1415
+ *MESH_TFACE 472 1416 1417 1418
+ *MESH_TFACE 473 1419 1420 1421
+ *MESH_TFACE 474 1422 1423 1424
+ *MESH_TFACE 475 1425 1426 1427
+ *MESH_TFACE 476 1428 1429 1430
+ *MESH_TFACE 477 1431 1432 1433
+ *MESH_TFACE 478 1434 1435 1436
+ *MESH_TFACE 479 1437 1438 1439
+ *MESH_TFACE 480 1440 1441 1442
+ *MESH_TFACE 481 1443 1444 1445
+ *MESH_TFACE 482 1446 1447 1448
+ *MESH_TFACE 483 1449 1450 1451
+ *MESH_TFACE 484 1452 1453 1454
+ *MESH_TFACE 485 1455 1456 1457
+ *MESH_TFACE 486 1458 1459 1460
+ *MESH_TFACE 487 1461 1462 1463
+ *MESH_TFACE 488 1464 1465 1466
+ *MESH_TFACE 489 1467 1468 1469
+ *MESH_TFACE 490 1470 1471 1472
+ *MESH_TFACE 491 1473 1474 1475
+ *MESH_TFACE 492 1476 1477 1478
+ *MESH_TFACE 493 1479 1480 1481
+ *MESH_TFACE 494 1482 1483 1484
+ *MESH_TFACE 495 1485 1486 1487
+ *MESH_TFACE 496 1488 1489 1490
+ *MESH_TFACE 497 1491 1492 1493
+ *MESH_TFACE 498 1494 1495 1496
+ *MESH_TFACE 499 1497 1498 1499
+ *MESH_TFACE 500 1500 1501 1502
+ *MESH_TFACE 501 1503 1504 1505
+ *MESH_TFACE 502 1506 1507 1508
+ *MESH_TFACE 503 1509 1510 1511
+ *MESH_TFACE 504 1512 1513 1514
+ *MESH_TFACE 505 1515 1516 1517
+ *MESH_TFACE 506 1518 1519 1520
+ *MESH_TFACE 507 1521 1522 1523
+ *MESH_TFACE 508 1524 1525 1526
+ *MESH_TFACE 509 1527 1528 1529
+ *MESH_TFACE 510 1530 1531 1532
+ *MESH_TFACE 511 1533 1534 1535
+ *MESH_TFACE 512 1536 1537 1538
+ *MESH_TFACE 513 1539 1540 1541
+ *MESH_TFACE 514 1542 1543 1544
+ *MESH_TFACE 515 1545 1546 1547
+ *MESH_TFACE 516 1548 1549 1550
+ *MESH_TFACE 517 1551 1552 1553
+ *MESH_TFACE 518 1554 1555 1556
+ *MESH_TFACE 519 1557 1558 1559
+ *MESH_TFACE 520 1560 1561 1562
+ *MESH_TFACE 521 1563 1564 1565
+ *MESH_TFACE 522 1566 1567 1568
+ *MESH_TFACE 523 1569 1570 1571
+ *MESH_TFACE 524 1572 1573 1574
+ *MESH_TFACE 525 1575 1576 1577
+ *MESH_TFACE 526 1578 1579 1580
+ *MESH_TFACE 527 1581 1582 1583
+ *MESH_TFACE 528 1584 1585 1586
+ *MESH_TFACE 529 1587 1588 1589
+ *MESH_TFACE 530 1590 1591 1592
+ *MESH_TFACE 531 1593 1594 1595
+ *MESH_TFACE 532 1596 1597 1598
+ *MESH_TFACE 533 1599 1600 1601
+ *MESH_TFACE 534 1602 1603 1604
+ *MESH_TFACE 535 1605 1606 1607
+ *MESH_TFACE 536 1608 1609 1610
+ *MESH_TFACE 537 1611 1612 1613
+ *MESH_TFACE 538 1614 1615 1616
+ *MESH_TFACE 539 1617 1618 1619
+ *MESH_TFACE 540 1620 1621 1622
+ *MESH_TFACE 541 1623 1624 1625
+ *MESH_TFACE 542 1626 1627 1628
+ *MESH_TFACE 543 1629 1630 1631
+ *MESH_TFACE 544 1632 1633 1634
+ *MESH_TFACE 545 1635 1636 1637
+ *MESH_TFACE 546 1638 1639 1640
+ *MESH_TFACE 547 1641 1642 1643
+ *MESH_TFACE 548 1644 1645 1646
+ *MESH_TFACE 549 1647 1648 1649
+ *MESH_TFACE 550 1650 1651 1652
+ *MESH_TFACE 551 1653 1654 1655
+ *MESH_TFACE 552 1656 1657 1658
+ *MESH_TFACE 553 1659 1660 1661
+ *MESH_TFACE 554 1662 1663 1664
+ *MESH_TFACE 555 1665 1666 1667
+ *MESH_TFACE 556 1668 1669 1670
+ *MESH_TFACE 557 1671 1672 1673
+ *MESH_TFACE 558 1674 1675 1676
+ *MESH_TFACE 559 1677 1678 1679
+ *MESH_TFACE 560 1680 1681 1682
+ *MESH_TFACE 561 1683 1684 1685
+ *MESH_TFACE 562 1686 1687 1688
+ *MESH_TFACE 563 1689 1690 1691
+ *MESH_TFACE 564 1692 1693 1694
+ *MESH_TFACE 565 1695 1696 1697
+ *MESH_TFACE 566 1698 1699 1700
+ *MESH_TFACE 567 1701 1702 1703
+ *MESH_TFACE 568 1704 1705 1706
+ *MESH_TFACE 569 1707 1708 1709
+ *MESH_TFACE 570 1710 1711 1712
+ *MESH_TFACE 571 1713 1714 1715
+ }
+ *MESH_NUMCVERTEX 1716
+ *MESH_CVERTLIST {
+ *MESH_VERTCOL 0 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 2 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 3 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 4 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 5 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 6 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 7 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 8 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 9 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 10 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 11 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 12 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 13 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 14 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 15 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 16 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 17 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 18 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 19 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 20 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 21 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 22 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 23 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 24 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 25 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 26 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 27 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 28 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 29 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 30 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 31 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 32 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 33 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 34 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 35 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 36 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 37 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 38 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 39 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 40 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 41 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 42 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 43 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 44 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 45 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 46 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 47 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 48 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 49 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 50 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 51 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 52 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 53 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 54 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 55 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 56 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 57 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 58 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 59 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 60 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 61 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 62 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 63 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 64 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 65 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 66 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 67 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 68 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 69 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 70 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 71 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 72 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 73 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 74 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 75 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 76 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 77 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 78 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 79 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 80 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 81 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 82 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 83 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 84 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 85 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 86 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 87 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 88 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 89 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 90 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 91 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 92 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 93 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 94 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 95 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 96 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 97 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 98 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 99 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 100 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 101 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 102 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 103 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 104 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 105 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 106 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 107 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 108 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 109 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 110 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 111 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 112 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 113 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 114 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 115 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 116 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 117 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 118 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 119 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 120 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 121 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 122 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 123 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 124 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 125 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 126 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 127 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 128 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 129 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 130 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 131 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 132 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 133 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 134 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 135 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 136 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 137 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 138 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 139 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 140 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 141 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 142 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 143 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 144 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 145 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 146 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 147 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 148 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 149 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 150 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 151 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 152 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 153 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 154 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 155 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 156 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 157 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 158 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 159 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 160 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 161 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 162 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 163 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 164 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 165 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 166 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 167 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 168 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 169 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 170 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 171 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 172 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 173 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 174 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 175 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 176 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 177 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 178 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 179 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 180 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 181 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 182 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 183 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 184 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 185 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 186 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 187 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 188 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 189 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 190 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 191 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 192 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 193 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 194 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 195 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 196 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 197 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 198 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 199 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 200 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 201 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 202 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 203 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 204 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 205 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 206 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 207 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 208 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 209 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 210 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 211 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 212 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 213 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 214 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 215 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 216 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 217 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 218 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 219 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 220 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 221 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 222 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 223 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 224 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 225 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 226 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 227 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 228 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 229 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 230 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 231 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 232 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 233 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 234 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 235 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 236 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 237 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 238 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 239 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 240 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 241 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 242 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 243 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 244 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 245 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 246 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 247 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 248 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 249 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 250 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 251 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 252 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 253 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 254 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 255 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 256 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 257 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 258 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 259 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 260 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 261 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 262 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 263 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 264 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 265 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 266 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 267 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 268 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 269 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 270 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 271 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 272 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 273 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 274 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 275 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 276 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 277 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 278 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 279 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 280 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 281 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 282 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 283 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 284 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 285 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 286 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 287 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 288 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 289 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 290 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 291 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 292 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 293 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 294 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 295 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 296 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 297 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 298 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 299 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 300 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 301 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 302 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 303 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 304 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 305 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 306 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 307 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 308 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 309 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 310 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 311 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 312 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 313 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 314 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 315 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 316 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 317 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 318 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 319 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 320 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 321 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 322 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 323 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 324 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 325 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 326 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 327 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 328 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 329 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 330 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 331 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 332 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 333 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 334 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 335 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 336 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 337 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 338 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 339 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 340 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 341 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 342 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 343 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 344 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 345 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 346 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 347 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 348 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 349 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 350 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 351 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 352 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 353 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 354 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 355 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 356 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 357 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 358 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 359 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 360 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 361 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 362 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 363 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 364 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 365 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 366 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 367 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 368 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 369 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 370 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 371 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 372 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 373 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 374 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 375 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 376 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 377 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 378 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 379 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 380 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 381 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 382 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 383 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 384 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 385 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 386 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 387 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 388 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 389 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 390 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 391 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 392 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 393 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 394 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 395 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 396 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 397 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 398 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 399 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 400 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 401 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 402 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 403 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 404 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 405 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 406 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 407 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 408 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 409 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 410 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 411 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 412 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 413 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 414 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 415 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 416 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 417 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 418 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 419 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 420 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 421 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 422 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 423 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 424 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 425 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 426 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 427 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 428 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 429 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 430 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 431 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 432 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 433 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 434 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 435 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 436 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 437 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 438 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 439 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 440 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 441 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 442 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 443 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 444 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 445 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 446 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 447 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 448 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 449 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 450 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 451 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 452 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 453 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 454 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 455 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 456 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 457 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 458 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 459 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 460 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 461 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 462 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 463 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 464 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 465 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 466 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 467 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 468 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 469 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 470 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 471 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 472 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 473 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 474 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 475 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 476 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 477 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 478 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 479 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 480 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 481 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 482 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 483 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 484 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 485 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 486 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 487 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 488 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 489 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 490 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 491 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 492 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 493 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 494 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 495 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 496 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 497 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 498 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 499 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 500 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 501 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 502 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 503 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 504 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 505 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 506 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 507 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 508 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 509 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 510 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 511 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 512 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 513 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 514 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 515 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 516 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 517 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 518 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 519 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 520 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 521 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 522 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 523 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 524 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 525 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 526 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 527 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 528 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 529 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 530 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 531 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 532 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 533 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 534 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 535 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 536 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 537 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 538 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 539 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 540 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 541 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 542 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 543 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 544 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 545 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 546 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 547 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 548 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 549 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 550 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 551 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 552 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 553 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 554 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 555 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 556 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 557 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 558 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 559 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 560 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 561 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 562 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 563 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 564 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 565 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 566 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 567 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 568 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 569 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 570 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 571 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 572 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 573 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 574 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 575 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 576 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 577 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 578 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 579 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 580 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 581 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 582 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 583 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 584 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 585 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 586 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 587 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 588 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 589 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 590 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 591 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 592 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 593 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 594 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 595 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 596 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 597 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 598 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 599 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 600 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 601 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 602 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 603 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 604 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 605 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 606 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 607 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 608 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 609 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 610 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 611 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 612 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 613 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 614 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 615 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 616 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 617 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 618 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 619 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 620 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 621 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 622 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 623 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 624 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 625 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 626 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 627 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 628 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 629 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 630 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 631 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 632 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 633 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 634 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 635 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 636 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 637 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 638 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 639 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 640 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 641 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 642 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 643 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 644 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 645 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 646 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 647 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 648 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 649 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 650 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 651 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 652 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 653 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 654 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 655 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 656 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 657 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 658 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 659 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 660 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 661 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 662 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 663 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 664 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 665 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 666 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 667 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 668 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 669 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 670 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 671 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 672 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 673 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 674 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 675 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 676 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 677 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 678 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 679 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 680 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 681 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 682 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 683 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 684 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 685 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 686 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 687 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 688 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 689 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 690 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 691 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 692 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 693 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 694 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 695 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 696 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 697 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 698 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 699 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 700 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 701 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 702 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 703 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 704 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 705 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 706 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 707 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 708 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 709 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 710 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 711 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 712 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 713 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 714 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 715 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 716 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 717 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 718 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 719 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 720 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 721 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 722 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 723 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 724 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 725 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 726 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 727 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 728 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 729 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 730 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 731 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 732 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 733 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 734 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 735 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 736 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 737 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 738 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 739 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 740 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 741 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 742 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 743 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 744 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 745 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 746 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 747 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 748 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 749 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 750 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 751 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 752 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 753 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 754 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 755 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 756 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 757 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 758 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 759 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 760 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 761 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 762 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 763 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 764 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 765 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 766 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 767 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 768 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 769 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 770 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 771 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 772 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 773 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 774 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 775 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 776 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 777 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 778 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 779 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 780 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 781 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 782 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 783 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 784 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 785 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 786 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 787 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 788 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 789 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 790 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 791 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 792 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 793 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 794 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 795 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 796 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 797 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 798 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 799 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 800 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 801 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 802 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 803 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 804 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 805 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 806 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 807 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 808 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 809 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 810 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 811 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 812 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 813 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 814 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 815 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 816 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 817 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 818 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 819 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 820 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 821 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 822 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 823 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 824 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 825 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 826 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 827 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 828 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 829 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 830 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 831 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 832 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 833 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 834 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 835 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 836 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 837 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 838 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 839 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 840 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 841 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 842 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 843 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 844 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 845 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 846 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 847 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 848 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 849 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 850 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 851 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 852 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 853 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 854 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 855 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 856 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 857 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 858 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 859 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 860 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 861 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 862 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 863 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 864 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 865 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 866 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 867 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 868 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 869 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 870 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 871 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 872 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 873 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 874 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 875 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 876 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 877 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 878 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 879 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 880 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 881 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 882 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 883 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 884 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 885 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 886 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 887 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 888 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 889 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 890 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 891 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 892 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 893 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 894 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 895 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 896 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 897 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 898 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 899 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 900 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 901 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 902 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 903 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 904 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 905 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 906 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 907 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 908 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 909 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 910 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 911 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 912 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 913 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 914 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 915 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 916 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 917 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 918 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 919 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 920 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 921 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 922 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 923 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 924 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 925 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 926 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 927 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 928 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 929 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 930 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 931 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 932 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 933 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 934 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 935 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 936 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 937 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 938 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 939 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 940 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 941 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 942 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 943 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 944 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 945 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 946 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 947 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 948 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 949 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 950 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 951 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 952 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 953 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 954 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 955 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 956 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 957 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 958 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 959 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 960 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 961 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 962 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 963 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 964 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 965 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 966 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 967 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 968 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 969 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 970 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 971 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 972 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 973 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 974 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 975 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 976 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 977 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 978 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 979 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 980 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 981 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 982 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 983 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 984 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 985 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 986 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 987 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 988 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 989 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 990 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 991 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 992 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 993 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 994 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 995 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 996 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 997 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 998 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 999 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1000 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1001 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1002 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1003 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1004 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1005 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1006 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1007 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1008 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1009 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1010 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1011 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1012 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1013 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1014 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1015 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1016 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1017 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1018 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1019 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1020 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1021 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1022 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1023 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1024 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1025 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1026 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1027 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1028 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1029 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1030 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1031 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1032 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1033 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1034 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1035 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1036 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1037 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1038 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1039 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1040 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1041 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1042 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1043 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1044 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1045 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1046 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1047 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1048 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1049 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1050 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1051 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1052 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1053 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1054 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1055 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1056 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1057 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1058 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1059 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1060 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1061 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1062 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1063 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1064 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1065 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1066 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1067 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1068 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1069 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1070 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1071 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1072 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1073 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1074 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1075 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1076 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1077 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1078 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1079 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1080 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1081 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1082 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1083 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1084 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1085 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1086 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1087 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1088 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1089 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1090 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1091 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1092 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1093 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1094 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1095 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1096 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1097 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1098 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1099 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1100 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1101 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1102 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1103 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1104 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1105 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1106 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1107 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1108 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1109 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1110 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1111 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1112 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1113 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1114 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1115 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1116 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1117 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1118 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1119 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1120 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1121 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1122 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1123 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1124 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1125 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1126 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1127 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1128 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1129 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1130 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1131 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1132 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1133 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1134 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1135 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1136 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1137 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1138 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1139 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1140 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1141 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1142 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1143 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1144 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1145 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1146 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1147 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1148 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1149 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1150 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1151 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1152 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1153 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1154 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1155 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1156 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1157 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1158 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1159 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1160 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1161 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1162 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1163 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1164 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1165 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1166 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1167 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1168 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1169 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1170 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1171 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1172 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1173 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1174 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1175 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1176 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1177 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1178 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1179 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1180 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1181 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1182 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1183 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1184 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1185 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1186 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1187 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1188 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1189 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1190 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1191 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1192 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1193 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1194 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1195 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1196 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1197 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1198 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1199 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1200 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1201 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1202 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1203 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1204 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1205 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1206 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1207 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1208 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1209 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1210 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1211 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1212 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1213 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1214 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1215 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1216 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1217 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1218 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1219 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1220 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1221 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1222 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1223 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1224 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1225 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1226 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1227 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1228 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1229 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1230 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1231 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1232 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1233 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1234 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1235 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1236 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1237 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1238 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1239 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1240 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1241 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1242 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1243 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1244 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1245 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1246 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1247 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1248 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1249 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1250 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1251 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1252 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1253 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1254 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1255 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1256 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1257 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1258 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1259 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1260 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1261 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1262 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1263 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1264 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1265 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1266 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1267 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1268 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1269 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1270 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1271 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1272 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1273 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1274 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1275 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1276 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1277 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1278 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1279 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1280 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1281 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1282 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1283 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1284 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1285 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1286 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1287 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1288 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1289 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1290 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1291 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1292 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1293 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1294 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1295 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1296 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1297 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1298 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1299 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1300 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1301 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1302 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1303 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1304 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1305 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1306 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1307 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1308 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1309 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1310 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1311 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1312 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1313 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1314 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1315 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1316 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1317 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1318 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1319 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1320 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1321 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1322 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1323 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1324 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1325 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1326 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1327 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1328 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1329 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1330 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1331 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1332 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1333 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1334 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1335 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1336 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1337 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1338 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1339 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1340 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1341 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1342 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1343 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1344 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1345 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1346 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1347 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1348 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1349 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1350 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1351 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1352 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1353 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1354 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1355 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1356 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1357 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1358 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1359 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1360 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1361 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1362 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1363 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1364 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1365 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1366 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1367 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1368 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1369 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1370 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1371 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1372 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1373 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1374 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1375 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1376 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1377 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1378 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1379 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1380 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1381 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1382 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1383 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1384 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1385 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1386 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1387 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1388 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1389 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1390 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1391 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1392 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1393 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1394 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1395 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1396 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1397 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1398 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1399 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1400 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1401 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1402 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1403 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1404 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1405 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1406 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1407 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1408 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1409 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1410 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1411 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1412 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1413 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1414 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1415 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1416 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1417 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1418 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1419 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1420 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1421 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1422 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1423 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1424 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1425 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1426 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1427 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1428 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1429 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1430 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1431 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1432 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1433 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1434 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1435 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1436 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1437 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1438 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1439 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1440 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1441 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1442 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1443 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1444 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1445 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1446 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1447 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1448 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1449 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1450 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1451 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1452 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1453 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1454 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1455 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1456 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1457 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1458 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1459 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1460 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1461 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1462 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1463 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1464 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1465 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1466 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1467 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1468 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1469 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1470 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1471 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1472 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1473 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1474 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1475 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1476 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1477 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1478 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1479 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1480 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1481 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1482 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1483 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1484 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1485 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1486 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1487 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1488 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1489 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1490 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1491 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1492 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1493 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1494 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1495 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1496 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1497 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1498 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1499 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1500 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1501 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1502 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1503 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1504 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1505 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1506 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1507 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1508 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1509 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1510 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1511 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1512 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1513 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1514 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1515 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1516 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1517 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1518 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1519 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1520 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1521 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1522 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1523 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1524 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1525 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1526 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1527 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1528 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1529 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1530 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1531 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1532 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1533 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1534 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1535 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1536 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1537 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1538 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1539 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1540 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1541 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1542 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1543 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1544 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1545 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1546 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1547 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1548 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1549 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1550 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1551 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1552 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1553 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1554 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1555 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1556 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1557 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1558 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1559 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1560 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1561 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1562 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1563 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1564 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1565 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1566 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1567 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1568 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1569 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1570 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1571 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1572 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1573 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1574 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1575 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1576 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1577 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1578 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1579 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1580 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1581 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1582 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1583 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1584 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1585 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1586 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1587 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1588 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1589 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1590 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1591 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1592 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1593 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1594 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1595 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1596 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1597 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1598 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1599 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1600 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1601 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1602 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1603 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1604 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1605 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1606 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1607 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1608 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1609 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1610 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1611 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1612 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1613 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1614 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1615 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1616 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1617 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1618 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1619 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1620 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1621 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1622 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1623 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1624 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1625 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1626 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1627 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1628 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1629 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1630 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1631 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1632 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1633 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1634 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1635 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1636 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1637 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1638 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1639 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1640 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1641 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1642 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1643 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1644 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1645 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1646 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1647 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1648 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1649 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1650 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1651 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1652 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1653 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1654 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1655 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1656 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1657 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1658 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1659 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1660 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1661 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1662 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1663 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1664 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1665 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1666 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1667 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1668 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1669 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1670 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1671 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1672 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1673 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1674 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1675 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1676 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1677 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1678 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1679 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1680 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1681 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1682 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1683 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1684 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1685 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1686 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1687 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1688 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1689 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1690 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1691 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1692 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1693 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1694 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1695 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1696 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1697 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1698 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1699 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1700 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1701 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1702 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1703 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1704 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1705 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1706 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1707 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1708 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1709 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1710 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1711 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1712 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1713 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1714 1.000000 1.000000 1.000000
+ *MESH_VERTCOL 1715 1.000000 1.000000 1.000000
+ }
+ *MESH_NUMCVFACES 572
+ *MESH_CFACELIST {
+ *MESH_CFACE 0 0 1 2
+ *MESH_CFACE 1 3 4 5
+ *MESH_CFACE 2 6 7 8
+ *MESH_CFACE 3 9 10 11
+ *MESH_CFACE 4 12 13 14
+ *MESH_CFACE 5 15 16 17
+ *MESH_CFACE 6 18 19 20
+ *MESH_CFACE 7 21 22 23
+ *MESH_CFACE 8 24 25 26
+ *MESH_CFACE 9 27 28 29
+ *MESH_CFACE 10 30 31 32
+ *MESH_CFACE 11 33 34 35
+ *MESH_CFACE 12 36 37 38
+ *MESH_CFACE 13 39 40 41
+ *MESH_CFACE 14 42 43 44
+ *MESH_CFACE 15 45 46 47
+ *MESH_CFACE 16 48 49 50
+ *MESH_CFACE 17 51 52 53
+ *MESH_CFACE 18 54 55 56
+ *MESH_CFACE 19 57 58 59
+ *MESH_CFACE 20 60 61 62
+ *MESH_CFACE 21 63 64 65
+ *MESH_CFACE 22 66 67 68
+ *MESH_CFACE 23 69 70 71
+ *MESH_CFACE 24 72 73 74
+ *MESH_CFACE 25 75 76 77
+ *MESH_CFACE 26 78 79 80
+ *MESH_CFACE 27 81 82 83
+ *MESH_CFACE 28 84 85 86
+ *MESH_CFACE 29 87 88 89
+ *MESH_CFACE 30 90 91 92
+ *MESH_CFACE 31 93 94 95
+ *MESH_CFACE 32 96 97 98
+ *MESH_CFACE 33 99 100 101
+ *MESH_CFACE 34 102 103 104
+ *MESH_CFACE 35 105 106 107
+ *MESH_CFACE 36 108 109 110
+ *MESH_CFACE 37 111 112 113
+ *MESH_CFACE 38 114 115 116
+ *MESH_CFACE 39 117 118 119
+ *MESH_CFACE 40 120 121 122
+ *MESH_CFACE 41 123 124 125
+ *MESH_CFACE 42 126 127 128
+ *MESH_CFACE 43 129 130 131
+ *MESH_CFACE 44 132 133 134
+ *MESH_CFACE 45 135 136 137
+ *MESH_CFACE 46 138 139 140
+ *MESH_CFACE 47 141 142 143
+ *MESH_CFACE 48 144 145 146
+ *MESH_CFACE 49 147 148 149
+ *MESH_CFACE 50 150 151 152
+ *MESH_CFACE 51 153 154 155
+ *MESH_CFACE 52 156 157 158
+ *MESH_CFACE 53 159 160 161
+ *MESH_CFACE 54 162 163 164
+ *MESH_CFACE 55 165 166 167
+ *MESH_CFACE 56 168 169 170
+ *MESH_CFACE 57 171 172 173
+ *MESH_CFACE 58 174 175 176
+ *MESH_CFACE 59 177 178 179
+ *MESH_CFACE 60 180 181 182
+ *MESH_CFACE 61 183 184 185
+ *MESH_CFACE 62 186 187 188
+ *MESH_CFACE 63 189 190 191
+ *MESH_CFACE 64 192 193 194
+ *MESH_CFACE 65 195 196 197
+ *MESH_CFACE 66 198 199 200
+ *MESH_CFACE 67 201 202 203
+ *MESH_CFACE 68 204 205 206
+ *MESH_CFACE 69 207 208 209
+ *MESH_CFACE 70 210 211 212
+ *MESH_CFACE 71 213 214 215
+ *MESH_CFACE 72 216 217 218
+ *MESH_CFACE 73 219 220 221
+ *MESH_CFACE 74 222 223 224
+ *MESH_CFACE 75 225 226 227
+ *MESH_CFACE 76 228 229 230
+ *MESH_CFACE 77 231 232 233
+ *MESH_CFACE 78 234 235 236
+ *MESH_CFACE 79 237 238 239
+ *MESH_CFACE 80 240 241 242
+ *MESH_CFACE 81 243 244 245
+ *MESH_CFACE 82 246 247 248
+ *MESH_CFACE 83 249 250 251
+ *MESH_CFACE 84 252 253 254
+ *MESH_CFACE 85 255 256 257
+ *MESH_CFACE 86 258 259 260
+ *MESH_CFACE 87 261 262 263
+ *MESH_CFACE 88 264 265 266
+ *MESH_CFACE 89 267 268 269
+ *MESH_CFACE 90 270 271 272
+ *MESH_CFACE 91 273 274 275
+ *MESH_CFACE 92 276 277 278
+ *MESH_CFACE 93 279 280 281
+ *MESH_CFACE 94 282 283 284
+ *MESH_CFACE 95 285 286 287
+ *MESH_CFACE 96 288 289 290
+ *MESH_CFACE 97 291 292 293
+ *MESH_CFACE 98 294 295 296
+ *MESH_CFACE 99 297 298 299
+ *MESH_CFACE 100 300 301 302
+ *MESH_CFACE 101 303 304 305
+ *MESH_CFACE 102 306 307 308
+ *MESH_CFACE 103 309 310 311
+ *MESH_CFACE 104 312 313 314
+ *MESH_CFACE 105 315 316 317
+ *MESH_CFACE 106 318 319 320
+ *MESH_CFACE 107 321 322 323
+ *MESH_CFACE 108 324 325 326
+ *MESH_CFACE 109 327 328 329
+ *MESH_CFACE 110 330 331 332
+ *MESH_CFACE 111 333 334 335
+ *MESH_CFACE 112 336 337 338
+ *MESH_CFACE 113 339 340 341
+ *MESH_CFACE 114 342 343 344
+ *MESH_CFACE 115 345 346 347
+ *MESH_CFACE 116 348 349 350
+ *MESH_CFACE 117 351 352 353
+ *MESH_CFACE 118 354 355 356
+ *MESH_CFACE 119 357 358 359
+ *MESH_CFACE 120 360 361 362
+ *MESH_CFACE 121 363 364 365
+ *MESH_CFACE 122 366 367 368
+ *MESH_CFACE 123 369 370 371
+ *MESH_CFACE 124 372 373 374
+ *MESH_CFACE 125 375 376 377
+ *MESH_CFACE 126 378 379 380
+ *MESH_CFACE 127 381 382 383
+ *MESH_CFACE 128 384 385 386
+ *MESH_CFACE 129 387 388 389
+ *MESH_CFACE 130 390 391 392
+ *MESH_CFACE 131 393 394 395
+ *MESH_CFACE 132 396 397 398
+ *MESH_CFACE 133 399 400 401
+ *MESH_CFACE 134 402 403 404
+ *MESH_CFACE 135 405 406 407
+ *MESH_CFACE 136 408 409 410
+ *MESH_CFACE 137 411 412 413
+ *MESH_CFACE 138 414 415 416
+ *MESH_CFACE 139 417 418 419
+ *MESH_CFACE 140 420 421 422
+ *MESH_CFACE 141 423 424 425
+ *MESH_CFACE 142 426 427 428
+ *MESH_CFACE 143 429 430 431
+ *MESH_CFACE 144 432 433 434
+ *MESH_CFACE 145 435 436 437
+ *MESH_CFACE 146 438 439 440
+ *MESH_CFACE 147 441 442 443
+ *MESH_CFACE 148 444 445 446
+ *MESH_CFACE 149 447 448 449
+ *MESH_CFACE 150 450 451 452
+ *MESH_CFACE 151 453 454 455
+ *MESH_CFACE 152 456 457 458
+ *MESH_CFACE 153 459 460 461
+ *MESH_CFACE 154 462 463 464
+ *MESH_CFACE 155 465 466 467
+ *MESH_CFACE 156 468 469 470
+ *MESH_CFACE 157 471 472 473
+ *MESH_CFACE 158 474 475 476
+ *MESH_CFACE 159 477 478 479
+ *MESH_CFACE 160 480 481 482
+ *MESH_CFACE 161 483 484 485
+ *MESH_CFACE 162 486 487 488
+ *MESH_CFACE 163 489 490 491
+ *MESH_CFACE 164 492 493 494
+ *MESH_CFACE 165 495 496 497
+ *MESH_CFACE 166 498 499 500
+ *MESH_CFACE 167 501 502 503
+ *MESH_CFACE 168 504 505 506
+ *MESH_CFACE 169 507 508 509
+ *MESH_CFACE 170 510 511 512
+ *MESH_CFACE 171 513 514 515
+ *MESH_CFACE 172 516 517 518
+ *MESH_CFACE 173 519 520 521
+ *MESH_CFACE 174 522 523 524
+ *MESH_CFACE 175 525 526 527
+ *MESH_CFACE 176 528 529 530
+ *MESH_CFACE 177 531 532 533
+ *MESH_CFACE 178 534 535 536
+ *MESH_CFACE 179 537 538 539
+ *MESH_CFACE 180 540 541 542
+ *MESH_CFACE 181 543 544 545
+ *MESH_CFACE 182 546 547 548
+ *MESH_CFACE 183 549 550 551
+ *MESH_CFACE 184 552 553 554
+ *MESH_CFACE 185 555 556 557
+ *MESH_CFACE 186 558 559 560
+ *MESH_CFACE 187 561 562 563
+ *MESH_CFACE 188 564 565 566
+ *MESH_CFACE 189 567 568 569
+ *MESH_CFACE 190 570 571 572
+ *MESH_CFACE 191 573 574 575
+ *MESH_CFACE 192 576 577 578
+ *MESH_CFACE 193 579 580 581
+ *MESH_CFACE 194 582 583 584
+ *MESH_CFACE 195 585 586 587
+ *MESH_CFACE 196 588 589 590
+ *MESH_CFACE 197 591 592 593
+ *MESH_CFACE 198 594 595 596
+ *MESH_CFACE 199 597 598 599
+ *MESH_CFACE 200 600 601 602
+ *MESH_CFACE 201 603 604 605
+ *MESH_CFACE 202 606 607 608
+ *MESH_CFACE 203 609 610 611
+ *MESH_CFACE 204 612 613 614
+ *MESH_CFACE 205 615 616 617
+ *MESH_CFACE 206 618 619 620
+ *MESH_CFACE 207 621 622 623
+ *MESH_CFACE 208 624 625 626
+ *MESH_CFACE 209 627 628 629
+ *MESH_CFACE 210 630 631 632
+ *MESH_CFACE 211 633 634 635
+ *MESH_CFACE 212 636 637 638
+ *MESH_CFACE 213 639 640 641
+ *MESH_CFACE 214 642 643 644
+ *MESH_CFACE 215 645 646 647
+ *MESH_CFACE 216 648 649 650
+ *MESH_CFACE 217 651 652 653
+ *MESH_CFACE 218 654 655 656
+ *MESH_CFACE 219 657 658 659
+ *MESH_CFACE 220 660 661 662
+ *MESH_CFACE 221 663 664 665
+ *MESH_CFACE 222 666 667 668
+ *MESH_CFACE 223 669 670 671
+ *MESH_CFACE 224 672 673 674
+ *MESH_CFACE 225 675 676 677
+ *MESH_CFACE 226 678 679 680
+ *MESH_CFACE 227 681 682 683
+ *MESH_CFACE 228 684 685 686
+ *MESH_CFACE 229 687 688 689
+ *MESH_CFACE 230 690 691 692
+ *MESH_CFACE 231 693 694 695
+ *MESH_CFACE 232 696 697 698
+ *MESH_CFACE 233 699 700 701
+ *MESH_CFACE 234 702 703 704
+ *MESH_CFACE 235 705 706 707
+ *MESH_CFACE 236 708 709 710
+ *MESH_CFACE 237 711 712 713
+ *MESH_CFACE 238 714 715 716
+ *MESH_CFACE 239 717 718 719
+ *MESH_CFACE 240 720 721 722
+ *MESH_CFACE 241 723 724 725
+ *MESH_CFACE 242 726 727 728
+ *MESH_CFACE 243 729 730 731
+ *MESH_CFACE 244 732 733 734
+ *MESH_CFACE 245 735 736 737
+ *MESH_CFACE 246 738 739 740
+ *MESH_CFACE 247 741 742 743
+ *MESH_CFACE 248 744 745 746
+ *MESH_CFACE 249 747 748 749
+ *MESH_CFACE 250 750 751 752
+ *MESH_CFACE 251 753 754 755
+ *MESH_CFACE 252 756 757 758
+ *MESH_CFACE 253 759 760 761
+ *MESH_CFACE 254 762 763 764
+ *MESH_CFACE 255 765 766 767
+ *MESH_CFACE 256 768 769 770
+ *MESH_CFACE 257 771 772 773
+ *MESH_CFACE 258 774 775 776
+ *MESH_CFACE 259 777 778 779
+ *MESH_CFACE 260 780 781 782
+ *MESH_CFACE 261 783 784 785
+ *MESH_CFACE 262 786 787 788
+ *MESH_CFACE 263 789 790 791
+ *MESH_CFACE 264 792 793 794
+ *MESH_CFACE 265 795 796 797
+ *MESH_CFACE 266 798 799 800
+ *MESH_CFACE 267 801 802 803
+ *MESH_CFACE 268 804 805 806
+ *MESH_CFACE 269 807 808 809
+ *MESH_CFACE 270 810 811 812
+ *MESH_CFACE 271 813 814 815
+ *MESH_CFACE 272 816 817 818
+ *MESH_CFACE 273 819 820 821
+ *MESH_CFACE 274 822 823 824
+ *MESH_CFACE 275 825 826 827
+ *MESH_CFACE 276 828 829 830
+ *MESH_CFACE 277 831 832 833
+ *MESH_CFACE 278 834 835 836
+ *MESH_CFACE 279 837 838 839
+ *MESH_CFACE 280 840 841 842
+ *MESH_CFACE 281 843 844 845
+ *MESH_CFACE 282 846 847 848
+ *MESH_CFACE 283 849 850 851
+ *MESH_CFACE 284 852 853 854
+ *MESH_CFACE 285 855 856 857
+ *MESH_CFACE 286 858 859 860
+ *MESH_CFACE 287 861 862 863
+ *MESH_CFACE 288 864 865 866
+ *MESH_CFACE 289 867 868 869
+ *MESH_CFACE 290 870 871 872
+ *MESH_CFACE 291 873 874 875
+ *MESH_CFACE 292 876 877 878
+ *MESH_CFACE 293 879 880 881
+ *MESH_CFACE 294 882 883 884
+ *MESH_CFACE 295 885 886 887
+ *MESH_CFACE 296 888 889 890
+ *MESH_CFACE 297 891 892 893
+ *MESH_CFACE 298 894 895 896
+ *MESH_CFACE 299 897 898 899
+ *MESH_CFACE 300 900 901 902
+ *MESH_CFACE 301 903 904 905
+ *MESH_CFACE 302 906 907 908
+ *MESH_CFACE 303 909 910 911
+ *MESH_CFACE 304 912 913 914
+ *MESH_CFACE 305 915 916 917
+ *MESH_CFACE 306 918 919 920
+ *MESH_CFACE 307 921 922 923
+ *MESH_CFACE 308 924 925 926
+ *MESH_CFACE 309 927 928 929
+ *MESH_CFACE 310 930 931 932
+ *MESH_CFACE 311 933 934 935
+ *MESH_CFACE 312 936 937 938
+ *MESH_CFACE 313 939 940 941
+ *MESH_CFACE 314 942 943 944
+ *MESH_CFACE 315 945 946 947
+ *MESH_CFACE 316 948 949 950
+ *MESH_CFACE 317 951 952 953
+ *MESH_CFACE 318 954 955 956
+ *MESH_CFACE 319 957 958 959
+ *MESH_CFACE 320 960 961 962
+ *MESH_CFACE 321 963 964 965
+ *MESH_CFACE 322 966 967 968
+ *MESH_CFACE 323 969 970 971
+ *MESH_CFACE 324 972 973 974
+ *MESH_CFACE 325 975 976 977
+ *MESH_CFACE 326 978 979 980
+ *MESH_CFACE 327 981 982 983
+ *MESH_CFACE 328 984 985 986
+ *MESH_CFACE 329 987 988 989
+ *MESH_CFACE 330 990 991 992
+ *MESH_CFACE 331 993 994 995
+ *MESH_CFACE 332 996 997 998
+ *MESH_CFACE 333 999 1000 1001
+ *MESH_CFACE 334 1002 1003 1004
+ *MESH_CFACE 335 1005 1006 1007
+ *MESH_CFACE 336 1008 1009 1010
+ *MESH_CFACE 337 1011 1012 1013
+ *MESH_CFACE 338 1014 1015 1016
+ *MESH_CFACE 339 1017 1018 1019
+ *MESH_CFACE 340 1020 1021 1022
+ *MESH_CFACE 341 1023 1024 1025
+ *MESH_CFACE 342 1026 1027 1028
+ *MESH_CFACE 343 1029 1030 1031
+ *MESH_CFACE 344 1032 1033 1034
+ *MESH_CFACE 345 1035 1036 1037
+ *MESH_CFACE 346 1038 1039 1040
+ *MESH_CFACE 347 1041 1042 1043
+ *MESH_CFACE 348 1044 1045 1046
+ *MESH_CFACE 349 1047 1048 1049
+ *MESH_CFACE 350 1050 1051 1052
+ *MESH_CFACE 351 1053 1054 1055
+ *MESH_CFACE 352 1056 1057 1058
+ *MESH_CFACE 353 1059 1060 1061
+ *MESH_CFACE 354 1062 1063 1064
+ *MESH_CFACE 355 1065 1066 1067
+ *MESH_CFACE 356 1068 1069 1070
+ *MESH_CFACE 357 1071 1072 1073
+ *MESH_CFACE 358 1074 1075 1076
+ *MESH_CFACE 359 1077 1078 1079
+ *MESH_CFACE 360 1080 1081 1082
+ *MESH_CFACE 361 1083 1084 1085
+ *MESH_CFACE 362 1086 1087 1088
+ *MESH_CFACE 363 1089 1090 1091
+ *MESH_CFACE 364 1092 1093 1094
+ *MESH_CFACE 365 1095 1096 1097
+ *MESH_CFACE 366 1098 1099 1100
+ *MESH_CFACE 367 1101 1102 1103
+ *MESH_CFACE 368 1104 1105 1106
+ *MESH_CFACE 369 1107 1108 1109
+ *MESH_CFACE 370 1110 1111 1112
+ *MESH_CFACE 371 1113 1114 1115
+ *MESH_CFACE 372 1116 1117 1118
+ *MESH_CFACE 373 1119 1120 1121
+ *MESH_CFACE 374 1122 1123 1124
+ *MESH_CFACE 375 1125 1126 1127
+ *MESH_CFACE 376 1128 1129 1130
+ *MESH_CFACE 377 1131 1132 1133
+ *MESH_CFACE 378 1134 1135 1136
+ *MESH_CFACE 379 1137 1138 1139
+ *MESH_CFACE 380 1140 1141 1142
+ *MESH_CFACE 381 1143 1144 1145
+ *MESH_CFACE 382 1146 1147 1148
+ *MESH_CFACE 383 1149 1150 1151
+ *MESH_CFACE 384 1152 1153 1154
+ *MESH_CFACE 385 1155 1156 1157
+ *MESH_CFACE 386 1158 1159 1160
+ *MESH_CFACE 387 1161 1162 1163
+ *MESH_CFACE 388 1164 1165 1166
+ *MESH_CFACE 389 1167 1168 1169
+ *MESH_CFACE 390 1170 1171 1172
+ *MESH_CFACE 391 1173 1174 1175
+ *MESH_CFACE 392 1176 1177 1178
+ *MESH_CFACE 393 1179 1180 1181
+ *MESH_CFACE 394 1182 1183 1184
+ *MESH_CFACE 395 1185 1186 1187
+ *MESH_CFACE 396 1188 1189 1190
+ *MESH_CFACE 397 1191 1192 1193
+ *MESH_CFACE 398 1194 1195 1196
+ *MESH_CFACE 399 1197 1198 1199
+ *MESH_CFACE 400 1200 1201 1202
+ *MESH_CFACE 401 1203 1204 1205
+ *MESH_CFACE 402 1206 1207 1208
+ *MESH_CFACE 403 1209 1210 1211
+ *MESH_CFACE 404 1212 1213 1214
+ *MESH_CFACE 405 1215 1216 1217
+ *MESH_CFACE 406 1218 1219 1220
+ *MESH_CFACE 407 1221 1222 1223
+ *MESH_CFACE 408 1224 1225 1226
+ *MESH_CFACE 409 1227 1228 1229
+ *MESH_CFACE 410 1230 1231 1232
+ *MESH_CFACE 411 1233 1234 1235
+ *MESH_CFACE 412 1236 1237 1238
+ *MESH_CFACE 413 1239 1240 1241
+ *MESH_CFACE 414 1242 1243 1244
+ *MESH_CFACE 415 1245 1246 1247
+ *MESH_CFACE 416 1248 1249 1250
+ *MESH_CFACE 417 1251 1252 1253
+ *MESH_CFACE 418 1254 1255 1256
+ *MESH_CFACE 419 1257 1258 1259
+ *MESH_CFACE 420 1260 1261 1262
+ *MESH_CFACE 421 1263 1264 1265
+ *MESH_CFACE 422 1266 1267 1268
+ *MESH_CFACE 423 1269 1270 1271
+ *MESH_CFACE 424 1272 1273 1274
+ *MESH_CFACE 425 1275 1276 1277
+ *MESH_CFACE 426 1278 1279 1280
+ *MESH_CFACE 427 1281 1282 1283
+ *MESH_CFACE 428 1284 1285 1286
+ *MESH_CFACE 429 1287 1288 1289
+ *MESH_CFACE 430 1290 1291 1292
+ *MESH_CFACE 431 1293 1294 1295
+ *MESH_CFACE 432 1296 1297 1298
+ *MESH_CFACE 433 1299 1300 1301
+ *MESH_CFACE 434 1302 1303 1304
+ *MESH_CFACE 435 1305 1306 1307
+ *MESH_CFACE 436 1308 1309 1310
+ *MESH_CFACE 437 1311 1312 1313
+ *MESH_CFACE 438 1314 1315 1316
+ *MESH_CFACE 439 1317 1318 1319
+ *MESH_CFACE 440 1320 1321 1322
+ *MESH_CFACE 441 1323 1324 1325
+ *MESH_CFACE 442 1326 1327 1328
+ *MESH_CFACE 443 1329 1330 1331
+ *MESH_CFACE 444 1332 1333 1334
+ *MESH_CFACE 445 1335 1336 1337
+ *MESH_CFACE 446 1338 1339 1340
+ *MESH_CFACE 447 1341 1342 1343
+ *MESH_CFACE 448 1344 1345 1346
+ *MESH_CFACE 449 1347 1348 1349
+ *MESH_CFACE 450 1350 1351 1352
+ *MESH_CFACE 451 1353 1354 1355
+ *MESH_CFACE 452 1356 1357 1358
+ *MESH_CFACE 453 1359 1360 1361
+ *MESH_CFACE 454 1362 1363 1364
+ *MESH_CFACE 455 1365 1366 1367
+ *MESH_CFACE 456 1368 1369 1370
+ *MESH_CFACE 457 1371 1372 1373
+ *MESH_CFACE 458 1374 1375 1376
+ *MESH_CFACE 459 1377 1378 1379
+ *MESH_CFACE 460 1380 1381 1382
+ *MESH_CFACE 461 1383 1384 1385
+ *MESH_CFACE 462 1386 1387 1388
+ *MESH_CFACE 463 1389 1390 1391
+ *MESH_CFACE 464 1392 1393 1394
+ *MESH_CFACE 465 1395 1396 1397
+ *MESH_CFACE 466 1398 1399 1400
+ *MESH_CFACE 467 1401 1402 1403
+ *MESH_CFACE 468 1404 1405 1406
+ *MESH_CFACE 469 1407 1408 1409
+ *MESH_CFACE 470 1410 1411 1412
+ *MESH_CFACE 471 1413 1414 1415
+ *MESH_CFACE 472 1416 1417 1418
+ *MESH_CFACE 473 1419 1420 1421
+ *MESH_CFACE 474 1422 1423 1424
+ *MESH_CFACE 475 1425 1426 1427
+ *MESH_CFACE 476 1428 1429 1430
+ *MESH_CFACE 477 1431 1432 1433
+ *MESH_CFACE 478 1434 1435 1436
+ *MESH_CFACE 479 1437 1438 1439
+ *MESH_CFACE 480 1440 1441 1442
+ *MESH_CFACE 481 1443 1444 1445
+ *MESH_CFACE 482 1446 1447 1448
+ *MESH_CFACE 483 1449 1450 1451
+ *MESH_CFACE 484 1452 1453 1454
+ *MESH_CFACE 485 1455 1456 1457
+ *MESH_CFACE 486 1458 1459 1460
+ *MESH_CFACE 487 1461 1462 1463
+ *MESH_CFACE 488 1464 1465 1466
+ *MESH_CFACE 489 1467 1468 1469
+ *MESH_CFACE 490 1470 1471 1472
+ *MESH_CFACE 491 1473 1474 1475
+ *MESH_CFACE 492 1476 1477 1478
+ *MESH_CFACE 493 1479 1480 1481
+ *MESH_CFACE 494 1482 1483 1484
+ *MESH_CFACE 495 1485 1486 1487
+ *MESH_CFACE 496 1488 1489 1490
+ *MESH_CFACE 497 1491 1492 1493
+ *MESH_CFACE 498 1494 1495 1496
+ *MESH_CFACE 499 1497 1498 1499
+ *MESH_CFACE 500 1500 1501 1502
+ *MESH_CFACE 501 1503 1504 1505
+ *MESH_CFACE 502 1506 1507 1508
+ *MESH_CFACE 503 1509 1510 1511
+ *MESH_CFACE 504 1512 1513 1514
+ *MESH_CFACE 505 1515 1516 1517
+ *MESH_CFACE 506 1518 1519 1520
+ *MESH_CFACE 507 1521 1522 1523
+ *MESH_CFACE 508 1524 1525 1526
+ *MESH_CFACE 509 1527 1528 1529
+ *MESH_CFACE 510 1530 1531 1532
+ *MESH_CFACE 511 1533 1534 1535
+ *MESH_CFACE 512 1536 1537 1538
+ *MESH_CFACE 513 1539 1540 1541
+ *MESH_CFACE 514 1542 1543 1544
+ *MESH_CFACE 515 1545 1546 1547
+ *MESH_CFACE 516 1548 1549 1550
+ *MESH_CFACE 517 1551 1552 1553
+ *MESH_CFACE 518 1554 1555 1556
+ *MESH_CFACE 519 1557 1558 1559
+ *MESH_CFACE 520 1560 1561 1562
+ *MESH_CFACE 521 1563 1564 1565
+ *MESH_CFACE 522 1566 1567 1568
+ *MESH_CFACE 523 1569 1570 1571
+ *MESH_CFACE 524 1572 1573 1574
+ *MESH_CFACE 525 1575 1576 1577
+ *MESH_CFACE 526 1578 1579 1580
+ *MESH_CFACE 527 1581 1582 1583
+ *MESH_CFACE 528 1584 1585 1586
+ *MESH_CFACE 529 1587 1588 1589
+ *MESH_CFACE 530 1590 1591 1592
+ *MESH_CFACE 531 1593 1594 1595
+ *MESH_CFACE 532 1596 1597 1598
+ *MESH_CFACE 533 1599 1600 1601
+ *MESH_CFACE 534 1602 1603 1604
+ *MESH_CFACE 535 1605 1606 1607
+ *MESH_CFACE 536 1608 1609 1610
+ *MESH_CFACE 537 1611 1612 1613
+ *MESH_CFACE 538 1614 1615 1616
+ *MESH_CFACE 539 1617 1618 1619
+ *MESH_CFACE 540 1620 1621 1622
+ *MESH_CFACE 541 1623 1624 1625
+ *MESH_CFACE 542 1626 1627 1628
+ *MESH_CFACE 543 1629 1630 1631
+ *MESH_CFACE 544 1632 1633 1634
+ *MESH_CFACE 545 1635 1636 1637
+ *MESH_CFACE 546 1638 1639 1640
+ *MESH_CFACE 547 1641 1642 1643
+ *MESH_CFACE 548 1644 1645 1646
+ *MESH_CFACE 549 1647 1648 1649
+ *MESH_CFACE 550 1650 1651 1652
+ *MESH_CFACE 551 1653 1654 1655
+ *MESH_CFACE 552 1656 1657 1658
+ *MESH_CFACE 553 1659 1660 1661
+ *MESH_CFACE 554 1662 1663 1664
+ *MESH_CFACE 555 1665 1666 1667
+ *MESH_CFACE 556 1668 1669 1670
+ *MESH_CFACE 557 1671 1672 1673
+ *MESH_CFACE 558 1674 1675 1676
+ *MESH_CFACE 559 1677 1678 1679
+ *MESH_CFACE 560 1680 1681 1682
+ *MESH_CFACE 561 1683 1684 1685
+ *MESH_CFACE 562 1686 1687 1688
+ *MESH_CFACE 563 1689 1690 1691
+ *MESH_CFACE 564 1692 1693 1694
+ *MESH_CFACE 565 1695 1696 1697
+ *MESH_CFACE 566 1698 1699 1700
+ *MESH_CFACE 567 1701 1702 1703
+ *MESH_CFACE 568 1704 1705 1706
+ *MESH_CFACE 569 1707 1708 1709
+ *MESH_CFACE 570 1710 1711 1712
+ *MESH_CFACE 571 1713 1714 1715
+ }
+ }
+ *PROP_MOTIONBLUR 0
+ *PROP_CASTSHADOW 1
+ *PROP_RECVSHADOW 1
+ *MATERIAL_REF 0
+}
diff --git a/test/models-nonbsd/B3D/axe.jpg b/test/models-nonbsd/B3D/axe.jpg
index 2222cc958..ba14ae0ea 100644
--- a/test/models-nonbsd/B3D/axe.jpg
+++ b/test/models-nonbsd/B3D/axe.jpg
Binary files differ
diff --git a/test/models-nonbsd/B3D/dwarf2.jpg b/test/models-nonbsd/B3D/dwarf2.jpg
index 21dcc740d..cf54b0657 100644
--- a/test/models-nonbsd/B3D/dwarf2.jpg
+++ b/test/models-nonbsd/B3D/dwarf2.jpg
Binary files differ
diff --git a/test/models-nonbsd/B3D/turtle1.png b/test/models-nonbsd/B3D/turtle1.png
index 42c43db31..fbdcfb5b7 100644
--- a/test/models-nonbsd/B3D/turtle1.png
+++ b/test/models-nonbsd/B3D/turtle1.png
Binary files differ
diff --git a/test/models-nonbsd/BLEND/Bob.blend b/test/models-nonbsd/BLEND/Bob.blend
index 3c784e8f8..b73177ccb 100644
--- a/test/models-nonbsd/BLEND/Bob.blend
+++ b/test/models-nonbsd/BLEND/Bob.blend
Binary files differ
diff --git a/test/models-nonbsd/BLEND/fleurOptonl.blend b/test/models-nonbsd/BLEND/fleurOptonl.blend
index b8b3e3def..19276f543 100644
--- a/test/models-nonbsd/BLEND/fleurOptonl.blend
+++ b/test/models-nonbsd/BLEND/fleurOptonl.blend
Binary files differ
diff --git a/test/models-nonbsd/BLEND/fleurOptonl.source.txt b/test/models-nonbsd/BLEND/fleurOptonl.source.txt
index 13f54a108..b9c58b5d9 100644
--- a/test/models-nonbsd/BLEND/fleurOptonl.source.txt
+++ b/test/models-nonbsd/BLEND/fleurOptonl.source.txt
@@ -32,7 +32,7 @@ L'utilizzo della Creative Commons non influisce su questo diritto.
************************************************
This model is released under Creative Commons Licence, Attribution 2.0
-for informations see:
+for information see:
http://creativecommons.org
http://creativecommons.org/licenses/by/2.0/
feel free to use and improve it.
diff --git a/test/models-nonbsd/DXF/rifle.dxf b/test/models-nonbsd/DXF/rifle.dxf
index c01c7542d..3834b5343 100644
--- a/test/models-nonbsd/DXF/rifle.dxf
+++ b/test/models-nonbsd/DXF/rifle.dxf
@@ -1,16024 +1,16024 @@
-0
-SECTION
-2
-ENTITIES
-0
-3DFACE
-8
-m_rifle
-10
--0.597006
-20
-18.4212
-30
--22.536
-11
--0.597007
-21
-19.5279
-31
--7.87195
-12
--0.597007
-22
-18.4212
-32
-33.3743
-13
--0.597007
-23
-18.4212
-33
-33.3743
-0
-3DFACE
-8
-m_rifle
-10
--0.597007
-20
-19.5279
-30
--7.87195
-11
--0.597007
-21
-19.5279
-31
-32.4484
-12
--0.597007
-22
-18.4212
-32
-33.3743
-13
--0.597007
-23
-18.4212
-33
-33.3743
-0
-3DFACE
-8
-m_rifle
-10
--0.597006
-20
-18.4212
-30
--22.536
-11
--0.597006
-21
-20.2329
-31
--20.9831
-12
--0.597007
-22
-19.5279
-32
--7.87195
-13
--0.597007
-23
-19.5279
-33
--7.87195
-0
-3DFACE
-8
-m_rifle
-10
--0.597006
-20
-20.2329
-30
--20.9831
-11
--0.597007
-21
-20.2329
-31
--9.28176
-12
--0.597007
-22
-19.5279
-32
--7.87195
-13
--0.597007
-23
-19.5279
-33
--7.87195
-0
-3DFACE
-8
-m_rifle
-10
--0.597006
-20
-18.4212
-30
--22.536
-11
--0.597007
-21
-18.4212
-31
-33.3743
-12
-0.597023
-22
-18.4212
-32
-33.3743
-13
-0.597023
-23
-18.4212
-33
-33.3743
-0
-3DFACE
-8
-m_rifle
-10
-0.597023
-20
-18.4212
-30
-33.3743
-11
-0.597023
-21
-18.4212
-31
--22.536
-12
--0.597006
-22
-18.4212
-32
--22.536
-13
--0.597006
-23
-18.4212
-33
--22.536
-0
-3DFACE
-8
-m_rifle
-10
-0.597023
-20
-19.5279
-30
-32.4484
-11
-0.597023
-21
-19.5279
-31
--7.87195
-12
-0.597023
-22
-18.4212
-32
-33.3743
-13
-0.597023
-23
-18.4212
-33
-33.3743
-0
-3DFACE
-8
-m_rifle
-10
-0.597023
-20
-19.5279
-30
--7.87195
-11
-0.597023
-21
-18.4212
-31
--22.536
-12
-0.597023
-22
-18.4212
-32
-33.3743
-13
-0.597023
-23
-18.4212
-33
-33.3743
-0
-3DFACE
-8
-m_rifle
-10
-0.597023
-20
-19.5279
-30
--7.87195
-11
-0.597023
-21
-20.2329
-31
--20.9831
-12
-0.597023
-22
-18.4212
-32
--22.536
-13
-0.597023
-23
-18.4212
-33
--22.536
-0
-3DFACE
-8
-m_rifle
-10
-0.597023
-20
-19.5279
-30
--7.87195
-11
-0.597023
-21
-20.2329
-31
--9.28176
-12
-0.597023
-22
-20.2329
-32
--20.9831
-13
-0.597023
-23
-20.2329
-33
--20.9831
-0
-3DFACE
-8
-m_rifle
-10
--0.597007
-20
-20.2329
-30
--9.28176
-11
--0.597006
-21
-20.2329
-31
--20.9831
-12
--1.09701
-22
-20.2329
-32
--20.9831
-13
--1.09701
-23
-20.2329
-33
--20.9831
-0
-3DFACE
-8
-m_rifle
-10
--1.09701
-20
-20.2329
-30
--20.9831
-11
--1.09701
-21
-20.2329
-31
--9.28176
-12
--0.597007
-22
-20.2329
-32
--9.28176
-13
--0.597007
-23
-20.2329
-33
--9.28176
-0
-3DFACE
-8
-m_rifle
-10
--0.597007
-20
-19.5279
-30
--7.87195
-11
--0.597007
-21
-20.2329
-31
--9.28176
-12
--1.09701
-22
-20.2329
-32
--9.28176
-13
--1.09701
-23
-20.2329
-33
--9.28176
-0
-3DFACE
-8
-m_rifle
-10
--1.09701
-20
-20.2329
-30
--9.28176
-11
--1.12997
-21
-19.528
-31
--7.87195
-12
--0.597007
-22
-19.5279
-32
--7.87195
-13
--0.597007
-23
-19.5279
-33
--7.87195
-0
-3DFACE
-8
-m_rifle
-10
--0.597007
-20
-19.5279
-30
-32.4484
-11
--0.597007
-21
-19.5279
-31
--7.87195
-12
--1.12997
-22
-19.528
-32
--7.87195
-13
--1.12997
-23
-19.528
-33
--7.87195
-0
-3DFACE
-8
-m_rifle
-10
--1.12997
-20
-19.528
-30
--7.87195
-11
--1.12997
-21
-19.528
-31
-32.4484
-12
--0.597007
-22
-19.5279
-32
-32.4484
-13
--0.597007
-23
-19.5279
-33
-32.4484
-0
-3DFACE
-8
-m_rifle
-10
--0.597006
-20
-18.4212
-30
--22.536
-11
--1.09701
-21
-20.2329
-31
--20.9831
-12
--0.597006
-22
-20.2329
-32
--20.9831
-13
--0.597006
-23
-20.2329
-33
--20.9831
-0
-3DFACE
-8
-m_rifle
-10
--0.597006
-20
-18.4212
-30
--22.536
-11
--1.46616
-21
-12.338
-31
--27.7502
-12
--1.09701
-22
-20.2329
-32
--20.9831
-13
--1.09701
-23
-20.2329
-33
--20.9831
-0
-3DFACE
-8
-m_rifle
-10
--0.597006
-20
-18.4212
-30
--22.536
-11
-1.4662
-21
-12.3379
-31
--27.7502
-12
--1.46616
-22
-12.338
-32
--27.7502
-13
--1.46616
-23
-12.338
-33
--27.7502
-0
-3DFACE
-8
-m_rifle
-10
--0.597006
-20
-18.4212
-30
--22.536
-11
-0.597023
-21
-18.4212
-31
--22.536
-12
-1.4662
-22
-12.3379
-32
--27.7502
-13
-1.4662
-23
-12.3379
-33
--27.7502
-0
-3DFACE
-8
-m_rifle
-10
-0.597023
-20
-18.4212
-30
--22.536
-11
-1.09705
-21
-20.2329
-31
--20.9831
-12
-1.4662
-22
-12.3379
-32
--27.7502
-13
-1.4662
-23
-12.3379
-33
--27.7502
-0
-3DFACE
-8
-m_rifle
-10
-0.597023
-20
-18.4212
-30
--22.536
-11
-0.597023
-21
-20.2329
-31
--20.9831
-12
-1.09705
-22
-20.2329
-32
--20.9831
-13
-1.09705
-23
-20.2329
-33
--20.9831
-0
-3DFACE
-8
-m_rifle
-10
-0.597023
-20
-18.4212
-30
-33.3743
-11
-1.13001
-21
-19.5279
-31
-32.4484
-12
-0.597023
-22
-19.5279
-32
-32.4484
-13
-0.597023
-23
-19.5279
-33
-32.4484
-0
-3DFACE
-8
-m_rifle
-10
-0.597023
-20
-18.4212
-30
-33.3743
-11
-3.47648
-21
-4.86599
-31
-44.7137
-12
-1.13001
-22
-19.5279
-32
-32.4484
-13
-1.13001
-23
-19.5279
-33
-32.4484
-0
-3DFACE
-8
-m_rifle
-10
-0.597023
-20
-18.4212
-30
-33.3743
-11
--3.47644
-21
-4.86599
-31
-44.7137
-12
-3.47648
-22
-4.86599
-32
-44.7137
-13
-3.47648
-23
-4.86599
-33
-44.7137
-0
-3DFACE
-8
-m_rifle
-10
-0.597023
-20
-18.4212
-30
-33.3743
-11
--0.597007
-21
-18.4212
-31
-33.3743
-12
--3.47644
-22
-4.86599
-32
-44.7137
-13
--3.47644
-23
-4.86599
-33
-44.7137
-0
-3DFACE
-8
-m_rifle
-10
--0.597007
-20
-18.4212
-30
-33.3743
-11
--1.12997
-21
-19.528
-31
-32.4484
-12
--3.47644
-22
-4.86599
-32
-44.7137
-13
--3.47644
-23
-4.86599
-33
-44.7137
-0
-3DFACE
-8
-m_rifle
-10
--0.597007
-20
-18.4212
-30
-33.3743
-11
--0.597007
-21
-19.5279
-31
-32.4484
-12
--1.12997
-22
-19.528
-32
-32.4484
-13
--1.12997
-23
-19.528
-33
-32.4484
-0
-3DFACE
-8
-m_rifle
-10
-1.40687
-20
-13.6068
-30
-20.888
-11
--1.40683
-21
-13.6068
-31
-20.888
-12
--1.40683
-22
-13.6068
-32
-29.3468
-13
--1.40683
-23
-13.6068
-33
-29.3468
-0
-3DFACE
-8
-m_rifle
-10
--1.40683
-20
-13.6068
-30
-29.3468
-11
-1.40687
-21
-13.6068
-31
-29.3468
-12
-1.40687
-22
-13.6068
-32
-20.888
-13
-1.40687
-23
-13.6068
-33
-20.888
-0
-3DFACE
-8
-m_rifle
-10
-1.40687
-20
-13.6068
-30
-29.3468
-11
--1.40683
-21
-13.6068
-31
-29.3468
-12
--1.32773
-22
-15.2985
-32
-29.3468
-13
--1.32773
-23
-15.2985
-33
-29.3468
-0
-3DFACE
-8
-m_rifle
-10
--1.32773
-20
-15.2985
-30
-29.3468
-11
-1.32777
-21
-15.2985
-31
-29.3468
-12
-1.40687
-22
-13.6068
-32
-29.3468
-13
-1.40687
-23
-13.6068
-33
-29.3468
-0
-3DFACE
-8
-m_rifle
-10
--3.34593
-20
-7.65733
-30
-15.7551
-11
-3.40397
-21
-6.41678
-31
-14.6849
-12
--3.40393
-22
-6.41678
-32
-14.6849
-13
--3.40393
-23
-6.41678
-33
-14.6849
-0
-3DFACE
-8
-m_rifle
-10
--3.34593
-20
-7.65733
-30
-15.7551
-11
-3.34596
-21
-7.65733
-31
-15.7551
-12
-3.40397
-22
-6.41678
-32
-14.6849
-13
-3.40397
-23
-6.41678
-33
-14.6849
-0
-3DFACE
-8
-m_rifle
-10
--3.34593
-20
-7.65733
-30
-15.7551
-11
-1.40687
-21
-13.6068
-31
-20.888
-12
-3.34596
-22
-7.65733
-32
-15.7551
-13
-3.34596
-23
-7.65733
-33
-15.7551
-0
-3DFACE
-8
-m_rifle
-10
--3.34593
-20
-7.65733
-30
-15.7551
-11
--1.40683
-21
-13.6068
-31
-20.888
-12
-1.40687
-22
-13.6068
-32
-20.888
-13
-1.40687
-23
-13.6068
-33
-20.888
-0
-3DFACE
-8
-m_rifle
-10
-2.59019
-20
-6.9807
-30
--15.4849
-11
--2.59017
-21
-6.9807
-31
--15.4849
-12
--2.61654
-22
-6.41678
-32
--12.9473
-13
--2.61654
-23
-6.41678
-33
--12.9473
-0
-3DFACE
-8
-m_rifle
-10
--2.61654
-20
-6.41678
-30
--12.9473
-11
-2.61651
-21
-6.41678
-31
--12.9473
-12
-2.59019
-22
-6.9807
-32
--15.4849
-13
-2.59019
-23
-6.9807
-33
--15.4849
-0
-3DFACE
-8
-m_rifle
-10
-2.45176
-20
-9.94129
-30
--16.4718
-11
--2.45174
-21
-9.94129
-31
--16.4718
-12
--2.51107
-22
-8.67246
-32
--16.4718
-13
--2.51107
-23
-8.67246
-33
--16.4718
-0
-3DFACE
-8
-m_rifle
-10
--2.51107
-20
-8.67246
-30
--16.4718
-11
-2.51109
-21
-8.67246
-31
--16.4718
-12
-2.45176
-22
-9.94129
-32
--16.4718
-13
-2.45176
-23
-9.94129
-33
--16.4718
-0
-3DFACE
-8
-m_rifle
-10
-2.51109
-20
-8.67246
-30
--16.4718
-11
--2.51107
-21
-8.67246
-31
--16.4718
-12
--2.59017
-22
-6.9807
-32
--15.4849
-13
--2.59017
-23
-6.9807
-33
--15.4849
-0
-3DFACE
-8
-m_rifle
-10
--2.59017
-20
-6.9807
-30
--15.4849
-11
-2.59019
-21
-6.9807
-31
--15.4849
-12
-2.51109
-22
-8.67246
-32
--16.4718
-13
-2.51109
-23
-8.67246
-33
--16.4718
-0
-3DFACE
-8
-m_rifle
-10
-1.32777
-20
-15.2985
-30
-29.3468
-11
--1.32773
-21
-15.2985
-31
--12.2424
-12
-1.32777
-22
-15.2985
-32
-0.546196
-13
-1.32777
-23
-15.2985
-33
-0.546196
-0
-3DFACE
-8
-m_rifle
-10
--1.32773
-20
-15.2985
-30
--12.2424
-11
-1.32777
-21
-15.2985
-31
--12.2424
-12
-1.32777
-22
-15.2985
-32
-0.546196
-13
-1.32777
-23
-15.2985
-33
-0.546196
-0
-3DFACE
-8
-m_rifle
-10
-1.32777
-20
-15.2985
-30
-29.3468
-11
--1.32773
-21
-15.2985
-31
-0.546196
-12
--1.32773
-22
-15.2985
-32
--12.2424
-13
--1.32773
-23
-15.2985
-33
--12.2424
-0
-3DFACE
-8
-m_rifle
-10
-1.32777
-20
-15.2985
-30
-29.3468
-11
--1.32773
-21
-15.2985
-31
-29.3468
-12
--1.32773
-22
-15.2985
-32
-0.546196
-13
--1.32773
-23
-15.2985
-33
-0.546196
-0
-3DFACE
-8
-m_rifle
-10
-1.32777
-20
-15.2985
-30
--12.2424
-11
--1.32773
-21
-15.2985
-31
--12.2424
-12
--2.45174
-22
-9.94129
-32
--16.4718
-13
--2.45174
-23
-9.94129
-33
--16.4718
-0
-3DFACE
-8
-m_rifle
-10
--2.45174
-20
-9.94129
-30
--16.4718
-11
-2.45176
-21
-9.94129
-31
--16.4718
-12
-1.32777
-22
-15.2985
-32
--12.2424
-13
-1.32777
-23
-15.2985
-33
--12.2424
-0
-3DFACE
-8
-m_rifle
-10
-2.61651
-20
-6.41678
-30
--12.9473
-11
--2.61654
-21
-6.41678
-31
--12.9473
-12
--3.40393
-22
-6.41678
-32
-14.6849
-13
--3.40393
-23
-6.41678
-33
-14.6849
-0
-3DFACE
-8
-m_rifle
-10
--3.40393
-20
-6.41678
-30
-14.6849
-11
-3.40397
-21
-6.41678
-31
-14.6849
-12
-2.61651
-22
-6.41678
-32
--12.9473
-13
-2.61651
-23
-6.41678
-33
--12.9473
-0
-3DFACE
-8
-m_rifle
-10
--1.45298
-20
-12.6199
-30
--34.3763
-11
--1.47934
-21
-12.056
-31
--29.7239
-12
--1.42661
-22
-13.1838
-32
--29.8649
-13
--1.42661
-23
-13.1838
-33
--29.8649
-0
-3DFACE
-8
-m_rifle
-10
--1.45298
-20
-12.6199
-30
--34.3763
-11
--1.86168
-21
-3.87913
-31
--30.7108
-12
--1.47934
-22
-12.056
-32
--29.7239
-13
--1.47934
-23
-12.056
-33
--29.7239
-0
-3DFACE
-8
-m_rifle
-10
--1.45298
-20
-12.6199
-30
--34.3763
-11
--1.88805
-21
-3.31521
-31
--35.927
-12
--1.86168
-22
-3.87913
-32
--30.7108
-13
--1.86168
-23
-3.87913
-33
--30.7108
-0
-3DFACE
-8
-m_rifle
-10
-1.45299
-20
-12.6199
-30
--34.3763
-11
-1.86172
-21
-3.87913
-31
--30.7108
-12
-1.88807
-22
-3.31521
-32
--35.927
-13
-1.88807
-23
-3.31521
-33
--35.927
-0
-3DFACE
-8
-m_rifle
-10
-1.45299
-20
-12.6199
-30
--34.3763
-11
-1.47938
-21
-12.056
-31
--29.7239
-12
-1.86172
-22
-3.87913
-32
--30.7108
-13
-1.86172
-23
-3.87913
-33
--30.7108
-0
-3DFACE
-8
-m_rifle
-10
-1.45299
-20
-12.6199
-30
--34.3763
-11
-1.42663
-21
-13.1838
-31
--29.8649
-12
-1.47938
-22
-12.056
-32
--29.7239
-13
-1.47938
-23
-12.056
-33
--29.7239
-0
-3DFACE
-8
-m_rifle
-10
--1.86168
-20
-3.87913
-30
--30.7108
-11
--1.88805
-21
-3.31521
-31
--35.927
-12
-1.88807
-22
-3.31521
-32
--35.927
-13
-1.88807
-23
-3.31521
-33
--35.927
-0
-3DFACE
-8
-m_rifle
-10
-1.88807
-20
-3.31521
-30
--35.927
-11
-1.86172
-21
-3.87913
-31
--30.7108
-12
--1.86168
-22
-3.87913
-32
--30.7108
-13
--1.86168
-23
-3.87913
-33
--30.7108
-0
-3DFACE
-8
-m_rifle
-10
--1.88805
-20
-3.31521
-30
--35.927
-11
--1.45298
-21
-12.6199
-31
--34.3763
-12
-1.45299
-22
-12.6199
-32
--34.3763
-13
-1.45299
-23
-12.6199
-33
--34.3763
-0
-3DFACE
-8
-m_rifle
-10
-1.45299
-20
-12.6199
-30
--34.3763
-11
-1.88807
-21
-3.31521
-31
--35.927
-12
--1.88805
-22
-3.31521
-32
--35.927
-13
--1.88805
-23
-3.31521
-33
--35.927
-0
-3DFACE
-8
-m_rifle
-10
--1.45298
-20
-12.6199
-30
--34.3763
-11
--1.42661
-21
-13.1838
-31
--29.8649
-12
-1.42663
-22
-13.1838
-32
--29.8649
-13
-1.42663
-23
-13.1838
-33
--29.8649
-0
-3DFACE
-8
-m_rifle
-10
-1.42663
-20
-13.1838
-30
--29.8649
-11
-1.45299
-21
-12.6199
-31
--34.3763
-12
--1.45298
-22
-12.6199
-32
--34.3763
-13
--1.45298
-23
-12.6199
-33
--34.3763
-0
-3DFACE
-8
-m_rifle
-10
--1.42661
-20
-13.1838
-30
--29.8649
-11
--1.47934
-21
-12.056
-31
--29.7239
-12
-1.47938
-22
-12.056
-32
--29.7239
-13
-1.47938
-23
-12.056
-33
--29.7239
-0
-3DFACE
-8
-m_rifle
-10
-1.47938
-20
-12.056
-30
--29.7239
-11
-1.42663
-21
-13.1838
-31
--29.8649
-12
--1.42661
-22
-13.1838
-32
--29.8649
-13
--1.42661
-23
-13.1838
-33
--29.8649
-0
-3DFACE
-8
-m_rifle
-10
--1.47934
-20
-12.056
-30
--29.7239
-11
--1.46616
-21
-12.338
-31
--27.7502
-12
-1.4662
-22
-12.3379
-32
--27.7502
-13
-1.4662
-23
-12.3379
-33
--27.7502
-0
-3DFACE
-8
-m_rifle
-10
-1.4662
-20
-12.3379
-30
--27.7502
-11
-1.47938
-21
-12.056
-31
--29.7239
-12
--1.47934
-22
-12.056
-32
--29.7239
-13
--1.47934
-23
-12.056
-33
--29.7239
-0
-3DFACE
-8
-m_rifle
-10
-1.09705
-20
-20.2329
-30
--20.9831
-11
-0.597023
-21
-20.2329
-31
--20.9831
-12
-0.597023
-22
-20.2329
-32
--9.28176
-13
-0.597023
-23
-20.2329
-33
--9.28176
-0
-3DFACE
-8
-m_rifle
-10
-0.597023
-20
-20.2329
-30
--9.28176
-11
-1.09705
-21
-20.2329
-31
--9.28176
-12
-1.09705
-22
-20.2329
-32
--20.9831
-13
-1.09705
-23
-20.2329
-33
--20.9831
-0
-3DFACE
-8
-m_rifle
-10
-1.09705
-20
-20.2329
-30
--9.28176
-11
-0.597023
-21
-20.2329
-31
--9.28176
-12
-0.597023
-22
-19.5279
-32
--7.87195
-13
-0.597023
-23
-19.5279
-33
--7.87195
-0
-3DFACE
-8
-m_rifle
-10
-0.597023
-20
-19.5279
-30
--7.87195
-11
-1.13001
-21
-19.528
-31
--7.87195
-12
-1.09705
-22
-20.2329
-32
--9.28176
-13
-1.09705
-23
-20.2329
-33
--9.28176
-0
-3DFACE
-8
-m_rifle
-10
-0.597023
-20
-19.5279
-30
--7.87195
-11
-0.597023
-21
-19.5279
-31
-32.4484
-12
-1.13001
-22
-19.5279
-32
-32.4484
-13
-1.13001
-23
-19.5279
-33
-32.4484
-0
-3DFACE
-8
-m_rifle
-10
-1.13001
-20
-19.5279
-30
-32.4484
-11
-1.13001
-21
-19.528
-31
--7.87195
-12
-0.597023
-22
-19.5279
-32
--7.87195
-13
-0.597023
-23
-19.5279
-33
--7.87195
-0
-3DFACE
-8
-m_rifle
-10
--3.47644
-20
-4.86599
-30
-44.7137
-11
--3.47644
-21
-4.86599
-31
-21.311
-12
-3.47648
-22
-4.86599
-32
-21.311
-13
-3.47648
-23
-4.86599
-33
-21.311
-0
-3DFACE
-8
-m_rifle
-10
-3.47648
-20
-4.86599
-30
-21.311
-11
-3.47648
-21
-4.86599
-31
-44.7137
-12
--3.47644
-22
-4.86599
-32
-44.7137
-13
--3.47644
-23
-4.86599
-33
-44.7137
-0
-3DFACE
-8
-m_rifle
-10
--3.47644
-20
-4.86599
-30
-21.311
-11
--3.52259
-21
-3.87913
-31
-19.9012
-12
-3.52262
-22
-3.87913
-32
-19.9012
-13
-3.52262
-23
-3.87913
-33
-19.9012
-0
-3DFACE
-8
-m_rifle
-10
-3.52262
-20
-3.87913
-30
-19.9012
-11
-3.47648
-21
-4.86599
-31
-21.311
-12
--3.47644
-22
-4.86599
-32
-21.311
-13
--3.47644
-23
-4.86599
-33
-21.311
-0
-3DFACE
-8
-m_rifle
-10
--3.52259
-20
-3.87913
-30
-19.9012
-11
--1.86168
-21
-3.87913
-31
--30.7108
-12
-1.86172
-22
-3.87913
-32
--30.7108
-13
-1.86172
-23
-3.87913
-33
--30.7108
-0
-3DFACE
-8
-m_rifle
-10
-1.86172
-20
-3.87913
-30
--30.7108
-11
-3.52262
-21
-3.87913
-31
-19.9012
-12
--3.52259
-22
-3.87913
-32
-19.9012
-13
--3.52259
-23
-3.87913
-33
-19.9012
-0
-3DFACE
-8
-m_rifle
-10
-1.09705
-20
-20.2329
-30
--9.28176
-11
-1.32777
-21
-15.2985
-31
--12.2424
-12
-1.09705
-22
-20.2329
-32
--20.9831
-13
-1.09705
-23
-20.2329
-33
--20.9831
-0
-3DFACE
-8
-m_rifle
-10
-1.13001
-20
-19.528
-30
--7.87195
-11
-1.32777
-21
-15.2985
-31
--12.2424
-12
-1.09705
-22
-20.2329
-32
--9.28176
-13
-1.09705
-23
-20.2329
-33
--9.28176
-0
-3DFACE
-8
-m_rifle
-10
-1.32777
-20
-15.2985
-30
-0.546196
-11
-1.32777
-21
-15.2985
-31
--12.2424
-12
-1.13001
-22
-19.528
-32
--7.87195
-13
-1.13001
-23
-19.528
-33
--7.87195
-0
-3DFACE
-8
-m_rifle
-10
-1.09705
-20
-20.2329
-30
--20.9831
-11
-1.32777
-21
-15.2985
-31
--12.2424
-12
-1.4662
-22
-12.3379
-32
--27.7502
-13
-1.4662
-23
-12.3379
-33
--27.7502
-0
-3DFACE
-8
-m_rifle
-10
-2.45176
-20
-9.94129
-30
--16.4718
-11
-1.4662
-21
-12.3379
-31
--27.7502
-12
-1.32777
-22
-15.2985
-32
--12.2424
-13
-1.32777
-23
-15.2985
-33
--12.2424
-0
-3DFACE
-8
-m_rifle
-10
-1.4662
-20
-12.3379
-30
--27.7502
-11
-2.45176
-21
-9.94129
-31
--16.4718
-12
-1.86172
-22
-3.87913
-32
--30.7108
-13
-1.86172
-23
-3.87913
-33
--30.7108
-0
-3DFACE
-8
-m_rifle
-10
-2.51109
-20
-8.67246
-30
--16.4718
-11
-1.86172
-21
-3.87913
-31
--30.7108
-12
-2.45176
-22
-9.94129
-32
--16.4718
-13
-2.45176
-23
-9.94129
-33
--16.4718
-0
-3DFACE
-8
-m_rifle
-10
-2.51109
-20
-8.67246
-30
--16.4718
-11
-2.59019
-21
-6.9807
-31
--15.4849
-12
-1.86172
-22
-3.87913
-32
--30.7108
-13
-1.86172
-23
-3.87913
-33
--30.7108
-0
-3DFACE
-8
-m_rifle
-10
-2.59019
-20
-6.9807
-30
--15.4849
-11
-2.61651
-21
-6.41678
-31
--12.9473
-12
-1.86172
-22
-3.87913
-32
--30.7108
-13
-1.86172
-23
-3.87913
-33
--30.7108
-0
-3DFACE
-8
-m_rifle
-10
-1.86172
-20
-3.87913
-30
--30.7108
-11
-2.61651
-21
-6.41678
-31
--12.9473
-12
-3.52262
-22
-3.87913
-32
-19.9012
-13
-3.52262
-23
-3.87913
-33
-19.9012
-0
-3DFACE
-8
-m_rifle
-10
-3.40397
-20
-6.41678
-30
-14.6849
-11
-3.52262
-21
-3.87913
-31
-19.9012
-12
-2.61651
-22
-6.41678
-32
--12.9473
-13
-2.61651
-23
-6.41678
-33
--12.9473
-0
-3DFACE
-8
-m_rifle
-10
-3.47648
-20
-4.86599
-30
-21.311
-11
-1.40687
-21
-13.6068
-31
-29.3468
-12
-3.47648
-22
-4.86599
-32
-44.7137
-13
-3.47648
-23
-4.86599
-33
-44.7137
-0
-3DFACE
-8
-m_rifle
-10
-1.40687
-20
-13.6068
-30
-20.888
-11
-1.40687
-21
-13.6068
-31
-29.3468
-12
-3.47648
-22
-4.86599
-32
-21.311
-13
-3.47648
-23
-4.86599
-33
-21.311
-0
-3DFACE
-8
-m_rifle
-10
-3.34596
-20
-7.65733
-30
-15.7551
-11
-1.40687
-21
-13.6068
-31
-20.888
-12
-3.47648
-22
-4.86599
-32
-21.311
-13
-3.47648
-23
-4.86599
-33
-21.311
-0
-3DFACE
-8
-m_rifle
-10
-3.47648
-20
-4.86599
-30
-44.7137
-11
-1.40687
-21
-13.6068
-31
-29.3468
-12
-1.13001
-22
-19.5279
-32
-32.4484
-13
-1.13001
-23
-19.5279
-33
-32.4484
-0
-3DFACE
-8
-m_rifle
-10
-1.32777
-20
-15.2985
-30
-29.3468
-11
-1.13001
-21
-19.5279
-31
-32.4484
-12
-1.40687
-22
-13.6068
-32
-29.3468
-13
-1.40687
-23
-13.6068
-33
-29.3468
-0
-3DFACE
-8
-m_rifle
-10
-3.34596
-20
-7.65733
-30
-15.7551
-11
-3.47648
-21
-4.86599
-31
-21.311
-12
-3.40397
-22
-6.41678
-32
-14.6849
-13
-3.40397
-23
-6.41678
-33
-14.6849
-0
-3DFACE
-8
-m_rifle
-10
-3.52262
-20
-3.87913
-30
-19.9012
-11
-3.40397
-21
-6.41678
-31
-14.6849
-12
-3.47648
-22
-4.86599
-32
-21.311
-13
-3.47648
-23
-4.86599
-33
-21.311
-0
-3DFACE
-8
-m_rifle
-10
-1.13001
-20
-19.5279
-30
-32.4484
-11
-1.32777
-21
-15.2985
-31
-29.3468
-12
-1.13001
-22
-19.528
-32
--7.87195
-13
-1.13001
-23
-19.528
-33
--7.87195
-0
-3DFACE
-8
-m_rifle
-10
-1.32777
-20
-15.2985
-30
-0.546196
-11
-1.13001
-21
-19.528
-31
--7.87195
-12
-1.32777
-22
-15.2985
-32
-29.3468
-13
-1.32777
-23
-15.2985
-33
-29.3468
-0
-3DFACE
-8
-m_rifle
-10
-1.47938
-20
-12.056
-30
--29.7239
-11
-1.4662
-21
-12.3379
-31
--27.7502
-12
-1.86172
-22
-3.87913
-32
--30.7108
-13
-1.86172
-23
-3.87913
-33
--30.7108
-0
-3DFACE
-8
-m_rifle
-10
--1.32773
-20
-15.2985
-30
--12.2424
-11
--1.09701
-21
-20.2329
-31
--9.28176
-12
--1.09701
-22
-20.2329
-32
--20.9831
-13
--1.09701
-23
-20.2329
-33
--20.9831
-0
-3DFACE
-8
-m_rifle
-10
--1.32773
-20
-15.2985
-30
--12.2424
-11
--1.12997
-21
-19.528
-31
--7.87195
-12
--1.09701
-22
-20.2329
-32
--9.28176
-13
--1.09701
-23
-20.2329
-33
--9.28176
-0
-3DFACE
-8
-m_rifle
-10
--1.32773
-20
-15.2985
-30
--12.2424
-11
--1.32773
-21
-15.2985
-31
-0.546196
-12
--1.12997
-22
-19.528
-32
--7.87195
-13
--1.12997
-23
-19.528
-33
--7.87195
-0
-3DFACE
-8
-m_rifle
-10
--1.32773
-20
-15.2985
-30
--12.2424
-11
--1.09701
-21
-20.2329
-31
--20.9831
-12
--1.46616
-22
-12.338
-32
--27.7502
-13
--1.46616
-23
-12.338
-33
--27.7502
-0
-3DFACE
-8
-m_rifle
-10
--1.46616
-20
-12.338
-30
--27.7502
-11
--2.45174
-21
-9.94129
-31
--16.4718
-12
--1.32773
-22
-15.2985
-32
--12.2424
-13
--1.32773
-23
-15.2985
-33
--12.2424
-0
-3DFACE
-8
-m_rifle
-10
--2.45174
-20
-9.94129
-30
--16.4718
-11
--1.46616
-21
-12.338
-31
--27.7502
-12
--1.86168
-22
-3.87913
-32
--30.7108
-13
--1.86168
-23
-3.87913
-33
--30.7108
-0
-3DFACE
-8
-m_rifle
-10
--1.86168
-20
-3.87913
-30
--30.7108
-11
--2.51107
-21
-8.67246
-31
--16.4718
-12
--2.45174
-22
-9.94129
-32
--16.4718
-13
--2.45174
-23
-9.94129
-33
--16.4718
-0
-3DFACE
-8
-m_rifle
-10
--2.59017
-20
-6.9807
-30
--15.4849
-11
--2.51107
-21
-8.67246
-31
--16.4718
-12
--1.86168
-22
-3.87913
-32
--30.7108
-13
--1.86168
-23
-3.87913
-33
--30.7108
-0
-3DFACE
-8
-m_rifle
-10
--2.61654
-20
-6.41678
-30
--12.9473
-11
--2.59017
-21
-6.9807
-31
--15.4849
-12
--1.86168
-22
-3.87913
-32
--30.7108
-13
--1.86168
-23
-3.87913
-33
--30.7108
-0
-3DFACE
-8
-m_rifle
-10
--2.61654
-20
-6.41678
-30
--12.9473
-11
--1.86168
-21
-3.87913
-31
--30.7108
-12
--3.52259
-22
-3.87913
-32
-19.9012
-13
--3.52259
-23
-3.87913
-33
-19.9012
-0
-3DFACE
-8
-m_rifle
-10
--3.52259
-20
-3.87913
-30
-19.9012
-11
--3.40393
-21
-6.41678
-31
-14.6849
-12
--2.61654
-22
-6.41678
-32
--12.9473
-13
--2.61654
-23
-6.41678
-33
--12.9473
-0
-3DFACE
-8
-m_rifle
-10
--1.40683
-20
-13.6068
-30
-29.3468
-11
--3.47644
-21
-4.86599
-31
-21.311
-12
--3.47644
-22
-4.86599
-32
-44.7137
-13
--3.47644
-23
-4.86599
-33
-44.7137
-0
-3DFACE
-8
-m_rifle
-10
--1.40683
-20
-13.6068
-30
-29.3468
-11
--1.40683
-21
-13.6068
-31
-20.888
-12
--3.47644
-22
-4.86599
-32
-21.311
-13
--3.47644
-23
-4.86599
-33
-21.311
-0
-3DFACE
-8
-m_rifle
-10
--1.40683
-20
-13.6068
-30
-20.888
-11
--3.34593
-21
-7.65733
-31
-15.7551
-12
--3.47644
-22
-4.86599
-32
-21.311
-13
--3.47644
-23
-4.86599
-33
-21.311
-0
-3DFACE
-8
-m_rifle
-10
--1.40683
-20
-13.6068
-30
-29.3468
-11
--3.47644
-21
-4.86599
-31
-44.7137
-12
--1.12997
-22
-19.528
-32
-32.4484
-13
--1.12997
-23
-19.528
-33
-32.4484
-0
-3DFACE
-8
-m_rifle
-10
--1.12997
-20
-19.528
-30
-32.4484
-11
--1.32773
-21
-15.2985
-31
-29.3468
-12
--1.40683
-22
-13.6068
-32
-29.3468
-13
--1.40683
-23
-13.6068
-33
-29.3468
-0
-3DFACE
-8
-m_rifle
-10
--3.47644
-20
-4.86599
-30
-21.311
-11
--3.34593
-21
-7.65733
-31
-15.7551
-12
--3.40393
-22
-6.41678
-32
-14.6849
-13
--3.40393
-23
-6.41678
-33
-14.6849
-0
-3DFACE
-8
-m_rifle
-10
--3.40393
-20
-6.41678
-30
-14.6849
-11
--3.52259
-21
-3.87913
-31
-19.9012
-12
--3.47644
-22
-4.86599
-32
-21.311
-13
--3.47644
-23
-4.86599
-33
-21.311
-0
-3DFACE
-8
-m_rifle
-10
--1.32773
-20
-15.2985
-30
-29.3468
-11
--1.12997
-21
-19.528
-31
-32.4484
-12
--1.12997
-22
-19.528
-32
--7.87195
-13
--1.12997
-23
-19.528
-33
--7.87195
-0
-3DFACE
-8
-m_rifle
-10
--1.12997
-20
-19.528
-30
--7.87195
-11
--1.32773
-21
-15.2985
-31
-0.546196
-12
--1.32773
-22
-15.2985
-32
-29.3468
-13
--1.32773
-23
-15.2985
-33
-29.3468
-0
-3DFACE
-8
-m_rifle
-10
--1.46616
-20
-12.338
-30
--27.7502
-11
--1.47934
-21
-12.056
-31
--29.7239
-12
--1.86168
-22
-3.87913
-32
--30.7108
-13
--1.86168
-23
-3.87913
-33
--30.7108
-0
-3DFACE
-8
-m_rifle
-10
--1.26863
-20
-1.33528
-30
--13.692
-11
--1.26863
-21
-2.39568
-31
--3.95619
-12
--1.26863
-22
-1.51932
-32
--31.7281
-13
--1.26863
-23
-1.51932
-33
--31.7281
-0
-3DFACE
-8
-m_rifle
-10
--1.26863
-20
--4.37883
-30
--3.95615
-11
--1.26863
-21
-1.33528
-31
--13.692
-12
--1.26863
-22
--0.50513
-32
--10.9314
-13
--1.26863
-23
--0.50513
-33
--10.9314
-0
-3DFACE
-8
-m_rifle
-10
--1.26863
-20
-2.39568
-30
--3.95619
-11
--1.26863
-21
-1.33528
-31
--13.692
-12
--1.26863
-22
--4.37883
-32
--3.95615
-13
--1.26863
-23
--4.37883
-33
--3.95615
-0
-3DFACE
-8
-m_rifle
-10
--1.26863
-20
-2.99165
-30
-22.012
-11
--1.26861
-21
--2.35447
-31
-6.33694
-12
--1.79104
-22
--0.432972
-32
-22.012
-13
--1.79104
-23
--0.432972
-33
-22.012
-0
-3DFACE
-8
-m_rifle
-10
--1.26863
-20
-5.20015
-30
-21.0918
-11
--1.26861
-21
--2.35447
-31
-6.33694
-12
--1.26863
-22
-2.99165
-32
-22.012
-13
--1.26863
-23
-2.99165
-33
-22.012
-0
-3DFACE
-8
-m_rifle
-10
--1.26863
-20
-2.39566
-30
-6.33693
-11
--1.26861
-21
--2.35447
-31
-6.33694
-12
--1.26863
-22
-5.20015
-32
-21.0918
-13
--1.26863
-23
-5.20015
-33
-21.0918
-0
-3DFACE
-8
-m_rifle
-10
--1.26863
-20
--6.76253
-30
-17.779
-11
--1.26863
-21
--6.76253
-31
-23.6733
-12
--1.79104
-22
--0.432972
-32
-22.012
-13
--1.79104
-23
--0.432972
-33
-22.012
-0
-3DFACE
-8
-m_rifle
-10
--1.79104
-20
--6.05518
-30
-23.6733
-11
--1.79104
-21
--0.432972
-31
-22.012
-12
--1.26863
-22
--6.76253
-32
-23.6733
-13
--1.26863
-23
--6.76253
-33
-23.6733
-0
-3DFACE
-8
-m_rifle
-10
--1.79104
-20
--0.432972
-30
-22.012
-11
--1.79104
-21
--6.05518
-31
-23.6733
-12
--2.27162
-22
--0.432971
-32
-46.6735
-13
--2.27162
-23
--0.432971
-33
-46.6735
-0
-3DFACE
-8
-m_rifle
-10
--1.79104
-20
--6.05517
-30
-46.6735
-11
--2.27162
-21
--0.432971
-31
-46.6735
-12
--1.79104
-22
--6.05518
-32
-23.6733
-13
--1.79104
-23
--6.05518
-33
-23.6733
-0
-3DFACE
-8
-m_rifle
-10
--0.866355
-20
--2.4213
-30
-4.93099
-11
--0.866355
-21
--3.84984
-31
-3.16548
-12
--0.866355
-22
--4.73806
-32
-6.33693
-13
--0.866355
-23
--4.73806
-33
-6.33693
-0
-3DFACE
-8
-m_rifle
-10
--0.866355
-20
--3.94847
-30
--0.586525
-11
--0.866355
-21
--3.01246
-31
--2.40928
-12
--0.866355
-22
--4.37915
-32
--3.947
-13
--0.866355
-23
--4.37915
-33
--3.947
-0
-3DFACE
-8
-m_rifle
-10
--0.866355
-20
--3.01246
-30
--2.40928
-11
--0.866355
-21
--1.63308
-31
--3.1975
-12
--0.866355
-22
--4.37915
-32
--3.947
-13
--0.866355
-23
--4.37915
-33
--3.947
-0
-3DFACE
-8
-m_rifle
-10
--0.866355
-20
--0.155174
-30
--3.0497
-11
--0.866355
-21
--4.37915
-31
--3.947
-12
--0.866355
-22
--1.63308
-32
--3.1975
-13
--0.866355
-23
--1.63308
-33
--3.1975
-0
-3DFACE
-8
-m_rifle
-10
--0.866355
-20
-2.39564
-30
--3.95615
-11
--0.866355
-21
--4.37915
-31
--3.947
-12
--0.866355
-22
--0.155174
-32
--3.0497
-13
--0.866355
-23
--0.155174
-33
--3.0497
-0
-3DFACE
-8
-m_rifle
-10
--0.866355
-20
--0.155174
-30
--3.0497
-11
--0.866355
-21
-0.58378
-31
--2.06443
-12
--0.866355
-22
-2.39564
-32
--3.95615
-13
--0.866355
-23
-2.39564
-33
--3.95615
-0
-3DFACE
-8
-m_rifle
-10
--0.866355
-20
-2.39564
-30
--3.95615
-11
--0.866355
-21
-0.58378
-31
--2.06443
-12
--0.866355
-22
-2.39564
-32
-6.33695
-13
--0.866355
-23
-2.39564
-33
-6.33695
-0
-3DFACE
-8
-m_rifle
-10
--0.866355
-20
-0.633044
-30
-5.66995
-11
--0.866355
-21
-2.39564
-31
-6.33695
-12
--0.866355
-22
-0.58378
-32
--2.06443
-13
--0.866355
-23
-0.58378
-33
--2.06443
-0
-3DFACE
-8
-m_rifle
-10
--0.866355
-20
--3.94847
-30
--0.586525
-11
--0.866355
-21
--4.37915
-31
--3.947
-12
--0.866355
-22
--3.84984
-32
-3.16548
-13
--0.866355
-23
--3.84984
-33
-3.16548
-0
-3DFACE
-8
-m_rifle
-10
--0.866355
-20
--4.73806
-30
-6.33693
-11
--0.866355
-21
--3.84984
-31
-3.16548
-12
--0.866355
-22
--4.37915
-32
--3.947
-13
--0.866355
-23
--4.37915
-33
--3.947
-0
-3DFACE
-8
-m_rifle
-10
--0.866355
-20
--0.992653
-30
-5.66995
-11
--0.866355
-21
--2.4213
-31
-4.93099
-12
--0.866355
-22
--4.73806
-32
-6.33693
-13
--0.866355
-23
--4.73806
-33
-6.33693
-0
-3DFACE
-8
-m_rifle
-10
--0.866355
-20
-0.633044
-30
-5.66995
-11
--0.866355
-21
--0.992653
-31
-5.66995
-12
--0.866355
-22
-2.39564
-32
-6.33695
-13
--0.866355
-23
-2.39564
-33
-6.33695
-0
-3DFACE
-8
-m_rifle
-10
--0.866355
-20
--4.73806
-30
-6.33693
-11
--0.866355
-21
-2.39564
-31
-6.33695
-12
--0.866355
-22
--0.992653
-32
-5.66995
-13
--0.866355
-23
--0.992653
-33
-5.66995
-0
-3DFACE
-8
-m_rifle
-10
--1.79104
-20
--0.432972
-30
-22.012
-11
--1.26861
-21
--2.35447
-31
-6.33694
-12
--1.26863
-22
--4.73808
-32
-13.178
-13
--1.26863
-23
--4.73808
-33
-13.178
-0
-3DFACE
-8
-m_rifle
-10
--1.26863
-20
--4.73808
-30
-6.33695
-11
--1.26863
-21
--4.73808
-31
-13.178
-12
--1.26861
-22
--2.35447
-32
-6.33694
-13
--1.26861
-23
--2.35447
-33
-6.33694
-0
-3DFACE
-8
-m_rifle
-10
--1.26863
-20
-4.0959
-30
--33.9366
-11
--1.26863
-21
-1.51932
-31
--31.7281
-12
--1.26863
-22
-5.20015
-32
-21.0918
-13
--1.26863
-23
-5.20015
-33
-21.0918
-0
-3DFACE
-8
-m_rifle
-10
--1.26863
-20
-2.39568
-30
--3.95619
-11
--1.26863
-21
-5.20015
-31
-21.0918
-12
--1.26863
-22
-1.51932
-32
--31.7281
-13
--1.26863
-23
-1.51932
-33
--31.7281
-0
-3DFACE
-8
-m_rifle
-10
--1.26863
-20
--4.37
-30
--12.7718
-11
--1.26863
-21
--4.37883
-31
--3.95615
-12
--1.26863
-22
--0.50513
-32
--10.9314
-13
--1.26863
-23
--0.50513
-33
--10.9314
-0
-3DFACE
-8
-m_rifle
-10
--1.26863
-20
--7.68274
-30
--7.25059
-11
--1.26863
-21
--4.37883
-31
--3.95615
-12
--1.26863
-22
--4.37
-32
--12.7718
-13
--1.26863
-23
--4.37
-33
--12.7718
-0
-3DFACE
-8
-m_rifle
-10
--1.26863
-20
--12.0997
-30
-17.779
-11
--1.26863
-21
--6.76253
-31
-17.779
-12
--1.26863
-22
--12.0997
-32
-13.178
-13
--1.26863
-23
--12.0997
-33
-13.178
-0
-3DFACE
-8
-m_rifle
-10
--1.26863
-20
--4.73808
-30
-13.178
-11
--1.26863
-21
--12.0997
-31
-13.178
-12
--1.26863
-22
--6.76253
-32
-17.779
-13
--1.26863
-23
--6.76253
-33
-17.779
-0
-3DFACE
-8
-m_rifle
-10
--1.26863
-20
-2.39566
-30
-6.33693
-11
--1.26863
-21
-5.20015
-31
-21.0918
-12
--1.26863
-22
-2.39568
-32
--3.95619
-13
--1.26863
-23
-2.39568
-33
--3.95619
-0
-3DFACE
-8
-m_rifle
-10
--1.26863
-20
--6.76253
-30
-17.779
-11
--1.79104
-21
--0.432972
-31
-22.012
-12
--1.26863
-22
--4.73808
-32
-13.178
-13
--1.26863
-23
--4.73808
-33
-13.178
-0
-3DFACE
-8
-m_rifle
-10
--1.26863
-20
--11.5476
-30
--15.7165
-11
--1.26863
-21
--13.204
-31
--8.35483
-12
--1.26863
-22
--7.68274
-32
--7.25059
-13
--1.26863
-23
--7.68274
-33
--7.25059
-0
-3DFACE
-8
-m_rifle
-10
--1.26863
-20
--8.23486
-30
--16.0846
-11
--1.26863
-21
--11.5476
-31
--15.7165
-12
--1.26863
-22
--7.68274
-32
--7.25059
-13
--1.26863
-23
--7.68274
-33
--7.25059
-0
-3DFACE
-8
-m_rifle
-10
--1.26863
-20
--4.37
-30
--12.7718
-11
--1.26863
-21
--8.23486
-31
--16.0846
-12
--1.26863
-22
--7.68274
-32
--7.25059
-13
--1.26863
-23
--7.68274
-33
--7.25059
-0
-3DFACE
-8
-m_rifle
-10
--1.26863
-20
--15.2284
-30
--10.7474
-11
--1.26863
-21
--13.204
-31
--8.35483
-12
--1.26863
-22
--11.5476
-32
--15.7165
-13
--1.26863
-23
--11.5476
-33
--15.7165
-0
-3DFACE
-8
-m_rifle
-10
-1.26867
-20
-1.33528
-30
--13.692
-11
-1.26867
-21
--4.37883
-31
--3.95615
-12
-1.26867
-22
--0.50513
-32
--10.9314
-13
-1.26867
-23
--0.50513
-33
--10.9314
-0
-3DFACE
-8
-m_rifle
-10
-1.26867
-20
-1.33528
-30
--13.692
-11
-1.26867
-21
-2.39568
-31
--3.95617
-12
-1.26867
-22
--4.37883
-32
--3.95615
-13
-1.26867
-23
--4.37883
-33
--3.95615
-0
-3DFACE
-8
-m_rifle
-10
-1.26866
-20
--2.35447
-30
-6.33694
-11
-1.26866
-21
-2.99165
-31
-22.012
-12
-1.79105
-22
--0.432972
-32
-22.012
-13
-1.79105
-23
--0.432972
-33
-22.012
-0
-3DFACE
-8
-m_rifle
-10
-1.26866
-20
--2.35447
-30
-6.33694
-11
-1.26866
-21
-5.20015
-31
-21.0918
-12
-1.26866
-22
-2.99165
-32
-22.012
-13
-1.26866
-23
-2.99165
-33
-22.012
-0
-3DFACE
-8
-m_rifle
-10
-1.26866
-20
--2.35447
-30
-6.33694
-11
-1.26866
-21
-2.39568
-31
-6.33691
-12
-1.26866
-22
-5.20015
-32
-21.0918
-13
-1.26866
-23
-5.20015
-33
-21.0918
-0
-3DFACE
-8
-m_rifle
-10
-1.26866
-20
--6.76253
-30
-23.6733
-11
-1.26866
-21
--6.76253
-31
-17.779
-12
-1.79105
-22
--0.432972
-32
-22.012
-13
-1.79105
-23
--0.432972
-33
-22.012
-0
-3DFACE
-8
-m_rifle
-10
-1.79105
-20
--0.432972
-30
-22.012
-11
-1.79105
-21
--6.05522
-31
-23.6733
-12
-1.26866
-22
--6.76253
-32
-23.6733
-13
-1.26866
-23
--6.76253
-33
-23.6733
-0
-3DFACE
-8
-m_rifle
-10
-1.79105
-20
--6.05522
-30
-23.6733
-11
-1.79105
-21
--0.432972
-31
-22.012
-12
-2.27165
-22
--0.432971
-32
-46.6735
-13
-2.27165
-23
--0.432971
-33
-46.6735
-0
-3DFACE
-8
-m_rifle
-10
-2.27165
-20
--0.432971
-30
-46.6735
-11
-1.79105
-21
--6.05521
-31
-46.6735
-12
-1.79105
-22
--6.05522
-32
-23.6733
-13
-1.79105
-23
--6.05522
-33
-23.6733
-0
-3DFACE
-8
-m_rifle
-10
-0.866362
-20
--3.84994
-30
-3.1575
-11
-0.866362
-21
--2.4213
-31
-4.93099
-12
-0.866362
-22
--4.73801
-32
-6.33691
-13
-0.866362
-23
--4.73801
-33
-6.33691
-0
-3DFACE
-8
-m_rifle
-10
-0.866362
-20
--3.01246
-30
--2.40928
-11
-0.866362
-21
--3.94847
-31
--0.586525
-12
-0.866362
-22
--4.37915
-32
--3.947
-13
-0.866362
-23
--4.37915
-33
--3.947
-0
-3DFACE
-8
-m_rifle
-10
-0.866362
-20
--1.63308
-30
--3.19749
-11
-0.866362
-21
--3.01246
-31
--2.40928
-12
-0.866362
-22
--4.37915
-32
--3.947
-13
-0.866362
-23
--4.37915
-33
--3.947
-0
-3DFACE
-8
-m_rifle
-10
-0.866362
-20
--4.37915
-30
--3.947
-11
-0.866362
-21
--0.155174
-31
--3.0497
-12
-0.866362
-22
--1.63308
-32
--3.19749
-13
-0.866362
-23
--1.63308
-33
--3.19749
-0
-3DFACE
-8
-m_rifle
-10
-0.866362
-20
--4.37915
-30
--3.947
-11
-0.866362
-21
-2.39564
-31
--3.95615
-12
-0.866362
-22
--0.155174
-32
--3.0497
-13
-0.866362
-23
--0.155174
-33
--3.0497
-0
-3DFACE
-8
-m_rifle
-10
-0.866362
-20
-0.58378
-30
--2.06443
-11
-0.866362
-21
--0.155174
-31
--3.0497
-12
-0.866362
-22
-2.39564
-32
--3.95615
-13
-0.866362
-23
-2.39564
-33
--3.95615
-0
-3DFACE
-8
-m_rifle
-10
-0.866362
-20
-0.58378
-30
--2.06443
-11
-0.866362
-21
-2.39564
-31
--3.95615
-12
-0.866362
-22
-2.39564
-32
-6.33695
-13
-0.866362
-23
-2.39564
-33
-6.33695
-0
-3DFACE
-8
-m_rifle
-10
-0.866362
-20
-2.39564
-30
-6.33695
-11
-0.866362
-21
-0.633045
-31
-5.66995
-12
-0.866362
-22
-0.58378
-32
--2.06443
-13
-0.866362
-23
-0.58378
-33
--2.06443
-0
-3DFACE
-8
-m_rifle
-10
-0.866362
-20
--4.37915
-30
--3.947
-11
-0.866362
-21
--3.94847
-31
--0.586525
-12
-0.866362
-22
--3.84994
-32
-3.1575
-13
-0.866362
-23
--3.84994
-33
-3.1575
-0
-3DFACE
-8
-m_rifle
-10
-0.866362
-20
--3.84994
-30
-3.1575
-11
-0.866362
-21
--4.73801
-31
-6.33691
-12
-0.866362
-22
--4.37915
-32
--3.947
-13
-0.866362
-23
--4.37915
-33
--3.947
-0
-3DFACE
-8
-m_rifle
-10
-0.866362
-20
--2.4213
-30
-4.93099
-11
-0.866362
-21
--0.992653
-31
-5.66995
-12
-0.866362
-22
--4.73801
-32
-6.33691
-13
-0.866362
-23
--4.73801
-33
-6.33691
-0
-3DFACE
-8
-m_rifle
-10
-0.866362
-20
--0.992653
-30
-5.66995
-11
-0.866362
-21
-0.633045
-31
-5.66995
-12
-0.866362
-22
-2.39564
-32
-6.33695
-13
-0.866362
-23
-2.39564
-33
-6.33695
-0
-3DFACE
-8
-m_rifle
-10
-0.866362
-20
-2.39564
-30
-6.33695
-11
-0.866362
-21
--4.73801
-31
-6.33691
-12
-0.866362
-22
--0.992653
-32
-5.66995
-13
-0.866362
-23
--0.992653
-33
-5.66995
-0
-3DFACE
-8
-m_rifle
-10
-1.26866
-20
--2.35447
-30
-6.33694
-11
-1.79105
-21
--0.432972
-31
-22.012
-12
-1.26866
-22
--4.73808
-32
-13.178
-13
-1.26866
-23
--4.73808
-33
-13.178
-0
-3DFACE
-8
-m_rifle
-10
-1.26866
-20
--4.73808
-30
-13.178
-11
-1.26866
-21
--4.73808
-31
-6.33695
-12
-1.26866
-22
--2.35447
-32
-6.33694
-13
-1.26866
-23
--2.35447
-33
-6.33694
-0
-3DFACE
-8
-m_rifle
-10
-1.26867
-20
-1.51932
-30
--31.7281
-11
-1.26867
-21
-4.0959
-31
--33.9366
-12
-1.26866
-22
-5.20015
-32
-21.0918
-13
-1.26866
-23
-5.20015
-33
-21.0918
-0
-3DFACE
-8
-m_rifle
-10
-1.26866
-20
-5.20015
-30
-21.0918
-11
-1.26867
-21
-1.33528
-31
--13.692
-12
-1.26867
-22
-1.51932
-32
--31.7281
-13
-1.26867
-23
-1.51932
-33
--31.7281
-0
-3DFACE
-8
-m_rifle
-10
-1.26867
-20
--4.37883
-30
--3.95615
-11
-1.26867
-21
--4.37
-31
--12.7718
-12
-1.26867
-22
--0.50513
-32
--10.9314
-13
-1.26867
-23
--0.50513
-33
--10.9314
-0
-3DFACE
-8
-m_rifle
-10
-1.26867
-20
--4.37883
-30
--3.95615
-11
-1.26867
-21
--7.68274
-31
--7.25059
-12
-1.26867
-22
--4.37
-32
--12.7718
-13
-1.26867
-23
--4.37
-33
--12.7718
-0
-3DFACE
-8
-m_rifle
-10
-1.26866
-20
--6.76253
-30
-17.779
-11
-1.26866
-21
--12.0997
-31
-17.779
-12
-1.26866
-22
--12.0997
-32
-13.178
-13
-1.26866
-23
--12.0997
-33
-13.178
-0
-3DFACE
-8
-m_rifle
-10
-1.26866
-20
--12.0997
-30
-13.178
-11
-1.26866
-21
--4.73808
-31
-13.178
-12
-1.26866
-22
--6.76253
-32
-17.779
-13
-1.26866
-23
--6.76253
-33
-17.779
-0
-3DFACE
-8
-m_rifle
-10
-1.26866
-20
-5.20015
-30
-21.0918
-11
-1.26866
-21
-2.39568
-31
-6.33691
-12
-1.26867
-22
-2.39568
-32
--3.95617
-13
-1.26867
-23
-2.39568
-33
--3.95617
-0
-3DFACE
-8
-m_rifle
-10
-1.79105
-20
--0.432972
-30
-22.012
-11
-1.26866
-21
--6.76253
-31
-17.779
-12
-1.26866
-22
--4.73808
-32
-13.178
-13
-1.26866
-23
--4.73808
-33
-13.178
-0
-3DFACE
-8
-m_rifle
-10
-1.26867
-20
--13.204
-30
--8.35483
-11
-1.26867
-21
--11.5476
-31
--15.7165
-12
-1.26867
-22
--7.68274
-32
--7.25059
-13
-1.26867
-23
--7.68274
-33
--7.25059
-0
-3DFACE
-8
-m_rifle
-10
-1.26867
-20
--11.5476
-30
--15.7165
-11
-1.26867
-21
--8.23486
-31
--16.0846
-12
-1.26867
-22
--7.68274
-32
--7.25059
-13
-1.26867
-23
--7.68274
-33
--7.25059
-0
-3DFACE
-8
-m_rifle
-10
-1.26867
-20
--8.23486
-30
--16.0846
-11
-1.26867
-21
--4.37
-31
--12.7718
-12
-1.26867
-22
--7.68274
-32
--7.25059
-13
-1.26867
-23
--7.68274
-33
--7.25059
-0
-3DFACE
-8
-m_rifle
-10
-1.26867
-20
--13.204
-30
--8.35483
-11
-1.26867
-21
--15.2284
-31
--10.7474
-12
-1.26867
-22
--11.5476
-32
--15.7165
-13
-1.26867
-23
--11.5476
-33
--15.7165
-0
-3DFACE
-8
-m_rifle
-10
-0.561346
-20
--6.76253
-30
-46.6735
-11
-1.79105
-21
--6.05522
-31
-23.6733
-12
-1.79105
-22
--6.05521
-32
-46.6735
-13
-1.79105
-23
--6.05521
-33
-46.6735
-0
-3DFACE
-8
-m_rifle
-10
-0.561346
-20
--6.76253
-30
-46.6735
-11
-0.561349
-21
--6.76253
-31
-23.6733
-12
-1.79105
-22
--6.05522
-32
-23.6733
-13
-1.79105
-23
--6.05522
-33
-23.6733
-0
-3DFACE
-8
-m_rifle
-10
-1.26866
-20
--6.76253
-30
-23.6733
-11
-1.79105
-21
--6.05522
-31
-23.6733
-12
-0.561349
-22
--6.76253
-32
-23.6733
-13
-0.561349
-23
--6.76253
-33
-23.6733
-0
-3DFACE
-8
-m_rifle
-10
--0.561256
-20
--6.76253
-30
-23.6733
-11
--1.79104
-21
--6.05518
-31
-23.6733
-12
--1.26863
-22
--6.76253
-32
-23.6733
-13
--1.26863
-23
--6.76253
-33
-23.6733
-0
-3DFACE
-8
-m_rifle
-10
--0.561252
-20
--6.76253
-30
-46.6735
-11
--1.79104
-21
--6.05518
-31
-23.6733
-12
--0.561256
-22
--6.76253
-32
-23.6733
-13
--0.561256
-23
--6.76253
-33
-23.6733
-0
-3DFACE
-8
-m_rifle
-10
--0.561252
-20
--6.76253
-30
-46.6735
-11
--1.79104
-21
--6.05517
-31
-46.6735
-12
--1.79104
-22
--6.05518
-32
-23.6733
-13
--1.79104
-23
--6.05518
-33
-23.6733
-0
-3DFACE
-8
-m_rifle
-10
--0.561256
-20
--6.76253
-30
-23.6733
-11
-0.561346
-21
--6.76253
-31
-46.6735
-12
--0.561252
-22
--6.76253
-32
-46.6735
-13
--0.561252
-23
--6.76253
-33
-46.6735
-0
-3DFACE
-8
-m_rifle
-10
--0.561256
-20
--6.76253
-30
-23.6733
-11
-0.561349
-21
--6.76253
-31
-23.6733
-12
-0.561346
-22
--6.76253
-32
-46.6735
-13
-0.561346
-23
--6.76253
-33
-46.6735
-0
-3DFACE
-8
-m_rifle
-10
--0.561256
-20
--6.76253
-30
-23.6733
-11
--1.26863
-21
--6.76253
-31
-17.779
-12
-0.561349
-22
--6.76253
-32
-23.6733
-13
-0.561349
-23
--6.76253
-33
-23.6733
-0
-3DFACE
-8
-m_rifle
-10
--0.561256
-20
--6.76253
-30
-23.6733
-11
--1.26863
-21
--6.76253
-31
-23.6733
-12
--1.26863
-22
--6.76253
-32
-17.779
-13
--1.26863
-23
--6.76253
-33
-17.779
-0
-3DFACE
-8
-m_rifle
-10
-1.26866
-20
--4.73808
-30
-13.178
-11
--0.866355
-21
--4.73806
-31
-6.33693
-12
-0.866362
-22
--4.73801
-32
-6.33691
-13
-0.866362
-23
--4.73801
-33
-6.33691
-0
-3DFACE
-8
-m_rifle
-10
-0.866362
-20
--4.73801
-30
-6.33691
-11
-1.26866
-21
--4.73808
-31
-6.33695
-12
-1.26866
-22
--4.73808
-32
-13.178
-13
-1.26866
-23
--4.73808
-33
-13.178
-0
-3DFACE
-8
-m_rifle
-10
-1.26867
-20
-2.39568
-30
--3.95617
-11
-1.26867
-21
-1.33528
-31
--13.692
-12
-1.26866
-22
-5.20015
-32
-21.0918
-13
-1.26866
-23
-5.20015
-33
-21.0918
-0
-3DFACE
-8
-m_rifle
-10
-1.26866
-20
--2.35447
-30
-6.33694
-11
-0.866362
-21
-2.39564
-31
-6.33695
-12
-1.26866
-22
-2.39568
-32
-6.33691
-13
-1.26866
-23
-2.39568
-33
-6.33691
-0
-3DFACE
-8
-m_rifle
-10
-1.26866
-20
--2.35447
-30
-6.33694
-11
-0.866362
-21
--4.73801
-31
-6.33691
-12
-0.866362
-22
-2.39564
-32
-6.33695
-13
-0.866362
-23
-2.39564
-33
-6.33695
-0
-3DFACE
-8
-m_rifle
-10
-1.26866
-20
--2.35447
-30
-6.33694
-11
-1.26866
-21
--4.73808
-31
-6.33695
-12
-0.866362
-22
--4.73801
-32
-6.33691
-13
-0.866362
-23
--4.73801
-33
-6.33691
-0
-3DFACE
-8
-m_rifle
-10
-1.26866
-20
-2.39568
-30
-6.33691
-11
-0.866362
-21
-2.39564
-31
--3.95615
-12
-1.26867
-22
-2.39568
-32
--3.95617
-13
-1.26867
-23
-2.39568
-33
--3.95617
-0
-3DFACE
-8
-m_rifle
-10
-1.26866
-20
-2.39568
-30
-6.33691
-11
-0.866362
-21
-2.39564
-31
-6.33695
-12
-0.866362
-22
-2.39564
-32
--3.95615
-13
-0.866362
-23
-2.39564
-33
--3.95615
-0
-3DFACE
-8
-m_rifle
-10
-0.866362
-20
--4.37915
-30
--3.947
-11
-1.26867
-21
-2.39568
-31
--3.95617
-12
-0.866362
-22
-2.39564
-32
--3.95615
-13
-0.866362
-23
-2.39564
-33
--3.95615
-0
-3DFACE
-8
-m_rifle
-10
-0.866362
-20
--4.37915
-30
--3.947
-11
-1.26867
-21
--4.37883
-31
--3.95615
-12
-1.26867
-22
-2.39568
-32
--3.95617
-13
-1.26867
-23
-2.39568
-33
--3.95617
-0
-3DFACE
-8
-m_rifle
-10
-0.866362
-20
--3.94847
-30
--0.586525
-11
-0.866362
-21
--3.01246
-31
--2.40928
-12
--0.866355
-22
--3.01246
-32
--2.40928
-13
--0.866355
-23
--3.01246
-33
--2.40928
-0
-3DFACE
-8
-m_rifle
-10
--0.866355
-20
--3.01246
-30
--2.40928
-11
--0.866355
-21
--3.94847
-31
--0.586525
-12
-0.866362
-22
--3.94847
-32
--0.586525
-13
-0.866362
-23
--3.94847
-33
--0.586525
-0
-3DFACE
-8
-m_rifle
-10
-0.866362
-20
--1.63308
-30
--3.19749
-11
-0.866362
-21
--0.155174
-31
--3.0497
-12
--0.866355
-22
--0.155174
-32
--3.0497
-13
--0.866355
-23
--0.155174
-33
--3.0497
-0
-3DFACE
-8
-m_rifle
-10
--0.866355
-20
--0.155174
-30
--3.0497
-11
--0.866355
-21
--1.63308
-31
--3.1975
-12
-0.866362
-22
--1.63308
-32
--3.19749
-13
-0.866362
-23
--1.63308
-33
--3.19749
-0
-3DFACE
-8
-m_rifle
-10
-0.866362
-20
-0.58378
-30
--2.06443
-11
-0.866362
-21
-0.633045
-31
-5.66995
-12
--0.866355
-22
-0.633044
-32
-5.66995
-13
--0.866355
-23
-0.633044
-33
-5.66995
-0
-3DFACE
-8
-m_rifle
-10
--0.866355
-20
-0.633044
-30
-5.66995
-11
--0.866355
-21
-0.58378
-31
--2.06443
-12
-0.866362
-22
-0.58378
-32
--2.06443
-13
-0.866362
-23
-0.58378
-33
--2.06443
-0
-3DFACE
-8
-m_rifle
-10
-0.866362
-20
--0.992653
-30
-5.66995
-11
-0.866362
-21
--2.4213
-31
-4.93099
-12
--0.866355
-22
--2.4213
-32
-4.93099
-13
--0.866355
-23
--2.4213
-33
-4.93099
-0
-3DFACE
-8
-m_rifle
-10
--0.866355
-20
--2.4213
-30
-4.93099
-11
--0.866355
-21
--0.992653
-31
-5.66995
-12
-0.866362
-22
--0.992653
-32
-5.66995
-13
-0.866362
-23
--0.992653
-33
-5.66995
-0
-3DFACE
-8
-m_rifle
-10
-1.26867
-20
--7.68274
-30
--7.25059
-11
-1.26867
-21
--4.37883
-31
--3.95615
-12
-0.866362
-22
--4.37915
-32
--3.947
-13
-0.866362
-23
--4.37915
-33
--3.947
-0
-3DFACE
-8
-m_rifle
-10
-0.866362
-20
--4.37915
-30
--3.947
-11
--0.866355
-21
--4.37915
-31
--3.947
-12
-1.26867
-22
--7.68274
-32
--7.25059
-13
-1.26867
-23
--7.68274
-33
--7.25059
-0
-3DFACE
-8
-m_rifle
-10
--0.866355
-20
--4.37915
-30
--3.947
-11
--1.26863
-21
--4.37883
-31
--3.95615
-12
--1.26863
-22
--7.68274
-32
--7.25059
-13
--1.26863
-23
--7.68274
-33
--7.25059
-0
-3DFACE
-8
-m_rifle
-10
--1.26863
-20
--7.68274
-30
--7.25059
-11
-1.26867
-21
--7.68274
-31
--7.25059
-12
--0.866355
-22
--4.37915
-32
--3.947
-13
--0.866355
-23
--4.37915
-33
--3.947
-0
-3DFACE
-8
-m_rifle
-10
--0.866355
-20
-2.39564
-30
-6.33695
-11
--1.26863
-21
-2.39566
-31
-6.33693
-12
--1.26863
-22
-2.39568
-32
--3.95619
-13
--1.26863
-23
-2.39568
-33
--3.95619
-0
-3DFACE
-8
-m_rifle
-10
--1.26863
-20
-2.39568
-30
--3.95619
-11
--0.866355
-21
-2.39564
-31
--3.95615
-12
--0.866355
-22
-2.39564
-32
-6.33695
-13
--0.866355
-23
-2.39564
-33
-6.33695
-0
-3DFACE
-8
-m_rifle
-10
--0.866355
-20
-2.39564
-30
--3.95615
-11
--1.26863
-21
--4.37883
-31
--3.95615
-12
--0.866355
-22
--4.37915
-32
--3.947
-13
--0.866355
-23
--4.37915
-33
--3.947
-0
-3DFACE
-8
-m_rifle
-10
--0.866355
-20
-2.39564
-30
--3.95615
-11
--1.26865
-21
--1.52243
-31
--3.95615
-12
--1.26863
-22
--4.37883
-32
--3.95615
-13
--1.26863
-23
--4.37883
-33
--3.95615
-0
-3DFACE
-8
-m_rifle
-10
--0.866355
-20
-2.39564
-30
--3.95615
-11
--1.26865
-21
--0.0282252
-31
--3.95615
-12
--1.26865
-22
--1.52243
-32
--3.95615
-13
--1.26865
-23
--1.52243
-33
--3.95615
-0
-3DFACE
-8
-m_rifle
-10
--0.866355
-20
-2.39564
-30
--3.95615
-11
--1.26863
-21
-2.39568
-31
--3.95619
-12
--1.26865
-22
--0.0282252
-32
--3.95615
-13
--1.26865
-23
--0.0282252
-33
--3.95615
-0
-3DFACE
-8
-m_rifle
-10
--0.866355
-20
--4.73806
-30
-6.33693
-11
--1.26863
-21
-2.39566
-31
-6.33693
-12
--0.866355
-22
-2.39564
-32
-6.33695
-13
--0.866355
-23
-2.39564
-33
-6.33695
-0
-3DFACE
-8
-m_rifle
-10
--0.866355
-20
--4.73806
-30
-6.33693
-11
--1.26865
-21
-0.830573
-31
-6.33695
-12
--1.26863
-22
-2.39566
-32
-6.33693
-13
--1.26863
-23
-2.39566
-33
-6.33693
-0
-3DFACE
-8
-m_rifle
-10
--0.866355
-20
--4.73806
-30
-6.33693
-11
--1.26865
-21
--0.724812
-31
-6.33694
-12
--1.26865
-22
-0.830573
-32
-6.33695
-13
--1.26865
-23
-0.830573
-33
-6.33695
-0
-3DFACE
-8
-m_rifle
-10
--0.866355
-20
--4.73806
-30
-6.33693
-11
--1.26865
-21
--1.75825
-31
-6.33694
-12
--1.26865
-22
--0.724812
-32
-6.33694
-13
--1.26865
-23
--0.724812
-33
-6.33694
-0
-3DFACE
-8
-m_rifle
-10
--0.866355
-20
--4.73806
-30
-6.33693
-11
--1.26863
-21
--4.73808
-31
-6.33695
-12
--1.26865
-22
--1.75825
-32
-6.33694
-13
--1.26865
-23
--1.75825
-33
-6.33694
-0
-3DFACE
-8
-m_rifle
-10
--0.866355
-20
--3.94847
-30
--0.586525
-11
--0.866355
-21
--3.84984
-31
-3.16548
-12
-0.866362
-22
--3.84994
-32
-3.1575
-13
-0.866362
-23
--3.84994
-33
-3.1575
-0
-3DFACE
-8
-m_rifle
-10
-0.866362
-20
--3.84994
-30
-3.1575
-11
-0.866362
-21
--3.94847
-31
--0.586525
-12
--0.866355
-22
--3.94847
-32
--0.586525
-13
--0.866355
-23
--3.94847
-33
--0.586525
-0
-3DFACE
-8
-m_rifle
-10
--0.866355
-20
--4.73806
-30
-6.33693
-11
-1.26866
-21
--4.73808
-31
-13.178
-12
--1.26863
-22
--4.73808
-32
-13.178
-13
--1.26863
-23
--4.73808
-33
-13.178
-0
-3DFACE
-8
-m_rifle
-10
--1.26863
-20
--4.73808
-30
-13.178
-11
--1.26863
-21
--4.73808
-31
-6.33695
-12
--0.866355
-22
--4.73806
-32
-6.33693
-13
--0.866355
-23
--4.73806
-33
-6.33693
-0
-3DFACE
-8
-m_rifle
-10
-0.866362
-20
--4.37915
-30
--3.947
-11
-0.866362
-21
--4.73801
-31
-6.33691
-12
--0.866355
-22
--4.73806
-32
-6.33693
-13
--0.866355
-23
--4.73806
-33
-6.33693
-0
-3DFACE
-8
-m_rifle
-10
--0.866355
-20
--4.73806
-30
-6.33693
-11
--0.866355
-21
--4.37915
-31
--3.947
-12
-0.866362
-22
--4.37915
-32
--3.947
-13
-0.866362
-23
--4.37915
-33
--3.947
-0
-3DFACE
-8
-m_rifle
-10
-0.866362
-20
--1.63308
-30
--3.19749
-11
--0.866355
-21
--1.63308
-31
--3.1975
-12
--0.866355
-22
--3.01246
-32
--2.40928
-13
--0.866355
-23
--3.01246
-33
--2.40928
-0
-3DFACE
-8
-m_rifle
-10
--0.866355
-20
--3.01246
-30
--2.40928
-11
-0.866362
-21
--3.01246
-31
--2.40928
-12
-0.866362
-22
--1.63308
-32
--3.19749
-13
-0.866362
-23
--1.63308
-33
--3.19749
-0
-3DFACE
-8
-m_rifle
-10
-0.866362
-20
-0.58378
-30
--2.06443
-11
--0.866355
-21
-0.58378
-31
--2.06443
-12
--0.866355
-22
--0.155174
-32
--3.0497
-13
--0.866355
-23
--0.155174
-33
--3.0497
-0
-3DFACE
-8
-m_rifle
-10
--0.866355
-20
--0.155174
-30
--3.0497
-11
-0.866362
-21
--0.155174
-31
--3.0497
-12
-0.866362
-22
-0.58378
-32
--2.06443
-13
-0.866362
-23
-0.58378
-33
--2.06443
-0
-3DFACE
-8
-m_rifle
-10
-0.866362
-20
--0.992653
-30
-5.66995
-11
--0.866355
-21
--0.992653
-31
-5.66995
-12
--0.866355
-22
-0.633044
-32
-5.66995
-13
--0.866355
-23
-0.633044
-33
-5.66995
-0
-3DFACE
-8
-m_rifle
-10
--0.866355
-20
-0.633044
-30
-5.66995
-11
-0.866362
-21
-0.633045
-31
-5.66995
-12
-0.866362
-22
--0.992653
-32
-5.66995
-13
-0.866362
-23
--0.992653
-33
-5.66995
-0
-3DFACE
-8
-m_rifle
-10
-0.866362
-20
--3.84994
-30
-3.1575
-11
--0.866355
-21
--3.84984
-31
-3.16548
-12
--0.866355
-22
--2.4213
-32
-4.93099
-13
--0.866355
-23
--2.4213
-33
-4.93099
-0
-3DFACE
-8
-m_rifle
-10
--0.866355
-20
--2.4213
-30
-4.93099
-11
-0.866362
-21
--2.4213
-31
-4.93099
-12
-0.866362
-22
--3.84994
-32
-3.1575
-13
-0.866362
-23
--3.84994
-33
-3.1575
-0
-3DFACE
-8
-m_rifle
-10
-1.26866
-20
-2.99165
-30
-22.012
-11
-1.26866
-21
-5.20015
-31
-21.0918
-12
--1.26863
-22
-5.20015
-32
-21.0918
-13
--1.26863
-23
-5.20015
-33
-21.0918
-0
-3DFACE
-8
-m_rifle
-10
--1.26863
-20
-5.20015
-30
-21.0918
-11
--1.26863
-21
-2.99165
-31
-22.012
-12
-1.26866
-22
-2.99165
-32
-22.012
-13
-1.26866
-23
-2.99165
-33
-22.012
-0
-3DFACE
-8
-m_rifle
-10
-0.561349
-20
--6.76253
-30
-23.6733
-11
--1.26863
-21
--6.76253
-31
-17.779
-12
-1.26866
-22
--6.76253
-32
-17.779
-13
-1.26866
-23
--6.76253
-33
-17.779
-0
-3DFACE
-8
-m_rifle
-10
-1.26866
-20
--6.76253
-30
-17.779
-11
-1.26866
-21
--6.76253
-31
-23.6733
-12
-0.561349
-22
--6.76253
-32
-23.6733
-13
-0.561349
-23
--6.76253
-33
-23.6733
-0
-3DFACE
-8
-m_rifle
-10
-1.26866
-20
--12.0997
-30
-17.779
-11
-1.26866
-21
--6.76253
-31
-17.779
-12
--1.26863
-22
--6.76253
-32
-17.779
-13
--1.26863
-23
--6.76253
-33
-17.779
-0
-3DFACE
-8
-m_rifle
-10
--1.26863
-20
--6.76253
-30
-17.779
-11
--1.26863
-21
--12.0997
-31
-17.779
-12
-1.26866
-22
--12.0997
-32
-17.779
-13
-1.26866
-23
--12.0997
-33
-17.779
-0
-3DFACE
-8
-m_rifle
-10
-1.26866
-20
--4.73808
-30
-13.178
-11
-1.26866
-21
--12.0997
-31
-13.178
-12
--1.26863
-22
--12.0997
-32
-13.178
-13
--1.26863
-23
--12.0997
-33
-13.178
-0
-3DFACE
-8
-m_rifle
-10
--1.26863
-20
--12.0997
-30
-13.178
-11
--1.26863
-21
--4.73808
-31
-13.178
-12
-1.26866
-22
--4.73808
-32
-13.178
-13
-1.26866
-23
--4.73808
-33
-13.178
-0
-3DFACE
-8
-m_rifle
-10
-1.26867
-20
--13.204
-30
--8.35483
-11
-1.26867
-21
--7.68274
-31
--7.25059
-12
--1.26863
-22
--7.68274
-32
--7.25059
-13
--1.26863
-23
--7.68274
-33
--7.25059
-0
-3DFACE
-8
-m_rifle
-10
--1.26863
-20
--7.68274
-30
--7.25059
-11
--1.26863
-21
--13.204
-31
--8.35483
-12
-1.26867
-22
--13.204
-32
--8.35483
-13
-1.26867
-23
--13.204
-33
--8.35483
-0
-3DFACE
-8
-m_rifle
-10
-1.26867
-20
--15.2284
-30
--10.7474
-11
-1.26867
-21
--13.204
-31
--8.35483
-12
--1.26863
-22
--13.204
-32
--8.35483
-13
--1.26863
-23
--13.204
-33
--8.35483
-0
-3DFACE
-8
-m_rifle
-10
--1.26863
-20
--13.204
-30
--8.35483
-11
--1.26863
-21
--15.2284
-31
--10.7474
-12
-1.26867
-22
--15.2284
-32
--10.7474
-13
-1.26867
-23
--15.2284
-33
--10.7474
-0
-3DFACE
-8
-m_rifle
-10
-1.26867
-20
--11.5476
-30
--15.7165
-11
-1.26867
-21
--15.2284
-31
--10.7474
-12
--1.26863
-22
--15.2284
-32
--10.7474
-13
--1.26863
-23
--15.2284
-33
--10.7474
-0
-3DFACE
-8
-m_rifle
-10
--1.26863
-20
--15.2284
-30
--10.7474
-11
--1.26863
-21
--11.5476
-31
--15.7165
-12
-1.26867
-22
--11.5476
-32
--15.7165
-13
-1.26867
-23
--11.5476
-33
--15.7165
-0
-3DFACE
-8
-m_rifle
-10
-1.26867
-20
--8.23486
-30
--16.0846
-11
-1.26867
-21
--11.5476
-31
--15.7165
-12
--1.26863
-22
--11.5476
-32
--15.7165
-13
--1.26863
-23
--11.5476
-33
--15.7165
-0
-3DFACE
-8
-m_rifle
-10
--1.26863
-20
--11.5476
-30
--15.7165
-11
--1.26863
-21
--8.23486
-31
--16.0846
-12
-1.26867
-22
--8.23486
-32
--16.0846
-13
-1.26867
-23
--8.23486
-33
--16.0846
-0
-3DFACE
-8
-m_rifle
-10
-1.26867
-20
--4.37
-30
--12.7718
-11
-1.26867
-21
--8.23486
-31
--16.0846
-12
--1.26863
-22
--8.23486
-32
--16.0846
-13
--1.26863
-23
--8.23486
-33
--16.0846
-0
-3DFACE
-8
-m_rifle
-10
--1.26863
-20
--8.23486
-30
--16.0846
-11
--1.26863
-21
--4.37
-31
--12.7718
-12
-1.26867
-22
--4.37
-32
--12.7718
-13
-1.26867
-23
--4.37
-33
--12.7718
-0
-3DFACE
-8
-m_rifle
-10
-1.26867
-20
--0.50513
-30
--10.9314
-11
-1.26867
-21
--4.37
-31
--12.7718
-12
--1.26863
-22
--4.37
-32
--12.7718
-13
--1.26863
-23
--4.37
-33
--12.7718
-0
-3DFACE
-8
-m_rifle
-10
--1.26863
-20
--4.37
-30
--12.7718
-11
--1.26863
-21
--0.50513
-31
--10.9314
-12
-1.26867
-22
--0.50513
-32
--10.9314
-13
-1.26867
-23
--0.50513
-33
--10.9314
-0
-3DFACE
-8
-m_rifle
-10
-1.26867
-20
-1.33528
-30
--13.692
-11
-1.26867
-21
--0.50513
-31
--10.9314
-12
--1.26863
-22
--0.50513
-32
--10.9314
-13
--1.26863
-23
--0.50513
-33
--10.9314
-0
-3DFACE
-8
-m_rifle
-10
--1.26863
-20
--0.50513
-30
--10.9314
-11
--1.26863
-21
-1.33528
-31
--13.692
-12
-1.26867
-22
-1.33528
-32
--13.692
-13
-1.26867
-23
-1.33528
-33
--13.692
-0
-3DFACE
-8
-m_rifle
-10
-1.26867
-20
-1.51932
-30
--31.7281
-11
-1.26867
-21
-1.33528
-31
--13.692
-12
--1.26863
-22
-1.33528
-32
--13.692
-13
--1.26863
-23
-1.33528
-33
--13.692
-0
-3DFACE
-8
-m_rifle
-10
--1.26863
-20
-1.33528
-30
--13.692
-11
--1.26863
-21
-1.51932
-31
--31.7281
-12
-1.26867
-22
-1.51932
-32
--31.7281
-13
-1.26867
-23
-1.51932
-33
--31.7281
-0
-3DFACE
-8
-m_rifle
-10
-1.26867
-20
-4.0959
-30
--33.9366
-11
-1.26867
-21
-1.51932
-31
--31.7281
-12
--1.26863
-22
-1.51932
-32
--31.7281
-13
--1.26863
-23
-1.51932
-33
--31.7281
-0
-3DFACE
-8
-m_rifle
-10
--1.26863
-20
-1.51932
-30
--31.7281
-11
--1.26863
-21
-4.0959
-31
--33.9366
-12
-1.26867
-22
-4.0959
-32
--33.9366
-13
-1.26867
-23
-4.0959
-33
--33.9366
-0
-3DFACE
-8
-m_rifle
-10
-8.23903e-006
-20
-9.22681
-30
-70.4874
-11
-0.918522
-21
-8.69651
-31
-70.4874
-12
-1.06062
-22
-9.22681
-32
-70.4874
-13
-1.06062
-23
-9.22681
-33
-70.4874
-0
-3DFACE
-8
-m_rifle
-10
-8.23903e-006
-20
-9.22681
-30
-70.4874
-11
-0.530312
-21
-8.3083
-31
-70.4874
-12
-0.918522
-22
-8.69651
-32
-70.4874
-13
-0.918522
-23
-8.69651
-33
-70.4874
-0
-3DFACE
-8
-m_rifle
-10
-8.23903e-006
-20
-9.22681
-30
-70.4874
-11
-8.37811e-006
-21
-8.16621
-31
-70.4874
-12
-0.530312
-22
-8.3083
-32
-70.4874
-13
-0.530312
-23
-8.3083
-33
-70.4874
-0
-3DFACE
-8
-m_rifle
-10
-8.23903e-006
-20
-9.22681
-30
-70.4874
-11
--0.530296
-21
-8.3083
-31
-70.4874
-12
-8.37811e-006
-22
-8.16621
-32
-70.4874
-13
-8.37811e-006
-23
-8.16621
-33
-70.4874
-0
-3DFACE
-8
-m_rifle
-10
-8.23903e-006
-20
-9.22681
-30
-70.4874
-11
--0.918505
-21
-8.69651
-31
-70.4874
-12
--0.530296
-22
-8.3083
-32
-70.4874
-13
--0.530296
-23
-8.3083
-33
-70.4874
-0
-3DFACE
-8
-m_rifle
-10
-8.23903e-006
-20
-9.22681
-30
-70.4874
-11
--1.0606
-21
-9.22681
-31
-70.4874
-12
--0.918505
-22
-8.69651
-32
-70.4874
-13
--0.918505
-23
-8.69651
-33
-70.4874
-0
-3DFACE
-8
-m_rifle
-10
-8.23903e-006
-20
-9.22681
-30
-70.4874
-11
--0.918505
-21
-9.75712
-31
-70.4874
-12
--1.0606
-22
-9.22681
-32
-70.4874
-13
--1.0606
-23
-9.22681
-33
-70.4874
-0
-3DFACE
-8
-m_rifle
-10
-8.23903e-006
-20
-9.22681
-30
-70.4874
-11
--0.530296
-21
-10.1453
-31
-70.4874
-12
--0.918505
-22
-9.75712
-32
-70.4874
-13
--0.918505
-23
-9.75712
-33
-70.4874
-0
-3DFACE
-8
-m_rifle
-10
-8.23903e-006
-20
-9.22681
-30
-70.4874
-11
-8.19267e-006
-21
-10.2874
-31
-70.4874
-12
--0.530296
-22
-10.1453
-32
-70.4874
-13
--0.530296
-23
-10.1453
-33
-70.4874
-0
-3DFACE
-8
-m_rifle
-10
-8.23903e-006
-20
-9.22681
-30
-70.4874
-11
-0.530312
-21
-10.1453
-31
-70.4874
-12
-8.19267e-006
-22
-10.2874
-32
-70.4874
-13
-8.19267e-006
-23
-10.2874
-33
-70.4874
-0
-3DFACE
-8
-m_rifle
-10
-8.23903e-006
-20
-9.22681
-30
-70.4874
-11
-0.918522
-21
-9.75712
-31
-70.4874
-12
-0.530312
-22
-10.1453
-32
-70.4874
-13
-0.530312
-23
-10.1453
-33
-70.4874
-0
-3DFACE
-8
-m_rifle
-10
-8.23903e-006
-20
-9.22681
-30
-70.4874
-11
-1.06062
-21
-9.22681
-31
-70.4874
-12
-0.918522
-22
-9.75712
-32
-70.4874
-13
-0.918522
-23
-9.75712
-33
-70.4874
-0
-3DFACE
-8
-m_rifle
-10
-0.91852
-20
-8.6965
-30
-68.3925
-11
-1.06061
-21
-9.22681
-31
-68.3925
-12
-1.06062
-22
-9.22681
-32
-70.4874
-13
-1.06062
-23
-9.22681
-33
-70.4874
-0
-3DFACE
-8
-m_rifle
-10
-0.91852
-20
-8.6965
-30
-68.3925
-11
-1.06062
-21
-9.22681
-31
-70.4874
-12
-0.918522
-22
-8.69651
-32
-70.4874
-13
-0.918522
-23
-8.69651
-33
-70.4874
-0
-3DFACE
-8
-m_rifle
-10
-0.530311
-20
-8.3083
-30
-68.3925
-11
-0.91852
-21
-8.6965
-31
-68.3925
-12
-0.918522
-22
-8.69651
-32
-70.4874
-13
-0.918522
-23
-8.69651
-33
-70.4874
-0
-3DFACE
-8
-m_rifle
-10
-0.530311
-20
-8.3083
-30
-68.3925
-11
-0.918522
-21
-8.69651
-31
-70.4874
-12
-0.530312
-22
-8.3083
-32
-70.4874
-13
-0.530312
-23
-8.3083
-33
-70.4874
-0
-3DFACE
-8
-m_rifle
-10
-6.81821e-006
-20
-8.1662
-30
-68.3925
-11
-0.530311
-21
-8.3083
-31
-68.3925
-12
-0.530312
-22
-8.3083
-32
-70.4874
-13
-0.530312
-23
-8.3083
-33
-70.4874
-0
-3DFACE
-8
-m_rifle
-10
-6.81821e-006
-20
-8.1662
-30
-68.3925
-11
-0.530312
-21
-8.3083
-31
-70.4874
-12
-8.37811e-006
-22
-8.16621
-32
-70.4874
-13
-8.37811e-006
-23
-8.16621
-33
-70.4874
-0
-3DFACE
-8
-m_rifle
-10
--0.530297
-20
-8.3083
-30
-68.3925
-11
-6.81821e-006
-21
-8.1662
-31
-68.3925
-12
-8.37811e-006
-22
-8.16621
-32
-70.4874
-13
-8.37811e-006
-23
-8.16621
-33
-70.4874
-0
-3DFACE
-8
-m_rifle
-10
--0.530297
-20
-8.3083
-30
-68.3925
-11
-8.37811e-006
-21
-8.16621
-31
-70.4874
-12
--0.530296
-22
-8.3083
-32
-70.4874
-13
--0.530296
-23
-8.3083
-33
-70.4874
-0
-3DFACE
-8
-m_rifle
-10
--0.918507
-20
-8.6965
-30
-68.3925
-11
--0.530297
-21
-8.3083
-31
-68.3925
-12
--0.530296
-22
-8.3083
-32
-70.4874
-13
--0.530296
-23
-8.3083
-33
-70.4874
-0
-3DFACE
-8
-m_rifle
-10
--0.918507
-20
-8.6965
-30
-68.3925
-11
--0.530296
-21
-8.3083
-31
-70.4874
-12
--0.918505
-22
-8.69651
-32
-70.4874
-13
--0.918505
-23
-8.69651
-33
-70.4874
-0
-3DFACE
-8
-m_rifle
-10
--1.0606
-20
-9.22681
-30
-68.3925
-11
--0.918507
-21
-8.6965
-31
-68.3925
-12
--0.918505
-22
-8.69651
-32
-70.4874
-13
--0.918505
-23
-8.69651
-33
-70.4874
-0
-3DFACE
-8
-m_rifle
-10
--1.0606
-20
-9.22681
-30
-68.3925
-11
--0.918505
-21
-8.69651
-31
-70.4874
-12
--1.0606
-22
-9.22681
-32
-70.4874
-13
--1.0606
-23
-9.22681
-33
-70.4874
-0
-3DFACE
-8
-m_rifle
-10
--0.918507
-20
-9.75711
-30
-68.3925
-11
--1.0606
-21
-9.22681
-31
-68.3925
-12
--1.0606
-22
-9.22681
-32
-70.4874
-13
--1.0606
-23
-9.22681
-33
-70.4874
-0
-3DFACE
-8
-m_rifle
-10
--0.918507
-20
-9.75711
-30
-68.3925
-11
--1.0606
-21
-9.22681
-31
-70.4874
-12
--0.918505
-22
-9.75712
-32
-70.4874
-13
--0.918505
-23
-9.75712
-33
-70.4874
-0
-3DFACE
-8
-m_rifle
-10
--0.530297
-20
-10.1453
-30
-68.3925
-11
--0.918507
-21
-9.75711
-31
-68.3925
-12
--0.918505
-22
-9.75712
-32
-70.4874
-13
--0.918505
-23
-9.75712
-33
-70.4874
-0
-3DFACE
-8
-m_rifle
-10
--0.530297
-20
-10.1453
-30
-68.3925
-11
--0.918505
-21
-9.75712
-31
-70.4874
-12
--0.530296
-22
-10.1453
-32
-70.4874
-13
--0.530296
-23
-10.1453
-33
-70.4874
-0
-3DFACE
-8
-m_rifle
-10
-6.63276e-006
-20
-10.2874
-30
-68.3925
-11
--0.530297
-21
-10.1453
-31
-68.3925
-12
--0.530296
-22
-10.1453
-32
-70.4874
-13
--0.530296
-23
-10.1453
-33
-70.4874
-0
-3DFACE
-8
-m_rifle
-10
-6.63276e-006
-20
-10.2874
-30
-68.3925
-11
--0.530296
-21
-10.1453
-31
-70.4874
-12
-8.19267e-006
-22
-10.2874
-32
-70.4874
-13
-8.19267e-006
-23
-10.2874
-33
-70.4874
-0
-3DFACE
-8
-m_rifle
-10
-0.530311
-20
-10.1453
-30
-68.3925
-11
-6.63276e-006
-21
-10.2874
-31
-68.3925
-12
-8.19267e-006
-22
-10.2874
-32
-70.4874
-13
-8.19267e-006
-23
-10.2874
-33
-70.4874
-0
-3DFACE
-8
-m_rifle
-10
-0.530311
-20
-10.1453
-30
-68.3925
-11
-8.19267e-006
-21
-10.2874
-31
-70.4874
-12
-0.530312
-22
-10.1453
-32
-70.4874
-13
-0.530312
-23
-10.1453
-33
-70.4874
-0
-3DFACE
-8
-m_rifle
-10
-0.91852
-20
-9.75711
-30
-68.3925
-11
-0.530311
-21
-10.1453
-31
-68.3925
-12
-0.530312
-22
-10.1453
-32
-70.4874
-13
-0.530312
-23
-10.1453
-33
-70.4874
-0
-3DFACE
-8
-m_rifle
-10
-0.91852
-20
-9.75711
-30
-68.3925
-11
-0.530312
-21
-10.1453
-31
-70.4874
-12
-0.918522
-22
-9.75712
-32
-70.4874
-13
-0.918522
-23
-9.75712
-33
-70.4874
-0
-3DFACE
-8
-m_rifle
-10
-1.06061
-20
-9.22681
-30
-68.3925
-11
-0.91852
-21
-9.75711
-31
-68.3925
-12
-0.918522
-22
-9.75712
-32
-70.4874
-13
-0.918522
-23
-9.75712
-33
-70.4874
-0
-3DFACE
-8
-m_rifle
-10
-1.06061
-20
-9.22681
-30
-68.3925
-11
-0.918522
-21
-9.75712
-31
-70.4874
-12
-1.06062
-22
-9.22681
-32
-70.4874
-13
-1.06062
-23
-9.22681
-33
-70.4874
-0
-3DFACE
-8
-m_rifle
-10
--0.917963
-20
-6.86522
-30
-68.292
-11
--1.42225
-21
-4.82977
-31
-47.7805
-12
--1.74656
-22
-2.8348
-32
-70.5252
-13
--1.74656
-23
-2.8348
-33
-70.5252
-0
-3DFACE
-8
-m_rifle
-10
--0.917963
-20
-6.86522
-30
-68.292
-11
--1.42225
-21
-4.82977
-31
-44.6132
-12
--1.42225
-22
-4.82977
-32
-47.7805
-13
--1.42225
-23
-4.82977
-33
-47.7805
-0
-3DFACE
-8
-m_rifle
-10
--0.917963
-20
-6.86522
-30
-68.292
-11
--0.917963
-21
-6.86522
-31
-43.3133
-12
--1.42225
-22
-4.82977
-32
-44.6132
-13
--1.42225
-23
-4.82977
-33
-44.6132
-0
-3DFACE
-8
-m_rifle
-10
--1.42225
-20
-4.82977
-30
-47.7805
-11
--1.74656
-21
-2.83479
-31
-50.7398
-12
--1.74656
-22
-2.8348
-32
-70.5252
-13
--1.74656
-23
-2.8348
-33
-70.5252
-0
-3DFACE
-8
-m_rifle
-10
-0.917979
-20
-6.86522
-30
-68.292
-11
-1.74657
-21
-2.8348
-31
-70.5252
-12
-1.42226
-22
-4.82977
-32
-47.7805
-13
-1.42226
-23
-4.82977
-33
-47.7805
-0
-3DFACE
-8
-m_rifle
-10
-0.917979
-20
-6.86522
-30
-68.292
-11
-1.42226
-21
-4.82977
-31
-47.7805
-12
-1.42226
-22
-4.82977
-32
-44.6132
-13
-1.42226
-23
-4.82977
-33
-44.6132
-0
-3DFACE
-8
-m_rifle
-10
-0.917979
-20
-6.86522
-30
-68.292
-11
-1.42226
-21
-4.82977
-31
-44.6132
-12
-0.91798
-22
-6.86522
-32
-43.3133
-13
-0.91798
-23
-6.86522
-33
-43.3133
-0
-3DFACE
-8
-m_rifle
-10
-1.42226
-20
-4.82977
-30
-47.7805
-11
-1.74657
-21
-2.8348
-31
-70.5252
-12
-1.74657
-22
-2.83479
-32
-50.7398
-13
-1.74657
-23
-2.83479
-33
-50.7398
-0
-3DFACE
-8
-m_rifle
-10
-1.74657
-20
-2.8348
-30
-70.5252
-11
--0.917963
-21
-6.86522
-31
-68.292
-12
--1.74656
-22
-2.8348
-32
-70.5252
-13
--1.74656
-23
-2.8348
-33
-70.5252
-0
-3DFACE
-8
-m_rifle
-10
-1.74657
-20
-2.8348
-30
-70.5252
-11
-0.917979
-21
-6.86522
-31
-68.292
-12
--0.917963
-22
-6.86522
-32
-68.292
-13
--0.917963
-23
-6.86522
-33
-68.292
-0
-3DFACE
-8
-m_rifle
-10
-1.42226
-20
-4.82977
-30
-47.7805
-11
--1.74656
-21
-2.83479
-31
-50.7398
-12
--1.42225
-22
-4.82977
-32
-47.7805
-13
--1.42225
-23
-4.82977
-33
-47.7805
-0
-3DFACE
-8
-m_rifle
-10
-1.42226
-20
-4.82977
-30
-47.7805
-11
-1.74657
-21
-2.83479
-31
-50.7398
-12
--1.74656
-22
-2.83479
-32
-50.7398
-13
--1.74656
-23
-2.83479
-33
-50.7398
-0
-3DFACE
-8
-m_rifle
-10
-1.42226
-20
-4.82977
-30
-44.6132
-11
--1.42225
-21
-4.82977
-31
-47.7805
-12
--1.42225
-22
-4.82977
-32
-44.6132
-13
--1.42225
-23
-4.82977
-33
-44.6132
-0
-3DFACE
-8
-m_rifle
-10
-1.42226
-20
-4.82977
-30
-44.6132
-11
-1.42226
-21
-4.82977
-31
-47.7805
-12
--1.42225
-22
-4.82977
-32
-47.7805
-13
--1.42225
-23
-4.82977
-33
-47.7805
-0
-3DFACE
-8
-m_rifle
-10
--1.38024
-20
-1.7077
-30
-38.2301
-11
--2.51205
-21
-5.04374
-31
-36.5061
-12
-2.51207
-22
-5.04374
-32
-36.5061
-13
-2.51207
-23
-5.04374
-33
-36.5061
-0
-3DFACE
-8
-m_rifle
-10
-2.51207
-20
-5.04374
-30
-36.5061
-11
-1.38026
-21
-1.7077
-31
-38.2301
-12
--1.38024
-22
-1.7077
-32
-38.2301
-13
--1.38024
-23
-1.7077
-33
-38.2301
-0
-3DFACE
-8
-m_rifle
-10
--2.51205
-20
-5.04374
-30
-44.1594
-11
--1.38024
-21
-1.7077
-31
-42.4353
-12
-1.38026
-22
-1.7077
-32
-42.4353
-13
-1.38026
-23
-1.7077
-33
-42.4353
-0
-3DFACE
-8
-m_rifle
-10
-1.38026
-20
-1.7077
-30
-42.4353
-11
-2.51207
-21
-5.04374
-31
-44.1594
-12
--2.51205
-22
-5.04374
-32
-44.1594
-13
--2.51205
-23
-5.04374
-33
-44.1594
-0
-3DFACE
-8
-m_rifle
-10
--2.51205
-20
-5.04374
-30
-44.1594
-11
--2.51205
-21
-5.04374
-31
-36.5061
-12
--1.38024
-22
-1.7077
-32
-38.2301
-13
--1.38024
-23
-1.7077
-33
-38.2301
-0
-3DFACE
-8
-m_rifle
-10
--1.38024
-20
-1.7077
-30
-38.2301
-11
--1.38024
-21
-1.7077
-31
-42.4353
-12
--2.51205
-22
-5.04374
-32
-44.1594
-13
--2.51205
-23
-5.04374
-33
-44.1594
-0
-3DFACE
-8
-m_rifle
-10
-2.51207
-20
-5.04374
-30
-44.1594
-11
-1.38026
-21
-1.7077
-31
-42.4353
-12
-1.38026
-22
-1.7077
-32
-38.2301
-13
-1.38026
-23
-1.7077
-33
-38.2301
-0
-3DFACE
-8
-m_rifle
-10
-1.38026
-20
-1.7077
-30
-38.2301
-11
-2.51207
-21
-5.04374
-31
-36.5061
-12
-2.51207
-22
-5.04374
-32
-44.1594
-13
-2.51207
-23
-5.04374
-33
-44.1594
-0
-3DFACE
-8
-m_rifle
-10
-0.298516
-20
-10.8934
-30
--44.9717
-11
-0.298515
-21
-10.8934
-31
--33.9555
-12
-0.298515
-22
-11.2735
-32
--33.9365
-13
-0.298515
-23
-11.2735
-33
--33.9365
-0
-3DFACE
-8
-m_rifle
-10
-0.298515
-20
-11.2735
-30
--33.9365
-11
-0.298516
-21
-11.2735
-31
--44.979
-12
-0.298516
-22
-10.8934
-32
--44.9717
-13
-0.298516
-23
-10.8934
-33
--44.9717
-0
-3DFACE
-8
-m_rifle
-10
--0.298499
-20
-11.2735
-30
--44.979
-11
--0.2985
-21
-11.2735
-31
--33.9365
-12
--0.2985
-22
-10.8934
-32
--33.9555
-13
--0.2985
-23
-10.8934
-33
--33.9555
-0
-3DFACE
-8
-m_rifle
-10
--0.2985
-20
-10.8934
-30
--33.9555
-11
--0.298499
-21
-10.8934
-31
--44.9717
-12
--0.298499
-22
-11.2735
-32
--44.979
-13
--0.298499
-23
-11.2735
-33
--44.979
-0
-3DFACE
-8
-m_rifle
-10
--0.298499
-20
-10.8934
-30
--44.9717
-11
--0.2985
-21
-10.8934
-31
--33.9555
-12
-0.298515
-22
-10.8934
-32
--33.9555
-13
-0.298515
-23
-10.8934
-33
--33.9555
-0
-3DFACE
-8
-m_rifle
-10
-0.298515
-20
-10.8934
-30
--33.9555
-11
-0.298516
-21
-10.8934
-31
--44.9717
-12
--0.298499
-22
-10.8934
-32
--44.9717
-13
--0.298499
-23
-10.8934
-33
--44.9717
-0
-3DFACE
-8
-m_rifle
-10
--0.298499
-20
-11.2735
-30
--44.979
-11
--1.26865
-21
-11.2735
-31
--44.4429
-12
--0.2985
-22
-11.2735
-32
--33.9365
-13
--0.2985
-23
-11.2735
-33
--33.9365
-0
-3DFACE
-8
-m_rifle
-10
--1.26865
-20
-11.2735
-30
--44.4429
-11
--1.26865
-21
-11.2735
-31
--33.9365
-12
--0.2985
-22
-11.2735
-32
--33.9365
-13
--0.2985
-23
-11.2735
-33
--33.9365
-0
-3DFACE
-8
-m_rifle
-10
--0.298499
-20
-11.2735
-30
--44.979
-11
--0.732529
-21
-11.2735
-31
--44.979
-12
--1.26865
-22
-11.2735
-32
--44.4429
-13
--1.26865
-23
-11.2735
-33
--44.4429
-0
-3DFACE
-8
-m_rifle
-10
--0.298499
-20
-10.8934
-30
--44.9717
-11
--0.732529
-21
-11.2735
-31
--44.979
-12
--0.298499
-22
-11.2735
-32
--44.979
-13
--0.298499
-23
-11.2735
-33
--44.979
-0
-3DFACE
-8
-m_rifle
-10
--0.298499
-20
-10.8934
-30
--44.9717
-11
--1.10061
-21
--7.86677
-31
--44.6109
-12
--0.732529
-22
-11.2735
-32
--44.979
-13
--0.732529
-23
-11.2735
-33
--44.979
-0
-3DFACE
-8
-m_rifle
-10
--0.298499
-20
-10.8934
-30
--44.9717
-11
-1.10056
-21
--7.86677
-31
--44.6109
-12
--1.10061
-22
--7.86677
-32
--44.6109
-13
--1.10061
-23
--7.86677
-33
--44.6109
-0
-3DFACE
-8
-m_rifle
-10
--0.298499
-20
-10.8934
-30
--44.9717
-11
-0.298516
-21
-10.8934
-31
--44.9717
-12
-1.10056
-22
--7.86677
-32
--44.6109
-13
-1.10056
-23
--7.86677
-33
--44.6109
-0
-3DFACE
-8
-m_rifle
-10
-0.298516
-20
-10.8934
-30
--44.9717
-11
-0.732482
-21
-11.2735
-31
--44.979
-12
-1.10056
-22
--7.86677
-32
--44.6109
-13
-1.10056
-23
--7.86677
-33
--44.6109
-0
-3DFACE
-8
-m_rifle
-10
-0.298516
-20
-10.8934
-30
--44.9717
-11
-0.298516
-21
-11.2735
-31
--44.979
-12
-0.732482
-22
-11.2735
-32
--44.979
-13
-0.732482
-23
-11.2735
-33
--44.979
-0
-3DFACE
-8
-m_rifle
-10
-1.10056
-20
--7.86677
-30
--44.6109
-11
-1.26866
-21
-5.75083
-31
--44.4428
-12
-1.26867
-22
--7.84575
-32
--44.4428
-13
-1.26867
-23
--7.84575
-33
--44.4428
-0
-3DFACE
-8
-m_rifle
-10
-1.10056
-20
--7.86677
-30
--44.6109
-11
-1.26866
-21
-10.4692
-31
--44.4428
-12
-1.26866
-22
-5.75083
-32
--44.4428
-13
-1.26866
-23
-5.75083
-33
--44.4428
-0
-3DFACE
-8
-m_rifle
-10
-1.10056
-20
--7.86677
-30
--44.6109
-11
-1.26866
-21
-11.0298
-31
--44.4428
-12
-1.26866
-22
-10.4692
-32
--44.4428
-13
-1.26866
-23
-10.4692
-33
--44.4428
-0
-3DFACE
-8
-m_rifle
-10
-1.10056
-20
--7.86677
-30
--44.6109
-11
-1.26866
-21
-11.2735
-31
--44.4428
-12
-1.26866
-22
-11.0298
-32
--44.4428
-13
-1.26866
-23
-11.0298
-33
--44.4428
-0
-3DFACE
-8
-m_rifle
-10
-1.10056
-20
--7.86677
-30
--44.6109
-11
-0.732482
-21
-11.2735
-31
--44.979
-12
-1.26866
-22
-11.2735
-32
--44.4428
-13
-1.26866
-23
-11.2735
-33
--44.4428
-0
-3DFACE
-8
-m_rifle
-10
-1.26866
-20
-5.75083
-30
--44.4428
-11
-1.26867
-21
--7.68272
-31
--43.1386
-12
-1.26867
-22
--7.84575
-32
--44.4428
-13
-1.26867
-23
--7.84575
-33
--44.4428
-0
-3DFACE
-8
-m_rifle
-10
--0.732529
-20
-11.2735
-30
--44.979
-11
--1.26865
-21
-11.0298
-31
--44.4429
-12
--1.26865
-22
-11.2735
-32
--44.4429
-13
--1.26865
-23
-11.2735
-33
--44.4429
-0
-3DFACE
-8
-m_rifle
-10
--0.732529
-20
-11.2735
-30
--44.979
-11
--1.26865
-21
-10.4693
-31
--44.4429
-12
--1.26865
-22
-11.0298
-32
--44.4429
-13
--1.26865
-23
-11.0298
-33
--44.4429
-0
-3DFACE
-8
-m_rifle
-10
--0.732529
-20
-11.2735
-30
--44.979
-11
--1.26865
-21
-5.75148
-31
--44.4429
-12
--1.26865
-22
-10.4693
-32
--44.4429
-13
--1.26865
-23
-10.4693
-33
--44.4429
-0
-3DFACE
-8
-m_rifle
-10
--0.732529
-20
-11.2735
-30
--44.979
-11
--1.26865
-21
--7.84576
-31
--44.4429
-12
--1.26865
-22
-5.75148
-32
--44.4429
-13
--1.26865
-23
-5.75148
-33
--44.4429
-0
-3DFACE
-8
-m_rifle
-10
--0.732529
-20
-11.2735
-30
--44.979
-11
--1.10061
-21
--7.86677
-31
--44.6109
-12
--1.26865
-22
--7.84576
-32
--44.4429
-13
--1.26865
-23
--7.84576
-33
--44.4429
-0
-3DFACE
-8
-m_rifle
-10
--1.26865
-20
--7.84576
-30
--44.4429
-11
--1.26865
-21
--7.68272
-31
--43.1386
-12
--1.26865
-22
-5.75148
-32
--44.4429
-13
--1.26865
-23
-5.75148
-33
--44.4429
-0
-3DFACE
-8
-m_rifle
-10
--1.26865
-20
-7.5927
-30
--36.8812
-11
--1.26865
-21
-11.2735
-31
--44.4429
-12
--1.26865
-22
-11.0298
-32
--44.4429
-13
--1.26865
-23
-11.0298
-33
--44.4429
-0
-3DFACE
-8
-m_rifle
-10
--1.26865
-20
-7.5927
-30
--36.8812
-11
--1.26865
-21
-11.2735
-31
--33.9365
-12
--1.26865
-22
-11.2735
-32
--44.4429
-13
--1.26865
-23
-11.2735
-33
--44.4429
-0
-3DFACE
-8
-m_rifle
-10
--1.26865
-20
-7.5927
-30
--36.8812
-11
--1.26865
-21
-7.5927
-31
--34.1206
-12
--1.26865
-22
-11.2735
-32
--33.9365
-13
--1.26865
-23
-11.2735
-33
--33.9365
-0
-3DFACE
-8
-m_rifle
-10
--1.26865
-20
-7.5927
-30
--36.8812
-11
--1.26865
-21
-4.64804
-31
--40.562
-12
--1.26865
-22
-4.83208
-32
--37.2493
-13
--1.26865
-23
-4.83208
-33
--37.2493
-0
-3DFACE
-8
-m_rifle
-10
--1.26865
-20
-7.5927
-30
--36.8812
-11
--1.26865
-21
-10.4693
-31
--44.4429
-12
--1.26865
-22
-4.64804
-32
--40.562
-13
--1.26865
-23
-4.64804
-33
--40.562
-0
-3DFACE
-8
-m_rifle
-10
--1.26865
-20
-7.5927
-30
--36.8812
-11
--1.26865
-21
-11.0298
-31
--44.4429
-12
--1.26865
-22
-10.4693
-32
--44.4429
-13
--1.26865
-23
-10.4693
-33
--44.4429
-0
-3DFACE
-8
-m_rifle
-10
--1.26865
-20
-5.75148
-30
--44.4429
-11
--1.26865
-21
-4.64804
-31
--40.562
-12
--1.26865
-22
-10.4693
-32
--44.4429
-13
--1.26865
-23
-10.4693
-33
--44.4429
-0
-3DFACE
-8
-m_rifle
-10
--1.26865
-20
-5.75148
-30
--44.4429
-11
--1.26865
-21
--7.49868
-31
--40.562
-12
--1.26865
-22
-4.64804
-32
--40.562
-13
--1.26865
-23
-4.64804
-33
--40.562
-0
-3DFACE
-8
-m_rifle
-10
--1.26865
-20
-5.75148
-30
--44.4429
-11
--1.26865
-21
--7.68272
-31
--43.1386
-12
--1.26865
-22
--7.49868
-32
--40.562
-13
--1.26865
-23
--7.49868
-33
--40.562
-0
-3DFACE
-8
-m_rifle
-10
-1.26866
-20
-4.64804
-30
--40.562
-11
-1.26867
-21
--7.68272
-31
--43.1386
-12
-1.26866
-22
-10.4692
-32
--44.4428
-13
-1.26866
-23
-10.4692
-33
--44.4428
-0
-3DFACE
-8
-m_rifle
-10
-1.26867
-20
--7.68272
-30
--43.1386
-11
-1.26866
-21
-5.75083
-31
--44.4428
-12
-1.26866
-22
-10.4692
-32
--44.4428
-13
-1.26866
-23
-10.4692
-33
--44.4428
-0
-3DFACE
-8
-m_rifle
-10
-1.26866
-20
-4.64804
-30
--40.562
-11
-1.26867
-21
--7.49868
-31
--40.562
-12
-1.26867
-22
--7.68272
-32
--43.1386
-13
-1.26867
-23
--7.68272
-33
--43.1386
-0
-3DFACE
-8
-m_rifle
-10
-1.26866
-20
-4.64804
-30
--40.562
-11
-1.26866
-21
-7.5927
-31
--36.8812
-12
-1.26866
-22
-4.83208
-32
--37.2493
-13
-1.26866
-23
-4.83208
-33
--37.2493
-0
-3DFACE
-8
-m_rifle
-10
-1.26866
-20
-4.64804
-30
--40.562
-11
-1.26866
-21
-11.0298
-31
--44.4428
-12
-1.26866
-22
-7.5927
-32
--36.8812
-13
-1.26866
-23
-7.5927
-33
--36.8812
-0
-3DFACE
-8
-m_rifle
-10
-1.26866
-20
-4.64804
-30
--40.562
-11
-1.26866
-21
-10.4692
-31
--44.4428
-12
-1.26866
-22
-11.0298
-32
--44.4428
-13
-1.26866
-23
-11.0298
-33
--44.4428
-0
-3DFACE
-8
-m_rifle
-10
-1.26866
-20
-7.5927
-30
--36.8812
-11
-1.26866
-21
-11.2735
-31
--33.9365
-12
-1.26866
-22
-7.5927
-32
--34.1206
-13
-1.26866
-23
-7.5927
-33
--34.1206
-0
-3DFACE
-8
-m_rifle
-10
-1.26866
-20
-7.5927
-30
--36.8812
-11
-1.26866
-21
-11.2735
-31
--44.4428
-12
-1.26866
-22
-11.2735
-32
--33.9365
-13
-1.26866
-23
-11.2735
-33
--33.9365
-0
-3DFACE
-8
-m_rifle
-10
-1.26866
-20
-7.5927
-30
--36.8812
-11
-1.26866
-21
-11.0298
-31
--44.4428
-12
-1.26866
-22
-11.2735
-32
--44.4428
-13
-1.26866
-23
-11.2735
-33
--44.4428
-0
-3DFACE
-8
-m_rifle
-10
-0.298515
-20
-11.2735
-30
--33.9365
-11
-1.26866
-21
-11.2735
-31
--33.9365
-12
-0.298516
-22
-11.2735
-32
--44.979
-13
-0.298516
-23
-11.2735
-33
--44.979
-0
-3DFACE
-8
-m_rifle
-10
-1.26866
-20
-11.2735
-30
--33.9365
-11
-1.26866
-21
-11.2735
-31
--44.4428
-12
-0.298516
-22
-11.2735
-32
--44.979
-13
-0.298516
-23
-11.2735
-33
--44.979
-0
-3DFACE
-8
-m_rifle
-10
-1.26866
-20
-11.2735
-30
--44.4428
-11
-0.732482
-21
-11.2735
-31
--44.979
-12
-0.298516
-22
-11.2735
-32
--44.979
-13
-0.298516
-23
-11.2735
-33
--44.979
-0
-3DFACE
-8
-m_rifle
-10
-1.26866
-20
-7.5927
-30
--36.8812
-11
-1.26866
-21
-7.5927
-31
--34.1206
-12
--1.26865
-22
-7.5927
-32
--34.1206
-13
--1.26865
-23
-7.5927
-33
--34.1206
-0
-3DFACE
-8
-m_rifle
-10
--1.26865
-20
-7.5927
-30
--34.1206
-11
--1.26865
-21
-7.5927
-31
--36.8812
-12
-1.26866
-22
-7.5927
-32
--36.8812
-13
-1.26866
-23
-7.5927
-33
--36.8812
-0
-3DFACE
-8
-m_rifle
-10
-1.26866
-20
-4.83208
-30
--37.2493
-11
-1.26866
-21
-7.5927
-31
--36.8812
-12
--1.26865
-22
-7.5927
-32
--36.8812
-13
--1.26865
-23
-7.5927
-33
--36.8812
-0
-3DFACE
-8
-m_rifle
-10
--1.26865
-20
-7.5927
-30
--36.8812
-11
--1.26865
-21
-4.83208
-31
--37.2493
-12
-1.26866
-22
-4.83208
-32
--37.2493
-13
-1.26866
-23
-4.83208
-33
--37.2493
-0
-3DFACE
-8
-m_rifle
-10
-1.26866
-20
-4.64804
-30
--40.562
-11
-1.26866
-21
-4.83208
-31
--37.2493
-12
--1.26865
-22
-4.83208
-32
--37.2493
-13
--1.26865
-23
-4.83208
-33
--37.2493
-0
-3DFACE
-8
-m_rifle
-10
--1.26865
-20
-4.83208
-30
--37.2493
-11
--1.26865
-21
-4.64804
-31
--40.562
-12
-1.26866
-22
-4.64804
-32
--40.562
-13
-1.26866
-23
-4.64804
-33
--40.562
-0
-3DFACE
-8
-m_rifle
-10
-1.26867
-20
--7.49868
-30
--40.562
-11
-1.26866
-21
-4.64804
-31
--40.562
-12
--1.26865
-22
-4.64804
-32
--40.562
-13
--1.26865
-23
-4.64804
-33
--40.562
-0
-3DFACE
-8
-m_rifle
-10
--1.26865
-20
-4.64804
-30
--40.562
-11
--1.26865
-21
--7.49868
-31
--40.562
-12
-1.26867
-22
--7.49868
-32
--40.562
-13
-1.26867
-23
--7.49868
-33
--40.562
-0
-3DFACE
-8
-m_rifle
-10
-1.26867
-20
--7.68272
-30
--43.1386
-11
-1.26867
-21
--7.49868
-31
--40.562
-12
--1.26865
-22
--7.49868
-32
--40.562
-13
--1.26865
-23
--7.49868
-33
--40.562
-0
-3DFACE
-8
-m_rifle
-10
--1.26865
-20
--7.49868
-30
--40.562
-11
--1.26865
-21
--7.68272
-31
--43.1386
-12
-1.26867
-22
--7.68272
-32
--43.1386
-13
-1.26867
-23
--7.68272
-33
--43.1386
-0
-3DFACE
-8
-m_rifle
-10
-1.10056
-20
--7.86677
-30
--44.6109
-11
--1.26865
-21
--7.84576
-31
--44.4429
-12
--1.10061
-22
--7.86677
-32
--44.6109
-13
--1.10061
-23
--7.86677
-33
--44.6109
-0
-3DFACE
-8
-m_rifle
-10
-1.10056
-20
--7.86677
-30
--44.6109
-11
-1.26867
-21
--7.68272
-31
--43.1386
-12
--1.26865
-22
--7.84576
-32
--44.4429
-13
--1.26865
-23
--7.84576
-33
--44.4429
-0
-3DFACE
-8
-m_rifle
-10
-1.26867
-20
--7.68272
-30
--43.1386
-11
--1.26865
-21
--7.68272
-31
--43.1386
-12
--1.26865
-22
--7.84576
-32
--44.4429
-13
--1.26865
-23
--7.84576
-33
--44.4429
-0
-3DFACE
-8
-m_rifle
-10
-1.10056
-20
--7.86677
-30
--44.6109
-11
-1.26867
-21
--7.84575
-31
--44.4428
-12
-1.26867
-22
--7.68272
-32
--43.1386
-13
-1.26867
-23
--7.68272
-33
--43.1386
-0
-3DFACE
-8
-m_rifle
-10
-5.66656e-006
-20
-0.931545
-30
-21.3038
-11
--2.50242
-21
--0.513231
-31
-21.3038
-12
--2.88955
-22
-0.931545
-32
-21.3038
-13
--2.88955
-23
-0.931545
-33
-21.3038
-0
-3DFACE
-8
-m_rifle
-10
-5.66656e-006
-20
-0.931545
-30
-21.3038
-11
--1.44477
-21
--1.57088
-31
-21.3038
-12
--2.50242
-22
--0.513231
-32
-21.3038
-13
--2.50242
-23
--0.513231
-33
-21.3038
-0
-3DFACE
-8
-m_rifle
-10
-5.66656e-006
-20
-0.931545
-30
-21.3038
-11
-5.28765e-006
-21
--1.95801
-31
-21.3039
-12
--1.44477
-22
--1.57088
-32
-21.3038
-13
--1.44477
-23
--1.57088
-33
-21.3038
-0
-3DFACE
-8
-m_rifle
-10
-5.66656e-006
-20
-0.931545
-30
-21.3038
-11
-1.44478
-21
--1.57088
-31
-21.3039
-12
-5.28765e-006
-22
--1.95801
-32
-21.3039
-13
-5.28765e-006
-23
--1.95801
-33
-21.3039
-0
-3DFACE
-8
-m_rifle
-10
-5.66656e-006
-20
-0.931545
-30
-21.3038
-11
-2.50243
-21
--0.513232
-31
-21.3038
-12
-1.44478
-22
--1.57088
-32
-21.3039
-13
-1.44478
-23
--1.57088
-33
-21.3039
-0
-3DFACE
-8
-m_rifle
-10
-5.66656e-006
-20
-0.931545
-30
-21.3038
-11
-2.88956
-21
-0.931544
-31
-21.3038
-12
-2.50243
-22
--0.513232
-32
-21.3038
-13
-2.50243
-23
--0.513232
-33
-21.3038
-0
-3DFACE
-8
-m_rifle
-10
-5.66656e-006
-20
-0.931545
-30
-21.3038
-11
-2.50243
-21
-2.37632
-31
-21.3038
-12
-2.88956
-22
-0.931544
-32
-21.3038
-13
-2.88956
-23
-0.931544
-33
-21.3038
-0
-3DFACE
-8
-m_rifle
-10
-5.66656e-006
-20
-0.931545
-30
-21.3038
-11
-1.44478
-21
-3.43397
-31
-21.3038
-12
-2.50243
-22
-2.37632
-32
-21.3038
-13
-2.50243
-23
-2.37632
-33
-21.3038
-0
-3DFACE
-8
-m_rifle
-10
-5.66656e-006
-20
-0.931545
-30
-21.3038
-11
-5.79287e-006
-21
-3.8211
-31
-21.3038
-12
-1.44478
-22
-3.43397
-32
-21.3038
-13
-1.44478
-23
-3.43397
-33
-21.3038
-0
-3DFACE
-8
-m_rifle
-10
-5.66656e-006
-20
-0.931545
-30
-21.3038
-11
--1.44477
-21
-3.43397
-31
-21.3038
-12
-5.79287e-006
-22
-3.8211
-32
-21.3038
-13
-5.79287e-006
-23
-3.8211
-33
-21.3038
-0
-3DFACE
-8
-m_rifle
-10
-5.66656e-006
-20
-0.931545
-30
-21.3038
-11
--2.50242
-21
-2.37632
-31
-21.3038
-12
--1.44477
-22
-3.43397
-32
-21.3038
-13
--1.44477
-23
-3.43397
-33
-21.3038
-0
-3DFACE
-8
-m_rifle
-10
-5.66656e-006
-20
-0.931545
-30
-21.3038
-11
--2.88955
-21
-0.931545
-31
-21.3038
-12
--2.50242
-22
-2.37632
-32
-21.3038
-13
--2.50242
-23
-2.37632
-33
-21.3038
-0
-3DFACE
-8
-m_rifle
-10
--2.50241
-20
--0.51324
-30
-46.3113
-11
--2.88954
-21
-0.931535
-31
-46.3113
-12
--2.88955
-22
-0.931545
-32
-21.3038
-13
--2.88955
-23
-0.931545
-33
-21.3038
-0
-3DFACE
-8
-m_rifle
-10
--2.50241
-20
--0.51324
-30
-46.3113
-11
--2.88955
-21
-0.931545
-31
-21.3038
-12
--2.50242
-22
--0.513231
-32
-21.3038
-13
--2.50242
-23
--0.513231
-33
-21.3038
-0
-3DFACE
-8
-m_rifle
-10
--1.44476
-20
--1.57089
-30
-46.3113
-11
--2.50241
-21
--0.51324
-31
-46.3113
-12
--2.50242
-22
--0.513231
-32
-21.3038
-13
--2.50242
-23
--0.513231
-33
-21.3038
-0
-3DFACE
-8
-m_rifle
-10
--1.44476
-20
--1.57089
-30
-46.3113
-11
--2.50242
-21
--0.513231
-31
-21.3038
-12
--1.44477
-22
--1.57088
-32
-21.3038
-13
--1.44477
-23
--1.57088
-33
-21.3038
-0
-3DFACE
-8
-m_rifle
-10
-1.24699e-005
-20
--1.95802
-30
-46.3113
-11
--1.44476
-21
--1.57089
-31
-46.3113
-12
--1.44477
-22
--1.57088
-32
-21.3038
-13
--1.44477
-23
--1.57088
-33
-21.3038
-0
-3DFACE
-8
-m_rifle
-10
-1.24699e-005
-20
--1.95802
-30
-46.3113
-11
--1.44477
-21
--1.57088
-31
-21.3038
-12
-5.28765e-006
-22
--1.95801
-32
-21.3039
-13
-5.28765e-006
-23
--1.95801
-33
-21.3039
-0
-3DFACE
-8
-m_rifle
-10
-1.44479
-20
--1.57089
-30
-46.3113
-11
-1.24699e-005
-21
--1.95802
-31
-46.3113
-12
-5.28765e-006
-22
--1.95801
-32
-21.3039
-13
-5.28765e-006
-23
--1.95801
-33
-21.3039
-0
-3DFACE
-8
-m_rifle
-10
-1.44479
-20
--1.57089
-30
-46.3113
-11
-5.28765e-006
-21
--1.95801
-31
-21.3039
-12
-1.44478
-22
--1.57088
-32
-21.3039
-13
-1.44478
-23
--1.57088
-33
-21.3039
-0
-3DFACE
-8
-m_rifle
-10
-2.50244
-20
--0.513241
-30
-46.3113
-11
-1.44479
-21
--1.57089
-31
-46.3113
-12
-1.44478
-22
--1.57088
-32
-21.3039
-13
-1.44478
-23
--1.57088
-33
-21.3039
-0
-3DFACE
-8
-m_rifle
-10
-2.50244
-20
--0.513241
-30
-46.3113
-11
-1.44478
-21
--1.57088
-31
-21.3039
-12
-2.50243
-22
--0.513232
-32
-21.3038
-13
-2.50243
-23
--0.513232
-33
-21.3038
-0
-3DFACE
-8
-m_rifle
-10
-2.88956
-20
-0.931535
-30
-46.3113
-11
-2.50244
-21
--0.513241
-31
-46.3113
-12
-2.50243
-22
--0.513232
-32
-21.3038
-13
-2.50243
-23
--0.513232
-33
-21.3038
-0
-3DFACE
-8
-m_rifle
-10
-2.88956
-20
-0.931535
-30
-46.3113
-11
-2.50243
-21
--0.513232
-31
-21.3038
-12
-2.88956
-22
-0.931544
-32
-21.3038
-13
-2.88956
-23
-0.931544
-33
-21.3038
-0
-3DFACE
-8
-m_rifle
-10
-2.50244
-20
-2.37631
-30
-46.3113
-11
-2.88956
-21
-0.931535
-31
-46.3113
-12
-2.88956
-22
-0.931544
-32
-21.3038
-13
-2.88956
-23
-0.931544
-33
-21.3038
-0
-3DFACE
-8
-m_rifle
-10
-2.50244
-20
-2.37631
-30
-46.3113
-11
-2.88956
-21
-0.931544
-31
-21.3038
-12
-2.50243
-22
-2.37632
-32
-21.3038
-13
-2.50243
-23
-2.37632
-33
-21.3038
-0
-3DFACE
-8
-m_rifle
-10
-1.44479
-20
-3.43396
-30
-46.3113
-11
-2.50244
-21
-2.37631
-31
-46.3113
-12
-2.50243
-22
-2.37632
-32
-21.3038
-13
-2.50243
-23
-2.37632
-33
-21.3038
-0
-3DFACE
-8
-m_rifle
-10
-1.44479
-20
-3.43396
-30
-46.3113
-11
-2.50243
-21
-2.37632
-31
-21.3038
-12
-1.44478
-22
-3.43397
-32
-21.3038
-13
-1.44478
-23
-3.43397
-33
-21.3038
-0
-3DFACE
-8
-m_rifle
-10
-1.29751e-005
-20
-3.82109
-30
-46.3113
-11
-1.44479
-21
-3.43396
-31
-46.3113
-12
-1.44478
-22
-3.43397
-32
-21.3038
-13
-1.44478
-23
-3.43397
-33
-21.3038
-0
-3DFACE
-8
-m_rifle
-10
-1.29751e-005
-20
-3.82109
-30
-46.3113
-11
-1.44478
-21
-3.43397
-31
-21.3038
-12
-5.79287e-006
-22
-3.8211
-32
-21.3038
-13
-5.79287e-006
-23
-3.8211
-33
-21.3038
-0
-3DFACE
-8
-m_rifle
-10
--1.44476
-20
-3.43396
-30
-46.3113
-11
-1.29751e-005
-21
-3.82109
-31
-46.3113
-12
-5.79287e-006
-22
-3.8211
-32
-21.3038
-13
-5.79287e-006
-23
-3.8211
-33
-21.3038
-0
-3DFACE
-8
-m_rifle
-10
--1.44476
-20
-3.43396
-30
-46.3113
-11
-5.79287e-006
-21
-3.8211
-31
-21.3038
-12
--1.44477
-22
-3.43397
-32
-21.3038
-13
--1.44477
-23
-3.43397
-33
-21.3038
-0
-3DFACE
-8
-m_rifle
-10
--2.50241
-20
-2.37631
-30
-46.3113
-11
--1.44476
-21
-3.43396
-31
-46.3113
-12
--1.44477
-22
-3.43397
-32
-21.3038
-13
--1.44477
-23
-3.43397
-33
-21.3038
-0
-3DFACE
-8
-m_rifle
-10
--2.50241
-20
-2.37631
-30
-46.3113
-11
--1.44477
-21
-3.43397
-31
-21.3038
-12
--2.50242
-22
-2.37632
-32
-21.3038
-13
--2.50242
-23
-2.37632
-33
-21.3038
-0
-3DFACE
-8
-m_rifle
-10
--2.88954
-20
-0.931535
-30
-46.3113
-11
--2.50241
-21
-2.37631
-31
-46.3113
-12
--2.50242
-22
-2.37632
-32
-21.3038
-13
--2.50242
-23
-2.37632
-33
-21.3038
-0
-3DFACE
-8
-m_rifle
-10
--2.88954
-20
-0.931535
-30
-46.3113
-11
--2.50242
-21
-2.37632
-31
-21.3038
-12
--2.88955
-22
-0.931545
-32
-21.3038
-13
--2.88955
-23
-0.931545
-33
-21.3038
-0
-3DFACE
-8
-m_rifle
-10
-9.37788e-006
-20
-8.08618
-30
-68.5954
-11
-2.06813
-21
-6.84204
-31
-68.5954
-12
-2.38807
-22
-8.08618
-32
-68.5954
-13
-2.38807
-23
-8.08618
-33
-68.5954
-0
-3DFACE
-8
-m_rifle
-10
-9.37788e-006
-20
-8.08618
-30
-68.5954
-11
-1.19404
-21
-5.68821
-31
-68.5954
-12
-2.06813
-22
-6.84204
-32
-68.5954
-13
-2.06813
-23
-6.84204
-33
-68.5954
-0
-3DFACE
-8
-m_rifle
-10
-9.37788e-006
-20
-8.08618
-30
-68.5954
-11
-9.69103e-006
-21
-5.35646
-31
-68.5954
-12
-1.19404
-22
-5.68821
-32
-68.5954
-13
-1.19404
-23
-5.68821
-33
-68.5954
-0
-3DFACE
-8
-m_rifle
-10
-9.37788e-006
-20
-8.08618
-30
-68.5954
-11
--1.19402
-21
-5.68821
-31
-68.5954
-12
-9.69103e-006
-22
-5.35646
-32
-68.5954
-13
-9.69103e-006
-23
-5.35646
-33
-68.5954
-0
-3DFACE
-8
-m_rifle
-10
-9.37788e-006
-20
-8.08618
-30
-68.5954
-11
--2.06811
-21
-6.84204
-31
-68.5954
-12
--1.19402
-22
-5.68821
-32
-68.5954
-13
--1.19402
-23
-5.68821
-33
-68.5954
-0
-3DFACE
-8
-m_rifle
-10
-9.37788e-006
-20
-8.08618
-30
-68.5954
-11
--2.38805
-21
-8.08618
-31
-68.5954
-12
--2.06811
-22
-6.84204
-32
-68.5954
-13
--2.06811
-23
-6.84204
-33
-68.5954
-0
-3DFACE
-8
-m_rifle
-10
-9.37788e-006
-20
-8.08618
-30
-68.5954
-11
--2.06811
-21
-9.4956
-31
-68.5954
-12
--2.38805
-22
-8.08618
-32
-68.5954
-13
--2.38805
-23
-8.08618
-33
-68.5954
-0
-3DFACE
-8
-m_rifle
-10
-9.37788e-006
-20
-8.08618
-30
-68.5954
-11
--1.19402
-21
-10.5497
-31
-68.5954
-12
--2.06811
-22
-9.4956
-32
-68.5954
-13
--2.06811
-23
-9.4956
-33
-68.5954
-0
-3DFACE
-8
-m_rifle
-10
-9.37788e-006
-20
-8.08618
-30
-68.5954
-11
-9.27349e-006
-21
-10.8697
-31
-68.5954
-12
--1.19402
-22
-10.5497
-32
-68.5954
-13
--1.19402
-23
-10.5497
-33
-68.5954
-0
-3DFACE
-8
-m_rifle
-10
-9.37788e-006
-20
-8.08618
-30
-68.5954
-11
-1.19404
-21
-10.5497
-31
-68.5954
-12
-9.27349e-006
-22
-10.8697
-32
-68.5954
-13
-9.27349e-006
-23
-10.8697
-33
-68.5954
-0
-3DFACE
-8
-m_rifle
-10
-9.37788e-006
-20
-8.08618
-30
-68.5954
-11
-2.06813
-21
-9.4956
-31
-68.5954
-12
-1.19404
-22
-10.5497
-32
-68.5954
-13
-1.19404
-23
-10.5497
-33
-68.5954
-0
-3DFACE
-8
-m_rifle
-10
-9.37788e-006
-20
-8.08618
-30
-68.5954
-11
-2.38807
-21
-8.08618
-31
-68.5954
-12
-2.06813
-22
-9.4956
-32
-68.5954
-13
-2.06813
-23
-9.4956
-33
-68.5954
-0
-3DFACE
-8
-m_rifle
-10
-2.06813
-20
-6.84203
-30
--17.1514
-11
-2.38807
-21
-8.08617
-31
--17.1514
-12
-2.38807
-22
-8.08618
-32
-68.5954
-13
-2.38807
-23
-8.08618
-33
-68.5954
-0
-3DFACE
-8
-m_rifle
-10
-2.06813
-20
-6.84203
-30
--17.1514
-11
-2.38807
-21
-8.08618
-31
-68.5954
-12
-2.06813
-22
-6.84204
-32
-68.5954
-13
-2.06813
-23
-6.84204
-33
-68.5954
-0
-3DFACE
-8
-m_rifle
-10
-1.19404
-20
-5.6882
-30
--17.1514
-11
-2.06813
-21
-6.84203
-31
--17.1514
-12
-2.06813
-22
-6.84204
-32
-68.5954
-13
-2.06813
-23
-6.84204
-33
-68.5954
-0
-3DFACE
-8
-m_rifle
-10
-1.19404
-20
-5.6882
-30
--17.1514
-11
-2.06813
-21
-6.84204
-31
-68.5954
-12
-1.19404
-22
-5.68821
-32
-68.5954
-13
-1.19404
-23
-5.68821
-33
-68.5954
-0
-3DFACE
-8
-m_rifle
-10
-9.7207e-006
-20
-5.35645
-30
--17.1514
-11
-1.19404
-21
-5.6882
-31
--17.1514
-12
-1.19404
-22
-5.68821
-32
-68.5954
-13
-1.19404
-23
-5.68821
-33
-68.5954
-0
-3DFACE
-8
-m_rifle
-10
-9.7207e-006
-20
-5.35645
-30
--17.1514
-11
-1.19404
-21
-5.68821
-31
-68.5954
-12
-9.69103e-006
-22
-5.35646
-32
-68.5954
-13
-9.69103e-006
-23
-5.35646
-33
-68.5954
-0
-3DFACE
-8
-m_rifle
-10
--1.19402
-20
-5.6882
-30
--17.1514
-11
-9.7207e-006
-21
-5.35645
-31
--17.1514
-12
-9.69103e-006
-22
-5.35646
-32
-68.5954
-13
-9.69103e-006
-23
-5.35646
-33
-68.5954
-0
-3DFACE
-8
-m_rifle
-10
--1.19402
-20
-5.6882
-30
--17.1514
-11
-9.69103e-006
-21
-5.35646
-31
-68.5954
-12
--1.19402
-22
-5.68821
-32
-68.5954
-13
--1.19402
-23
-5.68821
-33
-68.5954
-0
-3DFACE
-8
-m_rifle
-10
--2.06811
-20
-6.84203
-30
--17.1514
-11
--1.19402
-21
-5.6882
-31
--17.1514
-12
--1.19402
-22
-5.68821
-32
-68.5954
-13
--1.19402
-23
-5.68821
-33
-68.5954
-0
-3DFACE
-8
-m_rifle
-10
--2.06811
-20
-6.84203
-30
--17.1514
-11
--1.19402
-21
-5.68821
-31
-68.5954
-12
--2.06811
-22
-6.84204
-32
-68.5954
-13
--2.06811
-23
-6.84204
-33
-68.5954
-0
-3DFACE
-8
-m_rifle
-10
--2.38805
-20
-8.08617
-30
--17.1514
-11
--2.06811
-21
-6.84203
-31
--17.1514
-12
--2.06811
-22
-6.84204
-32
-68.5954
-13
--2.06811
-23
-6.84204
-33
-68.5954
-0
-3DFACE
-8
-m_rifle
-10
--2.38805
-20
-8.08617
-30
--17.1514
-11
--2.06811
-21
-6.84204
-31
-68.5954
-12
--2.38805
-22
-8.08618
-32
-68.5954
-13
--2.38805
-23
-8.08618
-33
-68.5954
-0
-3DFACE
-8
-m_rifle
-10
--2.06811
-20
-9.49559
-30
--17.1514
-11
--2.38805
-21
-8.08617
-31
--17.1514
-12
--2.38805
-22
-8.08618
-32
-68.5954
-13
--2.38805
-23
-8.08618
-33
-68.5954
-0
-3DFACE
-8
-m_rifle
-10
--2.06811
-20
-9.49559
-30
--17.1514
-11
--2.38805
-21
-8.08618
-31
-68.5954
-12
--2.06811
-22
-9.4956
-32
-68.5954
-13
--2.06811
-23
-9.4956
-33
-68.5954
-0
-3DFACE
-8
-m_rifle
-10
--1.19402
-20
-10.5497
-30
--17.1514
-11
--2.06811
-21
-9.49559
-31
--17.1514
-12
--2.06811
-22
-9.4956
-32
-68.5954
-13
--2.06811
-23
-9.4956
-33
-68.5954
-0
-3DFACE
-8
-m_rifle
-10
--1.19402
-20
-10.5497
-30
--17.1514
-11
--2.06811
-21
-9.4956
-31
-68.5954
-12
--1.19402
-22
-10.5497
-32
-68.5954
-13
--1.19402
-23
-10.5497
-33
-68.5954
-0
-3DFACE
-8
-m_rifle
-10
-9.30316e-006
-20
-10.8697
-30
--17.1514
-11
--1.19402
-21
-10.5497
-31
--17.1514
-12
--1.19402
-22
-10.5497
-32
-68.5954
-13
--1.19402
-23
-10.5497
-33
-68.5954
-0
-3DFACE
-8
-m_rifle
-10
-9.30316e-006
-20
-10.8697
-30
--17.1514
-11
--1.19402
-21
-10.5497
-31
-68.5954
-12
-9.27349e-006
-22
-10.8697
-32
-68.5954
-13
-9.27349e-006
-23
-10.8697
-33
-68.5954
-0
-3DFACE
-8
-m_rifle
-10
-1.19404
-20
-10.5497
-30
--17.1514
-11
-9.30316e-006
-21
-10.8697
-31
--17.1514
-12
-9.27349e-006
-22
-10.8697
-32
-68.5954
-13
-9.27349e-006
-23
-10.8697
-33
-68.5954
-0
-3DFACE
-8
-m_rifle
-10
-1.19404
-20
-10.5497
-30
--17.1514
-11
-9.27349e-006
-21
-10.8697
-31
-68.5954
-12
-1.19404
-22
-10.5497
-32
-68.5954
-13
-1.19404
-23
-10.5497
-33
-68.5954
-0
-3DFACE
-8
-m_rifle
-10
-2.06813
-20
-9.49559
-30
--17.1514
-11
-1.19404
-21
-10.5497
-31
--17.1514
-12
-1.19404
-22
-10.5497
-32
-68.5954
-13
-1.19404
-23
-10.5497
-33
-68.5954
-0
-3DFACE
-8
-m_rifle
-10
-2.06813
-20
-9.49559
-30
--17.1514
-11
-1.19404
-21
-10.5497
-31
-68.5954
-12
-2.06813
-22
-9.4956
-32
-68.5954
-13
-2.06813
-23
-9.4956
-33
-68.5954
-0
-3DFACE
-8
-m_rifle
-10
-2.38807
-20
-8.08617
-30
--17.1514
-11
-2.06813
-21
-9.49559
-31
--17.1514
-12
-2.06813
-22
-9.4956
-32
-68.5954
-13
-2.06813
-23
-9.4956
-33
-68.5954
-0
-3DFACE
-8
-m_rifle
-10
-2.38807
-20
-8.08617
-30
--17.1514
-11
-2.06813
-21
-9.4956
-31
-68.5954
-12
-2.38807
-22
-8.08618
-32
-68.5954
-13
-2.38807
-23
-8.08618
-33
-68.5954
-0
-3DFACE
-8
-m_rifle
-10
--0.298499
-20
--1.33594
-30
--0.446208
-11
--0.298499
-21
-0.612251
-31
--1.58516
-12
--0.298499
-22
--1.45583
-32
--1.1056
-13
--0.298499
-23
--1.45583
-33
--1.1056
-0
-3DFACE
-8
-m_rifle
-10
--0.298499
-20
--1.33594
-30
--0.446208
-11
--0.298499
-21
-0.732141
-31
--0.146484
-12
--0.298499
-22
-0.612251
-32
--1.58516
-13
--0.298499
-23
-0.612251
-33
--1.58516
-0
-3DFACE
-8
-m_rifle
-10
--0.298499
-20
--1.45583
-30
--1.1056
-11
--0.298499
-21
--3.16424
-31
--0.266377
-12
--0.298499
-22
--1.33594
-32
--0.446208
-13
--0.298499
-23
--1.33594
-33
--0.446208
-0
-3DFACE
-8
-m_rifle
-10
-0.298516
-20
--1.33594
-30
--0.446208
-11
-0.298516
-21
--1.45583
-31
--1.1056
-12
-0.298516
-22
-0.612251
-32
--1.58516
-13
-0.298516
-23
-0.612251
-33
--1.58516
-0
-3DFACE
-8
-m_rifle
-10
-0.298516
-20
--1.33594
-30
--0.446208
-11
-0.298516
-21
-0.612251
-31
--1.58516
-12
-0.298516
-22
-0.732141
-32
--0.146484
-13
-0.298516
-23
-0.732141
-33
--0.146484
-0
-3DFACE
-8
-m_rifle
-10
-0.298516
-20
--1.45583
-30
--1.1056
-11
-0.298516
-21
--1.33594
-31
--0.446208
-12
-0.298516
-22
--3.16424
-32
--0.266377
-13
-0.298516
-23
--3.16424
-33
--0.266377
-0
-3DFACE
-8
-m_rifle
-10
-0.298516
-20
--1.33594
-30
--0.446208
-11
--0.298499
-21
-0.732141
-31
--0.146484
-12
--0.298499
-22
--1.33594
-32
--0.446208
-13
--0.298499
-23
--1.33594
-33
--0.446208
-0
-3DFACE
-8
-m_rifle
-10
-0.298516
-20
--1.33594
-30
--0.446208
-11
-0.298516
-21
-0.732141
-31
--0.146484
-12
--0.298499
-22
-0.732141
-32
--0.146484
-13
--0.298499
-23
-0.732141
-33
--0.146484
-0
-3DFACE
-8
-m_rifle
-10
-0.298516
-20
--3.16424
-30
--0.266377
-11
--0.298499
-21
--1.33594
-31
--0.446208
-12
--0.298499
-22
--3.16424
-32
--0.266377
-13
--0.298499
-23
--3.16424
-33
--0.266377
-0
-3DFACE
-8
-m_rifle
-10
-0.298516
-20
--3.16424
-30
--0.266377
-11
-0.298516
-21
--1.33594
-31
--0.446208
-12
--0.298499
-22
--1.33594
-32
--0.446208
-13
--0.298499
-23
--1.33594
-33
--0.446208
-0
-3DFACE
-8
-m_rifle
-10
-0.298516
-20
--1.45583
-30
--1.1056
-11
--0.298499
-21
--3.16424
-31
--0.266377
-12
--0.298499
-22
--1.45583
-32
--1.1056
-13
--0.298499
-23
--1.45583
-33
--1.1056
-0
-3DFACE
-8
-m_rifle
-10
-0.298516
-20
--1.45583
-30
--1.1056
-11
-0.298516
-21
--3.16424
-31
--0.266377
-12
--0.298499
-22
--3.16424
-32
--0.266377
-13
--0.298499
-23
--3.16424
-33
--0.266377
-0
-3DFACE
-8
-m_rifle
-10
-0.298516
-20
-0.612251
-30
--1.58516
-11
--0.298499
-21
--1.45583
-31
--1.1056
-12
--0.298499
-22
-0.612251
-32
--1.58516
-13
--0.298499
-23
-0.612251
-33
--1.58516
-0
-3DFACE
-8
-m_rifle
-10
-0.298516
-20
-0.612251
-30
--1.58516
-11
-0.298516
-21
--1.45583
-31
--1.1056
-12
--0.298499
-22
--1.45583
-32
--1.1056
-13
--0.298499
-23
--1.45583
-33
--1.1056
-0
-3DFACE
-8
-m_rifle
-10
--1.79104
-20
--3.09075
-30
-5.50784
-11
--1.79104
-21
--7.23018
-31
-13.4521
-12
--1.79104
-22
--1.65989
-32
-6.25887
-13
--1.79104
-23
--1.65989
-33
-6.25887
-0
-3DFACE
-8
-m_rifle
-10
--1.79104
-20
--7.23018
-30
-13.4521
-11
--1.79104
-21
--6.00069
-31
-14.6816
-12
--1.79104
-22
--1.65989
-32
-6.25887
-13
--1.79104
-23
--1.65989
-33
-6.25887
-0
-3DFACE
-8
-m_rifle
-10
--1.79104
-20
--6.00069
-30
-14.6816
-11
--1.79104
-21
--1.19452
-31
-14.6816
-12
--1.79104
-22
--1.65989
-32
-6.25887
-13
--1.79104
-23
--1.65989
-33
-6.25887
-0
-3DFACE
-8
-m_rifle
-10
--1.79104
-20
--3.09075
-30
-5.50784
-11
--1.79104
-21
--4.50547
-31
-3.7566
-12
--1.79104
-22
--7.23018
-32
-13.4521
-13
--1.79104
-23
--7.23018
-33
-13.4521
-0
-3DFACE
-8
-m_rifle
-10
--1.79104
-20
--4.50547
-30
-3.7566
-11
--1.79104
-21
--10.9186
-31
-13.4521
-12
--1.79104
-22
--7.23018
-32
-13.4521
-13
--1.79104
-23
--7.23018
-33
-13.4521
-0
-3DFACE
-8
-m_rifle
-10
--1.79104
-20
--4.50547
-30
-3.7566
-11
--1.79104
-21
--21.5369
-31
-3.50445
-12
--1.79104
-22
--10.9186
-32
-13.4521
-13
--1.79104
-23
--10.9186
-33
-13.4521
-0
-3DFACE
-8
-m_rifle
-10
--1.79104
-20
--21.5369
-30
-3.50445
-11
--1.79104
-21
--21.5369
-31
-14.1227
-12
--1.79104
-22
--10.9186
-32
-13.4521
-13
--1.79104
-23
--10.9186
-33
-13.4521
-0
-3DFACE
-8
-m_rifle
-10
--1.79104
-20
--21.5369
-30
-14.1227
-11
--1.79104
-21
--10.9186
-31
-17.4759
-12
--1.79104
-22
--10.9186
-32
-13.4521
-13
--1.79104
-23
--10.9186
-33
-13.4521
-0
-3DFACE
-8
-m_rifle
-10
--1.79104
-20
--21.5369
-30
-14.1227
-11
--1.79104
-21
--6.44777
-31
-21.6115
-12
--1.79104
-22
--10.9186
-32
-17.4759
-13
--1.79104
-23
--10.9186
-33
-17.4759
-0
-3DFACE
-8
-m_rifle
-10
--1.79104
-20
--21.5369
-30
-14.1227
-11
--1.79104
-21
--6.55955
-31
-23.6234
-12
--1.79104
-22
--6.44777
-32
-21.6115
-13
--1.79104
-23
--6.44777
-33
-21.6115
-0
-3DFACE
-8
-m_rifle
-10
-1.79105
-20
--3.09075
-30
-5.50784
-11
-1.79105
-21
--1.65989
-31
-6.25887
-12
-1.79105
-22
--7.23018
-32
-13.4521
-13
-1.79105
-23
--7.23018
-33
-13.4521
-0
-3DFACE
-8
-m_rifle
-10
-1.79105
-20
--7.23018
-30
-13.4521
-11
-1.79105
-21
--1.65989
-31
-6.25887
-12
-1.79105
-22
--6.00069
-32
-14.6816
-13
-1.79105
-23
--6.00069
-33
-14.6816
-0
-3DFACE
-8
-m_rifle
-10
-1.79105
-20
--6.00069
-30
-14.6816
-11
-1.79105
-21
--1.65989
-31
-6.25887
-12
-1.79105
-22
--1.19452
-32
-14.6816
-13
-1.79105
-23
--1.19452
-33
-14.6816
-0
-3DFACE
-8
-m_rifle
-10
-1.79105
-20
--3.09075
-30
-5.50784
-11
-1.79105
-21
--7.23018
-31
-13.4521
-12
-1.79105
-22
--4.50547
-32
-3.7566
-13
-1.79105
-23
--4.50547
-33
-3.7566
-0
-3DFACE
-8
-m_rifle
-10
-1.79105
-20
--4.50547
-30
-3.7566
-11
-1.79105
-21
--7.23018
-31
-13.4521
-12
-1.79105
-22
--10.9186
-32
-13.4521
-13
-1.79105
-23
--10.9186
-33
-13.4521
-0
-3DFACE
-8
-m_rifle
-10
-1.79105
-20
--4.50547
-30
-3.7566
-11
-1.79105
-21
--10.9186
-31
-13.4521
-12
-1.79105
-22
--21.5369
-32
-3.50445
-13
-1.79105
-23
--21.5369
-33
-3.50445
-0
-3DFACE
-8
-m_rifle
-10
-1.79105
-20
--21.5369
-30
-3.50445
-11
-1.79105
-21
--10.9186
-31
-13.4521
-12
-1.79105
-22
--21.5369
-32
-14.1227
-13
-1.79105
-23
--21.5369
-33
-14.1227
-0
-3DFACE
-8
-m_rifle
-10
-1.79105
-20
--21.5369
-30
-14.1227
-11
-1.79105
-21
--10.9186
-31
-13.4521
-12
-1.79105
-22
--10.9186
-32
-17.4759
-13
-1.79105
-23
--10.9186
-33
-17.4759
-0
-3DFACE
-8
-m_rifle
-10
-1.79105
-20
--21.5369
-30
-14.1227
-11
-1.79105
-21
--10.9186
-31
-17.4759
-12
-1.79105
-22
--6.44777
-32
-21.6115
-13
-1.79105
-23
--6.44777
-33
-21.6115
-0
-3DFACE
-8
-m_rifle
-10
-1.79105
-20
--21.5369
-30
-14.1227
-11
-1.79105
-21
--6.44777
-31
-21.6115
-12
-1.79105
-22
--6.55955
-32
-23.6234
-13
-1.79105
-23
--6.55955
-33
-23.6234
-0
-3DFACE
-8
-m_rifle
-10
-1.79105
-20
--4.50547
-30
-3.7566
-11
--1.79104
-21
--21.5369
-31
-3.50445
-12
--1.79104
-22
--4.50547
-32
-3.7566
-13
--1.79104
-23
--4.50547
-33
-3.7566
-0
-3DFACE
-8
-m_rifle
-10
-1.79105
-20
--4.50547
-30
-3.7566
-11
-1.79105
-21
--21.5369
-31
-3.50445
-12
--1.79104
-22
--21.5369
-32
-3.50445
-13
--1.79104
-23
--21.5369
-33
-3.50445
-0
-3DFACE
-8
-m_rifle
-10
-1.79105
-20
--3.09075
-30
-5.50784
-11
--1.79104
-21
--4.50547
-31
-3.7566
-12
--1.79104
-22
--3.09075
-32
-5.50784
-13
--1.79104
-23
--3.09075
-33
-5.50784
-0
-3DFACE
-8
-m_rifle
-10
-1.79105
-20
--3.09075
-30
-5.50784
-11
-1.79105
-21
--4.50547
-31
-3.7566
-12
--1.79104
-22
--4.50547
-32
-3.7566
-13
--1.79104
-23
--4.50547
-33
-3.7566
-0
-3DFACE
-8
-m_rifle
-10
-1.79105
-20
--1.65989
-30
-6.25887
-11
--1.79104
-21
--3.09075
-31
-5.50784
-12
--1.79104
-22
--1.65989
-32
-6.25887
-13
--1.79104
-23
--1.65989
-33
-6.25887
-0
-3DFACE
-8
-m_rifle
-10
-1.79105
-20
--1.65989
-30
-6.25887
-11
-1.79105
-21
--3.09075
-31
-5.50784
-12
--1.79104
-22
--3.09075
-32
-5.50784
-13
--1.79104
-23
--3.09075
-33
-5.50784
-0
-3DFACE
-8
-m_rifle
-10
-1.79105
-20
--1.19452
-30
-14.6816
-11
--1.79104
-21
--1.65989
-31
-6.25887
-12
--1.79104
-22
--1.19452
-32
-14.6816
-13
--1.79104
-23
--1.19452
-33
-14.6816
-0
-3DFACE
-8
-m_rifle
-10
-1.79105
-20
--1.19452
-30
-14.6816
-11
-1.79105
-21
--1.65989
-31
-6.25887
-12
--1.79104
-22
--1.65989
-32
-6.25887
-13
--1.79104
-23
--1.65989
-33
-6.25887
-0
-3DFACE
-8
-m_rifle
-10
-1.79105
-20
--6.00069
-30
-14.6816
-11
--1.79104
-21
--1.19452
-31
-14.6816
-12
--1.79104
-22
--6.00069
-32
-14.6816
-13
--1.79104
-23
--6.00069
-33
-14.6816
-0
-3DFACE
-8
-m_rifle
-10
-1.79105
-20
--6.00069
-30
-14.6816
-11
-1.79105
-21
--1.19452
-31
-14.6816
-12
--1.79104
-22
--1.19452
-32
-14.6816
-13
--1.79104
-23
--1.19452
-33
-14.6816
-0
-3DFACE
-8
-m_rifle
-10
-1.79105
-20
--7.23018
-30
-13.4521
-11
--1.79104
-21
--6.00069
-31
-14.6816
-12
--1.79104
-22
--7.23018
-32
-13.4521
-13
--1.79104
-23
--7.23018
-33
-13.4521
-0
-3DFACE
-8
-m_rifle
-10
-1.79105
-20
--7.23018
-30
-13.4521
-11
-1.79105
-21
--6.00069
-31
-14.6816
-12
--1.79104
-22
--6.00069
-32
-14.6816
-13
--1.79104
-23
--6.00069
-33
-14.6816
-0
-3DFACE
-8
-m_rifle
-10
-1.79105
-20
--10.9186
-30
-13.4521
-11
--1.79104
-21
--7.23018
-31
-13.4521
-12
--1.79104
-22
--10.9186
-32
-13.4521
-13
--1.79104
-23
--10.9186
-33
-13.4521
-0
-3DFACE
-8
-m_rifle
-10
-1.79105
-20
--10.9186
-30
-13.4521
-11
-1.79105
-21
--7.23018
-31
-13.4521
-12
--1.79104
-22
--7.23018
-32
-13.4521
-13
--1.79104
-23
--7.23018
-33
-13.4521
-0
-3DFACE
-8
-m_rifle
-10
-1.79105
-20
--10.9186
-30
-17.4759
-11
--1.79104
-21
--10.9186
-31
-13.4521
-12
--1.79104
-22
--10.9186
-32
-17.4759
-13
--1.79104
-23
--10.9186
-33
-17.4759
-0
-3DFACE
-8
-m_rifle
-10
-1.79105
-20
--10.9186
-30
-17.4759
-11
-1.79105
-21
--10.9186
-31
-13.4521
-12
--1.79104
-22
--10.9186
-32
-13.4521
-13
--1.79104
-23
--10.9186
-33
-13.4521
-0
-3DFACE
-8
-m_rifle
-10
-1.79105
-20
--6.44777
-30
-21.6115
-11
--1.79104
-21
--10.9186
-31
-17.4759
-12
--1.79104
-22
--6.44777
-32
-21.6115
-13
--1.79104
-23
--6.44777
-33
-21.6115
-0
-3DFACE
-8
-m_rifle
-10
-1.79105
-20
--6.44777
-30
-21.6115
-11
-1.79105
-21
--10.9186
-31
-17.4759
-12
--1.79104
-22
--10.9186
-32
-17.4759
-13
--1.79104
-23
--10.9186
-33
-17.4759
-0
-3DFACE
-8
-m_rifle
-10
-1.79105
-20
--6.55955
-30
-23.6234
-11
--1.79104
-21
--6.44777
-31
-21.6115
-12
--1.79104
-22
--6.55955
-32
-23.6234
-13
--1.79104
-23
--6.55955
-33
-23.6234
-0
-3DFACE
-8
-m_rifle
-10
-1.79105
-20
--6.55955
-30
-23.6234
-11
-1.79105
-21
--6.44777
-31
-21.6115
-12
--1.79104
-22
--6.44777
-32
-21.6115
-13
--1.79104
-23
--6.44777
-33
-21.6115
-0
-3DFACE
-8
-m_rifle
-10
-1.79105
-20
--21.5369
-30
-14.1227
-11
--1.79104
-21
--6.55955
-31
-23.6234
-12
--1.79104
-22
--21.5369
-32
-14.1227
-13
--1.79104
-23
--21.5369
-33
-14.1227
-0
-3DFACE
-8
-m_rifle
-10
-1.79105
-20
--21.5369
-30
-14.1227
-11
-1.79105
-21
--6.55955
-31
-23.6234
-12
--1.79104
-22
--6.55955
-32
-23.6234
-13
--1.79104
-23
--6.55955
-33
-23.6234
-0
-3DFACE
-8
-m_rifle
-10
-1.79105
-20
--21.5369
-30
-3.50445
-11
--1.79104
-21
--21.5369
-31
-14.1227
-12
--1.79104
-22
--21.5369
-32
-3.50445
-13
--1.79104
-23
--21.5369
-33
-3.50445
-0
-3DFACE
-8
-m_rifle
-10
-1.79105
-20
--21.5369
-30
-3.50445
-11
-1.79105
-21
--21.5369
-31
-14.1227
-12
--1.79104
-22
--21.5369
-32
-14.1227
-13
--1.79104
-23
--21.5369
-33
-14.1227
-0
-3DFACE
-8
-m_rifle
-10
-6.41692e-006
-20
--7.04182
-30
-46.0875
-11
-2.47254
-21
--3.44558
-31
-46.0875
-12
-2.38806
-22
--6.5821
-32
-46.0875
-13
-2.38806
-23
--6.5821
-33
-46.0875
-0
-3DFACE
-8
-m_rifle
-10
-6.41692e-006
-20
--7.04182
-30
-46.0875
-11
-2.85851
-21
--1.57443
-31
-46.0875
-12
-2.47254
-22
--3.44558
-32
-46.0875
-13
-2.47254
-23
--3.44558
-33
-46.0875
-0
-3DFACE
-8
-m_rifle
-10
-6.41692e-006
-20
--7.04182
-30
-46.0875
-11
-3.41433
-21
-0.842753
-31
-46.0874
-12
-2.85851
-22
--1.57443
-32
-46.0875
-13
-2.85851
-23
--1.57443
-33
-46.0875
-0
-3DFACE
-8
-m_rifle
-10
-6.41692e-006
-20
--7.04182
-30
-46.0875
-11
-2.64228
-21
-3.09977
-31
-46.0875
-12
-3.41433
-22
-0.842753
-32
-46.0874
-13
-3.41433
-23
-0.842753
-33
-46.0874
-0
-3DFACE
-8
-m_rifle
-10
-6.41692e-006
-20
--7.04182
-30
-46.0875
-11
-5.49294e-006
-21
-4.0837
-31
-46.0875
-12
-2.64228
-22
-3.09977
-32
-46.0875
-13
-2.64228
-23
-3.09977
-33
-46.0875
-0
-3DFACE
-8
-m_rifle
-10
-6.41692e-006
-20
--7.04182
-30
-46.0875
-11
--2.64227
-21
-3.09977
-31
-46.0875
-12
-5.49294e-006
-22
-4.0837
-32
-46.0875
-13
-5.49294e-006
-23
-4.0837
-33
-46.0875
-0
-3DFACE
-8
-m_rifle
-10
-6.41692e-006
-20
--7.04182
-30
-46.0875
-11
--3.41432
-21
-0.842753
-31
-46.0875
-12
--2.64227
-22
-3.09977
-32
-46.0875
-13
--2.64227
-23
-3.09977
-33
-46.0875
-0
-3DFACE
-8
-m_rifle
-10
-6.41692e-006
-20
--7.04182
-30
-46.0875
-11
--2.8585
-21
--1.57443
-31
-46.0875
-12
--3.41432
-22
-0.842753
-32
-46.0875
-13
--3.41432
-23
-0.842753
-33
-46.0875
-0
-3DFACE
-8
-m_rifle
-10
-6.41692e-006
-20
--7.04182
-30
-46.0875
-11
--2.47253
-21
--3.44559
-31
-46.0875
-12
--2.8585
-22
--1.57443
-32
-46.0875
-13
--2.8585
-23
--1.57443
-33
-46.0875
-0
-3DFACE
-8
-m_rifle
-10
-6.41692e-006
-20
--7.04182
-30
-46.0875
-11
--2.38806
-21
--6.5821
-31
-46.0875
-12
--2.47253
-22
--3.44559
-32
-46.0875
-13
--2.47253
-23
--3.44559
-33
-46.0875
-0
-3DFACE
-8
-m_rifle
-10
-1.28503e-005
-20
--1.20082
-30
-71.3027
-11
-2.47255
-21
--3.44556
-31
-71.3026
-12
-2.85852
-22
--1.57441
-32
-71.3026
-13
-2.85852
-23
--1.57441
-33
-71.3026
-0
-3DFACE
-8
-m_rifle
-10
-1.28503e-005
-20
--1.20082
-30
-71.3027
-11
-2.38807
-21
--6.58208
-31
-71.3027
-12
-2.47255
-22
--3.44556
-32
-71.3026
-13
-2.47255
-23
--3.44556
-33
-71.3026
-0
-3DFACE
-8
-m_rifle
-10
-1.28503e-005
-20
--1.20082
-30
-71.3027
-11
-1.35433e-005
-21
--7.0418
-31
-71.3026
-12
-2.38807
-22
--6.58208
-32
-71.3027
-13
-2.38807
-23
--6.58208
-33
-71.3027
-0
-3DFACE
-8
-m_rifle
-10
-1.28503e-005
-20
--1.20082
-30
-71.3027
-11
--2.38805
-21
--6.58208
-31
-71.3026
-12
-1.35433e-005
-22
--7.0418
-32
-71.3026
-13
-1.35433e-005
-23
--7.0418
-33
-71.3026
-0
-3DFACE
-8
-m_rifle
-10
-1.28503e-005
-20
--1.20082
-30
-71.3027
-11
--2.47253
-21
--3.44557
-31
-71.3026
-12
--2.38805
-22
--6.58208
-32
-71.3026
-13
--2.38805
-23
--6.58208
-33
-71.3026
-0
-3DFACE
-8
-m_rifle
-10
-1.28503e-005
-20
--1.20082
-30
-71.3027
-11
--2.8585
-21
--1.57441
-31
-71.3026
-12
--2.47253
-22
--3.44557
-32
-71.3026
-13
--2.47253
-23
--3.44557
-33
-71.3026
-0
-3DFACE
-8
-m_rifle
-10
-1.28503e-005
-20
--1.20082
-30
-71.3027
-11
--3.41432
-21
-0.842771
-31
-71.3027
-12
--2.8585
-22
--1.57441
-32
-71.3026
-13
--2.8585
-23
--1.57441
-33
-71.3026
-0
-3DFACE
-8
-m_rifle
-10
-1.28503e-005
-20
--1.20082
-30
-71.3027
-11
--2.64226
-21
-3.09979
-31
-71.3027
-12
--3.41432
-22
-0.842771
-32
-71.3027
-13
--3.41432
-23
-0.842771
-33
-71.3027
-0
-3DFACE
-8
-m_rifle
-10
-1.28503e-005
-20
--1.20082
-30
-71.3027
-11
-1.26193e-005
-21
-4.08372
-31
-71.3027
-12
--2.64226
-22
-3.09979
-32
-71.3027
-13
--2.64226
-23
-3.09979
-33
-71.3027
-0
-3DFACE
-8
-m_rifle
-10
-1.28503e-005
-20
--1.20082
-30
-71.3027
-11
-2.64229
-21
-3.09979
-31
-71.3027
-12
-1.26193e-005
-22
-4.08372
-32
-71.3027
-13
-1.26193e-005
-23
-4.08372
-33
-71.3027
-0
-3DFACE
-8
-m_rifle
-10
-1.28503e-005
-20
--1.20082
-30
-71.3027
-11
-3.41434
-21
-0.842771
-31
-71.3026
-12
-2.64229
-22
-3.09979
-32
-71.3027
-13
-2.64229
-23
-3.09979
-33
-71.3027
-0
-3DFACE
-8
-m_rifle
-10
-1.28503e-005
-20
--1.20082
-30
-71.3027
-11
-2.85852
-21
--1.57441
-31
-71.3026
-12
-3.41434
-22
-0.842771
-32
-71.3026
-13
-3.41434
-23
-0.842771
-33
-71.3026
-0
-3DFACE
-8
-m_rifle
-10
-2.47254
-20
--3.44558
-30
-46.0875
-11
-2.85851
-21
--1.57443
-31
-46.0875
-12
-2.85852
-22
--1.57441
-32
-71.3026
-13
-2.85852
-23
--1.57441
-33
-71.3026
-0
-3DFACE
-8
-m_rifle
-10
-2.47254
-20
--3.44558
-30
-46.0875
-11
-2.85852
-21
--1.57441
-31
-71.3026
-12
-2.47255
-22
--3.44556
-32
-71.3026
-13
-2.47255
-23
--3.44556
-33
-71.3026
-0
-3DFACE
-8
-m_rifle
-10
-2.38806
-20
--6.5821
-30
-46.0875
-11
-2.47254
-21
--3.44558
-31
-46.0875
-12
-2.47255
-22
--3.44556
-32
-71.3026
-13
-2.47255
-23
--3.44556
-33
-71.3026
-0
-3DFACE
-8
-m_rifle
-10
-2.38806
-20
--6.5821
-30
-46.0875
-11
-2.47255
-21
--3.44556
-31
-71.3026
-12
-2.38807
-22
--6.58208
-32
-71.3027
-13
-2.38807
-23
--6.58208
-33
-71.3027
-0
-3DFACE
-8
-m_rifle
-10
-6.41692e-006
-20
--7.04182
-30
-46.0875
-11
-2.38806
-21
--6.5821
-31
-46.0875
-12
-2.38807
-22
--6.58208
-32
-71.3027
-13
-2.38807
-23
--6.58208
-33
-71.3027
-0
-3DFACE
-8
-m_rifle
-10
-6.41692e-006
-20
--7.04182
-30
-46.0875
-11
-2.38807
-21
--6.58208
-31
-71.3027
-12
-1.35433e-005
-22
--7.0418
-32
-71.3026
-13
-1.35433e-005
-23
--7.0418
-33
-71.3026
-0
-3DFACE
-8
-m_rifle
-10
--2.38806
-20
--6.5821
-30
-46.0875
-11
-6.41692e-006
-21
--7.04182
-31
-46.0875
-12
-1.35433e-005
-22
--7.0418
-32
-71.3026
-13
-1.35433e-005
-23
--7.0418
-33
-71.3026
-0
-3DFACE
-8
-m_rifle
-10
--2.38806
-20
--6.5821
-30
-46.0875
-11
-1.35433e-005
-21
--7.0418
-31
-71.3026
-12
--2.38805
-22
--6.58208
-32
-71.3026
-13
--2.38805
-23
--6.58208
-33
-71.3026
-0
-3DFACE
-8
-m_rifle
-10
--2.47253
-20
--3.44559
-30
-46.0875
-11
--2.38806
-21
--6.5821
-31
-46.0875
-12
--2.38805
-22
--6.58208
-32
-71.3026
-13
--2.38805
-23
--6.58208
-33
-71.3026
-0
-3DFACE
-8
-m_rifle
-10
--2.47253
-20
--3.44559
-30
-46.0875
-11
--2.38805
-21
--6.58208
-31
-71.3026
-12
--2.47253
-22
--3.44557
-32
-71.3026
-13
--2.47253
-23
--3.44557
-33
-71.3026
-0
-3DFACE
-8
-m_rifle
-10
--2.8585
-20
--1.57443
-30
-46.0875
-11
--2.47253
-21
--3.44559
-31
-46.0875
-12
--2.47253
-22
--3.44557
-32
-71.3026
-13
--2.47253
-23
--3.44557
-33
-71.3026
-0
-3DFACE
-8
-m_rifle
-10
--2.8585
-20
--1.57443
-30
-46.0875
-11
--2.47253
-21
--3.44557
-31
-71.3026
-12
--2.8585
-22
--1.57441
-32
-71.3026
-13
--2.8585
-23
--1.57441
-33
-71.3026
-0
-3DFACE
-8
-m_rifle
-10
--3.41432
-20
-0.842753
-30
-46.0875
-11
--2.8585
-21
--1.57443
-31
-46.0875
-12
--2.8585
-22
--1.57441
-32
-71.3026
-13
--2.8585
-23
--1.57441
-33
-71.3026
-0
-3DFACE
-8
-m_rifle
-10
--3.41432
-20
-0.842753
-30
-46.0875
-11
--2.8585
-21
--1.57441
-31
-71.3026
-12
--3.41432
-22
-0.842771
-32
-71.3027
-13
--3.41432
-23
-0.842771
-33
-71.3027
-0
-3DFACE
-8
-m_rifle
-10
--2.64227
-20
-3.09977
-30
-46.0875
-11
--3.41432
-21
-0.842753
-31
-46.0875
-12
--3.41432
-22
-0.842771
-32
-71.3027
-13
--3.41432
-23
-0.842771
-33
-71.3027
-0
-3DFACE
-8
-m_rifle
-10
--2.64227
-20
-3.09977
-30
-46.0875
-11
--3.41432
-21
-0.842771
-31
-71.3027
-12
--2.64226
-22
-3.09979
-32
-71.3027
-13
--2.64226
-23
-3.09979
-33
-71.3027
-0
-3DFACE
-8
-m_rifle
-10
-5.49294e-006
-20
-4.0837
-30
-46.0875
-11
--2.64227
-21
-3.09977
-31
-46.0875
-12
--2.64226
-22
-3.09979
-32
-71.3027
-13
--2.64226
-23
-3.09979
-33
-71.3027
-0
-3DFACE
-8
-m_rifle
-10
-5.49294e-006
-20
-4.0837
-30
-46.0875
-11
--2.64226
-21
-3.09979
-31
-71.3027
-12
-1.26193e-005
-22
-4.08372
-32
-71.3027
-13
-1.26193e-005
-23
-4.08372
-33
-71.3027
-0
-3DFACE
-8
-m_rifle
-10
-2.64228
-20
-3.09977
-30
-46.0875
-11
-5.49294e-006
-21
-4.0837
-31
-46.0875
-12
-1.26193e-005
-22
-4.08372
-32
-71.3027
-13
-1.26193e-005
-23
-4.08372
-33
-71.3027
-0
-3DFACE
-8
-m_rifle
-10
-2.64228
-20
-3.09977
-30
-46.0875
-11
-1.26193e-005
-21
-4.08372
-31
-71.3027
-12
-2.64229
-22
-3.09979
-32
-71.3027
-13
-2.64229
-23
-3.09979
-33
-71.3027
-0
-3DFACE
-8
-m_rifle
-10
-3.41433
-20
-0.842753
-30
-46.0874
-11
-2.64228
-21
-3.09977
-31
-46.0875
-12
-2.64229
-22
-3.09979
-32
-71.3027
-13
-2.64229
-23
-3.09979
-33
-71.3027
-0
-3DFACE
-8
-m_rifle
-10
-3.41433
-20
-0.842753
-30
-46.0874
-11
-2.64229
-21
-3.09979
-31
-71.3027
-12
-3.41434
-22
-0.842771
-32
-71.3026
-13
-3.41434
-23
-0.842771
-33
-71.3026
-0
-3DFACE
-8
-m_rifle
-10
-2.85851
-20
--1.57443
-30
-46.0875
-11
-3.41433
-21
-0.842753
-31
-46.0874
-12
-3.41434
-22
-0.842771
-32
-71.3026
-13
-3.41434
-23
-0.842771
-33
-71.3026
-0
-3DFACE
-8
-m_rifle
-10
-2.85851
-20
--1.57443
-30
-46.0875
-11
-3.41434
-21
-0.842771
-31
-71.3026
-12
-2.85852
-22
--1.57441
-32
-71.3026
-13
-2.85852
-23
--1.57441
-33
-71.3026
-0
-ENDSEC
-0
-EOF
+0
+SECTION
+2
+ENTITIES
+0
+3DFACE
+8
+m_rifle
+10
+-0.597006
+20
+18.4212
+30
+-22.536
+11
+-0.597007
+21
+19.5279
+31
+-7.87195
+12
+-0.597007
+22
+18.4212
+32
+33.3743
+13
+-0.597007
+23
+18.4212
+33
+33.3743
+0
+3DFACE
+8
+m_rifle
+10
+-0.597007
+20
+19.5279
+30
+-7.87195
+11
+-0.597007
+21
+19.5279
+31
+32.4484
+12
+-0.597007
+22
+18.4212
+32
+33.3743
+13
+-0.597007
+23
+18.4212
+33
+33.3743
+0
+3DFACE
+8
+m_rifle
+10
+-0.597006
+20
+18.4212
+30
+-22.536
+11
+-0.597006
+21
+20.2329
+31
+-20.9831
+12
+-0.597007
+22
+19.5279
+32
+-7.87195
+13
+-0.597007
+23
+19.5279
+33
+-7.87195
+0
+3DFACE
+8
+m_rifle
+10
+-0.597006
+20
+20.2329
+30
+-20.9831
+11
+-0.597007
+21
+20.2329
+31
+-9.28176
+12
+-0.597007
+22
+19.5279
+32
+-7.87195
+13
+-0.597007
+23
+19.5279
+33
+-7.87195
+0
+3DFACE
+8
+m_rifle
+10
+-0.597006
+20
+18.4212
+30
+-22.536
+11
+-0.597007
+21
+18.4212
+31
+33.3743
+12
+0.597023
+22
+18.4212
+32
+33.3743
+13
+0.597023
+23
+18.4212
+33
+33.3743
+0
+3DFACE
+8
+m_rifle
+10
+0.597023
+20
+18.4212
+30
+33.3743
+11
+0.597023
+21
+18.4212
+31
+-22.536
+12
+-0.597006
+22
+18.4212
+32
+-22.536
+13
+-0.597006
+23
+18.4212
+33
+-22.536
+0
+3DFACE
+8
+m_rifle
+10
+0.597023
+20
+19.5279
+30
+32.4484
+11
+0.597023
+21
+19.5279
+31
+-7.87195
+12
+0.597023
+22
+18.4212
+32
+33.3743
+13
+0.597023
+23
+18.4212
+33
+33.3743
+0
+3DFACE
+8
+m_rifle
+10
+0.597023
+20
+19.5279
+30
+-7.87195
+11
+0.597023
+21
+18.4212
+31
+-22.536
+12
+0.597023
+22
+18.4212
+32
+33.3743
+13
+0.597023
+23
+18.4212
+33
+33.3743
+0
+3DFACE
+8
+m_rifle
+10
+0.597023
+20
+19.5279
+30
+-7.87195
+11
+0.597023
+21
+20.2329
+31
+-20.9831
+12
+0.597023
+22
+18.4212
+32
+-22.536
+13
+0.597023
+23
+18.4212
+33
+-22.536
+0
+3DFACE
+8
+m_rifle
+10
+0.597023
+20
+19.5279
+30
+-7.87195
+11
+0.597023
+21
+20.2329
+31
+-9.28176
+12
+0.597023
+22
+20.2329
+32
+-20.9831
+13
+0.597023
+23
+20.2329
+33
+-20.9831
+0
+3DFACE
+8
+m_rifle
+10
+-0.597007
+20
+20.2329
+30
+-9.28176
+11
+-0.597006
+21
+20.2329
+31
+-20.9831
+12
+-1.09701
+22
+20.2329
+32
+-20.9831
+13
+-1.09701
+23
+20.2329
+33
+-20.9831
+0
+3DFACE
+8
+m_rifle
+10
+-1.09701
+20
+20.2329
+30
+-20.9831
+11
+-1.09701
+21
+20.2329
+31
+-9.28176
+12
+-0.597007
+22
+20.2329
+32
+-9.28176
+13
+-0.597007
+23
+20.2329
+33
+-9.28176
+0
+3DFACE
+8
+m_rifle
+10
+-0.597007
+20
+19.5279
+30
+-7.87195
+11
+-0.597007
+21
+20.2329
+31
+-9.28176
+12
+-1.09701
+22
+20.2329
+32
+-9.28176
+13
+-1.09701
+23
+20.2329
+33
+-9.28176
+0
+3DFACE
+8
+m_rifle
+10
+-1.09701
+20
+20.2329
+30
+-9.28176
+11
+-1.12997
+21
+19.528
+31
+-7.87195
+12
+-0.597007
+22
+19.5279
+32
+-7.87195
+13
+-0.597007
+23
+19.5279
+33
+-7.87195
+0
+3DFACE
+8
+m_rifle
+10
+-0.597007
+20
+19.5279
+30
+32.4484
+11
+-0.597007
+21
+19.5279
+31
+-7.87195
+12
+-1.12997
+22
+19.528
+32
+-7.87195
+13
+-1.12997
+23
+19.528
+33
+-7.87195
+0
+3DFACE
+8
+m_rifle
+10
+-1.12997
+20
+19.528
+30
+-7.87195
+11
+-1.12997
+21
+19.528
+31
+32.4484
+12
+-0.597007
+22
+19.5279
+32
+32.4484
+13
+-0.597007
+23
+19.5279
+33
+32.4484
+0
+3DFACE
+8
+m_rifle
+10
+-0.597006
+20
+18.4212
+30
+-22.536
+11
+-1.09701
+21
+20.2329
+31
+-20.9831
+12
+-0.597006
+22
+20.2329
+32
+-20.9831
+13
+-0.597006
+23
+20.2329
+33
+-20.9831
+0
+3DFACE
+8
+m_rifle
+10
+-0.597006
+20
+18.4212
+30
+-22.536
+11
+-1.46616
+21
+12.338
+31
+-27.7502
+12
+-1.09701
+22
+20.2329
+32
+-20.9831
+13
+-1.09701
+23
+20.2329
+33
+-20.9831
+0
+3DFACE
+8
+m_rifle
+10
+-0.597006
+20
+18.4212
+30
+-22.536
+11
+1.4662
+21
+12.3379
+31
+-27.7502
+12
+-1.46616
+22
+12.338
+32
+-27.7502
+13
+-1.46616
+23
+12.338
+33
+-27.7502
+0
+3DFACE
+8
+m_rifle
+10
+-0.597006
+20
+18.4212
+30
+-22.536
+11
+0.597023
+21
+18.4212
+31
+-22.536
+12
+1.4662
+22
+12.3379
+32
+-27.7502
+13
+1.4662
+23
+12.3379
+33
+-27.7502
+0
+3DFACE
+8
+m_rifle
+10
+0.597023
+20
+18.4212
+30
+-22.536
+11
+1.09705
+21
+20.2329
+31
+-20.9831
+12
+1.4662
+22
+12.3379
+32
+-27.7502
+13
+1.4662
+23
+12.3379
+33
+-27.7502
+0
+3DFACE
+8
+m_rifle
+10
+0.597023
+20
+18.4212
+30
+-22.536
+11
+0.597023
+21
+20.2329
+31
+-20.9831
+12
+1.09705
+22
+20.2329
+32
+-20.9831
+13
+1.09705
+23
+20.2329
+33
+-20.9831
+0
+3DFACE
+8
+m_rifle
+10
+0.597023
+20
+18.4212
+30
+33.3743
+11
+1.13001
+21
+19.5279
+31
+32.4484
+12
+0.597023
+22
+19.5279
+32
+32.4484
+13
+0.597023
+23
+19.5279
+33
+32.4484
+0
+3DFACE
+8
+m_rifle
+10
+0.597023
+20
+18.4212
+30
+33.3743
+11
+3.47648
+21
+4.86599
+31
+44.7137
+12
+1.13001
+22
+19.5279
+32
+32.4484
+13
+1.13001
+23
+19.5279
+33
+32.4484
+0
+3DFACE
+8
+m_rifle
+10
+0.597023
+20
+18.4212
+30
+33.3743
+11
+-3.47644
+21
+4.86599
+31
+44.7137
+12
+3.47648
+22
+4.86599
+32
+44.7137
+13
+3.47648
+23
+4.86599
+33
+44.7137
+0
+3DFACE
+8
+m_rifle
+10
+0.597023
+20
+18.4212
+30
+33.3743
+11
+-0.597007
+21
+18.4212
+31
+33.3743
+12
+-3.47644
+22
+4.86599
+32
+44.7137
+13
+-3.47644
+23
+4.86599
+33
+44.7137
+0
+3DFACE
+8
+m_rifle
+10
+-0.597007
+20
+18.4212
+30
+33.3743
+11
+-1.12997
+21
+19.528
+31
+32.4484
+12
+-3.47644
+22
+4.86599
+32
+44.7137
+13
+-3.47644
+23
+4.86599
+33
+44.7137
+0
+3DFACE
+8
+m_rifle
+10
+-0.597007
+20
+18.4212
+30
+33.3743
+11
+-0.597007
+21
+19.5279
+31
+32.4484
+12
+-1.12997
+22
+19.528
+32
+32.4484
+13
+-1.12997
+23
+19.528
+33
+32.4484
+0
+3DFACE
+8
+m_rifle
+10
+1.40687
+20
+13.6068
+30
+20.888
+11
+-1.40683
+21
+13.6068
+31
+20.888
+12
+-1.40683
+22
+13.6068
+32
+29.3468
+13
+-1.40683
+23
+13.6068
+33
+29.3468
+0
+3DFACE
+8
+m_rifle
+10
+-1.40683
+20
+13.6068
+30
+29.3468
+11
+1.40687
+21
+13.6068
+31
+29.3468
+12
+1.40687
+22
+13.6068
+32
+20.888
+13
+1.40687
+23
+13.6068
+33
+20.888
+0
+3DFACE
+8
+m_rifle
+10
+1.40687
+20
+13.6068
+30
+29.3468
+11
+-1.40683
+21
+13.6068
+31
+29.3468
+12
+-1.32773
+22
+15.2985
+32
+29.3468
+13
+-1.32773
+23
+15.2985
+33
+29.3468
+0
+3DFACE
+8
+m_rifle
+10
+-1.32773
+20
+15.2985
+30
+29.3468
+11
+1.32777
+21
+15.2985
+31
+29.3468
+12
+1.40687
+22
+13.6068
+32
+29.3468
+13
+1.40687
+23
+13.6068
+33
+29.3468
+0
+3DFACE
+8
+m_rifle
+10
+-3.34593
+20
+7.65733
+30
+15.7551
+11
+3.40397
+21
+6.41678
+31
+14.6849
+12
+-3.40393
+22
+6.41678
+32
+14.6849
+13
+-3.40393
+23
+6.41678
+33
+14.6849
+0
+3DFACE
+8
+m_rifle
+10
+-3.34593
+20
+7.65733
+30
+15.7551
+11
+3.34596
+21
+7.65733
+31
+15.7551
+12
+3.40397
+22
+6.41678
+32
+14.6849
+13
+3.40397
+23
+6.41678
+33
+14.6849
+0
+3DFACE
+8
+m_rifle
+10
+-3.34593
+20
+7.65733
+30
+15.7551
+11
+1.40687
+21
+13.6068
+31
+20.888
+12
+3.34596
+22
+7.65733
+32
+15.7551
+13
+3.34596
+23
+7.65733
+33
+15.7551
+0
+3DFACE
+8
+m_rifle
+10
+-3.34593
+20
+7.65733
+30
+15.7551
+11
+-1.40683
+21
+13.6068
+31
+20.888
+12
+1.40687
+22
+13.6068
+32
+20.888
+13
+1.40687
+23
+13.6068
+33
+20.888
+0
+3DFACE
+8
+m_rifle
+10
+2.59019
+20
+6.9807
+30
+-15.4849
+11
+-2.59017
+21
+6.9807
+31
+-15.4849
+12
+-2.61654
+22
+6.41678
+32
+-12.9473
+13
+-2.61654
+23
+6.41678
+33
+-12.9473
+0
+3DFACE
+8
+m_rifle
+10
+-2.61654
+20
+6.41678
+30
+-12.9473
+11
+2.61651
+21
+6.41678
+31
+-12.9473
+12
+2.59019
+22
+6.9807
+32
+-15.4849
+13
+2.59019
+23
+6.9807
+33
+-15.4849
+0
+3DFACE
+8
+m_rifle
+10
+2.45176
+20
+9.94129
+30
+-16.4718
+11
+-2.45174
+21
+9.94129
+31
+-16.4718
+12
+-2.51107
+22
+8.67246
+32
+-16.4718
+13
+-2.51107
+23
+8.67246
+33
+-16.4718
+0
+3DFACE
+8
+m_rifle
+10
+-2.51107
+20
+8.67246
+30
+-16.4718
+11
+2.51109
+21
+8.67246
+31
+-16.4718
+12
+2.45176
+22
+9.94129
+32
+-16.4718
+13
+2.45176
+23
+9.94129
+33
+-16.4718
+0
+3DFACE
+8
+m_rifle
+10
+2.51109
+20
+8.67246
+30
+-16.4718
+11
+-2.51107
+21
+8.67246
+31
+-16.4718
+12
+-2.59017
+22
+6.9807
+32
+-15.4849
+13
+-2.59017
+23
+6.9807
+33
+-15.4849
+0
+3DFACE
+8
+m_rifle
+10
+-2.59017
+20
+6.9807
+30
+-15.4849
+11
+2.59019
+21
+6.9807
+31
+-15.4849
+12
+2.51109
+22
+8.67246
+32
+-16.4718
+13
+2.51109
+23
+8.67246
+33
+-16.4718
+0
+3DFACE
+8
+m_rifle
+10
+1.32777
+20
+15.2985
+30
+29.3468
+11
+-1.32773
+21
+15.2985
+31
+-12.2424
+12
+1.32777
+22
+15.2985
+32
+0.546196
+13
+1.32777
+23
+15.2985
+33
+0.546196
+0
+3DFACE
+8
+m_rifle
+10
+-1.32773
+20
+15.2985
+30
+-12.2424
+11
+1.32777
+21
+15.2985
+31
+-12.2424
+12
+1.32777
+22
+15.2985
+32
+0.546196
+13
+1.32777
+23
+15.2985
+33
+0.546196
+0
+3DFACE
+8
+m_rifle
+10
+1.32777
+20
+15.2985
+30
+29.3468
+11
+-1.32773
+21
+15.2985
+31
+0.546196
+12
+-1.32773
+22
+15.2985
+32
+-12.2424
+13
+-1.32773
+23
+15.2985
+33
+-12.2424
+0
+3DFACE
+8
+m_rifle
+10
+1.32777
+20
+15.2985
+30
+29.3468
+11
+-1.32773
+21
+15.2985
+31
+29.3468
+12
+-1.32773
+22
+15.2985
+32
+0.546196
+13
+-1.32773
+23
+15.2985
+33
+0.546196
+0
+3DFACE
+8
+m_rifle
+10
+1.32777
+20
+15.2985
+30
+-12.2424
+11
+-1.32773
+21
+15.2985
+31
+-12.2424
+12
+-2.45174
+22
+9.94129
+32
+-16.4718
+13
+-2.45174
+23
+9.94129
+33
+-16.4718
+0
+3DFACE
+8
+m_rifle
+10
+-2.45174
+20
+9.94129
+30
+-16.4718
+11
+2.45176
+21
+9.94129
+31
+-16.4718
+12
+1.32777
+22
+15.2985
+32
+-12.2424
+13
+1.32777
+23
+15.2985
+33
+-12.2424
+0
+3DFACE
+8
+m_rifle
+10
+2.61651
+20
+6.41678
+30
+-12.9473
+11
+-2.61654
+21
+6.41678
+31
+-12.9473
+12
+-3.40393
+22
+6.41678
+32
+14.6849
+13
+-3.40393
+23
+6.41678
+33
+14.6849
+0
+3DFACE
+8
+m_rifle
+10
+-3.40393
+20
+6.41678
+30
+14.6849
+11
+3.40397
+21
+6.41678
+31
+14.6849
+12
+2.61651
+22
+6.41678
+32
+-12.9473
+13
+2.61651
+23
+6.41678
+33
+-12.9473
+0
+3DFACE
+8
+m_rifle
+10
+-1.45298
+20
+12.6199
+30
+-34.3763
+11
+-1.47934
+21
+12.056
+31
+-29.7239
+12
+-1.42661
+22
+13.1838
+32
+-29.8649
+13
+-1.42661
+23
+13.1838
+33
+-29.8649
+0
+3DFACE
+8
+m_rifle
+10
+-1.45298
+20
+12.6199
+30
+-34.3763
+11
+-1.86168
+21
+3.87913
+31
+-30.7108
+12
+-1.47934
+22
+12.056
+32
+-29.7239
+13
+-1.47934
+23
+12.056
+33
+-29.7239
+0
+3DFACE
+8
+m_rifle
+10
+-1.45298
+20
+12.6199
+30
+-34.3763
+11
+-1.88805
+21
+3.31521
+31
+-35.927
+12
+-1.86168
+22
+3.87913
+32
+-30.7108
+13
+-1.86168
+23
+3.87913
+33
+-30.7108
+0
+3DFACE
+8
+m_rifle
+10
+1.45299
+20
+12.6199
+30
+-34.3763
+11
+1.86172
+21
+3.87913
+31
+-30.7108
+12
+1.88807
+22
+3.31521
+32
+-35.927
+13
+1.88807
+23
+3.31521
+33
+-35.927
+0
+3DFACE
+8
+m_rifle
+10
+1.45299
+20
+12.6199
+30
+-34.3763
+11
+1.47938
+21
+12.056
+31
+-29.7239
+12
+1.86172
+22
+3.87913
+32
+-30.7108
+13
+1.86172
+23
+3.87913
+33
+-30.7108
+0
+3DFACE
+8
+m_rifle
+10
+1.45299
+20
+12.6199
+30
+-34.3763
+11
+1.42663
+21
+13.1838
+31
+-29.8649
+12
+1.47938
+22
+12.056
+32
+-29.7239
+13
+1.47938
+23
+12.056
+33
+-29.7239
+0
+3DFACE
+8
+m_rifle
+10
+-1.86168
+20
+3.87913
+30
+-30.7108
+11
+-1.88805
+21
+3.31521
+31
+-35.927
+12
+1.88807
+22
+3.31521
+32
+-35.927
+13
+1.88807
+23
+3.31521
+33
+-35.927
+0
+3DFACE
+8
+m_rifle
+10
+1.88807
+20
+3.31521
+30
+-35.927
+11
+1.86172
+21
+3.87913
+31
+-30.7108
+12
+-1.86168
+22
+3.87913
+32
+-30.7108
+13
+-1.86168
+23
+3.87913
+33
+-30.7108
+0
+3DFACE
+8
+m_rifle
+10
+-1.88805
+20
+3.31521
+30
+-35.927
+11
+-1.45298
+21
+12.6199
+31
+-34.3763
+12
+1.45299
+22
+12.6199
+32
+-34.3763
+13
+1.45299
+23
+12.6199
+33
+-34.3763
+0
+3DFACE
+8
+m_rifle
+10
+1.45299
+20
+12.6199
+30
+-34.3763
+11
+1.88807
+21
+3.31521
+31
+-35.927
+12
+-1.88805
+22
+3.31521
+32
+-35.927
+13
+-1.88805
+23
+3.31521
+33
+-35.927
+0
+3DFACE
+8
+m_rifle
+10
+-1.45298
+20
+12.6199
+30
+-34.3763
+11
+-1.42661
+21
+13.1838
+31
+-29.8649
+12
+1.42663
+22
+13.1838
+32
+-29.8649
+13
+1.42663
+23
+13.1838
+33
+-29.8649
+0
+3DFACE
+8
+m_rifle
+10
+1.42663
+20
+13.1838
+30
+-29.8649
+11
+1.45299
+21
+12.6199
+31
+-34.3763
+12
+-1.45298
+22
+12.6199
+32
+-34.3763
+13
+-1.45298
+23
+12.6199
+33
+-34.3763
+0
+3DFACE
+8
+m_rifle
+10
+-1.42661
+20
+13.1838
+30
+-29.8649
+11
+-1.47934
+21
+12.056
+31
+-29.7239
+12
+1.47938
+22
+12.056
+32
+-29.7239
+13
+1.47938
+23
+12.056
+33
+-29.7239
+0
+3DFACE
+8
+m_rifle
+10
+1.47938
+20
+12.056
+30
+-29.7239
+11
+1.42663
+21
+13.1838
+31
+-29.8649
+12
+-1.42661
+22
+13.1838
+32
+-29.8649
+13
+-1.42661
+23
+13.1838
+33
+-29.8649
+0
+3DFACE
+8
+m_rifle
+10
+-1.47934
+20
+12.056
+30
+-29.7239
+11
+-1.46616
+21
+12.338
+31
+-27.7502
+12
+1.4662
+22
+12.3379
+32
+-27.7502
+13
+1.4662
+23
+12.3379
+33
+-27.7502
+0
+3DFACE
+8
+m_rifle
+10
+1.4662
+20
+12.3379
+30
+-27.7502
+11
+1.47938
+21
+12.056
+31
+-29.7239
+12
+-1.47934
+22
+12.056
+32
+-29.7239
+13
+-1.47934
+23
+12.056
+33
+-29.7239
+0
+3DFACE
+8
+m_rifle
+10
+1.09705
+20
+20.2329
+30
+-20.9831
+11
+0.597023
+21
+20.2329
+31
+-20.9831
+12
+0.597023
+22
+20.2329
+32
+-9.28176
+13
+0.597023
+23
+20.2329
+33
+-9.28176
+0
+3DFACE
+8
+m_rifle
+10
+0.597023
+20
+20.2329
+30
+-9.28176
+11
+1.09705
+21
+20.2329
+31
+-9.28176
+12
+1.09705
+22
+20.2329
+32
+-20.9831
+13
+1.09705
+23
+20.2329
+33
+-20.9831
+0
+3DFACE
+8
+m_rifle
+10
+1.09705
+20
+20.2329
+30
+-9.28176
+11
+0.597023
+21
+20.2329
+31
+-9.28176
+12
+0.597023
+22
+19.5279
+32
+-7.87195
+13
+0.597023
+23
+19.5279
+33
+-7.87195
+0
+3DFACE
+8
+m_rifle
+10
+0.597023
+20
+19.5279
+30
+-7.87195
+11
+1.13001
+21
+19.528
+31
+-7.87195
+12
+1.09705
+22
+20.2329
+32
+-9.28176
+13
+1.09705
+23
+20.2329
+33
+-9.28176
+0
+3DFACE
+8
+m_rifle
+10
+0.597023
+20
+19.5279
+30
+-7.87195
+11
+0.597023
+21
+19.5279
+31
+32.4484
+12
+1.13001
+22
+19.5279
+32
+32.4484
+13
+1.13001
+23
+19.5279
+33
+32.4484
+0
+3DFACE
+8
+m_rifle
+10
+1.13001
+20
+19.5279
+30
+32.4484
+11
+1.13001
+21
+19.528
+31
+-7.87195
+12
+0.597023
+22
+19.5279
+32
+-7.87195
+13
+0.597023
+23
+19.5279
+33
+-7.87195
+0
+3DFACE
+8
+m_rifle
+10
+-3.47644
+20
+4.86599
+30
+44.7137
+11
+-3.47644
+21
+4.86599
+31
+21.311
+12
+3.47648
+22
+4.86599
+32
+21.311
+13
+3.47648
+23
+4.86599
+33
+21.311
+0
+3DFACE
+8
+m_rifle
+10
+3.47648
+20
+4.86599
+30
+21.311
+11
+3.47648
+21
+4.86599
+31
+44.7137
+12
+-3.47644
+22
+4.86599
+32
+44.7137
+13
+-3.47644
+23
+4.86599
+33
+44.7137
+0
+3DFACE
+8
+m_rifle
+10
+-3.47644
+20
+4.86599
+30
+21.311
+11
+-3.52259
+21
+3.87913
+31
+19.9012
+12
+3.52262
+22
+3.87913
+32
+19.9012
+13
+3.52262
+23
+3.87913
+33
+19.9012
+0
+3DFACE
+8
+m_rifle
+10
+3.52262
+20
+3.87913
+30
+19.9012
+11
+3.47648
+21
+4.86599
+31
+21.311
+12
+-3.47644
+22
+4.86599
+32
+21.311
+13
+-3.47644
+23
+4.86599
+33
+21.311
+0
+3DFACE
+8
+m_rifle
+10
+-3.52259
+20
+3.87913
+30
+19.9012
+11
+-1.86168
+21
+3.87913
+31
+-30.7108
+12
+1.86172
+22
+3.87913
+32
+-30.7108
+13
+1.86172
+23
+3.87913
+33
+-30.7108
+0
+3DFACE
+8
+m_rifle
+10
+1.86172
+20
+3.87913
+30
+-30.7108
+11
+3.52262
+21
+3.87913
+31
+19.9012
+12
+-3.52259
+22
+3.87913
+32
+19.9012
+13
+-3.52259
+23
+3.87913
+33
+19.9012
+0
+3DFACE
+8
+m_rifle
+10
+1.09705
+20
+20.2329
+30
+-9.28176
+11
+1.32777
+21
+15.2985
+31
+-12.2424
+12
+1.09705
+22
+20.2329
+32
+-20.9831
+13
+1.09705
+23
+20.2329
+33
+-20.9831
+0
+3DFACE
+8
+m_rifle
+10
+1.13001
+20
+19.528
+30
+-7.87195
+11
+1.32777
+21
+15.2985
+31
+-12.2424
+12
+1.09705
+22
+20.2329
+32
+-9.28176
+13
+1.09705
+23
+20.2329
+33
+-9.28176
+0
+3DFACE
+8
+m_rifle
+10
+1.32777
+20
+15.2985
+30
+0.546196
+11
+1.32777
+21
+15.2985
+31
+-12.2424
+12
+1.13001
+22
+19.528
+32
+-7.87195
+13
+1.13001
+23
+19.528
+33
+-7.87195
+0
+3DFACE
+8
+m_rifle
+10
+1.09705
+20
+20.2329
+30
+-20.9831
+11
+1.32777
+21
+15.2985
+31
+-12.2424
+12
+1.4662
+22
+12.3379
+32
+-27.7502
+13
+1.4662
+23
+12.3379
+33
+-27.7502
+0
+3DFACE
+8
+m_rifle
+10
+2.45176
+20
+9.94129
+30
+-16.4718
+11
+1.4662
+21
+12.3379
+31
+-27.7502
+12
+1.32777
+22
+15.2985
+32
+-12.2424
+13
+1.32777
+23
+15.2985
+33
+-12.2424
+0
+3DFACE
+8
+m_rifle
+10
+1.4662
+20
+12.3379
+30
+-27.7502
+11
+2.45176
+21
+9.94129
+31
+-16.4718
+12
+1.86172
+22
+3.87913
+32
+-30.7108
+13
+1.86172
+23
+3.87913
+33
+-30.7108
+0
+3DFACE
+8
+m_rifle
+10
+2.51109
+20
+8.67246
+30
+-16.4718
+11
+1.86172
+21
+3.87913
+31
+-30.7108
+12
+2.45176
+22
+9.94129
+32
+-16.4718
+13
+2.45176
+23
+9.94129
+33
+-16.4718
+0
+3DFACE
+8
+m_rifle
+10
+2.51109
+20
+8.67246
+30
+-16.4718
+11
+2.59019
+21
+6.9807
+31
+-15.4849
+12
+1.86172
+22
+3.87913
+32
+-30.7108
+13
+1.86172
+23
+3.87913
+33
+-30.7108
+0
+3DFACE
+8
+m_rifle
+10
+2.59019
+20
+6.9807
+30
+-15.4849
+11
+2.61651
+21
+6.41678
+31
+-12.9473
+12
+1.86172
+22
+3.87913
+32
+-30.7108
+13
+1.86172
+23
+3.87913
+33
+-30.7108
+0
+3DFACE
+8
+m_rifle
+10
+1.86172
+20
+3.87913
+30
+-30.7108
+11
+2.61651
+21
+6.41678
+31
+-12.9473
+12
+3.52262
+22
+3.87913
+32
+19.9012
+13
+3.52262
+23
+3.87913
+33
+19.9012
+0
+3DFACE
+8
+m_rifle
+10
+3.40397
+20
+6.41678
+30
+14.6849
+11
+3.52262
+21
+3.87913
+31
+19.9012
+12
+2.61651
+22
+6.41678
+32
+-12.9473
+13
+2.61651
+23
+6.41678
+33
+-12.9473
+0
+3DFACE
+8
+m_rifle
+10
+3.47648
+20
+4.86599
+30
+21.311
+11
+1.40687
+21
+13.6068
+31
+29.3468
+12
+3.47648
+22
+4.86599
+32
+44.7137
+13
+3.47648
+23
+4.86599
+33
+44.7137
+0
+3DFACE
+8
+m_rifle
+10
+1.40687
+20
+13.6068
+30
+20.888
+11
+1.40687
+21
+13.6068
+31
+29.3468
+12
+3.47648
+22
+4.86599
+32
+21.311
+13
+3.47648
+23
+4.86599
+33
+21.311
+0
+3DFACE
+8
+m_rifle
+10
+3.34596
+20
+7.65733
+30
+15.7551
+11
+1.40687
+21
+13.6068
+31
+20.888
+12
+3.47648
+22
+4.86599
+32
+21.311
+13
+3.47648
+23
+4.86599
+33
+21.311
+0
+3DFACE
+8
+m_rifle
+10
+3.47648
+20
+4.86599
+30
+44.7137
+11
+1.40687
+21
+13.6068
+31
+29.3468
+12
+1.13001
+22
+19.5279
+32
+32.4484
+13
+1.13001
+23
+19.5279
+33
+32.4484
+0
+3DFACE
+8
+m_rifle
+10
+1.32777
+20
+15.2985
+30
+29.3468
+11
+1.13001
+21
+19.5279
+31
+32.4484
+12
+1.40687
+22
+13.6068
+32
+29.3468
+13
+1.40687
+23
+13.6068
+33
+29.3468
+0
+3DFACE
+8
+m_rifle
+10
+3.34596
+20
+7.65733
+30
+15.7551
+11
+3.47648
+21
+4.86599
+31
+21.311
+12
+3.40397
+22
+6.41678
+32
+14.6849
+13
+3.40397
+23
+6.41678
+33
+14.6849
+0
+3DFACE
+8
+m_rifle
+10
+3.52262
+20
+3.87913
+30
+19.9012
+11
+3.40397
+21
+6.41678
+31
+14.6849
+12
+3.47648
+22
+4.86599
+32
+21.311
+13
+3.47648
+23
+4.86599
+33
+21.311
+0
+3DFACE
+8
+m_rifle
+10
+1.13001
+20
+19.5279
+30
+32.4484
+11
+1.32777
+21
+15.2985
+31
+29.3468
+12
+1.13001
+22
+19.528
+32
+-7.87195
+13
+1.13001
+23
+19.528
+33
+-7.87195
+0
+3DFACE
+8
+m_rifle
+10
+1.32777
+20
+15.2985
+30
+0.546196
+11
+1.13001
+21
+19.528
+31
+-7.87195
+12
+1.32777
+22
+15.2985
+32
+29.3468
+13
+1.32777
+23
+15.2985
+33
+29.3468
+0
+3DFACE
+8
+m_rifle
+10
+1.47938
+20
+12.056
+30
+-29.7239
+11
+1.4662
+21
+12.3379
+31
+-27.7502
+12
+1.86172
+22
+3.87913
+32
+-30.7108
+13
+1.86172
+23
+3.87913
+33
+-30.7108
+0
+3DFACE
+8
+m_rifle
+10
+-1.32773
+20
+15.2985
+30
+-12.2424
+11
+-1.09701
+21
+20.2329
+31
+-9.28176
+12
+-1.09701
+22
+20.2329
+32
+-20.9831
+13
+-1.09701
+23
+20.2329
+33
+-20.9831
+0
+3DFACE
+8
+m_rifle
+10
+-1.32773
+20
+15.2985
+30
+-12.2424
+11
+-1.12997
+21
+19.528
+31
+-7.87195
+12
+-1.09701
+22
+20.2329
+32
+-9.28176
+13
+-1.09701
+23
+20.2329
+33
+-9.28176
+0
+3DFACE
+8
+m_rifle
+10
+-1.32773
+20
+15.2985
+30
+-12.2424
+11
+-1.32773
+21
+15.2985
+31
+0.546196
+12
+-1.12997
+22
+19.528
+32
+-7.87195
+13
+-1.12997
+23
+19.528
+33
+-7.87195
+0
+3DFACE
+8
+m_rifle
+10
+-1.32773
+20
+15.2985
+30
+-12.2424
+11
+-1.09701
+21
+20.2329
+31
+-20.9831
+12
+-1.46616
+22
+12.338
+32
+-27.7502
+13
+-1.46616
+23
+12.338
+33
+-27.7502
+0
+3DFACE
+8
+m_rifle
+10
+-1.46616
+20
+12.338
+30
+-27.7502
+11
+-2.45174
+21
+9.94129
+31
+-16.4718
+12
+-1.32773
+22
+15.2985
+32
+-12.2424
+13
+-1.32773
+23
+15.2985
+33
+-12.2424
+0
+3DFACE
+8
+m_rifle
+10
+-2.45174
+20
+9.94129
+30
+-16.4718
+11
+-1.46616
+21
+12.338
+31
+-27.7502
+12
+-1.86168
+22
+3.87913
+32
+-30.7108
+13
+-1.86168
+23
+3.87913
+33
+-30.7108
+0
+3DFACE
+8
+m_rifle
+10
+-1.86168
+20
+3.87913
+30
+-30.7108
+11
+-2.51107
+21
+8.67246
+31
+-16.4718
+12
+-2.45174
+22
+9.94129
+32
+-16.4718
+13
+-2.45174
+23
+9.94129
+33
+-16.4718
+0
+3DFACE
+8
+m_rifle
+10
+-2.59017
+20
+6.9807
+30
+-15.4849
+11
+-2.51107
+21
+8.67246
+31
+-16.4718
+12
+-1.86168
+22
+3.87913
+32
+-30.7108
+13
+-1.86168
+23
+3.87913
+33
+-30.7108
+0
+3DFACE
+8
+m_rifle
+10
+-2.61654
+20
+6.41678
+30
+-12.9473
+11
+-2.59017
+21
+6.9807
+31
+-15.4849
+12
+-1.86168
+22
+3.87913
+32
+-30.7108
+13
+-1.86168
+23
+3.87913
+33
+-30.7108
+0
+3DFACE
+8
+m_rifle
+10
+-2.61654
+20
+6.41678
+30
+-12.9473
+11
+-1.86168
+21
+3.87913
+31
+-30.7108
+12
+-3.52259
+22
+3.87913
+32
+19.9012
+13
+-3.52259
+23
+3.87913
+33
+19.9012
+0
+3DFACE
+8
+m_rifle
+10
+-3.52259
+20
+3.87913
+30
+19.9012
+11
+-3.40393
+21
+6.41678
+31
+14.6849
+12
+-2.61654
+22
+6.41678
+32
+-12.9473
+13
+-2.61654
+23
+6.41678
+33
+-12.9473
+0
+3DFACE
+8
+m_rifle
+10
+-1.40683
+20
+13.6068
+30
+29.3468
+11
+-3.47644
+21
+4.86599
+31
+21.311
+12
+-3.47644
+22
+4.86599
+32
+44.7137
+13
+-3.47644
+23
+4.86599
+33
+44.7137
+0
+3DFACE
+8
+m_rifle
+10
+-1.40683
+20
+13.6068
+30
+29.3468
+11
+-1.40683
+21
+13.6068
+31
+20.888
+12
+-3.47644
+22
+4.86599
+32
+21.311
+13
+-3.47644
+23
+4.86599
+33
+21.311
+0
+3DFACE
+8
+m_rifle
+10
+-1.40683
+20
+13.6068
+30
+20.888
+11
+-3.34593
+21
+7.65733
+31
+15.7551
+12
+-3.47644
+22
+4.86599
+32
+21.311
+13
+-3.47644
+23
+4.86599
+33
+21.311
+0
+3DFACE
+8
+m_rifle
+10
+-1.40683
+20
+13.6068
+30
+29.3468
+11
+-3.47644
+21
+4.86599
+31
+44.7137
+12
+-1.12997
+22
+19.528
+32
+32.4484
+13
+-1.12997
+23
+19.528
+33
+32.4484
+0
+3DFACE
+8
+m_rifle
+10
+-1.12997
+20
+19.528
+30
+32.4484
+11
+-1.32773
+21
+15.2985
+31
+29.3468
+12
+-1.40683
+22
+13.6068
+32
+29.3468
+13
+-1.40683
+23
+13.6068
+33
+29.3468
+0
+3DFACE
+8
+m_rifle
+10
+-3.47644
+20
+4.86599
+30
+21.311
+11
+-3.34593
+21
+7.65733
+31
+15.7551
+12
+-3.40393
+22
+6.41678
+32
+14.6849
+13
+-3.40393
+23
+6.41678
+33
+14.6849
+0
+3DFACE
+8
+m_rifle
+10
+-3.40393
+20
+6.41678
+30
+14.6849
+11
+-3.52259
+21
+3.87913
+31
+19.9012
+12
+-3.47644
+22
+4.86599
+32
+21.311
+13
+-3.47644
+23
+4.86599
+33
+21.311
+0
+3DFACE
+8
+m_rifle
+10
+-1.32773
+20
+15.2985
+30
+29.3468
+11
+-1.12997
+21
+19.528
+31
+32.4484
+12
+-1.12997
+22
+19.528
+32
+-7.87195
+13
+-1.12997
+23
+19.528
+33
+-7.87195
+0
+3DFACE
+8
+m_rifle
+10
+-1.12997
+20
+19.528
+30
+-7.87195
+11
+-1.32773
+21
+15.2985
+31
+0.546196
+12
+-1.32773
+22
+15.2985
+32
+29.3468
+13
+-1.32773
+23
+15.2985
+33
+29.3468
+0
+3DFACE
+8
+m_rifle
+10
+-1.46616
+20
+12.338
+30
+-27.7502
+11
+-1.47934
+21
+12.056
+31
+-29.7239
+12
+-1.86168
+22
+3.87913
+32
+-30.7108
+13
+-1.86168
+23
+3.87913
+33
+-30.7108
+0
+3DFACE
+8
+m_rifle
+10
+-1.26863
+20
+1.33528
+30
+-13.692
+11
+-1.26863
+21
+2.39568
+31
+-3.95619
+12
+-1.26863
+22
+1.51932
+32
+-31.7281
+13
+-1.26863
+23
+1.51932
+33
+-31.7281
+0
+3DFACE
+8
+m_rifle
+10
+-1.26863
+20
+-4.37883
+30
+-3.95615
+11
+-1.26863
+21
+1.33528
+31
+-13.692
+12
+-1.26863
+22
+-0.50513
+32
+-10.9314
+13
+-1.26863
+23
+-0.50513
+33
+-10.9314
+0
+3DFACE
+8
+m_rifle
+10
+-1.26863
+20
+2.39568
+30
+-3.95619
+11
+-1.26863
+21
+1.33528
+31
+-13.692
+12
+-1.26863
+22
+-4.37883
+32
+-3.95615
+13
+-1.26863
+23
+-4.37883
+33
+-3.95615
+0
+3DFACE
+8
+m_rifle
+10
+-1.26863
+20
+2.99165
+30
+22.012
+11
+-1.26861
+21
+-2.35447
+31
+6.33694
+12
+-1.79104
+22
+-0.432972
+32
+22.012
+13
+-1.79104
+23
+-0.432972
+33
+22.012
+0
+3DFACE
+8
+m_rifle
+10
+-1.26863
+20
+5.20015
+30
+21.0918
+11
+-1.26861
+21
+-2.35447
+31
+6.33694
+12
+-1.26863
+22
+2.99165
+32
+22.012
+13
+-1.26863
+23
+2.99165
+33
+22.012
+0
+3DFACE
+8
+m_rifle
+10
+-1.26863
+20
+2.39566
+30
+6.33693
+11
+-1.26861
+21
+-2.35447
+31
+6.33694
+12
+-1.26863
+22
+5.20015
+32
+21.0918
+13
+-1.26863
+23
+5.20015
+33
+21.0918
+0
+3DFACE
+8
+m_rifle
+10
+-1.26863
+20
+-6.76253
+30
+17.779
+11
+-1.26863
+21
+-6.76253
+31
+23.6733
+12
+-1.79104
+22
+-0.432972
+32
+22.012
+13
+-1.79104
+23
+-0.432972
+33
+22.012
+0
+3DFACE
+8
+m_rifle
+10
+-1.79104
+20
+-6.05518
+30
+23.6733
+11
+-1.79104
+21
+-0.432972
+31
+22.012
+12
+-1.26863
+22
+-6.76253
+32
+23.6733
+13
+-1.26863
+23
+-6.76253
+33
+23.6733
+0
+3DFACE
+8
+m_rifle
+10
+-1.79104
+20
+-0.432972
+30
+22.012
+11
+-1.79104
+21
+-6.05518
+31
+23.6733
+12
+-2.27162
+22
+-0.432971
+32
+46.6735
+13
+-2.27162
+23
+-0.432971
+33
+46.6735
+0
+3DFACE
+8
+m_rifle
+10
+-1.79104
+20
+-6.05517
+30
+46.6735
+11
+-2.27162
+21
+-0.432971
+31
+46.6735
+12
+-1.79104
+22
+-6.05518
+32
+23.6733
+13
+-1.79104
+23
+-6.05518
+33
+23.6733
+0
+3DFACE
+8
+m_rifle
+10
+-0.866355
+20
+-2.4213
+30
+4.93099
+11
+-0.866355
+21
+-3.84984
+31
+3.16548
+12
+-0.866355
+22
+-4.73806
+32
+6.33693
+13
+-0.866355
+23
+-4.73806
+33
+6.33693
+0
+3DFACE
+8
+m_rifle
+10
+-0.866355
+20
+-3.94847
+30
+-0.586525
+11
+-0.866355
+21
+-3.01246
+31
+-2.40928
+12
+-0.866355
+22
+-4.37915
+32
+-3.947
+13
+-0.866355
+23
+-4.37915
+33
+-3.947
+0
+3DFACE
+8
+m_rifle
+10
+-0.866355
+20
+-3.01246
+30
+-2.40928
+11
+-0.866355
+21
+-1.63308
+31
+-3.1975
+12
+-0.866355
+22
+-4.37915
+32
+-3.947
+13
+-0.866355
+23
+-4.37915
+33
+-3.947
+0
+3DFACE
+8
+m_rifle
+10
+-0.866355
+20
+-0.155174
+30
+-3.0497
+11
+-0.866355
+21
+-4.37915
+31
+-3.947
+12
+-0.866355
+22
+-1.63308
+32
+-3.1975
+13
+-0.866355
+23
+-1.63308
+33
+-3.1975
+0
+3DFACE
+8
+m_rifle
+10
+-0.866355
+20
+2.39564
+30
+-3.95615
+11
+-0.866355
+21
+-4.37915
+31
+-3.947
+12
+-0.866355
+22
+-0.155174
+32
+-3.0497
+13
+-0.866355
+23
+-0.155174
+33
+-3.0497
+0
+3DFACE
+8
+m_rifle
+10
+-0.866355
+20
+-0.155174
+30
+-3.0497
+11
+-0.866355
+21
+0.58378
+31
+-2.06443
+12
+-0.866355
+22
+2.39564
+32
+-3.95615
+13
+-0.866355
+23
+2.39564
+33
+-3.95615
+0
+3DFACE
+8
+m_rifle
+10
+-0.866355
+20
+2.39564
+30
+-3.95615
+11
+-0.866355
+21
+0.58378
+31
+-2.06443
+12
+-0.866355
+22
+2.39564
+32
+6.33695
+13
+-0.866355
+23
+2.39564
+33
+6.33695
+0
+3DFACE
+8
+m_rifle
+10
+-0.866355
+20
+0.633044
+30
+5.66995
+11
+-0.866355
+21
+2.39564
+31
+6.33695
+12
+-0.866355
+22
+0.58378
+32
+-2.06443
+13
+-0.866355
+23
+0.58378
+33
+-2.06443
+0
+3DFACE
+8
+m_rifle
+10
+-0.866355
+20
+-3.94847
+30
+-0.586525
+11
+-0.866355
+21
+-4.37915
+31
+-3.947
+12
+-0.866355
+22
+-3.84984
+32
+3.16548
+13
+-0.866355
+23
+-3.84984
+33
+3.16548
+0
+3DFACE
+8
+m_rifle
+10
+-0.866355
+20
+-4.73806
+30
+6.33693
+11
+-0.866355
+21
+-3.84984
+31
+3.16548
+12
+-0.866355
+22
+-4.37915
+32
+-3.947
+13
+-0.866355
+23
+-4.37915
+33
+-3.947
+0
+3DFACE
+8
+m_rifle
+10
+-0.866355
+20
+-0.992653
+30
+5.66995
+11
+-0.866355
+21
+-2.4213
+31
+4.93099
+12
+-0.866355
+22
+-4.73806
+32
+6.33693
+13
+-0.866355
+23
+-4.73806
+33
+6.33693
+0
+3DFACE
+8
+m_rifle
+10
+-0.866355
+20
+0.633044
+30
+5.66995
+11
+-0.866355
+21
+-0.992653
+31
+5.66995
+12
+-0.866355
+22
+2.39564
+32
+6.33695
+13
+-0.866355
+23
+2.39564
+33
+6.33695
+0
+3DFACE
+8
+m_rifle
+10
+-0.866355
+20
+-4.73806
+30
+6.33693
+11
+-0.866355
+21
+2.39564
+31
+6.33695
+12
+-0.866355
+22
+-0.992653
+32
+5.66995
+13
+-0.866355
+23
+-0.992653
+33
+5.66995
+0
+3DFACE
+8
+m_rifle
+10
+-1.79104
+20
+-0.432972
+30
+22.012
+11
+-1.26861
+21
+-2.35447
+31
+6.33694
+12
+-1.26863
+22
+-4.73808
+32
+13.178
+13
+-1.26863
+23
+-4.73808
+33
+13.178
+0
+3DFACE
+8
+m_rifle
+10
+-1.26863
+20
+-4.73808
+30
+6.33695
+11
+-1.26863
+21
+-4.73808
+31
+13.178
+12
+-1.26861
+22
+-2.35447
+32
+6.33694
+13
+-1.26861
+23
+-2.35447
+33
+6.33694
+0
+3DFACE
+8
+m_rifle
+10
+-1.26863
+20
+4.0959
+30
+-33.9366
+11
+-1.26863
+21
+1.51932
+31
+-31.7281
+12
+-1.26863
+22
+5.20015
+32
+21.0918
+13
+-1.26863
+23
+5.20015
+33
+21.0918
+0
+3DFACE
+8
+m_rifle
+10
+-1.26863
+20
+2.39568
+30
+-3.95619
+11
+-1.26863
+21
+5.20015
+31
+21.0918
+12
+-1.26863
+22
+1.51932
+32
+-31.7281
+13
+-1.26863
+23
+1.51932
+33
+-31.7281
+0
+3DFACE
+8
+m_rifle
+10
+-1.26863
+20
+-4.37
+30
+-12.7718
+11
+-1.26863
+21
+-4.37883
+31
+-3.95615
+12
+-1.26863
+22
+-0.50513
+32
+-10.9314
+13
+-1.26863
+23
+-0.50513
+33
+-10.9314
+0
+3DFACE
+8
+m_rifle
+10
+-1.26863
+20
+-7.68274
+30
+-7.25059
+11
+-1.26863
+21
+-4.37883
+31
+-3.95615
+12
+-1.26863
+22
+-4.37
+32
+-12.7718
+13
+-1.26863
+23
+-4.37
+33
+-12.7718
+0
+3DFACE
+8
+m_rifle
+10
+-1.26863
+20
+-12.0997
+30
+17.779
+11
+-1.26863
+21
+-6.76253
+31
+17.779
+12
+-1.26863
+22
+-12.0997
+32
+13.178
+13
+-1.26863
+23
+-12.0997
+33
+13.178
+0
+3DFACE
+8
+m_rifle
+10
+-1.26863
+20
+-4.73808
+30
+13.178
+11
+-1.26863
+21
+-12.0997
+31
+13.178
+12
+-1.26863
+22
+-6.76253
+32
+17.779
+13
+-1.26863
+23
+-6.76253
+33
+17.779
+0
+3DFACE
+8
+m_rifle
+10
+-1.26863
+20
+2.39566
+30
+6.33693
+11
+-1.26863
+21
+5.20015
+31
+21.0918
+12
+-1.26863
+22
+2.39568
+32
+-3.95619
+13
+-1.26863
+23
+2.39568
+33
+-3.95619
+0
+3DFACE
+8
+m_rifle
+10
+-1.26863
+20
+-6.76253
+30
+17.779
+11
+-1.79104
+21
+-0.432972
+31
+22.012
+12
+-1.26863
+22
+-4.73808
+32
+13.178
+13
+-1.26863
+23
+-4.73808
+33
+13.178
+0
+3DFACE
+8
+m_rifle
+10
+-1.26863
+20
+-11.5476
+30
+-15.7165
+11
+-1.26863
+21
+-13.204
+31
+-8.35483
+12
+-1.26863
+22
+-7.68274
+32
+-7.25059
+13
+-1.26863
+23
+-7.68274
+33
+-7.25059
+0
+3DFACE
+8
+m_rifle
+10
+-1.26863
+20
+-8.23486
+30
+-16.0846
+11
+-1.26863
+21
+-11.5476
+31
+-15.7165
+12
+-1.26863
+22
+-7.68274
+32
+-7.25059
+13
+-1.26863
+23
+-7.68274
+33
+-7.25059
+0
+3DFACE
+8
+m_rifle
+10
+-1.26863
+20
+-4.37
+30
+-12.7718
+11
+-1.26863
+21
+-8.23486
+31
+-16.0846
+12
+-1.26863
+22
+-7.68274
+32
+-7.25059
+13
+-1.26863
+23
+-7.68274
+33
+-7.25059
+0
+3DFACE
+8
+m_rifle
+10
+-1.26863
+20
+-15.2284
+30
+-10.7474
+11
+-1.26863
+21
+-13.204
+31
+-8.35483
+12
+-1.26863
+22
+-11.5476
+32
+-15.7165
+13
+-1.26863
+23
+-11.5476
+33
+-15.7165
+0
+3DFACE
+8
+m_rifle
+10
+1.26867
+20
+1.33528
+30
+-13.692
+11
+1.26867
+21
+-4.37883
+31
+-3.95615
+12
+1.26867
+22
+-0.50513
+32
+-10.9314
+13
+1.26867
+23
+-0.50513
+33
+-10.9314
+0
+3DFACE
+8
+m_rifle
+10
+1.26867
+20
+1.33528
+30
+-13.692
+11
+1.26867
+21
+2.39568
+31
+-3.95617
+12
+1.26867
+22
+-4.37883
+32
+-3.95615
+13
+1.26867
+23
+-4.37883
+33
+-3.95615
+0
+3DFACE
+8
+m_rifle
+10
+1.26866
+20
+-2.35447
+30
+6.33694
+11
+1.26866
+21
+2.99165
+31
+22.012
+12
+1.79105
+22
+-0.432972
+32
+22.012
+13
+1.79105
+23
+-0.432972
+33
+22.012
+0
+3DFACE
+8
+m_rifle
+10
+1.26866
+20
+-2.35447
+30
+6.33694
+11
+1.26866
+21
+5.20015
+31
+21.0918
+12
+1.26866
+22
+2.99165
+32
+22.012
+13
+1.26866
+23
+2.99165
+33
+22.012
+0
+3DFACE
+8
+m_rifle
+10
+1.26866
+20
+-2.35447
+30
+6.33694
+11
+1.26866
+21
+2.39568
+31
+6.33691
+12
+1.26866
+22
+5.20015
+32
+21.0918
+13
+1.26866
+23
+5.20015
+33
+21.0918
+0
+3DFACE
+8
+m_rifle
+10
+1.26866
+20
+-6.76253
+30
+23.6733
+11
+1.26866
+21
+-6.76253
+31
+17.779
+12
+1.79105
+22
+-0.432972
+32
+22.012
+13
+1.79105
+23
+-0.432972
+33
+22.012
+0
+3DFACE
+8
+m_rifle
+10
+1.79105
+20
+-0.432972
+30
+22.012
+11
+1.79105
+21
+-6.05522
+31
+23.6733
+12
+1.26866
+22
+-6.76253
+32
+23.6733
+13
+1.26866
+23
+-6.76253
+33
+23.6733
+0
+3DFACE
+8
+m_rifle
+10
+1.79105
+20
+-6.05522
+30
+23.6733
+11
+1.79105
+21
+-0.432972
+31
+22.012
+12
+2.27165
+22
+-0.432971
+32
+46.6735
+13
+2.27165
+23
+-0.432971
+33
+46.6735
+0
+3DFACE
+8
+m_rifle
+10
+2.27165
+20
+-0.432971
+30
+46.6735
+11
+1.79105
+21
+-6.05521
+31
+46.6735
+12
+1.79105
+22
+-6.05522
+32
+23.6733
+13
+1.79105
+23
+-6.05522
+33
+23.6733
+0
+3DFACE
+8
+m_rifle
+10
+0.866362
+20
+-3.84994
+30
+3.1575
+11
+0.866362
+21
+-2.4213
+31
+4.93099
+12
+0.866362
+22
+-4.73801
+32
+6.33691
+13
+0.866362
+23
+-4.73801
+33
+6.33691
+0
+3DFACE
+8
+m_rifle
+10
+0.866362
+20
+-3.01246
+30
+-2.40928
+11
+0.866362
+21
+-3.94847
+31
+-0.586525
+12
+0.866362
+22
+-4.37915
+32
+-3.947
+13
+0.866362
+23
+-4.37915
+33
+-3.947
+0
+3DFACE
+8
+m_rifle
+10
+0.866362
+20
+-1.63308
+30
+-3.19749
+11
+0.866362
+21
+-3.01246
+31
+-2.40928
+12
+0.866362
+22
+-4.37915
+32
+-3.947
+13
+0.866362
+23
+-4.37915
+33
+-3.947
+0
+3DFACE
+8
+m_rifle
+10
+0.866362
+20
+-4.37915
+30
+-3.947
+11
+0.866362
+21
+-0.155174
+31
+-3.0497
+12
+0.866362
+22
+-1.63308
+32
+-3.19749
+13
+0.866362
+23
+-1.63308
+33
+-3.19749
+0
+3DFACE
+8
+m_rifle
+10
+0.866362
+20
+-4.37915
+30
+-3.947
+11
+0.866362
+21
+2.39564
+31
+-3.95615
+12
+0.866362
+22
+-0.155174
+32
+-3.0497
+13
+0.866362
+23
+-0.155174
+33
+-3.0497
+0
+3DFACE
+8
+m_rifle
+10
+0.866362
+20
+0.58378
+30
+-2.06443
+11
+0.866362
+21
+-0.155174
+31
+-3.0497
+12
+0.866362
+22
+2.39564
+32
+-3.95615
+13
+0.866362
+23
+2.39564
+33
+-3.95615
+0
+3DFACE
+8
+m_rifle
+10
+0.866362
+20
+0.58378
+30
+-2.06443
+11
+0.866362
+21
+2.39564
+31
+-3.95615
+12
+0.866362
+22
+2.39564
+32
+6.33695
+13
+0.866362
+23
+2.39564
+33
+6.33695
+0
+3DFACE
+8
+m_rifle
+10
+0.866362
+20
+2.39564
+30
+6.33695
+11
+0.866362
+21
+0.633045
+31
+5.66995
+12
+0.866362
+22
+0.58378
+32
+-2.06443
+13
+0.866362
+23
+0.58378
+33
+-2.06443
+0
+3DFACE
+8
+m_rifle
+10
+0.866362
+20
+-4.37915
+30
+-3.947
+11
+0.866362
+21
+-3.94847
+31
+-0.586525
+12
+0.866362
+22
+-3.84994
+32
+3.1575
+13
+0.866362
+23
+-3.84994
+33
+3.1575
+0
+3DFACE
+8
+m_rifle
+10
+0.866362
+20
+-3.84994
+30
+3.1575
+11
+0.866362
+21
+-4.73801
+31
+6.33691
+12
+0.866362
+22
+-4.37915
+32
+-3.947
+13
+0.866362
+23
+-4.37915
+33
+-3.947
+0
+3DFACE
+8
+m_rifle
+10
+0.866362
+20
+-2.4213
+30
+4.93099
+11
+0.866362
+21
+-0.992653
+31
+5.66995
+12
+0.866362
+22
+-4.73801
+32
+6.33691
+13
+0.866362
+23
+-4.73801
+33
+6.33691
+0
+3DFACE
+8
+m_rifle
+10
+0.866362
+20
+-0.992653
+30
+5.66995
+11
+0.866362
+21
+0.633045
+31
+5.66995
+12
+0.866362
+22
+2.39564
+32
+6.33695
+13
+0.866362
+23
+2.39564
+33
+6.33695
+0
+3DFACE
+8
+m_rifle
+10
+0.866362
+20
+2.39564
+30
+6.33695
+11
+0.866362
+21
+-4.73801
+31
+6.33691
+12
+0.866362
+22
+-0.992653
+32
+5.66995
+13
+0.866362
+23
+-0.992653
+33
+5.66995
+0
+3DFACE
+8
+m_rifle
+10
+1.26866
+20
+-2.35447
+30
+6.33694
+11
+1.79105
+21
+-0.432972
+31
+22.012
+12
+1.26866
+22
+-4.73808
+32
+13.178
+13
+1.26866
+23
+-4.73808
+33
+13.178
+0
+3DFACE
+8
+m_rifle
+10
+1.26866
+20
+-4.73808
+30
+13.178
+11
+1.26866
+21
+-4.73808
+31
+6.33695
+12
+1.26866
+22
+-2.35447
+32
+6.33694
+13
+1.26866
+23
+-2.35447
+33
+6.33694
+0
+3DFACE
+8
+m_rifle
+10
+1.26867
+20
+1.51932
+30
+-31.7281
+11
+1.26867
+21
+4.0959
+31
+-33.9366
+12
+1.26866
+22
+5.20015
+32
+21.0918
+13
+1.26866
+23
+5.20015
+33
+21.0918
+0
+3DFACE
+8
+m_rifle
+10
+1.26866
+20
+5.20015
+30
+21.0918
+11
+1.26867
+21
+1.33528
+31
+-13.692
+12
+1.26867
+22
+1.51932
+32
+-31.7281
+13
+1.26867
+23
+1.51932
+33
+-31.7281
+0
+3DFACE
+8
+m_rifle
+10
+1.26867
+20
+-4.37883
+30
+-3.95615
+11
+1.26867
+21
+-4.37
+31
+-12.7718
+12
+1.26867
+22
+-0.50513
+32
+-10.9314
+13
+1.26867
+23
+-0.50513
+33
+-10.9314
+0
+3DFACE
+8
+m_rifle
+10
+1.26867
+20
+-4.37883
+30
+-3.95615
+11
+1.26867
+21
+-7.68274
+31
+-7.25059
+12
+1.26867
+22
+-4.37
+32
+-12.7718
+13
+1.26867
+23
+-4.37
+33
+-12.7718
+0
+3DFACE
+8
+m_rifle
+10
+1.26866
+20
+-6.76253
+30
+17.779
+11
+1.26866
+21
+-12.0997
+31
+17.779
+12
+1.26866
+22
+-12.0997
+32
+13.178
+13
+1.26866
+23
+-12.0997
+33
+13.178
+0
+3DFACE
+8
+m_rifle
+10
+1.26866
+20
+-12.0997
+30
+13.178
+11
+1.26866
+21
+-4.73808
+31
+13.178
+12
+1.26866
+22
+-6.76253
+32
+17.779
+13
+1.26866
+23
+-6.76253
+33
+17.779
+0
+3DFACE
+8
+m_rifle
+10
+1.26866
+20
+5.20015
+30
+21.0918
+11
+1.26866
+21
+2.39568
+31
+6.33691
+12
+1.26867
+22
+2.39568
+32
+-3.95617
+13
+1.26867
+23
+2.39568
+33
+-3.95617
+0
+3DFACE
+8
+m_rifle
+10
+1.79105
+20
+-0.432972
+30
+22.012
+11
+1.26866
+21
+-6.76253
+31
+17.779
+12
+1.26866
+22
+-4.73808
+32
+13.178
+13
+1.26866
+23
+-4.73808
+33
+13.178
+0
+3DFACE
+8
+m_rifle
+10
+1.26867
+20
+-13.204
+30
+-8.35483
+11
+1.26867
+21
+-11.5476
+31
+-15.7165
+12
+1.26867
+22
+-7.68274
+32
+-7.25059
+13
+1.26867
+23
+-7.68274
+33
+-7.25059
+0
+3DFACE
+8
+m_rifle
+10
+1.26867
+20
+-11.5476
+30
+-15.7165
+11
+1.26867
+21
+-8.23486
+31
+-16.0846
+12
+1.26867
+22
+-7.68274
+32
+-7.25059
+13
+1.26867
+23
+-7.68274
+33
+-7.25059
+0
+3DFACE
+8
+m_rifle
+10
+1.26867
+20
+-8.23486
+30
+-16.0846
+11
+1.26867
+21
+-4.37
+31
+-12.7718
+12
+1.26867
+22
+-7.68274
+32
+-7.25059
+13
+1.26867
+23
+-7.68274
+33
+-7.25059
+0
+3DFACE
+8
+m_rifle
+10
+1.26867
+20
+-13.204
+30
+-8.35483
+11
+1.26867
+21
+-15.2284
+31
+-10.7474
+12
+1.26867
+22
+-11.5476
+32
+-15.7165
+13
+1.26867
+23
+-11.5476
+33
+-15.7165
+0
+3DFACE
+8
+m_rifle
+10
+0.561346
+20
+-6.76253
+30
+46.6735
+11
+1.79105
+21
+-6.05522
+31
+23.6733
+12
+1.79105
+22
+-6.05521
+32
+46.6735
+13
+1.79105
+23
+-6.05521
+33
+46.6735
+0
+3DFACE
+8
+m_rifle
+10
+0.561346
+20
+-6.76253
+30
+46.6735
+11
+0.561349
+21
+-6.76253
+31
+23.6733
+12
+1.79105
+22
+-6.05522
+32
+23.6733
+13
+1.79105
+23
+-6.05522
+33
+23.6733
+0
+3DFACE
+8
+m_rifle
+10
+1.26866
+20
+-6.76253
+30
+23.6733
+11
+1.79105
+21
+-6.05522
+31
+23.6733
+12
+0.561349
+22
+-6.76253
+32
+23.6733
+13
+0.561349
+23
+-6.76253
+33
+23.6733
+0
+3DFACE
+8
+m_rifle
+10
+-0.561256
+20
+-6.76253
+30
+23.6733
+11
+-1.79104
+21
+-6.05518
+31
+23.6733
+12
+-1.26863
+22
+-6.76253
+32
+23.6733
+13
+-1.26863
+23
+-6.76253
+33
+23.6733
+0
+3DFACE
+8
+m_rifle
+10
+-0.561252
+20
+-6.76253
+30
+46.6735
+11
+-1.79104
+21
+-6.05518
+31
+23.6733
+12
+-0.561256
+22
+-6.76253
+32
+23.6733
+13
+-0.561256
+23
+-6.76253
+33
+23.6733
+0
+3DFACE
+8
+m_rifle
+10
+-0.561252
+20
+-6.76253
+30
+46.6735
+11
+-1.79104
+21
+-6.05517
+31
+46.6735
+12
+-1.79104
+22
+-6.05518
+32
+23.6733
+13
+-1.79104
+23
+-6.05518
+33
+23.6733
+0
+3DFACE
+8
+m_rifle
+10
+-0.561256
+20
+-6.76253
+30
+23.6733
+11
+0.561346
+21
+-6.76253
+31
+46.6735
+12
+-0.561252
+22
+-6.76253
+32
+46.6735
+13
+-0.561252
+23
+-6.76253
+33
+46.6735
+0
+3DFACE
+8
+m_rifle
+10
+-0.561256
+20
+-6.76253
+30
+23.6733
+11
+0.561349
+21
+-6.76253
+31
+23.6733
+12
+0.561346
+22
+-6.76253
+32
+46.6735
+13
+0.561346
+23
+-6.76253
+33
+46.6735
+0
+3DFACE
+8
+m_rifle
+10
+-0.561256
+20
+-6.76253
+30
+23.6733
+11
+-1.26863
+21
+-6.76253
+31
+17.779
+12
+0.561349
+22
+-6.76253
+32
+23.6733
+13
+0.561349
+23
+-6.76253
+33
+23.6733
+0
+3DFACE
+8
+m_rifle
+10
+-0.561256
+20
+-6.76253
+30
+23.6733
+11
+-1.26863
+21
+-6.76253
+31
+23.6733
+12
+-1.26863
+22
+-6.76253
+32
+17.779
+13
+-1.26863
+23
+-6.76253
+33
+17.779
+0
+3DFACE
+8
+m_rifle
+10
+1.26866
+20
+-4.73808
+30
+13.178
+11
+-0.866355
+21
+-4.73806
+31
+6.33693
+12
+0.866362
+22
+-4.73801
+32
+6.33691
+13
+0.866362
+23
+-4.73801
+33
+6.33691
+0
+3DFACE
+8
+m_rifle
+10
+0.866362
+20
+-4.73801
+30
+6.33691
+11
+1.26866
+21
+-4.73808
+31
+6.33695
+12
+1.26866
+22
+-4.73808
+32
+13.178
+13
+1.26866
+23
+-4.73808
+33
+13.178
+0
+3DFACE
+8
+m_rifle
+10
+1.26867
+20
+2.39568
+30
+-3.95617
+11
+1.26867
+21
+1.33528
+31
+-13.692
+12
+1.26866
+22
+5.20015
+32
+21.0918
+13
+1.26866
+23
+5.20015
+33
+21.0918
+0
+3DFACE
+8
+m_rifle
+10
+1.26866
+20
+-2.35447
+30
+6.33694
+11
+0.866362
+21
+2.39564
+31
+6.33695
+12
+1.26866
+22
+2.39568
+32
+6.33691
+13
+1.26866
+23
+2.39568
+33
+6.33691
+0
+3DFACE
+8
+m_rifle
+10
+1.26866
+20
+-2.35447
+30
+6.33694
+11
+0.866362
+21
+-4.73801
+31
+6.33691
+12
+0.866362
+22
+2.39564
+32
+6.33695
+13
+0.866362
+23
+2.39564
+33
+6.33695
+0
+3DFACE
+8
+m_rifle
+10
+1.26866
+20
+-2.35447
+30
+6.33694
+11
+1.26866
+21
+-4.73808
+31
+6.33695
+12
+0.866362
+22
+-4.73801
+32
+6.33691
+13
+0.866362
+23
+-4.73801
+33
+6.33691
+0
+3DFACE
+8
+m_rifle
+10
+1.26866
+20
+2.39568
+30
+6.33691
+11
+0.866362
+21
+2.39564
+31
+-3.95615
+12
+1.26867
+22
+2.39568
+32
+-3.95617
+13
+1.26867
+23
+2.39568
+33
+-3.95617
+0
+3DFACE
+8
+m_rifle
+10
+1.26866
+20
+2.39568
+30
+6.33691
+11
+0.866362
+21
+2.39564
+31
+6.33695
+12
+0.866362
+22
+2.39564
+32
+-3.95615
+13
+0.866362
+23
+2.39564
+33
+-3.95615
+0
+3DFACE
+8
+m_rifle
+10
+0.866362
+20
+-4.37915
+30
+-3.947
+11
+1.26867
+21
+2.39568
+31
+-3.95617
+12
+0.866362
+22
+2.39564
+32
+-3.95615
+13
+0.866362
+23
+2.39564
+33
+-3.95615
+0
+3DFACE
+8
+m_rifle
+10
+0.866362
+20
+-4.37915
+30
+-3.947
+11
+1.26867
+21
+-4.37883
+31
+-3.95615
+12
+1.26867
+22
+2.39568
+32
+-3.95617
+13
+1.26867
+23
+2.39568
+33
+-3.95617
+0
+3DFACE
+8
+m_rifle
+10
+0.866362
+20
+-3.94847
+30
+-0.586525
+11
+0.866362
+21
+-3.01246
+31
+-2.40928
+12
+-0.866355
+22
+-3.01246
+32
+-2.40928
+13
+-0.866355
+23
+-3.01246
+33
+-2.40928
+0
+3DFACE
+8
+m_rifle
+10
+-0.866355
+20
+-3.01246
+30
+-2.40928
+11
+-0.866355
+21
+-3.94847
+31
+-0.586525
+12
+0.866362
+22
+-3.94847
+32
+-0.586525
+13
+0.866362
+23
+-3.94847
+33
+-0.586525
+0
+3DFACE
+8
+m_rifle
+10
+0.866362
+20
+-1.63308
+30
+-3.19749
+11
+0.866362
+21
+-0.155174
+31
+-3.0497
+12
+-0.866355
+22
+-0.155174
+32
+-3.0497
+13
+-0.866355
+23
+-0.155174
+33
+-3.0497
+0
+3DFACE
+8
+m_rifle
+10
+-0.866355
+20
+-0.155174
+30
+-3.0497
+11
+-0.866355
+21
+-1.63308
+31
+-3.1975
+12
+0.866362
+22
+-1.63308
+32
+-3.19749
+13
+0.866362
+23
+-1.63308
+33
+-3.19749
+0
+3DFACE
+8
+m_rifle
+10
+0.866362
+20
+0.58378
+30
+-2.06443
+11
+0.866362
+21
+0.633045
+31
+5.66995
+12
+-0.866355
+22
+0.633044
+32
+5.66995
+13
+-0.866355
+23
+0.633044
+33
+5.66995
+0
+3DFACE
+8
+m_rifle
+10
+-0.866355
+20
+0.633044
+30
+5.66995
+11
+-0.866355
+21
+0.58378
+31
+-2.06443
+12
+0.866362
+22
+0.58378
+32
+-2.06443
+13
+0.866362
+23
+0.58378
+33
+-2.06443
+0
+3DFACE
+8
+m_rifle
+10
+0.866362
+20
+-0.992653
+30
+5.66995
+11
+0.866362
+21
+-2.4213
+31
+4.93099
+12
+-0.866355
+22
+-2.4213
+32
+4.93099
+13
+-0.866355
+23
+-2.4213
+33
+4.93099
+0
+3DFACE
+8
+m_rifle
+10
+-0.866355
+20
+-2.4213
+30
+4.93099
+11
+-0.866355
+21
+-0.992653
+31
+5.66995
+12
+0.866362
+22
+-0.992653
+32
+5.66995
+13
+0.866362
+23
+-0.992653
+33
+5.66995
+0
+3DFACE
+8
+m_rifle
+10
+1.26867
+20
+-7.68274
+30
+-7.25059
+11
+1.26867
+21
+-4.37883
+31
+-3.95615
+12
+0.866362
+22
+-4.37915
+32
+-3.947
+13
+0.866362
+23
+-4.37915
+33
+-3.947
+0
+3DFACE
+8
+m_rifle
+10
+0.866362
+20
+-4.37915
+30
+-3.947
+11
+-0.866355
+21
+-4.37915
+31
+-3.947
+12
+1.26867
+22
+-7.68274
+32
+-7.25059
+13
+1.26867
+23
+-7.68274
+33
+-7.25059
+0
+3DFACE
+8
+m_rifle
+10
+-0.866355
+20
+-4.37915
+30
+-3.947
+11
+-1.26863
+21
+-4.37883
+31
+-3.95615
+12
+-1.26863
+22
+-7.68274
+32
+-7.25059
+13
+-1.26863
+23
+-7.68274
+33
+-7.25059
+0
+3DFACE
+8
+m_rifle
+10
+-1.26863
+20
+-7.68274
+30
+-7.25059
+11
+1.26867
+21
+-7.68274
+31
+-7.25059
+12
+-0.866355
+22
+-4.37915
+32
+-3.947
+13
+-0.866355
+23
+-4.37915
+33
+-3.947
+0
+3DFACE
+8
+m_rifle
+10
+-0.866355
+20
+2.39564
+30
+6.33695
+11
+-1.26863
+21
+2.39566
+31
+6.33693
+12
+-1.26863
+22
+2.39568
+32
+-3.95619
+13
+-1.26863
+23
+2.39568
+33
+-3.95619
+0
+3DFACE
+8
+m_rifle
+10
+-1.26863
+20
+2.39568
+30
+-3.95619
+11
+-0.866355
+21
+2.39564
+31
+-3.95615
+12
+-0.866355
+22
+2.39564
+32
+6.33695
+13
+-0.866355
+23
+2.39564
+33
+6.33695
+0
+3DFACE
+8
+m_rifle
+10
+-0.866355
+20
+2.39564
+30
+-3.95615
+11
+-1.26863
+21
+-4.37883
+31
+-3.95615
+12
+-0.866355
+22
+-4.37915
+32
+-3.947
+13
+-0.866355
+23
+-4.37915
+33
+-3.947
+0
+3DFACE
+8
+m_rifle
+10
+-0.866355
+20
+2.39564
+30
+-3.95615
+11
+-1.26865
+21
+-1.52243
+31
+-3.95615
+12
+-1.26863
+22
+-4.37883
+32
+-3.95615
+13
+-1.26863
+23
+-4.37883
+33
+-3.95615
+0
+3DFACE
+8
+m_rifle
+10
+-0.866355
+20
+2.39564
+30
+-3.95615
+11
+-1.26865
+21
+-0.0282252
+31
+-3.95615
+12
+-1.26865
+22
+-1.52243
+32
+-3.95615
+13
+-1.26865
+23
+-1.52243
+33
+-3.95615
+0
+3DFACE
+8
+m_rifle
+10
+-0.866355
+20
+2.39564
+30
+-3.95615
+11
+-1.26863
+21
+2.39568
+31
+-3.95619
+12
+-1.26865
+22
+-0.0282252
+32
+-3.95615
+13
+-1.26865
+23
+-0.0282252
+33
+-3.95615
+0
+3DFACE
+8
+m_rifle
+10
+-0.866355
+20
+-4.73806
+30
+6.33693
+11
+-1.26863
+21
+2.39566
+31
+6.33693
+12
+-0.866355
+22
+2.39564
+32
+6.33695
+13
+-0.866355
+23
+2.39564
+33
+6.33695
+0
+3DFACE
+8
+m_rifle
+10
+-0.866355
+20
+-4.73806
+30
+6.33693
+11
+-1.26865
+21
+0.830573
+31
+6.33695
+12
+-1.26863
+22
+2.39566
+32
+6.33693
+13
+-1.26863
+23
+2.39566
+33
+6.33693
+0
+3DFACE
+8
+m_rifle
+10
+-0.866355
+20
+-4.73806
+30
+6.33693
+11
+-1.26865
+21
+-0.724812
+31
+6.33694
+12
+-1.26865
+22
+0.830573
+32
+6.33695
+13
+-1.26865
+23
+0.830573
+33
+6.33695
+0
+3DFACE
+8
+m_rifle
+10
+-0.866355
+20
+-4.73806
+30
+6.33693
+11
+-1.26865
+21
+-1.75825
+31
+6.33694
+12
+-1.26865
+22
+-0.724812
+32
+6.33694
+13
+-1.26865
+23
+-0.724812
+33
+6.33694
+0
+3DFACE
+8
+m_rifle
+10
+-0.866355
+20
+-4.73806
+30
+6.33693
+11
+-1.26863
+21
+-4.73808
+31
+6.33695
+12
+-1.26865
+22
+-1.75825
+32
+6.33694
+13
+-1.26865
+23
+-1.75825
+33
+6.33694
+0
+3DFACE
+8
+m_rifle
+10
+-0.866355
+20
+-3.94847
+30
+-0.586525
+11
+-0.866355
+21
+-3.84984
+31
+3.16548
+12
+0.866362
+22
+-3.84994
+32
+3.1575
+13
+0.866362
+23
+-3.84994
+33
+3.1575
+0
+3DFACE
+8
+m_rifle
+10
+0.866362
+20
+-3.84994
+30
+3.1575
+11
+0.866362
+21
+-3.94847
+31
+-0.586525
+12
+-0.866355
+22
+-3.94847
+32
+-0.586525
+13
+-0.866355
+23
+-3.94847
+33
+-0.586525
+0
+3DFACE
+8
+m_rifle
+10
+-0.866355
+20
+-4.73806
+30
+6.33693
+11
+1.26866
+21
+-4.73808
+31
+13.178
+12
+-1.26863
+22
+-4.73808
+32
+13.178
+13
+-1.26863
+23
+-4.73808
+33
+13.178
+0
+3DFACE
+8
+m_rifle
+10
+-1.26863
+20
+-4.73808
+30
+13.178
+11
+-1.26863
+21
+-4.73808
+31
+6.33695
+12
+-0.866355
+22
+-4.73806
+32
+6.33693
+13
+-0.866355
+23
+-4.73806
+33
+6.33693
+0
+3DFACE
+8
+m_rifle
+10
+0.866362
+20
+-4.37915
+30
+-3.947
+11
+0.866362
+21
+-4.73801
+31
+6.33691
+12
+-0.866355
+22
+-4.73806
+32
+6.33693
+13
+-0.866355
+23
+-4.73806
+33
+6.33693
+0
+3DFACE
+8
+m_rifle
+10
+-0.866355
+20
+-4.73806
+30
+6.33693
+11
+-0.866355
+21
+-4.37915
+31
+-3.947
+12
+0.866362
+22
+-4.37915
+32
+-3.947
+13
+0.866362
+23
+-4.37915
+33
+-3.947
+0
+3DFACE
+8
+m_rifle
+10
+0.866362
+20
+-1.63308
+30
+-3.19749
+11
+-0.866355
+21
+-1.63308
+31
+-3.1975
+12
+-0.866355
+22
+-3.01246
+32
+-2.40928
+13
+-0.866355
+23
+-3.01246
+33
+-2.40928
+0
+3DFACE
+8
+m_rifle
+10
+-0.866355
+20
+-3.01246
+30
+-2.40928
+11
+0.866362
+21
+-3.01246
+31
+-2.40928
+12
+0.866362
+22
+-1.63308
+32
+-3.19749
+13
+0.866362
+23
+-1.63308
+33
+-3.19749
+0
+3DFACE
+8
+m_rifle
+10
+0.866362
+20
+0.58378
+30
+-2.06443
+11
+-0.866355
+21
+0.58378
+31
+-2.06443
+12
+-0.866355
+22
+-0.155174
+32
+-3.0497
+13
+-0.866355
+23
+-0.155174
+33
+-3.0497
+0
+3DFACE
+8
+m_rifle
+10
+-0.866355
+20
+-0.155174
+30
+-3.0497
+11
+0.866362
+21
+-0.155174
+31
+-3.0497
+12
+0.866362
+22
+0.58378
+32
+-2.06443
+13
+0.866362
+23
+0.58378
+33
+-2.06443
+0
+3DFACE
+8
+m_rifle
+10
+0.866362
+20
+-0.992653
+30
+5.66995
+11
+-0.866355
+21
+-0.992653
+31
+5.66995
+12
+-0.866355
+22
+0.633044
+32
+5.66995
+13
+-0.866355
+23
+0.633044
+33
+5.66995
+0
+3DFACE
+8
+m_rifle
+10
+-0.866355
+20
+0.633044
+30
+5.66995
+11
+0.866362
+21
+0.633045
+31
+5.66995
+12
+0.866362
+22
+-0.992653
+32
+5.66995
+13
+0.866362
+23
+-0.992653
+33
+5.66995
+0
+3DFACE
+8
+m_rifle
+10
+0.866362
+20
+-3.84994
+30
+3.1575
+11
+-0.866355
+21
+-3.84984
+31
+3.16548
+12
+-0.866355
+22
+-2.4213
+32
+4.93099
+13
+-0.866355
+23
+-2.4213
+33
+4.93099
+0
+3DFACE
+8
+m_rifle
+10
+-0.866355
+20
+-2.4213
+30
+4.93099
+11
+0.866362
+21
+-2.4213
+31
+4.93099
+12
+0.866362
+22
+-3.84994
+32
+3.1575
+13
+0.866362
+23
+-3.84994
+33
+3.1575
+0
+3DFACE
+8
+m_rifle
+10
+1.26866
+20
+2.99165
+30
+22.012
+11
+1.26866
+21
+5.20015
+31
+21.0918
+12
+-1.26863
+22
+5.20015
+32
+21.0918
+13
+-1.26863
+23
+5.20015
+33
+21.0918
+0
+3DFACE
+8
+m_rifle
+10
+-1.26863
+20
+5.20015
+30
+21.0918
+11
+-1.26863
+21
+2.99165
+31
+22.012
+12
+1.26866
+22
+2.99165
+32
+22.012
+13
+1.26866
+23
+2.99165
+33
+22.012
+0
+3DFACE
+8
+m_rifle
+10
+0.561349
+20
+-6.76253
+30
+23.6733
+11
+-1.26863
+21
+-6.76253
+31
+17.779
+12
+1.26866
+22
+-6.76253
+32
+17.779
+13
+1.26866
+23
+-6.76253
+33
+17.779
+0
+3DFACE
+8
+m_rifle
+10
+1.26866
+20
+-6.76253
+30
+17.779
+11
+1.26866
+21
+-6.76253
+31
+23.6733
+12
+0.561349
+22
+-6.76253
+32
+23.6733
+13
+0.561349
+23
+-6.76253
+33
+23.6733
+0
+3DFACE
+8
+m_rifle
+10
+1.26866
+20
+-12.0997
+30
+17.779
+11
+1.26866
+21
+-6.76253
+31
+17.779
+12
+-1.26863
+22
+-6.76253
+32
+17.779
+13
+-1.26863
+23
+-6.76253
+33
+17.779
+0
+3DFACE
+8
+m_rifle
+10
+-1.26863
+20
+-6.76253
+30
+17.779
+11
+-1.26863
+21
+-12.0997
+31
+17.779
+12
+1.26866
+22
+-12.0997
+32
+17.779
+13
+1.26866
+23
+-12.0997
+33
+17.779
+0
+3DFACE
+8
+m_rifle
+10
+1.26866
+20
+-4.73808
+30
+13.178
+11
+1.26866
+21
+-12.0997
+31
+13.178
+12
+-1.26863
+22
+-12.0997
+32
+13.178
+13
+-1.26863
+23
+-12.0997
+33
+13.178
+0
+3DFACE
+8
+m_rifle
+10
+-1.26863
+20
+-12.0997
+30
+13.178
+11
+-1.26863
+21
+-4.73808
+31
+13.178
+12
+1.26866
+22
+-4.73808
+32
+13.178
+13
+1.26866
+23
+-4.73808
+33
+13.178
+0
+3DFACE
+8
+m_rifle
+10
+1.26867
+20
+-13.204
+30
+-8.35483
+11
+1.26867
+21
+-7.68274
+31
+-7.25059
+12
+-1.26863
+22
+-7.68274
+32
+-7.25059
+13
+-1.26863
+23
+-7.68274
+33
+-7.25059
+0
+3DFACE
+8
+m_rifle
+10
+-1.26863
+20
+-7.68274
+30
+-7.25059
+11
+-1.26863
+21
+-13.204
+31
+-8.35483
+12
+1.26867
+22
+-13.204
+32
+-8.35483
+13
+1.26867
+23
+-13.204
+33
+-8.35483
+0
+3DFACE
+8
+m_rifle
+10
+1.26867
+20
+-15.2284
+30
+-10.7474
+11
+1.26867
+21
+-13.204
+31
+-8.35483
+12
+-1.26863
+22
+-13.204
+32
+-8.35483
+13
+-1.26863
+23
+-13.204
+33
+-8.35483
+0
+3DFACE
+8
+m_rifle
+10
+-1.26863
+20
+-13.204
+30
+-8.35483
+11
+-1.26863
+21
+-15.2284
+31
+-10.7474
+12
+1.26867
+22
+-15.2284
+32
+-10.7474
+13
+1.26867
+23
+-15.2284
+33
+-10.7474
+0
+3DFACE
+8
+m_rifle
+10
+1.26867
+20
+-11.5476
+30
+-15.7165
+11
+1.26867
+21
+-15.2284
+31
+-10.7474
+12
+-1.26863
+22
+-15.2284
+32
+-10.7474
+13
+-1.26863
+23
+-15.2284
+33
+-10.7474
+0
+3DFACE
+8
+m_rifle
+10
+-1.26863
+20
+-15.2284
+30
+-10.7474
+11
+-1.26863
+21
+-11.5476
+31
+-15.7165
+12
+1.26867
+22
+-11.5476
+32
+-15.7165
+13
+1.26867
+23
+-11.5476
+33
+-15.7165
+0
+3DFACE
+8
+m_rifle
+10
+1.26867
+20
+-8.23486
+30
+-16.0846
+11
+1.26867
+21
+-11.5476
+31
+-15.7165
+12
+-1.26863
+22
+-11.5476
+32
+-15.7165
+13
+-1.26863
+23
+-11.5476
+33
+-15.7165
+0
+3DFACE
+8
+m_rifle
+10
+-1.26863
+20
+-11.5476
+30
+-15.7165
+11
+-1.26863
+21
+-8.23486
+31
+-16.0846
+12
+1.26867
+22
+-8.23486
+32
+-16.0846
+13
+1.26867
+23
+-8.23486
+33
+-16.0846
+0
+3DFACE
+8
+m_rifle
+10
+1.26867
+20
+-4.37
+30
+-12.7718
+11
+1.26867
+21
+-8.23486
+31
+-16.0846
+12
+-1.26863
+22
+-8.23486
+32
+-16.0846
+13
+-1.26863
+23
+-8.23486
+33
+-16.0846
+0
+3DFACE
+8
+m_rifle
+10
+-1.26863
+20
+-8.23486
+30
+-16.0846
+11
+-1.26863
+21
+-4.37
+31
+-12.7718
+12
+1.26867
+22
+-4.37
+32
+-12.7718
+13
+1.26867
+23
+-4.37
+33
+-12.7718
+0
+3DFACE
+8
+m_rifle
+10
+1.26867
+20
+-0.50513
+30
+-10.9314
+11
+1.26867
+21
+-4.37
+31
+-12.7718
+12
+-1.26863
+22
+-4.37
+32
+-12.7718
+13
+-1.26863
+23
+-4.37
+33
+-12.7718
+0
+3DFACE
+8
+m_rifle
+10
+-1.26863
+20
+-4.37
+30
+-12.7718
+11
+-1.26863
+21
+-0.50513
+31
+-10.9314
+12
+1.26867
+22
+-0.50513
+32
+-10.9314
+13
+1.26867
+23
+-0.50513
+33
+-10.9314
+0
+3DFACE
+8
+m_rifle
+10
+1.26867
+20
+1.33528
+30
+-13.692
+11
+1.26867
+21
+-0.50513
+31
+-10.9314
+12
+-1.26863
+22
+-0.50513
+32
+-10.9314
+13
+-1.26863
+23
+-0.50513
+33
+-10.9314
+0
+3DFACE
+8
+m_rifle
+10
+-1.26863
+20
+-0.50513
+30
+-10.9314
+11
+-1.26863
+21
+1.33528
+31
+-13.692
+12
+1.26867
+22
+1.33528
+32
+-13.692
+13
+1.26867
+23
+1.33528
+33
+-13.692
+0
+3DFACE
+8
+m_rifle
+10
+1.26867
+20
+1.51932
+30
+-31.7281
+11
+1.26867
+21
+1.33528
+31
+-13.692
+12
+-1.26863
+22
+1.33528
+32
+-13.692
+13
+-1.26863
+23
+1.33528
+33
+-13.692
+0
+3DFACE
+8
+m_rifle
+10
+-1.26863
+20
+1.33528
+30
+-13.692
+11
+-1.26863
+21
+1.51932
+31
+-31.7281
+12
+1.26867
+22
+1.51932
+32
+-31.7281
+13
+1.26867
+23
+1.51932
+33
+-31.7281
+0
+3DFACE
+8
+m_rifle
+10
+1.26867
+20
+4.0959
+30
+-33.9366
+11
+1.26867
+21
+1.51932
+31
+-31.7281
+12
+-1.26863
+22
+1.51932
+32
+-31.7281
+13
+-1.26863
+23
+1.51932
+33
+-31.7281
+0
+3DFACE
+8
+m_rifle
+10
+-1.26863
+20
+1.51932
+30
+-31.7281
+11
+-1.26863
+21
+4.0959
+31
+-33.9366
+12
+1.26867
+22
+4.0959
+32
+-33.9366
+13
+1.26867
+23
+4.0959
+33
+-33.9366
+0
+3DFACE
+8
+m_rifle
+10
+8.23903e-006
+20
+9.22681
+30
+70.4874
+11
+0.918522
+21
+8.69651
+31
+70.4874
+12
+1.06062
+22
+9.22681
+32
+70.4874
+13
+1.06062
+23
+9.22681
+33
+70.4874
+0
+3DFACE
+8
+m_rifle
+10
+8.23903e-006
+20
+9.22681
+30
+70.4874
+11
+0.530312
+21
+8.3083
+31
+70.4874
+12
+0.918522
+22
+8.69651
+32
+70.4874
+13
+0.918522
+23
+8.69651
+33
+70.4874
+0
+3DFACE
+8
+m_rifle
+10
+8.23903e-006
+20
+9.22681
+30
+70.4874
+11
+8.37811e-006
+21
+8.16621
+31
+70.4874
+12
+0.530312
+22
+8.3083
+32
+70.4874
+13
+0.530312
+23
+8.3083
+33
+70.4874
+0
+3DFACE
+8
+m_rifle
+10
+8.23903e-006
+20
+9.22681
+30
+70.4874
+11
+-0.530296
+21
+8.3083
+31
+70.4874
+12
+8.37811e-006
+22
+8.16621
+32
+70.4874
+13
+8.37811e-006
+23
+8.16621
+33
+70.4874
+0
+3DFACE
+8
+m_rifle
+10
+8.23903e-006
+20
+9.22681
+30
+70.4874
+11
+-0.918505
+21
+8.69651
+31
+70.4874
+12
+-0.530296
+22
+8.3083
+32
+70.4874
+13
+-0.530296
+23
+8.3083
+33
+70.4874
+0
+3DFACE
+8
+m_rifle
+10
+8.23903e-006
+20
+9.22681
+30
+70.4874
+11
+-1.0606
+21
+9.22681
+31
+70.4874
+12
+-0.918505
+22
+8.69651
+32
+70.4874
+13
+-0.918505
+23
+8.69651
+33
+70.4874
+0
+3DFACE
+8
+m_rifle
+10
+8.23903e-006
+20
+9.22681
+30
+70.4874
+11
+-0.918505
+21
+9.75712
+31
+70.4874
+12
+-1.0606
+22
+9.22681
+32
+70.4874
+13
+-1.0606
+23
+9.22681
+33
+70.4874
+0
+3DFACE
+8
+m_rifle
+10
+8.23903e-006
+20
+9.22681
+30
+70.4874
+11
+-0.530296
+21
+10.1453
+31
+70.4874
+12
+-0.918505
+22
+9.75712
+32
+70.4874
+13
+-0.918505
+23
+9.75712
+33
+70.4874
+0
+3DFACE
+8
+m_rifle
+10
+8.23903e-006
+20
+9.22681
+30
+70.4874
+11
+8.19267e-006
+21
+10.2874
+31
+70.4874
+12
+-0.530296
+22
+10.1453
+32
+70.4874
+13
+-0.530296
+23
+10.1453
+33
+70.4874
+0
+3DFACE
+8
+m_rifle
+10
+8.23903e-006
+20
+9.22681
+30
+70.4874
+11
+0.530312
+21
+10.1453
+31
+70.4874
+12
+8.19267e-006
+22
+10.2874
+32
+70.4874
+13
+8.19267e-006
+23
+10.2874
+33
+70.4874
+0
+3DFACE
+8
+m_rifle
+10
+8.23903e-006
+20
+9.22681
+30
+70.4874
+11
+0.918522
+21
+9.75712
+31
+70.4874
+12
+0.530312
+22
+10.1453
+32
+70.4874
+13
+0.530312
+23
+10.1453
+33
+70.4874
+0
+3DFACE
+8
+m_rifle
+10
+8.23903e-006
+20
+9.22681
+30
+70.4874
+11
+1.06062
+21
+9.22681
+31
+70.4874
+12
+0.918522
+22
+9.75712
+32
+70.4874
+13
+0.918522
+23
+9.75712
+33
+70.4874
+0
+3DFACE
+8
+m_rifle
+10
+0.91852
+20
+8.6965
+30
+68.3925
+11
+1.06061
+21
+9.22681
+31
+68.3925
+12
+1.06062
+22
+9.22681
+32
+70.4874
+13
+1.06062
+23
+9.22681
+33
+70.4874
+0
+3DFACE
+8
+m_rifle
+10
+0.91852
+20
+8.6965
+30
+68.3925
+11
+1.06062
+21
+9.22681
+31
+70.4874
+12
+0.918522
+22
+8.69651
+32
+70.4874
+13
+0.918522
+23
+8.69651
+33
+70.4874
+0
+3DFACE
+8
+m_rifle
+10
+0.530311
+20
+8.3083
+30
+68.3925
+11
+0.91852
+21
+8.6965
+31
+68.3925
+12
+0.918522
+22
+8.69651
+32
+70.4874
+13
+0.918522
+23
+8.69651
+33
+70.4874
+0
+3DFACE
+8
+m_rifle
+10
+0.530311
+20
+8.3083
+30
+68.3925
+11
+0.918522
+21
+8.69651
+31
+70.4874
+12
+0.530312
+22
+8.3083
+32
+70.4874
+13
+0.530312
+23
+8.3083
+33
+70.4874
+0
+3DFACE
+8
+m_rifle
+10
+6.81821e-006
+20
+8.1662
+30
+68.3925
+11
+0.530311
+21
+8.3083
+31
+68.3925
+12
+0.530312
+22
+8.3083
+32
+70.4874
+13
+0.530312
+23
+8.3083
+33
+70.4874
+0
+3DFACE
+8
+m_rifle
+10
+6.81821e-006
+20
+8.1662
+30
+68.3925
+11
+0.530312
+21
+8.3083
+31
+70.4874
+12
+8.37811e-006
+22
+8.16621
+32
+70.4874
+13
+8.37811e-006
+23
+8.16621
+33
+70.4874
+0
+3DFACE
+8
+m_rifle
+10
+-0.530297
+20
+8.3083
+30
+68.3925
+11
+6.81821e-006
+21
+8.1662
+31
+68.3925
+12
+8.37811e-006
+22
+8.16621
+32
+70.4874
+13
+8.37811e-006
+23
+8.16621
+33
+70.4874
+0
+3DFACE
+8
+m_rifle
+10
+-0.530297
+20
+8.3083
+30
+68.3925
+11
+8.37811e-006
+21
+8.16621
+31
+70.4874
+12
+-0.530296
+22
+8.3083
+32
+70.4874
+13
+-0.530296
+23
+8.3083
+33
+70.4874
+0
+3DFACE
+8
+m_rifle
+10
+-0.918507
+20
+8.6965
+30
+68.3925
+11
+-0.530297
+21
+8.3083
+31
+68.3925
+12
+-0.530296
+22
+8.3083
+32
+70.4874
+13
+-0.530296
+23
+8.3083
+33
+70.4874
+0
+3DFACE
+8
+m_rifle
+10
+-0.918507
+20
+8.6965
+30
+68.3925
+11
+-0.530296
+21
+8.3083
+31
+70.4874
+12
+-0.918505
+22
+8.69651
+32
+70.4874
+13
+-0.918505
+23
+8.69651
+33
+70.4874
+0
+3DFACE
+8
+m_rifle
+10
+-1.0606
+20
+9.22681
+30
+68.3925
+11
+-0.918507
+21
+8.6965
+31
+68.3925
+12
+-0.918505
+22
+8.69651
+32
+70.4874
+13
+-0.918505
+23
+8.69651
+33
+70.4874
+0
+3DFACE
+8
+m_rifle
+10
+-1.0606
+20
+9.22681
+30
+68.3925
+11
+-0.918505
+21
+8.69651
+31
+70.4874
+12
+-1.0606
+22
+9.22681
+32
+70.4874
+13
+-1.0606
+23
+9.22681
+33
+70.4874
+0
+3DFACE
+8
+m_rifle
+10
+-0.918507
+20
+9.75711
+30
+68.3925
+11
+-1.0606
+21
+9.22681
+31
+68.3925
+12
+-1.0606
+22
+9.22681
+32
+70.4874
+13
+-1.0606
+23
+9.22681
+33
+70.4874
+0
+3DFACE
+8
+m_rifle
+10
+-0.918507
+20
+9.75711
+30
+68.3925
+11
+-1.0606
+21
+9.22681
+31
+70.4874
+12
+-0.918505
+22
+9.75712
+32
+70.4874
+13
+-0.918505
+23
+9.75712
+33
+70.4874
+0
+3DFACE
+8
+m_rifle
+10
+-0.530297
+20
+10.1453
+30
+68.3925
+11
+-0.918507
+21
+9.75711
+31
+68.3925
+12
+-0.918505
+22
+9.75712
+32
+70.4874
+13
+-0.918505
+23
+9.75712
+33
+70.4874
+0
+3DFACE
+8
+m_rifle
+10
+-0.530297
+20
+10.1453
+30
+68.3925
+11
+-0.918505
+21
+9.75712
+31
+70.4874
+12
+-0.530296
+22
+10.1453
+32
+70.4874
+13
+-0.530296
+23
+10.1453
+33
+70.4874
+0
+3DFACE
+8
+m_rifle
+10
+6.63276e-006
+20
+10.2874
+30
+68.3925
+11
+-0.530297
+21
+10.1453
+31
+68.3925
+12
+-0.530296
+22
+10.1453
+32
+70.4874
+13
+-0.530296
+23
+10.1453
+33
+70.4874
+0
+3DFACE
+8
+m_rifle
+10
+6.63276e-006
+20
+10.2874
+30
+68.3925
+11
+-0.530296
+21
+10.1453
+31
+70.4874
+12
+8.19267e-006
+22
+10.2874
+32
+70.4874
+13
+8.19267e-006
+23
+10.2874
+33
+70.4874
+0
+3DFACE
+8
+m_rifle
+10
+0.530311
+20
+10.1453
+30
+68.3925
+11
+6.63276e-006
+21
+10.2874
+31
+68.3925
+12
+8.19267e-006
+22
+10.2874
+32
+70.4874
+13
+8.19267e-006
+23
+10.2874
+33
+70.4874
+0
+3DFACE
+8
+m_rifle
+10
+0.530311
+20
+10.1453
+30
+68.3925
+11
+8.19267e-006
+21
+10.2874
+31
+70.4874
+12
+0.530312
+22
+10.1453
+32
+70.4874
+13
+0.530312
+23
+10.1453
+33
+70.4874
+0
+3DFACE
+8
+m_rifle
+10
+0.91852
+20
+9.75711
+30
+68.3925
+11
+0.530311
+21
+10.1453
+31
+68.3925
+12
+0.530312
+22
+10.1453
+32
+70.4874
+13
+0.530312
+23
+10.1453
+33
+70.4874
+0
+3DFACE
+8
+m_rifle
+10
+0.91852
+20
+9.75711
+30
+68.3925
+11
+0.530312
+21
+10.1453
+31
+70.4874
+12
+0.918522
+22
+9.75712
+32
+70.4874
+13
+0.918522
+23
+9.75712
+33
+70.4874
+0
+3DFACE
+8
+m_rifle
+10
+1.06061
+20
+9.22681
+30
+68.3925
+11
+0.91852
+21
+9.75711
+31
+68.3925
+12
+0.918522
+22
+9.75712
+32
+70.4874
+13
+0.918522
+23
+9.75712
+33
+70.4874
+0
+3DFACE
+8
+m_rifle
+10
+1.06061
+20
+9.22681
+30
+68.3925
+11
+0.918522
+21
+9.75712
+31
+70.4874
+12
+1.06062
+22
+9.22681
+32
+70.4874
+13
+1.06062
+23
+9.22681
+33
+70.4874
+0
+3DFACE
+8
+m_rifle
+10
+-0.917963
+20
+6.86522
+30
+68.292
+11
+-1.42225
+21
+4.82977
+31
+47.7805
+12
+-1.74656
+22
+2.8348
+32
+70.5252
+13
+-1.74656
+23
+2.8348
+33
+70.5252
+0
+3DFACE
+8
+m_rifle
+10
+-0.917963
+20
+6.86522
+30
+68.292
+11
+-1.42225
+21
+4.82977
+31
+44.6132
+12
+-1.42225
+22
+4.82977
+32
+47.7805
+13
+-1.42225
+23
+4.82977
+33
+47.7805
+0
+3DFACE
+8
+m_rifle
+10
+-0.917963
+20
+6.86522
+30
+68.292
+11
+-0.917963
+21
+6.86522
+31
+43.3133
+12
+-1.42225
+22
+4.82977
+32
+44.6132
+13
+-1.42225
+23
+4.82977
+33
+44.6132
+0
+3DFACE
+8
+m_rifle
+10
+-1.42225
+20
+4.82977
+30
+47.7805
+11
+-1.74656
+21
+2.83479
+31
+50.7398
+12
+-1.74656
+22
+2.8348
+32
+70.5252
+13
+-1.74656
+23
+2.8348
+33
+70.5252
+0
+3DFACE
+8
+m_rifle
+10
+0.917979
+20
+6.86522
+30
+68.292
+11
+1.74657
+21
+2.8348
+31
+70.5252
+12
+1.42226
+22
+4.82977
+32
+47.7805
+13
+1.42226
+23
+4.82977
+33
+47.7805
+0
+3DFACE
+8
+m_rifle
+10
+0.917979
+20
+6.86522
+30
+68.292
+11
+1.42226
+21
+4.82977
+31
+47.7805
+12
+1.42226
+22
+4.82977
+32
+44.6132
+13
+1.42226
+23
+4.82977
+33
+44.6132
+0
+3DFACE
+8
+m_rifle
+10
+0.917979
+20
+6.86522
+30
+68.292
+11
+1.42226
+21
+4.82977
+31
+44.6132
+12
+0.91798
+22
+6.86522
+32
+43.3133
+13
+0.91798
+23
+6.86522
+33
+43.3133
+0
+3DFACE
+8
+m_rifle
+10
+1.42226
+20
+4.82977
+30
+47.7805
+11
+1.74657
+21
+2.8348
+31
+70.5252
+12
+1.74657
+22
+2.83479
+32
+50.7398
+13
+1.74657
+23
+2.83479
+33
+50.7398
+0
+3DFACE
+8
+m_rifle
+10
+1.74657
+20
+2.8348
+30
+70.5252
+11
+-0.917963
+21
+6.86522
+31
+68.292
+12
+-1.74656
+22
+2.8348
+32
+70.5252
+13
+-1.74656
+23
+2.8348
+33
+70.5252
+0
+3DFACE
+8
+m_rifle
+10
+1.74657
+20
+2.8348
+30
+70.5252
+11
+0.917979
+21
+6.86522
+31
+68.292
+12
+-0.917963
+22
+6.86522
+32
+68.292
+13
+-0.917963
+23
+6.86522
+33
+68.292
+0
+3DFACE
+8
+m_rifle
+10
+1.42226
+20
+4.82977
+30
+47.7805
+11
+-1.74656
+21
+2.83479
+31
+50.7398
+12
+-1.42225
+22
+4.82977
+32
+47.7805
+13
+-1.42225
+23
+4.82977
+33
+47.7805
+0
+3DFACE
+8
+m_rifle
+10
+1.42226
+20
+4.82977
+30
+47.7805
+11
+1.74657
+21
+2.83479
+31
+50.7398
+12
+-1.74656
+22
+2.83479
+32
+50.7398
+13
+-1.74656
+23
+2.83479
+33
+50.7398
+0
+3DFACE
+8
+m_rifle
+10
+1.42226
+20
+4.82977
+30
+44.6132
+11
+-1.42225
+21
+4.82977
+31
+47.7805
+12
+-1.42225
+22
+4.82977
+32
+44.6132
+13
+-1.42225
+23
+4.82977
+33
+44.6132
+0
+3DFACE
+8
+m_rifle
+10
+1.42226
+20
+4.82977
+30
+44.6132
+11
+1.42226
+21
+4.82977
+31
+47.7805
+12
+-1.42225
+22
+4.82977
+32
+47.7805
+13
+-1.42225
+23
+4.82977
+33
+47.7805
+0
+3DFACE
+8
+m_rifle
+10
+-1.38024
+20
+1.7077
+30
+38.2301
+11
+-2.51205
+21
+5.04374
+31
+36.5061
+12
+2.51207
+22
+5.04374
+32
+36.5061
+13
+2.51207
+23
+5.04374
+33
+36.5061
+0
+3DFACE
+8
+m_rifle
+10
+2.51207
+20
+5.04374
+30
+36.5061
+11
+1.38026
+21
+1.7077
+31
+38.2301
+12
+-1.38024
+22
+1.7077
+32
+38.2301
+13
+-1.38024
+23
+1.7077
+33
+38.2301
+0
+3DFACE
+8
+m_rifle
+10
+-2.51205
+20
+5.04374
+30
+44.1594
+11
+-1.38024
+21
+1.7077
+31
+42.4353
+12
+1.38026
+22
+1.7077
+32
+42.4353
+13
+1.38026
+23
+1.7077
+33
+42.4353
+0
+3DFACE
+8
+m_rifle
+10
+1.38026
+20
+1.7077
+30
+42.4353
+11
+2.51207
+21
+5.04374
+31
+44.1594
+12
+-2.51205
+22
+5.04374
+32
+44.1594
+13
+-2.51205
+23
+5.04374
+33
+44.1594
+0
+3DFACE
+8
+m_rifle
+10
+-2.51205
+20
+5.04374
+30
+44.1594
+11
+-2.51205
+21
+5.04374
+31
+36.5061
+12
+-1.38024
+22
+1.7077
+32
+38.2301
+13
+-1.38024
+23
+1.7077
+33
+38.2301
+0
+3DFACE
+8
+m_rifle
+10
+-1.38024
+20
+1.7077
+30
+38.2301
+11
+-1.38024
+21
+1.7077
+31
+42.4353
+12
+-2.51205
+22
+5.04374
+32
+44.1594
+13
+-2.51205
+23
+5.04374
+33
+44.1594
+0
+3DFACE
+8
+m_rifle
+10
+2.51207
+20
+5.04374
+30
+44.1594
+11
+1.38026
+21
+1.7077
+31
+42.4353
+12
+1.38026
+22
+1.7077
+32
+38.2301
+13
+1.38026
+23
+1.7077
+33
+38.2301
+0
+3DFACE
+8
+m_rifle
+10
+1.38026
+20
+1.7077
+30
+38.2301
+11
+2.51207
+21
+5.04374
+31
+36.5061
+12
+2.51207
+22
+5.04374
+32
+44.1594
+13
+2.51207
+23
+5.04374
+33
+44.1594
+0
+3DFACE
+8
+m_rifle
+10
+0.298516
+20
+10.8934
+30
+-44.9717
+11
+0.298515
+21
+10.8934
+31
+-33.9555
+12
+0.298515
+22
+11.2735
+32
+-33.9365
+13
+0.298515
+23
+11.2735
+33
+-33.9365
+0
+3DFACE
+8
+m_rifle
+10
+0.298515
+20
+11.2735
+30
+-33.9365
+11
+0.298516
+21
+11.2735
+31
+-44.979
+12
+0.298516
+22
+10.8934
+32
+-44.9717
+13
+0.298516
+23
+10.8934
+33
+-44.9717
+0
+3DFACE
+8
+m_rifle
+10
+-0.298499
+20
+11.2735
+30
+-44.979
+11
+-0.2985
+21
+11.2735
+31
+-33.9365
+12
+-0.2985
+22
+10.8934
+32
+-33.9555
+13
+-0.2985
+23
+10.8934
+33
+-33.9555
+0
+3DFACE
+8
+m_rifle
+10
+-0.2985
+20
+10.8934
+30
+-33.9555
+11
+-0.298499
+21
+10.8934
+31
+-44.9717
+12
+-0.298499
+22
+11.2735
+32
+-44.979
+13
+-0.298499
+23
+11.2735
+33
+-44.979
+0
+3DFACE
+8
+m_rifle
+10
+-0.298499
+20
+10.8934
+30
+-44.9717
+11
+-0.2985
+21
+10.8934
+31
+-33.9555
+12
+0.298515
+22
+10.8934
+32
+-33.9555
+13
+0.298515
+23
+10.8934
+33
+-33.9555
+0
+3DFACE
+8
+m_rifle
+10
+0.298515
+20
+10.8934
+30
+-33.9555
+11
+0.298516
+21
+10.8934
+31
+-44.9717
+12
+-0.298499
+22
+10.8934
+32
+-44.9717
+13
+-0.298499
+23
+10.8934
+33
+-44.9717
+0
+3DFACE
+8
+m_rifle
+10
+-0.298499
+20
+11.2735
+30
+-44.979
+11
+-1.26865
+21
+11.2735
+31
+-44.4429
+12
+-0.2985
+22
+11.2735
+32
+-33.9365
+13
+-0.2985
+23
+11.2735
+33
+-33.9365
+0
+3DFACE
+8
+m_rifle
+10
+-1.26865
+20
+11.2735
+30
+-44.4429
+11
+-1.26865
+21
+11.2735
+31
+-33.9365
+12
+-0.2985
+22
+11.2735
+32
+-33.9365
+13
+-0.2985
+23
+11.2735
+33
+-33.9365
+0
+3DFACE
+8
+m_rifle
+10
+-0.298499
+20
+11.2735
+30
+-44.979
+11
+-0.732529
+21
+11.2735
+31
+-44.979
+12
+-1.26865
+22
+11.2735
+32
+-44.4429
+13
+-1.26865
+23
+11.2735
+33
+-44.4429
+0
+3DFACE
+8
+m_rifle
+10
+-0.298499
+20
+10.8934
+30
+-44.9717
+11
+-0.732529
+21
+11.2735
+31
+-44.979
+12
+-0.298499
+22
+11.2735
+32
+-44.979
+13
+-0.298499
+23
+11.2735
+33
+-44.979
+0
+3DFACE
+8
+m_rifle
+10
+-0.298499
+20
+10.8934
+30
+-44.9717
+11
+-1.10061
+21
+-7.86677
+31
+-44.6109
+12
+-0.732529
+22
+11.2735
+32
+-44.979
+13
+-0.732529
+23
+11.2735
+33
+-44.979
+0
+3DFACE
+8
+m_rifle
+10
+-0.298499
+20
+10.8934
+30
+-44.9717
+11
+1.10056
+21
+-7.86677
+31
+-44.6109
+12
+-1.10061
+22
+-7.86677
+32
+-44.6109
+13
+-1.10061
+23
+-7.86677
+33
+-44.6109
+0
+3DFACE
+8
+m_rifle
+10
+-0.298499
+20
+10.8934
+30
+-44.9717
+11
+0.298516
+21
+10.8934
+31
+-44.9717
+12
+1.10056
+22
+-7.86677
+32
+-44.6109
+13
+1.10056
+23
+-7.86677
+33
+-44.6109
+0
+3DFACE
+8
+m_rifle
+10
+0.298516
+20
+10.8934
+30
+-44.9717
+11
+0.732482
+21
+11.2735
+31
+-44.979
+12
+1.10056
+22
+-7.86677
+32
+-44.6109
+13
+1.10056
+23
+-7.86677
+33
+-44.6109
+0
+3DFACE
+8
+m_rifle
+10
+0.298516
+20
+10.8934
+30
+-44.9717
+11
+0.298516
+21
+11.2735
+31
+-44.979
+12
+0.732482
+22
+11.2735
+32
+-44.979
+13
+0.732482
+23
+11.2735
+33
+-44.979
+0
+3DFACE
+8
+m_rifle
+10
+1.10056
+20
+-7.86677
+30
+-44.6109
+11
+1.26866
+21
+5.75083
+31
+-44.4428
+12
+1.26867
+22
+-7.84575
+32
+-44.4428
+13
+1.26867
+23
+-7.84575
+33
+-44.4428
+0
+3DFACE
+8
+m_rifle
+10
+1.10056
+20
+-7.86677
+30
+-44.6109
+11
+1.26866
+21
+10.4692
+31
+-44.4428
+12
+1.26866
+22
+5.75083
+32
+-44.4428
+13
+1.26866
+23
+5.75083
+33
+-44.4428
+0
+3DFACE
+8
+m_rifle
+10
+1.10056
+20
+-7.86677
+30
+-44.6109
+11
+1.26866
+21
+11.0298
+31
+-44.4428
+12
+1.26866
+22
+10.4692
+32
+-44.4428
+13
+1.26866
+23
+10.4692
+33
+-44.4428
+0
+3DFACE
+8
+m_rifle
+10
+1.10056
+20
+-7.86677
+30
+-44.6109
+11
+1.26866
+21
+11.2735
+31
+-44.4428
+12
+1.26866
+22
+11.0298
+32
+-44.4428
+13
+1.26866
+23
+11.0298
+33
+-44.4428
+0
+3DFACE
+8
+m_rifle
+10
+1.10056
+20
+-7.86677
+30
+-44.6109
+11
+0.732482
+21
+11.2735
+31
+-44.979
+12
+1.26866
+22
+11.2735
+32
+-44.4428
+13
+1.26866
+23
+11.2735
+33
+-44.4428
+0
+3DFACE
+8
+m_rifle
+10
+1.26866
+20
+5.75083
+30
+-44.4428
+11
+1.26867
+21
+-7.68272
+31
+-43.1386
+12
+1.26867
+22
+-7.84575
+32
+-44.4428
+13
+1.26867
+23
+-7.84575
+33
+-44.4428
+0
+3DFACE
+8
+m_rifle
+10
+-0.732529
+20
+11.2735
+30
+-44.979
+11
+-1.26865
+21
+11.0298
+31
+-44.4429
+12
+-1.26865
+22
+11.2735
+32
+-44.4429
+13
+-1.26865
+23
+11.2735
+33
+-44.4429
+0
+3DFACE
+8
+m_rifle
+10
+-0.732529
+20
+11.2735
+30
+-44.979
+11
+-1.26865
+21
+10.4693
+31
+-44.4429
+12
+-1.26865
+22
+11.0298
+32
+-44.4429
+13
+-1.26865
+23
+11.0298
+33
+-44.4429
+0
+3DFACE
+8
+m_rifle
+10
+-0.732529
+20
+11.2735
+30
+-44.979
+11
+-1.26865
+21
+5.75148
+31
+-44.4429
+12
+-1.26865
+22
+10.4693
+32
+-44.4429
+13
+-1.26865
+23
+10.4693
+33
+-44.4429
+0
+3DFACE
+8
+m_rifle
+10
+-0.732529
+20
+11.2735
+30
+-44.979
+11
+-1.26865
+21
+-7.84576
+31
+-44.4429
+12
+-1.26865
+22
+5.75148
+32
+-44.4429
+13
+-1.26865
+23
+5.75148
+33
+-44.4429
+0
+3DFACE
+8
+m_rifle
+10
+-0.732529
+20
+11.2735
+30
+-44.979
+11
+-1.10061
+21
+-7.86677
+31
+-44.6109
+12
+-1.26865
+22
+-7.84576
+32
+-44.4429
+13
+-1.26865
+23
+-7.84576
+33
+-44.4429
+0
+3DFACE
+8
+m_rifle
+10
+-1.26865
+20
+-7.84576
+30
+-44.4429
+11
+-1.26865
+21
+-7.68272
+31
+-43.1386
+12
+-1.26865
+22
+5.75148
+32
+-44.4429
+13
+-1.26865
+23
+5.75148
+33
+-44.4429
+0
+3DFACE
+8
+m_rifle
+10
+-1.26865
+20
+7.5927
+30
+-36.8812
+11
+-1.26865
+21
+11.2735
+31
+-44.4429
+12
+-1.26865
+22
+11.0298
+32
+-44.4429
+13
+-1.26865
+23
+11.0298
+33
+-44.4429
+0
+3DFACE
+8
+m_rifle
+10
+-1.26865
+20
+7.5927
+30
+-36.8812
+11
+-1.26865
+21
+11.2735
+31
+-33.9365
+12
+-1.26865
+22
+11.2735
+32
+-44.4429
+13
+-1.26865
+23
+11.2735
+33
+-44.4429
+0
+3DFACE
+8
+m_rifle
+10
+-1.26865
+20
+7.5927
+30
+-36.8812
+11
+-1.26865
+21
+7.5927
+31
+-34.1206
+12
+-1.26865
+22
+11.2735
+32
+-33.9365
+13
+-1.26865
+23
+11.2735
+33
+-33.9365
+0
+3DFACE
+8
+m_rifle
+10
+-1.26865
+20
+7.5927
+30
+-36.8812
+11
+-1.26865
+21
+4.64804
+31
+-40.562
+12
+-1.26865
+22
+4.83208
+32
+-37.2493
+13
+-1.26865
+23
+4.83208
+33
+-37.2493
+0
+3DFACE
+8
+m_rifle
+10
+-1.26865
+20
+7.5927
+30
+-36.8812
+11
+-1.26865
+21
+10.4693
+31
+-44.4429
+12
+-1.26865
+22
+4.64804
+32
+-40.562
+13
+-1.26865
+23
+4.64804
+33
+-40.562
+0
+3DFACE
+8
+m_rifle
+10
+-1.26865
+20
+7.5927
+30
+-36.8812
+11
+-1.26865
+21
+11.0298
+31
+-44.4429
+12
+-1.26865
+22
+10.4693
+32
+-44.4429
+13
+-1.26865
+23
+10.4693
+33
+-44.4429
+0
+3DFACE
+8
+m_rifle
+10
+-1.26865
+20
+5.75148
+30
+-44.4429
+11
+-1.26865
+21
+4.64804
+31
+-40.562
+12
+-1.26865
+22
+10.4693
+32
+-44.4429
+13
+-1.26865
+23
+10.4693
+33
+-44.4429
+0
+3DFACE
+8
+m_rifle
+10
+-1.26865
+20
+5.75148
+30
+-44.4429
+11
+-1.26865
+21
+-7.49868
+31
+-40.562
+12
+-1.26865
+22
+4.64804
+32
+-40.562
+13
+-1.26865
+23
+4.64804
+33
+-40.562
+0
+3DFACE
+8
+m_rifle
+10
+-1.26865
+20
+5.75148
+30
+-44.4429
+11
+-1.26865
+21
+-7.68272
+31
+-43.1386
+12
+-1.26865
+22
+-7.49868
+32
+-40.562
+13
+-1.26865
+23
+-7.49868
+33
+-40.562
+0
+3DFACE
+8
+m_rifle
+10
+1.26866
+20
+4.64804
+30
+-40.562
+11
+1.26867
+21
+-7.68272
+31
+-43.1386
+12
+1.26866
+22
+10.4692
+32
+-44.4428
+13
+1.26866
+23
+10.4692
+33
+-44.4428
+0
+3DFACE
+8
+m_rifle
+10
+1.26867
+20
+-7.68272
+30
+-43.1386
+11
+1.26866
+21
+5.75083
+31
+-44.4428
+12
+1.26866
+22
+10.4692
+32
+-44.4428
+13
+1.26866
+23
+10.4692
+33
+-44.4428
+0
+3DFACE
+8
+m_rifle
+10
+1.26866
+20
+4.64804
+30
+-40.562
+11
+1.26867
+21
+-7.49868
+31
+-40.562
+12
+1.26867
+22
+-7.68272
+32
+-43.1386
+13
+1.26867
+23
+-7.68272
+33
+-43.1386
+0
+3DFACE
+8
+m_rifle
+10
+1.26866
+20
+4.64804
+30
+-40.562
+11
+1.26866
+21
+7.5927
+31
+-36.8812
+12
+1.26866
+22
+4.83208
+32
+-37.2493
+13
+1.26866
+23
+4.83208
+33
+-37.2493
+0
+3DFACE
+8
+m_rifle
+10
+1.26866
+20
+4.64804
+30
+-40.562
+11
+1.26866
+21
+11.0298
+31
+-44.4428
+12
+1.26866
+22
+7.5927
+32
+-36.8812
+13
+1.26866
+23
+7.5927
+33
+-36.8812
+0
+3DFACE
+8
+m_rifle
+10
+1.26866
+20
+4.64804
+30
+-40.562
+11
+1.26866
+21
+10.4692
+31
+-44.4428
+12
+1.26866
+22
+11.0298
+32
+-44.4428
+13
+1.26866
+23
+11.0298
+33
+-44.4428
+0
+3DFACE
+8
+m_rifle
+10
+1.26866
+20
+7.5927
+30
+-36.8812
+11
+1.26866
+21
+11.2735
+31
+-33.9365
+12
+1.26866
+22
+7.5927
+32
+-34.1206
+13
+1.26866
+23
+7.5927
+33
+-34.1206
+0
+3DFACE
+8
+m_rifle
+10
+1.26866
+20
+7.5927
+30
+-36.8812
+11
+1.26866
+21
+11.2735
+31
+-44.4428
+12
+1.26866
+22
+11.2735
+32
+-33.9365
+13
+1.26866
+23
+11.2735
+33
+-33.9365
+0
+3DFACE
+8
+m_rifle
+10
+1.26866
+20
+7.5927
+30
+-36.8812
+11
+1.26866
+21
+11.0298
+31
+-44.4428
+12
+1.26866
+22
+11.2735
+32
+-44.4428
+13
+1.26866
+23
+11.2735
+33
+-44.4428
+0
+3DFACE
+8
+m_rifle
+10
+0.298515
+20
+11.2735
+30
+-33.9365
+11
+1.26866
+21
+11.2735
+31
+-33.9365
+12
+0.298516
+22
+11.2735
+32
+-44.979
+13
+0.298516
+23
+11.2735
+33
+-44.979
+0
+3DFACE
+8
+m_rifle
+10
+1.26866
+20
+11.2735
+30
+-33.9365
+11
+1.26866
+21
+11.2735
+31
+-44.4428
+12
+0.298516
+22
+11.2735
+32
+-44.979
+13
+0.298516
+23
+11.2735
+33
+-44.979
+0
+3DFACE
+8
+m_rifle
+10
+1.26866
+20
+11.2735
+30
+-44.4428
+11
+0.732482
+21
+11.2735
+31
+-44.979
+12
+0.298516
+22
+11.2735
+32
+-44.979
+13
+0.298516
+23
+11.2735
+33
+-44.979
+0
+3DFACE
+8
+m_rifle
+10
+1.26866
+20
+7.5927
+30
+-36.8812
+11
+1.26866
+21
+7.5927
+31
+-34.1206
+12
+-1.26865
+22
+7.5927
+32
+-34.1206
+13
+-1.26865
+23
+7.5927
+33
+-34.1206
+0
+3DFACE
+8
+m_rifle
+10
+-1.26865
+20
+7.5927
+30
+-34.1206
+11
+-1.26865
+21
+7.5927
+31
+-36.8812
+12
+1.26866
+22
+7.5927
+32
+-36.8812
+13
+1.26866
+23
+7.5927
+33
+-36.8812
+0
+3DFACE
+8
+m_rifle
+10
+1.26866
+20
+4.83208
+30
+-37.2493
+11
+1.26866
+21
+7.5927
+31
+-36.8812
+12
+-1.26865
+22
+7.5927
+32
+-36.8812
+13
+-1.26865
+23
+7.5927
+33
+-36.8812
+0
+3DFACE
+8
+m_rifle
+10
+-1.26865
+20
+7.5927
+30
+-36.8812
+11
+-1.26865
+21
+4.83208
+31
+-37.2493
+12
+1.26866
+22
+4.83208
+32
+-37.2493
+13
+1.26866
+23
+4.83208
+33
+-37.2493
+0
+3DFACE
+8
+m_rifle
+10
+1.26866
+20
+4.64804
+30
+-40.562
+11
+1.26866
+21
+4.83208
+31
+-37.2493
+12
+-1.26865
+22
+4.83208
+32
+-37.2493
+13
+-1.26865
+23
+4.83208
+33
+-37.2493
+0
+3DFACE
+8
+m_rifle
+10
+-1.26865
+20
+4.83208
+30
+-37.2493
+11
+-1.26865
+21
+4.64804
+31
+-40.562
+12
+1.26866
+22
+4.64804
+32
+-40.562
+13
+1.26866
+23
+4.64804
+33
+-40.562
+0
+3DFACE
+8
+m_rifle
+10
+1.26867
+20
+-7.49868
+30
+-40.562
+11
+1.26866
+21
+4.64804
+31
+-40.562
+12
+-1.26865
+22
+4.64804
+32
+-40.562
+13
+-1.26865
+23
+4.64804
+33
+-40.562
+0
+3DFACE
+8
+m_rifle
+10
+-1.26865
+20
+4.64804
+30
+-40.562
+11
+-1.26865
+21
+-7.49868
+31
+-40.562
+12
+1.26867
+22
+-7.49868
+32
+-40.562
+13
+1.26867
+23
+-7.49868
+33
+-40.562
+0
+3DFACE
+8
+m_rifle
+10
+1.26867
+20
+-7.68272
+30
+-43.1386
+11
+1.26867
+21
+-7.49868
+31
+-40.562
+12
+-1.26865
+22
+-7.49868
+32
+-40.562
+13
+-1.26865
+23
+-7.49868
+33
+-40.562
+0
+3DFACE
+8
+m_rifle
+10
+-1.26865
+20
+-7.49868
+30
+-40.562
+11
+-1.26865
+21
+-7.68272
+31
+-43.1386
+12
+1.26867
+22
+-7.68272
+32
+-43.1386
+13
+1.26867
+23
+-7.68272
+33
+-43.1386
+0
+3DFACE
+8
+m_rifle
+10
+1.10056
+20
+-7.86677
+30
+-44.6109
+11
+-1.26865
+21
+-7.84576
+31
+-44.4429
+12
+-1.10061
+22
+-7.86677
+32
+-44.6109
+13
+-1.10061
+23
+-7.86677
+33
+-44.6109
+0
+3DFACE
+8
+m_rifle
+10
+1.10056
+20
+-7.86677
+30
+-44.6109
+11
+1.26867
+21
+-7.68272
+31
+-43.1386
+12
+-1.26865
+22
+-7.84576
+32
+-44.4429
+13
+-1.26865
+23
+-7.84576
+33
+-44.4429
+0
+3DFACE
+8
+m_rifle
+10
+1.26867
+20
+-7.68272
+30
+-43.1386
+11
+-1.26865
+21
+-7.68272
+31
+-43.1386
+12
+-1.26865
+22
+-7.84576
+32
+-44.4429
+13
+-1.26865
+23
+-7.84576
+33
+-44.4429
+0
+3DFACE
+8
+m_rifle
+10
+1.10056
+20
+-7.86677
+30
+-44.6109
+11
+1.26867
+21
+-7.84575
+31
+-44.4428
+12
+1.26867
+22
+-7.68272
+32
+-43.1386
+13
+1.26867
+23
+-7.68272
+33
+-43.1386
+0
+3DFACE
+8
+m_rifle
+10
+5.66656e-006
+20
+0.931545
+30
+21.3038
+11
+-2.50242
+21
+-0.513231
+31
+21.3038
+12
+-2.88955
+22
+0.931545
+32
+21.3038
+13
+-2.88955
+23
+0.931545
+33
+21.3038
+0
+3DFACE
+8
+m_rifle
+10
+5.66656e-006
+20
+0.931545
+30
+21.3038
+11
+-1.44477
+21
+-1.57088
+31
+21.3038
+12
+-2.50242
+22
+-0.513231
+32
+21.3038
+13
+-2.50242
+23
+-0.513231
+33
+21.3038
+0
+3DFACE
+8
+m_rifle
+10
+5.66656e-006
+20
+0.931545
+30
+21.3038
+11
+5.28765e-006
+21
+-1.95801
+31
+21.3039
+12
+-1.44477
+22
+-1.57088
+32
+21.3038
+13
+-1.44477
+23
+-1.57088
+33
+21.3038
+0
+3DFACE
+8
+m_rifle
+10
+5.66656e-006
+20
+0.931545
+30
+21.3038
+11
+1.44478
+21
+-1.57088
+31
+21.3039
+12
+5.28765e-006
+22
+-1.95801
+32
+21.3039
+13
+5.28765e-006
+23
+-1.95801
+33
+21.3039
+0
+3DFACE
+8
+m_rifle
+10
+5.66656e-006
+20
+0.931545
+30
+21.3038
+11
+2.50243
+21
+-0.513232
+31
+21.3038
+12
+1.44478
+22
+-1.57088
+32
+21.3039
+13
+1.44478
+23
+-1.57088
+33
+21.3039
+0
+3DFACE
+8
+m_rifle
+10
+5.66656e-006
+20
+0.931545
+30
+21.3038
+11
+2.88956
+21
+0.931544
+31
+21.3038
+12
+2.50243
+22
+-0.513232
+32
+21.3038
+13
+2.50243
+23
+-0.513232
+33
+21.3038
+0
+3DFACE
+8
+m_rifle
+10
+5.66656e-006
+20
+0.931545
+30
+21.3038
+11
+2.50243
+21
+2.37632
+31
+21.3038
+12
+2.88956
+22
+0.931544
+32
+21.3038
+13
+2.88956
+23
+0.931544
+33
+21.3038
+0
+3DFACE
+8
+m_rifle
+10
+5.66656e-006
+20
+0.931545
+30
+21.3038
+11
+1.44478
+21
+3.43397
+31
+21.3038
+12
+2.50243
+22
+2.37632
+32
+21.3038
+13
+2.50243
+23
+2.37632
+33
+21.3038
+0
+3DFACE
+8
+m_rifle
+10
+5.66656e-006
+20
+0.931545
+30
+21.3038
+11
+5.79287e-006
+21
+3.8211
+31
+21.3038
+12
+1.44478
+22
+3.43397
+32
+21.3038
+13
+1.44478
+23
+3.43397
+33
+21.3038
+0
+3DFACE
+8
+m_rifle
+10
+5.66656e-006
+20
+0.931545
+30
+21.3038
+11
+-1.44477
+21
+3.43397
+31
+21.3038
+12
+5.79287e-006
+22
+3.8211
+32
+21.3038
+13
+5.79287e-006
+23
+3.8211
+33
+21.3038
+0
+3DFACE
+8
+m_rifle
+10
+5.66656e-006
+20
+0.931545
+30
+21.3038
+11
+-2.50242
+21
+2.37632
+31
+21.3038
+12
+-1.44477
+22
+3.43397
+32
+21.3038
+13
+-1.44477
+23
+3.43397
+33
+21.3038
+0
+3DFACE
+8
+m_rifle
+10
+5.66656e-006
+20
+0.931545
+30
+21.3038
+11
+-2.88955
+21
+0.931545
+31
+21.3038
+12
+-2.50242
+22
+2.37632
+32
+21.3038
+13
+-2.50242
+23
+2.37632
+33
+21.3038
+0
+3DFACE
+8
+m_rifle
+10
+-2.50241
+20
+-0.51324
+30
+46.3113
+11
+-2.88954
+21
+0.931535
+31
+46.3113
+12
+-2.88955
+22
+0.931545
+32
+21.3038
+13
+-2.88955
+23
+0.931545
+33
+21.3038
+0
+3DFACE
+8
+m_rifle
+10
+-2.50241
+20
+-0.51324
+30
+46.3113
+11
+-2.88955
+21
+0.931545
+31
+21.3038
+12
+-2.50242
+22
+-0.513231
+32
+21.3038
+13
+-2.50242
+23
+-0.513231
+33
+21.3038
+0
+3DFACE
+8
+m_rifle
+10
+-1.44476
+20
+-1.57089
+30
+46.3113
+11
+-2.50241
+21
+-0.51324
+31
+46.3113
+12
+-2.50242
+22
+-0.513231
+32
+21.3038
+13
+-2.50242
+23
+-0.513231
+33
+21.3038
+0
+3DFACE
+8
+m_rifle
+10
+-1.44476
+20
+-1.57089
+30
+46.3113
+11
+-2.50242
+21
+-0.513231
+31
+21.3038
+12
+-1.44477
+22
+-1.57088
+32
+21.3038
+13
+-1.44477
+23
+-1.57088
+33
+21.3038
+0
+3DFACE
+8
+m_rifle
+10
+1.24699e-005
+20
+-1.95802
+30
+46.3113
+11
+-1.44476
+21
+-1.57089
+31
+46.3113
+12
+-1.44477
+22
+-1.57088
+32
+21.3038
+13
+-1.44477
+23
+-1.57088
+33
+21.3038
+0
+3DFACE
+8
+m_rifle
+10
+1.24699e-005
+20
+-1.95802
+30
+46.3113
+11
+-1.44477
+21
+-1.57088
+31
+21.3038
+12
+5.28765e-006
+22
+-1.95801
+32
+21.3039
+13
+5.28765e-006
+23
+-1.95801
+33
+21.3039
+0
+3DFACE
+8
+m_rifle
+10
+1.44479
+20
+-1.57089
+30
+46.3113
+11
+1.24699e-005
+21
+-1.95802
+31
+46.3113
+12
+5.28765e-006
+22
+-1.95801
+32
+21.3039
+13
+5.28765e-006
+23
+-1.95801
+33
+21.3039
+0
+3DFACE
+8
+m_rifle
+10
+1.44479
+20
+-1.57089
+30
+46.3113
+11
+5.28765e-006
+21
+-1.95801
+31
+21.3039
+12
+1.44478
+22
+-1.57088
+32
+21.3039
+13
+1.44478
+23
+-1.57088
+33
+21.3039
+0
+3DFACE
+8
+m_rifle
+10
+2.50244
+20
+-0.513241
+30
+46.3113
+11
+1.44479
+21
+-1.57089
+31
+46.3113
+12
+1.44478
+22
+-1.57088
+32
+21.3039
+13
+1.44478
+23
+-1.57088
+33
+21.3039
+0
+3DFACE
+8
+m_rifle
+10
+2.50244
+20
+-0.513241
+30
+46.3113
+11
+1.44478
+21
+-1.57088
+31
+21.3039
+12
+2.50243
+22
+-0.513232
+32
+21.3038
+13
+2.50243
+23
+-0.513232
+33
+21.3038
+0
+3DFACE
+8
+m_rifle
+10
+2.88956
+20
+0.931535
+30
+46.3113
+11
+2.50244
+21
+-0.513241
+31
+46.3113
+12
+2.50243
+22
+-0.513232
+32
+21.3038
+13
+2.50243
+23
+-0.513232
+33
+21.3038
+0
+3DFACE
+8
+m_rifle
+10
+2.88956
+20
+0.931535
+30
+46.3113
+11
+2.50243
+21
+-0.513232
+31
+21.3038
+12
+2.88956
+22
+0.931544
+32
+21.3038
+13
+2.88956
+23
+0.931544
+33
+21.3038
+0
+3DFACE
+8
+m_rifle
+10
+2.50244
+20
+2.37631
+30
+46.3113
+11
+2.88956
+21
+0.931535
+31
+46.3113
+12
+2.88956
+22
+0.931544
+32
+21.3038
+13
+2.88956
+23
+0.931544
+33
+21.3038
+0
+3DFACE
+8
+m_rifle
+10
+2.50244
+20
+2.37631
+30
+46.3113
+11
+2.88956
+21
+0.931544
+31
+21.3038
+12
+2.50243
+22
+2.37632
+32
+21.3038
+13
+2.50243
+23
+2.37632
+33
+21.3038
+0
+3DFACE
+8
+m_rifle
+10
+1.44479
+20
+3.43396
+30
+46.3113
+11
+2.50244
+21
+2.37631
+31
+46.3113
+12
+2.50243
+22
+2.37632
+32
+21.3038
+13
+2.50243
+23
+2.37632
+33
+21.3038
+0
+3DFACE
+8
+m_rifle
+10
+1.44479
+20
+3.43396
+30
+46.3113
+11
+2.50243
+21
+2.37632
+31
+21.3038
+12
+1.44478
+22
+3.43397
+32
+21.3038
+13
+1.44478
+23
+3.43397
+33
+21.3038
+0
+3DFACE
+8
+m_rifle
+10
+1.29751e-005
+20
+3.82109
+30
+46.3113
+11
+1.44479
+21
+3.43396
+31
+46.3113
+12
+1.44478
+22
+3.43397
+32
+21.3038
+13
+1.44478
+23
+3.43397
+33
+21.3038
+0
+3DFACE
+8
+m_rifle
+10
+1.29751e-005
+20
+3.82109
+30
+46.3113
+11
+1.44478
+21
+3.43397
+31
+21.3038
+12
+5.79287e-006
+22
+3.8211
+32
+21.3038
+13
+5.79287e-006
+23
+3.8211
+33
+21.3038
+0
+3DFACE
+8
+m_rifle
+10
+-1.44476
+20
+3.43396
+30
+46.3113
+11
+1.29751e-005
+21
+3.82109
+31
+46.3113
+12
+5.79287e-006
+22
+3.8211
+32
+21.3038
+13
+5.79287e-006
+23
+3.8211
+33
+21.3038
+0
+3DFACE
+8
+m_rifle
+10
+-1.44476
+20
+3.43396
+30
+46.3113
+11
+5.79287e-006
+21
+3.8211
+31
+21.3038
+12
+-1.44477
+22
+3.43397
+32
+21.3038
+13
+-1.44477
+23
+3.43397
+33
+21.3038
+0
+3DFACE
+8
+m_rifle
+10
+-2.50241
+20
+2.37631
+30
+46.3113
+11
+-1.44476
+21
+3.43396
+31
+46.3113
+12
+-1.44477
+22
+3.43397
+32
+21.3038
+13
+-1.44477
+23
+3.43397
+33
+21.3038
+0
+3DFACE
+8
+m_rifle
+10
+-2.50241
+20
+2.37631
+30
+46.3113
+11
+-1.44477
+21
+3.43397
+31
+21.3038
+12
+-2.50242
+22
+2.37632
+32
+21.3038
+13
+-2.50242
+23
+2.37632
+33
+21.3038
+0
+3DFACE
+8
+m_rifle
+10
+-2.88954
+20
+0.931535
+30
+46.3113
+11
+-2.50241
+21
+2.37631
+31
+46.3113
+12
+-2.50242
+22
+2.37632
+32
+21.3038
+13
+-2.50242
+23
+2.37632
+33
+21.3038
+0
+3DFACE
+8
+m_rifle
+10
+-2.88954
+20
+0.931535
+30
+46.3113
+11
+-2.50242
+21
+2.37632
+31
+21.3038
+12
+-2.88955
+22
+0.931545
+32
+21.3038
+13
+-2.88955
+23
+0.931545
+33
+21.3038
+0
+3DFACE
+8
+m_rifle
+10
+9.37788e-006
+20
+8.08618
+30
+68.5954
+11
+2.06813
+21
+6.84204
+31
+68.5954
+12
+2.38807
+22
+8.08618
+32
+68.5954
+13
+2.38807
+23
+8.08618
+33
+68.5954
+0
+3DFACE
+8
+m_rifle
+10
+9.37788e-006
+20
+8.08618
+30
+68.5954
+11
+1.19404
+21
+5.68821
+31
+68.5954
+12
+2.06813
+22
+6.84204
+32
+68.5954
+13
+2.06813
+23
+6.84204
+33
+68.5954
+0
+3DFACE
+8
+m_rifle
+10
+9.37788e-006
+20
+8.08618
+30
+68.5954
+11
+9.69103e-006
+21
+5.35646
+31
+68.5954
+12
+1.19404
+22
+5.68821
+32
+68.5954
+13
+1.19404
+23
+5.68821
+33
+68.5954
+0
+3DFACE
+8
+m_rifle
+10
+9.37788e-006
+20
+8.08618
+30
+68.5954
+11
+-1.19402
+21
+5.68821
+31
+68.5954
+12
+9.69103e-006
+22
+5.35646
+32
+68.5954
+13
+9.69103e-006
+23
+5.35646
+33
+68.5954
+0
+3DFACE
+8
+m_rifle
+10
+9.37788e-006
+20
+8.08618
+30
+68.5954
+11
+-2.06811
+21
+6.84204
+31
+68.5954
+12
+-1.19402
+22
+5.68821
+32
+68.5954
+13
+-1.19402
+23
+5.68821
+33
+68.5954
+0
+3DFACE
+8
+m_rifle
+10
+9.37788e-006
+20
+8.08618
+30
+68.5954
+11
+-2.38805
+21
+8.08618
+31
+68.5954
+12
+-2.06811
+22
+6.84204
+32
+68.5954
+13
+-2.06811
+23
+6.84204
+33
+68.5954
+0
+3DFACE
+8
+m_rifle
+10
+9.37788e-006
+20
+8.08618
+30
+68.5954
+11
+-2.06811
+21
+9.4956
+31
+68.5954
+12
+-2.38805
+22
+8.08618
+32
+68.5954
+13
+-2.38805
+23
+8.08618
+33
+68.5954
+0
+3DFACE
+8
+m_rifle
+10
+9.37788e-006
+20
+8.08618
+30
+68.5954
+11
+-1.19402
+21
+10.5497
+31
+68.5954
+12
+-2.06811
+22
+9.4956
+32
+68.5954
+13
+-2.06811
+23
+9.4956
+33
+68.5954
+0
+3DFACE
+8
+m_rifle
+10
+9.37788e-006
+20
+8.08618
+30
+68.5954
+11
+9.27349e-006
+21
+10.8697
+31
+68.5954
+12
+-1.19402
+22
+10.5497
+32
+68.5954
+13
+-1.19402
+23
+10.5497
+33
+68.5954
+0
+3DFACE
+8
+m_rifle
+10
+9.37788e-006
+20
+8.08618
+30
+68.5954
+11
+1.19404
+21
+10.5497
+31
+68.5954
+12
+9.27349e-006
+22
+10.8697
+32
+68.5954
+13
+9.27349e-006
+23
+10.8697
+33
+68.5954
+0
+3DFACE
+8
+m_rifle
+10
+9.37788e-006
+20
+8.08618
+30
+68.5954
+11
+2.06813
+21
+9.4956
+31
+68.5954
+12
+1.19404
+22
+10.5497
+32
+68.5954
+13
+1.19404
+23
+10.5497
+33
+68.5954
+0
+3DFACE
+8
+m_rifle
+10
+9.37788e-006
+20
+8.08618
+30
+68.5954
+11
+2.38807
+21
+8.08618
+31
+68.5954
+12
+2.06813
+22
+9.4956
+32
+68.5954
+13
+2.06813
+23
+9.4956
+33
+68.5954
+0
+3DFACE
+8
+m_rifle
+10
+2.06813
+20
+6.84203
+30
+-17.1514
+11
+2.38807
+21
+8.08617
+31
+-17.1514
+12
+2.38807
+22
+8.08618
+32
+68.5954
+13
+2.38807
+23
+8.08618
+33
+68.5954
+0
+3DFACE
+8
+m_rifle
+10
+2.06813
+20
+6.84203
+30
+-17.1514
+11
+2.38807
+21
+8.08618
+31
+68.5954
+12
+2.06813
+22
+6.84204
+32
+68.5954
+13
+2.06813
+23
+6.84204
+33
+68.5954
+0
+3DFACE
+8
+m_rifle
+10
+1.19404
+20
+5.6882
+30
+-17.1514
+11
+2.06813
+21
+6.84203
+31
+-17.1514
+12
+2.06813
+22
+6.84204
+32
+68.5954
+13
+2.06813
+23
+6.84204
+33
+68.5954
+0
+3DFACE
+8
+m_rifle
+10
+1.19404
+20
+5.6882
+30
+-17.1514
+11
+2.06813
+21
+6.84204
+31
+68.5954
+12
+1.19404
+22
+5.68821
+32
+68.5954
+13
+1.19404
+23
+5.68821
+33
+68.5954
+0
+3DFACE
+8
+m_rifle
+10
+9.7207e-006
+20
+5.35645
+30
+-17.1514
+11
+1.19404
+21
+5.6882
+31
+-17.1514
+12
+1.19404
+22
+5.68821
+32
+68.5954
+13
+1.19404
+23
+5.68821
+33
+68.5954
+0
+3DFACE
+8
+m_rifle
+10
+9.7207e-006
+20
+5.35645
+30
+-17.1514
+11
+1.19404
+21
+5.68821
+31
+68.5954
+12
+9.69103e-006
+22
+5.35646
+32
+68.5954
+13
+9.69103e-006
+23
+5.35646
+33
+68.5954
+0
+3DFACE
+8
+m_rifle
+10
+-1.19402
+20
+5.6882
+30
+-17.1514
+11
+9.7207e-006
+21
+5.35645
+31
+-17.1514
+12
+9.69103e-006
+22
+5.35646
+32
+68.5954
+13
+9.69103e-006
+23
+5.35646
+33
+68.5954
+0
+3DFACE
+8
+m_rifle
+10
+-1.19402
+20
+5.6882
+30
+-17.1514
+11
+9.69103e-006
+21
+5.35646
+31
+68.5954
+12
+-1.19402
+22
+5.68821
+32
+68.5954
+13
+-1.19402
+23
+5.68821
+33
+68.5954
+0
+3DFACE
+8
+m_rifle
+10
+-2.06811
+20
+6.84203
+30
+-17.1514
+11
+-1.19402
+21
+5.6882
+31
+-17.1514
+12
+-1.19402
+22
+5.68821
+32
+68.5954
+13
+-1.19402
+23
+5.68821
+33
+68.5954
+0
+3DFACE
+8
+m_rifle
+10
+-2.06811
+20
+6.84203
+30
+-17.1514
+11
+-1.19402
+21
+5.68821
+31
+68.5954
+12
+-2.06811
+22
+6.84204
+32
+68.5954
+13
+-2.06811
+23
+6.84204
+33
+68.5954
+0
+3DFACE
+8
+m_rifle
+10
+-2.38805
+20
+8.08617
+30
+-17.1514
+11
+-2.06811
+21
+6.84203
+31
+-17.1514
+12
+-2.06811
+22
+6.84204
+32
+68.5954
+13
+-2.06811
+23
+6.84204
+33
+68.5954
+0
+3DFACE
+8
+m_rifle
+10
+-2.38805
+20
+8.08617
+30
+-17.1514
+11
+-2.06811
+21
+6.84204
+31
+68.5954
+12
+-2.38805
+22
+8.08618
+32
+68.5954
+13
+-2.38805
+23
+8.08618
+33
+68.5954
+0
+3DFACE
+8
+m_rifle
+10
+-2.06811
+20
+9.49559
+30
+-17.1514
+11
+-2.38805
+21
+8.08617
+31
+-17.1514
+12
+-2.38805
+22
+8.08618
+32
+68.5954
+13
+-2.38805
+23
+8.08618
+33
+68.5954
+0
+3DFACE
+8
+m_rifle
+10
+-2.06811
+20
+9.49559
+30
+-17.1514
+11
+-2.38805
+21
+8.08618
+31
+68.5954
+12
+-2.06811
+22
+9.4956
+32
+68.5954
+13
+-2.06811
+23
+9.4956
+33
+68.5954
+0
+3DFACE
+8
+m_rifle
+10
+-1.19402
+20
+10.5497
+30
+-17.1514
+11
+-2.06811
+21
+9.49559
+31
+-17.1514
+12
+-2.06811
+22
+9.4956
+32
+68.5954
+13
+-2.06811
+23
+9.4956
+33
+68.5954
+0
+3DFACE
+8
+m_rifle
+10
+-1.19402
+20
+10.5497
+30
+-17.1514
+11
+-2.06811
+21
+9.4956
+31
+68.5954
+12
+-1.19402
+22
+10.5497
+32
+68.5954
+13
+-1.19402
+23
+10.5497
+33
+68.5954
+0
+3DFACE
+8
+m_rifle
+10
+9.30316e-006
+20
+10.8697
+30
+-17.1514
+11
+-1.19402
+21
+10.5497
+31
+-17.1514
+12
+-1.19402
+22
+10.5497
+32
+68.5954
+13
+-1.19402
+23
+10.5497
+33
+68.5954
+0
+3DFACE
+8
+m_rifle
+10
+9.30316e-006
+20
+10.8697
+30
+-17.1514
+11
+-1.19402
+21
+10.5497
+31
+68.5954
+12
+9.27349e-006
+22
+10.8697
+32
+68.5954
+13
+9.27349e-006
+23
+10.8697
+33
+68.5954
+0
+3DFACE
+8
+m_rifle
+10
+1.19404
+20
+10.5497
+30
+-17.1514
+11
+9.30316e-006
+21
+10.8697
+31
+-17.1514
+12
+9.27349e-006
+22
+10.8697
+32
+68.5954
+13
+9.27349e-006
+23
+10.8697
+33
+68.5954
+0
+3DFACE
+8
+m_rifle
+10
+1.19404
+20
+10.5497
+30
+-17.1514
+11
+9.27349e-006
+21
+10.8697
+31
+68.5954
+12
+1.19404
+22
+10.5497
+32
+68.5954
+13
+1.19404
+23
+10.5497
+33
+68.5954
+0
+3DFACE
+8
+m_rifle
+10
+2.06813
+20
+9.49559
+30
+-17.1514
+11
+1.19404
+21
+10.5497
+31
+-17.1514
+12
+1.19404
+22
+10.5497
+32
+68.5954
+13
+1.19404
+23
+10.5497
+33
+68.5954
+0
+3DFACE
+8
+m_rifle
+10
+2.06813
+20
+9.49559
+30
+-17.1514
+11
+1.19404
+21
+10.5497
+31
+68.5954
+12
+2.06813
+22
+9.4956
+32
+68.5954
+13
+2.06813
+23
+9.4956
+33
+68.5954
+0
+3DFACE
+8
+m_rifle
+10
+2.38807
+20
+8.08617
+30
+-17.1514
+11
+2.06813
+21
+9.49559
+31
+-17.1514
+12
+2.06813
+22
+9.4956
+32
+68.5954
+13
+2.06813
+23
+9.4956
+33
+68.5954
+0
+3DFACE
+8
+m_rifle
+10
+2.38807
+20
+8.08617
+30
+-17.1514
+11
+2.06813
+21
+9.4956
+31
+68.5954
+12
+2.38807
+22
+8.08618
+32
+68.5954
+13
+2.38807
+23
+8.08618
+33
+68.5954
+0
+3DFACE
+8
+m_rifle
+10
+-0.298499
+20
+-1.33594
+30
+-0.446208
+11
+-0.298499
+21
+0.612251
+31
+-1.58516
+12
+-0.298499
+22
+-1.45583
+32
+-1.1056
+13
+-0.298499
+23
+-1.45583
+33
+-1.1056
+0
+3DFACE
+8
+m_rifle
+10
+-0.298499
+20
+-1.33594
+30
+-0.446208
+11
+-0.298499
+21
+0.732141
+31
+-0.146484
+12
+-0.298499
+22
+0.612251
+32
+-1.58516
+13
+-0.298499
+23
+0.612251
+33
+-1.58516
+0
+3DFACE
+8
+m_rifle
+10
+-0.298499
+20
+-1.45583
+30
+-1.1056
+11
+-0.298499
+21
+-3.16424
+31
+-0.266377
+12
+-0.298499
+22
+-1.33594
+32
+-0.446208
+13
+-0.298499
+23
+-1.33594
+33
+-0.446208
+0
+3DFACE
+8
+m_rifle
+10
+0.298516
+20
+-1.33594
+30
+-0.446208
+11
+0.298516
+21
+-1.45583
+31
+-1.1056
+12
+0.298516
+22
+0.612251
+32
+-1.58516
+13
+0.298516
+23
+0.612251
+33
+-1.58516
+0
+3DFACE
+8
+m_rifle
+10
+0.298516
+20
+-1.33594
+30
+-0.446208
+11
+0.298516
+21
+0.612251
+31
+-1.58516
+12
+0.298516
+22
+0.732141
+32
+-0.146484
+13
+0.298516
+23
+0.732141
+33
+-0.146484
+0
+3DFACE
+8
+m_rifle
+10
+0.298516
+20
+-1.45583
+30
+-1.1056
+11
+0.298516
+21
+-1.33594
+31
+-0.446208
+12
+0.298516
+22
+-3.16424
+32
+-0.266377
+13
+0.298516
+23
+-3.16424
+33
+-0.266377
+0
+3DFACE
+8
+m_rifle
+10
+0.298516
+20
+-1.33594
+30
+-0.446208
+11
+-0.298499
+21
+0.732141
+31
+-0.146484
+12
+-0.298499
+22
+-1.33594
+32
+-0.446208
+13
+-0.298499
+23
+-1.33594
+33
+-0.446208
+0
+3DFACE
+8
+m_rifle
+10
+0.298516
+20
+-1.33594
+30
+-0.446208
+11
+0.298516
+21
+0.732141
+31
+-0.146484
+12
+-0.298499
+22
+0.732141
+32
+-0.146484
+13
+-0.298499
+23
+0.732141
+33
+-0.146484
+0
+3DFACE
+8
+m_rifle
+10
+0.298516
+20
+-3.16424
+30
+-0.266377
+11
+-0.298499
+21
+-1.33594
+31
+-0.446208
+12
+-0.298499
+22
+-3.16424
+32
+-0.266377
+13
+-0.298499
+23
+-3.16424
+33
+-0.266377
+0
+3DFACE
+8
+m_rifle
+10
+0.298516
+20
+-3.16424
+30
+-0.266377
+11
+0.298516
+21
+-1.33594
+31
+-0.446208
+12
+-0.298499
+22
+-1.33594
+32
+-0.446208
+13
+-0.298499
+23
+-1.33594
+33
+-0.446208
+0
+3DFACE
+8
+m_rifle
+10
+0.298516
+20
+-1.45583
+30
+-1.1056
+11
+-0.298499
+21
+-3.16424
+31
+-0.266377
+12
+-0.298499
+22
+-1.45583
+32
+-1.1056
+13
+-0.298499
+23
+-1.45583
+33
+-1.1056
+0
+3DFACE
+8
+m_rifle
+10
+0.298516
+20
+-1.45583
+30
+-1.1056
+11
+0.298516
+21
+-3.16424
+31
+-0.266377
+12
+-0.298499
+22
+-3.16424
+32
+-0.266377
+13
+-0.298499
+23
+-3.16424
+33
+-0.266377
+0
+3DFACE
+8
+m_rifle
+10
+0.298516
+20
+0.612251
+30
+-1.58516
+11
+-0.298499
+21
+-1.45583
+31
+-1.1056
+12
+-0.298499
+22
+0.612251
+32
+-1.58516
+13
+-0.298499
+23
+0.612251
+33
+-1.58516
+0
+3DFACE
+8
+m_rifle
+10
+0.298516
+20
+0.612251
+30
+-1.58516
+11
+0.298516
+21
+-1.45583
+31
+-1.1056
+12
+-0.298499
+22
+-1.45583
+32
+-1.1056
+13
+-0.298499
+23
+-1.45583
+33
+-1.1056
+0
+3DFACE
+8
+m_rifle
+10
+-1.79104
+20
+-3.09075
+30
+5.50784
+11
+-1.79104
+21
+-7.23018
+31
+13.4521
+12
+-1.79104
+22
+-1.65989
+32
+6.25887
+13
+-1.79104
+23
+-1.65989
+33
+6.25887
+0
+3DFACE
+8
+m_rifle
+10
+-1.79104
+20
+-7.23018
+30
+13.4521
+11
+-1.79104
+21
+-6.00069
+31
+14.6816
+12
+-1.79104
+22
+-1.65989
+32
+6.25887
+13
+-1.79104
+23
+-1.65989
+33
+6.25887
+0
+3DFACE
+8
+m_rifle
+10
+-1.79104
+20
+-6.00069
+30
+14.6816
+11
+-1.79104
+21
+-1.19452
+31
+14.6816
+12
+-1.79104
+22
+-1.65989
+32
+6.25887
+13
+-1.79104
+23
+-1.65989
+33
+6.25887
+0
+3DFACE
+8
+m_rifle
+10
+-1.79104
+20
+-3.09075
+30
+5.50784
+11
+-1.79104
+21
+-4.50547
+31
+3.7566
+12
+-1.79104
+22
+-7.23018
+32
+13.4521
+13
+-1.79104
+23
+-7.23018
+33
+13.4521
+0
+3DFACE
+8
+m_rifle
+10
+-1.79104
+20
+-4.50547
+30
+3.7566
+11
+-1.79104
+21
+-10.9186
+31
+13.4521
+12
+-1.79104
+22
+-7.23018
+32
+13.4521
+13
+-1.79104
+23
+-7.23018
+33
+13.4521
+0
+3DFACE
+8
+m_rifle
+10
+-1.79104
+20
+-4.50547
+30
+3.7566
+11
+-1.79104
+21
+-21.5369
+31
+3.50445
+12
+-1.79104
+22
+-10.9186
+32
+13.4521
+13
+-1.79104
+23
+-10.9186
+33
+13.4521
+0
+3DFACE
+8
+m_rifle
+10
+-1.79104
+20
+-21.5369
+30
+3.50445
+11
+-1.79104
+21
+-21.5369
+31
+14.1227
+12
+-1.79104
+22
+-10.9186
+32
+13.4521
+13
+-1.79104
+23
+-10.9186
+33
+13.4521
+0
+3DFACE
+8
+m_rifle
+10
+-1.79104
+20
+-21.5369
+30
+14.1227
+11
+-1.79104
+21
+-10.9186
+31
+17.4759
+12
+-1.79104
+22
+-10.9186
+32
+13.4521
+13
+-1.79104
+23
+-10.9186
+33
+13.4521
+0
+3DFACE
+8
+m_rifle
+10
+-1.79104
+20
+-21.5369
+30
+14.1227
+11
+-1.79104
+21
+-6.44777
+31
+21.6115
+12
+-1.79104
+22
+-10.9186
+32
+17.4759
+13
+-1.79104
+23
+-10.9186
+33
+17.4759
+0
+3DFACE
+8
+m_rifle
+10
+-1.79104
+20
+-21.5369
+30
+14.1227
+11
+-1.79104
+21
+-6.55955
+31
+23.6234
+12
+-1.79104
+22
+-6.44777
+32
+21.6115
+13
+-1.79104
+23
+-6.44777
+33
+21.6115
+0
+3DFACE
+8
+m_rifle
+10
+1.79105
+20
+-3.09075
+30
+5.50784
+11
+1.79105
+21
+-1.65989
+31
+6.25887
+12
+1.79105
+22
+-7.23018
+32
+13.4521
+13
+1.79105
+23
+-7.23018
+33
+13.4521
+0
+3DFACE
+8
+m_rifle
+10
+1.79105
+20
+-7.23018
+30
+13.4521
+11
+1.79105
+21
+-1.65989
+31
+6.25887
+12
+1.79105
+22
+-6.00069
+32
+14.6816
+13
+1.79105
+23
+-6.00069
+33
+14.6816
+0
+3DFACE
+8
+m_rifle
+10
+1.79105
+20
+-6.00069
+30
+14.6816
+11
+1.79105
+21
+-1.65989
+31
+6.25887
+12
+1.79105
+22
+-1.19452
+32
+14.6816
+13
+1.79105
+23
+-1.19452
+33
+14.6816
+0
+3DFACE
+8
+m_rifle
+10
+1.79105
+20
+-3.09075
+30
+5.50784
+11
+1.79105
+21
+-7.23018
+31
+13.4521
+12
+1.79105
+22
+-4.50547
+32
+3.7566
+13
+1.79105
+23
+-4.50547
+33
+3.7566
+0
+3DFACE
+8
+m_rifle
+10
+1.79105
+20
+-4.50547
+30
+3.7566
+11
+1.79105
+21
+-7.23018
+31
+13.4521
+12
+1.79105
+22
+-10.9186
+32
+13.4521
+13
+1.79105
+23
+-10.9186
+33
+13.4521
+0
+3DFACE
+8
+m_rifle
+10
+1.79105
+20
+-4.50547
+30
+3.7566
+11
+1.79105
+21
+-10.9186
+31
+13.4521
+12
+1.79105
+22
+-21.5369
+32
+3.50445
+13
+1.79105
+23
+-21.5369
+33
+3.50445
+0
+3DFACE